@dadado/agent-kit-cli 5.17.0 → 6.0.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 +201 -74
- package/NOTICE +2 -0
- package/README.md +3 -3
- package/dashboard/README.md +10 -1
- package/dashboard/dashboard-data.mjs +23 -13
- package/dashboard/dashboard.html +58 -0
- package/dashboard/lib/processes.mjs +1 -1
- package/dashboard/lib/run-logs.d.mts +34 -0
- package/dashboard/lib/run-logs.mjs +218 -0
- package/dashboard/lib/semantic-model.mjs +4 -3
- package/dashboard/serve.mjs +4 -4
- package/dashboard/start-broadcast.mjs +1 -1
- package/dashboard/start.mjs +1 -1
- package/dist/{add-HTYIFKMN.js → add-YTCDLPUS.js} +4 -4
- package/dist/{chunk-SMGFN3Z4.js → chunk-2FQX2O4I.js} +4 -4
- package/dist/{chunk-PNG7LO2F.js → chunk-3DGTPONS.js} +1 -1
- package/dist/{chunk-VY7MTPJ2.js → chunk-426GITN7.js} +1 -1
- package/dist/{chunk-2IPXQFJE.js → chunk-4CRBUEJ6.js} +2 -2
- package/dist/{chunk-STGFBAYT.js → chunk-4U7DLAQH.js} +11 -19
- package/dist/{chunk-77V75A7O.js → chunk-5B4DVO6C.js} +1 -1
- package/dist/{chunk-4IWG5CVE.js → chunk-B3VR5YBQ.js} +10 -5
- package/dist/{chunk-OUQZC744.js → chunk-B5CH47OS.js} +852 -74
- package/dist/{chunk-2RDRMGD3.js → chunk-BBVBYQJO.js} +2 -2
- package/dist/chunk-C26I6HTO.js +39 -0
- package/dist/{chunk-AW74INUW.js → chunk-DBPNGZNH.js} +6 -5
- package/dist/{chunk-DQA434Y4.js → chunk-DBXDV5O7.js} +3 -3
- package/dist/{chunk-S6GMFDKV.js → chunk-DRND2KYV.js} +2 -2
- package/dist/{chunk-F4VMYR7U.js → chunk-GN4SAZF2.js} +4 -4
- package/dist/{chunk-ZXKZBTXE.js → chunk-HAFRAXGV.js} +1 -1
- package/dist/{chunk-CBCW5R5J.js → chunk-MCH3E46V.js} +2 -2
- package/dist/{chunk-WW3YZKHW.js → chunk-NDIGZXFF.js} +26 -5
- package/dist/{chunk-TFZ2JUXH.js → chunk-PAB35H27.js} +523 -73
- package/dist/{chunk-NQ7IQ5XT.js → chunk-PFEUZXVT.js} +1 -1
- package/dist/{chunk-W24CMQ32.js → chunk-PPKX55GI.js} +3 -3
- package/dist/{chunk-ZCTSUQRR.js → chunk-T6P5ZMG2.js} +3 -3
- package/dist/{chunk-N3HTJVBR.js → chunk-VTOUQAVR.js} +1 -1
- package/dist/{chunk-B73KQ5KX.js → chunk-WFXHMP47.js} +11 -11
- package/dist/chunk-WGLPZXNU.js +45 -0
- package/dist/{chunk-KD2MYBB6.js → chunk-WUWRGOUV.js} +2 -2
- package/dist/{contribute-C6AW2P6J.js → contribute-A7NCWTUM.js} +5 -5
- package/dist/{cursor-awareness-KTL2RGKD.js → cursor-awareness-TN5JXD2C.js} +3 -3
- package/dist/{diff-VHNR62SI.js → diff-4MDU5SLE.js} +6 -6
- package/dist/{doctor-PET2HRRJ.js → doctor-MQAXOFKM.js} +16 -14
- package/dist/{dogfood-KKFVRWT6.js → dogfood-2JAHSYQA.js} +4 -4
- package/dist/{handoff-3UI6VKVG.js → handoff-MK5JG3J5.js} +4 -4
- package/dist/{hook-DYIMKJYL.js → hook-D2WHBKRN.js} +12 -12
- package/dist/index.js +26 -24
- package/dist/{init-Q4LBM6KT.js → init-7T6KNDFE.js} +17 -16
- package/dist/install-6G3D7J4U.js +35 -0
- package/dist/{monitors-QV2IS3MP.js → monitors-PDXBLB3U.js} +1 -1
- package/dist/{plan-index-JMC7Z4DW.js → plan-index-V7T5MKL6.js} +3 -3
- package/dist/{public-inbound-radar-WP3XF7GS.js → public-inbound-radar-5U4JMBRU.js} +3 -3
- package/dist/{remote-issues-SZ4HDQL5.js → remote-issues-APYOMIJC.js} +4 -4
- package/dist/{run-I3BFGULT.js → run-MWOI7UW5.js} +7 -6
- package/dist/{run-plan-FO7CL4M3.js → run-plan-UWQD3BIJ.js} +37 -6
- package/dist/{scan-NI2SWJ2E.js → scan-3MIUE7OR.js} +2 -2
- package/dist/{setup-global-M42GEODI.js → setup-global-AT4DD3MG.js} +9 -9
- package/dist/{status-XPVQVQMX.js → status-MXNTBKPL.js} +11 -11
- package/dist/{update-FJ2EBZVO.js → update-P62637ZI.js} +12 -12
- package/package.json +10 -6
- package/dist/chunk-5VCOWTTP.js +0 -6
- package/dist/install-RHOS3OYZ.js +0 -34
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
managedPairs
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VTOUQAVR.js";
|
|
4
4
|
import {
|
|
5
5
|
isProtectedPath,
|
|
6
6
|
resolveContained,
|
|
7
7
|
resolveProtectedGlobs
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DBPNGZNH.js";
|
|
9
9
|
|
|
10
10
|
// src/lifecycle/diff.ts
|
|
11
11
|
import { readFile } from "fs/promises";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// src/utils/kit-paths.ts
|
|
2
|
+
import { mkdir, writeFile } from "fs/promises";
|
|
3
|
+
import path from "path";
|
|
4
|
+
var HANDOFF_REL = ".cursor/HANDOFF.md";
|
|
5
|
+
var STATE_ROOT_ENV = "AGENT_KIT_STATE_ROOT";
|
|
6
|
+
var STATE_ROOT_DIRS = [".cursor", ".agent-kit"];
|
|
7
|
+
function resolveStateDir(env = process.env) {
|
|
8
|
+
const raw = (env[STATE_ROOT_ENV] ?? "").trim().replace(/\/+$/, "");
|
|
9
|
+
if (!raw) return { stateDir: ".cursor" };
|
|
10
|
+
if (STATE_ROOT_DIRS.includes(raw))
|
|
11
|
+
return { stateDir: raw };
|
|
12
|
+
return { stateDir: ".cursor", invalid: raw };
|
|
13
|
+
}
|
|
14
|
+
function runnerStatePaths(root, env = process.env) {
|
|
15
|
+
const { stateDir, invalid } = resolveStateDir(env);
|
|
16
|
+
const base = path.join(root, stateDir);
|
|
17
|
+
return {
|
|
18
|
+
stateDir,
|
|
19
|
+
loopLogsDir: path.join(base, "loop-logs"),
|
|
20
|
+
stopFile: path.join(base, "loop.stop"),
|
|
21
|
+
...invalid !== void 0 ? { invalid } : {}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
async function ensureLoopLogsDir(paths) {
|
|
25
|
+
await mkdir(paths.loopLogsDir, { recursive: true });
|
|
26
|
+
if (paths.stateDir === ".cursor") return;
|
|
27
|
+
const ignore = path.join(paths.loopLogsDir, ".gitignore");
|
|
28
|
+
try {
|
|
29
|
+
await writeFile(ignore, "*\n", { flag: "wx" });
|
|
30
|
+
} catch {
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export {
|
|
35
|
+
HANDOFF_REL,
|
|
36
|
+
STATE_ROOT_ENV,
|
|
37
|
+
runnerStatePaths,
|
|
38
|
+
ensureLoopLogsDir
|
|
39
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HANDOFF_REL
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-C26I6HTO.js";
|
|
4
4
|
import {
|
|
5
5
|
fileExists,
|
|
6
6
|
readJson,
|
|
7
7
|
writeJson
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5B4DVO6C.js";
|
|
9
9
|
|
|
10
10
|
// src/manifest/types.ts
|
|
11
11
|
var MANIFEST_FILENAME = "agent-kit.json";
|
|
@@ -330,7 +330,7 @@ async function findPack(rootDir, packId) {
|
|
|
330
330
|
|
|
331
331
|
// src/lifecycle/overlay.ts
|
|
332
332
|
import { createHash } from "crypto";
|
|
333
|
-
import { mkdir,
|
|
333
|
+
import { mkdir, readdir, readFile, writeFile } from "fs/promises";
|
|
334
334
|
import path4 from "path";
|
|
335
335
|
|
|
336
336
|
// src/lifecycle/overlay-known-hashes.ts
|
|
@@ -681,7 +681,8 @@ var KNOWN_SHIPPED_OVERLAY_HASHES = /* @__PURE__ */ new Set([
|
|
|
681
681
|
"19a5aa359e740fa18d7cc19f0b11243bc53d8d016545bce35837deac7fe2ef7e",
|
|
682
682
|
"f1c7beac6a619520d744fd984bc16b322f3d545b9d8490801aee628dabd94aff",
|
|
683
683
|
"14d919d01637aa6b5acc92804dbb4ab56cecc88281aedd5cb7b5dcf8f7da958e",
|
|
684
|
-
"a8decf7b78e2b2c833b0808c3e108322cfb895fadaec159467973a681028d92a"
|
|
684
|
+
"a8decf7b78e2b2c833b0808c3e108322cfb895fadaec159467973a681028d92a",
|
|
685
|
+
"afb3d9e620f7697cbb44eb27be8be53e8cf542e33b815e3dc51107183487f739"
|
|
685
686
|
]);
|
|
686
687
|
|
|
687
688
|
// src/lifecycle/paths.ts
|
|
@@ -1008,7 +1009,7 @@ function upsertIdList(list, id) {
|
|
|
1008
1009
|
}
|
|
1009
1010
|
|
|
1010
1011
|
// src/registry/install.ts
|
|
1011
|
-
import {
|
|
1012
|
+
import { readdir as readdir2, readFile as readFile3 } from "fs/promises";
|
|
1012
1013
|
import path6 from "path";
|
|
1013
1014
|
function skillTargetDir(skillPath, skillId) {
|
|
1014
1015
|
const category = skillPath.includes("/core/") ? "core" : "community";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
L0_ARTIFACTS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VTOUQAVR.js";
|
|
4
4
|
import {
|
|
5
5
|
copyRegistryFile,
|
|
6
6
|
emptyStats,
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
recordOutcome,
|
|
13
13
|
resolveProtectedGlobs,
|
|
14
14
|
saveManagedHashLedger
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-DBPNGZNH.js";
|
|
16
16
|
import {
|
|
17
17
|
fileExists
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-5B4DVO6C.js";
|
|
19
19
|
|
|
20
20
|
// src/lifecycle/onboard-migration.ts
|
|
21
21
|
import { createHash } from "crypto";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MANIFEST_RELATIVE_PATH
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DBPNGZNH.js";
|
|
4
4
|
import {
|
|
5
5
|
fileExists
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5B4DVO6C.js";
|
|
7
7
|
|
|
8
8
|
// src/scanner/workspace-parent.ts
|
|
9
9
|
import { readdir } from "fs/promises";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assessEnvironment
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-B3VR5YBQ.js";
|
|
4
4
|
import {
|
|
5
5
|
compareSemver,
|
|
6
6
|
normalizeSemver
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2FQX2O4I.js";
|
|
8
8
|
import {
|
|
9
9
|
MANIFEST_RELATIVE_PATH
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-DBPNGZNH.js";
|
|
11
11
|
import {
|
|
12
12
|
KIT_VERSION,
|
|
13
13
|
pinnedCliSpec
|
|
14
14
|
} from "./chunk-7HDQEK6T.js";
|
|
15
15
|
import {
|
|
16
16
|
fileExists
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5B4DVO6C.js";
|
|
18
18
|
|
|
19
19
|
// src/utils/terminal.ts
|
|
20
20
|
import { readdir } from "fs/promises";
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
contextConfigPath,
|
|
3
3
|
intervalElapsed,
|
|
4
4
|
loadContextConfig
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PFEUZXVT.js";
|
|
6
6
|
import {
|
|
7
7
|
fileExists,
|
|
8
8
|
writeJson
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5B4DVO6C.js";
|
|
10
10
|
|
|
11
11
|
// src/lifecycle/cursor-update-awareness.ts
|
|
12
12
|
import { access, readFile } from "fs/promises";
|
|
@@ -5,17 +5,23 @@ import {
|
|
|
5
5
|
claudeHeadlessArgs,
|
|
6
6
|
claudeRedactions,
|
|
7
7
|
claudeRunCaps,
|
|
8
|
+
codexBackend,
|
|
9
|
+
cursorAcpBackend,
|
|
8
10
|
cursorAgentHeadlessArgs,
|
|
9
11
|
redactSecrets,
|
|
10
12
|
resolveHitlRunOptions,
|
|
11
13
|
spawnLogged
|
|
12
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-B5CH47OS.js";
|
|
15
|
+
import {
|
|
16
|
+
ensureLoopLogsDir,
|
|
17
|
+
runnerStatePaths
|
|
18
|
+
} from "./chunk-C26I6HTO.js";
|
|
13
19
|
import {
|
|
14
20
|
fileExists
|
|
15
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-5B4DVO6C.js";
|
|
16
22
|
|
|
17
23
|
// src/plan-loop/dispatch.ts
|
|
18
|
-
import {
|
|
24
|
+
import { readFile } from "fs/promises";
|
|
19
25
|
import path from "path";
|
|
20
26
|
var RUN_CATALOG = [
|
|
21
27
|
"run-plan",
|
|
@@ -99,6 +105,20 @@ function claudeDispatchArgs(opts = {}) {
|
|
|
99
105
|
return claudeHeadlessArgs(opts);
|
|
100
106
|
}
|
|
101
107
|
async function runHeadlessDispatch(opts) {
|
|
108
|
+
if (opts.backendId === "codex" || opts.backendId === "cursor-acp") {
|
|
109
|
+
const backend = opts.backendId === "codex" ? codexBackend : cursorAcpBackend;
|
|
110
|
+
return backend.run({
|
|
111
|
+
workspace: opts.workspace,
|
|
112
|
+
prompt: opts.prompt,
|
|
113
|
+
model: opts.model,
|
|
114
|
+
logPath: opts.logPath,
|
|
115
|
+
spawnFn: opts.spawnFn,
|
|
116
|
+
log: opts.log,
|
|
117
|
+
hitl: opts.hitl,
|
|
118
|
+
render: opts.render,
|
|
119
|
+
onSpawn: opts.onSpawn
|
|
120
|
+
});
|
|
121
|
+
}
|
|
102
122
|
if (opts.backendId === "claude") {
|
|
103
123
|
const log = opts.log ?? ((line) => console.log(line));
|
|
104
124
|
const env = claudeChildEnv();
|
|
@@ -147,8 +167,9 @@ async function runHeadlessDispatch(opts) {
|
|
|
147
167
|
});
|
|
148
168
|
}
|
|
149
169
|
async function ensureDispatchLogPath(root) {
|
|
150
|
-
const
|
|
151
|
-
await
|
|
170
|
+
const paths = runnerStatePaths(root);
|
|
171
|
+
await ensureLoopLogsDir(paths);
|
|
172
|
+
const logDir = paths.loopLogsDir;
|
|
152
173
|
return path.join(logDir, `run-${stamp()}.log`);
|
|
153
174
|
}
|
|
154
175
|
|