@coderifts/sdk 3.1.0 → 3.1.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/cjs/generated/decision-result.v1.d.ts +82 -1
- package/dist/cjs/generated/decision-result.v1.d.ts.map +1 -1
- package/dist/cjs/generated/preflight-response.v2.d.ts +301 -0
- package/dist/cjs/generated/preflight-response.v2.d.ts.map +1 -0
- package/dist/cjs/generated/preflight-response.v2.js +20 -0
- package/dist/cjs/generated/preflight-response.v2.js.map +1 -0
- package/dist/cjs/types.d.ts +28 -73
- package/dist/cjs/types.d.ts.map +1 -1
- package/dist/esm/generated/decision-result.v1.d.ts +82 -1
- package/dist/esm/generated/decision-result.v1.d.ts.map +1 -1
- package/dist/esm/generated/preflight-response.v2.d.ts +301 -0
- package/dist/esm/generated/preflight-response.v2.d.ts.map +1 -0
- package/dist/esm/generated/preflight-response.v2.js +19 -0
- package/dist/esm/generated/preflight-response.v2.js.map +1 -0
- package/dist/esm/types.d.ts +28 -73
- package/dist/esm/types.d.ts.map +1 -1
- package/package.json +3 -2
|
@@ -305,7 +305,7 @@ export interface DecisionResultEnvelope {
|
|
|
305
305
|
*/
|
|
306
306
|
decision_spec_version?: string | null;
|
|
307
307
|
/**
|
|
308
|
-
* Additive v1.1. Intended audience of the decision
|
|
308
|
+
* Additive v1.1. Intended audience of the decision: server-derived authenticated requester identity ('v:' + sha256(utf8(apiKey)).hex.slice(0, 12) via velocity-monitor.decisionAudienc…
|
|
309
309
|
*/
|
|
310
310
|
audience?: string | null;
|
|
311
311
|
/**
|
|
@@ -373,6 +373,39 @@ export interface DecisionResultEnvelope {
|
|
|
373
373
|
*/
|
|
374
374
|
rule_id?: string;
|
|
375
375
|
}[] | null;
|
|
376
|
+
/**
|
|
377
|
+
* Additive. GOVERNANCE detector detail rows (src/change-patterns.js) — the array pattern_sources[].detected_pattern_indices indexes into, so those indices resolve against a declared …
|
|
378
|
+
*/
|
|
379
|
+
detected_patterns?: {
|
|
380
|
+
/**
|
|
381
|
+
* Governance pattern name; appears in patterns when both are carried.
|
|
382
|
+
*/
|
|
383
|
+
name: string;
|
|
384
|
+
/**
|
|
385
|
+
* Row severity from the pattern catalog (observed set: CRITICAL, HIGH, MEDIUM). NOT a closed control enum — branch on execution_action, never on this.
|
|
386
|
+
*/
|
|
387
|
+
severity: string;
|
|
388
|
+
/**
|
|
389
|
+
* What the detector matched. Untrusted free text.
|
|
390
|
+
*/
|
|
391
|
+
description: string;
|
|
392
|
+
/**
|
|
393
|
+
* What breaks for a consumer if this ships. Untrusted free text.
|
|
394
|
+
*/
|
|
395
|
+
consequence: string;
|
|
396
|
+
/**
|
|
397
|
+
* Contract path this row is about. Empty string when the detector had none — the key is always emitted.
|
|
398
|
+
*/
|
|
399
|
+
affected_path: string;
|
|
400
|
+
/**
|
|
401
|
+
* Field within affected_path. Empty string when the detector had none — the key is always emitted.
|
|
402
|
+
*/
|
|
403
|
+
affected_field: string;
|
|
404
|
+
/**
|
|
405
|
+
* Optional; currently set on ENUM_NARROWING only. Request-side narrowing is agent-breaking (threaded so safe_for_agent can distinguish it). Absent when the detector did not set it.
|
|
406
|
+
*/
|
|
407
|
+
side?: 'request' | 'response';
|
|
408
|
+
}[] | null;
|
|
376
409
|
/**
|
|
377
410
|
* Additive (ID637 v5 slice 4). SERVER-authored change-set completeness claim level. Never caller-authored; never a boolean completeness:true. ATTESTED_UNVERIFIED is NOT a proof (defe…
|
|
378
411
|
*/
|
|
@@ -401,6 +434,10 @@ export interface DecisionResultEnvelope {
|
|
|
401
434
|
* Additive (ID637). What would upgrade a non-terminal mode (e.g. webhook_full_file_list for ATTESTED_UNVERIFIED). null when not applicable.
|
|
402
435
|
*/
|
|
403
436
|
completeness_expected_channel?: string | null;
|
|
437
|
+
/**
|
|
438
|
+
* Additive (RT-P-20). SERVER-authored: whether fingerprint rebind is EXPECTED for this verdict at the merge/deploy gate. true = case-split hard-fails expected_but_absent / expected_b…
|
|
439
|
+
*/
|
|
440
|
+
fingerprint_binding_expected?: boolean | null;
|
|
404
441
|
/**
|
|
405
442
|
* Additive. Branchable control core (type/reason_code/recheck_required/choices ids) frozen at issuance without receipt-authz overlay. null when not supplied. Never fabricate type=non…
|
|
406
443
|
*/
|
|
@@ -413,6 +450,50 @@ export interface DecisionResultEnvelope {
|
|
|
413
450
|
*/
|
|
414
451
|
choices?: ('continue_monitor' | 're_preflight' | 'obtain_human_approval' | 'revert' | 'migrate' | 'fix_input' | 'escalate' | 'verify_receipt' | 're_preflight_deploy')[];
|
|
415
452
|
} | null;
|
|
453
|
+
/**
|
|
454
|
+
* Additive (ID850 v1). BLOCK-only safe-path-forward block: aggregated from remediation-taxonomy required_changes, REEVALUATE/INPUT_CHANGED next-preflight, and human_review escalation…
|
|
455
|
+
*/
|
|
456
|
+
remediation_transaction?: {
|
|
457
|
+
/**
|
|
458
|
+
* Per-change remediations from remediation-taxonomy.buildRemediations (reused, not reinvented).
|
|
459
|
+
*/
|
|
460
|
+
required_changes: {
|
|
461
|
+
[k: string]: any;
|
|
462
|
+
}[];
|
|
463
|
+
resubmission: {
|
|
464
|
+
/**
|
|
465
|
+
* Same reference_fingerprint material → the same BLOCK (a fact within fingerprint_profile coverage).
|
|
466
|
+
*/
|
|
467
|
+
unchanged_input: 'deterministic_block';
|
|
468
|
+
/**
|
|
469
|
+
* Changed input is eligible for a fresh preflight — NOT authorization.
|
|
470
|
+
*/
|
|
471
|
+
modified_input: 'preflight_required';
|
|
472
|
+
reference_fingerprint: string;
|
|
473
|
+
/**
|
|
474
|
+
* Honest name of what reference_fingerprint covers (e.g. crbundle.v1 or verdict_fp_v1). deterministic_block binds only to that coverage.
|
|
475
|
+
*/
|
|
476
|
+
fingerprint_profile: string;
|
|
477
|
+
/**
|
|
478
|
+
* Explicit: modified_input never grants authorization; execution_action remains STOP until a new authorize receipt.
|
|
479
|
+
*/
|
|
480
|
+
modified_is_not_permission?: true;
|
|
481
|
+
};
|
|
482
|
+
/**
|
|
483
|
+
* Aligned with REEVALUATE + precondition:INPUT_CHANGED on the BLOCK next_actions path.
|
|
484
|
+
*/
|
|
485
|
+
next_preflight_required: true;
|
|
486
|
+
/**
|
|
487
|
+
* Precise re-preflight scope derived from affected targets/artifacts — not the whole task.
|
|
488
|
+
*/
|
|
489
|
+
recheck_scope: {
|
|
490
|
+
[k: string]: any;
|
|
491
|
+
};
|
|
492
|
+
escalation: {
|
|
493
|
+
path: 'human_review';
|
|
494
|
+
when: 'changes_infeasible_or_disputed';
|
|
495
|
+
};
|
|
496
|
+
} | null;
|
|
416
497
|
}
|
|
417
498
|
/**
|
|
418
499
|
* This interface was referenced by `DecisionResultEnvelope`'s JSON-Schema
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decision-result.v1.d.ts","sourceRoot":"","sources":["../../../src/generated/decision-result.v1.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,kBAAkB,GAAG,OAAO,CAAC;IAC1D;;OAEG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,gBAAgB,EAAE,UAAU,GAAG,0BAA0B,GAAG,kBAAkB,GAAG,MAAM,CAAC;IACxF;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B;;OAEG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB;;OAEG;IACH,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B;;;;OAIG;IACH,YAAY,EAAE,UAAU,EAAE,CAAC;IAC3B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iBAAiB,GACjB,kBAAkB,GAClB,kBAAkB,GAClB,gBAAgB,GAChB,sBAAsB,GACtB,YAAY,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,YAAY,CAAC,EAAE,eAAe,GAAG,gBAAgB,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,IAAI,CAAC;CAClG;AACD;;;;;GAKG;AACH,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AACD;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EACA,eAAe,GACf,oBAAoB,GACpB,cAAc,GACd,eAAe,GACf,aAAa,GACb,gBAAgB,GAChB,gBAAgB,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;CAC3D;AAID,6FAA6F;AAC7F,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC;AACpC,+FAA+F;AAC/F,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC;AACtC,iGAAiG;AACjG,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AACxC,gEAAgE;AAChE,MAAM,MAAM,QAAQ,GAAG,sBAAsB,CAAC,UAAU,CAAC,CAAC;AAC1D,qEAAqE;AACrE,MAAM,MAAM,eAAe,GAAG,sBAAsB,CAAC,kBAAkB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"decision-result.v1.d.ts","sourceRoot":"","sources":["../../../src/generated/decision-result.v1.ts"],"names":[],"mappings":"AAAA;;;;;;;;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,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;KACP,GACD;QACE,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;KACP,GACD;QACE,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;KACP,GACD;QACE,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;KACP,GACD;QACE,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;KACP,GACD;QACE,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;KACP,GACD;QACE,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAA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,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;CAC3D;AAID,6FAA6F;AAC7F,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC;AACpC,+FAA+F;AAC/F,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC;AACtC,iGAAiG;AACjG,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AACxC,gEAAgE;AAChE,MAAM,MAAM,QAAQ,GAAG,sBAAsB,CAAC,UAAU,CAAC,CAAC;AAC1D,qEAAqE;AACrE,MAAM,MAAM,eAAe,GAAG,sBAAsB,CAAC,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DO NOT EDIT — generated from schemas/preflight-response.v2.producer.json
|
|
3
|
+
*
|
|
4
|
+
* Source of truth: coderifts-app/schemas/preflight-response.v2.producer.json (shape)
|
|
5
|
+
* coderifts-app/schemas/preflight-response.v2.consumer.json (required-ness)
|
|
6
|
+
* Generator: coderifts-app/scripts/generate-preflight-response-types.js
|
|
7
|
+
*
|
|
8
|
+
* node scripts/generate-preflight-response-types.js --out <path>
|
|
9
|
+
* node scripts/generate-preflight-response-types.js --out <path> --check
|
|
10
|
+
*
|
|
11
|
+
* Hand-editing this file will be overwritten. To change types, update the v2 schemas and
|
|
12
|
+
* re-run the generator. This union was hand-maintained in src/types.ts until ID819 and drifted
|
|
13
|
+
* from the schema by hand (ID804 class); src/types.ts now re-exports these names.
|
|
14
|
+
*
|
|
15
|
+
* Required-ness follows the CONSUMER schema (the SDK is a reader — over-claiming presence is
|
|
16
|
+
* the bug this generation exists to prevent); the property set follows the PRODUCER schema.
|
|
17
|
+
*/
|
|
18
|
+
import type { Decision, ExecutionAction, DecisionEvidence, DecisionResultEnvelope } from './decision-result.v1.js';
|
|
19
|
+
import type { ChangeSetArtifactFinding } from '../types.js';
|
|
20
|
+
/**
|
|
21
|
+
* CodeRifts preflight-response.v2 — discriminated on preflight_mode. Narrow on preflight_mode before reading mode-specific fields. Canonical contract; do not hand-edit the generated .ts.
|
|
22
|
+
*/
|
|
23
|
+
export type PreflightChangeSetResponse = AnalyzeChangeSetResponse | AuthorizeChangeSetResponse;
|
|
24
|
+
export interface AnalyzeChangeSetResponse {
|
|
25
|
+
preflight_mode: 'analyze';
|
|
26
|
+
/**
|
|
27
|
+
* Closed analysis outcome set derived from engine-visible state only.
|
|
28
|
+
*/
|
|
29
|
+
analysis_outcome: 'NO_BREAK_DETECTED' | 'BREAKS_DETECTED' | 'ANALYSIS_FAILED';
|
|
30
|
+
/**
|
|
31
|
+
* Analyze never authorizes; always NONE.
|
|
32
|
+
*/
|
|
33
|
+
authorization_effect: 'NONE';
|
|
34
|
+
/**
|
|
35
|
+
* Analyze never grants execute permission.
|
|
36
|
+
*/
|
|
37
|
+
may_execute: false;
|
|
38
|
+
/**
|
|
39
|
+
* Analyze never mints a receipt.
|
|
40
|
+
*/
|
|
41
|
+
receipt_kind: 'NONE';
|
|
42
|
+
/**
|
|
43
|
+
* Decision Spec major for this response (typically '2.0').
|
|
44
|
+
*/
|
|
45
|
+
decision_spec_version: string;
|
|
46
|
+
risk_score?: number;
|
|
47
|
+
breaking_changes?: number;
|
|
48
|
+
requires_migration?: boolean;
|
|
49
|
+
evidence_quality?: string;
|
|
50
|
+
patterns?: string[];
|
|
51
|
+
pattern_sources?: unknown[];
|
|
52
|
+
bundle_fingerprint?: string;
|
|
53
|
+
verdict_fingerprint?: string;
|
|
54
|
+
artifacts?: ChangeSetArtifactFinding[];
|
|
55
|
+
evidence?: DecisionEvidence[];
|
|
56
|
+
meta?: {
|
|
57
|
+
[k: string]: unknown;
|
|
58
|
+
};
|
|
59
|
+
correlation_id?: string;
|
|
60
|
+
timestamp?: string;
|
|
61
|
+
operation?: unknown;
|
|
62
|
+
decision_basis?: unknown;
|
|
63
|
+
analysis_control?: {
|
|
64
|
+
[k: string]: unknown;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* GOVERNANCE detector detail rows (src/change-patterns.js; validated by decision-spec-fields.js). Row shape measured live: name, severity, description, consequence, affected_path, af…
|
|
68
|
+
*/
|
|
69
|
+
detected_patterns?: {
|
|
70
|
+
/**
|
|
71
|
+
* Governance pattern name; appears in patterns when both are carried.
|
|
72
|
+
*/
|
|
73
|
+
name: string;
|
|
74
|
+
/**
|
|
75
|
+
* Row severity from the pattern catalog (observed set: CRITICAL, HIGH, MEDIUM). NOT a closed control enum — branch on execution_action, never on this.
|
|
76
|
+
*/
|
|
77
|
+
severity: string;
|
|
78
|
+
/**
|
|
79
|
+
* What the detector matched. Untrusted free text.
|
|
80
|
+
*/
|
|
81
|
+
description: string;
|
|
82
|
+
/**
|
|
83
|
+
* What breaks for a consumer if this ships. Untrusted free text.
|
|
84
|
+
*/
|
|
85
|
+
consequence: string;
|
|
86
|
+
/**
|
|
87
|
+
* Contract path this row is about. Empty string when the detector had none — the key is always emitted.
|
|
88
|
+
*/
|
|
89
|
+
affected_path: string;
|
|
90
|
+
/**
|
|
91
|
+
* Field within affected_path. Empty string when the detector had none — the key is always emitted.
|
|
92
|
+
*/
|
|
93
|
+
affected_field: string;
|
|
94
|
+
/**
|
|
95
|
+
* Optional; currently set on ENUM_NARROWING only. Request-side narrowing is agent-breaking (threaded so safe_for_agent can distinguish it). Absent when the detector did not set it.
|
|
96
|
+
*/
|
|
97
|
+
side?: 'request' | 'response';
|
|
98
|
+
}[];
|
|
99
|
+
/**
|
|
100
|
+
* Per-change IR/detail rows from the engine (src/blast/diff-to-change.js maps these). Measured row keys: type, path, method, field, severity, description. Distinct from breaking_chan…
|
|
101
|
+
*/
|
|
102
|
+
breaking_changes_details?: {
|
|
103
|
+
/**
|
|
104
|
+
* Change kind / IR type code (e.g. response.body.property.remove).
|
|
105
|
+
*/
|
|
106
|
+
type?: string;
|
|
107
|
+
path?: string;
|
|
108
|
+
method?: string;
|
|
109
|
+
field?: string;
|
|
110
|
+
severity?: string;
|
|
111
|
+
description?: string;
|
|
112
|
+
[k: string]: unknown;
|
|
113
|
+
}[];
|
|
114
|
+
/**
|
|
115
|
+
* Bundle severity axes (src/change-set.js severity_summary). Distinct axes, not contradictory. Measured keys: diff_severity, governance_severity, policy_effect, note.
|
|
116
|
+
*/
|
|
117
|
+
severity_summary?: {
|
|
118
|
+
/**
|
|
119
|
+
* Structural size of the schema change.
|
|
120
|
+
*/
|
|
121
|
+
diff_severity?: string;
|
|
122
|
+
/**
|
|
123
|
+
* How the rule engine rates the change.
|
|
124
|
+
*/
|
|
125
|
+
governance_severity?: string;
|
|
126
|
+
/**
|
|
127
|
+
* Resulting decision effect label.
|
|
128
|
+
*/
|
|
129
|
+
policy_effect?: string;
|
|
130
|
+
note?: string;
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* Tier-2 analysis mirror (src/response-envelope.js buildAnalysisTier / attachControlSurface). Dual-write of flat analysis fields present on the verdict plus remediations[]. ANALYSIS_…
|
|
134
|
+
*/
|
|
135
|
+
analysis?: {
|
|
136
|
+
[k: string]: unknown;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* Human-readable report tier (src/response-envelope.js buildHumanReport / analyze v2 stub). Measured keys: summary, breaking_highlights, suggestions, next_steps_prose.
|
|
140
|
+
*/
|
|
141
|
+
human_report?: {
|
|
142
|
+
summary?: string;
|
|
143
|
+
breaking_highlights?: unknown[];
|
|
144
|
+
suggestions?: unknown[];
|
|
145
|
+
next_steps_prose?: string;
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* Gateway/request correlation id (attachControlSurface). Set when correlation_id is present; alias of the request id. Distinct from decision_correlation_id on authorize when the enve…
|
|
149
|
+
*/
|
|
150
|
+
request_correlation_id?: string;
|
|
151
|
+
}
|
|
152
|
+
export interface AuthorizeChangeSetResponse {
|
|
153
|
+
preflight_mode: 'authorize';
|
|
154
|
+
/**
|
|
155
|
+
* Compatibility mirror of control_envelope.decision (same value). Prefer control_envelope for branching; use decision as explanation only.
|
|
156
|
+
*/
|
|
157
|
+
decision: Decision;
|
|
158
|
+
/**
|
|
159
|
+
* Compatibility mirror of control_envelope.execution_action (same value). Canonical branch key; unrecognised values are not permission (fail closed).
|
|
160
|
+
*/
|
|
161
|
+
execution_action: ExecutionAction;
|
|
162
|
+
/**
|
|
163
|
+
* Compatibility mirror of control_envelope.safe_for_agent (same value). Not a branch key — do not branch on safe_for_agent (use execution_action).
|
|
164
|
+
*/
|
|
165
|
+
safe_for_agent: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* operation_authorization when a chain receipt was issued; NONE if signer unconfigured.
|
|
168
|
+
*/
|
|
169
|
+
receipt_kind: 'operation_authorization' | 'NONE';
|
|
170
|
+
chain_receipt?: string;
|
|
171
|
+
chain_status?: string;
|
|
172
|
+
/**
|
|
173
|
+
* Proof/receipt side: decision-result.v1 envelope when the issuance path produced one (validate with decision-result.v1.producer.json). Carries fingerprints, audience, receipt / deci…
|
|
174
|
+
*/
|
|
175
|
+
decision_result?: DecisionResultEnvelope;
|
|
176
|
+
/**
|
|
177
|
+
* Decision Spec major for this response (typically '2.0').
|
|
178
|
+
*/
|
|
179
|
+
decision_spec_version: string;
|
|
180
|
+
risk_score?: number;
|
|
181
|
+
breaking_changes?: number;
|
|
182
|
+
requires_migration?: boolean;
|
|
183
|
+
evidence_quality?: string;
|
|
184
|
+
patterns?: string[];
|
|
185
|
+
pattern_sources?: unknown[];
|
|
186
|
+
bundle_fingerprint?: string;
|
|
187
|
+
verdict_fingerprint?: string;
|
|
188
|
+
artifacts?: ChangeSetArtifactFinding[];
|
|
189
|
+
evidence?: DecisionEvidence[];
|
|
190
|
+
meta?: {
|
|
191
|
+
[k: string]: unknown;
|
|
192
|
+
};
|
|
193
|
+
correlation_id?: string;
|
|
194
|
+
timestamp?: string;
|
|
195
|
+
operation?: unknown;
|
|
196
|
+
decision_basis?: unknown;
|
|
197
|
+
coderifts_version?: string;
|
|
198
|
+
decision_semantic_hash?: unknown;
|
|
199
|
+
/**
|
|
200
|
+
* Branch source (control/1.0). Machine-control surface from attachControlSurface / buildControlEnvelope. Agents and @coderifts/agent-guard branch on control_envelope.execution_action…
|
|
201
|
+
*/
|
|
202
|
+
control_envelope?: {
|
|
203
|
+
[k: string]: unknown;
|
|
204
|
+
};
|
|
205
|
+
/**
|
|
206
|
+
* GOVERNANCE detector detail rows (src/change-patterns.js; validated by decision-spec-fields.js). Row shape measured live: name, severity, description, consequence, affected_path, af…
|
|
207
|
+
*/
|
|
208
|
+
detected_patterns?: {
|
|
209
|
+
/**
|
|
210
|
+
* Governance pattern name; appears in patterns when both are carried.
|
|
211
|
+
*/
|
|
212
|
+
name: string;
|
|
213
|
+
/**
|
|
214
|
+
* Row severity from the pattern catalog (observed set: CRITICAL, HIGH, MEDIUM). NOT a closed control enum — branch on execution_action, never on this.
|
|
215
|
+
*/
|
|
216
|
+
severity: string;
|
|
217
|
+
/**
|
|
218
|
+
* What the detector matched. Untrusted free text.
|
|
219
|
+
*/
|
|
220
|
+
description: string;
|
|
221
|
+
/**
|
|
222
|
+
* What breaks for a consumer if this ships. Untrusted free text.
|
|
223
|
+
*/
|
|
224
|
+
consequence: string;
|
|
225
|
+
/**
|
|
226
|
+
* Contract path this row is about. Empty string when the detector had none — the key is always emitted.
|
|
227
|
+
*/
|
|
228
|
+
affected_path: string;
|
|
229
|
+
/**
|
|
230
|
+
* Field within affected_path. Empty string when the detector had none — the key is always emitted.
|
|
231
|
+
*/
|
|
232
|
+
affected_field: string;
|
|
233
|
+
/**
|
|
234
|
+
* Optional; currently set on ENUM_NARROWING only. Request-side narrowing is agent-breaking (threaded so safe_for_agent can distinguish it). Absent when the detector did not set it.
|
|
235
|
+
*/
|
|
236
|
+
side?: 'request' | 'response';
|
|
237
|
+
}[];
|
|
238
|
+
/**
|
|
239
|
+
* Per-change IR/detail rows from the engine (src/blast/diff-to-change.js maps these). Measured row keys: type, path, method, field, severity, description. Distinct from breaking_chan…
|
|
240
|
+
*/
|
|
241
|
+
breaking_changes_details?: {
|
|
242
|
+
/**
|
|
243
|
+
* Change kind / IR type code (e.g. response.body.property.remove).
|
|
244
|
+
*/
|
|
245
|
+
type?: string;
|
|
246
|
+
path?: string;
|
|
247
|
+
method?: string;
|
|
248
|
+
field?: string;
|
|
249
|
+
severity?: string;
|
|
250
|
+
description?: string;
|
|
251
|
+
[k: string]: unknown;
|
|
252
|
+
}[];
|
|
253
|
+
/**
|
|
254
|
+
* Bundle severity axes (src/change-set.js severity_summary). Distinct axes, not contradictory. Measured keys: diff_severity, governance_severity, policy_effect, note.
|
|
255
|
+
*/
|
|
256
|
+
severity_summary?: {
|
|
257
|
+
/**
|
|
258
|
+
* Structural size of the schema change.
|
|
259
|
+
*/
|
|
260
|
+
diff_severity?: string;
|
|
261
|
+
/**
|
|
262
|
+
* How the rule engine rates the change.
|
|
263
|
+
*/
|
|
264
|
+
governance_severity?: string;
|
|
265
|
+
/**
|
|
266
|
+
* Resulting decision effect label.
|
|
267
|
+
*/
|
|
268
|
+
policy_effect?: string;
|
|
269
|
+
note?: string;
|
|
270
|
+
};
|
|
271
|
+
/**
|
|
272
|
+
* Tier-2 analysis mirror (src/response-envelope.js buildAnalysisTier / attachControlSurface). Dual-write of flat analysis fields present on the verdict plus remediations[]. ANALYSIS_…
|
|
273
|
+
*/
|
|
274
|
+
analysis?: {
|
|
275
|
+
[k: string]: unknown;
|
|
276
|
+
};
|
|
277
|
+
/**
|
|
278
|
+
* Human-readable report tier (src/response-envelope.js buildHumanReport / analyze v2 stub). Measured keys: summary, breaking_highlights, suggestions, next_steps_prose.
|
|
279
|
+
*/
|
|
280
|
+
human_report?: {
|
|
281
|
+
summary?: string;
|
|
282
|
+
breaking_highlights?: unknown[];
|
|
283
|
+
suggestions?: unknown[];
|
|
284
|
+
next_steps_prose?: string;
|
|
285
|
+
};
|
|
286
|
+
/**
|
|
287
|
+
* Gateway/request correlation id (attachControlSurface). Set when correlation_id is present; alias of the request id. Distinct from decision_correlation_id on authorize when the enve…
|
|
288
|
+
*/
|
|
289
|
+
request_correlation_id?: string;
|
|
290
|
+
/**
|
|
291
|
+
* Decision envelope correlation id (attachControlSurface). Present on authorize when decision_result.correlation_id is set. Distinct from request_correlation_id / correlation_id (req…
|
|
292
|
+
*/
|
|
293
|
+
decision_correlation_id?: string;
|
|
294
|
+
}
|
|
295
|
+
/** @public Closed analysis outcome set (analyze only; derived from engine-visible state). */
|
|
296
|
+
export type AnalysisOutcome = AnalyzeChangeSetResponse['analysis_outcome'];
|
|
297
|
+
/** @public Receipt kind on an authorize response (`operation_authorization` when a receipt was issued). */
|
|
298
|
+
export type AuthorizeReceiptKind = NonNullable<AuthorizeChangeSetResponse['receipt_kind']>;
|
|
299
|
+
/** @public The discriminator itself, as the response side declares it. */
|
|
300
|
+
export type PreflightResponseMode = PreflightChangeSetResponse['preflight_mode'];
|
|
301
|
+
//# sourceMappingURL=preflight-response.v2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preflight-response.v2.d.ts","sourceRoot":"","sources":["../../../src/generated/preflight-response.v2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,KAAK,EACV,QAAQ,EACR,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC5D;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,wBAAwB,GAAG,0BAA0B,CAAC;AAE/F,MAAM,WAAW,wBAAwB;IACvC,cAAc,EAAE,SAAS,CAAC;IAC1B;;OAEG;IACH,gBAAgB,EAAE,mBAAmB,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;IAC9E;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,WAAW,EAAE,KAAK,CAAC;IACnB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,qBAAqB,EAA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
/**
|
|
3
|
+
* DO NOT EDIT — generated from schemas/preflight-response.v2.producer.json
|
|
4
|
+
*
|
|
5
|
+
* Source of truth: coderifts-app/schemas/preflight-response.v2.producer.json (shape)
|
|
6
|
+
* coderifts-app/schemas/preflight-response.v2.consumer.json (required-ness)
|
|
7
|
+
* Generator: coderifts-app/scripts/generate-preflight-response-types.js
|
|
8
|
+
*
|
|
9
|
+
* node scripts/generate-preflight-response-types.js --out <path>
|
|
10
|
+
* node scripts/generate-preflight-response-types.js --out <path> --check
|
|
11
|
+
*
|
|
12
|
+
* Hand-editing this file will be overwritten. To change types, update the v2 schemas and
|
|
13
|
+
* re-run the generator. This union was hand-maintained in src/types.ts until ID819 and drifted
|
|
14
|
+
* from the schema by hand (ID804 class); src/types.ts now re-exports these names.
|
|
15
|
+
*
|
|
16
|
+
* Required-ness follows the CONSUMER schema (the SDK is a reader — over-claiming presence is
|
|
17
|
+
* the bug this generation exists to prevent); the property set follows the PRODUCER schema.
|
|
18
|
+
*/
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
//# sourceMappingURL=preflight-response.v2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preflight-response.v2.js","sourceRoot":"","sources":["../../../src/generated/preflight-response.v2.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG"}
|
package/dist/cjs/types.d.ts
CHANGED
|
@@ -174,7 +174,7 @@ export type { DecisionResultEnvelope, Decision, ExecutionAction, DecisionReason,
|
|
|
174
174
|
export type ReceiptStatus = 'VERIFIED_CURRENT' | 'VERIFIED_EXPIRED' | 'VERIFIED_WRONG_AUDIENCE' | 'VERIFIED_WRONG_ENVIRONMENT' | 'VERIFIED_SUPERSEDED' | 'VERIFIED_SCOPE_MISMATCH' | 'UNKNOWN_KEY' | 'RETIRED_KEY_VALID_AT_ISSUE' | 'INVALID_SIGNATURE' | 'MALFORMED' | 'UNSUPPORTED_VERSION' | 'REGISTRY_UNREACHABLE';
|
|
175
175
|
export interface Artifact {
|
|
176
176
|
id: string;
|
|
177
|
-
type: 'openapi' | 'graphql' | 'grpc' | 'asyncapi' | 'mcp_manifest';
|
|
177
|
+
type: 'openapi' | 'graphql' | 'grpc' | 'asyncapi' | 'mcp_manifest' | 'agent_tools';
|
|
178
178
|
before: string;
|
|
179
179
|
after: string;
|
|
180
180
|
}
|
|
@@ -218,84 +218,31 @@ export interface ChangeSetArtifactFinding {
|
|
|
218
218
|
error?: string;
|
|
219
219
|
reason?: string;
|
|
220
220
|
}
|
|
221
|
-
|
|
222
|
-
export type AnalysisOutcome
|
|
223
|
-
/** Receipt kind on an authorize response (`operation_authorization` when a chain receipt was issued). */
|
|
224
|
-
export type AuthorizeReceiptKind = 'operation_authorization' | 'NONE';
|
|
221
|
+
import type { AnalyzeChangeSetResponse as GeneratedAnalyzeChangeSetResponse, AuthorizeChangeSetResponse as GeneratedAuthorizeChangeSetResponse, PreflightChangeSetResponse as GeneratedPreflightChangeSetResponse } from './generated/preflight-response.v2.js';
|
|
222
|
+
export type { AnalysisOutcome, AuthorizeReceiptKind } from './generated/preflight-response.v2.js';
|
|
225
223
|
/**
|
|
226
224
|
* `preflight_mode: 'analyze'` — informational risk only. NOT permission: it never authorizes,
|
|
227
225
|
* never grants execute, and never mints a receipt (hence the three literal-typed constants).
|
|
226
|
+
*
|
|
227
|
+
* The two branches are NOT one shape with optional fields. `analyze` STRUCTURALLY omits
|
|
228
|
+
* decision / execution_action / safe_for_agent — the producer schema encodes this as
|
|
229
|
+
* `not: { anyOf: [required decision|execution_action|safe_for_agent] }`, so an analyze response
|
|
230
|
+
* never carries a decision and the type must not offer one. Reading `res.safe_for_agent`
|
|
231
|
+
* without first narrowing on `preflight_mode` is a compile error, which is the point.
|
|
228
232
|
*/
|
|
229
|
-
export
|
|
230
|
-
preflight_mode: 'analyze';
|
|
231
|
-
analysis_outcome: AnalysisOutcome;
|
|
232
|
-
/** Analyze never authorizes. */
|
|
233
|
-
authorization_effect: 'NONE';
|
|
234
|
-
/** Analyze never grants execute permission. */
|
|
235
|
-
may_execute: false;
|
|
236
|
-
/** Analyze never mints a receipt. */
|
|
237
|
-
receipt_kind: 'NONE';
|
|
238
|
-
/** Decision Spec major for this response (typically '2.0'). */
|
|
239
|
-
decision_spec_version: string;
|
|
240
|
-
risk_score?: number;
|
|
241
|
-
breaking_changes?: number;
|
|
242
|
-
requires_migration?: boolean;
|
|
243
|
-
evidence_quality?: string;
|
|
244
|
-
patterns?: string[];
|
|
245
|
-
pattern_sources?: unknown[];
|
|
246
|
-
bundle_fingerprint?: string;
|
|
247
|
-
verdict_fingerprint?: string;
|
|
248
|
-
artifacts?: ChangeSetArtifactFinding[];
|
|
249
|
-
evidence?: DecisionEvidence[];
|
|
250
|
-
correlation_id?: string;
|
|
251
|
-
timestamp?: string;
|
|
252
|
-
operation?: unknown;
|
|
253
|
-
decision_basis?: unknown;
|
|
254
|
-
analysis_control?: Record<string, unknown>;
|
|
255
|
-
meta?: Record<string, unknown>;
|
|
256
|
-
}
|
|
233
|
+
export type AnalyzeChangeSetResponse = GeneratedAnalyzeChangeSetResponse;
|
|
257
234
|
/**
|
|
258
235
|
* `preflight_mode: 'authorize'` — operation-bound may-proceed. Carries the decision, the machine
|
|
259
236
|
* directive (`execution_action`), and `safe_for_agent`; may carry a chain receipt.
|
|
260
237
|
*
|
|
261
|
-
*
|
|
262
|
-
* `
|
|
263
|
-
*
|
|
238
|
+
* Two caveats the schema cannot express in TypeScript:
|
|
239
|
+
* - `safe_for_agent` is DEPRECATED for control flow — branch on `execution_action`. It stays
|
|
240
|
+
* because the schema requires it on this branch.
|
|
241
|
+
* - `chain_receipt` is required by the schema *conditionally* (when
|
|
242
|
+
* `receipt_kind === 'operation_authorization'`). TypeScript has no if/then, so it is typed
|
|
243
|
+
* optional — check `receipt_kind` before relying on it.
|
|
264
244
|
*/
|
|
265
|
-
export
|
|
266
|
-
preflight_mode: 'authorize';
|
|
267
|
-
decision: Decision;
|
|
268
|
-
execution_action: ExecutionAction;
|
|
269
|
-
/**
|
|
270
|
-
* DEPRECATED for control flow — branch on `execution_action`. Kept because the schema
|
|
271
|
-
* requires it on this branch.
|
|
272
|
-
*/
|
|
273
|
-
safe_for_agent: boolean;
|
|
274
|
-
/** Decision Spec major for this response (typically '2.0'). */
|
|
275
|
-
decision_spec_version: string;
|
|
276
|
-
receipt_kind?: AuthorizeReceiptKind;
|
|
277
|
-
chain_receipt?: string;
|
|
278
|
-
chain_status?: string;
|
|
279
|
-
decision_result?: DecisionResultEnvelope;
|
|
280
|
-
risk_score?: number;
|
|
281
|
-
breaking_changes?: number;
|
|
282
|
-
requires_migration?: boolean;
|
|
283
|
-
evidence_quality?: string;
|
|
284
|
-
patterns?: string[];
|
|
285
|
-
pattern_sources?: unknown[];
|
|
286
|
-
bundle_fingerprint?: string;
|
|
287
|
-
verdict_fingerprint?: string;
|
|
288
|
-
artifacts?: ChangeSetArtifactFinding[];
|
|
289
|
-
evidence?: DecisionEvidence[];
|
|
290
|
-
correlation_id?: string;
|
|
291
|
-
timestamp?: string;
|
|
292
|
-
operation?: unknown;
|
|
293
|
-
decision_basis?: unknown;
|
|
294
|
-
coderifts_version?: string;
|
|
295
|
-
decision_semantic_hash?: unknown;
|
|
296
|
-
control_envelope?: Record<string, unknown>;
|
|
297
|
-
meta?: Record<string, unknown>;
|
|
298
|
-
}
|
|
245
|
+
export type AuthorizeChangeSetResponse = GeneratedAuthorizeChangeSetResponse;
|
|
299
246
|
/**
|
|
300
247
|
* Union of the two preflight branches, discriminated on `preflight_mode`. Narrow before reading
|
|
301
248
|
* mode-specific fields:
|
|
@@ -309,7 +256,7 @@ export interface AuthorizeChangeSetResponse {
|
|
|
309
256
|
* }
|
|
310
257
|
* ```
|
|
311
258
|
*/
|
|
312
|
-
export type PreflightChangeSetResponse =
|
|
259
|
+
export type PreflightChangeSetResponse = GeneratedPreflightChangeSetResponse;
|
|
313
260
|
/**
|
|
314
261
|
* Intended context for a verify-receipt call — the "what are you about to do?" half of the question.
|
|
315
262
|
*
|
|
@@ -355,8 +302,11 @@ export interface VerifyReceiptResponse {
|
|
|
355
302
|
valid: boolean;
|
|
356
303
|
reason: string | null;
|
|
357
304
|
status: ReceiptStatus;
|
|
358
|
-
/**
|
|
359
|
-
|
|
305
|
+
/**
|
|
306
|
+
* Signed receipt payload when the signature is authentic. Omitted when unverifiable
|
|
307
|
+
* (route omits the key; runtime may be undefined). Present on successful authentic verifies.
|
|
308
|
+
*/
|
|
309
|
+
payload?: Record<string, unknown>;
|
|
360
310
|
/**
|
|
361
311
|
* Whether this receipt is authorized right now for the evaluated context.
|
|
362
312
|
* `true` / `false` are answers; `null` means authorization could not be evaluated
|
|
@@ -364,6 +314,11 @@ export interface VerifyReceiptResponse {
|
|
|
364
314
|
*/
|
|
365
315
|
currently_authorized: boolean | null;
|
|
366
316
|
authz_note: string;
|
|
317
|
+
/**
|
|
318
|
+
* Request/trace correlation id. Always present: the verify-receipt route sets it via
|
|
319
|
+
* buildVerifyReceiptResponse from req.correlationId (ID828) — route-owned, not dependent
|
|
320
|
+
* on the global correlationId middleware body injection. Matches X-Correlation-ID when middleware runs.
|
|
321
|
+
*/
|
|
367
322
|
correlation_id: string;
|
|
368
323
|
/** Present when intent context (e.g. operation/environment) was supplied on the request. */
|
|
369
324
|
authz_status?: string;
|