@deftai/directive 0.102.0 → 0.104.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
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", "scope-lifecycle", "scope-record-approved-scope", "lifecycle-event", "lifecycle-stats", "session-start", "session-ready", "plan-sequence", "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", "xbrief-create", "xbrief-verify", "verify-branch", "verify-encoding", "verify-forward-coverage", "verify-test-boundary", "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-content-manifest", "verify-skill-external-fetch-gate", "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", "rule-ownership-lint", "verify-story-ready", "verify-review-monitor", "verify-l4-owner", "verify-subagent-alive", "review-monitor-register", "review-monitor-release", "verify-tools", "verify-wip-cap", "verify-orphan-active", "verify-completed-tracked", "verify-literal-ac", "verify-ac", "verify-agents-md-budget", "verify-agents-md-advisory", "verify-eval-health-relocation", "verify-eval-triggers-relocation", "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", "scope-lifecycle", "scope-record-approved-scope", "lifecycle-event", "lifecycle-stats", "session-start", "session-ready", "plan-sequence", "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", "xbrief-create", "xbrief-verify", "verify-branch", "verify-encoding", "verify-forward-coverage", "verify-test-boundary", "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-skill-external-fetch-gate", "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", "rule-ownership-lint", "verify-story-ready", "verify-review-monitor", "verify-l4-owner", "verify-subagent-alive", "review-monitor-register", "review-monitor-release", "verify-tools", "verify-wip-cap", "verify-orphan-active", "verify-completed-tracked", "verify-literal-ac", "verify-ac", "verify-agents-md-budget", "verify-agents-md-advisory", "verify-eval-health-relocation", "verify-eval-triggers-relocation", "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-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", "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"];
|
|
16
16
|
/** Colon aliases for triage-actions (mirrors cli-router SUBCOMMAND_ROUTES). */
|
package/dist/dispatch.js
CHANGED
|
@@ -116,6 +116,7 @@ export const CLI_MODULE_VERBS = [
|
|
|
116
116
|
"verify-bridge-drift",
|
|
117
117
|
"verify-capacity",
|
|
118
118
|
"verify-contained-writes",
|
|
119
|
+
"verify-telemetry-coverage",
|
|
119
120
|
"verify-content-manifest",
|
|
120
121
|
"verify-skill-external-fetch-gate",
|
|
121
122
|
"verify-contract-drift",
|
|
@@ -313,6 +314,7 @@ export const VERB_ALIASES = {
|
|
|
313
314
|
"rule:ownership-lint": "rule-ownership-lint",
|
|
314
315
|
"verify:biome-config": "verify-biome-config",
|
|
315
316
|
"verify:contained-writes": "verify-contained-writes",
|
|
317
|
+
"verify:telemetry-coverage": "verify-telemetry-coverage",
|
|
316
318
|
"verify:content-manifest": "verify-content-manifest",
|
|
317
319
|
"verify:skill-external-fetch-gate": "verify-skill-external-fetch-gate",
|
|
318
320
|
"verify:contract-drift": "verify-contract-drift",
|
|
@@ -385,6 +387,7 @@ const SUBDIR_CLI_STEMS = {
|
|
|
385
387
|
"rule-ownership-lint": "verify-source-cli/rule-ownership-lint",
|
|
386
388
|
"verify-biome-config": "verify-source-cli/verify-biome-config",
|
|
387
389
|
"verify-contained-writes": "verify-source-cli/verify-contained-writes",
|
|
390
|
+
"verify-telemetry-coverage": "verify-source-cli/verify-telemetry-coverage",
|
|
388
391
|
"verify-content-manifest": "verify-source-cli/verify-content-manifest",
|
|
389
392
|
"verify-skill-external-fetch-gate": "verify-source-cli/verify-skill-external-fetch-gate",
|
|
390
393
|
"verify-contract-drift": "verify-source-cli/verify-contract-drift",
|
package/dist/verify-ac.js
CHANGED
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
10
10
|
import { join, resolve } from "node:path";
|
|
11
11
|
import { fileURLToPath } from "node:url";
|
|
12
|
+
import { resolveSessionCompletedVerifyAcTarget } from "@deftai/directive-core/check";
|
|
12
13
|
import { formatRejectedLedger, resolveLiteralAcceptanceDetailed, } from "@deftai/directive-core/literal-acceptance";
|
|
13
|
-
import { evaluateVerifyAcFromPath, readPlanAcceptance, } from "@deftai/directive-core/product-first-done-gate";
|
|
14
|
+
import { emitVerifyAcTerminalOutcome, evaluateVerifyAcFromPath, readPlanAcceptance, } from "@deftai/directive-core/product-first-done-gate";
|
|
14
15
|
/** Parse verify:ac CLI args. */
|
|
15
16
|
export function parseArgs(argv) {
|
|
16
17
|
const parsed = {
|
|
@@ -142,6 +143,11 @@ export function run(argv) {
|
|
|
142
143
|
const args = parseArgs(argv);
|
|
143
144
|
if (args.error !== undefined) {
|
|
144
145
|
process.stderr.write(`verify_ac: ${args.error}\n`);
|
|
146
|
+
emitVerifyAcTerminalOutcome({
|
|
147
|
+
projectRoot: resolve(args.projectRoot),
|
|
148
|
+
env: process.env,
|
|
149
|
+
outcome: "config-error",
|
|
150
|
+
});
|
|
145
151
|
return 2;
|
|
146
152
|
}
|
|
147
153
|
const projectRoot = resolve(args.projectRoot);
|
|
@@ -167,19 +173,55 @@ export function run(argv) {
|
|
|
167
173
|
" Pass an explicit path, or use check composition (--soft-missing-xbrief) to evaluate all.\n" +
|
|
168
174
|
" Usage: task verify:ac -- <path-to-active.xbrief.json>\n" +
|
|
169
175
|
" Refs #3284 product-first done-gate\n");
|
|
176
|
+
emitVerifyAcTerminalOutcome({
|
|
177
|
+
projectRoot,
|
|
178
|
+
env: process.env,
|
|
179
|
+
outcome: "config-error",
|
|
180
|
+
});
|
|
170
181
|
return 1;
|
|
171
182
|
}
|
|
172
183
|
}
|
|
173
184
|
else if (args.softMissingXbrief) {
|
|
174
|
-
|
|
185
|
+
const completed = resolveSessionCompletedVerifyAcTarget({
|
|
186
|
+
projectRoot,
|
|
187
|
+
env: process.env,
|
|
188
|
+
});
|
|
189
|
+
if (completed.kind === "target") {
|
|
190
|
+
paths = [completed.path];
|
|
191
|
+
if (!args.quiet) {
|
|
192
|
+
process.stdout.write(`verify:ac targeting just-completed brief (#3357): ${completed.path}\n`);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
else if (completed.kind === "cannot") {
|
|
196
|
+
process.stderr.write(`${completed.message}\n`);
|
|
197
|
+
emitVerifyAcTerminalOutcome({
|
|
198
|
+
projectRoot,
|
|
199
|
+
env: process.env,
|
|
200
|
+
outcome: "config-error",
|
|
201
|
+
});
|
|
202
|
+
return 1;
|
|
203
|
+
}
|
|
204
|
+
else if (!args.quiet) {
|
|
175
205
|
process.stdout.write("verify:ac skipped (#3284 soft-missing): no active xBRIEF in xbrief/active/\n");
|
|
176
206
|
}
|
|
177
|
-
|
|
207
|
+
if (completed.kind === "none") {
|
|
208
|
+
emitVerifyAcTerminalOutcome({
|
|
209
|
+
projectRoot,
|
|
210
|
+
env: process.env,
|
|
211
|
+
outcome: "soft-missing",
|
|
212
|
+
});
|
|
213
|
+
return 0;
|
|
214
|
+
}
|
|
178
215
|
}
|
|
179
216
|
else {
|
|
180
217
|
process.stderr.write("verify_ac: pass an xBRIEF path or ensure exactly one artifact in xbrief/active/\n" +
|
|
181
218
|
" Usage: task verify:ac -- <path-to-active.xbrief.json>\n" +
|
|
182
219
|
" Refs #3284 product-first done-gate (mechanism #3267)\n");
|
|
220
|
+
emitVerifyAcTerminalOutcome({
|
|
221
|
+
projectRoot,
|
|
222
|
+
env: process.env,
|
|
223
|
+
outcome: "config-error",
|
|
224
|
+
});
|
|
183
225
|
return 2;
|
|
184
226
|
}
|
|
185
227
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
interface ParsedArgs {
|
|
3
|
+
projectRoot: string;
|
|
4
|
+
enforce: boolean;
|
|
5
|
+
help?: boolean;
|
|
6
|
+
error?: string;
|
|
7
|
+
}
|
|
8
|
+
/** Parse verify-telemetry-coverage CLI args (#3362). */
|
|
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-telemetry-coverage.d.ts.map
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* CLI for task verify:telemetry-coverage (#3362).
|
|
4
|
+
* Warn-only by default; pass --enforce to fail closed.
|
|
5
|
+
*/
|
|
6
|
+
import { resolve } from "node:path";
|
|
7
|
+
import { fileURLToPath } from "node:url";
|
|
8
|
+
import { evaluateTelemetryCoverage } from "@deftai/directive-core/verify-source";
|
|
9
|
+
/** Parse verify-telemetry-coverage CLI args (#3362). */
|
|
10
|
+
export function parseArgs(argv) {
|
|
11
|
+
const parsed = { projectRoot: ".", enforce: false };
|
|
12
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
13
|
+
const arg = argv[i];
|
|
14
|
+
if (arg === "--project-root") {
|
|
15
|
+
const value = argv[i + 1];
|
|
16
|
+
if (value === undefined) {
|
|
17
|
+
return { ...parsed, error: "argument --project-root: expected one argument" };
|
|
18
|
+
}
|
|
19
|
+
parsed.projectRoot = value;
|
|
20
|
+
i += 1;
|
|
21
|
+
}
|
|
22
|
+
else if (arg?.startsWith("--project-root=")) {
|
|
23
|
+
parsed.projectRoot = arg.slice("--project-root=".length);
|
|
24
|
+
}
|
|
25
|
+
else if (arg === "--enforce") {
|
|
26
|
+
parsed.enforce = true;
|
|
27
|
+
}
|
|
28
|
+
else if (arg === "--help" || arg === "-h") {
|
|
29
|
+
return { ...parsed, help: true };
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
return { ...parsed, error: `unrecognized argument: ${arg}` };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return parsed;
|
|
36
|
+
}
|
|
37
|
+
const HELP_TEXT = "Usage: verify-telemetry-coverage [--project-root <path>] [--enforce]\n" +
|
|
38
|
+
" Dead-surface detector for run-summary event kinds (#3362).\n" +
|
|
39
|
+
" Default: warn-only (exit 0 with advisory report).\n" +
|
|
40
|
+
" --enforce: fail closed (exit 1) when a kind has no caller or fixture.\n";
|
|
41
|
+
/** Run the gate and return the process exit code. */
|
|
42
|
+
export function run(argv) {
|
|
43
|
+
const args = parseArgs(argv);
|
|
44
|
+
if (args.help === true) {
|
|
45
|
+
process.stdout.write(HELP_TEXT);
|
|
46
|
+
return 0;
|
|
47
|
+
}
|
|
48
|
+
if (args.error !== undefined) {
|
|
49
|
+
process.stderr.write(`verify_telemetry_coverage: ${args.error}\n`);
|
|
50
|
+
return 2;
|
|
51
|
+
}
|
|
52
|
+
const result = evaluateTelemetryCoverage({
|
|
53
|
+
projectRoot: resolve(args.projectRoot),
|
|
54
|
+
enforce: args.enforce,
|
|
55
|
+
});
|
|
56
|
+
if (result.stream === "stdout") {
|
|
57
|
+
process.stdout.write(`${result.message}\n`);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
process.stderr.write(`${result.message}\n`);
|
|
61
|
+
}
|
|
62
|
+
return result.code;
|
|
63
|
+
}
|
|
64
|
+
if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
|
|
65
|
+
process.exit(run(process.argv.slice(2)));
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=verify-telemetry-coverage.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deftai/directive",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.104.0",
|
|
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/",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"provenance": true
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@deftai/directive-core": "^0.
|
|
38
|
-
"@deftai/directive-content": "^0.
|
|
37
|
+
"@deftai/directive-core": "^0.104.0",
|
|
38
|
+
"@deftai/directive-content": "^0.104.0"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "tsc -b"
|