@dadado/agent-kit-cli 5.15.1 → 5.17.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.
Files changed (72) hide show
  1. package/dashboard/dashboard-data.mjs +69 -65
  2. package/dashboard/lib/guards.d.mts +5 -0
  3. package/dashboard/lib/guards.mjs +31 -0
  4. package/dashboard/lib/identity-probe.mjs +56 -0
  5. package/dashboard/lib/pipeline-cache.mjs +58 -0
  6. package/dashboard/lib/processes.mjs +71 -0
  7. package/dashboard/serve.mjs +43 -1
  8. package/dashboard/start-broadcast.mjs +2 -12
  9. package/dashboard/start.mjs +2 -13
  10. package/dist/add-HTYIFKMN.js +150 -0
  11. package/dist/chunk-2IPXQFJE.js +253 -0
  12. package/dist/chunk-2RDRMGD3.js +82 -0
  13. package/dist/chunk-2YU2H7I6.js +42 -0
  14. package/dist/chunk-4IWG5CVE.js +214 -0
  15. package/dist/chunk-5VCOWTTP.js +6 -0
  16. package/dist/chunk-77V75A7O.js +39 -0
  17. package/dist/chunk-7HDQEK6T.js +26 -0
  18. package/dist/chunk-AW74INUW.js +1456 -0
  19. package/dist/chunk-B73KQ5KX.js +972 -0
  20. package/dist/chunk-CBCW5R5J.js +484 -0
  21. package/dist/chunk-DE3LQFSJ.js +18 -0
  22. package/dist/chunk-DQA434Y4.js +106 -0
  23. package/dist/chunk-F4VMYR7U.js +318 -0
  24. package/dist/chunk-F6C3GFKV.js +57 -0
  25. package/dist/chunk-HFUH3HVS.js +282 -0
  26. package/dist/chunk-HS7LVVLO.js +74 -0
  27. package/dist/chunk-IHROBTNM.js +135 -0
  28. package/dist/chunk-KD2MYBB6.js +213 -0
  29. package/dist/chunk-MAPOQEA2.js +43 -0
  30. package/dist/chunk-N3HTJVBR.js +341 -0
  31. package/dist/chunk-NQ7IQ5XT.js +26 -0
  32. package/dist/chunk-OUQZC744.js +1315 -0
  33. package/dist/chunk-PCCQUWE5.js +817 -0
  34. package/dist/chunk-PNFF6OU3.js +273 -0
  35. package/dist/chunk-PNG7LO2F.js +53 -0
  36. package/dist/chunk-QTON2GQX.js +203 -0
  37. package/dist/chunk-S6GMFDKV.js +50 -0
  38. package/dist/chunk-SMGFN3Z4.js +503 -0
  39. package/dist/chunk-STGFBAYT.js +641 -0
  40. package/dist/chunk-TFZ2JUXH.js +1081 -0
  41. package/dist/chunk-VY7MTPJ2.js +205 -0
  42. package/dist/chunk-W24CMQ32.js +525 -0
  43. package/dist/chunk-WW3YZKHW.js +165 -0
  44. package/dist/chunk-ZB43YMHW.js +20 -0
  45. package/dist/chunk-ZCTSUQRR.js +874 -0
  46. package/dist/chunk-ZXKZBTXE.js +17 -0
  47. package/dist/contribute-C6AW2P6J.js +367 -0
  48. package/dist/cursor-awareness-KTL2RGKD.js +77 -0
  49. package/dist/dashboard-YSNUGBFY.js +21 -0
  50. package/dist/dashboard-broadcast-M4CMW7RX.js +119 -0
  51. package/dist/diff-VHNR62SI.js +74 -0
  52. package/dist/doctor-PET2HRRJ.js +236 -0
  53. package/dist/dogfood-KKFVRWT6.js +366 -0
  54. package/dist/guard-EHXF76ID.js +530 -0
  55. package/dist/handoff-3UI6VKVG.js +302 -0
  56. package/dist/hook-DYIMKJYL.js +1074 -0
  57. package/dist/index.js +62 -14068
  58. package/dist/init-Q4LBM6KT.js +127 -0
  59. package/dist/install-RHOS3OYZ.js +34 -0
  60. package/dist/mission-control-LJACEVVN.js +89 -0
  61. package/dist/monitors-QV2IS3MP.js +176 -0
  62. package/dist/plan-index-JMC7Z4DW.js +44 -0
  63. package/dist/public-inbound-radar-WP3XF7GS.js +68 -0
  64. package/dist/remote-issues-SZ4HDQL5.js +44 -0
  65. package/dist/run-I3BFGULT.js +243 -0
  66. package/dist/run-plan-FO7CL4M3.js +118 -0
  67. package/dist/scan-NI2SWJ2E.js +33 -0
  68. package/dist/setup-global-M42GEODI.js +340 -0
  69. package/dist/status-XPVQVQMX.js +150 -0
  70. package/dist/update-FJ2EBZVO.js +283 -0
  71. package/dist/validate-V2CW7J4B.js +201 -0
  72. package/package.json +3 -3
