Repository navigation
harness-backed Think: runTurn's turns as on Think (run-turn 15 -> 34 of 35) - #3481
Conversation
|
agents
@cloudflare/ai-chat
@cloudflare/codemode
hono-agents
@cloudflare/shell
@cloudflare/think
@cloudflare/voice
@cloudflare/worker-bundler
commit: |
🔴 agents import sizes: 1 entry point over threshold
Changed exports (24)
How this worksEach runtime export is bundled on its own, minified, and gzipped. Changes smaller than 100 B, or smaller than 1% and 1 KiB, are ignored. Growth over 10% or 5 KiB is marked 🔴. This report is informational and does not fail CI. The workflow artifact contains every measurement. Compared |
61119f7 to
cc6114d
Compare
… a client, runs on the channel its caller names, and a new reply stays a continuation after a restart (Devin, #3481)
…turn that runs, programmatic turns named as such
…tatic empty input runs no turn
…for from inside a running turn, as on Think
…age is not the assistant's, as continueLastTurn does
…a new assistant message after the latest one
…pty saveMessages and an empty chat write a new reply, as on Think; runTurn's continuation goes through an overridden continueLastTurn
… a client, runs on the channel its caller names, and a new reply stays a continuation after a restart (Devin, #3481)
…till one when it runs again; the record read only for a turn that could be a new reply, and the client-tool check reads the declared names, not a build (rv-1)
91d4611 to
3a9e1d2
Compare
… on a client; an empty saveMessages asks the model, as on Think (Devin, #3481)
Brings
runTurnand the turns it starts on the harness-backed Think to Think's behaviour. On the harness config,run-turn.test.tsgoes from 15 to 34 of 35. A full harness-config run loses none of the testsharness-compat.jsonrecords as passing.One commit per change:
chat:turn:startandchat:turn:finish, with Think's payload: request id, trigger, admission, continuation, generation, then status and duration. Turns a method call asks for (saveMessages,runTurn,continueLastTurn) are namedprogrammatic.runTurnchecks its options in Think's order and with Think's messages: an unknown mode,continuationoutside wait mode, stream mode without a callback, a submit or stream without input, and a function submit. Static empty input runs no turn: wait mode returnsskipped, and stream mode starts and ends at once.saveMessages,continueLastTurn,runTurnin wait or stream mode,chat) throws Think's error when asked for from inside the agent's running turn. A submit andaddMessagesare still allowed there.runTurn's continuation skips when the last message is not the assistant's.ThinkHarnessgets an@internalreplyinput: an operation that brings no message and answers the history with a new assistant message after the latest one. This is arch's ruling forcontinueLastTurn("an answer turn with no question"); the public API does not change, and a recovery still continues in place. Two harness tests cover it.replyforcontinueLastTurn,runTurn's continuation, an emptysaveMessagesand achatwhose function adds nothing, so each writes a new reply, as Think does.runTurn's continuation goes through an overriddencontinueLastTurn, and these turns tellbeforeTurnand the writer they are continuations, as on the class.does not borrow an old assistant when a continuation persists no contentstill fails: it needs structured output (think_final_answer) on the shell. Stacked on #3474. No changeset: the harness-backed Think is not exported, and the reply input is@internal.Validated:
run-turn.test.ts34 of 35 on the harness config and 35 of 35 on the class config;harness/thinktests 162 of 162; a full harness-config run compared againstharness-compat.json.