@awebai/oats 0.68.1 → 0.69.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 (99) hide show
  1. package/bin/oats.mjs +180 -36
  2. package/docs/capabilities.md +73 -10
  3. package/docs/capability-manifest.schema.json +1 -1
  4. package/docs/configuration.md +68 -2
  5. package/docs/design/2026-09-23-workspace-module-contracts.md +6 -4
  6. package/docs/design/2026-10-22-module-upgrade.md +1 -1
  7. package/docs/desktop-cli-api.md +600 -25
  8. package/docs/desktop-instance-start.md +59 -3
  9. package/docs/desktop.md +175 -10
  10. package/docs/execution-targets.md +536 -62
  11. package/docs/harness-trust.md +3 -1
  12. package/docs/implementation.md +33 -15
  13. package/docs/integrations.md +2 -2
  14. package/docs/knowledge.md +25 -16
  15. package/docs/oats-local.schema.json +2 -2
  16. package/docs/official-catalog.md +6 -5
  17. package/docs/packages.md +14 -14
  18. package/docs/release-notes/v0.69.0.md +658 -0
  19. package/docs/release-notes/v0.69.1.md +25 -0
  20. package/docs/release-notes/v0.69.2.md +259 -0
  21. package/docs/servers.md +51 -7
  22. package/docs/soul.schema.json +1 -0
  23. package/docs/souls-and-instances.md +46 -9
  24. package/docs/tui.md +177 -21
  25. package/docs/upgrading.md +16 -7
  26. package/docs/workspaces.md +2 -2
  27. package/injects/instance-boundary.md +19 -33
  28. package/injects/work-attached.md +8 -13
  29. package/injects/work-checkout.md +16 -30
  30. package/injects/work-directory.md +9 -15
  31. package/injects/work-workspace.md +8 -19
  32. package/injects/work-worktree.md +18 -33
  33. package/lib/capability-contract.mjs +2 -2
  34. package/lib/core.mjs +496 -127
  35. package/lib/file-pieces.mjs +49 -0
  36. package/lib/instance-background.mjs +54 -0
  37. package/lib/instance-events.mjs +25 -4
  38. package/lib/instance-inspect.mjs +3 -0
  39. package/lib/instance-lifecycle.mjs +35 -0
  40. package/lib/instance-resolution.mjs +3 -2
  41. package/lib/instance-same-work.mjs +67 -0
  42. package/lib/instance-upgrade.mjs +18 -0
  43. package/lib/launch-prompt-fixtures/README.md +62 -0
  44. package/lib/launch-prompt-fixtures/resume-confirmation.json +32 -0
  45. package/lib/launch-prompt-fixtures.mjs +49 -0
  46. package/lib/launch-prompt-resume.mjs +55 -0
  47. package/lib/login-environment.mjs +27 -9
  48. package/lib/materialize.mjs +23 -2
  49. package/lib/resolve.mjs +32 -5
  50. package/lib/schedule.mjs +3 -3
  51. package/lib/servers.mjs +136 -27
  52. package/lib/session-end.mjs +82 -0
  53. package/lib/session-input.mjs +43 -9
  54. package/lib/session-resume-contract.mjs +33 -0
  55. package/lib/session-resume.mjs +337 -0
  56. package/lib/session-seen.mjs +163 -0
  57. package/lib/session-viewer.mjs +147 -44
  58. package/lib/soul-composition.mjs +15 -11
  59. package/lib/start-env.mjs +110 -0
  60. package/lib/tmux-server-scope.mjs +139 -14
  61. package/lib/workspace.mjs +41 -6
  62. package/package-catalog.json +11 -5
  63. package/package.json +1 -1
  64. package/packages/client/cli-adapter.mjs +39 -8
  65. package/packages/client/cli-locator.mjs +3 -2
  66. package/packages/client/deployment-data.mjs +16 -0
  67. package/packages/client/deployment-panel.mjs +7 -0
  68. package/packages/client/file-output-exec.mjs +98 -0
  69. package/packages/client/instance-tree.mjs +64 -14
  70. package/packages/client/launch-prompt-outcome.mjs +25 -13
  71. package/packages/client/own-codes.mjs +2 -0
  72. package/packages/client/panel-views.mjs +11 -3
  73. package/packages/client/remote-roster.mjs +5 -1
  74. package/packages/client/roster-sections.mjs +50 -6
  75. package/packages/client/same-work.mjs +49 -0
  76. package/packages/client/session-attach.mjs +35 -5
  77. package/packages/client/session-resume-cli.mjs +64 -0
  78. package/packages/client/session-resume-trigger.mjs +167 -0
  79. package/packages/client/session-resume.mjs +332 -0
  80. package/packages/client/soul-rows.mjs +2 -0
  81. package/packages/client/spawn-apply-contract.mjs +2 -1
  82. package/packages/client/spawn-decision.mjs +4 -1
  83. package/packages/client/spawn-preview-contract.mjs +12 -1
  84. package/packages/client/spawn-preview.mjs +2 -0
  85. package/packages/client/tmux-status.mjs +30 -7
  86. package/packages/client/waiting-on-you.mjs +11 -4
  87. package/packages/client/workspace-step.mjs +17 -5
  88. package/packages/record/lib/last-conversation.mjs +123 -0
  89. package/packages/record/lib/session-roots.mjs +10 -1
  90. package/packages/tui/README.md +2 -2
  91. package/packages/tui/lib/client.mjs +7 -3
  92. package/packages/tui/lib/main.mjs +49 -14
  93. package/packages/tui/lib/model.mjs +146 -55
  94. package/packages/tui/lib/store.mjs +84 -27
  95. package/packages/tui/lib/term/text.mjs +12 -9
  96. package/packages/tui/lib/views/frame.mjs +74 -7
  97. package/packages/tui/lib/views/help.mjs +10 -3
  98. package/packages/tui/lib/views/instances.mjs +41 -3
  99. package/skills/oats-getting-started/SKILL.md +117 -4
