amness 0.0.0-stage → 0.1.2
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/LICENSE +21 -0
- package/README.md +237 -2
- package/dist/cli/acpcli.d.ts +7 -0
- package/dist/cli/acpcli.js +14 -0
- package/dist/cli/amness.d.ts +2 -0
- package/dist/cli/amness.js +694 -0
- package/dist/cli/benchcli.d.ts +5 -0
- package/dist/cli/benchcli.js +160 -0
- package/dist/cli/config.d.ts +79 -0
- package/dist/cli/config.js +111 -0
- package/dist/cli/demo.d.ts +13 -0
- package/dist/cli/demo.js +44 -0
- package/dist/cli/detect.d.ts +2 -0
- package/dist/cli/detect.js +20 -0
- package/dist/cli/evalcli.d.ts +15 -0
- package/dist/cli/evalcli.js +198 -0
- package/dist/cli/format.d.ts +5 -0
- package/dist/cli/format.js +55 -0
- package/dist/cli/headless.d.ts +2 -0
- package/dist/cli/headless.js +169 -0
- package/dist/cli/keystore.d.ts +9 -0
- package/dist/cli/keystore.js +108 -0
- package/dist/cli/model.d.ts +11 -0
- package/dist/cli/model.js +19 -0
- package/dist/cli/plugincli.d.ts +2 -0
- package/dist/cli/plugincli.js +176 -0
- package/dist/cli/schedulecli.d.ts +2 -0
- package/dist/cli/schedulecli.js +66 -0
- package/dist/cli/state.d.ts +11 -0
- package/dist/cli/state.js +19 -0
- package/dist/cli/tui/ansi.d.ts +38 -0
- package/dist/cli/tui/ansi.js +142 -0
- package/dist/cli/tui/app.d.ts +328 -0
- package/dist/cli/tui/app.js +1358 -0
- package/dist/cli/tui/blocks.d.ts +151 -0
- package/dist/cli/tui/blocks.js +128 -0
- package/dist/cli/tui/brand.d.ts +9 -0
- package/dist/cli/tui/brand.js +16 -0
- package/dist/cli/tui/canvas.d.ts +92 -0
- package/dist/cli/tui/canvas.js +199 -0
- package/dist/cli/tui/cards.d.ts +44 -0
- package/dist/cli/tui/cards.js +215 -0
- package/dist/cli/tui/clipboard.d.ts +5 -0
- package/dist/cli/tui/clipboard.js +29 -0
- package/dist/cli/tui/commands.d.ts +10 -0
- package/dist/cli/tui/commands.js +650 -0
- package/dist/cli/tui/complete.d.ts +39 -0
- package/dist/cli/tui/complete.js +113 -0
- package/dist/cli/tui/custom.d.ts +9 -0
- package/dist/cli/tui/custom.js +34 -0
- package/dist/cli/tui/diffview.d.ts +25 -0
- package/dist/cli/tui/diffview.js +130 -0
- package/dist/cli/tui/editor.d.ts +60 -0
- package/dist/cli/tui/editor.js +230 -0
- package/dist/cli/tui/full.d.ts +86 -0
- package/dist/cli/tui/full.js +630 -0
- package/dist/cli/tui/keys.d.ts +31 -0
- package/dist/cli/tui/keys.js +134 -0
- package/dist/cli/tui/markdown.d.ts +37 -0
- package/dist/cli/tui/markdown.js +155 -0
- package/dist/cli/tui/mentions.d.ts +15 -0
- package/dist/cli/tui/mentions.js +48 -0
- package/dist/cli/tui/modal.d.ts +26 -0
- package/dist/cli/tui/modal.js +107 -0
- package/dist/cli/tui/overlays.d.ts +98 -0
- package/dist/cli/tui/overlays.js +237 -0
- package/dist/cli/tui/pager.d.ts +15 -0
- package/dist/cli/tui/pager.js +66 -0
- package/dist/cli/tui/pricing.d.ts +9 -0
- package/dist/cli/tui/pricing.js +23 -0
- package/dist/cli/tui/rich.d.ts +16 -0
- package/dist/cli/tui/rich.js +72 -0
- package/dist/cli/tui/screen.d.ts +30 -0
- package/dist/cli/tui/screen.js +62 -0
- package/dist/cli/tui/session.d.ts +77 -0
- package/dist/cli/tui/session.js +103 -0
- package/dist/cli/tui/sidebar.d.ts +84 -0
- package/dist/cli/tui/sidebar.js +114 -0
- package/dist/cli/tui/text.d.ts +15 -0
- package/dist/cli/tui/text.js +94 -0
- package/dist/cli/tui/theme.d.ts +59 -0
- package/dist/cli/tui/theme.js +148 -0
- package/dist/cli/tui/themes.d.ts +56 -0
- package/dist/cli/tui/themes.js +80 -0
- package/dist/cli/tui/tokens.d.ts +39 -0
- package/dist/cli/tui/tokens.js +71 -0
- package/dist/cli/tui/view.d.ts +60 -0
- package/dist/cli/tui/view.js +178 -0
- package/dist/cli/ui.d.ts +34 -0
- package/dist/cli/ui.js +224 -0
- package/dist/src/acp.d.ts +28 -0
- package/dist/src/acp.js +111 -0
- package/dist/src/agents.d.ts +23 -0
- package/dist/src/agents.js +71 -0
- package/dist/src/anthropic.d.ts +30 -0
- package/dist/src/anthropic.js +91 -0
- package/dist/src/approver.d.ts +15 -0
- package/dist/src/approver.js +40 -0
- package/dist/src/bench.d.ts +67 -0
- package/dist/src/bench.js +201 -0
- package/dist/src/bundle.d.ts +36 -0
- package/dist/src/bundle.js +55 -0
- package/dist/src/chaos.d.ts +15 -0
- package/dist/src/chaos.js +26 -0
- package/dist/src/code.d.ts +187 -0
- package/dist/src/code.js +590 -0
- package/dist/src/codeindex.d.ts +65 -0
- package/dist/src/codeindex.js +300 -0
- package/dist/src/deep.d.ts +62 -0
- package/dist/src/deep.js +177 -0
- package/dist/src/diff.d.ts +8 -0
- package/dist/src/diff.js +74 -0
- package/dist/src/dynamic.d.ts +42 -0
- package/dist/src/dynamic.js +133 -0
- package/dist/src/embed.d.ts +8 -0
- package/dist/src/embed.js +25 -0
- package/dist/src/evalcases.d.ts +11 -0
- package/dist/src/evalcases.js +196 -0
- package/dist/src/evals.d.ts +197 -0
- package/dist/src/evals.js +340 -0
- package/dist/src/gitflow.d.ts +27 -0
- package/dist/src/gitflow.js +56 -0
- package/dist/src/grade.d.ts +42 -0
- package/dist/src/grade.js +96 -0
- package/dist/src/guidance.d.ts +15 -0
- package/dist/src/guidance.js +68 -0
- package/dist/src/hardcases.d.ts +2 -0
- package/dist/src/hardcases.js +94 -0
- package/dist/src/harness.d.ts +411 -0
- package/dist/src/harness.js +725 -0
- package/dist/src/hooks.d.ts +44 -0
- package/dist/src/hooks.js +116 -0
- package/dist/src/images.d.ts +13 -0
- package/dist/src/images.js +27 -0
- package/dist/src/index.d.ts +57 -0
- package/dist/src/index.js +57 -0
- package/dist/src/ledger.d.ts +58 -0
- package/dist/src/ledger.js +78 -0
- package/dist/src/live.d.ts +16 -0
- package/dist/src/live.js +80 -0
- package/dist/src/lsp.d.ts +31 -0
- package/dist/src/lsp.js +147 -0
- package/dist/src/memory.d.ts +128 -0
- package/dist/src/memory.js +390 -0
- package/dist/src/metrics.d.ts +3 -0
- package/dist/src/metrics.js +42 -0
- package/dist/src/mining.d.ts +49 -0
- package/dist/src/mining.js +126 -0
- package/dist/src/openai.d.ts +50 -0
- package/dist/src/openai.js +307 -0
- package/dist/src/parallel.d.ts +66 -0
- package/dist/src/parallel.js +135 -0
- package/dist/src/patch.d.ts +45 -0
- package/dist/src/patch.js +219 -0
- package/dist/src/permissions.d.ts +46 -0
- package/dist/src/permissions.js +245 -0
- package/dist/src/plugins.d.ts +148 -0
- package/dist/src/plugins.js +225 -0
- package/dist/src/pluginscan.d.ts +8 -0
- package/dist/src/pluginscan.js +20 -0
- package/dist/src/procs.d.ts +41 -0
- package/dist/src/procs.js +94 -0
- package/dist/src/profiles.d.ts +36 -0
- package/dist/src/profiles.js +61 -0
- package/dist/src/progress.d.ts +29 -0
- package/dist/src/progress.js +75 -0
- package/dist/src/prompts.d.ts +10 -0
- package/dist/src/prompts.js +28 -0
- package/dist/src/ratelimit.d.ts +34 -0
- package/dist/src/ratelimit.js +116 -0
- package/dist/src/replay.d.ts +25 -0
- package/dist/src/replay.js +99 -0
- package/dist/src/review.d.ts +20 -0
- package/dist/src/review.js +49 -0
- package/dist/src/route.d.ts +9 -0
- package/dist/src/route.js +30 -0
- package/dist/src/router.d.ts +61 -0
- package/dist/src/router.js +126 -0
- package/dist/src/sandbox.d.ts +13 -0
- package/dist/src/sandbox.js +68 -0
- package/dist/src/schedule.d.ts +20 -0
- package/dist/src/schedule.js +59 -0
- package/dist/src/schema.d.ts +13 -0
- package/dist/src/schema.js +36 -0
- package/dist/src/secrets.d.ts +10 -0
- package/dist/src/secrets.js +41 -0
- package/dist/src/shell.d.ts +34 -0
- package/dist/src/shell.js +95 -0
- package/dist/src/skills.d.ts +20 -0
- package/dist/src/skills.js +112 -0
- package/dist/src/snapshot.d.ts +20 -0
- package/dist/src/snapshot.js +93 -0
- package/dist/src/stats.d.ts +24 -0
- package/dist/src/stats.js +62 -0
- package/dist/src/strategies.d.ts +16 -0
- package/dist/src/strategies.js +35 -0
- package/dist/src/suites.d.ts +30 -0
- package/dist/src/suites.js +112 -0
- package/dist/src/trace.d.ts +63 -0
- package/dist/src/trace.js +153 -0
- package/dist/src/tune.d.ts +38 -0
- package/dist/src/tune.js +49 -0
- package/dist/src/web.d.ts +19 -0
- package/dist/src/web.js +56 -0
- package/dist/src/worktree.d.ts +24 -0
- package/dist/src/worktree.js +85 -0
- package/docs/agent-loop.md +222 -0
- package/docs/architecture.md +228 -0
- package/docs/bench.md +292 -0
- package/docs/budgets.md +185 -0
- package/docs/build-your-own-harness.md +424 -0
- package/docs/cookbook.md +375 -0
- package/docs/development.md +150 -0
- package/docs/evaluation.md +450 -0
- package/docs/features.md +1320 -0
- package/docs/getting-started.md +205 -0
- package/docs/headless.md +188 -0
- package/docs/images/approval.png +0 -0
- package/docs/images/chat.png +0 -0
- package/docs/images/daylight.png +0 -0
- package/docs/images/loop.png +0 -0
- package/docs/images/palette.png +0 -0
- package/docs/images/running.png +0 -0
- package/docs/images/subagent-done.png +0 -0
- package/docs/images/subagent-running.png +0 -0
- package/docs/images/welcome.png +0 -0
- package/docs/index.md +25 -0
- package/docs/library.md +267 -0
- package/docs/plugins.md +691 -0
- package/docs/providers.md +175 -0
- package/docs/safety.md +250 -0
- package/docs/usage.md +348 -0
- package/docs/why.md +155 -0
- package/docs/writing-guide.md +39 -0
- package/package.json +66 -4
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { type Plugin } from "../../src/index.ts";
|
|
2
|
+
import { Budget, MemoryStore, Snapshots, Tracer, type Profile, type Roles, createCodeAgent, Hooks, Permissions, startLive, type Approve, type Event, type Message, type Model, type PermMode, type Tool } from "../../src/index.ts";
|
|
3
|
+
import { type Config } from "../config.ts";
|
|
4
|
+
import { BlockStore } from "./blocks.ts";
|
|
5
|
+
import { type Cmd } from "./commands.ts";
|
|
6
|
+
import { FullView } from "./full.ts";
|
|
7
|
+
import { FileIndex, type Suggestion, type Token } from "./complete.ts";
|
|
8
|
+
import { Editor } from "./editor.ts";
|
|
9
|
+
import { KeyParser, type Key } from "./keys.ts";
|
|
10
|
+
import { type Overlay, type PickItem } from "./overlays.ts";
|
|
11
|
+
import { Pager } from "./pager.ts";
|
|
12
|
+
import { Screen, type Out } from "./screen.ts";
|
|
13
|
+
import { SessionStore, type SessionData } from "./session.ts";
|
|
14
|
+
type Ev = Event & {
|
|
15
|
+
agent?: string;
|
|
16
|
+
};
|
|
17
|
+
type EditEv = Extract<Event, {
|
|
18
|
+
kind: "edit";
|
|
19
|
+
}>;
|
|
20
|
+
export type AppOptions = {
|
|
21
|
+
cfg: Config;
|
|
22
|
+
cwd: string;
|
|
23
|
+
version: string;
|
|
24
|
+
input?: any;
|
|
25
|
+
output?: Out & {
|
|
26
|
+
on?: (e: string, f: () => void) => void;
|
|
27
|
+
};
|
|
28
|
+
makeModel?: (cfg: Config) => Model;
|
|
29
|
+
resume?: "last" | string;
|
|
30
|
+
prompt?: string;
|
|
31
|
+
persist?: boolean; /** idle ms before a cache keep-alive ping (default 270000) */
|
|
32
|
+
keepWarmMs?: number;
|
|
33
|
+
/** "full" = the full-screen UI (alternate screen, mouse, sidebar); "inline" = the classic scrollback UI. */
|
|
34
|
+
ui?: "full" | "inline";
|
|
35
|
+
};
|
|
36
|
+
export type TraceStep = {
|
|
37
|
+
n: number;
|
|
38
|
+
t0: number;
|
|
39
|
+
ms: number;
|
|
40
|
+
prompt: number;
|
|
41
|
+
completion: number;
|
|
42
|
+
cached?: number;
|
|
43
|
+
parallel?: number;
|
|
44
|
+
tools: {
|
|
45
|
+
name: string;
|
|
46
|
+
args: string;
|
|
47
|
+
ms: number;
|
|
48
|
+
ok: boolean;
|
|
49
|
+
}[];
|
|
50
|
+
notes: string[];
|
|
51
|
+
};
|
|
52
|
+
export declare class App {
|
|
53
|
+
cfg: Config;
|
|
54
|
+
cwd: string;
|
|
55
|
+
version: string;
|
|
56
|
+
persist: boolean;
|
|
57
|
+
io: {
|
|
58
|
+
input: any;
|
|
59
|
+
output: Out & {
|
|
60
|
+
on?: (e: string, f: () => void) => void;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
screen: Screen;
|
|
64
|
+
keys: KeyParser;
|
|
65
|
+
editor: Editor;
|
|
66
|
+
files: FileIndex;
|
|
67
|
+
mode: PermMode;
|
|
68
|
+
shRules: Set<string>;
|
|
69
|
+
toolRules: Set<string>;
|
|
70
|
+
model: Model;
|
|
71
|
+
agent: ReturnType<typeof createCodeAgent>;
|
|
72
|
+
budget: Budget;
|
|
73
|
+
store: SessionStore;
|
|
74
|
+
session: SessionData;
|
|
75
|
+
edits: EditEv[];
|
|
76
|
+
verify: string | undefined;
|
|
77
|
+
check: string | undefined;
|
|
78
|
+
trimmed: number;
|
|
79
|
+
cacheBreaks: number;
|
|
80
|
+
runSeries: number[];
|
|
81
|
+
thinkBuf: string;
|
|
82
|
+
phase: {
|
|
83
|
+
phase: string;
|
|
84
|
+
step: number;
|
|
85
|
+
max: number;
|
|
86
|
+
n?: number;
|
|
87
|
+
} | undefined;
|
|
88
|
+
activity: {
|
|
89
|
+
name: string;
|
|
90
|
+
args: string;
|
|
91
|
+
ms: number;
|
|
92
|
+
ok: boolean;
|
|
93
|
+
}[];
|
|
94
|
+
/** One entry per loop iteration of the conversation so far, for /loop. */
|
|
95
|
+
trace: TraceStep[];
|
|
96
|
+
running: boolean;
|
|
97
|
+
ac: AbortController | undefined;
|
|
98
|
+
runStart: number;
|
|
99
|
+
runTokens: number;
|
|
100
|
+
lastPrompt: number;
|
|
101
|
+
inflight: Map<string, {
|
|
102
|
+
name: string;
|
|
103
|
+
args: string;
|
|
104
|
+
t0: number;
|
|
105
|
+
agent?: string;
|
|
106
|
+
parent?: string;
|
|
107
|
+
}>;
|
|
108
|
+
pendingEdits: Map<string, {
|
|
109
|
+
kind: "edit";
|
|
110
|
+
path: string;
|
|
111
|
+
created: boolean;
|
|
112
|
+
added: number;
|
|
113
|
+
removed: number;
|
|
114
|
+
diff: string;
|
|
115
|
+
before?: string | null;
|
|
116
|
+
}>;
|
|
117
|
+
streamBuf: string;
|
|
118
|
+
msgOpen: boolean;
|
|
119
|
+
streamedThisMsg: boolean;
|
|
120
|
+
todos: {
|
|
121
|
+
content: string;
|
|
122
|
+
status: string;
|
|
123
|
+
}[];
|
|
124
|
+
queued: {
|
|
125
|
+
text: string;
|
|
126
|
+
full: string;
|
|
127
|
+
}[];
|
|
128
|
+
overlay: Overlay | null;
|
|
129
|
+
pager: Pager | null;
|
|
130
|
+
sugg: {
|
|
131
|
+
items: Suggestion[];
|
|
132
|
+
sel: number;
|
|
133
|
+
token: Token;
|
|
134
|
+
kind: Token["kind"];
|
|
135
|
+
} | null;
|
|
136
|
+
suggOff: string;
|
|
137
|
+
private builtin;
|
|
138
|
+
private customAt;
|
|
139
|
+
private customCmds;
|
|
140
|
+
mcp: {
|
|
141
|
+
cmd: string;
|
|
142
|
+
tools: Tool[];
|
|
143
|
+
close: () => void;
|
|
144
|
+
}[];
|
|
145
|
+
notice: string;
|
|
146
|
+
noticeUntil: number;
|
|
147
|
+
pendingContext: string[];
|
|
148
|
+
modeNotice: string;
|
|
149
|
+
branch: string | undefined;
|
|
150
|
+
live: Awaited<ReturnType<typeof startLive>> | undefined;
|
|
151
|
+
private out;
|
|
152
|
+
private timer;
|
|
153
|
+
private flushT;
|
|
154
|
+
private renderT;
|
|
155
|
+
private escAt;
|
|
156
|
+
private ctrlcAt;
|
|
157
|
+
frame: number;
|
|
158
|
+
private stopped;
|
|
159
|
+
/** The structured transcript the full-screen UI draws (kept in both modes so switching never loses history). */
|
|
160
|
+
blocks: BlockStore;
|
|
161
|
+
ui: "full" | "inline";
|
|
162
|
+
full?: FullView;
|
|
163
|
+
private opts;
|
|
164
|
+
done: Promise<number>;
|
|
165
|
+
private resolveDone;
|
|
166
|
+
constructor(o: AppOptions);
|
|
167
|
+
private warnedShadow;
|
|
168
|
+
/** Built-in commands plus the user's own (.amness/commands/*.md). Built-ins win name clashes. */
|
|
169
|
+
get cmds(): Cmd[];
|
|
170
|
+
buildAgent(): void;
|
|
171
|
+
get width(): number;
|
|
172
|
+
get ctxPct(): number | null;
|
|
173
|
+
get cost(): string;
|
|
174
|
+
start(): Promise<number>;
|
|
175
|
+
private recount;
|
|
176
|
+
private replay;
|
|
177
|
+
restore: () => void;
|
|
178
|
+
exit(code?: number): void;
|
|
179
|
+
/** Raw pre-styled lines: scrollback in the inline UI, a "raw" block in the full-screen UI. */
|
|
180
|
+
commit(lines: string[]): void;
|
|
181
|
+
/** Scrollback-only output for things the full-screen UI draws from structured blocks instead. */
|
|
182
|
+
private inlineOnly;
|
|
183
|
+
private notify;
|
|
184
|
+
private addUser;
|
|
185
|
+
say(text: string | string[], paint?: (s: string) => string): void;
|
|
186
|
+
note(text: string, ms?: number): void;
|
|
187
|
+
render: () => void;
|
|
188
|
+
schedule(): void;
|
|
189
|
+
private styleInput;
|
|
190
|
+
private hint;
|
|
191
|
+
setTitle(t: string): void;
|
|
192
|
+
private suggLines;
|
|
193
|
+
private tick;
|
|
194
|
+
private ensureTimer;
|
|
195
|
+
private idleTimer;
|
|
196
|
+
onData: (d: Buffer | string) => void;
|
|
197
|
+
handleKey(k: Key): void;
|
|
198
|
+
private after;
|
|
199
|
+
private updateSugg;
|
|
200
|
+
acceptSuggPublic(fromEnter: boolean): void;
|
|
201
|
+
private acceptSugg;
|
|
202
|
+
private escape;
|
|
203
|
+
private ctrlC;
|
|
204
|
+
cycleMode(): void;
|
|
205
|
+
setMode(m: PermMode): void;
|
|
206
|
+
submit(): Promise<void>;
|
|
207
|
+
dispatch(text: string): Promise<void>;
|
|
208
|
+
runCommand(text: string): Promise<void>;
|
|
209
|
+
private drainQueue;
|
|
210
|
+
bash(cmd: string): Promise<undefined>;
|
|
211
|
+
remember(note: string): void;
|
|
212
|
+
turn(text: string): Promise<void>;
|
|
213
|
+
private stepNow;
|
|
214
|
+
/** The session's trace (local JSONL file, plus an OpenTelemetry collector when AMNESS_OTLP is set). */
|
|
215
|
+
tracer?: Tracer;
|
|
216
|
+
private tracerFor;
|
|
217
|
+
private trace_;
|
|
218
|
+
onEvent(e: Ev): void;
|
|
219
|
+
/** Stream assistant text: complete paragraphs are committed to scrollback immediately; the unfinished tail stays in the live region. */
|
|
220
|
+
flushStream(final: boolean): void;
|
|
221
|
+
approve: Approve;
|
|
222
|
+
private shAllowed;
|
|
223
|
+
pick<T>(title: string, items: PickItem<T>[], initial?: number, onMove?: (v: T | undefined) => void): Promise<T | undefined>;
|
|
224
|
+
askText(prompt: string, o?: {
|
|
225
|
+
secret?: boolean;
|
|
226
|
+
initial?: string;
|
|
227
|
+
}): Promise<string | undefined>;
|
|
228
|
+
showText(lines: string[], title?: string): Promise<void>;
|
|
229
|
+
openPager(lines: string[], title?: string, start?: "top" | "bottom"): void;
|
|
230
|
+
openTranscript(): void;
|
|
231
|
+
/** Ctrl+P: every command in a filterable list. Commands that need an argument are typed into the input instead of run. */
|
|
232
|
+
openPalette(): Promise<void>;
|
|
233
|
+
openRewind(): Promise<void>;
|
|
234
|
+
rewindTo(idx: number): Promise<void>;
|
|
235
|
+
/** Fork the conversation after turn `idx`. The current conversation is saved as it is; the working tree is put back to how it was at that point. */
|
|
236
|
+
branchAfter(idx: number): Promise<void>;
|
|
237
|
+
/** Switch UI mode live. History is kept in the block store, so nothing is lost either way. */
|
|
238
|
+
switchUi(to: "full" | "inline"): void;
|
|
239
|
+
private rebuildBlocksIfEmpty;
|
|
240
|
+
rebuildBlocks(): void;
|
|
241
|
+
resumeById(id: string): Promise<void>;
|
|
242
|
+
newConversation(): void;
|
|
243
|
+
loadSession(s: SessionData): void;
|
|
244
|
+
saveSession(): void;
|
|
245
|
+
saveHistory(): void;
|
|
246
|
+
saveConfig(): void;
|
|
247
|
+
/** Put text on the clipboard (OSC 52 plus the platform tool). */
|
|
248
|
+
copyText(text: string): void;
|
|
249
|
+
private warmTimer?;
|
|
250
|
+
private warmCount;
|
|
251
|
+
private lastCached;
|
|
252
|
+
stopWarm(): void;
|
|
253
|
+
private scheduleWarm;
|
|
254
|
+
/** Project hooks run commands on this machine, so a cloned repo's hooks only run after the user approves this exact file. */
|
|
255
|
+
policyLog: string[];
|
|
256
|
+
hooks: Hooks;
|
|
257
|
+
rules: Permissions;
|
|
258
|
+
roles: Roles;
|
|
259
|
+
lastRoute: string;
|
|
260
|
+
loadHooks(): {
|
|
261
|
+
fp: string | undefined;
|
|
262
|
+
trusted: boolean;
|
|
263
|
+
};
|
|
264
|
+
plugins: Plugin[];
|
|
265
|
+
private statusAt;
|
|
266
|
+
private statusLines;
|
|
267
|
+
/** one line per plugin that has a `status` function, cached for a second; a failing plugin shows nothing */
|
|
268
|
+
pluginStatus(): string[];
|
|
269
|
+
/** loaded plugins plus the loop strategy chosen with /strategy and the prompt chosen with /prompt */
|
|
270
|
+
activePlugins(): Plugin[];
|
|
271
|
+
/** Load plugins: yours always, the project's only once you approved exactly these files. */
|
|
272
|
+
loadPluginsNow(): Promise<{
|
|
273
|
+
r: import("../../src/plugins.ts").Loaded;
|
|
274
|
+
fp: string | undefined;
|
|
275
|
+
}>;
|
|
276
|
+
askPluginTrust(): Promise<void>;
|
|
277
|
+
private askHookTrust;
|
|
278
|
+
/** Shell snapshots: before the first command of a turn that may change files, remember the working tree so /undo can put it back. */
|
|
279
|
+
snaps: Snapshots;
|
|
280
|
+
beforeShell(cmd: string): Promise<void>;
|
|
281
|
+
/** The harness profile for the current model (guards switched off, limits retuned): .amness/profile.json and ~/.amness/profile.json. */
|
|
282
|
+
profile: {
|
|
283
|
+
profile: Profile;
|
|
284
|
+
sources: string[];
|
|
285
|
+
};
|
|
286
|
+
private profileOptions;
|
|
287
|
+
setCheck(cmd: string | undefined): void;
|
|
288
|
+
setVerify(cmd: string | undefined): void;
|
|
289
|
+
ensureLive(): Promise<{
|
|
290
|
+
url: string;
|
|
291
|
+
onEvent(e: Event & {
|
|
292
|
+
agent?: string;
|
|
293
|
+
}): void;
|
|
294
|
+
close: () => Promise<void>;
|
|
295
|
+
}>;
|
|
296
|
+
providerInfo(): {
|
|
297
|
+
readonly label: "Anthropic (Claude)";
|
|
298
|
+
readonly baseUrl: "https://api.anthropic.com";
|
|
299
|
+
readonly model: "claude-opus-5-5";
|
|
300
|
+
readonly needsKey: true;
|
|
301
|
+
} | {
|
|
302
|
+
readonly label: "OpenAI";
|
|
303
|
+
readonly baseUrl: "https://api.openai.com/v1";
|
|
304
|
+
readonly model: "gpt-6.1-sol";
|
|
305
|
+
readonly needsKey: true;
|
|
306
|
+
} | {
|
|
307
|
+
readonly label: "OpenRouter";
|
|
308
|
+
readonly baseUrl: "https://openrouter.ai/api/v1";
|
|
309
|
+
readonly model: "openai/gpt-4.1";
|
|
310
|
+
readonly needsKey: true;
|
|
311
|
+
} | {
|
|
312
|
+
readonly label: "Ollama (local)";
|
|
313
|
+
readonly baseUrl: "http://localhost:11434/v1";
|
|
314
|
+
readonly model: "qwen2.5-coder:7b";
|
|
315
|
+
readonly needsKey: false;
|
|
316
|
+
} | {
|
|
317
|
+
readonly label: "Custom OpenAI-compatible";
|
|
318
|
+
readonly baseUrl: "http://localhost:8000/v1";
|
|
319
|
+
readonly model: "my-model";
|
|
320
|
+
readonly needsKey: false;
|
|
321
|
+
};
|
|
322
|
+
refreshBranch(): void;
|
|
323
|
+
get memory(): MemoryStore | undefined;
|
|
324
|
+
get messagesForExport(): Message[];
|
|
325
|
+
get hasFile(): (p: string) => boolean;
|
|
326
|
+
}
|
|
327
|
+
export declare function shPrefix(cmd: string): string;
|
|
328
|
+
export {};
|