Skip to content

[DO NOT MERGE][Feature] Support stateful infra(AGS/etc.)#26

Open
RealAlexandreAI wants to merge 33 commits into
mainfrom
feature/stateful-infra
Open

[DO NOT MERGE][Feature] Support stateful infra(AGS/etc.)#26
RealAlexandreAI wants to merge 33 commits into
mainfrom
feature/stateful-infra

Conversation

@RealAlexandreAI
Copy link
Copy Markdown
Collaborator

@RealAlexandreAI RealAlexandreAI commented May 25, 2026

支持更多 infra

enzopang and others added 29 commits May 19, 2026 19:58
Capture architecture, lifecycle, merge, and cherry-pick guidance before
implementing stateful sandbox on main without the SCF dual-backend switch.

Co-authored-by: Cursor <cursoragent@cursor.com>
Remove docs/stateful-infra-handoff.md; planning docs live under .plans/
only (gitignored per project convention).

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace SCF/legacy AGS paths with stateful gateway + TRW tool-override.
Add preview-url SSE, OVC preview proxy (strip gzip Content-Encoding), and
faster task polling so coding preview loads without waiting for stream end.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ipts

Add buildGatewayTarget/gatewayFetch for E2b-Sandbox-Port routing, CLI to
describe/probe ports, and update-stateful-tool-ports (adds 5173). New tools
from ensure-stateful-tool include vite/ttyd ports.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add 10s×6 polling after tool create and on retryable StartSandboxInstance
failures so users see template_create/template_warmup instead of opaque
InternalError stalls. Format AGS errors with RequestId for support, and
add debug-start-instance script for operator repro.

