agent-afk 5.296.3 → 5.296.4
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/daemon/tool-health-task.d.ts +1 -0
- package/dist/cli/commands/chat.mcp-setup.d.ts +8 -0
- package/dist/cli/commands/chat.response-output.d.ts +24 -0
- package/dist/cli/commands/chat.session-setup.d.ts +46 -0
- package/dist/cli/commands/chat.stdin-stream.d.ts +3 -0
- package/dist/cli/commands/farm.d.ts +4 -5
- package/dist/cli/commands/farm.escape-check.d.ts +4 -0
- package/dist/cli/commands/farm.run-record.d.ts +4 -0
- package/dist/cli/commands/farm.summary.d.ts +11 -0
- package/dist/cli/commands/interactive/worktree.cleanup.d.ts +11 -0
- package/dist/cli/commands/interactive/worktree.errors.d.ts +5 -0
- package/dist/cli/commands/interactive/worktree.refs.d.ts +5 -0
- package/dist/cli.mjs +584 -583
- package/dist/index.mjs +134 -134
- package/dist/telegram.mjs +156 -156
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { TelemetryRecord, TelemetryTrigger } from './scheduler.js';
|
|
2
|
+
export declare function _resetToolHealthAlertCooldownForTests(): void;
|
|
2
3
|
export declare const TOOL_HEALTH_LOOKBACK_MS: number;
|
|
3
4
|
export declare const TOOL_HEALTH_MIN_SESSIONS = 2;
|
|
4
5
|
export declare const TOOL_HEALTH_COOLDOWN_MS: number;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { McpManager } from '../../agent/mcp/index.js';
|
|
2
|
+
import type { TraceWriter } from '../../agent/trace/writer.js';
|
|
3
|
+
export interface ChatMcpSetupParams {
|
|
4
|
+
worktreeCwd: string | undefined;
|
|
5
|
+
mcpConfigOverride: string | undefined;
|
|
6
|
+
traceWriter: TraceWriter | undefined;
|
|
7
|
+
}
|
|
8
|
+
export declare function connectMcpForChat(params: ChatMcpSetupParams): Promise<McpManager | undefined>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { AgentSession } from '../../agent/session.js';
|
|
2
|
+
import type { SessionStats } from '../slash/types.js';
|
|
3
|
+
import type { AgentModelInput } from '../../agent/types.js';
|
|
4
|
+
import type { Ora } from 'ora';
|
|
5
|
+
export interface StreamJsonPathParams {
|
|
6
|
+
session: AgentSession;
|
|
7
|
+
message: string;
|
|
8
|
+
stats: SessionStats;
|
|
9
|
+
maybePublish: (reviewText: string, errored: boolean) => Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
export declare function runStreamJsonPath(params: StreamJsonPathParams): Promise<void>;
|
|
12
|
+
export interface TextResponseParams {
|
|
13
|
+
session: AgentSession;
|
|
14
|
+
message: string;
|
|
15
|
+
stats: SessionStats;
|
|
16
|
+
sessionModel: AgentModelInput;
|
|
17
|
+
format: string;
|
|
18
|
+
streamFlag: boolean;
|
|
19
|
+
receiptSessionLabel: string | undefined;
|
|
20
|
+
receiptTracePath: string | undefined;
|
|
21
|
+
maybePublish: (reviewText: string, errored: boolean) => Promise<void>;
|
|
22
|
+
spinner: Ora;
|
|
23
|
+
}
|
|
24
|
+
export declare function renderTextResponse(params: TextResponseParams): Promise<void>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { AgentSession } from '../../agent/session.js';
|
|
2
|
+
import { wireExecutors } from '../../agent/session/wire-executors.js';
|
|
3
|
+
import { MemoryStore } from '../../agent/memory/index.js';
|
|
4
|
+
import { StateStore } from '../../agent/state/state-store.js';
|
|
5
|
+
import { WorkspaceStore } from '../../agent/workspace/workspace-store.js';
|
|
6
|
+
import type { AgentModelInput, ThinkingConfig, EffortLevel } from '../../agent/types.js';
|
|
7
|
+
import type { TraceWriter } from '../../agent/trace/writer.js';
|
|
8
|
+
import type { McpManager } from '../../agent/mcp/index.js';
|
|
9
|
+
import type { PermissionMode } from '../../agent/types/sdk-types.js';
|
|
10
|
+
import type { ProviderRouteHints } from '../../agent/providers/index.js';
|
|
11
|
+
export interface ChatSessionSetupParams {
|
|
12
|
+
model: AgentModelInput;
|
|
13
|
+
sessionModel: AgentModelInput;
|
|
14
|
+
apiKey: string | undefined;
|
|
15
|
+
systemPrompt: string | undefined;
|
|
16
|
+
systemPromptSource: string | undefined;
|
|
17
|
+
basePrompt: string | undefined;
|
|
18
|
+
providerHints: ProviderRouteHints | undefined;
|
|
19
|
+
providerRaw: string | undefined;
|
|
20
|
+
thinking: ThinkingConfig | undefined;
|
|
21
|
+
effort: EffortLevel | undefined;
|
|
22
|
+
maxBudgetUsd: number | undefined;
|
|
23
|
+
taskBudget: number | undefined;
|
|
24
|
+
maxOutputTokens: number | undefined;
|
|
25
|
+
maxToolUseIterations: number | undefined;
|
|
26
|
+
worktreeCwd: string | undefined;
|
|
27
|
+
traceWriter: TraceWriter | undefined;
|
|
28
|
+
mcpManager: McpManager | undefined;
|
|
29
|
+
resumeConfig: Record<string, unknown>;
|
|
30
|
+
permissionMode: PermissionMode | undefined;
|
|
31
|
+
dangerouslySkipPermissions: boolean | undefined;
|
|
32
|
+
maxTurns: number;
|
|
33
|
+
temperature: number | undefined;
|
|
34
|
+
baseUrl: string | undefined;
|
|
35
|
+
openaiBaseUrl: string | undefined;
|
|
36
|
+
autoResumeOnUsageLimit: boolean | undefined;
|
|
37
|
+
}
|
|
38
|
+
export interface ChatSessionSetupResult {
|
|
39
|
+
session: AgentSession;
|
|
40
|
+
rootManager: ReturnType<typeof wireExecutors>['rootManager'];
|
|
41
|
+
composeExecutor: ReturnType<typeof wireExecutors>['composeExecutor'];
|
|
42
|
+
sharedMemoryStore: MemoryStore;
|
|
43
|
+
sharedStateStore: StateStore;
|
|
44
|
+
workspaceStore: WorkspaceStore | undefined;
|
|
45
|
+
}
|
|
46
|
+
export declare function buildChatSession(params: ChatSessionSetupParams): Promise<ChatSessionSetupResult>;
|
|
@@ -5,12 +5,12 @@ import { scoreBranch, writeScore } from '../../skills/score/index.js';
|
|
|
5
5
|
import { writeFarmFact } from '../../skills/score/memory-write.js';
|
|
6
6
|
import { sendFarmDigest } from '../../skills/score/digest.js';
|
|
7
7
|
import { createDefaultTraceWriter } from '../../agent/trace/factory.js';
|
|
8
|
+
import { printSummary, formatScore } from './farm.summary.js';
|
|
9
|
+
export { FarmIsolationViolation } from './farm.escape-check.js';
|
|
10
|
+
export type { BranchResult } from './farm.summary.js';
|
|
11
|
+
export { formatScore, printSummary };
|
|
8
12
|
declare function getCommitCount(worktreePath: string, baseSha: string): Promise<number>;
|
|
9
13
|
declare function getSourceRepoDirtyFiles(sourceCwd: string): Promise<string[]>;
|
|
10
|
-
export declare class FarmIsolationViolation extends Error {
|
|
11
|
-
readonly dirtyFiles: string[];
|
|
12
|
-
constructor(dirtyFiles: string[]);
|
|
13
|
-
}
|
|
14
14
|
export interface RunFarmOptions {
|
|
15
15
|
task: string;
|
|
16
16
|
branches: number;
|
|
@@ -37,4 +37,3 @@ export interface RunFarmOptions {
|
|
|
37
37
|
}
|
|
38
38
|
export declare function runFarm(opts: RunFarmOptions): Promise<void>;
|
|
39
39
|
export declare function registerFarmCommand(program: Command): void;
|
|
40
|
-
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { FarmRunRecord } from '../../skills/score/farm-run-record.js';
|
|
2
|
+
import type { FarmManifest } from '../../agent/worktree.js';
|
|
3
|
+
import type { BranchResult } from './farm.summary.js';
|
|
4
|
+
export declare function buildFarmRunRecord(manifest: FarmManifest, branchResults: BranchResult[], startedAt: string): FarmRunRecord;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type BranchScore } from '../../skills/score/index.js';
|
|
2
|
+
import type { CreatedBranch } from '../../agent/worktree.js';
|
|
3
|
+
export interface BranchResult {
|
|
4
|
+
index: number;
|
|
5
|
+
ok: boolean;
|
|
6
|
+
commitCount: number;
|
|
7
|
+
error?: string;
|
|
8
|
+
score?: BranchScore | null;
|
|
9
|
+
}
|
|
10
|
+
export declare function formatScore(score: BranchScore | null | undefined): string;
|
|
11
|
+
export declare function printSummary(taskName: string, taskSlug: string, branches: CreatedBranch[], branchResults: BranchResult[]): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ExecFileFn } from './worktree.js';
|
|
2
|
+
import type { WorktreeDisposition } from './worktree-disposition.js';
|
|
3
|
+
export interface WorktreeCleanupParams {
|
|
4
|
+
worktreePath: string;
|
|
5
|
+
branch: string;
|
|
6
|
+
repoRoot: string;
|
|
7
|
+
execFile: ExecFileFn;
|
|
8
|
+
force?: boolean;
|
|
9
|
+
disposition?: WorktreeDisposition;
|
|
10
|
+
}
|
|
11
|
+
export declare function runWorktreeCleanup(params: WorktreeCleanupParams): Promise<void>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ExecFileFn } from './worktree.js';
|
|
2
|
+
export declare function fetchIfRemoteRef(repoRoot: string, ref: string, execFile: ExecFileFn): Promise<void>;
|
|
3
|
+
export declare function resolveRefToSha(repoRoot: string, ref: string, execFile: ExecFileFn): Promise<string>;
|
|
4
|
+
export declare function resolveRefToShaOrUndefined(repoRoot: string, ref: string, execFile: ExecFileFn): Promise<string | undefined>;
|
|
5
|
+
export declare function detectDefaultBaseRef(repoRoot: string, execFile: ExecFileFn): Promise<string | undefined>;
|