agent-afk 5.37.4 → 5.37.5
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/subagent-read-scope.d.ts +5 -0
- package/dist/agent/subagent.d.ts +2 -4
- package/dist/agent/tools/compose-executor.d.ts +2 -0
- package/dist/agent/tools/nesting.d.ts +2 -1
- package/dist/agent/tools/skill-executor/types.d.ts +3 -1
- package/dist/agent/tools/subagent/child-config.d.ts +2 -1
- package/dist/agent/tools/subagent-executor.d.ts +2 -1
- package/dist/cli.mjs +457 -457
- package/dist/index.mjs +156 -156
- package/dist/skills/index.d.ts +2 -0
- package/dist/skills/mint/_phases/build.d.ts +1 -1
- package/dist/skills/mint/_phases/heal.d.ts +1 -1
- package/dist/skills/mint/_phases/parallelize-dispatch.d.ts +1 -1
- package/dist/skills/mint/_phases/plan.d.ts +1 -1
- package/dist/skills/mint/_phases/research.d.ts +1 -1
- package/dist/skills/mint/_phases/ship.d.ts +1 -1
- package/dist/skills/mint/_phases/spec.d.ts +1 -1
- package/dist/skills/mint/_phases/verify.d.ts +1 -1
- package/dist/telegram.mjs +215 -215
- package/package.json +1 -1
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
export declare function readOpenRootFor(base: string | undefined): string;
|
|
2
|
+
export interface ReadScopeInputs {
|
|
3
|
+
parentReadRoots: string[] | undefined;
|
|
4
|
+
parentCwd: string | undefined;
|
|
5
|
+
}
|
|
6
|
+
export declare function resolveChildManagerReadRoots(parentScope: ReadScopeInputs | undefined, childCwd: string | undefined): string[] | undefined;
|
|
2
7
|
export interface InheritedReadRootsArgs {
|
|
3
8
|
parentReadRoots: string[] | undefined;
|
|
4
9
|
parentCwd: string | undefined;
|
package/dist/agent/subagent.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type { AgentConfig, IAgentSession } from './types.js';
|
|
|
6
6
|
import type { SubagentProgressSink } from './types/session-types.js';
|
|
7
7
|
import type { AbortOrigin, TraceWriter } from './trace/index.js';
|
|
8
8
|
import type { Surface } from './awareness/types.js';
|
|
9
|
+
import { type ReadScopeInputs } from './subagent-read-scope.js';
|
|
9
10
|
import { type PhaseRole } from './tools/nesting.js';
|
|
10
11
|
import { type SubagentHandle } from './subagent/handle.js';
|
|
11
12
|
import type { SubagentStatus, SubagentResult, SubagentTrace } from './subagent/result.js';
|
|
@@ -66,10 +67,7 @@ export declare class SubagentManager {
|
|
|
66
67
|
onChildAborted(listener: ChildAbortedListener): () => void;
|
|
67
68
|
setOnSubagentSucceeded(cb: (usage: import('./subagent/result.js').SubagentTrace['usage'], costUsd: number | undefined) => void): void;
|
|
68
69
|
setCwd(cwd: string): void;
|
|
69
|
-
getReadScopeInputs():
|
|
70
|
-
parentReadRoots: string[] | undefined;
|
|
71
|
-
parentCwd: string | undefined;
|
|
72
|
-
};
|
|
70
|
+
getReadScopeInputs(): ReadScopeInputs;
|
|
73
71
|
private resolveMainRootForCwd;
|
|
74
72
|
abortAll(reason?: unknown, origin?: AbortOrigin): void;
|
|
75
73
|
forkSubagent<T = unknown>(options: ForkSubagentOptions<T>): Promise<SubagentHandle<T>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ReadScopeInputs } from '../subagent-read-scope.js';
|
|
1
2
|
import type { AgentModelInput, IAgentSession } from '../types.js';
|
|
2
3
|
import type { Surface } from '../awareness/types.js';
|
|
3
4
|
import type { TraceWriter } from '../trace/index.js';
|
|
@@ -14,6 +15,7 @@ export interface ComposeExecutorContext {
|
|
|
14
15
|
traceWriter?: TraceWriter;
|
|
15
16
|
surface?: Surface;
|
|
16
17
|
depth?: number;
|
|
18
|
+
getReadScopeInputs?: () => ReadScopeInputs;
|
|
17
19
|
}
|
|
18
20
|
export interface TruncationEvent {
|
|
19
21
|
nodeId: string;
|
|
@@ -2,6 +2,7 @@ import type { IAgentSession } from '../types.js';
|
|
|
2
2
|
import type { ModelProvider } from '../provider.js';
|
|
3
3
|
import type { AgentModelInput } from '../types.js';
|
|
4
4
|
import type { Surface } from '../awareness/types.js';
|
|
5
|
+
import type { ReadScopeInputs } from '../subagent-read-scope.js';
|
|
5
6
|
import { SkillExecutor } from './skill-executor.js';
|
|
6
7
|
import type { SubagentExecutor } from './subagent-executor.js';
|
|
7
8
|
import type { TraceWriter } from '../trace/index.js';
|
|
@@ -24,7 +25,7 @@ export interface CreateChildProviderFactoryOptions {
|
|
|
24
25
|
}
|
|
25
26
|
export declare function createChildProviderFactory(opts?: CreateChildProviderFactoryOptions): (args: ChildProviderFactoryArgs) => ModelProvider;
|
|
26
27
|
export declare function buildReadOnlyReconProvider(model: AgentModelInput | undefined, openaiBaseUrl?: string, allowedTools?: readonly string[]): ModelProvider;
|
|
27
|
-
export declare function createChildSkillExecutorFactory(defaultModel: AgentModelInput, apiKey: string | undefined, childProviderFactory: (args: ChildProviderFactoryArgs) => ModelProvider, baseUrl?: string, traceWriter?: TraceWriter, backgroundRegistry?: BackgroundAgentRegistry, cwd?: string, resolveApiKeyForModel?: (model: string) => string | undefined, surface?: Surface, defaultSubagentModel?: AgentModelInput, agentRegistry?: AgentRegistry, openaiBaseUrl?: string): (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string) => SkillExecutor;
|
|
28
|
+
export declare function createChildSkillExecutorFactory(defaultModel: AgentModelInput, apiKey: string | undefined, childProviderFactory: (args: ChildProviderFactoryArgs) => ModelProvider, baseUrl?: string, traceWriter?: TraceWriter, backgroundRegistry?: BackgroundAgentRegistry, cwd?: string, resolveApiKeyForModel?: (model: string) => string | undefined, surface?: Surface, defaultSubagentModel?: AgentModelInput, agentRegistry?: AgentRegistry, openaiBaseUrl?: string): (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string, inheritedReadScope?: ReadScopeInputs) => SkillExecutor;
|
|
28
29
|
export type PhaseRole = 'read-only' | 'read-write';
|
|
29
30
|
export declare function buildSkillRestrictedProvider(allowedTools: string[], model: AgentModelInput | undefined, readOnlyBash?: boolean, openaiBaseUrl?: string): ModelProvider;
|
|
30
31
|
export declare function buildPhaseRestrictedProvider(_role: 'read-only', model: AgentModelInput | undefined): ModelProvider;
|
|
@@ -5,6 +5,7 @@ import type { BackgroundAgentRegistry } from '../../background-registry.js';
|
|
|
5
5
|
import type { SdkPluginConfig } from '../../types/sdk-types.js';
|
|
6
6
|
import type { ChildProviderFactoryArgs } from '../nesting.js';
|
|
7
7
|
import type { Surface } from '../../awareness/types.js';
|
|
8
|
+
import type { ReadScopeInputs } from '../../subagent-read-scope.js';
|
|
8
9
|
import type { SkillExecutor } from '../skill-executor.js';
|
|
9
10
|
export interface SkillExecutorContext {
|
|
10
11
|
parentSession: Pick<IAgentSession, 'sessionId' | 'getInputStreamRef' | 'abortSignal'> & Partial<Pick<IAgentSession, 'hookRegistry'>>;
|
|
@@ -19,10 +20,11 @@ export interface SkillExecutorContext {
|
|
|
19
20
|
depth?: number;
|
|
20
21
|
maxDepth?: number;
|
|
21
22
|
childProviderFactory?: (args: ChildProviderFactoryArgs) => ModelProvider;
|
|
22
|
-
childSkillExecutorFactory?: (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string) => SkillExecutor;
|
|
23
|
+
childSkillExecutorFactory?: (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string, inheritedReadScope?: ReadScopeInputs) => SkillExecutor;
|
|
23
24
|
traceWriter?: TraceWriter;
|
|
24
25
|
backgroundRegistry?: BackgroundAgentRegistry;
|
|
25
26
|
cwd?: string;
|
|
27
|
+
getReadScopeInputs?: () => ReadScopeInputs;
|
|
26
28
|
agentRegistry?: import('../../agents/index.js').AgentRegistry;
|
|
27
29
|
}
|
|
28
30
|
export interface SkillInput {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SubagentManager } from '../../subagent.js';
|
|
2
|
+
import type { ReadScopeInputs } from '../../subagent-read-scope.js';
|
|
2
3
|
import type { ModelProvider } from '../../provider.js';
|
|
3
4
|
import type { AgentModelInput } from '../../types.js';
|
|
4
5
|
import type { AgentConfig } from '../../types/config-types.js';
|
|
@@ -25,7 +26,7 @@ export interface BuildChildConfigArgs {
|
|
|
25
26
|
resolveApiKeyForModel?: (model: string) => string | undefined;
|
|
26
27
|
defaultSubagentModel?: AgentModelInput;
|
|
27
28
|
childProviderFactory?: (args: ChildProviderFactoryArgs) => ModelProvider;
|
|
28
|
-
childSkillExecutorFactory?: (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string) => SkillExecutor;
|
|
29
|
+
childSkillExecutorFactory?: (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string, inheritedReadScope?: ReadScopeInputs) => SkillExecutor;
|
|
29
30
|
surface?: Surface;
|
|
30
31
|
allowedTools?: string[];
|
|
31
32
|
readOnlyBash?: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SubagentManager } from '../subagent.js';
|
|
2
|
+
import { type ReadScopeInputs } from '../subagent-read-scope.js';
|
|
2
3
|
import { BackgroundAgentRegistry } from '../background-registry.js';
|
|
3
4
|
import type { ModelProvider } from '../provider.js';
|
|
4
5
|
import type { AgentModelInput, IAgentSession } from '../types.js';
|
|
@@ -20,7 +21,7 @@ export interface SubagentExecutorContext {
|
|
|
20
21
|
resolveApiKeyForModel?: (model: string) => string | undefined;
|
|
21
22
|
defaultSubagentModel?: AgentModelInput;
|
|
22
23
|
childProviderFactory?: (args: ChildProviderFactoryArgs) => ModelProvider;
|
|
23
|
-
childSkillExecutorFactory?: (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string) => SkillExecutor;
|
|
24
|
+
childSkillExecutorFactory?: (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string, inheritedReadScope?: ReadScopeInputs) => SkillExecutor;
|
|
24
25
|
depth: number;
|
|
25
26
|
maxDepth?: number;
|
|
26
27
|
backgroundRegistry?: BackgroundAgentRegistry;
|