carthagent 0.0.0-stage → 1.1.0-beta.1
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/LICENSE +21 -0
- package/README.md +276 -2
- package/bin/ctg.mjs +18 -0
- package/docs/beta-rewards-e2e-plan.md +48 -0
- package/docs/beta-rewards-e2e-results.md +84 -0
- package/docs/budgets.md +72 -0
- package/docs/compaction.md +34 -0
- package/docs/context-efficiency-plan.md +24 -0
- package/docs/context-efficiency-review.md +27 -0
- package/docs/context-efficiency.md +49 -0
- package/docs/deepseek-jev-benchmark-plan.md +70 -0
- package/docs/deepseek-jev-benchmark-repair-plan.md +20 -0
- package/docs/deepseek-jev-benchmark-restart.md +9 -0
- package/docs/deepseek-jev-benchmark-results.md +77 -0
- package/docs/deepseek-jev-benchmark-running.md +60 -0
- package/docs/deepseek-jev-benchmark-v3-results.md +41 -0
- package/docs/deepseek-jev-benchmark-v4-protocol.md +15 -0
- package/docs/deepseek-jev-benchmark-v4-results.md +119 -0
- package/docs/deepseek-jev-http400-diagnosis.md +45 -0
- package/docs/delivery-review-evidence.md +53 -0
- package/docs/delivery-timeout-repair-plan.md +51 -0
- package/docs/evaluation-readiness.md +31 -0
- package/docs/evaluation.md +70 -0
- package/docs/extending.md +354 -0
- package/docs/glm-pilot-execution.md +9 -0
- package/docs/glm-pilot-plan.md +15 -0
- package/docs/glm-pilot-results.md +71 -0
- package/docs/glyph-review/host-chrome-glyph-compatibility-v4.md +83 -0
- package/docs/glyph-review/test-isolation-v1.md +26 -0
- package/docs/glyph-review/typecheck-base.log +1 -0
- package/docs/glyph-review/typecheck-v4.log +1 -0
- package/docs/glyph-review/unicode-inventory-v4.csv +402 -0
- package/docs/graph-context-optimization.md +15 -0
- package/docs/help-dispatch-review.md +69 -0
- package/docs/jev-repository-pilot-plan.md +25 -0
- package/docs/jev-repository-pilot-protocol.md +39 -0
- package/docs/jev-repository-pilot-restart.md +7 -0
- package/docs/jev-repository-pilot-results.md +79 -0
- package/docs/jev.md +32 -0
- package/docs/launch-readiness-live-results.md +65 -0
- package/docs/legacy-cli.md +150 -0
- package/docs/live-theme-plugin-api.md +18 -0
- package/docs/model-registry.md +25 -0
- package/docs/native-cli.md +102 -0
- package/docs/native-compatibility.md +133 -0
- package/docs/native-daily-quests.md +132 -0
- package/docs/native-glyph-pty.md +59 -0
- package/docs/native-manual-testing.md +336 -0
- package/docs/native-slash-acceptance-handoff.md +49 -0
- package/docs/native-terminal-paired-failure-2026-10-17.md +40 -0
- package/docs/native-terminal-performance.md +310 -0
- package/docs/native-terminal-semantics-evidence/README.md +25 -0
- package/docs/native-terminal-semantics-evidence/controlled-host-model-selftest.json +16 -0
- package/docs/native-terminal-semantics-evidence/current-acceptance-status.json +59 -0
- package/docs/native-terminal-semantics-evidence/final-binary-focused-85bb44a.json +154 -0
- package/docs/native-terminal-semantics-evidence/final-binary-full-incomplete-85bb44a.json +160 -0
- package/docs/native-terminal-semantics-evidence/final-binary-layout-85bb44a.json +149 -0
- package/docs/native-terminal-semantics-evidence/final-binary-layout-interactive-85bb44a.json +159 -0
- package/docs/native-terminal-semantics-evidence/final-binary-model-picker-escape-unchanged-85bb44a.json +44 -0
- package/docs/native-terminal-semantics-evidence/final-binary-model-picker-exact-identity-85bb44a.json +47 -0
- package/docs/native-terminal-semantics-evidence/final-binary-model-picker-unchanged-model-incomplete-85bb44a.json +58 -0
- package/docs/native-terminal-semantics-evidence/final-binary-model-selftest.json +16 -0
- package/docs/native-terminal-semantics-evidence/final-binary-picker-cancel-incomplete-85bb44a.json +62 -0
- package/docs/native-terminal-semantics-evidence/focused-clipboard-title-stale-binary.json +161 -0
- package/docs/native-terminal-semantics-evidence/layout-stale-binary-observation-not-accepted.json +153 -0
- package/docs/native-terminal-semantics-evidence/picker-latest-incomplete-attempt.json +62 -0
- package/docs/native-terminal-semantics-evidence/picker-previous-probe-pass.json +61 -0
- package/docs/native-terminal-semantics.md +89 -0
- package/docs/native-upgrade.md +175 -0
- package/docs/opencode-archive.md +9 -0
- package/docs/opencode-composed-source-review.md +89 -0
- package/docs/opencode-migration.md +331 -0
- package/docs/opencode-owned-runtime.md +241 -0
- package/docs/opencode-runtime.md +106 -0
- package/docs/opencode-theme-provider-proof/README.md +55 -0
- package/docs/opencode-theme-provider-proof/live-theme-api-base.patch +122 -0
- package/docs/opencode-theme-provider-proof/plugin-theme-provider.patch +107 -0
- package/docs/opencode-theme-provider-proof/session-ui-base.patch +1217 -0
- package/docs/opencode-workspace.md +31 -0
- package/docs/owned-host-controls-proof.md +39 -0
- package/docs/owned-runtime-release-manifest.md +42 -0
- package/docs/owned-runtime-workflow-registration.md +17 -0
- package/docs/owned-visual-clear-proof.md +40 -0
- package/docs/patches/opencode-v2.0.32-glyph-spinner-test-isolation-v1.patch +50 -0
- package/docs/patches/opencode-v2.0.32-glyphs.patch +3670 -0
- package/docs/patches/opencode-v2.0.32-help-dispatch.patch +156 -0
- package/docs/patches/opencode-v2.0.32-live-theme-api.patch +122 -0
- package/docs/patches/opencode-v2.0.32-session-ui-combined-v1.patch +5272 -0
- package/docs/patches/opencode-v2.0.32-session-ui-combined-v2.patch +6052 -0
- package/docs/patches/opencode-v2.0.32-session-ui-combined-v3.patch +8657 -0
- package/docs/patches/opencode-v2.0.32-session-ui-combined-v4.patch +9928 -0
- package/docs/patches/opencode-v2.0.32-session-ui-combined-v5.patch +13965 -0
- package/docs/patches/opencode-v2.0.32-session-ui.patch +5137 -0
- package/docs/plan-advisor-evaluation.md +38 -0
- package/docs/planning-startup-fix-plan.md +23 -0
- package/docs/planning-startup-fix-review.md +24 -0
- package/docs/planning.md +118 -0
- package/docs/production-merge-review.md +23 -0
- package/docs/quality.md +35 -0
- package/docs/release-notes-beta.1.md +60 -0
- package/docs/release-notes-native-draft.md +73 -0
- package/docs/release-notes-preview.10.md +121 -0
- package/docs/release-notes-preview.11.md +76 -0
- package/docs/release-notes-preview.12.md +55 -0
- package/docs/release-notes-preview.13.md +68 -0
- package/docs/release-notes-preview.9.md +130 -0
- package/docs/repository-benchmark-design.md +111 -0
- package/docs/review-assurance.md +9 -0
- package/docs/review-experiment-results.md +59 -0
- package/docs/source-preview.md +120 -0
- package/docs/tested-planning-roadmap.md +58 -0
- package/docs/tested-planning.md +58 -0
- package/docs/tui-pickers.md +9 -0
- package/docs/webdriver.md +83 -0
- package/docs/workflow-modes.md +26 -0
- package/docs/workflow.d2 +17 -0
- package/docs/workflow.svg +149 -0
- package/docs/workspace-coordination.md +9 -0
- package/evaluate.mjs +276 -0
- package/extensions/codegraph.ts +36 -0
- package/extensions/delivery.ts +819 -0
- package/extensions/experiential.ts +21 -0
- package/extensions/subscriptions.ts +21 -0
- package/guidance/profiles/authenticated-web.json +24 -0
- package/guidance/profiles/data-visualization.json +25 -0
- package/guidance/profiles/database-change.json +24 -0
- package/guidance/profiles/external-api.json +24 -0
- package/guidance/profiles/transactional-data.json +25 -0
- package/guidance/profiles/web-application.json +26 -0
- package/lib/acceptance-review.mjs +4 -0
- package/lib/browser-bin.mjs +160 -0
- package/lib/browser-errors.mjs +54 -0
- package/lib/browser.mjs +219 -0
- package/lib/budget.mjs +37 -0
- package/lib/cdp.mjs +221 -0
- package/lib/cloud/client.mjs +275 -0
- package/lib/cloud/control-plane.mjs +350 -0
- package/lib/cloud/gateway.mjs +380 -0
- package/lib/cloud/http.mjs +135 -0
- package/lib/cloud/ledger.mjs +215 -0
- package/lib/codegraph-query.mjs +60 -0
- package/lib/codegraph.mjs +378 -0
- package/lib/context-archive.mjs +18 -0
- package/lib/delivery-context.mjs +132 -0
- package/lib/delivery-guidance.mjs +9 -0
- package/lib/delivery-review.mjs +107 -0
- package/lib/delivery.mjs +611 -0
- package/lib/engine.mjs +137 -0
- package/lib/environment.mjs +8 -0
- package/lib/guidance.mjs +71 -0
- package/lib/jev-advisor.mjs +47 -0
- package/lib/opencode/archive.mjs +122 -0
- package/lib/opencode/cli-runtime.mjs +1171 -0
- package/lib/opencode/cli.mjs +252 -0
- package/lib/opencode/compatibility.mjs +19 -0
- package/lib/opencode/credentials.mjs +260 -0
- package/lib/opencode/demo.mjs +53 -0
- package/lib/opencode/evaluation-budget-plugin/index.ts +150 -0
- package/lib/opencode/evaluation.mjs +262 -0
- package/lib/opencode/file-lock.mjs +86 -0
- package/lib/opencode/headless.mjs +217 -0
- package/lib/opencode/provider-policy.mjs +23 -0
- package/lib/opencode/review.mjs +234 -0
- package/lib/opencode/runtime-artifact.mjs +335 -0
- package/lib/opencode/runtime-github-transport.mjs +121 -0
- package/lib/opencode/runtime-release.json +36 -0
- package/lib/opencode/runtime.mjs +525 -0
- package/lib/opencode/service.mjs +291 -0
- package/lib/opencode/session-options.mjs +64 -0
- package/lib/opencode/update.mjs +222 -0
- package/lib/opencode/workspace.mjs +133 -0
- package/lib/openrouter-jev.mjs +37 -0
- package/lib/outcome-contract.mjs +21 -0
- package/lib/plan-advisor.mjs +38 -0
- package/lib/planning-access.mjs +7 -0
- package/lib/planning-advice.mjs +28 -0
- package/lib/planning-discovery.mjs +14 -0
- package/lib/planning-guide.mjs +34 -0
- package/lib/planning-view.mjs +57 -0
- package/lib/planning.mjs +155 -0
- package/lib/probe-diagnostics.mjs +13 -0
- package/lib/providers/experiential.mjs +292 -0
- package/lib/providers/model-catalog.json +700 -0
- package/lib/providers/model-catalog.mjs +7 -0
- package/lib/providers/names.mjs +13 -0
- package/lib/providers/subscription-models.mjs +483 -0
- package/lib/reports.mjs +80 -0
- package/lib/review-state.mjs +49 -0
- package/lib/review.mjs +114 -0
- package/lib/scenarios.mjs +99 -0
- package/lib/ship-auth.mjs +44 -0
- package/lib/ship-jev.mjs +59 -0
- package/lib/ship-telemetry.mjs +183 -0
- package/lib/tui/ansi.mjs +255 -0
- package/lib/tui/app.mjs +2445 -0
- package/lib/tui/auth.mjs +249 -0
- package/lib/tui/carthage.mjs +109 -0
- package/lib/tui/clipboard.mjs +122 -0
- package/lib/tui/d2.mjs +431 -0
- package/lib/tui/feed.mjs +467 -0
- package/lib/tui/framing.mjs +1 -0
- package/lib/tui/glyphs.mjs +172 -0
- package/lib/tui/hash-worker.mjs +11 -0
- package/lib/tui/mock-engine.mjs +222 -0
- package/lib/tui/models.mjs +73 -0
- package/lib/tui/picker.mjs +18 -0
- package/lib/tui/theme.mjs +663 -0
- package/lib/tui/title.mjs +7 -0
- package/lib/update-channel.mjs +62 -0
- package/lib/update.mjs +239 -0
- package/lib/webdriver.mjs +82 -0
- package/lib/workflow.mjs +88 -0
- package/lib/workspace.mjs +39 -0
- package/metadata.json +8 -0
- package/package.json +120 -4
- package/plugins/carthagent/README.md +23 -0
- package/plugins/carthagent/index.ts +3 -0
- package/plugins/carthagent/package.json +28 -0
- package/plugins/carthagent/src/archive-rpc.ts +46 -0
- package/plugins/carthagent/src/bootstrap.ts +38 -0
- package/plugins/carthagent/src/daily-evidence.mjs +57 -0
- package/plugins/carthagent/src/daily-quests-rpc.ts +50 -0
- package/plugins/carthagent/src/daily-source-rpc.ts +52 -0
- package/plugins/carthagent/src/index.ts +109 -0
- package/plugins/carthagent/src/pull-request-rpc.ts +54 -0
- package/plugins/carthagent/src/rpc.ts +121 -0
- package/plugins/carthagent/src/server/archive-rpc.ts +327 -0
- package/plugins/carthagent/src/server/budgets.ts +21 -0
- package/plugins/carthagent/src/server/codegraph.ts +53 -0
- package/plugins/carthagent/src/server/daily-quests-rpc.ts +277 -0
- package/plugins/carthagent/src/server/daily-source-rpc.ts +243 -0
- package/plugins/carthagent/src/server/delivery.ts +603 -0
- package/plugins/carthagent/src/server/device-auth.ts +91 -0
- package/plugins/carthagent/src/server/framing.mjs +80 -0
- package/plugins/carthagent/src/server/native-delivery.ts +26 -0
- package/plugins/carthagent/src/server/orchestration.ts +56 -0
- package/plugins/carthagent/src/server/policy.ts +24 -0
- package/plugins/carthagent/src/server/providers.ts +452 -0
- package/plugins/carthagent/src/server/pull-request-rpc.ts +387 -0
- package/plugins/carthagent/src/server/session-controls.ts +84 -0
- package/plugins/carthagent/src/server/ship-agents.ts +77 -0
- package/plugins/carthagent/src/server/ship-context.mjs +60 -0
- package/plugins/carthagent/src/server/ship-guidance.ts +41 -0
- package/plugins/carthagent/src/server/ship-rpc.ts +69 -0
- package/plugins/carthagent/src/server/telemetry.ts +92 -0
- package/plugins/carthagent/src/server/voyages-rpc.ts +280 -0
- package/plugins/carthagent/src/server/workspace-rpc.ts +349 -0
- package/plugins/carthagent/src/session-rpc.ts +31 -0
- package/plugins/carthagent/src/testing.ts +90 -0
- package/plugins/carthagent/src/tui.tsx +496 -0
- package/plugins/carthagent/src/ui/client.ts +127 -0
- package/plugins/carthagent/src/ui/commands.ts +70 -0
- package/plugins/carthagent/src/ui/daily-editor-focus.mjs +52 -0
- package/plugins/carthagent/src/ui/daily-editor.mjs +4 -0
- package/plugins/carthagent/src/ui/daily-quests-events.mjs +18 -0
- package/plugins/carthagent/src/ui/daily-quests-state.mjs +218 -0
- package/plugins/carthagent/src/ui/daily-quests.tsx +235 -0
- package/plugins/carthagent/src/ui/host-state.ts +42 -0
- package/plugins/carthagent/src/ui/model-command.ts +32 -0
- package/plugins/carthagent/src/ui/native-navigation.ts +23 -0
- package/plugins/carthagent/src/ui/native-review.d.mts +33 -0
- package/plugins/carthagent/src/ui/native-review.mjs +159 -0
- package/plugins/carthagent/src/ui/resume-session.mjs +34 -0
- package/plugins/carthagent/src/ui/select-mouse.ts +17 -0
- package/plugins/carthagent/src/ui/session-preferences.d.mts +7 -0
- package/plugins/carthagent/src/ui/session-preferences.mjs +14 -0
- package/plugins/carthagent/src/ui/theme-provision.d.mts +3 -0
- package/plugins/carthagent/src/ui/theme-provision.mjs +134 -0
- package/plugins/carthagent/src/ui/voyages-navigation-state.mjs +56 -0
- package/plugins/carthagent/src/ui/voyages-navigation.tsx +131 -0
- package/plugins/carthagent/src/ui/voyages-state.mjs +165 -0
- package/plugins/carthagent/src/ui/voyages.tsx +131 -0
- package/plugins/carthagent/src/ui/workspace-live.ts +61 -0
- package/plugins/carthagent/src/ui/workspace.tsx +379 -0
- package/plugins/carthagent/src/voyages-rpc.ts +64 -0
- package/plugins/carthagent/src/workspace-rpc.ts +169 -0
- package/plugins/carthagent/test-plugin/index.ts +4 -0
- package/plugins/carthagent/test-plugin/package.json +1 -0
- package/plugins/carthagent/tests/commands.test.ts +107 -0
- package/plugins/carthagent/tests/session-preferences.test.mjs +41 -0
- package/plugins/carthagent/tests/voyages-navigation.test.tsx +269 -0
- package/plugins/carthagent/themes/carthage.json +67 -0
- package/plugins/carthagent/tsconfig.json +19 -0
- package/plugins/carthagent/tui.ts +26 -0
- package/prompts/delivery.md +7 -0
- package/public/index.html +983 -0
- package/scenarios/cli/grade_cli.py +69 -0
- package/scenarios/cli/scenario.json +21 -0
- package/scenarios/game/baseline/minecraft.py +193 -0
- package/scenarios/game/context.md +1 -0
- package/scenarios/game/grade_minecraft_clone.py +603 -0
- package/scenarios/game/requirements.txt +2 -0
- package/scenarios/game/scenario.json +33 -0
- package/script/ctg/build-owned-runtime.sh +166 -0
- package/server.mjs +341 -0
- package/skills/game-development/SKILL.md +36 -0
- package/skills/game-development/assets/ursina_starter.py +98 -0
- package/skills/game-development/scripts/verify_ursina.py +80 -0
- package/skills/software-delivery/SKILL.md +50 -0
- package/skills/typescript-delivery/SKILL.md +69 -0
- package/tests/acceptance-review.test.mjs +13 -0
- package/tests/auth.test.mjs +234 -0
- package/tests/bounded-summary.test.mjs +68 -0
- package/tests/browser-bin.test.mjs +91 -0
- package/tests/browser.test.mjs +96 -0
- package/tests/budget-engine.test.mjs +111 -0
- package/tests/budget.test.mjs +23 -0
- package/tests/cli.test.mjs +201 -0
- package/tests/clipboard.test.mjs +79 -0
- package/tests/cloud-client.test.mjs +129 -0
- package/tests/cloud-control-plane.test.mjs +144 -0
- package/tests/cloud-gateway.test.mjs +147 -0
- package/tests/cloud-http.test.mjs +102 -0
- package/tests/cloud-ledger.test.mjs +75 -0
- package/tests/codegraph-query.test.mjs +66 -0
- package/tests/codegraph.test.mjs +142 -0
- package/tests/daily-evidence.test.mjs +62 -0
- package/tests/delivery-context.test.mjs +66 -0
- package/tests/delivery-review.test.mjs +194 -0
- package/tests/delivery.test.mjs +364 -0
- package/tests/engine-api.mjs +24 -0
- package/tests/experiential-extension.test.mjs +37 -0
- package/tests/experiential.test.mjs +300 -0
- package/tests/extension.test.mjs +921 -0
- package/tests/fixtures/archive-plugin/index.ts +10 -0
- package/tests/fixtures/native-discovery-plugin/server.ts +15 -0
- package/tests/generate-owned-runtime-release.test.mjs +354 -0
- package/tests/guidance.test.mjs +78 -0
- package/tests/installed-runtime-contract.test.mjs +43 -0
- package/tests/model-registry.test.mjs +68 -0
- package/tests/models.test.mjs +70 -0
- package/tests/native-cli-host-smoke.mjs +457 -0
- package/tests/native-daily-editor-focus.test.mjs +213 -0
- package/tests/native-daily-editor.test.mjs +43 -0
- package/tests/native-daily-quests-layout.test.mjs +55 -0
- package/tests/native-daily-quests-rpc.test.mjs +456 -0
- package/tests/native-daily-quests-ui.test.mjs +778 -0
- package/tests/native-daily-source.test.mjs +525 -0
- package/tests/native-demo-ui.test.mjs +48 -0
- package/tests/native-evaluation-admission.test.mjs +24 -0
- package/tests/native-fixture-browser-cleanup.test.mjs +65 -0
- package/tests/native-fixture-runtime.test.mjs +111 -0
- package/tests/native-fixture-stop-diagnostics.test.mjs +67 -0
- package/tests/native-glyph-pty.test.mjs +107 -0
- package/tests/native-manual-projects.test.mjs +170 -0
- package/tests/native-model-command.test.mjs +67 -0
- package/tests/native-owned-runtime-env.test.mjs +140 -0
- package/tests/native-paired-guards.test.mjs +464 -0
- package/tests/native-provider-policy.test.mjs +31 -0
- package/tests/native-pty-invocation.test.mjs +114 -0
- package/tests/native-pty-runtime.test.mjs +45 -0
- package/tests/native-resume-session.test.mjs +46 -0
- package/tests/native-review-consumer.test.mjs +286 -0
- package/tests/native-runtime-identity.test.mjs +214 -0
- package/tests/native-select-mouse.test.mjs +23 -0
- package/tests/native-ship-guidance.test.mjs +16 -0
- package/tests/native-ship-parity.test.mjs +526 -0
- package/tests/native-ship-plan.test.mjs +85 -0
- package/tests/native-ship-rpc.test.mjs +71 -0
- package/tests/native-ui-commands.test.mjs +6 -0
- package/tests/native-voyages-layout.test.mjs +28 -0
- package/tests/native-voyages-navigation.test.mjs +169 -0
- package/tests/native-voyages-rpc.test.mjs +397 -0
- package/tests/native-voyages-ui.test.mjs +307 -0
- package/tests/openai-idempotency.test.mjs +99 -0
- package/tests/opencode-archive-rpc.test.mjs +82 -0
- package/tests/opencode-atomic-write.test.mjs +55 -0
- package/tests/opencode-cli.test.mjs +1312 -0
- package/tests/opencode-codegraph-plugin.test.mjs +47 -0
- package/tests/opencode-delivery.test.mjs +247 -0
- package/tests/opencode-providers.test.mjs +641 -0
- package/tests/opencode-runtime.test.mjs +1044 -0
- package/tests/opencode-session-controls.test.mjs +130 -0
- package/tests/opencode-session-options.test.mjs +26 -0
- package/tests/opencode-ship-rpc.test.mjs +71 -0
- package/tests/opencode-update.test.mjs +475 -0
- package/tests/opencode-workspace.test.mjs +388 -0
- package/tests/outcome-contract.test.mjs +17 -0
- package/tests/owned-runtime-publish-workflow.test.mjs +477 -0
- package/tests/picker.test.mjs +34 -0
- package/tests/plan-advisor.test.mjs +88 -0
- package/tests/plan-review-loop.test.mjs +53 -0
- package/tests/planning-advice.test.mjs +27 -0
- package/tests/planning-contract.test.mjs +65 -0
- package/tests/planning-startup.test.mjs +38 -0
- package/tests/planning-view.test.mjs +33 -0
- package/tests/planning.test.mjs +223 -0
- package/tests/probe-diagnostics.test.mjs +21 -0
- package/tests/pull-request-rpc.test.mjs +366 -0
- package/tests/release-workflow.test.mjs +46 -0
- package/tests/review-state.test.mjs +32 -0
- package/tests/review.test.mjs +127 -0
- package/tests/runtime-artifact.test.mjs +269 -0
- package/tests/runtime-development-trust.test.mjs +231 -0
- package/tests/runtime-github-transport.test.mjs +132 -0
- package/tests/runtime-token-env.test.mjs +23 -0
- package/tests/server.test.mjs +254 -0
- package/tests/ship-jev.test.mjs +77 -0
- package/tests/ship-telemetry.test.mjs +333 -0
- package/tests/source-preview.test.mjs +253 -0
- package/tests/standard-workflow.test.mjs +28 -0
- package/tests/subscription-models.test.mjs +416 -0
- package/tests/subscriptions-extension.test.mjs +27 -0
- package/tests/terminal-title.test.mjs +13 -0
- package/tests/test_grade_minecraft_clone.py +199 -0
- package/tests/test_native_terminal_probe.py +76 -0
- package/tests/test_native_terminal_semantics.py +232 -0
- package/tests/test_starter.py +78 -0
- package/tests/theme.test.mjs +175 -0
- package/tests/tui-copy-paste.test.mjs +54 -0
- package/tests/tui.test.mjs +808 -0
- package/tests/update-channels.test.mjs +129 -0
- package/tests/update.test.mjs +212 -0
- package/tests/verify-draft-runtime-gate.test.mjs +280 -0
- package/tests/verify-owned-runtime-release.test.mjs +371 -0
- package/tests/webdriver.test.mjs +31 -0
- package/tests/workflow.test.mjs +47 -0
- package/tests/workspace-live.test.mjs +127 -0
- package/tests/workspace-rpc.test.mjs +236 -0
- package/tests/workspace.test.mjs +24 -0
- package/tools/benchmark/advisor.test.mjs +7 -0
- package/tools/benchmark/advisor.ts +27 -0
- package/tools/benchmark/campaign.mjs +45 -0
- package/tools/benchmark/diagnose-request.mjs +63 -0
- package/tools/benchmark/eval-common.mjs +32 -0
- package/tools/benchmark/eval-ledger.mjs +22 -0
- package/tools/benchmark/eval-shop.mjs +26 -0
- package/tools/benchmark/eval-voxel.mjs +20 -0
- package/tools/benchmark/evaluate.mjs +24 -0
- package/tools/benchmark/evaluators.test.mjs +13 -0
- package/tools/benchmark/fixtures/shop/server.mjs +18 -0
- package/tools/benchmark/fixtures/shop/ui.html +8 -0
- package/tools/benchmark/freeze.mjs +30 -0
- package/tools/benchmark/gateway.mjs +91 -0
- package/tools/benchmark/gateway.test.mjs +38 -0
- package/tools/benchmark/generator.mjs +11 -0
- package/tools/benchmark/generator.test.mjs +26 -0
- package/tools/benchmark/guard.test.mjs +166 -0
- package/tools/benchmark/guard.ts +149 -0
- package/tools/benchmark/native-plugin/index.ts +24 -0
- package/tools/benchmark/planning-startup.test.mjs +43 -0
- package/tools/benchmark/preflight-live.mjs +31 -0
- package/tools/benchmark/preflight.mjs +22 -0
- package/tools/benchmark/replay-diagnostic.mjs +23 -0
- package/tools/benchmark/runner.mjs +146 -0
- package/tools/benchmark/runner.test.mjs +109 -0
- package/tools/benchmark/runtime.mjs +23 -0
- package/tools/benchmark/selftest.mjs +47 -0
- package/tools/benchmark/smoke-jev.mjs +5 -0
- package/tools/benchmark/tasks.mjs +20 -0
- package/tools/benchmark/transport.mjs +65 -0
- package/tools/benchmark/transport.test.mjs +44 -0
- package/tools/benchmark/upstream-error.mjs +18 -0
- package/tools/benchmark/upstream-error.test.mjs +24 -0
- package/tools/browser-check.mjs +109 -0
- package/tools/check-syntax.mjs +27 -0
- package/tools/evaluate-plan-advisor.mjs +20 -0
- package/tools/generate-owned-runtime-release.mjs +217 -0
- package/tools/installed-runtime-contract.mjs +16 -0
- package/tools/manual-runtime-manifest.mjs +39 -0
- package/tools/native-fixture-browser-cleanup.mjs +59 -0
- package/tools/native-fixture-stop-diagnostics.mjs +43 -0
- package/tools/native-fixture.mjs +353 -0
- package/tools/native-glyph-helpers.py +127 -0
- package/tools/native-glyph-pty.py +144 -0
- package/tools/native-manual-projects.mjs +259 -0
- package/tools/native-manual.mjs +338 -0
- package/tools/native-model-picker-acceptance.py +306 -0
- package/tools/native-owned-runtime-env.sh +47 -0
- package/tools/native-paired-guards.mjs +282 -0
- package/tools/native-paired-manifest.mjs +72 -0
- package/tools/native-paired-orchestration.sh +51 -0
- package/tools/native-plugin-readiness.mjs +33 -0
- package/tools/native-plugin-readiness.test.mjs +53 -0
- package/tools/native-pty-invocation.mjs +26 -0
- package/tools/native-pty-runtime.mjs +83 -0
- package/tools/native-pty-smoke.py +231 -0
- package/tools/native-public-repo-shell-result.mjs +13 -0
- package/tools/native-public-repo-shell-result.test.mjs +28 -0
- package/tools/native-report-plugin/index.ts +50 -0
- package/tools/native-report-plugin/package.json +7 -0
- package/tools/native-runtime-identity.mjs +201 -0
- package/tools/native-slash-acceptance-env.py +38 -0
- package/tools/native-terminal-semantics.py +876 -0
- package/tools/owned-shell-observer/index.ts +16 -0
- package/tools/owned-shell-observer/package.json +1 -0
- package/tools/owned-visual-clear-env.py +48 -0
- package/tools/owned-visual-clear-model.py +21 -0
- package/tools/patch-compaction.mjs +24 -0
- package/tools/patch-model-catalog.mjs +12 -0
- package/tools/patch-print-shutdown.mjs +39 -0
- package/tools/pinned-owned-runtime-inputs.mjs +46 -0
- package/tools/prepare-native-manual.mjs +122 -0
- package/tools/repo-pilot/evaluator.cjs +32 -0
- package/tools/repo-pilot/reference.mjs +43 -0
- package/tools/repo-pilot/runner.mjs +85 -0
- package/tools/repo-pilot/sandbox-entry.mjs +12 -0
- package/tools/repo-pilot/tasks.mjs +20 -0
- package/tools/repo-pilot/type-evaluator.cjs +6 -0
- package/tools/run-native-terminal-paired.sh +403 -0
- package/tools/runtime-token-env.mjs +8 -0
- package/tools/seed-native-switch-fixture.mjs +79 -0
- package/tools/test-native-controls.mjs +86 -0
- package/tools/test-native-daily-quests.mjs +65 -0
- package/tools/test-native-default-cli.mjs +106 -0
- package/tools/test-native-delivery-host.mjs +389 -0
- package/tools/test-native-evaluation.mjs +50 -0
- package/tools/test-native-glyph-pty.mjs +94 -0
- package/tools/test-native-host.mjs +409 -0
- package/tools/test-native-outcomes.mjs +75 -0
- package/tools/test-native-package.mjs +238 -0
- package/tools/test-native-performance.mjs +26 -0
- package/tools/test-native-product.mjs +90 -0
- package/tools/test-native-pty.mjs +45 -0
- package/tools/test-native-public-repo.mjs +224 -0
- package/tools/test-native-refresh-reentry.mjs +106 -0
- package/tools/test-native-report.mjs +95 -0
- package/tools/test-native-review.mjs +75 -0
- package/tools/test-native-runtime.mjs +120 -0
- package/tools/test-native-ship-models.mjs +176 -0
- package/tools/test-native-ship-walkthrough.mjs +96 -0
- package/tools/test-native-slash-commands.mjs +125 -0
- package/tools/test-native-slash-commands.py +242 -0
- package/tools/test-native-swe-host.mjs +301 -0
- package/tools/test-native-swe.mjs +122 -0
- package/tools/test-native-tasks.mjs +77 -0
- package/tools/test-native-terminal-performance.py +887 -0
- package/tools/test-native-terminal-readiness.sh +85 -0
- package/tools/test-native-terminal-semantics-installed.mjs +38 -0
- package/tools/test-native-visual-clear-installed.mjs +48 -0
- package/tools/test-owned-host-controls.mjs +238 -0
- package/tools/test-owned-opencode-runtime.mjs +35 -0
- package/tools/test-owned-visual-clear-env.py +120 -0
- package/tools/test-owned-visual-clear.py +373 -0
- package/tools/test-picker-pty.py +45 -0
- package/tools/test-python.mjs +29 -0
- package/tools/test-webdriver.mjs +54 -0
- package/tools/verify-draft-runtime-gate.mjs +138 -0
- package/tools/verify-owned-runtime-release.mjs +114 -0
- package/tools/verify-release-version.mjs +57 -0
- package/tools/webdriver-check.mjs +52 -0
- package/vendor/agent/bounded-summary.mjs +88 -0
- package/vendor/agent/chunks/anthropic-messages-VWZZOSJQ.js +6 -0
- package/vendor/agent/chunks/anthropic.js +75 -0
- package/vendor/agent/chunks/azure-openai-responses-BJLAM6CD.js +2 -0
- package/vendor/agent/chunks/bedrock-converse-stream.js +74 -0
- package/vendor/agent/chunks/chord-context.js +96 -0
- package/vendor/agent/chunks/chunk-4L3WN2XY.js +2 -0
- package/vendor/agent/chunks/chunk-6CYCI3EJ.js +12 -0
- package/vendor/agent/chunks/chunk-6R7UI4IY.js +2 -0
- package/vendor/agent/chunks/chunk-7ZC4UXSL.js +2 -0
- package/vendor/agent/chunks/chunk-AXIIZGTV.js +2 -0
- package/vendor/agent/chunks/chunk-CLNPYIDP.js +42 -0
- package/vendor/agent/chunks/chunk-DRQDKNXA.js +2 -0
- package/vendor/agent/chunks/chunk-GMWCTUPB.js +2 -0
- package/vendor/agent/chunks/chunk-IDDQWTHI.js +2 -0
- package/vendor/agent/chunks/chunk-JVUZSMYM.js +1548 -0
- package/vendor/agent/chunks/chunk-L2ZPNLYD.js +2 -0
- package/vendor/agent/chunks/chunk-NUHFSC37.js +25 -0
- package/vendor/agent/chunks/chunk-OUXLLA64.js +11 -0
- package/vendor/agent/chunks/chunk-PGXDEOVV.js +2 -0
- package/vendor/agent/chunks/chunk-PJACZCIR.js +2 -0
- package/vendor/agent/chunks/chunk-PRRNXB7S.js +2 -0
- package/vendor/agent/chunks/chunk-TEPMHNKQ.js +2 -0
- package/vendor/agent/chunks/chunk-TRDNDS6A.js +4 -0
- package/vendor/agent/chunks/chunk-U6ZMQKGD.js +50 -0
- package/vendor/agent/chunks/chunk-UAQELI3K.js +2 -0
- package/vendor/agent/chunks/chunk-USJZMAIR.js +2 -0
- package/vendor/agent/chunks/chunk-XDUWOHPL.js +6 -0
- package/vendor/agent/chunks/chunk-XNGRGP62.js +2 -0
- package/vendor/agent/chunks/github-copilot.js +2 -0
- package/vendor/agent/chunks/google-generative-ai-Q2K7FBDI.js +2 -0
- package/vendor/agent/chunks/google-vertex-7UJBF4S7.js +2 -0
- package/vendor/agent/chunks/https-proxy-agent-2VXB7436.js +13 -0
- package/vendor/agent/chunks/image-resize-worker.js +2 -0
- package/vendor/agent/chunks/kimi-coding.js +2 -0
- package/vendor/agent/chunks/lib-HGQMNYVT.js +9 -0
- package/vendor/agent/chunks/mistral-conversations-4M6BZBX6.js +5 -0
- package/vendor/agent/chunks/multipart-parser-SQ6GDJL7.js +3 -0
- package/vendor/agent/chunks/node-KG362ECQ.js +16 -0
- package/vendor/agent/chunks/node-TWVVAGPO.js +2 -0
- package/vendor/agent/chunks/openai-codex-responses-R6VYZTVY.js +10 -0
- package/vendor/agent/chunks/openai-codex.js +75 -0
- package/vendor/agent/chunks/openai-completions-EKZT2IH2.js +7 -0
- package/vendor/agent/chunks/openai-responses-TFDINO6W.js +2 -0
- package/vendor/agent/chunks/openrouter-images-N4XVVFSD.js +2 -0
- package/vendor/agent/chunks/openrouter.js +75 -0
- package/vendor/agent/chunks/pi-messages-PML4SPVJ.js +8 -0
- package/vendor/agent/chunks/radius.js +75 -0
- package/vendor/agent/chunks/src-UK77SYZE.js +4 -0
- package/vendor/agent/chunks/xai.js +2 -0
- package/vendor/agent/cli.js +3 -0
- package/vendor/agent/dist/modes/interactive/theme/dark.json +91 -0
- package/vendor/agent/dist/modes/interactive/theme/light.json +90 -0
- package/vendor/agent/dist/modes/interactive/theme/theme-schema.json +356 -0
- package/vendor/agent/index.js +2 -0
- package/vendor/agent/modes/interactive/theme/dark.json +91 -0
- package/vendor/agent/modes/interactive/theme/light.json +90 -0
- package/vendor/agent/modes/interactive/theme/theme-schema.json +356 -0
- package/vendor/agent/package.json +14 -0
- package/vendor/agent/rpc-entry.js +3 -0
- package/vendor/agent/theme/dark.json +91 -0
- package/vendor/agent/theme/light.json +90 -0
- package/vendor/agent/theme/theme-schema.json +356 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 B-icy
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,277 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Carthagent
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Carthagent checks software work against real acceptance tests and re-proves it whenever source changes.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
curl -fsSL https://carthagent.xyz/install | sh
|
|
9
|
+
irm https://carthagent.xyz/install.ps1 | iex
|
|
10
|
+
npm install -g carthagent
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Node.js 22.19+ is required for the npm install. From source: `npm install -g --install-links=true github:B-icy/Carthagent#vX.Y.Z` (replace with a published tag).
|
|
14
|
+
|
|
15
|
+
See [workflow.svg](docs/workflow.svg) for the flow and [evaluation history](docs/evaluation.md) for trials, including failures.
|
|
16
|
+
|
|
17
|
+
## Native CLI
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
ctg
|
|
21
|
+
ctg --help
|
|
22
|
+
ctg native # compatibility alias
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The old `CTG_NATIVE` toggle no longer changes routing. The native route launches the checksum-pinned CTG-owned runtime (compatibility 2.0.32) and uses a separate Carthagent-owned profile beneath `~/.carthagent/opencode/` (override with `CTG_OPENCODE_HOME`). Its config, database, sessions, auth, state, and cache are separate from other coding-tool profiles. It does not install, upgrade, or reuse credentials from other coding-tool profiles. Project files and native task metadata/worktrees are separate again: task records live in each project’s `.harness/opencode-tasks.json`.
|
|
26
|
+
|
|
27
|
+
Native projects use the native project/session model. CTG task creation associates a task with an independent native session and native worktree; task relations are CTG metadata, not parent/child native sessions. Native session resume/continue is scoped to the active workspace. Legacy Pi transcripts can be listed, searched, read, and exported with `ctg archive`; they are **read-only archives** and cannot be resumed or imported as native sessions. See the [native upgrade and migration guide](docs/native-upgrade.md) before switching workflows.
|
|
28
|
+
|
|
29
|
+
The native TUI exposes CTG workspace/task actions such as `/ctg-workspace`, `/ctg-open`, `/ctg-worktree`, and `/ctg-task`, alongside delivery and session commands. The native runtime owns the terminal renderer and lifecycle. Do not assume a listed command overrides a built-in host command: submitted `/help` precedence is a known unresolved acceptance gate.
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
node bin/ctg.mjs # native interactive TUI
|
|
33
|
+
node bin/ctg.mjs "Build a task CLI" # task in the TUI
|
|
34
|
+
node bin/ctg.mjs resume # native session picker
|
|
35
|
+
node bin/ctg.mjs continue # latest native session here
|
|
36
|
+
node bin/ctg.mjs -p "Summarize this repo" # headless text
|
|
37
|
+
node bin/ctg.mjs --json -p "Run checks" # native lifecycle JSONL
|
|
38
|
+
node bin/ctg.mjs status --json # delivery status JSON
|
|
39
|
+
node bin/ctg.mjs archive list # legacy archive (read-only)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The native CLI retains command aliases such as `ui`/`interactive`, `sessions`, `s`, `c`, `fingerprint`, `auth`, `cloud`, `web`, `start`, and `upgrade`. `--json` with a headless prompt emits JSONL records for native tool start/end, assistant message completion, and terminal outcome; it is not the text `-p` stream. Headless success requires the native completed assistant turn and successful terminal outcome. Options whose enforcement is not advertised by the active native plugin fail closed; in particular `--bash-cap` and `--isolate` are currently unsupported. Refer to [native CLI compatibility details](docs/native-cli.md).
|
|
43
|
+
|
|
44
|
+
### Voyages in the native TUI
|
|
45
|
+
|
|
46
|
+
`/voyages` opens the account's live Voyages profile, coin wallet, equipment and
|
|
47
|
+
shop. Use the normal `/login` browser device approval and choose Carthagent;
|
|
48
|
+
Voyages uses the approving browser user's existing player, not a separate CLI
|
|
49
|
+
wallet. Older account-only Ship sessions may require a new device sign-in.
|
|
50
|
+
Voyages does not require a paid model call or award coins for coding.
|
|
51
|
+
|
|
52
|
+
Customization and equipment changes require confirmation. Paid items require a
|
|
53
|
+
server quote showing the coin price and expiry, followed by explicit purchase
|
|
54
|
+
confirmation. Cancel does not purchase. The server validates funds, ownership,
|
|
55
|
+
eligibility and profile version; refresh after a conflict rather than silently
|
|
56
|
+
overwriting another client. Equip a purchased item separately.
|
|
57
|
+
|
|
58
|
+
If a purchase response is lost, the TUI keeps a pending request across restart.
|
|
59
|
+
Use its recovery action to retry the same quote and request key, not to create
|
|
60
|
+
a second purchase. Do not delete profile state to resolve an uncertain debit.
|
|
61
|
+
The server remains authoritative; unavailable or signed-out state must not be
|
|
62
|
+
treated as a saved balance. Browser cookies are never imported into CLI auth.
|
|
63
|
+
|
|
64
|
+
Native Voyages landed in PR #225. Live development-runtime testing exercised
|
|
65
|
+
browser device approval, name cancel/save, owned Beanie equip, restart and web
|
|
66
|
+
persistence, expiry recovery, and revocation. The approving web player remains
|
|
67
|
+
authoritative. The tested wallet had 10 coins and no affordable paid quote:
|
|
68
|
+
no live paid debit or replay was proven. These are historical, bounded source/runtime
|
|
69
|
+
results, not preview.10 installed-package acceptance. Subsequent development-runtime
|
|
70
|
+
testing completed one explicitly authorized 40-coin purchase and restart
|
|
71
|
+
persistence; see the [preview.10 candidate notes](docs/release-notes-preview.10.md)
|
|
72
|
+
for its limits. Published preview.9 remains immutable and does not acquire
|
|
73
|
+
changes from current main.
|
|
74
|
+
|
|
75
|
+
### Projects sidebar source preview (development only)
|
|
76
|
+
|
|
77
|
+
The redesigned Projects sidebar (folder card, folder browser, and folder/model
|
|
78
|
+
setup for new sessions) exists only as source. It is **not** in any published
|
|
79
|
+
`ctg` release, and the steps below do not build or update the published native
|
|
80
|
+
runtime. The published runtime stays pinned to
|
|
81
|
+
`docs/patches/opencode-v2.0.32-session-ui-combined-v4.patch` and
|
|
82
|
+
`lib/opencode/runtime-release.json`.
|
|
83
|
+
|
|
84
|
+
Requirements: Git, a POSIX shell, `sha256sum` or `shasum`, Bun 1.4.2 (the
|
|
85
|
+
OpenCode `packageManager` pin), and this checkout with `npm ci` already run. No
|
|
86
|
+
native compilation is needed. The launcher is a POSIX `sh` script for Linux and
|
|
87
|
+
macOS; native Windows is not supported.
|
|
88
|
+
|
|
89
|
+
1. Prepare a clean OpenCode checkout at the pinned upstream and apply the
|
|
90
|
+
development patch (v5 replaces v4 and applies directly to upstream):
|
|
91
|
+
|
|
92
|
+
```sh
|
|
93
|
+
git clone https://github.com/anomalyco/opencode "$HOME/src/opencode preview"
|
|
94
|
+
git -C "$HOME/src/opencode preview" checkout 843a6c514e606b436a7fe713422ace0a93ad3d61
|
|
95
|
+
script/ctg/prepare-development-runtime.sh "$HOME/src/opencode preview"
|
|
96
|
+
(cd "$HOME/src/opencode preview" && /path/to/bun-1.4.2 install)
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
2. Launch from any directory with explicit paths (spaces are fine):
|
|
100
|
+
|
|
101
|
+
```sh
|
|
102
|
+
/path/to/carthagent/script/ctg/source-preview.sh \
|
|
103
|
+
--source "$HOME/src/opencode preview" \
|
|
104
|
+
--profile "$HOME/.carthagent/source-preview" \
|
|
105
|
+
--bun /path/to/bun-1.4.2 \
|
|
106
|
+
--workspace "$HOME/projects/my project"
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
The launcher runs `bun --no-env-file run src/index.ts --standalone <workspace>`
|
|
110
|
+
from `packages/cli` with only a private HOME, TMPDIR, XDG and OpenCode config
|
|
111
|
+
directory inside `--profile`. It disables project config and auto-update and
|
|
112
|
+
passes no inherited API keys. On first use it creates the profile (mode 0700)
|
|
113
|
+
with the Carthagent plugin, Carthage theme and CLI theme config. Existing
|
|
114
|
+
profile files are never rewritten. The private server listens on an ephemeral
|
|
115
|
+
loopback port and exits when the TUI exits.
|
|
116
|
+
|
|
117
|
+
3. Sign in once inside the same profile. Enter secrets only at the terminal
|
|
118
|
+
prompt, never as arguments:
|
|
119
|
+
|
|
120
|
+
```sh
|
|
121
|
+
script/ctg/source-preview.sh --source ... --profile ... --bun ... -- auth login
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
In the TUI, the folder card at the top of Projects shows the current folder and
|
|
125
|
+
model. Use **Browse** (or `/browse`) to pick a folder and **Ctrl+S** to confirm.
|
|
126
|
+
**New session** (also Ctrl+X N or `/new`) opens folder and model setup; the session is created only when
|
|
127
|
+
you send the first message, with your current agent and the chosen model. If that agent or model is
|
|
128
|
+
unavailable when you send, the send is blocked and your text is kept until you choose another. Leave with `/exit` (or Ctrl+P, “Exit the app”); relaunch with
|
|
129
|
+
the same `--profile` and choose the session in Projects to continue it.
|
|
130
|
+
|
|
131
|
+
See [source preview](docs/source-preview.md) for testing, patch verification and
|
|
132
|
+
limits.
|
|
133
|
+
|
|
134
|
+
## Install and update
|
|
135
|
+
|
|
136
|
+
The installer selects an exact published release and acquires its pinned native runtime; it never falls back to an unrelated system binary. See the [native upgrade guide](docs/native-upgrade.md) for source-checkout and profile-preservation instructions, or [legacy CLI instructions](docs/legacy-cli.md) for stable 1.0.7.
|
|
137
|
+
|
|
138
|
+
`ctg update --check` checks for a published release without installing. Select `--channel experimental` to include published previews; drafts are never installed. The legacy stable updater can update a clean source clone. The native updater differs: it refuses to check out a release into any active source clone, including a clean one; it installs package releases only from an npm installation. Preserve local changes and use the manual exact-tag checkout procedure in the [native upgrade guide](docs/native-upgrade.md) when updating a development checkout. Published previews are immutable. See the [preview.11 release notes](docs/release-notes-preview.11.md); the older [native migration draft](docs/release-notes-native-draft.md) is historical, not current installation guidance.
|
|
139
|
+
|
|
140
|
+
## Update channels
|
|
141
|
+
|
|
142
|
+
Starting with 1.0.7, update channels are an explicit opt-in:
|
|
143
|
+
|
|
144
|
+
```sh
|
|
145
|
+
ctg update --channel experimental --check # preview; installs/persists nothing
|
|
146
|
+
ctg update --channel experimental # install and remember the experimental channel
|
|
147
|
+
ctg update --channel beta # stable + beta/RC releases only
|
|
148
|
+
ctg update --channel stable # leave previews; downgrade to stable if necessary
|
|
149
|
+
ctg update # follow the channel you last installed successfully
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Stable is the default and never selects a prerelease, even if a remote manifest
|
|
153
|
+
mislabels it. Beta accepts published `-beta` and `-rc` tags; experimental also
|
|
154
|
+
accepts alpha, preview, and other published prerelease tags. Both opt-in channels
|
|
155
|
+
include stable releases. Selection uses semantic version order, not release date;
|
|
156
|
+
drafts are never installable. Prereleases are read directly from GitHub and never
|
|
157
|
+
advance the stable control-plane pointer.
|
|
158
|
+
|
|
159
|
+
A successful explicit switch is saved in `~/.carthagent/update-channel.json`;
|
|
160
|
+
`--check` and failed installs do not change it. `CARTHAGENT_UPDATE_CHANNEL_FILE`
|
|
161
|
+
can isolate this preference for testing. `--channel stable` explicitly authorizes
|
|
162
|
+
a downgrade, so recovery from an experimental build does not require `--force`.
|
|
163
|
+
Your sessions and provider credentials are not deleted by switching channels.
|
|
164
|
+
Experimental software may still contain bugs; read its release notes first.
|
|
165
|
+
|
|
166
|
+
## Release status
|
|
167
|
+
|
|
168
|
+
1.1.0-preview.13 is the current experimental release. It promotes the
|
|
169
|
+
combined-v5 runtime patch: a directory-first Projects rail with a folder
|
|
170
|
+
browser, shared folder and model setup for new sessions, and an isolated
|
|
171
|
+
source-preview launcher, on top of preview.12's npm-publishable package.
|
|
172
|
+
Native remains the default `ctg` interface. Ship retains approval, checks,
|
|
173
|
+
review, repair, recovery, and resume; Lite remains direct execution.
|
|
174
|
+
Published previews are immutable. Experimental installation is explicit and
|
|
175
|
+
selects published releases only; stable 1.0.7 retains the legacy console.
|
|
176
|
+
|
|
177
|
+
Each experimental release must pass its exact installed-package gate before
|
|
178
|
+
publication. See the [preview.13 release notes](docs/release-notes-preview.13.md),
|
|
179
|
+
[preview.12 notes](docs/release-notes-preview.12.md), and [preview.11 notes](docs/release-notes-preview.11.md); earlier migration findings and remaining platform caveats
|
|
180
|
+
are in the [Native migration ledger](docs/opencode-migration.md#delivery-ledger),
|
|
181
|
+
[native compatibility matrix](docs/native-compatibility.md), and [terminal
|
|
182
|
+
evidence status](docs/native-terminal-semantics.md#evidence-status-pr-162).
|
|
183
|
+
|
|
184
|
+
## Regular CLI
|
|
185
|
+
|
|
186
|
+
The split-terminal console remains available in stable 1.0.7, not as an alternate route inside the native-default experimental package. To return to stable, use `ctg update --channel stable`. Its legacy data and provider setup remain distinct from the native profile; existing transcripts remain available through the read-only archive commands.
|
|
187
|
+
|
|
188
|
+
## Delivery engine and existing CLI
|
|
189
|
+
|
|
190
|
+
The following delivery-engine documentation describes Carthagent's shared delivery concepts and the existing CLI behavior. Native-preview coverage and compatibility are tracked separately in the [native CLI guide](docs/native-cli.md) and [migration ledger](docs/opencode-migration.md); feature parity must not be inferred from the presence of a shared delivery module.
|
|
191
|
+
|
|
192
|
+
## How it works
|
|
193
|
+
|
|
194
|
+
`extensions/delivery.ts` wires eight tools into the engine (`lib/delivery.mjs` has the mechanics):
|
|
195
|
+
|
|
196
|
+
| Tool | What it does |
|
|
197
|
+
|---|---|
|
|
198
|
+
| `delivery_plan` | Goal, steps, artifact roots, acceptance criteria → check mapping; `verification: required|advisory|none`; writes `plan.d2` |
|
|
199
|
+
| `delivery_design` | Validate SRP/DI contracts and scenarios, record adversarial review, approve the exact revision/snapshot before code |
|
|
200
|
+
| `delivery_revise` | Reason + partial plan patch; preserves valid evidence and stable progress, records revision history |
|
|
201
|
+
| `delivery_check` | Runs check argv with deadlines; `all` collects ordinary failures across suites; records exit codes, logs, workspace SHA-256 |
|
|
202
|
+
| `delivery_status` | Contract + evidence state (missing/failed/stale) |
|
|
203
|
+
| `delivery_progress` | Step progress for the plan panel |
|
|
204
|
+
| `delivery_review` | Captures the actual diff; records per-requirement assertions, boundary probes and limitations against the unchanged snapshot |
|
|
205
|
+
| `delivery_finish` | `verified` requires fresh checks, new-requirement executions, existing artifacts/output files, completed structured steps and a review receipt; otherwise `blocked` |
|
|
206
|
+
|
|
207
|
+
The discipline: evidence is bound to the run, contract revision, executable check definition and workspace source fingerprint. Source edits invalidate evidence; dependency, cache and generated-output exclusions mean this is not a hash of every file. `verified` means declared required checks passed with current evidence—not independent proof of task completeness or correctness. Checks are real subprocesses (`argv`, no implicit shell), FIFO-queued, 1–300 s deadlines, logs under `.harness/`. Failed or missing checks get at most two automatic repair nudges per prompt. This is a workflow guardrail, not a security sandbox — for untrusted code use a container.
|
|
208
|
+
|
|
209
|
+
`extensions/codegraph.ts` adds a `code_nav` tool: a deterministic tree-sitter index of the workspace (JS/TS/Python/Rust) with ops `definition`, `symbols`, `callers`, `callees`, `imports`, `importers`, `outline`, `status`. It parses lazily on first call and re-parses only files whose mtime changed; `--codegraph-max-files N` caps the scan (default 8000).
|
|
210
|
+
|
|
211
|
+
Structural navigation is available before plan approval. Results report total/returned matches, `nextOffset` pagination and current coverage; `path`/`container` narrow candidates. Call matches are name-based, not resolved runtime bindings. Use graph discovery followed by targeted source reads. Delivery guidance is phase-specific and recovery uses exact-obligation checkpoints plus current evidence; see [graph/context optimization](docs/graph-context-optimization.md) for behavior and pilot limitations.
|
|
212
|
+
|
|
213
|
+
**Choose the workflow.** The CLI defaults to `--workflow standard`: declare a complete acceptance contract and executable checks, implement, then run fresh checks and record a final snapshot review before finishing. `--workflow strict` additionally requires architecture/injection contracts, scenarios and tested-design approval before implementation; revisions relock that mode. Existing sessions keep their recorded mode, and direct extension hosts default to strict for compatibility. `delivery_probe` offers bounded Node/npm version discovery. This is a participating-tool boundary, not an OS sandbox. See [workflow modes and benchmark findings](docs/workflow-modes.md) and [strict design contracts](docs/tested-planning.md).
|
|
214
|
+
|
|
215
|
+
**Optional advisory research.** A dependency-injected Jev adapter and shadow evaluator are available off the normal delivery path. No credentials or provider call are required; classifier outputs cannot approve plans. See [measured fixture results and live-evaluation limits](docs/plan-advisor-evaluation.md).
|
|
216
|
+
|
|
217
|
+
**Adaptive plans.** Steps can be legacy strings or `{id,title,dependsOn:[],checks:[]}`. Structured steps use stable IDs, enforce dependency order, and require mapped checks before completion. `delivery_revise({reason,patch})` keeps omitted fields and replaces supplied arrays; unchanged checks retain fresh evidence only on unchanged source. New/remapped requirements still need new suite executions; old command evidence cannot automatically cover newly stated behavior. Intentionally-red regression milestones use `kind:"regression",checks:[]`, keeping green suites on final acceptance. Structured required plans must inspect/record a final diff-linked review. Changed source still invalidates all workspace evidence. Revisions preserve failure history and acceptance criteria rather than resetting the contract. See [medium/large-codebase workflows and limits](docs/planning.md).
|
|
218
|
+
|
|
219
|
+
**Headless monitoring.** `ctg --json -p "task"` streams engine JSONL events, including tool activity; `ctg status --json` returns a versioned report/fingerprint/completion snapshot. Text `-p` alone is not a live tool stream. Review receipts are traceable self-reports, not independent correctness proof.
|
|
220
|
+
|
|
221
|
+
**Informational vs delivery asks.** Every plan declares a verification classification. `required` (the default) is the delivery contract above. `advisory` retains optional informational evidence without a repair loop; it does not authorize new arbitrary command execution. New commands require a tested, approved `required` plan. `none` is a pure question/explanation with no checks at all. Informational plans finish with `delivery_finish` once (recorded as `advisory: true`) and never receive repair nudges; user-owned required validators always force `required`, and a `required` plan can only be reclassified before any check has run.
|
|
222
|
+
|
|
223
|
+
## Self-review
|
|
224
|
+
|
|
225
|
+
When a run finishes a substantial change (a verified delivery or file edits), Carthagent can offer a review loop: the agent pushes a branch, opens a PR, and a **detached fresh-context reviewer** (`ctg review <pr>` — a separate engine process with no shared context) inspects it. Findings come back to the working agent, which fixes, pushes, and re-reviews — stopping after 3 admitted attempts per PR in this workspace or `VERDICT: APPROVE`. The CLI persists round admission and structured snapshot-bound findings, excludes concurrent reviewers, and escalates exhausted attempts. Review commands reject malformed verdicts and changed source/PR-head snapshots, but read-only behavior is an instruction, not isolation. See [review guarantees and limits](docs/review-assurance.md).
|
|
226
|
+
|
|
227
|
+
It's opt-in and tri-state, resolved as `--review <mode>` flag → `~/.carthagent/config.json` → `ask`:
|
|
228
|
+
|
|
229
|
+
| Mode | Behavior |
|
|
230
|
+
|---|---|
|
|
231
|
+
| `ask` (default) | Offer the loop at the end of a major change (`^y` accepts, `esc` skips) |
|
|
232
|
+
| `yes` | Start the loop automatically — no prompt |
|
|
233
|
+
| `no` | Never offer |
|
|
234
|
+
|
|
235
|
+
```sh
|
|
236
|
+
ctg review # show the effective default
|
|
237
|
+
ctg review yes # persist a default for all sessions
|
|
238
|
+
ctg review 14 # run the fresh-context reviewer over a PR directly
|
|
239
|
+
ctg --review no # per-launch override
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Inside a session, `/review` starts a loop immediately and `/review ask|yes|no|status` manages the same default. The loop needs `git` + an authenticated `gh` — without them the agent reports and skips instead of simulating a review.
|
|
243
|
+
|
|
244
|
+
## Make it yours
|
|
245
|
+
|
|
246
|
+
Everything below is config, not code:
|
|
247
|
+
|
|
248
|
+
- **Required validators** — your tests, not the model's. `.carthagent/delivery.json` (trusted project) or `--validators file.json`: `{"version":1,"checks":[{"id":"acceptance","kind":"test","argv":["pytest","-q"],"timeoutSeconds":90}]}`. They can't be omitted or overridden.
|
|
249
|
+
- **Domain guidance** — add a JSON profile to `guidance/profiles/` (keywords/deps → planning/check/review requirements) and matching requests pick it up automatically.
|
|
250
|
+
- **Extra context** — `--delivery-context notes.md` injects project/benchmark-specific instructions.
|
|
251
|
+
- **Scenarios** — `scenarios/<name>/scenario.json` defines an evaluation domain; `node evaluate.mjs --task <name> --allow-live` runs it (dry-run with `--dry-run`; spends API credit otherwise).
|
|
252
|
+
|
|
253
|
+
See [extending Carthagent](docs/extending.md) for how to author guidance profiles, prompt templates, skills, providers, and extensions.
|
|
254
|
+
|
|
255
|
+
## Bounded runs and browser evidence
|
|
256
|
+
|
|
257
|
+
```sh
|
|
258
|
+
ctg -p --max-tools 100 --max-seconds 900 --max-repairs 2 "Implement the requested change"
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Limits are opt-in, session-persistent cooperative controls—not dollar/token caps or hard process deadlines. Inspect with `/delivery-budget-status`; only an explicit `/delivery-budget-reset` starts a fresh allowance in the same session. See [session budgets](docs/budgets.md).
|
|
262
|
+
|
|
263
|
+
Browser evidence has two tiers: jsdom for DOM/unit checks (module scripts are rejected when execution is requested), and a real headless browser (bundled `chrome-headless-shell` over CDP, or an external WebDriver endpoint) for application modules and interactions. Browser checks subscribe to console errors before navigation and fail on unexpected console errors, exceptions and rejected promises. Screenshots are evidence to inspect, not automatic visual approval. See [browser setup and checks](docs/webdriver.md).
|
|
264
|
+
|
|
265
|
+
## Development
|
|
266
|
+
|
|
267
|
+
```sh
|
|
268
|
+
npm ci && npm run quality # lint, typecheck, build and tests; no model calls
|
|
269
|
+
npm run test:browser # bundled headless browser (auto-downloads on first use)
|
|
270
|
+
python3 -m pip install -r scenarios/game/requirements.txt && npm run test:python # game graders
|
|
271
|
+
# Only with explicit spending authorization and a cap:
|
|
272
|
+
node evaluate.mjs --task cli --mode both --allow-live # live A/B eval — spends API credit
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Tests cover contract validation, stale evidence, required validators, timeouts/cancellation, compaction, actual-engine session budgets, report conflicts, and dashboard auth. Native CI covers Windows/macOS/Linux on Node 22/24; a separate Linux job runs the bundled real-browser suite. WSL JS/browser evidence is local and separate; WSL Python validation remains unperformed successfully. This does not establish all terminals or browsers as supported/tested. `PI_CLI` points the suite at a non-standard engine location.
|
|
276
|
+
|
|
277
|
+
See [repository quality gates](docs/quality.md) and [controlled evaluation readiness](docs/evaluation-readiness.md). Review admission is persistently bounded locally; delivery operations now share a workspace lock and explicit active-run pointer with same-run live reconciliation. See [coordination and recovery](docs/workspace-coordination.md) for limits and interrupted-lock handling. No controlled paid comparison yet establishes lower cost or fewer interventions for complete web deliveries.
|
package/bin/ctg.mjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { readFile } from 'node:fs/promises';
|
|
3
|
+
import { runOpenCodeCli } from '../lib/opencode/cli.mjs';
|
|
4
|
+
import { createOpenCodeCliRuntime } from '../lib/opencode/cli-runtime.mjs';
|
|
5
|
+
|
|
6
|
+
const argv = process.argv.slice(2);
|
|
7
|
+
if (argv[0] === 'native') argv.shift();
|
|
8
|
+
process.env.CTG_NODE_EXECUTABLE ??= process.execPath;
|
|
9
|
+
|
|
10
|
+
try {
|
|
11
|
+
const { version } = JSON.parse(await readFile(new URL('../package.json', import.meta.url), 'utf8'));
|
|
12
|
+
const runtime = await createOpenCodeCliRuntime();
|
|
13
|
+
const code = await runOpenCodeCli({ argv, runtime, version, stdoutIsTTY: Boolean(process.stdout.isTTY) });
|
|
14
|
+
process.exitCode = Number.isInteger(code) ? code : 0;
|
|
15
|
+
} catch (error) {
|
|
16
|
+
console.error(error.message);
|
|
17
|
+
process.exitCode = Number.isInteger(error.exitCode) ? error.exitCode : 1;
|
|
18
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Beta rewards and new-user acceptance
|
|
2
|
+
|
|
3
|
+
Owner-approved policy: one eligible `ctg` verified delivery earns **25 coins,
|
|
4
|
+
100 XP and 1 km**, at most three grants per player per UTC day. Daily classifier
|
|
5
|
+
assessment and personal work-log completion do not earn these rewards.
|
|
6
|
+
|
|
7
|
+
## Execution plan
|
|
8
|
+
|
|
9
|
+
1. Preserve the current live account and capture its starting profile. Confirm
|
|
10
|
+
account identity through normal authentication; never select an account by
|
|
11
|
+
a display name supplied to a public endpoint.
|
|
12
|
+
2. Implement a versioned backend reward receipt and atomic coin/XP/km posting.
|
|
13
|
+
Derive owner from authentication and amounts from server policy. Retain
|
|
14
|
+
delivery identity across retries and enforce daily caps under a player lock.
|
|
15
|
+
3. Integrate an explicit native claim action. Require a current required-check
|
|
16
|
+
verified handoff, fresh source fingerprint, passing check/requirement/review
|
|
17
|
+
gates and stable project/run identity. Do not reward advisory or blocked work.
|
|
18
|
+
4. Run a disposable real-PostgreSQL lifecycle through normal HTTP/auth routes:
|
|
19
|
+
new user, one welcome grant, isolation, eligible reward, exact replay,
|
|
20
|
+
conflicting/parallel claims, daily cap, rollback, level/week boundaries,
|
|
21
|
+
purchase/equip and application/database reconnect persistence. Exercise
|
|
22
|
+
rejection paths and reconcile wallet postings against balances.
|
|
23
|
+
5. Run backend checks and native eligibility/RPC/UI checks. Deploy the backend
|
|
24
|
+
only via reviewed PR, merge and its existing deployment workflow.
|
|
25
|
+
6. On the owner's Beshir Aissi account, claim the existing accepted Ship delivery
|
|
26
|
+
once; replay it; confirm exactly +25 coins/+100 XP/+1 km, then compare native
|
|
27
|
+
and web persisted state. Keep test fixtures separate from earned live records.
|
|
28
|
+
7. Record actual results, limitations and exact revisions, then resume beta
|
|
29
|
+
publication with installed-package and public-runtime acceptance gates.
|
|
30
|
+
|
|
31
|
+
## Trust boundary
|
|
32
|
+
|
|
33
|
+
The coding harness verifies local execution and source freshness. An authenticated
|
|
34
|
+
client transmits a bounded receipt; the backend does not independently execute
|
|
35
|
+
the repository. Client attestation is not remote execution attestation or proof
|
|
36
|
+
of authorship. Server amounts, owner isolation, durable deduplication and caps
|
|
37
|
+
must hold even for malformed or replayed clients. Tests must not equate a private
|
|
38
|
+
debug coin grant with an earned coding reward.
|
|
39
|
+
|
|
40
|
+
## Original baseline
|
|
41
|
+
|
|
42
|
+
Live profile previously verified: 20 coins, 0 XP, sandals owned/equipped. Current
|
|
43
|
+
backend has no coding-reward path. Quest policy explicitly returns `rewards:false`.
|
|
44
|
+
Beta publication is held until this additional acceptance scope is resolved.
|
|
45
|
+
|
|
46
|
+
Execution results are recorded in [beta-rewards-e2e-results.md](beta-rewards-e2e-results.md).
|
|
47
|
+
Production earned claim/replay/restart acceptance now passes at 45 coins,
|
|
48
|
+
100 XP and 1 km; live browser and release-package acceptance remain pending.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Beta reward acceptance results
|
|
2
|
+
|
|
3
|
+
## Production earned reward — passed
|
|
4
|
+
|
|
5
|
+
Tested November 2, 2026 UTC through the normal installed profile, authenticated
|
|
6
|
+
as the owner's Beshir Aissi account. The installation is still preview.13 with
|
|
7
|
+
labelled local launch/reward patches; these results are not installed-beta
|
|
8
|
+
release acceptance.
|
|
9
|
+
|
|
10
|
+
- Backend PR [#176](https://github.com/B-icy/Carthagent-Backend/pull/176), merged
|
|
11
|
+
revision `ec40fdb9b053e64b820adb18e7d35da927468149`.
|
|
12
|
+
- [Production deployment](https://github.com/B-icy/Carthagent-Backend/actions/runs/41401836218)
|
|
13
|
+
passed migration/readiness, public-site and service checks.
|
|
14
|
+
- Native preview accepted the real required-check Ship delivery
|
|
15
|
+
`903d3ed5-88db-41ca-b72d-f5699fa5ae7f`, source snapshot
|
|
16
|
+
`cea9b1d71e113d0b876cec4d3a2eef38f16e14decb519d033fb7d9325508b8bb`.
|
|
17
|
+
- Claim receipt `9d44cf4b-0a70-40e5-90ce-d68a7718fe21`, awarded
|
|
18
|
+
`2026-11-02T06:49:23.538Z`, policy `verified-delivery-beta-v1`.
|
|
19
|
+
|
|
20
|
+
| Check | Before | After |
|
|
21
|
+
| --- | --- | --- |
|
|
22
|
+
| Coins | 20 | 45 |
|
|
23
|
+
| Total XP | 0 | 100 |
|
|
24
|
+
| Total / weekly km | 0 / 0 | 1 / 1 |
|
|
25
|
+
| Profile version | 14 | 15 |
|
|
26
|
+
| Equipment / inventory | Sandals equipped | Identical, sandals retained |
|
|
27
|
+
|
|
28
|
+
Immediate replay returned the identical receipt with `replayed:true` and no
|
|
29
|
+
additional grant. After stopping and restarting the registered native service,
|
|
30
|
+
preview, replay and profile all matched the saved post-claim result exactly.
|
|
31
|
+
Sessions and credentials persisted. No debug issuance was used.
|
|
32
|
+
|
|
33
|
+
The live TUI displayed 45 coins / 100 XP / 1 km, rendered the digest-only claim
|
|
34
|
+
confirmation, accepted cancellation, and then confirmed the existing receipt
|
|
35
|
+
with “This delivery was already rewarded. No duplicate grant.” The wallet and
|
|
36
|
+
version stayed unchanged. Captures: `/tmp/opencode/rewards-ui-preview.txt` and
|
|
37
|
+
`/tmp/opencode/rewards-ui-replayed.txt`.
|
|
38
|
+
|
|
39
|
+
## Repeatable new-user acceptance — passed locally
|
|
40
|
+
|
|
41
|
+
Disposable PostgreSQL 17.11: 117 tests passed before the additional bearer
|
|
42
|
+
scenario; the complete six-test bearer group also passed. Backend CI ran the
|
|
43
|
+
updated suite successfully. Backend unit tests: 521 passed, one skipped.
|
|
44
|
+
Syntax, assets and navigation checks passed.
|
|
45
|
+
|
|
46
|
+
Coverage includes one welcome grant, cookie and device-approved bearer access,
|
|
47
|
+
reward claims and browser/CLI agreement, token refresh/new CLI session, owner
|
|
48
|
+
isolation, concurrent daily caps, run/snapshot deduplication, changed-evidence
|
|
49
|
+
rejection, transaction and wallet-overflow rollback, level/week progression,
|
|
50
|
+
milestone shop/quote/equip agreement, purchase replay, database reconnect and
|
|
51
|
+
restricted deployment/application-role permissions.
|
|
52
|
+
|
|
53
|
+
Native build/lint and 76 focused tests passed, including explicit confirmation,
|
|
54
|
+
account/session binding, current source gates, privacy of digest-only uploads,
|
|
55
|
+
lost-response recovery, restart and receipt recovery after source changes.
|
|
56
|
+
|
|
57
|
+
## Remaining acceptance gates
|
|
58
|
+
|
|
59
|
+
- Live browser comparison awaits normal user sign-in in `voyages-rewards-e2e`.
|
|
60
|
+
- Live terminal rendering, cancellation and confirmed replay passed.
|
|
61
|
+
- Five-platform runtime prebuild 41398315323 succeeded on attempt 2. Exact
|
|
62
|
+
provenance, all archive checksums, embedded metadata and executable hashes
|
|
63
|
+
passed the production acquisition parser; regenerating the manifest produced
|
|
64
|
+
the identical candidate. The packaged beta manifest now matches those bytes.
|
|
65
|
+
Installed beta acceptance remains pending.
|
|
66
|
+
|
|
67
|
+
Pre-manifest full native quality run: lint/build passed; 1,124 tests passed, five
|
|
68
|
+
skipped, six failed solely because the package version is beta.1 while the
|
|
69
|
+
runtime manifest still pins preview.13. These remain release-blocking failures
|
|
70
|
+
until the verified beta candidate was integrated. The post-integration quality
|
|
71
|
+
run passed: **1,130 tests passed, five skipped, zero failures**, plus lint,
|
|
72
|
+
typecheck and build. Exact candidate/packaged manifest equality and
|
|
73
|
+
`verify-release-version.mjs v1.1.0-beta.1` also passed. No trust assertion was relaxed.
|
|
74
|
+
|
|
75
|
+
Native PR CI passed all jobs after retrying one Windows Node 24 process-query
|
|
76
|
+
timeout. Native navigation also passed locally: 12 tests / 65 assertions.
|
|
77
|
+
|
|
78
|
+
The reward backend relies on authenticated local-harness attestation. It does
|
|
79
|
+
not independently execute repositories or prove authorship. Daily classifier
|
|
80
|
+
assessment and personal quest checkmarks remain unrewarded.
|
|
81
|
+
|
|
82
|
+
Local evidence: `/tmp/opencode/rewards-live-claimed.json`,
|
|
83
|
+
`/tmp/opencode/rewards-live-restarted.json`, and
|
|
84
|
+
`/tmp/opencode/rewards-installed-backup/provenance.json`.
|
package/docs/budgets.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Session delivery budgets
|
|
2
|
+
|
|
3
|
+
The delivery extension supports opt-in execution limits on Windows, macOS,
|
|
4
|
+
Linux and WSL. These are agent orchestration controls, not a security sandbox
|
|
5
|
+
or a dollar/token billing cap.
|
|
6
|
+
|
|
7
|
+
Normal `ctg` launches accept `--max-tools`, `--max-seconds`, and `--max-repairs`
|
|
8
|
+
for both TUI and headless mode. For example:
|
|
9
|
+
|
|
10
|
+
```text
|
|
11
|
+
node bin/ctg.mjs -p --max-tools 100 --max-seconds 900 --max-repairs 2 "Implement the requested change"
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Invalid or missing values, and budget options combined with `--no-delivery`,
|
|
15
|
+
fail before launching the engine. Use `/delivery-budget-status` to inspect
|
|
16
|
+
usage, remaining allowance (null means unlimited), and stop reason without
|
|
17
|
+
spending a tool call. The command displays a JSON status message.
|
|
18
|
+
|
|
19
|
+
Alternatively launch the bundled engine directly with the extension and flags
|
|
20
|
+
(from the repository root; works in PowerShell and POSIX shells):
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
node vendor/agent/cli.js -e extensions/delivery.ts --delivery-max-tools 100 --delivery-max-seconds 900 --delivery-max-repairs 2
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Each flag accepts an integer from 0 to 1000000. Zero disables that dimension;
|
|
27
|
+
all default to zero. The existing maximum of two automatic repair nudges per
|
|
28
|
+
user input still applies. The new repair limit additionally caps nudges over
|
|
29
|
+
the entire budget, including across user follow-ups.
|
|
30
|
+
|
|
31
|
+
- Tool calls count at admission, including status calls and subsequently blocked
|
|
32
|
+
calls. Exactly N calls may be admitted; the next attempt stops the agent.
|
|
33
|
+
- Seconds measure wall time from budget creation, including idle time and time
|
|
34
|
+
while the process is closed. An active turn has a timer that requests abort
|
|
35
|
+
even if no tools are invoked. An idle expired session stops on its next run.
|
|
36
|
+
- Repair rounds count automatic delivery follow-ups, not arbitrary model turns.
|
|
37
|
+
- Limits and counters are stored as session entries independently of plans.
|
|
38
|
+
Replanning, input, compaction and same-session tree navigation do not reset
|
|
39
|
+
them. Restoration reads all session entries, not only the selected branch.
|
|
40
|
+
Existing saved limits remain authoritative until reset.
|
|
41
|
+
|
|
42
|
+
When exhausted, the extension blocks tools, requests engine abort, suppresses
|
|
43
|
+
repair follow-ups, and emits a `delivery-budget-stop` JSON message containing
|
|
44
|
+
its reason, counters, requirements and last recorded evidence. That evidence
|
|
45
|
+
is a snapshot, **not a fresh verification**. The delivery report is not falsely
|
|
46
|
+
marked verified or overwritten; unfinished work remains unfinished.
|
|
47
|
+
|
|
48
|
+
To authorize more work, explicitly run `/delivery-budget-reset` while the agent
|
|
49
|
+
is idle. In headless mode a command-only invocation on a previously failed
|
|
50
|
+
session may still exit 1 because the engine prints its last assistant error;
|
|
51
|
+
the command's persisted reset is applied. Our offline subprocess regression
|
|
52
|
+
checks the saved reset and subsequent tool execution rather than treating that
|
|
53
|
+
exit code as proof that reset failed. It creates a fresh budget using the current launch flags. This is a
|
|
54
|
+
user command, not a model tool. A genuinely new session also starts a new budget.
|
|
55
|
+
Separate processes/sessions do not share a workspace-wide quota, and deliberate
|
|
56
|
+
session-file edits or extension removal can bypass the limits.
|
|
57
|
+
|
|
58
|
+
Cancellation is cooperative: engine/provider/tools must honor abort signals.
|
|
59
|
+
Detached subprocesses, uninterruptible synchronous code, and requests already
|
|
60
|
+
billed by a provider cannot be undone. Time limits are not hard OS process
|
|
61
|
+
termination deadlines. No paid-provider cancellation guarantee is implied.
|
|
62
|
+
|
|
63
|
+
The bundled engine's headless print-mode finalizer also destroys its captured
|
|
64
|
+
Undici dispatcher, but only if that dispatcher is still the process-global
|
|
65
|
+
dispatcher. This releases sockets left open by aborted provider requests without
|
|
66
|
+
destroying a dispatcher that another runtime installed later. After refreshing the
|
|
67
|
+
vendored engine, run `node tools/patch-print-shutdown.mjs`; the patcher fails
|
|
68
|
+
closed if the expected print-mode anchors have changed.
|
|
69
|
+
|
|
70
|
+
Native Windows/macOS/Linux CI runs the regression suite on Node 22 and 24;
|
|
71
|
+
WSL is validated separately locally. This does not establish every terminal,
|
|
72
|
+
OS version, browser or processor architecture as tested.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Bounded context compaction
|
|
2
|
+
|
|
3
|
+
Both vendored engine compaction paths use `vendor/agent/bounded-summary.mjs`.
|
|
4
|
+
After refreshing the engine bundle, run `node tools/patch-compaction.mjs`. The
|
|
5
|
+
patcher validates its anchors and fails rather than guessing at changed code.
|
|
6
|
+
|
|
7
|
+
Compaction starts at the earlier of 70% of the context window or the configured
|
|
8
|
+
reserve boundary. Context estimates take the maximum of usage-based tokens and
|
|
9
|
+
serialized UTF-8 bytes divided by four, including when cache usage is available.
|
|
10
|
+
This is conservative for the managed gateway, whose current catalog advertises
|
|
11
|
+
its serialized byte cap divided by four as the usable context window.
|
|
12
|
+
|
|
13
|
+
Summary requests use half the catalog-derived byte cap (or half an explicit
|
|
14
|
+
`maxRequestBytes`, if stricter), measured against their serialized context.
|
|
15
|
+
The remaining space allows for transport encoding, provider fields, and output.
|
|
16
|
+
This is a conservative bound, not an exact tokenizer or wire-payload measurement.
|
|
17
|
+
Provider size rejections halve the budget and retry with smaller fragments.
|
|
18
|
+
|
|
19
|
+
Oversized history is split at Unicode-safe boundaries. Every fragment includes
|
|
20
|
+
instructions to preserve constraints, paths, unresolved failures, and next steps.
|
|
21
|
+
Ordered fragment summaries are recursively combined into one checkpoint. No raw
|
|
22
|
+
history is silently truncated. Prior summaries and custom instructions are part
|
|
23
|
+
of the input being reduced. Each subrequest has a distinct session/operation seed;
|
|
24
|
+
all returned usage is accumulated. Output is capped at 4096 tokens per request.
|
|
25
|
+
|
|
26
|
+
Aborts, non-size failures, empty/tool-call/truncated responses, non-converging
|
|
27
|
+
reduction, and the 128-request/eight-level limits fail compaction rather than
|
|
28
|
+
persisting an incomplete checkpoint. The UI labels this as a failure, not success.
|
|
29
|
+
There is no guarantee of lossless semantic compression: summaries remain model
|
|
30
|
+
generated. Tests use deterministic transports and cover bytes, chunk coverage,
|
|
31
|
+
adaptive rejection recovery, cancellation, failure states, and UI notices.
|
|
32
|
+
|
|
33
|
+
Restart CTG after updating to load the new engine and UI. Existing session logs
|
|
34
|
+
and working files are not rewritten by this update.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Context efficiency implementation plan
|
|
2
|
+
|
|
3
|
+
Saved before implementation. Based on nine-cell v4 evidence: five harness cells exceeded the local input-byte envelope; one hit output length. Preserve all v1–v4 evidence. No paid benchmark rerun or production repository change is authorized by this implementation stage.
|
|
4
|
+
|
|
5
|
+
## Boundaries and invariants
|
|
6
|
+
|
|
7
|
+
1. `lib/delivery-context.mjs` pure projections own compact recovery/status/review receipts, byte accounting and conservative history selection. They cannot mutate lifecycle, acceptance, checks, evidence or approval. Exact active acceptance text, validator argv, outputs, progress and all unresolved blockers remain in recovery; size is measured, never silently trimmed to a hard cap.
|
|
8
|
+
2. Extension owns archive persistence and event integration. Superseded successful **delivery-only, fully paired** tool turns can become archive receipts in outbound context; original session/report are untouched. Failed results, user messages, mixed coding batches, incomplete pairing, and recent delivery turns remain verbatim. Do not archive captures during pending design review. Receipts link to immutable content-addressed archives; archive failure retains original messages.
|
|
9
|
+
3. Compact normal status and review responses stop serializing nested planning history/capture/revisions. Inspection must remain available in full; large inspection output must have a real complete artifact, not the current misleading generic truncation notice. Reading/semantic review remains model-authored. Any paging is explicit, with digest/source/capture identity retained; large captures are not considered read because a pointer exists.
|
|
10
|
+
4. Compaction integration uses pi's documented lifecycle, not a second summarizer. Refresh active run before restoring a deterministic recovery record. No model summary can create approval, erase blockers or certify freshness. Do not silently enable paid compaction or override user settings. Add explicit pressure advice/telemetry and document conservative native compaction settings; automatic byte-triggered compaction remains gated on tested engine support.
|
|
11
|
+
5. Metrics contain numeric category byte counts (system/schema/messages/reasoning/tool classes), no message bodies. Token estimates are labeled estimates, not tokenizer guarantees. A useful large-fixture test must show meaningful reduction while retaining exact obligations.
|
|
12
|
+
|
|
13
|
+
## Challenges and validation before delivery
|
|
14
|
+
|
|
15
|
+
- Restore after compaction, revision, source edits and branch switching: approval still locked when stale; exact validators/acceptance/outputs and failed evidence remain visible.
|
|
16
|
+
- Old tool-call batches: never orphan IDs or merge tool results across user messages; preserve every failed result. Retained provider reasoning signatures untouched; archived whole turns remove their replay metadata together.
|
|
17
|
+
- Full capture >48KB: parseable response, real retrievable archive, no mutation of capture, missing sections explicitly disclosed. Small-capture compatibility retained.
|
|
18
|
+
- Archive corruption/symlinks/write failure fail conservatively; do not prune data without a verified archive. Session files and reports remain unchanged by projection.
|
|
19
|
+
- Metric category totals, multibyte strings, no prompt/key leakage. Context pressure must not initiate paid retries/compaction unexpectedly.
|
|
20
|
+
- Pure tests + real extension integration + repository quality; benchmark manifests and historic result documents remain preserved. No benchmark superiority claim from synthetic byte savings.
|
|
21
|
+
|
|
22
|
+
## Subsequent repository benchmark design
|
|
23
|
+
|
|
24
|
+
After implementation, design a preregistered suite, not tasks selected because baseline pi failed. Use realistic feature additions across pinned existing repositories: authorization/migrations, cross-layer optimistic updates, third-party API integration, background jobs and compatibility changes. Separate offline hermetic and authorized online documentation tracks. Specify pristine base SHAs, dependencies/services, network rules, protected tests, held-out probes, paired budgets, common compaction settings and >=3 repetitions. Include old/new harness ablation and Jev separately. Publish development pilots separately from untouched test tasks. Actual expensive runs require a separate frozen manifest and cost authorization.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Context-efficiency author review and validation
|
|
2
|
+
|
|
3
|
+
This is an **author review**, not independent approval.
|
|
4
|
+
|
|
5
|
+
## Challenged risks and dispositions
|
|
6
|
+
|
|
7
|
+
1. **Summaries laundering authorization:** recovery is a read-only projection with explicit non-authority text; existing `planningStatus`/tool gate still fingerprints source and binds run/revision/digest. Extension regression changes source after approval and emits compaction notification: mutation remains blocked.
|
|
8
|
+
2. **Losing exact requirements or negative evidence:** recovery retains acceptance/check argv/outputs, open blockers, validation and review findings, review limitations, failed check status and excerpt. Pure regression asserts exact equality and unchanged durable state across projection/revision. Original evidence/history remain in report/session. Extremely large status/finding responses still encounter the existing presentation limit; not represented as universally bounded lossless responses.
|
|
9
|
+
3. **Provider-invalid orphan tool results or altered reasoning signatures:** only a complete contiguous assistant plus all its matching unique successful delivery-only results is replaceable. Never alter an assistant's reasoning field in place; preserve mixed code turns, failures and the newest eligible exchanges. No claim of compatibility with every provider cache/continuation API; live provider smoke remains needed for a new campaign.
|
|
10
|
+
4. **Pointer pretending inspection occurred:** oversized captures include explicit full paged-read instruction and immutable identity, with full artifact on disk. A pointer is not a reading certificate. Existing review capture match/scenario requirements remain in effect; actual comprehension still unprovable. Trusted advisor receives full capture through tool details.
|
|
11
|
+
5. **Archive corruption/write failure:** verify stored bytes on every archive substitution. Any storage failure conservatively retains original history. Tests cover corrupt artifact and symlinked root rejection. Atomic content-addressed create is not an OS sandbox or crash-proof disk guarantee.
|
|
12
|
+
6. **Compaction resetting budgets or selecting another run:** compaction hook refreshes the same selected run only; it does not call session restore, reset timers or clear counters. Branch/session restore retains existing behavior. No automatic paid summarizer is introduced.
|
|
13
|
+
7. **Telemetry leaking source:** only numerical sizes/categories/growth/time written. No prompt snippets or content hashes that imply semantic reading. Categories are coarse wire-JSON attribution; bytes/4 explicitly heuristic.
|
|
14
|
+
8. **Overclaiming savings:** offline historical potential message savings 26–51% assume archive eligibility and simulated references. Not proof of better live completion, not actual serialized-provider request savings. Full design remains retrievable and exact obligations can still be large.
|
|
15
|
+
9. **Benchmark integrity:** no historical candidate/evaluator/receipt edited. Adapter source change requires a new manifest/root; old freeze no longer validates this changed checkout and must not be overwritten.
|
|
16
|
+
10. **Research claims:** repository API/README retrieved directly; identify unstable branches, licensing boundaries and unresolved Cal.com/Cal.diy identity. No claim that proposed tickets or containers are ready.
|
|
17
|
+
|
|
18
|
+
## Results
|
|
19
|
+
|
|
20
|
+
- `npm run quality`: lint, typecheck, build, **352/352 tests passed**; log `/tmp/context-quality-final.log`.
|
|
21
|
+
- `node --test tools/benchmark/advisor.test.mjs tools/benchmark/runner.test.mjs`: **5/5 passed**, including actual installed pi offline discovery/guard and advisor integration; log `/tmp/context-installed-engine.log`.
|
|
22
|
+
- `git diff --check`: clean.
|
|
23
|
+
- No new paid model calls, no browser/Python suite run in this change, no independent review, no remote CI/PR/merge claimed.
|
|
24
|
+
|
|
25
|
+
## Follow-ups, not implemented claims
|
|
26
|
+
|
|
27
|
+
Byte-triggered automatic native-compaction scheduling; incremental section/patch design tools; pagination for every unusually large findings/status response; live context+compaction completion validation; new repository containers/reference patches/held-out evaluators; repeated online/offline paid comparisons. Native compaction is user-configured, with deterministic recovery already integrated.
|