@north-light/crouter 0.3.233 → 0.3.235
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/api/dto/nodes.d.ts +11 -0
- 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 +535 -537
- 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 +1 -9
- 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 +10 -23
- 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/human.js +1 -1
- package/dist/commands/memory/__tests__/command-selector-and-mutation-guards.test.js +4 -4
- package/dist/commands/memory/__tests__/memory-list-and-lint-ignore.test.d.ts +1 -0
- package/dist/commands/memory/__tests__/memory-list-and-lint-ignore.test.js +96 -0
- package/dist/commands/memory/delete.js +1 -1
- package/dist/commands/memory/edit.js +6 -3
- package/dist/commands/memory/find.js +2 -2
- package/dist/commands/memory/lint.js +2 -1
- package/dist/commands/memory/list.d.ts +4 -0
- package/dist/commands/memory/list.js +20 -14
- package/dist/commands/memory/move.js +1 -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 -0
- package/dist/commands/memory/shared.js +17 -8
- package/dist/commands/memory/write.js +8 -4
- package/dist/commands/node/bash.js +2 -1
- package/dist/commands/node/create.js +2 -1
- package/dist/commands/node/inspect.js +11 -10
- package/dist/commands/node/lifecycle.js +5 -13
- package/dist/commands/node/message.js +11 -6
- package/dist/commands/node/subscription.js +7 -2
- package/dist/commands/node/wait.js +9 -4
- 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 +3 -2
- package/dist/commands/pkg/shared.js +0 -2
- package/dist/commands/pkg.js +1 -0
- package/dist/commands/profile/delete.js +2 -1
- package/dist/commands/profile/rename.js +1 -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 +1 -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/commands/sys.js +1 -0
- 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__/cli-help-contract.test.d.ts +1 -0
- package/dist/core/__tests__/cli-help-contract.test.js +150 -0
- 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 +21 -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/__tests__/watchdog-abort-arms-retry.test.js +11 -6
- 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 +61 -19
- 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/meta-file.js +18 -27
- 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.d.ts +8 -0
- package/dist/core/canvas/remote-canvas-source.js +9 -3
- package/dist/core/canvas/render-source.js +31 -13
- package/dist/core/command-manifests/manifest.js +0 -10
- package/dist/core/command-manifests/registry.d.ts +2 -0
- package/dist/core/command-manifests/schema.js +0 -4
- package/dist/core/command-plugins/compose.js +4 -2
- package/dist/core/command-plugins/discovery.d.ts +1 -0
- package/dist/core/command-plugins/discovery.js +1 -1
- package/dist/core/command-plugins/transport/http-invoke.js +0 -14
- package/dist/core/command.js +2 -6
- package/dist/core/config.js +2 -1
- package/dist/core/fault-classifier.js +8 -0
- 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.d.ts +2 -0
- package/dist/core/pagination.js +2 -3
- 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 +11 -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/rebind.js +50 -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.d.ts +2 -2
- package/dist/core/runtime/launch.js +20 -10
- 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/stop-guard.js +28 -16
- 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.js +3 -3
- package/dist/core/substrate/frontmatter-validation.d.ts +1 -0
- package/dist/core/substrate/frontmatter-validation.js +1 -1
- package/dist/core/substrate/render.js +0 -12
- package/dist/core/substrate/schema.js +0 -12
- package/dist/core/substrate/surface-match.js +0 -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__/error-seam.test.js +27 -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 +16 -20
- package/dist/daemon/api/handlers/nodes.js +23 -22
- package/dist/daemon/api/handlers/reports.js +1 -1
- package/dist/daemon/api/handlers/reviews.js +1 -6
- package/dist/daemon/api/handlers/worktree.js +6 -22
- package/dist/daemon/api/map.d.ts +4 -2
- package/dist/daemon/api/map.js +22 -8
- 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 +27 -30
- 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/broker-local.js +2 -1
- package/dist/pi-extensions/canvas-bash-valve.js +7 -20
- package/dist/pi-extensions/canvas-context-intro.js +2 -7
- package/dist/pi-extensions/canvas-doc-substrate.js +2 -3
- 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
|
@@ -1,180 +1,13 @@
|
|
|
1
|
-
import type { AgentSessionServices, ModelRegistry
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
import { type BrokerSdkConfig } from '../launch.js';
|
|
5
|
-
import { type ClientToBroker } from '../broker-protocol.js';
|
|
1
|
+
import type { AgentSessionServices, ModelRegistry } from '@earendil-works/pi-coding-agent';
|
|
2
|
+
import type { BrokerSdkConfig } from '../launch.js';
|
|
3
|
+
import type { ClientToBroker } from '../broker-protocol.js';
|
|
6
4
|
import type { BrokerClient, BrokerClientRegistry } from './client-registry.js';
|
|
7
|
-
import {
|
|
5
|
+
import type { BrokerSession } from './read-ops.js';
|
|
6
|
+
import { type DriveFrame } from './engine-drive.js';
|
|
7
|
+
import { type PendingDialog } from './frame-client.js';
|
|
8
8
|
import type { ToolGroupTracker } from './tool-groups.js';
|
|
9
9
|
import type { EventProjection } from './event-projection.js';
|
|
10
10
|
import type { RebindDriver } from './rebind.js';
|
|
11
|
-
export declare const REVIEW_BOUNDARY_NAVIGATION_CODE = "review_boundary_navigation";
|
|
12
|
-
export declare class ReviewBoundaryNavigationError extends Error {
|
|
13
|
-
readonly targetId: string;
|
|
14
|
-
readonly code = "review_boundary_navigation";
|
|
15
|
-
constructor(targetId: string);
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Route a writable client's `prompt`/`follow_up` frame against the LIVE session
|
|
19
|
-
* state. The client picks its frame type off a possibly-STALE `isStreaming`
|
|
20
|
-
* snapshot, so the broker is authoritative and the client's choice is a HINT:
|
|
21
|
-
*
|
|
22
|
-
* - m-B (streaming-safe prompt): a `prompt` arriving mid-stream needs
|
|
23
|
-
* PromptOptions.streamingBehavior ("Required if streaming"; prompt() throws
|
|
24
|
-
* without it). "steer" mirrors pi interactive-mode's own
|
|
25
|
-
* Enter-while-streaming submit (`prompt(text, { streamingBehavior: "steer" })`).
|
|
26
|
-
* - m-C (idle-safe follow_up): pi's followUp() only enqueues into a RUNNING
|
|
27
|
-
* agent loop — on an idle session nothing ever drains the queue and the text
|
|
28
|
-
* is silently lost. An idle `follow_up` therefore runs as a prompt now.
|
|
29
|
-
*
|
|
30
|
-
* driveEngine calls this synchronously with `session.isStreaming`, so the
|
|
31
|
-
* routed state cannot go stale between the check and the engine call.
|
|
32
|
-
* C1: images ride as a field on PromptOptions (pi: `prompt(text, { images })`).
|
|
33
|
-
*/
|
|
34
|
-
export declare function resolveEngineRoute(frame: {
|
|
35
|
-
type: 'prompt' | 'follow_up';
|
|
36
|
-
images?: ImageContent[];
|
|
37
|
-
}, isStreaming: boolean): {
|
|
38
|
-
call: 'prompt';
|
|
39
|
-
options: PromptOptions;
|
|
40
|
-
} | {
|
|
41
|
-
call: 'followUp';
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* True iff `text` would be consumed by pi's OWN leading-name preflight before
|
|
45
|
-
* `session.prompt/steer/followUp` ever sees it as prose — an extension command
|
|
46
|
-
* (`session.extensionRunner.getCommand`), a `/skill:name` skill, or a `/name`
|
|
47
|
-
* prompt template (mirrors `_tryExecuteExtensionCommand` / `_expandSkillCommand`
|
|
48
|
-
* / `expandPromptTemplate` in the pinned SDK verbatim, including the exact
|
|
49
|
-
* name-parsing substrings). Inline memory-reference guidance must NEVER fire
|
|
50
|
-
* for these — the leading token routes to the engine's own command surface,
|
|
51
|
-
* not prose referencing a memory doc. Each lookup is independently wrapped so
|
|
52
|
-
* an engine missing one accessor (the fake, or a degraded session) degrades
|
|
53
|
-
* that check to "not a match" rather than aborting the whole classification —
|
|
54
|
-
* matching `buildCommandList`'s existing "no live extensionRunner" tolerance.
|
|
55
|
-
*/
|
|
56
|
-
export declare function isLeadingEngineCommand(text: string, session: {
|
|
57
|
-
extensionRunner?: {
|
|
58
|
-
getCommand(name: string): unknown;
|
|
59
|
-
};
|
|
60
|
-
resourceLoader?: {
|
|
61
|
-
getSkills(): {
|
|
62
|
-
skills: Array<{
|
|
63
|
-
name: string;
|
|
64
|
-
}>;
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
promptTemplates?: ReadonlyArray<{
|
|
68
|
-
name: string;
|
|
69
|
-
}>;
|
|
70
|
-
}): boolean;
|
|
71
|
-
/** A `steer` frame normally maps directly to pi's steer queue. Engine commands,
|
|
72
|
-
* skills, and templates must instead pass through prompt()'s leading-command
|
|
73
|
-
* preflight; with streamingBehavior:'steer', ordinary expanded text still lands
|
|
74
|
-
* in the same queue. */
|
|
75
|
-
export declare function resolveSteerCall(text: string, session: Parameters<typeof isLeadingEngineCommand>[1]): 'prompt' | 'steer';
|
|
76
|
-
/**
|
|
77
|
-
* Enumerate every leading-token STRING this session's engine would
|
|
78
|
-
* independently consume as a leading command/skill/template dispatch BEFORE
|
|
79
|
-
* inline memory-reference guidance ever applies — the read-op sibling of
|
|
80
|
-
* `isLeadingEngineCommand`'s point-lookup, gathered as a full enumeration for
|
|
81
|
-
* viewer-side suppression instead of a per-submission membership check. Same
|
|
82
|
-
* three sources, same shape of the leading match `isLeadingEngineCommand`
|
|
83
|
-
* checks (bare extension-command invocation names and prompt-template names,
|
|
84
|
-
* `skill:<name>` for skills), so `/${token}` round-trips through
|
|
85
|
-
* `isLeadingEngineCommand(text, session)` for every emitted token (locked by
|
|
86
|
-
* a test). Kept STRICTLY separate from `buildCommandList` (command
|
|
87
|
-
* completion) and the ref inventory (`RefMeta` rows) — this is neither.
|
|
88
|
-
*/
|
|
89
|
-
export declare function engineLeadingCommandTokens(session: {
|
|
90
|
-
extensionRunner?: {
|
|
91
|
-
getRegisteredCommands(): Array<{
|
|
92
|
-
invocationName: string;
|
|
93
|
-
}>;
|
|
94
|
-
};
|
|
95
|
-
resourceLoader?: {
|
|
96
|
-
getSkills(): {
|
|
97
|
-
skills: Array<{
|
|
98
|
-
name: string;
|
|
99
|
-
}>;
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
promptTemplates?: ReadonlyArray<{
|
|
103
|
-
name: string;
|
|
104
|
-
}>;
|
|
105
|
-
}): string[];
|
|
106
|
-
/**
|
|
107
|
-
* Choose how the hidden `crtr-memory-refs` guidance custom message rides
|
|
108
|
-
* alongside a human frame's own engine call (design Flow B). Pure over the
|
|
109
|
-
* frame's routing outcome — never reads live session state itself, so a
|
|
110
|
-
* caller can decide the delivery mode from the exact same `route`
|
|
111
|
-
* `resolveEngineRoute` already computed for the human call.
|
|
112
|
-
*
|
|
113
|
-
* - `steer` frame -> 'steer' (always; no route call exists).
|
|
114
|
-
* - a TRUE mid-stream follow_up (`routeCall === 'followUp'`) -> 'followUp'.
|
|
115
|
-
* - every other `prompt`/`follow_up` routed as `routeCall === 'prompt'`:
|
|
116
|
-
* idle -> 'nextTurn' (the ONLY case guidance precedes the human call —
|
|
117
|
-
* pi's `prompt()` reads+clears its pending-nextTurn queue synchronously
|
|
118
|
-
* into the SAME turn as the new user message); streaming (m-B
|
|
119
|
-
* steer-while-streaming) -> 'steer', never 'nextTurn' (that would attach
|
|
120
|
-
* to a later, unrelated turn).
|
|
121
|
-
*/
|
|
122
|
-
export declare function chooseGuidanceDeliveryMode(frameType: 'prompt' | 'follow_up' | 'steer', routeCall: 'prompt' | 'followUp' | undefined, isStreaming: boolean): 'steer' | 'followUp' | 'nextTurn';
|
|
123
|
-
/**
|
|
124
|
-
* Deliver a `nextTurn` guidance custom message ATOMICALLY around the idle-
|
|
125
|
-
* prompt call it's meant to ride alongside. Pi's `_pendingNextTurnMessages`
|
|
126
|
-
* queue (the only public seam for `deliverAs:'nextTurn'`) is drained ONLY deep
|
|
127
|
-
* inside `session.prompt()`, well after several await points — extension-
|
|
128
|
-
* command interception, the `input` extension transform, a streaming reroute,
|
|
129
|
-
* model/auth validation, pre-turn compaction — that can return or throw BEFORE
|
|
130
|
-
* the drain ever runs. `sendCustomMessage`'s nextTurn branch pushes
|
|
131
|
-
* synchronously and unconditionally, so any of those early exits strands the
|
|
132
|
-
* pushed guidance in the queue to attach itself to whichever LATER, unrelated
|
|
133
|
-
* prompt happens to reach the drain first.
|
|
134
|
-
*
|
|
135
|
-
* There is no public SDK seam to observe or cancel a pending nextTurn message
|
|
136
|
-
* (`_pendingNextTurnMessages` is TS-`private` only — a plain runtime field, not
|
|
137
|
-
* `#private`), so this reaches into that one field and removes EXACTLY the
|
|
138
|
-
* entry this call pushed, identified by object identity via a locally-
|
|
139
|
-
* generated marker riding the message's own `details` field (never surfaced to
|
|
140
|
-
* the model, and irrelevant if the message WAS consumed normally — `details`
|
|
141
|
-
* is just carried through like any other field once folded into a real turn).
|
|
142
|
-
* Runs UNCONDITIONALLY after the human call settles, success or failure/early-
|
|
143
|
-
* return alike — a "successful" `prompt()` promise can just as easily be an
|
|
144
|
-
* early return that skipped the drain (an intercepted extension command, an
|
|
145
|
-
* `input` transform, a streaming reroute) as a genuine consumed turn, so only
|
|
146
|
-
* checking `.catch` is not enough.
|
|
147
|
-
*/
|
|
148
|
-
export declare function promptWithNextTurnGuidance(session: {
|
|
149
|
-
sendCustomMessage(message: {
|
|
150
|
-
customType: string;
|
|
151
|
-
content: unknown;
|
|
152
|
-
display?: boolean;
|
|
153
|
-
details?: unknown;
|
|
154
|
-
}, options?: {
|
|
155
|
-
deliverAs?: 'steer' | 'followUp' | 'nextTurn';
|
|
156
|
-
}): Promise<void>;
|
|
157
|
-
}, guidance: string, runPrompt: () => Promise<void>): Promise<void>;
|
|
158
|
-
/** True iff a parsed JSONL branch-entry line is a hidden (`display:false`)
|
|
159
|
-
* custom message — the general display boundary crossed if left in an
|
|
160
|
-
* exported branch (not just `crtr-memory-refs` guidance; any hidden custom
|
|
161
|
-
* content). Covers both persisted shapes a branch entry can take: a
|
|
162
|
-
* `type:'custom_message'` entry (display at the entry's own top level) and a
|
|
163
|
-
* `type:'message'` entry wrapping a `role:'custom'` message (display nested
|
|
164
|
-
* under `.message`). */
|
|
165
|
-
export declare function isHiddenJsonlBranchEntry(entry: unknown): boolean;
|
|
166
|
-
/** Rewrite an already-exported JSONL file in place, dropping every hidden
|
|
167
|
-
* (`display:false`) branch entry while re-chaining `parentId` so the
|
|
168
|
-
* remaining entries stay a single valid linear branch — applying the general
|
|
169
|
-
* display:false boundary to `session.exportToJsonl`'s own output, which
|
|
170
|
-
* serializes every entry verbatim regardless of display. The header line
|
|
171
|
-
* (line 1) is copied through untouched. */
|
|
172
|
-
export declare function stripHiddenEntriesFromJsonlExport(filePath: string): void;
|
|
173
|
-
type PendingDialog = {
|
|
174
|
-
resolve: (response: Extract<ClientToBroker, {
|
|
175
|
-
type: 'extension_ui_response';
|
|
176
|
-
}>) => void;
|
|
177
|
-
};
|
|
178
11
|
export type FrameDispatchDeps = {
|
|
179
12
|
nodeId: string;
|
|
180
13
|
cfg: BrokerSdkConfig;
|
|
@@ -207,31 +40,21 @@ export declare function createFrameDispatchContext(deps: FrameDispatchDeps): {
|
|
|
207
40
|
hello: (client: BrokerClient, frame: Extract<ClientToBroker, {
|
|
208
41
|
type: "hello";
|
|
209
42
|
}>) => void;
|
|
210
|
-
drive: (client: BrokerClient, frame:
|
|
211
|
-
type: "prompt" | "steer" | "follow_up" | "abort" | "bash";
|
|
212
|
-
}>) => void;
|
|
43
|
+
drive: (client: BrokerClient, frame: DriveFrame) => void;
|
|
213
44
|
deliver: (client: BrokerClient, frame: Extract<ClientToBroker, {
|
|
214
45
|
type: "deliver";
|
|
215
46
|
}>) => void;
|
|
216
47
|
dialog: (client: BrokerClient, frame: Extract<ClientToBroker, {
|
|
217
48
|
type: "extension_ui_response";
|
|
218
49
|
}>) => void;
|
|
219
|
-
engineControl: (client: BrokerClient, frame:
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
type: "get_commands" | "list_models" | "list_scoped_models" | "list_memory_refs" | "get_tree" | "get_settings" | "list_sessions" | "get_human_fork_coordinates";
|
|
224
|
-
}>) => void;
|
|
225
|
-
session: (client: BrokerClient, frame: Extract<ClientToBroker, {
|
|
226
|
-
type: "navigate_tree" | "reload" | "export" | "new_session" | "switch_session" | "fork" | "clone" | "share";
|
|
227
|
-
}>) => void;
|
|
228
|
-
authentication: (client: BrokerClient, frame: Extract<ClientToBroker, {
|
|
229
|
-
type: "reload_auth";
|
|
230
|
-
}>) => void;
|
|
50
|
+
engineControl: (client: BrokerClient, frame: import("./frame-engine-control.js").EngineControlFrame) => void;
|
|
51
|
+
read: (client: BrokerClient, frame: import("./frame-read.js").ReadFrame) => void;
|
|
52
|
+
session: (client: BrokerClient, frame: import("./frame-session.js").SessionFrame) => void;
|
|
53
|
+
authentication: (client: BrokerClient) => void;
|
|
231
54
|
bye: (client: BrokerClient) => void;
|
|
232
55
|
shutdown: () => void;
|
|
233
56
|
};
|
|
234
|
-
kickoff(prompt: string)
|
|
57
|
+
kickoff: (prompt: string) => void;
|
|
235
58
|
notifyTurnAccepted: () => void;
|
|
236
59
|
pendingPromptDispatches: () => number;
|
|
237
60
|
resetForSession: () => void;
|