@awebai/oats 0.65.0 → 0.66.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.
Files changed (36) hide show
  1. package/README.md +11 -5
  2. package/bin/oats.mjs +8 -7
  3. package/docs/desktop-cli-api.md +5 -4
  4. package/docs/implementation.md +10 -1
  5. package/docs/integrations.md +1 -1
  6. package/docs/official-catalog.md +2 -2
  7. package/docs/packages.md +7 -7
  8. package/docs/release-notes/v0.66.0.md +183 -0
  9. package/docs/servers.md +2 -2
  10. package/docs/tui.md +137 -16
  11. package/docs/upgrading.md +1 -1
  12. package/docs/workspaces.md +9 -2
  13. package/lib/deployments.mjs +21 -5
  14. package/package-catalog.json +2 -2
  15. package/package.json +1 -1
  16. package/packages/client/cli-locator.mjs +2 -2
  17. package/packages/client/keymap.mjs +36 -9
  18. package/packages/client/machine-contract.mjs +1 -5
  19. package/packages/record/bin/setup.mjs +10 -2
  20. package/packages/record/docs/capture-service.md +45 -6
  21. package/packages/record/lib/capture-service-install.mjs +6 -95
  22. package/packages/record/lib/capture-setup-write.mjs +233 -0
  23. package/packages/tui/README.md +7 -6
  24. package/packages/tui/lib/actions.mjs +65 -64
  25. package/packages/tui/lib/client.mjs +1 -0
  26. package/packages/tui/lib/config.mjs +167 -26
  27. package/packages/tui/lib/main.mjs +53 -9
  28. package/packages/tui/lib/model.mjs +2 -0
  29. package/packages/tui/lib/store.mjs +18 -3
  30. package/packages/tui/lib/term/keys.mjs +135 -33
  31. package/packages/tui/lib/term/kitty.mjs +198 -0
  32. package/packages/tui/lib/term/through.mjs +128 -14
  33. package/packages/tui/lib/term/tty.mjs +43 -12
  34. package/packages/tui/lib/views/frame.mjs +1 -1
  35. package/packages/tui/lib/views/help.mjs +52 -13
  36. package/skills/oats-getting-started/SKILL.md +96 -28
@@ -63,9 +63,14 @@ work, in its own home and terminal. Each workspace has a setup expert soul,
63
63
  they can create repositories in) and the repository's name. Suggest
64
64
  `<workspace>-oats`. Refuse `agents`: OATS keeps instance homes in a
65
65
  folder of that name.
66
- - **Messaging between agents (aweb):** wanted or not. The setup expert sets it
67
- up later. An existing workspace that already has it needs it on this
68
- machine before the setup expert can spawn (step 7).
66
+ - **Messaging between agents (aweb):** wanted or not (recommended: agents
67
+ that can mail each other can coordinate).
68
+ - New workspace: a **username** `N` for a new hosted aweb account
69
+ (lowercase letters, digits and `-`), not a secret. Step 7 signs it up
70
+ with no API key, and its team is `default:N.aweb.ai`. Also a name `A`
71
+ for this machine's messaging root, such as `<workspace>-root`.
72
+ - Existing workspace that already has it: this machine needs it before the
73
+ setup expert can spawn (step 7).
69
74
  - **The harness for the setup expert:** `claude`, `codex` or `pi`. Default:
70
75
  the one you are, if it is one of these.
71
76
  - **The deployment directory `D`:** where OATS lives on this machine. Any
@@ -120,6 +125,13 @@ GitHub access. Check first:
120
125
  gh auth status
