Repository navigation
Conversation
Add Jcode (https://github.com/1jehuang/jcode) to Orca's supported agent catalog: - TuiAgent union: add 'jcode' member to src/shared/types.ts - Agent config: detectCmd/launchCmd/expectedProcess/promptInjectionMode in src/shared/tui-agent-config.ts (launches with stdin-after-start) - Display name: 'Jcode' in src/shared/tui-agent-display-names.ts - Auto-pick order: add to TUI_AGENT_AUTO_PICK_ORDER in tui-agent-selection.ts - Telemetry: add 'jcode' to agentKindSchema and agent-kind mappings - Catalog entries: desktop (agent-catalog.tsx) and mobile (mobile-tui-agents.ts) - Icon: bundled 48x48 PNG from jcode.sh in agent-icons/, referenced in desktop agent-favicon-assets.ts and mobile icon assets - Icon enforcement: add to ICONABLE_AGENT_TYPES in agent-status.ts - Locale: add to never-translate set in locale-translation-policy.mjs
czzczz
force-pushed
the
feat/add-jcode-agent
branch
from
July 25, 2026 08:37
73497cc to
11f1c89
Compare
czzczz
marked this pull request as draft
July 25, 2026 08:37
ELI5
Jcode is a fast, RAM-efficient AI coding TUI written in Rust. This PR makes it a first-class agent in Orca: launch it from the agent picker, see its live working/waiting/done state in the sidebar, resume sleeping sessions, browse session history in AI Vault, get correct tab-bar identity, and use it for branch naming and AI commit messages.
What Changed
Agent catalog
TuiAgentunion with detect/launch config, display name, auto-pick order, icons (desktop + mobile), telemetry kind, and locale entries.Agent status pipeline (on par with Devin/Kimi)
/hook/jcodelistener: jcode lifecycle events (session_start/post_tool/turn_end/session_end) normalized into sidebar status rows; user-input tools map to waiting; last user prompt recovered from the session journal with a bounded scan.[hooks]entries in~/.jcode/config.toml(byte-preserving; keeps jcode's ownpre_tool_timeout_msand user-owned hooks), with local + SSH install and IPC/preload wiring.jcode --resume <id>for sleeping/quit sessions.~/.jcode/sessions/session_*.json, local + SSH discovery, native resume commands.Per-pane daemon isolation
JCODE_RUNTIME_DIR(16-hex hash of the pane key, SUN_LEN safe) so each pane keeps its own daemon and hook events are attributed to the right pane. Injected at the provider-spawn chokepoint for bothpty:spawn(Cmd+T) andcreateTerminalpaths; SSH excluded.Source Control AI
jcode run --json), enabling branch naming, AI commit messages, and resolveConflicts agent selection; output cleanup extracts the JSON result envelope and strips the[Tokens]usage line.Compatibility
Why
Jcode was launch-only before. This PR gives Orca full visibility and control over jcode sessions — status, resume, history, and Source Control AI — using the same integration patterns as other supported agents.
Linked Issue
Fixes #10830
Visual Proof
N/A— no new UI surfaces; the changes reuse existing components (sidebar status, agent picker, AI Vault, Source Control AI dropdown). Verified live in the orca-dev instance.Testing
Local (macOS): sidebar live status, multi-pane isolation, fresh-worktree initialization,
jcode run --jsongeneration.Automated: ~70 new tests (listener normalization, TOML editing, hook service, resume argv, AI Vault parser/discovery, runtime-dir injection, pty:spawn env, commit-message spec/plan/output cleanup, color-query exclusion). Jcode suites: 331+ tests; ai-vault suite: 777 tests.
pnpm typecheck,pnpm lint,pnpm test(relevant suites),git diff --checkpass.I manually tested these changes locally
Automated tests added/updated
AI Disclosure
This PR was implemented with the help of an AI coding agent (opencode / deepseek-v4-flash), including code generation, tests, and conflict resolution. All behavior was manually verified.
Review
.cmdtemplate; paths usepath.join.wslGatedReadFile; AI Vault SSH discovery covered.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)Author