@awebai/oats 0.22.0 → 0.22.1

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 (41) hide show
  1. package/README.md +30 -47
  2. package/bin/oats.mjs +11 -6
  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/oats.json +6 -6
  10. package/capabilities/oats-aweb/skills/LICENSE +21 -0
  11. package/capabilities/oats-aweb/skills/VENDORED.md +26 -0
  12. package/capabilities/oats-aweb/skills/aweb-identity/SKILL.md +201 -0
  13. package/capabilities/oats-aweb/skills/aweb-messaging/SKILL.md +161 -0
  14. package/capabilities/oats-aweb/skills/aweb-messaging/references/messaging-scenarios.md +61 -0
  15. package/capabilities/oats-aweb/skills/aweb-team-membership/SKILL.md +328 -0
  16. package/capabilities/oats-aweb/skills/aweb-team-membership/references/team-membership-reference.md +74 -0
  17. package/capabilities/oats-jira/oats.json +1 -1
  18. package/capabilities/oats-linear/oats.json +1 -1
  19. package/capabilities/oats-okf/agents/memory-harvest/soul.yaml +6 -0
  20. package/capabilities/oats-okf/bin/oats-okf.mjs +82 -51
  21. package/capabilities/oats-okf/oats.json +4 -1
  22. package/capabilities/oats-review/oats.json +1 -1
  23. package/docs/2026-09-03-architecture-proposal.md +642 -0
  24. package/docs/first-team-demo.md +87 -0
  25. package/docs/first-team.md +179 -0
  26. package/docs/integrations.md +83 -65
  27. package/docs/layers.md +356 -80
  28. package/docs/migration-from-oas.md +80 -116
  29. package/docs/release-notes/v0.22.1.md +106 -0
  30. package/lib/core.mjs +255 -363
  31. package/package.json +1 -1
  32. package/packages/record/README.md +76 -16
  33. package/packages/record/docs/turn-record-sot.md +1 -1
  34. package/packages/record/lib/store.mjs +207 -43
  35. package/capabilities/oats-aweb/package.json +0 -20
  36. package/capabilities/oats-jira/package.json +0 -25
  37. package/capabilities/oats-linear/README.md +0 -234
  38. package/capabilities/oats-linear/package.json +0 -29
  39. package/capabilities/oats-linear/test/oats-linear.test.mjs +0 -168
  40. package/capabilities/oats-okf/package.json +0 -22
  41. /package/capabilities/oats-okf/agents/{memory-harvest.md → memory-harvest/AGENTS.md} +0 -0
@@ -1,122 +1,86 @@
1
1
  # Migrating from OAS to OATS
2
2
 
