@lace-cloud/canvas 0.24.0 → 0.26.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.
package/README.md CHANGED
@@ -75,6 +75,11 @@ if (apply) await runner.run(apply, { root, stack }, {});
75
75
  // results.getSnapshot().run is the run's phases, last log line and outcome.
76
76
  ```
77
77
 
78
+ A command that failed says why as data (`CommandExitError.failure`), and
79
+ `answering(CORE_COMMAND_ACTIONS, failure)` is what a host offers on it:
80
+ the actions that answer that failure's reason (Import the rest answers
81
+ `import_residual`), each run the same way with `{ failure }` as its target.
82
+
78
83
  A host that mounts the canvas can own its result store too: pass it as
79
84
  `<App ports={ports} results={results} />` and call `results.bumpTick()`
80
85
  when something outside the canvas changed what `stack describe` reports
@@ -122,8 +127,9 @@ const { ports, close } = await openEngineSession(caller, { root: '/path/to/autho
122
127
  iterable throws it). Every `source` frame names the
123
128
  tree the session last observed (`treeHash`), and a subscriber that
124
129
  passes `onCommandResult` receives the result of every command that ran
125
- in the session's root, the last per command path replayed when it joins
126
- late — the input of `foldReport`, whose `currentReport` keeps the
130
+ in the session's root, the last per command path replayed in the order
131
+ they were published when it joins late — the input of `foldReport`,
132
+ whose `currentReport` keeps the
127
133
  entries about that tree. The stream's end reaches every
128
134
  `source` subscriber as `{ kind: 'closed' }` — the session is gone — or
129
135
  `{ kind: 'failed', error }` — the stream is gone and the session
@@ -138,11 +144,13 @@ const { ports, close } = await openEngineSession(caller, { root: '/path/to/autho
138
144
  `Invocation.cancel()` sends `CancelInvoke`
139
145
  only and leaves `events` running until the command's own exit — a
140
146
  `signal` abort or `close()` detaches the stream instead, without
141
- cancelling the command's remote effects. An `Invoke` stream that ends
142
- before the command's exit rejects `events` with `CommandDetachedError`
143
- when the consumer's `signal` aborted, and with `CommandUnobservedError`
144
- when the consumer was still listening: the command ran in the engine
145
- and its outcome never arrived.
147
+ cancelling the command's remote effects. An `Invoke` stream that stops
148
+ before the command's exit, by an end or an error, rejects `events` with
149
+ `CommandDetachedError` when the consumer's `signal` aborted; otherwise
150
+ with `CommandUnobservedError` once the engine sent `started` (it
151
+ accepted the request and runs the command, so the command ran and its
152
+ outcome never arrived), and with the call's own error before it (the
153
+ command never ran).
146
154
  - `openEngineCommands(caller, { cwd })` is the commands mapping:
147
155
  `Initialize` once, `Invoke` per command, no session and no Subscribe.
148
156
  - Both mappings name the protocol version this package speaks