agent-afk 5.324.0 → 5.324.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.
- package/dist/agent/provider.d.ts +1 -0
- package/dist/agent/providers/anthropic-direct/provider-context.d.ts +1 -0
- package/dist/agent/providers/anthropic-direct/provider-runtime.d.ts +1 -0
- package/dist/agent/providers/openai-compatible/index.d.ts +1 -0
- package/dist/agent/providers/openai-compatible/system-prompt-wiring.d.ts +1 -1
- package/dist/agent/providers/shared/tool-grant.d.ts +3 -0
- package/dist/agent/session/model-slots.coerce.d.ts +8 -0
- package/dist/agent/session/model-slots.d.ts +1 -7
- package/dist/agent/tools/nesting.d.ts +2 -2
- package/dist/agent/workspace/workspace-preamble.d.ts +6 -2
- package/dist/cli.mjs +393 -392
- package/dist/index.mjs +201 -200
- package/dist/telegram.mjs +215 -214
- package/package.json +1 -1
package/dist/agent/provider.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export interface ProviderQueryContext {
|
|
|
17
17
|
readonly readOnlyMemory: boolean;
|
|
18
18
|
readonly readOnlyState: boolean;
|
|
19
19
|
readonly workspaceStore: import('../../workspace/workspace-store.js').WorkspaceStore | undefined;
|
|
20
|
+
grantsTool?(toolName: string): boolean;
|
|
20
21
|
readonly mcpManager: import('../../mcp/index.js').McpManager | undefined;
|
|
21
22
|
readonly fastModeController: import('../../fast-mode.js').FastModeController | undefined;
|
|
22
23
|
getSharedReadRoots(): string[] | undefined;
|
|
@@ -40,6 +40,7 @@ export declare class AnthropicDirectProvider implements ModelProvider {
|
|
|
40
40
|
constructor(opts?: AnthropicDirectProviderOptions);
|
|
41
41
|
private buildDispatcher;
|
|
42
42
|
setSubscribeHandler(handler: import('../../tools/types.js').ToolHandler): void;
|
|
43
|
+
grantsTool(toolName: string): boolean;
|
|
43
44
|
close(): void;
|
|
44
45
|
complete(args: ProviderCompleteArgs): Promise<string>;
|
|
45
46
|
addReadRoot(absPath: string, source?: 'slash' | 'tool', sessionId?: string): void;
|
|
@@ -4,7 +4,7 @@ import type { SkillExecutor } from '../../tools/skill-executor.js';
|
|
|
4
4
|
export interface SystemPromptWiringArgs {
|
|
5
5
|
config: AgentConfig;
|
|
6
6
|
skillExecutor?: SkillExecutor;
|
|
7
|
-
|
|
7
|
+
workspacePromptEnabled: boolean;
|
|
8
8
|
readOnlyMemory: boolean | undefined;
|
|
9
9
|
readOnlyState: boolean | undefined;
|
|
10
10
|
resolvedSessionId: string | undefined;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type ToolPermissionConfig } from '../../tools/permissions.js';
|
|
2
|
+
export declare function providerGrantsTool(toolName: string, permissions: ToolPermissionConfig | undefined, hasWorkspaceStore: boolean): boolean;
|
|
3
|
+
export declare function grantsWorkspacePrompt(grantsTool: (toolName: string) => boolean): boolean;
|
|
@@ -31,14 +31,8 @@ export declare function resolveBinding(input: string | undefined, bindings?: Mod
|
|
|
31
31
|
export declare function resolveModelInput(input: string | undefined, bindings?: ModelSlots): string | undefined;
|
|
32
32
|
export declare function unconfiguredSlotError(input: string | undefined, bindings?: ModelSlots): string | undefined;
|
|
33
33
|
export declare function parseModelsConfig(raw: unknown): Partial<Record<SlotName, ModelSlotBinding>>;
|
|
34
|
+
export { coerceSlotBindingInput } from './model-slots.coerce.js';
|
|
34
35
|
export declare const MAX_CONTEXT_WINDOW_OVERRIDE = 10000000;
|
|
35
36
|
export declare function contextWindowOverrideFor(concreteId: string, bindings?: ModelSlots): number | undefined;
|
|
36
37
|
export { maxOutputTokensOverrideFor } from './model-slots.output-override.js';
|
|
37
38
|
export declare function _resetJsonStringSlotWarnings(): void;
|
|
38
|
-
export declare function coerceSlotBindingInput(raw: unknown): {
|
|
39
|
-
ok: true;
|
|
40
|
-
value: ModelSlotBinding;
|
|
41
|
-
} | {
|
|
42
|
-
ok: false;
|
|
43
|
-
error: string;
|
|
44
|
-
};
|
|
@@ -34,7 +34,7 @@ export interface CreateChildProviderFactoryOptions {
|
|
|
34
34
|
workspaceStore?: WorkspaceStore;
|
|
35
35
|
}
|
|
36
36
|
export declare function createChildProviderFactory(opts?: CreateChildProviderFactoryOptions): (args: ChildProviderFactoryArgs) => ModelProvider;
|
|
37
|
-
export declare function buildReadOnlyReconProvider(model: AgentModelInput | undefined, openaiBaseUrl?: string, allowedTools?: readonly string[]): ModelProvider;
|
|
37
|
+
export declare function buildReadOnlyReconProvider(model: AgentModelInput | undefined, openaiBaseUrl?: string, allowedTools?: readonly string[], workspaceStore?: WorkspaceStore): ModelProvider;
|
|
38
38
|
export declare const COMPOSE_LEAF_STRIPPED_TOOLS: ReadonlySet<string>;
|
|
39
39
|
export interface BuildComposeNodeProviderOpts {
|
|
40
40
|
openaiBaseUrl?: string;
|
|
@@ -46,4 +46,4 @@ export declare function buildComposeNodeProvider(model: AgentModelInput | undefi
|
|
|
46
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
|
-
export declare function buildPhaseRestrictedProvider(_role: 'read-only', model: AgentModelInput | undefined): ModelProvider;
|
|
49
|
+
export declare function buildPhaseRestrictedProvider(_role: 'read-only', model: AgentModelInput | undefined, workspaceStore?: WorkspaceStore): ModelProvider;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { AgentConfig } from '../types/config-types.js';
|
|
2
2
|
import type { WorkspaceEntry } from './workspace-store.js';
|
|
3
|
-
export
|
|
4
|
-
|
|
3
|
+
export interface WorkspaceToolAccess {
|
|
4
|
+
publish: boolean;
|
|
5
|
+
query: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function renderWorkspacePreamble(entries: WorkspaceEntry[], access?: WorkspaceToolAccess): string;
|
|
8
|
+
export declare function injectWorkspacePreamble(config: AgentConfig, entries: WorkspaceEntry[], access?: WorkspaceToolAccess): AgentConfig;
|
|
5
9
|
export declare const WORKSPACE_CONTEXT_HEADER = "# Workspace context (shared findings from sibling agents)";
|
|
6
10
|
export declare const WORKSPACE_COLD_START_HEADER = "# Workspace (shared agent scratchpad)";
|
|
7
11
|
export declare const WORKSPACE_TRUNCATED_NOTICE = "[Workspace preamble truncated: too many entries. Earlier entries omitted.]";
|