@@ -0,0 +1,341 @@
1
+ import {
2
+ allSkills,
3
+ loadPackManifest,
4
+ loadRegistry,
5
+ packMemberFileTargets,
6
+ skillFileTargets
7
+ } from "./chunk-AW74INUW.js";
8
+
9
+ // src/lifecycle/l0.ts
10
+ var L0_ARTIFACTS = [
11
+ // Rules
12
+ {
13
+ source: ".cursor/rules/cursor-plan-handoff.mdc",
14
+ target: ".cursor/rules/cursor-plan-handoff.mdc"
15
+ },
16
+ {
17
+ source: ".cursor/rules/context-guardian.mdc",
18
+ target: ".cursor/rules/context-guardian.mdc"
19
+ },
20
+ {
21
+ source: ".cursor/rules/cursor-skills-git-workflow.mdc",
22
+ target: ".cursor/rules/cursor-skills-git-workflow.mdc"
23
+ },
24
+ {
25
+ source: ".cursor/rules/cursor-skills-general.mdc",
26
+ target: ".cursor/rules/cursor-skills-general.mdc"
27
+ },
28
+ { source: ".cursor/rules/ux-tone.mdc", target: ".cursor/rules/ux-tone.mdc" },
29
+ {
30
+ source: ".cursor/rules/agent-output-hygiene.mdc",
31
+ target: ".cursor/rules/agent-output-hygiene.mdc"
32
+ },
33
+ {
34
+ source: ".cursor/rules/docs-professional-standard.mdc",
35
+ target: ".cursor/rules/docs-professional-standard.mdc"
36
+ },
37
+ { source: ".cursor/rules/memory-loop.mdc", target: ".cursor/rules/memory-loop.mdc" },
38
+ {
39
+ source: ".cursor/rules/hitl-ask-questions.mdc",
40
+ target: ".cursor/rules/hitl-ask-questions.mdc"
41
+ },
42
+ {
43
+ source: ".cursor/skills/core/hitl-gates/SKILL.md",
44
+ target: ".cursor/skills/core/hitl-gates/SKILL.md"
45
+ },
46
+ {
47
+ source: ".cursor/skills/core/hitl-gates/procedures.md",
48
+ target: ".cursor/skills/core/hitl-gates/procedures.md"
49
+ },
50
+ {
51
+ source: ".cursor/skills/core/hitl-gates/run-plan-tick-contract.md",
52
+ target: ".cursor/skills/core/hitl-gates/run-plan-tick-contract.md"
53
+ },
54
+ {
55
+ source: ".cursor/skills/core/hitl-gates/start-project-intake.md",
56
+ target: ".cursor/skills/core/hitl-gates/start-project-intake.md"
57
+ },
58
+ {
59
+ source: ".cursor/skills/core/hitl-gates/run-plan-all-queue.md",
60
+ target: ".cursor/skills/core/hitl-gates/run-plan-all-queue.md"
61
+ },
62
+ {
63
+ source: ".cursor/skills/core/qa/SKILL.md",
64
+ target: ".cursor/skills/core/qa/SKILL.md"
65
+ },
66
+ {
67
+ source: ".cursor/skills/core/dashboard-broadcast/SKILL.md",
68
+ target: ".cursor/skills/core/dashboard-broadcast/SKILL.md"
69
+ },
70
+ {
71
+ source: ".cursor/skills/core/plan-review-triage/procedure.md",
72
+ target: ".cursor/skills/core/plan-review-triage/procedure.md"
73
+ },
74
+ {
75
+ source: ".cursor/skills/core/plan-external-review/procedure.md",
76
+ target: ".cursor/skills/core/plan-external-review/procedure.md"
77
+ },
78
+ {
79
+ source: ".cursor/skills/core/agent-kit-onboard/procedure.md",
80
+ target: ".cursor/skills/core/agent-kit-onboard/procedure.md"
81
+ },
82
+ {
83
+ source: ".cursor/skills/core/field-report-resolve/procedure.md",
84
+ target: ".cursor/skills/core/field-report-resolve/procedure.md"
85
+ },
86
+ {
87
+ source: ".cursor/skills/core/backlog-add/procedure.md",
88
+ target: ".cursor/skills/core/backlog-add/procedure.md"
89
+ },
90
+ {
91
+ source: "registry/rules/git-secrets-safety.mdc",
92
+ target: ".cursor/rules/git-secrets-safety.mdc"
93
+ },
94
+ // Commands
95
+ {
96
+ source: ".cursor/commands/start-project.md",
97
+ target: ".cursor/commands/start-project.md"
98
+ },
99
+ {
100
+ source: ".cursor/commands/backlog-add.md",
101
+ target: ".cursor/commands/backlog-add.md"
102
+ },
103
+ {
104
+ source: ".cursor/commands/backlog-edit.md",
105
+ target: ".cursor/commands/backlog-edit.md"
106
+ },
107
+ {
108
+ source: ".cursor/commands/backlog-delete.md",
109
+ target: ".cursor/commands/backlog-delete.md"
110
+ },
111
+ {
112
+ source: ".cursor/commands/backlog-cancel.md",
113
+ target: ".cursor/commands/backlog-cancel.md"
114
+ },
115
+ {
116
+ source: ".cursor/commands/archive-plan.md",
117
+ target: ".cursor/commands/archive-plan.md"
118
+ },
119
+ {
120
+ source: ".cursor/commands/agent-kit-onboard.md",
121
+ target: ".cursor/commands/agent-kit-onboard.md"
122
+ },
123
+ {
124
+ source: ".cursor/commands/continue-plan.md",
125
+ target: ".cursor/commands/continue-plan.md"
126
+ },
127
+ {
128
+ source: ".cursor/commands/run-plan.md",
129
+ target: ".cursor/commands/run-plan.md"
130
+ },
131
+ {
132
+ source: ".cursor/commands/hotfix.md",
133
+ target: ".cursor/commands/hotfix.md"
134
+ },
135
+ {
136
+ source: ".cursor/commands/run-plan-all.md",
137
+ target: ".cursor/commands/run-plan-all.md"
138
+ },
139
+ // Deprecated aliases of /run-plan (kept so existing references keep working)
140
+ {
141
+ source: ".cursor/commands/run-plan-loop.md",
142
+ target: ".cursor/commands/run-plan-loop.md"
143
+ },
144
+ {
145
+ source: ".cursor/commands/run-plan-orchestrated.md",
146
+ target: ".cursor/commands/run-plan-orchestrated.md"
147
+ },
148
+ { source: ".cursor/commands/handoff.md", target: ".cursor/commands/handoff.md" },
149
+ { source: ".cursor/commands/summary.md", target: ".cursor/commands/summary.md" },
150
+ {
151
+ source: ".cursor/commands/dashboard.md",
152
+ target: ".cursor/commands/dashboard.md"
153
+ },
154
+ {
155
+ source: ".cursor/commands/dashboard-broadcast.md",
156
+ target: ".cursor/commands/dashboard-broadcast.md"
157
+ },
158
+ {
159
+ source: ".cursor/commands/git-staging.md",
160
+ target: ".cursor/commands/git-staging.md"
161
+ },
162
+ { source: ".cursor/commands/git-prod.md", target: ".cursor/commands/git-prod.md" },
163
+ // Factory landing wraps: keep `.cursor/commands/kit-staging.md` and
164
+ // `kit-prod.md` on disk. They are not consumer L0 (surface diet).
165
+ {
166
+ source: ".cursor/commands/plan-external-review.md",
167
+ target: ".cursor/commands/plan-external-review.md"
168
+ },
169
+ {
170
+ source: ".cursor/commands/plan-review-triage.md",
171
+ target: ".cursor/commands/plan-review-triage.md"
172
+ },
173
+ {
174
+ source: ".cursor/commands/field-report-resolve.md",
175
+ target: ".cursor/commands/field-report-resolve.md"
176
+ },
177
+ {
178
+ source: ".cursor/commands/dogfood.md",
179
+ target: ".cursor/commands/dogfood.md"
180
+ },
181
+ // Factory-only: `.cursor/commands/public-issue-triage.md` and
182
+ // `.cursor/commands/public-inbound-radar.md` are intentionally omitted from
183
+ // L0 (and excluded from public-sync). See ADRs
184
+ // 2026-08-05_factory-only-public-issue-triage-command.md and
185
+ // 2026-09-24_public-inbound-radar.md.
186
+ {
187
+ source: ".cursor/commands/cursor-update-awareness.md",
188
+ target: ".cursor/commands/cursor-update-awareness.md"
189
+ },
190
+ {
191
+ source: ".cursor/commands/qa.md",
192
+ target: ".cursor/commands/qa.md"
193
+ },
194
+ {
195
+ source: ".cursor/commands/update.md",
196
+ target: ".cursor/commands/update.md"
197
+ },
198
+ // Context (templates + example config; private config.json is not L0)
199
+ {
200
+ source: ".cursor/context/templates/plan-external-review-prompt.md",
201
+ target: ".cursor/context/templates/plan-external-review-prompt.md"
202
+ },
203
+ {
204
+ source: ".cursor/context/templates/plan.md",
205
+ target: ".cursor/context/templates/plan.md"
206
+ },
207
+ {
208
+ source: ".cursor/context/templates/context-pack.md",
209
+ target: ".cursor/context/templates/context-pack.md"
210
+ },
211
+ {
212
+ source: ".cursor/context/templates/task-brief.md",
213
+ target: ".cursor/context/templates/task-brief.md"
214
+ },
215
+ {
216
+ source: ".cursor/context/templates/handoff.md",
217
+ target: ".cursor/context/templates/handoff.md"
218
+ },
219
+ {
220
+ source: ".cursor/context/templates/adr.md",
221
+ target: ".cursor/context/templates/adr.md"
222
+ },
223
+ {
224
+ source: ".cursor/context/templates/plan-monitor.md",
225
+ target: ".cursor/context/templates/plan-monitor.md"
226
+ },
227
+ {
228
+ source: ".cursor/context/templates/memory-entry.md",
229
+ target: ".cursor/context/templates/memory-entry.md"
230
+ },
231
+ {
232
+ source: ".cursor/context/config.example.json",
233
+ target: ".cursor/context/config.example.json"
234
+ },
235
+ // Scripts (canonical launchers; consumers never receive repo-root scripts/)
236
+ {
237
+ source: ".cursor/scripts/plan-external-review.sh",
238
+ target: ".cursor/scripts/plan-external-review.sh"
239
+ },
240
+ {
241
+ source: ".cursor/scripts/field-report-cadence-bump.sh",
242
+ target: ".cursor/scripts/field-report-cadence-bump.sh"
243
+ },
244
+ {
245
+ source: ".cursor/scripts/run-plan-all-consolidate.sh",
246
+ target: ".cursor/scripts/run-plan-all-consolidate.sh"
247
+ },
248
+ // Secrets gate (structural)
249
+ {
250
+ source: ".cursor/hooks/pre-commit/check-secrets.sh",
251
+ target: ".cursor/hooks/pre-commit/check-secrets.sh"
252
+ },
253
+ // Native Cursor agent hooks (thin adapters -> agent-kit CLI)
254
+ {
255
+ source: ".cursor/hooks.json",
256
+ target: ".cursor/hooks.json"
257
+ },
258
+ {
259
+ source: ".cursor/hooks/agent/resolve-agent-kit.sh",
260
+ target: ".cursor/hooks/agent/resolve-agent-kit.sh"
261
+ },
262
+ {
263
+ source: ".cursor/hooks/agent/session-start.sh",
264
+ target: ".cursor/hooks/agent/session-start.sh"
265
+ },
266
+ {
267
+ source: ".cursor/hooks/agent/pre-compact.sh",
268
+ target: ".cursor/hooks/agent/pre-compact.sh"
269
+ },
270
+ {
271
+ source: ".cursor/hooks/agent/guard-shell.sh",
272
+ target: ".cursor/hooks/agent/guard-shell.sh"
273
+ },
274
+ {
275
+ source: ".cursor/hooks/agent/after-edit-schema.sh",
276
+ target: ".cursor/hooks/agent/after-edit-schema.sh"
277
+ },
278
+ {
279
+ source: ".cursor/hooks/agent/secrets-prompt.sh",
280
+ target: ".cursor/hooks/agent/secrets-prompt.sh"
281
+ },
282
+ // Git spine docs at project root (not a nested agent-kit/ copy)
283
+ {
284
+ source: "autogit/gitupdate.md",
285
+ target: "autogit/gitupdate.md"
286
+ },
287
+ {
288
+ source: "autogit/plan-routine.md",
289
+ target: "autogit/plan-routine.md"
290
+ },
291
+ // Signature gate script: the staging/prod routines run
292
+ // `sh git-hooks/prepare-commit-msg --check -`, so the file must exist in the
293
+ // checkout. Installing it into .git/hooks stays optional (issue #89).
294
+ {
295
+ source: "git-hooks/prepare-commit-msg",
296
+ target: "git-hooks/prepare-commit-msg"
297
+ }
298
+ ];
299
+
300
+ // src/lifecycle/targets.ts
301
+ import path from "path";
302
+ var toPosix = (rel) => rel.split(path.sep).join("/");
303
+ async function managedPairs(registryRoot, manifest, index) {
304
+ const pairs = [];
305
+ const missingSkills = [];
306
+ const push = (sourceRel, targetRel, origin) => {
307
+ pairs.push({ sourceRel: toPosix(sourceRel), targetRel: toPosix(targetRel), origin });
308
+ };
309
+ for (const a of L0_ARTIFACTS) push(a.source, a.target, "l0");
310
+ for (const packId of manifest.packs ?? []) {
311
+ const pack = await loadPackManifest(registryRoot, packId);
312
+ for (const member of pack.members) {
313
+ for (const { sourceRel, targetRel } of await packMemberFileTargets(registryRoot, member)) {
314
+ push(sourceRel, targetRel, "pack");
315
+ }
316
+ }
317
+ }
318
+ if ((manifest.skills ?? []).length > 0) {
319
+ const pool = allSkills(index ?? await loadRegistry(registryRoot));
320
+ for (const id of manifest.skills ?? []) {
321
+ const skill = pool.find((s) => s.id === id);
322
+ if (!skill) {
323
+ missingSkills.push(id);
324
+ continue;
325
+ }
326
+ for (const { sourceRel, targetRel } of await skillFileTargets(
327
+ registryRoot,
328
+ skill.path,
329
+ skill.id
330
+ )) {
331
+ push(sourceRel, targetRel, "skill");
332
+ }
333
+ }
334
+ }
335
+ return { pairs, missingSkills };
336
+ }
337
+
338
+ export {
339
+ L0_ARTIFACTS,
340
+ managedPairs
341
+ };
@@ -0,0 +1,26 @@
1
+ import {
2
+ readJson
3
+ } from "./chunk-77V75A7O.js";
4
+
5
+ // src/lifecycle/context-config.ts
6
+ import path from "path";
7
+ var CONTEXT_CONFIG_REL = path.join(".cursor", "context", "config.json");
8
+ function contextConfigPath(cwd) {
9
+ return path.join(cwd, CONTEXT_CONFIG_REL);
10
+ }
11
+ async function loadContextConfig(cwd) {
12
+ return readJson(contextConfigPath(cwd));
13
+ }
14
+ function intervalElapsed(lastCheckedAt, intervalDays) {
15
+ if (!lastCheckedAt) return true;
16
+ const last = Date.parse(lastCheckedAt);
17
+ if (Number.isNaN(last)) return true;
18
+ return Date.now() - last >= intervalDays * 24 * 60 * 60 * 1e3;
19
+ }
20
+
21
+ export {
22
+ CONTEXT_CONFIG_REL,
23
+ contextConfigPath,
24
+ loadContextConfig,
25
+ intervalElapsed
26
+ };