archctx-contracts 0.2.2 → 0.4.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.
Files changed (43) hide show
  1. package/fixtures/boundary/architecture-node-extension.json +1 -1
  2. package/fixtures/boundary/explorer-projection-v2-budget.json +87 -0
  3. package/fixtures/invalid/architecture-snapshot-unknown-mode.json +22 -4
  4. package/fixtures/invalid/explorer-projection-query-v2-caller-scope.json +7 -0
  5. package/fixtures/invalid/explorer-projection-v2-derived-subject.json +101 -0
  6. package/fixtures/invalid/node-unknown-field.json +1 -1
  7. package/fixtures/valid/archctx-capabilities.json +14 -0
  8. package/fixtures/valid/architecture-flow.json +53 -0
  9. package/fixtures/valid/architecture-node.json +19 -2
  10. package/fixtures/valid/architecture-refresh-signal.json +35 -0
  11. package/fixtures/valid/architecture-snapshot.json +22 -4
  12. package/fixtures/valid/explorer-delta-query.json +11 -0
  13. package/fixtures/valid/explorer-projection-delta.json +32 -0
  14. package/fixtures/valid/explorer-projection-query-v2.json +6 -0
  15. package/fixtures/valid/explorer-projection-v2.json +138 -0
  16. package/fixtures/valid/product-version-manifest.json +7 -7
  17. package/fixtures/valid/projection-request.json +14 -0
  18. package/fixtures/valid/projection-result.json +47 -0
  19. package/package.json +1 -1
  20. package/schemas/repo/architecture-flow.schema.json +97 -0
  21. package/schemas/repo/architecture-node.schema.json +39 -2
  22. package/schemas/runtime/archctx-capabilities.schema.json +45 -0
  23. package/schemas/runtime/architecture-event.schema.json +172 -2
  24. package/schemas/runtime/architecture-refresh-signal.schema.json +88 -0
  25. package/schemas/runtime/architecture-snapshot.schema.json +37 -4
  26. package/schemas/runtime/changeset.schema.json +1 -1
  27. package/schemas/runtime/explorer-delta-query.schema.json +24 -0
  28. package/schemas/runtime/explorer-projection-delta.schema.json +79 -0
  29. package/schemas/runtime/explorer-projection-query-v2.schema.json +42 -0
  30. package/schemas/runtime/explorer-projection-v2.schema.json +538 -0
  31. package/schemas/runtime/projection-request.schema.json +61 -0
  32. package/schemas/runtime/projection-result.schema.json +162 -0
  33. package/src/architecture.ts +73 -0
  34. package/src/index.ts +2 -0
  35. package/src/ledger.ts +125 -3
  36. package/src/ports.ts +399 -32
  37. package/src/product-version.ts +5 -5
  38. package/src/projection.ts +301 -0
  39. package/src/schema.ts +3 -2
  40. package/src/validator.ts +70 -6
  41. package/fixtures/invalid/explorer-projection-write-field.json +0 -21
  42. package/fixtures/valid/explorer-projection.json +0 -53
  43. package/schemas/runtime/explorer-projection.schema.json +0 -92
