@autopilot-harness/cli 0.1.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/LICENSE +21 -0
- package/README.md +55 -0
- package/assets/autopilot-harness-hook.mjs +193 -0
- package/assets/vendor/migrations/001_initial.sql +62 -0
- package/assets/vendor/migrations/002_pending_followup.sql +4 -0
- package/assets/vendor/migrations/003_reviewing_item.sql +1 -0
- package/assets/vendor/runtime.mjs +5524 -0
- package/dist/assets/autopilot-harness-hook.mjs +193 -0
- package/dist/assets/vendor/migrations/001_initial.sql +62 -0
- package/dist/assets/vendor/migrations/002_pending_followup.sql +4 -0
- package/dist/assets/vendor/migrations/003_reviewing_item.sql +1 -0
- package/dist/assets/vendor/runtime.mjs +5524 -0
- package/dist/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +300 -0
- package/dist/bin.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/init/config-merge.d.ts +27 -0
- package/dist/init/config-merge.d.ts.map +1 -0
- package/dist/init/config-merge.js +115 -0
- package/dist/init/config-merge.js.map +1 -0
- package/dist/init/default-config.d.ts +17 -0
- package/dist/init/default-config.d.ts.map +1 -0
- package/dist/init/default-config.js +101 -0
- package/dist/init/default-config.js.map +1 -0
- package/dist/init/hooks-merge.d.ts +25 -0
- package/dist/init/hooks-merge.d.ts.map +1 -0
- package/dist/init/hooks-merge.js +134 -0
- package/dist/init/hooks-merge.js.map +1 -0
- package/dist/init/install.d.ts +31 -0
- package/dist/init/install.d.ts.map +1 -0
- package/dist/init/install.js +829 -0
- package/dist/init/install.js.map +1 -0
- package/dist/init/platforms.d.ts +60 -0
- package/dist/init/platforms.d.ts.map +1 -0
- package/dist/init/platforms.js +275 -0
- package/dist/init/platforms.js.map +1 -0
- package/dist/init/tui.d.ts +65 -0
- package/dist/init/tui.d.ts.map +1 -0
- package/dist/init/tui.js +549 -0
- package/dist/init/tui.js.map +1 -0
- package/dist/init/types.d.ts +75 -0
- package/dist/init/types.d.ts.map +1 -0
- package/dist/init/types.js +9 -0
- package/dist/init/types.js.map +1 -0
- package/dist/init/wizard-copy.d.ts +74 -0
- package/dist/init/wizard-copy.d.ts.map +1 -0
- package/dist/init/wizard-copy.js +173 -0
- package/dist/init/wizard-copy.js.map +1 -0
- package/dist/init/wizard-helpers.d.ts +103 -0
- package/dist/init/wizard-helpers.d.ts.map +1 -0
- package/dist/init/wizard-helpers.js +724 -0
- package/dist/init/wizard-helpers.js.map +1 -0
- package/dist/locale-set.d.ts +24 -0
- package/dist/locale-set.d.ts.map +1 -0
- package/dist/locale-set.js +286 -0
- package/dist/locale-set.js.map +1 -0
- package/dist/names.d.ts +5 -0
- package/dist/names.d.ts.map +1 -0
- package/dist/names.js +5 -0
- package/dist/names.js.map +1 -0
- package/dist/project-fs.d.ts +48 -0
- package/dist/project-fs.d.ts.map +1 -0
- package/dist/project-fs.js +210 -0
- package/dist/project-fs.js.map +1 -0
- package/dist/read-untrusted-file.d.ts +41 -0
- package/dist/read-untrusted-file.d.ts.map +1 -0
- package/dist/read-untrusted-file.js +362 -0
- package/dist/read-untrusted-file.js.map +1 -0
- package/dist/session.d.ts +38 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +242 -0
- package/dist/session.js.map +1 -0
- package/dist/status-doctor.d.ts +22 -0
- package/dist/status-doctor.d.ts.map +1 -0
- package/dist/status-doctor.js +712 -0
- package/dist/status-doctor.js.map +1 -0
- package/dist/uninstall.d.ts +31 -0
- package/dist/uninstall.d.ts.map +1 -0
- package/dist/uninstall.js +333 -0
- package/dist/uninstall.js.map +1 -0
- package/dist/upgrade.d.ts +29 -0
- package/dist/upgrade.d.ts.map +1 -0
- package/dist/upgrade.js +290 -0
- package/dist/upgrade.js.map +1 -0
- package/dist/vendor-entry.d.ts +6 -0
- package/dist/vendor-entry.d.ts.map +1 -0
- package/dist/vendor-entry.js +16 -0
- package/dist/vendor-entry.js.map +1 -0
- package/package.json +54 -0
package/dist/bin.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":""}
|
package/dist/bin.js
ADDED
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import { CLI_NAME, formatPostInstallFooter, formatHostActivationTips, formatSessionList, formatStatus, installInitYes, PACKAGE_VERSION, PREFERRED_NAME, purgeProjectSession, renameProjectSession, resetProjectSessionReview, runDoctor, runInteractiveInit, setProjectLocale, readStaleAfterHours, upgradeProject, uninstallProject, } from "./index.js";
|
|
4
|
+
import { defaultSurfaceFor, normalizeBinding, parsePlatformsCliList, primaryBinding, } from "./init/platforms.js";
|
|
5
|
+
import { loadLocale } from "@autopilot-harness/i18n";
|
|
6
|
+
const program = new Command();
|
|
7
|
+
program
|
|
8
|
+
.name(CLI_NAME)
|
|
9
|
+
.description(loadLocale("en").cli.help)
|
|
10
|
+
.version(PACKAGE_VERSION);
|
|
11
|
+
program
|
|
12
|
+
.command("init")
|
|
13
|
+
.description("Install Autopilot into the current project")
|
|
14
|
+
.option("-p, --platform <platform>", "AI platform (single)", "cursor")
|
|
15
|
+
.option("--harness <platform>", "Alias for --platform")
|
|
16
|
+
.option("--platforms <list>", "Comma-separated platforms (e.g. cursor). Wins over --platform")
|
|
17
|
+
.option("--add-platform <platform>", "Merge a platform into an existing install (updates config.yml)")
|
|
18
|
+
.option("--surface <surface>", "Surface for a single --platform", "ide")
|
|
19
|
+
.option("--locale <locale>", "Locale", "en")
|
|
20
|
+
.option("-y, --yes", "Non-interactive defaults")
|
|
21
|
+
.option("--force", "Refresh hook/skills/pin + merge hooks (keeps existing config.yml)")
|
|
22
|
+
.action(async (opts) => {
|
|
23
|
+
const addPlatformRaw = typeof opts.addPlatform === "string" ? opts.addPlatform.trim() : "";
|
|
24
|
+
const mergePlatforms = addPlatformRaw !== "";
|
|
25
|
+
const platformsFlag = typeof opts.platforms === "string" ? opts.platforms.trim() : "";
|
|
26
|
+
let platforms = null;
|
|
27
|
+
if (platformsFlag !== "") {
|
|
28
|
+
try {
|
|
29
|
+
platforms = parsePlatformsCliList(platformsFlag, opts.surface);
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
33
|
+
console.error(`init failed: ${msg}`);
|
|
34
|
+
process.exitCode = 1;
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (!platforms || platforms.length === 0) {
|
|
38
|
+
console.error(`init failed: invalid --platforms "${platformsFlag}" (no usable platform ids)`);
|
|
39
|
+
process.exitCode = 1;
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (mergePlatforms) {
|
|
44
|
+
const added = normalizeBinding(addPlatformRaw, defaultSurfaceFor(addPlatformRaw));
|
|
45
|
+
if (!added) {
|
|
46
|
+
console.error(`init failed: invalid --add-platform "${addPlatformRaw}"`);
|
|
47
|
+
process.exitCode = 1;
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
platforms = platforms ? [...platforms, added] : [added];
|
|
51
|
+
}
|
|
52
|
+
if (!platforms || platforms.length === 0) {
|
|
53
|
+
const single = opts.harness ?? opts.platform;
|
|
54
|
+
const b = normalizeBinding(single, opts.surface);
|
|
55
|
+
platforms = b ? [b] : [{ id: "cursor", surface: "ide" }];
|
|
56
|
+
}
|
|
57
|
+
const primary = primaryBinding(platforms);
|
|
58
|
+
if (!opts.yes) {
|
|
59
|
+
if (mergePlatforms) {
|
|
60
|
+
console.error(`Interactive --add-platform is not supported. Use: ${CLI_NAME} init --yes --add-platform <id>`);
|
|
61
|
+
process.exitCode = 1;
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const code = await runInteractiveInit({
|
|
65
|
+
projectRoot: process.cwd(),
|
|
66
|
+
force: Boolean(opts.force),
|
|
67
|
+
packageVersion: PACKAGE_VERSION,
|
|
68
|
+
locale: opts.locale,
|
|
69
|
+
platform: primary.id,
|
|
70
|
+
surface: primary.surface,
|
|
71
|
+
});
|
|
72
|
+
process.exitCode = code;
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
const result = installInitYes({
|
|
76
|
+
projectRoot: process.cwd(),
|
|
77
|
+
platform: primary.id,
|
|
78
|
+
surface: primary.surface,
|
|
79
|
+
platforms,
|
|
80
|
+
mergePlatforms,
|
|
81
|
+
locale: opts.locale,
|
|
82
|
+
force: Boolean(opts.force) || mergePlatforms,
|
|
83
|
+
packageVersion: PACKAGE_VERSION,
|
|
84
|
+
});
|
|
85
|
+
if (!result.ok) {
|
|
86
|
+
console.error(`init failed: ${result.error}`);
|
|
87
|
+
process.exitCode = 1;
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
console.log(`${PREFERRED_NAME} installed.`);
|
|
91
|
+
for (const f of result.written) {
|
|
92
|
+
console.log(` + ${f}`);
|
|
93
|
+
}
|
|
94
|
+
console.log("");
|
|
95
|
+
console.log("── Quick start ─────────────────────────");
|
|
96
|
+
console.log(" /autopilot-on # planning");
|
|
97
|
+
console.log(" /autopilot-run # executing");
|
|
98
|
+
console.log(` ${CLI_NAME} status`);
|
|
99
|
+
console.log(` ${CLI_NAME} doctor`);
|
|
100
|
+
console.log("");
|
|
101
|
+
for (const line of formatPostInstallFooter(platforms.map((p) => p.id))) {
|
|
102
|
+
console.log(line);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
program
|
|
106
|
+
.command("uninstall")
|
|
107
|
+
.description("Remove Autopilot wiring from this project (keeps plans/; config/state by default)")
|
|
108
|
+
.option("--dry-run", "Preview actions without deleting")
|
|
109
|
+
.option("--purge-all", "Also remove .autopilot/ (config.yml + state.db). Never deletes plans/")
|
|
110
|
+
.action((opts) => {
|
|
111
|
+
const result = uninstallProject({
|
|
112
|
+
projectRoot: process.cwd(),
|
|
113
|
+
dryRun: Boolean(opts.dryRun),
|
|
114
|
+
purgeAll: Boolean(opts.purgeAll),
|
|
115
|
+
});
|
|
116
|
+
if (!result.ok) {
|
|
117
|
+
console.error(`uninstall failed: ${result.error}`);
|
|
118
|
+
process.exitCode = 1;
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
console.log(result.dryRun
|
|
122
|
+
? `${PREFERRED_NAME} uninstall dry-run:`
|
|
123
|
+
: `${PREFERRED_NAME} uninstall:`);
|
|
124
|
+
for (const a of result.actions) {
|
|
125
|
+
console.log(` · ${a}`);
|
|
126
|
+
}
|
|
127
|
+
if (!result.dryRun) {
|
|
128
|
+
for (const f of result.removed) {
|
|
129
|
+
console.log(` − ${f}`);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (result.kept.length > 0) {
|
|
133
|
+
console.log("");
|
|
134
|
+
console.log("── kept ────────────────────────────────");
|
|
135
|
+
for (const k of result.kept) {
|
|
136
|
+
console.log(` · ${k}`);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
program
|
|
141
|
+
.command("upgrade")
|
|
142
|
+
.description("Upgrade Autopilot files in this project to the current CLI version")
|
|
143
|
+
.option("--dry-run", "Preview actions without writing")
|
|
144
|
+
.option("--target <version>", "Reserved; currently pins to the running CLI version")
|
|
145
|
+
.action((opts) => {
|
|
146
|
+
const result = upgradeProject({
|
|
147
|
+
projectRoot: process.cwd(),
|
|
148
|
+
dryRun: Boolean(opts.dryRun),
|
|
149
|
+
packageVersion: PACKAGE_VERSION,
|
|
150
|
+
target: opts.target,
|
|
151
|
+
});
|
|
152
|
+
if (!result.ok) {
|
|
153
|
+
console.error(`upgrade failed: ${result.error}`);
|
|
154
|
+
process.exitCode = 1;
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
console.log(result.dryRun
|
|
158
|
+
? `${PREFERRED_NAME} upgrade dry-run:`
|
|
159
|
+
: `${PREFERRED_NAME} upgraded to ${PACKAGE_VERSION}:`);
|
|
160
|
+
for (const a of result.actions) {
|
|
161
|
+
console.log(` · ${a}`);
|
|
162
|
+
}
|
|
163
|
+
if (!result.dryRun) {
|
|
164
|
+
for (const f of result.written) {
|
|
165
|
+
console.log(` + ${f}`);
|
|
166
|
+
}
|
|
167
|
+
console.log("");
|
|
168
|
+
console.log("── doctor ──────────────────────────────");
|
|
169
|
+
for (const line of result.doctorLines)
|
|
170
|
+
console.log(line);
|
|
171
|
+
console.log("");
|
|
172
|
+
for (const tip of formatHostActivationTips(result.platform)) {
|
|
173
|
+
console.log(tip);
|
|
174
|
+
}
|
|
175
|
+
if (!result.doctorOk) {
|
|
176
|
+
console.error("upgrade wrote files but doctor reported failures (exit 1)");
|
|
177
|
+
process.exitCode = 1;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
program
|
|
182
|
+
.command("status")
|
|
183
|
+
.description("Show Autopilot status for this project")
|
|
184
|
+
.action(() => {
|
|
185
|
+
console.log(formatStatus(process.cwd()));
|
|
186
|
+
});
|
|
187
|
+
program
|
|
188
|
+
.command("doctor")
|
|
189
|
+
.description("Diagnose Autopilot installation")
|
|
190
|
+
.option("--prune-stale", "Purge sessions older than session.stale_after_hours")
|
|
191
|
+
.action((opts) => {
|
|
192
|
+
const { ok, lines } = runDoctor(process.cwd(), {
|
|
193
|
+
pruneStale: Boolean(opts.pruneStale),
|
|
194
|
+
});
|
|
195
|
+
for (const line of lines)
|
|
196
|
+
console.log(line);
|
|
197
|
+
process.exitCode = ok ? 0 : 1;
|
|
198
|
+
});
|
|
199
|
+
program
|
|
200
|
+
.command("locale")
|
|
201
|
+
.description("Manage project locale (skill descriptions + config)")
|
|
202
|
+
.command("set")
|
|
203
|
+
.description("Set locale to en or zh-CN (keeps custom triggers)")
|
|
204
|
+
.argument("<locale>", "en | zh-CN")
|
|
205
|
+
.action((locale) => {
|
|
206
|
+
const result = setProjectLocale({
|
|
207
|
+
projectRoot: process.cwd(),
|
|
208
|
+
locale,
|
|
209
|
+
});
|
|
210
|
+
if (!result.ok) {
|
|
211
|
+
console.error(`locale set failed: ${result.error}`);
|
|
212
|
+
process.exitCode = 1;
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
console.log(`${PREFERRED_NAME} locale: ${result.previousLocale} → ${result.locale}`);
|
|
216
|
+
for (const f of result.written) {
|
|
217
|
+
console.log(` + ${f}`);
|
|
218
|
+
}
|
|
219
|
+
if (result.triggersUpdated.length > 0) {
|
|
220
|
+
console.log(` triggers updated: ${result.triggersUpdated.join(", ")}`);
|
|
221
|
+
}
|
|
222
|
+
if (result.triggersPreserved.length > 0) {
|
|
223
|
+
console.log(` triggers kept (custom): ${result.triggersPreserved.join(", ")}`);
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
const sessionCmd = program
|
|
227
|
+
.command("session")
|
|
228
|
+
.description("List and manage Autopilot sessions");
|
|
229
|
+
sessionCmd
|
|
230
|
+
.command("list")
|
|
231
|
+
.description("List sessions (human-readable titles)")
|
|
232
|
+
.action(() => {
|
|
233
|
+
const result = formatSessionList({
|
|
234
|
+
projectRoot: process.cwd(),
|
|
235
|
+
staleAfterHours: readStaleAfterHours(process.cwd()),
|
|
236
|
+
});
|
|
237
|
+
if (!result.ok) {
|
|
238
|
+
console.error(`session list failed: ${result.error}`);
|
|
239
|
+
process.exitCode = 1;
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
for (const line of result.lines)
|
|
243
|
+
console.log(line);
|
|
244
|
+
});
|
|
245
|
+
sessionCmd
|
|
246
|
+
.command("rename")
|
|
247
|
+
.description("Rename a session (source=user; wins over platform titles)")
|
|
248
|
+
.argument("<id>", "Conversation id or unique prefix")
|
|
249
|
+
.argument("<title>", "New display title")
|
|
250
|
+
.action((id, title) => {
|
|
251
|
+
const result = renameProjectSession({
|
|
252
|
+
projectRoot: process.cwd(),
|
|
253
|
+
id,
|
|
254
|
+
title,
|
|
255
|
+
});
|
|
256
|
+
if (!result.ok) {
|
|
257
|
+
console.error(`session rename failed: ${result.error}`);
|
|
258
|
+
process.exitCode = 1;
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
console.log(`${PREFERRED_NAME} session renamed`);
|
|
262
|
+
});
|
|
263
|
+
sessionCmd
|
|
264
|
+
.command("purge")
|
|
265
|
+
.description("Delete a session and its review chain")
|
|
266
|
+
.argument("<id>", "Conversation id or unique prefix")
|
|
267
|
+
.action((id) => {
|
|
268
|
+
const result = purgeProjectSession({
|
|
269
|
+
projectRoot: process.cwd(),
|
|
270
|
+
id,
|
|
271
|
+
});
|
|
272
|
+
if (!result.ok) {
|
|
273
|
+
console.error(`session purge failed: ${result.error}`);
|
|
274
|
+
process.exitCode = 1;
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
console.log(`${PREFERRED_NAME} session purged`);
|
|
278
|
+
});
|
|
279
|
+
sessionCmd
|
|
280
|
+
.command("reset-review")
|
|
281
|
+
.description("Reset review chain for a session (keep session row)")
|
|
282
|
+
.argument("<id>", "Conversation id or unique prefix")
|
|
283
|
+
.action((id) => {
|
|
284
|
+
const result = resetProjectSessionReview({
|
|
285
|
+
projectRoot: process.cwd(),
|
|
286
|
+
id,
|
|
287
|
+
});
|
|
288
|
+
if (!result.ok) {
|
|
289
|
+
console.error(`session reset-review failed: ${result.error}`);
|
|
290
|
+
process.exitCode = 1;
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
console.log(`${PREFERRED_NAME} review chain reset`);
|
|
294
|
+
});
|
|
295
|
+
program.parseAsync(process.argv).catch((err) => {
|
|
296
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
297
|
+
console.error(msg);
|
|
298
|
+
process.exitCode = 1;
|
|
299
|
+
});
|
|
300
|
+
//# sourceMappingURL=bin.js.map
|
package/dist/bin.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.js","sour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AC,GAAY,EAAE,EAAE;IACtD,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC7D,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnB,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export { CLI_NAME, NPM_PACKAGE_NAME, PREFERRED_NAME } from "./names.js";
|
|
2
|
+
export { installInitYes, preflightForceRefresh, mergeHooksJson, stripAutopilotHooks, countAutopilotDuplicates, validateHooksShape, hasCompleteAutopilotHooks, summarizeAutopilotHooks, autopilotStopHasUnlimitedLoop, autopilotHookCommand, } from "./init/install.js";
|
|
3
|
+
export type { InitYesOptions, InitResult, HooksFile } from "./init/types.js";
|
|
4
|
+
export type { PreflightResult } from "./init/install.js";
|
|
5
|
+
export { PACKAGE_VERSION } from "./init/types.js";
|
|
6
|
+
export { formatStatus, runDoctor, readPinVersion, readStaleAfterHours, hasGlobalSelfReviewHooks } from "./status-doctor.js";
|
|
7
|
+
export type { DoctorOptions, DoctorResult } from "./status-doctor.js";
|
|
8
|
+
export { upgradeProject } from "./upgrade.js";
|
|
9
|
+
export type { UpgradeOptions, UpgradeResult } from "./upgrade.js";
|
|
10
|
+
export { uninstallProject } from "./uninstall.js";
|
|
11
|
+
export type { UninstallOptions, UninstallResult, } from "./uninstall.js";
|
|
12
|
+
export { mergeConfigYamlMissingKeys, mergeMissingKeys, readConfigInstallHints, readConfigPlatformsOrThrow, } from "./init/config-merge.js";
|
|
13
|
+
export { collectWizardAnswers, runInteractiveInit, } from "./init/tui.js";
|
|
14
|
+
export type { InitPrompts, InteractiveInitOptions } from "./init/tui.js";
|
|
15
|
+
export { probeProject, applyPlansGitignore, applyAutopilotRuntimeGitignore, answersToInstallOptions, formatCheatSheet, formatHostDisplayName, formatHostActivationTips, formatPostInstallOutro, formatPostInstallFooter, installableHostOptions, writeQuickstart, normalizePlansDir, resolveCliCommand, tryResolveRunningCliScript, autopilotShellAliasLine, assertNotSymlink, assertRealpathInside, assertPairInsideOrUnlinkAll, isRealRegularFile, isRealDirectory, resolveProjectRootOrThrow, } from "./init/wizard-helpers.js";
|
|
16
|
+
export type { InitWizardAnswers, PlansGitPolicy, ShellAliasTarget, } from "./init/wizard-helpers.js";
|
|
17
|
+
export { INSTALLABLE_BINDINGS, MAX_PLATFORM_BINDINGS, applyPlatformsToConfigYaml, assertInstallablePlatforms, defaultSurfaceFor, formatPlatformsDisplay, mergePlatformBindings, mergedIncludesAllRequested, normalizeBinding, parsePlatformBindingsFromConfig, parsePlatformsCliList, primaryBinding, sanitizePlatformId, } from "./init/platforms.js";
|
|
18
|
+
export type { PlatformBinding, PlatformSurface } from "./init/platforms.js";
|
|
19
|
+
export { setProjectLocale } from "./locale-set.js";
|
|
20
|
+
export type { LocaleSetOptions, LocaleSetResult, } from "./locale-set.js";
|
|
21
|
+
export { formatSessionDisplayName, formatSessionList, purgeProjectSession, renameProjectSession, resetProjectSessionReview, shortSessionId, } from "./session.js";
|
|
22
|
+
export type { SessionCmdResult, SessionListResult, } from "./session.js";
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,cAAc,EACd,mBAAmB,EACnB,wBAAwB,EACxB,kBAAkB,EAClB,yBAAyB,EACzB,uBAAuB,EACvB,6BAA6B,EAC7B,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,E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B,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,0BAA0B,EAC1B,gBAAgB,EAChB,+BAA+B,EAC/B,qBAAqB,EACrB,cAAc,EACd,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,YAAY,EACV,gBAAgB,EAChB,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,yBAAyB,EACzB,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,cAAc,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { CLI_NAME, NPM_PACKAGE_NAME, PREFERRED_NAME } from "./names.js";
|
|
2
|
+
export { installInitYes, preflightForceRefresh, mergeHooksJson, stripAutopilotHooks, countAutopilotDuplicates, validateHooksShape, hasCompleteAutopilotHooks, summarizeAutopilotHooks, autopilotStopHasUnlimitedLoop, autopilotHookCommand, } from "./init/install.js";
|
|
3
|
+
export { PACKAGE_VERSION } from "./init/types.js";
|
|
4
|
+
export { formatStatus, runDoctor, readPinVersion, readStaleAfterHours, hasGlobalSelfReviewHooks } from "./status-doctor.js";
|
|
5
|
+
export { upgradeProject } from "./upgrade.js";
|
|
6
|
+
export { uninstallProject } from "./uninstall.js";
|
|
7
|
+
export { mergeConfigYamlMissingKeys, mergeMissingKeys, readConfigInstallHints, readConfigPlatformsOrThrow, } from "./init/config-merge.js";
|
|
8
|
+
export { collectWizardAnswers, runInteractiveInit, } from "./init/tui.js";
|
|
9
|
+
export { probeProject, applyPlansGitignore, applyAutopilotRuntimeGitignore, answersToInstallOptions, formatCheatSheet, formatHostDisplayName, formatHostActivationTips, formatPostInstallOutro, formatPostInstallFooter, installableHostOptions, writeQuickstart, normalizePlansDir, resolveCliCommand, tryResolveRunningCliScript, autopilotShellAliasLine, assertNotSymlink, assertRealpathInside, assertPairInsideOrUnlinkAll, isRealRegularFile, isRealDirectory, resolveProjectRootOrThrow, } from "./init/wizard-helpers.js";
|
|
10
|
+
export { INSTALLABLE_BINDINGS, MAX_PLATFORM_BINDINGS, applyPlatformsToConfigYaml, assertInstallablePlatforms, defaultSurfaceFor, formatPlatformsDisplay, mergePlatformBindings, mergedIncludesAllRequested, normalizeBinding, parsePlatformBindingsFromConfig, parsePlatformsCliList, primaryBinding, sanitizePlatformId, } from "./init/platforms.js";
|
|
11
|
+
export { setProjectLocale } from "./locale-set.js";
|
|
12
|
+
export { formatSessionDisplayName, formatSessionList, purgeProjectSession, renameProjectSession, resetProjectSessionReview, shortSessionId, } from "./session.js";
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,cAAc,EACd,mBAAmB,EACnB,wBAAwB,EACxB,kBAAkB,EAClB,yBAAyB,EACzB,uBAAuB,EACvB,6BAA6B,EAC7B,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAE5H,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAKlD,OAAO,EACL,0BAA0B,EAC1B,gBAAgB,EAChB,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,8BAA8B,EAC9B,uBAAuB,EACvB,gBAAgB,EAChB,qBAAqB,EACrB,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,0BAA0B,EAC1B,uBAAuB,EACvB,gBAAgB,EAChB,oBAAoB,EACpB,2BAA2B,EAC3B,iBAAiB,EACjB,eAAe,EACf,yBAAyB,GAC1B,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,0BAA0B,EAC1B,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,0BAA0B,EAC1B,gBAAgB,EAChB,+BAA+B,EAC/B,qBAAqB,EACrB,cAAc,EACd,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAKnD,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,yBAAyB,EACzB,cAAc,GACf,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type PlatformBinding } from "./platforms.js";
|
|
2
|
+
/**
|
|
3
|
+
* Deep-merge defaults into existing config: only fill missing keys.
|
|
4
|
+
* Never overwrites user scalars/arrays/objects that already exist.
|
|
5
|
+
*/
|
|
6
|
+
export declare function mergeMissingKeys(existing: Record<string, unknown>, defaults: Record<string, unknown>, basePath?: string, stack?: object[]): {
|
|
7
|
+
merged: Record<string, unknown>;
|
|
8
|
+
addedPaths: string[];
|
|
9
|
+
};
|
|
10
|
+
export declare function mergeConfigYamlMissingKeys(existingYaml: string, defaultsYaml: string): {
|
|
11
|
+
yaml: string;
|
|
12
|
+
addedPaths: string[];
|
|
13
|
+
};
|
|
14
|
+
/** Best-effort read of platforms / legacy platform+surface / locale. */
|
|
15
|
+
export declare function readConfigInstallHints(configYaml: string): {
|
|
16
|
+
platform: string;
|
|
17
|
+
surface: string;
|
|
18
|
+
locale: string;
|
|
19
|
+
platforms: PlatformBinding[];
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Fail-closed platforms parse for merge/commit paths.
|
|
23
|
+
* Unlike {@link readConfigInstallHints}, never invents a `[cursor]` baseline that
|
|
24
|
+
* could overwrite a real `platforms` list when YAML is only partially readable.
|
|
25
|
+
*/
|
|
26
|
+
export declare function readConfigPlatformsOrThrow(configYaml: string): PlatformBinding[];
|
|
27
|
+
//# sourceMappingURL=config-merge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-merge.d.ts","sourceRoot":"","sources":["../../src/init/config-merge.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,gBAAgB,CAAC;AA+BxB;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,QAAQ,SAAK,EACb,KAAK,GAAE,MAAM,EAAO,GACnB;IAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,CAkC3D;AAED,wBAAgB,0BAA0B,CACxC,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,GACnB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,CAcxC;AAED,wEAAwE;AACxE,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,eAAe,EAAE,CAAC;CAC9B,CAuBA;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,GACjB,eAAe,EAAE,CAQnB"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { parseDocument, stringify as stringifyYaml } from "yaml";
|
|
2
|
+
import { parsePlatformBindingsFromConfig, primaryBinding, } from "./platforms.js";
|
|
3
|
+
/** Cap YAML aliases on toJS (yaml@2.9+: not a parse-time option). */
|
|
4
|
+
const YAML_TO_JS_OPTS = { maxAliasCount: 64 };
|
|
5
|
+
function parseYamlSafe(text) {
|
|
6
|
+
const doc = parseDocument(text);
|
|
7
|
+
if (doc.errors.length > 0) {
|
|
8
|
+
throw doc.errors[0];
|
|
9
|
+
}
|
|
10
|
+
return doc.toJS(YAML_TO_JS_OPTS);
|
|
11
|
+
}
|
|
12
|
+
function isPlainObject(value) {
|
|
13
|
+
return (!!value &&
|
|
14
|
+
typeof value === "object" &&
|
|
15
|
+
!Array.isArray(value) &&
|
|
16
|
+
Object.prototype.toString.call(value) === "[object Object]");
|
|
17
|
+
}
|
|
18
|
+
function cloneValue(value) {
|
|
19
|
+
return structuredClone(value);
|
|
20
|
+
}
|
|
21
|
+
/** Keys that must never be copied from YAML into merged objects. */
|
|
22
|
+
function isUnsafeKey(key) {
|
|
23
|
+
return key === "__proto__" || key === "prototype" || key === "constructor";
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Deep-merge defaults into existing config: only fill missing keys.
|
|
27
|
+
* Never overwrites user scalars/arrays/objects that already exist.
|
|
28
|
+
*/
|
|
29
|
+
export function mergeMissingKeys(existing, defaults, basePath = "", stack = []) {
|
|
30
|
+
if (stack.includes(existing) || stack.includes(defaults)) {
|
|
31
|
+
throw new Error(`circular reference in config at ${basePath || "(root)"}`);
|
|
32
|
+
}
|
|
33
|
+
const nextStack = [...stack, existing, defaults];
|
|
34
|
+
const merged = { ...existing };
|
|
35
|
+
for (const unsafe of ["__proto__", "prototype", "constructor"]) {
|
|
36
|
+
if (Object.prototype.hasOwnProperty.call(merged, unsafe)) {
|
|
37
|
+
Reflect.deleteProperty(merged, unsafe);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
const addedPaths = [];
|
|
41
|
+
for (const [key, defVal] of Object.entries(defaults)) {
|
|
42
|
+
if (isUnsafeKey(key))
|
|
43
|
+
continue;
|
|
44
|
+
const path = basePath ? `${basePath}.${key}` : key;
|
|
45
|
+
const own = Object.prototype.hasOwnProperty.call(merged, key);
|
|
46
|
+
if (!own || merged[key] === undefined || merged[key] === null) {
|
|
47
|
+
merged[key] = cloneValue(defVal);
|
|
48
|
+
addedPaths.push(path);
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
const cur = merged[key];
|
|
52
|
+
if (isPlainObject(cur) && isPlainObject(defVal)) {
|
|
53
|
+
const nested = mergeMissingKeys(cur, defVal, path, nextStack);
|
|
54
|
+
merged[key] = nested.merged;
|
|
55
|
+
addedPaths.push(...nested.addedPaths);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return { merged, addedPaths };
|
|
59
|
+
}
|
|
60
|
+
export function mergeConfigYamlMissingKeys(existingYaml, defaultsYaml) {
|
|
61
|
+
const existingRaw = parseYamlSafe(existingYaml) ?? {};
|
|
62
|
+
const defaultsRaw = parseYamlSafe(defaultsYaml) ?? {};
|
|
63
|
+
if (!isPlainObject(existingRaw)) {
|
|
64
|
+
throw new Error("config.yml root must be a mapping");
|
|
65
|
+
}
|
|
66
|
+
if (!isPlainObject(defaultsRaw)) {
|
|
67
|
+
throw new Error("default config root must be a mapping");
|
|
68
|
+
}
|
|
69
|
+
const { merged, addedPaths } = mergeMissingKeys(existingRaw, defaultsRaw);
|
|
70
|
+
return {
|
|
71
|
+
yaml: stringifyYaml(merged, { lineWidth: 0 }),
|
|
72
|
+
addedPaths,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
/** Best-effort read of platforms / legacy platform+surface / locale. */
|
|
76
|
+
export function readConfigInstallHints(configYaml) {
|
|
77
|
+
const fallback = {
|
|
78
|
+
platform: "cursor",
|
|
79
|
+
surface: "ide",
|
|
80
|
+
locale: "en",
|
|
81
|
+
platforms: [{ id: "cursor", surface: "ide" }],
|
|
82
|
+
};
|
|
83
|
+
try {
|
|
84
|
+
const parsed = parseYamlSafe(configYaml);
|
|
85
|
+
if (!isPlainObject(parsed)) {
|
|
86
|
+
return fallback;
|
|
87
|
+
}
|
|
88
|
+
const platforms = parsePlatformBindingsFromConfig(parsed);
|
|
89
|
+
const primary = primaryBinding(platforms);
|
|
90
|
+
return {
|
|
91
|
+
platform: primary.id,
|
|
92
|
+
surface: primary.surface,
|
|
93
|
+
locale: typeof parsed.locale === "string" ? parsed.locale : "en",
|
|
94
|
+
platforms,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
catch {
|
|
98
|
+
return fallback;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Fail-closed platforms parse for merge/commit paths.
|
|
103
|
+
* Unlike {@link readConfigInstallHints}, never invents a `[cursor]` baseline that
|
|
104
|
+
* could overwrite a real `platforms` list when YAML is only partially readable.
|
|
105
|
+
*/
|
|
106
|
+
export function readConfigPlatformsOrThrow(configYaml) {
|
|
107
|
+
const parsed = parseYamlSafe(configYaml);
|
|
108
|
+
if (!isPlainObject(parsed)) {
|
|
109
|
+
throw new Error("config.yml root must be a mapping");
|
|
110
|
+
}
|
|
111
|
+
// Fail closed on over-cap lists so merge/idempotent rewrite cannot truncate
|
|
112
|
+
// unique hosts that best-effort readers would otherwise silently drop.
|
|
113
|
+
return parsePlatformBindingsFromConfig(parsed, { failOnOverflow: true });
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=config-merge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
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,EAAE,KAAK,EAAE,CAAsB;KACnE,CAAC;IACF,IAAI,CAAC;QACH,MAAM,MAAM,GAAY,aAAa,CAAC,UAAU,CAAC,CAAC;QAClD,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;YAC3B,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,MAAM,SAAS,GAAG,+BAA+B,CAAC,MAAM,CAAC,CAAC;QAC1D,MAAM,OAAO,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;QAC1C,OAAO;YACL,QAAQ,EAAE,OAAO,CAAC,EAAE;YACpB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,MAAM,EAAE,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI;YAChE,SAAS;SACV,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,QAAQ,CAAC;IAClB,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CACxC,UAAkB;IAElB,MAAM,MAAM,GAAY,aAAa,CAAC,UAAU,CAAC,CAAC;IAClD,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;IACvD,CAAC;IACD,4EAA4E;IAC5E,uEAAuE;IACvE,OAAO,+BAA+B,CAAC,MAAM,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC;AAC3E,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { InitLocale } from "./types.js";
|
|
2
|
+
import { type PlatformBinding } from "./platforms.js";
|
|
3
|
+
/** Default `.autopilot/config.yml` body for init (v0.1). */
|
|
4
|
+
export declare function defaultConfigYaml(opts: {
|
|
5
|
+
platform?: string;
|
|
6
|
+
surface?: string;
|
|
7
|
+
/** Preferred over legacy platform/surface when non-empty. */
|
|
8
|
+
platforms?: readonly PlatformBinding[];
|
|
9
|
+
locale: InitLocale;
|
|
10
|
+
plansDir?: string;
|
|
11
|
+
verifyEnabled?: boolean;
|
|
12
|
+
/** 0 = unlimited (default). */
|
|
13
|
+
maxErrorsBeforePause?: number;
|
|
14
|
+
/** executing_only | project */
|
|
15
|
+
reviewScope?: "executing_only" | "project";
|
|
16
|
+
}): string;
|
|
17
|
+
//# sourceMappingURL=default-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-config.d.ts","sourceRoot":"","sources":["../../src/init/default-config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAML,KAAK,eAAe,EACrB,MAAM,gBAAgB,CAAC;AA8BxB,4DAA4D;AAC5D,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IACvC,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,+BAA+B;IAC/B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,+BAA+B;IAC/B,WAAW,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;CAC5C,GAAG,MAAM,CA8ET"}
|