@awebai/oats 0.22.0 → 0.22.2

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 (60) hide show
  1. package/README.md +40 -50
  2. package/bin/oats.mjs +242 -22
  3. package/capabilities/oats-authoring/LICENSE +21 -0
  4. package/capabilities/oats-authoring/oats-package.json +11 -0
  5. package/capabilities/oats-authoring/oats.json +4 -4
  6. package/capabilities/oats-authoring/skills/integration-authoring/SKILL.md +63 -0
  7. package/capabilities/oats-authoring/skills/skill-craft/SKILL.md +109 -0
  8. package/capabilities/oats-authoring/skills/soul-craft/SKILL.md +109 -0
  9. package/capabilities/oats-aweb/injects/aweb.md +4 -3
  10. package/capabilities/oats-aweb/oats.json +7 -7
  11. package/capabilities/oats-aweb/skills/LICENSE +21 -0
  12. package/capabilities/oats-aweb/skills/VENDORED.md +26 -0
  13. package/capabilities/oats-aweb/skills/aweb-identity/SKILL.md +201 -0
  14. package/capabilities/oats-aweb/skills/aweb-messaging/SKILL.md +161 -0
  15. package/capabilities/oats-aweb/skills/aweb-messaging/references/messaging-scenarios.md +61 -0
  16. package/capabilities/oats-aweb/skills/aweb-team-membership/SKILL.md +328 -0
  17. package/capabilities/oats-aweb/skills/aweb-team-membership/references/team-membership-reference.md +74 -0
  18. package/capabilities/oats-jira/oats.json +1 -1
  19. package/capabilities/oats-linear/oats.json +1 -1
  20. package/capabilities/oats-okf/agents/{memory-harvest.md → memory-harvest/AGENTS.md} +3 -1
  21. package/capabilities/oats-okf/agents/memory-harvest/soul.yaml +6 -0
  22. package/capabilities/oats-okf/bin/oats-okf.mjs +201 -54
  23. package/capabilities/oats-okf/injects/okf.md +7 -0
  24. package/capabilities/oats-okf/oats.json +5 -2
  25. package/capabilities/oats-okf/skills/memory-harvest/SKILL.md +42 -1
  26. package/capabilities/oats-review/oats.json +1 -1
  27. package/docs/2026-09-03-architecture-proposal.md +642 -0
  28. package/docs/execution-targets.md +181 -0
  29. package/docs/first-team-demo.md +87 -0
  30. package/docs/first-team.md +179 -0
  31. package/docs/implementation.md +14 -1
  32. package/docs/integrations.md +83 -65
  33. package/docs/layers.md +356 -80
  34. package/docs/migration-from-oas.md +80 -116
  35. package/docs/oats-config.schema.json +1 -0
  36. package/docs/operating-team-migration.md +217 -0
  37. package/docs/release-notes/v0.22.1.md +106 -0
  38. package/docs/release-notes/v0.22.2.md +69 -0
  39. package/docs/servers.md +94 -0
  40. package/docs/souls-and-instances.md +30 -3
  41. package/lib/core.mjs +626 -415
  42. package/lib/herdr.mjs +95 -0
  43. package/lib/servers.mjs +436 -0
  44. package/lib/session-input.mjs +78 -0
  45. package/lib/session-viewer.mjs +51 -0
  46. package/package-catalog.json +2 -2
  47. package/package.json +1 -1
  48. package/packages/record/README.md +76 -16
  49. package/packages/record/bin/capture.mjs +59 -3
  50. package/packages/record/bin/recall.mjs +67 -1
  51. package/packages/record/docs/turn-record-sot.md +1 -1
  52. package/packages/record/lib/sessions-for-home.mjs +130 -0
  53. package/packages/record/lib/store.mjs +207 -43
  54. package/skills/oats/SKILL.md +6 -2
  55. package/capabilities/oats-aweb/package.json +0 -20
  56. package/capabilities/oats-jira/package.json +0 -25
  57. package/capabilities/oats-linear/README.md +0 -234
  58. package/capabilities/oats-linear/package.json +0 -29
  59. package/capabilities/oats-linear/test/oats-linear.test.mjs +0 -168
  60. package/capabilities/oats-okf/package.json +0 -22
