@awebai/oats 0.53.0 → 0.54.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 +12 -2
- package/docs/design/2026-09-23-workspace-module-contracts.md +3 -0
- package/docs/desktop-cli-api.md +29 -8
- package/docs/implementation.md +12 -4
- package/docs/official-catalog.md +1 -1
- package/docs/packages.md +5 -5
- package/docs/release-notes/v0.53.0.md +14 -0
- package/docs/release-notes/v0.54.0.md +142 -0
- package/docs/souls-and-instances.md +2 -1
- package/docs/upgrading.md +14 -2
- package/docs/workspaces.md +121 -1
- package/lib/packages.mjs +5 -1
- package/lib/remote.mjs +255 -76
- package/lib/workspace.mjs +27 -9
- package/package-catalog.json +1 -1
- package/package.json +1 -1
- package/packages/client/cli-locator.mjs +2 -2
- package/skills/oats-getting-started/SKILL.md +7 -1
package/lib/workspace.mjs
CHANGED
|
@@ -197,6 +197,15 @@ function* refFields(value) {
|
|
|
197
197
|
for (const slot of ["knowledge", "messaging", "tasks", "capabilities"]) yield* froms(d[slot], `/defaults/${slot}`);
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
+
/** Only schema diagnostics for repository-reference fields pass the remote renderer. Provider
|
|
201
|
+
* payloads and unrelated invalid values keep their original diagnostics; admission uses raw values. */
|
|
202
|
+
function referenceProblems(problems, refs) {
|
|
203
|
+
const sources = new Map(refs);
|
|
204
|
+
return problems.map((problem) => sources.has(problem.path)
|
|
205
|
+
? { ...problem, message: defaultRemote.redactUrl(problem.message, sources.get(problem.path), { known: false }) }
|
|
206
|
+
: problem);
|
|
207
|
+
}
|
|
208
|
+
|
|
200
209
|
function refKey(remote, ref) {
|
|
201
210
|
return remote.parseRepoRef(ref).key;
|
|
202
211
|
}
|
|
@@ -214,7 +223,7 @@ function keyOrProblem(remote, ref, path, problems) {
|
|
|
214
223
|
export function validateWorkspace(value, { remote = defaultRemote } = {}) {
|
|
215
224
|
const problems = validateAgainst(schemaFor("workspace"), value);
|
|
216
225
|
if (!isObject(value)) return problems;
|
|
217
|
-
if (value.schemaVersion !== 2) return problems;
|
|
226
|
+
if (value.schemaVersion !== 2) return referenceProblems(problems, refFields(value));
|
|
218
227
|
// Absolute-path refusal applies to REF/PATH fields only (L2): never to descriptions or the provider payload.
|
|
219
228
|
for (const [path, s] of refFields(value)) {
|
|
220
229
|
if (ABSOLUTE_PATH.test(s)) problems.push({ path, message: `absolute paths are refused in the workspace file (${show(s)}); host paths belong in oats-local.yaml (a local remote is a repo ref: file:///… or git:/abs/bare.git@<ref>)` });
|
|
@@ -251,7 +260,7 @@ export function validateWorkspace(value, { remote = defaultRemote } = {}) {
|
|
|
251
260
|
for (const slot of ["knowledge", "messaging", "tasks", "capabilities"]) fromProblems(remote, d[slot], `/defaults/${slot}`, problems, { here: false });
|
|
252
261
|
}
|
|
253
262
|
sharedLabelProblems(value, problems);
|
|
254
|
-
return withRemovedKeys(problems, value, REMOVED_KEYS.workspace);
|
|
263
|
+
return referenceProblems(withRemovedKeys(problems, value, REMOVED_KEYS.workspace), refFields(value));
|
|
255
264
|
}
|
|
256
265
|
/** Team model 3: every label `defaultTeam` and `souls:` name is a shared team of this same file, so an
|
|
257
266
|
* unknown label is refused when the file is read, never at a spawn on someone else's machine. */
|
|
@@ -272,7 +281,9 @@ export function teamLabelProblem(label) {
|
|
|
272
281
|
const problems = validateAgainst(schemaFor("workspace").$defs.label, label);
|
|
273
282
|
return problems.length ? problems.map((x) => x.message).join("; ") : null;
|
|
274
283
|
}
|
|
275
|
-
export function validateMembership(value) {
|
|
284
|
+
export function validateMembership(value) {
|
|
285
|
+
return referenceProblems(withRemovedKeys(validateAgainst(schemaFor("membership"), value), value, REMOVED_KEYS.membership), [["/workspace", value?.workspace]]);
|
|
286
|
+
}
|
|
276
287
|
|
|
277
288
|
/** Keys 0.30 (team model v2) and 0.38.0 (team model 3) removed: each is a schema problem naming its replacement, in place of
|
|
278
289
|
* the schema's generic "unexpected property". `at(value)` → the JSON pointers where it appears. */
|
|
@@ -308,7 +319,11 @@ export function validateSoul(value, { remote = defaultRemote } = {}) {
|
|
|
308
319
|
fromProblems(remote, value.capabilities, "/capabilities", problems, { here: true });
|
|
309
320
|
for (const slot of ["knowledge", "messaging", "tasks"]) if (isObject(value[slot])) reservedKeyProblems(value[slot], `/${slot}`, problems);
|
|
310
321
|
}
|
|
311
|
-
|
|
322
|
+
const refs = [];
|
|
323
|
+
if (isObject(value?.capabilities)) for (const [name, choice] of Object.entries(value.capabilities)) {
|
|
324
|
+
if (isObject(choice) && typeof choice.from === "string") refs.push([`/capabilities/${pointerKey(name)}/from`, choice.from]);
|
|
325
|
+
}
|
|
326
|
+
return referenceProblems(problems, refs);
|
|
312
327
|
}
|
|
313
328
|
|
|
314
329
|
/** `byTeam` was removed in 0.30 (team model v2): a per-team payload no longer exists — a team's
|
|
@@ -349,7 +364,7 @@ export function validateLocal(value) {
|
|
|
349
364
|
problems.push({ path: `/launch-configs/${pointerKey(name)}/runtime`, reason: "harness-conflict", message: `harness ${show(entry.harness)} and runtime ${show(entry.runtime)} disagree: \`runtime\` is the pre-0.27 name of \`harness\` — keep one` });
|
|
350
365
|
}
|
|
351
366
|
}
|
|
352
|
-
return problems;
|
|
367
|
+
return referenceProblems(problems, [["/workspace", value?.workspace], ["/standalone", value?.standalone]]);
|
|
353
368
|
}
|
|
354
369
|
|
|
355
370
|
/* ───────────────────────────── file decoding ──────────────────────────── */
|
|
@@ -494,11 +509,14 @@ export async function confirmMembership(workspaceObs, memberRef, { remote: injec
|
|
|
494
509
|
let key;
|
|
495
510
|
try { key = refKey(remote, memberRef); }
|
|
496
511
|
catch (e) {
|
|
497
|
-
if (e?.code === "E_REPO_REF") return unconfirmed(typeof memberRef === "string" ? memberRef : String(memberRef), "not-listed", `${show(memberRef)} is not a repo ref: ${e.message}`);
|
|
512
|
+
if (e?.code === "E_REPO_REF") return unconfirmed(defaultRemote.redactUrl(typeof memberRef === "string" ? memberRef : String(memberRef), null, { reference: true }), "not-listed", `${show(defaultRemote.redactUrl(memberRef, null, { reference: true }))} is not a repo ref: ${e.message}`);
|
|
498
513
|
throw e;
|
|
499
514
|
}
|
|
500
515
|
if (!checked.keys.has(key)) return unconfirmed(key, "not-listed", `${key} is not in members of workspace ${workspaceObs.key}`);
|
|
501
|
-
const cannotRead = (e) =>
|
|
516
|
+
const cannotRead = (e) => {
|
|
517
|
+
const url = defaultRemote.redactUrl(e.details?.url ?? e.provenance?.url ?? null, null, { reference: true });
|
|
518
|
+
return unconfirmed(key, "cannot-read", `cannot read ${url ?? defaultRemote.redactUrl(memberRef, null, { reference: true })}${e.details?.reason ? ` (${e.details.reason})` : ""}`, { url });
|
|
519
|
+
};
|
|
502
520
|
let obs;
|
|
503
521
|
try { obs = await remote.observeRemote(memberRef); }
|
|
504
522
|
catch (e) {
|
|
@@ -520,7 +538,7 @@ export async function confirmMembership(workspaceObs, memberRef, { remote: injec
|
|
|
520
538
|
let backlinkKey;
|
|
521
539
|
try { backlinkKey = refKey(remote, read.value.workspace); }
|
|
522
540
|
catch (e) {
|
|
523
|
-
if (e?.code === "E_REPO_REF") return unconfirmed(key, "no-backlink", `${key}@${obs.commit.slice(0, 12)} oats-membership.yaml names an unparseable workspace ${show(read.value.workspace)}`, { commit: obs.commit });
|
|
541
|
+
if (e?.code === "E_REPO_REF") return unconfirmed(key, "no-backlink", `${key}@${obs.commit.slice(0, 12)} oats-membership.yaml names an unparseable workspace ${show(defaultRemote.redactUrl(read.value.workspace, null, { reference: true }))}`, { commit: obs.commit });
|
|
524
542
|
throw e;
|
|
525
543
|
}
|
|
526
544
|
if (backlinkKey !== workspaceObs.key) {
|
|
@@ -793,7 +811,7 @@ export async function discoverWorkspace(ref, { at, local, lock = null, remote: i
|
|
|
793
811
|
const sourceRef = entry.source.slice(0, pin);
|
|
794
812
|
const commit = entry.source.slice(pin + 1);
|
|
795
813
|
const file = `${entry.soul.replace(/\/+$/, "")}/soul.yaml`;
|
|
796
|
-
const pushProblem = (code, path, message) => { problems.push({ code, repoKey: null, path: `external/${index}:${path}`, message, source: entry.source }); if (!soulsUnread.external.includes(entry.source)) soulsUnread.external.push(entry.source); };
|
|
814
|
+
const pushProblem = (code, path, message) => { problems.push({ code, repoKey: null, path: `external/${index}:${path}`, message, source: defaultRemote.redactUrl(entry.source, null, { pinned: { ref: sourceRef, commit } }) }); if (!soulsUnread.external.includes(entry.source)) soulsUnread.external.push(entry.source); };
|
|
797
815
|
let key;
|
|
798
816
|
try { key = refKey(remote, sourceRef); }
|
|
799
817
|
catch (e) { if (e?.code === "E_REPO_REF") { pushProblem("E_REPO_REF", "source", e.message); continue; } throw e; }
|
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.54.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.25.8 <0.
|
|
16
|
+
// Desktop accepts desktopApi === 1 and semver >=0.25.8 <0.55.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
|
//
|
|
@@ -54,7 +54,7 @@ export const DESKTOP_API = 1;
|
|
|
54
54
|
// carry a `description` for every kind and `<kind> update <id> --description`
|
|
55
55
|
// sets one (feature `automation-descriptions`, which gates the Desktop's
|
|
56
56
|
// summary writes). The Desktop v1 surface is otherwise unchanged.
|
|
57
|
-
export const ACCEPT_RANGE = { min: [0, 25, 8], maxExclusive: [0,
|
|
57
|
+
export const ACCEPT_RANGE = { min: [0, 25, 8], maxExclusive: [0, 55, 0] };
|
|
58
58
|
/** The band as humans read it — derived, never hand-spelled, so the probe
|
|
59
59
|
* rejection reason, the backend's /api status and the degradation card can
|
|
60
60
|
* never disagree with the numbers actually enforced above. */
|
|
@@ -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.10.0 # bare versions resolve through the official catalog
|
|
64
64
|
oats.okf: v5.0.3
|
|
65
65
|
defaults:
|
|
66
66
|
capabilities: { oats.core: { from: package } }
|
|
@@ -171,6 +171,12 @@ oats spawn backend-expert --task "First concrete task"
|
|
|
171
171
|
oats status
|
|
172
172
|
```
|
|
173
173
|
|
|
174
|
+
Read the diagnostics below the `oats souls` table before choosing a soul.
|
|
175
|
+
Both `oats souls` and `oats capabilities` print all catalog problems there,
|
|
176
|
+
on stdout, while partial listings still exit 0. `--json` carries the same
|
|
177
|
+
ordered `problems` rows with their owner and path fields (`repoKey`,
|
|
178
|
+
`package`, `source`, `path`); a problem does not always mean an item is absent.
|
|
179
|
+
|
|
174
180
|
OATS confirms Claude's development-channel prompt by itself whenever it
|
|
175
181
|
launches Claude with `--dangerously-load-development-channels
|
|
176
182
|
plugin:aweb-channel@awebai-marketplace` (the default `delivery: channel`,
|