chore: archive AgentDock v1 implementation

This commit is contained in:
leefer
2026-08-24 17:14:08 +08:00
commit f512bd58ec
66 changed files with 10663 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -euo pipefail
base_url="http://127.0.0.1:${RUNNER_PORT:-4174}"
authorization="Authorization: Bearer ${RUNNER_TOKEN:?RUNNER_TOKEN is required}"
response="$(curl -fsS \
-H "${authorization}" \
-H "Content-Type: application/json" \
-d '{"tool":"codex","project":".","cols":100,"rows":30}' \
"${base_url}/sessions")"
session_id="$(printf '%s' "${response}" | jq -r '.session.id')"
test -n "${session_id}"
cleanup() {
curl -fsS -X POST \
-H "${authorization}" \
-H "Content-Type: application/json" \
-d '{}' \
"${base_url}/sessions/${session_id}/stop" >/dev/null || true
}
trap cleanup EXIT
sleep 3
curl -fsS -H "${authorization}" "${base_url}/sessions/${session_id}/output" | tail -c 500
printf '\nSESSION=%s PTY_OK\n' "${session_id}"