Skip to content

feat: session config with knowledge sync and remote auth#20

Closed
melfebulu wants to merge 1 commit intoraysonmeng:masterfrom
melfebulu:feat/session-config
Closed

feat: session config with knowledge sync and remote auth#20
melfebulu wants to merge 1 commit intoraysonmeng:masterfrom
melfebulu:feat/session-config

Conversation

@melfebulu
Copy link
Copy Markdown

Summary

  • Per-workspace .agentbridge.json config: auto-discovered by walking up directory tree; loads knowledge files (local + remote), roles, preamble, and delivery/sync mode into agent sessions
  • JupyterLab Contents API integration: supports jupyter-password auth type; browser popup collects password on first use, session cookie cached for subsequent requests
  • Two knowledge sync modes: master (Claude fetches and relays to Codex) / peer (both fetch independently); switchable at runtime via set_sync_mode MCP tool
  • New MCP tools: reload_session_context, init_workspace, set_sync_mode — no restart required to apply config changes
  • Daemon reconnect: exponential backoff on connection loss with automatic recovery

New files

  • src/session-config.ts — config loading, knowledge fetching, remote auth, browser credential prompt, workspace init

Modified files

  • src/claude-adapter.ts — 3 new MCP tools + callback registration
  • src/bridge.ts — session context injection, master-mode relay to Codex, daemon reconnect
  • src/daemon.ts — Codex-side context injection on ready event (peer mode)

Test plan

  • /bridge-reload loads local + remote (JupyterLab) knowledge files (26974 chars)
  • Browser popup triggers for JupyterLab password, session cookie cached
  • /bridge-mode master switches mode, relays context to Codex
  • /bridge-mode peer switches mode, no relay triggered
  • Config file updated correctly on mode switch
  • TypeScript compiles cleanly (bun run typecheck)
  • Full restart test: daemon + bridge + Codex end-to-end with peer mode

🤖 Generated with Claude Code

…edential prompt

Add per-workspace .agentbridge.json configuration that loads knowledge
files (local + remote), roles, and context preamble into agent sessions
without requiring a restart.

Key features:
- Session config auto-discovery (walks up directory tree)
- JupyterLab Contents API integration with password-based auth
- Browser popup credential prompt (no hardcoded secrets in config)
- Two knowledge sync modes: "master" (Claude fetches and relays to
  Codex) and "peer" (both fetch independently)
- MCP tools: reload_session_context, init_workspace, set_sync_mode
- Daemon reconnect with exponential backoff on connection loss

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@raysonmeng
Copy link
Copy Markdown
Owner

关闭:session config 核心已被 #40 (PR #65) 覆盖,knowledge sync 和 remote auth 可拆为独立 issue 跟踪。

Closing: core session config is covered by #40 (PR #65). Knowledge sync and remote auth can be tracked as separate issues.

@raysonmeng raysonmeng closed this Apr 14, 2026
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