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,39 @@
|
|
|
1
|
+
# CTG-owned host-controls behavioral proof
|
|
2
|
+
|
|
3
|
+
`npm run test:owned-host-controls` is a focused Linux acceptance probe for the
|
|
4
|
+
owned OpenCode runtime. It uses a disposable host profile/database and an
|
|
5
|
+
offline loopback provider. Before invoking the product runtime resolver or
|
|
6
|
+
starting the host, it verifies the selected staging artifact's executable bytes
|
|
7
|
+
and embedded identity against `CTG_TEST_RUNTIME_RELEASE_MANIFEST`. The same
|
|
8
|
+
`runtimeOptions` object (including the explicit staging root and trusted
|
|
9
|
+
manifest path) is passed to both `resolveOpenCode()` and `runtimeIdentity()`.
|
|
10
|
+
The printed identity comes from the verified artifact and is checked against
|
|
11
|
+
the live server's `server.info()` response.
|
|
12
|
+
|
|
13
|
+
The proof establishes session-specific `ctg.autoCompaction` metadata survives
|
|
14
|
+
a service-process restart with the same database, then exercises actual
|
|
15
|
+
overflow handling: disabled auto-compaction fails without a summary request;
|
|
16
|
+
enabled auto-compaction sends a summary request and retries successfully. It
|
|
17
|
+
also runs two concurrent shell tool calls with the same command, checks each
|
|
18
|
+
session's successful durable tool result, and matches each provider tool-call ID
|
|
19
|
+
to the hook's exact `{sessionID, origin, callID, command}` event. The fixture
|
|
20
|
+
uses a Node-based shell command and is explicitly Linux-only; it makes no
|
|
21
|
+
cross-platform shell or runtime-selection claim.
|
|
22
|
+
|
|
23
|
+
This proof does **not** test clear behavior. In particular, it does not invoke
|
|
24
|
+
`session.revert.clear`: that endpoint clears staged revert state and is unrelated
|
|
25
|
+
to the TUI's visual `/clear` action. No claim about transcript presentation,
|
|
26
|
+
visual clearing, or the `/clear` key/action is established here. Stored-message
|
|
27
|
+
preservation under a visual clear remains unproven until that TUI behavior is
|
|
28
|
+
launched and observed directly.
|
|
29
|
+
|
|
30
|
+
An example invocation for a trusted local staging artifact is:
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
CTG_OWNED_OPENCODE_RUNTIME=/path/to/ctg-runtime \
|
|
34
|
+
CTG_TEST_RUNTIME_RELEASE_MANIFEST=/path/to/trusted-runtime-release.json \
|
|
35
|
+
npm run test:owned-host-controls
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The explicit staging artifact is preflighted and reported as such. This is not
|
|
39
|
+
evidence that the installed-package default resolver selected that artifact.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Generating the owned runtime release manifest
|
|
2
|
+
|
|
3
|
+
`tools/generate-owned-runtime-release.mjs` converts the five native build outputs into a candidate `lib/opencode/runtime-release.json` trust root. It does not build binaries, publish artifacts, update a release, or commit the candidate.
|
|
4
|
+
|
|
5
|
+
## Input directory contract
|
|
6
|
+
|
|
7
|
+
The assets directory must contain exactly these ten regular files (no extra files or subdirectories):
|
|
8
|
+
|
|
9
|
+
- `opencode-linux-x64.tar.gz` and `opencode-linux-x64.tar.gz.build.json`
|
|
10
|
+
- `opencode-linux-arm64.tar.gz` and `opencode-linux-arm64.tar.gz.build.json`
|
|
11
|
+
- `opencode-darwin-x64.tar.gz` and `opencode-darwin-x64.tar.gz.build.json`
|
|
12
|
+
- `opencode-darwin-arm64.tar.gz` and `opencode-darwin-arm64.tar.gz.build.json`
|
|
13
|
+
- `opencode-windows-x64.tar.gz` and `opencode-windows-x64.tar.gz.build.json`
|
|
14
|
+
|
|
15
|
+
Each archive must be a USTAR gzip artifact in the layout consumed by `lib/opencode/runtime-artifact.mjs`. Inspection of the native build output shows the expected runtime tree includes the root `LICENSE`, `SHA256SUMS`, `ctg-runtime.json`, `cli-<target>/package.json`, and `cli-<target>/bin/opencode` (or `.exe` on Windows), plus only their parent directories. The generator accepts this complete build output, validates target package name/version/OS/CPU, and rejects unexpected files/directories inside the runtime archive. The source-recipe archives are not runtime archives and are not passed to this generator. The adjacent build record is JSON with this exact identity contract (additional fields are tolerated):
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"version": 1,
|
|
20
|
+
"target": "linux-x64",
|
|
21
|
+
"platform": "linux",
|
|
22
|
+
"arch": "x64",
|
|
23
|
+
"sourceRevision": "<40-character pinned source commit>",
|
|
24
|
+
"patchSha256": "<64-character digest>",
|
|
25
|
+
"lockSha256": "<64-character digest>",
|
|
26
|
+
"compatibilityVersion": "2.0.32",
|
|
27
|
+
"runtimeVersion": "0.0.0-ctg.2.0.32",
|
|
28
|
+
"executableSha256": "<64-character digest of the built executable>"
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The record is not trusted by itself. The generator takes the expected source, patch, lock, compatibility, and runtime identity from the reviewed prebuild recipe; verifies the patch bytes; computes each archive digest from the exact archive bytes; then supplies the record's executable digest and pinned provenance to the approved runtime acquisition API. That API parses the USTAR archive, checks embedded provenance, checks `SHA256SUMS`, and hashes the actual extracted executable. Any mismatch aborts generation.
|
|
33
|
+
|
|
34
|
+
The generator emits the agreed outer schema with exactly five asset entries. It writes a new candidate file atomically and refuses to overwrite an existing candidate; review or remove a previous candidate explicitly before another generation. The supplied `releaseVersion` is the planned canonical semantic version; the final tagged-package gate must compare it with the final package's version.
|
|
35
|
+
|
|
36
|
+
Example invocation after downloading the five archives and records from the native build jobs:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
node tools/generate-owned-runtime-release.mjs 1.2.3 ./runtime-assets .
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
This writes `./runtime-release.json.candidate` next to `./runtime-assets`. The asset producer owns wiring the output into its own CI handoff. Do not check in dummy/sample digests as a production manifest.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Owned TUI `/clear` behavioral proof
|
|
2
|
+
|
|
3
|
+
`tools/test-owned-visual-clear.py` runs a disposable Linux/POSIX PTY against an
|
|
4
|
+
explicitly selected, trusted-preflighted CTG-owned staging artifact and an
|
|
5
|
+
offline loopback provider. It seeds two durable sessions, invokes the native
|
|
6
|
+
TUI `/clear` command through slash autocomplete and Enter, and verifies the
|
|
7
|
+
parsed terminal screen, durable conversational messages, continued prompting,
|
|
8
|
+
an unaffected neighboring session, and restoration of session A's presentation
|
|
9
|
+
cutoff after reopening it. A same-length, uncleared control session must show
|
|
10
|
+
its old marker and follow-up marker together at the same PTY dimensions and
|
|
11
|
+
initial viewport, ruling out ordinary scrolling as the explanation. The proof
|
|
12
|
+
also reads the TUI's isolated `transcript-presentation.json` state and checks
|
|
13
|
+
the exact cutoff message ID before and after reopening.
|
|
14
|
+
|
|
15
|
+
The proof is intentionally narrow: it demonstrates visual transcript clearing
|
|
16
|
+
for the tested owned staging artifact and no deletion of conversational
|
|
17
|
+
messages. It does not test GUI/compositor presentation or the unrelated
|
|
18
|
+
`session.revert.clear` endpoint. The PTY runner uses explicit child-environment
|
|
19
|
+
allowlists, so it does not forward ambient credentials (including any case
|
|
20
|
+
variant of `CTG_RUNTIME_GITHUB_TOKEN`) or read/print their values. Unit tests
|
|
21
|
+
exercise rejection with fake values only. The runner uses the production
|
|
22
|
+
`runtimeEnvironment()` profile builder for the isolated TUI, then restricts
|
|
23
|
+
every spawned process to a small explicit environment allowlist. The fixture,
|
|
24
|
+
preflight and API bridge receive only allowlisted path/locale inputs plus
|
|
25
|
+
synthetic local fixture credentials; no ambient credential, profile, agent,
|
|
26
|
+
or Node preload variables are inherited. Unit tests inject fake ambient
|
|
27
|
+
credential names and assert they are not forwarded.
|
|
28
|
+
|
|
29
|
+
Run with a trusted release manifest and selected runtime artifact:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
python3 tools/test-owned-visual-clear.py \
|
|
33
|
+
--binary /path/to/owned-root/cli-linux-x64/bin/opencode \
|
|
34
|
+
--owned-root /path/to/owned-root \
|
|
35
|
+
--release-manifest /path/to/trusted/runtime-release.json
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The helper verifies trusted release metadata, artifact provenance, exact
|
|
39
|
+
runtime version, and executable digest before starting OpenCode. Compatibility
|
|
40
|
+
and runtime versions are reported separately.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
--- a/packages/tui/test/glyphs.test.ts
|
|
2
|
+
+++ b/packages/tui/test/glyphs.test.ts
|
|
3
|
+
@@ -1,4 +1,5 @@
|
|
4
|
+
import { describe, expect, test } from "bun:test"
|
|
5
|
+
+import { fileURLToPath } from "node:url"
|
|
6
|
+
|
|
7
|
+
describe("host chrome glyph compatibility", () => {
|
|
8
|
+
test("maps known chrome symbols only in ASCII mode", async () => {
|
|
9
|
+
@@ -36,9 +37,7 @@
|
|
10
|
+
|
|
11
|
+
test("selects ASCII spinner and border chrome without changing Unicode defaults", async () => {
|
|
12
|
+
process.env.CTG_TUI_GLYPHS = "ascii"
|
|
13
|
+
- const { SPINNER_FRAMES } = await import("../src/component/spinner-frames")
|
|
14
|
+
const { SplitBorder, EmptyBorder } = await import("../src/ui/border")
|
|
15
|
+
- expect(SPINNER_FRAMES).toEqual(["-", "\\", "|", "/"])
|
|
16
|
+
expect(SplitBorder.customBorderChars).toEqual({
|
|
17
|
+
topLeft: "+", bottomLeft: "+", vertical: "|", topRight: "+", bottomRight: "+",
|
|
18
|
+
horizontal: "-", bottomT: "+", topT: "+", cross: "+", leftT: "+", rightT: "+",
|
|
19
|
+
@@ -47,6 +46,31 @@
|
|
20
|
+
process.env.CTG_TUI_GLYPHS = "unicode"
|
|
21
|
+
// Border characters are resolved at render time, so explicit Unicode remains intact.
|
|
22
|
+
expect(SplitBorder.customBorderChars).toEqual({ ...EmptyBorder, vertical: "┃" })
|
|
23
|
+
+
|
|
24
|
+
+ const entry = fileURLToPath(new URL("../src/component/spinner-frames.ts", import.meta.url))
|
|
25
|
+
+ for (const [mode, expected] of [
|
|
26
|
+
+ ["ascii", ["-", "\\", "|", "/"]],
|
|
27
|
+
+ ["unicode", ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"]],
|
|
28
|
+
+ ] as const) {
|
|
29
|
+
+ const child = Bun.spawnSync(
|
|
30
|
+
+ [
|
|
31
|
+
+ process.execPath,
|
|
32
|
+
+ "-e",
|
|
33
|
+
+ [
|
|
34
|
+
+ 'import assert from "node:assert/strict"',
|
|
35
|
+
+ `const { SPINNER_FRAMES } = await import(${JSON.stringify(entry)})`,
|
|
36
|
+
+ `assert.deepEqual(SPINNER_FRAMES, ${JSON.stringify(expected)})`,
|
|
37
|
+
+ ].join("\n"),
|
|
38
|
+
+ ],
|
|
39
|
+
+ {
|
|
40
|
+
+ cwd: fileURLToPath(new URL("..", import.meta.url)),
|
|
41
|
+
+ env: { ...process.env, CTG_TUI_GLYPHS: mode },
|
|
42
|
+
+ stdout: "pipe",
|
|
43
|
+
+ stderr: "pipe",
|
|
44
|
+
+ },
|
|
45
|
+
+ )
|
|
46
|
+
+ expect({ mode, exit: child.exitCode, stderr: child.stderr.toString() }).toEqual({ mode, exit: 0, stderr: "" })
|
|
47
|
+
+ }
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
test("keeps Unicode by default and supports explicit Unicode", async () => {
|