Add semantic Linq reply handles - #132
Merged
Merged
Conversation
# Conflicts: # agent/channels/linq.ts # db/migrations/meta/0011_snapshot.json # db/migrations/meta/_journal.json # db/tests/database-migration.test.ts # evals/agent/conversation.eval.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds one optional
send_message.replyTocontract for current messages, background tasks, and scheduled automations. Native Linq IDs remain internal, delayed targets are resolved within the active conversation, and unavailable targets fall back to a top-level message.Reply threading is now the default: ordinary answers and follow-ups use the current message, background completions use their task handle, and scheduled reports deterministically use their automation handle. Only genuinely standalone announcements or messages without an applicable handle remain top-level. Includes behavioral reply-choice evals and focused delivery, persistence, and lifecycle coverage.
Replies now support the same content as top-level messages: text, HTTPS attachments, attachment-only sends, and private artifact files. A small pnpm patch extends the existing Linq Chat SDK adapter with an optional reply target, keeping media conversion and private-file uploads in the adapter instead of duplicating that pipeline in the channel.
Merged the latest
mainsource-ownership refactor into this branch. The shared message contract now lives undershared/chat, browser-agent naming is preserved, and the reply-anchor database change is regenerated as migration 0012 after main's 0011.The merged migration also reconciles databases where the pre-merge reply-anchor migration was already applied, while preserving the schema produced by a clean migration run.
Validation:
pnpm check(80 files, 698 tests)pnpm buildwith documented local placeholderspnpm db:checkpnpm eval:agent --tag reply --skip-report(6 evals, 29 gates)