121
126
  ```
122
127
 
128
+ If it is logged in, let Git use it (without this, step 5's push and step 6
129
+ fail with "could not read Username"), then go to step 4:
130
+
131
+ ```bash
132
+ gh auth setup-git
133
+ ```
134
+
123
135
  If it is not logged in, start the login yourself, detached and without a
124
136
  terminal (use your harness's background mode if it has one). gh then prints
125
137
  a one-time code and a URL instead of opening a browser, and waits:
@@ -236,7 +248,7 @@ pi install "npm:@awebai/oats-pi@V" # only when the harness is pi
236
248
  ## 5. The workspace
237
249
 
238
250
  **New workspace.** Create its repository, private, inside the deployment
239
- directory `D`, then write four files in it.
251
+ directory `D`, then write the files below in it.
240
252
  - **Private** is the safe default: the workspace file names every member, so
241
253
  whoever reads it sees the list.
242
254
  - **`D/<repo>` must not exist yet:** an existing folder's files would end up
@@ -246,10 +258,11 @@ directory `D`, then write four files in it.
246
258
  mkdir -p "D" && cd "D" && test ! -e "<repo>" && gh repo create "<owner>/<repo>" --private --clone && ls -a "<repo>"
247
259
  ```
248
260
 
249
- Then write the four files below in `D/<repo>`. They show a workspace named
250
- `acme`, in the repository `acme/acme-oats`, with Claude as the harness:
251
- write the person's own workspace name, repository and harness in their
252
- place.
261
+ Then write the files below in `D/<repo>`, all in this one first commit.
262
+ They show a workspace named `acme`, in the repository `acme/acme-oats`,
263
+ with Claude as the harness and messaging for the aweb username `acme-ana`:
264
+ write the person's own workspace name, repository, harness and username in
265
+ their place.
253
266
 
254
267
  `oats-workspace.yaml`:
255
268
 
@@ -259,17 +272,27 @@ name: acme
259
272
  members:
260
273
  - git:github.com/acme/acme-oats # the host is a member too
261
274
  packages:
262
- oats.framework: v1.13.3 # the installed CLI's catalog version (below)
275
+ oats.framework: v1.13.4 # the installed CLI's catalog versions (below)
276
+ oats.aweb: v1.30.0 # messaging: agent identities, mail and chat
263
277
  defaults:
264
278
  capabilities:
265
279
  oats.core: { from: package }
