@adaptivemcp/spec 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.
Files changed (2) hide show
  1. package/README.md +67 -0
  2. package/package.json +4 -2
package/README.md ADDED
@@ -0,0 +1,67 @@
1
+ # @adaptivemcp/spec
2
+
3
+ Extension identifiers, event schemas, and shared types for Adaptive MCP.
4
+
5
+ This package is the dependency-light foundation every other `@adaptivemcp/*`
6
+ package builds on. It owns the canonical identifiers (the SEP-2133
7
+ `dev.adaptivemcp/` namespace), the `ToolExecutionEvent` observation schema, and
8
+ the shared `ToolRecord` / `Insight` / `Recommendation` / `Annotation` types.
9
+
10
+ > MCP sets the contract; Adaptive MCP learns the behavior. `spec` defines the
11
+ > vocabulary both sides speak.
12
+
13
+ ## Install
14
+
15
+ ```bash
16
+ npm i @adaptivemcp/spec
17
+ ```
18
+
19
+ Requires **Node 26** (native TypeScript type stripping; no build step needed to
20
+ consume the published types).
21
+
22
+ ## What's inside
23
+
24
+ | Export | Purpose |
25
+ | --- | --- |
26
+ | `EXTENSION_NAMESPACE` | `"dev.adaptivemcp/"`: the reversed-domain namespace. |
27
+ | `TOOLS_METADATA_EXTENSION` | `"dev.adaptivemcp/tools-metadata"`: the single proposed MCP extension (SEP-2133) resource identifier. |
28
+ | `PACKAGE_IDENTIFIERS` | Internal reversed-domain identifiers for client-side packages (namespacing only, not advertised as extensions). |
29
+ | `isExtensionIdentifier(value)` | Predicate: does a string start with `dev.adaptivemcp/`? |
30
+ | `packageIdentifier(name)` | Resolve an internal package identifier by name. |
31
+ | `ToolExecutionEvent` | The atomic observation of a tool execution (feeds telemetry, evaluation, memory). |
32
+ | `ToolRecord`, `ToolStats` | The persisted shape of a tool's metadata and observed stats. |
33
+ | `Insight`, `Recommendation`, `Annotation` | Learned / advised / static metadata about a tool. |
34
+ | `createToolEvent(ctx, status, extra?)` | Ergonomic constructor for `ToolExecutionEvent`. |
35
+ | `SPEC_VERSION` | The spec version this package implements. |
36
+
37
+ ## Example
38
+
39
+ ```ts
40
+ import {
41
+ TOOLS_METADATA_EXTENSION,
42
+ EXTENSION_NAMESPACE,
43
+ isExtensionIdentifier,
44
+ createToolEvent,
45
+ } from "@adaptivemcp/spec";
46
+
47
+ console.log(TOOLS_METADATA_EXTENSION); // "dev.adaptivemcp/tools-metadata"
48
+ console.log(isExtensionIdentifier("dev.adaptivemcp/tools-metadata")); // true
49
+
50
+ const event = createToolEvent(
51
+ { toolName: "deploy_service", serverName: "ci" },
52
+ "completed",
53
+ { durationMs: 1200, model: "gpt-5-mini" },
54
+ );
55
+ ```
56
+
57
+ ## Relationship to MCP
58
+
59
+ `spec` does **not** introduce new MCP primitives. It defines the identifiers and
60
+ types used by `@adaptivemcp/extension`, which exposes a single
61
+ `dev.adaptivemcp/tools-metadata` **resource** (SEP-2133 compliant — a server
62
+ governs static policy, clients learn and report back). See
63
+ [`docs/sep-2133-tools-metadata.md`](../../docs/sep-2133-tools-metadata.md).
64
+
65
+ ## License
66
+
67
+ Released under the [MIT License](../../LICENSE). Copyright (c) 2026 Kemal Elmizan.
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@adaptivemcp/spec",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Extension identifiers, event schemas, and shared types for Adaptive MCP.",
5
+ "license": "MIT",
5
6
  "type": "module",
6
7
  "main": "./dist/index.js",
7
8
  "module": "./dist/index.js",
@@ -13,7 +14,8 @@
13
14
  }
14
15
  },
15
16
  "files": [
16
- "dist"
17
+ "dist",
18
+ "README.md"
17
19
  ],
18
20
  "scripts": {
19
21
  "build": "tsc -p tsconfig.json",