@intutic/shared-types 1.10.0 → 1.10.1
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 +157 -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 +7204 -0
- package/dist/modelCatalog.generated.d.ts.map +1 -0
- package/dist/modelCatalog.generated.js +576 -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
package/dist/sop.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @module
|
|
11
11
|
*/
|
|
12
|
-
import type { ChangeClassification, ComplexityTier, RiskLevel, SopLifecycleState } from './enums.js';
|
|
12
|
+
import type { ChangeClassification, ComplexityTier, RiskLevel, SopLifecycleState, PlanLifecycleState, PlanExecutionOutcome } from './enums.js';
|
|
13
13
|
/**
|
|
14
14
|
* A Standard Operating Procedure in the registry.
|
|
15
15
|
*
|
|
@@ -54,6 +54,80 @@ export interface Sop {
|
|
|
54
54
|
externalId?: string;
|
|
55
55
|
/** Version counter for optimistic locking. */
|
|
56
56
|
versionCounter?: number;
|
|
57
|
+
/**
|
|
58
|
+
* How many times this SOP has been evaluated in shadow — non-zero only for
|
|
59
|
+
* HYPOTHESIZED/REFINED SOPs, per `ENFORCEMENT_BY_STATE`. See
|
|
60
|
+
* `sopShadowService.ts`'s `sopPromotionReadiness()` for what to do with it.
|
|
61
|
+
*/
|
|
62
|
+
shadowEvaluations?: number;
|
|
63
|
+
/** Of `shadowEvaluations`, how many the SOP would have acted on. */
|
|
64
|
+
shadowWouldBlock?: number;
|
|
65
|
+
/**
|
|
66
|
+
* Result of the most recent `intutic sops status` comparison that matched
|
|
67
|
+
* this SOP by title: 'in-sync' | 'local-ahead' | 'remote-ahead' |
|
|
68
|
+
* 'diverged'. Undefined means no drift check has ever been reported.
|
|
69
|
+
*/
|
|
70
|
+
gitDriftStatus?: string;
|
|
71
|
+
/** When `gitDriftStatus` was last reported. Undefined alongside it. */
|
|
72
|
+
gitDriftCheckedAt?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Where this SOP's text came from, when it came from somewhere. See
|
|
75
|
+
* {@link SopProvenance}. Absent for SOPs authored in the product.
|
|
76
|
+
*/
|
|
77
|
+
provenance?: SopProvenance;
|
|
78
|
+
/**
|
|
79
|
+
* Whether the compiled SSL graph the enforcer reads matches this markdown
|
|
80
|
+
* (interview-audit closeout Wave 3). `compiled`: a graph exists and matches.
|
|
81
|
+
* `stale`: a graph exists but the last recompile failed, so it describes an
|
|
82
|
+
* earlier version of the text (`provenance.stale`). `uncompiled`: no graph
|
|
83
|
+
* at all — the SOP would enforce nothing if promoted. Derived on read from
|
|
84
|
+
* `ssl_graph_json` and `provenance`; the raw graph never crosses the wire.
|
|
85
|
+
*/
|
|
86
|
+
sslCompileState?: SslCompileState;
|
|
87
|
+
}
|
|
88
|
+
export type SslCompileState = 'compiled' | 'stale' | 'uncompiled';
|
|
89
|
+
/**
|
|
90
|
+
* The typed shape of `sop_registry.provenance` (jsonb).
|
|
91
|
+
*
|
|
92
|
+
* Before LLD #71 the column carried exactly one key, `stale`, written by the
|
|
93
|
+
* connector sync and the SOP service when an SSL recompile failed and the
|
|
94
|
+
* previous good graph was kept, and read by `sopLifecycleService.ts`'s
|
|
95
|
+
* REFINED → VALIDATED gate. That contract is unchanged: the gate reads only
|
|
96
|
+
* `stale`, and `sopValidatedGate.test.ts` pins that other keys are
|
|
97
|
+
* non-blocking.
|
|
98
|
+
*
|
|
99
|
+
* `source` is written by the connector sync for every synced SOP. It is the
|
|
100
|
+
* document-level half of a citation — the passage-level half lives in
|
|
101
|
+
* `policy_passages` — and the reason a synced SOP can finally render a link
|
|
102
|
+
* back to the page it came from.
|
|
103
|
+
*/
|
|
104
|
+
export interface SopProvenance {
|
|
105
|
+
/** The compiled SSL graph describes an earlier version of the markdown. */
|
|
106
|
+
stale?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Set on an enforced (VALIDATED) SOP when its upstream document changed and
|
|
109
|
+
* a DRAFT successor was created instead of overwriting the enforced text.
|
|
110
|
+
* Cleared when the successor is promoted (which deactivates this row).
|
|
111
|
+
*/
|
|
112
|
+
upstreamChanged?: boolean;
|
|
113
|
+
source?: SopProvenanceSource;
|
|
114
|
+
}
|
|
115
|
+
/** Document-level provenance for a synced SOP. */
|
|
116
|
+
export interface SopProvenanceSource {
|
|
117
|
+
/** One of `SOURCE_PROVIDERS` (plus `upload`). */
|
|
118
|
+
provider: string;
|
|
119
|
+
/** `policy_source_documents.doc_id`. */
|
|
120
|
+
docId: string;
|
|
121
|
+
/** Provider-native id: Notion page id, Confluence page id, GitHub path, Drive file id. */
|
|
122
|
+
externalId: string;
|
|
123
|
+
/** Deep link to the upstream document, or null when the provider has none (upload). */
|
|
124
|
+
sourceUrl: string | null;
|
|
125
|
+
/** Provider-native version marker (Notion last_edited_time, Confluence version number, GitHub blob sha), or null. */
|
|
126
|
+
upstreamVersion: string | null;
|
|
127
|
+
/** SHA-256 of the ingested markdown at fetch time — the same key `sop_content_blocks` uses. */
|
|
128
|
+
contentHash: string;
|
|
129
|
+
/** ISO timestamp of the fetch that produced this text. */
|
|
130
|
+
fetchedAt: string;
|
|
57
131
|
}
|
|
58
132
|
/**
|
|
59
133
|
* A proof tree produced by the SSL bottom-up synthesis pipeline.
|
|
@@ -129,6 +203,18 @@ export interface SopHealthMetrics {
|
|
|
129
203
|
lastEditAt: string | null;
|
|
130
204
|
/** Number of matches in the last 30 days. */
|
|
131
205
|
matchCount30d: number;
|
|
206
|
+
/**
|
|
207
|
+
* Number of SSL scheduling-layer evaluations this SOP was a candidate in
|
|
208
|
+
* over the last 30 days, matched or not (migration 171). The denominator
|
|
209
|
+
* for `activationRate30d`; without it a SOP whose triggers can never match
|
|
210
|
+
* reads the same as one nobody has evaluated.
|
|
211
|
+
*/
|
|
212
|
+
evaluationCount30d: number;
|
|
213
|
+
/**
|
|
214
|
+
* `matchCount30d / evaluationCount30d`, or `null` when nothing evaluated
|
|
215
|
+
* the SOP — never 0, which would read as "evaluated and never matched".
|
|
216
|
+
*/
|
|
217
|
+
activationRate30d: number | null;
|
|
132
218
|
/** Average compliance score across recent traces (0.0–1.0). */
|
|
133
219
|
avgCompliance: number;
|
|
134
220
|
/** Number of behavioral drift events detected. */
|
|
@@ -137,6 +223,19 @@ export interface SopHealthMetrics {
|
|
|
137
223
|
totalCostUsd: number;
|
|
138
224
|
/** Whether this SOP is stale (no matches in SOP_STALENESS_DAYS). */
|
|
139
225
|
isStale: boolean;
|
|
226
|
+
/**
|
|
227
|
+
* Most recent `godel_probe_results` row for this SOP, if any has ever been
|
|
228
|
+
* recorded (manual probe or a gate-triggered score — see
|
|
229
|
+
* `godelScoreService.recordGodelScore`). `null` when none exists yet.
|
|
230
|
+
*/
|
|
231
|
+
godelScore?: {
|
|
232
|
+
aggregateScore: number;
|
|
233
|
+
categoryScores: Record<string, {
|
|
234
|
+
score: number;
|
|
235
|
+
rationale: string;
|
|
236
|
+
}> | Record<string, number>;
|
|
237
|
+
evaluatedAt: string;
|
|
238
|
+
} | null;
|
|
140
239
|
}
|
|
141
240
|
/**
|
|
142
241
|
* A queued item in the Dream Cycle processing pipeline.
|
|
@@ -251,9 +350,41 @@ export declare const VALID_SOP_TRANSITIONS: ReadonlyArray<{
|
|
|
251
350
|
description: string;
|
|
252
351
|
}>;
|
|
253
352
|
/**
|
|
254
|
-
* Maps lifecycle state to enforcement
|
|
353
|
+
* Maps lifecycle state to what enforcement **actually happens** today.
|
|
354
|
+
*
|
|
355
|
+
* This is rendered to the operator in the SOP transition dialog
|
|
356
|
+
* (`SopDetailDrawer.tsx`), which is its only consumer — so it is a promise made
|
|
357
|
+
* in the UI at the moment someone changes a state, and it must describe the
|
|
358
|
+
* system rather than the design.
|
|
359
|
+
*
|
|
360
|
+
* ## History (TD-277)
|
|
361
|
+
*
|
|
362
|
+
* This value has been wrong in both directions. It first said
|
|
363
|
+
* `HYPOTHESIZED: 'SHADOW'` and `REFINED: 'SHADOW'` while nothing evaluated
|
|
364
|
+
* either state at all — no gate consulted them, nothing recorded what either
|
|
365
|
+
* would have done, and `VALID_SOP_TRANSITIONS`' own "Refine based on shadow
|
|
366
|
+
* results" had no shadow results to refine from. That was corrected to
|
|
367
|
+
* `ADVISORY`: honest, since the SOP text is synced into the agent's
|
|
368
|
+
* governance file and does influence it, but no gate stops anything and
|
|
369
|
+
* nothing is measured.
|
|
370
|
+
*
|
|
371
|
+
* `SHADOW` is reinstated here because that is no longer true. Every
|
|
372
|
+
* finalized judge call (`routes/judge.ts`'s `judgeShadowSops`, fired
|
|
373
|
+
* fire-and-forget so it can never add latency to or fail the real verdict)
|
|
374
|
+
* evaluates the workspace's HYPOTHESIZED and REFINED SOPs against the same
|
|
375
|
+
* response the VALIDATED set is judged against, and records `would_act` into
|
|
376
|
+
* `sop_registry.shadow_evaluations` / `shadow_would_block` (migration 146) —
|
|
377
|
+
* the same counted-evidence shape `rule_candidates` uses for WASM rules. A
|
|
378
|
+
* human deciding a HYPOTHESIZED/REFINED → VALIDATED transition can read that
|
|
379
|
+
* evidence via `sopPromotionReadiness()` in `sopShadowService.ts` before
|
|
380
|
+
* deciding.
|
|
381
|
+
*
|
|
382
|
+
* `sopLifecycleDeployment.test.ts` used to assert `SHADOW` must never appear
|
|
383
|
+
* in this map "while no shadow evaluation of SOPs exists" — this doc comment
|
|
384
|
+
* and the citations above are what makes that condition false; the test now
|
|
385
|
+
* asserts the reverse.
|
|
255
386
|
*/
|
|
256
|
-
export declare const ENFORCEMENT_BY_STATE: Record<SopLifecycleState, 'NONE' | 'SHADOW' | 'ACTIVE'>;
|
|
387
|
+
export declare const ENFORCEMENT_BY_STATE: Record<SopLifecycleState, 'NONE' | 'ADVISORY' | 'SHADOW' | 'ACTIVE'>;
|
|
257
388
|
/** Edge types in the SOP dependency graph. */
|
|
258
389
|
export type SopEdgeType = 'DEPENDS_ON' | 'DERIVES_FROM' | 'VALIDATES';
|
|
259
390
|
/** An edge in the SOP dependency graph. */
|
|
@@ -292,6 +423,8 @@ export interface PlanDeviation {
|
|
|
292
423
|
expectedTool?: string;
|
|
293
424
|
actualTool?: string;
|
|
294
425
|
details?: string;
|
|
426
|
+
/** When this deviation was recorded. Set by recordDeviation, not the caller. */
|
|
427
|
+
detectedAt?: string;
|
|
295
428
|
}
|
|
296
429
|
/** Adherence score for a stored plan. */
|
|
297
430
|
export interface PlanAdherenceScore {
|
|
@@ -301,6 +434,22 @@ export interface PlanAdherenceScore {
|
|
|
301
434
|
deviationCount: number;
|
|
302
435
|
adherencePercent: number;
|
|
303
436
|
}
|
|
437
|
+
/**
|
|
438
|
+
* The valid lifecycle transitions for a stored plan.
|
|
439
|
+
*
|
|
440
|
+
* REJECTED is reachable only from PENDING_APPROVAL — a plan denied before
|
|
441
|
+
* execution ever starts. COMPLETED (via a closure action) is reachable
|
|
442
|
+
* from every non-terminal state, since a plan can be closed with or
|
|
443
|
+
* without ever having been formally approved, and with or without a
|
|
444
|
+
* deviation ever having flipped it to EXECUTING.
|
|
445
|
+
*
|
|
446
|
+
* @see HLD §3.4.1 — Stored plan compliance trail
|
|
447
|
+
*/
|
|
448
|
+
export declare const VALID_PLAN_TRANSITIONS: ReadonlyArray<{
|
|
449
|
+
from: PlanLifecycleState;
|
|
450
|
+
to: PlanLifecycleState;
|
|
451
|
+
description: string;
|
|
452
|
+
}>;
|
|
304
453
|
/** A stored plan artifact. */
|
|
305
454
|
export interface StoredPlan {
|
|
306
455
|
planId: string;
|
|
@@ -309,12 +458,18 @@ export interface StoredPlan {
|
|
|
309
458
|
createdBy: string;
|
|
310
459
|
approvedBy: string | null;
|
|
311
460
|
approvalTimestamp: string | null;
|
|
461
|
+
approvalRationale: string | null;
|
|
462
|
+
rejectedBy: string | null;
|
|
463
|
+
rejectedAt: string | null;
|
|
464
|
+
rejectionRationale: string | null;
|
|
465
|
+
closedBy: string | null;
|
|
466
|
+
closedAt: string | null;
|
|
467
|
+
closureRationale: string | null;
|
|
312
468
|
harnessType: string;
|
|
313
|
-
lifecycleState:
|
|
469
|
+
lifecycleState: PlanLifecycleState;
|
|
314
470
|
steps: Record<string, unknown>[];
|
|
315
|
-
executionOutcome:
|
|
471
|
+
executionOutcome: PlanExecutionOutcome | null;
|
|
316
472
|
deviationLog: PlanDeviation[];
|
|
317
|
-
approvalRationale: string | null;
|
|
318
473
|
}
|
|
319
474
|
/** Recommendation types from decision mining analysis. */
|
|
320
475
|
export type DecisionRecommendation = 'THRESHOLD_RELAXATION' | 'AUTO_KILL_UPGRADE' | 'SOP_REFINEMENT' | 'NO_ACTION';
|
|
@@ -350,6 +505,8 @@ export interface SopSummary {
|
|
|
350
505
|
lifecycleState: SopLifecycleState | string;
|
|
351
506
|
riskTier: RiskLevel | string;
|
|
352
507
|
complexityTier: ComplexityTier | string;
|
|
508
|
+
/** Whether the compiled SSL graph matches the markdown; see `Sop.sslCompileState`. */
|
|
509
|
+
sslCompileState?: SslCompileState;
|
|
353
510
|
contentHash?: string;
|
|
354
511
|
isActive?: boolean;
|
|
355
512
|
createdAt?: string;
|
|
@@ -374,10 +531,32 @@ export interface DecisionEntry {
|
|
|
374
531
|
entry_id: string;
|
|
375
532
|
session_id: string;
|
|
376
533
|
workspace_id: string;
|
|
377
|
-
|
|
378
|
-
|
|
534
|
+
/**
|
|
535
|
+
* `jsonb`, so an object — not a string.
|
|
536
|
+
*
|
|
537
|
+
* These two were typed as `string` and never were one. `recordDecision`
|
|
538
|
+
* writes structure into both columns, and the dashboard already branches on
|
|
539
|
+
* `typeof … === 'string'` at runtime, which is the tell: the code knew the
|
|
540
|
+
* type was wrong and worked around it instead of correcting it. `unknown`
|
|
541
|
+
* rather than a concrete shape because two producers write different ones —
|
|
542
|
+
* a review hold writes `{tool, source}`, and an output-DLP substitution
|
|
543
|
+
* writes `{name, arguments}`.
|
|
544
|
+
*/
|
|
545
|
+
original_tool_call: unknown;
|
|
546
|
+
/**
|
|
547
|
+
* The corrected call, when one exists. `null` for a review hold, which stops
|
|
548
|
+
* an action without proposing a replacement — see
|
|
549
|
+
* `POST /api/v1/decisions`.
|
|
550
|
+
*/
|
|
551
|
+
hijacked_tool_call: unknown;
|
|
552
|
+
/** What happened, as opposed to `status`, which is where review got to. */
|
|
553
|
+
outcome?: string;
|
|
554
|
+
/** The trace this decision came from. Null when there is nothing to link. */
|
|
555
|
+
trace_id?: string | null;
|
|
379
556
|
rationale: string;
|
|
380
|
-
status: 'PENDING_REVIEW' | 'APPROVED' | 'REJECTED' | 'PROMOTED'
|
|
557
|
+
status: 'PENDING_REVIEW' | 'APPROVED' | 'REJECTED' | 'PROMOTED'
|
|
558
|
+
/** Recorded, not pending: the proxy already substituted the call. */
|
|
559
|
+
| 'ENFORCED' | string;
|
|
381
560
|
created_at: string | null;
|
|
382
561
|
}
|
|
383
562
|
export interface DecisionListResult {
|
package/dist/sop.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sop.d.ts","sourceRoot":"","sources":["../src/sop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,oBAAoB,EACpB,cAAc,EACd,SAAS,EACT,iBAAiB,EAClB,MAAM,YAAY,CAAA;AAInB;;;;;;;;GAQG;AACH,MAAM,WAAW,G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B,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EACF,gBAAgB,GAChB,UAAU,GACV,UAAU,GACV,UAAU;IACZ,qEAAqE;OACnE,UAAU,GACV,MAAM,CAAA;IACV,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,aAAa,EAAE,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;CACd"}
|
package/dist/sop.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* @module
|
|
12
12
|
*/
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.ENFORCEMENT_BY_STATE = exports.VALID_SOP_TRANSITIONS = void 0;
|
|
14
|
+
exports.VALID_PLAN_TRANSITIONS = exports.ENFORCEMENT_BY_STATE = exports.VALID_SOP_TRANSITIONS = void 0;
|
|
15
15
|
/**
|
|
16
16
|
* The 10 valid lifecycle transitions in the 7-state FSM.
|
|
17
17
|
*
|
|
@@ -30,7 +30,39 @@ exports.VALID_SOP_TRANSITIONS = [
|
|
|
30
30
|
{ from: 'VALIDATED', to: 'PENDING_REVIEW', description: 'Cascade invalidation triggers re-review' },
|
|
31
31
|
];
|
|
32
32
|
/**
|
|
33
|
-
* Maps lifecycle state to enforcement
|
|
33
|
+
* Maps lifecycle state to what enforcement **actually happens** today.
|
|
34
|
+
*
|
|
35
|
+
* This is rendered to the operator in the SOP transition dialog
|
|
36
|
+
* (`SopDetailDrawer.tsx`), which is its only consumer — so it is a promise made
|
|
37
|
+
* in the UI at the moment someone changes a state, and it must describe the
|
|
38
|
+
* system rather than the design.
|
|
39
|
+
*
|
|
40
|
+
* ## History (TD-277)
|
|
41
|
+
*
|
|
42
|
+
* This value has been wrong in both directions. It first said
|
|
43
|
+
* `HYPOTHESIZED: 'SHADOW'` and `REFINED: 'SHADOW'` while nothing evaluated
|
|
44
|
+
* either state at all — no gate consulted them, nothing recorded what either
|
|
45
|
+
* would have done, and `VALID_SOP_TRANSITIONS`' own "Refine based on shadow
|
|
46
|
+
* results" had no shadow results to refine from. That was corrected to
|
|
47
|
+
* `ADVISORY`: honest, since the SOP text is synced into the agent's
|
|
48
|
+
* governance file and does influence it, but no gate stops anything and
|
|
49
|
+
* nothing is measured.
|
|
50
|
+
*
|
|
51
|
+
* `SHADOW` is reinstated here because that is no longer true. Every
|
|
52
|
+
* finalized judge call (`routes/judge.ts`'s `judgeShadowSops`, fired
|
|
53
|
+
* fire-and-forget so it can never add latency to or fail the real verdict)
|
|
54
|
+
* evaluates the workspace's HYPOTHESIZED and REFINED SOPs against the same
|
|
55
|
+
* response the VALIDATED set is judged against, and records `would_act` into
|
|
56
|
+
* `sop_registry.shadow_evaluations` / `shadow_would_block` (migration 146) —
|
|
57
|
+
* the same counted-evidence shape `rule_candidates` uses for WASM rules. A
|
|
58
|
+
* human deciding a HYPOTHESIZED/REFINED → VALIDATED transition can read that
|
|
59
|
+
* evidence via `sopPromotionReadiness()` in `sopShadowService.ts` before
|
|
60
|
+
* deciding.
|
|
61
|
+
*
|
|
62
|
+
* `sopLifecycleDeployment.test.ts` used to assert `SHADOW` must never appear
|
|
63
|
+
* in this map "while no shadow evaluation of SOPs exists" — this doc comment
|
|
64
|
+
* and the citations above are what makes that condition false; the test now
|
|
65
|
+
* asserts the reverse.
|
|
34
66
|
*/
|
|
35
67
|
exports.ENFORCEMENT_BY_STATE = {
|
|
36
68
|
DRAFT: 'NONE',
|
|
@@ -41,4 +73,24 @@ exports.ENFORCEMENT_BY_STATE = {
|
|
|
41
73
|
VALIDATED: 'ACTIVE',
|
|
42
74
|
INVALIDATED: 'NONE',
|
|
43
75
|
};
|
|
76
|
+
/**
|
|
77
|
+
* The valid lifecycle transitions for a stored plan.
|
|
78
|
+
*
|
|
79
|
+
* REJECTED is reachable only from PENDING_APPROVAL — a plan denied before
|
|
80
|
+
* execution ever starts. COMPLETED (via a closure action) is reachable
|
|
81
|
+
* from every non-terminal state, since a plan can be closed with or
|
|
82
|
+
* without ever having been formally approved, and with or without a
|
|
83
|
+
* deviation ever having flipped it to EXECUTING.
|
|
84
|
+
*
|
|
85
|
+
* @see HLD §3.4.1 — Stored plan compliance trail
|
|
86
|
+
*/
|
|
87
|
+
exports.VALID_PLAN_TRANSITIONS = [
|
|
88
|
+
{ from: 'PENDING_APPROVAL', to: 'APPROVED', description: 'Human approves the plan' },
|
|
89
|
+
{ from: 'PENDING_APPROVAL', to: 'REJECTED', description: 'Human rejects the plan before execution' },
|
|
90
|
+
{ from: 'PENDING_APPROVAL', to: 'EXECUTING', description: 'A deviation is recorded before formal approval' },
|
|
91
|
+
{ from: 'PENDING_APPROVAL', to: 'COMPLETED', description: 'Plan closed directly, no approval step required' },
|
|
92
|
+
{ from: 'APPROVED', to: 'EXECUTING', description: 'First deviation recorded after approval' },
|
|
93
|
+
{ from: 'APPROVED', to: 'COMPLETED', description: 'Plan closed after approval, no deviation ever recorded' },
|
|
94
|
+
{ from: 'EXECUTING', to: 'COMPLETED', description: 'Execution finishes and the plan is closed' },
|
|
95
|
+
];
|
|
44
96
|
//# sourceMappingURL=sop.js.map
|
package/dist/sop.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sop.js","sourceRoot":"","sources":["../src/sop.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;
|
|
1
|
+
{"version":3,"file":"sop.js","sourceRoot":"","sources":["../src/sop.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAibH;;;;GAIG;AACU,QAAA,qBAAqB,GAA2F;IAC3H,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,gBAAgB,EAAE,WAAW,EAAE,mBAAmB,EAAE;IACzE,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE,EAAE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yC,EAAE;IACpG,EAAE,IAAI,EAAE,kBAAkB,EAAE,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,gDAAgD,EAAE;IAC5G,EAAE,IAAI,EAAE,kBAAkB,EAAE,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,iDAAiD,EAAE;IAC7G,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,yCAAyC,EAAE;IAC7F,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,wDAAwD,EAAE;IAC5G,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,2CAA2C,EAAE;CACxF,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Source connector providers — the one definition.
|
|
3
|
+
*
|
|
4
|
+
* Providers that pull documents into the SOP registry. This list used to be
|
|
5
|
+
* restated by hand in three places — the connector service, the sync cron and
|
|
6
|
+
* the dashboard hook — and the dashboard's copy is what the operator sees in
|
|
7
|
+
* the provider picker, so a provider added server-side was invisible until
|
|
8
|
+
* someone remembered the third copy. `LLD #71` widens the list (Google Drive,
|
|
9
|
+
* upload) and moves it here so every reader imports it.
|
|
10
|
+
*
|
|
11
|
+
* `MEMORY_PROVIDERS` is deliberately NOT here: memory providers share the
|
|
12
|
+
* `connector_credentials` table but are queried at `/fix` time, never synced,
|
|
13
|
+
* and their list is owned by `services/memoryProviders.ts` beside the adapters
|
|
14
|
+
* that read it.
|
|
15
|
+
*
|
|
16
|
+
* @module
|
|
17
|
+
*/
|
|
18
|
+
/** Providers that pull documents on a schedule (and, where the provider allows, write SOPs back). */
|
|
19
|
+
export declare const SOURCE_PROVIDERS: readonly ["notion", "confluence", "github", "gdrive"];
|
|
20
|
+
export type SourceProvider = (typeof SOURCE_PROVIDERS)[number];
|
|
21
|
+
/**
|
|
22
|
+
* Every provider a `policy_source_documents` row can carry: the syncable
|
|
23
|
+
* sources plus `upload`, a one-off file with no connector row behind it —
|
|
24
|
+
* never swept by the cron, never scheduled, never written back. Kept out of
|
|
25
|
+
* `SOURCE_PROVIDERS` on purpose: that list is what the connector routes, the
|
|
26
|
+
* sync cron and the provider picker widen from, and none of them should
|
|
27
|
+
* offer "upload" as something to connect.
|
|
28
|
+
*/
|
|
29
|
+
export declare const DOCUMENT_PROVIDERS: readonly ["notion", "confluence", "github", "gdrive", "upload"];
|
|
30
|
+
export type DocumentProvider = (typeof DOCUMENT_PROVIDERS)[number];
|
|
31
|
+
/**
|
|
32
|
+
* Source providers only a workspace OWNER or ADMIN may connect, reschedule,
|
|
33
|
+
* sync or remove. A Google service-account key reads every document it has
|
|
34
|
+
* been shared, so the member-level connector route must not create one — the
|
|
35
|
+
* same reasoning that keeps VirusTotal off the generic provider enum.
|
|
36
|
+
*/
|
|
37
|
+
export declare const PRIVILEGED_SOURCE_PROVIDERS: ReadonlySet<string>;
|
|
38
|
+
/** Type guard for a string arriving off the wire or from a config row. */
|
|
39
|
+
export declare function isSourceProvider(value: unknown): value is SourceProvider;
|
|
40
|
+
export declare function isDocumentProvider(value: unknown): value is DocumentProvider;
|
|
41
|
+
//# sourceMappingURL=sourceProviders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sourceProviders.d.ts","sourceRoot":"","sources":["../src/sourceProviders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,qGAAqG;AACrG,eAAO,MAAM,gBAAgB,uDAAwD,CAAA;AAErF,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;AAE9D;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,iEAA2C,CAAA;AAE1E,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAA;AAElE;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,EAAE,WAAW,CAAC,MAAM,CAAuB,CAAA;AAEnF,0EAA0E;AAC1E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAExE;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAE5E"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Source connector providers — the one definition.
|
|
4
|
+
*
|
|
5
|
+
* Providers that pull documents into the SOP registry. This list used to be
|
|
6
|
+
* restated by hand in three places — the connector service, the sync cron and
|
|
7
|
+
* the dashboard hook — and the dashboard's copy is what the operator sees in
|
|
8
|
+
* the provider picker, so a provider added server-side was invisible until
|
|
9
|
+
* someone remembered the third copy. `LLD #71` widens the list (Google Drive,
|
|
10
|
+
* upload) and moves it here so every reader imports it.
|
|
11
|
+
*
|
|
12
|
+
* `MEMORY_PROVIDERS` is deliberately NOT here: memory providers share the
|
|
13
|
+
* `connector_credentials` table but are queried at `/fix` time, never synced,
|
|
14
|
+
* and their list is owned by `services/memoryProviders.ts` beside the adapters
|
|
15
|
+
* that read it.
|
|
16
|
+
*
|
|
17
|
+
* @module
|
|
18
|
+
*/
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.PRIVILEGED_SOURCE_PROVIDERS = exports.DOCUMENT_PROVIDERS = exports.SOURCE_PROVIDERS = void 0;
|
|
21
|
+
exports.isSourceProvider = isSourceProvider;
|
|
22
|
+
exports.isDocumentProvider = isDocumentProvider;
|
|
23
|
+
/** Providers that pull documents on a schedule (and, where the provider allows, write SOPs back). */
|
|
24
|
+
exports.SOURCE_PROVIDERS = ['notion', 'confluence', 'github', 'gdrive'];
|
|
25
|
+
/**
|
|
26
|
+
* Every provider a `policy_source_documents` row can carry: the syncable
|
|
27
|
+
* sources plus `upload`, a one-off file with no connector row behind it —
|
|
28
|
+
* never swept by the cron, never scheduled, never written back. Kept out of
|
|
29
|
+
* `SOURCE_PROVIDERS` on purpose: that list is what the connector routes, the
|
|
30
|
+
* sync cron and the provider picker widen from, and none of them should
|
|
31
|
+
* offer "upload" as something to connect.
|
|
32
|
+
*/
|
|
33
|
+
exports.DOCUMENT_PROVIDERS = [...exports.SOURCE_PROVIDERS, 'upload'];
|
|
34
|
+
/**
|
|
35
|
+
* Source providers only a workspace OWNER or ADMIN may connect, reschedule,
|
|
36
|
+
* sync or remove. A Google service-account key reads every document it has
|
|
37
|
+
* been shared, so the member-level connector route must not create one — the
|
|
38
|
+
* same reasoning that keeps VirusTotal off the generic provider enum.
|
|
39
|
+
*/
|
|
40
|
+
exports.PRIVILEGED_SOURCE_PROVIDERS = new Set(['gdrive']);
|
|
41
|
+
/** Type guard for a string arriving off the wire or from a config row. */
|
|
42
|
+
function isSourceProvider(value) {
|
|
43
|
+
return typeof value === 'string' && exports.SOURCE_PROVIDERS.includes(value);
|
|
44
|
+
}
|
|
45
|
+
function isDocumentProvider(value) {
|
|
46
|
+
return typeof value === 'string' && exports.DOCUMENT_PROVIDERS.includes(value);
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=sourceProviders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sourceProviders.js","sourceRoot":"","sources":["../src/sourceProviders.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AA4BH,4CAEC;AAED,gDAEC;AAhCD,qGAAqG;AACxF,QAAA,gBAAgB,GAAG,CAAC,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,CAAU,CAAA;AAIrF;;;;;;;GAOG;AACU,QAAA,kBAAkB,GAAG,CAAC,GAAG,wBAAgB,EAAE,QAAQ,CAAU,CAAA;AAI1E;;;;;GAKG;AACU,QAAA,2BAA2B,GAAwB,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEnF,0EAA0E;AAC1E,SAAgB,gBAAgB,CAAC,KAAc;IAC7C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,wBAAsC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC7F,CAAC;AAED,SAAgB,kBAAkB,CAAC,KAAc;IAC/C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,0BAAwC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC/F,CAAC"}
|