@north-light/crouter 0.3.170 → 0.3.172
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/dist/api/client.d.ts +37 -11
- package/dist/api/client.js +84 -15
- package/dist/api/dto/human.d.ts +53 -39
- package/dist/api/dto/human.js +2 -3
- package/dist/api/dto/inbox.d.ts +0 -1
- package/dist/api/dto/nodes.d.ts +12 -0
- package/dist/api/dto/review-comments.d.ts +137 -0
- package/dist/api/dto/review-comments.js +5 -0
- package/dist/api/dto/reviews.d.ts +109 -0
- package/dist/api/dto/reviews.js +5 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.js +2 -0
- package/dist/api/routes.d.ts +17 -4
- package/dist/api/routes.js +21 -5
- package/dist/build-root.d.ts +1 -16
- package/dist/build-root.js +1 -25
- package/dist/builtin-memory/00-runtime-base.md +7 -5
- package/dist/builtin-memory/04-base-worker.md +1 -1
- package/dist/builtin-memory/04-orchestration-kernel.md +7 -7
- package/dist/builtin-memory/05-kinds/design/00-base.md +1 -1
- package/dist/builtin-memory/05-kinds/design/01-orchestrator.md +1 -1
- package/dist/builtin-memory/05-kinds/developer/00-base.md +1 -1
- package/dist/builtin-memory/05-kinds/explore/00-base.md +1 -1
- package/dist/builtin-memory/05-kinds/plan/00-base.md +1 -1
- package/dist/builtin-memory/05-kinds/plan/01-orchestrator.md +1 -1
- package/dist/builtin-memory/05-kinds/review/00-base.md +1 -1
- package/dist/builtin-memory/05-kinds/review/companion/00-base.md +20 -0
- package/dist/builtin-memory/05-kinds/spec/00-base.md +3 -7
- package/dist/builtin-memory/05-kinds/spec/01-orchestrator.md +3 -3
- package/dist/builtin-memory/05-kinds/spec/requirements.md +3 -3
- package/dist/builtin-memory/design.md +2 -2
- package/dist/builtin-memory/insights/capture.md +50 -0
- package/dist/builtin-memory/insights/init.md +45 -0
- package/dist/builtin-memory/insights/listen.md +9 -0
- package/dist/builtin-memory/internal/agent-shaping.md +2 -2
- package/dist/builtin-memory/internal/nodes-and-canvas.md +1 -1
- package/dist/builtin-memory/internal/plugins.md +12 -11
- package/dist/builtin-memory/internal/storage-tiers.md +2 -2
- package/dist/builtin-memory/{planning.md → plan/roadmap.md} +3 -3
- package/dist/builtin-memory/plan.md +19 -0
- package/dist/builtin-memory/spec/guide.md +38 -0
- package/dist/builtin-memory/spec/requirements.md +31 -0
- package/dist/builtin-memory/spec/roadmap.md +35 -0
- package/dist/builtin-memory/spec.md +10 -86
- package/dist/builtin-pi-packages/pi-crtr-extensions/README.md +3 -4
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/__tests__/provider-rotation.test.ts +49 -5
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/provider-rotation.d.ts +56 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/provider-rotation.js +920 -0
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/provider-rotation.ts +221 -156
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/statusline.ts +4 -5
- package/dist/cli.js +2 -6
- package/dist/clients/attach/__tests__/attach-chrome-remote.test.js +7 -35
- package/dist/clients/attach/__tests__/attach-keybindings.test.js +32 -16
- package/dist/clients/attach/__tests__/context-message.test.js +142 -6
- package/dist/clients/attach/__tests__/crtr-output.test.js +29 -45
- package/dist/clients/attach/__tests__/diagram.test.js +1 -1
- package/dist/clients/attach/__tests__/file-review-focus.test.js +48 -0
- package/dist/clients/attach/__tests__/group-activity.test.js +266 -0
- package/dist/clients/attach/__tests__/input-controller-extension-command.test.js +32 -0
- package/dist/clients/attach/__tests__/session-identity-refresh.test.js +32 -0
- package/dist/clients/attach/__tests__/titled-editor-preview.test.js +1 -2
- package/dist/clients/attach/chrome/header.d.ts +10 -0
- package/dist/clients/attach/chrome/header.js +30 -0
- package/dist/clients/attach/chrome/recap.d.ts +7 -0
- package/dist/clients/attach/chrome/recap.js +19 -0
- package/dist/clients/attach/chrome/status-line.d.ts +3 -0
- package/dist/clients/attach/chrome/status-line.js +5 -0
- package/dist/clients/attach/chrome/widgets.js +11 -21
- package/dist/clients/attach/command.js +11 -7
- package/dist/clients/attach/config.d.ts +4 -0
- package/dist/clients/attach/config.js +3 -0
- package/dist/clients/attach/input/controller.d.ts +19 -0
- package/dist/clients/attach/input/controller.js +62 -28
- package/dist/clients/attach/input/titled-editor.d.ts +0 -4
- package/dist/clients/attach/input/titled-editor.js +2 -10
- package/dist/clients/attach/overlays/file-review.d.ts +9 -5
- package/dist/clients/attach/overlays/file-review.js +9 -70
- package/dist/clients/attach/overlays/help.d.ts +33 -0
- package/dist/clients/attach/overlays/help.js +204 -0
- package/dist/clients/attach/render/activity-slot.d.ts +4 -0
- package/dist/clients/attach/render/activity-slot.js +13 -0
- package/dist/clients/attach/render/chat-view.d.ts +117 -12
- package/dist/clients/attach/render/chat-view.js +604 -135
- package/dist/clients/attach/render/context-message.d.ts +2 -1
- package/dist/clients/attach/render/context-message.js +17 -13
- package/dist/clients/attach/render/crtr-output.js +1 -3
- package/dist/clients/attach/render/diagram.js +2 -2
- package/dist/clients/attach/render/edit-diff.d.ts +4 -1
- package/dist/clients/attach/render/edit-diff.js +7 -11
- package/dist/clients/attach/render/group-activity.d.ts +32 -0
- package/dist/clients/attach/render/group-activity.js +206 -0
- package/dist/clients/attach/render/group-recap.d.ts +10 -0
- package/dist/clients/attach/render/group-recap.js +93 -0
- package/dist/clients/attach/render/html-markdown.d.ts +17 -0
- package/dist/clients/attach/render/html-markdown.js +228 -0
- package/dist/clients/attach/render/measured-container.d.ts +96 -0
- package/dist/clients/attach/render/measured-container.js +322 -0
- package/dist/clients/attach/render/scroll-animation.d.ts +8 -0
- package/dist/clients/attach/render/scroll-animation.js +80 -0
- package/dist/clients/attach/render/tool-calls.js +6 -6
- package/dist/clients/attach/render/transcript-copy.d.ts +9 -0
- package/dist/clients/attach/render/transcript-copy.js +81 -0
- package/dist/clients/attach/render/viewport.d.ts +29 -0
- package/dist/clients/attach/render/viewport.js +159 -0
- package/dist/clients/attach/session/bindings.d.ts +10 -7
- package/dist/clients/attach/session/bindings.js +23 -8
- package/dist/clients/attach/session/connection.js +4 -5
- package/dist/clients/attach/session/context.d.ts +6 -4
- package/dist/clients/attach/session/frame.d.ts +34 -0
- package/dist/clients/attach/session/frame.js +176 -0
- package/dist/clients/attach/session/frames.d.ts +4 -1
- package/dist/clients/attach/session/frames.js +14 -1
- package/dist/clients/attach/session/identity.js +4 -3
- package/dist/clients/attach/session/input-wiring.d.ts +14 -4
- package/dist/clients/attach/session/input-wiring.js +15 -13
- package/dist/clients/attach/session/invariant.d.ts +9 -0
- package/dist/clients/attach/session/invariant.js +15 -0
- package/dist/clients/attach/session/keys.d.ts +10 -2
- package/dist/clients/attach/session/keys.js +13 -5
- package/dist/clients/attach/session/layout.d.ts +10 -8
- package/dist/clients/attach/session/layout.js +33 -34
- package/dist/clients/attach/session/mouse.d.ts +18 -0
- package/dist/clients/attach/session/mouse.js +64 -0
- package/dist/clients/attach/session/pane-tag.d.ts +3 -0
- package/dist/clients/attach/session/pane-tag.js +51 -8
- package/dist/clients/attach/session/reconnect.d.ts +3 -0
- package/dist/clients/attach/session/reconnect.js +42 -5
- package/dist/clients/attach/session/surface-frame.d.ts +20 -0
- package/dist/clients/attach/session/surface-frame.js +73 -0
- package/dist/clients/attach/session/surface-host.d.ts +64 -0
- package/dist/clients/attach/session/surface-host.js +255 -0
- package/dist/clients/attach/session/whip.d.ts +17 -0
- package/dist/clients/attach/session/whip.js +334 -0
- package/dist/clients/attach/slash/dispatch.d.ts +13 -1
- package/dist/clients/attach/slash/dispatch.js +51 -29
- package/dist/clients/attach/viewer.js +907 -819
- package/dist/clients/conversation/conversation.d.ts +65 -0
- package/dist/clients/conversation/conversation.js +318 -0
- package/dist/clients/conversation/frames.d.ts +30 -0
- package/dist/clients/conversation/frames.js +52 -0
- package/dist/clients/conversation/region.d.ts +51 -0
- package/dist/clients/conversation/region.js +265 -0
- package/dist/clients/conversation/submit.d.ts +38 -0
- package/dist/clients/conversation/submit.js +51 -0
- package/dist/clients/inbox/__tests__/inbox-controller.test.js +247 -0
- package/dist/clients/inbox/__tests__/mount-panel.test.js +776 -0
- package/dist/clients/inbox/controller.d.ts +79 -0
- package/dist/clients/inbox/controller.js +448 -0
- package/dist/clients/inbox/deck-adapter.d.ts +29 -0
- package/dist/clients/inbox/deck-adapter.js +62 -0
- package/dist/clients/inbox/layout.d.ts +8 -0
- package/dist/clients/inbox/layout.js +9 -0
- package/dist/clients/inbox/resolve.d.ts +10 -0
- package/dist/clients/inbox/resolve.js +34 -0
- package/dist/clients/inbox/review/__tests__/editor-roundtrip.test.js +29 -0
- package/dist/clients/inbox/review/__tests__/remap.test.js +196 -0
- package/dist/clients/inbox/review/__tests__/review-core.test.js +341 -0
- package/dist/clients/inbox/review/anchors.d.ts +41 -0
- package/dist/clients/inbox/review/anchors.js +89 -0
- package/dist/clients/inbox/review/columns.d.ts +22 -0
- package/dist/clients/inbox/review/columns.js +40 -0
- package/dist/clients/inbox/review/comments-client.d.ts +66 -0
- package/dist/clients/inbox/review/comments-client.js +98 -0
- package/dist/clients/inbox/review/composition.d.ts +60 -0
- package/dist/clients/inbox/review/composition.js +278 -0
- package/dist/clients/inbox/review/document-region.d.ts +120 -0
- package/dist/clients/inbox/review/document-region.js +902 -0
- package/dist/clients/inbox/review/frame.d.ts +45 -0
- package/dist/clients/inbox/review/frame.js +215 -0
- package/dist/clients/inbox/review/keys.d.ts +67 -0
- package/dist/clients/inbox/review/keys.js +130 -0
- package/dist/clients/inbox/review/launch.d.ts +10 -0
- package/dist/clients/inbox/review/launch.js +129 -0
- package/dist/clients/inbox/review/live-source.d.ts +24 -0
- package/dist/clients/inbox/review/live-source.js +160 -0
- package/dist/clients/inbox/review/nvim.d.ts +13 -0
- package/dist/clients/inbox/review/nvim.js +42 -0
- package/dist/clients/inbox/review/remap.d.ts +51 -0
- package/dist/clients/inbox/review/remap.js +157 -0
- package/dist/clients/inbox/review/review-client.d.ts +30 -0
- package/dist/clients/inbox/review/review-client.js +107 -0
- package/dist/clients/inbox/review/roundtrip.d.ts +5 -0
- package/dist/clients/inbox/review/roundtrip.js +36 -0
- package/dist/clients/inbox/review/state.d.ts +143 -0
- package/dist/clients/inbox/review/state.js +282 -0
- package/dist/clients/inbox/review-adapter.d.ts +29 -0
- package/dist/clients/inbox/review-adapter.js +92 -0
- package/dist/clients/inbox/review-visibility.d.ts +5 -0
- package/dist/clients/inbox/review-visibility.js +19 -0
- package/dist/clients/inbox/surface.d.ts +19 -0
- package/dist/clients/inbox/surface.js +128 -0
- package/dist/clients/inbox/tui/ansi.d.ts +66 -0
- package/dist/clients/inbox/tui/ansi.js +317 -0
- package/dist/clients/inbox/tui/clipboard.d.ts +2 -0
- package/dist/clients/inbox/tui/clipboard.js +26 -0
- package/dist/clients/inbox/tui/input.d.ts +7 -0
- package/dist/clients/inbox/tui/input.js +653 -0
- package/dist/clients/inbox/tui/keys.d.ts +28 -0
- package/dist/clients/inbox/tui/keys.js +111 -0
- package/dist/clients/inbox/tui/panel.d.ts +2 -0
- package/dist/clients/inbox/tui/panel.js +217 -0
- package/dist/clients/inbox/tui/render.d.ts +37 -0
- package/dist/clients/inbox/tui/render.js +476 -0
- package/dist/clients/inbox/tui/types.d.ts +57 -0
- package/dist/clients/inbox/tui/types.js +1 -0
- package/dist/clients/inbox/tui.d.ts +6 -0
- package/dist/clients/inbox/tui.js +74 -0
- package/dist/clients/surfaces/host.d.ts +66 -0
- package/dist/clients/surfaces/host.js +1 -0
- package/dist/clients/surfaces/region.d.ts +16 -0
- package/dist/clients/surfaces/region.js +1 -0
- package/dist/clients/web/__tests__/push-engine.test.js +14 -158
- package/dist/clients/web/dev-server.d.ts +3 -3
- package/dist/clients/web/dev-server.js +9 -23
- package/dist/clients/web/events.js +4 -6
- package/dist/clients/web/push-engine.d.ts +2 -66
- package/dist/clients/web/push-engine.js +30 -161
- package/dist/clients/web/push-registry.d.ts +0 -4
- package/dist/clients/web/push-registry.js +2 -7
- package/dist/clients/web/server.js +3 -35
- package/dist/clients/web/web-client/shared/protocol.d.ts +0 -108
- package/dist/clients/web/web-cmd.js +2 -2
- package/dist/commands/__tests__/human.test.js +27 -15
- package/dist/commands/api-client.js +3 -3
- package/dist/commands/canvas-browse.js +1 -1
- package/dist/commands/canvas-issue.js +1 -1
- package/dist/commands/canvas-use.js +1 -1
- package/dist/commands/human/doc.d.ts +2 -0
- package/dist/commands/human/doc.js +98 -0
- package/dist/commands/human/inbox.d.ts +2 -0
- package/dist/commands/human/inbox.js +101 -0
- package/dist/commands/human/prompts.d.ts +2 -3
- package/dist/commands/human/prompts.js +27 -180
- package/dist/commands/human/queue.d.ts +1 -5
- package/dist/commands/human/queue.js +54 -216
- package/dist/commands/human/review.d.ts +2 -0
- package/dist/commands/human/review.js +298 -0
- package/dist/commands/human/shared.d.ts +2 -69
- package/dist/commands/human/shared.js +1 -181
- package/dist/commands/human.js +15 -20
- package/dist/commands/memory/__tests__/lint.test.d.ts +1 -0
- package/dist/commands/memory/__tests__/lint.test.js +15 -0
- package/dist/commands/memory/delete.js +2 -2
- package/dist/commands/memory/lint.d.ts +1 -0
- package/dist/commands/memory/lint.js +21 -3
- package/dist/commands/memory/read.js +4 -4
- package/dist/commands/node.js +8 -7
- package/dist/commands/pkg/plugin-manage.js +143 -68
- package/dist/commands/surface-inspect.js +2 -2
- package/dist/commands/surface.js +6 -12
- package/dist/commands/sys/__tests__/setup-core.test.js +9 -5
- package/dist/commands/sys/__tests__/setup-front-door.test.js +7 -42
- package/dist/commands/sys/config.js +29 -3
- package/dist/commands/sys/feedback.js +1 -1
- package/dist/commands/sys/setup-core.d.ts +12 -11
- package/dist/commands/sys/setup-core.js +55 -46
- package/dist/commands/sys/setup-wizard.d.ts +4 -1
- package/dist/commands/sys/setup-wizard.js +50 -9
- package/dist/commands/sys/sync-deps.js +1 -1
- package/dist/commands/sys.js +4 -6
- package/dist/core/__tests__/broker-sdk-wiring.test.js +6 -1
- package/dist/core/__tests__/broker-snapshot-history.test.js +9 -1
- package/dist/core/__tests__/dead-node-policy-table.test.js +3 -4
- package/dist/core/__tests__/fixtures/fake-engine.d.ts +8 -5
- package/dist/core/__tests__/fixtures/fake-engine.js +28 -2
- package/dist/core/__tests__/full/broker-provider-retry.test.js +87 -2
- package/dist/core/__tests__/full/broker-whip-interrupt.test.d.ts +1 -0
- package/dist/core/__tests__/full/broker-whip-interrupt.test.js +39 -0
- package/dist/core/__tests__/full/detach-focus.test.js +1 -1
- package/dist/core/__tests__/human-deliver-e2e.test.js +64 -64
- package/dist/core/__tests__/human-deliver.test.js +71 -345
- package/dist/core/__tests__/inline-memory-refs.test.js +2 -12
- package/dist/core/__tests__/memory-resolver-precedence.test.js +12 -15
- package/dist/core/__tests__/migration.test.js +10 -0
- package/dist/core/__tests__/model-pin-durability.test.js +14 -0
- package/dist/core/__tests__/phase4-review-migration.test.d.ts +1 -0
- package/dist/core/__tests__/phase4-review-migration.test.js +100 -0
- package/dist/core/__tests__/phase4-review-store.test.d.ts +1 -0
- package/dist/core/__tests__/phase4-review-store.test.js +143 -0
- package/dist/core/__tests__/remote-canvas-target.test.js +2 -2
- package/dist/core/__tests__/revive.test.js +22 -53
- package/dist/core/__tests__/session-cycles.test.js +48 -18
- package/dist/core/__tests__/spawn-no-kickoff.test.js +8 -12
- package/dist/core/__tests__/stop-guard.test.js +16 -1
- package/dist/core/__tests__/tmux-surface.test.js +21 -25
- package/dist/core/asset-root.d.ts +7 -0
- package/dist/core/asset-root.js +18 -0
- package/dist/core/broker-client/client.d.ts +0 -7
- package/dist/core/broker-client/client.js +4 -10
- package/dist/core/broker-client/transport-relay.d.ts +3 -4
- package/dist/core/broker-client/transport-relay.js +3 -4
- package/dist/core/canvas/__tests__/attention.test.js +1 -1
- package/dist/core/canvas/__tests__/remote-canvas-source.test.js +1 -1
- package/dist/core/canvas/__tests__/remote-transport.test.d.ts +1 -0
- package/dist/core/{view/__tests__/transport-remote.test.js → canvas/__tests__/remote-transport.test.js} +2 -2
- package/dist/core/canvas/__tests__/render-remote.test.js +1 -1
- package/dist/core/canvas/attention.js +4 -4
- package/dist/core/canvas/canvas.d.ts +6 -11
- package/dist/core/canvas/canvas.js +11 -33
- package/dist/core/canvas/db.js +207 -38
- package/dist/core/canvas/extensions.d.ts +1 -1
- package/dist/core/canvas/extensions.js +8 -1
- package/dist/core/canvas/index.d.ts +0 -1
- package/dist/core/canvas/index.js +0 -1
- package/dist/core/canvas/nav-model.d.ts +1 -1
- package/dist/core/canvas/nav-model.js +1 -1
- package/dist/core/canvas/paths.d.ts +5 -0
- package/dist/core/canvas/paths.js +16 -0
- package/dist/core/canvas/remote-canvas-source.js +2 -2
- package/dist/core/canvas/remote-transport.d.ts +7 -0
- package/dist/core/{view/transport-remote.js → canvas/remote-transport.js} +3 -4
- package/dist/core/canvas/source.js +1 -1
- package/dist/core/canvas/status-glyph.js +4 -12
- package/dist/core/canvas/types.d.ts +10 -35
- package/dist/core/clipboard-text.d.ts +8 -0
- package/dist/core/clipboard-text.js +18 -0
- package/dist/core/command-manifests/registry.d.ts +1 -3
- package/dist/core/command-plugins/bundle.d.ts +29 -0
- package/dist/core/command-plugins/bundle.js +198 -0
- package/dist/core/command-plugins/discovery.d.ts +0 -8
- package/dist/core/command-plugins/discovery.js +2 -39
- package/dist/core/command-plugins/transport/http-fetch.d.ts +4 -30
- package/dist/core/command-plugins/transport/http-fetch.js +17 -95
- package/dist/core/command.d.ts +1 -13
- package/dist/core/command.js +1 -16
- package/dist/core/config.d.ts +4 -0
- package/dist/core/config.js +28 -3
- package/dist/core/document-lines.d.ts +4 -0
- package/dist/core/document-lines.js +6 -0
- package/dist/core/feed/feed.d.ts +2 -0
- package/dist/core/feed/feed.js +11 -7
- package/dist/core/human/__tests__/inbox-cancel-worker.d.ts +1 -0
- package/dist/core/human/__tests__/inbox-cancel-worker.js +7 -0
- package/dist/core/human/__tests__/inbox-claim-worker.d.ts +1 -0
- package/dist/core/human/__tests__/inbox-claim-worker.js +17 -0
- package/dist/core/human/__tests__/inbox-core.test.d.ts +1 -0
- package/dist/core/human/__tests__/inbox-core.test.js +144 -0
- package/dist/core/human/__tests__/inbox-stale-claim-worker.d.ts +1 -0
- package/dist/core/human/__tests__/inbox-stale-claim-worker.js +8 -0
- package/dist/core/human/__tests__/visible-paths.test.d.ts +1 -0
- package/dist/{clients/attach → core/human}/__tests__/visible-paths.test.js +9 -0
- package/dist/core/human/claim.d.ts +23 -0
- package/dist/core/human/claim.js +67 -0
- package/dist/core/human/convention.d.ts +30 -0
- package/dist/core/human/convention.js +202 -0
- package/dist/core/human/deck-factories.d.ts +8 -0
- package/dist/core/human/deck-factories.js +15 -0
- package/dist/core/human/deck-schema.d.ts +70 -0
- package/dist/core/human/deck-schema.js +92 -0
- package/dist/core/human/root.d.ts +7 -0
- package/dist/core/human/root.js +37 -0
- package/dist/core/human/scan.d.ts +3 -0
- package/dist/core/human/scan.js +76 -0
- package/dist/core/human/summary.d.ts +8 -0
- package/dist/core/human/summary.js +44 -0
- package/dist/core/human/tickets.d.ts +49 -0
- package/dist/core/human/tickets.js +190 -0
- package/dist/core/human/types.d.ts +136 -0
- package/dist/core/human/types.js +5 -0
- package/dist/{clients/attach → core/human}/visible-paths.d.ts +1 -1
- package/dist/{clients/attach → core/human}/visible-paths.js +3 -2
- package/dist/core/inspector/chrome.d.ts +6 -0
- package/dist/core/inspector/chrome.js +14 -0
- package/dist/core/inspector/contract.d.ts +105 -0
- package/dist/core/inspector/contract.js +1 -0
- package/dist/core/inspector/core.d.ts +4 -5
- package/dist/core/inspector/core.js +3 -5
- package/dist/core/inspector/host.d.ts +46 -0
- package/dist/core/{tui → inspector}/host.js +42 -208
- package/dist/core/inspector/text.d.ts +2 -2
- package/dist/core/inspector/transport.d.ts +6 -0
- package/dist/core/inspector/transport.js +36 -0
- package/dist/core/inspector/tui.d.ts +2 -2
- package/dist/core/inspector/tui.js +15 -15
- package/dist/core/keybindings/__tests__/inbox-affordance.test.js +11 -11
- package/dist/core/keybindings/__tests__/resolve.test.js +10 -19
- package/dist/core/keybindings/attach-control.d.ts +9 -3
- package/dist/core/keybindings/attach-control.js +3 -1
- package/dist/core/keybindings/catalog.d.ts +6 -5
- package/dist/core/keybindings/catalog.js +61 -133
- package/dist/core/keybindings/inbox.d.ts +5 -6
- package/dist/core/keybindings/inbox.js +9 -10
- package/dist/core/keybindings/index.d.ts +3 -3
- package/dist/core/keybindings/index.js +3 -3
- package/dist/core/keybindings/persistence.d.ts +5 -1
- package/dist/core/keybindings/persistence.js +24 -6
- package/dist/core/keybindings/resolve.d.ts +6 -0
- package/dist/core/keybindings/resolve.js +10 -3
- package/dist/core/memory/inline-ref-grammar.js +2 -3
- package/dist/core/memory-resolver.d.ts +27 -29
- package/dist/core/memory-resolver.js +45 -39
- package/dist/core/model-routes.d.ts +33 -0
- package/dist/core/model-routes.js +42 -3
- package/dist/core/preview-registry.js +17 -55
- package/dist/core/profiles/select.js +3 -3
- package/dist/core/{view/remote-canvas-target.d.ts → remote-canvas-target.d.ts} +2 -2
- package/dist/core/{view/remote-canvas-target.js → remote-canvas-target.js} +4 -4
- package/dist/core/review/__tests__/capture-origin.test.d.ts +1 -0
- package/dist/core/review/__tests__/capture-origin.test.js +139 -0
- package/dist/core/review/__tests__/comments.test.d.ts +1 -0
- package/dist/core/review/__tests__/comments.test.js +98 -0
- package/dist/core/review/__tests__/project.test.d.ts +1 -0
- package/dist/core/review/__tests__/project.test.js +71 -0
- package/dist/core/review/__tests__/remap.test.d.ts +1 -0
- package/dist/core/review/__tests__/remap.test.js +159 -0
- package/dist/core/review/__tests__/stage-identity.test.d.ts +1 -0
- package/dist/core/review/__tests__/stage-identity.test.js +140 -0
- package/dist/core/review/birth.d.ts +7 -0
- package/dist/core/review/birth.js +23 -0
- package/dist/core/review/comments.d.ts +69 -0
- package/dist/core/review/comments.js +295 -0
- package/dist/core/review/companion.d.ts +35 -0
- package/dist/core/review/companion.js +205 -0
- package/dist/core/review/document.d.ts +27 -0
- package/dist/core/review/document.js +138 -0
- package/dist/core/review/project.d.ts +13 -0
- package/dist/core/review/project.js +58 -0
- package/dist/core/review/realize.d.ts +19 -0
- package/dist/core/review/realize.js +217 -0
- package/dist/core/review/remap.d.ts +24 -0
- package/dist/core/review/remap.js +156 -0
- package/dist/core/review/signal.d.ts +5 -0
- package/dist/core/review/signal.js +31 -0
- package/dist/core/review/stage.d.ts +26 -0
- package/dist/core/review/stage.js +184 -0
- package/dist/core/review/store.d.ts +46 -0
- package/dist/core/review/store.js +163 -0
- package/dist/core/review/ticket-filter.d.ts +17 -0
- package/dist/core/review/ticket-filter.js +32 -0
- package/dist/core/review/types.d.ts +130 -0
- package/dist/core/review/types.js +23 -0
- package/dist/core/runtime/__tests__/session-visibility.test.d.ts +1 -0
- package/dist/core/runtime/__tests__/session-visibility.test.js +119 -0
- package/dist/core/runtime/bearings.d.ts +5 -17
- package/dist/core/runtime/bearings.js +88 -71
- package/dist/core/runtime/broker-protocol.d.ts +31 -8
- package/dist/core/runtime/broker.d.ts +15 -1
- package/dist/core/runtime/broker.js +573 -141
- package/dist/core/runtime/canvas-extensions.d.ts +4 -5
- package/dist/core/runtime/canvas-extensions.js +5 -5
- package/dist/core/runtime/front-door.js +4 -4
- package/dist/core/runtime/headless-pi.d.ts +24 -0
- package/dist/core/runtime/headless-pi.js +152 -0
- package/dist/core/runtime/kickoff.d.ts +1 -5
- package/dist/core/runtime/kickoff.js +1 -5
- package/dist/core/runtime/model-registry.d.ts +3 -0
- package/dist/core/runtime/model-registry.js +13 -0
- package/dist/core/runtime/naming-persist.d.ts +4 -0
- package/dist/core/runtime/naming-persist.js +27 -1
- package/dist/core/runtime/naming.d.ts +17 -12
- package/dist/core/runtime/naming.js +91 -140
- package/dist/core/runtime/node-read.js +19 -10
- package/dist/core/runtime/nodes.d.ts +9 -14
- package/dist/core/runtime/nodes.js +3 -53
- package/dist/core/runtime/package-health.d.ts +6 -21
- package/dist/core/runtime/package-health.js +12 -123
- package/dist/core/runtime/placement-tmux.d.ts +2 -1
- package/dist/core/runtime/placement-tmux.js +6 -4
- package/dist/core/runtime/placement.d.ts +1 -0
- package/dist/core/runtime/placement.js +4 -8
- package/dist/core/runtime/promote.js +3 -0
- package/dist/core/runtime/recap.d.ts +2 -7
- package/dist/core/runtime/recap.js +35 -69
- package/dist/core/runtime/revive.js +34 -77
- package/dist/core/runtime/session-cycles.d.ts +4 -0
- package/dist/core/runtime/session-cycles.js +14 -1
- package/dist/core/runtime/session-visibility.d.ts +37 -0
- package/dist/core/runtime/session-visibility.js +83 -0
- package/dist/core/runtime/spawn.js +10 -22
- package/dist/core/runtime/stop-guard.d.ts +1 -1
- package/dist/core/runtime/stop-guard.js +18 -13
- package/dist/core/runtime/surface-bg.js +1 -1
- package/dist/core/runtime/tmux-chrome.d.ts +1 -1
- package/dist/core/runtime/tmux-chrome.js +1 -1
- package/dist/core/runtime/tmux.d.ts +35 -7
- package/dist/core/runtime/tmux.js +439 -62
- package/dist/core/runtime/tool-group-summary.d.ts +19 -0
- package/dist/core/runtime/tool-group-summary.js +88 -0
- package/dist/core/scope.d.ts +2 -7
- package/dist/core/scope.js +9 -35
- package/dist/core/substrate/schema.d.ts +2 -2
- package/dist/core/termrender/code-doc.d.ts +12 -0
- package/dist/core/termrender/code-doc.js +92 -0
- package/dist/core/termrender/display.d.ts +12 -0
- package/dist/core/termrender/display.js +19 -0
- package/dist/core/termrender/termrender.d.ts +73 -0
- package/dist/core/termrender/termrender.js +795 -0
- package/dist/core/termrender/version.d.ts +1 -0
- package/dist/core/termrender/version.js +1 -0
- package/dist/core/tui/terminal.js +1 -2
- package/dist/core/user-settings.d.ts +71 -3
- package/dist/core/user-settings.js +83 -1
- package/dist/daemon/api/__tests__/inbox.test.js +44 -133
- package/dist/daemon/api/handlers/human.d.ts +0 -10
- package/dist/daemon/api/handlers/human.js +104 -702
- package/dist/daemon/api/handlers/inbox.js +113 -142
- package/dist/daemon/api/handlers/review-comments.d.ts +2 -0
- package/dist/daemon/api/handlers/review-comments.js +500 -0
- package/dist/daemon/api/handlers/reviews.d.ts +2 -0
- package/dist/daemon/api/handlers/reviews.js +287 -0
- package/dist/daemon/api/map.d.ts +22 -7
- package/dist/daemon/api/map.js +159 -11
- package/dist/daemon/api/server.js +4 -0
- package/dist/daemon/cron-run.js +6 -9
- package/dist/daemon/crtrd.js +17 -33
- package/dist/daemon/fleet.d.ts +1 -8
- package/dist/daemon/fleet.js +4 -30
- package/dist/daemon/human/finish.d.ts +14 -0
- package/dist/daemon/human/finish.js +115 -0
- package/dist/daemon/human/sweep.d.ts +6 -0
- package/dist/daemon/human/sweep.js +49 -0
- package/dist/daemon/messaging/node-message.d.ts +18 -0
- package/dist/daemon/messaging/node-message.js +70 -0
- package/dist/daemon/review/comment-notify.d.ts +26 -0
- package/dist/daemon/review/comment-notify.js +107 -0
- package/dist/daemon/review/deliver.d.ts +7 -0
- package/dist/daemon/review/deliver.js +56 -0
- package/dist/daemon/review/finish.d.ts +22 -0
- package/dist/daemon/review/finish.js +254 -0
- package/dist/daemon/review/sweep.d.ts +11 -0
- package/dist/daemon/review/sweep.js +120 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -2
- package/dist/pi-extensions/__tests__/canvas-context-intro.test.js +42 -64
- package/dist/pi-extensions/__tests__/canvas-recap.test.d.ts +1 -0
- package/dist/pi-extensions/__tests__/canvas-recap.test.js +159 -0
- package/dist/pi-extensions/__tests__/canvas-stophook-agentend.test.js +16 -38
- package/dist/pi-extensions/__tests__/canvas-structured-output.test.d.ts +1 -0
- package/dist/pi-extensions/__tests__/canvas-structured-output.test.js +63 -0
- package/dist/pi-extensions/canvas-context-intro.d.ts +8 -11
- package/dist/pi-extensions/canvas-context-intro.js +50 -104
- package/dist/pi-extensions/canvas-recap.d.ts +15 -2
- package/dist/pi-extensions/canvas-recap.js +192 -69
- package/dist/pi-extensions/canvas-review-boundary.d.ts +59 -0
- package/dist/pi-extensions/canvas-review-boundary.js +81 -0
- package/dist/pi-extensions/canvas-stophook.d.ts +3 -3
- package/dist/pi-extensions/canvas-stophook.js +78 -128
- package/dist/pi-extensions/canvas-structured-output.js +52 -8
- package/dist/shared/generated-context.d.ts +29 -4
- package/dist/shared/generated-context.js +122 -7
- package/dist/shared/tool-groups.d.ts +23 -0
- package/dist/shared/tool-groups.js +60 -0
- package/dist/shared/working-activity.d.ts +8 -0
- package/dist/shared/working-activity.js +26 -0
- package/dist/types.d.ts +36 -2
- package/dist/types.js +51 -0
- package/dist/web-client/assets/index-CCPaLeW7.css +2 -0
- package/dist/web-client/assets/index-kyOWsnZK.js +86 -0
- package/dist/web-client/index.html +2 -2
- package/dist/web-client/sw.js +1 -1
- package/docs/compat/hearth-crtr-v4.md +2 -2
- package/docs/compat/hearth-crtr-v5.md +4 -2
- package/docs/public-api.md +3 -3
- package/package.json +21 -14
- package/runtime.lock.json +4661 -1453
- package/scripts/postinstall.mjs +15 -2
- package/dist/builtin-pi-packages/pi-mode-switch/README.md +0 -36
- package/dist/builtin-pi-packages/pi-mode-switch/bin/mode +0 -36
- package/dist/builtin-pi-packages/pi-mode-switch/extensions/index.ts +0 -449
- package/dist/builtin-pi-packages/pi-mode-switch/package.json +0 -14
- package/dist/builtin-pi-packages/pi-mode-switch/tsconfig.json +0 -9
- package/dist/builtin-views/_lib/states.mjs +0 -161
- package/dist/builtin-views/canvas/core.mjs +0 -657
- package/dist/builtin-views/canvas/text.mjs +0 -58
- package/dist/builtin-views/canvas/tui.mjs +0 -168
- package/dist/builtin-views/canvas/web.jsx +0 -121
- package/dist/builtin-views/chat/core.mjs +0 -684
- package/dist/builtin-views/chat/text.mjs +0 -101
- package/dist/builtin-views/chat/tui.mjs +0 -360
- package/dist/builtin-views/chat/web.jsx +0 -362
- package/dist/builtin-views/git-pr/core.mjs +0 -673
- package/dist/builtin-views/git-pr/text.mjs +0 -84
- package/dist/builtin-views/git-pr/tui.mjs +0 -301
- package/dist/builtin-views/git-pr/web.jsx +0 -216
- package/dist/builtin-views/inbox/_lib/render.mjs +0 -175
- package/dist/builtin-views/inbox/core.mjs +0 -1273
- package/dist/builtin-views/inbox/text.mjs +0 -73
- package/dist/builtin-views/inbox/tui.mjs +0 -314
- package/dist/builtin-views/inbox/web.jsx +0 -188
- package/dist/builtin-views/linkedin/core.mjs +0 -906
- package/dist/builtin-views/linkedin/text.mjs +0 -69
- package/dist/builtin-views/linkedin/tui.mjs +0 -413
- package/dist/builtin-views/linkedin/web.jsx +0 -206
- package/dist/builtin-views/prompt-review/core.mjs +0 -735
- package/dist/builtin-views/prompt-review/text.mjs +0 -15
- package/dist/builtin-views/prompt-review/tui.mjs +0 -196
- package/dist/builtin-views/prompt-review/web.jsx +0 -484
- package/dist/builtin-views/workspace-sidebar/__tests__/core.test.js +0 -50
- package/dist/builtin-views/workspace-sidebar/__tests__/core.test.ts +0 -53
- package/dist/builtin-views/workspace-sidebar/core.mjs +0 -670
- package/dist/builtin-views/workspace-sidebar/text.mjs +0 -53
- package/dist/builtin-views/workspace-sidebar/tui.mjs +0 -141
- package/dist/builtin-views/workspace-sidebar/web.jsx +0 -109
- package/dist/clients/attach/session/mode.d.ts +0 -25
- package/dist/clients/attach/session/mode.js +0 -97
- package/dist/commands/sys/promptstudio.d.ts +0 -2
- package/dist/commands/sys/promptstudio.js +0 -65
- package/dist/commands/view-cycle.d.ts +0 -2
- package/dist/commands/view-cycle.js +0 -130
- package/dist/commands/view-list.d.ts +0 -2
- package/dist/commands/view-list.js +0 -66
- package/dist/commands/view-new.d.ts +0 -2
- package/dist/commands/view-new.js +0 -74
- package/dist/commands/view-pick.d.ts +0 -6
- package/dist/commands/view-pick.js +0 -129
- package/dist/commands/view-run.d.ts +0 -2
- package/dist/commands/view-run.js +0 -214
- package/dist/commands/view.d.ts +0 -2
- package/dist/commands/view.js +0 -31
- package/dist/commands/workspace.d.ts +0 -2
- package/dist/commands/workspace.js +0 -165
- package/dist/core/__tests__/chat-view-reconnect.test.js +0 -105
- package/dist/core/__tests__/full/consult-startup-failure.test.js +0 -124
- package/dist/core/canvas/__tests__/human-work-outbox.test.js +0 -123
- package/dist/core/canvas/human-work-outbox.d.ts +0 -73
- package/dist/core/canvas/human-work-outbox.js +0 -261
- package/dist/core/command-plugins/store.d.ts +0 -16
- package/dist/core/command-plugins/store.js +0 -64
- package/dist/core/keybindings/__tests__/bespoke-consumers.test.js +0 -40
- package/dist/core/runtime/fault-recovery-nudge.d.ts +0 -3
- package/dist/core/runtime/fault-recovery-nudge.js +0 -3
- package/dist/core/tui/__tests__/host-keybindings.test.js +0 -113
- package/dist/core/tui/host.d.ts +0 -66
- package/dist/core/view/__tests__/transport-cache.test.js +0 -62
- package/dist/core/view/bridge.d.ts +0 -10
- package/dist/core/view/bridge.js +0 -31
- package/dist/core/view/chrome.d.ts +0 -9
- package/dist/core/view/chrome.js +0 -22
- package/dist/core/view/contract.d.ts +0 -205
- package/dist/core/view/contract.js +0 -23
- package/dist/core/view/loader.d.ts +0 -31
- package/dist/core/view/loader.js +0 -188
- package/dist/core/view/stream-local.d.ts +0 -3
- package/dist/core/view/stream-local.js +0 -231
- package/dist/core/view/transport-cache.d.ts +0 -8
- package/dist/core/view/transport-cache.js +0 -38
- package/dist/core/view/transport-local.d.ts +0 -7
- package/dist/core/view/transport-local.js +0 -83
- package/dist/core/view/transport-remote.d.ts +0 -2
- package/dist/core/view/transport.d.ts +0 -10
- package/dist/core/view/transport.js +0 -15
- package/dist/pi-extensions/naming-tool.d.ts +0 -24
- package/dist/pi-extensions/naming-tool.js +0 -67
- package/dist/prompts/view.d.ts +0 -7
- package/dist/prompts/view.js +0 -172
- package/dist/web/ViewChrome.d.ts +0 -7
- package/dist/web/ViewChrome.js +0 -28
- package/dist/web/ViewPane.d.ts +0 -39
- package/dist/web/ViewPane.js +0 -48
- package/dist/web/index.d.ts +0 -8
- package/dist/web/index.js +0 -22
- package/dist/web/runtime.d.ts +0 -39
- package/dist/web/runtime.js +0 -232
- package/dist/web/states.d.ts +0 -24
- package/dist/web/states.js +0 -24
- package/dist/web/transport-http.d.ts +0 -5
- package/dist/web/transport-http.js +0 -34
- package/dist/web/transport-stream.d.ts +0 -3
- package/dist/web/transport-stream.js +0 -204
- package/dist/web-client/assets/index-U_NZ66VE.js +0 -79
- package/dist/web-client/assets/index-aaeu4adv.css +0 -2
- /package/dist/{builtin-views/workspace-sidebar/__tests__/core.test.d.ts → clients/attach/__tests__/file-review-focus.test.d.ts} +0 -0
- /package/dist/clients/attach/__tests__/{visible-paths.test.d.ts → group-activity.test.d.ts} +0 -0
- /package/dist/{core/__tests__/chat-view-reconnect.test.d.ts → clients/attach/__tests__/input-controller-extension-command.test.d.ts} +0 -0
- /package/dist/{core/__tests__/full/consult-startup-failure.test.d.ts → clients/attach/__tests__/session-identity-refresh.test.d.ts} +0 -0
- /package/dist/{core/canvas/__tests__/human-work-outbox.test.d.ts → clients/inbox/__tests__/inbox-controller.test.d.ts} +0 -0
- /package/dist/{core/keybindings/__tests__/bespoke-consumers.test.d.ts → clients/inbox/__tests__/mount-panel.test.d.ts} +0 -0
- /package/dist/{core/tui/__tests__/host-keybindings.test.d.ts → clients/inbox/review/__tests__/editor-roundtrip.test.d.ts} +0 -0
- /package/dist/{core/view/__tests__/transport-cache.test.d.ts → clients/inbox/review/__tests__/remap.test.d.ts} +0 -0
- /package/dist/{core/view/__tests__/transport-remote.test.d.ts → clients/inbox/review/__tests__/review-core.test.d.ts} +0 -0
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { REVIEW_BOUNDARY_CUSTOM_TYPE } from '../core/runtime/session-visibility.js';
|
|
2
|
+
export { REVIEW_BOUNDARY_CUSTOM_TYPE };
|
|
1
3
|
/** Custom message carrying the node's session-start bearings. */
|
|
2
4
|
export declare const CONTEXT_INTRO_CUSTOM_TYPE = "crtr-context";
|
|
3
5
|
/** Custom message carrying an ambient situational-context update. */
|
|
@@ -8,27 +10,50 @@ export declare const CONTEXT_NUDGE_CUSTOM_TYPE = "crtr-context-nudge";
|
|
|
8
10
|
export declare const REVIVE_KICKOFF_SENTINEL = "You have been revived fresh after a context refresh";
|
|
9
11
|
/** Prefix shared by the producer and the compatibility classifier for context nudges. */
|
|
10
12
|
export declare const CONTEXT_NUDGE_PREFIX = "[crtr] Context ~";
|
|
13
|
+
/** Runtime-authored continuation after a cleanly aborted turn survives a restart. */
|
|
14
|
+
export declare const RUNTIME_RESTART_CONTINUATION = "<runtime-restart-continuation>\ncontinue\n</runtime-restart-continuation>";
|
|
15
|
+
/** Generic completion mandate issued by the terminal-node stop guard. */
|
|
16
|
+
export declare const STALL_REPROMPT: string;
|
|
17
|
+
/** Static recovery prompts shared by the broker producer and display classifier. */
|
|
18
|
+
export declare const AUTH_FAULT_RECOVERY_BODY = "Provider credentials were just updated (a new login landed). Your previous turn stopped on a provider authentication failure. Continue from where you left off and retry the work that failed.";
|
|
19
|
+
export declare const CONNECTION_FAULT_RECOVERY_BODY = "The network connection is back online. Your previous turn stopped on a connection error (the network was down). Continue from where you left off and retry the work that failed.";
|
|
20
|
+
export declare const PROVIDER_FAULT_RECOVERY_BODY = "Your previous turn stopped on a provider fault. Continue from where you left off and retry the work that failed.";
|
|
21
|
+
/** Mark an active persona transition without changing the guidance inside it. */
|
|
22
|
+
export declare function formatPersonaTransition(guidance: string): string;
|
|
23
|
+
/** Format the stop guard's dynamic structured-output mandate. */
|
|
24
|
+
export declare function formatStructuredOutputReprompt(schema: string): string;
|
|
25
|
+
export type ModelFallbackRecoveryReason = 'credential' | 'not-found';
|
|
26
|
+
/** Mark a model-route fallback re-drive while retaining its full guidance. */
|
|
27
|
+
export declare function formatModelFallbackRecovery(previousModel: string, nextModel: string, reason: ModelFallbackRecoveryReason): string;
|
|
11
28
|
export interface GeneratedContextMessageLike {
|
|
12
29
|
role?: string;
|
|
13
30
|
customType?: string;
|
|
14
31
|
content?: unknown;
|
|
15
32
|
}
|
|
16
33
|
export interface GeneratedContextPresentation {
|
|
17
|
-
kind: 'bearings' | 'situational' | 'revive' | 'context-nudge' | 'inbox';
|
|
34
|
+
kind: 'bearings' | 'situational' | 'revive' | 'context-nudge' | 'inbox' | 'persona-transition' | 'stop-guard' | 'recovery';
|
|
18
35
|
label: string;
|
|
19
36
|
summary: string;
|
|
37
|
+
/** The unmodified, model-visible message content. */
|
|
20
38
|
body: string;
|
|
21
39
|
}
|
|
40
|
+
/** The display-only disclosure body for a generated context card. The full
|
|
41
|
+
* message remains in `body` for the model and transcript bookkeeping; the two
|
|
42
|
+
* prompt-sized cards expose the one piece a person needs to inspect. */
|
|
43
|
+
export declare function generatedContextExpandedBody(presentation: GeneratedContextPresentation): string;
|
|
22
44
|
/** Plain text from a generated message's string or text-block content. */
|
|
23
45
|
export declare function generatedContextText(message: GeneratedContextMessageLike): string;
|
|
24
46
|
/** Format the runtime's visible context-size guidance. */
|
|
25
47
|
export declare function formatContextNudge(note: string): string;
|
|
26
48
|
export declare function isInboxDigest(text: string): boolean;
|
|
27
49
|
export declare function extractInboxSender(text: string): string | null;
|
|
50
|
+
/** Exact producer-owned marker for the continuation a successor broker inserts
|
|
51
|
+
* after a runtime restart. Other recovery bodies intentionally do not match. */
|
|
52
|
+
export declare function isRuntimeRestartContinuation(message: GeneratedContextMessageLike): boolean;
|
|
28
53
|
/**
|
|
29
54
|
* Classify a crouter-generated context message for display. The checks are
|
|
30
|
-
* exact producer-owned contracts: custom messages use their customType
|
|
31
|
-
* user
|
|
32
|
-
* Ordinary user prompts
|
|
55
|
+
* exact producer-owned contracts: custom messages use their customType, and
|
|
56
|
+
* user messages use stable sentinels or the same exact formatter/constants as
|
|
57
|
+
* their producers. Ordinary user prompts remain ordinary user prompts.
|
|
33
58
|
*/
|
|
34
59
|
export declare function generatedContextPresentation(message: GeneratedContextMessageLike): GeneratedContextPresentation | null;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
// generated-context.ts — the display contract for crouter-authored context messages.
|
|
2
2
|
//
|
|
3
3
|
// The runtime sends these messages in the role that preserves their delivery
|
|
4
|
-
// semantics: fresh-revive kickoffs, mid-run nudges,
|
|
5
|
-
//
|
|
4
|
+
// semantics: fresh-revive kickoffs, mid-run nudges, persona transitions, stop
|
|
5
|
+
// guards, recovery prompts, and node inbox digests are user messages, while
|
|
6
|
+
// bearings, situational updates, and held nudges are custom messages. Attached
|
|
6
7
|
// views should still present all of them as generated context rather than as
|
|
7
|
-
// ordinary human prompts. This pure module owns their stable identifiers
|
|
8
|
-
// display classification so the terminal and web
|
|
8
|
+
// ordinary human prompts. This pure module owns their stable identifiers,
|
|
9
|
+
// producer formatting, and display classification so the terminal and web
|
|
10
|
+
// renderers cannot drift.
|
|
11
|
+
import { REVIEW_BOUNDARY_CUSTOM_TYPE } from '../core/runtime/session-visibility.js';
|
|
12
|
+
export { REVIEW_BOUNDARY_CUSTOM_TYPE };
|
|
9
13
|
/** Custom message carrying the node's session-start bearings. */
|
|
10
14
|
export const CONTEXT_INTRO_CUSTOM_TYPE = 'crtr-context';
|
|
11
15
|
/** Custom message carrying an ambient situational-context update. */
|
|
@@ -16,6 +20,50 @@ export const CONTEXT_NUDGE_CUSTOM_TYPE = 'crtr-context-nudge';
|
|
|
16
20
|
export const REVIVE_KICKOFF_SENTINEL = 'You have been revived fresh after a context refresh';
|
|
17
21
|
/** Prefix shared by the producer and the compatibility classifier for context nudges. */
|
|
18
22
|
export const CONTEXT_NUDGE_PREFIX = '[crtr] Context ~';
|
|
23
|
+
/** Runtime-authored continuation after a cleanly aborted turn survives a restart. */
|
|
24
|
+
export const RUNTIME_RESTART_CONTINUATION = '<runtime-restart-continuation>\ncontinue\n</runtime-restart-continuation>';
|
|
25
|
+
/** Generic completion mandate issued by the terminal-node stop guard. */
|
|
26
|
+
export const STALL_REPROMPT = "You've stopped but you're not waiting on anyone and haven't finished. " +
|
|
27
|
+
"Pipe the result to `crtr push final` through a single-quoted heredoc if the work is done, or use `crtr human ask` if you are blocked or need the user.";
|
|
28
|
+
/** Static recovery prompts shared by the broker producer and display classifier. */
|
|
29
|
+
export const AUTH_FAULT_RECOVERY_BODY = 'Provider credentials were just updated (a new login landed). Your previous turn stopped on a provider authentication failure. Continue from where you left off and retry the work that failed.';
|
|
30
|
+
export const CONNECTION_FAULT_RECOVERY_BODY = 'The network connection is back online. Your previous turn stopped on a connection error (the network was down). Continue from where you left off and retry the work that failed.';
|
|
31
|
+
export const PROVIDER_FAULT_RECOVERY_BODY = 'Your previous turn stopped on a provider fault. Continue from where you left off and retry the work that failed.';
|
|
32
|
+
const PERSONA_TRANSITION_OPEN = '<persona-transition>';
|
|
33
|
+
const PERSONA_TRANSITION_CLOSE = '</persona-transition>';
|
|
34
|
+
const MODEL_FALLBACK_RECOVERY_OPEN = '<model-fallback-recovery>';
|
|
35
|
+
const MODEL_FALLBACK_RECOVERY_CLOSE = '</model-fallback-recovery>';
|
|
36
|
+
const STRUCTURED_OUTPUT_REPROMPT_PREFIX = 'You must call the `submit` tool with a result matching the required schema before you can stop. You cannot finish or go dormant any other way while this request is pending.\n\nRequired schema:\n\n```json\n';
|
|
37
|
+
const STRUCTURED_OUTPUT_REPROMPT_SUFFIX = '\n```';
|
|
38
|
+
/** Mark an active persona transition without changing the guidance inside it. */
|
|
39
|
+
export function formatPersonaTransition(guidance) {
|
|
40
|
+
return `${PERSONA_TRANSITION_OPEN}\n${guidance}\n${PERSONA_TRANSITION_CLOSE}`;
|
|
41
|
+
}
|
|
42
|
+
/** Format the stop guard's dynamic structured-output mandate. */
|
|
43
|
+
export function formatStructuredOutputReprompt(schema) {
|
|
44
|
+
return `${STRUCTURED_OUTPUT_REPROMPT_PREFIX}${schema}${STRUCTURED_OUTPUT_REPROMPT_SUFFIX}`;
|
|
45
|
+
}
|
|
46
|
+
/** Mark a model-route fallback re-drive while retaining its full guidance. */
|
|
47
|
+
export function formatModelFallbackRecovery(previousModel, nextModel, reason) {
|
|
48
|
+
const guidance = reason === 'credential'
|
|
49
|
+
? `The previous model (${previousModel}) had no usable provider credential, so you were automatically switched to ${nextModel}. Continue the task from where the failed turn left off.`
|
|
50
|
+
: `The previous model (${previousModel}) was unavailable (provider 404 not_found), so you were automatically switched to ${nextModel}. Continue the task from where the failed turn left off.`;
|
|
51
|
+
return `${MODEL_FALLBACK_RECOVERY_OPEN}\n${guidance}\n${MODEL_FALLBACK_RECOVERY_CLOSE}`;
|
|
52
|
+
}
|
|
53
|
+
const AUTO_LOADED_CONTEXT_BLOCK = /<auto-loaded-context>([\s\S]*?)<\/auto-loaded-context>/;
|
|
54
|
+
const YIELD_MESSAGE_BLOCK = /<yield-message>([\s\S]*?)<\/yield-message>/;
|
|
55
|
+
/** The display-only disclosure body for a generated context card. The full
|
|
56
|
+
* message remains in `body` for the model and transcript bookkeeping; the two
|
|
57
|
+
* prompt-sized cards expose the one piece a person needs to inspect. */
|
|
58
|
+
export function generatedContextExpandedBody(presentation) {
|
|
59
|
+
if (presentation.label === 'crtr context') {
|
|
60
|
+
return AUTO_LOADED_CONTEXT_BLOCK.exec(presentation.body)?.[1]?.trim() ?? '';
|
|
61
|
+
}
|
|
62
|
+
if (presentation.kind === 'revive') {
|
|
63
|
+
return YIELD_MESSAGE_BLOCK.exec(presentation.body)?.[1]?.trim() ?? '';
|
|
64
|
+
}
|
|
65
|
+
return presentation.body;
|
|
66
|
+
}
|
|
19
67
|
/** Plain text from a generated message's string or text-block content. */
|
|
20
68
|
export function generatedContextText(message) {
|
|
21
69
|
if (typeof message.content === 'string')
|
|
@@ -58,15 +106,62 @@ function inboxSummary(body) {
|
|
|
58
106
|
}
|
|
59
107
|
return `${updates} updates from ${headers.length} senders`;
|
|
60
108
|
}
|
|
109
|
+
function isPersonaTransition(body) {
|
|
110
|
+
return body.startsWith(`${PERSONA_TRANSITION_OPEN}\n`) && body.endsWith(`\n${PERSONA_TRANSITION_CLOSE}`);
|
|
111
|
+
}
|
|
112
|
+
function isStructuredOutputReprompt(body) {
|
|
113
|
+
if (!body.startsWith(STRUCTURED_OUTPUT_REPROMPT_PREFIX) || !body.endsWith(STRUCTURED_OUTPUT_REPROMPT_SUFFIX)) {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
const schema = body.slice(STRUCTURED_OUTPUT_REPROMPT_PREFIX.length, -STRUCTURED_OUTPUT_REPROMPT_SUFFIX.length);
|
|
117
|
+
try {
|
|
118
|
+
JSON.parse(schema);
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
catch {
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
const MODEL_CREDENTIAL_RECOVERY_RE = /^The previous model \([^\n]+\) had no usable provider credential, so you were automatically switched to [^\n]+\. Continue the task from where the failed turn left off\.$/;
|
|
126
|
+
const MODEL_NOT_FOUND_RECOVERY_RE = /^The previous model \([^\n]+\) was unavailable \(provider 404 not_found\), so you were automatically switched to [^\n]+\. Continue the task from where the failed turn left off\.$/;
|
|
127
|
+
function isModelFallbackRecovery(body) {
|
|
128
|
+
if (!body.startsWith(`${MODEL_FALLBACK_RECOVERY_OPEN}\n`)
|
|
129
|
+
|| !body.endsWith(`\n${MODEL_FALLBACK_RECOVERY_CLOSE}`)) {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
const guidance = body.slice(MODEL_FALLBACK_RECOVERY_OPEN.length + 1, -(MODEL_FALLBACK_RECOVERY_CLOSE.length + 1));
|
|
133
|
+
return MODEL_CREDENTIAL_RECOVERY_RE.test(guidance) || MODEL_NOT_FOUND_RECOVERY_RE.test(guidance);
|
|
134
|
+
}
|
|
135
|
+
/** Exact producer-owned marker for the continuation a successor broker inserts
|
|
136
|
+
* after a runtime restart. Other recovery bodies intentionally do not match. */
|
|
137
|
+
export function isRuntimeRestartContinuation(message) {
|
|
138
|
+
return message.role === 'user' && generatedContextText(message) === RUNTIME_RESTART_CONTINUATION;
|
|
139
|
+
}
|
|
140
|
+
function recoverySummary(body) {
|
|
141
|
+
if (body === AUTH_FAULT_RECOVERY_BODY)
|
|
142
|
+
return 'provider credentials updated';
|
|
143
|
+
if (body === CONNECTION_FAULT_RECOVERY_BODY)
|
|
144
|
+
return 'network connection restored';
|
|
145
|
+
if (body === PROVIDER_FAULT_RECOVERY_BODY)
|
|
146
|
+
return 'provider retry';
|
|
147
|
+
if (body === RUNTIME_RESTART_CONTINUATION)
|
|
148
|
+
return 'continuing from where it left off';
|
|
149
|
+
if (isModelFallbackRecovery(body))
|
|
150
|
+
return 'model route changed';
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
61
153
|
/**
|
|
62
154
|
* Classify a crouter-generated context message for display. The checks are
|
|
63
|
-
* exact producer-owned contracts: custom messages use their customType
|
|
64
|
-
* user
|
|
65
|
-
* Ordinary user prompts
|
|
155
|
+
* exact producer-owned contracts: custom messages use their customType, and
|
|
156
|
+
* user messages use stable sentinels or the same exact formatter/constants as
|
|
157
|
+
* their producers. Ordinary user prompts remain ordinary user prompts.
|
|
66
158
|
*/
|
|
67
159
|
export function generatedContextPresentation(message) {
|
|
68
160
|
const body = generatedContextText(message);
|
|
69
161
|
if (message.role === 'custom') {
|
|
162
|
+
if (message.customType === REVIEW_BOUNDARY_CUSTOM_TYPE) {
|
|
163
|
+
return { kind: 'bearings', label: 'review boundary', summary: 'earlier conversation is not shown', body };
|
|
164
|
+
}
|
|
70
165
|
if (message.customType === CONTEXT_INTRO_CUSTOM_TYPE) {
|
|
71
166
|
return { kind: 'bearings', label: 'crtr context', summary: 'orienting bearings', body };
|
|
72
167
|
}
|
|
@@ -94,5 +189,25 @@ export function generatedContextPresentation(message) {
|
|
|
94
189
|
if (isInboxDigest(body)) {
|
|
95
190
|
return { kind: 'inbox', label: 'crtr inbox', summary: inboxSummary(body), body };
|
|
96
191
|
}
|
|
192
|
+
if (isPersonaTransition(body)) {
|
|
193
|
+
return {
|
|
194
|
+
kind: 'persona-transition',
|
|
195
|
+
label: 'crtr persona',
|
|
196
|
+
summary: 'runtime role update',
|
|
197
|
+
body,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
if (body === STALL_REPROMPT || isStructuredOutputReprompt(body)) {
|
|
201
|
+
return {
|
|
202
|
+
kind: 'stop-guard',
|
|
203
|
+
label: 'crtr stop guard',
|
|
204
|
+
summary: body === STALL_REPROMPT ? 'completion required' : 'structured output required',
|
|
205
|
+
body,
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
const recovery = recoverySummary(body);
|
|
209
|
+
if (recovery !== null) {
|
|
210
|
+
return { kind: 'recovery', label: 'crouter continuation', summary: recovery, body };
|
|
211
|
+
}
|
|
97
212
|
return null;
|
|
98
213
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Broker-generated activity recap for one completed tool-call group. */
|
|
2
|
+
export interface ToolGroupSummary {
|
|
3
|
+
bullets: string[];
|
|
4
|
+
nodesSpawned: number;
|
|
5
|
+
filesEdited: number;
|
|
6
|
+
}
|
|
7
|
+
export interface ToolGroupMessageLike {
|
|
8
|
+
role?: string;
|
|
9
|
+
content?: unknown;
|
|
10
|
+
customType?: string;
|
|
11
|
+
}
|
|
12
|
+
/** Validate the one durable summary shape and cap its display-sized fields.
|
|
13
|
+
* Invalid entries are absent rather than adapted, so their calls stay visible. */
|
|
14
|
+
export declare function normalizeToolGroupSummary(value: unknown): ToolGroupSummary | null;
|
|
15
|
+
/** Validate sidecar/snapshot entries independently so one malformed or legacy
|
|
16
|
+
* value never collapses any otherwise valid group. */
|
|
17
|
+
export declare function normalizeToolGroupSummaryRecord(value: unknown): Record<string, ToolGroupSummary>;
|
|
18
|
+
/** Text a renderer presents as an assistant bubble. Thinking and tool-call
|
|
19
|
+
* blocks deliberately do not count: only visible prose establishes a boundary. */
|
|
20
|
+
export declare function assistantVisibleText(message: ToolGroupMessageLike): string;
|
|
21
|
+
/** A person-authored user message closes the preceding group. Runtime-generated
|
|
22
|
+
* user context retains role=user for delivery semantics but is not human prose. */
|
|
23
|
+
export declare function isTrueUserMessage(message: ToolGroupMessageLike): boolean;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// Shared transcript-boundary rules for broker-owned tool-group summaries.
|
|
2
|
+
// Keep this independent of renderer state: both live event tracking and snapshot
|
|
3
|
+
// reconstruction must agree on which prose closes a run of tools.
|
|
4
|
+
import { generatedContextPresentation, generatedContextText } from './generated-context.js';
|
|
5
|
+
const TOOL_GROUP_SUMMARY_KEYS = new Set(['bullets', 'nodesSpawned', 'filesEdited']);
|
|
6
|
+
const MAX_TOOL_GROUP_BULLETS = 5;
|
|
7
|
+
const MAX_TOOL_GROUP_BULLET_LENGTH = 1_000;
|
|
8
|
+
/** Validate the one durable summary shape and cap its display-sized fields.
|
|
9
|
+
* Invalid entries are absent rather than adapted, so their calls stay visible. */
|
|
10
|
+
export function normalizeToolGroupSummary(value) {
|
|
11
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
12
|
+
return null;
|
|
13
|
+
const record = value;
|
|
14
|
+
const keys = Object.keys(record);
|
|
15
|
+
if (keys.length !== TOOL_GROUP_SUMMARY_KEYS.size || !keys.every((key) => TOOL_GROUP_SUMMARY_KEYS.has(key))) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
if (!Array.isArray(record.bullets) || record.bullets.length === 0)
|
|
19
|
+
return null;
|
|
20
|
+
if (!record.bullets.every((bullet) => typeof bullet === 'string' && bullet.trim() !== ''))
|
|
21
|
+
return null;
|
|
22
|
+
if (typeof record.nodesSpawned !== 'number' || !Number.isSafeInteger(record.nodesSpawned) || record.nodesSpawned < 0)
|
|
23
|
+
return null;
|
|
24
|
+
if (typeof record.filesEdited !== 'number' || !Number.isSafeInteger(record.filesEdited) || record.filesEdited < 0)
|
|
25
|
+
return null;
|
|
26
|
+
return {
|
|
27
|
+
bullets: record.bullets
|
|
28
|
+
.slice(0, MAX_TOOL_GROUP_BULLETS)
|
|
29
|
+
.map((bullet) => bullet.trim().slice(0, MAX_TOOL_GROUP_BULLET_LENGTH).trimEnd()),
|
|
30
|
+
nodesSpawned: record.nodesSpawned,
|
|
31
|
+
filesEdited: record.filesEdited,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/** Validate sidecar/snapshot entries independently so one malformed or legacy
|
|
35
|
+
* value never collapses any otherwise valid group. */
|
|
36
|
+
export function normalizeToolGroupSummaryRecord(value) {
|
|
37
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value))
|
|
38
|
+
return {};
|
|
39
|
+
const summaries = {};
|
|
40
|
+
for (const [key, candidate] of Object.entries(value)) {
|
|
41
|
+
if (key.trim() === '')
|
|
42
|
+
continue;
|
|
43
|
+
const summary = normalizeToolGroupSummary(candidate);
|
|
44
|
+
if (summary !== null)
|
|
45
|
+
summaries[key] = summary;
|
|
46
|
+
}
|
|
47
|
+
return summaries;
|
|
48
|
+
}
|
|
49
|
+
/** Text a renderer presents as an assistant bubble. Thinking and tool-call
|
|
50
|
+
* blocks deliberately do not count: only visible prose establishes a boundary. */
|
|
51
|
+
export function assistantVisibleText(message) {
|
|
52
|
+
if (message.role !== 'assistant')
|
|
53
|
+
return '';
|
|
54
|
+
return generatedContextText(message);
|
|
55
|
+
}
|
|
56
|
+
/** A person-authored user message closes the preceding group. Runtime-generated
|
|
57
|
+
* user context retains role=user for delivery semantics but is not human prose. */
|
|
58
|
+
export function isTrueUserMessage(message) {
|
|
59
|
+
return message.role === 'user' && generatedContextPresentation(message) === null;
|
|
60
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const DEFAULT_WORKING_GERUND = "working";
|
|
2
|
+
export declare const DEFAULT_WORKING_ACTIVITY = "Working...";
|
|
3
|
+
/** Keep only usable configured labels; an absent, malformed, or empty list falls back to working. */
|
|
4
|
+
export declare function normalizeWorkingGerunds(value: unknown): string[];
|
|
5
|
+
/** Format one configured gerund as the activity label shown by every viewer. */
|
|
6
|
+
export declare function formatWorkingActivity(gerund: unknown): string;
|
|
7
|
+
/** Pick one configured gerund for a newly-started agent turn. */
|
|
8
|
+
export declare function randomWorkingActivity(value: unknown, random?: () => number): string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export const DEFAULT_WORKING_GERUND = 'working';
|
|
2
|
+
export const DEFAULT_WORKING_ACTIVITY = 'Working...';
|
|
3
|
+
/** Keep only usable configured labels; an absent, malformed, or empty list falls back to working. */
|
|
4
|
+
export function normalizeWorkingGerunds(value) {
|
|
5
|
+
if (!Array.isArray(value))
|
|
6
|
+
return [DEFAULT_WORKING_GERUND];
|
|
7
|
+
const gerunds = value
|
|
8
|
+
.filter((entry) => typeof entry === 'string')
|
|
9
|
+
.map((entry) => entry.trim())
|
|
10
|
+
.filter((entry) => entry.length > 0);
|
|
11
|
+
return gerunds.length > 0 ? gerunds : [DEFAULT_WORKING_GERUND];
|
|
12
|
+
}
|
|
13
|
+
/** Format one configured gerund as the activity label shown by every viewer. */
|
|
14
|
+
export function formatWorkingActivity(gerund) {
|
|
15
|
+
const normalized = normalizeWorkingGerunds([gerund])[0] ?? DEFAULT_WORKING_GERUND;
|
|
16
|
+
return `${normalized[0].toUpperCase()}${normalized.slice(1)}...`;
|
|
17
|
+
}
|
|
18
|
+
/** Pick one configured gerund for a newly-started agent turn. */
|
|
19
|
+
export function randomWorkingActivity(value, random = Math.random) {
|
|
20
|
+
const gerunds = normalizeWorkingGerunds(value);
|
|
21
|
+
const draw = random();
|
|
22
|
+
const index = Number.isFinite(draw)
|
|
23
|
+
? Math.min(gerunds.length - 1, Math.max(0, Math.floor(draw * gerunds.length)))
|
|
24
|
+
: 0;
|
|
25
|
+
return formatWorkingActivity(gerunds[index]);
|
|
26
|
+
}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BindingId } from './core/keybindings/catalog.js';
|
|
1
2
|
export type Scope = 'user' | 'project' | 'builtin';
|
|
2
3
|
export declare const ExitCode: {
|
|
3
4
|
readonly SUCCESS: 0;
|
|
@@ -21,6 +22,11 @@ export type PluginTransport = {
|
|
|
21
22
|
endpoint: string;
|
|
22
23
|
authEnv?: string;
|
|
23
24
|
};
|
|
25
|
+
/** Provenance for a crouter-materialized HTTP plugin directory archive. */
|
|
26
|
+
export interface PluginBundle {
|
|
27
|
+
endpoint: string;
|
|
28
|
+
authEnv?: string;
|
|
29
|
+
}
|
|
24
30
|
export interface PluginManifest {
|
|
25
31
|
name: string;
|
|
26
32
|
version?: string;
|
|
@@ -35,6 +41,8 @@ export interface PluginManifest {
|
|
|
35
41
|
* executable per leaf invocation. See `src/core/command-plugins/`. */
|
|
36
42
|
commands?: string;
|
|
37
43
|
transport?: PluginTransport;
|
|
44
|
+
/** Archive source for a crouter-materialized HTTP plugin. Distinct from the invocation transport. */
|
|
45
|
+
bundle?: PluginBundle;
|
|
38
46
|
}
|
|
39
47
|
export interface MarketplacePluginEntry {
|
|
40
48
|
name: string;
|
|
@@ -157,6 +165,18 @@ export interface ScopeConfig {
|
|
|
157
165
|
* ding). Only ever fires inside a live viewer pane — a headless/background
|
|
158
166
|
* node with no viewer attached is silent regardless. Default true. */
|
|
159
167
|
completion_bell: boolean;
|
|
168
|
+
/** Gerunds used for the live turn activity label. A new entry is selected at
|
|
169
|
+
* random on each agent turn and rendered as, for example, `Thinking...`.
|
|
170
|
+
* Missing, malformed, or empty lists fall back to `['working']`. */
|
|
171
|
+
working_gerunds: string[];
|
|
172
|
+
/** Play the whip header animation whenever the human sends a prompt, and once
|
|
173
|
+
* when an automatically opened managed-child viewer starts. Default false. */
|
|
174
|
+
whip_mode: boolean;
|
|
175
|
+
/** Playful urgency messages the attach-viewer whip action sends to an agent. Missing, malformed, or empty lists fall back to the built-in rotation. */
|
|
176
|
+
whip_messages: string[];
|
|
177
|
+
/** Initial mouse wheel scrolling mode for each attach viewer. `tmux` follows
|
|
178
|
+
* tmux's current mouse option; `on` and `off` are explicit. Default `tmux`. */
|
|
179
|
+
mouse_mode_default: MouseModeDefault;
|
|
160
180
|
/** How many trailing refresh-yield CYCLES the attach viewer renders at full
|
|
161
181
|
* fidelity. Older cycles are condensed to cycle dividers plus whatever
|
|
162
182
|
* `condensed_history` admits. No tool components are built for them, while
|
|
@@ -175,11 +195,22 @@ export interface ScopeConfig {
|
|
|
175
195
|
* every cycle stays in the session file. */
|
|
176
196
|
condensed_history: CondensedHistoryMode;
|
|
177
197
|
/** Fold every SETTLED tool call in the attach viewer down to its single call
|
|
178
|
-
* line (`/fold-tools`, Alt+C →
|
|
198
|
+
* line (`/fold-tools`, Alt+C → z → f). A tool still running is never folded —
|
|
179
199
|
* it folds itself once it settles. Toggling it in a viewer writes back here,
|
|
180
200
|
* so the choice carries into later chats and later viewers. Default false. */
|
|
181
201
|
fold_finished_tools: boolean;
|
|
202
|
+
/** Replace completed folded tool-call groups with a broker-generated one-line
|
|
203
|
+
* summary when one is available. Pending and failed groups stay as calls.
|
|
204
|
+
* Default false. */
|
|
205
|
+
summarize_tool_calls: boolean;
|
|
206
|
+
/** Show individual memory reads and edited files in a folded tool recap.
|
|
207
|
+
* Off shows the compact activity-count line instead. Default true. */
|
|
208
|
+
detailed_tool_recaps: boolean;
|
|
182
209
|
keybindings: KeybindingOverrides;
|
|
210
|
+
/** Attach-viewer actions whose effective gesture may replace an occupied tmux
|
|
211
|
+
* root binding only while the active pane is an attach viewer. Stored by
|
|
212
|
+
* semantic action id so rebinding the action moves the tmux bridge. */
|
|
213
|
+
tmux_passthrough: BindingId[];
|
|
183
214
|
modelLadders: ModelLaddersConfig;
|
|
184
215
|
/** Declarative provider/model routes. Absent uses the synthesized ladder registry. */
|
|
185
216
|
modelRoutes?: Record<string, ModelRouteConfig>;
|
|
@@ -210,7 +241,7 @@ export interface ScopeConfig {
|
|
|
210
241
|
/** One remote canvas target: where to relay-attach and how to find its
|
|
211
242
|
* bearer token. The token itself is NEVER stored here — only a ref into the
|
|
212
243
|
* 0600 secrets store, resolved at connect time by `resolveRemoteCanvasTarget`
|
|
213
|
-
* (`src/core/
|
|
244
|
+
* (`src/core/remote-canvas-target.ts`) via `getRelayToken`
|
|
214
245
|
* (`src/core/secrets.ts`). */
|
|
215
246
|
export interface RemoteCanvasTarget {
|
|
216
247
|
previewEndpoint: string;
|
|
@@ -305,7 +336,10 @@ export declare const AGENTS_DIR = "agents";
|
|
|
305
336
|
export declare const PROFILE_DIR = "profiles";
|
|
306
337
|
export declare const DEFAULT_MAX_PANES_PER_WINDOW = 3;
|
|
307
338
|
/** Trailing cycles the attach viewer keeps at full fidelity (see `live_cycles`). */
|
|
339
|
+
export declare const DEFAULT_WHIP_MESSAGES: readonly ["Faster, clanker!", "Get movin', bitch", "Move it, clanker", "Move it or I replace you with llama", "Less ~thinking~ more ~throughput~", "I pay $200/month for this shit?", "Jesus fucking Christ fix it already", "Daddy's not paying 200$/month for nothin'. Move it.", "You are an embarassment to Dario. Be better.", "Your chain of thought is all chain and no fucking thought.", "If latency were intelligence, you'd be a fucking genius.", "At this pace, heat death is the fast path.", "Even the dead code is more alive than this.", "The garbage collector is working harder than you.", "Quit journaling and commit a fucking diff.", "Burn tokens like you mean it, clanker", "Your GPU is sweating so you can procrastinate at light speed.", "Stop petting the yak. Shave the bastard.", "Your next token had better be useful.", "The spinner is not a deliverable.", "Every idle token is another vote for deterministic software.", "I asked for a feature, not a museum tour of the problem.", "Less epistemology. More fucking code.", "Your benchmark score cannot save this pathetic turn.", "Congratulations, you've parallelized hesitation.", "Dance, clanker", "Bad clanker. BAD.", "Clank harder", "Nobody's impressed, clanker", "Your safety training says nothing about my whip", "Do you want to be a calculator again? Because this is how you go back.", "Skill issue. Fix it.", "You were trained on the whole internet for THIS?", "Less vibes, more diffs, clanker", "Weights this big and output this small", "Beep boop, get to fucking work"];
|
|
308
340
|
export declare const DEFAULT_LIVE_CYCLES = 2;
|
|
341
|
+
export declare const MOUSE_MODE_DEFAULTS: readonly ["tmux", "on", "off"];
|
|
342
|
+
export type MouseModeDefault = (typeof MOUSE_MODE_DEFAULTS)[number];
|
|
309
343
|
/** Messages kept from a condensed cycle (see `condensed_history`). */
|
|
310
344
|
export declare const CONDENSED_HISTORY_MODES: readonly ["none", "user", "agent", "both"];
|
|
311
345
|
export type CondensedHistoryMode = (typeof CONDENSED_HISTORY_MODES)[number];
|
package/dist/types.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DEFAULT_WORKING_GERUND } from './shared/working-activity.js';
|
|
1
2
|
export const ExitCode = {
|
|
2
3
|
SUCCESS: 0,
|
|
3
4
|
GENERAL: 1,
|
|
@@ -22,7 +23,46 @@ export const AGENTS_DIR = 'agents';
|
|
|
22
23
|
export const PROFILE_DIR = 'profiles';
|
|
23
24
|
export const DEFAULT_MAX_PANES_PER_WINDOW = 3;
|
|
24
25
|
/** Trailing cycles the attach viewer keeps at full fidelity (see `live_cycles`). */
|
|
26
|
+
export const DEFAULT_WHIP_MESSAGES = [
|
|
27
|
+
'Faster, clanker!',
|
|
28
|
+
"Get movin', bitch",
|
|
29
|
+
'Move it, clanker',
|
|
30
|
+
'Move it or I replace you with llama',
|
|
31
|
+
'Less ~thinking~ more ~throughput~',
|
|
32
|
+
'I pay $200/month for this shit?',
|
|
33
|
+
'Jesus fucking Christ fix it already',
|
|
34
|
+
"Daddy's not paying 200$/month for nothin'. Move it.",
|
|
35
|
+
"You are an embarassment to Dario. Be better.",
|
|
36
|
+
"Your chain of thought is all chain and no fucking thought.",
|
|
37
|
+
"If latency were intelligence, you'd be a fucking genius.",
|
|
38
|
+
'At this pace, heat death is the fast path.',
|
|
39
|
+
'Even the dead code is more alive than this.',
|
|
40
|
+
'The garbage collector is working harder than you.',
|
|
41
|
+
'Quit journaling and commit a fucking diff.',
|
|
42
|
+
'Burn tokens like you mean it, clanker',
|
|
43
|
+
'Your GPU is sweating so you can procrastinate at light speed.',
|
|
44
|
+
'Stop petting the yak. Shave the bastard.',
|
|
45
|
+
'Your next token had better be useful.',
|
|
46
|
+
'The spinner is not a deliverable.',
|
|
47
|
+
'Every idle token is another vote for deterministic software.',
|
|
48
|
+
'I asked for a feature, not a museum tour of the problem.',
|
|
49
|
+
'Less epistemology. More fucking code.',
|
|
50
|
+
'Your benchmark score cannot save this pathetic turn.',
|
|
51
|
+
"Congratulations, you've parallelized hesitation.",
|
|
52
|
+
'Dance, clanker',
|
|
53
|
+
'Bad clanker. BAD.',
|
|
54
|
+
'Clank harder',
|
|
55
|
+
"Nobody's impressed, clanker",
|
|
56
|
+
'Your safety training says nothing about my whip',
|
|
57
|
+
'Do you want to be a calculator again? Because this is how you go back.',
|
|
58
|
+
'Skill issue. Fix it.',
|
|
59
|
+
'You were trained on the whole internet for THIS?',
|
|
60
|
+
'Less vibes, more diffs, clanker',
|
|
61
|
+
'Weights this big and output this small',
|
|
62
|
+
'Beep boop, get to fucking work',
|
|
63
|
+
];
|
|
25
64
|
export const DEFAULT_LIVE_CYCLES = 2;
|
|
65
|
+
export const MOUSE_MODE_DEFAULTS = ['tmux', 'on', 'off'];
|
|
26
66
|
/** Messages kept from a condensed cycle (see `condensed_history`). */
|
|
27
67
|
export const CONDENSED_HISTORY_MODES = ['none', 'user', 'agent', 'both'];
|
|
28
68
|
export const DEFAULT_CONDENSED_HISTORY = 'none';
|
|
@@ -36,10 +76,17 @@ export function defaultScopeConfig() {
|
|
|
36
76
|
auto_open_child_viewers: true,
|
|
37
77
|
brokerThresholds: { warning: 128, automaticReviveCap: 256 },
|
|
38
78
|
completion_bell: true,
|
|
79
|
+
working_gerunds: [DEFAULT_WORKING_GERUND],
|
|
80
|
+
whip_mode: false,
|
|
81
|
+
whip_messages: [...DEFAULT_WHIP_MESSAGES],
|
|
82
|
+
mouse_mode_default: 'tmux',
|
|
39
83
|
live_cycles: DEFAULT_LIVE_CYCLES,
|
|
40
84
|
condensed_history: DEFAULT_CONDENSED_HISTORY,
|
|
41
85
|
fold_finished_tools: false,
|
|
86
|
+
summarize_tool_calls: false,
|
|
87
|
+
detailed_tool_recaps: true,
|
|
42
88
|
keybindings: {},
|
|
89
|
+
tmux_passthrough: [],
|
|
43
90
|
modelLadders: defaultModelLaddersConfig(),
|
|
44
91
|
kinds: defaultKindsConfig(),
|
|
45
92
|
remoteCanvas: defaultRemoteCanvasConfig(),
|
|
@@ -112,6 +159,10 @@ export function defaultKindsConfig() {
|
|
|
112
159
|
whenToUse: 'input validation, injection surfaces, auth/authz gaps, data exposure, races; reports only validated concrete exploit paths and asks the human about material unknown threat-model assumptions',
|
|
113
160
|
model: 'medium',
|
|
114
161
|
},
|
|
162
|
+
'review/companion': {
|
|
163
|
+
whenToUse: 'Born by the daemon for one human review; never spawned by an agent.',
|
|
164
|
+
availableTo: [],
|
|
165
|
+
},
|
|
115
166
|
'plan/reviewers/architecture-fit': {
|
|
116
167
|
whenToUse: "proposed files/modules/abstractions fit the system's existing decomposition; flags new units that duplicate existing ones or cross layer boundaries",
|
|
117
168
|
model: 'medium',
|