280
+ messaging: { oats.aweb: { from: package } }
281
+ teams:
282
+ acme: { description: The acme workspace's aweb team, team: "default:acme-ana.aweb.ai" }
283
+ defaultTeam: acme # every soul starts in this team
266
284
  ```
267
285
 
268
- - **The `oats.framework` version** is the installed CLI's catalog's:
269
- `"$(oats root)/package-catalog.json"`, `packages."oats.framework".ref`,
270
- for example `oats-framework/v1.13.3`. Write the part after the `/`.
271
- - **Add nothing else:** knowledge, messaging and teams come with the setup
272
- expert.
286
+ - **The versions** are the installed CLI's catalog's:
287
+ `"$(oats root)/package-catalog.json"`, `packages."oats.framework".ref`
288
+ (for example `oats-framework/v1.13.4`: write the part after the `/`) and
289
+ `packages."oats.aweb".ref` (for example `v1.30.0`).
290
+ - **The team** is `default:N.aweb.ai`, with `N` the username from step 1;
291
+ its label (here `acme`) is the workspace name.
292
+ - **Without messaging,** leave out the `oats.aweb` line, the `messaging`
293
+ line, `teams` and `defaultTeam`.
294
+ - **Add nothing else:** knowledge and the person's own repositories come
295
+ with the setup expert.
273
296
 
274
297
  `oats-membership.yaml`:
275
298
 
@@ -284,7 +307,7 @@ workspace: git:github.com/acme/acme-oats
284
307
  schemaVersion: 2
285
308
  name: acme-oats-setup-expert
286
309
  description: The OATS setup expert for the acme workspace — onboards machines and people, and keeps this workspace's OATS setup working.
287
- work: worktree # it changes this repository by pull request, on its own branch
310
+ work: worktree # it changes this repository from its own worktree
288
311
  capabilities:
289
312
  oats.setup: { from: package }
290
313
  knowledge: none # so it spawns on a machine before knowledge is set up there
@@ -304,7 +327,30 @@ toolkit: its briefing says what the person types and what you run, and its
304
327
  skills hold every procedure. Start with `/oats-setup-model`. When your task
305
328
  is a hand-over from the getting-started skill, follow `/oats-setup-expert`,
306
329
  or `/oats-onboarding` if your `oats.setup` is older than 2.8.0 and lacks it.
307
- Change shared files only by pull request; the person reviews and merges them.
330
+ ```
331
+
332
+ `souls/acme-developer/soul.yaml`, a first developer for the person's tasks:
333
+
334
+ ```yaml
335
+ schemaVersion: 2
336
+ name: acme-developer
337
+ description: A developer in the acme workspace — builds what its task asks.
338
+ work: directory # its own folder; the setup expert points it at the person's repositories later
339
+ knowledge: none
340
+ launch: { harness: claude }
341
+ ```
342
+
343
+ `souls/acme-developer/AGENTS.md`, and beside it the symlink
344
+ `CLAUDE.md -> AGENTS.md`:
345
+
346
+ ```markdown
347
+ # acme-developer
348
+
349
+ You are a developer in the acme workspace. You build what your task asks,
350
+ in your own `work/` directory: write the code, run it and test it. Keep the
351
+ solution small and simple. When you finish, say what you built, where it is
352
+ and how you checked it. If you are blocked on a decision, ask whoever gave
353
+ you the task.
308
354
  ```
309
355
 
310
356
  **Keep the soul this thin.** Everything it knows comes from `oats.setup`, so
@@ -312,13 +358,17 @@ it improves when the workspace's `oats.framework` pin moves. It has no
312
358
  knowledge of its own, so it can be spawned on a machine before knowledge is
313
359
  set up there. It takes the workspace's messaging and doesn't empty that
314
360
  slot: a setup soul that empties the messaging slot the workspace fills is
315
- not the workspace's operator, and gets no mail. A new workspace has no
316
- messaging yet; the setup expert adds it.
361
+ not the workspace's operator, and gets no mail.
317
362
 
318
363
  **Commit and push.**
319
364
  - This first commit goes straight to the new repository's default branch: it
320
- is the person's own, just created. Every later change is a pull request
321
- from the setup expert.
365
+ is the person's own, just created. Later changes come from the setup
366
+ expert, by its briefing's rule for shared files (`oats.setup`'s
367
+ `/oats-workspace-config`, "Change a shared file"). From oats.setup 2.8.3
368
+ (oats.framework 1.13.4), it pushes straight to the default branch when its
369
+ checks show nobody else can push there and nothing guards that branch, and
370
+ for a member repository only on the person's yes; otherwise it opens a
371
+ pull request. An older `oats.setup` always opens one.
322
372
  - If `git config user.email` prints nothing, the person's Git identity is not
323
373
  set up yet. After they confirm their name, commit with
324
374
  `-c user.name="<their name>" -c user.email="<their noreply address>"`. The
@@ -327,7 +377,7 @@ messaging yet; the setup expert adds it.
327
377
  setup expert sets up their identity properly later.
328
378
 
329
379
  ```bash
330
- cd "D/<repo>" && git add -A && git commit -m "OATS workspace acme: workspace, membership, setup expert" && git push -u origin HEAD
380
+ cd "D/<repo>" && git add -A && git commit -m "OATS workspace acme: workspace, team, setup expert, developer" && git push -u origin HEAD
331
381
  ```
332
382
 
333
383
  The workspace reference `W` is then `git:github.com/<owner>/<repo>`, here
