@awebai/oats 0.44.1 → 0.45.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/bin/oats.mjs +4 -3
- package/docs/desktop-cli-api.md +25 -9
- package/docs/desktop.md +4 -4
- package/docs/release-notes/v0.45.0.md +56 -0
- package/lib/instance-resolution.mjs +18 -4
- package/lib/operator-coverage.mjs +10 -6
- package/package.json +1 -1
package/bin/oats.mjs
CHANGED
|
@@ -1971,7 +1971,8 @@ async function capabilityFacts(rows, discovery, lock, ctx, remote = remoteModule
|
|
|
1971
1971
|
}
|
|
1972
1972
|
|
|
1973
1973
|
/** Souls rows' spawnability (feature desktop-facts): the refusal a spawn of each would meet, computed from
|
|
1974
|
-
* discovery and the lock without spawning (soulSpawnability)
|
|
1974
|
+
* discovery and the lock without spawning (soulSpawnability), and what the same resolution composes
|
|
1975
|
+
* (`capabilities`, feature souls-capabilities; null when not spawnable). */
|
|
1975
1976
|
async function soulFacts(rows, discovery, lock, ctx, remote = remoteModule) {
|
|
1976
1977
|
const { soulSpawnability } = await import("../lib/instance-resolution.mjs");
|
|
1977
1978
|
// Indexes built once, each keeping the FIRST match as `find` did (a scan per row was O(souls × members)).
|
|
@@ -1984,7 +1985,7 @@ async function soulFacts(rows, discovery, lock, ctx, remote = remoteModule) {
|
|
|
1984
1985
|
for (const row of rows) {
|
|
1985
1986
|
const entry = entryOf(row);
|
|
1986
1987
|
row.file = { path: `${row.path}/soul.yaml`, url: remoteModule.browseUrl(row.repoKey, row.commit, `${row.path}/soul.yaml`) };
|
|
1987
|
-
Object.assign(row, entry ? await soulSpawnability(ctx.local, discovery, lock, entry, { remoteOptions: ctx.remoteOptions, remote }) : { spawnable: false, problem: { code: "E_SOUL_UNKNOWN", message: `${row.name} is not in this discovery` } });
|
|
1988
|
+
Object.assign(row, entry ? await soulSpawnability(ctx.local, discovery, lock, entry, { remoteOptions: ctx.remoteOptions, remote }) : { spawnable: false, problem: { code: "E_SOUL_UNKNOWN", message: `${row.name} is not in this discovery` }, capabilities: null });
|
|
1988
1989
|
}
|
|
1989
1990
|
}
|
|
1990
1991
|
|
|
@@ -3388,7 +3389,7 @@ function versionCmd() {
|
|
|
3388
3389
|
// Phase B: `instance-modules` and `spawn-provider-payload` are advertised only once spawn
|
|
3389
3390
|
// runs on resolve/materialize (contract §6); a feature the binary does not implement is
|
|
3390
3391
|
// never listed.
|
|
3391
|
-
console.log(JSON.stringify({ schemaVersion: 1, name: "@awebai/oats", version: OATS_VERSION, desktopApi: 1, harnesses: ["pi", "claude", "codex"], sessionBackends: ["tmux"], launchOptions: ["yolo"], remote: ["spawn", "retire", "status", "session", "session-start", "session-restart", "launch-config", "roster", "harvest", "schedule", "session-upload", "operations", "readiness", "instance-events", "instance-git", "lifecycle-plans"], features: ["retire-home", "session-start", "session-restart", "launch-config", "schedule", "schedule-host-caps", "session-upload", "operations", "instance-git", "instance-git-remote", "souls-declarations", "lifecycle-plans", "retire-retention", "readiness", "spawn-preview", "instance-events", "instance-events-2", "schedule-history", "schedule-read-2", "spawn-preview-2", "spawn-idempotency", "spawn-idempotency-2", "spawn-apply-2", "workspace-v2", "instance-modules", "spawn-provider-payload", "served-identity", "packages-no-approval", "spawn-name", "settings-origins", "team-model-3", "settings-declared", "capabilities-private", "layers-from", "harness", "package-souls", "triggers", "automations", "desktop-facts", "launch-preference", "preview-composed-from", "observe-max-age", "spawn-preview-max-age", "launch-config-default", "capability-show", "capture-file", "workspace-identity", "server-connect", "capability-route", "servers-per-workspace", "operator-default-soul", "waiting-on-you", "automation-descriptions"], automationsApi: A.AUTOMATIONS_API, workspaceApi: 2, instanceGitApi: 1, spawnApplyApi: 1, soulsApi: 2, lifecycleApi: 1, readinessApi: 2, spawnPreviewApi: 2, eventsApi: 2, scheduleHistoryApi: 3, scheduleApi: SCHEDULE_API, operationsApi: 2, capabilityShowApi: 1 }));
|
|
3392
|
+
console.log(JSON.stringify({ schemaVersion: 1, name: "@awebai/oats", version: OATS_VERSION, desktopApi: 1, harnesses: ["pi", "claude", "codex"], sessionBackends: ["tmux"], launchOptions: ["yolo"], remote: ["spawn", "retire", "status", "session", "session-start", "session-restart", "launch-config", "roster", "harvest", "schedule", "session-upload", "operations", "readiness", "instance-events", "instance-git", "lifecycle-plans"], features: ["retire-home", "session-start", "session-restart", "launch-config", "schedule", "schedule-host-caps", "session-upload", "operations", "instance-git", "instance-git-remote", "souls-declarations", "lifecycle-plans", "retire-retention", "readiness", "spawn-preview", "instance-events", "instance-events-2", "schedule-history", "schedule-read-2", "spawn-preview-2", "spawn-idempotency", "spawn-idempotency-2", "spawn-apply-2", "workspace-v2", "instance-modules", "spawn-provider-payload", "served-identity", "packages-no-approval", "spawn-name", "settings-origins", "team-model-3", "settings-declared", "capabilities-private", "layers-from", "harness", "package-souls", "triggers", "automations", "desktop-facts", "launch-preference", "preview-composed-from", "observe-max-age", "spawn-preview-max-age", "launch-config-default", "capability-show", "capture-file", "workspace-identity", "server-connect", "capability-route", "servers-per-workspace", "operator-default-soul", "waiting-on-you", "automation-descriptions", "souls-capabilities"], automationsApi: A.AUTOMATIONS_API, workspaceApi: 2, instanceGitApi: 1, spawnApplyApi: 1, soulsApi: 2, lifecycleApi: 1, readinessApi: 2, spawnPreviewApi: 2, eventsApi: 2, scheduleHistoryApi: 3, scheduleApi: SCHEDULE_API, operationsApi: 2, capabilityShowApi: 1 }));
|
|
3392
3393
|
return;
|
|
3393
3394
|
}
|
|
3394
3395
|
console.log(`@awebai/oats ${OATS_VERSION} (desktop API v1)`);
|
package/docs/desktop-cli-api.md
CHANGED
|
@@ -38,8 +38,9 @@ canonical (`github.com/<org>/<repo>`, or `local/<abs-path>`). Examples use
|
|
|
38
38
|
"instance-events-2","schedule-history","schedule-read-2","spawn-preview-2","spawn-idempotency","spawn-idempotency-2","spawn-apply-2",
|
|
39
39
|
"workspace-v2","instance-modules","spawn-provider-payload","served-identity","packages-no-approval","spawn-name","settings-origins",
|
|
40
40
|
"team-model-3","settings-declared","capabilities-private","layers-from","harness","package-souls","triggers","automations","desktop-facts","launch-preference",
|
|
41
|
-
"preview-composed-from","observe-max-age","spawn-preview-max-age","capability-show","capture-file",
|
|
42
|
-
"server-connect","capability-route","servers-per-workspace","operator-default-soul","waiting-on-you"
|
|
41
|
+
"preview-composed-from","observe-max-age","spawn-preview-max-age","launch-config-default","capability-show","capture-file",
|
|
42
|
+
"workspace-identity","server-connect","capability-route","servers-per-workspace","operator-default-soul","waiting-on-you",
|
|
43
|
+
"automation-descriptions","souls-capabilities"],
|
|
43
44
|
"automationsApi":1,"workspaceApi":2,"instanceGitApi":1,"spawnApplyApi":1,"soulsApi":2,"lifecycleApi":1,
|
|
44
45
|
"readinessApi":2,"spawnPreviewApi":2,"eventsApi":2,"scheduleHistoryApi":3,"scheduleApi":2,"operationsApi":2,
|
|
45
46
|
"capabilityShowApi":1}
|
|
@@ -109,6 +110,7 @@ canonical (`github.com/<org>/<repo>`, or `local/<abs-path>`). Examples use
|
|
|
109
110
|
| `operator-default-soul` | a capability command from a deployment without `--soul` runs as the first soul that provides its namespace (named on stderr); none is `E_BAD_ARGS`, OATS 0.39.0 ([capabilities.md](capabilities.md)) | |
|
|
110
111
|
| `waiting-on-you` | the `waiting` event kind and the session boundary rule; `oats instance waiting` and `oats instance attention`; `waitingOnYou` (with `message`) on `oats status --json` instance rows, on `oats session inspect --json` and in the events read, OATS 0.40.0 ([Waiting on you](#waiting-on-you)) | `eventsApi: 2` |
|
|
111
112
|
| `automation-descriptions` | a `description` on every trigger and schedule row, local or workspace, by one rule; `oats schedule update <id> --description=<text>` (the description only) and `oats trigger update <id> --description=<text>`; `--description=<text>` on `schedule add` and `trigger add`, OATS 0.43.0 ([Shared row fields](#automations-shared-rows)) | |
|
|
113
|
+
| `souls-capabilities` | `capabilities` on `oats souls --json` rows: the capabilities each soul composes, keyed like `oats capabilities` rows, with `from`, OATS 0.45.0 ([`oats capabilities` and `oats souls`](#oats-capabilities---dir---json--capabilitiesapi-1--oats-souls---dir---json--soulsapi-1)) | |
|
|
112
114
|
|
|
113
115
|
Payload-only integers, never in the probe: `onboardApi: 2`, `syncApi: 1`,
|
|
114
116
|
`workspaceStatusApi: 1`, `capabilitiesApi: 1`, the `oats souls` document's
|
|
@@ -826,12 +828,14 @@ packages' capabilities and souls, sorted by name, then origin. Both carry
|
|
|
826
828
|
"teams":[{"label":"mine","team":"mine:ana.aweb.ai","default":true,"from":"local"},{"label":"global","team":null,"default":false,"from":"shared"}],
|
|
827
829
|
"defaultTeam":{"label":"mine","team":"mine:ana.aweb.ai","from":"deployment"},
|
|
828
830
|
"private":false,"path":"souls/writer","work":"directory","description":"Drafts campaigns.","harness":"pi","model":null,"harnessFrom":"kernel-default",
|
|
829
|
-
"file":{"path":"souls/writer/soul.yaml","url":null},"spawnable":true,"problem":null
|
|
831
|
+
"file":{"path":"souls/writer/soul.yaml","url":null},"spawnable":true,"problem":null,
|
|
832
|
+
"capabilities":[{"name":"oats.aweb","kind":"package","package":"oats.aweb","from":"workspace"}]},
|
|
830
833
|
{"name":"knowledge-maintainer","qualifiedName":"oats.okf/knowledge-maintainer","origin":"package oats.okf v4.1.1","kind":"package","package":"oats.okf",
|
|
831
834
|
"version":"4.1.1","repoKey":"github.com/awebai/oats-okf","commit":"e1d604f7…","teams":null,"defaultTeam":null,"private":false,
|
|
832
835
|
"path":"oats-package/souls/knowledge-maintainer","work":"directory","description":"Reviews harvested knowledge.","harness":"pi","model":null,
|
|
833
836
|
"harnessFrom":"kernel-default","file":{"path":"oats-package/souls/knowledge-maintainer/soul.yaml","url":null},
|
|
834
|
-
"spawnable":false,"problem":{"code":"E_TEAM_UNKNOWN","message":"team \"reviewers\" is not declared (oats-local.yaml#/defaultTeam): …"}
|
|
837
|
+
"spawnable":false,"problem":{"code":"E_TEAM_UNKNOWN","message":"team \"reviewers\" is not declared (oats-local.yaml#/defaultTeam): …"},
|
|
838
|
+
"capabilities":null}],
|
|
835
839
|
"problems":[]}
|
|
836
840
|
```
|
|
837
841
|
|
|
@@ -846,7 +850,8 @@ are absent until `sync`.
|
|
|
846
850
|
**Soul rows:** `name, origin, kind (member | external | package), repoKey,
|
|
847
851
|
commit, teams, defaultTeam, private (always false), path, work, description`,
|
|
848
852
|
plus the Desktop facts `harness, model, harnessFrom, file, spawnable,
|
|
849
|
-
problem`,
|
|
853
|
+
problem`, (feature `souls-capabilities`) `capabilities`, and (feature
|
|
854
|
+
`launch-preference`) `key` and `launch`.
|
|
850
855
|
- `key` is the soul key that `souls.launch` uses, and that
|
|
851
856
|
`oats soul teams <key>` takes: `qualifiedName` for a package
|
|
852
857
|
soul, the bare `name` for a member or external soul. Two member souls that
|
|
@@ -857,6 +862,16 @@ problem`, and (feature `launch-preference`) `key` and `launch`.
|
|
|
857
862
|
[TeamRow](#the-team-row-teamrow) list and a
|
|
858
863
|
[DefaultTeam](#the-default-defaultteam); both `null` when the soul's teams
|
|
859
864
|
do not resolve (`problem` names the `E_TEAM_*` code).
|
|
865
|
+
- `capabilities` (feature `souls-capabilities`, OATS 0.45.0): what the soul's
|
|
866
|
+
resolution composes, slots and additive alike, sorted by `name`. Each entry
|
|
867
|
+
names its capability with the capability row's own keys: `name`, `kind`
|
|
868
|
+
(`member` | `package`), then `repoKey` for a member or `package` for a
|
|
869
|
+
package, so it matches exactly one `oats capabilities` row. `from` is why
|
|
870
|
+
the soul has it: `soul` (it declares it) or `workspace` (a workspace
|
|
871
|
+
default), as in inspect's `layers.<slot>.from`. A capability the soul
|
|
872
|
+
turned off (`off`, or `<slot>: none` over a workspace default) is not
|
|
873
|
+
listed. `null` whenever `spawnable` is false (`problem` names why),
|
|
874
|
+
including a soul disabled on this machine; never `[]` for unknown.
|
|
860
875
|
- Package souls (feature `package-souls`) add `qualifiedName`
|
|
861
876
|
(`<package>/<soul>`), `package` and `version`. Spawn one by
|
|
862
877
|
`qualifiedName` (the bare name when unique). Its instances live under
|
|
@@ -1353,8 +1368,9 @@ offers **covers** it when all of these hold on this machine:
|
|
|
1353
1368
|
- it is not in `souls.disabled`;
|
|
1354
1369
|
- it resolves as a spawn would;
|
|
1355
1370
|
- its modules include `oats.setup`;
|
|
1356
|
-
- it
|
|
1357
|
-
|
|
1371
|
+
- it does not empty the messaging slot the workspace fills (`messaging:
|
|
1372
|
+
none`), so it stays reachable. Emptying `knowledge` or `tasks` does not
|
|
1373
|
+
disqualify it (0.45.0).
|
|
1358
1374
|
|
|
1359
1375
|
It covers a team when that team is among its resolved teams. Detection is by
|
|
1360
1376
|
composition only: a soul's name never counts, and there is no role marker. An
|
|
@@ -1388,8 +1404,8 @@ relevant, each as `{soul, code}`:
|
|
|
1388
1404
|
- a soul whose `soul.yaml` names `oats.setup` but that is disabled
|
|
1389
1405
|
(`E_SOUL_DISABLED`), ambiguous (`E_SOUL_AMBIGUOUS`) or refused (the
|
|
1390
1406
|
resolution's code);
|
|
1391
|
-
- a soul that composes `oats.setup` but empties
|
|
1392
|
-
(`slot-none`, with `slots`).
|
|
1407
|
+
- a soul that composes `oats.setup` but empties the messaging slot the
|
|
1408
|
+
workspace fills (`slot-none`, with `slots: ["messaging"]`).
|
|
1393
1409
|
|
|
1394
1410
|
Coverage that holds adds no item.
|
|
1395
1411
|
|
package/docs/desktop.md
CHANGED
|
@@ -383,10 +383,10 @@ Roster rows, soul cards, the soul page, the context panel and the spawn
|
|
|
383
383
|
dialog show each instance's or soul's harness as a small badge, next to its
|
|
384
384
|
name. The badge names the harness the CLI reports; it says nothing about
|
|
385
385
|
whether that harness is installed or signed in. Pi's badge is the official
|
|
386
|
-
pi.dev press-kit mark (MIT)
|
|
387
|
-
|
|
388
|
-
with or endorsed by Anthropic or OpenAI. An
|
|
389
|
-
shows "?". Sources and licences are in
|
|
386
|
+
pi.dev press-kit mark (MIT), and Claude Code's is Anthropic's Claude spark
|
|
387
|
+
in the theme's colours. The Codex badge is OATS's own drawing, not OpenAI's
|
|
388
|
+
logo. OATS is not affiliated with or endorsed by Anthropic or OpenAI. An
|
|
389
|
+
unknown or unreported harness shows "?". Sources and licences are in
|
|
390
390
|
`packages/desktop/renderer/harness-marks/README.md`.
|
|
391
391
|
|
|
392
392
|
## Security posture
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# OATS 0.45.0
|
|
2
|
+
|
|
3
|
+
## Added
|
|
4
|
+
|
|
5
|
+
- **`oats souls` rows say what each soul composes.** Each row of
|
|
6
|
+
`oats souls --json` carries `capabilities`: the capabilities its
|
|
7
|
+
resolution composes, keyed like `oats capabilities` rows (`name`, `kind`,
|
|
8
|
+
`repoKey` or `package`), each with `from` (`soul` or `workspace`). A soul
|
|
9
|
+
that does not resolve has `null`. The Desktop uses it to say which souls
|
|
10
|
+
use a capability, including ones no live instance carries. Feature
|
|
11
|
+
`souls-capabilities`; `soulsApi` is unchanged. See
|
|
12
|
+
[`oats capabilities` and `oats souls`](../desktop-cli-api.md#oats-capabilities---dir---json--capabilitiesapi-1--oats-souls---dir---json--soulsapi-1).
|
|
13
|
+
|
|
14
|
+
## Changed
|
|
15
|
+
|
|
16
|
+
- **The Desktop accepts OATS CLIs `>=0.25.8 <0.46.0`**, so it runs against
|
|
17
|
+
0.45. Upgrade the Desktop and the CLI together: a 0.44 Desktop refuses a 0.45
|
|
18
|
+
CLI as outside its band. Without `souls-capabilities` (an older CLI), *Used by*
|
|
19
|
+
keeps its earlier, live-instance behaviour.
|
|
20
|
+
- **Desktop: Capabilities says which souls use each capability, without the
|
|
21
|
+
Source column.**
|
|
22
|
+
- **Used by.** With `souls-capabilities`, *Used by* lists the souls whose
|
|
23
|
+
composition includes the capability, matched by name and source (its
|
|
24
|
+
repository or package). Before, it listed only souls with a live instance
|
|
25
|
+
that recorded it, so a capability souls declare read "Not used" until one
|
|
26
|
+
ran. A soul that does not resolve is not counted, and a workspace default
|
|
27
|
+
still reads "Every soul". The capability page lists one row per soul, with
|
|
28
|
+
that soul's live instances carrying it (0 when none runs). A package
|
|
29
|
+
soul's instances are found by its `<package>--<soul>` agent name. With an
|
|
30
|
+
older OATS, *Used by* stays instance-derived, as before.
|
|
31
|
+
- **No Source column.** Each group's heading names where its capabilities
|
|
32
|
+
come from, so the column repeated it. The row's accessible name still
|
|
33
|
+
says "from <source>", and the capability page keeps its *Comes from*
|
|
34
|
+
card.
|
|
35
|
+
- **Packages grouped by package.** The Packages section is headed per
|
|
36
|
+
package, like the other two sections are per repository:
|
|
37
|
+
"package · v<version> · N capabilities".
|
|
38
|
+
|
|
39
|
+
- **Desktop: the Claude Code harness badge shows the Claude spark.** It
|
|
40
|
+
replaces the four-pointed sparkle from 0.44.1. The mark is Anthropic's spark,
|
|
41
|
+
geometry unmodified, in ivory on the same terracotta tile, and it holds 4.5:1
|
|
42
|
+
in White, Solarized and Dark. Pi and Codex are unchanged, and the badge keeps
|
|
43
|
+
its accessible name ("Harness: Claude"). Source and terms are in
|
|
44
|
+
`packages/desktop/renderer/harness-marks/README.md`.
|
|
45
|
+
|
|
46
|
+
## Fixed
|
|
47
|
+
|
|
48
|
+
- **An operator soul may empty its knowledge and tasks slots.** Operator
|
|
49
|
+
coverage (readiness and doctor) excluded a soul that composes `oats.setup`
|
|
50
|
+
when it emptied any slot the workspace fills, so a setup soul with
|
|
51
|
+
`knowledge: none` or `tasks: none` left permanent warnings: its teams
|
|
52
|
+
uncovered, and `operator-soul-missing` naming it ("not usable here: …
|
|
53
|
+
slot-none") when it was the only one. Only `messaging: none` now excludes
|
|
54
|
+
it, so an operator stays reachable. The items' shape and codes are
|
|
55
|
+
unchanged. See
|
|
56
|
+
[Operator coverage items](../desktop-cli-api.md#operator-coverage-items).
|
|
@@ -481,12 +481,26 @@ export function requireMemberClone(prepared, { explicit } = {}) {
|
|
|
481
481
|
/** Would a spawn of this discovered soul be refused before it touches this machine (feature desktop-facts)?
|
|
482
482
|
* The same checks prepareInstance makes — souls.disabled, then the soul's resolution (its teams here, slot
|
|
483
483
|
* conflicts, missing or private capabilities, compatibility …) — without spawning anything.
|
|
484
|
-
*
|
|
484
|
+
* `capabilities` (feature souls-capabilities) is what that one resolution composes, one entry per module in
|
|
485
|
+
* its order (by name, codepoint), keyed like an `oats capabilities` row — { name, kind: "member", repoKey,
|
|
486
|
+
* from } | { name, kind: "package", package, from } — with `from` its capabilitiesFrom ("soul" | "workspace").
|
|
487
|
+
* null whenever the soul is not spawnable: nothing resolved, so nothing is known to be composed.
|
|
488
|
+
* → { spawnable: true, problem: null, capabilities: [...] } | { spawnable: false, problem: { code, message }, capabilities: null } */
|
|
485
489
|
export async function soulSpawnability(local, discovery, lock, soulEntry, { remoteOptions, remote } = {}) {
|
|
486
490
|
const disabled = disabledEntry(local, soulEntry);
|
|
487
|
-
if (disabled !== null) return { spawnable: false, problem: { code: "E_SOUL_DISABLED", message: `disabled on this machine (oats-local.yaml souls.disabled: ${disabled})` } };
|
|
488
|
-
|
|
489
|
-
|
|
491
|
+
if (disabled !== null) return { spawnable: false, problem: { code: "E_SOUL_DISABLED", message: `disabled on this machine (oats-local.yaml souls.disabled: ${disabled})` }, capabilities: null };
|
|
492
|
+
let resolution;
|
|
493
|
+
try { resolution = await resolveSoul(discovery, soulEntry, { local, lock, spawn: {}, remoteOptions, remote }); }
|
|
494
|
+
catch (e) { if (typeof e?.code === "string" && e.code.startsWith("E_")) return { spawnable: false, problem: { code: e.code, message: e.message }, capabilities: null }; throw e; }
|
|
495
|
+
return { spawnable: true, problem: null, capabilities: composedCapabilities(resolution) };
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/** A resolution's modules as `oats capabilities` row identities, each with why the soul has it (feature
|
|
499
|
+
* souls-capabilities). Only the identity keys: no commit, version, layer or integrity. */
|
|
500
|
+
function composedCapabilities(resolution) {
|
|
501
|
+
return resolution.modules.map((m) => m.from.kind === "package"
|
|
502
|
+
? { name: m.name, kind: "package", package: m.from.package, from: resolution.capabilitiesFrom[m.name] }
|
|
503
|
+
: { name: m.name, kind: "member", repoKey: m.from.repoKey, from: resolution.capabilitiesFrom[m.name] });
|
|
490
504
|
}
|
|
491
505
|
|
|
492
506
|
/** The async half of a spawn: everything that touches the network. Returns a
|
|
@@ -8,6 +8,10 @@ import { resolveSoul } from "./resolve.mjs";
|
|
|
8
8
|
|
|
9
9
|
export const OPERATOR_CAPABILITY = "oats.setup";
|
|
10
10
|
const SEAT = "an eligible soul is not a launched seat";
|
|
11
|
+
/** The core slot an operator must not empty (maintainer decision, 0.45.0): messaging, so it is reachable.
|
|
12
|
+
* Emptying knowledge or tasks (`knowledge: none`, `tasks: none`) does not disqualify an operator. Only
|
|
13
|
+
* `slot-none` is judged here: a capability the soul turns `off` is not (#671's rule, unchanged). */
|
|
14
|
+
const OPERATOR_SLOTS = new Set(["messaging"]);
|
|
11
15
|
|
|
12
16
|
/** The Desktop refuses a whole readiness answer whose item `reason` or `remedy` is over 1024 characters
|
|
13
17
|
* (packages/desktop/renderer/readiness-contract.mjs): each detail is clipped, lists show three and a count,
|
|
@@ -26,9 +30,9 @@ const declaresOperator = (entry) => obj(entry?.definition?.capabilities) && Obje
|
|
|
26
30
|
/**
|
|
27
31
|
* The coverage of the workspace and of `teams` (labels), from one discovery. A soul covers when it is
|
|
28
32
|
* offered (soulCandidates), not disabled here (souls.disabled), resolves as a spawn would (resolveSoul),
|
|
29
|
-
* composes oats.setup, and
|
|
30
|
-
*
|
|
31
|
-
* team is among its resolved teams. Souls are resolved in turn until every question is answered.
|
|
33
|
+
* composes oats.setup, and does not empty the messaging slot the workspace fills (no `slot-none` on
|
|
34
|
+
* messaging in turnedOff: it stays reachable; `knowledge: none` and `tasks: none` are its own choice).
|
|
35
|
+
* It covers a team when the team is among its resolved teams. Souls are resolved in turn until every question is answered.
|
|
32
36
|
*
|
|
33
37
|
* → { known: true, workspace: { covered, by }, teams: [{ label, covered, by }], excluded: [{ soul, code, slots? }] }
|
|
34
38
|
* | { known: false, reason }
|
|
@@ -67,8 +71,8 @@ export async function operatorCoverage({ discovery, local = null, lock = null, t
|
|
|
67
71
|
throw e;
|
|
68
72
|
}
|
|
69
73
|
if (!(res.modules || []).some((m) => m.name === OPERATOR_CAPABILITY)) continue;
|
|
70
|
-
const emptied = (res.turnedOff || []).filter((o) => o.reason === "slot-none");
|
|
71
|
-
if (emptied.length) { excluded.push({ soul, code: "slot-none", slots: emptied.map((o) => o.slot) }); continue; }
|
|
74
|
+
const emptied = (res.turnedOff || []).filter((o) => o.reason === "slot-none" && OPERATOR_SLOTS.has(o.slot));
|
|
75
|
+
if (emptied.length) { excluded.push({ soul, code: "slot-none", slots: [...new Set(emptied.map((o) => o.slot))] }); continue; }
|
|
72
76
|
by.workspace ??= soul;
|
|
73
77
|
for (const t of res.teams || []) if (wanted.includes(t.label) && !by.teams.has(t.label)) by.teams.set(t.label, soul);
|
|
74
78
|
}
|
|
@@ -89,7 +93,7 @@ export function operatorProblems(coverage, { workspace = null, unknownRemedy = "
|
|
|
89
93
|
if (!coverage?.known) return [{ code: "operator-coverage-unknown", message: clip(`operator coverage unknown: ${clip(coverage?.reason ?? "not computed", 700)}; this says nothing about whether an operator soul exists`, MAX_TEXT), remedy: clip(unknownRemedy, MAX_TEXT) }];
|
|
90
94
|
const named = workspace ? `workspace ${workspace}` : "this workspace";
|
|
91
95
|
const why = coverage.excluded.length ? ` (not usable here: ${some(coverage.excluded.map((x) => clip(`${x.soul} ${x.code}${x.slots ? ` ${x.slots.join(",")}` : ""}`)))})` : "";
|
|
92
|
-
const remedy = `give a soul the ${OPERATOR_CAPABILITY} capability in its soul.yaml (reviewed source), keeping the workspace's
|
|
96
|
+
const remedy = `give a soul the ${OPERATOR_CAPABILITY} capability in its soul.yaml (reviewed source), keeping the workspace's messaging (no \`messaging: none\`), then \`oats spawn <soul> --preview\``;
|
|
93
97
|
const out = [];
|
|
94
98
|
if (!coverage.workspace.covered) {
|
|
95
99
|
out.push({ code: "operator-soul-missing", message: clip(`no soul ${clip(named)} offers composes ${OPERATOR_CAPABILITY}, so it has no operator soul${why}; ${SEAT}`, MAX_TEXT), remedy, excluded: coverage.excluded });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awebai/oats",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.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",
|