ctxr-cli 0.9.0 → 0.11.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 +28 -11
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +10 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/publish-check.d.ts.map +1 -1
- package/dist/commands/publish-check.js +8 -0
- package/dist/commands/publish-check.js.map +1 -1
- package/dist/commands/publish-new.d.ts.map +1 -1
- package/dist/commands/publish-new.js +15 -0
- package/dist/commands/publish-new.js.map +1 -1
- package/dist/commands/serve.d.ts.map +1 -1
- package/dist/commands/serve.js +33 -11
- package/dist/commands/serve.js.map +1 -1
- package/dist/commands/session-start.d.ts.map +1 -1
- package/dist/commands/session-start.js +9 -1
- package/dist/commands/session-start.js.map +1 -1
- package/dist/commands/source-check.d.ts.map +1 -1
- package/dist/commands/source-check.js +28 -3
- package/dist/commands/source-check.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +7 -1
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/verify.d.ts +11 -2
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +86 -5
- package/dist/commands/verify.js.map +1 -1
- package/dist/commands/version.d.ts +31 -0
- package/dist/commands/version.d.ts.map +1 -0
- package/dist/commands/version.js +87 -0
- package/dist/commands/version.js.map +1 -0
- package/dist/config/defaults.d.ts +71 -5
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +70 -5
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/load.d.ts +2 -2
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/load.js +13 -3
- package/dist/config/load.js.map +1 -1
- package/dist/config/render.d.ts +0 -6
- package/dist/config/render.d.ts.map +1 -1
- package/dist/config/render.js +4 -27
- package/dist/config/render.js.map +1 -1
- package/dist/config/schema.d.ts +21 -67
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +73 -112
- package/dist/config/schema.js.map +1 -1
- package/dist/core/agents-doc.d.ts.map +1 -1
- package/dist/core/agents-doc.js +2 -1
- package/dist/core/agents-doc.js.map +1 -1
- package/dist/core/browse/nav.d.ts.map +1 -1
- package/dist/core/browse/nav.js +4 -1
- package/dist/core/browse/nav.js.map +1 -1
- package/dist/core/browse/preferences.d.ts +26 -0
- package/dist/core/browse/preferences.d.ts.map +1 -0
- package/dist/core/browse/preferences.js +74 -0
- package/dist/core/browse/preferences.js.map +1 -0
- package/dist/core/browse/routes.d.ts +10 -8
- package/dist/core/browse/routes.d.ts.map +1 -1
- package/dist/core/browse/routes.js +113 -24
- package/dist/core/browse/routes.js.map +1 -1
- package/dist/core/browse/templates.d.ts +14 -4
- package/dist/core/browse/templates.d.ts.map +1 -1
- package/dist/core/browse/templates.js +22 -4
- package/dist/core/browse/templates.js.map +1 -1
- package/dist/core/checks/harness-portability-checks.d.ts +21 -0
- package/dist/core/checks/harness-portability-checks.d.ts.map +1 -1
- package/dist/core/checks/harness-portability-checks.js +46 -1
- package/dist/core/checks/harness-portability-checks.js.map +1 -1
- package/dist/core/checks/integrity-checks.d.ts +0 -2
- package/dist/core/checks/integrity-checks.d.ts.map +1 -1
- package/dist/core/checks/integrity-checks.js +38 -27
- 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/store-checks.d.ts +12 -0
- package/dist/core/checks/store-checks.d.ts.map +1 -0
- package/dist/core/checks/store-checks.js +37 -0
- package/dist/core/checks/store-checks.js.map +1 -0
- package/dist/core/command.d.ts +6 -0
- package/dist/core/command.d.ts.map +1 -1
- package/dist/core/convention-doc.d.ts.map +1 -1
- package/dist/core/convention-doc.js +15 -9
- package/dist/core/convention-doc.js.map +1 -1
- package/dist/core/env.d.ts +5 -0
- package/dist/core/env.d.ts.map +1 -1
- package/dist/core/env.js +3 -0
- package/dist/core/env.js.map +1 -1
- package/dist/core/environment/probe.d.ts +12 -0
- package/dist/core/environment/probe.d.ts.map +1 -0
- package/dist/core/environment/probe.js +36 -0
- package/dist/core/environment/probe.js.map +1 -0
- package/dist/core/errors.d.ts +16 -3
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +41 -15
- package/dist/core/errors.js.map +1 -1
- package/dist/core/git/worktree.d.ts +22 -0
- package/dist/core/git/worktree.d.ts.map +1 -1
- package/dist/core/git/worktree.js +34 -0
- package/dist/core/git/worktree.js.map +1 -1
- package/dist/core/graph/model.d.ts +7 -6
- package/dist/core/graph/model.d.ts.map +1 -1
- package/dist/core/graph/model.js +11 -7
- package/dist/core/graph/model.js.map +1 -1
- package/dist/core/harness/isolated-run.d.ts +52 -0
- package/dist/core/harness/isolated-run.d.ts.map +1 -0
- package/dist/core/harness/isolated-run.js +100 -0
- package/dist/core/harness/isolated-run.js.map +1 -0
- package/dist/core/install-kind.d.ts +25 -0
- package/dist/core/install-kind.d.ts.map +1 -0
- package/dist/core/install-kind.js +56 -0
- package/dist/core/install-kind.js.map +1 -0
- package/dist/core/note-templates.d.ts +61 -0
- package/dist/core/note-templates.d.ts.map +1 -0
- package/dist/core/note-templates.js +188 -0
- package/dist/core/note-templates.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/publish/script-check.d.ts +5 -2
- package/dist/core/publish/script-check.d.ts.map +1 -1
- package/dist/core/publish/script-check.js +5 -2
- package/dist/core/publish/script-check.js.map +1 -1
- package/dist/core/reconcile.d.ts.map +1 -1
- package/dist/core/reconcile.js +8 -0
- package/dist/core/reconcile.js.map +1 -1
- package/dist/core/registry.d.ts +40 -0
- package/dist/core/registry.d.ts.map +1 -0
- package/dist/core/registry.js +55 -0
- package/dist/core/registry.js.map +1 -0
- package/dist/core/root.d.ts +11 -5
- package/dist/core/root.d.ts.map +1 -1
- package/dist/core/root.js +20 -8
- package/dist/core/root.js.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +32 -15
- package/dist/core/skills.js.map +1 -1
- package/dist/core/version-check.d.ts +63 -0
- package/dist/core/version-check.d.ts.map +1 -0
- package/dist/core/version-check.js +181 -0
- package/dist/core/version-check.js.map +1 -0
- package/dist/core/write-lifecycle/path-gate.d.ts.map +1 -1
- package/dist/core/write-lifecycle/path-gate.js +4 -1
- package/dist/core/write-lifecycle/path-gate.js.map +1 -1
- package/dist/run.d.ts +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +38 -16
- package/dist/run.js.map +1 -1
- package/dist/version.d.ts +8 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +8 -1
- package/dist/version.js.map +1 -1
- package/package.json +1 -1
- package/templates/agents/canonical.md +5 -1
- package/templates/notes/Company.md +25 -0
- package/templates/notes/Concept.md +29 -0
- package/templates/notes/Deal.md +25 -0
- package/templates/notes/Note.md +6 -0
- package/templates/notes/People.md +19 -0
- package/templates/notes/Project.md +19 -0
- package/templates/serve/shell.html +16 -2
- package/templates/serve/style.css +145 -3
- package/templates/skills/ctxr-ingest-orchestration.md +4 -1
- package/templates/skills/ctxr-placement.md +21 -2
- package/templates/skills/ctxr-session-capture.md +5 -1
- package/templates/skills/ctxr-session-lifecycle.md +20 -0
- package/templates/skills/ctxr-upgrade.md +44 -0
- package/dist/commands/migrate.d.ts +0 -30
- package/dist/commands/migrate.d.ts.map +0 -1
- package/dist/commands/migrate.js +0 -56
- package/dist/commands/migrate.js.map +0 -1
- package/dist/core/migrations/add-explanation-craft-skill.d.ts +0 -26
- package/dist/core/migrations/add-explanation-craft-skill.d.ts.map +0 -1
- package/dist/core/migrations/add-explanation-craft-skill.js +0 -94
- package/dist/core/migrations/add-explanation-craft-skill.js.map +0 -1
- package/dist/core/migrations/archive-destination-from-taxonomy.d.ts +0 -35
- package/dist/core/migrations/archive-destination-from-taxonomy.d.ts.map +0 -1
- package/dist/core/migrations/archive-destination-from-taxonomy.js +0 -109
- package/dist/core/migrations/archive-destination-from-taxonomy.js.map +0 -1
- package/dist/core/migrations/config-defaults-as-the-convention.d.ts +0 -21
- package/dist/core/migrations/config-defaults-as-the-convention.d.ts.map +0 -1
- package/dist/core/migrations/config-defaults-as-the-convention.js +0 -54
- package/dist/core/migrations/config-defaults-as-the-convention.js.map +0 -1
- package/dist/core/migrations/drop-access-axes.d.ts +0 -24
- package/dist/core/migrations/drop-access-axes.d.ts.map +0 -1
- package/dist/core/migrations/drop-access-axes.js +0 -54
- package/dist/core/migrations/drop-access-axes.js.map +0 -1
- package/dist/core/migrations/drop-forge-and-workspaces-external.d.ts +0 -19
- package/dist/core/migrations/drop-forge-and-workspaces-external.d.ts.map +0 -1
- package/dist/core/migrations/drop-forge-and-workspaces-external.js +0 -49
- package/dist/core/migrations/drop-forge-and-workspaces-external.js.map +0 -1
- package/dist/core/migrations/registry.d.ts +0 -16
- package/dist/core/migrations/registry.d.ts.map +0 -1
- package/dist/core/migrations/registry.js +0 -34
- package/dist/core/migrations/registry.js.map +0 -1
- package/dist/core/migrations/rename-conventions-path.d.ts +0 -26
- package/dist/core/migrations/rename-conventions-path.d.ts.map +0 -1
- package/dist/core/migrations/rename-conventions-path.js +0 -86
- package/dist/core/migrations/rename-conventions-path.js.map +0 -1
- package/dist/core/migrations/rename-procedures-path.d.ts +0 -17
- package/dist/core/migrations/rename-procedures-path.d.ts.map +0 -1
- package/dist/core/migrations/rename-procedures-path.js +0 -45
- package/dist/core/migrations/rename-procedures-path.js.map +0 -1
- package/dist/core/migrations/retain-captures-as-provenance.d.ts +0 -22
- package/dist/core/migrations/retain-captures-as-provenance.d.ts.map +0 -1
- package/dist/core/migrations/retain-captures-as-provenance.js +0 -133
- package/dist/core/migrations/retain-captures-as-provenance.js.map +0 -1
- package/dist/core/migrations/types.d.ts +0 -27
- package/dist/core/migrations/types.d.ts.map +0 -1
- package/dist/core/migrations/types.js +0 -2
- package/dist/core/migrations/types.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/core/graph/model.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/core/graph/model.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AA4B1D,kGAAkG;AAClG,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC;AAoBrC,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC;AACvC,mEAAmE;AACnE,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC;AAErC,MAAM,UAAU,SAAS,CAAC,QAAgB,EAAE,KAAK,GAAW,qBAAqB;IAC/E,MAAM,WAAW,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACrD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,YAAY,CAAC;IAClD,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC5D,CAAC;AAED,MAAM,WAAW,GAAG,iBAAiB,CAAC;AACtC,MAAM,UAAU,GAAG,uBAAuB,CAAC;AAO3C,SAAS,gBAAgB,CAAC,IAAY;IACpC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AACzD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AAC,CAAC;IAC/G,MAAM,KAAK,GAAgB,EAAE,CAAC;IAC9B,MAAM,QAAQ,GAAmB,EAAE,CAAC;IAEpC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,KAAK,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACvD,MAAM,UAAU,GAAG,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YAClD,IAAI,QAAQ,IAAI,UAAU,EAAE,CAAC;gBAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;YACxE,CAAC;iBAAM,CAAC;gBACN,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;YAC7D,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACpC,CAAC;AAED,4GAA4G;AAC5G,MAAM,UAAU,iBAAiB,CAAC,MAA2D;IAC3F,OAAO,EAAE,YAAY,EAAE,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { GitRunner } from '../git/exec.js';
|
|
2
|
+
export interface IsolatedVerifyStep {
|
|
3
|
+
operation: string;
|
|
4
|
+
status: string;
|
|
5
|
+
detail?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IsolatedVerifyResult {
|
|
8
|
+
/** The commit the disposable checkout was made from — what the run actually verified. */
|
|
9
|
+
commit: string;
|
|
10
|
+
steps: IsolatedVerifyStep[];
|
|
11
|
+
exitCode: number;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the scrubbed home was still empty when the child finished. The
|
|
14
|
+
* requirement says it must be; observing it is what makes that a mechanism
|
|
15
|
+
* rather than an assumption about a directory nobody ever looks at.
|
|
16
|
+
*/
|
|
17
|
+
homeWasEmpty: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* isolate-the-portability-test (D1): the environment the child runs under.
|
|
21
|
+
*
|
|
22
|
+
* Built from the injected environment, never `process.env`, so this stays a
|
|
23
|
+
* pure function of its inputs and the source-level guard that no module
|
|
24
|
+
* outside `core/env.ts` reads process state keeps holding.
|
|
25
|
+
*
|
|
26
|
+
* `HOME` and `USERPROFILE` point at an empty directory, `CONTEXTURE_STORE_ROOT`
|
|
27
|
+
* (and the superseded `CONTEXTURE_ROOT` — rename-store-root-env-var: a leaked
|
|
28
|
+
* one would make the child refuse via SupersededStoreRootEnvVarError instead
|
|
29
|
+
* of being properly isolated) and every `XDG_*` key are removed, and git is
|
|
30
|
+
* cut off from a global config. `PATH` is deliberately preserved: the
|
|
31
|
+
* prerequisites step resolves a tool on it, so `PATH` is the subject of that
|
|
32
|
+
* step rather than something the run isolates from.
|
|
33
|
+
*/
|
|
34
|
+
export declare function scrubbedChildEnv(env: Readonly<Record<string, string | undefined>>, homeDir: string): Record<string, string>;
|
|
35
|
+
/**
|
|
36
|
+
* Runs `verify` against a disposable checkout of `commit`, in a child process
|
|
37
|
+
* with no harness state reachable. Isolation is produced by the mechanism
|
|
38
|
+
* rather than asserted of the implementation, which is the property the
|
|
39
|
+
* portability requirement now names.
|
|
40
|
+
*
|
|
41
|
+
* The child is `process.execPath` plus this CLI's own entry script — never a
|
|
42
|
+
* `PATH` lookup for `ctxr`. Under a scrubbed environment a resolved `ctxr`
|
|
43
|
+
* could be a different installation, and the run would silently verify the
|
|
44
|
+
* wrong binary (D1). It runs bare `verify`, so the recursion terminates by
|
|
45
|
+
* construction.
|
|
46
|
+
*
|
|
47
|
+
* The checkout and both temp directories are reclaimed whether the child
|
|
48
|
+
* passes or fails — a failing run is exactly when a stranded worktree would
|
|
49
|
+
* be least welcome.
|
|
50
|
+
*/
|
|
51
|
+
export declare function runIsolatedVerify(git: GitRunner, storeRoot: string, env: Readonly<Record<string, string | undefined>>, commit: string): Promise<IsolatedVerifyResult>;
|
|
52
|
+
//# sourceMappingURL=isolated-run.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isolated-run.d.ts","sourceRoot":"","sources":["../../../src/core/harness/isolated-run.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAKhD,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACnC,yFAAyF;IACzF,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,YAAY,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,EACjD,OAAO,EAAE,MAAM,GACd,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAWxB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,SAAS,EACd,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,EACjD,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,oBAAoB,CAAC,CAuB/B"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { execFile } from 'node:child_process';
|
|
2
|
+
import { mkdtemp, readdir, rm } from 'node:fs/promises';
|
|
3
|
+
import { tmpdir } from 'node:os';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { promisify } from 'node:util';
|
|
6
|
+
import { addDetachedWorktree, mainWorktreePath, pruneWorktrees, removeWorktree } from '../git/worktree.js';
|
|
7
|
+
const execFileAsync = promisify(execFile);
|
|
8
|
+
/**
|
|
9
|
+
* isolate-the-portability-test (D1): the environment the child runs under.
|
|
10
|
+
*
|
|
11
|
+
* Built from the injected environment, never `process.env`, so this stays a
|
|
12
|
+
* pure function of its inputs and the source-level guard that no module
|
|
13
|
+
* outside `core/env.ts` reads process state keeps holding.
|
|
14
|
+
*
|
|
15
|
+
* `HOME` and `USERPROFILE` point at an empty directory, `CONTEXTURE_STORE_ROOT`
|
|
16
|
+
* (and the superseded `CONTEXTURE_ROOT` — rename-store-root-env-var: a leaked
|
|
17
|
+
* one would make the child refuse via SupersededStoreRootEnvVarError instead
|
|
18
|
+
* of being properly isolated) and every `XDG_*` key are removed, and git is
|
|
19
|
+
* cut off from a global config. `PATH` is deliberately preserved: the
|
|
20
|
+
* prerequisites step resolves a tool on it, so `PATH` is the subject of that
|
|
21
|
+
* step rather than something the run isolates from.
|
|
22
|
+
*/
|
|
23
|
+
export function scrubbedChildEnv(env, homeDir) {
|
|
24
|
+
const child = {};
|
|
25
|
+
for (const [key, value] of Object.entries(env)) {
|
|
26
|
+
if (value === undefined)
|
|
27
|
+
continue;
|
|
28
|
+
if (key === 'CONTEXTURE_STORE_ROOT' || key === 'CONTEXTURE_ROOT' || key.startsWith('XDG_'))
|
|
29
|
+
continue;
|
|
30
|
+
child[key] = value;
|
|
31
|
+
}
|
|
32
|
+
child.HOME = homeDir;
|
|
33
|
+
child.USERPROFILE = homeDir;
|
|
34
|
+
child.GIT_CONFIG_GLOBAL = '/dev/null';
|
|
35
|
+
return child;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Runs `verify` against a disposable checkout of `commit`, in a child process
|
|
39
|
+
* with no harness state reachable. Isolation is produced by the mechanism
|
|
40
|
+
* rather than asserted of the implementation, which is the property the
|
|
41
|
+
* portability requirement now names.
|
|
42
|
+
*
|
|
43
|
+
* The child is `process.execPath` plus this CLI's own entry script — never a
|
|
44
|
+
* `PATH` lookup for `ctxr`. Under a scrubbed environment a resolved `ctxr`
|
|
45
|
+
* could be a different installation, and the run would silently verify the
|
|
46
|
+
* wrong binary (D1). It runs bare `verify`, so the recursion terminates by
|
|
47
|
+
* construction.
|
|
48
|
+
*
|
|
49
|
+
* The checkout and both temp directories are reclaimed whether the child
|
|
50
|
+
* passes or fails — a failing run is exactly when a stranded worktree would
|
|
51
|
+
* be least welcome.
|
|
52
|
+
*/
|
|
53
|
+
export async function runIsolatedVerify(git, storeRoot, env, commit) {
|
|
54
|
+
// Register the checkout against the repository's main worktree, so a run
|
|
55
|
+
// launched from inside a linked worktree still works — contexture's own
|
|
56
|
+
// session model makes that the common case, not the exception.
|
|
57
|
+
const repoRoot = await mainWorktreePath(git, storeRoot);
|
|
58
|
+
const checkout = await mkdtemp(path.join(tmpdir(), 'ctxr-portable-'));
|
|
59
|
+
const home = await mkdtemp(path.join(tmpdir(), 'ctxr-portable-home-'));
|
|
60
|
+
// `worktree add` wants to create the directory itself.
|
|
61
|
+
await rm(checkout, { recursive: true, force: true });
|
|
62
|
+
try {
|
|
63
|
+
await addDetachedWorktree(git, repoRoot, checkout, commit);
|
|
64
|
+
const { stdout, exitCode } = await runChild(checkout, scrubbedChildEnv(env, home));
|
|
65
|
+
// Read it before the finally block removes it — afterwards there is
|
|
66
|
+
// nothing left to inspect.
|
|
67
|
+
const homeWasEmpty = (await readdir(home)).length === 0;
|
|
68
|
+
return { commit, steps: parseSteps(stdout), exitCode, homeWasEmpty };
|
|
69
|
+
}
|
|
70
|
+
finally {
|
|
71
|
+
await removeWorktree(git, repoRoot, checkout);
|
|
72
|
+
await pruneWorktrees(git, repoRoot);
|
|
73
|
+
await rm(checkout, { recursive: true, force: true });
|
|
74
|
+
await rm(home, { recursive: true, force: true });
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
async function runChild(checkout, env) {
|
|
78
|
+
const entry = process.argv[1];
|
|
79
|
+
if (entry === undefined)
|
|
80
|
+
throw new Error('cannot resolve this CLI\'s entry script to re-execute');
|
|
81
|
+
try {
|
|
82
|
+
const { stdout } = await execFileAsync(process.execPath, [entry, 'verify', '--json', '--root', checkout], { env });
|
|
83
|
+
return { stdout, exitCode: 0 };
|
|
84
|
+
}
|
|
85
|
+
catch (err) {
|
|
86
|
+
const failure = err;
|
|
87
|
+
return { stdout: failure.stdout ?? '', exitCode: typeof failure.code === 'number' ? failure.code : 1 };
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/** The child speaks the same JSON envelope every command does; anything else is reported as no steps. */
|
|
91
|
+
function parseSteps(stdout) {
|
|
92
|
+
try {
|
|
93
|
+
const steps = JSON.parse(stdout).data?.steps;
|
|
94
|
+
return Array.isArray(steps) ? steps : [];
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
return [];
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=isolated-run.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isolated-run.js","sourceRoot":"","sources":["../../../src/core/harness/isolated-run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAE3G,MAAM,aAAa,GAAG,S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E,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;IACjC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,OAAO,GAAG,GAAyC,CAAC;QAC1D,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE,EAAE,QAAQ,EAAE,OAAO,OAAO,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACzG,CAAC;AACH,CAAC;AAED,yGAAyG;AACzG,SAAS,UAAU,CAAC,MAAc;IAChC,IAAI,CAAC;QACH,MAAM,KAAK,GAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAoC,CAAC,IAAI,EAAE,KAAK,CAAC;QACjF,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAE,KAA8B,CAAC,CAAC,CAAC,EAAE,CAAC;IACrE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How this executable got onto the path — a FACT the CLI computes, so the
|
|
3
|
+
* upgrade skill can branch on it instead of shelling around to work it out in
|
|
4
|
+
* markdown, where it could not be tested (design.md D12).
|
|
5
|
+
*
|
|
6
|
+
* `undetermined` is a real third answer, never a synonym for `global`: a local
|
|
7
|
+
* dependency install is inside node_modules exactly like a global one, and
|
|
8
|
+
* telling its operator to run a global install would upgrade something other
|
|
9
|
+
* than the executable they are running. The skill stops on both non-global
|
|
10
|
+
* answers.
|
|
11
|
+
*/
|
|
12
|
+
export type InstallKind = 'global' | 'linked' | 'undetermined';
|
|
13
|
+
/**
|
|
14
|
+
* Pure so every layout is testable without installing anything. A path with no
|
|
15
|
+
* node_modules segment at all is a working copy — which is what `npm link` and
|
|
16
|
+
* a dev checkout both resolve to, because Node resolves the symlink before
|
|
17
|
+
* import.meta.url is derived.
|
|
18
|
+
*/
|
|
19
|
+
export declare function classifyInstallPath(binPath: string, execPath: string): InstallKind;
|
|
20
|
+
export interface InstallLocation {
|
|
21
|
+
path: string;
|
|
22
|
+
kind: InstallKind;
|
|
23
|
+
}
|
|
24
|
+
export declare function resolveInstallLocation(execPath: string): InstallLocation;
|
|
25
|
+
//# sourceMappingURL=install-kind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-kind.d.ts","sourceRoot":"","sources":["../../src/core/install-kind.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,cAAc,CAAC;AAwB/D;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,WAAW,CAMlF;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,WAAW,CAAC;CACnB;AAkBD,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,CAGxE"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
const NODE_MODULES = 'node_modules';
|
|
4
|
+
/**
|
|
5
|
+
* Global installs live under the Node prefix's node_modules:
|
|
6
|
+
* POSIX `<prefix>/lib/node_modules`, where execPath is `<prefix>/bin/node`;
|
|
7
|
+
* Windows `<dir of node.exe>/node_modules`.
|
|
8
|
+
*/
|
|
9
|
+
function globalRootsFor(execPath) {
|
|
10
|
+
const binDir = path.dirname(execPath);
|
|
11
|
+
const prefix = path.dirname(binDir);
|
|
12
|
+
return [
|
|
13
|
+
path.join(prefix, 'lib', NODE_MODULES),
|
|
14
|
+
path.join(prefix, NODE_MODULES),
|
|
15
|
+
path.join(binDir, NODE_MODULES),
|
|
16
|
+
];
|
|
17
|
+
}
|
|
18
|
+
function isUnder(child, parent) {
|
|
19
|
+
const relative = path.relative(parent, child);
|
|
20
|
+
return relative.length > 0 && !relative.startsWith('..') && !path.isAbsolute(relative);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Pure so every layout is testable without installing anything. A path with no
|
|
24
|
+
* node_modules segment at all is a working copy — which is what `npm link` and
|
|
25
|
+
* a dev checkout both resolve to, because Node resolves the symlink before
|
|
26
|
+
* import.meta.url is derived.
|
|
27
|
+
*/
|
|
28
|
+
export function classifyInstallPath(binPath, execPath) {
|
|
29
|
+
const resolved = path.resolve(binPath);
|
|
30
|
+
const segments = resolved.split(path.sep);
|
|
31
|
+
if (!segments.includes(NODE_MODULES))
|
|
32
|
+
return 'linked';
|
|
33
|
+
if (globalRootsFor(path.resolve(execPath)).some((root) => isUnder(resolved, root)))
|
|
34
|
+
return 'global';
|
|
35
|
+
return 'undetermined';
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The entrypoint of the process running right now.
|
|
39
|
+
*
|
|
40
|
+
* Deliberately NOT the thing resolve-hook-cli-at-runtime removed. That change
|
|
41
|
+
* deleted a baked path from *generated hook scripts*, which are written to disk
|
|
42
|
+
* and committed — so a path resolved when the file was generated is wrong on
|
|
43
|
+
* every other machine that later checks the store out. This resolves at the
|
|
44
|
+
* moment it is asked, is never written anywhere, and describes only the
|
|
45
|
+
* process asking. Reintroducing a persisted path here would be the antipattern;
|
|
46
|
+
* reporting the live one is what lets the upgrade skill tell whether
|
|
47
|
+
* `npm install -g` would affect the executable actually in use.
|
|
48
|
+
*/
|
|
49
|
+
function runningEntrypoint() {
|
|
50
|
+
return fileURLToPath(new URL('../bin.js', import.meta.url));
|
|
51
|
+
}
|
|
52
|
+
export function resolveInstallLocation(execPath) {
|
|
53
|
+
const binPath = runningEntrypoint();
|
|
54
|
+
return { path: binPath, kind: classifyInstallPath(binPath, execPath) };
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=install-k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I,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAAE,OAAO,QAAQ,CAAC;IACpG,OAAO,cAAc,CAAC;AACxB,CAAC;AAOD;;;;;;;;;;;GAWG;AACH,SAAS,iBAAiB;IACxB,OAAO,aAAa,CAAC,IAAI,GAAG,CAAC,WAAW,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,QAAgB;IACrD,MAAM,OAAO,GAAG,iBAAiB,EAAE,CAAC;IACpC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,CAAC;AACzE,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { StoreConfig } from '../config/schema.js';
|
|
2
|
+
import type { Finding } from './envelope.js';
|
|
3
|
+
/**
|
|
4
|
+
* standardize-note-templates: the note templates a store starts a note from.
|
|
5
|
+
*
|
|
6
|
+
* Two existing patterns, combined. Rendering follows `convention-doc.ts` — the
|
|
7
|
+
* prose is packaged markdown, substituted against the store's own configuration,
|
|
8
|
+
* so a vocabulary change reaches the templates rather than silently diverging
|
|
9
|
+
* from the graph that reads them. Ownership follows the vendored-skill half of
|
|
10
|
+
* `skills.ts` — a record with a content hash, not a marker in the file.
|
|
11
|
+
*
|
|
12
|
+
* The record, and not an in-file header, is the whole point (design D2): a
|
|
13
|
+
* template's bytes are copied into a note, so an "Owned by contexture" comment
|
|
14
|
+
* would appear at the top of every note the store ever writes. This module is
|
|
15
|
+
* deliberately separate from `skills.ts` for the same reason — the two ownership
|
|
16
|
+
* marks must not be confused.
|
|
17
|
+
*/
|
|
18
|
+
/** The record naming what contexture delivered, sibling to the templates it names. */
|
|
19
|
+
export declare const TEMPLATES_RECORD_FILE_NAME = ".ctxr-templates.json";
|
|
20
|
+
/**
|
|
21
|
+
* context-store spec: the placeholder vocabulary a template may carry,
|
|
22
|
+
* enumerated here and nowhere else. No command expands one — substitution is
|
|
23
|
+
* the agent's, as it starts the note — so this list exists to be CHECKED
|
|
24
|
+
* against, by the lint finding that reports a note which landed with a hole
|
|
25
|
+
* still in it.
|
|
26
|
+
*/
|
|
27
|
+
export declare const NOTE_TEMPLATE_PLACEHOLDERS: readonly ['{{title}}', '{{date}}'];
|
|
28
|
+
export interface NoteTemplateRecord {
|
|
29
|
+
/** Template name (no extension) -> sha256 of the rendered bytes contexture wrote. */
|
|
30
|
+
templates: Record<string, string>;
|
|
31
|
+
ctxrVersion?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The packaged template, normalized to exactly one trailing newline.
|
|
35
|
+
*
|
|
36
|
+
* Deliberately not a render: a template's content is fixed markdown, including
|
|
37
|
+
* its relation sections. Making those follow a per-store vocabulary was
|
|
38
|
+
* considered and dropped — it bought a configuration surface nobody had asked
|
|
39
|
+
* for, and the cost of the alternative is a heading a store does not use, which
|
|
40
|
+
* is inert. `config` stays in the signature because the sync below is
|
|
41
|
+
* config-scoped and a future template may legitimately need it.
|
|
42
|
+
*/
|
|
43
|
+
export declare function renderNoteTemplate(name: string, _config: StoreConfig): string;
|
|
44
|
+
/** Every template name contexture packages, whether or not a store installs it. */
|
|
45
|
+
export declare function packagedTemplateNames(): string[];
|
|
46
|
+
/**
|
|
47
|
+
* Brings every note template a store declares (`config.templates.installed`) to
|
|
48
|
+
* the packaged version rendered for this store, and removes a previously
|
|
49
|
+
* installed template the store no longer wants.
|
|
50
|
+
*
|
|
51
|
+
* The hash in the record decides everything: it matches, so contexture wrote
|
|
52
|
+
* what is on disk and may rewrite it; it does not, so an operator edited the
|
|
53
|
+
* file and it is left exactly as it is with a finding naming it. A file the
|
|
54
|
+
* record does not name is the store's own kind and is never read, rewritten, or
|
|
55
|
+
* removed.
|
|
56
|
+
*/
|
|
57
|
+
export declare function syncNoteTemplates(root: string, config: StoreConfig, ctxrVersion: string): Promise<{
|
|
58
|
+
changed: string[];
|
|
59
|
+
findings: Finding[];
|
|
60
|
+
}>;
|
|
61
|
+
//# sourceMappingURL=note-templates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"note-templates.d.ts","sourceRoot":"","sources":["../../src/core/note-templates.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAI7C;;;;;;;;;;;;;;GAcG;AAEH,sFAAsF;AACtF,eAAO,MAAM,0BAA0B,yBAAyB,CAAC;AAEjE;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,YAAI,WAAW,EAAE,UAAU,CAAU,CAAC;AAE7E,MAAM,WAAW,kBAAkB;IACjC,qFAAqF;IACrF,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAcD;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,MAAM,CAE7E;AAED,mFAAmF;AACnF,wBAAgB,qBAAqB,IAAI,MAAM,EAAE,CAEhD;AAqBD;;;;;;;;;;GAUG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,WAAW,EACnB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,OAAO,EAAE,CAAA;CAAE,CAAC,CAiErD"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { mkdir, readFile, readdir, rm } from 'node:fs/promises';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { DEFAULT_INSTALLED_TEMPLATES } from '../config/defaults.js';
|
|
5
|
+
import { writeFileAtomic } from './fs/atomic.js';
|
|
6
|
+
import { packagedTemplate } from './templates.js';
|
|
7
|
+
/**
|
|
8
|
+
* standardize-note-templates: the note templates a store starts a note from.
|
|
9
|
+
*
|
|
10
|
+
* Two existing patterns, combined. Rendering follows `convention-doc.ts` — the
|
|
11
|
+
* prose is packaged markdown, substituted against the store's own configuration,
|
|
12
|
+
* so a vocabulary change reaches the templates rather than silently diverging
|
|
13
|
+
* from the graph that reads them. Ownership follows the vendored-skill half of
|
|
14
|
+
* `skills.ts` — a record with a content hash, not a marker in the file.
|
|
15
|
+
*
|
|
16
|
+
* The record, and not an in-file header, is the whole point (design D2): a
|
|
17
|
+
* template's bytes are copied into a note, so an "Owned by contexture" comment
|
|
18
|
+
* would appear at the top of every note the store ever writes. This module is
|
|
19
|
+
* deliberately separate from `skills.ts` for the same reason — the two ownership
|
|
20
|
+
* marks must not be confused.
|
|
21
|
+
*/
|
|
22
|
+
/** The record naming what contexture delivered, sibling to the templates it names. */
|
|
23
|
+
export const TEMPLATES_RECORD_FILE_NAME = '.ctxr-templates.json';
|
|
24
|
+
/**
|
|
25
|
+
* context-store spec: the placeholder vocabulary a template may carry,
|
|
26
|
+
* enumerated here and nowhere else. No command expands one — substitution is
|
|
27
|
+
* the agent's, as it starts the note — so this list exists to be CHECKED
|
|
28
|
+
* against, by the lint finding that reports a note which landed with a hole
|
|
29
|
+
* still in it.
|
|
30
|
+
*/
|
|
31
|
+
export const NOTE_TEMPLATE_PLACEHOLDERS = ['{{title}}', '{{date}}'];
|
|
32
|
+
function sha256(text) {
|
|
33
|
+
return createHash('sha256').update(text, 'utf8').digest('hex');
|
|
34
|
+
}
|
|
35
|
+
async function readIfExists(absolutePath) {
|
|
36
|
+
try {
|
|
37
|
+
return await readFile(absolutePath, 'utf8');
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return undefined;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The packaged template, normalized to exactly one trailing newline.
|
|
45
|
+
*
|
|
46
|
+
* Deliberately not a render: a template's content is fixed markdown, including
|
|
47
|
+
* its relation sections. Making those follow a per-store vocabulary was
|
|
48
|
+
* considered and dropped — it bought a configuration surface nobody had asked
|
|
49
|
+
* for, and the cost of the alternative is a heading a store does not use, which
|
|
50
|
+
* is inert. `config` stays in the signature because the sync below is
|
|
51
|
+
* config-scoped and a future template may legitimately need it.
|
|
52
|
+
*/
|
|
53
|
+
export function renderNoteTemplate(name, _config) {
|
|
54
|
+
return `${packagedTemplate('notes', name).replace(/\n+$/, '')}\n`;
|
|
55
|
+
}
|
|
56
|
+
/** Every template name contexture packages, whether or not a store installs it. */
|
|
57
|
+
export function packagedTemplateNames() {
|
|
58
|
+
return [...PACKAGED_TEMPLATE_NAMES];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The library, enumerated once — the same list `DEFAULT_INSTALLED_TEMPLATES`
|
|
62
|
+
* names, because the shipped default is to install everything packaged. A name
|
|
63
|
+
* a store installs that is NOT here is the store's own file and is never
|
|
64
|
+
* touched; the record is what distinguishes the two.
|
|
65
|
+
*/
|
|
66
|
+
const PACKAGED_TEMPLATE_NAMES = DEFAULT_INSTALLED_TEMPLATES;
|
|
67
|
+
async function readRecord(templatesDir) {
|
|
68
|
+
const raw = await readIfExists(path.join(templatesDir, TEMPLATES_RECORD_FILE_NAME));
|
|
69
|
+
if (raw === undefined)
|
|
70
|
+
return undefined;
|
|
71
|
+
try {
|
|
72
|
+
const parsed = JSON.parse(raw);
|
|
73
|
+
return parsed.templates && typeof parsed.templates === 'object' ? parsed : undefined;
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
return undefined;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Brings every note template a store declares (`config.templates.installed`) to
|
|
81
|
+
* the packaged version rendered for this store, and removes a previously
|
|
82
|
+
* installed template the store no longer wants.
|
|
83
|
+
*
|
|
84
|
+
* The hash in the record decides everything: it matches, so contexture wrote
|
|
85
|
+
* what is on disk and may rewrite it; it does not, so an operator edited the
|
|
86
|
+
* file and it is left exactly as it is with a finding naming it. A file the
|
|
87
|
+
* record does not name is the store's own kind and is never read, rewritten, or
|
|
88
|
+
* removed.
|
|
89
|
+
*/
|
|
90
|
+
export async function syncNoteTemplates(root, config, ctxrVersion) {
|
|
91
|
+
const changed = [];
|
|
92
|
+
const findings = [];
|
|
93
|
+
const templatesDir = path.join(root, config.templates.path);
|
|
94
|
+
const packaged = new Set(PACKAGED_TEMPLATE_NAMES);
|
|
95
|
+
const wanted = config.templates.installed.filter((name) => packaged.has(name));
|
|
96
|
+
const previous = (await readRecord(templatesDir))?.templates ?? {};
|
|
97
|
+
const next = {};
|
|
98
|
+
function relative(name) {
|
|
99
|
+
return path.join(config.templates.path, `${name}.md`).split(path.sep).join('/');
|
|
100
|
+
}
|
|
101
|
+
for (const name of wanted) {
|
|
102
|
+
const target = path.join(templatesDir, `${name}.md`);
|
|
103
|
+
const onDisk = await readIfExists(target);
|
|
104
|
+
const recorded = previous[name];
|
|
105
|
+
if (onDisk !== undefined && recorded === undefined) {
|
|
106
|
+
// The record never named it, so it is the store's own file at a packaged
|
|
107
|
+
// name. Leave it alone rather than claiming it.
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
if (onDisk !== undefined && recorded !== undefined && sha256(onDisk) !== recorded) {
|
|
111
|
+
findings.push({
|
|
112
|
+
code: 'templates.locally_modified',
|
|
113
|
+
severity: 'warning',
|
|
114
|
+
message: `"${relative(name)}" has been modified locally — left unchanged rather than refreshed.`,
|
|
115
|
+
subject: name,
|
|
116
|
+
});
|
|
117
|
+
next[name] = recorded;
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
const rendered = renderNoteTemplate(name, config);
|
|
121
|
+
next[name] = sha256(rendered);
|
|
122
|
+
if (onDisk === rendered)
|
|
123
|
+
continue;
|
|
124
|
+
await mkdir(templatesDir, { recursive: true });
|
|
125
|
+
await writeFileAtomic(target, rendered);
|
|
126
|
+
changed.push(relative(name));
|
|
127
|
+
}
|
|
128
|
+
// A template the record names that the store no longer installs, or that
|
|
129
|
+
// contexture no longer packages: remove it when unmodified, report it when not.
|
|
130
|
+
for (const [name, recorded] of Object.entries(previous)) {
|
|
131
|
+
if (name in next)
|
|
132
|
+
continue;
|
|
133
|
+
const target = path.join(templatesDir, `${name}.md`);
|
|
134
|
+
const onDisk = await readIfExists(target);
|
|
135
|
+
if (onDisk === undefined)
|
|
136
|
+
continue;
|
|
137
|
+
if (sha256(onDisk) !== recorded) {
|
|
138
|
+
findings.push({
|
|
139
|
+
code: 'templates.locally_modified',
|
|
140
|
+
severity: 'warning',
|
|
141
|
+
message: `"${relative(name)}" is no longer installed but has been modified locally — left on disk rather than removed.`,
|
|
142
|
+
subject: name,
|
|
143
|
+
});
|
|
144
|
+
next[name] = recorded;
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
await rm(target, { force: true });
|
|
148
|
+
changed.push(relative(name));
|
|
149
|
+
}
|
|
150
|
+
await writeRecord(templatesDir, config, next, ctxrVersion, changed);
|
|
151
|
+
return { changed, findings };
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Byte-stable: the record is rewritten only when its content changes, so a
|
|
155
|
+
* second update in a row writes nothing at all. When nothing is installed and
|
|
156
|
+
* nothing was ever delivered, no record is written and no directory is created —
|
|
157
|
+
* a store that opts out entirely gets no artifact from this at all.
|
|
158
|
+
*/
|
|
159
|
+
async function writeRecord(templatesDir, config, templates, ctxrVersion, changed) {
|
|
160
|
+
const recordPath = path.join(templatesDir, TEMPLATES_RECORD_FILE_NAME);
|
|
161
|
+
const sorted = Object.fromEntries(Object.entries(templates).sort(([a], [b]) => a.localeCompare(b)));
|
|
162
|
+
const existing = await readIfExists(recordPath);
|
|
163
|
+
if (Object.keys(sorted).length === 0) {
|
|
164
|
+
if (existing !== undefined) {
|
|
165
|
+
await rm(recordPath, { force: true });
|
|
166
|
+
changed.push(path.join(config.templates.path, TEMPLATES_RECORD_FILE_NAME).split(path.sep).join('/'));
|
|
167
|
+
await rmdirIfEmpty(templatesDir);
|
|
168
|
+
}
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
const content = `${JSON.stringify({ templates: sorted, ctxrVersion }, null, 2)}\n`;
|
|
172
|
+
if (existing === content)
|
|
173
|
+
return;
|
|
174
|
+
await mkdir(templatesDir, { recursive: true });
|
|
175
|
+
await writeFileAtomic(recordPath, content);
|
|
176
|
+
changed.push(path.join(config.templates.path, TEMPLATES_RECORD_FILE_NAME).split(path.sep).join('/'));
|
|
177
|
+
}
|
|
178
|
+
/** Leaves no empty directory behind when a store opts out of every template. */
|
|
179
|
+
async function rmdirIfEmpty(dir) {
|
|
180
|
+
try {
|
|
181
|
+
if ((await readdir(dir)).length === 0)
|
|
182
|
+
await rm(dir, { recursive: true, force: true });
|
|
183
|
+
}
|
|
184
|
+
catch {
|
|
185
|
+
// never existed, or is not ours to remove
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
//# sourceMappingURL=note-templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"note-templates.js","sourceRoot":"","sources":["../../src/core/note-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAGpE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;;;;;;;;;;;;GAcG;AAEH,sFAAsF;AACtF,MAAM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AE,KAAK,GAAE,SAAc,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAO9G"}
|
package/dist/core/notes/list.js
CHANGED
|
@@ -50,6 +50,11 @@ export function excludedPrefixesFor(config) {
|
|
|
50
50
|
// Tool-owned instruction docs (skills, guidance) are never notes, wherever they live.
|
|
51
51
|
config.harness.skills_path,
|
|
52
52
|
config.harness.guidance_path,
|
|
53
|
+
// standardize-note-templates: a note template is the shape a note starts
|
|
54
|
+
// from, never a note itself (context-store spec). Listed explicitly rather
|
|
55
|
+
// than relying on the default path sitting inside `.contexture/`, so the
|
|
56
|
+
// exclusion follows a store that configures the path elsewhere.
|
|
57
|
+
config.templates.path,
|
|
53
58
|
];
|
|
54
59
|
}
|
|
55
60
|
async function walk(dir, root, excludePrefixes, skipRootFiles, results) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/core/notes/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAcvC,wGAAwG;AACxG,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;AAElE;;;;;;;;;GASG;AACH,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;AAEjD;;;;;GAKG;AACH,SAAS,iBAAiB,CAAC,MAAmB;IAC5C,IAAI,CAAC;QACH,OAAO,IAAI,GAAG,CACZ,kBAAkB,CAAC,MAAM,EAAE,oBAAoB,CAAC;aAC7C,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE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GAAa,EAAE,CAAC;IACnC,MAAM,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,GAAG,EAAE,EAAE,aAAa,CAAC,CAAC;IACjE,aAAa,CAAC,IAAI,EAAE,CAAC;IACrB,OAAO,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;AACvH,CAAC;AAED,wGAAwG;AACxG,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,SAAiB,EAAE,MAAmB,EAAE,KAAK,GAAc,EAAE;IAC3F,MAAM,aAAa,GAAa,EAAE,CAAC;IACnC,MAAM,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,mBAAmB,CAAC,MAAM,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC,CAAC;IACxG,aAAa,CAAC,IAAI,EAAE,CAAC;IAErB,MAAM,MAAM,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,WAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC;IAC1H,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;AAChH,CAAC"}
|
|
@@ -5,8 +5,11 @@ export interface ScriptSyntaxError {
|
|
|
5
5
|
/**
|
|
6
6
|
* publish spec: the sole spawn site for `node --check` (single-source-
|
|
7
7
|
* literals guard), the same discipline core/git/exec.ts applies to git and
|
|
8
|
-
*
|
|
9
|
-
* external
|
|
8
|
+
* core/harness/isolated-run.ts applies to re-executing this CLI — one
|
|
9
|
+
* dedicated module per external process, never ad hoc subprocess spawning
|
|
10
|
+
* scattered across commands. (The former gh spawn site went with the forge
|
|
11
|
+
* adapter; nothing in src/ spawns gh, and the portability test only resolves
|
|
12
|
+
* it on PATH.)
|
|
10
13
|
*/
|
|
11
14
|
export declare function checkScriptSyntax(scripts: readonly string[]): Promise<ScriptSyntaxError[]>;
|
|
12
15
|
//# sourceMappingURL=script-check.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"script-check.d.ts","sourceRoot":"","sources":["../../../src/core/publish/script-check.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED
|
|
1
|
+
{"version":3,"file":"script-check.d.ts","sourceRoot":"","sources":["../../../src/core/publish/script-check.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAuBhG"}
|
|
@@ -7,8 +7,11 @@ const execFileAsync = promisify(execFile);
|
|
|
7
7
|
/**
|
|
8
8
|
* publish spec: the sole spawn site for `node --check` (single-source-
|
|
9
9
|
* literals guard), the same discipline core/git/exec.ts applies to git and
|
|
10
|
-
*
|
|
11
|
-
* external
|
|
10
|
+
* core/harness/isolated-run.ts applies to re-executing this CLI — one
|
|
11
|
+
* dedicated module per external process, never ad hoc subprocess spawning
|
|
12
|
+
* scattered across commands. (The former gh spawn site went with the forge
|
|
13
|
+
* adapter; nothing in src/ spawns gh, and the portability test only resolves
|
|
14
|
+
* it on PATH.)
|
|
12
15
|
*/
|
|
13
16
|
export async function checkScriptSyntax(scripts) {
|
|
14
17
|
if (scripts.length === 0)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"script-check.js","sourceRoot":"","sources":["../../../src/core/publish/script-check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAO1C
|
|
1
|
+
{"version":3,"file":"script-check.js","sourceRoot":"","sources":["../../../src/core/publish/script-check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAO1C;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,OAA0B;IAChE,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEpC,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,qBAAqB,CAAC,CAAC,CAAC;IACtE,IAAI,CAAC;QACH,MAAM,MAAM,GAAwB,EAAE,CAAC;QACvC,KAAK,MAAM,CAAC,KAAK,EAAE,MAAM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