agent-afk 5.313.8 → 5.313.9
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/cli/commands/chat.action-body.d.ts +65 -0
- package/dist/cli/commands/chat.session-flags.d.ts +6 -0
- package/dist/cli.mjs +431 -431
- package/dist/index.mjs +176 -176
- package/dist/telegram.mjs +186 -186
- package/package.json +1 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { AgentSession } from '../../agent/session.js';
|
|
2
|
+
import type { AgentModelInput } from '../../agent/types.js';
|
|
3
|
+
import { parseThinking, parseEffort } from '../shared-helpers.js';
|
|
4
|
+
import { setupWorktree } from './interactive/worktree.js';
|
|
5
|
+
import { resolveResumeTarget, resumeConfigFor } from '../resume-session.js';
|
|
6
|
+
import { createSessionStats } from '../slash/session-stats.js';
|
|
7
|
+
import { type PostTarget } from '../slash/_lib/review-post.js';
|
|
8
|
+
import type { MemoryStore } from '../../agent/memory/index.js';
|
|
9
|
+
import type { StateStore } from '../../agent/state/state-store.js';
|
|
10
|
+
import type { WorkspaceStore } from '../../agent/workspace/workspace-store.js';
|
|
11
|
+
import type { McpManager } from '../../agent/mcp/index.js';
|
|
12
|
+
export interface ChatActionOptions {
|
|
13
|
+
model: AgentModelInput;
|
|
14
|
+
stream: boolean;
|
|
15
|
+
format: string;
|
|
16
|
+
maxTurns: string;
|
|
17
|
+
thinking?: string;
|
|
18
|
+
effort?: string;
|
|
19
|
+
theme?: 'dark' | 'light' | 'umber' | 'auto';
|
|
20
|
+
maxBudgetUsd?: string;
|
|
21
|
+
taskBudget?: string;
|
|
22
|
+
maxOutputTokens?: string;
|
|
23
|
+
provider?: string;
|
|
24
|
+
dumpPrompt?: string | boolean;
|
|
25
|
+
worktree?: string | true;
|
|
26
|
+
worktreeBase?: string;
|
|
27
|
+
mcpConfig?: string;
|
|
28
|
+
resume?: string;
|
|
29
|
+
continue?: boolean;
|
|
30
|
+
sessionId?: string;
|
|
31
|
+
post?: string;
|
|
32
|
+
postPr?: string;
|
|
33
|
+
dangerouslySkipPermissions?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export declare function resolvePostTargets(post: string | undefined): PostTarget[];
|
|
36
|
+
export declare function resolveModelOptions(options: Pick<ChatActionOptions, 'thinking' | 'effort' | 'maxBudgetUsd' | 'taskBudget' | 'maxOutputTokens'>): {
|
|
37
|
+
thinking: ReturnType<typeof parseThinking>;
|
|
38
|
+
effort: ReturnType<typeof parseEffort>;
|
|
39
|
+
maxBudgetUsd: number | undefined;
|
|
40
|
+
taskBudget: number | undefined;
|
|
41
|
+
maxOutputTokens: number | undefined;
|
|
42
|
+
maxToolUseIterations: number | undefined;
|
|
43
|
+
};
|
|
44
|
+
export declare function resolveResumeConfig(options: Pick<ChatActionOptions, 'resume' | 'continue' | 'sessionId' | 'model'>, resumeTarget: ReturnType<typeof resolveResumeTarget>, stats: ReturnType<typeof createSessionStats>): {
|
|
45
|
+
resumeConfig: ReturnType<typeof resumeConfigFor>;
|
|
46
|
+
shouldPersist: boolean;
|
|
47
|
+
persistId: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
export declare function buildMaybePublish(postTargets: PostTarget[], postPr: string | undefined): (reviewText: string, errored: boolean) => Promise<void>;
|
|
50
|
+
export declare function runSessionTeardown(params: {
|
|
51
|
+
shouldPersist: boolean;
|
|
52
|
+
stats: ReturnType<typeof createSessionStats>;
|
|
53
|
+
persistId: string | undefined;
|
|
54
|
+
encounteredError: boolean;
|
|
55
|
+
session: AgentSession | null;
|
|
56
|
+
receiptTracePath: string | undefined;
|
|
57
|
+
mcpManagerRef: McpManager | undefined;
|
|
58
|
+
teardownStores: {
|
|
59
|
+
sharedMemoryStore: MemoryStore;
|
|
60
|
+
sharedStateStore: StateStore;
|
|
61
|
+
workspaceStore: WorkspaceStore | undefined;
|
|
62
|
+
} | undefined;
|
|
63
|
+
worktreeHandle: Awaited<ReturnType<typeof setupWorktree>> | undefined;
|
|
64
|
+
}): Promise<void>;
|
|
65
|
+
export declare function runChatAction(rawMessage: string | undefined, options: ChatActionOptions): Promise<void>;
|