@cloudflare/codemode 0.5.2 → 0.5.4

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-DLwvEPC7.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-DLwvEPC7.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-BFB4vzhC.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-DLwvEPC7.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-B1Rs0ONk.d.ts.map
@@ -1,12 +1,12 @@
1
- import { i as ToolProvider } from "./executor-DkMGH_7-.js";
1
+ import { i as ToolProvider } from "./executor-DLwvEPC7.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-B1Rs0ONk.js";
9
+ import { t as resolveProvider } from "./resolve-BFB4vzhC.js";
10
10
  import { ServerTool, Tool } from "@tanstack/ai";
11
11
 
12
12
  //#region src/tanstack-ai.d.ts
package/docs/index.md CHANGED
@@ -137,6 +137,8 @@ export class Chat extends AIChatAgent<Env> {
137
137
 
138
138
  That's the whole developer surface: a connector class, `createCodemodeRuntime`, and the runtime handle. The handle is the control plane — `tool()` for the model, `pending()`/`approve()`/`reject()`/`rollback()` for approvals, `executions()` for the audit trail, and `saveSnippet()`/`snippets()`/`deleteSnippet()` for curating what the model gets to reuse.
139
139
 
140
+ `runtime.tool()` declares its input as `{ code: string }`. Its schema implements the Standard Schema protocol, so compatible tool consumers such as TanStack AI can infer that input type.
141
+
140
142
  ## Use it (what the model writes)
141
143
 
142
144
  The sandbox SDK is four methods — discover, learn, do-once, reuse — plus one global per connector:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudflare/codemode",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
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",