@deftai/directive 0.125.1 → 0.125.2
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/triage-queue.js
CHANGED
|
@@ -13,7 +13,7 @@ import { fileURLToPath } from "node:url";
|
|
|
13
13
|
import { ensureTriageCacheHydrated } from "@deftai/directive-core/dist/cache/empty-populate.js";
|
|
14
14
|
import { findByIssue } from "@deftai/directive-core/dist/triage/actions/candidates-log.js";
|
|
15
15
|
import { resolveTriageCachePath } from "@deftai/directive-core/dist/triage/cache-path.js";
|
|
16
|
-
import { activeReferencedIssueNumbers, buildQueue, collectOrphanIssueNumbers, DEFAULT_QUEUE_LIMIT, formatAuthorFilterLine, loadCachedIssueDetail, loadCachedIssues, loadSliceRecords, partitionByAuthorFilter, readAuditEntries, reconcileLiveOpenState, renderOperatorBrief, renderQueue, renderShow, resolveAuthorFilter, resolveRankingLabels, resolveRepo, } from "@deftai/directive-core/dist/triage/queue/index.js";
|
|
16
|
+
import { activeReferencedIssueNumbers, buildQueue, collectOrphanIssueNumbers, DEFAULT_QUEUE_LIMIT, formatAuthorFilterLine, loadCachedIssueDetail, loadCachedIssues, loadSliceRecords, partitionByAuthorFilter, readAuditEntries, reconcileLiveOpenState, renderOperatorBrief, renderQueue, renderShow, resolveAuthorFilter, resolveRankingLabels, resolveRepo, ShowQuarantineRefuseError, } from "@deftai/directive-core/dist/triage/queue/index.js";
|
|
17
17
|
import { resolveScopeIgnores } from "@deftai/directive-core/dist/triage/scope-drift/index.js";
|
|
18
18
|
function baseArgs() {
|
|
19
19
|
return {
|
|
@@ -337,10 +337,16 @@ function runShow(args) {
|
|
|
337
337
|
repo,
|
|
338
338
|
...(cacheRoot !== null ? { cacheRoot } : {}),
|
|
339
339
|
});
|
|
340
|
-
const
|
|
340
|
+
const loaded = loadCachedIssueDetail(repo, number, {
|
|
341
341
|
projectRoot,
|
|
342
342
|
cacheRoot,
|
|
343
343
|
});
|
|
344
|
+
// Typed quarantine refuse (#5367): returned-failure → exit 1 + stderr; never emit raw.json.
|
|
345
|
+
if (loaded instanceof ShowQuarantineRefuseError) {
|
|
346
|
+
process.stderr.write(`${loaded.message}\n`);
|
|
347
|
+
return 1;
|
|
348
|
+
}
|
|
349
|
+
const issue = loaded;
|
|
344
350
|
const logPath = args.auditLog ?? resolveTriageCachePath(projectRoot, "candidates.jsonl");
|
|
345
351
|
const history = findByIssue(number, repo, logPath)
|
|
346
352
|
.slice()
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
/** Stderr line when argv includes `--enforce`. Exit code is unchanged. */
|
|
3
|
+
export declare const ENFORCE_NOOP_NOTICE = "verify_scope_provenance: --enforce has no effect after #4956 / #5002";
|
|
2
4
|
interface ParsedArgs {
|
|
3
5
|
projectRoot: string;
|
|
4
6
|
baseRef: string;
|
|
5
7
|
enforce: boolean;
|
|
8
|
+
/** Raw `--enforce` token present, even when a later `--warn` wins `enforce`. */
|
|
9
|
+
enforcePresent: boolean;
|
|
6
10
|
quiet: boolean;
|
|
7
11
|
error?: string;
|
|
8
12
|
}
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* CLI for verify:scope-provenance (#3145 / #4956 / #4774).
|
|
3
|
+
* CLI for verify:scope-provenance (#3145 / #4956 / #4774 / #5057).
|
|
4
4
|
*
|
|
5
5
|
* Membership against the declared allowlist (mint / brief file_scope) is
|
|
6
|
-
* evaluated inside evaluateScopeProvenance
|
|
7
|
-
*
|
|
6
|
+
* evaluated inside evaluateScopeProvenance. This CLI forwards --base-ref.
|
|
7
|
+
* `--enforce` / `--warn` stay parsed for compatibility; `--enforce` is a
|
|
8
|
+
* no-op after #4956 / #5002 and prints a stderr notice when present.
|
|
8
9
|
*/
|
|
9
10
|
import { resolve } from "node:path";
|
|
10
11
|
import { scopeProvenance } from "@deftai/directive-core";
|
|
11
12
|
import { isDirectEntrypoint } from "./entrypoint.js";
|
|
13
|
+
/** Stderr line when argv includes `--enforce`. Exit code is unchanged. */
|
|
14
|
+
export const ENFORCE_NOOP_NOTICE = "verify_scope_provenance: --enforce has no effect after #4956 / #5002";
|
|
12
15
|
export function parseArgs(argv) {
|
|
13
16
|
const parsed = {
|
|
14
17
|
projectRoot: ".",
|
|
15
18
|
// Empty means use PR-aware default (origin/master...), not bare HEAD.
|
|
16
19
|
baseRef: "",
|
|
17
20
|
enforce: false,
|
|
21
|
+
enforcePresent: false,
|
|
18
22
|
quiet: false,
|
|
19
23
|
};
|
|
20
24
|
for (let i = 0; i < argv.length; i += 1) {
|
|
@@ -24,6 +28,7 @@ export function parseArgs(argv) {
|
|
|
24
28
|
}
|
|
25
29
|
else if (arg === "--enforce") {
|
|
26
30
|
parsed.enforce = true;
|
|
31
|
+
parsed.enforcePresent = true;
|
|
27
32
|
}
|
|
28
33
|
else if (arg === "--warn") {
|
|
29
34
|
parsed.enforce = false;
|
|
@@ -67,6 +72,9 @@ export function run(argv) {
|
|
|
67
72
|
...(args.baseRef.length > 0 ? { baseRef: args.baseRef } : {}),
|
|
68
73
|
enforce: args.enforce,
|
|
69
74
|
});
|
|
75
|
+
if (args.enforcePresent) {
|
|
76
|
+
process.stderr.write(`${ENFORCE_NOOP_NOTICE}\n`);
|
|
77
|
+
}
|
|
70
78
|
if (result.exitCode === 0) {
|
|
71
79
|
if (!args.quiet) {
|
|
72
80
|
process.stdout.write(`${result.message}\n`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deftai/directive",
|
|
3
|
-
"version": "0.125.
|
|
3
|
+
"version": "0.125.2",
|
|
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.125.
|
|
39
|
-
"@deftai/directive-content": "^0.125.
|
|
38
|
+
"@deftai/directive-core": "^0.125.2",
|
|
39
|
+
"@deftai/directive-content": "^0.125.2"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "tsc -b",
|