@north-light/cli 0.3.707 → 0.3.709
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 +1 -2
- package/dist/api/client.js +3 -3
- package/dist/api/contract.d.ts +1 -1
- package/dist/api/contract.js +1 -1
- package/dist/api/dto/crons.d.ts +3 -0
- package/dist/api/dto/human.d.ts +9 -6
- package/dist/api/dto/inbox.d.ts +2 -0
- package/dist/api/dto/review-comments.d.ts +12 -35
- package/dist/api/dto/reviews.d.ts +3 -10
- package/dist/api/routes.d.ts +0 -1
- package/dist/api/routes.js +1 -1
- package/dist/builtin-memory/05-kinds/review/companion/00-base.md +2 -2
- package/dist/builtin-memory/crouter-sdk/release-notes.md +6 -0
- package/dist/clients/attach/chrome/canvas-panels.d.ts +1 -1
- package/dist/clients/attach/chrome/canvas-panels.js +1 -1
- package/dist/clients/attach/chrome/inbox-strip.js +1 -1
- package/dist/clients/attach/chrome/roster.js +6 -6
- package/dist/clients/attach/chrome/status-line.d.ts +1 -1
- package/dist/clients/attach/chrome/status-line.js +1 -1
- package/dist/clients/attach/chrome/ticket-panel.js +1 -1
- package/dist/clients/attach/input/capabilities.js +1 -1
- package/dist/clients/attach/input/controller.d.ts +4 -1
- package/dist/clients/attach/input/controller.js +3 -3
- package/dist/clients/attach/input/overlay-owner.d.ts +0 -1
- package/dist/clients/attach/input/overlay-owner.js +1 -1
- package/dist/clients/attach/overlays/graph.d.ts +3 -2
- package/dist/clients/attach/overlays/graph.js +1 -1
- package/dist/clients/attach/render/chat-view.d.ts +2 -0
- package/dist/clients/attach/render/chat-view.js +1 -1
- package/dist/clients/attach/render/doc-links.d.ts +1 -1
- package/dist/clients/attach/session/chrome-refresh.js +1 -1
- package/dist/clients/attach/session/connection.d.ts +10 -9
- package/dist/clients/attach/session/connection.js +1 -1
- package/dist/clients/attach/session/context.d.ts +1 -1
- package/dist/clients/attach/session/document-links.d.ts +1 -1
- package/dist/clients/attach/session/document-links.js +1 -1
- package/dist/clients/attach/session/identity.d.ts +2 -0
- package/dist/clients/attach/session/identity.js +1 -1
- package/dist/clients/attach/session/input-wiring.d.ts +2 -0
- package/dist/clients/attach/session/input-wiring.js +1 -1
- package/dist/clients/attach/session/keys.d.ts +2 -2
- package/dist/clients/attach/session/keys.js +1 -1
- package/dist/clients/attach/session/pane-tag.d.ts +3 -1
- package/dist/clients/attach/session/pane-tag.js +1 -1
- package/dist/clients/attach/session/reconnect.js +1 -1
- package/dist/clients/attach/session/surface-host.d.ts +0 -5
- package/dist/clients/attach/session/surface-host.js +1 -1
- package/dist/clients/attach/session/teardown.d.ts +2 -2
- package/dist/clients/attach/session/teardown.js +9 -7
- package/dist/clients/attach/viewer.d.ts +7 -5
- package/dist/clients/attach/viewer.js +571 -584
- package/dist/clients/editor-roundtrip.js +3 -0
- package/dist/clients/inbox/controller.d.ts +1 -6
- package/dist/clients/inbox/controller.js +1 -1
- package/dist/clients/inbox/dto-adapt.js +1 -1
- package/dist/clients/inbox/tui/page-body.js +1 -1
- package/dist/clients/inbox/tui/render.js +2 -2
- package/dist/clients/open-browser.d.ts +2 -0
- package/dist/clients/open-browser.js +1 -0
- package/dist/clients/surfaces/host.d.ts +0 -6
- package/dist/commands/human/review.js +1 -1
- package/dist/commands/node/wait.js +2 -6
- package/dist/commands/sys/context/admin/shell.js +1 -1
- package/dist/core/broker-client/client.d.ts +6 -3
- package/dist/core/broker-client/client.js +1 -1
- package/dist/core/canvas/crons.d.ts +11 -1
- package/dist/core/canvas/crons.js +14 -14
- package/dist/core/canvas/executions.js +1 -1
- package/dist/core/canvas/schema-pg/025-review-anchors.sql +19 -0
- package/dist/core/canvas/schema-pg/026-cron-deadline-body.sql +9 -0
- package/dist/core/canvas/schema-pg/027-cron-fires.sql +4 -0
- package/dist/core/canvas/schema-version.d.ts +1 -1
- package/dist/core/canvas/schema-version.js +1 -1
- package/dist/core/command.js +5 -5
- package/dist/core/feed/messages.d.ts +5 -0
- package/dist/core/feed/messages.js +5 -5
- package/dist/core/human/page-markdown.js +10 -12
- package/dist/core/human/tickets.js +1 -1
- package/dist/core/human/types.d.ts +4 -6
- package/dist/core/keybindings/attach-control.d.ts +0 -3
- package/dist/core/keybindings/attach-control.js +1 -1
- package/dist/core/keybindings/catalog.d.ts +1 -1
- package/dist/core/keybindings/catalog.js +1 -1
- package/dist/core/review/anchors.d.ts +28 -0
- package/dist/core/review/anchors.js +6 -0
- package/dist/core/review/comments.d.ts +2 -2
- package/dist/core/review/comments.js +7 -8
- package/dist/core/review/companion.d.ts +2 -1
- package/dist/core/review/companion.js +1 -1
- package/dist/core/review/document.d.ts +4 -17
- package/dist/core/review/document.js +1 -2
- package/dist/core/review/fork.js +2 -4
- package/dist/core/review/project.d.ts +1 -1
- package/dist/core/review/project.js +2 -2
- package/dist/core/review/realize.js +1 -1
- package/dist/core/review/stage.d.ts +2 -9
- package/dist/core/review/stage.js +1 -1
- package/dist/core/review/types.d.ts +16 -12
- package/dist/core/review/types.js +1 -1
- package/dist/core/runtime/bearings.js +4 -4
- package/dist/core/runtime/boot-root.js +4 -4
- package/dist/core/runtime/broker-cli.js +3 -3
- package/dist/core/runtime/broker-extension-render.js +1 -1
- package/dist/core/runtime/lifecycle.js +2 -2
- package/dist/core/runtime/revive.js +2 -2
- package/dist/core/runtime/runner/blaxel/client.d.ts +4 -0
- package/dist/core/runtime/runner/blaxel/client.js +1 -1
- package/dist/core/runtime/runner/blaxel/runner.d.ts +2 -3
- package/dist/core/runtime/runner/blaxel/runner.js +3 -3
- package/dist/core/runtime/runner/delete-sandboxes.d.ts +5 -0
- package/dist/core/runtime/runner/delete-sandboxes.js +6 -1
- package/dist/core/runtime/runner/types.d.ts +19 -3
- package/dist/core/runtime/tmux-bindings.js +3 -3
- package/dist/daemon/api/bridge.d.ts +5 -0
- package/dist/daemon/api/bridge.js +3 -3
- package/dist/daemon/api/canvas-host.js +1 -1
- package/dist/daemon/api/document-page.d.ts +12 -1
- package/dist/daemon/api/document-page.js +6 -6
- package/dist/daemon/api/handlers/crons.d.ts +2 -0
- package/dist/daemon/api/handlers/crons.js +1 -1
- package/dist/daemon/api/handlers/inbox.js +1 -1
- package/dist/daemon/api/handlers/nodes.js +1 -1
- package/dist/daemon/api/handlers/review-comments.js +1 -1
- package/dist/daemon/api/handlers/reviews.js +1 -1
- package/dist/daemon/api/map.js +2 -2
- package/dist/daemon/api/operations.js +1 -1
- package/dist/daemon/api/review-page.d.ts +3 -0
- package/dist/daemon/api/review-page.js +13 -0
- package/dist/daemon/broker-memory-cap.d.ts +9 -0
- package/dist/daemon/broker-memory-cap.js +2 -0
- package/dist/daemon/broker-signals/bus.d.ts +1 -1
- package/dist/daemon/broker-signals/bus.js +1 -1
- package/dist/daemon/cron/ended.d.ts +3 -0
- package/dist/daemon/cron/ended.js +2 -2
- package/dist/daemon/cron/lease-recovery.js +1 -1
- package/dist/daemon/cron/machine-fire.d.ts +9 -2
- package/dist/daemon/cron/machine-fire.js +1 -1
- package/dist/daemon/cron/passes.js +1 -1
- package/dist/daemon/cron-run.js +2 -2
- package/dist/daemon/crtrd.js +14 -14
- package/dist/daemon/machine-daemon.js +1 -1
- package/dist/daemon/machine-link/client.js +1 -1
- package/dist/daemon/reconcilers/fault-retry-backstop.js +1 -1
- package/dist/daemon/reconcilers/idle-sandbox.d.ts +1 -1
- package/dist/daemon/reconcilers/idle-sandbox.js +2 -2
- package/dist/daemon/reconcilers/node-lifecycle/remote-wake.js +2 -2
- package/dist/daemon/review/comment-notify.js +2 -2
- package/dist/daemon/review/deliver.d.ts +2 -2
- package/dist/daemon/review/deliver.js +6 -2
- package/dist/daemon/review/finish.js +1 -1
- package/dist/doc-editor/Geist-Variable.woff2 +0 -0
- package/dist/doc-editor/GeistMono-Variable.woff2 +0 -0
- package/dist/doc-editor/editor.css +1 -1
- package/dist/doc-editor/review.css +2 -0
- package/dist/doc-editor/review.js +149 -0
- package/dist/pi-extensions/canvas-review-boundary.js +3 -3
- package/docs/sdk/release-notes.md +6 -0
- package/package.json +13 -4
- package/packages/crouter-api/dist/api/client.js +0 -3
- package/packages/crouter-api/dist/api/contract.js +1 -1
- package/packages/crouter-api/dist/api/routes.js +0 -1
- package/packages/crouter-api/dist/clients/attach/chrome/canvas-panels.js +3 -3
- package/packages/crouter-api/dist/clients/attach/chrome/inbox-strip.js +5 -5
- package/packages/crouter-api/dist/clients/attach/chrome/roster.js +17 -28
- package/packages/crouter-api/dist/clients/attach/chrome/status-line.js +2 -7
- package/packages/crouter-api/dist/clients/attach/chrome/ticket-panel.js +1 -1
- package/packages/crouter-api/dist/clients/attach/input/capabilities.js +2 -1
- package/packages/crouter-api/dist/clients/attach/input/controller.js +17 -3
- package/packages/crouter-api/dist/clients/attach/input/overlay-owner.js +0 -7
- package/packages/crouter-api/dist/clients/attach/overlays/graph.js +4 -3
- package/packages/crouter-api/dist/clients/attach/render/chat-view.js +9 -0
- package/packages/crouter-api/dist/clients/attach/session/chrome-refresh.js +6 -3
- package/packages/crouter-api/dist/clients/attach/session/connection.js +53 -53
- package/packages/crouter-api/dist/clients/attach/session/document-links.js +1 -1
- package/packages/crouter-api/dist/clients/attach/session/identity.js +1 -0
- package/packages/crouter-api/dist/clients/attach/session/input-wiring.js +4 -3
- package/packages/crouter-api/dist/clients/attach/session/keys.js +11 -5
- package/packages/crouter-api/dist/clients/attach/session/pane-tag.js +7 -1
- package/packages/crouter-api/dist/clients/attach/session/reconnect.js +3 -3
- package/packages/crouter-api/dist/clients/attach/session/surface-host.js +0 -17
- package/packages/crouter-api/dist/clients/attach/session/teardown.js +7 -4
- package/packages/crouter-api/dist/clients/attach/viewer.js +77 -67
- package/packages/crouter-api/dist/clients/{inbox/review/roundtrip.js → editor-roundtrip.js} +1 -1
- package/packages/crouter-api/dist/clients/inbox/controller.js +12 -31
- package/packages/crouter-api/dist/clients/inbox/dto-adapt.js +1 -0
- package/packages/crouter-api/dist/clients/inbox/tui/page-body.js +0 -7
- package/packages/crouter-api/dist/clients/inbox/tui/render.js +0 -7
- package/packages/crouter-api/dist/clients/open-browser.js +6 -0
- package/packages/crouter-api/dist/commands/human/review.js +17 -18
- package/packages/crouter-api/dist/commands/node/wait.js +2 -10
- package/packages/crouter-api/dist/commands/sys/context/admin/shell.js +1 -1
- package/packages/crouter-api/dist/core/broker-client/client.js +20 -10
- package/packages/crouter-api/dist/core/canvas/crons.js +26 -10
- package/packages/crouter-api/dist/core/canvas/executions.js +7 -2
- package/packages/crouter-api/dist/core/canvas/schema-version.js +1 -1
- package/packages/crouter-api/dist/core/command.js +3 -0
- package/packages/crouter-api/dist/core/feed/messages.js +15 -0
- package/packages/crouter-api/dist/core/human/page-markdown.js +2 -6
- package/packages/crouter-api/dist/core/human/tickets.js +2 -11
- package/packages/crouter-api/dist/core/keybindings/attach-control.js +0 -1
- package/packages/crouter-api/dist/core/keybindings/catalog.js +1 -3
- package/packages/crouter-api/dist/core/review/anchors.js +91 -0
- package/packages/crouter-api/dist/core/review/comments.js +27 -46
- package/packages/crouter-api/dist/core/review/companion.js +5 -9
- package/packages/crouter-api/dist/core/review/document.js +17 -89
- package/packages/crouter-api/dist/core/review/project.js +2 -1
- package/packages/crouter-api/dist/core/review/types.js +2 -2
- package/packages/crouter-api/dist/core/runtime/bearings.js +2 -2
- package/packages/crouter-api/dist/core/runtime/lifecycle.js +3 -0
- package/packages/crouter-api/dist/core/runtime/revive.js +5 -25
- package/packages/crouter-api/dist/core/runtime/runner/blaxel/client.js +15 -8
- package/packages/crouter-api/dist/core/runtime/runner/blaxel/runner.js +60 -19
- package/packages/crouter-api/dist/core/runtime/runner/delete-sandboxes.js +18 -2
- package/packages/crouter-api/dist/core/runtime/tmux-bindings.js +0 -5
- package/packages/crouter-api/dist/daemon/api/map.js +2 -6
- package/packages/crouter-api/dist/daemon/api/operations.js +2 -2
- package/packages/crouter-api/dist/daemon/broker-signals/bus.js +1 -1
- package/packages/crouter-api/dist/daemon/cron/ended.js +22 -11
- package/packages/crouter-api/dist/daemon/cron/machine-fire.js +69 -6
- package/packages/crouter-api/dist/daemon/reconcilers/node-lifecycle/remote-wake.js +2 -2
- package/packages/crouter-api/dist/daemon/review/deliver.js +4 -3
- package/packages/crouter-api/dist/daemon/review/finish.js +26 -47
- package/packages/crouter-api/package.json +1 -1
- package/packages/crouter-identity/package.json +1 -1
- package/packages/crouter-plugin/package.json +3 -3
- package/runtime.lock.json +1740 -505
- package/dist/clients/attach/overlays/file-review.d.ts +0 -10
- package/dist/clients/attach/overlays/file-review.js +0 -2
- package/dist/clients/inbox/review/anchors.d.ts +0 -41
- package/dist/clients/inbox/review/anchors.js +0 -1
- package/dist/clients/inbox/review/comments-client.d.ts +0 -74
- package/dist/clients/inbox/review/comments-client.js +0 -1
- package/dist/clients/inbox/review/companion-pane.d.ts +0 -47
- package/dist/clients/inbox/review/companion-pane.js +0 -1
- package/dist/clients/inbox/review/document-surface.d.ts +0 -212
- package/dist/clients/inbox/review/document-surface.js +0 -2
- package/dist/clients/inbox/review/frame.d.ts +0 -57
- package/dist/clients/inbox/review/frame.js +0 -1
- package/dist/clients/inbox/review/keys.d.ts +0 -69
- package/dist/clients/inbox/review/keys.js +0 -1
- package/dist/clients/inbox/review/launch.d.ts +0 -16
- package/dist/clients/inbox/review/launch.js +0 -1
- package/dist/clients/inbox/review/live-source.d.ts +0 -24
- package/dist/clients/inbox/review/live-source.js +0 -1
- package/dist/clients/inbox/review/nvim.d.ts +0 -15
- package/dist/clients/inbox/review/nvim.js +0 -1
- package/dist/clients/inbox/review/remap.d.ts +0 -51
- package/dist/clients/inbox/review/remap.js +0 -1
- package/dist/clients/inbox/review/review-client.d.ts +0 -43
- package/dist/clients/inbox/review/review-client.js +0 -1
- package/dist/clients/inbox/review/roundtrip.js +0 -3
- package/dist/clients/inbox/review/state.d.ts +0 -153
- package/dist/clients/inbox/review/state.js +0 -4
- package/dist/clients/inbox/review-adapter.d.ts +0 -17
- package/dist/clients/inbox/review-adapter.js +0 -1
- package/dist/core/review/remap.d.ts +0 -24
- package/dist/core/review/remap.js +0 -19
- package/dist/core/review/signal.d.ts +0 -5
- package/dist/core/review/signal.js +0 -1
- package/dist/core/runtime/starting-screen.d.ts +0 -12
- package/dist/core/runtime/starting-screen.js +0 -9
- package/packages/crouter-api/dist/clients/attach/overlays/file-review.js +0 -146
- package/packages/crouter-api/dist/clients/inbox/review/anchors.js +0 -89
- package/packages/crouter-api/dist/clients/inbox/review/comments-client.js +0 -103
- package/packages/crouter-api/dist/clients/inbox/review/companion-pane.js +0 -109
- package/packages/crouter-api/dist/clients/inbox/review/document-surface.js +0 -1268
- package/packages/crouter-api/dist/clients/inbox/review/frame.js +0 -309
- package/packages/crouter-api/dist/clients/inbox/review/keys.js +0 -133
- package/packages/crouter-api/dist/clients/inbox/review/launch.js +0 -170
- package/packages/crouter-api/dist/clients/inbox/review/live-source.js +0 -160
- package/packages/crouter-api/dist/clients/inbox/review/nvim.js +0 -43
- package/packages/crouter-api/dist/clients/inbox/review/remap.js +0 -157
- package/packages/crouter-api/dist/clients/inbox/review/review-client.js +0 -125
- package/packages/crouter-api/dist/clients/inbox/review/state.js +0 -315
- package/packages/crouter-api/dist/clients/inbox/review-adapter.js +0 -43
- package/packages/crouter-api/dist/core/review/signal.js +0 -12
- package/packages/crouter-api/dist/core/termrender/code-doc.js +0 -92
- /package/dist/clients/{inbox/review/roundtrip.d.ts → editor-roundtrip.d.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BindingDefinition, SafetyRequirement } from './types.js';
|
|
2
2
|
import type { AttachBindingId, AttachMenuBindingId } from './attach-control.js';
|
|
3
|
-
type TmuxMenuAction = 'open' | 'attach' | 'show' | 'view-settings' | 'provider-options' | 'more-detail' | 'less-detail' | 'metadata' | 'promote' | 'demote-mode' | 'resume' | 'fork' | 'demote' | 'make-resident' | 'detach' | 'close-subtree' | 'background-bash' | '
|
|
3
|
+
type TmuxMenuAction = 'open' | 'attach' | 'show' | 'view-settings' | 'provider-options' | 'more-detail' | 'less-detail' | 'metadata' | 'promote' | 'demote-mode' | 'resume' | 'fork' | 'demote' | 'make-resident' | 'detach' | 'close-subtree' | 'background-bash' | 'pin' | 'reload-viewer' | 'recap' | 'context' | 'context-admin' | 'providers' | 'plugins' | 'analytics' | 'graph' | 'focus-manager' | 'copy-id' | 'issues' | 'dashboard';
|
|
4
4
|
type TmuxMenuEntryAction = Exclude<TmuxMenuAction, 'open' | 'attach'> | `issue.${'idea' | 'bug'}`;
|
|
5
5
|
type GraphAction = 'down' | 'up' | 'first' | 'last' | 'collapse-or-manager' | 'expand-or-child' | 'focus' | 'revive' | 'focus-manager' | 'close-subtree' | 'dismiss';
|
|
6
6
|
type BrowseAction = 'quit' | 'down' | 'up' | 'first' | 'last' | 'expand-or-child' | 'collapse-or-parent' | 'toggle-fold' | 'tab-next' | 'tab-previous' | `tab.${1 | 2 | 3 | 4 | 5}` | 'close-subtree' | 'confirm-close' | 'sort' | 'scope' | 'profile' | 'residents' | 'preview' | 'report' | 'pin' | 'search' | 'revive-now' | 'focus' | 'focus-background' | 'yank-id';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var g=Object.defineProperty;var a=(t,n)=>g(t,"name",{value:n,configurable:!0});function b(t,n,s,o,l,p,u,d,m){return Object.freeze({id:t,group:n,name:s,description:o,defaults:Object.freeze([...l]),inputKind:p,contexts:Object.freeze([...u]),...d===void 0?{}:{safety:d},...m===void 0?{}:{pair:Object.freeze({...m})}})}a(b,"binding");const e=b;function r(t,n,s,o,l,p=[]){const u=`crtr.tmux.menu.${t}`,d=`crtr.tmux.menu-global.${t}`;return[e(u,"Global tmux",n,s,o,"tmux-menu-selector",l,void 0,{field:"menu",pairedId:d}),e(d,"Global tmux",n,s,p,"tmux-global-action",["tmux.root"],void 0,{field:"global",pairedId:u})]}a(r,"menuEntry");function i(t,n,s,o,l,p){return[e(t,"Attach",s,o,l,"tmux-menu-selector",["tmux.menu.attach"],void 0,{field:"menu",pairedId:n}),e(n,"Attach",s,o,p,"host-global",c,void 0,{field:"direct",pairedId:t})]}a(i,"attachEntry");const c=["attach","graph","graph.confirm"],f=["setup.login","setup.list","setup.input","setup.keybindings","setup.keybindings.edit","setup.keybindings.filter","setup.models"],h=["setup.login","setup.list","setup.keybindings","setup.models"],w=Object.freeze([e("crtr.tmux.menu.open","Global tmux","Open crouter menu","Open the crouter action menu.",["alt+c"],"host-global",["tmux.root"]),e("crtr.tmux.menu.attach","Global tmux","Attach actions","Open the attach-viewer action submenu.",["a"],"tmux-menu-selector",["tmux.menu"]),...r("dashboard","Dashboard","Show the live root conversations in this pane: which need you, which are running, which are idle.",["w"],["tmux.menu"],["alt+shift+d"]),...r("promote","Promote to orchestrator","Promote the focused node to orchestrator \u2014 it holds a roadmap and delegates.",["o"],["tmux.menu"]),...r("demote-mode","Demote to base node","Demote the focused orchestrator back to a base node \u2014 hands-on again in its own window, no roadmap to drive.",["shift+o"],["tmux.menu"]),...r("resume","Find node","Open the canvas navigator and go to the chosen node.",["/"],["tmux.menu"]),...r("fork","Fork node","Fork the focused node into an independent idle root.",["f"],["tmux.menu"]),...r("demote","Demote to terminal","Demote the focused node to terminal \u2014 it keeps running, owes a final up the spine, and reaps when done.",["d"],["tmux.menu"]),...r("make-resident","Make resident","Flip the focused node to resident \u2014 interactable, never forced to submit a final, and wakeable while attached or awaiting something live.",["shift+r"],["tmux.menu"]),...r("detach","Demote and close viewer","Demote the focused node and close its viewer; its broker keeps running off-screen.",["shift+d"],["tmux.menu"]),...r("close-subtree","Close subtree","Close the focused node and its subtree.",["x"],["tmux.menu"]),...r("background-bash","Background running bash","Hand the focused node\u2019s running bash command to its background job system.",["b"],["tmux.menu"]),...r("file-review","Review a file","Open a line-anchored review of a file named in the transcript.",["v"],["tmux.menu"]),...r("pin","Pin conversation","Pin or unpin this conversation in the canvas navigator.",["p"],["tmux.menu"]),...r("show","Inspect node","Open the focused node\u2019s inspection menu.",["i"],["tmux.menu"]),...r("view-settings","Display settings","Open the viewer display-settings menu.",["z"],["tmux.menu"]),...r("more-detail","More detail","Show the transcript one verbosity level more open, in this viewer only (same as Ctrl+O).",["m"],["tmux.menu.view-settings"]),...r("less-detail","Less detail","Show the transcript one verbosity level more collapsed, in this viewer only.",["l"],["tmux.menu.view-settings"]),...r("metadata","Show metadata","Show the focused node\u2019s metadata dossier.",["m"],["tmux.menu.show"]),...r("context","Browse context","Browse the focused node context.",["c"],["tmux.menu.show"]),...r("providers","Open settings","Open the crouter settings panel.",[","],["tmux.menu"]),...r("provider-options","Provider options","Open provider options \u2014 how an authenticated provider serves your turns, including Codex fast mode.",["."],["tmux.menu"]),...r("plugins","Browse plugins","Open the crouter plugin browser.",["l"],["tmux.menu"]),...r("analytics","Analytics","Open the Analytics page: how agents worked in the last 24 hours or 7 days.",["shift+a"],["tmux.menu"]),...r("context-admin","Context surface","Open the context surface: which documents each event delivers, and the surfaces, gates, and caps that decide it.",["shift+c"],["tmux.menu"]),...r("graph","Canvas graph","Open the canvas graph.",["g"],["tmux.menu"]),...r("focus-manager","Go to manager","Focus this node\u2019s manager.",["h"],["tmux.menu"]),...r("copy-id","Copy node id","Copy the focused node id to the system clipboard.",["y"],["tmux.menu"]),...r("reload-viewer","Reload viewer","Restart this pane\u2019s viewer in place on the installed release, keeping its flags and unsent draft.",["r"],["tmux.menu"]),...r("recap","Generate recap","Generate the focused node\u2019s Goal and State recap and refresh its generated title.",["s"],["tmux.menu"]),...r("issues","Open create menu","Open the create submenu.",["c"],["tmux.menu"]),...r("issue.idea","Create idea","Create an idea issue.",["i"],["tmux.menu.issue"]),...r("issue.bug","Create bug","Create a bug issue.",["b"],["tmux.menu.issue"]),e("crtr.tmux.node.next","Global tmux","Next node","Focus the next canvas node.",["alt+]"],"host-global",["tmux.root"]),e("crtr.tmux.node.previous","Global tmux","Previous node","Focus the previous canvas node.",["alt+["],"host-global",["tmux.root"]),e("crtr.tmux.inbox.toggle","Global tmux","Toggle inbox","Open or close the human inbox in the focused viewer.",["alt+i"],"host-global",["tmux.root"]),...i("crtr.tmux.menu.attach.detach","crtr.attach.detach","Detach","Detach from the node.",["d"],[]),...i("crtr.tmux.menu.attach.clear-or-detach","crtr.attach.clear-or-detach","Clear input (cancel agent on repeat)","Clear the input; press again within a second to cancel the running agent turn. Detach lives on its own binding.",["c"],["ctrl+c"]),...i("crtr.tmux.menu.attach.graph.toggle","crtr.attach.graph.toggle","Toggle graph","Open or close the graph overlay.",["g"],["alt+g"]),...i("crtr.tmux.menu.attach.help.toggle","crtr.attach.help.toggle","Help","Open the attach help overlay.",["?"],["alt+shift+k"]),...i("crtr.tmux.menu.attach.inbox.toggle","crtr.attach.inbox.toggle","Toggle inbox","Open or close the human inbox surface in this viewer.",["i"],[]),...i("crtr.tmux.menu.attach.inbox-strip","crtr.attach.inbox-strip","Pending requests","Jump to the pending human-request strip at the top of the pane.",["u"],["alt+u"]),...i("crtr.tmux.menu.attach.model-ladder.next","crtr.attach.model-ladder.next","Next model","Move to the next model ladder rung.",["]"],["alt+m"]),...i("crtr.tmux.menu.attach.model-ladder.previous","crtr.attach.model-ladder.previous","Previous model","Move to the previous model ladder rung.",["["],["alt+shift+m"]),...i("crtr.tmux.menu.attach.command.inspect","crtr.attach.command.inspect","Inspect loaded command","Open the loaded slash command\u2019s expanded prompt.",["h"],["alt+shift+h"]),...i("crtr.tmux.menu.attach.file-review","crtr.attach.file-review","Review a file","Open a line-anchored review of a file named in the transcript.",[],["alt+shift+r"]),...i("crtr.tmux.menu.attach.profile-files","crtr.attach.profile-files","Search profile files","Fuzzy-match path segments across the node family\u2019s working directories, their context directories (files), profile projects and the profile\u2019s own directory; Ctrl+Y copies a selected path.",["f"],["ctrl+f"]),...i("crtr.tmux.menu.attach.search","crtr.attach.search","Search transcript","Search the transcript as it is currently displayed \u2014 folded tool output is not searched until it is unfolded.",["/"],["alt+/"]),...i("crtr.tmux.menu.attach.reload-viewer","crtr.attach.reload-viewer","Reload viewer","Restart this viewer in place on the installed release.",[],[]),...i("crtr.tmux.menu.attach.whip","crtr.attach.whip","Whip agent","Interrupt the agent and send a playful command.",["w"],[]),e("crtr.attach.scroll.up","Attach","Scroll up","Scroll the transcript one line up.",["shift+up","ctrl+k"],"terminal",c),e("crtr.attach.scroll.down","Attach","Scroll down","Scroll the transcript one line down.",["shift+down","ctrl+j"],"terminal",c),e("crtr.attach.scroll.page-up","Attach","Scroll page up","Scroll the transcript one page up.",["pageup","ctrl+u"],"terminal",c),e("crtr.attach.scroll.page-down","Attach","Scroll page down","Scroll the transcript one page down.",["pagedown","ctrl+d"],"terminal",c),e("crtr.attach.scroll.live","Attach","Return to live","Return the transcript to the live bottom.",["shift+end","ctrl+g"],"terminal",c),e("crtr.attach.mouse.toggle","Attach","Toggle mouse wheel scrolling","Toggle mouse wheel scrolling on or off.",["alt+shift+o"],"terminal",c),e("crtr.attach.copy.message","Attach","Copy visible message","Copy the newest message visible in the transcript viewport.",["alt+shift+y"],"terminal",c),e("crtr.attach.verbosity.less","Attach","Less detail","Show the transcript one verbosity level more collapsed, in this viewer only; Ctrl+O shows more.",["ctrl+shift+o"],"terminal",c),e("crtr.attach.search.next","Attach","Next match","Move to the next transcript search match.",["n"],"terminal",["attach.search"]),e("crtr.attach.search.previous","Attach","Previous match","Move to the previous transcript search match.",["shift+n"],"terminal",["attach.search"]),e("crtr.attach.search.edit","Attach","Edit query","Return to editing the transcript search query.",["/"],"terminal",["attach.search"]),e("crtr.attach.search.close","Attach","Close search","Leave transcript search and clear its highlights.",["escape"],"terminal",["attach.search"],"dismiss-modal"),e("crtr.graph.down","GRAPH","Move down","Move to the next graph row.",["j","down"],"terminal",["graph"]),e("crtr.graph.up","GRAPH","Move up","Move to the previous graph row.",["k","up"],"terminal",["graph"]),e("crtr.graph.first","GRAPH","First row","Move to the first graph row.",["g"],"terminal",["graph"]),e("crtr.graph.last","GRAPH","Last row","Move to the last graph row.",["shift+g"],"terminal",["graph"]),e("crtr.graph.collapse-or-manager","GRAPH","Collapse or manager","Collapse a node or move to its manager.",["h","left"],"terminal",["graph"]),e("crtr.graph.expand-or-child","GRAPH","Expand or child","Expand a node or move to its child.",["l","right"],"terminal",["graph"]),e("crtr.graph.focus","GRAPH","Focus node","Focus the selected node.",["enter"],"terminal",["graph"]),e("crtr.graph.revive","GRAPH","Revive node","Revive and open the selected dormant node.",["r"],"terminal",["graph"]),e("crtr.graph.focus-manager","GRAPH","Focus manager","Focus the selected node manager.",["m"],"terminal",["graph"]),e("crtr.graph.close-subtree","GRAPH","Close subtree","Ask to close the selected subtree.",["x"],"terminal",["graph"]),e("crtr.graph.dismiss","GRAPH","Dismiss graph","Close the graph overlay.",["escape"],"terminal",["graph"],"dismiss-modal"),e("crtr.graph.confirm.accept","GRAPH","Confirm close","Confirm closing the selected subtree.",["y"],"terminal",["graph.confirm"]),e("crtr.graph.confirm.cancel","GRAPH","Cancel close","Cancel closing the selected subtree.",["n","escape"],"terminal",["graph.confirm"],"dismiss-modal"),e("crtr.inspector.force-quit","Inspector","Force quit Inspector","Immediately leave the Inspector.",["ctrl+c"],"host-global",["inspector"],"leave-screen"),e("crtr.inspector.down","Inspector","Move down","Move the Inspector selection or scroll cursor down.",["j","down"],"terminal",["inspector"]),e("crtr.inspector.up","Inspector","Move up","Move the Inspector selection or scroll cursor up.",["k","up"],"terminal",["inspector"]),e("crtr.inspector.section-next","Inspector","Next section","Move to the next Inspector section.",["tab"],"terminal",["inspector"]),e("crtr.inspector.section-prev","Inspector","Previous section","Move to the previous Inspector section.",["shift+tab"],"terminal",["inspector"]),e("crtr.inspector.page-down","Inspector","Page down","Scroll the Inspector detail body down.",["ctrl+d","pagedown"],"terminal",["inspector"]),e("crtr.inspector.page-up","Inspector","Page up","Scroll the Inspector detail body up.",["ctrl+u","pageup"],"terminal",["inspector"]),e("crtr.inspector.toggle-detail","Inspector","Toggle item detail","Expand or collapse the selected cron or background job.",["enter"],"terminal",["inspector"]),e("crtr.inspector.cancel-item","Inspector","Cancel selected item","Arm cancellation for the selected cron, or stopping for the selected background job.",["x"],"terminal",["inspector"]),e("crtr.inspector.open-log","Inspector","Open job log","Follow the selected background job\u2019s log in a new tmux window.",["o"],"terminal",["inspector"]),e("crtr.inspector.confirm","Inspector","Confirm action","Confirm the armed Inspector action.",["y"],"terminal",["inspector"]),e("crtr.inspector.dismiss","Inspector","Dismiss action","Dismiss an Inspector confirmation or banner.",["escape"],"terminal",["inspector"],"dismiss-modal"),e("crtr.inspector.retarget","Inspector","Retarget","Inspect the selected cron anchor or creator node.",["t"],"terminal",["inspector"]),e("crtr.inspector.refresh","Inspector","Refresh","Refresh the Inspector now.",["g","r"],"terminal",["inspector"]),e("crtr.inspector.quit","Inspector","Quit","Leave the Inspector.",["q"],"terminal",["inspector"],"leave-screen"),...v(),...x(),...k(),...y()]);function v(){const t="browse";return[e("crtr.browse.quit","Browse and pickers","Quit browse","Leave canvas browse.",["q","escape","ctrl+c"],"terminal",[t],"leave-screen"),e("crtr.browse.down","Browse and pickers","Move down","Move to the next row.",["j","down"],"terminal",[t]),e("crtr.browse.up","Browse and pickers","Move up","Move to the previous row.",["k","up"],"terminal",[t]),e("crtr.browse.first","Browse and pickers","First row","Move to the first row.",["g"],"terminal",[t]),e("crtr.browse.last","Browse and pickers","Last row","Move to the last row.",["shift+g"],"terminal",[t]),e("crtr.browse.expand-or-child","Browse and pickers","Expand or child","Expand a row or move to its child.",["l","right"],"terminal",[t]),e("crtr.browse.collapse-or-parent","Browse and pickers","Collapse or parent","Collapse a row or move to its parent.",["h","left"],"terminal",[t]),e("crtr.browse.toggle-fold","Browse and pickers","Toggle fold","Toggle the selected fold.",["space"],"terminal",[t]),e("crtr.browse.tab-next","Browse and pickers","Next tab","Select the next browse tab.",["tab","]"],"terminal",[t]),e("crtr.browse.tab-previous","Browse and pickers","Previous tab","Select the previous browse tab.",["shift+tab","["],"terminal",[t]),...[1,2,3,4,5].map(n=>e(`crtr.browse.tab.${n}`,"Browse and pickers",`Tab ${n}`,`Select browse tab ${n}.`,[`${n}`],"terminal",[t])),e("crtr.browse.close-subtree","Browse and pickers","Close subtree","Ask to close the selected subtree.",["x"],"terminal",[t]),e("crtr.browse.confirm-close","Browse and pickers","Confirm close","Confirm closing the selected subtree.",["y"],"terminal",["browse.confirm"]),e("crtr.browse.sort","Browse and pickers","Change sort","Change the browse sort.",["s"],"terminal",[t]),e("crtr.browse.scope","Browse and pickers","Change scope","Toggle the browse cwd scope.",["c"],"terminal",[t]),e("crtr.browse.profile","Browse and pickers","Toggle profile","Toggle the browse profile scope.",["shift+p"],"terminal",[t]),e("crtr.browse.residents","Browse and pickers","Toggle residents","Toggle resident display.",["r"],"terminal",[t]),e("crtr.browse.preview","Browse and pickers","Toggle preview","Toggle the preview panel.",["v"],"terminal",[t]),e("crtr.browse.report","Browse and pickers","Toggle report","Swap the preview panel between the conversation and the node's newest report.",["shift+v"],"terminal",[t]),e("crtr.browse.pin","Browse and pickers","Pin node","Star or unstar the selected node.",["p"],"terminal",[t]),e("crtr.browse.search","Browse and pickers","Search","Open browse search.",["/"],"terminal",[t]),e("crtr.browse.revive-now","Browse and pickers","Revive now","Revive the selected node now.",["shift+k"],"terminal",[t]),e("crtr.browse.focus","Browse and pickers","Focus node","Focus the selected node.",["enter","o"],"terminal",[t]),e("crtr.browse.focus-background","Browse and pickers","Focus node (keep browsing)","Focus the selected node without leaving the navigator.",["shift+o"],"terminal",[t]),e("crtr.browse.yank-id","Browse and pickers","Yank node id","Copy the selected node id to the system clipboard.",["y"],"terminal",[t]),e("crtr.browse.search.cancel","Browse and pickers","Cancel search","Cancel browse search.",["escape"],"terminal",["browse.search"],"dismiss-modal"),e("crtr.browse.search.commit","Browse and pickers","Commit search","Apply browse search.",["enter"],"terminal",["browse.search"]),e("crtr.browse.search.delete","Browse and pickers","Delete search text","Delete the previous search character.",["backspace"],"terminal",["browse.search"]),e("crtr.browse.search.quit","Browse and pickers","Quit browse","Leave canvas browse from search.",["ctrl+c"],"terminal",["browse.search"],"leave-screen")]}a(v,"browseBindings");function x(){const t="dashboard",n="dashboard.confirm",s="dashboard.input",o="Dashboard";return[e("crtr.dashboard.down",o,"Move down","Move to the next row.",["j","down"],"terminal",[t]),e("crtr.dashboard.up",o,"Move up","Move to the previous row.",["k","up"],"terminal",[t]),e("crtr.dashboard.first",o,"First row","Move to the first row.",["g"],"terminal",[t]),e("crtr.dashboard.last",o,"Last row","Move to the last row.",["shift+g"],"terminal",[t]),e("crtr.dashboard.expand",o,"Expand","Show the selected conversation\u2019s children.",["l","right"],"terminal",[t]),e("crtr.dashboard.collapse",o,"Collapse","Hide the selected conversation\u2019s children.",["h","left"],"terminal",[t]),e("crtr.dashboard.open",o,"Open","Open the selected conversation in this pane.",["enter"],"terminal",[t]),e("crtr.dashboard.pin",o,"Pin","Star or unstar the selected conversation.",["p"],"terminal",[t]),e("crtr.dashboard.rename",o,"Rename","Rename the selected conversation.",["shift+r"],"terminal",[t]),e("crtr.dashboard.close",o,"Close","Finish the selected conversation and remove its row.",["x"],"terminal",[t]),e("crtr.dashboard.confirm-close",o,"Confirm close","Close a conversation that is running.",["y"],"terminal",[n]),e("crtr.dashboard.cancel-close",o,"Cancel close","Keep the running conversation.",["n","escape"],"terminal",[n]),e("crtr.dashboard.profile",o,"Toggle profile","Switch between this profile and all profiles.",["shift+p"],"terminal",[t]),e("crtr.dashboard.input",o,"New conversation","Focus the new-conversation input.",["n"],"terminal",[t]),e("crtr.dashboard.input-cancel",o,"Leave input","Leave the input without clearing it.",["escape"],"terminal",[s]),e("crtr.dashboard.input-submit",o,"Start conversation","Start a root conversation from the input text.",["enter"],"terminal",[s]),e("crtr.dashboard.directory-next",o,"Next directory","Select the next directory for the new conversation.",["tab"],"terminal",[s]),e("crtr.dashboard.directory-previous",o,"Previous directory","Select the previous directory for the new conversation.",["shift+tab"],"terminal",[s]),e("crtr.dashboard.help",o,"Help","Show the dashboard keys.",["?"],"terminal",[t])]}a(x,"dashboardBindings");function k(){const t="profile.menu",n="profile.search";return[e("crtr.profile.menu.up","Profiles","Move up","Move to the previous profile.",["k","up"],"terminal",[t]),e("crtr.profile.menu.down","Profiles","Move down","Move to the next profile.",["j","down"],"terminal",[t]),e("crtr.profile.menu.select","Profiles","Select profile","Select the highlighted profile.",["enter"],"terminal",[t]),e("crtr.profile.menu.accept-default","Profiles","Accept default","Accept the default profile.",["escape"],"terminal",[t],"leave-screen"),e("crtr.profile.menu.abort","Profiles","Abort","Leave profile selection.",["ctrl+c"],"terminal",[t],"leave-screen"),...[1,2,3,4,5,6,7,8,9].map(s=>e(`crtr.profile.menu.slot.${s}`,"Profiles",`Profile slot ${s}`,`Select profile slot ${s}.`,[`${s}`],"terminal",[t])),e("crtr.profile.menu.create","Profiles","Create profile","Create a profile.",["c"],"terminal",[t]),e("crtr.profile.menu.search-existing","Profiles","Search profiles","Search existing profiles.",["s"],"terminal",[t]),e("crtr.profile.menu.use-root","Profiles","Use root profile","Use the root profile.",["r"],"terminal",[t]),e("crtr.profile.menu.set-default","Profiles","Set default","Set the selected profile as default.",["d"],"terminal",[t]),e("crtr.profile.menu.add-directory","Profiles","Add directory","Add a directory to the profile.",["a"],"terminal",[t]),e("crtr.profile.menu.unpin","Profiles","Unpin directory","Unpin the selected directory.",["u"],"terminal",[t]),e("crtr.profile.menu.manage","Profiles","Manage profiles","Open the profiles settings page in a popup.",["v"],"terminal",[t]),e("crtr.profile.search.up","Profiles","Move up","Move to the previous search result.",["up","ctrl+p"],"terminal",[n]),e("crtr.profile.search.down","Profiles","Move down","Move to the next search result.",["down","ctrl+n"],"terminal",[n]),e("crtr.profile.search.pick","Profiles","Pick profile","Pick the highlighted profile.",["enter"],"terminal",[n]),e("crtr.profile.search.back","Profiles","Back","Return to profile selection.",["escape"],"terminal",[n],"leave-screen"),e("crtr.profile.search.delete","Profiles","Delete filter text","Delete the previous filter character.",["backspace"],"terminal",[n]),e("crtr.profile.search.abort","Profiles","Abort","Leave profile search.",["ctrl+c"],"terminal",[n],"leave-screen")]}a(k,"profileBindings");function y(){return[e("crtr.setup.cancel","Setup","Cancel setup","Leave the setup wizard.",["q","ctrl+c","ctrl+d"],"terminal",f,"leave-screen"),e("crtr.setup.tab-next","Setup","Next tab","Select the next setup tab.",["tab","right"],"terminal",h),e("crtr.setup.tab-previous","Setup","Previous tab","Select the previous setup tab.",["shift+tab","left"],"terminal",h),e("crtr.setup.open","Setup","Open","Open the selected setup item.",["enter"],"terminal",["setup.login"]),e("crtr.setup.list-down","Setup","Move down","Move to the next setup item.",["j","down"],"terminal",["setup.list","setup.models","setup.models.dimension-picker","setup.models.route-form"]),e("crtr.setup.list-up","Setup","Move up","Move to the previous setup item.",["k","up"],"terminal",["setup.list","setup.models","setup.models.dimension-picker","setup.models.route-form"]),e("crtr.setup.toggle","Setup","Toggle","Toggle the selected setup item.",["space"],"terminal",["setup.list","setup.keybindings"]),e("crtr.setup.details","Setup","Show details","Show details for the selected item.",["?"],"terminal",["setup.list"]),e("crtr.setup.advance","Setup","Advance","Advance the setup flow.",["enter"],"terminal",["setup.list"]),e("crtr.setup.confirm.accept","Setup","Confirm","Accept the setup confirmation.",["y","enter"],"terminal",["setup.confirm","setup.models.confirm"]),e("crtr.setup.confirm.back","Setup","Go back","Cancel the setup confirmation.",["n","escape","q"],"terminal",["setup.confirm","setup.models.confirm"],"dismiss-modal"),e("crtr.setup.keybindings.edit","Setup","Edit binding","Edit the selected binding.",["enter"],"terminal",["setup.keybindings"]),e("crtr.setup.keybindings.commit-edit","Setup","Commit edit","Commit the active binding edit.",["enter"],"terminal",["setup.keybindings.edit"]),e("crtr.setup.keybindings.cancel-edit","Setup","Cancel edit","Cancel the active binding edit.",["escape"],"terminal",["setup.keybindings.edit"],"dismiss-modal"),e("crtr.setup.keybindings.unbind","Setup","Unbind","Disable the selected binding.",["delete"],"terminal",["setup.keybindings"]),e("crtr.setup.keybindings.reset-row","Setup","Reset binding","Reset the selected binding.",["r"],"terminal",["setup.keybindings"]),e("crtr.setup.keybindings.reset-all","Setup","Reset all bindings","Reset all bindings to defaults.",["shift+r"],"terminal",["setup.keybindings"]),e("crtr.setup.keybindings.save","Setup","Save bindings","Save keybinding changes.",["s"],"terminal",["setup.keybindings"],"save-keybindings"),e("crtr.setup.keybindings.discard","Setup","Discard changes","Discard keybinding changes.",["escape"],"terminal",["setup.keybindings"],"leave-screen"),e("crtr.setup.keybindings.page-up","Setup","Page up","Move up one keybinding page.",["pageup"],"terminal",["setup.keybindings","setup.keybindings.edit"]),e("crtr.setup.keybindings.page-down","Setup","Page down","Move down one keybinding page.",["pagedown"],"terminal",["setup.keybindings","setup.keybindings.edit"]),e("crtr.setup.keybindings.filter","Setup","Filter bindings","Open the keybinding filter.",["/"],"terminal",["setup.keybindings"]),e("crtr.setup.keybindings.filter-delete","Setup","Delete filter text","Delete the previous filter character.",["backspace"],"terminal",["setup.keybindings.filter"]),e("crtr.setup.keybindings.filter-clear","Setup","Clear filter","Clear the keybinding filter.",["escape"],"terminal",["setup.keybindings.filter"],"dismiss-modal"),e("crtr.setup.cell-previous","Setup","Previous field","Select the previous field or setup table cell.",["h"],"terminal",["setup.models","setup.keybindings"]),e("crtr.setup.cell-next","Setup","Next field","Select the next field or setup table cell.",["l"],"terminal",["setup.models","setup.keybindings"]),e("crtr.setup.models.open","Setup","Edit model","Edit the selected model cell or route field.",["enter"],"terminal",["setup.models","setup.models.route-form"]),e("crtr.setup.models.scope-next","Setup","Next model config scope","Edit the next applicable user, profile, or project config.",["s"],"terminal",["setup.models"]),e("crtr.setup.models.commit","Setup","Commit pick","Commit the provider, strength, model, or thinking-level pick.",["enter"],"terminal",["setup.models.picker","setup.models.dimension-picker"]),e("crtr.setup.models.cancel","Setup","Cancel pick","Cancel the model picker or route form.",["escape"],"terminal",["setup.models.picker","setup.models.dimension-picker","setup.models.route-form"],"dismiss-modal")]}a(y,"setupBindings");const C=new Set(w.map(t=>t.id));function P(t){return t.contexts.includes("attach")&&(t.inputKind==="terminal"||t.inputKind==="host-global")}a(P,"isAttachPaneBinding");const A=Object.freeze([{context:"graph",capability:"dismiss-modal"},{context:"graph.confirm",capability:"dismiss-modal"},{context:"inspector",capability:"leave-screen"},{context:"inspector",capability:"dismiss-modal"},{context:"attach.search",capability:"dismiss-modal"},{context:"browse",capability:"leave-screen"},{context:"browse.search",capability:"dismiss-modal"},{context:"profile.menu",capability:"leave-screen"},{context:"profile.search",capability:"leave-screen"},{context:"setup.login",capability:"leave-screen"},{context:"setup.list",capability:"leave-screen"},{context:"setup.input",capability:"leave-screen"},{context:"setup.confirm",capability:"dismiss-modal"},{context:"setup.keybindings",capability:"leave-screen"},{context:"setup.keybindings",capability:"save-keybindings"},{context:"setup.keybindings.edit",capability:"dismiss-modal"},{context:"setup.keybindings.filter",capability:"dismiss-modal"},{context:"setup.models",capability:"leave-screen"},{context:"setup.models.picker",capability:"dismiss-modal"},{context:"setup.models.dimension-picker",capability:"dismiss-modal"},{context:"setup.models.route-form",capability:"dismiss-modal"},{context:"setup.models.confirm",capability:"dismiss-modal"}]);export{w as BINDING_CATALOG,C as BINDING_IDS,A as SAFETY_REQUIREMENTS,P as isAttachPaneBinding};
|
|
1
|
+
var g=Object.defineProperty;var a=(t,n)=>g(t,"name",{value:n,configurable:!0});function b(t,n,s,o,l,p,u,d,m){return Object.freeze({id:t,group:n,name:s,description:o,defaults:Object.freeze([...l]),inputKind:p,contexts:Object.freeze([...u]),...d===void 0?{}:{safety:d},...m===void 0?{}:{pair:Object.freeze({...m})}})}a(b,"binding");const e=b;function r(t,n,s,o,l,p=[]){const u=`crtr.tmux.menu.${t}`,d=`crtr.tmux.menu-global.${t}`;return[e(u,"Global tmux",n,s,o,"tmux-menu-selector",l,void 0,{field:"menu",pairedId:d}),e(d,"Global tmux",n,s,p,"tmux-global-action",["tmux.root"],void 0,{field:"global",pairedId:u})]}a(r,"menuEntry");function i(t,n,s,o,l,p){return[e(t,"Attach",s,o,l,"tmux-menu-selector",["tmux.menu.attach"],void 0,{field:"menu",pairedId:n}),e(n,"Attach",s,o,p,"host-global",c,void 0,{field:"direct",pairedId:t})]}a(i,"attachEntry");const c=["attach","graph","graph.confirm"],f=["setup.login","setup.list","setup.input","setup.keybindings","setup.keybindings.edit","setup.keybindings.filter","setup.models"],h=["setup.login","setup.list","setup.keybindings","setup.models"],w=Object.freeze([e("crtr.tmux.menu.open","Global tmux","Open crouter menu","Open the crouter action menu.",["alt+c"],"host-global",["tmux.root"]),e("crtr.tmux.menu.attach","Global tmux","Attach actions","Open the attach-viewer action submenu.",["a"],"tmux-menu-selector",["tmux.menu"]),...r("dashboard","Dashboard","Show the live root conversations in this pane: which need you, which are running, which are idle.",["w"],["tmux.menu"],["alt+shift+d"]),...r("promote","Promote to orchestrator","Promote the focused node to orchestrator \u2014 it holds a roadmap and delegates.",["o"],["tmux.menu"]),...r("demote-mode","Demote to base node","Demote the focused orchestrator back to a base node \u2014 hands-on again in its own window, no roadmap to drive.",["shift+o"],["tmux.menu"]),...r("resume","Find node","Open the canvas navigator and go to the chosen node.",["/"],["tmux.menu"]),...r("fork","Fork node","Fork the focused node into an independent idle root.",["f"],["tmux.menu"]),...r("demote","Demote to terminal","Demote the focused node to terminal \u2014 it keeps running, owes a final up the spine, and reaps when done.",["d"],["tmux.menu"]),...r("make-resident","Make resident","Flip the focused node to resident \u2014 interactable, never forced to submit a final, and wakeable while attached or awaiting something live.",["shift+r"],["tmux.menu"]),...r("detach","Demote and close viewer","Demote the focused node and close its viewer; its broker keeps running off-screen.",["shift+d"],["tmux.menu"]),...r("close-subtree","Close subtree","Close the focused node and its subtree.",["x"],["tmux.menu"]),...r("background-bash","Background running bash","Hand the focused node\u2019s running bash command to its background job system.",["b"],["tmux.menu"]),...r("pin","Pin conversation","Pin or unpin this conversation in the canvas navigator.",["p"],["tmux.menu"]),...r("show","Inspect node","Open the focused node\u2019s inspection menu.",["i"],["tmux.menu"]),...r("view-settings","Display settings","Open the viewer display-settings menu.",["z"],["tmux.menu"]),...r("more-detail","More detail","Show the transcript one verbosity level more open, in this viewer only (same as Ctrl+O).",["m"],["tmux.menu.view-settings"]),...r("less-detail","Less detail","Show the transcript one verbosity level more collapsed, in this viewer only.",["l"],["tmux.menu.view-settings"]),...r("metadata","Show metadata","Show the focused node\u2019s metadata dossier.",["m"],["tmux.menu.show"]),...r("context","Browse context","Browse the focused node context.",["c"],["tmux.menu.show"]),...r("providers","Open settings","Open the crouter settings panel.",[","],["tmux.menu"]),...r("provider-options","Provider options","Open provider options \u2014 how an authenticated provider serves your turns, including Codex fast mode.",["."],["tmux.menu"]),...r("plugins","Browse plugins","Open the crouter plugin browser.",["l"],["tmux.menu"]),...r("analytics","Analytics","Open the Analytics page: how agents worked in the last 24 hours or 7 days.",["shift+a"],["tmux.menu"]),...r("context-admin","Context surface","Open the context surface: which documents each event delivers, and the surfaces, gates, and caps that decide it.",["shift+c"],["tmux.menu"]),...r("graph","Canvas graph","Open the canvas graph.",["g"],["tmux.menu"]),...r("focus-manager","Go to manager","Focus this node\u2019s manager.",["h"],["tmux.menu"]),...r("copy-id","Copy node id","Copy the focused node id to the system clipboard.",["y"],["tmux.menu"]),...r("reload-viewer","Reload viewer","Restart this pane\u2019s viewer in place on the installed release, keeping its flags and unsent draft.",["r"],["tmux.menu"]),...r("recap","Generate recap","Generate the focused node\u2019s Goal and State recap and refresh its generated title.",["s"],["tmux.menu"]),...r("issues","Open create menu","Open the create submenu.",["c"],["tmux.menu"]),...r("issue.idea","Create idea","Create an idea issue.",["i"],["tmux.menu.issue"]),...r("issue.bug","Create bug","Create a bug issue.",["b"],["tmux.menu.issue"]),e("crtr.tmux.node.next","Global tmux","Next node","Focus the next canvas node.",["alt+]"],"host-global",["tmux.root"]),e("crtr.tmux.node.previous","Global tmux","Previous node","Focus the previous canvas node.",["alt+["],"host-global",["tmux.root"]),e("crtr.tmux.inbox.toggle","Global tmux","Toggle inbox","Open or close the human inbox in the focused viewer.",["alt+i"],"host-global",["tmux.root"]),...i("crtr.tmux.menu.attach.detach","crtr.attach.detach","Detach","Detach from the node.",["d"],[]),...i("crtr.tmux.menu.attach.clear-or-detach","crtr.attach.clear-or-detach","Clear input (cancel agent on repeat)","Clear the input; press again within a second to cancel the running agent turn. Detach lives on its own binding.",["c"],["ctrl+c"]),...i("crtr.tmux.menu.attach.graph.toggle","crtr.attach.graph.toggle","Toggle graph","Open or close the graph overlay.",["g"],["alt+g"]),...i("crtr.tmux.menu.attach.help.toggle","crtr.attach.help.toggle","Help","Open the attach help overlay.",["?"],["alt+shift+k"]),...i("crtr.tmux.menu.attach.inbox.toggle","crtr.attach.inbox.toggle","Toggle inbox","Open or close the human inbox surface in this viewer.",["i"],[]),...i("crtr.tmux.menu.attach.inbox-strip","crtr.attach.inbox-strip","Pending requests","Jump to the pending human-request strip at the top of the pane.",["u"],["alt+u"]),...i("crtr.tmux.menu.attach.model-ladder.next","crtr.attach.model-ladder.next","Next model","Move to the next model ladder rung.",["]"],["alt+m"]),...i("crtr.tmux.menu.attach.model-ladder.previous","crtr.attach.model-ladder.previous","Previous model","Move to the previous model ladder rung.",["["],["alt+shift+m"]),...i("crtr.tmux.menu.attach.command.inspect","crtr.attach.command.inspect","Inspect loaded command","Open the loaded slash command\u2019s expanded prompt.",["h"],["alt+shift+h"]),...i("crtr.tmux.menu.attach.profile-files","crtr.attach.profile-files","Search profile files","Fuzzy-match path segments across the node family\u2019s working directories, their context directories (files), profile projects and the profile\u2019s own directory; Ctrl+Y copies a selected path.",["f"],["ctrl+f"]),...i("crtr.tmux.menu.attach.search","crtr.attach.search","Search transcript","Search the transcript as it is currently displayed \u2014 folded tool output is not searched until it is unfolded.",["/"],["alt+/"]),...i("crtr.tmux.menu.attach.reload-viewer","crtr.attach.reload-viewer","Reload viewer","Restart this viewer in place on the installed release.",[],[]),...i("crtr.tmux.menu.attach.whip","crtr.attach.whip","Whip agent","Interrupt the agent and send a playful command.",["w"],[]),e("crtr.attach.scroll.up","Attach","Scroll up","Scroll the transcript one line up.",["shift+up","ctrl+k"],"terminal",c),e("crtr.attach.scroll.down","Attach","Scroll down","Scroll the transcript one line down.",["shift+down","ctrl+j"],"terminal",c),e("crtr.attach.scroll.page-up","Attach","Scroll page up","Scroll the transcript one page up.",["pageup","ctrl+u"],"terminal",c),e("crtr.attach.scroll.page-down","Attach","Scroll page down","Scroll the transcript one page down.",["pagedown","ctrl+d"],"terminal",c),e("crtr.attach.scroll.live","Attach","Return to live","Return the transcript to the live bottom.",["shift+end","ctrl+g"],"terminal",c),e("crtr.attach.mouse.toggle","Attach","Toggle mouse wheel scrolling","Toggle mouse wheel scrolling on or off.",["alt+shift+o"],"terminal",c),e("crtr.attach.copy.message","Attach","Copy visible message","Copy the newest message visible in the transcript viewport.",["alt+shift+y"],"terminal",c),e("crtr.attach.verbosity.less","Attach","Less detail","Show the transcript one verbosity level more collapsed, in this viewer only; Ctrl+O shows more.",["ctrl+shift+o"],"terminal",c),e("crtr.attach.search.next","Attach","Next match","Move to the next transcript search match.",["n"],"terminal",["attach.search"]),e("crtr.attach.search.previous","Attach","Previous match","Move to the previous transcript search match.",["shift+n"],"terminal",["attach.search"]),e("crtr.attach.search.edit","Attach","Edit query","Return to editing the transcript search query.",["/"],"terminal",["attach.search"]),e("crtr.attach.search.close","Attach","Close search","Leave transcript search and clear its highlights.",["escape"],"terminal",["attach.search"],"dismiss-modal"),e("crtr.graph.down","GRAPH","Move down","Move to the next graph row.",["j","down"],"terminal",["graph"]),e("crtr.graph.up","GRAPH","Move up","Move to the previous graph row.",["k","up"],"terminal",["graph"]),e("crtr.graph.first","GRAPH","First row","Move to the first graph row.",["g"],"terminal",["graph"]),e("crtr.graph.last","GRAPH","Last row","Move to the last graph row.",["shift+g"],"terminal",["graph"]),e("crtr.graph.collapse-or-manager","GRAPH","Collapse or manager","Collapse a node or move to its manager.",["h","left"],"terminal",["graph"]),e("crtr.graph.expand-or-child","GRAPH","Expand or child","Expand a node or move to its child.",["l","right"],"terminal",["graph"]),e("crtr.graph.focus","GRAPH","Focus node","Focus the selected node.",["enter"],"terminal",["graph"]),e("crtr.graph.revive","GRAPH","Revive node","Revive and open the selected dormant node.",["r"],"terminal",["graph"]),e("crtr.graph.focus-manager","GRAPH","Focus manager","Focus the selected node manager.",["m"],"terminal",["graph"]),e("crtr.graph.close-subtree","GRAPH","Close subtree","Ask to close the selected subtree.",["x"],"terminal",["graph"]),e("crtr.graph.dismiss","GRAPH","Dismiss graph","Close the graph overlay.",["escape"],"terminal",["graph"],"dismiss-modal"),e("crtr.graph.confirm.accept","GRAPH","Confirm close","Confirm closing the selected subtree.",["y"],"terminal",["graph.confirm"]),e("crtr.graph.confirm.cancel","GRAPH","Cancel close","Cancel closing the selected subtree.",["n","escape"],"terminal",["graph.confirm"],"dismiss-modal"),e("crtr.inspector.force-quit","Inspector","Force quit Inspector","Immediately leave the Inspector.",["ctrl+c"],"host-global",["inspector"],"leave-screen"),e("crtr.inspector.down","Inspector","Move down","Move the Inspector selection or scroll cursor down.",["j","down"],"terminal",["inspector"]),e("crtr.inspector.up","Inspector","Move up","Move the Inspector selection or scroll cursor up.",["k","up"],"terminal",["inspector"]),e("crtr.inspector.section-next","Inspector","Next section","Move to the next Inspector section.",["tab"],"terminal",["inspector"]),e("crtr.inspector.section-prev","Inspector","Previous section","Move to the previous Inspector section.",["shift+tab"],"terminal",["inspector"]),e("crtr.inspector.page-down","Inspector","Page down","Scroll the Inspector detail body down.",["ctrl+d","pagedown"],"terminal",["inspector"]),e("crtr.inspector.page-up","Inspector","Page up","Scroll the Inspector detail body up.",["ctrl+u","pageup"],"terminal",["inspector"]),e("crtr.inspector.toggle-detail","Inspector","Toggle item detail","Expand or collapse the selected cron or background job.",["enter"],"terminal",["inspector"]),e("crtr.inspector.cancel-item","Inspector","Cancel selected item","Arm cancellation for the selected cron, or stopping for the selected background job.",["x"],"terminal",["inspector"]),e("crtr.inspector.open-log","Inspector","Open job log","Follow the selected background job\u2019s log in a new tmux window.",["o"],"terminal",["inspector"]),e("crtr.inspector.confirm","Inspector","Confirm action","Confirm the armed Inspector action.",["y"],"terminal",["inspector"]),e("crtr.inspector.dismiss","Inspector","Dismiss action","Dismiss an Inspector confirmation or banner.",["escape"],"terminal",["inspector"],"dismiss-modal"),e("crtr.inspector.retarget","Inspector","Retarget","Inspect the selected cron anchor or creator node.",["t"],"terminal",["inspector"]),e("crtr.inspector.refresh","Inspector","Refresh","Refresh the Inspector now.",["g","r"],"terminal",["inspector"]),e("crtr.inspector.quit","Inspector","Quit","Leave the Inspector.",["q"],"terminal",["inspector"],"leave-screen"),...v(),...x(),...k(),...y()]);function v(){const t="browse";return[e("crtr.browse.quit","Browse and pickers","Quit browse","Leave canvas browse.",["q","escape","ctrl+c"],"terminal",[t],"leave-screen"),e("crtr.browse.down","Browse and pickers","Move down","Move to the next row.",["j","down"],"terminal",[t]),e("crtr.browse.up","Browse and pickers","Move up","Move to the previous row.",["k","up"],"terminal",[t]),e("crtr.browse.first","Browse and pickers","First row","Move to the first row.",["g"],"terminal",[t]),e("crtr.browse.last","Browse and pickers","Last row","Move to the last row.",["shift+g"],"terminal",[t]),e("crtr.browse.expand-or-child","Browse and pickers","Expand or child","Expand a row or move to its child.",["l","right"],"terminal",[t]),e("crtr.browse.collapse-or-parent","Browse and pickers","Collapse or parent","Collapse a row or move to its parent.",["h","left"],"terminal",[t]),e("crtr.browse.toggle-fold","Browse and pickers","Toggle fold","Toggle the selected fold.",["space"],"terminal",[t]),e("crtr.browse.tab-next","Browse and pickers","Next tab","Select the next browse tab.",["tab","]"],"terminal",[t]),e("crtr.browse.tab-previous","Browse and pickers","Previous tab","Select the previous browse tab.",["shift+tab","["],"terminal",[t]),...[1,2,3,4,5].map(n=>e(`crtr.browse.tab.${n}`,"Browse and pickers",`Tab ${n}`,`Select browse tab ${n}.`,[`${n}`],"terminal",[t])),e("crtr.browse.close-subtree","Browse and pickers","Close subtree","Ask to close the selected subtree.",["x"],"terminal",[t]),e("crtr.browse.confirm-close","Browse and pickers","Confirm close","Confirm closing the selected subtree.",["y"],"terminal",["browse.confirm"]),e("crtr.browse.sort","Browse and pickers","Change sort","Change the browse sort.",["s"],"terminal",[t]),e("crtr.browse.scope","Browse and pickers","Change scope","Toggle the browse cwd scope.",["c"],"terminal",[t]),e("crtr.browse.profile","Browse and pickers","Toggle profile","Toggle the browse profile scope.",["shift+p"],"terminal",[t]),e("crtr.browse.residents","Browse and pickers","Toggle residents","Toggle resident display.",["r"],"terminal",[t]),e("crtr.browse.preview","Browse and pickers","Toggle preview","Toggle the preview panel.",["v"],"terminal",[t]),e("crtr.browse.report","Browse and pickers","Toggle report","Swap the preview panel between the conversation and the node's newest report.",["shift+v"],"terminal",[t]),e("crtr.browse.pin","Browse and pickers","Pin node","Star or unstar the selected node.",["p"],"terminal",[t]),e("crtr.browse.search","Browse and pickers","Search","Open browse search.",["/"],"terminal",[t]),e("crtr.browse.revive-now","Browse and pickers","Revive now","Revive the selected node now.",["shift+k"],"terminal",[t]),e("crtr.browse.focus","Browse and pickers","Focus node","Focus the selected node.",["enter","o"],"terminal",[t]),e("crtr.browse.focus-background","Browse and pickers","Focus node (keep browsing)","Focus the selected node without leaving the navigator.",["shift+o"],"terminal",[t]),e("crtr.browse.yank-id","Browse and pickers","Yank node id","Copy the selected node id to the system clipboard.",["y"],"terminal",[t]),e("crtr.browse.search.cancel","Browse and pickers","Cancel search","Cancel browse search.",["escape"],"terminal",["browse.search"],"dismiss-modal"),e("crtr.browse.search.commit","Browse and pickers","Commit search","Apply browse search.",["enter"],"terminal",["browse.search"]),e("crtr.browse.search.delete","Browse and pickers","Delete search text","Delete the previous search character.",["backspace"],"terminal",["browse.search"]),e("crtr.browse.search.quit","Browse and pickers","Quit browse","Leave canvas browse from search.",["ctrl+c"],"terminal",["browse.search"],"leave-screen")]}a(v,"browseBindings");function x(){const t="dashboard",n="dashboard.confirm",s="dashboard.input",o="Dashboard";return[e("crtr.dashboard.down",o,"Move down","Move to the next row.",["j","down"],"terminal",[t]),e("crtr.dashboard.up",o,"Move up","Move to the previous row.",["k","up"],"terminal",[t]),e("crtr.dashboard.first",o,"First row","Move to the first row.",["g"],"terminal",[t]),e("crtr.dashboard.last",o,"Last row","Move to the last row.",["shift+g"],"terminal",[t]),e("crtr.dashboard.expand",o,"Expand","Show the selected conversation\u2019s children.",["l","right"],"terminal",[t]),e("crtr.dashboard.collapse",o,"Collapse","Hide the selected conversation\u2019s children.",["h","left"],"terminal",[t]),e("crtr.dashboard.open",o,"Open","Open the selected conversation in this pane.",["enter"],"terminal",[t]),e("crtr.dashboard.pin",o,"Pin","Star or unstar the selected conversation.",["p"],"terminal",[t]),e("crtr.dashboard.rename",o,"Rename","Rename the selected conversation.",["shift+r"],"terminal",[t]),e("crtr.dashboard.close",o,"Close","Finish the selected conversation and remove its row.",["x"],"terminal",[t]),e("crtr.dashboard.confirm-close",o,"Confirm close","Close a conversation that is running.",["y"],"terminal",[n]),e("crtr.dashboard.cancel-close",o,"Cancel close","Keep the running conversation.",["n","escape"],"terminal",[n]),e("crtr.dashboard.profile",o,"Toggle profile","Switch between this profile and all profiles.",["shift+p"],"terminal",[t]),e("crtr.dashboard.input",o,"New conversation","Focus the new-conversation input.",["n"],"terminal",[t]),e("crtr.dashboard.input-cancel",o,"Leave input","Leave the input without clearing it.",["escape"],"terminal",[s]),e("crtr.dashboard.input-submit",o,"Start conversation","Start a root conversation from the input text.",["enter"],"terminal",[s]),e("crtr.dashboard.directory-next",o,"Next directory","Select the next directory for the new conversation.",["tab"],"terminal",[s]),e("crtr.dashboard.directory-previous",o,"Previous directory","Select the previous directory for the new conversation.",["shift+tab"],"terminal",[s]),e("crtr.dashboard.help",o,"Help","Show the dashboard keys.",["?"],"terminal",[t])]}a(x,"dashboardBindings");function k(){const t="profile.menu",n="profile.search";return[e("crtr.profile.menu.up","Profiles","Move up","Move to the previous profile.",["k","up"],"terminal",[t]),e("crtr.profile.menu.down","Profiles","Move down","Move to the next profile.",["j","down"],"terminal",[t]),e("crtr.profile.menu.select","Profiles","Select profile","Select the highlighted profile.",["enter"],"terminal",[t]),e("crtr.profile.menu.accept-default","Profiles","Accept default","Accept the default profile.",["escape"],"terminal",[t],"leave-screen"),e("crtr.profile.menu.abort","Profiles","Abort","Leave profile selection.",["ctrl+c"],"terminal",[t],"leave-screen"),...[1,2,3,4,5,6,7,8,9].map(s=>e(`crtr.profile.menu.slot.${s}`,"Profiles",`Profile slot ${s}`,`Select profile slot ${s}.`,[`${s}`],"terminal",[t])),e("crtr.profile.menu.create","Profiles","Create profile","Create a profile.",["c"],"terminal",[t]),e("crtr.profile.menu.search-existing","Profiles","Search profiles","Search existing profiles.",["s"],"terminal",[t]),e("crtr.profile.menu.use-root","Profiles","Use root profile","Use the root profile.",["r"],"terminal",[t]),e("crtr.profile.menu.set-default","Profiles","Set default","Set the selected profile as default.",["d"],"terminal",[t]),e("crtr.profile.menu.add-directory","Profiles","Add directory","Add a directory to the profile.",["a"],"terminal",[t]),e("crtr.profile.menu.unpin","Profiles","Unpin directory","Unpin the selected directory.",["u"],"terminal",[t]),e("crtr.profile.menu.manage","Profiles","Manage profiles","Open the profiles settings page in a popup.",["v"],"terminal",[t]),e("crtr.profile.search.up","Profiles","Move up","Move to the previous search result.",["up","ctrl+p"],"terminal",[n]),e("crtr.profile.search.down","Profiles","Move down","Move to the next search result.",["down","ctrl+n"],"terminal",[n]),e("crtr.profile.search.pick","Profiles","Pick profile","Pick the highlighted profile.",["enter"],"terminal",[n]),e("crtr.profile.search.back","Profiles","Back","Return to profile selection.",["escape"],"terminal",[n],"leave-screen"),e("crtr.profile.search.delete","Profiles","Delete filter text","Delete the previous filter character.",["backspace"],"terminal",[n]),e("crtr.profile.search.abort","Profiles","Abort","Leave profile search.",["ctrl+c"],"terminal",[n],"leave-screen")]}a(k,"profileBindings");function y(){return[e("crtr.setup.cancel","Setup","Cancel setup","Leave the setup wizard.",["q","ctrl+c","ctrl+d"],"terminal",f,"leave-screen"),e("crtr.setup.tab-next","Setup","Next tab","Select the next setup tab.",["tab","right"],"terminal",h),e("crtr.setup.tab-previous","Setup","Previous tab","Select the previous setup tab.",["shift+tab","left"],"terminal",h),e("crtr.setup.open","Setup","Open","Open the selected setup item.",["enter"],"terminal",["setup.login"]),e("crtr.setup.list-down","Setup","Move down","Move to the next setup item.",["j","down"],"terminal",["setup.list","setup.models","setup.models.dimension-picker","setup.models.route-form"]),e("crtr.setup.list-up","Setup","Move up","Move to the previous setup item.",["k","up"],"terminal",["setup.list","setup.models","setup.models.dimension-picker","setup.models.route-form"]),e("crtr.setup.toggle","Setup","Toggle","Toggle the selected setup item.",["space"],"terminal",["setup.list","setup.keybindings"]),e("crtr.setup.details","Setup","Show details","Show details for the selected item.",["?"],"terminal",["setup.list"]),e("crtr.setup.advance","Setup","Advance","Advance the setup flow.",["enter"],"terminal",["setup.list"]),e("crtr.setup.confirm.accept","Setup","Confirm","Accept the setup confirmation.",["y","enter"],"terminal",["setup.confirm","setup.models.confirm"]),e("crtr.setup.confirm.back","Setup","Go back","Cancel the setup confirmation.",["n","escape","q"],"terminal",["setup.confirm","setup.models.confirm"],"dismiss-modal"),e("crtr.setup.keybindings.edit","Setup","Edit binding","Edit the selected binding.",["enter"],"terminal",["setup.keybindings"]),e("crtr.setup.keybindings.commit-edit","Setup","Commit edit","Commit the active binding edit.",["enter"],"terminal",["setup.keybindings.edit"]),e("crtr.setup.keybindings.cancel-edit","Setup","Cancel edit","Cancel the active binding edit.",["escape"],"terminal",["setup.keybindings.edit"],"dismiss-modal"),e("crtr.setup.keybindings.unbind","Setup","Unbind","Disable the selected binding.",["delete"],"terminal",["setup.keybindings"]),e("crtr.setup.keybindings.reset-row","Setup","Reset binding","Reset the selected binding.",["r"],"terminal",["setup.keybindings"]),e("crtr.setup.keybindings.reset-all","Setup","Reset all bindings","Reset all bindings to defaults.",["shift+r"],"terminal",["setup.keybindings"]),e("crtr.setup.keybindings.save","Setup","Save bindings","Save keybinding changes.",["s"],"terminal",["setup.keybindings"],"save-keybindings"),e("crtr.setup.keybindings.discard","Setup","Discard changes","Discard keybinding changes.",["escape"],"terminal",["setup.keybindings"],"leave-screen"),e("crtr.setup.keybindings.page-up","Setup","Page up","Move up one keybinding page.",["pageup"],"terminal",["setup.keybindings","setup.keybindings.edit"]),e("crtr.setup.keybindings.page-down","Setup","Page down","Move down one keybinding page.",["pagedown"],"terminal",["setup.keybindings","setup.keybindings.edit"]),e("crtr.setup.keybindings.filter","Setup","Filter bindings","Open the keybinding filter.",["/"],"terminal",["setup.keybindings"]),e("crtr.setup.keybindings.filter-delete","Setup","Delete filter text","Delete the previous filter character.",["backspace"],"terminal",["setup.keybindings.filter"]),e("crtr.setup.keybindings.filter-clear","Setup","Clear filter","Clear the keybinding filter.",["escape"],"terminal",["setup.keybindings.filter"],"dismiss-modal"),e("crtr.setup.cell-previous","Setup","Previous field","Select the previous field or setup table cell.",["h"],"terminal",["setup.models","setup.keybindings"]),e("crtr.setup.cell-next","Setup","Next field","Select the next field or setup table cell.",["l"],"terminal",["setup.models","setup.keybindings"]),e("crtr.setup.models.open","Setup","Edit model","Edit the selected model cell or route field.",["enter"],"terminal",["setup.models","setup.models.route-form"]),e("crtr.setup.models.scope-next","Setup","Next model config scope","Edit the next applicable user, profile, or project config.",["s"],"terminal",["setup.models"]),e("crtr.setup.models.commit","Setup","Commit pick","Commit the provider, strength, model, or thinking-level pick.",["enter"],"terminal",["setup.models.picker","setup.models.dimension-picker"]),e("crtr.setup.models.cancel","Setup","Cancel pick","Cancel the model picker or route form.",["escape"],"terminal",["setup.models.picker","setup.models.dimension-picker","setup.models.route-form"],"dismiss-modal")]}a(y,"setupBindings");const C=new Set(w.map(t=>t.id));function P(t){return t.contexts.includes("attach")&&(t.inputKind==="terminal"||t.inputKind==="host-global")}a(P,"isAttachPaneBinding");const A=Object.freeze([{context:"graph",capability:"dismiss-modal"},{context:"graph.confirm",capability:"dismiss-modal"},{context:"inspector",capability:"leave-screen"},{context:"inspector",capability:"dismiss-modal"},{context:"attach.search",capability:"dismiss-modal"},{context:"browse",capability:"leave-screen"},{context:"browse.search",capability:"dismiss-modal"},{context:"profile.menu",capability:"leave-screen"},{context:"profile.search",capability:"leave-screen"},{context:"setup.login",capability:"leave-screen"},{context:"setup.list",capability:"leave-screen"},{context:"setup.input",capability:"leave-screen"},{context:"setup.confirm",capability:"dismiss-modal"},{context:"setup.keybindings",capability:"leave-screen"},{context:"setup.keybindings",capability:"save-keybindings"},{context:"setup.keybindings.edit",capability:"dismiss-modal"},{context:"setup.keybindings.filter",capability:"dismiss-modal"},{context:"setup.models",capability:"leave-screen"},{context:"setup.models.picker",capability:"dismiss-modal"},{context:"setup.models.dimension-picker",capability:"dismiss-modal"},{context:"setup.models.route-form",capability:"dismiss-modal"},{context:"setup.models.confirm",capability:"dismiss-modal"}]);export{w as BINDING_CATALOG,C as BINDING_IDS,A as SAFETY_REQUIREMENTS,P as isAttachPaneBinding};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type CommentAnchor } from './types.js';
|
|
2
|
+
/** The text a reader sees: markdown syntax removed, blocks separated, whitespace collapsed. */
|
|
3
|
+
export declare function renderedText(markdown: string): string;
|
|
4
|
+
export declare function normalizeAnchor(anchor: {
|
|
5
|
+
quote: string;
|
|
6
|
+
prefix?: string;
|
|
7
|
+
suffix?: string;
|
|
8
|
+
offset?: number;
|
|
9
|
+
}): CommentAnchor;
|
|
10
|
+
export interface ResolvedAnchor {
|
|
11
|
+
start: number;
|
|
12
|
+
end: number;
|
|
13
|
+
}
|
|
14
|
+
/** Find an anchor in the current rendered text: every exact quote match, best prefix+suffix agreement, then nearest offset. Null = detached. */
|
|
15
|
+
export declare function resolveAnchor(text: string, anchor: CommentAnchor): ResolvedAnchor | null;
|
|
16
|
+
/** Occurrences of a quote with 32 characters of context each, for a caller that must disambiguate. */
|
|
17
|
+
export declare function quoteOccurrences(text: string, quote: string): Array<{
|
|
18
|
+
offset: number;
|
|
19
|
+
prefix: string;
|
|
20
|
+
suffix: string;
|
|
21
|
+
}>;
|
|
22
|
+
/** Validate a new anchor against the current document and fill context the caller left out. */
|
|
23
|
+
export declare function anchorInDocument(markdown: string, input: {
|
|
24
|
+
quote: string;
|
|
25
|
+
prefix?: string;
|
|
26
|
+
suffix?: string;
|
|
27
|
+
offset?: number;
|
|
28
|
+
}): CommentAnchor;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
var a=Object.defineProperty;var f=(t,n)=>a(t,"name",{value:n,configurable:!0});import{unified as h}from"unified";import x from"remark-parse";import m from"remark-gfm";import{ANCHOR_CONTEXT_MAX as i,COMMENT_QUOTE_MAX as c,ReviewOperationError as u}from"./types.js";const d=h().use(x).use(m),g=new Set(["root","blockquote","footnoteDefinition"]),q=new Set(["list","table","tableRow"]);function s(t){return t.replace(/\s+/g," ").trim()}f(s,"collapse");function p(t){if(t.type==="text"||t.type==="inlineCode"||t.type==="code")return t.value??"";if(t.type==="break")return`
|
|
2
|
+
`;const n=t.children??[],e=g.has(t.type)?`
|
|
3
|
+
|
|
4
|
+
`:q.has(t.type)?`
|
|
5
|
+
`:"",r=n.map(p);return e===""&&n.some(o=>o.type==="paragraph"||o.type==="list"||o.type==="listItem")?r.join(`
|
|
6
|
+
`):r.join(e)}f(p,"render");function O(t){return s(p(d.parse(t)))}f(O,"renderedText");function w(t){const n=s(t.quote),e=[];n===""&&e.push("quote must not be empty"),n.length>c&&e.push(`quote exceeds ${c} characters`);const r=t.offset??0;if((!Number.isSafeInteger(r)||r<0)&&e.push("offset must be a non-negative integer"),e.length>0)throw new u("invalid_anchor","comment anchor is invalid",{violations:e});return{quote:n,prefix:s(t.prefix??"").slice(-i),suffix:s(t.suffix??"").slice(0,i),offset:r}}f(w,"normalizeAnchor");function y(t,n){let e=0;for(;e<t.length&&e<n.length&&t[t.length-1-e]===n[n.length-1-e];)e+=1;return e}f(y,"commonSuffix");function _(t,n){let e=0;for(;e<t.length&&e<n.length&&t[e]===n[e];)e+=1;return e}f(_,"commonPrefix");function C(t,n){let e=null;for(let r=t.indexOf(n.quote);r!==-1;r=t.indexOf(n.quote,r+1)){const o=y(t.slice(Math.max(0,r-n.prefix.length),r),n.prefix)+_(t.slice(r+n.quote.length,r+n.quote.length+n.suffix.length),n.suffix),l=Math.abs(r-n.offset);(e===null||o>e.score||o===e.score&&l<e.distance)&&(e={start:r,score:o,distance:l})}return e===null?null:{start:e.start,end:e.start+n.quote.length}}f(C,"resolveAnchor");function v(t,n){const e=[];for(let r=t.indexOf(n);r!==-1;r=t.indexOf(n,r+1))e.push({offset:r,prefix:t.slice(Math.max(0,r-i),r),suffix:t.slice(r+n.length,r+n.length+i)});return e}f(v,"quoteOccurrences");function E(t,n){const e=w(n),r=O(t),o=v(r,e.quote);if(o.length===0)throw new u("quote_not_found","the quoted text does not occur in the current document",{quote:e.quote});if(o.length>1&&n.prefix===void 0&&n.suffix===void 0&&n.offset===void 0)throw new u("invalid_anchor","the quoted text occurs more than once; pass prefix or suffix",{occurrences:o});return n.prefix===void 0&&n.suffix===void 0?{...e,prefix:o[0].prefix,suffix:o[0].suffix,offset:o[0].offset}:e}f(E,"anchorInDocument");export{E as anchorInDocument,w as normalizeAnchor,v as quoteOccurrences,O as renderedText,C as resolveAnchor};
|
|
@@ -9,12 +9,12 @@ interface CommentMutationArgs {
|
|
|
9
9
|
operation_id: string;
|
|
10
10
|
if_revision?: number;
|
|
11
11
|
}
|
|
12
|
+
/** Tell every process listening on `crtr_signal` (and this one, at commit) that a review changed. Call inside the mutating transaction: a rollback sends nothing. */
|
|
13
|
+
export declare function signalReviewChange(db: CanvasDb, reviewId: string): Promise<void>;
|
|
12
14
|
export declare function createComment(args: {
|
|
13
15
|
review_id: string;
|
|
14
16
|
text: string;
|
|
15
17
|
anchor: CommentAnchor;
|
|
16
|
-
line_text: string;
|
|
17
|
-
doc_hash: string;
|
|
18
18
|
actor: Actor;
|
|
19
19
|
operation_id: string;
|
|
20
20
|
}): Promise<{
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
var
|
|
1
|
+
var O=Object.defineProperty;var o=(e,t)=>O(e,"name",{value:t,configurable:!0});import{randomBytes as M}from"node:crypto";import{afterCommit as A,withCanvasWrite as u,openDb as p}from"../canvas/db.js";import{nowIso as l}from"../fs-utils.js";import{brokerSignalBus as D}from"../../daemon/broker-signals/bus.js";import{COMMENT_EVENTS_PAGE_DEFAULT as F,COMMENT_EVENTS_PAGE_MAX as U,COMMENT_TEXT_MAX as y,LIVE_COMMENTS_MAX as R,ReviewOperationError as _}from"./types.js";function s(e){return{comment_id:e.comment_id,review_id:e.review_id,status:e.status,revision:e.revision,text:e.text,anchor:{quote:e.anchor_quote,prefix:e.anchor_prefix,suffix:e.anchor_suffix,offset:Number(e.anchor_offset)},author:{kind:e.author_kind,node_id:e.author_node_id},updated_by:{kind:e.updated_by_kind,node_id:e.updated_by_node_id},created_at:e.created_at,updated_at:e.updated_at,resolved_at:e.resolved_at,deleted_at:e.deleted_at,created_seq:e.created_seq}}o(s,"commentFromRow");function T(e){return{seq:e.seq,review_id:e.review_id,comment_id:e.comment_id,kind:e.kind,state_change:e.state_change===0?0:1,revision_after:e.revision_after,actor:{kind:e.actor_kind,node_id:e.actor_node_id},at:e.at,operation_id:e.operation_id,...e.payload===null?{}:{payload:JSON.parse(e.payload)}}}o(T,"eventFromRow");function k(e){return JSON.stringify(e)}o(k,"json");function N(){let e;do e=M(16).toString("hex");while(/^0+$/.test(e));return e}o(N,"commentId");function C(e){const t=e.trim();if(t==="")throw new Error("comment text must not be empty");const n=Buffer.byteLength(t,"utf8");if(n>y)throw new _("text_too_long","comment text exceeds the maximum length",{limit:y,received:n});return t}o(C,"trimText");async function v(e,t){return await e.prepare("SELECT * FROM review_comments WHERE comment_id = ?").get(t)??null}o(v,"getStoredComment");async function f(e,t){const n=await v(e,t);if(n===null)throw new _("unknown_comment","comment was not found",{received:t});return n}o(f,"requireStoredComment");async function q(e,t){if(await e.prepare("SELECT request_id FROM human_requests WHERE request_id = ? AND kind = 'review' AND state = 'open'").get(t)===void 0)throw new _("unknown_review","review was not found",{received:t})}o(q,"assertReviewExists");function S(e,t){if(t!==void 0&&t!==e.revision)throw new _("stale_comment","comment revision is stale",{revision:e.revision,text:e.text})}o(S,"assertRevision");async function E(e,t){const n=await e.prepare(`
|
|
2
2
|
INSERT INTO review_comment_events
|
|
3
3
|
(review_id, comment_id, kind, state_change, revision_after, actor_kind, actor_node_id, at, operation_id, payload)
|
|
4
4
|
VALUES (?, ?, ?, 1, ?, ?, ?, ?, ?, ?)
|
|
5
5
|
RETURNING seq
|
|
6
|
-
`).get(t.row.review_id,t.row.comment_id,t.kind,t.row.revision,t.actor.kind,t.actor.node_id,t.at,t.operation_id,k(t.payload));return Number(n.seq)}
|
|
6
|
+
`).get(t.row.review_id,t.row.comment_id,t.kind,t.row.revision,t.actor.kind,t.actor.node_id,t.at,t.operation_id,k(t.payload));return Number(n.seq)}o(E,"appendStateEvent");async function L(e,t,n,a,i){const r=t.revision+1;return await e.prepare(`
|
|
7
7
|
UPDATE review_comments
|
|
8
8
|
SET status = ?, revision = ?, text = ?, updated_by_kind = ?, updated_by_node_id = ?,
|
|
9
9
|
updated_at = ?, resolved_at = ?, deleted_at = ?
|
|
10
10
|
WHERE comment_id = ?
|
|
11
|
-
`).run(n.status??t.status,
|
|
11
|
+
`).run(n.status??t.status,r,n.text??t.text,a.kind,a.node_id,i,n.resolved_at===void 0?t.resolved_at:n.resolved_at,n.deleted_at===void 0?t.deleted_at:n.deleted_at,t.comment_id),{...t,...n,revision:r,updated_by_kind:a.kind,updated_by_node_id:a.node_id,updated_at:i}}o(L,"updateComment");async function w(e,t){await e.prepare("SELECT pg_notify(?, ?)").get("crtr_signal",`review:${t}`),A(()=>D.markSignal("review",t))}o(w,"signalReviewChange");async function b(e){return await u(async n=>{await q(n,e.review_id);const a=await n.prepare("SELECT COUNT(*) AS count FROM review_comments WHERE review_id = ? AND status != 'deleted'").get(e.review_id);if(Number(a.count)>=R)throw new _("comment_limit_reached","review comment limit reached",{limit:R,live:Number(a.count)});const i=C(e.text),r=l();let d=N();for(;await v(n,d)!==null;)d=N();if((await n.prepare(`
|
|
12
12
|
INSERT INTO review_comments
|
|
13
|
-
(comment_id, review_id, status, revision, text,
|
|
14
|
-
anchor_col_start, anchor_col_end, anchor_quote, anchor_line_text, anchor_doc_hash, anchor_state,
|
|
13
|
+
(comment_id, review_id, status, revision, text, anchor_quote, anchor_prefix, anchor_suffix, anchor_offset,
|
|
15
14
|
author_kind, author_node_id, updated_by_kind, updated_by_node_id, created_at,
|
|
16
15
|
updated_at, resolved_at, deleted_at, created_seq)
|
|
17
|
-
VALUES (?, ?, 'open', 1, ?, ?, ?, ?, ?, ?, ?, ?,
|
|
18
|
-
`).run(
|
|
16
|
+
VALUES (?, ?, 'open', 1, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, NULL, NULL, 0)
|
|
17
|
+
`).run(d,e.review_id,i,e.anchor.quote,e.anchor.prefix,e.anchor.suffix,e.anchor.offset,e.actor.kind,e.actor.node_id,e.actor.kind,e.actor.node_id,r,r)).changes!==1)throw new Error("failed to insert review comment");const c=await v(n,d),x=await E(n,{row:c,kind:"created",actor:e.actor,operation_id:e.operation_id,at:r,payload:{text:i,anchor:e.anchor}});return await n.prepare("UPDATE review_comments SET created_seq = ? WHERE comment_id = ?").run(x,d),await w(n,e.review_id),{comment:s({...c,created_seq:x}),changed:!0}})}o(b,"createComment");async function P(e,t){return await u(async a=>{const i=await f(a,e);if(i.status==="deleted")throw new _("comment_deleted","comment is a deleted tombstone",{comment_id:i.comment_id,deleted_at:i.deleted_at});const r=C(t.text);if(i.text===r)return{comment:s(i),changed:!1};S(i,t.if_revision);const d=l(),m=s(i).anchor,c=await L(a,i,{text:r},t.actor,d);return await E(a,{row:c,kind:"edited",actor:t.actor,operation_id:t.operation_id,at:d,payload:{previous_text:i.text,text:r,previous_anchor:m,anchor:s(c).anchor}}),await w(a,c.review_id),{comment:s(c),changed:!0}})}o(P,"editComment");async function h(e,t,n,a){return await u(async r=>{const d=await f(r,e);if(d.status==="deleted"){if(n==="deleted")return{comment:s(d),changed:!1};throw new _("comment_deleted","comment is a deleted tombstone",{comment_id:d.comment_id,deleted_at:d.deleted_at})}if(d.status===n)return{comment:s(d),changed:!1};S(d,t.if_revision);const m=l(),c=await L(r,d,{status:n,resolved_at:n==="resolved"?m:n==="open"?null:void 0,deleted_at:n==="deleted"?m:void 0},t.actor,m);return await E(r,{row:c,kind:a,actor:t.actor,operation_id:t.operation_id,at:m,payload:{previous_status:d.status,status:n,previous_text:d.text,text:c.text,previous_anchor:s(d).anchor,anchor:s(c).anchor}}),await w(r,c.review_id),{comment:s(c),changed:!0}})}o(h,"transitionComment");async function X(e,t){return await h(e,t,"resolved","resolved")}o(X,"resolveComment");async function G(e,t){return await h(e,t,"open","reopened")}o(G,"reopenComment");async function J(e,t){return await h(e,t,"deleted","deleted")}o(J,"deleteComment");async function $(e,t){const n=await p(),a=t?.status;return(a===void 0?await n.prepare("SELECT * FROM review_comments WHERE review_id = ? AND status != 'deleted' ORDER BY created_seq").all(e):a==="all"?await n.prepare("SELECT * FROM review_comments WHERE review_id = ? ORDER BY created_seq").all(e):await n.prepare("SELECT * FROM review_comments WHERE review_id = ? AND status = ? ORDER BY created_seq").all(e,a)).map(s)}o($,"listComments");async function j(e){const t=await v(await p(),e);return t===null?null:s(t)}o(j,"getComment");async function z(e){return(await(await p()).prepare("SELECT * FROM review_comment_events WHERE comment_id = ? ORDER BY seq").all(e)).map(T)}o(z,"listCommentEvents");async function K(e,t){const n=t.since_seq??0,a=Math.min(Math.max(t.limit??F,1),U),r=(await(await p()).prepare("SELECT * FROM review_comment_events WHERE review_id = ? AND seq > ? ORDER BY seq LIMIT ?").all(e,n,a)).map(T);return{events:r,next_since_seq:r.length===0?n:r[r.length-1].seq}}o(K,"listReviewEvents");async function Q(e,t){const n=await e.prepare("SELECT * FROM review_comments WHERE review_id = ? AND status != 'deleted' ORDER BY created_seq").all(t);return{comments:n.map(i=>({id:i.comment_id,quote:i.anchor_quote,comment:i.text,createdAt:i.created_at,resolved:i.status==="resolved"})),total:n.length,unresolved:n.filter(i=>i.status==="open").length}}o(Q,"snapshotCommentsLocked");async function Z(e){await u(async t=>{if(await q(t,e.review_id),(await f(t,e.comment_id)).review_id!==e.review_id)throw new _("unknown_comment","comment was not found",{received:e.comment_id});await t.prepare(`
|
|
19
18
|
INSERT INTO review_comment_events
|
|
20
19
|
(review_id, comment_id, kind, state_change, revision_after, actor_kind, actor_node_id, at, operation_id, payload)
|
|
21
20
|
VALUES (?, ?, ?, 0, NULL, 'system', NULL, ?, ?, ?)
|
|
22
|
-
`).run(e.review_id,e.comment_id,e.kind,
|
|
21
|
+
`).run(e.review_id,e.comment_id,e.kind,l(),e.operation_id,k(e.payload)),await w(t,e.review_id)})}o(Z,"appendDeliveryEvent");export{Z as appendDeliveryEvent,b as createComment,J as deleteComment,P as editComment,j as getComment,z as listCommentEvents,$ as listComments,K as listReviewEvents,G as reopenComment,X as resolveComment,w as signalReviewChange,Q as snapshotCommentsLocked};
|
|
@@ -10,7 +10,8 @@ export interface ReviewCompanionSpec {
|
|
|
10
10
|
reviewId: string;
|
|
11
11
|
originNodeId: string;
|
|
12
12
|
branchFile: string;
|
|
13
|
-
|
|
13
|
+
/** The reviewed document's `<owner>/<name>`. */
|
|
14
|
+
documentName: string;
|
|
14
15
|
modelSpec: string;
|
|
15
16
|
cwd: string;
|
|
16
17
|
profileId: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var S=Object.defineProperty;var s=(e,o)=>S(e,"name",{value:o,configurable:!0});import{randomUUID as v}from"node:crypto";import{conversationIdFromPath as
|
|
1
|
+
var S=Object.defineProperty;var s=(e,o)=>S(e,"name",{value:o,configurable:!0});import{randomUUID as v}from"node:crypto";import{conversationIdFromPath as m,conversationStore as w,ConversationNotFoundError as u}from"../conversation-store/index.js";import{isAbsolute as p}from"node:path";import{BrokerClient as x}from"../broker-client/index.js";import{deleteNode as F,getNode as g}from"../canvas/index.js";import{expandModelCandidates as M}from"../model-routes.js";import{selectInitialModelRoute as C}from"../model-routes-pool.js";import{buildLaunchSpec as E}from"../runtime/launch.js";import{openModelRegistry as L}from"../runtime/model-registry.js";import{isBrokerLive as B}from"../runtime/model-swap.js";import{spawnNode as O}from"../runtime/nodes.js";import{SessionManager as R}from"../runtime/broker-sdk.js";import{isReviewBoundary as D}from"../runtime/session-visibility.js";import{forkNodeLedger as N}from"../runtime/ledger.js";import{ReviewOperationError as b}from"./types.js";const I=/^[^/\s:]+\/[^/\s:]+:(?:off|minimal|low|medium|high|xhigh|max)$/,P=100;function $(e){return new b("review_origin_missing","review origin was not found",{origin_node_id:e})}s($,"originMissing");function l(e,o,r={}){return new b("review_origin_unforkable","review origin has no forkable exact session",{origin_node_id:e,reason:o,...r})}s(l,"originUnforkable");async function k(e,o,r){const n=m(o.sourceFile);if(!p(o.sourceFile)||n===null||n!==o.sourceSessionId||o.leafId===null||o.leafId==="")throw l(e,"no_forkable_session");try{await w().header(n)}catch(i){throw i instanceof u?l(e,"no_forkable_session"):i}if(o.modelSpec===null||!I.test(o.modelSpec))throw l(e,"model_unresolvable");const t=await C({kind:"exact",spec:o.modelSpec},r??await L(),{cwd:o.cwd,profileId:o.profileId});if(t.selected===void 0)throw l(e,"model_unresolvable",{model_reason:t.rejected[0]?.reason});return{sourceFile:o.sourceFile,sourceSessionId:o.sourceSessionId,leafId:o.leafId,modelSpec:o.modelSpec}}s(k,"validateCapture");function q(e){return new Promise(async(o,r)=>{const n=new x(e);let t=!1;function i(d){t||(t=!0,n.close(),d())}s(i,"finish"),n.on("error",d=>i(()=>r(d))),n.on("close",()=>i(()=>r(new Error("origin broker closed before fork coordinates were read")))),n.on("connect",()=>{n.send({type:"hello",role:"observer",client_id:v()}),n.request({type:"get_human_fork_coordinates"}).then(d=>{if(d.kind!=="human_fork_coordinates"){i(()=>r(new Error("origin broker returned an unexpected fork-coordinate response")));return}i(()=>o(d))}).catch(d=>i(()=>r(d)))}),n.connect()})}s(q,"captureLiveOrigin");async function re(e,o={}){const r=await g(e);if(r===null)throw $(e);if(B(r)){const a=await q(e);return k(e,{...a,cwd:r.cwd,profileId:r.profile_id},o.registry)}const n=typeof r.pi_session_file=="string"?r.pi_session_file:"";let t="",i=null,d=null;const h=m(n);if(p(n)&&h!==null)try{const a=await w().read(h),f=R.inMemory(a.header.cwd,void 0,[a.header,...a.entries]);t=f.getSessionId(),i=f.getLeafId();const _=r.launch?.model,c=typeof _=="string"?(await M({kind:"exact",spec:_},r.cwd,r.profile_id))[0]:void 0;if(c!==void 0){const y=c.thinkingLevel??(f.buildSessionContext().thinkingLevel||"off");d=`${c.providerId}/${c.modelId}:${y}`}}catch(a){if(!(a instanceof u))throw a}return k(e,{sourceFile:n,sourceSessionId:t,leafId:i,modelSpec:d,cwd:r.cwd,profileId:r.profile_id},o.registry)}s(re,"captureOrigin");async function ne(e){if(!p(e.branchFile))throw new Error("review companion requires an absolute branch path");if(!I.test(e.modelSpec))throw new Error("review companion requires an exact model spec");const{launch:o}=E("review/companion","base",{lifecycle:"resident",hasManager:!1,model:e.modelSpec,modelExact:!0,cwd:e.cwd,profileId:e.profileId}),r=await O({nodeId:e.nodeId,kind:"review/companion",mode:"base",lifecycle:"resident",cwd:e.cwd,profile_id:e.profileId,parent:e.originNodeId,creator:e.originNodeId,subscribe:!1,forkFrom:e.branchFile,forkSourceFile:e.branchFile,modelOverride:e.modelSpec,reviewBinding:{review_id:e.reviewId,origin_node_id:e.originNodeId,branch_file:e.branchFile,target_file:e.documentName},name:`review ${e.documentName}`,launch:o});try{await N(r.node_id,e.originNodeId)}catch(n){throw await F(r.node_id),n}}s(ne,"spawnReviewCompanion");async function U(e){const o=await g(e),r=o?.review_binding,n=o?.pi_session_file,t=typeof n=="string"?m(n):null;if(r==null||o?.pi_session_id==null||t===null)return!1;try{return(await w().read(t)).entries.some(i=>D(i,r.review_id))}catch(i){if(i instanceof u)return!1;throw i}}s(U,"isReviewCompanionBound");async function ie(e,o){const r=Date.now()+Math.max(0,o);for(;;){if(await U(e))return!0;const n=r-Date.now();if(n<=0)return!1;await new Promise(t=>setTimeout(t,Math.min(P,n)))}}s(ie,"awaitCompanionBind");export{ie as awaitCompanionBind,re as captureOrigin,U as isReviewCompanionBound,ne as spawnReviewCompanion};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ReviewRecord } from './types.js';
|
|
2
|
-
import { type CommentAnchor } from './types.js';
|
|
3
2
|
import type { CanvasDb } from '../canvas/db.js';
|
|
4
3
|
type SourcePhase = 'submit' | 'comment';
|
|
5
4
|
/** Read the reviewed document once, preserving the exact bytes used for its digest. */
|
|
@@ -8,20 +7,8 @@ export declare function readReviewSource(file: string, phase?: SourcePhase): Pro
|
|
|
8
7
|
sha256: string;
|
|
9
8
|
lines: string[];
|
|
10
9
|
}>;
|
|
11
|
-
/**
|
|
12
|
-
export declare function
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
lines: string[];
|
|
16
|
-
}>;
|
|
17
|
-
/** Verify a create-time source precondition from the review row held by the caller's canvas write transaction. */
|
|
18
|
-
export declare function requireCurrentDocumentLocked(db: CanvasDb, review_id: string, expected_doc_hash: string): Promise<{
|
|
19
|
-
bytes: Buffer;
|
|
20
|
-
sha256: string;
|
|
21
|
-
lines: string[];
|
|
22
|
-
}>;
|
|
23
|
-
/** Reject malformed ranges rather than normalizing them into a different anchor. */
|
|
24
|
-
export declare function validateAnchorShape(anchor: CommentAnchor): void;
|
|
25
|
-
/** Capture the full source range used to render an anchor, without silently clamping it. */
|
|
26
|
-
export declare function captureAnchorText(lines: string[], anchor: CommentAnchor): string;
|
|
10
|
+
/** The review's live text: a document review reads the document's current head, a file review its snapshot. */
|
|
11
|
+
export declare function currentReviewText(db: CanvasDb, review: Pick<ReviewRecord, 'file' | 'document_id'>): Promise<string>;
|
|
12
|
+
/** Same as {@link currentReviewText}, for the review row held by the caller's canvas write transaction. */
|
|
13
|
+
export declare function currentReviewTextLocked(db: CanvasDb, review_id: string): Promise<string>;
|
|
27
14
|
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
var
|
|
2
|
-
`)}i(T,"captureAnchorText");export{T as captureAnchorText,h as readReviewSource,I as requireCurrentDocument,R as requireCurrentDocumentLocked,v as validateAnchorShape};
|
|
1
|
+
var d=Object.defineProperty;var i=(e,t)=>d(e,"name",{value:t,configurable:!0});import{createHash as m}from"node:crypto";import{statSync as w}from"node:fs";import{isBlobRequestPath as l,readRequestFileIfPresent as f}from"../human/request-files.js";import{documentLines as y}from"../document-lines.js";import{ReviewOperationError as u}from"./types.js";import{get as b}from"../graph/bodies.js";import{documentById as _,heads as h}from"../graph/documents.js";const s=2*1024*1024;function n(e,t,r){throw new u("source_unreadable","review source is unreadable",{phase:t,reason:r,file:e})}i(n,"sourceUnreadable");async function E(e,t="submit"){if(!l(e)){let c;try{const a=w(e);if(!a.isFile())return n(e,t,"unreadable");c=a.size}catch(a){return n(e,t,a.code==="ENOENT"?"missing":"unreadable")}if(c>s)return n(e,t,"too_large")}let r;try{r=await f(e)}catch{return n(e,t,"unreadable")}if(r===null)return n(e,t,"missing");if(r.length>s)return n(e,t,"too_large");if(r.includes(0))return n(e,t,"binary");let o;try{o=new TextDecoder("utf-8",{fatal:!0}).decode(r)}catch{return n(e,t,"binary")}return{bytes:r,sha256:m("sha256").update(r).digest("hex"),lines:y(o)}}i(E,"readReviewSource");async function g(e,t){if(t.document_id!==null){const r=(await h(e,await _(e,t.document_id)))[0],o=r===void 0?null:await b(e,r.body_hash);if(o===null)throw new u("source_unreadable","review document has no body",{phase:"comment",reason:"missing",file:t.file});return o}return new TextDecoder().decode((await E(t.file,"comment")).bytes)}i(g,"currentReviewText");async function D(e,t){const r=await e.prepare("SELECT file, document_id FROM human_requests WHERE request_id = ? AND kind = 'review' AND state = 'open'").get(t);if(r===void 0)throw new u("unknown_review","review was not found",{received:t});return g(e,r)}i(D,"currentReviewTextLocked");export{g as currentReviewText,D as currentReviewTextLocked,E as readReviewSource};
|
package/dist/core/review/fork.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
var
|
|
2
|
-
> ${n.anchor_line_text}
|
|
3
|
-
`;return[`The person handed you this one comment on \`${o.file}\` so it can be worked in parallel. The review companion you were forked from keeps the rest of the document.`,`${t}:${r}`,n.text,`Address it by editing only the lines this comment is about \u2014 other forks may be editing the same file \u2014 then resolve it with \`crtr human review comment resolve ${n.comment_id}\`, and tell the companion what changed with \`crtr push update\`.`].join(`
|
|
1
|
+
var d=Object.defineProperty;var r=(n,o)=>d(n,"name",{value:o,configurable:!0});import{basename as c}from"node:path";import{getNode as s}from"../canvas/index.js";import{materializeSessionBranch as w}from"../runtime/session-branch.js";import{spawnChildPrepared as p}from"../runtime/spawn.js";import{getComment as f}from"./comments.js";import{captureOrigin as l}from"./companion.js";import{requireVisibleReview as _}from"./store.js";import{ReviewOperationError as i}from"./types.js";function h(n,o){return[`The person handed you this one comment on \`${n.file}\` so it can be worked in parallel. The review companion you were forked from keeps the rest of the document.`,`> ${o.anchor.quote}`,o.text,`Address it by editing only the text this comment is about \u2014 other forks may be editing the same file \u2014 then resolve it with \`crtr human review comment resolve ${o.comment_id}\`, and tell the companion what changed with \`crtr push update\`.`].join(`
|
|
4
2
|
|
|
5
|
-
`)}
|
|
3
|
+
`)}r(h,"forkTask");async function R(n){const o=await f(n);if(o===null)throw new i("unknown_comment","comment was not found",{received:n});if(o.status!=="open")throw new i("comment_deleted","only an open comment can be forked",{comment_id:n,status:o.status});const e=await _(o.review_id);if(e.state!=="open")throw new i("review_terminal","review already has a terminal outcome",{state:e.state,requested:"fork",review:e});const t=await s(e.companion_node_id);if(t===null)throw new i("review_companion_unbound","review companion is gone",{companion_node_id:e.companion_node_id});const a=await l(e.companion_node_id),m=await w(a);return{node_id:(await p({kind:"review/companion",mode:"base",cwd:t.cwd,parent:e.companion_node_id,creator:e.companion_node_id,rootLifecycle:"resident",prompt:h(e,o),forkFrom:m,model:a.modelSpec,name:`comment on ${c(e.file)}`,reviewBinding:{review_id:e.review_id,origin_node_id:e.origin_node_id,branch_file:m,target_file:e.file}})).node.node_id,cwd:t.cwd}}r(R,"forkReviewComment");export{R as forkReviewComment};
|
|
@@ -6,7 +6,7 @@ export interface ReviewCommentSnapshot {
|
|
|
6
6
|
unresolved: number;
|
|
7
7
|
}
|
|
8
8
|
/** Build the immutable approval result from the review row and one comment snapshot. */
|
|
9
|
-
export declare function buildReviewResult(review: ReviewRecord, snapshot: ReviewCommentSnapshot, approvedSha256: string, at: string): ReviewResult;
|
|
9
|
+
export declare function buildReviewResult(review: ReviewRecord, snapshot: ReviewCommentSnapshot, approvedSha256: string, at: string, document: ReviewResult['document']): ReviewResult;
|
|
10
10
|
/** Project every terminal review from its SQL row; no ticket bridge participates. A file in the review directory goes
|
|
11
11
|
* where the directory is (the blob store for a `requests/…` prefix); an `output_path` is always a local file. A cloud role
|
|
12
12
|
* never writes an external path: an imported row keeps its `output_path` as history and projects only its own blobs. */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var l=Object.defineProperty;var s=(e,t)=>l(e,"name",{value:t,configurable:!0});import{atomicWriteJson as u}from"../human/convention.js";import{isCloudRole as c}from"../canvas/person.js";import{writeRequestFile as r}from"../human/request-files.js";function f(e,t,n,o){return{schema:"humanloop.review-response/v1",review_id:e.review_id,file:e.file,submitted:!0,approved:!0,changed:n!==e.baseline_sha256,baseline_sha256:e.baseline_sha256,approved_sha256:n,companion_node_id:e.companion_node_id,comments_total:t.total,comments_unresolved:t.unresolved,comments:t.comments,submittedAt:
|
|
2
|
-
`,"json");async function v(e,t){const n=`${e.review_dir}/result.json`;await r(n,a(t));const
|
|
1
|
+
var l=Object.defineProperty;var s=(e,t)=>l(e,"name",{value:t,configurable:!0});import{atomicWriteJson as u}from"../human/convention.js";import{isCloudRole as c}from"../canvas/person.js";import{writeRequestFile as r}from"../human/request-files.js";function f(e,t,n,i,o){return{schema:"humanloop.review-response/v1",review_id:e.review_id,document:o,file:e.file,submitted:!0,approved:!0,changed:n!==e.baseline_sha256,baseline_sha256:e.baseline_sha256,approved_sha256:n,companion_node_id:e.companion_node_id,comments_total:t.total,comments_unresolved:t.unresolved,comments:t.comments,submittedAt:i,savedAt:i}}s(f,"buildReviewResult");const a=s(e=>JSON.stringify(e,null,2)+`
|
|
2
|
+
`,"json");async function v(e,t){const n=`${e.review_dir}/result.json`;await r(n,a(t));const i=c()?null:e.output_path,o=i??`${e.review_dir}/feedback.json`;return o!==n&&(i===null?await r(o,a(t)):u(o,t)),{destinations:o===n?[n]:[n,o]}}s(v,"projectReviewResult");async function b(e,t){const n=`${e.review_dir}/result.json`;return await r(n,a(t)),{destinations:[n]}}s(b,"projectReviewCancellation");export{f as buildReviewResult,b as projectReviewCancellation,v as projectReviewResult};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var h=Object.defineProperty;var o=(i,e)=>h(i,"name",{value:e,configurable:!0});import{conversationIdFromPath as v,conversationStore as g,ConversationNotFoundError as q}from"../conversation-store/index.js";import{getNode as w}from"../canvas/index.js";import{openRequest as b,cancelBindingRequest as y,getRequest as N}from"../human/requests.js";import{NodeIdConflictError as E}from"../runtime/nodes.js";import{reviveNode as I}from"../runtime/revive.js";import{awaitCompanionBind as R,spawnReviewCompanion as S}from"./companion.js";import{withCanvasWrite as C}from"../canvas/db.js";import{signalReviewChange as O}from"./comments.js";import{COMPANION_BIND_DEADLINE_MS as f,ReviewOperationError as r}from"./types.js";const m=o(i=>C(e=>O(e,i)),"signalReview");async function p(i){const e=await N(i);if(e===null||e.kind!=="review")throw new r("unknown_review","review was not found",{received:i});return e}o(p,"requireBinding");function D(i){try{const e=JSON.parse(i.specification_json);if(typeof e!="object"||e===null)throw new Error("not an object");return e}catch(e){throw new Error(`corrupt review specification: ${i.request_id}`,{cause:e})}}o(D,"specification");async function J(i){let e=await p(i);if(e.state!=="binding")return e;const t=D(e),a=t.branch_file,d=typeof a=="string"?v(a):null;let u=d===null;if(d!==null)try{await g().header(d)}catch(n){if(!(n instanceof q))throw n;u=!0}if(u)throw await y(e.request_id,new Date().toISOString(),"branch_lost")&&await m(e.request_id),new r("branch_lost","review branch was lost before realization",{review_id:e.request_id});if(e.file===null||e.requester_node_id===null||e.companion_node_id===null)throw new Error(`binding review has incomplete identity: ${e.request_id}`);const _=t.document_name;if(typeof _!="string")throw new Error(`binding review has no document: ${e.request_id}`);const s=await w(e.requester_node_id);if(s===null)throw new r("review_origin_missing","review origin was not found",{origin_node_id:e.requester_node_id});if(await w(e.companion_node_id)===null){const n=t.model_spec;if(typeof n!="string")throw new Error(`binding review has no model spec: ${e.request_id}`);try{await S({nodeId:e.companion_node_id,reviewId:e.request_id,originNodeId:e.requester_node_id,branchFile:a,documentName:_,modelSpec:n,cwd:s.cwd,profileId:s.profile_id??null})}catch(l){if(!(l instanceof E))throw l}}const c=await w(e.companion_node_id);if(c===null)throw new r("review_companion_unbound","review companion was not created",{review_id:e.request_id});if(c.pi_session_id===null&&await I(c.node_id,{resume:!1,capacity:"refuse"}),!await R(e.companion_node_id,f))throw new r("review_companion_unbound","review companion did not bind in time",{review_id:e.request_id,waited_ms:f});return await b(e.request_id,new Date().toISOString())&&await m(e.request_id),e=await p(i),e}o(J,"realizeReview");export{J as realizeReview};
|
|
@@ -9,18 +9,11 @@ export interface ReviewedDocument {
|
|
|
9
9
|
base: string;
|
|
10
10
|
body: string;
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
12
|
+
/** A review of one canvas document. */
|
|
13
13
|
export interface StageReviewArgs {
|
|
14
14
|
origin_kind: ReviewOriginKind;
|
|
15
15
|
origin_node_id: string;
|
|
16
|
-
|
|
17
|
-
/** A cloud role's file review: the upload the caller's CLI made of the file, owned by this app and person. */
|
|
18
|
-
file_upload_id?: string;
|
|
19
|
-
file_upload_owner?: {
|
|
20
|
-
grantee: string;
|
|
21
|
-
sub: string;
|
|
22
|
-
} | undefined;
|
|
23
|
-
document?: ReviewedDocument;
|
|
16
|
+
document: ReviewedDocument;
|
|
24
17
|
idempotency_key: string;
|
|
25
18
|
subtitle?: string;
|
|
26
19
|
output_path?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var S=Object.defineProperty;var n=(e,i)=>S(e,"name",{value:i,configurable:!0});import{createHash as F}from"node:crypto";import{existsSync as k,realpathSync as B,rmSync as x,statSync as E}from"node:fs";import{getNode as I}from"../canvas/index.js";import{conversationIdFromPath as O,conversationStore as q,ConversationNotFoundError as D}from"../conversation-store/index.js";import{ensureReviewDir as $,reviewDir as f}from"../canvas/paths.js";import{checkReviewableBytes as z,checkReviewableFile as j}from"../human/visible-paths.js";import{isCloudRole as p}from"../canvas/person.js";import{blobStore as N}from"../blobs/index.js";import{REQUEST_BLOB_PREFIX as P,isBlobRequestPath as h,readRequestFile as v,writeRequestFile as U}from"../human/request-files.js";import{newNodeId as g}from"../runtime/nodes.js";import{captureOrigin as C}from"./companion.js";import{materializeSessionBranch as T}from"../runtime/session-branch.js";import{getRequestByIdempotencyKey as A}from"../human/requests.js";import{ReviewOperationError as o}from"./types.js";function r(e,i){return new o("review_target_unreviewable","review target cannot be staged",{phase:"create",file:e,reason:i})}n(r,"targetError");function d(e){return p()?`${P}${e}`:f(e)}n(d,"stagedReviewDir");function y(e){return e==="file is not UTF-8 text"?"binary":e==="file is too large to review (2 MB limit)"?"too_large":e==="file is too long to review (5,000 line limit)"?"too_many_lines":"not_a_file"}n(y,"unreviewableReason");async function H(e){const i=z(await v(e));if(!i.ok)throw r(e,y(i.reason));return e}n(H,"validateBlobReviewFile");function K(e){if(!k(e))throw r(e,"missing");try{if(!E(e).isFile())throw r(e,"not_a_file")}catch(t){throw t instanceof o?t:r(e,"missing")}const i=j(e);if(!i.ok)throw r(e,y(i.reason));try{return B(e)}catch{throw r(e,"missing")}}n(K,"validateReviewFile");function L(e){return new o("review_branch_unavailable","review branch could not be materialized",{reason:"materialize_failed",origin_node_id:e})}n(L,"branchUnavailable");async function M(e){try{return await C(e)}catch(i){throw i instanceof o&&i.code==="review_origin_missing"?new o("review_origin_missing","review origin was not found",{origin_node_id:e,reason:"origin_missing"}):i}}n(M,"captureStagedOrigin");async function Q(e,i){try{return await T(i)}catch{throw L(e)}}n(Q,"materialize");async function X(e,i){if(i!==void 0){const t=O(i);if(t===null)throw new Error(`invalid staged conversation path: ${i}`);try{await q().delete(t)}catch(c){if(!(c instanceof D))throw c}}try{await G(e)}catch{}}n(X,"discardStaging");async function G(e){if(p()){const i=await N();for(const t of await i.list(`${d(e)}/`))await i.delete(t)}else x(f(e),{recursive:!0,force:!0})}n(G,"deleteReviewFiles");async function de(e){const i=await A(e.idempotency_key);if(i!==null)return{existing:i};if(await I(e.origin_node_id)===null)throw new o("review_origin_missing","review origin was not found",{origin_node_id:e.origin_node_id,reason:"origin_missing"});const t=await g(),c=await g();let _,u;try{const s=d(t);h(s)||$(t);const l=`${s}/document.md`;await U(l,e.document.body),u=h(l)?await H(l):K(l);const a=await M(e.origin_node_id),b=new Date().toISOString(),w=await v(u),m=F("sha256").update(w).digest("hex");_=await Q(e.origin_node_id,a);const R=new Date().toISOString();return{row:{review_id:t,idempotency_key:e.idempotency_key,origin_kind:e.origin_kind,origin_node_id:e.origin_node_id,companion_node_id:c,review_dir:d(t),file:u,origin_session_file:a.sourceFile,origin_session_id:a.sourceSessionId,origin_leaf_id:a.leafId,model_spec:a.modelSpec,branch_file:_,baseline_sha256:m,baseline_bytes:w.length,anchor_base_sha256:m,anchor_base_bytes:w,state:"binding",created:R,captured_at:b,opened_at:null,submit_requested_at:null,output_path:e.output_path??null,document_id:e.document.id,document_name:e.document.name,document_base:e.document.base,subtitle:e.subtitle??null,approved_at:null,approved_sha256:null,changed:null,comments_total:null,comments_unresolved:null,result_json:null,canceled_at:null,cancel_reason:null,cancel_actor:null,delivery_entry_id:null,delivered_at:null,delivery_error:null,projected_at:null,projection_error:null},review_dir:d(t)}}catch(s){throw await X(t,_),s}}n(de,"stageReview");export{G as deleteReviewFiles,X as discardStaging,de as stageReview};
|