agent-relay 2.0.6 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deploy/workspace/entrypoint.sh +80 -22
- package/deploy/workspace/gh-credential-relay +90 -0
- package/dist/dashboard/out/404.html +1 -1
- package/{packages/dashboard/ui-dist/_next/static/chunks/677-7323947c23b35979.js → dist/dashboard/out/_next/static/chunks/320-22ebe7be58cf982a.js} +1 -1
- package/dist/dashboard/out/_next/static/chunks/app/app/onboarding/page-9914652442f7e4fb.js +1 -0
- package/{packages/dashboard/ui-dist/_next/static/chunks/app/app/page-2e525b1dcc790967.js → dist/dashboard/out/_next/static/chunks/app/app/page-9d6bc8729b429956.js} +1 -1
- package/{packages/dashboard/ui-dist/_next/static/chunks/app/cloud/link/page-5011ae044b90449d.js → dist/dashboard/out/_next/static/chunks/app/cloud/link/page-fa1d5842aa90e8a6.js} +1 -1
- package/dist/dashboard/out/_next/static/chunks/app/connect-repos/page-113060009ef35bc2.js +1 -0
- package/{packages/dashboard/ui-dist/_next/static/chunks/app/history/page-b2ce7c96ed0931da.js → dist/dashboard/out/_next/static/chunks/app/history/page-9965d2483011b846.js} +1 -1
- package/dist/dashboard/out/_next/static/chunks/app/layout-6b91e33784c20610.js +1 -0
- package/{packages/dashboard/ui-dist/_next/static/chunks/app/login/page-6ec54eee75877971.js → dist/dashboard/out/_next/static/chunks/app/login/page-a0ca6f7ca6a100b8.js} +1 -1
- package/{packages/dashboard/ui-dist/_next/static/chunks/app/metrics/page-bf2cb1e5915bc92d.js → dist/dashboard/out/_next/static/chunks/app/metrics/page-1e37ef8e73940b40.js} +1 -1
- package/dist/dashboard/out/_next/static/chunks/app/{page-4e64923d73c35bc9.js → page-487fa38f041815c1.js} +1 -1
- package/dist/dashboard/out/_next/static/chunks/app/pricing/page-9db3ebdfa567a7c9.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/providers/page-bcf46064ac4474ce.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/providers/setup/[provider]/{page-84161c802b020a1f.js → page-4dbe33f0f7691b7c.js} +1 -1
- package/dist/dashboard/out/_next/static/chunks/app/signup/{page-18a4665665f6be11.js → page-1ede2205b58649ca.js} +1 -1
- package/dist/dashboard/out/_next/static/chunks/main-app-fdbeb09028f57c9f.js +1 -0
- package/dist/dashboard/out/app/onboarding.html +1 -1
- package/dist/dashboard/out/app/onboarding.txt +2 -2
- package/dist/dashboard/out/app.html +1 -1
- package/dist/dashboard/out/app.txt +2 -2
- package/dist/dashboard/out/cloud/link.html +1 -1
- package/dist/dashboard/out/cloud/link.txt +2 -2
- package/dist/dashboard/out/connect-repos.html +1 -1
- package/dist/dashboard/out/connect-repos.txt +2 -2
- package/dist/dashboard/out/history.html +1 -1
- package/dist/dashboard/out/history.txt +2 -2
- package/dist/dashboard/out/index.html +1 -1
- package/dist/dashboard/out/index.txt +2 -2
- package/dist/dashboard/out/login.html +2 -2
- package/dist/dashboard/out/login.txt +2 -2
- package/dist/dashboard/out/metrics.html +1 -1
- package/dist/dashboard/out/metrics.txt +2 -2
- package/dist/dashboard/out/pricing.html +2 -2
- package/dist/dashboard/out/pricing.txt +2 -2
- package/dist/dashboard/out/providers/setup/claude.html +1 -1
- package/dist/dashboard/out/providers/setup/claude.txt +2 -2
- package/dist/dashboard/out/providers/setup/codex.html +1 -1
- package/dist/dashboard/out/providers/setup/codex.txt +2 -2
- package/dist/dashboard/out/providers/setup/cursor.html +1 -1
- package/dist/dashboard/out/providers/setup/cursor.txt +2 -2
- package/dist/dashboard/out/providers.html +1 -1
- package/dist/dashboard/out/providers.txt +2 -2
- package/dist/dashboard/out/signup.html +2 -2
- package/dist/dashboard/out/signup.txt +2 -2
- package/package.json +14 -14
- package/packages/api-types/package.json +1 -1
- package/packages/bridge/dist/spawner.js +9 -0
- package/packages/bridge/package.json +7 -7
- package/packages/cloud/dist/server.js +3 -3
- package/packages/cloud/package.json +6 -6
- package/packages/config/package.json +2 -2
- package/packages/continuity/package.json +1 -1
- package/packages/daemon/package.json +12 -12
- package/packages/dashboard/dist/server.js +9 -9
- package/packages/dashboard/package.json +12 -12
- package/packages/dashboard/ui/react-components/App.tsx +21 -435
- package/packages/dashboard/ui/react-components/ChannelChat.tsx +29 -75
- package/packages/dashboard/ui/react-components/MessageComposer.tsx +457 -0
- package/packages/dashboard/ui-dist/404.html +1 -1
- package/packages/dashboard/ui-dist/_next/static/chunks/320-22ebe7be58cf982a.js +1 -0
- package/{dist/dashboard/out/_next/static/chunks/app/app/page-2e525b1dcc790967.js → packages/dashboard/ui-dist/_next/static/chunks/app/app/page-9d6bc8729b429956.js} +1 -1
- package/packages/dashboard/ui-dist/_next/static/chunks/app/{page-4e64923d73c35bc9.js → page-487fa38f041815c1.js} +1 -1
- package/packages/dashboard/ui-dist/app/onboarding.html +1 -1
- package/packages/dashboard/ui-dist/app/onboarding.txt +2 -2
- package/packages/dashboard/ui-dist/app.html +1 -1
- package/packages/dashboard/ui-dist/app.txt +2 -2
- package/packages/dashboard/ui-dist/cloud/link.html +1 -1
- package/packages/dashboard/ui-dist/cloud/link.txt +2 -2
- package/packages/dashboard/ui-dist/connect-repos.html +1 -1
- package/packages/dashboard/ui-dist/connect-repos.txt +2 -2
- package/packages/dashboard/ui-dist/history.html +1 -1
- package/packages/dashboard/ui-dist/history.txt +2 -2
- package/packages/dashboard/ui-dist/index.html +1 -1
- package/packages/dashboard/ui-dist/index.txt +2 -2
- package/packages/dashboard/ui-dist/login.html +2 -2
- package/packages/dashboard/ui-dist/login.txt +2 -2
- package/packages/dashboard/ui-dist/metrics.html +1 -1
- package/packages/dashboard/ui-dist/metrics.txt +2 -2
- package/packages/dashboard/ui-dist/pricing.html +2 -2
- package/packages/dashboard/ui-dist/pricing.txt +2 -2
- package/packages/dashboard/ui-dist/providers/setup/claude.html +1 -1
- package/packages/dashboard/ui-dist/providers/setup/claude.txt +2 -2
- package/packages/dashboard/ui-dist/providers/setup/codex.html +1 -1
- package/packages/dashboard/ui-dist/providers/setup/codex.txt +2 -2
- package/packages/dashboard/ui-dist/providers/setup/cursor.html +1 -1
- package/packages/dashboard/ui-dist/providers/setup/cursor.txt +2 -2
- package/packages/dashboard/ui-dist/providers.html +1 -1
- package/packages/dashboard/ui-dist/providers.txt +2 -2
- package/packages/dashboard/ui-dist/signup.html +2 -2
- package/packages/dashboard/ui-dist/signup.txt +2 -2
- package/packages/dashboard-server/dist/server.js +5 -5
- package/packages/dashboard-server/package.json +12 -12
- package/packages/hooks/package.json +4 -4
- package/packages/mcp/package.json +2 -2
- package/packages/memory/package.json +2 -2
- package/packages/policy/package.json +2 -2
- package/packages/protocol/package.json +1 -1
- package/packages/resiliency/dist/cgroup-manager.d.ts +152 -0
- package/packages/resiliency/dist/cgroup-manager.js +394 -0
- package/packages/resiliency/dist/index.d.ts +1 -0
- package/packages/resiliency/dist/index.js +1 -0
- package/packages/resiliency/package.json +1 -1
- package/packages/sdk/package.json +2 -2
- package/packages/spawner/package.json +1 -1
- package/packages/state/package.json +1 -1
- package/packages/storage/package.json +2 -2
- package/packages/telemetry/package.json +1 -1
- package/packages/trajectory/package.json +2 -2
- package/packages/user-directory/package.json +2 -2
- package/packages/utils/package.json +1 -1
- package/packages/wrapper/dist/relay-pty-orchestrator.d.ts +8 -4
- package/packages/wrapper/dist/relay-pty-orchestrator.js +47 -25
- package/packages/wrapper/package.json +6 -6
- package/dist/dashboard/out/_next/static/chunks/320-900169c942e31422.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/app/app/onboarding/page-f746f29e01fffc43.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/app/cloud/link/page-5011ae044b90449d.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/app/connect-repos/page-03ac6f35a6654ea6.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/app/history/page-b2ce7c96ed0931da.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/app/layout-c0d118c0f92d969c.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/app/login/page-6ec54eee75877971.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/app/metrics/page-bf2cb1e5915bc92d.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/app/pricing/page-0efa024c28ba4597.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/app/providers/page-e65a0010da6ea5be.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/main-app-6e8e8d3ef4e0192a.js +0 -1
- package/packages/dashboard/ui-dist/_next/static/chunks/320-900169c942e31422.js +0 -1
- package/packages/dashboard/ui-dist/_next/static/chunks/app/app/onboarding/page-f746f29e01fffc43.js +0 -1
- package/packages/dashboard/ui-dist/_next/static/chunks/app/app/page-44813aa26ad19681.js +0 -1
- package/packages/dashboard/ui-dist/_next/static/chunks/app/connect-repos/page-03ac6f35a6654ea6.js +0 -1
- package/packages/dashboard/ui-dist/_next/static/chunks/app/layout-c0d118c0f92d969c.js +0 -1
- package/packages/dashboard/ui-dist/_next/static/chunks/app/page-7993778218818ace.js +0 -1
- package/packages/dashboard/ui-dist/_next/static/chunks/app/pricing/page-0efa024c28ba4597.js +0 -1
- package/packages/dashboard/ui-dist/_next/static/chunks/app/providers/page-e65a0010da6ea5be.js +0 -1
- package/packages/dashboard/ui-dist/_next/static/chunks/app/providers/setup/[provider]/page-84161c802b020a1f.js +0 -1
- package/packages/dashboard/ui-dist/_next/static/chunks/app/signup/page-18a4665665f6be11.js +0 -1
- package/packages/dashboard/ui-dist/_next/static/chunks/main-app-6e8e8d3ef4e0192a.js +0 -1
- /package/dist/dashboard/out/_next/static/{lIJs7zSKBaI58kpqegulQ → loxKCRf0rbwVD8vl_Gw60}/_buildManifest.js +0 -0
- /package/dist/dashboard/out/_next/static/{lIJs7zSKBaI58kpqegulQ → loxKCRf0rbwVD8vl_Gw60}/_ssgManifest.js +0 -0
- /package/packages/dashboard/ui-dist/_next/static/{KIxE0Ds_zdGuDJDQu7_sb → 1yt8VDAusp2yTBf4JFA7F}/_buildManifest.js +0 -0
- /package/packages/dashboard/ui-dist/_next/static/{KIxE0Ds_zdGuDJDQu7_sb → 1yt8VDAusp2yTBf4JFA7F}/_ssgManifest.js +0 -0
- /package/packages/dashboard/ui-dist/_next/static/{SoK46dEi3IsNBVWXD9x0L → chdCrViSD2yReZElqRfk0}/_buildManifest.js +0 -0
- /package/packages/dashboard/ui-dist/_next/static/{SoK46dEi3IsNBVWXD9x0L → chdCrViSD2yReZElqRfk0}/_ssgManifest.js +0 -0
- /package/packages/dashboard/ui-dist/_next/static/{lIJs7zSKBaI58kpqegulQ → loxKCRf0rbwVD8vl_Gw60}/_buildManifest.js +0 -0
- /package/packages/dashboard/ui-dist/_next/static/{lIJs7zSKBaI58kpqegulQ → loxKCRf0rbwVD8vl_Gw60}/_ssgManifest.js +0 -0
|
@@ -6,6 +6,13 @@ log() {
|
|
|
6
6
|
echo "[workspace] $*"
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
# Debug logging function
|
|
10
|
+
debug() {
|
|
11
|
+
if [[ "${GH_CREDENTIAL_DEBUG:-}" == "1" ]]; then
|
|
12
|
+
echo "[workspace:debug] $*" >&2
|
|
13
|
+
fi
|
|
14
|
+
}
|
|
15
|
+
|
|
9
16
|
# Fix volume permissions and drop to workspace user if running as root
|
|
10
17
|
if [[ "$(id -u)" == "0" ]]; then
|
|
11
18
|
# Fix /data and /workspace permissions before dropping privileges
|
|
@@ -153,28 +160,71 @@ if [[ -n "${CLOUD_API_URL:-}" && -n "${WORKSPACE_ID:-}" && -n "${WORKSPACE_TOKEN
|
|
|
153
160
|
# fallback chain will use this token (env > hosts.yml > gh CLI > cloud API).
|
|
154
161
|
# ============================================================================
|
|
155
162
|
if [[ -z "${GH_TOKEN:-}" ]]; then
|
|
156
|
-
log "Fetching GitHub token from cloud API..."
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
163
|
+
log "Fetching GitHub token from cloud API (with retry)..."
|
|
164
|
+
|
|
165
|
+
GH_TOKEN_MAX_RETRIES=3
|
|
166
|
+
GH_TOKEN_RETRY_DELAY=2
|
|
167
|
+
GH_TOKEN_FETCHED=""
|
|
168
|
+
|
|
169
|
+
for attempt in $(seq 1 $GH_TOKEN_MAX_RETRIES); do
|
|
170
|
+
log "Attempt $attempt/$GH_TOKEN_MAX_RETRIES to fetch token..."
|
|
171
|
+
|
|
172
|
+
# Remove -f flag to capture error responses, use -w to get HTTP status
|
|
173
|
+
GH_TOKEN_HTTP_CODE=0
|
|
174
|
+
GH_TOKEN_RESPONSE=$(curl -s -w "\n%{http_code}" --max-time 10 \
|
|
175
|
+
-H "Authorization: Bearer ${WORKSPACE_TOKEN}" \
|
|
176
|
+
"${CLOUD_API_URL}/api/git/token?workspaceId=${WORKSPACE_ID}" 2>&1) || true
|
|
177
|
+
|
|
178
|
+
# Split response and status code
|
|
179
|
+
GH_TOKEN_HTTP_CODE=$(echo "$GH_TOKEN_RESPONSE" | tail -1)
|
|
180
|
+
GH_TOKEN_RESPONSE=$(echo "$GH_TOKEN_RESPONSE" | head -n -1)
|
|
181
|
+
|
|
182
|
+
debug "HTTP Status: $GH_TOKEN_HTTP_CODE"
|
|
183
|
+
debug "Response: ${GH_TOKEN_RESPONSE:0:200}"
|
|
184
|
+
|
|
185
|
+
# Handle different failure modes
|
|
186
|
+
case "$GH_TOKEN_HTTP_CODE" in
|
|
187
|
+
200)
|
|
188
|
+
# Success - parse token
|
|
189
|
+
FETCHED_TOKEN=$(echo "$GH_TOKEN_RESPONSE" | jq -r '.userToken // .token // empty' 2>/dev/null)
|
|
190
|
+
if [[ -n "${FETCHED_TOKEN}" && "${FETCHED_TOKEN}" != "null" ]]; then
|
|
191
|
+
export GH_TOKEN="${FETCHED_TOKEN}"
|
|
192
|
+
export GITHUB_TOKEN="${FETCHED_TOKEN}"
|
|
193
|
+
echo "export GH_TOKEN=\"${FETCHED_TOKEN}\"" > "${HOME}/.gh_token"
|
|
194
|
+
echo "export GITHUB_TOKEN=\"${FETCHED_TOKEN}\"" >> "${HOME}/.gh_token"
|
|
195
|
+
chmod 600 "${HOME}/.gh_token"
|
|
196
|
+
log "✓ GH_TOKEN fetched successfully (attempt $attempt)"
|
|
197
|
+
GH_TOKEN_FETCHED="yes"
|
|
198
|
+
break
|
|
199
|
+
else
|
|
200
|
+
log "WARN: Response 200 but no token in JSON response"
|
|
201
|
+
GH_TOKEN_FETCHED="empty-response"
|
|
202
|
+
fi
|
|
203
|
+
;;
|
|
204
|
+
401|403)
|
|
205
|
+
# Auth error - don't retry
|
|
206
|
+
log "ERROR: Authentication failed (HTTP $GH_TOKEN_HTTP_CODE)"
|
|
207
|
+
log " Check WORKSPACE_TOKEN and CLOUD_API_URL credentials"
|
|
208
|
+
GH_TOKEN_FETCHED="auth-error"
|
|
209
|
+
break
|
|
210
|
+
;;
|
|
211
|
+
000|28)
|
|
212
|
+
# Network timeout (000=curl error, 28=timeout)
|
|
213
|
+
log "WARN: Network timeout on attempt $attempt"
|
|
214
|
+
[[ $attempt -lt $GH_TOKEN_MAX_RETRIES ]] && sleep $((GH_TOKEN_RETRY_DELAY * (2 ** (attempt - 1))))
|
|
215
|
+
;;
|
|
216
|
+
*)
|
|
217
|
+
# Other HTTP errors - could be transient, retry
|
|
218
|
+
log "WARN: HTTP $GH_TOKEN_HTTP_CODE on attempt $attempt"
|
|
219
|
+
[[ $attempt -lt $GH_TOKEN_MAX_RETRIES ]] && sleep $((GH_TOKEN_RETRY_DELAY * (2 ** (attempt - 1))))
|
|
220
|
+
;;
|
|
221
|
+
esac
|
|
222
|
+
done
|
|
223
|
+
|
|
224
|
+
# Final status
|
|
225
|
+
if [[ -z "$GH_TOKEN_FETCHED" ]]; then
|
|
226
|
+
log "WARN: Could not fetch GitHub token after $GH_TOKEN_MAX_RETRIES attempts"
|
|
227
|
+
log " Git operations will use credential helper fallback chain"
|
|
178
228
|
fi
|
|
179
229
|
else
|
|
180
230
|
log "GH_TOKEN already set in environment"
|
|
@@ -191,6 +241,14 @@ if [[ -n "${CLOUD_API_URL:-}" && -n "${WORKSPACE_ID:-}" && -n "${WORKSPACE_TOKEN
|
|
|
191
241
|
# NOTE: Do NOT create hosts.yml with placeholder - it causes migration errors
|
|
192
242
|
# when combined with GH_TOKEN. The gh-relay wrapper in /usr/local/bin/gh
|
|
193
243
|
# handles token refresh automatically with caching.
|
|
244
|
+
# Install and configure gh-credential-relay credential helper
|
|
245
|
+
# This allows gh CLI to fetch fresh tokens from cloud API on-demand
|
|
246
|
+
if [[ -f "/app/deploy/workspace/gh-credential-relay" ]]; then
|
|
247
|
+
sudo install -m 755 /app/deploy/workspace/gh-credential-relay /usr/local/bin/gh-credential-relay
|
|
248
|
+
gh config set -h github.com credential-helper gh-credential-relay 2>/dev/null || true
|
|
249
|
+
log "Configured gh CLI to use cloud API credential helper"
|
|
250
|
+
fi
|
|
251
|
+
|
|
194
252
|
mkdir -p "${HOME}/.config/gh"
|
|
195
253
|
# Remove any stale hosts.yml that might cause migration errors
|
|
196
254
|
rm -f "${HOME}/.config/gh/hosts.yml"
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# GitHub CLI Credential Helper for Agent Relay Workspaces
|
|
4
|
+
#
|
|
5
|
+
# This credential helper provides GitHub authentication tokens to the gh CLI
|
|
6
|
+
# by fetching from the cloud API. It works in non-interactive container
|
|
7
|
+
# environments without requiring manual gh auth login.
|
|
8
|
+
#
|
|
9
|
+
# Installation:
|
|
10
|
+
# gh config set -h github.com credential-helper gh-credential-relay
|
|
11
|
+
#
|
|
12
|
+
# Environment variables (auto-set by workspace entrypoint):
|
|
13
|
+
# CLOUD_API_URL - Cloud API base URL
|
|
14
|
+
# WORKSPACE_ID - Workspace identifier
|
|
15
|
+
# WORKSPACE_TOKEN - Bearer token for cloud API auth
|
|
16
|
+
|
|
17
|
+
set -euo pipefail
|
|
18
|
+
|
|
19
|
+
# Debug logging (enable with GH_CREDENTIAL_DEBUG=1)
|
|
20
|
+
debug() {
|
|
21
|
+
if [[ "${GH_CREDENTIAL_DEBUG:-}" == "1" ]]; then
|
|
22
|
+
echo "gh-credential-relay: $*" >&2
|
|
23
|
+
fi
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
debug "Called with args: $*"
|
|
27
|
+
|
|
28
|
+
# Only handle 'get' operation for storing credentials
|
|
29
|
+
if [[ "${1:-}" != "get" ]]; then
|
|
30
|
+
debug "Ignoring non-get operation: ${1:-}"
|
|
31
|
+
exit 0
|
|
32
|
+
fi
|
|
33
|
+
|
|
34
|
+
# Read input from gh CLI (host, protocol, etc)
|
|
35
|
+
declare -A input
|
|
36
|
+
while IFS='=' read -r key value; do
|
|
37
|
+
[[ -z "$key" ]] && break
|
|
38
|
+
input["$key"]="$value"
|
|
39
|
+
done
|
|
40
|
+
|
|
41
|
+
host="${input[host]:-}"
|
|
42
|
+
debug "Host: $host"
|
|
43
|
+
|
|
44
|
+
# Only provide credentials for github.com
|
|
45
|
+
if [[ "$host" != "github.com" ]]; then
|
|
46
|
+
debug "Not github.com, skipping"
|
|
47
|
+
exit 0
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
# Check required environment variables
|
|
51
|
+
if [[ -z "${CLOUD_API_URL:-}" ]]; then
|
|
52
|
+
echo "gh-credential-relay: CLOUD_API_URL not set" >&2
|
|
53
|
+
exit 1
|
|
54
|
+
fi
|
|
55
|
+
|
|
56
|
+
if [[ -z "${WORKSPACE_ID:-}" ]]; then
|
|
57
|
+
echo "gh-credential-relay: WORKSPACE_ID not set" >&2
|
|
58
|
+
exit 1
|
|
59
|
+
fi
|
|
60
|
+
|
|
61
|
+
if [[ -z "${WORKSPACE_TOKEN:-}" ]]; then
|
|
62
|
+
echo "gh-credential-relay: WORKSPACE_TOKEN not set" >&2
|
|
63
|
+
exit 1
|
|
64
|
+
fi
|
|
65
|
+
|
|
66
|
+
debug "Fetching token from ${CLOUD_API_URL}/api/git/token?workspaceId=${WORKSPACE_ID}"
|
|
67
|
+
|
|
68
|
+
# Fetch fresh token from cloud API (5 second timeout)
|
|
69
|
+
response=$(curl -s --max-time 5 \
|
|
70
|
+
-H "Authorization: Bearer ${WORKSPACE_TOKEN}" \
|
|
71
|
+
"${CLOUD_API_URL}/api/git/token?workspaceId=${WORKSPACE_ID}" 2>/dev/null) || true
|
|
72
|
+
|
|
73
|
+
if [[ -z "$response" ]]; then
|
|
74
|
+
debug "No response from cloud API"
|
|
75
|
+
exit 1
|
|
76
|
+
fi
|
|
77
|
+
|
|
78
|
+
# Parse JSON response
|
|
79
|
+
token=$(echo "$response" | jq -r '.userToken // .token // empty' 2>/dev/null)
|
|
80
|
+
|
|
81
|
+
if [[ -z "$token" ]]; then
|
|
82
|
+
debug "No token in response"
|
|
83
|
+
exit 1
|
|
84
|
+
fi
|
|
85
|
+
|
|
86
|
+
# Output in git credential format (same as git-credential-relay)
|
|
87
|
+
echo "protocol=https"
|
|
88
|
+
echo "host=github.com"
|
|
89
|
+
echo "username=x-access-token"
|
|
90
|
+
echo "password=${token}"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/99c2552394077586.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-1cdd8ed57114d5e1.js"/><script src="/_next/static/chunks/fd9d1056-609918ca7b6280bb.js" async=""></script><script src="/_next/static/chunks/117-c8afed19e821a35d.js" async=""></script><script src="/_next/static/chunks/main-app-
|
|
1
|
+
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/99c2552394077586.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-1cdd8ed57114d5e1.js"/><script src="/_next/static/chunks/fd9d1056-609918ca7b6280bb.js" async=""></script><script src="/_next/static/chunks/117-c8afed19e821a35d.js" async=""></script><script src="/_next/static/chunks/main-app-fdbeb09028f57c9f.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Agent Relay Dashboard</title><meta name="description" content="Fleet control dashboard for Agent Relay"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-1cdd8ed57114d5e1.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/99c2552394077586.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[2846,[],\"\"]\n4:I[4707,[],\"\"]\n5:I[6423,[],\"\"]\nb:I[1060,[],\"\"]\n6:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n7:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n8:{\"display\":\"inline-block\"}\n9:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nc:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"loxKCRf0rbwVD8vl_Gw60\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/99c2552394077586.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$6\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$7\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$8\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$9\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$La\"],\"globalErrorComponent\":\"$b\",\"missingSlots\":\"$Wc\"}]\n"])</script><script>self.__next_f.push([1,"a:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Agent Relay Dashboard\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Fleet control dashboard for Agent Relay\"}]]\n3:null\n"])</script></body></html>
|