Skip to content

fix: provide minimal Jcode SDK runtime fixes for ohAgent - #3

Open
akvarel wants to merge 13 commits into
masterfrom
feature/ohagent-sdk-minimal
Open

fix: provide minimal Jcode SDK runtime fixes for ohAgent#3
akvarel wants to merge 13 commits into
masterfrom
feature/ohagent-sdk-minimal

Conversation

@akvarel

@akvarel akvarel commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Summary

Provide the minimal Jcode runtime delta required by ohAgent's public jcode-sdk integration.

  • reconnect a pooled MCP server when its backing child process has died
  • preserve and report the requested working directory through harness create/attach
  • keep permission responses fail-closed when the bridge does not advertise a permission capability
  • base the integration on Jcode v0.76.0 without carrying unrelated product-specific fork features

Validation

  • cargo test -p jcode-base mcp::pool::tests::begin_connect_replaces_dead_client
  • cargo test -p jcode-sdk -p jcode-harness-api-server
  • harness API server: 66 passed
  • SDK suites: 10 + 10 + 5 + 4 passed
  • SDK doctest passed
  • working-directory attach regression passed
  • unsupported permission-response regression passed
  • final branch HEAD and remote ref verified identical

Delivery and safety

  • no upstream 1jehuang/jcode pull request is created
  • no deployment or secret changes
  • all AI-assisted commits include AI-assisted: Jcode

This PR is the Jcode dependency for the ohAgent public SDK runtime migration.

Fork CI compatibility

  • optional SSH-agent setup is gated when DEPLOY_KEY is unavailable
  • repositories with Issues disabled skip the impossible linked-issue policy while repositories with Issues enabled retain it
  • these workflow contracts are covered by scripts/test_fork_ci_workflow.py
  • cargo fmt --all -- --check passes

1jehuang and others added 9 commits August 13, 2026 02:56
The recheck found the render still captured the generating repo's live
ahead/behind/dirty counts, which change with every commit. Add a test-only
git-info cache seed and pin the widget to a clean fixture branch. The
version label is compile-time build meta and is left as is.
begin_connect returned Connected for any handle present in the pool,
even when the backing child process had crashed or been killed. Every
tool call on such a stale handle failed with 'Failed to send request'
(writer channel closed) and reconnect was impossible without a server
restart. begin_connect now checks child liveness (is_running) and drops
the stale client/handle/refcount before returning Leader so a fresh
process is spawned. Adds begin_connect_replaces_dead_client test.

AI-assisted: Jcode
RED: attached SessionInfo drops requested working_dir while permission responses are documented as unsupported without the permissions capability.\n\nAI-assisted: Jcode
GREEN: preserve the effective create/attach working_dir through the state reply and cache it for session listings. Permission responses remain rejected because this bridge has no permissions capability or prompt source.\n\nAI-assisted: Jcode
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