@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
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type GithubShapedForge } from "../../pr-forge.js";
|
|
1
2
|
/**
|
|
2
3
|
* What the reconcile activity does with the regenerated source.
|
|
3
4
|
*
|
|
@@ -15,14 +16,11 @@
|
|
|
15
16
|
* {@link mergeRequestContextFrom}.
|
|
16
17
|
*
|
|
17
18
|
* On Forgejo the same mode posts the same GitHub-shaped comment (chant
|
|
18
|
-
* #2291):
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* `github.com`, and Forgejo does not serve `/api/v3` — verified on a real
|
|
24
|
-
* Forgejo 12.0.4+gitea-1.22.0 instance during INTENTIUS/choudoufu#1027. See
|
|
25
|
-
* {@link postOrUpdateComment} and {@link githubApiBaseFrom}.
|
|
19
|
+
* #2291): a Forgejo Actions job sets `GITHUB_REPOSITORY`, `GITHUB_API_URL`
|
|
20
|
+
* and `github.token` the way a GitHub Actions job does, and Forgejo's own
|
|
21
|
+
* `/api/v1` takes the same GET/POST/PATCH calls. The calls go through the
|
|
22
|
+
* forge client in `../../pr-forge.ts` over `fetch` (chant #3757), the client
|
|
23
|
+
* the pull-request loop uses. See {@link githubShapedForgeFrom}.
|
|
26
24
|
*
|
|
27
25
|
* `issue` needs no merge/pull request — its whole point is a cron trigger
|
|
28
26
|
* that has none — so its forge split reads off a wider signal: any GitLab CI
|
|
@@ -33,48 +31,29 @@
|
|
|
33
31
|
* recipe `comment` mode's note uses, and opens a new one only when it finds
|
|
34
32
|
* none. Which is why that marker has to name the Op (chant #2319) and why
|
|
35
33
|
* this mode refuses a step that supplies neither an `op` nor a `marker` — see
|
|
36
|
-
* {@link issueMarker} and {@link noIssueIdentityMessage}.
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* half works — plain paginated listing (no `/search/issues`, confirmed
|
|
60
|
-
* absent from Forgejo's own OpenAPI spec) and the `.pull_request == null`
|
|
61
|
-
* filter both behave exactly as they do against github.com. The *write*
|
|
62
|
-
* half did not, for a reason no mock could have caught: `gh`'s own
|
|
63
|
-
* `GH_TOKEN`/`GITHUB_TOKEN` only authenticate a request to github.com or a
|
|
64
|
-
* ghe.com subdomain (`gh help environment`), never a self-hosted Forgejo,
|
|
65
|
-
* and both this function's POST/PATCH calls and `postOrUpdateComment`'s
|
|
66
|
-
* carried only `GH_TOKEN`. Every write either made on a real Forgejo
|
|
67
|
-
* instance failed with `{"message":"token is required"}` (HTTP 401), with
|
|
68
|
-
* `GH_DEBUG=api` showing no `Authorization` header at all — which is what
|
|
69
|
-
* shipped in 0.62.0 and 0.63.0, `comment` mode included.
|
|
70
|
-
*
|
|
71
|
-
* Both paths now forward that credential as `GH_ENTERPRISE_TOKEN` as well as
|
|
72
|
-
* `GH_TOKEN`, which is the variable `gh` reads for a host in neither of those
|
|
73
|
-
* two classes (chant #2333). Re-run against the same live instance from a
|
|
74
|
-
* shell with no stored `gh auth login`, the identical POST now sends
|
|
75
|
-
* `Authorization: token …` and returns HTTP 201. See {@link ghCredentialEnv}
|
|
76
|
-
* for the whole probe, for why `GH_HOST` turned out not to be needed
|
|
77
|
-
* alongside it, and for why github.com's own behavior is untouched.
|
|
34
|
+
* {@link issueMarker} and {@link noIssueIdentityMessage}. See {@link
|
|
35
|
+
* postOrUpdateGithubIssue} for why the GitHub/GHES/Forgejo lookup pages
|
|
36
|
+
* rather than using GitHub's Search API, and for the decision that this mode
|
|
37
|
+
* never closes the issue itself. Only a run outside any known CI job — no
|
|
38
|
+
* `CI_PROJECT_ID`, no `GITHUB_REPOSITORY` — falls back to `gh issue create`'s
|
|
39
|
+
* own ambient repo detection and the operator's `gh auth login`, still
|
|
40
|
+
* marker-prefixed so a later CI run of the same Op finds and edits it instead
|
|
41
|
+
* of opening a second one.
|
|
42
|
+
*
|
|
43
|
+
* Both modes resolve the GitHub/Forgejo credential the same way, through
|
|
44
|
+
* {@link commentTokenFrom}: `CHANT_FORGEJO_TOKEN`, then `GH_TOKEN`, then
|
|
45
|
+
* `GITHUB_TOKEN` (chant #2320), refusing by name before any call when none
|
|
46
|
+
* is set ({@link noCommentTokenMessage}, {@link noIssueTokenMessage}).
|
|
47
|
+
*
|
|
48
|
+
* Until #3757 these two modes shelled to `gh api`. That reached Forgejo only
|
|
49
|
+
* after two fixes: a full URL, because `gh` resolves a relative path against
|
|
50
|
+
* `/api/v3` (#2291), and the token under `GH_ENTERPRISE_TOKEN`, because `gh`
|
|
51
|
+
* sends `GH_TOKEN` only to github.com and `ghe.com` hosts and a Forgejo write
|
|
52
|
+
* arrived with no `Authorization` header (#2315, #2333, verified against a
|
|
53
|
+
* real Forgejo 12.0.4+gitea-1.22.0 instance). The client sends the header
|
|
54
|
+
* itself, so neither depends on how `gh` classifies a host. {@link
|
|
55
|
+
* ghCredentialEnv} keeps that fix for the `gh` calls `lexiconUpgrade` still
|
|
56
|
+
* makes.
|
|
78
57
|
*/
|
|
79
58
|
export type ReconcileMode = "pull-request" | "issue" | "report" | "comment";
|
|
80
59
|
/** A change-set entry that triggered reconciliation. */
|
|
@@ -340,10 +319,10 @@ export interface CommentToken {
|
|
|
340
319
|
source: string;
|
|
341
320
|
}
|
|
342
321
|
/**
|
|
343
|
-
* Resolve the token `
|
|
344
|
-
* (chant #2291).
|
|
345
|
-
*
|
|
346
|
-
*
|
|
322
|
+
* Resolve the token the `comment` and `issue` modes post with on GitHub and
|
|
323
|
+
* Forgejo, most specific first (chant #2291). The generated workflow sets
|
|
324
|
+
* `GH_TOKEN` and `GITHUB_TOKEN` to `${{ github.token }}` for every
|
|
325
|
+
* non-`report` finding mode — on
|
|
347
326
|
* Forgejo the same way as on GitHub, and the real-instance read confirmed
|
|
348
327
|
* `github.token` is populated there and good for a 200 read and a 201 write,
|
|
349
328
|
* authored as `forgejo-actions`. So the common case needs nothing set beyond
|
|
@@ -352,8 +331,8 @@ export interface CommentToken {
|
|
|
352
331
|
* `CHANT_FORGEJO_TOKEN` is checked first for the case that ambient token
|
|
353
332
|
* cannot cover: a run posting to a Forgejo instance other than the one the
|
|
354
333
|
* job executes on, where `github.token`'s scope stops at its own instance.
|
|
355
|
-
*
|
|
356
|
-
*
|
|
334
|
+
* A run with none of the three is refused by name before any call, in place
|
|
335
|
+
* of the forge's own opaque 401.
|
|
357
336
|
*/
|
|
358
337
|
export declare function commentTokenFrom(env: Record<string, string | undefined>): CommentToken | undefined;
|
|
359
338
|
/**
|
|
@@ -420,20 +399,35 @@ export declare function ghCredentialEnv(base: NodeJS.ProcessEnv, token: CommentT
|
|
|
420
399
|
export declare function noCommentTokenMessage(repo: string, number: number): string;
|
|
421
400
|
/** What an `issue`-mode step says on a repository it has no credential for (#2320). */
|
|
422
401
|
export declare function noIssueTokenMessage(repo: string): string;
|
|
402
|
+
/**
|
|
403
|
+
* The GitHub or Forgejo client a `comment` or `issue` finding posts through
|
|
404
|
+
* (#3757): `../../pr-forge.ts`, the one the pull-request loop already uses,
|
|
405
|
+
* over `fetch`. These two modes used to shell to `gh`, which needed `gh` on
|
|
406
|
+
* the runner and needed it to attach a credential to a host it did not
|
|
407
|
+
* recognise (#2333). The token is the one {@link commentTokenFrom} resolved
|
|
408
|
+
* and the base is {@link githubApiBaseFrom}'s, so nothing about what a step
|
|
409
|
+
* sets has changed.
|
|
410
|
+
*
|
|
411
|
+
* The two forges share every call these modes make and differ on two things
|
|
412
|
+
* the client needs to know: the page parameter (`per_page` against `limit`)
|
|
413
|
+
* and the authorization scheme. A Forgejo run is told apart the way
|
|
414
|
+
* `../gate-resume.ts` tells it apart, by `FORGEJO_ACTIONS` or
|
|
415
|
+
* `GITEA_ACTIONS`, and also by an API base ending in `/api/v1`, which is how
|
|
416
|
+
* a step posting to some other Forgejo instance (`CHANT_FORGEJO_TOKEN`) names
|
|
417
|
+
* it. GitHub serves `/api/v3` or `api.github.com`, never `/api/v1`.
|
|
418
|
+
*/
|
|
419
|
+
export declare function githubShapedForgeFrom(env: Record<string, string | undefined>, repo: string, token: CommentToken, signal?: AbortSignal): GithubShapedForge;
|
|
423
420
|
/**
|
|
424
421
|
* Minimal `gh` invocation shape {@link postOrUpdateGithubIssue} threads its
|
|
425
|
-
* calls through. `
|
|
426
|
-
*
|
|
427
|
-
*
|
|
428
|
-
*
|
|
429
|
-
* identical for both callers; only the issue's title/body and the marker that
|
|
430
|
-
* owns it differ.
|
|
422
|
+
* calls through. `lexiconUpgrade` passes its injectable `GhRunner` straight
|
|
423
|
+
* through, since the two share this signature. `reconcilePr` used to wrap
|
|
424
|
+
* `execAsync` to it too, before its `issue` mode moved onto the forge client
|
|
425
|
+
* (#3757).
|
|
431
426
|
*
|
|
432
427
|
* The `opts` argument exists so `postOrUpdateGithubIssue` can hand `gh` the
|
|
433
428
|
* token it resolved (chant #2320) rather than leaving `gh` to find one
|
|
434
429
|
* ambiently. A caller that adds nothing of its own can ignore it and pass it
|
|
435
|
-
* straight to `exec
|
|
436
|
-
* carries. It is deliberately not a whole `ExecOptions`: an implementation
|
|
430
|
+
* straight to `exec`. It is deliberately not a whole `ExecOptions`: an implementation
|
|
437
431
|
* that had to honour `cwd` or `shell` too would be a second exec wrapper, and
|
|
438
432
|
* the point of this type is that there is only one.
|
|
439
433
|
*/
|
|
@@ -445,16 +439,17 @@ export type GhExec = (cmd: string, opts?: {
|
|
|
445
439
|
}>;
|
|
446
440
|
/**
|
|
447
441
|
* Open `title`/`body` as one GitHub-shaped issue in `repo`, or edit the issue
|
|
448
|
-
* this caller already owns there (#2297)
|
|
449
|
-
*
|
|
450
|
-
*
|
|
451
|
-
*
|
|
452
|
-
*
|
|
453
|
-
*
|
|
454
|
-
*
|
|
455
|
-
*
|
|
456
|
-
*
|
|
457
|
-
* Server the same way it
|
|
442
|
+
* this caller already owns there (#2297), over `gh api`: find by marker,
|
|
443
|
+
* PATCH when found, POST when not, so a nightly finding carries one issue
|
|
444
|
+
* holding the current state instead of stacking a new one every run.
|
|
445
|
+
* `lexiconUpgrade`'s per-lexicon upgrade-status issue uses it. `reconcilePr`'s
|
|
446
|
+
* `issue` mode used it until #3757 and now keeps the same issue by the same
|
|
447
|
+
* recipe through the forge client's `upsertIssue` (`../../pr-forge.ts`), so
|
|
448
|
+
* the reasoning below covers both.
|
|
449
|
+
*
|
|
450
|
+
* Every call targets a full URL built from {@link githubApiBaseFrom} (#2291),
|
|
451
|
+
* so this reaches GitHub Enterprise Server and Forgejo the same way it
|
|
452
|
+
* reaches github.com.
|
|
458
453
|
*
|
|
459
454
|
* The credential is resolved and forwarded the same way too (chant #2320),
|
|
460
455
|
* through {@link commentTokenFrom} and out through {@link ghCredentialEnv} on
|
|
@@ -506,7 +501,7 @@ export type GhExec = (cmd: string, opts?: {
|
|
|
506
501
|
* #2333 gave them a credential `gh` would apply to that host — see the
|
|
507
502
|
* module doc's `issue` bullet and {@link ghCredentialEnv}.
|
|
508
503
|
*
|
|
509
|
-
* So this reuses the recipe `
|
|
504
|
+
* So this reuses the recipe `comment` mode already proved for PR
|
|
510
505
|
* comments: list, `--paginate`, filter with `--jq` by an exact `startswith`
|
|
511
506
|
* prefix match, which is correct no matter how many pages it takes. The cost
|
|
512
507
|
* is real — a repository with many thousands of issues pays for every page
|
|
@@ -665,7 +660,10 @@ export declare function entriesFromPlan(planJson: string): ReconcileEntry[];
|
|
|
665
660
|
* supplies one, in which case that text is used verbatim and no plan is
|
|
666
661
|
* derived (chant #2087).
|
|
667
662
|
*
|
|
668
|
-
* Requires `chant`
|
|
663
|
+
* Requires `chant` in the environment. `comment` and `issue` reach the forge
|
|
664
|
+
* over `fetch` and need nothing else in CI (#3757); `pull-request` needs `git`
|
|
665
|
+
* and `gh`, and so does an `issue` run outside any CI job, which leaves the
|
|
666
|
+
* credential to `gh auth login`.
|
|
669
667
|
*/
|
|
670
668
|
export declare function reconcilePr(args: ReconcilePrArgs, signal?: AbortSignal): Promise<ReconcileResult>;
|
|
671
669
|
//# sourceMappingURL=reconcile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reconcile.d.ts","sourceRoot":"","sources":["../../../src/op/activities/reconcile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reconcile.d.ts","sourceRoot":"","sources":["../../../src/op/activities/reconcile.ts"],"names":[],"mappings":"AAGA,OAAO,EAA6D,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAKnH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE5E,wDAAwD;AACxD,MAAM,WAAW,cAA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GAAG,WAAW,CAAC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GACtC,eAAe,GAAG,SAAS,CAQ7B;AAED,mFAAmF;AACnF,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAO5D;AAED,2FAA2F;AAC3F,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAOjE;AAmMD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,EAAE,CAOlE;AA8CD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,eAAe,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,eAAe,CAAC,CAmIvG"}
|
|
@@ -26,7 +26,9 @@
|
|
|
26
26
|
* on the resolution with the policy's version, and a run counts a recorded
|
|
27
27
|
* permit only while the gate still declares that same version. Editing the
|
|
28
28
|
* policy invalidates every permit recorded under the old one, the way a new
|
|
29
|
-
* plan invalidates every approval recorded for the old plan (#2300).
|
|
29
|
+
* plan invalidates every approval recorded for the old plan (#2300). The
|
|
30
|
+
* decision also records the digest of the context it was asked about, and a
|
|
31
|
+
* permit counts only while the run resolves that same context (#3774).
|
|
30
32
|
*
|
|
31
33
|
* The trust boundary is unchanged from `../lifecycle/gate-ledger.ts`: a
|
|
32
34
|
* resolution is a local fact, not a signed one, and roles on it are what the
|
|
@@ -126,6 +128,14 @@ export interface GatePolicyDecision extends GatePolicyAnswer {
|
|
|
126
128
|
* an allow recorded under `log-only` never binds after a switch.
|
|
127
129
|
*/
|
|
128
130
|
mode: GateApprovalMode;
|
|
131
|
+
/**
|
|
132
|
+
* {@link gateContextDigest} of the resolved context the policy was asked
|
|
133
|
+
* about (#3774). A permit passes a gate only while the run's resolved
|
|
134
|
+
* context has this same digest, so a permit given for `risk: "low"` does
|
|
135
|
+
* not pass a run that now resolves `risk: "high"`. A decision recorded
|
|
136
|
+
* before #3774 has none and does not pass an enforced gate.
|
|
137
|
+
*/
|
|
138
|
+
contextDigest?: string;
|
|
129
139
|
}
|
|
130
140
|
/** What a lexicon's `gate-policy` module exports. */
|
|
131
141
|
export interface GatePolicyEvaluator {
|
|
@@ -133,6 +143,12 @@ export interface GatePolicyEvaluator {
|
|
|
133
143
|
}
|
|
134
144
|
/** The version of a gate policy: `sha256:` and the hex digest of its text. A lexicon's helper stamps it, and OPS015 checks it still matches. */
|
|
135
145
|
export declare function gatePolicyVersion(text: string): string;
|
|
146
|
+
/**
|
|
147
|
+
* The digest of a gate's resolved approval context (#3774): `sha256:` and the
|
|
148
|
+
* hex digest of its JSON with keys sorted at every level. No context and an
|
|
149
|
+
* empty one digest the same.
|
|
150
|
+
*/
|
|
151
|
+
export declare function gateContextDigest(context: Record<string, unknown> | undefined): string;
|
|
136
152
|
export declare function isGatePolicyRef(value: unknown): value is GatePolicyRef;
|
|
137
153
|
/**
|
|
138
154
|
* Everything wrong with an `approval` block, one line each. The `gate()`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate-approval.d.ts","sourceRoot":"","sources":["../../src/op/gate-approval.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"gate-approval.d.ts","sourceRoot":"","sources":["../../src/op/gate-approval.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAIH,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGxE,iDAAiD;AACjD,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,SAAS,CAAC;AAEtD,eAAO,MAAM,mBAAmB,EAAE,SAAS,gBAAg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ASD,sHAAsH;AACtH,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAgB3F;AAED,wDAAwD;AACxD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,YAAY,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC,GAAG,iBAAiB,CAUpB"}
|
package/dist/op/gate-name.d.ts
CHANGED
|
@@ -33,10 +33,17 @@ export declare const FAN_OUT_GATE_OP = "fan-out";
|
|
|
33
33
|
* behind it, so `chant approve` must not warn that it found none.
|
|
34
34
|
*/
|
|
35
35
|
export declare const WORKSPACE_UPGRADE_GATE_OP = "workspace-upgrade";
|
|
36
|
+
/**
|
|
37
|
+
* The op name the override gate records denials and overrides under (#3760):
|
|
38
|
+
* `_gates/policy-override.jsonl`, gate the subject a policy denied. Like a
|
|
39
|
+
* fan-out it has no `*.op.ts`, and an override is a person's, never a model's.
|
|
40
|
+
*/
|
|
41
|
+
export declare const OVERRIDE_GATE_OP = "policy-override";
|
|
36
42
|
/**
|
|
37
43
|
* Whether gates recorded under this op name are never resolved over MCP or ACP
|
|
38
44
|
* (chant#3485, chant#3513). These are the gate-only names MCP cannot discover:
|
|
39
|
-
* `fan-out`, `workspace-upgrade` and the
|
|
45
|
+
* `fan-out`, `workspace-upgrade`, `policy-override` (#3760) and the
|
|
46
|
+
* pull-request gate `pr-<number>`. With
|
|
40
47
|
* no Op config to read `neverOverMcp` from, the pending record carries it.
|
|
41
48
|
*/
|
|
42
49
|
export declare function isNeverOverMcpGateOp(op: string): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate-name.d.ts","sourceRoot":"","sources":["../../src/op/gate-name.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAmC,MAAM,SAAS,CAAC;AAEzE;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,YAAY,CAAC;AAEzC;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"gate-name.d.ts","sourceRoot":"","sources":["../../src/op/gate-name.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAmC,MAAM,SAAS,CAAC;AAEzE;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,YAAY,CAAC;AAEzC;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,sBAAsB,CAAC;AAE7D;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,oBAAoB,CAAC;AASlD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAExD;AAED,8FAA8F;AAC9F,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0FAA0F;IAC1F,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAEhD;AAED,oEAAoE;AACpE,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAE9D;AAED,kFAAkF;AAClF,eAAO,MAAM,2BAA2B,QAE0B,CAAC;AAEnE;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CASjE"}
|
package/dist/op/gate-resume.d.ts
CHANGED
|
@@ -90,11 +90,13 @@ export interface ResumeGateRunOptions {
|
|
|
90
90
|
export declare function resumeGateRun(loc: GateRunLocator, opts: ResumeGateRunOptions): Promise<GateResumeOutcome>;
|
|
91
91
|
/**
|
|
92
92
|
* The resolution that answers `standing`, read the way a run decides the gate
|
|
93
|
-
* (the plan, the environment, the quorum), or undefined.
|
|
93
|
+
* (the plan, the environment, the quorum), or undefined. `pending` is the
|
|
94
|
+
* gate ledger's pending facts, which place the human quorum's anchor (#3206);
|
|
95
|
+
* without them it is `standing` itself. A workspace's
|
|
94
96
|
* `identity.gates` rule is not applied here: the resumed job applies it, and
|
|
95
97
|
* waits again when the approval does not count.
|
|
96
98
|
*/
|
|
97
|
-
export declare function resolutionAnswering(resolutions: readonly GateResolutionRecord[], standing: PendingGateRecord): GateResolutionRecord | undefined;
|
|
99
|
+
export declare function resolutionAnswering(resolutions: readonly GateResolutionRecord[], standing: PendingGateRecord, pending?: readonly PendingGateRecord[]): GateResolutionRecord | undefined;
|
|
98
100
|
/**
|
|
99
101
|
* The token a resume uses: `CHANT_FORGE_TOKEN`, else the forge's own
|
|
100
102
|
* (`GITHUB_TOKEN` or `GH_TOKEN` on GitHub and Forgejo, `GITLAB_TOKEN` on
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate-resume.d.ts","sourceRoot":"","sources":["../../src/op/gate-resume.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAiB,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAIxF,mGAAmG;AACnG,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,SAAS,CAAC;IACjB,iGAAiG;IACjG,GAAG,EAAE,MAAM,CAAC;IACZ,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,GAAG,EAAE,MAAM,CAAC;IACZ,wFAAwF;IACxF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,GAAG,CAAC,EAAE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6GAA6G;IAC7G,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAuBD;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA8D/G;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,SAAS,oBAAoB,EAAE,EAC5C,QAAQ,EAAE,iBAAiB,EAC3B,OAAO,GAAE,SAAS,iBAAiB,EAAe,GACjD,oBAAoB,GAAG,SAAS,CASlC;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GAAG,MAAM,GAAG,SAAS,CAG9H"}
|
package/dist/op/gate-review.d.ts
CHANGED
|
@@ -36,7 +36,8 @@ export { GATE_APPROVAL_SOURCES, type GateApprovalSource } from "./op-waves.js";
|
|
|
36
36
|
export declare function trustPolicyAt(cwd: string, base: string): TrustPolicy;
|
|
37
37
|
/**
|
|
38
38
|
* The rule a `sealed` gate judges approvals by: a seal that verifies for the
|
|
39
|
-
* approver against `policy`, the signers at base
|
|
39
|
+
* approver against `policy`, the signers at base, checked with node:crypto
|
|
40
|
+
* (#3785), so an apply job needs no ssh-keygen. With no signers file at
|
|
40
41
|
* base nothing verifies, so nothing passes the gate.
|
|
41
42
|
*/
|
|
42
43
|
export declare function sealedApprovalRule(gate: string, policy: TrustPolicy): GateApprovalRule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate-review.d.ts","sourceRoot":"","sources":["../../src/op/gate-review.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAIH,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE9E,OAAO,EAAmC,KAA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EAAE,mBAAmB,GAAG,YAAY,CAsDrE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,EAAE,SAAS,CAAC,EAAE,UAAU,GAAG,YAAY,CAiB/H;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GAAG,MAAM,GAAG,SAAS,CAahH"}
|
package/dist/op/gate.d.ts
CHANGED
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
* decision without an orphan branch on disk.
|
|
33
33
|
*/
|
|
34
34
|
import { type GateResolutionInput, type GateResolutionRecord, type PendingGateInput, type PendingGateRecord } from "../lifecycle/gate-ledger.js";
|
|
35
|
-
import
|
|
35
|
+
import { type AppliedGateRecord } from "../lifecycle/gate-applied.js";
|
|
36
|
+
import { type GateApprover, type ResolvedGateApproval } from "./gate-approval.js";
|
|
36
37
|
/**
|
|
37
38
|
* What appending a pending fact learned about reaching the remote.
|
|
38
39
|
*
|
|
@@ -77,6 +78,13 @@ export interface GateLedgerPort {
|
|
|
77
78
|
* Absent, every approval is judged as before.
|
|
78
79
|
*/
|
|
79
80
|
approvalRule?(gate: string): Promise<GateApprovalRule | null>;
|
|
81
|
+
/** The approvals a wave applied under (#3784), from `_gates/<op>/applied.jsonl`. Absent on a port that never spends approvals. */
|
|
82
|
+
readApplied?(op: string): Promise<AppliedGateRecord[]>;
|
|
83
|
+
/** Record that a wave is about to apply under an approval (#3784), which spends it. */
|
|
84
|
+
appendApplied?(record: AppliedGateRecord): Promise<{
|
|
85
|
+
pushed: boolean;
|
|
86
|
+
pushWarning?: string;
|
|
87
|
+
}>;
|
|
80
88
|
}
|
|
81
89
|
/** A workspace's rule for which approvals of a gate count (#3163): a signed approval, from a class when it names one. */
|
|
82
90
|
export interface GateApprovalRule {
|
|
@@ -106,9 +114,11 @@ export declare function gitGateLedgerPort(opts?: {
|
|
|
106
114
|
export declare function memoryGateLedgerPort(seed?: {
|
|
107
115
|
resolutions?: GateResolutionRecord[];
|
|
108
116
|
pending?: PendingGateRecord[];
|
|
117
|
+
applied?: AppliedGateRecord[];
|
|
109
118
|
}): GateLedgerPort & {
|
|
110
119
|
appended: PendingGateRecord[];
|
|
111
120
|
resolved: GateResolutionRecord[];
|
|
121
|
+
applied: AppliedGateRecord[];
|
|
112
122
|
};
|
|
113
123
|
/** What a caller has to say about the gate it just reached. */
|
|
114
124
|
export interface GateCheckInput {
|
|
@@ -150,6 +160,12 @@ export interface GateCheckInput {
|
|
|
150
160
|
approval?: ResolvedGateApproval;
|
|
151
161
|
/** ISO-8601 "now" — supplied by the caller, so the decision is deterministic under test. */
|
|
152
162
|
now?: string;
|
|
163
|
+
/**
|
|
164
|
+
* The approvals a wave already applied under (#3784). Given, an approval
|
|
165
|
+
* one of them spent counts for nothing: it neither satisfies the gate nor
|
|
166
|
+
* stands as a mismatch. Absent, nothing is spent.
|
|
167
|
+
*/
|
|
168
|
+
spent?: readonly AppliedGateRecord[];
|
|
153
169
|
}
|
|
154
170
|
/**
|
|
155
171
|
* A standing resolution that answers this gate but not this plan (#2300) —
|
|
@@ -224,7 +240,7 @@ export interface GateTally {
|
|
|
224
240
|
counted: GateResolutionRecord[];
|
|
225
241
|
/** The quorum's count, 1 when the gate declares none. */
|
|
226
242
|
need: number;
|
|
227
|
-
/** The newest approval whose recorded permit passes the gate on its own. Only in `enforce` mode, only for a permit recorded under `enforce`, and only under the gate's current policy version. */
|
|
243
|
+
/** The newest approval whose recorded permit passes the gate on its own. Only in `enforce` mode, only for a permit recorded under `enforce`, and only under the gate's current policy version and resolved context. */
|
|
228
244
|
permit?: GateResolutionRecord;
|
|
229
245
|
/** The newest approval of this gate for a different plan, when the gate binds one. */
|
|
230
246
|
mismatched?: GateResolutionRecord;
|
|
@@ -235,17 +251,38 @@ export interface GateTally {
|
|
|
235
251
|
* An approval counts only if it is newer than `sinceIso` (the standing pending
|
|
236
252
|
* fact) and, on a plan-bound gate, recorded for `planDigest`. So a changed
|
|
237
253
|
* plan invalidates every approval collected for the old one, the rule #2300
|
|
238
|
-
* set for a single approval.
|
|
254
|
+
* set for a single approval. A human's approval may be older than the
|
|
255
|
+
* standing fact, back to `humansSinceIso` ({@link humanQuorumSince}), so a
|
|
256
|
+
* pending fact re-recorded for a changed mode or context keeps a partly
|
|
257
|
+
* filled quorum (#3206). It defaults to `sinceIso`.
|
|
239
258
|
*
|
|
240
259
|
* Of those, only a human's counts toward the quorum, once per `resolvedBy`,
|
|
241
260
|
* and only with one of the quorum's roles when it names any. An agent counts
|
|
242
261
|
* only through a recorded `allow` in `enforce` mode, evaluated under the
|
|
243
|
-
* policy version the gate declares now
|
|
244
|
-
* `enforce` (#2512)
|
|
262
|
+
* policy version the gate declares now, recorded while the gate was in
|
|
263
|
+
* `enforce` (#2512), and evaluated under the context the gate resolves now
|
|
264
|
+
* (#3774). A `log-only` decision never changes the outcome, even
|
|
245
265
|
* after the gate switches to `enforce`, and a `deny` never removes a human's approval: a policy can add
|
|
246
266
|
* a way through the gate but cannot take one away.
|
|
247
267
|
*/
|
|
248
|
-
export declare function tallyGateApprovals(records: GateResolutionRecord[], gate: string, sinceIso: string, planDigest: string | undefined, approval: ResolvedGateApproval): GateTally;
|
|
268
|
+
export declare function tallyGateApprovals(records: GateResolutionRecord[], gate: string, sinceIso: string, planDigest: string | undefined, approval: ResolvedGateApproval, humansSinceIso?: string): GateTally;
|
|
269
|
+
/**
|
|
270
|
+
* Where a gate's human quorum starts counting (#3206): the oldest pending fact
|
|
271
|
+
* in the unbroken run of facts, newest first from `standing`, recorded for
|
|
272
|
+
* `standing`'s plan and policy version.
|
|
273
|
+
*
|
|
274
|
+
* A pending fact is re-recorded when anything in the approval block changes,
|
|
275
|
+
* the mode and the context included, so `chant approve` evaluates the policy
|
|
276
|
+
* under what the gate now declares. A human's approval counts for the plan
|
|
277
|
+
* it names whatever the mode or context was, so re-recording for one of
|
|
278
|
+
* those must not drop it. The run stops at a fact for another plan or policy
|
|
279
|
+
* version, which needs fresh approvals, and at one that had expired by the
|
|
280
|
+
* time the next was recorded, which expiry already closed.
|
|
281
|
+
*
|
|
282
|
+
* `pending` may hold every pending fact in the ledger; only `standing`'s gate
|
|
283
|
+
* and environment are read.
|
|
284
|
+
*/
|
|
285
|
+
export declare function humanQuorumSince(pending: readonly PendingGateRecord[], standing: PendingGateRecord): string;
|
|
249
286
|
/**
|
|
250
287
|
* Decide a gate against the ledger, recording the pending fact when it isn't
|
|
251
288
|
* answered.
|
package/dist/op/gate.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate.d.ts","sourceRoot":"","sources":["../../src/op/gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EASL,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACvB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"gate.d.ts","sourceRoot":"","sources":["../../src/op/gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EASL,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACvB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAA2D,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE5H,OAAO,EAAqB,KAAK,YAAY,EAAE,KAAK,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAKlG;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,iBAAiB,CAAC;IAC1B;;;OAGG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;A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EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,QAAQ,EAAE,oBAAoB,EAC9B,cAAc,GAAE,MAAiB,GAChC,SAAS,CAiDX;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,SAAS,iBAAiB,EAAE,EAAE,QAAQ,EAAE,iBAAiB,GAAG,MAAM,CAc3G;AAUD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,SAAS,CAAC,CA0GlG;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,MAAM,UAAQ,GAAG,MAAM,CAK1H;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,GAAE,MAAsB,GAAG,OAAO,CAAC,OAAO,CAAC,CAO9F"}
|
package/dist/op/index.d.ts
CHANGED
|
@@ -20,10 +20,12 @@ export { discoverOps } from "./discover.js";
|
|
|
20
20
|
export type { DiscoveredOp, OpDiscoveryResult } from "./discover.js";
|
|
21
21
|
export { generateOpsPipeline, generateOpWavesPipeline, withOpSchedules } from "./generate-pipeline.js";
|
|
22
22
|
export type { GenerateOpsPipelineResult, GenerateOpWavesPipelineResult } from "./generate-pipeline.js";
|
|
23
|
-
export { OP_WAVE_DEFAULT_APPLY, OP_WAVE_GATE_POLICIES, assertOpWavesSpec, opWaveJobs, opWaveRecordPath, opWaveShare, } from "./op-waves.js";
|
|
24
|
-
export type { OpWave, OpWaveGatePolicy, OpWaveJob, OpWaveRun, OpWavesSpec } from "./op-waves.js";
|
|
25
|
-
export { opWaveNeedsApproval, parseOpWavesSpec, readOpWavePolicy, runOpWave } from "./op-waves-run.js";
|
|
26
|
-
export type { OpWaveDecision, OpWaveMember, OpWavePlanFile, RunOpWaveOptions, RunOpWaveResult } from "./op-waves-run.js";
|
|
23
|
+
export { OP_WAVE_APPLY_HOOKS_RUNNERS, OP_WAVE_DEFAULT_APPLY, OP_WAVE_GATE_POLICIES, OP_WAVE_HOOK_MOMENTS, assertOpWaveHooks, assertOpWavesSpec, opWaveApplyHooksRunBy, opWaveHooksAt, opWaveJobs, opWaveRecordPath, opWaveShare, } from "./op-waves.js";
|
|
24
|
+
export type { OpWave, OpWaveApplyHooksRunner, OpWaveGatePolicy, OpWaveHook, OpWaveHookFailure, OpWaveHookMoment, OpWaveHooks, OpWaveJob, OpWaveRun, OpWavesSpec } from "./op-waves.js";
|
|
25
|
+
export { opWaveHooksAtBase, opWaveNeedsApproval, opWavePlansPath, opWaveRunsPath, parseOpWavesSpec, readOpWaveHooksFile, readOpWavePolicy, runOpWave, runOpWaveApplyHooks, } from "./op-waves-run.js";
|
|
26
|
+
export type { OpWaveBaseRules, OpWaveDecision, OpWaveApplyHooksRun, OpWaveHookOutcome, OpWaveHookRun, OpWaveHooksFile, OpWaveHooksResult, OpWaveMember, OpWavePlanFile, OpWavePlansFile, OpWaveRunsFile, RunOpWaveOptions, RunOpWaveResult, } from "./op-waves-run.js";
|
|
27
|
+
export { notifyOpWave, opWaveNotifyFields } from "./op-waves-notify.js";
|
|
28
|
+
export type { OpWaveOutcome } from "./op-waves-notify.js";
|
|
27
29
|
export { loadActivities, loadProfiles, resolveActivity } from "./activity-registry.js";
|
|
28
30
|
export type { ActivityFn } from "./activity-registry.js";
|
|
29
31
|
export { loadActivityContracts, mergeActivityContracts } from "./activity-contract-registry.js";
|
|
@@ -37,8 +39,8 @@ export { currentOpRun, withOpRunContext } from "./run-context.js";
|
|
|
37
39
|
export type { OpRunContext, PassedGate } from "./run-context.js";
|
|
38
40
|
export { evaluateGate, gitGateLedgerPort, memoryGateLedgerPort, approveCommand, describeGateMismatch, gateIsSealed } from "./gate.js";
|
|
39
41
|
export type { GateLedgerPort, GateCheck, GateCheckInput, PendingGatePush, GateDigestMismatch, GateQuorumProgress, GateTally } from "./gate.js";
|
|
40
|
-
export { tallyGateApprovals, approverOf } from "./gate.js";
|
|
41
|
-
export { gateApprovalProblems, gatePolicyRequest, gatePolicyVersion, isGatePolicyRef, loadGatePolicyEvaluator, GATE_APPROVAL_MODES, } from "./gate-approval.js";
|
|
42
|
+
export { tallyGateApprovals, humanQuorumSince, approverOf } from "./gate.js";
|
|
43
|
+
export { gateApprovalProblems, gateContextDigest, gatePolicyRequest, gatePolicyVersion, isGatePolicyRef, loadGatePolicyEvaluator, GATE_APPROVAL_MODES, } from "./gate-approval.js";
|
|
42
44
|
export type { GateApproval, GateApprovalMode, GateApprover, GateContextValue, GatePolicyAnswer, GatePolicyDecision, GatePolicyEvaluator, GatePolicyRef, GatePolicyRequest, GateQuorum, ResolvedGateApproval, } from "./gate-approval.js";
|
|
43
45
|
export { gatePlanSummary, gatePlanSummaryOfResult, changeSetOfResult, GATE_PLAN_CONTEXT_KEY, GATE_PLAN_ADDRESS_LIMIT, } from "./gate-plan-context.js";
|
|
44
46
|
export type { GatePlanSummary } from "./gate-plan-context.js";
|
package/dist/op/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/op/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,YAAY,EAAE,YAAY,EAClH,cAAc,EAAE,iBAAiB,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,E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W,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAG9C,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAIrE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACrH,YAAY,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What an Op waves job tells people (#3761), when the spec has `notify`.
|
|
3
|
+
*
|
|
4
|
+
* A wave that waits for an approval (exit 3) sends `waiting` with the
|
|
5
|
+
* approval command, the digest and, under `pr-review`, the pull request to
|
|
6
|
+
* review. A share job that refused a run whose plan moved (exit 4) sends
|
|
7
|
+
* `refused`. A wave whose plan, apply or stage hook failed (exit 1) sends
|
|
8
|
+
* `failed`. A share job of a waiting wave sends nothing, since its deciding
|
|
9
|
+
* job already did, unless a hook in the share job itself held it (#3762). Delivery is `../notify.ts`: it never throws, and the job's exit code
|
|
10
|
+
* is what the wave decided.
|
|
11
|
+
*/
|
|
12
|
+
import { type NotifyDelivery, type NotifyFields, type SendNotifyOptions } from "../notify.js";
|
|
13
|
+
import type { OpWavesSpec } from "./op-waves.js";
|
|
14
|
+
import type { RunOpWaveResult } from "./op-waves-run.js";
|
|
15
|
+
/** How the job ended: the wave's result, or the error that stopped it. */
|
|
16
|
+
export type OpWaveOutcome = {
|
|
17
|
+
result: RunOpWaveResult;
|
|
18
|
+
error?: undefined;
|
|
19
|
+
} | {
|
|
20
|
+
result?: undefined;
|
|
21
|
+
error: string;
|
|
22
|
+
};
|
|
23
|
+
/** The event a wave job sends, or undefined when it sends none. */
|
|
24
|
+
export declare function opWaveNotifyFields(spec: OpWavesSpec, k: number, outcome: OpWaveOutcome, job?: {
|
|
25
|
+
share?: number;
|
|
26
|
+
}): NotifyFields | undefined;
|
|
27
|
+
/** Send what the job's outcome calls for to what `spec.notify` names. Never throws. */
|
|
28
|
+
export declare function notifyOpWave(spec: OpWavesSpec, k: number, outcome: OpWaveOutcome, job?: {
|
|
29
|
+
share?: number;
|
|
30
|
+
}, options?: SendNotifyOptions): Promise<NotifyDelivery[]>;
|
|
31
|
+
//# sourceMappingURL=op-waves-notify.d.ts.map
|