copyrun 0.1.0 → 0.2.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/README.md +25 -2
- package/dist/archive-hook.js +0 -0
- package/dist/archive-worker.js +1384 -126
- package/dist/ask.js +3919 -0
- package/dist/autopilot-worker.js +11 -3
- package/dist/autopilot.js +1187 -111
- package/dist/check.js +1754 -110
- package/dist/index.js +24470 -16065
- package/dist/live.js +17 -2
- package/dist/mission-watch.js +541 -0
- package/dist/mission.js +472 -0
- package/dist/nudge.js +17 -2
- package/dist/receipt.js +349 -0
- package/dist/seal-worker.js +0 -0
- package/package.json +11 -10
package/dist/autopilot-worker.js
CHANGED
|
@@ -112,7 +112,7 @@ import { existsSync, readFileSync } from "fs";
|
|
|
112
112
|
import { join } from "path";
|
|
113
113
|
|
|
114
114
|
// src/config.ts
|
|
115
|
-
var VERSION = "0.
|
|
115
|
+
var VERSION = "0.2.0";
|
|
116
116
|
var DIR = process.env.COPYRUN_HOME ?? join2(homedir(), ".copyrun");
|
|
117
117
|
|
|
118
118
|
// src/autopilot-worker.ts
|
|
@@ -127,8 +127,8 @@ function log(line) {
|
|
|
127
127
|
}
|
|
128
128
|
function recordedCli() {
|
|
129
129
|
try {
|
|
130
|
-
const
|
|
131
|
-
return typeof p === "string" && p.endsWith(".js") && existsSync2(p)
|
|
130
|
+
const cfg = JSON.parse(readFileSync2(join3(HOME, "config.json"), "utf8"));
|
|
131
|
+
return [cfg.autopilot?.cli, cfg.memory?.cli].find((p) => typeof p === "string" && p.endsWith(".js") && existsSync2(p));
|
|
132
132
|
} catch {
|
|
133
133
|
return void 0;
|
|
134
134
|
}
|
|
@@ -208,6 +208,14 @@ function fileOne(sessionId, transcript) {
|
|
|
208
208
|
}
|
|
209
209
|
function main() {
|
|
210
210
|
const args = process.argv.slice(2);
|
|
211
|
+
if (args[0] === "--index") {
|
|
212
|
+
const r = cli(["memory", "index", "--quiet", "--json"]);
|
|
213
|
+
const body = lastJson(r.stdout);
|
|
214
|
+
if (body && typeof body.total === "number") {
|
|
215
|
+
if (body.added || body.updated || body.dropped) log(`memory index: ${body.total} sessions (${Number(body.added) || 0} new, ${Number(body.updated) || 0} updated${body.dropped ? `, ${Number(body.dropped)} dropped by the size cap` : ""}); on this machine only`);
|
|
216
|
+
} else if (r.status !== 0) log(`memory index: failed (${why(body, r)})`);
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
211
219
|
if (args[0] === "--sweep") {
|
|
212
220
|
if (args[1] === "codex" || args[1] === "cursor") sweep(args[1], args[2], args[3]);
|
|
213
221
|
return;
|