Skip to content

feat(session): conversation-management contract (astrid-bus:session 1.1.0)#16

Merged
joshuajbouw merged 2 commits into
mainfrom
feat/session-list-verb
Jun 24, 2026
Merged

feat(session): conversation-management contract (astrid-bus:session 1.1.0)#16
joshuajbouw merged 2 commits into
mainfrom
feat/session-list-verb

Conversation

@joshuajbouw

Copy link
Copy Markdown
Contributor

Adds the astrid-bus:session 1.1.0 conversation-management contract — the WIT records behind the gateway/CLI/agent conversation surface.

Additive over 1.0.0 (existing get-messages / clear / append / session-cleared records unchanged):

  • new request/response records for list, get-meta, update, delete, search
  • enriched session-summarytitle, first- and last-message previews, message-count, created-at/updated-at, archived, parent-session-id, and an opaque client meta string (the forward-compat escape hatch)
  • list gains include-archived + total; search paginates
  • session-event + a session-event-kind variant (created / updated / deleted) for the session.v1.event.* lifecycle fan-out

astrid-bus:* (capsule-to-capsule) additive change — governed by the topic-versioning convention per the Host ABI RFC (#22), not the host ABI. Standardised in the session-interface RFC (rfcs). Consumers (core gateway, capsule-session) publish/subscribe by string topic and serialise with serde, so they build independently of the submodule pin; the pin bump (core + sdk-rust + sdk-js) + bundle re-sync follow once this lands.

Stays open / accrues toward 1.0. Relates to astrid#972 / astrid#974 / astrid#1041.

Bump astrid-bus:session to 1.1.0 with the additive conversation-management
surface a multi-device client and the agent need, all scoped per principal:

- list      (paginated thread metadata; include-archived, total)
- get-meta  (one thread's metadata)
- update    (patch title / archived / opaque client meta; rename + archive
            are both expressed through it)
- delete    (hard-purge a thread)
- search    (keyword/substring across the caller's transcripts, paginated)

session-summary carries title, first-message preview, last-message preview,
message-count, created/updated timestamps, archived, parent chain, and an
opaque client 'meta' string (tags/pin/read-state) the capsule stores but
never interprets — the forward-compat escape hatch so new per-thread
attributes need no contract bump.

Mutations fan out a session-event on session.v1.event.<kind> (a variant:
created/updated/deleted), stamped with the acting principal, so other
devices update their thread list live.

Existing 1.0.0 records (get-messages, clear, append, session-cleared) are
unchanged.

Refs astrid-runtime/astrid#972 astrid-runtime/astrid#974 astrid-runtime/astrid#1041
Copilot AI review requested due to automatic review settings June 24, 2026 04:21
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the astrid-bus:session@1.1.0 WIT contract to cover conversation/thread management (listing, metadata fetch/update, deletion, search) and lifecycle fan-out events for multi-device synchronization.

Changes:

  • Bumps astrid-bus:session package version from 1.0.0 to 1.1.0 and documents the additive scope.
  • Introduces new request/response records for list, get-meta, update, delete, and search, plus enriched session-summary.
  • Adds session-event and session-event-kind for created / updated / deleted lifecycle notifications.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread interfaces/session.wit
Comment thread interfaces/session.wit
Comment thread interfaces/session.wit Outdated
The get-meta-response doc-comment used <corr-id> while every other reply
topic uses <correlation-id>. Align it so readers don't infer a different
placeholder. (The get_meta topic segment keeps its underscore, matching
the existing get_messages convention — WIT records are kebab-case, wire
topic segments are underscore-joined.)

Refs astrid-runtime/astrid#974
@joshuajbouw

Copy link
Copy Markdown
Contributor Author

Thanks — fixed the real one in 0c0f3f5: the <corr-id> placeholder on get-meta-response is now <correlation-id>, matching every other reply topic.

On get_meta vs get-meta: this is the established convention, not a mismatch. WIT record identifiers must be kebab-case (get-meta-request), but the wire topic segment is underscore-joined (session.v1.request.get_meta) — mirroring the existing 1.0.0 get_messages topic / get-messages-request record pair exactly. Renaming the topic to get-meta would diverge from that convention and from what the capsule and gateway already publish/subscribe on.

@joshuajbouw joshuajbouw merged commit 9f2c365 into main Jun 24, 2026
1 check passed
@joshuajbouw joshuajbouw deleted the feat/session-list-verb branch June 24, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants