diff --git a/README.md b/README.md index 0b397c4..b2c4f93 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,18 @@ commit. Tags for older API versions stay at their last compatible commit. the checkout's `docs/package-api.md`. A missing tag refuses the operation. Each installed Package's Provenance Stamp records the exact collection commit it came from. +For a running development Realm: + +```bash +./lyracore packages add example-script +./lyracore packages apply +``` + +`apply` builds missing or stale artifacts, publishes the Module when Rust Packages require it, +and applies artifacts to the recorded development topology. Pass Shard names to select targets. +Use `--check` to prepare and inspect without Realm changes. Client content uses `client sync`. +Update Core to a revision whose CLI provides `packages apply` before following these instructions. + ## Packages Start with these Reference Packages. Each adds a small welcome at one level of the Package API. diff --git a/example-all/README.md b/example-all/README.md index 6ba3f1e..68b4d6d 100644 --- a/example-all/README.md +++ b/example-all/README.md @@ -8,8 +8,9 @@ When no script answers, Rust reads Package Config key `welcome`. `false` suppres `true`, a missing value, or an invalid value sends it. The default is `true`. Package tests run the authored Lua in the Runtime Script Host and check the fallback. -Install with `./lyracore packages add example-all`, then publish through the normal realm -update. Apply its Script Artifact with `./lyracore packages replay` on your development topology. +Install with `./lyracore packages add example-all`, then run `./lyracore packages apply` on your +development topology. It builds artifacts when needed, publishes the Module, repairs schedules, +and applies the Script Artifact. After editing the Runtime Script, run `./lyracore packages build` and commit its Script Artifact and Build Identity together. Its Script ID is 100302. Give copies distinct IDs before installing them together. diff --git a/example-data/README.md b/example-data/README.md index 83ef8ee..ca521fc 100644 --- a/example-data/README.md +++ b/example-data/README.md @@ -3,8 +3,9 @@ `datascripts/welcome.ts` clones Fireball, spell 133, into Package Spell 6000300 and names it `A Warm Welcome`. Its other columns and effects stay the same. -Install with `./lyracore packages add example-data`. With a Base Snapshot from your own client -data, run `./lyracore packages build`, then use the normal base import to apply the Package Delta. +Install with `./lyracore packages add example-data`. Run `./lyracore packages apply` with your own +client data configured. It extracts a missing Base Snapshot, builds the Delta locally, and applies it +to your development topology. The spell has Fireball's effect when cast. An unmodified client has no tooltip for a Package Spell. Keep the Datascript as source. The generated Delta and its Build Identity stay local under diff --git a/example-rust/README.md b/example-rust/README.md index d52a4bf..e8e949a 100644 --- a/example-rust/README.md +++ b/example-rust/README.md @@ -4,6 +4,6 @@ One `on_login` hook sends a System Message through `actor::system_message`. It s Config key `greeting` on first login and reads it on each login. A blank value uses the default welcome. The Package test covers that fallback. -Install with `./lyracore packages add example-rust`, then publish through the normal realm -update. On your development topology, `./lyracore packages config example-rust greeting "Hello!"` +Install with `./lyracore packages add example-rust`, then run `./lyracore packages apply` on your +development topology. It publishes the Module and repairs schedules. On your development topology, `./lyracore packages config example-rust greeting "Hello!"` changes the next welcome without another publish. diff --git a/example-script/README.md b/example-script/README.md index 0306209..b207d4c 100644 --- a/example-script/README.md +++ b/example-script/README.md @@ -4,7 +4,8 @@ `send_chat` on the Character carried by the event. This Package needs no Rust. Install with `./lyracore packages add example-script`, then apply the committed Script Artifact -with `./lyracore packages replay` on your development topology. After editing either source, run +with `./lyracore packages apply` on your development topology. It builds missing or stale artifacts when needed. After editing +either source, run `./lyracore packages build` and commit the Script Artifact and its Build Identity together. The Script IDs are 100300 and 100301. Give copies distinct IDs before installing them together. diff --git a/playerbots/README.md b/playerbots/README.md index f510a66..4a094a7 100644 --- a/playerbots/README.md +++ b/playerbots/README.md @@ -182,23 +182,11 @@ upstream produced it, so there is no Datascript revision to record. LyraCore#320 would generate the same artifact through the same runtime path; until it exists, hand-written Lua is the supported way to ship a Runtime Script. -**Reconciling an edit.** Editing the file changes nothing by itself. Apply it to every Shard: - -```bash -spacetime call apply_package_deltas '"script"' "$( - for f in packages/*/data/.generated/*.json; do jq -c 'select(.kind == "script")' "$f"; done | jq -Rs . -)" -``` - -Two things about that command are load-bearing. The payload is the WHOLE enabled plan, every -Package's Script Artifact and not just this one: an apply clears the Package script range and -rewrites it, so naming one Package would delete every other Package's scripts. And each artifact -travels on ONE line, which is what `jq -c` is for — the file here is pretty-printed because a human -edits it. - -No republish is involved, and none is needed. LyraCore#393 tracks carrying the `script` family -through `lyracore packages replay`, which would make this one command for the whole realm instead of -this. +**Reconciling an edit.** Run `lyracore packages apply` to prepare and apply the whole enabled +Script Artifact plan to every Shard in your development topology. Pass Shard names to select +other targets. The command also publishes the Module because this Package contains Rust. +An apply replaces the Package Script Range, so applying one Package's artifact by itself would +remove other Packages' Runtime Scripts. **What a script cannot do.** Nothing new. A Runtime Script sees the curated verb surface the Host already offers — `heal`, `send_chat`, `grant_xp`, and the snapshotted Entity Handle fields — and no @@ -420,8 +408,7 @@ contract. ## Turning playerbots off -Run `lyracore packages disable playerbots` with the Realm up, then `lyracore publish` and -`lyracore packages replay`. Before the move, `disable` runs Core's Package Teardown on every Shard. +Run `lyracore packages disable playerbots` with the Realm up, then `lyracore packages apply`. Before the move, `disable` runs Core's Package Teardown on every Shard. Teardown empties every `pkg_playerbots_*` table and deletes this Package's Package Config. Every bot in the roster becomes a Dormant Character: offline, with no live entity, and with its Account and Character rows kept. The roster includes bots that crossed from another Shard and bots on Accounts