@intentius/chant 0.72.3 → 0.72.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/init.d.ts +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/handlers/init.d.ts.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/mcp/server.d.ts +10 -0
- package/dist/cli/mcp/server.d.ts.map +1 -1
- package/dist/cli/mcp-config.d.ts +47 -0
- package/dist/cli/mcp-config.d.ts.map +1 -0
- package/dist/cli/registry.d.ts +6 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/discovery/sandbox/fork.d.ts +0 -5
- package/dist/discovery/sandbox/fork.d.ts.map +1 -1
- package/dist/observation.d.ts +0 -1
- package/dist/observation.d.ts.map +1 -1
- package/dist/op/activities/converge.d.ts +16 -0
- package/dist/op/activities/converge.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/cli/commands/doctor.ts +18 -6
- package/src/cli/commands/init.ts +9 -68
- package/src/cli/commands/update.ts +9 -0
- package/src/cli/handlers/init.ts +1 -0
- package/src/cli/main.ts +5 -0
- package/src/cli/mcp/docs-parity.test.ts +133 -0
- package/src/cli/mcp/server.ts +5 -1
- package/src/cli/mcp-config.test.ts +168 -0
- package/src/cli/mcp-config.ts +76 -0
- package/src/cli/registry.ts +6 -0
- package/src/discovery/sandbox/fork-diagnostic.test.ts +117 -0
- package/src/discovery/sandbox/fork.ts +92 -6
- package/src/observation.ts +27 -8
- package/src/op/activities/converge-push.test.ts +101 -0
- package/src/op/activities/converge.ts +31 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/doctor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/doctor.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CA+SvE"}
|
|
@@ -12,7 +12,7 @@ export interface InitOptions {
|
|
|
12
12
|
template?: string;
|
|
13
13
|
/** Force init even in non-empty directory */
|
|
14
14
|
force?: boolean;
|
|
15
|
-
/** Skip
|
|
15
|
+
/** Skip writing the project's `.mcp.json` (`--skip-mcp`) */
|
|
16
16
|
skipMcp?: boolean;
|
|
17
17
|
/** Skip interactive install prompt */
|
|
18
18
|
skipInstall?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAQA,wEAAwE;AACxE,wBAAgB,eAAe,IAAI,MAAM,CAQxC;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAQA,wEAAwE;AACxE,wBAAgB,eAAe,IAAI,MAAM,CAQxC;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sCAAsC;IACtC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,6BAA6B;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,oBAAoB;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,uBAAuB;IACvB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAuKD;;GAEG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CA2M3E;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,UAAU,EAClB,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAChD,OAAO,CAAC,IAAI,CAAC,CAyCf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/update.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/update.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,+BAA+B;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,mBAAmB;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,uBAAuB;IACvB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAqED;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CA8FjF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAkB5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/init.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,wBAAsB,OAAO,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/init.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,wBAAsB,OAAO,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAuBlE;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAoBzE"}
|
package/dist/cli/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AAMA,OAAO,EAAkB,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AAMA,OAAO,EAAkB,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AA0F9E;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CA0WpD;AA+bD;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,UAAU,EAmGvC,CAAC;AAqIF;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB5E"}
|
package/dist/cli/mcp/server.d.ts
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import type { LexiconPlugin } from "../../lexicon.js";
|
|
2
2
|
import type { McpRequest, McpResponse } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Protocol versions this server understands, newest first. `initialize` and
|
|
5
|
+
* `server/discover` both negotiate against this list rather than assuming
|
|
6
|
+
* the client's revision (#1194).
|
|
7
|
+
*
|
|
8
|
+
* Exported because `docs-parity.test.ts` reads it: `cli/mcp.mdx` states these
|
|
9
|
+
* revisions in prose, and stating them twice is how the page came to claim
|
|
10
|
+
* 2024-11-05 for two releases after this list moved past it (#2385).
|
|
11
|
+
*/
|
|
12
|
+
export declare const SUPPORTED_PROTOCOL_VERSIONS: readonly ["2026-07-28", "2024-11-05"];
|
|
3
13
|
/**
|
|
4
14
|
* Pick the protocol version to answer with: the client's requested version
|
|
5
15
|
* when we support it, otherwise our latest. A 2024-11-05 client that asks
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/cli/mcp/server.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAmE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/cli/mcp/server.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,E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,QAAQ;IAiCtB;;OAEG;YACW,eAAe;IAyC7B;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAsC7B;AAED;;GAEG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAYpD"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one place chant decides where a project's MCP server registration
|
|
3
|
+
* lives, what goes in it, and which command writes it (chant #2383).
|
|
4
|
+
*
|
|
5
|
+
* Before this module the three sites disagreed: `chant init` wrote
|
|
6
|
+
* `mcp.json` into the user's home directory (picking a harness directory
|
|
7
|
+
* that happened to exist), `chant doctor` looked for `<project>/.mcp.json`,
|
|
8
|
+
* and the doctor's remediation named `chant agent setup`, which was never
|
|
9
|
+
* registered in `./main.ts`. A project chant had just scaffolded therefore
|
|
10
|
+
* failed chant's own doctor, and the fix the warning named could not be run.
|
|
11
|
+
*
|
|
12
|
+
* Project scope wins. The file versions with the project it describes, it
|
|
13
|
+
* keeps `chant init <dir>` from writing outside `<dir>`, and it is already
|
|
14
|
+
* what `../agents/discover.ts` treats as the project-scope location when
|
|
15
|
+
* chant audits an agent installation it did not create. Every consumer must
|
|
16
|
+
* go through the constants here rather than rebuilding the path, so the
|
|
17
|
+
* three sites cannot drift apart again without the shared test in
|
|
18
|
+
* ./mcp-config.test.ts noticing.
|
|
19
|
+
*/
|
|
20
|
+
/** Filename of the project-scoped MCP server registration. */
|
|
21
|
+
export declare const MCP_CONFIG_FILENAME = ".mcp.json";
|
|
22
|
+
/**
|
|
23
|
+
* The command a user runs to (re)write a missing {@link MCP_CONFIG_FILENAME}
|
|
24
|
+
* in an existing project. `chant init` also writes it, but init refuses a
|
|
25
|
+
* non-empty directory without `--force`, so the remediation an already
|
|
26
|
+
* scaffolded project needs is `chant update` — which is also what the
|
|
27
|
+
* doctor's neighbouring skills check tells you to run for the same reason.
|
|
28
|
+
* Kept as a constant so ./mcp-config.test.ts can assert it is a command
|
|
29
|
+
* `commandRegistry` actually registers.
|
|
30
|
+
*/
|
|
31
|
+
export declare const MCP_SETUP_COMMAND = "chant update";
|
|
32
|
+
/** Absolute (or caller-relative) path to a project's MCP config. */
|
|
33
|
+
export declare function mcpConfigPath(projectDir: string): string;
|
|
34
|
+
/**
|
|
35
|
+
* Detect whether a project uses bun or npm, from its lock file. Lives here
|
|
36
|
+
* because the package manager is the only variable in the generated config.
|
|
37
|
+
*/
|
|
38
|
+
export declare function detectPackageManager(dir?: string): "bun" | "npm";
|
|
39
|
+
/** The MCP registration chant writes: one stdio server named `chant`. */
|
|
40
|
+
export declare function generateMcpConfig(pm: "bun" | "npm"): string;
|
|
41
|
+
/**
|
|
42
|
+
* Write `<projectDir>/.mcp.json` unless one is already there. Returns the
|
|
43
|
+
* relative path when a file was created, `undefined` when an existing config
|
|
44
|
+
* was left alone — callers report that difference to the user.
|
|
45
|
+
*/
|
|
46
|
+
export declare function writeProjectMcpConfig(projectDir: string): string | undefined;
|
|
47
|
+
//# sourceMappingURL=mcp-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-config.d.ts","sourceRoot":"","sources":["../../src/cli/mcp-config.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,8DAA8D;AAC9D,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAE/C;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,iBAAiB,CAAC;AAEhD,oEAAoE;AACpE,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,KAAK,CAGhE;AAED,yEAAyE;AACzE,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAW3D;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAK5E"}
|
package/dist/cli/registry.d.ts
CHANGED
|
@@ -100,6 +100,12 @@ export interface ParsedArgs {
|
|
|
100
100
|
reportFile?: string;
|
|
101
101
|
/** `chant init --skill <name>` filter (added in #95 commit) */
|
|
102
102
|
skill?: string;
|
|
103
|
+
/**
|
|
104
|
+
* `chant init --skip-mcp` (#2383) — scaffold without writing the project's
|
|
105
|
+
* `.mcp.json`. The option existed on `InitOptions` and was documented long
|
|
106
|
+
* before anything parsed it, so there was no way to decline the write.
|
|
107
|
+
*/
|
|
108
|
+
skipMcp?: boolean;
|
|
103
109
|
/** `chant import --type <ResourceType>` selector */
|
|
104
110
|
selectType?: string;
|
|
105
111
|
/** `chant import --name <name>` selector */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/cli/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uEAAuE;IACvE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;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UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,eAAe,GAAG,IAAI,CAiB/F"}
|
|
@@ -86,10 +86,5 @@ export interface SandboxForkOptions {
|
|
|
86
86
|
*/
|
|
87
87
|
send?: Record<string, unknown>;
|
|
88
88
|
}
|
|
89
|
-
/**
|
|
90
|
-
* Fork `bundlePath` under `--permission` with a scrubbed environment, and
|
|
91
|
-
* resolve with the first IPC message that satisfies `isResponse` (or reject
|
|
92
|
-
* on crash / timeout / fork error).
|
|
93
|
-
*/
|
|
94
89
|
export declare function forkSandboxed<T>(options: SandboxForkOptions, isResponse: (value: unknown) => value is T): Promise<T>;
|
|
95
90
|
//# sourceMappingURL=fork.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fork.d.ts","sourceRoot":"","sources":["../../../src/discovery/sandbox/fork.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,MAAM,WAAW,kBAAkB;IACjC,sEAAsE;IACtE,UAAU,EAAE,MAAM,CAAC;IACnB,6FAA6F;IAC7F,SAAS,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,eAAe,EAAE,MAAM,CAAC;IACxB,6IAA6I;IAC7I,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC;;;;;OAKG;IACH,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,0EAA0E;IAC1E,SAAS,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;;;;;;;;;;;;OAkBG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;;;;;;;;;;;;OAgBG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;
|
|
1
|
+
{"version":3,"file":"fork.d.ts","sourceRoot":"","sources":["../../../src/discovery/sandbox/fork.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,MAAM,WAAW,kBAAkB;IACjC,sEAAsE;IACtE,UAAU,EAAE,MAAM,CAAC;IACnB,6FAA6F;IAC7F,SAAS,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,eAAe,EAAE,MAAM,CAAC;IACxB,6IAA6I;IAC7I,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC;;;;;OAKG;IACH,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,0EAA0E;IAC1E,SAAS,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;;;;;;;;;;;;OAkBG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;;;;;;;;;;;;OAgBG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAqHD,wBAAgB,aAAa,CAAC,CAAC,EAC7B,OAAO,EAAE,kBAAkB,EAC3B,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,KAAK,IAAI,CAAC,GACzC,OAAO,CAAC,CAAC,CAAC,CAiGZ"}
|
package/dist/observation.d.ts
CHANGED
|
@@ -49,7 +49,6 @@ import type { ResourceMetadata } from "./lexicon.js";
|
|
|
49
49
|
* declared resource that exists but is foreign must not classify as `create`.
|
|
50
50
|
*/
|
|
51
51
|
export type UnobservedReason = "read-failed" | "no-credentials" | "no-binding" | "unsupported-kind" | "filtered";
|
|
52
|
-
/** Every legal {@link UnobservedReason}, for validation and conformance checks. */
|
|
53
52
|
export declare const UNOBSERVED_REASONS: readonly UnobservedReason[];
|
|
54
53
|
/** True when `value` is a legal {@link UnobservedReason}. */
|
|
55
54
|
export declare function isUnobservedReason(value: unknown): value is UnobservedReason;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observation.d.ts","sourceRoot":"","sources":["../src/observation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAElD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,gBAAgB,GAChB,YAAY,GACZ,kBAAkB,GAClB,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"observation.d.ts","sourceRoot":"","sources":["../src/observation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAElD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,gBAAgB,GAChB,YAAY,GACZ,kBAAkB,GAClB,UAAU,CAAC;AA0Bf,eAAO,MAAM,kBAAkB,EAAE,SAAS,gBAAgB,EAEnC,CAAC;AAExB,6DAA6D;AAC7D,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAE5E;AAED,kEAAkE;AAClE,MAAM,WAAW,gBAAgB;IAC/B,kGAAkG;IAClG,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,MAAM,EAAE,gBAAgB,CAAC;IACzB,qGAAqG;IACrG,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,2GAA2G;IAC3G,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC;IAC3B,oDAAoD;IACpD,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC5C,+GAA+G;IAC/G,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;I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E,EACnC,OAAO,EAAE,eAAe,CAAC,MAAM,CAAC,GAC/B,OAAO,CAAC,iBAAiB,CAAC,CAsD5B"}
|
|
@@ -47,6 +47,22 @@ export interface ConvergeTickResult {
|
|
|
47
47
|
gated: number;
|
|
48
48
|
/** The one human-readable summary line this tick produced. */
|
|
49
49
|
log: string;
|
|
50
|
+
/**
|
|
51
|
+
* Whether this tick's ledger record reached the remote (chant#2337).
|
|
52
|
+
*
|
|
53
|
+
* The append is local-first and always lands, so the tick's own result is
|
|
54
|
+
* correct either way — this says whether anyone else can see it. Before
|
|
55
|
+
* this, the push was `.catch(() => undefined)` and the tick reported success
|
|
56
|
+
* whether or not the record left the machine, which is the last instance of
|
|
57
|
+
* the idiom #2310 was filed about.
|
|
58
|
+
*
|
|
59
|
+
* Softer than the gate's version of the same bug (#2336): a lost tick record
|
|
60
|
+
* is an informational log rather than an approval, so nobody is stranded
|
|
61
|
+
* waiting on a fact they cannot see. It is still not success.
|
|
62
|
+
*/
|
|
63
|
+
pushed: boolean;
|
|
64
|
+
/** Why the record did not reach the remote, when `pushed` is false. */
|
|
65
|
+
pushWarning?: string;
|
|
50
66
|
}
|
|
51
67
|
/**
|
|
52
68
|
* Cap a subprocess failure's raw output to one sanitized line — a ledger
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"converge.d.ts","sourceRoot":"","sources":["../../../src/op/activities/converge.ts"],"names":[],"mappings":"AAkCA,OAAO,EAEL,KAAK,YAAY,EAGlB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEzE,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChF,OAAO,EAKL,kBAAkB,EAClB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACxB,MAAM,iCAAiC,CAAC;AAQzC,+JAA+J;AAC/J,MAAM,MAAM,sBAAsB,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;A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AWrB;AAaD;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,EAAE,mBAAmB,EAAE,CAAC;CACjC;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,sBAAsB,EAAE,EAC/B,YAAY,EAAE,kBAAkB,EAAE,EAClC,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAC9B,MAAM,EAAE,MAAM,GACb,gBAAgB,CAmDlB;AAoBD,wBAAsB,YAAY,CAAC,IAAI,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAuG5G"}
|
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@ import { fileURLToPath } from "url";
|
|
|
5
5
|
import { checkVersionCompatibility } from "../../lexicon-manifest";
|
|
6
6
|
import { debug } from "../debug";
|
|
7
7
|
import { loadPlugins, resolveProjectLexicons } from "../plugins";
|
|
8
|
+
import { MCP_CONFIG_FILENAME, MCP_SETUP_COMMAND, mcpConfigPath } from "../mcp-config";
|
|
8
9
|
import { loadCapabilityPlugin } from "../../components/capability-plugin-loader";
|
|
9
10
|
import { isCapabilityPlugin } from "../../components/capability-plugin";
|
|
10
11
|
|
|
@@ -209,21 +210,32 @@ export async function doctorCommand(path: string): Promise<DoctorReport> {
|
|
|
209
210
|
}
|
|
210
211
|
}
|
|
211
212
|
|
|
212
|
-
// Check 9:
|
|
213
|
-
|
|
213
|
+
// Check 9: the project's MCP config exists and has a chant entry. Path and
|
|
214
|
+
// remediation both come from ../mcp-config.ts, so this check cannot drift
|
|
215
|
+
// away from what `chant init` and `chant update` write, and cannot name a
|
|
216
|
+
// command the registry does not have (chant #2383).
|
|
217
|
+
const mcpPath = mcpConfigPath(projectPath);
|
|
214
218
|
if (!existsSync(mcpPath)) {
|
|
215
|
-
checks.push({
|
|
219
|
+
checks.push({
|
|
220
|
+
name: "mcp-config",
|
|
221
|
+
status: "warn",
|
|
222
|
+
message: `${MCP_CONFIG_FILENAME} not found — run ${MCP_SETUP_COMMAND}`,
|
|
223
|
+
});
|
|
216
224
|
} else {
|
|
217
225
|
try {
|
|
218
226
|
const mcp = JSON.parse(readFileSync(mcpPath, "utf-8"));
|
|
219
227
|
if (!mcp.mcpServers?.chant) {
|
|
220
|
-
checks.push({
|
|
228
|
+
checks.push({
|
|
229
|
+
name: "mcp-config",
|
|
230
|
+
status: "warn",
|
|
231
|
+
message: `${MCP_CONFIG_FILENAME} missing mcpServers.chant entry — run ${MCP_SETUP_COMMAND}`,
|
|
232
|
+
});
|
|
221
233
|
} else {
|
|
222
234
|
checks.push({ name: "mcp-config", status: "pass" });
|
|
223
235
|
}
|
|
224
236
|
} catch (e) {
|
|
225
|
-
debug(
|
|
226
|
-
checks.push({ name: "mcp-config", status: "fail", message:
|
|
237
|
+
debug(`${MCP_CONFIG_FILENAME} parse failed:`, e);
|
|
238
|
+
checks.push({ name: "mcp-config", status: "fail", message: `${MCP_CONFIG_FILENAME} is invalid JSON` });
|
|
227
239
|
}
|
|
228
240
|
}
|
|
229
241
|
|
package/src/cli/commands/init.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, writeFileSync, readdirSync, readFileSync } from "fs";
|
|
2
2
|
import { join, resolve, dirname } from "path";
|
|
3
3
|
import { fileURLToPath } from "url";
|
|
4
|
-
import { homedir } from "os";
|
|
5
4
|
import { createInterface } from "readline";
|
|
6
5
|
import { formatSuccess, formatWarning } from "../format";
|
|
7
6
|
import { loadPlugin } from "../plugins";
|
|
7
|
+
import { MCP_CONFIG_FILENAME, detectPackageManager, generateMcpConfig, mcpConfigPath } from "../mcp-config";
|
|
8
8
|
|
|
9
9
|
/** Read the current chant package version from our own package.json. */
|
|
10
10
|
export function getChantVersion(): string {
|
|
@@ -29,7 +29,7 @@ export interface InitOptions {
|
|
|
29
29
|
template?: string;
|
|
30
30
|
/** Force init even in non-empty directory */
|
|
31
31
|
force?: boolean;
|
|
32
|
-
/** Skip
|
|
32
|
+
/** Skip writing the project's `.mcp.json` (`--skip-mcp`) */
|
|
33
33
|
skipMcp?: boolean;
|
|
34
34
|
/** Skip interactive install prompt */
|
|
35
35
|
skipInstall?: boolean;
|
|
@@ -55,46 +55,6 @@ export interface InitResult {
|
|
|
55
55
|
error?: string;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
/**
|
|
59
|
-
* Detect whether the user's project uses bun or npm.
|
|
60
|
-
* Checks for lock files.
|
|
61
|
-
*/
|
|
62
|
-
function detectPackageManager(dir?: string): "bun" | "npm" {
|
|
63
|
-
if (dir && (existsSync(join(dir, "bun.lockb")) || existsSync(join(dir, "bun.lock")))) return "bun";
|
|
64
|
-
return "npm";
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Detect the IDE environment for MCP config
|
|
69
|
-
*/
|
|
70
|
-
function detectIdeEnvironment(): "claude-code" | "cursor" | "generic" {
|
|
71
|
-
// Check for Claude Code
|
|
72
|
-
if (existsSync(join(homedir(), ".claude"))) {
|
|
73
|
-
return "claude-code";
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// Check for Cursor
|
|
77
|
-
if (existsSync(join(homedir(), ".cursor"))) {
|
|
78
|
-
return "cursor";
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
return "generic";
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Get MCP config directory based on IDE
|
|
86
|
-
*/
|
|
87
|
-
function getMcpConfigDir(ide: "claude-code" | "cursor" | "generic"): string {
|
|
88
|
-
switch (ide) {
|
|
89
|
-
case "claude-code":
|
|
90
|
-
return join(homedir(), ".claude");
|
|
91
|
-
case "cursor":
|
|
92
|
-
return join(homedir(), ".cursor");
|
|
93
|
-
default:
|
|
94
|
-
return join(homedir(), ".config", "mcp");
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
58
|
/**
|
|
99
59
|
* Generate package.json content
|
|
100
60
|
*/
|
|
@@ -224,22 +184,6 @@ export interface ChantConfig {
|
|
|
224
184
|
`;
|
|
225
185
|
}
|
|
226
186
|
|
|
227
|
-
/**
|
|
228
|
-
* Generate MCP config
|
|
229
|
-
*/
|
|
230
|
-
function generateMcpConfig(pm: "bun" | "npm"): string {
|
|
231
|
-
const config = {
|
|
232
|
-
mcpServers: {
|
|
233
|
-
chant: {
|
|
234
|
-
command: pm === "bun" ? "bunx" : "npx",
|
|
235
|
-
args: ["chant", "serve", "mcp"],
|
|
236
|
-
},
|
|
237
|
-
},
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
return JSON.stringify(config, null, 2);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
187
|
/**
|
|
244
188
|
* Prompt user for install
|
|
245
189
|
*/
|
|
@@ -441,19 +385,16 @@ export async function initCommand(options: InitOptions): Promise<InitResult> {
|
|
|
441
385
|
warnings,
|
|
442
386
|
);
|
|
443
387
|
|
|
444
|
-
// Generate MCP config
|
|
388
|
+
// Generate the project's MCP config. It lands in the directory init was
|
|
389
|
+
// pointed at, like everything else init produces, and at the path
|
|
390
|
+
// `chant doctor` checks — see ../mcp-config.ts for why project scope, and
|
|
391
|
+
// chant #2383 for the three-way disagreement that came of writing it into
|
|
392
|
+
// the user's home directory instead.
|
|
445
393
|
if (!options.skipMcp) {
|
|
446
|
-
const ide = detectIdeEnvironment();
|
|
447
|
-
const mcpDir = getMcpConfigDir(ide);
|
|
448
|
-
|
|
449
|
-
if (!existsSync(mcpDir)) {
|
|
450
|
-
mkdirSync(mcpDir, { recursive: true });
|
|
451
|
-
}
|
|
452
|
-
|
|
453
394
|
writeIfNotExists(
|
|
454
|
-
|
|
395
|
+
mcpConfigPath(targetDir),
|
|
455
396
|
generateMcpConfig(detectPackageManager(targetDir)),
|
|
456
|
-
|
|
397
|
+
MCP_CONFIG_FILENAME,
|
|
457
398
|
createdFiles,
|
|
458
399
|
warnings,
|
|
459
400
|
);
|
|
@@ -4,6 +4,7 @@ import { createRequire } from "module";
|
|
|
4
4
|
import { formatSuccess, formatWarning, formatError } from "../format";
|
|
5
5
|
import { loadChantConfig } from "../../config";
|
|
6
6
|
import { loadPlugins } from "../plugins";
|
|
7
|
+
import { writeProjectMcpConfig } from "../mcp-config";
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Update command options
|
|
@@ -178,6 +179,14 @@ export async function updateCommand(options: UpdateOptions): Promise<UpdateResul
|
|
|
178
179
|
warnings.push("Could not load plugins for skill installation");
|
|
179
180
|
}
|
|
180
181
|
|
|
182
|
+
// Restore the project's MCP registration if it went missing. This is what
|
|
183
|
+
// makes the doctor's `mcp-config` remediation runnable: `chant init`
|
|
184
|
+
// refuses a non-empty directory without --force, so an already scaffolded
|
|
185
|
+
// project needs some other command to put the file back, and this is the
|
|
186
|
+
// same command the doctor's skills check already points at (chant #2383).
|
|
187
|
+
const writtenMcp = writeProjectMcpConfig(projectDir);
|
|
188
|
+
if (writtenMcp) synced.push(writtenMcp);
|
|
189
|
+
|
|
181
190
|
return {
|
|
182
191
|
success: true,
|
|
183
192
|
synced,
|
package/src/cli/handlers/init.ts
CHANGED
|
@@ -19,6 +19,7 @@ export async function runInit(ctx: CommandContext): Promise<number> {
|
|
|
19
19
|
template: args.template,
|
|
20
20
|
skill: args.skill,
|
|
21
21
|
force: args.force,
|
|
22
|
+
skipMcp: args.skipMcp,
|
|
22
23
|
skipInstall: true,
|
|
23
24
|
});
|
|
24
25
|
await printInitResult(result, { skipInstall: false, cwd: args.path });
|
package/src/cli/main.ts
CHANGED
|
@@ -91,6 +91,7 @@ const BOOLEAN_FLAGS = new Set([
|
|
|
91
91
|
"--check-snapshot",
|
|
92
92
|
"--fail-on-drift",
|
|
93
93
|
"--durable-requests",
|
|
94
|
+
"--skip-mcp",
|
|
94
95
|
]);
|
|
95
96
|
|
|
96
97
|
/**
|
|
@@ -132,6 +133,7 @@ export function parseArgs(args: string[]): ParsedArgs {
|
|
|
132
133
|
useComposites: false,
|
|
133
134
|
reportFile: undefined,
|
|
134
135
|
skill: undefined,
|
|
136
|
+
skipMcp: undefined,
|
|
135
137
|
src: undefined,
|
|
136
138
|
env: undefined,
|
|
137
139
|
};
|
|
@@ -252,6 +254,8 @@ export function parseArgs(args: string[]): ParsedArgs {
|
|
|
252
254
|
result.useComposites = true;
|
|
253
255
|
} else if (arg === "--skill") {
|
|
254
256
|
result.skill = args[++i];
|
|
257
|
+
} else if (arg === "--skip-mcp") {
|
|
258
|
+
result.skipMcp = true;
|
|
255
259
|
} else if (arg === "--src") {
|
|
256
260
|
result.src = args[++i];
|
|
257
261
|
} else if (arg === "--env") {
|
|
@@ -691,6 +695,7 @@ Options:
|
|
|
691
695
|
\`environments\` when declared.
|
|
692
696
|
-t, --template <name> Init template (e.g. node-pipeline, docker-build)
|
|
693
697
|
--skill <name> Init: install only this skill from the lexicon
|
|
698
|
+
--skip-mcp Init: scaffold without writing the project's .mcp.json
|
|
694
699
|
--fix Auto-fix fixable issues (lint command)
|
|
695
700
|
--force Force overwrite existing files (import command)
|
|
696
701
|
-w, --watch Watch for changes and rebuild/re-lint (build, lint)
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { describe, test, expect } from "vitest";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import { McpServer, SUPPORTED_PROTOCOL_VERSIONS } from "./server";
|
|
6
|
+
import type { ToolDefinition, ResourceDefinition } from "./types";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The MCP docs say what this server offers; this test says they are right.
|
|
10
|
+
*
|
|
11
|
+
* `docs/src/content/docs/cli/mcp.mdx` is a hand-written list of tools,
|
|
12
|
+
* resources, methods and protocol revisions, and the server is the thing that
|
|
13
|
+
* actually registers them. Nothing connected the two, so the page fell two
|
|
14
|
+
* revisions behind twice over (#2385): it advertised six tools while the
|
|
15
|
+
* constructor registered thirteen, left `lifecycle-snapshot` and
|
|
16
|
+
* `lifecycle-diff` undocumented anywhere, omitted `server/discover` (#1194)
|
|
17
|
+
* and `chant://knowledge` (#1867), and claimed protocol version 2024-11-05
|
|
18
|
+
* long after #1194 made 2026-07-28 the preferred one.
|
|
19
|
+
*
|
|
20
|
+
* Each claim here is read back against the running server rather than against
|
|
21
|
+
* source text: the tool and resource lists come from a real `McpServer`
|
|
22
|
+
* answering `tools/list` and `resources/list`, which is what a client sees.
|
|
23
|
+
* The dispatch methods are the exception and are read out of `server.ts` by
|
|
24
|
+
* regex, because a switch statement has no listing API; that regex fails
|
|
25
|
+
* loudly if the switch is ever restructured.
|
|
26
|
+
*
|
|
27
|
+
* Same shape as `scripts/fold-depth-bound-claims.test.ts` (#2367) and
|
|
28
|
+
* `scripts/lexicon-count-claims.test.ts` (#2316): a doc claim pinned to
|
|
29
|
+
* ground truth, with a message that says what to edit.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
const repoRoot = fileURLToPath(new URL("../../../../../", import.meta.url));
|
|
33
|
+
const MCP_DOC = join("docs", "src", "content", "docs", "cli", "mcp.mdx");
|
|
34
|
+
const GUIDE_DOC = join("docs", "src", "content", "docs", "guide", "agent-integration.mdx");
|
|
35
|
+
const SERVER_SRC = join("packages", "core", "src", "cli", "mcp", "server.ts");
|
|
36
|
+
|
|
37
|
+
const mcpDoc = readFileSync(join(repoRoot, MCP_DOC), "utf8");
|
|
38
|
+
const guideDoc = readFileSync(join(repoRoot, GUIDE_DOC), "utf8");
|
|
39
|
+
const serverSrc = readFileSync(join(repoRoot, SERVER_SRC), "utf8");
|
|
40
|
+
|
|
41
|
+
/** What a client is told when it asks, built from a server with no plugins loaded. */
|
|
42
|
+
async function servedListing(method: "tools/list" | "resources/list"): Promise<string[]> {
|
|
43
|
+
const response = await new McpServer().handleRequest({ jsonrpc: "2.0", id: 1, method });
|
|
44
|
+
const result = response.result as { tools?: ToolDefinition[]; resources?: ResourceDefinition[] };
|
|
45
|
+
const names = result.tools?.map((t) => t.name) ?? result.resources?.map((r) => r.uri);
|
|
46
|
+
if (!names || names.length === 0) {
|
|
47
|
+
throw new Error(`mcp docs parity: ${method} returned nothing to compare the docs against`);
|
|
48
|
+
}
|
|
49
|
+
return names;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** The lines of one `##`/`###` section, up to the next heading at any level. */
|
|
53
|
+
function section(doc: string, heading: string, label: string): string {
|
|
54
|
+
const start = doc.indexOf(heading);
|
|
55
|
+
if (start < 0) throw new Error(`mcp docs parity: no "${heading}" heading in ${label} — was it renamed? Update this test to match.`);
|
|
56
|
+
const rest = doc.slice(start + heading.length);
|
|
57
|
+
const end = rest.search(/\n#{1,4} /);
|
|
58
|
+
return end < 0 ? rest : rest.slice(0, end);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** Every `` | `thing` | `` first column of a markdown table in `text`. */
|
|
62
|
+
function firstColumnCells(text: string): string[] {
|
|
63
|
+
return [...text.matchAll(/^\| `([^`]+)` \|/gm)].map((m) => m[1]);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function sorted(values: readonly string[]): string[] {
|
|
67
|
+
return [...values].sort();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
describe("the MCP docs describe the server that ships (#2385)", () => {
|
|
71
|
+
test("cli/mcp.mdx documents exactly the tools the server registers", async () => {
|
|
72
|
+
const registered = await servedListing("tools/list");
|
|
73
|
+
// Every core tool gets its own `### \`name\`` heading. The `#### ` heading
|
|
74
|
+
// under op-approve and the un-backticked "### Plugin Tools" are not tools.
|
|
75
|
+
const documented = [...mcpDoc.matchAll(/^### `([^`]+)`$/gm)].map((m) => m[1]);
|
|
76
|
+
expect(documented.length, `${MCP_DOC}: found no "### \`tool-name\`" headings — was the Tools section reformatted?`).toBeGreaterThan(0);
|
|
77
|
+
expect(
|
|
78
|
+
sorted(documented),
|
|
79
|
+
`${MCP_DOC} and the McpServer constructor disagree about the core tools. ` +
|
|
80
|
+
`Registered: ${sorted(registered).join(", ")}. Documented: ${sorted(documented).join(", ")}. ` +
|
|
81
|
+
`Give every registered tool a "### \`name\`" section on that page, and delete the sections for tools that no longer exist.`,
|
|
82
|
+
).toEqual(sorted(registered));
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
test("guide/agent-integration.mdx lists exactly the tools the server registers", async () => {
|
|
86
|
+
const registered = await servedListing("tools/list");
|
|
87
|
+
const listed = firstColumnCells(section(guideDoc, "### Available Tools", GUIDE_DOC));
|
|
88
|
+
expect(
|
|
89
|
+
sorted(listed),
|
|
90
|
+
`${GUIDE_DOC}'s "Available Tools" table and the McpServer constructor disagree. ` +
|
|
91
|
+
`Registered: ${sorted(registered).join(", ")}. Listed: ${sorted(listed).join(", ")}. ` +
|
|
92
|
+
`Add or remove rows so the table matches; the parameter detail lives on the cli/mcp reference page.`,
|
|
93
|
+
).toEqual(sorted(registered));
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
test("cli/mcp.mdx documents exactly the resources the server serves", async () => {
|
|
97
|
+
const served = await servedListing("resources/list");
|
|
98
|
+
// Rows of the Resources table: `| `chant://...` | `mime` | description |`.
|
|
99
|
+
const documented = [...mcpDoc.matchAll(/^\| `(chant:\/\/[^`]+)` \| `[^`]+` \|/gm)].map((m) => m[1]);
|
|
100
|
+
expect(
|
|
101
|
+
sorted(documented),
|
|
102
|
+
`${MCP_DOC}'s Resources table and the server's resources/list disagree. ` +
|
|
103
|
+
`Served: ${sorted(served).join(", ")}. Documented: ${sorted(documented).join(", ")}. ` +
|
|
104
|
+
`A URI the server reads but never lists (chant://examples/{name}) belongs in prose under the table, not in it.`,
|
|
105
|
+
).toEqual(sorted(served));
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
test("cli/mcp.mdx states the protocol revisions the server negotiates, preferred first", () => {
|
|
109
|
+
const documented = [...mcpDoc.matchAll(/^\| `(\d{4}-\d{2}-\d{2})` \|/gm)].map((m) => m[1]);
|
|
110
|
+
expect(
|
|
111
|
+
documented,
|
|
112
|
+
`${MCP_DOC} claims protocol revisions ${documented.join(", ") || "(none found)"}, but server.ts ` +
|
|
113
|
+
`negotiates ${SUPPORTED_PROTOCOL_VERSIONS.join(", ")}. The first row is the preferred revision, ` +
|
|
114
|
+
`the one a client that names no version gets back.`,
|
|
115
|
+
).toEqual([...SUPPORTED_PROTOCOL_VERSIONS]);
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
test("cli/mcp.mdx lists exactly the JSON-RPC methods dispatch answers", () => {
|
|
119
|
+
const dispatched = [...serverSrc.matchAll(/^ case "([^"]+)":$/gm)].map((m) => m[1]);
|
|
120
|
+
if (dispatched.length === 0) {
|
|
121
|
+
throw new Error(
|
|
122
|
+
`mcp docs parity: no \`case "method":\` labels found in ${SERVER_SRC} — the dispatch switch was ` +
|
|
123
|
+
`restructured, so this test can no longer read the method list out of it. Update the test to match.`,
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
const documented = firstColumnCells(section(mcpDoc, "### Supported Methods", MCP_DOC));
|
|
127
|
+
expect(
|
|
128
|
+
sorted(documented),
|
|
129
|
+
`${MCP_DOC}'s "Supported Methods" table and the dispatch switch in ${SERVER_SRC} disagree. ` +
|
|
130
|
+
`Dispatched: ${sorted(dispatched).join(", ")}. Documented: ${sorted(documented).join(", ")}.`,
|
|
131
|
+
).toEqual(sorted(dispatched));
|
|
132
|
+
});
|
|
133
|
+
});
|