@diffra-ai/cli 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +59 -47
- package/dist/bundle/chunks/{anthropic-messages-HME6WDIM.js → anthropic-messages-YTASKTAG.js} +1 -1
- package/dist/bundle/chunks/{azure-openai-responses-WKSFBZF5.js → azure-openai-responses-2JI3BQFX.js} +1 -1
- package/dist/bundle/chunks/bedrock-converse-stream.js +1 -1
- package/dist/bundle/chunks/{chunk-MITPYV3F.js → chunk-6RKODDUE.js} +1 -1
- package/dist/bundle/chunks/{chunk-MJRIJM22.js → chunk-7QEHJ36J.js} +1 -1
- package/dist/bundle/chunks/{chunk-PXE534VH.js → chunk-AI3Y7XHP.js} +2 -2
- package/dist/bundle/chunks/{chunk-QMZGTPRI.js → chunk-CAD23HR7.js} +1 -1
- package/dist/bundle/chunks/{chunk-E3MJ4MPN.js → chunk-GNFHDZLP.js} +1 -1
- package/dist/bundle/chunks/{chunk-SMYD2SB5.js → chunk-IDYI4NPC.js} +1 -1
- package/dist/bundle/chunks/{chunk-RUI3NOFB.js → chunk-MPWP6WCT.js} +1 -1
- package/dist/bundle/chunks/{chunk-GRDBYTYT.js → chunk-PCXT7GLW.js} +273 -273
- package/dist/bundle/chunks/chunk-RAT6HXXD.js +2 -0
- package/dist/bundle/chunks/{chunk-3MKQN3ZR.js → chunk-YDKIXS42.js} +1 -1
- package/dist/bundle/chunks/{chunk-6L2FT6AE.js → chunk-ZW3S4FQY.js} +1 -1
- package/dist/bundle/chunks/{cli-GKHAGQO6.js → cli-2W6362ZV.js} +1 -1
- package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-PVUECIVD.js → cloudflare-workers-ai-system-one-MN7VZOHO.js} +1 -1
- package/dist/bundle/chunks/{google-generative-ai-2YH7DK5J.js → google-generative-ai-QROUBJ3Y.js} +1 -1
- package/dist/bundle/chunks/{google-vertex-QNIS4SPE.js → google-vertex-RHSCDEG4.js} +1 -1
- package/dist/bundle/chunks/{llama-cpp-classify-EMBT3ZMY.js → llama-cpp-classify-QCKHKADQ.js} +1 -1
- package/dist/bundle/chunks/{mistral-conversations-RCHJWX2M.js → mistral-conversations-WO6QUI4U.js} +1 -1
- package/dist/bundle/chunks/{openai-codex-responses-LBZQ7HUY.js → openai-codex-responses-XFI3MXBY.js} +1 -1
- package/dist/bundle/chunks/{openai-completions-U7NS5GFY.js → openai-completions-2UHGTBTY.js} +1 -1
- package/dist/bundle/chunks/{openai-decisions-YC4ZEGAR.js → openai-decisions-BPJODLLR.js} +1 -1
- package/dist/bundle/chunks/{openai-responses-4YX6XMEO.js → openai-responses-CCD734Z2.js} +1 -1
- package/dist/bundle/chunks/{openrouter-images-QPPGKFJY.js → openrouter-images-WSQ42OX2.js} +1 -1
- package/dist/bundle/chunks/{pi-messages-5W3GZ7B6.js → pi-messages-I264JUT4.js} +1 -1
- package/dist/bundle/chunks/{typesafe-system-one-GWMQ2NLX.js → typesafe-system-one-O3PSKAI2.js} +1 -1
- package/dist/bundle/chunks/{virtual-modules-ENTYMDSQ.js → virtual-modules-CMUMO27Q.js} +1 -1
- package/dist/bundle/cli-runtime.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/core/extensions/types.d.ts +2 -2
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/docs/approval-modes.md +99 -99
- package/docs/cli.md +380 -380
- package/docs/docs.json +264 -264
- package/docs/environment-variables.md +110 -110
- package/docs/extensions.md +3 -2
- package/docs/sdk.md +2 -0
- package/docs/security.md +100 -100
- package/docs/settings.md +198 -198
- package/package.json +6 -6
- package/dist/bundle/chunks/chunk-PQGGR7SQ.js +0 -2
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|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AiB,CAAC;AACvE,kBAAkB;AAClB,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["// Core session management\n\nexport { type Args, parseArgs } from \"./cli/args.ts\";\n\n// Config paths\nexport {\n\tCONFIG_DIR_NAME,\n\tgetAgentDir,\n\tgetDocsPath,\n\tgetExamplesPath,\n\tgetPackageDir,\n\tgetReadmePath,\n\tVERSION,\n} from \"./config.ts\";\nexport {\n\tAgentSession,\n\ttype AgentSessionConfig,\n\ttype AgentSessionEvent,\n\ttype AgentSessionEventListener,\n\ttype ModelCycleResult,\n\ttype ParsedSkillBlock,\n\ttype PromptOptions,\n\tparseSkillBlock,\n\ttype SessionStats,\n} from \"./core/agent-session.ts\";\nexport { readStoredCredential } from \"./core/auth-storage.ts\";\nexport type { CacheWarmingDecision, CacheWarmingStatus } from \"./core/cache-warmer.ts\";\n// Compaction\nexport {\n\ttype BranchPreparation,\n\ttype BranchSummaryResult,\n\ttype CollectEntriesResult,\n\ttype CompactionResult,\n\ttype CutPointResult,\n\tcalculateContextTokens,\n\tcollectEntriesForBranchSummary,\n\tcompact,\n\tDEFAULT_COMPACTION_SETTINGS,\n\testimateTokens,\n\ttype FileOperations,\n\tfindCutPoint,\n\tfindTurnStartIndex,\n\ttype GenerateBranchSummaryOptions,\n\tgenerateBranchSummary,\n\tgenerateSummary,\n\tgenerateSummaryWithUsage,\n\tgetLastAssistantUsage,\n\tprepareBranchEntries,\n\tserializeConversation,\n\tshouldCompact,\n} from \"./core/compaction/index.ts\";\nexport { createEventBus, type EventBus, type EventBusController } from \"./core/event-bus.ts\";\n// Extension system\nexport type {\n\tAfterProviderResponseEvent,\n\tAgentActivityOutcome,\n\tAgentBeforeSettleEvent,\n\tAgentBeforeSettleEventResult,\n\tAgentEndEvent,\n\tAgentSettledEvent,\n\tAgentStartEvent,\n\tAgentToolResult,\n\tAgentToolUpdateCallback,\n\tAppKeybinding,\n\tAutocompleteProviderFactory,\n\tBashToolCallEvent,\n\tBeforeAgentStartCustomEvent,\n\tBeforeAgentStartEvent,\n\tBeforeAgentStartEventResult,\n\tBeforeAgentStartUserEvent,\n\tBeforeProviderHeadersEvent,\n\tBeforeProviderRequestEvent,\n\tBeforeProviderRequestEventResult,\n\tBoundaryContextPreview,\n\tBoundaryResult,\n\tBoundaryState,\n\tBuildSystemPromptOptions,\n\tCacheWarmingDecisionEvent,\n\tCacheWarmingDecisionEventResult,\n\tCompactionEntryDraft,\n\tCompactOptions,\n\tContextEditEntryDraft,\n\tContextEvent,\n\tContextEventResult,\n\tContextUsage,\n\tContextWithSystemEvent,\n\tCustomEntryDraft,\n\tCustomMessageEntryDraft,\n\tCustomToolCallEvent,\n\tEditToolCallEvent,\n\tEntryRenderer,\n\tEntryRenderOptions,\n\tExecOptions,\n\tExecResult,\n\tExecuteToolOptions,\n\tExtension,\n\tExtensionActions,\n\tExtensionAPI,\n\tExtensionCommandContext,\n\tExtensionCommandContextActions,\n\tExtensionContext,\n\tExtensionContextActions,\n\tExtensionError,\n\tExtensionEvent,\n\tExtensionFactory,\n\tExtensionFlag,\n\tExtensionHandler,\n\tExtensionRuntime,\n\tExtensionShortcut,\n\tExtensionToolContext,\n\tExtensionUIContext,\n\tExtensionUIDialogOptions,\n\tExtensionVirtualModel,\n\tExtensionWidgetOptions,\n\tFindToolCallEvent,\n\tGrepToolCallEvent,\n\tInlineExtension,\n\tInputEvent,\n\tInputEventResult,\n\tInputSource,\n\tKeybindingHints,\n\tKeybindingsManager,\n\tLoadExtensionsResult,\n\tLsToolCallEvent,\n\tMarkdownMessageType,\n\tMarkdownTransformContext,\n\tMarkdownTransformer,\n\tMarkdownTransformerOptions,\n\tMarkdownTransformerRegistration,\n\tMcpServersChangeEvent,\n\tMessageEndEvent,\n\tMessageEndEventResult,\n\tMessageRenderer,\n\tMessageRenderOptions,\n\tMessageStartEvent,\n\tMessageUpdateEvent,\n\tModelSelectEvent,\n\tModelSelectSource,\n\tNormalizedBuildSystemPromptOptions,\n\tPowerShellToolCallEvent,\n\tProjectTrustContext,\n\tProjectTrustEvent,\n\tProjectTrustEventDecision,\n\tProjectTrustEventResult,\n\tProjectTrustHandler,\n\tProviderConfig,\n\tProviderModelConfig,\n\tProviderStreamEvent,\n\tReadToolCallEvent,\n\tRegisteredCommand,\n\tRegisteredTool,\n\tResolvedCommand,\n\tResourcesDiscoverEvent,\n\tResourcesDiscoverResult,\n\tSessionBeforeCompactEvent,\n\tSessionBeforeCompactResult,\n\tSessionBeforeForkEvent,\n\tSessionBeforeForkResult,\n\tSessionBeforeSwitchEvent,\n\tSessionBeforeSwitchResult,\n\tSessionBeforeTreeEvent,\n\tSessionBeforeTreeResult,\n\tSessionBoundaryDraft,\n\tSessionCompactEvent,\n\tSessionCompactFailedEvent,\n\tSessionInfoChangedEvent,\n\tSessionShutdownEvent,\n\tSessionStartEvent,\n\tSessionTreeEvent,\n\tSlashCommandInfo,\n\tSlashCommandSource,\n\tSourceInfo,\n\tTerminalInputHandler,\n\tThinkingLevelSelectEvent,\n\tToolAnnotations,\n\tToolCallEvent,\n\tToolCallEventResult,\n\tToolDefinition,\n\tToolExecutionEndEvent,\n\tToolExecutionMode,\n\tToolExecutionStartEvent,\n\tToolExecutionUpdateEvent,\n\tToolExposure,\n\tToolInfo,\n\tToolLoadout,\n\tToolLoadoutChanges,\n\tToolNamespace,\n\tToolRendererResolver,\n\tToolRenderers,\n\tToolRenderResultOptions,\n\tToolResultEvent,\n\tToolResultEventResult,\n\tTurnEndEvent,\n\tTurnEndEventResult,\n\tTurnStartEvent,\n\tUIPromptEndEvent,\n\tUIPromptKind,\n\tUIPromptStartEvent,\n\tUserBashEvent,\n\tUserBashEventResult,\n\tWidgetPlacement,\n\tWorkingIndicatorOptions,\n\tWriteToolCallEvent,\n} from \"./core/extensions/index.ts\";\nexport {\n\tcreateExtensionRuntime,\n\tdefineTool,\n\tdiscoverAndLoadExtensions,\n\tExtensionRunner,\n\tisBashToolResult,\n\tisEditToolResult,\n\tisFindToolResult,\n\tisGrepToolResult,\n\tisLsToolResult,\n\tisPowerShellToolResult,\n\tisReadToolResult,\n\tisToolCallEventType,\n\tisWriteToolResult,\n\twrapRegisteredTool,\n\twrapRegisteredTools,\n} from \"./core/extensions/index.ts\";\n// Footer data provider (git branch + extension statuses - data not otherwise available to extensions)\nexport type { ReadonlyFooterDataProvider } from \"./core/footer-data-provider.ts\";\nexport type { RegisteredMcpServer } from \"./core/mcp-servers.ts\";\nexport { convertToLlm } from \"./core/messages.ts\";\nexport { ModelRegistry } from \"./core/model-registry.ts\";\nexport {\n\ttype ModelScopeDiagnostic,\n\ttype ResolveCliModelResult,\n\ttype ResolveModelScopeResult,\n\tresolveCliModel,\n\tresolveModelScopeWithDiagnostics,\n\ttype ScopedModel,\n} from \"./core/model-resolver.ts\";\nexport {\n\ttype CreateModelRuntimeOptions,\n\tCredentialSynchronizationError,\n\ttype CredentialSynchronizationOperation,\n\tModelRuntime,\n\ttype ModelRuntimeAuthOverrides,\n} from \"./core/model-runtime.ts\";\nexport type {\n\tPackageInstallFailure,\n\tPackageManager,\n\tPathMetadata,\n\tProgressCallback,\n\tProgressEvent,\n\tResolvedPaths,\n\tResolvedResource,\n} from \"./core/package-manager.ts\";\nexport { DefaultPackageManager } from \"./core/package-manager.ts\";\nexport type { ResourceCollision, ResourceDiagnostic, ResourceLoader } from \"./core/resource-loader.ts\";\nexport { DefaultResourceLoader, loadProjectContextFiles } from \"./core/resource-loader.ts\";\n// SDK for programmatic usage\nexport {\n\tAgentSessionRuntime,\n\ttype AgentSessionRuntimeDiagnostic,\n\ttype AgentSessionServices,\n\ttype CreateAgentSessionFromServicesOptions,\n\ttype CreateAgentSessionOptions,\n\ttype CreateAgentSessionResult,\n\ttype CreateAgentSessionRuntimeFactory,\n\ttype CreateAgentSessionRuntimeResult,\n\ttype CreateAgentSessionServicesOptions,\n\t// Factory\n\tcreateAgentSession,\n\tcreateAgentSessionFromServices,\n\tcreateAgentSessionRuntime,\n\tcreateAgentSessionServices,\n\tcreateBashTool,\n\t// Tool factories (for custom cwd)\n\tcreateCodingTools,\n\tcreateEditTool,\n\tcreateFindTool,\n\tcreateGrepTool,\n\tcreateLsTool,\n\tcreatePowerShellTool,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateWriteTool,\n\ttype PromptTemplate,\n} from \"./core/sdk.ts\";\nexport {\n\ttype BranchSummaryEntry,\n\tbuildContextEntries,\n\tbuildSessionContext,\n\tbuildSessionProjection,\n\ttype CompactionEntry,\n\ttype ContextEditableContent,\n\ttype ContextEditEntry,\n\tCURRENT_SESSION_VERSION,\n\ttype CustomEntry,\n\ttype CustomMessageEntry,\n\ttype FileEntry,\n\tgetLatestCompactionEntry,\n\ttype ModelChangeEntry,\n\tmigrateSessionEntries,\n\ttype NewSessionOptions,\n\ttype ProjectedSessionEntry,\n\tparseSessionEntries,\n\ttype SessionContext,\n\ttype SessionEntry,\n\ttype SessionEntryBase,\n\ttype SessionHeader,\n\ttype SessionInfo,\n\ttype SessionInfoEntry,\n\tSessionManager,\n\ttype SessionMessageEntry,\n\ttype SessionProjection,\n\ttype SessionTreeNode,\n\tsessionEntryToContextMessages,\n\ttype ThinkingLevelChangeEntry,\n} from \"./core/session-manager.ts\";\nexport {\n\ttype CacheWarmingMode,\n\ttype CompactionModelOverride,\n\ttype CompactionSettings,\n\ttype DefaultProjectTrust,\n\ttype FullscreenExitOutput,\n\ttype ImageSettings,\n\ttype PackageSource,\n\ttype QuietStartup,\n\ttype RetrySettings,\n\tSettingsManager,\n\ttype SettingsManagerCreateOptions,\n\ttype TuiMode,\n} from \"./core/settings-manager.ts\";\n// Skills\nexport {\n\tformatSkillsForPrompt,\n\ttype LoadSkillsFromDirOptions,\n\ttype LoadSkillsResult,\n\tloadSkills,\n\tloadSkillsFromDir,\n\ttype Skill,\n\ttype SkillFrontmatter,\n} from \"./core/skills.ts\";\nexport { createSyntheticSourceInfo } from \"./core/source-info.ts\";\nexport { type EditDiffResult, generateDiffString, generateUnifiedPatch } from \"./core/tools/edit-diff.ts\";\n// Tools\nexport {\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tcreateBashToolDefinition,\n\tcreateEditToolDefinition,\n\tcreateFindToolDefinition,\n\tcreateGrepToolDefinition,\n\tcreateLocalBashOperations,\n\tcreateLocalPowerShellOperations,\n\tcreateLsToolDefinition,\n\tcreatePowerShellToolDefinition,\n\tcreateReadToolDefinition,\n\tcreateWriteToolDefinition,\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\ttype EditOperations,\n\ttype EditToolDetails,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n\tformatSize,\n\ttype GrepOperations,\n\ttype GrepToolDetails,\n\ttype GrepToolInput,\n\ttype GrepToolOptions,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n\ttype PowerShellOperations,\n\ttype PowerShellSpawnContext,\n\ttype PowerShellSpawnHook,\n\ttype PowerShellToolDetails,\n\ttype PowerShellToolInput,\n\ttype PowerShellToolOptions,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n\ttype ToolsOptions,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n\ttype WriteOperations,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n\twithFileMutationQueue,\n} from \"./core/tools/index.ts\";\nexport { formatReadLineRange } from \"./core/tools/render-utils.ts\";\nexport {\n\thasTrustRequiringProjectResources,\n\ttype ProjectTrustDecision,\n\tProjectTrustStore,\n\ttype ProjectTrustStoreEntry,\n\ttype ProjectTrustUpdate,\n} from \"./core/trust-manager.ts\";\nexport {\n\ttype ModelRoute,\n\ttype ModelRouteReason,\n\ttype ModelRouteRequest,\n\tVIRTUAL_MODEL_STATE_ENTRY,\n\ttype VirtualModelDefinition,\n\ttype VirtualModelStateData,\n} from \"./core/virtual-models.ts\";\n// Built-in extensions. The CLI loads them; SDK sessions add them to their extension factories.\nexport { type CodemodeExtensionOptions, createCodemodeExtension } from \"./extensions/codemode/index.ts\";\nexport type { CodemodeStoreEntryData, CodemodeToolDetails } from \"./extensions/codemode/tool.ts\";\nexport type { LoadedMcpConfig, McpExposure, McpServerConfig, McpServerEntry } from \"./extensions/mcp/config.ts\";\nexport { createMcpExtension, type McpExtensionOptions, type McpTransportFactory } from \"./extensions/mcp/index.ts\";\nexport { createToolSearchExtension } from \"./extensions/tool-search/index.ts\";\n// Main entry point\nexport { type MainOptions, main } from \"./main.ts\";\n// Run modes for programmatic SDK usage\nexport {\n\tInteractiveMode,\n\ttype InteractiveModeOptions,\n\ttype JsonAgentSessionEvent,\n\ttype ModelInfo,\n\ttype PrintModeOptions,\n\tRpcClient,\n\ttype RpcClientOptions,\n\ttype RpcCommand,\n\ttype RpcEventListener,\n\ttype RpcExtensionUIRequest,\n\ttype RpcExtensionUIResponse,\n\ttype RpcResponse,\n\ttype RpcSessionState,\n\trunPrintMode,\n\trunRpcMode,\n} from \"./modes/index.ts\";\n// UI components for extensions\nexport {\n\tArminComponent,\n\tAssistantMessageComponent,\n\tBashExecutionComponent,\n\tBorderedLoader,\n\tBranchSummaryMessageComponent,\n\tCompactionSummaryMessageComponent,\n\tCustomEditor,\n\ttype CustomEditorOptions,\n\tCustomMessageComponent,\n\tDynamicBorder,\n\tExtensionEditorComponent,\n\tExtensionInputComponent,\n\tExtensionSelectorComponent,\n\tFooterComponent,\n\tkeyHint,\n\tkeyText,\n\tLoginDialogComponent,\n\tModelSelectorComponent,\n\tOAuthSelectorComponent,\n\ttype RenderDiffOptions,\n\trawKeyHint,\n\trenderDiff,\n\tSessionSelectorComponent,\n\ttype SettingsCallbacks,\n\ttype SettingsConfig,\n\tSettingsSelectorComponent,\n\tShowImagesSelectorComponent,\n\tSkillInvocationMessageComponent,\n\tThemeSelectorComponent,\n\tThinkingSelectorComponent,\n\tToolExecutionComponent,\n\ttype ToolExecutionOptions,\n\tTreeSelectorComponent,\n\ttruncateToVisualLines,\n\tUserMessageComponent,\n\tUserMessageSelectorComponent,\n\ttype VisualTruncateResult,\n} from \"./modes/interactive/components/index.ts\";\n// Theme utilities for custom tools and extensions\nexport {\n\tgetLanguageFromPath,\n\tgetMarkdownTheme,\n\tgetSelectListTheme,\n\tgetSettingsListTheme,\n\thighlightCode,\n\tinitTheme,\n\tTheme,\n\ttype ThemeAppearance,\n\ttype ThemeBg,\n\ttype ThemeColor,\n\ttype ThemeStyle,\n\ttype ThemeToken,\n} from \"./modes/interactive/theme/theme.ts\";\n// Clipboard utilities\nexport { copyToClipboard } from \"./utils/clipboard.ts\";\nexport { parseFrontmatter, stripFrontmatter } from \"./utils/frontmatter.ts\";\nexport { convertToPng } from \"./utils/image-convert.ts\";\nexport { formatDimensionNote, type ResizedImage, resizeImage } from \"./utils/image-resize.ts\";\nexport { detectSupportedImageMimeTypeFromFile } from \"./utils/mime.ts\";\n// Shell utilities\nexport { getPowerShellConfig, getShellConfig } from \"./utils/shell.ts\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAE1B,OAAO,EAAa,SAAS,EAAE,MAAM,eAAe,CAAC;AAErD,eAAe;AACf,OAAO,EACN,eAAe,EACf,WAAW,EACX,WAAW,EACX,eAAe,EACf,aAAa,EACb,aAAa,EACb,OAAO,GACP,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,YAAY,EAOZ,eAAe,GAEf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,aAAa;AACb,OAAO,EAMN,sBAAsB,EACtB,8BAA8B,EAC9B,OAAO,EACP,2BAA2B,EAC3B,cAA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,EAC7B,iCAAiC,EACjC,YAAY,EAEZ,sBAAsB,EACtB,aAAa,EACb,wBAAwB,EACxB,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,OAAO,EACP,OAAO,EACP,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EAEtB,UAAU,EACV,UAAU,EACV,wBAAwB,EAGxB,yBAAyB,EACzB,2BAA2B,EAC3B,+BAA+B,EAC/B,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EAEtB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,4BAA4B,GAE5B,MAAM,yCAAyC,CAAC;AACjD,kDAAkD;AAClD,OAAO,EACN,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACb,SAAS,EACT,KAAK,EAML,KAAK,GACL,MAAM,oCAAoC,CAAC;AAC5C,sBAAsB;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAqB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC9F,OAAO,EAAE,oCAAoC,EAAE,MAAM,iBAAiB,CAAC;AACvE,kBAAkB;AAClB,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["// Core session management\n\nexport { type Args, parseArgs } from \"./cli/args.ts\";\n\n// Config paths\nexport {\n\tCONFIG_DIR_NAME,\n\tgetAgentDir,\n\tgetDocsPath,\n\tgetExamplesPath,\n\tgetPackageDir,\n\tgetReadmePath,\n\tVERSION,\n} from \"./config.ts\";\nexport {\n\tAgentSession,\n\ttype AgentSessionConfig,\n\ttype AgentSessionEvent,\n\ttype AgentSessionEventListener,\n\ttype ModelCycleResult,\n\ttype ParsedSkillBlock,\n\ttype PromptOptions,\n\tparseSkillBlock,\n\ttype SessionStats,\n} from \"./core/agent-session.ts\";\nexport { readStoredCredential } from \"./core/auth-storage.ts\";\nexport type { CacheWarmingDecision, CacheWarmingStatus } from \"./core/cache-warmer.ts\";\n// Compaction\nexport {\n\ttype BranchPreparation,\n\ttype BranchSummaryResult,\n\ttype CollectEntriesResult,\n\ttype CompactionResult,\n\ttype CutPointResult,\n\tcalculateContextTokens,\n\tcollectEntriesForBranchSummary,\n\tcompact,\n\tDEFAULT_COMPACTION_SETTINGS,\n\testimateTokens,\n\ttype FileOperations,\n\tfindCutPoint,\n\tfindTurnStartIndex,\n\ttype GenerateBranchSummaryOptions,\n\tgenerateBranchSummary,\n\tgenerateSummary,\n\tgenerateSummaryWithUsage,\n\tgetLastAssistantUsage,\n\tprepareBranchEntries,\n\tserializeConversation,\n\tshouldCompact,\n} from \"./core/compaction/index.ts\";\nexport { createEventBus, type EventBus, type EventBusController } from \"./core/event-bus.ts\";\n// Extension system\nexport type {\n\tAfterProviderResponseEvent,\n\tAgentActivityOutcome,\n\tAgentBeforeSettleEvent,\n\tAgentBeforeSettleEventResult,\n\tAgentEndEvent,\n\tAgentSettledEvent,\n\tAgentStartEvent,\n\tAgentToolResult,\n\tAgentToolUpdateCallback,\n\tAppKeybinding,\n\tAutocompleteProviderFactory,\n\tBashToolCallEvent,\n\tBeforeAgentStartCustomEvent,\n\tBeforeAgentStartEvent,\n\tBeforeAgentStartEventResult,\n\tBeforeAgentStartUserEvent,\n\tBeforeProviderHeadersEvent,\n\tBeforeProviderRequestEvent,\n\tBeforeProviderRequestEventResult,\n\tBoundaryContextPreview,\n\tBoundaryResult,\n\tBoundaryState,\n\tBuildSystemPromptOptions,\n\tCacheWarmingDecisionEvent,\n\tCacheWarmingDecisionEventResult,\n\tCompactionEntryDraft,\n\tCompactOptions,\n\tContextEditEntryDraft,\n\tContextEvent,\n\tContextEventResult,\n\tContextUsage,\n\tContextWithSystemEvent,\n\tCustomEntryDraft,\n\tCustomMessageEntryDraft,\n\tCustomToolCallEvent,\n\tEditToolCallEvent,\n\tEntryRenderer,\n\tEntryRenderOptions,\n\tExecOptions,\n\tExecResult,\n\tExecuteToolOptions,\n\tExtension,\n\tExtensionActions,\n\tExtensionAPI,\n\tExtensionCommandContext,\n\tExtensionCommandContextActions,\n\tExtensionContext,\n\tExtensionContextActions,\n\tExtensionError,\n\tExtensionEvent,\n\tExtensionFactory,\n\tExtensionFlag,\n\tExtensionHandler,\n\tExtensionRuntime,\n\tExtensionShortcut,\n\tExtensionToolContext,\n\tExtensionUIContext,\n\tExtensionUIDialogOptions,\n\tExtensionVirtualModel,\n\tExtensionWidgetOptions,\n\tFindToolCallEvent,\n\tGrepToolCallEvent,\n\tInlineExtension,\n\tInputEvent,\n\tInputEventResult,\n\tInputSource,\n\tKeybindingHints,\n\tKeybindingsManager,\n\tLoadExtensionsResult,\n\tLsToolCallEvent,\n\tMarkdownMessageType,\n\tMarkdownTransformContext,\n\tMarkdownTransformer,\n\tMarkdownTransformerOptions,\n\tMarkdownTransformerRegistration,\n\tMcpServersChangeEvent,\n\tMessageEndEvent,\n\tMessageEndEventResult,\n\tMessageRenderer,\n\tMessageRenderOptions,\n\tMessageStartEvent,\n\tMessageUpdateEvent,\n\tModelSelectEvent,\n\tModelSelectSource,\n\tNormalizedBuildSystemPromptOptions,\n\tPowerShellToolCallEvent,\n\tProjectTrustContext,\n\tProjectTrustEvent,\n\tProjectTrustEventDecision,\n\tProjectTrustEventResult,\n\tProjectTrustHandler,\n\tProviderConfig,\n\tProviderModelConfig,\n\tProviderStreamEvent,\n\tReadToolCallEvent,\n\tRegisteredCommand,\n\tRegisteredTool,\n\tResolvedCommand,\n\tResourcesDiscoverEvent,\n\tResourcesDiscoverResult,\n\tSessionBeforeCompactEvent,\n\tSessionBeforeCompactResult,\n\tSessionBeforeForkEvent,\n\tSessionBeforeForkResult,\n\tSessionBeforeSwitchEvent,\n\tSessionBeforeSwitchResult,\n\tSessionBeforeTreeEvent,\n\tSessionBeforeTreeResult,\n\tSessionBoundaryDraft,\n\tSessionCompactEvent,\n\tSessionCompactFailedEvent,\n\tSessionInfoChangedEvent,\n\tSessionShutdownEvent,\n\tSessionStartEvent,\n\tSessionTreeEvent,\n\tSlashCommandInfo,\n\tSlashCommandSource,\n\tSourceInfo,\n\tTerminalInputHandler,\n\tThinkingLevelSelectEvent,\n\tToolAnnotations,\n\tToolCallEvent,\n\tToolCallEventResult,\n\tToolDefinition,\n\tToolExecutionEndEvent,\n\tToolExecutionMode,\n\tToolExecutionStartEvent,\n\tToolExecutionUpdateEvent,\n\tToolExposure,\n\tToolInfo,\n\tToolLoadout,\n\tToolLoadoutChanges,\n\tToolNamespace,\n\tToolRendererResolver,\n\tToolRenderers,\n\tToolRenderResultOptions,\n\tToolResultEvent,\n\tToolResultEventResult,\n\tTurnEndEvent,\n\tTurnEndEventResult,\n\tTurnStartEvent,\n\tUIPromptEndEvent,\n\tUIPromptKind,\n\tUIPromptStartEvent,\n\tUserBashEvent,\n\tUserBashEventResult,\n\tWidgetPlacement,\n\tWorkingIndicatorOptions,\n\tWriteToolCallEvent,\n} from \"./core/extensions/index.ts\";\nexport {\n\tcreateExtensionRuntime,\n\tdefineTool,\n\tdiscoverAndLoadExtensions,\n\tExtensionRunner,\n\tisBashToolResult,\n\tisEditToolResult,\n\tisFindToolResult,\n\tisGrepToolResult,\n\tisLsToolResult,\n\tisPowerShellToolResult,\n\tisReadToolResult,\n\tisToolCallEventType,\n\tisWriteToolResult,\n\twrapRegisteredTool,\n\twrapRegisteredTools,\n} from \"./core/extensions/index.ts\";\n// Footer data provider (git branch + extension statuses - data not otherwise available to extensions)\nexport type { ReadonlyFooterDataProvider } from \"./core/footer-data-provider.ts\";\nexport type { RegisteredMcpServer } from \"./core/mcp-servers.ts\";\nexport { convertToLlm } from \"./core/messages.ts\";\nexport { ModelRegistry } from \"./core/model-registry.ts\";\nexport {\n\ttype ModelScopeDiagnostic,\n\ttype ResolveCliModelResult,\n\ttype ResolveModelScopeResult,\n\tresolveCliModel,\n\tresolveModelScopeWithDiagnostics,\n\ttype ScopedModel,\n} from \"./core/model-resolver.ts\";\nexport {\n\ttype CreateModelRuntimeOptions,\n\tCredentialSynchronizationError,\n\ttype CredentialSynchronizationOperation,\n\tModelRuntime,\n\ttype ModelRuntimeAuthOverrides,\n} from \"./core/model-runtime.ts\";\nexport type {\n\tPackageInstallFailure,\n\tPackageManager,\n\tPathMetadata,\n\tProgressCallback,\n\tProgressEvent,\n\tResolvedPaths,\n\tResolvedResource,\n} from \"./core/package-manager.ts\";\nexport { DefaultPackageManager } from \"./core/package-manager.ts\";\nexport type { ResourceCollision, ResourceDiagnostic, ResourceLoader } from \"./core/resource-loader.ts\";\nexport { DefaultResourceLoader, loadProjectContextFiles } from \"./core/resource-loader.ts\";\n// SDK for programmatic usage\nexport {\n\tAgentSessionRuntime,\n\ttype AgentSessionRuntimeDiagnostic,\n\ttype AgentSessionServices,\n\ttype CreateAgentSessionFromServicesOptions,\n\ttype CreateAgentSessionOptions,\n\ttype CreateAgentSessionResult,\n\ttype CreateAgentSessionRuntimeFactory,\n\ttype CreateAgentSessionRuntimeResult,\n\ttype CreateAgentSessionServicesOptions,\n\t// Factory\n\tcreateAgentSession,\n\tcreateAgentSessionFromServices,\n\tcreateAgentSessionRuntime,\n\tcreateAgentSessionServices,\n\tcreateBashTool,\n\t// Tool factories (for custom cwd)\n\tcreateCodingTools,\n\tcreateEditTool,\n\tcreateFindTool,\n\tcreateGrepTool,\n\tcreateLsTool,\n\tcreatePowerShellTool,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateWriteTool,\n\ttype PromptTemplate,\n} from \"./core/sdk.ts\";\nexport {\n\ttype BranchSummaryEntry,\n\tbuildContextEntries,\n\tbuildSessionContext,\n\tbuildSessionProjection,\n\ttype CompactionEntry,\n\ttype ContextEditableContent,\n\ttype ContextEditEntry,\n\tCURRENT_SESSION_VERSION,\n\ttype CustomEntry,\n\ttype CustomMessageEntry,\n\ttype FileEntry,\n\tgetLatestCompactionEntry,\n\ttype ModelChangeEntry,\n\tmigrateSessionEntries,\n\ttype NewSessionOptions,\n\ttype ProjectedSessionEntry,\n\tparseSessionEntries,\n\ttype SessionContext,\n\ttype SessionEntry,\n\ttype SessionEntryBase,\n\ttype SessionHeader,\n\ttype SessionInfo,\n\ttype SessionInfoEntry,\n\tSessionManager,\n\ttype SessionMessageEntry,\n\ttype SessionProjection,\n\ttype SessionTreeNode,\n\tsessionEntryToContextMessages,\n\ttype ThinkingLevelChangeEntry,\n} from \"./core/session-manager.ts\";\nexport {\n\ttype CacheWarmingMode,\n\ttype CompactionModelOverride,\n\ttype CompactionSettings,\n\ttype DefaultProjectTrust,\n\ttype FullscreenExitOutput,\n\ttype ImageSettings,\n\ttype PackageSource,\n\ttype QuietStartup,\n\ttype RetrySettings,\n\tSettingsManager,\n\ttype SettingsManagerCreateOptions,\n\ttype TuiMode,\n} from \"./core/settings-manager.ts\";\n// Skills\nexport {\n\tformatSkillsForPrompt,\n\ttype LoadSkillsFromDirOptions,\n\ttype LoadSkillsResult,\n\tloadSkills,\n\tloadSkillsFromDir,\n\ttype Skill,\n\ttype SkillFrontmatter,\n} from \"./core/skills.ts\";\nexport { createSyntheticSourceInfo } from \"./core/source-info.ts\";\nexport { type EditDiffResult, generateDiffString, generateUnifiedPatch } from \"./core/tools/edit-diff.ts\";\n// Tools\nexport {\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tcreateBashToolDefinition,\n\tcreateEditToolDefinition,\n\tcreateFindToolDefinition,\n\tcreateGrepToolDefinition,\n\tcreateLocalBashOperations,\n\tcreateLocalPowerShellOperations,\n\tcreateLsToolDefinition,\n\tcreatePowerShellToolDefinition,\n\tcreateReadToolDefinition,\n\tcreateWriteToolDefinition,\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\ttype EditOperations,\n\ttype EditToolDetails,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n\tformatSize,\n\ttype GrepOperations,\n\ttype GrepToolDetails,\n\ttype GrepToolInput,\n\ttype GrepToolOptions,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n\ttype PowerShellOperations,\n\ttype PowerShellSpawnContext,\n\ttype PowerShellSpawnHook,\n\ttype PowerShellToolDetails,\n\ttype PowerShellToolInput,\n\ttype PowerShellToolOptions,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n\ttype ToolsOptions,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n\ttype WriteOperations,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n\twithFileMutationQueue,\n} from \"./core/tools/index.ts\";\nexport { formatReadLineRange } from \"./core/tools/render-utils.ts\";\nexport {\n\thasTrustRequiringProjectResources,\n\ttype ProjectTrustDecision,\n\tProjectTrustStore,\n\ttype ProjectTrustStoreEntry,\n\ttype ProjectTrustUpdate,\n} from \"./core/trust-manager.ts\";\nexport {\n\ttype ModelRoute,\n\ttype ModelRouteReason,\n\ttype ModelRouteRequest,\n\tVIRTUAL_MODEL_STATE_ENTRY,\n\ttype VirtualModelDefinition,\n\ttype VirtualModelStateData,\n} from \"./core/virtual-models.ts\";\n// Built-in extensions. The CLI loads them; SDK sessions add them to their extension factories.\nexport { type CodemodeExtensionOptions, createCodemodeExtension } from \"./extensions/codemode/index.ts\";\nexport type { CodemodeStoreEntryData, CodemodeToolDetails } from \"./extensions/codemode/tool.ts\";\nexport { builtInExtensions } from \"./extensions/index.ts\";\nexport type { LoadedMcpConfig, McpExposure, McpServerConfig, McpServerEntry } from \"./extensions/mcp/config.ts\";\nexport { createMcpExtension, type McpExtensionOptions, type McpTransportFactory } from \"./extensions/mcp/index.ts\";\nexport { createToolSearchExtension } from \"./extensions/tool-search/index.ts\";\n// Main entry point\nexport { type MainOptions, main } from \"./main.ts\";\n// Run modes for programmatic SDK usage\nexport {\n\tInteractiveMode,\n\ttype InteractiveModeOptions,\n\ttype JsonAgentSessionEvent,\n\ttype ModelInfo,\n\ttype PrintModeOptions,\n\tRpcClient,\n\ttype RpcClientOptions,\n\ttype RpcCommand,\n\ttype RpcEventListener,\n\ttype RpcExtensionUIRequest,\n\ttype RpcExtensionUIResponse,\n\ttype RpcResponse,\n\ttype RpcSessionState,\n\trunPrintMode,\n\trunRpcMode,\n} from \"./modes/index.ts\";\n// UI components for extensions\nexport {\n\tArminComponent,\n\tAssistantMessageComponent,\n\tBashExecutionComponent,\n\tBorderedLoader,\n\tBranchSummaryMessageComponent,\n\tCompactionSummaryMessageComponent,\n\tCustomEditor,\n\ttype CustomEditorOptions,\n\tCustomMessageComponent,\n\tDynamicBorder,\n\tExtensionEditorComponent,\n\tExtensionInputComponent,\n\tExtensionSelectorComponent,\n\tFooterComponent,\n\tkeyHint,\n\tkeyText,\n\tLoginDialogComponent,\n\tModelSelectorComponent,\n\tOAuthSelectorComponent,\n\ttype RenderDiffOptions,\n\trawKeyHint,\n\trenderDiff,\n\tSessionSelectorComponent,\n\ttype SettingsCallbacks,\n\ttype SettingsConfig,\n\tSettingsSelectorComponent,\n\tShowImagesSelectorComponent,\n\tSkillInvocationMessageComponent,\n\tThemeSelectorComponent,\n\tThinkingSelectorComponent,\n\tToolExecutionComponent,\n\ttype ToolExecutionOptions,\n\tTreeSelectorComponent,\n\ttruncateToVisualLines,\n\tUserMessageComponent,\n\tUserMessageSelectorComponent,\n\ttype VisualTruncateResult,\n} from \"./modes/interactive/components/index.ts\";\n// Theme utilities for custom tools and extensions\nexport {\n\tgetLanguageFromPath,\n\tgetMarkdownTheme,\n\tgetSelectListTheme,\n\tgetSettingsListTheme,\n\thighlightCode,\n\tinitTheme,\n\tTheme,\n\ttype ThemeAppearance,\n\ttype ThemeBg,\n\ttype ThemeColor,\n\ttype ThemeStyle,\n\ttype ThemeToken,\n\ttheme,\n} from \"./modes/interactive/theme/theme.ts\";\n// Clipboard utilities\nexport { copyToClipboard } from \"./utils/clipboard.ts\";\nexport { parseFrontmatter, stripFrontmatter } from \"./utils/frontmatter.ts\";\nexport { convertToPng } from \"./utils/image-convert.ts\";\nexport { formatDimensionNote, type ResizedImage, resizeImage } from \"./utils/image-resize.ts\";\nexport { detectSupportedImageMimeTypeFromFile } from \"./utils/mime.ts\";\n// Shell utilities\nexport { getPowerShellConfig, getShellConfig } from \"./utils/shell.ts\";\n"]}
|
package/docs/approval-modes.md
CHANGED
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
# Approve Tool Calls
|
|
2
|
-
|
|
3
|
-
Approval modes decide which tool calls run without asking. Diffra starts in `yolo` mode, which runs every call without asking, as earlier versions did. The other modes ask before edits and commands, let a classifier decide, or keep the session read-only for planning.
|
|
4
|
-
|
|
5
|
-
| Mode | Edits | Shell commands | Other tools |
|
|
6
|
-
|---|---|---|---|
|
|
7
|
-
| `plan` | Blocked | Read-only commands run; state-modifying ones are blocked; others need a one-time approval | Read-only tools only |
|
|
8
|
-
| `default` (Ask Permissions) | Ask | Ask | Ask, except local read-only tools |
|
|
9
|
-
| `auto-edit` | Allowed | Ask | Ask, except local read-only tools |
|
|
10
|
-
| `auto` | Allowed inside the project; classifier elsewhere | Read-only commands run; classifier for the rest | Classifier, except local read-only tools |
|
|
11
|
-
| `yolo` (default) | Allowed | Allowed | Allowed |
|
|
12
|
-
|
|
13
|
-
Local read-only tools are `read`, `grep`, `find`, `ls`, `todo_write`, `tool_search`, `codemode` (its calls are checked one by one), and tools whose annotations mark them read-only without reaching the web. `web_fetch`, `web_search`, and read-only tools that reach the web run in plan mode but ask in `default` and `auto-edit` mode.
|
|
14
|
-
|
|
15
|
-
Approval modes come from the built-in extension `builtin:approval`. Disabling it (`-builtin:approval` in the `extensions` setting, or `--no-extensions`) removes the checks, so every call runs as in `yolo` mode. They do not restrict what an allowed call can reach; the [sandbox](sandbox.md) does, and in `default`, `auto-edit`, and `auto` mode Diffra asks before running an action the sandbox blocked without it. See [Run Diffra Safely](security.md).
|
|
16
|
-
|
|
17
|
-
## Change the mode
|
|
18
|
-
|
|
19
|
-
- Press `alt+m` (`app.approvalMode.cycle`) to step through `plan`, `default`, `auto-edit`, `auto`, and `yolo`. Qwen Code uses Shift+Tab for this; in Diffra Shift+Tab cycles the thinking level, so the approval mode has its own key. Rebind it in [keybindings.json](keybindings.md).
|
|
20
|
-
- `/approval-mode` opens a selector; `/approval-mode <mode>` switches directly. Add `--user` or `--project` to also save the mode as the default for new sessions, in your settings or the project's `.diffra/settings.json`.
|
|
21
|
-
- `/plan` enters plan mode, and `/plan <request>` enters it and sends the request. `/plan exit` returns to the mode you were in before.
|
|
22
|
-
- `--approval-mode <mode>` starts the session in a mode for this run.
|
|
23
|
-
- The `approvalMode` setting sets the mode new sessions start in.
|
|
24
|
-
|
|
25
|
-
The footer shows the mode unless it is `yolo`. A mode change is recorded in the session, so `--resume`, `/tree`, and `/fork` keep the mode of that branch.
|
|
26
|
-
|
|
27
|
-
## Approve calls
|
|
28
|
-
|
|
29
|
-
When a call needs approval, Diffra shows a dialog with three choices:
|
|
30
|
-
|
|
31
|
-
- **Yes, allow once** runs this call.
|
|
32
|
-
- **Yes, always allow** remembers the answer for the rest of the session: for shell commands, every command that starts with the same programs (for example `npm`); for edits, it switches to `auto-edit`; for other tools, every call of that tool.
|
|
33
|
-
- **No** blocks the call, and the model is told you denied it.
|
|
34
|
-
|
|
35
|
-
Dialogs appear one at a time. Without an interactive UI (print and JSON mode), a call that needs approval is blocked and the model is told why. Use `yolo` mode, or `auto` for calls the classifier can approve, in unattended runs.
|
|
36
|
-
|
|
37
|
-
## Plan mode
|
|
38
|
-
|
|
39
|
-
In plan mode the model explores with read-only tools and writes a plan. Every model request carries a reminder of the plan-mode rules, and the model calls `exit_plan_mode` with its plan when it is ready. The tool is declared to the model only in plan mode.
|
|
40
|
-
|
|
41
|
-
`exit_plan_mode` shows the plan and asks how to continue:
|
|
42
|
-
|
|
43
|
-
- **Yes, restore the previous mode** returns to the mode before plan mode.
|
|
44
|
-
- **Yes, and auto-accept edits** continues in `auto-edit`.
|
|
45
|
-
- **Yes, and manually approve edits** continues in `default`.
|
|
46
|
-
- **No, keep planning** stays in plan mode.
|
|
47
|
-
|
|
48
|
-
Only your answer approves a plan; no mode or setting approves it for you. When plan mode ends another way, such as with `/plan exit`, the next model request tells the model that plan mode is over and no plan approval is pending.
|
|
49
|
-
|
|
50
|
-
A shell command that is neither recognized as read-only nor as state-modifying asks for a one-time approval of that exact command. It does not approve related commands or the plan.
|
|
51
|
-
|
|
52
|
-
## Auto mode
|
|
53
|
-
|
|
54
|
-
In auto mode, edits inside the project and read-only commands run directly. Everything else goes to a classifier model: shell commands that are not read-only, `web_fetch` and `web_search`, edits outside the project, and other tools such as MCP tools. Edits inside the project to files that configure the agent or persist across sessions also go to the classifier: `.diffra/`, `.git/`, `.husky/`, `.github/workflows/`, `AGENTS.md`, `CLAUDE.md`, `.mcp.json`, `package.json`, `.npmrc`, and `Makefile`. Symbolic links are resolved first, so a link out of the project counts as outside.
|
|
55
|
-
|
|
56
|
-
The classifier is the [`fastModel`](settings.md) when set, otherwise the session model. It sees the call and your latest message and answers whether to block it, with a reason. It follows a built-in policy: it allows reading, building, testing, installing project dependencies, and local edits; blocks deleting data outside the project, pushing, publishing, deploying, and sending data to third parties unless your latest message asked for exactly that; and always blocks destroying systems, running downloaded code, reading or sending credentials, persistence outside the project, weakening security, and force-pushing to `main` or `master`.
|
|
57
|
-
|
|
58
|
-
- A blocked call fails with the classifier's reason.
|
|
59
|
-
- When the classifier cannot answer (an error, a timeout, or an answer that is not the expected JSON), the call is blocked. After two such calls in a row, the next call asks you instead.
|
|
60
|
-
- After three blocks in a row, the third asks you instead, so the model does not loop on a blocked approach.
|
|
61
|
-
|
|
62
|
-
Add natural-language hints in the `permissions.autoMode` setting:
|
|
63
|
-
|
|
64
|
-
```json
|
|
65
|
-
{
|
|
66
|
-
"approvalMode": "auto",
|
|
67
|
-
"permissions": {
|
|
68
|
-
"autoMode": {
|
|
69
|
-
"hints": {
|
|
70
|
-
"allow": ["Running pytest, mypy, and ruff in this repository"],
|
|
71
|
-
"softDeny": ["Running database migrations"],
|
|
72
|
-
"hardDeny": ["Any network call to intranet.example.com"]
|
|
73
|
-
},
|
|
74
|
-
"environment": ["Private monorepo; commits are signed"],
|
|
75
|
-
"classifyAllShell": false,
|
|
76
|
-
"classifier": { "timeouts": { "stage1Ms": 10000 } }
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
| Setting | Meaning |
|
|
83
|
-
|---|---|
|
|
84
|
-
| `hints.allow` | Actions to allow |
|
|
85
|
-
| `hints.softDeny` | Actions to block unless your latest message asked for exactly that action and scope; `hints.deny` is an older name |
|
|
86
|
-
| `hints.hardDeny` | Actions to block regardless of hints or your request |
|
|
87
|
-
| `environment` | Facts about the environment for the classifier |
|
|
88
|
-
| `classifyAllShell` | Send read-only shell commands to the classifier too (default `false`) |
|
|
89
|
-
| `classifier.timeouts.stage1Ms` | Time limit of one classifier request in milliseconds (default `10000`) |
|
|
90
|
-
|
|
91
|
-
Each hint is cut to 200 characters; each list keeps its first 50 entries and `environment` its first 20.
|
|
92
|
-
|
|
93
|
-
## Differences from Qwen Code
|
|
94
|
-
|
|
95
|
-
- The default mode is `yolo`, not `auto`, so existing sessions keep running without dialogs.
|
|
96
|
-
- The cycle key is `alt+m`, not Shift+Tab, which cycles the thinking level in Diffra.
|
|
97
|
-
- The classifier makes one request per call and returns its reason; Qwen Code runs a fast stage and, after a block, a second reviewing stage.
|
|
98
|
-
- There are no `permissions.allow`, `permissions.ask`, or `permissions.deny` rules. Session approvals are the only remembered answers, and they end with the session.
|
|
99
|
-
- Approved plans are kept in the session (the `exit_plan_mode` call), not saved to a separate plans directory.
|
|
1
|
+
# Approve Tool Calls
|
|
2
|
+
|
|
3
|
+
Approval modes decide which tool calls run without asking. Diffra starts in `yolo` mode, which runs every call without asking, as earlier versions did. The other modes ask before edits and commands, let a classifier decide, or keep the session read-only for planning.
|
|
4
|
+
|
|
5
|
+
| Mode | Edits | Shell commands | Other tools |
|
|
6
|
+
|---|---|---|---|
|
|
7
|
+
| `plan` | Blocked | Read-only commands run; state-modifying ones are blocked; others need a one-time approval | Read-only tools only |
|
|
8
|
+
| `default` (Ask Permissions) | Ask | Ask | Ask, except local read-only tools |
|
|
9
|
+
| `auto-edit` | Allowed | Ask | Ask, except local read-only tools |
|
|
10
|
+
| `auto` | Allowed inside the project; classifier elsewhere | Read-only commands run; classifier for the rest | Classifier, except local read-only tools |
|
|
11
|
+
| `yolo` (default) | Allowed | Allowed | Allowed |
|
|
12
|
+
|
|
13
|
+
Local read-only tools are `read`, `grep`, `find`, `ls`, `todo_write`, `tool_search`, `codemode` (its calls are checked one by one), and tools whose annotations mark them read-only without reaching the web. `web_fetch`, `web_search`, and read-only tools that reach the web run in plan mode but ask in `default` and `auto-edit` mode.
|
|
14
|
+
|
|
15
|
+
Approval modes come from the built-in extension `builtin:approval`. Disabling it (`-builtin:approval` in the `extensions` setting, or `--no-extensions`) removes the checks, so every call runs as in `yolo` mode. They do not restrict what an allowed call can reach; the [sandbox](sandbox.md) does, and in `default`, `auto-edit`, and `auto` mode Diffra asks before running an action the sandbox blocked without it. See [Run Diffra Safely](security.md).
|
|
16
|
+
|
|
17
|
+
## Change the mode
|
|
18
|
+
|
|
19
|
+
- Press `alt+m` (`app.approvalMode.cycle`) to step through `plan`, `default`, `auto-edit`, `auto`, and `yolo`. Qwen Code uses Shift+Tab for this; in Diffra Shift+Tab cycles the thinking level, so the approval mode has its own key. Rebind it in [keybindings.json](keybindings.md).
|
|
20
|
+
- `/approval-mode` opens a selector; `/approval-mode <mode>` switches directly. Add `--user` or `--project` to also save the mode as the default for new sessions, in your settings or the project's `.diffra/settings.json`.
|
|
21
|
+
- `/plan` enters plan mode, and `/plan <request>` enters it and sends the request. `/plan exit` returns to the mode you were in before.
|
|
22
|
+
- `--approval-mode <mode>` starts the session in a mode for this run.
|
|
23
|
+
- The `approvalMode` setting sets the mode new sessions start in.
|
|
24
|
+
|
|
25
|
+
The footer shows the mode unless it is `yolo`. A mode change is recorded in the session, so `--resume`, `/tree`, and `/fork` keep the mode of that branch.
|
|
26
|
+
|
|
27
|
+
## Approve calls
|
|
28
|
+
|
|
29
|
+
When a call needs approval, Diffra shows a dialog with three choices:
|
|
30
|
+
|
|
31
|
+
- **Yes, allow once** runs this call.
|
|
32
|
+
- **Yes, always allow** remembers the answer for the rest of the session: for shell commands, every command that starts with the same programs (for example `npm`); for edits, it switches to `auto-edit`; for other tools, every call of that tool.
|
|
33
|
+
- **No** blocks the call, and the model is told you denied it.
|
|
34
|
+
|
|
35
|
+
Dialogs appear one at a time. Without an interactive UI (print and JSON mode), a call that needs approval is blocked and the model is told why. Use `yolo` mode, or `auto` for calls the classifier can approve, in unattended runs.
|
|
36
|
+
|
|
37
|
+
## Plan mode
|
|
38
|
+
|
|
39
|
+
In plan mode the model explores with read-only tools and writes a plan. Every model request carries a reminder of the plan-mode rules, and the model calls `exit_plan_mode` with its plan when it is ready. The tool is declared to the model only in plan mode.
|
|
40
|
+
|
|
41
|
+
`exit_plan_mode` shows the plan and asks how to continue:
|
|
42
|
+
|
|
43
|
+
- **Yes, restore the previous mode** returns to the mode before plan mode.
|
|
44
|
+
- **Yes, and auto-accept edits** continues in `auto-edit`.
|
|
45
|
+
- **Yes, and manually approve edits** continues in `default`.
|
|
46
|
+
- **No, keep planning** stays in plan mode.
|
|
47
|
+
|
|
48
|
+
Only your answer approves a plan; no mode or setting approves it for you. When plan mode ends another way, such as with `/plan exit`, the next model request tells the model that plan mode is over and no plan approval is pending.
|
|
49
|
+
|
|
50
|
+
A shell command that is neither recognized as read-only nor as state-modifying asks for a one-time approval of that exact command. It does not approve related commands or the plan.
|
|
51
|
+
|
|
52
|
+
## Auto mode
|
|
53
|
+
|
|
54
|
+
In auto mode, edits inside the project and read-only commands run directly. Everything else goes to a classifier model: shell commands that are not read-only, `web_fetch` and `web_search`, edits outside the project, and other tools such as MCP tools. Edits inside the project to files that configure the agent or persist across sessions also go to the classifier: `.diffra/`, `.git/`, `.husky/`, `.github/workflows/`, `AGENTS.md`, `CLAUDE.md`, `.mcp.json`, `package.json`, `.npmrc`, and `Makefile`. Symbolic links are resolved first, so a link out of the project counts as outside.
|
|
55
|
+
|
|
56
|
+
The classifier is the [`fastModel`](settings.md) when set, otherwise the session model. It sees the call and your latest message and answers whether to block it, with a reason. It follows a built-in policy: it allows reading, building, testing, installing project dependencies, and local edits; blocks deleting data outside the project, pushing, publishing, deploying, and sending data to third parties unless your latest message asked for exactly that; and always blocks destroying systems, running downloaded code, reading or sending credentials, persistence outside the project, weakening security, and force-pushing to `main` or `master`.
|
|
57
|
+
|
|
58
|
+
- A blocked call fails with the classifier's reason.
|
|
59
|
+
- When the classifier cannot answer (an error, a timeout, or an answer that is not the expected JSON), the call is blocked. After two such calls in a row, the next call asks you instead.
|
|
60
|
+
- After three blocks in a row, the third asks you instead, so the model does not loop on a blocked approach.
|
|
61
|
+
|
|
62
|
+
Add natural-language hints in the `permissions.autoMode` setting:
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"approvalMode": "auto",
|
|
67
|
+
"permissions": {
|
|
68
|
+
"autoMode": {
|
|
69
|
+
"hints": {
|
|
70
|
+
"allow": ["Running pytest, mypy, and ruff in this repository"],
|
|
71
|
+
"softDeny": ["Running database migrations"],
|
|
72
|
+
"hardDeny": ["Any network call to intranet.example.com"]
|
|
73
|
+
},
|
|
74
|
+
"environment": ["Private monorepo; commits are signed"],
|
|
75
|
+
"classifyAllShell": false,
|
|
76
|
+
"classifier": { "timeouts": { "stage1Ms": 10000 } }
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
| Setting | Meaning |
|
|
83
|
+
|---|---|
|
|
84
|
+
| `hints.allow` | Actions to allow |
|
|
85
|
+
| `hints.softDeny` | Actions to block unless your latest message asked for exactly that action and scope; `hints.deny` is an older name |
|
|
86
|
+
| `hints.hardDeny` | Actions to block regardless of hints or your request |
|
|
87
|
+
| `environment` | Facts about the environment for the classifier |
|
|
88
|
+
| `classifyAllShell` | Send read-only shell commands to the classifier too (default `false`) |
|
|
89
|
+
| `classifier.timeouts.stage1Ms` | Time limit of one classifier request in milliseconds (default `10000`) |
|
|
90
|
+
|
|
91
|
+
Each hint is cut to 200 characters; each list keeps its first 50 entries and `environment` its first 20.
|
|
92
|
+
|
|
93
|
+
## Differences from Qwen Code
|
|
94
|
+
|
|
95
|
+
- The default mode is `yolo`, not `auto`, so existing sessions keep running without dialogs.
|
|
96
|
+
- The cycle key is `alt+m`, not Shift+Tab, which cycles the thinking level in Diffra.
|
|
97
|
+
- The classifier makes one request per call and returns its reason; Qwen Code runs a fast stage and, after a block, a second reviewing stage.
|
|
98
|
+
- There are no `permissions.allow`, `permissions.ask`, or `permissions.deny` rules. Session approvals are the only remembered answers, and they end with the session.
|
|
99
|
+
- Approved plans are kept in the session (the `exit_plan_mode` call), not saved to a separate plans directory.
|