Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Implement JSONL RPC envelope for agent-orchestrator communication

Đang mở
#688 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
rust

Hướng nghiên cứu

Start by reading docs/runtime-taskd-rpc-spec.md and item 1.3 in cto-executive-system/plans/adf-architecture-improvements.md, then inspect the Claude stream-json and Codex agent communication paths. Done means the proposed envelope, idempotency, typed errors, state recovery, and graceful Codex fallback are implemented across the listed integrations.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Context

ADF currently communicates with agents via unstructured stdout/stderr pipes. This causes:

  • SIGPIPE kills when stderr pipe is dropped
  • Fragile text parsing for cost/session/status extraction
  • No message framing, idempotency, or error typing

Proposal

Implement a JSONL envelope protocol inspired by Piwork's taskd RPC spec (docs/runtime-taskd-rpc-spec.md).

Envelope Format

Agent -> Orchestrator (event):

{"type": "event", "event": "cost_update", "agent": "security-sentinel", "ts": "...", "payload": {...}}

Orchestrator -> Agent (command, future):

{"id": "req_01", "type": "pause", "payload": {"reason": "budget_exceeded"}}
Key Properties
  • Strict envelope: {type, event/id, payload} (payload required even if empty)
  • Idempotency: duplicate request IDs with same payload produce no duplicate effects
  • Typed error codes with retryable flag
  • State recovery: runtime_get_state equivalent after reconnect
Integration
  • For Claude agents: wrap --output-format stream-json events in ADF envelope
  • For Codex agents: gracefully degrade to unstructured mode
  • New agents: require envelope support as spawn prerequisite
Benefits
  • Foundation for cost tracking (#638), session persistence (#639), activity log (#641)
  • Eliminates SIGPIPE bug (structured framing detects incomplete messages)
  • Enables future Agent SDK migration

References

Ngôn ngữ chính
Rust
Star
64
Fork
5
Merge trung bình
1 giờ 17 phút
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của terraphim/terraphim-ai

Tất cả issue của terraphim/terraphim-ai

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.