@@ -1,86 +1,17 @@
11+++
22title = "Dojo Tools"
3−weight = 5
3+weight = 9
44template = "doc.html"
55+++
66
7−A number of generators are included for managing and viewing the status of desks and their agents. Each of these are documented below.
7+## Desks, apps and updates
88
9−Note that some old generators have been replaced:
10−
11−- `|start` - Replaced with [`|rein`](#rein).
12−- `|ota` - Replaced with [`|install`](#install), [`|uninstall`](#uninstall), [`|pause`](#pause) and [`|resume`](#resume).
13−- `|fade` - Replaced with [`|nuke`](#nuke).
14−- `|doze` - Replaced with [`|rein`](#rein) or [`|suspend`](#suspend).
15−- `|wake` - Replaced with [`|rein`](#rein) or [`|revive`](#revive).
16−- `+trouble` - This still exists but is deprecated, and is now an alias for [`+vats`](#vats).
17−
18−---
19−
20−## `+vats`
21−
22−Print out the status of each installed desk.
23−
24−Desks in Clay which aren't installed will be omitted.
25−
26−Fields:
27−
28−- `/sys/kelvin` - The version of `%zuse` the desk is compatible with.
29−- `base hash` - The merge base (common ancestor) between the desk and its upstream source.
30−- `%cz hash` - The hash of the desk.
31−- `app status` - May be `suspended` or `running`.
32−- `force on` - The set of agents on the desk which have been manually started despite not being on the `desk.bill` manifest.
33−- `force off` - The set of agents on the desk which have been manually stopped despite being on the `desk.bill` manifest.
34−- `publishing ship` - The original publisher if the source ship is republishing the desk.
35−- `updates` - May be `local`, `tracking` or `paused`. Local means it will receive updates via commits on the local ship. Tracking means it will receive updates from the `source ship`. Paused means it will not receive updates.
36−- `source desk` - The desk on the `source ship`.
37−- `source aeon` - The revision number of the desk on the `source ship`.
38−- `pending updates` - Updates waiting to be applied due to incompatibility.
39−
40−#### Arguments
41−
42−None.
43−
44−#### Examples
45−
46−```
47−> +vats
48−%base
49− /sys/kelvin: [%zuse 418]
50− base hash: ~
51− %cz hash: 0v6.2nqmu.oqm24.ighl6.n0gp9.s8res.feql1.dl8ap.isli3.jk0hu.acrd2
52− app status: running
53− force on: ~
54− force off: ~
55− publishing ship: ~
56− updates: tracking
57− source ship: ~zod
58− source desk: %base
59− source aeon: 3
60− pending updates: ~
61−::
62−%garden
63− /sys/kelvin: [%zuse 418]
64− base hash: ~
65− %cz hash: 0v1e.2h7hs.elq3g.1sdt7.qfga6.ganga.7p95j.aog44.8p5fe.kpr6v.7ai82
66− app status: running
67− force on: ~
68− force off: ~
69− publishing ship: ~
70− updates: tracking
71− source ship: ~zod
72− source desk: %garden
73− source aeon: 3
74− pending updates: ~
75−```
76−
77−---
78−
79−## `+agents`
9+### `+agents`
8010
8111Print out the status of Gall agents on a desk.
8212
83−Agents may either be `archived` or `running`. Nuked or unstarted agents which are not on the manifest are omitted.
13+Agents may either be `archived` or `running`. Nuked or unstarted agents which
14+are not on the manifest are omitted.
8415
8516#### Arguments
8617
@@ -101,53 +32,58 @@ status: running %hark-store
10132
10233---
10334
104−## `|suspend`
35+### `|bump`
10536
106−Shut down all agents on a desk, archiving their states.
37+Try to apply a kernel update.
10738
108−The tile in the homescreen (if it has one) will turn gray and say "Suspended" in the top-left corner. This generator does the same thing as selecting "Suspend" from an app tile's hamburger menu.
39+If `%zuse`'s kelvin version has decreased, try to apply the update. If any desks
40+are incompatible with the new `%zuse` version, the update will fail. The update
41+can be forced with the optional `force` argument, in which case incompatible
42+desks will be `|suspend`ed. The `set` of desks to omit (and therefore suspend)
43+can also be explicitly specified with the optional `except` argument.
10944
11045#### Arguments
11146
47+All optional:
48+
11249```
113−desk
50+, =force ?, =except (set desk)
11451```
11552
11653#### Examples
11754
55+Try to apply update, failing if blocked by any desks:
56+
11857```
119−|suspend %bitcoin
58+|bump
12059```
12160
122−---
123−
124−## `|revive`
125−
126−Revive all agents on a desk, migrating archived states.
127−
128−All agents specified in `desk.bill` which are suspended will be restarted. If updates to the agents have occurred since their states were archived, they'll be migrated with the state transition functions in the agent. This generator does the same thing as selecting "Resume App" from the app tile's hamburger menu.
129−
130−#### Arguments
61+Force the update, suspending incompatible desks:
13162
13263```
133−desk
64+|bump, =force &
13465```
13566
136−#### Examples
67+Apply kernel update, omitting and suspending the specified desks:
13768
13869```
139−|revive %bitcoin
70+|bump, =except (silt ~[%bitcoin %webterm])
14071```
14172
14273---
14374
144−## `|install`
75+### `|install`
14576
14677Install a desk, starting its agents and listening for updates.
14778
148−If it's a remote desk we don't already have, it will be fetched. The agents started will be those specified in the `desk.bill` manifest. If it has a docket file, its tile will be added to the homescreen and its glob fetched. If we already have the desk, the source for updates will be switched to the ship specified.
79+If it's a remote desk we don't already have, it will be fetched. The agents
80+started will be those specified in the `desk.bill` manifest. If it has a docket
81+file, its tile will be added to the homescreen and its glob fetched. If we
82+already have the desk, the source for updates will be switched to the ship
83+specified.
14984
150−It takes a `ship` and `desk` as its mandatory arguments. The desk may be installed with a different name specified in the optional `local` argument.
85+It takes a `ship` and `desk` as its mandatory arguments. The desk may be
86+installed with a different name specified in the optional `local` argument.
15187
15288#### Arguments
15389
@@ -171,53 +107,61 @@ ship desk, =local desk
171107
172108---
173109
174−## `|uninstall`
110+### `|nuke`
175111
176−Uninstall a desk, suspending its agents and ignoring updates.
177−
178−The specified desk will be retained in Clay, but its agents will all be stopped and have their states archived like [`|suspend`](#suspend). This is the reverse of [`|install`](#install).
112+Shut down an agent and permanently delete its state.
179113
180−Note that this will not remove the tile or glob from the homescreen, so if the desk has a tile it should be uninstalled with the "Remove App" button in the tile's hamburger menu.
114+The default behaviour is to shut down the specified Gall agent and discard its
115+state, similar to the now-deprecated `|fade` generator. **Note this irreversibly
116+wipes the app's state**. Additionally, if the optional `desk` argument is `%.y`,
117+it takes a desk rather than an agent name and nukes every agent on the specified
118+desk.
181119
182120#### Arguments
183121
184122```
185−desk
123+@tas, =desk ?
186124```
187125
188126#### Examples
189127
128+Nuke a single agent:
129+
190130```
191−|uninstall %bitcoin
131+|nuke %btc-wallet
192132```
193133
194−---
134+Nuke every agent on a desk:
195135
196−## `|pause`
136+```
137+|nuke %bitcoin, =desk &
138+```
197139
198−Pause updates on a desk.
140+---
199141
200−The specified desk will stop tracking updates from its upstream source.
142+### `|ota`
143+
144+Set the source of updates for the `%base` desk (the kernel and core apps) to the
145+specified ship. Automatic updates will be enabled, and any new updates available
146+will be fetched and installed.
201147
202148#### Arguments
203149
204150```
205−desk
151+ship
206152```
207153
208154#### Examples
209155
210−```
211−|pause %bitcoin
212−```
156+`|ota ~marzod` is equivalent to `|install ~marzod %kids, =local %base`.
213157
214158---
215159
216−## `|resume`
160+### `|pause`
217161
218−Resume updates on a desk.
162+Pause updates on a desk.
219163
220−Start tracking previously [`|pause`](#pause)d updates from a desk's upstream source.
164+The specified desk will stop tracking updates from its upstream source.
221165
222166#### Arguments
223167
@@ -228,115 +172,246 @@ desk
228172#### Examples
229173
230174```
231−|resume %bitcoin
175+|pause %bitcoin
232176```
233177
234178---
235179
236−## `|nuke`
180+### `|rein`
237181
238−Shut down an agent and permanently delete its state.
182+Adjust the state of a desk.
239183
240−The default behaviour is to shut down the specified Gall agent and discard its state, similar to the now-deprecated `|fade` generator. **Note this irreversibly wipes the app's state**. Additionally, if the optional `desk` argument is `%.y`, it takes a desk rather than an agent name and nukes every agent on the specified desk.
184+This allows you to stop and start agents on a desk, regardless of whether
185+they're on the manifest. Stopped agents have their states archived. It can also
186+suspend and revive the whole desk with the optional `liv` argument.
241187
242188#### Arguments
243189
244190```
245−@tas, =desk ?
191+desk (list [? dude:gall]), =liv ?
246192```
247193
248194#### Examples
249195
250−Nuke a single agent:
196+Start an agent:
251197
252198```
253−|nuke %btc-wallet
199+|rein %bitcoin [& %btc-provider]
254200```
255201
256−Nuke every agent on a desk:
202+Stop an agent, archiving its state:
257203
258204```
259−|nuke %bitcoin, =desk &
205+|rein %bitcoin [| %btc-wallet]
206+```
207+
208+Stop one agent, start another:
209+
210+```
211+|rein %bitcoin [| %btc-wallet] [& %btc-provider]
212+```
213+
214+Suspend a desk:
215+
216+```
217+|rein %bitcoin, =liv |
218+```
219+
220+Revive a desk:
221+
222+```
223+|rein %bitcoin
260224```
261225
262226---
263227
264−## `|bump`
228+### `|resume`
265229
266−Try to apply a kernel update.
230+Resume updates on a desk.
267231
268−If `%zuse`'s kelvin version has decreased, try to apply the update. If any desks are incompatible with the new `%zuse` version, the update will fail. The update can be forced with the optional `force` argument, in which case incompatible desks will be `|suspend`ed. The `set` of desks to omit (and therefore suspend) can also be explicitly specified with the optional `except` argument.
232+Start tracking previously [`|pause`](#pause)d updates from a desk's upstream
233+source.
269234
270235#### Arguments
271236
272−All optional:
273−
274237```
275−, =force ?, =except (set desk)
238+desk
276239```
277240
278241#### Examples
279242
280−Try to apply update, failing if blocked by any desks:
281−
282243```
283−|bump
244+|resume %bitcoin
284245```
285246
286−Force the update, suspending incompatible desks:
247+---
248+
249+### `|revive`
250+
251+Revive all agents on a desk, migrating archived states.
252+
253+All agents specified in `desk.bill` which are suspended will be restarted. If
254+updates to the agents have occurred since their states were archived, they'll be
255+migrated with the state transition functions in the agent. This generator does
256+the same thing as selecting "Resume App" from the app tile's hamburger menu.
257+
258+#### Arguments
287259
288260```
289−|bump, =force &
261+desk
290262```
291263
292−Apply kernel update, omitting and suspending the specified desks:
264+#### Examples
293265
294266```
295−|bump, =except (silt ~[%bitcoin %webterm])
267+|revive %bitcoin
296268```
297269
298270---
299271
300−## `|rein`
272+### `|suspend`
301273
302−Adjust the state of a desk.
274+Shut down all agents on a desk, archiving their states.
303275
304−This allows you to stop and start agents on a desk, regardless of whether they're on the manifest. Stopped agents have their states archived. It can also suspend and revive the whole desk with the optional `liv` argument.
276+The tile in the homescreen (if it has one) will turn gray and say "Suspended" in
277+the top-left corner. This generator does the same thing as selecting "Suspend"
278+from an app tile's hamburger menu.
305279
306280#### Arguments
307281
308282```
309−desk (list [? dude:gall]), =liv ?
283+desk
310284```
311285
312286#### Examples
313287
314−Start an agent:
315−
316288```
317−|rein %bitcoin [& %btc-provider]
289+|suspend %bitcoin
318290```
319291
320−Stop an agent, archiving its state:
292+---
293+
294+### `|uninstall`
295+
296+Uninstall a desk, suspending its agents and ignoring updates.
297+
298+The specified desk will be retained in Clay, but its agents will all be stopped
299+and have their states archived like [`|suspend`](#suspend). This is the reverse
300+of [`|install`](#install).
301+
302+Note that this will not remove the tile or glob from the homescreen, so if the
303+desk has a tile it should be uninstalled with the "Remove App" button in the
304+tile's hamburger menu.
305+
306+#### Arguments
321307
322308```
323−|rein %bitcoin [| %btc-wallet]
309+desk
324310```
325311
326−Stop one agent, start another:
312+#### Examples
327313
328314```
329−|rein %bitcoin [| %btc-wallet] [& %btc-provider]
315+|uninstall %bitcoin
330316```
331317
332−Suspend a desk:
318+---
319+
320+### `+vat`
321+
322+Print out the status of a single installed desk.
323+
324+Desks in Clay which aren't installed will be omitted. See the related
325+[`+vats`](#vats) command for details of the individual status fields.
326+
327+#### Arguments
328+
329+`desk`
330+
331+#### Examples
333332
334333```
335−|rein %bitcoin, =liv |
334+> +vat %base
335+%base
336+ /sys/kelvin: [%zuse 418]
337+ base hash: ~
338+ %cz hash: 0v2.r1lbp.i9jr2.hosbi.rvg16.pqe7u.i3hnp.j7k27.9jsgv.8k7rp.oi98q
339+ app status: running
340+ force on: ~
341+ force off: ~
342+ publishing ship: ~
343+ updates: local
344+ source ship: ~
345+ source desk: ~
346+ source aeon: ~
347+ pending updates: ~
348+::
336349```
337350
338−Revive a desk:
351+---
352+
353+### `+vats`
354+
355+Print out the status of each installed desk.
356+
357+Desks in Clay which aren't installed will be omitted. Also see the related
358+[`+vat`](#vat) command, which prints the status of a single desk rather than all
359+desks.
360+
361+Fields:
362+
363+- `/sys/kelvin` - The version of `%zuse` the desk is compatible with.
364+- `base hash` - The merge base (common ancestor) between the desk and its upstream source.
365+- `%cz hash` - The hash of the desk.
366+- `app status` - May be `suspended` or `running`.
367+- `force on` - The set of agents on the desk which have been manually started
368+ despite not being on the `desk.bill` manifest.
369+- `force off` - The set of agents on the desk which have been manually stopped
370+ despite being on the `desk.bill` manifest.
371+- `publishing ship` - The original publisher if the source ship is republishing
372+ the desk.
373+- `updates` - May be `local`, `tracking` or `paused`. Local means it will
374+ receive updates via commits on the local ship. Tracking means it will receive
375+ updates from the `source ship`. Paused means it will not receive updates.
376+- `source desk` - The desk on the `source ship`.
377+- `source aeon` - The revision number of the desk on the `source ship`.
378+- `pending updates` - Updates waiting to be applied due to incompatibility.
379+
380+#### Arguments
381+
382+None.
383+
384+#### Examples
339385
340386```
341−|rein %bitcoin
387+> +vats
388+%base
389+ /sys/kelvin: [%zuse 418]
390+ base hash: ~
391+ %cz hash: 0v6.2nqmu.oqm24.ighl6.n0gp9.s8res.feql1.dl8ap.isli3.jk0hu.acrd2
392+ app status: running
393+ force on: ~
394+ force off: ~
395+ publishing ship: ~
396+ updates: tracking
397+ source ship: ~zod
398+ source desk: %base
399+ source aeon: 3
400+ pending updates: ~
401+::
402+%garden
403+ /sys/kelvin: [%zuse 418]
404+ base hash: ~
405+ %cz hash: 0v1e.2h7hs.elq3g.1sdt7.qfga6.ganga.7p95j.aog44.8p5fe.kpr6v.7ai82
406+ app status: running
407+ force on: ~
408+ force off: ~
409+ publishing ship: ~
410+ updates: tracking
411+ source ship: ~zod
412+ source desk: %garden
413+ source aeon: 3
414+ pending updates: ~
342415```
416+
417+---