agentfootprint 9.53.0 → 9.55.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/CLAUDE.md +3 -1
- package/dist/core/agent/stages/window.js +7 -0
- package/dist/core/agent/stages/window.js.map +1 -1
- package/dist/core/agent/window/currentRequest.js +95 -0
- package/dist/core/agent/window/currentRequest.js.map +1 -0
- package/dist/core/agent/window/notice.js +26 -8
- package/dist/core/agent/window/notice.js.map +1 -1
- package/dist/core/agent/window/strategies/drop.js +26 -10
- package/dist/core/agent/window/strategies/drop.js.map +1 -1
- package/dist/core/agent/window/strategy.js +6 -3
- package/dist/core/agent/window/strategy.js.map +1 -1
- package/dist/core/agent/window/summarize.js +5 -1
- package/dist/core/agent/window/summarize.js.map +1 -1
- package/dist/core/agent/window/turns.js +8 -0
- package/dist/core/agent/window/turns.js.map +1 -1
- package/dist/core/tools.js.map +1 -1
- package/dist/esm/core/agent/stages/window.js +7 -0
- package/dist/esm/core/agent/stages/window.js.map +1 -1
- package/dist/esm/core/agent/window/currentRequest.d.ts +70 -0
- package/dist/esm/core/agent/window/currentRequest.js +91 -0
- package/dist/esm/core/agent/window/currentRequest.js.map +1 -0
- package/dist/esm/core/agent/window/notice.d.ts +21 -6
- package/dist/esm/core/agent/window/notice.js +26 -8
- package/dist/esm/core/agent/window/notice.js.map +1 -1
- package/dist/esm/core/agent/window/strategies/drop.d.ts +8 -6
- package/dist/esm/core/agent/window/strategies/drop.js +26 -10
- package/dist/esm/core/agent/window/strategies/drop.js.map +1 -1
- package/dist/esm/core/agent/window/strategy.d.ts +9 -6
- package/dist/esm/core/agent/window/strategy.js +6 -3
- package/dist/esm/core/agent/window/strategy.js.map +1 -1
- package/dist/esm/core/agent/window/summarize.d.ts +5 -1
- package/dist/esm/core/agent/window/summarize.js +5 -1
- package/dist/esm/core/agent/window/summarize.js.map +1 -1
- package/dist/esm/core/agent/window/turns.d.ts +11 -0
- package/dist/esm/core/agent/window/turns.js +8 -0
- package/dist/esm/core/agent/window/turns.js.map +1 -1
- package/dist/esm/core/agent/window/types.d.ts +12 -0
- package/dist/esm/core/tools.d.ts +31 -1
- package/dist/esm/core/tools.js.map +1 -1
- package/dist/esm/recorders/observability/StatusRecorder.d.ts +7 -1
- package/dist/esm/recorders/observability/StatusRecorder.js +30 -2
- package/dist/esm/recorders/observability/StatusRecorder.js.map +1 -1
- package/dist/esm/recorders/observability/commentary/commentaryTemplates.js +10 -0
- package/dist/esm/recorders/observability/commentary/commentaryTemplates.js.map +1 -1
- package/dist/esm/recorders/observability/status/statusTemplates.d.ts +87 -8
- package/dist/esm/recorders/observability/status/statusTemplates.js +177 -24
- package/dist/esm/recorders/observability/status/statusTemplates.js.map +1 -1
- package/dist/recorders/observability/StatusRecorder.js +30 -2
- package/dist/recorders/observability/StatusRecorder.js.map +1 -1
- package/dist/recorders/observability/commentary/commentaryTemplates.js +10 -0
- package/dist/recorders/observability/commentary/commentaryTemplates.js.map +1 -1
- package/dist/recorders/observability/status/statusTemplates.js +179 -25
- package/dist/recorders/observability/status/statusTemplates.js.map +1 -1
- package/dist/types/core/agent/stages/window.d.ts.map +1 -1
- package/dist/types/core/agent/window/currentRequest.d.ts +71 -0
- package/dist/types/core/agent/window/currentRequest.d.ts.map +1 -0
- package/dist/types/core/agent/window/notice.d.ts +21 -6
- package/dist/types/core/agent/window/notice.d.ts.map +1 -1
- package/dist/types/core/agent/window/strategies/drop.d.ts +8 -6
- package/dist/types/core/agent/window/strategies/drop.d.ts.map +1 -1
- package/dist/types/core/agent/window/strategy.d.ts +9 -6
- package/dist/types/core/agent/window/strategy.d.ts.map +1 -1
- package/dist/types/core/agent/window/summarize.d.ts +5 -1
- package/dist/types/core/agent/window/summarize.d.ts.map +1 -1
- package/dist/types/core/agent/window/turns.d.ts +11 -0
- package/dist/types/core/agent/window/turns.d.ts.map +1 -1
- package/dist/types/core/agent/window/types.d.ts +12 -0
- package/dist/types/core/agent/window/types.d.ts.map +1 -1
- package/dist/types/core/tools.d.ts +31 -1
- package/dist/types/core/tools.d.ts.map +1 -1
- package/dist/types/recorders/observability/StatusRecorder.d.ts +7 -1
- package/dist/types/recorders/observability/StatusRecorder.d.ts.map +1 -1
- package/dist/types/recorders/observability/commentary/commentaryTemplates.d.ts.map +1 -1
- package/dist/types/recorders/observability/status/statusTemplates.d.ts +87 -8
- package/dist/types/recorders/observability/status/statusTemplates.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/core/agent/window/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAM1E;;;;;;;;GAQG;AACH,MAAM,MAAM,mBAAmB;AAC7B,4EAA4E;AAC1E,iBAAiB;AACnB;;;;GAIG;GACD,sBAAsB;AACxB,oEAAoE;GAClE,aAAa;AACf,uEAAuE;GACrE,kBAAkB;AACpB,yEAAyE;GACvE,oBAAoB;AACtB;;;;GAIG;GACD,uBAAuB;AACzB,0EAA0E;GACxE,mBAAmB;AACrB;;;;;;;;;;;;;GAaG;GACD,yBAAyB,CAAC;AAE9B,mEAAmE;AACnE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;IACrC,+DAA+D;IAC/D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,mEAAmE;IACnE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAMD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,6CAA6C;IAC7C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,4EAA4E;IAC5E,QAAQ,CAAC,eAAe,EAAE,SAA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;;OAeG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,CAAC;CACvC;AAED,sEAAsE;AACtE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC;IACjC,2EAA2E;IAC3E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;CACtC;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;;OAMG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;OAKG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC;;OAEG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;CACnC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/core/agent/window/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAM1E;;;;;;;;GAQG;AACH,MAAM,MAAM,mBAAmB;AAC7B,4EAA4E;AAC1E,iBAAiB;AACnB;;;;;;;;;;GAUG;GACD,iBAAiB;AACnB;;;;GAIG;GACD,sBAAsB;AACxB,oEAAoE;GAClE,aAAa;AACf,uEAAuE;GACrE,kBAAkB;AACpB,yEAAyE;GACvE,oBAAoB;AACtB;;;;GAIG;GACD,uBAAuB;AACzB,0EAA0E;GACxE,mBAAmB;AACrB;;;;;;;;;;;;;GAaG;GACD,yBAAyB,CAAC;AAE9B,mEAAmE;AACnE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,mBAA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AE,SAAS,UAAU,EAAE,CAAC;CAC3C;AAMD;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;;OAMG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC;;;;;OAKG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC;IACjC;;;;;;;OAOG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,CAAC;CACvC;AAED,sEAAsE;AACtE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC;IACjC,2EAA2E;IAC3E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;CACtC;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;;OAMG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;OAKG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC;;OAEG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;CACnC"}
|
|
@@ -261,6 +261,29 @@ export interface ToolExecutionContext {
|
|
|
261
261
|
* class instances, no live handles, no functions). Progress is TELEMETRY: it
|
|
262
262
|
* never enters the tool result, the history, or the model's view.
|
|
263
263
|
*
|
|
264
|
+
* **What a PERSON sees (9.54.0).** One call, two faces. The structured
|
|
265
|
+
* payload rides to the record untouched, exactly as above — and the live
|
|
266
|
+
* status surfaces (`agent.enable.liveStatus(...)`, `attachStatus`) now show
|
|
267
|
+
* the report too, so a long call is no longer silent in the browser. Because
|
|
268
|
+
* `payload` is yours and typed `unknown`, the display contract is narrow and
|
|
269
|
+
* literal:
|
|
270
|
+
*
|
|
271
|
+
* - A top-level **string field named `message`** is shown to the person
|
|
272
|
+
* VERBATIM, trimmed, cut at **120 characters** with the cut stated
|
|
273
|
+
* (`… (+N more)`). `message` is the field MCP's own progress
|
|
274
|
+
* notification uses; nothing else in the payload is read.
|
|
275
|
+
* - **Anything else** — no `message`, a non-string one, an empty one, a
|
|
276
|
+
* bare string payload — shows the generic line instead:
|
|
277
|
+
* `` `<toolName>` reported progress (N so far)… ``. Your payload is
|
|
278
|
+
* never pretty-printed into that sentence. A status line is prose, and
|
|
279
|
+
* a tool's JSON is not a sentence anyone wrote.
|
|
280
|
+
*
|
|
281
|
+
* So `ctx.progress({ done: 3, total: 12 })` keeps its numbers on the record
|
|
282
|
+
* and says "reported progress (3 so far)" on screen; adding
|
|
283
|
+
* `message: 'Hop 3 of 12'` puts your own words there instead — and keeps the
|
|
284
|
+
* numbers. Consumers override the wording by template key
|
|
285
|
+
* (`tool.progress`, `tool.progress.generic`, or per tool).
|
|
286
|
+
*
|
|
264
287
|
* Doors with no event stream to file on — `mcpServe`, the offline
|
|
265
288
|
* `callTraceTool` context — supply the no-op. A tool must not have to know
|
|
266
289
|
* which door it is behind to be safe to call this from.
|
|
@@ -269,7 +292,14 @@ export interface ToolExecutionContext {
|
|
|
269
292
|
* execute: async (args, ctx) => {
|
|
270
293
|
* for (const [i, hop] of hops.entries()) {
|
|
271
294
|
* await walk(hop);
|
|
272
|
-
*
|
|
295
|
+
* // `message` is what the person reads; the rest is what the record
|
|
296
|
+
* // keeps. Drop `message` and the screen still says a report landed.
|
|
297
|
+
* ctx.progress({
|
|
298
|
+
* message: `Hop ${i + 1} of ${hops.length} — ${hop.id}`,
|
|
299
|
+
* done: i + 1,
|
|
300
|
+
* total: hops.length,
|
|
301
|
+
* hop: hop.id,
|
|
302
|
+
* });
|
|
273
303
|
* }
|
|
274
304
|
* return summary;
|
|
275
305
|
* }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/core/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC3F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjF,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAExE;;;;;;;GAOG;AACH,MAAM,WAAW,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO;IACtE,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B;;sCAEkC;IAClC,QAAQ,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC;IAChC;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;IAC3B;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC;IACjC;;;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AAC,EAAE,OAAO,GAAG,OAAO,EAC3E,OAAO,EAAE,iBAAiB,CAAC,KAAK,EAAE,OAAO,CAAC,GACzC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAoDtB"}
|
|
@@ -28,10 +28,16 @@ export interface StatusOptions {
|
|
|
28
28
|
/**
|
|
29
29
|
* Subset of events the thinking renderer formats. Discriminated on `type`.
|
|
30
30
|
*/
|
|
31
|
-
export type StatusEvent = AgentfootprintEventMap['agentfootprint.agent.turn_start'] | AgentfootprintEventMap['agentfootprint.agent.turn_end'] | AgentfootprintEventMap['agentfootprint.agent.iteration_start'] | AgentfootprintEventMap['agentfootprint.agent.route_decided'] | AgentfootprintEventMap['agentfootprint.stream.tool_start'] | AgentfootprintEventMap['agentfootprint.stream.tool_end'];
|
|
31
|
+
export type StatusEvent = AgentfootprintEventMap['agentfootprint.agent.turn_start'] | AgentfootprintEventMap['agentfootprint.agent.turn_end'] | AgentfootprintEventMap['agentfootprint.agent.iteration_start'] | AgentfootprintEventMap['agentfootprint.agent.route_decided'] | AgentfootprintEventMap['agentfootprint.stream.tool_start'] | AgentfootprintEventMap['agentfootprint.stream.tool_progress'] | AgentfootprintEventMap['agentfootprint.stream.tool_end'];
|
|
32
32
|
/**
|
|
33
33
|
* Attach a thinking-status subscription to the event dispatcher.
|
|
34
34
|
* Returns an Unsubscribe — call to detach.
|
|
35
|
+
*
|
|
36
|
+
* Holds one small piece of state: how many mid-call reports each in-flight
|
|
37
|
+
* tool call has filed (9.54.0), so the generic progress line can say "3 so
|
|
38
|
+
* far" instead of repeating one indistinguishable sentence. The tally is
|
|
39
|
+
* per-`toolCallId` — parallel calls count separately — and is dropped when
|
|
40
|
+
* that call ends, so nothing accumulates across a long-lived run.
|
|
35
41
|
*/
|
|
36
42
|
export declare function attachStatus(dispatcher: EventDispatcher, options: StatusOptions): Unsubscribe;
|
|
37
43
|
//# sourceMappingURL=StatusRecorder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusRecorder.d.ts","sourceRoot":"","sources":["../../../../src/recorders/observability/StatusRecorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,KAAK,EAEV,sBAAsB,EAEvB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"StatusRecorder.d.ts","sourceRoot":"","sources":["../../../../src/recorders/observability/StatusRecorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,KAAK,EAEV,sBAAsB,EAEvB,MAAM,0BAA0B,CAAC;AAGlC,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,MAAM,GAAG,IAAI,CAAC;CACzD;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GACnB,sBAAsB,CAAC,iCAAiC,CAAC,GACzD,sBAAsB,CAAC,+BAA+B,CAAC,GACvD,sBAAsB,CAAC,sCAAsC,CAAC,GAC9D,sBAAsB,CAAC,oCAAoC,CAAC,GAC5D,sBAAsB,CAAC,kCAAkC,CAAC,GAC1D,sBAAsB,CAAC,qCAAqC,CAAC,GAC7D,sBAAsB,CAAC,gCAAgC,CAAC,CAAC;AAY7D;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,eAAe,EAAE,OAAO,EAAE,aAAa,GAAG,WAAW,CAe7F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commentaryTemplates.d.ts","sourceRoot":"","sources":["../../../../../src/recorders/observability/commentary/commentaryTemplates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAUvE;;;2EAG2E;AAC3E,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAcnE;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,
|
|
1
|
+
{"version":3,"file":"commentaryTemplates.d.ts","sourceRoot":"","sources":["../../../../../src/recorders/observability/commentary/commentaryTemplates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAUvE;;;2EAG2E;AAC3E,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAcnE;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,mBA4SxC,CAAC;AAEF;;6CAE6C;AAC7C,MAAM,WAAW,iBAAiB;IAChC;6EACyE;IACzE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB;;;2EAGuE;IACvE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CACxE;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,mBAAmB,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAsOzF;AAmBD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,mBAAmB,EAC1B,GAAG,EAAE,iBAAiB,EACtB,SAAS,GAAE,mBAAgD,GAC1D,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA0YxB;AAgCD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,mBAAmB,EAAE,GAAG,EAAE,iBAAiB,GAAG,MAAM,CAS3F;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAEvF"}
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
* ────┤ tool ├────────────────────────────► "Working on `weather`…"
|
|
25
25
|
* └──────────┘ (or per-tool override)
|
|
26
26
|
*
|
|
27
|
+
* ┌──────────┐ tool_progress, still no tool.end
|
|
28
|
+
* ────┤ tool ├────────────────────────────► "Looking at your screen…"
|
|
29
|
+
* └──────────┘ (same state, newer line) (or the generic report)
|
|
30
|
+
*
|
|
27
31
|
* ┌──────────┐ pause.request, no resume yet
|
|
28
32
|
* ────┤ paused ├────────────────────────────► "Waiting on you: …"
|
|
29
33
|
* └──────────┘
|
|
@@ -37,6 +41,28 @@
|
|
|
37
41
|
* (e.g. `tool.weather: 'Looking up the weather…'`) which the renderer
|
|
38
42
|
* prefers over the generic `tool` template. Lets each tool have its
|
|
39
43
|
* own first-person status without per-tool plumbing.
|
|
44
|
+
*
|
|
45
|
+
* MID-CALL REPORTS (9.54.0). `ctx.progress(payload)` files
|
|
46
|
+
* `stream.tool_progress` from inside a still-running tool call. Through
|
|
47
|
+
* 9.53.0 that event reached the record and stopped there: nothing
|
|
48
|
+
* projected it onto the surface a person watches, so consumers hand-rolled
|
|
49
|
+
* a side channel for the live middle of a long call. The `tool` state now
|
|
50
|
+
* consumes it — same state, newer line — and the DISPLAY CONTRACT is
|
|
51
|
+
* deliberately narrow, because `payload` is author-defined `unknown`:
|
|
52
|
+
*
|
|
53
|
+
* · a top-level string field named `message` is shown VERBATIM
|
|
54
|
+
* (trimmed; cut at {@link PROGRESS_MESSAGE_LIMIT} characters, and the
|
|
55
|
+
* cut is always stated). `message` is the word MCP's own progress
|
|
56
|
+
* notification uses, so a tool already speaking that protocol needs no
|
|
57
|
+
* second vocabulary.
|
|
58
|
+
* · anything else — no `message`, a non-string one, an empty one — gets
|
|
59
|
+
* the generic line: the tool's name, that it reported, and how many
|
|
60
|
+
* times. NEVER a pretty-printed dump of the author's payload: a status
|
|
61
|
+
* line is prose, and prose that quotes a JSON blob is the field-dump
|
|
62
|
+
* law broken in public.
|
|
63
|
+
*
|
|
64
|
+
* The structured payload rides on to the record untouched either way. One
|
|
65
|
+
* `ctx.progress` call, two honest faces.
|
|
40
66
|
*/
|
|
41
67
|
import type { AgentfootprintEvent } from '../../../events/registry.js';
|
|
42
68
|
/** The four mid-call states a chat bubble might render. */
|
|
@@ -66,13 +92,45 @@ export interface StatusContext {
|
|
|
66
92
|
* `tool.<toolName>` keys.
|
|
67
93
|
*/
|
|
68
94
|
export declare const defaultStatusTemplates: StatusTemplates;
|
|
95
|
+
/**
|
|
96
|
+
* How much of a tool author's `message` one status line carries before it is
|
|
97
|
+
* cut. A status line lives in a chat bubble; past ~120 characters it stops
|
|
98
|
+
* being a status and starts being a paragraph.
|
|
99
|
+
*
|
|
100
|
+
* Truncation is always STATED, never silent — the line says how much it cut,
|
|
101
|
+
* the same rule the analyst-view humanizer keeps. A message that legitimately
|
|
102
|
+
* ends in an ellipsis must stay distinguishable from one we shortened.
|
|
103
|
+
*/
|
|
104
|
+
export declare const PROGRESS_MESSAGE_LIMIT = 120;
|
|
105
|
+
/**
|
|
106
|
+
* The tool author's `message`, ready to show — or `null` when this report had
|
|
107
|
+
* nothing sayable and the generic line should stand instead.
|
|
108
|
+
*
|
|
109
|
+
* Deliberately strict, and the strictness is the contract:
|
|
110
|
+
*
|
|
111
|
+
* · the payload must be a plain object with a top-level `message` STRING.
|
|
112
|
+
* A bare string payload is not a `message` — `ctx.progress('…')` is a
|
|
113
|
+
* valid report, but it is the author's data, not a sentence they asked us
|
|
114
|
+
* to show a person. Wrapping it (`ctx.progress({ message: '…' })`) is the
|
|
115
|
+
* one-word opt-in, and it keeps a single rule to document.
|
|
116
|
+
* · an empty or whitespace-only `message` is not a sentence. It falls to the
|
|
117
|
+
* generic line rather than blanking the bubble mid-call.
|
|
118
|
+
*
|
|
119
|
+
* Nothing here reads any other field. Guessing at `done`/`total`/`percent`
|
|
120
|
+
* would put words in the tool's mouth: one tool's `total` is hops, the next
|
|
121
|
+
* one's is bytes, and a status line that says "3 of 12" about the wrong unit
|
|
122
|
+
* is worse than one that says nothing.
|
|
123
|
+
*/
|
|
124
|
+
export declare function progressMessageOf(payload: unknown): string | null;
|
|
69
125
|
/**
|
|
70
126
|
* Derive the current thinking state from the event log.
|
|
71
127
|
*
|
|
72
128
|
* Single forward walk that tracks "active" state for each domain:
|
|
73
129
|
* • pause — set on pause.request, cleared on pause.resume
|
|
74
|
-
* • tool
|
|
75
|
-
* (matched by `toolCallId`
|
|
130
|
+
* • tool calls — a call joins the in-flight map on tool.start and leaves
|
|
131
|
+
* it on ITS OWN tool.end (matched by `toolCallId`), so two
|
|
132
|
+
* parallel calls cannot close each other. Each in-flight
|
|
133
|
+
* call also carries its own progress tally (9.54.0).
|
|
76
134
|
* • llm — set on llm.start, cleared on llm.end
|
|
77
135
|
*
|
|
78
136
|
* Priority order (highest first):
|
|
@@ -80,12 +138,21 @@ export declare const defaultStatusTemplates: StatusTemplates;
|
|
|
80
138
|
* 1. ACTIVE PAUSE wins. When the agent is waiting on the human,
|
|
81
139
|
* that's what the chat should show — not the underlying tool
|
|
82
140
|
* that triggered the pause.
|
|
83
|
-
* 2.
|
|
84
|
-
* running. Show "Working on `<toolName>`…"
|
|
141
|
+
* 2. AN IN-FLIGHT TOOL CALL — the LLM said "use a tool" and the tool is
|
|
142
|
+
* running. Show "Working on `<toolName>`…", or, once that call has
|
|
143
|
+
* reported, what it reported.
|
|
85
144
|
* 3. ACTIVE LLM — call in flight. Show streaming tokens if any
|
|
86
145
|
* arrived, otherwise "Thinking…".
|
|
87
146
|
* 4. Otherwise null (bubble hidden).
|
|
88
147
|
*
|
|
148
|
+
* WHICH CALL THE LINE IS ABOUT, when several run in parallel: the one with
|
|
149
|
+
* the most recent `tool_progress`, and only if none of them has reported, the
|
|
150
|
+
* most recently STARTED. A report is the newest evidence of what is actually
|
|
151
|
+
* happening, and a surface that showed a silent call while a reporting one
|
|
152
|
+
* had something to say would be choosing the less informative truth. Two
|
|
153
|
+
* chatty parallel calls therefore alternate on the line, each verbatim, in the
|
|
154
|
+
* order their reports landed — which is what a person watching them wants.
|
|
155
|
+
*
|
|
89
156
|
* Pure projection. Forward walk is O(n); a closing event correctly
|
|
90
157
|
* cancels its matching opener so a completed tool.start/tool.end
|
|
91
158
|
* pair leaves the state quiescent.
|
|
@@ -94,10 +161,22 @@ export declare function selectStatus(events: readonly AgentfootprintEvent[]): St
|
|
|
94
161
|
/**
|
|
95
162
|
* Resolve the matched template + substitute vars.
|
|
96
163
|
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
164
|
+
* Each state resolves a LADDER of candidate keys, most specific first, and
|
|
165
|
+
* takes the first one the merged template map defines:
|
|
166
|
+
*
|
|
167
|
+
* | the state | ladder |
|
|
168
|
+
* |------------------------------------|---------------------------------------------------------------------|
|
|
169
|
+
* | tool, reported with a `message` | `tool.<name>.progress` → `tool.progress` → `tool.<name>` → `tool` |
|
|
170
|
+
* | tool, reported without one | `tool.<name>.progress.generic` → `tool.progress.generic` → `tool.<name>` → `tool` |
|
|
171
|
+
* | tool, no report yet | `tool.<name>` → `tool` |
|
|
172
|
+
* | anything else | the state's own name |
|
|
173
|
+
*
|
|
174
|
+
* The ladder falls THROUGH to the plain tool keys on purpose. A consumer who
|
|
175
|
+
* shipped a curated `tool.weather` line and does not want it interrupted
|
|
176
|
+
* deletes `tool.progress.generic` from their map and keeps it; a consumer who
|
|
177
|
+
* ships a partial map that predates 9.54.0 keeps rendering exactly what it
|
|
178
|
+
* rendered before, mid-call reports and all. Nothing here can blank a bubble
|
|
179
|
+
* that used to have a line in it.
|
|
101
180
|
*
|
|
102
181
|
* Missing template keys return null rather than the empty string —
|
|
103
182
|
* keeps the contract honest (consumer can detect "no template" and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statusTemplates.d.ts","sourceRoot":"","sources":["../../../../../src/recorders/observability/status/statusTemplates.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"statusTemplates.d.ts","sourceRoot":"","sources":["../../../../../src/recorders/observability/status/statusTemplates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAIvE,2DAA2D;AAC3D,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;AAElE;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,gEAAgE;IAChE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAChD;4EACwE;IACxE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,iEAAiE;AACjE,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAE/D,+DAA+D;AAC/D,MAAM,WAAW,aAAa;IAC5B,sEAAsE;IACtE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAID;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,eAcpC,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CASjE;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,mBAAmB,EAAE,GAAG,WAAW,GAAG,IAAI,CAqIvF;AAID;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,WAAW,GAAG,IAAI,EACzB,GAAG,EAAE,aAAa,EAClB,SAAS,GAAE,eAAwC,GAClD,MAAM,GAAG,IAAI,CAYf"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentfootprint",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.55.0",
|
|
4
4
|
"description": "The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|