@deftai/directive-types 0.88.0 → 0.90.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/index.d.ts +1 -1
- package/dist/policy.d.ts +26 -1
- package/dist/policy.js +3 -0
- package/package.json +1 -1
- package/schemas/vbrief-core-0.6.schema.json +33 -0
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { ACCEPTED_VBRIEF_VERSIONS, EXTENSION_KEY_PATTERN, LEGACY_VBRIEF_CORE_SCH
|
|
|
2
2
|
export type { EngineInfo, Plan, PlanArchitecture, PlanItem, VBriefDocument, VBriefInfo, } from "./document.js";
|
|
3
3
|
export { collectExtensionProperties, type ExtensionKey, isExtensionKey, } from "./extension.js";
|
|
4
4
|
export { GATE_EXIT_CONFIG_ERROR, GATE_EXIT_OK, GATE_EXIT_VIOLATION, type GateExitCode, type GateResult, } from "./gate.js";
|
|
5
|
-
export { type PlanPolicy, type ProjectionProviderExpectation, type ProjectionProviderPolicy, REGISTERED_POLICY_FIELD_NAMES, type TriageScopeRule, } from "./policy.js";
|
|
5
|
+
export { type HotfixCriteria, type PlanPolicy, type ProjectionProviderExpectation, type ProjectionProviderPolicy, REGISTERED_POLICY_FIELD_NAMES, type TriageScopeRule, } from "./policy.js";
|
|
6
6
|
export { isVBriefReferenceType, KNOWN_REFERENCE_TYPES, type KnownReferenceType, referenceTypeMatches, type TrustLevel, type VBriefReference, } from "./reference.js";
|
|
7
7
|
export { RESOLUTION_ENCODINGS, RESOLUTION_MODES, RESOLUTION_PLAN_SCHEMA_VERSION, type ResolutionEncoding, type ResolutionFacts, type ResolutionFile, type ResolutionMode, type ResolutionNextAction, type ResolutionPlan, } from "./resolution.js";
|
|
8
8
|
export { FOLDER_ALLOWED_STATUSES, type Status, VALID_STATUSES, } from "./status.js";
|
package/dist/policy.d.ts
CHANGED
|
@@ -6,6 +6,18 @@ export interface TriageScopeRule {
|
|
|
6
6
|
readonly rule: string;
|
|
7
7
|
readonly [key: string]: unknown;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Typed hotfix eligibility thresholds (#1193 / Wave 2 of #2948).
|
|
11
|
+
* Agent may propose `hotfix-candidate` only; a human promotes to `hotfix`.
|
|
12
|
+
*/
|
|
13
|
+
export interface HotfixCriteria {
|
|
14
|
+
/** Max changed lines for a small fix (default 10). */
|
|
15
|
+
readonly maxLines?: number;
|
|
16
|
+
/** Max changed files for a small fix (default 2). */
|
|
17
|
+
readonly maxFiles?: number;
|
|
18
|
+
/** Paths that never qualify as hotfix (default includes deploy/CI/migrations). */
|
|
19
|
+
readonly forbiddenPathGlobs?: readonly string[];
|
|
20
|
+
}
|
|
9
21
|
export interface PlanPolicy {
|
|
10
22
|
readonly allowDirectCommitsToMaster?: boolean;
|
|
11
23
|
readonly wipCap?: number;
|
|
@@ -27,6 +39,19 @@ export interface PlanPolicy {
|
|
|
27
39
|
readonly projectionProviders?: Record<string, ProjectionProviderPolicy>;
|
|
28
40
|
/** Per-host Directive hook deposit toggles (#2752). Default: all true. */
|
|
29
41
|
readonly hostHooks?: Partial<Record<"claude" | "cursor" | "grok" | "codex", boolean>>;
|
|
42
|
+
/**
|
|
43
|
+
* When true, agents may open PRs but must not merge (#1193). Defaults true
|
|
44
|
+
* when `autoDeployOnMerge` is also true. Override: `policy:allow-bot-merge`
|
|
45
|
+
* or `DEFT_ALLOW_BOT_MERGE=1`.
|
|
46
|
+
*/
|
|
47
|
+
readonly requireHumanMerge?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* When true, merges to the default branch auto-deploy to production.
|
|
50
|
+
* Couples with requireHumanMerge defaulting (#1193 Shadowlogic profile).
|
|
51
|
+
*/
|
|
52
|
+
readonly autoDeployOnMerge?: boolean;
|
|
53
|
+
/** Structural hotfix eligibility thresholds (#1193). */
|
|
54
|
+
readonly hotfixCriteria?: HotfixCriteria;
|
|
30
55
|
readonly [key: `x-${string}`]: unknown;
|
|
31
56
|
}
|
|
32
57
|
export interface ProjectionProviderExpectation {
|
|
@@ -42,5 +67,5 @@ export interface ProjectionProviderPolicy {
|
|
|
42
67
|
readonly [key: `x-${string}`]: unknown;
|
|
43
68
|
}
|
|
44
69
|
/** Canonical dotted policy field names registered by the directive engine. */
|
|
45
|
-
export declare const REGISTERED_POLICY_FIELD_NAMES: readonly ["plan.policy.allowDirectCommitsToMaster", "plan.policy.wipCap", "plan.policy.sessionRitualStalenessHours", "plan.policy.triageScope", "plan.policy.triageScopeIgnores", "plan.policy.triageRankingLabels", "plan.policy.triageAutoClassify", "plan.policy.triageHoldMarkers", "plan.policy.swarmSubagentBackend", "plan.policy.engineSkewWindow"];
|
|
70
|
+
export declare const REGISTERED_POLICY_FIELD_NAMES: readonly ["plan.policy.allowDirectCommitsToMaster", "plan.policy.wipCap", "plan.policy.sessionRitualStalenessHours", "plan.policy.triageScope", "plan.policy.triageScopeIgnores", "plan.policy.triageRankingLabels", "plan.policy.triageAutoClassify", "plan.policy.triageHoldMarkers", "plan.policy.swarmSubagentBackend", "plan.policy.engineSkewWindow", "plan.policy.requireHumanMerge", "plan.policy.hotfixCriteria", "plan.policy.autoDeployOnMerge"];
|
|
46
71
|
//# sourceMappingURL=policy.d.ts.map
|
package/dist/policy.js
CHANGED
|
@@ -10,5 +10,8 @@ export const REGISTERED_POLICY_FIELD_NAMES = [
|
|
|
10
10
|
"plan.policy.triageHoldMarkers",
|
|
11
11
|
"plan.policy.swarmSubagentBackend",
|
|
12
12
|
"plan.policy.engineSkewWindow",
|
|
13
|
+
"plan.policy.requireHumanMerge",
|
|
14
|
+
"plan.policy.hotfixCriteria",
|
|
15
|
+
"plan.policy.autoDeployOnMerge",
|
|
13
16
|
];
|
|
14
17
|
//# sourceMappingURL=policy.js.map
|
package/package.json
CHANGED
|
@@ -609,12 +609,45 @@
|
|
|
609
609
|
"minimum": 1,
|
|
610
610
|
"description": "Maximum age, in hours, for .deft/ritual-state.json before the fail-closed session ritual verifier requires task session:start to run again. Default: 4."
|
|
611
611
|
},
|
|
612
|
+
"requireHumanMerge": {
|
|
613
|
+
"type": "boolean",
|
|
614
|
+
"description": "When true, agents may open PRs but must not merge (#1193). Defaults true when autoDeployOnMerge is also true. Override: policy:allow-bot-merge --confirm or DEFT_ALLOW_BOT_MERGE=1."
|
|
615
|
+
},
|
|
616
|
+
"autoDeployOnMerge": {
|
|
617
|
+
"type": "boolean",
|
|
618
|
+
"description": "When true, merges to the default branch auto-deploy to production. Couples with requireHumanMerge defaulting (#1193)."
|
|
619
|
+
},
|
|
620
|
+
"hotfixCriteria": {
|
|
621
|
+
"$ref": "#/$defs/HotfixCriteria"
|
|
622
|
+
},
|
|
612
623
|
"projectionProviders": {
|
|
613
624
|
"$ref": "#/$defs/ProjectionProviderPolicies"
|
|
614
625
|
}
|
|
615
626
|
},
|
|
616
627
|
"additionalProperties": true
|
|
617
628
|
},
|
|
629
|
+
"HotfixCriteria": {
|
|
630
|
+
"type": "object",
|
|
631
|
+
"description": "Structural hotfix eligibility thresholds (#1193). Agent may label hotfix-candidate only; human promotes hotfix.",
|
|
632
|
+
"properties": {
|
|
633
|
+
"maxLines": {
|
|
634
|
+
"type": "integer",
|
|
635
|
+
"minimum": 0,
|
|
636
|
+
"description": "Max changed lines for a small-fix hotfix candidate. Default: 10."
|
|
637
|
+
},
|
|
638
|
+
"maxFiles": {
|
|
639
|
+
"type": "integer",
|
|
640
|
+
"minimum": 0,
|
|
641
|
+
"description": "Max changed files for a small-fix hotfix candidate. Default: 2."
|
|
642
|
+
},
|
|
643
|
+
"forbiddenPathGlobs": {
|
|
644
|
+
"type": "array",
|
|
645
|
+
"items": { "type": "string" },
|
|
646
|
+
"description": "Path globs that never qualify as hotfix (deploy/CI/migrations/auth defaults apply when omitted)."
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
"additionalProperties": true
|
|
650
|
+
},
|
|
618
651
|
"ProjectionProviderPolicies": {
|
|
619
652
|
"type": "object",
|
|
620
653
|
"description": "Projection provider artifact policies keyed by projection kind. Values point at durable artifacts; runner command strings are not canonical policy.",
|