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
@@ -1,5 +1,5 @@
1
1
  {
2
- "schemaVersion": "archcontext.node/v1",
2
+ "schemaVersion": "archcontext.node/v2",
3
3
  "id": "interface.payment-api",
4
4
  "kind": "interface",
5
5
  "name": "Payment API",
@@ -0,0 +1,87 @@
1
+ {
2
+ "schemaVersion": "archcontext.explorer-projection/v2",
3
+ "view": { "id": "system-map", "title": "System Map", "question": "What exists?" },
4
+ "availableViews": [{ "id": "system-map", "enabled": true }],
5
+ "semanticLevel": "context",
6
+ "breadcrumbs": [],
7
+ "cursor": {
8
+ "repository": { "repositoryId": "repo.local", "storageRepositoryId": "repo.1111111111111111" },
9
+ "worktree": { "workspaceId": "workspace.local", "storageWorkspaceId": "ws.1111111111111111", "branch": "main", "headSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worktreeDigest": "sha256:1111111111111111111111111111111111111111111111111111111111111111" },
10
+ "authoritySource": "git",
11
+ "authorityCursor": null,
12
+ "evidenceAuthorityCursor": null,
13
+ "inputManifestDigest": "sha256:9999999999999999999999999999999999999999999999999999999999999999",
14
+ "compatibilityDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
15
+ "graphDigest": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
16
+ "evidenceStateDigest": "sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
17
+ "observedFactsDigest": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
18
+ "viewDefinitionDigest": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
19
+ "compilerVersion": "archcontext.explorer-view-compiler/v1",
20
+ "observedAvailability": { "status": "ready" }
21
+ },
22
+ "inputManifest": {
23
+ "schemaVersion": "archcontext.projection-input-manifest/v1",
24
+ "repository": { "repositoryId": "repo.local", "storageRepositoryId": "repo.1111111111111111" },
25
+ "worktree": { "workspaceId": "workspace.local", "storageWorkspaceId": "ws.1111111111111111", "branch": "main", "headSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worktreeDigest": "sha256:1111111111111111111111111111111111111111111111111111111111111111" },
26
+ "authoritySource": "git",
27
+ "authorityCursor": null,
28
+ "evidenceAuthorityCursor": null,
29
+ "queryDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
30
+ "graphDigest": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
31
+ "evidenceStateDigest": "sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
32
+ "observedFactsDigest": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
33
+ "observedAvailability": { "status": "ready" },
34
+ "bindingsDigest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
35
+ "eventBacklinksDigest": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
36
+ "driftDigest": null,
37
+ "pressureDigest": null,
38
+ "taskSessionDigest": null,
39
+ "readPlan": {
40
+ "schemaVersion": "archcontext.projection-read-plan/v1",
41
+ "plannerVersion": "archcontext.projection-read-planner/v1",
42
+ "kind": "bounded-context",
43
+ "source": "git-authority",
44
+ "queryDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
45
+ "semanticLevel": "context",
46
+ "focusSubjectId": null,
47
+ "expandedKinds": [],
48
+ "depth": 1,
49
+ "limits": { "maxEntities": 1, "maxRelations": 0, "maxConstraints": 2, "maxBindings": 4, "maxBacklinks": 8, "maxGraphRows": 3 },
50
+ "requiredDomains": ["authority", "bindings", "evidence", "graph", "observed"],
51
+ "ordering": "canonical-id-asc",
52
+ "truncation": "hard-limit-with-authoritative-totals",
53
+ "planDigest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
54
+ },
55
+ "readSet": {
56
+ "schemaVersion": "archcontext.projection-read-set/v1",
57
+ "planDigest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
58
+ "selectedGraphDigest": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
59
+ "authoritativeTotals": { "entities": 10000, "relations": 9999, "constraints": 0 },
60
+ "entityKindTotals": [{ "kind": "module", "count": 10000 }],
61
+ "rowsRead": { "entities": 0, "relations": 0, "constraints": 0, "bindings": 0, "backlinks": 0 },
62
+ "truncated": true,
63
+ "readSetDigest": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
64
+ },
65
+ "inputDomains": {
66
+ "authority": { "requirement": "required", "status": "ready", "digest": "sha256:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" },
67
+ "graph": { "requirement": "required", "status": "ready", "digest": "sha256:2222222222222222222222222222222222222222222222222222222222222222" },
68
+ "evidence": { "requirement": "required", "status": "ready", "digest": "sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" },
69
+ "observed": { "requirement": "required", "status": "ready", "digest": "sha256:3333333333333333333333333333333333333333333333333333333333333333" },
70
+ "bindings": { "requirement": "required", "status": "ready", "digest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" },
71
+ "event-backlinks": { "requirement": "optional", "status": "ready", "digest": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" },
72
+ "drift": { "requirement": "optional", "status": "unavailable", "digest": null, "reasonCode": "not-provided" },
73
+ "pressure": { "requirement": "optional", "status": "unavailable", "digest": null, "reasonCode": "not-provided" },
74
+ "task-session": { "requirement": "optional", "status": "unavailable", "digest": null, "reasonCode": "not-provided" }
75
+ },
76
+ "viewDefinitionDigest": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
77
+ "compilerVersion": "archcontext.explorer-view-compiler/v1",
78
+ "tokenRequired": true,
79
+ "compatibilityDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
80
+ "manifestDigest": "sha256:9999999999999999999999999999999999999999999999999999999999999999"
81
+ },
82
+ "occurrences": [],
83
+ "relations": [],
84
+ "page": { "budget": { "maxNodes": 1, "maxRelations": 0 }, "totalNodes": 10000, "totalRelations": 9999, "returnedNodes": 0, "returnedRelations": 0, "truncated": true, "omittedNodeCount": 10000, "omittedRelationCount": 9999 },
85
+ "projectionDigest": "sha256:5555555555555555555555555555555555555555555555555555555555555555",
86
+ "capabilities": { "readOnly": true, "mutationMode": "forbidden", "egress": "none", "tokenRequired": true }
87
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "schemaVersion": "archcontext.architecture-snapshot/v1",
2
+ "schemaVersion": "archcontext.architecture-snapshot/v2",
3
3
  "snapshotId": "arch_snapshot.invalid_mode",
4
4
  "repository": {
5
5
  "repositoryId": "repo.archcontext",
@@ -14,14 +14,32 @@
14
14
  },
15
15
  "sourceMode": "sql-only",
16
16
  "eventCursor": {
17
+ "eventCount": 1,
18
+ "lastEventSequence": 1,
17
19
  "lastEventId": "arch_event.al0_contract_freeze",
18
20
  "lastEventHash": "sha256:5555555555555555555555555555555555555555555555555555555555555555"
19
21
  },
20
22
  "graphDigest": "sha256:6666666666666666666666666666666666666666666666666666666666666666",
23
+ "evidenceDigest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
24
+ "stateDigest": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
25
+ "state": {
26
+ "graph": {
27
+ "entities": [],
28
+ "relations": [],
29
+ "constraints": []
30
+ },
31
+ "evidence": {
32
+ "schemaVersion": "archcontext.evidence-state-at-cursor/v1",
33
+ "evidenceItems": [],
34
+ "evidenceBindings": [],
35
+ "tombstones": [],
36
+ "stateDigest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
37
+ }
38
+ },
21
39
  "projectionDigest": "sha256:7777777777777777777777777777777777777777777777777777777777777777",
22
- "entityCount": 12,
23
- "relationCount": 8,
24
- "constraintCount": 4,
40
+ "entityCount": 0,
41
+ "relationCount": 0,
42
+ "constraintCount": 0,
25
43
  "inputDigests": {
26
44
  "modelDigest": "sha256:8888888888888888888888888888888888888888888888888888888888888888"
27
45
  },
@@ -0,0 +1,7 @@
1
+ {
2
+ "schemaVersion": "archcontext.explorer-projection-query/v2",
3
+ "viewId": "system-map",
4
+ "repositoryId": "caller-controlled",
5
+ "depth": 1,
6
+ "budget": { "maxNodes": 80, "maxRelations": 160 }
7
+ }
@@ -0,0 +1,101 @@
1
+ {
2
+ "schemaVersion": "archcontext.explorer-projection/v2",
3
+ "view": { "id": "system-map", "title": "System Map", "question": "What exists?" },
4
+ "availableViews": [{ "id": "system-map", "enabled": true }],
5
+ "semanticLevel": "overview",
6
+ "breadcrumbs": [],
7
+ "cursor": {
8
+ "repository": { "repositoryId": "repo.local", "storageRepositoryId": "repo.1111111111111111" },
9
+ "worktree": { "workspaceId": "workspace.local", "storageWorkspaceId": "ws.1111111111111111", "branch": "main", "headSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worktreeDigest": "sha256:1111111111111111111111111111111111111111111111111111111111111111" },
10
+ "authoritySource": "git",
11
+ "authorityCursor": null,
12
+ "evidenceAuthorityCursor": null,
13
+ "inputManifestDigest": "sha256:9999999999999999999999999999999999999999999999999999999999999999",
14
+ "compatibilityDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
15
+ "graphDigest": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
16
+ "evidenceStateDigest": "sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
17
+ "observedFactsDigest": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
18
+ "viewDefinitionDigest": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
19
+ "compilerVersion": "archcontext.explorer-view-compiler/v1",
20
+ "observedAvailability": { "status": "ready" }
21
+ },
22
+ "inputManifest": {
23
+ "schemaVersion": "archcontext.projection-input-manifest/v1",
24
+ "repository": { "repositoryId": "repo.local", "storageRepositoryId": "repo.1111111111111111" },
25
+ "worktree": { "workspaceId": "workspace.local", "storageWorkspaceId": "ws.1111111111111111", "branch": "main", "headSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worktreeDigest": "sha256:1111111111111111111111111111111111111111111111111111111111111111" },
26
+ "authoritySource": "git",
27
+ "authorityCursor": null,
28
+ "evidenceAuthorityCursor": null,
29
+ "queryDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
30
+ "graphDigest": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
31
+ "evidenceStateDigest": "sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
32
+ "observedFactsDigest": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
33
+ "observedAvailability": { "status": "ready" },
34
+ "bindingsDigest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
35
+ "eventBacklinksDigest": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
36
+ "driftDigest": null,
37
+ "pressureDigest": null,
38
+ "taskSessionDigest": null,
39
+ "readPlan": {
40
+ "schemaVersion": "archcontext.projection-read-plan/v1",
41
+ "plannerVersion": "archcontext.projection-read-planner/v1",
42
+ "kind": "bounded-context",
43
+ "source": "git-authority",
44
+ "queryDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
45
+ "semanticLevel": "context",
46
+ "focusSubjectId": null,
47
+ "expandedKinds": [],
48
+ "depth": 1,
49
+ "limits": { "maxEntities": 80, "maxRelations": 160, "maxConstraints": 160, "maxBindings": 320, "maxBacklinks": 640, "maxGraphRows": 400 },
50
+ "requiredDomains": ["authority", "bindings", "evidence", "graph", "observed"],
51
+ "ordering": "canonical-id-asc",
52
+ "truncation": "hard-limit-with-authoritative-totals",
53
+ "planDigest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
54
+ },
55
+ "readSet": {
56
+ "schemaVersion": "archcontext.projection-read-set/v1",
57
+ "planDigest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
58
+ "selectedGraphDigest": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
59
+ "authoritativeTotals": { "entities": 1, "relations": 0, "constraints": 0 },
60
+ "entityKindTotals": [{ "kind": "module", "count": 1 }],
61
+ "rowsRead": { "entities": 1, "relations": 0, "constraints": 0, "bindings": 0, "backlinks": 0 },
62
+ "truncated": false,
63
+ "readSetDigest": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
64
+ },
65
+ "inputDomains": {
66
+ "authority": { "requirement": "required", "status": "ready", "digest": "sha256:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" },
67
+ "graph": { "requirement": "required", "status": "ready", "digest": "sha256:2222222222222222222222222222222222222222222222222222222222222222" },
68
+ "evidence": { "requirement": "required", "status": "ready", "digest": "sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" },
69
+ "observed": { "requirement": "required", "status": "ready", "digest": "sha256:3333333333333333333333333333333333333333333333333333333333333333" },
70
+ "bindings": { "requirement": "required", "status": "ready", "digest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" },
71
+ "event-backlinks": { "requirement": "optional", "status": "ready", "digest": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" },
72
+ "drift": { "requirement": "optional", "status": "unavailable", "digest": null, "reasonCode": "not-provided" },
73
+ "pressure": { "requirement": "optional", "status": "unavailable", "digest": null, "reasonCode": "not-provided" },
74
+ "task-session": { "requirement": "optional", "status": "unavailable", "digest": null, "reasonCode": "not-provided" }
75
+ },
76
+ "viewDefinitionDigest": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
77
+ "compilerVersion": "archcontext.explorer-view-compiler/v1",
78
+ "tokenRequired": true,
79
+ "compatibilityDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
80
+ "manifestDigest": "sha256:9999999999999999999999999999999999999999999999999999999999999999"
81
+ },
82
+ "occurrences": [{
83
+ "occurrenceId": "occurrence.system-map.group.fake",
84
+ "role": "derived-group",
85
+ "subjectRefs": [{ "kind": "architecture-entity", "id": "fake" }],
86
+ "name": "Fake",
87
+ "kind": "group",
88
+ "childrenCount": 0,
89
+ "expandable": false,
90
+ "verificationStatus": "UNKNOWN",
91
+ "authorityState": "DERIVED",
92
+ "pressure": { "evaluated": false, "signals": [] },
93
+ "sourceSelectors": [],
94
+ "provenance": { "declaredEntityIds": [], "observedSymbolIds": [], "evidenceBindingIds": [] },
95
+ "derivation": { "ruleId": "fake", "inputDigest": "sha256:x", "compilerVersion": "archcontext.explorer-view-compiler/v1" }
96
+ }],
97
+ "relations": [],
98
+ "page": { "budget": { "maxNodes": 1, "maxRelations": 0 }, "totalNodes": 1, "totalRelations": 0, "returnedNodes": 1, "returnedRelations": 0, "truncated": false, "omittedNodeCount": 0, "omittedRelationCount": 0 },
99
+ "projectionDigest": "sha256:5555555555555555555555555555555555555555555555555555555555555555",
100
+ "capabilities": { "readOnly": true, "mutationMode": "forbidden", "egress": "none", "tokenRequired": true }
101
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "schemaVersion": "archcontext.node/v1",
2
+ "schemaVersion": "archcontext.node/v2",
3
3
  "id": "module.subscription",
4
4
  "kind": "module",
5
5
  "name": "Subscription",
@@ -0,0 +1,14 @@
1
+ {
2
+ "schemaVersion": "archcontext.capabilities/v1",
3
+ "package": { "name": "archctx", "version": "0.4.0" },
4
+ "protocols": {
5
+ "projectionRequest": "archcontext.projection-request/v1",
6
+ "projectionResult": "archcontext.projection-result/v1",
7
+ "architectureRefreshSignal": "archcontext.architecture-refresh-signal/v1"
8
+ },
9
+ "renderers": {
10
+ "architectureDocs": "archcontext.docs-renderer/v2",
11
+ "agentContext": "archcontext.agent-context-renderer/v1"
12
+ },
13
+ "features": ["architecture-docs-renderer-v2", "architecture-refresh-signal-v1", "projection-protocol-v1"]
14
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "schemaVersion": "archcontext.flow/v1",
3
+ "id": "flow.subscriptions.create",
4
+ "capabilityId": "capability.subscriptions",
5
+ "name": "Create subscription",
6
+ "applicability": "required",
7
+ "participants": [
8
+ { "id": "client", "nodeId": "external.client" },
9
+ { "id": "api", "nodeId": "module.subscription" },
10
+ { "id": "store", "nodeId": "datastore.subscription" }
11
+ ],
12
+ "steps": [
13
+ {
14
+ "id": "request",
15
+ "from": "client",
16
+ "to": "api",
17
+ "label": "Create subscription",
18
+ "evidence": { "entrypointId": "entrypoint.subscription.create", "sourceSymbol": "createSubscription", "sinkId": "sink.subscription.persist" }
19
+ }
20
+ ],
21
+ "outcomes": [
22
+ {
23
+ "id": "accepted",
24
+ "kind": "success",
25
+ "label": "Subscription accepted",
26
+ "steps": [
27
+ {
28
+ "id": "persist",
29
+ "from": "api",
30
+ "to": "store",
31
+ "label": "Persist subscription",
32
+ "evidence": { "entrypointId": "entrypoint.subscription.create", "sourceSymbol": "createSubscription", "sinkId": "sink.subscription.persist" }
33
+ }
34
+ ],
35
+ "terminal": { "participant": "api", "label": "Return subscription ID" }
36
+ },
37
+ {
38
+ "id": "rejected",
39
+ "kind": "error",
40
+ "label": "Subscription rejected",
41
+ "steps": [
42
+ {
43
+ "id": "reject",
44
+ "from": "api",
45
+ "to": "client",
46
+ "label": "Return validation error",
47
+ "evidence": { "entrypointId": "entrypoint.subscription.create", "sourceSymbol": "createSubscription", "sinkId": "sink.subscription.persist" }
48
+ }
49
+ ],
50
+ "terminal": { "participant": "client", "label": "Handle validation error" }
51
+ }
52
+ ]
53
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "schemaVersion": "archcontext.node/v1",
2
+ "schemaVersion": "archcontext.node/v2",
3
3
  "id": "module.subscription",
4
4
  "kind": "module",
5
5
  "name": "Subscription",
@@ -10,7 +10,24 @@
10
10
  "source": {
11
11
  "include": ["src/subscription/**"],
12
12
  "exclude": ["src/subscription/generated/**"],
13
- "entrypoints": ["src/subscription/index.ts"]
13
+ "entrypoints": [
14
+ {
15
+ "id": "entrypoint.subscription.create",
16
+ "path": "src/subscription/index.ts",
17
+ "symbols": [
18
+ {
19
+ "name": "createSubscription",
20
+ "sinks": [
21
+ {
22
+ "id": "sink.subscription.persist",
23
+ "path": "src/subscription/store.ts",
24
+ "symbol": "saveSubscription"
25
+ }
26
+ ]
27
+ }
28
+ ]
29
+ }
30
+ ]
14
31
  },
15
32
  "ownership": {
16
33
  "lifecycle": ["subscription"],
@@ -0,0 +1,35 @@
1
+ {
2
+ "schemaVersion": "archcontext.architecture-refresh-signal/v1",
3
+ "signalId": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
4
+ "idempotencyKey": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
5
+ "mode": "refresh-required",
6
+ "repository": { "repositoryId": "repo.example" },
7
+ "worktree": {
8
+ "workspaceId": "ws.example",
9
+ "headSha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
10
+ "worktreeDigest": "sha256:3333333333333333333333333333333333333333333333333333333333333333"
11
+ },
12
+ "cause": "accepted-semantic-delta",
13
+ "acceptedChange": {
14
+ "changeSetId": "changeset.architecture-api-v2",
15
+ "eventId": "architecture_event.changeset_apply.api-v2",
16
+ "reasonCodes": ["entrypoint-changed", "responsibility-changed"],
17
+ "affectedNodeIds": ["capability.api", "capability.runtime"]
18
+ },
19
+ "reasonCodes": ["entrypoint-changed", "responsibility-changed"],
20
+ "affectedNodeIds": ["capability.api", "capability.runtime"],
21
+ "refreshTargets": ["architecture-contract-context", "architecture-readiness", "capability-context", "capability-index"],
22
+ "baseDigests": {
23
+ "modelDigest": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
24
+ "sourceTreeDigest": "sha256:5555555555555555555555555555555555555555555555555555555555555555",
25
+ "flowProofDigest": "sha256:6666666666666666666666666666666666666666666666666666666666666666",
26
+ "projectionDigest": "sha256:7777777777777777777777777777777777777777777777777777777777777777"
27
+ },
28
+ "resultingDigests": {
29
+ "modelDigest": "sha256:8888888888888888888888888888888888888888888888888888888888888888",
30
+ "sourceTreeDigest": "sha256:9999999999999999999999999999999999999999999999999999999999999999",
31
+ "flowProofDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
32
+ "projectionDigest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
33
+ },
34
+ "projectionReceiptDigest": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
35
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "schemaVersion": "archcontext.architecture-snapshot/v1",
2
+ "schemaVersion": "archcontext.architecture-snapshot/v2",
3
3
  "snapshotId": "arch_snapshot.al0_contract_freeze",
4
4
  "repository": {
5
5
  "repositoryId": "repo.archcontext",
@@ -14,14 +14,32 @@
14
14
  },
15
15
  "sourceMode": "dual",
16
16
  "eventCursor": {
17
+ "eventCount": 1,
18
+ "lastEventSequence": 1,
17
19
  "lastEventId": "arch_event.al0_contract_freeze",
18
20
  "lastEventHash": "sha256:5555555555555555555555555555555555555555555555555555555555555555"
19
21
  },
20
22
  "graphDigest": "sha256:6666666666666666666666666666666666666666666666666666666666666666",
23
+ "evidenceDigest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
24
+ "stateDigest": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
25
+ "state": {
26
+ "graph": {
27
+ "entities": [],
28
+ "relations": [],
29
+ "constraints": []
30
+ },
31
+ "evidence": {
32
+ "schemaVersion": "archcontext.evidence-state-at-cursor/v1",
33
+ "evidenceItems": [],
34
+ "evidenceBindings": [],
35
+ "tombstones": [],
36
+ "stateDigest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
37
+ }
38
+ },
21
39
  "projectionDigest": "sha256:7777777777777777777777777777777777777777777777777777777777777777",
22
- "entityCount": 12,
23
- "relationCount": 8,
24
- "constraintCount": 4,
40
+ "entityCount": 0,
41
+ "relationCount": 0,
42
+ "constraintCount": 0,
25
43
  "inputDigests": {
26
44
  "modelDigest": "sha256:8888888888888888888888888888888888888888888888888888888888888888",
27
45
  "codeFactsDigest": "sha256:9999999999999999999999999999999999999999999999999999999999999999",
@@ -0,0 +1,11 @@
1
+ {
2
+ "schemaVersion": "archcontext.explorer-delta-query/v2",
3
+ "base": {
4
+ "eventId": "arch_event.base",
5
+ "projectionDigest": "sha256:1111111111111111111111111111111111111111111111111111111111111111"
6
+ },
7
+ "head": {
8
+ "eventId": "arch_event.head",
9
+ "projectionDigest": "sha256:2222222222222222222222222222222222222222222222222222222222222222"
10
+ }
11
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "schemaVersion": "archcontext.explorer-projection-delta/v2",
3
+ "base": {
4
+ "schemaVersion": "archcontext.authority-cursor/v1",
5
+ "repository": { "repositoryId": "repo.local", "storageRepositoryId": "repo.storage" },
6
+ "worktree": { "workspaceId": "ws.local", "storageWorkspaceId": "ws.storage", "branch": "main", "headSha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "worktreeDigest": "sha256:1111111111111111111111111111111111111111111111111111111111111111" },
7
+ "eventSequence": 1,
8
+ "eventId": "arch_event.base",
9
+ "eventHash": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
10
+ "graphDigest": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
11
+ "evidenceStateDigest": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
12
+ "projectionDigest": "sha256:5555555555555555555555555555555555555555555555555555555555555555",
13
+ "inputManifestDigest": "sha256:6666666666666666666666666666666666666666666666666666666666666666"
14
+ },
15
+ "head": {
16
+ "schemaVersion": "archcontext.authority-cursor/v1",
17
+ "repository": { "repositoryId": "repo.local", "storageRepositoryId": "repo.storage" },
18
+ "worktree": { "workspaceId": "ws.local", "storageWorkspaceId": "ws.storage", "branch": "main", "headSha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "worktreeDigest": "sha256:7777777777777777777777777777777777777777777777777777777777777777" },
19
+ "eventSequence": 2,
20
+ "eventId": "arch_event.head",
21
+ "eventHash": "sha256:8888888888888888888888888888888888888888888888888888888888888888",
22
+ "graphDigest": "sha256:9999999999999999999999999999999999999999999999999999999999999999",
23
+ "evidenceStateDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
24
+ "projectionDigest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
25
+ "inputManifestDigest": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
26
+ },
27
+ "factChanges": [{ "deltaClass": "architecture-fact", "subjectId": "entity:module.api", "change": "added", "fields": ["entity"] }],
28
+ "evidenceChanges": [],
29
+ "projectionChanges": [],
30
+ "counts": { "architecture-fact": 1, "evidence": 0, "projection": 0 },
31
+ "deltaDigest": "sha256:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
32
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "schemaVersion": "archcontext.explorer-projection-query/v2",
3
+ "viewId": "system-map",
4
+ "depth": 1,
5
+ "budget": { "maxNodes": 80, "maxRelations": 160 }
6
+ }