archctx-contracts 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fixtures/invalid/projection-result-applied-incomplete-coverage.json +3 -3
- package/fixtures/valid/archctx-capabilities.json +2 -2
- package/fixtures/valid/flow-selector-check.json +1 -1
- package/fixtures/valid/product-version-manifest.json +5 -11
- package/fixtures/valid/projection-manifest.json +1 -1
- package/fixtures/valid/projection-result.json +3 -3
- package/package.json +4 -1
- package/schemas/repo/refactor-decision.schema.json +283 -37
- package/schemas/runtime/archctx-capabilities.schema.json +144 -20
- package/schemas/runtime/architecture-debt-delta.schema.json +58 -19
- package/schemas/runtime/architecture-debt.schema.json +42 -42
- package/schemas/runtime/architecture-event.schema.json +1 -1
- package/schemas/runtime/architecture-history.schema.json +354 -0
- package/schemas/runtime/capability-dependencies.schema.json +266 -59
- package/schemas/runtime/cli-check.schema.json +197 -0
- package/schemas/runtime/cli-help.schema.json +28 -0
- package/schemas/runtime/dependency-constraint-evaluation.schema.json +67 -68
- package/schemas/runtime/docs-anchors.schema.json +250 -67
- package/schemas/runtime/doctor-code-facts.schema.json +49 -0
- package/schemas/runtime/evidence-binding.schema.json +1 -1
- package/schemas/runtime/flow-selector-check.schema.json +179 -46
- package/schemas/runtime/hook-debt-checkpoint.schema.json +12 -12
- package/schemas/runtime/index-seed.schema.json +56 -0
- package/schemas/runtime/path-context.schema.json +108 -0
- package/schemas/runtime/product-version-manifest.schema.json +142 -54
- package/schemas/runtime/projection-apply-readback.schema.json +2 -2
- package/schemas/runtime/projection-apply-recovery.schema.json +1 -1
- package/schemas/runtime/projection-result.schema.json +1 -1
- package/schemas/runtime/projection-slice.schema.json +34 -34
- package/schemas/runtime/recommendation-v3.schema.json +372 -1
- package/schemas/runtime/ref-impact-batch-request.schema.json +20 -7
- package/schemas/runtime/ref-impact-batch.schema.json +83 -13
- package/schemas/runtime/ref-impact.schema.json +68 -61
- package/schemas/runtime/refactor-scan-v2.schema.json +434 -0
- package/schemas/runtime/refactor-simulate.schema.json +505 -0
- package/schemas/runtime/refactor-verify-v2.schema.json +172 -0
- package/schemas/runtime/resolve-path.schema.json +69 -0
- package/schemas/runtime/runtime-recommendation-show.schema.json +531 -2
- package/schemas/runtime/runtime-refactor-scan.schema.json +498 -2
- package/schemas/runtime/runtime-verify.schema.json +274 -56
- package/schemas/runtime/state-machine-check.schema.json +357 -89
- package/schemas/runtime/structural-observation-payload.schema.json +372 -1
- package/schemas/runtime/sync-check.schema.json +65 -0
- package/src/architecture-debt.ts +125 -38
- package/src/architecture-history.ts +168 -42
- package/src/architecture.ts +100 -0
- package/src/cli-read.ts +228 -0
- package/src/docs-anchors.ts +105 -50
- package/src/explorer-occurrence-ports.ts +175 -0
- package/src/explorer-query-ports.ts +270 -0
- package/src/failure.ts +3 -0
- package/src/index-seed.ts +42 -0
- package/src/index.ts +5 -0
- package/src/ledger-records.ts +262 -0
- package/src/ledger.ts +27 -566
- package/src/ownership-dependencies.ts +115 -5
- package/src/ports.ts +12 -543
- package/src/product-version.ts +75 -56
- package/src/projection-apply-types.ts +216 -0
- package/src/projection-apply-validators.ts +355 -0
- package/src/projection-capabilities.ts +181 -0
- package/src/projection-constants.ts +317 -0
- package/src/projection-manifest-types.ts +298 -0
- package/src/projection-manifest.ts +12 -299
- package/src/projection-recovery-validators.ts +229 -0
- package/src/projection-request-validators.ts +326 -0
- package/src/projection-types.ts +365 -0
- package/src/projection-validation-helpers.ts +15 -0
- package/src/projection.ts +7 -1689
- package/src/ref-impact.ts +225 -33
- package/src/refactor-constants.ts +213 -0
- package/src/refactor-decision-validators.ts +350 -0
- package/src/refactor-evidence-types.ts +286 -0
- package/src/refactor-observation-validators.ts +359 -0
- package/src/refactor-resolution-validators.ts +229 -0
- package/src/refactor-snapshot-validators.ts +368 -0
- package/src/refactor-types.ts +270 -0
- package/src/refactor-v2.ts +389 -0
- package/src/refactor-validation-helpers.ts +195 -0
- package/src/refactor.ts +7 -1849
- package/src/review-guards.ts +3 -23
- package/src/runtime-verify.ts +87 -0
- package/src/schema-kit.ts +183 -0
- package/src/schema-registry.ts +73 -0
- package/src/schema.ts +0 -4
- package/src/state-machine-schemas.ts +192 -0
- package/src/state-machine-types.ts +188 -0
- package/src/state-machine.ts +9 -189
- package/fixtures/boundary/agent-job-expired.json +0 -33
- package/fixtures/invalid/adapter-fidelity-reverse-sync.json +0 -9
- package/fixtures/invalid/agent-job-direct-mutation.json +0 -32
- package/fixtures/invalid/cloud-egress-envelope-private-field.json +0 -12
- package/fixtures/invalid/investigation-report-direct-mutation.json +0 -38
- package/fixtures/invalid/investigation-report-missing-proposed-delta.json +0 -19
- package/fixtures/invalid/notification-event-code-field.json +0 -11
- package/fixtures/valid/adapter-fidelity.json +0 -9
- package/fixtures/valid/agent-job.json +0 -33
- package/fixtures/valid/architecture-candidate-delta-policy.json +0 -45
- package/fixtures/valid/architecture-candidate-delta.json +0 -188
- package/fixtures/valid/chatgpt-ga-tool.json +0 -9
- package/fixtures/valid/cloud-egress-envelope.json +0 -11
- package/fixtures/valid/entitlement.json +0 -12
- package/fixtures/valid/investigation-report.json +0 -38
- package/fixtures/valid/likec4-mapping.json +0 -14
- package/fixtures/valid/notification-event.json +0 -10
- package/fixtures/valid/notification-provider.json +0 -12
- package/fixtures/valid/structurizr-mapping.json +0 -15
- package/schemas/cloud/cloud-egress-envelope.schema.json +0 -19
- package/schemas/cloud/entitlement.schema.json +0 -24
- package/schemas/integrations/adapter-fidelity.schema.json +0 -21
- package/schemas/integrations/chatgpt-ga-tool.schema.json +0 -25
- package/schemas/integrations/likec4-mapping.schema.json +0 -32
- package/schemas/integrations/structurizr-mapping.schema.json +0 -33
- package/schemas/runtime/agent-job.schema.json +0 -63
- package/schemas/runtime/architecture-candidate-delta-policy.schema.json +0 -129
- package/schemas/runtime/architecture-candidate-delta.schema.json +0 -386
- package/schemas/runtime/investigation-report.schema.json +0 -119
- package/schemas/runtime/notification-event.schema.json +0 -18
- package/schemas/runtime/notification-provider.schema.json +0 -26
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://archcontext.dev/schemas/runtime/architecture-candidate-delta-policy.schema.json",
|
|
4
|
-
"title": "Architecture Candidate Delta Policy Evaluation",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"additionalProperties": false,
|
|
7
|
-
"required": [
|
|
8
|
-
"schemaVersion",
|
|
9
|
-
"evaluationId",
|
|
10
|
-
"deltaId",
|
|
11
|
-
"repository",
|
|
12
|
-
"worktree",
|
|
13
|
-
"deltaDigest",
|
|
14
|
-
"policyVersion",
|
|
15
|
-
"evaluatedAt",
|
|
16
|
-
"decisions",
|
|
17
|
-
"summary",
|
|
18
|
-
"evaluationDigest"
|
|
19
|
-
],
|
|
20
|
-
"properties": {
|
|
21
|
-
"schemaVersion": { "const": "archcontext.architecture-candidate-delta-policy/v1" },
|
|
22
|
-
"evaluationId": { "type": "string", "pattern": "^candidate_delta_policy\\.[a-zA-Z0-9_.-]+$" },
|
|
23
|
-
"deltaId": { "type": "string", "pattern": "^delta\\.[a-zA-Z0-9_.-]+$" },
|
|
24
|
-
"repository": {
|
|
25
|
-
"type": "object",
|
|
26
|
-
"additionalProperties": false,
|
|
27
|
-
"required": ["repositoryId", "storageRepositoryId"],
|
|
28
|
-
"properties": {
|
|
29
|
-
"repositoryId": { "type": "string" },
|
|
30
|
-
"storageRepositoryId": { "type": "string" }
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"worktree": {
|
|
34
|
-
"type": "object",
|
|
35
|
-
"additionalProperties": false,
|
|
36
|
-
"required": ["workspaceId", "storageWorkspaceId", "branch", "headSha", "worktreeDigest"],
|
|
37
|
-
"properties": {
|
|
38
|
-
"workspaceId": { "type": "string" },
|
|
39
|
-
"storageWorkspaceId": { "type": "string" },
|
|
40
|
-
"branch": { "type": "string" },
|
|
41
|
-
"headSha": { "type": "string" },
|
|
42
|
-
"worktreeDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"deltaDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
46
|
-
"policyVersion": { "type": "string" },
|
|
47
|
-
"evaluatedAt": { "type": "string", "format": "date-time" },
|
|
48
|
-
"decisions": {
|
|
49
|
-
"type": "array",
|
|
50
|
-
"items": {
|
|
51
|
-
"type": "object",
|
|
52
|
-
"additionalProperties": false,
|
|
53
|
-
"required": [
|
|
54
|
-
"decisionId",
|
|
55
|
-
"candidateChangeId",
|
|
56
|
-
"target",
|
|
57
|
-
"stateDimension",
|
|
58
|
-
"changeKind",
|
|
59
|
-
"confidence",
|
|
60
|
-
"action",
|
|
61
|
-
"reasonCodes",
|
|
62
|
-
"evidenceIds",
|
|
63
|
-
"digest"
|
|
64
|
-
],
|
|
65
|
-
"properties": {
|
|
66
|
-
"decisionId": { "type": "string", "pattern": "^candidate_delta_policy_decision\\.[a-zA-Z0-9_.-]+$" },
|
|
67
|
-
"candidateChangeId": { "type": "string", "pattern": "^candidate_change\\.[a-zA-Z0-9_.-]+$" },
|
|
68
|
-
"target": {
|
|
69
|
-
"type": "object",
|
|
70
|
-
"additionalProperties": false,
|
|
71
|
-
"required": ["kind", "id"],
|
|
72
|
-
"properties": {
|
|
73
|
-
"kind": { "enum": ["node", "relation", "constraint", "owner", "lifecycle", "migration-state"] },
|
|
74
|
-
"id": { "type": "string" },
|
|
75
|
-
"parentId": { "type": "string" }
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
"stateDimension": { "enum": ["target-state", "migration-state"] },
|
|
79
|
-
"changeKind": { "enum": ["added", "removed", "moved", "renamed", "materially_changed"] },
|
|
80
|
-
"confidence": { "enum": ["low", "medium", "high"] },
|
|
81
|
-
"action": { "enum": ["auto-accept", "require-checkpoint", "require-proof", "require-human-approval"] },
|
|
82
|
-
"reasonCodes": {
|
|
83
|
-
"type": "array",
|
|
84
|
-
"items": {
|
|
85
|
-
"enum": [
|
|
86
|
-
"high-confidence-complete-evidence",
|
|
87
|
-
"medium-confidence",
|
|
88
|
-
"low-confidence",
|
|
89
|
-
"partial-evidence",
|
|
90
|
-
"missing-evidence",
|
|
91
|
-
"mapping-ambiguity",
|
|
92
|
-
"migration-state-progress",
|
|
93
|
-
"target-state-removal",
|
|
94
|
-
"relation-removal",
|
|
95
|
-
"constraint-relaxation",
|
|
96
|
-
"owner-authority-change"
|
|
97
|
-
]
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
"evidenceIds": { "type": "array", "items": { "type": "string" } },
|
|
101
|
-
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
102
|
-
"extensions": { "type": "object", "additionalProperties": true }
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
"summary": {
|
|
107
|
-
"type": "object",
|
|
108
|
-
"additionalProperties": false,
|
|
109
|
-
"required": [
|
|
110
|
-
"candidateChanges",
|
|
111
|
-
"autoAccept",
|
|
112
|
-
"requireCheckpoint",
|
|
113
|
-
"requireProof",
|
|
114
|
-
"requireHumanApproval",
|
|
115
|
-
"mappingAmbiguities"
|
|
116
|
-
],
|
|
117
|
-
"properties": {
|
|
118
|
-
"candidateChanges": { "type": "integer", "minimum": 0 },
|
|
119
|
-
"autoAccept": { "type": "integer", "minimum": 0 },
|
|
120
|
-
"requireCheckpoint": { "type": "integer", "minimum": 0 },
|
|
121
|
-
"requireProof": { "type": "integer", "minimum": 0 },
|
|
122
|
-
"requireHumanApproval": { "type": "integer", "minimum": 0 },
|
|
123
|
-
"mappingAmbiguities": { "type": "integer", "minimum": 0 }
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
"evaluationDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
127
|
-
"extensions": { "type": "object", "additionalProperties": true }
|
|
128
|
-
}
|
|
129
|
-
}
|
|
@@ -1,386 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://archcontext.dev/schemas/runtime/architecture-candidate-delta.schema.json",
|
|
4
|
-
"title": "ArchitectureCandidateDelta",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"additionalProperties": false,
|
|
7
|
-
"required": [
|
|
8
|
-
"schemaVersion",
|
|
9
|
-
"deltaId",
|
|
10
|
-
"repository",
|
|
11
|
-
"worktree",
|
|
12
|
-
"changeCursor",
|
|
13
|
-
"subjectSelectors",
|
|
14
|
-
"changedSubjects",
|
|
15
|
-
"rawFacts",
|
|
16
|
-
"interpretations",
|
|
17
|
-
"declaredSubjectMappings",
|
|
18
|
-
"mappingAmbiguities",
|
|
19
|
-
"candidateChanges",
|
|
20
|
-
"evidenceItems",
|
|
21
|
-
"evidenceBindings",
|
|
22
|
-
"summary",
|
|
23
|
-
"deltaDigest"
|
|
24
|
-
],
|
|
25
|
-
"properties": {
|
|
26
|
-
"schemaVersion": { "const": "archcontext.architecture-candidate-delta/v1" },
|
|
27
|
-
"deltaId": { "type": "string", "pattern": "^delta\\.[a-zA-Z0-9_.-]+$" },
|
|
28
|
-
"repository": {
|
|
29
|
-
"type": "object",
|
|
30
|
-
"additionalProperties": false,
|
|
31
|
-
"required": ["repositoryId", "storageRepositoryId"],
|
|
32
|
-
"properties": {
|
|
33
|
-
"repositoryId": { "type": "string" },
|
|
34
|
-
"storageRepositoryId": { "type": "string" }
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
"worktree": {
|
|
38
|
-
"type": "object",
|
|
39
|
-
"additionalProperties": false,
|
|
40
|
-
"required": ["workspaceId", "storageWorkspaceId", "branch", "headSha", "worktreeDigest"],
|
|
41
|
-
"properties": {
|
|
42
|
-
"workspaceId": { "type": "string" },
|
|
43
|
-
"storageWorkspaceId": { "type": "string" },
|
|
44
|
-
"branch": { "type": "string" },
|
|
45
|
-
"headSha": { "type": "string" },
|
|
46
|
-
"worktreeDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"changeCursor": {
|
|
50
|
-
"type": "object",
|
|
51
|
-
"additionalProperties": false,
|
|
52
|
-
"required": ["source", "changeSource", "headSha", "pathCount", "metadataDigest", "codeFactsDigest"],
|
|
53
|
-
"properties": {
|
|
54
|
-
"source": { "const": "git" },
|
|
55
|
-
"changeSource": { "enum": ["commit", "staged", "worktree"] },
|
|
56
|
-
"baseSha": { "type": "string" },
|
|
57
|
-
"headSha": { "type": "string" },
|
|
58
|
-
"pathCount": { "type": "integer", "minimum": 0 },
|
|
59
|
-
"metadataDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
60
|
-
"codeFactsDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"subjectSelectors": {
|
|
64
|
-
"type": "array",
|
|
65
|
-
"items": { "$ref": "architecture-subject-selector.schema.json" }
|
|
66
|
-
},
|
|
67
|
-
"changedSubjects": {
|
|
68
|
-
"type": "array",
|
|
69
|
-
"items": {
|
|
70
|
-
"type": "object",
|
|
71
|
-
"additionalProperties": false,
|
|
72
|
-
"required": ["subjectSelectorId", "changeKind", "rawFactIds", "evidenceIds", "digest"],
|
|
73
|
-
"properties": {
|
|
74
|
-
"subjectSelectorId": { "type": "string" },
|
|
75
|
-
"changeKind": { "enum": ["added", "removed", "moved", "renamed", "materially_changed"] },
|
|
76
|
-
"previousSelectorId": { "type": "string" },
|
|
77
|
-
"rawFactIds": { "type": "array", "items": { "type": "string" } },
|
|
78
|
-
"evidenceIds": { "type": "array", "items": { "type": "string" } },
|
|
79
|
-
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
"rawFacts": {
|
|
84
|
-
"type": "array",
|
|
85
|
-
"items": {
|
|
86
|
-
"type": "object",
|
|
87
|
-
"additionalProperties": false,
|
|
88
|
-
"required": ["factId", "kind", "subjectSelectorId", "source", "summary", "evidenceIds", "digest"],
|
|
89
|
-
"properties": {
|
|
90
|
-
"factId": { "type": "string", "pattern": "^fact\\.[a-zA-Z0-9_.-]+$" },
|
|
91
|
-
"kind": { "enum": ["git-path-change", "codegraph-symbol", "codegraph-relation"] },
|
|
92
|
-
"subjectSelectorId": { "type": "string" },
|
|
93
|
-
"source": { "enum": ["git", "codegraph"] },
|
|
94
|
-
"summary": { "type": "string" },
|
|
95
|
-
"evidenceIds": { "type": "array", "items": { "type": "string" } },
|
|
96
|
-
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
97
|
-
"extensions": { "type": "object", "additionalProperties": true }
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
"interpretations": {
|
|
102
|
-
"type": "array",
|
|
103
|
-
"items": {
|
|
104
|
-
"type": "object",
|
|
105
|
-
"additionalProperties": false,
|
|
106
|
-
"required": ["interpretationId", "kind", "subjectSelectorId", "evidenceIds", "confidence", "coverage", "heuristic", "summary", "digest"],
|
|
107
|
-
"properties": {
|
|
108
|
-
"interpretationId": { "type": "string", "pattern": "^interpretation\\.[a-zA-Z0-9_.-]+$" },
|
|
109
|
-
"kind": { "enum": ["code-subject-added", "code-subject-removed", "code-subject-moved", "code-subject-renamed", "code-subject-materially-changed"] },
|
|
110
|
-
"subjectSelectorId": { "type": "string" },
|
|
111
|
-
"evidenceIds": { "type": "array", "items": { "type": "string" } },
|
|
112
|
-
"confidence": { "enum": ["low", "medium", "high"] },
|
|
113
|
-
"coverage": { "enum": ["complete", "partial", "unknown"] },
|
|
114
|
-
"heuristic": { "const": true },
|
|
115
|
-
"summary": { "type": "string" },
|
|
116
|
-
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
117
|
-
"extensions": { "type": "object", "additionalProperties": true }
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
"declaredSubjectMappings": {
|
|
122
|
-
"type": "array",
|
|
123
|
-
"items": {
|
|
124
|
-
"type": "object",
|
|
125
|
-
"additionalProperties": false,
|
|
126
|
-
"required": ["mappingId", "subjectSelectorId", "target", "matchReason", "confidence", "evidenceIds", "digest"],
|
|
127
|
-
"properties": {
|
|
128
|
-
"mappingId": { "type": "string", "pattern": "^mapping\\.[a-zA-Z0-9_.-]+$" },
|
|
129
|
-
"subjectSelectorId": { "type": "string" },
|
|
130
|
-
"target": {
|
|
131
|
-
"type": "object",
|
|
132
|
-
"additionalProperties": false,
|
|
133
|
-
"required": ["kind", "id"],
|
|
134
|
-
"properties": {
|
|
135
|
-
"kind": { "enum": ["entity", "relation", "constraint"] },
|
|
136
|
-
"id": { "type": "string" }
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
"matchReason": {
|
|
140
|
-
"enum": [
|
|
141
|
-
"declared-path-exact",
|
|
142
|
-
"declared-path-prefix",
|
|
143
|
-
"declared-name-match",
|
|
144
|
-
"declared-relation-endpoints",
|
|
145
|
-
"declared-constraint-subject"
|
|
146
|
-
]
|
|
147
|
-
},
|
|
148
|
-
"confidence": { "enum": ["low", "medium", "high"] },
|
|
149
|
-
"evidenceIds": { "type": "array", "items": { "type": "string" } },
|
|
150
|
-
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
151
|
-
"extensions": { "type": "object", "additionalProperties": true }
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
"mappingAmbiguities": {
|
|
156
|
-
"type": "array",
|
|
157
|
-
"items": {
|
|
158
|
-
"type": "object",
|
|
159
|
-
"additionalProperties": false,
|
|
160
|
-
"required": ["ambiguityId", "subjectSelectorId", "reasonCode", "candidateTargets", "evidenceIds", "summary", "digest"],
|
|
161
|
-
"properties": {
|
|
162
|
-
"ambiguityId": { "type": "string", "pattern": "^ambiguity\\.[a-zA-Z0-9_.-]+$" },
|
|
163
|
-
"subjectSelectorId": { "type": "string" },
|
|
164
|
-
"reasonCode": {
|
|
165
|
-
"enum": [
|
|
166
|
-
"declared-graph-unavailable",
|
|
167
|
-
"no-declared-target",
|
|
168
|
-
"multiple-declared-targets",
|
|
169
|
-
"relation-endpoint-unmapped"
|
|
170
|
-
]
|
|
171
|
-
},
|
|
172
|
-
"candidateTargets": {
|
|
173
|
-
"type": "array",
|
|
174
|
-
"items": {
|
|
175
|
-
"type": "object",
|
|
176
|
-
"additionalProperties": false,
|
|
177
|
-
"required": ["target", "matchReason", "confidence"],
|
|
178
|
-
"properties": {
|
|
179
|
-
"target": {
|
|
180
|
-
"type": "object",
|
|
181
|
-
"additionalProperties": false,
|
|
182
|
-
"required": ["kind", "id"],
|
|
183
|
-
"properties": {
|
|
184
|
-
"kind": { "enum": ["entity", "relation", "constraint"] },
|
|
185
|
-
"id": { "type": "string" }
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
"matchReason": {
|
|
189
|
-
"enum": [
|
|
190
|
-
"declared-path-exact",
|
|
191
|
-
"declared-path-prefix",
|
|
192
|
-
"declared-name-match",
|
|
193
|
-
"declared-relation-endpoints",
|
|
194
|
-
"declared-constraint-subject"
|
|
195
|
-
]
|
|
196
|
-
},
|
|
197
|
-
"confidence": { "enum": ["low", "medium", "high"] }
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
},
|
|
201
|
-
"evidenceIds": { "type": "array", "items": { "type": "string" } },
|
|
202
|
-
"summary": { "type": "string" },
|
|
203
|
-
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
204
|
-
"extensions": { "type": "object", "additionalProperties": true }
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
"candidateChanges": {
|
|
209
|
-
"type": "array",
|
|
210
|
-
"items": {
|
|
211
|
-
"type": "object",
|
|
212
|
-
"additionalProperties": false,
|
|
213
|
-
"required": [
|
|
214
|
-
"candidateChangeId",
|
|
215
|
-
"kind",
|
|
216
|
-
"target",
|
|
217
|
-
"stateDimension",
|
|
218
|
-
"changeKind",
|
|
219
|
-
"subjectSelectorIds",
|
|
220
|
-
"mappingIds",
|
|
221
|
-
"ambiguityIds",
|
|
222
|
-
"evidenceIds",
|
|
223
|
-
"confidence",
|
|
224
|
-
"heuristic",
|
|
225
|
-
"summary",
|
|
226
|
-
"digest"
|
|
227
|
-
],
|
|
228
|
-
"properties": {
|
|
229
|
-
"candidateChangeId": { "type": "string", "pattern": "^candidate_change\\.[a-zA-Z0-9_.-]+$" },
|
|
230
|
-
"kind": {
|
|
231
|
-
"enum": [
|
|
232
|
-
"node-added",
|
|
233
|
-
"node-removed",
|
|
234
|
-
"node-moved",
|
|
235
|
-
"node-renamed",
|
|
236
|
-
"node-materially-changed",
|
|
237
|
-
"relation-added",
|
|
238
|
-
"relation-removed",
|
|
239
|
-
"relation-moved",
|
|
240
|
-
"relation-renamed",
|
|
241
|
-
"relation-materially-changed",
|
|
242
|
-
"constraint-added",
|
|
243
|
-
"constraint-removed",
|
|
244
|
-
"constraint-moved",
|
|
245
|
-
"constraint-renamed",
|
|
246
|
-
"constraint-materially-changed",
|
|
247
|
-
"owner-added",
|
|
248
|
-
"owner-removed",
|
|
249
|
-
"owner-moved",
|
|
250
|
-
"owner-renamed",
|
|
251
|
-
"owner-materially-changed",
|
|
252
|
-
"lifecycle-added",
|
|
253
|
-
"lifecycle-removed",
|
|
254
|
-
"lifecycle-moved",
|
|
255
|
-
"lifecycle-renamed",
|
|
256
|
-
"lifecycle-materially-changed",
|
|
257
|
-
"migration-state-added",
|
|
258
|
-
"migration-state-removed",
|
|
259
|
-
"migration-state-moved",
|
|
260
|
-
"migration-state-renamed",
|
|
261
|
-
"migration-state-materially-changed"
|
|
262
|
-
]
|
|
263
|
-
},
|
|
264
|
-
"target": {
|
|
265
|
-
"type": "object",
|
|
266
|
-
"additionalProperties": false,
|
|
267
|
-
"required": ["kind", "id"],
|
|
268
|
-
"properties": {
|
|
269
|
-
"kind": { "enum": ["node", "relation", "constraint", "owner", "lifecycle", "migration-state"] },
|
|
270
|
-
"id": { "type": "string" },
|
|
271
|
-
"parentId": { "type": "string" }
|
|
272
|
-
}
|
|
273
|
-
},
|
|
274
|
-
"stateDimension": { "enum": ["target-state", "migration-state"] },
|
|
275
|
-
"changeKind": { "enum": ["added", "removed", "moved", "renamed", "materially_changed"] },
|
|
276
|
-
"subjectSelectorIds": { "type": "array", "items": { "type": "string" } },
|
|
277
|
-
"mappingIds": { "type": "array", "items": { "type": "string" } },
|
|
278
|
-
"ambiguityIds": { "type": "array", "items": { "type": "string" } },
|
|
279
|
-
"evidenceIds": { "type": "array", "items": { "type": "string" } },
|
|
280
|
-
"confidence": { "enum": ["low", "medium", "high"] },
|
|
281
|
-
"heuristic": { "const": true },
|
|
282
|
-
"summary": { "type": "string" },
|
|
283
|
-
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
284
|
-
"extensions": { "type": "object", "additionalProperties": true }
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
},
|
|
288
|
-
"evidenceItems": {
|
|
289
|
-
"type": "array",
|
|
290
|
-
"items": { "$ref": "evidence-item.schema.json" }
|
|
291
|
-
},
|
|
292
|
-
"evidenceBindings": {
|
|
293
|
-
"type": "array",
|
|
294
|
-
"items": { "$ref": "evidence-binding.schema.json" }
|
|
295
|
-
},
|
|
296
|
-
"summary": {
|
|
297
|
-
"type": "object",
|
|
298
|
-
"additionalProperties": false,
|
|
299
|
-
"required": [
|
|
300
|
-
"added",
|
|
301
|
-
"removed",
|
|
302
|
-
"moved",
|
|
303
|
-
"renamed",
|
|
304
|
-
"materiallyChanged",
|
|
305
|
-
"unresolved",
|
|
306
|
-
"mapped",
|
|
307
|
-
"ambiguous",
|
|
308
|
-
"candidateChanges",
|
|
309
|
-
"targetStateChanges",
|
|
310
|
-
"migrationStateProgress",
|
|
311
|
-
"mappingCoverage",
|
|
312
|
-
"unresolvedSubjects",
|
|
313
|
-
"evidenceStrengthDistribution"
|
|
314
|
-
],
|
|
315
|
-
"properties": {
|
|
316
|
-
"added": { "type": "integer", "minimum": 0 },
|
|
317
|
-
"removed": { "type": "integer", "minimum": 0 },
|
|
318
|
-
"moved": { "type": "integer", "minimum": 0 },
|
|
319
|
-
"renamed": { "type": "integer", "minimum": 0 },
|
|
320
|
-
"materiallyChanged": { "type": "integer", "minimum": 0 },
|
|
321
|
-
"unresolved": { "type": "integer", "minimum": 0 },
|
|
322
|
-
"mapped": { "type": "integer", "minimum": 0 },
|
|
323
|
-
"ambiguous": { "type": "integer", "minimum": 0 },
|
|
324
|
-
"candidateChanges": { "type": "integer", "minimum": 0 },
|
|
325
|
-
"targetStateChanges": { "type": "integer", "minimum": 0 },
|
|
326
|
-
"migrationStateProgress": { "type": "integer", "minimum": 0 },
|
|
327
|
-
"mappingCoverage": {
|
|
328
|
-
"type": "object",
|
|
329
|
-
"additionalProperties": false,
|
|
330
|
-
"required": [
|
|
331
|
-
"totalChangedSubjects",
|
|
332
|
-
"mappedSubjects",
|
|
333
|
-
"unresolvedSubjects",
|
|
334
|
-
"ambiguousSubjects",
|
|
335
|
-
"coveragePercent"
|
|
336
|
-
],
|
|
337
|
-
"properties": {
|
|
338
|
-
"totalChangedSubjects": { "type": "integer", "minimum": 0 },
|
|
339
|
-
"mappedSubjects": { "type": "integer", "minimum": 0 },
|
|
340
|
-
"unresolvedSubjects": { "type": "integer", "minimum": 0 },
|
|
341
|
-
"ambiguousSubjects": { "type": "integer", "minimum": 0 },
|
|
342
|
-
"coveragePercent": { "type": "number", "minimum": 0, "maximum": 100 }
|
|
343
|
-
}
|
|
344
|
-
},
|
|
345
|
-
"unresolvedSubjects": {
|
|
346
|
-
"type": "object",
|
|
347
|
-
"additionalProperties": false,
|
|
348
|
-
"required": ["total", "byReason", "subjectSelectorIds"],
|
|
349
|
-
"properties": {
|
|
350
|
-
"total": { "type": "integer", "minimum": 0 },
|
|
351
|
-
"byReason": {
|
|
352
|
-
"type": "object",
|
|
353
|
-
"additionalProperties": false,
|
|
354
|
-
"required": [
|
|
355
|
-
"declared-graph-unavailable",
|
|
356
|
-
"no-declared-target",
|
|
357
|
-
"multiple-declared-targets",
|
|
358
|
-
"relation-endpoint-unmapped"
|
|
359
|
-
],
|
|
360
|
-
"properties": {
|
|
361
|
-
"declared-graph-unavailable": { "type": "integer", "minimum": 0 },
|
|
362
|
-
"no-declared-target": { "type": "integer", "minimum": 0 },
|
|
363
|
-
"multiple-declared-targets": { "type": "integer", "minimum": 0 },
|
|
364
|
-
"relation-endpoint-unmapped": { "type": "integer", "minimum": 0 }
|
|
365
|
-
}
|
|
366
|
-
},
|
|
367
|
-
"subjectSelectorIds": { "type": "array", "items": { "type": "string" } }
|
|
368
|
-
}
|
|
369
|
-
},
|
|
370
|
-
"evidenceStrengthDistribution": {
|
|
371
|
-
"type": "object",
|
|
372
|
-
"additionalProperties": false,
|
|
373
|
-
"required": ["heuristic", "declared", "observed", "verified"],
|
|
374
|
-
"properties": {
|
|
375
|
-
"heuristic": { "type": "integer", "minimum": 0 },
|
|
376
|
-
"declared": { "type": "integer", "minimum": 0 },
|
|
377
|
-
"observed": { "type": "integer", "minimum": 0 },
|
|
378
|
-
"verified": { "type": "integer", "minimum": 0 }
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
},
|
|
383
|
-
"deltaDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
384
|
-
"extensions": { "type": "object", "additionalProperties": true }
|
|
385
|
-
}
|
|
386
|
-
}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://archcontext.dev/schemas/runtime/investigation-report.schema.json",
|
|
4
|
-
"title": "InvestigationReport",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"additionalProperties": false,
|
|
7
|
-
"required": ["schemaVersion", "reportId", "jobId", "status", "findings", "outputDigest", "createdAt", "directMutationAllowed"],
|
|
8
|
-
"properties": {
|
|
9
|
-
"schemaVersion": { "const": "archcontext.investigation-report/v1" },
|
|
10
|
-
"reportId": { "type": "string", "pattern": "^investigation_report\\.[a-zA-Z0-9_-]+$" },
|
|
11
|
-
"jobId": { "type": "string", "pattern": "^agent_job\\.[a-zA-Z0-9_-]+$" },
|
|
12
|
-
"status": { "enum": ["succeeded", "failed", "partial"] },
|
|
13
|
-
"findings": {
|
|
14
|
-
"type": "array",
|
|
15
|
-
"items": {
|
|
16
|
-
"type": "object",
|
|
17
|
-
"additionalProperties": false,
|
|
18
|
-
"required": ["findingId", "hypothesis", "evidenceBindingIds", "unknowns", "falsifier", "proposedDelta", "proposedDeltaDigest", "confidence"],
|
|
19
|
-
"properties": {
|
|
20
|
-
"findingId": { "type": "string" },
|
|
21
|
-
"hypothesis": { "type": "string" },
|
|
22
|
-
"evidenceBindingIds": {
|
|
23
|
-
"type": "array",
|
|
24
|
-
"minItems": 1,
|
|
25
|
-
"items": { "type": "string", "pattern": "^binding\\.[a-zA-Z0-9_.-]+$" }
|
|
26
|
-
},
|
|
27
|
-
"unknowns": { "type": "array", "items": { "type": "string" } },
|
|
28
|
-
"falsifier": { "type": "string" },
|
|
29
|
-
"proposedDelta": { "$ref": "#/$defs/architectureCandidateChange" },
|
|
30
|
-
"proposedDeltaDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
31
|
-
"confidence": { "enum": ["low", "medium", "high"] }
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"outputDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
36
|
-
"createdAt": { "type": "string" },
|
|
37
|
-
"directMutationAllowed": { "const": false },
|
|
38
|
-
"extensions": { "type": "object", "additionalProperties": true }
|
|
39
|
-
},
|
|
40
|
-
"$defs": {
|
|
41
|
-
"architectureCandidateChange": {
|
|
42
|
-
"type": "object",
|
|
43
|
-
"additionalProperties": false,
|
|
44
|
-
"required": [
|
|
45
|
-
"candidateChangeId",
|
|
46
|
-
"kind",
|
|
47
|
-
"target",
|
|
48
|
-
"stateDimension",
|
|
49
|
-
"changeKind",
|
|
50
|
-
"subjectSelectorIds",
|
|
51
|
-
"mappingIds",
|
|
52
|
-
"ambiguityIds",
|
|
53
|
-
"evidenceIds",
|
|
54
|
-
"confidence",
|
|
55
|
-
"heuristic",
|
|
56
|
-
"summary",
|
|
57
|
-
"digest"
|
|
58
|
-
],
|
|
59
|
-
"properties": {
|
|
60
|
-
"candidateChangeId": { "type": "string", "pattern": "^candidate_change\\.[a-zA-Z0-9_.-]+$" },
|
|
61
|
-
"kind": {
|
|
62
|
-
"enum": [
|
|
63
|
-
"node-added",
|
|
64
|
-
"node-removed",
|
|
65
|
-
"node-moved",
|
|
66
|
-
"node-renamed",
|
|
67
|
-
"node-materially-changed",
|
|
68
|
-
"relation-added",
|
|
69
|
-
"relation-removed",
|
|
70
|
-
"relation-moved",
|
|
71
|
-
"relation-renamed",
|
|
72
|
-
"relation-materially-changed",
|
|
73
|
-
"constraint-added",
|
|
74
|
-
"constraint-removed",
|
|
75
|
-
"constraint-moved",
|
|
76
|
-
"constraint-renamed",
|
|
77
|
-
"constraint-materially-changed",
|
|
78
|
-
"owner-added",
|
|
79
|
-
"owner-removed",
|
|
80
|
-
"owner-moved",
|
|
81
|
-
"owner-renamed",
|
|
82
|
-
"owner-materially-changed",
|
|
83
|
-
"lifecycle-added",
|
|
84
|
-
"lifecycle-removed",
|
|
85
|
-
"lifecycle-moved",
|
|
86
|
-
"lifecycle-renamed",
|
|
87
|
-
"lifecycle-materially-changed",
|
|
88
|
-
"migration-state-added",
|
|
89
|
-
"migration-state-removed",
|
|
90
|
-
"migration-state-moved",
|
|
91
|
-
"migration-state-renamed",
|
|
92
|
-
"migration-state-materially-changed"
|
|
93
|
-
]
|
|
94
|
-
},
|
|
95
|
-
"target": {
|
|
96
|
-
"type": "object",
|
|
97
|
-
"additionalProperties": false,
|
|
98
|
-
"required": ["kind", "id"],
|
|
99
|
-
"properties": {
|
|
100
|
-
"kind": { "enum": ["node", "relation", "constraint", "owner", "lifecycle", "migration-state"] },
|
|
101
|
-
"id": { "type": "string" },
|
|
102
|
-
"parentId": { "type": "string" }
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
"stateDimension": { "enum": ["target-state", "migration-state"] },
|
|
106
|
-
"changeKind": { "enum": ["added", "removed", "moved", "renamed", "materially_changed"] },
|
|
107
|
-
"subjectSelectorIds": { "type": "array", "items": { "type": "string" } },
|
|
108
|
-
"mappingIds": { "type": "array", "items": { "type": "string" } },
|
|
109
|
-
"ambiguityIds": { "type": "array", "items": { "type": "string" } },
|
|
110
|
-
"evidenceIds": { "type": "array", "items": { "type": "string" } },
|
|
111
|
-
"confidence": { "enum": ["low", "medium", "high"] },
|
|
112
|
-
"heuristic": { "const": true },
|
|
113
|
-
"summary": { "type": "string" },
|
|
114
|
-
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
115
|
-
"extensions": { "type": "object", "additionalProperties": true }
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://archctx.repoharness.com/schemas/runtime/notification-event.schema.json",
|
|
4
|
-
"title": "NotificationEvent",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"additionalProperties": false,
|
|
7
|
-
"required": ["schemaVersion", "eventId", "prUrl", "result", "riskLevel", "commitSha", "runtimeVersion", "occurredAt"],
|
|
8
|
-
"properties": {
|
|
9
|
-
"schemaVersion": { "const": "archcontext.notification-event/v1" },
|
|
10
|
-
"eventId": { "type": "string", "pattern": "^notification\\.[a-z0-9][a-z0-9-]*$" },
|
|
11
|
-
"prUrl": { "type": "string", "pattern": "^https://github\\.com/[^/]+/[^/]+/pull/[0-9]+$" },
|
|
12
|
-
"result": { "type": "string", "enum": ["pass", "pass_with_warnings", "fail_action_required"] },
|
|
13
|
-
"riskLevel": { "type": "string", "enum": ["low", "medium", "high", "critical"] },
|
|
14
|
-
"commitSha": { "type": "string", "pattern": "^[a-f0-9]{7,40}$" },
|
|
15
|
-
"runtimeVersion": { "type": "string" },
|
|
16
|
-
"occurredAt": { "type": "string" }
|
|
17
|
-
}
|
|
18
|
-
}
|