agent-afk 5.323.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.
@@ -317,4 +317,5 @@ export interface ModelProvider {
317
317
  query(args: ProviderQueryArgs): ProviderQuery;
318
318
  complete?(args: ProviderCompleteArgs): Promise<string>;
319
319
  close?(): void | Promise<void>;
320
+ grantsTool?(toolName: string): boolean;
320
321
  }
@@ -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;
@@ -36,6 +36,7 @@ export declare class OpenAICompatibleProvider implements ModelProvider {
36
36
  writeRoots: string[];
37
37
  allowAll: boolean;
38
38
  };
39
+ grantsTool(toolName: string): boolean;
39
40
  close(): void;
40
41
  complete(args: ProviderCompleteArgs): Promise<string>;
41
42
  }
@@ -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
- hasWorkspaceStore: boolean;
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;
@@ -0,0 +1,8 @@
1
+ import type { ModelSlotBinding } from './model-slots.js';
2
+ export declare function coerceSlotBindingInput(raw: unknown): {
3
+ ok: true;
4
+ value: ModelSlotBinding;
5
+ } | {
6
+ ok: false;
7
+ error: string;
8
+ };
@@ -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
- };
@@ -8,5 +8,6 @@ export interface RunWaveOptions {
8
8
  failFast?: boolean;
9
9
  teardown?: boolean;
10
10
  maxConcurrency?: number;
11
+ provider?: string;
11
12
  }
12
13
  export declare function runWave<T = unknown>(tasks: ReadonlyArray<WaveTask<T>>, options?: RunWaveOptions): Promise<SubagentResult<T>[]>;
@@ -0,0 +1,10 @@
1
+ export interface LspDiagnostic {
2
+ severity: number;
3
+ message: string;
4
+ line: number;
5
+ col: number;
6
+ }
7
+ export declare function isLspDiagnosticsEnabled(): boolean;
8
+ export declare function queryLspDiagnostics(filePath: string, serverCmd?: readonly string[]): Promise<LspDiagnostic[]>;
9
+ export declare function formatDiagnostics(filePath: string, diags: LspDiagnostic[]): string;
10
+ export declare function appendLspDiagnostics(filePath: string, serverCmd?: readonly string[]): Promise<string>;
@@ -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 declare function renderWorkspacePreamble(entries: WorkspaceEntry[]): string;
4
- export declare function injectWorkspacePreamble(config: AgentConfig, entries: WorkspaceEntry[]): AgentConfig;
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.]";