on master help sign in
Add vita, build silo from the iko-soy fork, read dockets with urbit eval to find globs, update all inputs, and fix the README's glob and update steps
9ec90baiko
README.md+59−50
@@ -12,10 +12,11 @@ files.
12|---|---|---|---|
12|---|---|---|---|
13| `%accountability` | Watches all 256 galaxies from your ship. Every 10 minutes it checks each one's keys on chain, whether it answers, and which `%kids` OTA it serves, and logs every change. A dashboard at `/apps/accountability` and a public JSON API show the results. It needs `%azimuth` running, as on a livenet ship. | [sigilante/accountability](https://github.com/sigilante/accountability) | `nix build .#accountability` |
13| `%accountability` | Watches all 256 galaxies from your ship. Every 10 minutes it checks each one's keys on chain, whether it answers, and which `%kids` OTA it serves, and logs every change. A dashboard at `/apps/accountability` and a public JSON API show the results. It needs `%azimuth` running, as on a livenet ship. | [sigilante/accountability](https://github.com/sigilante/accountability) | `nix build .#accountability` |
14| `%deskjam` | Install and update apps, and upload and download desks, as deskjam files, in your ship's web interface at `/apps/deskjam`. A fork of [tinnus-napbus/deskjam](https://github.com/tinnus-napbus/deskjam). | [iko-soy/deskjam](https://github.com/iko-soy/deskjam) | `nix build .#deskjam` |
14| `%deskjam` | Install and update apps, and upload and download desks, as deskjam files, in your ship's web interface at `/apps/deskjam`. A fork of [tinnus-napbus/deskjam](https://github.com/tinnus-napbus/deskjam). | [iko-soy/deskjam](https://github.com/iko-soy/deskjam) | `nix build .#deskjam` |
15−| `%harness` | Runs AI agents on your ship. Talk to them in its web app at `/apps/harness`, in Tlon, or from an editor, while the ship keeps the conversations, permissions and work. Models come from providers you configure, such as OpenRouter, OpenAI or Anthropic. Its Tlon features need `%groups`. | [mopfel-winrux/urbit-agent-harness](https://github.com/mopfel-winrux/urbit-agent-harness) | `nix build .#harness` |
15+| `%harness` | Runs AI agents on your ship. Talk to them in its web app at `/apps/harness`, in Tlon, or from an editor, while the ship keeps the conversations, permissions and work. Models come from providers you configure, such as OpenRouter, OpenAI or Anthropic. Its Tlon features and its documents need `%groups`. Installing it takes a few minutes, while Clay builds it. | [mopfel-winrux/urbit-agent-harness](https://github.com/mopfel-winrux/urbit-agent-harness) | `nix build .#harness` |
16−| `%hits` | Ranks apps by how many installs they have among the ships around you, which gossip their installs to their Pals and the ships they chat with in Tlon. There's no central server. It works without `%pals`, but then hears only from the ships you chat with. It only counts apps installed from another ship with `|install`, not ones installed from a deskjam file. Its frontend is a glob: see [Frontends](#frontends). A fork of [urbit/hits](https://github.com/urbit/hits). | [iko-soy/hits](https://github.com/iko-soy/hits) | `nix build .#hits` |
16+| `%hits` | Ranks apps by how many installs they have among the ships around you, which gossip their installs to their Pals and the ships they chat with in Tlon. There's no central server. It works without `%pals`, but then hears only from the ships you chat with. It only counts apps that kiln syncs from another ship, as after `|install`: not ones installed from a deskjam file, or ones you stop kiln syncing. Its frontend is a glob: see [Frontends](#frontends). A fork of [urbit/hits](https://github.com/urbit/hits). | [iko-soy/hits](https://github.com/iko-soy/hits) | `nix build .#hits` |
17| `%shelf` | A public web page that lists the apps your ship publishes, so anyone can install them on their own ship. It answers at `/shelf`, for a reverse proxy to serve at the root of its own domain, and needs `%landscape`, which fresh ships have. | [iko-soy/shelf](https://github.com/iko-soy/shelf) | `nix build .#shelf` |
17| `%shelf` | A public web page that lists the apps your ship publishes, so anyone can install them on their own ship. It answers at `/shelf`, for a reverse proxy to serve at the root of its own domain, and needs `%landscape`, which fresh ships have. | [iko-soy/shelf](https://github.com/iko-soy/shelf) | `nix build .#shelf` |
18−| `%silo` | A file manager for the S3 storage your ship uploads to: add a bucket's credentials, then browse its files and upload new ones. It has no agents of its own, and uses `%storage` from `%landscape`, which fresh ships have. | [arthyn/silo](https://github.com/arthyn/silo) | `nix build .#silo` |
18+| `%silo` | A file manager for the S3 storage your ship uploads to: add a bucket's credentials, then browse its files and upload new ones. It has no agents of its own, and uses `%storage` from `%landscape`, which fresh ships have. Its frontend is a glob: see [Frontends](#frontends). A fork of [arthyn/silo](https://github.com/arthyn/silo). | [iko-soy/silo](https://github.com/iko-soy/silo) | `nix build .#silo` |
19+| `%vita` | Tracks how your published apps spread: how many ships sync each of your desks, and the daily active users that apps using its `vita-client` library report, with a dashboard for creating and maintaining apps. Its frontend is a glob: see [Frontends](#frontends). A fork of [assemblycapital/vita](https://github.com/assemblycapital/vita), updated for kernel 408. | [iko-soy/vita](https://github.com/iko-soy/vita) | `nix build .#vita` |
19
20
20Run the build commands in a checkout of this repo, with Nix and flakes
21Run the build commands in a checkout of this repo, with Nix and flakes
21enabled. If flakes aren't enabled, put
22enabled. If flakes aren't enabled, put
@@ -28,10 +29,11 @@ Each build writes `result/<desk>.deskjam`, such as `result/shelf.deskjam`, in
28place of the last build's `result`. For an app whose web frontend is a glob,
29place of the last build's `result`. For an app whose web frontend is a glob,
29such as hits, it also writes the glob's files next to it, as
30such as hits, it also writes the glob's files next to it, as
30`result/<desk>-glob`, and the build fails if `flake.nix` doesn't build them,
31`result/<desk>-glob`, and the build fails if `flake.nix` doesn't build them,
31−so a deskjam never comes without its glob. `nix build .#hits-glob` or
32+so a deskjam never comes without its glob. `nix build .#hits-glob`,
33+`.#silo-glob` or `.#vita-glob` builds just a glob.
32−`.#silo-glob` builds just a glob. `nix build .#accountability .#deskjam
34+`nix build .#accountability .#deskjam .#harness .#hits .#shelf .#silo .#vita`
33−.#harness .#hits .#shelf .#silo` builds all six, into `result` and `result-1`
35+builds all seven, in that order, into `result` and `result-1` to `result-6`.
34−to `result-5`.
36+The steps below assume one app's `result`.
35
37
36You can install these files on your ship with
38You can install these files on your ship with
37[iko-soy/deskjam](https://github.com/iko-soy/deskjam): see
39[iko-soy/deskjam](https://github.com/iko-soy/deskjam): see
@@ -79,9 +81,10 @@ After that, update deskjam like any other app, as below.
792. Under **upload deskjam**, choose the file, such as `result/shelf.deskjam`,
812. Under **upload deskjam**, choose the file, such as `result/shelf.deskjam`,
80 and click **upload**.
82 and click **upload**.
813. Under **Install it as a new desk**, keep the name and click **next**.
833. Under **Install it as a new desk**, keep the name and click **next**.
84+4. On the confirm page, if the app's frontend is a glob, first click **set**
85+ in the glob box, as [Frontends](#frontends) says. Then tick
82−4. On the confirm page, tick **start its agents after uploading** (for an app
86+ **start its agents after uploading** (for an app without agents, such as
83− without agents, such as silo, **mark it running after uploading**), and
87+ silo, **mark it running after uploading**), and click **confirm**.
84− click **confirm**.
855. The status page says whether the app runs.
885. The status page says whether the app runs.
86
89
87Once it runs, see the app's README for how to set it up.
90Once it runs, see the app's README for how to set it up.
@@ -97,12 +100,15 @@ Apps installed this way don't update on their own. To update one:
97 app's desk, select **replace it**, and click **next**. Replace makes the
100 app's desk, select **replace it**, and click **next**. Replace makes the
98 desk exactly the upload, so files a new version removed don't linger.
101 desk exactly the upload, so files a new version removed don't linger.
993. The confirm page offers a download of the desk as it is now. Keep it if
1023. The confirm page offers a download of the desk as it is now. Keep it if
100− you might want to go back, then click **confirm**.
103+ you might want to go back. If your ship serves the app's glob, click
104+ **set** in the glob box first. Then click **confirm**.
101
105
102Uploading the kept copy with **replace it** puts the old version back. If the
106Uploading the kept copy with **replace it** puts the old version back. If the
103update changed the state an agent keeps, that usually fails, and nothing
107update changed the state an agent keeps, that usually fails, and nothing
104changes. But some agents start afresh from state they can't read, and lose it
108changes. But some agents start afresh from state they can't read, and lose it
105−instead: deskjam's does.
109+instead: deskjam's does. If your ship serves the app's glob, also copy its old
110+`result/<desk>-glob` somewhere before you build the new version, and upload it
111+at `/docket/upload` after putting the old version back.
106
112
107If the app came from another ship with `|install`, kiln, the part of your
113If the app came from another ship with `|install`, kiln, the part of your
108ship that installs and updates apps, keeps it in sync with that ship. That
114ship that installs and updates apps, keeps it in sync with that ship. That
@@ -120,18 +126,20 @@ folder is what you upload at `/docket/upload`: choose the app's desk and the
120folder, and click **glob!**. Use a browser other than Safari, which can't
126folder, and click **glob!**. Use a browser other than Safari, which can't
121upload folders.
127upload folders.
122
128
123−- silo's docket has `%docket` download its glob from a url, so `silo.deskjam`
129+hits', silo's and vita's dockets have `%docket` get their globs from
124− works on any ship, with nothing to upload.
125−- hits' docket has `%docket` get its glob from `~donmec-sallud` over Ames,
126− with a placeholder hash. On your ship, click **set** in the glob box on the
130+`~donmec-sallud` over Ames, with a placeholder hash. On your ship:
131+
132+1. When you install the deskjam, click **set** in the glob box on the confirm
127− confirm page when you install `hits.deskjam`, so your ship serves the glob
133+ page first, so your ship serves the glob instead. **set** reloads the page
134+ and clears the boxes below it, so tick **start its agents after uploading**
135+ after it, then confirm.
128− instead, and once hits runs, upload `result/hits-glob`. On
136+2. Once the app runs, upload its `result/<desk>-glob`.
137+
129− `~donmec-sallud`, hits' docket already names your ship, so just upload the
138+On `~donmec-sallud`, their dockets already name your ship, so skip **set**,
130− glob. Without its glob, hits runs, but has no frontend.
139+and just upload the glob. Without its glob, an app runs, but has no frontend.
131−- To serve silo's frontend from your own ship too, click **set** the same way
140+deskjam's
132− and upload `result/silo-glob`, as deskjam's
133− [Serving a glob from your ship](https://github.com/iko-soy/deskjam/blob/main/docs/globs.md#serving-a-glob-from-your-ship)
141+[Serving a glob from your ship](https://github.com/iko-soy/deskjam/blob/main/docs/globs.md#serving-a-glob-from-your-ship)
134− says.
142+has the details.
135
143
136When you update an app whose glob your ship serves, click **set** in the glob
144When you update an app whose glob your ship serves, click **set** in the glob
137box on the confirm page first, which keeps the glob your ship serves now.
145box on the confirm page first, which keeps the glob your ship serves now.
@@ -163,10 +171,15 @@ has the details, including what to do when an upload goes wrong.
163
171
164## How the desks are built
172## How the desks are built
165
173
166−- deskjam's, hits' and shelf's own flakes build their desks, so each
174+- deskjam's, hits', shelf's, silo's and vita's own flakes build their desks,
167− `.deskjam` file has the files that repo's own build makes. jammer leaves
175+ so each `.deskjam` file has the files that repo's own build makes. jammer
168− out the files a `|commit` would skip too, such as hits' `LICENSE`, which has
176+ leaves out the files a `|commit` would skip too, such as hits' `LICENSE`,
169− no extension.
177+ which has no extension. silo's and vita's flakes build their globs too, and
178+ this flake takes them as they are, with the nixpkgs those flakes pin: so
179+ `.#silo-glob` is the same build as `github:iko-soy/silo#glob`. Their desks
180+ include all of urbit's base-dev, so deskjam's confirm page warns about a
181+ few of its libraries that import files the desks lack, but the apps don't
182+ use them.
170- accountability has no flake, and its `desk/` is the whole desk, which
183- accountability has no flake, and its `desk/` is the whole desk, which
171 `flake.nix` packs as it is.
184 `flake.nix` packs as it is.
172- harness' repo builds its desk with `zig build`. It builds `fe/`, its
185- harness' repo builds its desk with `zig build`. It builds `fe/`, its
@@ -175,28 +188,24 @@ has the details, including what to do when an upload goes wrong.
175 grubbery's desk under harness' own. `flake.nix` runs the same `zig build`
188 grubbery's desk under harness' own. `flake.nix` runs the same `zig build`
176 with npm's packages fetched ahead, and a stand-in `git` that answers from
189 with npm's packages fetched ahead, and a stand-in `git` that answers from
177 inputs pinned to the same commits, and fails if the build asks for any
190 inputs pinned to the same commits, and fails if the build asks for any
178− other: when a new version of harness pins other commits, move
191+ other. When a new version of harness pins other commits, change the commit
179− `harness-grubbery` or `harness-tlon` to them. The build also fails if the
192+ in `harness-grubbery`'s or `harness-tlon`'s url in `flake.nix` to the one
193+ the error names: `nix flake update` won't move them. The build also fails
180− desk has no `web/index.html`, so it can't come out without its frontend.
194+ if the desk has no `web/index.html`, so it can't come out without its
181−- silo has no flake. Its CI deploys all of urbit's `pkg/base-dev`, then
195+ frontend. Two of grubbery's libraries in it, `lib/verb.hoon` and
182− landscape's `desk-dev`, then its own `desk/`, and `flake.nix` builds the
183− same, with landscape at `master`, as the CI takes it. The CI's urbit tag
184− isn't public, so `flake.nix` takes `408k-2`, the release of the newest
185− kernel silo lists; when silo lists a newer one, move `silo-urbit` to its
186− tag. A few of base-dev's libraries import files the desk lacks, so
196+ `lib/xray.hoon`, import files the desk lacks, so deskjam's confirm page
187− deskjam's confirm page warns about them, but silo doesn't use them. silo's
197+ warns about them, but harness doesn't use them.
188− old esbuild names two unused variables at random, so `silo-glob` can differ
189− by a few bytes from one build to the next, and
190− `nix build --rebuild .#silo-glob` can fail. The page works the same either
191− way.
192−- A desk whose docket names a glob, however the docket is laid out, only
198+- A desk whose docket names a glob only builds with its glob, and a glob for
193− builds with its glob, which `flake.nix` builds from the app's `ui/`. A glob
194− for a desk whose docket names none fails the build too.
199+ a desk whose docket names none fails the build too. `flake.nix` reads each
200+ docket as the docket mark does, with Hoon's own parser in `urbit eval`, so
201+ this holds however the docket is laid out, and a docket that isn't valid
202+ fails the build.
195−- A hash in `flake.nix` pins each frontend's npm packages: each glob's
203+- A hash in `flake.nix` pins the npm packages of the frontends it builds
196− `npmDepsHash`, and the `hash` of harness' `npmDeps`. When moving an app's
204+ itself: `hits-glob`'s `npmDepsHash`, and the `hash` of harness' `npmDeps`.
205+ silo's and vita's are in their own flakes. When moving an app's pin changes
197− pin changes its `package-lock.json`, its build stops with a hash mismatch,
206+ its `package-lock.json`, its build stops with a hash mismatch, or
198− or `npmDepsHash is out of date`. Set that hash to `pkgs.lib.fakeHash`,
207+ `npmDepsHash is out of date`. Set that hash to `pkgs.lib.fakeHash`, build
199− build again, and put the hash the error shows after `got:` in its place.
208+ again, and put the hash the error shows after `got:` in its place.
200
209
201## jammer
210## jammer
202
211
flake.lock+138−49
@@ -29,11 +29,11 @@
29 "urbit": "urbit"
29 "urbit": "urbit"
30 },
30 },
31 "locked": {
31 "locked": {
32− "lastModified": 1792565467,
32+ "lastModified": 1792580792,
33− "narHash": "sha256-kkNjvyRPQf1CS+cYHDAuUK7LuEJJkT3Q9e4swcfh1Xc=",
33+ "narHash": "sha256-fC9y1fVJUZaUqahGyMzzBEXgwd6gOfr9cDbc4aaXpe4=",
34 "owner": "iko-soy",
34 "owner": "iko-soy",
35 "repo": "deskjam",
35 "repo": "deskjam",
36− "rev": "0da5be5e86de673dc8c5f8586b48143d7d9a3d67",
36+ "rev": "d892252eafc5522c9c95a758148c9b3f86e8a857",
37 "type": "github"
37 "type": "github"
38 },
38 },
39 "original": {
39 "original": {
@@ -135,11 +135,11 @@
135 "urbit": "urbit_2"
135 "urbit": "urbit_2"
136 },
136 },
137 "locked": {
137 "locked": {
138− "lastModified": 1792571528,
138+ "lastModified": 1792579499,
139− "narHash": "sha256-OC1Yg4iinINxUmRfYD6b+615tsIfM62Uq4szkWshUpc=",
139+ "narHash": "sha256-DVg1FSxZd2kZrwCebUWirVWTaya6NpqLAgI5dkk9r9I=",
140 "owner": "iko-soy",
140 "owner": "iko-soy",
141 "repo": "hits",
141 "repo": "hits",
142− "rev": "deaf7b9eaf51bd6a0df96cf74ee5a81126ba6608",
142+ "rev": "49f410ce92c29e8e1029e4302aa1f5d7a7e2b19d",
143 "type": "github"
143 "type": "github"
144 },
144 },
145 "original": {
145 "original": {
@@ -165,13 +165,47 @@
165 "type": "github"
165 "type": "github"
166 }
166 }
167 },
167 },
168+ "landscape_2": {
169+ "flake": false,
170+ "locked": {
171+ "lastModified": 1781809004,
172+ "narHash": "sha256-jRsjR0oOcXFWOZZwNg7Fi946IxuYGUrktNcF/aZIHz4=",
173+ "owner": "tloncorp",
174+ "repo": "landscape",
175+ "rev": "46c6ed8738082b6a94558710b1e3619befa83057",
176+ "type": "github"
177+ },
178+ "original": {
179+ "owner": "tloncorp",
180+ "ref": "develop",
181+ "repo": "landscape",
182+ "type": "github"
183+ }
184+ },
185+ "landscape_3": {
186+ "flake": false,
187+ "locked": {
188+ "lastModified": 1781809004,
189+ "narHash": "sha256-jRsjR0oOcXFWOZZwNg7Fi946IxuYGUrktNcF/aZIHz4=",
190+ "owner": "tloncorp",
191+ "repo": "landscape",
192+ "rev": "46c6ed8738082b6a94558710b1e3619befa83057",
193+ "type": "github"
194+ },
195+ "original": {
196+ "owner": "tloncorp",
197+ "repo": "landscape",
198+ "rev": "46c6ed8738082b6a94558710b1e3619befa83057",
199+ "type": "github"
200+ }
201+ },
168 "nixpkgs": {
202 "nixpkgs": {
169 "locked": {
203 "locked": {
170− "lastModified": 1792208399,
204+ "lastModified": 1792506237,
171− "narHash": "sha256-mN15cwddbOOIzzXSSwYUeRfOYeizz47Vy6y3Hzq6DuY=",
205+ "narHash": "sha256-Q/8KLB6jNfpaUN1HAedE/u/Et9feE/zYSsutBLKrCFk=",
172 "owner": "NixOS",
206 "owner": "NixOS",
173 "repo": "nixpkgs",
207 "repo": "nixpkgs",
174− "rev": "7a6522c868711d06e3a520bbcdfafe9806f4337f",
208+ "rev": "5adc50831c259f87faeb09ddf930d43597197473",
175 "type": "github"
209 "type": "github"
176 },
210 },
177 "original": {
211 "original": {
@@ -181,6 +215,38 @@
181 "type": "github"
215 "type": "github"
182 }
216 }
183 },
217 },
218+ "nixpkgs_2": {
219+ "locked": {
220+ "lastModified": 1792503283,
221+ "narHash": "sha256-vhe2jyvRCgufWPqDuDq1S3t3ypE+ka46IFutV02xKso=",
222+ "owner": "NixOS",
223+ "repo": "nixpkgs",
224+ "rev": "cd4ea8d57de16f4810bc5f14207bac45fbf19f67",
225+ "type": "github"
226+ },
227+ "original": {
228+ "owner": "NixOS",
229+ "ref": "nixos-26.05",
230+ "repo": "nixpkgs",
231+ "type": "github"
232+ }
233+ },
234+ "nixpkgs_3": {
235+ "locked": {
236+ "lastModified": 1792502884,
237+ "narHash": "sha256-IoNisKcGbUjdd45qCqywGMCYmZ5EnkxezvLII0FWwNA=",
238+ "owner": "NixOS",
239+ "repo": "nixpkgs",
240+ "rev": "02c087f3fe673c9e317f206a627cb6b910336dbe",
241+ "type": "github"
242+ },
243+ "original": {
244+ "owner": "NixOS",
245+ "ref": "nixos-unstable",
246+ "repo": "nixpkgs",
247+ "type": "github"
248+ }
249+ },
184 "root": {
250 "root": {
185 "inputs": {
251 "inputs": {
186 "accountability": "accountability",
252 "accountability": "accountability",
@@ -193,8 +259,7 @@
193 "nixpkgs": "nixpkgs",
259 "nixpkgs": "nixpkgs",
194 "shelf": "shelf",
260 "shelf": "shelf",
195 "silo": "silo",
261 "silo": "silo",
196− "silo-landscape": "silo-landscape",
262+ "vita": "vita"
197− "silo-urbit": "silo-urbit"
198 }
263 }
199 },
264 },
200 "shelf": {
265 "shelf": {
@@ -204,11 +269,11 @@
204 ]
269 ]
205 },
270 },
206 "locked": {
271 "locked": {
207− "lastModified": 1792533784,
272+ "lastModified": 1792580705,
208− "narHash": "sha256-5NHB+yqWIG/heOrp1YJ1FLQ9CvbwHUisMj28vSNNJPI=",
273+ "narHash": "sha256-LHPVjGLwQX6arH3N28HpW7L6bqxNcNrLQEnckXOhrBo=",
209 "owner": "iko-soy",
274 "owner": "iko-soy",
210 "repo": "shelf",
275 "repo": "shelf",
211− "rev": "868b75a07af54e5ecab8db21cae33e9b7d2869d4",
276+ "rev": "7bd213ef50331e5c1a483519beab6a5411300d61",
212 "type": "github"
277 "type": "github"
213 },
278 },
214 "original": {
279 "original": {
@@ -218,88 +283,92 @@
218 }
283 }
219 },
284 },
220 "silo": {
285 "silo": {
221− "flake": false,
286+ "inputs": {
287+ "landscape": "landscape_2",
288+ "nixpkgs": "nixpkgs_2",
289+ "urbit": "urbit_3"
290+ },
222 "locked": {
291 "locked": {
223− "lastModified": 1782065203,
292+ "lastModified": 1792581195,
224− "narHash": "sha256-kzP/ArfkVr5hguMldPYzWfBDlOvQ42rYV062LesFoX4=",
293+ "narHash": "sha256-ZNqCGv5+l5RtiEdT77dbYIlD4roYbQbG1uKnNeN+Vcw=",
225− "owner": "arthyn",
294+ "owner": "iko-soy",
226 "repo": "silo",
295 "repo": "silo",
227− "rev": "912b7caf56a2b9d037ca0ae9a152013631bab72e",
296+ "rev": "2d145ca828134f0ab94103089cdd54776cc67b1d",
228 "type": "github"
297 "type": "github"
229 },
298 },
230 "original": {
299 "original": {
231− "owner": "arthyn",
300+ "owner": "iko-soy",
232 "repo": "silo",
301 "repo": "silo",
233 "type": "github"
302 "type": "github"
234 }
303 }
235 },
304 },
236− "silo-landscape": {
305+ "systems": {
237− "flake": false,
238 "locked": {
306 "locked": {
239− "lastModified": 1711487686,
307+ "lastModified": 1681028828,
240− "narHash": "sha256-Tm76Hb7hO5+LgMTZSJKor6Bla+L2Qto84i2a+I4FfUc=",
308+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
241− "owner": "tloncorp",
309+ "owner": "nix-systems",
242− "repo": "landscape",
310+ "repo": "default",
243− "rev": "90a17528a938eebda57e837b7fec76d543f5f7cf",
311+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
244 "type": "github"
312 "type": "github"
245 },
313 },
246 "original": {
314 "original": {
247− "owner": "tloncorp",
315+ "owner": "nix-systems",
248− "ref": "master",
316+ "repo": "default",
249− "repo": "landscape",
250 "type": "github"
317 "type": "github"
251 }
318 }
252 },
319 },
253− "silo-urbit": {
320+ "urbit": {
254 "flake": false,
321 "flake": false,
255 "locked": {
322 "locked": {
256− "lastModified": 1785851358,
323+ "lastModified": 1784122708,
257− "narHash": "sha256-eHoGwqirk7zMpOn/y8dKqozz5IiQ7nqek/ypxIOaRiU=",
324+ "narHash": "sha256-9lrulpAMdMtc9OZ7LeRWHkAgnibLSiDiB+BVwcffiCs=",
258 "owner": "urbit",
325 "owner": "urbit",
259 "repo": "urbit",
326 "repo": "urbit",
260− "rev": "5a187fededc4582a34fcd6055c67bb63e0917b94",
327+ "rev": "0a9a312e133891937de9c4df1ebecad5cf669c7c",
261 "type": "github"
328 "type": "github"
262 },
329 },
263 "original": {
330 "original": {
264 "owner": "urbit",
331 "owner": "urbit",
265− "ref": "408k-2",
266 "repo": "urbit",
332 "repo": "urbit",
333+ "rev": "0a9a312e133891937de9c4df1ebecad5cf669c7c",
267 "type": "github"
334 "type": "github"
268 }
335 }
269 },
336 },
270− "systems": {
337+ "urbit_2": {
338+ "flake": false,
271 "locked": {
339 "locked": {
272− "lastModified": 1681028828,
340+ "lastModified": 1785851358,
273− "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
341+ "narHash": "sha256-eHoGwqirk7zMpOn/y8dKqozz5IiQ7nqek/ypxIOaRiU=",
274− "owner": "nix-systems",
342+ "owner": "urbit",
275− "repo": "default",
343+ "repo": "urbit",
276− "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
344+ "rev": "5a187fededc4582a34fcd6055c67bb63e0917b94",
277 "type": "github"
345 "type": "github"
278 },
346 },
279 "original": {
347 "original": {
280− "owner": "nix-systems",
348+ "owner": "urbit",
349+ "ref": "408k-2",
281− "repo": "default",
350+ "repo": "urbit",
282 "type": "github"
351 "type": "github"
283 }
352 }
284 },
353 },
285− "urbit": {
354+ "urbit_3": {
286 "flake": false,
355 "flake": false,
287 "locked": {
356 "locked": {
288− "lastModified": 1784122708,
357+ "lastModified": 1785851358,
289− "narHash": "sha256-9lrulpAMdMtc9OZ7LeRWHkAgnibLSiDiB+BVwcffiCs=",
358+ "narHash": "sha256-eHoGwqirk7zMpOn/y8dKqozz5IiQ7nqek/ypxIOaRiU=",
290 "owner": "urbit",
359 "owner": "urbit",
291 "repo": "urbit",
360 "repo": "urbit",
292− "rev": "0a9a312e133891937de9c4df1ebecad5cf669c7c",
361+ "rev": "5a187fededc4582a34fcd6055c67bb63e0917b94",
293 "type": "github"
362 "type": "github"
294 },
363 },
295 "original": {
364 "original": {
296 "owner": "urbit",
365 "owner": "urbit",
366+ "ref": "408k-2",
297 "repo": "urbit",
367 "repo": "urbit",
298− "rev": "0a9a312e133891937de9c4df1ebecad5cf669c7c",
299 "type": "github"
368 "type": "github"
300 }
369 }
301 },
370 },
302− "urbit_2": {
371+ "urbit_4": {
303 "flake": false,
372 "flake": false,
304 "locked": {
373 "locked": {
305 "lastModified": 1785851358,
374 "lastModified": 1785851358,
@@ -315,6 +384,26 @@
315 "repo": "urbit",
384 "repo": "urbit",
316 "type": "github"
385 "type": "github"
317 }
386 }
387+ },
388+ "vita": {
389+ "inputs": {
390+ "landscape": "landscape_3",
391+ "nixpkgs": "nixpkgs_3",
392+ "urbit": "urbit_4"
393+ },
394+ "locked": {
395+ "lastModified": 1792581006,
396+ "narHash": "sha256-6dr0bBsj1nY8YFZJshqhLaeqDZDFvPSXIw3MOJN8Bm0=",
397+ "owner": "iko-soy",
398+ "repo": "vita",
399+ "rev": "dc3554e22e7e68ccb36efcc8cc149561fe95afb8",
400+ "type": "github"
401+ },
402+ "original": {
403+ "owner": "iko-soy",
404+ "repo": "vita",
405+ "type": "github"
406+ }
318 }
407 }
319 },
408 },
320 "root": "root",
409 "root": "root",
flake.nix+70−50
@@ -12,7 +12,7 @@
12 inputs.flake-utils.follows = "flake-utils";
12 inputs.flake-utils.follows = "flake-utils";
13 };
13 };
14
14
15− # Its packages.<system>.default is the full desk: it vendors its lib/,
15+ # Its packages.<system>.desk is the full desk: it vendors its lib/,
16 # mar/ and sur/ files.
16 # mar/ and sur/ files.
17 shelf = {
17 shelf = {
18 url = "github:iko-soy/shelf";
18 url = "github:iko-soy/shelf";
@@ -26,21 +26,10 @@
26 inputs.nixpkgs.follows = "nixpkgs";
26 inputs.nixpkgs.follows = "nixpkgs";
27 };
27 };
28
28
29− silo = {
29+ # silo's and vita's flakes build their desks and their globs, with the
30− url = "github:arthyn/silo";
30+ # nixpkgs they pin, so both come out as their own repos build them.
31− flake = false;
31+ silo.url = "github:iko-soy/silo";
32− };
32+ vita.url = "github:iko-soy/vita";
33− # Desk dependencies, as silo's .github/helpers/deploy.sh takes them. It
34− # takes urbit at a tag from a repo variable; 408k-2 is the release of the
35− # 408 kernel, the newest silo's sys.kelvin lists.
36− silo-urbit = {
37− url = "github:urbit/urbit/408k-2";
38− flake = false;
39− };
40− silo-landscape = {
41− url = "github:tloncorp/landscape/master";
42− flake = false;
43− };
44
33
45 # Its desk/ is the full desk: it vendors its lib/, mar/ and sur/ files.
34 # Its desk/ is the full desk: it vendors its lib/, mar/ and sur/ files.
46 accountability = {
35 accountability = {
@@ -71,8 +60,7 @@
71 shelf,
60 shelf,
72 hits,
61 hits,
73 silo,
62 silo,
74− silo-urbit,
63+ vita,
75− silo-landscape,
76 accountability,
64 accountability,
77 harness,
65 harness,
78 harness-grubbery,
66 harness-grubbery,
@@ -108,15 +96,42 @@
108 };
96 };
109 };
97 };
110
98
111− # Exits 0 if the docket file it's given names a glob: a glob-ames or
99+ # Reads the docket file it's given as the docket mark does, with
112− # glob-http term outside the docket's cords, tapes and comments,
100+ # `ream` and `slap` in `urbit eval`, so any layout Hoon accepts reads
113− # however the docket is laid out.
101+ # the same. Exits 0 if it names a glob: a glob-http or glob-ames
114− names-glob = pkgs.writers.writePerlBin "names-glob" { } ''
102+ # clause, and no site clause, which lib/docket prefers. Exits 1 if
115− local $/;
103+ # it doesn't, and 2 if it isn't a valid docket.
116− my $docket = <>;
104+ names-glob = pkgs.writeShellApplication {
117− $docket =~ s/'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|::[^\n]*//g;
105+ name = "names-glob";
118− exit($docket =~ /(?<![\w-])glob-(?:ames|http)(?![\w-])/ ? 0 : 1);
106+ runtimeInputs = [
107+ pkgs.urbit
108+ pkgs.util-linux
109+ ];
110+ excludeShellChecks = [ "SC2016" ];
111+ text = ''
112+ # the file's bytes as a Hoon @ux literal: an atom, first byte
113+ # lowest, with a dot between each group of four hex digits
114+ hex=$(od -An -v -tx1 -w1 "$1" | tac | tr -d ' \n' | sed 's/^0*//')
115+ atom=0x$(printf '%s' "''${hex:-0}" | rev | sed -E 's/([0-9a-f]{4})/\1./g; s/\.$//' | rev)
116+ out=$(
117+ {
118+ printf '=/ tex `@t`%s\n' "$atom"
119+ echo '=/ cls ;;((list [@tas *]) q:(slap !>(~) (ream tex)))'
120+ echo '=/ has |=(t=@tas (lien cls |=([h=@tas *] =(h t))))'
121+ echo '?&(!(has %site) |((has %glob-http) (has %glob-ames)))'
122+ } | urbit eval 2>&1 | sed 's/\x1b\[[0-9;]*m//g' | tr -d '\r'
123+ )
124+ case $(printf '%s\n' "$out" | tail -n 1) in
125+ '%.y') exit 0 ;;
126+ '%.n') exit 1 ;;
127+ *)
128+ echo "$1 isn't a valid docket: Hoon can't read it as a list of clauses" >&2
129+ printf '%s\n' "$out" >&2
130+ exit 2
131+ ;;
132+ esac
119− '';
133+ '';
134+ };
120
135
121 # Pack the desk `src` into $out/<desk>.deskjam.
136 # Pack the desk `src` into $out/<desk>.deskjam.
122 #
137 #
@@ -141,13 +156,19 @@
141 ''
156 ''
142 cp -r --no-preserve=mode ${src} ${desk}
157 cp -r --no-preserve=mode ${src} ${desk}
143 glob=${pkgs.lib.optionalString (glob != null) "${glob}"}
158 glob=${pkgs.lib.optionalString (glob != null) "${glob}"}
159+ names=
160+ if [ -f ${desk}/desk.docket-0 ]; then
144− if [ -f ${desk}/desk.docket-0 ] && names-glob ${desk}/desk.docket-0; then
161+ if names-glob ${desk}/desk.docket-0; then
145− if [ -z "$glob" ]; then
162+ names=yes
146− echo "The docket of %${desk} names a glob: give mkDeskjam the built frontend as glob" >&2
163+ elif [ $? != 1 ]; then
147 exit 1
164 exit 1
148 fi
165 fi
166+ fi
149− elif [ -n "$glob" ]; then
167+ if [ -n "$names" ] && [ -z "$glob" ]; then
168+ echo "The docket of %${desk} names a glob: give mkDeskjam the built frontend as glob" >&2
169+ exit 1
170+ elif [ -z "$names" ] && [ -n "$glob" ]; then
150− echo "The docket of %${desk} names no glob, but mkDeskjam got one" >&2
171+ echo "%${desk} has no docket that names a glob, but mkDeskjam got one" >&2
151 exit 1
172 exit 1
152 fi
173 fi
153 mkdir $out
174 mkdir $out
@@ -159,12 +180,12 @@
159
180
160 deskjam-desk = mkDeskjam {
181 deskjam-desk = mkDeskjam {
161 desk = "deskjam";
182 desk = "deskjam";
162− src = deskjam.packages.${system}.deskjam;
183+ src = deskjam.packages.${system}.desk;
163 };
184 };
164
185
165 shelf-desk = mkDeskjam {
186 shelf-desk = mkDeskjam {
166 desk = "shelf";
187 desk = "shelf";
167− src = shelf.packages.${system}.default;
188+ src = shelf.packages.${system}.desk;
168 };
189 };
169
190
170 # Build a frontend: `npm run build` in its npm project `src`, whose
191 # Build a frontend: `npm run build` in its npm project `src`, whose
@@ -197,23 +218,16 @@
197 glob = hits-glob;
218 glob = hits-glob;
198 };
219 };
199
220
200− silo-glob = mkGlob {
221+ silo-desk = mkDeskjam {
201 desk = "silo";
222 desk = "silo";
202− src = "${silo}/ui";
223+ src = silo.packages.${system}.desk;
203− npmDepsHash = "sha256-kZaVn4+ORa9Cm100f8/VS1sCWwHOC6rxDvLnz4S5+p0=";
224+ glob = silo.packages.${system}.glob;
204 };
225 };
205
226
206− # The desk silo's deploy.sh commits: all of urbit's pkg/base-dev, then
207− # landscape's desk-dev, then silo's desk/ over them.
208− silo-desk = mkDeskjam {
227+ vita-desk = mkDeskjam {
209− desk = "silo";
228+ desk = "vita";
210− src = pkgs.runCommand "silo-desk" { } ''
229+ src = vita.packages.${system}.default;
211− mkdir $out
230+ glob = vita.packages.${system}.glob;
212− cp -rL --no-preserve=mode ${silo-urbit}/pkg/base-dev/. $out/
213− cp -rL --no-preserve=mode ${silo-landscape}/desk-dev/. $out/
214− cp -rL --no-preserve=mode ${silo}/desk/. $out/
215− '';
216− glob = silo-glob;
217 };
231 };
218
232
219 accountability-desk = mkDeskjam {
233 accountability-desk = mkDeskjam {
@@ -247,7 +261,7 @@
247 case $1 in
261 case $1 in
248 init | remote) ;;
262 init | remote) ;;
249 cat-file) pinned "''${3%"^{commit}"}" ;;
263 cat-file) pinned "''${3%"^{commit}"}" ;;
250− checkout) for arg; do :; done; pinned "$arg" ;;
264+ checkout | fetch) for arg; do :; done; pinned "$arg" ;;
251 show) pinned "''${2%%:*}"; cat "$src/''${2#*:}" ;;
265 show) pinned "''${2%%:*}"; cat "$src/''${2#*:}" ;;
252 *) echo "git: unexpected command: $*" >&2; exit 1 ;;
266 *) echo "git: unexpected command: $*" >&2; exit 1 ;;
253 esac
267 esac
@@ -286,12 +300,16 @@
286 runHook postBuild
300 runHook postBuild
287 '';
301 '';
288 installPhase = ''
302 installPhase = ''
303+ runHook preInstall
289 if [ ! -f zig-out/web/index.html ]; then
304 if [ ! -f zig-out/web/index.html ]; then
290 echo "harness' desk has no web/index.html: its frontend is missing" >&2
305 echo "harness' desk has no web/index.html: its frontend is missing" >&2
291 exit 1
306 exit 1
292 fi
307 fi
293 cp -r zig-out $out
308 cp -r zig-out $out
309+ runHook postInstall
294 '';
310 '';
311+ # the output is a desk: leave its files as they are
312+ dontFixup = true;
295 };
313 };
296
314
297 harness-desk = mkDeskjam {
315 harness-desk = mkDeskjam {
@@ -307,7 +325,9 @@
307 hits = hits-desk;
325 hits = hits-desk;
308 inherit hits-glob;
326 inherit hits-glob;
309 silo = silo-desk;
327 silo = silo-desk;
310− inherit silo-glob;
328+ silo-glob = silo.packages.${system}.glob;
329+ vita = vita-desk;
330+ vita-glob = vita.packages.${system}.glob;
311 accountability = accountability-desk;
331 accountability = accountability-desk;
312 harness = harness-desk;
332 harness = harness-desk;
313 default = jammer;
333 default = jammer;