3
- Status: **the migration path exists in the kernel** `oats migrate
4
- --from-oas`, one transactional conversion per scope (plan steps 1–3 below,
5
- all landed 2026-08-21). What remains is distribution: end users get the
6
- command with the v0.22.0 release (steps 4–6). This document keeps the facts
7
- in one place; the work is tracked as epic `aweb-abfy` in this team's aw
8
- tasks. Audited 2026-08-21 against a live OAS deployment
9
- (`@oas-framework/oas@0.20.0-aweb.1`).
10
-
11
- OATS was published as **OAS** (`@oas-framework/oas`, `@oas-framework/pi`)
12
- until the 2026-08-13 rename (commit `fa1e646`), which was a deliberate
13
- clean break: no compatibility shims, and no code in this repo recognizes
14
- `oas-*` names.
15
-
16
- ## Do not migrate by hand yet
17
-
18
- The dangerous property of the original state was that it failed **quietly**:
19
-
20
- - On a scope with `oas-config.yaml`/`oas-lock.json`, `oats status` works
21
- (the `agents/` layout is unchanged) — everything looks healthy.
22
- - But `oats doctor` finds no config, all layers are unresolved, and a spawn
23
- produces instances **without the knowledge (`oas.okf`) and messaging
24
- (`oas.aweb`) injections**. The compounding-memory and team-comms value
25
- disappears with no error.
26
- - `oats migrate --official --dry-run` on such a scope reported "nothing to
27
- migrate" and exited 0 false success.
28
-
29
- Since plan step 1 landed (below), the silence is closed: `oats doctor` names
30
- an un-migrated OAS scope with the remedy, and every `oats migrate` form —
31
- plain or guided, dry run or apply — exits nonzero when `oas-config.yaml` /
32
- `oas-lock.json` are visible from the scope (detection is by name only; the
33
- kernel never parses OAS files).
34
-
35
- ## Migrating: `oats migrate --from-oas`
3
+ OATS is the successor to OAS. **OATS 0.22.0 was published on 2026-09-03**:
4
+ the kernel, Pi adapter, and Desktop assets are available. The published
5
+ kernel acquired the official OKF, aweb, authoring, and development packages
6
+ from its catalog during the 2026-09-05 qualification. You no longer need a
7
+ framework checkout to migrate.
8
+
9
+ Use the migration command rather than renaming files by hand. The OATS
10
+ kernel does not read `oas-*` configuration names or `oas.*` capability IDs.
11
+ An unchanged agent-directory layout can make an old scope look familiar
12
+ while its knowledge and messaging configuration remains unmigrated.
13
+
14
+ ## Upgrade one scope
15
+
16
+ Finish or preserve active work before changing a daily-use deployment.
17
+ Install OATS alongside the old CLI, then inspect the plan for the exact
18
+ scope you intend to convert:
19
+
20
+ ```bash
21
+ npm install -g @awebai/oats@latest
22
+ pi install npm:@awebai/oats-pi@latest
23
+ oats migrate --from-oas --dry-run --dir /path/to/scope
24
+ ```
25
+
26
+ Read any held or unmapped package rows before applying. A dry run reports
27
+ what can be converted; it is not a guarantee that every historical package
28
+ version has a supported replacement. When the plan is correct:
36
29
 
37
30
  ```bash
38
- oats migrate --from-oas --dry-run --dir <scope> # full per-scope plan, touches nothing
39
- oats migrate --from-oas --dir <scope> # convert this scope
40
- oats migrate --from-oas --recursive --dir <root> # every visible OAS scope
31
+ oats migrate --from-oas --dir /path/to/scope
32
+ oats doctor --dir /path/to/scope
41
33
  ```
42
34
 
