agent-afk 5.97.7 → 5.98.0
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/fast-mode.d.ts +24 -0
- package/dist/agent/providers/anthropic-direct/auth.d.ts +1 -1
- package/dist/agent/providers/anthropic-direct/beta-headers.d.ts +10 -0
- package/dist/agent/providers/anthropic-direct/index.d.ts +3 -49
- package/dist/agent/providers/anthropic-direct/loop/round-request.d.ts +2 -1
- package/dist/agent/providers/anthropic-direct/pricing.d.ts +6 -1
- package/dist/agent/providers/anthropic-direct/provider-context.d.ts +31 -0
- package/dist/agent/providers/anthropic-direct/provider-grants.d.ts +16 -0
- package/dist/agent/providers/anthropic-direct/provider-options.d.ts +2 -0
- package/dist/agent/providers/anthropic-direct/provider-query-build.d.ts +4 -0
- package/dist/agent/providers/anthropic-direct/provider-query-setup.d.ts +26 -0
- package/dist/agent/providers/anthropic-direct/provider-runtime.d.ts +46 -0
- package/dist/agent/providers/anthropic-direct/provider-schemas.d.ts +3 -0
- package/dist/agent/providers/anthropic-direct/query/auth-retry-tier.d.ts +5 -0
- package/dist/agent/providers/anthropic-direct/query/overload-pause-tier.d.ts +4 -0
- package/dist/agent/providers/anthropic-direct/query/retry-constants.d.ts +6 -0
- package/dist/agent/providers/anthropic-direct/query/retry-context.d.ts +20 -0
- package/dist/agent/providers/anthropic-direct/query/retry-layer.d.ts +4 -8
- package/dist/agent/providers/anthropic-direct/query/turn-request.d.ts +31 -0
- package/dist/agent/providers/anthropic-direct/query/usage-limit-pause.d.ts +5 -0
- package/dist/agent/providers/anthropic-direct/query/usage-limit-tier.d.ts +4 -0
- package/dist/agent/providers/anthropic-direct/query-capabilities.d.ts +6 -0
- package/dist/agent/providers/anthropic-direct/query-events.d.ts +2 -0
- package/dist/agent/providers/anthropic-direct/query-live-updates.d.ts +21 -0
- package/dist/agent/providers/anthropic-direct/query-maintenance.d.ts +13 -0
- package/dist/agent/providers/anthropic-direct/query-options.d.ts +42 -0
- package/dist/agent/providers/anthropic-direct/query-runtime.d.ts +53 -0
- package/dist/agent/providers/anthropic-direct/query-system.d.ts +7 -0
- package/dist/agent/providers/anthropic-direct/query-turn-driver.d.ts +30 -0
- package/dist/agent/providers/anthropic-direct/query.d.ts +2 -88
- package/dist/agent/providers/anthropic-direct/request-types.d.ts +56 -0
- package/dist/agent/providers/anthropic-direct/types.d.ts +6 -58
- package/dist/agent/providers/anthropic-direct/usage.d.ts +4 -0
- package/dist/cli/commands/interactive/bootstrap-providers.d.ts +2 -0
- package/dist/cli/commands/interactive/bootstrap-slash-context.d.ts +5 -0
- package/dist/cli/provider-parser.d.ts +12 -0
- package/dist/cli/shared-helpers.d.ts +3 -18
- package/dist/cli/slash/commands/fast.d.ts +2 -0
- package/dist/cli/slash/types.d.ts +3 -0
- package/dist/cli/system-prompt.d.ts +8 -0
- package/dist/cli.mjs +705 -705
- package/dist/index.mjs +319 -319
- package/dist/telegram.mjs +276 -276
- package/package.json +1 -1
|
@@ -1,88 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import type { ProviderAccountInfo, ProviderAgentInfo, ProviderCommandInfo, ProviderCompactResult, ProviderContextUsage, ProviderEvent, ProviderMcpServerStatus, ProviderModelInfo, ProviderQuery, ProviderRewindConversationResult, ProviderRewindResult, ProviderUserTurn, RewindTarget } from '../../provider.js';
|
|
4
|
-
import type { ToolDispatcher } from './tool-dispatcher.js';
|
|
5
|
-
import type { AnthropicToolDef, AuthMode } from './types.js';
|
|
6
|
-
import type { HookRegistry } from '../../hooks.js';
|
|
7
|
-
export interface AnthropicDirectQueryOptions {
|
|
8
|
-
client: Anthropic;
|
|
9
|
-
authMode: AuthMode;
|
|
10
|
-
promptStream: AsyncIterable<ProviderUserTurn>;
|
|
11
|
-
toolDispatcher: ToolDispatcher;
|
|
12
|
-
sessionId?: string;
|
|
13
|
-
initialMessages?: MessageParam[];
|
|
14
|
-
model: string;
|
|
15
|
-
requestedModel?: string;
|
|
16
|
-
permissionMode?: string;
|
|
17
|
-
maxTokens: number;
|
|
18
|
-
tools: AnthropicToolDef[] | null;
|
|
19
|
-
userSystem: string | null;
|
|
20
|
-
systemPrefix: ContentBlockParam[] | null;
|
|
21
|
-
tokenRefresher?: () => Promise<Anthropic | null>;
|
|
22
|
-
thinking?: import('@anthropic-ai/sdk/resources').ThinkingConfigParam;
|
|
23
|
-
effort?: import('../../types/sdk-types.js').EffortLevel;
|
|
24
|
-
baseUrl?: string;
|
|
25
|
-
maxToolUseIterations?: number;
|
|
26
|
-
traceWriter?: import('../../trace/index.js').TraceWriter;
|
|
27
|
-
subagentId?: string;
|
|
28
|
-
autoResumeOnUsageLimit?: boolean;
|
|
29
|
-
surface?: string;
|
|
30
|
-
cwdDependentsFactory?: (cwd: string) => {
|
|
31
|
-
userSystem: string;
|
|
32
|
-
dispatcher: ToolDispatcher;
|
|
33
|
-
};
|
|
34
|
-
systemPromptRebuildFactory?: (basePrompt: string | undefined) => string;
|
|
35
|
-
onPermissionMode?: (mode: string) => void;
|
|
36
|
-
mcpManager?: import('../../mcp/index.js').McpManager;
|
|
37
|
-
autoCompactThreshold?: number;
|
|
38
|
-
hookRegistry?: HookRegistry;
|
|
39
|
-
throttleQueue?: import('./throttle-queue.js').ThrottleQueue;
|
|
40
|
-
}
|
|
41
|
-
export declare class AnthropicDirectQuery implements ProviderQuery {
|
|
42
|
-
private readonly initSessionId;
|
|
43
|
-
private readonly promptStream;
|
|
44
|
-
private readonly maxTokens;
|
|
45
|
-
private readonly tools;
|
|
46
|
-
private readonly systemPrefix;
|
|
47
|
-
private readonly thinking?;
|
|
48
|
-
private readonly effort?;
|
|
49
|
-
private readonly baseUrl?;
|
|
50
|
-
private readonly maxToolUseIterations?;
|
|
51
|
-
private readonly traceWriter?;
|
|
52
|
-
private readonly subagentId?;
|
|
53
|
-
private readonly state;
|
|
54
|
-
private readonly abort;
|
|
55
|
-
private readonly retry;
|
|
56
|
-
private readonly cwdDependentsFactory?;
|
|
57
|
-
private readonly systemPromptRebuildFactory?;
|
|
58
|
-
private readonly onPermissionMode?;
|
|
59
|
-
private readonly mcpManager?;
|
|
60
|
-
private readonly hookRegistry?;
|
|
61
|
-
private readonly throttleQueue?;
|
|
62
|
-
constructor(opts: AnthropicDirectQueryOptions);
|
|
63
|
-
[Symbol.asyncIterator](): AsyncIterator<ProviderEvent>;
|
|
64
|
-
private composeSystem;
|
|
65
|
-
interrupt(reason?: import('../../abort-reason.js').ProviderAbortReason): Promise<void>;
|
|
66
|
-
private makeInterruptedTurnEvent;
|
|
67
|
-
setModel(model?: string): Promise<void>;
|
|
68
|
-
setPermissionMode(mode: string): Promise<void>;
|
|
69
|
-
setCwd(cwd: string): void;
|
|
70
|
-
setSystemPrompt(basePrompt: string | undefined): boolean;
|
|
71
|
-
supportedCommands(): Promise<ProviderCommandInfo[]>;
|
|
72
|
-
supportedModels(): Promise<ProviderModelInfo[]>;
|
|
73
|
-
supportedAgents(): Promise<ProviderAgentInfo[]>;
|
|
74
|
-
getContextUsage(): Promise<ProviderContextUsage>;
|
|
75
|
-
mcpServerStatus(): Promise<ProviderMcpServerStatus[]>;
|
|
76
|
-
accountInfo(): Promise<ProviderAccountInfo>;
|
|
77
|
-
reauth(): Promise<{
|
|
78
|
-
accountId: string;
|
|
79
|
-
swapped: boolean;
|
|
80
|
-
} | null>;
|
|
81
|
-
rewindFiles(_userMessageId: string, _options?: {
|
|
82
|
-
dryRun?: boolean;
|
|
83
|
-
}): Promise<ProviderRewindResult>;
|
|
84
|
-
compact(): Promise<ProviderCompactResult>;
|
|
85
|
-
listRewindTargets(): RewindTarget[];
|
|
86
|
-
rewindConversation(turnIndex: number): Promise<ProviderRewindConversationResult>;
|
|
87
|
-
close(): void;
|
|
88
|
-
}
|
|
1
|
+
export { AnthropicDirectQuery } from './query-runtime.js';
|
|
2
|
+
export type { AnthropicDirectQueryOptions } from './query-runtime.js';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { ContentBlockParam, MessageParam, RawMessageStreamEvent, ThinkingConfigParam } from '@anthropic-ai/sdk/resources';
|
|
2
|
+
import type { ProviderUsage } from '../../provider.js';
|
|
3
|
+
import type { AnthropicToolDef, ToolDispatcherLike, TranslateCtx } from './types.js';
|
|
4
|
+
export interface RunTurnInput {
|
|
5
|
+
client: AnthropicClientLike;
|
|
6
|
+
messages: MessageParam[];
|
|
7
|
+
system: ContentBlockParam[] | string | null;
|
|
8
|
+
tools: AnthropicToolDef[] | null;
|
|
9
|
+
toolDispatcher: ToolDispatcherLike;
|
|
10
|
+
model: string;
|
|
11
|
+
maxTokens: number;
|
|
12
|
+
headers: Record<string, string>;
|
|
13
|
+
signal: AbortSignal;
|
|
14
|
+
ctx: TranslateCtx;
|
|
15
|
+
maxToolUseIterations?: number;
|
|
16
|
+
thinking?: ThinkingConfigParam;
|
|
17
|
+
effort?: import('../../types/sdk-types.js').EffortLevel;
|
|
18
|
+
fastMode?: boolean;
|
|
19
|
+
baseUrl?: string;
|
|
20
|
+
traceWriter?: import('../../trace/index.js').TraceWriter;
|
|
21
|
+
subagentId?: string;
|
|
22
|
+
onUsageProgress?: (usage: ProviderUsage) => void;
|
|
23
|
+
throttleQueue?: import('./throttle-queue.js').ThrottleQueue;
|
|
24
|
+
}
|
|
25
|
+
export interface AnthropicClientLike {
|
|
26
|
+
messages: {
|
|
27
|
+
create(params: AnthropicMessagesCreateParams, options?: {
|
|
28
|
+
headers?: Record<string, string>;
|
|
29
|
+
signal?: AbortSignal;
|
|
30
|
+
}): Promise<AsyncIterable<RawMessageStreamEvent>> | AsyncIterable<RawMessageStreamEvent>;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export interface WireToolDef {
|
|
34
|
+
name: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
input_schema: {
|
|
37
|
+
type: 'object';
|
|
38
|
+
properties?: Record<string, unknown>;
|
|
39
|
+
required?: string[];
|
|
40
|
+
[k: string]: unknown;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export interface AnthropicMessagesCreateParams {
|
|
44
|
+
model: string;
|
|
45
|
+
max_tokens: number;
|
|
46
|
+
messages: MessageParam[];
|
|
47
|
+
system?: ContentBlockParam[] | string;
|
|
48
|
+
tools?: WireToolDef[];
|
|
49
|
+
thinking?: ThinkingConfigParam;
|
|
50
|
+
output_config?: {
|
|
51
|
+
effort?: import('../../types/sdk-types.js').EffortLevel;
|
|
52
|
+
};
|
|
53
|
+
speed?: 'fast';
|
|
54
|
+
stream: true;
|
|
55
|
+
metadata?: Record<string, unknown>;
|
|
56
|
+
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import type { ContentBlockParam,
|
|
2
|
-
import type { ProviderEvent
|
|
1
|
+
import type { ContentBlockParam, ToolUseBlock, Usage } from '@anthropic-ai/sdk/resources';
|
|
2
|
+
import type { ProviderEvent } from '../../provider.js';
|
|
3
3
|
import type { ToolResult } from '../shared/tool-result.js';
|
|
4
|
-
import { deriveCallCostUsd } from './pricing.js';
|
|
5
4
|
export type { ToolResult, RenderHints } from '../shared/tool-result.js';
|
|
5
|
+
export { MODEL_PRICING, deriveCallCostUsd } from './pricing.js';
|
|
6
|
+
export type { ModelPricing, CacheWriteSplit, AnthropicSpeed, SpeedPricingContext, } from './pricing.js';
|
|
7
|
+
export { toProviderUsage } from './usage.js';
|
|
8
|
+
export type { RunTurnInput, AnthropicClientLike, WireToolDef, AnthropicMessagesCreateParams, } from './request-types.js';
|
|
6
9
|
export type AuthMode = 'oauth' | 'api-key';
|
|
7
10
|
export interface ToolCall {
|
|
8
11
|
id: string;
|
|
@@ -27,57 +30,6 @@ export interface TurnResult {
|
|
|
27
30
|
usage: Usage | null;
|
|
28
31
|
text: string;
|
|
29
32
|
}
|
|
30
|
-
export interface RunTurnInput {
|
|
31
|
-
client: AnthropicClientLike;
|
|
32
|
-
messages: MessageParam[];
|
|
33
|
-
system: ContentBlockParam[] | string | null;
|
|
34
|
-
tools: AnthropicToolDef[] | null;
|
|
35
|
-
toolDispatcher: ToolDispatcherLike;
|
|
36
|
-
model: string;
|
|
37
|
-
maxTokens: number;
|
|
38
|
-
headers: Record<string, string>;
|
|
39
|
-
signal: AbortSignal;
|
|
40
|
-
ctx: TranslateCtx;
|
|
41
|
-
maxToolUseIterations?: number;
|
|
42
|
-
thinking?: ThinkingConfigParam;
|
|
43
|
-
effort?: import('../../types/sdk-types.js').EffortLevel;
|
|
44
|
-
baseUrl?: string;
|
|
45
|
-
traceWriter?: import('../../trace/index.js').TraceWriter;
|
|
46
|
-
subagentId?: string;
|
|
47
|
-
onUsageProgress?: (usage: ProviderUsage) => void;
|
|
48
|
-
throttleQueue?: import('./throttle-queue.js').ThrottleQueue;
|
|
49
|
-
}
|
|
50
|
-
export interface AnthropicClientLike {
|
|
51
|
-
messages: {
|
|
52
|
-
create(params: AnthropicMessagesCreateParams, options?: {
|
|
53
|
-
headers?: Record<string, string>;
|
|
54
|
-
signal?: AbortSignal;
|
|
55
|
-
}): Promise<AsyncIterable<RawMessageStreamEvent>> | AsyncIterable<RawMessageStreamEvent>;
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
export interface WireToolDef {
|
|
59
|
-
name: string;
|
|
60
|
-
description?: string;
|
|
61
|
-
input_schema: {
|
|
62
|
-
type: 'object';
|
|
63
|
-
properties?: Record<string, unknown>;
|
|
64
|
-
required?: string[];
|
|
65
|
-
[k: string]: unknown;
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
export interface AnthropicMessagesCreateParams {
|
|
69
|
-
model: string;
|
|
70
|
-
max_tokens: number;
|
|
71
|
-
messages: MessageParam[];
|
|
72
|
-
system?: ContentBlockParam[] | string;
|
|
73
|
-
tools?: WireToolDef[];
|
|
74
|
-
thinking?: ThinkingConfigParam;
|
|
75
|
-
output_config?: {
|
|
76
|
-
effort?: import('../../types/sdk-types.js').EffortLevel;
|
|
77
|
-
};
|
|
78
|
-
stream: true;
|
|
79
|
-
metadata?: Record<string, unknown>;
|
|
80
|
-
}
|
|
81
33
|
export type ToolCategory = 'read' | 'write' | 'shell' | 'subagent' | 'skill' | 'dag' | 'mcp' | 'web' | 'browser' | 'planning' | 'schedule' | 'other';
|
|
82
34
|
export interface AnthropicToolDef {
|
|
83
35
|
name: string;
|
|
@@ -98,8 +50,4 @@ export interface ToolDispatcherLike {
|
|
|
98
50
|
setResolveBase?(cwd: string): void;
|
|
99
51
|
setAllowAll?(allow: boolean): void;
|
|
100
52
|
}
|
|
101
|
-
export { MODEL_PRICING } from './pricing.js';
|
|
102
|
-
export { deriveCallCostUsd };
|
|
103
|
-
export type { ModelPricing, CacheWriteSplit } from './pricing.js';
|
|
104
|
-
export declare function toProviderUsage(usage: Usage | null, stopReason: string | null, model?: string): ProviderUsage;
|
|
105
53
|
export { sumProviderUsage } from '../../usage.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Usage } from '@anthropic-ai/sdk/resources';
|
|
2
|
+
import type { ProviderUsage } from '../../provider.js';
|
|
3
|
+
import { type AnthropicSpeed } from './pricing.js';
|
|
4
|
+
export declare function toProviderUsage(usage: Usage | null, stopReason: string | null, model?: string, requestSpeed?: AnthropicSpeed): ProviderUsage;
|
|
@@ -6,6 +6,7 @@ import type { ComposeExecutor } from '../../../agent/tools/compose-executor.js';
|
|
|
6
6
|
import type { McpManager } from '../../../agent/mcp/index.js';
|
|
7
7
|
import type { CliConfig } from '../../config.js';
|
|
8
8
|
import type { CliOptions } from './shared.js';
|
|
9
|
+
import type { FastModeController } from '../../../agent/fast-mode.js';
|
|
9
10
|
export declare function createReplProviders(a: {
|
|
10
11
|
options: CliOptions;
|
|
11
12
|
cliConfig: CliConfig;
|
|
@@ -15,6 +16,7 @@ export declare function createReplProviders(a: {
|
|
|
15
16
|
composeExecutor: ComposeExecutor;
|
|
16
17
|
memoryStore: MemoryStore;
|
|
17
18
|
mcpManager: McpManager | undefined;
|
|
19
|
+
fastModeController: FastModeController;
|
|
18
20
|
}): {
|
|
19
21
|
providerFactory: (m: string | undefined) => ModelProvider;
|
|
20
22
|
startupProvider: ModelProvider;
|
|
@@ -7,6 +7,7 @@ import type { GitStatusSampler } from '../../git-status-sampler.js';
|
|
|
7
7
|
import type { TrustedSkillLedger } from '../../trusted-skill-ledger.js';
|
|
8
8
|
import type { McpManager } from '../../../agent/mcp/index.js';
|
|
9
9
|
import type { createConsoleWriter } from '../../slash/writer.js';
|
|
10
|
+
import type { FastModeController } from '../../../agent/fast-mode.js';
|
|
10
11
|
export declare function createReplSlashContext(a: {
|
|
11
12
|
sessionRef: SessionRef;
|
|
12
13
|
stats: SessionStats;
|
|
@@ -16,4 +17,8 @@ export declare function createReplSlashContext(a: {
|
|
|
16
17
|
gitStatusSampler: GitStatusSampler;
|
|
17
18
|
ledger: TrustedSkillLedger;
|
|
18
19
|
mcpManager: McpManager | undefined;
|
|
20
|
+
fastModeController: FastModeController;
|
|
21
|
+
anthropicBaseUrl?: string;
|
|
22
|
+
openaiBaseUrl?: string;
|
|
23
|
+
explicitProvider?: string;
|
|
19
24
|
}): SlashContext;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ModelProvider } from '../agent/provider.js';
|
|
2
|
+
export type ParseProviderOptions = {
|
|
3
|
+
subagentExecutor?: import('../agent/tools/subagent-executor.js').SubagentExecutor;
|
|
4
|
+
skillExecutor?: import('../agent/tools/skill-executor.js').SkillExecutor;
|
|
5
|
+
composeExecutor?: import('../agent/tools/compose-executor.js').ComposeExecutor;
|
|
6
|
+
memoryStore?: import('../agent/memory/index.js').MemoryStore;
|
|
7
|
+
mcpManager?: import('../agent/mcp/index.js').McpManager;
|
|
8
|
+
model?: string;
|
|
9
|
+
openaiBaseUrl?: string;
|
|
10
|
+
fastModeController?: import('../agent/fast-mode.js').FastModeController;
|
|
11
|
+
};
|
|
12
|
+
export declare function parseProvider(raw: string | undefined, opts?: ParseProviderOptions): ModelProvider | undefined;
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import type { ModelProvider } from '../agent/provider.js';
|
|
2
1
|
import type { AgentModelInput, ThinkingConfig, EffortLevel } from '../agent/types.js';
|
|
3
2
|
import type { GrantManager } from './slash/commands/allow-dir.js';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export declare function composeSystemPrompt(framework: string | undefined, overlay: string | undefined): string | undefined;
|
|
8
|
-
export declare function resolveBaseSystemPrompt(cwd?: string): {
|
|
9
|
-
prompt: string | undefined;
|
|
10
|
-
source: string;
|
|
11
|
-
};
|
|
3
|
+
export { composeSystemPrompt, loadConfigSystemPrompt, loadSystemPrompt, OPERATOR_CONFIG_HEADER, resolveBaseSystemPrompt, } from './system-prompt.js';
|
|
4
|
+
export { parseProvider } from './provider-parser.js';
|
|
5
|
+
export type { ParseProviderOptions } from './provider-parser.js';
|
|
12
6
|
export declare function getApiKey(): string | undefined;
|
|
13
7
|
export declare function getCodexApiKey(): string | undefined;
|
|
14
8
|
export declare function getApiKeyForModel(model: string | undefined): string | undefined;
|
|
@@ -25,13 +19,4 @@ export declare function parseMaxOutputTokens(raw: string | undefined): number |
|
|
|
25
19
|
export declare function getMaxOutputTokens(): number | undefined;
|
|
26
20
|
export declare function parseMaxToolUseIterations(raw: string | undefined): number | undefined;
|
|
27
21
|
export declare function getMaxToolUseIterations(): number | undefined;
|
|
28
|
-
export declare function parseProvider(raw: string | undefined, opts?: {
|
|
29
|
-
subagentExecutor?: import('../agent/tools/subagent-executor.js').SubagentExecutor;
|
|
30
|
-
skillExecutor?: import('../agent/tools/skill-executor.js').SkillExecutor;
|
|
31
|
-
composeExecutor?: import('../agent/tools/compose-executor.js').ComposeExecutor;
|
|
32
|
-
memoryStore?: import('../agent/memory/index.js').MemoryStore;
|
|
33
|
-
mcpManager?: import('../agent/mcp/index.js').McpManager;
|
|
34
|
-
model?: string;
|
|
35
|
-
openaiBaseUrl?: string;
|
|
36
|
-
}): ModelProvider | undefined;
|
|
37
22
|
export declare function isGrantManager(p: unknown): p is GrantManager;
|
|
@@ -6,6 +6,7 @@ import type { PermissionMode } from '../../agent/types/sdk-types.js';
|
|
|
6
6
|
import type { TrustedSkillLedger } from '../trusted-skill-ledger.js';
|
|
7
7
|
import type { ImageAttachment } from '../input/attachments.js';
|
|
8
8
|
import type { ResolvedResumeTarget } from '../resume-session.js';
|
|
9
|
+
import type { FastModeContext, FastModeController } from '../../agent/fast-mode.js';
|
|
9
10
|
export type ResumeSwapResult = {
|
|
10
11
|
ok: true;
|
|
11
12
|
sessionId: string;
|
|
@@ -74,6 +75,8 @@ export interface SlashContext {
|
|
|
74
75
|
out: Writer;
|
|
75
76
|
ui: UiSurface;
|
|
76
77
|
ledger?: TrustedSkillLedger;
|
|
78
|
+
fastMode?: FastModeController;
|
|
79
|
+
getFastModeContext?: () => FastModeContext;
|
|
77
80
|
requestResume?: (target: ResolvedResumeTarget) => Promise<ResumeSwapResult>;
|
|
78
81
|
mcpManager?: import('../../agent/mcp/index.js').McpManager;
|
|
79
82
|
getCompositor?: () => import('../terminal-compositor.js').TerminalCompositor | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function loadSystemPrompt(): string | undefined;
|
|
2
|
+
export declare function loadConfigSystemPrompt(): string | undefined;
|
|
3
|
+
export declare const OPERATOR_CONFIG_HEADER: string;
|
|
4
|
+
export declare function composeSystemPrompt(framework: string | undefined, overlay: string | undefined): string | undefined;
|
|
5
|
+
export declare function resolveBaseSystemPrompt(cwd?: string): {
|
|
6
|
+
prompt: string | undefined;
|
|
7
|
+
source: string;
|
|
8
|
+
};
|