@awebai/oats 0.60.0 → 0.61.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.
- package/README.md +14 -18
- package/bin/oats.mjs +42 -10
- package/docs/configuration.md +9 -0
- package/docs/desktop-cli-api.md +28 -5
- package/docs/desktop.md +7 -0
- package/docs/first-team.md +8 -0
- package/docs/official-catalog.md +1 -1
- package/docs/packages.md +5 -5
- package/docs/release-notes/v0.61.0.md +155 -0
- package/docs/tui.md +10 -4
- package/docs/workspaces.md +1 -1
- package/package-catalog.json +1 -1
- package/package.json +1 -1
- package/packages/client/cli-locator.mjs +2 -2
- package/packages/client/instance-presentation.mjs +10 -0
- package/packages/client/instance-tree.mjs +48 -6
- package/packages/tui/lib/client.mjs +2 -2
- package/packages/tui/lib/model.mjs +15 -5
- package/packages/tui/lib/views/palette.mjs +7 -3
- package/skills/oats-getting-started/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -1,33 +1,29 @@
|
|
|
1
1
|
# OATS: an open framework for specialised agent teams
|
|
2
2
|
|
|
3
|
-
**Free, open source, provider-agnostic, and decentralised by design.**
|
|
3
|
+
**Free, open source, provider- and harness-agnostic, and decentralised by design.**
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@awebai/oats)
|
|
6
6
|
[](https://github.com/awebai/oats/releases)
|
|
7
7
|
[](https://nodejs.org/)
|
|
8
8
|
[](LICENSE)
|
|
9
9
|
|
|
10
|
-
OATS—**Open Agent Team Specification**—is a framework for building
|
|
10
|
+
OATS—**Open Agent Team Specification**—is a provider- and harness-agnostic framework for building distributed agent teams: on one laptop, across machines or across a large organisation, as flexibly as you need. It is completely free and open source.
|
|
11
11
|
|
|
12
|
-
**
|
|
12
|
+
- **Every agent keeps the full power of its harness.** Claude Code, Codex or pi: OATS connects them, so agents on different harnesses and providers communicate and work together.
|
|
13
|
+
- **The CLI and contracts set up the team; capabilities shape it.** Choose the agents, the tools you already use and how they coordinate. We ship opinionated defaults that we think work well, and you can change or replace any of them.
|
|
14
|
+
- **You keep control** of messaging, knowledge, coordination and anything else your team does, so your knowledge, workflows and team structure outlast any model or platform.
|
|
15
|
+
- **So you don't lose your head as the threads multiply,** there are two clients: **OATS Desktop**, a free, fully integrated ADE (an agentic IDE), and **`oats tui`** for the terminal (in preview).
|
|
16
|
+
- **Built on what you already use:** Git, GitHub or GitLab, and your agent harnesses. No OATS account, central server or OATS-hosted database; integrations you choose may run their own.
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
For example, a kernel expert, a UX expert and a customer-support expert can share capabilities for learning and coordination, while each has its own for its area. Through capabilities you decide:
|
|
15
19
|
|
|
16
|
-
|
|
20
|
+
- which specialists make up the team;
|
|
21
|
+
- which models and harnesses their instances use;
|
|
22
|
+
- where their knowledge lives and how it grows;
|
|
23
|
+
- which skills, tools and workflows they receive;
|
|
24
|
+
- how they communicate and coordinate.
|
|
17
25
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
- Which specialists make up the team.
|
|
21
|
-
- Which models and harnesses their instances use.
|
|
22
|
-
- Where their knowledge lives and how it develops.
|
|
23
|
-
- Which skills, tools and workflows they receive.
|
|
24
|
-
- How they communicate and coordinate.
|
|
25
|
-
|
|
26
|
-
These choices determine how your team operates and where the value of its work accumulates. Keeping them under your control means your knowledge, workflows and team structure can outlast any particular model or platform.
|
|
27
|
-
|
|
28
|
-
OATS also provides **OATS Desktop: a free, fully integrated ADE—an agentic IDE**. It brings your team, its work and its agent sessions into one place, making day-to-day collaboration with your agents clearer and more pleasant.
|
|
29
|
-
|
|
30
|
-
OATS builds on tools you already use—**Git, GitHub or GitLab, and your preferred agent harnesses**. People can share agent definitions, knowledge and workflows across projects without an OATS account, a central OATS server or an OATS-hosted database. Selected integrations may use their own servers or databases; those are your choices, not a mandatory OATS service.
|
|
26
|
+
The [official catalog](docs/official-catalog.md) is the reviewed list of official packages. A workspace trusts a package by declaring it; being listed doesn't declare it.
|
|
31
27
|
|
|
32
28
|
## Why OATS
|
|
33
29
|
|
package/bin/oats.mjs
CHANGED
|
@@ -44,7 +44,7 @@ import { loadLocal, validateWorkspace, validateLocal, discoverPackageSouls, unlo
|
|
|
44
44
|
import { discoveredTeamKeys, isTeamRefusal, localTeamsClosedProblem, recordedTeams, reportRows, soulKeyOf, soulTeams, teamKeyOf, teamModel } from "../lib/teams.mjs";
|
|
45
45
|
import { LAUNCH_KEY_UNCHECKED, LAUNCH_PREFERENCE_UNMATCHED, launchKeyQuoted, launchKeysUnmatched, launchLayers, soulLaunchCommand, unmatchedKeyMessage } from "../lib/launch-preference.mjs";
|
|
46
46
|
import { terminalText } from "../lib/refused-text.mjs";
|
|
47
|
-
import { soulsOffered } from "../lib/instance-resolution.mjs";
|
|
47
|
+
import { qualifiedSoulName, soulCandidates, soulsOffered } from "../lib/instance-resolution.mjs";
|
|
48
48
|
import { parseConfigData } from "../lib/config-data.mjs";
|
|
49
49
|
import * as remoteModule from "../lib/remote.mjs";
|
|
50
50
|
import { activateLocalInputs, localRevision } from "../lib/local-inputs.mjs";
|
|
@@ -3536,7 +3536,7 @@ async function tuiCmd() {
|
|
|
3536
3536
|
* instance homes), then runs exactly the `oats sync` path — discover over the
|
|
3537
3537
|
* remotes, confirm membership, resolve `packages:`, write `oats-lock.json`. Nothing is installed, no soul
|
|
3538
3538
|
* is created, nothing is spawned, no `oats-config.yaml` is written: the member
|
|
3539
|
-
* clones and the
|
|
3539
|
+
* clones and the workspace's setup expert are the operator's next steps, printed here. */
|
|
3540
3540
|
async function onboardCmd() {
|
|
3541
3541
|
const bail = (code, message, details) => (JSON_MODE ? jsonFail(code, message, details) : die(message));
|
|
3542
3542
|
const usage = "usage: oats onboard [<dir>] --workspace <repo ref> [--json] (or --dir <dir>)";
|
|
@@ -3615,12 +3615,15 @@ async function onboardCmd() {
|
|
|
3615
3615
|
// (4) The taught layout as next steps (design doc §4), and the envelope.
|
|
3616
3616
|
const standalone = synced.discovery.standalone === true;
|
|
3617
3617
|
const members = synced.report.members;
|
|
3618
|
-
// The
|
|
3619
|
-
//
|
|
3618
|
+
// The setup expert is suggested only when THIS workspace lists one (setupExpertOf); otherwise
|
|
3619
|
+
// any listed soul is spawnable.
|
|
3620
3620
|
const soulNames = synced.items.souls.map((s) => s.name);
|
|
3621
|
-
const
|
|
3622
|
-
const
|
|
3623
|
-
const
|
|
3621
|
+
const { OPERATOR_CAPABILITY } = await import("../lib/operator-coverage.mjs");
|
|
3622
|
+
const wsName = standalone ? null : synced.discovery.workspace?.name;
|
|
3623
|
+
const conventional = typeof wsName === "string" && wsName ? `${wsName}-oats-setup-expert` : null;
|
|
3624
|
+
const setupExpert = setupExpertOf(synced.discovery, { conventional, capability: OPERATOR_CAPABILITY });
|
|
3625
|
+
const spawnHint = setupExpert ? `oats spawn ${setupExpert} --dir ${shortPath(dir)}` : null;
|
|
3626
|
+
const anySoulHint = `oats spawn <soul> --dir ${shortPath(dir)}${soulNames.length ? ` (e.g. ${soulNames.slice(0, 3).join(", ")})` : ""}`;
|
|
3624
3627
|
// A member's clone goes beside oats-local.yaml under its repo name; `agents/` is the instance
|
|
3625
3628
|
// homes, so a member called "agents" is cloned as `agents-repo/` (design doc §4). The HOST is
|
|
3626
3629
|
// listed exactly like any other member when it is one: a clone of it is needed only if someone
|
|
@@ -3660,10 +3663,38 @@ Next:
|
|
|
3660
3663
|
2. Check who may read the host: ${synced.discovery.key}${hostIsMember ? " is itself a member" : " is a dedicated host"}. The workspace file
|
|
3661
3664
|
names every member, so if any member is private the host must be a private repo that is not
|
|
3662
3665
|
a public member; public contributors then get the standalone case (from: here + oats.core).
|
|
3663
|
-
3. ${setupExpert ?
|
|
3666
|
+
3. ${setupExpert ? `Spawn ${setupExpert}, this workspace's OATS setup expert
|
|
3667
|
+
(it holds ${OPERATOR_CAPABILITY}), to guide the rest:` : `No soul here holds ${OPERATOR_CAPABILITY} — add a ${conventional ? `${conventional} soul` : "soul"} that declares it,
|
|
3668
|
+
or spawn any listed soul:`}
|
|
3664
3669
|
${spawnHint ?? anySoulHint}`);
|
|
3665
3670
|
}
|
|
3666
3671
|
|
|
3672
|
+
/** The soul `oats onboard` names as the workspace's OATS setup expert (awebai/oats#1314), among the
|
|
3673
|
+
* souls a spawn can name (soulCandidates) whose own soul.yaml declares `capability` (oats.setup) with
|
|
3674
|
+
* `{ from: … }`, from any source (`off` is no declaration): the one named `conventional`
|
|
3675
|
+
* (`<workspace name>-oats-setup-expert`, null in a standalone view, which has no workspace name);
|
|
3676
|
+
* else the first by name; else null. A soul is never chosen by its name alone. Only the soul's own declaration is read, never
|
|
3677
|
+
* a resolution: oats.setup that reaches a soul through the workspace defaults alone is not seen. → the
|
|
3678
|
+
* name to spawn it by: the bare name, else `<member>/<soul>` (`<package>/<soul>`), else
|
|
3679
|
+
* `<member repo key>/<soul>`, the first that names this soul alone. */
|
|
3680
|
+
function setupExpertOf(discovery, { conventional, capability }) {
|
|
3681
|
+
const candidates = soulCandidates(discovery);
|
|
3682
|
+
const declares = (entry) => {
|
|
3683
|
+
const caps = entry.definition?.capabilities;
|
|
3684
|
+
const choice = caps !== null && typeof caps === "object" && Object.hasOwn(caps, capability) ? caps[capability] : null;
|
|
3685
|
+
return choice !== null && typeof choice === "object" && typeof choice.from === "string" && choice.from !== "";
|
|
3686
|
+
};
|
|
3687
|
+
const order = (a, b) => (a < b ? -1 : a > b ? 1 : 0);
|
|
3688
|
+
const entries = candidates.map((c) => c.entry).sort((a, b) => order(a.name, b.name) || order(qualifiedSoulName(a), qualifiedSoulName(b)));
|
|
3689
|
+
const chosen = (conventional && entries.find((e) => e.name === conventional && declares(e))) || entries.find(declares);
|
|
3690
|
+
if (!chosen) return null;
|
|
3691
|
+
// The shortest name a spawn resolves to exactly this soul: two members can share a repository
|
|
3692
|
+
// basename (github.com/a/agents, github.com/b/agents), so the last form is the full repo key.
|
|
3693
|
+
const forms = [chosen.name, qualifiedSoulName(chosen), ...(typeof chosen.package === "string" ? [] : [`${chosen.repoKey}/${chosen.name}`])];
|
|
3694
|
+
const only = (name) => { const hits = candidates.filter((c) => c.matches(name)); return hits.length === 1 && hits[0].entry === chosen; };
|
|
3695
|
+
return forms.find(only) ?? forms[forms.length - 1];
|
|
3696
|
+
}
|
|
3697
|
+
|
|
3667
3698
|
/** `oats onboard <dir> [--workspace <ref>] --check`: what onboarding <dir> here would meet, read-only (the
|
|
3668
3699
|
* question `oats server connect` asks a host before onboarding there, and `oats server check` asks of a
|
|
3669
3700
|
* registered deployment). A leading ~ is this machine's home. `state` is absent | empty | not-empty |
|
|
@@ -4734,8 +4765,9 @@ Usage:
|
|
|
4734
4765
|
oats onboard [<dir>] --workspace <repo ref> realize a workspace here: writes <dir>/oats-local.yaml
|
|
4735
4766
|
[--json] and agents/, then runs the oats sync path (lock v3)
|
|
4736
4767
|
and prints the
|
|
4737
|
-
next steps (clone members you work IN, spawn
|
|
4738
|
-
|
|
4768
|
+
next steps (clone members you work IN, spawn the
|
|
4769
|
+
workspace's setup expert (the soul holding oats.setup));
|
|
4770
|
+
creates no soul, spawns nothing
|
|
4739
4771
|
[--check] --check: write nothing; report <dir> (~ = this home),
|
|
4740
4772
|
its state and whether Git reads the workspace remote
|
|
4741
4773
|
oats session inspect|input|attach --home <absolute-home> [--text-file <path>] [--json]
|
package/docs/configuration.md
CHANGED
|
@@ -305,6 +305,15 @@ configuration is a host choice: a soul never names one.
|
|
|
305
305
|
environment, command and preflight checks) and starts nothing.
|
|
306
306
|
- The old key `runtime` is still read as `harness`, with a
|
|
307
307
|
`deprecated-runtime-name` warning.
|
|
308
|
+
- **Claude's permissions** are Claude's own settings, not OATS keys. They go
|
|
309
|
+
in the user settings of the Claude config a launch uses (its
|
|
310
|
+
`CLAUDE_CONFIG_DIR`, else `~/.claude`), or `--permission-mode` goes in a
|
|
311
|
+
configuration's `args`. Never in a home's `.claude/settings.json`: the
|
|
312
|
+
capabilities manage it at every start, and Claude ignores auto mode there.
|
|
313
|
+
oats.setup's `/oats-agent-permissions` (oats.framework 1.13.0) teaches the
|
|
314
|
+
setup: auto mode, narrow allow rules for the `oats` and `gh` reads,
|
|
315
|
+
`oats spawn` and reading `aw` mail and chat, and what stays gated.
|
|
316
|
+
`yolo` is separate and is meant for isolated machines.
|
|
308
317
|
|
|
309
318
|
### The harness default
|
|
310
319
|
|
package/docs/desktop-cli-api.md
CHANGED
|
@@ -882,8 +882,8 @@ same argument, given once). The ref is checked before anything is written.
|
|
|
882
882
|
"hosting":{"host":"github.com/acme/agents","hostIsMember":true,"rule":"If any member is private, host oats-workspace.yaml in a private repo …"},
|
|
883
883
|
"next":{"clone":[{"key":"github.com/acme/agents","name":"agents","url":"https://github.com/acme/agents.git","dir":"/w/agents-repo","present":false,"host":true},
|
|
884
884
|
{"key":"github.com/acme/platform","name":"platform","url":"https://github.com/acme/platform.git","dir":"/w/platform","present":true,"host":false}],
|
|
885
|
-
"spawn":"oats spawn oats-
|
|
886
|
-
"souls":["oats-
|
|
885
|
+
"spawn":"oats spawn acme-oats-setup-expert --dir /w",
|
|
886
|
+
"souls":["acme-oats-setup-expert","platform-engineer","release-manager"]}}
|
|
887
887
|
```
|
|
888
888
|
|
|
889
889
|
- `sync` is the full [`oats sync`](#oats-sync) report (abridged above).
|
|
@@ -895,9 +895,32 @@ same argument, given once). The ref is checked before anything is written.
|
|
|
895
895
|
existing clone (the `clones:` entry, else `<dir>/<name>`), else where to
|
|
896
896
|
clone it: `<dir>/<name>`, or `<dir>/agents-repo` for a member named
|
|
897
897
|
`agents`. `url` is `null` when unknown.
|
|
898
|
-
- `next.spawn` is `oats spawn
|
|
899
|
-
|
|
900
|
-
|
|
898
|
+
- `next.spawn` is `oats spawn <soul> --dir <dir>` naming the workspace's
|
|
899
|
+
OATS setup expert, else `null` (OATS 0.61.0; before it, only a soul named
|
|
900
|
+
`oats-operator-expert` was named). Among the souls onboarding lists
|
|
901
|
+
(confirmed members', external and package souls; standalone, the
|
|
902
|
+
repository's own), the setup expert is:
|
|
903
|
+
1. the soul named `<workspace name>-oats-setup-expert` that declares
|
|
904
|
+
`oats.setup`, where the workspace name is the `name:` of
|
|
905
|
+
`oats-workspace.yaml` (`sync.workspace.name`); a standalone view has no
|
|
906
|
+
workspace name, so this step does not apply there;
|
|
907
|
+
2. otherwise the first soul by name that declares `oats.setup`;
|
|
908
|
+
3. otherwise none: `null`.
|
|
909
|
+
|
|
910
|
+
A soul declares `oats.setup` when its own `soul.yaml` names it under
|
|
911
|
+
`capabilities:` as `{ from: … }`, from any source (`package`, `here` or a
|
|
912
|
+
member key); `oats.setup: off` does not count. A soul is never chosen by
|
|
913
|
+
its name alone: one named `<workspace name>-oats-setup-expert` that does
|
|
914
|
+
not declare `oats.setup` falls through to step 2.
|
|
915
|
+
|
|
916
|
+
Only the soul's own declaration is read, not its resolved composition:
|
|
917
|
+
`oats.setup` that reaches a soul only through the workspace's `defaults:`
|
|
918
|
+
is not seen, and a declared `oats.setup` is not checked to resolve. A soul
|
|
919
|
+
whose name another listed soul shares is named so that `oats spawn` finds
|
|
920
|
+
it alone: `<member>/<soul>` or `<package>/<soul>`, else, when two members
|
|
921
|
+
share a repository name, `<member repo key>/<soul>`. The text output's step 3 names
|
|
922
|
+
the same soul, or, with none, the conventional name to add.
|
|
923
|
+
`next.souls` is the first three soul names, sorted.
|
|
901
924
|
- Errors: `E_BAD_ARGS` (usage, no `--workspace`, a repeated directory, an
|
|
902
925
|
unknown flag), `E_REPO_REF`, `E_ALREADY_ONBOARDED {local, dir}` (this
|
|
903
926
|
directory already has `oats-local.yaml`), `E_ONBOARD_FAILED {dir}`. A
|
package/docs/desktop.md
CHANGED
|
@@ -529,6 +529,13 @@ has reached the execution host. Both CLI installations must advertise
|
|
|
529
529
|
`session-upload`. A failed transfer leaves the draft unchanged and shows an
|
|
530
530
|
error in the terminal. Each drop/paste accepts up to 16 files totaling 25 MB.
|
|
531
531
|
|
|
532
|
+
## The sidebar's instance tree
|
|
533
|
+
|
|
534
|
+
The sidebar lists a workspace's instances as a tree: a child sits one step
|
|
535
|
+
right of its parent, and related instances are grouped together. Siblings are
|
|
536
|
+
joined by a dotted line through their dots. A parent's line to its children
|
|
537
|
+
runs just to the right of the dotted line, so the two never merge.
|
|
538
|
+
|
|
532
539
|
## Identity marks and harness badges
|
|
533
540
|
|
|
534
541
|
Souls, capabilities and workspaces carry a coloured two-letter mark beside
|
package/docs/first-team.md
CHANGED
|
@@ -69,6 +69,14 @@ runs before adding its pin. Then clone the
|
|
|
69
69
|
member you will work in beside `oats-local.yaml` (only a soul's work target
|
|
70
70
|
needs a clone — discovery and resolution run over the remotes).
|
|
71
71
|
|
|
72
|
+
The last next step names the workspace's OATS setup expert to spawn, among the
|
|
73
|
+
souls that declare `oats.setup` in their own `soul.yaml`: the one named
|
|
74
|
+
`<workspace name>-oats-setup-expert` (`acme-oats-setup-expert` for a
|
|
75
|
+
workspace named `acme`), else the first by name. With neither, it says so and suggests
|
|
76
|
+
adding that conventional soul, or spawning any listed soul. The full rule and
|
|
77
|
+
its limits are in
|
|
78
|
+
[desktop-cli-api.md](desktop-cli-api.md#oats-onboard-onboardapi-2).
|
|
79
|
+
|
|
72
80
|
`--json` returns `onboardApi: 2` (`local`, `dir`, `agents`, `lock`, the full
|
|
73
81
|
`sync` report, `hosting`, `next.clone[]`, `next.spawn`); running it twice is
|
|
74
82
|
`E_ALREADY_ONBOARDED` (use `oats sync`); a mistyped ref is `E_REPO_REF`, an
|
package/docs/official-catalog.md
CHANGED
|
@@ -9,7 +9,7 @@ or workspace membership alone does not make a package official.
|
|
|
9
9
|
|
|
10
10
|
| package | release | capabilities | package souls |
|
|
11
11
|
|---|---|---|---|
|
|
12
|
-
| `oats.framework` | `oats-framework/v1.
|
|
12
|
+
| `oats.framework` | `oats-framework/v1.13.0` (this repository) | `oats.core`, `oats.setup`, `oats.support`, `oats.knowledge-theory` | `knowledge-theory-expert` |
|
|
13
13
|
| `oats.okf` | `v5.2.1` | `oats.okf` (knowledge), `oats.okf-harvest`, `oats.okf-maintenance` | `knowledge-harvester`, `knowledge-maintainer` |
|
|
14
14
|
| `oats.aweb` | `v1.29.0` | `oats.aweb` (messaging) | |
|
|
15
15
|
| `oats.engineering` | `v1.10.0` | `oats.engineering-expert`, `oats.developer`, `oats.code-review`, `oats.maintainer` | `code-reviewer` |
|
package/docs/packages.md
CHANGED
|
@@ -51,7 +51,7 @@ packages:
|
|
|
51
51
|
- **Bare version** (`v5.2.1`, `5.2.1`, `1.0.0-rc.1`): the id is looked up in
|
|
52
52
|
the official catalog — `package-catalog.json` in the `oats` repo, or the file
|
|
53
53
|
named by `OATS_PACKAGE_CATALOG` — which supplies the repo url, the tag
|
|
54
|
-
convention (`v5.2.1` or `oats-framework/v1.
|
|
54
|
+
convention (`v5.2.1` or `oats-framework/v1.13.0`) and the payload path. An id
|
|
55
55
|
the catalog does not know is `E_PACKAGE_MISSING` ("use `git:<repo>@<ref>` for
|
|
56
56
|
a package outside the catalog"). The catalog is the reviewed official list
|
|
57
57
|
([official-catalog.md](official-catalog.md)) and the only way a
|
|
@@ -74,7 +74,7 @@ members:
|
|
|
74
74
|
- git:github.com/acme/agents
|
|
75
75
|
- git:github.com/acme/platform
|
|
76
76
|
packages:
|
|
77
|
-
oats.framework: v1.
|
|
77
|
+
oats.framework: v1.13.0
|
|
78
78
|
oats.okf: v5.2.1
|
|
79
79
|
oats.aweb: v1.29.0
|
|
80
80
|
teams:
|
|
@@ -353,11 +353,11 @@ A soul that names one of the package's capabilities with
|
|
|
353
353
|
"policy": "docs/official-catalog.md",
|
|
354
354
|
"packages": {
|
|
355
355
|
"oats.okf": { "url": "https://github.com/awebai/oats-okf.git", "ref": "v5.2.1", "path": "oats-package" },
|
|
356
|
-
"oats.framework": { "url": "https://github.com/awebai/oats.git", "ref": "oats-framework/v1.
|
|
356
|
+
"oats.framework": { "url": "https://github.com/awebai/oats.git", "ref": "oats-framework/v1.13.0", "path": "oats-package" }
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
359
|
```
|
|
360
360
|
|
|
361
|
-
`ref` carries the tag convention: a workspace's `oats.framework: v1.
|
|
362
|
-
resolves to tag `oats-framework/v1.
|
|
361
|
+
`ref` carries the tag convention: a workspace's `oats.framework: v1.13.0`
|
|
362
|
+
resolves to tag `oats-framework/v1.13.0`. Resolving through the catalog never
|
|
363
363
|
advances a lock by itself: `oats sync` does, and says so.
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# OATS 0.61.0
|
|
2
|
+
|
|
3
|
+
2026-10-16
|
|
4
|
+
|
|
5
|
+
## Upgrade
|
|
6
|
+
|
|
7
|
+
- **A pi instance stuck on its opening task: restart it after the update**
|
|
8
|
+
([#1322](https://github.com/awebai/oats/issues/1322)). On pi 1.2 and
|
|
9
|
+
later, the 0.60.0 bridge (`@awebai/oats-pi`) held an instance's opening
|
|
10
|
+
task forever, and everything typed after it stayed queued. Install the
|
|
11
|
+
0.61.0 bridge (`oats update` moves it in every pi folder your launches
|
|
12
|
+
use), then restart each pi instance that is stuck. Instances that already
|
|
13
|
+
ran their opening task are unaffected. See Fixed.
|
|
14
|
+
|
|
15
|
+
- **Install the Desktop first and the CLI second,** as
|
|
16
|
+
[Upgrading](../upgrading.md) says: a 0.60 Desktop refuses a 0.61.0 CLI. The
|
|
17
|
+
0.61.0 Desktop accepts OATS CLIs `>=0.26.0 <0.62.0`.
|
|
18
|
+
|
|
19
|
+
- **The official catalog moves oats.framework 1.12.3 → 1.13.0** (oats.setup
|
|
20
|
+
2.8.0, see Provider updates). The other packages are unchanged. A
|
|
21
|
+
deployment takes it by changing its pin and running `oats sync`. Only new
|
|
22
|
+
spawns use it.
|
|
23
|
+
|
|
24
|
+
- **OATS 0.61.0: `oats onboard`'s `next.spawn` can name a soul other than
|
|
25
|
+
`oats-operator-expert`** ([#1314](https://github.com/awebai/oats/issues/1314)).
|
|
26
|
+
Before OATS 0.61.0 it named `oats-operator-expert` whenever a soul had that
|
|
27
|
+
name, and only then; from OATS 0.61.0 it names the soul that holds
|
|
28
|
+
`oats.setup`, the workspace's setup expert, so a workspace without this
|
|
29
|
+
project's soul is pointed at its own. The JSON shape is unchanged
|
|
30
|
+
(`onboardApi` 2, text or `null`). A script that matched the old exact name
|
|
31
|
+
sees a different answer: a soul named `oats-operator-expert` that does not
|
|
32
|
+
declare `oats.setup` now gives `null`.
|
|
33
|
+
|
|
34
|
+
## Changed
|
|
35
|
+
|
|
36
|
+
- **OATS Desktop's command palette shows when two instances are siblings**
|
|
37
|
+
([#1312](https://github.com/awebai/oats/issues/1312)). An instance declared
|
|
38
|
+
a sibling of a root, and that root, each say `sibling of <name>` beside
|
|
39
|
+
the name, in the tree, as a match's context and in Recent, and assistive
|
|
40
|
+
technology reads it once with the row. Siblings under one parent still read
|
|
41
|
+
`under <parent>`. Matching, order and groups are unchanged
|
|
42
|
+
([keyboard reference](../../packages/desktop/docs/desktop-keyboard.md)).
|
|
43
|
+
|
|
44
|
+
- **The Desktop sidebar draws the sibling line apart from the lines to
|
|
45
|
+
children** ([#1312](https://github.com/awebai/oats/issues/1312)). The
|
|
46
|
+
dotted line joining sibling instances runs through their dots, and a
|
|
47
|
+
parent's line to its children runs just to the right of it, so the two no
|
|
48
|
+
longer share one line. The dotted line is darker in the White and Solarized
|
|
49
|
+
themes, so it stands out on every row (3:1 contrast). See
|
|
50
|
+
[the sidebar's instance tree](../desktop.md#the-sidebars-instance-tree).
|
|
51
|
+
|
|
52
|
+
- **OATS 0.61.0: `oats onboard` names the workspace's OATS setup expert**
|
|
53
|
+
([#1314](https://github.com/awebai/oats/issues/1314)). Its last next step,
|
|
54
|
+
and `next.spawn` in `--json`, name a soul whose own `soul.yaml` declares
|
|
55
|
+
`oats.setup` (from any source; `off` does not count): the one called
|
|
56
|
+
`<workspace name>-oats-setup-expert`, else the first by name, else none,
|
|
57
|
+
when the text suggests adding that conventional soul. A name alone never
|
|
58
|
+
counts. Only the
|
|
59
|
+
soul's own declaration is read: `oats.setup` given only through workspace
|
|
60
|
+
defaults is not seen. A standalone view has no workspace name, so only
|
|
61
|
+
the declaration counts there. `oats help` describes the step the same way
|
|
62
|
+
([the rule](../desktop-cli-api.md#oats-onboard-onboardapi-2)).
|
|
63
|
+
|
|
64
|
+
- **OATS Desktop accepts an `oats` CLI 0.61.x.** Its band is now
|
|
65
|
+
`>=0.26.0 <0.62.0`. 0.61 adds no new gate on the band: `oats onboard`'s
|
|
66
|
+
next step names the workspace's setup expert in the same text-or-`null`
|
|
67
|
+
shape the Desktop already reads.
|
|
68
|
+
|
|
69
|
+
## Fixed
|
|
70
|
+
|
|
71
|
+
- **pi 1.2 and later run an instance's opening task again**
|
|
72
|
+
([#1322](https://github.com/awebai/oats/issues/1322)). From pi 1.2.0 a run
|
|
73
|
+
counts as active before its `before_agent_start`, and the bridge's hold on
|
|
74
|
+
the opening prompt waited for that same run. So on pi 1.2 and later, an
|
|
75
|
+
instance's opening task never ran. That was the launch's `@TASK.md` in
|
|
76
|
+
interactive mode, or the first default `session.prompt()` of an SDK
|
|
77
|
+
session. Escape didn't release it, and every later prompt waited queued
|
|
78
|
+
behind it, even after the aweb welcome's turn had finished. The hold now
|
|
79
|
+
never waits for the prompt's own run, and a session that shuts down
|
|
80
|
+
releases it. The task still runs once, after a welcome turn that started
|
|
81
|
+
first. On pi 1.2 and later, a welcome sent while the task's run starts is
|
|
82
|
+
queued by pi into that run, after the task. The bridge still sends and
|
|
83
|
+
alters nothing. Restart a pi instance that hangs on its opening task once
|
|
84
|
+
the updated `@awebai/oats-pi` is installed (`oats update`).
|
|
85
|
+
|
|
86
|
+
- **`oats tui` names a sibling at both ends of the link, and its palette
|
|
87
|
+
names siblings** ([#1315](https://github.com/awebai/oats/issues/1315)).
|
|
88
|
+
The detail's parent line named a sibling only on the instance that
|
|
89
|
+
declared the link, and named it as written, even when no instance had
|
|
90
|
+
that name or two had it. Now both ends say `sibling of <names>`, as the
|
|
91
|
+
Desktop does, and a name that resolves to no instance, or to more than
|
|
92
|
+
one, is not shown. The palette shows the same words, dim, after an
|
|
93
|
+
instance's name; a query never matches them. See
|
|
94
|
+
[the TUI page](../tui.md#the-palette).
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
## Provider updates
|
|
98
|
+
|
|
99
|
+
- **oats.framework 1.13.0, oats.setup 2.8.0: the setup expert runs the
|
|
100
|
+
setup, and the person types only secrets**
|
|
101
|
+
([#1314](https://github.com/awebai/oats/issues/1314)).
|
|
102
|
+
- **The setup briefing has one rule for what the person types:**
|
|
103
|
+
passwords, tokens, API keys and interactive logins. It also keeps the two
|
|
104
|
+
installs that capture their own shell, the host wake broker and the host
|
|
105
|
+
timer (#922). Everything else the agent runs and reads back.
|
|
106
|
+
- **A secret reaches its command by a route the agent never sees,** in
|
|
107
|
+
this order:
|
|
108
|
+
- a browser device flow the agent starts (`gh auth login --web` without
|
|
109
|
+
a terminal);
|
|
110
|
+
- a no-echo prompt in a split of the agent's own tmux pane, which closes
|
|
111
|
+
when its command ends (while it is open, wakes and `oats session input`
|
|
112
|
+
can't reach that instance);
|
|
113
|
+
- the person's own terminal.
|
|
114
|
+
|
|
115
|
+
Each route is checked with a read-only command.
|
|
116
|
+
- **`/oats-git-setup` is run by the agent.** The person approves each gh
|
|
117
|
+
login in the browser and chooses their name, email and passphrase
|
|
118
|
+
option. The SSH key is made with no passphrase, because the kernel's ssh
|
|
119
|
+
runs in batch mode; a passphrase key held in an ssh-agent is the
|
|
120
|
+
alternative. The GitHub host key that was checked against its published
|
|
121
|
+
fingerprint is the one recorded. Step 0 reads the global Git
|
|
122
|
+
configuration's names only, and step 7's check runs as one block.
|
|
123
|
+
- **`/oats-setup-expert` (new):** a workspace setup expert's first session.
|
|
124
|
+
It starts from the intake that the `oats-getting-started` skill hands it
|
|
125
|
+
from OATS 0.62.0,
|
|
126
|
+
covers a new or an existing workspace, and ends at a first working soul.
|
|
127
|
+
`/oats-onboarding` points to it.
|
|
128
|
+
- **`/oats-agent-permissions` (new): Claude Code's permissions for OATS
|
|
129
|
+
instances.** The setup expert writes the user settings of the Claude
|
|
130
|
+
config the launches use, never the home's `.claude/settings.json`:
|
|
131
|
+
- auto mode, by `permissions.defaultMode` or `--permission-mode auto` in
|
|
132
|
+
a launch configuration's `args`;
|
|
133
|
+
- an `autoMode` block naming what the workspace trusts;
|
|
134
|
+
- narrow allow rules for the `oats` reads, `oats spawn` (with an `ask`
|
|
135
|
+
rule on `--yolo`, `--server` and `--wake-*`), reading `aw` mail and
|
|
136
|
+
chat, and `gh` reads.
|
|
137
|
+
|
|
138
|
+
Retire and stop (except `--plan`), `aw` sends, `git` beyond Claude's
|
|
139
|
+
built-in read-only forms, pushes, merges and the operator acts stay
|
|
140
|
+
with the classifier, or an `ask` rule. The person approves the
|
|
141
|
+
change. The check: no `waitingOnYou` with reason `permission` during the
|
|
142
|
+
first working soul's task. Claude only; Codex and pi are named.
|
|
143
|
+
- **`/oats-setup-model` explains the per-workspace setup expert,** and how
|
|
144
|
+
`oats onboard` finds it from OATS 0.61.0.
|
|
145
|
+
- Instruction text only; the floors are unchanged. A deployment gets it by
|
|
146
|
+
pinning `oats.framework: v1.13.0` and running `oats sync`.
|
|
147
|
+
|
|
148
|
+
## Documentation
|
|
149
|
+
|
|
150
|
+
- **The README's opening reads at a skim.** One paragraph says what OATS is
|
|
151
|
+
(a provider- and harness-agnostic framework for distributed agent teams,
|
|
152
|
+
completely free and open source), then five short points: each agent
|
|
153
|
+
keeps its harness's full power, capabilities shape the team over
|
|
154
|
+
opinionated defaults, you keep control, the two clients, and what it
|
|
155
|
+
builds on.
|
package/docs/tui.md
CHANGED
|
@@ -145,9 +145,13 @@ runs.
|
|
|
145
145
|
shown in quotation marks, and names nobody. A reason that is withheld is
|
|
146
146
|
`[withheld]` alone. Then it shows what it needs from you with how long
|
|
147
147
|
it has waited and its own message, harness and model, work mode and
|
|
148
|
-
branch, team, parent, when it last started, and its home.
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
branch, team, parent and siblings, when it last started, and its home.
|
|
149
|
+
The siblings are the instances at the other end of an explicit sibling
|
|
150
|
+
link, either way, as the Desktop reads them: `sibling of a`, `sibling of
|
|
151
|
+
a and b`, `sibling of a, b and c`. They are read inside the instance's
|
|
152
|
+
own deployment, and a name that is no instance there, or two of them, is
|
|
153
|
+
not shown. From 80 columns up it stands beside the list; on a narrower
|
|
154
|
+
terminal `Tab` opens it as a page.
|
|
151
155
|
- **Opening an agent.** `Enter` on an instance that runs opens its terminal
|
|
152
156
|
beside the list, where the detail was, as a tab: see
|
|
153
157
|
[Open an agent's terminal](#open-an-agents-terminal) and [Tabs](#tabs).
|
|
@@ -1015,7 +1019,9 @@ is open no terminal is drawn and the TUI reads the keys.
|
|
|
1015
1019
|
- **It lists, in this order:** the instances that can be opened, the most
|
|
1016
1020
|
recently opened or shown in this run first (when the first is the shown tab's,
|
|
1017
1021
|
the second is selected as it opens), then the list's order, each with its
|
|
1018
|
-
state mark, its name
|
|
1022
|
+
state mark, its name, for another machine `on <machine>`, and, dim, its
|
|
1023
|
+
siblings as the detail names them (`sibling of <names>`), which are cut
|
|
1024
|
+
first when the row is short and are never matched by a query; the souls
|
|
1019
1025
|
of the open workspace, once they were read (by [the Souls
|
|
1020
1026
|
view](#the-souls-view), the Capabilities view or a spawn), and choosing
|
|
1021
1027
|
one shows the Souls view with it selected; its capabilities, once [the
|
package/docs/workspaces.md
CHANGED
|
@@ -54,7 +54,7 @@ members: # repo refs, NO @revision (E_WORKSPAC
|
|
|
54
54
|
- git:github.com/acme/tools # a member that ALSO publishes a package (see below)
|
|
55
55
|
|
|
56
56
|
packages: # the ONLY versioned things
|
|
57
|
-
oats.framework: v1.
|
|
57
|
+
oats.framework: v1.13.0 # bare version → resolves through the official catalog
|
|
58
58
|
oats.okf: v5.2.1
|
|
59
59
|
acme.tools: git:github.com/acme/tools@v0.4.0 # outside the catalog → git:<repo>@<tag|OID>; still a package
|
|
60
60
|
|
package/package-catalog.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awebai/oats",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.61.0",
|
|
4
4
|
"description": "OATS (Open Agent Team Specification) — durable souls, disposable instances, targetable capability packages, and the runtime-neutral oats CLI/kernel.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agents",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
// Every candidate is canonicalized to an absolute executable and accepted
|
|
14
14
|
// ONLY if executable and `<bin> version --json` returns the v1 probe:
|
|
15
15
|
// {"schemaVersion":1,"name":"@awebai/oats","version":"0.24.x","desktopApi":1}
|
|
16
|
-
// Desktop accepts desktopApi === 1 and semver >=0.26.0 <0.
|
|
16
|
+
// Desktop accepts desktopApi === 1 and semver >=0.26.0 <0.62.0 (the band is
|
|
17
17
|
// spelled ONCE, in ACCEPT_RANGE below — this line only paraphrases it).
|
|
18
18
|
// API version — not source adjacency — is authoritative.
|
|
19
19
|
//
|
|
@@ -52,7 +52,7 @@ export const DESKTOP_API = 1;
|
|
|
52
52
|
// carry a `description` for every kind and `<kind> update <id> --description`
|
|
53
53
|
// sets one (feature `automation-descriptions`, which gates the Desktop's
|
|
54
54
|
// summary writes). The Desktop v1 surface is otherwise unchanged.
|
|
55
|
-
export const ACCEPT_RANGE = { min: [0, 26, 0], maxExclusive: [0,
|
|
55
|
+
export const ACCEPT_RANGE = { min: [0, 26, 0], maxExclusive: [0, 62, 0] };
|
|
56
56
|
/** The band as humans read it — derived, never hand-spelled, so the probe
|
|
57
57
|
* rejection reason, the backend's /api status and the degradation card can
|
|
58
58
|
* never disagree with the numbers actually enforced above. */
|
|
@@ -15,6 +15,16 @@ export function byRuntimeState(a, b) {
|
|
|
15
15
|
return RUNTIME_ORDER[runtimeState(a)] - RUNTIME_ORDER[runtimeState(b)] || String(a.instance).localeCompare(String(b.instance));
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
/** The words for an instance's siblings (#1312; the list `instanceSiblings` answers, instance-tree.mjs):
|
|
19
|
+
* null for none, else `sibling of a`, `sibling of a and b`, `sibling of a, b and c`, the names in the
|
|
20
|
+
* order given. The same in every client. */
|
|
21
|
+
export function siblingText(siblings) {
|
|
22
|
+
const names = (siblings || []).map((s) => s.instance);
|
|
23
|
+
if (!names.length) return null;
|
|
24
|
+
const list = names.length === 1 ? names[0] : `${names.slice(0, -1).join(", ")} and ${names.at(-1)}`;
|
|
25
|
+
return `sibling of ${list}`;
|
|
26
|
+
}
|
|
27
|
+
|
|
18
28
|
/** The stand-in `unsupportedSession` writes for an older kernel's Herdr row: the one text of a row that is
|
|
19
29
|
* this home's own sentence. Not on the stable surface. */
|
|
20
30
|
export const HERDR_STAND_IN = `E_HERDR_REMOVED: ${HERDR_REMOVED}`;
|
|
@@ -11,16 +11,25 @@ export function collapseKey(workspace, instance) {
|
|
|
11
11
|
return `${workspace || ""}\u0000${instance}`;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
/** An instance's explicit sibling link, as an array of instance names: the one reader of the kernel's
|
|
15
|
+
* `siblingInstance` (string | absent, set only when a sibling relation was declared against a ROOT
|
|
16
|
+
* instance — a sibling of a non-root simply shares the anchor's `parentInstance`). Normalized to an
|
|
17
|
+
* array so callers are shape-agnostic; self-links and non-strings are dropped. The sidebar's
|
|
18
|
+
* `instanceLinks`, `instanceSiblings` and the Desktop's Deployments graph all read the field here. */
|
|
19
|
+
export function siblingLinksOf(instance) {
|
|
20
|
+
const raw = instance.siblingInstance;
|
|
21
|
+
if (typeof raw !== "string" || !raw || raw === instance.instance) return [];
|
|
22
|
+
return [raw];
|
|
23
|
+
}
|
|
24
|
+
|
|
14
25
|
/** Names an instance is directly related to (undirected edge endpoints):
|
|
15
|
-
* its spawn parent plus its explicit sibling link. Kernel
|
|
16
|
-
* (feature/agent-relations, final): `parentInstance` and
|
|
17
|
-
*
|
|
18
|
-
* instance — a sibling of a non-root simply shares the anchor's parent).
|
|
19
|
-
* Absent fields contribute no edges. */
|
|
26
|
+
* its spawn parent plus its explicit sibling link (`siblingLinksOf`). Kernel
|
|
27
|
+
* contract (feature/agent-relations, final): `parentInstance` and
|
|
28
|
+
* `siblingInstance`. Absent fields contribute no edges. */
|
|
20
29
|
export function instanceLinks(instance) {
|
|
21
30
|
const out = [];
|
|
22
31
|
if (instance.parentInstance) out.push(instance.parentInstance);
|
|
23
|
-
|
|
32
|
+
out.push(...siblingLinksOf(instance));
|
|
24
33
|
return out.filter((name) => name && name !== instance.instance);
|
|
25
34
|
}
|
|
26
35
|
|
|
@@ -65,6 +74,39 @@ function rosterOrder(a, b) {
|
|
|
65
74
|
return String(a.instance).localeCompare(String(b.instance)) || (ia < ib ? -1 : ia > ib ? 1 : 0);
|
|
66
75
|
}
|
|
67
76
|
|
|
77
|
+
/** Each instance's siblings by EXPLICIT link (#1312): Y is X's sibling when X's sibling link
|
|
78
|
+
* (`siblingLinksOf`) resolves to Y (`resolveLinkId` over `instances`), or Y's resolves to X. So both
|
|
79
|
+
* ends of a link name each other. Direct links only (a chain C→B→A gives B [A, C], A [B], C [B]; A and
|
|
80
|
+
* C are not inferred), self excluded, de-duplicated by instanceId, each list in the roster's order
|
|
81
|
+
* (`rosterOrder`). Instances that share a parent are not siblings here (their relation is "under
|
|
82
|
+
* <parent>"), and `relation`/`relativeTo` are not read: they record how an instance was spawned, not a
|
|
83
|
+
* current relation. Pass one deployment's FULL roster, never a filtered list: dropping rows can turn an
|
|
84
|
+
* ambiguous name into a false unique one. Returns Map<instanceId, instance[]>; an instance with no
|
|
85
|
+
* sibling is absent from the map. */
|
|
86
|
+
export function instanceSiblings(instances) {
|
|
87
|
+
const byId = new Map(instances.map((i) => [instanceId(i), i]));
|
|
88
|
+
const byName = new Map();
|
|
89
|
+
for (const i of instances) {
|
|
90
|
+
if (!byName.has(i.instance)) byName.set(i.instance, []);
|
|
91
|
+
byName.get(i.instance).push(i);
|
|
92
|
+
}
|
|
93
|
+
const ids = new Map(); // id -> Set of sibling ids
|
|
94
|
+
const add = (a, b) => {
|
|
95
|
+
if (!ids.has(a)) ids.set(a, new Set());
|
|
96
|
+
ids.get(a).add(b);
|
|
97
|
+
};
|
|
98
|
+
for (const i of instances) {
|
|
99
|
+
const id = instanceId(i);
|
|
100
|
+
for (const name of siblingLinksOf(i)) {
|
|
101
|
+
const other = resolveLinkId(i, name, byName);
|
|
102
|
+
if (!other || other === id) continue;
|
|
103
|
+
add(id, other);
|
|
104
|
+
add(other, id);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return new Map([...ids].map(([id, set]) => [id, [...set].map((s) => byId.get(s)).sort(rosterOrder)]));
|
|
108
|
+
}
|
|
109
|
+
|
|
68
110
|
/** Group instances into agent CLUSTERS — connected components of the
|
|
69
111
|
* undirected relation graph (parent/child spawn edges + sibling links).
|
|
70
112
|
* Unrelated instances are single-node clusters. Within a cluster the
|
|
@@ -18,9 +18,9 @@ export { remoteRosterState } from "../../client/remote-roster.mjs";
|
|
|
18
18
|
export { observeIdentities, identityMemory } from "../../client/remote-identity-memory.mjs";
|
|
19
19
|
export { workspaceChoiceRows, choiceMatches, UNMATCHED_SECTION } from "../../client/workspace-choices.mjs";
|
|
20
20
|
export { shortPath, deploymentLabel } from "../../client/deployment-label.mjs";
|
|
21
|
-
export { instanceId, instanceVisibleInTree, waitingRollup, collapseKey, filterInstanceTree, hasInstanceChildren, heldHome } from "../../client/instance-tree.mjs";
|
|
21
|
+
export { instanceId, instanceVisibleInTree, waitingRollup, collapseKey, filterInstanceTree, hasInstanceChildren, heldHome, instanceSiblings } from "../../client/instance-tree.mjs";
|
|
22
22
|
export { rosterSections, deploymentState, rowStale, primaryDeployment, isMultiDeployment } from "../../client/roster-sections.mjs";
|
|
23
|
-
export { runtimeState, runtimeCounts, originLead } from "../../client/instance-presentation.mjs";
|
|
23
|
+
export { runtimeState, runtimeCounts, originLead, siblingText } from "../../client/instance-presentation.mjs";
|
|
24
24
|
export { waitingClaim, waitingLabel, waitedText, waitingClock, waitingBelowText } from "../../client/waiting-on-you.mjs";
|
|
25
25
|
export { instanceActs, openAct } from "../../client/instance-acts.mjs";
|
|
26
26
|
export { rowReason } from "../../client/remote-address.mjs";
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// in. What it adds is the TUI's: the window, the clock times, and which fact stands on which line.
|
|
8
8
|
import {
|
|
9
9
|
TERMS, panelData, displayLine, DETAIL_WITHHELD, originLead, instanceId, instanceVisibleInTree, waitingRollup, collapseKey, filterInstanceTree,
|
|
10
|
-
hasInstanceChildren, heldHome, rosterSections, deploymentState, rowStale, primaryDeployment, isMultiDeployment, runtimeState, runtimeCounts,
|
|
10
|
+
hasInstanceChildren, heldHome, instanceSiblings, siblingText, rosterSections, deploymentState, rowStale, primaryDeployment, isMultiDeployment, runtimeState, runtimeCounts,
|
|
11
11
|
waitingClaim, waitingLabel, waitedText, waitingClock, waitingBelowText, instanceActs, rowReason,
|
|
12
12
|
identityMemory, viewModel, workspaceChoices, workspaceChoiceRows, choiceMatches, UNMATCHED_SECTION, shortPath,
|
|
13
13
|
openAct, deployments as heldDeployments, attachExit, preflightFailure, kernelLines,
|
|
@@ -129,6 +129,12 @@ function build(state, at) {
|
|
|
129
129
|
const sectionOf = new Map(), ordered = [];
|
|
130
130
|
for (const part of rosterSections(instances, instances, deployments, TERMS)) for (const group of part.groups) for (const cluster of group.clusters) for (const row of cluster.instances) { sectionOf.set(instanceId(row), part.deployment?.id ?? null); ordered.push(row); }
|
|
131
131
|
const section = (row) => sectionOf.get(instanceId(row)) ?? null;
|
|
132
|
+
// Each instance's siblings by explicit link, both ends, as the shared home resolves them (#1312):
|
|
133
|
+
// asked of each section's full roster on its own, whatever is filtered or folded, so a name never
|
|
134
|
+
// resolves to an instance of another deployment, nor a dropped row makes an ambiguous name unique.
|
|
135
|
+
const bySection = new Map();
|
|
136
|
+
for (const row of instances) { const key = section(row); if (!bySection.has(key)) bySection.set(key, []); bySection.get(key).push(row); }
|
|
137
|
+
const siblings = new Map([...bySection.values()].flatMap((own) => [...instanceSiblings(own)]));
|
|
132
138
|
const matched = soul !== null ? filterInstanceTree(instances, soul.name, (row) => soul.names.includes(row.agent)) : filterInstanceTree(instances, query);
|
|
133
139
|
const visible = matched.filter((i) => instanceVisibleInTree(i, instances, state.collapsed, state.open, filtering, { section }));
|
|
134
140
|
const sections = rosterSections(instances, visible, deployments, TERMS);
|
|
@@ -213,7 +219,7 @@ function build(state, at) {
|
|
|
213
219
|
// observed, nor for a machine that is not live and has no row kept. Each has only its reason.
|
|
214
220
|
const observed = panel !== null && !gone && (local ? status === "observed" : live || instances.length > 0);
|
|
215
221
|
return {
|
|
216
|
-
panel, gone, instances, ordered, deployments, multi, parts, rows, filtering, stale, section, live, observed, folded,
|
|
222
|
+
panel, gone, instances, ordered, deployments, multi, parts, rows, filtering, stale, section, siblings, live, observed, folded,
|
|
217
223
|
below: waitingRollup(instances, state.collapsed, state.open, { filtering, stale, section }),
|
|
218
224
|
status,
|
|
219
225
|
workspace: text(panel?.workspace?.name) ? panel.workspace.name : "",
|
|
@@ -490,7 +496,7 @@ function detailOf(state, r, item, now, acts) {
|
|
|
490
496
|
add("harness", `${[row.harness, row.model].filter(text).join(", ")}${text(row.model) && text(row.modelFrom) ? ` (${row.modelFrom})` : ""}`);
|
|
491
497
|
add("work", [row.work, row.branch].filter(text).join(", "));
|
|
492
498
|
add("team", row.team);
|
|
493
|
-
add("parent", [row.parentInstance,
|
|
499
|
+
add("parent", [row.parentInstance, siblingText(r.siblings.get(item.id))].filter(text).join(", "));
|
|
494
500
|
if (text(row.startedAt)) add("started", waitingClock(row.startedAt, now));
|
|
495
501
|
add("home", row.home, "end");
|
|
496
502
|
return { title: row.instance, facts };
|
|
@@ -552,7 +558,7 @@ const PALETTE_ACTS = Object.freeze({ stop: "Stop", restart: "Restart", retire: "
|
|
|
552
558
|
* the selected one) and, once the catalog lists its soul, another of that soul, then spawning an
|
|
553
559
|
* agent, workspaces, refresh and help, and the split's that apply. With a query, each group keeps the rows the
|
|
554
560
|
* Desktop's subsequence score matches, the best first (a prefix first); a tie keeps that order.
|
|
555
|
-
* A row: `{ key, kind, label, does?, id?, name?, machine?, mark?, capability?, source? }`; `selected` is the key the
|
|
561
|
+
* A row: `{ key, kind, label, does?, id?, name?, machine?, mark?, sibling?, capability?, source? }`; `selected` is the key the
|
|
556
562
|
* selection stands on (the first row when the palette's own is not listed). */
|
|
557
563
|
export function paletteItems(state, at = new Date(0).toISOString()) {
|
|
558
564
|
const p = state.palette;
|
|
@@ -565,7 +571,11 @@ export function paletteItems(state, at = new Date(0).toISOString()) {
|
|
|
565
571
|
const openable = r.ordered.filter((row) => openDecision(state, row, instanceActs(row)).open);
|
|
566
572
|
groups.push(openable.map((row, i) => ({ row, i })).sort((a, b) => rank(a.row) - rank(b.row) || a.i - b.i).map(({ row }) => {
|
|
567
573
|
const machine = elsewhere(row) ? row.deployment?.machine ?? row.server : null;
|
|
568
|
-
|
|
574
|
+
// `sibling`: the shared words for its siblings, or null; never part of what a query matches.
|
|
575
|
+
return {
|
|
576
|
+
key: `instance\u0000${instanceId(row)}`, kind: "instance", label: row.instance, id: instanceId(row), name: row.instance, machine, mark: markOf(row),
|
|
577
|
+
sibling: siblingText(r.siblings.get(instanceId(row))), text: `${row.instance} ${machine ?? ""}`,
|
|
578
|
+
};
|
|
569
579
|
}));
|
|
570
580
|
}
|
|
571
581
|
// The souls of the open workspace, once its catalog was read (the Souls view opened): choosing
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// The palette (docs/tui.md, "The palette"): (model, area) -> rows of spans, over the whole body.
|
|
2
2
|
// Pure: no IO, no clock, no escape byte. One input over a list: the query on the first row, then
|
|
3
3
|
// the window of the rows lib/model.mjs paletteItems lists, the selected one in reverse with `>`.
|
|
4
|
-
// An instance's, a soul's or a capability's name, a machine,
|
|
5
|
-
// query are text the TUI did not write and go through shown(); the
|
|
6
|
-
// commands are the TUI's own. Nothing is told by colour
|
|
4
|
+
// An instance's, a soul's or a capability's name, a machine, an instance's siblings, where a
|
|
5
|
+
// capability comes from and the query are text the TUI did not write and go through shown(); the
|
|
6
|
+
// labels of the views, the acts and the commands are the TUI's own. Nothing is told by colour
|
|
7
|
+
// alone: each row says in a word what kind it is.
|
|
7
8
|
import { lit, shown } from "../term/text.mjs";
|
|
8
9
|
import { style } from "../term/style.mjs";
|
|
9
10
|
import { cutNote, marksOf, measured } from "./instances.mjs";
|
|
@@ -37,6 +38,9 @@ function itemRow(item, cols, marks) {
|
|
|
37
38
|
const name = measured(item.name);
|
|
38
39
|
put(name.text, name.width, PLAIN);
|
|
39
40
|
if (item.machine !== null && item.machine !== undefined) { put(lit(ON), ON.length, DIM); const where = measured(item.machine); put(where.text, where.width, DIM); }
|
|
41
|
+
// An instance's siblings, dim, in the shared words (which hold their names): last, so the
|
|
42
|
+
// first cut, and the name keeps the room.
|
|
43
|
+
if (item.kind === "instance" && item.sibling) { const kin = measured(item.sibling); put(kin.text, kin.width, DIM); }
|
|
40
44
|
} else if (item.kind === "capability") {
|
|
41
45
|
// A capability's name and, dim, where it comes from (its repository or package): text from outside.
|
|
42
46
|
const name = measured(item.name), where = measured(item.source);
|
|
@@ -60,7 +60,7 @@ members:
|
|
|
60
60
|
- git:github.com/acme/agents # the host is a member too
|
|
61
61
|
- git:github.com/acme/platform
|
|
62
62
|
packages:
|
|
63
|
-
oats.framework: v1.
|
|
63
|
+
oats.framework: v1.13.0 # bare versions resolve through the official catalog
|
|
64
64
|
oats.okf: v5.2.1
|
|
65
65
|
defaults:
|
|
66
66
|
capabilities: { oats.core: { from: package } }
|