carthagent 1.0.7 → 1.1.0-preview.13
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/README.md +140 -83
- package/bin/ctg.mjs +14 -732
- 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/help-dispatch-review.md +69 -0
- package/docs/legacy-cli.md +150 -0
- package/docs/live-theme-plugin-api.md +18 -0
- package/docs/native-cli.md +102 -0
- package/docs/native-compatibility.md +16 -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 +177 -0
- package/docs/opencode-composed-source-review.md +89 -0
- package/docs/opencode-migration.md +225 -9
- package/docs/opencode-owned-runtime.md +241 -0
- package/docs/opencode-runtime.md +12 -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/owned-host-controls-proof.md +39 -0
- package/docs/owned-runtime-release-manifest.md +42 -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/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/source-preview.md +120 -0
- package/evaluate.mjs +28 -1
- package/lib/budget.mjs +1 -1
- package/lib/codegraph.mjs +1 -1
- package/lib/delivery-review.mjs +11 -1
- package/lib/delivery.mjs +3 -2
- package/lib/environment.mjs +8 -0
- package/lib/guidance.mjs +1 -1
- package/lib/opencode/cli-runtime.mjs +1171 -0
- package/lib/opencode/cli.mjs +252 -0
- package/lib/opencode/credentials.mjs +63 -8
- package/lib/opencode/demo.mjs +53 -0
- package/lib/opencode/evaluation-budget-plugin/index.ts +3 -0
- package/lib/opencode/evaluation.mjs +32 -12
- package/lib/opencode/headless.mjs +8 -4
- package/lib/opencode/provider-policy.mjs +23 -0
- package/lib/opencode/review.mjs +37 -16
- 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 +299 -20
- package/lib/opencode/service.mjs +77 -35
- package/lib/opencode/session-options.mjs +6 -2
- package/lib/opencode/update.mjs +222 -0
- package/lib/opencode/workspace.mjs +1 -1
- package/lib/planning-advice.mjs +2 -2
- package/lib/providers/experiential.mjs +2 -2
- package/lib/tui/framing.mjs +1 -80
- package/lib/update.mjs +10 -1
- package/package.json +33 -7
- package/plugins/carthagent/README.md +23 -0
- package/plugins/carthagent/src/bootstrap.ts +1 -1
- 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 +71 -24
- package/plugins/carthagent/src/rpc.ts +51 -6
- package/plugins/carthagent/src/server/codegraph.ts +12 -5
- package/plugins/carthagent/src/server/daily-quests-rpc.ts +277 -0
- package/plugins/carthagent/src/server/daily-source-rpc.ts +211 -0
- package/plugins/carthagent/src/server/delivery.ts +227 -112
- package/plugins/carthagent/src/server/framing.mjs +80 -0
- package/plugins/carthagent/src/server/policy.ts +1 -1
- package/plugins/carthagent/src/server/providers.ts +59 -31
- package/plugins/carthagent/src/server/session-controls.ts +3 -1
- 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/voyages-rpc.ts +223 -0
- package/plugins/carthagent/src/testing.ts +5 -0
- package/plugins/carthagent/src/tui.tsx +496 -0
- package/plugins/carthagent/src/ui/client.ts +125 -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 +142 -0
- package/plugins/carthagent/src/ui/voyages.tsx +129 -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 +60 -0
- package/plugins/carthagent/src/workspace-rpc.ts +36 -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/tui.ts +26 -1
- package/script/ctg/build-owned-runtime.sh +166 -0
- package/tests/budget-engine.test.mjs +4 -3
- package/tests/cli.test.mjs +52 -96
- package/tests/daily-evidence.test.mjs +62 -0
- package/tests/delivery-review.test.mjs +11 -0
- package/tests/delivery.test.mjs +22 -1
- package/tests/fixtures/native-discovery-plugin/server.ts +15 -0
- package/tests/generate-owned-runtime-release.test.mjs +354 -0
- package/tests/installed-runtime-contract.test.mjs +43 -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 +53 -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 +451 -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-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 +395 -0
- package/tests/native-voyages-ui.test.mjs +277 -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 +16 -0
- package/tests/opencode-providers.test.mjs +245 -18
- package/tests/opencode-runtime.test.mjs +546 -8
- package/tests/opencode-session-controls.test.mjs +15 -0
- package/tests/opencode-ship-rpc.test.mjs +71 -0
- package/tests/opencode-update.test.mjs +475 -0
- package/tests/opencode-workspace.test.mjs +51 -2
- package/tests/owned-runtime-publish-workflow.test.mjs +477 -0
- package/tests/release-workflow.test.mjs +46 -0
- package/tests/runtime-artifact.test.mjs +269 -0
- package/tests/runtime-development-trust.test.mjs +230 -0
- package/tests/runtime-github-transport.test.mjs +132 -0
- package/tests/runtime-token-env.test.mjs +23 -0
- package/tests/server.test.mjs +3 -1
- package/tests/ship-telemetry.test.mjs +1 -1
- package/tests/source-preview.test.mjs +253 -0
- package/tests/test_native_terminal_probe.py +76 -0
- package/tests/test_native_terminal_semantics.py +232 -0
- package/tests/update.test.mjs +42 -5
- package/tests/verify-draft-runtime-gate.test.mjs +280 -0
- package/tests/verify-owned-runtime-release.test.mjs +371 -0
- package/tests/workspace-live.test.mjs +127 -0
- package/tools/benchmark/diagnose-request.mjs +59 -36
- package/tools/benchmark/eval-common.mjs +3 -3
- package/tools/benchmark/evaluators.test.mjs +4 -4
- package/tools/benchmark/guard.test.mjs +35 -2
- package/tools/benchmark/guard.ts +20 -7
- package/tools/benchmark/planning-startup.test.mjs +30 -34
- package/tools/benchmark/runner.mjs +12 -7
- package/tools/benchmark/runner.test.mjs +23 -7
- package/tools/benchmark/upstream-error.test.mjs +16 -2
- 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 +199 -40
- 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 +147 -24
- package/tools/native-public-repo-shell-result.mjs +13 -0
- package/tools/native-public-repo-shell-result.test.mjs +28 -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/pinned-owned-runtime-inputs.mjs +46 -0
- package/tools/prepare-native-manual.mjs +122 -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 +3 -1
- 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 +102 -20
- package/tools/test-native-evaluation.mjs +7 -3
- package/tools/test-native-glyph-pty.mjs +94 -0
- package/tools/test-native-host.mjs +87 -63
- package/tools/test-native-outcomes.mjs +3 -1
- package/tools/test-native-package.mjs +206 -38
- package/tools/test-native-performance.mjs +26 -0
- package/tools/test-native-product.mjs +90 -0
- package/tools/test-native-pty.mjs +34 -9
- package/tools/test-native-public-repo.mjs +224 -0
- package/tools/test-native-refresh-reentry.mjs +106 -0
- package/tools/test-native-report.mjs +27 -20
- 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 +224 -55
- 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/verify-draft-runtime-gate.mjs +138 -0
- package/tools/verify-owned-runtime-release.mjs +114 -0
- package/tools/verify-release-version.mjs +21 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Natural `/help` dispatch patch review
|
|
2
|
+
|
|
3
|
+
Standalone upstream patch: `docs/patches/opencode-v2.0.32-help-dispatch.patch`
|
|
4
|
+
|
|
5
|
+
- Upstream baseline: OpenCode `843a6c514e606b436a7fe713422ace0a93ad3d61` (v2.0.32)
|
|
6
|
+
- Upstream implementation commit: `75fea3b9475da6bbc59c5eeb6461a2994c84341b`
|
|
7
|
+
- Final upstream source including review corrections: `242cbb79cab1b473b63e5abbc29973cf6938ecbc`
|
|
8
|
+
- Patch SHA-256: `c1ce7d983be8ecdd3481b16da103fb32d144b0ec01f894915a110b46acdc6fe5`
|
|
9
|
+
|
|
10
|
+
The TUI's native `/help` command is a fallback rather than an exclusive
|
|
11
|
+
reservation. Autocomplete presents one `/help` option: the most recently
|
|
12
|
+
registered non-native extension command, or native `help.show` if no extension
|
|
13
|
+
claims the name. Direct Enter dispatch applies the same last-extension-wins
|
|
14
|
+
rule. Other argument-taking slash commands retain their previous first-match
|
|
15
|
+
dispatch behavior. When a plugin is disabled/deactivated, disposing its keymap
|
|
16
|
+
layer removes its claim; autocomplete and Enter then fall back to native help.
|
|
17
|
+
Duplicate extension claims are deterministic: the last registered extension
|
|
18
|
+
owns `/help` until its layer is disposed, then the previous extension (or native
|
|
19
|
+
help) is revealed.
|
|
20
|
+
|
|
21
|
+
## Focused regression test
|
|
22
|
+
|
|
23
|
+
Test: `packages/tui/test/plugin-keymap.test.tsx`,
|
|
24
|
+
`a plugin /help overrides native /help for natural autocomplete selection and restores it on disable`.
|
|
25
|
+
|
|
26
|
+
Run from `packages/tui` with Bun 1.4.2:
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
bun test --timeout 30000 --test-name-pattern 'plugin /help' test/plugin-keymap.test.tsx
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Result on final source: focused test **1 passed, 0 failed**; the complete
|
|
33
|
+
`plugin-keymap.test.tsx` file **5 passed, 0 failed**. The fixture types `/help`
|
|
34
|
+
while autocomplete is open and presses Enter once without escaping or
|
|
35
|
+
dismissing it. Two plugin commands claim `/help`; the later handler runs. The
|
|
36
|
+
test verifies no `/session` request was made, disables the plugin through the
|
|
37
|
+
plugin UI, then submits `/help` again and verifies native help appears, also
|
|
38
|
+
without a session request. The fixture uses bare, no-argument `/help`, matching
|
|
39
|
+
the CTG command definition.
|
|
40
|
+
|
|
41
|
+
## Broader test observations
|
|
42
|
+
|
|
43
|
+
An intermediate unfiltered run failed the existing test `setup layers before
|
|
44
|
+
and after await reach keyboard, palette, and slash across disable and enable`:
|
|
45
|
+
the new test's `help-override` query had accidentally been applied to that
|
|
46
|
+
existing test even though it registered `setup-keymap`. The query was restored
|
|
47
|
+
to the existing helper default; the help-specific query is used only by the new
|
|
48
|
+
test. The captured full-file run then passed **5/5**. This was an actual test
|
|
49
|
+
regression in the intermediate branch and is corrected in the published head.
|
|
50
|
+
|
|
51
|
+
Baseline control: the unmodified `843a6c5` worktree ran the existing
|
|
52
|
+
`setup layers before and after await...` test alone and passed (**1 passed, 0
|
|
53
|
+
failed**). Final corrected source ran the entire test file successfully (**5
|
|
54
|
+
passed, 0 failed**).
|
|
55
|
+
|
|
56
|
+
## Typecheck and fixture limits
|
|
57
|
+
|
|
58
|
+
`bun run typecheck` from `packages/tui` was attempted using the available shared
|
|
59
|
+
dependencies. It emitted broad unrelated diagnostics across `packages/core`
|
|
60
|
+
and source files resolved from the dirty prototype checkout (including missing
|
|
61
|
+
workspace packages, Node/DOM/Bun globals, and Effect type errors), then exceeded
|
|
62
|
+
the 120-second timeout and was terminated. This environment did not provide a
|
|
63
|
+
valid full-package typecheck result. The autocomplete optional `command.slash`
|
|
64
|
+
access is explicitly guarded before reading `slash.arguments`.
|
|
65
|
+
|
|
66
|
+
The test runner prints an existing `MaxListenersExceededWarning` for renderer
|
|
67
|
+
resize listeners; it also occurs in the baseline control. No assertions were
|
|
68
|
+
weakened. The final-binary PTY proof is deferred until composition with the
|
|
69
|
+
independently reviewed session-ui and theme patches and the pending glyph work.
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# Current default CLI: install, providers, Ship, and console
|
|
2
|
+
|
|
3
|
+
> This page documents the **currently-default regular (legacy) CLI** while
|
|
4
|
+
> native OpenCode remains opt-in with `CTG_NATIVE=1`. Its configuration and
|
|
5
|
+
> data paths are not the native OpenCode profile. Keep this guide available
|
|
6
|
+
> until the native default switch is accepted; it can then be archived or
|
|
7
|
+
> retired as part of that migration.
|
|
8
|
+
|
|
9
|
+
## Install the current CLI
|
|
10
|
+
|
|
11
|
+
Core CLI requires Node ≥ 22.19. Optional workflows may need Git and an
|
|
12
|
+
authenticated `gh` for PR review, Python and scenario dependencies for game
|
|
13
|
+
graders, and a browser download for real-browser checks. The browser helper
|
|
14
|
+
downloads `chrome-headless-shell` on first use to `~/.carthagent/browser/`; no
|
|
15
|
+
local browser installation is needed. An external WebDriver endpoint is also
|
|
16
|
+
supported.
|
|
17
|
+
|
|
18
|
+
Install Carthagent:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
npm install -g carthagent
|
|
22
|
+
ctg
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
If the shell cannot find `ctg`, restart the terminal and confirm npm's global
|
|
26
|
+
executable directory is on `PATH` (`$(npm prefix -g)/bin` on Linux/macOS; the
|
|
27
|
+
directory shown by `npm prefix -g` on Windows).
|
|
28
|
+
|
|
29
|
+
If npm reports `ENOTDIR`, `EEXIST`, or `ENOTEMPTY` while replacing
|
|
30
|
+
`node_modules/carthagent`, inspect the global install directory for a stale
|
|
31
|
+
entry from an earlier install or `npm link`. Preserve anything you need before
|
|
32
|
+
moving only the identified stale entries out of the way; then retry:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
npm root -g
|
|
36
|
+
# After reviewing the exact paths, move the stale carthagent entry/stash aside.
|
|
37
|
+
npm install -g carthagent
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The regular CLI's `ctg update` has cleanup-and-retry behavior for these stale
|
|
41
|
+
global-install rename failures. Do not apply that legacy updater behavior to the
|
|
42
|
+
native updater, which has a different contract; see [native upgrade guidance](native-upgrade.md).
|
|
43
|
+
|
|
44
|
+
For a development checkout:
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
git clone https://github.com/B-icy/Carthagent
|
|
48
|
+
cd Carthagent
|
|
49
|
+
npm ci && npm install -g . # or run node bin/ctg.mjs directly
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Provider authentication
|
|
53
|
+
|
|
54
|
+
The regular CLI stores its provider credentials in
|
|
55
|
+
`~/.carthagent/agent/auth.json`; the native preview has a different isolated
|
|
56
|
+
credential store and profile. Do not copy or merge profile files to switch
|
|
57
|
+
runtimes.
|
|
58
|
+
|
|
59
|
+
Run `ctg login`, or use `/login` (`/auth`) inside the regular console. Carthagent
|
|
60
|
+
Ship is offered as the managed option, while Anthropic, OpenAI, OpenRouter and
|
|
61
|
+
other supported direct providers can also be connected. The login UI handles
|
|
62
|
+
OAuth URLs, device codes, and provider-supported API-key prompts. You can also
|
|
63
|
+
provide a provider key through its environment variable, for example:
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
export ANTHROPIC_API_KEY=... # or OPENAI_API_KEY, GEMINI_API_KEY, OPENROUTER_API_KEY, XAI_API_KEY, ...
|
|
67
|
+
ctg
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Multiple provider credentials can coexist. In the regular console, `^t`
|
|
71
|
+
(settings) has provider and model rows; `←→` changes providers, and the model
|
|
72
|
+
picker is scoped to the selected provider. `/login` can connect another
|
|
73
|
+
provider. Override the model for one run with `--model <id>`; the last choice
|
|
74
|
+
is saved to `~/.carthagent/config.json` for the regular CLI.
|
|
75
|
+
|
|
76
|
+
### Carthagent Ship
|
|
77
|
+
|
|
78
|
+
Choosing Ship in the login UI starts browser device authorization. Carthagent
|
|
79
|
+
stores the resulting short-lived access token and rotating refresh token in its
|
|
80
|
+
regular CLI credential store. After signing in:
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
ctg account # credit, grants, plan, and CLI sessions
|
|
84
|
+
ctg billing checkout # checkout URL
|
|
85
|
+
ctg billing portal # customer portal URL
|
|
86
|
+
ctg logout-cloud [session-id] # revoke current or named CLI session
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
The regular console also offers `/account`, `/billing checkout`, `/billing
|
|
90
|
+
portal`, and `/logout-cloud <session-id>`. Direct provider/API-key options
|
|
91
|
+
remain available if managed Ship credit is unavailable. A direct `EXPLABS_API_KEY`
|
|
92
|
+
environment key, where configured by an operator, is separate from the public
|
|
93
|
+
Ship device flow.
|
|
94
|
+
|
|
95
|
+
`CARTHAGENT_CLOUD_URL` overrides the Carthagent account/control-plane origin.
|
|
96
|
+
`EXP_GATEWAY_URL` specifically overrides the direct upstream model gateway for
|
|
97
|
+
preview or staging. Browser-account requests use the Ship control-plane
|
|
98
|
+
authority; API-key requests use the configured upstream gateway. Model
|
|
99
|
+
identities are discovered from `GET /v1/models`; published operating caps may
|
|
100
|
+
restrict catalog model limits. Pricing metadata is not inferred from that
|
|
101
|
+
endpoint. See the control-plane/operator documentation for hosted request and
|
|
102
|
+
billing behavior.
|
|
103
|
+
|
|
104
|
+
## Regular console and commands
|
|
105
|
+
|
|
106
|
+
```sh
|
|
107
|
+
ctg # interactive split-terminal console
|
|
108
|
+
ctg "Build a task CLI" # console with an initial task
|
|
109
|
+
ctg -p "Summarize this repo" # headless output (also automatic without a TTY)
|
|
110
|
+
ctg demo # scripted mock; no provider needed
|
|
111
|
+
ctg status # fingerprint, contract, pending checks
|
|
112
|
+
ctg check all # run declared checks
|
|
113
|
+
ctg account # Ship account details
|
|
114
|
+
ctg billing checkout # Ship checkout link
|
|
115
|
+
ctg serve # web dashboard
|
|
116
|
+
ctg test # unit suite
|
|
117
|
+
ctg update --check # check for a release without installing
|
|
118
|
+
ctg update # update using the regular CLI updater
|
|
119
|
+
ctg --help # all commands/options
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Inside the regular console: `enter` send/steer · `esc` abort (again force-
|
|
123
|
+
restarts the engine) · `^r` session picker · `tab`/`⇧tab` panes · `x` expand
|
|
124
|
+
tool output · `^v` paste · `/copy` copy the full last assistant response · `^t`
|
|
125
|
+
settings · `^c` quit. Drag-select copies text; at the pane edge, continue
|
|
126
|
+
holding to scroll during selection. Clipboard writes use native tools and OSC
|
|
127
|
+
52; remote terminals may need clipboard permission and may impose size limits.
|
|
128
|
+
Regular sessions persist under `~/.carthagent/agent/sessions/`; `ctg -c`
|
|
129
|
+
continues the latest and `ctg -r` opens the picker.
|
|
130
|
+
|
|
131
|
+
### Themes and useful flags
|
|
132
|
+
|
|
133
|
+
The regular console provides the `carthage` purple/gold theme, dark themes
|
|
134
|
+
(`opencode`, `tokyonight`, `nebula`, `ember`, `forest`, `mono`, `obsidian`,
|
|
135
|
+
`midnight`, `nord`, `solarized-dark`, `okabe-dark`, `contrast-dark`), light
|
|
136
|
+
themes (`paper`, `daylight`, `solarized-light`, `okabe-light`,
|
|
137
|
+
`contrast-light`), and adaptive `solarized`, `okabe`, `contrast`, and `system`
|
|
138
|
+
themes. Select with `--theme`, `/theme`, or `^t`; the dashboard theme picker
|
|
139
|
+
persists its choice separately in browser `localStorage`.
|
|
140
|
+
|
|
141
|
+
Common options include `--model`, `--thinking`, `--validators <file>`,
|
|
142
|
+
`--context <file>`, `--bash-cap <sec>`, `--review ask|yes|no`, `--isolate`,
|
|
143
|
+
`--no-delivery`, `--no-guide`, `--ascii`, `--glyphs <mode>`, `-c`, `-r`, and
|
|
144
|
+
`--session`. `--glyphs auto` selects Unicode where supported and otherwise
|
|
145
|
+
falls back to ASCII; set `--ascii`, `--glyphs unicode|ascii`,
|
|
146
|
+
`CARTHAGENT_GLYPHS=unicode|ascii`, or `CARTHAGENT_ASCII=1` to override.
|
|
147
|
+
|
|
148
|
+
For native preview behavior and its separate paths, see the [native upgrade
|
|
149
|
+
guide](native-upgrade.md). Native migration acceptance remains open; this page
|
|
150
|
+
continues to describe the default until that status changes.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Live theme control for TUI plugins
|
|
2
|
+
|
|
3
|
+
Reviewable upstream patch: `docs/patches/opencode-v2.0.32-live-theme-api.patch`
|
|
4
|
+
|
|
5
|
+
Patch SHA-256: `0bcb1462688c00a09564e9874c3e01429baf92fe004bfc6400704fb24133c123`
|
|
6
|
+
|
|
7
|
+
The narrow host extension is `context.ui.theme.current()` and
|
|
8
|
+
`context.ui.theme.set({ name, mode? })`. It delegates to OpenCode's existing
|
|
9
|
+
reactive theme service, which applies changes in the running TUI and persists
|
|
10
|
+
configuration. It does not edit theme files or signal/restart the process.
|
|
11
|
+
Theme files must be provisioned before TUI startup so the host has discovered
|
|
12
|
+
them. A missing theme or unsupported requested mode returns `false` without
|
|
13
|
+
partially changing the active theme or mode.
|
|
14
|
+
|
|
15
|
+
Focused coverage: `packages/tui/test/plugin-theme.test.tsx` (2 tests).
|
|
16
|
+
Validation used Bun 1.4.2: focused theme tests pass 2/2 and the plugin package
|
|
17
|
+
typecheck passes. This is a standalone candidate patch; it is not composed into
|
|
18
|
+
the pinned runtime patch and does not update the runtime recipe digest.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Native OpenCode CLI adapter
|
|
2
|
+
|
|
3
|
+
`lib/opencode/cli.mjs` is the compatibility boundary for the `ctg` command
|
|
4
|
+
surface. It parses aliases and flags, chooses interactive vs headless execution,
|
|
5
|
+
and dispatches to `lib/opencode/cli-runtime.mjs`. `bin/ctg.mjs` selects this route
|
|
6
|
+
only with `CTG_NATIVE=1`; the existing CLI remains the default until integration
|
|
7
|
+
gates pass.
|
|
8
|
+
|
|
9
|
+
## Runtime integration port
|
|
10
|
+
|
|
11
|
+
The caller of `runOpenCodeCli()` supplies these concrete capabilities:
|
|
12
|
+
|
|
13
|
+
| Capability | Request/behavior |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| `run({ mode, options, prompt, args })` | Launch native OpenCode interactive or headless (`print`/JSONL) session. Honor `--engine-cli`/`--agent-cli` as an explicit executable override and `--isolate` as extension/skill/prompt discovery isolation using a fresh CTG profile, not a worktree. |
|
|
16
|
+
| `listModels({ query })` | Enumerate models from the native provider catalog, filter the optional query, and print the compatible provider/model/context/token/input/output columns. |
|
|
17
|
+
| `login({ args })` | Uses OpenCode 2 integration list/connect/status/complete/cancel APIs. Defaults to Carthagent Ship when available; optional integration and method arguments select another integration. Key-based methods are not prompted in clear text. |
|
|
18
|
+
| `account({ args })` | Uses the profile-owned Ship RPC and active managed OAuth connection; `--json` emits the account response. |
|
|
19
|
+
| `billing({ action })` | Uses the profile-owned Ship RPC to create checkout/portal links and opens the returned URL explicitly. |
|
|
20
|
+
| `logout({ session })` | Uses the profile-owned Ship RPC to revoke a named session or the current session; current logout also removes its native credential. |
|
|
21
|
+
| `archive({ args })` | Uses the profile-owned archive RPC for read-only list/search/read/export of configured legacy transcripts. |
|
|
22
|
+
| `review({ args })` | Uses the shared review facade, whose verdict is bound to the authoritative GitHub PR refs/source or exact local source snapshot. |
|
|
23
|
+
| `domain({ command, args })` | Existing status/hash/check/validate behavior backed by delivery domain modules. |
|
|
24
|
+
| `command({ command, args })` | Existing serve/test/eval/update utility commands; package updates install only the validated release spec. |
|
|
25
|
+
|
|
26
|
+
Capabilities that are not wired fail with an explicit missing-capability error;
|
|
27
|
+
there are no placeholder success paths. Operations return an integer process
|
|
28
|
+
status (or `undefined` for success). Cancellation from a native session maps to
|
|
29
|
+
130. Headless resume maps the picker request to continuation; headless calls
|
|
30
|
+
without a task fail with an actionable message.
|
|
31
|
+
|
|
32
|
+
Headless success requires both the assistant's completed `finish: stop` message
|
|
33
|
+
and a terminal `idle` message with `outcome: succeeded`; text output alone is not
|
|
34
|
+
success. Native thinking levels are passed as model variants. The adapter rejects
|
|
35
|
+
`--max-tools`, `--max-seconds`, `--max-repairs`, `--no-delivery`, and `--no-strict`
|
|
36
|
+
unless the active native plugin advertises the matching session-option, budget,
|
|
37
|
+
and policy enforcement capabilities. They fail closed when that contract is
|
|
38
|
+
missing. `--bash-cap` is enforced by the native plugin's shell hooks when the
|
|
39
|
+
active plugin advertises session-option support. `--isolate` uses a fresh CTG
|
|
40
|
+
profile with empty skill, instruction, and command sources, while retaining the
|
|
41
|
+
Carthagent plugin; this disables ambient profile/project discovery without
|
|
42
|
+
creating a worktree.
|
|
43
|
+
`--codegraph-max-files` sets the bounded source-file scan limit for the native
|
|
44
|
+
code navigation index and is resolved per session. `--no-guide` is stored in
|
|
45
|
+
durable `carthagent.options` session metadata and honored by native prompt
|
|
46
|
+
framing; on a resumed session, explicitly supplied options override persisted
|
|
47
|
+
settings for that session only, while unspecified settings are preserved. `demo`
|
|
48
|
+
runs a separately labeled offline Node fixture in a disposable temporary workspace;
|
|
49
|
+
it makes no provider calls, edits no project files, and does not claim evidence for
|
|
50
|
+
the user's project. The shared update operation in `lib/opencode/update.mjs`
|
|
51
|
+
supports npm installs
|
|
52
|
+
and clean source clones; clone updates fetch the selected origin tag into a
|
|
53
|
+
private ref and check out its resolved commit, while dirty clones are refused.
|
|
54
|
+
The native CLI's current `update` command path is separate and refuses to
|
|
55
|
+
checkout into its active source tree; it installs the validated, release-pinned
|
|
56
|
+
package spec for npm installs. Release tag/version validation is required;
|
|
57
|
+
`--force` cannot bypass it. `quit`/`q`/`exit` report that no interactive session
|
|
58
|
+
is active when invoked as standalone commands.
|
|
59
|
+
|
|
60
|
+
`--json` translates real native session tool lifecycle and completed assistant
|
|
61
|
+
messages into the documented `tool_execution_start`, `tool_execution_end`, and
|
|
62
|
+
`message_end` JSONL records. It filters to the selected session and reconciles
|
|
63
|
+
message history after execution so stream/history projections do not duplicate a
|
|
64
|
+
turn. Failed assistant responses retain their error and stop reason, and terminal
|
|
65
|
+
failure/interruption outcomes are emitted as idle records rather than returning
|
|
66
|
+
an empty JSONL stream.
|
|
67
|
+
Accepted turns that time out or are cancelled keep their captured session and
|
|
68
|
+
tool lifecycle events, but are never reconciled against older session history.
|
|
69
|
+
Pre-admission interruption has no accepted marker and emits no prior-session
|
|
70
|
+
events. OAuth form secret fields are masked in raw terminal input; unsupported
|
|
71
|
+
API-key login methods are rejected before any prompt is displayed.
|
|
72
|
+
|
|
73
|
+
The disposable real-host adapter smoke is `node tests/native-cli-host-smoke.mjs`.
|
|
74
|
+
It resolves the pinned OpenCode executable through the package-owned native
|
|
75
|
+
runtime resolver and defaults runtime/plugin imports to this package. In a
|
|
76
|
+
source checkout without installed runtime dependencies, set `CTG_OPENCODE_BIN`
|
|
77
|
+
to an installed pinned binary; `CTG_NATIVE_RUNTIME_ROOT` and
|
|
78
|
+
`CTG_NATIVE_PLUGIN_PATH` explicitly override runtime/plugin imports when testing
|
|
79
|
+
another package tree. The smoke creates a disposable
|
|
80
|
+
cross-platform profile (including Windows profile/temp roots), disables project
|
|
81
|
+
configuration loading, and runs a local OpenAI-compatible fixture provider. It
|
|
82
|
+
injects the already-running service through the adapter test seam and verifies
|
|
83
|
+
print, a second print turn in the same session, workspace-scoped continuation
|
|
84
|
+
when a newer foreign-workspace session exists, successful and failing JSONL
|
|
85
|
+
lifecycle events, and explicit rejection of unenforced budget flags. It does
|
|
86
|
+
not verify normal runtime service provisioning/profile isolation or provider
|
|
87
|
+
login/account/billing.
|
|
88
|
+
|
|
89
|
+
## Migration notes
|
|
90
|
+
|
|
91
|
+
- `ui` and `interactive` alias `tui`; `sessions` aliases `resume`; `s`, `c`,
|
|
92
|
+
`fingerprint`, `auth`, `cloud`, `web`, and `start` retain their established
|
|
93
|
+
command aliases.
|
|
94
|
+
- `--agent-cli` and `--engine-cli` share the explicit native executable
|
|
95
|
+
override. They must not silently select a legacy Pi executable.
|
|
96
|
+
- `--isolate` describes extension/skill/prompt discovery isolation and never
|
|
97
|
+
implies worktree creation.
|
|
98
|
+
- Help/output and domain exit behavior remain the CLI contract. PI session
|
|
99
|
+
stores are archive-only and are not read or continued by this adapter.
|
|
100
|
+
- Activation is intentionally staged: `CTG_NATIVE=1` is opt-in; changing the
|
|
101
|
+
default still requires parent integration to verify service/auth/model/review
|
|
102
|
+
behavior, package installation, and no supported default Pi execution path.
|
|
@@ -61,6 +61,15 @@ bounded cancellation, and a documented JSONL contract for evaluation consumers.
|
|
|
61
61
|
|
|
62
62
|
## Cross-cutting gates
|
|
63
63
|
|
|
64
|
+
The PR #152 TUI scope owns theme provisioning, workspace presentation, and
|
|
65
|
+
session-scoped host commands. `/login`, `/auth`, `/account`, `/cloud`, `/usage`,
|
|
66
|
+
`/billing`, `/logout-cloud`, `/update`, and `/upgrade` remain CLI-authoritative
|
|
67
|
+
operations and must be integrated through the separate CLI author RPC; this TUI
|
|
68
|
+
must not create a second provider/cloud/update implementation. `/quit`, `/q`,
|
|
69
|
+
and `/exit` remain native host lifecycle commands rather than plugin aliases.
|
|
70
|
+
These responsibilities are not counted as complete by listing them in a command
|
|
71
|
+
manifest.
|
|
72
|
+
|
|
64
73
|
- Two simultaneous tasks in different worktrees cannot share active contracts,
|
|
65
74
|
budget counters, Ship telemetry identities, or review receipts.
|
|
66
75
|
- Normal OpenCode configuration, credentials, service and sessions remain
|
|
@@ -92,6 +101,13 @@ The following probes use a disposable profile and deterministic loopback provide
|
|
|
92
101
|
package-owned `node_modules/@opencode/cli/bin/opencode.exe`. An optional first
|
|
93
102
|
argument selects an installed plugin directory.
|
|
94
103
|
|
|
104
|
+
The interactive help command must be checked with both `/help` and `/ctg-help`.
|
|
105
|
+
Strict post-submit probes on the pinned OpenCode 2.0.32 host currently show
|
|
106
|
+
`/help` opening native Help. Earlier positive results could match autocomplete
|
|
107
|
+
text before submission. `/ctg-help` works, but neither that alias nor dismissing
|
|
108
|
+
autocomplete before submitting `/help` satisfies the required command behavior.
|
|
109
|
+
Native command precedence remains an open acceptance gate.
|
|
110
|
+
|
|
95
111
|
- `node tools/test-native-controls.mjs`: concurrent framing/raw admission,
|
|
96
112
|
persisted launcher settings and framing overrides, compaction notes reaching
|
|
97
113
|
the summary request, cross-location RPC rejection, and whole-service restart
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Native daily coding quests
|
|
2
|
+
|
|
3
|
+
Open `/quests`, or `/voyages`, then **Daily coding quests**. On a development
|
|
4
|
+
runtime with navigation support, the left rail also has **Projects / Voyages**
|
|
5
|
+
modes. Switching modes does not leave the main page or create, interrupt, or
|
|
6
|
+
close a coding session. The Voyages navigator shows read-only profile and daily
|
|
7
|
+
assignment summaries. Select an entry explicitly to open its detail page;
|
|
8
|
+
opening a quest does not compose evidence or grant consent. **Return to coding**
|
|
9
|
+
opens the selected session, or Home when no session is selected.
|
|
10
|
+
|
|
11
|
+
The rail keeps each mode's selection and scroll position. Its compact layout
|
|
12
|
+
uses `Q` (quests), `P` (profile), `E` (equipment), `R` (refresh), `S` (sign in),
|
|
13
|
+
and `B` (return to coding); numbered rows are actual assignments. At widths
|
|
14
|
+
that cannot fit the rail, use the command palette, `/voyages`, or `/quests`.
|
|
15
|
+
Badges and friends have no native views yet. The navigator does not invent
|
|
16
|
+
links or data for them. Older released runtimes keep slash-command navigation.
|
|
17
|
+
|
|
18
|
+
Use the native Carthagent Ship
|
|
19
|
+
device sign-in. The client uses the existing configured Carthagent API and scoped
|
|
20
|
+
bearer connection. Signing in, running Ship, or finishing a local delivery does
|
|
21
|
+
not consent to grading and never automatically uploads evidence.
|
|
22
|
+
|
|
23
|
+
## Select, edit, preview, consent
|
|
24
|
+
|
|
25
|
+
1. Refresh and select one of the server's daily assignments. The server supplies
|
|
26
|
+
the title, kind, rubric, criteria, UTC day and closing time. There are no
|
|
27
|
+
locally generated objectives or invented completion states.
|
|
28
|
+
2. Choose an actual local Ship report, or a clearly labeled manual claim. Local
|
|
29
|
+
report access is limited to an owned session and its exact active report.
|
|
30
|
+
Select individual checks/findings and goal/change text. Nothing is selected
|
|
31
|
+
by default. Check output and finding text may contain private information.
|
|
32
|
+
3. Edit the evidence JSON. Remove or redact sensitive material yourself. No
|
|
33
|
+
automatic secret detection is promised. Use **Tab** to switch between the
|
|
34
|
+
editor and actions, and **Ctrl+P** to validate and preview, never to submit.
|
|
35
|
+
With the native runtime's default input bindings, **Enter** also previews;
|
|
36
|
+
**Ctrl+J** inserts a newline (as do **Shift/Ctrl/Alt+Enter**). These follow
|
|
37
|
+
the runtime's configured input-submit and input-newline shortcuts.
|
|
38
|
+
4. Inspect the complete canonical outbound JSON in the scrollable preview.
|
|
39
|
+
**Ctrl+U/D** scrolls details and preview. Unknown fields, invalid references,
|
|
40
|
+
unsupported controls, mismatched passing-check revisions and UTF-8 size
|
|
41
|
+
violations are rejected before dispatch. Editing invalidates the preview.
|
|
42
|
+
5. Choose **Consent and submit this preview**, then explicitly **Consent and
|
|
43
|
+
send**. This grants consent for this submission only. Cancel never sends.
|
|
44
|
+
|
|
45
|
+
Account, connection or location invalidation clears the local draft/preview and
|
|
46
|
+
closes this page's pending dialogs; it never preserves old consent. If evidence
|
|
47
|
+
selection or confirmation was interrupted, a page notice explains the cancellation
|
|
48
|
+
and the actions selection resets to **Refresh**, not Back. Refresh and review
|
|
49
|
+
again before giving fresh consent. No request is resent automatically. A request
|
|
50
|
+
that already started may still have reached the server: check its stable ID in
|
|
51
|
+
the recovery journal rather than assuming cancellation withdrew it.
|
|
52
|
+
|
|
53
|
+
The report's integer plan revision is not a source revision. The source-backed
|
|
54
|
+
projection uses the actual workspace fingerprint. A current report does not
|
|
55
|
+
retain a complete check history, so failed-before execution is **not recorded**
|
|
56
|
+
and is never inferred. Manual additions and edited text remain user claims.
|
|
57
|
+
Project/outcome/run UUIDs are stable references, not proof of authorship. Keep
|
|
58
|
+
those IDs when revising the same outcome. A separate outcome must describe
|
|
59
|
+
genuinely different work, not evade retained-outcome restrictions.
|
|
60
|
+
|
|
61
|
+
Every check has `name`, `before` (`failed` or `not_run`), `after` (`passed`,
|
|
62
|
+
`failed`, or `not_run`), `revision` (40/64 hex), and `result`. A passing check's
|
|
63
|
+
revision must equal the evidence revision. Every finding has `issue`,
|
|
64
|
+
`evidence`, and `resolution`. Empty arrays are valid but do not prove criteria.
|
|
65
|
+
Only enter `before: "failed"` if an actual earlier failure was observed.
|
|
66
|
+
There can be at most 12 checks and 5 findings. The complete canonical evidence
|
|
67
|
+
must fit 12,288 UTF-8 bytes, and the request 16,384 bytes. Per-field byte limits
|
|
68
|
+
are enforced before trimming, so shortening/redacting may be necessary.
|
|
69
|
+
|
|
70
|
+
## Processing and recovery
|
|
71
|
+
|
|
72
|
+
HTTP acceptance is not completion. **Queued** and **grading** are pending.
|
|
73
|
+
**Graded** has a separate decision: classifier-assessed complete, not met, or
|
|
74
|
+
needs evidence. **Failed** is an operational processing failure, not a negative
|
|
75
|
+
coding assessment. The displayed scores are uncalibrated rubric scores, not
|
|
76
|
+
confidence or probabilities. Only server state determines completion.
|
|
77
|
+
|
|
78
|
+
The native server persists the exact selected request and submission UUID in a
|
|
79
|
+
private profile-wide journal before sending. An uncertain send must be polled
|
|
80
|
+
by that UUID, or explicitly replayed with the same saved ID and body. Refresh
|
|
81
|
+
and poll are read-only and never replay. A new UUID is not a network retry.
|
|
82
|
+
The saved records remain available after midnight; a job accepted before the
|
|
83
|
+
UTC boundary can finish afterward. Validation/authentication/conflict failures
|
|
84
|
+
are not reasons for blind retries.
|
|
85
|
+
|
|
86
|
+
Accepted submissions need only their IDs for polling, so local raw payloads are
|
|
87
|
+
erased when acceptance is known. Unknown-send raw payloads are retained for
|
|
88
|
+
exact recovery for up to 24 hours, purged on the next journal access. This is
|
|
89
|
+
not a background deletion timer. **Erase local payload** removes those bytes
|
|
90
|
+
while retaining IDs for read-only status checks. It cannot cancel a backend
|
|
91
|
+
job or withdraw evidence already sent. Corrupt or unwritable journals fail
|
|
92
|
+
closed rather than sending without durable recovery.
|
|
93
|
+
|
|
94
|
+
## External processing and retention
|
|
95
|
+
|
|
96
|
+
Carthagent receives the exact selected request. External **JEV** receives the
|
|
97
|
+
revision, goal, change, selected checks/findings and server rubric, not the
|
|
98
|
+
project/outcome/run UUIDs. The flow does not upload a transcript, archive,
|
|
99
|
+
whole project, full review capture, or full check log. Included output tails
|
|
100
|
+
and authored text still require your privacy review.
|
|
101
|
+
|
|
102
|
+
Backend raw evidence is pending for up to 24 hours and erased on terminal
|
|
103
|
+
processing; outages can delay cleanup. Backend metadata is retained for
|
|
104
|
+
90 days. Provider policy applies. Immediate provider or backup deletion is
|
|
105
|
+
not promised. Local metadata is retained for recovery, with bounded storage
|
|
106
|
+
and expiry applied on journal access.
|
|
107
|
+
|
|
108
|
+
Assessment is based on submitted evidence, **not independent verification**.
|
|
109
|
+
There are **no coins, XP, distance, inventory, or other rewards** in this flow.
|
|
110
|
+
Editable personal quests remain separate from server daily assignments.
|
|
111
|
+
|
|
112
|
+
## Validation boundary
|
|
113
|
+
|
|
114
|
+
Offline contract, persistence, ownership, schema and UI-controller tests do not
|
|
115
|
+
prove production provider accuracy or a live native submission. The backend's
|
|
116
|
+
previous synthetic acceptance submissions were backend tests, not native TUI
|
|
117
|
+
acceptance. Live acceptance requires a dedicated owned QA account, normal
|
|
118
|
+
device sign-in and a separately authorized bounded provider-attempt allowance.
|
|
119
|
+
Do not silently spend that allowance or substitute a mock result for
|
|
120
|
+
production proof.
|
|
121
|
+
|
|
122
|
+
The navigator's real-component renderer tests run with Bun 1.4.2 through
|
|
123
|
+
`npm run test:native-navigation`. They use isolated, synthetic account summaries
|
|
124
|
+
and do not contact a provider. They cover focus ownership, modal guards,
|
|
125
|
+
compact mode, preserved selection/scroll, and read-only route selection. They
|
|
126
|
+
are not live authentication, grading, or full rebuilt-runtime acceptance.
|
|
127
|
+
|
|
128
|
+
Run the new boundary on the real pinned native host without external grading:
|
|
129
|
+
`node tools/test-native-daily-quests.mjs`. This checks registration, all six
|
|
130
|
+
declared authentication failures, and actual local source projection through
|
|
131
|
+
the host's output validator. Its constructed report is a schema fixture,
|
|
132
|
+
not evidence that a check ran or a substitute for live submission acceptance.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Owned OpenCode glyph PTY acceptance
|
|
2
|
+
|
|
3
|
+
`npm run test:native-glyph-pty` resolves the runtime through CTG's production
|
|
4
|
+
`resolveOpenCode` path, requires its identity to be CTG-owned, and verifies the
|
|
5
|
+
runtime provenance and executable digest before starting a TUI. The packaged
|
|
6
|
+
release manifest is the default trust root. To test an explicitly staged owned
|
|
7
|
+
artifact, provide both a staging root and an independently trusted release
|
|
8
|
+
manifest:
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
CTG_TEST_RUNTIME_ARTIFACT_ROOT=/path/to/owned-runtime \
|
|
12
|
+
CTG_TEST_RUNTIME_RELEASE_MANIFEST=/path/to/trusted-release.json \
|
|
13
|
+
CTG_GLYPH_ARTIFACT=/tmp/glyph-pty.json \
|
|
14
|
+
npm run test:native-glyph-pty
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The explicit artifact preflight runs before the production resolver can execute
|
|
18
|
+
it. Do not set `CTG_OPENCODE_BIN` or `CTG_TEST_RUNTIME_SHA256`; either would
|
|
19
|
+
bypass the acceptance trust chain. The runner launches two full TUI sessions in
|
|
20
|
+
real PTYs, with isolated temporary home/config/data/state/cache/database and
|
|
21
|
+
project directories: one with `CTG_TUI_GLYPHS=ascii`, one with
|
|
22
|
+
`CTG_TUI_GLYPHS=unicode`. It stages (but does not submit) the exact text
|
|
23
|
+
`CTG_GLYPH_PAYLOAD 漢字 café → • − …` in the composer. The paired PTY parser
|
|
24
|
+
tracks East Asian wide-cell width and combining marks locally to this probe; it
|
|
25
|
+
requires the entire exact ordered payload on the rendered prompt row. No model
|
|
26
|
+
provider is used.
|
|
27
|
+
|
|
28
|
+
Assertions cover one known static chrome mapping: the startup logo must be the
|
|
29
|
+
ASCII wordmark in ASCII mode and the block-art wordmark in Unicode mode. The
|
|
30
|
+
complete arbitrary Unicode user payload must independently match, in order, on
|
|
31
|
+
the rendered composer row. The composer row itself is excluded from startup-logo
|
|
32
|
+
classification. This is not coverage of prompt borders, ellipses, bullets,
|
|
33
|
+
separators, other dialogs, shell output, or tool-group disclosure.
|
|
34
|
+
The JSON artifact records the exact runtime version, compatibility version,
|
|
35
|
+
binary SHA-256, source/patch/lock provenance, production resolver identity,
|
|
36
|
+
mode-specific parsed screens, and captured-PTY digests. A PTY pass establishes
|
|
37
|
+
the exercised home composer frame only; it is not a claim that every TUI dialog,
|
|
38
|
+
shell result, tool group, or disclosure state was rendered.
|
|
39
|
+
|
|
40
|
+
Both spawned processes receive allowlisted environments. The Node resolver may
|
|
41
|
+
use `CTG_RUNTIME_GITHUB_TOKEN` while acquiring an unpublished draft runtime, but
|
|
42
|
+
the Python harness and each OpenCode PTY child receive only PATH/locale plus
|
|
43
|
+
fresh temporary profile paths and the explicit glyph mode. The optional release
|
|
44
|
+
token is never forwarded to the child TUI, model, or tools. No host account,
|
|
45
|
+
provider credential, network provider, performance, memory, or real clipboard
|
|
46
|
+
claim is part of this acceptance test.
|
|
47
|
+
|
|
48
|
+
The historical negative-control runtime with SHA-256
|
|
49
|
+
`85bb44a65e8c185f4f33d41507d29acc77f2db0cdcb0103a14476021c8e43794` predates the
|
|
50
|
+
glyph patch; it rendered the Unicode startup logo in ASCII mode and was rejected.
|
|
51
|
+
That artifact is no longer available here and its result is not a glyph pass.
|
|
52
|
+
Positive acceptance requires rerunning this harness against the final combined
|
|
53
|
+
runtime artifact and retaining its JSON report.
|
|
54
|
+
|
|
55
|
+
Pure Unicode cell-width, composer-payload, and child-environment helper code is
|
|
56
|
+
in `tools/native-glyph-helpers.py`, which has no OS-specific PTY imports. Its
|
|
57
|
+
unit tests run on supported platforms when Python is available (select an
|
|
58
|
+
interpreter with `PYTHON`). The actual PTY execution runner remains Unix-only;
|
|
59
|
+
this does not claim Windows PTY acceptance.
|