@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/ai.d.ts +3 -3
- package/dist/ai.js +60 -15
- package/dist/ai.js.map +1 -1
- package/dist/browser.d.ts +2 -2
- package/dist/{executor-DkMGH_7-.d.ts → executor-DLwvEPC7.d.ts} +2 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.js.map +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/{resolve-tqDt6Djo.d.ts → resolve-BFB4vzhC.d.ts} +2 -2
- package/dist/{shared-BOF2IKt-.d.ts → shared-B1Rs0ONk.d.ts} +2 -2
- package/dist/tanstack-ai.d.ts +3 -3
- package/docs/index.md +2 -0
- package/package.json +2 -2
package/dist/mcp.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as Executor } from "./executor-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
40
|
+
//# sourceMappingURL=shared-B1Rs0ONk.d.ts.map
|
package/dist/tanstack-ai.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { i as ToolProvider } from "./executor-
|
|
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-
|
|
9
|
-
import { t as resolveProvider } from "./resolve-
|
|
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.
|
|
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.
|
|
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",
|