archctx 0.6.3 → 0.7.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.
@@ -17,6 +17,9 @@
17
17
  "refreshSignals": { "type": "array", "description": "Canonical wire order is by signalId and cross-object receipt/snapshot bindings are enforced by projectionResultInvariantIssues.", "items": { "$ref": "#/$defs/refreshSignal" } },
18
18
  "applyReceipt": { "$ref": "#/$defs/applyIdentity" },
19
19
  "priorCommittedApplies": { "type": "array", "minItems": 1, "description": "Omitted, never empty. Canonical wire order is by changeSetId and is enforced by projectionResultInvariantIssues.", "items": { "$ref": "#/$defs/priorCommittedApply" } },
20
+ "freshness": { "$ref": "#/$defs/freshness" },
21
+ "replayed": { "const": true, "description": "A repeated apply for the same requestId and request digest returned the committed result without applying again. Excluded from receiptDigest." },
22
+ "majorChangeAcceptance": { "const": "declined-unprovable-proof", "description": "Present only when the request sent acceptObservedMajorChange and the provider declined it because a capability proof is unprovable; humanActions then carries unprovable-required-flow instead of unresolved-major-change." },
20
23
  "receiptDigest": { "$ref": "#/$defs/digest" }
21
24
  },
22
25
  "allOf": [
@@ -31,6 +34,25 @@
31
34
  "required": ["applyReceipt"],
32
35
  "properties": { "refreshSignals": { "maxItems": 0 } }
33
36
  }
37
+ },
38
+ {
39
+ "if": { "required": ["majorChangeAcceptance"] },
40
+ "then": {
41
+ "properties": {
42
+ "status": { "const": "human-action-required" },
43
+ "humanActions": {
44
+ "contains": { "properties": { "reasonCode": { "const": "unprovable-required-flow" } }, "required": ["reasonCode"] },
45
+ "not": { "contains": { "properties": { "reasonCode": { "const": "unresolved-major-change" } }, "required": ["reasonCode"] } }
46
+ }
47
+ }
48
+ }
49
+ },
50
+ {
51
+ "if": { "required": ["replayed"] },
52
+ "then": {
53
+ "required": ["applyReceipt"],
54
+ "properties": { "status": { "enum": ["applied", "applied-reconcile-required"] } }
55
+ }
34
56
  }
35
57
  ],
36
58
  "$defs": {
@@ -51,16 +73,15 @@
51
73
  "codeGraphDigest": { "$ref": "#/$defs/digest" },
52
74
  "indexedWorktreeDigest": { "$ref": "#/$defs/nullableDigest" },
53
75
  "projectionInputDigest": { "$ref": "#/$defs/digest" },
54
- "rendererVersion": { "const": "archcontext.docs-renderer/v4" },
76
+ "rendererVersion": { "const": "archcontext.docs-renderer/v5" },
55
77
  "layoutVersion": { "const": "archcontext.docs-layout/v1" },
56
78
  "generatedFrom": {
57
79
  "type": "object",
58
80
  "additionalProperties": false,
59
- "required": ["codeGraphPackage", "codeGraphVersion", "codeGraphBinaryDigest", "codeGraphStatus"],
81
+ "required": ["codeGraphPackage", "codeGraphVersion", "codeGraphStatus"],
60
82
  "properties": {
61
83
  "codeGraphPackage": { "const": "@colbymchenry/codegraph" },
62
84
  "codeGraphVersion": { "const": "1.6.1" },
63
- "codeGraphBinaryDigest": { "$ref": "#/$defs/digest" },
64
85
  "codeGraphStatus": { "enum": ["ready", "unavailable"] }
65
86
  }
66
87
  }
@@ -78,32 +99,62 @@
78
99
  },
79
100
  "action": { "enum": ["create", "delete", "unchanged", "update"] },
80
101
  "preimageDigest": { "$ref": "#/$defs/nullableDigest" },
81
- "outputDigest": { "$ref": "#/$defs/nullableDigest" }
102
+ "outputDigest": { "$ref": "#/$defs/nullableDigest" },
103
+ "preview": { "$ref": "#/$defs/filePreview" }
82
104
  },
