agent-afk 5.229.0 → 5.230.1

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.
@@ -5,6 +5,7 @@ import type { ModelProvider } from './provider.js';
5
5
  import type { SubagentManager } from './subagent.js';
6
6
  import { type DAGEdge, type DAGRunResult } from './dag.js';
7
7
  import type { DelegationBudget } from './tools/delegation-budget.js';
8
+ import type { ImageBlockAttachment } from './content/image-blocks.js';
8
9
  export interface SubagentDAGNode {
9
10
  id: string;
10
11
  systemPrompt: string;
@@ -24,6 +25,7 @@ export interface SubagentDAGNode {
24
25
  maxTurns?: number;
25
26
  provider?: ModelProvider;
26
27
  buildPromptAsync?: (inputs: Record<string, unknown>) => Promise<string | ContentBlockParam[]>;
28
+ resolvedAttachments?: ImageBlockAttachment[];
27
29
  }
28
30
  export interface SubagentDAGOptions {
29
31
  manager: SubagentManager;
@@ -1,3 +1,4 @@
1
+ import { getErrorStatus } from '../../shared/error-status.js';
1
2
  export declare const OVERLOAD_MAX_RETRIES = 3;
2
3
  export declare const OVERLOAD_BASE_DELAY_MS = 5000;
3
4
  export declare const STREAM_INCOMPLETE_MAX_RETRIES = 2;
@@ -7,6 +8,7 @@ export declare const TTFB_MAX_RETRIES = 2;
7
8
  export declare const TTFB_MAX_ATTEMPTS: number;
8
9
  export declare function ttfbAttemptTimeoutMs(configuredTtfbMs: number): number;
9
10
  export declare function isTransientServerError(err: Error): boolean;
11
+ export { getErrorStatus };
10
12
  export declare function isOverloadedErrorEvent(err: unknown): boolean;
11
13
  export declare class RoundRetryBudget {
12
14
  overloadRetries: number;
@@ -1,9 +1,10 @@
1
- import type { MessageParam, ThinkingConfigParam } from '@anthropic-ai/sdk/resources';
1
+ import type { ContentBlockParam, MessageParam, ThinkingConfigParam } from '@anthropic-ai/sdk/resources';
2
2
  import type { AgentConfig, ResumeHistoryTurn } from '../../types/config-types.js';
3
3
  import type { EffortLevel, ThinkingConfig } from '../../types/sdk-types.js';
4
4
  export { resolveAutoCompactThreshold } from '../shared/auto-compact.js';
5
5
  export declare function resolveAnthropicTemperature(temperature: number | undefined): number | undefined;
6
6
  export declare function resolveMaxTokens(config: AgentConfig, model: string): number;
7
+ export declare function filterContentBlocks(raw: unknown[] | undefined): ContentBlockParam[];
7
8
  export declare function resumeHistoryToMessages(history: ResumeHistoryTurn[] | undefined): MessageParam[] | undefined;
8
9
  export declare function resolveThinkingParam(tc: ThinkingConfig, maxTokens: number, model?: string): ThinkingConfigParam;
9
10
  export declare function resolveEffort(callerEffort: EffortLevel | undefined, model: string): EffortLevel | undefined;
@@ -0,0 +1 @@
1
+ export declare function getErrorStatus(err: unknown): number | undefined;
@@ -0,0 +1,9 @@
1
+ import type { ThrottleInfo, RateLimitGate } from './tracing-fetch-utils.js';
2
+ export type { ThrottleInfo, RateLimitGate };
3
+ export interface BaseTracingFetchOptions {
4
+ baseFetch?: typeof fetch;
5
+ gate?: RateLimitGate;
6
+ onRateLimit?: (headers: Headers) => void;
7
+ onThrottle?: (info: ThrottleInfo) => void;
8
+ }
9
+ export declare function makeBaseTracingFetch(opts?: BaseTracingFetchOptions): typeof fetch;
@@ -5,6 +5,7 @@ import type { Surface } from '../awareness/types.js';
5
5
  import type { WorkspaceStore } from '../workspace/index.js';
6
6
  import type { TraceSink } from '../trace/index.js';
7
7
  import type { ToolCall, ToolResult } from './types.js';
8
+ import type { InboundAttachmentReader } from '../content/attachment-registry.js';
8
9
  export interface ComposeExecutorContext {
9
10
  parentSession: Pick<IAgentSession, 'sessionId' | 'abortSignal'>;
10
11
  defaultModel?: AgentModelInput;
@@ -23,6 +24,7 @@ export interface ComposeExecutorContext {
23
24
  workspaceStore?: WorkspaceStore;
24
25
  agentRegistry?: AgentRegistry;
25
26
  delegationBudget?: import('./delegation-budget.js').DelegationBudget;
27
+ inboundAttachmentRegistry?: InboundAttachmentReader;
26
28
  onSubagentSucceeded?: (usage: import('../subagent/result.js').SubagentTrace['usage'], costUsd: number | undefined) => void;
27
29
  }
28
30
  export interface TruncationEvent {
@@ -9,6 +9,7 @@ export interface ComposeNodeInput {
9
9
  max_tool_rounds?: number;
10
10
  max_turns?: number;
11
11
  agent_type?: string;
12
+ attachments?: string[];
12
13
  }
13
14
  export interface ComposeInput {
14
15
  nodes: ComposeNodeInput[];
@@ -0,0 +1,11 @@
1
+ export declare const VALID_SCOPES: readonly ["interactive", "diagnose", "all"];
2
+ export type Scope = (typeof VALID_SCOPES)[number];
3
+ export declare function parseScope(raw: string): Scope;
4
+ export declare const PRUNABLE_VERDICTS: ReadonlySet<string>;
5
+ export declare const WARNING_VERDICTS: ReadonlySet<string>;
6
+ export declare function formatAge(ageMs: number): string;
7
+ export declare function verdictColor(verdict: string, text: string): string;
8
+ export declare function verdictWouldPrune(verdict: string): string;
9
+ export declare function buildVerdictTallyString(candidates: ReadonlyArray<{
10
+ verdict: string;
11
+ }>): string;