char-slop/berry
multipurpose self-modifiable agentic harness
git clone https://git.t4t.associates/char-slop/berry
86bd162
main
1import type { Context } from "@earendil-works/chord" ; 2import { LiveDoc , type ToolExecutionApi } from "@earendil-works/pi-durable" ; 3 4/** Record when execution starts independently of renderer-specific progress details. */ 5export async function startTool ( api :ToolExecutionApi , context :Context ) :Promise < void > { 6const startedAt = Date . now (); 7await api . commit ( async ( tx ) => { 8const live = await tx . doc ( LiveDoc , api . conversationId ); 9const slot = live . tools ?. find (( slot ) => slot . callId === api . callId ); 10// pi-durable does not yet record a wall-clock start time on the slot 11if ( slot ) Object . assign ( slot , { startedAt}); 12}, context ); 13}