Skip to content

feat(sciqlop_claude): add Claude chat backend plugin#2

Open
jeandet wants to merge 1 commit intomainfrom
feat/add-sciqlop-claude-plugin
Open

feat(sciqlop_claude): add Claude chat backend plugin#2
jeandet wants to merge 1 commit intomainfrom
feat/add-sciqlop-claude-plugin

Conversation

@jeandet
Copy link
Copy Markdown
Member

@jeandet jeandet commented Apr 15, 2026

Summary

Adds sciqlop_claude, a thin adapter between SciQLop's new agent chat framework and claude-agent-sdk.

  • Registers a ClaudeBackend with SciQLop's agent registry; the shared AgentChatDock handles all the UI.
  • Wraps the SciQLop tool surface (build_sciqlop_tools) into an in-process MCP server exposed to Claude via the SDK's create_sdk_mcp_server.
  • Streams assistant text and tool-result images as typed content blocks the dock renders inline.
  • Resumes prior Claude Code sessions from ~/.claude/projects/<cwd-mangled>/*.jsonl, reconstructing the transcript (text blocks + screenshots) without replaying hidden thinking / tool-use chrome.
  • Gates write tools behind the dock's per-call approval dialog via can_use_tool.

Authentication comes from the user's existing Claude Code OAuth login (the SDK spawns the claude CLI over stdio), so no API key is required.

Dependency

This plugin depends on SciQLop PR SciQLop/SciQLop#107 (the agent framework under SciQLop/components/agents/). Until that merges, the plugin will only work against a SciQLop checkout including that branch.

Test plan

  • uv pip install -e sciqlop_claude/
  • Launch SciQLop with claude CLI available on PATH
  • Open the Agents dock, pick "Claude" from the backend dropdown
  • Send a text prompt; confirm streaming markdown response
  • Ask Claude to sciqlop_screenshot_panel and verify the PNG renders inline
  • Toggle "Allow write actions" and ask Claude to create a panel + plot a product
  • Pick a prior session from the "Resume session…" dropdown and verify the transcript replays

🤖 Generated with Claude Code

Adds sciqlop_claude, a thin adapter between SciQLop's new agent chat
framework and the claude-agent-sdk. Registers a ClaudeBackend that:

- wraps the shared SciQLop tool surface into an in-process MCP server
  the SDK exposes to Claude
- streams assistant text + tool-result images back as the dock's
  typed content blocks
- resumes prior Claude Code sessions from the workspace-scoped JSONL
  store under ~/.claude/projects/<cwd-mangled>/
- gates write tools behind the dock's per-call approval dialog

Authentication comes from the user's existing Claude Code OAuth login
(the SDK spawns the `claude` CLI over stdio), so no API key is
required.

Depends on SciQLop PR #107 (agent framework). Until that merges, this
plugin will only work against a SciQLop checkout including that branch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant