@mean-weasel/lineage 0.1.11 → 0.1.12

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.12
4
+
5
+ - Add named runtime profiles that bind environment, SQLite, media root, service origin, and expected runtime identity without allowing silent path drift.
6
+ - Enforce a single cross-process writer lease per profile and route profile-bound mutations through the authenticated managed service while keeping inspections read-only.
7
+ - Add opt-in `lineage.selection_packet.v2` exports whose stable semantic identity binds ordered selections to their current attempts and checksums for durable GrowthOps handoff receipts.
8
+
3
9
  ## 0.1.11
4
10
 
5
11
  - Add `--asset-root` / `LINEAGE_ASSET_ROOT` so installed Lineage packages can use external project catalogs and local media independently from the SQLite path.
package/README.md CHANGED
@@ -62,6 +62,58 @@ intentional, explicit test. Prefer copying a stable snapshot forward when a
62
62
  realistic preview/dev dataset is needed. `--db` and `LINEAGE_DB` remain the
63
63
  escape hatches for intentionally choosing a database.
64
64
 
65
+ For repeatable or multi-session work, prefer a named profile over those legacy
66
+ path defaults. A profile is an immutable identity contract for one Lineage
67
+ service and its data:
68
+
69
+ ```json
70
+ {
71
+ "schema_version": "lineage.profile.v1",
72
+ "profile_id": "team-production",
73
+ "environment": "production",
74
+ "database_path": "./lineage.sqlite",
75
+ "asset_root": "./media",
76
+ "service_origin": "http://lineage.localhost:5197"
77
+ }
78
+ ```
79
+
80
+ Named profiles live at `$LINEAGE_PROFILE_ROOT/<profile-id>/profile.json` by
81
+ default, or can be selected with an explicit manifest path. Relative database
82
+ and asset paths resolve from the manifest directory. Inspect a profile without
83
+ creating or migrating anything:
84
+
85
+ ```bash
86
+ lineage profile doctor --profile team-production --json
87
+ lineage profile bind --profile team-production --confirm-write --json
88
+ lineage start --profile team-production
89
+ ```
90
+
91
+ `LINEAGE_PROFILE` is equivalent to `--profile`. Profile commands reject direct
92
+ `--db` and `--asset-root` overrides, and a dev or preview runtime refuses to
93
+ open a production profile. Doctor also requires the existing SQLite database
94
+ to have one matching `lineage_profile_identity` binding; `profile bind` creates
95
+ that identity for a new database or explicitly adopts a legacy database, and
96
+ requires `--confirm-write`. Profile creation and database binding remain
97
+ separate migration operations. A
98
+ command without a profile remains compatible but is labeled `legacy-unbound`.
99
+
100
+ A named profile has one cross-process writer lease at
101
+ `<resolved-database-path>.writer.lock`. The managed service holds that lease for its
102
+ lifetime, so a second service is refused while it is running. Named-profile
103
+ mutating CLI commands, including generated claim, heartbeat, link-child, and
104
+ re-roll import handoffs, use an authenticated profile-bound route through that
105
+ service instead of opening SQLite as a competing writer. The request and
106
+ response identities must match the selected profile, environment, channel, and
107
+ configured localhost origin; an unavailable or mismatched service fails closed
108
+ without a direct-write fallback. A CLI data command may hold the same lease
109
+ directly only while the service is offline. Lineage verifies lease ownership
110
+ before opening a named-profile database for writes and configures SQLite with
111
+ WAL journaling and a five-second busy timeout. If an owner was killed, the next
112
+ writer may reclaim the lock only after the recorded PID is no longer alive;
113
+ malformed or mismatched lock metadata is left in place for manual inspection.
114
+ `profile doctor` never acquires or modifies the lease. Legacy-unbound databases
115
+ retain their existing compatibility behavior and also use WAL.
116
+
65
117
  Check the active runtime before making changes:
66
118
 
67
119
  ```bash
@@ -69,8 +121,9 @@ lineage db info --json
69
121
  lineage-dev db info --json
70
122
  ```
71
123
 
72
- The app also shows channel, version, Git SHA when available, and SQLite path in
73
- Settings.
124
+ The app shows a persistent environment/profile badge, and Settings includes the
125
+ profile binding, channel, version, Git SHA when available, schema markers, and
126
+ SQLite path.
74
127
 
75
128
  ## Agent Claims
76
129
 
@@ -108,6 +161,22 @@ Lineage only exports the packet. GrowthOps or another downstream tool remains
108
161
  responsible for importing it, creating posts, checking media readiness, preparing
109
162
  public URLs, scheduling, and recording placement receipts.
110
163
 
164
+ Version 1 remains the default for compatibility. Opt in to the current-attempt-
165
+ bound contract with `--schema v2`:
166
+
167
+ ```bash
168
+ lineage selection packet --project demo-project --schema v2 \
169
+ --out ./lineage-selection-packet-v2.json --json
170
+ ```
171
+
172
+ The `lineage.selection_packet.v2` packet requires a verifiable current attempt
173
+ and lowercase SHA-256 checksum for every selected asset. Its full
174
+ `identity_sha256` and derived `packet_id` bind only the canonical semantic
175
+ selection: project/product, workspace/root, context, ordered selected assets and
176
+ their current attempts, and stable diagnostics. Timestamps, local paths, storage
177
+ details, source metadata, generation job IDs, and human-readable warning/error
178
+ text stay in the envelope but do not change v2 identity.
179
+
111
180
  Keep the claim fresh and pass it to mutating commands:
112
181
 
113
182
  ```bash