@whoz-oss/coday-web 0.0.0-workstream-setup.4 → 0.0.0-workstream-setup.6

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.
Files changed (2) hide show
  1. package/README.md +41 -21
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -9,13 +9,16 @@ the Express server, and runs AgentOS and the Factory next to them.
9
9
  npx @whoz-oss/coday-web
10
10
  ```
11
11
 
12
- In a terminal (Nx mode, see below) the browser opens by itself. On a **first run** it opens the wizard immediately,
13
- on **`/welcome`** (`http://localhost:3000/welcome`): the wizard only talks to Coday's own server, so it does not wait
14
- for AgentOS. Otherwise (setup done) it opens `/` **once AgentOS is healthy**, because the app calls AgentOS straight
15
- away and would show a blank page until then; if AgentOS never becomes healthy (about 3 minutes: Java missing,
16
- download failed...) nothing is opened and the `server` pane prints the URL to open yourself. Pass `--no-open` or set
17
- `CODAY_NO_OPEN=1` to keep it closed. Without a terminal (`--managed`, desktop apps) nothing is opened: open the URL
18
- printed as `Server is running on http://localhost:PORT` yourself. The wizard is a four-step flow:
12
+ In a terminal (Nx mode, see below) the browser opens by itself, always on **`/welcome`**
13
+ (`http://localhost:3000/welcome`), as soon as the Express server listens and whatever the install: that page only talks
14
+ to Coday's own server, so it does not wait for AgentOS. On a **first run** it is the wizard. Otherwise (setup done, or an
15
+ install without a wizard: `--auth`, an external AgentOS, an existing install without a wizard identity) it is a plain
16
+ loading page (download, Java, AgentOS, Factory: nothing that reads as a setup) that follows the startup and leads into
17
+ the app by itself as soon as AgentOS is up. With an external `AGENTOS_URL` / `FACTORY_URL` the page has nothing to
18
+ download or start for that service and only waits for it to answer. Pass `--no-open` or set `CODAY_NO_OPEN=1` to keep
19
+ the browser closed (it is also never opened with `--auth`, a non-loopback host or `CI`). Without a terminal
20
+ (`--managed`, desktop apps) nothing is opened: open the URL printed as `Server is running on http://localhost:PORT`
21
+ yourself. The wizard is a four-step flow:
19
22
 
20
23
  1. **Your email.** It becomes your user ID and the AgentOS administrator. AgentOS and Factory JARs start downloading in
21
24
  the background as soon as the page is open.
@@ -33,8 +36,24 @@ To run the wizard again on a real install, stop Coday and delete `web-setup.json
33
36
  (AgentOS fixes its administrator at its first boot). For the local stack of the monorepo, use `web:local -- --fresh`
34
37
  instead (see below).
35
38
 
36
- The command is always the same, `npx @whoz-oss/coday-web`: the wizard appears only while the setup is not done,
37
- otherwise the app opens directly.
39
+ The command is always the same, `npx @whoz-oss/coday-web`, and it always opens `/welcome`: the wizard while the setup is
40
+ not done, the loading page and then the app afterwards. The page appears once the launcher has generated the Nx
41
+ workspace, run `provision` and started the `server` task, which takes a few seconds (the Nx startup is most of it); it
42
+ does not wait for the downloads, Java or the JVMs.
43
+
44
+ ### AgentOS that already has data
45
+
46
+ The wizard's email is made the AgentOS administrator only when AgentOS boots on an **empty** database. Pointed at a
47
+ database that already holds users, that email is a plain user: it still gets its personal namespace (AgentOS creates it on
48
+ its first request), but only an administrator can create the platform providers and set the files folder, so the apply stops
49
+ on AgentOS's refusal with a message saying so. Use the administrator's email, or an empty `<configDir>/agentos/data`.
50
+
51
+ ### Model prices
52
+
53
+ The four models of each provider are created with their price (USD per million tokens: input, output, cache read, and
54
+ cache write for Anthropic), so AgentOS can estimate costs. Re-running the setup adds the prices to models created
55
+ before. They come from the providers' price lists and live in `apps/server/src/lib/setup/model-catalogue.ts`; Claude
56
+ Haiku 5.5 is priced at its base tier (prompts up to 100k tokens).
38
57
 
39
58
  ## How it runs
40
59
 
@@ -57,16 +76,15 @@ otherwise the app opens directly.
57
76
  ports → `runtime/state.json`); `status`, `server`, `agentos` and `factory` are continuous tasks, each with its own
58
77
  pane. The launcher runs ONE target, `nx run coday:status`, and `status` depends on the three services, so Nx starts
59
78
  them for it. `agentos` prints *Waiting for first-run setup → http://localhost:3000/welcome* until you gave your email;
60
- `factory` waits for AgentOS to be healthy. Once Express listens, the `server` task opens the browser (see
61
- *First run* for when); it never does when `--auth`, a non-loopback `--host`, `CI`, `--no-open` or `CODAY_NO_OPEN` say
62
- so. The wait for AgentOS runs beside the server and never delays it or its shutdown. For an external AgentOS
63
- (`AGENTOS_URL`) it probes that URL's `/management/health`, which is what the proxy targets.
79
+ `factory` waits for AgentOS to be healthy. As soon as Express listens, the `server` task opens the browser on
80
+ `/welcome` (see *First run*); it never does when `--auth`, a non-loopback `--host`, `CI`, `--no-open` or
81
+ `CODAY_NO_OPEN` say so. Nothing waits for AgentOS before opening: the page shows the progress itself. For an external
82
+ AgentOS (`AGENTOS_URL`) / Factory (`FACTORY_URL`) the setup API probes those URLs, which is what the proxy targets.
64
83
  - **The `status` pane.** The Nx TUI has no status bar, so a small dedicated task reads `runtime/state.json` and probes
65
84
  the health URLs every second. It prints one line per meaningful change only: `agentos download 42%` (one line per
66
85
  10%), `java ok` or the install hint, `agentos healthy :8224`, `factory healthy :8241`, `agentos external <origin>`
67
- for an `AGENTOS_URL`/`FACTORY_URL`, and `Open -> http://localhost:3000/welcome` on a first run (`/` once the setup is
68
- done; then the line says `(once agentos is healthy)` and is repeated without that note when it is: same rule as
69
- the browser). In the
86
+ for an `AGENTOS_URL`/`FACTORY_URL`, and `Open -> http://localhost:3000/welcome` (the same line whatever the profile and
87
+ the setup state, same URL as the browser). In the
70
88
  TUI, select a pane and pin it next to another one to keep the download and the URL on screen while you read the
