mirai-graph 1.4.0 → 1.6.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.
@@ -15,6 +15,7 @@
15
15
  "target_id": { "type": "string", "minLength": 2 },
16
16
  "semantic_digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
17
17
  "provider_revision": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
18
+ "provider_graph_id": { "type": "string", "minLength": 2, "maxLength": 256, "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/@?=+*-]+$" },
18
19
  "decision_refs": { "$ref": "#/$defs/nonEmptyRefs" },
19
20
  "goal_binding": {
20
21
  "type": "object", "additionalProperties": false,
@@ -1,5 +1,74 @@
1
1
  # Project Technology
2
2
 
3
+ ## Local accepted targets (candidate extension)
4
+
5
+ Local targets use the same execution-contract normalizer as external providers.
6
+ They do not need Git or a self-connected provider. The optional manifest
7
+ `extensions.mirai.project_technology.target_source` contains exactly
8
+ `{kind:"local", target_id, acceptance_ref}`. It selects existing `graph/specs`
9
+ objects and never approves them. No new profile or manifest version is required.
10
+
11
+ The selected target has the existing `provider_execution_contract` shape. Every
12
+ required object, goal/Done When, requirement/acceptance, constraint, non-goal,
13
+ deferred boundary and architecture reference must resolve to accepted canonical
14
+ specs. Required relations close transitively; cycles and conflicts block work.
15
+ The acceptance is a `decision` object with subtype
16
+ `architecture_baseline_acceptance`, accepted lifecycle/readiness, `graph_id`,
17
+ `target_id`, `owner_id`, `semantic_digest`, `execution_contract_digest` and a
18
+ bounded `approval_ref`. It must match the declared architecture owner.
19
+
20
+ The caller supplies `localAcceptance` / `--local-acceptance-trust <file>` (or `-`
21
+ for stdin): `{graphId,targetId,ownerId,decisionSha256}`. This is **trusted caller
22
+ input** obtained from the existing human-approval authority channel. The engine
23
+ checks consistency, not the human's identity. Calculating the hash from an
24
+ untrusted folder is not authentication. The anchor is never obtained from graph
25
+ contents or auto-created/persisted by sync. A new host without authenticated
26
+ approval gets `local_target_acceptance_unverified`; read-only diagnosis remains
27
+ available. A host-local cache is not portable acceptance authority.
28
+
29
+ `plan` returns the same `target_binding` as `status`; it exposes calculated
30
+ digests for review even when acceptance is blocked. The local `semantic_digest`
31
+ hashes canonical JSON of graph ID, target ID, selected objects and relations.
32
+ Object keys are sorted; objects and relations are sorted by ID. Timestamps,
33
+ evidence, approval refs and computed digest fields are excluded. The acceptance
34
+ object is excluded to avoid self-reference. Source refs retain their paths, not
35
+ content hashes. Normalized meaning, required closure and scope stay bound.
36
+ `execution_contract_digest` hashes the shared normalized contract. Source/evidence
37
+ bytes are separately hashed into `content_revision`; the target pins that value.
38
+ Tool drift blocks freshness without re-accepting architecture. JSON formatting
39
+ does not change semantics; changed source bytes (including line endings) change
40
+ content identity intentionally. Paths, clocks and Git HEAD are not local IDs.
41
+ `provider_revision` remains exclusive to external Git/archive bindings.
42
+
43
+ Selection is `sync --target-source <selector.json> --local-acceptance-trust <anchor.json>
44
+ --expected-graph-digest <digest> --apply`; omit `--apply` for zero-write preview.
45
+ Use `continuity.graphDigest(repo)` for the CAS value. Selection uses the existing
46
+ continuity lease, backup, atomic rename and readback. Repetition is byte-identical.
47
+ Select before a separate task-boundary sync; these are not a combined transaction.
48
+ Significant `context` and `verify` additionally require a current receipt from the
49
+ existing continuity mechanism, even when the optional policy was omitted.
50
+ Updating a content pin is not a verification receipt. Record actual checks through
51
+ `sync --boundary stage_complete --evidence <checks.json> --apply` after validating
52
+ the sources. A second host must verify those sources and record its own fresh
53
+ receipt; it does not have to re-approve unchanged architecture.
54
+ `disconnect --expected-graph-digest <digest> --apply` removes only the local
55
+ selector through the same lease/CAS/backup transaction. It does not remove the
56
+ target or its Decision. Without `--apply` it remains a preview.
57
+ Git hygiene remains strict: a changed tracked manifest must be committed through
58
+ the caller's authorized Git workflow before execution becomes ready.
59
+ Before the first Git commit, a structurally valid unborn branch may inventory
60
+ declared graph/raw sources using the same content-bound path as an ordinary
61
+ folder. Missing Git, corrupt refs/index and invalid detached HEAD stay blocked.
62
+ This never supplies `provider_revision` or permits a Git provider export.
63
+
64
+ Local and external bindings conflict rather than override each other. Missing
65
+ external providers never cause fallback to local data. Local raw sources must be
66
+ safe relative files, not `source/`, generated outputs, symlinks or external URLs;
67
+ external technologies continue to use verified providers. Raw file contents are
68
+ not included in the target packet. Existing folder safety and action authorization
69
+ still apply: ready is not permission to write. Shared-server leases do not lock
70
+ offline sync replicas; divergent expected state requires reconciliation.
71
+
3
72
  Status: 1.4 stable standard; activation contract remains 1.0.0
4
73
 
5
74
  Project Technology is the shared executable mechanism of Mirai Graph. It is
@@ -7,6 +76,59 @@ not a profile, a second graph or a source of domain methodology.
7
76
 
8
77
  ## One Mechanism, Different Graphs
9
78
 
79
+ ### Archived providers (unreleased compatibility extension)
80
+
81
+ The normal source provider path continues to verify Git HEAD and ancestry.
82
+ For an immutable distribution, `connect` also accepts `providerArchive` in the
83
+ JavaScript options, or `--provider-archive-trust <file>` in the CLI (use `-`
84
+ to read that bounded JSON from stdin without creating a temporary file):
85
+
86
+ ```json
87
+ {
88
+ "exportSha256": "<SHA-256 of the exact bounded export bytes>",
89
+ "graphId": "example.provider",
90
+ "providerRevision": "<exact 40-character source revision>",
91
+ "ancestorRevisions": ["<previous supported revision, proven during release build>"]
92
+ }
93
+ ```
94
+
95
+ This is a **consumer trust input**, not provider self-authentication. The caller
96
+ must derive it from an authenticated release lock/manifest after checking its
97
+ integrity and issuer. Never calculate a hash from an untrusted download and
98
+ call that authentication. Mirai does not discover, download or trust adjacent
99
+ metadata automatically. Packaging must verify the export against the accepted
100
+ source target and the declared source revision before publishing its digest.
101
+ Ancestor entries must be proven by the source Git history during that build;
102
+ they are not inferred from version numbers, dates or commit hash ordering.
103
+
104
+ The existing `technology verify <repository> --source <bounded-export>` and
105
+ `verifyProviderExport(repository, options)` provide a read-only source-side
106
+ proof for packaging. They require a revision-bound enabled manifest, exact HEAD,
107
+ accepted target and matching execution contract, and return the anchor with at
108
+ most 4096 proven ancestors. A packaging caller must then authenticate the release
109
+ metadata containing this anchor. This proof is not permission to execute a
110
+ significant task; requesting significant work through it is blocked.
111
+
112
+ Exports produced by `provide` now include `provider_graph_id`. Old Git-backed
113
+ exports remain readable; archive import requires the graph identity. `connect`
114
+ uses the same full accepted execution contract validation and atomic import.
115
+ `--refresh-binding` still requires the same target and semantic/architecture
116
+ contract; a changed revision must explicitly descend from the current binding
117
+ in the authenticated release metadata. A wrong or incomplete anchor fails,
118
+ even when a working Git checkout happens to be available. The caller cannot
119
+ use archive trust to authorize work, change owners, expand scope or bypass
120
+ acceptance. `provide` continues to require the canonical Git source; archive
121
+ consumers import its immutable output, never regenerate acceptance from copies.
122
+
123
+ Status/verify use the hash-bound local import and remain read-only. Without a
124
+ Git repository, inventory reads only the manifest and explicitly declared graph
125
+ and raw-source paths, with a bounded traversal. Missing, unsafe or unsupported
126
+ declared paths block sync before writes. Symlinks and secret/excluded paths are
127
+ not imported. Ordinary folders use content digests and a null inventory revision,
128
+ never a fabricated Git revision. If Git metadata exists but Git is unavailable,
129
+ inventory fails closed instead of silently treating a checkout as an archive.
130
+ Raw-source access and release authenticity remain separate responsibilities.
131
+
10
132
  The root `graph.json` declares the repository scope and profiles. The same
11
133
  Project Technology operations therefore work for:
12
134