@intentius/chant 0.122.0 → 0.124.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/check-lexicon.d.ts.map +1 -1
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/handlers/gate-resume.d.ts +1 -1
- package/dist/cli/handlers/gate-resume.d.ts.map +1 -1
- package/dist/cli/handlers/operator.d.ts +1 -1
- package/dist/cli/handlers/operator.d.ts.map +1 -1
- package/dist/cli/handlers/override-approve.d.ts +17 -0
- package/dist/cli/handlers/override-approve.d.ts.map +1 -0
- package/dist/cli/handlers/run-wave.d.ts.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/registry.d.ts +4 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/config-import.d.ts +1 -1
- package/dist/gate-decision.d.ts +157 -0
- package/dist/gate-decision.d.ts.map +1 -0
- package/dist/lifecycle/gate-applied.d.ts +75 -0
- package/dist/lifecycle/gate-applied.d.ts.map +1 -0
- package/dist/lifecycle/gate-audit.d.ts +145 -0
- package/dist/lifecycle/gate-audit.d.ts.map +1 -0
- package/dist/lifecycle/gate-ledger-select.d.ts +54 -0
- package/dist/lifecycle/gate-ledger-select.d.ts.map +1 -0
- package/dist/lifecycle/gate-ledger.d.ts +1 -45
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/override-ledger.d.ts +34 -0
- package/dist/lifecycle/override-ledger.d.ts.map +1 -0
- package/dist/lifecycle/rollback.d.ts.map +1 -1
- package/dist/lifecycle/work-item-id.d.ts +22 -0
- package/dist/lifecycle/work-item-id.d.ts.map +1 -0
- package/dist/lifecycle/work-lease.d.ts +2 -2
- package/dist/lifecycle/work-lease.d.ts.map +1 -1
- package/dist/lint/policy-import.d.ts +1 -1
- package/dist/lint/post-synth.d.ts +20 -1
- package/dist/lint/post-synth.d.ts.map +1 -1
- package/dist/notify-verify.d.ts +62 -0
- package/dist/notify-verify.d.ts.map +1 -0
- package/dist/notify-verify.js +76 -0
- package/dist/notify.d.ts +202 -0
- package/dist/notify.d.ts.map +1 -0
- package/dist/notify.js +307 -0
- package/dist/op/__fixtures__/decide-stub-backend.d.ts +1 -1
- package/dist/op/activities/activity-contracts.d.ts +4 -4
- package/dist/op/activities/gh-host.d.ts +37 -0
- package/dist/op/activities/gh-host.d.ts.map +1 -0
- package/dist/op/activities/lexicon-upgrade.d.ts +11 -0
- package/dist/op/activities/lexicon-upgrade.d.ts.map +1 -1
- package/dist/op/activities/propose-upgrade.d.ts.map +1 -1
- package/dist/op/activities/reconcile.d.ts +74 -76
- package/dist/op/activities/reconcile.d.ts.map +1 -1
- package/dist/op/gate-approval.d.ts +17 -1
- package/dist/op/gate-approval.d.ts.map +1 -1
- package/dist/op/gate-name.d.ts +8 -1
- package/dist/op/gate-name.d.ts.map +1 -1
- package/dist/op/gate-resume.d.ts +4 -2
- package/dist/op/gate-resume.d.ts.map +1 -1
- package/dist/op/gate-review.d.ts +2 -1
- package/dist/op/gate-review.d.ts.map +1 -1
- package/dist/op/gate.d.ts +43 -6
- package/dist/op/gate.d.ts.map +1 -1
- package/dist/op/index.d.ts +8 -6
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/op-waves-notify.d.ts +31 -0
- package/dist/op/op-waves-notify.d.ts.map +1 -0
- package/dist/op/op-waves-run.d.ts +218 -16
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves.d.ts +113 -2
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/operator.d.ts +15 -0
- package/dist/op/operator.d.ts.map +1 -1
- package/dist/op/work-lease-decl.d.ts.map +1 -1
- package/dist/op/work-lease-run.d.ts.map +1 -1
- package/dist/override-gate.d.ts +224 -0
- package/dist/override-gate.d.ts.map +1 -0
- package/dist/pr-forge.d.ts +225 -19
- package/dist/pr-forge.d.ts.map +1 -1
- package/dist/workspace/conformance/__fixtures__/reference-broker.d.ts +1 -1
- package/dist/workspace/conformance/broker.d.ts +1 -1
- package/dist/workspace/status-gates.d.ts +1 -0
- package/dist/workspace/status-gates.d.ts.map +1 -1
- package/dist/workspace/trust/gate-seal.d.ts +96 -0
- package/dist/workspace/trust/gate-seal.d.ts.map +1 -0
- package/dist/workspace/trust/policy.d.ts +2 -41
- package/dist/workspace/trust/policy.d.ts.map +1 -1
- package/dist/workspace/trust/seal.d.ts +2 -27
- package/dist/workspace/trust/seal.d.ts.map +1 -1
- package/dist/workspace/trust/trust-files.d.ts +57 -0
- package/dist/workspace/trust/trust-files.d.ts.map +1 -0
- package/dist/workspace/work-cli.d.ts.map +1 -1
- package/package.json +15 -2
- package/src/cli/commands/build.ts +1 -1
- package/src/cli/commands/check-lexicon.ts +3 -1
- package/src/cli/commands/lint-post-synth.e2e.test.ts +117 -0
- package/src/cli/commands/lint.test.ts +4 -109
- package/src/cli/commands/lint.ts +5 -2
- package/src/cli/discovery-skip.e2e.test.ts +18 -3
- package/src/cli/handlers/__snapshots__/build-member.test.ts.snap +2 -2
- package/src/cli/handlers/gate-resume.ts +3 -2
- package/src/cli/handlers/operator.test.ts +12 -1
- package/src/cli/handlers/operator.ts +25 -13
- package/src/cli/handlers/override-approve.test.ts +87 -0
- package/src/cli/handlers/override-approve.ts +103 -0
- package/src/cli/handlers/run-wave.ts +10 -2
- package/src/cli/main.test.ts +8 -0
- package/src/cli/main.ts +15 -0
- package/src/cli/registry.ts +4 -0
- package/src/config-import.ts +1 -1
- package/src/discovery/sandbox/run.test.ts +1 -1
- package/src/gate-decision-bundle.test.ts +56 -0
- package/src/gate-decision.test.ts +237 -0
- package/src/gate-decision.ts +321 -0
- package/src/lifecycle/gate-applied.ts +115 -0
- package/src/lifecycle/gate-audit-bundle.test.ts +47 -0
- package/src/lifecycle/gate-audit.test.ts +134 -0
- package/src/lifecycle/gate-audit.ts +438 -0
- package/src/lifecycle/gate-ledger-select.ts +113 -0
- package/src/lifecycle/gate-ledger.test.ts +22 -0
- package/src/lifecycle/gate-ledger.ts +9 -104
- package/src/lifecycle/override-ledger.test.ts +63 -0
- package/src/lifecycle/override-ledger.ts +69 -0
- package/src/lifecycle/rollback.ts +5 -1
- package/src/lifecycle/work-item-id.test.ts +71 -0
- package/src/lifecycle/work-item-id.ts +35 -0
- package/src/lifecycle/work-lease.ts +4 -5
- package/src/lint/policy-import.ts +1 -1
- package/src/lint/post-synth.test.ts +29 -0
- package/src/lint/post-synth.ts +21 -2
- package/src/notify-bundle.test.ts +50 -0
- package/src/notify-plain-node.e2e.test.ts +68 -0
- package/src/notify-verify.test.ts +59 -0
- package/src/notify-verify.ts +93 -0
- package/src/notify.schema.json +72 -0
- package/src/notify.test.ts +279 -0
- package/src/notify.ts +398 -0
- package/src/op/__fixtures__/decide-stub-backend.ts +1 -1
- package/src/op/activities/gh-host.test.ts +130 -0
- package/src/op/activities/gh-host.ts +79 -0
- package/src/op/activities/lexicon-upgrade.ts +22 -1
- package/src/op/activities/propose-upgrade.ts +5 -1
- package/src/op/activities/reconcile.test.ts +284 -280
- package/src/op/activities/reconcile.ts +128 -131
- package/src/op/gate-approval.test.ts +175 -7
- package/src/op/gate-approval.ts +27 -1
- package/src/op/gate-name.ts +10 -2
- package/src/op/gate-resume.ts +6 -3
- package/src/op/gate-review.ts +4 -7
- package/src/op/gate.ts +117 -16
- package/src/op/index.ts +36 -5
- package/src/op/op-waves-notify.test.ts +127 -0
- package/src/op/op-waves-notify.ts +101 -0
- package/src/op/op-waves-run.ts +908 -123
- package/src/op/op-waves.test.ts +543 -3
- package/src/op/op-waves.ts +215 -6
- package/src/op/operator.test.ts +29 -0
- package/src/op/operator.ts +27 -2
- package/src/op/run-context.test.ts +2 -2
- package/src/op/work-lease-decl.ts +4 -4
- package/src/op/work-lease-run.test.ts +5 -0
- package/src/op/work-lease-run.ts +4 -3
- package/src/override-gate-bundle.test.ts +47 -0
- package/src/override-gate.test.ts +239 -0
- package/src/override-gate.ts +395 -0
- package/src/pr-forge-bundle.test.ts +40 -0
- package/src/pr-forge.test.ts +378 -0
- package/src/pr-forge.ts +546 -47
- package/src/workspace/conformance/__fixture__/decisions/decision.kind.mjs +1 -1
- package/src/workspace/conformance/__fixtures__/reference-broker.ts +1 -1
- package/src/workspace/conformance/broker.ts +1 -1
- package/src/workspace/records-write-contract.test.ts +3 -2
- package/src/workspace/records-write.e2e.test.ts +1 -1
- package/src/workspace/status-gates.ts +7 -4
- package/src/workspace/trust/gate-seal.test.ts +156 -0
- package/src/workspace/trust/gate-seal.ts +254 -0
- package/src/workspace/trust/policy.ts +10 -165
- package/src/workspace/trust/seal.ts +19 -34
- package/src/workspace/trust/trust-files.test.ts +50 -0
- package/src/workspace/trust/trust-files.ts +245 -0
- package/src/workspace/work-cli.ts +5 -3
- package/src/workspace/work-history.test.ts +7 -0
- /package/src/audit/{catalog.test.ts → catalog.e2e.test.ts} +0 -0
- /package/src/audit/{discover.test.ts → discover.e2e.test.ts} +0 -0
- /package/src/audit/{remote-discovery.test.ts → remote-discovery.e2e.test.ts} +0 -0
- /package/src/audit/{rules-doc.test.ts → rules-doc.e2e.test.ts} +0 -0
- /package/src/{bench.test.ts → bench.e2e.test.ts} +0 -0
- /package/src/cli/commands/{check-lexicon-doc-drift.test.ts → check-lexicon-doc-drift.e2e.test.ts} +0 -0
- /package/src/cli/commands/{import.test.ts → import.e2e.test.ts} +0 -0
- /package/src/cli/{component-security-boundary.test.ts → component-security-boundary.e2e.test.ts} +0 -0
- /package/src/cli/mcp/{workspace-tools.test.ts → workspace-tools.e2e.test.ts} +0 -0
- /package/src/cli/{security-boundary.test.ts → security-boundary.e2e.test.ts} +0 -0
- /package/src/cli/{serve-mcp-workspace.test.ts → serve-mcp-workspace.e2e.test.ts} +0 -0
- /package/src/cli/{static-config-read.test.ts → static-config-read.e2e.test.ts} +0 -0
- /package/src/codegen/{json-schema-to-ts.test.ts → json-schema-to-ts.e2e.test.ts} +0 -0
- /package/src/{lexicon-seams.test.ts → lexicon-seams.e2e.test.ts} +0 -0
- /package/src/meta/{declared-imports.test.ts → declared-imports.e2e.test.ts} +0 -0
- /package/src/op/{command-gate.test.ts → command-gate.e2e.test.ts} +0 -0
- /package/src/op/{steward-beside.test.ts → steward-beside.e2e.test.ts} +0 -0
- /package/src/op/{steward-points.test.ts → steward-points.e2e.test.ts} +0 -0
- /package/src/workspace/{checks.test.ts → checks.e2e.test.ts} +0 -0
- /package/src/workspace/{intent-reviews.test.ts → intent-reviews.e2e.test.ts} +0 -0
- /package/src/workspace/{profiles.test.ts → profiles.e2e.test.ts} +0 -0
- /package/src/workspace/{read-contract.test.ts → read-contract.e2e.test.ts} +0 -0
- /package/src/workspace/{records-contract.test.ts → records-contract.e2e.test.ts} +0 -0
- /package/src/workspace/{records-since.test.ts → records-since.e2e.test.ts} +0 -0
- /package/src/workspace/{records-write.test.ts → records-write-commands.e2e.test.ts} +0 -0
- /package/src/workspace/{work-size.test.ts → work-size.e2e.test.ts} +0 -0
package/dist/notify.js
ADDED
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notify (#3761): tell people that a wave waits for an approval, that a run
|
|
3
|
+
* was refused or failed, or that drift was found.
|
|
4
|
+
*
|
|
5
|
+
* terragucci and SQL Yodeler each carried a copy of this (#3756). chant owns
|
|
6
|
+
* the event, its signing and the Slack and Teams posting; a product decides
|
|
7
|
+
* when to send and what its summary says. One event shape,
|
|
8
|
+
* `chant.notify/v1` (`./notify.schema.json`), carries what both send: the
|
|
9
|
+
* wave or environment, the targets concerned, the plan digest, the command
|
|
10
|
+
* that approves it and the run's link.
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { makeNotifyEvent, sendNotify } from "@intentius/chant/notify";
|
|
14
|
+
*
|
|
15
|
+
* const event = makeNotifyEvent({ source: "sql-yodeler", event: "waiting", summary: "prod waits for an approval", targets: ["0007_add_index"], digest, approve: { command } });
|
|
16
|
+
* await sendNotify({ webhook: "YODEL_WEBHOOK_URL", key: "YODEL_WEBHOOK_KEY", slack: "SLACK_WEBHOOK_URL" }, event);
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* The configuration names environment variables, never URLs or keys, and
|
|
20
|
+
* nothing here prints a URL or a key. The generic webhook gets the event as
|
|
21
|
+
* JSON, signed over `<timestamp>.<body>` (`./notify-verify.ts`); it is never
|
|
22
|
+
* posted unsigned. Slack and Teams incoming webhooks get a message rendered
|
|
23
|
+
* from the event, unsigned, since neither checks a signature. A delivery that
|
|
24
|
+
* fails is logged and returned; {@link sendNotify} never throws, so a
|
|
25
|
+
* caller's exit code never depends on it.
|
|
26
|
+
*
|
|
27
|
+
* Bundle-safe: this module reaches only `node:crypto` and
|
|
28
|
+
* `./notify-verify.ts` (`./notify-bundle.test.ts`).
|
|
29
|
+
*/
|
|
30
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
31
|
+
import { DEFAULT_HEADER_PREFIX, signWebhook, webhookHeaderNames } from "./notify-verify.js";
|
|
32
|
+
export { DEFAULT_HEADER_PREFIX, DEFAULT_TOLERANCE_SECONDS, signWebhook, verifyWebhook, webhookHeaderNames } from "./notify-verify.js";
|
|
33
|
+
/** The event's `schema` value. A field is only ever added within a version. */
|
|
34
|
+
export const NOTIFY_SCHEMA = "chant.notify/v1";
|
|
35
|
+
/** The JSON Schema's `$id`. */
|
|
36
|
+
export const NOTIFY_SCHEMA_ID = "https://intentius.io/chant/schemas/notify/v1/notify.schema.json";
|
|
37
|
+
/** What happened. */
|
|
38
|
+
export const NOTIFY_EVENTS = ["waiting", "refused", "failed", "drift"];
|
|
39
|
+
/** The CI run, from its environment: GitHub Actions, Forgejo Actions or GitLab CI. */
|
|
40
|
+
export function ciRun(env) {
|
|
41
|
+
const out = {};
|
|
42
|
+
if (env.CI_JOB_URL)
|
|
43
|
+
out.url = env.CI_JOB_URL;
|
|
44
|
+
else if (env.GITHUB_SERVER_URL && env.GITHUB_REPOSITORY && env.GITHUB_RUN_ID)
|
|
45
|
+
out.url = `${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}`;
|
|
46
|
+
else if (env.CI_PIPELINE_URL)
|
|
47
|
+
out.url = env.CI_PIPELINE_URL;
|
|
48
|
+
if (env.GITLAB_CI === "true")
|
|
49
|
+
out.forge = "gitlab";
|
|
50
|
+
else if (env.GITEA_ACTIONS === "true" || env.FORGEJO_ACTIONS === "true")
|
|
51
|
+
out.forge = "forgejo";
|
|
52
|
+
else if (env.GITHUB_ACTIONS === "true")
|
|
53
|
+
out.forge = "github";
|
|
54
|
+
const repository = env.GITHUB_REPOSITORY || env.CI_PROJECT_PATH;
|
|
55
|
+
if (repository)
|
|
56
|
+
out.repository = repository;
|
|
57
|
+
const commit = env.GITHUB_SHA || env.CI_COMMIT_SHA;
|
|
58
|
+
if (commit)
|
|
59
|
+
out.commit = commit;
|
|
60
|
+
return out;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* A whole event: the fields, with the schema, the time, the CI run (the
|
|
64
|
+
* product's own `run` fields win) and an id. The id is a hash over the
|
|
65
|
+
* source, project, event, wave, environment and digest (else the drift
|
|
66
|
+
* fingerprint, else the commit), so a re-run sends the same id; with none of
|
|
67
|
+
* the three it is random.
|
|
68
|
+
*/
|
|
69
|
+
export function makeNotifyEvent(fields, options = {}) {
|
|
70
|
+
const env = options.env ?? process.env;
|
|
71
|
+
const { id: given, project, targets, run: own, ...rest } = fields;
|
|
72
|
+
const run = { ...ciRun(env), ...(own ?? {}) };
|
|
73
|
+
const resolvedProject = project ?? run.repository ?? "this project";
|
|
74
|
+
const key = fields.digest ?? fields.drift?.fingerprint ?? run.commit;
|
|
75
|
+
const id = given ??
|
|
76
|
+
(key
|
|
77
|
+
? createHash("sha256").update(JSON.stringify([fields.source, resolvedProject, fields.event, fields.wave?.number ?? null, fields.environment ?? null, key])).digest("hex")
|
|
78
|
+
: randomUUID());
|
|
79
|
+
return {
|
|
80
|
+
schema: NOTIFY_SCHEMA,
|
|
81
|
+
id,
|
|
82
|
+
at: (options.now ?? new Date()).toISOString(),
|
|
83
|
+
...rest,
|
|
84
|
+
project: resolvedProject,
|
|
85
|
+
targets: targets ?? [],
|
|
86
|
+
...(Object.keys(run).length > 0 ? { run } : {}),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
const HEADLINE = {
|
|
90
|
+
waiting: "waits for an approval",
|
|
91
|
+
refused: "was refused",
|
|
92
|
+
failed: "failed",
|
|
93
|
+
drift: "drifted",
|
|
94
|
+
};
|
|
95
|
+
/** The first line of every chat message: `<source>: <summary>`, or what happened to what when there is no summary. */
|
|
96
|
+
export function notifyHeadline(e) {
|
|
97
|
+
if (e.summary)
|
|
98
|
+
return `${e.source}: ${e.summary}`;
|
|
99
|
+
const what = e.wave ? `wave ${e.wave.number}${e.wave.name ? ` (${e.wave.name})` : ""} of ${e.project}` : e.environment ? `${e.environment} in ${e.project}` : e.project;
|
|
100
|
+
return `${e.source}: ${what} ${HEADLINE[e.event]}`;
|
|
101
|
+
}
|
|
102
|
+
/** The label and value lines both chat messages show, in order. */
|
|
103
|
+
function facts(e) {
|
|
104
|
+
const out = [];
|
|
105
|
+
if (e.approve?.review)
|
|
106
|
+
out.push({ title: "Review and approve", value: `pull request ${e.approve.review.pr}, then run it again`, link: e.approve.review.url });
|
|
107
|
+
if (e.drift) {
|
|
108
|
+
if (e.drift.changed.length > 0)
|
|
109
|
+
out.push({ title: "Drifted", value: e.drift.changed.join(", ") });
|
|
110
|
+
if (e.drift.missing?.length)
|
|
111
|
+
out.push({ title: "Missing", value: e.drift.missing.join(", ") });
|
|
112
|
+
if (e.drift.failed?.length)
|
|
113
|
+
out.push({ title: "Not refreshed", value: e.drift.failed.join(", ") });
|
|
114
|
+
}
|
|
115
|
+
else if (e.targets.length > 0)
|
|
116
|
+
out.push({ title: "Targets", value: e.targets.join(", ") });
|
|
117
|
+
if (e.digest)
|
|
118
|
+
out.push({ title: "Digest", value: e.digest });
|
|
119
|
+
if (e.approve)
|
|
120
|
+
out.push({ title: e.approve.review ? "Or approve" : "Approve", value: e.approve.command });
|
|
121
|
+
if (e.reason)
|
|
122
|
+
out.push({ title: "Reason", value: e.reason });
|
|
123
|
+
if (e.run?.url)
|
|
124
|
+
out.push({ title: "Run", value: e.run.url, link: e.run.url });
|
|
125
|
+
if (e.reportUrl)
|
|
126
|
+
out.push({ title: "Report", value: e.reportUrl, link: e.reportUrl });
|
|
127
|
+
return out;
|
|
128
|
+
}
|
|
129
|
+
/** A Slack incoming webhook's body: one mrkdwn text, with the approve command as code and the links as links. */
|
|
130
|
+
export function slackMessage(e) {
|
|
131
|
+
const lines = [`*${notifyHeadline(e)}*`];
|
|
132
|
+
for (const f of facts(e)) {
|
|
133
|
+
if (f.title === "Review and approve")
|
|
134
|
+
lines.push(`${f.title}: <${f.link}|pull request ${e.approve.review.pr}>, then run it again`);
|
|
135
|
+
else if (f.title === "Approve" || f.title === "Or approve" || f.title === "Digest")
|
|
136
|
+
lines.push(`${f.title}: \`${f.value}\``);
|
|
137
|
+
else if (f.link)
|
|
138
|
+
lines.push(`${f.title}: <${f.link}>`);
|
|
139
|
+
else
|
|
140
|
+
lines.push(`${f.title}: ${f.value}`);
|
|
141
|
+
}
|
|
142
|
+
return { text: lines.join("\n") };
|
|
143
|
+
}
|
|
144
|
+
/** A Teams incoming webhook's body (a Workflows webhook): one Adaptive Card, with buttons that open the review page and the run. */
|
|
145
|
+
export function teamsMessage(e) {
|
|
146
|
+
const all = facts(e);
|
|
147
|
+
const actions = [
|
|
148
|
+
...(e.approve?.review ? [{ type: "Action.OpenUrl", title: "Review and approve", url: e.approve.review.url }] : []),
|
|
149
|
+
...(e.run?.url ? [{ type: "Action.OpenUrl", title: "Open the run", url: e.run.url }] : []),
|
|
150
|
+
];
|
|
151
|
+
return {
|
|
152
|
+
type: "message",
|
|
153
|
+
attachments: [
|
|
154
|
+
{
|
|
155
|
+
contentType: "application/vnd.microsoft.card.adaptive",
|
|
156
|
+
contentUrl: null,
|
|
157
|
+
content: {
|
|
158
|
+
$schema: "http://adaptivecards.io/schemas/adaptive-card.json",
|
|
159
|
+
type: "AdaptiveCard",
|
|
160
|
+
version: "1.4",
|
|
161
|
+
body: [
|
|
162
|
+
{ type: "TextBlock", text: notifyHeadline(e), weight: "Bolder", wrap: true },
|
|
163
|
+
{ type: "FactSet", facts: all.map((f) => ({ title: f.title, value: f.link && f.title === "Review and approve" ? `${f.value}: ${f.link}` : f.value })) },
|
|
164
|
+
],
|
|
165
|
+
...(actions.length > 0 ? { actions } : {}),
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
],
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
const VARIABLE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
172
|
+
const SETTINGS = ["webhook", "key", "slack", "teams", "events"];
|
|
173
|
+
/** The first problem with a {@link NotifyConfig}, or undefined. `where` prefixes the message. */
|
|
174
|
+
export function notifyConfigProblem(value, where = "notify") {
|
|
175
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
176
|
+
return `${where}: expected { webhook, key, slack, teams, events }`;
|
|
177
|
+
const v = value;
|
|
178
|
+
for (const k of Object.keys(v))
|
|
179
|
+
if (!SETTINGS.includes(k))
|
|
180
|
+
return `${where}.${k}: unknown setting (expected ${SETTINGS.join(", ")})`;
|
|
181
|
+
for (const k of ["webhook", "key", "slack", "teams"]) {
|
|
182
|
+
const n = v[k];
|
|
183
|
+
if (n === undefined)
|
|
184
|
+
continue;
|
|
185
|
+
if (typeof n !== "string" || !VARIABLE.test(n)) {
|
|
186
|
+
const what = k === "key" ? "signing key" : "URL";
|
|
187
|
+
return `${where}.${k}: the name of the environment variable that holds the ${what}, never the ${k === "key" ? "key" : "URL"} itself`;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
if (v.webhook !== undefined && v.key === undefined)
|
|
191
|
+
return `${where}.key: a webhook needs a signing key; name the variable that holds it`;
|
|
192
|
+
if (v.key !== undefined && v.webhook === undefined)
|
|
193
|
+
return `${where}.webhook: a key is for a webhook; name the variable that holds its URL`;
|
|
194
|
+
if (v.webhook === undefined && v.slack === undefined && v.teams === undefined)
|
|
195
|
+
return `${where}: name a webhook (with its key), a slack or a teams URL variable`;
|
|
196
|
+
if (v.events !== undefined && !(Array.isArray(v.events) && v.events.every((e) => NOTIFY_EVENTS.includes(e)))) {
|
|
197
|
+
return `${where}.events: a list of ${NOTIFY_EVENTS.join(", ")}`;
|
|
198
|
+
}
|
|
199
|
+
return undefined;
|
|
200
|
+
}
|
|
201
|
+
/** The environment variables a configuration names, for a pipeline to map its secrets into. */
|
|
202
|
+
export function notifyVariables(config) {
|
|
203
|
+
if (!config)
|
|
204
|
+
return [];
|
|
205
|
+
return [config.webhook, config.key, config.slack, config.teams].filter((n) => typeof n === "string" && n !== "");
|
|
206
|
+
}
|
|
207
|
+
/** The request {@link sendNotify} posts to the webhook: the event as JSON, signed with `key` over `<timestamp>.<body>`. */
|
|
208
|
+
export function webhookRequest(event, key, options = {}) {
|
|
209
|
+
const body = JSON.stringify(event);
|
|
210
|
+
const now = options.now ?? Math.floor(Date.now() / 1000);
|
|
211
|
+
const names = webhookHeaderNames(options.prefix ?? DEFAULT_HEADER_PREFIX);
|
|
212
|
+
return {
|
|
213
|
+
body,
|
|
214
|
+
headers: {
|
|
215
|
+
"content-type": "application/json",
|
|
216
|
+
"user-agent": options.userAgent ?? event.source,
|
|
217
|
+
[names.event]: event.event,
|
|
218
|
+
[names.delivery]: event.id,
|
|
219
|
+
[names.timestamp]: String(now),
|
|
220
|
+
[names.signature]: signWebhook(key, now, body),
|
|
221
|
+
},
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
/** A failure's message, with every URL it names cut out. */
|
|
225
|
+
function redact(message, urls) {
|
|
226
|
+
let out = message;
|
|
227
|
+
for (const u of urls)
|
|
228
|
+
if (u)
|
|
229
|
+
out = out.split(u).join("<url>");
|
|
230
|
+
return out.replace(/https?:\/\/\S+/g, "<url>");
|
|
231
|
+
}
|
|
232
|
+
async function post(fetchFn, url, request, attempts, sleep) {
|
|
233
|
+
let last = "not attempted";
|
|
234
|
+
for (let i = 0; i < attempts; i++) {
|
|
235
|
+
if (i > 0)
|
|
236
|
+
await sleep(500 * i);
|
|
237
|
+
try {
|
|
238
|
+
const res = await fetchFn(url, { method: "POST", ...request, signal: AbortSignal.timeout(10000) });
|
|
239
|
+
if (res.ok)
|
|
240
|
+
return undefined;
|
|
241
|
+
last = `HTTP ${String(res.status)}`;
|
|
242
|
+
// A 4xx will not change on a retry: the receiver refused the event.
|
|
243
|
+
if (res.status < 500)
|
|
244
|
+
return last;
|
|
245
|
+
}
|
|
246
|
+
catch (e) {
|
|
247
|
+
last = redact(e instanceof Error ? e.message : String(e), [url]);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
return last;
|
|
251
|
+
}
|
|
252
|
+
const LABEL = { webhook: "the webhook", slack: "Slack", teams: "Teams" };
|
|
253
|
+
/**
|
|
254
|
+
* Sends `event` to what `config` names, reading the URLs and the key from
|
|
255
|
+
* the environment at send time. Never throws: each delivery's outcome is
|
|
256
|
+
* returned, and a failed one is logged without its URL.
|
|
257
|
+
*/
|
|
258
|
+
export async function sendNotify(config, event, options = {}) {
|
|
259
|
+
if (!config || !event)
|
|
260
|
+
return [];
|
|
261
|
+
if (config.events && !config.events.includes(event.event))
|
|
262
|
+
return [];
|
|
263
|
+
const env = options.env ?? process.env;
|
|
264
|
+
const fetchFn = options.fetch ?? ((url, init) => globalThis.fetch(url, init));
|
|
265
|
+
const attempts = Math.max(1, options.attempts ?? 3);
|
|
266
|
+
const sleep = options.sleep ?? ((ms) => new Promise((r) => setTimeout(r, ms)));
|
|
267
|
+
const log = options.log ?? ((line) => process.stderr.write(line + "\n"));
|
|
268
|
+
const out = [];
|
|
269
|
+
const deliver = async (target, variable, request) => {
|
|
270
|
+
let d;
|
|
271
|
+
try {
|
|
272
|
+
const url = env[variable];
|
|
273
|
+
if (!url)
|
|
274
|
+
d = { target, ok: false, detail: `${variable} is not set` };
|
|
275
|
+
else {
|
|
276
|
+
const r = request();
|
|
277
|
+
if (typeof r === "string")
|
|
278
|
+
d = { target, ok: false, detail: r };
|
|
279
|
+
else {
|
|
280
|
+
const failed = await post(fetchFn, url, r, attempts, sleep);
|
|
281
|
+
d = { target, ok: failed === undefined, detail: failed ?? "delivered" };
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
catch (e) {
|
|
286
|
+
d = { target, ok: false, detail: redact(e instanceof Error ? e.message : String(e), [env[variable] ?? ""]) };
|
|
287
|
+
}
|
|
288
|
+
if (!d.ok)
|
|
289
|
+
log(`notify: the ${event.event} event was not delivered to ${LABEL[target]}: ${d.detail}`);
|
|
290
|
+
out.push(d);
|
|
291
|
+
};
|
|
292
|
+
const json = (body) => ({ headers: { "content-type": "application/json" }, body: JSON.stringify(body) });
|
|
293
|
+
if (config.webhook) {
|
|
294
|
+
await deliver("webhook", config.webhook, () => {
|
|
295
|
+
const key = config.key ? env[config.key] : undefined;
|
|
296
|
+
if (!key)
|
|
297
|
+
return `${config.key ?? "the key variable"} is not set, and an event is never sent unsigned`;
|
|
298
|
+
return webhookRequest(event, key, { ...(options.now !== undefined ? { now: options.now } : {}), ...(options.prefix ? { prefix: options.prefix } : {}), ...(options.userAgent ? { userAgent: options.userAgent } : {}) });
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
if (config.slack)
|
|
302
|
+
await deliver("slack", config.slack, () => json((options.render?.slack ?? slackMessage)(event)));
|
|
303
|
+
if (config.teams)
|
|
304
|
+
await deliver("teams", config.teams, () => json((options.render?.teams ?? teamsMessage)(event)));
|
|
305
|
+
return out;
|
|
306
|
+
}
|
|
307
|
+
//# sourceMappingURL=notify.js.map
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* forces one (429 or 529, say). Every request it read is kept in `requests`.
|
|
16
16
|
*
|
|
17
17
|
* It lives under `__fixtures__` because it listens on a port, and no module
|
|
18
|
-
* chant runs does (#2657, `test/no-listener.test.ts`): only tests start it.
|
|
18
|
+
* chant runs does (#2657, `test/no-listener.e2e.test.ts`): only tests start it.
|
|
19
19
|
*/
|
|
20
20
|
import type { WireAnswer } from "../../workspace/points.js";
|
|
21
21
|
import { type BackendRequest } from "../decide-backend.js";
|
|
@@ -318,11 +318,11 @@ export declare const decideContract: import("../index.js").ActivityContract<{
|
|
|
318
318
|
backends?: Record<string, {
|
|
319
319
|
url: string;
|
|
320
320
|
key?: {
|
|
321
|
-
env: string;
|
|
322
|
-
} | {
|
|
323
321
|
capability: string;
|
|
324
322
|
member?: string | undefined;
|
|
325
323
|
env?: string | undefined;
|
|
324
|
+
} | {
|
|
325
|
+
env: string;
|
|
326
326
|
} | undefined;
|
|
327
327
|
timeoutMs?: number | undefined;
|
|
328
328
|
}> | undefined;
|
|
@@ -410,11 +410,11 @@ export declare const factoryAskContract: import("../index.js").ActivityContract<
|
|
|
410
410
|
backends?: Record<string, {
|
|
411
411
|
url: string;
|
|
412
412
|
key?: {
|
|
413
|
-
env: string;
|
|
414
|
-
} | {
|
|
415
413
|
capability: string;
|
|
416
414
|
member?: string | undefined;
|
|
417
415
|
env?: string | undefined;
|
|
416
|
+
} | {
|
|
417
|
+
env: string;
|
|
418
418
|
} | undefined;
|
|
419
419
|
timeoutMs?: number | undefined;
|
|
420
420
|
}> | undefined;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The host a `gh` call that names none should go to (#3780).
|
|
3
|
+
*
|
|
4
|
+
* `gh pr create`, `gh pr view`, `gh label create` and `gh issue create` take
|
|
5
|
+
* neither a URL nor a host. Outside a checkout they go to github.com; inside
|
|
6
|
+
* one, `gh` matches the git remotes against the hosts it knows, which in a CI
|
|
7
|
+
* job is github.com alone, so a GitHub Enterprise Server or Forgejo remote is
|
|
8
|
+
* not taken for a GitHub host at all. `GH_HOST` names the host for those calls,
|
|
9
|
+
* and `gh` then reads `GH_ENTERPRISE_TOKEN` for it rather than `GH_TOKEN`
|
|
10
|
+
* (#2333), so the job's token is copied across when the job set only that.
|
|
11
|
+
*
|
|
12
|
+
* The host is the job's forge when the run is a GitHub Actions or Forgejo
|
|
13
|
+
* Actions job (`GITHUB_SERVER_URL`, `FORGEJO_SERVER_URL` first), else the
|
|
14
|
+
* `origin` remote's. github.com, or a host nothing names, leaves the
|
|
15
|
+
* environment as it was, so github.com runs are unchanged. A `GH_HOST` already
|
|
16
|
+
* set is the caller's choice and is kept.
|
|
17
|
+
*
|
|
18
|
+
* `gh pr` speaks GraphQL, which Forgejo does not serve, so on Forgejo this
|
|
19
|
+
* makes those calls reach the right instance and fail there by name rather
|
|
20
|
+
* than on github.com.
|
|
21
|
+
*/
|
|
22
|
+
type Env = Record<string, string | undefined>;
|
|
23
|
+
/** The host of a git remote URL: `https://host/o/r`, `ssh://git@host:22/o/r`, or `git@host:o/r`. */
|
|
24
|
+
export declare function remoteHost(url: string | undefined): string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* `env` with `GH_HOST` set to `host` when it is not github.com, and
|
|
27
|
+
* `GH_ENTERPRISE_TOKEN` set from `GH_TOKEN` or `GITHUB_TOKEN` when neither
|
|
28
|
+
* enterprise variable is. Pure, for tests and for callers that know the host.
|
|
29
|
+
*/
|
|
30
|
+
export declare function ghEnvForHost<E extends Env>(env: E, host: string | undefined): E;
|
|
31
|
+
/**
|
|
32
|
+
* The environment to run a host-less `gh` call with: {@link ghEnvForHost}
|
|
33
|
+
* for the job's forge, or for `origin`'s host in `cwd` outside a CI job.
|
|
34
|
+
*/
|
|
35
|
+
export declare function ghHostEnv(env?: NodeJS.ProcessEnv, cwd?: string): Promise<NodeJS.ProcessEnv>;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=gh-host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gh-host.d.ts","sourceRoot":"","sources":["../../../src/op/activities/gh-host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAOH,KAAK,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;AAE9C,oGAAoG;AACpG,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAYtE;AAOD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,CAAC,CAM/E;AAED;;;GAGG;AACH,wBAAsB,SAAS,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAY9G"}
|
|
@@ -200,6 +200,17 @@ export declare function buildUpgradeSummary(opts: {
|
|
|
200
200
|
instructions: string;
|
|
201
201
|
};
|
|
202
202
|
}): string;
|
|
203
|
+
/**
|
|
204
|
+
* `run`, with the forge's host handed to every `gh` call that brings no
|
|
205
|
+
* environment of its own (#3780). `gh pr view`, `gh pr edit`, `gh pr create`,
|
|
206
|
+
* `gh label create` and the ambient `gh issue create` name no host, so on
|
|
207
|
+
* GitHub Enterprise Server or Forgejo they would not reach the job's own
|
|
208
|
+
* forge; see `./gh-host.ts`. A call that passes an `env` (the issue recipe's
|
|
209
|
+
* full-URL `gh api` calls, #2320) already names its host and keeps it. The
|
|
210
|
+
* environment is resolved once, on the first `gh` call. `git` calls pass
|
|
211
|
+
* through untouched.
|
|
212
|
+
*/
|
|
213
|
+
export declare function withGhHost(run: GhRunner, resolve?: () => Promise<NodeJS.ProcessEnv>): GhRunner;
|
|
203
214
|
/**
|
|
204
215
|
* The hidden marker that makes this lexicon's upgrade-status issue findable
|
|
205
216
|
* across re-runs (#2297): written as the issue body's first line, matched by
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lexicon-upgrade.d.ts","sourceRoot":"","sources":["../../../src/op/activities/lexicon-upgrade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,OAAO,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC/F,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC1F,OAAO,EAAmB,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"lexicon-upgrade.d.ts","sourceRoot":"","sources":["../../../src/op/activities/lexicon-upgrade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,OAAO,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC/F,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC1F,OAAO,EAAmB,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAIrF,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAMlC,gDAAgD;AAChD,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,OAAO,GAAG,cAAc,CAAC;AAErE,+CAA+C;AAC/C,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,cAAc,CAAC;AAE1D,2CAA2C;AAC3C,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,UAAU,CAAC;AAE/C,MAAM,WAAW,kBAAkB;IACjC;;;;;OAKG;IACH,OAAO,EAAE,gBAAgB,CAAC;IAC1B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,0CAA0C;IAC1C,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B;;;;OAIG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B;;;OAGG;IACH,aAAa,CAAC,EA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1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propose-upgrade.d.ts","sourceRoot":"","sources":["../../../src/op/activities/propose-upgrade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;
|
|
1
|
+
{"version":3,"file":"propose-upgrade.d.ts","sourceRoot":"","sources":["../../../src/op/activities/propose-upgrade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AASH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,QAAQ,GAAG,cAAc,CAAC;AAEtE,MAAM,WAAW,2BAA2B;IAC1C,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gHAAgH;IAChH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,mFAAmF;IACnF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iFAAiF;IACjF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6GAA6G;IAC7G,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8EAA8E;IAC9E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,0DAA0D;IAC1D,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,OAAO,iCAAiC,EAAE,WAAW,CAAC;CACnE;AAED,uFAAuF;AACvF,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAEhG,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,kBAAkB,CAAC;IACzB,2DAA2D;I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