agent-afk 5.345.0 → 5.346.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/daemon/session-spawn.d.ts +2 -2
- package/dist/agent/facets/index.d.ts +1 -0
- package/dist/agent/facets/yield-probe.d.ts +1 -0
- package/dist/agent/file-checkpoint/turn-log.d.ts +6 -0
- package/dist/agent/session/pause-controller.d.ts +19 -0
- package/dist/agent/subagent/handle.d.ts +1 -0
- package/dist/agent/unattended-limits.d.ts +6 -0
- package/dist/cli/commands/pause.d.ts +2 -0
- package/dist/cli/commands/resume-all.d.ts +2 -0
- package/dist/cli/slash/commands/core.rewind.d.ts +5 -1
- package/dist/cli.mjs +529 -528
- package/dist/config/env.d.ts +1 -1
- package/dist/config/env.model.d.ts +1 -1
- package/dist/index.mjs +405 -405
- package/dist/telegram.mjs +432 -431
- package/package.json +1 -1
|
@@ -16,8 +16,8 @@ export declare function daemonTraceLabel(taskId: string): string;
|
|
|
16
16
|
export declare function _resetDaemonDefaultCwdCache(): void;
|
|
17
17
|
export declare function daemonDefaultCwd(): string;
|
|
18
18
|
export declare function parseDaemonEnvLimits(rawMaxToolIters: string | undefined, rawMaxBudget: string | undefined): {
|
|
19
|
-
parsedMaxToolIters: number
|
|
20
|
-
parsedMaxBudget: number
|
|
19
|
+
parsedMaxToolIters: number;
|
|
20
|
+
parsedMaxBudget: number;
|
|
21
21
|
};
|
|
22
22
|
export declare function spawnDaemonSession(taskId: string, options: DaemonSpawnOptions): Promise<{
|
|
23
23
|
session: AgentSession;
|
|
@@ -2,3 +2,4 @@ export { FACET_VERSION, SessionFacetSchema, StoredSessionInputSchema, FacetOutco
|
|
|
2
2
|
export { deriveSessionFacet, type DeriveOptions } from './derive.js';
|
|
3
3
|
export { getOrDeriveFacet, loadStoredSession, listSessionIds, type FacetStoreOptions, } from './store.js';
|
|
4
4
|
export { createFacetSessionEndHook } from './session-end-hook.js';
|
|
5
|
+
export { patchFacetDecisions } from './yield-probe.js';
|
|
@@ -9,4 +9,5 @@ export declare function getCurrentBranch(execFn: ExecFnYield, cwd?: string): Pro
|
|
|
9
9
|
export declare function queryPrState(execFn: ExecFnYield, branch: string, cwd?: string): Promise<'merged' | 'open' | 'closed' | 'none' | 'error'>;
|
|
10
10
|
export declare function queryPrStateByUrl(execFn: ExecFnYield, prUrl: string, cwd?: string): Promise<'merged' | 'open' | 'closed' | 'error'>;
|
|
11
11
|
export declare function patchYieldFields(sessionId: string, produced_pr: boolean, pr_merged: boolean | null, cacheDir?: string, pr_url?: string | null): void;
|
|
12
|
+
export declare function patchFacetDecisions(sessionId: string, decisions: string[], cacheDir?: string): void;
|
|
12
13
|
export declare function writeFacetYield(sessionId: string, execFn: ExecFnYield, cwd?: string, cacheDir?: string): Promise<void>;
|
|
@@ -20,6 +20,10 @@ export type TurnLogEntry = {
|
|
|
20
20
|
kind: 'restore';
|
|
21
21
|
paths: PathHashes;
|
|
22
22
|
ts: number;
|
|
23
|
+
} | {
|
|
24
|
+
kind: 'tip';
|
|
25
|
+
turnId: string;
|
|
26
|
+
ts: number;
|
|
23
27
|
} | BashLogEntry;
|
|
24
28
|
export declare function hashBytes(bytes: Buffer | null): string | null;
|
|
25
29
|
export declare function currentHash(absPath: string): string | null;
|
|
@@ -28,3 +32,5 @@ export declare function readTurnLog(sessionId: string, stateDir?: string): TurnL
|
|
|
28
32
|
export declare function turnsFrom(log: readonly TurnLogEntry[], turnId: string): string[] | undefined;
|
|
29
33
|
export declare function expectedHashes(log: readonly TurnLogEntry[]): Map<string, string | null>;
|
|
30
34
|
export declare function hashPaths(paths: Iterable<string>): PathHashes;
|
|
35
|
+
export declare function latestCheckpointTurnId(sessionId: string, stateDir?: string): string | undefined;
|
|
36
|
+
export declare function latestTipTurnId(sessionId: string, stateDir?: string): string | undefined;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare function getPauseLockPath(): string;
|
|
2
|
+
export declare class PauseController {
|
|
3
|
+
private static _instance;
|
|
4
|
+
static instance(): PauseController;
|
|
5
|
+
static _resetForTest(): void;
|
|
6
|
+
private _paused;
|
|
7
|
+
private _pollInterval;
|
|
8
|
+
private _watchPath;
|
|
9
|
+
private constructor();
|
|
10
|
+
dispose(): void;
|
|
11
|
+
isPaused(): boolean;
|
|
12
|
+
check(signal?: AbortSignal): Promise<void>;
|
|
13
|
+
private _handlePause;
|
|
14
|
+
private _handleResume;
|
|
15
|
+
private _syncState;
|
|
16
|
+
private _startWatching;
|
|
17
|
+
}
|
|
18
|
+
export declare function writePauseLock(): boolean;
|
|
19
|
+
export declare function removePauseLock(): void;
|
|
@@ -63,6 +63,7 @@ export declare class SubagentHandleImpl<T> implements SubagentHandle<T> {
|
|
|
63
63
|
readonly _pendingBillingStreams: Set<Promise<void>>;
|
|
64
64
|
_billingStreamSink?: Set<Promise<void>>;
|
|
65
65
|
get pendingBillingStreams(): Promise<void>[];
|
|
66
|
+
get pendingWorkspaceEntryCount(): number;
|
|
66
67
|
get _runBilling(): BillingUsage | undefined;
|
|
67
68
|
set _runBilling(value: BillingUsage | undefined);
|
|
68
69
|
_modelFallback?: HandleModelFallback;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AgentConfig } from './types.js';
|
|
2
|
+
export declare const DEFAULT_UNATTENDED_BUDGET_USD = 5;
|
|
3
|
+
export declare const DEFAULT_UNATTENDED_TOOL_ROUNDS = 100;
|
|
4
|
+
type Limits = Pick<AgentConfig, 'maxBudgetUsd' | 'maxToolUseIterations'>;
|
|
5
|
+
export declare function resolveUnattendedLimits(rawRounds: string | undefined, rawBudget: string | undefined, explicit?: Limits): Required<Limits>;
|
|
6
|
+
export {};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import type { SlashCommand } from '../types.js';
|
|
1
|
+
import type { SlashCommand, SlashContext } from '../types.js';
|
|
2
|
+
type Session = SlashContext['session']['current'];
|
|
3
|
+
export declare function pick(ctx: SlashContext, choices: string[], title?: string): Promise<number | ':cancel' | null>;
|
|
4
|
+
export declare function restoreFiles(ctx: SlashContext, session: Session, checkpointTurnId: string): Promise<boolean>;
|
|
2
5
|
export declare const rewindCmd: SlashCommand;
|
|
6
|
+
export {};
|