@linzumi/cli 1.0.220 → 1.0.221
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/README.md +1 -1
- package/dist/impl-res/cloud-supervisor.mjs +1 -1
- package/dist/impl-res/index.js +9 -9
- package/dist/impl-res/mcp-server.mjs +21 -21
- package/dist/impl-ts/cloud-supervisor.mjs +1 -1
- package/dist/impl-ts/index.js +80 -80
- package/dist/impl-ts/mcp-server.mjs +19 -19
- package/dist/mcp-server.mjs +19 -19
- package/package.json +1 -1
- package/scripts/build-mcp-parity-oracle.mjs +18 -2
package/package.json
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// Spec: kandan/plans/2026-07-10-compute-nodes-rescript-commander-zero-ts-program.md
|
|
2
2
|
// (M3 cluster 14, mcp).
|
|
3
|
+
// Wake schema parity: spec/agent-process-lifecycle-rules.md
|
|
4
|
+
// :agent-process-lifecycle/rule-08-agent-scheduled-wakes.
|
|
3
5
|
// Relationship: Builds the TS-side PARITY ORACLE for the mcp cluster of the
|
|
4
6
|
// ReScript commander port. Two artifacts:
|
|
5
7
|
//
|
|
@@ -135,10 +137,24 @@ function recordingFetch(script) {
|
|
|
135
137
|
async function toolSurface(testCase) {
|
|
136
138
|
const captured = [];
|
|
137
139
|
const handlers = new Map();
|
|
140
|
+
const schemaShape = (schema) => {
|
|
141
|
+
if (schema?.shape !== undefined) {
|
|
142
|
+
return schema.shape;
|
|
143
|
+
}
|
|
144
|
+
if (schema?._def?.schema !== undefined) {
|
|
145
|
+
return schemaShape(schema._def.schema);
|
|
146
|
+
}
|
|
147
|
+
throw new Error('captured MCP schema does not expose an object shape');
|
|
148
|
+
};
|
|
138
149
|
const fakeServer = {
|
|
139
150
|
tool(name, description, shape, handler) {
|
|
140
151
|
captured.push({ name, description, schemaKeys: Object.keys(shape) });
|
|
141
|
-
handlers.set(name, { shape, handler });
|
|
152
|
+
handlers.set(name, { schema: z.object(shape), handler });
|
|
153
|
+
},
|
|
154
|
+
registerTool(name, config, handler) {
|
|
155
|
+
const shape = schemaShape(config.inputSchema);
|
|
156
|
+
captured.push({ name, description: config.description, schemaKeys: Object.keys(shape) });
|
|
157
|
+
handlers.set(name, { schema: config.inputSchema, handler });
|
|
142
158
|
},
|
|
143
159
|
};
|
|
144
160
|
const { requests, fetchImpl } = recordingFetch(testCase.script);
|
|
@@ -171,7 +187,7 @@ async function toolSurface(testCase) {
|
|
|
171
187
|
probes.push(
|
|
172
188
|
entry === undefined
|
|
173
189
|
? { tool: probe.tool, missing: true }
|
|
174
|
-
: { tool: probe.tool, verdict: safeParseVerdict(
|
|
190
|
+
: { tool: probe.tool, verdict: safeParseVerdict(entry.schema, probe.input) }
|
|
175
191
|
);
|
|
176
192
|
}
|
|
177
193
|
|