Skip to content

refactor: standardize conversation engine protocol - #348

Merged
Devin-AXIS merged 1 commit into
mainfrom
agent/conversation-engine-protocol
Aug 16, 2026
Merged

refactor: standardize conversation engine protocol#348
Devin-AXIS merged 1 commit into
mainfrom
agent/conversation-engine-protocol

Conversation

@Devin-AXIS

Copy link
Copy Markdown
Owner

What changed

  • Added a small conversation-engine contract and adapter registry at the Work/UI boundary.
  • Kept OpenCode as the only default engine and moved all OpenCode event, snapshot, permission, question, prompt, and tool-part mapping behind its adapter.
  • Standardized rendered conversation data on AI SDK UIMessage / UIMessageChunk plus typed control events for session state, errors, compaction, todos, permissions, questions, message updates, part updates, and streaming chunks.
  • Removed the replaced OpenCode-only session and chat adapter paths instead of retaining compatibility copies.
  • Preserved the current user experience and OpenCode runtime behavior while making a future DSH adapter independently pluggable.

Why

The UI and session synchronization layer was directly coupled to OpenCode types and event shapes. This change creates one narrow engine boundary without adding a second UI data flow or changing the current default engine.

Impact

  • No intended user-visible behavior change.
  • OpenCode remains the default and only registered conversation engine.
  • Future engines can implement the same Work-layer contract without changing session UI components.
  • PR contains one commit and only app conversation/session files and their tests.

Validation

  • pnpm --filter @ipollowork/app typecheck — passed.
  • Focused conversation/session suite — 69 passed, 0 failed.
  • pnpm --filter @ipollowork/app build — passed.
  • Maintainability audit and git diff --check — passed with no errors.
  • Full app suite — 759 passed, 1 failed. The single failure is the pre-existing HyperFrames Video Studio > keeps desktop panel titlebars draggable without swallowing control input assertion; it reproduces unchanged on current origin/main and is unrelated to this PR.

No new runtime dependency, route, table, persistent state, generated artifact, or credential is included.

@Devin-AXIS
Devin-AXIS merged commit 5dd8875 into main Aug 16, 2026
4 of 7 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4224e6a69b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

role: message.info.role,
...(typeof created === "number" || typeof completed === "number"
? { metadata: { opencode: {
? { metadata: { ipollowork: {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the metadata key read by message timing UI

When a snapshot message has time.created or time.completed, this writes those values under metadata.ipollowork, but getMessageCreated and getMessageCompleted still exclusively read metadata.opencode in apps/app/src/components/chat/utils.ts:115-123. Consequently mapped conversation messages lose their visible timestamps and assistant process durations; update the consumer alongside this namespace migration or retain the existing key.

Useful? React with 👍 / 👎.

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