agentplugged 1.3.0 → 1.4.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 (236) hide show
  1. package/README.md +3 -2
  2. package/dist/agent-commands.js +25473 -24861
  3. package/dist/bin.js +1 -2
  4. package/dist/cli.js +1 -2
  5. package/dist/dist.js +12205 -0
  6. package/dist/esm.js +8 -16
  7. package/dist/forge-follow.js +5 -6
  8. package/dist/hash.js +9 -12083
  9. package/dist/helpers.js +257 -514
  10. package/dist/launcher-env.js +1 -2
  11. package/dist/launcher.js +3 -4
  12. package/dist/libsodium-wrappers.js +2 -4
  13. package/dist/libsodium-wrappers2.js +2 -4
  14. package/dist/main.js +791 -152
  15. package/dist/method/agents/alex/SKILL.md +13 -29
  16. package/dist/method/agents/alex/agent.yaml +1 -1
  17. package/dist/method/agents/basile/SKILL.md +44 -0
  18. package/dist/method/agents/basile/agent.yaml +69 -0
  19. package/dist/method/agents/chloe/SKILL.md +12 -25
  20. package/dist/method/agents/chloe/agent.yaml +3 -3
  21. package/dist/method/agents/ethan/SKILL.md +8 -9
  22. package/dist/method/agents/ethan/agent.yaml +9 -8
  23. package/dist/method/agents/hugo/SKILL.md +8 -8
  24. package/dist/method/agents/hugo/agent.yaml +9 -8
  25. package/dist/method/agents/iris/SKILL.md +4 -10
  26. package/dist/method/agents/izzy/SKILL.md +68 -91
  27. package/dist/method/agents/izzy/agent.yaml +8 -15
  28. package/dist/method/agents/jade/SKILL.md +7 -9
  29. package/dist/method/agents/jade/agent.yaml +9 -8
  30. package/dist/method/agents/julien/SKILL.md +38 -58
  31. package/dist/method/agents/lina/SKILL.md +7 -9
  32. package/dist/method/agents/lina/agent.yaml +9 -8
  33. package/dist/method/agents/lou/SKILL.md +4 -11
  34. package/dist/method/agents/lou/agent.yaml +2 -2
  35. package/dist/method/agents/maya/SKILL.md +12 -19
  36. package/dist/method/agents/maya/agent.yaml +1 -3
  37. package/dist/method/agents/milo/SKILL.md +21 -32
  38. package/dist/method/agents/noah/SKILL.md +109 -63
  39. package/dist/method/agents/noah/agent.yaml +14 -31
  40. package/dist/method/agents/noah/references/decisions.md +61 -121
  41. package/dist/method/agents/noah/references/environment.md +30 -70
  42. package/dist/method/agents/noah/references/facts.md +22 -11
  43. package/dist/method/agents/noah/references/journey.md +26 -78
  44. package/dist/method/agents/noah/references/team.md +63 -190
  45. package/dist/method/agents/omar/SKILL.md +12 -28
  46. package/dist/method/agents/omar/agent.yaml +1 -1
  47. package/dist/method/agents/quentin/SKILL.md +7 -15
  48. package/dist/method/agents/quentin/agent.yaml +4 -2
  49. package/dist/method/agents/sam/SKILL.md +6 -8
  50. package/dist/method/agents/sam/agent.yaml +9 -8
  51. package/dist/method/agents/stella/SKILL.md +6 -14
  52. package/dist/method/agents/stella/agent.yaml +1 -1
  53. package/dist/method/agents/tess/SKILL.md +7 -14
  54. package/dist/method/agents/tess/agent.yaml +2 -2
  55. package/dist/method/agents/zoe/SKILL.md +9 -21
  56. package/dist/method/doctor.yaml +23 -4
  57. package/dist/method/models.yaml +12 -0
  58. package/dist/method/skills/acceptance-qa/SKILL.md +1 -1
  59. package/dist/method/skills/acceptance-qa/references/run.md +24 -32
  60. package/dist/method/skills/acceptance-qa/references/scenarios.md +16 -19
  61. package/dist/method/skills/acceptance-qa/references/verdicts.md +10 -16
  62. package/dist/method/skills/api-e2e-tests/SKILL.md +46 -46
  63. package/dist/method/skills/audit-pillars/SKILL.md +12 -10
  64. package/dist/method/skills/audit-pillars/references/pillars.md +40 -0
  65. package/dist/method/skills/chain-stories/SKILL.md +5 -4
  66. package/dist/method/skills/chain-stories/references/merge-order.md +23 -0
  67. package/dist/method/skills/check-readiness/SKILL.md +1 -1
  68. package/dist/method/skills/check-requirements/SKILL.md +37 -72
  69. package/dist/method/skills/check-requirements/references/engine-proofs.md +16 -23
  70. package/dist/method/skills/check-requirements/references/proofs-and-gaps.md +22 -37
  71. package/dist/method/skills/critique-deliverable/SKILL.md +3 -3
  72. package/dist/method/skills/critique-deliverable/references/choose.md +12 -21
  73. package/dist/method/skills/critique-deliverable/references/format.md +14 -20
  74. package/dist/method/skills/critique-deliverable/references/gestures.md +14 -21
  75. package/dist/method/skills/critique-deliverable/references/judgment.md +4 -9
  76. package/dist/method/skills/critique-deliverable/references/methods.md +21 -0
  77. package/dist/method/skills/critique-deliverable/references/reconcile.md +6 -11
  78. package/dist/method/skills/deep-research/SKILL.md +16 -24
  79. package/dist/method/skills/deep-research/references/candidates.md +13 -25
  80. package/dist/method/skills/deep-research/references/external.md +15 -34
  81. package/dist/method/skills/deep-research/references/page-format.md +16 -42
  82. package/dist/method/skills/deep-research/references/types.md +16 -27
  83. package/dist/method/skills/develop-story/SKILL.md +56 -189
  84. package/dist/method/skills/develop-story/references/acceptance-tests.md +18 -71
  85. package/dist/method/skills/develop-story/references/quick-lane.md +20 -0
  86. package/dist/method/skills/diagnose-bug/SKILL.md +42 -53
  87. package/dist/method/skills/diagnose-bug/references/hypotheses.md +1 -2
  88. package/dist/method/skills/generate-knowledge-base/SKILL.md +57 -226
  89. package/dist/method/skills/generate-knowledge-base/assets/index-template.md +6 -15
  90. package/dist/method/skills/generate-knowledge-base/assets/page-template.md +11 -24
  91. package/dist/method/skills/generate-knowledge-base/references/living-docs.md +25 -64
  92. package/dist/method/skills/generate-knowledge-base/references/reuse-map.md +9 -18
  93. package/dist/method/skills/ideation/SKILL.md +16 -23
  94. package/dist/method/skills/ideation/references/close.md +18 -14
  95. package/dist/method/skills/ideation/references/converge.md +11 -21
  96. package/dist/method/skills/ideation/references/stances.md +13 -17
  97. package/dist/method/skills/ideation/references/techniques.md +20 -0
  98. package/dist/method/skills/improve-code/SKILL.md +42 -54
  99. package/dist/method/skills/pitch/SKILL.md +16 -19
  100. package/dist/method/skills/pitch/references/deck.md +15 -18
  101. package/dist/method/skills/pitch/references/design-implementation.md +13 -21
  102. package/dist/method/skills/pitch/references/design.md +21 -0
  103. package/dist/method/skills/pitch/references/story.md +13 -18
  104. package/dist/method/skills/plan-sprint/SKILL.md +49 -151
  105. package/dist/method/skills/resolve-merge-conflict/SKILL.md +40 -65
  106. package/dist/method/skills/review-after-launch/SKILL.md +56 -0
  107. package/dist/method/skills/review-story/SKILL.md +44 -72
  108. package/dist/method/skills/review-story/references/amend-story.md +8 -13
  109. package/dist/method/skills/review-story/references/export.md +7 -17
  110. package/dist/method/skills/review-story/references/free-review.md +9 -20
  111. package/dist/method/skills/review-story/references/judge.md +25 -37
  112. package/dist/method/skills/review-story/references/tests.md +29 -0
  113. package/dist/method/skills/round-table/SKILL.md +6 -6
  114. package/dist/method/skills/round-table/references/closing.md +18 -0
  115. package/dist/method/skills/round-table/references/guests.md +15 -15
  116. package/dist/method/skills/round-table/references/rooms.md +15 -28
  117. package/dist/method/skills/round-table/references/table.md +19 -0
  118. package/dist/method/skills/run-acceptance/SKILL.md +58 -0
  119. package/dist/method/skills/run-acceptance/references/template.md +39 -0
  120. package/dist/method/skills/run-retrospective/SKILL.md +50 -189
  121. package/dist/method/skills/security-review-architecture/SKILL.md +47 -109
  122. package/dist/method/skills/security-review-architecture/references/spec-review.md +27 -38
  123. package/dist/method/skills/setup-ci/SKILL.md +45 -109
  124. package/dist/method/skills/split-into-stories/SKILL.md +59 -192
  125. package/dist/method/skills/split-into-stories/assets/story.md.tmpl +15 -4
  126. package/dist/method/skills/strategy/SKILL.md +21 -25
  127. package/dist/method/skills/strategy/references/costs.md +12 -26
  128. package/dist/method/skills/strategy/references/gestures.md +12 -21
  129. package/dist/method/skills/strategy/references/innovate.md +19 -37
  130. package/dist/method/skills/strategy/references/solve.md +19 -32
  131. package/dist/method/skills/test-idea/SKILL.md +5 -5
  132. package/dist/method/skills/test-idea/assets/prfaq-template.md +1 -1
  133. package/dist/method/skills/test-idea/references/faq.md +12 -29
  134. package/dist/method/skills/test-idea/references/forge.md +19 -30
  135. package/dist/method/skills/test-idea/references/personas.md +16 -19
  136. package/dist/method/skills/test-idea/references/prfaq.md +31 -31
  137. package/dist/method/skills/workshop/SKILL.md +10 -16
  138. package/dist/method/skills/workshop/references/create.md +28 -45
  139. package/dist/method/skills/workshop/references/customize.md +17 -42
  140. package/dist/method/skills/workshop/references/evaluate.md +11 -42
  141. package/dist/method/skills/workshop/references/rules.md +17 -26
  142. package/dist/method/skills/write-architecture/SKILL.md +62 -220
  143. package/dist/method/skills/write-architecture/references/guard.md +11 -28
  144. package/dist/method/skills/write-architecture/references/self-check.md +22 -38
  145. package/dist/method/skills/write-brand/SKILL.md +2 -2
  146. package/dist/method/skills/write-brand/references/identity.md +21 -22
  147. package/dist/method/skills/write-brand/references/platform.md +13 -20
  148. package/dist/method/skills/write-brand/references/rules.md +16 -22
  149. package/dist/method/skills/write-brief/SKILL.md +56 -149
  150. package/dist/method/skills/write-brief/references/brief-checklist.md +18 -30
  151. package/dist/method/skills/write-content/SKILL.md +53 -210
  152. package/dist/method/skills/write-content/references/content-checklist.md +32 -50
  153. package/dist/method/skills/write-positioning/SKILL.md +53 -197
  154. package/dist/method/skills/write-positioning/references/positioning-checklist.md +15 -41
  155. package/dist/method/skills/write-positioning/references/seo-checklist.md +26 -51
  156. package/dist/method/skills/write-prd/SKILL.md +52 -179
  157. package/dist/method/skills/write-prd/references/prd-checklist.md +25 -54
  158. package/dist/method/skills/write-sales/SKILL.md +48 -212
  159. package/dist/method/skills/write-sales/references/before-you-send.md +21 -49
  160. package/dist/method/skills/write-sales/references/sales-checklist.md +19 -69
  161. package/dist/method/skills/write-spec/references/spec-guide.md +20 -23
  162. package/dist/method/skills/write-ux-spec/SKILL.md +57 -168
  163. package/dist/method/skills/write-ux-spec/references/accessibility-check.md +13 -72
  164. package/dist/method/skills/write-ux-spec/references/mockups.md +6 -68
  165. package/dist/method/skills/write-ux-spec/references/tokens-and-sketches.md +8 -81
  166. package/dist/method/skills/write-ux-spec/references/ux-checklist.md +12 -67
  167. package/dist/product-root.js +353 -250
  168. package/dist/project-command.js +1508 -0
  169. package/dist/project-command2.js +1 -0
  170. package/dist/read-command.js +19 -0
  171. package/dist/rolldown-runtime.js +1 -2
  172. package/dist/sheet-command.js +57 -0
  173. package/dist/webauthn-verify.js +4 -5
  174. package/package.json +11 -10
  175. package/dist/method/agents/noah/references/conduct.md +0 -102
  176. package/dist/method/skills/api-e2e-tests/references/frameworks.md +0 -58
  177. package/dist/method/skills/api-e2e-tests/references/generate.md +0 -67
  178. package/dist/method/skills/audit-pillars/references/accessibility.md +0 -13
  179. package/dist/method/skills/audit-pillars/references/architecture.md +0 -13
  180. package/dist/method/skills/audit-pillars/references/dependencies.md +0 -13
  181. package/dist/method/skills/audit-pillars/references/format.md +0 -20
  182. package/dist/method/skills/audit-pillars/references/interface.md +0 -13
  183. package/dist/method/skills/audit-pillars/references/method.md +0 -33
  184. package/dist/method/skills/audit-pillars/references/performance.md +0 -17
  185. package/dist/method/skills/audit-pillars/references/quality.md +0 -11
  186. package/dist/method/skills/audit-pillars/references/security.md +0 -13
  187. package/dist/method/skills/audit-pillars/references/tests.md +0 -17
  188. package/dist/method/skills/critique-deliverable/references/assumption-audit.md +0 -11
  189. package/dist/method/skills/critique-deliverable/references/compare-existing.md +0 -13
  190. package/dist/method/skills/critique-deliverable/references/devils-advocate.md +0 -13
  191. package/dist/method/skills/critique-deliverable/references/divergence.md +0 -15
  192. package/dist/method/skills/critique-deliverable/references/domain-expert.md +0 -14
  193. package/dist/method/skills/critique-deliverable/references/extreme-user.md +0 -13
  194. package/dist/method/skills/critique-deliverable/references/failure-modes.md +0 -13
  195. package/dist/method/skills/critique-deliverable/references/first-principles.md +0 -12
  196. package/dist/method/skills/critique-deliverable/references/inversion.md +0 -13
  197. package/dist/method/skills/critique-deliverable/references/pre-mortem.md +0 -12
  198. package/dist/method/skills/critique-deliverable/references/red-team.md +0 -12
  199. package/dist/method/skills/critique-deliverable/references/reframe.md +0 -12
  200. package/dist/method/skills/critique-deliverable/references/second-order.md +0 -12
  201. package/dist/method/skills/critique-deliverable/references/socratic.md +0 -15
  202. package/dist/method/skills/critique-deliverable/references/steelman.md +0 -13
  203. package/dist/method/skills/critique-deliverable/references/subtraction.md +0 -12
  204. package/dist/method/skills/develop-story/references/self-check.md +0 -46
  205. package/dist/method/skills/generate-knowledge-base/references/kb-checklist.md +0 -49
  206. package/dist/method/skills/generate-knowledge-base/references/repository-scan.md +0 -48
  207. package/dist/method/skills/ideation/references/choose.md +0 -21
  208. package/dist/method/skills/ideation/references/gestures.md +0 -15
  209. package/dist/method/skills/ideation/references/techniques-borrowed.md +0 -8
  210. package/dist/method/skills/ideation/references/techniques-deep.md +0 -12
  211. package/dist/method/skills/ideation/references/techniques-frames.md +0 -12
  212. package/dist/method/skills/ideation/references/techniques-futures.md +0 -8
  213. package/dist/method/skills/ideation/references/techniques-limits.md +0 -9
  214. package/dist/method/skills/ideation/references/techniques-people.md +0 -7
  215. package/dist/method/skills/ideation/references/techniques-sparks.md +0 -10
  216. package/dist/method/skills/ideation/references/techniques-together.md +0 -11
  217. package/dist/method/skills/order-merges/SKILL.md +0 -71
  218. package/dist/method/skills/pitch/references/deck-types.md +0 -17
  219. package/dist/method/skills/pitch/references/design-methods.md +0 -45
  220. package/dist/method/skills/pitch/references/design-thinking.md +0 -28
  221. package/dist/method/skills/pitch/references/story-frameworks.md +0 -39
  222. package/dist/method/skills/quick-lane/SKILL.md +0 -143
  223. package/dist/method/skills/review-tests/SKILL.md +0 -32
  224. package/dist/method/skills/review-tests/references/check.md +0 -25
  225. package/dist/method/skills/review-tests/references/grid.md +0 -27
  226. package/dist/method/skills/round-table/references/cast.md +0 -14
  227. package/dist/method/skills/round-table/references/gestures.md +0 -24
  228. package/dist/method/skills/round-table/references/independence.md +0 -21
  229. package/dist/method/skills/round-table/references/three-views.md +0 -17
  230. package/dist/method/skills/round-table/references/turns.md +0 -19
  231. package/dist/method/skills/strategy/references/innovate-frameworks.md +0 -48
  232. package/dist/method/skills/strategy/references/solve-methods.md +0 -45
  233. package/dist/method/skills/test-idea/references/bets.md +0 -14
  234. package/dist/method/skills/test-idea/references/concept.md +0 -24
  235. package/dist/method/skills/test-idea/references/verdict.md +0 -26
  236. package/dist/method/skills/workshop/references/analyze.md +0 -36
package/dist/main.js CHANGED
@@ -1,8 +1,10 @@
1
1
  import { n as SESSION_INSTANCE_ENV, r as SESSION_KEY_ENV, t as ENGINE_CHILD_ENV } from "./launcher-env.js";
2
- import { $ as engineDir, A as resolveEngineCommand, B as planOf, C as codexHookHashes, D as questionToolHookIn, E as elicitationHookIn, F as STATE_CACHE_PATH, G as DEFAULT_THRESHOLDS, H as compare, I as evalStatus, J as casesDigest, K as EVALS_DIR, L as loadSkill, M as validateInstallChannel, N as writeInstallChannel, O as parseRootPin, P as detectGitWorkflow, Q as agentpluggedHome, R as suggestStarter, S as recordToolRead, T as planCodexTrust, U as keep, V as selection, W as CASES_FILE, X as productRootOf, Y as readCases, Z as ENGINE_PACKAGE, _ as codexCallOf, a as NodeProofRunner, b as callOf, c as createCommandRegistry, et as engineEntry, f as envValue, g as CODEX_FLAVOR, h as cursorSessionOf, i as NodeMutationLab, j as readInstallChannel, k as rootPinText, l as ResponseMemory, m as cursorCallOf, n as productRootOf$1, nt as isInstalledEngine, o as NodeEvalAgent, p as CURSOR_FLAVOR, q as REFERENCE_FILE, r as NodeUsageTraces, rt as isReleaseVersion, s as NodeToolProbe, u as shapeResponse, v as codexSessionOf, w as codexTrustSupported, x as guardToolCall, y as recordCodexRead, z as evaluate } from "./product-root.js";
3
- import { $o as EVENT_REASON, At as EVENT_TYPES, Br as QUESTION_TOOL_NAME, Fo as VALIDATION_POINTS, Ft as journalEventPath, Go as GIT_CI_MODES, It as journalRemoteRef, Jo as GitBranchSchema, Lt as journalSeenRef, Mo as TOOL_IDS, Mt as JOURNAL_REF, Po as VALIDATION_MODES, So as PROFILE_PRESET_IDS, Xo as recommendedGitWorkflow, Zo as resolveGitWorkflow, _n as TracedRequirementInputSchema, _o as INSTALL_MODES, a as fromBase64url, as as parseEventEnvelope, bo as PERMISSION_MODES, c as toHex, cn as MAX_ELICITED_NOTE_LENGTH, dn as DeviationReasonSchema, fo as DEFAULT_PERMISSION_MODE, g as JOURNAL_PROJECTED_REF, go as DOMAIN_IDS, ho as DEVELOPER_SPECIALTIES, i as sha256Hex, jt as JOURNAL_DIR, l as utf8, ls as ErrorCode, mo as DEFAULT_VALIDATION_POINTS, n as randomBytes, ns as ULID_PATTERN, po as DEFAULT_VALIDATION_MODE, qa as DeferredIdInputSchema, qo as GIT_MERGE_MODES, rs as eventInvalid, s as toBase64url, un as DeviationIdInputSchema, uo as DEFAULT_INSTALL_MODE, xo as PHASE_IDS, za as contentSections } from "./hash.js";
4
- import { $a as renderCodexHooks, $o as toolCallOf, An as engineTargetOf, Bd as canonicalBytes, Cn as answerProblem, Cr as COMMIT_HOOK_LINE, Cu as DEFAULT_PRESET, Dc as forgeCli, Dn as withAnswers, En as runFix, Er as COMMIT_STORIES_DIR, Fd as normalizeChatText, Fr as AgentSession, Ft as parseConflictMarkers, Gd as creatorText, Gr as nextDeviceHead, Iu as byOpening, J as researchLines, Ju as waiverDeadlineProblem, Kr as prepareAppend, Ku as reviewActions, Ma as checkEngine, Mc as repositoryWebUrl, Mn as installAndPin, Oc as forgeOfHost$1, Os as keychainFull, Pd as messageDigest, Pn as maybeAutoUpdate, Ps as formDigest, Qo as TOOL_GROUPS, Rs as CI_CONFIG_PATHS, Sd as sameProject, Sr as COMMIT_CHECK_PATH, Tr as COMMIT_SKIPS_PATH, Tu as isPresetId, Ul as ARCHITECTURE_SECURITY_REVIEW_PATH, Ur as deviceHeads, Us as isWorkflowFile, Vd as eventHash, Vr as checkHumanEvents, Wd as ANTIGRAVITY_UNCHECKED_REASON, Wr as journalProduct, Wu as parseWaiverAnswer, Xr as announcedKey, Xu as waiverRefusal, Y as costsLines, Yo as inputShapeOf, Yr as adoptRotatedKey, Zo as publishedShape, Zr as forgetProductKey, Zu as AgentPluggedError, _d as isCursorClient, _i as stackField, _o as readProfile, bs as readDefinitions, dr as validateCreateField, ds as toolName, dt as reviewNotInteractive, er as AGENT_ACTIONS, es as toolNotation, fo as toolsFromDetection, fr as recordGitWorkflow, fs as TOOL_CATALOG, gd as isCodexClient, gu as STORY_BUILDERS, hd as isAntigravityClient, hn as JournalBackup, ho as methodNotInstalled, is as isPersonalLayerFile, jc as remoteLocation, js as DECISION_FORM_FIELDS, ks as loadMachineKey, mn as JOURNAL_REMOTE_NAME, mu as isRetiredDeveloper, nd as METHOD_CONFIG_PATH, ni as sensitiveProductKey, nr as checkCreate, ns as SKILL_OVERRIDES_DIR, oo as withEngineCommand, po as detectTools, qr as prepareEngineEvents, qu as statusAt, ts as withToolNotation, us as displayName, vd as isHookedClient, vo as resolveProfile, wn as displayCommand, wr as COMMIT_HOOK_NAME, wu as inactiveAgents, xi as stackPromptDigest, xr as CHAINED_HOOK_NAME, zr as createUlidFactory, zs as GITHUB_WORKFLOWS_DIR, zu as ACTION_DECISIONS } from "./agent-commands.js";
2
+ import { $ as agentpluggedHome, A as resolveEngineCommand, B as planOf, C as codexHookHashes, D as questionToolHookIn, E as elicitationHookIn, F as STATE_CACHE_PATH, G as DEFAULT_THRESHOLDS, H as compare, I as evalStatus, J as casesDigest, K as EVALS_DIR, L as loadSkill, M as validateInstallChannel, N as writeInstallChannel, O as parseRootPin, P as detectGitWorkflow, Q as ENGINE_PACKAGE, R as suggestStarter, S as recordToolRead, T as planCodexTrust, U as keep, V as selection, W as CASES_FILE, X as checkCallCommand, Y as readCases, Z as productRootOf, _ as codexCallOf, a as NodeProofRunner, b as callOf, c as createCommandRegistry, et as engineDir, f as envValue, g as CODEX_FLAVOR, h as cursorSessionOf, i as NodeMutationLab, it as isReleaseVersion, j as readInstallChannel, k as rootPinText, l as ResponseMemory, m as cursorCallOf, n as productRootOf$1, o as NodeEvalAgent, p as CURSOR_FLAVOR, q as REFERENCE_FILE, r as NodeUsageTraces, rt as isInstalledEngine, s as NodeToolProbe, tt as engineEntry, u as shapeResponse, v as codexSessionOf, w as codexTrustSupported, x as guardToolCall, y as recordCodexRead, z as evaluate } from "./product-root.js";
3
+ import { $t as MAX_ELICITED_NOTE_LENGTH, Aa as contentSections, Co as TOOL_IDS, Ct as JOURNAL_REF, Dt as journalRemoteRef, Eo as VALIDATION_POINTS, Et as journalEventPath, Ho as resolveGitWorkflow, Io as GIT_CI_MODES, Jo as eventInvalid, Ot as journalSeenRef, Ra as DeferredIdInputSchema, Ro as GIT_MERGE_MODES, St as JOURNAL_DIR, To as VALIDATION_MODES, Vo as recommendedGitWorkflow, Wo as EVENT_REASON, Zo as parseEventEnvelope, ao as DEFAULT_VALIDATION_POINTS, cn as TracedRequirementInputSchema, co as INSTALL_MODES, do as PERMISSION_MODES, fo as PHASE_IDS, io as DEFAULT_VALIDATION_MODE, jr as QUESTION_TOOL_NAME, nn as DeviationReasonSchema, oo as DEVELOPER_SPECIALTIES, po as PROFILE_PRESET_IDS, qo as ULID_PATTERN, ro as DEFAULT_PERMISSION_MODE, s as JOURNAL_PROJECTED_REF, so as DOMAIN_IDS, tn as DeviationIdInputSchema, to as DEFAULT_INSTALL_MODE, ts as ErrorCode, xt as EVENT_TYPES, zo as GitBranchSchema } from "./dist.js";
4
+ import { $d as eventHash, $n as checkCreate, Ad as isHookedClient, Br as checkHumanEvents, Bs as GITHUB_WORKFLOWS_DIR, Cn as runFix, Cr as COMMIT_STORIES_DIR, Dd as isAntigravityClient, Dn as engineTargetOf, Fc as remoteLocation, Fs as formDigest, Fu as keychainFull, Gr as prepareAppend, Hr as deviceHeads, Ic as repositoryWebUrl, It as parseConflictMarkers, Iu as loadMachineKey, Jr as adoptRotatedKey, Ju as isPresetId, Kd as messageDigest, Kr as prepareEngineEvents, Ku as DEFAULT_PRESET, Mc as forgeOfHost$1, Ms as DECISION_FORM_FIELDS, Od as isCodexClient, Pd as sameProject, Pr as AgentSession, Qd as canonicalBytes, Rr as createUlidFactory, So as resolveProfile, Sr as COMMIT_SKIPS_PATH, Ts as readDefinitions, Ur as journalProduct, Vi as renderCodexHooks, Wr as nextDeviceHead, Ws as isWorkflowFile, X as costsLines, Xr as forgetProductKey, Y as researchLines, Yl as ARCHITECTURE_SECURITY_REVIEW_PATH, Yr as announcedKey, Zn as AGENT_ACTIONS, _d as waiverDeadlineProblem, _o as detectTools, _s as TOOL_CATALOG, ad as byOpening, ao as checkEngine, as as toolNotation, bn as answerProblem, br as COMMIT_HOOK_LINE, bu as isRetiredDeveloper, cd as ACTION_DECISIONS, cr as validateCreateField, da as stackField, dn as JOURNAL_REMOTE_NAME, do as KIMI_FLAVOR, es as inputShapeOf, fn as JournalBackup, fo as kimiCallOf, ft as reviewNotInteractive, gd as statusAt, go as toolsFromDetection, gs as toolName, ha as stackPromptDigest, hd as reviewActions, hs as displayName, is as toolCallOf, jc as forgeCli, jn as maybeAutoUpdate, kd as isCursorClient, kn as installAndPin, lr as recordGitWorkflow, ls as isPersonalLayerFile, mo as kimiSessionOf, nf as ANTIGRAVITY_UNCHECKED_REASON, ns as publishedShape, os as withToolNotation, pd as parseWaiverAnswer, po as kimiCallTool, qd as normalizeChatText, qu as inactiveAgents, rf as creatorText, rs as TOOL_GROUPS, ss as SKILL_OVERRIDES_DIR, ti as sensitiveProductKey, uo as withEngineCommand, vr as CHAINED_HOOK_NAME, wn as withAnswers, xn as displayCommand, xo as readProfile, xr as COMMIT_HOOK_NAME, yd as waiverRefusal, yo as methodNotInstalled, yr as COMMIT_CHECK_PATH, zs as CI_CONFIG_PATHS, zu as STORY_BUILDERS } from "./agent-commands.js";
5
+ import { a as fromBase64url, c as toHex, i as sha256Hex, l as utf8, n as randomBytes, s as toBase64url } from "./hash.js";
5
6
  import { t as parsePresenceAttestation } from "./webauthn-verify.js";
