feat(middleware): add AgentRuntime interface and type contracts#4
Merged
alexey-pelykh merged 1 commit intomainfrom Feb 25, 2026
Merged
feat(middleware): add AgentRuntime interface and type contracts#4alexey-pelykh merged 1 commit intomainfrom
alexey-pelykh merged 1 commit intomainfrom
Conversation
Define foundational type contracts for the middleware layer that all downstream components depend on: CLI runtime implementations, event extractors, session map, channel bridge, and delivery adapter. Closes #3 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Feb 25, 2026
Closed
alexey-pelykh
pushed a commit
that referenced
this pull request
Mar 25, 2026
1. [P1] Treat remap failures as resume failures — if replaceSubagentRunAfterSteer returns false, do NOT clear abortedLastRun, increment failed count. 2. [P2] Count scan-level exceptions as retryable failures — set result.failed > 0 in the outer catch block so scheduleOrphanRecovery retry logic triggers. 3. [P2] Persist resumed-session dedupe across recovery retries — accept resumedSessionKeys as a parameter; scheduleOrphanRecovery lifts the Set to its own scope and passes it through retries. 4. [Greptile] Use typed config accessors instead of raw structural cast for TLS check in lifecycle.ts. 5. [Greptile] Forward gateway.reload.deferralTimeoutMs to deferGatewayRestartUntilIdle in scheduleGatewaySigusr1Restart so user-configured value is not silently ignored. 6. [Greptile] Same as #4 — already addressed by the typed config fix. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> (cherry picked from commit 98f6ec5)
alexey-pelykh
pushed a commit
that referenced
this pull request
Mar 25, 2026
1. [P1] Treat remap failures as resume failures — if replaceSubagentRunAfterSteer returns false, do NOT clear abortedLastRun, increment failed count. 2. [P2] Count scan-level exceptions as retryable failures — set result.failed > 0 in the outer catch block so scheduleOrphanRecovery retry logic triggers. 3. [P2] Persist resumed-session dedupe across recovery retries — accept resumedSessionKeys as a parameter; scheduleOrphanRecovery lifts the Set to its own scope and passes it through retries. 4. [Greptile] Use typed config accessors instead of raw structural cast for TLS check in lifecycle.ts. 5. [Greptile] Forward gateway.reload.deferralTimeoutMs to deferGatewayRestartUntilIdle in scheduleGatewaySigusr1Restart so user-configured value is not silently ignored. 6. [Greptile] Same as #4 — already addressed by the typed config fix. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> (cherry picked from commit 98f6ec5)
This was referenced Apr 6, 2026
This was referenced Apr 23, 2026
alexey-pelykh
added a commit
that referenced
this pull request
Apr 24, 2026
…hes #2517-class regressions (#2519) Extends app.smoke.test.ts (#2495/#2496) with a browser-mode smoke suite that mounts <remoteclaw-app> into a desktop viewport (1280x720 via page.viewport() from vitest/browser), waits for layout (updateComplete + double rAF), and asserts getBoundingClientRect dimensions on .sidebar / .topbar-status / .nav-section / section.chat — catching the #2517 regression class where production class renders but structural wrappers are missing, so the sidebar lands in the wrong grid cell and nav content escapes the visible area. Scope: - ui/src/ui/app.computed-style.test.ts — 4 tests, ~2.1s runtime, uses mountApp helper + explicit ../styles.css import (matches navigation.browser.test.ts pattern) - .github/workflows/ci.yml — new test-ui-smoke job, installs Chromium via "pnpm --dir ui exec playwright install --with-deps chromium", runs pnpm test:ui:smoke; wired into CI aggregator needs - package.json — root test:ui:smoke script runs the two smoke suites - CLAUDE.md — new "Browser-mode smoke tests" subsection under § Testing documenting the lane and its scope discipline AC #4 verified empirically: removing the .shell-nav / .sidebar-shell / .sidebar-nav wrapper hierarchy makes the sidebar-fits-viewport test fail ("expected 52 to be greater than 300") and the nav-section header position test fail ("expected 90.31 to be less than or equal to 53.31"). The test-ui-smoke CI lane is scoped to the two sync-regression suites only — the broader pnpm test:ui has unrelated pre-existing failures (cron.test.ts / sessions.test.ts / etc.) that are out of scope. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
alexey-pelykh
added a commit
that referenced
this pull request
Apr 24, 2026
…hes #2517-class regressions (#2519) (#2532) Extends app.smoke.test.ts (#2495/#2496) with a browser-mode smoke suite that mounts <remoteclaw-app> into a desktop viewport (1280x720 via page.viewport() from vitest/browser), waits for layout (updateComplete + double rAF), and asserts getBoundingClientRect dimensions on .sidebar / .topbar-status / .nav-section / section.chat — catching the #2517 regression class where production class renders but structural wrappers are missing, so the sidebar lands in the wrong grid cell and nav content escapes the visible area. Scope: - ui/src/ui/app.computed-style.test.ts — 4 tests, ~2.1s runtime, uses mountApp helper + explicit ../styles.css import (matches navigation.browser.test.ts pattern) - .github/workflows/ci.yml — new test-ui-smoke job, installs Chromium via "pnpm --dir ui exec playwright install --with-deps chromium", runs pnpm test:ui:smoke; wired into CI aggregator needs - package.json — root test:ui:smoke script runs the two smoke suites - CLAUDE.md — new "Browser-mode smoke tests" subsection under § Testing documenting the lane and its scope discipline AC #4 verified empirically: removing the .shell-nav / .sidebar-shell / .sidebar-nav wrapper hierarchy makes the sidebar-fits-viewport test fail ("expected 52 to be greater than 300") and the nav-section header position test fail ("expected 90.31 to be less than or equal to 53.31"). The test-ui-smoke CI lane is scoped to the two sync-regression suites only — the broader pnpm test:ui has unrelated pre-existing failures (cron.test.ts / sessions.test.ts / etc.) that are out of scope. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
8 tasks
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.
Summary
src/middleware/types.tswith foundational type contracts for the middleware layerAgentRuntimeinterface withexecute(params) -> AsyncIterable<AgentEvent>contractAgentEventdiscriminated union (text, tool_use, tool_result, error, done)AgentRunResult+McpSideEffects=AgentDeliveryResultAgentUsage,PermissionDenial,ChannelMessage,BridgeCallbacksCloses #3
Test plan
pnpm buildpassespnpm checkpasses (format + typecheck + lint)🤖 Generated with Claude Code