83
105
  "allOf": [
84
106
  {
85
107
  "if": { "properties": { "action": { "const": "create" } }, "required": ["action"] },
86
- "then": { "properties": { "preimageDigest": { "const": null }, "outputDigest": { "$ref": "#/$defs/digest" } } }
108
+ "then": { "properties": { "preimageDigest": { "const": null }, "outputDigest": { "$ref": "#/$defs/digest" }, "preview": { "properties": { "format": { "const": "body" } } } } }
87
109
  },
88
110
  {
89
111
  "if": { "properties": { "action": { "const": "delete" } }, "required": ["action"] },
90
- "then": { "properties": { "preimageDigest": { "$ref": "#/$defs/digest" }, "outputDigest": { "const": null } } }
112
+ "then": { "properties": { "preimageDigest": { "$ref": "#/$defs/digest" }, "outputDigest": { "const": null }, "preview": { "properties": { "format": { "const": "unified-diff" } } } } }
91
113
  },
92
114
  {
93
115
  "if": { "properties": { "action": { "enum": ["unchanged", "update"] } }, "required": ["action"] },
94
116
  "then": { "properties": { "preimageDigest": { "$ref": "#/$defs/digest" }, "outputDigest": { "$ref": "#/$defs/digest" } } }
117
+ },
118
+ {
119
+ "if": { "properties": { "action": { "const": "update" } }, "required": ["action"] },
120
+ "then": { "properties": { "preview": { "properties": { "format": { "const": "unified-diff" } } } } }
121
+ },
122
+ {
123
+ "if": { "properties": { "action": { "const": "unchanged" } }, "required": ["action"] },
124
+ "then": { "not": { "required": ["preview"] } }
95
125
  }
96
126
  ]
97
127
  },
128
+ "filePreview": {
129
+ "type": "object",
130
+ "additionalProperties": false,
131
+ "description": "plan results only (#264): the rendered body of a create, or a unified diff of an update or delete, returned in the response and never persisted. content is cut at a line boundary to at most 65536 UTF-8 bytes per file and 1048576 per result; byteLength is the UTF-8 length of the complete content. The byte bounds and truncated/byteLength coupling are enforced by projectionResultInvariantIssues.",
132
+ "required": ["format", "content", "byteLength", "truncated"],
133
+ "properties": {
134
+ "format": { "enum": ["body", "unified-diff"] },
135
+ "content": { "type": "string", "maxLength": 65536 },
136
+ "byteLength": { "type": "integer", "minimum": 0 },
137
+ "truncated": { "type": "boolean" }
138
+ }
139
+ },
98
140
  "humanAction": {
99
141
  "type": "object",
100
142
  "additionalProperties": false,
101
143
  "required": ["reasonCode", "affectedNodeIds", "requestPayloadDigest"],
102
144
  "properties": {
103
- "reasonCode": { "enum": ["adoption-required", "manual-region-conflict", "target-collision", "unprovable-required-flow", "unresolved-major-change"] },
145
+ "reasonCode": { "enum": ["adoption-required", "manual-region-conflict", "orphaned-document-review", "target-collision", "unprovable-required-flow", "unresolved-major-change"] },
104
146
  "affectedNodeIds": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
147
+ "path": {
148
+ "type": "string",
149
+ "minLength": 1,
150
+ "description": "The orphaned managed document a human must review. Present exactly when reasonCode is orphaned-document-review.",
151
+ "not": { "anyOf": [{ "pattern": "^/" }, { "pattern": "\\\\" }, { "pattern": "(^|/)\\.\\.(/|$)" }] }
152
+ },
105
153
  "requestPayloadDigest": { "$ref": "#/$defs/digest" }
106
- }
154
+ },
155
+ "if": { "properties": { "reasonCode": { "const": "orphaned-document-review" } }, "required": ["reasonCode"] },
156
+ "then": { "required": ["path"] },
157
+ "else": { "not": { "required": ["path"] } }
107
158
  },
108
159
  "digestSet": {
109
160
  "type": "object",
@@ -116,6 +167,27 @@
116
167
  "projectionDigest": { "$ref": "#/$defs/digest" }
117
168
  }
