Bring ClaudeCodeProvider to feature parity with the Agent SDK#11
Open
vijaysharm wants to merge 1 commit into
Open
Bring ClaudeCodeProvider to feature parity with the Agent SDK#11vijaysharm wants to merge 1 commit into
vijaysharm wants to merge 1 commit into
Conversation
Replaces the single `dangerouslySkipPermissions: Bool` init param with a `ClaudeCodeOptions` struct that maps every CLI flag exposed by the TypeScript SDK's `Options` interface: - `ClaudeCodePermissionMode` enum → `--permission-mode` (acceptEdits, dontAsk, bypassPermissions, plan, auto); `dangerouslySkipPermissions` and `allowDangerouslySkipPermissions` kept as separate bools for the two distinct CLI flags - `ClaudeCodeBuiltinTools` enum → `--tools` (all / none / only([...])) - `allowedTools`/`disallowedTools` → `--allowedTools` / `--disallowedTools` (comma-separated) - `ClaudeCodeMcpServer` enum (stdio/sse/http) → inline JSON for `--mcp-config` - `strictMcpConfig` → `--strict-mcp-config` - `appendSystemPrompt` → `--append-system-prompt` (preserves built-in prompt; `LLMRequestOptions.systemPrompt` still maps to `--system-prompt` which replaces it) - `additionalDirectories` → `--add-dir` - `fallbackModel` → `--fallback-model` - `maxBudgetUsd` → `--max-budget-usd` - `noSessionPersistence` → `--no-session-persistence` - `forkSession` → `--fork-session` (paired with `--resume`) - `sessionName` → `--name` - `ClaudeCodeSettingSource` enum → `--setting-sources` - `pluginDirs` → `--plugin-dir` (repeatable) - `ClaudeCodeAgentDefinition` (full schema incl. tools, model, mcpServers, skills, maxTurns) → inline JSON for `--agents` - `betas` → `--betas` - `LLMRequestOptions.reasoningEffort` → `--effort` (low/medium/high) - `cwd` → `ProcessConfiguration.workingDirectory` Intentionally not modelled (no CLI equivalent — JS SDK in-process callbacks): `canUseTool`, `hooks` https://claude.ai/code/session_01JMRfUcq8oLLgN5SzvMi8YK
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.
Replaces the single
dangerouslySkipPermissions: Boolinit param with aClaudeCodeOptionsstruct that maps every CLI flag exposed by the TypeScriptSDK's
Optionsinterface:ClaudeCodePermissionModeenum →--permission-mode(acceptEdits, dontAsk,bypassPermissions, plan, auto);
dangerouslySkipPermissionsandallowDangerouslySkipPermissionskept as separate bools for the two distinctCLI flags
ClaudeCodeBuiltinToolsenum →--tools(all / none / only([...]))allowedTools/disallowedTools→--allowedTools/--disallowedTools(comma-separated)
ClaudeCodeMcpServerenum (stdio/sse/http) → inline JSON for--mcp-configstrictMcpConfig→--strict-mcp-configappendSystemPrompt→--append-system-prompt(preserves built-in prompt;LLMRequestOptions.systemPromptstill maps to--system-promptwhichreplaces it)
additionalDirectories→--add-dirfallbackModel→--fallback-modelmaxBudgetUsd→--max-budget-usdnoSessionPersistence→--no-session-persistenceforkSession→--fork-session(paired with--resume)sessionName→--nameClaudeCodeSettingSourceenum →--setting-sourcespluginDirs→--plugin-dir(repeatable)ClaudeCodeAgentDefinition(full schema incl. tools, model, mcpServers,skills, maxTurns) → inline JSON for
--agentsbetas→--betasLLMRequestOptions.reasoningEffort→--effort(low/medium/high)cwd→ProcessConfiguration.workingDirectoryIntentionally not modelled (no CLI equivalent — JS SDK in-process callbacks):
canUseTool,hookshttps://claude.ai/code/session_01JMRfUcq8oLLgN5SzvMi8YK