@@ -1,42 +1,27 @@
1
1
  ## Work mode: worktree
2
2
 
3
- Your `./work` is a **git worktree on your own branch** — a full checkout that is
4
- yours alone: build, test and commit there, on your branch.
3
+ Your `./work` is a **git worktree on your own branch**, yours alone: build,
4
+ test and commit there.
5
5
 
6
- - **Never work in a shared checkout** (the repo's main checkout, or any clone
7
- others use): don't edit, commit or switch branches there. A clone is touched
8
- only through `oats worktree add`/`remove` below. If unsure, `pwd`.
9
- - Everything you change happens in `work/` or your extra trees — **including your
10
- own soul** when it lives in this repo: soul edits are branch changes, reviewed
11
- and merged like code.
12
- - Leave your branch and the worktree list clean when your task closes.
6
+ - **NEVER work in a shared checkout** (the main checkout, or a clone others
7
+ use). Touch a clone only through `oats worktree add`/`remove`. If unsure, `pwd`.
8
+ - Every repository change, **your own soul included**, is a change on your
9
+ branch or an extra tree's, reviewed and merged like code. Leave your branch
10
+ and worktree list clean at the end.
13
11
 
14
12
  ### Extra trees
15
13
 
16
- When the work needs another branch, or another repository of this deployment,
17
- create an extra tree in your home. Run this from your home; `<base>` is the
18
- remote branch the work starts from (the branch itself, when you rework an
19
- existing one):
14
+ For another branch or repository, from your home (`--preview` first; `--repo
15
+ <member key|clone path>` for another repository; `<base>`: the remote branch
16
+ to start from, or the one you rework):
20
17
 
21
18
  oats worktree add --purpose <purpose> --branch <branch> --base <base>
22
19
 
23
- It makes `.work-<purpose>` in your home, on a new `<branch>` at `origin`'s
24
- `<base>`. The repository is yours unless `--repo <member key|clone path>`
25
- names another; `--preview` shows what it would do.
26
-
27
- - It starts from the remote's current state and moves none of the clone's
28
- refs. Never start a tree from a local branch of the clone, which may be stale.
29
- - Name `<branch>` by the repository's own rules, else `agents/<instance>-<purpose>`.
30
- If it already exists in that clone, `add` refuses: use `<instance>/<branch>`.
31
- Never `-C`/`-B`, which reset a branch someone else may own.
32
- - If a capability of yours sets up new trees, `add` runs that setup, which
33
- may take minutes: give it a long timeout, or run it in the background and
34
- wait for it to exit. A killed `add` rolls back; run it again. Once it has
35
- finished, running it again with the same arguments does nothing.
36
- - The tree has no upstream: push with `git push origin HEAD:<remote-branch>`
37
- (`<base>` when you rework an existing branch).
38
- - Before your task closes, merge each extra tree into your PR branch, or push its
39
- branch and name it in your hand-back; then
40
- `oats worktree remove --purpose <purpose>`, which keeps the branch and
41
- refuses a tree with uncommitted work.
42
- Retirement keeps a tree that still holds uncommitted work, but don't rely on it.
20
+ - Name `<branch>` by the repository's rules, else `agents/<instance>-<purpose>`
21
+ (if taken, `<instance>/<branch>`). Never reset a branch with `-B`/`-C`.
22
+ - `add` may take minutes: use a long timeout; if killed, rerun it.
23
+ - Push with `git push origin HEAD:<remote-branch>` (`<base>` when reworking).
24
+ - Before you finish, merge each tree into your PR branch, or push it and name
25
+ it in your hand-back; then `oats worktree remove --purpose <purpose>`.
26
+ Retirement may keep a tree with uncommitted work; don't rely on it.
27
+ Details: `oats worktree --help`, and `/oats-operate` if you have it.
@@ -181,13 +181,13 @@ const DISPOSABLE_HOME_PREFIX_RE = /^\.[A-Za-z0-9_][A-Za-z0-9._-]*-\*$/;
181
181
  * declaration may not cover them: these exact names, and every exact name
182
182
  * starting with one of these prefixes (the events log; the stop, restart and
183
183
  * start receipts and locks; the rollback marker; AGENTS.md backups; the
184
- * attachments directory; the instance colour, `.oats-color.json`). This is the one list: a new kernel-written top-level
184
+ * attachments directory; the instance colour, `.oats-color.json`; the background record, `.oats-background.json`; the same-work flag, `.oats-same-work.json`). This is the one list: a new kernel-written top-level
185
185
  * home entry MUST be added here and to the `not` patterns of
186
186
  * `retirement.disposable.home` in docs/capability-manifest.schema.json. A
187
187
  * prefix declaration can reach none of them except through `.oats-`, which is
188
188
  * refused whole; `.oats-<provider>` as an exact name stays declarable. */
189
189
  const KERNEL_HOME_NAMES = new Set([".oats", ".agents", ".claude"]);
190
- const KERNEL_HOME_NAME_PREFIXES = [".oats-events", ".oats-stop", ".oats-restart", ".oats-rollback", ".oats-agents-md", ".oats-start", ".oats-attachments", ".oats-color"];
190
+ const KERNEL_HOME_NAME_PREFIXES = [".oats-events", ".oats-stop", ".oats-restart", ".oats-rollback", ".oats-agents-md", ".oats-start", ".oats-attachments", ".oats-color", ".oats-background", ".oats-same-work"];
191
191
 
192
192
  /** Why `root` is not a declarable home entry: "shape" (not one hidden top-level
193
193
  * name or prefix), "kernel-owned", or undefined when it is sound. */