@xingular/harness 1.0.0 → 1.2.0
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/CHANGELOG.md +46 -5
- package/README.md +75 -21
- package/dist/cli.js +17421 -8711
- package/dist/sdk/accounts/accounts.d.ts +27 -3
- package/dist/sdk/accounts/accounts.js +78 -24
- package/dist/sdk/accounts/secrets.d.ts +12 -0
- package/dist/sdk/accounts/secrets.js +114 -7
- package/dist/sdk/accounts/store.d.ts +26 -1
- package/dist/sdk/accounts/store.js +1 -1
- package/dist/sdk/agents/builtin.d.ts +2 -0
- package/dist/sdk/agents/builtin.js +48 -0
- package/dist/sdk/agents/narrow.d.ts +13 -0
- package/dist/sdk/agents/narrow.js +29 -0
- package/dist/sdk/agents/planResearch.d.ts +5 -0
- package/dist/sdk/agents/planResearch.js +19 -0
- package/dist/sdk/agents/profiles.d.ts +81 -0
- package/dist/sdk/agents/profiles.js +226 -0
- package/dist/sdk/annotations/bridge.d.ts +42 -0
- package/dist/sdk/annotations/bridge.js +264 -0
- package/dist/sdk/annotations/capture.d.ts +116 -0
- package/dist/sdk/annotations/capture.js +308 -0
- package/dist/sdk/annotations/delivery.d.ts +72 -0
- package/dist/sdk/annotations/delivery.js +130 -0
- package/dist/sdk/annotations/inspect.d.ts +10 -0
- package/dist/sdk/annotations/inspect.js +33 -0
- package/dist/sdk/annotations/isolated.d.ts +6 -0
- package/dist/sdk/annotations/isolated.js +51 -0
- package/dist/sdk/annotations/pageScript.d.ts +28 -0
- package/dist/sdk/annotations/pageScript.js +871 -0
- package/dist/sdk/annotations/part.d.ts +10 -0
- package/dist/sdk/annotations/part.js +155 -0
- package/dist/sdk/annotations/queue.d.ts +4 -0
- package/dist/sdk/annotations/queue.js +40 -0
- package/dist/sdk/annotations/serverMethods.d.ts +3 -0
- package/dist/sdk/annotations/serverMethods.js +62 -0
- package/dist/sdk/annotations/store.d.ts +167 -0
- package/dist/sdk/annotations/store.js +394 -0
- package/dist/sdk/browser/backend.d.ts +16 -0
- package/dist/sdk/browser/backend.js +17 -0
- package/dist/sdk/browser/contracts.d.ts +19 -0
- package/dist/sdk/browser/contracts.js +116 -0
- package/dist/sdk/browser/index.d.ts +14 -3
- package/dist/sdk/browser/index.js +11 -4
- package/dist/sdk/browser/serverMethods.d.ts +3 -0
- package/dist/sdk/browser/serverMethods.js +7 -0
- package/dist/sdk/browser/session.d.ts +1 -0
- package/dist/sdk/browser/session.js +45 -9
- package/dist/sdk/browser/tools.d.ts +1 -4
- package/dist/sdk/browser/tools.js +14 -91
- package/dist/sdk/cli.js +24 -15
- package/dist/sdk/commands/list.d.ts +3 -0
- package/dist/sdk/commands/list.js +75 -0
- package/dist/sdk/commands/registry.d.ts +250 -0
- package/dist/sdk/commands/registry.js +47 -0
- package/dist/sdk/commands/routes.d.ts +16 -0
- package/dist/sdk/commands/routes.js +33 -0
- package/dist/sdk/core/bus.js +1 -1
- package/dist/sdk/core/commandBudget.d.ts +23 -0
- package/dist/sdk/core/commandBudget.js +57 -0
- package/dist/sdk/core/env.d.ts +1 -1
- package/dist/sdk/core/env.js +1 -1
- package/dist/sdk/core/index.js +17 -1
- package/dist/sdk/core/interactiveProfile.d.ts +46 -0
- package/dist/sdk/core/interactiveProfile.js +143 -0
- package/dist/sdk/core/workspace.d.ts +13 -0
- package/dist/sdk/core/workspace.js +88 -0
- package/dist/sdk/core/workspaceBashTool.d.ts +4 -0
- package/dist/sdk/core/workspaceBashTool.js +36 -0
- package/dist/sdk/core/workspaceSandbox.d.ts +31 -0
- package/dist/sdk/core/workspaceSandbox.js +320 -0
- package/dist/sdk/core/workspaceWriteOperations.d.ts +22 -0
- package/dist/sdk/core/workspaceWriteOperations.js +206 -0
- package/dist/sdk/doctor/serverMethods.d.ts +3 -0
- package/dist/sdk/doctor/serverMethods.js +8 -0
- package/dist/sdk/doctor/types.d.ts +2 -2
- package/dist/sdk/harness.d.ts +22 -0
- package/dist/sdk/harness.js +84 -5
- package/dist/sdk/history/recall.js +8 -8
- package/dist/sdk/history/serverMethods.d.ts +3 -0
- package/dist/sdk/history/serverMethods.js +8 -0
- package/dist/sdk/hub/cli.d.ts +1 -1
- package/dist/sdk/hub/cli.js +1 -1
- package/dist/sdk/hub/schema.d.ts +1 -1
- package/dist/sdk/hub/serverMethods.d.ts +3 -0
- package/dist/sdk/hub/serverMethods.js +11 -0
- package/dist/sdk/index.d.ts +16 -1
- package/dist/sdk/index.js +10 -0
- package/dist/sdk/mcp/connections.js +14 -7
- package/dist/sdk/mcp/serverMethods.d.ts +3 -0
- package/dist/sdk/mcp/serverMethods.js +22 -0
- package/dist/sdk/pi/runtime.d.ts +2 -1
- package/dist/sdk/pi/runtime.js +2 -2
- package/dist/sdk/plugins/builtin.d.ts +1 -0
- package/dist/sdk/plugins/builtin.js +145 -33
- package/dist/sdk/plugins/builtinRegistry.d.ts +60 -0
- package/dist/sdk/plugins/builtinRegistry.js +71 -0
- package/dist/sdk/plugins/catalogue.js +2 -1
- package/dist/sdk/plugins/cli.d.ts +1 -1
- package/dist/sdk/plugins/cli.js +4 -3
- package/dist/sdk/plugins/commandPrefix.d.ts +8 -0
- package/dist/sdk/plugins/commandPrefix.js +21 -0
- package/dist/sdk/plugins/firstParty.d.ts +1 -1
- package/dist/sdk/plugins/firstParty.js +8 -2
- package/dist/sdk/plugins/inventory.js +4 -3
- package/dist/sdk/plugins/manifest.d.ts +2 -0
- package/dist/sdk/plugins/manifest.js +2 -1
- package/dist/sdk/plugins/surfaces.d.ts +5 -0
- package/dist/sdk/plugins/surfaces.js +11 -0
- package/dist/sdk/plugins/types.d.ts +15 -0
- package/dist/sdk/prompt/compile.d.ts +19 -2
- package/dist/sdk/prompt/compile.js +79 -26
- package/dist/sdk/prompt/standard.d.ts +17 -0
- package/dist/sdk/prompt/standard.js +21 -0
- package/dist/sdk/refine/cli.d.ts +1 -1
- package/dist/sdk/refine/cli.js +2 -2
- package/dist/sdk/refine/serverMethods.d.ts +3 -0
- package/dist/sdk/refine/serverMethods.js +20 -0
- package/dist/sdk/server/methods.js +27 -86
- package/dist/sdk/server/params.d.ts +4 -0
- package/dist/sdk/server/params.js +11 -0
- package/dist/sdk/server/remote.js +36 -11
- package/dist/sdk/sessions/compactionCheckpoint.d.ts +11 -0
- package/dist/sdk/sessions/compactionCheckpoint.js +79 -0
- package/dist/sdk/sessions/continuation.d.ts +3 -0
- package/dist/sdk/sessions/continuation.js +5 -1
- package/dist/sdk/sessions/contracts.d.ts +185 -0
- package/dist/sdk/sessions/contracts.js +101 -4
- package/dist/sdk/sessions/control.d.ts +72 -0
- package/dist/sdk/sessions/control.js +158 -0
- package/dist/sdk/sessions/initialBash.d.ts +7 -0
- package/dist/sdk/sessions/initialBash.js +7 -0
- package/dist/sdk/sessions/planMode.d.ts +18 -4
- package/dist/sdk/sessions/planMode.js +82 -16
- package/dist/sdk/sessions/reasoningSummaries.d.ts +2 -2
- package/dist/sdk/sessions/reasoningSummaries.js +3 -3
- package/dist/sdk/sessions/registry.d.ts +2 -1
- package/dist/sdk/sessions/registry.js +6 -3
- package/dist/sdk/sessions/runIndex.js +7 -7
- package/dist/sdk/sessions/runStore.d.ts +14 -0
- package/dist/sdk/sessions/runStore.js +38 -1
- package/dist/sdk/sessions/runner.d.ts +40 -2
- package/dist/sdk/sessions/runner.js +163 -15
- package/dist/sdk/sessions/sessions.d.ts +40 -8
- package/dist/sdk/sessions/sessions.js +279 -27
- package/dist/sdk/sessions/sideQuestionServerMethods.d.ts +3 -0
- package/dist/sdk/sessions/sideQuestionServerMethods.js +19 -0
- package/dist/sdk/sessions/sideQuestions.d.ts +66 -0
- package/dist/sdk/sessions/sideQuestions.js +290 -0
- package/dist/sdk/sessions/subagentServerMethods.d.ts +3 -0
- package/dist/sdk/sessions/subagentServerMethods.js +41 -0
- package/dist/sdk/sessions/subagentService.d.ts +22 -2
- package/dist/sdk/sessions/subagentService.js +93 -16
- package/dist/sdk/sessions/subagents.d.ts +9 -1
- package/dist/sdk/sessions/subagents.js +19 -0
- package/dist/sdk/sessions/workSlice.d.ts +103 -0
- package/dist/sdk/sessions/workSlice.js +297 -0
- package/dist/sdk/sessions/workspaceBoundary.d.ts +15 -0
- package/dist/sdk/sessions/workspaceBoundary.js +46 -0
- package/dist/sdk/terminal/browser.d.ts +62 -0
- package/dist/sdk/terminal/browser.js +41 -0
- package/dist/sdk/terminal/browserControl.d.ts +29 -0
- package/dist/sdk/terminal/browserControl.js +187 -0
- package/dist/sdk/terminal/commandHelp.d.ts +17 -0
- package/dist/sdk/terminal/commandHelp.js +20 -0
- package/dist/sdk/terminal/controller.d.ts +15 -1
- package/dist/sdk/terminal/controller.js +67 -8
- package/dist/sdk/terminal/opentui/subagentsWidget.d.ts +28 -0
- package/dist/sdk/terminal/opentui/subagentsWidget.js +52 -0
- package/dist/sdk/terminal/opentui/theme.d.ts +43 -0
- package/dist/sdk/terminal/opentui/theme.js +87 -0
- package/dist/sdk/terminal/piExtension.d.ts +6 -1
- package/dist/sdk/terminal/piExtension.js +169 -84
- package/dist/sdk/terminal/socket.d.ts +6 -3
- package/dist/sdk/terminal/socket.js +40 -9
- package/dist/sdk/terminal/standalone.d.ts +9 -0
- package/dist/sdk/terminal/standalone.js +118 -19
- package/dist/sdk/terminal/subagentMonitor.d.ts +47 -0
- package/dist/sdk/terminal/subagentMonitor.js +152 -0
- package/dist/sdk/terminal/terminals.d.ts +60 -7
- package/dist/sdk/terminal/terminals.js +598 -47
- package/dist/sdk/terminal/trajectory.js +2 -2
- package/dist/sdk/terminal/tui/annotateCommand.d.ts +3 -0
- package/dist/sdk/terminal/tui/annotateCommand.js +22 -0
- package/dist/sdk/terminal/tui/commandPages.d.ts +7 -1
- package/dist/sdk/terminal/tui/commandPages.js +57 -6
- package/dist/sdk/terminal/tui/commands.d.ts +10 -4
- package/dist/sdk/terminal/tui/commands.js +269 -65
- package/dist/sdk/terminal/tui/dialogGeometry.d.ts +2 -2
- package/dist/sdk/terminal/tui/dialogGeometry.js +4 -2
- package/dist/sdk/terminal/tui/dialogs.d.ts +6 -1
- package/dist/sdk/terminal/tui/dialogs.js +9 -2
- package/dist/sdk/terminal/tui/list.d.ts +14 -1
- package/dist/sdk/terminal/tui/list.js +96 -14
- package/dist/sdk/terminal/tui/modelPicker.js +1 -6
- package/dist/sdk/terminal/tui/page.d.ts +3 -0
- package/dist/sdk/terminal/tui/pageOverlay.js +27 -7
- package/dist/sdk/terminal/tui/pages/accountsPage.d.ts +26 -4
- package/dist/sdk/terminal/tui/pages/accountsPage.js +264 -36
- package/dist/sdk/terminal/tui/pages/agentsPage.d.ts +74 -0
- package/dist/sdk/terminal/tui/pages/agentsPage.js +190 -0
- package/dist/sdk/terminal/tui/pages/annotatePage.d.ts +94 -0
- package/dist/sdk/terminal/tui/pages/annotatePage.js +341 -0
- package/dist/sdk/terminal/tui/pages/browserPage.d.ts +87 -0
- package/dist/sdk/terminal/tui/pages/browserPage.js +738 -0
- package/dist/sdk/terminal/tui/pages/doctorPage.d.ts +2 -0
- package/dist/sdk/terminal/tui/pages/doctorPage.js +103 -15
- package/dist/sdk/terminal/tui/pages/notesPage.d.ts +75 -0
- package/dist/sdk/terminal/tui/pages/notesPage.js +201 -0
- package/dist/sdk/terminal/tui/pages/pluginsPage.d.ts +0 -5
- package/dist/sdk/terminal/tui/pages/pluginsPage.js +9 -3
- package/dist/sdk/terminal/tui/pages/settingsPage.d.ts +8 -0
- package/dist/sdk/terminal/tui/pages/settingsPage.js +16 -1
- package/dist/sdk/terminal/tui/pages/subagentsPage.d.ts +24 -0
- package/dist/sdk/terminal/tui/pages/subagentsPage.js +152 -0
- package/dist/sdk/terminal/tui/pages/trajectoryPage.d.ts +12 -5
- package/dist/sdk/terminal/tui/pages/trajectoryPage.js +156 -83
- package/dist/sdk/terminal/tui/pages/usagePage.d.ts +43 -0
- package/dist/sdk/terminal/tui/pages/usagePage.js +370 -0
- package/dist/sdk/terminal/tui/pages/worktreesPage.d.ts +72 -0
- package/dist/sdk/terminal/tui/pages/worktreesPage.js +203 -0
- package/dist/sdk/terminal/tui/piAdapter.d.ts +1 -2
- package/dist/sdk/terminal/tui/piAdapter.js +3 -5
- package/dist/sdk/terminal/tui/planMode.d.ts +1 -1
- package/dist/sdk/terminal/tui/planMode.js +1 -1
- package/dist/sdk/terminal/tui/pluginCommands.d.ts +16 -0
- package/dist/sdk/terminal/tui/pluginCommands.js +31 -0
- package/dist/sdk/terminal/tui/questions.d.ts +2 -0
- package/dist/sdk/terminal/tui/runtime.js +27 -5
- package/dist/sdk/terminal/tui/sessionPicker.d.ts +40 -0
- package/dist/sdk/terminal/tui/sessionPicker.js +141 -0
- package/dist/sdk/terminal/tui/settingsModel.d.ts +2 -0
- package/dist/sdk/terminal/tui/settingsModel.js +32 -2
- package/dist/sdk/terminal/tui/sideQuestion.d.ts +26 -26
- package/dist/sdk/terminal/tui/sideQuestion.js +131 -98
- package/dist/sdk/terminal/tui/ui.d.ts +2 -0
- package/dist/sdk/terminal/tui/ui.js +1 -0
- package/dist/sdk/tools/askUser.js +26 -8
- package/dist/sdk/tools/checklist.js +3 -2
- package/dist/sdk/tools/checkpoint.d.ts +27 -0
- package/dist/sdk/tools/checkpoint.js +154 -0
- package/dist/sdk/tools/getCapabilities.d.ts +31 -0
- package/dist/sdk/tools/getCapabilities.js +34 -0
- package/dist/sdk/tools/harnessTools.d.ts +2 -0
- package/dist/sdk/tools/harnessTools.js +1 -1
- package/dist/sdk/tools/spawnSubagent.js +14 -4
- package/dist/sdk/usage/analytics.d.ts +20 -0
- package/dist/sdk/usage/analytics.js +151 -0
- package/dist/sdk/usage/ledger.d.ts +38 -0
- package/dist/sdk/usage/ledger.js +142 -0
- package/dist/sdk/usage/limits/adapters.d.ts +11 -0
- package/dist/sdk/usage/limits/adapters.js +349 -0
- package/dist/sdk/usage/limits/capture.d.ts +8 -0
- package/dist/sdk/usage/limits/capture.js +47 -0
- package/dist/sdk/usage/limits/http.d.ts +12 -0
- package/dist/sdk/usage/limits/http.js +51 -0
- package/dist/sdk/usage/limits/normalize.d.ts +15 -0
- package/dist/sdk/usage/limits/normalize.js +211 -0
- package/dist/sdk/usage/limits/service.d.ts +30 -0
- package/dist/sdk/usage/limits/service.js +176 -0
- package/dist/sdk/usage/limits/types.d.ts +65 -0
- package/dist/sdk/usage/limits/types.js +1 -0
- package/dist/sdk/usage/serverMethods.d.ts +3 -0
- package/dist/sdk/usage/serverMethods.js +22 -0
- package/dist/sdk/usage/service.d.ts +32 -0
- package/dist/sdk/usage/service.js +66 -0
- package/dist/sdk/usage/settings.d.ts +7 -0
- package/dist/sdk/usage/settings.js +28 -0
- package/dist/sdk/usage/types.d.ts +60 -0
- package/dist/sdk/usage/types.js +4 -0
- package/dist/sdk/web/part.d.ts +10 -0
- package/dist/sdk/web/part.js +6 -0
- package/dist/sdk/web/serverMethods.d.ts +3 -0
- package/dist/sdk/web/serverMethods.js +7 -0
- package/dist/sdk/wiki/serverMethods.d.ts +3 -0
- package/dist/sdk/wiki/serverMethods.js +26 -0
- package/dist/sdk/worktrees/cli.d.ts +11 -0
- package/dist/sdk/worktrees/cli.js +146 -0
- package/dist/sdk/worktrees/copy.d.ts +9 -0
- package/dist/sdk/worktrees/copy.js +111 -0
- package/dist/sdk/worktrees/git.d.ts +16 -0
- package/dist/sdk/worktrees/git.js +81 -0
- package/dist/sdk/worktrees/serverMethods.d.ts +3 -0
- package/dist/sdk/worktrees/serverMethods.js +30 -0
- package/dist/sdk/worktrees/service.d.ts +73 -0
- package/dist/sdk/worktrees/service.js +483 -0
- package/dist/sdk/worktrees/setup.d.ts +23 -0
- package/dist/sdk/worktrees/setup.js +65 -0
- package/dist/sdk/worktrees/types.d.ts +91 -0
- package/dist/sdk/worktrees/types.js +1 -0
- package/dist/sdk/world/cli.d.ts +2 -2
- package/dist/sdk/world/cli.js +6 -6
- package/dist/sdk/world/world.d.ts +3 -1
- package/dist/sdk/world/world.js +8 -9
- package/dist/terminal-opentui.js +16456 -5966
- package/dist/terminal-pi.js +1579 -573
- package/docs/README.md +22 -2
- package/docs/architecture/00-overview.md +28 -16
- package/docs/architecture/02-sessions-and-runs.md +184 -25
- package/docs/architecture/03-variants.md +10 -2
- package/docs/architecture/04-prompt.md +65 -7
- package/docs/architecture/06-plugins-and-capabilities.md +57 -4
- package/docs/architecture/07-tools-and-gate.md +112 -17
- package/docs/architecture/08-memory-and-history.md +4 -2
- package/docs/architecture/09-accounts-and-connectors.md +39 -1
- package/docs/architecture/10-server-protocol.md +168 -4
- package/docs/architecture/11-terminal.md +251 -8
- package/docs/architecture/12-storage.md +45 -3
- package/docs/architecture/13-world-tools.md +49 -6
- package/docs/architecture/14-surfaces-and-parity.md +136 -0
- package/docs/architecture/README.md +17 -4
- package/docs/architecture/proposals/PROP-0006-run-checklist.md +4 -2
- package/docs/architecture/proposals/PROP-0013-resource-browser.md +58 -0
- package/docs/architecture/proposals/PROP-0014-fullscreen-browser-tabs.md +58 -0
- package/docs/architecture/proposals/PROP-0015-one-capability-surface.md +88 -0
- package/docs/architecture/proposals/PROP-0016-managed-worktrees.md +156 -0
- package/docs/architecture/proposals/PROP-0017-page-annotations.md +131 -0
- package/docs/architecture/proposals/PROP-0018-annotation-queue-and-app-targets.md +179 -0
- package/docs/architecture/proposals/PROP-0019-contextual-side-questions.md +122 -0
- package/docs/architecture/proposals/PROP-0020-builtin-feature-plugins.md +105 -0
- package/docs/architecture/proposals/PROP-0021-command-namespaces-and-duplicates.md +99 -0
- package/docs/architecture/proposals/PROP-0022-plan-only-questions.md +102 -0
- package/docs/architecture/proposals/PROP-0023-xagent-cli-name.md +61 -0
- package/docs/architecture/proposals/PROP-0024-question-sketch-previews.md +130 -0
- package/docs/architecture/proposals/PROP-0025-contextual-question-wireframes.md +49 -0
- package/docs/architecture/proposals/PROP-0026-connected-sketch-display.md +94 -0
- package/docs/architecture/proposals/PROP-0027-xingular-agent-product-identity.md +60 -0
- package/docs/architecture/proposals/PROP-0028-normalize-question-wireframes.md +55 -0
- package/docs/architecture/proposals/PROP-0029-agent-profiles.md +124 -0
- package/docs/architecture/proposals/PROP-0030-subagent-title.md +86 -0
- package/docs/architecture/proposals/PROP-0031-plugin-command-owner-namespaces.md +54 -0
- package/docs/architecture/proposals/PROP-0032-planning-quality.md +196 -0
- package/docs/architecture/proposals/PROP-0033-compaction-plan-checkpoints.md +75 -0
- package/docs/architecture/proposals/PROP-0034-conversation-fast-mode.md +120 -0
- package/docs/architecture/proposals/PROP-0035-retain-subagent-status.md +47 -0
- package/docs/architecture/proposals/PROP-0036-first-class-harness-commands.md +59 -0
- package/docs/architecture/proposals/PROP-0037-workspace-write-boundary.md +63 -0
- package/docs/architecture/proposals/PROP-0038-annotate-open-shadow-roots.md +73 -0
- package/docs/architecture/proposals/PROP-0039-workspace-boundary-hardening.md +139 -0
- package/docs/architecture/proposals/PROP-0040-one-launch-path.md +87 -0
- package/docs/architecture/proposals/PROP-0041-bounded-work-slices.md +247 -0
- package/docs/architecture/proposals/PROP-0042-usage-and-provider-limits.md +127 -0
- package/docs/architecture/proposals/PROP-0043-read-only-plan-bash.md +74 -0
- package/docs/architecture/proposals/README.md +39 -0
- package/docs/decisions/ADR-0001-owned-terminal.md +1 -1
- package/docs/decisions/ADR-0009-xharness-command.md +6 -5
- package/docs/decisions/ADR-0014-public-release-baseline.md +3 -2
- package/docs/decisions/ADR-0015-resource-browser.md +28 -0
- package/docs/decisions/ADR-0016-fullscreen-browser-tabs.md +31 -0
- package/docs/decisions/ADR-0017-one-capability-surface.md +34 -0
- package/docs/decisions/ADR-0018-builtin-feature-plugins.md +35 -0
- package/docs/decisions/ADR-0019-managed-git-worktrees.md +31 -0
- package/docs/decisions/ADR-0020-page-annotations.md +37 -0
- package/docs/decisions/ADR-0021-required-command-namespaces.md +40 -0
- package/docs/decisions/ADR-0022-plan-only-question-tools.md +34 -0
- package/docs/decisions/ADR-0023-contextual-side-question-runs.md +35 -0
- package/docs/decisions/ADR-0024-xagent-command.md +40 -0
- package/docs/decisions/ADR-0025-question-choice-sketches.md +49 -0
- package/docs/decisions/ADR-0026-contextual-question-wireframes.md +58 -0
- package/docs/decisions/ADR-0027-connected-sketch-display.md +60 -0
- package/docs/decisions/ADR-0028-xingular-agent-product-identity.md +56 -0
- package/docs/decisions/ADR-0029-normalized-question-wireframe-borders.md +33 -0
- package/docs/decisions/ADR-0030-agent-profiles.md +43 -0
- package/docs/decisions/ADR-0031-plugin-command-owner-namespaces.md +37 -0
- package/docs/decisions/ADR-0032-compaction-run-checkpoints.md +33 -0
- package/docs/decisions/ADR-0033-plan-mode-research-delegation.md +47 -0
- package/docs/decisions/ADR-0034-first-class-harness-terminal-commands.md +25 -0
- package/docs/decisions/ADR-0035-one-launch-path.md +40 -0
- package/docs/decisions/ADR-0036-workspace-write-operation-boundary.md +54 -0
- package/docs/decisions/ADR-0037-usage-ledger-and-provider-limits.md +44 -0
- package/docs/decisions/ADR-0038-plan-bash-os-read-only.md +29 -0
- package/docs/doctor.md +10 -4
- package/docs/experiments/EXP-0003-performance-audit/data/session-runtime-replication.json +420 -0
- package/docs/experiments/EXP-0003-performance-audit/data/session-runtime.json +420 -0
- package/docs/experiments/EXP-0003-performance-audit/data/terminal-compact.json +376 -0
- package/docs/experiments/EXP-0003-performance-audit/data/terminal-history.json +422 -0
- package/docs/experiments/EXP-0003-performance-audit/data/terminal-question.json +95 -0
- package/docs/experiments/EXP-0003-performance-audit/data/terminal-wide.json +1036 -0
- package/docs/experiments/EXP-0003-performance-audit/plan.md +109 -0
- package/docs/experiments/EXP-0003-performance-audit/results.md +151 -0
- package/docs/features/README.md +26 -0
- package/docs/features/interfaces/README.md +1 -1
- package/docs/future-work.md +48 -0
- package/docs/handoff-2026-10-25-app-parity-and-solo-tabs.md +202 -0
- package/docs/parity.md +134 -0
- package/docs/releases/1.0.0.md +2 -2
- package/docs/releases/1.1.1.md +28 -0
- package/docs/releases/1.2.0.md +49 -0
- package/docs/releases/4.0.0.md +47 -0
- package/docs/releases/README.md +37 -27
- package/docs/study/00-index.md +8 -0
- package/docs/study/STUDY-0003-long-horizon-runs.md +210 -0
- package/docs/study/autonomous-engineering-sources.md +277 -0
- package/docs/study/autonomy-sources.md +147 -0
- package/docs/study/proactive-autonomy.md +408 -0
- package/docs/study/tui-resource-browser.md +78 -0
- package/docs/terminal-tui.md +386 -113
- package/package.json +6 -5
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: PROP-0041
|
|
3
|
+
title: Bounded work slices, a durable checkpoint, and a stall guard for long replies
|
|
4
|
+
status: Implemented; terminal card, App presentation and /slices open
|
|
5
|
+
created: 2026-10-26
|
|
6
|
+
updated: 2026-10-26
|
|
7
|
+
affects: [INV-RUN-2, INV-RUN-3, INV-RUN-4, INV-RUN-12, INV-PRM-1, INV-PRM-2, INV-PRM-4, INV-PRM-5, INV-PRM-10, INV-GATE-2, INV-STO-3, INV-PAR-1, INV-PAR-2, 02-sessions-and-runs.md, 04-prompt.md, 07-tools-and-gate.md, 10-server-protocol.md, 11-terminal.md, 12-storage.md, 14-surfaces-and-parity.md, parity.md]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# PROP-0041: Bounded work slices, a durable checkpoint, and a stall guard
|
|
11
|
+
|
|
12
|
+
## Problem
|
|
13
|
+
|
|
14
|
+
A single reply can run for hours. Two measured sessions (STUDY-0003) ran 114 and 75 minutes in
|
|
15
|
+
**one** reply: 448 and 274 tool calls, 5 and 2 context compactions at ~256k tokens, 42 repeated
|
|
16
|
+
identical calls, and 41 minutes in three Playwright runs — 25 of them on two timeouts. The first had
|
|
17
|
+
addressed the person with **no text at all** at 114 minutes when it was measured, and was still
|
|
18
|
+
going; the second produced a single 2 028-character report at minute 74.9, and it said the release
|
|
19
|
+
was still blocked.
|
|
20
|
+
|
|
21
|
+
Nothing in the foundation bounds a reply. The only limiter is the opt-in `budget-guard` plugin
|
|
22
|
+
(`src/plugins/firstParty.ts:31,105-140`), which is off by default and, when on, refuses tools and
|
|
23
|
+
terminates the reply with no handoff. The post-compaction checkpoint (PROP-0033) restores only the
|
|
24
|
+
goal and the checklist, returns `null` when no checklist was written (`src/prompt/compile.ts:196`),
|
|
25
|
+
and carries no files, failing commands or decisions. Bash has no default timeout
|
|
26
|
+
(`src/core/workspaceBashTool.ts:23`). There is no stall detection, no heartbeat, and dead-owner runs
|
|
27
|
+
are only reconciled at startup (`src/sessions/runStore.ts:228`).
|
|
28
|
+
|
|
29
|
+
The result is not a loop on one action; it is a reply with no boundary. Nothing the model learns
|
|
30
|
+
becomes a checkpoint, a commit or a message, so the person cannot steer, review or stop it, and the
|
|
31
|
+
model re-derives state by re-reading files after every compaction.
|
|
32
|
+
|
|
33
|
+
Task and goal lifecycle stay in the application (`docs/study/feature-gap-review.md:7,35`). Every
|
|
34
|
+
mechanism below is **run execution**, which the harness owns.
|
|
35
|
+
|
|
36
|
+
## Affected rules
|
|
37
|
+
|
|
38
|
+
- **INV-RUN-4** currently says continuing is "always a new run the application asks for". A slice
|
|
39
|
+
policy asks on the run's behalf. This proposal amends the asker, not the rule: continuation remains
|
|
40
|
+
a new run with the earlier run's pins, and the earlier record is never reopened.
|
|
41
|
+
- **INV-RUN-12 / INV-PRM-10** define the post-compaction checkpoint as goal + checklist + plan. The
|
|
42
|
+
checkpoint becomes a bounded ledger assembled by the compiler and used at both compaction and slice
|
|
43
|
+
boundaries. It stays ephemeral, bounded, and free of hidden reasoning.
|
|
44
|
+
- **INV-RUN-3** every event is validated before it is persisted or relayed; the new `checkpoint`,
|
|
45
|
+
`progress` and `heartbeat` events follow the same path.
|
|
46
|
+
- **INV-RUN-2 / INV-PRM-5** a new foundation tool (`checkpoint_write`) joins the frozen capability
|
|
47
|
+
set and the compiled tool manifest. Runs pin it; nothing widens after launch.
|
|
48
|
+
- **INV-GATE-2** the gate stays the last extension. The loop guard is a foundation extension loaded
|
|
49
|
+
before it, like the compaction checkpoint.
|
|
50
|
+
- **INV-PRM-1/2/4** all checkpoint and guard text is assembled in `src/prompt/compile.ts`; the
|
|
51
|
+
stable system prompt does not change.
|
|
52
|
+
- **INV-STO-3** no new file or folder: checkpoints are run events in `events.jsonl`.
|
|
53
|
+
- **INV-PAR-1/2** the budget, checkpoint card, stall report and `/slices` control exist in the
|
|
54
|
+
terminal and are presented by the App; `parity.md` gains a row.
|
|
55
|
+
|
|
56
|
+
## Proposal
|
|
57
|
+
|
|
58
|
+
### 1. A reply budget, enforced at the tool boundary
|
|
59
|
+
|
|
60
|
+
A foundation policy, on by default for every run (interactive, automatic, plan, probe, subagent):
|
|
61
|
+
|
|
62
|
+
- `workSlice.enabled` true; `workSlice.maxToolCalls` 160, `workSlice.maxMinutes` 40,
|
|
63
|
+
`workSlice.maxNewTokens` 320 000. `enabled: false`, or `XINGULAR_WORK_SLICE=off` at launch,
|
|
64
|
+
removes the guard from a run: no budget, no stall notes, no continuation. Any
|
|
65
|
+
limit reached, or `0` to disable that one, ends the slice. A token cap counts new input, cache
|
|
66
|
+
writes and output; counting the cached prefix made one large read end a reply before any work
|
|
67
|
+
(measured on the "Confirm plan model support" thread: 76 807 counted tokens after four requests).
|
|
68
|
+
- Counted by the runner from observed events: tool calls started, wall clock since the run started,
|
|
69
|
+
and the sum of `inputTokens + cacheReadTokens + outputTokens` per request.
|
|
70
|
+
- Enforcement is a Pi `tool_call` hook, like `budget-guard`, but the exit is a checkpoint, not a
|
|
71
|
+
silent stop: the next tool call is refused once with a reason that names the spent budget and
|
|
72
|
+
instructs the model to call `checkpoint_write`; that tool (and `session_name`) remain callable.
|
|
73
|
+
After a valid checkpoint, the model gets one request to write the person-facing progress line, and
|
|
74
|
+
the run settles with terminal reason `slice_complete`.
|
|
75
|
+
- A reply that finishes inside its budget is unaffected at runtime: no extra request and no extra
|
|
76
|
+
context. The only global cost is the new tool entry in the compiled manifest (Consequences).
|
|
77
|
+
|
|
78
|
+
### 2. `checkpoint_write`: a bounded, evidence-linked ledger
|
|
79
|
+
|
|
80
|
+
A foundation tool, always present beside `checklist_write`:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
checkpoint_write {
|
|
84
|
+
summary: string // ≤ 1 200 chars, what the person should know now
|
|
85
|
+
done: [{ item, evidence[] }] // ≤ 20; evidence is a path, a check command, or a decision
|
|
86
|
+
next: string // the single next step
|
|
87
|
+
blocked?: string // what stops progress, if anything
|
|
88
|
+
files: [{ path, why }] // ≤ 20
|
|
89
|
+
checks: [{ command, ok, detail }] // ≤ 8; detail holds the failing line, ≤ 300 chars
|
|
90
|
+
decisions: [{ what, why }] // ≤ 8
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
- The harness validates shape and bounds, then records one `checkpoint` run event (bounded 8 000
|
|
95
|
+
chars). The latest checkpoint is the run's resumable state; `runs.continuation` returns it next to
|
|
96
|
+
the checklist.
|
|
97
|
+
- Evidence is checked against the run's own events since the previous checkpoint. A `done` item whose
|
|
98
|
+
evidence was not observed is kept but marked `unverified` in the record and told to the model; the
|
|
99
|
+
tool never refuses a checkpoint, because a checkpoint is better than a stall.
|
|
100
|
+
- The prompt section that asks for a checkpoint is compiled, bounded, and states that the ledger is
|
|
101
|
+
read by the next slice, not shown as a plan.
|
|
102
|
+
|
|
103
|
+
### 3. Continuation from the checkpoint
|
|
104
|
+
|
|
105
|
+
- `continueFrom` already starts a new run with the earlier run's pins. A slice policy may perform
|
|
106
|
+
that continuation without an application request when the account's setting is on: same session,
|
|
107
|
+
same account, variant and capability set, `resumedFromRunId` set, earlier record untouched.
|
|
108
|
+
- The new run's context begins with the compiled checkpoint (goal, ledger, plan instructions), so the
|
|
109
|
+
model resumes from state rather than from a summary. The normal PROP-0033 checkpoint continues to
|
|
110
|
+
cover mid-slice compactions.
|
|
111
|
+
- Both surfaces offer the same control: `/slices on|off` in the terminal, the matching setting in the
|
|
112
|
+
App, and a per-run override on `sessions.run` (`workSlice: { maxToolCalls?, maxMinutes?, maxNewTokens?, continue? }`).
|
|
113
|
+
- Off means the run still stops at the budget, writes the checkpoint, and returns to the person with
|
|
114
|
+
a "continue" affordance. Slices are a convenience; the checkpoint is the contract.
|
|
115
|
+
|
|
116
|
+
### 4. Stall guard
|
|
117
|
+
|
|
118
|
+
A foundation extension (`src/sessions/workSlice.ts`), registered where the compaction checkpoint is:
|
|
119
|
+
|
|
120
|
+
- Signatures are `toolName + canonicalised args`, hashed, so every argument participates and a
|
|
121
|
+
changed argument (a checklist whose steps moved on, a different path) is a different call. Detect,
|
|
122
|
+
per reply:
|
|
123
|
+
- the same signature 3 times (`checkpoint_write`, `session_name`, `wait_subagents` and
|
|
124
|
+
`subagents.*` polling exempt);
|
|
125
|
+
- the same Bash command failing twice;
|
|
126
|
+
- 25 tool calls with no `file.changed` and no passing check;
|
|
127
|
+
- one file edited 4 times with no intervening passing check.
|
|
128
|
+
- The counts and the nudge start fresh in each reply, because each reply is one slice: progress a
|
|
129
|
+
later reply reports cannot make an earlier reply's call look repeated. Reading a fixed handful of
|
|
130
|
+
field names instead of all arguments once made every `checklist_write` look identical, which is
|
|
131
|
+
how a reply that reported its progress was told it was repeating work.
|
|
132
|
+
- First hit: block that call once and inject a compiler-rendered, bounded evidence note (the earlier
|
|
133
|
+
timestamps, exit codes and paths). This is the Manus "keep the failure visible" rule.
|
|
134
|
+
- Second hit for the same signature, or any hit after one nudge in the same slice: force a
|
|
135
|
+
checkpoint, end the slice with `blocked`, and report the evidence instead of continuing. Never a
|
|
136
|
+
silent kill, never an unbounded retry.
|
|
137
|
+
|
|
138
|
+
### 5. Command budget
|
|
139
|
+
|
|
140
|
+
- `workspaceBashTool` gains a default `timeout` of 120 s and a hard ceiling of 300 s. A longer call is
|
|
141
|
+
allowed only with an explicit `reason`, is shown in the approval action, and is capped at 900 s.
|
|
142
|
+
- A timed-out command returns its partial output plus "timed out after Ns; narrow the command (one
|
|
143
|
+
test file, `--grep`, a line range)". After two timeouts in a run, the guard's evidence note asks for
|
|
144
|
+
the narrow run first.
|
|
145
|
+
- Browser suites and full CI are run as background work where the surface supports it; the slice
|
|
146
|
+
budget must not be spent blocking on them.
|
|
147
|
+
|
|
148
|
+
### 6. Compaction discipline
|
|
149
|
+
|
|
150
|
+
- Before Pi compacts, drop the oldest tool results beyond a character budget through the existing
|
|
151
|
+
`context` projection (the mechanism PROP-0033 already uses), keeping every path and command line.
|
|
152
|
+
This is the cheapest lever and the one these runs lacked with `output-trim` off.
|
|
153
|
+
- Count compactions per run. At the third, do not compact again: force a checkpoint and end the slice,
|
|
154
|
+
naming the largest tool results as the cause (Claude Code's documented thrash guard).
|
|
155
|
+
- Where Pi exposes its summariser prompt, the foundation sets the same requirements the checkpoint
|
|
156
|
+
has: paths with line ranges, failing command lines, and decisions survive.
|
|
157
|
+
|
|
158
|
+
### 7. Liveness and progress
|
|
159
|
+
|
|
160
|
+
- One new run event while a reply is active: `heartbeat` every 30 s `{ steps, elapsedMs, lastTool,
|
|
161
|
+
compactions, slice, maxToolCalls }`, relayed to every surface. `message.completed` already carries
|
|
162
|
+
every visible assistant text block, so no separate `progress` event is added (implemented this
|
|
163
|
+
way; the second copy bought nothing).
|
|
164
|
+
- A stall watchdog settles what the process table cannot. The store reconciles on activity as well as
|
|
165
|
+
on the owner pid, and periodically rather than only at startup: no heartbeat for five minutes while
|
|
166
|
+
the host is alive marks the run `stalled` (a long command still heartbeats, so a 16-minute build is
|
|
167
|
+
not mistaken for a hang), and a `running` or `waiting_*` run whose owner process is gone becomes
|
|
168
|
+
`interrupted` with `terminalReason: "owner_gone"`. Model work is never restarted (INV-RUN-4).
|
|
169
|
+
- `owner.json` records a process start marker next to the pid, so a recycled pid cannot make a dead
|
|
170
|
+
owner look alive.
|
|
171
|
+
|
|
172
|
+
### 8. Defaults and the existing plugin
|
|
173
|
+
|
|
174
|
+
- The slice policy, checkpoint tool, stall guard and heartbeat are foundation and on by default. The
|
|
175
|
+
`budget-guard` plugin stays for people who want a different cap; the Slice policy supersedes it, and
|
|
176
|
+
the plugin's page says so.
|
|
177
|
+
- Until this lands, the quickest real relief is configuration: `output-trim` on (20 000 chars) and
|
|
178
|
+
`budget-guard` at 120 requests.
|
|
179
|
+
|
|
180
|
+
## Alternatives
|
|
181
|
+
|
|
182
|
+
- **Turn `budget-guard` on by default.** Rejected: it stops the reply with no state and no handoff,
|
|
183
|
+
which converts a long run into a lost run.
|
|
184
|
+
- **Raise the context window or compact more often.** Rejected: latency and context rot both grow with
|
|
185
|
+
input; the two runs compacted five and two times and still re-read `host.rs` 11 times.
|
|
186
|
+
- **Extend `checklist_write` instead of a new tool.** Rejected: the checklist is the person-visible
|
|
187
|
+
plan and is reworded as scope changes; the checkpoint is execution state with evidence. Mixing them
|
|
188
|
+
is what produced five reworded plans in one run.
|
|
189
|
+
- **Let the App drive continuation.** Rejected: that is orchestration in the wrong layer, and the
|
|
190
|
+
terminal would lose parity (`INV-PAR-1`).
|
|
191
|
+
- **Add a task/goal lifecycle.** Rejected here: it belongs to the application
|
|
192
|
+
(`feature-gap-review.md:7,35`) and is not needed to bound a reply.
|
|
193
|
+
|
|
194
|
+
## Consequences
|
|
195
|
+
|
|
196
|
+
- More runs per long task, each with its own record and pins. Continuation already supports this, so
|
|
197
|
+
session and thread views group them; a person sees a checkpoint every ≤ 40 minutes instead of
|
|
198
|
+
nothing.
|
|
199
|
+
- Two new tools/events and two new settings, which the App must present for parity. The compiled tool
|
|
200
|
+
manifest gains one entry, which changes the provider-cache prefix once (INV-PRM-8: measure with real
|
|
201
|
+
requests, with the owner's permission).
|
|
202
|
+
- A model can be stopped mid-slice. It is stopped with its own written state and a person-facing line,
|
|
203
|
+
never silently.
|
|
204
|
+
- The context stops growing to 256k in a single reply, so per-step latency and compaction cost fall;
|
|
205
|
+
the exact gain is to be measured, not assumed.
|
|
206
|
+
|
|
207
|
+
## Migration
|
|
208
|
+
|
|
209
|
+
No format migration. Existing runs and native histories are readable; runs without a checkpoint
|
|
210
|
+
continue to resume from the checklist. `terminalReason` gains `slice_complete`, `owner_gone` and
|
|
211
|
+
`stalled`; readers that switch on unknown reasons keep their default. Record validators accept the
|
|
212
|
+
new event types; older records stay valid. The App's event schemas accept the new types in the same
|
|
213
|
+
change (its sidecar test parses every reply of this package).
|
|
214
|
+
|
|
215
|
+
## Checks
|
|
216
|
+
|
|
217
|
+
- Unit: budget counting and refusal, checkpoint validation and bounds, evidence marking, continuation
|
|
218
|
+
pins and `resumedFromRunId`, stall signatures and exemptions, Bash ceiling and partial output,
|
|
219
|
+
heartbeat cadence, owner-gone reconciliation, event validators.
|
|
220
|
+
- Integration: a fake Pi session that makes 60 tool calls ends in one `checkpoint` event and a
|
|
221
|
+
`slice_complete` run, and the continuation starts with the rendered checkpoint; a duplicated call
|
|
222
|
+
is blocked once and then ends the slice; a dead owner is reconciled while the process is alive.
|
|
223
|
+
- `npm run typecheck`, `npm test`, `npm run prove` here; the App's `npm run typecheck`, `npm test`,
|
|
224
|
+
`npm run check:layers`, `npm run check:ui` and `cargo test`; then compare the STUDY-0003 metrics on
|
|
225
|
+
the same two tasks with real runs.
|
|
226
|
+
|
|
227
|
+
## Implementation status (2026-10-26)
|
|
228
|
+
|
|
229
|
+
Implemented in this tree:
|
|
230
|
+
|
|
231
|
+
- `checkpoint_write` (`src/tools/checkpoint.ts`) with its plugin descriptor, frozen capability entry,
|
|
232
|
+
prompt group and terminal socket bridge; the run records `checkpoint`.
|
|
233
|
+
- The slice guard (`src/sessions/workSlice.ts`): budget refusal, checkpoint allowance (including the
|
|
234
|
+
first call past the limit), termination,
|
|
235
|
+
repeated-call, repeated-failure, edit-churn and no-progress notes, compaction-thrash guard, and
|
|
236
|
+
per-reply reset. Wired for structured and terminal replies.
|
|
237
|
+
- The runner's `heartbeat`, derived fallback checkpoint, `slice_complete`/`stalled` terminal reasons
|
|
238
|
+
and the third `finish` argument.
|
|
239
|
+
- Auto-continue with `maxSlices` 8, a fruitless-slice stop and a blocked stop, off for automatic,
|
|
240
|
+
plan, subagent, command and worktree runs; the continuation renders the checkpoint.
|
|
241
|
+
- The command budget (120/300/900 s) on the Bash tool and both initial `!` paths.
|
|
242
|
+
- The liveness watchdog (`reconcileStaleRuns`, 60 s timer) with heartbeat-age and legacy silence
|
|
243
|
+
rules.
|
|
244
|
+
|
|
245
|
+
Open, tracked as `PAR-004` in [`docs/parity.md`](../../parity.md): the terminal's checkpoint card,
|
|
246
|
+
`/slices`, and the App's event schemas, checkpoint card and slice line. Rerun of the STUDY-0003
|
|
247
|
+
tasks with real requests is still to be done with the account owner's permission.
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: PROP-0042
|
|
3
|
+
title: Usage analytics and provider limits as a built-in capability
|
|
4
|
+
status: Accepted
|
|
5
|
+
created: 2026-10-26
|
|
6
|
+
updated: 2026-10-26
|
|
7
|
+
affects: [INV-MEM-5, INV-MEM-6, INV-STO-2, INV-SRV-1, INV-PLG-10, INV-ACC-3, 02-sessions-and-runs.md, 06-plugins-and-capabilities.md, 08-memory-and-history.md, 09-accounts-and-connectors.md, 10-server-protocol.md, 11-terminal.md, 12-storage.md, 14-surfaces-and-parity.md, parity.md]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# PROP-0042: Usage analytics and provider limits as a built-in capability
|
|
11
|
+
|
|
12
|
+
## Problem
|
|
13
|
+
|
|
14
|
+
A run already records what each model request used: `usage.updated` carries per-request tokens,
|
|
15
|
+
cost, provider, model, TTFT and duration (`src/sessions/contracts.ts`, emitted in
|
|
16
|
+
`src/sessions/runner.ts`). Nothing aggregates it, and the SQLite `runs` table stores only ids,
|
|
17
|
+
status and timestamps (`src/sessions/runIndex.ts`). A person cannot answer "what did this account
|
|
18
|
+
spend this week, on which model?" without reading run folders.
|
|
19
|
+
|
|
20
|
+
The account store already has the shape of provider limits — `Limit`, `AccountState.limits`, and
|
|
21
|
+
health derived from `usedPercent`/`resetsAt` (`src/accounts/store.ts`) — and `account.status`
|
|
22
|
+
carries a `limits` array (`src/sessions/contracts.ts`). No producer ever fills it: `Probe.limits`
|
|
23
|
+
is never assigned in `Accounts.probe`, and `runner.ts` only classifies provider error text. A
|
|
24
|
+
person cannot see how close a subscription plan, credit balance or rate window is.
|
|
25
|
+
|
|
26
|
+
The capability is something a person uses, so it belongs in the Harness with a terminal surface
|
|
27
|
+
before any host screen (`INV-PAR-1`).
|
|
28
|
+
|
|
29
|
+
## Affected rules
|
|
30
|
+
|
|
31
|
+
- **INV-MEM-5** Files are the source of truth. `index.sqlite` is derived and can be deleted and
|
|
32
|
+
rebuilt. The usage ledger is derived data inside that index; it adds no run file.
|
|
33
|
+
- **INV-MEM-6** Index migrations are append-only. Migration 8 appends the usage tables.
|
|
34
|
+
- **INV-STO-2** `index.sqlite` can be deleted and rebuilt; the ledger is rebuilt from run events.
|
|
35
|
+
- **INV-SRV-1** A new `usage` method group is additive. Existing method names, params and result
|
|
36
|
+
shapes do not change.
|
|
37
|
+
- **INV-PLG-10** The methods and commands are contributed by one built-in feature module, so the
|
|
38
|
+
public method table remains assembled by `server/methods.ts` and the plugin has one owner.
|
|
39
|
+
- **INV-ACC-3** The harness never writes a secret to its own files. Provider limit reads use the
|
|
40
|
+
credential Pi already resolved through `Models.getAuth`, send it only to the provider, and store
|
|
41
|
+
no credential. A refreshed OAuth token is written only through the existing credential store.
|
|
42
|
+
- **INV-RUN-7** The meaning of every usage field is unchanged. The ledger copies them; aggregates
|
|
43
|
+
are new derived data.
|
|
44
|
+
|
|
45
|
+
## Proposal
|
|
46
|
+
|
|
47
|
+
A built-in plugin `usage` owns a **read-only** capability with one full-screen terminal page and
|
|
48
|
+
two commands:
|
|
49
|
+
|
|
50
|
+
- `/usage:` and `/usage:analysis [today|7d|30d|all]` — token, cost and latency analytics from a
|
|
51
|
+
derived ledger.
|
|
52
|
+
- `/usage:limit` — what each provider last reported about its plan windows, balances or rate
|
|
53
|
+
limits.
|
|
54
|
+
|
|
55
|
+
**Ledger.** Migration 8 adds `usage_requests` (one row per model request) and `usage_indexed` to
|
|
56
|
+
`index.sqlite`. A run's ledger rows are written from its `usage.updated` events when the run ends,
|
|
57
|
+
and repaired by `open`, `rebuildIndex()` and the first analysis call when the ledger is empty. A
|
|
58
|
+
per-request row is used when the event carries `request`; a provider that reported only cumulative
|
|
59
|
+
totals contributes one row from its latest event. Cost uses the provider's own figure; a request
|
|
60
|
+
with no cost may be priced at Pi's catalogue rates for display, and the estimate is marked
|
|
61
|
+
separately, never presented as a provider figure. Aggregates are bounded: one scope, one period,
|
|
62
|
+
top ten rows per breakdown, at most 400 days, with an unpriced-request count.
|
|
63
|
+
|
|
64
|
+
**Limits.** Three sources, in this order:
|
|
65
|
+
|
|
66
|
+
1. **Response headers**, captured by wrapping each account runtime's provider streams with
|
|
67
|
+
`onResponse`; a terminal session's runtime forwards only the limit-bearing headers over its
|
|
68
|
+
control-key-protected socket. Four families are understood: `anthropic-ratelimit-*`, Anthropic unified plan
|
|
69
|
+
windows, `x-codex-*` plan windows, and the common `x-ratelimit-*` headers. `Retry-After` on a
|
|
70
|
+
429 is kept as a reset hint. Raw headers are never stored.
|
|
71
|
+
2. **The provider's own usage endpoint**, read with `Models.getAuth` and a bounded HTTPS GET that
|
|
72
|
+
refuses redirects and other hosts: OpenRouter `GET /api/v1/key`, DeepSeek
|
|
73
|
+
`GET /user/balance`, Anthropic's organization `rate_limits` (admin credential only; configured
|
|
74
|
+
limits, not usage), ChatGPT/Codex `GET /backend-api/wham/usage` (account id from the access
|
|
75
|
+
token), and OpenCode Go `GET /zen/go/v1/usage`.
|
|
76
|
+
3. **Unavailable**, with a reason. No percentage is ever invented. A provider with no documented
|
|
77
|
+
endpoint, a custom base URL, an expired sign-in or no support shows local usage only.
|
|
78
|
+
|
|
79
|
+
Undocumented plan endpoints stay behind the plugin setting `experimentalProbes` (off by
|
|
80
|
+
default). A reading is cached per account and provider for `refreshMinutes` (default 10); a
|
|
81
|
+
page open or `r` refreshes only what is due. Readings live in the account's existing state
|
|
82
|
+
(`limits`, plus a new `providerLimits` readout list) and never create a new file.
|
|
83
|
+
|
|
84
|
+
**Surfaces.** Public methods `usage.summary`, `usage.limits`, `usage.sync`; protected terminal
|
|
85
|
+
routes `terminal.usage.summary` and `terminal.usage.limits` for the page, all through the same
|
|
86
|
+
service. The App screen is a later host task, tracked as `PAR-016`.
|
|
87
|
+
|
|
88
|
+
## Alternatives
|
|
89
|
+
|
|
90
|
+
- **Read every run's `events.jsonl` on demand.** Correct but unbounded: a year of runs is many
|
|
91
|
+
megabytes per page open. A derived table is what the index is for.
|
|
92
|
+
- **Store analytics in a new data folder.** Violates `INV-STO-3` and duplicates derived data the
|
|
93
|
+
index can rebuild.
|
|
94
|
+
- **Scrape provider dashboards.** Not stable, not authenticated, and not a provider API.
|
|
95
|
+
- **Show a percentage for every provider by assuming a cap.** Fabrication; rejected.
|
|
96
|
+
- **Make limit reads automatic in the background.** Surprise egress with a person's credential;
|
|
97
|
+
rejected in favour of page-open and explicit refresh.
|
|
98
|
+
- **Do nothing.** Leaves usage and limits unanswerable in both surfaces.
|
|
99
|
+
|
|
100
|
+
## Consequences
|
|
101
|
+
|
|
102
|
+
- Two additive method routes and two terminal commands; no protocol version change.
|
|
103
|
+
- `index.sqlite` gains two tables (migration 8), rebuilt from run files.
|
|
104
|
+
- `AccountState` gains an optional `providerLimits` readout list and `Limit` gains optional
|
|
105
|
+
absolute fields and `remainingPercent`; old state files load with defaults, and old readers
|
|
106
|
+
ignore the additions.
|
|
107
|
+
- A page open may make one small read-only request per due provider, using the account's existing
|
|
108
|
+
credential. No model request, no token spend, no secret written.
|
|
109
|
+
- The harness remains the only writer of the ledger and of limit snapshots.
|
|
110
|
+
|
|
111
|
+
## Migration
|
|
112
|
+
|
|
113
|
+
No data rewrite. The index migrates in one transaction with the existing backup/restore path; an
|
|
114
|
+
old index simply indexes existing runs on the next `open` or `usage.sync`. Account state files
|
|
115
|
+
without `providerLimits` read as an empty list. Reverting removes the plugin module and commands;
|
|
116
|
+
the extra index tables are inert.
|
|
117
|
+
|
|
118
|
+
## Checks
|
|
119
|
+
|
|
120
|
+
- `npm run typecheck`, `npm test` (`src/usage/*.test.ts`, `src/plugins/usage.test.ts`).
|
|
121
|
+
- `npm run prove` with an injected reader: `usage.summary` after a fake recorded run and
|
|
122
|
+
`usage.limits` returning an explicit unavailable reason, with no network.
|
|
123
|
+
- Terminal verification of `/usage:`, `/usage:analysis`, `/usage:limit` and the two tabs.
|
|
124
|
+
- App checks (`npm run typecheck`, `npm test`, `npm run check:layers`, `npm run check:ui`,
|
|
125
|
+
`cargo test`) after the Harness change.
|
|
126
|
+
- Real provider header names are confirmed only by a separate owner-authorized request per
|
|
127
|
+
provider; fixtures keep only redacted header values.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: PROP-0043
|
|
3
|
+
title: Read-only Bash in plan mode, enforced by the OS sandbox
|
|
4
|
+
status: Accepted; implemented
|
|
5
|
+
created: 2026-10-26
|
|
6
|
+
updated: 2026-10-26
|
|
7
|
+
affects: [INV-RUN-8, INV-GATE-3, INV-GATE-8, 02-sessions-and-runs.md, 07-tools-and-gate.md, 11-terminal.md, terminal-tui.md, parity.md, ADR-0038]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# PROP-0043: Read-only Bash in plan mode, enforced by the OS sandbox
|
|
11
|
+
|
|
12
|
+
## Problem
|
|
13
|
+
|
|
14
|
+
Plan mode refuses Bash entirely: `planRefusal` (`src/sessions/planMode.ts`) did not list `bash`,
|
|
15
|
+
the terminal dropped it from the plan's active set (`planModeTools`), and a test pinned the refusal.
|
|
16
|
+
A plan therefore could not check its claims with read-only commands such as `git log`, `git diff`,
|
|
17
|
+
`rg` or `node --version`, although the plan instructions ask for evidence-grounded findings.
|
|
18
|
+
|
|
19
|
+
## Affected rules
|
|
20
|
+
|
|
21
|
+
- `INV-RUN-8`: "… it has no connectors, user questions, writes, commands or nested subagents." (about
|
|
22
|
+
plan research children; unchanged) and the plan instruction "Do not change files or remote data, run
|
|
23
|
+
commands, …".
|
|
24
|
+
- `INV-GATE-3` / `INV-GATE-8`: default Bash writes inside the workspace; `outside` scope and Full
|
|
25
|
+
Permission can widen it.
|
|
26
|
+
|
|
27
|
+
## Proposal
|
|
28
|
+
|
|
29
|
+
A plan run (SDK sessions and the terminal) may call the model's `bash` tool. Every such call runs in
|
|
30
|
+
a new **read-only scope** of the existing workspace sandbox (`core/workspaceSandbox.ts`):
|
|
31
|
+
|
|
32
|
+
- Reads are as broad as default Bash. Writes are denied everywhere except `/dev/null`, `/dev/tty`,
|
|
33
|
+
and a private temp folder made for the call; `TMPDIR` points to it and it is removed afterwards.
|
|
34
|
+
- No network. No signals outside the sandbox. On macOS no mach services at all, so a command cannot
|
|
35
|
+
act through system daemons (preferences, Apple Events, Launch Services). On Linux, `bwrap` adds
|
|
36
|
+
`--unshare-net --unshare-ipc` and a tmpfs over `/run`.
|
|
37
|
+
- Nothing widens the scope: the Full Permission bypass and `workspaceWriteScope: 'outside'` are never
|
|
38
|
+
consulted. The gate refuses an `outside` request before approvals. The hard-link scan is skipped,
|
|
39
|
+
because the scope permits no workspace writes.
|
|
40
|
+
- A missing sandbox fails closed, as for default Bash.
|
|
41
|
+
- As defence in depth, the gate also refuses a short list of system-acting commands
|
|
42
|
+
(`PLAN_BASH_DENIED`: `sudo`, `osascript`, `open`, `launchctl`, `defaults`, `kill`, `ssh`, …) in any
|
|
43
|
+
segment of the command. The OS sandbox is the boundary; the list is not.
|
|
44
|
+
|
|
45
|
+
The plan instruction says read-only shell inspection is allowed, writes and network fail, and the
|
|
46
|
+
model must not work around a failed write. Unchanged: plan research children still have no Bash, a
|
|
47
|
+
user `!` command still exits plan mode, and `!` is still refused while a plan request runs.
|
|
48
|
+
|
|
49
|
+
## Alternatives
|
|
50
|
+
|
|
51
|
+
- **Do nothing.** Plans stay unable to verify claims with commands.
|
|
52
|
+
- **A command allowlist without the sandbox.** Easy to get around (`find -exec`, `rg --pre`,
|
|
53
|
+
`git -c core.pager=…`, `$(…)`, aliases), and every new tool needs a review. Rejected as the
|
|
54
|
+
boundary; kept only as a small denylist.
|
|
55
|
+
- **Default workspace-scoped Bash in plan mode.** Would let a plan change the workspace.
|
|
56
|
+
|
|
57
|
+
## Consequences
|
|
58
|
+
|
|
59
|
+
Hosts need no change; plan mode reaches the runner through `Sessions`. The terminal keeps `bash` in
|
|
60
|
+
its plan active set. No protocol, stored data or prompt prefix changes: the SDK tool list is
|
|
61
|
+
unchanged and the instruction is the dynamic plan section. Builds and tests that write fail in plan
|
|
62
|
+
mode, which is intended.
|
|
63
|
+
|
|
64
|
+
## Migration
|
|
65
|
+
|
|
66
|
+
None. It can be undone by removing `bash` from the plan gate.
|
|
67
|
+
|
|
68
|
+
## Checks
|
|
69
|
+
|
|
70
|
+
`src/core/workspaceSandbox.test.ts` (real sandbox: reads succeed; workspace, home and link writes
|
|
71
|
+
fail; the temp folder works and is removed; a local TCP connection fails; widening callbacks are
|
|
72
|
+
never called; win32 fails closed), `src/sessions/planMode.test.ts`, `src/sessions/sessions.test.ts`,
|
|
73
|
+
`src/terminal/piExtension.lifecycle.test.ts`, `npm run prove`, and the App's checks. The Linux `bwrap`
|
|
74
|
+
path needs an Ubuntu CI run.
|
|
@@ -35,6 +35,45 @@ proposal is `Accepted`.
|
|
|
35
35
|
|
|
36
36
|
| [PROP-0012](PROP-0012-release-baseline.md) | Public 1.0.0 distribution and generic browser ownership | Accepted; candidate implementation | INV-BND-2, 00, 07, 11, 13 | 2026-10-22 |
|
|
37
37
|
|
|
38
|
+
| [PROP-0013](PROP-0013-resource-browser.md) | Unified terminal resource browser | Implemented; working tree verified | 03, 06, 09, 11 | 2026-10-22 |
|
|
39
|
+
|
|
40
|
+
| [PROP-0014](PROP-0014-fullscreen-browser-tabs.md) | Full-screen browser with persistent section tabs | Implemented; working tree verified | 11, terminal-tui.md | 2026-10-23 |
|
|
41
|
+
|
|
42
|
+
| [PROP-0015](PROP-0015-one-capability-surface.md) | One capability surface: the terminal and every host offer the same capabilities | Accepted | INV-BND-2, new INV-PAR, 00, 11, 14, AGENTS.md | 2026-10-23 |
|
|
43
|
+
|
|
44
|
+
| [PROP-0016](PROP-0016-managed-worktrees.md) | Managed git worktrees in the terminal and every host | Harness/terminal in 4.0.0 candidate; App create integration, remaining actions PAR-012 | INV-BND-2, D-5, INV-STO-3, INV-SRV-1, 00, 02, 10, 11, 12, 14 | 2026-10-23 |
|
|
45
|
+
|
|
46
|
+
| [PROP-0017](PROP-0017-page-annotations.md) | Page annotations captured in the headed browser or a host's web view | Harness/terminal in 4.0.0 candidate; App source pending native-gesture acceptance | INV-STO-3, INV-SRV-1, 07, 10, 11, 12, 13, 14 | 2026-10-23 |
|
|
47
|
+
|
|
48
|
+
| [PROP-0018](PROP-0018-annotation-queue-and-app-targets.md) | Inspector-style page notes, a fix queue to the agent, and app windows as capture targets | Harness/terminal in 4.0.0 candidate; App source present, native WKWebView acceptance pending | INV-STO-3, INV-SRV-1, 07, 10, 11, 12, 13, 14 | 2026-10-23 |
|
|
49
|
+
| [PROP-0019](PROP-0019-contextual-side-questions.md) | Harness-owned contextual side questions across surfaces | Implemented; working tree verified | INV-RUN-1/3/5, INV-GATE-1, INV-PLG-1/5, INV-CAP-1, INV-SRV-1/2, INV-PAR-1/2, 02, 04, 06, 07, 10, 11, 12, 14, ADR-0023 | 2026-10-24 |
|
|
50
|
+
| [PROP-0020](PROP-0020-builtin-feature-plugins.md) | Built-in feature modules and namespaced plugin commands | Implemented; included in 4.0.0 candidate | INV-PLG-5/6, INV-TUI-2/7, INV-SRV-1, 06, 11, 13, 14 | 2026-10-24 |
|
|
51
|
+
| [PROP-0021](PROP-0021-command-namespaces-and-duplicates.md) | Required built-in commands and duplicate command suppression | Implemented | INV-TUI-7, INV-PAR-1, 11, 14, ADR-0021 | 2026-10-24 |
|
|
52
|
+
| [PROP-0022](PROP-0022-plan-only-questions.md) | Keep question tools available only in interactive plan mode | Implemented | INV-RUN-8, 02, 04, 06, 07, 11, 14, parity, ADR-0022 | 2026-10-24 |
|
|
53
|
+
| [PROP-0023](PROP-0023-xagent-cli-name.md) | Rename the published CLI command to xagent | Implemented | 11-terminal.md, package.json#bin, CLI documentation, ADR-0024 | 2026-10-24 |
|
|
54
|
+
| [PROP-0024](PROP-0024-question-sketch-previews.md) | Add bounded ASCII sketch previews to question choices | Implemented; working tree verified | INV-RUN-3, INV-PAR-1/2, 02, 10, 11, 14, parity, App question contract and plan-mode docs, ADR-0025 | 2026-10-24 |
|
|
55
|
+
| [PROP-0025](PROP-0025-contextual-question-wireframes.md) | Strict question columns and contextual ASCII wireframes | Implemented; working tree and isolated fixtures verified | INV-RUN-3, INV-PAR-1/2, 02, 11, 14, terminal-tui.md, parity, ADR-0026 | 2026-10-24 |
|
|
56
|
+
|
|
57
|
+
| [PROP-0026](PROP-0026-connected-sketch-display.md) | Connect structural sketch lines in the terminal display | Implemented; working tree and isolated fixtures verified | 11, 14, terminal-tui.md, parity, ADR-0027 | 2026-10-24 |
|
|
58
|
+
| [PROP-0027](PROP-0027-xingular-agent-product-identity.md) | Use Xingular Agent as the default Harness product identity | Accepted; implemented and verified | INV-BND-2, 00-overview.md, 04-prompt.md, 11-terminal.md, terminal-tui.md, ADR-0028 | 2026-10-24 |
|
|
59
|
+
| [PROP-0028](PROP-0028-normalize-question-wireframes.md) | Normalize high-confidence question wireframe borders in the terminal preview | Implemented; production PTY verification passed | INV-PAR-1/2, 11-terminal.md, 14-surfaces-and-parity.md, terminal-tui.md, parity, ADR-0029 | 2026-10-24 |
|
|
60
|
+
| [PROP-0029](PROP-0029-agent-profiles.md) | Agent profiles that subagents start from | Accepted; implemented | INV-RUN-2, INV-VAR-4, INV-STO-3, INV-SRV-1, 02, 03, 04, 06, 10, 11, 12, 14, parity, ADR-0030 | 2026-10-24 |
|
|
61
|
+
| [PROP-0030](PROP-0030-subagent-title.md) | A parent-set title for each subagent, shown in the roster | Accepted; implemented | 02, 07, 10, 11, terminal-tui.md, 14, parity | 2026-10-24 |
|
|
62
|
+
| [PROP-0031](PROP-0031-plugin-command-owner-namespaces.md) | Namespace plugin commands by owner | Implemented; Harness and App checks passed | INV-TUI-7, 06, 11, 14, terminal-tui.md, README.md, ADR-0021, ADR-0031 | 2026-10-25 |
|
|
63
|
+
| [PROP-0032](PROP-0032-planning-quality.md) | Evidence-grounded planning with read-only research delegation | Implemented; live model pilot pending authorization | INV-RUN-8, INV-GATE-3, INV-CAP-1, 02, 06, 07, 14, parity, ADR-0033 | 2026-10-25 |
|
|
64
|
+
| [PROP-0033](PROP-0033-compaction-plan-checkpoints.md) | Rehydrate bounded run checkpoints after compaction | Accepted; implemented | INV-PRM-1/4/10, INV-RUN-8/12, 02, 04, 11, 14, ADR-0032 | 2026-10-25 |
|
|
65
|
+
| [PROP-0034](PROP-0034-conversation-fast-mode.md) | Conversation-scoped provider fast mode | Proposed | INV-RUN-1/3, INV-PAR-1/2, 02, 09, 10, 11, 12, 14, parity, App thread runtime settings | 2026-10-25 |
|
|
66
|
+
| [PROP-0035](PROP-0035-retain-subagent-status.md) | Retain terminal subagent status until the next run | Implemented; initial PTY failure resolved; full verifier passed at three sizes (2026-11-19) | 11-terminal.md, terminal-tui.md | 2026-10-25 |
|
|
67
|
+
| [PROP-0036](PROP-0036-first-class-harness-commands.md) | First-class Harness terminal commands | Implemented | INV-PLG-10, INV-TUI-7, 06, 11, 14, terminal-tui.md, parity, ADR-0034 | 2026-10-25 |
|
|
68
|
+
| [PROP-0037](PROP-0037-workspace-write-boundary.md) | Default filesystem writes to the active project workspace | Implemented | INV-GATE-1/3/8, INV-RUN-1, INV-TUI-8, 02, 04, 07, 10, 11, 12, 14, parity | 2026-11-19 |
|
|
69
|
+
| [PROP-0038](PROP-0038-annotate-open-shadow-roots.md) | Annotate inside open shadow roots | Implemented | 13-world-tools.md, note target, PROP-0017, PROP-0018, parity | 2026-10-25 |
|
|
70
|
+
| [PROP-0039](PROP-0039-workspace-boundary-hardening.md) | Harden workspace writes against inode escapes and unverified retries | Accepted; implementation validated on macOS, Linux validation pending | INV-GATE-3/8, INV-TUI-8, 02, 07, 11, 14, parity | 2026-10-26 |
|
|
71
|
+
|
|
72
|
+
| [PROP-0040](PROP-0040-one-launch-path.md) | One launch path and command contract across front ends | Accepted; implementation in progress | 01–04, 06–07, 10–14, parity | 2026-11-19 |
|
|
73
|
+
| [PROP-0041](PROP-0041-bounded-work-slices.md) | Bounded work slices, a durable checkpoint, and a stall guard for long replies | Implemented; terminal card, App presentation and /slices open (PAR-004) | INV-RUN-2/3/4/12, INV-PRM-1/2/4/5/10, INV-GATE-2, INV-STO-3, INV-PAR-1/2, 02, 04, 07, 10–12, 14, parity | 2026-10-26 |
|
|
74
|
+
| [PROP-0042](PROP-0042-usage-and-provider-limits.md) | Usage analytics and provider limits as a built-in capability | Accepted; implemented | INV-MEM-5/6, INV-STO-2, INV-SRV-1, INV-PLG-10, INV-ACC-3, 02, 06, 08–12, 14, parity, ADR-0037 | 2026-10-26 |
|
|
75
|
+
| [PROP-0043](PROP-0043-read-only-plan-bash.md) | Read-only Bash in plan mode, enforced by the OS sandbox | Accepted; implemented | INV-RUN-8, INV-GATE-3/8, 02, 07, 11, terminal-tui, parity, ADR-0038 | 2026-10-26 |
|
|
76
|
+
|
|
38
77
|
Numbers are four digits, start at `0001`, and are never reused.
|
|
39
78
|
|
|
40
79
|
## Template
|
|
@@ -34,7 +34,7 @@ Keep `TerminalAssets` and `Terminals.prepare/send/state/input/dispose` compatibl
|
|
|
34
34
|
socket/controller bridge and its final gate. Keep the private control claim in process memory
|
|
35
35
|
across native session replacement, revalidate prepared resource trust before every load, and
|
|
36
36
|
scope native resume/import to the terminal's original working folder. Put unavoidable Pi
|
|
37
|
-
implementation imports in one adapter checked against the pinned
|
|
37
|
+
implementation imports in one adapter checked against the pinned Pi version.
|
|
38
38
|
|
|
39
39
|
Use the shipped OMP 18.11.3 artifacts as the visual reference, with Harness identity and existing
|
|
40
40
|
commands. [The living reference](../terminal-tui.md) records artifact digests, evidence and
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: ADR-0009
|
|
3
3
|
title: Publish the Harness CLI as xharness
|
|
4
|
-
status:
|
|
4
|
+
status: superseded
|
|
5
5
|
created: 2026-10-22
|
|
6
|
-
updated: 2026-10-
|
|
6
|
+
updated: 2026-10-24
|
|
7
7
|
related: [PROP-0005]
|
|
8
8
|
supersedes: null
|
|
9
|
-
superseded_by:
|
|
9
|
+
superseded_by: ADR-0024
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
# ADR-0009 — Publish the Harness CLI as xharness
|
|
12
|
+
# ADR-0009 — Publish the Harness CLI as xharness (superseded)
|
|
13
13
|
|
|
14
14
|
## Context and decision drivers
|
|
15
15
|
|
|
@@ -35,4 +35,5 @@ subcommands, data/state directory names, and `XINGULAR_HARNESS_*` environment va
|
|
|
35
35
|
|
|
36
36
|
- The `bin` mapping and CLI help are tested by [`src/cli.test.ts`](../../src/cli.test.ts).
|
|
37
37
|
- CI, the packed-tarball smoke test and the npm publication blocker are recorded in
|
|
38
|
-
[PROP-0005](../architecture/proposals/PROP-0005-xharness-cli-name.md).
|
|
38
|
+
[PROP-0005](../architecture/proposals/PROP-0005-xharness-cli-name.md). The executable-name decision
|
|
39
|
+
is superseded by [ADR-0024](ADR-0024-xagent-command.md).
|
|
@@ -9,8 +9,9 @@ updated: 2026-10-22
|
|
|
9
9
|
# ADR-0014 — A compiled public SDK and explicit 1.0.0 baseline
|
|
10
10
|
|
|
11
11
|
The user approved [PROP-0012](../architecture/proposals/PROP-0012-release-baseline.md) through the
|
|
12
|
-
release implementation plan. Keep @xingular/harness and xharness, use
|
|
13
|
-
code, publish compiled ESM/declarations, and preserve upstream notices and
|
|
12
|
+
release implementation plan. Keep @xingular/harness and the then-current `xharness` executable, use
|
|
13
|
+
Apache-2.0 for original code, publish compiled ESM/declarations, and preserve upstream notices and
|
|
14
|
+
historical releases. The executable-name portion was superseded by [ADR-0024](ADR-0024-xagent-command.md); the other release-baseline decisions remain.
|
|
14
15
|
|
|
15
16
|
Generic isolated browser execution belongs in the foundation; App browser presentation, tab
|
|
16
17
|
sharing and OS/computer integration remain with the host. No application concept or object is
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# ADR-0015 — One terminal browser for resources and discovery
|
|
2
|
+
|
|
3
|
+
Status: Accepted (user requested implementation of the agreed plan, 2026-10-22).
|
|
4
|
+
Related: [PROP-0013](../architecture/proposals/PROP-0013-resource-browser.md),
|
|
5
|
+
[source study](../study/tui-resource-browser.md).
|
|
6
|
+
|
|
7
|
+
## Context
|
|
8
|
+
|
|
9
|
+
Skills, plugins, Hub items and variant additions have different entry points and misleading
|
|
10
|
+
availability labels. Users need to identify what exists, what this session can use, and what changes later.
|
|
11
|
+
|
|
12
|
+
## Decision
|
|
13
|
+
|
|
14
|
+
Use a shared responsive browser with section shortcuts, Installed/Discover views, provenance and
|
|
15
|
+
inspection before management. Join saved configuration with actual runtime resources; never infer
|
|
16
|
+
loaded state from attachment settings or the latest variant head. Keep the loader, gate and service
|
|
17
|
+
ownership intact. Show foundation and variant as different ownership layers.
|
|
18
|
+
|
|
19
|
+
## Alternatives
|
|
20
|
+
|
|
21
|
+
Separate pages retain navigation fragmentation. A single combined remote/local list confuses
|
|
22
|
+
installation with availability. A full editor expands the task beyond browse/manage.
|
|
23
|
+
|
|
24
|
+
## Consequences
|
|
25
|
+
|
|
26
|
+
The browser adds a protected service adapter and focused navigation state. Resource reads are bounded,
|
|
27
|
+
credentials stay masked, and installing does not activate resources. Existing commands remain shortcuts.
|
|
28
|
+
Implementation and verification evidence belong in the terminal guide, not in this decision record.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ADR-0016 — Full-screen browser with persistent resource tabs
|
|
2
|
+
|
|
3
|
+
Status: Accepted (user requested implementation of the agreed plan, 2026-10-23).
|
|
4
|
+
Related: [PROP-0014](../architecture/proposals/PROP-0014-fullscreen-browser-tabs.md),
|
|
5
|
+
[ADR-0015](ADR-0015-resource-browser.md).
|
|
6
|
+
|
|
7
|
+
## Context
|
|
8
|
+
|
|
9
|
+
The unified browser's centered layout and nested section/detail navigation leave little space
|
|
10
|
+
for inventory and inspection. The user wants one full-page workspace with resource-section tabs.
|
|
11
|
+
|
|
12
|
+
## Decision
|
|
13
|
+
|
|
14
|
+
Resource-browser commands use a full-screen surface with persistent section tabs. Wide terminals
|
|
15
|
+
show inventory beside an inspector containing metadata, actions and content. Compact terminals
|
|
16
|
+
show inline detail views under the same tab strip. Tab moves focus, arrows change a focused tab,
|
|
17
|
+
and mouse tab selection targets the section directly.
|
|
18
|
+
|
|
19
|
+
TerminalPage declares its presentation and optionally supports direct tab selection. Centered
|
|
20
|
+
presentation remains the default for other pages. Resource services keep their existing ownership.
|
|
21
|
+
|
|
22
|
+
## Alternatives
|
|
23
|
+
|
|
24
|
+
Keeping the centered panel restricts working space. Replacing the list with details at all widths
|
|
25
|
+
loses inventory context. Variant c1–c8 tabs do not match the selected resource-navigation intent.
|
|
26
|
+
|
|
27
|
+
## Consequences
|
|
28
|
+
|
|
29
|
+
The browser owns responsive inventory/inspector focus and preserves section search and selection.
|
|
30
|
+
Small terminals use compact tab navigation. There are no storage or protocol changes.
|
|
31
|
+
Verification belongs in the terminal guide and its automated page and PTY checks.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# ADR-0017 — One capability surface for the terminal and every host
|
|
2
|
+
|
|
3
|
+
Status: Accepted (owner approved the parity plan, 2026-10-23).
|
|
4
|
+
Related: [PROP-0015](../architecture/proposals/PROP-0015-one-capability-surface.md),
|
|
5
|
+
[PROP-0016](../architecture/proposals/PROP-0016-managed-worktrees.md),
|
|
6
|
+
[PROP-0017](../architecture/proposals/PROP-0017-page-annotations.md),
|
|
7
|
+
[14 Surfaces and parity](../architecture/14-surfaces-and-parity.md).
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
Capabilities grew in the App alone, so the Harness terminal could not do what the App did, and
|
|
12
|
+
ownership between the repositories was unclear. The owner wants the App to be a richer
|
|
13
|
+
presentation of the Harness, with the same capabilities as the terminal, and room for future
|
|
14
|
+
host-only surfaces such as interactive agent output.
|
|
15
|
+
|
|
16
|
+
## Decision
|
|
17
|
+
|
|
18
|
+
Every user capability is a Harness capability with a terminal surface (INV-PAR-1, INV-PAR-2).
|
|
19
|
+
Capabilities that need an operating-system object only a host has define a generic contract and a
|
|
20
|
+
terminal fallback (INV-PAR-3). Host-only surfaces own no capability and are registered by the host
|
|
21
|
+
with an owner decision (INV-PAR-4). Managed worktrees and page annotations move into the Harness
|
|
22
|
+
under PROP-0016 and PROP-0017. Orchestration across agents (organizations, routed chats, group
|
|
23
|
+
chats, delegated work queues) is not a Harness capability; the App removes it and keeps it only in
|
|
24
|
+
an archived version.
|
|
25
|
+
|
|
26
|
+
## Alternatives
|
|
27
|
+
|
|
28
|
+
Keeping the App as the full product leaves two products. Identical front ends cannot accommodate
|
|
29
|
+
presentation a terminal cannot show. Doing nothing lets the gap grow.
|
|
30
|
+
|
|
31
|
+
## Consequences
|
|
32
|
+
|
|
33
|
+
New user features start in the Harness with a terminal surface. The register `docs/parity.md`
|
|
34
|
+
tracks gaps until both surfaces pass. Hosts keep native bridges, windows and presentation.
|