@@ -382,8 +432,25 @@ can't spawn on this machine until it has messaging too. Set it up now:
382
432
  ```
383
433
 
384
434
  Its `aw.status` must be `ok` or `done`; stop on `failed` and tell the
385
- person why. Its `defaultTeam.label` is `L`, the setup expert's team.
386
- 2. **The person gets an invite token** from a member of `L`, who runs
435
+ person why. Its `defaultTeam.label` is `L`, the setup expert's team. For a new workspace it must equal the label you wrote under `teams:` (the workspace name, not the username `N`); if it differs, stop and tell the person.
436
+ 2. **New workspace: sign up its aweb account and team,** with `N` and `A`
437
+ from step 1. No API key, no token and nothing for the person to type.
438
+ Preview first, then run it:
439
+
440
+ ```bash
441
+ cd "D" && oats aweb setup --soul S --username N --name A --label L --plan --json
442
+ cd "D" && oats aweb setup --soul S --username N --name A --label L --json
443
+ ```
444
+
445
+ The preview does not contact aweb, so it can't tell whether `N` is free.
446
+ If the run fails with `E_SETUP_NATIVE` (most likely the username is
447
+ taken; aw's output is withheld), don't rerun yet: run
448
+ `test -e "D/.aw" && echo HAS_AW`. If it prints `HAS_AW`, stop and tell the
449
+ person what you saw. Otherwise ask the person for another `N`, then in
450
+ `D/<repo>` change the team id in `oats-workspace.yaml` to
451
+ `default:N.aweb.ai`, commit and push it, run `oats sync --dir D`, and run
452
+ both lines again. Then skip items 3 and 4 and go to the check (item 5).
453
+ 3. **Existing workspace: the person gets an invite token** from a member of `L`, who runs
387
454
  `oats aweb invite --soul <their soul> --label L --json` in their own
388
455
  deployment and passes the token to the person privately, never by
389
456
  ordinary mail. They also give the aweb service URL `U`. Choose with the
@@ -391,14 +458,14 @@ can't spawn on this machine until it has messaging too. Set it up now:
391
458
  `<workspace>-<their machine>`. This works for a hosted team only: if the
392
459
  invite is refused, or the join says the team is not hosted, stop, and
393
460
  the workspace's owner decides.
394
- 3. **The person joins in their own terminal,** typing the token at the
461
+ 4. **Existing workspace: the person joins in their own terminal,** typing the token at the
395
462
  hidden prompt. Give them the line with `D`, `S`, `L`, `A` and `U` filled
396
463
  in:
397
464
 
398
465
  ```text
399
466
  cd "D" && sh -c 'stty -echo; printf "Invite token: "; read -r T; stty echo; echo; printf "%s\n" "$T" | oats aweb setup --soul S --join L --invite-stdin --name A --service U'
400
467
  ```
401
- 4. **Check,** and expect `"member": true`:
468
+ 5. **Check,** and expect `"member": true`:
402
469
 
403
470
  ```bash
404
471
  cd "D" && oats aweb setup --soul S --check-only --json
@@ -423,7 +490,7 @@ are cloned, knowledge tools, messaging wanted or not>
423
490
  - Installed: OATS <V> (oats version), OATS Desktop <V> | not installed (why)
424
491
  - GitHub: gh logged in over https as <login>; no SSH key or signing set up
425
492
  - New workspace only: repository <owner>/<repo> created, first commit pushed
426
- - Messaging: this machine joined L as root A (aw <version>, <harness>
493
+ - Messaging: new account N signed up, or joined L by invite; root A (aw <version>, <harness>
427
494
  channel installed) | not set up (the setup expert has no messaging)
428
495
 
429
496
  ## Left to you
@@ -495,6 +562,7 @@ its own window when they need to type a secret. You are done.
495
562
  person did not create in step 5.
496
563
  - **The Desktop:** never download it through a browser, skip a verification
497
564
  step, strip quarantine without asking, or start it with `env -i`.
498
- - **Put an absolute path, an account or a credential** in
499
- `oats-workspace.yaml`, `oats-membership.yaml` or a soul.
565
+ - **Put an absolute path or a credential** in `oats-workspace.yaml`,
566
+ `oats-membership.yaml` or a soul (the aweb username in the team id is not
567
+ a secret).
500
568
  - **Spawn** before `oats onboard` confirmed the host.