feat(grid-agent): add chat and IM interactions (#123)
Some checks failed
CI / rust-skia (Rust only) (push) Successful in 2m44s
CI / required (push) Failing after 2m41s

This commit is contained in:
2026-08-17 23:11:04 +00:00
parent e3ed39471b
commit 26fd2bf714
12 changed files with 3280 additions and 19 deletions

View File

@@ -28,6 +28,9 @@ observable receivers.
| Body / message | typed boundary owners | 8 MiB / 64 KiB hard ceilings, with lower configured limits | rejected before enqueue |
| Conversation / tool calls | request owner | 256 messages / 64 calls, with lower configured limits | rejected before request |
| Per-avatar conversation memory | `ConversationStore` mutex | 4,096 sessions / 64 MiB hard, lower `conversation` limits | monotonic expiry, deterministic compaction/LRU eviction |
| Interaction ingress / observations | `InteractionHandle` | 8,192 each hard, lower queue configuration | bounded admission; lifecycle uses nonblocking watch state |
| Per-avatar interaction FIFO | `InteractionCoordinator` | 4,096 senders / 64 messages each hard, lower `interaction` limits | fair ready queue, one active request per avatar/channel |
| Interaction inference / outbound | generation tasks and channel rate limiters | 64 concurrent hard; 1,023 bytes per grid part | timeout/cancellation fencing; independent public/IM pacing |
| LLM request slots | shared `LlmClient` semaphore | 256 hard / configured concurrent requests | async acquire or cancellation |
| Reasoning/tool session | `ToolLoop` caller | 32 turns / 256 calls hard, with lower configured limits | total timeout, cancellation, or supersession |
| Policy tools / approvals / schedules | `PolicyGateway` mutex | 64 tools / 4,096 approval records / 1,024 scheduler grants hard | deny before opaque authorization |
@@ -89,6 +92,11 @@ cleanup, fencing old events and late LLM/tool results. See
or direct IM. Group channels are not representable. The LLM projection can
retrieve only one exact key, and recovered/untrusted summaries remain user-role
prompt data rather than system authority.
- Public-chat and direct-IM input crosses a bounded normalization boundary.
Authority is derived only from channel plus sender UUID; public chat can never
acquire operator authority. Output is safety-filtered, UTF-8 split, rate
limited, and associated with its trigger, session, generation, and delivery
result.
- Signals and console output belong to the binary. The reusable core relies on
no terminal, Unix socket, Unix signal, separator, or fixed platform path.
@@ -123,3 +131,6 @@ The live lifecycle and generation contract is documented in
[`grid-agent-session.md`](grid-agent-session.md).
The conversation isolation and persistence contract is documented in
[`grid-agent-conversation.md`](grid-agent-conversation.md).
The public-chat/IM admission, fairness, authorization, egress, and lifecycle
contract is documented in
[`grid-agent-interaction.md`](grid-agent-interaction.md).