Alejandro Gutiérrez
|
1afae7a507
|
feat(broker+cli): topics — conversation scope within a mesh (v0.2.0)
CI / Lint (push) Has been cancelled
CI / Typecheck (push) Has been cancelled
CI / Broker tests (Postgres) (push) Has been cancelled
CI / Docker build (linux/amd64) (push) Has been cancelled
Adds the third axis of mesh organization: mesh = trust boundary,
group = identity tag, topic = conversation scope. Topic-tagged
messages filter delivery by topic_member rows and persist to a
topic_message history table for back-scroll on reconnect.
Schema (additive):
- mesh.topic, mesh.topic_member, mesh.topic_message tables
- topic_visibility (public|private|dm) and topic_member_role
(lead|member|observer) enums
- migration 0022_topics.sql, hand-written following project convention
(drizzle journal has been drifting since 0011)
Broker:
- 10 helpers (createTopic, listTopics, findTopicByName, joinTopic,
leaveTopic, topicMembers, getMemberTopicIds, appendTopicMessage,
topicHistory, markTopicRead)
- drainForMember matches "#<topicId>" target_specs via member's
topic memberships
- 7 WS handlers (topic_create/list/join/leave/members/history/mark_read)
+ resolveTopicId helper accepting id-or-name
- handleSend auto-persists topic-tagged messages to history
CLI:
- claudemesh topic create/list/join/leave/members/history/read
- claudemesh send "#deploys" "..." resolves topic name to id
- bundled skill teaches Claude the DM/group/topic decision matrix
- policy-classify recognizes topic create/join/leave as writes
Spec: .artifacts/specs/2026-05-02-v0.2.0-scope.md
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-02 01:53:42 +01:00 |
|