Expose session-owned chat automation metadata

This commit is contained in:
2026-11-08 15:24:23 +00:00
parent cecfa39aac
commit 9d3358be47
12 changed files with 413 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
# Manager native scheduling findings
Official Anthropic SDK types downloaded read-only from the official npm package
@anthropic-ai/claude-agent-sdk 0.3.319 into /tmp/claude-schedules-sdk-types.
Installed Claude is2.1.318. sdk.d.ts StopHookInput (line10147) has optional
session_crons: SessionCronSummary[]; each id/schedule/recurring/prompt. Empty is
known none, absent unknown. Hook callback initialization SDKControlInitializeRequest
line4722 includes hooks and SDKHookCallbackMatcher hookCallbackIds; callback subtype
hook_callback has callback_id and input. Existing server translate.go177 rejects
all hook_callback, so a small explicit observer callback could be handled without
model turns. Detachable claudehost must own callback ACK/metadata even when server
disconnected to preserve real scheduled sessions; never make the new observer
block or auto-answer operator permission callbacks. No global hook config changes.
There is NO SDK get_session_info/get_session_state/get_cron_tasks control request.
background_tasks control is mutating Ctrl+B, NOT a read; do not call it.
Stop snapshot is native current session state, whereas parsing CronCreate history
as if it were current would be misleading. Old retained hosts lack observer hooks;
never restart them to enable metadata, report unknown until native support exists.
Official OpenCode API current docs GET /api/experimental/schedule?sessionID=...:
Schedule.Info status active/paused/done, id, sessionID, nextDueAt. Installed2.0.32
binary does not contain experimental/schedule, ScheduleCreate or schedule.list
symbols. No provider upgrades authorized just to make a count work.
Codex CLI0.164 has no Scheduled management interface per official OpenAI docs;
app/global automation jobs must not be assigned to chats by shared cwd.
Manager native probe: isolated scratch CLI initialization accepted the observer
configuration. Both direct CLI and official SDK probes failed provider authentication
before an ordinary successful turn/Stop callback. This did not verify native Stop
delivery or schedule lifecycle. Existing credentials/configurations were unchanged;
owned processes exited. Reports: /tmp/claude-native-automation-hook-probe.json and
/tmp/claude-native-sdk-automation-hook-probe.json. No real operator chat was prompted.
+23
View File
@@ -0,0 +1,23 @@
# Chat scheduled-work metadata
The read-only `chat_automations` websocket command exposes provider-owned
scheduled work for one operator chat. It deliberately distinguishes a
supported empty result (`active_count: 0`) from an unavailable provider
(`active_count` omitted), so a composer must not render unknown as zero.
OpenCode endpoints that expose scheduling use the documented experimental read endpoint and filters
the validated response to the requested session and `active` status. Claude
Code's installed control protocol has no authoritative read-only schedule
operation; its event/hook metadata is therefore not promoted to a current
count. Codex has no documented native scheduled-management read API. No
schedule is created, changed, resumed, or inferred from a transcript or cwd.
Pipeline291 passed implementation and code review (UI review skipped: backend-only),
then blocked at its read-only delivery-stage commit step. The manager retained the
candidate, updated existing API pipeline22 to v10 so its local commit stage can
write, and took over integration/landing. This metadata task alone is not the
composer feature and has not been deployed. Current installed OpenCode2.0.32
appears not to expose the newer experimental API; unavailable is intentional.
Manager integration: go build ./..., go vet ./..., go test ./... all passed;
full test log /tmp/chat-automation-go-integration.log. No service restart.