@cloudflare/codemode 0.5.3 → 0.5.5

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/dist/mcp.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { l as Executor } from "./executor-DkMGH_7-.js";
1
+ import { l as Executor } from "./executor-xSJFaECq.js";
2
2
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
3
  import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js";
4
4
  import {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  i as ToolProvider,
3
3
  u as ResolvedProvider
4
- } from "./executor-DkMGH_7-.js";
4
+ } from "./executor-xSJFaECq.js";
5
5
 
6
6
  //#region src/resolve.d.ts
7
7
  /**
@@ -14,4 +14,4 @@ import {
14
14
  declare function resolveProvider(provider: ToolProvider): ResolvedProvider;
15
15
  //#endregion
16
16
  export { resolveProvider as t };
17
- //# sourceMappingURL=resolve-tqDt6Djo.d.ts.map
17
+ //# sourceMappingURL=resolve-ClRJA8iy.d.ts.map
@@ -2,7 +2,7 @@ import {
2
2
  a as ToolProviderTools,
3
3
  i as ToolProvider,
4
4
  l as Executor
5
- } from "./executor-DkMGH_7-.js";
5
+ } from "./executor-xSJFaECq.js";
6
6
 
7
7
  //#region src/shared.d.ts
8
8
  declare const DEFAULT_DESCRIPTION =
@@ -37,4 +37,4 @@ export {
37
37
  CreateCodeToolOptions as r,
38
38
  CodeInput as t
39
39
  };
40
- //# sourceMappingURL=shared-BOF2IKt-.d.ts.map
40
+ //# sourceMappingURL=shared-D5qepsss.d.ts.map
@@ -1,12 +1,12 @@
1
- import { i as ToolProvider } from "./executor-DkMGH_7-.js";
1
+ import { i as ToolProvider } from "./executor-xSJFaECq.js";
2
2
  import {
3
3
  a as normalizeProviders,
4
4
  i as DEFAULT_DESCRIPTION,
5
5
  n as CodeOutput,
6
6
  r as CreateCodeToolOptions,
7
7
  t as CodeInput
8
- } from "./shared-BOF2IKt-.js";
9
- import { t as resolveProvider } from "./resolve-tqDt6Djo.js";
8
+ } from "./shared-D5qepsss.js";
9
+ import { t as resolveProvider } from "./resolve-ClRJA8iy.js";
10
10
  import { ServerTool, Tool } from "@tanstack/ai";
11
11
 
12
12
  //#region src/tanstack-ai.d.ts
package/docs/runtime.md CHANGED
@@ -138,6 +138,10 @@ In practice, model-generated code is naturally deterministic — it fetches data
138
138
 
139
139
  **Issue tool calls sequentially.** The replay cursor assigns each call its sequence number when the call reaches the host, so `await a(); await b();` is stable across runs but `await Promise.all([a(), b()])` is not — the two calls can arrive in either order. On a run that never pauses this is harmless, but if such a run later pauses and resumes, the reordered calls trip divergence detection. Await connector calls one at a time in any run that might pause for approval.
140
140
 
141
+ ## Unawaited tool calls
142
+
143
+ A program can return before a tool call it started has finished, for example `async () => { github.ping(); return 1; }`. When `execute()` settles, the sandbox gets an error for each call still pending, so it can exit and free its Dynamic Worker concurrency slot. The host keeps running those calls to completion, so fire-and-forget calls still take effect, but the program never sees their results.
144
+
141
145
  ## The tool-call log
142
146
 
143
147
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudflare/codemode",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
4
4
  "description": "Code Mode: use LLMs to generate executable code that performs tool calls",
5
5
  "repository": {
6
6
  "directory": "packages/codemode",
@@ -15,7 +15,7 @@
15
15
  "acorn": "^8.17.0"
16
16
  },
17
17
  "devDependencies": {
18
- "@modelcontextprotocol/sdk": "1.30.0",
18
+ "@modelcontextprotocol/sdk": "1.32.1",
19
19
  "@playwright/test": "^1.61.1",
20
20
  "@tanstack/ai": "0.38.0",
21
21
  "ai": "^7.0.0",