archctx-contracts 0.4.7 → 0.5.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/fixtures/valid/archctx-capabilities.json +2 -2
- package/fixtures/valid/product-version-manifest.json +6 -6
- package/fixtures/valid/projection-apply-recovery.json +9 -0
- package/package.json +1 -1
- package/schemas/runtime/archctx-capabilities.schema.json +1 -1
- package/schemas/runtime/projection-apply-recovery.schema.json +188 -0
- package/src/index.ts +1 -0
- package/src/ledger.ts +101 -5
- package/src/product-version.ts +2 -2
- package/src/projection.ts +210 -1
- package/src/refactor.ts +994 -0
- package/src/schema.ts +10 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "archcontext.capabilities/v1",
|
|
3
|
-
"package": { "name": "archctx", "version": "0.
|
|
3
|
+
"package": { "name": "archctx", "version": "0.5.1" },
|
|
4
4
|
"protocols": {
|
|
5
5
|
"projectionRequest": "archcontext.projection-request/v1",
|
|
6
6
|
"projectionResult": "archcontext.projection-result/v2",
|
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
"architectureDocs": "archcontext.docs-renderer/v4",
|
|
11
11
|
"agentContext": "archcontext.agent-context-renderer/v1"
|
|
12
12
|
},
|
|
13
|
-
"features": ["architecture-docs-renderer-v2", "architecture-refresh-signal-v1", "projection-apply-receipt-v1", "projection-protocol-v2"]
|
|
13
|
+
"features": ["architecture-docs-renderer-v2", "architecture-refresh-signal-v1", "module-statistics-v1", "projection-apply-receipt-v1", "projection-apply-recovery-v1", "projection-protocol-v2", "recommendation-v3", "refactor-assessment-v1", "refactor-resolution-v1"]
|
|
14
14
|
}
|
|
@@ -2,35 +2,35 @@
|
|
|
2
2
|
"schemaVersion": "archcontext.product-version-manifest/v1",
|
|
3
3
|
"product": {
|
|
4
4
|
"name": "archctx",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.5.1",
|
|
6
6
|
"distribution": "one-package"
|
|
7
7
|
},
|
|
8
|
-
"packageManager": "bun@1.
|
|
8
|
+
"packageManager": "bun@1.4.0",
|
|
9
9
|
"engines": {
|
|
10
10
|
"node": ">=22.22 <26"
|
|
11
11
|
},
|
|
12
12
|
"surfaces": {
|
|
13
13
|
"cli": {
|
|
14
14
|
"packageName": "@archcontext/surfaces",
|
|
15
|
-
"version": "0.
|
|
15
|
+
"version": "0.5.1",
|
|
16
16
|
"entrypoint": "archctx"
|
|
17
17
|
},
|
|
18
18
|
"daemon": {
|
|
19
19
|
"packageName": "@archcontext/local-runtime",
|
|
20
|
-
"version": "0.
|
|
20
|
+
"version": "0.5.1",
|
|
21
21
|
"entrypoint": "archctx daemon start",
|
|
22
22
|
"rpcSchemaVersion": "archcontext.runtime-rpc/v1"
|
|
23
23
|
},
|
|
24
24
|
"mcp": {
|
|
25
25
|
"packageName": "@archcontext/surfaces",
|
|
26
|
-
"version": "0.
|
|
26
|
+
"version": "0.5.1",
|
|
27
27
|
"entrypoint": "archctx mcp",
|
|
28
28
|
"transport": "stdio"
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"schemas": {
|
|
32
32
|
"schemaSetVersion": "2026-06-25.al0-ledger",
|
|
33
|
-
"contractsPackageVersion": "0.
|
|
33
|
+
"contractsPackageVersion": "0.5.1",
|
|
34
34
|
"reviewChallenge": "archcontext.review-challenge/v2",
|
|
35
35
|
"attestation": "archcontext.attestation/v2",
|
|
36
36
|
"deviceIdentity": "archcontext.device-identity/v1",
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "archcontext.projection-apply-recovery-intent/v1",
|
|
3
|
+
"requestId": "projection_request.recovery_fixture",
|
|
4
|
+
"profile": "repo-harness/v1",
|
|
5
|
+
"receipt": {
|
|
6
|
+
"lookupKey": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
|
|
7
|
+
"applyId": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
|
|
8
|
+
}
|
|
9
|
+
}
|
package/package.json
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"type": "array",
|
|
40
40
|
"minItems": 3,
|
|
41
41
|
"uniqueItems": true,
|
|
42
|
-
"items": { "enum": ["architecture-docs-renderer-v2", "architecture-refresh-signal-v1", "projection-apply-receipt-v1", "projection-protocol-v2"] }
|
|
42
|
+
"items": { "enum": ["architecture-docs-renderer-v2", "architecture-refresh-signal-v1", "module-statistics-v1", "projection-apply-receipt-v1", "projection-apply-recovery-v1", "projection-protocol-v2", "recommendation-v3", "refactor-assessment-v1", "refactor-resolution-v1"] }
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archcontext.dev/schemas/runtime/projection-apply-recovery.schema.json",
|
|
4
|
+
"title": "ProjectionApplyRecoveryV1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "enum": ["archcontext.projection-apply-recovery-intent/v1", "archcontext.projection-apply-recovery-proof/v1", "archcontext.projection-apply-recovery-result/v1"] },
|
|
10
|
+
"requestId": {},
|
|
11
|
+
"profile": {},
|
|
12
|
+
"acceptedChange": {},
|
|
13
|
+
"receipt": {},
|
|
14
|
+
"requestDigest": {},
|
|
15
|
+
"proofDigest": {},
|
|
16
|
+
"deliveryStatus": {},
|
|
17
|
+
"expectedResultingDigests": {},
|
|
18
|
+
"current": {},
|
|
19
|
+
"proof": {},
|
|
20
|
+
"refreshSignals": {}
|
|
21
|
+
},
|
|
22
|
+
"allOf": [
|
|
23
|
+
{
|
|
24
|
+
"if": { "properties": { "schemaVersion": { "const": "archcontext.projection-apply-recovery-intent/v1" } }, "required": ["schemaVersion"] },
|
|
25
|
+
"then": { "$ref": "#/$defs/intent" }
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"if": { "properties": { "schemaVersion": { "const": "archcontext.projection-apply-recovery-proof/v1" } }, "required": ["schemaVersion"] },
|
|
29
|
+
"then": { "$ref": "#/$defs/proof" }
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"if": { "properties": { "schemaVersion": { "const": "archcontext.projection-apply-recovery-result/v1" } }, "required": ["schemaVersion"] },
|
|
33
|
+
"then": { "$ref": "#/$defs/result" }
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"$defs": {
|
|
37
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
38
|
+
"generatedFrom": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"required": ["codeGraphPackage", "codeGraphVersion", "codeGraphBinaryDigest", "codeGraphStatus"],
|
|
42
|
+
"properties": {
|
|
43
|
+
"codeGraphPackage": { "const": "@colbymchenry/codegraph" },
|
|
44
|
+
"codeGraphVersion": { "const": "1.5.0" },
|
|
45
|
+
"codeGraphBinaryDigest": { "$ref": "#/$defs/digest" },
|
|
46
|
+
"codeGraphStatus": { "enum": ["ready", "unavailable"] }
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"readyGeneratedFrom": {
|
|
50
|
+
"allOf": [
|
|
51
|
+
{ "$ref": "#/$defs/generatedFrom" },
|
|
52
|
+
{ "properties": { "codeGraphStatus": { "const": "ready" } }, "required": ["codeGraphStatus"] }
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"digestSet": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"additionalProperties": false,
|
|
58
|
+
"required": ["modelDigest", "sourceTreeDigest", "flowProofDigest", "projectionDigest"],
|
|
59
|
+
"properties": {
|
|
60
|
+
"modelDigest": { "$ref": "#/$defs/digest" },
|
|
61
|
+
"sourceTreeDigest": { "$ref": "#/$defs/digest" },
|
|
62
|
+
"flowProofDigest": { "$ref": "#/$defs/digest" },
|
|
63
|
+
"projectionDigest": { "$ref": "#/$defs/digest" }
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"reasonCode": {
|
|
67
|
+
"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"]
|
|
68
|
+
},
|
|
69
|
+
"acceptedChange": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"required": ["changeSetId", "eventId", "reasonCodes", "affectedNodeIds"],
|
|
73
|
+
"properties": {
|
|
74
|
+
"changeSetId": { "type": "string", "minLength": 1 },
|
|
75
|
+
"eventId": { "type": "string", "minLength": 1 },
|
|
76
|
+
"reasonCodes": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/reasonCode" } },
|
|
77
|
+
"affectedNodeIds": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"intentReceipt": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"additionalProperties": false,
|
|
83
|
+
"required": ["lookupKey", "applyId"],
|
|
84
|
+
"properties": {
|
|
85
|
+
"lookupKey": { "$ref": "#/$defs/digest" },
|
|
86
|
+
"applyId": { "$ref": "#/$defs/digest" }
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"intent": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"additionalProperties": false,
|
|
92
|
+
"required": ["schemaVersion", "requestId", "profile", "receipt"],
|
|
93
|
+
"properties": {
|
|
94
|
+
"schemaVersion": { "const": "archcontext.projection-apply-recovery-intent/v1" },
|
|
95
|
+
"requestId": { "type": "string", "pattern": "^[a-zA-Z0-9_.:-]+$", "minLength": 1 },
|
|
96
|
+
"profile": { "const": "repo-harness/v1" },
|
|
97
|
+
"receipt": { "$ref": "#/$defs/intentReceipt" }
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"snapshot": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"additionalProperties": false,
|
|
103
|
+
"required": ["repositoryId", "workspaceId", "headSha", "baseHeadSha", "worktreeDigest", "sourceTreeDigest", "modelDigest", "codeGraphDigest", "indexedWorktreeDigest", "projectionInputDigest", "rendererVersion", "layoutVersion", "generatedFrom"],
|
|
104
|
+
"properties": {
|
|
105
|
+
"repositoryId": { "type": "string", "minLength": 1 },
|
|
106
|
+
"workspaceId": { "type": "string", "minLength": 1 },
|
|
107
|
+
"headSha": { "type": "string", "pattern": "^[a-f0-9]{40}$" },
|
|
108
|
+
"baseHeadSha": { "type": "string", "pattern": "^[a-f0-9]{40}$" },
|
|
109
|
+
"worktreeDigest": { "$ref": "#/$defs/digest" },
|
|
110
|
+
"sourceTreeDigest": { "$ref": "#/$defs/digest" },
|
|
111
|
+
"modelDigest": { "$ref": "#/$defs/digest" },
|
|
112
|
+
"codeGraphDigest": { "$ref": "#/$defs/digest" },
|
|
113
|
+
"indexedWorktreeDigest": { "type": ["string", "null"], "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
114
|
+
"projectionInputDigest": { "$ref": "#/$defs/digest" },
|
|
115
|
+
"rendererVersion": { "const": "archcontext.docs-renderer/v4" },
|
|
116
|
+
"layoutVersion": { "const": "archcontext.docs-layout/v1" },
|
|
117
|
+
"generatedFrom": { "$ref": "#/$defs/readyGeneratedFrom" }
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"proofReceipt": {
|
|
121
|
+
"type": "object",
|
|
122
|
+
"additionalProperties": false,
|
|
123
|
+
"required": ["lookupKey", "applyId", "receiptDigest"],
|
|
124
|
+
"properties": {
|
|
125
|
+
"lookupKey": { "$ref": "#/$defs/digest" },
|
|
126
|
+
"applyId": { "$ref": "#/$defs/digest" },
|
|
127
|
+
"receiptDigest": { "$ref": "#/$defs/digest" }
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"proof": {
|
|
131
|
+
"type": "object",
|
|
132
|
+
"additionalProperties": false,
|
|
133
|
+
"required": ["schemaVersion", "requestId", "requestDigest", "proofDigest", "deliveryStatus", "receipt", "acceptedChange", "expectedResultingDigests", "current"],
|
|
134
|
+
"properties": {
|
|
135
|
+
"schemaVersion": { "const": "archcontext.projection-apply-recovery-proof/v1" },
|
|
136
|
+
"requestId": { "type": "string", "pattern": "^[a-zA-Z0-9_.:-]+$", "minLength": 1 },
|
|
137
|
+
"requestDigest": { "$ref": "#/$defs/digest" },
|
|
138
|
+
"proofDigest": { "$ref": "#/$defs/digest" },
|
|
139
|
+
"deliveryStatus": { "enum": ["delivered", "already-delivered"] },
|
|
140
|
+
"receipt": { "$ref": "#/$defs/proofReceipt" },
|
|
141
|
+
"acceptedChange": { "$ref": "#/$defs/acceptedChange" },
|
|
142
|
+
"expectedResultingDigests": { "$ref": "#/$defs/digestSet" },
|
|
143
|
+
"current": {
|
|
144
|
+
"type": "object",
|
|
145
|
+
"additionalProperties": false,
|
|
146
|
+
"required": ["snapshot", "resultingDigests", "ownedOutputDigest", "fixedPointDigest"],
|
|
147
|
+
"properties": {
|
|
148
|
+
"snapshot": { "$ref": "#/$defs/snapshot" },
|
|
149
|
+
"resultingDigests": { "$ref": "#/$defs/digestSet" },
|
|
150
|
+
"ownedOutputDigest": { "$ref": "#/$defs/digest" },
|
|
151
|
+
"fixedPointDigest": { "$ref": "#/$defs/digest" }
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"refreshSignal": {
|
|
157
|
+
"type": "object",
|
|
158
|
+
"additionalProperties": false,
|
|
159
|
+
"required": ["schemaVersion", "signalId", "idempotencyKey", "mode", "repository", "worktree", "cause", "reasonCodes", "affectedNodeIds", "refreshTargets", "baseDigests", "resultingDigests", "projectionReceiptDigest"],
|
|
160
|
+
"properties": {
|
|
161
|
+
"schemaVersion": { "const": "archcontext.architecture-refresh-signal/v1" },
|
|
162
|
+
"signalId": { "$ref": "#/$defs/digest" },
|
|
163
|
+
"idempotencyKey": { "$ref": "#/$defs/digest" },
|
|
164
|
+
"mode": { "enum": ["human-action-required", "refresh-required"] },
|
|
165
|
+
"repository": { "type": "object", "additionalProperties": false, "required": ["repositoryId"], "properties": { "repositoryId": { "type": "string", "minLength": 1 } } },
|
|
166
|
+
"worktree": { "type": "object", "additionalProperties": false, "required": ["workspaceId", "headSha", "worktreeDigest"], "properties": { "workspaceId": { "type": "string", "minLength": 1 }, "headSha": { "type": "string", "pattern": "^[a-f0-9]{40}$" }, "worktreeDigest": { "$ref": "#/$defs/digest" } } },
|
|
167
|
+
"cause": { "enum": ["accepted-semantic-delta", "unresolved-major-candidate", "verified-flow-proof-delta"] },
|
|
168
|
+
"acceptedChange": { "$ref": "#/$defs/acceptedChange" },
|
|
169
|
+
"reasonCodes": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/reasonCode" } },
|
|
170
|
+
"affectedNodeIds": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
|
|
171
|
+
"refreshTargets": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "enum": ["architecture-contract-context", "architecture-readiness", "architecture-request-index", "capability-context", "capability-index"] } },
|
|
172
|
+
"baseDigests": { "$ref": "#/$defs/digestSet" },
|
|
173
|
+
"resultingDigests": { "$ref": "#/$defs/digestSet" },
|
|
174
|
+
"projectionReceiptDigest": { "$ref": "#/$defs/digest" }
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"result": {
|
|
178
|
+
"type": "object",
|
|
179
|
+
"additionalProperties": false,
|
|
180
|
+
"required": ["schemaVersion", "proof", "refreshSignals"],
|
|
181
|
+
"properties": {
|
|
182
|
+
"schemaVersion": { "const": "archcontext.projection-apply-recovery-result/v1" },
|
|
183
|
+
"proof": { "$ref": "#/$defs/proof" },
|
|
184
|
+
"refreshSignals": { "type": "array", "items": { "$ref": "#/$defs/refreshSignal" } }
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
package/src/index.ts
CHANGED
package/src/ledger.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
import type { ArchitectureMajorChangeReasonCode } from "./projection";
|
|
2
|
+
import type {
|
|
3
|
+
ArchitectureTargetDeltaV1,
|
|
4
|
+
RefactorKillListEntryV1,
|
|
5
|
+
RefactorObservationKind,
|
|
6
|
+
RefactorScale,
|
|
7
|
+
RefactorTargetOutcomeV1
|
|
8
|
+
} from "./refactor";
|
|
1
9
|
import { digestJson, type Json } from "./schema";
|
|
2
10
|
|
|
3
11
|
export const ARCHITECTURE_EVENT_SCHEMA_VERSION = "archcontext.architecture-event/v1" as const;
|
|
@@ -6,6 +14,7 @@ export const EVIDENCE_ITEM_SCHEMA_VERSION = "archcontext.evidence-item/v2" as co
|
|
|
6
14
|
export const EVIDENCE_BINDING_SCHEMA_VERSION = "archcontext.evidence-binding/v1" as const;
|
|
7
15
|
export const RECOMMENDATION_RUN_SCHEMA_VERSION = "archcontext.recommendation-run/v1" as const;
|
|
8
16
|
export const RECOMMENDATION_SCHEMA_VERSION = "archcontext.recommendation/v2" as const;
|
|
17
|
+
export const RECOMMENDATION_V3_SCHEMA_VERSION = "archcontext.recommendation/v3" as const;
|
|
9
18
|
export const RECOMMENDATION_FEEDBACK_SCHEMA_VERSION = "archcontext.recommendation-feedback/v1" as const;
|
|
10
19
|
export const AGENT_JOB_SCHEMA_VERSION = "archcontext.agent-job/v1" as const;
|
|
11
20
|
export const INVESTIGATION_REPORT_SCHEMA_VERSION = "archcontext.investigation-report/v1" as const;
|
|
@@ -14,9 +23,23 @@ export const ARCHITECTURE_CANDIDATE_DELTA_SCHEMA_VERSION = "archcontext.architec
|
|
|
14
23
|
export const ARCHITECTURE_CANDIDATE_DELTA_POLICY_SCHEMA_VERSION = "archcontext.architecture-candidate-delta-policy/v1" as const;
|
|
15
24
|
export const PROJECTION_TARGET_SCHEMA_VERSION = "archcontext.projection-target/v1" as const;
|
|
16
25
|
|
|
26
|
+
export const RECOMMENDATION_CATEGORIES = ["practice", "refactor_proposal", "structural_observation"] as const;
|
|
27
|
+
|
|
17
28
|
export type ArchitectureFactAuthority = "declared" | "observed" | "verified" | "proposed" | "projected";
|
|
18
29
|
export type ArchitectureLedgerMode = "yaml" | "dual" | "dual-compare" | "ledger-shadow" | "ledger" | "ledger-authoritative";
|
|
19
30
|
export type ArchitectureActorKind = "developer" | "daemon" | "hook" | "cli" | "mcp" | "subagent" | "migration" | "system";
|
|
31
|
+
export type ArchitectureActorSource = "cli" | "mcp" | "manual" | "daemon" | "system" | "subagent";
|
|
32
|
+
export type RecommendationCategory = (typeof RECOMMENDATION_CATEGORIES)[number];
|
|
33
|
+
export type RecommendationStatus =
|
|
34
|
+
| "open"
|
|
35
|
+
| "acknowledged"
|
|
36
|
+
| "accepted"
|
|
37
|
+
| "rejected"
|
|
38
|
+
| "deferred"
|
|
39
|
+
| "waived"
|
|
40
|
+
| "resolved"
|
|
41
|
+
| "superseded"
|
|
42
|
+
| "expired";
|
|
20
43
|
export type ArchitectureEventSource =
|
|
21
44
|
| "prepare_task"
|
|
22
45
|
| "checkpoint"
|
|
@@ -28,7 +51,8 @@ export type ArchitectureEventSource =
|
|
|
28
51
|
| "projection_reconcile"
|
|
29
52
|
| "migration"
|
|
30
53
|
| "manual"
|
|
31
|
-
| "agent_audit"
|
|
54
|
+
| "agent_audit"
|
|
55
|
+
| "refactor_scan";
|
|
32
56
|
|
|
33
57
|
export type EvidenceStrengthV2 = "heuristic" | "declared" | "observed" | "verified";
|
|
34
58
|
export type EvidencePolarityV2 = "positive" | "absence" | "declaration";
|
|
@@ -621,7 +645,7 @@ export interface RecommendationV2 {
|
|
|
621
645
|
fingerprint: string;
|
|
622
646
|
subject: string;
|
|
623
647
|
practiceId?: string;
|
|
624
|
-
status:
|
|
648
|
+
status: RecommendationStatus;
|
|
625
649
|
confidence: "low" | "medium" | "high";
|
|
626
650
|
enforcement: "advisory" | "checkpoint" | "complete";
|
|
627
651
|
risk: "low" | "medium" | "high";
|
|
@@ -639,12 +663,12 @@ export interface RecommendationFeedbackV1 {
|
|
|
639
663
|
recommendationId: string;
|
|
640
664
|
runId: string;
|
|
641
665
|
action: "acknowledge" | "accept" | "reject" | "defer" | "waive" | "resolve";
|
|
642
|
-
previousStatus:
|
|
643
|
-
nextStatus:
|
|
666
|
+
previousStatus: RecommendationStatus;
|
|
667
|
+
nextStatus: RecommendationStatus;
|
|
644
668
|
actor: {
|
|
645
669
|
kind: ArchitectureActorKind;
|
|
646
670
|
id: string;
|
|
647
|
-
source:
|
|
671
|
+
source: ArchitectureActorSource;
|
|
648
672
|
};
|
|
649
673
|
reason: string;
|
|
650
674
|
explicit: true;
|
|
@@ -655,6 +679,78 @@ export interface RecommendationFeedbackV1 {
|
|
|
655
679
|
extensions?: Record<string, Json>;
|
|
656
680
|
}
|
|
657
681
|
|
|
682
|
+
export interface RecommendationAuthorV1 {
|
|
683
|
+
kind: ArchitectureActorKind;
|
|
684
|
+
id: string;
|
|
685
|
+
source: ArchitectureActorSource;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
export interface RecommendationRelationsV1 {
|
|
689
|
+
supersedes?: string;
|
|
690
|
+
regressesFrom?: string;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
export interface PracticeRecommendationPayloadV1 {
|
|
694
|
+
practiceId: string;
|
|
695
|
+
baselineDigest: string | null;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
export interface StructuralObservationPayloadV1 {
|
|
699
|
+
assessmentDigest: string;
|
|
700
|
+
kind: RefactorObservationKind;
|
|
701
|
+
affectedNodeIds: string[];
|
|
702
|
+
baselineSnapshotDigest: string;
|
|
703
|
+
derivedOutcomes: RefactorTargetOutcomeV1[];
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
export interface RefactorProposalPayloadV1 {
|
|
707
|
+
assessmentDigest: string;
|
|
708
|
+
proposalDigest: string;
|
|
709
|
+
scale: RefactorScale;
|
|
710
|
+
affectedNodeIds: string[];
|
|
711
|
+
majorChangeReasons: ArchitectureMajorChangeReasonCode[];
|
|
712
|
+
baselineSnapshotDigest: string;
|
|
713
|
+
targetDelta?: ArchitectureTargetDeltaV1;
|
|
714
|
+
targetOutcomes: RefactorTargetOutcomeV1[];
|
|
715
|
+
killList: RefactorKillListEntryV1[];
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
export type RecommendationPayloadV1 =
|
|
719
|
+
| PracticeRecommendationPayloadV1
|
|
720
|
+
| StructuralObservationPayloadV1
|
|
721
|
+
| RefactorProposalPayloadV1;
|
|
722
|
+
|
|
723
|
+
/** Strict superset of RecommendationV2: every v2 field is kept verbatim. */
|
|
724
|
+
export interface RecommendationV3Base {
|
|
725
|
+
schemaVersion: typeof RECOMMENDATION_V3_SCHEMA_VERSION;
|
|
726
|
+
recommendationId: string;
|
|
727
|
+
runId: string;
|
|
728
|
+
fingerprint: string;
|
|
729
|
+
subject: string;
|
|
730
|
+
practiceId?: string;
|
|
731
|
+
status: RecommendationStatus;
|
|
732
|
+
confidence: "low" | "medium" | "high";
|
|
733
|
+
enforcement: "advisory" | "checkpoint" | "complete";
|
|
734
|
+
risk: "low" | "medium" | "high";
|
|
735
|
+
uncertainty: "low" | "medium" | "high";
|
|
736
|
+
evidenceBindingIds: string[];
|
|
737
|
+
explanation: string[];
|
|
738
|
+
authoredBy: RecommendationAuthorV1;
|
|
739
|
+
subjectSelectorId: string;
|
|
740
|
+
relations: RecommendationRelationsV1;
|
|
741
|
+
createdAt: string;
|
|
742
|
+
updatedAt: string;
|
|
743
|
+
extensions?: Record<string, Json>;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
/** `category` discriminates `payload`; no other combination is representable. */
|
|
747
|
+
export type RecommendationV3CategoryPayloadV1 =
|
|
748
|
+
| { category: "practice"; payload: PracticeRecommendationPayloadV1 }
|
|
749
|
+
| { category: "structural_observation"; payload: StructuralObservationPayloadV1 }
|
|
750
|
+
| { category: "refactor_proposal"; payload: RefactorProposalPayloadV1 };
|
|
751
|
+
|
|
752
|
+
export type RecommendationV3 = RecommendationV3Base & RecommendationV3CategoryPayloadV1;
|
|
753
|
+
|
|
658
754
|
export interface AgentJobV1 {
|
|
659
755
|
schemaVersion: typeof AGENT_JOB_SCHEMA_VERSION;
|
|
660
756
|
jobId: string;
|
package/src/product-version.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const ARCHCONTEXT_PRODUCT_NAME = "archctx";
|
|
2
|
-
export const ARCHCONTEXT_PRODUCT_VERSION = "0.
|
|
3
|
-
export const ARCHCONTEXT_PACKAGE_MANAGER = "bun@1.
|
|
2
|
+
export const ARCHCONTEXT_PRODUCT_VERSION = "0.5.1";
|
|
3
|
+
export const ARCHCONTEXT_PACKAGE_MANAGER = "bun@1.4.0";
|
|
4
4
|
export const ARCHCONTEXT_NODE_RANGE = ">=22.22 <26";
|
|
5
5
|
export const LOCAL_RUNTIME_RPC_SCHEMA_VERSION = "archcontext.runtime-rpc/v1";
|
|
6
6
|
export const ARCHCONTEXT_SCHEMA_SET_VERSION = "2026-07-11.explorer-view-v2";
|