| 188 | `)+"…"}var AS7=33554432;function wS7(q){return XK1.filePatternTools.includes(q)}function jS7(q){return XK1.bashPrefixTools.includes(q)}function HS7(q){return XK1.customValidation[q]}var XK1;var JS7=y(()=>{XK1={filePatternTools:["Read","Write","Edit","Glob","NotebookRead","NotebookEdit"],bashPrefixTools:["Bash"],customValidation:{WebSearch:(q)=>{if(q.includes("*")||q.includes("?"))return{valid:!1,error:"WebSearch does not support wildcards",suggestion:"Use exact search terms without * or ?",examples:["WebSearch(claude ai)","WebSearch(typescript tutorial)"]};return{valid:!0}},WebFetch:(q)=>{if(q.includes("://")||q.startsWith("http"))return{valid:!1,error:"WebFetch permissions use domain format, not URLs",suggestion:'Use "domain:hostname" format',examples:["WebFetch(domain:example.com)","WebFetch(domain:github.com)"]};if(!q.startsWith("domain:"))return{valid:!1,error:'WebFetch permissions must use "domain:" prefix',suggestion:'Use "domain:hostname" format',examples:["WebFetch(domain:example.com)","WebFetch(domain:*.google.com)"]};return{valid:!0}}}}});function MS7(q,K){let _=0,z=K-1;while(z>=0&&q[z]==="\\")_++,z--;return _%2!==0}function PK1(q,K){let _=0;for(let z=0;z<q.length;z++)if(q[z]===K&&!MS7(q,z))_++;return _}function ih5(q){for(let K=0;K<q.length-1;K++)if(q[K]==="("&&q[K+1]===")"){if(!MS7(q,K))return!0}return!1}function WK1(q){if(!q||q.trim()==="")return{valid:!1,error:"Permission rule cannot be empty"};let K=PK1(q,"("),_=PK1(q,")");if(K!==_)return{valid:!1,error:"Mismatched parentheses",suggestion:"Ensure all opening parentheses have matching closing parentheses"};if(ih5(q)){let A=q.substring(0,q.indexOf("("));if(!A)return{valid:!1,error:"Empty parentheses with no tool name",suggestion:"Specify a tool name before the parentheses"};return{valid:!1,error:"Empty parentheses",suggestion:`Either specify a pattern or use just "${A}" without parentheses`,examples:[`${A}`,`${A}(some-pattern)`]}}let z=G2(q),Y=nT(z.toolName);if(Y){if(z.ruleContent!==void 0||PK1(q,"(")>0)return{valid:!1,error:"MCP rules do not support patterns in parentheses",suggestion:`Use "${z.toolName}" without parentheses, or use "mcp__${Y.serverName}__*" for all tools`,examples:[`mcp__${Y.serverName}`,`mcp__${Y.serverName}__*`,Y.toolName&&Y.toolName!=="*"?`mcp__${Y.serverName}__${Y.toolName}`:void 0].filter(Boolean)};return{valid:!0}}if(!z.toolName||z.toolName.length===0)return{valid:!1,error:"Tool name cannot be empty"};if(z.toolName[0]!==z.toolName[0]?.toUpperCase())return{valid:!1,error:"Tool names must start with uppercase",suggestion:`Use "${Tf(String(z.toolName))}"`};let $=HS7(z.toolName);if($&&z.ruleContent!==void 0){let A=$(z.ruleContent);if(!A.valid)return A}if(jS7(z.toolName)&&z.ruleContent!==void 0){let A=z.ruleContent;if(A.includes(":*")&&!A.endsWith(":*"))return{valid:!1,error:"The :* pattern must be at the end",suggestion:"Move :* to the end for prefix matching, or use * for wildcard matching",examples:["Bash(npm run:*) - prefix matching (legacy)","Bash(npm run *) - wildcard matching"]};if(A===":*")return{valid:!1,error:"Prefix cannot be empty before :*",suggestion:"Specify a command prefix before :*",examples:["Bash(npm:*)","Bash(git:*)"]}}if(wS7(z.toolName)&&z.ruleContent!==void 0){let A=z.ruleContent;if(A.includes(":*"))return{valid:!1,error:'The ":*" syntax is only for Bash prefix rules',suggestion:'Use glob patterns like "*" or "**" for file matching',examples:[`${z.toolName}(*.ts) - matches .ts files`,`${z.toolName}(src/**) - matches all files in src`,`${z.toolName}(**/*.test.ts) - matches test files`]};if(A.includes("*")&&!A.match(/^\*|\*$|\*\*|\/\*|\*\.|\*\)/)&&!A.includes("**"))return{valid:!1,error:"Wildcard placement might be incorrect",suggestion:"Wildcards are typically used at path boundaries",examples:[`${z.toolName}(*.js) - all .js files`,`${z.toolName}(src/*) - all files directly in src`,`${z.toolName}(src/**) - all files recursively in src`]}}return{valid:!0}}var VA8;var DK1=y(()=>{x7();ok();Gf();JS7();VA8=B6(()=>L.string().superRefine((q,K)=>{let _=WK1(q);if(!_.valid){let z=_.error;if(_.suggestion)z+=`. ${_.suggestion}`;if(_.examples&&_.examples.length>0)z+=`. Examples: ${_.examples.join(", ")}`;K.addIssue({code:L.ZodIssueCode.custom,message:z,params:{received:q}})}}))});function JD6(q){return"serverName"in q&&q.serverName!==void 0}function NA8(q){return"serverCommand"in q&&q.serverCommand!==void 0}function yA8(q){return"serverUrl"in q&&q.serverUrl!==void 0}var rh5,oh5,ah5,sh5,th5,HD6,EW;var vh=y(()=>{x7();yh7();m8();yW();BZ();kO();DK1();DA8();DA8();rh5=B6(()=>L.record(L.string(),L.coerce.string())),oh5=B6(()=>L.object({allow:L.array(VA8()).optional().describe("List of permission rules for allowed operations"),deny:L.array(VA8()).optional().describe("List of permission rules for denied operations"),ask:L.array(VA8()).optional().describe("List of permission rules that should always prompt for confirmation"),defaultMode:L.enum(pZ).optional().describe("Default permission mode when Claude Code needs access"),disableBypassPermissionsMode:L.enum(["disable"]).optional().describe("Disable the ability to bypass permission prompts"),...{disableAutoMode:L.enum(["disable"]).optional().describe("Disable auto mode")},additionalDirectories:L.array(L.string()).optional().describe("Additional directories to include in the permission scope")}).passthrough()),ah5=B6(()=>L.object({source:Zp6().describe("Where to fetch the marketplace from"),installLocation:L.string().optional().describe("Local cache path where marketplace manifest is stored (auto-generated if not provided)"),autoUpdate:L.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),sh5=B6(()=>L.object({serverName:L.string().regex(/^[a-zA-Z0-9_-]+$/,"Server name can only contain letters, numbers, hyphens, and underscores").optional().describe("Name of the MCP server that users are allowed to configure"),serverCommand:L.array(L.string()).min(1,"Server command must have at least one element (the command)").optional().describe("Command array [command, ...args] to match exactly for allowed stdio servers"),serverUrl:L.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for allowed remote MCP servers')}).refine((q)=>{return $7([q.serverName!==void 0,q.serverCommand!==void 0,q.serverUrl!==void 0],Boolean)===1},{message:'Entry must have exactly one of "serverName", "serverCommand", or "serverUrl"'})),th5=B6(()=>L.object({serverName:L.string().regex(/^[a-zA-Z0-9_-]+$/,"Server name can only contain letters, numbers, hyphens, and underscores").optional().describe("Name of the MCP server that is explicitly blocked"),serverCommand:L.array(L.string()).min(1,"Server command must have at least one element (the command)").optional().describe("Command array [command, ...args] to match exactly for blocked stdio servers"),serverUrl:L.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for blocked remote MCP servers')}).refine((q)=>{return $7([q.serverName!==void 0,q.serverCommand!==void 0,q.serverUrl!==void 0],Boolean)===1},{message:'Entry must have exactly one of "serverName", "serverCommand", or "serverUrl"'})),HD6=["skills","agents","hooks","mcp"],EW=B6(()=>L.object({$schema:L.literal(vh7).optional().describe("JSON Schema reference for Claude Code settings"),apiKeyHelper:L.string().optional().describe("Path to a script that outputs authentication values"),awsCredentialExport:L.string().optional().describe("Path to a script that exports AWS credentials"),awsAuthRefresh:L.string().optional().describe("Path to a script that refreshes AWS authentication"),gcpAuthRefresh:L.string().optional().describe("Command to refresh GCP authentication (e.g., gcloud auth application-default login)"),...i6(process.env.CLAUDE_CODE_ENABLE_XAA)?{xaaIdp:L.object({issuer:L.string().url().describe("IdP issuer URL for OIDC discovery"),clientId:L.string().describe("Claude Code's client_id registered at the IdP"),callbackPort:L.number().int().positive().optional().describe("Fixed loopback callback port for the IdP OIDC login. Only needed if the IdP does not honor RFC 8252 port-any matching.")}).optional().describe("XAA (SEP-990) IdP connection. Configure once; all XAA-enabled MCP servers reuse this.")}:{},fileSuggestion:L.object({type:L.literal("command"),command:L.string()}).optional().describe("Custom file suggestion configuration for @ mentions"),respectGitignore:L.boolean().optional().describe("Whether file picker should respect .gitignore files (default: true). Note: .ignore files are always respected."),cleanupPeriodDays:L.number().nonnegative().int().optional().describe("Number of days to retain chat transcripts (default: 30). Setting to 0 disables session persistence entirely: no transcripts are written and existing transcripts are deleted at startup."),env:rh5().optional().describe("Environment variables to set for Claude Code sessions"),attribution:L.object({commit:L.string().optional().describe("Attribution text for git commits, including any trailers. Empty string hides attribution."),pr:L.string().optional().describe("Attribution text for pull request descriptions. Empty string hides attribution.")}).optional().describe("Customize attribution text for commits and PRs. Each field defaults to the standard Claude Code attribution if not set."),includeCoAuthoredBy:L.boolean().optional().describe("Deprecated: Use attribution instead. Whether to include Claude's co-authored by attribution in commits and PRs (defaults to true)"),includeGitInstructions:L.boolean().optional().describe("Include built-in commit and PR workflow instructions in Claude's system prompt (default: true)"),permissions:oh5().optional().describe("Tool usage permissions configuration"),model:L.string().optional().describe("Override the default model used by Claude Code"),availableModels:L.array(L.string()).optional().describe('Allowlist of models that users can select. Accepts family aliases ("opus" allows any opus version), version prefixes ("opus-4-5" allows only that version), and full model IDs. If undefined, all models are available. If empty array, only the default model is available. Typically set in managed settings by enterprise administrators.'),modelOverrides:L.record(L.string(),L.string()).optional().describe('Override mapping from Anthropic model ID (e.g. "claude-opus-4-6") to provider-specific model ID (e.g. a Bedrock inference profile ARN). Typically set in managed settings by enterprise administrators.'),enableAllProjectMcpServers:L.boolean().optional().describe("Whether to automatically approve all MCP servers in the project"),enabledMcpjsonServers:L.array(L.string()).optional().describe("List of approved MCP servers from .mcp.json"),disabledMcpjsonServers:L.array(L.string()).optional().describe("List of rejected MCP servers from .mcp.json"),allowedMcpServers:L.array(sh5()).optional().describe("Enterprise allowlist of MCP servers that can be used. Applies to all scopes including enterprise servers from managed-mcp.json. If undefined, all servers are allowed. If empty array, no servers are allowed. Denylist takes precedence - if a server is on both lists, it is denied."),deniedMcpServers:L.array(th5()).optional().describe("Enterprise denylist of MCP servers that are explicitly blocked. If a server is on the denylist, it will be blocked across all scopes including enterprise. Denylist takes precedence over allowlist - if a server is on both lists, it is denied."),hooks:Th().optional().describe("Custom commands to run before/after tool executions"),worktree:L.object({symlinkDirectories:L.array(L.string()).optional().describe('Directories to symlink from main repository to worktrees to avoid disk bloat. Must be explicitly configured - no directories are symlinked by default. Common examples: "node_modules", ".cache", ".bin"'),sparsePaths:L.array(L.string()).optional().describe("Directories to include when creating worktrees, via git sparse-checkout (cone mode). "+"Dramatically faster in large monorepos — only the listed paths are written to disk.")}).optional().describe("Git worktree configuration for --worktree flag."),disableAllHooks:L.boolean().optional().describe("Disable all hooks and statusLine execution"),defaultShell:L.enum(["bash","powershell"]).optional().describe("Default shell for input-box ! commands. Defaults to 'bash' on all platforms (no Windows auto-flip)."),allowManagedHooksOnly:L.boolean().optional().describe("When true (and set in managed settings), only hooks from managed settings run. User, project, and local hooks are ignored."),allowedHttpHookUrls:L.array(L.string()).optional().describe('Allowlist of URL patterns that HTTP hooks may target. Supports * as a wildcard (e.g. "https://hooks.example.com/*"). When set, HTTP hooks with non-matching URLs are blocked. If undefined, all URLs are allowed. If empty array, no HTTP hooks are allowed. Arrays merge across settings sources (same semantics as allowedMcpServers).'),httpHookAllowedEnvVars:L.array(L.string()).optional().describe("Allowlist of environment variable names HTTP hooks may interpolate into headers. When set, each hook's effective allowedEnvVars is the intersection with this list. If undefined, no restriction is applied. Arrays merge across settings sources (same semantics as allowedMcpServers)."),allowManagedPermissionRulesOnly:L.boolean().optional().describe("When true (and set in managed settings), only permission rules (allow/deny/ask) from managed settings are respected. User, project, local, and CLI argument permission rules are ignored."),allowManagedMcpServersOnly:L.boolean().optional().describe("When true (and set in managed settings), allowedMcpServers is only read from managed settings. deniedMcpServers still merges from all sources, so users can deny servers for themselves. Users can still add their own MCP servers, but only the admin-defined allowlist applies."),strictPluginOnlyCustomization:L.preprocess((q)=>Array.isArray(q)?q.filter((K)=>HD6.includes(K)):q,L.union([L.boolean(),L.array(L.enum(HD6))])).optional().catch(void 0).describe('When set in managed settings, blocks non-plugin customization sources for the listed surfaces. Array form locks specific surfaces (e.g. ["skills", "hooks"]); `true` locks all four; `false` is an explicit no-op. Blocked: ~/.claude/{surface}/, .claude/{surface}/ (project), settings.json hooks, .mcp.json. NOT blocked: managed (policySettings) sources, plugin-provided customizations. '+"Composes with strictKnownMarketplaces for end-to-end admin control — plugins gated by "+"marketplace allowlist, everything else blocked here."),statusLine:L.object({type:L.literal("command"),command:L.string(),padding:L.number().optional()}).optional().describe("Custom status line display configuration"),enabledPlugins:L.record(L.string(),L.union([L.array(L.string()),L.boolean(),L.undefined()])).optional().describe('Enabled plugins using plugin-id@marketplace-id format. Example: { "formatter@anthropic-tools": true }. Also supports extended format with version constraints.'),extraKnownMarketplaces:L.record(L.string(),ah5()).check((q)=>{for(let[K,_]of Object.entries(q.value))if(_.source.source==="settings"&&_.source.name!==K)q.issues.push({code:"custom",input:_.source.name,path:[K,"source","name"],message:`Settings-sourced marketplace name must match its extraKnownMarketplaces key (got key "${K}" but source.name "${_.source.name}")`})}).optional().describe("Additional marketplaces to make available for this repository. Typically used in repository .claude/settings.json to ensure team members have required plugin sources."),strictKnownMarketplaces:L.array(Zp6()).optional().describe("Enterprise strict list of allowed marketplace sources. When set in managed settings, ONLY these exact sources can be added as marketplaces. The check happens BEFORE downloading, so blocked sources never touch the filesystem. "+"Note: this is a policy gate only — it does NOT register marketplaces. "+"To pre-register allowed marketplaces for users, also set extraKnownMarketplaces."),blockedMarketplaces:L.array(Zp6()).optional().describe("Enterprise blocklist of marketplace sources. When set in managed settings, these exact sources are blocked from being added as marketplaces. The check happens BEFORE downloading, so blocked sources never touch the filesystem."),forceLoginMethod:L.enum(["claudeai","console"]).optional().describe('Force a specific login method: "claudeai" for Claude Pro/Max, "console" for Console billing'),forceLoginOrgUUID:L.string().optional().describe("Organization UUID to use for OAuth login"),otelHeadersHelper:L.string().optional().describe("Path to a script that outputs OpenTelemetry headers"),outputStyle:L.string().optional().describe("Controls the output style for assistant responses"),language:L.string().optional().describe('Preferred language for Claude responses and voice dictation (e.g., "japanese", "spanish")'),skipWebFetchPreflight:L.boolean().optional().describe("Skip the WebFetch blocklist check for enterprise environments with restrictive security policies"),sandbox:Nh7().optional(),feedbackSurveyRate:L.number().min(0).max(1).optional().describe("Probability (0–1) that the session quality survey appears when eligible. 0.05 is a reasonable starting point."),spinnerTipsEnabled:L.boolean().optional().describe("Whether to show tips in the spinner"),spinnerVerbs:L.object({mode:L.enum(["append","replace"]),verbs:L.array(L.string())}).optional().describe('Customize spinner verbs. mode: "append" adds verbs to defaults, "replace" uses only your verbs.'),spinnerTipsOverride:L.object({excludeDefault:L.boolean().optional(),tips:L.array(L.string())}).optional().describe("Override spinner tips. tips: array of tip strings. excludeDefault: if true, only show custom tips (default: false)."),syntaxHighlightingDisabled:L.boolean().optional().describe("Whether to disable syntax highlighting in diffs"),terminalTitleFromRename:L.boolean().optional().describe("Whether /rename updates the terminal tab title (defaults to true). Set to false to keep auto-generated topic titles."),alwaysThinkingEnabled:L.boolean().optional().describe("When false, thinking is disabled. When absent or true, thinking is enabled automatically for supported models."),effortLevel:L.enum(["low","medium","high"]).optional().catch(void 0).describe("Persisted effort level for supported models."),advisorModel:L.string().optional().describe("Advisor model for the server-side advisor tool."),fastMode:L.boolean().optional().describe("When true, fast mode is enabled. When absent or false, fast mode is off."),fastModePerSessionOptIn:L.boolean().optional().describe("When true, fast mode does not persist across sessions. Each session starts with fast mode off."),promptSuggestionEnabled:L.boolean().optional().describe("When false, prompt suggestions are disabled. When absent or true, prompt suggestions are enabled."),showClearContextOnPlanAccept:L.boolean().optional().describe('When true, the plan-approval dialog offers a "clear context" option. Defaults to false.'),agent:L.string().optional().describe("Name of an agent (built-in or custom) to use for the main thread. Applies the agent's system prompt, tool restrictions, and model."),companyAnnouncements:L.array(L.string()).optional().describe("Company announcements to display at startup (one will be randomly selected if multiple are provided)"),pluginConfigs:L.record(L.string(),L.object({mcpServers:L.record(L.string(),L.record(L.string(),L.union([L.string(),L.number(),L.boolean(),L.array(L.string())]))).optional().describe("User configuration values for MCP servers keyed by server name"),options:L.record(L.string(),L.union([L.string(),L.number(),L.boolean(),L.array(L.string())])).optional().describe("Non-sensitive option values from plugin manifest userConfig, keyed by option name. Sensitive values go to secure storage instead.")})).optional().describe("Per-plugin configuration including MCP server user configs, keyed by plugin ID (plugin@marketplace format)"),remote:L.object({defaultEnvironmentId:L.string().optional().describe("Default environment ID to use for remote sessions")}).optional().describe("Remote session configuration"),autoUpdatesChannel:L.enum(["latest","stable"]).optional().describe("Release channel for auto-updates (latest or stable)"),...{disableDeepLinkRegistration:L.enum(["disable"]).optional().describe("Prevent claude-cli:// protocol handler registration with the OS")},minimumVersion:L.string().optional().describe("Minimum version to stay on - prevents downgrades when switching to stable channel"),plansDirectory:L.string().optional().describe("Custom directory for plan files, relative to project root. If not set, defaults to ~/.claude/plans/"),...{},...{},...{voiceEnabled:L.boolean().optional().describe("Enable voice mode (hold-to-talk dictation)")},...{},channelsEnabled:L.boolean().optional().describe("Teams/Enterprise opt-in for channel notifications (MCP servers with the claude/channel capability pushing inbound messages). Default off. Set true to allow; users then select servers via --channels."),allowedChannelPlugins:L.array(L.object({marketplace:L.string(),plugin:L.string()})).optional().describe("Teams/Enterprise allowlist of channel plugins. When set, "+"replaces the default Anthropic allowlist — admins decide which "+"plugins may push inbound messages. Undefined falls back to the default. Requires channelsEnabled: true."),...{defaultView:L.enum(["chat","transcript"]).optional().describe("Default transcript view: chat (SendUserMessage checkpoints only) or transcript (full)")},prefersReducedMotion:L.boolean().optional().describe("Reduce or disable animations for accessibility (spinner shimmer, flash effects, etc.)"),autoMemoryEnabled:L.boolean().optional().describe("Enable auto-memory for this project. When false, Claude will not read from or write to the auto-memory directory."),autoMemoryDirectory:L.string().optional().describe("Custom directory path for auto-memory storage. Supports ~/ prefix for home directory expansion. Ignored if set in projectSettings (checked-in .claude/settings.json) for security. When unset, defaults to ~/.claude/projects/<sanitized-cwd>/memory/."),autoDreamEnabled:L.boolean().optional().describe("Enable background memory consolidation (auto-dream). When set, overrides the server-side default."),showThinkingSummaries:L.boolean().optional().describe("Show thinking summaries in the transcript view (ctrl+o). Default: false."),skipDangerousModePermissionPrompt:L.boolean().optional().describe("Whether the user has accepted the bypass permissions mode dialog"),...{skipAutoPermissionPrompt:L.boolean().optional().describe("Whether the user has accepted the auto mode opt-in dialog"),useAutoModeDuringPlan:L.boolean().optional().describe("Whether plan mode uses auto mode semantics when auto mode is available (default: true)"),autoMode:L.object({allow:L.array(L.string()).optional().describe("Rules for the auto mode classifier allow section"),soft_deny:L.array(L.string()).optional().describe("Rules for the auto mode classifier deny section"),...{},environment:L.array(L.string()).optional().describe("Entries for the auto mode classifier environment section")}).optional().describe("Auto mode classifier prompt customization")},disableAutoMode:L.enum(["disable"]).optional().describe("Disable auto mode"),sshConfigs:L.array(L.object({id:L.string().describe("Unique identifier for this SSH config. Used to match configs across settings sources."),name:L.string().describe("Display name for the SSH connection"),sshHost:L.string().describe('SSH host in format "user@hostname" or "hostname", or a host alias from ~/.ssh/config'),sshPort:L.number().int().optional().describe("SSH port (default: 22)"),sshIdentityFile:L.string().optional().describe("Path to SSH identity file (private key)"),startDirectory:L.string().optional().describe("Default working directory on the remote host. Supports tilde expansion (e.g. ~/projects). If not specified, defaults to the remote user home directory. Can be overridden by the [dir] positional argument in `claude ssh <config> [dir]`.")})).optional().describe("SSH connection configurations for remote environments. Typically set in managed settings by enterprise administrators to pre-configure SSH connections for team members."),claudeMdExcludes:L.array(L.string()).optional().describe('Glob patterns or absolute paths of CLAUDE.md files to exclude from loading. Patterns are matched against absolute file paths using picomatch. Only applies to User, Project, and Local memory types (Managed/policy files cannot be excluded). Examples: "/home/user/monorepo/CLAUDE.md", "**/code/CLAUDE.md", "**/some-dir/.claude/rules/**"'),pluginTrustMessage:L.string().optional().describe('Custom message to append to the plugin trust warning shown before installation. Only read from policy settings (managed-settings.json / MDM). Useful for enterprise administrators to add organization-specific context (e.g., "All plugins from our internal marketplace are vetted and approved.").')}).passthrough())});function fK1(){let q=nc(EW(),{unrepresentable:"any"});return g6(q,null,2)}var XS7=y(()=>{x7();l8();vh()});function PS7(q){let K=eh5.find((z)=>z.matches(q));if(!K)return null;let _={...K.tip};if(q.code==="invalid_value"&&q.enumValues&&!_.suggestion)_.suggestion=`Valid values: ${q.enumValues.map((z)=>`"${z}"`).join(", ")}`;if(!_.docLink&&q.path){let z=q.path.split(".")[0];if(z)_.docLink=qS5[z]}return _}var eh5,qS5;var WS7=y(()=>{eh5=[{matches:(q)=>q.path==="permissions.defaultMode"&&q.code==="invalid_value",tip:{suggestion:'Valid modes: "acceptEdits" (ask before file changes), "plan" (analysis only), "bypassPermissions" (auto-accept all), or "default" (standard behavior)',docLink:"https://code.claude.com/docs/en/iam#permission-modes"}},{matches:(q)=>q.path==="apiKeyHelper"&&q.code==="invalid_type",tip:{suggestion:'Provide a shell command that outputs your API key to stdout. The script should output only the API key. Example: "/bin/generate_temp_api_key.sh"'}},{matches:(q)=>q.path==="cleanupPeriodDays"&&q.code==="too_small"&&q.expected==="0",tip:{suggestion:"Must be 0 or greater. Set a positive number for days to retain transcripts (default is 30). Setting 0 disables session persistence entirely: no transcripts are written and existing transcripts are deleted at startup."}},{matches:(q)=>q.path.startsWith("env.")&&q.code==="invalid_type",tip:{suggestion:'Environment variables must be strings. Wrap numbers and booleans in quotes. Example: "DEBUG": "true", "PORT": "3000"',docLink:"https://code.claude.com/docs/en/settings#environment-variables"}},{matches:(q)=>(q.path==="permissions.allow"||q.path==="permissions.deny")&&q.code==="invalid_type"&&q.expected==="array",tip:{suggestion:'Permission rules must be in an array. Format: ["Tool(specifier)"]. Examples: ["Bash(npm run build)", "Edit(docs/**)", "Read(~/.zshrc)"]. Use * for wildcards.'}},{matches:(q)=>q.path.includes("hooks")&&q.code==="invalid_type",tip:{suggestion:'Hooks use a matcher + hooks array. The matcher is a string: a tool name ("Bash"), pipe-separated list ("Edit|Write"), or empty to match all. Example: {"PostToolUse": [{"matcher": "Edit|Write", "hooks": [{"type": "command", "command": "echo Done"}]}]}'}},{matches:(q)=>q.code==="invalid_type"&&q.expected==="boolean",tip:{suggestion:'Use true or false without quotes. Example: "includeCoAuthoredBy": true'}},{matches:(q)=>q.code==="unrecognized_keys",tip:{suggestion:"Check for typos or refer to the documentation for valid fields",docLink:"https://code.claude.com/docs/en/settings"}},{matches:(q)=>q.code==="invalid_value"&&q.enumValues!==void 0,tip:{suggestion:void 0}},{matches:(q)=>q.code==="invalid_type"&&q.expected==="object"&&q.received===null&&q.path==="",tip:{suggestion:"Check for missing commas, unmatched brackets, or trailing commas. Use a JSON validator to identify the exact syntax error."}},{matches:(q)=>q.path==="permissions.additionalDirectories"&&q.code==="invalid_type",tip:{suggestion:'Must be an array of directory paths. Example: ["~/projects", "/tmp/workspace"]. You can also use --add-dir flag or /add-dir command',docLink:"https://code.claude.com/docs/en/iam#working-directories"}}],qS5={permissions:"https://code.claude.com/docs/en/iam#configuring-permissions",env:"https://code.claude.com/docs/en/settings#environment-variables",hooks:"https://code.claude.com/docs/en/hooks"}});function DS7(q){return q.code==="invalid_type"}function fS7(q){return q.code==="invalid_value"}function KS5(q){return q.code==="unrecognized_keys"}function ZS7(q){return q.code==="too_small"}function ZK1(q){if(q===null)return"null";if(q===void 0)return"undefined";if(Array.isArray(q))return"array";return typeof q}function GS7(q){let K=q.match(/received (\w+)/);return K?K[1]:void 0}function MD6(q,K){return q.issues.map((_)=>{let z=_.path.map(String).join("."),Y=_.message,$,A,O,w,j;if(fS7(_))A=_.values.map((J)=>String(J)),O=A.join(" | "),w=void 0,j=void 0;else if(DS7(_)){O=_.expected;let J=GS7(_.message);w=J??ZK1(_.input),j=J??ZK1(_.input)}else if(ZS7(_))O=String(_.minimum);else if(_.code==="custom"&&"params"in _)w=_.params.received,j=w;let H=PS7({path:z,code:_.code,expected:O,received:w,enumValues:A,message:_.message,value:w});if(fS7(_))$=A?.map((J)=>`"${J}"`).join(", "),Y=`Invalid value. Expected one of: ${$}`;else if(DS7(_)){let J=GS7(_.message)??ZK1(_.input);if(_.expected==="object"&&J==="null"&&z==="")Y="Invalid or malformed JSON";else Y=`Expected ${_.expected}, but received ${J}`}else if(KS5(_)){let J=_.keys.join(", ");Y=`Unrecognized ${A7(_.keys.length,"field")}: ${J}`}else if(ZS7(_))Y=`Number must be greater than or equal to ${_.minimum}`,$=String(_.minimum);return{file:K,path:z,message:Y,expected:$,invalidValue:j,suggestion:H?.suggestion,docLink:H?.docLink}})}function GK1(q){try{let K=r8(q),_=EW().strict().safeParse(K);if(_.success)return{isValid:!0};return{isValid:!1,error:`Settings validation failed: |
| 190 | `),fullSchema:fK1()}}catch(K){return{isValid:!1,error:`Invalid JSON: ${K instanceof Error?K.message:"Unknown parsing error"}`,fullSchema:fK1()}}}function EA8(q,K){if(!q||typeof q!=="object")return[];let _=q;if(!_.permissions||typeof _.permissions!=="object")return[];let z=_.permissions,Y=[];for(let $ of["allow","deny","ask"]){let A=z[$];if(!Array.isArray(A))continue;z[$]=A.filter((O)=>{if(typeof O!=="string")return Y.push({file:K,path:`permissions.${$}`,message:`Non-string value in ${$} array was removed`,invalidValue:O}),!1;let w=WK1(O);if(!w.valid){let j=`Invalid permission rule "${O}" was skipped`;if(w.error)j+=`: ${w.error}`;if(w.suggestion)j+=`. ${w.suggestion}`;return Y.push({file:K,path:`permissions.${$}`,message:j,invalidValue:O}),!1}return!0})}return Y}var LA8=y(()=>{l8();DK1();XS7();vh();WS7()});import{userInfo as _S5}from"os";function NS7(){let q="";try{q=_S5().username}catch{}let K=[];if(q)K.push({path:`/Library/Managed Preferences/${q}/${TS7}.plist`,label:"per-user managed preferences"});return K.push({path:`/Library/Managed Preferences/${TS7}.plist`,label:"device-level managed preferences"}),K}var TS7="com.anthropic.claudecode",RA8="HKLM\\SOFTWARE\\Policies\\ClaudeCode",hA8="HKCU\\SOFTWARE\\Policies\\ClaudeCode",XD6="Settings",vS7="/usr/bin/plutil",kS7,VS7=5000;var TK1=y(()=>{kS7=["-convert","json","-o","-","--"]});import{execFile as zS5}from"child_process";import{existsSync as YS5}from"fs";function vK1(q,K){return new Promise((_)=>{zS5(q,K,{encoding:"utf-8",timeout:VS7},(z,Y)=>{_({stdout:Y??"",code:z?1:0})})})}function SA8(){return(async()=>{if(process.platform==="darwin"){let q=NS7(),_=(await Promise.all(q.map(async({path:z,label:Y})=>{if(!YS5(z))return{stdout:"",label:Y,ok:!1};let{stdout:$,code:A}=await vK1(vS7,[...kS7,z]);return{stdout:$,label:Y,ok:A===0&&!!$}}))).find((z)=>z.ok);return{plistStdouts:_?[{stdout:_.stdout,label:_.label}]:[],hklmStdout:null,hkcuStdout:null}}if(process.platform==="win32"){let[q,K]=await Promise.all([vK1("reg",["query",RA8,"/v",XD6]),vK1("reg",["query",hA8,"/v",XD6])]);return{plistStdouts:null,hklmStdout:q.code===0?q.stdout:null,hkcuStdout:K.code===0?K.stdout:null}}return{plistStdouts:null,hklmStdout:null,hkcuStdout:null}})()}function yS7(){if(kK1)return;kK1=SA8()}function ES7(){return kK1}var kK1=null;var VK1=y(()=>{TK1()});import{join as LS7}from"path";function $S5(){if(CA8)return;CA8=(async()=>{U4("mdm_load_start");let q=Date.now(),K=ES7()??SA8(),{mdm:_,hkcu:z}=bS7(await K);yK1=_,EK1=z,U4("mdm_load_end");let Y=Date.now()-q;if(N(`MDM settings load completed in ${Y}ms`),Object.keys(_.settings).length>0){N(`MDM settings found: ${Object.keys(_.settings).join(", ")}`);try{c8("info","mdm_settings_loaded",{duration_ms:Y,key_count:Object.keys(_.settings).length,error_count:_.errors.length})}catch{}}})()}async function hS7(){if(!CA8)$S5();await CA8}function PD6(){return yK1??Dl}function WD6(){return EK1??Dl}function SS7(q,K){yK1=q,EK1=K}async function CS7(){let q=await SA8();return bS7(q)}function NK1(q,K){let _=m5(q,!1);if(!_||typeof _!=="object")return{settings:{},errors:[]};let z=EA8(_,K),Y=EW().safeParse(_);if(!Y.success){let $=MD6(Y.error,K);return{settings:{},errors:[...z,...$]}}return{settings:Y.data,errors:z}}function RS7(q,K="Settings"){let _=q.split(/\r?\n/),z=K.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Y=new RegExp(`^\\s+${z}\\s+REG_(?:EXPAND_)?SZ\\s+(.*)$`,"i");for(let $ of _){let A=$.match(Y);if(A&&A[1])return A[1].trimEnd()}return null}function bS7(q){if(q.plistStdouts&&q.plistStdouts.length>0){let{stdout:K,label:_}=q.plistStdouts[0],z=NK1(K,_);if(Object.keys(z.settings).length>0)return{mdm:z,hkcu:Dl}}if(q.hklmStdout){let K=RS7(q.hklmStdout);if(K){let _=NK1(K,`Registry: ${RA8}\\${XD6}`);if(Object.keys(_.settings).length>0)return{mdm:_,hkcu:Dl}}}if(AS5())return{mdm:Dl,hkcu:Dl};if(q.hkcuStdout){let K=RS7(q.hkcuStdout);if(K){let _=NK1(K,`Registry: ${hA8}\\${XD6}`);return{mdm:Dl,hkcu:_}}}return{mdm:Dl,hkcu:Dl}}function AS5(){try{let q=LS7(MP(),"managed-settings.json"),K=xZ(q),_=m5(K,!1);if(_&&typeof _==="object"&&Object.keys(_).length>0)return!0}catch{}try{let q=RB(),K=X8().readdirSync(q);for(let _ of K){if(!(_.isFile()||_.isSymbolicLink())||!_.name.endsWith(".json")||_.name.startsWith("."))continue;try{let z=xZ(LS7(q,_.name)),Y=m5(z,!1);if(Y&&typeof Y==="object"&&Object.keys(Y).length>0)return!0}catch{}}}catch{}return!1}var Dl,yK1=null,EK1=null,CA8=null;var bA8=y(()=>{_8();oY();ZE();e7();vO();Cx();qI();vh();LA8();TK1();VK1();Dl=Object.freeze({settings:{},errors:[]})});import{dirname as xS7,join as DD6,resolve as Vp6}from"path";function hK1(){return DD6(MP(),"managed-settings.json")}function SK1(){let q=[],K={},_=!1,{settings:z,errors:Y}=le(hK1());if(q.push(...Y),z&&Object.keys(z).length>0)K=Ol(K,z,k_6),_=!0;let $=RB();try{let A=X8().readdirSync($).filter((O)=>(O.isFile()||O.isSymbolicLink())&&O.name.endsWith(".json")&&!O.name.startsWith(".")).map((O)=>O.name).sort();for(let O of A){let{settings:w,errors:j}=le(DD6($,O));if(q.push(...j),w&&Object.keys(w).length>0)K=Ol(K,w,k_6),_=!0}}catch(A){let O=s1(A);if(O!=="ENOENT"&&O!=="ENOTDIR")H6(A)}return{settings:_?K:null,errors:q}}function IS7(){let{settings:q}=le(hK1()),K=!!q&&Object.keys(q).length>0,_=!1,z=RB();try{_=X8().readdirSync(z).some((Y)=>(Y.isFile()||Y.isSymbolicLink())&&Y.name.endsWith(".json")&&!Y.name.startsWith("."))}catch{}return{hasBase:K,hasDropIns:_}}function uS7(q,K){if(typeof q==="object"&&q&&"code"in q&&q.code==="ENOENT")N(`Broken symlink or missing file encountered for settings.json at path: ${K}`);else H6(q)}function le(q){let K=Dj7(q);if(K)return{settings:K.settings?Po8(K.settings):null,errors:K.errors};let _=OS5(q);return fj7(q,_),{settings:_.settings?Po8(_.settings):null,errors:_.errors}}function OS5(q){try{let{resolvedPath:K}=F$(X8(),q),_=xZ(K);if(_.trim()==="")return{settings:{},errors:[]};let z=m5(_,!1),Y=EA8(z,q),$=EW().safeParse(z);if(!$.success){let A=MD6($.error,q);return{settings:null,errors:[...Y,...A]}}return{settings:$.data,errors:Y}}catch(K){return uS7(K,q),{settings:null,errors:[]}}}function V_6(q){switch(q){case"userSettings":return Vp6(c1());case"policySettings":case"projectSettings":case"localSettings":return Vp6(r1());case"flagSettings":{let K=xt();return K?xS7(Vp6(K)):Vp6(r1())}}}function wS5(){if(nb6()||i6(process.env.CLAUDE_CODE_USE_COWORK_PLUGINS))return"cowork_settings.json";return"settings.json"}function Hj(q){switch(q){case"userSettings":return DD6(V_6(q),wS5());case"projectSettings":case"localSettings":return DD6(V_6(q),N_6(q));case"policySettings":return hK1();case"flagSettings":return xt()}}function N_6(q){switch(q){case"projectSettings":return DD6(".claude","settings.json");case"localSettings":return DD6(".claude","settings.local.json")}}function v1(q){let K=Pj7(q);if(K!==void 0)return K;let _=mS7(q);return Wj7(q,_),_}function mS7(q){if(q==="policySettings"){let z=wl();if(z&&Object.keys(z).length>0)return z;let Y=PD6();if(Object.keys(Y.settings).length>0)return Y.settings;let{settings:$}=SK1();if($)return $;let A=WD6();if(Object.keys(A.settings).length>0)return A.settings;return null}let K=Hj(q),{settings:_}=K?le(K):{settings:null};if(q==="flagSettings"){let z=IX6();if(z){let Y=EW().safeParse(z);if(Y.success)return Ol(_||{},Y.data,k_6)}}return _}function pS7(){let q=wl();if(q&&Object.keys(q).length>0)return"remote";let K=PD6();if(Object.keys(K.settings).length>0)return Z1()==="macos"?"plist":"hklm";let{settings:_}=SK1();if(_)return"file";let z=WD6();if(Object.keys(z.settings).length>0)return"hkcu";return null}function W7(q,K){if(q==="policySettings"||q==="flagSettings")return{error:null};let _=Hj(q);if(!_)return{error:null};try{X8().mkdirSync(xS7(_));let z=mS7(q);if(!z){let $=null;try{$=xZ(_)}catch(A){if(!_7(A))throw A}if($!==null){let A=m5($);if(A===null)return{error:Error(`Invalid JSON syntax in settings file at ${_}`)};if(A&&typeof A==="object")z=A,N(`Using raw settings from ${_} due to validation failure`)}}let Y=Ol(z||{},K,($,A,O,w)=>{if(A===void 0&&w&&typeof O==="string"){delete w[O];return}if(Array.isArray(A))return A;return});if(n41(_),lW6(_,g6(Y,null,2)+` |
| 191 | `),DW(),q==="localSettings")Kh7(N_6("localSettings"),r1())}catch(z){let Y=Error(`Failed to read raw settings from ${_}: ${z}`);return H6(Y),{error:Y}}return{error:null}}function jS5(q,K){return cJ([...q,...K])}function k_6(q,K){if(Array.isArray(q)&&Array.isArray(K))return jS5(q,K);return}function BS7(q){let K=EW().strip().parse(q),_=["permissions","sandbox","hooks"],z=[],Y={permissions:new Set(["allow","deny","ask","defaultMode","disableBypassPermissionsMode","disableAutoMode","additionalDirectories"]),sandbox:new Set(["enabled","failIfUnavailable","allowUnsandboxedCommands","network","filesystem","ignoreViolations","excludedCommands","autoAllowBashIfSandboxed","enableWeakerNestedSandbox","enableWeakerNetworkIsolation","ripgrep"]),hooks:new Set(["PreToolUse","PostToolUse","Notification","UserPromptSubmit","SessionStart","SessionEnd","Stop","SubagentStop","PreCompact","PostCompact","TeammateIdle","TaskCreated","TaskCompleted"])};for(let $ of Object.keys(K))if(_.includes($)&&K[$]&&typeof K[$]==="object"){let A=K[$],O=Y[$];if(O){for(let w of Object.keys(A))if(O.has(w))z.push(`${$}.${w}`)}}else z.push($);return z.sort()}function HS5(){if(LK1)return{settings:{},errors:[]};let q=Date.now();U4("loadSettingsFromDisk_start"),c8("info","settings_load_started"),LK1=!0;try{let K=i58(),_={};if(K)_=Ol(_,K,k_6);let z=[],Y=new Set,$=new Set;for(let A of Jl()){if(A==="policySettings"){let w=null,j=[],H=wl();if(H&&Object.keys(H).length>0){let J=EW().safeParse(H);if(J.success)w=J.data;else j.push(...MD6(J.error,"remote managed settings"))}if(!w){let J=PD6();if(Object.keys(J.settings).length>0)w=J.settings;j.push(...J.errors)}if(!w){let{settings:J,errors:M}=SK1();if(J)w=J;j.push(...M)}if(!w){let J=WD6();if(Object.keys(J.settings).length>0)w=J.settings;j.push(...J.errors)}if(w)_=Ol(_,w,k_6);for(let J of j){let M=`${J.file}:${J.path}:${J.message}`;if(!Y.has(M))Y.add(M),z.push(J)}continue}let O=Hj(A);if(O){let w=Vp6(O);if(!$.has(w)){$.add(w);let{settings:j,errors:H}=le(O);for(let J of H){let M=`${J.file}:${J.path}:${J.message}`;if(!Y.has(M))Y.add(M),z.push(J)}if(j)_=Ol(_,j,k_6)}}if(A==="flagSettings"){let w=IX6();if(w){let j=EW().safeParse(w);if(j.success)_=Ol(_,j.data,k_6)}}}return c8("info","settings_load_completed",{duration_ms:Date.now()-q,source_count:$.size,error_count:z.length}),{settings:_,errors:z}}finally{LK1=!1}}function N7(){let{settings:q}=y_6();return q||{}}function gS7(){DW();let q=[];for(let K of Jl()){let _=v1(K);if(_&&Object.keys(_).length>0)q.push({source:K,settings:_})}return{effective:N7(),sources:q}}function y_6(){let q=Mj7();if(q!==null)return q;let K=HS5();return U4("loadSettingsFromDisk_end"),Xj7(K),K}function fD6(){return!!(v1("userSettings")?.skipDangerousModePermissionPrompt||v1("localSettings")?.skipDangerousModePermissionPrompt||v1("flagSettings")?.skipDangerousModePermissionPrompt||v1("policySettings")?.skipDangerousModePermissionPrompt)}function fl(){{let q=v1("userSettings")?.skipAutoPermissionPrompt,K=v1("localSettings")?.skipAutoPermissionPrompt,_=v1("flagSettings")?.skipAutoPermissionPrompt,z=v1("policySettings")?.skipAutoPermissionPrompt,Y=!!(q||K||_||z);return N(`[auto-mode] hasAutoModeOptIn=${Y} skipAutoPermissionPrompt: user=${q} local=${K} flag=${_} policy=${z}`),Y}return!1}function FS7(){return v1("policySettings")?.useAutoModeDuringPlan!==!1&&v1("flagSettings")?.useAutoModeDuringPlan!==!1&&v1("userSettings")?.useAutoModeDuringPlan!==!1&&v1("localSettings")?.useAutoModeDuringPlan!==!1}function Np6(){{let q=L.object({allow:L.array(L.string()).optional(),soft_deny:L.array(L.string()).optional(),deny:L.array(L.string()).optional(),environment:L.array(L.string()).optional()}),K=[],_=[],z=[];for(let Y of["userSettings","localSettings","flagSettings","policySettings"]){let $=v1(Y);if(!$)continue;let A=q.safeParse($.autoMode);if(A.success){if(A.data.allow)K.push(...A.data.allow);if(A.data.soft_deny)_.push(...A.data.soft_deny);if(A.data.environment)z.push(...A.data.environment)}}if(K.length>0||_.length>0||z.length>0)return{...K.length>0&&{allow:K},..._.length>0&&{soft_deny:_},...z.length>0&&{environment:z}}}return}function US7(q){for(let K of Jl()){if(K==="policySettings")continue;let _=Hj(K);if(!_)continue;try{let{resolvedPath:z}=F$(X8(),_),Y=xZ(z);if(!Y.trim())continue;let $=m5(Y,!1);if($&&typeof $==="object"&&q in $)return!0}catch(z){uS7(z,_)}}return!1}var LK1=!1,Z7;var U1=y(()=>{iL7();x7();v8();h$8();_8();oY();m8();y8();bK();ZE();e7();p41();vO();E8();vK();l8();Cx();kO();OA8();qI();bA8();Zc();vh();LA8();Z7=N7});var lS7=m((sk)=>{var JS5=sk&&sk.__createBinding||(Object.create?function(q,K,_,z){if(z===void 0)z=_;var Y=Object.getOwnPropertyDescriptor(K,_);if(!Y||("get"in Y?!K.__esModule:Y.writable||Y.configurable))Y={enumerable:!0,get:function(){return K[_]}};Object.defineProperty(q,z,Y)}:function(q,K,_,z){if(z===void 0)z=_;q[z]=K[_]}),MS5=sk&&sk.__setModuleDefault||(Object.create?function(q,K){Object.defineProperty(q,"default",{enumerable:!0,value:K})}:function(q,K){q.default=K}),dS7=sk&&sk.__importStar||function(q){if(q&&q.__esModule)return q;var K={};if(q!=null){for(var _ in q)if(_!=="default"&&Object.prototype.hasOwnProperty.call(q,_))JS5(K,q,_)}return MS5(K,q),K};Object.defineProperty(sk,"__esModule",{value:!0});sk.req=sk.json=sk.toBuffer=void 0;var XS5=dS7(U6("http")),PS5=dS7(U6("https"));async function cS7(q){let K=0,_=[];for await(let z of q)K+=z.length,_.push(z);return Buffer.concat(_,K)}sk.toBuffer=cS7;async function WS5(q){let _=(await cS7(q)).toString("utf8");try{return JSON.parse(_)}catch(z){let Y=z;throw Y.message+=` (input: ${_})`,Y}}sk.json=WS5;function DS5(q,K={}){let z=((typeof q==="string"?q:q.href).startsWith("https:")?PS5:XS5).request(q,K),Y=new Promise(($,A)=>{z.once("response",$).once("error",A).end()});return z.then=Y.then.bind(Y),z}sk.req=DS5});var CK1=m((VE)=>{var iS7=VE&&VE.__createBinding||(Object.create?function(q,K,_,z){if(z===void 0)z=_;var Y=Object.getOwnPropertyDescriptor(K,_);if(!Y||("get"in Y?!K.__esModule:Y.writable||Y.configurable))Y={enumerable:!0,get:function(){return K[_]}};Object.defineProperty(q,z,Y)}:function(q,K,_,z){if(z===void 0)z=_;q[z]=K[_]}),fS5=VE&&VE.__setModuleDefault||(Object.create?function(q,K){Object.defineProperty(q,"default",{enumerable:!0,value:K})}:function(q,K){q.default=K}),rS7=VE&&VE.__importStar||function(q){if(q&&q.__esModule)return q;var K={};if(q!=null){for(var _ in q)if(_!=="default"&&Object.prototype.hasOwnProperty.call(q,_))iS7(K,q,_)}return fS5(K,q),K},ZS5=VE&&VE.__exportStar||function(q,K){for(var _ in q)if(_!=="default"&&!Object.prototype.hasOwnProperty.call(K,_))iS7(K,q,_)};Object.defineProperty(VE,"__esModule",{value:!0});VE.Agent=void 0;var GS5=rS7(U6("net")),nS7=rS7(U6("http")),TS5=U6("https");ZS5(lS7(),VE);var bB=Symbol("AgentBaseInternalState");class oS7 extends nS7.Agent{constructor(q){super(q);this[bB]={}}isSecureEndpoint(q){if(q){if(typeof q.secureEndpoint==="boolean")return q.secureEndpoint;if(typeof q.protocol==="string")return q.protocol==="https:"}let{stack:K}=Error();if(typeof K!=="string")return!1;return K.split(` |