agent-afk 5.23.1 → 5.23.2
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/dist/agent/providers/anthropic-direct/query/retry-layer.d.ts +2 -0
- package/dist/agent/subagent/handle.d.ts +1 -0
- package/dist/agent/subagent/result.d.ts +3 -2
- package/dist/cli.mjs +358 -358
- package/dist/index.mjs +123 -123
- package/dist/telegram.mjs +176 -176
- package/package.json +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type Anthropic from '@anthropic-ai/sdk';
|
|
2
2
|
import type { ProviderEvent } from '../../../provider.js';
|
|
3
3
|
import type { AuthMode, RunTurnInput } from '../types.js';
|
|
4
|
+
export declare const RATE_LIMIT_TRANSIENT_MAX_RETRIES = 3;
|
|
5
|
+
export declare const RATE_LIMIT_RETRY_MAX_WAIT_MS = 120000;
|
|
4
6
|
export interface RetryLayerOptions {
|
|
5
7
|
client: Anthropic;
|
|
6
8
|
authMode: AuthMode;
|
|
@@ -43,6 +43,7 @@ export declare class SubagentHandleImpl<T> implements SubagentHandle<T> {
|
|
|
43
43
|
private parentId;
|
|
44
44
|
private currentTrace;
|
|
45
45
|
private lastStreamedContent;
|
|
46
|
+
private lastStopReason;
|
|
46
47
|
constructor(id: string, session: IAgentSession, controller: AbortController, abortGraph: AbortGraph, outputSchema: ZodType<T> | undefined, timeoutMs: number, hookRegistry: HookRegistry | undefined, onTerminal: () => void, parentInputStreamRef?: ReturnType<IAgentSession["getInputStreamRef"]> | undefined, parentAbortSignal?: AbortSignal | undefined, agentType?: string | undefined, progressSink?: SubagentProgressSink, parentId?: string, traceWriter?: TraceWriter | undefined, onSubagentSucceeded?: ((usage: SubagentTrace["usage"], costUsd: number | undefined) => void) | undefined);
|
|
47
48
|
get status(): SubagentStatus;
|
|
48
49
|
run(prompt: string, sinkOverride?: SubagentProgressSink): Promise<Message>;
|
|
@@ -37,9 +37,10 @@ export interface SubagentResult<T = unknown> {
|
|
|
37
37
|
completionPercent?: number;
|
|
38
38
|
trace?: SubagentTrace;
|
|
39
39
|
signal?: Signal;
|
|
40
|
+
stopReason?: string;
|
|
40
41
|
}
|
|
41
|
-
export declare function buildResultFromMessage<T>(id: string, status: SubagentStatus, message: Message, outputSchema: ZodType<T> | undefined, trace?: SubagentTrace): SubagentResult<T>;
|
|
42
|
-
export declare function buildResultFromError<T>(id: string, status: SubagentStatus, err: unknown, trace?: SubagentTrace): SubagentResult<T>;
|
|
42
|
+
export declare function buildResultFromMessage<T>(id: string, status: SubagentStatus, message: Message, outputSchema: ZodType<T> | undefined, trace?: SubagentTrace, stopReason?: string): SubagentResult<T>;
|
|
43
|
+
export declare function buildResultFromError<T>(id: string, status: SubagentStatus, err: unknown, trace?: SubagentTrace, stopReason?: string): SubagentResult<T>;
|
|
43
44
|
export declare function describeFailure(result: Pick<SubagentResult, 'status' | 'error'>): string;
|
|
44
45
|
export interface SubagentExecutionError extends Error {
|
|
45
46
|
partialOutput?: unknown;
|