toolroll 0.9.93 → 0.9.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +79 -0
- package/dist/activity-line.d.ts +7 -4
- package/dist/activity-line.js +9 -7
- package/dist/agent-fence.d.ts +10 -0
- package/dist/agent-fence.js +6 -3
- package/dist/approval-authority.d.ts +7 -1
- package/dist/approval-authority.js +11 -2
- package/dist/approval-password.d.ts +31 -0
- package/dist/approval-password.js +26 -0
- package/dist/assignment-status.d.ts +1 -1
- package/dist/assignment-ui.js +3 -1
- package/dist/assignment.js +5 -0
- package/dist/attest.d.ts +3 -0
- package/dist/attest.js +10 -0
- package/dist/boot-identity.d.ts +2 -1
- package/dist/boot-identity.js +6 -4
- package/dist/bounded-spawn.d.ts +57 -0
- package/dist/bounded-spawn.js +220 -0
- package/dist/browser/terminal.js +42 -42
- package/dist/browser/workspace.css +1 -1
- package/dist/browser/workspace.js +32 -32
- package/dist/browser-crew.js +2 -0
- package/dist/browser-shell.d.ts +1 -1
- package/dist/browser-shell.js +2 -2
- package/dist/browser-workspace.d.ts +50 -2
- package/dist/browser-workspace.js +3 -3
- package/dist/build-review.js +2 -0
- package/dist/builder-restart.d.ts +21 -0
- package/dist/builder-restart.js +50 -0
- package/dist/builder.d.ts +11 -2
- package/dist/builder.js +234 -101
- package/dist/card-catalog.d.ts +209 -0
- package/dist/card-catalog.js +133 -0
- package/dist/card-cli.d.ts +43 -0
- package/dist/card-cli.js +44 -0
- package/dist/card-render.d.ts +26 -0
- package/dist/card-render.js +223 -0
- package/dist/card-sources.d.ts +68 -0
- package/dist/card-sources.js +234 -0
- package/dist/chat-acceptance.js +1 -1
- package/dist/chat-actions.d.ts +106 -9
- package/dist/chat-actions.js +473 -46
- package/dist/chat-approval.d.ts +13 -0
- package/dist/chat-approval.js +39 -9
- package/dist/chat-card-part.d.ts +11 -0
- package/dist/chat-card-part.js +18 -0
- package/dist/chat-card.d.ts +46 -0
- package/dist/chat-card.js +99 -0
- package/dist/chat-channel.d.ts +2 -0
- package/dist/chat-channel.js +37 -14
- package/dist/chat-controls.d.ts +4 -0
- package/dist/chat-controls.js +4 -0
- package/dist/chat-decide.d.ts +10 -16
- package/dist/chat-decide.js +79 -62
- package/dist/chat-delivery.js +13 -4
- package/dist/chat-flow.d.ts +0 -27
- package/dist/chat-flow.js +31 -2
- package/dist/chat-quiet.js +4 -4
- package/dist/chat-task-actions.d.ts +3 -2
- package/dist/chat-task-actions.js +19 -5
- package/dist/chat-terms.d.ts +14 -2
- package/dist/chat-terms.js +35 -0
- package/dist/chat-voice.d.ts +1 -1
- package/dist/chat-voice.js +2 -2
- package/dist/check-facts.d.ts +3 -1
- package/dist/check-facts.js +57 -11
- package/dist/check-failure.d.ts +24 -3
- package/dist/check-failure.js +89 -13
- package/dist/check-levels-ui.d.ts +4 -0
- package/dist/check-levels-ui.js +10 -1
- package/dist/check-load.d.ts +85 -0
- package/dist/check-load.js +147 -0
- package/dist/check-only-standing.d.ts +36 -0
- package/dist/check-only-standing.js +39 -0
- package/dist/check-only.d.ts +15 -0
- package/dist/check-only.js +99 -0
- package/dist/check-repair.d.ts +47 -0
- package/dist/check-repair.js +240 -0
- package/dist/check-report.d.ts +2 -0
- package/dist/check-report.js +1 -1
- package/dist/check-stamp.d.ts +46 -0
- package/dist/check-stamp.js +93 -0
- package/dist/checkout-cleanup.d.ts +36 -5
- package/dist/checkout-cleanup.js +166 -14
- package/dist/claim.d.ts +6 -0
- package/dist/claim.js +13 -2
- package/dist/cli-help.d.ts +4 -1
- package/dist/cli-help.js +49 -30
- package/dist/cli.js +15 -1
- package/dist/code-extract.d.ts +44 -0
- package/dist/code-extract.js +88 -0
- package/dist/code-map-acts.d.ts +24 -0
- package/dist/code-map-acts.js +53 -0
- package/dist/code-map-admission.d.ts +52 -0
- package/dist/code-map-admission.js +295 -0
- package/dist/code-map-build.d.ts +63 -0
- package/dist/code-map-build.js +415 -0
- package/dist/code-map-cli.d.ts +153 -0
- package/dist/code-map-cli.js +103 -0
- package/dist/code-map-main.d.ts +1 -0
- package/dist/code-map-main.js +48 -0
- package/dist/code-map-read.d.ts +106 -0
- package/dist/code-map-read.js +171 -0
- package/dist/code-map-report.d.ts +37 -0
- package/dist/code-map-report.js +95 -0
- package/dist/code-map-shape.d.ts +172 -0
- package/dist/code-map-shape.js +327 -0
- package/dist/code-map-store.d.ts +136 -0
- package/dist/code-map-store.js +233 -0
- package/dist/coding-provider.d.ts +3 -1
- package/dist/coding-provider.js +12 -7
- package/dist/coding-update.js +3 -2
- package/dist/coding-workspace.d.ts +1 -1
- package/dist/coding-workspace.js +8 -8
- package/dist/console-chrome.js +2 -2
- package/dist/containment.d.ts +5 -0
- package/dist/containment.js +14 -1
- package/dist/contracts/chat-actions.d.ts +92 -0
- package/dist/contracts/chat-actions.js +20 -0
- package/dist/contracts/chat-card.d.ts +91 -0
- package/dist/contracts/chat-card.js +54 -0
- package/dist/contracts/chat-content.d.ts +191 -0
- package/dist/contracts/chat-content.js +4 -0
- package/dist/contracts/cli.d.ts +52 -0
- package/dist/contracts/cli.js +4 -0
- package/dist/contracts/console-api.d.ts +12 -3
- package/dist/contracts/console-api.js +12 -3
- package/dist/contracts/flow-propose.d.ts +8 -1
- package/dist/contracts/flow-propose.js +3 -1
- package/dist/contracts/flow-send.d.ts +126 -0
- package/dist/contracts/flow-send.js +3 -0
- package/dist/contracts/gateway-tools.d.ts +17 -0
- package/dist/contracts/gateway-tools.js +3 -1
- package/dist/contracts/lead-tools.d.ts +234 -0
- package/dist/contracts/lead-tools.js +25 -1
- package/dist/contracts/project-knowledge.d.ts +38 -5
- package/dist/contracts/project-knowledge.js +11 -5
- package/dist/contracts/project-memory.d.ts +3 -1
- package/dist/contracts/project-memory.js +3 -2
- package/dist/contracts/storage.d.ts +14 -0
- package/dist/contracts/storage.js +3 -1
- package/dist/contracts/store-json.d.ts +18 -0
- package/dist/contracts/youiyoux-request.d.ts +1 -1
- package/dist/contracts/youiyoux-request.js +1 -1
- package/dist/desktop-access.js +6 -2
- package/dist/discord-chat.js +14 -0
- package/dist/dispatch.d.ts +1 -1
- package/dist/dispatch.js +25 -16
- package/dist/dispose.d.ts +19 -0
- package/dist/dispose.js +55 -9
- package/dist/easy-start.js +2 -3
- package/dist/eval-oracle.js +4 -1
- package/dist/evals.js +2 -1
- package/dist/evidence-pair.d.ts +53 -0
- package/dist/evidence-pair.js +128 -0
- package/dist/exhaustion.d.ts +17 -4
- package/dist/exhaustion.js +44 -4
- package/dist/export.js +1 -1
- package/dist/failing-first.d.ts +31 -0
- package/dist/failing-first.js +44 -0
- package/dist/fallback-schema.d.ts +8 -0
- package/dist/fallback-schema.js +40 -0
- package/dist/fallback.d.ts +138 -0
- package/dist/fallback.js +605 -0
- package/dist/fast-start.d.ts +136 -0
- package/dist/fast-start.js +431 -0
- package/dist/fast-terms.d.ts +9 -0
- package/dist/fast-terms.js +23 -0
- package/dist/fenced-check-coverage.d.ts +62 -0
- package/dist/fenced-check-coverage.js +54 -0
- package/dist/findings.d.ts +224 -0
- package/dist/findings.js +449 -0
- package/dist/first-run.js +1 -1
- package/dist/flaky-ci.d.ts +31 -0
- package/dist/flaky-ci.js +149 -0
- package/dist/flaky-cli.d.ts +60 -0
- package/dist/flaky-cli.js +60 -0
- package/dist/flaky.d.ts +75 -9
- package/dist/flaky.js +255 -0
- package/dist/fleet-schema.d.ts +17 -0
- package/dist/fleet-schema.js +135 -0
- package/dist/flow-browser.js +2 -2
- package/dist/flow-card-task.js +3 -0
- package/dist/flow-code.d.ts +2 -2
- package/dist/flow-code.js +9 -5
- package/dist/flow-result-card.d.ts +22 -0
- package/dist/flow-result-card.js +55 -0
- package/dist/flow-send.js +12 -9
- package/dist/flow-steps.js +1 -1
- package/dist/flow-triggers.d.ts +1 -1
- package/dist/flow-triggers.js +2 -2
- package/dist/flow-unattended.d.ts +26 -0
- package/dist/flow-unattended.js +12 -3
- package/dist/flows-ui.js +10 -2
- package/dist/follow-through-brief.d.ts +12 -0
- package/dist/follow-through-brief.js +31 -0
- package/dist/follow-through-cli.d.ts +23 -0
- package/dist/follow-through-cli.js +153 -0
- package/dist/git-incident.d.ts +16 -0
- package/dist/git-incident.js +69 -6
- package/dist/github-import.d.ts +62 -0
- package/dist/github-import.js +146 -0
- package/dist/guides.js +15 -10
- package/dist/handover-note.d.ts +33 -0
- package/dist/handover-note.js +106 -0
- package/dist/invoke.d.ts +25 -2
- package/dist/invoke.js +157 -58
- package/dist/job-object-helper.ps1 +10 -3
- package/dist/keymap.d.ts +41 -0
- package/dist/keymap.js +51 -0
- package/dist/knowledge-cli.js +1 -1
- package/dist/knowledge-ui.d.ts +21 -4
- package/dist/knowledge-ui.js +75 -7
- package/dist/laptop-background.d.ts +16 -0
- package/dist/laptop-background.js +108 -2
- package/dist/lead-cli.js +26 -24
- package/dist/lead-context.js +1 -1
- package/dist/lead-contract.d.ts +1 -1
- package/dist/lead-contract.js +3 -2
- package/dist/lead-doors.d.ts +4 -0
- package/dist/lead-doors.js +2 -2
- package/dist/lead-progress.js +5 -0
- package/dist/lead-status.d.ts +2 -0
- package/dist/lead-status.js +6 -2
- package/dist/lead-tools.js +162 -34
- package/dist/lead.js +2 -2
- package/dist/lesson-notes.d.ts +81 -0
- package/dist/lesson-notes.js +336 -0
- package/dist/limits-ui.js +1 -1
- package/dist/local-owner.d.ts +1 -1
- package/dist/local-owner.js +16 -0
- package/dist/machine-check.d.ts +16 -0
- package/dist/machine-check.js +26 -0
- package/dist/machine-identity.d.ts +75 -0
- package/dist/machine-identity.js +170 -0
- package/dist/mcp-core.js +11 -1
- package/dist/memory-cli.d.ts +300 -1
- package/dist/memory-cli.js +62 -9
- package/dist/memory-pass.d.ts +16 -0
- package/dist/memory-pass.js +67 -3
- package/dist/memory-tidy.d.ts +181 -0
- package/dist/memory-tidy.js +523 -0
- package/dist/memory-use.d.ts +35 -0
- package/dist/memory-use.js +109 -0
- package/dist/merge-checklist.d.ts +55 -0
- package/dist/merge-checklist.js +182 -0
- package/dist/modes.d.ts +6 -6
- package/dist/modes.js +3 -1
- package/dist/needs-you.d.ts +31 -9
- package/dist/needs-you.js +110 -41
- package/dist/nightly-github.d.ts +2 -0
- package/dist/nightly-github.js +4 -4
- package/dist/operate-remote-arguments.js +7 -1
- package/dist/operate-remote.js +3 -1
- package/dist/operate.d.ts +6 -1
- package/dist/operate.js +565 -64
- package/dist/phase-routing.js +2 -2
- package/dist/plain-schema.d.ts +23 -0
- package/dist/plain-schema.js +94 -0
- package/dist/plain-words.d.ts +20 -0
- package/dist/plain-words.js +66 -0
- package/dist/plan-login.d.ts +14 -0
- package/dist/plan-login.js +58 -0
- package/dist/planner.d.ts +1 -1
- package/dist/planner.js +4 -2
- package/dist/process-liveness.d.ts +2 -0
- package/dist/process-liveness.js +61 -17
- package/dist/project-delete-ui.d.ts +19 -2
- package/dist/project-delete-ui.js +29 -1
- package/dist/project-delete.js +14 -1
- package/dist/project-knowledge.d.ts +18 -11
- package/dist/project-knowledge.js +39 -9
- package/dist/project-learning.d.ts +2 -1
- package/dist/project-learning.js +15 -45
- package/dist/project-memory.d.ts +5 -0
- package/dist/project-memory.js +22 -2
- package/dist/project-tools.d.ts +4 -4
- package/dist/project-tools.js +23 -7
- package/dist/proof.js +30 -5
- package/dist/protected-storage-look.d.ts +1 -0
- package/dist/protected-storage-look.js +13 -0
- package/dist/protected-storage.d.ts +70 -39
- package/dist/protected-storage.js +196 -147
- package/dist/provider-auth.js +1 -1
- package/dist/provider-capture.d.ts +34 -0
- package/dist/provider-capture.js +53 -0
- package/dist/publish.js +9 -1
- package/dist/pull-request-flow.js +5 -0
- package/dist/push.d.ts +18 -2
- package/dist/push.js +40 -16
- package/dist/release-adapters.d.ts +9 -0
- package/dist/release-adapters.js +76 -0
- package/dist/release-auto.js +13 -13
- package/dist/release-card.d.ts +1 -2
- package/dist/release-card.js +11 -0
- package/dist/release-carry.d.ts +7 -2
- package/dist/release-carry.js +49 -10
- package/dist/release-cli.d.ts +4 -0
- package/dist/release-cli.js +29 -22
- package/dist/release-coverage.js +1 -1
- package/dist/release-next.d.ts +48 -0
- package/dist/release-next.js +161 -0
- package/dist/release.d.ts +20 -1
- package/dist/release.js +85 -9
- package/dist/remote-destination.d.ts +36 -0
- package/dist/remote-destination.js +217 -0
- package/dist/remote-main.d.ts +48 -0
- package/dist/remote-main.js +84 -5
- package/dist/repository-context.d.ts +3 -2
- package/dist/repository-context.js +112 -70
- package/dist/restart-certification.d.ts +1 -0
- package/dist/restart-certification.js +8 -6
- package/dist/result-acts.d.ts +27 -19
- package/dist/result-acts.js +36 -25
- package/dist/result-follow-ups.d.ts +2 -2
- package/dist/result-follow-ups.js +18 -4
- package/dist/result-review.d.ts +1 -1
- package/dist/route-change-check.d.ts +4 -0
- package/dist/route-change-check.js +13 -0
- package/dist/route-change.d.ts +22 -0
- package/dist/route-change.js +89 -0
- package/dist/route-hooks.js +3 -2
- package/dist/route-results.d.ts +6 -1
- package/dist/route-results.js +14 -5
- package/dist/run-closeout.d.ts +1 -1
- package/dist/run-closeout.js +7 -5
- package/dist/runner-process.js +3 -2
- package/dist/runner.js +2 -1
- package/dist/scope.d.ts +28 -4
- package/dist/scope.js +92 -28
- package/dist/scout.d.ts +1 -1
- package/dist/scout.js +2 -1
- package/dist/serve.d.ts +1 -1
- package/dist/serve.js +26 -18
- package/dist/server/chat.js +16 -14
- package/dist/server/chrome.d.ts +1 -1
- package/dist/server/chrome.js +26 -35
- package/dist/server/console.css +73 -0
- package/dist/server/guards.js +3 -0
- package/dist/server/home.d.ts +6 -0
- package/dist/server/home.js +21 -13
- package/dist/server/http.js +1 -1
- package/dist/server/kit.js +1 -1
- package/dist/server/merge-ready-view.d.ts +10 -0
- package/dist/server/merge-ready-view.js +30 -0
- package/dist/server/pages-assets.d.ts +1 -0
- package/dist/server/pages-assets.js +8 -5
- package/dist/server/pages.js +103 -82
- package/dist/server/render-chat.js +16 -3
- package/dist/server/render-code-map.d.ts +30 -0
- package/dist/server/render-code-map.js +137 -0
- package/dist/server/render-flaky.d.ts +20 -0
- package/dist/server/render-flaky.js +59 -0
- package/dist/server/render-follow-through.d.ts +11 -0
- package/dist/server/render-follow-through.js +68 -0
- package/dist/server/render-history.js +1 -1
- package/dist/server/render-new-task.d.ts +26 -1
- package/dist/server/render-new-task.js +30 -5
- package/dist/server/render-pages.d.ts +1 -175
- package/dist/server/render-pages.js +38 -313
- package/dist/server/render-projects.d.ts +2 -1
- package/dist/server/render-projects.js +9 -7
- package/dist/server/render-release.d.ts +2 -0
- package/dist/server/render-release.js +3 -3
- package/dist/server/render-results.d.ts +2 -0
- package/dist/server/render-results.js +68 -68
- package/dist/server/render-tasks.d.ts +16 -2
- package/dist/server/render-tasks.js +177 -141
- package/dist/server/retired-routes.d.ts +17 -0
- package/dist/server/retired-routes.js +53 -0
- package/dist/server/route-table.d.ts +3 -0
- package/dist/server/route-table.js +48 -12
- package/dist/server/settings.js +166 -34
- package/dist/server/task-views.js +66 -26
- package/dist/server/tasks.d.ts +2 -6
- package/dist/server/tasks.js +250 -321
- package/dist/server/welcome.js +1 -1
- package/dist/settings-groups-ui.d.ts +1 -0
- package/dist/settings-groups-ui.js +4 -2
- package/dist/settings-kit.js +3 -2
- package/dist/settings-proofs.js +3 -1
- package/dist/slack-chat.js +14 -1
- package/dist/steer-mailbox.d.ts +8 -1
- package/dist/steer-mailbox.js +164 -6
- package/dist/stop-proof.js +6 -4
- package/dist/storage-sweep-process.js +1 -1
- package/dist/storage-sweep.d.ts +5 -3
- package/dist/storage-sweep.js +30 -9
- package/dist/storage-ui.js +28 -17
- package/dist/storage.d.ts +27 -2
- package/dist/storage.js +39 -2
- package/dist/store.d.ts +89 -7
- package/dist/store.js +386 -114
- package/dist/surface.js +67 -6
- package/dist/sweep-quarantine.d.ts +1 -0
- package/dist/sweep-quarantine.js +6 -4
- package/dist/tamper-scan.d.ts +4 -0
- package/dist/tamper-scan.js +90 -0
- package/dist/task-aliases.d.ts +5 -0
- package/dist/task-aliases.js +9 -0
- package/dist/task-control.d.ts +2 -1
- package/dist/task-control.js +4 -1
- package/dist/task-outcome-cli.d.ts +2 -0
- package/dist/task-outcome-cli.js +17 -17
- package/dist/task-sizing.d.ts +5 -0
- package/dist/task-sizing.js +2 -0
- package/dist/task-source.d.ts +7 -0
- package/dist/task-source.js +14 -0
- package/dist/task-status.d.ts +9 -0
- package/dist/task-status.js +45 -49
- package/dist/teardown-git.d.ts +18 -0
- package/dist/teardown-git.js +105 -21
- package/dist/telegram-lead.js +23 -6
- package/dist/telegram-progress.js +5 -3
- package/dist/telegram-status.js +6 -4
- package/dist/telegram.js +12 -1
- package/dist/test-infra.d.ts +8 -0
- package/dist/test-infra.js +18 -0
- package/dist/tidy.js +1 -1
- package/dist/toolroll-update.js +19 -5
- package/dist/tui-contract.d.ts +24 -0
- package/dist/tui-source.js +67 -8
- package/dist/tui.js +51 -51
- package/dist/vanished-retry.d.ts +30 -0
- package/dist/vanished-retry.js +174 -0
- package/dist/work-index.d.ts +2 -0
- package/dist/work-index.js +95 -66
- package/dist/work-summary.d.ts +1 -1
- package/dist/work-summary.js +7 -2
- package/dist/workspace-ui.d.ts +7 -3
- package/dist/workspace-ui.js +38 -23
- package/dist/worktree.d.ts +12 -3
- package/dist/worktree.js +91 -14
- package/package.json +2 -1
- package/dist/server/render-next.d.ts +0 -63
- package/dist/server/render-next.js +0 -109
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which computer is "this one" for process custody (process witnesses, workspace notes, quarantine journals, a coding
|
|
3
|
+
* agent's custody, runner records, eval campaigns).
|
|
4
|
+
*
|
|
5
|
+
* The network hostname is not an identity: on a Mac with no HostName set, os.hostname() follows the network
|
|
6
|
+
* ("Studio-A.local" on one network, "studio-a.localdomain" on another). A witness recorded under the
|
|
7
|
+
* old name then read as another computer's forever, and a finished build waited on that computer to confirm it
|
|
8
|
+
* stopped (runs 3312 and 3313).
|
|
9
|
+
*
|
|
10
|
+
* So each witness carries this machine's stable id, read from the OS and hashed with a Toolroll-only prefix (the raw
|
|
11
|
+
* id is never stored):
|
|
12
|
+
*
|
|
13
|
+
* darwin IOPlatformUUID (ioreg -rd1 -c IOPlatformExpertDevice): fixed per machine
|
|
14
|
+
* linux /etc/machine-id (or /var/lib/dbus/machine-id): fixed per installation; a container reads as unknown, since
|
|
15
|
+
* containers made from one image can share it
|
|
16
|
+
* win32 HKLM\SOFTWARE\Microsoft\Cryptography MachineGuid
|
|
17
|
+
*
|
|
18
|
+
* THE RULE (isThisMachine): a witness with an id is this machine's exactly when the id equals ours, and never when ours
|
|
19
|
+
* is unknown. A witness without one (written before v150, or by a process that couldn't read its id) is this
|
|
20
|
+
* machine's when its host string is one of this machine's own names: os.hostname() as it reads now, the names macOS
|
|
21
|
+
* configures for it (scutil HostName, LocalHostName + ".local"), and the hostnames recorded beside this machine's own
|
|
22
|
+
* id (machine_host_alias, written only by a process that read that id here, with the hostname it read here at the
|
|
23
|
+
* same moment). No name ever enters the set from a witness, a note, a runner record or anything another computer
|
|
24
|
+
* wrote, so another computer can only match by holding one of this machine's own names: the same coincidence the
|
|
25
|
+
* plain hostname comparison always accepted, and never for a witness that carries a different id.
|
|
26
|
+
*/
|
|
27
|
+
import { execFileSync } from "node:child_process";
|
|
28
|
+
import { createHash } from "node:crypto";
|
|
29
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
30
|
+
import { hostname } from "node:os";
|
|
31
|
+
const defaultRun = (file, args) => execFileSync(file, args, { encoding: "utf8", timeout: 3000, stdio: ["ignore", "pipe", "ignore"] });
|
|
32
|
+
/** The stored form of a raw OS id: hashed under a Toolroll-only prefix, so the record never holds the raw id. */
|
|
33
|
+
export function hashMachineId(source, raw) {
|
|
34
|
+
return createHash("sha256").update(`toolroll machine identity v1\0${source}\0${raw.trim().toLowerCase()}`).digest("hex").slice(0, 32);
|
|
35
|
+
}
|
|
36
|
+
/** Read this machine's id from the OS, never cached here (machineIdentity() caches it). */
|
|
37
|
+
export function readMachineIdentity(readers = {}) {
|
|
38
|
+
const platform = readers.platform ?? process.platform;
|
|
39
|
+
const readFile = readers.readFile ?? ((path) => readFileSync(path, "utf8"));
|
|
40
|
+
const exists = readers.exists ?? existsSync;
|
|
41
|
+
const run = readers.run ?? defaultRun;
|
|
42
|
+
try {
|
|
43
|
+
if (platform === "darwin") {
|
|
44
|
+
const raw = /"IOPlatformUUID"\s*=\s*"([0-9A-Fa-f-]{36})"/.exec(run("/usr/sbin/ioreg", ["-rd1", "-c", "IOPlatformExpertDevice"]))?.[1];
|
|
45
|
+
if (raw === undefined || !/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(raw))
|
|
46
|
+
return { ok: false, reason: "malformed", detail: "ioreg named no IOPlatformUUID" };
|
|
47
|
+
return { ok: true, id: hashMachineId("darwin-platform-uuid", raw), source: "darwin-platform-uuid" };
|
|
48
|
+
}
|
|
49
|
+
if (platform === "linux") {
|
|
50
|
+
// Containers built from one image can carry the same machine-id: there the id proves nothing, and the host
|
|
51
|
+
// name (the container's own) decides, as it always did.
|
|
52
|
+
if (exists("/.dockerenv") || exists("/run/.containerenv"))
|
|
53
|
+
return { ok: false, reason: "container", detail: "a container's machine-id can be shared with other containers" };
|
|
54
|
+
let raw = null;
|
|
55
|
+
for (const path of ["/etc/machine-id", "/var/lib/dbus/machine-id"]) {
|
|
56
|
+
try {
|
|
57
|
+
raw = readFile(path).trim();
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
catch { /* the next place */ }
|
|
61
|
+
}
|
|
62
|
+
if (raw === null)
|
|
63
|
+
return { ok: false, reason: "unreadable", detail: "no machine-id could be read" };
|
|
64
|
+
if (!/^[0-9a-f]{32}$/i.test(raw) || /^0+$/.test(raw))
|
|
65
|
+
return { ok: false, reason: "malformed", detail: "the machine-id was not 32 hex digits" };
|
|
66
|
+
return { ok: true, id: hashMachineId("linux-machine-id", raw), source: "linux-machine-id" };
|
|
67
|
+
}
|
|
68
|
+
if (platform === "win32") {
|
|
69
|
+
const out = run("reg", ["query", "HKLM\\SOFTWARE\\Microsoft\\Cryptography", "/v", "MachineGuid"]);
|
|
70
|
+
const raw = /MachineGuid\s+REG_SZ\s+([0-9A-Fa-f-]{36})/.exec(out)?.[1];
|
|
71
|
+
if (raw === undefined)
|
|
72
|
+
return { ok: false, reason: "malformed", detail: "the registry named no MachineGuid" };
|
|
73
|
+
return { ok: true, id: hashMachineId("win32-machine-guid", raw), source: "win32-machine-guid" };
|
|
74
|
+
}
|
|
75
|
+
return { ok: false, reason: "unsupported-platform", detail: `${platform} exposes no machine identity this build trusts` };
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
return { ok: false, reason: "unreadable", detail: `the machine identity could not be read: ${error instanceof Error ? error.message : String(error)}` };
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/** The names macOS configures for this machine (not the network's): HostName when set, and LocalHostName.local
|
|
82
|
+
* (Bonjour keeps it unique on its network). Empty elsewhere or when scutil can't answer. */
|
|
83
|
+
export function readConfiguredHostNames(readers = {}) {
|
|
84
|
+
if ((readers.platform ?? process.platform) !== "darwin")
|
|
85
|
+
return [];
|
|
86
|
+
const run = readers.run ?? defaultRun;
|
|
87
|
+
const names = [];
|
|
88
|
+
const one = (key) => {
|
|
89
|
+
try {
|
|
90
|
+
const value = run("/usr/sbin/scutil", ["--get", key]).trim();
|
|
91
|
+
return /^[A-Za-z0-9][A-Za-z0-9.-]{0,252}$/.test(value) ? value : null;
|
|
92
|
+
}
|
|
93
|
+
catch {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const host = one("HostName");
|
|
98
|
+
if (host !== null)
|
|
99
|
+
names.push(host);
|
|
100
|
+
const local = one("LocalHostName");
|
|
101
|
+
if (local !== null && !local.includes("."))
|
|
102
|
+
names.push(`${local}.local`);
|
|
103
|
+
return names;
|
|
104
|
+
}
|
|
105
|
+
let cachedIdentity = null;
|
|
106
|
+
let cachedConfigured = null;
|
|
107
|
+
/** Hostnames recorded beside this machine's id (machine_host_alias), learned from this process's store. */
|
|
108
|
+
const remembered = new Map();
|
|
109
|
+
/** This machine's identity, read once per process. */
|
|
110
|
+
export function machineIdentity() {
|
|
111
|
+
if (cachedIdentity === null)
|
|
112
|
+
cachedIdentity = readMachineIdentity();
|
|
113
|
+
return cachedIdentity;
|
|
114
|
+
}
|
|
115
|
+
/** The id to stamp on a new witness, or null when this machine's id is unknown. */
|
|
116
|
+
export function currentMachineId() {
|
|
117
|
+
const identity = machineIdentity();
|
|
118
|
+
return identity.ok ? identity.id : null;
|
|
119
|
+
}
|
|
120
|
+
/** Tests only: pin (or clear, with null) this process's machine id and configured names, and forget remembered names. */
|
|
121
|
+
export function injectMachineIdentity(identity, configured = identity === null ? null : []) {
|
|
122
|
+
cachedIdentity = identity;
|
|
123
|
+
cachedConfigured = configured;
|
|
124
|
+
remembered.clear();
|
|
125
|
+
}
|
|
126
|
+
/** Note hostnames recorded beside `id` in this machine's own records. Names for another id are kept apart and never
|
|
127
|
+
* read as this machine's. */
|
|
128
|
+
export function rememberHostAliases(id, hosts) {
|
|
129
|
+
let set = remembered.get(id);
|
|
130
|
+
if (set === undefined)
|
|
131
|
+
remembered.set(id, set = new Set());
|
|
132
|
+
for (const host of hosts)
|
|
133
|
+
if (host !== "")
|
|
134
|
+
set.add(host);
|
|
135
|
+
}
|
|
136
|
+
/** The names this machine is known by right now, from this machine alone: its hostname as it reads now and the
|
|
137
|
+
* names macOS configures for it. What a new witness records beside its id. */
|
|
138
|
+
export function liveHostAliases() {
|
|
139
|
+
if (cachedConfigured === null)
|
|
140
|
+
cachedConfigured = readConfiguredHostNames();
|
|
141
|
+
return [...new Set([hostname(), ...cachedConfigured])];
|
|
142
|
+
}
|
|
143
|
+
/** This machine: its id (null when unknown) and every name it is known by: its live names, plus the names recorded
|
|
144
|
+
* beside its id when the id is known. */
|
|
145
|
+
export function thisMachine(extra = []) {
|
|
146
|
+
const id = currentMachineId();
|
|
147
|
+
const hosts = new Set(liveHostAliases());
|
|
148
|
+
if (id !== null) {
|
|
149
|
+
for (const host of remembered.get(id) ?? [])
|
|
150
|
+
hosts.add(host);
|
|
151
|
+
for (const host of extra)
|
|
152
|
+
hosts.add(host);
|
|
153
|
+
}
|
|
154
|
+
return { id, hosts: [...hosts] };
|
|
155
|
+
}
|
|
156
|
+
/** THE RULE (module comment): whether a witness names this machine. */
|
|
157
|
+
export function isThisMachine(witness, here = thisMachine()) {
|
|
158
|
+
if (witness.machineId !== null && witness.machineId !== undefined)
|
|
159
|
+
return here.id !== null && witness.machineId === here.id;
|
|
160
|
+
return here.hosts.includes(witness.host);
|
|
161
|
+
}
|
|
162
|
+
/** Whether a recorded host is the machine a caller named by `here`: exact, or, when `here` is this machine's hostname
|
|
163
|
+
* as it reads now, any of this machine's names (a caller that passes another host, as a test does, compares exactly). */
|
|
164
|
+
export function sameMachineHost(seen, here = hostname(), machineId) {
|
|
165
|
+
if (machineId !== null && machineId !== undefined)
|
|
166
|
+
return here === hostname() && isThisMachine({ host: seen, machineId });
|
|
167
|
+
if (seen === here)
|
|
168
|
+
return true;
|
|
169
|
+
return here === hostname() && isThisMachine({ host: seen });
|
|
170
|
+
}
|
package/dist/mcp-core.js
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* Protocol errors are JSON-RPC errors; tool-level refusals are successful
|
|
9
9
|
* `tools/call` results with `isError: true`.
|
|
10
10
|
*/
|
|
11
|
+
import { answerMap } from "./code-map-read.js";
|
|
11
12
|
import { dirname, join } from 'node:path';
|
|
12
13
|
import { repositoryContextRead } from './repository-context.js';
|
|
13
14
|
import { ASSIGNMENT_TOOLS, assignmentForCoordinator } from "./assignment-adapters.js";
|
|
@@ -82,10 +83,19 @@ const HANDLERS = {
|
|
|
82
83
|
const repo = args.repo;
|
|
83
84
|
if (!ctx.who.repos.includes(repo) || ctx.enrolled !== null && !ctx.enrolled.includes(repo))
|
|
84
85
|
return { ok: false, message: 'That project is outside your access.' };
|
|
85
|
-
return { ok: true, body: repositoryContextRead({ repo, query: args.query, mode: args.mode === 'impact' ? 'impact' : 'search', audience: 'lead',
|
|
86
|
+
return { ok: true, body: repositoryContextRead({ repo, project: repo, query: args.query, mode: args.mode === 'impact' ? 'impact' : 'search', audience: 'lead',
|
|
86
87
|
...(ctx.evidenceRoot === undefined ? {} : { cacheRoot: join(dirname(ctx.evidenceRoot), 'repository-context') }) }) };
|
|
87
88
|
},
|
|
88
89
|
},
|
|
90
|
+
get_code_map: {
|
|
91
|
+
description: 'Read the code map of an admitted project: areas, files, exported names and imports, generated from main. Every name is untrusted repository data. Pass version and cursor from the last answer to page the same version.',
|
|
92
|
+
handle: (ctx, args) => {
|
|
93
|
+
const repo = args.repo;
|
|
94
|
+
if (!ctx.who.repos.includes(repo) || ctx.enrolled !== null && !ctx.enrolled.includes(repo))
|
|
95
|
+
return { ok: false, message: 'That project is outside your access.' };
|
|
96
|
+
return { ok: true, body: answerMap(ctx.store, { repo, view: args.view, ...(args.version === undefined ? {} : { version: args.version }), ...(args.id === undefined ? {} : { id: args.id }), ...(args.query === undefined ? {} : { query: args.query }), ...(args.cursor === undefined ? {} : { cursor: args.cursor }) }) };
|
|
97
|
+
},
|
|
98
|
+
},
|
|
89
99
|
get_assignment: assignmentTool("get_assignment"),
|
|
90
100
|
list_assignment_updates: assignmentTool("list_assignment_updates"),
|
|
91
101
|
claim_assignment: assignmentTool("claim_assignment"),
|
package/dist/memory-cli.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type MemoryAnalyzer } from './memory-pass.js';
|
|
2
2
|
import type { Store } from './store.js';
|
|
3
|
+
import { type TidyAnalyzer } from './memory-tidy.js';
|
|
3
4
|
export declare const MEMORY_DESCRIPTORS: readonly [{
|
|
4
5
|
readonly action: 'search';
|
|
5
6
|
readonly synopsis: 'search decisions, instructions, references, lessons and your conversations';
|
|
@@ -41,6 +42,18 @@ export declare const MEMORY_DESCRIPTORS: readonly [{
|
|
|
41
42
|
readonly name: 'decision';
|
|
42
43
|
readonly takesValue: true;
|
|
43
44
|
readonly meaning: 'accept or reject, for memory apply';
|
|
45
|
+
}, {
|
|
46
|
+
readonly name: 'claim';
|
|
47
|
+
readonly takesValue: true;
|
|
48
|
+
readonly meaning: 'your own words for a lesson note or a clean-up, for memory apply';
|
|
49
|
+
}, {
|
|
50
|
+
readonly name: 'choice';
|
|
51
|
+
readonly takesValue: true;
|
|
52
|
+
readonly meaning: 'what a clean-up does: keep:<id>, both or new; rewrite or retire; for a restore, retire or keep';
|
|
53
|
+
}, {
|
|
54
|
+
readonly name: 'revision';
|
|
55
|
+
readonly takesValue: true;
|
|
56
|
+
readonly meaning: 'the saved knowledge version a reference comes back from, for memory restore';
|
|
44
57
|
}, {
|
|
45
58
|
readonly name: 'sessions';
|
|
46
59
|
readonly takesValue: true;
|
|
@@ -91,6 +104,18 @@ export declare const MEMORY_DESCRIPTORS: readonly [{
|
|
|
91
104
|
readonly name: 'decision';
|
|
92
105
|
readonly takesValue: true;
|
|
93
106
|
readonly meaning: 'accept or reject, for memory apply';
|
|
107
|
+
}, {
|
|
108
|
+
readonly name: 'claim';
|
|
109
|
+
readonly takesValue: true;
|
|
110
|
+
readonly meaning: 'your own words for a lesson note or a clean-up, for memory apply';
|
|
111
|
+
}, {
|
|
112
|
+
readonly name: 'choice';
|
|
113
|
+
readonly takesValue: true;
|
|
114
|
+
readonly meaning: 'what a clean-up does: keep:<id>, both or new; rewrite or retire; for a restore, retire or keep';
|
|
115
|
+
}, {
|
|
116
|
+
readonly name: 'revision';
|
|
117
|
+
readonly takesValue: true;
|
|
118
|
+
readonly meaning: 'the saved knowledge version a reference comes back from, for memory restore';
|
|
94
119
|
}, {
|
|
95
120
|
readonly name: 'sessions';
|
|
96
121
|
readonly takesValue: true;
|
|
@@ -141,6 +166,18 @@ export declare const MEMORY_DESCRIPTORS: readonly [{
|
|
|
141
166
|
readonly name: 'decision';
|
|
142
167
|
readonly takesValue: true;
|
|
143
168
|
readonly meaning: 'accept or reject, for memory apply';
|
|
169
|
+
}, {
|
|
170
|
+
readonly name: 'claim';
|
|
171
|
+
readonly takesValue: true;
|
|
172
|
+
readonly meaning: 'your own words for a lesson note or a clean-up, for memory apply';
|
|
173
|
+
}, {
|
|
174
|
+
readonly name: 'choice';
|
|
175
|
+
readonly takesValue: true;
|
|
176
|
+
readonly meaning: 'what a clean-up does: keep:<id>, both or new; rewrite or retire; for a restore, retire or keep';
|
|
177
|
+
}, {
|
|
178
|
+
readonly name: 'revision';
|
|
179
|
+
readonly takesValue: true;
|
|
180
|
+
readonly meaning: 'the saved knowledge version a reference comes back from, for memory restore';
|
|
144
181
|
}, {
|
|
145
182
|
readonly name: 'sessions';
|
|
146
183
|
readonly takesValue: true;
|
|
@@ -191,6 +228,18 @@ export declare const MEMORY_DESCRIPTORS: readonly [{
|
|
|
191
228
|
readonly name: 'decision';
|
|
192
229
|
readonly takesValue: true;
|
|
193
230
|
readonly meaning: 'accept or reject, for memory apply';
|
|
231
|
+
}, {
|
|
232
|
+
readonly name: 'claim';
|
|
233
|
+
readonly takesValue: true;
|
|
234
|
+
readonly meaning: 'your own words for a lesson note or a clean-up, for memory apply';
|
|
235
|
+
}, {
|
|
236
|
+
readonly name: 'choice';
|
|
237
|
+
readonly takesValue: true;
|
|
238
|
+
readonly meaning: 'what a clean-up does: keep:<id>, both or new; rewrite or retire; for a restore, retire or keep';
|
|
239
|
+
}, {
|
|
240
|
+
readonly name: 'revision';
|
|
241
|
+
readonly takesValue: true;
|
|
242
|
+
readonly meaning: 'the saved knowledge version a reference comes back from, for memory restore';
|
|
194
243
|
}, {
|
|
195
244
|
readonly name: 'sessions';
|
|
196
245
|
readonly takesValue: true;
|
|
@@ -242,6 +291,18 @@ export declare const MEMORY_DESCRIPTORS: readonly [{
|
|
|
242
291
|
readonly name: 'decision';
|
|
243
292
|
readonly takesValue: true;
|
|
244
293
|
readonly meaning: 'accept or reject, for memory apply';
|
|
294
|
+
}, {
|
|
295
|
+
readonly name: 'claim';
|
|
296
|
+
readonly takesValue: true;
|
|
297
|
+
readonly meaning: 'your own words for a lesson note or a clean-up, for memory apply';
|
|
298
|
+
}, {
|
|
299
|
+
readonly name: 'choice';
|
|
300
|
+
readonly takesValue: true;
|
|
301
|
+
readonly meaning: 'what a clean-up does: keep:<id>, both or new; rewrite or retire; for a restore, retire or keep';
|
|
302
|
+
}, {
|
|
303
|
+
readonly name: 'revision';
|
|
304
|
+
readonly takesValue: true;
|
|
305
|
+
readonly meaning: 'the saved knowledge version a reference comes back from, for memory restore';
|
|
245
306
|
}, {
|
|
246
307
|
readonly name: 'sessions';
|
|
247
308
|
readonly takesValue: true;
|
|
@@ -293,6 +354,18 @@ export declare const MEMORY_DESCRIPTORS: readonly [{
|
|
|
293
354
|
readonly name: 'decision';
|
|
294
355
|
readonly takesValue: true;
|
|
295
356
|
readonly meaning: 'accept or reject, for memory apply';
|
|
357
|
+
}, {
|
|
358
|
+
readonly name: 'claim';
|
|
359
|
+
readonly takesValue: true;
|
|
360
|
+
readonly meaning: 'your own words for a lesson note or a clean-up, for memory apply';
|
|
361
|
+
}, {
|
|
362
|
+
readonly name: 'choice';
|
|
363
|
+
readonly takesValue: true;
|
|
364
|
+
readonly meaning: 'what a clean-up does: keep:<id>, both or new; rewrite or retire; for a restore, retire or keep';
|
|
365
|
+
}, {
|
|
366
|
+
readonly name: 'revision';
|
|
367
|
+
readonly takesValue: true;
|
|
368
|
+
readonly meaning: 'the saved knowledge version a reference comes back from, for memory restore';
|
|
296
369
|
}, {
|
|
297
370
|
readonly name: 'sessions';
|
|
298
371
|
readonly takesValue: true;
|
|
@@ -343,6 +416,18 @@ export declare const MEMORY_DESCRIPTORS: readonly [{
|
|
|
343
416
|
readonly name: 'decision';
|
|
344
417
|
readonly takesValue: true;
|
|
345
418
|
readonly meaning: 'accept or reject, for memory apply';
|
|
419
|
+
}, {
|
|
420
|
+
readonly name: 'claim';
|
|
421
|
+
readonly takesValue: true;
|
|
422
|
+
readonly meaning: 'your own words for a lesson note or a clean-up, for memory apply';
|
|
423
|
+
}, {
|
|
424
|
+
readonly name: 'choice';
|
|
425
|
+
readonly takesValue: true;
|
|
426
|
+
readonly meaning: 'what a clean-up does: keep:<id>, both or new; rewrite or retire; for a restore, retire or keep';
|
|
427
|
+
}, {
|
|
428
|
+
readonly name: 'revision';
|
|
429
|
+
readonly takesValue: true;
|
|
430
|
+
readonly meaning: 'the saved knowledge version a reference comes back from, for memory restore';
|
|
346
431
|
}, {
|
|
347
432
|
readonly name: 'sessions';
|
|
348
433
|
readonly takesValue: true;
|
|
@@ -354,7 +439,7 @@ export declare const MEMORY_DESCRIPTORS: readonly [{
|
|
|
354
439
|
}];
|
|
355
440
|
}, {
|
|
356
441
|
readonly action: 'apply';
|
|
357
|
-
readonly synopsis: 'decide one proposal: memory apply <id> --decision accept|reject — the only writer';
|
|
442
|
+
readonly synopsis: 'decide one proposal: memory apply <id> --decision accept|reject [--claim "<your words>"] — the only writer';
|
|
358
443
|
readonly mutation: 'unkeyed';
|
|
359
444
|
readonly takesQuery: true;
|
|
360
445
|
readonly flags: readonly [{
|
|
@@ -393,6 +478,207 @@ export declare const MEMORY_DESCRIPTORS: readonly [{
|
|
|
393
478
|
readonly name: 'decision';
|
|
394
479
|
readonly takesValue: true;
|
|
395
480
|
readonly meaning: 'accept or reject, for memory apply';
|
|
481
|
+
}, {
|
|
482
|
+
readonly name: 'claim';
|
|
483
|
+
readonly takesValue: true;
|
|
484
|
+
readonly meaning: 'your own words for a lesson note or a clean-up, for memory apply';
|
|
485
|
+
}, {
|
|
486
|
+
readonly name: 'choice';
|
|
487
|
+
readonly takesValue: true;
|
|
488
|
+
readonly meaning: 'what a clean-up does: keep:<id>, both or new; rewrite or retire; for a restore, retire or keep';
|
|
489
|
+
}, {
|
|
490
|
+
readonly name: 'revision';
|
|
491
|
+
readonly takesValue: true;
|
|
492
|
+
readonly meaning: 'the saved knowledge version a reference comes back from, for memory restore';
|
|
493
|
+
}, {
|
|
494
|
+
readonly name: 'sessions';
|
|
495
|
+
readonly takesValue: true;
|
|
496
|
+
readonly meaning: 'at most this many newest sessions for one pass (default 100)';
|
|
497
|
+
}, {
|
|
498
|
+
readonly name: 'no-local';
|
|
499
|
+
readonly takesValue: false;
|
|
500
|
+
readonly meaning: 'read only the plane\'s own transcripts, not local Claude Code or Codex session files';
|
|
501
|
+
}];
|
|
502
|
+
readonly audience: 'operator';
|
|
503
|
+
}, {
|
|
504
|
+
readonly action: 'tidy';
|
|
505
|
+
readonly synopsis: 'propose retiring, merging or settling memory entries; a person accepts each (writes nothing to memory)';
|
|
506
|
+
readonly mutation: 'unkeyed';
|
|
507
|
+
readonly takesQuery: false;
|
|
508
|
+
readonly flags: readonly [{
|
|
509
|
+
readonly name: 'repo';
|
|
510
|
+
readonly takesValue: true;
|
|
511
|
+
readonly meaning: 'admitted project checkout root';
|
|
512
|
+
}, {
|
|
513
|
+
readonly name: 'why';
|
|
514
|
+
readonly takesValue: true;
|
|
515
|
+
readonly meaning: 'the reason behind a decision';
|
|
516
|
+
}, {
|
|
517
|
+
readonly name: 'reason';
|
|
518
|
+
readonly takesValue: true;
|
|
519
|
+
readonly meaning: 'why a decision no longer holds';
|
|
520
|
+
}, {
|
|
521
|
+
readonly name: 'supersedes';
|
|
522
|
+
readonly takesValue: true;
|
|
523
|
+
readonly meaning: 'the decision id this one replaces';
|
|
524
|
+
}, {
|
|
525
|
+
readonly name: 'source';
|
|
526
|
+
readonly takesValue: true;
|
|
527
|
+
readonly meaning: 'where the decision came from (conversation, task, result)';
|
|
528
|
+
}, {
|
|
529
|
+
readonly name: 'all';
|
|
530
|
+
readonly takesValue: false;
|
|
531
|
+
readonly meaning: 'include superseded and retired decisions';
|
|
532
|
+
}, {
|
|
533
|
+
readonly name: 'json';
|
|
534
|
+
readonly takesValue: false;
|
|
535
|
+
readonly meaning: 'versioned structured response';
|
|
536
|
+
}, {
|
|
537
|
+
readonly name: 'db';
|
|
538
|
+
readonly takesValue: true;
|
|
539
|
+
readonly meaning: 'local Toolroll database';
|
|
540
|
+
}, {
|
|
541
|
+
readonly name: 'decision';
|
|
542
|
+
readonly takesValue: true;
|
|
543
|
+
readonly meaning: 'accept or reject, for memory apply';
|
|
544
|
+
}, {
|
|
545
|
+
readonly name: 'claim';
|
|
546
|
+
readonly takesValue: true;
|
|
547
|
+
readonly meaning: 'your own words for a lesson note or a clean-up, for memory apply';
|
|
548
|
+
}, {
|
|
549
|
+
readonly name: 'choice';
|
|
550
|
+
readonly takesValue: true;
|
|
551
|
+
readonly meaning: 'what a clean-up does: keep:<id>, both or new; rewrite or retire; for a restore, retire or keep';
|
|
552
|
+
}, {
|
|
553
|
+
readonly name: 'revision';
|
|
554
|
+
readonly takesValue: true;
|
|
555
|
+
readonly meaning: 'the saved knowledge version a reference comes back from, for memory restore';
|
|
556
|
+
}, {
|
|
557
|
+
readonly name: 'sessions';
|
|
558
|
+
readonly takesValue: true;
|
|
559
|
+
readonly meaning: 'at most this many newest sessions for one pass (default 100)';
|
|
560
|
+
}, {
|
|
561
|
+
readonly name: 'no-local';
|
|
562
|
+
readonly takesValue: false;
|
|
563
|
+
readonly meaning: 'read only the plane\'s own transcripts, not local Claude Code or Codex session files';
|
|
564
|
+
}];
|
|
565
|
+
readonly audience: 'operator';
|
|
566
|
+
}, {
|
|
567
|
+
readonly action: 'restore';
|
|
568
|
+
readonly synopsis: 'bring back a decision: memory restore <id>, lesson:<id>, or reference:<id> --revision <version>';
|
|
569
|
+
readonly mutation: 'unkeyed';
|
|
570
|
+
readonly takesQuery: true;
|
|
571
|
+
readonly flags: readonly [{
|
|
572
|
+
readonly name: 'repo';
|
|
573
|
+
readonly takesValue: true;
|
|
574
|
+
readonly meaning: 'admitted project checkout root';
|
|
575
|
+
}, {
|
|
576
|
+
readonly name: 'why';
|
|
577
|
+
readonly takesValue: true;
|
|
578
|
+
readonly meaning: 'the reason behind a decision';
|
|
579
|
+
}, {
|
|
580
|
+
readonly name: 'reason';
|
|
581
|
+
readonly takesValue: true;
|
|
582
|
+
readonly meaning: 'why a decision no longer holds';
|
|
583
|
+
}, {
|
|
584
|
+
readonly name: 'supersedes';
|
|
585
|
+
readonly takesValue: true;
|
|
586
|
+
readonly meaning: 'the decision id this one replaces';
|
|
587
|
+
}, {
|
|
588
|
+
readonly name: 'source';
|
|
589
|
+
readonly takesValue: true;
|
|
590
|
+
readonly meaning: 'where the decision came from (conversation, task, result)';
|
|
591
|
+
}, {
|
|
592
|
+
readonly name: 'all';
|
|
593
|
+
readonly takesValue: false;
|
|
594
|
+
readonly meaning: 'include superseded and retired decisions';
|
|
595
|
+
}, {
|
|
596
|
+
readonly name: 'json';
|
|
597
|
+
readonly takesValue: false;
|
|
598
|
+
readonly meaning: 'versioned structured response';
|
|
599
|
+
}, {
|
|
600
|
+
readonly name: 'db';
|
|
601
|
+
readonly takesValue: true;
|
|
602
|
+
readonly meaning: 'local Toolroll database';
|
|
603
|
+
}, {
|
|
604
|
+
readonly name: 'decision';
|
|
605
|
+
readonly takesValue: true;
|
|
606
|
+
readonly meaning: 'accept or reject, for memory apply';
|
|
607
|
+
}, {
|
|
608
|
+
readonly name: 'claim';
|
|
609
|
+
readonly takesValue: true;
|
|
610
|
+
readonly meaning: 'your own words for a lesson note or a clean-up, for memory apply';
|
|
611
|
+
}, {
|
|
612
|
+
readonly name: 'choice';
|
|
613
|
+
readonly takesValue: true;
|
|
614
|
+
readonly meaning: 'what a clean-up does: keep:<id>, both or new; rewrite or retire; for a restore, retire or keep';
|
|
615
|
+
}, {
|
|
616
|
+
readonly name: 'revision';
|
|
617
|
+
readonly takesValue: true;
|
|
618
|
+
readonly meaning: 'the saved knowledge version a reference comes back from, for memory restore';
|
|
619
|
+
}, {
|
|
620
|
+
readonly name: 'sessions';
|
|
621
|
+
readonly takesValue: true;
|
|
622
|
+
readonly meaning: 'at most this many newest sessions for one pass (default 100)';
|
|
623
|
+
}, {
|
|
624
|
+
readonly name: 'no-local';
|
|
625
|
+
readonly takesValue: false;
|
|
626
|
+
readonly meaning: 'read only the plane\'s own transcripts, not local Claude Code or Codex session files';
|
|
627
|
+
}];
|
|
628
|
+
readonly audience: 'operator';
|
|
629
|
+
}, {
|
|
630
|
+
readonly action: 'unmerge';
|
|
631
|
+
readonly synopsis: 'undo a merge of decisions: memory unmerge <merge>';
|
|
632
|
+
readonly mutation: 'unkeyed';
|
|
633
|
+
readonly takesQuery: true;
|
|
634
|
+
readonly flags: readonly [{
|
|
635
|
+
readonly name: 'repo';
|
|
636
|
+
readonly takesValue: true;
|
|
637
|
+
readonly meaning: 'admitted project checkout root';
|
|
638
|
+
}, {
|
|
639
|
+
readonly name: 'why';
|
|
640
|
+
readonly takesValue: true;
|
|
641
|
+
readonly meaning: 'the reason behind a decision';
|
|
642
|
+
}, {
|
|
643
|
+
readonly name: 'reason';
|
|
644
|
+
readonly takesValue: true;
|
|
645
|
+
readonly meaning: 'why a decision no longer holds';
|
|
646
|
+
}, {
|
|
647
|
+
readonly name: 'supersedes';
|
|
648
|
+
readonly takesValue: true;
|
|
649
|
+
readonly meaning: 'the decision id this one replaces';
|
|
650
|
+
}, {
|
|
651
|
+
readonly name: 'source';
|
|
652
|
+
readonly takesValue: true;
|
|
653
|
+
readonly meaning: 'where the decision came from (conversation, task, result)';
|
|
654
|
+
}, {
|
|
655
|
+
readonly name: 'all';
|
|
656
|
+
readonly takesValue: false;
|
|
657
|
+
readonly meaning: 'include superseded and retired decisions';
|
|
658
|
+
}, {
|
|
659
|
+
readonly name: 'json';
|
|
660
|
+
readonly takesValue: false;
|
|
661
|
+
readonly meaning: 'versioned structured response';
|
|
662
|
+
}, {
|
|
663
|
+
readonly name: 'db';
|
|
664
|
+
readonly takesValue: true;
|
|
665
|
+
readonly meaning: 'local Toolroll database';
|
|
666
|
+
}, {
|
|
667
|
+
readonly name: 'decision';
|
|
668
|
+
readonly takesValue: true;
|
|
669
|
+
readonly meaning: 'accept or reject, for memory apply';
|
|
670
|
+
}, {
|
|
671
|
+
readonly name: 'claim';
|
|
672
|
+
readonly takesValue: true;
|
|
673
|
+
readonly meaning: 'your own words for a lesson note or a clean-up, for memory apply';
|
|
674
|
+
}, {
|
|
675
|
+
readonly name: 'choice';
|
|
676
|
+
readonly takesValue: true;
|
|
677
|
+
readonly meaning: 'what a clean-up does: keep:<id>, both or new; rewrite or retire; for a restore, retire or keep';
|
|
678
|
+
}, {
|
|
679
|
+
readonly name: 'revision';
|
|
680
|
+
readonly takesValue: true;
|
|
681
|
+
readonly meaning: 'the saved knowledge version a reference comes back from, for memory restore';
|
|
396
682
|
}, {
|
|
397
683
|
readonly name: 'sessions';
|
|
398
684
|
readonly takesValue: true;
|
|
@@ -444,6 +730,18 @@ export declare const MEMORY_DESCRIPTORS: readonly [{
|
|
|
444
730
|
readonly name: 'decision';
|
|
445
731
|
readonly takesValue: true;
|
|
446
732
|
readonly meaning: 'accept or reject, for memory apply';
|
|
733
|
+
}, {
|
|
734
|
+
readonly name: 'claim';
|
|
735
|
+
readonly takesValue: true;
|
|
736
|
+
readonly meaning: 'your own words for a lesson note or a clean-up, for memory apply';
|
|
737
|
+
}, {
|
|
738
|
+
readonly name: 'choice';
|
|
739
|
+
readonly takesValue: true;
|
|
740
|
+
readonly meaning: 'what a clean-up does: keep:<id>, both or new; rewrite or retire; for a restore, retire or keep';
|
|
741
|
+
}, {
|
|
742
|
+
readonly name: 'revision';
|
|
743
|
+
readonly takesValue: true;
|
|
744
|
+
readonly meaning: 'the saved knowledge version a reference comes back from, for memory restore';
|
|
447
745
|
}, {
|
|
448
746
|
readonly name: 'sessions';
|
|
449
747
|
readonly takesValue: true;
|
|
@@ -463,6 +761,7 @@ export type MemoryCliContext = {
|
|
|
463
761
|
repos: readonly string[];
|
|
464
762
|
evidenceRoot?: string;
|
|
465
763
|
configDir?: string;
|
|
764
|
+
tidyAnalyzer?: TidyAnalyzer;
|
|
466
765
|
analyzer?: MemoryAnalyzer;
|
|
467
766
|
home?: string;
|
|
468
767
|
};
|