@deftai/directive 0.74.0 → 0.76.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/dispatch.d.ts +1 -1
- package/dist/dispatch.js +3 -0
- package/dist/session-start.d.ts +1 -0
- package/dist/session-start.js +13 -2
- package/dist/vbrief-preflight.d.ts +1 -1
- package/dist/vbrief-preflight.js +43 -12
- package/dist/verify-agents-md-budget.js +16 -0
- package/dist/verify-eval-health-relocation.d.ts +16 -0
- package/dist/verify-eval-health-relocation.js +93 -0
- package/dist/verify-session-ritual.d.ts +2 -0
- package/dist/verify-session-ritual.js +43 -2
- 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", "umbrella-current-shape", "changelog-check", "change-init", "commit-lint", "policy", "pr-closing-keywords", "pr-merge-readiness", "pr-monitor", "pr-protected-issues", "pr-wait-mergeable", "pr-watch", "preflight-cache", "preflight-gh", "probe-session", "release", "release-e2e", "release-publish", "release-rollback", "scope-lifecycle", "session-start", "slice", "subagent-monitor", "toolchain-check", "triage-actions", "triage-bootstrap", "triage-bulk", "triage-classify", "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", "verify-branch", "verify-encoding", "verify-forward-coverage", "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-content-manifest", "verify-contract-drift", "verify-cursor-tier1", "verify-go-freeze", "verify-scm-boundary", "verify-session-ritual", "verify-stubs", "verify-xbrief-drift", "rule-ownership-lint", "verify-story-ready", "verify-tools", "verify-wip-cap", "verify-agents-md-budget", "verify-agents-md-advisory", "eval-health", "eval-run", "eval-report"];
|
|
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", "umbrella-current-shape", "changelog-check", "change-init", "commit-lint", "policy", "pr-closing-keywords", "pr-merge-readiness", "pr-monitor", "pr-protected-issues", "pr-wait-mergeable", "pr-watch", "preflight-cache", "preflight-gh", "probe-session", "release", "release-e2e", "release-publish", "release-rollback", "scope-lifecycle", "session-start", "slice", "subagent-monitor", "toolchain-check", "triage-actions", "triage-bootstrap", "triage-bulk", "triage-classify", "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", "verify-branch", "verify-encoding", "verify-forward-coverage", "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-content-manifest", "verify-contract-drift", "verify-cursor-tier1", "verify-go-freeze", "verify-scm-boundary", "verify-session-ritual", "verify-stubs", "verify-xbrief-drift", "rule-ownership-lint", "verify-story-ready", "verify-tools", "verify-wip-cap", "verify-agents-md-budget", "verify-agents-md-advisory", "verify-eval-health-relocation", "eval-health", "eval-run", "eval-report"];
|
|
14
14
|
/** Core-only CLI entrypoints without a packages/cli wrapper. */
|
|
15
15
|
export declare const CORE_MODULE_VERBS: readonly ["scm", "github-auth-modes", "github-body", "issue-emit", "issue-ingest", "reconcile-issues", "swarm-launch", "swarm-complete-cohort", "swarm-finalize-cohort", "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", "roadmap-render", "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"];
|
|
16
16
|
/** Colon aliases for triage-actions (mirrors cli-router SUBCOMMAND_ROUTES). */
|
package/dist/dispatch.js
CHANGED
|
@@ -111,6 +111,7 @@ export const CLI_MODULE_VERBS = [
|
|
|
111
111
|
"verify-wip-cap",
|
|
112
112
|
"verify-agents-md-budget",
|
|
113
113
|
"verify-agents-md-advisory",
|
|
114
|
+
"verify-eval-health-relocation",
|
|
114
115
|
"eval-health",
|
|
115
116
|
"eval-run",
|
|
116
117
|
"eval-report",
|
|
@@ -185,10 +186,12 @@ export const VERB_ALIASES = {
|
|
|
185
186
|
"verify:wip-cap": "verify-wip-cap",
|
|
186
187
|
"verify:agents-md-budget": "verify-agents-md-budget",
|
|
187
188
|
"verify:agents-md-advisory": "verify-agents-md-advisory",
|
|
189
|
+
"verify:eval-health-relocation": "verify-eval-health-relocation",
|
|
188
190
|
"verify:hooks-installed": "verify-hooks-installed",
|
|
189
191
|
"verify:no-task-runtime": "verify-no-task-runtime",
|
|
190
192
|
"vbrief:validate": "vbrief-validate",
|
|
191
193
|
"vbrief:preflight": "vbrief-preflight",
|
|
194
|
+
"xbrief:preflight": "vbrief-preflight",
|
|
192
195
|
"vbrief:activate": "vbrief-activate",
|
|
193
196
|
"verify:story-ready": "verify-story-ready",
|
|
194
197
|
"verify:tools": "verify-tools",
|
package/dist/session-start.d.ts
CHANGED
package/dist/session-start.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { resolve } from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
|
-
import { parseDeferrals, ritualStatePath, runSessionStart } from "@deftai/directive-core/session";
|
|
4
|
+
import { parseDeferrals, READ_ONLY_POSTURE, ritualStatePath, runSessionStart, } from "@deftai/directive-core/session";
|
|
5
5
|
/** Parse session:start CLI args, mirroring scripts/session_start.py. */
|
|
6
6
|
export function parseArgs(argv) {
|
|
7
7
|
const parsed = {
|
|
@@ -9,6 +9,7 @@ export function parseArgs(argv) {
|
|
|
9
9
|
deferValues: [],
|
|
10
10
|
emitJson: false,
|
|
11
11
|
noHistory: false,
|
|
12
|
+
readOnly: false,
|
|
12
13
|
};
|
|
13
14
|
for (let i = 0; i < argv.length; i += 1) {
|
|
14
15
|
const arg = argv[i];
|
|
@@ -18,6 +19,9 @@ export function parseArgs(argv) {
|
|
|
18
19
|
else if (arg === "--no-history") {
|
|
19
20
|
parsed.noHistory = true;
|
|
20
21
|
}
|
|
22
|
+
else if (arg === "--read-only") {
|
|
23
|
+
parsed.readOnly = true;
|
|
24
|
+
}
|
|
21
25
|
else if (arg === "--project-root") {
|
|
22
26
|
const value = argv[i + 1];
|
|
23
27
|
if (value === undefined) {
|
|
@@ -76,6 +80,7 @@ export function run(argv) {
|
|
|
76
80
|
result = runSessionStart(projectRoot, {
|
|
77
81
|
deferrals,
|
|
78
82
|
writeHistory: !args.noHistory,
|
|
83
|
+
posture: args.readOnly ? READ_ONLY_POSTURE : undefined,
|
|
79
84
|
});
|
|
80
85
|
}
|
|
81
86
|
finally {
|
|
@@ -101,7 +106,13 @@ export function run(argv) {
|
|
|
101
106
|
sink.write(`${line}\n`);
|
|
102
107
|
}
|
|
103
108
|
if (result.code === 0) {
|
|
104
|
-
|
|
109
|
+
const posture = result.payload.posture;
|
|
110
|
+
if (posture === READ_ONLY_POSTURE) {
|
|
111
|
+
process.stdout.write(`[deft] ${String(result.payload.message)}\n`);
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
process.stdout.write(`[deft] session ritual recorded at ${ritualStatePath(projectRoot)} (diagnostic-only; not posture authority)\n`);
|
|
115
|
+
}
|
|
105
116
|
}
|
|
106
117
|
return result.code;
|
|
107
118
|
}
|
|
@@ -4,7 +4,7 @@ interface ParsedArgs {
|
|
|
4
4
|
emitJson: boolean;
|
|
5
5
|
error?: string;
|
|
6
6
|
}
|
|
7
|
-
/** Parse vbrief-preflight CLI args
|
|
7
|
+
/** Parse vbrief-preflight / xbrief:preflight CLI args (#810 / #2449). */
|
|
8
8
|
export declare function parseArgs(argv: string[]): ParsedArgs;
|
|
9
9
|
/** Run the gate and return the process exit code (parse errors -> 2). */
|
|
10
10
|
export declare function run(argv: string[]): number;
|
package/dist/vbrief-preflight.js
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
-
import { emitJson, evaluate } from "@deftai/directive-core/preflight";
|
|
4
|
-
|
|
3
|
+
import { emitJson, evaluate, PREFLIGHT_USAGE_HINT } from "@deftai/directive-core/preflight";
|
|
4
|
+
const PATH_FLAG_NAMES = ["--vbrief-path", "--brief-path", "--xbrief-path"];
|
|
5
|
+
function assignPathFlag(parsed, value) {
|
|
6
|
+
if (value === undefined || value.length === 0) {
|
|
7
|
+
return { ...parsed, error: "argument --vbrief-path: expected one argument" };
|
|
8
|
+
}
|
|
9
|
+
if (parsed.vbriefPath !== null) {
|
|
10
|
+
return { ...parsed, error: "multiple path arguments are not allowed" };
|
|
11
|
+
}
|
|
12
|
+
return { ...parsed, vbriefPath: value };
|
|
13
|
+
}
|
|
14
|
+
/** Parse vbrief-preflight / xbrief:preflight CLI args (#810 / #2449). */
|
|
5
15
|
export function parseArgs(argv) {
|
|
6
16
|
const parsed = {
|
|
7
17
|
vbriefPath: null,
|
|
@@ -11,24 +21,45 @@ export function parseArgs(argv) {
|
|
|
11
21
|
const arg = argv[i];
|
|
12
22
|
if (arg === "--json") {
|
|
13
23
|
parsed.emitJson = true;
|
|
24
|
+
continue;
|
|
14
25
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
26
|
+
if (arg === "--help" || arg === "-h") {
|
|
27
|
+
return parsed;
|
|
28
|
+
}
|
|
29
|
+
if (PATH_FLAG_NAMES.includes(arg)) {
|
|
30
|
+
const next = assignPathFlag(parsed, argv[i + 1]);
|
|
31
|
+
if (next?.error !== undefined)
|
|
32
|
+
return next;
|
|
33
|
+
parsed.vbriefPath = next?.vbriefPath ?? null;
|
|
21
34
|
i += 1;
|
|
35
|
+
continue;
|
|
22
36
|
}
|
|
23
|
-
|
|
24
|
-
|
|
37
|
+
let matchedEqualsForm = false;
|
|
38
|
+
for (const flag of PATH_FLAG_NAMES) {
|
|
39
|
+
if (arg?.startsWith(`${flag}=`)) {
|
|
40
|
+
const next = assignPathFlag(parsed, arg.slice(flag.length + 1));
|
|
41
|
+
if (next?.error !== undefined)
|
|
42
|
+
return next;
|
|
43
|
+
parsed.vbriefPath = next?.vbriefPath ?? null;
|
|
44
|
+
matchedEqualsForm = true;
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
25
47
|
}
|
|
26
|
-
|
|
48
|
+
if (matchedEqualsForm)
|
|
49
|
+
continue;
|
|
50
|
+
if (arg?.startsWith("-")) {
|
|
27
51
|
return { ...parsed, error: `unrecognized argument: ${arg}` };
|
|
28
52
|
}
|
|
53
|
+
const next = assignPathFlag(parsed, arg);
|
|
54
|
+
if (next?.error !== undefined)
|
|
55
|
+
return next;
|
|
56
|
+
parsed.vbriefPath = next?.vbriefPath ?? null;
|
|
29
57
|
}
|
|
30
58
|
if (parsed.vbriefPath === null) {
|
|
31
|
-
return {
|
|
59
|
+
return {
|
|
60
|
+
...parsed,
|
|
61
|
+
error: `the following arguments are required: --vbrief-path (or positional path). ${PREFLIGHT_USAGE_HINT}`,
|
|
62
|
+
};
|
|
32
63
|
}
|
|
33
64
|
return parsed;
|
|
34
65
|
}
|
|
@@ -47,6 +47,22 @@ export function run(argv) {
|
|
|
47
47
|
process.stderr.write(`${result.message}\n`);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
+
if (result.northStarMessage !== undefined && result.northStarMessage.length > 0) {
|
|
51
|
+
if (result.northStarStream === "stdout") {
|
|
52
|
+
process.stdout.write(`${result.northStarMessage}\n`);
|
|
53
|
+
}
|
|
54
|
+
else if (result.northStarStream === "stderr") {
|
|
55
|
+
process.stderr.write(`${result.northStarMessage}\n`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
else if (result.advisoryMessage !== undefined && result.advisoryMessage.length > 0) {
|
|
59
|
+
if (result.advisoryStream === "stdout") {
|
|
60
|
+
process.stdout.write(`${result.advisoryMessage}\n`);
|
|
61
|
+
}
|
|
62
|
+
else if (result.advisoryStream === "stderr") {
|
|
63
|
+
process.stderr.write(`${result.advisoryMessage}\n`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
50
66
|
return result.code;
|
|
51
67
|
}
|
|
52
68
|
if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
interface ParsedArgs {
|
|
3
|
+
projectRoot: string;
|
|
4
|
+
baseRef?: string;
|
|
5
|
+
staged: boolean;
|
|
6
|
+
quiet: boolean;
|
|
7
|
+
seedBaseline: boolean;
|
|
8
|
+
paths: string[];
|
|
9
|
+
error?: string;
|
|
10
|
+
}
|
|
11
|
+
/** Parse verify-eval-health-relocation CLI args. */
|
|
12
|
+
export declare function parseArgs(argv: string[]): ParsedArgs;
|
|
13
|
+
/** Run the gate and return the process exit code. */
|
|
14
|
+
export declare function run(argv: string[]): number;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=verify-eval-health-relocation.d.ts.map
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { evaluate } from "@deftai/directive-core/eval-health-relocation";
|
|
5
|
+
/** Parse verify-eval-health-relocation CLI args. */
|
|
6
|
+
export function parseArgs(argv) {
|
|
7
|
+
const parsed = {
|
|
8
|
+
projectRoot: ".",
|
|
9
|
+
staged: false,
|
|
10
|
+
quiet: false,
|
|
11
|
+
seedBaseline: false,
|
|
12
|
+
paths: [],
|
|
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 === "--staged") {
|
|
20
|
+
parsed.staged = true;
|
|
21
|
+
}
|
|
22
|
+
else if (arg === "--seed-baseline") {
|
|
23
|
+
parsed.seedBaseline = true;
|
|
24
|
+
}
|
|
25
|
+
else if (arg === "--project-root") {
|
|
26
|
+
const value = argv[i + 1];
|
|
27
|
+
if (value === undefined) {
|
|
28
|
+
return { ...parsed, error: "argument --project-root: expected one argument" };
|
|
29
|
+
}
|
|
30
|
+
parsed.projectRoot = value;
|
|
31
|
+
i += 1;
|
|
32
|
+
}
|
|
33
|
+
else if (arg?.startsWith("--project-root=")) {
|
|
34
|
+
parsed.projectRoot = arg.slice("--project-root=".length);
|
|
35
|
+
}
|
|
36
|
+
else if (arg === "--base-ref") {
|
|
37
|
+
const value = argv[i + 1];
|
|
38
|
+
if (value === undefined) {
|
|
39
|
+
return { ...parsed, error: "argument --base-ref: expected one argument" };
|
|
40
|
+
}
|
|
41
|
+
parsed.baseRef = value;
|
|
42
|
+
i += 1;
|
|
43
|
+
}
|
|
44
|
+
else if (arg?.startsWith("--base-ref=")) {
|
|
45
|
+
parsed.baseRef = arg.slice("--base-ref=".length);
|
|
46
|
+
}
|
|
47
|
+
else if (arg === "--path") {
|
|
48
|
+
const value = argv[i + 1];
|
|
49
|
+
if (value === undefined) {
|
|
50
|
+
return { ...parsed, error: "argument --path: expected one argument" };
|
|
51
|
+
}
|
|
52
|
+
parsed.paths.push(value);
|
|
53
|
+
i += 1;
|
|
54
|
+
}
|
|
55
|
+
else if (arg?.startsWith("--path=")) {
|
|
56
|
+
parsed.paths.push(arg.slice("--path=".length));
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
return { ...parsed, error: `unrecognized argument: ${arg}` };
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return parsed;
|
|
63
|
+
}
|
|
64
|
+
/** Run the gate and return the process exit code. */
|
|
65
|
+
export function run(argv) {
|
|
66
|
+
const args = parseArgs(argv);
|
|
67
|
+
if (args.error !== undefined) {
|
|
68
|
+
process.stderr.write(`verify_eval_health_relocation: ${args.error}\n`);
|
|
69
|
+
return 2;
|
|
70
|
+
}
|
|
71
|
+
const projectRoot = resolve(args.projectRoot);
|
|
72
|
+
const result = evaluate({
|
|
73
|
+
projectRoot,
|
|
74
|
+
baseRef: args.baseRef,
|
|
75
|
+
staged: args.staged,
|
|
76
|
+
quiet: args.quiet,
|
|
77
|
+
seedBaseline: args.seedBaseline,
|
|
78
|
+
paths: args.paths.length > 0 ? args.paths : undefined,
|
|
79
|
+
});
|
|
80
|
+
if (result.message.length > 0) {
|
|
81
|
+
if (result.stream === "stdout") {
|
|
82
|
+
process.stdout.write(`${result.message}\n`);
|
|
83
|
+
}
|
|
84
|
+
else if (result.stream === "stderr") {
|
|
85
|
+
process.stderr.write(`${result.message}\n`);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return result.code;
|
|
89
|
+
}
|
|
90
|
+
if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
|
|
91
|
+
process.exit(run(process.argv.slice(2)));
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=verify-eval-health-relocation.js.map
|
|
@@ -2,9 +2,21 @@
|
|
|
2
2
|
import { resolve } from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { emitBypassWarning, emitVerifyJson, verifySessionRitual, } from "@deftai/directive-core/session";
|
|
5
|
+
function parsePosture(value) {
|
|
6
|
+
if (value === "read-only")
|
|
7
|
+
return "read-only";
|
|
8
|
+
if (value === "mutation" || value === "mutating")
|
|
9
|
+
return "mutation";
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
5
12
|
/** Parse verify-session-ritual CLI args, mirroring scripts/verify_session_ritual.py. */
|
|
6
13
|
export function parseArgs(argv) {
|
|
7
|
-
const parsed = {
|
|
14
|
+
const parsed = {
|
|
15
|
+
projectRoot: ".",
|
|
16
|
+
tier: "quick",
|
|
17
|
+
posture: null,
|
|
18
|
+
emitJson: false,
|
|
19
|
+
};
|
|
8
20
|
for (let i = 0; i < argv.length; i += 1) {
|
|
9
21
|
const arg = argv[i];
|
|
10
22
|
if (arg === "--json") {
|
|
@@ -39,6 +51,32 @@ export function parseArgs(argv) {
|
|
|
39
51
|
}
|
|
40
52
|
parsed.tier = value;
|
|
41
53
|
}
|
|
54
|
+
else if (arg === "--posture") {
|
|
55
|
+
const value = argv[i + 1];
|
|
56
|
+
if (value === undefined) {
|
|
57
|
+
return { ...parsed, error: "argument --posture: expected one argument" };
|
|
58
|
+
}
|
|
59
|
+
const posture = parsePosture(value);
|
|
60
|
+
if (posture === null) {
|
|
61
|
+
return {
|
|
62
|
+
...parsed,
|
|
63
|
+
error: `argument --posture: invalid choice: '${value}' (expected read-only|mutation)`,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
parsed.posture = posture;
|
|
67
|
+
i += 1;
|
|
68
|
+
}
|
|
69
|
+
else if (arg?.startsWith("--posture=")) {
|
|
70
|
+
const value = arg.slice("--posture=".length);
|
|
71
|
+
const posture = parsePosture(value);
|
|
72
|
+
if (posture === null) {
|
|
73
|
+
return {
|
|
74
|
+
...parsed,
|
|
75
|
+
error: `argument --posture: invalid choice: '${value}' (expected read-only|mutation)`,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
parsed.posture = posture;
|
|
79
|
+
}
|
|
42
80
|
else {
|
|
43
81
|
return { ...parsed, error: `unrecognized argument: ${arg}` };
|
|
44
82
|
}
|
|
@@ -53,7 +91,10 @@ export function run(argv) {
|
|
|
53
91
|
return 2;
|
|
54
92
|
}
|
|
55
93
|
const projectRoot = resolve(args.projectRoot);
|
|
56
|
-
const result = verifySessionRitual(projectRoot, {
|
|
94
|
+
const result = verifySessionRitual(projectRoot, {
|
|
95
|
+
tier: args.tier,
|
|
96
|
+
posture: args.posture ?? undefined,
|
|
97
|
+
});
|
|
57
98
|
const warning = emitBypassWarning(result);
|
|
58
99
|
const warningNeeded = result.bypassed && result.wouldFailCode !== null;
|
|
59
100
|
if (args.emitJson) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deftai/directive",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.76.0",
|
|
4
4
|
"description": "Directive CLI — npm install path for the Deft Directive framework.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"provenance": true
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@deftai/directive-core": "^0.
|
|
35
|
-
"@deftai/directive-content": "^0.
|
|
34
|
+
"@deftai/directive-core": "^0.76.0",
|
|
35
|
+
"@deftai/directive-content": "^0.76.0"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "tsc -b"
|