@linzumi/cli 1.0.219 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linzumi/cli",
3
- "version": "1.0.219",
3
+ "version": "1.0.221",
4
4
  "description": "Linzumi CLI \u2014 point a Codex agent at the real code on your laptop, with your team watching and steering from shared threads.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -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(z.object(entry.shape), probe.input) }
190
+ : { tool: probe.tool, verdict: safeParseVerdict(entry.schema, probe.input) }
175
191
  );
176
192
  }
177
193