@awebai/oats 0.22.14 → 0.22.16
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 +678 -23
- package/capabilities/oats-okf/bin/oats-okf.mjs +26 -2
- package/capabilities/oats-okf/oats.json +18 -3
- package/docs/capabilities.md +7 -0
- package/docs/capability-manifest.schema.json +32 -0
- package/docs/design/2026-09-07-desktop-souls-capabilities.md +50 -0
- package/docs/design/operations-contract.md +123 -0
- package/docs/release-notes/v0.22.15.md +48 -0
- package/docs/release-notes/v0.22.16.md +53 -0
- package/docs/schedules.md +9 -0
- package/lib/core.mjs +37 -2
- package/lib/schedule.mjs +32 -8
- package/lib/servers.mjs +32 -1
- package/package-catalog.json +29 -8
- package/package.json +1 -1
package/lib/servers.mjs
CHANGED
|
@@ -232,6 +232,7 @@ export function checkRemote(target, io = {}) {
|
|
|
232
232
|
launchOptions: list("launchOptions", []),
|
|
233
233
|
remote: list("remote", []),
|
|
234
234
|
features: list("features", []),
|
|
235
|
+
operationsApi: probe.operationsApi === 1 ? 1 : null,
|
|
235
236
|
advertised: Array.isArray(probe.runtimes),
|
|
236
237
|
};
|
|
237
238
|
}
|
|
@@ -479,7 +480,34 @@ export function routeCommand(serverId, cmd, oatsArgs, io = {}) {
|
|
|
479
480
|
const { envelope, stderr } = runRemote(target, json(withScope(["status", ...oatsArgs])), io);
|
|
480
481
|
return { envelope: envelope.ok ? { ...envelope, result: { ...envelope.result, server: serverId, target, snapshots: listSnapshots(serverId) } } : envelope, stderr };
|
|
481
482
|
}
|
|
482
|
-
|
|
483
|
+
if (OPERATIONS_COMMANDS.has(cmd)) {
|
|
484
|
+
// The operations contract (inspect, operation run, use, soul set): the
|
|
485
|
+
// remote must advertise it before anything is sent. An explicit --dir is
|
|
486
|
+
// the exact member context the caller chose and travels as is; without
|
|
487
|
+
// one, a --home selection is left to the host (the home is its own
|
|
488
|
+
// context) and anything else runs in the registered workspace.
|
|
489
|
+
// An exact remote home (or a saved instance name) resolves through its
|
|
490
|
+
// FROZEN route exactly as session attach does: the snapshot's target,
|
|
491
|
+
// and a home/name disagreement is refused; the registration's target is
|
|
492
|
+
// used only for scope requests, which get its workspace as --dir.
|
|
493
|
+
let args = [...oatsArgs];
|
|
494
|
+
const valueOf = (name) => { const i = args.indexOf(name); return i >= 0 && args[i + 1] && !args[i + 1].startsWith("--") ? args[i + 1] : undefined; };
|
|
495
|
+
let route;
|
|
496
|
+
if (valueOf("--home") !== undefined || valueOf("--instance") !== undefined) {
|
|
497
|
+
route = resolveRoute(serverId, { instance: valueOf("--instance"), home: valueOf("--home") }, cmd);
|
|
498
|
+
target = route.target;
|
|
499
|
+
const ii = args.indexOf("--instance");
|
|
500
|
+
if (ii >= 0) { args.splice(ii, 2); if (valueOf("--home") === undefined) args.push("--home", route.home); }
|
|
501
|
+
}
|
|
502
|
+
const remote = checkRemote(target, io);
|
|
503
|
+
if (!Array.isArray(remote.features) || !remote.features.includes("operations") || remote.operationsApi !== 1) {
|
|
504
|
+
throw serverError("E_REMOTE_INCOMPATIBLE", `remote oats ${remote.version} at ${target.sshHost} does not advertise the operations contract (kernels from ${OPERATIONS_REMOTE_VERSION} do); upgrade it there; nothing was sent`);
|
|
505
|
+
}
|
|
506
|
+
const scoped = args.includes("--dir") || args.includes("--home") ? args : [...args, "--dir", target.workspace];
|
|
507
|
+
const { envelope, stderr } = runRemote(target, json([cmd, ...scoped]), io);
|
|
508
|
+
return { envelope: envelope.result && typeof envelope.result === "object" ? { ...envelope, result: { ...envelope.result, server: serverId, ...(route ? { route: { home: route.home, instance: route.snapshot?.instance || null, frozen: !!route.snapshot } } : {}) } } : envelope, stderr };
|
|
509
|
+
}
|
|
510
|
+
throw serverError("E_USAGE", `--server routes spawn, retire, status, session, okf harvest, schedule, inspect, operation, use and soul only (not ${cmd})`);
|
|
483
511
|
}
|
|
484
512
|
|
|
485
513
|
// ------------------------------------------------------------------- roster
|
|
@@ -621,6 +649,9 @@ export function inspectRemote(serverId, { instance, home } = {}, io = {}) {
|
|
|
621
649
|
/** The kernel version whose probe first advertises the `session-start`
|
|
622
650
|
* feature; the probe's features list is the actual check. */
|
|
623
651
|
export const SESSION_START_REMOTE_VERSION = "0.22.9";
|
|
652
|
+
/** The kernel version whose probe first advertises the operations contract. */
|
|
653
|
+
export const OPERATIONS_REMOTE_VERSION = "0.22.16";
|
|
654
|
+
const OPERATIONS_COMMANDS = new Set(["inspect", "operation", "use", "soul"]);
|
|
624
655
|
|
|
625
656
|
/** `session start` on the execution host for a remote instance: the same
|
|
626
657
|
* route resolution as inspect, refused before any mutation when the remote
|
package/package-catalog.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"packages": {
|
|
3
3
|
"oats.okf": {
|
|
4
4
|
"url": "https://github.com/awebai/oats-okf.git",
|
|
5
|
-
"ref": "v1.
|
|
5
|
+
"ref": "v1.6.0",
|
|
6
6
|
"path": "oats-package"
|
|
7
7
|
},
|
|
8
8
|
"oats.aweb": {
|
|
@@ -33,12 +33,33 @@
|
|
|
33
33
|
},
|
|
34
34
|
"capabilities": {
|
|
35
35
|
"oats.review": "oats.dev",
|
|
36
|
-
"oas.okf": {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"oas.
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
"oas.okf": {
|
|
37
|
+
"package": "oats.okf",
|
|
38
|
+
"capability": "oats.okf"
|
|
39
|
+
},
|
|
40
|
+
"oas.aweb": {
|
|
41
|
+
"package": "oats.aweb",
|
|
42
|
+
"capability": "oats.aweb"
|
|
43
|
+
},
|
|
44
|
+
"oas.jira": {
|
|
45
|
+
"package": "oats.jira",
|
|
46
|
+
"capability": "oats.jira"
|
|
47
|
+
},
|
|
48
|
+
"oas.linear": {
|
|
49
|
+
"package": "oats.linear",
|
|
50
|
+
"capability": "oats.linear"
|
|
51
|
+
},
|
|
52
|
+
"oas.authoring": {
|
|
53
|
+
"package": "oats.authoring",
|
|
54
|
+
"capability": "oats.authoring"
|
|
55
|
+
},
|
|
56
|
+
"oas.dev": {
|
|
57
|
+
"package": "oats.dev",
|
|
58
|
+
"capability": "oats.dev"
|
|
59
|
+
},
|
|
60
|
+
"oas.review": {
|
|
61
|
+
"package": "oats.dev",
|
|
62
|
+
"capability": "oats.review"
|
|
63
|
+
}
|
|
43
64
|
}
|
|
44
65
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awebai/oats",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.16",
|
|
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",
|