@awebai/oats 0.29.4 → 0.30.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 (224) hide show
  1. package/README.md +12 -6
  2. package/bin/oats.mjs +194 -50
  3. package/capabilities/oats-aweb/bin/oats-aweb.mjs +538 -204
  4. package/capabilities/oats-aweb/injects/aweb.md +1 -1
  5. package/capabilities/oats-aweb/lib/binding-wire.mjs +31 -22
  6. package/capabilities/oats-aweb/oats.json +5 -12
  7. package/capabilities/oats-aweb/skills/VENDORED.md +4 -4
  8. package/capabilities/oats-aweb/skills/aweb-team-membership/SKILL.md +1 -1
  9. package/capabilities/oats-aweb/skills/oats-aweb/SKILL.md +83 -13
  10. package/capabilities/oats-code-review/injects/reviewer.md +26 -0
  11. package/capabilities/oats-code-review/oats.json +16 -0
  12. package/capabilities/oats-code-review/skills/adversarial-review/SKILL.md +66 -0
  13. package/capabilities/oats-code-review/skills/review-dev-docs/SKILL.md +30 -0
  14. package/capabilities/oats-code-review/skills/security-review/SKILL.md +56 -0
  15. package/capabilities/oats-code-review/skills/simplification-review/SKILL.md +34 -0
  16. package/capabilities/oats-developer/injects/developer.md +38 -0
  17. package/capabilities/oats-developer/oats.json +17 -0
  18. package/capabilities/oats-developer/skills/execution-strategy/SKILL.md +43 -0
  19. package/capabilities/oats-developer/skills/maintain-dev-docs/SKILL.md +47 -0
  20. package/capabilities/oats-developer/skills/run-the-review-loop/SKILL.md +65 -0
  21. package/capabilities/oats-developer/skills/understand-the-spec/SKILL.md +37 -0
  22. package/capabilities/oats-developer/skills/worktrees/SKILL.md +36 -0
  23. package/capabilities/oats-engineering-expert/injects/expert.md +37 -0
  24. package/capabilities/oats-engineering-expert/oats.json +17 -0
  25. package/capabilities/oats-engineering-expert/skills/coordinate-developers/SKILL.md +37 -0
  26. package/capabilities/oats-engineering-expert/skills/coordinate-experts/SKILL.md +52 -0
  27. package/capabilities/oats-engineering-expert/skills/land-your-prs/SKILL.md +50 -0
  28. package/capabilities/oats-engineering-expert/skills/plan-and-spec/SKILL.md +53 -0
  29. package/capabilities/oats-engineering-expert/skills/verify-developer-work/SKILL.md +49 -0
  30. package/capabilities/oats-okf/bin/oats-okf.mjs +8 -4
  31. package/capabilities/oats-okf/lib/binding-wire.mjs +47 -15
  32. package/capabilities/oats-okf/lib/inspection.mjs +26 -7
  33. package/capabilities/oats-okf/lib/sources.mjs +16 -2
  34. package/capabilities/oats-okf/lib/worker.mjs +5 -16
  35. package/capabilities/oats-okf/oats.json +6 -3
  36. package/capabilities/oats-okf-harvest/bin/okf-harvest.mjs +2 -2
  37. package/capabilities/oats-okf-harvest/oats.json +3 -3
  38. package/capabilities/oats-okf-harvest/skills/knowledge-harvest/SKILL.md +6 -6
  39. package/capabilities/oats-okf-maintenance/bin/okf-maintenance.mjs +2 -2
  40. package/capabilities/oats-okf-maintenance/injects/maintainer.md +1 -1
  41. package/capabilities/oats-okf-maintenance/oats.json +2 -2
  42. package/capabilities/oats-okf-maintenance/skills/knowledge-review/SKILL.md +1 -1
  43. package/capabilities/oats-okf-maintenance/skills/okf-trigger-setup/SKILL.md +11 -23
  44. package/capabilities/oats-workspace-experts/injects/oats-experts.md +26 -0
  45. package/capabilities/oats-workspace-experts/oats.json +9 -0
  46. package/docs/capabilities.md +160 -171
  47. package/docs/capability-manifest.schema.json +6 -11
  48. package/docs/configuration.md +213 -64
  49. package/docs/design/2026-09-16-knowledge-capability-contract.md +36 -50
  50. package/docs/design/2026-09-23-workspace-module-contracts.md +377 -544
  51. package/docs/design/2026-09-26-okf-knowledge-operations.md +132 -357
  52. package/docs/design/2026-09-27-team-model-v2.md +97 -117
  53. package/docs/design/2026-09-28-automations-trust.md +38 -0
  54. package/docs/design/2026-09-28-soul-launch-preference.md +63 -0
  55. package/docs/design/HISTORY.md +65 -0
  56. package/docs/design/README.md +23 -54
  57. package/docs/desktop-cli-api.md +1787 -1777
  58. package/docs/desktop.md +30 -91
  59. package/docs/execution-targets.md +146 -292
  60. package/docs/first-team.md +31 -17
  61. package/docs/implementation.md +76 -288
  62. package/docs/integrations.md +118 -320
  63. package/docs/knowledge-capability-authoring.md +25 -52
  64. package/docs/knowledge-reference/acceptance.md +3 -3
  65. package/docs/knowledge-reference/adoption.md +1 -1
  66. package/docs/knowledge-reference/harvester.md +2 -2
  67. package/docs/knowledge-reference/package-craft.md +3 -3
  68. package/docs/knowledge-reference/provider-mapping.md +3 -6
  69. package/docs/knowledge-reference/reader-capture.md +3 -3
  70. package/docs/knowledge-theory.md +62 -166
  71. package/docs/knowledge.md +225 -404
  72. package/docs/layers.md +42 -97
  73. package/docs/oats-local.schema.json +58 -5
  74. package/docs/oats-membership.schema.json +1 -8
  75. package/docs/oats-package.schema.json +5 -5
  76. package/docs/oats-workspace.schema.json +8 -22
  77. package/docs/official-catalog.md +25 -28
  78. package/docs/packages.md +45 -63
  79. package/docs/plans/0.30-close-out.md +61 -0
  80. package/docs/release-lane.md +77 -0
  81. package/docs/release-notes/oats-framework-v1.1.3.md +10 -8
  82. package/docs/release-notes/v0.19.0.md +48 -147
  83. package/docs/release-notes/v0.19.1.md +2 -3
  84. package/docs/release-notes/v0.19.3.md +2 -15
  85. package/docs/release-notes/v0.20.0.md +0 -15
  86. package/docs/release-notes/v0.22.0.md +71 -138
  87. package/docs/release-notes/v0.22.1.md +42 -90
  88. package/docs/release-notes/v0.22.10.md +1 -1
  89. package/docs/release-notes/v0.22.11.md +1 -47
  90. package/docs/release-notes/v0.22.12.md +4 -13
  91. package/docs/release-notes/v0.22.13.md +1 -42
  92. package/docs/release-notes/v0.22.14.md +3 -11
  93. package/docs/release-notes/v0.22.15.md +1 -46
  94. package/docs/release-notes/v0.22.16.md +6 -8
  95. package/docs/release-notes/v0.22.18.md +1 -99
  96. package/docs/release-notes/v0.22.19.md +3 -14
  97. package/docs/release-notes/v0.22.2.md +6 -15
  98. package/docs/release-notes/v0.22.3.md +0 -1
  99. package/docs/release-notes/v0.22.4.md +1 -14
  100. package/docs/release-notes/v0.22.5.md +2 -12
  101. package/docs/release-notes/v0.22.6.md +0 -3
  102. package/docs/release-notes/v0.23.0.md +9 -25
  103. package/docs/release-notes/v0.23.1.md +9 -25
  104. package/docs/release-notes/v0.23.2.md +2 -4
  105. package/docs/release-notes/v0.24.0.md +56 -97
  106. package/docs/release-notes/v0.24.1.md +7 -11
  107. package/docs/release-notes/v0.24.10.md +34 -45
  108. package/docs/release-notes/v0.24.11.md +12 -20
  109. package/docs/release-notes/v0.24.12.md +35 -48
  110. package/docs/release-notes/v0.24.13.md +34 -41
  111. package/docs/release-notes/v0.24.2.md +9 -13
  112. package/docs/release-notes/v0.24.3.md +7 -11
  113. package/docs/release-notes/v0.24.4.md +6 -6
  114. package/docs/release-notes/v0.24.5.md +6 -10
  115. package/docs/release-notes/v0.24.6.md +2 -5
  116. package/docs/release-notes/v0.24.7.md +46 -75
  117. package/docs/release-notes/v0.24.8.md +58 -96
  118. package/docs/release-notes/v0.24.9.md +38 -54
  119. package/docs/release-notes/v0.25.0.md +59 -76
  120. package/docs/release-notes/v0.25.1.md +57 -81
  121. package/docs/release-notes/v0.25.2.md +51 -70
  122. package/docs/release-notes/v0.25.3.md +11 -13
  123. package/docs/release-notes/v0.25.4.md +9 -13
  124. package/docs/release-notes/v0.25.5.md +3 -5
  125. package/docs/release-notes/v0.25.6.md +20 -29
  126. package/docs/release-notes/v0.25.7.md +5 -7
  127. package/docs/release-notes/v0.25.8.md +26 -39
  128. package/docs/release-notes/v0.26.0.md +175 -646
  129. package/docs/release-notes/v0.27.0.md +4 -5
  130. package/docs/release-notes/v0.27.1.md +4 -6
  131. package/docs/release-notes/v0.27.2.md +1 -1
  132. package/docs/release-notes/v0.28.0.md +57 -124
  133. package/docs/release-notes/v0.29.0.md +89 -208
  134. package/docs/release-notes/v0.29.1.md +1 -1
  135. package/docs/release-notes/v0.29.2.md +3 -4
  136. package/docs/release-notes/v0.30.0.md +205 -0
  137. package/docs/schedules.md +280 -363
  138. package/docs/servers.md +99 -117
  139. package/docs/soul.schema.json +2 -9
  140. package/docs/souls-and-instances.md +145 -158
  141. package/docs/workspaces.md +132 -215
  142. package/lib/automations.mjs +21 -6
  143. package/lib/core.mjs +226 -74
  144. package/lib/instance-events.mjs +1 -1
  145. package/lib/instance-inspect.mjs +109 -34
  146. package/lib/instance-lifecycle.mjs +14 -1
  147. package/lib/instance-resolution.mjs +26 -27
  148. package/lib/launch-preference.mjs +87 -0
  149. package/lib/materialize.mjs +3 -3
  150. package/lib/resolve.mjs +29 -87
  151. package/lib/schedule.mjs +1 -1
  152. package/lib/teams-verbs.mjs +195 -0
  153. package/lib/teams.mjs +190 -0
  154. package/lib/triggers.mjs +2 -2
  155. package/lib/workspace.mjs +54 -147
  156. package/package-catalog.json +9 -15
  157. package/package.json +1 -1
  158. package/skills/oats-getting-started/SKILL.md +25 -13
  159. package/capabilities/oats-review/injects/review.md +0 -69
  160. package/capabilities/oats-review/oats.json +0 -10
  161. package/capabilities/oats-review/skills/code-review/SKILL.md +0 -44
  162. package/capabilities/oats-review/skills/security-review/SKILL.md +0 -59
  163. package/docs/conventions.md +0 -90
  164. package/docs/design/2026-09-07-architecture-reassessment.md +0 -131
  165. package/docs/design/2026-09-07-desktop-souls-capabilities.md +0 -50
  166. package/docs/design/2026-09-07-mobile-agent-management-proposal.md +0 -228
  167. package/docs/design/2026-09-08-expert-assisted-deployment-proposal.md +0 -558
  168. package/docs/design/2026-09-13-knowledge-and-memory-direction.md +0 -744
  169. package/docs/design/2026-09-13-knowledge-implementation.md +0 -127
  170. package/docs/design/2026-09-13-knowledge-location-contract.md +0 -340
  171. package/docs/design/2026-09-14-artifact-retention-contract.md +0 -190
  172. package/docs/design/2026-09-14-portable-souls-and-git-workspaces.md +0 -708
  173. package/docs/design/2026-09-14-portable-souls-contract-amendments.md +0 -85
  174. package/docs/design/2026-09-14-portable-souls-explainer.md +0 -750
  175. package/docs/design/2026-09-15-captured-dispatch.md +0 -127
  176. package/docs/design/2026-09-15-captured-resolution-records.md +0 -143
  177. package/docs/design/2026-09-15-package-preparation.md +0 -100
  178. package/docs/design/2026-09-15-portable-data-contract.md +0 -121
  179. package/docs/design/2026-09-15-portable-declarations.md +0 -189
  180. package/docs/design/2026-09-15-portable-souls-handoff.md +0 -150
  181. package/docs/design/2026-09-15-portable-souls-implementation.md +0 -417
  182. package/docs/design/2026-09-15-selection-lock-and-approval.md +0 -122
  183. package/docs/design/2026-09-15-source-observation.md +0 -119
  184. package/docs/design/2026-09-16-captured-admission.md +0 -77
  185. package/docs/design/2026-09-16-captured-helper-dispatch.md +0 -105
  186. package/docs/design/2026-09-16-captured-launch-inputs.md +0 -42
  187. package/docs/design/2026-09-16-command-profile-preparation.md +0 -86
  188. package/docs/design/2026-09-16-fresh-install-first-rollout.md +0 -47
  189. package/docs/design/2026-09-16-fresh-operator-walkthrough.md +0 -282
  190. package/docs/design/2026-09-16-messaging-capability-contract.md +0 -59
  191. package/docs/design/2026-09-16-portable-migration-evidence.md +0 -158
  192. package/docs/design/2026-09-16-portable-onboarding.md +0 -179
  193. package/docs/design/2026-09-16-prepare-request-transport.md +0 -26
  194. package/docs/design/2026-09-16-provider-binding-codecs.md +0 -98
  195. package/docs/design/2026-09-16-provider-binding-wire.md +0 -274
  196. package/docs/design/2026-09-17-capability-helper-input-contract.md +0 -95
  197. package/docs/design/2026-09-17-captured-backend-parity.md +0 -53
  198. package/docs/design/2026-09-17-captured-native-start.md +0 -58
  199. package/docs/design/2026-09-17-portable-boundary-hookup.md +0 -19
  200. package/docs/design/2026-09-17-portable-boundary-resources.md +0 -52
  201. package/docs/design/2026-09-17-public-captured-start.md +0 -108
  202. package/docs/design/2026-09-17-public-prepare-request.md +0 -90
  203. package/docs/design/2026-09-18-captured-pi-host.md +0 -205
  204. package/docs/design/2026-09-18-first-cut-release-checklist.md +0 -131
  205. package/docs/design/2026-09-18-herdr-protocol-compatibility.md +0 -60
  206. package/docs/design/2026-09-20-redesign-program-board.md +0 -142
  207. package/docs/design/2026-09-20-workspace-and-portable-adoption-plan.md +0 -289
  208. package/docs/design/2026-09-20-workspace-onboarding-public.md +0 -207
  209. package/docs/design/2026-09-22-desktop-parity-seams.md +0 -58
  210. package/docs/design/2026-09-23-simplified-workspace-model.md +0 -711
  211. package/docs/design/2026-09-23-workspace-v2-implementation-plan.md +0 -65
  212. package/docs/design/2026-09-24-desktop-phase-f-boundary.md +0 -242
  213. package/docs/design/2026-09-24-phase-d-plan.md +0 -305
  214. package/docs/design/2026-09-25-teams-contract.md +0 -258
  215. package/docs/design/2026-09-26-desktop-design-brief-architecture.md +0 -241
  216. package/docs/design/desktop-ux-plan.md +0 -362
  217. package/docs/design/launch-configurations.md +0 -168
  218. package/docs/design/okf-mirror-provenance.md +0 -105
  219. package/docs/design/operations-contract.md +0 -141
  220. package/docs/oats-member.schema.json +0 -38
  221. package/skills/integration-authoring/SKILL.md +0 -84
  222. package/skills/oats-support/SKILL.md +0 -79
  223. package/skills/skill-craft/SKILL.md +0 -109
  224. package/skills/soul-craft/SKILL.md +0 -116