@@ -0,0 +1,94 @@
1
+ # Servers: running instances on another machine
2
+
3
+ A **server** is another machine with its own installed OATS, reached over an
4
+ OpenSSH host alias. Registering one lets `oats spawn`, `oats retire` and
5
+ `oats status` run there with the same flags and the same JSON envelope as
6
+ locally, and lets the Desktop offer it at spawn time. The contract behind
7
+ this is the execution-targets contract (`docs/execution-targets.md`, landing
8
+ with the transport work).
9
+
10
+ ## Register
11
+
12
+ ```bash
13
+ oats server add build --ssh build-host --workspace /srv/team --oats /usr/local/bin/oats
14
+ oats server check build # ssh reachability, remote oats version, workspace roster; no mutation
15
+ oats server list
16
+ ```
17
+
18
+ - `--ssh` is an OpenSSH host alias or host name. Keys, users, ports and host
19
+ verification live in your `~/.ssh/config`; the registry stores none of it and
20
+ refuses `user@host` or option-shaped values. Connections are non-interactive
21
+ (`BatchMode=yes`): a host that would prompt fails fast with ssh's message.
22
+ - `--workspace` is the absolute path of an OATS workspace on the server: the
23
+ same team repository checked out there, with its own `agents/`.
24
+ - `--oats` is the remote executable (default `oats` on the login shell's PATH).
25
+ - `--path` names directories to prepend to the remote PATH for every routed
26
+ command (`~/.local/bin:/opt/pi/bin`). A non-interactive ssh command runs in
27
+ the login shell's minimal PATH, and the remote kernel's spawn preflight looks
28
+ for the runtime binary (`claude`, `pi`, `codex`) there; without this, a
29
+ runtime installed under the user's home is "not found" even though it runs
30
+ fine in an interactive shell on that host.
31
+ - Registrations live in `~/.oats/servers.json` on this machine, never in a
32
+ repository scope.
33
+
34
+ ## Run there
35
+
36
+ ```bash
37
+ oats spawn dev --server build --purpose fix-123 --task-file task.md
38
+ oats status --server build
39
+ oats retire dev-fix-123 --server build
40
+ ```
41
+
42
+ The remote kernel does the work in its registered workspace: composition,
43
+ worktree, identity, launch, retirement. The local side only routes: a local
44
+ `--task-file` travels as text, every argument is quoted for the remote login
45
+ shell, and the remote's version and envelope are checked before either
46
+ mutation (spawn and retire). A spawn is also held to what the remote
47
+ advertises: a runtime it does not list (including the soul's own default as
48
+ the remote roster reports it), a session backend it lacks, or a launch option
49
+ such as `--yolo` it does not know is refused with `E_REMOTE_INCOMPATIBLE`
50
+ saying what was established. A remote that advertises nothing (any kernel
51
+ before 0.22.2) is assumed to run pi and claude on tmux with no options, and
52
+ the refusal says so rather than claiming the remote lacks the feature; a soul
53
+ the remote roster does not list with a runtime is validated by the remote
54
+ kernel itself at spawn. `--dir` and `--server` do not combine; the remote
55
+ workspace comes from the registration.
56
+
57
+ ```bash
58
+ oats session attach --server build --instance dev-fix-123 # viewer through an ssh PTY
59
+ ```
60
+
61
+ The viewer runs the execution host's own `oats session attach` (Herdr terminal
62
+ or an isolated tmux linked viewer) over `ssh -t`, addressed by the saved route:
63
+ the remote binary and path come from the snapshot, never from the caller. The
64
+ `oats session` commands ship in kernel 0.22.2: against an older server both
65
+ session routes refuse with `E_REMOTE_INCOMPATIBLE` before connecting a viewer,
66
+ and `ssh -t <host> tmux attach -t oats` remains the way in.
67
+
68
+ ## What this machine keeps
69
+
70
+ A **route snapshot** per remote instance under `~/.oats/remote/<server>/`,
71
+ taken at spawn: the ssh host, workspace and oats path the instance was spawned
72
+ through, plus the remote home. Later `retire --server` uses the snapshot, not
73
+ today's registry, so editing or removing a registration never orphans a remote
74
+ home; the snapshot is removed only when the remote kernel reports the home
75
+ gone. Remote state is never cached: `status --server` pulls it every time and
76
+ appends this machine's snapshots for that server.
77
+
78
+ ## Limits
79
+
80
+ - Routed: `spawn`, `retire`, `status`, and, against a 0.22.2 or later
81
+ server, `session inspect` (the execution host's envelope, relayed; a Desktop
82
+ preflight before attaching) and `session attach`. Session input runs on the
83
+ execution host, where the wake broker calls it.
84
+ Desktop projection of remote instances and remote viewer attachment are in
85
+ progress on the execution-targets work.
86
+ - No Git over SSH: repository operations always run on the server, by its
87
+ kernel, in its workspace.
88
+ - A remote needs an OATS at least 0.22.1 (`MIN_REMOTE_VERSION`) for spawn,
89
+ retire and status, and 0.22.2 for the session routes; the record commands
90
+ (`capture`, `recall`) need Node 22.5+ there for `node:sqlite`, which
91
+ lifecycle routing does not.
92
+ - After a remote spawn the Desktop reports the server and remote home; the
93
+ instance does not appear in the local roster (projection of remote instances
94
+ is the next step of the execution-targets work).
@@ -108,6 +108,24 @@ the same work tree. The harvester promotes, merges, or drops notes, commits a
108
108
  `memory-harvest:` change, deletes processed notes, and retires itself. This is
