feat(messaging): live gateway capabilities and authorized native sends #341
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/slack-channel-capabilities"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Agent cannot see active Slack or send an operator-authorized channel message without searching for credentials/shell workarounds. Existing generic gateway contract is reply-only. Slack companion fixes channel posting, mentions and membership discovery.
Generic fix
Optional Channel.messaging opt-in, live active-gateway host facts on every working turn, native plugin_message status/destinations/send/receipt. Uses existing lifecycle/delivery fences. Empty tool allowlist remains empty; nonempty selections gain native messaging. No Slack credentials or transport-specific policy in Core; no exposure for unopted-in console/API channels.
Explicit sends have private durable conversation/request-scoped no-replay receipts before external I/O. Identical retries survive restart without resending; conflicts rejected; interrupted/failed effects remain uncertain and are never automatically replayed. No message bodies in receipts, no exactly-once claim, authorization still comes from current operator mandate.
Tests
Full Core suite: 1872 passed, 1 existing skip. TypeScript + diff checks pass. Plugins suite: 95 passed, including 43 Slack tests. Real Harness/GatewayManager tests cover live discovery, generic transport, send path, gateway removal/update fences. Receipt tests cover recreation, concurrent retries, uncertainty, aborts, scoping and conflict. Docs include receipt retention/disk limits and trust boundaries.
Rollout
Operator explicitly requested push/PR/merge and actual native Karsten rollout. Use normal shared release + Darwin owner, exact Slack module snapshot, fresh admission and authenticated API verification. Actual model must discover Slack and post authorized test text to private operator channel; verify via Slack readback. No source/build-only completion claim.
Live rollout and actual-model acceptance completed on native Karsten (work): Core 0.1.236 /
9232c229f2+ exact standalone Slack snapshot df51805dfd829f251597db2020c4d6323c6c2b45. All four installed module hashes verified; actual native owner PID and revision match; authenticated API HTTP 200. Actual update-admission POST returned 201 admitted with blockers=[], verification lease released.Actual model discovery run used plugin_message, recognized connected Slack, listed its three actual memberships and described native send support (no send requested). Actual authorized send run used only plugin_message: one new root post in private operator channel, no shell/HTTP/worker. Provider history readback confirms exactly one exact-text bot post. A second actual model invocation with identical requestId/text returned the same persisted delivered receipt; provider post count remained one. This is transport acceptance/readback, not human-read or exactly-once provider semantics.
43 Slack tests also pass on the actual Darwin host (no skips). Integrated local Core full suite 1880 passed/1 existing skip; Plugins suite 95 passed; both exact PR-head CI checks green before normal merge. Incoming normal-message mentions, dedup and engaged follow-ups are regression tested; no human Slack event was fabricated and no live human-message round-trip is claimed.
Initial hot replacement left Core cleanup-unverified; operator-authorized maintenance reconciled process ownership, preserved waiting/paused tasks and used graceful SIGTERM without inventing an admission lease. The regular native owner subsequently activated 0.1.236 through normal admission. Tokens/app/memberships/admins/history unchanged; current live token already had directory scopes. Generic public contracts/docs shipped, no per-agent credential workaround.
Private detailed receipts on work: ~/.local/share/vanillacore-karsten/slack-channel-{rollout,maintenance,model-verification,send-verification}.json and slack-channel-native-tests.log. Local manifest: ~/.cache/hayate-maintenance/slack-channel-rollout/summary.json.