@@ -1,303 +1,157 @@
1
- # Execution targets and shared wake delivery
2
-
3
- Implementation agreement, 2026-09-05. Lead owns native runtime launch,
4
- local tmux/Herdr adapters and terminal input; oats owns server registration,
5
- remote CLI routing and Desktop target selection. Aweb owns the event listener,
6
- notification state and delivery policy through OATS terminal input. This is the implementation
7
- contract, not a claim that these features have shipped.
8
-
9
- OATS manages composition, worktrees, capability lifecycle and retirement on the execution
10
- host. A session backend manages the persistent terminal. Desktop is a client;
11
- closing it must stop neither the agent nor notification delivery.
12
-
13
- ```mermaid
14
- flowchart LR
15
- UI[Desktop] --> CLI[OATS CLI]
16
- CLI --> Local[Local OATS]
17
- CLI --> SSH[OpenSSH]
18
- SSH --> Remote[Remote OATS]
19
- Local --> Sessions[tmux or Herdr]
20
- Remote --> RemoteSessions[tmux or Herdr]
21
- Events[aweb SSE] --> Wake[aweb wake service on execution host]
22
- Wake --> Local
23
- RemoteWake[aweb wake service on remote host] --> Remote
24
- ```
25
-
26
- Server registrations live in the operator's machine configuration, outside
27
- repository configuration. Each entry has an id, label, OpenSSH host alias,
28
- absolute workspace path and OATS/Herdr executable paths. SSH owns key selection,
29
- host verification and authentication. Registration stores no private keys.
30
- Remote lifecycle calls invoke the remote installed OATS CLI with argument-safe
31
- quoting and the same JSON envelope as local calls. Version/envelope compatibility
32
- is checked before mutation. Repository operations always run on that host.
33
-
34
- The local representation of a remote instance snapshots its route:
35
-
36
- ```json
37
- {
38
- "serverId": "build-server",
39
- "target": {
40
- "sshHost": "build-server",
41
- "workspace": "/srv/team",
42
- "oatsPath": "/usr/local/bin/oats",
43
- "herdrPath": "/usr/local/bin/herdr"
44
- },
45
- "instance": "developer-fix",
46
- "home": "/srv/team/agents/developer/instances/developer-fix"
47
- }
48
- ```
49
-
50
- `serverId` is for display. Later inspect/retire operations use the snapshot,
51
- never silently resolve a changed registry entry. A local cache is not authority
52
- for the remote instance's state. Remote status is pulled from its owning kernel.
53
-
54
- The host's instance and independent retirement baseline retain the same local
55
- session receipt. Existing `tmux: {session, window, socket}` remains readable.
56
- New Herdr instances use:
57
-
58
- ```json
59
- {
60
- "backend": "herdr",
61
- "binary": "/usr/local/bin/herdr",
62
- "socket": "/home/operator/.config/herdr/sessions/oats/herdr.sock",
63
- "workspaceId": "w1",
64
- "paneId": "w1:p1",
65
- "terminalId": "term_65ab9108c6c301",
66
- "protocol": 20
67
- }
68
- ```
69
-
70
- The terminal id distinguishes a replacement occupant after a server restart.
71
- Backend operations allocate, start, inspect, stop and attach a viewer. Retirement
72
- compares the receipt with its baseline and proves the original session absent.
73
- An unavailable server or failed inspection is not proof of absence. The same
74
- rule applies to spawn compensation and detached self-retirement. Lifecycle
75
- operations run on the target host, so the local backend does not implement SSH.
76
-
77
- Herdr 0.8.2 exposes snapshots, socket commands, agent-state inspection and JSONL
78
- terminal observation/control. Its protocol is versioned. Agent prompts reject
79
- approval-blocked agents, but prompting a working agent does not prove the new
80
- message was processed. The adapter must retain this distinction. See the
81
- [Herdr socket API](https://herdr.dev/docs/socket-api/) and
82
- [remote connections](https://herdr.dev/docs/persistence-remote/).
83
-
84
- An aweb host service owns event streams for managed instances; the GUI displays
85
- and controls it. Reuse aweb's existing authenticated event/run loop rather than copying credential
86
- and SSE parsing into OATS or Desktop. OATS exposes backend-neutral session
87
- inspection and literal terminal input; aweb supplies delivery policy. Current authorization is
88
- per identity: one long-lived stream per active identity, coalesced per instance,
89
- with bounded retries. A single team stream requires an explicit server API.
90
- Reconnect also checks pending state so a lost edge does not strand unread work.
91
-
92
- Delivery is a fixed instruction to check `aw` mail/chat from the instance home,
93
- not arbitrary sender content typed into a shell. The service never acknowledges
94
- mail or chat on the agent's behalf. Aweb pending hints survive reconnect and service
95
- restart, coalesce while busy and defer at approval prompts. A stopped harness,
96
- an unknown occupant or a fallback shell is not a delivery target. Do not call a
97
- successful terminal write an agent acknowledgement.
98
-
99
- Native channels remain selectable during qualification; session delivery must
100
- be exclusive with them for each instance. Removal follows real tests of Pi,
101
- Claude and Codex receiving mail/chat, a busy turn, an approval prompt, reconnect,
102
- service restart, GUI closure and a stopped runtime. The OATS Pi tool extension
103
- and the aweb Pi channel are separate packages; replacing notification transport
104
- does not silently remove unrelated tools.
105
-
106
- Acceptance includes local CLI/Desktop spawn, reattach, preserved work and
107
- retirement through both backends; then the same operations on a user-designated
108
- SSH target. Registering a host without a successful remote agent run does not
109
- qualify remote support.
110
-
111
- ## Session CLI contract
112
-
113
- Run on the execution host:
1
+ # Sessions
2
+
3
+ A **session** is the terminal in which an instance's harness runs. OATS
4
+ composes the instance home ([souls-and-instances.md](souls-and-instances.md)),
5
+ then launches the harness in a persistent terminal owned by a session backend.
6
+ Closing a viewer, or the Desktop, stops neither the agent nor its session.
7
+
8
+ All session commands run on the execution host, the machine that holds the
9
+ home. To run them on another machine, see [servers.md](servers.md).
10
+
11
+ ## Harnesses
12
+
13
+ | Harness | `--harness` | Launched as |
14
+ |---|---|---|
15
+ | pi | `pi` (the default) | `pi --append-system-prompt <home>/AGENTS.md --approve --name <instance> [--model m] @TASK.md` |
16
+ | Claude Code | `claude` | `claude [--model m] -- "$(cat TASK.md)"` |
17
+ | Codex | `codex` | `codex --cd <home> [--model m] -- "$(cat TASK.md)"` |
18
+
19
+ Each harness starts in the instance home with its own native settings,
20
+ authentication and skill discovery. The command line also carries the
21
+ launch configuration's arguments and each capability's launch contribution.
22
+ `--runtime` is still read as `--harness`, with a deprecation warning; giving
23
+ both with different values is refused.
24
+
25
+ The harness, model, yolo choice and executable come from the spawn flags or a
26
+ named launch configuration (`--launch-config <name>`); see
27
+ [configuration.md](configuration.md#launch-configurations).
28
+ `--model @native-default` uses the harness's own default model.
29
+
30
+ The launch command sets `OATS_INSTANCE`, `OATS_INSTANCE_HOME`,
31
+ `PI_AGENT_INSTANCE` and `PI_AGENT_HOME`, plus the environment that the launch
32
+ configuration and capabilities contribute. The home's layout and what those
33
+ variables point at are described in
34
+ [souls-and-instances.md](souls-and-instances.md#instance-anatomy).
35
+
36
+ ## Backends
37
+
38
+ `oats spawn --backend tmux|herdr` chooses the backend (default `tmux`). The
39
+ backend binary must be installed on the execution host. The chosen session
40
+ target is recorded twice: in `instance.json` and in an independent lifecycle
41
+ receipt. Every session command checks that the two agree
42
+ (`E_RUNTIME_AUTHORITY_MISMATCH` otherwise).
43
+
44
+ ### tmux
45
+
46
+ Each instance is a window named after the instance in the tmux session
47
+ `pi-agents` (override with `PI_AGENTS_TMUX_SESSION`). The receipt records the
48
+ session, window and socket. The spawn result prints the attach command.
49
+
50
+ ### Herdr
51
+
52
+ Each instance is a Herdr workspace with one pane. The receipt records the
53
+ binary, socket, workspace id, pane id, terminal id and protocol. The terminal
54
+ id distinguishes a replacement occupant of the same pane.
55
+
56
+ - `--herdr-socket <path>` uses an operator-managed Herdr server. OATS never
57
+ starts a different server when that socket cannot be inspected.
58
+ - Without it, OATS uses `$XDG_CONFIG_HOME/herdr/sessions/oats/herdr.sock`
59
+ (default `~/.config/...`) and starts `herdr --session oats server` if no
60
+ server is running there.
61
+ - The adapter speaks the Herdr socket API at an explicit protocol version,
62
+ with no negotiation. New sessions use protocol 20. A recorded session target
63
+ may carry protocol 20 or 22, and each call checks that the server's snapshot
64
+ reports the recorded protocol.
65
+
66
+ ## Lifecycle
67
+
68
+ | Command | Effect |
69
+ |---|---|
70
+ | `oats spawn <soul> [--no-launch]` | Creates the home and launches the harness. `--no-launch` creates the home only. |
71
+ | `oats session start --home <abs>` | Starts a stopped or never-launched instance again in its existing home. |
72
+ | `oats session restart --home <abs>` | Stops the running harness and starts it again in place. |
73
+ | `oats instance stop <instance> --plan` / `--apply` | Stops the harness and keeps home, work and launch recipe. |
74
+ | `oats retire <instance>` | Ends the session and retires the instance ([souls-and-instances.md](souls-and-instances.md#retire)). |
75
+
76
+ ### Start and restart
77
+
78
+ `session start` keeps the instance's identity, work tree and notes. It runs no
79
+ spawn hooks and creates no new home. It runs the recorded launch recipe on the
80
+ recorded tmux session or Herdr server; a `--no-launch` home starts on the
81
+ default tmux server.
82
+
83
+ - `--model`, `--launch-config <name>|none`, `--harness` and `--yolo` /
84
+ `--no-yolo` re-resolve the recipe against the home's recorded context and
85
+ run every check before anything starts. `--model` replaces the recorded model
86
+ for this and later starts.
87
+ - A live harness is refused (`E_SESSION_RUNNING`). A fallback shell or a dead
88
+ pane is reused in place; a missing window or a lost tmux server is recreated.
89
+ - A state that cannot be established is refused (`E_SESSION_UNKNOWN`). Two
90
+ starts of one home serialize (`E_SESSION_START_BUSY`). A home being retired
91
+ is refused (`E_INSTANCE_RETIRING`).
92
+
93
+ `session restart` takes the same flags. It sends SIGTERM to the harness and
94
+ its children, waits `--stop-grace <seconds>` (default 20, at most 300), then
95
+ starts in place. It never escalates: a harness still running is reported
96
+ (`E_SESSION_STOP_FAILED`) and nothing is launched.
97
+
98
+ ### Stop
99
+
100
+ `oats instance stop <instance> --plan` reports the session state, recorded
101
+ children and uncommitted work, with a `planRevision`. `--apply --plan-revision
102
+ <rev> --idempotency-key <key>` stops the instance and its recorded children
103
+ first (`--no-recursive` stops only the instance), with the same bounded
104
+ SIGTERM. Restart the instance later with `oats session start` or
105
+ `oats session restart`.
106
+
107
+ ### Inspect, input and attach
114
108
 
115
109
  ```sh
116
- oats session attach --home /absolute/instance
117
- oats session inspect --home /absolute/instance --json
118
- oats session input --home /absolute/instance --text-file /path/to/message --json
119
- printf '%s' 'Check your pending work.' | oats session input --home /absolute/instance --json
120
- oats session start --home /absolute/instance [--model <id>] --json
110
+ oats session inspect --home /abs/home --json
111
+ oats session input --home /abs/home --text-file message.txt --json
112
+ oats session attach --home /abs/home
121
113
  ```
122
114
 
123
- `start` runs a STOPPED instance again in its existing home: same identity,
124
- worktree, notes and launch environment, no spawn hooks, no new home. It reuses
125
- the persisted launch command, on the recorded tmux session and socket or the
126
- recorded Herdr server, and records the new session target in the instance
127
- metadata and the independent lifecycle receipt (whose home and work
128
- fingerprints are untouched, so a later retire still preserves everything
129
- changed since the original spawn). `--model` replaces the recorded model for
130
- this and later starts by re-rendering the persisted command; a command shape
131
- OATS did not generate is refused rather than rewritten. A quarantined home or one whose self-retirement is in progress is refused (`E_INSTANCE_RETIRING`). A live harness is
132
- refused (`E_SESSION_RUNNING`); a fallback shell with no harness descendant
133
- and a dead pane restart in that exact pane, a missing window opens again, and
134
- a lost tmux server after a reboot is recreated on the recorded socket. A state
135
- that cannot be established refuses (`E_SESSION_UNKNOWN`). Every observation
136
- happens under a per-home guard, so two starts of one home serialize
137
- (`E_SESSION_START_BUSY`). Each launch retains `.oats-start-pending.json`
138
- with its target and unique id. The wrapper writes that id to
139
- `.oats-start-exited` only when the saved command returns. A shell without
140
- the matching exit marker is still starting and cannot be respawned by a
141
- second caller. This also covers shell-only harness initialization; it needs
142
- no background monitor. The next start reconciles the complete receipt before
143
- the ordinary metadata check: a
144
- target that is present is recorded and adopted; an exited target is reconciled
145
- before restarting, and an unobservable target or malformed receipt refuses
146
- and keeps the receipt. Recovery is idempotent for an already-recorded launch
147
- and never silently applies a new model to an
148
- already-running harness. A never-launched legacy Herdr home without a saved
149
- server endpoint requires that endpoint to be configured before it can start;
150
- it does not fall back to tmux.
151
- Directory-mode starts and restarts also authenticate the home and owned work
152
- root against the independent spawn receipt (mode, canonical home, device/inode
153
- identities). Checks run before resolving mutable home contents, after **each**
154
- launch hook/preparation and immediately before backend observations, stops,
155
- allocations and launch-state writes. A missing/file/symlink/exchanged root or
156
- mode disagreement fails with `E_WORK_INSPECTION_FAILED`; substituted targets
157
- are neither followed for launch nor removed for lock cleanup. Restore the
158
- original owned roots before retrying; pending receipts remain with them.
159
- These pathname checks are not OS-level exclusion against a concurrent hostile
160
- filesystem mutation between validation and use.
161
-
162
- Managed execution also records independent native transcript-location history;
163
- the recipe remains a template, not provenance.
164
-
165
- The start opens a new harness conversation on the instance's `TASK.md`; the
166
- instance resumes its work from its own `STATE.md`, as the knowledge protocol
167
- prescribes.
115
+ - **inspect** reports `backend`, `present` and `state`: the Herdr agent state
116
+ when available, `unknown` for a live harness, `shell` for a fallback shell,
117
+ `stopped` for an absent or dead terminal, or `not-launched`. An unavailable
118
+ backend is an error (`E_SESSION_UNAVAILABLE`), never a stopped result.
119
+ - **input** submits UTF-8 text (stdin or `--text-file`, at most 256 KiB, no
120
+ NUL) followed by Enter: bracketed paste in tmux, `pane run` in Herdr. The
121
+ text is never run by a shell. A fallback shell, a stopped session or a split
122
+ tmux window is refused. `submitted: true` means the terminal accepted the
123
+ text, not that the agent processed it. Wake schedules and messaging
124
+ capabilities use this command ([schedules.md](schedules.md)).
125
+ - **attach** is interactive and takes no `--json`. It opens a Herdr terminal
126
+ viewer, or a temporary tmux session linked to the agent's window alone.
127
+ Closing the viewer leaves the agent running.
168
128
 
169
- `attach` is interactive and does not accept `--json`. It validates the saved
170
- endpoint on the execution host, then opens a Herdr terminal viewer or an
171
- isolated tmux session linked to that agent's window alone. Closing its terminal
172
- cleans the viewer without stopping the agent; retiring the agent ends the viewer
173
- instead of switching it to a sibling. This host-local command is also the
174
- remote Desktop attachment seam over an SSH PTY.
129
+ ### Attachments
175
130
 
176
- Input accepts UTF-8 text up to 256 KiB, with no NUL bytes. The CLI uses the
177
- independent lifecycle receipt and refuses metadata disagreement. Tmux uses
178
- literal bracketed paste followed by Enter. Herdr uses pane input followed by
179
- Enter. Neither path interprets message text as a shell command. A fallback
180
- shell or ambiguous split tmux window refuses automatic input.
131
+ `oats session upload --file <local> --home <abs>` copies a file into
132
+ `<home>/.oats-attachments/` (directory mode 0700, file mode 0600, `name-2` on
133
+ collision, at most 64 MiB) and answers `{path, bytes, sha256}`. The caller
134
+ gives `path` to the agent; nothing is typed into the session. Attachments are
135
+ removed with the home.
181
136
 
182
- Success uses the existing envelope:
137
+ ## The task prompt
183
138
 
184
- ```json
185
- {"schemaVersion":1,"ok":true,"result":{"home":"/absolute/instance","backend":"herdr","present":true,"state":"idle","submitted":true}}
186
- ```
139
+ Spawn writes `TASK.md` in the home: the instance's name, soul, home and work
140
+ tree, followed by the `--task` or `--task-file` text, or a note to await
141
+ instructions when no task is given. Every launch, including `session start`
142
+ and `restart`, opens a new harness conversation on `TASK.md`. The instance
143
+ resumes its work from its own state files, as its knowledge capability
144
+ prescribes.
187
145
 
188
- Inspect omits `submitted`; optional backend identifiers describe the observed
189
- terminal. `state` is the Herdr agent state when available, `unknown` for a live
190
- unclassified harness, `shell` for a fallback shell, `stopped` for an absent/dead
191
- terminal, or `not-launched`. Errors use `ok:false,error:{code,message}` and a
192
- nonzero exit. An unavailable backend is an error, never a stopped result.
193
- Tmux receipts identify socket/session/window; automatic input requires one live
194
- pane in that exact window. Herdr additionally verifies the original terminal ID.
195
- The broker owns busy/approval policy and must not interpret `submitted` as
196
- processing acknowledgement.
146
+ ## Permissions (yolo)
197
147
 
198
- ### Attachments
148
+ Yolo is chosen per launch: `--yolo` / `--no-yolo` on `oats spawn`,
149
+ `oats session start` and `oats session restart`, or the `yolo` field of a
150
+ named launch configuration. The flag overrides the configuration. A soul never
151
+ carries it. With no choice, a spawn keeps the harness's native policy, and a
152
+ start keeps what the home recorded.
199
153
 
200
- A viewer that drops a file or pastes an image gives the agent a path, never
201
- terminal input. `oats session upload --file <local> --home <abs>` stores a
202
- copy as a private file under `<home>/.oats-attachments/` (directory 0700,
203
- file 0600, `name-2` on collision) and answers `{path, bytes, sha256}`; the
204
- caller pastes `path` into the still-live session itself. With `--server <id>`
205
- and `--instance <name>` (or `--home`), the same saved route as attach is
206
- resolved, the remote must list `session-upload` in both its `remote` and
207
- `features` probe arrays, and the bytes travel on ssh stdin into `oats session
208
- receive --home <abs> --name <file>` on the execution host. Each side holds
209
- the whole file in memory up to the 64 MiB kernel bound (this is a bounded
210
- transfer, not end-to-end streaming); the receiver reads stdin event-driven,
211
- refuses above the bound before writing, and allocates the destination
212
- exclusively (`name-2`, `name-3` when taken), so simultaneous uploads of one
213
- name never overwrite each other and a planted symlink is never followed. The
214
- attachments directory must be a real directory inside the home. The local
215
- side refuses the result unless the remote's size and sha256 equal the local
216
- file's. A remote file is never a local path over SSH. Attachments live and
217
- die with the home.
218
-
219
- Capability spawn hooks register a pending home before runtime allocation;
220
- inspection becomes available once its receipt is persisted. Retire hooks
221
- unregister after quiescence. The broker must tolerate this lifecycle order and
222
- missing homes, and persist pending hints until handled. Kernel session operations
223
- contain no aweb identity, credentials, stream or notification logic.
224
-
225
- The portable integration belongs to the official `oats.aweb` capability.
226
- The aweb development deployment currently selects its owned `aweb.identity`
227
- capability; that deployment-specific choice does not change the broker interface
228
- and needs equivalent registration glue when switched to session delivery.
229
-
230
- ## Shared permission setting
231
-
232
- The opt-in is per launch: `oats spawn --yolo` / `--no-yolo`, the `yolo` of a
233
- named launch configuration (`oats launch-config set <name> --file <json>`),
234
- or the Desktop's per-launch choice. A soul does not carry it: `soul.yaml` has
235
- no `yolo`. With no setting, native policy is retained, and the spawn flag
236
- overrides any configured value.
237
-
238
- Launch configurations are host-level: `oats launch-config set` writes them to
239
- the `launch-configs:` block of the deployment's `oats-local.yaml`, the one
240
- place the kernel reads them from ([configuration.md](configuration.md)). A
241
- scope's `oats-config.yaml` declaring `launch-configs:` is refused with a message
242
- naming the move. The scope-level `yolo:` of `oats-config.yaml` is removed in
243
- 0.26.0 with the config chain (lead decision c3-4): yolo is chosen only by
244
- `--yolo` / `--no-yolo` on `oats spawn`, `oats session start` and
245
- `oats session restart`, or by the `yolo` of a named launch configuration. It is
246
- not a soul field either (lead decision c3-q Q6): `soul.yaml` has no `yolo`.
247
-
248
- Autonomous or unattended execution is not permission to synthesize `yolo: true`.
249
- Explicit user CLI/UI input or a user-selected configuration is the opt-in; explicit
250
- `false` remains false.
251
-
252
- Only for an explicitly resolved true setting does OATS add Codex `--yolo` plus
253
- launch-local project trust, or Claude `--dangerously-skip-permissions`. `--no-yolo` removes the
254
- OATS-added bypass flags while native settings stay in force. Instance metadata
255
- records the resolved choice; this policy does not rewrite frozen recipes, live
256
- configuration or already-running sessions.
257
-
258
- Claude Code and Codex use their ordinary native context, skills, settings, plugins,
259
- profile and authentication. OATS still builds the complete ordinary instance home:
260
- resolved skills, capabilities and resources, canonical AGENTS plus its CLAUDE alias,
261
- task, metadata and normal work placement. Resolution, approvals and lifecycle hooks
262
- are not skipped; normal native launch is not an empty/no-capability mode. Only outside
263
- native context/skill coexistence is relaxed: OATS does not impose an OATS-only ambient
264
- view or route these runtimes through the Pi SDK. Pi's selected strict SDK profile is unchanged. OATS
265
- composition integrity/provenance, source/helper authority, record attribution and
266
- guards, and admission/retry obligations remain separate and required; normal native
267
- context alone is not a Claude/Codex qualification failure.
268
-
269
- Desktop remote terminal requests contain only the server id and instance name.
270
- The selected installed CLI resolves the saved route and performs remote
271
- inspection before attaching over SSH. Pending inspections share the terminal
272
- resource limit and duplicate requests share one inspection. Remote status and
273
- instance keys must include the server so identical paths on different hosts
274
- remain distinct.
275
-
276
- ## Desktop remote roster and lifecycle
277
-
278
- Desktop uses the installed CLI's `server roster --json` feature when advertised.
279
- It refreshes one aggregate roster at a time, independently of terminal traffic;
280
- the CLI owns SSH deadlines, server registration and saved routes. Each target
281
- appears in the workspace selector with its souls and instances. An unreachable
282
- target stays visible with unknown runtime state and an error. A saved route
283
- remains visible after its registration is removed or changed.
284
-
285
- Choose the server workspace to spawn one of its souls. A successful launch
286
- switches to that workspace and opens the instance terminal once it appears in
287
- the roster. The instance action menu offers harvest and retirement, including
288
- for stopped agents. Remote harvest runs in the saved home on the execution host;
289
- retirement uses the same saved route and work-preservation rules as the CLI.
290
- Closing a viewer leaves the agent running.
291
-
292
- Desktop retirement requires the CLI's `retire-home` feature and always sends
293
- the exact selected home. The remote kernel must support that feature too;
294
- older kernels require an upgrade before the GUI can retire an instance.
295
- This keeps same-named instances distinct. Retirement feedback reports every
296
- preserved recovery path and its classes, including an incomplete cleanup.
297
-
298
- This first projection enables terminal and lifecycle actions only for remote
299
- instances with a route saved on this machine. Other observed instances are
300
- listed, but require the execution host's CLI to manage them. Remote brain files
301
- are accessed through the terminal. The roster and remote harvest require CLI
302
- feature tokens `roster` and `harvest`; the published 0.22.2 kernel has remote
303
- spawn, status, retirement and terminals, but not these two additions.
154
+ When yolo is true, OATS adds `--dangerously-skip-permissions` for Claude Code,
155
+ and `--yolo` plus trust for the instance home for Codex. pi takes no flag.
156
+ `--no-yolo` removes only those added flags; native settings stay in force.
157
+ Unattended execution never implies yolo.
@@ -1,12 +1,8 @@
1
1
  # Run your first OATS team
2
2
 
3
- > **Workspace model (0.25).** This page is the v2 first-team guide. The 0.24
4
- > surface it used to describe (`oats-config.yaml`, `oats init` / `install` /
5
- > `use` / `trust`, the 0.24 `oats onboard --dir` bootstrap that created a local
6
- > `oats-setup-expert`) no longer exists; those verbs answer `E_UNKNOWN_COMMAND`
7
- > naming their replacement. Model: [workspaces.md](workspaces.md) ·
8
- > packages: [packages.md](packages.md) · the deployment layout this page
9
- > creates: [configuration.md](configuration.md).
3
+ The model is in [workspaces.md](workspaces.md), packages in
4
+ [packages.md](packages.md), and the deployment layout this page creates in
5
+ [configuration.md](configuration.md).
10
6
 
11
7
  Start with one workspace, one member repository and one small, real task. A
12
8
  soul keeps the role and its curated skills; an instance gets a working session
@@ -31,9 +27,9 @@ node --version && tmux -V && oats version --json # features must list workspac
31
27
  Three files, all committed ([workspaces.md](workspaces.md) shows each field):
32
28
 
33
29
  - `oats-workspace.yaml` (`schemaVersion: 2`) in **one** host repository: `name`,
34
- `members: [<repo ref>, …]`, `teams:`, `packages: { oats.framework: v<x>, … }`,
30
+ `members: [<repo ref>, …]`, `teams:` (the shared teams), `packages: { oats.framework: v<x>, … }`,
35
31
  `defaults:`. A member is a repo ref, never a revision.
36
- - `oats-membership.yaml` (`{ schemaVersion: 2, workspace: <host ref>, team? }`)
32
+ - `oats-membership.yaml` (`{ schemaVersion: 2, workspace: <host ref> }`)
37
33
  in **every** member — the backlink half of the handshake. A repo listed
38
34
  without a backlink is `no-backlink` and contributes nothing.
39
35
  - `souls/<name>/soul.yaml` (`schemaVersion: 2`) in the member that owns the
@@ -43,8 +39,9 @@ Three files, all committed ([workspaces.md](workspaces.md) shows each field):
43
39
 
44
40
  The smallest real setup is one repository that is host **and** member: it
45
41
  carries the workspace file, its own `oats-membership.yaml` pointing at itself,
46
- one soul and, optionally, one capability. Every soul gets `oats.core` from the
47
- `oats.framework` package by default.
42
+ one soul and, optionally, one capability. Give every soul `oats.core` with
43
+ `defaults: { capabilities: { oats.core: { from: package } } }` and an
44
+ `oats.framework` pin.
48
45
 
49
46
  ## 2. Realize it on this machine — `oats onboard`
50
47
 
@@ -83,20 +80,37 @@ Host-owned provider values (absolute paths, state roots) go under `settings:` in
83
80
  `oats-local.yaml` afterwards — never in the workspace file, whose schema refuses
84
81
  them. Do not commit `oats-local.yaml`.
85
82
 
86
- ## 3. Look before you spawn
83
+ ## 3. Give the deployment a team
84
+
85
+ With a messaging capability in the soul's composition, every instance lives in
86
+ a team, and readiness fails with `E_TEAM_UNCONFIGURED` until there is a
87
+ default. Create the team with your messaging provider (its own docs say how;
88
+ for `oats.aweb`, see its skills), then record it here:
89
+
90
+ ```bash
91
+ oats teams add research --team <provider team id> # a local team; the first one becomes the default
92
+ oats teams # shared and local teams, and the default
93
+ ```
94
+
95
+ A team the whole workspace uses is committed as a **shared** team in
96
+ `oats-workspace.yaml`; which souls join which team on this machine is
97
+ `oats soul teams` ([workspaces.md](workspaces.md#teams)). Without messaging,
98
+ skip this step.
99
+
100
+ ## 4. Look before you spawn
87
101
 
88
102
  ```bash
89
- oats souls # every non-private soul of every confirmed member, with origin and team
103
+ oats souls # every soul of every confirmed member, with origin and its teams here
90
104
  oats capabilities # member (origin: member <key> @ <commit>) and package (package <id> v<ver>) capabilities
91
105
  oats workspace status # membership table, locked packages
92
- oats spawn backend-expert --preview # modules[] with from/commit/changedSince, composed skill names, team
106
+ oats spawn backend-expert --preview # modules[] with from/commit/changedSince, composed skill names, teams + default
93
107
  ```
94
108
 
95
109
  The preview is where a skill-name clash between two composed capabilities
96
110
  (`E_SKILL_DUPLICATE`) or a package missing from the lock (`E_PACKAGE_MISSING`)
97
111
  shows up, before anything is created.
98
112
 
99
- ## 4. Give an instance a real task
113
+ ## 5. Give an instance a real task
100
114
 
101
115
  ```bash
102
116
  oats spawn backend-expert --purpose first-fix --task "Fix one small issue, run the relevant checks, commit the code change, and report what changed."
@@ -116,7 +130,7 @@ Instance-specific provider values belong to the spawn:
116
130
  `oats spawn <soul> --provider <cap> key=value` (repeatable; dotted keys nest),
117
131
  recorded under `instance.json.providers.<cap>`.
118
132
 
119
- ## 5. Judge and retire
133
+ ## 6. Judge and retire
120
134
 
121
135
  Review the instance's code through the repository's ordinary PR workflow. Then:
122
136
 
@@ -134,7 +148,7 @@ soul's `capabilities:`.
134
148
  ## The standalone case
135
149
 
136
150
  If you can read a member repository but not its workspace host (a public member
137
- of a privately hosted workspace — decision 26), point `oats-local.yaml` at the
151
+ of a privately hosted workspace), point `oats-local.yaml` at the
138
152
  member: `oats sync` and `oats spawn` then give the **standalone view** — the
139
153
  repo's own souls with their `from: here` capabilities plus `oats.core`, marked
140
154
  `standalone: true` in `sync --json` and `instance.json.workspace.standalone`.