@amalgm/tools 0.1.7-preview.34938534039 → 0.1.7-preview.35310069402

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/PURPOSE.md CHANGED
@@ -43,6 +43,10 @@ and parity evidence only.
43
43
 
44
44
  ## Axioms
45
45
 
46
+ MCP execution context belongs to each host-admitted call. It passes unchanged
47
+ to the driver, never comes from model-supplied arguments or metadata, and never
48
+ leaks between concurrent calls sharing a prepared Toolbox view.
49
+
46
50
  Consumer assembly derives exact same-branch dependency pins from the declared
47
51
  package manifests and registry candidate records. One pending composition per
48
52
  branch preserves human edits; complete consumer checks for the exact merge tree govern its
package/README.md CHANGED
@@ -158,12 +158,12 @@ the token can be omitted. Authentication does not replace native certification,
158
158
  exact source records or artifact integrity; private source repositories do not
159
159
  receive npm's public-source provenance.
160
160
 
161
- Managed dependency reconciliation reads this owner’s declared manifests and
162
- updates exact same-branch registry candidates in one pending composition PR per
163
- branch. The repository token explicitly dispatches the owner checks. Every declared gate must
164
- pass for the exact merge tree; an atomic expected-base update prevents merging
165
- with untested concurrent source. Human additions or amendments are preserved.
166
- The half-hour CI reconciliation recovers missed dispatch hints. Assembly runs
167
- no dependency code or lifecycle hooks, and repeated owner checks do not publish
168
- another candidate for unchanged source. Repository policy must allow GitHub Actions to create pull requests; no
169
- cross-repository credential or paid auto-merge feature is required.
161
+ Bricks (`@amalgm/*` lane packages) are not pinned in source. `npm run resolve`
162
+ picks the newest good `candidate-<lane>` of each brick named in
163
+ `amalgmComposition` at build time; CI runs it with `--save`, so the packed
164
+ manifest records the exact set. A brick publication dispatches this owner's
165
+ checks on its lane, and a repeated check with an unchanged source and set does
166
+ not publish another candidate. Rollback is an explicit set: dispatch
167
+ `publish-package.yml` with `brick_set`, or set `AMALGM_LANE_SET` locally.
168
+ `preview` mirrors `main` through `mirror-preview.yml`; nothing is merged the
169
+ other way.
@@ -14,7 +14,7 @@ declare function createMcpServer<T extends Toolbox | ToolboxView = Toolbox>(opti
14
14
  mcp?: McpOptions;
15
15
  }): {
16
16
  toolbox: T;
17
- handle: (request: Request) => Promise<unknown>;
17
+ handle: (request: Request, context?: unknown) => Promise<unknown>;
18
18
  start: (input?: Readable, output?: Writable) => readline.Interface;
19
19
  };
20
20
  export { createMcpServer };
@@ -8,7 +8,8 @@ function descriptor(tool) {
8
8
  function createMcpServer(options = {}) {
9
9
  const toolbox = options.toolbox || new Toolbox(options);
10
10
  const mcpOptions = options.mcp || {};
11
- async function handle(request) {
11
+ /** Context is supplied by the trusted transport host, never parsed from MCP input. */
12
+ async function handle(request, context) {
12
13
  if (request.method === 'initialize') {
13
14
  return {
14
15
  protocolVersion: request.params?.protocolVersion || '2024-11-05',
@@ -23,7 +24,7 @@ function createMcpServer(options = {}) {
23
24
  return { tools: tools.map(descriptor) };
24
25
  if (request.method === 'tools/call') {
25
26
  try {
26
- return await callMcpTool(toolbox, String(request.params?.name || ''), request.params?.arguments || {}, mcpOptions);
27
+ return await callMcpTool(toolbox, String(request.params?.name || ''), request.params?.arguments || {}, context === undefined ? mcpOptions : { ...mcpOptions, context });
27
28
  }
28
29
  catch (error) {
29
30
  if (error instanceof Error && error.message.startsWith('Unknown tool:')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amalgm/tools",
3
- "version": "0.1.7-preview.34938534039",
3
+ "version": "0.1.7-preview.35310069402",
4
4
  "description": "Local-first tool definitions, Toolbox registry, and agent execution surfaces.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -45,18 +45,18 @@
45
45
  "test": "tsx --test --test-concurrency=1 --test-timeout=30000 test/*.test.ts",
46
46
  "verify": "npm run check && npm run build && npm test",
47
47
  "prepack": "npm run build",
48
+ "resolve": "node scripts/release/resolve.mjs",
48
49
  "release:admit": "node scripts/release/package.mjs admit",
49
50
  "release:prepare": "node scripts/release/package.mjs prepare",
50
51
  "release:examine": "node scripts/release/package.mjs examine",
51
52
  "release:publish": "node scripts/release/package.mjs publish",
52
- "release:compose": "node scripts/release/compose.mjs",
53
53
  "test:release": "node --test scripts/release/*.test.mjs"
54
54
  },
55
55
  "engines": {
56
56
  "node": ">=24"
57
57
  },
58
58
  "dependencies": {
59
- "@amalgm/core": "0.5.1-preview.34403852460",
59
+ "@amalgm/core": "0.5.1-preview.34938434539",
60
60
  "@modelcontextprotocol/sdk": "1.30.0",
61
61
  "better-sqlite3": "^12.6.2"
62
62
  },
@@ -83,16 +83,16 @@
83
83
  "fsevents@2.3.3": false
84
84
  },
85
85
  "amalgmComposition": {
86
- "schema": 1,
87
- "manifests": [
88
- "package.json"
86
+ "schema": 2,
87
+ "bricks": [
88
+ "@amalgm/core"
89
89
  ]
90
90
  },
91
- "gitHead": "f5da1898ae08a6531db09197968c1a7134b209f8",
91
+ "gitHead": "8551f8b8b0d7f0bf9699542ef1ef09badf776dd1",
92
92
  "amalgmSource": {
93
93
  "repository": "amalgm-inc/amalgm-tools",
94
94
  "branch": "preview",
95
- "commit": "f5da1898ae08a6531db09197968c1a7134b209f8",
96
- "occurrence": "34938534039"
95
+ "commit": "8551f8b8b0d7f0bf9699542ef1ef09badf776dd1",
96
+ "occurrence": "35310069402"
97
97
  }
98
98
  }