ctxr-cli 0.33.0 → 0.35.0
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/README.md +40 -6
- package/dist/commands/archive.d.ts +5 -4
- package/dist/commands/archive.d.ts.map +1 -1
- package/dist/commands/archive.js +7 -7
- package/dist/commands/archive.js.map +1 -1
- package/dist/commands/catalog-show.d.ts +8 -0
- package/dist/commands/catalog-show.d.ts.map +1 -1
- package/dist/commands/catalog-show.js +29 -2
- package/dist/commands/catalog-show.js.map +1 -1
- package/dist/commands/context-gather.d.ts.map +1 -1
- package/dist/commands/context-gather.js +3 -2
- package/dist/commands/context-gather.js.map +1 -1
- package/dist/commands/doctor.d.ts +5 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +4 -0
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/graph-build.d.ts +4 -1
- package/dist/commands/graph-build.d.ts.map +1 -1
- package/dist/commands/graph-build.js +14 -5
- package/dist/commands/graph-build.js.map +1 -1
- package/dist/commands/land.d.ts +27 -7
- package/dist/commands/land.d.ts.map +1 -1
- package/dist/commands/land.js +307 -32
- package/dist/commands/land.js.map +1 -1
- package/dist/commands/plugin-build.d.ts +33 -0
- package/dist/commands/plugin-build.d.ts.map +1 -0
- package/dist/commands/plugin-build.js +51 -0
- package/dist/commands/plugin-build.js.map +1 -0
- package/dist/commands/publish-check.d.ts.map +1 -1
- package/dist/commands/publish-check.js +35 -4
- package/dist/commands/publish-check.js.map +1 -1
- package/dist/commands/publish-gather.d.ts.map +1 -1
- package/dist/commands/publish-gather.js +2 -3
- package/dist/commands/publish-gather.js.map +1 -1
- package/dist/commands/review-list.d.ts +19 -5
- package/dist/commands/review-list.d.ts.map +1 -1
- package/dist/commands/review-list.js +55 -6
- package/dist/commands/review-list.js.map +1 -1
- package/dist/commands/rollup-gather.d.ts.map +1 -1
- package/dist/commands/rollup-gather.js +2 -3
- package/dist/commands/rollup-gather.js.map +1 -1
- package/dist/commands/second-opinion.d.ts +33 -0
- package/dist/commands/second-opinion.d.ts.map +1 -0
- package/dist/commands/second-opinion.js +56 -0
- package/dist/commands/second-opinion.js.map +1 -0
- package/dist/commands/serve.d.ts.map +1 -1
- package/dist/commands/serve.js +14 -2
- package/dist/commands/serve.js.map +1 -1
- package/dist/commands/session-discard.d.ts +18 -0
- package/dist/commands/session-discard.d.ts.map +1 -0
- package/dist/commands/session-discard.js +31 -0
- package/dist/commands/session-discard.js.map +1 -0
- package/dist/commands/session-list.d.ts +17 -6
- package/dist/commands/session-list.d.ts.map +1 -1
- package/dist/commands/session-list.js +31 -11
- package/dist/commands/session-list.js.map +1 -1
- package/dist/commands/session-rebase.d.ts +18 -0
- package/dist/commands/session-rebase.d.ts.map +1 -0
- package/dist/commands/session-rebase.js +43 -0
- package/dist/commands/session-rebase.js.map +1 -0
- package/dist/commands/session-start.d.ts +8 -0
- package/dist/commands/session-start.d.ts.map +1 -1
- package/dist/commands/session-start.js +52 -38
- package/dist/commands/session-start.js.map +1 -1
- package/dist/commands/session-status.d.ts +17 -0
- package/dist/commands/session-status.d.ts.map +1 -0
- package/dist/commands/session-status.js +38 -0
- package/dist/commands/session-status.js.map +1 -0
- package/dist/commands/session-submit.d.ts +23 -0
- package/dist/commands/session-submit.d.ts.map +1 -0
- package/dist/commands/session-submit.js +42 -0
- package/dist/commands/session-submit.js.map +1 -0
- package/dist/commands/shared-stores-status.d.ts +24 -0
- package/dist/commands/shared-stores-status.d.ts.map +1 -0
- package/dist/commands/shared-stores-status.js +51 -0
- package/dist/commands/shared-stores-status.js.map +1 -0
- package/dist/commands/shared-stores-sync.d.ts +27 -0
- package/dist/commands/shared-stores-sync.d.ts.map +1 -0
- package/dist/commands/shared-stores-sync.js +115 -0
- package/dist/commands/shared-stores-sync.js.map +1 -0
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +2 -4
- package/dist/commands/verify.js.map +1 -1
- package/dist/config/schema.d.ts +16 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +32 -0
- package/dist/config/schema.js.map +1 -1
- package/dist/core/agents-doc.d.ts +10 -0
- package/dist/core/agents-doc.d.ts.map +1 -1
- package/dist/core/agents-doc.js +26 -1
- package/dist/core/agents-doc.js.map +1 -1
- package/dist/core/approval/decision.d.ts +39 -1
- package/dist/core/approval/decision.d.ts.map +1 -1
- package/dist/core/approval/decision.js +53 -6
- package/dist/core/approval/decision.js.map +1 -1
- package/dist/core/approval/session-group.d.ts +156 -0
- package/dist/core/approval/session-group.d.ts.map +1 -0
- package/dist/core/approval/session-group.js +359 -0
- package/dist/core/approval/session-group.js.map +1 -0
- package/dist/core/approval/session-marker.d.ts +79 -0
- package/dist/core/approval/session-marker.d.ts.map +1 -0
- package/dist/core/approval/session-marker.js +146 -0
- package/dist/core/approval/session-marker.js.map +1 -0
- package/dist/core/approval/store-forges.d.ts +15 -0
- package/dist/core/approval/store-forges.d.ts.map +1 -0
- package/dist/core/approval/store-forges.js +33 -0
- package/dist/core/approval/store-forges.js.map +1 -0
- package/dist/core/browse/approve.d.ts +8 -0
- package/dist/core/browse/approve.d.ts.map +1 -1
- package/dist/core/browse/approve.js +366 -48
- package/dist/core/browse/approve.js.map +1 -1
- package/dist/core/browse/link-resolver.d.ts +9 -4
- package/dist/core/browse/link-resolver.d.ts.map +1 -1
- package/dist/core/browse/link-resolver.js +12 -7
- package/dist/core/browse/link-resolver.js.map +1 -1
- package/dist/core/browse/review.d.ts +5 -0
- package/dist/core/browse/review.d.ts.map +1 -1
- package/dist/core/browse/review.js +8 -0
- package/dist/core/browse/review.js.map +1 -1
- package/dist/core/checks/integrity-checks.d.ts.map +1 -1
- package/dist/core/checks/integrity-checks.js +7 -1
- package/dist/core/checks/integrity-checks.js.map +1 -1
- package/dist/core/checks/manifest.d.ts.map +1 -1
- package/dist/core/checks/manifest.js +2 -0
- package/dist/core/checks/manifest.js.map +1 -1
- package/dist/core/checks/shared-stores-checks.d.ts +17 -0
- package/dist/core/checks/shared-stores-checks.d.ts.map +1 -0
- package/dist/core/checks/shared-stores-checks.js +84 -0
- package/dist/core/checks/shared-stores-checks.js.map +1 -0
- package/dist/core/errors.d.ts +17 -0
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +21 -0
- package/dist/core/errors.js.map +1 -1
- package/dist/core/forge/github.d.ts +14 -0
- package/dist/core/forge/github.d.ts.map +1 -1
- package/dist/core/forge/github.js +17 -0
- package/dist/core/forge/github.js.map +1 -1
- package/dist/core/fs/atomic.d.ts +3 -2
- package/dist/core/fs/atomic.d.ts.map +1 -1
- package/dist/core/fs/atomic.js +3 -2
- package/dist/core/fs/atomic.js.map +1 -1
- package/dist/core/git/fast-forward.d.ts +23 -0
- package/dist/core/git/fast-forward.d.ts.map +1 -0
- package/dist/core/git/fast-forward.js +38 -0
- package/dist/core/git/fast-forward.js.map +1 -0
- package/dist/core/git/repo.d.ts +11 -0
- package/dist/core/git/repo.d.ts.map +1 -1
- package/dist/core/git/repo.js +25 -0
- package/dist/core/git/repo.js.map +1 -1
- package/dist/core/graph/model.d.ts +27 -0
- package/dist/core/graph/model.d.ts.map +1 -1
- package/dist/core/graph/model.js +68 -2
- package/dist/core/graph/model.js.map +1 -1
- package/dist/core/graph/persist.d.ts.map +1 -1
- package/dist/core/graph/persist.js +3 -2
- package/dist/core/graph/persist.js.map +1 -1
- package/dist/core/mcp/cli-runner.d.ts +41 -0
- package/dist/core/mcp/cli-runner.d.ts.map +1 -0
- package/dist/core/mcp/cli-runner.js +81 -0
- package/dist/core/mcp/cli-runner.js.map +1 -0
- package/dist/core/mcp/jsonrpc.d.ts +13 -1
- package/dist/core/mcp/jsonrpc.d.ts.map +1 -1
- package/dist/core/mcp/jsonrpc.js +1 -1
- package/dist/core/mcp/jsonrpc.js.map +1 -1
- package/dist/core/mcp/member-sessions.d.ts +48 -0
- package/dist/core/mcp/member-sessions.d.ts.map +1 -0
- package/dist/core/mcp/member-sessions.js +85 -0
- package/dist/core/mcp/member-sessions.js.map +1 -0
- package/dist/core/mcp/ownership.d.ts +51 -0
- package/dist/core/mcp/ownership.d.ts.map +1 -0
- package/dist/core/mcp/ownership.js +101 -0
- package/dist/core/mcp/ownership.js.map +1 -0
- package/dist/core/mcp/paths.d.ts +48 -0
- package/dist/core/mcp/paths.d.ts.map +1 -0
- package/dist/core/mcp/paths.js +111 -0
- package/dist/core/mcp/paths.js.map +1 -0
- package/dist/core/mcp/sessions.d.ts +25 -50
- package/dist/core/mcp/sessions.d.ts.map +1 -1
- package/dist/core/mcp/sessions.js +31 -123
- package/dist/core/mcp/sessions.js.map +1 -1
- package/dist/core/mcp/tool-map.d.ts +94 -0
- package/dist/core/mcp/tool-map.d.ts.map +1 -0
- package/dist/core/mcp/tool-map.js +211 -0
- package/dist/core/mcp/tool-map.js.map +1 -0
- package/dist/core/mcp/tools/capture.d.ts +7 -2
- package/dist/core/mcp/tools/capture.d.ts.map +1 -1
- package/dist/core/mcp/tools/capture.js +69 -18
- package/dist/core/mcp/tools/capture.js.map +1 -1
- package/dist/core/mcp/tools/cli.d.ts +97 -0
- package/dist/core/mcp/tools/cli.d.ts.map +1 -0
- package/dist/core/mcp/tools/cli.js +271 -0
- package/dist/core/mcp/tools/cli.js.map +1 -0
- package/dist/core/mcp/tools/edit.d.ts +62 -28
- package/dist/core/mcp/tools/edit.d.ts.map +1 -1
- package/dist/core/mcp/tools/edit.js +182 -153
- package/dist/core/mcp/tools/edit.js.map +1 -1
- package/dist/core/mcp/tools/files.d.ts +37 -11
- package/dist/core/mcp/tools/files.d.ts.map +1 -1
- package/dist/core/mcp/tools/files.js +122 -100
- package/dist/core/mcp/tools/files.js.map +1 -1
- package/dist/core/mcp/tools/index.d.ts +12 -3
- package/dist/core/mcp/tools/index.d.ts.map +1 -1
- package/dist/core/mcp/tools/index.js +161 -58
- package/dist/core/mcp/tools/index.js.map +1 -1
- package/dist/core/mcp/tools/sessions.d.ts +145 -0
- package/dist/core/mcp/tools/sessions.d.ts.map +1 -0
- package/dist/core/mcp/tools/sessions.js +226 -0
- package/dist/core/mcp/tools/sessions.js.map +1 -0
- package/dist/core/notes/list.d.ts.map +1 -1
- package/dist/core/notes/list.js +5 -0
- package/dist/core/notes/list.js.map +1 -1
- package/dist/core/plugin/build.d.ts +70 -0
- package/dist/core/plugin/build.d.ts.map +1 -0
- package/dist/core/plugin/build.js +159 -0
- package/dist/core/plugin/build.js.map +1 -0
- package/dist/core/plugin/routes.d.ts +35 -0
- package/dist/core/plugin/routes.d.ts.map +1 -0
- package/dist/core/plugin/routes.js +77 -0
- package/dist/core/plugin/routes.js.map +1 -0
- package/dist/core/plugin/zip.d.ts +17 -0
- package/dist/core/plugin/zip.d.ts.map +1 -0
- package/dist/core/plugin/zip.js +75 -0
- package/dist/core/plugin/zip.js.map +1 -0
- package/dist/core/reconcile.d.ts.map +1 -1
- package/dist/core/reconcile.js +2 -1
- package/dist/core/reconcile.js.map +1 -1
- package/dist/core/retrieval/pass.d.ts.map +1 -1
- package/dist/core/retrieval/pass.js +5 -4
- package/dist/core/retrieval/pass.js.map +1 -1
- package/dist/core/rollup.d.ts.map +1 -1
- package/dist/core/rollup.js +2 -3
- package/dist/core/rollup.js.map +1 -1
- package/dist/core/root.d.ts.map +1 -1
- package/dist/core/root.js +33 -2
- package/dist/core/root.js.map +1 -1
- package/dist/core/second-opinion/environment.d.ts +21 -0
- package/dist/core/second-opinion/environment.d.ts.map +1 -0
- package/dist/core/second-opinion/environment.js +70 -0
- package/dist/core/second-opinion/environment.js.map +1 -0
- package/dist/core/second-opinion/judge.d.ts +29 -0
- package/dist/core/second-opinion/judge.d.ts.map +1 -0
- package/dist/core/second-opinion/judge.js +55 -0
- package/dist/core/second-opinion/judge.js.map +1 -0
- package/dist/core/second-opinion/launch.d.ts +16 -0
- package/dist/core/second-opinion/launch.d.ts.map +1 -0
- package/dist/core/second-opinion/launch.js +75 -0
- package/dist/core/second-opinion/launch.js.map +1 -0
- package/dist/core/second-opinion/lineup.d.ts +82 -0
- package/dist/core/second-opinion/lineup.d.ts.map +1 -0
- package/dist/core/second-opinion/lineup.js +113 -0
- package/dist/core/second-opinion/lineup.js.map +1 -0
- package/dist/core/second-opinion/modes.d.ts +98 -0
- package/dist/core/second-opinion/modes.d.ts.map +1 -0
- package/dist/core/second-opinion/modes.js +224 -0
- package/dist/core/second-opinion/modes.js.map +1 -0
- package/dist/core/second-opinion/prompts.d.ts +18 -0
- package/dist/core/second-opinion/prompts.d.ts.map +1 -0
- package/dist/core/second-opinion/prompts.js +65 -0
- package/dist/core/second-opinion/prompts.js.map +1 -0
- package/dist/core/session/commit.d.ts +29 -0
- package/dist/core/session/commit.d.ts.map +1 -0
- package/dist/core/session/commit.js +22 -0
- package/dist/core/session/commit.js.map +1 -0
- package/dist/core/session/discard.d.ts +24 -0
- package/dist/core/session/discard.d.ts.map +1 -0
- package/dist/core/session/discard.js +68 -0
- package/dist/core/session/discard.js.map +1 -0
- package/dist/core/session/list.d.ts +48 -0
- package/dist/core/session/list.d.ts.map +1 -0
- package/dist/core/session/list.js +55 -0
- package/dist/core/session/list.js.map +1 -0
- package/dist/core/session/rebase.d.ts +34 -0
- package/dist/core/session/rebase.d.ts.map +1 -0
- package/dist/core/session/rebase.js +87 -0
- package/dist/core/session/rebase.js.map +1 -0
- package/dist/core/session/remote.d.ts +80 -0
- package/dist/core/session/remote.d.ts.map +1 -0
- package/dist/core/session/remote.js +102 -0
- package/dist/core/session/remote.js.map +1 -0
- package/dist/core/session/resolve.d.ts +41 -0
- package/dist/core/session/resolve.d.ts.map +1 -0
- package/dist/core/session/resolve.js +109 -0
- package/dist/core/session/resolve.js.map +1 -0
- package/dist/core/session/start.d.ts +46 -0
- package/dist/core/session/start.d.ts.map +1 -0
- package/dist/core/session/start.js +33 -0
- package/dist/core/session/start.js.map +1 -0
- package/dist/core/session/status.d.ts +47 -0
- package/dist/core/session/status.d.ts.map +1 -0
- package/dist/core/session/status.js +55 -0
- package/dist/core/session/status.js.map +1 -0
- package/dist/core/session/submit.d.ts +67 -0
- package/dist/core/session/submit.d.ts.map +1 -0
- package/dist/core/session/submit.js +254 -0
- package/dist/core/session/submit.js.map +1 -0
- package/dist/core/shared-stores-location.d.ts +17 -0
- package/dist/core/shared-stores-location.d.ts.map +1 -0
- package/dist/core/shared-stores-location.js +22 -0
- package/dist/core/shared-stores-location.js.map +1 -0
- package/dist/core/shared-stores.d.ts +69 -0
- package/dist/core/shared-stores.d.ts.map +1 -0
- package/dist/core/shared-stores.js +100 -0
- package/dist/core/shared-stores.js.map +1 -0
- package/dist/core/skills.d.ts +20 -2
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +70 -13
- package/dist/core/skills.js.map +1 -1
- package/dist/run.d.ts +12 -0
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +194 -55
- package/dist/run.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/templates/agents/shared-stores.md +11 -0
- package/templates/approve/copies-missing.md +1 -0
- package/templates/approve/elsewhere-heading.md +1 -0
- package/templates/approve/elsewhere-intro.md +1 -0
- package/templates/approve/homed-elsewhere.md +1 -0
- package/templates/approve/not-decider.md +1 -0
- package/templates/approve/part-heading.md +1 -0
- package/templates/approve/parts-changed.md +1 -0
- package/templates/approve/session-decision-note.md +1 -0
- package/templates/approve/session-intro.md +1 -0
- package/templates/approve/session-no-decision.md +1 -0
- package/templates/approve/store-unreachable.md +1 -0
- package/templates/land/resolver.md +2 -0
- package/templates/mcp/Delete.md +6 -0
- package/templates/mcp/Edit.md +6 -5
- package/templates/mcp/Glob.md +2 -2
- package/templates/mcp/Grep.md +2 -1
- package/templates/mcp/Move.md +7 -0
- package/templates/mcp/Read.md +4 -4
- package/templates/mcp/Write.md +4 -4
- package/templates/mcp/ctxr.md +7 -0
- package/templates/mcp/ctxr_write.md +8 -0
- package/templates/mcp/server-instructions.md +11 -3
- package/templates/mcp/session_discard.md +4 -0
- package/templates/mcp/session_list.md +7 -0
- package/templates/mcp/session_rebase.md +5 -0
- package/templates/mcp/session_start.md +7 -0
- package/templates/mcp/session_status.md +3 -0
- package/templates/mcp/session_submit.md +8 -0
- package/templates/plugin/README.md +13 -0
- package/templates/plugin/chatgpt-mcp.json +19 -0
- package/templates/plugin/chatgpt-plugin.json +13 -0
- package/templates/plugin/claude-mcp.json +8 -0
- package/templates/plugin/claude-plugin.json +6 -0
- package/templates/plugin/page.html +47 -0
- package/templates/second-opinion/poll-answer.md +7 -0
- package/templates/second-opinion/taste-panel.md +14 -0
- package/templates/session/pages/bare-route.md +2 -0
- package/templates/session/pages/block.md +8 -0
- package/templates/session/pages/condition-preview.md +1 -0
- package/templates/session/pages/condition.md +1 -0
- package/templates/session/pages/moved.md +1 -0
- package/templates/session/pages/stops-working.md +1 -0
- package/templates/session/pages/table-head-preview.md +2 -0
- package/templates/session/pages/table-head.md +2 -0
- package/templates/skills/ctxr-connection-finding.md +4 -1
- package/templates/skills/ctxr-land.md +26 -7
- package/templates/skills/ctxr-placement.md +10 -0
- package/templates/skills/ctxr-publish.md +2 -1
- package/templates/skills/ctxr-rollup.md +3 -0
- package/templates/skills/ctxr-second-opinion.md +52 -36
- package/templates/skills/ctxr-session-lifecycle.md +60 -33
- package/templates/skills/ctxr-submit.md +65 -56
- package/templates/skills/mcp/_preamble.md +44 -0
- package/dist/core/mcp/drafts.d.ts +0 -30
- package/dist/core/mcp/drafts.d.ts.map +0 -1
- package/dist/core/mcp/drafts.js +0 -52
- package/dist/core/mcp/drafts.js.map +0 -1
- package/templates/skills/ctxr-second-opinion/run.mjs +0 -542
- /package/templates/{skills/ctxr-second-opinion → second-opinion}/critic-contract.md +0 -0
- /package/templates/{skills/ctxr-second-opinion → second-opinion}/lenses.md +0 -0
- /package/templates/{skills/ctxr-second-opinion → second-opinion}/personas/architect.md +0 -0
- /package/templates/{skills/ctxr-second-opinion → second-opinion}/personas/pragmatist.md +0 -0
- /package/templates/{skills/ctxr-second-opinion → second-opinion}/personas/skeptic.md +0 -0
package/README.md
CHANGED
|
@@ -105,7 +105,7 @@ Two distinctions make the rest of this readable:
|
|
|
105
105
|
|
|
106
106
|
Every harness loads this file on every turn, so it is kept short. contexture's own share is held under a ceiling by a test, and procedure a skill already carries lives in that skill.
|
|
107
107
|
|
|
108
|
-
**The skills**, installed as full copies at `.agents/skills/ctxr-<name>/SKILL.md`. That path is the cross-harness canonical location; a harness that reads its own branded directory instead gets that directory bridged to it (`.claude/skills/` is a symlink), so skill auto-discovery works with no wrapper and no second copy. A harness without auto-discovery reaches the same file by path from `AGENTS.md`. They're contexture-owned — refreshed by `ctxr update`, never hand-edited — and they're written against *your* store's configured taxonomy, so no shipped profile's layer names leak into them. Your own skills live alongside, untouched by sync. An owned skill may carry files beside its `SKILL.md` — `ctxr-
|
|
108
|
+
**The skills**, installed as full copies at `.agents/skills/ctxr-<name>/SKILL.md`. That path is the cross-harness canonical location; a harness that reads its own branded directory instead gets that directory bridged to it (`.claude/skills/` is a symlink), so skill auto-discovery works with no wrapper and no second copy. A harness without auto-discovery reaches the same file by path from `AGENTS.md`. They're contexture-owned — refreshed by `ctxr update`, never hand-edited — and they're written against *your* store's configured taxonomy, so no shipped profile's layer names leak into them. Your own skills live alongside, untouched by sync. An owned skill may carry files beside its `SKILL.md` — `ctxr-capture-circleback` ships the script that retrieves its meetings — and update keeps that whole directory matching the package. `ctxr-second-opinion` drives `ctxr second-opinion preflight | critique | poll`, the one command that invokes a model CLI (`claude`, `codex`, `agy`, each in a scratch directory with an allowlisted environment); it is never on the write path and no other command depends on it.
|
|
109
109
|
|
|
110
110
|
| Skill | What it decides |
|
|
111
111
|
| --- | --- |
|
|
@@ -350,6 +350,19 @@ A published page's navigation label follows its own declared `<title>`, falling
|
|
|
350
350
|
|
|
351
351
|
The **Preview** area, directly below the published pages, holds the pages your open session worktrees are carrying. A page is previewable from the moment its files exist on disk — before any commit, before any push, before a PR is opened or merged — because `serve` reads the worktree rather than asking git or a forge anything. Pages group by the worktree holding them at `/preview/<worktree>/<page>/index.html`, and a preview is byte-identical to what `/publish/<page>/index.html` will serve once the page lands, so what you read is what ships. Both routes address files rather than directories, so a page's address always names its index file — which is the address `ctxr publish new` and `ctxr publish check` report, so you never have to work out which of the two applies. For a whole change set, `ctxr publish urls --staged` (or `--since <ref>`) reports every page added, modified, moved or removed with both addresses, which is what `ctxr-submit` puts in a pull request's **Pages** section; set `serve.previews: none` in `contexture.yaml` if previews never resolve for your reviewers. A session worktree carrying no page appears nowhere, and nothing else inside one — notes, catalog, graph, config — becomes reachable.
|
|
352
352
|
|
|
353
|
+
## Stores for more than one person
|
|
354
|
+
|
|
355
|
+
A store has one audience: everyone who can clone it reads all of it. Privacy between people is a store boundary, never a field on a note, because a git clone holds every file it has ever had. So each person keeps their own store, and the stores they read with others — a family's, a company's, a project group's — are mounted into it:
|
|
356
|
+
|
|
357
|
+
```yaml
|
|
358
|
+
shared_stores:
|
|
359
|
+
- { name: family, url: "git@github.com:example/family-store.git" }
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
`ctxr shared-stores sync` clones each one under `shared/<name>/` and fast-forwards it when that is safe, leaving a mount with local work alone. The clones are ignored through the repository's local exclude file, and `doctor` refuses a commit that stages anything under `shared/`. A mounted store stays a store: its own `contexture.yaml`, exclusions, review and approval govern its notes, and `ctxr session start` run inside `shared/<name>/` opens a session there, whose pull request lands in that store. The graph and `ctxr context gather` read every mount alongside the store's own notes, and `ctxr catalog show` adds the same section from each mount.
|
|
363
|
+
|
|
364
|
+
Links resolve within the store that holds the note. A filename link (`[[note]]`) finds notes in that store only, and a path link (`[[dir/note]]`) resolves against its root, so a note reaches into a mount with `[[shared/<name>/<path>]]` and a mounted note can never link back. `ctxr lint` reports a mounted note whose link names one of this store's notes. Who can clone which store is the forge's repository access and the credentials each person's agent holds; give each person's agent only their own stores.
|
|
365
|
+
|
|
353
366
|
## Approving changes from a page
|
|
354
367
|
|
|
355
368
|
People who own a store's content often have no forge account. With change approval declared, `ctxr serve` gives them a page instead: `/approve/` lists every session with an open pull request, and each one's page shows the author's account of the change (its title, description and commit messages, labelled as the author's), the knowledge changes computed from the commits, the preview of every changed page, and every changed line. Two buttons — **Approve** and **Request changes** — record the decision on the pull request, as a review by the store's own forge identity naming the person who decided and the commit they saw. Nobody needs a GitHub account to leave an entry in the audit trail.
|
|
@@ -409,16 +422,21 @@ People who never open a terminal can still use a store, from the Claude or ChatG
|
|
|
409
422
|
|
|
410
423
|
```yaml
|
|
411
424
|
mcp:
|
|
412
|
-
readers: ["@example.com"] # find, gather, Read, Grep, Glob
|
|
425
|
+
readers: ["@example.com"] # find, gather, Read, Grep, Glob, ctxr
|
|
413
426
|
capturers: ["a@example.com"] # capture
|
|
414
|
-
editors: ["a@example.com"] # Edit, Write
|
|
427
|
+
editors: ["a@example.com"] # sessions, Edit, Write, Move, Delete, ctxr_write
|
|
415
428
|
```
|
|
416
429
|
|
|
417
430
|
What a connected app gets, with no model running on the server:
|
|
418
431
|
|
|
419
432
|
- **`find`** matches a phrase literally across the notes and returns each match's gloss, matching lines and a link, in path order with no score. Material not yet filed into a note comes back separately as `unfiled`. With no phrase, `find` returns the catalog as a map of the store. **`gather`** runs the retrieval pass from those notes and returns their full text along with the notes linked to and from them.
|
|
420
|
-
- **`Read`, `Grep` and `Glob`** carry the names and parameters of Claude Code's own tools. Paths are store-relative. `Grep` and `Glob` run ripgrep (`rg` must be on the `PATH` of `serve`), and configuration, derived files and
|
|
421
|
-
- **`capture`** saves one item of outside material into the inbox as its own session pull request
|
|
433
|
+
- **`Read`, `Grep` and `Glob`** carry the names and parameters of Claude Code's own tools. Paths are store-relative. `Grep` and `Glob` run ripgrep (`rg` must be on the `PATH` of `serve`). Notes, captures, `AGENTS.md`, the note templates, the house conventions, the log and the skills are readable; configuration, derived files and the paths `retrieval.exclude_paths` hides are not.
|
|
434
|
+
- **`capture`** saves one item of outside material into the inbox as its own session pull request, in one call.
|
|
435
|
+
- **Sessions**, for editors, work as they do for a local agent. `session_start` starts a session worktree on the server and returns its root, such as `.worktrees/session-20261023-101500-kestrel/`. `Edit`, `Write`, `Move` and `Delete` change files under that root and commit nothing; `Read`, `Grep` and `Glob` under the root read the session's uncommitted copy. `session_status` re-scans it, and `session_submit` runs `ctxr doctor` as the gate, commits as the signed-in person, pushes the named branch and opens the pull request with the title and body the agent wrote. `session_list` shows each of the person's sessions with its pull request and the decider's decision and comment, so requested changes reach them; `session_rebase` and `session_discard` do what the `ctxr session` commands of the same name do. Each tool calls the same code as its `ctxr session` command. A person sees only the sessions they started over MCP, and holds at most 20 open at once.
|
|
436
|
+
- **`ctxr`** runs a read-only command such as `lint`, `doctor`, `catalog show` or `graph query` against the served commit or one of the person's sessions; **`ctxr_write`** runs a writing one such as `ingest`, `entry append` or `catalog build` inside a session. Both spawn the server's own CLI as an argument list, with no shell, a 30-second limit and the forge credentials removed from its environment, and refuse `--root` and any path outside the checkout.
|
|
437
|
+
- **Never writable** over MCP, by any tool: `contexture.yaml`, the `.githooks/` directory and every other `.git*` path (a commit in a session worktree runs that worktree's hooks on the server), derived paths, the worktrees path and the managed skills path. A `ctxr_write` command that changes one anyway has the change undone and the call refused.
|
|
438
|
+
|
|
439
|
+
Every session's pull request appears on the approval page like any other, and nothing lands until a decider approves it. A per-person draft from an earlier version is adopted as that person's session; its pull request stays open and landable. Each tool declares MCP annotations (read-only, destructive, idempotent), so the apps ask before `Delete` and `session_discard`.
|
|
422
440
|
|
|
423
441
|
**Sign-in.** Someone connecting an app goes through the access proxy's login and then a consent page naming the app, where it will be sent back to, their email and what it may do. They are admitted only if `readers`, `capturers` or `editors` lists them. Nothing is stored on the server: client registrations, codes and 30-day tokens are all signed, and every call re-checks the configuration, so removing someone from the lists refuses their next call. With a GitHub App as the recording identity, the signing key is derived from the App's key, so rotating the App key signs everyone out. With `gh`'s own credential, people sign in again after every restart.
|
|
424
442
|
|
|
@@ -429,7 +447,21 @@ curl -i https://ctx.example.com/.well-known/oauth-authorization-server # 200,
|
|
|
429
447
|
curl -i -X POST https://ctx.example.com/mcp # 401 with WWW-Authenticate: Bearer resource_metadata=…
|
|
430
448
|
```
|
|
431
449
|
|
|
432
|
-
**
|
|
450
|
+
**Installing the plugin.** The plugin is what gives an app the store's skills as well as its tools, so an agent in Claude or ChatGPT follows the same session practice as a local one. `serve` offers it at `https://ctx.example.com/plugin/`, a page naming two downloads, one for each app: `contexture-<store>-claude.zip` and `contexture-<store>-chatgpt.zip`. The page and both downloads need the same verified identity as the approval page, and only people the `mcp` block admits get them, so keep `/plugin/` behind the access proxy, outside the Bypass list above. Each person installs it once:
|
|
451
|
+
|
|
452
|
+
- **Claude:** Customize → Plugins → *Add* → *Upload plugin*, and pick the Claude download.
|
|
453
|
+
- **ChatGPT:** a workspace admin uploads the ChatGPT download for the whole workspace; without an admin, turn on developer mode and upload it there.
|
|
454
|
+
|
|
455
|
+
Each plugin carries the store's skills, rendered from the same templates as the skill copies in the store under a preamble that maps every `ctxr`, `git` and `gh` step onto the server's tools, and one server entry naming `serve.base_url` and `/mcp`. It carries no credential: the app signs in through the store's own login. Its version is the CLI's version plus the commit it was built from, so download it again after upgrading `ctxr` or changing the skills. To hand the plugin out yourself, for instance to a Claude organization's or ChatGPT workspace's admin, build it from a checkout:
|
|
456
|
+
|
|
457
|
+
```sh
|
|
458
|
+
ctxr plugin build # both plugins, as directories and zips, under .contexture/cache/plugin/
|
|
459
|
+
ctxr plugin build --out dist/ # somewhere else
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
It refuses with exit `2`, writing nothing, on a store without an `mcp` block.
|
|
463
|
+
|
|
464
|
+
**Connecting without the plugin.** In Claude: Settings → Connectors → *Add custom connector*, with the URL `https://ctx.example.com/mcp`. In ChatGPT, turn on developer mode and add a connector with the same URL and OAuth. Reads come from a checkout `serve` keeps for itself under `.contexture/cache/mcp/view`, brought up to date from `origin` at most once a minute. It never touches the checkout your agents work in. Each MCP request writes one line to `serve`'s stderr, naming the person, the method and the tool, but never the arguments or the results.
|
|
433
465
|
|
|
434
466
|
## Keeping a store current
|
|
435
467
|
|
|
@@ -490,8 +522,10 @@ To pin a value against a future default change, declare it. Nothing rewrites wha
|
|
|
490
522
|
| `session start \| capture \| list` | Session worktrees, and applying an approved capture proposal |
|
|
491
523
|
| `land <pr> [--confirm] \| --pending` | Land a session pull request that carries consent: catch up, merge, confirm, sync, reclaim |
|
|
492
524
|
| `review list` | Each open session pull request's decision from the approval page |
|
|
525
|
+
| `shared-stores sync \| status` | Clone and fast-forward the stores this store mounts under `shared/`, or report their state |
|
|
493
526
|
| `adapters generate` | Regenerate harness outputs (`ctxr update` does this too) |
|
|
494
527
|
| `serve` | Read the store in a browser |
|
|
528
|
+
| `plugin build [--out <dir>]` | Build the Claude and ChatGPT plugins: the store's skills and its MCP server |
|
|
495
529
|
| `update` | Bring contexture-owned files up to the installed version |
|
|
496
530
|
| `version [--check]` | Report the installed version; `--check` compares it against the latest published release |
|
|
497
531
|
| `verify [--portable]` | Exercise core store operations end to end |
|
|
@@ -22,10 +22,11 @@ export interface ArchiveData {
|
|
|
22
22
|
* shipped profile may seed that value at init
|
|
23
23
|
* (archive-destination-from-taxonomy), but nothing here reads the taxonomy.
|
|
24
24
|
*
|
|
25
|
-
*
|
|
26
|
-
* never changes a note's filename — only its directory — so no
|
|
27
|
-
*
|
|
28
|
-
*
|
|
25
|
+
* A filename link resolves by stem (context-retrieval spec), and archive
|
|
26
|
+
* never changes a note's filename — only its directory — so no filename
|
|
27
|
+
* link breaks. A path link (mount-shared-stores) names the directory and
|
|
28
|
+
* does break. `linkingNotes` reports both kinds, so the operator knows
|
|
29
|
+
* which notes now point at the archived location and which need relinking.
|
|
29
30
|
*/
|
|
30
31
|
export declare function execute(env: RunEnv, store: Store, flags: ArchiveFlags): Promise<CommandOutcome<ArchiveData>>;
|
|
31
32
|
//# sourceMappingURL=archive.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["../../src/commands/archive.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAM7C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,eAAO,MAAM,QAAQ,EAAE,eAAuC,CAAC;AAE/D,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAOD
|
|
1
|
+
{"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["../../src/commands/archive.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAM7C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,eAAO,MAAM,QAAQ,EAAE,eAAuC,CAAC;AAE/D,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAOD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CA4ClH"}
|
package/dist/commands/archive.js
CHANGED
|
@@ -4,7 +4,7 @@ import path from 'node:path';
|
|
|
4
4
|
import { AlreadyArchivedError, ArchiveDestinationExistsError, NoteNotFoundError, NoteNotTrackedError } from '../core/errors.js';
|
|
5
5
|
import { ExitCode } from '../core/exit-codes.js';
|
|
6
6
|
import { isTracked, movePath } from '../core/git/repo.js';
|
|
7
|
-
import { extractLinkTargets } from '../core/graph/model.js';
|
|
7
|
+
import { extractLinkTargets, linkNames } from '../core/graph/model.js';
|
|
8
8
|
import { listNotes } from '../core/notes/list.js';
|
|
9
9
|
export const requires = { store: 'required' };
|
|
10
10
|
function toStoreRelativePath(env, store, givenPath) {
|
|
@@ -23,10 +23,11 @@ function toStoreRelativePath(env, store, givenPath) {
|
|
|
23
23
|
* shipped profile may seed that value at init
|
|
24
24
|
* (archive-destination-from-taxonomy), but nothing here reads the taxonomy.
|
|
25
25
|
*
|
|
26
|
-
*
|
|
27
|
-
* never changes a note's filename — only its directory — so no
|
|
28
|
-
*
|
|
29
|
-
*
|
|
26
|
+
* A filename link resolves by stem (context-retrieval spec), and archive
|
|
27
|
+
* never changes a note's filename — only its directory — so no filename
|
|
28
|
+
* link breaks. A path link (mount-shared-stores) names the directory and
|
|
29
|
+
* does break. `linkingNotes` reports both kinds, so the operator knows
|
|
30
|
+
* which notes now point at the archived location and which need relinking.
|
|
30
31
|
*/
|
|
31
32
|
export async function execute(env, store, flags) {
|
|
32
33
|
const relativePath = toStoreRelativePath(env, store, flags.path).replace(/\/+$/, '');
|
|
@@ -50,10 +51,9 @@ export async function execute(env, store, flags) {
|
|
|
50
51
|
const notes = await listNotes(store.root, store.config);
|
|
51
52
|
const moving = isFolder ? notes.filter((note) => note.path.startsWith(`${relativePath}/`)) : notes.filter((note) => note.path === relativePath);
|
|
52
53
|
const movingPaths = new Set(moving.map((note) => note.path));
|
|
53
|
-
const stems = new Set(isFolder ? moving.map((note) => path.basename(note.path, '.md')) : [path.basename(relativePath, '.md')]);
|
|
54
54
|
const linkingNotes = notes
|
|
55
55
|
.filter((note) => !movingPaths.has(note.path))
|
|
56
|
-
.filter((note) => extractLinkTargets(note.body).some((target) =>
|
|
56
|
+
.filter((note) => extractLinkTargets(note.body).some((target) => [...movingPaths].some((moved) => linkNames(note.path, target, moved))))
|
|
57
57
|
.map((note) => note.path)
|
|
58
58
|
.sort();
|
|
59
59
|
if (!(await isTracked(env.git, store.root, relativePath))) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archive.js","sourceRoot":"","sources":["../../src/commands/archive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAChI,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"archive.js","sourceRoot":"","sources":["../../src/commands/archive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAChI,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD,MAAM,CAAC,MAAM,QAAQ,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
name: string;
|
|
9
|
+
location: string;
|
|
10
|
+
/** The mounted store's entries for the section, each path prefixed by the mount's location. */
|
|
11
|
+
entries: string[];
|
|
12
|
+
}
|
|
7
13
|
export interface CatalogShowData {
|
|
8
14
|
section: string;
|
|
9
15
|
content: string;
|
|
16
|
+
/** mount-shared-stores: the same section from each mounted store that has entries in it. Absent without mounts. */
|
|
17
|
+
mounts?: MountedCatalogSection[];
|
|
10
18
|
}
|
|
11
19
|
export declare function execute(store: Store, flags: CatalogShowFlags): Promise<CommandOutcome<CatalogShowData>>;
|
|
12
20
|
//# sourceMappingURL=catalog-show.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-show.d.ts","sourceRoot":"","sources":["../../src/commands/catalog-show.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"catalog-show.d.ts","sourceRoot":"","sources":["../../src/commands/catalog-show.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAK1E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,eAAO,MAAM,QAAQ,EAAE,eAAuC,CAAC;AAE/D,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,+FAA+F;IAC/F,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,mHAAmH;IACnH,MAAM,CAAC,EAAE,qBAAqB,EAAE,CAAC;CAClC;AAyBD,wBAAsB,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,CAe7G"}
|
|
@@ -1,17 +1,44 @@
|
|
|
1
1
|
import { readCatalogSection } from '../core/catalog/build.js';
|
|
2
2
|
import { CatalogSectionNotFoundError } from '../core/errors.js';
|
|
3
3
|
import { ExitCode } from '../core/exit-codes.js';
|
|
4
|
+
import { resolveMounts } from '../core/shared-stores.js';
|
|
4
5
|
export const requires = { store: 'required' };
|
|
6
|
+
/** A catalog entry's path, inside its `(`…`)` code span — the one part of an entry that names where the note lives. */
|
|
7
|
+
const ENTRY_PATH_RE = /^(- \[\[.*?\]\] \(`)([^`]+)(`\))/;
|
|
8
|
+
/**
|
|
9
|
+
* context-catalog (mount-shared-stores): the same section read from a mounted
|
|
10
|
+
* store's own tracked catalog, entries only, with each path carrying the
|
|
11
|
+
* mount's location. Nothing is built, written or copied into this store.
|
|
12
|
+
*/
|
|
13
|
+
async function mountedSection(store, sectionId) {
|
|
14
|
+
const sections = [];
|
|
15
|
+
for (const mount of await resolveMounts(store.root, store.config)) {
|
|
16
|
+
if (mount.state !== 'present')
|
|
17
|
+
continue;
|
|
18
|
+
const content = await readCatalogSection({ root: mount.root, config: mount.config }, sectionId);
|
|
19
|
+
if (content === null)
|
|
20
|
+
continue;
|
|
21
|
+
const entries = content
|
|
22
|
+
.split('\n')
|
|
23
|
+
.filter((line) => ENTRY_PATH_RE.test(line))
|
|
24
|
+
.map((line) => line.replace(ENTRY_PATH_RE, (_all, open, notePath, close) => `${open}${mount.location}/${notePath}${close}`));
|
|
25
|
+
if (entries.length > 0)
|
|
26
|
+
sections.push({ name: mount.name, location: mount.location, entries });
|
|
27
|
+
}
|
|
28
|
+
return sections;
|
|
29
|
+
}
|
|
5
30
|
export async function execute(store, flags) {
|
|
6
31
|
const content = await readCatalogSection(store, flags.section);
|
|
7
32
|
if (content === null) {
|
|
8
33
|
throw new CatalogSectionNotFoundError(flags.section);
|
|
9
34
|
}
|
|
35
|
+
const mounts = (store.config.shared_stores ?? []).length > 0 ? await mountedSection(store, flags.section) : undefined;
|
|
36
|
+
const mountedText = (mounts ?? []).map((m) => [`## ${m.location}/ (mounted store "${m.name}")`, '', ...m.entries].join('\n'));
|
|
10
37
|
return {
|
|
11
38
|
exitCode: ExitCode.Ok,
|
|
12
|
-
data: { section: flags.section, content },
|
|
39
|
+
data: { section: flags.section, content, ...(mounts !== undefined ? { mounts } : {}) },
|
|
13
40
|
findings: [],
|
|
14
|
-
humanSummary: content,
|
|
41
|
+
humanSummary: mountedText.length === 0 ? content : [content.replace(/\n+$/, ''), ...mountedText].join('\n\n'),
|
|
15
42
|
storeRoot: store.root,
|
|
16
43
|
schemaVersion: store.config.schema_version,
|
|
17
44
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-show.js","sourceRoot":"","sources":["../../src/commands/catalog-show.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"catalog-show.js","sourceRoot":"","sources":["../../src/commands/catalog-show.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAGzD,MAAM,CAAC,MAAM,QAAQ,GAAoB,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AAoB/D,uHAAuH;AACvH,MAAM,aAAa,GAAG,kCAAkC,CAAC;AAEzD;;;;GAIG;AACH,KAAK,UAAU,cAAc,CAAC,KAAY,EAAE,SAAiB;IAC3D,MAAM,QAA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GAAG,KAAK,GAAG,MAAM,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAsB,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,GAAE,kBAAuB,GAAG,OAAO,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC,CA0BlH"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExitCode } from '../core/exit-codes.js';
|
|
2
2
|
import { readAdmittedGraph } from '../core/graph/persist.js';
|
|
3
|
-
import {
|
|
3
|
+
import { listReadView } from '../core/shared-stores.js';
|
|
4
4
|
import { gather } from '../core/retrieval/pass.js';
|
|
5
5
|
export const requires = { store: 'required' };
|
|
6
6
|
/**
|
|
@@ -10,7 +10,8 @@ export const requires = { store: 'required' };
|
|
|
10
10
|
* gather`, it finds and orders candidates and never reads or synthesizes them.
|
|
11
11
|
*/
|
|
12
12
|
export async function execute(store, flags = {}) {
|
|
13
|
-
|
|
13
|
+
// mount-shared-stores: the pass covers the read view, the same notes the persisted graph was built from.
|
|
14
|
+
const { notes } = await listReadView(store.root, store.config);
|
|
14
15
|
const graph = await readAdmittedGraph(store);
|
|
15
16
|
const options = {
|
|
16
17
|
seeds: flags.seed,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-gather.js","sourceRoot":"","sources":["../../src/commands/context-gather.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"context-gather.js","sourceRoot":"","sources":["../../src/commands/context-gather.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO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,SAAS,GAAG;QACvF,SAAS,EAAE,KAAK,CAAC,IAAI;QACrB,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,cAAc;KAC3C,CAAC;AACJ,CAAC"}
|
|
@@ -23,5 +23,9 @@ export interface DoctorData {
|
|
|
23
23
|
skip: number;
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Only `git` is read from the environment, so the store-scope pass can also run
|
|
28
|
+
* as `ctxr session submit`'s gate (bring-the-session-lifecycle-into-the-cli D1).
|
|
29
|
+
*/
|
|
30
|
+
export declare function execute(env: Pick<RunEnv, 'git'>, store: Store, flags?: DoctorFlags): Promise<CommandOutcome<DoctorData>>;
|
|
27
31
|
//# sourceMappingURL=doctor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAG1E,OAAO,KAAK,EAAgB,UAAU,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACrF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAKnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,eAAO,MAAM,QAAQ,EAAE,eAAuC,CAAC;AAE/D,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,UAAU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E,MAAM,CAAA;KAAE,CAAC;CACvD;AAED;;;GAGG;AACH,wBAAsB,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,GAAE,WAAgB,GAAG,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAiDlI"}
|
package/dist/commands/doctor.js
CHANGED
|
@@ -5,6 +5,10 @@ import { getStagedFiles } from '../core/git/staged.js';
|
|
|
5
5
|
import { readGraph } from '../core/graph/persist.js';
|
|
6
6
|
import { listNotes } from '../core/notes/list.js';
|
|
7
7
|
export const requires = { store: 'required' };
|
|
8
|
+
/**
|
|
9
|
+
* Only `git` is read from the environment, so the store-scope pass can also run
|
|
10
|
+
* as `ctxr session submit`'s gate (bring-the-session-lifecycle-into-the-cli D1).
|
|
11
|
+
*/
|
|
8
12
|
export async function execute(env, store, flags = {}) {
|
|
9
13
|
const scope = flags.staged ? 'staged' : 'store';
|
|
10
14
|
const staged = scope === 'staged' ? await getStagedFiles(env.git, store.root) : undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAItE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD,MAAM,CAAC,MAAM,QAAQ,GAAoB,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AAoB/D,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"doct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AI;QACJ,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACnD,YAAY,EAAE,WAAW,KAAK,MAAM,OAAO,CAAC,IAAI,YAAY,OAAO,CAAC,IAAI,YAAY,OAAO,CAAC,IAAI,UAAU;QAC1G,SAAS,EAAE,KAAK,CAAC,IAAI;QACrB,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,cAAc;KAC3C,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { CommandOutcome, CommandRequires } from '../core/command.js';
|
|
2
|
-
import {
|
|
2
|
+
import type { GraphBuildResult } from '../core/graph/model.js';
|
|
3
3
|
import { type GraphDocumentSummary } from '../core/graph/document.js';
|
|
4
4
|
import { type PerNoteRecord } from '../core/records.js';
|
|
5
|
+
import { type UnavailableMount } from '../core/shared-stores.js';
|
|
5
6
|
import type { Store } from '../core/store.js';
|
|
6
7
|
export declare const requires: CommandRequires;
|
|
7
8
|
export interface GraphBuildFlags {
|
|
@@ -16,6 +17,8 @@ export interface GraphBuildData {
|
|
|
16
17
|
path: string;
|
|
17
18
|
} & GraphDocumentSummary;
|
|
18
19
|
records?: PerNoteRecord[];
|
|
20
|
+
/** mount-shared-stores: declared mounts the read view could not include. Absent for a store with no mounts. */
|
|
21
|
+
unavailableMounts?: UnavailableMount[];
|
|
19
22
|
}
|
|
20
23
|
/**
|
|
21
24
|
* context-retrieval spec: node identity is path-based, so a genuine identity
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-build.d.ts","sourceRoot":"","sources":["../../src/commands/graph-build.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAG1E,OAAO,
|
|
1
|
+
{"version":3,"file":"graph-build.d.ts","sourceRoot":"","sources":["../../src/commands/graph-build.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAG1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAuB,KAAK,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAE3F,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAyC,KAAK,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACxG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,eAAO,MAAM,QAAQ,EAAE,eAAuC,CAAC;AAE/D,MAAM,WAAW,eAAe;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACvC,sGAAsG;IACtG,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,oBAAoB,CAAC;IAClD,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;IAC1B,+GAA+G;IAC/G,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAC;CACxC;AAED;;;;;;;GAOG;AACH,wBAAsB,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,GAAE,eAAoB,GAAG,OAAO,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,CAoChH"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ExitCode } from '../core/exit-codes.js';
|
|
2
|
-
import { buildGraphFromNotes, graphBuildOptions } from '../core/graph/model.js';
|
|
3
2
|
import { renderGraphDocument } from '../core/graph/document.js';
|
|
4
3
|
import { GRAPH_DOCUMENT_RELATIVE_PATH, writeGraph, writeGraphDocument } from '../core/graph/persist.js';
|
|
5
|
-
import { listNotes } from '../core/notes/list.js';
|
|
6
4
|
import { buildPerNoteRecords } from '../core/records.js';
|
|
5
|
+
import { buildReadViewGraph, unavailableMounts } from '../core/shared-stores.js';
|
|
7
6
|
export const requires = { store: 'required' };
|
|
8
7
|
/**
|
|
9
8
|
* context-retrieval spec: node identity is path-based, so a genuine identity
|
|
@@ -14,8 +13,8 @@ export const requires = { store: 'required' };
|
|
|
14
13
|
* reported as a finding rather than failing the build.
|
|
15
14
|
*/
|
|
16
15
|
export async function execute(store, flags = {}) {
|
|
17
|
-
const
|
|
18
|
-
const
|
|
16
|
+
const { graph, view } = await buildReadViewGraph(store.root, store.config);
|
|
17
|
+
const unavailable = unavailableMounts(view.mounts);
|
|
19
18
|
await writeGraph(store, graph);
|
|
20
19
|
const { text, summary } = renderGraphDocument(graph, store.config.retrieval.graph);
|
|
21
20
|
await writeGraphDocument(store, text);
|
|
@@ -27,9 +26,19 @@ export async function execute(store, flags = {}) {
|
|
|
27
26
|
subject: d.from,
|
|
28
27
|
details: { target: d.target, reason: d.reason },
|
|
29
28
|
}));
|
|
29
|
+
for (const mount of unavailable) {
|
|
30
|
+
findings.push({
|
|
31
|
+
code: 'shared_stores.mount_unavailable',
|
|
32
|
+
severity: 'warning',
|
|
33
|
+
message: mount.state === 'absent'
|
|
34
|
+
? `Mount "${mount.name}" is not cloned at ${mount.location}, so its notes are not in the graph. Run \`ctxr shared-stores sync\`.`
|
|
35
|
+
: `Mount "${mount.name}" at ${mount.location} is not a store (${mount.reason}), so its notes are not in the graph.`,
|
|
36
|
+
subject: mount.location,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
30
39
|
return {
|
|
31
40
|
exitCode: ExitCode.Ok,
|
|
32
|
-
data: { nodeCount: graph.nodes.length, edgeCount: graph.edges.length, dangling: graph.dangling, document: { path: GRAPH_DOCUMENT_RELATIVE_PATH, ...summary }, records },
|
|
41
|
+
data: { nodeCount: graph.nodes.length, edgeCount: graph.edges.length, dangling: graph.dangling, document: { path: GRAPH_DOCUMENT_RELATIVE_PATH, ...summary }, records, ...(view.mounts.length > 0 ? { unavailableMounts: unavailable } : {}) },
|
|
33
42
|
findings,
|
|
34
43
|
humanSummary: `Graph built: ${graph.nodes.length} node(s), ${graph.edges.length} edge(s) (${summary.typedLinks} typed), ${graph.dangling.length} dangling link(s); ${summary.clusters} cluster(s), ${summary.bridges} bridge(s), ${summary.orphans} orphan(s) → ${GRAPH_DOCUMENT_RELATIVE_PATH}.`,
|
|
35
44
|
storeRoot: store.root,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-build.js","sourceRoot":"","sources":["../../src/commands/graph-build.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"graph-build.js","sourceRoot":"","sources":["../../src/commands/graph-build.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAA6B,MAAM,2BAA2B,CAAC;AAC3F,OAAO,EAAE,4BAA4B,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACxG,OAAO,EAAE,mBAAmB,EAAsB,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAyB,MAAM,0BAA0B,CAAC;AAGxG,MAAM,CAAC,MAAM,QAAQ,GAAoB,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AAiB/D;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,KAAY,EAAE,KAAK,GAAoB,EAAE;IACrE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,MAAM,kBAAkB,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3E,MAAM,WAAW,GAAG,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACnD,MAAM,UAAU,CAA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IACL,CAAC;IAED,OAAO;QACL,QAAQ,EAAE,QAAQ,CAAC,EAAE;QACrB,IAAI,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,4BAA4B,EAAE,GAAG,OAAO,EAAE,EAAE,OAAO,EAAE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE;QAC9O,QAAQ;QACR,YAAY,EAAE,gBAAgB,KAAK,CAAC,KAAK,CAAC,MAAM,aAAa,KAAK,CAAC,KAAK,CAAC,MAAM,aAAa,OAAO,CAAC,UAAU,YAAY,KAAK,CAAC,QAAQ,CAAC,MAAM,sBAAsB,OAAO,CAAC,QAAQ,gBAAgB,OAAO,CAAC,OAAO,eAAe,OAAO,CAAC,OAAO,gBAAgB,4BAA4B,GAAG;QACjS,SAAS,EAAE,KAAK,CAAC,IAAI;QACrB,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,cAAc;KAC3C,CAAC;AACJ,CAAC"}
|
package/dist/commands/land.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type FastForwardOutcome } from '../core/git/fast-forward.js';
|
|
1
2
|
import type { CommandOutcome, CommandRequires } from '../core/command.js';
|
|
2
3
|
import type { RunEnv } from '../core/env.js';
|
|
3
4
|
import { type CredentialKind } from '../core/forge/credentials.js';
|
|
@@ -8,6 +9,8 @@ export interface LandFlags {
|
|
|
8
9
|
pr: number | undefined;
|
|
9
10
|
pending: boolean;
|
|
10
11
|
confirm: boolean;
|
|
12
|
+
/** approve-sessions-across-stores D7: a session homed here, by its worktree name or branch, landed whole on `--confirm`. */
|
|
13
|
+
session?: string | undefined;
|
|
11
14
|
}
|
|
12
15
|
export type LandOutcome = 'merged' | 'no-consent' | 'needs-reapproval' | 'blocked' | 'merge-refused' | 'lease-refused';
|
|
13
16
|
export type CatchUp = 'not-needed' | 'clean' | 'carried-over' | 'patches-changed' | 'conflict' | 'conflict-resolved';
|
|
@@ -30,22 +33,39 @@ export interface LandResult {
|
|
|
30
33
|
/** Records posted on the pull request, and records this credential could not post (not the recording login). */
|
|
31
34
|
records_posted: string[];
|
|
32
35
|
records_reported_only: string[];
|
|
36
|
+
/** approve-sessions-across-stores: the forge slug of the store a session's part is on; null outside a session. */
|
|
37
|
+
store?: string | null;
|
|
33
38
|
}
|
|
34
|
-
/**
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
/**
|
|
40
|
+
* write-lifecycle spec ("A session is landed by its home store, mounted parts
|
|
41
|
+
* first"): one session's landing. `landed` when every part merged; `blocked`
|
|
42
|
+
* waits for a person (a named part closed without merging, a conflict);
|
|
43
|
+
* `retrying` is tried again on the next run; `needs-reapproval` and
|
|
44
|
+
* `not-approved` wait for a decision.
|
|
45
|
+
*/
|
|
46
|
+
export interface SessionLandResult {
|
|
47
|
+
session: string;
|
|
48
|
+
home: string;
|
|
49
|
+
state: 'landed' | 'blocked' | 'retrying' | 'needs-reapproval' | 'not-approved';
|
|
41
50
|
reason: string | null;
|
|
51
|
+
/** The part (`<store>#<number>`) that stopped the session; null when nothing did. */
|
|
52
|
+
stopped_at: string | null;
|
|
53
|
+
landed: string[];
|
|
54
|
+
not_attempted: string[];
|
|
55
|
+
/** For `retrying`: a one-word cause (`push-rejected`, `forge-unreachable`, `mount-not-synced`, …); null otherwise. */
|
|
56
|
+
reason_code: string | null;
|
|
42
57
|
}
|
|
58
|
+
/** write-lifecycle spec ("Every landing run brings the canonical clone up to date when it is safe to"). */
|
|
59
|
+
/** The canonical clone's sync: the shared fast-forward rule's outcome (`core/git/fast-forward.ts`). */
|
|
60
|
+
export type CanonicalSync = FastForwardOutcome;
|
|
43
61
|
export interface LandData {
|
|
44
62
|
/** Which kind of forge credential the command used; never the credential. */
|
|
45
63
|
credential: CredentialKind;
|
|
46
64
|
results: LandResult[];
|
|
47
65
|
/** `--pending` only: the sync every run ends with, whether or not it landed anything. */
|
|
48
66
|
canonical_sync?: CanonicalSync;
|
|
67
|
+
/** Each session landed (or held) by this run, when any pull request carried a session marker homed here. */
|
|
68
|
+
sessions?: SessionLandResult[];
|
|
49
69
|
}
|
|
50
70
|
/**
|
|
51
71
|
* write-lifecycle spec ("Landing merges only a head that carries consent"):
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"land.d.ts","sourceRoot":"","sources":["../../src/commands/land.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"land.d.ts","sourceRoot":"","sources":["../../src/commands/land.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAWzF,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAI7C,OAAO,EAA+C,KAAK,cAAc,EAAyB,MAAM,8BAA8B,CAAC;AACvI,OAAO,EAA0C,KAAK,WAAW,EAAsC,MAAM,yBAAyB,CAAC;AAGvI,OAAO,EAAa,KAAK,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAKzD,eAAO,MAAM,QAAQ,EAAE,eAAuC,CAAC;AAE/D,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,4HAA4H;IAC5H,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,YAAY,GAAG,kBAAkB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