agent-afk 5.305.4 → 5.305.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/tools/compose-agent-resolve.d.ts +1 -0
- package/dist/agent/tools/compose-node-provider.d.ts +6 -1
- package/dist/agent/tools/nesting.d.ts +2 -2
- package/dist/agent/tools/peer-tool-gate.d.ts +7 -0
- package/dist/cli.mjs +345 -345
- package/dist/index.mjs +146 -146
- package/dist/telegram.mjs +171 -171
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ export interface ResolvedComposeAgent {
|
|
|
5
5
|
systemPrompt?: string;
|
|
6
6
|
namedAgentModel?: string;
|
|
7
7
|
canUseTool?: CanUseTool;
|
|
8
|
+
readOnlyBash?: true;
|
|
8
9
|
}
|
|
9
10
|
export declare function buildAllowlistCanUseTool(allowed: string[]): CanUseTool;
|
|
10
11
|
export declare function resolveComposeNodeAgent(agentType: string | undefined, agentRegistry: AgentRegistry | undefined): ResolvedComposeAgent;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { ModelProvider } from '../provider.js';
|
|
2
2
|
import type { WorkspaceStore } from '../workspace/workspace-store.js';
|
|
3
|
+
import type { CanUseTool } from '../types.js';
|
|
3
4
|
import type { AgentModelInput } from '../types/model-types.js';
|
|
4
|
-
export
|
|
5
|
+
export interface ComposeNodeRestrictions {
|
|
6
|
+
canUseTool?: CanUseTool;
|
|
7
|
+
readOnlyBash?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function resolveComposeNodeProvider(nodeModel: AgentModelInput, workspaceStore: WorkspaceStore | undefined, openaiBaseUrl: string | undefined, restrictions?: ComposeNodeRestrictions): {
|
|
5
10
|
provider: ModelProvider;
|
|
6
11
|
} | Record<string, never>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IAgentSession } from '../types.js';
|
|
2
2
|
import type { ModelProvider } from '../provider.js';
|
|
3
|
-
import type { AgentModelInput } from '../types.js';
|
|
3
|
+
import type { AgentModelInput, CanUseTool } from '../types.js';
|
|
4
4
|
import type { Surface } from '../awareness/types.js';
|
|
5
5
|
import type { ReadScopeInputs } from '../subagent-read-scope.js';
|
|
6
6
|
import type { JournalParent } from '../subagent/fork-types.js';
|
|
@@ -33,7 +33,7 @@ export interface CreateChildProviderFactoryOptions {
|
|
|
33
33
|
}
|
|
34
34
|
export declare function createChildProviderFactory(opts?: CreateChildProviderFactoryOptions): (args: ChildProviderFactoryArgs) => ModelProvider;
|
|
35
35
|
export declare function buildReadOnlyReconProvider(model: AgentModelInput | undefined, openaiBaseUrl?: string, allowedTools?: readonly string[]): ModelProvider;
|
|
36
|
-
export declare function buildComposeNodeProvider(model: AgentModelInput | undefined, workspaceStore: WorkspaceStore, openaiBaseUrl?: string, readOnlyBash?: boolean): ModelProvider;
|
|
36
|
+
export declare function buildComposeNodeProvider(model: AgentModelInput | undefined, workspaceStore: WorkspaceStore | undefined, openaiBaseUrl?: string, readOnlyBash?: boolean, canUseTool?: CanUseTool): ModelProvider;
|
|
37
37
|
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): (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string, inheritedReadScope?: ReadScopeInputs, skillDispatchName?: string, journalParent?: JournalParent, rootSessionId?: string) => SkillExecutor;
|
|
38
38
|
export type PhaseRole = 'read-only' | 'read-write';
|
|
39
39
|
export declare function buildSkillRestrictedProvider(allowedTools: string[], model: AgentModelInput | undefined, readOnlyBash?: boolean, openaiBaseUrl?: string, workspaceStore?: WorkspaceStore): ModelProvider;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface ChildSessionSignals {
|
|
2
|
+
parentSessionId: string | undefined;
|
|
3
|
+
subagentId: string | undefined;
|
|
4
|
+
}
|
|
5
|
+
export declare function isChildDispatcherSession(s: ChildSessionSignals): boolean;
|
|
6
|
+
export declare function isPeerToolBlocked(toolName: string, s: ChildSessionSignals): boolean;
|
|
7
|
+
export declare function peerToolChildDenial(toolName: string): string;
|