@deftai/directive 0.119.10 → 0.119.12
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/dispatch.d.ts +1 -1
- package/dist/dispatch.js +6 -0
- package/dist/occupancy-release.d.ts +10 -0
- package/dist/occupancy-release.js +33 -2
- package/dist/verify-ac.js +32 -6
- package/dist/verify-durable-effect-acquisition.d.ts +13 -0
- package/dist/verify-durable-effect-acquisition.js +70 -0
- package/dist/verify-presentation-ceiling.d.ts +11 -0
- package/dist/verify-presentation-ceiling.js +71 -0
- package/dist/verify-presentation-coverage.d.ts +14 -0
- package/dist/verify-presentation-coverage.js +90 -0
- package/dist/windows-bin-ps1.js +2 -0
- package/package.json +3 -3
package/dist/dispatch.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export interface DispatchIo {
|
|
|
10
10
|
writeErr: (text: string) => void;
|
|
11
11
|
}
|
|
12
12
|
/** CLI modules in packages/cli/src (excluding parity harnesses and bin/index). */
|
|
13
|
-
export declare const CLI_MODULE_VERBS: readonly ["agents-refresh", "cache", "check", "capacity-backfill", "capacity-show", "codebase-default-extractor", "codebase-map", "codebase-map-fresh", "codebase-projection-registry", "codebase-provider", "doctor", "install-upgrade", "install-uninstall", "migrate-preflight", "migrate-xbrief", "migrate-category-b", "framework-check-updates", "hook-dispatch", "umbrella-current-shape", "changelog-check", "change-init", "commit-lint", "coverage-hotspots", "policy", "authz", "escalation-cli", "pr-closing-keywords", "pr-merge-readiness", "pr-monitor", "pr-protected-issues", "pr-wait-mergeable", "pr-watch", "pr-finish-loop", "directive-finish-loop", "preflight-cache", "preflight-gh", "probe-session", "release", "release-e2e", "release-publish", "release-rollback", "release-wait-npm", "scope-lifecycle", "scope-record-approved-scope", "scope-record-observable-scope", "scope-record-intent-constraint", "scm-sync-default", "lifecycle-event", "lifecycle-stats", "session-start", "session-ready", "occupancy-steal", "occupancy-release", "occupancy-heartbeat", "occupancy-grant", "plan-sequence", "slice", "subagent-monitor", "toolchain-check", "triage-actions", "triage-bootstrap", "triage-bulk", "triage-classify", "triage-strip-withdrawn", "triage-evaluate", "triage-help", "triage-queue", "triage-reconcile", "triage-refresh", "triage-scope", "triage-scope-drift", "triage-smoketest", "triage-subscribe", "triage-summary", "triage-welcome", "ts-check-lane", "vbrief-activate", "vbrief-build", "vbrief-preflight", "vbrief-reconcile", "vbrief-validate", "vbrief-validation", "xbrief-create", "xbrief-verify", "xbrief-adopt-stored-plan-id", "verify-branch", "verify-encoding", "verify-forward-coverage", "verify-test-boundary", "verify-class-checks", "verify-scope-provenance", "verify-consumer-check-contract", "verify-hooks-installed", "verify-investigation", "verify-judgment-gates", "verify-no-task-runtime", "validate-links", "validate-strategy-output", "verify-biome-config", "verify-bridge-drift", "verify-capacity", "verify-contained-writes", "verify-telemetry-coverage", "verify-content-manifest", "verify-deposit-closure", "verify-consumer-hard-stops", "verify-closing-keywords", "verify-skill-external-fetch-gate", "verify-semantic-single-source", "verify-contract-drift", "verify-cursor-tier1", "verify-openclaw-tier1", "verify-go-freeze", "verify-scm-boundary", "verify-session-ritual", "verify-plan-sequence", "verify-stubs", "verify-xbrief-drift", "verify-spec-prd-fresh", "rule-ownership-lint", "verify-story-ready", "verify-review-monitor", "verify-l4-owner", "verify-subagent-alive", "verify-subagent-steer", "review-monitor-register", "review-monitor-release", "verify-tools", "verify-wip-cap", "verify-orphan-active", "verify-pr-closeout-attestable", "verify-lifecycle-visible", "verify-completed-tracked", "verify-completed-write-guard", "verify-literal-ac", "verify-ac", "verify-agents-md-budget", "verify-agents-md-advisory", "verify-eval-health-relocation", "verify-eval-triggers-relocation", "verify-evaluator-surface", "verify-observable-scope", "verify-operator-scope-limit", "verify-intent-constraint", "verify-consumer-test-lane", "eval-health", "eval-run", "eval-report", "eval-triggers"];
|
|
13
|
+
export declare const CLI_MODULE_VERBS: readonly ["agents-refresh", "cache", "check", "capacity-backfill", "capacity-show", "codebase-default-extractor", "codebase-map", "codebase-map-fresh", "codebase-projection-registry", "codebase-provider", "doctor", "install-upgrade", "install-uninstall", "migrate-preflight", "migrate-xbrief", "migrate-category-b", "framework-check-updates", "hook-dispatch", "umbrella-current-shape", "changelog-check", "change-init", "commit-lint", "coverage-hotspots", "policy", "authz", "escalation-cli", "pr-closing-keywords", "pr-merge-readiness", "pr-monitor", "pr-protected-issues", "pr-wait-mergeable", "pr-watch", "pr-finish-loop", "directive-finish-loop", "preflight-cache", "preflight-gh", "probe-session", "release", "release-e2e", "release-publish", "release-rollback", "release-wait-npm", "scope-lifecycle", "scope-record-approved-scope", "scope-record-observable-scope", "scope-record-intent-constraint", "scm-sync-default", "lifecycle-event", "lifecycle-stats", "session-start", "session-ready", "occupancy-steal", "occupancy-release", "occupancy-heartbeat", "occupancy-grant", "plan-sequence", "slice", "subagent-monitor", "toolchain-check", "triage-actions", "triage-bootstrap", "triage-bulk", "triage-classify", "triage-strip-withdrawn", "triage-evaluate", "triage-help", "triage-queue", "triage-reconcile", "triage-refresh", "triage-scope", "triage-scope-drift", "triage-smoketest", "triage-subscribe", "triage-summary", "triage-welcome", "ts-check-lane", "vbrief-activate", "vbrief-build", "vbrief-preflight", "vbrief-reconcile", "vbrief-validate", "vbrief-validation", "xbrief-create", "xbrief-verify", "xbrief-adopt-stored-plan-id", "verify-branch", "verify-encoding", "verify-forward-coverage", "verify-test-boundary", "verify-class-checks", "verify-presentation-coverage", "verify-scope-provenance", "verify-consumer-check-contract", "verify-hooks-installed", "verify-investigation", "verify-judgment-gates", "verify-no-task-runtime", "validate-links", "validate-strategy-output", "verify-biome-config", "verify-bridge-drift", "verify-capacity", "verify-contained-writes", "verify-telemetry-coverage", "verify-content-manifest", "verify-deposit-closure", "verify-consumer-hard-stops", "verify-closing-keywords", "verify-skill-external-fetch-gate", "verify-semantic-single-source", "verify-contract-drift", "verify-cursor-tier1", "verify-openclaw-tier1", "verify-go-freeze", "verify-scm-boundary", "verify-session-ritual", "verify-plan-sequence", "verify-stubs", "verify-xbrief-drift", "verify-spec-prd-fresh", "rule-ownership-lint", "verify-story-ready", "verify-review-monitor", "verify-l4-owner", "verify-subagent-alive", "verify-subagent-steer", "review-monitor-register", "review-monitor-release", "verify-tools", "verify-wip-cap", "verify-orphan-active", "verify-pr-closeout-attestable", "verify-lifecycle-visible", "verify-completed-tracked", "verify-completed-write-guard", "verify-literal-ac", "verify-ac", "verify-agents-md-budget", "verify-agents-md-advisory", "verify-eval-health-relocation", "verify-eval-triggers-relocation", "verify-evaluator-surface", "verify-observable-scope", "verify-operator-scope-limit", "verify-presentation-ceiling", "verify-intent-constraint", "verify-durable-effect-acquisition", "verify-consumer-test-lane", "eval-health", "eval-run", "eval-report", "eval-triggers"];
|
|
14
14
|
/** Core-only CLI entrypoints without a packages/cli wrapper. */
|
|
15
15
|
export declare const CORE_MODULE_VERBS: readonly ["scm", "scm-readiness", "github-auth-modes", "github-body", "issue-emit", "issue-ingest", "issue-sync-from-xbrief", "reconcile-issues", "swarm-launch", "swarm-complete-cohort", "swarm-finalize-cohort", "swarm-finalize-owed", "swarm-pre-dispatch", "swarm-readiness", "swarm-routing-verify", "swarm-routing-set", "swarm-verify-review-clean", "swarm-worktrees", "framework-commands", "pack-render", "packs-slice", "prd-render", "export-spec", "project-render", "project-write-narratives", "roadmap-render", "rule-map", "spec-render", "spec-validate", "code-structure-validate", "pack-migrate-skills", "pack-migrate-rules", "pack-migrate-strategies", "pack-migrate-patterns", "pack-migrate-swarm-spec", "policy-set", "setup-ghx", "scope-undo", "scope-demote", "scope-decompose", "changelog-resolve-unreleased", "architecture-preflight-sor", "feedback-file", "value-readback", "product-signal", "freshness-report", "decision-write", "decision-list", "docs-impact"];
|
|
16
16
|
/** Colon aliases for triage-actions (mirrors cli-router SUBCOMMAND_ROUTES). */
|
package/dist/dispatch.js
CHANGED
|
@@ -117,6 +117,7 @@ export const CLI_MODULE_VERBS = [
|
|
|
117
117
|
"verify-forward-coverage",
|
|
118
118
|
"verify-test-boundary",
|
|
119
119
|
"verify-class-checks",
|
|
120
|
+
"verify-presentation-coverage",
|
|
120
121
|
"verify-scope-provenance",
|
|
121
122
|
"verify-consumer-check-contract",
|
|
122
123
|
"verify-hooks-installed",
|
|
@@ -170,7 +171,9 @@ export const CLI_MODULE_VERBS = [
|
|
|
170
171
|
"verify-evaluator-surface",
|
|
171
172
|
"verify-observable-scope",
|
|
172
173
|
"verify-operator-scope-limit",
|
|
174
|
+
"verify-presentation-ceiling",
|
|
173
175
|
"verify-intent-constraint",
|
|
176
|
+
"verify-durable-effect-acquisition",
|
|
174
177
|
"verify-consumer-test-lane",
|
|
175
178
|
"eval-health",
|
|
176
179
|
"eval-run",
|
|
@@ -306,6 +309,8 @@ export const VERB_ALIASES = {
|
|
|
306
309
|
"verify:forward-coverage": "verify-forward-coverage",
|
|
307
310
|
"verify:test-boundary": "verify-test-boundary",
|
|
308
311
|
"verify:class-checks": "verify-class-checks",
|
|
312
|
+
"verify:presentation-ceiling": "verify-presentation-ceiling",
|
|
313
|
+
"verify:presentation-coverage": "verify-presentation-coverage",
|
|
309
314
|
"verify:scope-provenance": "verify-scope-provenance",
|
|
310
315
|
"scope:record-approved-scope": "scope-record-approved-scope",
|
|
311
316
|
"scope:record-observable-scope": "scope-record-observable-scope",
|
|
@@ -332,6 +337,7 @@ export const VERB_ALIASES = {
|
|
|
332
337
|
"verify:observable-scope": "verify-observable-scope",
|
|
333
338
|
"verify:operator-scope-limit": "verify-operator-scope-limit",
|
|
334
339
|
"verify:intent-constraint": "verify-intent-constraint",
|
|
340
|
+
"verify:durable-effect-acquisition": "verify-durable-effect-acquisition",
|
|
335
341
|
"verify:consumer-test-lane": "verify-consumer-test-lane",
|
|
336
342
|
"verify:hooks-installed": "verify-hooks-installed",
|
|
337
343
|
"verify:no-task-runtime": "verify-no-task-runtime",
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* First-class abandoned-lease recovery (#4667). Live actor is session_id in
|
|
4
|
+
* .deft/occupancy.json; bare session:end with empty identity refuses; TTL
|
|
5
|
+
* claim-over and deny-embedded copy-paste remain. host:none / address:none
|
|
6
|
+
* are unset metadata, not the lock cause. Does not reopen anonymous live
|
|
7
|
+
* auto-release (#3954).
|
|
8
|
+
*/
|
|
9
|
+
export declare const ABANDONED_OCCUPANCY_LEASE_RECOVERY: string;
|
|
10
|
+
export declare function formatOccupancyReleaseHelp(): string;
|
|
2
11
|
export declare function parseArgs(argv: readonly string[]): {
|
|
3
12
|
projectRoot: string;
|
|
4
13
|
sessionId?: string;
|
|
14
|
+
help?: boolean;
|
|
5
15
|
error?: string;
|
|
6
16
|
};
|
|
7
17
|
export declare function run(argv: readonly string[]): number;
|
|
@@ -2,11 +2,38 @@
|
|
|
2
2
|
import { resolve } from "node:path";
|
|
3
3
|
import { releaseOccupancy } from "@deftai/directive-core/session";
|
|
4
4
|
import { occupancyUnrecognizedArgument } from "./occupancy-unrecognized.js";
|
|
5
|
+
/**
|
|
6
|
+
* First-class abandoned-lease recovery (#4667). Live actor is session_id in
|
|
7
|
+
* .deft/occupancy.json; bare session:end with empty identity refuses; TTL
|
|
8
|
+
* claim-over and deny-embedded copy-paste remain. host:none / address:none
|
|
9
|
+
* are unset metadata, not the lock cause. Does not reopen anonymous live
|
|
10
|
+
* auto-release (#3954).
|
|
11
|
+
*/
|
|
12
|
+
export const ABANDONED_OCCUPANCY_LEASE_RECOVERY = "Abandoned live occupancy lease: bare session:end / occupancy:release without a presented " +
|
|
13
|
+
"session identity refuses while the lease is live. Immediate recovery: " +
|
|
14
|
+
"occupancy:release --session-id=<id from .deft/occupancy.json> " +
|
|
15
|
+
"(read session_id from that file). Or wait for TTL claim-over. " +
|
|
16
|
+
"host:none / address:none are ordinary unset metadata, not the lock cause.";
|
|
17
|
+
export function formatOccupancyReleaseHelp() {
|
|
18
|
+
return [
|
|
19
|
+
"Usage: deft occupancy:release [--project-root <path>] [--session-id <id>]",
|
|
20
|
+
"",
|
|
21
|
+
"Release this worktree occupancy lease (owner live, or expired residue).",
|
|
22
|
+
"",
|
|
23
|
+
ABANDONED_OCCUPANCY_LEASE_RECOVERY,
|
|
24
|
+
"",
|
|
25
|
+
].join("\n");
|
|
26
|
+
}
|
|
5
27
|
export function parseArgs(argv) {
|
|
6
|
-
const parsed = {
|
|
28
|
+
const parsed = {
|
|
29
|
+
projectRoot: ".",
|
|
30
|
+
};
|
|
7
31
|
for (let i = 0; i < argv.length; i += 1) {
|
|
8
32
|
const arg = argv[i];
|
|
9
|
-
if (arg === "--
|
|
33
|
+
if (arg === "--help" || arg === "-h") {
|
|
34
|
+
parsed.help = true;
|
|
35
|
+
}
|
|
36
|
+
else if (arg === "--project-root") {
|
|
10
37
|
const value = argv[i + 1];
|
|
11
38
|
if (value === undefined || value.startsWith("--")) {
|
|
12
39
|
return { ...parsed, error: "argument --project-root: expected one argument" };
|
|
@@ -52,6 +79,10 @@ export function run(argv) {
|
|
|
52
79
|
process.stderr.write(`occupancy:release: ${args.error}\n`);
|
|
53
80
|
return 2;
|
|
54
81
|
}
|
|
82
|
+
if (args.help === true) {
|
|
83
|
+
process.stdout.write(formatOccupancyReleaseHelp());
|
|
84
|
+
return 0;
|
|
85
|
+
}
|
|
55
86
|
const result = releaseOccupancy(resolve(args.projectRoot), {
|
|
56
87
|
sessionId: args.sessionId,
|
|
57
88
|
env: process.env,
|
package/dist/verify-ac.js
CHANGED
|
@@ -12,7 +12,7 @@ import { join, resolve } from "node:path";
|
|
|
12
12
|
import { fileURLToPath } from "node:url";
|
|
13
13
|
import { resolveSessionCompletedVerifyAcTarget } from "@deftai/directive-core/check";
|
|
14
14
|
import { formatRejectedLedger, resolveLiteralAcceptanceDetailed, } from "@deftai/directive-core/literal-acceptance";
|
|
15
|
-
import { emitVerifyAcTerminalOutcome, evaluateVerifyAcFromPath, readAdmittedSourceDigest, readAdmittedSourceSentences, readPlanAcceptance, resolveAcceptanceGateProfile, } from "@deftai/directive-core/product-first-done-gate";
|
|
15
|
+
import { emitVerifyAcTerminalOutcome, evaluateVerifyAcFromPath, readAdmittedSourceDigest, readAdmittedSourceSentences, readPlanAcceptance, resolveAcceptanceGateProfile, resolveSoftMissingAcTargets, } from "@deftai/directive-core/product-first-done-gate";
|
|
16
16
|
/** Parse verify:ac CLI args. */
|
|
17
17
|
export function parseArgs(argv) {
|
|
18
18
|
const parsed = {
|
|
@@ -277,18 +277,44 @@ export function run(argv) {
|
|
|
277
277
|
paths = [found.path];
|
|
278
278
|
}
|
|
279
279
|
else if (found.kind === "many") {
|
|
280
|
-
//
|
|
281
|
-
|
|
280
|
+
// #4285: soft-missing selects via DEFT_ACTIVE_SCOPE / explicit path
|
|
281
|
+
// (or fail closed). ALL-paths soft-missing is not the #3284 product bar.
|
|
282
|
+
// --capture-only still lists every active artifact (inventory, not run).
|
|
283
|
+
if (args.captureOnly) {
|
|
282
284
|
paths = [...found.paths];
|
|
283
285
|
if (!args.quiet) {
|
|
284
|
-
process.stdout.write(`verify:ac multi-active
|
|
286
|
+
process.stdout.write(`verify:ac capture-only multi-active: listing ${paths.length} scopes in ${found.dir}\n`);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
else if (args.softMissingXbrief) {
|
|
290
|
+
const selected = resolveSoftMissingAcTargets(projectRoot, {
|
|
291
|
+
env: process.env,
|
|
292
|
+
scannedPaths: found.paths,
|
|
293
|
+
});
|
|
294
|
+
if (selected.kind === "one") {
|
|
295
|
+
paths = [selected.path];
|
|
296
|
+
if (!args.quiet) {
|
|
297
|
+
process.stdout.write(`verify:ac soft-missing multi-active (#4285): selected ${selected.path}\n`);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
process.stderr.write(`${selected.kind === "need-pin" ? selected.message : "verify_ac: multi-active soft-missing needs a pin"}\n` +
|
|
302
|
+
" Usage: task verify:ac -- <path-to-active.xbrief.json>\n" +
|
|
303
|
+
` Or set DEFT_ACTIVE_SCOPE to the dispatched story under ${found.dir}\n` +
|
|
304
|
+
" Refs #4285 / #3284 product-first done-gate\n");
|
|
305
|
+
emitVerifyAcTerminalOutcome({
|
|
306
|
+
projectRoot,
|
|
307
|
+
env: process.env,
|
|
308
|
+
outcome: "config-error",
|
|
309
|
+
});
|
|
310
|
+
return 1;
|
|
285
311
|
}
|
|
286
312
|
}
|
|
287
313
|
else {
|
|
288
314
|
process.stderr.write(`verify_ac: ${found.paths.length} active scopes in ${found.dir}.\n` +
|
|
289
|
-
" Pass an explicit path, or
|
|
315
|
+
" Pass an explicit path, or set DEFT_ACTIVE_SCOPE with check composition (--soft-missing-xbrief).\n" +
|
|
290
316
|
" Usage: task verify:ac -- <path-to-active.xbrief.json>\n" +
|
|
291
|
-
" Refs #3284 product-first done-gate\n");
|
|
317
|
+
" Refs #4285 / #3284 product-first done-gate\n");
|
|
292
318
|
emitVerifyAcTerminalOutcome({
|
|
293
319
|
projectRoot,
|
|
294
320
|
env: process.env,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
interface ParsedArgs {
|
|
3
|
+
projectRoot: string;
|
|
4
|
+
originRef?: string;
|
|
5
|
+
quiet: boolean;
|
|
6
|
+
error?: string;
|
|
7
|
+
}
|
|
8
|
+
/** Parse verify-durable-effect-acquisition CLI args. */
|
|
9
|
+
export declare function parseArgs(argv: string[]): ParsedArgs;
|
|
10
|
+
/** Run the gate and return the process exit code. */
|
|
11
|
+
export declare function run(argv: string[]): number;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=verify-durable-effect-acquisition.d.ts.map
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { evaluateDurableEffectAcquisition } from "@deftai/directive-core/durable-effect-acquisition";
|
|
5
|
+
/** Parse verify-durable-effect-acquisition CLI args. */
|
|
6
|
+
export function parseArgs(argv) {
|
|
7
|
+
const parsed = { projectRoot: ".", quiet: false };
|
|
8
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
9
|
+
const arg = argv[i];
|
|
10
|
+
if (arg === "--quiet") {
|
|
11
|
+
parsed.quiet = true;
|
|
12
|
+
}
|
|
13
|
+
else if (arg === "--project-root") {
|
|
14
|
+
const value = argv[i + 1];
|
|
15
|
+
if (value === undefined) {
|
|
16
|
+
return { ...parsed, error: "argument --project-root: expected one argument" };
|
|
17
|
+
}
|
|
18
|
+
parsed.projectRoot = value;
|
|
19
|
+
i += 1;
|
|
20
|
+
}
|
|
21
|
+
else if (arg?.startsWith("--project-root=")) {
|
|
22
|
+
parsed.projectRoot = arg.slice("--project-root=".length);
|
|
23
|
+
}
|
|
24
|
+
else if (arg === "--origin-ref") {
|
|
25
|
+
const value = argv[i + 1];
|
|
26
|
+
if (value === undefined) {
|
|
27
|
+
return { ...parsed, error: "argument --origin-ref: expected one argument" };
|
|
28
|
+
}
|
|
29
|
+
parsed.originRef = value;
|
|
30
|
+
i += 1;
|
|
31
|
+
}
|
|
32
|
+
else if (arg?.startsWith("--origin-ref=")) {
|
|
33
|
+
parsed.originRef = arg.slice("--origin-ref=".length);
|
|
34
|
+
}
|
|
35
|
+
else if (arg === "--base-ref") {
|
|
36
|
+
return {
|
|
37
|
+
...parsed,
|
|
38
|
+
error: "unrecognized argument: --base-ref (baseline is the computed merge base; use --origin-ref to name the origin default)",
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
return { ...parsed, error: `unrecognized argument: ${arg}` };
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return parsed;
|
|
46
|
+
}
|
|
47
|
+
/** Run the gate and return the process exit code. */
|
|
48
|
+
export function run(argv) {
|
|
49
|
+
const args = parseArgs(argv);
|
|
50
|
+
if (args.error !== undefined) {
|
|
51
|
+
process.stderr.write(`verify_durable_effect_acquisition: ${args.error}\n`);
|
|
52
|
+
return 2;
|
|
53
|
+
}
|
|
54
|
+
const result = evaluateDurableEffectAcquisition({
|
|
55
|
+
projectRoot: resolve(args.projectRoot),
|
|
56
|
+
originRef: args.originRef,
|
|
57
|
+
quiet: args.quiet,
|
|
58
|
+
});
|
|
59
|
+
if (result.message.length > 0) {
|
|
60
|
+
if (result.stream === "stdout")
|
|
61
|
+
process.stdout.write(`${result.message}\n`);
|
|
62
|
+
else if (result.stream === "stderr")
|
|
63
|
+
process.stderr.write(`${result.message}\n`);
|
|
64
|
+
}
|
|
65
|
+
return result.code;
|
|
66
|
+
}
|
|
67
|
+
if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
|
|
68
|
+
process.exit(run(process.argv.slice(2)));
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=verify-durable-effect-acquisition.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
interface ParsedArgs {
|
|
3
|
+
projectRoot: string;
|
|
4
|
+
baseRef: string | null;
|
|
5
|
+
quiet: boolean;
|
|
6
|
+
error?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function parseArgs(argv: string[]): ParsedArgs;
|
|
9
|
+
export declare function run(argv: string[]): number;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=verify-presentation-ceiling.d.ts.map
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* CLI for verify:presentation-ceiling (#5056).
|
|
4
|
+
*/
|
|
5
|
+
import { resolve } from "node:path";
|
|
6
|
+
import { presentationCeiling } from "@deftai/directive-core";
|
|
7
|
+
import { isDirectEntrypoint } from "./entrypoint.js";
|
|
8
|
+
export function parseArgs(argv) {
|
|
9
|
+
const parsed = {
|
|
10
|
+
projectRoot: ".",
|
|
11
|
+
baseRef: null,
|
|
12
|
+
quiet: false,
|
|
13
|
+
};
|
|
14
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
15
|
+
const arg = argv[i];
|
|
16
|
+
if (arg === "--quiet") {
|
|
17
|
+
parsed.quiet = true;
|
|
18
|
+
}
|
|
19
|
+
else if (arg === "--project-root") {
|
|
20
|
+
const value = argv[i + 1];
|
|
21
|
+
if (value === undefined) {
|
|
22
|
+
return { ...parsed, error: "argument --project-root: expected one argument" };
|
|
23
|
+
}
|
|
24
|
+
parsed.projectRoot = value;
|
|
25
|
+
i += 1;
|
|
26
|
+
}
|
|
27
|
+
else if (arg?.startsWith("--project-root=")) {
|
|
28
|
+
parsed.projectRoot = arg.slice("--project-root=".length);
|
|
29
|
+
}
|
|
30
|
+
else if (arg === "--base-ref") {
|
|
31
|
+
const value = argv[i + 1];
|
|
32
|
+
if (value === undefined) {
|
|
33
|
+
return { ...parsed, error: "argument --base-ref: expected one argument" };
|
|
34
|
+
}
|
|
35
|
+
parsed.baseRef = value;
|
|
36
|
+
i += 1;
|
|
37
|
+
}
|
|
38
|
+
else if (arg?.startsWith("--base-ref=")) {
|
|
39
|
+
parsed.baseRef = arg.slice("--base-ref=".length);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
return { ...parsed, error: `unrecognized argument: ${arg}` };
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return parsed;
|
|
46
|
+
}
|
|
47
|
+
export function run(argv) {
|
|
48
|
+
const args = parseArgs(argv);
|
|
49
|
+
if (args.error !== undefined) {
|
|
50
|
+
process.stderr.write(`verify_presentation_ceiling: ${args.error}\n`);
|
|
51
|
+
return 2;
|
|
52
|
+
}
|
|
53
|
+
const projectRoot = resolve(args.projectRoot);
|
|
54
|
+
const result = presentationCeiling.evaluatePresentationCeiling(projectRoot, {
|
|
55
|
+
baseRef: args.baseRef,
|
|
56
|
+
quiet: args.quiet,
|
|
57
|
+
});
|
|
58
|
+
if (result.exitCode === 0) {
|
|
59
|
+
if (!args.quiet) {
|
|
60
|
+
process.stdout.write(`${result.message}\n`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
process.stderr.write(`${result.message}\n`);
|
|
65
|
+
}
|
|
66
|
+
return result.exitCode;
|
|
67
|
+
}
|
|
68
|
+
if (isDirectEntrypoint(import.meta.url)) {
|
|
69
|
+
process.exit(run(process.argv.slice(2)));
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=verify-presentation-ceiling.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
interface ParsedArgs {
|
|
3
|
+
projectRoot: string;
|
|
4
|
+
originRef?: string;
|
|
5
|
+
staged: boolean;
|
|
6
|
+
quiet: boolean;
|
|
7
|
+
json: boolean;
|
|
8
|
+
planId?: string;
|
|
9
|
+
error?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function parseArgs(argv: string[]): ParsedArgs;
|
|
12
|
+
export declare function run(argv: string[]): number;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=verify-presentation-coverage.d.ts.map
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* CLI for verify:presentation-coverage (#5079).
|
|
4
|
+
*/
|
|
5
|
+
import { resolve } from "node:path";
|
|
6
|
+
import { presentationCoverage } from "@deftai/directive-core";
|
|
7
|
+
import { isDirectEntrypoint } from "./entrypoint.js";
|
|
8
|
+
export function parseArgs(argv) {
|
|
9
|
+
const parsed = { projectRoot: ".", staged: false, quiet: false, json: false };
|
|
10
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
11
|
+
const arg = argv[i];
|
|
12
|
+
if (arg === "--json") {
|
|
13
|
+
parsed.json = true;
|
|
14
|
+
}
|
|
15
|
+
else if (arg === "--plan-id") {
|
|
16
|
+
const value = argv[i + 1];
|
|
17
|
+
if (value === undefined || value.startsWith("--"))
|
|
18
|
+
return { ...parsed, error: "argument --plan-id: expected one argument" };
|
|
19
|
+
parsed.planId = value;
|
|
20
|
+
i += 1;
|
|
21
|
+
}
|
|
22
|
+
else if (arg === "--quiet") {
|
|
23
|
+
parsed.quiet = true;
|
|
24
|
+
}
|
|
25
|
+
else if (arg === "--staged") {
|
|
26
|
+
parsed.staged = true;
|
|
27
|
+
}
|
|
28
|
+
else if (arg === "--project-root") {
|
|
29
|
+
const value = argv[i + 1];
|
|
30
|
+
if (value === undefined || value.startsWith("--")) {
|
|
31
|
+
return { ...parsed, error: "argument --project-root: expected one argument" };
|
|
32
|
+
}
|
|
33
|
+
parsed.projectRoot = value;
|
|
34
|
+
i += 1;
|
|
35
|
+
}
|
|
36
|
+
else if (arg?.startsWith("--project-root=")) {
|
|
37
|
+
parsed.projectRoot = arg.slice("--project-root=".length);
|
|
38
|
+
}
|
|
39
|
+
else if (arg === "--origin-ref") {
|
|
40
|
+
const value = argv[i + 1];
|
|
41
|
+
if (value === undefined || value.startsWith("--")) {
|
|
42
|
+
return { ...parsed, error: "argument --origin-ref: expected one argument" };
|
|
43
|
+
}
|
|
44
|
+
parsed.originRef = value;
|
|
45
|
+
i += 1;
|
|
46
|
+
}
|
|
47
|
+
else if (arg?.startsWith("--origin-ref=")) {
|
|
48
|
+
parsed.originRef = arg.slice("--origin-ref=".length);
|
|
49
|
+
}
|
|
50
|
+
else if (arg === "--base-ref") {
|
|
51
|
+
return {
|
|
52
|
+
...parsed,
|
|
53
|
+
error: "unrecognized argument: --base-ref (baseline is the computed merge base; use --origin-ref to name the origin default)",
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
return { ...parsed, error: `unrecognized argument: ${arg}` };
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return parsed;
|
|
61
|
+
}
|
|
62
|
+
export function run(argv) {
|
|
63
|
+
const args = parseArgs(argv);
|
|
64
|
+
if (args.error !== undefined) {
|
|
65
|
+
process.stderr.write(`verify_presentation_coverage: ${args.error}\n`);
|
|
66
|
+
return 2;
|
|
67
|
+
}
|
|
68
|
+
const result = presentationCoverage.evaluatePresentationCoverage({
|
|
69
|
+
projectRoot: resolve(args.projectRoot),
|
|
70
|
+
originRef: args.originRef,
|
|
71
|
+
staged: args.staged,
|
|
72
|
+
quiet: args.quiet,
|
|
73
|
+
planId: args.planId,
|
|
74
|
+
});
|
|
75
|
+
if (args.json) {
|
|
76
|
+
process.stdout.write(`${JSON.stringify(result)}\n`);
|
|
77
|
+
return result.code;
|
|
78
|
+
}
|
|
79
|
+
if (!args.quiet && result.message.length > 0) {
|
|
80
|
+
if (result.stream === "stdout")
|
|
81
|
+
process.stdout.write(`${result.message}\n`);
|
|
82
|
+
else if (result.stream === "stderr")
|
|
83
|
+
process.stderr.write(`${result.message}\n`);
|
|
84
|
+
}
|
|
85
|
+
return result.code;
|
|
86
|
+
}
|
|
87
|
+
if (isDirectEntrypoint(import.meta.url)) {
|
|
88
|
+
process.exit(run(process.argv.slice(2)));
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=verify-presentation-coverage.js.map
|
package/dist/windows-bin-ps1.js
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
* A .ps1 is removed only when its sibling .cmd records a target inside this
|
|
7
7
|
* install, so an ambient PNPM_HOME from another install is left alone.
|
|
8
8
|
* It does not change npx.ps1, npm.ps1, or the operator's execution policy.
|
|
9
|
+
* Codex deposits bare deft-hook (#4659); this postinstall is what makes Restricted
|
|
10
|
+
* Get-Command select deft-hook.cmd without ExecutionPolicy Bypass.
|
|
9
11
|
*/
|
|
10
12
|
import { existsSync, readFileSync, realpathSync, unlinkSync } from "node:fs";
|
|
11
13
|
import { basename, dirname, join, win32 } from "node:path";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deftai/directive",
|
|
3
|
-
"version": "0.119.
|
|
3
|
+
"version": "0.119.12",
|
|
4
4
|
"description": "Directive CLI — npm install path for the Deft Directive framework.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://deftai.github.io/directive/",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"provenance": true
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@deftai/directive-core": "^0.119.
|
|
39
|
-
"@deftai/directive-content": "^0.119.
|
|
38
|
+
"@deftai/directive-core": "^0.119.12",
|
|
39
|
+
"@deftai/directive-content": "^0.119.12"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "tsc -b",
|