@intentius/chant 0.124.57 → 0.124.58

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 (121) hide show
  1. package/dist/ci-product-words.d.ts +47 -2
  2. package/dist/ci-product-words.d.ts.map +1 -1
  3. package/dist/ci-product-words.js +59 -1
  4. package/dist/ci-product.d.ts +26 -2
  5. package/dist/ci-product.d.ts.map +1 -1
  6. package/dist/ci-product.js +26 -2
  7. package/dist/cli/commands/init.d.ts +2 -0
  8. package/dist/cli/commands/init.d.ts.map +1 -1
  9. package/dist/cli/commands/init.js +1 -1
  10. package/dist/cli/handlers/build.d.ts.map +1 -1
  11. package/dist/cli/handlers/build.js +5 -1
  12. package/dist/cli/handlers/init.d.ts.map +1 -1
  13. package/dist/cli/handlers/init.js +16 -0
  14. package/dist/cli/handlers/serve.d.ts.map +1 -1
  15. package/dist/cli/handlers/serve.js +9 -0
  16. package/dist/cli/main.d.ts.map +1 -1
  17. package/dist/cli/main.js +6 -2
  18. package/dist/cli/mcp/product-tools.d.ts +40 -7
  19. package/dist/cli/mcp/product-tools.d.ts.map +1 -1
  20. package/dist/cli/mcp/product-tools.js +59 -15
  21. package/dist/cli/mcp/read-only.d.ts +2 -1
  22. package/dist/cli/mcp/read-only.d.ts.map +1 -1
  23. package/dist/cli/mcp/read-only.js +2 -1
  24. package/dist/cli/mcp/server.d.ts +11 -0
  25. package/dist/cli/mcp/server.d.ts.map +1 -1
  26. package/dist/cli/mcp/server.js +15 -3
  27. package/dist/cli/mcp-config.d.ts +4 -1
  28. package/dist/cli/mcp-config.d.ts.map +1 -1
  29. package/dist/cli/mcp-config.js +6 -2
  30. package/dist/cli/parse-args.d.ts.map +1 -1
  31. package/dist/cli/parse-args.js +9 -0
  32. package/dist/cli/registry.d.ts +8 -0
  33. package/dist/cli/registry.d.ts.map +1 -1
  34. package/dist/components/pr-pipeline.d.ts +56 -0
  35. package/dist/components/pr-pipeline.d.ts.map +1 -1
  36. package/dist/components/pr-pipeline.js +55 -2
  37. package/dist/components/product-pipeline.d.ts +18 -1
  38. package/dist/components/product-pipeline.d.ts.map +1 -1
  39. package/dist/components/product-pipeline.js +8 -2
  40. package/dist/e2e-harness/driver.d.ts.map +1 -1
  41. package/dist/e2e-harness/driver.js +97 -0
  42. package/dist/e2e-harness/forgejo.d.ts +5 -1
  43. package/dist/e2e-harness/forgejo.d.ts.map +1 -1
  44. package/dist/e2e-harness/forgejo.js +35 -0
  45. package/dist/e2e-harness/index.d.ts +7 -0
  46. package/dist/e2e-harness/index.d.ts.map +1 -1
  47. package/dist/e2e-harness/index.js +11 -1
  48. package/dist/e2e-harness/ports.d.ts +31 -0
  49. package/dist/e2e-harness/ports.d.ts.map +1 -1
  50. package/dist/e2e-harness/scenario.d.ts.map +1 -1
  51. package/dist/e2e-harness/scenario.js +9 -5
  52. package/dist/e2e-harness/schemas/e2e-scenario.schema.json +43 -3
  53. package/dist/e2e-harness/schemas/index.d.ts +22 -1
  54. package/dist/e2e-harness/schemas/index.d.ts.map +1 -1
  55. package/dist/e2e-harness/schemas/index.js +1 -1
  56. package/dist/e2e-harness/steps.d.ts.map +1 -1
  57. package/dist/e2e-harness/steps.js +4 -0
  58. package/dist/mcp/types.d.ts +9 -0
  59. package/dist/mcp/types.d.ts.map +1 -1
  60. package/dist/release-floors.d.ts +1 -1
  61. package/dist/release-floors.js +1 -1
  62. package/dist/template-request/index.d.ts +9 -0
  63. package/dist/template-request/index.d.ts.map +1 -0
  64. package/dist/template-request/index.js +8 -0
  65. package/dist/template-request/request-body.d.ts +21 -0
  66. package/dist/template-request/request-body.d.ts.map +1 -0
  67. package/dist/template-request/request-body.js +86 -0
  68. package/dist/template-request/template-request.d.ts +100 -0
  69. package/dist/template-request/template-request.d.ts.map +1 -0
  70. package/dist/template-request/template-request.js +150 -0
  71. package/dist/template-request/template-request.schema.json +100 -0
  72. package/dist/template-request/template-spec.d.ts +83 -0
  73. package/dist/template-request/template-spec.d.ts.map +1 -0
  74. package/dist/template-request/template-spec.js +146 -0
  75. package/dist/template-request/template.schema.json +114 -0
  76. package/dist/template-request/validate.d.ts +4 -0
  77. package/dist/template-request/validate.d.ts.map +1 -0
  78. package/dist/template-request/validate.js +21 -0
  79. package/dist/wave-runtime.mjs +4 -4
  80. package/package.json +8 -1
  81. package/src/ci-product-words.test.ts +23 -0
  82. package/src/ci-product-words.ts +68 -3
  83. package/src/ci-product.ts +32 -1
  84. package/src/cli/commands/init.ts +3 -1
  85. package/src/cli/handlers/build.ts +5 -1
  86. package/src/cli/handlers/init.ts +18 -0
  87. package/src/cli/handlers/serve.ts +9 -0
  88. package/src/cli/main.ts +6 -2
  89. package/src/cli/mcp/product-tools.test.ts +57 -1
  90. package/src/cli/mcp/product-tools.ts +67 -15
  91. package/src/cli/mcp/read-only.ts +2 -1
  92. package/src/cli/mcp/server.ts +20 -5
  93. package/src/cli/mcp-config.test.ts +52 -2
  94. package/src/cli/mcp-config.ts +6 -3
  95. package/src/cli/parse-args.ts +7 -0
  96. package/src/cli/registry.ts +8 -0
  97. package/src/components/pr-pipeline.ts +87 -2
  98. package/src/components/product-actions.test.ts +76 -0
  99. package/src/components/product-pipeline.ts +21 -2
  100. package/src/e2e-harness/driver.test.ts +163 -0
  101. package/src/e2e-harness/driver.ts +86 -1
  102. package/src/e2e-harness/forgejo.ts +42 -1
  103. package/src/e2e-harness/index.ts +12 -1
  104. package/src/e2e-harness/ports.ts +33 -0
  105. package/src/e2e-harness/scenario.ts +8 -6
  106. package/src/e2e-harness/schemas/README.md +11 -2
  107. package/src/e2e-harness/schemas/e2e-scenario.schema.json +43 -3
  108. package/src/e2e-harness/schemas/index.ts +5 -1
  109. package/src/e2e-harness/schemas.test.ts +44 -1
  110. package/src/e2e-harness/steps.ts +4 -0
  111. package/src/mcp/types.ts +9 -0
  112. package/src/release-floors.ts +1 -1
  113. package/src/template-request/__fixtures__/request-body.md +41 -0
  114. package/src/template-request/index.ts +8 -0
  115. package/src/template-request/request-body.ts +91 -0
  116. package/src/template-request/template-request.schema.json +100 -0
  117. package/src/template-request/template-request.test.ts +316 -0
  118. package/src/template-request/template-request.ts +235 -0
  119. package/src/template-request/template-spec.ts +176 -0
  120. package/src/template-request/template.schema.json +114 -0
  121. package/src/template-request/validate.ts +28 -0
