agent-afk 5.329.0 → 5.331.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/handoff-store.d.ts +1 -0
- package/dist/agent/dag-subagent.d.ts +2 -0
- package/dist/agent/file-checkpoint/file-checkpoint.d.ts +1 -0
- package/dist/agent/file-checkpoint/retention.d.ts +29 -0
- package/dist/agent/file-checkpoint/rewind-files.d.ts +2 -4
- package/dist/agent/file-checkpoint/rewind-plan.d.ts +11 -0
- package/dist/agent/file-checkpoint/turn-lifecycle.d.ts +7 -0
- package/dist/agent/file-checkpoint/turn-log.d.ts +22 -0
- package/dist/agent/journal/types.d.ts +1 -1
- package/dist/agent/provider.d.ts +12 -3
- package/dist/agent/providers/openai-compatible/query/journal-wiring.d.ts +1 -0
- package/dist/agent/providers/openai-compatible/query/turn-iteration.d.ts +4 -1
- package/dist/agent/providers/openai-compatible/query.d.ts +3 -4
- package/dist/agent/providers/openai-compatible/query.file-checkpoint.d.ts +8 -5
- package/dist/agent/providers/router/provider-router.d.ts +2 -4
- package/dist/agent/session/agent-session.d.ts +2 -0
- package/dist/agent/session/agent-session.lifecycle.d.ts +2 -0
- package/dist/agent/session/session-compact.d.ts +1 -0
- package/dist/agent/session-control/clear.d.ts +5 -0
- package/dist/agent/session-control/compact.d.ts +9 -0
- package/dist/agent/session-control/index.d.ts +5 -0
- package/dist/agent/session-control/model.d.ts +11 -0
- package/dist/agent/session-control/preferences.d.ts +30 -0
- package/dist/agent/session-control/reads.d.ts +28 -0
- package/dist/agent/session-ledger-reader.d.ts +7 -0
- package/dist/agent/subagent/fork-child-config.d.ts +1 -0
- package/dist/agent/subagent/fork-types.d.ts +1 -0
- package/dist/agent/subagent/identity-preamble.d.ts +2 -1
- package/dist/agent/subagent/result.d.ts +7 -0
- package/dist/agent/tools/handlers/lsp-symbols.d.ts +1 -0
- package/dist/agent/tools/subagent/foreground-handoff.d.ts +5 -0
- package/dist/agent/types/session-types.d.ts +11 -0
- package/dist/cli/commands/interactive/bootstrap-session-builder.d.ts +1 -0
- package/dist/cli/commands/interactive/tool-lane-format-bash-family.d.ts +3 -0
- package/dist/cli/commands/interactive/tool-lane-format-bash.d.ts +9 -0
- package/dist/cli/config/types.d.ts +2 -0
- package/dist/cli/palette.d.ts +3 -0
- package/dist/cli/slash/capabilities.d.ts +8 -0
- package/dist/cli/slash/commands/core.rewind.d.ts +2 -0
- package/dist/cli/slash/commands/info.session.d.ts +2 -0
- package/dist/cli/slash/commands/info.tokens.d.ts +2 -0
- package/dist/cli/slash/commands/info.usage.d.ts +2 -0
- package/dist/cli/slash/interaction.d.ts +18 -0
- package/dist/cli/slash/interaction.repl.d.ts +6 -0
- package/dist/cli/slash/output-blocks.d.ts +38 -0
- package/dist/cli/slash/output-blocks.format.d.ts +15 -0
- package/dist/cli/slash/types.d.ts +9 -0
- package/dist/cli.mjs +577 -535
- package/dist/config/env.d.ts +21 -0
- package/dist/config/env.file-checkpoint.d.ts +22 -0
- package/dist/config/env.session-storage.d.ts +21 -0
- package/dist/index.mjs +1494 -308
- package/dist/paths.checkpoint.d.ts +3 -0
- package/dist/paths.d.ts +1 -1
- package/dist/paths.journal.d.ts +1 -0
- package/dist/telegram/bot.command-descriptors.d.ts +6 -2
- package/dist/telegram/bot.d.ts +0 -4
- package/dist/telegram/handlers/commands.d.ts +1 -6
- package/dist/telegram/handlers/message.d.ts +3 -4
- package/dist/telegram/handlers/{message.compact-handler.d.ts → slash.d.ts} +6 -4
- package/dist/telegram/handlers/slash.model-picker.d.ts +2 -0
- package/dist/telegram/session-manager.d.ts +5 -0
- package/dist/telegram/session-manager.reset.d.ts +26 -0
- package/dist/telegram/slash-context.telegram.d.ts +4 -0
- package/dist/telegram/slash-dispatch.telegram.d.ts +29 -0
- package/dist/telegram/writer.telegram.d.ts +24 -0
- package/dist/telegram.mjs +1420 -515
- package/dist/web-server/choice-broker.d.ts +20 -0
- package/dist/web-server/command-gate.d.ts +3 -0
- package/dist/web-server/fork-ledger.d.ts +4 -0
- package/dist/web-server/ledger-archive.d.ts +1 -0
- package/dist/web-server/routes.choices.d.ts +3 -0
- package/dist/web-server/routes.commands.d.ts +4 -0
- package/dist/web-server/routes.d.ts +4 -0
- package/dist/web-server/routes.resume.d.ts +3 -0
- package/dist/web-server/server.d.ts +2 -0
- package/dist/web-server/session-owner.autosave.d.ts +1 -1
- package/dist/web-server/session-owner.control.d.ts +37 -0
- package/dist/web-server/session-owner.d.ts +9 -1
- package/dist/web-server/session-owner.lifecycle.d.ts +26 -0
- package/dist/web-server/session-owner.projection.d.ts +5 -0
- package/dist/web-server/session-owner.slash.d.ts +11 -0
- package/dist/web-server/session-owner.wiring.d.ts +2 -0
- package/dist/web-server/shared/choice-wire.d.ts +11 -0
- package/dist/web-server/shared/command-wire.d.ts +63 -0
- package/dist/web-server/slash-context.web.d.ts +5 -0
- package/dist/web-server/slash-dispatch.d.ts +2 -0
- package/dist/web-server/slash-registry.d.ts +2 -0
- package/dist/web-server/slash-result.web.d.ts +3 -0
- package/dist/web-server/sse-protocol.d.ts +1 -0
- package/dist/web-server/stream-route.d.ts +2 -1
- package/dist/web-server/writer.buffer.d.ts +14 -0
- package/dist/web-ui-assets/assets/{angular-html-DB8uHnwt.js → angular-html-G2cKI8s3.js} +1 -1
- package/dist/web-ui-assets/assets/{angular-ts-lHP_pklW.js → angular-ts-Dbg6n4y8.js} +1 -1
- package/dist/web-ui-assets/assets/{apl-BOnAxoH6.js → apl-D64VMgkV.js} +1 -1
- package/dist/web-ui-assets/assets/{astro-CBmmpRMR.js → astro-Cl3AHcKf.js} +1 -1
- package/dist/web-ui-assets/assets/{blade-AiinM4D6.js → blade-BaqLOt4E.js} +1 -1
- package/dist/web-ui-assets/assets/{c-D_uY8_QG.js → c-CdaCEkA3.js} +1 -1
- package/dist/web-ui-assets/assets/{chapel-BxtMW0PL.js → chapel-jSWw1lD8.js} +1 -1
- package/dist/web-ui-assets/assets/{cobol-CsbLyFzO.js → cobol-B3FAur3H.js} +1 -1
- package/dist/web-ui-assets/assets/{coffee-B4J9bMqV.js → coffee-C_YNnHKr.js} +1 -1
- package/dist/web-ui-assets/assets/{cpp-BMCtJA5e.js → cpp-k2DmhdJn.js} +1 -1
- package/dist/web-ui-assets/assets/{crystal-DTCIajFW.js → crystal-D0ZAEmEr.js} +1 -1
- package/dist/web-ui-assets/assets/{css-D8OcsCi9.js → css-D7ctuinT.js} +1 -1
- package/dist/web-ui-assets/assets/{dist-BCZrngb-.js → dist-C2cBizxO.js} +2 -2
- package/dist/web-ui-assets/assets/{edge-BL3Xh0aL.js → edge-BT_sLNqb.js} +1 -1
- package/dist/web-ui-assets/assets/{elixir-DYMV70gA.js → elixir-BY-WcCQZ.js} +1 -1
- package/dist/web-ui-assets/assets/{elm-ZEY_5Gld.js → elm-Bh9xmoSq.js} +1 -1
- package/dist/web-ui-assets/assets/{erb-B4fTA01u.js → erb-D0HA_2hb.js} +1 -1
- package/dist/web-ui-assets/assets/{git-rebase-B4wbWtFe.js → git-rebase-phN5MgDL.js} +1 -1
- package/dist/web-ui-assets/assets/{glimmer-js-Bk8ocTiI.js → glimmer-js-p7ASjwLN.js} +1 -1
- package/dist/web-ui-assets/assets/{glimmer-ts-D1Bs59KY.js → glimmer-ts-Dnn2i1-n.js} +1 -1
- package/dist/web-ui-assets/assets/{glsl-Cud0AnQ7.js → glsl-kr7Sct5s.js} +1 -1
- package/dist/web-ui-assets/assets/{graphql-rprXDq6g.js → graphql-GY0lkyG6.js} +1 -1
- package/dist/web-ui-assets/assets/{hack-SA7mTB5H.js → hack-CSnhnTh1.js} +1 -1
- package/dist/web-ui-assets/assets/{haml-BEUsHksc.js → haml-COJeGn3e.js} +1 -1
- package/dist/web-ui-assets/assets/{handlebars-CQrcHvjw.js → handlebars-DcGpplin.js} +1 -1
- package/dist/web-ui-assets/assets/{html-BNjcP3ae.js → html-C_-nF5jA.js} +1 -1
- package/dist/web-ui-assets/assets/{html-derivative-tXcnSwla.js → html-derivative-65GvQF5H.js} +1 -1
- package/dist/web-ui-assets/assets/{http-CU3AcuDW.js → http-CR-Y2vaj.js} +1 -1
- package/dist/web-ui-assets/assets/{hurl-BlEMQ0mz.js → hurl-CT655Xcj.js} +1 -1
- package/dist/web-ui-assets/assets/index-eYIUud5F.js +88 -0
- package/dist/web-ui-assets/assets/index-hjXgYuFP.css +2 -0
- package/dist/web-ui-assets/assets/{java-Dv44VZIQ.js → java-BfXOkHiS.js} +1 -1
- package/dist/web-ui-assets/assets/{javascript-BCHMR2T1.js → javascript-bUx3f4E6.js} +1 -1
- package/dist/web-ui-assets/assets/{jinja-CXaA1rSy.js → jinja-CeQJOvgo.js} +1 -1
- package/dist/web-ui-assets/assets/{jison-CB25dCAh.js → jison-CDdJF1T3.js} +1 -1
- package/dist/web-ui-assets/assets/{json-BIgZtm75.js → json-CNUeAnq3.js} +1 -1
- package/dist/web-ui-assets/assets/{jsx-o303RfKm.js → jsx-jBPPj-2P.js} +1 -1
- package/dist/web-ui-assets/assets/{julia-C1TY8lKP.js → julia-Ffo4oiNj.js} +1 -1
- package/dist/web-ui-assets/assets/{just-Tw4mDbax.js → just-WoqMhLPN.js} +1 -1
- package/dist/web-ui-assets/assets/{latex-C7tdKkSX.js → latex-DvTPJWnQ.js} +1 -1
- package/dist/web-ui-assets/assets/{liquid-BB7mJnwo.js → liquid-BENhv3uZ.js} +1 -1
- package/dist/web-ui-assets/assets/{lua-BEoyE6dJ.js → lua-BuWrCSeh.js} +1 -1
- package/dist/web-ui-assets/assets/{marko-BEwpbV-M.js → marko-C57EDP9e.js} +1 -1
- package/dist/web-ui-assets/assets/{mdc-BRxZnNvW.js → mdc-DTwJqrEn.js} +1 -1
- package/dist/web-ui-assets/assets/{nginx-DDfVoxOW.js → nginx-btcrmW_3.js} +1 -1
- package/dist/web-ui-assets/assets/{nim-DKNRKwRp.js → nim-0qpAss6M.js} +1 -1
- package/dist/web-ui-assets/assets/{org-DQ3K8kn0.js → org-ChOz5H9b.js} +1 -1
- package/dist/web-ui-assets/assets/{perl-D7M6_0Sj.js → perl-DkGTCu5B.js} +1 -1
- package/dist/web-ui-assets/assets/{php-BHtfzS6_.js → php-BXq74HRi.js} +1 -1
- package/dist/web-ui-assets/assets/{pug-C47_bBn3.js → pug-VBly3Hrp.js} +1 -1
- package/dist/web-ui-assets/assets/{qml-GWJnns_A.js → qml-By9BHV0E.js} +1 -1
- package/dist/web-ui-assets/assets/{r-B5whi3IO.js → r-wD-EKGhX.js} +1 -1
- package/dist/web-ui-assets/assets/{razor-y6G1LkzI.js → razor-C7ua423D.js} +1 -1
- package/dist/web-ui-assets/assets/{regexp-uGurlfu3.js → regexp-CGw_3plU.js} +1 -1
- package/dist/web-ui-assets/assets/{rst-DOSRVvDO.js → rst-DYI5KAID.js} +1 -1
- package/dist/web-ui-assets/assets/{ruby-BMWD1lXn.js → ruby-RXd2KUyd.js} +1 -1
- package/dist/web-ui-assets/assets/{sas-sJodyODK.js → sas-BI_hDd-V.js} +1 -1
- package/dist/web-ui-assets/assets/{scss-FKoWviz4.js → scss-BE93nrLY.js} +1 -1
- package/dist/web-ui-assets/assets/{shellscript-CX4uun1S.js → shellscript-Dm8eyzbm.js} +1 -1
- package/dist/web-ui-assets/assets/{shellsession-BJeG5Uqg.js → shellsession-Dl0JKALg.js} +1 -1
- package/dist/web-ui-assets/assets/{soy-dTEOPSGv.js → soy-CKNrhHpK.js} +1 -1
- package/dist/web-ui-assets/assets/{sql-CjJutFxy.js → sql-CZNswWPI.js} +1 -1
- package/dist/web-ui-assets/assets/{stata-qv7Vtzqg.js → stata-DjmrbOUz.js} +1 -1
- package/dist/web-ui-assets/assets/{surrealql-ZFi8Udj8.js → surrealql-DqqZx4Ju.js} +1 -1
- package/dist/web-ui-assets/assets/{svelte-CONS17iI.js → svelte-Chj9K27Z.js} +1 -1
- package/dist/web-ui-assets/assets/{templ-D6wwa1g9.js → templ-BTLqJqYd.js} +1 -1
- package/dist/web-ui-assets/assets/{tex-BORTsoU8.js → tex-CglhV978.js} +1 -1
- package/dist/web-ui-assets/assets/{ts-tags-DSykcd4j.js → ts-tags-79bKA5Ly.js} +1 -1
- package/dist/web-ui-assets/assets/{tsx-ypvKBKZA.js → tsx-CXyhTYi7.js} +1 -1
- package/dist/web-ui-assets/assets/{twig-BNNw8R5U.js → twig-BrJR9DgZ.js} +1 -1
- package/dist/web-ui-assets/assets/{typescript-CEY3oKvf.js → typescript-BR4aBNWU.js} +1 -1
- package/dist/web-ui-assets/assets/{typst-Br9tV5S3.js → typst-CAGgcUBq.js} +1 -1
- package/dist/web-ui-assets/assets/{vue-ByQBamrH.js → vue-B5T6PehN.js} +1 -1
- package/dist/web-ui-assets/assets/{vue-html-D_-H3Kc8.js → vue-html-CE1dGrtN.js} +1 -1
- package/dist/web-ui-assets/assets/{vue-vine-CCNA5xb1.js → vue-vine-Cc40SVDS.js} +1 -1
- package/dist/web-ui-assets/assets/{xml-DXfCRANb.js → xml-CAOCSYKi.js} +1 -1
- package/dist/web-ui-assets/assets/{xsl-D8v7jI2q.js → xsl-fa6Mwxua.js} +1 -1
- package/dist/web-ui-assets/assets/{yaml-Dc0tn1VO.js → yaml-CyELmWi2.js} +1 -1
- package/dist/web-ui-assets/index.html +2 -2
- package/package.json +1 -1
- package/dist/agent/elicitation/pending-question-store.d.ts +0 -21
- package/dist/telegram/handlers/commands.model-validate.d.ts +0 -2
- package/dist/telegram/handlers/help.d.ts +0 -3
- package/dist/telegram/handlers/usage.d.ts +0 -4
- package/dist/web-ui-assets/assets/index-Bx-32Qg4.css +0 -2
- package/dist/web-ui-assets/assets/index-XjH5AFoQ.js +0 -85
|
@@ -42,5 +42,7 @@ export interface SubagentDAGOptions {
|
|
|
42
42
|
nodeTimeoutMs?: number;
|
|
43
43
|
delegationBudget?: DelegationBudget;
|
|
44
44
|
anchorCwd?: string;
|
|
45
|
+
defaultSubagentModel?: AgentModelInput;
|
|
46
|
+
defaultModel?: AgentModelInput;
|
|
45
47
|
}
|
|
46
48
|
export declare function runSubagentDAG(options: SubagentDAGOptions): Promise<DAGRunResult>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type DirStats } from '../_lib/dir-newest-mtime.js';
|
|
2
|
+
export declare const FILE_CHECKPOINT_MAX_AGE_DAYS_DEFAULT = 14;
|
|
3
|
+
export declare const FILE_CHECKPOINT_MAX_BYTES_DEFAULT: number;
|
|
4
|
+
export declare const FILE_CHECKPOINT_GRACE_MS: number;
|
|
5
|
+
export declare const FILE_CHECKPOINT_SWEEP_MIN_INTERVAL_MS: number;
|
|
6
|
+
export declare const FILE_CHECKPOINT_SWEEP_START_DELAY_MS = 5000;
|
|
7
|
+
export declare function markCheckpointOwner(sessionId: string, stateDir?: string): void;
|
|
8
|
+
export declare function acquireRewindLock(sessionId: string, stateDir?: string): () => void;
|
|
9
|
+
export interface FileCheckpointSweepOptions {
|
|
10
|
+
root?: string;
|
|
11
|
+
activeSessionId?: string | undefined;
|
|
12
|
+
maxAgeDays?: number;
|
|
13
|
+
maxBytes?: number;
|
|
14
|
+
force?: boolean;
|
|
15
|
+
now?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface FileCheckpointSweepResult {
|
|
18
|
+
skipped: boolean;
|
|
19
|
+
scanned: number;
|
|
20
|
+
evicted: string[];
|
|
21
|
+
freedBytes: number;
|
|
22
|
+
}
|
|
23
|
+
type Measured = {
|
|
24
|
+
name: string;
|
|
25
|
+
path: string;
|
|
26
|
+
} & DirStats;
|
|
27
|
+
export declare function chooseEvictions(dirs: readonly Measured[], now: number, maxAgeMs: number, maxBytes: number): Measured[];
|
|
28
|
+
export declare function sweepFileCheckpoints(options?: FileCheckpointSweepOptions): Promise<FileCheckpointSweepResult>;
|
|
29
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ProviderRewindResult } from '../provider.js';
|
|
1
|
+
import type { ProviderRewindResult, RewindFilesOptions } from '../provider.js';
|
|
2
2
|
import type { ToolHandlerContext } from '../tools/types.js';
|
|
3
3
|
export interface RewindFilesDeps {
|
|
4
4
|
sessionId: string;
|
|
@@ -6,6 +6,4 @@ export interface RewindFilesDeps {
|
|
|
6
6
|
writePolicy?: ToolHandlerContext;
|
|
7
7
|
_stateDir?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare function rewindFiles(deps: RewindFilesDeps, turnId: string, options?:
|
|
10
|
-
dryRun?: boolean;
|
|
11
|
-
}): Promise<ProviderRewindResult>;
|
|
9
|
+
export declare function rewindFiles(deps: RewindFilesDeps, turnId: string, options?: RewindFilesOptions): Promise<ProviderRewindResult>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type FileSnapshot } from './file-checkpoint.js';
|
|
2
|
+
export interface RewindPlan {
|
|
3
|
+
snapshots: FileSnapshot[];
|
|
4
|
+
expected: Map<string, string | null>;
|
|
5
|
+
}
|
|
6
|
+
export type RewindPlanResult = {
|
|
7
|
+
plan: RewindPlan;
|
|
8
|
+
} | {
|
|
9
|
+
missing: true;
|
|
10
|
+
};
|
|
11
|
+
export declare function planRewind(sessionId: string, turnId: string, stateDir?: string): RewindPlanResult;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type FileCheckpointRegistry } from './file-checkpoint.js';
|
|
2
|
+
import type { RewindTarget } from '../provider.js';
|
|
3
|
+
export declare function beginCheckpointTurn(sessionId: string, turnId: string, stateDir?: string): FileCheckpointRegistry;
|
|
4
|
+
export declare function endCheckpointTurn(sessionId: string, registry: FileCheckpointRegistry | undefined, stateDir?: string): void;
|
|
5
|
+
export declare function linkCheckpointTurn(message: object, turnId: string): void;
|
|
6
|
+
export declare function checkpointTurnIdFor(message: object | undefined): string | undefined;
|
|
7
|
+
export declare function withCheckpointTurnIds(targets: RewindTarget[], history: readonly object[]): RewindTarget[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type PathHashes = Record<string, string | null>;
|
|
2
|
+
export type TurnLogEntry = {
|
|
3
|
+
kind: 'turn';
|
|
4
|
+
turnId: string;
|
|
5
|
+
ts: number;
|
|
6
|
+
} | {
|
|
7
|
+
kind: 'post';
|
|
8
|
+
turnId: string;
|
|
9
|
+
paths: PathHashes;
|
|
10
|
+
ts: number;
|
|
11
|
+
} | {
|
|
12
|
+
kind: 'restore';
|
|
13
|
+
paths: PathHashes;
|
|
14
|
+
ts: number;
|
|
15
|
+
};
|
|
16
|
+
export declare function hashBytes(bytes: Buffer | null): string | null;
|
|
17
|
+
export declare function currentHash(absPath: string): string | null;
|
|
18
|
+
export declare function appendTurnLog(sessionId: string, entry: TurnLogEntry, stateDir?: string): boolean;
|
|
19
|
+
export declare function readTurnLog(sessionId: string, stateDir?: string): TurnLogEntry[];
|
|
20
|
+
export declare function turnsFrom(log: readonly TurnLogEntry[], turnId: string): string[] | undefined;
|
|
21
|
+
export declare function expectedHashes(log: readonly TurnLogEntry[]): Map<string, string | null>;
|
|
22
|
+
export declare function hashPaths(paths: Iterable<string>): PathHashes;
|
|
@@ -83,7 +83,7 @@ export interface JournalAdoption {
|
|
|
83
83
|
readonly count: number;
|
|
84
84
|
}
|
|
85
85
|
export type JournalTruncateReason = 'resync' | 'compact' | 'rewind' | 'clear' | 'repair' | 'provider_switch';
|
|
86
|
-
export type JournalMarkLabel = 'compact' | 'rewind' | 'clear' | 'resume' | 'fork' | 'model_switch' | 'suggestion';
|
|
86
|
+
export type JournalMarkLabel = 'compact' | 'rewind' | 'clear' | 'resume' | 'fork' | 'model_switch' | 'suggestion' | 'checkpoint';
|
|
87
87
|
export type JournalSuggestionDetail = {
|
|
88
88
|
event: 'generated' | 'accepted' | 'word_accepted' | 'dismissed';
|
|
89
89
|
source: 'completion' | 'prompt';
|
package/dist/agent/provider.d.ts
CHANGED
|
@@ -183,9 +183,7 @@ export interface ProviderQuery extends AsyncIterable<ProviderEvent> {
|
|
|
183
183
|
getContextUsage(): Promise<ProviderContextUsage>;
|
|
184
184
|
mcpServerStatus(): Promise<ProviderMcpServerStatus[]>;
|
|
185
185
|
accountInfo(): Promise<ProviderAccountInfo>;
|
|
186
|
-
rewindFiles(userMessageId: string, options?:
|
|
187
|
-
dryRun?: boolean;
|
|
188
|
-
}): Promise<ProviderRewindResult>;
|
|
186
|
+
rewindFiles(userMessageId: string, options?: RewindFilesOptions): Promise<ProviderRewindResult>;
|
|
189
187
|
compact?(): Promise<ProviderCompactResult>;
|
|
190
188
|
listRewindTargets?(): RewindTarget[];
|
|
191
189
|
rewindConversation?(turnIndex: number): Promise<ProviderRewindConversationResult>;
|
|
@@ -281,6 +279,16 @@ export interface ProviderRewindResult {
|
|
|
281
279
|
filesChanged?: string[];
|
|
282
280
|
insertions?: number;
|
|
283
281
|
deletions?: number;
|
|
282
|
+
failures?: RewindFileFailure[];
|
|
283
|
+
conflicts?: string[];
|
|
284
|
+
}
|
|
285
|
+
export interface RewindFileFailure {
|
|
286
|
+
path: string;
|
|
287
|
+
error: string;
|
|
288
|
+
}
|
|
289
|
+
export interface RewindFilesOptions {
|
|
290
|
+
dryRun?: boolean;
|
|
291
|
+
overwriteConflicts?: boolean;
|
|
284
292
|
}
|
|
285
293
|
export interface ProviderCompactResult {
|
|
286
294
|
compacted: boolean;
|
|
@@ -297,6 +305,7 @@ export interface ProviderCompactResult {
|
|
|
297
305
|
export interface RewindTarget {
|
|
298
306
|
turnIndex: number;
|
|
299
307
|
preview: string;
|
|
308
|
+
checkpointTurnId?: string;
|
|
300
309
|
}
|
|
301
310
|
export interface ProviderRewindConversationResult {
|
|
302
311
|
rewound: boolean;
|
|
@@ -15,5 +15,6 @@ export declare class OpenAIJournalWiring {
|
|
|
15
15
|
afterCompact(turns: readonly OpenAIMessage[], result: ProviderCompactResult): void;
|
|
16
16
|
microcompactFallback(turns: OpenAIMessage[]): ProviderCompactResult | null;
|
|
17
17
|
snapshot(turns: readonly OpenAIMessage[]): JournalMessage[] | undefined;
|
|
18
|
+
syncRewind(turns: readonly OpenAIMessage[], turnIndex: number): void;
|
|
18
19
|
sync(turns: readonly OpenAIMessage[], compacted?: boolean): void;
|
|
19
20
|
}
|
|
@@ -13,6 +13,9 @@ import type { OpenAIJournalWiring } from './journal-wiring.js';
|
|
|
13
13
|
import type { TraceSink } from '../../../trace/index.js';
|
|
14
14
|
import type { OpenAIAuthResolution } from '../auth.js';
|
|
15
15
|
export interface IterationContext {
|
|
16
|
+
readonly checkpoint?: {
|
|
17
|
+
linkUserTurn(message: object, messageIndex: number): void;
|
|
18
|
+
};
|
|
16
19
|
readonly currentModel: string;
|
|
17
20
|
readonly currentPermissionMode: string;
|
|
18
21
|
readonly closed: boolean;
|
|
@@ -37,5 +40,5 @@ export interface FinishTurnContext {
|
|
|
37
40
|
lastUsage: ProviderUsage | null;
|
|
38
41
|
}
|
|
39
42
|
export declare function finishTurn(ctx: FinishTurnContext, accumulatedUsage: ProviderUsage, turnStartTime: number): Generator<ProviderEvent>;
|
|
40
|
-
export declare function pushUserTurn(ctx: IterationContext, content: import('../../../provider.js').ProviderUserTurn['content']): void;
|
|
43
|
+
export declare function pushUserTurn(ctx: IterationContext, content: import('../../../provider.js').ProviderUserTurn['content'], linkCheckpoint?: boolean): void;
|
|
41
44
|
export declare function runIteration(ctx: IterationContext, controller: AbortController, vision: boolean, windDown: typeof TOOL_USE_LOOP_CAPPED | typeof SOFT_DEADLINE_WIND_DOWN | typeof CONTEXT_PRESSURE_WIND_DOWN | null): AsyncGenerator<ProviderEvent, IterationResult | null>;
|
|
@@ -6,6 +6,7 @@ import type { OpenAIFunctionTool } from './loop.js';
|
|
|
6
6
|
import { type WireMode } from './responses-config.js';
|
|
7
7
|
import type { ToolDispatcher } from '../anthropic-direct/tool-dispatcher.js';
|
|
8
8
|
import { AbortCoordinator } from '../shared/abort-coordinator.js';
|
|
9
|
+
import { FileCheckpointState } from './query.file-checkpoint.js';
|
|
9
10
|
import { OpenAIJournalWiring } from './query/journal-wiring.js';
|
|
10
11
|
import { resolveReasoningEffort } from './query/model-params.js';
|
|
11
12
|
import { FastTierSession } from './query/fast-tier-session.js';
|
|
@@ -57,7 +58,7 @@ export declare class OpenAICompatibleQuery implements ProviderQuery, TurnDriverC
|
|
|
57
58
|
get closed(): boolean;
|
|
58
59
|
lastUsage: ProviderUsage | null;
|
|
59
60
|
private readonly autoCompactThreshold;
|
|
60
|
-
|
|
61
|
+
readonly checkpoint: FileCheckpointState;
|
|
61
62
|
constructor(opts: OpenAICompatibleQueryOptions);
|
|
62
63
|
activeOpenAITools(): OpenAIFunctionTool[] | undefined;
|
|
63
64
|
[Symbol.asyncIterator](): AsyncIterator<ProviderEvent>;
|
|
@@ -83,9 +84,7 @@ export declare class OpenAICompatibleQuery implements ProviderQuery, TurnDriverC
|
|
|
83
84
|
getContextUsage(): Promise<ProviderContextUsage>;
|
|
84
85
|
mcpServerStatus(): Promise<ProviderMcpServerStatus[]>;
|
|
85
86
|
accountInfo(): Promise<ProviderAccountInfo>;
|
|
86
|
-
rewindFiles(userMessageId: string, options?:
|
|
87
|
-
dryRun?: boolean;
|
|
88
|
-
}): Promise<ProviderRewindResult>;
|
|
87
|
+
rewindFiles(userMessageId: string, options?: import('../../provider.js').RewindFilesOptions): Promise<ProviderRewindResult>;
|
|
89
88
|
journalSnapshot(): ReturnType<OpenAIJournalWiring['snapshot']>;
|
|
90
89
|
close(): void;
|
|
91
90
|
}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import type { ToolHandlerContext } from '../../tools/types.js';
|
|
2
|
-
import type { ProviderEvent, ProviderRewindResult } from '../../provider.js';
|
|
2
|
+
import type { ProviderEvent, ProviderRewindResult, RewindFilesOptions } from '../../provider.js';
|
|
3
|
+
import type { MessageJournal } from '../../journal/types.js';
|
|
3
4
|
export declare class FileCheckpointState {
|
|
4
5
|
private readonly enabled;
|
|
5
6
|
private readonly sessionId;
|
|
7
|
+
private readonly journal?;
|
|
6
8
|
private currentTurnId;
|
|
7
|
-
|
|
9
|
+
private registry;
|
|
10
|
+
private markedTurnId;
|
|
11
|
+
constructor(enabled: boolean, sessionId: string, journal?: MessageJournal | undefined);
|
|
8
12
|
begin(dispatcher: object | undefined, userMessageId?: string): string | undefined;
|
|
13
|
+
linkUserTurn(message: object, messageIndex: number): void;
|
|
9
14
|
end(dispatcher: object | undefined): void;
|
|
10
15
|
events(events: AsyncIterable<ProviderEvent>, dispatcher: object | undefined, checkpointId: string | undefined): AsyncGenerator<ProviderEvent>;
|
|
11
|
-
rewind(userMessageId: string, options?:
|
|
12
|
-
dryRun?: boolean;
|
|
13
|
-
}, writePolicy?: ToolHandlerContext): Promise<ProviderRewindResult>;
|
|
16
|
+
rewind(userMessageId: string, options?: RewindFilesOptions, writePolicy?: ToolHandlerContext): Promise<ProviderRewindResult>;
|
|
14
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ModelProvider, ProviderQuery, ProviderEvent, ProviderUserTurn, ProviderCommandInfo, ProviderModelInfo, ProviderAgentInfo, ProviderContextUsage, ProviderMcpServerStatus, ProviderAccountInfo, ProviderRewindResult, ProviderRewindConversationResult, ProviderCompactResult, RewindTarget } from '../../provider.js';
|
|
1
|
+
import type { ModelProvider, ProviderQuery, ProviderEvent, ProviderUserTurn, ProviderCommandInfo, ProviderModelInfo, ProviderAgentInfo, ProviderContextUsage, ProviderMcpServerStatus, ProviderAccountInfo, ProviderRewindResult, RewindFilesOptions, ProviderRewindConversationResult, ProviderCompactResult, RewindTarget } from '../../provider.js';
|
|
2
2
|
import type { AgentConfig } from '../../types/config-types.js';
|
|
3
3
|
import type { JournalMessage } from '../../journal/index.js';
|
|
4
4
|
export interface ProviderRouterDeps {
|
|
@@ -57,9 +57,7 @@ export declare class ProviderRouter implements ProviderQuery {
|
|
|
57
57
|
getContextUsage(): Promise<ProviderContextUsage>;
|
|
58
58
|
mcpServerStatus(): Promise<ProviderMcpServerStatus[]>;
|
|
59
59
|
accountInfo(): Promise<ProviderAccountInfo>;
|
|
60
|
-
rewindFiles(userMessageId: string, options?:
|
|
61
|
-
dryRun?: boolean;
|
|
62
|
-
}): Promise<ProviderRewindResult>;
|
|
60
|
+
rewindFiles(userMessageId: string, options?: RewindFilesOptions): Promise<ProviderRewindResult>;
|
|
63
61
|
compact(): Promise<ProviderCompactResult>;
|
|
64
62
|
journalSnapshot(): JournalMessage[] | undefined;
|
|
65
63
|
listRewindTargets(): RewindTarget[];
|
|
@@ -80,10 +80,12 @@ export declare class AgentSession implements IAgentSession {
|
|
|
80
80
|
accountInfo(): Promise<AccountInfo>;
|
|
81
81
|
rewindFiles(userMessageId: string, options?: {
|
|
82
82
|
dryRun?: boolean;
|
|
83
|
+
overwriteConflicts?: boolean;
|
|
83
84
|
}): Promise<RewindFilesResult>;
|
|
84
85
|
compact(): Promise<ProviderCompactResult>;
|
|
85
86
|
listRewindTargets(): RewindTarget[];
|
|
86
87
|
rewindConversation(turnIndex: number): Promise<ProviderRewindConversationResult>;
|
|
88
|
+
sealEventLedger(): Promise<void>;
|
|
87
89
|
private makeCompactDeps;
|
|
88
90
|
getLastResponseMetadata(): ResponseMetadata | null;
|
|
89
91
|
getOutputStream(): AsyncIterable<OutputEvent>;
|
|
@@ -6,6 +6,7 @@ import type { SessionStateManager } from './session-state.js';
|
|
|
6
6
|
import type { HookRegistry } from '../hooks.js';
|
|
7
7
|
import type { ProviderQuery, ProviderEvent } from '../provider.js';
|
|
8
8
|
import type { QueryInputStream } from './input-iterable.js';
|
|
9
|
+
import type { OutputEvent } from '../types/session-types.js';
|
|
9
10
|
export interface SessionRunnerSlots {
|
|
10
11
|
getConfig: () => AgentConfig;
|
|
11
12
|
getAbortController: () => AbortController;
|
|
@@ -53,6 +54,7 @@ export interface BuildInitPromiseOptions {
|
|
|
53
54
|
shutdown: SessionShutdown;
|
|
54
55
|
hookRegistry: HookRegistry | undefined;
|
|
55
56
|
queueFrameworkContext: (text: string) => void;
|
|
57
|
+
pushSidebandEvent: (event: OutputEvent) => void;
|
|
56
58
|
getRunner: () => TurnStreamRunner;
|
|
57
59
|
stateManager: SessionStateManager;
|
|
58
60
|
}
|
|
@@ -5,6 +5,7 @@ export interface CompactDeps {
|
|
|
5
5
|
setState: (s: SessionState) => void;
|
|
6
6
|
getProviderQuery: () => ProviderQuery;
|
|
7
7
|
}
|
|
8
|
+
export declare function makeCompactDeps(getState: CompactDeps['getState'], setState: CompactDeps['setState'], getProviderQuery: CompactDeps['getProviderQuery']): CompactDeps;
|
|
8
9
|
export declare function compactSession(deps: CompactDeps): Promise<ProviderCompactResult>;
|
|
9
10
|
export declare function listRewindTargets(deps: CompactDeps): RewindTarget[];
|
|
10
11
|
export declare function rewindConversation(turnIndex: number, deps: CompactDeps): Promise<ProviderRewindConversationResult>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AgentSession } from '../session.js';
|
|
2
|
+
export type CompactProgress = (phase: 'start' | 'end') => void;
|
|
3
|
+
export type CompactConversationResult = Awaited<ReturnType<AgentSession['compact']>> & {
|
|
4
|
+
promptsBefore: number;
|
|
5
|
+
promptsAfter: number;
|
|
6
|
+
};
|
|
7
|
+
type CompactSession = Pick<AgentSession, 'hookRegistry' | 'sessionId' | 'listRewindTargets' | 'compact'>;
|
|
8
|
+
export declare function compactConversation(session: CompactSession, progress?: CompactProgress): Promise<CompactConversationResult>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { clearConversation } from './clear.js';
|
|
2
|
+
export { compactConversation, type CompactConversationResult, type CompactProgress } from './compact.js';
|
|
3
|
+
export { setSessionModel, type SetSessionModelResult } from './model.js';
|
|
4
|
+
export { setSessionName, type SetSessionNameResult, type SessionNameOptions, THINKING_MODES, getSessionThinking, setSessionThinking, readSessionFast, setSessionFast, } from './preferences.js';
|
|
5
|
+
export { readSubscriptionUsage, readContextUsage, readLocalTokenUsage, readTokenUsage, readMcpStatus, readMcpOauthPending, type ContextUsage, type LocalTokenUsage, type TokenUsage, } from './reads.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AgentSession } from '../session.js';
|
|
2
|
+
import type { AgentModelInput } from '../types.js';
|
|
3
|
+
import type { SessionStats } from '../../cli/slash/types.js';
|
|
4
|
+
export type SetSessionModelResult = {
|
|
5
|
+
ok: true;
|
|
6
|
+
model: AgentModelInput;
|
|
7
|
+
} | {
|
|
8
|
+
ok: false;
|
|
9
|
+
message: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function setSessionModel(session: Pick<AgentSession, 'setModel'>, stats: SessionStats, target: string): Promise<SetSessionModelResult>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { SessionStats, ThinkingUiMode } from '../../cli/slash/types.js';
|
|
2
|
+
import type { FastModeContext, FastModeController, FastModePreference, FastModeStatus } from '../fast-mode.js';
|
|
3
|
+
export interface SessionNameOptions {
|
|
4
|
+
onName?: (name: string) => void;
|
|
5
|
+
persist?: (stats: SessionStats) => void;
|
|
6
|
+
}
|
|
7
|
+
export type SetSessionNameResult = {
|
|
8
|
+
ok: false;
|
|
9
|
+
} | {
|
|
10
|
+
ok: true;
|
|
11
|
+
name: string;
|
|
12
|
+
saved: boolean;
|
|
13
|
+
saveError?: unknown;
|
|
14
|
+
};
|
|
15
|
+
export declare function setSessionName(stats: SessionStats, raw: string, options?: SessionNameOptions): SetSessionNameResult;
|
|
16
|
+
export declare const THINKING_MODES: readonly ThinkingUiMode[];
|
|
17
|
+
export declare function getSessionThinking(stats: Pick<SessionStats, 'thinkingUi'>): ThinkingUiMode;
|
|
18
|
+
export declare function setSessionThinking(stats: Pick<SessionStats, 'thinkingUi'>, value: string): {
|
|
19
|
+
ok: true;
|
|
20
|
+
mode: ThinkingUiMode;
|
|
21
|
+
} | {
|
|
22
|
+
ok: false;
|
|
23
|
+
};
|
|
24
|
+
export declare function readSessionFast(controller: FastModeController, context: FastModeContext): FastModeStatus;
|
|
25
|
+
export declare function setSessionFast(controller: FastModeController, value: string): {
|
|
26
|
+
ok: true;
|
|
27
|
+
preference: FastModePreference;
|
|
28
|
+
} | {
|
|
29
|
+
ok: false;
|
|
30
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { AgentSession } from '../session.js';
|
|
2
|
+
import type { SessionStats } from '../../cli/slash/types.js';
|
|
3
|
+
import { fetchSubscriptionUsage } from '../subscription-usage.js';
|
|
4
|
+
export type ContextUsage = Awaited<ReturnType<AgentSession['getContextUsage']>>;
|
|
5
|
+
export interface LocalTokenUsage {
|
|
6
|
+
kind: 'local';
|
|
7
|
+
input: number;
|
|
8
|
+
output: number;
|
|
9
|
+
cache: number;
|
|
10
|
+
total: number;
|
|
11
|
+
contextUsed: number;
|
|
12
|
+
contextLimit: number;
|
|
13
|
+
percentage: number;
|
|
14
|
+
model: SessionStats['model'];
|
|
15
|
+
}
|
|
16
|
+
export type TokenUsage = {
|
|
17
|
+
kind: 'sdk';
|
|
18
|
+
usage: ContextUsage;
|
|
19
|
+
} | LocalTokenUsage;
|
|
20
|
+
export declare function readSubscriptionUsage(): ReturnType<typeof fetchSubscriptionUsage>;
|
|
21
|
+
export declare function readContextUsage(session: Pick<AgentSession, 'getContextUsage'>): Promise<ContextUsage>;
|
|
22
|
+
export declare function readLocalTokenUsage(stats: SessionStats): LocalTokenUsage;
|
|
23
|
+
export declare function readTokenUsage(session: Pick<AgentSession, 'getContextUsage'>, stats: SessionStats): Promise<TokenUsage>;
|
|
24
|
+
export declare function readMcpStatus(session: Pick<AgentSession, 'waitForInitialization'>): Promise<{
|
|
25
|
+
name: string;
|
|
26
|
+
status: string;
|
|
27
|
+
}[]>;
|
|
28
|
+
export declare function readMcpOauthPending(): Promise<Record<string, import("../mcp/oauth.js").OauthPendingEntry>>;
|
|
@@ -2,7 +2,14 @@ import type { LedgerRecord } from './session-ledger.js';
|
|
|
2
2
|
export declare function parseRecord(line: string): LedgerRecord | null;
|
|
3
3
|
export declare function ledgerExists(sessionId: string): Promise<boolean>;
|
|
4
4
|
export declare function readLedger(sessionId: string): AsyncGenerator<LedgerRecord>;
|
|
5
|
+
export declare function ledgerGeneration(stat: {
|
|
6
|
+
dev: number;
|
|
7
|
+
ino: number;
|
|
8
|
+
birthtimeMs: number;
|
|
9
|
+
}): string;
|
|
5
10
|
export declare function tailLedger(sessionId: string, opts?: {
|
|
6
11
|
fromStart?: boolean;
|
|
7
12
|
signal?: AbortSignal;
|
|
13
|
+
onGeneration?: (generation: string) => void;
|
|
14
|
+
onCaughtUp?: () => void;
|
|
8
15
|
}): AsyncGenerator<LedgerRecord>;
|
|
@@ -25,6 +25,7 @@ export interface AssembleChildConfigArgs<T> {
|
|
|
25
25
|
parentSurface: Surface | undefined;
|
|
26
26
|
parentCanUseTool: CanUseTool | undefined;
|
|
27
27
|
parentRootSessionId: string | undefined;
|
|
28
|
+
yieldEnabled?: boolean;
|
|
28
29
|
nestedAgentAllowlist?: readonly string[];
|
|
29
30
|
}
|
|
30
31
|
export type ParentForkFields = Pick<AssembleChildConfigArgs<unknown>, 'parentCwd' | 'parentApiKey' | 'parentBaseUrl' | 'parentProvider' | 'parentTraceWriter' | 'parentSurface' | 'parentCanUseTool' | 'parentRootSessionId'>;
|
|
@@ -36,6 +36,7 @@ export interface ForkSubagentOptions<T = unknown> {
|
|
|
36
36
|
progressEvents?: boolean;
|
|
37
37
|
phaseRole?: PhaseRole;
|
|
38
38
|
nestedAgentAllowlist?: readonly string[];
|
|
39
|
+
yieldEnabled?: boolean;
|
|
39
40
|
modelFallback?: {
|
|
40
41
|
model: string;
|
|
41
42
|
buildProvider?: (model: string) => import('../provider.js').ModelProvider;
|
|
@@ -6,6 +6,7 @@ export interface SubagentIdentityFacts {
|
|
|
6
6
|
maxDepth: number | undefined;
|
|
7
7
|
nestedAgentAllowlist?: readonly string[];
|
|
8
8
|
cwd?: string;
|
|
9
|
+
yieldEnabled?: boolean;
|
|
9
10
|
}
|
|
10
11
|
export declare function renderSubagentIdentityPreamble(facts: SubagentIdentityFacts): string;
|
|
11
|
-
export declare function injectSubagentIdentityPreamble(config: AgentConfig, nestedAgentAllowlist?: readonly string[]): AgentConfig;
|
|
12
|
+
export declare function injectSubagentIdentityPreamble(config: AgentConfig, nestedAgentAllowlist?: readonly string[], yieldEnabled?: boolean): AgentConfig;
|
|
@@ -58,7 +58,14 @@ export interface SubagentResult<T = unknown> extends Partial<CappedHandoff> {
|
|
|
58
58
|
continuable: boolean;
|
|
59
59
|
};
|
|
60
60
|
setupNotice?: string;
|
|
61
|
+
needsInput?: {
|
|
62
|
+
question: string;
|
|
63
|
+
summary?: string;
|
|
64
|
+
assumption?: string;
|
|
65
|
+
onceAnswered?: string;
|
|
66
|
+
};
|
|
61
67
|
}
|
|
68
|
+
export declare function detectNeedsInput(content: string): SubagentResult['needsInput'] | undefined;
|
|
62
69
|
export declare function buildResultFromMessage<T>(id: string, status: SubagentStatus, message: Message, outputSchema: ZodType<T> | undefined, trace?: SubagentTrace, stopReason?: string): SubagentResult<T>;
|
|
63
70
|
export declare function buildResultFromError<T>(id: string, status: SubagentStatus, err: unknown, trace?: SubagentTrace, stopReason?: string): SubagentResult<T>;
|
|
64
71
|
export declare function describeFailure(result: Pick<SubagentResult, 'status' | 'error'>): string;
|
|
@@ -9,6 +9,7 @@ export interface LspSymbolResult {
|
|
|
9
9
|
error?: string;
|
|
10
10
|
}
|
|
11
11
|
export type SymbolSubcommand = 'definition' | 'references';
|
|
12
|
+
export declare const DEFAULT_LSP_CMD: readonly ["typescript-language-server", "--stdio"];
|
|
12
13
|
export declare function parseLocation(raw: unknown): LspLocation | null;
|
|
13
14
|
export declare function isLspSymbolsEnabled(): boolean;
|
|
14
15
|
export declare function queryLspSymbol(filePath: string, subcommand: SymbolSubcommand, line: number, col: number, rootDir?: string, serverCmd?: readonly string[], signal?: AbortSignal): Promise<LspSymbolResult>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { RunForegroundArgs, PromotedSubagentInfo } from './foreground-promotion.js';
|
|
2
2
|
import type { ToolResult } from '../types.js';
|
|
3
|
+
import type { SubagentResult } from '../../subagent/result.js';
|
|
4
|
+
import type { ContinuationResultFields } from './continuation-dispatch.js';
|
|
3
5
|
import type { QueuedNoteClaim } from './queued-note.js';
|
|
4
6
|
import { type BackgroundDelivery } from './background-delivery.js';
|
|
5
7
|
import { type teardownIsolatedWorktree } from '../handlers/worktree-managed.js';
|
|
@@ -19,4 +21,7 @@ export declare function prepareForegroundRun(args: RunForegroundArgs): {
|
|
|
19
21
|
export declare function emitForegroundRejection(args: Pick<RunForegroundArgs, 'identity' | 'handle' | 'idPrefix' | 'parentSessionId' | 'depth'>, err: unknown, startedAt: number): void;
|
|
20
22
|
export declare function foregroundCompletionResult(args: Pick<RunForegroundArgs, 'handle' | 'identity' | 'parentSessionId' | 'depth' | 'model' | 'parentModel' | 'idPrefix'>, result: Awaited<RunPromise>, startedAt: number): ToolResult;
|
|
21
23
|
export declare function adoptForegroundRun(args: Pick<RunForegroundArgs, 'handle' | 'backgroundPrompt' | 'model' | 'parentSessionId' | 'budgetRelease'>, registry: NonNullable<RunForegroundArgs['registry']>, runPromise: RunPromise, isoTd: RunForegroundArgs['isolationTeardown']): import("../../background-registry.types.js").BackgroundJob;
|
|
24
|
+
export declare function prependNeedsInputHeader(result: ToolResult & ContinuationResultFields & {
|
|
25
|
+
_needsInput?: SubagentResult['needsInput'];
|
|
26
|
+
}): void;
|
|
22
27
|
export {};
|
|
@@ -116,6 +116,11 @@ export type OutputEvent = {
|
|
|
116
116
|
} | {
|
|
117
117
|
type: 'plan_mode';
|
|
118
118
|
mode: 'plan' | 'implement' | 'default';
|
|
119
|
+
} | {
|
|
120
|
+
type: 'mcp_server_status';
|
|
121
|
+
serverName: string;
|
|
122
|
+
status: 'error' | 'oauth_pending' | 'connected' | 'disconnected';
|
|
123
|
+
reason?: string;
|
|
119
124
|
};
|
|
120
125
|
export interface ProgressEvent {
|
|
121
126
|
taskId: string;
|
|
@@ -141,6 +146,11 @@ export interface RewindFilesResult {
|
|
|
141
146
|
filesChanged?: string[];
|
|
142
147
|
insertions?: number;
|
|
143
148
|
deletions?: number;
|
|
149
|
+
failures?: Array<{
|
|
150
|
+
path: string;
|
|
151
|
+
error: string;
|
|
152
|
+
}>;
|
|
153
|
+
conflicts?: string[];
|
|
144
154
|
}
|
|
145
155
|
export interface IAgentSession {
|
|
146
156
|
readonly state: SessionState;
|
|
@@ -179,6 +189,7 @@ export interface IAgentSession {
|
|
|
179
189
|
accountInfo(): Promise<AccountInfo>;
|
|
180
190
|
rewindFiles?(userMessageId: string, options?: {
|
|
181
191
|
dryRun?: boolean;
|
|
192
|
+
overwriteConflicts?: boolean;
|
|
182
193
|
}): Promise<RewindFilesResult>;
|
|
183
194
|
compact(): Promise<ProviderCompactResult>;
|
|
184
195
|
listRewindTargets(): RewindTarget[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function isBashToolName(name: string): boolean;
|
|
2
|
+
export interface Span {
|
|
3
|
+
start: number;
|
|
4
|
+
end: number;
|
|
5
|
+
segmentEnd: number;
|
|
6
|
+
afterPipe: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function styleBashCommand(text: string): string;
|
|
9
|
+
export declare function findCommandWordSpans(s: string): Span[];
|
|
@@ -62,6 +62,7 @@ export interface CliConfig {
|
|
|
62
62
|
theme?: 'dark' | 'light' | 'umber' | 'auto';
|
|
63
63
|
autoResumeOnUsageLimit?: boolean;
|
|
64
64
|
enforceDoneEvidence?: boolean;
|
|
65
|
+
fileCheckpoints?: boolean;
|
|
65
66
|
bgSummaries?: boolean;
|
|
66
67
|
maxSummaryCallsPerSession?: number;
|
|
67
68
|
hooks?: RawHooksConfig;
|
|
@@ -137,6 +138,7 @@ export interface ConfigFileSchema {
|
|
|
137
138
|
theme?: 'dark' | 'light' | 'umber' | 'auto';
|
|
138
139
|
autoResumeOnUsageLimit?: boolean;
|
|
139
140
|
enforceDoneEvidence?: boolean;
|
|
141
|
+
fileCheckpoints?: boolean;
|
|
140
142
|
bgSummaries?: boolean;
|
|
141
143
|
maxSummaryCallsPerSession?: number;
|
|
142
144
|
hooks?: RawHooksConfig;
|
package/dist/cli/palette.d.ts
CHANGED
|
@@ -10,6 +10,9 @@ declare const darkPaletteDef: {
|
|
|
10
10
|
chrome: ChalkInstance;
|
|
11
11
|
syntaxString: ChalkInstance;
|
|
12
12
|
toolArg: ChalkInstance;
|
|
13
|
+
toolVerb: ChalkInstance;
|
|
14
|
+
toolVerbNetwork: ChalkInstance;
|
|
15
|
+
toolVerbDanger: ChalkInstance;
|
|
13
16
|
thinking: ChalkInstance;
|
|
14
17
|
success: ChalkInstance;
|
|
15
18
|
error: ChalkInstance;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SlashCommand } from './types.js';
|
|
2
|
+
export type SurfaceCapability = 'tty' | 'choose' | 'progress' | 'sessionControl' | 'permissionMode' | 'conversationRetry' | 'hostCredentials' | 'shellJobs' | 'consoleOutput';
|
|
3
|
+
export declare function commandRequirements(command: Pick<SlashCommand, 'name' | 'requires'>): readonly SurfaceCapability[];
|
|
4
|
+
export declare function withCommandRequirements(command: SlashCommand): SlashCommand;
|
|
5
|
+
export declare function missingCapabilities(command: Pick<SlashCommand, 'name' | 'requires'>, provided: ReadonlySet<SurfaceCapability>): SurfaceCapability[];
|
|
6
|
+
export declare function webCapabilities(): ReadonlySet<SurfaceCapability>;
|
|
7
|
+
export declare function capabilityReason(capability: SurfaceCapability): string;
|
|
8
|
+
export declare function telegramCapabilities(): ReadonlySet<SurfaceCapability>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ChoiceRequest {
|
|
2
|
+
corrId: string;
|
|
3
|
+
title: string;
|
|
4
|
+
options: readonly {
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
}[];
|
|
9
|
+
default?: string;
|
|
10
|
+
cancellable?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export type Choose = (request: ChoiceRequest) => Promise<string | null>;
|
|
13
|
+
export interface ProgressEvent {
|
|
14
|
+
corrId: string;
|
|
15
|
+
phase: 'start' | 'update' | 'end';
|
|
16
|
+
label: string;
|
|
17
|
+
fraction?: number;
|
|
18
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Choose, ProgressEvent } from './interaction.js';
|
|
2
|
+
import type { SlashContext } from './types.js';
|
|
3
|
+
export declare function createReplInteractions(ctx: Pick<SlashContext, 'out' | 'getCompositor'>): {
|
|
4
|
+
choose: Choose;
|
|
5
|
+
progress: (event: ProgressEvent) => void;
|
|
6
|
+
};
|