@awebai/oats 0.22.10 → 0.22.12
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 +150 -4
- package/docs/desktop.md +28 -2
- package/docs/release-notes/v0.22.11.md +49 -0
- package/docs/release-notes/v0.22.12.md +53 -0
- package/docs/schedules.md +143 -0
- package/lib/schedule-host.mjs +150 -0
- package/lib/schedule.mjs +731 -0
- package/lib/servers.mjs +16 -0
- package/package.json +3 -2
package/lib/servers.mjs
CHANGED
|
@@ -258,6 +258,8 @@ export function checkRemoteSupport(remote, target, oatsArgs, roster) {
|
|
|
258
258
|
: `it does not advertise what it supports (kernels before 0.22.2 do not), so only pi and claude on tmux with no launch options are assumed of it; upgrade it there to use more`;
|
|
259
259
|
const refuse = (what) => { throw serverError("E_REMOTE_INCOMPATIBLE", `remote oats ${remote.version} at ${target.sshHost}: ${what} was not established as supported there (${supports})`); };
|
|
260
260
|
if (runtime && !remote.runtimes.includes(runtime)) refuse(`runtime ${runtime}${flagOf("--runtime") ? "" : ` (the default of soul ${agent} there)`}`);
|
|
261
|
+
// A wake schedule at spawn is saved by the host: it must advertise schedules.
|
|
262
|
+
if (["--wake-json", "--wake-every", "--wake-cron"].some((f) => oatsArgs.includes(f)) && !remote.features.includes("schedule")) refuse("a wake schedule at spawn (the host must advertise the schedule feature)");
|
|
261
263
|
const backend = flagOf("--backend");
|
|
262
264
|
if (backend && !remote.sessionBackends.includes(backend)) refuse(`session backend ${backend}`);
|
|
263
265
|
if (oatsArgs.includes("--yolo") && !remote.launchOptions.includes("yolo")) refuse("the yolo launch option");
|
|
@@ -632,6 +634,20 @@ export function startRemote(serverId, { instance, home, model } = {}, io = {}) {
|
|
|
632
634
|
return { envelope: envelope.ok ? { ...envelope, result: { ...envelope.result, server: serverId, instance: instance || route.snapshot?.instance || envelope.result.instance } } : envelope, stderr, route };
|
|
633
635
|
}
|
|
634
636
|
|
|
637
|
+
/** `oats schedule ...` on the execution host: schedules are host-owned, so
|
|
638
|
+
* every subcommand runs in the server's registered workspace; refused
|
|
639
|
+
* before any remote mutation when the remote kernel does not advertise
|
|
640
|
+
* the schedule feature. The envelope is relayed as is. */
|
|
641
|
+
export function scheduleRemote(serverId, oatsArgs, io = {}) {
|
|
642
|
+
const server = io.server || getServer(serverId);
|
|
643
|
+
const target = targetOf(server);
|
|
644
|
+
const remote = checkRemote(target, io);
|
|
645
|
+
if (!remote.features.includes("schedule")) throw serverError("E_REMOTE_INCOMPATIBLE", `remote oats ${remote.version} at ${target.sshHost} does not advertise schedules; upgrade it there`);
|
|
646
|
+
const args = ["schedule", ...oatsArgs.filter((a) => a !== "--json"), "--dir", target.workspace, "--json"];
|
|
647
|
+
const { envelope, stderr } = runRemote(target, args, io);
|
|
648
|
+
return { envelope: envelope.ok ? { ...envelope, result: { ...envelope.result, server: serverId } } : envelope, stderr, target };
|
|
649
|
+
}
|
|
650
|
+
|
|
635
651
|
export function attachArgv(serverId, { instance, home } = {}, io = {}) {
|
|
636
652
|
const { target, home: remoteHome } = resolveRoute(serverId, { instance, home }, "session attach");
|
|
637
653
|
if (!io.skipVersionCheck) requireSessionRemote(target, io);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awebai/oats",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.12",
|
|
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",
|
|
@@ -44,7 +44,8 @@
|
|
|
44
44
|
"packages/record/package.json"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@awebai/pi": "^0.2.1"
|
|
47
|
+
"@awebai/pi": "^0.2.1",
|
|
48
|
+
"croner": "10.0.1"
|
|
48
49
|
},
|
|
49
50
|
"bin": {
|
|
50
51
|
"oats": "./bin/oats.mjs"
|