109
109
  how long-lived instances feed their souls while still alive.
110
110
 
111
+ Instances that write few notes still feed their souls. With no notes pending,
112
+ `oats okf harvest` asks the turn record for the instance's own captured
113
+ sessions (the transcripts whose working directory is the instance home), and
114
+ spawns the harvester on the turns captured since the last harvest, bounded by
115
+ exact turn ids. The harvester extracts candidates from them, judges each under
116
+ the same promotion bar as a note, and once its judgement is complete writes the
117
+ watermark `.okf-harvest-record.json` in the instance home, whether or not it
118
+ promoted anything; only a failed harvest leaves the watermark alone, so the same
119
+ window is read again. `oats okf harvest --from-record` consults the record even
120
+ when notes are pending. Windows are sized to one tool-output read (60 turns
121
+ or 96 KB of JSON by default; okf settings `record-window-turns` and
122
+ `record-window-bytes`), so a long backlog drains over several harvests, each
123
+ advancing the watermark only over what was read; the package prepares the next
124
+ watermark as `.okf-harvest-record.next.json` and the harvester's delivery is
125
+ one rename, so an abandoned harvest leaves that file beside the current one.
126
+ oats.okf 1.5.0 requires kernel 0.22.2 (the `capture --home` and `recall --json`
127
+ surfaces); the compatibility floor refuses to activate it on an older kernel.
128
+
111
129
  ### Spawning and coordinating with other agents
112
130
 
113
131
  OATS agents can run `oats spawn` when their instructions or the
@@ -156,9 +174,18 @@ integration self-deletes the instance identity here. For oats-okf, retirement
156
174
  is a knowledge no-op because harvest already happens after commits.
157
175
 
158
176
  `oats retire <instance> --self` lets an instance retire itself when the human
159
- or briefing says it is done. It runs hooks and removes the home first, then
160
- delays the tmux window kill for a few seconds so the instance can report
161
- final status.
177
+ or briefing says it is done. A live runtime cannot give a stable final
178
+ inspection of its own work, so the calling process inspects, runs, and removes
179
+ nothing: it records the intent beside its home as
180
+ `.oats-retire-pending-<instance>.json` and starts a detached completion, then returns so the instance can report final
181
+ status before its tmux window dies a few seconds later. The completion then
182
+ retires the instance exactly as an external `oats retire` would: quiesce the
183
+ runtime, preserve uncommitted work, run retire hooks, repair lineage, remove
184
+ the worktree and the home. Success leaves nothing behind: the home and the
185
+ marker are gone. A failure writes `.oats-retired-<instance>.json` beside the
186
+ retained home (plus the usual quarantine marker when hooks reported incomplete
187
+ cleanup), shows in `oats status` and the Desktop as a failed deferred
188
+ retirement, and is retried and cleared with `oats retire <instance>`.
162
189
 
163
190
  ## Work modes
164
191