Conversation
Contributor
Author
Live interactive validation: responder-only acceptance — passedRan the actual
No code changes were needed. The temporary fixture and tmux session were cleaned up; the worktree is clean. This adds live agent/TUI coverage to the earlier deterministic checks, but does not exercise authenticated backend HTTP/Postgres/Redis integration or inject a forged forbidden action. |
…n sessions Consolidate the reviewed feature branch before replaying it on current dev. Original commits are preserved at chore/agent-communication-pre-rebase. BREAKING CHANGE: replace principal checkpoints with durable records, add exact question batches and session history, and restrict acceptance to the negotiation responder.
yanekyuk
force-pushed
the
feat/agent-communication
branch
from
September 18, 2026 12:43
78ad2a6 to
e589ad1
Compare
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.
Changed
origin/dev(eeab341624fe67b2eeb623abf8f8ed1afc20b5c6) while preserving the original feature history in backup refs. Keep dev's independent network approvals/invites, opportunity routes, Redis Streams, migration baseline, and web/Mac/Hermes improvements.@indexnetwork/agentas the API's default hosted runtime, owned byPersonalAgentService. Keeppackages/agentv2and its external runner independent: no merged scheduler, third agent, runtime-selection framework, or checkpoint compatibility path.packages/discovery, without HyDE. Opening a hosted negotiation and its first private delegation commits atomically. Numbered negotiation sessions retain separate previous-session history and authoritative opportunity status.Hosted availability and resume follow-up
intent.resumedreceipts. Stale/duplicate resumes do not wake again; resume cannot answer or retire pending questions or create new principal authority.Web H2A latency and question follow-up
POST /conversations/:id/wakewith{ intentId }. It commits a private activation receipt, not a message, answer or permission. Other owners, inactive intents and selected external executors cannot be woken through this hosted route. Existing external-agent policy remains independent.TUI startup follow-up
rm -rf distprotocol build. The root scenario command delegates to the package-local Bun launcher and resolves agent/discovery/protocol source entry points instead of rebuilding shared outputs. The existingenv -u OPENROUTER_API_KEY bun --env-file=.env.development run agent:tuicommand is unchanged for users.Native Hermes and clients
NegotiationSpeaker. Supply fresh prompts and exact tools; serialize session tools, interrupt on completion/cancellation/uncertain turns, and never retry an uncertain turn write.FilePrincipalRecords: domain messages, briefs/delegations, retirements, activation and delivery receipts. Failed persistence cannot publish unsaved effects; lost publication responses replay the same output IDs rather than rerunning the authoring model.INDEX_EXECUTOR_IDon the Hermes/v2 device to identify its registered, selected external agent. Hermes does not take over an arbitrary external selection; v2 refuses to start without the binding.{ status, pending }andPOST /conversations/:id/answers. Hosted submission accepts exactly the complete current batch. External executors retain their independent answer policy. Direct messages never implicitly answer questions. Preserve local drafts until accepted writes.packages/hermes-plugin/dashboard/index.jsas source and explicit dashboard/desktop build commands; regenerate shipped bundles rather than editing generated code.Breaking contracts and migration
PrincipalState/PrincipalStorecheckpoint APIs and obsolete runtime storage. Hosts implementPrincipalRecords, session-aware negotiation reads, and guarded effect/turn/opening operations. No old checkpoint loader or compatibility layer remains.0003_add_principal_records_and_negotiation_sessions.sqlafter dev's0000–0002baseline. Preserve historical displayed questions, scoped evidence and advisory review notes; do not invent standing authority or retire later dev-authored questions using older checkpoint snapshots. Dropagent_sessions; add standing-brief pointers and negotiation-session identities using unprefixed tables. Do not concatenate the old feature migration journal.Verification
44 existing tests passed: agent 26, client 9, provider-free protocol 9. Agent/client suites reran after the workflow fixes.
Passed affected agent/v2/client/discovery/protocol/API/TUI builds and typechecks, web production build, four-target CLI build, native Mac ad-hoc build, Hermes runtime/dashboard/desktop builds, Python compilation, and Hermes plugin doctor (23 tools, one hook).
Passed protocol boundary checks, adapter naming, subtree/lockfile parity, and root lint (0 errors, 35 warnings). Commit hooks passed staged lint and their build gates. TUI/discovery runtime implementation remains preserved; the scenario launcher now avoids compiled-output races.
Disposable real PostgreSQL/pgvector: fresh migration, dev-baseline fixture upgrade, repeat migration, and no-schema-drift generation.
Real disposable PostgreSQL/Redis authority probes: exclusive hosted ownership, exact/concurrent batches, stale effects/turns, private records, executor handover, idempotent publication, one input pointer per committed external batch, atomic opening/delegation and cancellation rollback, responder-only acceptance, separate human approval, and successor-session history.
Actual v2 host/runner and actual
NegotiationAgentworkflow probes verified their different briefing, question, pause/wake and resumption policies. Negative probes reproduced and then passed the reconnect/startup and stale-executor-opening fixes. These use real SQL/API controller methods and HTTP client serialization with fixture authentication/model responses and fixed embeddings, not a full authenticated deployment.Real isolated Redis replay checks included 205 pending entries, independent consumers, stable identities and concrete live cursors. Native Hermes
AIAgent/registry/session-store probes used loopback model replies to verify fresh context, tool schemas and hard termination. File-record probes covered restart, freshness, failed persistence and lost-response replay.Follow-up verification: real
PersonalAgentServicewith disposable SQL/Redis reproduces the original failure and passes idle recovery, explicit resume, stale/duplicate/idempotent rejection, restart replay, question-retirement refusal, four transient startup failures, and transient receipt-write recovery. Existing agent tests (26), hosted/v2 workflow probes, affected typechecks/builds, staged lint and lockfile/subtree parity passed.Actual Chromium checks cover the built production SPA with loopback API/auth fixtures. Status/lifecycle/executor changes became visible in 25–26 ms with five-second polling disabled. Question batching/draft retention, direct-message separation, mobile panels and negotiation history also passed. This is not live-backend end-to-end verification.
Web H2A follow-up: Chromium reproduced the bug with 6.2-second GETs before the fix, then verified question controls and independent send completion after it. Real EventSource (polling disabled) verified plain-English live activity, idle completion, review notices, Wake and external-executor visibility. Existing batch/correction/draft/mobile/history checks passed.
Real disposable SQL/Redis plus actual controller/service methods verified acceptance before model completion, review activity frames, complete/partial answer batches, private Wake receipts, cross-owner/inactive/external rejection, and visible provider-failure recovery without model replay. Hosted/v2 authority probes and the 26 existing agent tests passed again.
Read-only feature-clone measurements: pending-state reconstruction dropped from 9 queries/~2.0 s to 1/~0.28 s; warm GET-controller time dropped from ~3.5 s to ~1.8 s. These exclude AuthGuard and do not measure live POST/model latency. Root lint (0 errors/35 warnings), API/agent/TUI/Hermes checks, web production build, parity and commit build gates passed.
Plain-English status follow-up: the production SPA with real EventSource and polling disabled passed all four tool-description mappings, pre-tool/between-tool Thinking, absent/old anchors, long scrolled history, desktop/mobile layout, reduced motion, and completion without an invented chat reply. Component batch/draft checks, scoped lint, web build, and the unchanged typecheck-baseline comparison passed.
Actual service/controller methods with disposable SQL/Redis verified fresh resume activity before a first tool and with no visible message, real status frames, duplicate-receipt rejection, pause clearing observations, and a later explicit resume without replay. Read-only feature-clone receipts confirmed earlier resumes were accepted. No additional real intents were resumed for these checks.
TUI follow-up: the actual root launcher passed while
protocol/dist/index.jswas absent during a concurrent rebuild. Both root/package help commands and the interactive scenario chooser passed with compiled workspace imports forbidden and zero network/model calls; Esc exited without selecting a scenario. TUI checks/build, API typecheck, protocol architecture, lockfile checks and mandatory commit build gates passed. The API-backed mode was built/typechecked, not launched as a second hosted seat.Detailed evidence and scope are in
REBASE_TODO.md; temporary probe scripts/logs are preserved outside the source tree. No repository tests were added.Remaining limits
/intents/:id/refineroute. The mismatch is already present in pinned dev and is outside this availability/resume fix.tschas 34 pre-existing diagnostics. A compiler-host comparison with the exact pre-fix versions of both changed web files reports an identical diagnostic set: no new errors, not a clean whole-web typecheck. This unrelated baseline is not repaired in the H2A fix.Related design discussion: #1612. The implemented preservation plan supersedes its original consolidation proposal.