@intentius/chant 0.124.57 → 0.124.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ci-product-words.d.ts +47 -2
- package/dist/ci-product-words.d.ts.map +1 -1
- package/dist/ci-product-words.js +59 -1
- package/dist/ci-product.d.ts +26 -2
- package/dist/ci-product.d.ts.map +1 -1
- package/dist/ci-product.js +25 -2
- package/dist/cli/commands/init.d.ts +2 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +1 -1
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.js +5 -1
- package/dist/cli/handlers/init.d.ts.map +1 -1
- package/dist/cli/handlers/init.js +16 -0
- package/dist/cli/handlers/lifecycle-drift.d.ts +2 -1
- package/dist/cli/handlers/lifecycle-drift.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle-drift.js +4 -2
- package/dist/cli/handlers/lock.d.ts.map +1 -1
- package/dist/cli/handlers/lock.js +45 -2
- package/dist/cli/handlers/serve.d.ts.map +1 -1
- package/dist/cli/handlers/serve.js +9 -0
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +11 -3
- package/dist/cli/mcp/product-tools.d.ts +40 -7
- package/dist/cli/mcp/product-tools.d.ts.map +1 -1
- package/dist/cli/mcp/product-tools.js +58 -15
- package/dist/cli/mcp/read-only.d.ts +2 -1
- package/dist/cli/mcp/read-only.d.ts.map +1 -1
- package/dist/cli/mcp/read-only.js +2 -1
- package/dist/cli/mcp/server.d.ts +11 -0
- package/dist/cli/mcp/server.d.ts.map +1 -1
- package/dist/cli/mcp/server.js +15 -3
- package/dist/cli/mcp-config.d.ts +4 -1
- package/dist/cli/mcp-config.d.ts.map +1 -1
- package/dist/cli/mcp-config.js +6 -2
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +27 -0
- package/dist/cli/registry.d.ts +14 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/components/pr-pipeline.d.ts +56 -0
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +55 -2
- package/dist/components/product-pipeline.d.ts +18 -1
- package/dist/components/product-pipeline.d.ts.map +1 -1
- package/dist/components/product-pipeline.js +8 -2
- package/dist/drift-record.d.ts +5 -0
- package/dist/drift-record.d.ts.map +1 -1
- package/dist/e2e-harness/driver.d.ts.map +1 -1
- package/dist/e2e-harness/driver.js +97 -0
- package/dist/e2e-harness/forgejo.d.ts +5 -1
- package/dist/e2e-harness/forgejo.d.ts.map +1 -1
- package/dist/e2e-harness/forgejo.js +35 -0
- package/dist/e2e-harness/index.d.ts +7 -0
- package/dist/e2e-harness/index.d.ts.map +1 -1
- package/dist/e2e-harness/index.js +10 -1
- package/dist/e2e-harness/ports.d.ts +31 -0
- package/dist/e2e-harness/ports.d.ts.map +1 -1
- package/dist/e2e-harness/scenario.d.ts.map +1 -1
- package/dist/e2e-harness/scenario.js +9 -5
- package/dist/e2e-harness/schemas/e2e-scenario.schema.json +43 -3
- package/dist/e2e-harness/schemas/index.d.ts +22 -1
- package/dist/e2e-harness/schemas/index.d.ts.map +1 -1
- package/dist/e2e-harness/schemas/index.js +1 -1
- package/dist/e2e-harness/steps.d.ts.map +1 -1
- package/dist/e2e-harness/steps.js +4 -0
- package/dist/lifecycle/lock-beat.d.ts +27 -0
- package/dist/lifecycle/lock-beat.d.ts.map +1 -0
- package/dist/lifecycle/lock-beat.js +84 -0
- package/dist/lifecycle/resource-lock.d.ts +54 -1
- package/dist/lifecycle/resource-lock.d.ts.map +1 -1
- package/dist/lifecycle/resource-lock.js +128 -7
- package/dist/mcp/types.d.ts +9 -0
- package/dist/mcp/types.d.ts.map +1 -1
- package/dist/op/activities/activity-contracts.d.ts +4 -4
- package/dist/op/index.d.ts +1 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/index.js +1 -1
- package/dist/op/op-waves-notify.d.ts.map +1 -1
- package/dist/op/op-waves-notify.js +11 -0
- package/dist/op/op-waves-run.d.ts +28 -1
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +92 -7
- package/dist/op/op-waves.d.ts +12 -1
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/op-waves.js +9 -2
- package/dist/release-floors.d.ts +1 -1
- package/dist/release-floors.js +1 -1
- package/dist/template-request/index.d.ts +9 -0
- package/dist/template-request/index.d.ts.map +1 -0
- package/dist/template-request/index.js +8 -0
- package/dist/template-request/request-body.d.ts +21 -0
- package/dist/template-request/request-body.d.ts.map +1 -0
- package/dist/template-request/request-body.js +86 -0
- package/dist/template-request/template-request.d.ts +100 -0
- package/dist/template-request/template-request.d.ts.map +1 -0
- package/dist/template-request/template-request.js +149 -0
- package/dist/template-request/template-request.schema.json +100 -0
- package/dist/template-request/template-spec.d.ts +83 -0
- package/dist/template-request/template-spec.d.ts.map +1 -0
- package/dist/template-request/template-spec.js +146 -0
- package/dist/template-request/template.schema.json +114 -0
- package/dist/template-request/validate.d.ts +4 -0
- package/dist/template-request/validate.d.ts.map +1 -0
- package/dist/template-request/validate.js +21 -0
- package/dist/wave-runtime.mjs +298 -298
- package/dist/workspace/drift-cli.d.ts +13 -1
- package/dist/workspace/drift-cli.d.ts.map +1 -1
- package/dist/workspace/drift-cli.js +19 -3
- package/package.json +8 -1
- package/src/ci-product-words.test.ts +23 -0
- package/src/ci-product-words.ts +68 -3
- package/src/ci-product.ts +31 -1
- package/src/cli/commands/init.ts +3 -1
- package/src/cli/handlers/build.ts +5 -1
- package/src/cli/handlers/init.ts +18 -0
- package/src/cli/handlers/lifecycle-drift.test.ts +52 -0
- package/src/cli/handlers/lifecycle-drift.ts +4 -2
- package/src/cli/handlers/lock.ts +41 -2
- package/src/cli/handlers/serve.ts +9 -0
- package/src/cli/main.ts +11 -3
- package/src/cli/mcp/product-tools.test.ts +56 -1
- package/src/cli/mcp/product-tools.ts +66 -15
- package/src/cli/mcp/read-only.ts +2 -1
- package/src/cli/mcp/server.ts +20 -5
- package/src/cli/mcp-config.test.ts +52 -2
- package/src/cli/mcp-config.ts +6 -3
- package/src/cli/parse-args.ts +19 -0
- package/src/cli/registry.ts +14 -0
- package/src/components/pr-pipeline.ts +87 -2
- package/src/components/product-actions.test.ts +76 -0
- package/src/components/product-pipeline.ts +21 -2
- package/src/drift-record.ts +5 -0
- package/src/e2e-harness/driver.test.ts +163 -0
- package/src/e2e-harness/driver.ts +86 -1
- package/src/e2e-harness/forgejo.ts +42 -1
- package/src/e2e-harness/index.ts +11 -1
- package/src/e2e-harness/ports.ts +33 -0
- package/src/e2e-harness/scenario.ts +8 -6
- package/src/e2e-harness/schemas/README.md +11 -2
- package/src/e2e-harness/schemas/e2e-scenario.schema.json +43 -3
- package/src/e2e-harness/schemas/index.ts +5 -1
- package/src/e2e-harness/schemas.test.ts +44 -1
- package/src/e2e-harness/steps.ts +4 -0
- package/src/lifecycle/lock-beat.ts +99 -0
- package/src/lifecycle/resource-lock-liveness.test.ts +289 -0
- package/src/lifecycle/resource-lock.ts +143 -8
- package/src/mcp/types.ts +9 -0
- package/src/op/index.ts +1 -0
- package/src/op/op-waves-notify.ts +11 -0
- package/src/op/op-waves-preview.test.ts +167 -0
- package/src/op/op-waves-run.ts +116 -8
- package/src/op/op-waves.ts +20 -3
- package/src/release-floors.ts +1 -1
- package/src/template-request/__fixtures__/request-body.md +41 -0
- package/src/template-request/index.ts +8 -0
- package/src/template-request/request-body.ts +91 -0
- package/src/template-request/template-request.schema.json +100 -0
- package/src/template-request/template-request.test.ts +315 -0
- package/src/template-request/template-request.ts +234 -0
- package/src/template-request/template-spec.ts +176 -0
- package/src/template-request/template.schema.json +114 -0
- package/src/template-request/validate.ts +28 -0
- package/src/workspace/drift-cli.test.ts +35 -1
- package/src/workspace/drift-cli.ts +21 -3
package/dist/op/op-waves-run.js
CHANGED
|
@@ -58,6 +58,7 @@ import { blockedMembers, blockedWords, earlierWaveOutcomes, passesThrough, readW
|
|
|
58
58
|
import { approveCommand, evaluateGate, gitGateLedgerPort } from "./gate.js";
|
|
59
59
|
import { isApprovalSpent } from "../lifecycle/gate-applied.js";
|
|
60
60
|
import { samePlanDigest } from "../lifecycle/plan-digest.js";
|
|
61
|
+
import { NEXT_RELEASE } from "../release-floors.js";
|
|
61
62
|
import { isLifecycleLocalNote } from "../lifecycle/local-note.js";
|
|
62
63
|
import { ciRunIdFromEnv } from "./gate-run-locator.js";
|
|
63
64
|
import { appendRunRecord, DEFAULT_RUN_ENV } from "../lifecycle/run-ledger.js";
|
|
@@ -134,7 +135,7 @@ export function readOpWavePolicy(specFile, name, base, cwd, show = gitShowAtBase
|
|
|
134
135
|
const spend = spec.approvals?.spend === true;
|
|
135
136
|
const neverOverMcp = spec.neverOverMcp === true;
|
|
136
137
|
// #3836: the gate's decision point, the spec's for a wave the base does not have yet.
|
|
137
|
-
const asks = { ...pointAtBase(spec, name, `${specFile} at ${sha.slice(0, 12)}`), ...quorumAtBase(spec, `${specFile} at ${sha.slice(0, 12)}`), ...holdsAtBase(spec, `${specFile} at ${sha.slice(0, 12)}`), ...pullRequestGateAtBase(spec) };
|
|
138
|
+
const asks = { ...pointAtBase(spec, name, `${specFile} at ${sha.slice(0, 12)}`), ...quorumAtBase(spec, `${specFile} at ${sha.slice(0, 12)}`), ...holdsAtBase(spec, `${specFile} at ${sha.slice(0, 12)}`), ...pullRequestGateAtBase(spec), ...(spec.approvals?.preview === true ? { preview: true } : {}) };
|
|
138
139
|
const wave = spec.waves.find((w) => w.name === name);
|
|
139
140
|
if (!wave)
|
|
140
141
|
return { ...absent, spend, neverOverMcp, ...asks };
|
|
@@ -203,6 +204,8 @@ function pointAtBase(spec, name, where) {
|
|
|
203
204
|
return { pointRefused: `the decision point at base cannot be asked (${where}: ${problems.join("; ")})` };
|
|
204
205
|
return { point: opWavePointAt(spec, name) };
|
|
205
206
|
}
|
|
207
|
+
/** The first chant whose Op waves spec takes `approvals.preview`: a merged wave applies the plans its pull request previewed, or exits 4. */
|
|
208
|
+
export const OP_WAVES_PREVIEW_FLOOR = NEXT_RELEASE;
|
|
206
209
|
/** The first chant whose op entry exports {@link opWavePlanPath} (terragucci#1304). */
|
|
207
210
|
export const OP_WAVE_PLAN_PATH_FLOOR = "0.124.56";
|
|
208
211
|
/** Where a run's plan file goes: one target's plan, as opposed to {@link opWavePlansPath}, the wave's `plans.json`. */
|
|
@@ -1223,7 +1226,7 @@ function opWaveRunStatus(result) {
|
|
|
1223
1226
|
case CHANT_EXIT.waiting:
|
|
1224
1227
|
return { status: d?.point?.question ? "waiting" : "gated" };
|
|
1225
1228
|
case CHANT_EXIT.moved:
|
|
1226
|
-
return { status: "fail", failure: { code: "moved", reason: `plans moved since the decision: ${result.moved.join(", ") || "(none named)"}` } };
|
|
1229
|
+
return { status: "fail", failure: { code: "moved", reason: d?.refused?.reason === "moved" ? d.refused.message ?? "the plans are not the ones the pull request previewed" : `plans moved since the decision: ${result.moved.join(", ") || "(none named)"}` } };
|
|
1227
1230
|
case CHANT_EXIT.denied:
|
|
1228
1231
|
return { status: "fail", failure: { code: "denied", reason: d?.refused?.message ?? `the policy denied ${d?.refused?.runs.join(", ") ?? "a run"}, and no override counts` } };
|
|
1229
1232
|
case CHANT_EXIT.declined:
|
|
@@ -1530,12 +1533,12 @@ function writeOpWaveOutcome(options, dir, result, members) {
|
|
|
1530
1533
|
const moved = new Set(result.moved);
|
|
1531
1534
|
const otherwise = result.exitCode === 0 ? (options.decide ? "decided" : "unchanged")
|
|
1532
1535
|
: result.exitCode === CHANT_EXIT.waiting ? "waiting"
|
|
1533
|
-
: result.exitCode === CHANT_EXIT.denied || result.exitCode === CHANT_EXIT.declined ? "refused"
|
|
1536
|
+
: result.exitCode === CHANT_EXIT.denied || result.exitCode === CHANT_EXIT.declined || result.decision?.refused?.reason === "moved" ? "refused"
|
|
1534
1537
|
: result.exitCode >= CHANT_EXIT.moved && result.exitCode <= CHANT_EXIT.superseded ? "not-applied"
|
|
1535
1538
|
: "failed";
|
|
1536
1539
|
for (const t of targets) {
|
|
1537
1540
|
const by = result.blocked?.[t];
|
|
1538
|
-
out[t] = by !== undefined ? { status: "blocked", by } : applied.has(t) ? { status: "applied" } : failed.has(t) ? { status: "failed" } : moved.has(t) ? { status: "not-applied" } : { status: otherwise };
|
|
1541
|
+
out[t] = by !== undefined ? { status: "blocked", by } : applied.has(t) ? { status: "applied" } : failed.has(t) ? { status: "failed" } : moved.has(t) && result.decision?.refused?.reason !== "moved" ? { status: "not-applied" } : { status: otherwise };
|
|
1539
1542
|
}
|
|
1540
1543
|
}
|
|
1541
1544
|
const part = { ...(options.group !== undefined ? { group: options.group } : {}), ...(options.share !== undefined ? { share: options.share } : {}) };
|
|
@@ -1602,7 +1605,7 @@ async function planOpWave(options, { k, pass }, skip) {
|
|
|
1602
1605
|
result.decision = decision;
|
|
1603
1606
|
ctx.gateRule = { approval: decision.approval, base: decision.base, neverOverMcp: decision.neverOverMcp === true };
|
|
1604
1607
|
if (decision.status === "waiting" || decision.status === "refused") {
|
|
1605
|
-
log(`wave ${k} (${wave.name}) is ${decision.status === "refused" ? "refused by its policy" : `waiting on ${decision.heldOn?.gate ?? decision.gate}`}; nothing applied. ${decision.approve ?? ""}`.trim());
|
|
1608
|
+
log(`wave ${k} (${wave.name}) is ${decision.status === "refused" ? (decision.refused?.reason === "moved" ? "refused, its plans moved since the pull request previewed them" : "refused by its policy") : `waiting on ${decision.heldOn?.gate ?? decision.gate}`}; nothing applied. ${decision.approve ?? ""}`.trim());
|
|
1606
1609
|
return { end: { ...result, exitCode: decision.status === "refused" ? refusedExit(decision) : CHANT_EXIT.waiting } };
|
|
1607
1610
|
}
|
|
1608
1611
|
// The share runs the hooks its deciding job read at base, around its own slice.
|
|
@@ -1833,6 +1836,19 @@ async function decideOpWave(options, { prior }, planned, digest) {
|
|
|
1833
1836
|
}
|
|
1834
1837
|
if (members.some((m) => m.denied && !m.override))
|
|
1835
1838
|
await settleDenials(ctx, decision, overriders, overridersSource);
|
|
1839
|
+
// `approvals.preview` at base: the merged wave applies what the pull request previewed. Planned again to a digest this job already let through, it has been judged.
|
|
1840
|
+
let unseen = false;
|
|
1841
|
+
if (planned.rules.preview && !kept && decision.status !== "refused") {
|
|
1842
|
+
const seen = await previewOf(options, ctx, digest);
|
|
1843
|
+
if ("error" in seen)
|
|
1844
|
+
return { end: failed(ctx, `wave ${k} (${wave.name}): ${seen.error}, so it cannot be compared with what the pull request previewed and nothing in it was applied`) };
|
|
1845
|
+
decision.preview = seen.preview;
|
|
1846
|
+
unseen = seen.preview.status !== "matched";
|
|
1847
|
+
if (!unseen)
|
|
1848
|
+
log(`wave ${k} (${wave.name}): the plans are the ones pull request #${seen.preview.pr} previewed at ${seen.preview.head?.slice(0, 12)} (${digest})`);
|
|
1849
|
+
else
|
|
1850
|
+
log(`wave ${k} (${wave.name}): ${seen.preview.reason}`);
|
|
1851
|
+
}
|
|
1836
1852
|
if (kept && was.status === "approved" && decision.status !== "refused") {
|
|
1837
1853
|
// #3821: planned again after the apply asked to, to the same digest: the approval this job found still holds, and is not spent twice.
|
|
1838
1854
|
for (const key of ["via", "approvedBy", "approvedAt", "review", "spentAt"])
|
|
@@ -1841,8 +1857,12 @@ async function decideOpWave(options, { prior }, planned, digest) {
|
|
|
1841
1857
|
decision.status = "approved";
|
|
1842
1858
|
log(`wave ${k} (${wave.name}): planned again to the same digest, so the approval by ${was.approvedBy} still holds`);
|
|
1843
1859
|
}
|
|
1844
|
-
else if (decision.status !== "refused" && (opWaveNeedsApproval(policy, members) || holds.length > 0))
|
|
1860
|
+
else if (decision.status !== "refused" && (unseen || opWaveNeedsApproval(policy, members) || holds.length > 0)) {
|
|
1845
1861
|
await settleGate(options, ctx, decision);
|
|
1862
|
+
// Plans nobody previewed apply only under an approval of these very plans, whatever the gate policy says.
|
|
1863
|
+
if (unseen)
|
|
1864
|
+
refuseUnseen(ctx, decision);
|
|
1865
|
+
}
|
|
1846
1866
|
const code = await decided(ctx, decision, recordPath);
|
|
1847
1867
|
if (code.exitCode !== 0)
|
|
1848
1868
|
return { end: code };
|
|
@@ -1860,6 +1880,67 @@ async function decideOpWave(options, { prior }, planned, digest) {
|
|
|
1860
1880
|
}
|
|
1861
1881
|
return { go: { runs: wave.runs, earlierHolds: [], recordPath } };
|
|
1862
1882
|
}
|
|
1883
|
+
/**
|
|
1884
|
+
* Compare the wave's set digest with the one the merged pull request's head
|
|
1885
|
+
* recorded for it (`--record-plans`): the plans its reviewers saw. The pull
|
|
1886
|
+
* request is the one the forge says produced the applied commit. Resolves to
|
|
1887
|
+
* `error` only when the forge or the ledger cannot be read, which fails the
|
|
1888
|
+
* wave: a missing answer never stands in for a match.
|
|
1889
|
+
*/
|
|
1890
|
+
async function previewOf(options, ctx, digest) {
|
|
1891
|
+
const { spec, k, cwd } = ctx;
|
|
1892
|
+
const review = await import("./gate-review.js");
|
|
1893
|
+
const head = options.head ?? execFileSync("git", ["rev-parse", "HEAD"], { cwd, encoding: "utf-8" }).trim();
|
|
1894
|
+
let merged;
|
|
1895
|
+
try {
|
|
1896
|
+
merged = await (options.reviews ?? review.reviewSourceFromEnv()).mergedReview(head);
|
|
1897
|
+
}
|
|
1898
|
+
catch (err) {
|
|
1899
|
+
return { error: `the merged pull request could not be read from the forge (${err instanceof Error ? err.message : String(err)})` };
|
|
1900
|
+
}
|
|
1901
|
+
if (!merged)
|
|
1902
|
+
return { preview: { status: "unrecorded", reason: `no merged pull request produced ${head.slice(0, 12)}, so no plans were previewed for it` } };
|
|
1903
|
+
let plans;
|
|
1904
|
+
try {
|
|
1905
|
+
plans = await (options.headPlans ?? ((name, h) => readHeadPlans(name, h, cwd)))(spec.name, merged.head);
|
|
1906
|
+
}
|
|
1907
|
+
catch (err) {
|
|
1908
|
+
return { error: `the plans recorded for #${merged.pr} could not be read (${err instanceof Error ? err.message : String(err)})` };
|
|
1909
|
+
}
|
|
1910
|
+
const seen = { pr: merged.pr, head: merged.head };
|
|
1911
|
+
const recorded = plans?.waves.find((w) => w.wave === k)?.digest;
|
|
1912
|
+
if (recorded === undefined) {
|
|
1913
|
+
return { preview: { status: "unrecorded", ...seen, reason: `no plans are recorded for wave ${k} at the head ${merged.head.slice(0, 12)} of #${merged.pr} (its pipeline runs \`chant run wave --record-plans\`), so nothing was previewed` } };
|
|
1914
|
+
}
|
|
1915
|
+
if (!samePlanDigest(recorded, digest)) {
|
|
1916
|
+
return {
|
|
1917
|
+
preview: {
|
|
1918
|
+
status: "moved",
|
|
1919
|
+
...seen,
|
|
1920
|
+
recorded,
|
|
1921
|
+
reason: `the plans moved since #${merged.pr} previewed them: the head ${merged.head.slice(0, 12)} planned ${recorded}, and the merge plans ${digest}`,
|
|
1922
|
+
},
|
|
1923
|
+
};
|
|
1924
|
+
}
|
|
1925
|
+
return { preview: { status: "matched", ...seen, recorded } };
|
|
1926
|
+
}
|
|
1927
|
+
/**
|
|
1928
|
+
* The gate was asked about plans the pull request did not preview. An
|
|
1929
|
+
* approval of exactly these plans lets the wave apply, since a person saw
|
|
1930
|
+
* them; with none, the wave is refused as moved (exit 4) and the approval
|
|
1931
|
+
* that would let it through is named.
|
|
1932
|
+
*/
|
|
1933
|
+
function refuseUnseen(ctx, decision) {
|
|
1934
|
+
const preview = decision.preview;
|
|
1935
|
+
if (decision.status === "approved") {
|
|
1936
|
+
preview.approvedAnyway = true;
|
|
1937
|
+
ctx.log(`wave ${ctx.k} (${ctx.wave.name}): ${preview.reason}; it applies under the approval of ${decision.digest} by ${decision.approvedBy}`);
|
|
1938
|
+
return;
|
|
1939
|
+
}
|
|
1940
|
+
const how = decision.approve ? ` Approve these plans to apply them: ${decision.approve}` : "";
|
|
1941
|
+
decision.status = "refused";
|
|
1942
|
+
decision.refused = { reason: "moved", runs: decision.members.map((m) => m.member).sort(), message: `${preview.reason}.${how}` };
|
|
1943
|
+
}
|
|
1863
1944
|
/** Apply a decided wave, or a share's unmoved runs (exit 4 when any moved). */
|
|
1864
1945
|
async function applyOpWave(options, planned, decidedWave) {
|
|
1865
1946
|
const { ctx, decision } = planned;
|
|
@@ -1895,6 +1976,10 @@ async function decided(ctx, decision, recordPath, heldOn) {
|
|
|
1895
1976
|
log(`Nothing in wave ${k} (${wave.name}) or after it ran: ${decision.refused.message}`);
|
|
1896
1977
|
return { ...result, exitCode: CHANT_EXIT.declined };
|
|
1897
1978
|
}
|
|
1979
|
+
if (decision.status === "refused" && decision.refused?.reason === "moved") {
|
|
1980
|
+
log(`Nothing in wave ${k} (${wave.name}) or after it ran: ${decision.refused.message}`);
|
|
1981
|
+
return { ...result, moved: [...decision.refused.runs], exitCode: CHANT_EXIT.moved };
|
|
1982
|
+
}
|
|
1898
1983
|
if (decision.status === "refused") {
|
|
1899
1984
|
log(`Nothing in wave ${k} (${wave.name}) or after it ran: the policy denied ${decision.refused?.runs.join(", ")}, and no override counts for ${decision.refused?.runs.length === 1 ? "it" : "them"}.`);
|
|
1900
1985
|
return { ...result, exitCode: CHANT_EXIT.denied };
|
|
@@ -2069,7 +2154,7 @@ async function spendOverrides(ctx, decision) {
|
|
|
2069
2154
|
}
|
|
2070
2155
|
/** The exit code of a refused wave: 8 when its decision point refused it (#3836), 7 when the product's policy did (#3821). */
|
|
2071
2156
|
function refusedExit(decision) {
|
|
2072
|
-
return decision.refused?.reason === "point" ? CHANT_EXIT.declined : CHANT_EXIT.denied;
|
|
2157
|
+
return decision.refused?.reason === "point" ? CHANT_EXIT.declined : decision.refused?.reason === "moved" ? CHANT_EXIT.moved : CHANT_EXIT.denied;
|
|
2073
2158
|
}
|
|
2074
2159
|
function failed(ctx, line) {
|
|
2075
2160
|
ctx.log(line);
|
package/dist/op/op-waves.d.ts
CHANGED
|
@@ -623,6 +623,17 @@ export interface OpWavesOverride {
|
|
|
623
623
|
}
|
|
624
624
|
/** What happens to an approval once a wave applies under it (#3784). */
|
|
625
625
|
export interface OpWavesApprovals {
|
|
626
|
+
/**
|
|
627
|
+
* Apply what the pull request previewed, or refuse. With `preview: true`
|
|
628
|
+
* (read at the base commit, like the policy) a merged wave compares the
|
|
629
|
+
* set digest it plans now with the digest the merged pull request's head
|
|
630
|
+
* recorded for it (`chant run wave --record-plans`), whatever its gate
|
|
631
|
+
* policy and approval mode, and applies only on a match. A different
|
|
632
|
+
* digest, or no record to compare with, refuses the wave with the moved
|
|
633
|
+
* code (4) unless an approval of the digest it plans now stands. Default
|
|
634
|
+
* false: a wave that needs no approval applies what it plans.
|
|
635
|
+
*/
|
|
636
|
+
preview?: boolean;
|
|
626
637
|
/**
|
|
627
638
|
* Spend it. Before a wave applies under an approval it records that in
|
|
628
639
|
* `_gates/<name>/applied.jsonl` on `chant/lifecycle`, and from then on the
|
|
@@ -709,7 +720,7 @@ export declare const OP_WAVES_APPROVAL_STATUS_VAR = "CHANT_APPROVAL_STATUS";
|
|
|
709
720
|
* from the pull request, by its review (`pr-review`) or by its own approval
|
|
710
721
|
* (`pull-request`, under the 2026-10-28 ruling).
|
|
711
722
|
*/
|
|
712
|
-
export declare function opWavesPostsApprovalStatus(spec: Pick<OpWavesSpec, "waves">): boolean;
|
|
723
|
+
export declare function opWavesPostsApprovalStatus(spec: Pick<OpWavesSpec, "waves" | "approvals">): boolean;
|
|
713
724
|
/**
|
|
714
725
|
* The command the approval status job runs (#4630), through the product's
|
|
715
726
|
* bin: `--pr`, `--head` and `--base` from the pull request event on GitHub
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"op-waves.d.ts","sourceRoot":"","sources":["../../src/op/op-waves.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyFG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAqB,KAA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,CAAA;CAAO,GAAG,SAAS,EAAE,CA8C3G;AAED,+EAA+E;AAC/E,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,cAAc,GAAG,SAAS,CAEnH;AAED,iCAAiC;AACjC,wBAAgB,QAAQ,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,MAAM,CAEhF"}
|
package/dist/op/op-waves.js
CHANGED
|
@@ -254,7 +254,8 @@ export const OP_WAVES_APPROVAL_STATUS_VAR = "CHANT_APPROVAL_STATUS";
|
|
|
254
254
|
* (`pull-request`, under the 2026-10-28 ruling).
|
|
255
255
|
*/
|
|
256
256
|
export function opWavesPostsApprovalStatus(spec) {
|
|
257
|
-
|
|
257
|
+
// `approvals.preview` compares the merged wave with the head's recorded plans, so the head must record them.
|
|
258
|
+
return spec.approvals?.preview === true || spec.waves.some((w) => w.approval === "pr-review" || w.approval === "pull-request");
|
|
258
259
|
}
|
|
259
260
|
/**
|
|
260
261
|
* The command the approval status job runs (#4630), through the product's
|
|
@@ -386,8 +387,14 @@ export function assertOpWavesSpec(spec) {
|
|
|
386
387
|
}
|
|
387
388
|
continue;
|
|
388
389
|
}
|
|
390
|
+
if (key === "preview") {
|
|
391
|
+
// The pull request's recorded plans are what the merged wave applies, read at base.
|
|
392
|
+
if (typeof value !== "boolean")
|
|
393
|
+
throw new Error(`${where}: approvals.preview must be true or false.`);
|
|
394
|
+
continue;
|
|
395
|
+
}
|
|
389
396
|
if (key !== "spend")
|
|
390
|
-
throw new Error(`${where}: approvals.${key} is not a setting; the ones there are approvals.spend, approvals.quorum, approvals.reviewLedger, approvals.involved and approvals.pullRequest.`);
|
|
397
|
+
throw new Error(`${where}: approvals.${key} is not a setting; the ones there are approvals.spend, approvals.preview, approvals.quorum, approvals.reviewLedger, approvals.involved and approvals.pullRequest.`);
|
|
391
398
|
if (typeof value !== "boolean")
|
|
392
399
|
throw new Error(`${where}: approvals.spend must be true or false.`);
|
|
393
400
|
}
|
package/dist/release-floors.d.ts
CHANGED
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
* this constant to the next patch (#4501). The check fails while a floor
|
|
20
20
|
* still names this constant after its version shipped.
|
|
21
21
|
*/
|
|
22
|
-
export declare const NEXT_RELEASE = "0.124.
|
|
22
|
+
export declare const NEXT_RELEASE = "0.124.59";
|
|
23
23
|
//# sourceMappingURL=release-floors.d.ts.map
|
package/dist/release-floors.js
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@intentius/chant/template-request` (#4651): the template request
|
|
3
|
+
* document (template-request/v1), template.yml/v1 with its engine-neutral
|
|
4
|
+
* input kinds, the refusals, the branch and the pull request body.
|
|
5
|
+
*/
|
|
6
|
+
export * from "./template-spec.js";
|
|
7
|
+
export * from "./template-request.js";
|
|
8
|
+
export * from "./request-body.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/template-request/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@intentius/chant/template-request` (#4651): the template request
|
|
3
|
+
* document (template-request/v1), template.yml/v1 with its engine-neutral
|
|
4
|
+
* input kinds, the refusals, the branch and the pull request body.
|
|
5
|
+
*/
|
|
6
|
+
export * from "./template-spec.js";
|
|
7
|
+
export * from "./template-request.js";
|
|
8
|
+
export * from "./request-body.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pull request body for a template request (#4651), and the read that
|
|
3
|
+
* recovers the request from it. The body names the template, the version,
|
|
4
|
+
* each input on its own row, the requester (and the claimed requester, when
|
|
5
|
+
* the client names one) and where the request came from,
|
|
6
|
+
* and says that nothing was applied or approved. The request itself follows
|
|
7
|
+
* in a fenced block whose info string is `json` and the schema id, so behold
|
|
8
|
+
* and an audit read it from the pull request without a second file.
|
|
9
|
+
*/
|
|
10
|
+
import { type CiProductWords } from "../ci-product-words.js";
|
|
11
|
+
import { type TemplateRequest } from "./template-request.js";
|
|
12
|
+
/** The request's pull request body, in the product's words (default: the active ones). */
|
|
13
|
+
export declare function requestBody(request: TemplateRequest, words?: CiProductWords): string;
|
|
14
|
+
/**
|
|
15
|
+
* The request a pull request body carries: the first fenced block whose info
|
|
16
|
+
* string is `json` and the template-request/v1 schema id, parsed and
|
|
17
|
+
* checked against the schema. Undefined when the body has no such block, or
|
|
18
|
+
* the block is not a valid request.
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseRequestBody(body: string): TemplateRequest | undefined;
|
|
21
|
+
//# sourceMappingURL=request-body.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-body.d.ts","sourceRoot":"","sources":["../../src/template-request/request-body.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAqE,KAAK,eAAe,EAA2B,MAAM,oBAAoB,CAAC;AAsBtJ,0FAA0F;AAC1F,wBAAgB,WAAW,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,GAAE,cAAqC,GAAG,MAAM,CAgC1G;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAgB1E"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pull request body for a template request (#4651), and the read that
|
|
3
|
+
* recovers the request from it. The body names the template, the version,
|
|
4
|
+
* each input on its own row, the requester (and the claimed requester, when
|
|
5
|
+
* the client names one) and where the request came from,
|
|
6
|
+
* and says that nothing was applied or approved. The request itself follows
|
|
7
|
+
* in a fenced block whose info string is `json` and the schema id, so behold
|
|
8
|
+
* and an audit read it from the pull request without a second file.
|
|
9
|
+
*/
|
|
10
|
+
import { activeProductWords } from "../ci-product-words.js";
|
|
11
|
+
import { TEMPLATE_REQUEST_SCHEMA_ID, templateName, validateTemplateRequest } from "./template-request.js";
|
|
12
|
+
const VIA = {
|
|
13
|
+
form: "the request form",
|
|
14
|
+
mcp: "an agent over MCP",
|
|
15
|
+
cli: "the command line",
|
|
16
|
+
};
|
|
17
|
+
/** Text in a table cell's code span, with `|` escaped so the row holds and a fence longer than any backticks inside. */
|
|
18
|
+
function code(text) {
|
|
19
|
+
const escaped = text.replace(/\|/g, "\\|").replace(/\n/g, " ");
|
|
20
|
+
const ticks = Math.max(0, ...[...escaped.matchAll(/`+/g)].map((m) => m[0].length));
|
|
21
|
+
const fence = "`".repeat(ticks + 1);
|
|
22
|
+
return ticks > 0 ? `${fence} ${escaped} ${fence}` : `${fence}${escaped}${fence}`;
|
|
23
|
+
}
|
|
24
|
+
/** A fence longer than any run of backticks in `text`, at least three. */
|
|
25
|
+
function fenceFor(text) {
|
|
26
|
+
const longest = Math.max(0, ...[...text.matchAll(/`+/g)].map((m) => m[0].length));
|
|
27
|
+
return "`".repeat(Math.max(3, longest + 1));
|
|
28
|
+
}
|
|
29
|
+
/** The request's pull request body, in the product's words (default: the active ones). */
|
|
30
|
+
export function requestBody(request, words = activeProductWords()) {
|
|
31
|
+
const what = request.kind === "addon" && request.addon !== undefined ? `add-on ${code(request.addon)} for app ${code(request.app)}` : `app ${code(request.app)}`;
|
|
32
|
+
const lines = [
|
|
33
|
+
`### ${words.product} request: ${what} from ${templateName(request.template)}`,
|
|
34
|
+
"",
|
|
35
|
+
"| | |",
|
|
36
|
+
"| --- | --- |",
|
|
37
|
+
`| Template | ${code(request.template)} |`,
|
|
38
|
+
`| Version | ${code(request.version)} |`,
|
|
39
|
+
`| Requested by | ${code(request.requestedBy)} |`,
|
|
40
|
+
...(request.claimedBy !== undefined ? [`| Claimed by (as given by the client; the forge does not vouch for it) | ${code(request.claimedBy)} |`] : []),
|
|
41
|
+
`| Through | ${VIA[request.via]} |`,
|
|
42
|
+
"",
|
|
43
|
+
];
|
|
44
|
+
const names = Object.keys(request.inputs).sort();
|
|
45
|
+
if (names.length > 0) {
|
|
46
|
+
lines.push("| Input | Value |", "| --- | --- |");
|
|
47
|
+
for (const name of names)
|
|
48
|
+
lines.push(`| ${code(name)} | ${code(JSON.stringify(request.inputs[name]) ?? "null")} |`);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
lines.push("The request gives no inputs; every input takes its default.");
|
|
52
|
+
}
|
|
53
|
+
const [, applied] = words.verbs.apply;
|
|
54
|
+
const [, planned] = words.verbs.plan;
|
|
55
|
+
lines.push("", `Nothing was ${applied} or approved. This pull request only adds files; it is ${planned} like any other, and a person reviews and merges it.`, "");
|
|
56
|
+
const json = JSON.stringify(request, null, 2);
|
|
57
|
+
const fence = fenceFor(json);
|
|
58
|
+
lines.push(`${fence}json ${TEMPLATE_REQUEST_SCHEMA_ID}`, json, fence, "");
|
|
59
|
+
return lines.join("\n");
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The request a pull request body carries: the first fenced block whose info
|
|
63
|
+
* string is `json` and the template-request/v1 schema id, parsed and
|
|
64
|
+
* checked against the schema. Undefined when the body has no such block, or
|
|
65
|
+
* the block is not a valid request.
|
|
66
|
+
*/
|
|
67
|
+
export function parseRequestBody(body) {
|
|
68
|
+
const lines = body.replace(/\r\n/g, "\n").split("\n");
|
|
69
|
+
for (let i = 0; i < lines.length; i++) {
|
|
70
|
+
const open = /^(`{3,})json[ \t]+(\S+)[ \t]*$/.exec(lines[i]);
|
|
71
|
+
if (!open || open[2] !== TEMPLATE_REQUEST_SCHEMA_ID)
|
|
72
|
+
continue;
|
|
73
|
+
const fence = open[1];
|
|
74
|
+
const end = lines.findIndex((l, j) => j > i && l.trimEnd() === fence);
|
|
75
|
+
if (end < 0)
|
|
76
|
+
return undefined;
|
|
77
|
+
try {
|
|
78
|
+
const doc = JSON.parse(lines.slice(i + 1, end).join("\n"));
|
|
79
|
+
return validateTemplateRequest(doc).length === 0 ? doc : undefined;
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
return undefined;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return undefined;
|
|
86
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The template request, template-request/v1 (#4651): "an app named orders
|
|
3
|
+
* from template X at version Y with these inputs", as one JSON document.
|
|
4
|
+
* terragucci, plywood and behold all turn one into a pull request, and this
|
|
5
|
+
* module is where they agree on the document, its refusals and its branch.
|
|
6
|
+
* ./request-body.ts writes the pull request body that carries it.
|
|
7
|
+
*
|
|
8
|
+
* {@link checkTemplateRequest} reads the release catalog for the version's
|
|
9
|
+
* status and attestation, and the version's template.yml (./template-spec.ts)
|
|
10
|
+
* for its inputs. It reads no engine field: the inputs' kinds are
|
|
11
|
+
* engine-neutral.
|
|
12
|
+
*/
|
|
13
|
+
import { type AttestationState, type ReleaseCatalog } from "../lifecycle/release-catalog.js";
|
|
14
|
+
import { type TemplateSpec } from "./template-spec.js";
|
|
15
|
+
/** The first chant that writes and reads template-request/v1 and template.yml/v1 (#4651). */
|
|
16
|
+
export declare const TEMPLATE_REQUEST_FLOOR = "0.124.58";
|
|
17
|
+
/** The request document's `$schema`. */
|
|
18
|
+
export declare const TEMPLATE_REQUEST_SCHEMA_ID: string;
|
|
19
|
+
/** The request's contract version. */
|
|
20
|
+
export declare const TEMPLATE_REQUEST_CONTRACT = 1;
|
|
21
|
+
/** An app or add-on name: a lowercase letter, then up to 39 lowercase letters, digits and -. */
|
|
22
|
+
export declare const REQUEST_NAME_PATTERN: RegExp;
|
|
23
|
+
/** Where a request came from. */
|
|
24
|
+
export type TemplateRequestVia = "form" | "mcp" | "cli";
|
|
25
|
+
/** A template request. */
|
|
26
|
+
export interface TemplateRequest {
|
|
27
|
+
$schema: string;
|
|
28
|
+
contract: 1;
|
|
29
|
+
kind: "app" | "addon";
|
|
30
|
+
/** The template's address, such as `acme/bucket/aws`. */
|
|
31
|
+
template: string;
|
|
32
|
+
/** The version in the catalog, or a digest for a release that names none. */
|
|
33
|
+
version: string;
|
|
34
|
+
app: string;
|
|
35
|
+
/** For kind `addon`: the add-on's name. */
|
|
36
|
+
addon?: string;
|
|
37
|
+
/** The values given, by input name. */
|
|
38
|
+
inputs: Record<string, unknown>;
|
|
39
|
+
/** Who asked, as the forge vouches for it: the login of the run's actor. */
|
|
40
|
+
requestedBy: string;
|
|
41
|
+
/**
|
|
42
|
+
* The person the client says filled the form or asked the agent, when it
|
|
43
|
+
* names one. The forge does not vouch for it; it is shown as claimed.
|
|
44
|
+
*/
|
|
45
|
+
claimedBy?: string;
|
|
46
|
+
via: TemplateRequestVia;
|
|
47
|
+
}
|
|
48
|
+
/** The fields a caller gives {@link makeTemplateRequest}; `$schema` and `contract` are filled in. */
|
|
49
|
+
export type TemplateRequestInput = Omit<TemplateRequest, "$schema" | "contract">;
|
|
50
|
+
/**
|
|
51
|
+
* Why a request is refused. `invalid` is a document the schema refuses for
|
|
52
|
+
* a reason no other code names (a missing field, a `via` it does not know).
|
|
53
|
+
*/
|
|
54
|
+
export type TemplateRequestRefusalCode = "unknown-version" | "not-active" | "unsigned" | "unknown-input" | "missing-input" | "sensitive-input" | "input-type" | "bad-name" | "invalid";
|
|
55
|
+
/** Every refusal code, in the order {@link checkTemplateRequest} checks them. */
|
|
56
|
+
export declare const TEMPLATE_REQUEST_REFUSAL_CODES: readonly TemplateRequestRefusalCode[];
|
|
57
|
+
/** One refusal: its code, the request field it is about, and a sentence naming that field. */
|
|
58
|
+
export interface TemplateRequestRefusal {
|
|
59
|
+
code: TemplateRequestRefusalCode;
|
|
60
|
+
/** `app`, `addon`, `version`, `inputs.<name>`, or the schema path for `invalid`. */
|
|
61
|
+
field: string;
|
|
62
|
+
reason: string;
|
|
63
|
+
}
|
|
64
|
+
export type TemplateRequestCheck = {
|
|
65
|
+
ok: true;
|
|
66
|
+
request: TemplateRequest;
|
|
67
|
+
} | {
|
|
68
|
+
ok: false;
|
|
69
|
+
refusals: TemplateRequestRefusal[];
|
|
70
|
+
};
|
|
71
|
+
export interface CheckTemplateRequestOptions {
|
|
72
|
+
/**
|
|
73
|
+
* The catalog component the template is. Absent: the component named
|
|
74
|
+
* `request.template`. A product that lists components by path looks the
|
|
75
|
+
* address up itself and passes the name here.
|
|
76
|
+
*/
|
|
77
|
+
component?: string;
|
|
78
|
+
/** The lowest attestation a version may have. Default `signed`; `unsigned` accepts any. */
|
|
79
|
+
require?: AttestationState;
|
|
80
|
+
}
|
|
81
|
+
/** Fill `$schema` and `contract` into a request. */
|
|
82
|
+
export declare function makeTemplateRequest(input: TemplateRequestInput): TemplateRequest;
|
|
83
|
+
/** The schema problems of a request document, one line each; empty when it is valid. */
|
|
84
|
+
export declare function validateTemplateRequest(doc: unknown): string[];
|
|
85
|
+
/**
|
|
86
|
+
* Check a request against the catalog and the version's template.yml.
|
|
87
|
+
* Returns every refusal, each with its code and a reason naming the field.
|
|
88
|
+
* A bad name or a document the schema refuses stops the check there, and so
|
|
89
|
+
* does a version the catalog does not list; past that, the version's status
|
|
90
|
+
* and attestation and each input are all checked.
|
|
91
|
+
*/
|
|
92
|
+
export declare function checkTemplateRequest(request: unknown, catalog: ReleaseCatalog, templateSpec: TemplateSpec, options?: CheckTemplateRequestOptions): TemplateRequestCheck;
|
|
93
|
+
/**
|
|
94
|
+
* A template's name as a branch uses it: the second-to-last segment of an
|
|
95
|
+
* address with three or more (`acme/bucket/aws` is `bucket`), else the last.
|
|
96
|
+
*/
|
|
97
|
+
export declare function templateName(template: string): string;
|
|
98
|
+
/** The request's branch: `request/<template-name>/<app>`, and `/<addon>` after it for an add-on. */
|
|
99
|
+
export declare function requestBranch(request: Pick<TemplateRequest, "template" | "app"> & Partial<Pick<TemplateRequest, "kind" | "addon">>): string;
|
|
100
|
+
//# sourceMappingURL=template-request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-request.d.ts","sourceRoot":"","sources":["../../src/template-request/template-request.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAkB,KAAK,gBAAgB,EAAyB,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACjI,OAAO,EAAmD,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGrG,6FAA6F;AAC7F,eAAO,MAAM,sBAAsB,aAAa,CAAC;AAEjD,wCAAwC;AACxC,eAAO,MAAM,0BAA0B,EAAE,MAAmB,CAAC;AAE7D,sCAAsC;AACtC,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C,gGAAgG;AAChG,eAAO,MAAM,oBAAoB,QAA2B,CAAC;AAE7D,iCAAiC;AACjC,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC;AAExD,0BAA0B;AAC1B,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,CAAC;IACZ,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC;IACtB,yDAAyD;IACzD,QAAQ,EAAE,MAAM,CAAC;IACjB,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,4EAA4E;IAC5E,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,kBAAkB,CAAC;CACzB;AAED,qGAAqG;AACrG,MAAM,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