7
+ import { C as METHOD_CONFIG_PATH, y as AgentPluggedError } from "./project-command.js";
6
8
  import { createRequire } from "node:module";
7
9
  import { constants, existsSync, realpathSync, statSync } from "node:fs";
8
10
  import { access, chmod, copyFile, link, lstat, mkdir, open, readFile, readdir, realpath, rename, rm, rmdir, stat, statfs, unlink, utimes, writeFile } from "node:fs/promises";
@@ -17,7 +19,7 @@ import { CLIENT_CAPABILITIES_META_KEY, CLIENT_INFO_META_KEY, McpServer, PROTOCOL
17
19
  import { StdioServerTransport, serveStdio } from "@modelcontextprotocol/server/stdio";
18
20
  import { createInterface } from "node:readline/promises";
19
21
  import { confirm, isCancel, multiselect, select } from "@clack/prompts";
20
- //#region ../../packages/adapters-tools/dist/node-engine-updates.js
22
+ // ../../packages/adapters-tools/dist/node-engine-updates.js
21
23
  const HALF_DAY_MS = 432e5;
22
24
  const REGISTRY_TIMEOUT_MS = 5e3;
23
25
  const INSTALL_TIMEOUT_MS = 3e5;
@@ -440,8 +442,7 @@ var NodeEngineUpdates = class {
440
442
  return (await this.#cache()).auto;
441
443
  }
442
444
  };
443
- //#endregion
444
- //#region ../../packages/core/dist/human/presence.js
445
+ // ../../packages/core/dist/human/presence.js
445
446
  /** An authenticator that is never available (other systems, or `AGENTPLUGGED_PRESENCE=none`). */
446
447
  function unavailablePresence(reason) {
447
448
  const refuse = () => Promise.reject(/* @__PURE__ */ new Error(`presence is unavailable (${reason})`));
@@ -454,8 +455,136 @@ function unavailablePresence(reason) {
454
455
  assert: refuse
455
456
  };
456
457
  }
457
- //#endregion
458
- //#region ../../packages/core/dist/evals/eval-variant.js
458
+ // ../../packages/core/dist/sync/kimi-hooks.js
459
+ /**
460
+ * The hooks of Kimi Code CLI. Kimi declares them only as `[[hooks]]` in the user's own
461
+ * `config.toml` (`~/.kimi-code/config.toml`, or `$KIMI_CODE_HOME/config.toml`); its documentation
462
+ * names no project-level file. `sync` never writes outside the project, so these functions only
463
+ * work on the text of that file: an explicit command (`kimi-hooks`) reads and writes it, and
464
+ * touches nothing but the block between the two markers below.
465
+ *
466
+ * Pure text functions: no file is read or written here.
467
+ */
468
+ /** The marker lines around the block of ours; everything between them is ours, the rest is the creator's. */
469
+ const KIMI_HOOKS_BEGIN = "# agentplugged:begin hooks (managed by `agentplugged kimi-hooks`, do not edit; `kimi-hooks remove` takes them away)";
470
+ const KIMI_HOOKS_END = "# agentplugged:end hooks";
471
+ /**
472
+ * The command Kimi runs before each tool call: the engine's hook for Kimi (`engine` is the words
473
+ * that run the engine, with its version pinned, `npx -y agentplugged@<version>`).
474
+ */
475
+ function kimiHookCommand(engine, entry) {
476
+ const npx = `${engine} hook kimi pre-tool`;
477
+ return entry === void 0 || entry === "" || /["\r\n]/.test(entry) ? npx : `node "${entry}" hook kimi pre-tool || ${npx}`;
478
+ }
479
+ /** The block of ours: one rule, `PreToolUse` on every tool. */
480
+ function kimiHooksBlock(engine, entry) {
481
+ const command = JSON.stringify(kimiHookCommand(engine, entry));
482
+ return [
483
+ KIMI_HOOKS_BEGIN,
484
+ "[[hooks]]",
485
+ "event = \"PreToolUse\"",
486
+ `command = ${command}`,
487
+ `timeout = 30`,
488
+ KIMI_HOOKS_END
489
+ ].join("\n");
490
+ }
491
+ /** Where our block sits in the text (markers included), `null` when absent, `"broken"` when unbalanced. */
492
+ function locate(text) {
493
+ const start = text.indexOf(KIMI_HOOKS_BEGIN);
494
+ const stop = text.indexOf(KIMI_HOOKS_END);
495
+ if (start === -1 && stop === -1) return null;
496
+ if (start === -1 || stop === -1 || stop < start) return "broken";
497
+ if (text.indexOf("# agentplugged:begin hooks (managed by `agentplugged kimi-hooks`, do not edit; `kimi-hooks remove` takes them away)", start + 1) !== -1) return "broken";
498
+ if (text.indexOf("# agentplugged:end hooks", stop + 1) !== -1) return "broken";
499
+ return {
500
+ start,
501
+ end: stop + 24
502
+ };
503
+ }
504
+ /**
505
+ * What the file holds of ours, for the engine `engine` runs: `installed` only when the block is
506
+ * there and runs this very command; a block of another version is `outdated`.
507
+ */
508
+ function kimiHooksState(text, engine, entryExists = () => false) {
509
+ if (text === void 0) return "missing";
510
+ const found = locate(text.replaceAll("\r\n", "\n"));
511
+ if (found === null || found === "broken") return "missing";
512
+ const block = text.replaceAll("\r\n", "\n").slice(found.start, found.end);
513
+ if (block === kimiHooksBlock(engine)) return "installed";
514
+ const path = directEntryOf(block);
515
+ return path !== void 0 && block === kimiHooksBlock(engine, path) && entryExists(path) ? "installed" : "outdated";
516
+ }
517
+ /** The path a block's command starts the engine from directly, when it does. */
518
+ function directEntryOf(block) {
519
+ const line = /^command = (".*")$/m.exec(block)?.[1];
520
+ if (line === void 0) return void 0;
521
+ try {
522
+ const command = JSON.parse(line);
523
+ return typeof command === "string" ? /^node "([^"]+)" hook kimi pre-tool \|\| /.exec(command)?.[1] : void 0;
524
+ } catch {
525
+ return;
526
+ }
527
+ }
528
+ /** A `hooks = …` key at the top level: the array of tables we append cannot coexist with it. */
529
+ const INLINE_HOOKS = /^\s*hooks\s*=/m;
530
+ /**
531
+ * The file with our block installed (added after everything else, or replaced in place when an
532
+ * older one is there). The creator's own text is kept byte for byte, line breaks included.
533
+ */
534
+ function withKimiHooks(text, engine, entry) {
535
+ const block = kimiHooksBlock(engine, entry);
536
+ if (text === void 0 || text.trim() === "") return {
537
+ kind: "changed",
538
+ text: `${block}\n`
539
+ };
540
+ const crlf = text.includes("\r\n");
541
+ const lf = text.replaceAll("\r\n", "\n");
542
+ const found = locate(lf);
543
+ if (found === "broken") return {
544
+ kind: "refused",
545
+ reason: "unbalanced_markers"
546
+ };
547
+ let next;
548
+ if (found === null) {
549
+ if (INLINE_HOOKS.test(lf)) return {
550
+ kind: "refused",
551
+ reason: "inline_hooks"
552
+ };
553
+ next = `${lf}${lf.endsWith("\n") ? "" : "\n"}\n${block}\n`;
554
+ } else {
555
+ if (lf.slice(found.start, found.end) === block) return { kind: "unchanged" };
556
+ next = `${lf.slice(0, found.start)}${block}${lf.slice(found.end)}`;
557
+ }
558
+ return {
559
+ kind: "changed",
560
+ text: crlf ? next.replaceAll("\n", "\r\n") : next
561
+ };
562
+ }
563
+ /**
564
+ * The file without our block (and the blank line we put before it). `text: ""` means nothing else
565
+ * was there. Anything else in the file stays as it is.
566
+ */
567
+ function withoutKimiHooks(text) {
568
+ const crlf = text.includes("\r\n");
569
+ const lf = text.replaceAll("\r\n", "\n");
570
+ const found = locate(lf);
571
+ if (found === "broken") return {
572
+ kind: "refused",
573
+ reason: "unbalanced_markers"
574
+ };
575
+ if (found === null) return { kind: "unchanged" };
576
+ let before = lf.slice(0, found.start);
577
+ let after = lf.slice(found.end);
578
+ if (after.startsWith("\n")) after = after.slice(1);
579
+ if (before.endsWith("\n\n")) before = before.slice(0, -1);
580
+ const next = `${before}${after}`;
581
+ const rest = next.trim() === "" ? "" : next;
582
+ return {
583
+ kind: "changed",
584
+ text: crlf ? rest.replaceAll("\n", "\r\n") : rest
585
+ };
586
+ }
587
+ // ../../packages/core/dist/evals/eval-variant.js
459
588
  /**
460
589
  * The smaller version of a skill that a section is judged against, pure: the same
461
590
  * skill without a section of its body, or without a file of detail. If the two do the same on the
@@ -509,8 +638,7 @@ function withoutPart(files, part) {
509
638
  removed: skill.text.length - text.length
510
639
  };
511
640
  }
512
- //#endregion
513
- //#region ../../packages/adapters-git/dist/atomic-rename.js
641
+ // ../../packages/adapters-git/dist/atomic-rename.js
514
642
  /** The pauses, in milliseconds, before each new try: about a second and a half in all. */
515
643
  const RETRY_DELAYS_MS = [
516
644
  25,
@@ -551,8 +679,7 @@ async function renameWithRetry(from, to, options = {}) {
551
679
  await wait(pause);
552
680
  }
553
681
  }
554
- //#endregion
555
- //#region ../../packages/adapters-git/dist/git-process.js
682
+ // ../../packages/adapters-git/dist/git-process.js
556
683
  /** Variables that would point `git` at another repository, index or object store. */
557
684
  const REPOSITORY_VARIABLES = [
558
685
  "GIT_DIR",
@@ -772,8 +899,7 @@ function treeFiles(output) {
772
899
  }
773
900
  return files;
774
901
  }
775
- //#endregion
776
- //#region ../../packages/adapters-git/dist/git-forge.js
902
+ // ../../packages/adapters-git/dist/git-forge.js
777
903
  /** Longest one Git or forge command may take (a push included). */
778
904
  const CALL_TIMEOUT_MS$2 = 12e4;
779
905
  /**
@@ -1838,8 +1964,7 @@ function createdMergeRequest(text) {
1838
1964
  return;
1839
1965
  }
1840
1966
  }
1841
- //#endregion
1842
- //#region ../../packages/adapters-git/dist/environment-probe.js
1967
+ // ../../packages/adapters-git/dist/environment-probe.js
1843
1968
  /** Longest time a quick question of the machine may take. */
1844
1969
  const QUICK_MS = 15e3;
1845
1970
  /** Longest time a run may take when nobody gives a limit (an installer included). */
@@ -2263,8 +2388,7 @@ var NodeEnvironmentProbe = class {
2263
2388
  }
2264
2389
  }
2265
2390
  };
2266
- //#endregion
2267
- //#region ../../packages/adapters-git/dist/forge-ci-reader.js
2391
+ // ../../packages/adapters-git/dist/forge-ci-reader.js
2268
2392
  /** Longest one call to the forge's tool may take. */
2269
2393
  const CI_TOOL_TIMEOUT_MS = 6e4;
2270
2394
  /** The value of `name` in `env`, whatever its case (Windows names `Path`). */
@@ -2622,8 +2746,7 @@ var ForgeCiReader = class {
2622
2746
  };
2623
2747
  }
2624
2748
  };
2625
- //#endregion
2626
- //#region ../../packages/adapters-git/dist/git-code-source.js
2749
+ // ../../packages/adapters-git/dist/git-code-source.js
2627
2750
  /** Longest each Git command may take: a review does not wait for a huge repository. */
2628
2751
  const TIMEOUT_MS$4 = 2e4;
2629
2752
  /** The text read at most (bytes): beyond, the repository is too big to compare in a review. */
@@ -2692,8 +2815,7 @@ function parseBatch(output, wanted) {
2692
2815
  }
2693
2816
  return files;
2694
2817
  }
2695
- //#endregion
2696
- //#region ../../packages/adapters-git/dist/git-docs-base.js
2818
+ // ../../packages/adapters-git/dist/git-docs-base.js
2697
2819
  /** Longest a Git command of a base read may take before the read fails. */
2698
2820
  const TIMEOUT_MS$3 = 6e4;
2699
2821
  function failure$2(args, run) {
@@ -2888,8 +3010,7 @@ var GitDocsBase = class {
2888
3010
  return held;
2889
3011
  }
2890
3012
  };
2891
- //#endregion
2892
- //#region ../../packages/adapters-git/dist/git-main-branch.js
3013
+ // ../../packages/adapters-git/dist/git-main-branch.js
2893
3014
  /** Longest one Git command of the read may take. */
2894
3015
  const CALL_TIMEOUT_MS$1 = 15e3;
2895
3016
  /** Longest the whole read may take: `sync` then falls back on the working copy. */
@@ -3077,8 +3198,7 @@ var GitMainBranchReader = class {
3077
3198
  };
3078
3199
  }
3079
3200
  };
3080
- //#endregion
3081
- //#region ../../packages/adapters-git/dist/git-merge-probe.js
3201
+ // ../../packages/adapters-git/dist/git-merge-probe.js
3082
3202
  /** Longest a read may take. */
3083
3203
  const TIMEOUT_MS$2 = 6e4;
3084
3204
  /** Most conflicted files and blocks of a file the probe keeps (the engine reads one more). */
@@ -3366,8 +3486,7 @@ async function probeOne(url, options) {
3366
3486
  }
3367
3487
  return classifyAnonymousRead(run, { lenient: forgeOfHost$1(host) === void 0 });
3368
3488
  }
3369
- //#endregion
3370
- //#region ../../packages/adapters-git/dist/journal-lock.js
3489
+ // ../../packages/adapters-git/dist/journal-lock.js
3371
3490
  /** Name of the journal lock, in the common Git folder (`git rev-parse --git-common-dir`). */
3372
3491
  const JOURNAL_LOCK_NAME = "agentplugged-journal.lock";
3373
3492
  const nonce = () => toBase64url(randomBytes(12));
@@ -3478,8 +3597,7 @@ async function acquireJournalLock(path, options = {}) {
3478
3597
  await sleep(1 + Math.floor(Math.random() * 4));
3479
3598
  }
3480
3599
  }
3481
- //#endregion
3482
- //#region ../../packages/adapters-git/dist/git-state-store.js
3600
+ // ../../packages/adapters-git/dist/git-state-store.js
3483
3601
  /** Fixed technical author of every journal commit, whatever the creator's Git identity. */
3484
3602
  const JOURNAL_AUTHOR = "agentplugged <journal@agentplugged.local>";
3485
3603
  /** Cache of each writer's last event, under the working copy (ignored by `.agentplugged/.gitignore`). */
@@ -4783,8 +4901,7 @@ function parseEventFile(path, data) {
4783
4901
  };
4784
4902
  return { event: parsed.data };
4785
4903
  }
4786
- //#endregion
4787
- //#region ../../packages/adapters-git/dist/git-story-diff.js
4904
+ // ../../packages/adapters-git/dist/git-story-diff.js
4788
4905
  /** Longest the diff may take. */
4789
4906
  const TIMEOUT_MS$1 = 6e4;
4790
4907
  /** A ref a free review names: a branch, a tag, a commit, `HEAD~3`; never an option, never a range. */
@@ -4952,8 +5069,7 @@ var GitStoryDiff = class {
4952
5069
  };
4953
5070
  }
4954
5071
  };
4955
- //#endregion
4956
- //#region ../../packages/adapters-git/dist/git-story-workspace.js
5072
+ // ../../packages/adapters-git/dist/git-story-workspace.js
4957
5073
  /** Longest one Git command may take (a worktree's checkout included). */
4958
5074
  const CALL_TIMEOUT_MS = 12e4;
4959
5075
  /** Longest the fetch of a story branch may take: the engine goes on without it. */
@@ -5715,6 +5831,118 @@ var GitStoryWorkspace = class {
5715
5831
  };
5716
5832
  }
5717
5833
  }