71
89
  logs of the others; press `?` for the key help of the Nx TUI. At startup `status` is pinned next to `server`: Nx
72
90
  pins the initiating task and its first continuous dependency, but only for a single-target run (`nx run`), which is
@@ -141,7 +159,7 @@ pnpm nx run web:local -- --no-open # do not open the browser (every resta
141
159
  pnpm nx run web:local -- --port 3100 # pick the port
142
160
  ```
143
161
 
144
- The first time you get the wizard; afterwards the app opens directly on the instance you configured, so you can stop,
162
+ The first time you get the wizard; afterwards the loading page and then the app, on the instance you configured, so you can stop,
145
163
  rebuild and restart as often as you like. The target builds the client, factory cockpit, server and web packages plus
146
164
  the AgentOS and Factory boot JARs, then `scripts/web-local.ts` works in a **persistent root, `~/.coday-local`**:
147
165
 
@@ -218,9 +236,11 @@ than the former thin launcher. Versions of the `platform:npm` packages move in l
218
236
  - **The Nx panes do not show / garbled output**: use `--managed` (or `CODAY_NO_NX=1`) for plain console output.
219
237
  - **"Waiting for first-run setup" never ends**: open the URL printed in the pane (or the `Open ->` line of the `status`
220
238
  pane) and answer the wizard.
221
- - **The browser did not open**: headless Linux or no `xdg-open`, or AgentOS is not healthy yet (the app is only opened
222
- once it is); the `server` pane logs one line and the `status` pane shows the URL.
223
- - **A blank page on `/`**: AgentOS is not up yet (the app waits up to 90 s for it). Look at the `agentos` pane / log,
224
- Java 25 is the usual cause.
239
+ - **The browser did not open**: headless Linux or no `xdg-open`, `--no-open`, `CI`, `--auth` or a non-loopback host; the
240
+ `server` pane logs one line (`Not opening the browser: <why>`) and the `status` pane shows the URL.
241
+ - **"AgentOS refused: ... is not an administrator"** at the end of the wizard: see *AgentOS that already has data*.
242
+ - **The loading page does not leave**: AgentOS is not up yet. Look at the `agentos` pane / log, Java 25 is the usual
243
+ cause. With an external `AGENTOS_URL`, check that URL answers on `/management/health`. (Opening `/` yourself
244
+ meanwhile shows a blank page for up to 90 s, the app waits for AgentOS.)
225
245
  - **Java missing or too old**: install Java 25 (the wizard shows the command), the page continues by itself.
226
246
  - **Port already in use**: `PORT=3100 npx @whoz-oss/coday-web`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whoz-oss/coday-web",
3
- "version": "0.0.0-workstream-setup.4",
3
+ "version": "0.0.0-workstream-setup.6",
4
4
  "repository": "https://github.com/whoz-oss/coday",
5
5
  "type": "module",
6
6
  "bin": {
@@ -13,9 +13,9 @@
13
13
  ],
14
14
  "dependencies": {
15
15
  "nx": "23.1.1",
16
- "@whoz-oss/coday-client": "0.0.0-workstream-setup.4",
17
- "@whoz-oss/coday-factory-cockpit": "0.0.0-workstream-setup.4",
18
- "@whoz-oss/coday-server": "0.0.0-workstream-setup.4"
16
+ "@whoz-oss/coday-client": "0.0.0-workstream-setup.6",
17
+ "@whoz-oss/coday-factory-cockpit": "0.0.0-workstream-setup.6",
18
+ "@whoz-oss/coday-server": "0.0.0-workstream-setup.6"
19
19
  },
20
20
  "publishConfig": {
21
21
  "access": "public"