@north-light/crouter 0.3.232 → 0.3.234
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.js +16 -15
- package/dist/builtin-memory/internal/memory-loading.md +4 -3
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/__tests__/integration/provider-rotation.test.ts +1 -1
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/claude-plugin-commands.ts +14 -17
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/crtr-commands/index.ts +7 -11
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/frontmatter-rules/index.ts +8 -8
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/memory-slash-commands.ts +10 -11
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/pi-shell-runner.ts +2 -2
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/provider-rotation.d.ts +3 -3
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/provider-rotation.js +7 -7
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/provider-rotation.ts +8 -8
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/statusline.ts +6 -6
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/sysprompt-window.ts +3 -3
- package/dist/builtin-pi-packages/pi-crtr-extensions/lib/subscription-state.ts +1 -1
- package/dist/clients/attach/chrome/ticket-panel.js +15 -2
- package/dist/clients/attach/overlays/graph.js +0 -3
- package/dist/clients/attach/overlays/mcp.js +1 -2
- package/dist/clients/attach/render/chat-view.js +0 -12
- package/dist/clients/attach/render/crtr-output.js +0 -2
- package/dist/clients/attach/render/tool-calls.js +0 -6
- package/dist/clients/attach/slash/dispatch.js +8 -11
- package/dist/clients/attach/viewer.js +532 -534
- package/dist/clients/conversation/projection.js +0 -2
- package/dist/clients/inbox/controller.js +22 -3
- package/dist/clients/inbox/review/companion-pane.js +0 -4
- package/dist/clients/inbox/review-adapter.js +0 -7
- package/dist/clients/inbox/tui/slots.d.ts +3 -3
- package/dist/clients/inbox/tui/types.d.ts +2 -2
- package/dist/commands/api-client.js +0 -8
- package/dist/commands/attention.js +0 -8
- package/dist/commands/canvas-browse.js +2 -1
- package/dist/commands/canvas-config.js +0 -10
- package/dist/commands/canvas-history.js +2 -1
- package/dist/commands/cron.js +5 -18
- package/dist/commands/dashboard.js +0 -2
- package/dist/commands/human/feedback.js +2 -1
- package/dist/commands/human/prompts.js +2 -5
- package/dist/commands/human/queue.js +2 -7
- package/dist/commands/human/request.js +0 -14
- package/dist/commands/human/review.js +2 -1
- package/dist/commands/memory/__tests__/command-selector-and-mutation-guards.test.js +4 -4
- package/dist/commands/memory/find.js +2 -2
- package/dist/commands/memory/lint.js +2 -1
- package/dist/commands/memory/read.d.ts +2 -7
- package/dist/commands/memory/read.js +5 -16
- package/dist/commands/memory/shared.d.ts +1 -1
- package/dist/commands/memory/shared.js +7 -10
- package/dist/commands/memory/write.js +4 -3
- package/dist/commands/node/bash.js +2 -1
- package/dist/commands/node/create.js +2 -1
- package/dist/commands/node/inspect.js +0 -6
- package/dist/commands/node/lifecycle.js +4 -13
- package/dist/commands/node/message.js +3 -2
- package/dist/commands/node/subscription.js +2 -1
- package/dist/commands/node/wait.js +4 -3
- package/dist/commands/node-context.js +2 -1
- package/dist/commands/node-lifecycle-revive.js +0 -2
- package/dist/commands/node-worktree.js +2 -1
- package/dist/commands/pkg/browse/actions.d.ts +1 -1
- package/dist/commands/pkg/browse/actions.js +4 -4
- package/dist/commands/pkg/browse/catalog.d.ts +1 -1
- package/dist/commands/pkg/browse/catalog.js +15 -15
- package/dist/commands/pkg/browse/command-view.d.ts +1 -1
- package/dist/commands/pkg/browse/command-view.js +3 -3
- package/dist/commands/pkg/browse/detail-panel.d.ts +1 -1
- package/dist/commands/pkg/browse/detail-panel.js +8 -8
- package/dist/commands/pkg/browse/doc-view.d.ts +1 -1
- package/dist/commands/pkg/browse/doc-view.js +3 -3
- package/dist/commands/pkg/browse/list-panel.d.ts +1 -1
- package/dist/commands/pkg/browse/list-panel.js +3 -3
- package/dist/commands/pkg/browse/model.d.ts +3 -3
- package/dist/commands/pkg/browse/shell.d.ts +2 -2
- package/dist/commands/pkg/browse/shell.js +13 -13
- package/dist/commands/pkg/plugin-manage.js +2 -1
- package/dist/commands/pkg/shared.js +0 -2
- package/dist/commands/profile/delete.js +2 -1
- package/dist/commands/push.js +2 -3
- package/dist/commands/revive.js +0 -2
- package/dist/commands/surface/node/placement.js +2 -1
- package/dist/commands/surface-edit.js +2 -1
- package/dist/commands/sys/config.js +0 -4
- package/dist/commands/sys/daemon.js +0 -10
- package/dist/commands/sys/doctor.js +3 -2
- package/dist/commands/sys/panels/broker-limits-panel.d.ts +2 -2
- package/dist/commands/sys/panels/broker-limits-panel.js +4 -4
- package/dist/commands/sys/panels/dependencies-panel.d.ts +2 -2
- package/dist/commands/sys/panels/dependencies-panel.js +2 -2
- package/dist/commands/sys/panels/keybindings-panel.d.ts +1 -1
- package/dist/commands/sys/panels/keybindings-panel.js +5 -5
- package/dist/commands/sys/panels/models-panel.d.ts +4 -4
- package/dist/commands/sys/panels/models-panel.js +11 -10
- package/dist/commands/sys/panels/plugins-panel.d.ts +2 -2
- package/dist/commands/sys/panels/plugins-panel.js +2 -2
- package/dist/commands/sys/panels/prefs-panel.d.ts +2 -2
- package/dist/commands/sys/panels/prefs-panel.js +4 -4
- package/dist/commands/sys/panels/profiles-panel.d.ts +1 -1
- package/dist/commands/sys/panels/profiles-panel.js +14 -13
- package/dist/commands/sys/panels/provider-panel.d.ts +3 -3
- package/dist/commands/sys/panels/provider-panel.js +8 -8
- package/dist/commands/sys/settings-shell.d.ts +3 -3
- package/dist/commands/sys/settings-shell.js +15 -15
- package/dist/commands/sys/setup-settings-runner.d.ts +3 -3
- package/dist/commands/sys/setup-settings-runner.js +5 -5
- package/dist/commands/sys/setup-wizard.d.ts +4 -4
- package/dist/commands/sys/setup-wizard.js +8 -8
- package/dist/commands/sys/support/prepare.js +4 -4
- package/dist/commands/sys/support/submit.js +2 -2
- package/dist/commands/sys/sync-deps.js +0 -2
- package/dist/commands/sys/sync-project-guidance.js +2 -1
- package/dist/commands/sys/sysprompt.js +2 -1
- package/dist/core/__tests__/boot.test.js +0 -8
- package/dist/core/__tests__/broker-extension-canvas-db-boundary.test.js +23 -1
- package/dist/core/__tests__/canvas-db-boundary.test.d.ts +1 -0
- package/dist/core/__tests__/canvas-db-boundary.test.js +46 -0
- package/dist/core/__tests__/canvas.test.js +1 -1
- package/dist/core/__tests__/child-death-wake.test.js +0 -2
- package/dist/core/__tests__/cron-armed-context-failure.test.d.ts +1 -0
- package/dist/core/__tests__/cron-armed-context-failure.test.js +145 -0
- package/dist/core/__tests__/daemon-wedge.test.js +0 -4
- package/dist/core/__tests__/dead-node-policy-table.test.js +0 -4
- package/dist/core/__tests__/fixtures/fake-engine.js +4 -14
- package/dist/core/__tests__/fixtures/fake-pi-host.js +5 -5
- package/dist/core/__tests__/focuses.test.js +0 -6
- package/dist/core/__tests__/fs-utils.test.d.ts +1 -0
- package/dist/core/__tests__/fs-utils.test.js +50 -0
- package/dist/core/__tests__/helpers/harness.js +1 -1
- package/dist/core/__tests__/inline-memory-refs.test.js +0 -2
- package/dist/core/__tests__/integration/broker-fork-seam.test.js +0 -2
- package/dist/core/__tests__/integration/broker-sdk-wiring.test.js +3 -16
- package/dist/core/__tests__/integration/command-plugins.test.js +0 -24
- package/dist/core/__tests__/integration/deferred-no-wake.test.js +0 -6
- package/dist/core/__tests__/integration/flagship-lifecycle.test.js +0 -26
- package/dist/core/__tests__/integration/live-mutation-verbs.test.js +0 -4
- package/dist/core/__tests__/integration/live-mutation.test.js +1 -5
- package/dist/core/__tests__/integration/refresh-stall-recycle.test.js +1 -5
- package/dist/core/__tests__/integration/revive.test.js +0 -12
- package/dist/core/__tests__/integration/subscription-delivery.test.js +0 -6
- package/dist/core/__tests__/integration/tmux-surface.test.js +24 -8
- package/dist/core/__tests__/integration/worktree-reap.test.js +0 -6
- package/dist/core/__tests__/lifecycle.test.js +0 -18
- package/dist/core/__tests__/memory-resolver-precedence.test.js +1 -1
- package/dist/core/__tests__/migration.test.js +2 -2
- package/dist/core/__tests__/on-read-dedup-resume.test.js +3 -3
- package/dist/core/__tests__/pid-identity-match.test.js +1 -1
- package/dist/core/__tests__/plugin-kinds.test.js +1 -1
- package/dist/core/__tests__/plugin-page-components.test.js +1 -1
- package/dist/core/__tests__/preview-registry-sync.test.js +42 -1
- package/dist/core/__tests__/respawn-throttle.test.js +0 -4
- package/dist/core/__tests__/revive-all.test.js +5 -5
- package/dist/core/__tests__/revive-parked-fresh.test.js +62 -11
- package/dist/core/__tests__/seam/broker-attach-multiclient.test.js +0 -8
- package/dist/core/__tests__/seam/broker-attach-stream.test.js +0 -8
- package/dist/core/__tests__/seam/broker-crash-teardown.test.js +0 -2
- package/dist/core/__tests__/tmux-driver-boundary.test.d.ts +1 -0
- package/dist/core/__tests__/tmux-driver-boundary.test.js +50 -0
- package/dist/core/activity-signal.d.ts +7 -0
- package/dist/core/activity-signal.js +38 -0
- package/dist/core/auto-update.js +2 -1
- package/dist/core/bootstrap.js +2 -1
- package/dist/core/canvas/__tests__/remote-canvas-source.test.js +1 -1
- package/dist/core/canvas/__tests__/remote-transport.test.js +1 -1
- package/dist/core/canvas/__tests__/render-remote.test.js +1 -1
- package/dist/core/canvas/browse/app.js +3 -2
- package/dist/core/canvas/browse/model.d.ts +1 -1
- package/dist/core/canvas/browse/model.js +0 -4
- package/dist/core/canvas/canvas.d.ts +22 -0
- package/dist/core/canvas/canvas.js +50 -18
- package/dist/core/canvas/crons.js +0 -6
- package/dist/core/canvas/db.d.ts +14 -20
- package/dist/core/canvas/db.js +30 -1332
- package/dist/core/canvas/focuses.js +0 -4
- package/dist/core/canvas/history.js +2 -1
- package/dist/core/canvas/migrations.d.ts +20 -0
- package/dist/core/canvas/migrations.js +1339 -0
- package/dist/core/canvas/nav-model.js +1 -11
- package/dist/core/canvas/nav-render.js +0 -8
- package/dist/core/canvas/remote-canvas-source.js +0 -2
- package/dist/core/canvas/render-source.js +31 -13
- package/dist/core/command-manifests/manifest.js +0 -10
- package/dist/core/command-manifests/schema.js +0 -4
- package/dist/core/command-plugins/transport/http-invoke.js +0 -14
- package/dist/core/command.js +0 -4
- package/dist/core/config.js +2 -1
- package/dist/core/feed/inbox.d.ts +10 -0
- package/dist/core/feed/inbox.js +18 -12
- package/dist/core/fs-utils.d.ts +9 -2
- package/dist/core/fs-utils.js +7 -15
- package/dist/core/help.js +0 -8
- package/dist/core/host-exports/export.d.ts +2 -2
- package/dist/core/host-exports/export.js +9 -12
- package/dist/core/human/answer.d.ts +2 -2
- package/dist/core/human/convention.d.ts +2 -5
- package/dist/core/human/convention.js +3 -13
- package/dist/core/human/page-schema.d.ts +2 -2
- package/dist/core/human/page-schema.js +2 -2
- package/dist/core/human/root.js +6 -23
- package/dist/core/human/scan.js +24 -7
- package/dist/core/human/tickets.d.ts +4 -1
- package/dist/core/human/tickets.js +20 -6
- package/dist/core/io.js +0 -12
- package/dist/core/memory/identity.js +0 -4
- package/dist/core/memory/inline-ref-inventory.js +3 -2
- package/dist/core/memory/lint.js +3 -6
- package/dist/core/memory-resolver.d.ts +5 -0
- package/dist/core/memory-resolver.js +14 -12
- package/dist/core/pagination.js +0 -2
- package/dist/core/preview-registry.d.ts +14 -0
- package/dist/core/preview-registry.js +2 -4
- package/dist/core/preview-result-path.js +2 -1
- package/dist/core/profiles/manifest.d.ts +37 -5
- package/dist/core/profiles/manifest.js +44 -24
- package/dist/core/profiles/select.js +0 -4
- package/dist/core/review/signal.js +4 -23
- package/dist/core/review/ticket-filter.d.ts +3 -3
- package/dist/core/review/ticket-filter.js +4 -9
- package/dist/core/runtime/__tests__/engine-route.test.js +1 -1
- package/dist/core/runtime/__tests__/spawn-env.test.js +0 -8
- package/dist/core/runtime/bearings-render.d.ts +56 -0
- package/dist/core/runtime/bearings-render.js +241 -0
- package/dist/core/runtime/bearings.d.ts +2 -17
- package/dist/core/runtime/bearings.js +12 -198
- package/dist/core/runtime/broker/auth-reload.d.ts +39 -0
- package/dist/core/runtime/broker/auth-reload.js +149 -0
- package/dist/core/runtime/broker/engine-drive.d.ts +26 -0
- package/dist/core/runtime/broker/engine-drive.js +257 -0
- package/dist/core/runtime/broker/engine-routing.d.ts +143 -0
- package/dist/core/runtime/broker/engine-routing.js +211 -0
- package/dist/core/runtime/broker/event-projection.js +3 -2
- package/dist/core/runtime/broker/fault-retry.js +5 -4
- package/dist/core/runtime/broker/frame-client.d.ts +38 -0
- package/dist/core/runtime/broker/frame-client.js +129 -0
- package/dist/core/runtime/broker/frame-dispatch.d.ts +12 -189
- package/dist/core/runtime/broker/frame-dispatch.js +89 -1476
- package/dist/core/runtime/broker/frame-engine-control.d.ts +20 -0
- package/dist/core/runtime/broker/frame-engine-control.js +231 -0
- package/dist/core/runtime/broker/frame-memory-refs.d.ts +19 -0
- package/dist/core/runtime/broker/frame-memory-refs.js +41 -0
- package/dist/core/runtime/broker/frame-model-query.d.ts +13 -0
- package/dist/core/runtime/broker/frame-model-query.js +69 -0
- package/dist/core/runtime/broker/frame-read.d.ts +19 -0
- package/dist/core/runtime/broker/frame-read.js +116 -0
- package/dist/core/runtime/broker/frame-replies.d.ts +24 -0
- package/dist/core/runtime/broker/frame-replies.js +64 -0
- package/dist/core/runtime/broker/frame-session.d.ts +34 -0
- package/dist/core/runtime/broker/frame-session.js +203 -0
- package/dist/core/runtime/broker/turn-ignition.d.ts +42 -0
- package/dist/core/runtime/broker/turn-ignition.js +74 -0
- package/dist/core/runtime/broker-extension-render.js +9 -85
- package/dist/core/runtime/broker-protocol.js +0 -4
- package/dist/core/runtime/broker-sdk.js +2 -1
- package/dist/core/runtime/broker.d.ts +1 -1
- package/dist/core/runtime/broker.js +5 -23
- package/dist/core/runtime/fault.js +3 -2
- package/dist/core/runtime/headless-pi.js +3 -2
- package/dist/core/runtime/host.js +2 -3
- package/dist/core/runtime/kickoff.js +0 -4
- package/dist/core/runtime/launch-target.js +2 -1
- package/dist/core/runtime/launch.js +3 -6
- package/dist/core/runtime/lifecycle.js +17 -26
- package/dist/core/runtime/managed-provider-cooling.d.ts +1 -1
- package/dist/core/runtime/naming.js +0 -2
- package/dist/core/runtime/nodes.js +2 -1
- package/dist/core/runtime/persona.js +0 -6
- package/dist/core/runtime/placement-tmux.js +2 -5
- package/dist/core/runtime/placement.js +4 -11
- package/dist/core/runtime/recap.js +4 -3
- package/dist/core/runtime/reopen.js +4 -7
- package/dist/core/runtime/reset.js +0 -4
- package/dist/core/runtime/resume-root.js +0 -2
- package/dist/core/runtime/revive.js +17 -13
- package/dist/core/runtime/session-list-cache.js +2 -2
- package/dist/core/runtime/shell-expansion.js +0 -2
- package/dist/core/runtime/spawn.js +0 -2
- package/dist/core/runtime/stream-watchdog.d.ts +0 -1
- package/dist/core/runtime/stream-watchdog.js +13 -18
- package/dist/core/runtime/tmux-bindings.js +0 -2
- package/dist/core/runtime/tmux-driver.d.ts +12 -0
- package/dist/core/runtime/tmux-driver.js +18 -13
- package/dist/core/runtime/warm-pool.js +0 -4
- package/dist/core/scope.js +4 -3
- package/dist/core/spawn.js +2 -3
- package/dist/core/subscription-state.js +10 -17
- package/dist/core/substrate/__tests__/surface-match-pre-command.test.d.ts +1 -0
- package/dist/core/substrate/__tests__/surface-match-pre-command.test.js +92 -0
- package/dist/core/substrate/frontmatter-validation.js +1 -1
- package/dist/core/substrate/injected-store.d.ts +6 -0
- package/dist/core/substrate/injected-store.js +24 -0
- package/dist/core/substrate/on-read.d.ts +17 -1
- package/dist/core/substrate/on-read.js +36 -2
- package/dist/core/substrate/render.js +0 -12
- package/dist/core/substrate/schema.d.ts +3 -3
- package/dist/core/substrate/schema.js +4 -16
- package/dist/core/substrate/surface-match.d.ts +19 -0
- package/dist/core/substrate/surface-match.js +60 -2
- package/dist/core/termrender/display.js +2 -1
- package/dist/core/tui/page-host.d.ts +3 -3
- package/dist/core/tui/page-host.js +4 -4
- package/dist/core/tui/panel.js +3 -3
- package/dist/core/wake.js +0 -12
- package/dist/core/worktree.js +0 -2
- package/dist/daemon/__tests__/reconciler-signature.test.d.ts +1 -0
- package/dist/daemon/__tests__/reconciler-signature.test.js +36 -0
- package/dist/daemon/api/__tests__/seam/api-server.test.js +2 -16
- package/dist/daemon/api/__tests__/seam/b10-attach-modelauth.test.js +3 -11
- package/dist/daemon/api/__tests__/seam/leaf-api-parity.test.js +0 -6
- package/dist/daemon/api/handlers/attach.js +2 -1
- package/dist/daemon/api/handlers/broker-ops.js +3 -6
- package/dist/daemon/api/handlers/canvas.js +12 -18
- package/dist/daemon/api/handlers/feedback-comments.js +0 -8
- package/dist/daemon/api/handlers/health.js +3 -2
- package/dist/daemon/api/handlers/human-requests.js +0 -10
- package/dist/daemon/api/handlers/human.js +1 -5
- package/dist/daemon/api/handlers/inbox.js +0 -18
- package/dist/daemon/api/handlers/memory.js +1 -1
- package/dist/daemon/api/handlers/messages.js +4 -8
- package/dist/daemon/api/handlers/nodes.js +10 -21
- package/dist/daemon/api/handlers/reports.js +1 -1
- package/dist/daemon/api/handlers/reviews.js +1 -6
- package/dist/daemon/api/map.js +0 -6
- package/dist/daemon/api/router.js +0 -4
- package/dist/daemon/api/server.js +2 -5
- package/dist/daemon/boot-migrations.d.ts +14 -0
- package/dist/daemon/boot-migrations.js +31 -0
- package/dist/daemon/cron/armed-context.d.ts +21 -0
- package/dist/daemon/cron/armed-context.js +100 -0
- package/dist/daemon/cron/capture.d.ts +20 -0
- package/dist/daemon/cron/capture.js +45 -0
- package/dist/daemon/cron/disposition.d.ts +19 -0
- package/dist/daemon/cron/disposition.js +52 -0
- package/dist/daemon/cron/escalation.d.ts +12 -0
- package/dist/daemon/cron/escalation.js +124 -0
- package/dist/daemon/cron/held.d.ts +4 -0
- package/dist/daemon/cron/held.js +20 -0
- package/dist/daemon/cron/lease-recovery.d.ts +3 -0
- package/dist/daemon/cron/lease-recovery.js +119 -0
- package/dist/daemon/cron/live-runs.d.ts +11 -0
- package/dist/daemon/cron/live-runs.js +23 -0
- package/dist/daemon/cron/passes.d.ts +11 -0
- package/dist/daemon/cron/passes.js +78 -0
- package/dist/daemon/cron/settle.d.ts +28 -0
- package/dist/daemon/cron/settle.js +37 -0
- package/dist/daemon/cron/sinks.d.ts +2 -0
- package/dist/daemon/cron/sinks.js +100 -0
- package/dist/daemon/cron-run.d.ts +5 -41
- package/dist/daemon/cron-run.js +193 -882
- package/dist/daemon/crtrd-cli.js +2 -1
- package/dist/daemon/crtrd.js +22 -22
- package/dist/daemon/fleet.js +0 -4
- package/dist/daemon/human/deliver-action.js +2 -1
- package/dist/daemon/human/sweep.js +15 -4
- package/dist/daemon/manage.d.ts +2 -2
- package/dist/daemon/manage.js +4 -13
- package/dist/daemon/pidfile.js +2 -2
- package/dist/daemon/reconcilers/broker-supervision.js +26 -29
- package/dist/daemon/reconcilers/dormant-inbox.d.ts +1 -1
- package/dist/daemon/reconcilers/dormant-inbox.js +2 -1
- package/dist/daemon/reconcilers/live-obligation.js +2 -2
- package/dist/daemon/reconcilers/pending-review-submit.d.ts +1 -1
- package/dist/daemon/reconcilers/pending-review-submit.js +2 -1
- package/dist/daemon/reconcilers/storage-maintenance.d.ts +2 -1
- package/dist/daemon/reconcilers/storage-maintenance.js +2 -1
- package/dist/daemon/review/companion.js +2 -2
- package/dist/daemon/review/sweep.js +8 -3
- package/dist/migrations/001-surfaces-frontmatter.js +0 -6
- package/dist/migrations/corpus.js +2 -5
- package/dist/migrations/registry.js +15 -2
- package/dist/pi-extensions/__tests__/canvas-stophook-agentend.test.js +0 -4
- package/dist/pi-extensions/__tests__/pre-command-gate.test.d.ts +1 -0
- package/dist/pi-extensions/__tests__/pre-command-gate.test.js +220 -0
- package/dist/pi-extensions/broker-local.js +2 -1
- package/dist/pi-extensions/canvas-bash-valve.js +3 -17
- package/dist/pi-extensions/canvas-context-intro.js +2 -7
- package/dist/pi-extensions/canvas-doc-substrate.d.ts +14 -0
- package/dist/pi-extensions/canvas-doc-substrate.js +77 -5
- package/dist/pi-extensions/canvas-goal-capture.js +2 -1
- package/dist/pi-extensions/canvas-inbox-watcher.js +5 -12
- package/dist/pi-extensions/canvas-passive-context.js +2 -5
- package/dist/pi-extensions/canvas-preview-result.js +2 -1
- package/dist/pi-extensions/canvas-prompt-scrub.js +2 -1
- package/dist/pi-extensions/canvas-recap.js +3 -16
- package/dist/pi-extensions/canvas-review-boundary.js +2 -5
- package/dist/pi-extensions/canvas-stophook.js +2 -26
- package/dist/pi-extensions/canvas-structured-output.js +2 -1
- package/dist/pi-extensions/canvas-tool-guide.js +2 -1
- package/dist/shared/__tests__/env-boundary.test.d.ts +1 -0
- package/dist/shared/__tests__/env-boundary.test.js +93 -0
- package/dist/shared/env.d.ts +68 -0
- package/dist/shared/env.js +171 -0
- package/package.json +3 -1
- package/runtime.lock.json +2 -2
- package/dist/core/canvas/render.d.ts +0 -47
- package/dist/core/canvas/render.js +0 -245
|
@@ -419,9 +419,7 @@ export class ChatView {
|
|
|
419
419
|
transcriptSource() {
|
|
420
420
|
return this.transcript;
|
|
421
421
|
}
|
|
422
|
-
// -------------------------------------------------------------------------
|
|
423
422
|
// Catch-up: render the welcome snapshot, then live events resume.
|
|
424
|
-
// -------------------------------------------------------------------------
|
|
425
423
|
/** Render the full message history from a `welcome` snapshot. Ports pi's
|
|
426
424
|
* `renderSessionContext` (interactive-mode.js:2553): assistant messages spawn
|
|
427
425
|
* tool-execution components matched to their toolResult messages; everything
|
|
@@ -664,11 +662,9 @@ export class ChatView {
|
|
|
664
662
|
dispose() {
|
|
665
663
|
this.settleRun();
|
|
666
664
|
}
|
|
667
|
-
// -------------------------------------------------------------------------
|
|
668
665
|
// Global display toggles (Ctrl+O / Ctrl+T), driven by the input controller.
|
|
669
666
|
// Pure client-side render state — no broker round-trip — ported from pi's
|
|
670
667
|
// `setToolsExpanded` / `toggleThinkingBlockVisibility`.
|
|
671
|
-
// -------------------------------------------------------------------------
|
|
672
668
|
/** Ctrl+O prefers summaries when the user enabled both folding and summary
|
|
673
669
|
* generation. */
|
|
674
670
|
toggleToolsExpanded() {
|
|
@@ -733,10 +729,8 @@ export class ChatView {
|
|
|
733
729
|
this.tui.requestRender();
|
|
734
730
|
return this.hideThinking;
|
|
735
731
|
}
|
|
736
|
-
// -------------------------------------------------------------------------
|
|
737
732
|
// Live stream: the 15-of-17-case handleEvent port (turn_start/turn_end no-op,
|
|
738
733
|
// exactly as interactive pi falls through default for those two).
|
|
739
|
-
// -------------------------------------------------------------------------
|
|
740
734
|
handleEvent(event) {
|
|
741
735
|
// Order behind an in-flight catch-up: a live turn that starts while a large
|
|
742
736
|
// welcome is still building is replayed after it, never interleaved into it.
|
|
@@ -986,12 +980,10 @@ export class ChatView {
|
|
|
986
980
|
// independent status loader animates.
|
|
987
981
|
this.tui.requestRender();
|
|
988
982
|
}
|
|
989
|
-
// -------------------------------------------------------------------------
|
|
990
983
|
// `!` bash live stream (broker bash_start/bash_output/bash_end frames). Mirrors
|
|
991
984
|
// pi interactive mode's `!` handling: create the component on start, stream
|
|
992
985
|
// chunks into it, mark complete on end. The persisted `bashExecution` message
|
|
993
986
|
// also rides the next snapshot, so this only drives the LIVE view.
|
|
994
|
-
// -------------------------------------------------------------------------
|
|
995
987
|
bashStart(command, excludeFromContext) {
|
|
996
988
|
if (this.deferIfBuilding(() => this.bashStart(command, excludeFromContext)))
|
|
997
989
|
return;
|
|
@@ -1022,9 +1014,7 @@ export class ChatView {
|
|
|
1022
1014
|
this.settleBashComponent(result);
|
|
1023
1015
|
this.tui.requestRender();
|
|
1024
1016
|
}
|
|
1025
|
-
// -------------------------------------------------------------------------
|
|
1026
1017
|
// Rebuild path (ports addMessageToChat, interactive-mode.js:2483).
|
|
1027
|
-
// -------------------------------------------------------------------------
|
|
1028
1018
|
addMessageToChat(message) {
|
|
1029
1019
|
// Crouter-generated context retains its runtime role (user vs custom) so
|
|
1030
1020
|
// delivery to the model is unchanged, but every attached view presents it
|
|
@@ -1166,9 +1156,7 @@ export class ChatView {
|
|
|
1166
1156
|
break;
|
|
1167
1157
|
}
|
|
1168
1158
|
}
|
|
1169
|
-
// -------------------------------------------------------------------------
|
|
1170
1159
|
// Helpers
|
|
1171
|
-
// -------------------------------------------------------------------------
|
|
1172
1160
|
/** Render an assistant reply plus its initially-hidden boundary separator.
|
|
1173
1161
|
* A turn that ended on its own abort is rendered as the interrupt it is,
|
|
1174
1162
|
* matching the live seam above, so re-reading the transcript later never
|
|
@@ -255,9 +255,7 @@ export function renderCrtrOutputText(text, theme, preserveSyntax = false) {
|
|
|
255
255
|
const body = text || '(no output)';
|
|
256
256
|
return body.split('\n').map((line) => lineStyle(line, theme, preserveSyntax)).join('\n');
|
|
257
257
|
}
|
|
258
|
-
// ---------------------------------------------------------------------------
|
|
259
258
|
// Help preview synthesis
|
|
260
|
-
// ---------------------------------------------------------------------------
|
|
261
259
|
//
|
|
262
260
|
// A collapsed `-h` card must never just parrot the call header (the command
|
|
263
261
|
// path, already shown by renderCall) or bottom out in a bare "(schema — ctrl+o
|
|
@@ -111,9 +111,7 @@ class IconPrefixedToolCall {
|
|
|
111
111
|
return lines.map((line, index) => index === 0 ? truncateToWidth(`${this.prefix}${line}`, width, '') : line);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
// ---------------------------------------------------------------------------
|
|
115
114
|
// read
|
|
116
|
-
// ---------------------------------------------------------------------------
|
|
117
115
|
/** Attach-viewer `read`: an icon + the path (plus any `:offset-limit` range).
|
|
118
116
|
* The call is a single line by construction, so a folded read shows exactly
|
|
119
117
|
* what it read and nothing else. */
|
|
@@ -143,9 +141,7 @@ export function createCrtrReadToolDefinition(cwd, fold = new FoldedToolCallContr
|
|
|
143
141
|
},
|
|
144
142
|
};
|
|
145
143
|
}
|
|
146
|
-
// ---------------------------------------------------------------------------
|
|
147
144
|
// write
|
|
148
|
-
// ---------------------------------------------------------------------------
|
|
149
145
|
/** Attach-viewer `write`: pi's builtin call renderer (it owns the
|
|
150
146
|
* syntax-highlighted content preview and its expand hint) with the icon
|
|
151
147
|
* prefixed onto its header line. Folded, only that header survives. */
|
|
@@ -179,10 +175,8 @@ export function createCrtrWriteToolDefinition(cwd, fold = new FoldedToolCallCont
|
|
|
179
175
|
},
|
|
180
176
|
};
|
|
181
177
|
}
|
|
182
|
-
// ---------------------------------------------------------------------------
|
|
183
178
|
// bash (non-crtr commands; `crtr ...` invocations get the command card in
|
|
184
179
|
// render/crtr-output.ts)
|
|
185
|
-
// ---------------------------------------------------------------------------
|
|
186
180
|
const OPERATOR_RE = /^(&&|\|\||\||;|>>|>|<|2>&1|&)$/;
|
|
187
181
|
/** Split a command into shell-ish tokens, keeping quoted spans whole. */
|
|
188
182
|
function tokenize(line) {
|
|
@@ -143,7 +143,7 @@ export function dispatchSlashCommand(text, ctx) {
|
|
|
143
143
|
return true;
|
|
144
144
|
}
|
|
145
145
|
switch (name) {
|
|
146
|
-
//
|
|
146
|
+
// direct frames
|
|
147
147
|
case 'new':
|
|
148
148
|
ctx.send({ type: 'new_session' });
|
|
149
149
|
return true;
|
|
@@ -165,7 +165,7 @@ export function dispatchSlashCommand(text, ctx) {
|
|
|
165
165
|
ctx.send({ type: 'bye' });
|
|
166
166
|
ctx.notify('Detaching — the engine keeps running');
|
|
167
167
|
return true;
|
|
168
|
-
//
|
|
168
|
+
// frames needing one argument
|
|
169
169
|
case 'name':
|
|
170
170
|
if (!arg)
|
|
171
171
|
return usage(ctx, '/name <display name>');
|
|
@@ -183,7 +183,7 @@ export function dispatchSlashCommand(text, ctx) {
|
|
|
183
183
|
return usage(ctx, '/import <path-to-session.jsonl>');
|
|
184
184
|
ctx.send({ type: 'switch_session', path: arg });
|
|
185
185
|
return true;
|
|
186
|
-
//
|
|
186
|
+
// value-picker builtins: native picker (no arg) OR direct value (arg)
|
|
187
187
|
case 'model':
|
|
188
188
|
if (!arg)
|
|
189
189
|
return openOrHint(ctx.openModelPicker, ctx, 'model', '/model <provider/id>');
|
|
@@ -211,10 +211,10 @@ export function dispatchSlashCommand(text, ctx) {
|
|
|
211
211
|
}
|
|
212
212
|
ctx.notify('The scoped-models view needs the read-op channel, which this viewer has not wired');
|
|
213
213
|
return true;
|
|
214
|
-
//
|
|
214
|
+
// settings (sub-command form; interactive menu needs read ops)
|
|
215
215
|
case 'settings':
|
|
216
216
|
return handleSettings(arg, ctx);
|
|
217
|
-
//
|
|
217
|
+
// read-only / informational
|
|
218
218
|
case 'session':
|
|
219
219
|
ctx.notify(describeSession(ctx.state));
|
|
220
220
|
return true;
|
|
@@ -227,7 +227,7 @@ export function dispatchSlashCommand(text, ctx) {
|
|
|
227
227
|
}
|
|
228
228
|
ctx.notify('/copy is not available in this viewer');
|
|
229
229
|
return true;
|
|
230
|
-
//
|
|
230
|
+
// auth commands — viewer-local OAuth/API-key flows
|
|
231
231
|
case 'login':
|
|
232
232
|
if (ctx.openLoginPicker) {
|
|
233
233
|
ctx.openLoginPicker();
|
|
@@ -242,7 +242,7 @@ export function dispatchSlashCommand(text, ctx) {
|
|
|
242
242
|
}
|
|
243
243
|
ctx.notify('/logout is not available in this viewer');
|
|
244
244
|
return true;
|
|
245
|
-
//
|
|
245
|
+
// share / clone / changelog
|
|
246
246
|
case 'share':
|
|
247
247
|
ctx.send({ type: 'share' });
|
|
248
248
|
ctx.notify('Sharing session…');
|
|
@@ -261,7 +261,7 @@ export function dispatchSlashCommand(text, ctx) {
|
|
|
261
261
|
}
|
|
262
262
|
ctx.notify('/hotkeys is not available in this viewer');
|
|
263
263
|
return true;
|
|
264
|
-
//
|
|
264
|
+
// recognized builtins with no Phase-4 wire path
|
|
265
265
|
default:
|
|
266
266
|
// A builtin we listed but didn't special-case: treat as unsupported
|
|
267
267
|
// rather than leak it to the LLM as literal text.
|
|
@@ -295,9 +295,7 @@ export function slashCommandList(commands, capabilities) {
|
|
|
295
295
|
export function commandAutocompleteItems(commands, capabilities) {
|
|
296
296
|
return withCanvasCommands(commands ?? BUILTIN_SLASH_COMMANDS, capabilities).map((c) => ({ value: `/${c.name}`, label: `/${c.name}`, description: c.description }));
|
|
297
297
|
}
|
|
298
|
-
// ---------------------------------------------------------------------------
|
|
299
298
|
// Canvas commands — native reimplementations of the canvas chrome extensions.
|
|
300
|
-
// ---------------------------------------------------------------------------
|
|
301
299
|
/** Dispatch one of the native canvas commands. Always returns `true` (the
|
|
302
300
|
* command is viewer-owned — never forwarded to the engine as a prompt). */
|
|
303
301
|
function dispatchCanvasCommand(name, arg, ctx) {
|
|
@@ -614,7 +612,6 @@ function popup(cmd) {
|
|
|
614
612
|
/* best-effort */
|
|
615
613
|
}
|
|
616
614
|
}
|
|
617
|
-
// ---------------------------------------------------------------------------
|
|
618
615
|
function usage(ctx, form) {
|
|
619
616
|
ctx.notify(`Usage: ${form}`);
|
|
620
617
|
return true;
|