Purpose (fix): an engine member's tool call runs and is recorded, so the member no longer stops on its first result #143
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "pluto/141-engine-tool-name"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Purpose (fix): a member on the martha-engine host runs the tool its turn asks for, so the 0.4.0 pilot's engine member can be handed work and not only text.
An engine member's first tool call ended the member the moment the owner allowed it:
Pluto is stopped: the engine named no tool for call call_00_..., so its result cannot be recorded(forge macula-io/martha#141).What was wrong. The launch merges a call's updates by its id, and a later update's
_metareplaces the_metathe first one carried; this engine sends a live-output notification under_meta.toolNotificationwhile a shell call runs, so by the time the result arrived, the merged record no longer heldgoose.toolCall.toolNameandaResultOfread no name from it. The record from the failing run, kept while the call ran:What changes. The name is read when the call is heard for the gate — the permission request carries the call as its first update named it — and the result uses that name. The result's own record stays as the fallback.
The stand-in can now send one
session/updatebetween a call's answer and its result, as this engine does, and the new test covers exactly that shape. Its mutant — the result's own record read for the name — fails by name (drive_the_engine.node-test.ts).Proof.
drive_the_engine.node-test.ts12/12; the stand-in's consumers unchanged:hear_an_acp_agents_asks13/13,the_calls_an_agent_ran6/6,the_acp_client28/28,answer_a_goose_call_by_the_entry8/8,start_an_engine_member26/26. Typecheck and eslint clean.bin/martha:start Pluto --prompt 'Run this shell command and reply with its output only: echo PILOT-TOOL'; the owner allowed the one ask withmartha answer; the member kept running (martha ls: running), the store recorded the call and its result ({"stdout": "PILOT-TOOL", ...}), and it answeredPILOT-TOOL. It then took the next turn the crew channel gave it and answered that too.Refs macula-io/martha#102, macula-io/martha#134.