@@ -0,0 +1,138 @@
1
+ {
2
+ "schemaVersion": "archcontext.explorer-projection/v2",
3
+ "view": {
4
+ "id": "system-map",
5
+ "title": "System Map",
6
+ "question": "What accepted architecture entities exist and how do they relate?"
7
+ },
8
+ "availableViews": [
9
+ { "id": "system-map", "enabled": true },
10
+ { "id": "task-impact", "enabled": false, "reason": "task session required" },
11
+ { "id": "drift-pressure", "enabled": true },
12
+ { "id": "data-flow", "enabled": true },
13
+ { "id": "external-integrations", "enabled": true }
14
+ ],
15
+ "semanticLevel": "context",
16
+ "breadcrumbs": [],
17
+ "cursor": {
18
+ "repository": { "repositoryId": "repo.local", "storageRepositoryId": "repo.1111111111111111" },
19
+ "worktree": {
20
+ "workspaceId": "workspace.local",
21
+ "storageWorkspaceId": "ws.1111111111111111",
22
+ "branch": "main",
23
+ "headSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
24
+ "worktreeDigest": "sha256:1111111111111111111111111111111111111111111111111111111111111111"
25
+ },
26
+ "authoritySource": "git",
27
+ "authorityCursor": null,
28
+ "evidenceAuthorityCursor": null,
29
+ "inputManifestDigest": "sha256:9999999999999999999999999999999999999999999999999999999999999999",
30
+ "compatibilityDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
31
+ "graphDigest": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
32
+ "evidenceStateDigest": "sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
33
+ "observedFactsDigest": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
34
+ "viewDefinitionDigest": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
35
+ "compilerVersion": "archcontext.explorer-view-compiler/v1",
36
+ "observedAvailability": { "status": "ready" }
37
+ },
38
+ "inputManifest": {
39
+ "schemaVersion": "archcontext.projection-input-manifest/v1",
40
+ "repository": { "repositoryId": "repo.local", "storageRepositoryId": "repo.1111111111111111" },
41
+ "worktree": { "workspaceId": "workspace.local", "storageWorkspaceId": "ws.1111111111111111", "branch": "main", "headSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worktreeDigest": "sha256:1111111111111111111111111111111111111111111111111111111111111111" },
42
+ "authoritySource": "git",
43
+ "authorityCursor": null,
44
+ "evidenceAuthorityCursor": null,
45
+ "queryDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
46
+ "graphDigest": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
47
+ "evidenceStateDigest": "sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
48
+ "observedFactsDigest": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
49
+ "observedAvailability": { "status": "ready" },
50
+ "bindingsDigest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
51
+ "eventBacklinksDigest": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
52
+ "driftDigest": null,
53
+ "pressureDigest": "sha256:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
54
+ "taskSessionDigest": null,
55
+ "readPlan": {
56
+ "schemaVersion": "archcontext.projection-read-plan/v1",
57
+ "plannerVersion": "archcontext.projection-read-planner/v1",
58
+ "kind": "bounded-context",
59
+ "source": "git-authority",
60
+ "queryDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
61
+ "semanticLevel": "context",
62
+ "focusSubjectId": null,
63
+ "expandedKinds": [],
64
+ "depth": 1,
65
+ "limits": { "maxEntities": 80, "maxRelations": 160, "maxConstraints": 160, "maxBindings": 320, "maxBacklinks": 640, "maxGraphRows": 400 },
66
+ "requiredDomains": ["authority", "bindings", "evidence", "graph", "observed"],
67
+ "ordering": "canonical-id-asc",
68
+ "truncation": "hard-limit-with-authoritative-totals",
69
+ "planDigest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
70
+ },
71
+ "readSet": {
72
+ "schemaVersion": "archcontext.projection-read-set/v1",
73
+ "planDigest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
74
+ "selectedGraphDigest": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
75
+ "authoritativeTotals": { "entities": 1, "relations": 0, "constraints": 0 },
76
+ "entityKindTotals": [{ "kind": "module", "count": 1 }],
77
+ "rowsRead": { "entities": 1, "relations": 0, "constraints": 0, "bindings": 0, "backlinks": 0 },
78
+ "truncated": false,
79
+ "readSetDigest": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
80
+ },
81
+ "inputDomains": {
82
+ "authority": { "requirement": "required", "status": "ready", "digest": "sha256:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" },
83
+ "graph": { "requirement": "required", "status": "ready", "digest": "sha256:2222222222222222222222222222222222222222222222222222222222222222" },
84
+ "evidence": { "requirement": "required", "status": "ready", "digest": "sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" },
85
+ "observed": { "requirement": "required", "status": "ready", "digest": "sha256:3333333333333333333333333333333333333333333333333333333333333333" },
86
+ "bindings": { "requirement": "required", "status": "ready", "digest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" },
87
+ "event-backlinks": { "requirement": "optional", "status": "ready", "digest": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" },
88
+ "drift": { "requirement": "optional", "status": "unavailable", "digest": null, "reasonCode": "not-provided" },
89
+ "pressure": { "requirement": "optional", "status": "ready", "digest": "sha256:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd" },
90
+ "task-session": { "requirement": "optional", "status": "unavailable", "digest": null, "reasonCode": "not-provided" }
91
+ },
92
+ "viewDefinitionDigest": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
93
+ "compilerVersion": "archcontext.explorer-view-compiler/v1",
94
+ "tokenRequired": true,
95
+ "compatibilityDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
96
+ "manifestDigest": "sha256:9999999999999999999999999999999999999999999999999999999999999999"
97
+ },
98
+ "occurrences": [
99
+ {
100
+ "occurrenceId": "occurrence.system-map.entity.module.runtime",
101
+ "role": "subject",
102
+ "subjectRefs": [{ "kind": "architecture-entity", "id": "module.runtime" }],
103
+ "name": "Runtime",
104
+ "kind": "module",
105
+ "childrenCount": 0,
106
+ "expandable": false,
107
+ "verificationStatus": "UNKNOWN",
108
+ "authorityState": "DECLARED_UNOBSERVED",
109
+ "pressure": { "evaluated": true, "level": "low", "score": 0, "signals": [], "inputDigest": "sha256:6666666666666666666666666666666666666666666666666666666666666666" },
110
+ "sourceSelectors": [],
111
+ "provenance": {
112
+ "declaredEntityIds": ["module.runtime"],
113
+ "observedSymbolIds": [],
114
+ "evidenceBindingIds": []
115
+ },
116
+ "inspector": { "constraints": [], "decisions": [], "historyEvents": [], "sourceSelectors": [], "evidenceBindingIds": [] },
117
+ "backlinks": { "appearsInViews": ["system-map"], "affectedByTaskSessionIds": [], "constrainedByIds": [], "evidencedByBindingIds": [], "changedByEventIds": [], "decidedByEventIds": [], "incomingRelationIds": [], "outgoingRelationIds": [] }
118
+ }
119
+ ],
120
+ "relations": [],
121
+ "page": {
122
+ "budget": { "maxNodes": 80, "maxRelations": 160 },
123
+ "totalNodes": 1,
124
+ "totalRelations": 0,
125
+ "returnedNodes": 1,
126
+ "returnedRelations": 0,
127
+ "truncated": false,
128
+ "omittedNodeCount": 0,
129
+ "omittedRelationCount": 0
130
+ },
131
+ "projectionDigest": "sha256:5555555555555555555555555555555555555555555555555555555555555555",
132
+ "capabilities": {
133
+ "readOnly": true,
134
+ "mutationMode": "forbidden",
135
+ "egress": "none",
136
+ "tokenRequired": true
137
+ }
138
+ }
@@ -2,7 +2,7 @@
2
2
  "schemaVersion": "archcontext.product-version-manifest/v1",
3
3
  "product": {
4
4
  "name": "archctx",
5
- "version": "0.2.2",
5
+ "version": "0.4.0",
6
6
  "distribution": "one-package"
7
7
  },
8
8
  "packageManager": "bun@1.3.10",
@@ -12,25 +12,25 @@
12
12
  "surfaces": {
13
13
  "cli": {
14
14
  "packageName": "@archcontext/surfaces",
15
- "version": "0.2.2",
15
+ "version": "0.4.0",
16
16
  "entrypoint": "archctx"
17
17
  },
18
18
  "daemon": {
19
19
  "packageName": "@archcontext/local-runtime",
20
- "version": "0.2.2",
20
+ "version": "0.4.0",
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.2.2",
26
+ "version": "0.4.0",
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.2.2",
33
+ "contractsPackageVersion": "0.4.0",
34
34
  "reviewChallenge": "archcontext.review-challenge/v2",
35
35
  "attestation": "archcontext.attestation/v2",
36
36
  "deviceIdentity": "archcontext.device-identity/v1",
@@ -41,10 +41,10 @@
41
41
  "schemaVersion": "archcontext.runtime-rpc/v1",
42
42
  "protocol": "http-loopback"
43
43
  },
44
- "sqliteMigrations": "0001_runtime_state..0004_changeset_journal",
44
+ "sqliteMigrations": "0001_runtime_state..0012_explorer_projection_index",
45
45
  "codeGraph": {
46
46
  "packageName": "@colbymchenry/codegraph",
47
- "requiredVersion": "1.0.1",
47
+ "requiredVersion": "1.5.0",
48
48
  "adapter": "codegraph-cli"
49
49
  }
50
50
  }
@@ -0,0 +1,14 @@
1
+ {
2
+ "schemaVersion": "archcontext.projection-request/v1",
3
+ "requestId": "projection_request.repo_main",
4
+ "profile": "repo-harness/v1",
5
+ "mode": "apply",
6
+ "targets": ["agent-context", "architecture-docs"],
7
+ "changedPaths": ["packages/core/src/index.ts", "src/cli/main.ts"],
8
+ "expected": {
9
+ "repositoryId": "repo.example",
10
+ "workspaceId": "ws.example",
11
+ "headSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
12
+ "worktreeDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
13
+ }
14
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "schemaVersion": "archcontext.projection-result/v1",
3
+ "requestId": "projection_request.repo_main",
4
+ "status": "applied",
5
+ "inputSnapshot": {
6
+ "repositoryId": "repo.example",
7
+ "workspaceId": "ws.example",
8
+ "headSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9
+ "baseHeadSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
10
+ "worktreeDigest": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
11
+ "sourceTreeDigest": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
12
+ "modelDigest": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
13
+ "codeGraphDigest": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
14
+ "indexedWorktreeDigest": "sha256:4545454545454545454545454545454545454545454545454545454545454545",
15
+ "projectionInputDigest": "sha256:5555555555555555555555555555555555555555555555555555555555555555",
16
+ "rendererVersion": "archcontext.docs-renderer/v2",
17
+ "layoutVersion": "archcontext.docs-layout/v1",
18
+ "generatedFrom": { "codeGraphPackage": "@colbymchenry/codegraph", "codeGraphVersion": "1.5.0", "codeGraphBinaryDigest": "sha256:4646464646464646464646464646464646464646464646464646464646464646", "codeGraphStatus": "ready" }
19
+ },
20
+ "outputSnapshot": {
21
+ "repositoryId": "repo.example",
22
+ "workspaceId": "ws.example",
23
+ "headSha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
24
+ "baseHeadSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
25
+ "worktreeDigest": "sha256:6666666666666666666666666666666666666666666666666666666666666666",
26
+ "sourceTreeDigest": "sha256:7777777777777777777777777777777777777777777777777777777777777777",
27
+ "modelDigest": "sha256:8888888888888888888888888888888888888888888888888888888888888888",
28
+ "codeGraphDigest": "sha256:9999999999999999999999999999999999999999999999999999999999999999",
29
+ "indexedWorktreeDigest": "sha256:9898989898989898989898989898989898989898989898989898989898989898",
30
+ "projectionInputDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
31
+ "rendererVersion": "archcontext.docs-renderer/v2",
32
+ "layoutVersion": "archcontext.docs-layout/v1",
33
+ "generatedFrom": { "codeGraphPackage": "@colbymchenry/codegraph", "codeGraphVersion": "1.5.0", "codeGraphBinaryDigest": "sha256:9797979797979797979797979797979797979797979797979797979797979797", "codeGraphStatus": "ready" }
34
+ },
35
+ "affectedNodeIds": ["capability.api"],
36
+ "files": [
37
+ {
38
+ "path": "docs/architecture/modules/api.md",
39
+ "action": "update",
40
+ "preimageDigest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
41
+ "outputDigest": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
42
+ }
43
+ ],
44
+ "humanActions": [],
45
+ "refreshSignals": [],
46
+ "receiptDigest": "sha256:e41599eb1613796b64b03290c170076af2aa542de043b91672f327475e9d1cad"
47
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "archctx-contracts",
3
- "version": "0.2.2",
3
+ "version": "0.4.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -0,0 +1,97 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archctx.repoharness.com/schemas/repo/architecture-flow.schema.json",
4
+ "title": "ArchitectureFlowV1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "id", "capabilityId", "name", "applicability"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "archcontext.flow/v1" },
10
+ "id": { "type": "string", "pattern": "^flow\\.[a-z][a-z0-9]*(\\.[a-z0-9][a-z0-9-]*)*$" },
11
+ "capabilityId": { "type": "string", "pattern": "^capability\\.[a-z][a-z0-9]*(\\.[a-z0-9][a-z0-9-]*)*$" },
12
+ "name": { "type": "string", "minLength": 1 },
13
+ "applicability": { "type": "string", "enum": ["required", "not-applicable"] },
14
+ "rationale": { "type": "string", "minLength": 1 },
15
+ "participants": {
16
+ "type": "array",
17
+ "minItems": 1,
18
+ "items": {
19
+ "type": "object",
20
+ "additionalProperties": false,
21
+ "required": ["id", "nodeId"],
22
+ "properties": {
23
+ "id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9][a-z0-9-]*)*$" },
24
+ "nodeId": { "type": "string", "minLength": 1 }
25
+ }
26
+ }
27
+ },
28
+ "steps": {
29
+ "type": "array",
30
+ "minItems": 1,
31
+ "items": { "$ref": "#/$defs/step" }
32
+ },
33
+ "outcomes": {
34
+ "type": "array",
35
+ "minItems": 2,
36
+ "items": {
37
+ "type": "object",
38
+ "additionalProperties": false,
39
+ "required": ["id", "kind", "label", "steps", "terminal"],
40
+ "properties": {
41
+ "id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9][a-z0-9-]*)*$" },
42
+ "kind": { "type": "string", "enum": ["success", "error"] },
43
+ "label": { "type": "string", "minLength": 1 },
44
+ "steps": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/step" } },
45
+ "terminal": {
46
+ "type": "object",
47
+ "additionalProperties": false,
48
+ "required": ["participant", "label"],
49
+ "properties": {
50
+ "participant": { "type": "string", "minLength": 1 },
51
+ "label": { "type": "string", "minLength": 1 }
52
+ }
53
+ }
54
+ }
55
+ },
56
+ "allOf": [
57
+ { "contains": { "type": "object", "properties": { "kind": { "const": "success" } }, "required": ["kind"] }, "minContains": 1 },
58
+ { "contains": { "type": "object", "properties": { "kind": { "const": "error" } }, "required": ["kind"] }, "minContains": 1 }
59
+ ]
60
+ }
61
+ },
62
+ "$defs": {
63
+ "evidenceSelector": {
64
+ "type": "object",
65
+ "additionalProperties": false,
66
+ "required": ["entrypointId", "sourceSymbol", "sinkId"],
67
+ "properties": {
68
+ "entrypointId": { "type": "string", "minLength": 1 },
69
+ "sourceSymbol": { "type": "string", "minLength": 1 },
70
+ "sinkId": { "type": "string", "minLength": 1 }
71
+ }
72
+ },
73
+ "step": {
74
+ "type": "object",
75
+ "additionalProperties": false,
76
+ "required": ["id", "from", "to", "label", "evidence"],
77
+ "properties": {
78
+ "id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9][a-z0-9-]*)*$" },
79
+ "from": { "type": "string", "minLength": 1 },
80
+ "to": { "type": "string", "minLength": 1 },
81
+ "label": { "type": "string", "minLength": 1 },
82
+ "evidence": { "$ref": "#/$defs/evidenceSelector" }
83
+ }
84
+ }
85
+ },
86
+ "oneOf": [
87
+ {
88
+ "properties": { "applicability": { "const": "required" } },
89
+ "required": ["participants", "steps", "outcomes"]
90
+ },
91
+ {
92
+ "properties": { "applicability": { "const": "not-applicable" } },
93
+ "required": ["rationale"],
94
+ "not": { "anyOf": [{ "required": ["participants"] }, { "required": ["steps"] }, { "required": ["outcomes"] }] }
95
+ }
96
+ ]
97
+ }
@@ -6,7 +6,7 @@
6
6
  "additionalProperties": false,
