Scheduled work on this computer (spec 3.5.0): Accept scheduled work, scheduled turns, the watch command; team_add names the sub-manager
ci / check (push) Waiting to run
ci / check (push) Waiting to run
remote.scheduled (lembas service scheduled on|off, lembas remote scheduled on|off) said as limits.scheduled; a scheduled session runs in the schedule's mode (Edit when none, Plan refused, lowered to max_mode), reports ok/silent/failed/cancelled and the final reply, waits the schedule's wait on approvals and offers no question, plan card or show. _lembas/monitor judges the watch command by the mode (ask is refused) and hashes the output as it streams. Conformance areas scheduled, silent and monitor run here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
15 files changed
+636
-25
No files matched your search
+12
-2
@@ -7,10 +7,11 @@
|
||||
// lembas remote enable | disable [--json] remote.enabled
|
||||
// lembas remote mode <manual|edit|auto|plan> remote.max_mode
|
||||
// lembas remote terminal <on|off> remote.terminal
|
||||
// lembas remote scheduled <on|off> remote.scheduled: Accept scheduled work (spec 3.5.0)
|
||||
//
|
||||
// Every change goes through the global config writer, which keeps the file's comments. A running
|
||||
// `lembas service` reads the block again whenever it uses it, so a change applies to it within a few
|
||||
// seconds, no restart (acp/link.ts). --json prints one object: {enabled, roots, max_mode, terminal}.
|
||||
// seconds, no restart (acp/link.ts). --json prints one object: {enabled, roots, max_mode, terminal, scheduled}.
|
||||
import { resolve } from "node:path"
|
||||
import { ConfigError } from "./config/load.ts"
|
||||
import { expandHome } from "./config/paths.ts"
|
||||
@@ -18,7 +19,7 @@ import { coveredBy, realOrResolved, remoteBlock, remoteState, rootFor, type Remo
|
||||
import { MODES, type Mode } from "./config/schema.ts"
|
||||
import { updateGlobalConfig } from "./config/write.ts"
|
||||
|
||||
export const REMOTE_USAGE = `usage: lembas remote list | add <dir>… | remove <dir>… | enable | disable | mode <${MODES.join("|")}> | terminal <on|off> [--json]`
|
||||
export const REMOTE_USAGE = `usage: lembas remote list | add <dir>… | remove <dir>… | enable | disable | mode <${MODES.join("|")}> | terminal <on|off> | scheduled <on|off> [--json]`
|
||||
|
||||
export interface Io {
|
||||
out: (line: string) => void
|
||||
@@ -34,6 +35,7 @@ function describe(s: RemoteState): string[] {
|
||||
s.roots.length ? `roots:\n${s.roots.map((r) => ` ${r}`).join("\n")}` : "roots: (none: no directory accepts remote work)",
|
||||
`max mode: ${s.max_mode}`,
|
||||
`terminal: ${s.terminal ? "on" : "off"}`,
|
||||
`accept scheduled work: ${s.scheduled ? "on" : "off"}`,
|
||||
]
|
||||
}
|
||||
|
||||
@@ -146,6 +148,14 @@ export function remoteCommand(argv: string[], io: Io = stdio): number {
|
||||
return show()
|
||||
}
|
||||
|
||||
if (sub === "scheduled") {
|
||||
const v = rest[0]
|
||||
if (rest.length !== 1 || (v !== "on" && v !== "off")) return io.err("usage: lembas remote scheduled <on|off>"), 2
|
||||
write([[["scheduled"], v === "on"]])
|
||||
if (v === "on" && block.enabled !== true) said.push("remote work is off: scheduled work needs it too — lembas remote add <dir> or enable")
|
||||
return show()
|
||||
}
|
||||
|
||||
io.err(REMOTE_USAGE)
|
||||
return 2
|
||||
}
|
||||
Reference in new issue
Block a user