agent-afk 5.321.6 → 5.321.8
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/background-registry.types.d.ts +1 -0
- package/dist/agent/subagent/fork-types.d.ts +1 -0
- package/dist/agent/subagent/handle.billing.d.ts +1 -1
- package/dist/agent/subagent/handle.d.ts +1 -0
- package/dist/agent/subagent.d.ts +2 -0
- package/dist/agent/tools/nesting.d.ts +1 -1
- package/dist/agent/tools/skill-executor/types.d.ts +1 -0
- package/dist/agent/tools/subagent/child-config.d.ts +1 -0
- package/dist/agent/tools/subagent/child-config.helpers.d.ts +1 -1
- package/dist/cli.mjs +388 -388
- package/dist/index.mjs +192 -192
- package/dist/telegram.mjs +206 -206
- package/package.json +1 -1
|
@@ -54,6 +54,7 @@ export interface SubagentManagerOptions {
|
|
|
54
54
|
sessionLabel?: string;
|
|
55
55
|
outputEventSink?: (event: OutputEvent) => void;
|
|
56
56
|
delegationBudget?: import('../tools/delegation-budget.js').DelegationBudget;
|
|
57
|
+
parentBillingStreams?: Set<Promise<void>>;
|
|
57
58
|
}
|
|
58
59
|
export declare function resolveParentCredential(options: SubagentManagerOptions): {
|
|
59
60
|
effectiveKey: string | (() => string | undefined) | undefined;
|
|
@@ -10,4 +10,4 @@ export interface RunBillingContext {
|
|
|
10
10
|
export declare function unreportedBillingDelta(context: RunBillingContext): BillingUsage | undefined;
|
|
11
11
|
export declare function takeUnreportedBilling(context: RunBillingContext): BillingUsage | undefined;
|
|
12
12
|
export declare function settleUnreportedBilling<T>(handle: SubagentHandleImpl<T>, outcome: SubagentUnsuccessfulOutcome, context?: RunBillingContext): ReturnType<typeof billingLifecycleFields>;
|
|
13
|
-
export declare function trackBillingStream<T>(pending: Set<Promise<void>>, stream: Promise<T
|
|
13
|
+
export declare function trackBillingStream<T>(pending: Set<Promise<void>>, stream: Promise<T>, sink?: Set<Promise<void>>): Promise<T>;
|
|
@@ -59,6 +59,7 @@ export declare class SubagentHandleImpl<T> implements SubagentHandle<T> {
|
|
|
59
59
|
_lastStopReason: string | undefined;
|
|
60
60
|
_billingContext: RunBillingContext;
|
|
61
61
|
readonly _pendingBillingStreams: Set<Promise<void>>;
|
|
62
|
+
_billingStreamSink?: Set<Promise<void>>;
|
|
62
63
|
get pendingBillingStreams(): Promise<void>[];
|
|
63
64
|
get _runBilling(): BillingUsage | undefined;
|
|
64
65
|
set _runBilling(value: BillingUsage | undefined);
|
package/dist/agent/subagent.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export type { ForkParent, ForkSubagentOptions, SubagentManagerOptions };
|
|
|
14
14
|
export declare class SubagentManager {
|
|
15
15
|
private readonly active;
|
|
16
16
|
private readonly pendingChildBillingStreams;
|
|
17
|
+
private readonly parentBillingStreams;
|
|
17
18
|
readonly completed: CompletedCache;
|
|
18
19
|
private readonly parentCanUseTool;
|
|
19
20
|
private readonly hookRegistry;
|
|
@@ -56,6 +57,7 @@ export declare class SubagentManager {
|
|
|
56
57
|
kill(id: string): Promise<boolean>;
|
|
57
58
|
killAll(): Promise<void>;
|
|
58
59
|
getPendingChildTerminalWrites(): readonly Promise<void>[];
|
|
60
|
+
get billingStreamRegistry(): Set<Promise<void>>;
|
|
59
61
|
getPendingChildBillingStreams(): readonly Promise<void>[];
|
|
60
62
|
private retainChildBillingStreams;
|
|
61
63
|
abortAllAndDrain(reason?: unknown, origin?: AbortOrigin, timeoutMs?: number, rearm?: boolean): Promise<{
|
|
@@ -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, 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;
|
|
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'], parentBillingStreams?: Set<Promise<void>>): (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;
|
|
@@ -23,6 +23,7 @@ export interface SkillExecutorContext {
|
|
|
23
23
|
skillAllowlist?: readonly string[];
|
|
24
24
|
hookRegistry?: HookRegistry;
|
|
25
25
|
onSubagentSucceeded?: import('../../subagent/fork-types.js').SubagentManagerOptions['onSubagentSucceeded'];
|
|
26
|
+
parentBillingStreams?: Set<Promise<void>>;
|
|
26
27
|
depth?: number;
|
|
27
28
|
maxDepth?: number;
|
|
28
29
|
childProviderFactory?: (args: ChildProviderFactoryArgs) => ModelProvider;
|
|
@@ -42,6 +42,7 @@ export interface BuildChildConfigArgs {
|
|
|
42
42
|
delegationBudget?: import('../../tools/delegation-budget.js').DelegationBudget;
|
|
43
43
|
hookRegistry?: import('../../hooks.js').HookRegistry;
|
|
44
44
|
parentRootSessionId?: string;
|
|
45
|
+
parentBillingStreams?: Set<Promise<void>>;
|
|
45
46
|
createChildExecutor: (ctx: SubagentExecutorContext) => SubagentExecutor;
|
|
46
47
|
}
|
|
47
48
|
export interface BuildChildConfigResult {
|
|
@@ -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' | 'onSubagentSucceeded'>, signal: AbortSignal, currentCwd: string | undefined): SubagentManager;
|
|
46
|
+
export declare function buildNestedChildManager(args: Pick<BuildChildConfigArgs, 'childInheritedReadRoots' | 'traceWriter' | 'surface' | 'workspaceStore' | 'parentRootSessionId' | 'hookRegistry' | 'onSubagentSucceeded' | 'parentBillingStreams'>, 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 {};
|