@intentius/chant 0.95.0 → 0.95.1

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.
@@ -9,13 +9,19 @@ import { type WorkspaceToolsOptions } from "./workspace-tools.js";
9
9
  * Exported because `docs-parity.test.ts` reads it: `cli/mcp.mdx` states these
10
10
  * revisions in prose, and stating them twice is how the page came to claim
11
11
  * 2024-11-05 for two releases after this list moved past it (#2385).
12
+ *
13
+ * The 2025 revisions are here because Claude Code 2.1.274 asks for
14
+ * 2025-11-25 and rejects any answer outside 2025-11-25, 2025-06-18,
15
+ * 2025-03-26, 2024-11-05 and 2024-10-07. A 2025 client sends
16
+ * `protocolVersion`/`clientInfo` at the top level of `initialize`, which
17
+ * {@link parseMeta} already falls back to, so it needs no other branch.
12
18
  */
13
- export declare const SUPPORTED_PROTOCOL_VERSIONS: readonly ["2026-07-28", "2024-11-05"];
19
+ export declare const SUPPORTED_PROTOCOL_VERSIONS: readonly ["2026-07-28", "2025-11-25", "2025-06-18", "2025-03-26", "2024-11-05"];
14
20
  /**
15
21
  * Pick the protocol version to answer with: the client's requested version
16
- * when we support it, otherwise our latest. A 2024-11-05 client that asks
17
- * for `2024-11-05` gets it back unchanged; a 2026-07-28 client — or one
18
- * that never says — gets the latest revision (#1194).
22
+ * when we support it, otherwise our latest. A 2024-11-05 or 2025 client that
23
+ * asks for its own version gets it back unchanged; a 2026-07-28 client, or one
24
+ * that never says, gets the latest revision (#1194).
19
25
  */
20
26
  export declare function negotiateProtocolVersion(requested: string | undefined): string;
21
27
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/cli/mcp/server.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAmE,MAAM,SAAS,CAAC;AAEvI,OAAO,EAAwB,KAAK,qBAAq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C3D,OAAO,CAAC,eAAe,CAA8F;IACrH,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO,CAAC,YAAY,CAAqB;IACzC,4GAA4G;IAC5G,OAAO,CAAC,UAAU,CAA4B;IAE9C;;;;;;;;;OASG;gBACS,OAAO,CAAC,EAAE,aAAa,EAAE,EAAE,OAAO,GAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,qBAAqB,CAAA;KAAO;IAuCjH;;;;;;;;;;OAUG;IACH,OAAO,CAAC,mBAAmB;IAc3B;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IAgB/B;;OAEG;IACH,OAAO,CAAC,YAAY;IAQpB;;;;;;;OAOG;IACG,aAAa,CAAC,OAAO,EAAE,UAAU,GAAG;QAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,WAAW,CAAC;IAClF,aAAa,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAwBrE;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAW7B;;OAEG;YACW,QAAQ;IAmCtB;;OAEG;YACW,eAAe;IA2C7B;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAsC7B;AAED;;GAEG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAYpD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant",
3
- "version": "0.95.0",
3
+ "version": "0.95.1",
4
4
  "description": "Declarative infrastructure-as-code toolkit — TypeScript on Node.js",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
@@ -108,6 +108,20 @@ describe("McpServer", () => {
108
108
  expect(result.protocolVersion).toBe("2026-07-28");
109
109
  });
110
110
 
111
+ // Claude Code 2.1.274 asks for 2025-11-25 and accepts only these back.
112
+ for (const version of ["2025-11-25", "2025-06-18", "2025-03-26", "2024-11-05"]) {
113
+ test(`a Claude Code client asking for ${version} on initialize gets ${version} back`, async () => {
114
+ const response = await server.handleRequest({
115
+ jsonrpc: "2.0",
116
+ id: 1,
117
+ method: "initialize",
118
+ params: { protocolVersion: version, capabilities: {}, clientInfo: { name: "claude-code", version: "2.1.274" } },
119
+ });
120
+ expect(response.error).toBeUndefined();
121
+ expect((response.result as Record<string, unknown>).protocolVersion).toBe(version);
122
+ });
123
+ }
124
+
111
125
  test("an unrecognized requested version falls back to the latest supported", async () => {
112
126
  const response = await server.handleRequest({
113
127
  jsonrpc: "2.0",
@@ -25,15 +25,21 @@ import { CHANT_VERSION } from "../version";
25
25
  * Exported because `docs-parity.test.ts` reads it: `cli/mcp.mdx` states these
26
26
  * revisions in prose, and stating them twice is how the page came to claim
27
27
  * 2024-11-05 for two releases after this list moved past it (#2385).
28
+ *
29
+ * The 2025 revisions are here because Claude Code 2.1.274 asks for
30
+ * 2025-11-25 and rejects any answer outside 2025-11-25, 2025-06-18,
31
+ * 2025-03-26, 2024-11-05 and 2024-10-07. A 2025 client sends
32
+ * `protocolVersion`/`clientInfo` at the top level of `initialize`, which
33
+ * {@link parseMeta} already falls back to, so it needs no other branch.
28
34
  */
29
- export const SUPPORTED_PROTOCOL_VERSIONS = ["2026-07-28", "2024-11-05"] as const;
35
+ export const SUPPORTED_PROTOCOL_VERSIONS = ["2026-07-28", "2025-11-25", "2025-06-18", "2025-03-26", "2024-11-05"] as const;
30
36
  const LATEST_PROTOCOL_VERSION = SUPPORTED_PROTOCOL_VERSIONS[0];
31
37
 
32
38
  /**
33
39
  * Pick the protocol version to answer with: the client's requested version
34
- * when we support it, otherwise our latest. A 2024-11-05 client that asks
35
- * for `2024-11-05` gets it back unchanged; a 2026-07-28 client — or one
36
- * that never says — gets the latest revision (#1194).
40
+ * when we support it, otherwise our latest. A 2024-11-05 or 2025 client that
41
+ * asks for its own version gets it back unchanged; a 2026-07-28 client, or one
42
+ * that never says, gets the latest revision (#1194).
37
43
  */
38
44
  export function negotiateProtocolVersion(requested: string | undefined): string {
39
45
  if (requested && (SUPPORTED_PROTOCOL_VERSIONS as readonly string[]).includes(requested)) {