@@ -26,8 +26,12 @@
26
26
  export type CiProductStage = "plan" | "apply" | "record" | "check" | "drift" | "lock" | "approval" | "control";
27
27
  /** Every stage slot, in the order {@link assertProductWords} reports them. */
28
28
  export declare const CI_PRODUCT_STAGES: readonly CiProductStage[];
29
- /** The commands a comment may name. Each one needs a job in the pipeline that answers it. */
30
- export type CiProductCommand = "plan" | "apply" | "lock" | "unlock" | "agent";
29
+ /**
30
+ * The commands a comment may name. Each one needs a job in the pipeline that
31
+ * answers it. `action` (#4653) asks for a day-2 action on one member, which
32
+ * runs under a gated request.
33
+ */
34
+ export type CiProductCommand = "plan" | "apply" | "lock" | "unlock" | "agent" | "action";
31
35
  export declare const CI_PRODUCT_COMMANDS: readonly CiProductCommand[];
32
36
  /**
33
37
  * What an approval of a product's waves binds to (ruling B, 2026-10-27).
@@ -276,6 +280,16 @@ export type ParsedProductComment =
276
280
  | {
277
281
  kind: "agent";
278
282
  ask: string;
283
+ }
284
+ /**
285
+ * A day-2 action (#4653): `<member> <action>`, such as `apps/orders
286
+ * module.app.action.aws_lambda_invoke.rotate` or a stack's action name.
287
+ * The engine's lexicon checks the action against the member's plan.
288
+ */
289
+ | {
290
+ kind: "action";
291
+ member: string;
292
+ address: string;
279
293
  } | {
280
294
  kind: "refused";
281
295
  reason: string;
@@ -293,4 +307,35 @@ export declare const PRODUCT_COMMENT_ASK_MAX = 2000;
293
307
  * `env` turns on an alias whose `when` variable is `1` there.
294
308
  */
295
309
  export declare function parseProductComment(words: CiProductWords, body: unknown, env?: Record<string, string | undefined>): ParsedProductComment | undefined;
310
+ /**
311
+ * The variables the generated action job (#4654) hands the product's action
312
+ * verb: the comment that started it, on a comment, and the dispatch's two
313
+ * inputs, on a dispatch. The values reach the job as variables and never as
314
+ * shell text; {@link productActionFromEnv} reads them.
315
+ */
316
+ export declare const PRODUCT_ACTION_ENV: {
317
+ readonly comment: "CHANT_ACTION_COMMENT";
318
+ readonly member: "CHANT_ACTION_MEMBER";
319
+ readonly action: "CHANT_ACTION";
320
+ };
321
+ /** The flag the generated action job passes the product's action verb, so it reads {@link PRODUCT_ACTION_ENV} (#4654). */
322
+ export declare const PRODUCT_ACTION_EVENT_FLAG = "--from-event";
323
+ /** What an action job was asked for (#4654): a member and an action, from a comment or a dispatch. */
324
+ export type ProductActionRequest = {
325
+ kind: "action";
326
+ member: string;
327
+ address: string;
328
+ from: "comment" | "dispatch";
329
+ } | {
330
+ kind: "refused";
331
+ reason: string;
332
+ };
333
+ /**
334
+ * The action an action job was started for (#4654), read from
335
+ * {@link PRODUCT_ACTION_ENV}: a comment, parsed as {@link parseProductComment}
336
+ * parses it, else the dispatch's member and action, checked by the same
337
+ * rules. A product's action verb calls this under
338
+ * {@link PRODUCT_ACTION_EVENT_FLAG}.
339
+ */
340
+ export declare function productActionFromEnv(words: CiProductWords, env: Record<string, string | undefined>): ProductActionRequest;
296
341
  //# sourceMappingURL=ci-product-words.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ci-product-words.d.ts","sourceRoot":"","sources":["../src/ci-product-words.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,iGAAiG;AACjG,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;AAE/G,8EAA8E;AAC9E,eAAO,MAAM,iBAAiB,EAAE,SAAS,cAAc,EAAiF,CAAC;AAEzI,6FAA6F;AAC7F,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE9E,eAAO,MAAM,mBAAmB,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CAAW,CAAC;AAEtI,0HAA0H;AAC1H,eAAO,MAAM,yBAAyB,iBAAiB,CAAC;AAExD,sGAAsG;AACtG,MAAM,MAAM,oBAAoB,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,SAAS,GAAG,UAAU,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3J;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,oBAAoB,CAiBzH"}
@@ -24,7 +24,7 @@
24
24
  */
25
25
  /** Every stage slot, in the order {@link assertProductWords} reports them. */
26
26
  export const CI_PRODUCT_STAGES = ["plan", "apply", "record", "check", "drift", "lock", "approval", "control"];
27
- export const CI_PRODUCT_COMMANDS = ["plan", "apply", "lock", "unlock", "agent"];
27
+ export const CI_PRODUCT_COMMANDS = ["plan", "apply", "lock", "unlock", "agent", "action"];
28
28
  export const CI_PRODUCT_APPLY_MODES = ["on-merge", "release", "before-merge"];
29
29
  /** chant's own wave label in a notify summary. */
30
30
  export const CHANT_NOTIFY_WAVE_TEMPLATE = "wave {k} ({name}) of {spec}";
@@ -280,6 +280,12 @@ const MEMBER = /^[A-Za-z0-9_][A-Za-z0-9_.\/-]{0,199}$/;
280
280
  * It never reaches a shell: the job reads the comment from a variable.
281
281
  */
282
282
  const TARGET = /^[A-Za-z0-9_][A-Za-z0-9_.:\/\[\]"*@=+$,-]{0,499}$/;
283
+ /**
284
+ * An action as a comment may name it (#4653): a Terraform action address,
285
+ * module steps and instance keys included, or a configured action's name.
286
+ * No leading dash, no spaces, no shell or glob syntax.
287
+ */
288
+ const ACTION = /^[A-Za-z_][A-Za-z0-9_.\[\]"-]{0,299}$/;
283
289
  /** The longest ask an agent comment may carry. */
284
290
  export const PRODUCT_COMMENT_ASK_MAX = 2000;
285
291
  /** Commands a comment never runs, named in the reply so nobody waits on them. */
@@ -360,6 +366,18 @@ export function parseProductComment(words, body, env = {}) {
360
366
  return { kind: "refused", reason: "an ask is plain text, with no control characters" };
361
367
  return { kind: "agent", ask };
362
368
  }
369
+ case "action": {
370
+ const usage = `${line} takes a ${words.noun[0]} and an action: \`${prefix} ${typed} <${words.noun[0]}> <action>\``;
371
+ if (parts.length !== 4)
372
+ return { kind: "refused", reason: usage };
373
+ const member = parts[2];
374
+ const address = parts[3];
375
+ if (!MEMBER.test(member) || member.split("/").some((s) => s === "" || s === "." || s === ".."))
376
+ return { kind: "refused", reason: `the ${words.noun[0]} is a name or a path from the repository root` };
377
+ if (!ACTION.test(address))
378
+ return { kind: "refused", reason: "an action is an action address or name, with no spaces or shell characters" };
379
+ return { kind: "action", member, address };
380
+ }
363
381
  case "apply": {
364
382
  if (parts.length === 2)
365
383
  return { kind: "apply" };
@@ -405,3 +423,43 @@ export function parseProductComment(words, body, env = {}) {
405
423
  }
406
424
  }
407
425
  }
426
+ /**
427
+ * The variables the generated action job (#4654) hands the product's action
428
+ * verb: the comment that started it, on a comment, and the dispatch's two
429
+ * inputs, on a dispatch. The values reach the job as variables and never as
430
+ * shell text; {@link productActionFromEnv} reads them.
431
+ */
432
+ export const PRODUCT_ACTION_ENV = { comment: "CHANT_ACTION_COMMENT", member: "CHANT_ACTION_MEMBER", action: "CHANT_ACTION" };
433
+ /** The flag the generated action job passes the product's action verb, so it reads {@link PRODUCT_ACTION_ENV} (#4654). */
434
+ export const PRODUCT_ACTION_EVENT_FLAG = "--from-event";
435
+ /**
436
+ * The action an action job was started for (#4654), read from
437
+ * {@link PRODUCT_ACTION_ENV}: a comment, parsed as {@link parseProductComment}
438
+ * parses it, else the dispatch's member and action, checked by the same
439
+ * rules. A product's action verb calls this under
440
+ * {@link PRODUCT_ACTION_EVENT_FLAG}.
441
+ */
442
+ export function productActionFromEnv(words, env) {
443
+ const typed = commandWord(words, "action");
444
+ if (typed === undefined)
445
+ return { kind: "refused", reason: `${words.product} names no action command, so no job answers one` };
446
+ const comment = env[PRODUCT_ACTION_ENV.comment]?.trim();
447
+ if (comment) {
448
+ const parsed = parseProductComment(words, comment, env);
449
+ if (parsed?.kind === "action")
450
+ return { ...parsed, from: "comment" };
451
+ if (parsed?.kind === "refused")
452
+ return parsed;
453
+ return { kind: "refused", reason: `the comment is not \`/${words.product} ${typed} <${words.noun[0]}> <action>\`` };
454
+ }
455
+ const member = env[PRODUCT_ACTION_ENV.member]?.trim() ?? "";
456
+ const action = env[PRODUCT_ACTION_ENV.action]?.trim() ?? "";
457
+ if (member === "" || action === "")
458
+ return { kind: "refused", reason: `a dispatched action names a ${words.noun[0]} and an action` };
459
+ if (/\s/.test(member) || /\s/.test(action))
460
+ return { kind: "refused", reason: `a ${words.noun[0]} and an action are one word each` };
461
+ const parsed = parseProductComment(words, `/${words.product} ${typed} ${member} ${action}`, {});
462
+ if (parsed?.kind === "action")
463
+ return { ...parsed, from: "dispatch" };
464
+ return parsed?.kind === "refused" ? parsed : { kind: "refused", reason: `a dispatched action names a ${words.noun[0]} and an action` };
465
+ }
@@ -18,7 +18,7 @@ import type { ProductWaveHook } from "./op/op-waves-after-plan.js";
18
18
  * note (#4573).
19
19
  */
20
20
  export declare const CI_PRODUCT_FLOOR = "0.124.55";
21
- export { activeProductWords, approveLine, assertProductWords, CHANT_APPROVE_TEMPLATE, CHANT_NOTIFY_WAVE_TEMPLATE, CHANT_OVERRIDE_TEMPLATE, CHANT_WORDS, CI_PRODUCT_APPLY_MODES, CI_PRODUCT_COMMANDS, CI_PRODUCT_STAGES, CiProductWordsError, commandWord, commentLine, isChantWords, notifyWaveLabel, overrideLine, parseProductComment, productContext, productStatusContext, productWaveGate, productWordsProblems, resolveProductWords, setActiveProductWords, withProductWords, type ApproveLineInput, type CiProductAlias, type CiProductApplyMode, type CiProductApproval, type CiProductCommand, type CiProductNotifyWords, type CiProductNotifyWordsInput, type CiProductStage, type CiProductWords, type CiProductWordsInput, type OverrideLineInput, type ParsedProductComment, } from "./ci-product-words.js";
21
+ export { activeProductWords, approveLine, assertProductWords, CHANT_APPROVE_TEMPLATE, CHANT_NOTIFY_WAVE_TEMPLATE, CHANT_OVERRIDE_TEMPLATE, CHANT_WORDS, CI_PRODUCT_APPLY_MODES, CI_PRODUCT_COMMANDS, CI_PRODUCT_STAGES, CiProductWordsError, commandWord, commentLine, isChantWords, notifyWaveLabel, overrideLine, parseProductComment, productActionFromEnv, PRODUCT_ACTION_ENV, PRODUCT_ACTION_EVENT_FLAG, productContext, productStatusContext, productWaveGate, productWordsProblems, resolveProductWords, setActiveProductWords, withProductWords, type ApproveLineInput, type CiProductAlias, type CiProductApplyMode, type CiProductApproval, type CiProductCommand, type CiProductNotifyWords, type CiProductNotifyWordsInput, type CiProductStage, type CiProductWords, type CiProductWordsInput, type OverrideLineInput, type ParsedProductComment, type ProductActionRequest, } from "./ci-product-words.js";
22
22
  export { driftNotifyFields, productNotifySource, productNotifyWords, productSendOptions, type DriftNotifyInput } from "./notify-product.js";
23
23
  /** The first chant with `chant notify relay` and the notify relay buttons (#4611). */
24
24
  export declare const NOTIFY_RELAY_FLOOR = "0.124.55";
@@ -31,7 +31,18 @@ export declare const NOTIFY_RELAY_FLOOR = "0.124.55";
31
31
  export declare const PR_PREVIEW_FLOOR = "0.124.55";
32
32
  export { decideRelayClick, handleRelayRequest, relayPrincipalFor, RELAY_ENV, slackRelayClick, slackSignature, startRelayServer, teamsRelayClick, teamsSignature, verifySlackRequest, verifyTeamsRequest, type RelayAnswer, type RelayClick, type RelayDeps, type RelayPending, type RelayRequest, type RelayResponse, type RelaySettings, } from "./notify-relay.js";
33
33
  export { componentWaveOutputsFile, componentWaveSteps, componentWavesSpec, productAgentSpec, productCommand, productDriftAgent, productPipelineJobs, productWavesSpec, productWavesSpecFile, PRODUCT_WAVES_SPEC_DIR, type ComponentWaveStepOptions, type ComponentWaveSteps, type ComponentWavesSpecOptions, type ProductAgentOptions, type ProductPipelineJobs, type ProductPipelineOptions, } from "./components/product-pipeline.js";
34
- export { prApplyComment, prCommentLockJobs, prCommentPreviewJob, prLoopSetup, engineSetupLines, withProductBin, type PrCommentLockJob, type PrCommentPreviewJob } from "./components/pr-pipeline.js";
34
+ export { prActionJob, PR_ACTION_JOB, prApplyComment, prCommentLockJobs, prCommentPreviewJob, prLoopSetup, engineSetupLines, withProductBin, type PrActionJob, type PrActionJobOptions, type PrCommentLockJob, type PrCommentPreviewJob } from "./components/pr-pipeline.js";
35
+ /**
36
+ * Day-2 actions in the product pipeline (#4654): the `action` comment
37
+ * command counted as answered by the product's own workflow
38
+ * (`productPipelineJobs(forge, env, { words, actions: true })`), or the
39
+ * pipeline's own action job (`actionJob`, `build --pr-loop --action-job`),
40
+ * which answers the comment and a dispatch with a member and an action
41
+ * input, and runs the product's action verb with `--from-event`. The verb
42
+ * reads what was asked with `productActionFromEnv`. A product
43
+ * feature-detects on this floor.
44
+ */
45
+ export declare const PRODUCT_ACTIONS_FLOOR = "0.124.58";
35
46
  export { CI_SERVICES_FLOOR, engineServices, githubServices, gitlabServices, serviceWaitLine, servicesJobEnv, type CiService } from "./components/ci-services.js";
36
47
  export { renderPrNote, prStatusContext, prApproveCommand, prApproveCommands, prApproveTargets, prMergeSentence, type PrMemberDetail } from "./pr-loop.js";
37
48
  export { upsertPlanNote } from "./pr-post.js";
@@ -113,5 +124,18 @@ export { parseRequiresList, PR_APPLY_REQUIRES, type PrApplyRequire } from "./pr-
113
124
  */
114
125
  export declare const PRODUCT_MCP_HOOK_FLOOR = "0.124.55";
115
126
  export type { ProductMcpContext, ProductMcpHook } from "./cli/mcp/product-tools.js";
127
+ /**
128
+ * The `--propose` tier (chant#4655): `runChantInProcess(["serve", "mcp",
129
+ * "--read-only", "--propose"], words, { mcp: hook })`, or `propose: true` on
130
+ * the hook, serves the read-only server's tools plus the product tools that
131
+ * declare `forgeWrite: true` on their `McpToolContribution`, tools that open
132
+ * a pull request or a comment and do nothing else. A product's own tool and
133
+ * hook types widen from `readOnly: true` to `readOnly: true` or `forgeWrite:
134
+ * true` for these, and its hook gains `propose?: boolean`. Feature-detect on
135
+ * `PRODUCT_MCP_PROPOSE_FLOOR`: on an older chant the read-only server drops a
136
+ * `forgeWrite` tool, and `--propose` is not a flag it parses.
137
+ */
138
+ export { PRODUCT_MCP_PROPOSE_FLOOR, PRODUCT_TOOL_PROPOSE_WORDS } from "./cli/mcp/product-tools.js";
139
+ export type { McpToolContribution } from "./mcp/types.js";
116
140
  export { activeOtlp, configureOtlp, OTLP_EXPORTER_FLOOR, RunEventTrace, type CapabilityTraceFacts, type CapabilityTraceSpan, type OtlpExporter, } from "./otlp.js";
117
141
  //# sourceMappingURL=ci-product.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ci-product.d.ts","sourceRoot":"","sources":["../src/ci-product.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAGhE;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,aAAa,CAAC;AAE3C,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,EACvB,WAAW,EACX,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,KAAK,gBAAgB,EACrB,KAAK,cAAc,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UG;AACH,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAChG,YAAY,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EACL,UAAU,EACV,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,YAAY,GAClB,MAAM,QAAQ,CAAC"}
@@ -9,6 +9,7 @@
9
9
  * and `assertProductWords` present means the rest is too.
10
10
  */
11
11
  import { OTLP_EXPORTER_FLOOR } from "./otlp.js";
12
+ import { NEXT_RELEASE } from "./release-floors.js";
12
13
  /**
13
14
  * The first chant with the product pipeline (#4550): the words, the
14
15
  * `pull-request` op-wave approval source, `runCommandInProcess(argv, {
@@ -16,7 +17,7 @@ import { OTLP_EXPORTER_FLOOR } from "./otlp.js";
16
17
  * note (#4573).
17
18
  */
18
19
  export const CI_PRODUCT_FLOOR = "0.124.55";
19
- export { activeProductWords, approveLine, assertProductWords, CHANT_APPROVE_TEMPLATE, CHANT_NOTIFY_WAVE_TEMPLATE, CHANT_OVERRIDE_TEMPLATE, CHANT_WORDS, CI_PRODUCT_APPLY_MODES, CI_PRODUCT_COMMANDS, CI_PRODUCT_STAGES, CiProductWordsError, commandWord, commentLine, isChantWords, notifyWaveLabel, overrideLine, parseProductComment, productContext, productStatusContext, productWaveGate, productWordsProblems, resolveProductWords, setActiveProductWords, withProductWords, } from "./ci-product-words.js";
20
+ export { activeProductWords, approveLine, assertProductWords, CHANT_APPROVE_TEMPLATE, CHANT_NOTIFY_WAVE_TEMPLATE, CHANT_OVERRIDE_TEMPLATE, CHANT_WORDS, CI_PRODUCT_APPLY_MODES, CI_PRODUCT_COMMANDS, CI_PRODUCT_STAGES, CiProductWordsError, commandWord, commentLine, isChantWords, notifyWaveLabel, overrideLine, parseProductComment, productActionFromEnv, PRODUCT_ACTION_ENV, PRODUCT_ACTION_EVENT_FLAG, productContext, productStatusContext, productWaveGate, productWordsProblems, resolveProductWords, setActiveProductWords, withProductWords, } from "./ci-product-words.js";
20
21
  export { driftNotifyFields, productNotifySource, productNotifyWords, productSendOptions } from "./notify-product.js";
21
22
  /** The first chant with `chant notify relay` and the notify relay buttons (#4611). */
22
23
  export const NOTIFY_RELAY_FLOOR = "0.124.55";
@@ -29,7 +30,18 @@ export const NOTIFY_RELAY_FLOOR = "0.124.55";
29
30
  export const PR_PREVIEW_FLOOR = "0.124.55";
30
31
  export { decideRelayClick, handleRelayRequest, relayPrincipalFor, RELAY_ENV, slackRelayClick, slackSignature, startRelayServer, teamsRelayClick, teamsSignature, verifySlackRequest, verifyTeamsRequest, } from "./notify-relay.js";
31
32
  export { componentWaveOutputsFile, componentWaveSteps, componentWavesSpec, productAgentSpec, productCommand, productDriftAgent, productPipelineJobs, productWavesSpec, productWavesSpecFile, PRODUCT_WAVES_SPEC_DIR, } from "./components/product-pipeline.js";
32
- export { prApplyComment, prCommentLockJobs, prCommentPreviewJob, prLoopSetup, engineSetupLines, withProductBin } from "./components/pr-pipeline.js";
33
+ export { prActionJob, PR_ACTION_JOB, prApplyComment, prCommentLockJobs, prCommentPreviewJob, prLoopSetup, engineSetupLines, withProductBin } from "./components/pr-pipeline.js";
34
+ /**
35
+ * Day-2 actions in the product pipeline (#4654): the `action` comment
36
+ * command counted as answered by the product's own workflow
37
+ * (`productPipelineJobs(forge, env, { words, actions: true })`), or the
38
+ * pipeline's own action job (`actionJob`, `build --pr-loop --action-job`),
39
+ * which answers the comment and a dispatch with a member and an action
40
+ * input, and runs the product's action verb with `--from-event`. The verb
41
+ * reads what was asked with `productActionFromEnv`. A product
42
+ * feature-detects on this floor.
43
+ */
44
+ export const PRODUCT_ACTIONS_FLOOR = NEXT_RELEASE;
33
45
  export { CI_SERVICES_FLOOR, engineServices, githubServices, gitlabServices, serviceWaitLine, servicesJobEnv } from "./components/ci-services.js";
34
46
  export { renderPrNote, prStatusContext, prApproveCommand, prApproveCommands, prApproveTargets, prMergeSentence } from "./pr-loop.js";
35
47
  export { upsertPlanNote } from "./pr-post.js";
@@ -109,4 +121,16 @@ export { parseRequiresList, PR_APPLY_REQUIRES } from "./pr-requires.js";
109
121
  * `PRODUCT_MCP_HOOK_FLOOR`: present means both are.
110
122
  */
111
123
  export const PRODUCT_MCP_HOOK_FLOOR = OTLP_EXPORTER_FLOOR;
124
+ /**
125
+ * The `--propose` tier (chant#4655): `runChantInProcess(["serve", "mcp",
126
+ * "--read-only", "--propose"], words, { mcp: hook })`, or `propose: true` on
127
+ * the hook, serves the read-only server's tools plus the product tools that
128
+ * declare `forgeWrite: true` on their `McpToolContribution`, tools that open
129
+ * a pull request or a comment and do nothing else. A product's own tool and
130
+ * hook types widen from `readOnly: true` to `readOnly: true` or `forgeWrite:
131
+ * true` for these, and its hook gains `propose?: boolean`. Feature-detect on
132
+ * `PRODUCT_MCP_PROPOSE_FLOOR`: on an older chant the read-only server drops a
133
+ * `forgeWrite` tool, and `--propose` is not a flag it parses.
134
+ */
135
+ export { PRODUCT_MCP_PROPOSE_FLOOR, PRODUCT_TOOL_PROPOSE_WORDS } from "./cli/mcp/product-tools.js";
112
136
  export { activeOtlp, configureOtlp, OTLP_EXPORTER_FLOOR, RunEventTrace, } from "./otlp.js";
@@ -16,6 +16,8 @@ export interface InitOptions {
16
16
  skipMcp?: boolean;
17
17
  /** Register `chant serve mcp --read-only` in `.mcp.json` (`--mcp-read-only`, chant#4543) */
18
18
  mcpReadOnly?: boolean;
19
+ /** With `mcpReadOnly`, register `chant serve mcp --read-only --propose` (`--propose`, chant#4655) */
20
+ mcpPropose?: boolean;
19
21
  /** Skip interactive install prompt */
20
22
  skipInstall?: boolean;
21
23
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AASA,wEAAwE;AACxE,wBAAgB,eAAe,IAAI,MAAM,CAQxC;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,yCAAyC;IAC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CAAA;CAAE,GAChD,OAAO,CAAC,IAAI,CAAC,CA8Cf"}
@@ -288,7 +288,7 @@ export async function initCommand(options) {
288
288
  // chant #2383 for the three-way disagreement that came of writing it into
289
289
  // the user's home directory instead.
290
290
  if (!options.skipMcp) {
291
- writeIfNotExists(mcpConfigPath(targetDir), generateMcpConfig(detectPackageManager(targetDir), { readOnly: options.mcpReadOnly }), MCP_CONFIG_FILENAME, createdFiles, warnings);
291
+ writeIfNotExists(mcpConfigPath(targetDir), generateMcpConfig(detectPackageManager(targetDir), { readOnly: options.mcpReadOnly, propose: options.mcpPropose }), MCP_CONFIG_FILENAME, createdFiles, warnings);
292
292
  }
293
293
  // Install skills from the lexicon's plugin. With --skill, install only
294
294
  // the matching skill; without, install all.
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/build.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAiGlD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,QAAQ,GAAG,kBAAkB,GAAG,OAAO,GAAG,eAAe,GAAG,aAAa,GAAG,SAAS,GAAG,eAAe,GAAG,aAAa,GAAG,kBAAkB,CAAC,GAAG,MAAM,GAAG,SAAS,CA6BvO;AAuOD,wBAAsB,QAAQ,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAsJnE"}
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/build.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAqGlD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,QAAQ,GAAG,kBAAkB,GAAG,OAAO,GAAG,eAAe,GAAG,aAAa,GAAG,SAAS,GAAG,eAAe,GAAG,aAAa,GAAG,kBAAkB,CAAC,GAAG,MAAM,GAAG,SAAS,CA6BvO;AAuOD,wBAAsB,QAAQ,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAsJnE"}
@@ -52,7 +52,9 @@ async function engineSetupFor(path) {
52
52
  * `--apply-before-merge` (#4301) writes the apply job that applies an open
53
53
  * pull request before it merges, beside the record job.
54
54
  * `--preview-comment` (#4620) writes the jobs that answer the product's plan
55
- * comment with a preview of the pull request's head.
55
+ * comment with a preview of the pull request's head. `--action-job` (#4654)
56
+ * writes the job that answers the product's action comment and a dispatch
57
+ * with a member and an action.
56
58
  * `--pr-runner`, `--pr-variable`, `--pr-secret` and `--parallelism` (#4625)
57
59
  * set each stage's runner, the plan and apply jobs' variables and passed
58
60
  * secrets, and how many members the plan plans at once.
@@ -80,6 +82,8 @@ function prLoopOption(args, reportUrl, requireReview = false, requireRunnerStart
80
82
  ...(args.prEnv ? { prEnvironment: true } : {}),
81
83
  ...(args.applyBeforeMerge ? { applyBeforeMerge: true } : {}),
82
84
  ...(args.previewComment ? { previewComment: true } : {}),
85
+ // #4654: the job that answers the action comment and the action dispatch.
86
+ ...(args.actionJob ? { actionJob: true } : {}),
83
87
  // #4628: the note carries its target commit, and a push marks the open notes stale.
84
88
  ...(args.staleNotes ? { staleNotes: true } : {}),
85
89
  ...(args.requires ? { applyRequires: args.requires } : {}),
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/init.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,wBAAsB,OAAO,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA0BlE;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAoBzE"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/init.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,wBAAsB,OAAO,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA4ClE;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAoBzE"}
@@ -3,6 +3,21 @@ export async function runInit(ctx) {
3
3
  const { args } = ctx;
4
4
  if (args.migrateFrom !== undefined)
5
5
  return runInitFrom(ctx);
6
+ // chant#4655 — --propose registers the read-only server's propose tier, so it needs --mcp-read-only.
7
+ if (args.propose === true && args.mcpReadOnly !== true) {
8
+ console.error(formatError({
9
+ message: "chant init --propose needs --mcp-read-only",
10
+ hint: "Usage: chant init --mcp-read-only --propose (registers chant serve mcp --read-only --propose in .mcp.json)",
11
+ }));
12
+ return 1;
13
+ }
14
+ // chant#4655 — --dry-run prints the .mcp.json init would register and writes nothing.
15
+ if (args.dryRun === true) {
16
+ const { detectPackageManager, generateMcpConfig } = await import("../mcp-config.js");
17
+ const target = args.path === "." || args.path === undefined ? process.cwd() : args.path;
18
+ console.log(generateMcpConfig(detectPackageManager(target), { readOnly: args.mcpReadOnly, propose: args.propose }));
19
+ return 0;
20
+ }
6
21
  if (!args.lexicon) {
7
22
  console.error(formatError({
8
23
  message: "Missing --lexicon flag",
@@ -19,6 +34,7 @@ export async function runInit(ctx) {
19
34
  force: args.force,
20
35
  skipMcp: args.skipMcp,
21
36
  mcpReadOnly: args.mcpReadOnly,
37
+ mcpPropose: args.propose,
22
38
  skipInstall: true,
23
39
  });
24
40
  await printInitResult(result, { skipInstall: false, cwd: args.path });
@@ -1 +1 @@
1
- {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/serve.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,wBAAsB,WAAW,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAMtE;AAED,wBAAsB,WAAW,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAyBtE;AAED,wBAAsB,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAM1E"}
1
+ {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/serve.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,wBAAsB,WAAW,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAMtE;AAED,wBAAsB,WAAW,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAkCtE;AAED,wBAAsB,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAM1E"}
@@ -7,6 +7,14 @@ export async function runServeLsp(ctx) {
7
7
  return 0; // unreachable
8
8
  }
9
9
  export async function runServeMcp(ctx) {
10
+ // chant#4655 — --propose is a tier of the read-only server, never of the ordinary one.
11
+ if (ctx.args.propose === true && ctx.args.readOnly !== true) {
12
+ console.error(formatError({
13
+ message: "chant serve mcp --propose needs --read-only",
14
+ hint: "Usage: chant serve mcp --read-only --propose (serves the read tools and a product's tools that open pull requests)",
15
+ }));
16
+ return 1;
17
+ }
10
18
  const { McpServer } = await import("../mcp/server.js");
11
19
  // #2700 — main() hands over no plugins only at a workspace root with no
12
20
  // lexicon of its own (anywhere else it refuses first). There the lexicons
@@ -26,6 +34,7 @@ export async function runServeMcp(ctx) {
26
34
  instructions,
27
35
  workspace: { cwd: process.cwd() },
28
36
  ...(ctx.args.readOnly === true ? { readOnly: true } : {}),
37
+ ...(ctx.args.propose === true ? { propose: true } : {}),
29
38
  ...(product ? { product } : {}),
30
39
  });
31
40
  await server.start();
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AAEA,OAAO,EAAoB,KAAK,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAItG,OAAO,EAAkB,KAAK,UAAU,EAAmB,MAAM,YAAY,CAAC;AAa9E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAgB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;AAumDzC;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,mBAAmB,GAAG,cAAc,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,qBAAqB,EAAE,cAAc,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,2BAA2B,EAAE,eAAe,CAAA;CAAO,GAC7K,OAAO,CAAC,MAAM,CAAC,CAuCjB;AAID;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,UAAU,EA8PvC,CAAC"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AAEA,OAAO,EAAoB,KAAK,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAItG,OAAO,EAAkB,KAAK,UAAU,EAAmB,MAAM,YAAY,CAAC;AAa9E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAgB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;AA2mDzC;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,mBAAmB,GAAG,cAAc,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,qBAAqB,EAAE,cAAc,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,2BAA2B,EAAE,eAAe,CAAA;CAAO,GAC7K,OAAO,CAAC,MAAM,CAAC,CAuCjB;AAID;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,UAAU,EA8PvC,CAAC"}
package/dist/cli/main.js CHANGED
@@ -1349,7 +1349,9 @@ Local:
1349
1349
  Servers:
1350
1350
  serve lsp Start the LSP server (stdio)
1351
1351
  serve mcp Start the MCP server (stdio); --read-only serves only
1352
- the tools that read (ledger, graph, runs) and run nothing
1352
+ the tools that read (ledger, graph, runs) and run nothing;
1353
+ --read-only --propose also serves a product's tools that
1354
+ open pull requests and comments, and nothing that approves
1353
1355
 
1354
1356
  Project:
1355
1357
  update (alias: sync) Sync lexicon types into .chant/types/ (does not install
@@ -1376,7 +1378,9 @@ Options:
1376
1378
  records its lineage in .chant/workspace.lock.json
1377
1379
  --skill <name> Init: install only this skill from the lexicon
1378
1380
  --skip-mcp Init: scaffold without writing the project's .mcp.json
1379
- --mcp-read-only Init: register \`chant serve mcp --read-only\` in .mcp.json
1381
+ --mcp-read-only Init: register \`chant serve mcp --read-only\` in .mcp.json;
1382
+ with --propose, \`chant serve mcp --read-only --propose\`.
1383
+ Init --dry-run prints that .mcp.json and writes nothing
1380
1384
  --fix Auto-fix fixable issues (lint command)
1381
1385
  --force Force overwrite existing files (import command)
1382
1386
  -w, --watch Watch for changes and rebuild/re-lint (build, lint)
@@ -20,6 +20,16 @@
20
20
  * the server's own credentials, never from a tool's arguments.
21
21
  *
22
22
  * Tools are registered as `<product>:<name>`, as a lexicon's are.
23
+ *
24
+ * chant#4655 adds a tier between read-only and ordinary for a product tool
25
+ * that opens a pull request (`request_from_template`): `chant serve mcp
26
+ * --read-only --propose`, or `propose: true` on the hook. It serves what the
27
+ * read-only server serves, plus the product tools that declare `forgeWrite:
28
+ * true`, and never chant's op, approve or snapshot tools. The read-only
29
+ * server without `--propose` refuses to start with a `forgeWrite` tool. On
30
+ * the tier a `forgeWrite` tool's name is exempt from the write-word check for
31
+ * `request` and `propose` only: `approve_request` still refuses the start.
32
+ * A product feature-detects the tier on {@link PRODUCT_MCP_PROPOSE_FLOOR}.
23
33
  */
24
34
  import type { McpToolContribution } from "../../mcp/types.js";
25
35
  import { type ReportReader } from "./report-tools.js";
@@ -29,6 +39,8 @@ export interface ProductMcpContext {
29
39
  cwd: string;
30
40
  /** Whether the server is read-only. */
31
41
  readOnly: boolean;
42
+ /** Whether the read-only server also serves the product's `forgeWrite` tools (`--propose`, chant#4655). */
43
+ propose: boolean;
32
44
  /**
33
45
  * The report store, read-only: the hook's `reportUrl`, else the declared
34
46
  * `ci.reportUrl`. Resolves undefined when neither names one.
@@ -45,9 +57,24 @@ export interface ProductMcpHook {
45
57
  reportUrl?: string;
46
58
  /** `false` starts an ordinary server through the hook. Default: read-only. */
47
59
  readOnly?: boolean;
60
+ /**
61
+ * `true` serves the product's `forgeWrite` tools on the read-only server,
62
+ * as `--propose` does (chant#4655). It needs the server read-only: with
63
+ * `readOnly: false` the server refuses to start.
64
+ */
65
+ propose?: boolean;
48
66
  /** Text added to the server's `initialize` instructions. */
49
67
  instructions?: string;
50
68
  }
69
+ /**
70
+ * The first chant whose `chant serve mcp` has the `--propose` tier and serves
71
+ * `forgeWrite` product tools on it (chant#4655). A product checks this before
72
+ * it passes `--propose` or `propose: true`, and refuses naming this release
73
+ * when its chant is older.
74
+ */
75
+ export declare const PRODUCT_MCP_PROPOSE_FLOOR = "0.124.58";
76
+ /** The words a `forgeWrite` tool's name may hold on the `--propose` tier, which the write-word check passes over (chant#4655). */
77
+ export declare const PRODUCT_TOOL_PROPOSE_WORDS: readonly ["request", "propose"];
51
78
  /** Words that say a tool would change something; a read-only server will not serve a tool named with one. terragucci's list. */
52
79
  export declare const PRODUCT_TOOL_WRITE_WORDS: readonly ["approve", "apply", "override", "revoke", "unlock", "lock", "merge", "resume", "migrate", "write", "put", "delete", "push", "commit", "publish", "reconcile", "rollout", "init", "generate", "respond", "relay", "notify", "update", "create", "exec"];
53
80
  /** The words that refuse a name wherever they stand in it, not only first. */
@@ -58,19 +85,25 @@ export declare const PRODUCT_TOOL_STRONG_WORDS: readonly ["approve", "override",
58
85
  * strong one anywhere: `last_apply` reads, `apply_wave` and `wave_approve`
59
86
  * do not.
60
87
  */
61
- export declare function productToolWriteWord(name: string): string | undefined;
62
- /** A read-only server refused a product tool named as a write. */
88
+ export declare function productToolWriteWord(name: string, exempt?: readonly string[]): string | undefined;
89
+ /**
90
+ * A read-only server refused a product tool: one named as a write, or a
91
+ * `forgeWrite` tool on a server started without `--propose` (chant#4655).
92
+ */
63
93
  export declare class ProductToolRefusedError extends Error {
64
- constructor(product: string, name: string, word: string);
94
+ constructor(product: string, name: string, word: string, tier?: "read-only" | "propose" | "forge-write");
65
95
  }
66
96
  /**
67
- * The product tools a server serves: on a read-only server only those that
68
- * declare `readOnly: true`, and none named as a write (a throw, so the server
69
- * does not start). On an ordinary server every tool.
97
+ * The product tools a server serves. On an ordinary server every tool. On a
98
+ * read-only server those that declare `readOnly: true`, none named as a
99
+ * write, and no `forgeWrite` tool (each a throw, so the server does not
100
+ * start). On the `--propose` tier the `readOnly: true` tools under the same
101
+ * check, plus the `forgeWrite` tools, whose names may hold `request` or
102
+ * `propose` but no other write word (chant#4655).
70
103
  */
71
104
  export declare function productToolsServed(hook: ProductMcpHook, ctx: ProductMcpContext): McpToolContribution[];
72
105
  /** The context a hook's tools get on a server at `cwd`. The store is opened on first read. */
73
- export declare function productMcpContext(hook: ProductMcpHook, cwd: string, readOnly: boolean): ProductMcpContext;
106
+ export declare function productMcpContext(hook: ProductMcpHook, cwd: string, readOnly: boolean, propose?: boolean): ProductMcpContext;
74
107
  /** The hook the running command serves, set by a product's bin. */
75
108
  export declare function activeProductMcpHook(): ProductMcpHook | undefined;
76
109
  /** Run `fn` with `hook` active, and put the earlier one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