5834
+ async commitPaths(request) {
5835
+ const { paths } = request;
5836
+ if (paths.length === 0 || paths.some((path) => path.startsWith("-") || isAbsolute(path))) return {
5837
+ ok: false,
5838
+ reason: "failed",
5839
+ message: "no valid file to commit"
5840
+ };
5841
+ try {
5842
+ const worktrees = await this.#worktrees();
5843
+ const main = worktrees[0]?.path ?? resolve(this.#cwd);
5844
+ const inner = relative(main, resolve(this.#cwd));
5845
+ let folder;
5846
+ if (request.branch === void 0) {
5847
+ if (worktrees[0] === void 0 || inner.startsWith("..") || isAbsolute(inner)) return {
5848
+ ok: false,
5849
+ reason: "not_current",
5850
+ message: "main folder"
5851
+ };
5852
+ folder = this.#cwd;
5853
+ } else {
5854
+ const holder = this.#holder(worktrees, request.branch);
5855
+ if (holder === void 0) return {
5856
+ ok: false,
5857
+ reason: "not_current",
5858
+ message: request.branch
5859
+ };
5860
+ folder = this.#same(holder.path, main) ? this.#cwd : join(holder.path, inner);
5861
+ }
5862
+ const run = (args) => this.#in(folder, ["--literal-pathspecs", ...args]);
5863
+ if (request.branch !== void 0) {
5864
+ const current = await run([
5865
+ "symbolic-ref",
5866
+ "-q",
5867
+ "--short",
5868
+ "HEAD"
5869
+ ]);
5870
+ if (current.status !== 0 || current.stdout.toString("utf8").trim() !== request.branch) return {
5871
+ ok: false,
5872
+ reason: "not_current",
5873
+ message: request.branch
5874
+ };
5875
+ }
5876
+ const head = async () => (await run(["rev-parse", "HEAD"])).stdout.toString("utf8").trim();
5877
+ const listed = await run([
5878
+ "ls-files",
5879
+ "-z",
5880
+ "-m",
5881
+ "-d",
5882
+ "-o",
5883
+ "--exclude-standard",
5884
+ "--",
5885
+ ...paths
5886
+ ]);
5887
+ if (listed.status !== 0) return {
5888
+ ok: false,
5889
+ reason: "failed",
5890
+ message: lastLine(listed.stderr)
5891
+ };
5892
+ const changed = [...new Set(listed.stdout.toString("utf8").split("\0").filter(Boolean))];
5893
+ if (changed.length === 0) return {
5894
+ ok: true,
5895
+ commit: await head()
5896
+ };
5897
+ const identity = await run(["config", "user.name"]);
5898
+ const who = identity.status === 0 && identity.stdout.toString("utf8").trim() !== "" ? [] : [
5899
+ "-c",
5900
+ "user.name=AgentPlugged",
5901
+ "-c",
5902
+ "user.email=noreply@agentplugged.invalid"
5903
+ ];
5904
+ const added = await run([
5905
+ "add",
5906
+ "-A",
5907
+ "--",
5908
+ ...changed
5909
+ ]);
5910
+ const committed = added.status === 0 ? await run([
5911
+ ...who,
5912
+ "commit",
5913
+ "-q",
5914
+ "-m",
5915
+ request.message,
5916
+ "--only",
5917
+ "--",
5918
+ ...changed
5919
+ ]) : added;
5920
+ if (committed.status !== 0) {
5921
+ await run([
5922
+ "reset",
5923
+ "-q",
5924
+ "HEAD",
5925
+ "--",
5926
+ ...changed
5927
+ ]).catch(() => void 0);
5928
+ return {
5929
+ ok: false,
5930
+ reason: "failed",
5931
+ message: lastLine(`${committed.stdout.toString("utf8")}\n${committed.stderr}`)
5932
+ };
5933
+ }
5934
+ return {
5935
+ ok: true,
5936
+ commit: await head()
5937
+ };
5938
+ } catch (error) {
5939
+ return {
5940
+ ok: false,
5941
+ reason: "failed",
5942
+ message: error instanceof Error ? error.message : String(error)
5943
+ };
5944
+ }
5945
+ }
5718
5946
  async readBlob(blob) {
5719
5947
  const run = await this.#git([
5720
5948
  "cat-file",
@@ -5839,8 +6067,7 @@ async function writeHook(path, text) {
5839
6067
  await writeFile(path, text, { mode: 493 });
5840
6068
  await chmod(path, 493);
5841
6069
  }
5842
- //#endregion
5843
- //#region ../../packages/adapters-git/dist/git-test-references.js
6070
+ // ../../packages/adapters-git/dist/git-test-references.js
5844
6071
  /** Longest the search may take before the tests are reported unavailable. */
5845
6072
  const TIMEOUT_MS = 6e4;
5846
6073
  /** Longest text kept of a line: a requirement id sits well within it. */
@@ -5996,8 +6223,7 @@ function parseGrepOutput(output) {
5996
6223
  truncated
5997
6224
  };
5998
6225
  }
5999
- //#endregion
6000
- //#region ../../packages/adapters-git/dist/node-chat-store.js
6226
+ // ../../packages/adapters-git/dist/node-chat-store.js
6001
6227
  /**
6002
6228
  * What the readers of the chat store have in common (`~/.agentplugged/chat/`, written by the
6003
6229
  * hooks): the folder, the file of a session, a date as the hook writes it, and the lines of a file.
@@ -6031,8 +6257,7 @@ function jsonLines(text) {
6031
6257
  }
6032
6258
  return entries;
6033
6259
  }
6034
- //#endregion
6035
- //#region ../../packages/adapters-git/dist/node-chat-log.js
6260
+ // ../../packages/adapters-git/dist/node-chat-log.js
6036
6261
  /**
6037
6262
  * The store of the creator's messages, as the Claude Code hook writes it:
6038
6263
  * `~/.agentplugged/chat/<first 32 hexadecimal characters of the SHA-256 of the session>.jsonl`,
@@ -6130,8 +6355,7 @@ function withoutTwins(entries) {
6130
6355
  }
6131
6356
  return kept.map((entry) => entry.message);
6132
6357
  }
6133
- //#endregion
6134
- //#region ../../packages/adapters-git/dist/node-codex-user-config.js
6358
+ // ../../packages/adapters-git/dist/node-codex-user-config.js
6135
6359
  /**
6136
6360
  * The user's `config.toml` of Codex (`$CODEX_HOME/config.toml`, `~/.codex/config.toml` by default),
6137
6361
  * where Codex records the hooks the creator approved. Read and written only by the question
@@ -6170,8 +6394,7 @@ var NodeCodexUserConfig = class {
6170
6394
  }
6171
6395
  }
6172
6396
  };
6173
- //#endregion
6174
- //#region ../../packages/adapters-git/dist/node-common-memory.js
6397
+ // ../../packages/adapters-git/dist/node-common-memory.js
6175
6398
  /**
6176
6399
  * The common memory of the creator's products: `~/.agentplugged/memory/<C-id>.json`,
6177
6400
  * one encrypted file per promoted lesson, in the user's folder, beside the store of the creator's
@@ -6239,8 +6462,7 @@ var NodeCommonMemory = class {
6239
6462
  }
6240
6463
  }
6241
6464
  };
6242
- //#endregion
6243
- //#region ../../packages/adapters-git/dist/node-decision-log.js
6465
+ // ../../packages/adapters-git/dist/node-decision-log.js
6244
6466
  /**
6245
6467
  * The store of the creator's answers to the AI tool's question tool, as the
6246
6468
  * Claude Code hook writes it: `~/.agentplugged/chat/<first 32 hexadecimal characters of the SHA-256
@@ -6286,8 +6508,7 @@ var NodeDecisionLog = class {
6286
6508
  return records;
6287
6509
  }
6288
6510
  };
6289
- //#endregion
6290
- //#region ../../packages/adapters-git/dist/node-workspace-files.js
6511
+ // ../../packages/adapters-git/dist/node-workspace-files.js
6291
6512
  let tempCounter = 0;
6292
6513
  /** `WorkspaceFiles` on the local disk, confined to one root folder. */
6293
6514
  var NodeWorkspaceFiles = class {
@@ -6456,8 +6677,7 @@ var NodeWorkspaceFiles = class {
6456
6677
  async function isFile$1(path) {
6457
6678
  return (await stat(path).catch(() => void 0))?.isFile() === true;
6458
6679
  }
6459
- //#endregion
6460
- //#region ../../packages/adapters-git/dist/node-folder-reader.js
6680
+ // ../../packages/adapters-git/dist/node-folder-reader.js
6461
6681
  /** A path as it is compared: one separator, no trailing one, no Windows long-path prefix. */
6462
6682
  function keyOf(path) {
6463
6683
  const text = path.replaceAll("\\", "/").replace(/^\/\/\?\//, "").replace(/\/+$/, "");
@@ -6907,8 +7127,7 @@ var PowerShellCredentials = class PowerShellCredentials {
6907
7127
  })).users ?? []).map(decode);
6908
7128
  }
6909
7129
  };
6910
- //#endregion
6911
- //#region ../../packages/adapters-git/dist/node-key-store.js
7130
+ // ../../packages/adapters-git/dist/node-key-store.js
6912
7131
  /**
6913
7132
  * Keychain entries: service `agentplugged`, accounts `machine`, `human`, `human-presence` and
6914
7133
  * `product:<product_id>` (the product keys), and `product:<product_id>:previous:<key_id>`
@@ -7162,8 +7381,7 @@ var NodeKeyStore = class {
7162
7381
  return deleted;
7163
7382
  }
7164
7383
  };
7165
- //#endregion
7166
- //#region ../../packages/adapters-git/dist/node-presence-authenticator.js
7384
+ // ../../packages/adapters-git/dist/node-presence-authenticator.js
7167
7385
  const RP_ID = "agentplugged.local";
7168
7386
  const ORIGIN = `https://${RP_ID}`;
7169
7387
  const COSE_ES256 = -7;
@@ -7460,8 +7678,7 @@ var NodePresenceAuthenticator = class {
7460
7678
  }
7461
7679
  }
7462
7680
  };
7463
- //#endregion
7464
- //#region ../../packages/adapters-git/dist/node-root-pin.js
7681
+ // ../../packages/adapters-git/dist/node-root-pin.js
7465
7682
  /** The pin is there and cannot be used: an error, never "no pin". */
7466
7683
  function unreadable(reason) {
7467
7684
  return new AgentPluggedError(ErrorCode.UNEXPECTED, "error.unexpected", { reason: `the root of trust pinned for this product cannot be read (${reason})` });
@@ -7547,11 +7764,10 @@ async function syncFolder(folder) {
7547
7764
  }
7548
7765
  } catch {}
7549
7766
  }
7550
- //#endregion
7551
- //#region ../../packages/i18n/dist/catalogs/en.js
7767
+ // ../../packages/i18n/dist/catalogs/en.js
7552
7768
  /** English catalog: the reference set of keys, and the fallback language. */
7553
7769
  const en = {
7554
- "cli.usage": "Usage: agentplugged <command> [options]\n\nFrom the chat: ask your agent, typed or dictated, for what only you decide (“pass the CI of story 4-3, the runner is down”):\n it opens a request, you approve it in the chat, and the engine carries it out. The commands below also exist, for whoever prefers the command line; only the strict level requires them.\n\nCommands:\n init Install the method in the current folder\n profile Choose what the method does for this product (or in the chat)\n doctor [--json] [--error <message>] [--exit-code <n>] [--report] Look at your machine (Node, Git, the forge, your AI tools, the keychain…), say what is missing and repair it with your agreement; exit code 1 when a blocking point remains\n sync Generate the files of the AI tools (Claude Code, Codex, Antigravity CLI, Cursor) from the method\n agent Manage your agents and skills (or in the chat):\n agent create <id> create an agent (or a skill with --skill)\n agent edit <id> show the files to edit (creates the customisation file for a shipped agent or skill)\n agent edit <skill> --personal\n your own layer of a shipped skill, ignored by Git\n agent edit <id> --tier <tier> --tool <tool>\n choose the agent's model tier and preferred AI tool\n agent enable <id> activate an agent or a skill\n agent disable <id> deactivate an agent or a skill\n journal sync Bring the remote's journal into this one, then send it the events it lacks (never with force)\n journal status Show the state of the product computed from the journal: events applied, ignored, warnings\n (.agentplugged/.cache/state.json; its computed_at is the date of the last event applied, in projection order)\n docs check Check the documents of .agentplugged/docs, epics and stories: their headers, the stories (contract, coverage of the PRD, dependencies, approved intents), and that no requirement identifier was renumbered, reused or removed since the base (exit code 1 when problems are found, 2 when the check could not run)\n mcp Run the MCP server the agents report through, over stdio: a stable launcher that moves to a newer engine between two calls, without reconnecting (sync declares it in each AI tool)\n update [--check on|off] [--auto on|off] Install the latest engine in its own folder and bring the product to it (what a yes to Noah does; in an interactive terminal only); --check on|off: ask the npm registry whether a version is out, at most twice a day (on by default); --auto on|off: install it without a question (off by default)\n hook antigravity|codex pre-tool|post-tool The hooks of Antigravity CLI's plugin and of Codex's project, run by the tool: the permission rules before a tool, the reads of outside content after it (sync writes them)\n publication <G-id> [--file <path>] [--raw] Show the full text of a deliverable of launch, marketing or sales, the version you were shown (one file with --file; --raw: the file whole, header included)\n publication export <G-id> [--force] [--unverified] Write a deliverable you validated, ready to publish, in .agentplugged/exports/<G-id>/ (nothing is published, sent or paid)\n review [<G-id>] Answer an open checkpoint, signed by your key, or reopen one applied automatically (in an interactive terminal only)\n key presence [--reset] Protect your validations with Windows Hello (--reset: create the credential again when it no longer works)\n key endorse [<human:…>] List the creator keys waiting for an endorsement, or endorse one you trust\n key export [--out <file>] Export the product key, encrypted with a passphrase, for another machine\n key import [--in <file>] Import the product key exported on another machine (typed, not shown, without --in)\n key seal Encrypt the files of the Salle and of the memory still in clear\n trust dismiss Dismiss the event that blocks the orders when the journal holds another root of trust than the one pinned on this machine (nothing to do otherwise)\n (review, key and trust: in an interactive terminal only)\n history Show your validations, most recent first (--story <e-s>, --since <ISO date>, --decision <decision>;\n --all: also the answers the journal ignored, with their reason)\n history --export <file.json|file.csv> [--force] Write them to a file (JSON or CSV, by its extension)\n rules [show] Show the permission rules: what agents do on their own (allow), after asking you (ask) or never (deny), read from the main branch\n rules set <action> <allow|ask|deny> Change one rule; rules reset: back to the defaults (in an interactive terminal only)\n next Show the next step in three lines: the current step, the agent to call and where, and what waits for your validation,\n then a fourth line with the command to run when the step has one\n migrate [--check] Bring .agentplugged/ to the format of this engine and pin it, recorded in the journal (in an interactive terminal only; --check: show what it would do, without writing)\n deferred [list] [<e-s>] [--all] [--json] Show the open deferred work (the items that lock this story; --all: the closed ones too)\n deferred show <D-id> [--json] Show one deferred item\n deferred resolve|drop <D-id> <reason> Mark a deferred item done, or drop it (or in the chat; at the terminal: interactive only)\n story start <e-s> Start a story: its branch feat/<e-s>-<slug>, its working copy next to the repository and the commit hook (for you or an agent)\n story pr <e-s> Deliver a story: push its branch (never the main one) and open or update its pull request with the fixed template, through gh or glab already logged in\n story ci <e-s> [--forge github|gitlab] Read the CI of a story's open pull request (gh or glab); a failed CI sends the story back to development\n story ci <e-s> --waive \"<reason>\" Accept a story whose CI cannot be read, for its branch's current commit (or in the chat; at the terminal: interactive only)\n ci setup [--forge github|gitlab] Write the product's base CI (lint, tests, build, dependency audit), never over an existing CI\n tests setup [--runner <name>] [--e2e <name>|none] Plan the product's test framework from its files and propose, in .agentplugged/proofs.yaml, the command that runs the tests of a criterion (never over a declaration that exists)\n trace [<EF-n>] [--json] Show the traceability: every requirement with its status (to do, in development, in review, delivered, deviation), or one requirement with its stories, tests, pull requests and deviations\n trace resolve <V-id> <reason> Lift a deviation (or in the chat; at the terminal: interactive only)\n usage [--by story|step|skill|agent|session] [--story <e-s>] [--since <day>] [--until <day>] [--session <tool>:<id>] [--json] Show what your AI tools consumed: tokens and the origin of each figure (named by the tool, deduced from the journal, or unknown), the share nothing could attribute, the tools that cannot be measured; no amount of money, only a story's estimate\n eval check [<skill>] Check a skill's behaviour cases (valid, called by the words of its description, pass kept): free, no agent\n eval init <skill> Propose cases to start from, written once, never over a file that exists\n eval run <skill> [--mode quality|baseline|variant|trigger] [--runs <n>] [--record] [--plan] Run the cases with a real agent in a clean folder (it uses tokens: the plan comes first; never part of the tests), note them, count the tokens and compare with the pass kept: a case that no longer passes, or a cost over the threshold, makes it exit with 1\n pair [--no-open] [--nouveau] [--changer-de-compte] Link your web app to this product: shows a link to click, nothing else to do (the bridge does it, once installed)\n device list|revoke <device> List the devices linked to this product, or remove one: it receives nothing more and can be linked again (the bridge does it, once installed)\n bridge install|uninstall|start|status Install the bridge (and update it) as a service of your account, remove it, run it on this machine, or tell its state. The bridge is distributed apart, under the licence of Innovel Studio SASU: this command only installs and launches it\n\nOptions:\n --profile <profile> new-product, maintenance, launch-only or prototype, without questions\n --validation <level> init, profile: how you answer checkpoints, chat (in your AI tool's chat, the default), auto or strict\n --installs <mode> init, profile: how the dependencies are installed, visible (no validation, shown in the activity and written to the journal, the default) or validate (one validation each)\n --points <list> init, profile: the points of validation that wait for you (framing, architecture, breakdown, merge, release, publication, separated by commas; none: no point), the agents decide the others\n --workflow recommended init, profile: keep the recommended Git workflow for everything (a branch per story, the CI on the forge when there is one, merge by pull request, a review before the merge)\n --branches <model> init, profile: the base branches, main (alone), main+dev (stories land on dev, a release moves it into main) or <production>+<integration>\n --story-branches <yes|no> init, profile: a branch per story, or work on the branch the stories land on\n --ci <mode> init, profile: the CI, none, local (your machine) or remote (the forge)\n --merge <mode> init, profile: how a story is merged, pr (a pull request) or direct (by the engine, never pushed)\n --review <yes|no> init, profile: a review before the merge\n --skill agent create: create a skill instead of an agent\n --name, --title, --description, --domain, --phase, --icon, --role <text>\n agent create: answers given without questions (a skill takes only --description)\n --tier <tier> agent edit: model tier, reasoning, code, fast or multimodal; `--tier default` goes back to the agent's own tier\n --tool <tool> agent edit: preferred AI tool, claude-code, codex, antigravity or cursor; `--tool none` removes the preferred tool\n --remote <name> journal sync: the Git remote to use (by default the one the current branch tracks, else origin)\n --recreate-remote journal sync: push the local journal as a new remote branch, after the remote one was deleted on purpose\n --base <ref> docs check: the Git version to compare with (HEAD by default)\n --story <e-s> history, usage: only this story (for example 2-6)\n --since <date> history, usage: from this date on: 2026-10-03 (local midnight), or a date and time with its offset, 2026-10-03T12:00:00Z or 2026-10-03T14:00:00+02:00\n --by <axis> usage: story, step (the default), skill, agent or session\n --until <day> usage: up to this day (YYYY-MM-DD, UTC), with --since\n --session <tool>:<id> usage: also name what made this session dearer (skills loaded twice, files read again, tools failing; Claude Code only)\n --decision <decision> history: approved, approved_with_reservations, rejected, changes_requested, option_chosen, waived or reopened\n --all history: also the answers the journal ignored, with their reason (in the export too)\n --export <file> history: write to a .json file (exact) or a .csv file (for spreadsheets), relative to the current folder\n --force history --export, publication export: replace an existing file\n --file <path> publication: show only this file of the deliverable\n --unverified publication export: also export an approval given in the chat without proof (a tool without the hook)\n --raw publication: the file whole, with the YAML header of the knowledge base\n --error <message> doctor: the message of the command that failed (`--error=<message>` when it starts with a dash; `-`: read from the standard input, piped); the engine says what it sees on your machine, apart from what it only supposes\n --exit-code <n> doctor: the exit code of the command that failed (137, 127…)\n --report doctor: the report to attach to a request for help (system, versions, result of every check), with no user name, personal path, token or product content; it repairs nothing\n --json next, deferred, trace, usage, doctor: the answer in JSON, for scripts (an error too, on standard output, except doctor)\n --yes, -y init: asks nothing, takes the recommended answers (and writes the AI tools' files); with a script, the exit code says whether a blocking point remains\n --tools <list> init: the AI tools to wire in, among claude-code, codex, antigravity and cursor, separated by commas (by default those found, else all)\n --permissions <mode> init, profile: protected (default: your AI tool keeps asking before sensitive gestures) or free (its mode without questions stays possible)\n --channel <store> init: the store the method was found in (claude-plugin), written by the welcome skill of the Claude Code plugin so that `doctor` says how the method was installed\n --no-sync init: does not write the AI tools' files\n --clean-gemini sync: remove only the files AgentPlugged wrote for the retired Gemini CLI, and list the others (with --yes: remove those too)\n --out <file> key export: write the exported key to this new file, outside the repository\n --in <file> key import: read the exported key from this file\n --check migrate: show what it would do, without writing anything\n --forge <forge> ci setup, story ci: github or gitlab (by default, ci.forge of method.yaml, else the forge of the origin remote)\n --runner <name> tests setup: the unit and API runner (vitest, jest, mocha, node-test, pytest, go-test, cargo-test, rspec, phpunit, dotnet-test, maven, gradle)\n --e2e <name> tests setup: the end-to-end runner (playwright, cypress) or none\n --waive <reason> story ci: accept the story without its CI, for its branch's current commit\n --upgrade-engine init: pin the running engine version in `.agentplugged/method.yaml` and refresh the method (not recorded in the journal: for an engine bump alone, prefer `migrate`)\n --engine-any run even when `.agentplugged/method.yaml` pins another engine version (with a warning)\n --version, -v print the version of agentplugged\n --help, -h print this help",
7770
+ "cli.usage": "Usage: agentplugged <command> [options]\n\nFrom the chat: ask your agent, typed or dictated, for what only you decide (“pass the CI of story 4-3, the runner is down”):\n it opens a request, you approve it in the chat, and the engine carries it out. The commands below also exist, for whoever prefers the command line; only the strict level requires them.\n\nCommands:\n init Install the method in the current folder\n profile Choose what the method does for this product (or in the chat)\n doctor [--json] [--error <message>] [--exit-code <n>] [--report] Look at your machine (Node, Git, the forge, your AI tools, the keychain…), say what is missing and repair it with your agreement; exit code 1 when a blocking point remains\n sync Generate the files of the AI tools (Claude Code, Codex, Antigravity CLI, Cursor, Kimi Code CLI) from the method\n agent Manage your agents and skills (or in the chat):\n agent create <id> create an agent (or a skill with --skill)\n agent edit <id> show the files to edit (creates the customisation file for a shipped agent or skill)\n agent edit <skill> --personal\n your own layer of a shipped skill, ignored by Git\n agent edit <id> --tier <tier> --tool <tool>\n choose the agent's model tier and preferred AI tool\n agent enable <id> activate an agent or a skill\n agent disable <id> deactivate an agent or a skill\n journal sync Bring the remote's journal into this one, then send it the events it lacks (never with force)\n journal status Show the state of the product computed from the journal: events applied, ignored, warnings\n (.agentplugged/.cache/state.json; its computed_at is the date of the last event applied, in projection order)\n docs check Check the documents of .agentplugged/docs, epics and stories: their headers, the stories (contract, coverage of the PRD, dependencies, approved intents), and that no requirement identifier was renumbered, reused or removed since the base (exit code 1 when problems are found, 2 when the check could not run)\n mcp Run the MCP server the agents report through, over stdio: a stable launcher that moves to a newer engine between two calls, without reconnecting (sync declares it in each AI tool)\n update [--check on|off] [--auto on|off] Install the latest engine in its own folder and bring the product to it (what a yes to Noah does; in an interactive terminal only); --check on|off: ask the npm registry whether a version is out, at most twice a day (on by default); --auto on|off: install it without a question (off by default)\n hook antigravity|codex pre-tool|post-tool The hooks of Antigravity CLI's plugin and of Codex's project, run by the tool: the permission rules before a tool, the reads of outside content after it (sync writes them)\n kimi-hooks install|remove|status Install, remove or show agentplugged's hook in your own Kimi Code CLI settings (a copy of the file first; sync never writes there)\n publication <G-id> [--file <path>] [--raw] Show the full text of a deliverable of launch, marketing or sales, the version you were shown (one file with --file; --raw: the file whole, header included)\n publication export <G-id> [--force] [--unverified] Write a deliverable you validated, ready to publish, in .agentplugged/exports/<G-id>/ (nothing is published, sent or paid)\n review [<G-id>] Answer an open checkpoint, signed by your key, or reopen one applied automatically (in an interactive terminal only)\n key presence [--reset] Protect your validations with Windows Hello (--reset: create the credential again when it no longer works)\n key endorse [<human:…>] List the creator keys waiting for an endorsement, or endorse one you trust\n key export [--out <file>] Export the product key, encrypted with a passphrase, for another machine\n key import [--in <file>] Import the product key exported on another machine (typed, not shown, without --in)\n key seal Encrypt the files of the Salle and of the memory still in clear\n trust dismiss Dismiss the event that blocks the orders when the journal holds another root of trust than the one pinned on this machine (nothing to do otherwise)\n (review, key and trust: in an interactive terminal only)\n history Show your validations, most recent first (--story <e-s>, --since <ISO date>, --decision <decision>;\n --all: also the answers the journal ignored, with their reason)\n history --export <file.json|file.csv> [--force] Write them to a file (JSON or CSV, by its extension)\n rules [show] Show the permission rules: what agents do on their own (allow), after asking you (ask) or never (deny), read from the main branch\n rules set <action> <allow|ask|deny> Change one rule; rules reset: back to the defaults (in an interactive terminal only)\n next Show the next step in three lines: the current step, the agent to call and where, and what waits for your validation,\n then a fourth line with the command to run when the step has one\n migrate [--check] Bring .agentplugged/ to the format of this engine and pin it, recorded in the journal (in an interactive terminal only; --check: show what it would do, without writing)\n deferred [list] [<e-s>] [--all] [--json] Show the open deferred work (the items that lock this story; --all: the closed ones too)\n deferred show <D-id> [--json] Show one deferred item\n deferred resolve|drop <D-id> <reason> Mark a deferred item done, or drop it (or in the chat; at the terminal: interactive only)\n story start <e-s> Start a story: its branch feat/<e-s>-<slug>, its working copy next to the repository and the commit hook (for you or an agent)\n story pr <e-s> Deliver a story: push its branch (never the main one) and open or update its pull request with the fixed template, through gh or glab already logged in\n story ci <e-s> [--forge github|gitlab] Read the CI of a story's open pull request (gh or glab); a failed CI sends the story back to development\n story ci <e-s> --waive \"<reason>\" Accept a story whose CI cannot be read, for its branch's current commit (or in the chat; at the terminal: interactive only)\n ci setup [--forge github|gitlab] Write the product's base CI (lint, tests, build, dependency audit), never over an existing CI\n tests setup [--runner <name>] [--e2e <name>|none] Plan the product's test framework from its files and propose, in .agentplugged/proofs.yaml, the command that runs the tests of a criterion (never over a declaration that exists)\n trace [<EF-n>] [--json] Show the traceability: every requirement with its status (to do, in development, in review, delivered, deviation), or one requirement with its stories, tests, pull requests and deviations\n trace resolve <V-id> <reason> Lift a deviation (or in the chat; at the terminal: interactive only)\n usage [--by story|step|skill|agent|session] [--story <e-s>] [--since <day>] [--until <day>] [--session <tool>:<id>] [--json] Show what your AI tools consumed: tokens and the origin of each figure (named by the tool, deduced from the journal, or unknown), the share nothing could attribute, the tools that cannot be measured; no amount of money, only a story's estimate\n eval check [<skill>] Check a skill's behaviour cases (valid, called by the words of its description, pass kept): free, no agent\n eval init <skill> Propose cases to start from, written once, never over a file that exists\n eval run <skill> [--mode quality|baseline|variant|trigger] [--runs <n>] [--record] [--plan] Run the cases with a real agent in a clean folder (it uses tokens: the plan comes first; never part of the tests), note them, count the tokens and compare with the pass kept: a case that no longer passes, or a cost over the threshold, makes it exit with 1\n pair [--no-open] [--nouveau] [--changer-de-compte] Link your web app to this product: shows a link to click, nothing else to do (the bridge does it, once installed)\n device list|revoke <device> List the devices linked to this product, or remove one: it receives nothing more and can be linked again (the bridge does it, once installed)\n bridge install|uninstall|start|status Install the bridge (and update it) as a service of your account, remove it, run it on this machine, or tell its state. The bridge is distributed apart, under the licence of Innovel Studio SASU: this command only installs and launches it\n\nOptions:\n --profile <profile> new-product, maintenance, launch-only or prototype, without questions\n --validation <level> init, profile: how you answer checkpoints, chat (in your AI tool's chat, the default), auto or strict\n --installs <mode> init, profile: how the dependencies are installed, visible (no validation, shown in the activity and written to the journal, the default) or validate (one validation each)\n --points <list> init, profile: the points of validation that wait for you (framing, architecture, breakdown, merge, release, publication, separated by commas; none: no point), the agents decide the others\n --workflow recommended init, profile: keep the recommended Git workflow for everything (a branch per story, the CI on the forge when there is one, merge by pull request, a review before the merge)\n --branches <model> init, profile: the base branches, main (alone), main+dev (stories land on dev, a release moves it into main) or <production>+<integration>\n --story-branches <yes|no> init, profile: a branch per story, or work on the branch the stories land on\n --ci <mode> init, profile: the CI, none, local (your machine) or remote (the forge)\n --merge <mode> init, profile: how a story is merged, pr (a pull request) or direct (by the engine, never pushed)\n --review <yes|no> init, profile: a review before the merge\n --skill agent create: create a skill instead of an agent\n --name, --title, --description, --domain, --phase, --icon, --role <text>\n agent create: answers given without questions (a skill takes only --description)\n --tier <tier> agent edit: model tier, reasoning, code, fast or multimodal; `--tier default` goes back to the agent's own tier\n --tool <tool> agent edit: preferred AI tool, claude-code, codex, antigravity, cursor or kimi; `--tool none` removes the preferred tool\n --remote <name> journal sync: the Git remote to use (by default the one the current branch tracks, else origin)\n --recreate-remote journal sync: push the local journal as a new remote branch, after the remote one was deleted on purpose\n --base <ref> docs check: the Git version to compare with (HEAD by default)\n --story <e-s> history, usage: only this story (for example 2-6)\n --since <date> history, usage: from this date on: 2026-10-03 (local midnight), or a date and time with its offset, 2026-10-03T12:00:00Z or 2026-10-03T14:00:00+02:00\n --by <axis> usage: story, step (the default), skill, agent or session\n --until <day> usage: up to this day (YYYY-MM-DD, UTC), with --since\n --session <tool>:<id> usage: also name what made this session dearer (skills loaded twice, files read again, tools failing; Claude Code only)\n --decision <decision> history: approved, approved_with_reservations, rejected, changes_requested, option_chosen, waived or reopened\n --all history: also the answers the journal ignored, with their reason (in the export too)\n --export <file> history: write to a .json file (exact) or a .csv file (for spreadsheets), relative to the current folder\n --force history --export, publication export: replace an existing file\n --file <path> publication: show only this file of the deliverable\n --unverified publication export: also export an approval given in the chat without proof (a tool without the hook)\n --raw publication: the file whole, with the YAML header of the knowledge base\n --error <message> doctor: the message of the command that failed (`--error=<message>` when it starts with a dash; `-`: read from the standard input, piped); the engine says what it sees on your machine, apart from what it only supposes\n --exit-code <n> doctor: the exit code of the command that failed (137, 127…)\n --report doctor: the report to attach to a request for help (system, versions, result of every check), with no user name, personal path, token or product content; it repairs nothing\n --json next, deferred, trace, usage, doctor: the answer in JSON, for scripts (an error too, on standard output, except doctor)\n --yes, -y init: asks nothing, takes the recommended answers (and writes the AI tools' files); with a script, the exit code says whether a blocking point remains\n --tools <list> init: the AI tools to wire in, among claude-code, codex, antigravity, cursor and kimi, separated by commas (by default those found, else all)\n --permissions <mode> init, profile: protected (default: your AI tool keeps asking before sensitive gestures) or free (its mode without questions stays possible)\n --channel <store> init: the store the method was found in (claude-plugin), written by the welcome skill of the Claude Code plugin so that `doctor` says how the method was installed\n --no-sync init: does not write the AI tools' files\n --clean-gemini sync: remove only the files AgentPlugged wrote for the retired Gemini CLI, and list the others (with --yes: remove those too)\n --out <file> key export: write the exported key to this new file, outside the repository\n --in <file> key import: read the exported key from this file\n --check migrate: show what it would do, without writing anything\n --forge <forge> ci setup, story ci: github or gitlab (by default, ci.forge of method.yaml, else the forge of the origin remote)\n --runner <name> tests setup: the unit and API runner (vitest, jest, mocha, node-test, pytest, go-test, cargo-test, rspec, phpunit, dotnet-test, maven, gradle)\n --e2e <name> tests setup: the end-to-end runner (playwright, cypress) or none\n --waive <reason> story ci: accept the story without its CI, for its branch's current commit\n --upgrade-engine init: pin the running engine version in `.agentplugged/method.yaml` and refresh the method (not recorded in the journal: for an engine bump alone, prefer `migrate`)\n --engine-any run even when `.agentplugged/method.yaml` pins another engine version (with a warning)\n --version, -v print the version of agentplugged\n --help, -h print this help",
7555
7771
  "cli.error": "Error {code}: {message}",
7556
7772
  "init.summary.title": "Method installed in {root}",
7557
7773
  "init.action.created": "created",
@@ -7581,6 +7797,20 @@ const en = {
7581
7797
  "sync.codex_trust.refused": "I wrote nothing in {file}: its content has a form I cannot merge safely. Approve the hooks in Codex ('Review hooks' icon or `/hooks`).",
7582
7798
  "sync.codex_trust.failed": "I could not write {file} ({reason}). Approve the hooks in Codex ('Review hooks' icon or `/hooks`).",
7583
7799
  "sync.cursor_hooks": "Cursor runs the hooks of `.cursor/hooks.json` only in a workspace you trust: accept \"Trust\" when Cursor asks. If your messages are still not recorded, open Cursor's Hooks settings tab (or its Hooks output channel) to see why, and restart Cursor once.",
7800
+ "sync.kimi_hooks": "Kimi Code CLI keeps its hooks in your own settings, which sync never writes. To give Kimi the product's guards (the permission rules, the team's pause, the reads of outside content), run once: `npx agentplugged kimi-hooks install` (it copies `{path}` first, adds only its own marked block and never touches your entries; `kimi-hooks remove` takes it away).",
7801
+ "kimi_hooks.usage": "Usage: agentplugged kimi-hooks install|remove|status",
7802
+ "kimi_hooks.installed": "Kimi's hooks are installed in {path}. Copy of the file before the change: {backup}.",
7803
+ "kimi_hooks.removed": "Kimi's hooks are removed from {path}; your own entries are untouched. Copy of the file before the change: {backup}.",
7804
+ "kimi_hooks.already": "Kimi's hooks are already installed in {path}: nothing changed.",
7805
+ "kimi_hooks.nothing_to_remove": "{path} holds no hook of agentplugged: nothing changed.",
7806
+ "kimi_hooks.no_backup": "none (the file did not exist)",
7807
+ "kimi_hooks.status.installed": "Kimi's hooks are installed in {path}.",
7808
+ "kimi_hooks.status.outdated": "Kimi's hooks in {path} are those of another version of the engine, or name an engine file that is gone (the hook still works through npx, slower): run `npx agentplugged kimi-hooks install` to bring them up to date.",
7809
+ "kimi_hooks.status.missing": "Kimi's hooks are not installed in {path}: run `npx agentplugged kimi-hooks install`.",
7810
+ "kimi_hooks.refused.unbalanced_markers": "{path} holds the marker lines of agentplugged's block in a way that cannot be told apart (one missing, doubled or in the wrong order): nothing was written. Fix the marker lines by hand, then run the command again.",
7811
+ "kimi_hooks.refused.inline_hooks": "{path} declares its hooks as a `hooks = [...]` value, which cannot sit beside the `[[hooks]]` entries Kimi expects: nothing was written. Turn your hooks into `[[hooks]]` entries, then run the command again.",
7812
+ "kimi_hooks.unreadable": "{path} cannot be read ({reason}): nothing was written.",
7813
+ "kimi_hooks.unwritable": "{path} could not be written ({reason}).",
7584
7814
  "sync.action.created": "created",
7585
7815
  "sync.action.updated": "updated",
7586
7816
  "sync.action.unchanged": "left as is",
@@ -7764,6 +7994,8 @@ const en = {
7764
7994
  "error.not_a_git_repo": "{path} is not in a Git repository: the journal lives on its agentplugged/journal branch. Run `git init` first. Nothing was written.",
7765
7995
  "init.product_id_added": "product_id added to {path}: this product is now identified by {product_id} in its journal.",
7766
7996
  "error.checkpoint_open": "Checkpoint {checkpoint} is open and blocks {action}: nothing was written. Only the creator answers it; work on something else meanwhile, and never work around this refusal.",
7997
+ "error.decision_not_open.untriaged": "{untriaged} finding(s) of story {story}'s review are not sorted and no checkpoint of the story is open: the creator would never see that the story waits. Sort each finding (review.triage), or open the decision for the creator (checkpoint.open, a `decision` with its options), or end `blocked`; then end your run. Nothing was written.",
7998
+ "error.decision_not_open.waiting": "Your result asks the creator open questions but no checkpoint is open for them: they would never see the question. Open the decision (checkpoint.open, a `decision` with its options), or end `blocked`, which opens it for you. Nothing was written.",
7767
7999
  "checkpoint.type.document": "document",
7768
8000
  "checkpoint.type.decision": "decision",
7769
8001
  "checkpoint.type.story": "story",
@@ -8282,6 +8514,7 @@ const en = {
8282
8514
  "error.story_section_invalid.empty": "The section « {heading} » of this story is empty.",
8283
8515
  "error.story_section_invalid.duplicate": "The section « {heading} » appears twice in this story: keep one.",
8284
8516
  "error.story_dependency_forward": "Story {story} depends on {dependency}, which comes later: reorder or split the stories so that each one depends only on earlier ones.",
8517
+ "error.story_sheet_too_long": "The sheet of story {story} has {lines} lines, over {max}: the story is too big. Cut it into smaller stories.",
8285
8518
  "error.story_dependency_cycle": "These stories depend on each other in a loop: {cycle}. Break the loop.",
8286
8519
  "error.story_intent_changed.changed": "The intent of story {story} differs from the one you approved ({checkpoint}). It is yours, no agent changes it: put the approved text back, or approve the new one through a `document` checkpoint on this story.",
8287
8520
  "error.story_intent_changed.removed": "Story {story}, whose intent you approved ({checkpoint}), is gone. Put it back.",
@@ -8294,6 +8527,8 @@ const en = {
8294
8527
  "docs.check.warning.blob_missing": "the version of {path} approved in {checkpoint} is not in this repository (blob {blob}, a shallow or partial clone, or a branch not fetched): not verified.",
8295
8528
  "docs.check.warning.not_on_branch": "story {story}, approved in {checkpoint}, is not on this branch: not verified here.",
8296
8529
  "docs.check.warning.history_unreadable": "story {story}, approved in {checkpoint}, is missing, and the history of this branch could not be read: not verified.",
8530
+ "docs.check.warning.sheet_stale": "the sheet of story {story} quotes passages that changed since: {excerpts}. Write it again with `{command}`; an approved story is then validated again.",
8531
+ "docs.check.warning.sheet_legacy": "{count} stories have no excerpts yet (former format, they still work): {stories}. `{command}` turns them into sheets, if you want.",
8297
8532
  "docs.check.warning.intent_unverified": "the intent of story {story} differs from the one approved in {older}, and the later approval {checkpoint} cannot be read: not verified.",
8298
8533
  "review.card.intents": "Intents you freeze by approving:",
8299
8534
  "review.card.intent.new": "{story} (new)",
@@ -8474,6 +8709,7 @@ const en = {
8474
8709
  "error.deviation_not_reportable.not_linked": "Story {story} does not cite {requirement} in its requirements: report a deviation only from a requirement the story cites. Nothing was written.",
8475
8710
  "error.deviation_not_reportable.not_started": "Story {story} has not started: compare its work once it is under way. Nothing was written.",
8476
8711
  "error.deviation_not_reportable.done": "Story {story} is done: nothing was written.",
8712
+ "error.deviation_not_reportable.own_story": "You build story {story}: a drift in your own work is fixed on its branch, and a gap between the story and the requirements is a decision for the creator (checkpoint.open). Nothing was written.",
8477
8713
  "error.deviation_not_found": "No deviation {deviation}: nothing was written. See `npx agentplugged trace`.",
8478
8714
  "error.deviation_not_open": "Deviation {deviation} is already resolved: nothing was written.",
8479
8715
  "error.deviation_not_allowed": "{agent} cannot lift deviation {deviation}: only the agent that reported it ({reported_by}) can, once the fix is verified; the creator lifts any, in the chat (guard.creator_action). Nothing was written.",
@@ -8720,6 +8956,10 @@ const en = {
8720
8956
  "next.merge_feedback.changes_requested": "You asked for changes on the merge ({checkpoint}): nothing was merged.",
8721
8957
  "next.merge_feedback.rejected": "You refused the merge ({checkpoint}): nothing was merged.",
8722
8958
  "next.merge_feedback.note": "Your note: {note}",
8959
+ "next.failure.base_dirty": "The merge of checkpoint {id} was refused: the branch it merges into has changes not committed. Look at its status, commit those changes (or restore them), then run the merge again; do not ask for the same answer while the branch is dirty.",
8960
+ "next.failure.other": "The last answer to checkpoint {id} could not be carried out ({code}, {reason}).",
8961
+ "next.refused": "The engine refused {action} ({code}) {times} time(s) for the same cause. {gesture}",
8962
+ "next.change_method": "The same failure came twice ({cause}: {what}): do not try it a third time the same way; have the cause investigated or put the block to the creator in one question.",
8723
8963
  "review.merged": "Story {story} merged by the engine: pull request #{pr} ({url}), commit {commit}.",
8724
8964
  "review.merged.already": "The forge had already merged story {story}: merge recorded (pull request #{pr}, {url}).",
8725
8965
  "review.merged.worktree.removed": "The story's worktree was removed.",
@@ -8821,12 +9061,16 @@ const en = {
8821
9061
  "next.merge_conflict.decided": "You chose \"{option}\" for the conflict of substance ({checkpoint}): the developer applies it on the story's branch, then the story goes through CI and review again.",
8822
9062
  "next.merge_conflict.refused": "You refused every option of the conflict ({checkpoint}): the developer asks again.",
8823
9063
  "next.merge_queue": "Merges, in order: {queue}.",
9064
+ "next.reading": "Passages of the documents to read, never a whole document: {ids}. To read more: {command}.",
9065
+ "next.stale_sheets": "Sheets to write again (a cited passage changed): {stories}.",
8824
9066
  "next.late_pages": "Pages of the knowledge base behind the code, to read with care: {pages}.",
8825
9067
  "next.background": "In the background, without holding anyone: {agent} updates the pages of the knowledge base that are behind ({pages}).",
8826
9068
  "merge.unverified.diverged": "a merge of the main branch holds changes of its own, beyond what Git merges by itself",
8827
9069
  "merge.unverified.foreign": "the branch took in a commit that is not on the main branch",
8828
9070
  "next.step.positioning": "Write the positioning",
8829
9071
  "next.step.release_notes": "Write the release notes and update the user guides",
9072
+ "next.step.acceptance": "Acceptance run before the release: replay the real journeys",
9073
+ "next.step.after_launch": "A week after the launch: measures, short look back, feedback as tickets",
8830
9074
  "error.launch_document_invalid.section_missing": "The section « {heading} » of the positioning is missing (a level 2 heading, in English or in French).",
8831
9075
  "error.launch_document_invalid.section_empty": "The section « {heading} » of the positioning is empty.",
8832
9076
  "error.launch_document_invalid.section_duplicate": "The section « {heading} » appears twice in the positioning: keep one.",
@@ -9189,6 +9433,8 @@ const en = {
9189
9433
  "journey.step.knowledge_base": "the knowledge base",
9190
9434
  "journey.step.positioning": "the positioning",
9191
9435
  "journey.step.retrospective": "the retrospective",
9436
+ "journey.step.acceptance": "the acceptance run",
9437
+ "journey.step.after_launch": "the look back after a launch",
9192
9438
  "journey.step.ci_setup": "the setting up of the CI",
9193
9439
  "journey.step.docs_check": "the check of the documents",
9194
9440
  "journey.step.story_contract": "the story's contract",
@@ -9449,12 +9695,72 @@ const en = {
9449
9695
  "eval.run.blocked": "Blocked: a regression, or a case that does not pass.",
9450
9696
  "eval.run.ok": "No regression."
9451
9697
  };
9452
- //#endregion
9453
- //#region ../../packages/i18n/dist/catalogs/fallback-reasons.js
9698
+ // ../../packages/i18n/dist/catalogs/run-fallback-reasons.js
9699
+ /**
9700
+ * French texts of the fallbacks of Noah's run started by the bridge (the matrix of
9701
+ * `run-compatibility` in core): the cause in plain words, and under `.action` the one gesture the
9702
+ * creator can make. The English texts are the ones written in core.
9703
+ */
9704
+ const VALIDATION_FR = "cet outil nomme lui-même ses sessions : la session d'une nouvelle conversation n'est connue qu'une fois le lancement fait, après que ton message a été remis à Noah, donc le moteur ne peut pas encore relier à ce message une validation dite avec des mots.";
9705
+ const VALIDATION_ACTION_FR = "Valide le point avec le bouton de validation de la vue web ou du téléphone (un seul geste) : la décision est enregistrée et Noah est prévenu. À partir de son deuxième message d'une conversation, il peut l'enregistrer lui-même.";
9706
+ const OWN_REFUSALS_FR = "cet outil donne aux agents qu'il lance les mêmes outils MCP qu'à la session qui les lance : les outils que Noah n'a pas à son contrat (`guard`, `checkpoint`, `story`, `review`, `plan`, `measure`, `memory`) ne peuvent pas être retirés à sa seule session. Seuls son rôle, la consigne et les contrôles du moteur le tiennent à son contrat.";
9707
+ const OWN_REFUSALS_ACTION_FR = "Rien à faire pour un usage courant ; pour la garantie la plus forte, choisis Claude Code pour Noah : `npx agentplugged agent edit noah --tool claude-code`.";
9708
+ const READ_FLOOR_FR = "le pont ne peut passer le plancher des fichiers qu'un agent ne lit jamais (clés, `.env` et fichiers secrets) que sur la ligne de commande de Claude Code. Pour cet outil il s'appuie sur les règles et les hooks que `sync` a écrits dans le projet, que l'outil n'applique que dans un dossier auquel il fait confiance, et le pont ne peut pas non plus restreindre les serveurs MCP du projet que l'outil démarre.";
9709
+ const READ_FLOOR_ACTION_FR = "Lance `npx agentplugged sync` et approuve le projet une fois dans l'outil ; pour la garantie la plus forte, choisis Claude Code pour Noah : `npx agentplugged agent edit noah --tool claude-code`.";
9710
+ const NO_COST_ACTION_FR = "Rien à faire : le travail continue. Lis la consommation sur la page d'usage de l'outil ; le moteur ne l'estime jamais.";
9711
+ const CHOOSE_ANTIGRAVITY_FR = "Choisis Antigravity CLI pour Noah dans ce produit : `npx agentplugged agent edit noah --tool antigravity` (Claude Code accepte aussi un message pendant qu'il travaille).";
9712
+ const KEPT_FR = "un message écrit pendant ce temps est gardé (« Noah est occupé, ta demande est gardée ») et remis à Noah en un seul message quand sa réponse se termine.";
9713
+ const RUN_FALLBACK_REASONS_FR = {
9714
+ "run.codex.live_messages": `\`codex exec\` lit sa consigne une seule fois et n'a pas d'entrée qui reste ouverte pendant qu'il travaille, et il attend ses sous-agents avant de répondre : ${KEPT_FR}`,
9715
+ "run.codex.live_messages.action": CHOOSE_ANTIGRAVITY_FR,
9716
+ "run.codex.validation_by_chat": VALIDATION_FR,
9717
+ "run.codex.validation_by_chat.action": VALIDATION_ACTION_FR,
9718
+ "run.codex.own_refusals": OWN_REFUSALS_FR,
9719
+ "run.codex.own_refusals.action": OWN_REFUSALS_ACTION_FR,
9720
+ "run.codex.read_floor": READ_FLOOR_FR,
9721
+ "run.codex.read_floor.action": READ_FLOOR_ACTION_FR,
9722
+ "run.codex.cost": "Codex rapporte les jetons à la fin d'un tour et aucun coût en argent (c'est l'abonnement du compte qui le facture).",
9723
+ "run.codex.cost.action": NO_COST_ACTION_FR,
9724
+ "run.antigravity.validation_by_chat": VALIDATION_FR,
9725
+ "run.antigravity.validation_by_chat.action": VALIDATION_ACTION_FR,
9726
+ "run.antigravity.own_refusals": OWN_REFUSALS_FR,
9727
+ "run.antigravity.own_refusals.action": OWN_REFUSALS_ACTION_FR,
9728
+ "run.antigravity.read_floor": READ_FLOOR_FR,
9729
+ "run.antigravity.read_floor.action": READ_FLOOR_ACTION_FR,
9730
+ "run.antigravity.cost": "Antigravity CLI rapporte les jetons et aucun coût en argent.",
9731
+ "run.antigravity.cost.action": NO_COST_ACTION_FR,
9732
+ "run.cursor.sub_agents": "la documentation de Cursor ne dit pas que les sous-agents marchent dans son mode non interactif, et ce mode ne peut écrire qu'avec `--force`, qui autorise toute commande non explicitement refusée : le pont ne le passe jamais. Noah tourne donc en lecture seule : il lit l'état, répond, enregistre la passation avec `agent.delegate`, et te dit quel agent prend la main et que l'étape continue dans le chat de l'outil (mode `conversation`).",
9733
+ "run.cursor.sub_agents.action": "Choisis Claude Code pour Noah dans ce produit : `npx agentplugged agent edit noah --tool claude-code`.",
9734
+ "run.cursor.live_messages": `le mode non interactif de Cursor n'a pas d'entrée qui reste ouverte pendant qu'il travaille : ${KEPT_FR}`,
9735
+ "run.cursor.live_messages.action": CHOOSE_ANTIGRAVITY_FR,
9736
+ "run.cursor.validation_by_chat": VALIDATION_FR,
9737
+ "run.cursor.validation_by_chat.action": VALIDATION_ACTION_FR,
9738
+ "run.cursor.own_refusals": OWN_REFUSALS_FR,
9739
+ "run.cursor.own_refusals.action": OWN_REFUSALS_ACTION_FR,
9740
+ "run.cursor.read_floor": READ_FLOOR_FR,
9741
+ "run.cursor.read_floor.action": READ_FLOOR_ACTION_FR,
9742
+ "run.cursor.usage": "Cursor ne rapporte ni jeton ni coût dans sa sortie et n'en garde aucun sur la machine : le moteur ne mesure rien d'un lancement et ne l'estime jamais.",
9743
+ "run.cursor.usage.action": NO_COST_ACTION_FR,
9744
+ "run.cursor.cost": "Cursor ne rapporte aucun coût en argent.",
9745
+ "run.cursor.cost.action": NO_COST_ACTION_FR,
9746
+ "run.kimi.live_messages": `Kimi Code CLI prend sa consigne en argument et n'a pas d'entrée qui reste ouverte pendant qu'il travaille : ${KEPT_FR}`,
9747
+ "run.kimi.live_messages.action": CHOOSE_ANTIGRAVITY_FR,
9748
+ "run.kimi.validation_by_chat": "Kimi Code CLI ne donne l'identifiant d'une nouvelle session qu'à la fin d'un tour réussi : le moteur ne peut donc pas relier à ce message une validation dite avec des mots, dans le premier message d'une conversation (ni dans une conversation dont le premier lancement a été coupé).",
9749
+ "run.kimi.validation_by_chat.action": VALIDATION_ACTION_FR,
9750
+ "run.kimi.read_floor": "le mode non interactif de Kimi Code CLI approuve tous les appels d'outils et sa ligne de commande ne prend aucune règle : le plancher des fichiers jamais lus (clés, `.env` et fichiers secrets) ne lui est pas passé. La session de Noah est tenue aux outils de lecture et au serveur MCP du moteur (jamais le shell), mais les agents qu'il lance travaillent sous leur propre définition, shell compris, et les garde-fous du produit ne les atteignent que par le hook des réglages Kimi du créateur. Le pont fait aussi confiance au dossier du produit pour ce lancement seulement : tous les serveurs MCP du projet démarrent.",
9751
+ "run.kimi.read_floor.action": "Installe les garde-fous une fois, toi-même : `npx agentplugged kimi-hooks install` ; pour la garantie la plus forte, choisis Claude Code pour Noah : `npx agentplugged agent edit noah --tool claude-code`.",
9752
+ "run.kimi.usage": "Kimi Code CLI n'écrit ni jeton ni coût dans sa sortie, et le format des sessions qu'il garde sur la machine n'est pas documenté : le moteur ne mesure rien d'un lancement et ne l'estime jamais.",
9753
+ "run.kimi.usage.action": NO_COST_ACTION_FR,
9754
+ "run.kimi.cost": "Kimi Code CLI ne rapporte aucun coût en argent.",
9755
+ "run.kimi.cost.action": NO_COST_ACTION_FR
9756
+ };
9757
+ // ../../packages/i18n/dist/catalogs/fallback-reasons.js
9454
9758
  /** The hooks of Codex's project are not declared: the creator's `.codex/config.toml` is kept. */
9455
9759
  const CODEX_HOOKS_KEPT_FR = "sync n'a pas pu écrire `.codex/config.toml` (le fichier est à toi) : les hooks du projet d'agentplugged (la preuve du chat, la trace des lectures extérieures, les installations) ne sont pas déclarés pour Codex. Ajoute-les toi-même à partir de `.codex/hooks/agentplugged-codex.mjs` (événements `UserPromptSubmit`, `PreToolUse`, `PostToolUse`), ou retire ton fichier et relance `npx agentplugged sync`.";
9456
9760
  /** The hooks of Cursor's project are not declared: the creator's `.cursor/hooks.json` is kept. */
9457
9761
  const CURSOR_HOOKS_KEPT_FR = "sync n'a pas pu écrire `.cursor/hooks.json` (le fichier est à toi) : les hooks du projet d'agentplugged (les règles de permission, la preuve du chat, la trace des lectures extérieures, les installations) ne sont pas déclarés pour Cursor, et le script et la politique du moteur n'ont pas été écrits. Les secrets restent hors de portée de l'agent par `.cursorignore` (et, dans la CLI, par `.cursor/cli.json`), le reste suit la constitution sans garde technique. Déplace ton fichier et relance `npx agentplugged sync`, puis refusionne tes propres hooks dans le fichier généré.";
9762
+ /** Kimi Code CLI has hooks, but only in the user's own settings file: the part every reason shares. */
9763
+ const KIMI_HOOKS_FR = "Kimi Code CLI a des hooks (`PreToolUse`, `UserPromptSubmit`, `PostToolUse`…), mais ne les déclare que dans les `[[hooks]]` du `~/.kimi-code/config.toml` de l'utilisateur ; sa documentation ne nomme aucun fichier de hooks de projet, et `sync` n'écrit jamais en dehors du projet. Lance une fois `npx agentplugged kimi-hooks install` (un seul geste : il sauvegarde d'abord ce fichier, n'ajoute que son propre bloc balisé et ne touche jamais à tes entrées ; `kimi-hooks remove` l'enlève) pour y installer le hook du produit.";
9458
9764
  /** The "model" fallback, the same for every tool. */
9459
9765
  const MODEL_INHERIT_FR = "la table des modèles (`.agentplugged/models.yaml`, ou `models` dans `method.yaml`) donne `inherit` pour au moins un niveau de modèle : les agents de ce niveau utilisent le modèle de la session.";
9460
9766
  /**
@@ -9479,6 +9785,18 @@ const FALLBACK_REASONS = { fr: {
9479
9785
  "cursor.installs.hooks-kept": CURSOR_HOOKS_KEPT_FR,
9480
9786
  "cursor.decisions": "Cursor range les formulaires qu'un serveur MCP demande (« elicitation ») parmi ce qu'il sait faire, mais des rapports de son propre forum (Windows 11, Cursor 3.10.20, le 2026-07-07, encore vus sur 3.17.8) montrent le formulaire non affiché et l'appel d'outil qui reste en attente, et aucun n'a été vu affiché dans une session de ce produit (Cursor 3.23.12, le 2026-10-07) : les décisions te sont posées en texte dans le chat (« a, b ou c ? »), et l'agent enregistre ta réponse avec `chat.answer`, en la citant. Le moteur essaie quand même le formulaire d'abord (`chat.ask`) ; dans Cursor il attend 90 secondes un premier signe de vie, et sans rien il pose la question dans le chat pour le reste de la session. Un formulaire déjà répondu une fois est attendu aussi longtemps que dans n'importe quel autre outil.",
9481
9787
  "cursor.usage": "Cursor ne garde aucun nombre de jetons nulle part sur la machine : ses transcriptions (`~/.cursor/projects/<projet>/agent-transcripts/`) contiennent les messages et les appels d'outils, sans jetons, sans modèle et sans date par ligne. Le moteur ne mesure donc rien d'une session Cursor (`measure.usage` répond `available: false`) et ne l'estime jamais ; la page d'usage de Cursor (le tableau de bord de ton compte) est la seule source. Le hook `stop` de l'éditeur porte peut-être des jetons (vu dans le code de Cursor lui-même, non vérifié rempli) : il n'est pas utilisé.",
9788
+ "kimi.instructions": "la documentation de Kimi Code CLI ne dit pas quel fichier d'instructions de projet il charge (son propre dépôt contient un `AGENTS.md`, mais son chargement n'est pas documenté) : la constitution reste où elle est (`AGENTS.md`, ou `.agentplugged/AGENTS.md`) et les compétences de la méthode sont lues dans `.agents/skills/`, mais rien ne prouve que Kimi lit la constitution tout seul. Tant qu'une session ne le montre pas, commence par lui demander de lire la constitution.",
9789
+ "kimi.model": "les fichiers d'agents de Kimi Code CLI n'ont pas de champ `model` (un champ inconnu est ignoré) : chaque agent utilise le modèle de la session, quel que soit son niveau.",
9790
+ "kimi.permissions": `${KIMI_HOOKS_FR} Aucun hook n'applique les chemins et les commandes protégés du produit, et Kimi n'a pas non plus de fichier de permissions de projet (ses \`[[permission.rules]]\` sont aussi dans le \`config.toml\` de l'utilisateur) : ce sont les approbations de Kimi qui décident (dans son mode sans terminal, \`kimi -p\`, sa politique automatique, avec seulement les règles de refus statiques), et les règles de la constitution restent à toi.`,
9791
+ "kimi.rules": `${KIMI_HOOKS_FR} Les règles de permission du produit (push sur la branche principale, force push, suppression en masse, lecture des secrets, écriture des fichiers protégés du produit) ne sont donc pas appliquées par un hook dans Kimi : avant une telle action, la règle est à toi, et une règle qui demande d'abord (\`ask\`) est posée dans le chat.`,
9792
+ "kimi.untrusted": `${KIMI_HOOKS_FR} Aucun hook n'enregistre ce que la session a lu à l'extérieur : après une lecture de contenu extérieur, l'agent appelle \`guard.external_read\` pour que le journal en garde la trace (source, heure, agent) ; rien n'est bloqué.`,
9793
+ "kimi.chat_proof": `${KIMI_HOOKS_FR} Aucun hook ne retient tes messages : une réponse que tu donnes dans le chat est enregistrée « non vérifiée » (\`chat_unverified\`) et affichée ainsi partout, quel que soit le point (le journal garde la trace de chaque réponse). Pour que chaque réponse soit vérifiée, travaille dans Claude Code ; pour que les points à risque élevé passent par ta clé, choisis le niveau \`strict\`.`,
9794
+ "kimi.installs": `${KIMI_HOOKS_FR} Aucun hook ne voit une installation avant qu'elle s'exécute : le moteur ne l'inscrit pas dans l'activité, et \`installs.mode: validate\` ne peut pas te demander de valider ici. Ce sont les approbations de Kimi qui décident.`,
9795
+ "kimi.budget": `${KIMI_HOOKS_FR} Aucun hook ne voit chaque appel d'outil avant qu'il parte : le moteur ne peut pas arrêter le travail au plafond d'une story au plus proche, ni tenir la pause de l'équipe pendant qu'un agent écrit. Le coût est lu après coup (là où le moteur sait lire les traces de l'outil) et le point de contrôle du budget s'ouvre alors.`,
9796
+ "kimi.rules.hooks-installed": "le hook de Kimi Code CLI (installé dans les réglages de l'utilisateur) refuse ce que le produit refuse (push sur la branche principale, force push, suppression en masse, lecture des secrets, écriture des fichiers protégés du produit) pour une commande et pour un outil dont l'entrée nomme un chemin, mais un hook de Kimi ne sait qu'autoriser ou refuser, jamais demander : une règle qui demande d'abord (`ask`) est refusée avec une raison qui dit à l'agent de te demander dans le chat. La documentation de Kimi ne nomme ni ses outils de fichiers ni les champs de leur entrée : une règle de chemin s'applique à toute entrée d'outil qui a un champ ressemblant à un chemin, au mieux. Pour la même raison, seule une commande qui atteint le réseau est inscrite comme lecture de contenu extérieur : les outils web de Kimi et ceux des autres serveurs MCP ne sont pas vus, donc après une telle lecture appelle `guard.external_read`.",
9797
+ "kimi.chat_proof.hooks-installed": "le hook `UserPromptSubmit` de Kimi Code CLI ne documente aucun champ qui porte le texte que tu as tapé : aucun hook ne retient tes messages. Une réponse que tu donnes dans le chat est enregistrée « non vérifiée » (`chat_unverified`) et affichée ainsi partout, quel que soit le point (le journal garde la trace de chaque réponse). Pour que chaque réponse soit vérifiée, travaille dans Claude Code ; pour que les points à risque élevé passent par ta clé, choisis le niveau `strict`.",
9798
+ "kimi.budget.hooks-installed": "le hook de Kimi Code CLI (installé dans les réglages de l'utilisateur) retient un appel pendant que l'équipe est en pause, mais le plafond d'une story demande le coût de la session, que le moteur ne sait pas lire pour Kimi (ses traces ne sont pas documentées) : l'arrêt à un budget n'est pas appliqué au plus proche appel, et le point de contrôle du budget ne s'ouvre que lorsqu'un coût est rapporté.",
9799
+ "kimi.decisions": "la documentation de Kimi Code CLI ne dit rien des formulaires qu'un serveur MCP demande (« elicitation »), et aucun n'a été vu affiché dans une session de ce produit : les décisions te sont posées en texte dans le chat (« a, b ou c ? »), et l'agent enregistre ta réponse avec `chat.answer`, en la citant. Le moteur essaie toujours d'abord le formulaire (`chat.ask`) et retombe sur le chat quand l'outil ne sait pas l'afficher.",
9482
9800
  "*.budget": "cet outil n'a pas de hook qui voit chaque appel d'outil avant qu'il parte : le moteur ne peut pas arrêter le travail au plafond d'une story au plus proche, ni tenir la pause de l'équipe pendant qu'un agent écrit. Le coût est lu après coup (là où le moteur sait lire les traces de l'outil) et le point de contrôle de budget s'ouvre alors.",
9483
9801
  "*.usage": "le moteur ne lit aucune trace de cet outil : il ne mesure rien de ses sessions (`measure.usage` répond `available: false`) et ne l'estime jamais.",
9484
9802
  "codex.mcp.config-kept": "sync n'a pas pu écrire `.codex/config.toml` (le fichier est à toi) : le serveur MCP `agentplugged` n'est pas déclaré pour Codex. Ajoute toi-même `[mcp_servers.agentplugged]` avec `command = \"npx\"` et `args = [\"-y\", \"agentplugged@<engine_version>\", \"mcp\"]`.",
@@ -9504,12 +9822,12 @@ const FALLBACK_REASONS = { fr: {
9504
9822
  "antigravity.decisions": "Antigravity CLI annonce qu'il affiche les formulaires qu'un serveur MCP demande (« elicitation »), mais cela n'a été vérifié que dans son mode sans terminal, où il les annule : tant qu'aucune session n'en a affiché un, les décisions te sont posées en texte dans le chat (« a, b ou c ? »), et l'agent enregistre ta réponse avec `chat.answer`, en la citant. Le moteur essaie quand même le formulaire d'abord (`chat.ask`) et passe au chat quand l'outil ne peut pas l'afficher.",
9505
9823
  "*.decisions": "cet outil n'affiche pas les formulaires qu'un serveur MCP demande (« elicitation »), ou pas dans tous les modes : les décisions te sont posées en texte dans le chat (« a, b ou c ? »), et l'agent enregistre ta réponse avec `chat.answer`, en la citant. Le moteur essaie toujours d'abord le formulaire (`chat.ask`) et repasse au chat quand l'outil ne sait pas l'afficher.",
9506
9824
  "*.untrusted": "agentplugged n'écrit aucun hook pour cet outil : une lecture par l'accès web de l'outil ou par un autre serveur MCP n'est pas enregistrée toute seule. Après une lecture externe, l'agent appelle `guard.external_read` pour que le journal en garde la trace (source, heure, agent) ; rien n'est bloqué. Les actions faites par les outils de fichiers (lire, modifier, écrire) ne passent pas par un hook de lecture : seules les règles de permission les encadrent (`read_secrets` est toujours refusé). Seul Claude Code contrôle aussi une écriture avant qu'elle ait lieu (un secret, un fichier hors de la story, une décision d'architecture) : pas cet outil.",
9507
- "*.installs": "cet outil n'a aucun hook qui voie une installation avant qu'elle s'exécute : le moteur ne l'inscrit pas dans l'activité, et `installs.mode: validate` ne peut pas te demander de valider ici. Ce sont les permissions de l'outil qui décident."
9825
+ "*.installs": "cet outil n'a aucun hook qui voie une installation avant qu'elle s'exécute : le moteur ne l'inscrit pas dans l'activité, et `installs.mode: validate` ne peut pas te demander de valider ici. Ce sont les permissions de l'outil qui décident.",
9826
+ ...RUN_FALLBACK_REASONS_FR
9508
9827
  } };
9509
- //#endregion
9510
- //#region ../../packages/i18n/dist/catalogs/fr.js
9828
+ // ../../packages/i18n/dist/catalogs/fr.js
9511
9829
  const fr = {
9512
- "cli.usage": "Utilisation : agentplugged <commande> [options]\n\nDepuis le chat : demande à ton agent, à l'écrit ou en dictée, ce qui t'est réservé (« passe la CI de la story 4-3, le runner est en panne ») :\n il ouvre une demande, tu la valides dans le chat, et le moteur l'exécute. Les commandes ci-dessous existent aussi, pour qui préfère la ligne de commande ; seul le niveau strict les exige.\n\nCommandes :\n init Installe la méthode dans le dossier courant\n profile Choisit ce que fait la méthode pour ce produit (ou dans le chat)\n doctor [--json] [--error <message>] [--exit-code <n>] [--report] Regarde ta machine (Node, Git, la forge, tes outils IA, le trousseau…), dit ce qui manque et le répare avec ton accord ; code de sortie 1 si un point bloquant demeure\n sync Génère les fichiers des outils IA (Claude Code, Codex, Antigravity CLI, Cursor) à partir de la méthode\n agent Gère tes agents et compétences (ou dans le chat) :\n agent create <id> crée un agent (ou une compétence avec --skill)\n agent edit <id> indique les fichiers à modifier (crée le fichier de personnalisation d'un agent ou d'une compétence livrés)\n agent edit <skill> --personal\n ta couche à toi d'une compétence livrée, ignorée par Git\n agent edit <id> --tier <niveau> --tool <outil>\n choisit le niveau de modèle et l'outil IA préféré de l'agent\n agent enable <id> active un agent ou une compétence\n agent disable <id> désactive un agent ou une compétence\n journal sync Récupère le journal du dépôt distant, puis lui envoie les événements qui lui manquent (sans jamais forcer)\n journal status Affiche l'état du produit calculé à partir du journal : événements appliqués, ignorés, avertissements\n (.agentplugged/.cache/state.json ; son computed_at est la date du dernier événement appliqué, dans l'ordre de projection)\n docs check Vérifie les documents de .agentplugged/docs, epics et stories : leurs en-têtes, les stories (contrat, couverture du PRD, dépendances, intentions validées), et qu'aucun identifiant d'exigence n'a été renuméroté, réutilisé ou supprimé depuis la base (code de sortie 1 si des problèmes sont trouvés, 2 si la vérification n'a pas pu se faire)\n mcp Lance le serveur MCP par lequel les agents rendent compte, en stdio : un lanceur stable qui passe à un moteur plus récent entre deux appels, sans reconnexion (sync le déclare dans chaque outil IA)\n update [--check on|off] [--auto on|off] Installe le dernier moteur dans son propre dossier et met le produit dessus (ce que fait un oui à Noah ; dans un terminal interactif seulement) ; --check on|off : interroger le registre npm pour savoir si une version est sortie, au plus deux fois par jour (activé par défaut) ; --auto on|off : l'installer sans question (désactivé par défaut)\n hook antigravity|codex pre-tool|post-tool Les hooks du plugin d'Antigravity CLI et du projet de Codex, lancés par l'outil : les règles de permission avant un outil, les lectures de contenu extérieur après (sync les écrit)\n publication <G-id> [--file <chemin>] [--raw] Affiche le texte complet d'un livrable de lancement, de marketing ou de vente, la version qu'on t'a montrée (un seul fichier avec --file ; --raw : le fichier entier, en-tête compris)\n publication export <G-id> [--force] [--unverified] Écrit un livrable que tu as validé, prêt à publier, dans .agentplugged/exports/<G-id>/ (rien n'est publié, envoyé ni payé)\n review [<G-id>] Réponds à un point de contrôle ouvert, signé par ta clé, ou rouvre un point appliqué automatiquement (dans un terminal interactif seulement)\n key presence [--reset] Protège tes validations avec Windows Hello (--reset : recrée l'identifiant quand il ne marche plus)\n key endorse [<human:…>] Liste les clés de créateur en attente d'approbation, ou approuve une clé dont tu es sûr\n key export [--out <fichier>] Exporte la clé du produit, chiffrée par une phrase de passe, pour une autre machine\n key import [--in <fichier>] Importe la clé du produit exportée sur une autre machine (tapée, non affichée, sans --in)\n key seal Chiffre les fichiers de la Salle et de la mémoire encore en clair\n trust dismiss Écarte l'événement qui bloque les ordres quand le journal contient une autre racine de confiance que celle épinglée sur cette machine (rien à faire sinon)\n (review, key et trust : dans un terminal interactif seulement)\n history Affiche tes validations, de la plus récente à la plus ancienne (--story <e-s>, --since <date ISO>, --decision <décision> ;\n --all : aussi les réponses ignorées par le journal, avec leur raison)\n history --export <fichier.json|fichier.csv> [--force] Les écrit dans un fichier (JSON ou CSV, selon son extension)\n rules [show] Affiche les règles de permission : ce que les agents font seuls (allow), après t'avoir demandé (ask) ou jamais (deny), lues sur la branche principale\n rules set <action> <allow|ask|deny> Change une règle ; rules reset : revient aux défauts (dans un terminal interactif seulement)\n next Affiche la prochaine étape en trois lignes : l'étape en cours, l'agent à appeler et où, et ce qui attend ta validation,\n puis une quatrième ligne avec la commande à lancer quand l'étape en a une\n migrate [--check] Passe .agentplugged/ au format de ce moteur et l'épingle, avec une trace dans le journal (dans un terminal interactif seulement ; --check : montre ce qu'il ferait, sans rien écrire)\n deferred [list] [<e-s>] [--all] [--json] Affiche le travail reporté ouvert (les points qui verrouillent cette story ; --all : aussi les points fermés)\n deferred show <D-id> [--json] Affiche un point reporté\n deferred resolve|drop <D-id> <raison> Marque un point reporté traité, ou l'abandonne (ou dans le chat ; au terminal : interactif seulement)\n story start <e-s> Démarre une story : sa branche feat/<e-s>-<slug>, sa copie de travail à côté du dépôt et le hook de commit (pour toi ou un agent)\n story pr <e-s> Livre une story : pousse sa branche (jamais la principale) et ouvre ou met à jour sa pull request au modèle fixe, par gh ou glab déjà connecté\n story ci <e-s> [--forge github|gitlab] Lit la CI de la pull request ouverte d'une story (gh ou glab) ; en échec, la story repasse en développement\n story ci <e-s> --waive \"<raison>\" Accepte une story dont la CI ne peut pas être lue, pour le commit actuel de sa branche (ou dans le chat ; au terminal : interactif seulement)\n ci setup [--forge github|gitlab] Écrit la CI de base du produit (lint, tests, build, audit des dépendances), jamais par-dessus une CI existante\n tests setup [--runner <nom>] [--e2e <nom>|none] Prépare le cadre de test du produit d'après ses fichiers et propose, dans .agentplugged/proofs.yaml, la commande qui lance les tests d'un critère (jamais par-dessus une déclaration existante)\n trace [<EF-n>] [--json] Affiche la traçabilité : chaque exigence et son statut (à faire, en développement, en revue, livrée, en écart), ou une exigence avec ses stories, tests, pull requests et écarts\n trace resolve <V-id> <raison> Lève un écart (ou dans le chat ; au terminal : interactif seulement)\n usage [--by story|step|skill|agent|session] [--story <e-s>] [--since <jour>] [--until <jour>] [--session <outil>:<id>] [--json] Montre ce que tes outils d'IA ont consommé : des jetons et l'origine de chaque chiffre (nommé par l'outil, déduit du journal, ou inconnu), la part que rien n'a permis d'attribuer, les outils qu'on ne peut pas mesurer ; aucun montant, seulement l'estimation d'une story\n eval check [<compétence>] Vérifie les cas de comportement d'une compétence (valides, appelée d'après les mots de sa description, passage gardé) : gratuit, sans agent\n eval init <compétence> Propose des cas pour démarrer, écrits une fois, jamais par-dessus un fichier existant\n eval run <compétence> [--mode quality|baseline|variant|trigger] [--runs <n>] [--record] [--plan] Lance les cas avec un vrai agent dans un dossier propre (cela consomme des jetons : le plan vient d'abord ; jamais dans les tests), les note, compte les jetons et compare au passage gardé : un cas qui ne passe plus, ou un coût au-dessus du seuil, donne le code de sortie 1\n pair [--no-open] [--nouveau] [--changer-de-compte] Relie ton application web à ce produit : affiche un lien à cliquer, rien d'autre à faire (c'est le pont qui s'en charge, une fois installé)\n device list|revoke <appareil> Liste les appareils reliés à ce produit, ou en retire un : il ne reçoit plus rien et peut être relié de nouveau (c'est le pont qui s'en charge, une fois installé)\n bridge install|uninstall|start|status Installe le pont (et le met à jour) comme service de ton compte, le retire, le lance sur cette machine, ou dit son état. Le pont se distribue à part, sous la licence d'Innovel Studio SASU : cette commande ne fait que l'installer et le lancer\n\nOptions :\n --profile <profil> new-product, maintenance, launch-only ou prototype, sans questions\n --validation <niveau> init, profile : comment tu réponds aux points de contrôle, chat (dans le chat de ton outil IA, par défaut), auto ou strict\n --installs <mode> init, profile : comment s'installent les dépendances, visible (sans validation, affichées dans l'activité et inscrites au journal, par défaut) ou validate (une validation chacune)\n --points <liste> init, profile : les points de validation qui t'attendent (framing, architecture, breakdown, merge, release, publication, séparés par des virgules ; none : aucun), les agents décident les autres\n --workflow recommended init, profile : garde le workflow Git recommandé pour tout (une branche par story, la CI sur la forge quand il y en a une, fusion par pull request, une revue avant la fusion)\n --branches <modèle> init, profile : les branches de base, main (seule), main+dev (les stories arrivent sur dev, une mise en production la fait passer dans main) ou <production>+<intégration>\n --story-branches <yes|no> init, profile : une branche par story, ou on travaille sur la branche où arrivent les stories\n --ci <mode> init, profile : la CI, none, local (ta machine) ou remote (la forge)\n --merge <mode> init, profile : comment une story est fusionnée, pr (une pull request) ou direct (par le moteur, jamais poussé)\n --review <yes|no> init, profile : une revue avant la fusion\n --skill agent create : crée une compétence plutôt qu'un agent\n --name, --title, --description, --domain, --phase, --icon, --role <texte>\n agent create : réponses données sans questions (une compétence ne prend que --description)\n --tier <niveau> agent edit : niveau de modèle, reasoning, code, fast ou multimodal ; `--tier default` revient au niveau propre de l'agent\n --tool <outil> agent edit : outil IA préféré, claude-code, codex, antigravity ou cursor ; `--tool none` retire l'outil préféré\n --remote <nom> journal sync : le dépôt distant Git à utiliser (par défaut celui que suit la branche courante, sinon origin)\n --recreate-remote journal sync : envoie le journal local comme nouvelle branche distante, après la suppression voulue de l'ancienne\n --base <réf> docs check : la version Git avec laquelle comparer (HEAD par défaut)\n --story <e-s> history, usage : seulement cette story (par exemple 2-6)\n --since <date> history, usage : à partir de cette date : 2026-10-03 (minuit, heure locale), ou une date et une heure avec leur décalage, 2026-10-03T12:00:00Z ou 2026-10-03T14:00:00+02:00\n --by <axe> usage : story, step (par défaut), skill, agent ou session\n --until <jour> usage : jusqu'à ce jour (AAAA-MM-JJ, UTC), avec --since\n --session <outil>:<id> usage : dit aussi ce qui a rendu cette session plus chère (compétences chargées deux fois, fichiers relus, outils en échec ; Claude Code seulement)\n --decision <décision> history : approved, approved_with_reservations, rejected, changes_requested, option_chosen, waived ou reopened\n --all history : aussi les réponses ignorées par le journal, avec leur raison (dans l'export aussi)\n --export <fichier> history : écrit dans un fichier .json (exact) ou .csv (pour les tableurs), relatif au dossier courant\n --force history --export, publication export : remplace un fichier existant\n --file <chemin> publication : n'affiche que ce fichier du livrable\n --unverified publication export : exporte aussi une approbation donnée dans le chat sans preuve (outil sans hook)\n --raw publication : le fichier entier, avec l'en-tête YAML de la base de connaissance\n --error <message> doctor : le message de la commande qui a échoué (`--error=<message>` s'il commence par un tiret ; `-` : lu sur l'entrée standard, redirigée) ; le moteur dit ce qu'il constate sur ta machine, à part de ce qu'il suppose\n --exit-code <n> doctor : le code de sortie de la commande qui a échoué (137, 127…)\n --report doctor : le rapport à joindre à une demande d'aide (système, versions, résultat de chaque vérification), sans nom d'utilisateur, chemin personnel, jeton ni contenu de ton produit ; il ne répare rien\n --json next, deferred, trace, usage, doctor : la réponse en JSON, pour les scripts (une erreur aussi, sur la sortie standard, sauf doctor)\n --yes, -y init : ne demande rien, prend les réponses recommandées (et écrit les fichiers des outils IA) ; dans un script, le code de sortie dit si un point bloquant demeure\n --tools <liste> init : les outils IA à brancher, parmi claude-code, codex, antigravity et cursor, séparés par des virgules (par défaut ceux qui sont trouvés, sinon tous)\n --permissions <mode> init, profile : protected (par défaut : ton outil IA continue de demander avant les gestes sensibles) ou free (son mode sans questions reste possible)\n --channel <boutique> init : la boutique où la méthode a été trouvée (claude-plugin), écrite par la compétence d'accueil du plugin Claude Code pour que `doctor` dise comment la méthode a été installée\n --no-sync init : n'écrit pas les fichiers des outils IA\n --clean-gemini sync : retire seulement les fichiers qu'AgentPlugged a écrits pour Gemini CLI (arrêté) et liste les autres (avec --yes : les retire aussi)\n --out <fichier> key export : écrit la clé exportée dans ce nouveau fichier, hors du dépôt\n --in <fichier> key import : lit la clé exportée dans ce fichier\n --check migrate : montre ce qu'il ferait, sans rien écrire\n --forge <forge> ci setup, story ci : github ou gitlab (par défaut, ci.forge de method.yaml, sinon la forge du dépôt distant origin)\n --runner <nom> tests setup : le lanceur de tests unitaires et d'API (vitest, jest, mocha, node-test, pytest, go-test, cargo-test, rspec, phpunit, dotnet-test, maven, gradle)\n --e2e <nom> tests setup : le lanceur de bout en bout (playwright, cypress) ou none\n --waive <raison> story ci : accepte la story sans sa CI, pour le commit actuel de sa branche\n --upgrade-engine init : épingle la version du moteur en cours dans `.agentplugged/method.yaml` et rafraîchit la méthode (sans trace dans le journal : pour changer seulement de moteur, préfère `migrate`)\n --engine-any s'exécute même si `.agentplugged/method.yaml` épingle une autre version du moteur (avec un avertissement)\n --version, -v affiche la version d'agentplugged\n --help, -h affiche cette aide",
9830
+ "cli.usage": "Utilisation : agentplugged <commande> [options]\n\nDepuis le chat : demande à ton agent, à l'écrit ou en dictée, ce qui t'est réservé (« passe la CI de la story 4-3, le runner est en panne ») :\n il ouvre une demande, tu la valides dans le chat, et le moteur l'exécute. Les commandes ci-dessous existent aussi, pour qui préfère la ligne de commande ; seul le niveau strict les exige.\n\nCommandes :\n init Installe la méthode dans le dossier courant\n profile Choisit ce que fait la méthode pour ce produit (ou dans le chat)\n doctor [--json] [--error <message>] [--exit-code <n>] [--report] Regarde ta machine (Node, Git, la forge, tes outils IA, le trousseau…), dit ce qui manque et le répare avec ton accord ; code de sortie 1 si un point bloquant demeure\n sync Génère les fichiers des outils IA (Claude Code, Codex, Antigravity CLI, Cursor, Kimi Code CLI) à partir de la méthode\n agent Gère tes agents et compétences (ou dans le chat) :\n agent create <id> crée un agent (ou une compétence avec --skill)\n agent edit <id> indique les fichiers à modifier (crée le fichier de personnalisation d'un agent ou d'une compétence livrés)\n agent edit <skill> --personal\n ta couche à toi d'une compétence livrée, ignorée par Git\n agent edit <id> --tier <niveau> --tool <outil>\n choisit le niveau de modèle et l'outil IA préféré de l'agent\n agent enable <id> active un agent ou une compétence\n agent disable <id> désactive un agent ou une compétence\n journal sync Récupère le journal du dépôt distant, puis lui envoie les événements qui lui manquent (sans jamais forcer)\n journal status Affiche l'état du produit calculé à partir du journal : événements appliqués, ignorés, avertissements\n (.agentplugged/.cache/state.json ; son computed_at est la date du dernier événement appliqué, dans l'ordre de projection)\n docs check Vérifie les documents de .agentplugged/docs, epics et stories : leurs en-têtes, les stories (contrat, couverture du PRD, dépendances, intentions validées), et qu'aucun identifiant d'exigence n'a été renuméroté, réutilisé ou supprimé depuis la base (code de sortie 1 si des problèmes sont trouvés, 2 si la vérification n'a pas pu se faire)\n mcp Lance le serveur MCP par lequel les agents rendent compte, en stdio : un lanceur stable qui passe à un moteur plus récent entre deux appels, sans reconnexion (sync le déclare dans chaque outil IA)\n update [--check on|off] [--auto on|off] Installe le dernier moteur dans son propre dossier et met le produit dessus (ce que fait un oui à Noah ; dans un terminal interactif seulement) ; --check on|off : interroger le registre npm pour savoir si une version est sortie, au plus deux fois par jour (activé par défaut) ; --auto on|off : l'installer sans question (désactivé par défaut)\n hook antigravity|codex pre-tool|post-tool Les hooks du plugin d'Antigravity CLI et du projet de Codex, lancés par l'outil : les règles de permission avant un outil, les lectures de contenu extérieur après (sync les écrit)\n kimi-hooks install|remove|status Installe, retire ou montre le hook d'agentplugged dans tes propres réglages de Kimi Code CLI (une copie du fichier d'abord ; sync n'y écrit jamais)\n publication <G-id> [--file <chemin>] [--raw] Affiche le texte complet d'un livrable de lancement, de marketing ou de vente, la version qu'on t'a montrée (un seul fichier avec --file ; --raw : le fichier entier, en-tête compris)\n publication export <G-id> [--force] [--unverified] Écrit un livrable que tu as validé, prêt à publier, dans .agentplugged/exports/<G-id>/ (rien n'est publié, envoyé ni payé)\n review [<G-id>] Réponds à un point de contrôle ouvert, signé par ta clé, ou rouvre un point appliqué automatiquement (dans un terminal interactif seulement)\n key presence [--reset] Protège tes validations avec Windows Hello (--reset : recrée l'identifiant quand il ne marche plus)\n key endorse [<human:…>] Liste les clés de créateur en attente d'approbation, ou approuve une clé dont tu es sûr\n key export [--out <fichier>] Exporte la clé du produit, chiffrée par une phrase de passe, pour une autre machine\n key import [--in <fichier>] Importe la clé du produit exportée sur une autre machine (tapée, non affichée, sans --in)\n key seal Chiffre les fichiers de la Salle et de la mémoire encore en clair\n trust dismiss Écarte l'événement qui bloque les ordres quand le journal contient une autre racine de confiance que celle épinglée sur cette machine (rien à faire sinon)\n (review, key et trust : dans un terminal interactif seulement)\n history Affiche tes validations, de la plus récente à la plus ancienne (--story <e-s>, --since <date ISO>, --decision <décision> ;\n --all : aussi les réponses ignorées par le journal, avec leur raison)\n history --export <fichier.json|fichier.csv> [--force] Les écrit dans un fichier (JSON ou CSV, selon son extension)\n rules [show] Affiche les règles de permission : ce que les agents font seuls (allow), après t'avoir demandé (ask) ou jamais (deny), lues sur la branche principale\n rules set <action> <allow|ask|deny> Change une règle ; rules reset : revient aux défauts (dans un terminal interactif seulement)\n next Affiche la prochaine étape en trois lignes : l'étape en cours, l'agent à appeler et où, et ce qui attend ta validation,\n puis une quatrième ligne avec la commande à lancer quand l'étape en a une\n migrate [--check] Passe .agentplugged/ au format de ce moteur et l'épingle, avec une trace dans le journal (dans un terminal interactif seulement ; --check : montre ce qu'il ferait, sans rien écrire)\n deferred [list] [<e-s>] [--all] [--json] Affiche le travail reporté ouvert (les points qui verrouillent cette story ; --all : aussi les points fermés)\n deferred show <D-id> [--json] Affiche un point reporté\n deferred resolve|drop <D-id> <raison> Marque un point reporté traité, ou l'abandonne (ou dans le chat ; au terminal : interactif seulement)\n story start <e-s> Démarre une story : sa branche feat/<e-s>-<slug>, sa copie de travail à côté du dépôt et le hook de commit (pour toi ou un agent)\n story pr <e-s> Livre une story : pousse sa branche (jamais la principale) et ouvre ou met à jour sa pull request au modèle fixe, par gh ou glab déjà connecté\n story ci <e-s> [--forge github|gitlab] Lit la CI de la pull request ouverte d'une story (gh ou glab) ; en échec, la story repasse en développement\n story ci <e-s> --waive \"<raison>\" Accepte une story dont la CI ne peut pas être lue, pour le commit actuel de sa branche (ou dans le chat ; au terminal : interactif seulement)\n ci setup [--forge github|gitlab] Écrit la CI de base du produit (lint, tests, build, audit des dépendances), jamais par-dessus une CI existante\n tests setup [--runner <nom>] [--e2e <nom>|none] Prépare le cadre de test du produit d'après ses fichiers et propose, dans .agentplugged/proofs.yaml, la commande qui lance les tests d'un critère (jamais par-dessus une déclaration existante)\n trace [<EF-n>] [--json] Affiche la traçabilité : chaque exigence et son statut (à faire, en développement, en revue, livrée, en écart), ou une exigence avec ses stories, tests, pull requests et écarts\n trace resolve <V-id> <raison> Lève un écart (ou dans le chat ; au terminal : interactif seulement)\n usage [--by story|step|skill|agent|session] [--story <e-s>] [--since <jour>] [--until <jour>] [--session <outil>:<id>] [--json] Montre ce que tes outils d'IA ont consommé : des jetons et l'origine de chaque chiffre (nommé par l'outil, déduit du journal, ou inconnu), la part que rien n'a permis d'attribuer, les outils qu'on ne peut pas mesurer ; aucun montant, seulement l'estimation d'une story\n eval check [<compétence>] Vérifie les cas de comportement d'une compétence (valides, appelée d'après les mots de sa description, passage gardé) : gratuit, sans agent\n eval init <compétence> Propose des cas pour démarrer, écrits une fois, jamais par-dessus un fichier existant\n eval run <compétence> [--mode quality|baseline|variant|trigger] [--runs <n>] [--record] [--plan] Lance les cas avec un vrai agent dans un dossier propre (cela consomme des jetons : le plan vient d'abord ; jamais dans les tests), les note, compte les jetons et compare au passage gardé : un cas qui ne passe plus, ou un coût au-dessus du seuil, donne le code de sortie 1\n pair [--no-open] [--nouveau] [--changer-de-compte] Relie ton application web à ce produit : affiche un lien à cliquer, rien d'autre à faire (c'est le pont qui s'en charge, une fois installé)\n device list|revoke <appareil> Liste les appareils reliés à ce produit, ou en retire un : il ne reçoit plus rien et peut être relié de nouveau (c'est le pont qui s'en charge, une fois installé)\n bridge install|uninstall|start|status Installe le pont (et le met à jour) comme service de ton compte, le retire, le lance sur cette machine, ou dit son état. Le pont se distribue à part, sous la licence d'Innovel Studio SASU : cette commande ne fait que l'installer et le lancer\n\nOptions :\n --profile <profil> new-product, maintenance, launch-only ou prototype, sans questions\n --validation <niveau> init, profile : comment tu réponds aux points de contrôle, chat (dans le chat de ton outil IA, par défaut), auto ou strict\n --installs <mode> init, profile : comment s'installent les dépendances, visible (sans validation, affichées dans l'activité et inscrites au journal, par défaut) ou validate (une validation chacune)\n --points <liste> init, profile : les points de validation qui t'attendent (framing, architecture, breakdown, merge, release, publication, séparés par des virgules ; none : aucun), les agents décident les autres\n --workflow recommended init, profile : garde le workflow Git recommandé pour tout (une branche par story, la CI sur la forge quand il y en a une, fusion par pull request, une revue avant la fusion)\n --branches <modèle> init, profile : les branches de base, main (seule), main+dev (les stories arrivent sur dev, une mise en production la fait passer dans main) ou <production>+<intégration>\n --story-branches <yes|no> init, profile : une branche par story, ou on travaille sur la branche où arrivent les stories\n --ci <mode> init, profile : la CI, none, local (ta machine) ou remote (la forge)\n --merge <mode> init, profile : comment une story est fusionnée, pr (une pull request) ou direct (par le moteur, jamais poussé)\n --review <yes|no> init, profile : une revue avant la fusion\n --skill agent create : crée une compétence plutôt qu'un agent\n --name, --title, --description, --domain, --phase, --icon, --role <texte>\n agent create : réponses données sans questions (une compétence ne prend que --description)\n --tier <niveau> agent edit : niveau de modèle, reasoning, code, fast ou multimodal ; `--tier default` revient au niveau propre de l'agent\n --tool <outil> agent edit : outil IA préféré, claude-code, codex, antigravity, cursor ou kimi ; `--tool none` retire l'outil préféré\n --remote <nom> journal sync : le dépôt distant Git à utiliser (par défaut celui que suit la branche courante, sinon origin)\n --recreate-remote journal sync : envoie le journal local comme nouvelle branche distante, après la suppression voulue de l'ancienne\n --base <réf> docs check : la version Git avec laquelle comparer (HEAD par défaut)\n --story <e-s> history, usage : seulement cette story (par exemple 2-6)\n --since <date> history, usage : à partir de cette date : 2026-10-03 (minuit, heure locale), ou une date et une heure avec leur décalage, 2026-10-03T12:00:00Z ou 2026-10-03T14:00:00+02:00\n --by <axe> usage : story, step (par défaut), skill, agent ou session\n --until <jour> usage : jusqu'à ce jour (AAAA-MM-JJ, UTC), avec --since\n --session <outil>:<id> usage : dit aussi ce qui a rendu cette session plus chère (compétences chargées deux fois, fichiers relus, outils en échec ; Claude Code seulement)\n --decision <décision> history : approved, approved_with_reservations, rejected, changes_requested, option_chosen, waived ou reopened\n --all history : aussi les réponses ignorées par le journal, avec leur raison (dans l'export aussi)\n --export <fichier> history : écrit dans un fichier .json (exact) ou .csv (pour les tableurs), relatif au dossier courant\n --force history --export, publication export : remplace un fichier existant\n --file <chemin> publication : n'affiche que ce fichier du livrable\n --unverified publication export : exporte aussi une approbation donnée dans le chat sans preuve (outil sans hook)\n --raw publication : le fichier entier, avec l'en-tête YAML de la base de connaissance\n --error <message> doctor : le message de la commande qui a échoué (`--error=<message>` s'il commence par un tiret ; `-` : lu sur l'entrée standard, redirigée) ; le moteur dit ce qu'il constate sur ta machine, à part de ce qu'il suppose\n --exit-code <n> doctor : le code de sortie de la commande qui a échoué (137, 127…)\n --report doctor : le rapport à joindre à une demande d'aide (système, versions, résultat de chaque vérification), sans nom d'utilisateur, chemin personnel, jeton ni contenu de ton produit ; il ne répare rien\n --json next, deferred, trace, usage, doctor : la réponse en JSON, pour les scripts (une erreur aussi, sur la sortie standard, sauf doctor)\n --yes, -y init : ne demande rien, prend les réponses recommandées (et écrit les fichiers des outils IA) ; dans un script, le code de sortie dit si un point bloquant demeure\n --tools <liste> init : les outils IA à brancher, parmi claude-code, codex, antigravity, cursor et kimi, séparés par des virgules (par défaut ceux qui sont trouvés, sinon tous)\n --permissions <mode> init, profile : protected (par défaut : ton outil IA continue de demander avant les gestes sensibles) ou free (son mode sans questions reste possible)\n --channel <boutique> init : la boutique où la méthode a été trouvée (claude-plugin), écrite par la compétence d'accueil du plugin Claude Code pour que `doctor` dise comment la méthode a été installée\n --no-sync init : n'écrit pas les fichiers des outils IA\n --clean-gemini sync : retire seulement les fichiers qu'AgentPlugged a écrits pour Gemini CLI (arrêté) et liste les autres (avec --yes : les retire aussi)\n --out <fichier> key export : écrit la clé exportée dans ce nouveau fichier, hors du dépôt\n --in <fichier> key import : lit la clé exportée dans ce fichier\n --check migrate : montre ce qu'il ferait, sans rien écrire\n --forge <forge> ci setup, story ci : github ou gitlab (par défaut, ci.forge de method.yaml, sinon la forge du dépôt distant origin)\n --runner <nom> tests setup : le lanceur de tests unitaires et d'API (vitest, jest, mocha, node-test, pytest, go-test, cargo-test, rspec, phpunit, dotnet-test, maven, gradle)\n --e2e <nom> tests setup : le lanceur de bout en bout (playwright, cypress) ou none\n --waive <raison> story ci : accepte la story sans sa CI, pour le commit actuel de sa branche\n --upgrade-engine init : épingle la version du moteur en cours dans `.agentplugged/method.yaml` et rafraîchit la méthode (sans trace dans le journal : pour changer seulement de moteur, préfère `migrate`)\n --engine-any s'exécute même si `.agentplugged/method.yaml` épingle une autre version du moteur (avec un avertissement)\n --version, -v affiche la version d'agentplugged\n --help, -h affiche cette aide",
9513
9831
  "cli.error": "Erreur {code} : {message}",
9514
9832
  "init.summary.title": "Méthode installée dans {root}",
9515
9833
  "init.action.created": "créé",
@@ -9539,6 +9857,20 @@ const fr = {
9539
9857
  "sync.codex_trust.refused": "Je n'ai rien écrit dans {file} : son contenu a une forme que je ne sais pas fusionner sans risque. Approuve les hooks dans Codex (icône « Examiner les hooks » ou `/hooks`).",
9540
9858
  "sync.codex_trust.failed": "Je n'ai pas pu écrire {file} ({reason}). Approuve les hooks dans Codex (icône « Examiner les hooks » ou `/hooks`).",
9541
9859
  "sync.cursor_hooks": "Cursor ne lance les hooks de `.cursor/hooks.json` que dans un dossier de confiance : accepte « Trust » quand Cursor te le demande. Si tes messages ne sont toujours pas retenus, ouvre l'onglet Hooks des réglages de Cursor (ou son canal de sortie Hooks) pour voir pourquoi, et redémarre Cursor une fois.",
9860
+ "sync.kimi_hooks": "Kimi Code CLI garde ses hooks dans tes propres réglages, que sync n'écrit jamais. Pour donner à Kimi les garde-fous du produit (les règles de permission, la pause de l'équipe, les lectures de contenu extérieur), lance une fois : `npx agentplugged kimi-hooks install` (il copie d'abord `{path}`, n'ajoute que son propre bloc balisé et ne touche jamais à tes entrées ; `kimi-hooks remove` l'enlève).",
9861
+ "kimi_hooks.usage": "Utilisation : agentplugged kimi-hooks install|remove|status",
9862
+ "kimi_hooks.installed": "Les hooks de Kimi sont installés dans {path}. Copie du fichier avant le changement : {backup}.",
9863
+ "kimi_hooks.removed": "Les hooks de Kimi sont retirés de {path} ; tes propres entrées sont intactes. Copie du fichier avant le changement : {backup}.",
9864
+ "kimi_hooks.already": "Les hooks de Kimi sont déjà installés dans {path} : rien n'a changé.",
9865
+ "kimi_hooks.nothing_to_remove": "{path} ne contient aucun hook d'agentplugged : rien n'a changé.",
9866
+ "kimi_hooks.no_backup": "aucune (le fichier n'existait pas)",
9867
+ "kimi_hooks.status.installed": "Les hooks de Kimi sont installés dans {path}.",
9868
+ "kimi_hooks.status.outdated": "Les hooks de Kimi dans {path} sont ceux d'une autre version du moteur, ou nomment un fichier du moteur qui n'existe plus (le hook marche encore par npx, plus lentement) : lance `npx agentplugged kimi-hooks install` pour les mettre à jour.",
9869
+ "kimi_hooks.status.missing": "Les hooks de Kimi ne sont pas installés dans {path} : lance `npx agentplugged kimi-hooks install`.",
9870
+ "kimi_hooks.refused.unbalanced_markers": "{path} contient les lignes repères du bloc d'agentplugged de façon ambiguë (l'une manque, est en double ou dans le mauvais ordre) : rien n'a été écrit. Corrige les lignes repères à la main, puis relance la commande.",
9871
+ "kimi_hooks.refused.inline_hooks": "{path} déclare ses hooks comme une valeur `hooks = [...]`, qui ne peut pas cohabiter avec les entrées `[[hooks]]` que Kimi attend : rien n'a été écrit. Transforme tes hooks en entrées `[[hooks]]`, puis relance la commande.",
9872
+ "kimi_hooks.unreadable": "{path} ne peut pas être lu ({reason}) : rien n'a été écrit.",
9873
+ "kimi_hooks.unwritable": "{path} n'a pas pu être écrit ({reason}).",
9542
9874
  "sync.action.created": "créé",
9543
9875
  "sync.action.updated": "mis à jour",
9544
9876
  "sync.action.unchanged": "laissé tel quel",
@@ -9722,6 +10054,8 @@ const fr = {
9722
10054
  "error.not_a_git_repo": "{path} n'est pas dans un dépôt Git : le journal vit sur sa branche agentplugged/journal. Lance d'abord `git init`. Rien n'a été écrit.",
9723
10055
  "init.product_id_added": "product_id ajouté à {path} : ce produit est désormais identifié par {product_id} dans son journal.",
9724
10056
  "error.checkpoint_open": "Le point de contrôle {checkpoint} est ouvert et bloque {action} : rien n'a été écrit. Seul le créateur y répond ; avance sur autre chose en attendant, et ne contourne jamais ce refus.",
10057
+ "error.decision_not_open.untriaged": "{untriaged} point(s) de la relecture de la story {story} ne sont pas triés et aucun point de validation de la story n'est ouvert : le créateur ne verrait jamais que la story attend. Trie chaque point (review.triage), ou ouvre la décision au créateur (checkpoint.open, une `decision` avec ses options), ou termine `blocked` ; puis termine ton exécution. Rien n'a été écrit.",
10058
+ "error.decision_not_open.waiting": "Ton résultat pose des questions au créateur mais aucun point de validation n'est ouvert pour lui : il ne verrait jamais la question. Ouvre la décision (checkpoint.open, une `decision` avec ses options), ou termine `blocked`, qui l'ouvre pour toi. Rien n'a été écrit.",
9725
10059
  "checkpoint.type.document": "document",
9726
10060
  "checkpoint.type.decision": "décision",
9727
10061
  "checkpoint.type.story": "story",
@@ -10240,6 +10574,7 @@ const fr = {
10240
10574
  "error.story_section_invalid.empty": "La section « {heading} » de cette story est vide.",
10241
10575
  "error.story_section_invalid.duplicate": "La section « {heading} » apparaît deux fois dans cette story : garde-en une seule.",
10242
10576
  "error.story_dependency_forward": "La story {story} dépend de {dependency}, qui vient après elle : réordonne ou découpe les stories pour que chacune ne dépende que des précédentes.",
10577
+ "error.story_sheet_too_long": "La fiche de la story {story} fait {lines} lignes, plus de {max} : la story est trop grosse. Coupe-la en stories plus petites.",
10243
10578
  "error.story_dependency_cycle": "Ces stories dépendent les unes des autres en boucle : {cycle}. Casse la boucle.",
10244
10579
  "error.story_intent_changed.changed": "L'intention de la story {story} diffère de celle que tu as validée ({checkpoint}). Elle t'appartient, aucun agent ne la modifie : remets le texte validé, ou valide le nouveau par un point de contrôle `document` sur cette story.",
10245
10580
  "error.story_intent_changed.removed": "La story {story}, dont tu as validé l'intention ({checkpoint}), a disparu. Remets-la.",
@@ -10252,6 +10587,8 @@ const fr = {
10252
10587
  "docs.check.warning.blob_missing": "la version de {path} validée dans {checkpoint} n'est pas dans ce dépôt (blob {blob}, clone partiel ou superficiel, ou branche non récupérée) : non vérifiée.",
10253
10588
  "docs.check.warning.not_on_branch": "la story {story}, validée dans {checkpoint}, n'est pas sur cette branche : non vérifiée ici.",
10254
10589
  "docs.check.warning.history_unreadable": "la story {story}, validée dans {checkpoint}, est absente, et l'historique de cette branche est illisible : non vérifiée.",
10590
+ "docs.check.warning.sheet_stale": "la fiche de la story {story} cite des passages qui ont changé depuis : {excerpts}. Régénère-la avec `{command}` ; une story déjà validée l'est alors de nouveau.",
10591
+ "docs.check.warning.sheet_legacy": "{count} stories n'ont pas encore d'extraits (ancien format, elles marchent toujours) : {stories}. `{command}` en fait des fiches, si tu veux.",
10255
10592
  "docs.check.warning.intent_unverified": "l'intention de la story {story} diffère de celle validée dans {older}, et la validation plus récente {checkpoint} est illisible : non vérifiée.",
10256
10593
  "review.card.intents": "Intentions que tu figes en validant :",
10257
10594
  "review.card.intent.new": "{story} (nouvelle)",
@@ -10432,6 +10769,7 @@ const fr = {
10432
10769
  "error.deviation_not_reportable.not_linked": "La story {story} ne cite pas {requirement} dans ses exigences : un écart ne se signale que sur une exigence que la story cite. Rien n'a été écrit.",
10433
10770
  "error.deviation_not_reportable.not_started": "La story {story} n'a pas démarré : compare son travail une fois commencé. Rien n'a été écrit.",
10434
10771
  "error.deviation_not_reportable.done": "La story {story} est terminée : rien n'a été écrit.",
10772
+ "error.deviation_not_reportable.own_story": "Tu construis la story {story} : un écart dans ton propre travail se corrige sur sa branche, et un écart entre la story et les exigences est une décision du créateur (checkpoint.open). Rien n'a été écrit.",
10435
10773
  "error.deviation_not_found": "Aucun écart {deviation} : rien n'a été écrit. Vois `npx agentplugged trace`.",
10436
10774
  "error.deviation_not_open": "L'écart {deviation} est déjà levé : rien n'a été écrit.",
10437
10775
  "error.deviation_not_allowed": "{agent} ne peut pas lever l'écart {deviation} : seul l'agent qui l'a signalé ({reported_by}) le peut, une fois la correction vérifiée ; toi, tu lèves n'importe lequel, dans le chat (guard.creator_action). Rien n'a été écrit.",
@@ -10678,6 +11016,10 @@ const fr = {
10678
11016
  "next.merge_feedback.changes_requested": "Tu as demandé des changements sur la fusion ({checkpoint}) : rien n'a été fusionné.",
10679
11017
  "next.merge_feedback.rejected": "Tu as refusé la fusion ({checkpoint}) : rien n'a été fusionné.",
10680
11018
  "next.merge_feedback.note": "Ta consigne : {note}",
11019
+ "next.failure.base_dirty": "La fusion du point {id} a été refusée : la branche où elle se fusionne a des changements non commités. Regarde son état, commite ces changements (ou remets-les en l'état), puis relance la fusion ; ne redemande pas la même réponse tant que la branche est sale.",
11020
+ "next.failure.other": "La dernière réponse au point {id} n'a pas pu être exécutée ({code}, {reason}).",
11021
+ "next.refused": "Le moteur a refusé {action} ({code}) {times} fois pour la même cause. {gesture}",
11022
+ "next.change_method": "Le même échec est revenu deux fois ({cause} : {what}) : ne retente pas une troisième fois à l'identique ; fais enquêter la cause ou pose le blocage au créateur en une question.",
10681
11023
  "review.merged": "Story {story} fusionnée par le moteur : pull request #{pr} ({url}), commit {commit}.",
10682
11024
  "review.merged.already": "La forge avait déjà fusionné la story {story} : fusion inscrite (pull request #{pr}, {url}).",
10683
11025
  "review.merged.worktree.removed": "Copie de travail de la story retirée.",
@@ -10779,12 +11121,16 @@ const fr = {
10779
11121
  "next.merge_conflict.decided": "Tu as choisi « {option} » pour le conflit de fond ({checkpoint}) : le développeur l'applique sur la branche de la story, puis la story repasse par la CI et la revue.",
10780
11122
  "next.merge_conflict.refused": "Tu as refusé toutes les options du conflit ({checkpoint}) : le développeur te redemande.",
10781
11123
  "next.merge_queue": "Fusions, dans l'ordre : {queue}.",
11124
+ "next.reading": "Passages des documents à lire, jamais un document entier : {ids}. Pour en lire plus : {command}.",
11125
+ "next.stale_sheets": "Fiches à régénérer (un passage cité a changé) : {stories}.",
10782
11126
  "next.late_pages": "Pages de la base de connaissance en retard sur le code, à lire avec précaution : {pages}.",
10783
11127
  "next.background": "En tâche de fond, sans retenir personne : {agent} met à jour les pages de la base de connaissance en retard ({pages}).",
10784
11128
  "merge.unverified.diverged": "une fusion de la branche principale contient des changements qui lui sont propres, au-delà de ce que Git fusionne seul",
10785
11129
  "merge.unverified.foreign": "la branche a repris un commit qui n'est pas sur la branche principale",
10786
11130
  "next.step.positioning": "Rédiger le positionnement",
10787
11131
  "next.step.release_notes": "Rédiger les notes de version et mettre à jour les guides",
11132
+ "next.step.acceptance": "Recette avant la mise en production : rejouer les vrais parcours",
11133
+ "next.step.after_launch": "Une semaine après le lancement : mesures, courte rétrospective, retours en tickets",
10788
11134
  "error.launch_document_invalid.section_missing": "La section « {heading} » du positionnement manque (un titre de niveau 2, en anglais ou en français).",
10789
11135
  "error.launch_document_invalid.section_empty": "La section « {heading} » du positionnement est vide.",
10790
11136
  "error.launch_document_invalid.section_duplicate": "La section « {heading} » apparaît deux fois dans le positionnement : n'en garde qu'une.",
@@ -11147,6 +11493,8 @@ const fr = {
11147
11493
  "journey.step.knowledge_base": "la base de connaissance",
11148
11494
  "journey.step.positioning": "le positionnement",
11149
11495
  "journey.step.retrospective": "la rétrospective",
11496
+ "journey.step.acceptance": "la recette",
11497
+ "journey.step.after_launch": "le bilan après un lancement",
11150
11498
  "journey.step.ci_setup": "la mise en place de la CI",
11151
11499
  "journey.step.docs_check": "la vérification des documents",
11152
11500
  "journey.step.story_contract": "le contrat de story",
@@ -11407,8 +11755,7 @@ const fr = {
11407
11755
  "eval.run.blocked": "Bloqué : une régression, ou un cas qui ne passe pas.",
11408
11756
  "eval.run.ok": "Aucune régression."
11409
11757
  };
11410
- //#endregion
11411
- //#region ../../packages/i18n/dist/translate.js
11758
+ // ../../packages/i18n/dist/translate.js
11412
11759
  const SUPPORTED_LOCALES = [
11413
11760
  "en",
11414
11761
  "es",
@@ -11479,13 +11826,11 @@ function fallbackReason(locale, id, english, params = {}) {
11479
11826
  const template = key === void 0 ? void 0 : translations[key];
11480
11827
  return template === void 0 ? english : interpolate(template, params);
11481
11828
  }
11482
- //#endregion
11483
- //#region ../../packages/i18n/dist/locale-tools.js
11829
+ // ../../packages/i18n/dist/locale-tools.js
11484
11830
  const PLAIN = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
11485
11831
  const ACCENTED = "áƀçðéƒĝĥíĵķļɱñóþɋŕšţúṽŵẋýžÁƁÇÐÉƑĜĤÍĴĶĻṀÑÓÞɊŔŠŢÚṼŴẊÝŽ";
11486
11832
  new Map([...PLAIN].map((letter, index) => [letter, [...ACCENTED][index] ?? letter]));
11487
- //#endregion
11488
- //#region ../mcp/dist/elicitation.js
11833
+ // ../mcp/dist/elicitation.js
11489
11834
  /**
11490
11835
  * True when the client announced at initialization that it shows forms (`elicitation.form`; the
11491
11836
  * SDK reads a bare `elicitation: {}` as `{ form: {} }`, as the protocol says).
@@ -11863,8 +12208,7 @@ function modernCreatorPromptOf(options) {
11863
12208
  pending: () => pending
11864
12209
  };
11865
12210
  }
11866
- //#endregion
11867
- //#region ../mcp/dist/question-tool.js
12211
+ // ../mcp/dist/question-tool.js
11868
12212
  /**
11869
12213
  * The engine's decisions as the questions of the AI tool's question tool: the engine
11870
12214
  * dictates their exact text, the agent asks them with `AskUserQuestion`, and the creator answers by
@@ -12031,8 +12375,7 @@ function questionToolOf(options) {
12031
12375
  renderStack: (prompt) => renderStackScreens(prompt, t).map(local)
12032
12376
  };
12033
12377
  }
12034
- //#endregion
12035
- //#region ../mcp/dist/tool-groups.js
12378
+ // ../mcp/dist/tool-groups.js
12036
12379
  /**
12037
12380
  * The published description of each grouped tool: what it does, its actions, and the safety rules
12038
12381
  * that must stay in the agent's sight. Everything else (fields, refusals, the order of gestures) is
@@ -12040,14 +12383,14 @@ function questionToolOf(options) {
12040
12383
  */
12041
12384
  const TOOL_DESCRIPTIONS = {
12042
12385
  state: "Read-only. Actions: get (ONE option), next, trace, merge_order, environment. Ref: tool-state",
12043
- checkpoint: "Validation points. Actions: open (before asking the creator; files in documents, as paths from the product root), decide (only a point the creator did not keep), measures, gap. Never answer for the creator. Ref: tool-checkpoint",
12044
- chat: "Ask the creator. Actions: ask, answer (only the creator's words in quote, or via question_tool), stack_open, stack_ask, stack_answer, table. Never answer, reword or waive for the creator. Ref: tool-chat",
12386
+ checkpoint: "Validation points. Actions: open (before asking the creator; files in documents, as paths from the root), decide (only a point the creator did not keep), measures, gap. Never answer for the creator. Ref: tool-checkpoint",
12387
+ chat: "Actions: ask, answer (only the creator's words in quote, or via question_tool), stack_open, stack_ask, stack_answer, table. Never answer, reword or waive for the creator. Ref: tool-chat",
12045
12388
  story: "Actions: start (only in its workdir), status, progress, result (end with it), pr (never merge), ci, deviation, lift_deviation, leave_fast_track, merge_conflict, criterion, loop. Never skip hooks or push the main branch. Ref: tool-story",
12046
12389
  review: "Actions: start, submit, triage, get, publish, audit, critique, tests, qa, ready, export. Never review a story you built. Ref: tool-review",
12047
12390
  agent: "Actions: status, delegate (Noah only), summarize, pause, workshop. agent = your own id. Ref: tool-agent",
12048
12391
  guard: "Creator-only actions, sensitive data. Actions: request, check (refused means never), external_read, call, creator_action (only with their yes), read_sensitive, write_sensitive (never read salle/ or memory/ files directly). what = action. Ref: tool-guard",
12049
12392
  plan: "Actions: sprint (creator approves), defer, complete_deferred, course (change of mind). Never start a story an open deferred item locks. Ref: tool-plan",
12050
- memory: "Lessons. Actions: read (before first answer), retrospective, record, promote_propose, promote. Never record or promote a lesson before the creator approved it. Ref: tool-memory",
12393
+ memory: "Actions: read (before first answer), retrospective, record, promote_propose, promote. Never record or promote a lesson before the creator approved it. Ref: tool-memory",
12051
12394
  measure: "Actions: cost (never invent an amount), usage, requirements, proof (real results only), run (a command the creator accepted). Ref: tool-measure"
12052
12395
  };
12053
12396
  /** One field of a published schema: a type, and the values of a short enumeration. */
@@ -12131,8 +12474,7 @@ function advertisedJson(schema) {
12131
12474
  }
12132
12475
  } };
12133
12476
  }
12134
- //#endregion
12135
- //#region ../mcp/dist/server.js
12477
+ // ../mcp/dist/server.js
12136
12478
  /** Name of the server, as the AI tools' configurations declare it (`mcpServers.agentplugged`). */
12137
12479
  const MCP_SERVER_NAME = "agentplugged";
12138
12480
  /**
@@ -12554,8 +12896,7 @@ async function runAgentServer(options) {
12554
12896
  if (!await pending.settled(timeout)) options.onerror?.(/* @__PURE__ */ new Error(`agentplugged mcp: calls still running after ${timeout} ms were abandoned`));
12555
12897
  await handle.close();
12556
12898
  }
12557
- //#endregion
12558
- //#region src/history-text.ts
12899
+ // src/history-text.ts
12559
12900
  const pad = (value, width = 2) => String(value).padStart(width, "0");
12560
12901
  /** True for a C0 or C1 control character (ESC included), DEL, or a bidi embedding or isolate. */
12561
12902
  function unsafe(code) {
@@ -12689,8 +13030,7 @@ function formatValidationHistory(t, result) {
12689
13030
  }
12690
13031
  return `${lines.join("\n")}\n`;
12691
13032
  }
12692
- //#endregion
12693
- //#region src/error-text.ts
13033
+ // src/error-text.ts
12694
13034
  /**
12695
13035
  * The message of an error in the creator's language. A `reason_key` in the details (a schema
12696
13036
  * reason core recognised) replaces the English `reason` with its translation; the `action` a
@@ -12719,8 +13059,7 @@ function errorMessage(t, error) {
12719
13059
  if (error.message_key === "error.checkpoint_open" && isMessageKey(actionKey)) params.action = t(actionKey);
12720
13060
  return isMessageKey(error.message_key) ? t(error.message_key, params) : error.message_key;
12721
13061
  }
12722
- //#endregion
12723
- //#region src/prompt.ts
13062
+ // src/prompt.ts
12724
13063
  /**
12725
13064
  * The keys of a secret typed in a raw terminal, character by character: escape sequences (arrows,
12726
13065
  * function keys: CSI `ESC [ … final`, SS3 `ESC O x`, Alt+key `ESC x`) are dropped whole, even split
@@ -13040,8 +13379,7 @@ async function chooseMany(t, prompter, spec) {
13040
13379
  prompter.say(numberedOptions(spec.options));
13041
13380
  return askSelection(t, prompter, spec.question, spec.options.length, spec.fallback);
13042
13381
  }
13043
- //#endregion
13044
- //#region src/agent-flow.ts
13382
+ // src/agent-flow.ts
13045
13383
  function numbered(labels) {
13046
13384
  const width = String(labels.length).length;
13047
13385
  return labels.map((label, i) => ` ${String(i + 1).padStart(width)}. ${label}`).join("\n");
@@ -13111,8 +13449,7 @@ function formatAgentResult(t, result) {
13111
13449
  }
13112
13450
  }
13113
13451
  }
13114
- //#endregion
13115
- //#region src/bridge-launcher.ts
13452
+ // src/bridge-launcher.ts
13116
13453
  /** The file where an installation of the bridge says where its program is: `{ "entry": "<absolute path>" }`. */
13117
13454
  const BRIDGE_POINTER_FILE = "install.json";
13118
13455
  /** The folder an installation of the bridge writes its pointer in, on each system. */
@@ -13308,8 +13645,7 @@ async function runBridgeLauncher(environment, t) {
13308
13645
  }
13309
13646
  return runProgram(entry, environment.argv[0] === "pair" || environment.argv[0] === "device" ? environment.argv : environment.argv.slice(1), environment, t("bridge.launcher.not_installed"));
13310
13647
  }
13311
- //#endregion
13312
- //#region src/story-text.ts
13648
+ // src/story-text.ts
13313
13649
  /** The commit hook's line: active, chained, or the line the creator adds by hand. */
13314
13650
  function hookLine(t, result) {
13315
13651
  const { hook } = result;
@@ -13392,8 +13728,7 @@ function formatStoryPullRequest(t, result) {
13392
13728
  lines.push(...fastTrackLines(t, result.fast_track));
13393
13729
  return `${lines.join("\n")}\n`;
13394
13730
  }
13395
- //#endregion
13396
- //#region src/ci-text.ts
13731
+ // src/ci-text.ts
13397
13732
  /**
13398
13733
  * What `story ci` read: the CI's status on the story's branch, the failed checks,
13399
13734
  * then who to relaunch on a failure (or the block to lift first), and the pull request. With
@@ -13436,8 +13771,7 @@ function formatCiSetup(t, result) {
13436
13771
  t("ci.setup.next")
13437
13772
  ].join("\n")}\n`;
13438
13773
  }
13439
- //#endregion
13440
- //#region src/menu.ts
13774
+ // src/menu.ts
13441
13775
  /** What the creator asked for with Escape: the question before this one. */
13442
13776
  var GoBack = class extends Error {
13443
13777
  constructor() {
@@ -13518,8 +13852,7 @@ function createMenu(input, output) {
13518
13852
  }))
13519
13853
  };
13520
13854
  }
13521
- //#endregion
13522
- //#region src/codex-trust-flow.ts
13855
+ // src/codex-trust-flow.ts
13523
13856
  const CODEX_CONFIG = ".codex/config.toml";
13524
13857
  /**
13525
13858
  * Codex runs the project's hooks only once the creator approved them (layer 2). After
@@ -13582,8 +13915,7 @@ async function offerCodexTrust(options) {
13582
13915
  function isCancelled(error) {
13583
13916
  return error instanceof AgentPluggedError && error.code === ErrorCode.CANCELLED;
13584
13917
  }
13585
- //#endregion
13586
- //#region src/deferred-text.ts
13918
+ // src/deferred-text.ts
13587
13919
  /** Where an item comes from, who treats it, what it locks and when: one indented line. */
13588
13920
  function detailLine(t, item) {
13589
13921
  const story = item.story === null ? null : displayText(item.story);
@@ -13668,8 +14000,7 @@ function formatDeferred(t, result) {
13668
14000
  function deferredJson(result) {
13669
14001
  return `${JSON.stringify(result, null, 2)}\n`;
13670
14002
  }
13671
- //#endregion
13672
- //#region src/docs-text.ts
14003
+ // src/docs-text.ts
13673
14004
  /** The summary of `docs check`, for stdout: what was checked, and against which base. */
13674
14005
  function formatDocsSummary(t, root, result) {
13675
14006
  const lines = [t("docs.check.title", {
@@ -13737,12 +14068,64 @@ function formatDeckDrawn(result) {
13737
14068
  `deck: ${result.deck}`
13738
14069
  ].join("\n")}\n`;
13739
14070
  }
14071
+ /**
14072
+ * The answer of `docs sheet`: one line per story sheet (lines, excerpts, whether written), the
14073
+ * citations no document holds, the sheets over the ceiling, and the stories to validate again.
14074
+ */
14075
+ function formatSheetsWritten(result) {
14076
+ const lines = result.sheets.map((sheet) => `${sheet.written ? "written" : "unchanged"}: ${sheet.path} (${sheet.lines} lines, ${sheet.excerpts} excerpts)`);
14077
+ for (const sheet of result.sheets) {
14078
+ if (sheet.unresolved.length > 0) lines.push(`not_found: ${sheet.story}: ${sheet.unresolved.join(", ")}`);
14079
+ if (sheet.too_long) lines.push(`too_long: ${sheet.story}: over ${result.max_lines} lines, cut the story`);
14080
+ }
14081
+ if (result.revalidate.length > 0) lines.push(`validate_again: ${result.revalidate.join(", ")}`);
14082
+ if (result.sheets.length === 0) lines.push("sheets: none");
14083
+ return `${lines.join("\n")}\n`;
14084
+ }
13740
14085
  /** The answer of `docs costs`: estimates, said so, and the break-even point when asked. */
13741
14086
  function formatCostsResult(result) {
13742
14087
  return `${costsLines(result).join("\n")}\n`;
13743
14088
  }
13744
- //#endregion
13745
- //#region src/environment-flow.ts
14089
+ /**
14090
+ * The answer of `docs read`: each passage under its identifier and document, the outline of a
14091
+ * document named alone, the passages left out for want of room, and the selectors no document holds.
14092
+ */
14093
+ function formatSectionsRead(result) {
14094
+ const lines = [];
14095
+ for (const found of result.passages) {
14096
+ lines.push(`## ${found.id} (${found.source})`, found.text);
14097
+ if (found.more > 0) lines.push(`... ${found.more} more lines in ${found.source}`);
14098
+ }
14099
+ for (const outline of result.outlines) {
14100
+ lines.push(`## outline of ${outline.source} (${outline.lines} lines)`);
14101
+ for (const section of outline.sections) lines.push(`- ${section.selector} (${section.lines} lines): ${section.title}`);
14102
+ }
14103
+ if (result.omitted.length > 0) lines.push(`omitted: ${result.omitted.join(", ")}`);
14104
+ if (result.not_found.length > 0) lines.push(`not_found: ${result.not_found.join(", ")}`);
14105
+ if (lines.length === 0) lines.push("passages: none");
14106
+ return `${lines.join("\n")}\n`;
14107
+ }
14108
+ /** The answer of `docs profile`: the file as written, and what was done to it. */
14109
+ function formatProfileShown(result) {
14110
+ const { path, state, lines } = result.profile;
14111
+ return `${`${state === "created" || state === "refreshed" ? `profile ${state}: ${path}` : state === "current" ? `profile current: ${path}` : state === "stale" ? `profile stale (the root files say more): ${path}; "docs profile refresh" rewrites it` : `no profile yet: "docs profile refresh" writes ${path}`}\n${lines.join("\n")}`.trimEnd()}\n`;
14112
+ }
14113
+ /** The answer of `docs bricks`: the bricks that answer the request, or the clear "nothing like it". */
14114
+ function formatBricksFound(result) {
14115
+ const { bricks } = result;
14116
+ if (bricks.declared !== void 0) return `single source declared: ${bricks.declared.concept} -> ${bricks.declared.owner}\n`;
14117
+ const lines = [];
14118
+ for (const source of bricks.sources) {
14119
+ const rule = source.rule === "" ? "" : ` (${source.rule})`;
14120
+ lines.push(`single source "${source.concept}": ${source.owner}${rule} - use it, do not rewrite it`);
14121
+ }
14122
+ for (const hit of bricks.hits) lines.push(`${hit.kind} ${hit.sig} ${hit.path}:${hit.line}`);
14123
+ if (bricks.unavailable !== void 0) lines.push(`registry unavailable (${bricks.unavailable}): search the code with your own tools, then decide`);
14124
+ else if (bricks.hits.length === 0 && bricks.sources.length === 0) lines.push(`nothing like "${bricks.query.join(" ")}" among ${bricks.searched?.total ?? 0} bricks (commit ${bricks.searched?.commit ?? "?"}): write it, it joins the registry once merged`);
14125
+ else if (bricks.searched !== void 0) lines.push(`(${bricks.searched.total} bricks searched, commit ${bricks.searched.commit})`);
14126
+ return `${lines.join("\n")}\n`;
14127
+ }
14128
+ // src/environment-flow.ts
13746
14129
  /**
13747
14130
  * The report of `doctor` and its repairs at the terminal: one line per point (✓ ready,
13748
14131
  * ⚠ to improve, ✗ blocking), then for each point the engine can repair, the exact command, one
@@ -14076,8 +14459,7 @@ async function runDoctorCommand(environment, t, locale, registry, context, repor
14076
14459
  if (final.counts.warn > 0 || final.counts.fail > 0) environment.stdout(`\n${t("doctor.later")}\n`);
14077
14460
  return final.blocking ? 1 : 0;
14078
14461
  }
14079
- //#endregion
14080
- //#region src/eval-flow.ts
14462
+ // src/eval-flow.ts
14081
14463
  const MODES = [
14082
14464
  "quality",
14083
14465
  "baseline",
@@ -14537,8 +14919,7 @@ async function runEval(environment, t) {
14537
14919
  environment.stderr(`${t("eval.error.usage")}\n`);
14538
14920
  return 2;
14539
14921
  }
14540
- //#endregion
14541
- //#region src/export-target.ts
14922
+ // src/export-target.ts
14542
14923
  /** Folders an export never goes into: the method's own, and Git's. */
14543
14924
  const FORBIDDEN_FOLDERS = /* @__PURE__ */ new Set([".agentplugged", ".git"]);
14544
14925
  function invalid(path, why) {
@@ -14598,8 +14979,7 @@ const NO_KEYCHAIN = {
14598
14979
  writeProductBackup: noKeychain,
14599
14980
  readProductBackup: noKeychain
14600
14981
  };
14601
- //#endregion
14602
- //#region src/init-flow.ts
14982
+ // src/init-flow.ts
14603
14983
  /**
14604
14984
  * The questions `init` adds to the profile's: the AI tools to wire in, what their
14605
14985
  * permissions look like, and the sentence that ends the installation. Every question has a
@@ -14657,8 +15037,7 @@ function formatNextStep(t, tools, synced) {
14657
15037
  tools: names.join(", ")
14658
15038
  })}\n`;
14659
15039
  }
14660
- //#endregion
14661
- //#region src/key-flow.ts
15040
+ // src/key-flow.ts
14662
15041
  /**
14663
15042
  * The product key at the terminal: the secret prompts of `key export` and
14664
15043
  * `key import`, the export file, and what the commands and `init` did. The key itself is never
@@ -14805,8 +15184,118 @@ function formatInitProductKey(t, productKey) {
14805
15184
  }
14806
15185
  }
14807
15186
  }
14808
- //#endregion
14809
- //#region src/link-hint.ts
15187
+ // src/kimi-hooks.ts
15188
+ /** The folder of Kimi's settings: `$KIMI_CODE_HOME`, else `.kimi-code` in the home folder. */
15189
+ function kimiHome(env) {
15190
+ const given = env.KIMI_CODE_HOME?.trim();
15191
+ if (given) return given;
15192
+ const home = env.USERPROFILE?.trim() || env.HOME?.trim() || homedir();
15193
+ return join(home, ".kimi-code");
15194
+ }
15195
+ /** The user's Kimi settings file. */
15196
+ function kimiConfigPath(env) {
15197
+ return join(kimiHome(env), "config.toml");
15198
+ }
15199
+ /** The words that run the engine from the hook: this very version, through `npx`. */
15200
+ function kimiEngine(engineVersion) {
15201
+ return `npx -y agentplugged@${engineVersion}`;
15202
+ }
15203
+ /** The program of this engine (`bin.js` next to the code that runs), or undefined for a test or a bundle without it. */
15204
+ function ownEntry() {
15205
+ try {
15206
+ const entry = fileURLToPath(new URL("./bin.js", import.meta.url));
15207
+ return existsSync(entry) ? entry : void 0;
15208
+ } catch {
15209
+ return;
15210
+ }
15211
+ }
15212
+ async function readIfThere(path) {
15213
+ try {
15214
+ return await readFile(path, "utf8");
15215
+ } catch (error) {
15216
+ if (error.code === "ENOENT") return void 0;
15217
+ throw error;
15218
+ }
15219
+ }
15220
+ /** What the user's settings hold of the product's hooks; `missing` when the file cannot be read. */
15221
+ async function readKimiHooksState(env, engineVersion) {
15222
+ try {
15223
+ return kimiHooksState(await readIfThere(kimiConfigPath(env)), kimiEngine(engineVersion), existsSync);
15224
+ } catch {
15225
+ return "missing";
15226
+ }
15227
+ }
15228
+ /** A name for the copy made before a write: the file's name, then the time to the second. */
15229
+ function backupPath(path, now) {
15230
+ return `${path}.agentplugged-backup-${new Date(now).toISOString().replace(/[-:]/g, "").slice(0, 15)}`;
15231
+ }
15232
+ /** Runs the command; the exit code. */
15233
+ async function runKimiHooks(environment, t, args) {
15234
+ const [action, ...extra] = args;
15235
+ if (action !== "install" && action !== "remove" && action !== "status" || extra.length > 0) {
15236
+ environment.stderr(`${t("kimi_hooks.usage")}\n`);
15237
+ return 1;
15238
+ }
15239
+ const path = kimiConfigPath(environment.env);
15240
+ const engine = kimiEngine(environment.engineVersion);
15241
+ const entry = environment.entry ?? ownEntry();
15242
+ const say = (key, params = {}) => environment.stdout(`${t(key, {
15243
+ path,
15244
+ ...params
15245
+ })}\n`);
15246
+ let text;
15247
+ try {
15248
+ text = await readIfThere(path);
15249
+ } catch (error) {
15250
+ environment.stderr(`${t("kimi_hooks.unreadable", {
15251
+ path,
15252
+ reason: error instanceof Error ? error.message : String(error)
15253
+ })}\n`);
15254
+ return 1;
15255
+ }
15256
+ if (action === "status") {
15257
+ say(`kimi_hooks.status.${kimiHooksState(text, engine, existsSync)}`);
15258
+ return 0;
15259
+ }
15260
+ const edit = action === "install" ? withKimiHooks(text, engine, entry) : withoutKimiHooks(text ?? "");
15261
+ if (edit.kind === "refused") {
15262
+ environment.stderr(`${t(`kimi_hooks.refused.${edit.reason}`, { path })}\n`);
15263
+ return 1;
15264
+ }
15265
+ if (edit.kind === "unchanged") {
15266
+ say(action === "install" ? "kimi_hooks.already" : "kimi_hooks.nothing_to_remove");
15267
+ return 0;
15268
+ }
15269
+ try {
15270
+ let backup;
15271
+ if (text !== void 0) {
15272
+ const base = backupPath(path, (environment.now ?? Date.now)());
15273
+ for (let n = 0; backup === void 0; n++) {
15274
+ const candidate = n === 0 ? base : `${base}-${n}`;
15275
+ try {
15276
+ await copyFile(path, candidate, constants.COPYFILE_EXCL);
15277
+ backup = candidate;
15278
+ } catch (error) {
15279
+ if (error.code !== "EEXIST" || n > 50) throw error;
15280
+ }
15281
+ }
15282
+ }
15283
+ if (edit.text === "" && action === "remove") await rm(path);
15284
+ else {
15285
+ await mkdir(dirname(path), { recursive: true });
15286
+ await writeFile(path, edit.text, "utf8");
15287
+ }
15288
+ say(action === "install" ? "kimi_hooks.installed" : "kimi_hooks.removed", backup === void 0 ? { backup: t("kimi_hooks.no_backup") } : { backup });
15289
+ return 0;
15290
+ } catch (error) {
15291
+ environment.stderr(`${t("kimi_hooks.unwritable", {
15292
+ path,
15293
+ reason: error instanceof Error ? error.message : String(error)
15294
+ })}\n`);
15295
+ return 1;
15296
+ }
15297
+ }
15298
+ // src/link-hint.ts
14810
15299
  /**
14811
15300
  * The one line that ends `init` when this product is not linked to the web app yet: the command
14812
15301
  * that does it, nothing asked, nothing done. The method works alone either way. Whether the product
@@ -14847,8 +15336,7 @@ async function linkHint(t, root, env, platform) {
14847
15336
  if (await isLinkedToWebApp(root, env, platform)) return void 0;
14848
15337
  return `\n${t("init.link.hint")}\n`;
14849
15338
  }
14850
- //#endregion
14851
- //#region src/migrate-text.ts
15339
+ // src/migrate-text.ts
14852
15340
  /** One change of a step the creator should know, on one line. */
14853
15341
  function noteLine(t, note) {
14854
15342
  switch (note.kind) {
@@ -14933,8 +15421,7 @@ function formatMigrate(t, result, path) {
14933
15421
  lines.push(result.event === "no_repo" ? t("migrate.next_step.no_repo") : t("migrate.next_step", { path }));
14934
15422
  return `${lines.join("\n")}\n`;
14935
15423
  }
14936
- //#endregion
14937
- //#region src/workflow-flow.ts
15424
+ // src/workflow-flow.ts
14938
15425
  /**
14939
15426
  * The questions of the Git workflow, asked by `init` and `profile` and, in the chat, by
14940
15427
  * Noah: each choice in a short menu with the recommended option marked and a sentence that says why,
@@ -15167,17 +15654,17 @@ function workflowFromOptions(options, base) {
15167
15654
  ...start.environments === void 0 ? {} : { environments: start.environments }
15168
15655
  };
15169
15656
  }
15170
- //#endregion
15171
- //#region src/next-text.ts
15657
+ // src/next-text.ts
15172
15658
  /**
15173
15659
  * How the creator calls an agent in a tool: `/iris` in Claude Code (its skill), `@agent-iris` in
15174
- * Antigravity CLI and Cursor (their sub-agents), and by its name in Codex, which has no command.
15660
+ * Antigravity CLI and Cursor (their sub-agents), `/skill:iris` in Kimi, and by its name in Codex, which has no command.
15175
15661
  */
15176
15662
  function agentCall(tool, id) {
15177
15663
  switch (tool) {
15178
15664
  case "claude-code": return `/${id}`;
15179
15665
  case "antigravity":
15180
15666
  case "cursor": return `@agent-${id}`;
15667
+ case "kimi": return `/skill:${id}`;
15181
15668
  case "codex": return;
15182
15669
  }
15183
15670
  }
@@ -15258,6 +15745,32 @@ function waitingLine(t, result) {
15258
15745
  title
15259
15746
  });
15260
15747
  }
15748
+ /** An answer of the creator the engine could not carry out, and what to do; the same failure twice. */
15749
+ function failureLines(t, result) {
15750
+ const lines = [];
15751
+ for (const point of result.waiting) {
15752
+ if (point.failure === void 0) continue;
15753
+ const id = displayText(point.id);
15754
+ lines.push(point.failure.reason === "base_dirty" ? t("next.failure.base_dirty", { id }) : t("next.failure.other", {
15755
+ id,
15756
+ code: displayText(point.failure.code),
15757
+ reason: displayText(point.failure.reason ?? "-")
15758
+ }));
15759
+ }
15760
+ const refused = result.refused;
15761
+ if (refused !== void 0) lines.push(t("next.refused", {
15762
+ action: displayText(refused.action),
15763
+ code: displayText(refused.code),
15764
+ times: refused.times,
15765
+ gesture: displayText(refused.do)
15766
+ }));
15767
+ const repeated = result.change_method;
15768
+ if (repeated !== void 0) lines.push(t("next.change_method", {
15769
+ cause: displayText(repeated.cause),
15770
+ what: displayText(repeated.what)
15771
+ }));
15772
+ return lines;
15773
+ }
15261
15774
  /** The sprint in force, when there is one: its goal and how many stories are done. */
15262
15775
  function sprintLines(t, result) {
15263
15776
  const sprint = result.sprint;
@@ -15294,6 +15807,7 @@ function formatNext(t, result) {
15294
15807
  phaseLine(t, result),
15295
15808
  agentLine(t, result),
15296
15809
  waitingLine(t, result),
15810
+ ...failureLines(t, result),
15297
15811
  ...sprintLines(t, result)
15298
15812
  ];
15299
15813
  const lock = result.deferred;
@@ -15344,6 +15858,13 @@ function formatNext(t, result) {
15344
15858
  if (queue !== void 0) lines.push(t("next.merge_queue", { queue: queue.map((entry) => `${entry.position}. ${displayText(entry.story)}`).join(", ") }));
15345
15859
  const latePages = result.late_pages;
15346
15860
  if (latePages !== void 0) lines.push(t("next.late_pages", { pages: latePages.map((page) => displayText(page.path)).join(", ") }));
15861
+ const reading = result.reading;
15862
+ if (reading !== void 0) lines.push(t("next.reading", {
15863
+ ids: reading.passages.map((found) => displayText(found.id)).join(", "),
15864
+ command: displayText(reading.command)
15865
+ }));
15866
+ const staleSheets = result.stale_sheets;
15867
+ if (staleSheets !== void 0) lines.push(t("next.stale_sheets", { stories: staleSheets.map((sheet) => `${displayText(sheet.story)} (${displayText(sheet.command)})`).join(", ") }));
15347
15868
  const background = result.background;
15348
15869
  if (background !== void 0) lines.push(t("next.background", {
15349
15870
  agent: displayText(background.agent_name),
@@ -15402,12 +15923,15 @@ function nextJson(result) {
15402
15923
  agent: result.agent,
15403
15924
  agent_name: result.agent_name,
15404
15925
  tool: result.tool,
15405
- waiting: result.waiting.map(({ id, title, type, risk }) => ({
15926
+ waiting: result.waiting.map(({ id, title, type, risk, failure }) => ({
15406
15927
  id,
15407
15928
  title,
15408
15929
  type,
15409
- risk
15930
+ risk,
15931
+ ...failure === void 0 ? {} : { failure: { ...failure } }
15410
15932
  })),
15933
+ ...result.change_method === void 0 ? {} : { change_method: { ...result.change_method } },
15934
+ ...result.refused === void 0 ? {} : { refused: { ...result.refused } },
15411
15935
  command: result.command,
15412
15936
  answer: result.answer ?? null,
15413
15937
  ...result.answer_reason === void 0 ? {} : { answer_reason: result.answer_reason },
@@ -15464,6 +15988,8 @@ function nextJson(result) {
15464
15988
  more: result.pile.more
15465
15989
  } },
15466
15990
  ...result.morning === void 0 ? {} : { morning: result.morning },
15991
+ ...result.reading === void 0 ? {} : { reading: result.reading },
15992
+ ...result.stale_sheets === void 0 ? {} : { stale_sheets: result.stale_sheets.map((sheet) => ({ ...sheet })) },
15467
15993
  ...result.journey === void 0 ? {} : { journey: result.journey },
15468
15994
  ...result.git === void 0 ? {} : { git: result.git },
15469
15995
  ...result.review === void 0 ? {} : { review: {
@@ -15479,8 +16005,7 @@ function nextJson(result) {
15479
16005
  function nextJsonError(error) {
15480
16006
  return `${JSON.stringify({ error: error.toPayload() }, null, 2)}\n`;
15481
16007
  }
15482
- //#endregion
15483
- //#region src/profile-flow.ts
16008
+ // src/profile-flow.ts
15484
16009
  const indexesOf = (catalog, values) => catalog.flatMap((value, i) => values.includes(value) ? [i] : []);
15485
16010
  /**
15486
16011
  * Asks for the profile: a starting profile, then, on request, domains, phases and developers.
@@ -15600,8 +16125,7 @@ function formatProfile(t, profile) {
15600
16125
  ` ${inactive.length === 0 ? t("profile.summary.inactive.none") : t("profile.summary.inactive", { list: inactive.join(", ") })}`
15601
16126
  ].join("\n")}\n`;
15602
16127
  }
15603
- //#endregion
15604
- //#region src/publication-text.ts
16128
+ // src/publication-text.ts
15605
16129
  /**
15606
16130
  * A text written by an agent, line by line: every control character (ESC included) and bidi
15607
16131
  * override is a space, so that a deliverable can neither move the cursor nor fake a line of the
@@ -15659,8 +16183,7 @@ function formatPublicationExported(t, exported) {
15659
16183
  lines.push(t("publication.export.reminder"));
15660
16184
  return `${lines.join("\n")}\n`;
15661
16185
  }
15662
- //#endregion
15663
- //#region src/review-flow.ts
16186
+ // src/review-flow.ts
15664
16187
  /** A label of the catalog, or the key itself when the catalog has none. */
15665
16188
  function label(t, key) {
15666
16189
  return isMessageKey(key) ? t(key) : key;
@@ -16106,8 +16629,7 @@ function formatKey(t, result) {
16106
16629
  if (result.status === "already_linked") return `${t("key.presence.already")}\n`;
16107
16630
  return `${t("key.presence.linked", { alg: result.alg ?? "" })}\n`;
16108
16631
  }
16109
- //#endregion
16110
- //#region src/rules-text.ts
16632
+ // src/rules-text.ts
16111
16633
  /** One warning about the permission rules, in the creator's language. */
16112
16634
  function formatRulesWarning(t, warning) {
16113
16635
  switch (warning.kind) {
@@ -16201,8 +16723,7 @@ function formatSyncRules(t, rules) {
16201
16723
  }));
16202
16724
  return `\n${t("rules.warnings.title")}\n${lines.map((line) => ` ${line}`).join("\n")}\n`;
16203
16725
  }
16204
- //#endregion
16205
- //#region src/tests-text.ts
16726
+ // src/tests-text.ts
16206
16727
  /**
16207
16728
  * What `tests setup` did: the proposal written, or why not, then the runners of the
16208
16729
  * two levels, the line that runs the tests of a criterion, what must be installed (through the
@@ -16250,8 +16771,7 @@ function formatTestsSetup(t, result) {
16250
16771
  for (const note of plan.notes) lines.push(t("tests.setup.note", { note: displayText(note) }));
16251
16772
  return `${lines.join("\n")}\n`;
16252
16773
  }
16253
- //#endregion
16254
- //#region src/trace-text.ts
16774
+ // src/trace-text.ts
16255
16775
  /** Longest requirement text shown on one line of the overview. */
16256
16776
  const MAX_TEXT = 90;
16257
16777
  /** A text from a document or an agent, on one line, without control characters, cut. */
@@ -16376,8 +16896,7 @@ function formatTrace(t, result) {
16376
16896
  function traceJson(result) {
16377
16897
  return `${JSON.stringify(result, null, 2)}\n`;
16378
16898
  }
16379
- //#endregion
16380
- //#region src/trust-flow.ts
16899
+ // src/trust-flow.ts
16381
16900
  /**
16382
16901
  * `trust dismiss` at the terminal: the way out of `SECURITY_ROOT_CHANGED`. It
16383
16902
  * names the event that raised the alert, asks one question (« Écarter cet événement ? o/N »,
@@ -16423,8 +16942,7 @@ async function runTrustDismiss(t, prompter, registry, context, io) {
16423
16942
  io.stdout(text(t, done.value));
16424
16943
  return 0;
16425
16944
  }
16426
- //#endregion
16427
- //#region src/update-flow.ts
16945
+ // src/update-flow.ts
16428
16946
  /** `on` or `off` (also `true`, `false`, `yes`, `no`, `oui`, `non`); undefined for anything else. */
16429
16947
  function toggle(value) {
16430
16948
  const word = value?.trim().toLowerCase();
@@ -16482,8 +17000,7 @@ async function runUpdate(environment, t) {
16482
17000
  environment.stdout(`${t(moved.product === "updated" ? "update.done" : "update.done_pinned", { version: target.version })}\n`);
16483
17001
  return 0;
16484
17002
  }
16485
- //#endregion
16486
- //#region src/usage-text.ts
17003
+ // src/usage-text.ts
16487
17004
  /** The rows `usage` prints: the heaviest; `--json` gives them all. */
16488
17005
  const MAX_ROWS = 10;
16489
17006
  const number = (value) => value.toLocaleString("en-US").replaceAll(",", " ");
@@ -16566,8 +17083,7 @@ function formatUsage(t, report) {
16566
17083
  }));
16567
17084
  return `${lines.join("\n")}\n`;
16568
17085
  }
16569
- //#endregion
16570
- //#region src/main.ts
17086
+ // src/main.ts
16571
17087
  /** The warning of `--engine-any` when `method.yaml` pins another engine version. */
16572
17088
  function engineAnyWarning(environment, t, engine) {
16573
17089
  return `${t(engine.older ? "cli.warning.engine_any.older" : "cli.warning.engine_any", {
@@ -16804,6 +17320,7 @@ async function runMcp(environment, t, files, engineAny) {
16804
17320
  files,
16805
17321
  journal,
16806
17322
  projectRoot: environment.cwd,
17323
+ kimiHooks: await readKimiHooksState(environment.env, environment.engineVersion),
16807
17324
  journalBackup: saving,
16808
17325
  tools: new NodeToolProbe({ env: environment.env }),
16809
17326
  ...environmentProbeOf(environment) === void 0 ? {} : { environment: environmentProbeOf(environment) },
@@ -16903,6 +17420,7 @@ function conversationOf(input, env) {
16903
17420
  */
16904
17421
  async function runHook(environment, t, rest) {
16905
17422
  const [tool, event, ...extra] = rest;
17423
+ if (tool === "kimi") return await runKimiHook(environment, t, [event ?? "", ...extra]);
16906
17424
  const pre = event === "pre-tool";
16907
17425
  if (tool !== "antigravity" && tool !== "codex" && tool !== "cursor" || !pre && event !== "post-tool" || extra.length > 0) {
16908
17426
  environment.stderr(formatError(t, invalidArguments(`hook: ${rest.join(" ") || "(nothing)"}`)));
@@ -16975,6 +17493,105 @@ async function runHook(environment, t, rest) {
16975
17493
  }
16976
17494
  return 0;
16977
17495
  }
17496
+ /**
17497
+ * The nearest folder (from `cwd` up) that is a product served by Kimi: it holds the product's
17498
+ * configuration and the policy `sync` wrote for Kimi. The hook lives in the user's settings, so it
17499
+ * runs in every project Kimi opens; anywhere else it does nothing.
17500
+ */
17501
+ function kimiProductRoot(cwd) {
17502
+ let folder = cwd;
17503
+ for (let level = 0; level < 16; level++) {
17504
+ if (existsSync(join(folder, ".agentplugged", "method.yaml")) && existsSync(join(folder, ".kimi-code", "agentplugged-policy.json"))) return folder;
17505
+ const parent = dirname(folder);
17506
+ if (parent === folder) return void 0;
17507
+ folder = parent;
17508
+ }
17509
+ }
17510
+ /**
17511
+ * `agentplugged hook kimi pre-tool`: the command of the `PreToolUse` hook that `kimi-hooks install`
17512
+ * puts in the user's Kimi settings. Kimi sends the hook's input as JSON on standard input; the
17513
+ * answer is Kimi's: nothing to let the call through, or a JSON denial on standard output. It applies
17514
+ * the product's rules (the policy `sync` wrote in the project), holds the call while the team is
17515
+ * paused, and records a read of outside content. A Kimi hook cannot ask, so a rule that asks is a
17516
+ * denial that tells the agent to ask the creator in the chat. Outside a product served by Kimi it
17517
+ * does nothing; where the engine cannot check a call of a product, the call is denied.
17518
+ */
17519
+ async function runKimiHook(environment, t, rest) {
17520
+ if (rest.length !== 1 || rest[0] !== "pre-tool") {
17521
+ environment.stderr(formatError(t, invalidArguments(`hook: kimi ${rest.join(" ")}`.trim())));
17522
+ return 1;
17523
+ }
17524
+ const deny = (reason) => environment.stdout(`${JSON.stringify({ hookSpecificOutput: {
17525
+ hookEventName: "PreToolUse",
17526
+ permissionDecision: "deny",
17527
+ permissionDecisionReason: reason
17528
+ } })}\n`);
17529
+ let served = false;
17530
+ let journal;
17531
+ try {
17532
+ const input = JSON.parse(await readAll(environment.stdin));
17533
+ const given = input?.cwd;
17534
+ const cwd = typeof given === "string" && given.trim() !== "" ? given : environment.cwd;
17535
+ const root = kimiProductRoot(cwd);
17536
+ if (root === void 0) return 0;
17537
+ served = true;
17538
+ const call = kimiCallOf(input);
17539
+ if (call === void 0) return 0;
17540
+ const home = environment.env.USERPROFILE?.trim() || environment.env.HOME?.trim() || homedir();
17541
+ const keys = keyStoreOf(environment.env);
17542
+ journal = new GitStateStore({
17543
+ cwd: root,
17544
+ keys,
17545
+ ...keyLockOf(environment)
17546
+ });
17547
+ const conversation = kimiSessionOf(input);
17548
+ const context = {
17549
+ files: new NodeWorkspaceFiles(root),
17550
+ journal,
17551
+ tools: new NodeToolProbe({ env: environment.env }),
17552
+ method: shippedMethodOrUnavailable(),
17553
+ engineVersion: environment.engineVersion,
17554
+ engineAny: true,
17555
+ commandLine: "hook",
17556
+ keys,
17557
+ mainBranch: new GitMainBranchReader({ cwd: root }),
17558
+ docsBase: new GitDocsBase({ cwd: root }),
17559
+ chat: { project: root },
17560
+ projectRoot: root,
17561
+ actor: "agent",
17562
+ ...environment.platform === void 0 ? {} : { platform: environment.platform }
17563
+ };
17564
+ const place = {
17565
+ root,
17566
+ home,
17567
+ resolve: canonicalPath(root, home)
17568
+ };
17569
+ const decision = await guardToolCall(context, call, {
17570
+ place,
17571
+ conversation,
17572
+ flavor: KIMI_FLAVOR
17573
+ });
17574
+ if (decision.decision !== "allow") {
17575
+ deny(decision.decision === "ask" ? `${decision.reason} This tool cannot ask: ask the creator in the chat first, and do not work around it.` : decision.reason);
17576
+ return 0;
17577
+ }
17578
+ const held = await checkCallCommand.run(context, {
17579
+ tool: kimiCallTool(call),
17580
+ cwd,
17581
+ ...conversation === void 0 ? {} : { session: conversation }
17582
+ });
17583
+ if (held.ok && Object.keys(held.value).length > 0) {
17584
+ environment.stdout(`${JSON.stringify(held.value)}\n`);
17585
+ return 0;
17586
+ }
17587
+ await recordToolRead(context, call, conversation);
17588
+ } catch {
17589
+ if (served) deny(ANTIGRAVITY_UNCHECKED_REASON);
17590
+ } finally {
17591
+ journal?.close();
17592
+ }
17593
+ return 0;
17594
+ }
16978
17595
  const ACTION_KEYS = {
16979
17596
  created: "init.action.created",
16980
17597
  updated: "init.action.updated",
@@ -17070,7 +17687,8 @@ const SYNC_GROUPS = [
17070
17687
  "claude-code",
17071
17688
  "codex",
17072
17689
  "antigravity",
17073
- "cursor"
17690
+ "cursor",
17691
+ "kimi"
17074
17692
  ];
17075
17693
  function groupTitle(t, group) {
17076
17694
  if (group === "shared") return t("sync.group.shared");
@@ -17093,7 +17711,7 @@ function formatFallback(t, locale, fallback) {
17093
17711
  * What `sync` did, tool by tool and file by file, then its warnings, the fallbacks of the
17094
17712
  * targeted tools and, when Codex is targeted, the trust reminder.
17095
17713
  */
17096
- function formatSync(t, root, result, locale = "en") {
17714
+ function formatSync(t, root, result, locale = "en", kimiConfig = "~/.kimi-code/config.toml") {
17097
17715
  const labels = result.entries.map((entry) => t(SYNC_ACTION_KEYS[entry.action]));
17098
17716
  const width = Math.max(0, ...labels.map((label) => label.length));
17099
17717
  const lines = [];
@@ -17134,10 +17752,11 @@ function formatSync(t, root, result, locale = "en") {
17134
17752
  text += formatSyncRules(t, result.rules);
17135
17753
  if (result.codexTrustReminder) text += `\n${t("sync.codex_trust")}\n`;
17136
17754
  if (result.cursorHooksReminder) text += `\n${t("sync.cursor_hooks")}\n`;
17755
+ if (result.kimiHooks !== void 0 && result.kimiHooks !== "installed") text += `\n${t("sync.kimi_hooks", { path: kimiConfig })}\n`;
17137
17756
  return text;
17138
17757
  }
17139
17758
  /** What `sync` did when `init` ran it: a line, then what needs the creator's eye. */
17140
- function formatSyncCompact(t, result) {
17759
+ function formatSyncCompact(t, result, kimiConfig = "~/.kimi-code/config.toml") {
17141
17760
  const written = result.entries.filter((entry) => entry.action !== "unchanged").length;
17142
17761
  const lines = [t("init.sync.done", { count: written })];
17143
17762
  for (const warning of result.warnings) lines.push(` ${t(SYNC_WARNING_KEYS[warning.kind], {
@@ -17146,6 +17765,7 @@ function formatSyncCompact(t, result) {
17146
17765
  })}`);
17147
17766
  if (result.codexTrustReminder) lines.push("", t("sync.codex_trust"));
17148
17767
  if (result.cursorHooksReminder) lines.push("", t("sync.cursor_hooks"));
17768
+ if (result.kimiHooks !== void 0 && result.kimiHooks !== "installed") lines.push("", t("sync.kimi_hooks", { path: kimiConfig }));
17149
17769
  return `${lines.join("\n")}\n`;
17150
17770
  }
17151
17771
  function formatSource(t, source) {
@@ -17840,6 +18460,7 @@ async function main(rawEnvironment) {
17840
18460
  return failCode;
17841
18461
  }
17842
18462
  if (command === "hook") return await runHook(environment, t, rest);
18463
+ if (command === "kimi-hooks") return await runKimiHooks(environment, t, rest);
17843
18464
  if (command === "mcp") {
17844
18465
  const options = environment.argv.filter((arg) => arg.startsWith("-") && arg !== "--engine-any");
17845
18466
  if (rest.length > 0 || options.length > 0 || upgradeEngine) {
@@ -18150,12 +18771,12 @@ async function main(rawEnvironment) {
18150
18771
  } else if (command === "docs") {
18151
18772
  const [action, ...extra] = rest;
18152
18773
  if (action === "slides" && extra.length === 0) input = { action };
18153
- else if (action === "path" || action === "research" || action === "costs") input = {
18774
+ else if (action === "path" || action === "research" || action === "costs" || action === "sheet" || action === "read" || action === "profile" || action === "bricks") input = {
18154
18775
  action,
18155
18776
  words: extra
18156
18777
  };
18157
18778
  else if (action !== "check" && action !== "grow" || extra.length > 0) {
18158
- reportError(invalidArguments(`${["docs", ...rest].join(" ")} (check, path, grow, research, slides, costs)`));
18779
+ reportError(invalidArguments(`${["docs", ...rest].join(" ")} (check, path, grow, research, slides, costs, sheet, read, profile, bricks)`));
18159
18780
  return failCode;
18160
18781
  } else input = {
18161
18782
  action,
@@ -18260,7 +18881,7 @@ async function main(rawEnvironment) {
18260
18881
  }
18261
18882
  const keys = keyStoreOf(environment.env);
18262
18883
  const signing = command === "init" || command === "review" || command === "key" || command === "trust" || closing || traceResolving || storyCiCommand && waiveOption !== void 0;
18263
- const reading = command === "history" || command === "next" || command === "publication" || command === "docs" || command === "usage" || command === "migrate" && checkOption || command === "deferred" && !closing || command === "trace" && !traceResolving;
18884
+ const reading = command === "history" || command === "next" || command === "sync" || command === "publication" || command === "docs" || command === "usage" || command === "migrate" && checkOption || command === "deferred" && !closing || command === "trace" && !traceResolving;
18264
18885
  journal = signing || command === "journal" || reading || command === "migrate" || command === "story" ? new GitStateStore({
18265
18886
  cwd: environment.cwd,
18266
18887
  keys: reading ? NO_KEYCHAIN : keys,
@@ -18285,6 +18906,7 @@ async function main(rawEnvironment) {
18285
18906
  files,
18286
18907
  journal,
18287
18908
  projectRoot: environment.cwd,
18909
+ ...command === "sync" || command === "init" ? { kimiHooks: await readKimiHooksState(environment.env, environment.engineVersion) } : {},
18288
18910
  journalSync: command === "journal" ? journal : void 0,
18289
18911
  tools: new NodeToolProbe({ env: environment.env }),
18290
18912
  ...machine === void 0 ? {} : { environment: machine },
@@ -18301,6 +18923,7 @@ async function main(rawEnvironment) {
18301
18923
  ...human === void 0 ? {} : { human },
18302
18924
  ...environment.platform === void 0 ? {} : { platform: environment.platform },
18303
18925
  ...command === "docs" || command === "review" || command === "publication" ? { docsBase: new GitDocsBase({ cwd: environment.cwd }) } : {},
18926
+ ...command === "docs" ? { codeSource: new GitCodeSource({ cwd: environment.cwd }) } : {},
18304
18927
  ...exportTarget === void 0 ? {} : { exportTarget },
18305
18928
  ...command === "sync" || command === "rules" || command === "next" || command === "review" ? { mainBranch: new GitMainBranchReader({ cwd: environment.cwd }) } : {},
18306
18929
  ...command === "story" || command === "review" || command === "init" || command === "profile" || command === "next" ? { storyWorkspace: storyWorkspaceOf(environment) } : {},
@@ -18350,6 +18973,7 @@ async function main(rawEnvironment) {
18350
18973
  ...rest[1] === void 0 ? {} : { device: rest[1] }
18351
18974
  };
18352
18975
  }
18976
+ if (command === "next") input = { reading: true };
18353
18977
  const result = await registry.run(command, context, input);
18354
18978
  if (!result.ok) {
18355
18979
  reportError(result.error);
@@ -18409,7 +19033,7 @@ async function main(rawEnvironment) {
18409
19033
  mainBranch: new GitMainBranchReader({ cwd: environment.cwd })
18410
19034
  }, {});
18411
19035
  if (generated.ok) {
18412
- environment.stdout(`\n${formatSyncCompact(t, generated.value)}`);
19036
+ environment.stdout(`\n${formatSyncCompact(t, generated.value, kimiConfigPath(environment.env))}`);
18413
19037
  environment.stdout(await codexTrustNote(environment, t, prompts, files));
18414
19038
  synced = true;
18415
19039
  } else environment.stderr(formatError(t, generated.error));
@@ -18433,7 +19057,7 @@ async function main(rawEnvironment) {
18433
19057
  environment.stdout(formatProductKey(t, value, file));
18434
19058
  } else environment.stdout(formatKey(t, value));
18435
19059
  } else if (command === "sync") {
18436
- environment.stdout(formatSync(t, files.root, result.value, locale));
19060
+ environment.stdout(formatSync(t, files.root, result.value, locale, kimiConfigPath(environment.env)));
18437
19061
  environment.stdout(await codexTrustNote(environment, t, prompts, files));
18438
19062
  } else if (command === "agent") environment.stdout(formatAgentResult(t, result.value));
18439
19063
  else if (command === "journal") environment.stdout(input.action === "status" ? formatJournalStatus(t, result.value, (environment.now ?? Date.now)()) : formatJournalSync(t, result.value));
@@ -18470,6 +19094,22 @@ async function main(rawEnvironment) {
18470
19094
  else if (command === "tests") environment.stdout(formatTestsSetup(t, result.value));
18471
19095
  else if (command === "docs") {
18472
19096
  const answered = result.value;
19097
+ if ("profile" in answered) {
19098
+ environment.stdout(formatProfileShown(answered));
19099
+ return 0;
19100
+ }
19101
+ if ("bricks" in answered) {
19102
+ environment.stdout(formatBricksFound(answered));
19103
+ return 0;
19104
+ }
19105
+ if ("passages" in answered) {
19106
+ environment.stdout(formatSectionsRead(answered));
19107
+ return answered.not_found.length > 0 ? 1 : 0;
19108
+ }
19109
+ if ("sheets" in answered) {
19110
+ environment.stdout(formatSheetsWritten(answered));
19111
+ return answered.sheets.some((sheet) => sheet.too_long) ? 1 : 0;
19112
+ }
18473
19113
  if ("page" in answered) {
18474
19114
  environment.stdout(formatDeckDrawn(answered));
18475
19115
  return 0;
@@ -18588,5 +19228,4 @@ async function reportHumanKey(environment, t, prompts, registry, context, humanK
18588
19228
  say(presenceUnavailableText(t, error instanceof Error ? error.message : String(error)));
18589
19229
  }
18590
19230
  }
18591
- //#endregion
18592
19231
  export { main };