@toolgrain/protocol 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,23 @@
1
+ # @toolgrain/protocol
2
+
3
+ ## 0.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - da94c47: Document the public API with JSDoc for exported types, members, options, and functions. Preserve field documentation in auth accessor return types and protocol constant hovers.
8
+ - f199707: Point package homepages and README documentation links to the live Toolgrain documentation site.
9
+ - d0c10ac: Use matching stable Toolgrain packages in installation instructions instead of
10
+ embedding outdated release pins.
11
+
12
+ ## 0.1.1
13
+
14
+ ### Patch Changes
15
+
16
+ - 16752a8: Refresh package READMEs with Toolgrain branding, clearer package roles, and direct
17
+ links to the tool, transport, and authorization guides. Clarify the supported Zod
18
+ version in installation commands and explicitly load Node types when compiling
19
+ the Node examples with current TypeScript.
20
+
21
+ ## 0.1.0
22
+
23
+ Initial stable release. See the [0.1.0 release notes](https://github.com/keshavkatwe/toolgrain/releases/tag/v0.1.0) for installation instructions and known limitations.
package/README.md CHANGED
@@ -1,15 +1,29 @@
1
+ <a href="https://github.com/keshavkatwe/toolgrain#readme">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/keshavkatwe/toolgrain/main/brand/logo-dark.svg">
4
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/keshavkatwe/toolgrain/main/brand/logo-light.svg">
5
+ <img src="https://raw.githubusercontent.com/keshavkatwe/toolgrain/main/brand/logo-light.svg" alt="Toolgrain" width="200" height="48">
6
+ </picture>
7
+ </a>
8
+
1
9
  # @toolgrain/protocol
2
10
 
3
- Pinned MCP wire types, protocol versions, and upstream provenance for Toolgrain.
4
- This package has no runtime dependencies. Tool authoring lives in
5
- [@toolgrain/mcp](https://github.com/keshavkatwe/toolgrain/tree/main/packages/mcp#readme).
11
+ **MCP wire types, with provenance.**
12
+
13
+ Pinned protocol definitions and version constants for Toolgrain, with no runtime
14
+ dependencies. Tool authoring lives in `@toolgrain/mcp`.
15
+
16
+ [Documentation](https://toolgrain.mintlify.site/reference/protocol) ·
17
+ [Examples](https://toolgrain.mintlify.site/examples) ·
18
+ [npm](https://www.npmjs.com/package/@toolgrain/protocol)
6
19
 
7
20
  ## Installation
8
21
 
9
- Install the same `0.1.0` version across Toolgrain libraries.
22
+ Install matching stable versions across Toolgrain libraries. These commands
23
+ resolve npm's `latest` tag.
10
24
 
11
25
  ```sh
12
- npm install @toolgrain/protocol@0.1.0
26
+ npm install @toolgrain/protocol
13
27
  ```
14
28
 
15
29
  ## Protocol versions and wire types
@@ -47,7 +61,7 @@ These are wire definitions; runtime validation remains in `@toolgrain/mcp`.
47
61
 
48
62
  ESM only. Supported application runtimes are Node.js `^24.20.0` or Bun
49
63
  `>=1.4.4 <2`. TypeScript requires 5.5.4 or later with `strict` enabled. See the
50
- [support policy](https://github.com/keshavkatwe/toolgrain/blob/main/docs/support-policy.md).
64
+ [support policy](https://toolgrain.mintlify.site/project/support-policy).
51
65
 
52
66
  ## Upstream provenance and licensing
53
67
 
package/dist/index.d.ts CHANGED
@@ -1,7 +1,10 @@
1
- import { LATEST_PROTOCOL_VERSION as LEGACY_PROTOCOL_VERSION } from "./vendor/2025-06-18/schema.js";
2
1
  export type { LegacyJSONRPCErrorResponse, ProtocolResponse, } from "./responses.js";
3
2
  export * from "./vendor/2026-07-28/schema.js";
4
- export { LATEST_PROTOCOL_VERSION as PROTOCOL_VERSION } from "./vendor/2026-07-28/schema.js";
5
- export { LEGACY_PROTOCOL_VERSION };
3
+ /** Modern MCP revision used by Toolgrain for initialization-free requests: `2026-07-28`. */
4
+ export declare const PROTOCOL_VERSION = "2026-07-28";
5
+ /** Initialization-based MCP revision supported by the legacy adapter: `2025-06-18`. */
6
+ export declare const LEGACY_PROTOCOL_VERSION = "2025-06-18";
7
+ /** Supported MCP revisions, ordered modern first and legacy second; other revisions are unsupported. */
6
8
  export declare const SUPPORTED_PROTOCOL_VERSIONS: readonly ["2026-07-28", "2025-06-18"];
9
+ /** Union of the modern and initialization-based legacy revisions supported by Toolgrain. */
7
10
  export type SupportedProtocolVersion = (typeof SUPPORTED_PROTOCOL_VERSIONS)[number];
package/dist/index.js CHANGED
@@ -1,8 +1,11 @@
1
- import { LATEST_PROTOCOL_VERSION as LEGACY_PROTOCOL_VERSION } from "./vendor/2025-06-18/schema.js";
1
+ import { LATEST_PROTOCOL_VERSION as LEGACY_VERSION } from "./vendor/2025-06-18/schema.js";
2
2
  import { LATEST_PROTOCOL_VERSION } from "./vendor/2026-07-28/schema.js";
3
3
  export * from "./vendor/2026-07-28/schema.js";
4
- export { LATEST_PROTOCOL_VERSION as PROTOCOL_VERSION } from "./vendor/2026-07-28/schema.js";
5
- export { LEGACY_PROTOCOL_VERSION };
4
+ /** Modern MCP revision used by Toolgrain for initialization-free requests: `2026-07-28`. */
5
+ export const PROTOCOL_VERSION = LATEST_PROTOCOL_VERSION;
6
+ /** Initialization-based MCP revision supported by the legacy adapter: `2025-06-18`. */
7
+ export const LEGACY_PROTOCOL_VERSION = LEGACY_VERSION;
8
+ /** Supported MCP revisions, ordered modern first and legacy second; other revisions are unsupported. */
6
9
  export const SUPPORTED_PROTOCOL_VERSIONS = [
7
10
  LATEST_PROTOCOL_VERSION,
8
11
  LEGACY_PROTOCOL_VERSION,
package/dist/legacy.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from "./vendor/2025-06-18/schema.js";
2
- export { LATEST_PROTOCOL_VERSION as PROTOCOL_VERSION } from "./vendor/2025-06-18/schema.js";
2
+ /** Legacy initialization-based MCP revision for this entry point: `2025-06-18`. */
3
+ export declare const PROTOCOL_VERSION = "2025-06-18";
package/dist/legacy.js CHANGED
@@ -1,2 +1,4 @@
1
+ import { LATEST_PROTOCOL_VERSION } from "./vendor/2025-06-18/schema.js";
1
2
  export * from "./vendor/2025-06-18/schema.js";
2
- export { LATEST_PROTOCOL_VERSION as PROTOCOL_VERSION } from "./vendor/2025-06-18/schema.js";
3
+ /** Legacy initialization-based MCP revision for this entry point: `2025-06-18`. */
4
+ export const PROTOCOL_VERSION = LATEST_PROTOCOL_VERSION;
@@ -2,6 +2,7 @@ import type { JSONRPCError as LegacyJSONRPCError, JSONRPCResponse as LegacyJSONR
2
2
  import type { JSONRPCResponse } from "./vendor/2026-07-28/schema.js";
3
3
  /** JSON-RPC requires a null ID when the request ID cannot be established. */
4
4
  export type LegacyJSONRPCErrorResponse = Omit<LegacyJSONRPCError, "id"> & {
5
+ /** Original request ID, or `null` when parsing/validation could not establish one. */
5
6
  id: RequestId | null;
6
7
  };
7
8
  /** A response envelope in either supported MCP protocol era. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolgrain/protocol",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Pinned MCP wire types, protocol versions, and upstream provenance for Toolgrain.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {
@@ -8,7 +8,7 @@
8
8
  "url": "git+https://github.com/keshavkatwe/toolgrain.git",
9
9
  "directory": "packages/protocol"
10
10
  },
11
- "homepage": "https://github.com/keshavkatwe/toolgrain/tree/main/packages/protocol#readme",
11
+ "homepage": "https://toolgrain.mintlify.site/reference/protocol",
12
12
  "bugs": {
13
13
  "url": "https://github.com/keshavkatwe/toolgrain/issues"
14
14
  },
@@ -36,6 +36,7 @@
36
36
  }
37
37
  },
38
38
  "files": [
39
+ "CHANGELOG.md",
39
40
  "dist",
40
41
  "NOTICE"
41
42
  ],