@deftai/directive-core 0.93.0 → 0.95.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/authz/classify.js +485 -0
- package/dist/cache/fetch.d.ts +29 -0
- package/dist/cache/fetch.js +131 -4
- package/dist/cache/operations.d.ts +8 -0
- package/dist/cache/operations.js +67 -4
- package/dist/check/cached-orchestrator.js +11 -0
- package/dist/check/consumer-gate-integrity.d.ts +68 -0
- package/dist/check/consumer-gate-integrity.js +265 -0
- package/dist/check/index.d.ts +1 -0
- package/dist/check/index.js +1 -0
- package/dist/check/orchestrator.js +10 -0
- package/dist/content-contracts/skills/greptile-detector.d.ts +9 -0
- package/dist/content-contracts/skills/greptile-detector.js +9 -2
- package/dist/doctor/main.js +98 -9
- package/dist/doctor/types.d.ts +2 -2
- package/dist/finish-loop/pr-finish-loop.js +1 -0
- package/dist/freshness/bind.d.ts +67 -0
- package/dist/freshness/bind.js +201 -0
- package/dist/freshness/cli.d.ts +30 -0
- package/dist/freshness/cli.js +180 -0
- package/dist/freshness/compare.d.ts +14 -0
- package/dist/freshness/compare.js +134 -0
- package/dist/freshness/generation.d.ts +44 -0
- package/dist/freshness/generation.js +172 -0
- package/dist/freshness/index.d.ts +13 -0
- package/dist/freshness/index.js +13 -0
- package/dist/freshness/report.d.ts +43 -0
- package/dist/freshness/report.js +139 -0
- package/dist/freshness/types.d.ts +70 -0
- package/dist/freshness/types.js +30 -0
- package/dist/handoff-evidence/index.d.ts +8 -0
- package/dist/handoff-evidence/index.js +7 -0
- package/dist/handoff-evidence/validate.d.ts +105 -0
- package/dist/handoff-evidence/validate.js +423 -0
- package/dist/hooks/dispatcher.d.ts +27 -2
- package/dist/hooks/dispatcher.js +134 -14
- package/dist/hooks/readonly.d.ts +14 -0
- package/dist/hooks/readonly.js +126 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/init-deposit/agent-hooks.d.ts +1 -1
- package/dist/init-deposit/agent-hooks.js +5 -2
- package/dist/init-deposit/init-deposit.d.ts +7 -1
- package/dist/init-deposit/init-deposit.js +24 -4
- package/dist/init-deposit/refresh.d.ts +9 -1
- package/dist/init-deposit/refresh.js +48 -5
- package/dist/intake/issue-ingest.d.ts +20 -0
- package/dist/intake/issue-ingest.js +58 -0
- package/dist/policy/index.d.ts +4 -0
- package/dist/policy/index.js +50 -1
- package/dist/policy/min-greptile-confidence.d.ts +57 -0
- package/dist/policy/min-greptile-confidence.js +123 -0
- package/dist/pr-merge-readiness/compute.d.ts +11 -1
- package/dist/pr-merge-readiness/compute.js +17 -4
- package/dist/pr-merge-readiness/evaluate.d.ts +8 -1
- package/dist/pr-merge-readiness/evaluate.js +7 -4
- package/dist/pr-merge-readiness/mergeability.d.ts +7 -1
- package/dist/pr-merge-readiness/mergeability.js +14 -2
- package/dist/pr-monitor/main.d.ts +2 -0
- package/dist/pr-monitor/main.js +31 -1
- package/dist/pr-monitor/monitor.js +5 -1
- package/dist/pr-monitor/readiness.js +3 -1
- package/dist/pr-monitor/types.d.ts +8 -0
- package/dist/pr-wait-mergeable/cascade.d.ts +8 -0
- package/dist/pr-wait-mergeable/cascade.js +28 -1
- package/dist/pr-wait-mergeable/main.d.ts +2 -0
- package/dist/pr-wait-mergeable/main.js +16 -0
- package/dist/pr-wait-mergeable/types.d.ts +3 -1
- package/dist/pr-wait-mergeable/wrappers.d.ts +6 -0
- package/dist/pr-wait-mergeable/wrappers.js +3 -0
- package/dist/pr-watch/constants.d.ts +4 -1
- package/dist/pr-watch/constants.js +5 -2
- package/dist/pr-watch/main.js +1 -0
- package/dist/pr-watch/probe.d.ts +1 -1
- package/dist/pr-watch/probe.js +4 -1
- package/dist/pr-watch/types.d.ts +7 -1
- package/dist/pr-watch/watch.js +3 -2
- package/dist/release-e2e/greenfield-python-free-smoke.js +7 -3
- package/dist/review-monitor/index.d.ts +1 -0
- package/dist/review-monitor/index.js +1 -0
- package/dist/review-monitor/l4-owner.d.ts +46 -0
- package/dist/review-monitor/l4-owner.js +262 -0
- package/dist/session/ritual-entrypoint.d.ts +6 -2
- package/dist/session/ritual-entrypoint.js +15 -2
- package/dist/session/session-ready.js +31 -14
- package/dist/session/session-start.d.ts +2 -1
- package/dist/session/session-start.js +66 -3
- package/dist/session/verify-session-ritual.d.ts +4 -2
- package/dist/session/verify-session-ritual.js +11 -11
- package/dist/slash/product-set.js +4 -1
- package/dist/swarm/verify-review-clean.d.ts +4 -3
- package/dist/swarm/verify-review-clean.js +28 -73
- package/dist/tool-events/classify.js +1 -0
- package/dist/triage/classify/index.d.ts +9 -0
- package/dist/triage/classify/index.js +34 -2
- package/dist/triage/classify/label-mirror.d.ts +143 -0
- package/dist/triage/classify/label-mirror.js +684 -0
- package/dist/triage/help/registry-data.d.ts +7 -7
- package/dist/triage/help/registry-data.js +27 -7
- package/dist/triage/queue/show.d.ts +1 -1
- package/dist/triage/queue/show.js +4 -2
- package/dist/triage/welcome/writers.js +16 -7
- package/dist/umbrella-current-shape/index.d.ts +45 -0
- package/dist/umbrella-current-shape/index.js +162 -8
- package/dist/vbrief-reconcile/index.d.ts +2 -2
- package/dist/vbrief-reconcile/index.js +1 -1
- package/dist/vbrief-reconcile/types.d.ts +14 -0
- package/dist/vbrief-reconcile/umbrellas.d.ts +31 -2
- package/dist/vbrief-reconcile/umbrellas.js +231 -19
- package/dist/vbrief-validate/project-definition.js +1 -1
- package/dist/verify-env/agent-hook-readiness.d.ts +42 -0
- package/dist/verify-env/agent-hook-readiness.js +150 -0
- package/dist/verify-env/agent-hooks-live-probe.d.ts +16 -4
- package/dist/verify-env/agent-hooks-live-probe.js +120 -107
- package/dist/verify-env/agent-hooks.js +11 -3
- package/dist/verify-env/index.d.ts +1 -0
- package/dist/verify-env/index.js +1 -0
- package/package.json +7 -3
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tier-1 deterministic SCM label mirror (#1423 Wave 1).
|
|
3
|
+
*
|
|
4
|
+
* Classifies cached issues with the existing #1129 engine, then mirrors the
|
|
5
|
+
* outcome as SCM labels (dry-run default, --apply to write). Never accepts into
|
|
6
|
+
* the xBRIEF lifecycle and never writes proposed/ scopes.
|
|
7
|
+
*
|
|
8
|
+
* Intentionally does NOT import from ./index.js (SLizard P1 cycle). The classify
|
|
9
|
+
* engine is injected via LabelMirrorEngine / mirrorLabels() wrapper in index.ts.
|
|
10
|
+
*/
|
|
11
|
+
import type { LabelClient } from "../../vbrief-reconcile/types.js";
|
|
12
|
+
export declare const DEFAULT_IDEMPOTENCY_LABEL = "triaged";
|
|
13
|
+
export declare const CACHE_DIR_NAME = ".deft-cache";
|
|
14
|
+
export declare const CACHE_SOURCE = "github-issue";
|
|
15
|
+
export type ClassifyAction = "defer" | "archive" | "escalate" | "accept";
|
|
16
|
+
/** Minimal issue shape used by the mirror (matches classify GitHubIssue). */
|
|
17
|
+
export interface MirrorGitHubIssue {
|
|
18
|
+
readonly number?: number;
|
|
19
|
+
readonly state?: string;
|
|
20
|
+
readonly body?: string | null;
|
|
21
|
+
readonly labels?: ReadonlyArray<{
|
|
22
|
+
name?: string;
|
|
23
|
+
} | string>;
|
|
24
|
+
readonly updated_at?: string;
|
|
25
|
+
readonly created_at?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface MirrorClassificationResult {
|
|
28
|
+
readonly action: string;
|
|
29
|
+
readonly reason: string;
|
|
30
|
+
readonly ruleIndex: number;
|
|
31
|
+
readonly ruleSource: string;
|
|
32
|
+
readonly ruleKind: string;
|
|
33
|
+
readonly resumeOn: string | null;
|
|
34
|
+
}
|
|
35
|
+
/** Injected classify engine — avoids a runtime import cycle with classify/index.ts. */
|
|
36
|
+
export interface LabelMirrorEngine {
|
|
37
|
+
readonly classifyIssue: (issue: MirrorGitHubIssue, options?: {
|
|
38
|
+
rules?: readonly unknown[];
|
|
39
|
+
holdMarkers?: string[] | null;
|
|
40
|
+
vbriefReferenced?: ReadonlySet<number> | null;
|
|
41
|
+
hasTriageDecision?: boolean;
|
|
42
|
+
now?: Date;
|
|
43
|
+
}) => MirrorClassificationResult | null;
|
|
44
|
+
readonly resolveClassifyRules: (options?: {
|
|
45
|
+
projectRoot?: string;
|
|
46
|
+
projectDefinition?: Record<string, unknown> | null;
|
|
47
|
+
}) => readonly unknown[];
|
|
48
|
+
readonly resolveHoldMarkers: (options?: {
|
|
49
|
+
projectRoot?: string;
|
|
50
|
+
projectDefinition?: Record<string, unknown> | null;
|
|
51
|
+
}) => string[];
|
|
52
|
+
/** Optional; label-mirror prefers repo-qualified keys and only needs numbers as fallback. */
|
|
53
|
+
readonly extractReferencedIssues?: (projectRoot?: string) => Set<number>;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Repo-qualified xBRIEF github-issue keys (`owner/name\\0number`).
|
|
57
|
+
* Unlike number-only extractReferencedIssues, this never collides across repos.
|
|
58
|
+
*/
|
|
59
|
+
export declare function extractReferencedRepoIssueKeys(projectRoot?: string, lifecycleFolders?: readonly string[]): Set<string>;
|
|
60
|
+
export interface LabelMirrorPolicy {
|
|
61
|
+
/** When false, mirror is a no-op (default true when policy object is used). */
|
|
62
|
+
readonly enabled?: boolean;
|
|
63
|
+
/** Idempotency marker; issues already carrying this label are skipped. Default: triaged. */
|
|
64
|
+
readonly idempotencyLabel?: string;
|
|
65
|
+
/** Labels always applied on a successful classification (default: [idempotencyLabel]). */
|
|
66
|
+
readonly alwaysLabels?: readonly string[];
|
|
67
|
+
/** Map classify action -> additional labels to apply. */
|
|
68
|
+
readonly actionLabels?: Readonly<Partial<Record<ClassifyAction, readonly string[]>>>;
|
|
69
|
+
}
|
|
70
|
+
export interface ResolvedLabelMirrorPolicy {
|
|
71
|
+
readonly enabled: boolean;
|
|
72
|
+
readonly idempotencyLabel: string;
|
|
73
|
+
readonly alwaysLabels: readonly string[];
|
|
74
|
+
readonly actionLabels: Readonly<Partial<Record<ClassifyAction, readonly string[]>>>;
|
|
75
|
+
}
|
|
76
|
+
export type LabelMirrorStatus = "planned" | "applied" | "unchanged" | "skipped_already_triaged" | "skipped_no_match" | "skipped_unreadable" | "skipped_disabled" | "error";
|
|
77
|
+
export interface LabelMirrorItem {
|
|
78
|
+
readonly repo: string;
|
|
79
|
+
readonly issue_number: number;
|
|
80
|
+
readonly action: string | null;
|
|
81
|
+
readonly reason: string | null;
|
|
82
|
+
readonly ruleKind: string | null;
|
|
83
|
+
readonly current: readonly string[];
|
|
84
|
+
readonly desired: readonly string[];
|
|
85
|
+
readonly add: readonly string[];
|
|
86
|
+
readonly status: LabelMirrorStatus;
|
|
87
|
+
readonly message?: string;
|
|
88
|
+
}
|
|
89
|
+
export interface LabelMirrorOutcome {
|
|
90
|
+
readonly project_root: string;
|
|
91
|
+
readonly dry_run: boolean;
|
|
92
|
+
readonly scanned: number;
|
|
93
|
+
readonly planned: number;
|
|
94
|
+
readonly applied: number;
|
|
95
|
+
readonly unchanged: number;
|
|
96
|
+
readonly skipped_already_triaged: number;
|
|
97
|
+
readonly skipped_no_match: number;
|
|
98
|
+
readonly skipped_unreadable: number;
|
|
99
|
+
readonly errors: number;
|
|
100
|
+
readonly items: readonly LabelMirrorItem[];
|
|
101
|
+
readonly policy: ResolvedLabelMirrorPolicy;
|
|
102
|
+
}
|
|
103
|
+
export interface LabelMirrorOptions {
|
|
104
|
+
readonly dryRun?: boolean;
|
|
105
|
+
readonly repo?: string | null;
|
|
106
|
+
readonly cacheRoot?: string;
|
|
107
|
+
readonly client?: LabelClient;
|
|
108
|
+
readonly allowCrossRepo?: boolean;
|
|
109
|
+
readonly repoAllowlist?: readonly string[];
|
|
110
|
+
/** Prefer live SCM labels when true (default: !dryRun). Cache labels used for dry-run. */
|
|
111
|
+
readonly useLiveLabels?: boolean;
|
|
112
|
+
readonly now?: Date;
|
|
113
|
+
/** Required: classify engine (provided by classify/index mirrorLabels wrapper). */
|
|
114
|
+
readonly engine: LabelMirrorEngine;
|
|
115
|
+
}
|
|
116
|
+
/** Validate plan.policy.triageLabelMirror payload. */
|
|
117
|
+
export declare function validateLabelMirrorPolicy(raw: unknown): {
|
|
118
|
+
errors: string[];
|
|
119
|
+
warnings: string[];
|
|
120
|
+
};
|
|
121
|
+
/** Default resolved policy when triageLabelMirror is absent. */
|
|
122
|
+
export declare function defaultLabelMirrorPolicy(): ResolvedLabelMirrorPolicy;
|
|
123
|
+
/** Resolve effective label-mirror policy from PROJECT-DEFINITION or inline object. */
|
|
124
|
+
export declare function resolveLabelMirrorPolicy(options?: {
|
|
125
|
+
projectRoot?: string;
|
|
126
|
+
projectDefinition?: Record<string, unknown> | null;
|
|
127
|
+
override?: LabelMirrorPolicy | null;
|
|
128
|
+
}): ResolvedLabelMirrorPolicy;
|
|
129
|
+
/** Labels to apply for a classified action (always + action-mapped). */
|
|
130
|
+
export declare function desiredLabelsForClassification(action: string, policy: ResolvedLabelMirrorPolicy): string[];
|
|
131
|
+
/**
|
|
132
|
+
* Run Tier-1 label mirror over the github-issue cache.
|
|
133
|
+
* Dry-run by default (no SCM writes). Pass dryRun: false to apply.
|
|
134
|
+
* Requires options.engine (classify/index wrapper injects it).
|
|
135
|
+
*/
|
|
136
|
+
export declare function mirrorLabels(projectRoot: string, options: LabelMirrorOptions): [number, LabelMirrorOutcome];
|
|
137
|
+
/** Human-readable digest for dry-run / apply reports. */
|
|
138
|
+
export declare function renderLabelMirrorReport(outcome: LabelMirrorOutcome): string;
|
|
139
|
+
/** JSON-serializable outcome (stable key order not required). */
|
|
140
|
+
export declare function labelMirrorOutcomeToJson(outcome: LabelMirrorOutcome): Record<string, unknown>;
|
|
141
|
+
/** Validate triageLabelMirror on a plan object (vbrief_validate hook). */
|
|
142
|
+
export declare function validateTriageLabelMirrorOnPlan(plan: unknown, filepath: string): string[];
|
|
143
|
+
//# sourceMappingURL=label-mirror.d.ts.map
|