43
- One transaction per scope, two phases under one journal:
44
-
45
- 1. **Rename phase** `oas-config.yaml` `oats-config.yaml` (line
46
- transform: the `oas:` defaults key becomes `oats:` and capability ids
47
- with catalog renames become their successors; comments and every other
48
- byte survive), `oas-lock.json` → `oats-lock.json` verbatim, `oas.json` →
49
- `oats.json` inside each installed capability dir, and
50
- `.oas-scaffold-owners.json` `.oats-scaffold-owners.json` in `agents/`
51
- and `local-agents/` souls with owner ids mapped to their successors.
52
- 2. **Chained guided conversion** — the existing v1→v2 official migration
53
- runs on the renamed lock; the catalog's renaming aliases map each
54
- `oas.*` entry onto the `oats.*` package that replaces it, re-acquiring
55
- the artifacts (stale v1 integrity is resolved by re-acquisition, never
56
- recomputed) and cleaning the superseded `oas`-named artifact dirs.
57
-
58
- Any failure in either phase restores the scope's original OAS-named bytes.
59
- A second run finds nothing and exits 0. Executable trust is re-earned after
60
- conversion (`oats trust` commands are printed), and comments inside your
61
- config that mention `oas` paths are left untouched — comments are yours.
62
-
63
- ## The four breaks
64
-
65
- 1. **File names.** The kernel reads only `oats-config.yaml`
66
- (`lib/core.mjs:326`) and `oats-lock.json` (`lib/core.mjs:643`). OAS
67
- scopes have `oas-config.yaml`, `oas-lock.json`, `oas.json` inside each
68
- installed capability dir, and `.oas-scaffold-owners.json` in souls.
69
- 2. **The config key.** The schema (`docs/oats-config.schema.json`,
70
- `additionalProperties: false`) accepts an `oats:` defaults block and
71
- rejects the `oas:` block an OAS config carries — renaming the file is
72
- not enough.
73
- 3. **Capability ids.** `oas.okf` / `oas.aweb` appear in the config, the
74
- lock, and the `.agents/capabilities/installed/<id>/` directory names.
75
- 4. **No catalog aliases.** `package-catalog.json` maps only `oats.*` ids;
76
- a hand-renamed lock naming `marketplace:oas.okf` resolves to
77
- `available: false` and the guided migration **holds the whole scope**
78
- (`lib/core.mjs:3251-3262`, `:1416`).
79
-
80
- ## Why an OAS user cannot even find OATS
81
-
82
- - `@awebai/oats` and `@awebai/oats-pi` are **not yet published**. The
83
- v0.22.0 release notes exist and the three manifests are aligned; what
84
- remains is the tag and the publish (`.github/workflows/release.yml`, or
85
- the runnerless lane in `scripts/release-lane.mjs`).
86
- - `@oas-framework/oas` is still live on npm (0.21.2 as of 2026-09-03) and
87
- **not deprecated**, so the old CLI's `oas update` (which checks that
88
- package) never learns OATS exists.
89
- - The old OAS desktop probes for `@oas-framework/oas`; the new desktop
90
- requires `@awebai/oats >=0.22.0 <0.23.0` old app and new CLI are
91
- mutually invisible, so desktop must ship in the same release.
92
-
93
- ## The plan (epic `aweb-abfy`)
94
-
95
- 1. **Done.** `oats migrate` / `oats doctor` detect an OAS scope and fail
96
- **loud** with the exact remedy (never exit 0 on "nothing to migrate" when
97
- `oas-*` siblings exist). `detectOasScopes` in `lib/core.mjs`,
98
- `discoverOasScopes` in `lib/packages.mjs`, wired in `bin/oats.mjs`;
99
- tests in `test/oas-scope-detection.test.mjs`.
100
- 2. **Done.** Catalog aliases `oas.*` → `oats.*` so legacy locks map instead
101
- of holding — as *renaming* aliases (`{ "package": "oats.okf",
102
- "capability": "oats.okf" }`), because the replacement packages export the
103
- successor ids, never the legacy ones. All seven 0.20 ids are mapped in
104
- `package-catalog.json`.
105
- 3. **Done.** `oats migrate --from-oas`: one transactional command covering
106
- all four breaks (section above), fixture built from the real deployment
107
- shape, idempotent, byte-identical rollback on failure, with a migrated
108
- scope reaching green `oats doctor` and spawns composing the knowledge and
109
- messaging injections again (`test/from-oas-migration.test.mjs`).
110
- 4. v0.22.0 release: notes and version alignment are **done**; remaining are
111
- the tag, npm publish of `@awebai/oats` + `@awebai/oats-pi`, and the
112
- desktop GitHub Release.
113
- 5. `npm deprecate` the `@oas-framework/*` packages with a pointer here.
114
- 6. Close the `oats-okf` / `oats-aweb` publication gates so migrated scopes
115
- can restore their capabilities under the new ids.
116
-
117
- Until 4–6 are done, OAS users (this includes real daily users) should stay
118
- on `@oas-framework/oas` — it keeps working and loses nothing by
119
- waiting. The conversion command exists, but until the v0.22.0 release it is
120
- only reachable from a repo checkout, and until the satellite publication
121
- gates close the catalog's package refs are not a supported acquisition
122
- source for migrated scopes.
35
+ Run the exact `oats trust <capability> --dir <scope>` commands printed by
36
+ migration for the executable capabilities you approve. Trust does not
37
+ transfer automatically. Verify the team ID and messaging membership with
38
+ `oats aweb setup --dir /path/to/scope`, then exercise a real task, harvest,
39
+ and retirement as described in [Run your first team](first-team.md).
40
+
41
+ For a multi-repository deployment, start with one scope. The explicit
42
+ `--recursive --dir /path/to/workspace` form converts every discovered OAS
43
+ scope, with a separate transaction for each; it is not one transaction for
44
+ the whole workspace.
45
+
46
+ If you use Desktop, install [OATS Desktop](desktop.md) too. The old OAS
47
+ Desktop discovers the old package name and cannot operate the new CLI.
48
+ OATS Desktop 0.22.0 accepts kernel versions `>=0.22.0 <0.23.0`.
49
+
50
+ ## What the command converts
51
+
52
+ One transaction covers two phases within a scope:
53
+
54
+ 1. Rename `oas-config.yaml` and `oas-lock.json` to their `oats-` names;
55
+ convert the `oas:` defaults key and catalog-mapped capability IDs;
56
+ rename installed `oas.json` manifests and soul scaffold-owner files.
57
+ 2. Convert the old lock to official package lockfile version 2, acquiring
58
+ the replacement artifacts and removing superseded installed directories.
59
+
60
+ The catalog includes aliases for the seven OAS 0.20 capability IDs, mapping
61
+ `oas.*` names to the corresponding `oats.*` packages and capabilities.
62
+ Aliases guide migration; they are not runtime compatibility shims.
63
+ Comments and unrelated configuration text are preserved, including old
64
+ names in comments. Those comments can be updated separately.
65
+
66
+ A failure in either phase restores that scope's original OAS bytes. A
67
+ second successful run finds nothing to convert. `oats doctor` and migration
68
+ commands identify visible OAS-named scopes and give a remedy rather than
69
+ silently declaring an unmigrated deployment ready.
70
+
71
+ ## Compatibility and remaining transition work
72
+
73
+ The migration fixtures were built from an OAS 0.20.x deployment. OAS
74
+ 0.21.x uses the same file names and configuration keys, but may lock package
75
+ versions outside the OATS catalog's mapped line. Inspect the dry run before
76
+ converting those scopes; do not replace an unmapped version by guessing.
77
+
78
+ The old `@oas-framework/*` packages have not been deprecated as part of
79
+ this rollout. Their update checks therefore do not announce the OATS
80
+ rename; deprecation belongs to their maintainer. An existing OAS deployment
81
+ can keep running until its own migration plan is ready. This is no longer a
82
+ requirement to wait for OATS publication.
83
+
84
+ See the [0.22.0 release notes](release-notes/v0.22.0.md) for the rename,
85
+ package versions, and compatibility changes, and the
86
+ [first-team qualification](first-team-demo.md) for current operating evidence.
@@ -0,0 +1,106 @@
1
+ # OATS v0.22.1
2
+
3
+ A bounded reliability release, made from the first day of operating OATS on
4
+ its own repository from the published 0.22.0 artifacts. Every item below was
5
+ either reproduced during that run or found by the independent review that
6
+ preceded it, plus the golden fixtures that guard the kernel's outputs and a
7
+ release-workflow correction (a release with nothing to bump finishes rather
8
+ than fails). The Desktop compatibility band (`>=0.22.0 <0.23.0`) already
9
+ covers this kernel; no Desktop rebuild is needed.
10
+
11
+ ## Fixes
12
+
13
+ - **`oats create` in a fresh scope no longer crashes.** After `oats init`,
14
+ the first `oats create` died with a raw stack trace because it demanded the
15
+ `agents/` directory that only `create` itself populates. It now bootstraps
16
+ the roster root at the enclosing repository, reports that once (and as
17
+ `agentsRoot` in `--json`), and the 0.22.0 workaround `mkdir agents` is no
18
+ longer needed.
19
+ - **Spawn preflights executables and compensates every post-hook failure.**
20
+ A missing runtime binary or tmux was detected only after the home, worktree,
21
+ branch, and required capability hooks (an aweb identity) had been created,
22
+ and those throws bypassed compensation, leaving a branch, a worktree, and
23
+ remote state with no `instance.json` and no quarantine. The runtime binary,
24
+ tmux (when launching), and the task input are now checked before any
25
+ mutation, and one compensation path owns every failure after the spawn
26
+ hooks: retire hooks run once, Git topology is removed and verified, a
27
+ window that may have been created is stopped and verified before
28
+ credentials are touched, and unresolvable cleanup retains the home with
29
+ its receipt for a retryable `oats retire`. Six fault-injection tests cover
30
+ the paths.
31
+ - **The turn record's stream lock is ownership-safe and bounded.** A late
32
+ contender could judge a live holder's lock stale by age and enter the same
33
+ critical section, and the old holder then unlinked whatever lock was in
34
+ place. The lock now carries an owner token; staleness is proven from the
35
+ holder's liveness, with age only as the fallback for a foreign-host or
36
+ tokenless lock; release removes only a lock the releaser owns; and every
37
+ failed acquire iteration passes one deadline check, so an unreadable lock
38
+ or a lock that cannot be removed fails with the underlying code and path
39
+ instead of spinning forever. Known limit, documented: a pid reused after a
40
+ reboot makes an abandoned lock read as held until an operator removes it.
41
+ - **README claims match the implementation.** Native captured turns are
42
+ content-addressed, not signed; projected aweb mail and chat keep their
43
+ original signatures; capture covers Claude Code, Pi, and Codex transcripts
44
+ plus aw client logs on machines where `oats setup` ran, subject to the
45
+ ignore list. The contracts document and the turn-record specification say
46
+ the same.
47
+ - **Bundled capabilities match their published tags.** The copies of the
48
+ official packages bundled under `capabilities/` claimed the published
49
+ version numbers but differed from the published payloads; the bundled
50
+ `oats.okf` still imported kernel internals and shipped an older harvester
51
+ layout. All six are now byte-identical to the tagged payloads (`oats.okf`
52
+ 1.4.1, `oats.aweb` 1.8.0, `oats.jira` 1.0.0, `oats.linear` 1.0.0,
53
+ `oats.authoring` 1.0.0, `oats.review` 1.2.0 from `oats.dev` 1.0.0). Two
54
+ new tests guard it: no file under `capabilities/` may name kernel internals
55
+ or shell out to `oats root`, and every bundled manifest must carry the
56
+ version the catalog pins. The clean-room smoke asserts the same pin before
57
+ wrapping the bundled package, so it now proves the released package and
58
+ kernel combination. The bundled `oats.linear` README and test moved with
59
+ their package.
60
+
61
+ ## Documentation
62
+
63
+ - **Run your first OATS team** (`docs/first-team.md`) is the tested path from
64
+ install to a real task, harvest, retirement, and a successor, with the
65
+ caveats the run met: the harvester runs in Pi even for Claude Code workers,
66
+ a Claude Code spawn needs two interactive confirmations today, and a
67
+ messaging layer entry that excludes a soul must state `global: true`.
68
+ - **First-team example** (`docs/first-team-demo.md`) records what actually
69
+ happened on 2026-09-05: two workers, two promotions, one successor that
70
+ read its predecessor's promoted lesson.
71
+ - **Migration from OAS** is rewritten from shipped state: the packages are
72
+ published, the seven catalog aliases exist, and the OAS npm deprecation
73
+ remains with its maintainer.
74
+ - `docs/layers.md` is now the OATS contracts and `docs/integrations.md` the
75
+ binding guide; `docs/2026-09-03-architecture-proposal.md` records the
76
+ component model and the migration plan agreed with the framework's author.
77
+
78
+ ## Known operating limits and issues, not fixed here
79
+
80
+ - The qualified `oats.okf` 1.4.1 configuration runs its harvester in Pi, so
81
+ a Pi-runnable model is required even for Claude Code workers.
82
+ - A Claude Code worker's first launch can stop on Claude's folder-trust
83
+ prompt and on the aweb channel plugin's development-channels
84
+ confirmation; attach to the tmux session and answer them. A created
85
+ window is not evidence that the agent has started.
86
+ - Retiring an instance reports its aweb identity deleted while the server
87
+ keeps the alias (aweb-aaum.6). Local cleanup is complete; the name cannot
88
+ be reused until an administrator removes the alias. Use a fresh
89
+ `--purpose` for successors.
90
+ - The OKF harvester's default model assumes the `github-copilot` provider;
91
+ set `harvest-model` under the knowledge layer settings to a model your Pi
92
+ can run. A package change is proposed.
93
+ - `oats spawn` resolves the roster root from the working directory, so from
94
+ a workspace root pass `--dir <repo>` even though `oats status --team`
95
+ lists the souls.
96
+ - `oats status` lists the retirement-baselines directory as a phantom
97
+ instance, retire leaves that baseline file behind, and `oats retire --json`
98
+ prints a bare object rather than the schema-v1 envelope. Tracked; each
99
+ changes a golden fixture deliberately.
100
+
101
+ ## Install
102
+
103
+ ```bash
104
+ npm install -g @awebai/oats@0.22.1
105
+ pi install npm:@awebai/oats-pi@0.22.1
106
+ ```