@cloudflare/think 0.13.0 → 0.15.0
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 +39 -21
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/extensions/index.d.ts +100 -8
- package/dist/{hook-proxy-CkF0EhRO.js → hook-proxy-Dogs9wbj.js} +3 -3
- package/dist/{hook-proxy-CkF0EhRO.js.map → hook-proxy-Dogs9wbj.js.map} +1 -1
- package/dist/{index-Cm0jriTY.d.ts → index-s3Pl812H.d.ts} +82 -21
- package/dist/messengers/index.d.ts +1 -1
- package/dist/messengers/telegram.d.ts +1 -1
- package/dist/studio/assets/{angular-html--XgCyfPu.js → angular-html-B26lsrRw.js} +1 -1
- package/dist/studio/assets/{angular-ts-Dt-feQIe.js → angular-ts-B0BTTyHo.js} +1 -1
- package/dist/studio/assets/{apl-B7ymkyp4.js → apl-W5hJk0fj.js} +1 -1
- package/dist/studio/assets/{astro-Ce5cw2JI.js → astro-ChkXCqsA.js} +1 -1
- package/dist/studio/assets/{blade-DL-aXwjv.js → blade-Dy0zTtr6.js} +1 -1
- package/dist/studio/assets/{c-CFfr09UF.js → c-DOHYbsuN.js} +1 -1
- package/dist/studio/assets/{cobol-Ba1f5ZqR.js → cobol-DtGo7U_-.js} +1 -1
- package/dist/studio/assets/{coffee-BG2_viYI.js → coffee-Uf9fkZqI.js} +1 -1
- package/dist/studio/assets/{cpp-pU5HgBva.js → cpp-CVwmol0l.js} +1 -1
- package/dist/studio/assets/{crystal-Dlm_uR4r.js → crystal-ChHObCtF.js} +1 -1
- package/dist/studio/assets/{css-tUC4TMTn.js → css-DYjZAj5w.js} +1 -1
- package/dist/studio/assets/{edge-CQuSKMUt.js → edge-C2J43zbu.js} +1 -1
- package/dist/studio/assets/{elixir-BmIB-Wi1.js → elixir-B7WZ8XhB.js} +1 -1
- package/dist/studio/assets/{elm-ByVNCtDB.js → elm-PN4qGuR2.js} +1 -1
- package/dist/studio/assets/{erb-DO4uDxTq.js → erb-CkbjE2OZ.js} +1 -1
- package/dist/studio/assets/{git-rebase-CT8LXapC.js → git-rebase-CsGmQhFO.js} +1 -1
- package/dist/studio/assets/{glimmer-js-DzIT0v-m.js → glimmer-js-D85-ZYXa.js} +1 -1
- package/dist/studio/assets/{glimmer-ts-znG2j9R4.js → glimmer-ts-B_0SLVPe.js} +1 -1
- package/dist/studio/assets/{glsl-C1p8U_gW.js → glsl-BE5n0T0t.js} +1 -1
- package/dist/studio/assets/{graphql-CFqegryf.js → graphql-BVcCJEBO.js} +1 -1
- package/dist/studio/assets/{hack-BfVsNhqs.js → hack-CyUu15_C.js} +1 -1
- package/dist/studio/assets/{haml-DVcEksY5.js → haml-Dj54pugT.js} +1 -1
- package/dist/studio/assets/{handlebars-DSWgWCJ4.js → handlebars-l3llPaCT.js} +1 -1
- package/dist/studio/assets/{highlighted-body-OFNGDK62-BIm4UpTS.js → highlighted-body-OFNGDK62-D_z62he-.js} +1 -1
- package/dist/studio/assets/{html-C-lP7-T4.js → html--Tmh4628.js} +1 -1
- package/dist/studio/assets/{html-derivative-ByukJopb.js → html-derivative-B0Q_m8BM.js} +1 -1
- package/dist/studio/assets/{http-Bax2fYIk.js → http-BXKW9YQL.js} +1 -1
- package/dist/studio/assets/{hurl-BrI2qfvy.js → hurl-C60QjgUE.js} +1 -1
- package/dist/studio/assets/index-Cd4PgOFu.js +390 -0
- package/dist/studio/assets/{java-ZiR-uym-.js → java-aXeLcVht.js} +1 -1
- package/dist/studio/assets/{javascript-Dhhw85Vr.js → javascript-BQcRH4fE.js} +1 -1
- package/dist/studio/assets/{jinja-DqSGkgE4.js → jinja-DGNUkEt-.js} +1 -1
- package/dist/studio/assets/{jison-CwQ0BO-q.js → jison-DwfSvoKv.js} +1 -1
- package/dist/studio/assets/{json-Je3YfUTE.js → json-B0ukOVyl.js} +1 -1
- package/dist/studio/assets/{jsx-Da-dLbW1.js → jsx-CzJUnsSO.js} +1 -1
- package/dist/studio/assets/{julia-CBJ0H-0z.js → julia-D8zt_FEP.js} +1 -1
- package/dist/studio/assets/{just-CnuRC_nd.js → just-nn4e9Gpd.js} +1 -1
- package/dist/studio/assets/{latex-gZANCito.js → latex-OBwqlec5.js} +1 -1
- package/dist/studio/assets/{liquid-0U9aXoFI.js → liquid-CktG-Iuw.js} +1 -1
- package/dist/studio/assets/{lua-CX_TqMxt.js → lua-ZqavSetL.js} +1 -1
- package/dist/studio/assets/{marko-StSURz0o.js → marko-CxDLRfNz.js} +1 -1
- package/dist/studio/assets/{mdc-CXZpf9k1.js → mdc-COZbBQqS.js} +1 -1
- package/dist/studio/assets/mermaid-GHXKKRXX-ChY6AJ7l.js +1 -0
- package/dist/studio/assets/{nginx-3Q2L4366.js → nginx-DB8A8-iZ.js} +1 -1
- package/dist/studio/assets/{nim-CqX_5eXP.js → nim-Cs5VB9QZ.js} +1 -1
- package/dist/studio/assets/{perl-CLOu1GnZ.js → perl-pV-3Dli_.js} +1 -1
- package/dist/studio/assets/{php-C1vkiu4h.js → php-CFSq0mhc.js} +1 -1
- package/dist/studio/assets/{pug-Cg3cFp5y.js → pug-DuCfu-AK.js} +1 -1
- package/dist/studio/assets/{qml-DhKeHMwt.js → qml-Gqte1OeW.js} +1 -1
- package/dist/studio/assets/{r--Lg2-Sir.js → r-B8XqafmU.js} +1 -1
- package/dist/studio/assets/{razor-Cjptf146.js → razor-HyK7qWun.js} +1 -1
- package/dist/studio/assets/{regexp-fS0DAwei.js → regexp-Bdipf9Ks.js} +1 -1
- package/dist/studio/assets/{rst-BBajBzk-.js → rst-DtdOQB-0.js} +1 -1
- package/dist/studio/assets/{ruby-KvFedogM.js → ruby-DOExsDws.js} +1 -1
- package/dist/studio/assets/{sas-D6p27LWr.js → sas-BLRRJVWF.js} +1 -1
- package/dist/studio/assets/{scss-6jXfJVsd.js → scss-BILH_sWZ.js} +1 -1
- package/dist/studio/assets/{shellscript-BK0Qbt1B.js → shellscript-CC2KTOv4.js} +1 -1
- package/dist/studio/assets/{shellsession-BsXmVRU4.js → shellsession-CiGs-_qT.js} +1 -1
- package/dist/studio/assets/{soy-BKtGCXkJ.js → soy-QSSlYQhf.js} +1 -1
- package/dist/studio/assets/{sql-vSUKslBj.js → sql-CPD_IP3i.js} +1 -1
- package/dist/studio/assets/{stata-BQ0iXcs9.js → stata-jhUDP248.js} +1 -1
- package/dist/studio/assets/{surrealql-v5pXHIwP.js → surrealql-CEI1vHaO.js} +1 -1
- package/dist/studio/assets/{svelte-BMFjqgJb.js → svelte-BqMghnvQ.js} +1 -1
- package/dist/studio/assets/{templ-DYMTOmIJ.js → templ-DhMt3Gd_.js} +1 -1
- package/dist/studio/assets/{tex-BoQem9gj.js → tex-B2oLGu4M.js} +1 -1
- package/dist/studio/assets/{ts-tags-Kp2pAlsd.js → ts-tags-DbXbAuWo.js} +1 -1
- package/dist/studio/assets/{tsx-DaB2J5uo.js → tsx-BWdjt-eB.js} +1 -1
- package/dist/studio/assets/{twig-DohCGJPH.js → twig-b7sZE9-Z.js} +1 -1
- package/dist/studio/assets/{typescript-BGG-5I-T.js → typescript-B5gQukXY.js} +1 -1
- package/dist/studio/assets/{vue-CCDLUl9R.js → vue-DGv3yRD9.js} +1 -1
- package/dist/studio/assets/{vue-html-et9GYlaF.js → vue-html-Cx5Ph-Io.js} +1 -1
- package/dist/studio/assets/{vue-vine-C561z6bx.js → vue-vine-G05O51ag.js} +1 -1
- package/dist/studio/assets/{xml-CJBA1ZPm.js → xml-Bd8eSLdt.js} +1 -1
- package/dist/studio/assets/{xsl-De-lf9XG.js → xsl-DVLXYJQL.js} +1 -1
- package/dist/studio/assets/{yaml-BcMKxf75.js → yaml-CO0sPwby.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/think.d.ts +2 -2
- package/dist/think.js +419 -123
- package/dist/think.js.map +1 -1
- package/dist/tools/execute.d.ts +1 -1
- package/dist/tools/extensions.d.ts +4 -37
- package/dist/tools/extensions.js.map +1 -1
- package/dist/tools/workspace.d.ts +1 -1
- package/dist/tools/workspace.js +1 -13
- package/dist/tools/workspace.js.map +1 -1
- package/dist/workflows.d.ts +1 -1
- package/dist/{workspace-BZXdZcuw.d.ts → workspace-DxZQSbko.d.ts} +10 -157
- package/docs/index.md +16 -0
- package/docs/tools.md +19 -2
- package/package.json +13 -13
- package/dist/index-B-zgBVj2.d.ts +0 -109
- package/dist/studio/assets/index-DNSTOyBe.js +0 -390
- package/dist/studio/assets/mermaid-GHXKKRXX-CqDQH2-r.js +0 -1
package/README.md
CHANGED
|
@@ -270,8 +270,9 @@ from other skills.
|
|
|
270
270
|
|
|
271
271
|
Skills are on-demand instructions, not always-on system prompt text. The model
|
|
272
272
|
sees the catalog first, then calls `activate_skill` when a user task matches a
|
|
273
|
-
skill description. Use
|
|
274
|
-
|
|
273
|
+
skill description. Use a Session context block for behavior that should apply to
|
|
274
|
+
every turn, especially when the agent also uses skills. `getSystemPrompt()` is a
|
|
275
|
+
legacy fallback and is ignored once Session context blocks are configured.
|
|
275
276
|
|
|
276
277
|
Script execution is opt-in and **experimental**. `getSkillScriptRunner()`
|
|
277
278
|
enables `run_skill_script`, which can run JavaScript, TypeScript, Python, and
|
|
@@ -335,7 +336,7 @@ Script execution requires a Worker Loader binding:
|
|
|
335
336
|
| Method / Property | Default | Description |
|
|
336
337
|
| -------------------------- | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
337
338
|
| `getModel()` | throws | Return the `LanguageModel` to use |
|
|
338
|
-
| `getSystemPrompt()` | careful assistant operating prompt |
|
|
339
|
+
| `getSystemPrompt()` | careful assistant operating prompt | Legacy system prompt fallback used only when no Session context blocks are configured |
|
|
339
340
|
| `getTools()` | `{}` | AI SDK `ToolSet` for the agentic loop |
|
|
340
341
|
| `getMessengers()` | `{}` | Messenger ingress and delivery declarations |
|
|
341
342
|
| `getScheduledTasks()` | `{}` | Code-declared recurring prompts |
|
|
@@ -349,6 +350,8 @@ Script execution requires a Worker Loader binding:
|
|
|
349
350
|
| `extensionLoader` | `undefined` | `WorkerLoader` binding — enables extensions |
|
|
350
351
|
| `workspaceBash` | `true` | Include the default workspace `bash` tool |
|
|
351
352
|
| `fetchTools` | `false` | Opt-in allowlisted HTTP read tools (`fetch_url` + per-binding `fetch_<name>`). Set to a config object; see [Fetch tool](#fetch-tool) |
|
|
353
|
+
| `includeMcpTools` | `true` | Automatically convert connected MCP tools to AI SDK tools and merge them into model turns |
|
|
354
|
+
| `waitForMcpConnections` | `false` | Wait for MCP connections to settle before inference |
|
|
352
355
|
| `chatRecovery` | `true` | Wrap turns in `runFiber` for durable execution. Set `{ maxAttempts, terminalMessage, onExhausted }` to tune bounded recovery |
|
|
353
356
|
| `chatStreamStallTimeoutMs` | `0` (off) | Inactivity watchdog: abort a turn whose model stream produces no chunk for this long, surfacing a terminal stream error instead of an infinite spinner |
|
|
354
357
|
| `contextOverflow` | `undefined` | Opt-in mid-turn context-overflow handling: `{ reactive?, maxRetries?, proactive? }`. Requires `classifyChatError` + a session compaction function. See [Context-window overflow recovery](#context-window-overflow-recovery) |
|
|
@@ -558,15 +561,15 @@ errors of Anthropic, OpenAI, Google, Bedrock, and others).
|
|
|
558
561
|
|
|
559
562
|
The AI SDK-derived contexts spread the SDK's own types at the top level — no information is dropped:
|
|
560
563
|
|
|
561
|
-
| Context | Backed by
|
|
562
|
-
| ------------------------------ |
|
|
563
|
-
| `PrepareStepContext<TOOLS>` | `Parameters<PrepareStepFunction<TOOLS>>[0]` (`steps`, `stepNumber`, `model`, `messages`, `experimental_context`)
|
|
564
|
-
| `ToolCallContext<TOOLS>` | `TypedToolCall<TOOLS>` + per-call extras from `OnToolCallStartEvent` (`stepNumber`, `messages`, `abortSignal`)
|
|
565
|
-
| `ToolCallResultContext<TOOLS>` | `TypedToolCall<TOOLS>` + per-call extras (`
|
|
566
|
-
| `StepContext<TOOLS>` | `StepResult<TOOLS>` (full step incl. `reasoning`, `sources`, `files`, `usage`, `providerMetadata`, `request`, `response`, `warnings`)
|
|
567
|
-
| `ChunkContext<TOOLS>` | `Parameters<StreamTextOnChunkCallback<TOOLS>>[0]` (discriminated `TextStreamPart`)
|
|
564
|
+
| Context | Backed by |
|
|
565
|
+
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
566
|
+
| `PrepareStepContext<TOOLS>` | `Parameters<PrepareStepFunction<TOOLS>>[0]` (`steps`, `stepNumber`, `model`, `messages`, `experimental_context`) |
|
|
567
|
+
| `ToolCallContext<TOOLS>` | `TypedToolCall<TOOLS>` + per-call extras from `OnToolCallStartEvent` (`stepNumber`, `messages`, `abortSignal`) |
|
|
568
|
+
| `ToolCallResultContext<TOOLS>` | `TypedToolCall<TOOLS>` + per-call extras (`toolExecutionMs`, `messages`, `stepNumber`) + `toolOutput`; deprecated `durationMs`/`success`/`output`/`error` aliases remain |
|
|
569
|
+
| `StepContext<TOOLS>` | `StepResult<TOOLS>` (full step incl. `reasoning`, `sources`, `files`, `usage`, `providerMetadata`, `request`, `response`, `warnings`) |
|
|
570
|
+
| `ChunkContext<TOOLS>` | `Parameters<StreamTextOnChunkCallback<TOOLS>>[0]` (discriminated `TextStreamPart`) |
|
|
568
571
|
|
|
569
|
-
`beforeStep` is wired to the AI SDK's `prepareStep` callback. Return a `StepConfig` to override `model`, `toolChoice`, `activeTools`, `
|
|
572
|
+
`beforeStep` is wired to the AI SDK's `prepareStep` callback. Return a `StepConfig` to override `model`, `toolChoice`, `activeTools`, `instructions`, `messages`, `experimental_context`, or `providerOptions` for the current step. The previous `system` name remains as a deprecated alias. The AI SDK does not expose `output` or `maxSteps` per step — set those at the turn level via `TurnConfig` (returned from `beforeTurn`). `beforeStep` is subclass-only; it is not dispatched to extensions because the prepareStep event surface includes a live `LanguageModel` instance which is not JSON-safe to snapshot.
|
|
570
573
|
|
|
571
574
|
`TurnConfig` also accepts `sendReasoning` to override whether reasoning chunks are emitted for the current UI message stream. The instance-level `sendReasoning` property defaults to `true`; return `{ sendReasoning: false }` from `beforeTurn` to hide reasoning for a single turn, for example on internal continuation turns.
|
|
572
575
|
|
|
@@ -574,9 +577,9 @@ The AI SDK-derived contexts spread the SDK's own types at the top level — no i
|
|
|
574
577
|
|
|
575
578
|
`TurnConfig.stopWhen` accepts AI SDK stop conditions such as `hasToolCall("finalAnswer")` for ending a turn early. Think composes these with its own `maxSteps` bound, so a custom condition can stop before the cap without removing the safety limit. Because stop conditions are functions, return `stopWhen` from a Think subclass's `beforeTurn`; sandboxed extension hooks cannot provide it over RPC.
|
|
576
579
|
|
|
577
|
-
`TurnConfig` also accepts an `output` field that is forwarded to `streamText` as the AI SDK's structured-output spec. Combine with `activeTools: []` for providers (e.g. `workers-ai-provider`) that strip tools when `responseFormat: "json"` is active. Use `
|
|
580
|
+
`TurnConfig` also accepts an `output` field that is forwarded to `streamText` as the AI SDK's structured-output spec. Combine with `activeTools: []` for providers (e.g. `workers-ai-provider`) that strip tools when `responseFormat: "json"` is active. Use `telemetry` to pass the AI SDK's per-call telemetry settings through to `streamText`; the previous `experimental_telemetry` name remains as a deprecated alias. Trace payload storage is separately controlled by the agent fields `storeMessages` (chat messages) and `storeTools` (tool arguments/results); both default to `false`. Stored messages follow the OpenTelemetry GenAI schemas: `{ role, parts }`, `{ type, content }` for text/reasoning, `tool_call` / `tool_call_response` for tools, and `finish_reason` on model output.
|
|
578
581
|
|
|
579
|
-
Per-tool hooks are wired so `beforeToolCall` fires _before_ `execute` (Think wraps every tool's `execute`) and `afterToolCall` fires _after_ (via the AI SDK's `
|
|
582
|
+
Per-tool hooks are wired so `beforeToolCall` fires _before_ `execute` (Think wraps every tool's `execute`) and `afterToolCall` fires _after_ (via the AI SDK's `onToolExecutionEnd`) with `toolExecutionMs` and `toolOutput`. Deprecated `durationMs` and `success`/`output`/`error` aliases remain for compatibility. `beforeToolCall` can return a `ToolCallDecision` to:
|
|
580
583
|
|
|
581
584
|
- `{ action: "allow", input? }` — run the original `execute`, optionally with a substituted `input`.
|
|
582
585
|
- `{ action: "block", reason? }` — skip `execute`; the model sees `reason` as the tool's output.
|
|
@@ -615,14 +618,14 @@ beforeToolCall(ctx: ToolCallContext<typeof tools>) {
|
|
|
615
618
|
}
|
|
616
619
|
|
|
617
620
|
afterToolCall(ctx: ToolCallResultContext<typeof tools>) {
|
|
618
|
-
if (ctx.
|
|
619
|
-
console.log(`${ctx.toolName} ok in ${ctx.
|
|
621
|
+
if (ctx.toolOutput.type === "tool-result") {
|
|
622
|
+
console.log(`${ctx.toolName} ok in ${ctx.toolExecutionMs}ms`, ctx.toolOutput.output);
|
|
620
623
|
} else {
|
|
621
|
-
console.error(`${ctx.toolName} failed:`, ctx.error);
|
|
624
|
+
console.error(`${ctx.toolName} failed:`, ctx.toolOutput.error);
|
|
622
625
|
}
|
|
623
626
|
}
|
|
624
627
|
|
|
625
|
-
|
|
628
|
+
onStepEnd(ctx: StepContext<typeof tools>) {
|
|
626
629
|
// Provider-specific cache accounting (Anthropic example)
|
|
627
630
|
const anthropic = ctx.providerMetadata?.anthropic as
|
|
628
631
|
| { cacheCreationInputTokens?: number; cacheReadInputTokens?: number }
|
|
@@ -631,7 +634,7 @@ onStepFinish(ctx: StepContext<typeof tools>) {
|
|
|
631
634
|
}
|
|
632
635
|
```
|
|
633
636
|
|
|
634
|
-
> Field rename note: the per-tool contexts use the AI SDK's `input
|
|
637
|
+
> Field rename note: the per-tool contexts use the AI SDK's `input` and `toolOutput` (formerly `args`/`result` in earlier Think versions). Deprecated `success`/`output`/`error` aliases remain, but prefer narrowing on `ctx.toolOutput.type`.
|
|
635
638
|
|
|
636
639
|
### Extension hook subscriptions
|
|
637
640
|
|
|
@@ -683,7 +686,9 @@ export class MyAgent extends Think<Env> {
|
|
|
683
686
|
```ts
|
|
684
687
|
interface TurnConfig {
|
|
685
688
|
model?: LanguageModel; // override model
|
|
686
|
-
|
|
689
|
+
instructions?: string; // override instructions prompt
|
|
690
|
+
/** @deprecated Prefer instructions. */
|
|
691
|
+
system?: string;
|
|
687
692
|
messages?: ModelMessage[]; // override assembled messages
|
|
688
693
|
tools?: ToolSet; // extra tools to merge (additive)
|
|
689
694
|
activeTools?: string[]; // limit which tools the model can call
|
|
@@ -703,6 +708,8 @@ interface TurnConfig {
|
|
|
703
708
|
timeout?: TimeoutConfiguration;
|
|
704
709
|
headers?: Record<string, string | undefined>;
|
|
705
710
|
providerOptions?: Record<string, unknown>;
|
|
711
|
+
telemetry?: TelemetrySettings;
|
|
712
|
+
/** @deprecated Prefer telemetry. */
|
|
706
713
|
experimental_telemetry?: TelemetrySettings;
|
|
707
714
|
}
|
|
708
715
|
```
|
|
@@ -765,7 +772,7 @@ configureSession(session: Session) {
|
|
|
765
772
|
|
|
766
773
|
### MCP integration
|
|
767
774
|
|
|
768
|
-
Think inherits MCP client support from the Agent base class. MCP tools are automatically merged into every turn. Set `waitForMcpConnections` to ensure MCP servers are connected before the inference loop runs:
|
|
775
|
+
Think inherits MCP client support from the Agent base class. MCP tools are automatically converted to AI SDK tools and merged into every turn. Set `waitForMcpConnections` to ensure MCP servers are connected before the inference loop runs:
|
|
769
776
|
|
|
770
777
|
```ts
|
|
771
778
|
export class MyAgent extends Think<Env> {
|
|
@@ -773,6 +780,17 @@ export class MyAgent extends Think<Env> {
|
|
|
773
780
|
}
|
|
774
781
|
```
|
|
775
782
|
|
|
783
|
+
If you expose MCP tools through Code Mode or another mechanism outside Think's automatic tool set, disable direct exposure to the model:
|
|
784
|
+
|
|
785
|
+
```ts
|
|
786
|
+
export class MyAgent extends Think<Env> {
|
|
787
|
+
includeMcpTools = false;
|
|
788
|
+
waitForMcpConnections = true;
|
|
789
|
+
}
|
|
790
|
+
```
|
|
791
|
+
|
|
792
|
+
This suppresses only Think's automatic `this.mcp.getAITools()` merge. Connection registration, restoration, discovery, waiting, raw listing and calls, Code Mode access, and explicit `this.mcp.getAITools()` calls are unchanged. It also avoids converting a large MCP catalog to Zod when another mechanism exposes the tools. `activeTools: []` is not an equivalent optimization because Think assembles and converts tools before `beforeTurn` runs.
|
|
793
|
+
|
|
776
794
|
### Choosing a turn API
|
|
777
795
|
|
|
778
796
|
Use browser chat through `useAgentChat` when a user drives the conversation. Use
|
|
@@ -863,7 +881,7 @@ For values you want broadcast to connected clients, use `state` / `setState` fro
|
|
|
863
881
|
- **Durable submissions** — accept webhook/RPC-triggered turns with idempotent retry and status inspection
|
|
864
882
|
- **Messengers** — receive Chat SDK webhooks and deliver streamed replies with provider-safe recovery
|
|
865
883
|
- **Auto-continuation** — debounce-based continuation after tool results
|
|
866
|
-
- **MCP integration** — MCP tools auto-merged,
|
|
884
|
+
- **MCP integration** — MCP tools auto-merged by default, with an opt-out for alternative exposure paths
|
|
867
885
|
- **Abort/cancel** — pass an `AbortSignal` or send a cancel message
|
|
868
886
|
- **Multi-tab broadcast** — all connected clients see the stream (resume-aware exclusions)
|
|
869
887
|
- **Partial persistence** — on error, the partial assistant message is saved
|
package/dist/cli/index.js
CHANGED
|
@@ -206,7 +206,7 @@ const FRAMEWORK_DEPENDENCIES = {
|
|
|
206
206
|
"@cloudflare/think": "latest",
|
|
207
207
|
agents: "latest"
|
|
208
208
|
};
|
|
209
|
-
const THIRD_PARTY_DEPENDENCIES = { ai: "^
|
|
209
|
+
const THIRD_PARTY_DEPENDENCIES = { ai: "^7.0.0" };
|
|
210
210
|
const THIRD_PARTY_DEV_DEPENDENCIES = {
|
|
211
211
|
"@cloudflare/vite-plugin": "^1.42.3",
|
|
212
212
|
"@cloudflare/workers-types": "^4.20260629.1",
|