@intentius/chant 0.124.15 → 0.124.17
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-plugin.d.ts.map +1 -1
- package/dist/cli/commands/check-lexicon-plugin.js +2 -1
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/commands/lint.js +3 -2
- package/dist/cli/flush.d.ts +16 -0
- package/dist/cli/flush.d.ts.map +1 -0
- package/dist/cli/flush.js +42 -0
- package/dist/cli/handlers/approve.d.ts +98 -0
- package/dist/cli/handlers/approve.d.ts.map +1 -0
- package/dist/cli/handlers/approve.js +495 -0
- package/dist/cli/handlers/operator.d.ts +1 -95
- package/dist/cli/handlers/operator.d.ts.map +1 -1
- package/dist/cli/handlers/operator.js +4 -488
- package/dist/cli/handlers/override-approve.js +1 -1
- package/dist/cli/main.d.ts +4 -15
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +4 -1062
- package/dist/cli/parse-args.d.ts +6 -0
- package/dist/cli/parse-args.d.ts.map +1 -0
- package/dist/cli/parse-args.js +1028 -0
- package/dist/components/discover.d.ts.map +1 -1
- package/dist/components/discover.js +2 -1
- package/dist/components/fan-out-record.d.ts +1 -1
- package/dist/components/fan-out-record.d.ts.map +1 -1
- package/dist/components/fan-out-record.js +3 -7
- package/dist/components/fan-out-run.d.ts +5 -3
- package/dist/components/fan-out-run.d.ts.map +1 -1
- package/dist/components/fan-out-run.js +7 -5
- package/dist/config-sandbox.d.ts.map +1 -1
- package/dist/config-sandbox.js +5 -1
- package/dist/discovery/import.d.ts.map +1 -1
- package/dist/discovery/import.js +2 -1
- package/dist/discovery/sandbox/driver.d.ts.map +1 -1
- package/dist/discovery/sandbox/driver.js +8 -3
- package/dist/gated-waves.d.ts +25 -6
- package/dist/gated-waves.d.ts.map +1 -1
- package/dist/gated-waves.js +21 -6
- package/dist/lexicon-module.d.ts.map +1 -1
- package/dist/lexicon-module.js +4 -3
- package/dist/lint/policy-import.d.ts.map +1 -1
- package/dist/lint/policy-import.js +2 -1
- package/dist/lint/rule-loader.d.ts.map +1 -1
- package/dist/lint/rule-loader.js +2 -1
- package/dist/module-interop.d.ts +20 -0
- package/dist/module-interop.d.ts.map +1 -0
- package/dist/module-interop.js +39 -0
- package/dist/op/activities/activity-contracts.d.ts +4 -4
- package/dist/op/discover.d.ts.map +1 -1
- package/dist/op/discover.js +3 -2
- package/dist/op/op-waves-run.d.ts +1 -1
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +5 -6
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/op-waves.js +4 -8
- package/dist/package-version.d.ts +2 -0
- package/dist/package-version.d.ts.map +1 -0
- package/dist/package-version.js +10 -0
- package/dist/wave-engine.d.ts +62 -0
- package/dist/wave-engine.d.ts.map +1 -0
- package/dist/wave-engine.js +59 -0
- package/dist/wave-layout.d.ts +29 -0
- package/dist/wave-layout.d.ts.map +1 -0
- package/dist/wave-layout.js +41 -0
- package/dist/wave-runtime.d.ts +29 -0
- package/dist/wave-runtime.d.ts.map +1 -0
- package/dist/wave-runtime.js +103 -0
- package/dist/wave-runtime.mjs +331 -0
- package/dist/workspace/ajv2020.d.ts +5 -0
- package/dist/workspace/ajv2020.d.ts.map +1 -0
- package/dist/workspace/ajv2020.js +14 -0
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.js +4 -8
- package/dist/workspace/kinds.d.ts.map +1 -1
- package/dist/workspace/kinds.js +2 -5
- package/dist/workspace/lineage-migrations.d.ts.map +1 -1
- package/dist/workspace/lineage-migrations.js +2 -1
- package/dist/workspace/points.d.ts.map +1 -1
- package/dist/workspace/points.js +2 -5
- package/dist/workspace/principal-classes.d.ts.map +1 -1
- package/dist/workspace/principal-classes.js +2 -5
- package/package.json +5 -3
- package/src/cli/commands/check-lexicon-plugin.ts +2 -1
- package/src/cli/commands/lint.ts +3 -2
- package/src/cli/compiled-cli.e2e.test.ts +42 -1
- package/src/cli/flush.ts +44 -0
- package/src/cli/handlers/approve.ts +618 -0
- package/src/cli/handlers/operator.ts +10 -608
- package/src/cli/handlers/override-approve.test.ts +1 -1
- package/src/cli/handlers/override-approve.ts +1 -1
- package/src/cli/main.ts +5 -816
- package/src/cli/parse-args.ts +781 -0
- package/src/components/discover.ts +2 -1
- package/src/components/fan-out-record.ts +3 -7
- package/src/components/fan-out-run.ts +7 -5
- package/src/config-sandbox.ts +5 -1
- package/src/discovery/import.ts +2 -1
- package/src/discovery/sandbox/driver.ts +8 -3
- package/src/gate-decision-bundle.test.ts +1 -0
- package/src/gated-waves.ts +28 -6
- package/src/lexicon-module.ts +4 -3
- package/src/lint/policy-import.ts +2 -1
- package/src/lint/rule-loader.ts +2 -1
- package/src/module-interop.test.ts +65 -0
- package/src/module-interop.ts +39 -0
- package/src/op/discover.ts +3 -2
- package/src/op/op-waves-run.ts +5 -6
- package/src/op/op-waves.ts +4 -8
- package/src/package-version.ts +11 -0
- package/src/wave-engine.test.ts +107 -0
- package/src/wave-engine.ts +98 -0
- package/src/wave-layout.ts +44 -0
- package/src/wave-runtime-bundle.test.ts +70 -0
- package/src/wave-runtime.e2e.test.ts +177 -0
- package/src/wave-runtime.ts +104 -0
- package/src/workspace/ajv2020.ts +17 -0
- package/src/workspace/declaration.ts +4 -10
- package/src/workspace/kinds.ts +2 -5
- package/src/workspace/lineage-migrations.ts +2 -1
- package/src/workspace/points.ts +2 -5
- package/src/workspace/principal-classes.ts +2 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-lexicon-plugin.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/check-lexicon-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAKH,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"check-lexicon-plugin.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/check-lexicon-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAKH,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAIpE,MAAM,WAAW,aAAa;IAC5B,iDAAiD;IACjD,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAoB9D;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAyB5E;AAED,iEAAiE;AACjE,wBAAgB,SAAS,CAAC,MAAM,EAAE,aAAa,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,aAAa,GAAG,OAAO,CAE/F;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,SAAS,GAAG;IAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAOvF"}
|
|
@@ -23,6 +23,7 @@ import { isAbsolute, join, resolve } from "path";
|
|
|
23
23
|
import { pathToFileURL } from "url";
|
|
24
24
|
import { isLexiconPlugin } from "../../lexicon.js";
|
|
25
25
|
import { ensureTypeScriptLoader } from "../../ts-loader.js";
|
|
26
|
+
import { esModuleNamespace } from "../../module-interop.js";
|
|
26
27
|
/**
|
|
27
28
|
* The module a lexicon package presents to consumers.
|
|
28
29
|
*
|
|
@@ -64,7 +65,7 @@ export async function loadLexiconFromDir(dir) {
|
|
|
64
65
|
let mod;
|
|
65
66
|
try {
|
|
66
67
|
ensureTypeScriptLoader();
|
|
67
|
-
mod = (await import(pathToFileURL(entry).href));
|
|
68
|
+
mod = esModuleNamespace((await import(pathToFileURL(entry).href)));
|
|
68
69
|
}
|
|
69
70
|
catch (error) {
|
|
70
71
|
return { entry, error: `import failed: ${error instanceof Error ? error.message : String(error)}` };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/lint.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAG7D,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAW,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/lint.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAG7D,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAW,MAAM,iBAAiB,CAAC;AAyCzE;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,QAAQ,CAW5D;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,MAAM,EAAE,EACjB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAoBhC;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,0BAA0B,WAAW,CAAC;AAsBnD;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,WAAW,CAAC;AA2I9C;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACrC,uBAAuB;IACvB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,oBAAoB;IACpB,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IACrC,qCAAqC;IACrC,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,sCAAsC;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,sBAAsB;IACtB,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,uBAAuB;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB;AA6eD;;GAEG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CA+N3E;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAIxD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,WAAW,EACpB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,GACtC,MAAM,IAAI,CAiCZ"}
|
|
@@ -30,6 +30,7 @@ import { getProvenance } from "../../provenance.js";
|
|
|
30
30
|
import { runLexiconPostSynthChecks } from "./build.js";
|
|
31
31
|
import { armSandboxPolicyExecution, runProjectPolicies } from "../../lint/policy-sandbox.js";
|
|
32
32
|
import { ensureTypeScriptLoader } from "../../ts-loader.js";
|
|
33
|
+
import { esModuleNamespace } from "../../module-interop.js";
|
|
33
34
|
// Import config loader
|
|
34
35
|
import { loadConfig, resolveRulesForFile, resolveConfiguredSeverity, findProjectRoot } from "../../lint/config.js";
|
|
35
36
|
import { loadChantConfig, resolveKnowledgeDir, resolveDiscoveryGlobs } from "../../config.js";
|
|
@@ -79,7 +80,7 @@ export async function loadPluginRules(plugins, configDir) {
|
|
|
79
80
|
let mod;
|
|
80
81
|
try {
|
|
81
82
|
ensureTypeScriptLoader();
|
|
82
|
-
mod = await import(resolved);
|
|
83
|
+
mod = esModuleNamespace(await import(resolved));
|
|
83
84
|
}
|
|
84
85
|
catch (err) {
|
|
85
86
|
throw new Error(`Failed to load plugin "${pluginPath}": ${err instanceof Error ? err.message : String(err)}`);
|
|
@@ -482,7 +483,7 @@ async function runOpCheckDiagnostics(infraPath, files, buildParams, plugins = []
|
|
|
482
483
|
for (const filePath of opFiles) {
|
|
483
484
|
try {
|
|
484
485
|
ensureTypeScriptLoader();
|
|
485
|
-
const mod = await import(filePath);
|
|
486
|
+
const mod = esModuleNamespace(await import(filePath));
|
|
486
487
|
const entity = mod.default;
|
|
487
488
|
if (!entity || typeof entity !== "object")
|
|
488
489
|
continue;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Exiting without truncating piped output, shared by the full CLI (`./main.ts`)
|
|
3
|
+
* and the slim wave-job runtime (`../wave-runtime.ts`, #3896).
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Wait until a writable stream has flushed its buffer. `process.exit()` discards
|
|
7
|
+
* data still buffered for an async sink (a pipe or file), truncating large output
|
|
8
|
+
* at the ~64 KB pipe buffer — so `chant graph --format ir` piped into a consumer
|
|
9
|
+
* loses everything past 64 KB and its JSON won't parse. A TTY writes
|
|
10
|
+
* synchronously (`writableLength` stays 0), so this is a no-op there. Resolves on
|
|
11
|
+
* `error`/`close` too, so a reader that closes early (EPIPE) can't hang exit.
|
|
12
|
+
*/
|
|
13
|
+
export declare function waitForStreamDrain(stream: NodeJS.WriteStream): Promise<void>;
|
|
14
|
+
/** Flush stdout+stderr, then exit — so a large piped payload isn't truncated. */
|
|
15
|
+
export declare function flushAndExit(code: number): Promise<never>;
|
|
16
|
+
//# sourceMappingURL=flush.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flush.d.ts","sourceRoot":"","sources":["../../src/cli/flush.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB5E;AAED,iFAAiF;AACjF,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAI/D"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Exiting without truncating piped output, shared by the full CLI (`./main.ts`)
|
|
3
|
+
* and the slim wave-job runtime (`../wave-runtime.ts`, #3896).
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Wait until a writable stream has flushed its buffer. `process.exit()` discards
|
|
7
|
+
* data still buffered for an async sink (a pipe or file), truncating large output
|
|
8
|
+
* at the ~64 KB pipe buffer — so `chant graph --format ir` piped into a consumer
|
|
9
|
+
* loses everything past 64 KB and its JSON won't parse. A TTY writes
|
|
10
|
+
* synchronously (`writableLength` stays 0), so this is a no-op there. Resolves on
|
|
11
|
+
* `error`/`close` too, so a reader that closes early (EPIPE) can't hang exit.
|
|
12
|
+
*/
|
|
13
|
+
export function waitForStreamDrain(stream) {
|
|
14
|
+
return new Promise((resolve) => {
|
|
15
|
+
const tick = () => {
|
|
16
|
+
if (stream.writableLength === 0 || stream.writableEnded || stream.destroyed) {
|
|
17
|
+
cleanup();
|
|
18
|
+
resolve();
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
stream.once("drain", tick);
|
|
22
|
+
};
|
|
23
|
+
const stop = () => {
|
|
24
|
+
cleanup();
|
|
25
|
+
resolve();
|
|
26
|
+
};
|
|
27
|
+
const cleanup = () => {
|
|
28
|
+
stream.off("drain", tick);
|
|
29
|
+
stream.off("error", stop);
|
|
30
|
+
stream.off("close", stop);
|
|
31
|
+
};
|
|
32
|
+
stream.once("error", stop);
|
|
33
|
+
stream.once("close", stop);
|
|
34
|
+
tick();
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
/** Flush stdout+stderr, then exit — so a large piped payload isn't truncated. */
|
|
38
|
+
export async function flushAndExit(code) {
|
|
39
|
+
await waitForStreamDrain(process.stdout);
|
|
40
|
+
await waitForStreamDrain(process.stderr);
|
|
41
|
+
process.exit(code);
|
|
42
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { GateResolutionRecord, PendingGateRecord } from "../../lifecycle/gate-ledger.js";
|
|
2
|
+
import { type GateOrigin } from "../../lifecycle/gate-origin.js";
|
|
3
|
+
import { type GatePolicyEvaluator, type ResolvedGateApproval } from "../../op/gate-approval.js";
|
|
4
|
+
import type { CommandContext } from "../registry.js";
|
|
5
|
+
export declare function runApprove(ctx: CommandContext): Promise<number>;
|
|
6
|
+
/** What a caller supplies alongside the op and gate names. */
|
|
7
|
+
export interface GateApprovalOptions {
|
|
8
|
+
/**
|
|
9
|
+
* The channel this resolution arrived on (chant#2384). Defaults to the
|
|
10
|
+
* process's own — `"cli"` unless an entry point declared otherwise — and is
|
|
11
|
+
* a parameter only so a caller that knows better can say so.
|
|
12
|
+
*/
|
|
13
|
+
origin?: GateOrigin;
|
|
14
|
+
/**
|
|
15
|
+
* Record a resolution that the same-origin rule would refuse (chant#2384).
|
|
16
|
+
*
|
|
17
|
+
* There is a legitimate case: a single operator driving an agent, who wants
|
|
18
|
+
* the model's run resolved from the same session and accepts what that
|
|
19
|
+
* means. The override exists so that is a deliberate act with a trace on the
|
|
20
|
+
* record, rather than the default.
|
|
21
|
+
*/
|
|
22
|
+
allowSameOrigin?: boolean;
|
|
23
|
+
/** `--actor`/`--approver`; falls back to the CI or shell identity. */
|
|
24
|
+
actor?: string;
|
|
25
|
+
/** `--note` — free-text prose. */
|
|
26
|
+
note?: string;
|
|
27
|
+
/**
|
|
28
|
+
* `--relayed-by <principal>` (#3402): who carried this approval to chant for
|
|
29
|
+
* the approver, such as a follower program relaying a person's approval.
|
|
30
|
+
* Recorded as `relayedBy` on the resolution line and covered by `--sign`.
|
|
31
|
+
* The approver is still `--actor`; the relay is not an approver.
|
|
32
|
+
*/
|
|
33
|
+
relayedBy?: string;
|
|
34
|
+
/** `--url` — the approval surface, validated as absolute http/https. */
|
|
35
|
+
url?: string;
|
|
36
|
+
/**
|
|
37
|
+
* `--plan <digest>` (#2300) — the plan this approval is for. Omitted, the
|
|
38
|
+
* digest is read off the gate's standing pending fact, so the common path
|
|
39
|
+
* stays one command: run, read what it planned, approve it.
|
|
40
|
+
*/
|
|
41
|
+
plan?: string;
|
|
42
|
+
/**
|
|
43
|
+
* `--env <env>` (#2574) — which environment's pending fact a component gate
|
|
44
|
+
* approval answers. A component's gate ledger holds every environment's
|
|
45
|
+
* facts, so without it the newest one is approved. Ignored for a gate whose
|
|
46
|
+
* pending facts record no environment (every Op gate).
|
|
47
|
+
*/
|
|
48
|
+
environment?: string;
|
|
49
|
+
/** `--role` (#2508) — roles the approver claims. */
|
|
50
|
+
roles?: string[];
|
|
51
|
+
/**
|
|
52
|
+
* `--agent` (#2508) — record this as an agent's approval. On a
|
|
53
|
+
* model-authored channel it is one whether or not this is set.
|
|
54
|
+
*/
|
|
55
|
+
agent?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* `--sign [<key file>]` (#3163, ws-080): seal the approval with an ssh key,
|
|
58
|
+
* a key file or true for git's `user.signingkey`. The seal attests the
|
|
59
|
+
* approver when the signers file at base lists the key for them, and a gate
|
|
60
|
+
* the declaration's `identity.gates` names counts only sealed approvals.
|
|
61
|
+
*/
|
|
62
|
+
sign?: string | true;
|
|
63
|
+
/** Where the workspace and the key file are looked up from. Defaults to the process's directory. */
|
|
64
|
+
cwd?: string;
|
|
65
|
+
/** Replaces the lexicon evaluator a gate policy is loaded from. For tests. */
|
|
66
|
+
evaluator?: GatePolicyEvaluator;
|
|
67
|
+
}
|
|
68
|
+
export type GateApprovalOutcome = {
|
|
69
|
+
ok: true;
|
|
70
|
+
record: GateResolutionRecord;
|
|
71
|
+
pushed: boolean;
|
|
72
|
+
} | {
|
|
73
|
+
ok: false;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* The ledger write behind `chant approve` — extracted so `chant run approve`
|
|
77
|
+
* (#2121) records the identical fact before waking the runtime that hosts the
|
|
78
|
+
* gated run, instead of growing a second, drifting writer.
|
|
79
|
+
*
|
|
80
|
+
* Prints the same warning for an undiscovered op and the same success line as
|
|
81
|
+
* `chant approve` always did; the caller adds whatever it does next.
|
|
82
|
+
*
|
|
83
|
+
* Since #2300 the resolution names the plan it approves. By default that is
|
|
84
|
+
* the standing pending fact's plan — the one the gated run produced — so the
|
|
85
|
+
* common path is still `chant run`, read, `chant approve`. With no pending
|
|
86
|
+
* fact and no `--plan`, this refuses: there is nothing on the ledger saying
|
|
87
|
+
* what would be approved, and writing a resolution anyway is what made an
|
|
88
|
+
* approval mean "the next run" instead of "this plan".
|
|
89
|
+
*/
|
|
90
|
+
export declare function recordGateApproval(opName: string, gate: string, opts: GateApprovalOptions): Promise<GateApprovalOutcome>;
|
|
91
|
+
/**
|
|
92
|
+
* What a just-recorded approval did to a gate with an `approval` block
|
|
93
|
+
* (#2508): the policy's decision and whether it binds, then the quorum count
|
|
94
|
+
* for this plan. The run decides the gate from the ledger; these lines only
|
|
95
|
+
* say what it will find.
|
|
96
|
+
*/
|
|
97
|
+
export declare function describeApprovalProgress(approval: ResolvedGateApproval, record: GateResolutionRecord, prior: GateResolutionRecord[], standing: PendingGateRecord | undefined, pending?: readonly PendingGateRecord[]): string[];
|
|
98
|
+
//# sourceMappingURL=approve.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"approve.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/approve.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC3F,OAAO,EACuE,KAAK,UAAU,EAC5F,MAAM,6BAA6B,CAAC;AAOrC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