118
169
  },
170
+ "capabilityChange": {
171
+ "type": "object",
172
+ "additionalProperties": false,
173
+ "required": ["capabilityId", "reasonCodes", "changedFacets", "proofStatusBefore", "proofStatusAfter"],
174
+ "properties": {
175
+ "capabilityId": { "type": "string", "minLength": 1 },
176
+ "reasonCodes": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/reasonCode" } },
177
+ "changedFacets": { "type": "array", "uniqueItems": true, "items": { "enum": ["constraints", "entrypoints", "interfaces", "lifecycle", "names", "ownership", "placement", "relations", "responsibilities", "riskBoundaries"] } },
178
+ "proofStatusBefore": { "anyOf": [{ "type": "null" }, { "$ref": "#/$defs/proofStatus" }] },
179
+ "proofStatusAfter": { "anyOf": [{ "type": "null" }, { "$ref": "#/$defs/proofStatus" }] }
180
+ }
181
+ },
182
+ "proofStatus": {
183
+ "type": "object",
184
+ "additionalProperties": false,
185
+ "required": ["p1", "p2"],
186
+ "properties": {
187
+ "p1": { "enum": ["proven", "unprovable"] },
188
+ "p2": { "enum": ["not-applicable", "proven", "unprovable"] }
189
+ }
190
+ },
119
191
  "reasonCode": {
120
192
  "enum": ["constraint-changed", "entrypoint-changed", "interface-changed", "lifecycle-changed", "node-added", "node-moved", "node-removed", "node-renamed", "ownership-changed", "relation-changed", "responsibility-changed", "risk-boundary-changed", "verified-flow-proof-changed"]
121
193
  },
@@ -143,6 +215,7 @@
143
215
  "acceptedChange": { "$ref": "#/$defs/acceptedChange" },
144
216
  "reasonCodes": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/reasonCode" } },
145
217
  "affectedNodeIds": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
218
+ "capabilities": { "type": "array", "minItems": 1, "description": "The observed per-capability breakdown of this signal, sorted by capabilityId (enforced by architectureRefreshSignalInvariantIssues). Part of the signal identity; signals committed before it existed lack it.", "items": { "$ref": "#/$defs/capabilityChange" } },
146
219
  "refreshTargets": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "enum": ["architecture-contract-context", "architecture-readiness", "architecture-request-index", "capability-context", "capability-index"] } },
147
220
  "baseDigests": { "$ref": "#/$defs/digestSet" },
148
221
  "resultingDigests": { "$ref": "#/$defs/digestSet" },
@@ -167,6 +240,33 @@
167
240
  "affectedNodeIds": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }
168
241
  }
169
242
  },
243
+ "freshness": {
244
+ "type": "object",
245
+ "additionalProperties": false,
246
+ "description": "Present on check results only. Canonical wire orders and the ok/reasonCodes/staleNodes coupling are enforced by projectionResultInvariantIssues.",
247
+ "required": ["ok", "reasonCodes", "staleNodes"],
248
+ "properties": {
249
+ "ok": { "type": "boolean" },
250
+ "reasonCodes": {
251
+ "type": "array",
252
+ "uniqueItems": true,
253
+ "items": { "enum": ["projection-manifest-missing", "projection-manifest-unreadable", "projection-snapshot-provenance-missing", "projection-source-changed-since-stamp", "projection-source-stamp-invalid", "projection-source-stamp-missing", "projection-source-tree-digest-mismatch"] }
254
+ },
255
+ "staleNodes": {
256
+ "type": "array",
257
+ "items": {
258
+ "type": "object",
259
+ "additionalProperties": false,
260
+ "required": ["nodeId", "stampedDigest", "currentDigest"],
261
+ "properties": {
262
+ "nodeId": { "type": "string", "minLength": 1 },
263
+ "stampedDigest": { "$ref": "#/$defs/digest" },
264
+ "currentDigest": { "$ref": "#/$defs/digest" }
265
+ }
266
+ }
267
+ }
268
+ }
269
+ },
170
270
  "priorCommittedApply": {
171
271
  "type": "object",
172
272
  "additionalProperties": false,