agent-afk 5.73.0 → 5.75.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 CHANGED
@@ -248,18 +248,6 @@ With containment on (`default`), a file tool (read/write/edit/list/glob/grep) ta
248
248
 
249
249
  Recent releases at [`CHANGELOG.md`](CHANGELOG.md), also viewable in-REPL via `/changelog`.
250
250
 
251
- ## Star History
252
-
253
- <a href="https://www.star-history.com/?type=date&repos=griffinwork40%2Fagent-afk">
254
- <picture>
255
- <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=griffinwork40/agent-afk&type=date&theme=dark&legend=top-left&sealed_token=0JyTRyQ55uvLCrhjSrDS7mq_ztnj8HQ19fDUsbUF0GuO1-REfAFV4OGbrgoH11e-eMbpDr_rq7qhipj2Ch-gUR50ayL2tr7889lkW87yr1RSpDe7qgNQg9c14OCFni9jsbpVxW_QvzkP3YuAjCWKfPYrSi8VIQvhSSMzZXmb-v2luuafNiza3TaIOE_K" />
256
- <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=griffinwork40/agent-afk&type=date&legend=top-left&sealed_token=0JyTRyQ55uvLCrhjSrDS7mq_ztnj8HQ19fDUsbUF0GuO1-REfAFV4OGbrgoH11e-eMbpDr_rq7qhipj2Ch-gUR50ayL2tr7889lkW87yr1RSpDe7qgNQg9c14OCFni9jsbpVxW_QvzkP3YuAjCWKfPYrSi8VIQvhSSMzZXmb-v2luuafNiza3TaIOE_K" />
257
- <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=griffinwork40/agent-afk&type=date&legend=top-left&sealed_token=0JyTRyQ55uvLCrhjSrDS7mq_ztnj8HQ19fDUsbUF0GuO1-REfAFV4OGbrgoH11e-eMbpDr_rq7qhipj2Ch-gUR50ayL2tr7889lkW87yr1RSpDe7qgNQg9c14OCFni9jsbpVxW_QvzkP3YuAjCWKfPYrSi8VIQvhSSMzZXmb-v2luuafNiza3TaIOE_K" />
258
- </picture>
259
- </a>
260
-
261
- If Agent AFK saves you time, **[⭐ star the repo](https://github.com/griffinwork40/agent-afk/stargazers)** — it's the single best way to help it reach more people.
262
-
263
251
  ## License
264
252
 
265
253
  Agent AFK is **open core**, licensed under **[Apache-2.0](LICENSE)** (SPDX: `Apache-2.0`).
@@ -3,6 +3,7 @@ import type { AnthropicToolDef, RunTurnInput, WireToolDef } from './types.js';
3
3
  export { DEFAULT_MAX_TOOL_USE_ITERATIONS } from '../shared/tool-loop-cap.js';
4
4
  export declare function toWireTool(tool: AnthropicToolDef): WireToolDef;
5
5
  export declare const OVERLOAD_MAX_RETRIES = 3;
6
+ export declare const STREAM_INCOMPLETE_MAX_RETRIES = 2;
6
7
  export declare function isTransientServerError(err: Error): boolean;
7
8
  export declare function isOverloadedErrorEvent(err: unknown): boolean;
8
9
  export declare function runTurn(input: RunTurnInput): AsyncGenerator<ProviderEvent, void, void>;
@@ -0,0 +1 @@
1
+ export declare const SUBAGENT_HANDOFF_CONTRACT = "Handoff contract: your final message is the ONLY thing the dispatching session receives \u2014 its intermediate tool calls, file reads, and exploration are invisible to the parent, so everything that matters must be in the reply itself.\n\nKeep that reply compact and lead with the answer: outcome/answer first, then the key evidence (file:line where it applies), risks or caveats, and anything you did not check.\n\nWhen a result is large \u2014 long analysis, generated content, extensive listings, or verbatim excerpts \u2014 do NOT paste it inline. Write it to a file in your working directory and return the file path plus a short summary. A very long final message can be truncated in transit and lost entirely, so hand off bulk output as a file and keep the message itself brief.";
@@ -480,6 +480,7 @@ export declare const SessionPhaseNameSchema: z.ZodEnum<{
480
480
  loop_start: "loop_start";
481
481
  loop_end: "loop_end";
482
482
  model_ttfb: "model_ttfb";
483
+ interrupt_halt: "interrupt_halt";
483
484
  rate_limit: "rate_limit";
484
485
  usage_limit_pause: "usage_limit_pause";
485
486
  usage_limit_resume: "usage_limit_resume";
@@ -499,6 +500,7 @@ export declare const SessionPhasePayloadSchema: z.ZodObject<{
499
500
  loop_start: "loop_start";
500
501
  loop_end: "loop_end";
501
502
  model_ttfb: "model_ttfb";
503
+ interrupt_halt: "interrupt_halt";
502
504
  rate_limit: "rate_limit";
503
505
  usage_limit_pause: "usage_limit_pause";
504
506
  usage_limit_resume: "usage_limit_resume";
@@ -824,6 +826,7 @@ export declare const TraceEventInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject
824
826
  loop_start: "loop_start";
825
827
  loop_end: "loop_end";
826
828
  model_ttfb: "model_ttfb";
829
+ interrupt_halt: "interrupt_halt";
827
830
  rate_limit: "rate_limit";
828
831
  usage_limit_pause: "usage_limit_pause";
829
832
  usage_limit_resume: "usage_limit_resume";
@@ -1157,6 +1160,7 @@ export declare const TraceEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1157
1160
  loop_start: "loop_start";
1158
1161
  loop_end: "loop_end";
1159
1162
  model_ttfb: "model_ttfb";
1163
+ interrupt_halt: "interrupt_halt";
1160
1164
  rate_limit: "rate_limit";
1161
1165
  usage_limit_pause: "usage_limit_pause";
1162
1166
  usage_limit_resume: "usage_limit_resume";
@@ -201,7 +201,7 @@ export interface BrowserEventPayload {
201
201
  };
202
202
  durationMs: number;
203
203
  }
204
- export type SessionPhaseName = 'bootstrap_start' | 'bootstrap_done' | 'session_init_start' | 'session_init_done' | 'mcp_connect_start' | 'mcp_connect_done' | 'mcp_server_start' | 'mcp_server_done' | 'loop_start' | 'loop_end' | 'model_ttfb' | 'rate_limit' | 'usage_limit_pause' | 'usage_limit_resume' | 'idle_watchdog_fired' | 'suspected_loop';
204
+ export type SessionPhaseName = 'bootstrap_start' | 'bootstrap_done' | 'session_init_start' | 'session_init_done' | 'mcp_connect_start' | 'mcp_connect_done' | 'mcp_server_start' | 'mcp_server_done' | 'loop_start' | 'loop_end' | 'model_ttfb' | 'interrupt_halt' | 'rate_limit' | 'usage_limit_pause' | 'usage_limit_resume' | 'idle_watchdog_fired' | 'suspected_loop';
205
205
  export interface SessionPhasePayload {
206
206
  phase: SessionPhaseName;
207
207
  durationMs?: number;