@mean-weasel/lineage 0.1.10 → 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,17 @@
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
+
9
+ ## 0.1.11
10
+
11
+ - Add `--asset-root` / `LINEAGE_ASSET_ROOT` so installed Lineage packages can use external project catalogs and local media independently from the SQLite path.
12
+ - Show the active asset root in CLI startup, `db info`, and Settings alongside the active SQLite identity.
13
+ - Extend the packed-tarball smoke to prove an unrelated npm consumer can start Lineage and export a real external-project selection packet.
14
+
3
15
  ## 0.1.10
4
16
 
5
17
  - Fix `lineage db info` so installed CLI checks use the same stable/dev runtime SQLite defaults as `lineage start`.
package/README.md CHANGED
@@ -38,9 +38,16 @@ lineage-dev start
38
38
  By default, `lineage start` listens on `lineage.localhost:5197` and stores SQLite state in a stable Lineage runtime directory. `lineage-dev start` listens on `lineage-dev.localhost:5198` and uses a separate development SQLite file. Override those defaults with `--port`, `--host`, `--db`, or `LINEAGE_HOME`:
39
39
 
40
40
  ```bash
41
- lineage start --port 6123 --db ~/.lineage/lineage.sqlite
41
+ lineage start --port 6123 --db ~/.lineage/lineage.sqlite --asset-root /absolute/path/to/asset-repo
42
42
  ```
43
43
 
44
+ `--db` selects the SQLite state file. `--asset-root` (or
45
+ `LINEAGE_ASSET_ROOT`) independently selects the external repository root that
46
+ contains `<project>/assets/catalog.json` and `.asset-scratch` media. Keep these
47
+ arguments explicit when Lineage is installed as a dependency of another repo;
48
+ the installed package directory remains responsible only for bundled code,
49
+ web assets, and public demo fixtures.
50
+
44
51
  ## Runtime Channels and SQLite
45
52
 
46
53
  Lineage treats app code channels and local SQLite data as separate concerns:
@@ -55,6 +62,58 @@ intentional, explicit test. Prefer copying a stable snapshot forward when a
55
62
  realistic preview/dev dataset is needed. `--db` and `LINEAGE_DB` remain the
56
63
  escape hatches for intentionally choosing a database.
57
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
+
58
117
  Check the active runtime before making changes:
59
118
 
60
119
  ```bash
@@ -62,8 +121,9 @@ lineage db info --json
62
121
  lineage-dev db info --json
63
122
  ```
64
123
 
65
- The app also shows channel, version, Git SHA when available, and SQLite path in
66
- 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.
67
127
 
68
128
  ## Agent Claims
69
129
 
@@ -89,7 +149,9 @@ Agents can also export the current active workspace selection as a durable JSON
89
149
  packet for downstream tools such as GrowthOps:
90
150
 
91
151
  ```bash
92
- lineage selection packet --project demo-project --channel linkedin --campaign 2026-07-launch --out ./lineage-selection-packet.json --json
152
+ lineage selection packet --project demo-project --channel linkedin --campaign 2026-07-launch \
153
+ --db /absolute/path/to/lineage.sqlite --asset-root /absolute/path/to/asset-repo \
154
+ --out ./lineage-selection-packet.json --json
93
155
  ```
94
156
 
95
157
  The packet is schema-versioned as `lineage.selection_packet.v1` and includes the
@@ -99,6 +161,22 @@ Lineage only exports the packet. GrowthOps or another downstream tool remains
99
161
  responsible for importing it, creating posts, checking media readiness, preparing
100
162
  public URLs, scheduling, and recording placement receipts.
101
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
+
102
180
  Keep the claim fresh and pass it to mutating commands:
103
181
 
104
182
  ```bash