7
7
  "required": ["schemaVersion", "id", "kind", "name", "status", "summary"],
8
8
  "properties": {
9
- "schemaVersion": { "const": "archcontext.node/v1" },
9
+ "schemaVersion": { "const": "archcontext.node/v2" },
10
10
  "id": { "type": "string", "pattern": "^([a-z][a-z0-9]*(\\.[a-z0-9][a-z0-9-]*)*::)?[a-z][a-z0-9]*(\\.[a-z0-9][a-z0-9-]*)+$" },
11
11
  "kind": {
12
12
  "type": "string",
@@ -23,7 +23,44 @@
23
23
  "properties": {
24
24
  "include": { "type": "array", "items": { "type": "string" } },
25
25
  "exclude": { "type": "array", "items": { "type": "string" } },
26
- "entrypoints": { "type": "array", "items": { "type": "string" } }
26
+ "entrypoints": {
27
+ "type": "array",
28
+ "items": {
29
+ "type": "object",
30
+ "additionalProperties": false,
31
+ "required": ["id", "path", "symbols"],
32
+ "properties": {
33
+ "id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9][a-z0-9-]*)+$" },
34
+ "path": { "type": "string", "minLength": 1 },
35
+ "symbols": {
36
+ "type": "array",
37
+ "minItems": 1,
38
+ "items": {
39
+ "type": "object",
40
+ "additionalProperties": false,
41
+ "required": ["name", "sinks"],
42
+ "properties": {
43
+ "name": { "type": "string", "minLength": 1 },
44
+ "sinks": {
45
+ "type": "array",
46
+ "minItems": 1,
47
+ "items": {
48
+ "type": "object",
49
+ "additionalProperties": false,
50
+ "required": ["id", "path", "symbol"],
51
+ "properties": {
52
+ "id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9][a-z0-9-]*)+$" },
53
+ "path": { "type": "string", "minLength": 1 },
54
+ "symbol": { "type": "string", "minLength": 1 }
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
27
64
  }
28
65
  },
29
66
  "ownership": {
@@ -0,0 +1,45 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://archcontext.dev/schemas/runtime/archctx-capabilities.schema.json",
4
+ "title": "ArchctxCapabilitiesV1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "package", "protocols", "renderers", "features"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "archcontext.capabilities/v1" },
10
+ "package": {
11
+ "type": "object",
12
+ "additionalProperties": false,
13
+ "required": ["name", "version"],
14
+ "properties": {
15
+ "name": { "const": "archctx" },
16
+ "version": { "type": "string", "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" }
17
+ }
18
+ },
19
+ "protocols": {
20
+ "type": "object",
21
+ "additionalProperties": false,
22
+ "required": ["projectionRequest", "projectionResult", "architectureRefreshSignal"],
23
+ "properties": {
24
+ "projectionRequest": { "const": "archcontext.projection-request/v1" },
25
+ "projectionResult": { "const": "archcontext.projection-result/v1" },
26
+ "architectureRefreshSignal": { "const": "archcontext.architecture-refresh-signal/v1" }
27
+ }
28
+ },
29
+ "renderers": {
30
+ "type": "object",
31
+ "additionalProperties": false,
32
+ "required": ["architectureDocs", "agentContext"],
33
+ "properties": {
34
+ "architectureDocs": { "const": "archcontext.docs-renderer/v2" },
35
+ "agentContext": { "const": "archcontext.agent-context-renderer/v1" }
36
+ }
37
+ },
38
+ "features": {
39
+ "type": "array",
40
+ "minItems": 3,
41
+ "uniqueItems": true,
42
+ "items": { "enum": ["architecture-docs-renderer-v2", "architecture-refresh-signal-v1", "projection-protocol-v1"] }
43
+ }
44
+ }
45
+ }