feat: add managed cloud turn primitives
Merged
KH
4mo ago+1721+1721+0123456789012345678901234567890123456789-53-53-01234567890123456789
Summary
- attach a managed Cloud
ctx.scheduleimplementation with active-receipt registration, stable cancellation names, and durablelist/gethelpers - make Telegram delivery prefer Cloud's direct provider proxy and require Bot API message receipts, with shared normalization, owner guards, threading, and chunking
- add a Telegram adapter to
turn-kitplus assistant-only proactive memory helpers - complete the existing
@agent-assistant/proactivescheduler bridge using named dynamic schedules
This extracts the reusable boundaries proven by khaliqgant/life-agent. Domain task semantics, prompts, provider mutations, and private-context lookup remain application-owned.
Closes #300.
Why
Deployed agents currently repeat three unsafe workarounds:
- calling the Cloud dynamic-schedule route directly because the managed runner leaves
ctx.scheduleunavailable; - bypassing Relayfile Telegram writeback because it can return a successful-looking result without sending a Bot API message;
- hand-rolling Telegram envelope parsing, private-chat guards, reply threading, chunking, receipt checks, and proactive memory records.
The new APIs keep those platform and transport contracts in Workforce while leaving the generic turn runner transport-neutral.
Validation
pnpm -r buildpnpm lintpnpm typecheckHOME=/tmp/workforce-test-home.MNLPgJ pnpm test- focused suites: runtime 157, delivery 26, turn-kit 17
The isolated HOME keeps the CLI cascade suite from reading the developer's personal Workforce source configuration, matching CI.