@intutic/shared-types 1.10.0 → 2.0.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/README.md +1 -1
- package/dist/anomaly.d.ts +11 -0
- package/dist/anomaly.d.ts.map +1 -1
- package/dist/api-contracts.d.ts +97 -9
- package/dist/api-contracts.d.ts.map +1 -1
- package/dist/api-contracts.js +9 -0
- package/dist/api-contracts.js.map +1 -1
- package/dist/auth.d.ts +164 -1
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +39 -1
- package/dist/auth.js.map +1 -1
- package/dist/billing.d.ts +2 -99
- package/dist/billing.d.ts.map +1 -1
- package/dist/billing.js +2 -17
- package/dist/billing.js.map +1 -1
- package/dist/enums.d.ts +341 -4
- package/dist/enums.d.ts.map +1 -1
- package/dist/enums.js +369 -6
- package/dist/enums.js.map +1 -1
- package/dist/errors.d.ts +20 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +20 -1
- package/dist/errors.js.map +1 -1
- package/dist/finops.d.ts +97 -1
- package/dist/finops.d.ts.map +1 -1
- package/dist/governanceCoverage.d.ts +82 -0
- package/dist/governanceCoverage.d.ts.map +1 -0
- package/dist/governanceCoverage.js +72 -0
- package/dist/governanceCoverage.js.map +1 -0
- package/dist/guardrailIr.d.ts +287 -0
- package/dist/guardrailIr.d.ts.map +1 -0
- package/dist/guardrailIr.js +301 -0
- package/dist/guardrailIr.js.map +1 -0
- package/dist/guardrailRender.d.ts +154 -0
- package/dist/guardrailRender.d.ts.map +1 -0
- package/dist/guardrailRender.js +440 -0
- package/dist/guardrailRender.js.map +1 -0
- package/dist/identity.d.ts +75 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +5 -1
- package/dist/identity.js.map +1 -1
- package/dist/index.d.ts +34 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +124 -2
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +37 -11
- package/dist/intelligence.d.ts.map +1 -1
- package/dist/intelligence.js.map +1 -1
- package/dist/modelCatalog.d.ts +89 -0
- package/dist/modelCatalog.d.ts.map +1 -0
- package/dist/modelCatalog.generated.d.ts +7217 -0
- package/dist/modelCatalog.generated.d.ts.map +1 -0
- package/dist/modelCatalog.generated.js +577 -0
- package/dist/modelCatalog.generated.js.map +1 -0
- package/dist/modelCatalog.js +112 -0
- package/dist/modelCatalog.js.map +1 -0
- package/dist/notifications.d.ts +134 -2
- package/dist/notifications.d.ts.map +1 -1
- package/dist/observability.d.ts +4 -0
- package/dist/observability.d.ts.map +1 -1
- package/dist/policyGuardrails.d.ts +433 -0
- package/dist/policyGuardrails.d.ts.map +1 -0
- package/dist/policyGuardrails.js +91 -0
- package/dist/policyGuardrails.js.map +1 -0
- package/dist/posturePresets.d.ts +74 -0
- package/dist/posturePresets.d.ts.map +1 -0
- package/dist/posturePresets.js +139 -0
- package/dist/posturePresets.js.map +1 -0
- package/dist/providerVerification.d.ts +64 -0
- package/dist/providerVerification.d.ts.map +1 -0
- package/dist/providerVerification.js +184 -0
- package/dist/providerVerification.js.map +1 -0
- package/dist/providers.d.ts +93 -0
- package/dist/providers.d.ts.map +1 -0
- package/dist/providers.js +176 -0
- package/dist/providers.js.map +1 -0
- package/dist/rulePredicateDsl.d.ts +101 -0
- package/dist/rulePredicateDsl.d.ts.map +1 -0
- package/dist/rulePredicateDsl.js +263 -0
- package/dist/rulePredicateDsl.js.map +1 -0
- package/dist/rulePredicateEval.d.ts +38 -0
- package/dist/rulePredicateEval.d.ts.map +1 -0
- package/dist/rulePredicateEval.js +124 -0
- package/dist/rulePredicateEval.js.map +1 -0
- package/dist/scriptScan.d.ts +162 -0
- package/dist/scriptScan.d.ts.map +1 -0
- package/dist/scriptScan.js +362 -0
- package/dist/scriptScan.js.map +1 -0
- package/dist/secretPatterns.d.ts +43 -0
- package/dist/secretPatterns.d.ts.map +1 -0
- package/dist/secretPatterns.js +73 -0
- package/dist/secretPatterns.js.map +1 -0
- package/dist/skillScan.d.ts +166 -0
- package/dist/skillScan.d.ts.map +1 -0
- package/dist/skillScan.js +398 -0
- package/dist/skillScan.js.map +1 -0
- package/dist/sop.d.ts +188 -9
- package/dist/sop.d.ts.map +1 -1
- package/dist/sop.js +54 -2
- package/dist/sop.js.map +1 -1
- package/dist/sourceProviders.d.ts +41 -0
- package/dist/sourceProviders.d.ts.map +1 -0
- package/dist/sourceProviders.js +48 -0
- package/dist/sourceProviders.js.map +1 -0
- package/dist/sync.d.ts +98 -8
- package/dist/sync.d.ts.map +1 -1
- package/dist/sync.js.map +1 -1
- package/dist/toon.d.ts +80 -0
- package/dist/toon.d.ts.map +1 -0
- package/dist/toon.js +278 -0
- package/dist/toon.js.map +1 -0
- package/dist/usage.d.ts +23 -0
- package/dist/usage.d.ts.map +1 -1
- package/dist/wasmHost.d.ts +58 -0
- package/dist/wasmHost.d.ts.map +1 -0
- package/dist/wasmHost.js +80 -0
- package/dist/wasmHost.js.map +1 -0
- package/dist/workspaceSettings.d.ts +463 -21
- package/dist/workspaceSettings.d.ts.map +1 -1
- package/dist/workspaceSettings.js +86 -1
- package/dist/workspaceSettings.js.map +1 -1
- package/package.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../src/notifications.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../src/notifications.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,WAAW,CAAA;AAE7E,MAAM,MAAM,qBAAqB,GAE7B,kBAAkB;AACpB;;;;;;;;;;;GAWG;GACD,iBAAiB,GACjB,kBAAkB,GAClB,oBAAoB,GACpB,oBAAoB,GACpB,iBAAiB,GACjB,eAAe,GACf,2BAA2B,GAC3B,kBAAkB,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CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,OAAO,CAAA;IACX,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAMD,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B"}
|
package/dist/observability.d.ts
CHANGED
|
@@ -36,10 +36,14 @@ export interface TraceDagNode {
|
|
|
36
36
|
totalCostUsd: number;
|
|
37
37
|
stepCount: number;
|
|
38
38
|
errorCount: number;
|
|
39
|
+
/** 'LEGACY_BUCKET' | 'PROXY_PROCESS' | other — derived, see agent_sessions_resolved */
|
|
40
|
+
sessionKind?: string;
|
|
39
41
|
}
|
|
40
42
|
export interface TraceDagResult {
|
|
41
43
|
traceId: string;
|
|
42
44
|
rootSessionId: string;
|
|
45
|
+
/** The session the requested trace belongs to — what the DAG highlights. */
|
|
46
|
+
currentSessionId: string;
|
|
43
47
|
nodes: TraceDagNode[];
|
|
44
48
|
}
|
|
45
49
|
//# sourceMappingURL=observability.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observability.d.ts","sourceRoot":"","sources":["../src/observability.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qBAAqB,EAAE,MAAM,CAAA;IAC7B,gBAAgB,EAAE,MAAM,CAAA;IACxB,eAAe,EAAE,MAAM,EAAE,CAAA;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,gBAAgB,EAAE,MAAM,CAAA;IACxB,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,gBAAgB,EAAE,CAAA;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,uFAAuF;IACvF,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,MAAM,CAAA;IACrB,4EAA4E;IAC5E,gBAAgB,EAAE,MAAM,CAAA;IACxB,KAAK,EAAE,YAAY,EAAE,CAAA;CACtB"}
|
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wire types for the Policy Clause Ledger (LLD #71): what
|
|
3
|
+
* `/api/v1/policy-guardrails/*` returns, as the control plane, the dashboard
|
|
4
|
+
* page and `intutic guardrails` all read it. The control plane's service
|
|
5
|
+
* imports these rather than declaring its own, so a field cannot drift
|
|
6
|
+
* between the three.
|
|
7
|
+
*
|
|
8
|
+
* camelCase throughout: the routes select through Drizzle column maps, and
|
|
9
|
+
* that is the casing they emit.
|
|
10
|
+
*/
|
|
11
|
+
import type { GuardrailIr } from './guardrailIr.js';
|
|
12
|
+
export declare const GUARDRAIL_STATUSES: readonly ["PROPOSED", "SHADOW", "ENFORCING", "REJECTED", "RETIRED"];
|
|
13
|
+
/**
|
|
14
|
+
* Statuses in which a guardrail's citation is live — the ones conflicts are
|
|
15
|
+
* reported for and the ones that keep the cited document from being written
|
|
16
|
+
* back over (LLD #71, Wave 8). A rejected proposal does not freeze a source.
|
|
17
|
+
*/
|
|
18
|
+
export declare const LIVE_GUARDRAIL_STATUSES: readonly ["PROPOSED", "SHADOW", "ENFORCING"];
|
|
19
|
+
/**
|
|
20
|
+
* A projected front-matter guardrail is served to the proxy as a SOP titled
|
|
21
|
+
* `GUARDRAIL:<pgr> <first line>` (Wave 5). On disk, where the proxy titles a
|
|
22
|
+
* SOP by its file stem, the same guardrail is `guardrail-<pgr>.md` (Wave 9):
|
|
23
|
+
* no colon or space, so the name is legal on every platform, and the stem
|
|
24
|
+
* still names the guardrail so its shadow reports are credited.
|
|
25
|
+
*/
|
|
26
|
+
export declare const GUARDRAIL_SOP_TITLE_PREFIX = "GUARDRAIL:";
|
|
27
|
+
/** The file `intutic guardrails pull` writes for a guardrail, without the `.md`. */
|
|
28
|
+
export declare function guardrailFileStem(guardrailId: string): string;
|
|
29
|
+
/**
|
|
30
|
+
* `GUARDRAIL:pgr_x deny_tools: WebFetch` → `pgr_x`; `guardrail-pgr_x` (a pulled
|
|
31
|
+
* file's stem, what a disk-loaded proxy reports as the title) → `pgr_x`;
|
|
32
|
+
* anything else → null.
|
|
33
|
+
*/
|
|
34
|
+
export declare function guardrailIdFromSopTitle(title: string): string | null;
|
|
35
|
+
export type GuardrailStatus = (typeof GUARDRAIL_STATUSES)[number];
|
|
36
|
+
export declare const GUARDRAIL_TARGETS: readonly ["hook_rule", "sop_front_matter", "wasm_rule"];
|
|
37
|
+
export type GuardrailTarget = (typeof GUARDRAIL_TARGETS)[number];
|
|
38
|
+
export declare const GUARDRAIL_EVENT_TYPES: readonly ["PROPOSED", "SHADOW_APPROVED", "PROMOTED", "REJECTED", "RETIRED", "SOURCE_STALE", "SOURCE_RECONFIRMED", "CITATION_REBOUND", "RENDER_REBOUND"];
|
|
39
|
+
export type GuardrailEventType = (typeof GUARDRAIL_EVENT_TYPES)[number];
|
|
40
|
+
/** The one promotion rule (LLD #71 decision 7), as `GET …/thresholds` reports it. */
|
|
41
|
+
export interface GuardrailThresholds {
|
|
42
|
+
minShadowEvaluations: number;
|
|
43
|
+
maxWouldActRate: number;
|
|
44
|
+
minAdjudicatedFires: number;
|
|
45
|
+
maxAdjudicatedFalsePositiveRate: number;
|
|
46
|
+
}
|
|
47
|
+
export interface GuardrailThresholdsResponse {
|
|
48
|
+
guardrail: GuardrailThresholds;
|
|
49
|
+
wasm: {
|
|
50
|
+
minShadowEvaluations: number;
|
|
51
|
+
maxFalsePositiveRate: number;
|
|
52
|
+
};
|
|
53
|
+
extraction: {
|
|
54
|
+
dailyCap: number;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export interface GuardrailClauseRef {
|
|
58
|
+
clauseId: string;
|
|
59
|
+
quote: string;
|
|
60
|
+
quoteOffset: number;
|
|
61
|
+
passageHash: string;
|
|
62
|
+
passageId: string | null;
|
|
63
|
+
extractor: string;
|
|
64
|
+
}
|
|
65
|
+
export interface GuardrailDocumentRef {
|
|
66
|
+
docId: string;
|
|
67
|
+
title: string;
|
|
68
|
+
provider: string;
|
|
69
|
+
sourceUrl: string | null;
|
|
70
|
+
}
|
|
71
|
+
export interface GuardrailSummary {
|
|
72
|
+
guardrailId: string;
|
|
73
|
+
target: GuardrailTarget;
|
|
74
|
+
status: GuardrailStatus;
|
|
75
|
+
ir: GuardrailIr;
|
|
76
|
+
/** hook_rule: {toolPattern, argPattern?, reason}; sop_front_matter: {lines}; wasm_rule: {source}. */
|
|
77
|
+
rendered: unknown;
|
|
78
|
+
roles: string[];
|
|
79
|
+
scope: string;
|
|
80
|
+
shadowEvaluations: number;
|
|
81
|
+
shadowWouldAct: number;
|
|
82
|
+
enforcingFires: number;
|
|
83
|
+
sourceStale: boolean;
|
|
84
|
+
/** wasm_rule only: the rule candidate this guardrail was handed to on shadow approval (LLD #71, Wave 7). */
|
|
85
|
+
ruleCandidateId: string | null;
|
|
86
|
+
proposedAt: string;
|
|
87
|
+
shadowAt: string | null;
|
|
88
|
+
promotedAt: string | null;
|
|
89
|
+
rejectedReason: string | null;
|
|
90
|
+
clause: GuardrailClauseRef;
|
|
91
|
+
document: GuardrailDocumentRef;
|
|
92
|
+
}
|
|
93
|
+
export interface GuardrailEvent {
|
|
94
|
+
eventId: string;
|
|
95
|
+
event: GuardrailEventType;
|
|
96
|
+
actorId: string | null;
|
|
97
|
+
detail: unknown;
|
|
98
|
+
createdAt: string;
|
|
99
|
+
}
|
|
100
|
+
export interface GuardrailPassageRef {
|
|
101
|
+
passageId: string;
|
|
102
|
+
text: string;
|
|
103
|
+
headingPath: string[];
|
|
104
|
+
retired: boolean;
|
|
105
|
+
}
|
|
106
|
+
export interface GuardrailDetail extends GuardrailSummary {
|
|
107
|
+
/** [{name, passed, detail}] in the order the checks ran. */
|
|
108
|
+
validation: unknown;
|
|
109
|
+
passage: GuardrailPassageRef | null;
|
|
110
|
+
events: GuardrailEvent[];
|
|
111
|
+
}
|
|
112
|
+
export interface GuardrailListFilters {
|
|
113
|
+
status?: GuardrailStatus;
|
|
114
|
+
target?: GuardrailTarget;
|
|
115
|
+
docId?: string;
|
|
116
|
+
limit?: number;
|
|
117
|
+
}
|
|
118
|
+
export interface GuardrailReadiness {
|
|
119
|
+
ready: boolean;
|
|
120
|
+
/** Every unmet condition, in the rule's order; empty when ready. */
|
|
121
|
+
reasons: string[];
|
|
122
|
+
/** The rule never fired in shadow: promotable only with the caller's explicit acknowledgement. */
|
|
123
|
+
neverFired: boolean;
|
|
124
|
+
evaluations: number;
|
|
125
|
+
wouldAct: number;
|
|
126
|
+
wouldActRate: number | null;
|
|
127
|
+
adjudicated: number;
|
|
128
|
+
adjudicatedRequired: number;
|
|
129
|
+
falsePositives: number;
|
|
130
|
+
falsePositiveRate: number | null;
|
|
131
|
+
thresholds: GuardrailThresholds;
|
|
132
|
+
}
|
|
133
|
+
export interface GuardrailReplay {
|
|
134
|
+
source: 'enforcement_log' | 'context_snapshots';
|
|
135
|
+
windowDays: number;
|
|
136
|
+
captured: number;
|
|
137
|
+
fires: number;
|
|
138
|
+
sample: Array<{
|
|
139
|
+
toolName: string;
|
|
140
|
+
at: string;
|
|
141
|
+
excerpt: string;
|
|
142
|
+
}>;
|
|
143
|
+
truncated: boolean;
|
|
144
|
+
/** Keys this replay cannot answer for (`review_before` holds rather than acts). */
|
|
145
|
+
unsupported: string[];
|
|
146
|
+
}
|
|
147
|
+
export type GuardrailConflictKind = 'deny_vs_count' | 'require_vs_forbid' | 'count_limits_differ' | 'hook_contains_vs_not_contains';
|
|
148
|
+
export interface GuardrailConflict {
|
|
149
|
+
kind: GuardrailConflictKind;
|
|
150
|
+
token: string | null;
|
|
151
|
+
a: {
|
|
152
|
+
id: string;
|
|
153
|
+
quote: string;
|
|
154
|
+
};
|
|
155
|
+
b: {
|
|
156
|
+
id: string;
|
|
157
|
+
quote: string;
|
|
158
|
+
};
|
|
159
|
+
detail: string;
|
|
160
|
+
}
|
|
161
|
+
export interface PolicyExtractionRunRef {
|
|
162
|
+
runId: string;
|
|
163
|
+
extractor: string;
|
|
164
|
+
startedAt: string;
|
|
165
|
+
finishedAt: string | null;
|
|
166
|
+
error: string | null;
|
|
167
|
+
}
|
|
168
|
+
export interface PolicyDocumentSummary {
|
|
169
|
+
docId: string;
|
|
170
|
+
title: string;
|
|
171
|
+
provider: string;
|
|
172
|
+
sourceUrl: string | null;
|
|
173
|
+
status: string;
|
|
174
|
+
injectionFlagged: boolean;
|
|
175
|
+
sopId: string | null;
|
|
176
|
+
fetchedAt: string;
|
|
177
|
+
passageCount: number;
|
|
178
|
+
clauseCount: number;
|
|
179
|
+
guardrailCount: number;
|
|
180
|
+
lastRun: PolicyExtractionRunRef | null;
|
|
181
|
+
}
|
|
182
|
+
export interface PolicyPassageRow {
|
|
183
|
+
passageId: string;
|
|
184
|
+
ordinal: number;
|
|
185
|
+
headingPath: string[];
|
|
186
|
+
text: string;
|
|
187
|
+
passageHash: string;
|
|
188
|
+
anchor: unknown;
|
|
189
|
+
tokenIndex: string[];
|
|
190
|
+
}
|
|
191
|
+
export interface PolicyClauseRow {
|
|
192
|
+
clauseId: string;
|
|
193
|
+
passageId: string | null;
|
|
194
|
+
passageHash: string;
|
|
195
|
+
quote: string;
|
|
196
|
+
ir: unknown;
|
|
197
|
+
kind: string;
|
|
198
|
+
status: string;
|
|
199
|
+
extractor: string;
|
|
200
|
+
validation: unknown;
|
|
201
|
+
guardrailId: string | null;
|
|
202
|
+
guardrailStatus: string | null;
|
|
203
|
+
}
|
|
204
|
+
export interface PolicyExtractionRunRow extends PolicyExtractionRunRef {
|
|
205
|
+
clausesProposed: number;
|
|
206
|
+
clausesValid: number;
|
|
207
|
+
clausesRejected: number;
|
|
208
|
+
}
|
|
209
|
+
export interface PolicyDocumentDetail extends PolicyDocumentSummary {
|
|
210
|
+
contentHash: string;
|
|
211
|
+
upstreamVersion: string | null;
|
|
212
|
+
passages: PolicyPassageRow[];
|
|
213
|
+
clauses: PolicyClauseRow[];
|
|
214
|
+
runs: PolicyExtractionRunRow[];
|
|
215
|
+
}
|
|
216
|
+
export interface ExtractDocumentResult {
|
|
217
|
+
docId: string;
|
|
218
|
+
runId: string | null;
|
|
219
|
+
extractor: string;
|
|
220
|
+
skipped: 'no_passages' | 'daily_cap' | 'cap_unavailable' | 'llm_disabled' | null;
|
|
221
|
+
cap: {
|
|
222
|
+
count: number;
|
|
223
|
+
cap: number;
|
|
224
|
+
} | null;
|
|
225
|
+
llmUnavailable: boolean;
|
|
226
|
+
chunks: number;
|
|
227
|
+
proposals: number;
|
|
228
|
+
verbatimQuotes: number;
|
|
229
|
+
valid: number;
|
|
230
|
+
rejected: number;
|
|
231
|
+
malformed: number;
|
|
232
|
+
guardrails: {
|
|
233
|
+
proposed: number;
|
|
234
|
+
rejectedForInjection: number;
|
|
235
|
+
existing: number;
|
|
236
|
+
};
|
|
237
|
+
lifted: {
|
|
238
|
+
clauses: number;
|
|
239
|
+
valid: number;
|
|
240
|
+
errors: string[];
|
|
241
|
+
};
|
|
242
|
+
error: string | null;
|
|
243
|
+
}
|
|
244
|
+
export interface TokenCoverage {
|
|
245
|
+
token: string;
|
|
246
|
+
passages: Array<{
|
|
247
|
+
passageId: string;
|
|
248
|
+
docId: string;
|
|
249
|
+
title: string;
|
|
250
|
+
sourceUrl: string | null;
|
|
251
|
+
headingPath: string[];
|
|
252
|
+
excerpt: string;
|
|
253
|
+
}>;
|
|
254
|
+
guardrails: Array<{
|
|
255
|
+
guardrailId: string;
|
|
256
|
+
clauseId: string;
|
|
257
|
+
passageId: string | null;
|
|
258
|
+
status: string;
|
|
259
|
+
target: string;
|
|
260
|
+
quote: string;
|
|
261
|
+
}>;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* The ledger's two Jaccard lines (LLD #71): passages at or above the overlap
|
|
265
|
+
* line are recorded as OVERLAPS edges, and a retired passage's successor must
|
|
266
|
+
* clear the near-identical line to be recorded as SUPERSEDES. One definition
|
|
267
|
+
* for the ingest that writes the edges and the duplicates query that reads
|
|
268
|
+
* them.
|
|
269
|
+
*/
|
|
270
|
+
export declare const LEDGER_OVERLAP_JACCARD = 0.7;
|
|
271
|
+
export declare const LEDGER_NEAR_IDENTICAL_JACCARD = 0.85;
|
|
272
|
+
/** How far the impact walk follows computed passage edges from its seed. */
|
|
273
|
+
export declare const LEDGER_IMPACT_MAX_DEPTH = 5;
|
|
274
|
+
/**
|
|
275
|
+
* Every edge the ledger names. The first six are foreign keys or hash
|
|
276
|
+
* equalities; OVERLAPS and SUPERSEDES are computed rows that carry their
|
|
277
|
+
* Jaccard arithmetic as `evidence`.
|
|
278
|
+
*
|
|
279
|
+
* - CONTAINS document → passage (document → clause when the cited passage row is gone)
|
|
280
|
+
* - SUPPORTS passage → clause that quotes it
|
|
281
|
+
* - COMPILES_TO clause → guardrail
|
|
282
|
+
* - EMITS guardrail → finding its shadow fires or blocks filed
|
|
283
|
+
* - ADJUDICATED_BY finding → member who marked it true or false positive
|
|
284
|
+
* - APPROVED_BY guardrail → member who moved it (the event is the evidence)
|
|
285
|
+
*/
|
|
286
|
+
export declare const LEDGER_EDGE_TYPES: readonly ["CONTAINS", "SUPPORTS", "COMPILES_TO", "EMITS", "ADJUDICATED_BY", "APPROVED_BY", "OVERLAPS", "SUPERSEDES"];
|
|
287
|
+
export type LedgerEdgeType = (typeof LEDGER_EDGE_TYPES)[number];
|
|
288
|
+
export interface LedgerGraph {
|
|
289
|
+
documents: Array<{
|
|
290
|
+
docId: string;
|
|
291
|
+
title: string;
|
|
292
|
+
provider: string;
|
|
293
|
+
sourceUrl: string | null;
|
|
294
|
+
status: string;
|
|
295
|
+
passageCount: number;
|
|
296
|
+
clauseCount: number;
|
|
297
|
+
}>;
|
|
298
|
+
/** The passages a clause cites or a computed edge touches — not every passage; a document's full count is on its node. */
|
|
299
|
+
passages: Array<{
|
|
300
|
+
passageId: string;
|
|
301
|
+
docId: string;
|
|
302
|
+
ordinal: number;
|
|
303
|
+
headingPath: string[];
|
|
304
|
+
excerpt: string;
|
|
305
|
+
retired: boolean;
|
|
306
|
+
}>;
|
|
307
|
+
clauses: Array<{
|
|
308
|
+
clauseId: string;
|
|
309
|
+
docId: string;
|
|
310
|
+
passageId: string | null;
|
|
311
|
+
kind: string;
|
|
312
|
+
status: string;
|
|
313
|
+
extractor: string;
|
|
314
|
+
quote: string;
|
|
315
|
+
}>;
|
|
316
|
+
guardrails: Array<{
|
|
317
|
+
guardrailId: string;
|
|
318
|
+
clauseId: string;
|
|
319
|
+
status: string;
|
|
320
|
+
target: string;
|
|
321
|
+
}>;
|
|
322
|
+
/** Findings filed as `guardrail:<pgr>`, newest first. */
|
|
323
|
+
findings: Array<{
|
|
324
|
+
findingId: string;
|
|
325
|
+
guardrailId: string;
|
|
326
|
+
outcome: string | null;
|
|
327
|
+
shadowed: boolean;
|
|
328
|
+
at: string;
|
|
329
|
+
}>;
|
|
330
|
+
/** Members who moved a guardrail or adjudicated one of its findings. */
|
|
331
|
+
members: Array<{
|
|
332
|
+
memberId: string;
|
|
333
|
+
displayName: string | null;
|
|
334
|
+
}>;
|
|
335
|
+
edges: Array<{
|
|
336
|
+
from: string;
|
|
337
|
+
to: string;
|
|
338
|
+
type: LedgerEdgeType;
|
|
339
|
+
evidence?: unknown;
|
|
340
|
+
}>;
|
|
341
|
+
truncated: boolean;
|
|
342
|
+
}
|
|
343
|
+
/** What a change to a document or passage reaches: passages within `maxDepth` computed edges, the clauses citing them, their guardrails. */
|
|
344
|
+
export interface LedgerImpact {
|
|
345
|
+
seed: {
|
|
346
|
+
docId: string | null;
|
|
347
|
+
passageId: string | null;
|
|
348
|
+
};
|
|
349
|
+
maxDepth: number;
|
|
350
|
+
passages: Array<{
|
|
351
|
+
passageId: string;
|
|
352
|
+
docId: string;
|
|
353
|
+
title: string;
|
|
354
|
+
depth: number;
|
|
355
|
+
retired: boolean;
|
|
356
|
+
excerpt: string;
|
|
357
|
+
}>;
|
|
358
|
+
clauses: Array<{
|
|
359
|
+
clauseId: string;
|
|
360
|
+
passageId: string;
|
|
361
|
+
docId: string;
|
|
362
|
+
kind: string;
|
|
363
|
+
quote: string;
|
|
364
|
+
depth: number;
|
|
365
|
+
}>;
|
|
366
|
+
guardrails: Array<{
|
|
367
|
+
guardrailId: string;
|
|
368
|
+
clauseId: string;
|
|
369
|
+
status: string;
|
|
370
|
+
target: string;
|
|
371
|
+
sourceStale: boolean;
|
|
372
|
+
ruleCandidateId: string | null;
|
|
373
|
+
depth: number;
|
|
374
|
+
}>;
|
|
375
|
+
truncated: boolean;
|
|
376
|
+
}
|
|
377
|
+
/** Full-text search over live passages (Postgres `websearch_to_tsquery`, English configuration). */
|
|
378
|
+
export interface PassageSearchResult {
|
|
379
|
+
query: string;
|
|
380
|
+
passages: Array<{
|
|
381
|
+
passageId: string;
|
|
382
|
+
docId: string;
|
|
383
|
+
title: string;
|
|
384
|
+
sourceUrl: string | null;
|
|
385
|
+
headingPath: string[];
|
|
386
|
+
excerpt: string;
|
|
387
|
+
rank: number;
|
|
388
|
+
}>;
|
|
389
|
+
}
|
|
390
|
+
export interface LedgerDuplicateSide {
|
|
391
|
+
passageId: string;
|
|
392
|
+
docId: string;
|
|
393
|
+
title: string;
|
|
394
|
+
excerpt: string;
|
|
395
|
+
guardrailIds: string[];
|
|
396
|
+
}
|
|
397
|
+
export interface LedgerDuplicates {
|
|
398
|
+
minJaccard: number;
|
|
399
|
+
/** OVERLAPS edges between live passages at or above `minJaccard`, strongest first. */
|
|
400
|
+
passagePairs: Array<{
|
|
401
|
+
jaccard: number;
|
|
402
|
+
intersection: number;
|
|
403
|
+
union: number;
|
|
404
|
+
nearIdentical: boolean;
|
|
405
|
+
a: LedgerDuplicateSide;
|
|
406
|
+
b: LedgerDuplicateSide;
|
|
407
|
+
}>;
|
|
408
|
+
/** The same canonical rule cited from more than one passage. */
|
|
409
|
+
sameRule: Array<{
|
|
410
|
+
irCanonical: string;
|
|
411
|
+
kind: string;
|
|
412
|
+
clauses: Array<{
|
|
413
|
+
clauseId: string;
|
|
414
|
+
docId: string;
|
|
415
|
+
title: string;
|
|
416
|
+
quote: string;
|
|
417
|
+
guardrailId: string | null;
|
|
418
|
+
guardrailStatus: string | null;
|
|
419
|
+
}>;
|
|
420
|
+
}>;
|
|
421
|
+
}
|
|
422
|
+
/** A candidate's evidence entry that carries a citation (policy-derived WASM candidates, Wave 7). */
|
|
423
|
+
export interface CandidateCitationEvidence {
|
|
424
|
+
citation: {
|
|
425
|
+
guardrailId: string;
|
|
426
|
+
quote: string;
|
|
427
|
+
sourceUrl: string | null;
|
|
428
|
+
passageHash: string;
|
|
429
|
+
documentTitle: string;
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
export declare function isCandidateCitationEvidence(value: unknown): value is CandidateCitationEvidence;
|
|
433
|
+
//# sourceMappingURL=policyGuardrails.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policyGuardrails.d.ts","sourceRoot":"","sources":["../src/policyGuardrails.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,eAAO,MAAM,kBAAkB,qEAAsE,CAAA;AACrG;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,8CAA+C,CAAA;AAEnF;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,eAAe,CAAA;AAEtD,oFAAoF;AACpF,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAKpE;AACD,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEjE,eAAO,MAAM,iBAAiB,yDAA0D,CAAA;AACxF,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEhE,eAAO,MAAM,qBAAqB,yJAWxB,CAAA;AACV,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEvE,qFAAqF;AACrF,MAAM,WAAW,mBAAmB;IAClC,oBAAoB,EAAE,MAAM,CAAA;IAC5B,eAAe,EAAE,MAAM,CAAA;IACvB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,+BAA+B,EAAE,MAAM,CAAA;CACxC;AAED,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,mBAAmB,CAAA;IAC9B,IAAI,EAAE;QAAE,oBAAoB,EAAE,MAAM,CAAC;QAAC,oBAAoB,EAAE,MAAM,CAAA;KAAE,CA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AE,KAAK,CAAC;YAAE,QAAQ,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;YAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAC,CAAA;KAC9I,CAAC,CAAA;CACH;AAED,qGAAqG;AACrG,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE;QACR,WAAW,EAAE,MAAM,CAAA;QACnB,KAAK,EAAE,MAAM,CAAA;QACb,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;QACxB,WAAW,EAAE,MAAM,CAAA;QACnB,aAAa,EAAE,MAAM,CAAA;KACtB,CAAA;CACF;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,yBAAyB,CAI9F"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Wire types for the Policy Clause Ledger (LLD #71): what
|
|
4
|
+
* `/api/v1/policy-guardrails/*` returns, as the control plane, the dashboard
|
|
5
|
+
* page and `intutic guardrails` all read it. The control plane's service
|
|
6
|
+
* imports these rather than declaring its own, so a field cannot drift
|
|
7
|
+
* between the three.
|
|
8
|
+
*
|
|
9
|
+
* camelCase throughout: the routes select through Drizzle column maps, and
|
|
10
|
+
* that is the casing they emit.
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.LEDGER_EDGE_TYPES = exports.LEDGER_IMPACT_MAX_DEPTH = exports.LEDGER_NEAR_IDENTICAL_JACCARD = exports.LEDGER_OVERLAP_JACCARD = exports.GUARDRAIL_EVENT_TYPES = exports.GUARDRAIL_TARGETS = exports.GUARDRAIL_SOP_TITLE_PREFIX = exports.LIVE_GUARDRAIL_STATUSES = exports.GUARDRAIL_STATUSES = void 0;
|
|
14
|
+
exports.guardrailFileStem = guardrailFileStem;
|
|
15
|
+
exports.guardrailIdFromSopTitle = guardrailIdFromSopTitle;
|
|
16
|
+
exports.isCandidateCitationEvidence = isCandidateCitationEvidence;
|
|
17
|
+
exports.GUARDRAIL_STATUSES = ['PROPOSED', 'SHADOW', 'ENFORCING', 'REJECTED', 'RETIRED'];
|
|
18
|
+
/**
|
|
19
|
+
* Statuses in which a guardrail's citation is live — the ones conflicts are
|
|
20
|
+
* reported for and the ones that keep the cited document from being written
|
|
21
|
+
* back over (LLD #71, Wave 8). A rejected proposal does not freeze a source.
|
|
22
|
+
*/
|
|
23
|
+
exports.LIVE_GUARDRAIL_STATUSES = ['PROPOSED', 'SHADOW', 'ENFORCING'];
|
|
24
|
+
/**
|
|
25
|
+
* A projected front-matter guardrail is served to the proxy as a SOP titled
|
|
26
|
+
* `GUARDRAIL:<pgr> <first line>` (Wave 5). On disk, where the proxy titles a
|
|
27
|
+
* SOP by its file stem, the same guardrail is `guardrail-<pgr>.md` (Wave 9):
|
|
28
|
+
* no colon or space, so the name is legal on every platform, and the stem
|
|
29
|
+
* still names the guardrail so its shadow reports are credited.
|
|
30
|
+
*/
|
|
31
|
+
exports.GUARDRAIL_SOP_TITLE_PREFIX = 'GUARDRAIL:';
|
|
32
|
+
/** The file `intutic guardrails pull` writes for a guardrail, without the `.md`. */
|
|
33
|
+
function guardrailFileStem(guardrailId) {
|
|
34
|
+
return `guardrail-${guardrailId}`;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* `GUARDRAIL:pgr_x deny_tools: WebFetch` → `pgr_x`; `guardrail-pgr_x` (a pulled
|
|
38
|
+
* file's stem, what a disk-loaded proxy reports as the title) → `pgr_x`;
|
|
39
|
+
* anything else → null.
|
|
40
|
+
*/
|
|
41
|
+
function guardrailIdFromSopTitle(title) {
|
|
42
|
+
const served = title.match(/^GUARDRAIL:([A-Za-z0-9_-]{4,64})(?:\s|$)/);
|
|
43
|
+
if (served)
|
|
44
|
+
return served[1];
|
|
45
|
+
const stem = title.match(/^guardrail-([A-Za-z0-9_-]{4,64})$/);
|
|
46
|
+
return stem ? stem[1] : null;
|
|
47
|
+
}
|
|
48
|
+
exports.GUARDRAIL_TARGETS = ['hook_rule', 'sop_front_matter', 'wasm_rule'];
|
|
49
|
+
exports.GUARDRAIL_EVENT_TYPES = [
|
|
50
|
+
'PROPOSED',
|
|
51
|
+
'SHADOW_APPROVED',
|
|
52
|
+
'PROMOTED',
|
|
53
|
+
'REJECTED',
|
|
54
|
+
'RETIRED',
|
|
55
|
+
'SOURCE_STALE',
|
|
56
|
+
'SOURCE_RECONFIRMED',
|
|
57
|
+
'CITATION_REBOUND',
|
|
58
|
+
/** The stored render was recomputed by the current renderer (TD-478); shadow evidence gathered under the old render was reset. */
|
|
59
|
+
'RENDER_REBOUND',
|
|
60
|
+
];
|
|
61
|
+
/**
|
|
62
|
+
* The ledger's two Jaccard lines (LLD #71): passages at or above the overlap
|
|
63
|
+
* line are recorded as OVERLAPS edges, and a retired passage's successor must
|
|
64
|
+
* clear the near-identical line to be recorded as SUPERSEDES. One definition
|
|
65
|
+
* for the ingest that writes the edges and the duplicates query that reads
|
|
66
|
+
* them.
|
|
67
|
+
*/
|
|
68
|
+
exports.LEDGER_OVERLAP_JACCARD = 0.7;
|
|
69
|
+
exports.LEDGER_NEAR_IDENTICAL_JACCARD = 0.85;
|
|
70
|
+
/** How far the impact walk follows computed passage edges from its seed. */
|
|
71
|
+
exports.LEDGER_IMPACT_MAX_DEPTH = 5;
|
|
72
|
+
/**
|
|
73
|
+
* Every edge the ledger names. The first six are foreign keys or hash
|
|
74
|
+
* equalities; OVERLAPS and SUPERSEDES are computed rows that carry their
|
|
75
|
+
* Jaccard arithmetic as `evidence`.
|
|
76
|
+
*
|
|
77
|
+
* - CONTAINS document → passage (document → clause when the cited passage row is gone)
|
|
78
|
+
* - SUPPORTS passage → clause that quotes it
|
|
79
|
+
* - COMPILES_TO clause → guardrail
|
|
80
|
+
* - EMITS guardrail → finding its shadow fires or blocks filed
|
|
81
|
+
* - ADJUDICATED_BY finding → member who marked it true or false positive
|
|
82
|
+
* - APPROVED_BY guardrail → member who moved it (the event is the evidence)
|
|
83
|
+
*/
|
|
84
|
+
exports.LEDGER_EDGE_TYPES = ['CONTAINS', 'SUPPORTS', 'COMPILES_TO', 'EMITS', 'ADJUDICATED_BY', 'APPROVED_BY', 'OVERLAPS', 'SUPERSEDES'];
|
|
85
|
+
function isCandidateCitationEvidence(value) {
|
|
86
|
+
if (!value || typeof value !== 'object')
|
|
87
|
+
return false;
|
|
88
|
+
const c = value.citation;
|
|
89
|
+
return !!c && typeof c === 'object' && typeof c.quote === 'string' && typeof c.guardrailId === 'string';
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=policyGuardrails.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policyGuardrails.js","sourceRoot":"","sources":["../src/policyGuardrails.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAsBH,8CAEC;AAOD,0DAKC;AAyTD,kEAIC;AA7VY,QAAA,kBAAkB,GAAG,CAAC,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,CAAU,CAAA;AACrG;;;;GAIG;AACU,QAAA,uBAAuB,GAAG,CAAC,UAAU,EAAE,QAAQ,EAAE,WAAW,CAAU,CAAA;AAEnF;;;;;;GAMG;AACU,QAAA,0BAA0B,GAAG,YAAY,CAAA;AAEtD,oFAAoF;AACpF,SAAgB,iBAAiB,CAAC,WAAmB;IACnD,OAAO,aAAa,WAAW,EAAE,CAAA;AACnC,CAAC;AAED;;;;GAIG;AACH,SAAgB,uBAAuB,CAAC,KAAa;IACnD,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAA;IACtE,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC,CAAC,CAAE,CAAA;IAC7B,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAA;IAC7D,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,IAAI,CAAA;AAC/B,CAAC;AAGY,QAAA,iBAAiB,GAAG,CAAC,WAAW,EAAE,kBAAkB,EAAE,WAAW,CAAU,CAAA;AAG3E,QAAA,qBAAqB,GAAG;IACnC,UAAU;IACV,iBAAiB;IACjB,UAAU;IACV,UAAU;IACV,SAAS;IACT,cAAc;IACd,oBAAoB;IACpB,kBAAkB;IAClB,kIAAkI;IAClI,gBAAgB;CACR,CAAA;AA+MV;;;;;;GAMG;AACU,QAAA,sBAAsB,GAAG,GAAG,CAAA;AAC5B,QAAA,6BAA6B,GAAG,IAAI,CAAA;AAEjD,4EAA4E;AAC/D,QAAA,uBAAuB,GAAG,CAAC,CAAA;AAExC;;;;;;;;;;;GAWG;AACU,QAAA,iBAAiB,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,CAAU,CAAA;AAgErJ,SAAgB,2BAA2B,CAAC,KAAc;IACxD,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAA;IACrD,MAAM,CAAC,GAAI,KAAgC,CAAC,QAAQ,CAAA;IACpD,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAQ,CAAyB,CAAC,KAAK,KAAK,QAAQ,IAAI,OAAQ,CAA+B,CAAC,WAAW,KAAK,QAAQ,CAAA;AACjK,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Posture presets — named bundles over knobs that already reach enforcement.
|
|
3
|
+
*
|
|
4
|
+
* A posture is one decision ("how should governance treat this workspace?")
|
|
5
|
+
* expressed over several settings a user would otherwise have to correlate by
|
|
6
|
+
* hand. Every key a preset writes has a verified consumer TODAY:
|
|
7
|
+
*
|
|
8
|
+
* - `featureFlags.*` sync to `workspace:feature_flags:{ws}` in Valkey on every
|
|
9
|
+
* settings write, and the proxy reads them per request (`store/valkey.rs`).
|
|
10
|
+
* - `bypassEnforcementTier` drives the sync-daemon's drift watcher.
|
|
11
|
+
* - `mcpProxyFailBehavior` decides whether a broken MCP proxy fails open or
|
|
12
|
+
* closed.
|
|
13
|
+
* - `featureFlags.ff_sql_drop_strict_block` is read by `GET
|
|
14
|
+
* /api/v1/policy/resolve` and applied by the sync daemon's
|
|
15
|
+
* `buildSnapshotRules` (Wave 7, audit-remediation) to promote the hook
|
|
16
|
+
* gate's `destructive.sql_drop` rule from warn to block.
|
|
17
|
+
*
|
|
18
|
+
* A preset key without a consumer would make the posture selector the exact
|
|
19
|
+
* inert control this product exists to remove, so adding one requires naming
|
|
20
|
+
* its reader here.
|
|
21
|
+
*
|
|
22
|
+
* Presets are DATA, applied through the same settings pipeline as a manual
|
|
23
|
+
* PUT — same merge semantics, same Valkey sync, same audit surface. Applying
|
|
24
|
+
* one records its name; editing an underlying knob afterwards clears it,
|
|
25
|
+
* because a posture that no longer matches its knobs is a label lying about
|
|
26
|
+
* the configuration.
|
|
27
|
+
*/
|
|
28
|
+
export interface PosturePreset {
|
|
29
|
+
name: string;
|
|
30
|
+
title: string;
|
|
31
|
+
description: string;
|
|
32
|
+
/** Scalar settings keys, merged shallowly. */
|
|
33
|
+
settings: Record<string, string | boolean>;
|
|
34
|
+
/** Feature flags, merged one level deeper — like the PUT route does. */
|
|
35
|
+
featureFlags: Record<string, boolean>;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Security postures: how enforcement behaves when a guard fires.
|
|
39
|
+
*/
|
|
40
|
+
export declare const SECURITY_POSTURES: readonly PosturePreset[];
|
|
41
|
+
/**
|
|
42
|
+
* Cost postures: how aggressively the workspace pursues savings.
|
|
43
|
+
*
|
|
44
|
+
* Deliberately conservative about what "savings" may claim: routing quality is
|
|
45
|
+
* guarded against malformed/truncated/unusable responses (the Response
|
|
46
|
+
* Integrity signal), not against worse-but-well-formed ones — so the
|
|
47
|
+
* aggressive posture is named for what it does, not "no quality loss".
|
|
48
|
+
*/
|
|
49
|
+
export declare const COST_POSTURES: readonly PosturePreset[];
|
|
50
|
+
export type PostureKind = 'security' | 'cost';
|
|
51
|
+
/** Look up a preset, or nothing — the route turns nothing into a 400. */
|
|
52
|
+
export declare function findPosture(kind: PostureKind, name: string): PosturePreset | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* One captured pre-image, as the gate writes it and the CLI reads it.
|
|
55
|
+
*
|
|
56
|
+
* Declared once and imported by both sides deliberately. The writer is an
|
|
57
|
+
* emitted JS string in the sync daemon and the reader is a CLI command in a
|
|
58
|
+
* different package — two hand-kept copies of a record format across a
|
|
59
|
+
* package boundary is precisely how a manifest starts describing restores it
|
|
60
|
+
* cannot perform.
|
|
61
|
+
*/
|
|
62
|
+
export interface PreImageEntry {
|
|
63
|
+
id: string;
|
|
64
|
+
capturedAt: string;
|
|
65
|
+
tool: string;
|
|
66
|
+
/** Absolute, resolved, and inside the workspace root — the gate enforces all three. */
|
|
67
|
+
target: string;
|
|
68
|
+
/** False when the flagged call CREATED the file: restoring it means deleting it. */
|
|
69
|
+
existed: boolean;
|
|
70
|
+
bytes: number;
|
|
71
|
+
ruleId: string;
|
|
72
|
+
workspaceId: string;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=posturePresets.d.ts.map
|