Co-authored-by: Cursor <cursoragent@cursor.com>
Ignore packages/server/*.db from local dev, remove ad-hoc CodeBuddy probe
scripts, and apply Prettier to sandbox modules left dirty after the prior
commit hook.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sync upstream env-pool, agent SSE/tool-confirm fixes, opencode model
catalog, and docs. Resolve conflicts keeping stateful TRW paths
(/api/workspace/env, provider.createMcpClient, preview/5173) and
AGENT_DEBUG_JSONL-gated local debug logs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace stale SCF/Scope API narrative in architecture, README, and setup;
emit STATEFUL_* in init.mjs. Restore main task-sidebar delete UX and drop
unrelated LoginPage registration copy from the stateful branch.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Resolve Tool by ovc-{envId} without STATEFUL_TOOL_ID; bind/create progress phases
- Distinguish shared vs isolated instance reuse in provider and status UI
- Default STATEFUL_SANDBOX_IMAGE from team public TCR; optional tenant TCR via setup:tcr
- Document sandbox infra (not product codename), provision vs instance mode
- Dockerfile git for install-skills; lockfile sync; setup-tcr syncs server .env image

Co-authored-by: Cursor <cursoragent@cursor.com>
Add docs/upstream-fork.md with fork baseline at 43c3e60 and 2026-05-21
merge history to origin/main a878ddb; align README upstream section.

Co-authored-by: Cursor <cursoragent@cursor.com>
Expose TerminalRef from the terminal tab and add toolbar actions; use a stub terminal placeholder until ttyd preview is wired again.

Co-authored-by: Cursor <cursoragent@cursor.com>
Inject git archive via workspace/env after instance start (avoid boot-time
probe failures). Reconcile tool image without dropping Ports/Probe; improve
shared-instance progress and file browser. Add TRW miniprogram client and API
alignment docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Restore ttyd terminal, simplify env templates, document workspace/env git
injection and branch vs upstream. Add deploy.mjs, cloudrun-deploy.md, and
@cloudbase/manager-node for pnpm deploy:cloud.

Co-authored-by: Cursor <cursoragent@cursor.com>
Merge latest upstream (English README, deploy:cloud, admin scripts, auth
tweaks). Keep feature/stateful-infra: AGS/TRW sandbox, TCB_API_KEY gate,
TRW preview/vite paths; drop SCF sandbox manager and container-probe.
Update README-zh and docs for stateful + CloudRun.

Co-authored-by: Cursor <cursoragent@cursor.com>
Jotai task atom setter accepts Partial<FileBrowserState>, not a React-style
updater function — fixes Docker/web build TS2560.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add ENABLE_AUTH_MODE (default false) with required TCB_ACCESS_TOKEN when
enabled: omit StartSandboxInstance AuthMode NONE, attach X-Access-Token on
data-plane requests, and inject ENABLE_AUTH_MODE into workspace env only.

Align docs and env templates (setup, .env.example, init), restore main
OpenCode e2e scripts as SCF-legacy, remove obsolete trw-api-alignment doc,
and rename TRW/OVC references to sandbox business image terminology.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Split turn progress into a latched sandbox row (reuse/start/fail) and a
separate LLM row so ready sandboxes no longer masquerade as model streaming.
Add DELETE /api/tasks?action=all with shared-mode instance stop, SANDBOX_TTL_SECONDS
for AGS timeouts, default WORKSPACE_ISOLATION=shared, and sidebar tooltips.

Co-authored-by: Cursor <cursoragent@cursor.com>
Route virtual port 7681 through TRW gateway preview with correct WS
handshake (tty protocol, binary frames, gateway path). Limit AGS tool
ports to 9000/49983, add terminal-health, and improve Logs terminal UX
with sandbox progress messages in the task stream.

Co-authored-by: Cursor <cursoragent@cursor.com>
Batch soft-delete with configurable concurrency; shared mode stops one
sandbox instance; isolated destroys run in background. Optimistic sidebar
clear with revert on failure. Restore probe-gateway-port ops script.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use appJotaiStore with JotaiProvider so sidebar loads real tasks instead of
stuck skeletons. Centralize list state in task-list-store with optimistic
clear on delete-all and stale-fetch guards. Stream logs to UI immediately,
stabilize terminal probe against refresh loops, and align tasks API listing.

Co-authored-by: Cursor <cursoragent@cursor.com>
Move secrets to root .env.local (dev) and .env.cloud (deploy), remove
packages/server/.env.example, and update init/deploy/setup scripts accordingly.
Add masked secret prompts via @inquirer/password and default CodeBuddy custom
models to off in init.

Co-authored-by: Cursor <cursoragent@cursor.com>
Remove stale layout/AppLayout and a redundant phase check that failed tsc.
Let cloud init use an ASK_USER_BASE_URL placeholder and write it back on deploy.

Co-authored-by: Cursor <cursoragent@cursor.com>
Document split env workflow in README; deploy script prints console link early,
streams CLI with heartbeats, polls CloudRun status, and writes back sh.run URLs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Centralize CloudService loading via lib/utils/index.js to fix
ERR_UNSUPPORTED_DIR_IMPORT when creating sandboxes on CloudRun Node 22.

Co-authored-by: Cursor <cursoragent@cursor.com>
Register CloudBase MCP policies statically in bundled dist, route git
archive vars through workspace/init only, parse mcporter schema without
stderr pollution, and log upstream WS upgrade HTTP status for terminal debug.

Co-authored-by: Cursor <cursoragent@cursor.com>
Gateway returned 403 on WS upgrade when OVC forwarded CloudRun Origin to
tcloudbasegateway; upstream now sends sandbox auth headers only.

Co-authored-by: Cursor <cursoragent@cursor.com>
@RealAlexandreAI RealAlexandreAI changed the title [WIP] DO NOT MERGE [Feature] Support stateful infra(AGS/etc.) May 27, 2026
enzopang and others added 4 commits May 27, 2026 20:40
Keep Stateful sandbox flow (TCB_API_KEY, .env.local/.env.cloud, preview-ws-proxy).
Bring in main: OpenCode dep, TCR enterprise + podman, coding-mode tool auto-allow,
community docs; drop scf-sandbox-manager (stateful path only).

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@RealAlexandreAI RealAlexandreAI changed the title [Feature] Support stateful infra(AGS/etc.) [DO NOT MERGE][Feature] Support stateful infra(AGS/etc.) May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant