Skip to content

Add semantic Linq reply handles - #132

Merged
jasonhedman merged 5 commits into
mainfrom
json/linq-reply-anchors
Sep 4, 2026
Merged

jasonhedman merged 5 commits into
mainfrom
json/linq-reply-anchors

Conversation

@jasonhedman

@jasonhedman jasonhedman commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Adds one optional send_message.replyTo contract 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 main source-ownership refactor into this branch. The shared message contract now lives under shared/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 build with documented local placeholders
  • pnpm db:check
  • pnpm eval:agent --tag reply --skip-report (6 evals, 29 gates)
  • Focused reply delivery tests (37 tests)
  • Independent implementation review: clean; one non-blocking note that unavailable-target fallback may upload private media twice

# 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
@jasonhedman
jasonhedman merged commit 5fb62c4 into main Sep 4, 2026
2 checks passed
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.

1 participant