uc-config 0.2.2 → 0.2.3

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
@@ -9,6 +9,17 @@ npx uc-config init --refresh-docs
9
9
  npx uc-config compile && npx uc-config plan # must show 0 operations
10
10
  ```
11
11
 
12
+ ## 0.2.3
13
+
14
+ Action required: none. Docs only.
15
+
16
+ - README: what to do when a plan contains operations you didn't make, how to
17
+ read full sequence changes from `.uc/plan.json`, telling a sleeping remote
18
+ from a machine without LAN access, and what `deferred` means.
19
+ - Snippets: corrected the entity-swap recipe. Swapped-in commands are deferred
20
+ until the `entity_ids` change is applied, rather than failing with
21
+ `Cannot verify command`.
22
+
12
23
  ## 0.2.2
13
24
 
14
25
  Action required: optional. Run `npx uc-config init --refresh-docs` to get the
package/README.md CHANGED
@@ -208,6 +208,19 @@ npm run uc -- check # must report 0 operations
208
208
  remote identity, firmware and preconditions first. A plan with zero operations
209
209
  needs no apply. See [docs/snippets.md](docs/snippets.md) for common edits.
210
210
 
211
+ **If the plan touches things you didn't edit, stop.** Those operations are
212
+ earlier source changes that were never applied, or edits made on the remote
213
+ since. Don't apply them along with your change: sync with the live remote first
214
+ (see [Pull changes made in the web configurator](docs/snippets.md#pull-changes-made-in-the-web-configurator)),
215
+ then replan until only your change is left.
216
+
217
+ **The plan output shortens long sequences.** To see the exact step-by-step
218
+ change, compare each operation's `before` with its `desired` in `.uc/plan.json`:
219
+
220
+ ```sh
221
+ jq '.operations[] | {key, action, before, desired}' .uc/plan.json
222
+ ```
223
+
211
224
  ## Diagnostics and fixing problems
212
225
 
213
226
  Run `diagnose` whenever something looks wrong on the remote, after any
@@ -235,14 +248,15 @@ For each orphan it proposes a fix:
235
248
 
236
249
  Plan/apply problems:
237
250
 
238
- | Message | Meaning and fix |
239
- | ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
240
- | `Drift at <fields>` | Someone (or a driver update) changed an owned field on the remote. Copy the live value into source, or rerun `plan --overwrite-drift` only if the user wants the source value restored. |
241
- | `Managed resource disappeared` | Resource was deleted on the remote. Run `diagnose`; re-add or remove from source. |
242
- | `Cannot verify command` | `cmd_id` isn't advertised by that entity, or the entity isn't in the activity's `entity_ids`. Check `generated/devices.ts`, refresh inventory. |
243
- | `Remote firmware changed; reconnect and replan` | Remote auto-updated. Rerun `connect <name> --host ...` (keeps credentials), then plan. |
244
- | `transport failed` / timeouts | Remote asleep (wake it) or no LAN access from this machine. |
245
- | Uncertain writes after a crash | Run `resume`. Never blindly rerun apply; use `state adopt KEY ID` if a create actually succeeded. |
251
+ | Message | Meaning and fix |
252
+ | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
253
+ | `Drift at <fields>` | Someone (or a driver update) changed an owned field on the remote. Copy the live value into source, or rerun `plan --overwrite-drift` only if the user wants the source value restored. |
254
+ | `Managed resource disappeared` | Resource was deleted on the remote. Run `diagnose`; re-add or remove from source. |
255
+ | `Cannot verify command` | `cmd_id` isn't advertised by that entity, or the entity isn't in the activity's `entity_ids`. Check `generated/devices.ts`, refresh inventory. |
256
+ | `Remote firmware changed; reconnect and replan` | Remote auto-updated. Rerun `connect <name> --host ...` (keeps credentials), then plan. |
257
+ | `transport failed` / timeouts | Remote asleep, or this machine has no LAN access. Ping the router and another LAN device: if they fail too, it's this machine (on macOS, Local Network privacy), and waking the remote won't help. |
258
+ | `deferred ...: apply prerequisites, then replan` | The item depends on another change in the same plan (e.g. a new entity in `entity_ids`). Apply the plan, then plan again for the deferred items. |
259
+ | Uncertain writes after a crash | Run `resume`. Never blindly rerun apply; use `state adopt KEY ID` if a create actually succeeded. |
246
260
 
247
261
  `npm run uc -- api GET <path>` makes a raw authenticated Core API read (output
248
262
  redacted). Non-GET methods require `--write` and should only be used for the
package/docs/snippets.md CHANGED
@@ -254,9 +254,10 @@ npm run uc -- compile && npm run uc -- plan --out .uc/plan.json && npm run uc --
254
254
  npm run uc -- diagnose
255
255
  ```
256
256
 
257
- If the plan reports `Cannot verify command` for the swapped entity, the
258
- activity's live `included_entities` still lists the old one. Apply the
259
- `entity_ids` change first, then replan for the buttons and sequences.
257
+ Buttons and sequences that use the new entity show up as **deferred** until the
258
+ activity's `entity_ids` change is on the remote. Apply the plan, then plan and
259
+ apply again for the deferred items. `check` must report 0 operations at the
260
+ end.
260
261
 
261
262
  **Drift from a driver renaming something** (`Drift at data.name`): copy the
262
263
  live value (shown in the plan) into source, then:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uc-config",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "type": "module",
5
5
  "description": "Configuration-as-code for the Unfolded Circle Remote 3, designed to be driven by coding agents",
6
6
  "license": "MIT",