agent-afk 5.321.4 → 5.321.6

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.
@@ -19,6 +19,12 @@ export interface ScheduledTaskConfig {
19
19
  createdAt: string;
20
20
  updatedAt: string;
21
21
  }
22
+ export declare const SCHEDULES_SCHEMA_VERSION = 1;
23
+ export declare class SchedulesVersionError extends Error {
24
+ readonly path: string;
25
+ readonly fileVersion: number | undefined;
26
+ constructor(path: string, message: string, fileVersion?: number);
27
+ }
22
28
  export declare function loadSchedules(path?: string): ScheduledTaskConfig[];
23
29
  export declare function saveSchedules(configs: ScheduledTaskConfig[], path?: string): void;
24
30
  export declare function addSchedule(config: Omit<ScheduledTaskConfig, 'id' | 'createdAt' | 'updatedAt'>, path?: string): ScheduledTaskConfig;
@@ -37,6 +37,7 @@ export interface AnthropicDirectQueryOptions {
37
37
  softDeadlineMs?: number;
38
38
  traceWriter?: import('../../trace/index.js').TraceSink;
39
39
  subagentId?: string;
40
+ hasWorkspacePreamble?: boolean;
40
41
  autoResumeOnUsageLimit?: boolean;
41
42
  surface?: string;
42
43
  cwdDependentsFactory?: (cwd: string) => {
@@ -22,6 +22,7 @@ export declare class AnthropicDirectQuery implements ProviderQuery {
22
22
  private readonly softDeadlineMs?;
23
23
  private readonly traceWriter?;
24
24
  private readonly subagentId?;
25
+ private readonly hasWorkspacePreamble;
25
26
  private readonly _cwd;
26
27
  private readonly state;
27
28
  private readonly abort;
@@ -13,4 +13,5 @@ export declare function composeQuerySystem(options: {
13
13
  state: SessionState;
14
14
  systemPrefix: ContentBlockParam[] | null;
15
15
  baseUrl?: string;
16
+ hasWorkspacePreamble?: boolean;
16
17
  }): ContentBlockParam[] | null;
@@ -44,6 +44,7 @@ export declare class SubagentManager {
44
44
  get(id: string): SubagentHandle | undefined;
45
45
  onChildAborted(listener: ChildAbortedListener): () => void;
46
46
  setOnSubagentSucceeded(cb: (usage: import('./subagent/result.js').SubagentTrace['usage'], costUsd: number | undefined) => void): void;
47
+ reportSubagentCompletion(...args: Parameters<NonNullable<SubagentManagerOptions['onSubagentSucceeded']>>): void;
47
48
  setOutputEventSink(sink: (event: OutputEvent) => void): void;
48
49
  setCwd(cwd: string): void;
49
50
  setTraceWriter(writer: TraceSink | undefined): void;
@@ -43,7 +43,7 @@ export interface BuildComposeNodeProviderOpts {
43
43
  namedAgentAllowedTools?: string[];
44
44
  }
45
45
  export declare function buildComposeNodeProvider(model: AgentModelInput | undefined, workspaceStore: WorkspaceStore | undefined, opts?: BuildComposeNodeProviderOpts): ModelProvider;
46
- export declare function createChildSkillExecutorFactory(defaultModel: AgentModelInput, apiKey: string | undefined, childProviderFactory: (args: ChildProviderFactoryArgs) => ModelProvider, baseUrl?: string, traceWriter?: TraceSink, backgroundRegistry?: BackgroundAgentRegistry, cwd?: string, resolveApiKeyForModel?: (model: string) => string | undefined, surface?: Surface, defaultSubagentModel?: AgentModelInput, agentRegistry?: AgentRegistry, openaiBaseUrl?: string, xaiBaseUrl?: string, workspaceStore?: WorkspaceStore, delegationBudget?: import('./delegation-budget.js').DelegationBudget, pluginConfigs?: SdkPluginConfig[], skillAllowlist?: readonly string[], hookRegistry?: HookRegistry): (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string, inheritedReadScope?: ReadScopeInputs, skillDispatchName?: string, journalParent?: JournalParent, rootSessionId?: string) => SkillExecutor;
46
+ export declare function createChildSkillExecutorFactory(defaultModel: AgentModelInput, apiKey: string | undefined, childProviderFactory: (args: ChildProviderFactoryArgs) => ModelProvider, baseUrl?: string, traceWriter?: TraceSink, backgroundRegistry?: BackgroundAgentRegistry, cwd?: string, resolveApiKeyForModel?: (model: string) => string | undefined, surface?: Surface, defaultSubagentModel?: AgentModelInput, agentRegistry?: AgentRegistry, openaiBaseUrl?: string, xaiBaseUrl?: string, workspaceStore?: WorkspaceStore, delegationBudget?: import('./delegation-budget.js').DelegationBudget, pluginConfigs?: SdkPluginConfig[], skillAllowlist?: readonly string[], hookRegistry?: HookRegistry, onSubagentSucceeded?: import('../subagent/fork-types.js').SubagentManagerOptions['onSubagentSucceeded']): (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string, inheritedReadScope?: ReadScopeInputs, skillDispatchName?: string, journalParent?: JournalParent, rootSessionId?: string) => SkillExecutor;
47
47
  export type PhaseRole = 'read-only' | 'read-write';
48
48
  export declare function buildSkillRestrictedProvider(allowedTools: string[], model: AgentModelInput | undefined, readOnlyBash?: boolean, openaiBaseUrl?: string, workspaceStore?: WorkspaceStore): ModelProvider;
49
49
  export declare function buildPhaseRestrictedProvider(_role: 'read-only', model: AgentModelInput | undefined): ModelProvider;
@@ -22,6 +22,7 @@ export interface SkillExecutorContext {
22
22
  pluginConfigs?: SdkPluginConfig[];
23
23
  skillAllowlist?: readonly string[];
24
24
  hookRegistry?: HookRegistry;
25
+ onSubagentSucceeded?: import('../../subagent/fork-types.js').SubagentManagerOptions['onSubagentSucceeded'];
25
26
  depth?: number;
26
27
  maxDepth?: number;
27
28
  childProviderFactory?: (args: ChildProviderFactoryArgs) => ModelProvider;
@@ -37,6 +37,7 @@ export interface BuildChildConfigArgs {
37
37
  agentRegistry?: AgentRegistry;
38
38
  parentModel?: AgentModelInput;
39
39
  traceWriter?: TraceSink;
40
+ onSubagentSucceeded?: import('../../subagent/fork-types.js').SubagentManagerOptions['onSubagentSucceeded'];
40
41
  workspaceStore?: import('../../workspace/index.js').WorkspaceStore;
41
42
  delegationBudget?: import('../../tools/delegation-budget.js').DelegationBudget;
42
43
  hookRegistry?: import('../../hooks.js').HookRegistry;
@@ -43,6 +43,6 @@ interface WireChildNestingArgs {
43
43
  createChildExecutor: (ctx: SubagentExecutorContext) => SubagentExecutor;
44
44
  }
45
45
  export declare function wireChildNesting(w: WireChildNestingArgs): WireChildNestingResult;
46
- export declare function buildNestedChildManager(args: Pick<BuildChildConfigArgs, 'childInheritedReadRoots' | 'traceWriter' | 'surface' | 'workspaceStore' | 'parentRootSessionId' | 'hookRegistry'>, signal: AbortSignal, currentCwd: string | undefined): SubagentManager;
46
+ export declare function buildNestedChildManager(args: Pick<BuildChildConfigArgs, 'childInheritedReadRoots' | 'traceWriter' | 'surface' | 'workspaceStore' | 'parentRootSessionId' | 'hookRegistry' | 'onSubagentSucceeded'>, signal: AbortSignal, currentCwd: string | undefined): SubagentManager;
47
47
  export declare function nestedExecutorInherits(args: Pick<BuildChildConfigArgs, 'traceWriter' | 'workspaceStore' | 'hookRegistry'>): Pick<SubagentExecutorContext, 'traceWriter' | 'workspaceStore' | 'hookRegistry'>;
48
48
  export {};
@@ -89,6 +89,7 @@ export interface AgentConfig {
89
89
  getPendingChildTerminalWrites?: () => readonly Promise<void>[];
90
90
  getPendingChildBillingStreams?: () => readonly Promise<void>[];
91
91
  isSubagentFork?: true;
92
+ hasWorkspacePreamble?: true;
92
93
  provider?: ModelProvider;
93
94
  executors?: import('../session/session-executors.js').SessionExecutors;
94
95
  providerFactory?: (model: string | undefined) => ModelProvider;