@duetso/agent 0.1.34 → 0.1.36
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/package.json +2 -2
- package/dist/src/cli/env.d.ts +18 -0
- package/dist/src/cli/env.d.ts.map +1 -0
- package/dist/src/cli/env.js +114 -0
- package/dist/src/cli/env.js.map +1 -0
- package/dist/src/cli/help.d.ts +8 -0
- package/dist/src/cli/help.d.ts.map +1 -0
- package/dist/src/cli/help.js +178 -0
- package/dist/src/cli/help.js.map +1 -0
- package/dist/src/cli/login.d.ts +13 -0
- package/dist/src/cli/login.d.ts.map +1 -0
- package/dist/src/cli/login.js +61 -0
- package/dist/src/cli/login.js.map +1 -0
- package/dist/src/cli/memory-db.d.ts +24 -0
- package/dist/src/cli/memory-db.d.ts.map +1 -0
- package/dist/src/cli/memory-db.js +74 -0
- package/dist/src/cli/memory-db.js.map +1 -0
- package/dist/src/cli/memory-tui.d.ts +11 -0
- package/dist/src/cli/memory-tui.d.ts.map +1 -0
- package/dist/src/cli/memory-tui.js +266 -0
- package/dist/src/cli/memory-tui.js.map +1 -0
- package/dist/src/cli/memory.d.ts +9 -0
- package/dist/src/cli/memory.d.ts.map +1 -0
- package/dist/src/cli/memory.js +38 -0
- package/dist/src/cli/memory.js.map +1 -0
- package/dist/src/cli/package-manager.d.ts +38 -0
- package/dist/src/cli/package-manager.d.ts.map +1 -0
- package/dist/src/cli/package-manager.js +78 -0
- package/dist/src/cli/package-manager.js.map +1 -0
- package/dist/src/cli/resume-hint.d.ts +22 -0
- package/dist/src/cli/resume-hint.d.ts.map +1 -0
- package/dist/src/cli/resume-hint.js +61 -0
- package/dist/src/cli/resume-hint.js.map +1 -0
- package/dist/src/cli/run.d.ts +43 -0
- package/dist/src/cli/run.d.ts.map +1 -0
- package/dist/src/cli/run.js +273 -0
- package/dist/src/cli/run.js.map +1 -0
- package/dist/src/cli/shared.d.ts +55 -0
- package/dist/src/cli/shared.d.ts.map +1 -0
- package/dist/src/cli/shared.js +125 -0
- package/dist/src/cli/shared.js.map +1 -0
- package/dist/src/cli/skills.d.ts +10 -0
- package/dist/src/cli/skills.d.ts.map +1 -0
- package/dist/src/cli/skills.js +42 -0
- package/dist/src/cli/skills.js.map +1 -0
- package/dist/src/cli/upgrade.d.ts +9 -0
- package/dist/src/cli/upgrade.d.ts.map +1 -0
- package/dist/src/cli/upgrade.js +52 -0
- package/dist/src/cli/upgrade.js.map +1 -0
- package/dist/src/cli/version-check.d.ts +22 -0
- package/dist/src/cli/version-check.d.ts.map +1 -0
- package/dist/src/cli/version-check.js +78 -0
- package/dist/src/cli/version-check.js.map +1 -0
- package/dist/src/cli.d.ts +20 -63
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +38 -887
- package/dist/src/cli.js.map +1 -1
- package/dist/src/memory/observational-prompts.d.ts.map +1 -1
- package/dist/src/memory/observational-prompts.js +11 -7
- package/dist/src/memory/observational-prompts.js.map +1 -1
- package/dist/src/tui/app.d.ts +7 -47
- package/dist/src/tui/app.d.ts.map +1 -1
- package/dist/src/tui/app.js +204 -389
- package/dist/src/tui/app.js.map +1 -1
- package/dist/src/tui/autocomplete.d.ts +91 -0
- package/dist/src/tui/autocomplete.d.ts.map +1 -0
- package/dist/src/tui/autocomplete.js +177 -0
- package/dist/src/tui/autocomplete.js.map +1 -0
- package/dist/src/tui/file-index.d.ts +11 -0
- package/dist/src/tui/file-index.d.ts.map +1 -0
- package/dist/src/tui/file-index.js +75 -0
- package/dist/src/tui/file-index.js.map +1 -0
- package/dist/src/tui/history.d.ts +50 -0
- package/dist/src/tui/history.d.ts.map +1 -0
- package/dist/src/tui/history.js +132 -0
- package/dist/src/tui/history.js.map +1 -0
- package/dist/src/tui/sidebar.d.ts +20 -0
- package/dist/src/tui/sidebar.d.ts.map +1 -0
- package/dist/src/tui/sidebar.js +118 -0
- package/dist/src/tui/sidebar.js.map +1 -0
- package/dist/src/tui/theme.d.ts +15 -0
- package/dist/src/tui/theme.d.ts.map +1 -0
- package/dist/src/tui/theme.js +18 -0
- package/dist/src/tui/theme.js.map +1 -0
- package/dist/src/turn-runner/prompts.d.ts.map +1 -1
- package/dist/src/turn-runner/prompts.js +10 -1
- package/dist/src/turn-runner/prompts.js.map +1 -1
- package/dist/src/turn-runner/tools.d.ts +15 -1
- package/dist/src/turn-runner/tools.d.ts.map +1 -1
- package/dist/src/turn-runner/tools.js +96 -11
- package/dist/src/turn-runner/tools.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { mkdtempSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import { BoxRenderable, createCliRenderer, fg, ScrollBoxRenderable, t, TextRenderable, } from "@opentui/core";
|
|
6
|
+
import { COLORS } from "../tui/theme.js";
|
|
7
|
+
const HINT = "↑/↓ navigate · e edit · d delete · q quit";
|
|
8
|
+
/**
|
|
9
|
+
* Run the interactive memories browser.
|
|
10
|
+
*
|
|
11
|
+
* Renders observations in a scrollable list with metadata per row, lets the
|
|
12
|
+
* user navigate with the arrow keys, edit the selected memory's content via
|
|
13
|
+
* `$EDITOR` (or vi as a fallback), or delete it outright. All edits and
|
|
14
|
+
* deletes hit `db` directly so the runner sees them on its next session.
|
|
15
|
+
*/
|
|
16
|
+
export async function runMemoryTui(db, dbPath) {
|
|
17
|
+
const previousWindow = Object.getOwnPropertyDescriptor(globalThis, "window");
|
|
18
|
+
const renderer = await createCliRenderer({
|
|
19
|
+
exitOnCtrlC: true,
|
|
20
|
+
useKittyKeyboard: {},
|
|
21
|
+
targetFps: 60,
|
|
22
|
+
});
|
|
23
|
+
restoreWindowGlobal(previousWindow);
|
|
24
|
+
const root = new BoxRenderable(renderer, {
|
|
25
|
+
flexDirection: "column",
|
|
26
|
+
width: "100%",
|
|
27
|
+
height: "100%",
|
|
28
|
+
});
|
|
29
|
+
const header = new TextRenderable(renderer, {
|
|
30
|
+
content: `[duet memory] ${dbPath}`,
|
|
31
|
+
fg: COLORS.status,
|
|
32
|
+
height: 1,
|
|
33
|
+
flexShrink: 0,
|
|
34
|
+
});
|
|
35
|
+
const list = new ScrollBoxRenderable(renderer, {
|
|
36
|
+
flexGrow: 1,
|
|
37
|
+
flexShrink: 1,
|
|
38
|
+
scrollY: true,
|
|
39
|
+
border: true,
|
|
40
|
+
borderColor: COLORS.border,
|
|
41
|
+
padding: 1,
|
|
42
|
+
});
|
|
43
|
+
const status = new TextRenderable(renderer, {
|
|
44
|
+
content: "",
|
|
45
|
+
fg: COLORS.system,
|
|
46
|
+
height: 1,
|
|
47
|
+
flexShrink: 0,
|
|
48
|
+
});
|
|
49
|
+
const hint = new TextRenderable(renderer, {
|
|
50
|
+
content: HINT,
|
|
51
|
+
fg: COLORS.hint,
|
|
52
|
+
height: 1,
|
|
53
|
+
flexShrink: 0,
|
|
54
|
+
});
|
|
55
|
+
root.add(header);
|
|
56
|
+
root.add(list);
|
|
57
|
+
root.add(status);
|
|
58
|
+
root.add(hint);
|
|
59
|
+
renderer.root.add(root);
|
|
60
|
+
let observations = await db.list();
|
|
61
|
+
let selectedIndex = 0;
|
|
62
|
+
// Memorize each row by id so re-renders only update the changed lines'
|
|
63
|
+
// content/foreground rather than re-creating Renderables, which would
|
|
64
|
+
// also reset scroll position and selection focus.
|
|
65
|
+
const rowsById = new Map();
|
|
66
|
+
let mountedIds = [];
|
|
67
|
+
let busy = false;
|
|
68
|
+
function setStatus(text, color = COLORS.system) {
|
|
69
|
+
status.content = text;
|
|
70
|
+
status.fg = color;
|
|
71
|
+
}
|
|
72
|
+
function rebuildList() {
|
|
73
|
+
if (observations.length === 0) {
|
|
74
|
+
// Wipe the list and render a single placeholder row. Snapshot the
|
|
75
|
+
// children first because list.remove mutates the underlying array.
|
|
76
|
+
const existing = list.getChildren().slice();
|
|
77
|
+
for (const child of existing)
|
|
78
|
+
list.remove(child.id);
|
|
79
|
+
rowsById.clear();
|
|
80
|
+
mountedIds = [];
|
|
81
|
+
const empty = new TextRenderable(renderer, {
|
|
82
|
+
content: "(no observations yet — run a session first)",
|
|
83
|
+
fg: COLORS.hint,
|
|
84
|
+
});
|
|
85
|
+
list.add(empty);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const desiredIds = observations.map((observation) => observation.id);
|
|
89
|
+
if (mountedIds.join(",") !== desiredIds.join(",")) {
|
|
90
|
+
// Order or membership changed; re-mount from scratch. We could try a
|
|
91
|
+
// smaller diff, but the list is short and this keeps the code simple.
|
|
92
|
+
const existing = list.getChildren().slice();
|
|
93
|
+
for (const child of existing)
|
|
94
|
+
list.remove(child.id);
|
|
95
|
+
rowsById.clear();
|
|
96
|
+
for (const observation of observations) {
|
|
97
|
+
const row = new TextRenderable(renderer, {
|
|
98
|
+
content: "",
|
|
99
|
+
fg: COLORS.hint,
|
|
100
|
+
wrapMode: "word",
|
|
101
|
+
});
|
|
102
|
+
rowsById.set(observation.id, row);
|
|
103
|
+
list.add(row);
|
|
104
|
+
}
|
|
105
|
+
mountedIds = desiredIds;
|
|
106
|
+
}
|
|
107
|
+
for (const [index, observation] of observations.entries()) {
|
|
108
|
+
const row = rowsById.get(observation.id);
|
|
109
|
+
if (!row)
|
|
110
|
+
continue;
|
|
111
|
+
const selected = index === selectedIndex;
|
|
112
|
+
const marker = selected ? "▶" : " ";
|
|
113
|
+
const headerColor = selected ? COLORS.status : COLORS.user;
|
|
114
|
+
const metaColor = selected ? COLORS.agent : COLORS.hint;
|
|
115
|
+
const meta = formatMeta(observation);
|
|
116
|
+
row.content = t `${fg(headerColor)(`${marker} [${observation.priority}] ${observation.observedDate}`)} ${fg(metaColor)(meta)}\n ${fg(metaColor)(observation.content)}`;
|
|
117
|
+
row.fg = selected ? COLORS.agent : COLORS.hint;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
rebuildList();
|
|
121
|
+
function moveSelection(direction) {
|
|
122
|
+
if (observations.length === 0)
|
|
123
|
+
return;
|
|
124
|
+
selectedIndex = (selectedIndex + direction + observations.length) % observations.length;
|
|
125
|
+
rebuildList();
|
|
126
|
+
}
|
|
127
|
+
async function reload() {
|
|
128
|
+
observations = await db.list();
|
|
129
|
+
if (selectedIndex >= observations.length) {
|
|
130
|
+
selectedIndex = Math.max(0, observations.length - 1);
|
|
131
|
+
}
|
|
132
|
+
rebuildList();
|
|
133
|
+
}
|
|
134
|
+
async function deleteSelected() {
|
|
135
|
+
if (busy)
|
|
136
|
+
return;
|
|
137
|
+
const observation = observations[selectedIndex];
|
|
138
|
+
if (!observation)
|
|
139
|
+
return;
|
|
140
|
+
busy = true;
|
|
141
|
+
setStatus(`deleting ${observation.id}…`);
|
|
142
|
+
try {
|
|
143
|
+
await db.delete(observation.id);
|
|
144
|
+
await reload();
|
|
145
|
+
setStatus(`deleted ${observation.id}`, COLORS.status);
|
|
146
|
+
}
|
|
147
|
+
catch (error) {
|
|
148
|
+
setStatus(formatError("delete failed", error), COLORS.error);
|
|
149
|
+
}
|
|
150
|
+
finally {
|
|
151
|
+
busy = false;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
async function editSelected() {
|
|
155
|
+
if (busy)
|
|
156
|
+
return;
|
|
157
|
+
const observation = observations[selectedIndex];
|
|
158
|
+
if (!observation)
|
|
159
|
+
return;
|
|
160
|
+
busy = true;
|
|
161
|
+
setStatus(`editing ${observation.id}…`);
|
|
162
|
+
try {
|
|
163
|
+
const next = await editInExternalEditor(observation.content, renderer);
|
|
164
|
+
if (next === undefined) {
|
|
165
|
+
setStatus("edit cancelled", COLORS.hint);
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
const trimmed = next.replace(/\s+$/, "");
|
|
169
|
+
if (trimmed === observation.content) {
|
|
170
|
+
setStatus("edit unchanged", COLORS.hint);
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
await db.updateContent(observation.id, trimmed);
|
|
174
|
+
await reload();
|
|
175
|
+
setStatus(`updated ${observation.id}`, COLORS.status);
|
|
176
|
+
}
|
|
177
|
+
catch (error) {
|
|
178
|
+
setStatus(formatError("edit failed", error), COLORS.error);
|
|
179
|
+
}
|
|
180
|
+
finally {
|
|
181
|
+
busy = false;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
const keyHandler = renderer._keyHandler;
|
|
185
|
+
keyHandler.onInternal("keypress", (key) => {
|
|
186
|
+
if (busy)
|
|
187
|
+
return;
|
|
188
|
+
if (key.name === "q" || key.name === "escape") {
|
|
189
|
+
key.preventDefault();
|
|
190
|
+
renderer.destroy();
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
if (key.name === "up") {
|
|
194
|
+
key.preventDefault();
|
|
195
|
+
moveSelection(-1);
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
if (key.name === "down") {
|
|
199
|
+
key.preventDefault();
|
|
200
|
+
moveSelection(1);
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
if (key.name === "d") {
|
|
204
|
+
key.preventDefault();
|
|
205
|
+
void deleteSelected();
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
if (key.name === "e") {
|
|
209
|
+
key.preventDefault();
|
|
210
|
+
void editSelected();
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
await new Promise((resolve) => {
|
|
215
|
+
renderer.once("destroy", () => resolve());
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Suspend the OpenTUI renderer, drop the user into `$EDITOR` (or vi) on a
|
|
220
|
+
* scratch file seeded with `initial`, then resume the renderer.
|
|
221
|
+
*
|
|
222
|
+
* Returns the new contents on save, or `undefined` if the editor exited
|
|
223
|
+
* non-zero (caller treats this as "cancelled").
|
|
224
|
+
*/
|
|
225
|
+
async function editInExternalEditor(initial, renderer) {
|
|
226
|
+
const editor = process.env.VISUAL || process.env.EDITOR || "vi";
|
|
227
|
+
const dir = mkdtempSync(join(tmpdir(), "duet-memory-"));
|
|
228
|
+
const file = join(dir, "memory.txt");
|
|
229
|
+
writeFileSync(file, initial.endsWith("\n") ? initial : `${initial}\n`);
|
|
230
|
+
// OpenTUI doesn't expose a stable pause/resume API across versions; call
|
|
231
|
+
// whichever lifecycle methods exist before/after handing the terminal off.
|
|
232
|
+
const lifecycle = renderer;
|
|
233
|
+
lifecycle.pause?.();
|
|
234
|
+
lifecycle.stop?.();
|
|
235
|
+
try {
|
|
236
|
+
const exitCode = await new Promise((resolve, reject) => {
|
|
237
|
+
const child = spawn(editor, [file], { stdio: "inherit" });
|
|
238
|
+
child.once("error", reject);
|
|
239
|
+
child.once("exit", resolve);
|
|
240
|
+
});
|
|
241
|
+
if (exitCode !== 0)
|
|
242
|
+
return undefined;
|
|
243
|
+
return readFileSync(file, "utf8");
|
|
244
|
+
}
|
|
245
|
+
finally {
|
|
246
|
+
lifecycle.start?.();
|
|
247
|
+
lifecycle.resume?.();
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
function formatMeta(observation) {
|
|
251
|
+
const parts = [observation.scope];
|
|
252
|
+
if (observation.tags.length > 0)
|
|
253
|
+
parts.push(`#${observation.tags.join(" #")}`);
|
|
254
|
+
return parts.join(" · ");
|
|
255
|
+
}
|
|
256
|
+
function formatError(prefix, error) {
|
|
257
|
+
return `${prefix}: ${error instanceof Error ? error.message : String(error)}`;
|
|
258
|
+
}
|
|
259
|
+
function restoreWindowGlobal(previousWindow) {
|
|
260
|
+
if (previousWindow) {
|
|
261
|
+
Object.defineProperty(globalThis, "window", previousWindow);
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
delete globalThis.window;
|
|
265
|
+
}
|
|
266
|
+
//# sourceMappingURL=memory-tui.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-tui.js","sourceRoot":"","sources":["../../../src/cli/memory-tui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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AED,SAAS,mBAAmB,CAAC,cAA8C;IACzE,IAAI,cAAc,EAAE,CAAC;QACnB,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;QAC5D,OAAO;IACT,CAAC;IACD,OAAQ,UAAuD,CAAC,MAAM,CAAC;AACzE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run `duet memory` (alias: `duet memories`) — open the memory database in a TUI for browsing,
|
|
3
|
+
* editing, and deleting durable observations.
|
|
4
|
+
*
|
|
5
|
+
* Defaults to the same `~/.duet/memory.db` the runner writes to so changes
|
|
6
|
+
* propagate to the next session immediately.
|
|
7
|
+
*/
|
|
8
|
+
export declare function runMemoryCommand(args: string[]): Promise<void>;
|
|
9
|
+
//# sourceMappingURL=memory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../../src/cli/memory.ts"],"names":[],"mappings":"AAMA;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBpE"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { DEFAULT_MEMORY_DB_PATH } from "../session/session-manager.js";
|
|
2
|
+
import { printMemoryHelp } from "./help.js";
|
|
3
|
+
import { MemoryDb } from "./memory-db.js";
|
|
4
|
+
import { runMemoryTui } from "./memory-tui.js";
|
|
5
|
+
import { fail, resolveUserPath } from "./shared.js";
|
|
6
|
+
/**
|
|
7
|
+
* Run `duet memory` (alias: `duet memories`) — open the memory database in a TUI for browsing,
|
|
8
|
+
* editing, and deleting durable observations.
|
|
9
|
+
*
|
|
10
|
+
* Defaults to the same `~/.duet/memory.db` the runner writes to so changes
|
|
11
|
+
* propagate to the next session immediately.
|
|
12
|
+
*/
|
|
13
|
+
export async function runMemoryCommand(args) {
|
|
14
|
+
let dbPath = DEFAULT_MEMORY_DB_PATH;
|
|
15
|
+
for (let i = 0; i < args.length; i++) {
|
|
16
|
+
switch (args[i]) {
|
|
17
|
+
case "--db":
|
|
18
|
+
if (!args[i + 1] || args[i + 1]?.startsWith("-"))
|
|
19
|
+
fail(`Missing value for ${args[i]}`);
|
|
20
|
+
dbPath = resolveUserPath(args[++i]);
|
|
21
|
+
break;
|
|
22
|
+
case "--help":
|
|
23
|
+
case "-h":
|
|
24
|
+
printMemoryHelp();
|
|
25
|
+
return;
|
|
26
|
+
default:
|
|
27
|
+
fail(`Unknown memory option: ${args[i]}`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
const db = await MemoryDb.open(dbPath);
|
|
31
|
+
try {
|
|
32
|
+
await runMemoryTui(db, dbPath);
|
|
33
|
+
}
|
|
34
|
+
finally {
|
|
35
|
+
await db.close();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=memory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../../../src/cli/memory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEpD;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,IAAc;IACnD,IAAI,MAAM,GAAG,sBAAsB,CAAC;IAEpC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,QAAQ,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;YAChB,KAAK,MAAM;gBACT,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC;oBAAE,IAAI,CAAC,qBAAqB,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;gBACvF,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAE,CAAC,CAAC;gBACrC,MAAM;YACR,KAAK,QAAQ,CAAC;YACd,KAAK,IAAI;gBACP,eAAe,EAAE,CAAC;gBAClB,OAAO;YACT;gBACE,IAAI,CAAC,0BAA0B,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IAED,MAAM,EAAE,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvC,IAAI,CAAC;QACH,MAAM,YAAY,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IACjC,CAAC;YAAS,CAAC;QACT,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC;IACnB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare const PACKAGE_MANAGERS: readonly ["npm", "bun", "pnpm", "yarn"];
|
|
2
|
+
export type PackageManager = (typeof PACKAGE_MANAGERS)[number];
|
|
3
|
+
/**
|
|
4
|
+
* Hints the runtime exposes about how the CLI was invoked. Splitting these
|
|
5
|
+
* out makes the detection logic easy to unit-test from synthetic contexts.
|
|
6
|
+
*/
|
|
7
|
+
export interface PackageManagerDetectionContext {
|
|
8
|
+
/** $npm_config_user_agent — most reliable signal when present. */
|
|
9
|
+
userAgent?: string;
|
|
10
|
+
/** process.argv[0] — falls back to "bun" when the binary name suggests it. */
|
|
11
|
+
runtimeExecutable?: string;
|
|
12
|
+
/** Path of the CLI module file; useful for global-install heuristics. */
|
|
13
|
+
cliFilePath?: string;
|
|
14
|
+
/** Path of the script being executed (process.argv[1]). */
|
|
15
|
+
scriptPath?: string;
|
|
16
|
+
}
|
|
17
|
+
/** Validate a CLI-supplied --manager value against the supported list. */
|
|
18
|
+
export declare function parsePackageManager(value: string): PackageManager;
|
|
19
|
+
/**
|
|
20
|
+
* Detect which package manager is currently running this CLI. Used by
|
|
21
|
+
* `duet upgrade` so the suggested upgrade command matches the user's
|
|
22
|
+
* existing install.
|
|
23
|
+
*/
|
|
24
|
+
export declare function detectPackageManager(): PackageManager;
|
|
25
|
+
export declare function detectPackageManagerFromContext(context: PackageManagerDetectionContext): PackageManager;
|
|
26
|
+
/**
|
|
27
|
+
* Build the argv that performs a global install of `packageName@version`
|
|
28
|
+
* with the given package manager. Each manager gets its own subcommand
|
|
29
|
+
* shape; the CLI prints this verbatim as part of the upgrade flow.
|
|
30
|
+
*/
|
|
31
|
+
export declare function globalUpgradeCommand(packageManager: PackageManager, packageName: string, version: string): string[];
|
|
32
|
+
/**
|
|
33
|
+
* Spawn a child process inheriting stdio so the user sees the manager's
|
|
34
|
+
* progress. Sets the parent exit code on non-zero exit but never throws —
|
|
35
|
+
* the upgrade flow logs the failure and returns control to main().
|
|
36
|
+
*/
|
|
37
|
+
export declare function runCommand(command: string, args: string[]): Promise<void>;
|
|
38
|
+
//# sourceMappingURL=package-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-manager.d.ts","sourceRoot":"","sources":["../../../src/cli/package-manager.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,yCAA0C,CAAC;AAExE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC7C,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8EAA8E;IAC9E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,0EAA0E;AAC1E,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,CAGjE;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,cAAc,CAOrD;AAED,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,8BAA8B,GACtC,cAAc,CAiBhB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,cAAc,EAAE,cAAc,EAC9B,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAMV;AAED;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAS/E"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { basename } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { fail, normalizePackageVersion } from "./shared.js";
|
|
5
|
+
export const PACKAGE_MANAGERS = ["npm", "bun", "pnpm", "yarn"];
|
|
6
|
+
/** Validate a CLI-supplied --manager value against the supported list. */
|
|
7
|
+
export function parsePackageManager(value) {
|
|
8
|
+
if (PACKAGE_MANAGERS.includes(value))
|
|
9
|
+
return value;
|
|
10
|
+
fail(`Unsupported package manager: ${value}`);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Detect which package manager is currently running this CLI. Used by
|
|
14
|
+
* `duet upgrade` so the suggested upgrade command matches the user's
|
|
15
|
+
* existing install.
|
|
16
|
+
*/
|
|
17
|
+
export function detectPackageManager() {
|
|
18
|
+
return detectPackageManagerFromContext({
|
|
19
|
+
userAgent: process.env.npm_config_user_agent,
|
|
20
|
+
runtimeExecutable: process.argv[0],
|
|
21
|
+
cliFilePath: fileURLToPath(import.meta.url),
|
|
22
|
+
scriptPath: process.argv[1],
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
export function detectPackageManagerFromContext(context) {
|
|
26
|
+
const userAgent = context.userAgent ?? "";
|
|
27
|
+
for (const packageManager of PACKAGE_MANAGERS) {
|
|
28
|
+
if (userAgent.startsWith(`${packageManager}/`))
|
|
29
|
+
return packageManager;
|
|
30
|
+
}
|
|
31
|
+
for (const rawPath of [context.cliFilePath, context.scriptPath]) {
|
|
32
|
+
const path = rawPath?.replace(/\\/g, "/");
|
|
33
|
+
if (!path)
|
|
34
|
+
continue;
|
|
35
|
+
if (path.includes("/.bun/install/global/") || path.includes("/.bun/bin/"))
|
|
36
|
+
return "bun";
|
|
37
|
+
if (path.includes("/.pnpm/") || path.includes("/share/pnpm/"))
|
|
38
|
+
return "pnpm";
|
|
39
|
+
if (path.includes("/.config/yarn/global/") || path.includes("/yarn/global/"))
|
|
40
|
+
return "yarn";
|
|
41
|
+
if (path.includes("/node_modules/"))
|
|
42
|
+
return "npm";
|
|
43
|
+
}
|
|
44
|
+
if (basename(context.runtimeExecutable ?? "").includes("bun"))
|
|
45
|
+
return "bun";
|
|
46
|
+
return "npm";
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Build the argv that performs a global install of `packageName@version`
|
|
50
|
+
* with the given package manager. Each manager gets its own subcommand
|
|
51
|
+
* shape; the CLI prints this verbatim as part of the upgrade flow.
|
|
52
|
+
*/
|
|
53
|
+
export function globalUpgradeCommand(packageManager, packageName, version) {
|
|
54
|
+
const packageSpec = `${packageName}@${normalizePackageVersion(version)}`;
|
|
55
|
+
if (packageManager === "bun")
|
|
56
|
+
return ["bun", "add", "--global", packageSpec];
|
|
57
|
+
if (packageManager === "pnpm")
|
|
58
|
+
return ["pnpm", "add", "--global", packageSpec];
|
|
59
|
+
if (packageManager === "yarn")
|
|
60
|
+
return ["yarn", "global", "add", packageSpec];
|
|
61
|
+
return ["npm", "install", "--global", packageSpec];
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Spawn a child process inheriting stdio so the user sees the manager's
|
|
65
|
+
* progress. Sets the parent exit code on non-zero exit but never throws —
|
|
66
|
+
* the upgrade flow logs the failure and returns control to main().
|
|
67
|
+
*/
|
|
68
|
+
export async function runCommand(command, args) {
|
|
69
|
+
const child = spawn(command, args, { stdio: "inherit" });
|
|
70
|
+
const exitCode = await new Promise((resolve, reject) => {
|
|
71
|
+
child.once("error", reject);
|
|
72
|
+
child.once("exit", resolve);
|
|
73
|
+
});
|
|
74
|
+
if (exitCode !== 0) {
|
|
75
|
+
process.exitCode = exitCode ?? 1;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=package-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-manager.js","sourceRoot":"","sources":["../../../src/cli/package-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAE5D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAU,CAAC;AAmBxE,0EAA0E;AAC1E,MAAM,UAAU,mBAAmB,CAAC,KAAa;IAC/C,IAAI,gBAAgB,CAAC,QAAQ,CAAC,KAAuB,CAAC;QAAE,OAAO,KAAuB,CAAC;IACvF,IAAI,CAAC,gCAAgC,KAAK,EAAE,CAAC,CAAC;AAChD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB;IAClC,OAAO,+BAA+B,CAAC;QACrC,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,qBAAqB;QAC5C,iBAAiB,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QAClC,WAAW,EAAE,aAA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ClC,cAA8B,EAC9B,WAAmB,EACnB,OAAe;IAEf,MAAM,WAAW,GAAG,GAAG,WAAW,IAAI,uBAAuB,CAAC,OAAO,CAAC,EAAE,CAAC;IACzE,IAAI,cAAc,KAAK,KAAK;QAAE,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;IAC7E,IAAI,cAAc,KAAK,MAAM;QAAE,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;IAC/E,IAAI,cAAc,KAAK,MAAM;QAAE,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;IAC7E,OAAO,CAAC,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;AACrD,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,OAAe,EAAE,IAAc;IAC9D,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IACzD,MAAM,QAAQ,GAAG,MAAM,IAAI,OAAO,CAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACpE,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC5B,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;IACH,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;QACnB,OAAO,CAAC,QAAQ,GAAG,QAAQ,IAAI,CAAC,CAAC;IACnC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inputs needed to recreate the resume command shown after each session.
|
|
3
|
+
* Mirrors the flag surface of `duet` so users can copy-paste verbatim.
|
|
4
|
+
*/
|
|
5
|
+
export interface ResumeCommandInput {
|
|
6
|
+
modelName?: string;
|
|
7
|
+
memoryModelName?: string;
|
|
8
|
+
workDir: string;
|
|
9
|
+
disableDurableMemory?: boolean;
|
|
10
|
+
systemInstructions?: string;
|
|
11
|
+
systemPromptFiles?: string[];
|
|
12
|
+
envFilePath?: string;
|
|
13
|
+
resumeHistoryLines?: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Render the shell command that resumes the given session with the same
|
|
17
|
+
* configuration. The invocation prefix matches how the CLI was launched
|
|
18
|
+
* (published bin, `bun run cli`, or `bun src/cli.ts`) so the suggestion
|
|
19
|
+
* works in both production and local-dev shells.
|
|
20
|
+
*/
|
|
21
|
+
export declare function resumeCommand(sessionId: string, input: ResumeCommandInput): string;
|
|
22
|
+
//# sourceMappingURL=resume-hint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resume-hint.d.ts","sourceRoot":"","sources":["../../../src/cli/resume-hint.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB,GAAG,MAAM,CAoClF"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { basename } from "node:path";
|
|
2
|
+
import { shellQuote } from "./shared.js";
|
|
3
|
+
/**
|
|
4
|
+
* Render the shell command that resumes the given session with the same
|
|
5
|
+
* configuration. The invocation prefix matches how the CLI was launched
|
|
6
|
+
* (published bin, `bun run cli`, or `bun src/cli.ts`) so the suggestion
|
|
7
|
+
* works in both production and local-dev shells.
|
|
8
|
+
*/
|
|
9
|
+
export function resumeCommand(sessionId, input) {
|
|
10
|
+
const command = [
|
|
11
|
+
detectInvocationPrefix(),
|
|
12
|
+
"--resume",
|
|
13
|
+
shellQuote(sessionId),
|
|
14
|
+
"--workdir",
|
|
15
|
+
shellQuote(input.workDir),
|
|
16
|
+
];
|
|
17
|
+
if (input.modelName) {
|
|
18
|
+
command.push("--model", shellQuote(input.modelName));
|
|
19
|
+
}
|
|
20
|
+
if (input.memoryModelName) {
|
|
21
|
+
command.push("--memory-model", shellQuote(input.memoryModelName));
|
|
22
|
+
}
|
|
23
|
+
if (input.disableDurableMemory) {
|
|
24
|
+
command.push("--no-memory");
|
|
25
|
+
}
|
|
26
|
+
if (input.systemInstructions) {
|
|
27
|
+
command.push("--system-prompt", shellQuote(input.systemInstructions));
|
|
28
|
+
}
|
|
29
|
+
if (input.systemPromptFiles) {
|
|
30
|
+
if (input.systemPromptFiles.length === 0) {
|
|
31
|
+
command.push("--no-system-prompt-files");
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
for (const fileName of input.systemPromptFiles) {
|
|
35
|
+
command.push("--system-prompt-file", shellQuote(fileName));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
if (input.envFilePath) {
|
|
40
|
+
command.push("--env-file", shellQuote(input.envFilePath));
|
|
41
|
+
}
|
|
42
|
+
if (input.resumeHistoryLines !== undefined) {
|
|
43
|
+
command.push("--resume-history-lines", String(input.resumeHistoryLines));
|
|
44
|
+
}
|
|
45
|
+
return command.join(" ");
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Detect how this CLI was invoked so the resume hint copy-pastes back into
|
|
49
|
+
* the user's actual shell. `bun run cli` and `bun src/cli.ts` are common
|
|
50
|
+
* during local development; the published bin is `duet`.
|
|
51
|
+
*/
|
|
52
|
+
function detectInvocationPrefix() {
|
|
53
|
+
const scriptPath = process.argv[1] ?? "";
|
|
54
|
+
const base = basename(scriptPath);
|
|
55
|
+
if (process.env.npm_lifecycle_event === "cli")
|
|
56
|
+
return "bun run cli";
|
|
57
|
+
if (base === "cli.ts" || scriptPath.includes("/src/cli.ts"))
|
|
58
|
+
return "bun src/cli.ts";
|
|
59
|
+
return "duet";
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=resume-hint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resume-hint.js","sourceRoot":"","sources":["../../../src/cli/resume-hint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAiBzC;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,SAAiB,EAAE,KAAyB;IACxE,MAAM,OAAO,GAAG;QACd,sBAAsB,EAAE;QACxB,UAAU;QACV,UAAU,CAAC,SAAS,CAAC;QACrB,WAAW;QACX,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC;KAC1B,CAAC;IACF,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IACvD,CAAC;IACD,IAAI,KAAK,CAAC,eAAe,EAAE,CAAC;QAC1B,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;IACpE,CAAC;IACD,IAAI,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC/B,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC9B,CAAC;IACD,IAAI,KAAK,CAAC,kBAAkB,EAAE,CAAC;QAC7B,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,CAAC,kBAAk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.js";
|
|
2
|
+
import type { TurnRunnerConfig } from "../types/config.js";
|
|
3
|
+
export interface CliTurnConfigInput {
|
|
4
|
+
modelName?: string;
|
|
5
|
+
memoryModelName?: string;
|
|
6
|
+
disableDurableMemory?: boolean;
|
|
7
|
+
workDir: string;
|
|
8
|
+
systemInstructions?: string;
|
|
9
|
+
systemPromptFiles?: string[];
|
|
10
|
+
}
|
|
11
|
+
export interface CliTurnConfigResolution {
|
|
12
|
+
config: TurnRunnerConfig;
|
|
13
|
+
modelResolution: ModelResolution;
|
|
14
|
+
memoryModelResolution: ModelResolution;
|
|
15
|
+
}
|
|
16
|
+
export interface PackageMetadata {
|
|
17
|
+
name: string;
|
|
18
|
+
version: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Decide whether to render the interactive TUI vs JSONL events.
|
|
22
|
+
*
|
|
23
|
+
* Supplying a prompt argument selects JSONL so one-shot runs have a stable
|
|
24
|
+
* machine-readable contract by default; an explicit `--json` always wins.
|
|
25
|
+
*/
|
|
26
|
+
export declare function shouldUseTui(input: {
|
|
27
|
+
interactive: boolean;
|
|
28
|
+
jsonOutput: boolean;
|
|
29
|
+
prompt?: string;
|
|
30
|
+
}): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Build the {@link TurnRunnerConfig} the CLI hands to the SessionManager,
|
|
33
|
+
* along with the resolutions used to render model provenance lines.
|
|
34
|
+
*/
|
|
35
|
+
export declare function buildCliTurnConfig(input: CliTurnConfigInput, dotenvKeys: Set<string>): CliTurnConfigResolution;
|
|
36
|
+
/**
|
|
37
|
+
* Default `duet` invocation: parse flags, load env files, build the config,
|
|
38
|
+
* decide TUI vs JSON output, then drive the SessionManager through one
|
|
39
|
+
* session. Prints a resume hint at the end whether the session terminated
|
|
40
|
+
* cleanly or not.
|
|
41
|
+
*/
|
|
42
|
+
export declare function runRunCommand(args: string[], pkg: PackageMetadata): Promise<void>;
|
|
43
|
+
//# sourceMappingURL=run.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/cli/run.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,iCAAiC,CAAC;AAGzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAM3D,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,gBAAgB,CAAC;IACzB,eAAe,EAAE,eAAe,CAAC;IACjC,qBAAqB,EAAE,eAAe,CAAC;CACxC;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE;IAClC,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAEV;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,kBAAkB,EACzB,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,GACtB,uBAAuB,CAgBzB;AAED;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAqNvF"}
|