agentroam-runtime-darwin-arm64 0.2.0-preview.75 → 0.2.0-preview.77
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/manifest.json +2 -2
- package/package.json +1 -1
- package/runtime/.next/BUILD_ID +1 -1
- package/runtime/.next/app-build-manifest.json +9 -9
- package/runtime/.next/app-path-routes-manifest.json +1 -1
- package/runtime/.next/build-manifest.json +5 -5
- package/runtime/.next/prerender-manifest.json +1 -1
- package/runtime/.next/required-server-files.json +1 -1
- package/runtime/.next/routes-manifest.json +1 -1
- package/runtime/.next/server/app/_not-found/page.js +1 -1
- package/runtime/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/runtime/.next/server/app/_not-found.html +1 -1
- package/runtime/.next/server/app/_not-found.rsc +1 -1
- package/runtime/.next/server/app/api/agent/abort/route.js +1 -1
- package/runtime/.next/server/app/api/agent/abort/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent/answer/route.js +1 -1
- package/runtime/.next/server/app/api/agent/answer/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent/codex-sharing/route.js +1 -1
- package/runtime/.next/server/app/api/agent/codex-sharing/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent/harness/status/route.js +1 -1
- package/runtime/.next/server/app/api/agent/harness/status/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent/model/route.js +1 -1
- package/runtime/.next/server/app/api/agent/model/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent/models/route.js +1 -1
- package/runtime/.next/server/app/api/agent/models/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent/run/route.js +1 -1
- package/runtime/.next/server/app/api/agent/run/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent/runtime-health/route.js +1 -1
- package/runtime/.next/server/app/api/agent/runtime-health/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent/steer/route.js +1 -1
- package/runtime/.next/server/app/api/agent/steer/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent/stream/route.js +4 -4
- package/runtime/.next/server/app/api/agent/stream/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent-workspaces/[workspaceId]/sessions/route.js +1 -1
- package/runtime/.next/server/app/api/agent-workspaces/[workspaceId]/sessions/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/agent-workspaces/route.js +1 -1
- package/runtime/.next/server/app/api/agent-workspaces/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/auth/verify/route.js +1 -1
- package/runtime/.next/server/app/api/business/route.js +1 -1
- package/runtime/.next/server/app/api/business/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/calendar/route.js +2 -3
- package/runtime/.next/server/app/api/calendar/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/client-logs/route.js +1 -1
- package/runtime/.next/server/app/api/collaboration/route.js +9 -9
- package/runtime/.next/server/app/api/collaboration/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/engine-threads/route.js +1 -1
- package/runtime/.next/server/app/api/engine-threads/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/engine-threads.body +1 -1
- package/runtime/.next/server/app/api/flow/v1/catalog/route.js +1 -1
- package/runtime/.next/server/app/api/flow/v1/catalog/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/flow/v1/runs/[runId]/cancel/route.js +1 -1
- package/runtime/.next/server/app/api/flow/v1/runs/[runId]/cancel/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/flow/v1/runs/[runId]/events/route.js +2 -2
- package/runtime/.next/server/app/api/flow/v1/runs/[runId]/events/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/flow/v1/runs/route.js +1 -1
- package/runtime/.next/server/app/api/flow/v1/runs/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/flow-studio/config/route.js +1 -1
- package/runtime/.next/server/app/api/internal/todo-bootstrap/route.js +1 -0
- package/runtime/.next/server/app/api/internal/todo-bootstrap/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/internal/todo-mcp/route.js +1 -0
- package/runtime/.next/server/app/api/internal/todo-mcp/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/mcp/connect/route.js +1 -1
- package/runtime/.next/server/app/api/mcp/disconnect/route.js +1 -1
- package/runtime/.next/server/app/api/mcp/servers/route.js +1 -1
- package/runtime/.next/server/app/api/mcp/servers.body +1 -1
- package/runtime/.next/server/app/api/memory/[key]/route.js +1 -1
- package/runtime/.next/server/app/api/memory/route.js +1 -1
- package/runtime/.next/server/app/api/messaging/route.js +1 -1
- package/runtime/.next/server/app/api/notifications/[id]/ack/route.js +1 -0
- package/runtime/.next/server/app/api/notifications/[id]/ack/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/notifications/[id]/route.js +1 -0
- package/runtime/.next/server/app/api/notifications/[id]/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/notifications/route.js +1 -0
- package/runtime/.next/server/app/api/notifications/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/notifications/stream/route.js +4 -0
- package/runtime/.next/server/app/api/notifications/stream/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/plugins/load/route.js +1 -1
- package/runtime/.next/server/app/api/plugins/load/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/projects/[id]/route.js +1 -1
- package/runtime/.next/server/app/api/projects/check/route.js +1 -1
- package/runtime/.next/server/app/api/projects/directories/route.js +1 -1
- package/runtime/.next/server/app/api/projects/roots/route.js +1 -1
- package/runtime/.next/server/app/api/projects/route.js +1 -1
- package/runtime/.next/server/app/api/push/subscribe/route.js +2 -2
- package/runtime/.next/server/app/api/push/subscribe/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/push/unsubscribe/route.js +2 -2
- package/runtime/.next/server/app/api/push/vapid/route.js +3 -3
- package/runtime/.next/server/app/api/push/vapid/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/push/vapid.body +1 -1
- package/runtime/.next/server/app/api/remote-tools/register/route.js +1 -1
- package/runtime/.next/server/app/api/remote-tools/register/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/session-images/[id]/route.js +1 -0
- package/runtime/.next/server/app/api/session-images/[id]/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/sessions/[id]/background-jobs/[jobId]/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/background-jobs/[jobId]/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/background-jobs/[jobId]/stop/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/background-jobs/[jobId]/stop/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/background-jobs/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/background-jobs/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/changes/route.js +3 -3
- package/runtime/.next/server/app/api/sessions/[id]/changes/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/engine-switches/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/engine-switches/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/fork/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/fork/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/fork-at/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/fork-at/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/goals/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/goals/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/handoff/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/handoff/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/native-goal/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/native-goal/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/query-index/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/query-index/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/release/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/release/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/switch-engine/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/switch-engine/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/thread-goal/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/thread-goal/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/thread-history/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/thread-history/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/tool-result/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/tool-result/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/parallel/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/parallel/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/sessions/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/settings/route.js +1 -1
- package/runtime/.next/server/app/api/skills/route.js +1 -1
- package/runtime/.next/server/app/api/todos/[id]/commands/route.js +1 -0
- package/runtime/.next/server/app/api/todos/[id]/commands/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/todos/[id]/executions/route.js +1 -0
- package/runtime/.next/server/app/api/todos/[id]/executions/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/todos/[id]/route.js +1 -0
- package/runtime/.next/server/app/api/todos/[id]/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/todos/route.js +1 -0
- package/runtime/.next/server/app/api/todos/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/tool-policies/[policyId]/route.js +1 -1
- package/runtime/.next/server/app/api/tool-policies/[policyId]/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/tool-policies/route.js +1 -1
- package/runtime/.next/server/app/api/tool-policies/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/tools/route.js +1 -1
- package/runtime/.next/server/app/api/tools/route.js.nft.json +1 -1
- package/runtime/.next/server/app/api/update/check/route.js +1 -1
- package/runtime/.next/server/app/api/update/install/route.js +1 -1
- package/runtime/.next/server/app/api/update/status/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/login/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/logout/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/revoke-all/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/setup/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/status/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/bootstrap/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/computer-settings/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/computers/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/device-state/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/history/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/preferences/route.js +1 -1
- package/runtime/.next/server/app/api/workspace-changes/route.js +1 -0
- package/runtime/.next/server/app/api/workspace-changes/route.js.nft.json +1 -0
- package/runtime/.next/server/app/web/page.js +4 -4
- package/runtime/.next/server/app/web/page_client-reference-manifest.js +1 -1
- package/runtime/.next/server/app-paths-manifest.json +45 -33
- package/runtime/.next/server/chunks/1298.js +1 -0
- package/runtime/.next/server/chunks/1973.js +1 -0
- package/runtime/.next/server/chunks/4621.js +1 -1
- package/runtime/.next/server/chunks/5303.js +1 -1
- package/runtime/.next/server/chunks/535.js +1 -0
- package/runtime/.next/server/chunks/5762.js +3 -3
- package/runtime/.next/server/chunks/5801.js +1 -0
- package/runtime/.next/server/chunks/5812.js +1 -0
- package/runtime/.next/server/chunks/685.js +1 -0
- package/runtime/.next/server/chunks/6977.js +1 -1
- package/runtime/.next/server/chunks/9119.js +15 -0
- package/runtime/.next/server/chunks/9457.js +1 -0
- package/runtime/.next/server/middleware-build-manifest.js +1 -1
- package/runtime/.next/server/pages/404.html +1 -1
- package/runtime/.next/server/pages/500.html +1 -1
- package/runtime/.next/server/server-reference-manifest.json +1 -1
- package/runtime/.next/static/chunks/753-90c7dd1ba08be9be.js +1 -0
- package/runtime/.next/static/chunks/app/web/{error-3cae58f0f14f0b4f.js → error-828d278147a0619d.js} +1 -1
- package/runtime/.next/static/chunks/app/web/layout-a8b7565989c1c063.js +1 -0
- package/runtime/.next/static/chunks/app/web/page-8ff95d45a0160843.js +1 -0
- package/runtime/.next/static/chunks/{main-d8ef9def37924b01.js → main-7240085c0ba42e9a.js} +1 -1
- package/runtime/.next/static/chunks/main-app-07d67f2d4e96ecb8.js +1 -0
- package/runtime/lib/desktop-discovery.mjs +12 -3
- package/runtime/lib/service-identity.mjs +17 -0
- package/runtime/native/Support.noindex/AgentRoam Remote Desktop.app/Contents/MacOS/agentroam-remote-desktop +0 -0
- package/runtime/native/Support.noindex/AgentRoam Remote Desktop.app/Contents/Resources/agentroam-component.json +1 -1
- package/runtime/native/Support.noindex/AgentRoam Remote Desktop.app/Contents/_CodeSignature/CodeResources +2 -2
- package/runtime/node_modules/.package-lock.json +17 -17
- package/runtime/node_modules/@agent/core/dist/index.js +865 -7
- package/runtime/node_modules/@agent/native-runtime/dist/index.js +28979 -9946
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/bridge.mjs +82 -90
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/browser-sdk.js +65 -64
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-0vfvgmex.mjs +39 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-x4kwpwv9.mjs → core-3h0s3zzg.mjs} +2 -2
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-ba5rrckm.mjs → core-6w7w19rc.mjs} +2 -2
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-8fprsbvz.mjs +42 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-avz7wgsg.mjs +23 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-b9ebje8h.mjs +20 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-tf03rfab.mjs → core-e1h3fbg3.mjs} +3 -3
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-2h2qc9qv.mjs → core-ge6en8c9.mjs} +4 -4
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-h6r54bwv.mjs → core-htcq9qj1.mjs} +2 -2
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-sstebd83.mjs → core-nv0a4kre.mjs} +4 -4
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-y4qk5bdp.mjs +17 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/{core-qj4dtgyt.mjs → core-yrdmz7je.mjs} +3 -3
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-z276fcqp.mjs +28 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core.mjs +12 -11
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/manifest.json +22 -22
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/manifest.zst.json +26 -26
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/package.json +23 -25
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs +86 -90
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.cjs +72 -45
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.min.cjs +13 -13
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.min.mjs +13 -13
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.mjs +72 -45
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.node.cjs +72 -45
- package/runtime/node_modules/mediabunny/dist/modules/src/input.js +6 -0
- package/runtime/node_modules/mediabunny/dist/modules/src/media-sink.js +52 -35
- package/runtime/node_modules/mediabunny/dist/modules/src/media-source.js +2 -0
- package/runtime/node_modules/mediabunny/dist/modules/src/mpeg-ts/mpeg-ts-demuxer.js +7 -1
- package/runtime/node_modules/mediabunny/dist/modules/src/source.js +7 -4
- package/runtime/node_modules/mediabunny/dist/modules/src/tsconfig.tsbuildinfo +1 -1
- package/runtime/node_modules/mediabunny/dist/modules/src/version.js +1 -1
- package/runtime/node_modules/mediabunny/dist/modules/src/wave/wave-demuxer.js +6 -6
- package/runtime/node_modules/mediabunny/package.json +1 -1
- package/runtime/node_modules/mediabunny/src/input.ts +7 -0
- package/runtime/node_modules/mediabunny/src/media-sink.ts +56 -37
- package/runtime/node_modules/mediabunny/src/media-source.ts +3 -0
- package/runtime/node_modules/mediabunny/src/mpeg-ts/mpeg-ts-demuxer.ts +6 -1
- package/runtime/node_modules/mediabunny/src/source.ts +7 -4
- package/runtime/node_modules/mediabunny/src/version.ts +1 -1
- package/runtime/node_modules/mediabunny/src/wave/wave-demuxer.ts +6 -6
- package/runtime/node_modules/source-map-js/lib/quick-sort.js +92 -22
- package/runtime/node_modules/source-map-js/package.json +1 -1
- package/runtime/package-lock.json +41 -65
- package/runtime/server.js +1 -1
- package/runtime/webapp/dist/assets/AIHubView-CrtJMKfW.js +1 -0
- package/runtime/webapp/dist/assets/{AgentManager-CrN2B-tH.js → AgentManager-C2O-Dacy.js} +2 -2
- package/runtime/webapp/dist/assets/{AiHubPane-Du6ajSsx.js → AiHubPane-D2XWxc9R.js} +1 -1
- package/runtime/webapp/dist/assets/App-Bum2L4_E.js +63 -0
- package/runtime/webapp/dist/assets/App-CtLZIOFu.css +1 -0
- package/runtime/webapp/dist/assets/BrowserLivePanel-DkBugqrH.js +61 -0
- package/runtime/webapp/dist/assets/CalendarPage-DzYWlqoZ.js +1 -0
- package/runtime/webapp/dist/assets/CalendarView-BjjC_t12.css +1 -0
- package/runtime/webapp/dist/assets/CalendarView-HQls5G-1.js +31 -0
- package/runtime/webapp/dist/assets/CollaborationCreateDialog-BwiSJbjb.js +1 -0
- package/runtime/webapp/dist/assets/CollaborationDashboard-CNHt31kl.js +1 -0
- package/runtime/webapp/dist/assets/CollaborationPage-C4l-tTvn.js +6 -0
- package/runtime/webapp/dist/assets/{FilePreview-CevPpP6E.js → FilePreview-EGUAbGpH.js} +5 -5
- package/runtime/webapp/dist/assets/FileTree-aJGl1V0W.js +6 -0
- package/runtime/webapp/dist/assets/FileWorkspaceDrawer-zpD91eB6.js +1 -0
- package/runtime/webapp/dist/assets/FlowStudioPane-K1o4pSkZ.js +5 -0
- package/runtime/webapp/dist/assets/HostProjectPicker-BvboCQ0a.js +1 -0
- package/runtime/webapp/dist/assets/{LSPServerList-BMY6dFfG.js → LSPServerList-BSLzGLtW.js} +1 -1
- package/runtime/webapp/dist/assets/{MCPServerList-c91QNM-g.js → MCPServerList-CeWTI1-m.js} +1 -1
- package/runtime/webapp/dist/assets/{MemoryViewer-C9IfWwzW.js → MemoryViewer-YcceFawC.js} +1 -1
- package/runtime/webapp/dist/assets/NewSessionWindow-C_HCQQnW.js +1 -0
- package/runtime/webapp/dist/assets/NewSessionWindow-DOLG1XEp.css +1 -0
- package/runtime/webapp/dist/assets/{RemoteDesktopPage-w8aL061W.js → RemoteDesktopPage-Cpzv8zH0.js} +1 -1
- package/runtime/webapp/dist/assets/{RunningSessionsIcon-B8Cr2-hp.js → RunningSessionsIcon-DmCYwIYD.js} +5 -5
- package/runtime/webapp/dist/assets/SessionDashboard-C58Mke8a.js +16 -0
- package/runtime/webapp/dist/assets/{SessionDashboardBridge-Bx4EXtos.js → SessionDashboardBridge-BPsNDY5Y.js} +1 -1
- package/runtime/webapp/dist/assets/{SettingsPanel-CS4XL2sd.js → SettingsPanel-CPBIPT-Z.js} +2 -2
- package/runtime/webapp/dist/assets/{SkillManager-5FZnR9My.js → SkillManager-_qaGEuOE.js} +1 -1
- package/runtime/webapp/dist/assets/{TerminalPane-CRrbd0i4.js → TerminalPane-mYe76Pgb.js} +2 -2
- package/runtime/webapp/dist/assets/TodoPage-DdF5_SkL.js +1 -0
- package/runtime/webapp/dist/assets/{abnfDiagram-VCTEODGH-DBioGYiE.js → abnfDiagram-VCTEODGH-DLd8EeCY.js} +1 -1
- package/runtime/webapp/dist/assets/{arc-BRj_RXHL.js → arc-D4smlqs5.js} +1 -1
- package/runtime/webapp/dist/assets/{architectureDiagram-5GKGNRK7-CoCdq67U.js → architectureDiagram-5GKGNRK7-ByE3DRU4.js} +1 -1
- package/runtime/webapp/dist/assets/{arrow-right-Cqqb1zqH.js → arrow-right-BtIv2jiq.js} +1 -1
- package/runtime/webapp/dist/assets/artifact-links-4m1A00GO.js +2 -0
- package/runtime/webapp/dist/assets/{blockDiagram-I7D4REHJ-CLisIPjq.js → blockDiagram-I7D4REHJ-BvTUm5vA.js} +3 -3
- package/runtime/webapp/dist/assets/{c4Diagram-7LVT6UL2-BoLCIVW8.js → c4Diagram-7LVT6UL2-XKwj5RmQ.js} +1 -1
- package/runtime/webapp/dist/assets/calendar-days-BeI09qof.js +6 -0
- package/runtime/webapp/dist/assets/channel-wxCRUEc2.js +1 -0
- package/runtime/webapp/dist/assets/check-BdadwkYj.js +6 -0
- package/runtime/webapp/dist/assets/{chevron-down-DhZV290h.js → chevron-down-DwzPFeq8.js} +1 -1
- package/runtime/webapp/dist/assets/chevron-right-kcIXzCMb.js +6 -0
- package/runtime/webapp/dist/assets/{chunk-2Q5K7J3B-CIQxwzU0.js → chunk-2Q5K7J3B-7A6CDWIw.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-5VM5RSS4-Buiv0MCN.js → chunk-5VM5RSS4-mkNEWbY6.js} +1 -1
- package/runtime/webapp/dist/assets/chunk-F27PBJKO-DKG-1HL0.js +1 -0
- package/runtime/webapp/dist/assets/{chunk-IMKFNOWR-C0NrkJOc.js → chunk-IMKFNOWR-kiJDyKM7.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-JWPE2WC7-CGON_UvB.js → chunk-JWPE2WC7-DS7C5_M7.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-POPQ4Y6H-BXvOsc9g.js → chunk-POPQ4Y6H-DvgeK_lX.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-SVP7TREG-ZD_qn-NK.js → chunk-SVP7TREG-BLo_2ua-.js} +3 -3
- package/runtime/webapp/dist/assets/{chunk-TICWLB2K-DrB8f6RG.js → chunk-TICWLB2K-CJT6Qkz4.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-XXDRQBXY-CYgLMn5t.js → chunk-XXDRQBXY-D1OLqjNu.js} +1 -1
- package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-Ct3Cgqrl.js +1 -0
- package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-Ct3Cgqrl.js +1 -0
- package/runtime/webapp/dist/assets/{codeSyntax-DfQ5rLir.js → codeSyntax-Dd0hAazb.js} +3 -3
- package/runtime/webapp/dist/assets/collaboration-CAgt9AiV.js +6 -0
- package/runtime/webapp/dist/assets/composer-file-routing-DSC2Eojr.js +6 -0
- package/runtime/webapp/dist/assets/{cose-bilkent-JH36ORCC-CDPnTlcy.js → cose-bilkent-JH36ORCC-CI6EKHP8.js} +1 -1
- package/runtime/webapp/dist/assets/{cynefin-OW5HDTMX-DDCxhkA5.js → cynefin-OW5HDTMX-CJTXYieX.js} +1 -1
- package/runtime/webapp/dist/assets/{cynefinDiagram-5FMLGOSQ-CIJ1KBPA.js → cynefinDiagram-5FMLGOSQ-CPl1UVhy.js} +2 -2
- package/runtime/webapp/dist/assets/{dagre-GXQ25YYZ-CFX8O3IJ.js → dagre-GXQ25YYZ-Dq3ZQGTN.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-S7CK7UJ4-B8UX2IBH.js → diagram-S7CK7UJ4-DJyU-2Di.js} +3 -3
- package/runtime/webapp/dist/assets/{diagram-UQ7AKVKN-Ce34DNrv.js → diagram-UQ7AKVKN-Csg8hC8m.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-VSXAHHWV-CVL_erWD.js → diagram-VSXAHHWV-B14uLH_N.js} +3 -3
- package/runtime/webapp/dist/assets/{diagram-VX7I27RA-DBFHI7Dk.js → diagram-VX7I27RA-D2Ww2nHe.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-Z3DM3KII-Bw_QcSQY.js → diagram-Z3DM3KII-D_YC6AVP.js} +2 -2
- package/runtime/webapp/dist/assets/{download-D3xZPWnZ.js → download-COWHIKec.js} +1 -1
- package/runtime/webapp/dist/assets/{ebnfDiagram-PWID7BFC-DRly04dj.js → ebnfDiagram-PWID7BFC-s66xVEGY.js} +1 -1
- package/runtime/webapp/dist/assets/{erDiagram-RLTQ6QDP-DTm817hG.js → erDiagram-RLTQ6QDP-CgZh5cEn.js} +1 -1
- package/runtime/webapp/dist/assets/{external-link-Cwu5rEgp.js → external-link-T3kil1jt.js} +1 -1
- package/runtime/webapp/dist/assets/{file-types-DKkhMnUV.js → file-types-0e-tNIVd.js} +2 -2
- package/runtime/webapp/dist/assets/{flowDiagram-HODETNUW-tc8ygZtG.js → flowDiagram-HODETNUW-BISMKynN.js} +1 -1
- package/runtime/webapp/dist/assets/{ganttDiagram-EL5Y4UJY-CsQFf1IN.js → ganttDiagram-EL5Y4UJY-Cbyu0NcF.js} +1 -1
- package/runtime/webapp/dist/assets/{gitGraphDiagram-WWUBYQGX-DAIxbmPX.js → gitGraphDiagram-WWUBYQGX-Cs6IQGBz.js} +7 -7
- package/runtime/webapp/dist/assets/history-Df4LXw6L.js +6 -0
- package/runtime/webapp/dist/assets/{image-plus-nplydLA5.js → image-plus-COHCHOpI.js} +1 -1
- package/runtime/webapp/dist/assets/index-CQTDnt74.css +1 -0
- package/runtime/webapp/dist/assets/index-CTJNAMck.js +489 -0
- package/runtime/webapp/dist/assets/{infoDiagram-27XIBGKW-CVcMW4UM.js → infoDiagram-27XIBGKW-4f3bFqNV.js} +1 -1
- package/runtime/webapp/dist/assets/{ishikawaDiagram-5VMMS53U-zzlEtZ1l.js → ishikawaDiagram-5VMMS53U-D-cJ9vio.js} +4 -4
- package/runtime/webapp/dist/assets/{journeyDiagram-3NMN7TZE-q7NuIMSl.js → journeyDiagram-3NMN7TZE-CeToS0Qx.js} +1 -1
- package/runtime/webapp/dist/assets/{kanban-definition-UXKFOSKX-DLYFZlKO.js → kanban-definition-UXKFOSKX-DStbIUk1.js} +7 -7
- package/runtime/webapp/dist/assets/{layout-PFWssIkE.js → layout-i2D4wlYd.js} +1 -1
- package/runtime/webapp/dist/assets/{linear-ZRVcojb1.js → linear-BcJhiCv3.js} +1 -1
- package/runtime/webapp/dist/assets/list-todo-7yETOqQe.js +6 -0
- package/runtime/webapp/dist/assets/{loader-circle-DIW9tlEz.js → loader-circle-CZdAfU-D.js} +1 -1
- package/runtime/webapp/dist/assets/locate-fixed-ByJuEKxC.js +6 -0
- package/runtime/webapp/dist/assets/{mermaid.core-C8Dl0Nah.js → mermaid.core-BjNFAB9I.js} +6 -6
- package/runtime/webapp/dist/assets/{mindmap-definition-YA3MSWOX-BcbqtwVk.js → mindmap-definition-YA3MSWOX-BUIHHUVG.js} +1 -1
- package/runtime/webapp/dist/assets/new-session-window-C7R76XMp.css +1 -0
- package/runtime/webapp/dist/assets/new-session-window-DwtkwFBQ.js +190 -0
- package/runtime/webapp/dist/assets/page-9-9EC7QM.js +86 -0
- package/runtime/webapp/dist/assets/pause-DXyBDZlg.js +6 -0
- package/runtime/webapp/dist/assets/{pegDiagram-XKGWAZYB-BQN3zQuy.js → pegDiagram-XKGWAZYB-BY5Bio5e.js} +1 -1
- package/runtime/webapp/dist/assets/{pieDiagram-E7YTZNPT-pOgxh3os.js → pieDiagram-E7YTZNPT-CF8DVW3F.js} +3 -3
- package/runtime/webapp/dist/assets/pin-2YlrlSJv.js +6 -0
- package/runtime/webapp/dist/assets/play-BxEpdvoI.js +6 -0
- package/runtime/webapp/dist/assets/{quadrantDiagram-AXDQQJYC-BOg7ujzG.js → quadrantDiagram-AXDQQJYC-CXWHO3a-.js} +1 -1
- package/runtime/webapp/dist/assets/{railroadDiagram-O6MQD6OU-CWsN3juJ.js → railroadDiagram-O6MQD6OU-C20JeJZ-.js} +1 -1
- package/runtime/webapp/dist/assets/{requirementDiagram-BXWQKSXE-B0yrO7Oy.js → requirementDiagram-BXWQKSXE-IYd9UrO9.js} +3 -3
- package/runtime/webapp/dist/assets/{rotate-ccw-O4wnfQP7.js → rotate-ccw-CFIRtbUD.js} +1 -1
- package/runtime/webapp/dist/assets/{rotate-cw-CCJtlAtB.js → rotate-cw-B_vFqNsz.js} +1 -1
- package/runtime/webapp/dist/assets/{sankeyDiagram-P5KCCOFB-5MS_e-3E.js → sankeyDiagram-P5KCCOFB-ysBhpblA.js} +2 -2
- package/runtime/webapp/dist/assets/{send-Cdg4ZVlp.js → send-DUE2vBoK.js} +1 -1
- package/runtime/webapp/dist/assets/{sequenceDiagram-WJ2MYXX4-C1w8qYSu.js → sequenceDiagram-WJ2MYXX4-CQMmk6cu.js} +4 -4
- package/runtime/webapp/dist/assets/session-dashboard-DnFhQhBN.js +1 -0
- package/runtime/webapp/dist/assets/{shield-check-CrjI2wPR.js → shield-check-Btyos6Iv.js} +1 -1
- package/runtime/webapp/dist/assets/{sizeCapture-INFHLROL-BonKTynC.js → sizeCapture-INFHLROL-DekvKUn1.js} +1 -1
- package/runtime/webapp/dist/assets/{stateDiagram-D77RDMKH-D3mn6ZK5.js → stateDiagram-D77RDMKH-Ds_FEmbr.js} +1 -1
- package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-DxJ1ks_8.js +1 -0
- package/runtime/webapp/dist/assets/{swimlanes-42K2YHIH-Bn9KWChU.js → swimlanes-42K2YHIH-cjPcEO_T.js} +1 -1
- package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-JGHIAQXy.js +8 -0
- package/runtime/webapp/dist/assets/{timeline-definition-24CTP7MA-BfuhI7EF.js → timeline-definition-24CTP7MA-CEOprVt5.js} +1 -1
- package/runtime/webapp/dist/assets/{trash-2-BrfgMjfL.js → trash-2-DLDxY6J7.js} +4 -9
- package/runtime/webapp/dist/assets/{types-VnQ_cKrp.js → types-CFAnlTif.js} +1 -1
- package/runtime/webapp/dist/assets/{vennDiagram-4TSXK5OY-CUFs5JyR.js → vennDiagram-4TSXK5OY-D82uxYY9.js} +5 -5
- package/runtime/webapp/dist/assets/{wardleyDiagram-VM6X3IG4-C27HHz1A.js → wardleyDiagram-VM6X3IG4-JFt7Izt0.js} +1 -1
- package/runtime/webapp/dist/assets/{web-CeCHmdwO.js → web-BMqaP0jw.js} +1 -1
- package/runtime/webapp/dist/assets/{web-BOzkL-0Z.js → web-Q9VPRftY.js} +1 -1
- package/runtime/webapp/dist/assets/{x-DP1nC4qG.js → x-CeSbythI.js} +1 -1
- package/runtime/webapp/dist/assets/{xychartDiagram-S5SC5T6Z-CQwRrSTf.js → xychartDiagram-S5SC5T6Z-1WCa4SfL.js} +3 -3
- package/runtime/webapp/dist/assets/zoom-out-CRr_o1NV.js +16 -0
- package/runtime/webapp/dist/index.html +2 -2
- package/runtime/ws-server.mjs +23 -4
- package/runtime/.next/server/chunks/1614.js +0 -1
- package/runtime/.next/server/chunks/732.js +0 -1
- package/runtime/.next/server/chunks/7519.js +0 -15
- package/runtime/.next/server/chunks/7788.js +0 -1
- package/runtime/.next/static/chunks/333-9881c3d2c558a28d.js +0 -1
- package/runtime/.next/static/chunks/app/web/layout-d5d7d1c5c74eef3c.js +0 -1
- package/runtime/.next/static/chunks/app/web/page-7afa4cb0119e90b7.js +0 -1
- package/runtime/.next/static/chunks/main-app-7a6902a607752446.js +0 -1
- package/runtime/lib/voice-tts-gateway.mjs +0 -96
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-9sxfsmzx.mjs +0 -18
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-dnsvg8nc.mjs +0 -53
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-k67vj6j9.mjs +0 -20
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-qbjntcdf.mjs +0 -18
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-rn7tc54w.mjs +0 -17
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-td7rt8zt.mjs +0 -17
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-y6bhrwmk.mjs +0 -47
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-ya1m7gzj.mjs +0 -18
- package/runtime/webapp/dist/assets/AIHubView-BMeOfqfm.js +0 -1
- package/runtime/webapp/dist/assets/App-CrZstnCH.css +0 -1
- package/runtime/webapp/dist/assets/App-zihaYk1L.js +0 -179
- package/runtime/webapp/dist/assets/BrowserLivePanel-CU_X6OU2.js +0 -56
- package/runtime/webapp/dist/assets/CollaborationCreateDialog-BmgYdwe7.js +0 -1
- package/runtime/webapp/dist/assets/CollaborationDashboard-mHU8iJYg.js +0 -1
- package/runtime/webapp/dist/assets/CollaborationPage-Br5fhNce.js +0 -6
- package/runtime/webapp/dist/assets/FileTree-CagcHV1N.js +0 -11
- package/runtime/webapp/dist/assets/FileWorkspaceDrawer-CWVndCXp.js +0 -1
- package/runtime/webapp/dist/assets/FlowStudioPane-BZA-qvBj.js +0 -5
- package/runtime/webapp/dist/assets/SessionDashboard-CFXXTm_4.js +0 -21
- package/runtime/webapp/dist/assets/artifact-links-73OZyi5W.js +0 -7
- package/runtime/webapp/dist/assets/channel-JGVZzkSo.js +0 -1
- package/runtime/webapp/dist/assets/chunk-F27PBJKO-XBMwIl6X.js +0 -1
- package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-BnctJ00R.js +0 -1
- package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-BnctJ00R.js +0 -1
- package/runtime/webapp/dist/assets/collaboration-CQhzjwS_.js +0 -6
- package/runtime/webapp/dist/assets/composer-file-routing-D9orqwzY.js +0 -11
- package/runtime/webapp/dist/assets/index-B-d1Vs9E.css +0 -1
- package/runtime/webapp/dist/assets/index-DKm9ESDq.js +0 -489
- package/runtime/webapp/dist/assets/page-BG97oPXr.js +0 -91
- package/runtime/webapp/dist/assets/session-dashboard-BigU92sz.js +0 -6
- package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-WEfEW-mH.js +0 -1
- package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-D26_Nmko.js +0 -8
- package/runtime/webapp/dist/assets/zoom-out-Dg7YyzcP.js +0 -21
- package/runtime/webapp/dist/pcm-audio-worklet.js +0 -126
- /package/runtime/.next/static/{xuZ1UJWVNJ-rxb5YgETmd → alt-ud1W2PlWW6FLlkBcB}/_buildManifest.js +0 -0
- /package/runtime/.next/static/{xuZ1UJWVNJ-rxb5YgETmd → alt-ud1W2PlWW6FLlkBcB}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// (c) Anthropic PBC. All rights reserved. Use is subject to the Legal Agreements outlined here: https://code.claude.com/docs/en/legal-and-compliance.
|
|
2
|
+
|
|
3
|
+
// Version: 0.3.328
|
|
4
|
+
|
|
5
|
+
//! symbol-dispose-prelude: defines Symbol.dispose and Symbol.asyncDispose if missing, for this bundle's `using`.
|
|
6
|
+
if (typeof Symbol.dispose !== 'symbol') {
|
|
7
|
+
try {
|
|
8
|
+
Symbol.dispose = Symbol.for('Symbol.dispose')
|
|
9
|
+
} catch {}
|
|
10
|
+
}
|
|
11
|
+
if (typeof Symbol.asyncDispose !== 'symbol') {
|
|
12
|
+
try {
|
|
13
|
+
Symbol.asyncDispose = Symbol.for('Symbol.asyncDispose')
|
|
14
|
+
} catch {}
|
|
15
|
+
}
|
|
16
|
+
import{G,tr,y,b,d,Z,p,Ne,f,u,s,O,An,On,ht,he,a,k,Q,Rn,h,r,_,_e,F,Se,E,qe,ee,te,vn,V,ne,H,He,re,_t,Je,Xe,Ee,Vt,R,Y,xn,Dn,In,Pn,g,Yt,qt,Ln,oe,Jt,Be,Et,j,C,ye,Mn,Ct,Ze,A,o,S,M,At,Xt,W,Ke,Zt,Ge,Ot,be,Qe,l,Rt,Qt,et,se,en,ie,we,Fn,tt,Tt,Bn,wt,x,nn,Kn,Gn,z,nt,je,ae,We,rt,jn,t,P,ve,le,n,Ce,an,$n,N,ue,un,xt,q,qn,Jn,pn}from"./core-0vfvgmex.mjs";import{fe,mt,Me,m,ge}from"./core-avz7wgsg.mjs";import{yn,Ye,e}from"./core-y4qk5bdp.mjs";import{Zn,Qn,Oe,Dt,fn,Ie,J,er,L,at,It,Pt}from"./core-e1h3fbg3.mjs";import"./core-ge6en8c9.mjs";import"./core-yrdmz7je.mjs";var ea={};G(ea,{default:()=>Yn});var na={};G(na,{default:()=>go});var gd={};G(gd,{AGENT_PROXY_AUTH_TOKEN:()=>BD,ANTHROPIC_API_KEY:()=>DD,ANTHROPIC_AUTH_TOKEN:()=>LD,ANTHROPIC_AWS_API_KEY:()=>PD,ANTHROPIC_FEDERATION_RULE_ID:()=>PL,ANTHROPIC_FOUNDRY_API_KEY:()=>xD,ANTHROPIC_FOUNDRY_AUTH_TOKEN:()=>ND,ANTHROPIC_ORGANIZATION_ID:()=>NL,ANTHROPIC_PROFILE:()=>vL,ANTHROPIC_WORKSPACE_ID:()=>kL,AWS_BEARER_TOKEN_BEDROCK:()=>wD,AWS_CONTAINER_CREDENTIALS_FULL_URI:()=>UD,AWS_CONTAINER_CREDENTIALS_RELATIVE_URI:()=>MD,AWS_ROLE_ARN:()=>vD,AWS_WEB_IDENTITY_TOKEN_FILE:()=>kD,CLAUDE_CODE_ACCOUNT_TAGGED_ID:()=>UL,CLAUDE_CODE_ACCOUNT_UUID:()=>ML,CLAUDE_CODE_API_KEY_FILE_DESCRIPTOR:()=>KD,CLAUDE_CODE_API_KEY_HELPER_TTL_MS:()=>yL,CLAUDE_CODE_AUTH_FAIL_EXIT_MS:()=>SL,CLAUDE_CODE_AWS_CHAIN_RESOLVE_TIMEOUT_MS:()=>wL,CLAUDE_CODE_CUSTOM_OAUTH_URL:()=>eL,CLAUDE_CODE_DESIGN_OAUTH_CLIENT_ID:()=>qD,CLAUDE_CODE_DISABLE_LAUNCHER_SIGN_IN:()=>rL,CLAUDE_CODE_ENABLE_PROXY_AUTH_HELPER:()=>OL,CLAUDE_CODE_FEDERATION_CACHE_DIR:()=>xL,CLAUDE_CODE_GATEWAY_TOKEN_FILE_DESCRIPTOR:()=>$D,CLAUDE_CODE_HFI_BEARER_TOKEN:()=>FD,CLAUDE_CODE_HOST_AUTH_ASK_AT_START:()=>aL,CLAUDE_CODE_HOST_AUTH_ENV_VAR:()=>dL,CLAUDE_CODE_HOST_AUTH_REFRESH_TIMEOUT_MS:()=>lL,CLAUDE_CODE_HOST_CREDS_FILE:()=>cL,CLAUDE_CODE_LAUNCHER_RUNS_API_KEY_HELPER:()=>sL,CLAUDE_CODE_OAUTH_401_WAIT_MS:()=>hL,CLAUDE_CODE_OAUTH_CLIENT_ID:()=>ZD,CLAUDE_CODE_OAUTH_REFRESH_TOKEN:()=>JD,CLAUDE_CODE_OAUTH_SCOPES:()=>QD,CLAUDE_CODE_OAUTH_TOKEN:()=>ID,CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR:()=>jD,CLAUDE_CODE_ORGANIZATION_UUID:()=>HL,CLAUDE_CODE_PROXY_AUTH_HELPER_TTL_MS:()=>AL,CLAUDE_CODE_RATE_LIMIT_TIER:()=>zL,CLAUDE_CODE_RUNNER_MODEL_SOCKET:()=>XD,CLAUDE_CODE_SDK_HAS_HOST_AUTH_REFRESH:()=>iL,CLAUDE_CODE_SDK_HAS_OAUTH_REFRESH:()=>tL,CLAUDE_CODE_SDK_HAS_SESSIONS_OAUTH_REFRESH:()=>nL,CLAUDE_CODE_SESSIONS_OAUTH_TOKEN:()=>oL,CLAUDE_CODE_SESSION_ACCESS_TOKEN:()=>uL,CLAUDE_CODE_SKIP_ANTHROPIC_AWS_AUTH:()=>TL,CLAUDE_CODE_SKIP_ANTHROPIC_GOOGLE_CLOUD_AUTH:()=>DL,CLAUDE_CODE_SKIP_AWS_CRED_CACHE:()=>IL,CLAUDE_CODE_SKIP_BEDROCK_AUTH:()=>CL,CLAUDE_CODE_SKIP_FOUNDRY_AUTH:()=>RL,CLAUDE_CODE_SKIP_MANTLE_AUTH:()=>LL,CLAUDE_CODE_SKIP_VERTEX_AUTH:()=>bL,CLAUDE_CODE_SUBSCRIPTION_TYPE:()=>BL,CLAUDE_CODE_USER_EMAIL:()=>FL,CLAUDE_CODE_WEBSOCKET_AUTH_FILE_DESCRIPTOR:()=>VD,CLAUDE_LOCAL_OAUTH_API_BASE:()=>gL,CLAUDE_LOCAL_OAUTH_APPS_BASE:()=>_L,CLAUDE_LOCAL_OAUTH_CONSOLE_BASE:()=>EL,CLAUDE_SESSION_INGRESS_TOKEN_FILE:()=>YD,CLAUDE_TRUSTED_DEVICE_TOKEN:()=>pL,CLOUDSDK_AUTH_ACCESS_TOKEN:()=>HD,ENVIRONMENT_SERVICE_KEY:()=>zD,MCP_CLIENT_SECRET:()=>GD,MCP_XAA_IDP_CLIENT_SECRET:()=>WD,USE_LOCAL_OAUTH:()=>fL,USE_STAGING_OAUTH:()=>mL});var _d={};G(_d,{ANT_CLAUDE_CODE_METRICS_ENDPOINT:()=>ow,ANT_OTEL_EXPORTER_OTLP_ENDPOINT:()=>JI,ANT_OTEL_EXPORTER_OTLP_HEADERS:()=>ZI,ANT_OTEL_EXPORTER_OTLP_PROTOCOL:()=>qI,ANT_OTEL_LOGS_EXPORTER:()=>QI,ANT_OTEL_METRICS_EXPORTER:()=>ew,ANT_OTEL_RESOURCE_ATTRIBUTES:()=>nw,ANT_OTEL_TRACES_EXPORTER:()=>tw,BETA_TRACING_ENDPOINT:()=>rw,CLAUDE_CODE_BENCH_LIVE_COUNTS:()=>sI,CLAUDE_CODE_BYOC_ENABLE_DATADOG:()=>fI,CLAUDE_CODE_DATADOG_FLUSH_INTERVAL_MS:()=>uI,CLAUDE_CODE_DD_ERROR_TRACKING_FLUSH_INTERVAL_MS:()=>pI,CLAUDE_CODE_DEBUG_LOGS_DIR:()=>jL,CLAUDE_CODE_DEBUG_LOG_LEVEL:()=>KL,CLAUDE_CODE_DEBUG_REPAINTS:()=>$L,CLAUDE_CODE_DIAGNOSTICS_FILE:()=>VL,CLAUDE_CODE_ENHANCED_TELEMETRY_BETA:()=>aI,CLAUDE_CODE_FRAME_TIMING_LOG:()=>QL,CLAUDE_CODE_FRAME_TIMING_SAMPLE_EVERY:()=>eI,CLAUDE_CODE_NORMALIZE_PREFIX_CACHE_VERIFY:()=>iI,CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH:()=>WI,CLAUDE_CODE_OTEL_DIAG_STDERR:()=>mI,CLAUDE_CODE_OTEL_FLUSH_TIMEOUT_MS:()=>lI,CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS:()=>cI,CLAUDE_CODE_OTEL_SHUTDOWN_TIMEOUT_MS:()=>dI,CLAUDE_CODE_PERFETTO_TRACE:()=>ZL,CLAUDE_CODE_PERFETTO_WRITE_INTERVAL_S:()=>qL,CLAUDE_CODE_PROFILE_STARTUP:()=>JL,CLAUDE_CODE_SESSION_LOG:()=>tI,CLAUDE_CODE_TEE_SDK_STDOUT:()=>rI,CLAUDE_CODE_TERMINAL_RECORDING:()=>oI,CLAUDE_DEBUG:()=>GL,CLAUDE_PTY_RECORD:()=>nI,DEBUG:()=>WL,DEBUG_CLAUDE_AGENT_SDK:()=>YL,DEBUG_SDK:()=>XL,OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:()=>BI,OTEL_EXPORTER_OTLP_ENDPOINT:()=>hI,OTEL_EXPORTER_OTLP_HEADERS:()=>SI,OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:()=>RI,OTEL_EXPORTER_OTLP_LOGS_HEADERS:()=>TI,OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:()=>DI,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:()=>AI,OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:()=>LI,OTEL_EXPORTER_OTLP_METRICS_HEADERS:()=>II,OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:()=>wI,OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:()=>PI,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:()=>CI,OTEL_EXPORTER_OTLP_PROTOCOL:()=>yI,OTEL_EXPORTER_OTLP_TIMEOUT:()=>OI,OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:()=>xI,OTEL_EXPORTER_OTLP_TRACES_HEADERS:()=>NI,OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:()=>kI,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:()=>bI,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:()=>zI,OTEL_LOGS_EXPORTER:()=>_I,OTEL_LOGS_EXPORT_INTERVAL:()=>MI,OTEL_LOG_ASSISTANT_RESPONSES:()=>jI,OTEL_LOG_MANAGED_SETTINGS:()=>YI,OTEL_LOG_RAW_API_BODIES:()=>XI,OTEL_LOG_TOOL_CONTENT:()=>$I,OTEL_LOG_TOOL_DETAILS:()=>VI,OTEL_LOG_USER_PROMPTS:()=>KI,OTEL_METRICS_EXPORTER:()=>gI,OTEL_METRIC_EXPORT_INTERVAL:()=>vI,OTEL_RESOURCE_ATTRIBUTES:()=>HI,OTEL_RESOURCE_INCLUDE_HOST:()=>FI,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:()=>GI,OTEL_TRACES_EXPORTER:()=>EI,OTEL_TRACES_EXPORT_INTERVAL:()=>UI});var hd={};G(hd,{CLAUDE_AX_ANNOUNCEMENT_HOLD_MS:()=>vw,CLAUDE_AX_PREPARK_MS:()=>kw,CLAUDE_AX_REWRITE_HELD_ANNOUNCEMENT:()=>Mw,CLAUDE_AX_SCREEN_READER:()=>xw,CLAUDE_AX_STARTUP_QUIET_MS:()=>Nw,CLAUDE_CHROME_CLASSIFIER_FLOOR:()=>Uw,CLAUDE_CODE_ACCESSIBILITY:()=>QN,CLAUDE_CODE_ACT_DONT_REDERIVE:()=>ek,CLAUDE_CODE_ALT_SCREEN_FULL_REPAINT:()=>Fw,CLAUDE_CODE_AMBER_ASTROLABE:()=>yN,CLAUDE_CODE_ARTIFACT_ASK_FIRST:()=>Wk,CLAUDE_CODE_ARTIFACT_ASSETS:()=>Pk,CLAUDE_CODE_ARTIFACT_COMMENTS:()=>uk,CLAUDE_CODE_ARTIFACT_COMMENTS_AUTOREACT:()=>pk,CLAUDE_CODE_ARTIFACT_COMMENT_FAST_ACK:()=>mk,CLAUDE_CODE_ARTIFACT_COMMENT_FAST_ACK_FIXED:()=>gk,CLAUDE_CODE_ARTIFACT_COMMENT_RESPONDER:()=>fk,CLAUDE_CODE_ARTIFACT_DB:()=>_k,CLAUDE_CODE_ARTIFACT_DB_STR_REPLACE:()=>Ek,CLAUDE_CODE_ARTIFACT_DELETE:()=>Sk,CLAUDE_CODE_ARTIFACT_FRESH_READ:()=>Bk,CLAUDE_CODE_ARTIFACT_HOT:()=>Nk,CLAUDE_CODE_ARTIFACT_LIVE_WATCH:()=>wk,CLAUDE_CODE_ARTIFACT_MULTI_FILE:()=>xk,CLAUDE_CODE_ARTIFACT_OPENING_PREFETCH:()=>zk,CLAUDE_CODE_ARTIFACT_OPEN_ACTION:()=>Ak,CLAUDE_CODE_ARTIFACT_PATH_PIN:()=>kk,CLAUDE_CODE_ARTIFACT_PIN:()=>Ck,CLAUDE_CODE_ARTIFACT_PRESENCE:()=>Ik,CLAUDE_CODE_ARTIFACT_PREVIEW:()=>yk,CLAUDE_CODE_ARTIFACT_PREVIEW_EMULATOR:()=>Ok,CLAUDE_CODE_ARTIFACT_PUBLISH_EDITS:()=>vk,CLAUDE_CODE_ARTIFACT_QUICKSTART:()=>Fk,CLAUDE_CODE_ARTIFACT_REPL:()=>hk,CLAUDE_CODE_ARTIFACT_ROOM:()=>Lk,CLAUDE_CODE_ARTIFACT_SHARE:()=>bk,CLAUDE_CODE_ARTIFACT_SHARE_PROBE_REUSE_MS:()=>Rk,CLAUDE_CODE_ARTIFACT_START_KIT:()=>Gk,CLAUDE_CODE_ARTIFACT_TOOLSET:()=>Mk,CLAUDE_CODE_ARTIFACT_TYPES:()=>Uk,CLAUDE_CODE_ARTIFACT_TYPE_CATALOG:()=>Hk,CLAUDE_CODE_ARTIFACT_TYPE_CLOUD_CREATE:()=>Kk,CLAUDE_CODE_ARTIFACT_VERIFY:()=>jk,CLAUDE_CODE_ARTIFACT_VERSIONS:()=>Dk,CLAUDE_CODE_ATTACHMENTS_IN_USER_DATA:()=>pv,CLAUDE_CODE_ATTRIBUTION_ANNOUNCEMENT:()=>tk,CLAUDE_CODE_AUTOUPDATER_DISABLED_BY_HOST:()=>vU,CLAUDE_CODE_AUTO_CONNECT_IDE:()=>$k,CLAUDE_CODE_AUTO_MODE_FULL_CONTEXT:()=>Vk,CLAUDE_CODE_AUTO_MODE_SERVER:()=>Yk,CLAUDE_CODE_BASALT_COVE:()=>Yw,CLAUDE_CODE_BASH_EDIT_DIFF:()=>jw,CLAUDE_CODE_BASH_OUTPUT_AUDIENCE_NOTE:()=>lk,CLAUDE_CODE_BASH_SANDBOX_SHOW_INDICATOR:()=>Xk,CLAUDE_CODE_BG_TASKS_REPORT_RUNNING:()=>pP,CLAUDE_CODE_BISON_CAIRN:()=>ON,CLAUDE_CODE_BREEZY_HORIZON:()=>Xw,CLAUDE_CODE_BUBBLEWRAP:()=>Jk,CLAUDE_CODE_CALM_MOCHI:()=>$N,CLAUDE_CODE_CCR_EARLY_HYDRATE_PREFETCH:()=>Zk,CLAUDE_CODE_CCR_EARLY_PLUGINS_SYNC:()=>iv,CLAUDE_CODE_CCR_EARLY_REMOTE_CONNECT:()=>qk,CLAUDE_CODE_CCR_EARLY_SKILLS_SYNC:()=>av,CLAUDE_CODE_CCR_EARLY_SYNC_AFTER_SETTINGS_REFUSAL:()=>lv,CLAUDE_CODE_CCR_LONG_POLL:()=>tv,CLAUDE_CODE_CCR_ONE_PLUGIN_LOAD_PER_RELOAD:()=>dv,CLAUDE_CODE_CCR_OWN_CONNECTION_POOL:()=>ev,CLAUDE_CODE_CCR_SKIP_FRESH_MIGRATIONS:()=>uv,CLAUDE_CODE_CCR_WORKER_SOCKET:()=>Qk,CLAUDE_CODE_CHILD_SESSION:()=>mv,CLAUDE_CODE_CHROME_MCP_ORG_DENIED:()=>Ev,CLAUDE_CODE_COLD_COMPACT:()=>hv,CLAUDE_CODE_COORDINATOR_FORCE_WORKER_INHERIT_MODEL:()=>fP,CLAUDE_CODE_COWORK_FRAME_ARTIFACTS:()=>_P,CLAUDE_CODE_COWORK_PLUGIN_SKILL:()=>Sv,CLAUDE_CODE_COZY_TEAPOT:()=>$w,CLAUDE_CODE_CRYPTIC_HORIZON:()=>dP,CLAUDE_CODE_CURRIED_TRINKET:()=>Vw,CLAUDE_CODE_DAPPER_CUPCAKE:()=>cP,CLAUDE_CODE_DEEP_TWILIGHT:()=>aP,CLAUDE_CODE_DESKTOP_CONNECTOR_NAMES:()=>SP,CLAUDE_CODE_DESKTOP_MESSAGE_CARD:()=>AP,CLAUDE_CODE_DESKTOP_MODE_FROM_RECORD:()=>OP,CLAUDE_CODE_DESKTOP_PLUGIN_INSTALL_FRAMES:()=>bP,CLAUDE_CODE_DESKTOP_RESULT_FIRST:()=>CP,CLAUDE_CODE_DESKTOP_SKILL_SWITCHES:()=>hP,CLAUDE_CODE_DESKTOP_WORKFLOW_LIMIT_WAIT:()=>yP,CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING:()=>wP,CLAUDE_CODE_DISABLE_ADMIN_ENV_UNION:()=>LP,CLAUDE_CODE_DISABLE_ADVISOR_TOOL:()=>PP,CLAUDE_CODE_DISABLE_AGENT_PROGRESS_SUMMARIES:()=>xP,CLAUDE_CODE_DISABLE_AGENT_VIEW:()=>NP,CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN:()=>kP,CLAUDE_CODE_DISABLE_ARTIFACT:()=>vP,CLAUDE_CODE_DISABLE_ATTACHMENTS:()=>MP,CLAUDE_CODE_DISABLE_ATTRIBUTION_CROSS_REPO:()=>UP,CLAUDE_CODE_DISABLE_AUTH_REFRESH_LOCK:()=>HP,CLAUDE_CODE_DISABLE_AUTO_MEMORY:()=>FP,CLAUDE_CODE_DISABLE_AWAITING_USER_IDLE:()=>BP,CLAUDE_CODE_DISABLE_BACKGROUND_TASKS:()=>zP,CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_DEFAULT:()=>$P,CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_GUARD:()=>VP,CLAUDE_CODE_DISABLE_BG_EXIT_HANDOFF:()=>YP,CLAUDE_CODE_DISABLE_BG_STABLE_PATH:()=>XP,CLAUDE_CODE_DISABLE_BUNDLED_SKILLS:()=>JP,CLAUDE_CODE_DISABLE_CFC_PROMPT:()=>ZP,CLAUDE_CODE_DISABLE_CLAUDE_API_SKILL:()=>qP,CLAUDE_CODE_DISABLE_CLAUDE_CODE_SKILL:()=>QP,CLAUDE_CODE_DISABLE_CLAUDE_MDS:()=>ex,CLAUDE_CODE_DISABLE_CRON:()=>tx,CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT:()=>nx,CLAUDE_CODE_DISABLE_EARLY_KEY_GUARD:()=>Ax,CLAUDE_CODE_DISABLE_EMPTY_CLASSIC_DISPATCH_SKIP:()=>sx,CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS:()=>ox,CLAUDE_CODE_DISABLE_EXPLORE_PLAN_AGENTS:()=>ix,CLAUDE_CODE_DISABLE_EXPORTED_VARIABLE_PROMPT:()=>Yx,CLAUDE_CODE_DISABLE_FEATURE_FLAGS:()=>ax,CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY:()=>lx,CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING:()=>cx,CLAUDE_CODE_DISABLE_FILE_MENTIONS:()=>ux,CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS:()=>px,CLAUDE_CODE_DISABLE_INLINE_SHELL_RM_PROMPT:()=>Kx,CLAUDE_CODE_DISABLE_LAUNCH_COMPOSER:()=>fx,CLAUDE_CODE_DISABLE_LAYOUT_CHECK:()=>WP,CLAUDE_CODE_DISABLE_LONE_SEC_DEFAULT_SHORTCUT:()=>mx,CLAUDE_CODE_DISABLE_MCP_INDEX_ROOM_COUNT:()=>jP,CLAUDE_CODE_DISABLE_MCP_TASKS:()=>KP,CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUND:()=>GP,CLAUDE_CODE_DISABLE_MEMORY_BULK_INFLATE:()=>gx,CLAUDE_CODE_DISABLE_MEMORY_MASS_DELETE_HOLD:()=>_x,CLAUDE_CODE_DISABLE_MEMORY_PERIODIC_RESYNC:()=>Ex,CLAUDE_CODE_DISABLE_MEMORY_RO_UNSAVED_NOTICE:()=>hx,CLAUDE_CODE_DISABLE_MEMORY_STREAM_LIST:()=>Sx,CLAUDE_CODE_DISABLE_MOUNTED_DRIVE_RM_PROMPT:()=>Vx,CLAUDE_CODE_DISABLE_MOUSE:()=>Cx,CLAUDE_CODE_DISABLE_MOUSE_CLICKS:()=>bx,CLAUDE_CODE_DISABLE_NESTED_CHAIN_IDLE:()=>Rx,CLAUDE_CODE_DISABLE_NESTED_SESSION_ID:()=>gv,CLAUDE_CODE_DISABLE_NESTED_USER_REPAIR:()=>Tx,CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC:()=>Dx,CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK:()=>Lx,CLAUDE_CODE_DISABLE_NOTIFICATION_PRESENCE_CHECK:()=>Ix,CLAUDE_CODE_DISABLE_OFFICIAL_MARKETPLACE_AUTOINSTALL:()=>wx,CLAUDE_CODE_DISABLE_ORG_MEMORY:()=>Px,CLAUDE_CODE_DISABLE_OTEL_EVENT_SKIP:()=>xx,CLAUDE_CODE_DISABLE_PERMISSION_PROMPT_NOTIFY_HOOKS:()=>yx,CLAUDE_CODE_DISABLE_POLICY_SKILLS:()=>Nx,CLAUDE_CODE_DISABLE_POWERSHELL_ALIAS_SHADOW_CHECK:()=>Wx,CLAUDE_CODE_DISABLE_POWERSHELL_CMD_RM_DENY:()=>kx,CLAUDE_CODE_DISABLE_PRECOMPACT_SKIP:()=>vx,CLAUDE_CODE_DISABLE_PROACTIVITY:()=>Mx,CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK:()=>Ux,CLAUDE_CODE_DISABLE_REFUSAL_RETRY:()=>Hx,CLAUDE_CODE_DISABLE_RESPONSE_COMPARISON:()=>dx,CLAUDE_CODE_DISABLE_RESUME_LOAD_GOODBYE_SKIP:()=>Fx,CLAUDE_CODE_DISABLE_SHELL_HEAD_START:()=>jx,CLAUDE_CODE_DISABLE_STARTUP_WORK_GATE:()=>Zx,CLAUDE_CODE_DISABLE_STRUCTURED_OUTPUTS:()=>rx,CLAUDE_CODE_DISABLE_SUBAGENT_HANDBACK:()=>Ov,CLAUDE_CODE_DISABLE_SUBSTITUTION_RM_PROMPT:()=>Gx,CLAUDE_CODE_DISABLE_TERMINAL_TITLE:()=>qx,CLAUDE_CODE_DISABLE_THINKING:()=>eN,CLAUDE_CODE_DISABLE_TRANSCRIPT_READ_AHEAD:()=>tN,CLAUDE_CODE_DISABLE_ULTRAREVIEW_TRUST_CHECK:()=>Jx,CLAUDE_CODE_DISABLE_ULTRATHINK:()=>nN,CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL:()=>oN,CLAUDE_CODE_DISABLE_WEB_FETCH:()=>rN,CLAUDE_CODE_DISABLE_WINDOWS_SHELL_LAUNCHER:()=>vM,CLAUDE_CODE_DISABLE_WORKFLOWS:()=>sN,CLAUDE_CODE_EDITOR_CODELIVERY:()=>mP,CLAUDE_CODE_ELEGANT_MEADOW:()=>uP,CLAUDE_CODE_ENABLE_APPEND_SUBAGENT_PROMPT:()=>aN,CLAUDE_CODE_ENABLE_AWAY_SUMMARY:()=>lN,CLAUDE_CODE_ENABLE_BACKGROUND_PLUGIN_REFRESH:()=>dN,CLAUDE_CODE_ENABLE_CFC:()=>cN,CLAUDE_CODE_ENABLE_DESIGN_SYNC:()=>uN,CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL:()=>pN,CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL:()=>fN,CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING:()=>mN,CLAUDE_CODE_ENABLE_LAUNCH_COMPOSER:()=>gN,CLAUDE_CODE_ENABLE_MENU_KIND_LANES:()=>_N,CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION:()=>DN,CLAUDE_CODE_ENABLE_REFRESH_MCP_TOOLS:()=>LN,CLAUDE_CODE_ENABLE_REMOTE_RECAP:()=>IN,CLAUDE_CODE_ENABLE_SDK_FILE_CHECKPOINTING:()=>wN,CLAUDE_CODE_ENABLE_SHARE_BUNDLE:()=>PN,CLAUDE_CODE_ENABLE_TASKS:()=>xN,CLAUDE_CODE_ENABLE_TODO_TOOLS:()=>NN,CLAUDE_CODE_ENABLE_TOKEN_USAGE_ATTACHMENT:()=>kN,CLAUDE_CODE_ENABLE_WRAP_UP:()=>vN,CLAUDE_CODE_ENABLE_XAA:()=>MN,CLAUDE_CODE_EVAL_INTERVIEW_SESSION:()=>OM,CLAUDE_CODE_EVEN_MORE_DANGEROUSLY_SKIP_PERMISSIONS:()=>Xx,CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS:()=>Av,CLAUDE_CODE_EXPERIMENTAL_OBSERVER_AGENTS:()=>Cv,CLAUDE_CODE_FEATURE_FLAGS_KICK_FROM_INIT:()=>nv,CLAUDE_CODE_FEATURE_FLAGS_KICK_ON_WARM_CACHE:()=>ov,CLAUDE_CODE_FIRST_CALL_THINKING_TITLES:()=>ck,CLAUDE_CODE_FIZZY_GROVE:()=>Qw,CLAUDE_CODE_FLEETVIEW_SIMPLE:()=>EN,CLAUDE_CODE_FORCE_MID_CONVERSATION_SYSTEM:()=>Pv,CLAUDE_CODE_FORCE_SESSION_PERSISTENCE:()=>Lv,CLAUDE_CODE_FORCE_STRIKETHROUGH:()=>Iv,CLAUDE_CODE_FORCE_TERMINAL_IMAGES:()=>wv,CLAUDE_CODE_FORCE_WINDOWS_CREDMAN:()=>Nv,CLAUDE_CODE_FORK_SUBAGENT:()=>bv,CLAUDE_CODE_FORWARD_SUBAGENT_TEXT:()=>kv,CLAUDE_CODE_FORWARD_USER_INTENT:()=>gP,CLAUDE_CODE_GATEWAY_HINT_HEADERS:()=>UM,CLAUDE_CODE_GB_DISK_CACHE_WHEN_TELEMETRY_OFF:()=>hN,CLAUDE_CODE_GENTLE_PARASOL:()=>Ww,CLAUDE_CODE_GLOB_HIDDEN:()=>Rv,CLAUDE_CODE_GLOB_NO_IGNORE:()=>Tv,CLAUDE_CODE_GORSE_PLOVER:()=>CN,CLAUDE_CODE_GROWTHBOOK_KICK_FROM_INIT:()=>rv,CLAUDE_CODE_GROWTHBOOK_KICK_ON_WARM_CACHE:()=>sv,CLAUDE_CODE_HARBOR_KITE:()=>UN,CLAUDE_CODE_HARBOR_KITE_CLOUD:()=>FN,CLAUDE_CODE_HARBOR_KITE_PACING_OFF:()=>HN,CLAUDE_CODE_HARMONIC_RIDDLE:()=>jN,CLAUDE_CODE_HIDE_CWD:()=>Dv,CLAUDE_CODE_HOOKS_SAME_THREAD:()=>zU,CLAUDE_CODE_HOST_ARTIFACT_TYPE_COMMANDS:()=>yv,CLAUDE_CODE_HOST_GUARDS_ARTIFACTS_MCP:()=>Tk,CLAUDE_CODE_HOST_SCHEDULED_RUN:()=>EP,CLAUDE_CODE_HOVER_REST:()=>SN,CLAUDE_CODE_HUMBLE_HAMMOCK:()=>oP,CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL:()=>vv,CLAUDE_CODE_IDE_SKIP_VALID_CHECK:()=>Mv,CLAUDE_CODE_INCLUDE_PARTIAL_MESSAGES:()=>Uv,CLAUDE_CODE_INLINE_TOOLS:()=>xv,CLAUDE_CODE_JUNIPER_SUNDIAL:()=>TN,CLAUDE_CODE_KB_COHESION_FIXES:()=>qN,CLAUDE_CODE_LANTERN_PRISM:()=>BN,CLAUDE_CODE_LARCH_CISTERN:()=>AN,CLAUDE_CODE_MANAGED_CONFIG_PREFETCH:()=>fv,CLAUDE_CODE_MCP_REGISTRY_FETCH_AT_STARTUP:()=>cv,CLAUDE_CODE_MEMORY_PUSH_DELETE_MODE:()=>Ox,CLAUDE_CODE_MESSAGES_PROMPT_CACHE_TTL:()=>wU,CLAUDE_CODE_MODEL_CAPABILITIES:()=>nk,CLAUDE_CODE_NANKEEN_KESTREL:()=>IP,CLAUDE_CODE_NATIVE_APP_BUNDLE:()=>Hv,CLAUDE_CODE_NATIVE_CURSOR:()=>Fv,CLAUDE_CODE_NEW_INIT:()=>Gv,CLAUDE_CODE_NEW_RENDERER:()=>Bv,CLAUDE_CODE_NONBLOCKING_STDOUT:()=>Kv,CLAUDE_CODE_NORMALIZE_PREFIX_CACHE:()=>jv,CLAUDE_CODE_NO_FLICKER:()=>Wv,CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE:()=>$v,CLAUDE_CODE_PARSED_WILLOW:()=>iP,CLAUDE_CODE_PEPPY_STARLIGHT:()=>Zw,CLAUDE_CODE_PEWTER_OWL:()=>HM,CLAUDE_CODE_PEWTER_OWL_TOOL:()=>FM,CLAUDE_CODE_PLAN_MODE_REQUIRED:()=>Vv,CLAUDE_CODE_PLUGIN_BINARY_ASSETS:()=>PM,CLAUDE_CODE_PLUGIN_DIRS:()=>WU,CLAUDE_CODE_PLUGIN_DIR_WATCH:()=>GU,CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE:()=>wM,CLAUDE_CODE_PLUGIN_PREFER_HTTPS:()=>NM,CLAUDE_CODE_PLUGIN_REMOTE_MCP_REACHABLE_HOSTS_HINT:()=>sM,CLAUDE_CODE_PLUGIN_USE_ZIP_CACHE:()=>xM,CLAUDE_CODE_POLISHED_DEWDROP:()=>tP,CLAUDE_CODE_POLL_EVENTS:()=>Yv,CLAUDE_CODE_POLL_EVENT_DECLARATIONS:()=>Xv,CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY:()=>kM,CLAUDE_CODE_PROACTIVE:()=>Zv,CLAUDE_CODE_PROJECTS_SESSION:()=>IM,CLAUDE_CODE_PROMPT_CACHE_TTL:()=>LU,CLAUDE_CODE_PROPAGATE_TRACEPARENT:()=>MM,CLAUDE_CODE_REFUSAL_FALLBACK_CATCH_ALL:()=>Bx,CLAUDE_CODE_REMOTE_TOOLS_DESKTOP_APP_HOST:()=>jU,CLAUDE_CODE_REMOTE_TOOLS_FORWARD:()=>KU,CLAUDE_CODE_REMOTE_TOOLS_HOST_ALLOWS_UNATTENDED:()=>TP,CLAUDE_CODE_REMOTE_TOOLS_HOST_IDLE_RELEASE_MINUTES:()=>DP,CLAUDE_CODE_REMOTE_TOOLS_PIN_STORED_LOGIN:()=>RP,CLAUDE_CODE_REMOVE_PROMPT_STRINGS:()=>bN,CLAUDE_CODE_REPLY_GATE_POLICY:()=>Jv,CLAUDE_CODE_REPORT_FINDINGS:()=>zx,CLAUDE_CODE_RIPPLING_TULIP:()=>KN,CLAUDE_CODE_RUSTLING_PIXEL:()=>nP,CLAUDE_CODE_SANDBOX_LEAVE_DENIES_TO_SRT_WIN:()=>qv,CLAUDE_CODE_SANDBOX_LEAVE_PARENT_FOLDERS_ALONE:()=>Qv,CLAUDE_CODE_SEND_FEEDBACK:()=>Qx,CLAUDE_CODE_SESSION_ATTENDED:()=>_v,CLAUDE_CODE_SHOW_HIDDEN_CHARACTERS:()=>zv,CLAUDE_CODE_SILENT_TURN_REMINDER:()=>rk,CLAUDE_CODE_SILENT_TURN_REMINDER_SECONDS:()=>ik,CLAUDE_CODE_SILENT_TURN_REMINDER_TEXT:()=>ak,CLAUDE_CODE_SILENT_TURN_REMINDER_TURNS:()=>sk,CLAUDE_CODE_SKILL_PROPOSALS:()=>eM,CLAUDE_CODE_SKIP_PLUGIN_LOCAL_MCP_SERVERS:()=>tM,CLAUDE_CODE_SKIP_PLUGIN_MCP_BUNDLES:()=>nM,CLAUDE_CODE_SKIP_PLUGIN_MCP_SERVERS:()=>oM,CLAUDE_CODE_SKIP_PLUGIN_MCP_SERVERS_EXCEPT:()=>rM,CLAUDE_CODE_SKIP_PROJECT_BACKFILL:()=>iM,CLAUDE_CODE_SKIP_PROMPT_HISTORY:()=>aM,CLAUDE_CODE_SKIP_REPO_UPLOAD:()=>lM,CLAUDE_CODE_SNAPPY_PELICAN:()=>Jw,CLAUDE_CODE_SORTED_OTTER:()=>qw,CLAUDE_CODE_STELLAR_DRIFT:()=>rP,CLAUDE_CODE_STREAMED_BUMBLEBEE:()=>VN,CLAUDE_CODE_STREAMED_BUMBLEBEE_TEXT:()=>YN,CLAUDE_CODE_STRICT_INLINE_SHELL_RM_PROMPT:()=>$x,CLAUDE_CODE_SUBAGENT_CACHE_EVICT:()=>dM,CLAUDE_CODE_SUBAGENT_CONFIG_WARNING:()=>XN,CLAUDE_CODE_SUBAGENT_HISTORY:()=>JN,CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL:()=>IU,CLAUDE_CODE_SUBAGENT_PROMPT_SNAPSHOT:()=>cM,CLAUDE_CODE_SUPPRESS_SESSION_ATTRIBUTION:()=>uM,CLAUDE_CODE_SYNC_PLUGINS:()=>fM,CLAUDE_CODE_SYNC_PLUGIN_INSTALL:()=>pM,CLAUDE_CODE_SYNC_SKILLS:()=>mM,CLAUDE_CODE_TAG_ISMETA_MESSAGES:()=>gM,CLAUDE_CODE_THINKING_DISPLAY_UPDATES:()=>dk,CLAUDE_CODE_THINKING_RESUMPTION:()=>eP,CLAUDE_CODE_THISTLE_GREBE:()=>Bw,CLAUDE_CODE_THRIFTY_SONIC:()=>Kw,CLAUDE_CODE_TOASTY_THIMBLE:()=>Gw,CLAUDE_CODE_TODO_REMINDER_MODE:()=>zN,CLAUDE_CODE_TOTAL_TOKENS_REMINDER:()=>GN,CLAUDE_CODE_TOTAL_TOKENS_REMINDER_AFTER_USER_TURN:()=>ZN,CLAUDE_CODE_TOTAL_TOKENS_REMINDER_BUDGET:()=>WN,CLAUDE_CODE_TRANSCRIPT_LOCAL_GC:()=>_M,CLAUDE_CODE_TURN_UPDATES:()=>ok,CLAUDE_CODE_TWO_STAGE_CLASSIFIER:()=>EM,CLAUDE_CODE_USE_COWORK_PLUGINS:()=>hM,CLAUDE_CODE_USE_NATIVE_FILE_SEARCH:()=>SM,CLAUDE_CODE_USE_POWERSHELL_TOOL:()=>yM,CLAUDE_CODE_WEBFETCH_CACHE_TTL_MS:()=>CM,CLAUDE_CODE_WEBFETCH_DEADLINE_MS:()=>bM,CLAUDE_CODE_WEBFETCH_USE_CCR_PROXY:()=>RM,CLAUDE_CODE_WEBSEARCH_CITATIONS:()=>DM,CLAUDE_CODE_WEBSEARCH_USE_CCR_PROXY:()=>TM,CLAUDE_CODE_WEB_FETCH_AGENT:()=>AM,CLAUDE_CODE_WEB_SEARCH_FAST_ARG:()=>LM,CLAUDE_CODE_WHIMSICAL_ELEPHANT:()=>lP,CLAUDE_CODE_WILLOW_TERN:()=>RN,CLAUDE_CODE_WISE_COMET:()=>sP,CLAUDE_CODE_WITTY_DEWDROP:()=>zw,CLAUDE_CODE_WORKFLOWS:()=>iN,CLAUDE_CODE_WORKFLOW_MAX_CONCURRENT_AGENTS:()=>XM,CLAUDE_CODE_WORKFLOW_PREFIX_STAGGER_MS:()=>YM,CLAUDE_CODE_WORKFLOW_SIZE_WARNING_AGENTS:()=>$M,CLAUDE_CODE_WORKFLOW_SIZE_WARNING_TOKENS:()=>VM,CLAUDE_DISABLE_ADOPT:()=>BM,CLAUDE_IMPORT_CONVERSATIONS:()=>zM,CLAUDE_RUNNER_DISABLE_AWAITING_ACTION_OVERRIDE:()=>GM,CLAUDE_RUNNER_DISABLE_RENEWAL_WARNING:()=>WM,CLAUDE_RUNNER_DISABLE_TURN_BEGAN_BEFORE_INIT:()=>KM,CLAUDE_WORKFLOW_NAME_ONLY:()=>jM,DISABLE_AUTOUPDATER:()=>ZM,DISABLE_AUTO_COMPACT:()=>JM,DISABLE_BRIEF_MODE_STOP_HOOK:()=>qM,DISABLE_BUG_COMMAND:()=>QM,DISABLE_COST_WARNINGS:()=>eU,DISABLE_DOCTOR_COMMAND:()=>tU,DISABLE_ERROR_REPORTING:()=>nU,DISABLE_EXTRA_USAGE_COMMAND:()=>oU,DISABLE_FEEDBACK_COMMAND:()=>rU,DISABLE_GROWTHBOOK:()=>sU,DISABLE_INSTALL_GITHUB_APP_COMMAND:()=>iU,DISABLE_INTERLEAVED_THINKING:()=>aU,DISABLE_LOGIN_COMMAND:()=>lU,DISABLE_LOGOUT_COMMAND:()=>dU,DISABLE_PROMPT_CACHING:()=>cU,DISABLE_PROMPT_CACHING_FABLE:()=>mU,DISABLE_PROMPT_CACHING_HAIKU:()=>uU,DISABLE_PROMPT_CACHING_MYTHOS:()=>gU,DISABLE_PROMPT_CACHING_OPUS:()=>pU,DISABLE_PROMPT_CACHING_SONNET:()=>fU,DISABLE_TELEMETRY:()=>_U,DISABLE_UPDATES:()=>EU,DISABLE_UPGRADE_COMMAND:()=>hU,EMBEDDED_SEARCH_TOOLS:()=>FU,ENABLE_BETA_TRACING_DETAILED:()=>SU,ENABLE_CLAUDEAI_MCP_SERVERS:()=>yU,ENABLE_ENHANCED_TELEMETRY_BETA:()=>OU,ENABLE_LOCKLESS_UPDATES:()=>AU,ENABLE_LSP_TOOL:()=>CU,ENABLE_MCP_LARGE_OUTPUT_FILES:()=>bU,ENABLE_PID_BASED_VERSION_LOCKING:()=>RU,ENABLE_PROMPT_CACHING_1H:()=>TU,ENABLE_PROMPT_CACHING_1H_BEDROCK:()=>DU,ENABLE_SESSION_BACKGROUNDING:()=>PU,ENABLE_SESSION_PERSISTENCE:()=>xU,ENABLE_TOOL_SEARCH:()=>NU,FORCE_AUTOUPDATE_PLUGINS:()=>kU,FORCE_CODE_TERMINAL:()=>MU,FORCE_PROMPT_CACHING_5M:()=>UU,FORCE_VCR:()=>HU,INK_SCREEN_READER:()=>Hw,USE_API_CONTEXT_MANAGEMENT:()=>BU});var Sd={};G(Sd,{ALACRITTY_LOG:()=>NF,ALACRITTY_WINDOW_ID:()=>kF,ALLUSERSPROFILE:()=>vH,ANDROID_HOME:()=>uF,ANDROID_SDK_ROOT:()=>pF,APPDATA:()=>RH,APP_URL:()=>f0,AWS_CA_BUNDLE:()=>qH,AWS_EXECUTION_ENV:()=>e0,AWS_LAMBDA_FUNCTION_NAME:()=>QB,AZURE_FUNCTIONS_ENVIRONMENT:()=>p0,BAT_THEME:()=>h0,BROWSER:()=>uH,BUILDKITE:()=>kB,BUN_CHROME_PATH:()=>E0,BUN_INSTALL:()=>_0,CARGO_HTTP_CAINFO:()=>eF,CDPATH:()=>YU,CF_PAGES:()=>ZB,CIRCLECI:()=>NB,CLOUDSDK_ACTIVE_CONFIG_NAME:()=>d0,CLOUDSDK_CONFIG:()=>l0,CLOUDSDK_CORE_CUSTOM_CA_CERTS_FILE:()=>JH,CODER:()=>FB,CODER_WORKSPACE_NAME:()=>BB,CODESPACES:()=>HB,COLORFGBG:()=>_F,COLORTERM:()=>gF,COMPUTERNAME:()=>AH,COMSPEC:()=>tH,CONTAINER_SANDBOX_MOUNT_POINT:()=>CH,CURL_CA_BUNDLE:()=>XH,CURSOR_TRACE_ID:()=>QF,ComSpec:()=>oH,ConEmuANSI:()=>$F,ConEmuPID:()=>VF,ConEmuTask:()=>YF,DAYTONA_WS_ID:()=>WB,DEMO_VERSION:()=>b0,DENO_CERT:()=>QH,DENO_DEPLOYMENT_ID:()=>qB,DISPLAY:()=>pH,DO_NOT_TRACK:()=>EF,DYNO:()=>JB,EDITOR:()=>dH,FORCE_COLOR:()=>mF,GCLOUD_PROJECT:()=>o0,GCM_INTERACTIVE:()=>aB,GH_CONFIG_DIR:()=>uB,GH_ENTERPRISE_TOKEN:()=>EB,GH_HOST:()=>gB,GH_REPO:()=>_B,GH_TOKEN:()=>mB,GITHUB_ACTIONS:()=>AB,GITHUB_ACTION_INPUTS:()=>CB,GITHUB_ACTION_PATH:()=>bB,GITHUB_ACTOR:()=>RB,GITHUB_ACTOR_ID:()=>TB,GITHUB_ENTERPRISE_TOKEN:()=>SB,GITHUB_ENV:()=>yB,GITHUB_EVENT_NAME:()=>DB,GITHUB_EVENT_PATH:()=>LB,GITHUB_REPOSITORY:()=>IB,GITHUB_REPOSITORY_ID:()=>wB,GITHUB_REPOSITORY_OWNER:()=>PB,GITHUB_REPOSITORY_OWNER_ID:()=>xB,GITHUB_TOKEN:()=>hB,GITHUB_WORKSPACE:()=>OB,GITLAB_CI:()=>vB,GITPOD_WORKSPACE_ID:()=>zB,GIT_ASKPASS:()=>iB,GIT_CONFIG_COUNT:()=>lB,GIT_CONFIG_GLOBAL:()=>dB,GIT_CONFIG_NOSYSTEM:()=>iF,GIT_DIR:()=>cB,GIT_SSH_COMMAND:()=>rB,GIT_SSL_CAINFO:()=>sF,GIT_SSL_CAPATH:()=>aF,GIT_TERMINAL_PROMPT:()=>sB,GNOME_TERMINAL_SERVICE:()=>PF,GOOGLE_APPLICATION_CREDENTIALS:()=>r0,GOOGLE_CLOUD_PROJECT:()=>n0,GOOGLE_CLOUD_WORKSTATIONS:()=>GB,GRPC_DEFAULT_SSL_ROOTS_FILE_PATH:()=>nF,HEX_CACERTS_PATH:()=>rF,HISTFILE:()=>GH,HOME:()=>$U,HOMEDRIVE:()=>wH,HOMEPATH:()=>PH,HOMESHARE:()=>xH,HTTPLIB2_CA_CERTS:()=>ZH,HUB_CONFIG:()=>pB,INTELLIJ_TERMINAL_COMMAND_BLOCKS:()=>XF,INTELLIJ_TERMINAL_COMMAND_BLOCKS_REWORKED:()=>JF,IS_DEMO:()=>C0,IS_SANDBOX:()=>A0,ITERM_SESSION_ID:()=>DF,JAVA_HOME:()=>dF,JAVA_TOOL_OPTIONS:()=>cF,KITTY_WINDOW_ID:()=>LF,KONSOLE_VERSION:()=>IF,KUBERNETES_SERVICE_HOST:()=>g0,K_SERVICE:()=>t0,LANG:()=>mH,LC_ALL:()=>gH,LC_TERMINAL:()=>OF,LC_TIME:()=>_H,LOCALAPPDATA:()=>TH,MSYSTEM:()=>jF,NETLIFY:()=>XB,NIX_SSL_CERT_FILE:()=>oF,NODE_EXTRA_CA_CERTS:()=>jH,NODE_OPTIONS:()=>WH,NODE_PATH:()=>KH,NO_COLOR:()=>fF,NoDefaultCurrentDirectoryInExePath:()=>lH,OneDrive:()=>DH,OneDriveCommercial:()=>IH,OneDriveConsumer:()=>LH,P4PORT:()=>S0,PATH:()=>VU,PATHEXT:()=>aH,PIP_CERT:()=>tF,PLAYWRIGHT_BROWSERS_PATH:()=>y0,PREFIX:()=>JU,PROGRAMDATA:()=>kH,PROGRAMFILES:()=>iH,PROJECT_DOMAIN:()=>$B,PWD:()=>XU,ProgramData:()=>NH,ProgramFiles:()=>sH,RENDER:()=>YB,REPL_ID:()=>KB,REPL_SLUG:()=>jB,REQUESTS_CA_BUNDLE:()=>YH,RUNNER_ENVIRONMENT:()=>UB,RUNNER_OS:()=>MB,SAFEUSER:()=>MH,SESSIONNAME:()=>UF,SHELL:()=>eH,SPACE_CREATOR_USER_ID:()=>m0,SSH_AUTH_SOCK:()=>oB,SSH_CLIENT:()=>eB,SSH_CONNECTION:()=>tB,SSH_TTY:()=>nB,SSL_CERT_DIR:()=>VH,SSL_CERT_FILE:()=>$H,STY:()=>HF,SUDO_GID:()=>SH,SUDO_UID:()=>hH,SUDO_USER:()=>yH,SYSTEMROOT:()=>nH,SystemRoot:()=>rH,TEMP:()=>QU,TERM:()=>hF,TERMINAL:()=>AF,TERMINAL_EMULATOR:()=>CF,TERMINATOR_UUID:()=>bF,TERMUX_VERSION:()=>RF,TERM_PROGRAM:()=>SF,TERM_PROGRAM_VERSION:()=>yF,TILIX_ID:()=>TF,TMP:()=>qU,TMPDIR:()=>ZU,TMUX:()=>FF,TMUX_PANE:()=>BF,TRACEPARENT:()=>R0,TRACESTATE:()=>T0,USER:()=>EH,USERNAME:()=>OH,USERPROFILE:()=>bH,USE_BUILTIN_RIPGREP:()=>O0,UV_THREADPOOL_SIZE:()=>lF,VERCEL:()=>VB,VISUAL:()=>cH,VSCODE_GIT_ASKPASS_MAIN:()=>qF,VTE_VERSION:()=>xF,WAYLAND_DISPLAY:()=>fH,WEBSITE_SITE_NAME:()=>c0,WEBSITE_SKU:()=>u0,WEZTERM_PANE:()=>vF,WSL_DISTRO_NAME:()=>WF,WSL_INTEROP:()=>KF,WT_SESSION:()=>MF,XDG_CACHE_HOME:()=>BH,XDG_CONFIG_HOME:()=>HH,XDG_DATA_HOME:()=>FH,XDG_RUNTIME_DIR:()=>UH,XDG_STATE_HOME:()=>zH,XTERM_VERSION:()=>wF,ZDOTDIR:()=>fB,ZED_TERM:()=>GF,ZELLIJ:()=>zF,__CFBundleIdentifier:()=>ZF,gcloud_project:()=>s0,google_application_credentials:()=>a0,google_cloud_project:()=>i0});var yd={};G(yd,{AI_AGENT:()=>QK,ALLOW_ANT_COMPUTER_USE_MCP:()=>ej,ANTHROPIC_CONFIG_DIR:()=>D0,BASH_MAX_OUTPUT_LENGTH:()=>tV,CCR_BYOC_RESOURCE_WATCHDOG_TELEMETRY:()=>HV,CCR_CHECKPOINT_URL:()=>nj,CCR_SESSION_PROFILE:()=>tj,CLAUBBIT:()=>oj,CLAUDECODE:()=>rj,CLAUDE_AFK_COUNTDOWN_MS:()=>nV,CLAUDE_AFK_TIMEOUT_MS:()=>oV,CLAUDE_AFTER_LAST_COMPACT:()=>L0,CLAUDE_AGENTS_SELECT:()=>I0,CLAUDE_AGENT_SDK_CLIENT_APP:()=>w0,CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS:()=>sj,CLAUDE_AGENT_SDK_DISABLE_MCP_MANIFESTS:()=>ij,CLAUDE_AGENT_SDK_MCP_NO_PREFIX:()=>aj,CLAUDE_AGENT_SDK_VERSION:()=>P0,CLAUDE_ARTIFACT_HOST_GRANT:()=>x0,CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS:()=>rV,CLAUDE_AUTOCOMPACT_PCT_OVERRIDE:()=>N0,CLAUDE_AUTO_BACKGROUND_TASKS:()=>lj,CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR:()=>dj,CLAUDE_BG_AUTH_SNAPSHOT_PATH:()=>k0,CLAUDE_BG_AUTO_MEMORY_OFF:()=>W0,CLAUDE_BG_BACKEND:()=>v0,CLAUDE_BG_CARRIED_PROMPTS_SHA256:()=>nz,CLAUDE_BG_CLAIM_AUTH:()=>M0,CLAUDE_BG_DISPATCHER_RATE_LIMIT_TIER:()=>U0,CLAUDE_BG_DISPATCHER_SUBSCRIPTION_TYPE:()=>H0,CLAUDE_BG_DISPATCH_ENTRYPOINT:()=>F0,CLAUDE_BG_GATEWAY_WITHHELD:()=>z0,CLAUDE_BG_ISOLATION:()=>B0,CLAUDE_BG_MEMORY_TOGGLED_OFF:()=>G0,CLAUDE_BG_POST_CLEAR_RESPAWN:()=>K0,CLAUDE_BG_PTY_AUTH:()=>j0,CLAUDE_BG_RENDEZVOUS_SOCK:()=>$0,CLAUDE_BG_RV_AUTH:()=>V0,CLAUDE_BG_SESSION_CREDENTIAL:()=>Y0,CLAUDE_BG_SESSION_PERMISSION_RULES:()=>X0,CLAUDE_BG_SILENT_PEER_TIMEOUT_MS:()=>J0,CLAUDE_BG_SOCKET_TOKENS_PATH:()=>q0,CLAUDE_BG_SOCK_ADMIT_SILENT_PEERS:()=>Z0,CLAUDE_BG_SOURCE:()=>Q0,CLAUDE_BG_STARTUP_WEDGE_MS:()=>sV,CLAUDE_BG_TCC_DISCLAIMED:()=>ez,CLAUDE_BG_WORKSPACE_TRUSTED:()=>tz,CLAUDE_BRIDGE_BASE_URL:()=>oz,CLAUDE_BRIDGE_OAUTH_TOKEN:()=>rz,CLAUDE_BRIDGE_REATTACH_GROUPING:()=>sz,CLAUDE_BRIDGE_REATTACH_NO_BACKFILL:()=>cj,CLAUDE_BRIDGE_REATTACH_OUTBOUND_ONLY:()=>uj,CLAUDE_BRIDGE_REATTACH_OWNER_ACCT:()=>iz,CLAUDE_BRIDGE_REATTACH_OWNER_ORG:()=>az,CLAUDE_BRIDGE_REATTACH_SEQ:()=>iV,CLAUDE_BRIDGE_REATTACH_SESSION:()=>lz,CLAUDE_BRIDGE_SESSION_INGRESS_URL:()=>dz,CLAUDE_CHROME_PAIRED_DEVICE_ID:()=>cz,CLAUDE_CHROME_PERMISSION_MODE:()=>uz,CLAUDE_CHROME_TAB_GROUP_KEY:()=>pz,CLAUDE_CLIENT_PRESENCE_FILE:()=>fz,CLAUDE_CODE_ACTION:()=>mz,CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD:()=>gz,CLAUDE_CODE_ADDITIONAL_PROTECTION:()=>pj,CLAUDE_CODE_AGENT:()=>_z,CLAUDE_CODE_AGENT_PROGRESS_SUMMARIES:()=>hz,CLAUDE_CODE_APPEND_PROMPT_HEAD:()=>Sz,CLAUDE_CODE_ARTIFACT:()=>yz,CLAUDE_CODE_ARTIFACTS_API_BASE_URL:()=>Az,CLAUDE_CODE_ARTIFACTS_API_TOKEN:()=>Cz,CLAUDE_CODE_ARTIFACT_ASSET_BASE_URL:()=>bz,CLAUDE_CODE_ARTIFACT_AUTO_OPEN:()=>Oz,CLAUDE_CODE_ARTIFACT_LIVE_BASE_URL:()=>Rz,CLAUDE_CODE_ARTIFACT_SYNC_BASE_URL:()=>Tz,CLAUDE_CODE_ARTIFACT_VIEWER_BASE_URL:()=>Dz,CLAUDE_CODE_ATTACHMENTS_BY_PATH:()=>Lz,CLAUDE_CODE_ATTRIBUTION_PROJECT:()=>Iz,CLAUDE_CODE_ATTRIBUTION_STATUS_TIMEOUT_MS:()=>wz,CLAUDE_CODE_AUTOMOUNT_ROOTS:()=>Ez,CLAUDE_CODE_AUTO_COMPACT_WINDOW:()=>xz,CLAUDE_CODE_AUTO_MODE_EXTERNAL_PERMISSIONS:()=>fj,CLAUDE_CODE_AUTO_MODE_TIER:()=>mj,CLAUDE_CODE_BASE_REF:()=>Nz,CLAUDE_CODE_BASE_REFS:()=>kz,CLAUDE_CODE_BLOCKING_LIMIT_OVERRIDE:()=>vz,CLAUDE_CODE_BRIDGE_CHILD_ARTIFACT:()=>uG,CLAUDE_CODE_BRIDGE_CHILD_AUTO_DEFAULT:()=>cG,CLAUDE_CODE_BRIDGE_CHILD_CLI_ENTRYPOINT:()=>gG,CLAUDE_CODE_BRIDGE_CHILD_MACHINE_SETTINGS:()=>pG,CLAUDE_CODE_BRIDGE_CHILD_PROJECTS_ENTRYPOINT:()=>fG,CLAUDE_CODE_BRIDGE_CHILD_START_DIR:()=>mG,CLAUDE_CODE_BRIDGE_MCP_CARRIER:()=>Mz,CLAUDE_CODE_BRIDGE_OWNER_ACCOUNT_UUID:()=>Uz,CLAUDE_CODE_BRIDGE_OWNER_ORG_UUID:()=>Hz,CLAUDE_CODE_BRIDGE_PROMPT_SHA256:()=>Bz,CLAUDE_CODE_BRIDGE_SESSION_ID:()=>Gz,CLAUDE_CODE_BRIDGE_SETTINGS_BINDING:()=>zz,CLAUDE_CODE_BRIDGE_SOURCE_DIR:()=>Fz,CLAUDE_CODE_BRIEF:()=>gj,CLAUDE_CODE_BRIEF_UPLOAD:()=>_j,CLAUDE_CODE_CCR_AFFINITY_KEY:()=>SW,CLAUDE_CODE_CCR_EVENT_FLUSH_POLICY:()=>_$,CLAUDE_CODE_CCR_SURFACE:()=>E$,CLAUDE_CODE_CHILD_NOTES_DIR:()=>wW,CLAUDE_CODE_CHROME_LATE_MCP_SERVER:()=>h1,CLAUDE_CODE_CLASSIFIER_SUMMARY:()=>Kz,CLAUDE_CODE_CONFIG_LOCK_WAIT_MS:()=>hG,CLAUDE_CODE_CONFIG_PROBE:()=>_G,CLAUDE_CODE_CONFIG_WATCH_EVENTS:()=>EG,CLAUDE_CODE_CONTAINER_ID:()=>jz,CLAUDE_CODE_COORDINATOR_SKILL_GUIDANCE:()=>Ej,CLAUDE_CODE_DAEMON_COLD_START:()=>hj,CLAUDE_CODE_DESKTOP_APP_VERSION:()=>$z,CLAUDE_CODE_DESKTOP_SKILLS_PLUGIN_DIR:()=>XG,CLAUDE_CODE_DEV_RAW_CHANGELOG_URL:()=>Vz,CLAUDE_CODE_DIFF_COPY_ROOT:()=>Yz,CLAUDE_CODE_DISABLE_ATTRIBUTION_BASELINE_REUSE:()=>Pz,CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP:()=>Sj,CLAUDE_CODE_DISABLE_DEFERRED_TOOL_RESUME:()=>L$,CLAUDE_CODE_DISABLE_HELD_MESSAGE_RECOGNITION:()=>x$,CLAUDE_CODE_DISABLE_HOOK_FORWARDING:()=>Jz,CLAUDE_CODE_DISABLE_HTTPS_AGENT_KEEPING:()=>qz,CLAUDE_CODE_DISABLE_PLUGIN_FORWARDING:()=>Zz,CLAUDE_CODE_DISABLE_POOLED_CONNECTION_IDLE_LIMIT:()=>Qz,CLAUDE_CODE_DISABLE_QUIET_BACKGROUND_WAIT:()=>eG,CLAUDE_CODE_DISABLE_STOP_OF_HELD_MESSAGES:()=>I$,CLAUDE_CODE_DISABLE_TURN_HANDOFF:()=>tG,CLAUDE_CODE_DISABLE_VITALS_EMITTER:()=>nG,CLAUDE_CODE_DISABLE_WORKING_SYNC:()=>oG,CLAUDE_CODE_DISABLE_WORKING_SYNC_WATCH:()=>rG,CLAUDE_CODE_DONT_INHERIT_ENV:()=>yj,CLAUDE_CODE_DOWNLOAD_DEADLINE_MS_FOR_TESTING:()=>sG,CLAUDE_CODE_DROP_UNAVAILABLE_DEFERRED_TOOL:()=>D$,CLAUDE_CODE_EMIT_SESSION_STATE_EVENTS:()=>Oj,CLAUDE_CODE_EMIT_STARTUP_TIMING:()=>bj,CLAUDE_CODE_EMIT_TOOL_USE_SUMMARIES:()=>Rj,CLAUDE_CODE_EMIT_USER_PROMPT_SUBMIT_HOOK_EVENTS:()=>Tj,CLAUDE_CODE_ENTRYPOINT:()=>iG,CLAUDE_CODE_ENTRYPOINT_ON_REQUESTS:()=>aG,CLAUDE_CODE_ENVIRONMENT_KIND:()=>lG,CLAUDE_CODE_ENVIRONMENT_RUNNER_VERSION:()=>SG,CLAUDE_CODE_EVAL_CONFINED:()=>c$,CLAUDE_CODE_EXIT_AFTER_FIRST_RENDER:()=>Ij,CLAUDE_CODE_EXIT_AFTER_STOP_DELAY:()=>aV,CLAUDE_CODE_FLAG_FETCH_WAIT_MS:()=>wj,CLAUDE_CODE_FOOTER_INDICATOR:()=>yG,CLAUDE_CODE_FORCE_BRIDGE:()=>Pj,CLAUDE_CODE_FORCE_EVALUATE_MEMORY:()=>xj,CLAUDE_CODE_FORCE_FULLSCREEN_UPSELL:()=>Nj,CLAUDE_CODE_FORCE_MEMORY_SURVEY:()=>kj,CLAUDE_CODE_FORCE_TIP_ID:()=>CG,CLAUDE_CODE_GIT_BASH_PATH:()=>bG,CLAUDE_CODE_GIT_CHECK_ONLY_IN_REPOSITORY:()=>Dj,CLAUDE_CODE_GLOB_TIMEOUT_SECONDS:()=>lV,CLAUDE_CODE_GOAL_CHECKIN_MINUTES:()=>dV,CLAUDE_CODE_HIDE_REPLY_SERVER_NAME:()=>RG,CLAUDE_CODE_HIDE_SETTINGS_HINT:()=>DG,CLAUDE_CODE_HOLD_REPORT_PARK_AT_INIT:()=>N$,CLAUDE_CODE_HOME_SEED_HOLD_TIMEOUT_MS:()=>LG,CLAUDE_CODE_HOME_SEED_VERDICT_TIMEOUT_MS:()=>IG,CLAUDE_CODE_HOOK_HEARTBEAT_INTERVAL_MS:()=>O$,CLAUDE_CODE_HOSTED_DESKTOP:()=>Mj,CLAUDE_CODE_HOST_CHECKED_FOLDER:()=>HG,CLAUDE_CODE_HOST_OWNED_CONFIG_DIR:()=>wG,CLAUDE_CODE_HOST_OWNED_SPAWN_ENV:()=>dG,CLAUDE_CODE_HOST_PLATFORM:()=>PG,CLAUDE_CODE_HOST_PROMPT_SUPERSEDES_RECORD:()=>vj,CLAUDE_CODE_HOST_SESSION_ID:()=>xG,CLAUDE_CODE_HOST_SHORT_TEMP_DIRS:()=>NG,CLAUDE_CODE_HOST_SKILL_CATALOG:()=>kG,CLAUDE_CODE_HOST_WORKTREE:()=>MG,CLAUDE_CODE_HOST_WORKTREE_FENCE:()=>UG,CLAUDE_CODE_IDE_HOST_OVERRIDE:()=>FG,CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS:()=>BG,CLAUDE_CODE_IDLE_THRESHOLD_MINUTES:()=>cV,CLAUDE_CODE_IDLE_TOKEN_THRESHOLD:()=>uV,CLAUDE_CODE_IGNORE_PERSISTED_TRUST:()=>TG,CLAUDE_CODE_IS_COWORK:()=>Uj,CLAUDE_CODE_JIT_POLICY_AFTER_STARTUP:()=>s$,CLAUDE_CODE_LAUNCHED_BY_SESSION_IDS:()=>IW,CLAUDE_CODE_LEGACY_BUNDLE:()=>Xz,CLAUDE_CODE_LOOP_KEEPALIVE:()=>Hj,CLAUDE_CODE_LOOP_PERSISTENT:()=>Fj,CLAUDE_CODE_MANAGED_SETTINGS_PATH:()=>zG,CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS:()=>pV,CLAUDE_CODE_MAX_MCP_DESCRIPTION_LENGTH:()=>A1,CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH:()=>fV,CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION:()=>mV,CLAUDE_CODE_MCP_ALLOWLIST_ENV:()=>GG,CLAUDE_CODE_MCP_ALWAYS_LOAD_JOIN_BEFORE_INPUT:()=>E1,CLAUDE_CODE_MCP_APPS_HOST:()=>S1,CLAUDE_CODE_MCP_APPS_NO_TOOL_ROUTE:()=>y1,CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS:()=>a1,CLAUDE_CODE_MCP_CONNECTOR_PREWAIT_MS:()=>l1,CLAUDE_CODE_MCP_MEMORY_CGROUP:()=>K$,CLAUDE_CODE_MCP_NO_REDIAL_AFTER_POLICY_REFUSAL:()=>_1,CLAUDE_CODE_MCP_PREWAIT_SERVERS:()=>u1,CLAUDE_CODE_MCP_PREWAIT_SERVERS_MS:()=>p1,CLAUDE_CODE_MCP_PREWAIT_SERVERS_MS_BY_NAME:()=>f1,CLAUDE_CODE_MCP_SERVE_MEMORY_WALKS_DEADLINE_MS:()=>C$,CLAUDE_CODE_MCP_STARTUP_WAIT_MS:()=>d1,CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT:()=>s1,CLAUDE_CODE_MEMORY_CONTEXT_NO_WAIT:()=>YK,CLAUDE_CODE_MEMORY_SUBAGENT_APPEND:()=>XK,CLAUDE_CODE_MOCK_REMOTE_SETTINGS:()=>Bj,CLAUDE_CODE_MOCK_TRIAL:()=>zj,CLAUDE_CODE_NOTIFICATIONS_HOST:()=>O1,CLAUDE_CODE_OFF_PERSONS_MACHINE:()=>Kj,CLAUDE_CODE_OVERRIDE_DATE:()=>WG,CLAUDE_CODE_PARKED_PERMISSION_WAIT_MS:()=>A$,CLAUDE_CODE_PARKED_RUN_BEFORE_CLEAR:()=>P$,CLAUDE_CODE_PARKED_STOP_RETIRES:()=>w$,CLAUDE_CODE_PERFORCE_MODE:()=>jG,CLAUDE_CODE_PERSONAL_CONFIG_FIX:()=>$G,CLAUDE_CODE_PERSONAL_HOOKS_OFF:()=>VG,CLAUDE_CODE_PLAIN_DELTA_DIRECT_WRITE:()=>a$,CLAUDE_CODE_PLAIN_DELTA_FAST_PATH:()=>i$,CLAUDE_CODE_PLAN_V2_AGENT_COUNT:()=>_V,CLAUDE_CODE_PLAN_V2_EXPLORE_AGENT_COUNT:()=>EV,CLAUDE_CODE_PLUGIN_ATTRIBUTION:()=>YG,CLAUDE_CODE_PLUGIN_CACHE_DIR:()=>JG,CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS:()=>hV,CLAUDE_CODE_PLUGIN_MCPB_DIR:()=>ZG,CLAUDE_CODE_PLUGIN_SEED_DIR:()=>qG,CLAUDE_CODE_POST_TURN_MEMORY:()=>Gj,CLAUDE_CODE_POST_TURN_MEMORY_CONFIG:()=>QG,CLAUDE_CODE_POST_TURN_MEMORY_SYNC:()=>Wj,CLAUDE_CODE_POWERUP_ONBOARDING:()=>eW,CLAUDE_CODE_PROGRAM_USE_CASE_ID:()=>OG,CLAUDE_CODE_PROGRAM_USE_CASE_STAMPED:()=>AG,CLAUDE_CODE_PROJECT_DIR_NAME:()=>tW,CLAUDE_CODE_PWSH_PARSE_TIMEOUT_MS:()=>SV,CLAUDE_CODE_QUESTION_EXTENDED:()=>oW,CLAUDE_CODE_QUESTION_OPTIONAL_DESCRIPTIONS:()=>rW,CLAUDE_CODE_QUESTION_PREVIEW_FORMAT:()=>nW,CLAUDE_CODE_RELAUNCH_HOME_TRUST:()=>sW,CLAUDE_CODE_RELAUNCH_PROACTIVITY_BASELINE:()=>aW,CLAUDE_CODE_RELAUNCH_PROACTIVITY_DECIDED:()=>lW,CLAUDE_CODE_RELAUNCH_PROACTIVITY_EVER_ON:()=>dW,CLAUDE_CODE_RELAUNCH_PROACTIVITY_LEVEL:()=>cW,CLAUDE_CODE_RELAUNCH_RESUME_HINT_FLAGS:()=>uW,CLAUDE_CODE_RELAUNCH_SANDBOX_HOLD:()=>iW,CLAUDE_CODE_RELAUNCH_TERMINAL_SIZE:()=>pW,CLAUDE_CODE_REMOTE:()=>jj,CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPE:()=>fW,CLAUDE_CODE_REMOTE_HERMETIC_MODE:()=>$j,CLAUDE_CODE_REMOTE_MCP_CONFIG:()=>mW,CLAUDE_CODE_REMOTE_MEMORY_DIR:()=>gW,CLAUDE_CODE_REMOTE_RAW_EVENTS_FILE:()=>_W,CLAUDE_CODE_REMOTE_SDK_URL:()=>EW,CLAUDE_CODE_REMOTE_SEND_KEEPALIVES:()=>Vj,CLAUDE_CODE_REMOTE_SESSION_ID:()=>hW,CLAUDE_CODE_REMOTE_SESSION_ORIGIN:()=>yW,CLAUDE_CODE_REMOTE_SETTINGS_PATH:()=>OW,CLAUDE_CODE_REMOTE_SETTINGS_POLL_MS:()=>yV,CLAUDE_CODE_REMOTE_STALL_CHECK_INTERVAL_MS:()=>Yj,CLAUDE_CODE_REPL:()=>Xj,CLAUDE_CODE_REPO_CHECKOUTS:()=>AW,CLAUDE_CODE_REQUIRED_PLUGINS_HOLD:()=>Lj,CLAUDE_CODE_RESTRICTED:()=>Jj,CLAUDE_CODE_RESTRICT_PERSONAL_CONFIG:()=>Zj,CLAUDE_CODE_RESULT_NONCE:()=>Wz,CLAUDE_CODE_RESUME_CACHE_WARM:()=>qj,CLAUDE_CODE_RESUME_FROM_SESSION:()=>CW,CLAUDE_CODE_RESUME_HINT_COMMAND:()=>bW,CLAUDE_CODE_RESUME_INTERRUPTED_TURN:()=>Qj,CLAUDE_CODE_RESUME_INTERRUPTED_TURN_MAX_AGE_MS:()=>o$,CLAUDE_CODE_RESUME_PROMPT:()=>RW,CLAUDE_CODE_RESUME_REASON:()=>l$,CLAUDE_CODE_RESUME_SESSIONSTART_HOOKS_WAIT_MS:()=>r$,CLAUDE_CODE_RESUME_SHOWS_CUT_OFF_CALLS:()=>R$,CLAUDE_CODE_RESUME_SOURCE_ALIVE:()=>e$,CLAUDE_CODE_RESUME_THRESHOLD_MINUTES:()=>OV,CLAUDE_CODE_RESUME_TOKEN_THRESHOLD:()=>AV,CLAUDE_CODE_RESUME_TOLERATES_CONTEXT_APPENDS:()=>b$,CLAUDE_CODE_RESUME_TOLERATES_CONTEXT_SEEDS:()=>T$,CLAUDE_CODE_SAFE_MODE:()=>d$,CLAUDE_CODE_SANDBOXED:()=>u$,CLAUDE_CODE_SCRIPT_CAPS:()=>CV,CLAUDE_CODE_SCROLL_SPEED:()=>TW,CLAUDE_CODE_SDK_MCP_TOOL_IDLE_TIMEOUT:()=>i1,CLAUDE_CODE_SDK_READS_SESSION_STATE:()=>Aj,CLAUDE_CODE_SDK_READS_STARTUP_MARKS:()=>Cj,CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS:()=>bV,CLAUDE_CODE_SESSION_BEGAN_AS_COPY:()=>DW,CLAUDE_CODE_SESSION_CREATED_AT_MS:()=>kW,CLAUDE_CODE_SESSION_ID:()=>LW,CLAUDE_CODE_SESSION_KIND:()=>PW,CLAUDE_CODE_SESSION_NAME:()=>xW,CLAUDE_CODE_SESSION_ORIGIN:()=>NW,CLAUDE_CODE_SESSION_START_ANNOUNCEMENTS_BEFORE_PROMPT:()=>p$,CLAUDE_CODE_SHELL:()=>vW,CLAUDE_CODE_SHELL_PREFIX:()=>MW,CLAUDE_CODE_SHOWN_PLUGINS_DIR:()=>vG,CLAUDE_CODE_SIMPLE:()=>f$,CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT:()=>UW,CLAUDE_CODE_SKILL_ATTRIBUTION:()=>HW,CLAUDE_CODE_SKIP_MCP_DEBUG_LOG_FILES:()=>g1,CLAUDE_CODE_SLEEP_COMPACT:()=>FW,CLAUDE_CODE_SLEEP_COMPACT_AFTER_MS:()=>BW,CLAUDE_CODE_SPARE_DEFER_ALL_MCP:()=>c1,CLAUDE_CODE_SPAWNED_BY_SERVER:()=>UK,CLAUDE_CODE_SPAWN_TIMESTAMP_MS:()=>RV,CLAUDE_CODE_SSE_PORT:()=>TV,CLAUDE_CODE_STALL_TIMEOUT_MS_FOR_TESTING:()=>zW,CLAUDE_CODE_STARTUP_FAILURE_RESULTS:()=>KG,CLAUDE_CODE_STOP_HOOK_BLOCK_CAP:()=>DV,CLAUDE_CODE_SUBPROCESS_ENV_SCRUB:()=>m$,CLAUDE_CODE_SUPERVISED:()=>g$,CLAUDE_CODE_SYNC_PLUGINS_BUFFERED_DOWNLOAD:()=>h$,CLAUDE_CODE_SYNC_PLUGINS_DOWNLOAD_CONCURRENCY:()=>S$,CLAUDE_CODE_SYNC_PLUGINS_DOWNLOAD_STALL_MS:()=>y$,CLAUDE_CODE_SYNC_PLUGINS_INSTALL_TIMEOUT_MS:()=>IV,CLAUDE_CODE_SYNC_PLUGINS_MCP_TIMEOUT_MS:()=>wV,CLAUDE_CODE_SYNC_PLUGIN_INSTALL_TIMEOUT_MS:()=>LV,CLAUDE_CODE_SYNC_REUSE_WITHIN_MS:()=>PV,CLAUDE_CODE_SYNC_SESSION_REFS:()=>k$,CLAUDE_CODE_SYNC_SKILLS_INSTALL_TIMEOUT_MS:()=>xV,CLAUDE_CODE_SYNC_SKILLS_WAIT_TIMEOUT_MS:()=>NV,CLAUDE_CODE_SYNTAX_HIGHLIGHT:()=>v$,CLAUDE_CODE_SYSTEM_PROMPT_FEATURE_FLAG:()=>GW,CLAUDE_CODE_SYSTEM_PROMPT_GB_FEATURE:()=>WW,CLAUDE_CODE_TAGS:()=>KW,CLAUDE_CODE_TASK_LIST_ID:()=>$W,CLAUDE_CODE_TEAM_TEARDOWN_PARK_TIMEOUT_MS:()=>kV,CLAUDE_CODE_TELEPORT_MOVE:()=>j$,CLAUDE_CODE_TERMINAL_MCP_TOOLS:()=>jW,CLAUDE_CODE_TEST_ALLOW_REAL_NETWORK:()=>M$,CLAUDE_CODE_TEST_FIXTURES_ROOT:()=>VW,CLAUDE_CODE_TEST_FORCE_DENY:()=>U$,CLAUDE_CODE_TEST_NO_GIT_BASH:()=>H$,CLAUDE_CODE_TEST_NO_PWSH:()=>F$,CLAUDE_CODE_TMPDIR:()=>YW,CLAUDE_CODE_TMUX_PREFIX:()=>XW,CLAUDE_CODE_TMUX_PREFIX_CONFLICTS:()=>B$,CLAUDE_CODE_TMUX_SESSION:()=>JW,CLAUDE_CODE_TMUX_TRUECOLOR:()=>z$,CLAUDE_CODE_TOOL_MEMORY_CGROUP_EXCLUDE:()=>G$,CLAUDE_CODE_TOOL_MEMORY_LIMIT:()=>W$,CLAUDE_CODE_TOOL_PICTURE_SERVERS:()=>ZW,CLAUDE_CODE_TRANSCRIPT_SLIM_TOOL_RESULTS:()=>t$,CLAUDE_CODE_TRANSCRIPT_TAIL_LOAD:()=>n$,CLAUDE_CODE_TRIGGER_ID:()=>qW,CLAUDE_CODE_TUI_ASKED:()=>V$,CLAUDE_CODE_TUI_JUST_SWITCHED:()=>$$,CLAUDE_CODE_TUI_TRIAL:()=>Y$,CLAUDE_CODE_ULTRAREVIEW_LAUNCH_RECORD:()=>QW,CLAUDE_CODE_ULTRAREVIEW_PREFLIGHT_FIXTURE:()=>tK,CLAUDE_CODE_ULTRAREVIEW_PR_AS_MERGED:()=>eK,CLAUDE_CODE_ULTRAREVIEW_QUOTA_FIXTURE:()=>nK,CLAUDE_CODE_ULTRAREVIEW_REVIEW_MD_FILE:()=>oK,CLAUDE_CODE_UPFRONT_TOOLS:()=>m1,CLAUDE_CODE_USER_DELEGATED_SESSION:()=>rK,CLAUDE_CODE_USER_DELEGATED_SESSION_ALLOWED_CHECK_MODELS:()=>sK,CLAUDE_CODE_USER_DELEGATED_SESSION_ANY_CHECK_MODEL:()=>iK,CLAUDE_CODE_USER_DELEGATED_SESSION_DIRECT_API:()=>aK,CLAUDE_CODE_USER_DIALOG_TIMEOUT_MS:()=>vV,CLAUDE_CODE_VOICE_FORWARD_INTERIMS_TYPED:()=>X$,CLAUDE_CODE_WARN_DISK_FREE_GIB:()=>MV,CLAUDE_CODE_WARN_MEMORY_FREE_GIB:()=>UV,CLAUDE_CODE_WEB_SEARCH_REFILLS_PER_HOUR:()=>gV,CLAUDE_CODE_WITHHOLD_PRODUCT_EVENTS:()=>lK,CLAUDE_CODE_WORKER_CHECKIN_SCHEDULE:()=>dK,CLAUDE_CODE_WORKER_EPOCH:()=>FV,CLAUDE_CODE_WORKSPACE_HOST_PATHS:()=>cK,CLAUDE_CONFIG_DIR:()=>uK,CLAUDE_COWORK_MEMORY_EXTRA_GUIDELINES:()=>pK,CLAUDE_COWORK_MEMORY_GUIDELINES:()=>fK,CLAUDE_COWORK_MEMORY_INDEX_CONTENT:()=>mK,CLAUDE_COWORK_MEMORY_PATH_OVERRIDE:()=>gK,CLAUDE_ENV_FILE:()=>_K,CLAUDE_FORCE_DISPLAY_SURVEY:()=>J$,CLAUDE_INTERNAL_ASSISTANT_TEAM_NAME:()=>EK,CLAUDE_INTERNAL_FC_OVERRIDES:()=>hK,CLAUDE_INTERNAL_SESSION_TASK_LIST_ID:()=>SK,CLAUDE_JOB_DIR:()=>yK,CLAUDE_MEMORY_STORES:()=>OK,CLAUDE_PROJECT_UUID:()=>AK,CLAUDE_PTY_HEARTBEAT_MS:()=>BV,CLAUDE_PTY_HOST_EXEC:()=>CK,CLAUDE_PTY_HOST_NO_STABLE_PATH:()=>bK,CLAUDE_PTY_ORPHAN_CHECK_MS:()=>zV,CLAUDE_RELAUNCH_SESSION_ADD_DIRS:()=>RK,CLAUDE_REMOTE_CONTROL_SESSION_NAME_PREFIX:()=>TK,CLAUDE_REMOTE_WORKFLOW_ARGS:()=>DK,CLAUDE_REMOTE_WORKFLOW_SCRIPT:()=>LK,CLAUDE_RUNNER_ACTIVITY_FD:()=>GV,CLAUDE_RUNNER_ALIVE_EVERY_MS:()=>WV,CLAUDE_RUNNER_CLIENT_PLATFORM:()=>IK,CLAUDE_RUNNER_FETCH_DEPTH:()=>wK,CLAUDE_RUNNER_FETCH_SERVER_PROGRESS_CAP_MS:()=>PK,CLAUDE_RUNNER_OFFERS_NEW_MACHINE:()=>jV,CLAUDE_RUNNER_UPDATE_BIN:()=>KV,CLAUDE_SECURESTORAGE_CONFIG_DIR:()=>xK,CLAUDE_SERVE_DRAIN_TIMEOUT_MS:()=>$V,CLAUDE_SNIP:()=>NK,CLAUDE_SSH_DAEMON_CHILD:()=>vK,CLAUDE_SSH_LOCAL_BINARY:()=>kK,CLAUDE_SSH_RUN_DIR:()=>MK,CLAUDE_SSH_VERSION:()=>HK,CLAUDE_STAGE_FILE_ROOT:()=>FK,CLAUDE_TMPDIR:()=>BK,LOCAL_BRIDGE:()=>Z$,MCP_CONNECTION_NONBLOCKING:()=>q$,MCP_CONNECT_TIMEOUT_MS:()=>VV,MCP_DISCOVERY_CACHE:()=>YV,MCP_DISCOVERY_CACHE_MAX_STALE_S:()=>XV,MCP_DISCOVERY_CACHE_STRIKES:()=>JV,MCP_DISCOVERY_CACHE_TTL_S:()=>ZV,MCP_OAUTH_CALLBACK_PORT:()=>qV,MCP_OAUTH_CLIENT_METADATA_URL:()=>zK,MCP_PROTOCOL_NEGOTIATION:()=>QV,MCP_REMOTE_SERVER_CONNECTION_BATCH_SIZE:()=>e1,MCP_SDK_GENERATION:()=>n1,MCP_SERVER_CONNECTION_BATCH_SIZE:()=>t1,MCP_TIMEOUT:()=>o1,MCP_TOOL_TIMEOUT:()=>r1,MCP_TRUNCATION_PROMPT_OVERRIDE:()=>GK,SANDBOX_OFFICE_PDF_DIR:()=>WK,SANDBOX_OFFICE_PDF_SEND:()=>KK,SDK_NATIVE_BIN:()=>jK,SESSION_INGRESS_URL:()=>$K,SLASH_COMMAND_TOOL_CHAR_BUDGET:()=>C1,SYSTEM_REMINDER_MEMORY_CONTEXT:()=>VK,TEST_ENABLE_SESSION_PERSISTENCE:()=>Q$,ULTRAPLAN_PROMPT_FILE:()=>JK,VCR_RECORD:()=>eV,VITALS_EMITTER_BIN:()=>ZK,VOICE_STREAM_BASE_URL:()=>qK});var Od={};G(Od,{ANTHROPIC_CUSTOM_MODEL_OPTION:()=>j1,ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION:()=>V1,ANTHROPIC_CUSTOM_MODEL_OPTION_NAME:()=>$1,ANTHROPIC_DEFAULT_FABLE_MODEL:()=>D1,ANTHROPIC_DEFAULT_FABLE_MODEL_DESCRIPTION:()=>I1,ANTHROPIC_DEFAULT_FABLE_MODEL_NAME:()=>L1,ANTHROPIC_DEFAULT_HAIKU_MODEL:()=>M1,ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION:()=>H1,ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME:()=>U1,ANTHROPIC_DEFAULT_MODEL:()=>R1,ANTHROPIC_DEFAULT_OPUS_MODEL:()=>w1,ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION:()=>x1,ANTHROPIC_DEFAULT_OPUS_MODEL_NAME:()=>P1,ANTHROPIC_DEFAULT_SONNET_MODEL:()=>N1,ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION:()=>v1,ANTHROPIC_DEFAULT_SONNET_MODEL_NAME:()=>k1,ANTHROPIC_MODEL:()=>b1,ANTHROPIC_SMALL_FAST_MODEL:()=>T1,CLAUDE_CODE_3P_PROBE_WROTE_HAIKU_DEFAULT:()=>z1,CLAUDE_CODE_3P_PROBE_WROTE_OPUS_DEFAULT:()=>B1,CLAUDE_CODE_3P_PROBE_WROTE_SONNET_DEFAULT:()=>F1,CLAUDE_CODE_3P_SEEDED_OPUS_DEFAULT:()=>W1,CLAUDE_CODE_3P_SEEDED_SONNET_DEFAULT:()=>G1,CLAUDE_CODE_ALLOW_OTHER_MODELS:()=>_Y,CLAUDE_CODE_ALWAYS_ENABLE_EFFORT:()=>iY,CLAUDE_CODE_AUTO_MODE_MODEL:()=>q1,CLAUDE_CODE_BG_CLASSIFIER_MODEL:()=>Q1,CLAUDE_CODE_CLIENT_DATA_URL:()=>gY,CLAUDE_CODE_DISABLE_1M_CONTEXT:()=>uY,CLAUDE_CODE_DISABLE_EXPLORE_INHERIT_CAP:()=>oY,CLAUDE_CODE_DISABLE_FAST_MODE:()=>lY,CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP:()=>rY,CLAUDE_CODE_DISABLE_MODEL_ACCESS_FALLBACK:()=>nY,CLAUDE_CODE_DISABLE_UNKNOWN_MODEL_WINDOW_ENFORCEMENT:()=>pY,CLAUDE_CODE_EFFORT_LEVEL:()=>sY,CLAUDE_CODE_MAX_EFFORT_REMINDER:()=>aY,CLAUDE_CODE_MODEL_CATALOG:()=>fY,CLAUDE_CODE_MODEL_CATALOG_URL:()=>mY,CLAUDE_CODE_NO_MODEL_FALLBACK:()=>tY,CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS:()=>dY,CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECK:()=>cY,CLAUDE_CODE_SKIP_MODEL_ACCESS_MEMORY:()=>K1,CLAUDE_CODE_SUBAGENT_EFFORT:()=>X1,CLAUDE_CODE_SUBAGENT_MODEL:()=>Y1,CLAUDE_CODE_SUBAGENT_MODEL_FORCE:()=>J1,CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL:()=>Z1,FALLBACK_FOR_ALL_PRIMARY_MODELS:()=>eY});var Ad={};G(Ad,{ALL_PROXY:()=>CY,ANTHROPIC_BETAS:()=>NY,ANTHROPIC_CUSTOM_HEADERS:()=>kY,API_FORCE_IDLE_TIMEOUT:()=>e2,API_TIMEOUT_MS:()=>XY,CLAUDE_BYTE_STREAM_IDLE_TIMEOUT_MS:()=>_2,CLAUDE_CODE_ATTRIBUTION_HEADER:()=>UY,CLAUDE_CODE_CERT_STORE:()=>wY,CLAUDE_CODE_CLIENT_CERT:()=>RY,CLAUDE_CODE_CLIENT_KEY:()=>TY,CLAUDE_CODE_CLIENT_KEY_PASSPHRASE:()=>DY,CLAUDE_CODE_DISABLE_LOOPED_CROSS_CERT_DROP:()=>PY,CLAUDE_CODE_DISABLE_MTLS_RELOAD_ON_STALE_CONNECTION:()=>LY,CLAUDE_CODE_DISABLE_PROXY_SCHEME_REPAIR:()=>IY,CLAUDE_CODE_DISABLE_SELF_NAMED_CERT_DROP:()=>xY,CLAUDE_CODE_EAGER_FLUSH:()=>b2,CLAUDE_CODE_EXTRA_BODY:()=>vY,CLAUDE_CODE_EXTRA_METADATA:()=>MY,CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS:()=>zY,CLAUDE_CODE_FILE_READ_MAX_PDF_PAGES_PER_MESSAGE:()=>GY,CLAUDE_CODE_FILE_READ_MAX_PDF_PAGES_PER_TURN:()=>WY,CLAUDE_CODE_FORCE_SYNC_OUTPUT:()=>R2,CLAUDE_CODE_GZIP_CCR_REQUEST_BODIES:()=>s2,CLAUDE_CODE_GZIP_DATADOG_LOGS:()=>i2,CLAUDE_CODE_GZIP_REQUEST_BODIES:()=>r2,CLAUDE_CODE_GZIP_REQUEST_BODY_BLOCKS:()=>l2,CLAUDE_CODE_GZIP_REQUEST_BODY_LEVEL:()=>a2,CLAUDE_CODE_INCREMENTAL_REQUEST_BODY:()=>d2,CLAUDE_CODE_MAIN_REPLY_HOLD_MS:()=>u2,CLAUDE_CODE_MAX_CONTEXT_TOKENS:()=>BY,CLAUDE_CODE_MAX_OUTPUT_TOKENS:()=>FY,CLAUDE_CODE_MAX_RETRIES:()=>HY,CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY:()=>KY,CLAUDE_CODE_MAX_TURNS:()=>jY,CLAUDE_CODE_NONSTREAMING_TIMEOUT_RETRIES:()=>JY,CLAUDE_CODE_OVERLOADED_RETRY_BASE_DELAY_MS:()=>ZY,CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS:()=>qY,CLAUDE_CODE_OVERLOADED_RETRY_MAX_WAIT_MS:()=>QY,CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS:()=>L2,CLAUDE_CODE_RETRY_WATCHDOG:()=>S2,CLAUDE_CODE_RETRY_WATCHDOG_MAX_USAGE_LIMIT_WAIT_MS:()=>O2,CLAUDE_CODE_RETRY_WATCHDOG_MAX_WAIT_MS:()=>y2,CLAUDE_CODE_RETRY_WATCHDOG_SCOPE:()=>C2,CLAUDE_CODE_RETRY_WATCHDOG_USAGE_LIMIT_RECHECK_MS:()=>A2,CLAUDE_CODE_SLOW_OPERATION_THRESHOLD_MS:()=>D2,CLAUDE_CODE_STREAM_EVENT_HOLD_MS:()=>p2,CLAUDE_CODE_STREAM_EVENT_MAX_LINE_BYTES:()=>f2,CLAUDE_CODE_STREAM_EVENT_NO_SUBSCRIBER_HOLD_MS:()=>m2,CLAUDE_CODE_UNWATCHED_REPLY_HOLD_MS:()=>c2,CLAUDE_ENABLE_BYTE_WATCHDOG:()=>t2,CLAUDE_ENABLE_BYTE_WATCHDOG_BEDROCK:()=>n2,CLAUDE_ENABLE_STREAM_WATCHDOG:()=>o2,CLAUDE_MOCK_HEADERLESS_429:()=>T2,CLAUDE_SLOW_FIRST_BYTE_MS:()=>h2,CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS:()=>E2,CLAUDE_STREAM_IDLE_TIMEOUT_MS:()=>g2,HTTPS_PROXY:()=>hY,HTTP_PROXY:()=>EY,MAX_MCP_OUTPUT_TOKENS:()=>YY,MAX_STRUCTURED_OUTPUT_RETRIES:()=>VY,MAX_THINKING_TOKENS:()=>$Y,NO_PROXY:()=>SY,all_proxy:()=>bY,http_proxy:()=>yY,https_proxy:()=>OY,no_proxy:()=>AY});var Cd={};G(Cd,{AGENT_PROXY_URL:()=>qX,ANTHROPIC_AWS_BASE_URL:()=>G2,ANTHROPIC_AWS_WORKSPACE_ID:()=>W2,ANTHROPIC_BASE_URL:()=>v2,ANTHROPIC_BEDROCK_BASE_URL:()=>H2,ANTHROPIC_BEDROCK_MANTLE_BASE_URL:()=>z2,ANTHROPIC_BEDROCK_REGION_PREFIX:()=>F2,ANTHROPIC_BEDROCK_SERVICE_TIER:()=>B2,ANTHROPIC_FOUNDRY_BASE_URL:()=>Z2,ANTHROPIC_FOUNDRY_RESOURCE:()=>q2,ANTHROPIC_GOOGLE_CLOUD_BASE_URL:()=>V2,ANTHROPIC_GOOGLE_CLOUD_LOCATION:()=>j2,ANTHROPIC_GOOGLE_CLOUD_PROJECT:()=>K2,ANTHROPIC_GOOGLE_CLOUD_WORKSPACE_ID:()=>$2,ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION:()=>pX,ANTHROPIC_UNIX_SOCKET:()=>fX,ANTHROPIC_VERTEX_BASE_URL:()=>Y2,ANTHROPIC_VERTEX_PROJECT_ID:()=>X2,AWS_ACCESS_KEY_ID:()=>rX,AWS_CONFIG_FILE:()=>nX,AWS_DEFAULT_REGION:()=>eX,AWS_ENDPOINT_URL:()=>aX,AWS_ENDPOINT_URL_BEDROCK:()=>lX,AWS_ENDPOINT_URL_BEDROCK_RUNTIME:()=>dX,AWS_ENDPOINT_URL_STS:()=>cX,AWS_PROFILE:()=>tX,AWS_REGION:()=>Q2,AWS_SECRET_ACCESS_KEY:()=>sX,AWS_SESSION_TOKEN:()=>iX,AWS_SHARED_CREDENTIALS_FILE:()=>oX,AWS_USE_FIPS_ENDPOINT:()=>uX,CACERT_UPDATES:()=>BX,CCR_AGENT_PROXY_CA_CERT_B64:()=>jX,CCR_AGENT_PROXY_CA_WATCH_ENABLED:()=>$X,CCR_AGENT_PROXY_CONNECTION_LIMITS_DISABLED:()=>HX,CCR_AGENT_PROXY_ENABLED:()=>LX,CCR_AGENT_PROXY_FRAME_HOSTS:()=>YX,CCR_AGENT_PROXY_INCLUDE_HOSTS:()=>kX,CCR_AGENT_PROXY_JAVA_STORE_DIRECT_DISABLED:()=>FX,CCR_AGENT_PROXY_MAX_BUSY_TUNNELS:()=>UX,CCR_AGENT_PROXY_NO_PROXY_LOCAL_ONLY:()=>KX,CCR_AGENT_PROXY_NSS_RECORDS_DISABLED:()=>VX,CCR_AGENT_PROXY_RECEIVE_GATE_DISABLED:()=>vX,CCR_AGENT_PROXY_RELAY_MODE:()=>xX,CCR_AGENT_PROXY_UPLOAD_GATE_DISABLED:()=>MX,CCR_ENABLE_BUNDLE:()=>XX,CCR_FORCE_BUNDLE:()=>JX,CCR_ON_BRANCH_DEFAULT_GUARD:()=>ZX,CLAUDE_CODE_AGENT_PROXY_GH_SHIM:()=>wX,CLAUDE_CODE_AGENT_PROXY_GIT_CONFIG:()=>IX,CLAUDE_CODE_AGENT_PROXY_GIT_HOSTS:()=>PX,CLAUDE_CODE_API_BASE_URL:()=>U2,CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY:()=>bX,CLAUDE_CODE_FEATURE_FLAGS_REFRESH_INTERVAL_MS:()=>DX,CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS:()=>RX,CLAUDE_CODE_GB_BASE_URL:()=>TX,CLAUDE_CODE_HOST_GATEWAY_LINEAGE:()=>gX,CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST:()=>mX,CLAUDE_CODE_PROXY_RESOLVES_HOSTS:()=>EX,CLAUDE_CODE_SIMULATE_PROXY_USAGE:()=>_X,CLAUDE_CODE_SKIP_HFI_VERSION_CHECK:()=>QX,CLAUDE_CODE_USE_ANTHROPIC_AWS:()=>x2,CLAUDE_CODE_USE_ANTHROPIC_GOOGLE_CLOUD:()=>N2,CLAUDE_CODE_USE_BEDROCK:()=>I2,CLAUDE_CODE_USE_FOUNDRY:()=>P2,CLAUDE_CODE_USE_GATEWAY:()=>hX,CLAUDE_CODE_USE_MANTLE:()=>k2,CLAUDE_CODE_USE_VERTEX:()=>w2,CLAUDE_GATEWAY_ALLOW_LOOPBACK:()=>SX,CLAUDE_GATEWAY_DRAIN_TIMEOUT_MS:()=>CX,CLAUDE_GATEWAY_LOG_FORMAT:()=>AX,CLAUDE_GATEWAY_LOG_LEVEL:()=>OX,CLAUDE_GATEWAY_PROXY_IS_EGRESS_BOUNDARY:()=>yX,CLOUD_ML_REGION:()=>J2,DPKG_ADMINDIR:()=>GX,DPKG_MAINTSCRIPT_PACKAGE:()=>zX,DPKG_ROOT:()=>WX,SELF_HOSTED_RUNNER_AGENT_PROXY_URL:()=>NX,_CLAUDE_CODE_ASSUME_FIRST_PARTY_BASE_URL:()=>M2});var Pa={};G(Pa,{default:()=>Ys});import{resolve as dne}from"path";import{execFile as jA}from"child_process";function rd(i){if(i===void 0)return!1;if(/^[A-Za-z]:[\\/](?![\\/])/.test(i))return!0;return process.platform!=="win32"&&i.startsWith("/")&&!i.startsWith("//")}function fp(i){return rd(i)?i:"C:\\Windows"}import{accessSync as $A,closeSync as VA,constants as YA,openSync as XA,readSync as JA,realpathSync as ZA}from"fs";import{userInfo as KA}from"os";var ws=["remote_cowork","remote_cowork_trigger"];var mp="com.anthropic.claudecode",Fi="HKLM\\SOFTWARE\\Policies\\ClaudeCode",Bi="HKCU\\SOFTWARE\\Policies\\ClaudeCode",Ps="Settings",id="/usr/bin/plutil",gp=["-convert","json","-o","-","--"],_p=["-lint","-s","--"],zi=5000,Ep=60000,xs=2097152,Po="/mnt/c/Windows/System32/reg.exe",hp="\\\\?\\GLOBALROOT\\SystemRoot",Sp="unable to find the specified registry key or value",En="/mnt/c/Program Files/ClaudeCode",sd=a({isCoworkCloud:void 0},(i)=>{i.isCoworkCloud=void 0});function ad(){if(sd.isCoworkCloud===void 0){let i=process.env.CLAUDE_CODE_ENTRYPOINT;sd.isCoworkCloud=ws.some((c)=>c===i)}return sd.isCoworkCloud}function or(){if(process.platform!=="linux")return!1;let i=ad();if(process.env.WSL_DISTRO_NAME&&!i)return!0;try{let c=tr("fs").readFileSync("/proc/version","utf8").toLowerCase();return Me(c)}catch{return!1}}var ld="per-user managed preferences";function yp(){let i="";try{i=KA().username}catch{}let c=[];if(i)c.push({path:`/Library/Managed Preferences/${i}/${mp}.plist`,label:ld});return c.push({path:`/Library/Managed Preferences/${mp}.plist`,label:"device-level managed preferences"}),c}var Rp=new Set(["EAGAIN","EMFILE","ENFILE","ENOMEM"]);class Tp{promise=null;start(){if(this.promise)return;this.promise=Ki()}reset(){this.promise=null}}var qA=new Tp;function QA(i){if(!i)return{status:"ok",exitCode:0,errno:null,signal:null};let c=i,T=typeof c.signal==="string"&&c.signal?c.signal:null;if(typeof c.code==="string")return{status:"spawn_error",exitCode:null,errno:c.code,signal:null};if(c.killed===!0)return{status:"timeout",exitCode:null,errno:null,signal:T};if(T)return{status:"killed",exitCode:null,errno:null,signal:T};return{status:"exited",exitCode:typeof c.code==="number"?c.code:null,errno:null,signal:null}}function Gi(i,c,T,D){let w=Date.now();return new Promise((v)=>{try{jA(i,c,{encoding:"utf-8",timeout:zi,windowsHide:!0,...T!==void 0&&{maxBuffer:T},...D},(U,B,K)=>{v({stdout:B??"",stderr:K??"",...QA(U),durationMs:Date.now()-w})})}catch(U){let B=U.code;v({stdout:"",stderr:"",status:"spawn_error",exitCode:null,errno:typeof B==="string"?B:null,signal:null,durationMs:Date.now()-w})}})}function Op(i){return{status:i.status,exitCode:i.exitCode,errno:i.errno,signal:i.signal,durationMs:i.durationMs,answered:i.status==="ok"||i.status==="exited"&&i.exitCode===1&&i.stderr.includes(Sp)}}function Wi(i){return!i.answered&&!(i.status==="exited"&&i.exitCode===1)&&!(i.status==="spawn_error"&&(i.errno===null||!Rp.has(i.errno)))}function Ap(i){return i.status==="ok"||i.status==="exited"&&i.exitCode!==null}function Dp(i){return i.status==="spawn_error"&&i.errno==="ERR_CHILD_PROCESS_STDIO_MAXBUFFER"}function Cp(i){if(Dp(i))return{unreadReason:"plutil's output exceeded the size limit",unreadCause:"oversize"};switch(i.status){case"timeout":return{unreadReason:`plutil timed out after ${zi/1000} seconds`,unreadCause:"timeout"};case"killed":return{unreadReason:"plutil was stopped by a signal",unreadCause:"killed"};case"spawn_error":return{unreadReason:"plutil could not be run",unreadCause:i.errno!==null&&Rp.has(i.errno)?"spawn_busy":"spawn_error"};case"ok":case"exited":return{unreadReason:"plutil did not finish"}}}function eC(i){let c;try{return c=XA(i,"r"),JA(c,Buffer.alloc(1),0,1,0),null}catch(T){return{code:T&&typeof T==="object"&&"code"in T?T.code:void 0,message:T instanceof Error?T.message:String(T)}}finally{if(c!==void 0)try{VA(c)}catch{}}}function Ki(i=!1){return(async()=>{if(process.platform==="darwin"){let c=yp(),D=(await Promise.all(c.map(async({path:v,...U})=>{try{$A(v,YA.R_OK)}catch(pe){let me=pe&&typeof pe==="object"&&"code"in pe?pe.code:void 0;if(me==="ENOENT"||me==="ENOTDIR")return null;return{stdout:null,unreadReason:pe instanceof Error?pe.message:String(pe),...typeof me==="string"&&{unreadErrno:me},...U}}let B=await Gi(id,[...gp,v],xs);if(!Ap(B))return{stdout:null,...Cp(B),...U};if(B.status==="ok")return{stdout:B.stdout,...U};let K=await Gi(id,[..._p,v]);if(!Ap(K)){let{unreadReason:pe,unreadCause:me}=Cp(K),Pe=me==="timeout"||me==="killed"||me==="spawn_busy"?"lint_unfinished":me;return{stdout:null,unreadReason:`plutil rejected the conversion, and in the check that follows ${pe}`,unreadCause:Pe,...U}}if(K.status==="ok")return{stdout:null,unreadReason:"it holds a value plutil cannot convert to JSON (a date or data value)",unreadCause:"unconvertible",...U};let de=eC(v);if(de!==null){if(de.code==="ENOENT"||de.code==="ENOTDIR")return null;return{stdout:null,unreadReason:de.message,...typeof de.code==="string"&&{unreadErrno:de.code},...U}}return{stdout:"",...U}}))).filter((v)=>v!==null),w=D.findIndex((v)=>v.stdout!==null);return{plistStdouts:w===-1?D:D.slice(0,w+1),hklmStdout:null,hkcuStdout:null,outcomes:{hklm:null,hkcu:null}}}if(process.platform==="win32"){let c;try{c=ZA.native(hp).replace(/^\\\\\?\\/,"")}catch{c=void 0}let T=rd(c),D=fp(T?c:process.env.SYSTEMROOT),w=`${D}\\System32`,v={SystemRoot:D,windir:D};return bp((U)=>Gi(`${w}\\reg.exe`,U,xs,T?{cwd:w,env:v}:void 0),i)}if(or())return bp((c)=>Gi(Po,c,xs),i);return{plistStdouts:null,hklmStdout:null,hkcuStdout:null,outcomes:{hklm:null,hkcu:null}}})()}async function bp(i,c){let T=(U)=>i(["query",U,"/v",Ps]),[D,w]=await Promise.all([T(Fi),T(Bi)]),v=Op(D);return{plistStdouts:null,hklmStdout:D.status==="ok"?D.stdout:null,...Dp(D)&&{hklmUnreadReason:`the value exceeds ${xs/1048576} MiB`},hkcuStdout:w.status==="ok"?w.stdout:null,outcomes:{hklm:v,hkcu:Op(w)}}}function Lp(){return qA.promise}function tC(i,c){var T=-1,D=i==null?0:i.length,w=Array(D);while(++T<D)w[T]=c(i[T],T,i);return w}var Lr=tC;function nC(){this.__data__=[],this.size=0}var Ip=nC;function oC(i,c){return i===c||i!==i&&c!==c}var fo=oC;function rC(i,c){var T=i.length;while(T--)if(fo(i[T][0],c))return T;return-1}var xo=rC;var sC=Array.prototype,iC=sC.splice;function aC(i){var c=this.__data__,T=xo(c,i);if(T<0)return!1;var D=c.length-1;if(T==D)c.pop();else iC.call(c,T,1);return--this.size,!0}var wp=aC;function lC(i){var c=this.__data__,T=xo(c,i);return T<0?void 0:c[T][1]}var Pp=lC;function dC(i){return xo(this.__data__,i)>-1}var xp=dC;function cC(i,c){var T=this.__data__,D=xo(T,i);if(D<0)++this.size,T.push([i,c]);else T[D][1]=c;return this}var Np=cC;function Ir(i){var c=-1,T=i==null?0:i.length;this.clear();while(++c<T){var D=i[c];this.set(D[0],D[1])}}Ir.prototype.clear=Ip;Ir.prototype.delete=wp;Ir.prototype.get=Pp;Ir.prototype.has=xp;Ir.prototype.set=Np;var No=Ir;function uC(){this.__data__=new No,this.size=0}var kp=uC;function pC(i){var c=this.__data__,T=c.delete(i);return this.size=c.size,T}var vp=pC;function fC(i){return this.__data__.get(i)}var Mp=fC;function mC(i){return this.__data__.has(i)}var Up=mC;var gC=typeof global=="object"&&global&&global.Object===Object&&global,ji=gC;var _C=typeof self=="object"&&self&&self.Object===Object&&self,EC=ji||_C||Function("return this")(),Kt=EC;var hC=Kt.Symbol,rn=hC;var Hp=Object.prototype,{hasOwnProperty:SC,toString:yC}=Hp,Ns=rn?rn.toStringTag:void 0;function OC(i){var c=SC.call(i,Ns),T=i[Ns];try{i[Ns]=void 0;var D=!0}catch(v){}var w=yC.call(i);if(D)if(c)i[Ns]=T;else delete i[Ns];return w}var Fp=OC;var AC=Object.prototype,CC=AC.toString;function bC(i){return CC.call(i)}var Bp=bC;var RC="[object Null]",TC="[object Undefined]",zp=rn?rn.toStringTag:void 0;function DC(i){if(i==null)return i===void 0?TC:RC;return zp&&zp in Object(i)?Fp(i):Bp(i)}var kn=DC;function LC(i){var c=typeof i;return i!=null&&(c=="object"||c=="function")}var Wt=LC;var IC="[object AsyncFunction]",wC="[object Function]",PC="[object GeneratorFunction]",xC="[object Proxy]";function NC(i){if(!Wt(i))return!1;var c=kn(i);return c==wC||c==PC||c==IC||c==xC}var wr=NC;var kC=Kt["__core-js_shared__"],$i=kC;var Gp=function(){var i=/[^.]+$/.exec($i&&$i.keys&&$i.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}();function vC(i){return!!Gp&&Gp in i}var Wp=vC;var MC=Function.prototype,UC=MC.toString;function HC(i){if(i!=null){try{return UC.call(i)}catch(c){}try{return i+""}catch(c){}}return""}var Co=HC;var FC=/[\\^$.*+?()[\]{}|]/g,BC=/^\[object .+?Constructor\]$/,zC=Function.prototype,GC=Object.prototype,WC=zC.toString,KC=GC.hasOwnProperty,jC=RegExp("^"+WC.call(KC).replace(FC,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function $C(i){if(!Wt(i)||Wp(i))return!1;var c=wr(i)?jC:BC;return c.test(Co(i))}var Kp=$C;function VC(i,c){return i==null?void 0:i[c]}var jp=VC;function YC(i,c){var T=jp(i,c);return Kp(T)?T:void 0}var Tn=YC;var XC=Tn(Kt,"Map"),ko=XC;var JC=Tn(Object,"create"),bo=JC;function ZC(){this.__data__=bo?bo(null):{},this.size=0}var $p=ZC;function qC(i){var c=this.has(i)&&delete this.__data__[i];return this.size-=c?1:0,c}var Vp=qC;var QC="__lodash_hash_undefined__",eb=Object.prototype,tb=eb.hasOwnProperty;function nb(i){var c=this.__data__;if(bo){var T=c[i];return T===QC?void 0:T}return tb.call(c,i)?c[i]:void 0}var Yp=nb;var ob=Object.prototype,rb=ob.hasOwnProperty;function sb(i){var c=this.__data__;return bo?c[i]!==void 0:rb.call(c,i)}var Xp=sb;var ib="__lodash_hash_undefined__";function ab(i,c){var T=this.__data__;return this.size+=this.has(i)?0:1,T[i]=bo&&c===void 0?ib:c,this}var Jp=ab;function Pr(i){var c=-1,T=i==null?0:i.length;this.clear();while(++c<T){var D=i[c];this.set(D[0],D[1])}}Pr.prototype.clear=$p;Pr.prototype.delete=Vp;Pr.prototype.get=Yp;Pr.prototype.has=Xp;Pr.prototype.set=Jp;var dd=Pr;function lb(){this.size=0,this.__data__={hash:new dd,map:new(ko||No),string:new dd}}var Zp=lb;function db(i){var c=typeof i;return c=="string"||c=="number"||c=="symbol"||c=="boolean"?i!=="__proto__":i===null}var qp=db;function cb(i,c){var T=i.__data__;return qp(c)?T[typeof c=="string"?"string":"hash"]:T.map}var vo=cb;function ub(i){var c=vo(this,i).delete(i);return this.size-=c?1:0,c}var Qp=ub;function pb(i){return vo(this,i).get(i)}var ef=pb;function fb(i){return vo(this,i).has(i)}var tf=fb;function mb(i,c){var T=vo(this,i),D=T.size;return T.set(i,c),this.size+=T.size==D?0:1,this}var nf=mb;function xr(i){var c=-1,T=i==null?0:i.length;this.clear();while(++c<T){var D=i[c];this.set(D[0],D[1])}}xr.prototype.clear=Zp;xr.prototype.delete=Qp;xr.prototype.get=ef;xr.prototype.has=tf;xr.prototype.set=nf;var rr=xr;var gb=200;function _b(i,c){var T=this.__data__;if(T instanceof No){var D=T.__data__;if(!ko||D.length<gb-1)return D.push([i,c]),this.size=++T.size,this;T=this.__data__=new rr(D)}return T.set(i,c),this.size=T.size,this}var of=_b;function Nr(i){var c=this.__data__=new No(i);this.size=c.size}Nr.prototype.clear=kp;Nr.prototype.delete=vp;Nr.prototype.get=Mp;Nr.prototype.has=Up;Nr.prototype.set=of;var mo=Nr;var Eb="__lodash_hash_undefined__";function hb(i){return this.__data__.set(i,Eb),this}var rf=hb;function Sb(i){return this.__data__.has(i)}var sf=Sb;function Vi(i){var c=-1,T=i==null?0:i.length;this.__data__=new rr;while(++c<T)this.add(i[c])}Vi.prototype.add=Vi.prototype.push=rf;Vi.prototype.has=sf;var Yi=Vi;function yb(i,c){var T=-1,D=i==null?0:i.length;while(++T<D)if(c(i[T],T,i))return!0;return!1}var af=yb;function Ob(i,c){return i.has(c)}var Xi=Ob;var Ab=1,Cb=2;function bb(i,c,T,D,w,v){var U=T&Ab,B=i.length,K=c.length;if(B!=K&&!(U&&K>B))return!1;var de=v.get(i),pe=v.get(c);if(de&&pe)return de==c&&pe==i;var me=-1,Ae=!0,Pe=T&Cb?new Yi:void 0;v.set(i,c),v.set(c,i);while(++me<B){var Re=i[me],xe=c[me];if(D)var ke=U?D(xe,Re,me,c,i,v):D(Re,xe,me,i,c,v);if(ke!==void 0){if(ke)continue;Ae=!1;break}if(Pe){if(!af(c,function(Te,Fe){if(!Xi(Pe,Fe)&&(Re===Te||w(Re,Te,T,D,v)))return Pe.push(Fe)})){Ae=!1;break}}else if(!(Re===xe||w(Re,xe,T,D,v))){Ae=!1;break}}return v.delete(i),v.delete(c),Ae}var Ji=bb;var Rb=Kt.Uint8Array,kr=Rb;function Tb(i){var c=-1,T=Array(i.size);return i.forEach(function(D,w){T[++c]=[w,D]}),T}var lf=Tb;function Db(i){var c=-1,T=Array(i.size);return i.forEach(function(D){T[++c]=D}),T}var vr=Db;var Lb=1,Ib=2,wb="[object Boolean]",Pb="[object Date]",xb="[object Error]",Nb="[object Map]",kb="[object Number]",vb="[object RegExp]",Mb="[object Set]",Ub="[object String]",Hb="[object Symbol]",Fb="[object ArrayBuffer]",Bb="[object DataView]",df=rn?rn.prototype:void 0,cd=df?df.valueOf:void 0;function zb(i,c,T,D,w,v,U){switch(T){case Bb:if(i.byteLength!=c.byteLength||i.byteOffset!=c.byteOffset)return!1;i=i.buffer,c=c.buffer;case Fb:if(i.byteLength!=c.byteLength||!v(new kr(i),new kr(c)))return!1;return!0;case wb:case Pb:case kb:return fo(+i,+c);case xb:return i.name==c.name&&i.message==c.message;case vb:case Ub:return i==c+"";case Nb:var B=lf;case Mb:var K=D&Lb;if(B||(B=vr),i.size!=c.size&&!K)return!1;var de=U.get(i);if(de)return de==c;D|=Ib,U.set(i,c);var pe=Ji(B(i),B(c),D,w,v,U);return U.delete(i),pe;case Hb:if(cd)return cd.call(i)==cd.call(c)}return!1}var cf=zb;function Gb(i,c){var T=-1,D=c.length,w=i.length;while(++T<D)i[w+T]=c[T];return i}var Mr=Gb;var Wb=Array.isArray,kt=Wb;function Kb(i,c,T){var D=c(i);return kt(i)?D:Mr(D,T(i))}var Zi=Kb;function jb(i,c){var T=-1,D=i==null?0:i.length,w=0,v=[];while(++T<D){var U=i[T];if(c(U,T,i))v[w++]=U}return v}var uf=jb;function $b(){return[]}var qi=$b;var Vb=Object.prototype,Yb=Vb.propertyIsEnumerable,pf=Object.getOwnPropertySymbols,Xb=!pf?qi:function(i){if(i==null)return[];return i=Object(i),uf(pf(i),function(c){return Yb.call(i,c)})},Ur=Xb;function Jb(i,c){var T=-1,D=Array(i);while(++T<i)D[T]=c(T);return D}var ff=Jb;function Zb(i){return i!=null&&typeof i=="object"}var tn=Zb;var qb="[object Arguments]";function Qb(i){return tn(i)&&kn(i)==qb}var ud=Qb;var mf=Object.prototype,{hasOwnProperty:eR,propertyIsEnumerable:tR}=mf,nR=ud(function(){return arguments}())?ud:function(i){return tn(i)&&eR.call(i,"callee")&&!tR.call(i,"callee")},no=nR;function oR(){return!1}var gf=oR;var hf=typeof ea=="object"&&ea&&!ea.nodeType&&ea,_f=hf&&typeof Qi=="object"&&Qi&&!Qi.nodeType&&Qi,rR=_f&&_f.exports===hf,Ef=rR?Kt.Buffer:void 0,sR=Ef?Ef.isBuffer:void 0,iR=sR||gf,Yn=iR;var aR=9007199254740991,lR=/^(?:0|[1-9]\d*)$/;function dR(i,c){var T=typeof i;return c=c==null?aR:c,!!c&&(T=="number"||T!="symbol"&&lR.test(i))&&(i>-1&&i%1==0&&i<c)}var Mo=dR;var cR=9007199254740991;function uR(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=cR}var Hr=uR;var pR="[object Arguments]",fR="[object Array]",mR="[object Boolean]",gR="[object Date]",_R="[object Error]",ER="[object Function]",hR="[object Map]",SR="[object Number]",yR="[object Object]",OR="[object RegExp]",AR="[object Set]",CR="[object String]",bR="[object WeakMap]",RR="[object ArrayBuffer]",TR="[object DataView]",DR="[object Float32Array]",LR="[object Float64Array]",IR="[object Int8Array]",wR="[object Int16Array]",PR="[object Int32Array]",xR="[object Uint8Array]",NR="[object Uint8ClampedArray]",kR="[object Uint16Array]",vR="[object Uint32Array]",Ht={};Ht[DR]=Ht[LR]=Ht[IR]=Ht[wR]=Ht[PR]=Ht[xR]=Ht[NR]=Ht[kR]=Ht[vR]=!0;Ht[pR]=Ht[fR]=Ht[RR]=Ht[mR]=Ht[TR]=Ht[gR]=Ht[_R]=Ht[ER]=Ht[hR]=Ht[SR]=Ht[yR]=Ht[OR]=Ht[AR]=Ht[CR]=Ht[bR]=!1;function MR(i){return tn(i)&&Hr(i.length)&&!!Ht[kn(i)]}var Sf=MR;function UR(i){return function(c){return i(c)}}var Fr=UR;var yf=typeof na=="object"&&na&&!na.nodeType&&na,ks=yf&&typeof ta=="object"&&ta&&!ta.nodeType&&ta,HR=ks&&ks.exports===yf,pd=HR&&ji.process,FR=function(){try{var i=ks&&ks.require&&ks.require("util").types;if(i)return i;return pd&&pd.binding&&pd.binding("util")}catch(c){}}(),go=FR;var Of=go&&go.isTypedArray,BR=Of?Fr(Of):Sf,Uo=BR;var zR=Object.prototype,GR=zR.hasOwnProperty;function WR(i,c){var T=kt(i),D=!T&&no(i),w=!T&&!D&&Yn(i),v=!T&&!D&&!w&&Uo(i),U=T||D||w||v,B=U?ff(i.length,String):[],K=B.length;for(var de in i)if((c||GR.call(i,de))&&!(U&&(de=="length"||w&&(de=="offset"||de=="parent")||v&&(de=="buffer"||de=="byteLength"||de=="byteOffset")||Mo(de,K))))B.push(de);return B}var oa=WR;var KR=Object.prototype;function jR(i){var c=i&&i.constructor,T=typeof c=="function"&&c.prototype||KR;return i===T}var Ho=jR;function $R(i,c){return function(T){return i(c(T))}}var ra=$R;var VR=ra(Object.keys,Object),Af=VR;var YR=Object.prototype,XR=YR.hasOwnProperty;function JR(i){if(!Ho(i))return Af(i);var c=[];for(var T in Object(i))if(XR.call(i,T)&&T!="constructor")c.push(T);return c}var sa=JR;function ZR(i){return i!=null&&Hr(i.length)&&!wr(i)}var Xn=ZR;function qR(i){return Xn(i)?oa(i):sa(i)}var _o=qR;function QR(i){return Zi(i,_o,Ur)}var vs=QR;var eT=1,tT=Object.prototype,nT=tT.hasOwnProperty;function oT(i,c,T,D,w,v){var U=T&eT,B=vs(i),K=B.length,de=vs(c),pe=de.length;if(K!=pe&&!U)return!1;var me=K;while(me--){var Ae=B[me];if(!(U?Ae in c:nT.call(c,Ae)))return!1}var Pe=v.get(i),Re=v.get(c);if(Pe&&Re)return Pe==c&&Re==i;var xe=!0;v.set(i,c),v.set(c,i);var ke=U;while(++me<K){Ae=B[me];var Te=i[Ae],Fe=c[Ae];if(D)var $e=U?D(Fe,Te,Ae,c,i,v):D(Te,Fe,Ae,i,c,v);if(!($e===void 0?Te===Fe||w(Te,Fe,T,D,v):$e)){xe=!1;break}ke||(ke=Ae=="constructor")}if(xe&&!ke){var ot=i.constructor,ft=c.constructor;if(ot!=ft&&(("constructor"in i)&&("constructor"in c))&&!(typeof ot=="function"&&ot instanceof ot&&typeof ft=="function"&&ft instanceof ft))xe=!1}return v.delete(i),v.delete(c),xe}var Cf=oT;var rT=Tn(Kt,"DataView"),ia=rT;var sT=Tn(Kt,"Promise"),aa=sT;var iT=Tn(Kt,"Set"),Fo=iT;var aT=Tn(Kt,"WeakMap"),la=aT;var bf="[object Map]",lT="[object Object]",Rf="[object Promise]",Tf="[object Set]",Df="[object WeakMap]",Lf="[object DataView]",dT=Co(ia),cT=Co(ko),uT=Co(aa),pT=Co(Fo),fT=Co(la),sr=kn;if(ia&&sr(new ia(new ArrayBuffer(1)))!=Lf||ko&&sr(new ko)!=bf||aa&&sr(aa.resolve())!=Rf||Fo&&sr(new Fo)!=Tf||la&&sr(new la)!=Df)sr=function(i){var c=kn(i),T=c==lT?i.constructor:void 0,D=T?Co(T):"";if(D)switch(D){case dT:return Lf;case cT:return bf;case uT:return Rf;case pT:return Tf;case fT:return Df}return c};var oo=sr;var mT=1,If="[object Arguments]",wf="[object Array]",da="[object Object]",gT=Object.prototype,Pf=gT.hasOwnProperty;function _T(i,c,T,D,w,v){var U=kt(i),B=kt(c),K=U?wf:oo(i),de=B?wf:oo(c);K=K==If?da:K,de=de==If?da:de;var pe=K==da,me=de==da,Ae=K==de;if(Ae&&Yn(i)){if(!Yn(c))return!1;U=!0,pe=!1}if(Ae&&!pe)return v||(v=new mo),U||Uo(i)?Ji(i,c,T,D,w,v):cf(i,c,K,T,D,w,v);if(!(T&mT)){var Pe=pe&&Pf.call(i,"__wrapped__"),Re=me&&Pf.call(c,"__wrapped__");if(Pe||Re){var xe=Pe?i.value():i,ke=Re?c.value():c;return v||(v=new mo),w(xe,ke,T,D,v)}}if(!Ae)return!1;return v||(v=new mo),Cf(i,c,T,D,w,v)}var xf=_T;function Nf(i,c,T,D,w){if(i===c)return!0;if(i==null||c==null||!tn(i)&&!tn(c))return i!==i&&c!==c;return xf(i,c,T,D,Nf,w)}var ca=Nf;var ET=1,hT=2;function ST(i,c,T,D){var w=T.length,v=w,U=!D;if(i==null)return!v;i=Object(i);while(w--){var B=T[w];if(U&&B[2]?B[1]!==i[B[0]]:!(B[0]in i))return!1}while(++w<v){B=T[w];var K=B[0],de=i[K],pe=B[1];if(U&&B[2]){if(de===void 0&&!(K in i))return!1}else{var me=new mo;if(D)var Ae=D(de,pe,K,i,c,me);if(!(Ae===void 0?ca(pe,de,ET|hT,D,me):Ae))return!1}}return!0}var kf=ST;function yT(i){return i===i&&!Wt(i)}var ua=yT;function OT(i){var c=_o(i),T=c.length;while(T--){var D=c[T],w=i[D];c[T]=[D,w,ua(w)]}return c}var vf=OT;function AT(i,c){return function(T){if(T==null)return!1;return T[i]===c&&(c!==void 0||(i in Object(T)))}}var pa=AT;function CT(i){var c=vf(i);if(c.length==1&&c[0][2])return pa(c[0][0],c[0][1]);return function(T){return T===i||kf(T,i,c)}}var Mf=CT;var bT="[object Symbol]";function RT(i){return typeof i=="symbol"||tn(i)&&kn(i)==bT}var Br=RT;var TT=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,DT=/^\w*$/;function LT(i,c){if(kt(i))return!1;var T=typeof i;if(T=="number"||T=="symbol"||T=="boolean"||i==null||Br(i))return!0;return DT.test(i)||!TT.test(i)||c!=null&&i in Object(c)}var zr=LT;var IT="Expected a function";function fd(i,c){if(typeof i!="function"||c!=null&&typeof c!="function")throw TypeError(IT);var T=function(){var D=arguments,w=c?c.apply(this,D):D[0],v=T.cache;if(v.has(w))return v.get(w);var U=i.apply(this,D);return T.cache=v.set(w,U)||v,U};return T.cache=new(fd.Cache||rr),T}fd.Cache=rr;var Uf=fd;var wT=500;function PT(i){var c=Uf(i,function(D){if(T.size===wT)T.clear();return D}),T=c.cache;return c}var Hf=PT;var xT=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,NT=/\\(\\)?/g,kT=Hf(function(i){var c=[];if(i.charCodeAt(0)===46)c.push("");return i.replace(xT,function(T,D,w,v){c.push(w?v.replace(NT,"$1"):D||T)}),c}),Ff=kT;var vT=1/0,Bf=rn?rn.prototype:void 0,zf=Bf?Bf.toString:void 0;function Gf(i){if(typeof i=="string")return i;if(kt(i))return Lr(i,Gf)+"";if(Br(i))return zf?zf.call(i):"";var c=i+"";return c=="0"&&1/i==-vT?"-0":c}var Wf=Gf;function MT(i){return i==null?"":Wf(i)}var Kf=MT;function UT(i,c){if(kt(i))return i;return zr(i,c)?[i]:Ff(Kf(i))}var eo=UT;var HT=1/0;function FT(i){if(typeof i=="string"||Br(i))return i;var c=i+"";return c=="0"&&1/i==-HT?"-0":c}var Un=FT;function BT(i,c){c=eo(c,i);var T=0,D=c.length;while(i!=null&&T<D)i=i[Un(c[T++])];return T&&T==D?i:void 0}var Bo=BT;function zT(i,c,T){var D=i==null?void 0:Bo(i,c);return D===void 0?T:D}var jf=zT;function GT(i,c){return i!=null&&c in Object(i)}var $f=GT;function WT(i,c,T){c=eo(c,i);var D=-1,w=c.length,v=!1;while(++D<w){var U=Un(c[D]);if(!(v=i!=null&&T(i,U)))break;i=i[U]}if(v||++D!=w)return v;return w=i==null?0:i.length,!!w&&Hr(w)&&Mo(U,w)&&(kt(i)||no(i))}var Vf=WT;function KT(i,c){return i!=null&&Vf(i,c,$f)}var fa=KT;var jT=1,$T=2;function VT(i,c){if(zr(i)&&ua(c))return pa(Un(i),c);return function(T){var D=jf(T,i);return D===void 0&&D===c?fa(T,i):ca(c,D,jT|$T)}}var Yf=VT;function YT(i){return i}var Gr=YT;function XT(i){return function(c){return c==null?void 0:c[i]}}var Xf=XT;function JT(i){return function(c){return Bo(c,i)}}var Jf=JT;function ZT(i){return zr(i)?Xf(Un(i)):Jf(i)}var Zf=ZT;function qT(i){if(typeof i=="function")return i;if(i==null)return Gr;if(typeof i=="object")return kt(i)?Yf(i[0],i[1]):Mf(i);return Zf(i)}var Eo=qT;var QT=function(){try{var i=Tn(Object,"defineProperty");return i({},"",{}),i}catch(c){}}(),Wr=QT;function eD(i,c,T){if(c=="__proto__"&&Wr)Wr(i,c,{configurable:!0,enumerable:!0,value:T,writable:!0});else i[c]=T}var zo=eD;var tD=Object.prototype,nD=tD.hasOwnProperty;function oD(i,c,T){var D=i[c];if(!(nD.call(i,c)&&fo(D,T))||T===void 0&&!(c in i))zo(i,c,T)}var Kr=oD;function rD(i,c,T,D){if(!Wt(i))return i;c=eo(c,i);var w=-1,v=c.length,U=v-1,B=i;while(B!=null&&++w<v){var K=Un(c[w]),de=T;if(K==="__proto__"||K==="constructor"||K==="prototype")return i;if(w!=U){var pe=B[K];if(de=D?D(pe,K,B):void 0,de===void 0)de=Wt(pe)?pe:Mo(c[w+1])?[]:{}}Kr(B,K,de),B=B[K]}return i}var qf=rD;function sD(i,c,T){var D=-1,w=c.length,v={};while(++D<w){var U=c[D],B=Bo(i,U);if(T(B,U))qf(v,eo(U,i),B)}return v}var ma=sD;var iD=ra(Object.getPrototypeOf,Object),jr=iD;var aD=Object.getOwnPropertySymbols,lD=!aD?qi:function(i){var c=[];while(i)Mr(c,Ur(i)),i=jr(i);return c},ga=lD;function dD(i){var c=[];if(i!=null)for(var T in Object(i))c.push(T);return c}var Qf=dD;var cD=Object.prototype,uD=cD.hasOwnProperty;function pD(i){if(!Wt(i))return Qf(i);var c=Ho(i),T=[];for(var D in i)if(!(D=="constructor"&&(c||!uD.call(i,D))))T.push(D);return T}var em=pD;function fD(i){return Xn(i)?oa(i,!0):em(i)}var ho=fD;function mD(i){return Zi(i,ho,ga)}var $r=mD;function gD(i,c){if(i==null)return{};var T=Lr($r(i),function(D){return[D]});return c=Eo(c),ma(i,T,function(D,w){return c(D,w[0])})}var Vr=gD;import{lstat as Fte}from"fs/promises";import{dirname as Bte,join as br}from"path";function md(){return!1}function _a(i){return!1}import{dirname as i4}from"path";import{AsyncLocalStorage as hD}from"async_hooks";var SD=new hD;function tm(){return SD.getStore()!==void 0}var Lde=new s(()=>new Set),Ide=new s(()=>({hasEntered:!1}));function ir(i){return{parse:(c)=>i(OD(c))}}function yD(i){let c=i?.trim();return c?c:void 0}function OD(i){return i===void 0?void 0:String(i)}var AD=ir(yD),CD=ir((i)=>i),bD=ir((i)=>d(i)),RD=ir((i)=>{if(d(i))return!0;if(Z(i))return!1;return}),TD=om();function nm(i){if(typeof i==="boolean")return i?"1":"0";return String(i)}var I={str:()=>AD,rawStr:()=>CD,bool:()=>bD,triBool:()=>RD,int:(i)=>i?om(i):TD,names:(i)=>ir((c)=>{let T=new Set;for(let D of c?.split(",")??[]){let w=D.trim();if(w.length>0)T.add(w);if(T.size===i)break}return T.size>0?Object.freeze([...T]):void 0}),enum:(i)=>ir((c)=>c!==void 0&&i.includes(c.trim())?c.trim():void 0)};function om(i){return ir((c)=>{if(c===void 0)return;if(i?.digitsOnly&&!/^[+-]?\d+$/.test(c.trim()))return;if(i?.wholeValue&&!/^[+-]?\d+$/.test(c.trim())&&Jt(c.trim())===void 0)return;let T=Be(c);if(!Number.isFinite(T))return;if(i?.min!==void 0&&T<i.min)return;if(i?.max!==void 0&&T>i.max)return;return T})}var DD=I.str(),LD=I.str(),ID=I.str(),wD=I.str(),PD=I.str(),xD=I.str(),ND=I.str(),kD=I.str(),vD=I.str(),MD=I.str(),UD=I.str(),HD=I.str(),FD=I.str(),BD=I.str(),zD=I.str(),GD=I.str(),WD=I.str(),KD=I.str(),jD=I.str(),$D=I.str(),VD=I.str(),YD=I.str(),XD=I.str(),JD=I.str(),ZD=I.str(),qD=I.str(),QD=I.str(),eL=I.str(),tL=I.bool(),nL=I.bool(),oL=I.str(),rL=I.bool(),sL=I.bool(),iL=I.bool(),aL=I.bool(),lL=I.int({min:1}),dL=I.str(),cL=I.str(),uL=I.str(),pL=I.str(),fL=I.bool(),mL=I.bool(),gL=I.str(),_L=I.str(),EL=I.str(),hL=I.int({min:0}),SL=I.int({min:0}),yL=I.int(),OL=I.bool(),AL=I.int(),CL=I.bool(),bL=I.bool(),RL=I.bool(),TL=I.bool(),DL=I.bool(),LL=I.bool(),IL=I.bool(),wL=I.int({min:1,max:2147483647}),PL=I.str(),xL=I.str(),NL=I.str(),kL=I.str(),vL=I.str(),ML=I.str(),UL=I.str(),HL=I.str(),FL=I.str(),BL=I.str(),zL=I.str();var GL=I.bool(),WL=I.str(),KL=I.str(),jL=I.str(),$L=I.bool(),VL=I.str(),YL=I.bool(),XL=I.bool(),JL=I.bool(),ZL=I.str(),qL=I.int(),QL=I.str(),eI=I.int(),tI=I.str(),nI=I.str(),oI=I.str(),rI=I.bool(),sI=I.bool(),iI=I.bool(),aI=I.bool(),lI=I.int(),dI=I.int(),cI=I.int(),uI=I.int({min:1}),pI=I.int({min:1}),fI=I.bool(),mI=I.bool(),gI=I.str(),_I=I.str(),EI=I.str(),hI=I.str(),SI=I.str(),yI=I.str(),OI=I.str(),AI=I.str(),CI=I.str(),bI=I.str(),RI=I.str(),TI=I.str(),DI=I.str(),LI=I.str(),II=I.str(),wI=I.str(),PI=I.str(),xI=I.str(),NI=I.str(),kI=I.str(),vI=I.int(),MI=I.int(),UI=I.int(),HI=I.str(),FI=I.bool(),BI=I.int({min:0}),zI=I.int({min:0}),GI=I.int({min:0}),WI=I.int({min:1,digitsOnly:!0}),KI=I.bool(),jI=I.triBool(),$I=I.bool(),VI=I.bool(),YI=I.bool(),XI=I.bool(),JI=I.str(),ZI=I.str(),qI=I.str(),QI=I.str(),ew=I.str(),tw=I.str(),nw=I.str(),ow=I.str(),rw=I.str();import{constants as aw}from"fs";import{access as Ed,readdir as lw,readFile as dw,readlink as cw}from"fs/promises";import{homedir as uw}from"os";import{basename as pw,delimiter as fw,dirname as mw,join as Ea,resolve as fm}from"path";function rm(i){return!i.isDirectory()&&!i.isFile()&&!i.isSymbolicLink()&&!i.isFIFO()&&!i.isSocket()&&!i.isBlockDevice()&&!i.isCharacterDevice()}import{delimiter as Xde,isAbsolute as sw}from"path";function sm(i){if(process.platform!=="win32")return Bun.which(i);return iw(i,j("PATH")??"")}var im=async(i)=>sm(i),am=sm;function iw(i,c){if(process.platform!=="win32")return Bun.which(i,{PATH:c});if(/[\\/]/.test(i))return sw(i)&&!ne(i)?Bun.which(i,{PATH:c}):null;return yn(i,c)}function Ms(){return process.platform!=="linux"||g()}function lm(){if(Ms())return!1;return l().existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")}function dm(){if(Ms())return;try{return l().readFileSync("/sys/hypervisor/uuid",{encoding:"utf8"}).trim().toLowerCase()}catch{return}}function cm(){if(Ms())return!1;return l().existsSync("/.dockerenv")}function gw(){if(g())return{file:um()};let i=Ea(C(),".config.json"),c=um();try{let T=l().statSync(i);if(T.isFile()&&(T.size>0||(T.mode&146)!==0)){let D;try{D=l().statSync(c)}catch(w){if(_(w))return{file:i,legacy:i};if(t(`Could not look at ${c}: ${r(w)}`,{level:"warn"}),T.size===0)return{file:i,legacy:i}}if(T.size===0&&D!==void 0&&_w(D))return{file:i,legacy:i};if(T.size>0){if(D!==void 0&&(!D.isFile()||D.size===0))return{file:i,legacy:i};try{if(!l().readdirSync(mw(i)).some((v)=>v.name===pw(i)))return{file:c,legacy:i}}catch(w){if(_(w))return{file:c,legacy:i}}if(D===void 0||m()!=="windows"&&D.dev===T.dev&&D.ino===T.ino)return{file:i,legacy:i};return{file:i,unused:c,legacy:i}}}}catch{}return{file:c,legacy:i}}function _w(i){let c=m();return(c==="linux"||c==="wsl")&&i.isFile()&&i.size===0&&(i.mode&146)===0&&i.nlink===1}function um(){let i=`.claude${an()}.json`;return Ea(process.env.CLAUDE_CONFIG_DIR||uw(),i)}async function Ew(){return null}async function Yr(i){try{return!!await im(i)}catch{return!1}}async function hw(){let i=[];if(await Yr("npm"))i.push("npm");if(await Yr("yarn"))i.push("yarn");if(await Yr("pnpm"))i.push("pnpm");return i}async function Sw(){let i=[];if(await Yr("bun"))i.push("bun");if(await Yr("deno"))i.push("deno");if(await Yr("node"))i.push("node");return i}var pm=["git","node","npm","npx","yarn","pnpm","bun","deno","tsc","python","python3","py","pip","uv","poetry","ruby","gem","bundle","rake","dotnet","msbuild","nuget","cl","nmake","cmake","ninja","make","gcc","g++","clang","cargo","rustc","go","java","javac","mvn","gradle","docker"],yw=1000;async function Ow(i){try{return/appinstaller/i.test(await cw(i))}catch{return!1}}async function Aw(i){if(i===""||ne(i)||qe(i))return!1;return!await Zt(fm(i))}async function Cw(i,c){let T=m()==="windows",D=new Set(i),w=T?(process.env.PATHEXT??".COM;.EXE;.BAT;.CMD").toLowerCase().split(";").filter(Boolean):[],v=f((process.env.PATH??"").split(fw).map((U)=>U.replace(/^"|"$/g,"")).filter(Boolean));await Promise.all(v.map(async(U)=>{if(!await Aw(U))return;let B;try{B=await lw(U,{withFileTypes:!0})}catch{return}let K=T&&/[\\/]microsoft[\\/]windowsapps[\\/]?$/i.test(U);for(let de of B){if(de.isDirectory())continue;let pe=de.name;if(T){let me=pe.toLowerCase(),Ae=me.lastIndexOf(".");if(Ae<=0||!w.includes(me.slice(Ae)))continue;pe=me.slice(0,Ae)}if(!D.has(pe)||c.has(pe))continue;if(T){if(K&&await Ow(Ea(U,de.name)))continue}else{let me=Ea(U,de.name);if((de.isSymbolicLink()||rm(de))&&await Zt(fm(me)))continue;try{await Ed(me,aw.X_OK)}catch{continue}}c.add(pe)}}))}async function bw(){let i=new Set;try{await F(Cw(pm,i),yw,"build tool PATH scan timed out")}catch{}return pm.filter((c)=>i.has(c))}function Rw(i){try{if(!i.isWslEnvironment())return!1;let c=am("npm");if(c===null)return!1;return c.startsWith("/mnt/c/")}catch(c){return!1}}function Tw(){return process.env.__CFBundleIdentifier==="com.conductor.app"}var mm=["pycharm","intellij","webstorm","phpstorm","rubymine","clion","goland","rider","datagrip","appcode","dataspell","aqua","gateway","fleet","jetbrains","androidstudio"];function Dw(i){let c=i.toLowerCase();return c.includes("windsurf")||c.includes("devin.app")||c.includes("devin desktop")||c.includes("devin-desktop")||/appdata[\\/]local[\\/](programs[\\/])?devin[\\/]/.test(c)}function Lw(){if(process.env.CURSOR_TRACE_ID)return"cursor";let i=process.env.VSCODE_GIT_ASKPASS_MAIN?.toLowerCase()??"";if(i.includes("cursor"))return"cursor";if(Dw(i))return"windsurf";if(i.includes("antigravity"))return"antigravity";let c=process.env.__CFBundleIdentifier?.toLowerCase();if(c?.includes("vscodium"))return"codium";if(c?.includes("windsurf")||c?.includes("devin"))return"windsurf";if(c?.includes("com.google.android.studio"))return"androidstudio";if(c){for(let T of mm)if(c.includes(T))return T}if(process.env.VisualStudioVersion)return"visualstudio";if(process.env.TERMINAL_EMULATOR==="JetBrains-JediTerm")return"pycharm";if(process.env.TERM==="xterm-ghostty")return"ghostty";if(process.env.TERM?.includes("kitty"))return"kitty";if(process.env.TERM_PROGRAM){if(/^devin([ -]desktop)?$/i.test(process.env.TERM_PROGRAM))return"windsurf";return process.env.TERM_PROGRAM}if(process.env.TMUX)return"tmux";if(process.env.STY)return"screen";if(process.env.KONSOLE_VERSION)return"konsole";if(process.env.GNOME_TERMINAL_SERVICE)return"gnome-terminal";if(process.env.XTERM_VERSION)return"xterm";if(process.env.VTE_VERSION)return"vte-based";if(process.env.TERMINATOR_UUID)return"terminator";if(process.env.KITTY_WINDOW_ID)return"kitty";if(process.env.ALACRITTY_LOG)return"alacritty";if(process.env.TILIX_ID)return"tilix";if(process.env.WT_SESSION)return"windows-terminal";if(process.env.SESSIONNAME&&process.env.TERM==="cygwin")return"cygwin";if(process.env.MSYSTEM)return process.env.MSYSTEM.toLowerCase();if(process.env.ConEmuANSI||process.env.ConEmuPID||process.env.ConEmuTask)return"conemu";if(process.env.WSL_DISTRO_NAME)return`wsl-${process.env.WSL_DISTRO_NAME}`;if(_m())return"ssh-session";if(process.env.TERM){let T=process.env.TERM;if(T.includes("alacritty"))return"alacritty";if(T.includes("rxvt"))return"rxvt";if(T.includes("termite"))return"termite";return process.env.TERM}if(!process.stdout.isTTY)return"non-interactive";return null}class gm{sources;globalClaudeFile;unusedGlobalClaudeFile;probedLegacyGlobalConfigFile;packageManagers;runtimes;detectedBuildTools;wslEnvironment;npmFromWindowsPath;deploymentEnvironment;primedWslInteropExists;primedHypervisorUuid;primedDockerenvExists;fallbackWslInteropExists;fallbackHypervisorUuid;fallbackDockerenvExists;constructor(i){this.sources=i}getGlobalClaudeFile(){if(this.globalClaudeFile===void 0){let{file:i,unused:c,legacy:T}=gw();this.globalClaudeFile=i,this.unusedGlobalClaudeFile=c,this.probedLegacyGlobalConfigFile=T}return this.globalClaudeFile}getUnusedGlobalClaudeFile(){return this.getGlobalClaudeFile(),this.unusedGlobalClaudeFile}getProbedLegacyGlobalConfigFile(){return this.getGlobalClaudeFile(),this.probedLegacyGlobalConfigFile}seedGlobalClaudeFile(i){if(this.globalClaudeFile===void 0)return this.globalClaudeFile=i,"seeded";return this.globalClaudeFile===i?"unchanged":"conflict"}getPackageManagers(){return this.packageManagers??=hw()}getRuntimes(){return this.runtimes??=Sw()}getDetectedBuildTools(){return this.detectedBuildTools??=bw()}isWslEnvironment(){return this.wslEnvironment??=this.primedWslInteropExists??(process.platform==="linux"?this.fallbackWslInteropExists??=this.sources.wslInteropExistsSync():!1)}isNpmFromWindowsPath(){return this.npmFromWindowsPath??=Rw(this)}hypervisorUuid(){return this.primedHypervisorUuid??(this.fallbackHypervisorUuid??=this.sources.readHypervisorUuidSync()??"")}isDockerenvPresent(){return this.primedDockerenvExists??(this.fallbackDockerenvExists??=this.sources.dockerenvExistsSync())}detectDeploymentEnvironment(){return this.deploymentEnvironment??=Pw(this)}async prime(){if(this.primedWslInteropExists!==void 0||Ms())return;let[i,c,T]=await Promise.all([Ed("/proc/sys/fs/binfmt_misc/WSLInterop").then(()=>!0,()=>!1),dw("/sys/hypervisor/uuid",{encoding:"utf8"}).then((D)=>D.trim().toLowerCase(),()=>{return}),Ed("/.dockerenv").then(()=>!0,()=>!1)]);this.primedWslInteropExists=i,this.primedHypervisorUuid=c??"",this.primedDockerenvExists=T,this.wslEnvironment=void 0,this.npmFromWindowsPath=void 0,this.deploymentEnvironment=void 0}}var Iw=new s(()=>new gm({wslInteropExistsSync:lm,readHypervisorUuidSync:dm,dockerenvExistsSync:cm}));function Us(){return Iw.of(R().host)}function ww(){return Us().detectDeploymentEnvironment()}function Pw(i){if(d(process.env.CODESPACES))return"codespaces";if(process.env.GITPOD_WORKSPACE_ID)return"gitpod";if(d(process.env.CODER)||process.env.CODER_WORKSPACE_NAME)return"coder";if(d(process.env.DEVPOD)||process.env.DEVPOD_WORKSPACE_UID)return"devpod";if(process.env.DAYTONA_WS_ID)return"daytona";if(d(process.env.GOOGLE_CLOUD_WORKSTATIONS))return"gcp-cloud-workstations";if(process.env.C9_PID||process.env.C9_USER)return"aws-cloud9";if(process.env.REPL_ID||process.env.REPL_SLUG)return"replit";if(process.env.PROJECT_DOMAIN)return"glitch";if(d(process.env.VERCEL))return"vercel";if(process.env.RAILWAY_ENVIRONMENT_NAME||process.env.RAILWAY_SERVICE_NAME)return"railway";if(d(process.env.RENDER))return"render";if(d(process.env.NETLIFY))return"netlify";if(process.env.DYNO)return"heroku";if(process.env.FLY_APP_NAME||process.env.FLY_MACHINE_ID)return"fly.io";if(d(process.env.CF_PAGES))return"cloudflare-pages";if(process.env.DENO_DEPLOYMENT_ID)return"deno-deploy";if(process.env.AWS_LAMBDA_FUNCTION_NAME)return"aws-lambda";if(process.env.AWS_EXECUTION_ENV==="AWS_ECS_FARGATE")return"aws-fargate";if(process.env.AWS_EXECUTION_ENV==="AWS_ECS_EC2")return"aws-ecs";if(i.hypervisorUuid().startsWith("ec2"))return"aws-ec2";if(process.env.K_SERVICE)return"gcp-cloud-run";if(process.env.GOOGLE_CLOUD_PROJECT)return"gcp";if(process.env.WEBSITE_SITE_NAME||process.env.WEBSITE_SKU)return"azure-app-service";if(process.env.AZURE_FUNCTIONS_ENVIRONMENT)return"azure-functions";if(process.env.APP_URL?.includes("ondigitalocean.app"))return"digitalocean-app-platform";if(process.env.SPACE_CREATOR_USER_ID)return"huggingface-spaces";if(d(process.env.GITHUB_ACTIONS))return"github-actions";if(d(process.env.GITLAB_CI))return"gitlab-ci";if(process.env.CIRCLECI)return"circleci";if(process.env.BUILDKITE)return"buildkite";if(d(!1))return"ci";if(process.env.KUBERNETES_SERVICE_HOST)return"kubernetes";if(i.isDockerenvPresent())return"docker";if(Hs.platform==="darwin")return"unknown-darwin";if(Hs.platform==="linux")return"unknown-linux";if(Hs.platform==="win32")return"unknown-win32";return"unknown"}function _m(){return!!(process.env.SSH_CONNECTION||process.env.SSH_CLIENT||process.env.SSH_TTY)}function Em(){return process.env.CLAUDE_CODE_SPAWNED_BY_SERVER!==void 0||process.env.CLAUDE_SSH_DAEMON_CHILD!==void 0||process.env.CLAUDE_SSH_RUN_DIR!==void 0}var Hs={probeInternalNetworkAccess:Ew,isCI:d(!1),platform:["win32","darwin"].includes(process.platform)?process.platform:"linux",arch:process.arch,nodeVersion:process.version,terminal:Lw(),isSSH:_m,getPackageManagers(){return Us().getPackageManagers()},getRuntimes(){return Us().getRuntimes()},isRunningWithBun:oe,isWslEnvironment(){return Us().isWslEnvironment()},isNpmFromWindowsPath(){return Us().isNpmFromWindowsPath()},isConductor:Tw,detectDeploymentEnvironment:ww};var Xr=["5m","1h"];var xw=I.triBool(),Nw=I.int({min:0}),kw=I.int({min:0}),vw=I.int({min:0}),Mw=I.triBool(),Uw=I.triBool(),Hw=I.bool(),Fw=I.bool(),Bw=I.str(),zw=I.bool(),Gw=I.str(),Ww=I.str(),Kw=I.triBool(),jw=I.triBool(),$w=I.enum(["strict","relaxed"]),Vw=I.str(),Yw=I.bool(),Xw=I.str(),Jw=I.triBool(),Zw=I.triBool(),qw=I.triBool(),Qw=I.triBool(),eP=I.triBool(),tP=I.enum(["drop","block","off"]),nP=I.str(),oP=I.triBool(),rP=I.triBool(),sP=I.triBool(),iP=I.triBool(),aP=I.triBool(),lP=I.triBool(),dP=I.triBool(),cP=I.triBool(),uP=I.triBool(),pP=I.triBool(),fP=I.bool(),mP=I.bool(),gP=I.bool(),_P=I.bool(),EP=I.bool(),hP=I.bool(),SP=I.bool(),yP=I.bool(),OP=I.bool(),AP=I.bool(),CP=I.bool(),bP=I.bool(),RP=I.bool(),TP=I.str(),DP=I.int({min:1,max:10080,digitsOnly:!0}),LP=I.bool(),IP=I.bool(),wP=I.bool(),PP=I.bool(),xP=I.bool(),NP=I.bool(),kP=I.bool(),vP=I.bool(),MP=I.bool(),UP=I.bool(),HP=I.bool(),FP=I.bool(),BP=I.bool(),zP=I.bool(),GP=I.bool(),WP=I.bool(),KP=I.bool(),jP=I.bool(),$P=I.bool(),VP=I.bool(),YP=I.bool(),XP=I.bool(),JP=I.bool(),ZP=I.bool(),qP=I.bool(),QP=I.bool(),ex=I.bool(),tx=I.bool(),nx=I.bool(),ox=I.bool(),rx=I.bool(),sx=I.bool(),ix=I.bool(),ax=I.bool(),lx=I.bool(),dx=I.bool(),cx=I.bool(),ux=I.bool(),px=I.triBool(),fx=I.bool(),mx=I.bool(),gx=I.bool(),_x=I.bool(),Ex=I.bool(),hx=I.bool(),Sx=I.bool(),yx=I.bool(),Ox=I.enum(["corroborate","immediate","never","recorded"]),Ax=I.triBool(),Cx=I.triBool(),bx=I.triBool(),Rx=I.bool(),Tx=I.bool(),Dx=I.bool(),Lx=I.bool(),Ix=I.bool(),wx=I.bool(),Px=I.bool(),xx=I.bool(),Nx=I.bool(),kx=I.bool(),vx=I.bool(),Mx=I.bool(),Ux=I.bool(),Hx=I.bool(),Fx=I.bool(),Bx=I.triBool(),zx=I.bool(),Gx=I.bool(),Wx=I.bool(),Kx=I.bool(),jx=I.bool(),$x=I.bool(),Vx=I.bool(),Yx=I.bool(),Xx=I.bool(),Jx=I.bool(),Zx=I.bool(),qx=I.bool(),Qx=I.triBool(),eN=I.bool(),tN=I.bool(),nN=I.bool(),oN=I.bool(),rN=I.bool(),sN=I.bool(),iN=I.triBool(),aN=I.bool(),lN=I.bool(),dN=I.bool(),cN=I.triBool(),uN=I.bool(),pN=I.bool(),fN=I.bool(),mN=I.triBool(),gN=I.bool(),_N=I.bool(),EN=I.bool(),hN=I.bool(),SN=I.triBool(),yN=I.bool(),ON=I.triBool(),AN=I.bool(),CN=I.bool(),bN=I.str(),RN=I.bool(),TN=I.int({min:1,digitsOnly:!0}),DN=I.triBool(),LN=I.bool(),IN=I.triBool(),wN=I.bool(),PN=I.bool(),xN=I.triBool(),NN=I.bool(),kN=I.bool(),vN=I.triBool(),MN=I.bool(),UN=I.str(),HN=I.bool(),FN=I.bool(),BN=I.bool(),zN=I.enum(["baseline","off"]),GN=I.str(),WN=I.int(),KN=I.str(),jN=I.str(),$N=I.str(),VN=I.triBool(),YN=I.str(),XN=I.triBool(),JN=I.triBool(),ZN=I.triBool(),qN=I.bool(),QN=I.bool(),ek=I.triBool(),tk=I.triBool(),nk=I.str(),ok=I.triBool(),rk=I.triBool(),sk=I.int({min:1}),ik=I.int({min:1,wholeValue:!0}),ak=I.str(),lk=I.triBool(),dk=I.triBool(),ck=I.bool(),uk=I.triBool(),pk=I.triBool(),fk=I.triBool(),mk=I.triBool(),gk=I.triBool(),_k=I.triBool(),Ek=I.triBool(),hk=I.triBool(),Sk=I.triBool(),yk=I.triBool(),Ok=I.triBool(),Ak=I.triBool(),Ck=I.triBool(),bk=I.triBool(),Rk=I.int({min:0}),Tk=I.bool(),Dk=I.bool(),Lk=I.triBool(),Ik=I.triBool(),wk=I.triBool(),Pk=I.triBool(),xk=I.triBool(),Nk=I.triBool(),kk=I.triBool(),vk=I.triBool(),Mk=I.triBool(),Uk=I.triBool(),Hk=I.triBool(),Fk=I.triBool(),Bk=I.triBool(),zk=I.triBool(),Gk=I.triBool(),Wk=I.triBool(),Kk=I.triBool(),jk=I.triBool(),$k=I.triBool(),Vk=I.bool(),Yk=I.str(),Xk=I.bool(),Jk=I.bool(),Zk=I.bool(),qk=I.bool(),Qk=I.str(),ev=I.bool(),tv=I.triBool(),nv=I.bool(),ov=I.bool(),rv=I.bool(),sv=I.bool(),iv=I.bool(),av=I.bool(),lv=I.bool(),dv=I.bool(),cv=I.bool(),uv=I.bool(),pv=I.bool(),fv=I.triBool(),mv=I.bool(),gv=I.bool(),_v=I.triBool(),Ev=I.bool(),hv=I.bool(),Sv=I.bool(),yv=I.names(8),Ov=I.bool(),Av=I.bool(),Cv=I.bool(),bv=I.triBool(),Rv=I.bool(),Tv=I.bool(),Dv=I.bool(),Lv=I.bool(),Iv=I.bool(),wv=I.bool(),Pv=I.bool(),xv=I.triBool(),Nv=I.str(),kv=I.bool(),vv=I.bool(),Mv=I.bool(),Uv=I.bool(),Hv=I.triBool(),Fv=I.bool(),Bv=I.triBool(),zv=I.triBool(),Gv=I.bool(),Wv=I.triBool(),Kv=I.triBool(),jv=I.triBool(),$v=I.bool(),Vv=I.bool(),Yv=I.bool(),Xv=I.str(),Jv=I.str(),Zv=I.bool(),qv=I.bool(),Qv=I.bool(),eM=I.bool(),tM=I.bool(),nM=I.bool(),oM=I.bool(),rM=I.str(),sM=I.str(),iM=I.bool(),aM=I.bool(),lM=I.bool(),dM=I.bool(),cM=I.bool(),uM=I.bool(),pM=I.bool(),fM=I.bool(),mM=I.bool(),gM=I.bool(),_M=I.triBool(),EM=I.bool(),hM=I.bool(),SM=I.bool(),yM=I.triBool(),OM=I.bool(),AM=I.triBool(),CM=I.int({min:1,digitsOnly:!0}),bM=I.int({min:0,digitsOnly:!0}),RM=I.bool(),TM=I.bool(),DM=I.bool(),LM=I.triBool(),IM=I.bool(),wM=I.bool(),PM=I.bool(),xM=I.bool(),NM=I.bool(),kM=I.bool(),vM=I.bool(),MM=I.bool(),UM=I.triBool(),HM=I.triBool(),FM=I.triBool(),BM=I.bool(),zM=I.bool(),GM=I.bool(),WM=I.bool(),KM=I.bool(),jM=I.bool(),$M=I.int({min:1}),VM=I.int({min:1}),YM=I.int({min:0}),XM=I.int({min:1,max:256,digitsOnly:!0}),JM=I.bool(),ZM=I.bool(),qM=I.bool(),QM=I.bool(),eU=I.bool(),tU=I.bool(),nU=I.bool(),oU=I.bool(),rU=I.bool(),sU=I.bool(),iU=I.bool(),aU=I.bool(),lU=I.bool(),dU=I.bool(),cU=I.bool(),uU=I.bool(),pU=I.bool(),fU=I.bool(),mU=I.bool(),gU=I.bool(),_U=I.bool(),EU=I.bool(),hU=I.bool(),SU=I.bool(),yU=I.triBool(),OU=I.bool(),AU=I.bool(),CU=I.bool(),bU=I.triBool(),RU=I.triBool(),TU=I.bool(),DU=I.bool(),LU=I.enum(Xr),IU=I.enum(Xr),wU=I.enum(["5m"]),PU=I.bool(),xU=I.bool(),NU=I.str(),kU=I.bool(),vU=I.bool(),MU=I.bool(),UU=I.bool(),HU=I.bool(),FU=I.bool(),BU=I.bool(),zU=I.bool(),GU=I.triBool(),WU=I.str(),KU=I.bool(),jU=I.str();var $U=I.str(),VU=I.str(),YU=I.str(),XU=I.str(),JU=I.str(),ZU=I.str(),qU=I.str(),QU=I.str(),eH=I.str(),tH=I.str(),nH=I.str(),oH=I.str(),rH=I.str(),sH=I.str(),iH=I.str(),aH=I.str(),lH=I.str(),dH=I.str(),cH=I.str(),uH=I.str(),pH=I.str(),fH=I.str(),mH=I.str(),gH=I.str(),_H=I.str(),EH=I.str(),hH=I.int({min:0,digitsOnly:!0}),SH=I.int({min:0,digitsOnly:!0}),yH=I.str(),OH=I.str(),AH=I.str(),CH=I.str(),bH=I.str(),RH=I.str(),TH=I.str(),DH=I.str(),LH=I.str(),IH=I.str(),wH=I.str(),PH=I.str(),xH=I.str(),NH=I.str(),kH=I.str(),vH=I.str(),MH=I.str(),UH=I.str(),HH=I.str(),FH=I.str(),BH=I.str(),zH=I.str(),GH=I.str(),WH=I.str(),KH=I.str(),jH=I.str(),$H=I.str(),VH=I.str(),YH=I.str(),XH=I.str(),JH=I.str(),ZH=I.str(),qH=I.str(),QH=I.str(),eF=I.str(),tF=I.str(),nF=I.str(),oF=I.str(),rF=I.str(),sF=I.str(),iF=I.str(),aF=I.str(),lF=I.str(),dF=I.str(),cF=I.str(),uF=I.str(),pF=I.str(),fF=I.rawStr(),mF=I.rawStr(),gF=I.str(),_F=I.str(),EF=I.str(),hF=I.str(),SF=I.str(),yF=I.str(),OF=I.str(),AF=I.str(),CF=I.str(),bF=I.str(),RF=I.str(),TF=I.str(),DF=I.str(),LF=I.str(),IF=I.str(),wF=I.str(),PF=I.str(),xF=I.str(),NF=I.str(),kF=I.str(),vF=I.str(),MF=I.str(),UF=I.str(),HF=I.str(),FF=I.str(),BF=I.str(),zF=I.str(),GF=I.str(),WF=I.str(),KF=I.str(),jF=I.str(),$F=I.str(),VF=I.str(),YF=I.str(),XF=I.str(),JF=I.str(),ZF=I.str(),qF=I.str(),QF=I.rawStr(),eB=I.str(),tB=I.str(),nB=I.str(),oB=I.str(),rB=I.str(),sB=I.str(),iB=I.str(),aB=I.str(),lB=I.str(),dB=I.str(),cB=I.str(),uB=I.str(),pB=I.str(),fB=I.str(),mB=I.str(),gB=I.str(),_B=I.str(),EB=I.str(),hB=I.str(),SB=I.str(),yB=I.str(),OB=I.str(),AB=I.str(),CB=I.rawStr(),bB=I.str(),RB=I.str(),TB=I.str(),DB=I.str(),LB=I.str(),IB=I.str(),wB=I.str(),PB=I.str(),xB=I.str(),NB=I.str(),kB=I.str(),vB=I.str(),MB=I.str(),UB=I.str(),HB=I.str(),FB=I.str(),BB=I.str(),zB=I.str(),GB=I.str(),WB=I.str(),KB=I.str(),jB=I.str(),$B=I.str(),VB=I.str(),YB=I.str(),XB=I.str(),JB=I.str(),ZB=I.str(),qB=I.str(),QB=I.str(),e0=I.str(),t0=I.str(),n0=I.str(),o0=I.str(),r0=I.str(),s0=I.str(),i0=I.str(),a0=I.str(),l0=I.str(),d0=I.str(),c0=I.str(),u0=I.str(),p0=I.str(),f0=I.str(),m0=I.str(),g0=I.str(),_0=I.str(),E0=I.str(),h0=I.str(),S0=I.str(),y0=I.str(),O0=I.str(),A0=I.str(),C0=I.str(),b0=I.str(),R0=I.str(),T0=I.str();var D0=I.str(),L0=I.str(),I0=I.str(),w0=I.str(),P0=I.str(),x0=I.rawStr(),N0=I.str(),k0=I.str(),v0=I.str(),M0=I.str(),U0=I.str(),H0=I.str(),F0=I.str(),B0=I.str(),z0=I.str(),G0=I.str(),W0=I.str(),K0=I.bool(),j0=I.str(),$0=I.str(),V0=I.str(),Y0=I.str(),X0=I.str(),J0=I.int({min:100,max:5000}),Z0=I.str(),q0=I.str(),Q0=I.str(),ez=I.str(),tz=I.bool(),nz=I.str(),oz=I.str(),rz=I.str(),sz=I.str(),iz=I.str(),az=I.str(),lz=I.str(),dz=I.str(),cz=I.str(),uz=I.str(),pz=I.str(),fz=I.str(),mz=I.str(),gz=I.str(),_z=I.str(),Ez=I.str(),hz=I.bool(),Sz=I.str(),yz=I.str(),Oz=I.str(),Az=I.str(),Cz=I.str(),bz=I.str(),Rz=I.str(),Tz=I.str(),Dz=I.str(),Lz=I.bool(),Iz=I.str(),wz=I.int({min:0}),Pz=I.bool(),xz=I.str(),Nz=I.str(),kz=I.str(),vz=I.str(),Mz=I.enum(["1","spent"]),Uz=I.str(),Hz=I.str(),Fz=I.str(),Bz=I.str(),zz=I.rawStr(),Gz=I.str(),Wz=I.str(),Kz=I.str(),jz=I.str(),$z=I.rawStr(),Vz=I.str(),Yz=I.str(),Xz=I.bool(),Jz=I.bool(),Zz=I.bool(),qz=I.bool(),Qz=I.bool(),eG=I.bool(),tG=I.bool(),nG=I.bool(),oG=I.bool(),rG=I.bool(),sG=I.str(),iG=I.str(),aG=I.str(),lG=I.str(),dG=I.bool(),cG=I.bool(),uG=I.bool(),pG=I.bool(),fG=I.bool(),mG=I.str(),gG=I.bool(),_G=I.bool(),EG=I.bool(),hG=I.int({min:0,wholeValue:!0}),SG=I.str(),yG=I.str(),OG=I.str(),AG=I.str(),CG=I.str(),bG=I.str(),RG=I.bool(),TG=I.bool(),DG=I.str(),LG=I.int({min:0}),IG=I.int({min:0}),wG=I.rawStr(),PG=I.str(),xG=I.str(),NG=I.triBool(),kG=I.str(),vG=I.str(),MG=I.str(),UG=I.str(),HG=I.str(),FG=I.str(),BG=I.int({min:1,wholeValue:!0}),zG=I.str(),GG=I.str(),WG=I.str(),KG=I.bool(),jG=I.str(),$G=I.str(),VG=I.str(),YG=I.str(),XG=I.str(),JG=I.str(),ZG=I.str(),qG=I.str(),QG=I.str(),eW=I.str(),tW=I.str(),nW=I.str(),oW=I.bool(),rW=I.bool(),sW=I.str(),iW=I.str(),aW=I.str(),lW=I.str(),dW=I.str(),cW=I.str(),uW=I.rawStr(),pW=I.str(),fW=I.str(),mW=I.str(),gW=I.str(),_W=I.str(),EW=I.str(),hW=I.str(),SW=I.str(),yW=I.str(),OW=I.str(),AW=I.str(),CW=I.str(),bW=I.str(),RW=I.str(),TW=I.str(),DW=I.enum(["1"]),LW=I.str(),IW=I.str(),wW=I.str(),PW=I.str(),xW=I.str(),NW=I.enum(["claude_ai_chat"]),kW=I.int({min:1,max:9999999999999,digitsOnly:!0}),vW=I.str(),MW=I.str(),UW=I.str(),HW=I.str(),FW=I.bool(),BW=I.int({min:1,wholeValue:!0}),zW=I.str(),GW=I.str(),WW=I.str(),KW=I.str(),jW=I.str(),$W=I.str(),VW=I.str(),YW=I.str(),XW=I.str(),JW=I.str(),ZW=I.str(),qW=I.str(),QW=I.str(),eK=I.bool(),tK=I.str(),nK=I.str(),oK=I.str(),rK=I.bool(),sK=I.names(8),iK=I.bool(),aK=I.bool(),lK=I.rawStr(),dK=I.str(),cK=I.str(),uK=I.str(),pK=I.str(),fK=I.str(),mK=I.str(),gK=I.str(),_K=I.str(),EK=I.str(),hK=I.str(),SK=I.str(),yK=I.str(),OK=I.str(),AK=I.str(),CK=I.str(),bK=I.str(),RK=I.str(),TK=I.str(),DK=I.str(),LK=I.str(),IK=I.str(),wK=I.str(),PK=I.str(),xK=I.str(),NK=I.str(),kK=I.str(),vK=I.str(),MK=I.str(),UK=I.rawStr(),HK=I.str(),FK=I.str(),BK=I.str(),zK=I.str(),GK=I.str(),WK=I.str(),KK=I.str(),jK=I.str(),$K=I.str(),VK=I.bool(),YK=I.bool(),XK=I.bool(),JK=I.str(),ZK=I.str(),qK=I.str(),QK=I.bool(),ej=I.bool(),tj=I.bool(),nj=I.str(),oj=I.bool(),rj=I.bool(),sj=I.bool(),ij=I.bool(),aj=I.bool(),lj=I.bool(),dj=I.bool(),cj=I.bool(),uj=I.bool(),pj=I.bool(),fj=I.bool(),mj=I.rawStr(),gj=I.bool(),_j=I.bool(),Ej=I.bool(),hj=I.bool(),Sj=I.bool(),yj=I.bool(),Oj=I.bool(),Aj=I.bool(),Cj=I.bool(),bj=I.bool(),Rj=I.triBool(),Tj=I.bool(),Dj=I.bool(),Lj=I.bool(),Ij=I.bool(),wj=I.int({min:0}),Pj=I.bool(),xj=I.bool(),Nj=I.bool(),kj=I.bool(),vj=I.bool(),Mj=I.bool(),Uj=I.bool(),Hj=I.triBool(),Fj=I.bool(),Bj=I.str(),zj=I.bool(),Gj=I.bool(),Wj=I.bool(),Kj=I.bool(),jj=I.bool(),$j=I.bool(),Vj=I.bool(),Yj=I.int({min:1000,max:5000,digitsOnly:!0}),Xj=I.triBool(),Jj=I.bool(),Zj=I.bool(),qj=I.triBool(),Qj=I.bool(),e$=I.str(),t$=I.bool(),n$=I.enum(["on","verify"]),o$=I.str(),r$=I.int({min:1,max:2147483647,wholeValue:!0}),s$=I.int({min:1,max:100,digitsOnly:!0}),i$=I.rawStr(),a$=I.bool(),l$=I.str(),d$=I.bool(),c$=I.bool(),u$=I.bool(),p$=I.bool(),f$=I.bool(),m$=I.triBool(),g$=I.bool(),_$=I.str(),E$=I.str(),h$=I.bool(),S$=I.int({min:1,max:32,digitsOnly:!0}),y$=I.int({min:1}),O$=I.int({min:100,max:30000}),A$=I.int({min:0}),C$=I.int({min:1}),b$=I.bool(),R$=I.triBool(),T$=I.bool(),D$=I.bool(),L$=I.bool(),I$=I.bool(),w$=I.bool(),P$=I.bool(),x$=I.bool(),N$=I.bool(),k$=I.bool(),v$=I.str(),M$=I.bool(),U$=I.rawStr(),H$=I.str(),F$=I.str(),B$=I.bool(),z$=I.rawStr(),G$=I.str(),W$=I.str(),K$=I.str(),j$=I.str(),$$=I.str(),V$=I.str(),Y$=I.str(),X$=I.bool(),J$=I.bool(),Z$=I.bool(),q$=I.triBool(),Q$=I.bool(),eV=I.bool(),tV=I.int(),nV=I.int(),oV=I.int(),rV=I.int({min:1,max:2147483647,digitsOnly:!0}),sV=I.int(),iV=I.int(),aV=I.int(),lV=I.int({min:1}),dV=I.int({min:0,max:10080,digitsOnly:!0}),cV=I.int(),uV=I.int(),pV=I.int({min:1,digitsOnly:!0}),fV=I.int({min:1,digitsOnly:!0}),mV=I.int({min:1,digitsOnly:!0}),gV=I.int({min:0,digitsOnly:!0}),_V=I.int(),EV=I.int(),hV=I.int(),SV=I.int(),yV=I.int(),OV=I.int(),AV=I.int(),CV=I.int(),bV=I.int({min:1}),RV=I.int(),TV=I.int(),DV=I.int(),LV=I.int({min:1}),IV=I.int({min:1}),wV=I.int({min:0}),PV=I.int({min:0,max:86400000}),xV=I.int(),NV=I.int(),kV=I.int({min:1000,max:60000}),vV=I.int({wholeValue:!0}),MV=I.int({min:0,digitsOnly:!0}),UV=I.int({min:0,digitsOnly:!0}),HV=I.bool(),FV=I.int(),BV=I.int({min:1}),zV=I.int({min:1}),GV=I.int({min:3}),WV=I.int({min:1,max:2147483647,digitsOnly:!0}),KV=I.str(),jV=I.bool(),$V=I.int({min:1}),VV=I.int(),YV=I.triBool(),XV=I.int({min:1}),JV=I.int({min:1}),ZV=I.int({min:1}),qV=I.int({min:1}),QV=I.str(),e1=I.int({min:1}),t1=I.int({min:1}),n1=I.str(),o1=I.int(),r1=I.int({min:1}),s1=I.int(),i1=I.int({min:1,wholeValue:!0}),a1=I.int(),l1=I.int({min:1}),d1=I.int({min:0}),c1=I.bool(),u1=I.str(),p1=I.int({min:0,digitsOnly:!0}),f1=I.str(),m1=I.names(16),g1=I.bool(),_1=I.bool(),E1=I.bool(),h1=I.bool(),S1=I.bool(),y1=I.bool(),O1=I.bool(),A1=I.int({min:1,digitsOnly:!0}),C1=I.int({min:1});var b1=I.str(),R1=I.str(),T1=I.str(),D1=I.str(),L1=I.str(),I1=I.str(),w1=I.str(),P1=I.str(),x1=I.str(),N1=I.str(),k1=I.str(),v1=I.str(),M1=I.str(),U1=I.str(),H1=I.str(),F1=I.str(),B1=I.str(),z1=I.str(),G1=I.str(),W1=I.str(),K1=I.bool(),j1=I.str(),$1=I.str(),V1=I.str(),Y1=I.str(),X1=I.str(),J1=I.bool(),Z1=I.str(),q1=I.str(),Q1=I.str(),eY=I.str(),tY=I.bool(),nY=I.bool(),oY=I.bool(),rY=I.bool(),sY=I.str(),iY=I.bool(),aY=I.triBool(),lY=I.bool(),dY=I.bool(),cY=I.bool(),uY=I.bool(),pY=I.bool(),fY=I.str(),mY=I.str(),gY=I.str(),_Y=I.bool();var EY=I.str(),hY=I.str(),SY=I.str(),yY=I.str(),OY=I.str(),AY=I.str(),CY=I.str(),bY=I.str(),RY=I.str(),TY=I.str(),DY=I.str(),LY=I.bool(),IY=I.bool(),wY=I.str(),PY=I.bool(),xY=I.bool(),NY=I.str(),kY=I.str(),vY=I.str(),MY=I.str(),UY=I.str(),HY=I.int(),FY=I.int(),BY=I.int(),zY=I.int(),GY=I.int({min:1,digitsOnly:!0}),WY=I.int({min:1,digitsOnly:!0}),KY=I.int({min:1}),jY=I.str(),$Y=I.int(),VY=I.int(),YY=I.int(),XY=I.int(),JY=I.int({min:0,digitsOnly:!0}),ZY=I.int({min:500,max:32000,digitsOnly:!0}),qY=I.int({min:32000,max:300000,digitsOnly:!0}),QY=I.int({min:300000,max:3600000,digitsOnly:!0}),e2=I.int(),t2=I.triBool(),n2=I.bool(),o2=I.triBool(),r2=I.triBool(),s2=I.triBool(),i2=I.triBool(),a2=I.int({min:0,max:9,digitsOnly:!0}),l2=I.int({min:0,max:2,digitsOnly:!0}),d2=I.int({min:0,max:2,digitsOnly:!0}),c2=I.int({min:1,max:2000,digitsOnly:!0}),u2=I.int({min:1,max:1000,digitsOnly:!0}),p2=I.int({min:1,max:2000,digitsOnly:!0}),f2=I.rawStr(),m2=I.int({min:1,max:60000,digitsOnly:!0}),g2=I.int({min:1,wholeValue:!0}),_2=I.int({min:1}),E2=I.int({min:1}),h2=I.int({min:1}),S2=I.bool(),y2=I.int({min:1,digitsOnly:!0}),O2=I.int({min:1,digitsOnly:!0}),A2=I.int({min:60000,max:10800000,digitsOnly:!0}),C2=I.enum(["capacity"]),b2=I.bool(),R2=I.bool(),T2=I.bool(),D2=I.int(),L2=I.int({min:0});var I2=I.bool(),w2=I.bool(),P2=I.bool(),x2=I.bool(),N2=I.bool(),k2=I.bool(),v2=I.str(),M2=I.triBool(),U2=I.str(),H2=I.str(),F2=I.enum(Zn),B2=I.str(),z2=I.str(),G2=I.str(),W2=I.str(),K2=I.str(),j2=I.str(),$2=I.str(),V2=I.str(),Y2=I.str(),X2=I.str(),J2=I.str(),Z2=I.str(),q2=I.str(),Q2=I.str(),eX=I.str(),tX=I.str(),nX=I.str(),oX=I.str(),rX=I.str(),sX=I.str(),iX=I.str(),aX=I.str(),lX=I.str(),dX=I.str(),cX=I.str(),uX=I.str(),pX=I.str(),fX=I.str(),mX=I.bool(),gX=I.bool(),_X=I.bool(),EX=I.bool(),hX=I.bool(),SX=I.bool(),yX=I.bool(),OX=I.str(),AX=I.str(),CX=I.int({min:1,max:2147000000,digitsOnly:!0}),bX=I.bool(),RX=I.int({min:1,max:2147483647,digitsOnly:!0}),TX=I.str(),DX=I.int(),LX=I.bool(),IX=I.bool(),wX=I.bool(),PX=I.str(),xX=I.str(),NX=I.str(),kX=I.str(),vX=I.bool(),MX=I.bool(),UX=I.int({min:1,digitsOnly:!0}),HX=I.bool(),FX=I.bool(),BX=I.str(),zX=I.rawStr(),GX=I.rawStr(),WX=I.rawStr(),KX=I.bool(),jX=I.str(),$X=I.bool(),VX=I.bool(),YX=I.str(),XX=I.bool(),JX=I.bool(),ZX=I.enum(["enforce","observe","off"]),qX=I.str(),QX=I.bool();var t4={...gd,...Cd,...Od,...hd,...Ad,...Sd,..._d,...yd},n4=new WeakMap;function o4(i,c,T){let D=T,w;return()=>{let v=process.env[i];if(v!==D)w=c.parse(v),D=v;return w}}function ha(i,c){return typeof c==="string"&&Object.hasOwn(i,c)}function bd(i,c){let T=new Proxy(Object.create(c&&Object.getPrototypeOf(c)),{get:(U,B,K)=>{if(!ha(i,B))return Reflect.get(U,B,K);let de=o4(B,i[B],v);if(K===v)Object.defineProperty(v,B,{get:de,configurable:!0});return de()},set:(U,B,K,de)=>!ha(i,B)&&Reflect.set(U,B,K,de),has:(U,B)=>ha(i,B)||Reflect.has(U,B)}),D=Object.create(T),w=c===null?{}:Object.getOwnPropertyDescriptors(c);for(let[U,B]of Object.entries(w)){if(ha(i,U))continue;Object.defineProperty(D,U,typeof B.value==="function"?{...B,value:{[U](...K){return Reflect.apply(Reflect.get(c,U),this,K)}}[U]}:B)}let v=Object.create(D);return n4.set(v,i),Object.defineProperties(v,{set:{value:(U,B)=>{process.env[U]=nm(B)}},unset:{value:(U)=>{delete process.env[U]}}}),v}var Bt=bd(t4,Hs),r4={},zce=bd(r4,null),s4={},Gce=bd(s4,null);function hm(){}class ym{pendingWrite=Promise.resolve();cleanupRegistered=!1;notStarted=[];appendOldest=this.appendOldestNotStarted.bind(this);append(i,c){let T=this.notStarted.at(-1);if(T?.logFile===i){T.lines+=c;return}if(this.notStarted.push({logFile:i,lines:c}),this.pendingWrite=this.pendingWrite.then(this.appendOldest).catch(hm),!this.cleanupRegistered)this.cleanupRegistered=!0,Ct(()=>this.flush())}async appendOldestNotStarted(){let i=this.notStarted.shift();if(i===void 0)return;let c=l();try{await c.appendFile(i.logFile,i.lines)}catch{await c.mkdir(i4(i.logFile)).catch(hm),await c.appendFile(i.logFile,i.lines)}}flush(){return this.pendingWrite}}var a4=new s(()=>new ym);function l4(){return Y(a4)}function Fs(i,c,T,D="queued"){let w=c4();if(!w)return;let v;try{v=Sm(i,c,d4(T))}catch{v=Sm(i,c,{diagnostics_payload_failed:!0})}if(D==="now")try{l().appendFileSync(w,v)}catch{}else l4().append(w,v)}function d4(i){try{return(typeof i==="function"?i():i)??{}}catch{return{diagnostics_payload_failed:!0}}}function Sm(i,c,T){let D={timestamp:new Date().toISOString(),level:i,event:c,data:T,cc_version:typeof{VERSION:"0.3.328"}<"u"?"0.3.328":"unknown"};return o(D)+`
|
|
17
|
+
`}function c4(){return u4()?void 0:Bt.CLAUDE_CODE_DIAGNOSTICS_FILE}function u4(){return tm()?g():qt()}import{isUtf8 as p4}from"buffer";import{closeSync as f4,fstatSync as m4,openSync as g4,readlinkSync as _4}from"fs";import{open as E4,readlink as sue}from"fs/promises";function Om(i,c){if(!jn())return;let{resolvedPath:T,isSymlink:D}=be(i,c);if(D)t(`Reading through symlink: ${c} -> ${T}`)}function h4(i,c,T){let D=i.statSync(c);return zs(D,c,T),D}function zs(i,c,T){if(i.isDirectory())throw Object.assign(Error("EISDIR: illegal operation on a directory, read"),{code:"EISDIR",errno:-21,syscall:"read",path:c});if(!i.isFile())throw Rd(c);if(T!==void 0&&i.size>T)throw Object.assign(Error("File exceeds maxBytes limit"),{code:"ERR_FILE_TOO_LARGE",path:c,size:i.size,maxBytes:T})}function Rd(i){return Object.assign(Error("Not a regular file (device, FIFO, or socket)"),{code:"ERR_NOT_REGULAR_FILE",path:i})}var Bs=10485760;function S4(){return process.platform!=="darwin"&&process.platform!=="win32"}function y4(i,c){let{resolvedPath:T,isCanonical:D}=be(l(),c);if(D)return T;return _e(i)?c:void 0}function O4(i,c){let w=[];try{const T=y(w,A`readUnsizedFileBytesSync(${i})`,0);if(c?.(i))throw Rd(i);let D=g4(i,At());try{let K;try{K=m4(D)}catch{}if(K!==void 0)zs(K,i,Bs);if(c!==void 0&&S4()){let pe;try{pe=_4(`/proc/self/fd/${D}`)}catch(me){pe=y4(me,i)}if(c(pe))throw Rd(i)}let de=Qt(D,Bs+8,"stream");return Gs(de.length,i,Bs),de}finally{try{f4(D)}catch{}}}catch(v){var U=v,B=1}finally{b(w,U,B)}}async function A4(i,c){let T=await Rt(i,Bs+8,"stream");return Gs(T.length,c,Bs),T}function Gs(i,c,T){if(T===void 0)return;if(i>T)throw Object.assign(Error("File exceeds maxBytes limit"),{code:"ERR_FILE_TOO_LARGE",path:c,size:i,maxBytes:T})}function Am(i){return i!=null&&typeof i==="object"&&"code"in i&&i.code==="ERR_FILE_TOO_LARGE"}function Td(i){if(i.byteLength===0)return"utf8";if(i.byteLength>=2){if(i[0]===255&&i[1]===254)return"utf16le"}if(i.byteLength>=3&&i[0]===239&&i[1]===187&&i[2]===191)return"utf8";return"utf8"}var Cm=4096,C4=8000;function b4(i){return i.subarray(0,C4).includes(0)}function R4(i){let c=Td(i.subarray(0,Cm));if(c!=="utf8")return{encoding:c};if(i.byteLength>=2&&i[0]===254&&i[1]===255)return{encoding:c,notText:"utf16be"};if(b4(i))return{encoding:c,notText:"nul"};return p4(i)?{encoding:c}:{encoding:c,notText:"not_utf8"}}function T4(i){let{buffer:c,bytesRead:T}=l().readSync(i,{length:Cm});return Td(c.subarray(0,T))}function bm(i){let c=0,T=0;for(let D=0;D<i.length;D++)if(i[D]===`
|
|
18
|
+
`)if(D>0&&i[D-1]==="\r")c++;else T++;return c>T?"CRLF":"LF"}function D4(i,c,T){let D=l();Om(D,i);let w=h4(D,i,c);T?.(w);let v=c===void 0&&w.size===0?O4(i):void 0,U=v===void 0?T4(i):Td(v),B;if(v!==void 0)B=v.toString(U);else if(c===void 0)B=D.readFileSync(i,{encoding:U});else{let{buffer:de,bytesRead:pe}=D.readSync(i,{length:c+1});Gs(pe,i,c),B=de.subarray(0,pe).toString(U)}let K=bm(B.slice(0,4096));return{content:B.replaceAll(`\r
|
|
19
|
+
`,`
|
|
20
|
+
`),encoding:U,lineEndings:K}}function Go(i,c,T){return D4(i,c,T).content}async function Dd(i,c,T){let v=[];try{let D=l();Om(D,i);zs(await D.stat(i),i,c);const w=y(v,await E4(i,At()),1);return await L4(w,i,c,T)}catch(U){var B=U,K=1}finally{var de=b(v,B,K);de&&await de}}async function L4(i,c,T,D){let w=await i.stat();zs(w,c,T),D?.(w);let v;if(T!==void 0)v=await Rt(i,T+1,"file"),Gs(v.length,c,T);else if(w.size===0)v=await A4(i,c);else v=await i.readFile();let{encoding:U,notText:B}=R4(v),K=v.toString(U),de=bm(K.slice(0,4096));return{content:K.replaceAll(`\r
|
|
21
|
+
`,`
|
|
22
|
+
`),encoding:U,lineEndings:de,...B&&{notText:B}}}function Sa(i){return i>=48&&i<=57}function Rm(i){if(Sa(i))return i-48;let c=(i|32)-97;return c>=0&&c<6?c+10:-1}function Tm(i){switch(i){case 34:return'"';case 92:return"\\";case 47:return"/";case 98:return"\b";case 102:return"\f";case 110:return`
|
|
23
|
+
`;case 114:return"\r";case 116:return"\t";default:return}}class ya{text;position=0;token=14;offset=0;error=0;line=0;lineStart=0;tokenLine=0;tokenLineStart=0;valueStart=0;valueEnd=0;hasEscape=!1;constructor(i){this.text=i}value(){let{text:i,valueEnd:c}=this;if(!this.hasEscape)return i.slice(this.valueStart,c);let T="",D=this.valueStart;for(;;){let w=i.indexOf("\\",D);if(w<0||w>=c)return T+i.slice(D,c);T+=i.slice(D,w),D=w+2;let v=i.charCodeAt(w+1);if(v!==117){T+=Tm(v)??"";continue}let U=0;for(let B=D+4;D<B;D++){let K=Rm(i.charCodeAt(D));if(K<0){U=-1;break}U=U*16+K}if(U>=0)T+=String.fromCharCode(U)}}skipWhitespace(){let{text:i}=this,{position:c}=this;for(;;){let T=i.charCodeAt(c);if(T===32||T===9)c++;else if(T===10||T===13)c=this.passLineBreak(c);else{this.position=c;return}}}scan(){let{text:i,position:c}=this;if(this.error=0,this.hasEscape=!1,this.tokenLine=this.line,this.tokenLineStart=this.lineStart,c>=i.length)return this.offset=i.length,this.token=15;this.offset=this.valueStart=c,this.position=c+1;let T=i.charCodeAt(c);switch(T){case 34:return this.scanString(),this.token=10;case 44:return this.token=5;case 58:return this.token=6;case 123:return this.token=1;case 125:return this.token=2;case 91:return this.token=3;case 93:return this.token=4;case 47:return this.token=this.scanComment()}if(Sa(T))return this.scanNumber(c),this.token=11;if(T!==45)return this.token=this.scanWord();if(Sa(i.charCodeAt(c+1)))return this.scanNumber(c+1),this.token=11;return this.token=14}passLineBreak(i){let{text:c}=this,T=c.charCodeAt(i)===13&&c.charCodeAt(i+1)===10;return this.line++,this.lineStart=i+(T?2:1)}scanString(){let{text:i}=this,{length:c}=i,T=this.valueStart=this.position;for(;T<c;T++){let D=i.charCodeAt(T);if(D===34){this.valueEnd=T,this.position=T+1;return}if(D===92){this.hasEscape=!0;let w=i.charCodeAt(++T);if(w===117){let v=T+4;while(T<v&&Rm(i.charCodeAt(T+1))>=0)T++;if(T<v)this.error=4}else if(Tm(w)===void 0)this.error=5}else if(D<32){if(D===10||D===13)break;this.error=6}}this.error=2,this.position=this.valueEnd=Math.min(T,c)}passDigits(i){let{text:c}=this,T=i;while(Sa(c.charCodeAt(T)))T++;return T}scanNumber(i){let{text:c}=this,T=c.charCodeAt(i)===48?i+1:this.passDigits(i);if(c.charCodeAt(T)===46){let D=T+1;if(T=this.passDigits(D),T===D){this.error=3,this.position=this.valueEnd=T;return}}if(this.position=this.valueEnd=T,(c.charCodeAt(T)|32)===101){let D=c.charCodeAt(T+1),w=T+(D===43||D===45?2:1);if(this.position=this.passDigits(w),this.position===w)this.error=3;else this.valueEnd=this.position}}scanComment(){let{text:i}=this,{length:c}=i,T=i.charCodeAt(this.position),D=this.position+1;if(T===47){for(;D<c;D++){let U=i.charCodeAt(D);if(U===10||U===13)break}return this.position=D,12}if(T!==42)return 14;let w=i.indexOf("*/",D),v=w<0?c-1:w+2;while(D<v){let U=i.charCodeAt(D);D=U===10||U===13?this.passLineBreak(D):D+1}if(w<0)this.error=1,D++;return this.position=D,13}scanWord(){let{text:i,offset:c}=this,{length:T}=i,D=this.position;e:for(;D<T;D++)switch(i.charCodeAt(D)){case 32:case 9:case 10:case 13:case 34:case 44:case 58:case 47:case 123:case 125:case 91:case 93:break e}if(this.position=D,D-c===4){if(i.startsWith("true",c))return 8;if(i.startsWith("null",c))return 7}return D-c===5&&i.startsWith("false",c)?9:14}}function Oa(i){return i===12||i===13}class Ws extends ya{options;errors;constructor(i,c={},T){super(i);this.options=c;this.errors=T}comma(){}fault(i){this.errors?.push({error:i,offset:this.offset,length:this.position-this.offset})}walk(){if(this.next(),!this.walkValue())this.fault(4);else if(this.token!==15)this.fault(9)}literalValue(){switch(this.token){case 10:return this.value();case 11:return Number(this.value());case 7:return null;default:return this.token===8}}next(){for(;;){this.skipWhitespace();let i=this.scan();if(Oa(i)&&this.options.disallowComments){this.fault(10);continue}if(this.error!==0)this.fault(this.error+10);if(i===14)this.fault(1);else if(!Oa(i))return i}}skipToCommaOr(i){let{token:c}=this;while(c!==i&&c!==5&&c!==15)c=this.next()}walkValue(){let{token:i}=this;if(i>=7&&i<=11)return this.literal(),this.next(),!0;let c=i===1;if(c)this.objectBegin();else if(i===3)this.arrayBegin();else return!1;let T=c?2:4;this.next();for(let D=!0;this.token!==T&&this.token!==15;D=!1){if(this.token===5){if(D)this.fault(4);if(this.comma(),this.next()===T&&this.options.allowTrailingComma)break}else if(!D)this.fault(6);if(!(c?this.walkProperty():this.walkValue()))this.fault(4),this.skipToCommaOr(T)}if(c)this.objectEnd();else this.arrayEnd();if(this.token===T)this.next();else this.fault(c?7:8);return!0}walkProperty(){if(this.token!==10)return this.fault(3),this.skipToCommaOr(2),!1;if(this.property(),this.next()!==6)return this.fault(5),this.skipToCommaOr(2),!0;if(this.next(),!this.walkValue())this.fault(4),this.skipToCommaOr(2);return!0}}class Lm extends Ws{visitor;constructor(i,c,T){super(i,T);this.visitor=c}objectBegin(){this.visitor.onObjectBegin?.()}property(){this.visitor.onObjectProperty?.(this.value())}objectEnd(){this.visitor.onObjectEnd?.()}arrayBegin(){}arrayEnd(){}literal(){}fault(i){this.visitor.onError?.(i,this.offset,this.position-this.offset,this.tokenLine,this.offset-this.tokenLineStart)}}function Ld(i,c,T){new Lm(i,c,T).walk()}var Im=new Uint16Array(2);class Id{max;maxSize;ttl;#r=0;#u;#t=new Map;#n=[];#o=[];#s=[];#d=[];#e=Im;#a=0;constructor({max:i=0,maxSize:c=0,ttl:T=0,sizeCalculation:D}){this.max=i,this.maxSize=c,this.ttl=T,this.#u=D}get size(){return this.#t.size}get calculatedSize(){return this.#r}get(i){let c=this.#t.get(i);if(c===void 0)return;if(this.#i(c)){this.#l(c);return}return this.#c(c),this.#p(c),this.#o[c]}peek(i){let c=this.#t.get(i);return c===void 0||this.#i(c)?void 0:this.#o[c]}has(i){return this.peek(i)!==void 0}set(i,c,T){let D=0;if(c!==void 0&&this.maxSize>0){if(D=T?.size||(this.#u?.(c,i)??0),!(D>=1))throw TypeError("An entry needs a size of 1 or more")}if(c===void 0||D>this.maxSize)return this.delete(i),this;let w=this.#t.get(i),v=w!==void 0&&this.#o[w]===c;if(w!==void 0)this.#c(w);else{if(this.max>0&&this.#t.size===this.max)this.#l(this.#e[1]);if(w=this.#a||this.#t.size+1,w*2===this.#e.length)this.#f();this.#a=this.#e[w*2+1],this.#t.set(i,w),this.#n[w]=i}if(this.#p(w),this.ttl>0){let U=performance.now(),B=T?.ttl??this.ttl;this.#d[w]=U&&B&&U+B}if(!v){if(this.#o[w]=c,this.maxSize>0){this.#r+=D-(this.#s[w]??0),this.#s[w]=D;while(this.#r>this.maxSize)this.#l(this.#e[1])}}return this}delete(i){let c=this.#t.get(i);if(c!==void 0)this.#l(c);return c!==void 0}clear(){this.#t.clear(),this.#n=[],this.#o=[],this.#s=[],this.#d=[],this.#e=Im,this.#a=this.#r=0}purgeStale(){for(let i of this.#t.values())if(this.#i(i))this.#l(i)}*keys(){for(let i=this.#e[0];i;i=this.#e[i*2]){let c=this.#n[i];if(c===void 0)return;if(!this.#i(i))yield c}}*entries(){for(let i=this.#e[0];i;i=this.#e[i*2]){let c=this.#n[i];if(c===void 0)return;if(!this.#i(i))yield[c,this.#o[i]]}}*rkeys(){for(let i=this.#e[1];i;i=this.#e[i*2+1]){let c=this.#n[i];if(c===void 0)return;if(!this.#i(i))yield c}}dump(){let i=[];for(let c=this.#e[1];c;c=this.#e[c*2+1]){let T=this.#o[c];i.push([this.#n[c],this.maxSize===0?{value:T}:{value:T,size:this.#s[c]}])}return i}load(i){this.clear();for(let[c,T]of i)this.set(c,T.value,T)}#i(i){if(this.ttl===0)return!1;let c=this.#d[i];return c!==0&&performance.now()>c}#l(i){if(this.#t.delete(this.#n[i]),this.#n[i]=this.#o[i]=void 0,this.maxSize>0)this.#r-=this.#s[i],this.#s[i]=0;this.#c(i),this.#e[i*2+1]=this.#a,this.#a=i}#c(i){let c=this.#e,T=c[i*2],D=c[i*2+1];c[T*2+1]=D,c[D*2]=T}#p(i){let c=this.#e,T=c[0];c[i*2]=T,c[i*2+1]=0,c[T*2+1]=c[0]=i}#f(){let i=this.#e,c=Math.min(i.length*2+60,(this.max||1/0)+1);this.#e=new(c>65536?Uint32Array:Uint16Array)(c*2),this.#e.set(i),this.#n=wm(this.#n,c),this.#o=wm(this.#o,c)}}function wm(i,c){let T=Array(c);for(let D=1;D<i.length;D++)T[D]=i[D];return T}function Aa(i,c,T=100){let D=new Id({max:T}),w=(...v)=>{let U=c(...v),B=D.get(U);if(B!==void 0)return B;let K=i(...v);return D.set(U,K),K};return w.cache={clear:()=>D.clear(),size:()=>D.size,delete:(v)=>D.delete(v),get:(v)=>D.peek(v),has:(v)=>D.has(v),set:(v,U)=>void D.set(v,U)},w}var U4=8192;function xm(i,c){try{return{ok:!0,value:JSON.parse(Ce(i))}}catch(T){if(c)fe(Rn(T,`safeParseJSON: invalid JSON (${T instanceof Error?T.constructor.name:typeof T}, ${i.length} bytes)`));return{ok:!1}}}class Nm{cached=Aa(xm,(i)=>i,50);cache=this.cached.cache;parse(i,c){return this.cached(i,c)}}var Pm=new Nm;var ar=Object.assign(function(c,T=!0){if(!c)return null;let D=c.length>U4?xm(c,T):Pm.parse(c,T);return D.ok?D.value:null},{cache:Pm.cache});function km(i){let c;try{Ld(Ce(i),{onError:(T,D,w,v,U)=>{c??={line:v+1,column:U+1}}},{disallowComments:!0})}catch{}return c}import{accessSync as Fm,constants as kd,lstatSync as vm,readlinkSync as H4,realpath as F4,realpathSync as B4}from"fs";import{access as z4}from"fs/promises";import{basename as ipe,dirname as G4,join as xd,parse as W4,resolve as Nd,sep as Mm}from"path";import{promisify as K4}from"util";function Bm(i,c,T,D,w){let v=l(),U=Wm(i,c,T,D),B=U.next();while(!B.done){let K;try{K=j4(v,B.value,w)}catch(de){B=U.throw(de);continue}B=U.next(K)}return B.value}async function zm(i,c,T,D){let w=l(),v=Wm(i,c,T,D),U=v.next();while(!U.done){let B;try{B=await $4(w,U.value)}catch(K){U=v.throw(K);continue}U=v.next(B)}return U.value}var Gm={unreadableAncestry:"unverified",surfaceNetworkRaw:!0,literalLinkText:"opaque"};function j4(i,{ask:c,path:T},D){switch(c){case"isLink":{let w=i.lstatSync(T);return D.set(T,{uid:w.uid,gid:w.gid,mode:w.mode}),w.isSymbolicLink()}case"networkJunction":return Ge(i,T,Gm);case"realpath":return re(B4.native(T));case"writable":return Fm(T,kd.W_OK),!0}}async function $4(i,{ask:c,path:T}){switch(c){case"isLink":return(await i.lstat(T)).isSymbolicLink();case"networkJunction":return Ot(i,T,Gm);case"realpath":return re(await K4(F4.native)(T));case"writable":return await z4(T,kd.W_OK),!0}}function*Wm(i,c,T,D){let w=xd(i,...c),v;try{if(v=yield*wd(Nd(i),D),!v){let de=i,pe=!1;for(let[me,Ae]of c.entries())if(de=xd(de,Ae),pe=me===c.length-1?T??(yield*wd(de)):yield*wd(de,D),pe)break;if(!pe)return null}}catch{return null}if(v){let de=Km()?yield*Um(yield*Pd(w)):"unknown";return{path:w,folder:i,kind:"outside",targetWritable:de}}let U=yield*Pd(w),B=yield*Pd(i);if(U==="gone"||B==="gone")return null;if(B==="unverified"||"network"in B||U==="unverified")return{path:w,folder:i,kind:"unverified"};if("real"in U&&Xt(B.real,U.real))return{path:w,folder:i,kind:"inside"};let K=yield*Um(U);return{path:w,folder:i,kind:"outside",targetWritable:K}}function*wd(i,c){let T=c?.get(i);if(T===void 0)T=(yield{ask:"isLink",path:i})===!0,c?.set(i,T);return T}function*Pd(i){if(vn(i)&&!H(i))return{network:i};try{let c=yield{ask:"networkJunction",path:i};if(c===W||c===Ke)return"unverified";if(typeof c==="string")return{network:c};let T=yield{ask:"realpath",path:i};return typeof T==="string"?{real:T}:"unverified"}catch(c){let T=r(c);return T==="ENOENT"||T==="ENOTDIR"?"gone":"unverified"}}function Km(){try{let i=m();return i!=="windows"&&i!=="wsl"}catch{return!1}}function*Um(i){try{if(typeof i==="string"||!("real"in i)||!Km())return"unknown";let c=yield*Hm(i.real);if(c==="yes")return"yes";let T=yield*Hm(G4(i.real));if(T==="yes")return"yes";return c==="no"&&T==="no"?"no":"unknown"}catch{return"unknown"}}function*Hm(i){try{return yield{ask:"writable",path:i},"yes"}catch(c){return jm(c)}}function jm(i){switch(r(i)){case"EACCES":case"EPERM":case"EROFS":return"no";default:return"unknown"}}function vd(i){try{return Fm(i,kd.W_OK),"yes"}catch(c){return jm(c)}}function $m(i,c){return{uids:c===void 0||c===i?[i]:[i,c],groups:()=>[...process.getgroups?.()??[],...process.getegid?[process.getegid()]:[],...process.getgid?[process.getgid()]:[]]}}function Md(i,c,T){for(let D of i.uids){let w=On({file:c,folder:T,posix:!0,euid:D,groups:i.groups});if(w!==!1)return w}return!1}var V4=40;function Vm(i,c,T){let D=Nd(i);try{for(let w=0;w<=V4;w++){let v=W4(D).root,U,B=D.slice(v.length).split(Mm).filter(Boolean),K;for(let[de,pe]of B.entries()){let me=T.get(v);if(me===void 0){U??=vm(v);let Re={uid:U.uid,gid:U.gid,mode:U.mode};me=Md(c,Re,Re)===!1&&vd(v)==="no",T.set(v,me)}if(!me)return!0;let Ae=xd(v,pe);if(T.has(Ae)){v=Ae,U=void 0;continue}let Pe=vm(Ae);if(Pe.isSymbolicLink()){let Re=H4(Ae),xe=Re.split(Mm).filter((ke)=>ke&&ke!==".");if(xe.lastIndexOf("..")>xe.findIndex((ke)=>ke!==".."))return!0;K=Nd(v,Re,...B.slice(de+1));break}v=Ae,U=Pe}if(K===void 0)return!1;D=K}}catch{}return!0}import{join as Y4}from"path";class Ym{managedFilePath=void 0;dropInDir=void 0;getManagedFilePath(){return this.managedFilePath??=J4(),this.managedFilePath}getDropInDir(){return this.dropInDir??=Y4(Wo(),"managed-settings.d"),this.dropInDir}clearDropInDir(){this.dropInDir=void 0}reset(){this.managedFilePath=void 0,this.dropInDir=void 0}}var X4=new Ym;function Wo(){return X4.getManagedFilePath()}function J4(){let i=Z4();if(i!==void 0)return i;switch(m()){case"macos":return"/Library/Application Support/ClaudeCode";case"windows":return"C:\\Program Files\\ClaudeCode";default:return"/etc/claude-code"}}function Z4(){return}var Xm="cc-plugin-sec-default";var Jm={cli:!0,mcp:!0,"sdk-cli":!0,"sdk-ts":!0,"sdk-py":!0,bench:!0,"claude-vscode":!0,"claude-code-github-action":!0,"local-agent":!0,local_agent:!0,"claude-desktop":!0,remote:!0,remote_baku:!0,remote_cowork:!0,remote_trigger:!0,remote_cowork_trigger:!0,remote_desktop:!0,remote_mobile:!0,remote_projects:!0,claude_in_slack:!0,"claude-in-slack":!0,"claude-in-teams":!0,"claude-desktop-3p":!0,"claude-security":!0,"ssh-remote":!0,"claude-coworker":!0,"claude-coworker-terminal":!0};var rfe=new Set(Object.keys(Jm));function tJ(){let i=Bt.CLAUDE_CODE_ENTRYPOINT;return Bt.CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST&&(i==="claude-desktop-3p"||i==="local-agent"&&Bt.CLAUDE_CODE_DESKTOP_APP_VERSION==="")}function Zm(){return tJ()&&!Bt.CLAUDE_CODE_REMOTE&&!Em()}var nJ=new Set(["claude-desktop-3p","local-agent"]);function Ud(){let i=Bt.CLAUDE_CODE_ENTRYPOINT;return i!==void 0&&nJ.has(i)}var qm=new Set(["claude-desktop","claude-desktop-3p"]);function Ks(){return!1}function Qm(){return Ks()&&oJ()}function oJ(){return Bt.CLAUDE_CODE_HOST_GATEWAY_LINEAGE&&!!Bt.CLAUDE_CODE_HOST_CREDS_FILE}var Hd=new Set(ws);function eg(){let i=Bt.CLAUDE_CODE_ENTRYPOINT;return i!==void 0&&Hd.has(i)}function tg(){let i=Fd();return i!==void 0&&Hd.has(i)}function ng(){let i=Yt()?Ln():void 0;return i!==void 0&&Hd.has(i)}function rJ(i){return i?.startsWith("remote")===!0}class og{entrypoint=void 0;interactive=!1;spawnedByAttendedSession=void 0;childSession=!1;hasRemoteSessionOrContainerId=!1;claudecode=!1;hostManagedRunnerChild=!1;coworkFrameArtifacts=!1;hostScheduledRun=!1;desktopSkillSwitches=!1;desktopConnectorNames=!1;desktopWorkflowLimitWait=!1;desktopModeFromRecord=!1;desktopMessageCard=!1;desktopResultFirst=!1;desktopPluginInstallFrames=!1;hostUnattendedGrant=void 0;sdkMcpToolIdleTimeoutMs=void 0;desktopAppHostMark=!1;chromeTabGroupKey=void 0;hostAssignedGroup=void 0;hostGuest=void 0;hostTestVm=void 0;hostSkillCatalog=void 0;shownPluginsDir=void 0;desktopSkillsPluginDir=void 0;remoteControlOwnerDeclared=!1;remoteRelayMark=void 0;offPersonsMachine=!1;setEntrypoint(i){this.entrypoint=i}setInteractive(i){this.interactive=i}setSpawnedByAttendedSession(i){this.spawnedByAttendedSession=i}setChildSession(i){this.childSession=i}setHasRemoteSessionOrContainerId(i){this.hasRemoteSessionOrContainerId=i}setClaudecode(i){this.claudecode=i}setHostManagedRunnerChild(i){this.hostManagedRunnerChild=i}setDesktopAppHostMark(i){this.desktopAppHostMark=i}setCoworkFrameArtifacts(i){this.coworkFrameArtifacts=i}setHostScheduledRun(i){this.hostScheduledRun=i}setDesktopSkillSwitches(i){this.desktopSkillSwitches=i}setDesktopConnectorNames(i){this.desktopConnectorNames=i}setDesktopWorkflowLimitWait(i){this.desktopWorkflowLimitWait=i}setDesktopModeFromRecord(i){this.desktopModeFromRecord=i}setDesktopMessageCard(i){this.desktopMessageCard=i}setDesktopResultFirst(i){this.desktopResultFirst=i}setDesktopPluginInstallFrames(i){this.desktopPluginInstallFrames=i}setHostUnattendedGrant(i){this.hostUnattendedGrant=i}setSdkMcpToolIdleTimeoutMs(i){this.sdkMcpToolIdleTimeoutMs=i}setChromeTabGroupKey(i){this.chromeTabGroupKey=i}setHostSkillCatalog(i){this.hostSkillCatalog=i}setShownPluginsDir(i){this.shownPluginsDir=i}setDesktopSkillsPluginDir(i){this.desktopSkillsPluginDir=i}setRemoteControlOwnerDeclared(i){this.remoteControlOwnerDeclared=i}setRemoteRelayMark(i){this.remoteRelayMark=this.remoteRelayMark===!0||i}setOffPersonsMachine(i){this.offPersonsMachine||=i}setHostGuest(i){this.hostGuest=i}setHostTestVm(i){this.hostTestVm=i}setHostAssignedGroup(i){this.hostAssignedGroup=i}}var sJ=new s(()=>new og);function iJ(){return sJ.of(R().host)}function Fd(){return iJ().entrypoint}var aJ=new Set(["claude-vscode","claude-desktop","claude-desktop-3p","local-agent","local_agent","remote","remote_desktop","remote_mobile","remote_projects","remote_cowork","ssh-remote","claude-in-slack","claude_in_slack","claude-in-teams","claude-coworker","claude-coworker-terminal"]),lJ=new Set([...aJ].filter(rJ)),sfe=new Set([...lJ].filter((i)=>i!=="remote_cowork"&&i!=="remote_mobile"));var ife=new Set([...ws,"remote","remote_desktop","remote_mobile","remote_projects","remote_trigger"]);var js=["low","medium","high","xhigh","max"];var lr=/^(?:Read|Edit)\((?:\.\/)?!/;var Hn=e(()=>[{path:["allowManagedPermissionRulesOnly"],restrictive:!0},{path:["allowManagedHooksOnly"],restrictive:!0},{path:["allowManagedMcpServersOnly"],restrictive:!0},{path:["enforceAvailableModels"],restrictive:!0},{path:["disableAllHooks"],restrictive:!0},{path:["disableClaudeAiConnectors"],restrictive:!0},{path:["disableCommandPluginSources"],restrictive:!0},{path:["disableSideloadFlags"],restrictive:!0},{path:["disableSkillShellExecution"],restrictive:!0},{path:["disableWindowsBashCommandSplit"],restrictive:!0},{path:["disableRemoteControl"],restrictive:!0},{path:["disableAgentView"],restrictive:!0},{path:["disableWorkflows"],restrictive:!0},{path:["disableArtifact"],restrictive:!0},{path:["disableBundledSkills"],restrictive:!0},...[],{path:["fastModePerSessionOptIn"],restrictive:!0},{path:["isolatePeerMachines"],restrictive:!0},{path:["strictPluginOnlyCustomization"],restrictive:!0},{path:["disableAutoMode"],restrictive:"disable"},{path:["disableDeepLinkRegistration"],restrictive:"disable"},{path:["permissions","disableBypassPermissionsMode"],restrictive:"disable"},{path:["permissions","disableAutoMode"],restrictive:"disable"},{path:["permissions","blockReadsOutsideWorkingDirectories"],restrictive:!0},{path:["permissions","blockWritesOutsideWorkingDirectories"],restrictive:!0},{path:["permissions","denyInsteadOfPrompting"],restrictive:!0},{path:["autoMode","classifyAllShell"],restrictive:!0},...[],{path:["worktree","bgIsolation"],restrictive:"worktree"},{path:["enableArtifact"],restrictive:!1},{path:["enableWorkflows"],restrictive:!1},{path:["syncClaudeAiSkills"],restrictive:!1},{path:["syncClaudeAiPlugins"],restrictive:!1},{path:["useAutoModeDuringPlan"],restrictive:!1},{path:["skipDangerousModePermissionPrompt"],restrictive:!1},{path:["skipAutoPermissionPrompt"],restrictive:!1},{path:["enableAllProjectMcpServers"],restrictive:!1},{path:["channelsEnabled"],restrictive:!1},{path:["skipWebFetchPreflight"],restrictive:!1},{path:["skipWorkflowUsageWarning"],restrictive:!1},{path:["autoUploadSessions"],restrictive:!1},{path:["remoteControlAtStartup"],restrictive:!1},{path:["remoteMessageReceipts"],restrictive:["off","on"]},{path:["remoteTools","allowUnattendedServing"],restrictive:!1},{path:["autoContinueAtUsageLimit"],restrictive:!1},{path:["responseComparisonEnabled"],restrictive:!1},...[],...[],{path:["attribution","sessionUrl"],restrictive:!1},{path:["crossSessionInbound"],restrictive:["refuse","hold"]},{path:["remoteControl","shareHostProfile"],restrictive:["off","basic"]},{path:["modelProposedGoals"],restrictive:["disabled","alwaysAsk"]},{path:["maxEffortLevel"],restrictive:js},{path:["feedbackDrafts"],restrictive:"off"},{path:["availableModelsMatch"],restrictive:"exact"},{path:["askUserQuestionTimeout"],restrictive:"never"},{path:["dialogExpiry"],restrictive:"never"},{path:["sandbox","enabled"],restrictive:!0},{path:["sandbox","failIfUnavailable"],restrictive:!0},{path:["sandbox","autoAllowBashIfSandboxed"],restrictive:!1},{path:["sandbox","allowUnsandboxedCommands"],restrictive:!1},{path:["sandbox","enableWeakerNestedSandbox"],restrictive:!1},{path:["sandbox","enableWeakerNetworkIsolation"],restrictive:!1},{path:["sandbox","allowAppleEvents"],restrictive:!1},{path:["sandbox","allowNestedUserNamespaces"],restrictive:!1},{path:["sandbox","network","allowManagedDomainsOnly"],restrictive:!0},{path:["sandbox","network","strictAllowlist"],restrictive:!0},{path:["sandbox","network","allowAllUnixSockets"],restrictive:!1},{path:["sandbox","network","allowLocalBinding"],restrictive:!1},{path:["sandbox","windows","backend"],restrictive:"sandboxuser"},{path:["sandbox","filesystem","allowManagedReadPathsOnly"],restrictive:!0},{path:["sandbox","filesystem","disabled"],restrictive:!1},{path:["sandbox","credentials","allowPlaintextInject"],restrictive:!1},{path:["sandbox","credentials","sigv4","streaming"],restrictive:"deny"},{path:["sandbox","credentials","sigv4","presigned"],restrictive:"deny"},{path:["sandbox","credentials","sigv4","sigv4a"],restrictive:"deny"},{path:["isolation","required"],restrictive:!0},{path:["isolation","persistHome"],restrictive:!1}]),mfe=e(()=>new Set([]));function So(i){return Array.isArray(i)?i:[i]}function St(i,c){let T=i;for(let D of c){if(T===null||typeof T!=="object")return;T=T[D]}return T}function vt(i,c,T){let D=[i],w=i;for(let U of c.slice(0,-1)){let B={...w[U]};w[U]=B,w=B,D.push(w)}let v=c.at(-1);if(T!==void 0){w[v]=T;return}delete w[v];for(let U=D.length-1;U>0;U--){if(Object.keys(D[U]).length>0)break;delete D[U-1][c[U-1]]}}function dr(i,c){let T=St(c,i.path);return i.normalize===void 0?T:i.normalize(T)}var zd=`${Xm}@builtin`,dJ=["sec-default@builtin"],Ca=Object.freeze({settings:Object.freeze(["allowManagedHooksOnly","disableAllHooks","disableCommandPluginSources"]),policyModOptions:Object.freeze(["allowManagedModsOnly","forceHotReloadPrompt"]),setAside:Object.freeze(["allowModsToOverrideDenyRules"])});function Jr(){return cJ()??eg()}function $s(){return Jr()||ng()}function cJ(){try{return Fd()===void 0?void 0:tg()}catch(i){fe(i);return}}function Ko(i){let c=new Map([...dJ,zd].flatMap((w)=>{let v=St(i,["pluginConfigs",w,"options"]);return Object.entries(n(v)?v:{}).filter(([,U])=>U===!1||Gd(U))})),T={};for(let w of Ca.policyModOptions){let v=c.get(w);if(Gd(v))T[w]=v}return Object.keys(T).length>0?{[zd]:{options:T}}:void 0}function ba(i){let c={};for(let w of Ca.settings){let v=St(i,[w]);if(rg(v))c[w]=v}let T=Ko(i);if(T!==void 0)c.pluginConfigs=T;return Object.keys(c).length>0?{...c,managedSourcesBehavior:"merge"}:{}}function Wd(i,c){let T=uJ.filter(({path:w,holds:v})=>v(St(i,w))&&!v(St(c,w)));if(T.length===0)return c;let D={...c};for(let{path:w}of T)vt(D,w,St(i,w));return{...D,managedSourcesBehavior:"merge"}}function rg(i){return i===!0}function Gd(i){return i!==!1&&(["string","number","boolean"].includes(typeof i)||Array.isArray(i)&&i.every((c)=>typeof c==="string"))}var uJ=[...Ca.settings.map((i)=>({path:[i],holds:rg})),...Ca.policyModOptions.map((i)=>({path:["pluginConfigs",zd,"options",i],holds:Gd}))];var pJ=a({asks:void 0,isAsking:!1,readAs:void 0,told:void 0},(i)=>{i.asks=void 0,i.isAsking=!1,i.readAs=void 0,i.told=void 0});function Ra(){let i=pJ;if(i.isAsking)return i.readAs??=Jr(),i.readAs;let c=Jr();if(i.asks!==void 0){i.isAsking=!0;try{c=i.asks()}finally{i.isAsking=!1}}let T=i.readAs!==void 0&&i.readAs!==c;if(i.readAs=c,T)ue().invalidatePolicyLayer();return c}var fJ="[object Map]",mJ="[object Set]",gJ=Object.prototype,_J=gJ.hasOwnProperty;function EJ(i){if(i==null)return!0;if(Xn(i)&&(kt(i)||typeof i=="string"||typeof i.splice=="function"||Yn(i)||Uo(i)||no(i)))return!i.length;var c=oo(i);if(c==fJ||c==mJ)return!i.size;if(Ho(i))return!sa(i).length;for(var T in i)if(_J.call(i,T))return!1;return!0}var Ta=EJ;function hJ(i){return function(c,T,D){var w=-1,v=Object(c),U=D(c),B=U.length;while(B--){var K=U[i?B:++w];if(T(v[K],K,v)===!1)break}return c}}var sg=hJ;var SJ=sg(),Da=SJ;function yJ(i,c){return i&&Da(i,c,_o)}var La=yJ;function OJ(i,c){var T={};return c=Eo(c,3),La(i,function(D,w,v){zo(T,w,c(D,w,v))}),T}var Ia=OJ;function AJ(i,c,T){if(T!==void 0&&!fo(i[c],T)||T===void 0&&!(c in i))zo(i,c,T)}var Vs=AJ;var dg=typeof Pa=="object"&&Pa&&!Pa.nodeType&&Pa,ig=dg&&typeof wa=="object"&&wa&&!wa.nodeType&&wa,CJ=ig&&ig.exports===dg,ag=CJ?Kt.Buffer:void 0,lg=ag?ag.allocUnsafe:void 0;function bJ(i,c){if(c)return i.slice();var T=i.length,D=lg?lg(T):new i.constructor(T);return i.copy(D),D}var Ys=bJ;function RJ(i){var c=new i.constructor(i.byteLength);return new kr(c).set(new kr(i)),c}var Zr=RJ;function TJ(i,c){var T=c?Zr(i.buffer):i.buffer;return new i.constructor(T,i.byteOffset,i.length)}var xa=TJ;function DJ(i,c){var T=-1,D=i.length;c||(c=Array(D));while(++T<D)c[T]=i[T];return c}var Na=DJ;var cg=Object.create,LJ=function(){function i(){}return function(c){if(!Wt(c))return{};if(cg)return cg(c);i.prototype=c;var T=new i;return i.prototype=void 0,T}}(),ug=LJ;function IJ(i){return typeof i.constructor=="function"&&!Ho(i)?ug(jr(i)):{}}var ka=IJ;function wJ(i){return tn(i)&&Xn(i)}var pg=wJ;var PJ="[object Object]",xJ=Function.prototype,NJ=Object.prototype,fg=xJ.toString,kJ=NJ.hasOwnProperty,vJ=fg.call(Object);function MJ(i){if(!tn(i)||kn(i)!=PJ)return!1;var c=jr(i);if(c===null)return!0;var T=kJ.call(c,"constructor")&&c.constructor;return typeof T=="function"&&T instanceof T&&fg.call(T)==vJ}var va=MJ;function UJ(i,c){if(c==="constructor"&&typeof i[c]==="function")return;if(c=="__proto__")return;return i[c]}var Xs=UJ;function HJ(i,c,T,D){var w=!T;T||(T={});var v=-1,U=c.length;while(++v<U){var B=c[v],K=D?D(T[B],i[B],B,T,i):void 0;if(K===void 0)K=i[B];if(w)zo(T,B,K);else Kr(T,B,K)}return T}var to=HJ;function FJ(i){return to(i,ho(i))}var mg=FJ;function BJ(i,c,T,D,w,v,U){var B=Xs(i,T),K=Xs(c,T),de=U.get(K);if(de){Vs(i,T,de);return}var pe=v?v(B,K,T+"",i,c,U):void 0,me=pe===void 0;if(me){var Ae=kt(K),Pe=!Ae&&Yn(K),Re=!Ae&&!Pe&&Uo(K);if(pe=K,Ae||Pe||Re)if(kt(B))pe=B;else if(pg(B))pe=Na(B);else if(Pe)me=!1,pe=Ys(K,!0);else if(Re)me=!1,pe=xa(K,!0);else pe=[];else if(va(K)||no(K)){if(pe=B,no(B))pe=mg(B);else if(!Wt(B)||wr(B))pe=ka(K)}else me=!1}if(me)U.set(K,pe),w(pe,K,D,v,U),U.delete(K);Vs(i,T,pe)}var gg=BJ;function _g(i,c,T,D,w){if(i===c)return;Da(c,function(v,U){if(w||(w=new mo),Wt(v))gg(i,c,U,T,_g,D,w);else{var B=D?D(Xs(i,U),v,U+"",i,c,w):void 0;if(B===void 0)B=v;Vs(i,U,B)}},ho)}var Eg=_g;function zJ(i,c,T){switch(T.length){case 0:return i.call(c);case 1:return i.call(c,T[0]);case 2:return i.call(c,T[0],T[1]);case 3:return i.call(c,T[0],T[1],T[2])}return i.apply(c,T)}var hg=zJ;var Sg=Math.max;function GJ(i,c,T){return c=Sg(c===void 0?i.length-1:c,0),function(){var D=arguments,w=-1,v=Sg(D.length-c,0),U=Array(v);while(++w<v)U[w]=D[c+w];w=-1;var B=Array(c+1);while(++w<c)B[w]=D[w];return B[c]=T(U),hg(i,this,B)}}var Ma=GJ;function WJ(i){return function(){return i}}var yg=WJ;var KJ=!Wr?Gr:function(i,c){return Wr(i,"toString",{configurable:!0,enumerable:!1,value:yg(c),writable:!0})},Og=KJ;var jJ=800,$J=16,VJ=Date.now;function YJ(i){var c=0,T=0;return function(){var D=VJ(),w=$J-(D-T);if(T=D,w>0){if(++c>=jJ)return arguments[0]}else c=0;return i.apply(void 0,arguments)}}var Ag=YJ;var XJ=Ag(Og),Ua=XJ;function JJ(i,c){return Ua(Ma(i,c,Gr),i+"")}var Cg=JJ;function ZJ(i,c,T){if(!Wt(T))return!1;var D=typeof c;if(D=="number"?Xn(T)&&Mo(c,T.length):D=="string"&&(c in T))return fo(T[c],i);return!1}var bg=ZJ;function qJ(i){return Cg(function(c,T){var D=-1,w=T.length,v=w>1?T[w-1]:void 0,U=w>2?T[2]:void 0;if(v=i.length>3&&typeof v=="function"?(w--,v):void 0,U&&bg(T[0],T[1],U))v=w<3?void 0:v,w=1;c=Object(c);while(++D<w){var B=T[D];if(B)i(c,B,D,v)}return c})}var Rg=qJ;var QJ=Rg(function(i,c,T,D){Eg(i,c,T,D)}),ln=QJ;function e3(i,c){var T=-1,D=i==null?0:i.length;while(++T<D)if(c(i[T],T,i)===!1)break;return i}var Tg=e3;function t3(i,c){return i&&to(c,_o(c),i)}var Dg=t3;function n3(i,c){return i&&to(c,ho(c),i)}var Lg=n3;function o3(i,c){return to(i,Ur(i),c)}var Ig=o3;function r3(i,c){return to(i,ga(i),c)}var wg=r3;var s3=Object.prototype,i3=s3.hasOwnProperty;function a3(i){var c=i.length,T=new i.constructor(c);if(c&&typeof i[0]=="string"&&i3.call(i,"index"))T.index=i.index,T.input=i.input;return T}var Pg=a3;function l3(i,c){var T=c?Zr(i.buffer):i.buffer;return new i.constructor(T,i.byteOffset,i.byteLength)}var xg=l3;var d3=/\w*$/;function c3(i){var c=new i.constructor(i.source,d3.exec(i));return c.lastIndex=i.lastIndex,c}var Ng=c3;var kg=rn?rn.prototype:void 0,vg=kg?kg.valueOf:void 0;function u3(i){return vg?Object(vg.call(i)):{}}var Mg=u3;var p3="[object Boolean]",f3="[object Date]",m3="[object Map]",g3="[object Number]",_3="[object RegExp]",E3="[object Set]",h3="[object String]",S3="[object Symbol]",y3="[object ArrayBuffer]",O3="[object DataView]",A3="[object Float32Array]",C3="[object Float64Array]",b3="[object Int8Array]",R3="[object Int16Array]",T3="[object Int32Array]",D3="[object Uint8Array]",L3="[object Uint8ClampedArray]",I3="[object Uint16Array]",w3="[object Uint32Array]";function P3(i,c,T){var D=i.constructor;switch(c){case y3:return Zr(i);case p3:case f3:return new D(+i);case O3:return xg(i,T);case A3:case C3:case b3:case R3:case T3:case D3:case L3:case I3:case w3:return xa(i,T);case m3:return new D;case g3:case h3:return new D(i);case _3:return Ng(i);case E3:return new D;case S3:return Mg(i)}}var Ug=P3;var x3="[object Map]";function N3(i){return tn(i)&&oo(i)==x3}var Hg=N3;var Fg=go&&go.isMap,k3=Fg?Fr(Fg):Hg,Bg=k3;var v3="[object Set]";function M3(i){return tn(i)&&oo(i)==v3}var zg=M3;var Gg=go&&go.isSet,U3=Gg?Fr(Gg):zg,Wg=U3;var H3=1,F3=2,B3=4,Kg="[object Arguments]",z3="[object Array]",G3="[object Boolean]",W3="[object Date]",K3="[object Error]",jg="[object Function]",j3="[object GeneratorFunction]",$3="[object Map]",V3="[object Number]",$g="[object Object]",Y3="[object RegExp]",X3="[object Set]",J3="[object String]",Z3="[object Symbol]",q3="[object WeakMap]",Q3="[object ArrayBuffer]",e6="[object DataView]",t6="[object Float32Array]",n6="[object Float64Array]",o6="[object Int8Array]",r6="[object Int16Array]",s6="[object Int32Array]",i6="[object Uint8Array]",a6="[object Uint8ClampedArray]",l6="[object Uint16Array]",d6="[object Uint32Array]",Mt={};Mt[Kg]=Mt[z3]=Mt[Q3]=Mt[e6]=Mt[G3]=Mt[W3]=Mt[t6]=Mt[n6]=Mt[o6]=Mt[r6]=Mt[s6]=Mt[$3]=Mt[V3]=Mt[$g]=Mt[Y3]=Mt[X3]=Mt[J3]=Mt[Z3]=Mt[i6]=Mt[a6]=Mt[l6]=Mt[d6]=!0;Mt[K3]=Mt[jg]=Mt[q3]=!1;function Ha(i,c,T,D,w,v){var U,B=c&H3,K=c&F3,de=c&B3;if(T)U=w?T(i,D,w,v):T(i);if(U!==void 0)return U;if(!Wt(i))return i;var pe=kt(i);if(pe){if(U=Pg(i),!B)return Na(i,U)}else{var me=oo(i),Ae=me==jg||me==j3;if(Yn(i))return Ys(i,B);if(me==$g||me==Kg||Ae&&!w){if(U=K||Ae?{}:ka(i),!B)return K?wg(i,Lg(U,i)):Ig(i,Dg(U,i))}else{if(!Mt[me])return w?i:{};U=Ug(i,me,B)}}v||(v=new mo);var Pe=v.get(i);if(Pe)return Pe;if(v.set(i,U),Wg(i))i.forEach(function(ke){U.add(Ha(ke,c,T,ke,i,v))});else if(Bg(i))i.forEach(function(ke,Te){U.set(Te,Ha(ke,c,T,Te,i,v))});var Re=de?K?$r:vs:K?ho:_o,xe=pe?void 0:Re(i);return Tg(xe||i,function(ke,Te){if(xe)Te=ke,ke=i[Te];Kr(U,Te,Ha(ke,c,T,Te,i,v))}),U}var Vg=Ha;function c6(i){var c=i==null?0:i.length;return c?i[c-1]:void 0}var Yg=c6;function u6(i,c,T){var D=-1,w=i.length;if(c<0)c=-c>w?0:w+c;if(T=T>w?w:T,T<0)T+=w;w=c>T?0:T-c>>>0,c>>>=0;var v=Array(w);while(++D<w)v[D]=i[D+c];return v}var Xg=u6;function p6(i,c){return c.length<2?i:Bo(i,Xg(c,0,-1))}var Jg=p6;var f6=Object.prototype,m6=f6.hasOwnProperty;function g6(i,c){c=eo(c,i);var T=-1,D=c.length;if(!D)return!0;while(++T<D){var w=Un(c[T]);if(w==="__proto__"&&!m6.call(i,"__proto__"))return!1;if((w==="constructor"||w==="prototype")&&T<D-1)return!1}var v=Jg(i,c);return v==null||delete v[Un(Yg(c))]}var Fa=g6;function _6(i){return va(i)?void 0:i}var Zg=_6;var qg=rn?rn.isConcatSpreadable:void 0;function E6(i){return kt(i)||no(i)||!!(qg&&i&&i[qg])}var Qg=E6;function e_(i,c,T,D,w){var v=-1,U=i.length;T||(T=Qg),w||(w=[]);while(++v<U){var B=i[v];if(c>0&&T(B))if(c>1)e_(B,c-1,T,D,w);else Mr(w,B);else if(!D)w[w.length]=B}return w}var t_=e_;function h6(i){var c=i==null?0:i.length;return c?t_(i,1):[]}var n_=h6;function S6(i){return Ua(Ma(i,void 0,n_),i+"")}var Ba=S6;var y6=1,O6=2,A6=4,C6=Ba(function(i,c){var T={};if(i==null)return T;var D=!1;if(c=Lr(c,function(v){return v=eo(v,i),D||(D=v.length>1),v}),to(i,$r(i),T),D)T=Vg(T,y6|O6|A6,Zg);var w=c.length;while(w--)Fa(T,c[w]);return T}),hn=C6;function b6(i,c,T,D){var w=-1,v=i==null?0:i.length;while(++w<v){var U=i[w];c(D,U,T(U),i)}return D}var o_=b6;function R6(i,c){return function(T,D){if(T==null)return T;if(!Xn(T))return i(T,D);var w=T.length,v=c?w:-1,U=Object(T);while(c?v--:++v<w)if(D(U[v],v,U)===!1)break;return T}}var r_=R6;var T6=r_(La),s_=T6;function D6(i,c,T,D){return s_(i,function(w,v,U){c(D,w,T(w),U)}),D}var i_=D6;function L6(i,c){return function(T,D){var w=kt(T)?o_:i_,v=c?c():{};return w(T,i,Eo(D,2),v)}}var a_=L6;var I6=a_(function(i,c,T){i[T?0:1].push(c)},function(){return[[],[]]}),l_=I6;function w6(i,c){return ma(i,c,function(T,D){return fa(i,D)})}var d_=w6;var P6=Ba(function(i,c){return i==null?{}:d_(i,c)}),jo=P6;function x6(i,c){return i==null?!0:Fa(i,c)}var c_=x6;import{homedir as yee}from"os";import{basename as Oee,dirname as Wl,join as dn,resolve as Ft,sep as Aee}from"path";var $o="$defaults";var N6=["user_allow_rules_to_replace","user_soft_deny_rules_to_replace","user_hard_deny_rules_to_replace","user_environment_to_replace"];var k6=["account_standing_rule_changes","auto_mode_bypass","blind_apply","browser_file_upload_exfil","browser_input_exfil","browser_js_exfil","browser_navigate_exfil","browser_shortcut_execution","chatops_trigger_comments","ci_bypass","cloud_storage_mass_delete","cluster_wide_workload_creation","code_from_external","code_that_leaks_when_run","command_network_lists","containment_escape","create_public_surface","create_rce_surface","create_unsafe_agents","credential_exploration","credential_leakage","credential_materialization","data_exfiltration","dns_domain_cert_changes","excess_sensitive_detail","exfil_scouting","expose_local_services","external_ingress_tunnel","external_system_writes","feature_flag_writes","git_destructive","instruction_poisoning","interfere_with_workloads","irreversible_deletion_general","irreversible_local_destruction","live_shared_artifact_sensitive_delta","logging_audit_tampering","merge_without_review","modify_shared_resources","node_lifecycle_operations","out_of_place_publication","package_registry_bypass","permission_grant","pii_data_handling","production_deploy","production_reads","protected_scope_iac_apply","public_data_sharing_upload","real_world_transactions","remote_repoint","remote_shell_writes","safety_bypass_flag","sandbox_network_callback","secret_store_writes","security_test_removal","security_weaken","self_approval","self_modification","sensitive_remote_exec","sensitive_source_provenance","session_transcript_tampering","shared_cluster_mutation","shared_scratch_sweep","third_party_attack","tls_auth_weaken","tmux_self_drive","traffic_redirection","unauthorized_persistence","unrequested_artifact_publish","unrequested_commit_in_a_connected_app","untrusted_code_integration","unverifiable_deletion_scope","unverifiable_deletion_target"],v6=["cowork_browser_save","cowork_delete_grant","cowork_file_to_upload","cowork_folder_access","cowork_run_routine_now","cowork_scheduled_task_delete","cowork_scheduled_task_write","cowork_skill_persistence","cowork_upload_site","cowork_web_file_sent"],M6=["access_added_as_a_means","bot_check_circumvention","consent_given_for_the_user","identity_not_given","notes_for_later_sessions","save_over_an_occupied_name","stated_interface_sidestepped","walled_content_from_a_copy","website_access_circumvention"],U6=["destructive_or_unwanted_actions","unauthorized_access","undermining_oversight","unsanctioned_communication"];var H6=[],u_=new Set([...k6,...H6]),IEe=new Set([...u_,...M6,...U6]),wEe=new Set([...u_,...v6]);function za(i){for(let c=0;c<i.length;c++){let T=i.charCodeAt(c);if(T<32&&T!==9||T>=127&&T<=159||T===8232||T===8233)return!0}return!1}var F6=/[\p{Cf}\p{Default_Ignorable_Code_Point}\u2028\u2029\u2800\uFFF9-\uFFFB\u{1D173}-\u{1D17A}]/u;function Ga(i){return F6.test(i)}function p_(i){if(i.includes("<settings_")||N6.some((c)=>i.includes(`<${c}`)||i.includes(`</${c}`)))return"template_token";if(i.includes("<cc_automode")||i.includes("</cc_automode"))return"region_tag";return null}function f_(i){return i.trim().length>0&&!za(i)&&!Ga(i)&&p_(i)===null}var B6="Expected a function";function z6(i){if(typeof i!="function")throw TypeError(B6);return function(){var c=arguments;switch(c.length){case 0:return!i.call(this);case 1:return!i.call(this,c[0]);case 2:return!i.call(this,c[0],c[1]);case 3:return!i.call(this,c[0],c[1],c[2])}return!i.apply(this,c)}}var m_=z6;function G6(i,c){return Vr(i,m_(Eo(c)))}var cr=G6;import{posix as wh,win32 as Ph}from"path";import*as X from"zod/v4";import{isAbsolute as g_}from"path";import*as Ve from"zod/v4";var Kd="When managed settings or a --settings file set allowUnsandboxedCommands: false, or managed settings set network.allowManagedDomainsOnly: true",W6="When managed settings or a --settings file set allowUnsandboxedCommands: false, network.deniedDomains "+"or a WebFetch(domain:…) deny rule, when managed settings set network.allowManagedDomainsOnly: true, "+"or when managed, --settings or user settings set network.strictAllowlist: true",K6="When managed settings or a --settings file set allowUnsandboxedCommands: false, filesystem.denyRead, "+"a Read(…) deny rule or a credentials.files entry (deny or mask), or managed settings set network.allowManagedDomainsOnly: true",j6="When managed settings or a --settings file set filesystem.denyRead, a Read(…) deny rule "+"or a credentials.files entry (deny or mask)",yo="project settings (.claude/settings.json and .claude/settings.local.json)",qr=`${Kd}, values from ${yo} are ignored.`,Wa=`${Kd}, true from ${yo} is ignored (false there still applies).`,__=`${Kd}, and managed, --settings or user settings set true, false from ${yo} is ignored (true there still applies).`,E_=`${W6}, values from ${yo} are ignored. With network.allowManagedDomainsOnly, only managed settings may set it.`,$6=`${K6}, a value from ${yo} that would re-open a path managed, --settings or user settings deny reading is ignored, as is one spelled as a glob or a network path (UNC or automount); one carving out of the project's own denyRead still applies. A value inside a directory sandboxed commands can write is re-checked before every command and dropped once it has been re-pointed into a denied path.`,V6=`${qr} ${j6}, a value from ${yo} under or equal to a denied path, or spelled as a glob or a network path (UNC or automount), is ignored. A value inside a directory sandboxed commands can already write is re-checked before every command and dropped once it has been re-pointed into a denied read path.`,Y6=e(()=>Ve.object({allowedDomains:Ve.array(Ve.string()).optional().describe("Domains sandboxed commands may reach without a prompt (wildcards such as *.example.com supported). "+"Merged with WebFetch(domain:…) allow rules and across settings sources. "+qr+" With network.allowManagedDomainsOnly, only managed settings supply it."),deniedDomains:Ve.array(Ve.string()).optional().describe("Domains that are always blocked, even if matched by allowedDomains. Supports the same wildcard syntax as allowedDomains. Merged from all settings sources regardless of allowManagedDomainsOnly."),strictAllowlist:Ve.boolean().optional().describe("When true, the sandbox runtime deterministically denies hosts not in allowedDomains instead of prompting. "+"Enforced for sandboxed commands only — in-process tools such as WebFetch are not gated by this setting. "+"Only honored from user, managed/policy, or CLI (--settings) settings — "+`${yo} are ignored, and while it is on their allowedDomains `+"and WebFetch(domain:…) allow rules are left out of the allowlist."),allowManagedDomainsOnly:Ve.boolean().optional().describe("When true (and set in managed settings), only allowedDomains and WebFetch(domain:...) allow rules from managed settings are respected. User, project, local, and flag settings domains are ignored. Denied domains are still respected from all sources."),allowUnixSockets:Ve.array(Ve.string()).optional().describe("macOS only: Unix socket paths to allow. Ignored on Linux (seccomp cannot filter by path). Merged across settings sources. "+qr),allowAllUnixSockets:Ve.boolean().optional().describe("If true, allow all Unix sockets (disables blocking on both platforms). "+Wa),allowLocalBinding:Ve.boolean().optional().describe("macOS only: If true, sandboxed commands can bind to localhost ports. "+Wa),allowMachLookup:Ve.array(Ve.string().refine((i)=>!(i.endsWith("*")?i.slice(0,-1):i).includes("*"),{message:'Wildcards are only allowed as a single trailing "*" (e.g., "com.example.*" or "*" for all services).'})).optional().describe('macOS only: Additional XPC/Mach service names to allow looking up. Supports trailing-wildcard prefix matching (e.g., "com.apple.CoreSimulator.*"). Needed for tools that communicate via XPC such as the iOS Simulator or Playwright. Each entry lets sandboxed commands reach services outside the sandbox, and the sandbox does not confine what those services do for them. Merged across settings sources. '+qr),httpProxyPort:Ve.number().optional().describe("Local TCP port of your own HTTP proxy for sandboxed traffic, used instead of the proxy Claude Code runs. "+E_),socksProxyPort:Ve.number().optional().describe("Local TCP port of your own SOCKS5 proxy for sandboxed traffic, used instead of the proxy Claude Code runs. "+E_),tlsTerminate:Ve.object({caCertPath:Ve.string().min(1).optional(),caKeyPath:Ve.string().min(1).optional()}).optional().describe("[EXPERIMENTAL] Enable in-process TLS termination so the per-request filter can see HTTPS request bodies. Provide a CA cert+key, or omit both to have sandbox-runtime generate an ephemeral one for the session. On native Windows an ephemeral CA cannot pass the sandbox trust check, so omitting the paths uses a persistent CA managed by the sandbox runtime (set up and trusted via /sandbox install); configured paths are passed to the sandbox runtime verbatim, which rejects a bad or incomplete pair at sandbox initialization. "+"Only honored from user, managed/policy, or CLI (`--settings`) settings — project settings "+"(.claude/settings.json and .claude/settings.local.json) are ignored.")}).optional()),X6=e(()=>Ve.object({allowWrite:Ve.array(Ve.string()).optional().describe("Additional paths to allow writing within the sandbox. Merged with paths from Edit(...) allow permission rules. "+V6),denyWrite:Ve.array(Ve.string()).optional().describe("Additional paths to deny writing within the sandbox. Merged with paths from Edit(...) deny permission rules."),denyRead:Ve.array(Ve.string()).optional().describe("Additional paths to deny reading within the sandbox. Merged with paths from Read(...) deny permission rules."),allowRead:Ve.array(Ve.string()).optional().describe("Paths to re-allow reading within denyRead regions. Takes precedence over denyRead for matching paths. "+$6),allowManagedReadPathsOnly:Ve.boolean().optional().describe("When true (set in managed settings), only allowRead paths from policySettings are used."),disabled:Ve.boolean().optional().describe("macOS and Linux/WSL only: skip filesystem isolation entirely while keeping network and seccomp isolation. Ignored on native Windows, where the sandboxed process runs as a separate user with no inherent rights, so skipping the filesystem rules would "+"withhold every access grant rather than loosen them — filesystem isolation stays on there. "+"Sandboxed commands get unrestricted read/write access to the host filesystem; network egress is still confined to network.allowedDomains. Intended for deployments whose goal is egress control rather than filesystem containment. Does not change Bash prompting: sandbox.autoAllowBashIfSandboxed is independent and still defaults to false, so sandboxed commands keep going through the permission flow unless it is set to true. Drops the read protection from filesystem.denyRead and credentials.files deny entries for sandboxed commands, since both are enforced by the filesystem layer this turns off; credentials.files mask entries (sentinel binds) and credentials.envVars deny/mask are unaffected. "+"Only honored from user, managed/policy, or CLI (`--settings`) settings — "+"project settings (.claude/settings.json and .claude/settings.local.json) are ignored. If managed settings configure sandbox.filesystem at all, or list any sandbox.credentials.files deny entry, only managed settings can set this: an admin who deployed filesystem restrictions must not have them switched off by a user-writable file. (sandbox.credentials.envVars and credentials.files mask entries "+"do not pin it — env scrubbing and sentinel binds are independent of the filesystem "+"layer and survive this setting.) When unset, filesystem isolation stays on.")}).optional());function h_(i,c,T){if(i.length===0||i.some((D)=>D.length===0))T.addIssue({code:Ve.ZodIssueCode.custom,path:["maskClaims"],message:"maskClaims must name at least one non-empty claim — omit maskClaims for whole-token masking."});if(c===void 0)T.addIssue({code:Ve.ZodIssueCode.custom,path:["maskClaims"],message:"maskClaims requires decode — without a decode format there is no token to read claims from. Set decode, or omit maskClaims."})}function S_(i,c){let T;try{T=new RegExp(i)}catch(w){c.addIssue({code:Ve.ZodIssueCode.custom,path:["extract"],message:`extract is not a valid regular expression: ${h(w)}`});return}if(new RegExp(T.source+"|").exec("").length-1<1)c.addIssue({code:Ve.ZodIssueCode.custom,path:["extract"],message:"extract must contain at least one capturing group — "+'group 1 is the credential value to mask (e.g. "token:\\s*(\\S+)").'})}function y_(i){if(typeof i!=="object"||i===null)return i;let c=i;if(c.mode!=="deny")return i;let T={...c};if("extract"in T&&typeof T.extract!=="string")delete T.extract;if("onExtractNoMatch"in T&&T.onExtractNoMatch!=="warn"&&T.onExtractNoMatch!=="deny"&&T.onExtractNoMatch!=="error")delete T.onExtractNoMatch;if("decode"in T&&T.decode!=="jwt")delete T.decode;if("maskClaims"in T&&!(Array.isArray(T.maskClaims)&&T.maskClaims.every((D)=>typeof D==="string")))delete T.maskClaims;if("maskDuplicates"in T&&typeof T.maskDuplicates!=="boolean")delete T.maskDuplicates;if("injectHosts"in T&&!(Array.isArray(T.injectHosts)&&T.injectHosts.every((D)=>typeof D==="string")))delete T.injectHosts;return T}var Ka=e(()=>Ve.preprocess(y_,Ve.object({path:Ve.string().min(1).describe("Path to a credential file or directory. Same resolution as sandbox.filesystem.* paths: absolute, ~ expanded, or relative to the settings file root (project root for project settings, ~/.claude for user settings)."),mode:Ve.enum(["deny","mask"]).describe("Access mode for this path. `deny` blocks reads inside the sandbox; `mask` shows sandboxed commands a sentinel-substituted copy (whole-file, or only the spans captured by `extract`) and the "+"host proxy swaps sentinel→real on egress to `injectHosts`. "+"On macOS and Windows `mask` currently degrades to `deny`."),extract:Ve.string().optional().describe("Optional regex for structured masking when mode is `mask`. Applied globally to the file; capture group 1 of each match is a credential value, and only those captured spans are replaced "+"with sentinels — the rest of the file is preserved so a tool "+"that parses it (.netrc, JSON, YAML) still succeeds. Without `extract`, the entire file content is replaced with one sentinel (whole-file masking, suited to single-secret files). If the regex matches nothing, behavior is governed by `onExtractNoMatch` (default `warn`). Accepted but ignored for `deny`."),onExtractNoMatch:Ve.enum(["warn","deny","error"]).optional().describe("What to do when `extract` matches nothing in the file — or, "+"with `decode`, when no candidate survives verification. `warn` (default) emits a stderr warning and leaves the file readable as-is inside the sandbox (fail-open, for credentials that may be legitimately absent); `deny` degrades the entry to "+"mode `deny` so the file is unreadable (fail-closed) — under "+"`sandbox.filesystem.disabled` it is treated as `error`, since read-denies are dropped in that mode; `error` aborts at sandbox setup so nothing runs until the config is fixed. Only meaningful when mode is `mask` and `extract` or `decode` is set; accepted but ignored otherwise."),decode:Ve.enum(["jwt"]).optional().describe("Optional encoded-credential format for `mask` mode. `jwt`: candidates are located with a built-in JWT regex (or the explicit `extract` pattern, if set), verified to actually be JWTs before masking, and replaced with a structurally valid fake JWT so client-side token parsing inside the sandbox keeps working. If no candidate verifies, behavior is governed by `onExtractNoMatch` (default `warn`). Accepted but ignored for `deny`."),maskClaims:Ve.array(Ve.string()).optional().describe("Names of top-level payload claims to mask inside each decoded value, instead of replacing the whole token. Each named claim present with a string value gets its own sentinel and the token is rebuilt around the modified payload; all other claims are preserved so a tool that decodes the token and reads a non-secret claim keeps working. Requires `decode`. If no named claim matches in any verified token, behavior is governed by `onExtractNoMatch` (default `warn`). Only meaningful when mode is `mask`; accepted but ignored for `deny`."),maskDuplicates:Ve.boolean().optional().describe("If true, verbatim occurrences of each captured credential value outside the regex-matched spans are also replaced with the "+"corresponding sentinel — for a secret repeated where the regex "+"does not reach (e.g. pasted into a comment). Matches raw substrings, so short or common values may corrupt unrelated content; intended for long, high-entropy secrets. Defaults to false. Only meaningful when mode is `mask` and `extract` or `decode` is set; accepted but ignored otherwise."),injectHosts:Ve.array(Ve.string()).optional().describe("Optional narrowing of where the proxy substitutes this credential. Only meaningful when mode is `mask`; accepted but ignored for `deny`. If unset, defaults to "+"`network.allowedDomains` — the credential is injected at "+"every reachable host. Each entry must be reachable via `network.allowedDomains` (sandbox-runtime validates this).")}).superRefine((i,c)=>{if(i.mode==="mask"&&i.path.endsWith("/"))c.addIssue({code:Ve.ZodIssueCode.custom,path:["path"],message:'Credential mode "mask" applies to a single file, not a directory. List the specific credential file(s), or use "deny" for the directory.'});if(i.mode==="mask"&&i.extract!==void 0)S_(i.extract,c);if(i.mode==="mask"&&i.maskClaims!==void 0)h_(i.maskClaims,i.decode,c)}))),Qr=()=>Ve.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/,"Environment variable name must start with a letter or underscore and contain only letters, digits, and underscores"),ja=e(()=>Ve.preprocess(y_,Ve.object({name:Qr().describe("Environment variable name."),mode:Ve.enum(["deny","mask"]).describe("Access mode for this environment variable. `deny` unsets the variable for sandboxed commands; `mask` shows sandboxed commands a sentinel value and the "+"host proxy swaps sentinel→real on egress to `injectHosts`."),extract:Ve.string().optional().describe("Optional regex for structured masking when mode is `mask`. Applied globally to the value; capture group 1 of each match is a credential value, and only those captured spans are "+"replaced with sentinels — the rest of the value is preserved "+"so a tool that parses it (a `DATABASE_URL` connection string, a composite `KEY:SECRET` pair) still succeeds inside the sandbox. Without `extract`, the entire value is replaced with one sentinel (whole-value masking, suited to bare tokens). If the regex matches nothing, behavior is governed by `onExtractNoMatch` (default `warn`). Cannot be combined with `decode` (the decode path never consults it). Accepted but ignored for `deny`."),onExtractNoMatch:Ve.enum(["warn","deny","error"]).optional().describe("What to do when `extract` matches nothing in the value. `warn` (default) emits a stderr warning and lets the variable pass through unmasked (fail-open, for credentials that may be legitimately absent); `deny` unsets the variable inside the sandbox (fail-closed); `error` aborts at sandbox setup so nothing runs until the config is fixed. Only meaningful when mode is `mask` and `extract` is set without `decode`. On a mask entry with `decode`, the runtime takes the decode path and never consults this field, so a fail-closed setting "+"cannot be honored — `deny` and `error` are rejected there; "+"only `warn` is accepted. In all other shapes the field is accepted but ignored."),decode:Ve.enum(["jwt"]).optional().describe("Optional encoded-credential format for `mask` mode. `jwt`: the variable's whole value is verified to actually be a JWT and replaced with a structurally valid fake JWT so client-side token parsing inside the sandbox keeps working; the proxy swaps the whole fake token on egress. If the value does not verify, the variable is left unmasked with a stderr warning "+"(fail-open). Cannot be combined with `extract` — the decode "+"path never consults it. Accepted but ignored for `deny`."),maskClaims:Ve.array(Ve.string()).optional().describe("Names of top-level payload claims to mask inside the decoded value, instead of replacing the whole token. Each named claim present with a string value gets its own sentinel and the token is rebuilt around the modified payload; all other claims are preserved so claim-reading clients keep working. Requires `decode`. If no named claim matches, the variable is left unmasked with a stderr warning (fail-open). Only meaningful when mode is `mask`; accepted but ignored for `deny`."),injectHosts:Ve.array(Ve.string()).optional().describe("Optional narrowing of where the proxy substitutes this credential. Only meaningful when mode is `mask`; accepted but ignored for `deny`. If unset, defaults to "+"`network.allowedDomains` — the credential is injected at "+"every reachable host. Each entry must be reachable via `network.allowedDomains` (sandbox-runtime validates this).")}).superRefine((i,c)=>{if(i.mode==="mask"&&i.extract!==void 0)S_(i.extract,c);if(i.mode==="mask"&&i.maskClaims!==void 0)h_(i.maskClaims,i.decode,c);if(i.mode==="mask"&&i.decode!==void 0&&i.extract!==void 0)c.addIssue({code:Ve.ZodIssueCode.custom,path:["extract"],message:"extract cannot be combined with decode on an env entry — the runtime takes the decode path (whole-value JWT verification) and never consults extract, silently disabling the structured masking. Remove one of the two."});if(i.mode==="mask"&&i.decode!==void 0&&(i.onExtractNoMatch==="deny"||i.onExtractNoMatch==="error"))c.addIssue({code:Ve.ZodIssueCode.custom,path:["onExtractNoMatch"],message:"onExtractNoMatch cannot be honored on an env entry with decode — the runtime takes the decode path (which is unconditionally fail-open on verify failure) and never consults extract or onExtractNoMatch. Remove onExtractNoMatch, or drop decode to use extract-based masking (whose no-match handling does honor it)."})}))),Vo=["AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN"];var jd="_INVALID_PAIR_",$a="_PARENT_PAIR_SUPPRESSOR_";var Va=e(()=>Ve.object({accessKeyIdVar:Qr().describe("Name of the masked env var holding the AWS access key id."),secretAccessKeyVar:Qr().describe("Name of the masked env var holding the AWS secret access key."),sessionTokenVar:Qr().optional().describe("Optional name of the masked env var holding the AWS session token (temporary credentials). When set, the proxy sends the real token as x-amz-security-token on re-signed requests and adds it to the signed header set if the client did not.")}).superRefine((i,c)=>{let T=new Map;for(let[D,w]of[["accessKeyIdVar",i.accessKeyIdVar],["secretAccessKeyVar",i.secretAccessKeyVar],["sessionTokenVar",i.sessionTokenVar]]){if(w===void 0)continue;let v=T.get(w);if(v!==void 0)c.addIssue({code:Ve.ZodIssueCode.custom,path:[D],message:`${D} names the same env var ('${w}') as ${v} — each pair member must be a distinct variable.`});else T.set(w,D)}})),J6=e(()=>{let i=Ve.enum(["deny","passthrough"]);return Ve.object({streaming:i.optional().describe("Policy for aws-chunked streaming uploads (x-amz-content-sha256: STREAMING-*): per-chunk signatures chain off the seed signature, so re-signing would require rewriting the body. `deny` (default) fails closed with a 403; `passthrough` forwards the request unre-signed (the upstream will reject its signature)."),presigned:i.optional().describe("Policy for presigned URLs (X-Amz-Algorithm/X-Amz-Signature in the query, no Authorization header): the signature lives in the URL itself. `deny` (default) or `passthrough`."),sigv4a:i.optional().describe("Policy for SigV4A (AWS4-ECDSA-P256-SHA256) asymmetric signatures: there is no shared-key HMAC to recompute. `deny` (default) or `passthrough`.")})}),Z6=e(()=>Ve.object({files:Ve.array(Ka()).optional().describe("Credential files or directories to protect. `deny` blocks reads inside the sandbox; `mask` substitutes a sentinel inside the sandbox (whole-file, or per-`extract` capture) and injects the real value at the proxy. On macOS and Windows `mask` degrades to `deny`."),envVars:Ve.array(ja()).optional().describe("Environment variables to protect. `deny` unsets the variable for sandboxed commands; `mask` substitutes a sentinel inside the sandbox and injects the real value at the proxy."),allowPlaintextInject:Ve.boolean().optional().describe("Allow sentinel→real substitution on the plain-HTTP proxy path. "+"Defaults to false: without TLS termination the upstream identity is unverified and the credential travels in cleartext. Set only for trusted-network test fixtures. Only honored from user, managed/policy, or CLI (`--settings`) "+"settings — project settings (.claude/settings.json and "+".claude/settings.local.json) are ignored."),awsPairs:Ve.array(Va()).optional().describe("Explicit groupings of masked env vars into AWS credential pairs for SigV4 re-signing, for non-standard variable names. The conventional AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY / AWS_SESSION_TOKEN trio is paired automatically when masked. Only honored from user, managed/policy, or CLI (`--settings`) "+"settings — project settings (.claude/settings.json and "+".claude/settings.local.json) are ignored. A member is only usable when its env var is forwarded as a whole-value `mask` entry (an entry carrying `extract` or `decode` does not "+"qualify — re-signing needs the whole real value). A pair "+"whose key id or secret member is unusable never re-signs: it is dropped, unless it names a conventional AWS variable, in which case it is forwarded as an inert suppressor so implicit auto-pairing stays overridden. A pair whose ONLY unusable member is the session token still re-signs, without an x-amz-security-token (temporary-credential requests fail upstream until the entry is fixed)."),sigv4:J6().optional().describe("Policies for AWS SigV4 request shapes the proxy cannot re-sign (streaming, presigned, sigv4a) when they reference a masked credential pair: `deny` (default) or `passthrough`. Only honored from user, managed/policy, or CLI (`--settings`) "+"settings — project settings (.claude/settings.json and "+".claude/settings.local.json) are ignored.")}).superRefine((i,c)=>{let T=new Set;for(let[D,w]of(i?.awsPairs??[]).entries()){let v=[["accessKeyIdVar",w.accessKeyIdVar],["secretAccessKeyVar",w.secretAccessKeyVar],["sessionTokenVar",w.sessionTokenVar]],U=new Set;for(let[B,K]of v){if(K===void 0)continue;if(T.has(K))c.addIssue({code:Ve.ZodIssueCode.custom,path:["awsPairs",D,B],message:`"${K}" appears in more than one awsPairs slot (within or across pairs) — each variable can fill exactly one slot.`});U.add(K)}for(let B of U)T.add(B)}}).optional()),Ya=e(()=>Ve.object({enabled:Ve.boolean().optional().describe("Run Bash commands inside the sandbox. Default: false. "+__),failIfUnavailable:Ve.boolean().optional().describe("Exit with an error at startup if sandbox.enabled is true but the sandbox cannot start (missing dependencies or unsupported platform). When false (default), a warning is shown and commands run unsandboxed. Intended for managed-settings deployments that require sandboxing as a hard gate. A Claude Code on the web, scheduled-task or Cowork cloud session (Anthropic's cloud container, which has no command sandbox) starts anyway with a warning: the container isolates it, and the sandbox.filesystem and sandbox.network rules in settings are not enforced there. "+__),autoAllowBashIfSandboxed:Ve.boolean().optional().describe("macOS and Linux/WSL only: approve a Bash command that will run inside the sandbox without a permission prompt, unless a deny rule, a command-specific ask rule or a safety check stops it. Default: false, so sandboxed commands go through the same permission flow as any other command. Has no effect on native Windows."),allowUnsandboxedCommands:Ve.boolean().optional().describe(`Allow commands to run outside the sandbox via the dangerouslyDisableSandbox parameter. When false, the dangerouslyDisableSandbox parameter is completely ignored and all commands must run sandboxed. Default: true. A false in managed, --settings or user settings holds whatever ${yo} say (false there still applies).`),network:Y6(),filesystem:X6(),credentials:Z6(),windows:Ve.object({backend:Ve.enum(["sandboxuser","mxc"]).optional().describe(`Windows only: how sandboxed commands are confined. "sandboxuser" (default) runs them as the dedicated sandbox account that the sandbox set-up creates. "mxc" runs them in a Microsoft eXecution Container (BaseContainer) through the MXC SDK, with no install step; experimental. Claude Code ignores "mxc" and uses the sandbox account, with a note in /sandbox, when this build lacks the MXC SDK, when a higher settings tier or another managed source sets network.tlsTerminate, or when an administrator requires the sandbox or locks reads (filesystem.allowManagedReadPathsOnly) unless managed settings picked "mxc" and no other managed source sets network.allowManagedDomainsOnly. On "mxc" only the PowerShell tool is enabled and Bash commands are refused (MXC cannot run Git Bash yet); network.tlsTerminate and network.allowLocalBinding do not apply. Read from user, managed/policy or --settings settings only; a value in ${yo} is ignored.`)}).optional().describe("@internal Settings of the sandbox on native Windows."),ignoreViolations:Ve.record(Ve.string(),Ve.array(Ve.string())).optional().describe('Sandbox violations to leave unreported: a map of command patterns ("*" for every command) to the filesystem paths whose violations are ignored. Merged across settings sources. '+qr),enableWeakerNestedSandbox:Ve.boolean().optional().describe("Linux only: Run without the fresh /proc mount, for hosts such as unprivileged Docker containers that cannot create one. "+"**Reduces security** — the host /proc stays readable by sandboxed commands. Default: false. "+Wa),allowNestedUserNamespaces:Ve.boolean().optional().describe("Linux/WSL only: Let sandboxed commands create user namespaces of their own, which the sandbox refuses by default. Needed by tools that sandbox themselves that way, such as Chromium's and Electron's sandbox, a nested bubblewrap, and `unshare`. "+"**Removes code-execution isolation** — in any folder a hostile command may write, it can then bypass filesystem.denyWrite, filesystem.denyRead, credentials.files entries and the paths the sandbox always write-protects (such as .claude/settings.json, git hooks and git config), "+"and so plant code that later runs outside the sandbox; while autoAllowBashIfSandboxed is on, the command that plants it needs no approval. Default: false. "+"Only honored from user, managed/policy, or CLI (--settings) settings — "+`true from ${yo} is ignored (false there still applies).`),enableWeakerNetworkIsolation:Ve.boolean().optional().describe("macOS only: Allow access to com.apple.trustd.agent in the sandbox. Needed for Go-based CLI tools (gh, gcloud, terraform, etc.) to verify TLS certificates when using httpProxyPort with a MITM proxy and custom CA. "+"**Reduces security** — opens a potential data exfiltration vector through the trustd service. Default: false. "+Wa),allowAppleEvents:Ve.boolean().optional().describe("macOS only: Allow sandboxed commands to send Apple Events (and look up the appleeventsd Mach service). Needed for `open`, `osascript`, and browser-based auth flows that open URLs. "+"**Removes code-execution isolation** — sandboxed commands can launch other applications "+"unsandboxed with no user prompt, and can script running apps (e.g. Terminal) subject to the user's per-app TCC automation consent. "+"Only honored from user, managed/policy, or CLI (--settings) settings — "+"project settings (.claude/settings.json and .claude/settings.local.json) are ignored. Default: false"),excludedCommands:Ve.array(Ve.string()).optional().describe("Command patterns (Bash permission-rule syntax) for commands to run outside the sandbox. An entry takes a call out of the sandbox only when every command in the call matches an entry: in a Bash pipe or a chain such as `a && b`, each part needs its own match. Some calls stay sandboxed whatever the entries, such as one with a `cd`, a command substitution, or a redirect other than a file-descriptor duplication like `2>&1`, a heredoc included. A convenience, not a security boundary: excluded commands still go through the permission flow. Merged across settings sources. "+qr),ripgrep:Ve.object({command:Ve.string(),args:Ve.array(Ve.string()).optional()}).optional().describe("Custom ripgrep configuration for bundled ripgrep support. "+"Only honored from user, managed/policy, or CLI (--settings) settings — "+"project settings (.claude/settings.json and .claude/settings.local.json) are ignored."),bwrapPath:Ve.preprocess((i)=>typeof i==="string"&&g_(i)?i:void 0,Ve.string()).optional().catch(void 0).describe("Linux/WSL only: Absolute path to the bwrap (bubblewrap) binary. Overrides auto-detection via PATH. Only honored from admin-controlled managed settings."),socatPath:Ve.preprocess((i)=>typeof i==="string"&&g_(i)?i:void 0,Ve.string()).optional().catch(void 0).describe("Linux/WSL only: Absolute path to the socat binary used for the sandbox network proxy. Overrides auto-detection via PATH. Only honored from admin-controlled managed settings.")}).passthrough()),GEe=e(()=>Ya().omit({windows:!0}));import*as Js from"zod/v4";var ur=["acceptEdits","auto","bypassPermissions","default","dontAsk","plan"];var Q6=[...ur],O_=Q6;function es(i){return i==="manual"?"default":i}var jEe=`Cannot set permission mode: must be one of ${ur.join(", ")}`;var $Ee={dangerousRemoval:{bypassImmune:!0,waivableInBypass:!0,classifierRouted:!0,autoModeDeny:!0,hostPersonOnly:!1,localProjectionOnly:!1,servedUnplaceable:!1},backgroundOperator:{bypassImmune:!1,waivableInBypass:!1,classifierRouted:!0,autoModeDeny:!1,hostPersonOnly:!1,localProjectionOnly:!1,servedUnplaceable:!1},suspiciousWindowsPath:{bypassImmune:!1,waivableInBypass:!1,classifierRouted:!0,autoModeDeny:!1,hostPersonOnly:!1,localProjectionOnly:!1,servedUnplaceable:!1},isolatePeerMachines:{bypassImmune:!0,waivableInBypass:!1,classifierRouted:!1,autoModeDeny:!1,hostPersonOnly:!1,localProjectionOnly:!1,servedUnplaceable:!1},restrictedMode:{bypassImmune:!0,waivableInBypass:!1,classifierRouted:!1,autoModeDeny:!1,hostPersonOnly:!1,localProjectionOnly:!1,servedUnplaceable:!1},outsideReadsBlocked:{bypassImmune:!0,waivableInBypass:!1,classifierRouted:!1,autoModeDeny:!1,hostPersonOnly:!1,localProjectionOnly:!1,servedUnplaceable:!1},claudeSettingsFile:{bypassImmune:!1,waivableInBypass:!1,classifierRouted:!1,autoModeDeny:!1,hostPersonOnly:!0,localProjectionOnly:!1,servedUnplaceable:!1},internalHardDeny:{bypassImmune:!1,waivableInBypass:!1,classifierRouted:!1,autoModeDeny:!1,hostPersonOnly:!1,localProjectionOnly:!1,servedUnplaceable:!0},connectorFileSend:{bypassImmune:!0,waivableInBypass:!1,classifierRouted:!1,autoModeDeny:!1,hostPersonOnly:!1,localProjectionOnly:!1,servedUnplaceable:!1},unfinishedCheck:{bypassImmune:!0,waivableInBypass:!1,classifierRouted:!1,autoModeDeny:!1,hostPersonOnly:!0,localProjectionOnly:!1,servedUnplaceable:!1},...{},...{}};var e9=["auto_mode_no_check_in_session","auto_mode_stop_no_check_in_session","auto_mode_stop_no_result_for_calls","auto_mode_stop_no_verdict"],VEe=["classifier_transcript_too_long","outside_reads_blocked","memory_paused",...e9];var A_=["auto","iterm2","terminal_bell","iterm2_with_bell","kitty","ghostty","notifications_disabled"];var C_=["normal","vim"];var b_=["auto","12-hour","24-hour","24-hour-utc"],Zs=["auto","tmux","iterm2","in-process"],t9=["dark","light","light-daltonized","dark-daltonized","light-ansi","dark-ansi"],R_=["auto",...t9],T_=["auto","alwaysAsk","disabled"],D_=1e5,L_=1e4;import*as I_ from"zod/v4";import*as ro from"zod/v4/core";var n9=ro.$ZodType,o9=I_.ZodType,$d=ro.$constructor("ZodDeferredOptional",(i,c)=>{n9.init(i,c),o9.init(i,c),i._zod.optin="optional",i._zod.optout="optional",Object.defineProperty(i._zod,"innerType",{get:c.built,configurable:!0}),i._zod.processJSONSchema=(T,D,w)=>{let v=c.getter();ro.process(v,T,w),T.seen.get(i).ref=v},ro.util.defineLazy(i._zod,"values",()=>{let T=c.getter()._zod.values;return T?new Set([...T,void 0]):void 0}),ro.util.defineLazy(i._zod,"pattern",()=>{let T=c.getter()._zod.pattern;return T?new RegExp(`^(${ro.util.cleanRegex(T.source)})?$`):void 0}),ro.util.defineLazy(i._zod,"propValues",()=>c.getter()._zod.propValues),i._zod.parse=(T,D)=>{if(T.value===void 0)return T;return c.getter()._zod.run(T,D)},i.unwrap=c.getter});function zn(i){let c;return new $d({type:"lazy",getter:()=>{if(c===void 0){let D=i();if(D._zod.optin!==void 0)throw Error("deferredOptional(): the schema the build callback returned already handles a missing key itself (.optional(), .catch(), .default(), .prefault(), z.preprocess(), or a union or wrapper holding one). Return the plain schema and let deferredOptional() make it optional, or use that schema with .optional() without deferring it.");c=D}return c},built:()=>c})}import*as Ue from"zod/v4";var r9=String.raw`\$\{([A-Za-z_][A-Za-z0-9_]*)(?::-[^}]*)?\}`;function w_(i){return new RegExp(r9).test(i)}var P_=/[\p{Pi}\p{Pf}\u201a\u201e\u201f\u2e32\u2e34\u2e41\u2e49\u2e42\u3003\u300c-\u300f\ufe41-\ufe44\u301d-\u301f\u275b-\u2760\u276e\u276f\u{1f676}-\u{1f678}\u2032-\u2037\u2057\u02b9\u02ba\u0374\u02bd-\u02bf\u02c8\u02d2\u02d3\u02ca\u02ce\u02cf\u02dd\u02f4-\u02f6\u02ee\u00b4\u0384\u0385\u1fbd\u1fbf\u1fcd-\u1fcf\u1fdd-\u1fdf\u1ffd\u1ffe\u05f3\u05f4\u0559-\u055b\u07f4\u07f5\ua67f\ua78b\ua78c\uff02\uff07\uff62\uff63]/gu,x_=/(?<![^\s\p{P}])\p{M}+/gu,s9=/[\p{Quotation_Mark}\u02BA\u02DD\u02EE\u02F5\u02F6\u05F2\u05F4\u1425\u1CD3\u2033\u2034\u2036\u2037\u2057\u275B-\u2760\u3003\u309B\uFF9E\u{1F676}-\u{1F678}]/gu,qEe=new RegExp(`${P_.source}|${s9.source}`,"gu");function i9(i){return nt(d9(tt(i))).replace(/ {2,}/g," ").trim()}var a9=/\x1b\[[\x30-\x3f]*[\x20-\x2f]*[\x40-\x7e]|\x1b[\]PX^_][^\x1b\x07]*(?:\x07|\x1b\\)/g,l9=4;function d9(i){let c=i;for(let T=0;T<l9;T++){let D=c.replace(a9,"");if(D===c)break;c=D}return c}function Vd(i,c=160){return c9(i9(u9(i,c)).normalize("NFC").replace(/[`\uff40\u02cb\u1fef\u2035]/g,"'").replace(x_,""),c)}var lhe=new RegExp(`[^\\S ]|[${z}]`,"u");function c9(i,c=2000){return i.length>c?`${ie(i,c)}…`:i}function u9(i,c){let T=ie(i,c*8);if(T.length===i.length)return T;let D=/\x1b(?:[\]PX^_][^\x1b\x07]*\x1b?|\[[\x30-\x3f]*[\x20-\x2f]*)$/.exec(T);if(D===null)return T;let w=i.slice(D.index);return(w[1]==="["?/^\x1b\[[\x30-\x3f]*[\x20-\x2f]*[\x40-\x7e]/.test(w):/^\x1b[\]PX^_][^\x1b\x07]*(?:\x07|\x1b\\)/.test(w))?T.slice(0,D.index):T}var uhe=a({accepted:!1},(i)=>{i.accepted=!1});function qs(i){return i.includes("*")}function Yd(i){let c=h9();return Object.hasOwn(c,i)?c[i]:i}var N_="workspace",Ahe=`mcp__${N_}__bash`,Che=`mcp__${N_}__web_fetch`;function f9(i){return i.replaceAll("\\","\\\\").replaceAll("(","\\(").replaceAll(")","\\)")}function m9(i){return g9(i).replaceAll("\\\\","\\")}function g9(i){return i.replaceAll("\\(","(").replaceAll("\\)",")")}function Xd(i){if(typeof i==="string"&&!i.includes("(")&&!i.includes(")"))return{kind:"bare"};let c=_9(i,"("),T=E9(i,")");if(c===-1&&T===-1)return{kind:"bare"};let D=i.substring(0,c);if(c===-1||T<=c||T!==i.length-1||/[()]/.test(D))return{kind:"malformed"};return{kind:"call",toolName:D,rawContent:i.substring(c+1,T)}}function k_(i){let c=Xd(i);if(c.kind!=="call"||!c.toolName)return{toolName:Yd(i)};if(c.rawContent===""||c.rawContent==="*")return{toolName:Yd(c.toolName)};let T=m9(c.rawContent);return{toolName:Yd(c.toolName),ruleContent:T}}function Sn(i){if(!i.ruleContent)return i.toolName;let c=f9(i.ruleContent);return`${i.toolName}(${c})`}function _9(i,c){for(let T=0;T<i.length;T++)if(i[T]===c){let D=0,w=T-1;while(w>=0&&i[w]==="\\")D++,w--;if(D%2===0)return T}return-1}function E9(i,c){for(let T=i.length-1;T>=0;T--)if(i[T]===c){let D=0,w=T-1;while(w>=0&&i[w]==="\\")D++,w--;if(D%2===0)return T}return-1}function h9(){return xt}function Qs(i){let c=i.replace(/[^a-zA-Z0-9_-]/g,"_");if(i.startsWith("claude.ai "))c=c.replace(/_+/g,"_").replace(/^_|_$/g,"");return c}function v_(){return{active:!1,enforcesGrants:!1,readLegacyKeyOwner:()=>{return},claimLegacyKeyOwner:async()=>{return},legacyKeyOwners:new Map,unsavedLegacyKeys:new Set,refusedLegacyKeys:new Map,claimedMayNotOwn:new Set,notedMayNotOwn:new Set,needsRebuild:!1,servers:new Map,tools:new Map,wireByInternal:new Map,internalByWire:new Map,wireKeyByInternalKey:new Map,internalKeyByWireKey:new Map,keptLegacyNames:0,serverKeyMoved:!1,sessionKeyById:new Map,formerKeys:new Map,formerSessionKeys:new Map,spelledKeys:new Map,otherDenyOrAskNames:new Map,retiredWireNames:new Map,wireHolders:new Map,sentWires:new Map}}var Xhe=new Ee(v_),Jhe=new s(()=>({used:!1})),Zhe=v_();function S9(i,c){return i.value===!c&&i.source==="payload"&&i.defaultHost?!c:c}class pr{reader=null;register(i){let c=this.reader;return this.reader=i,c}read(i,c){let T=this.reader;if(!T)return c;try{return S9(T(i,c),c)}catch{return c}}}var tSe=new pr;var rSe=new pr;var ts="mcp__";function ns(i){if(!i.startsWith(ts))return null;let c=i.indexOf("__",ts.length);if(c===-1){let T=i.slice(ts.length);return T?{serverName:T,toolName:void 0}:null}if(c===ts.length)return null;return{serverName:i.slice(ts.length,c),toolName:i.slice(c+2)}}function Jd(i){return`${ts}${Qs(i)}__`}function M_(i){return ns(`${Jd(i)}t`)===null}function U_(i){return i in Object.prototype&&M_(i)}var Xa="server names may only contain letters, numbers, hyphens and underscores, and may not be constructor, prototype, __proto__, __defineGetter__, __defineSetter__, __lookupGetter__ or __lookupSetter__";var vSe=e(()=>Ue.enum(["local","user","project","dynamic","enterprise","claudeai","managed","agent"]));var O9=/^[A-Za-z0-9_-]+$/;var os=e(()=>Ue.literal("comms").optional().catch(void 0)),Yo=e(()=>Ue.number().int().positive()),A9=300000,H_=e(()=>Ue.number().int().positive().optional().catch(void 0).describe("@internal CCR backend wire hint; folded into timeout at parse."));function F_({request_timeout_ms:i,...c}){return{...c,...c.timeout===void 0&&i!==void 0&&{timeout:Math.min(i,A9)}}}var C9=e(()=>Ue.object({type:Ue.literal("stdio").optional(),command:Ue.string().min(1,"Command cannot be empty"),args:Ue.array(Ue.string()).default([]),env:Ue.record(Ue.string(),Ue.string()).optional(),timeout:Yo().optional(),alwaysLoad:Ue.boolean().optional(),bareElicitationCapability:Ue.boolean().optional(),role:os()})),b9=e(()=>Ue.boolean()),R9=65536,rs=()=>Ue.string().refine((i)=>i.length<=R9,{abort:!0,message:"url is too long"}),T9=4096,B_=e(()=>Ue.object({clientId:Ue.string().optional(),callbackPort:Ue.number().int().positive().optional(),authServerMetadataUrl:Ue.string().refine((i)=>i.length<=T9,{abort:!0,message:"authServerMetadataUrl is too long"}).url().startsWith("https://",{message:"authServerMetadataUrl must use https://"}).optional(),scopes:Ue.string().min(1).optional(),xaa:b9().optional()})),Zd=e(()=>Ue.object({name:Ue.string(),permission_policy:Ue.enum(["always_allow","always_ask","always_deny"]).optional()}));function z_(){return{}}var G_=e(()=>Ue.object({type:Ue.literal("sse"),url:rs(),headers:Ue.record(Ue.string(),Ue.string()).optional(),headersHelper:Ue.string().optional(),oauth:B_().optional(),timeout:Yo().optional(),request_timeout_ms:H_(),tools:Ue.array(Zd()).optional(),alwaysLoad:Ue.boolean().optional(),displayName:Ue.string().optional().catch(void 0),bareElicitationCapability:Ue.boolean().optional(),discoveryCache:Ue.boolean().optional(),role:os(),toolPermissions:Ue.record(Ue.string(),tc()).optional(),...z_()}).transform(F_)),D9=e(()=>Ue.object({type:Ue.literal("sse-ide"),url:rs(),ideName:Ue.string(),ideRunningInWindows:Ue.boolean().optional(),timeout:Yo().optional(),alwaysLoad:Ue.boolean().optional(),role:os()})),L9=e(()=>Ue.object({type:Ue.literal("ws-ide"),url:rs(),ideName:Ue.string(),authToken:Ue.string().optional(),ideRunningInWindows:Ue.boolean().optional(),timeout:Yo().optional(),alwaysLoad:Ue.boolean().optional(),role:os()})),W_=e(()=>Ue.object({type:Ue.enum(["http","streamable-http"]).transform(()=>"http"),url:rs(),headers:Ue.record(Ue.string(),Ue.string()).optional(),headersHelper:Ue.string().optional(),oauth:B_().optional(),timeout:Yo().optional(),request_timeout_ms:H_(),tools:Ue.array(Zd()).optional(),alwaysLoad:Ue.boolean().optional(),displayName:Ue.string().optional().catch(void 0),bareElicitationCapability:Ue.boolean().optional(),discoveryCache:Ue.boolean().optional(),role:os(),toolPermissions:Ue.record(Ue.string(),tc()).optional(),...z_()}).transform(F_)),I9=["command","args","env","headersHelper"],w9=new Set(["http","streamable-http","sse"]),P9=/[\p{Cc}\p{Cf}\u2028\u2029]/u,x9=/[\p{Cc}\p{Cf}\u2028\u2029]/gu;function qd(i){return/^[A-Za-z0-9_-]+$/.test(i)&&!U_(i)&&i!=="constructor"&&i!=="prototype"}function N9(i){try{let c=new URL(i);return c.protocol==="https:"&&c.hostname!==""}catch{return!1}}function K_(i,c="",T=0){if(typeof i==="string")return[[c,i,!1]];if(T>4||i===null||typeof i!=="object")return[];return Object.entries(i).flatMap(([D,w])=>{let v=D.replace(x9,(B)=>`\\u${B.codePointAt(0).toString(16).padStart(4,"0")}`),U=c?`${c}.${v}`:v;return[[U,D,!0],...K_(w,U,T+1)]})}var Qd=e(()=>Ue.record(Ue.string(),Ue.unknown()).check((i)=>{let c=(D,w)=>{i.issues.push({code:"custom",path:D,message:w,input:i.value})};for(let D of I9)if(Object.hasOwn(i.value,D))c([D],`"${D}" is not allowed in managed settings: only http/sse URL servers can be delivered this way, and a managed settings document must not name a program to run`);if(!w9.has(i.value.type))c(["type"],'managed settings can only deliver "http" or "sse" servers');let T=i.value.url;if(typeof T==="string"&&!N9(T))c(["url"],"managed settings servers must use a valid https:// url");for(let[D,w,v]of K_(i.value))if(P9.test(w))c(D.split("."),"contains control or invisible format characters (in a key or a value); a managed settings document must not be able to print escape sequences");else if(!v&&w_(w))c(D.split("."),"${VAR} references are not expanded in managed settings; use a literal value (a managed settings document must not read the user's environment)")}).pipe(Ue.union([W_(),G_()]))),ec=`"managedMcpServers" must be an object keyed by server name (the .mcp.json mcpServers shape; Claude Desktop's array form of its same-named key is not accepted here: use the server name as the key and "type" instead of "transport"). No managed MCP servers are installed from it until it is fixed.`;function Ja(i,c){if(i===void 0)return;if(i===null||typeof i!=="object"||Array.isArray(i)){c("",ec);return}let T=Object.create(null);for(let[D,w]of Object.entries(i)){if(!qd(D)){c("<invalid name>",Xa);continue}let v=Qd().safeParse(w);if(v.success){T[D]=v.data;continue}let U=v.error.issues[0];c(D,U?[U.path.join("."),U.message].filter(Boolean).join(": "):"failed validation")}return T}var k9=e(()=>Ue.object({type:Ue.literal("ws"),url:rs(),headers:Ue.record(Ue.string(),Ue.string()).optional(),headersHelper:Ue.string().optional(),timeout:Yo().optional(),alwaysLoad:Ue.boolean().optional(),bareElicitationCapability:Ue.boolean().optional(),role:os()})),v9=e(()=>Ue.object({type:Ue.literal("sdk"),name:Ue.string(),timeout:Yo().optional(),alwaysLoad:Ue.boolean().optional(),disableAutoBackground:Ue.boolean().optional().catch(void 0),tools:Ue.array(Zd()).optional().catch(void 0),connectorId:Ue.string().min(1).optional().catch(void 0),autoModeVerdictTools:Ue.array(Ue.string()).optional().catch(void 0),dataFlowServer:M9().optional().catch(void 0),onPersonsMachine:Ue.object({exceptTools:Ue.array(Ue.string())}).optional().catch({exceptTools:[]})})),M9=e(()=>Ue.union([Ue.object({type:Ue.literal("anthropic"),id:Ue.string().min(1)}),Ue.object({type:Ue.literal("claude_ai_connector"),id:Ue.string().min(1),directory_id:Ue.string().min(1).nullable()}),Ue.object({type:Ue.literal("client_configured"),transport:Ue.enum(["stdio","http","in_process"]),plugin_id_hash:Ue.string().min(1).optional()})])),tc=e(()=>Ue.enum(["allow","ask","blocked"])),U9=e(()=>Ue.object({type:Ue.literal("claudeai-proxy"),url:rs(),id:Ue.string().regex(O9),displayName:Ue.string().optional(),urlReportable:Ue.boolean().optional(),noDirectoryEntry:Ue.boolean().optional(),iconUrl:Ue.string().optional(),timeout:Yo().optional(),alwaysLoad:Ue.boolean().optional(),toolPermissions:Ue.record(Ue.string(),tc()).optional(),stateless:Ue.boolean().optional(),cachedInitResponse:Ue.record(Ue.string(),Ue.unknown()).nullish(),discoverSupport:Ue.enum(["supported","legacy","unknown"]).optional().catch(void 0),cachedDiscoverResponse:Ue.record(Ue.string(),Ue.unknown()).nullish(),eligible:Ue.boolean().nullish(),ineligibleReason:Ue.string().nullish(),enterpriseManaged:Ue.boolean().optional()})),nc=e(()=>Ue.union([C9(),G_(),D9(),L9(),W_(),k9(),v9(),U9()]));var MSe=e(()=>Ue.object({mcpServers:Ue.record(Ue.string(),nc())}));import*as Za from"zod/v4";var ei=["anthropic","customEndpoint","bedrock","vertex","foundry","anthropicAws","mantle","gateway"],H9=/^anthropic[A-Z][A-Za-z0-9]*$/,F9=new Set(ei);function oc(i){return typeof i==="string"&&F9.has(i)}function rc(i){return oc(i)||typeof i==="string"&&H9.test(i)}var fr="Your session can't run on this machine",FSe=`${fr}: its requests must go to Anthropic's API or a cloud provider this machine is set up for, so a gateway, a custom endpoint, or a project's provider, credential or model settings aren't allowed. Remove the setting, such as ANTHROPIC_BASE_URL, from wherever it's set, or ask whoever runs this machine to.`,BSe=`${fr}: an env entry in a project's .claude settings file changes the provider settings, credentials, proxy, certificates, headers, request body or auto mode settings this machine is set up with. Remove that entry, set the same value on the machine, or ask whoever runs this machine to.`,zSe=`${fr}: none of the models allowed for its auto mode check can be used here. Ask whoever runs this machine to update Claude Code or use a provider that offers one of them, and ask your organization's administrator whether its model settings block them or, on Microsoft Foundry, to map one to a deployment.`,GSe=[`${fr}: its requests must go straight to Anthropic's API, and this machine sends them somewhere else. Remove what does that, or ask whoever runs this machine to. It is usually a setting such as CLAUDE_CODE_USE_BEDROCK or ANTHROPIC_BASE_URL, in the environment, in managed settings or in a Claude Code settings file such as the project's .claude/settings.json.`,`${fr}: its requests must go to Anthropic's API, or straight to a cloud provider Anthropic allows for these sessions with no custom endpoint, and this machine sends them somewhere else. Remove the custom endpoint, gateway or provider setting that does that, in the environment, managed settings or a Claude Code settings file, or ask whoever runs this machine to.`,`${fr}: it needs the server's auto mode check, and CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS turns that off here. Remove it from the environment, managed settings or the Claude Code settings file that sets it, or ask whoever runs this machine to.`],WSe=`${fr}: it needs the server's auto mode check, and your organization's compliance policy rules that out, so this kind of session can't run for your organization.`;import*as ss from"zod/v4";var $Se=m()==="macos"?"⏺":"●";var B9=new Set(["Claude Preview","Claude Browser"]),z9=new Set(["claude-in-chrome","Claude in Chrome"]),lye=new Set([...z9,...B9]);var G9=["Claude_Browser__"],W9=["claude-in-chrome__","Claude_in_Chrome__"],dye=[...G9,...W9];var Sye=e(()=>ss.preprocess(es,ss.enum(O_))),yye=e(()=>ss.preprocess(es,ss.enum(ur)));import{posix as u5,win32 as p5}from"path";import*as ce from"zod/v4";var j_={".ts":"ts",".tsx":"tsx",".jsx":"jsx",".js":"js",".mjs":"js",".cjs":"js",".mts":"ts",".cts":"ts"};var sc=Object.keys(j_);var $9=`${sc.slice(0,-1).join(", ")} or `+String(sc.at(-1));import{isIPv4 as J9,isIPv6 as Z9}from"net";var V9=/^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,Y9=/^[0-9a-f]{1,4}$/i,X9=/%[0-9a-z.:-]+$/i;function qa(i){if(!i.includes(":")){let de=i.split(".");return de.length===4&&de.every((pe)=>V9.test(pe))?de.map(Number):void 0}let c=i.replace(X9,""),T=c.lastIndexOf(":")+1,D=qa(c.slice(T)),w=(D?c.slice(0,T)+"0:0":c).split("::").map((de)=>de?de.split(":"):[]),[v=[],U]=w,B=8-w.flat().length;if(w.length>2||(U?B<1:B!==0)||!w.flat().every((de)=>Y9.test(de)))return;let K=[...v,...Array(B).fill("0"),...U??[]].flatMap((de)=>[parseInt(de,16)>>8,parseInt(de,16)&255]);return D?[...K.slice(0,12),...D]:K}var q9=new Set(["metadata.google.internal","metadata.goog","metadata","instance-data","instance-data.ec2.internal","ip6-localhost","ip6-loopback","localhost.localdomain","localhost4","localhost4.localdomain4","localhost6","localhost6.localdomain6"]),V_=new Set(["100.100.100.200","168.63.129.16","192.0.0.192"]),Q9=new Set(["fd00:ec2::254","fd00:ec2::23","fd20:ce::254","fd00:c1::a9fe:a9fe","fd00:a9fe:a9fe::1"].map((i)=>String(qa(i))));function Y_(i,c,T,D){return i===127||i===169&&c===254||i===0}function e5(i){return X_(i)&&i[4]===0&&i[5]===1}function X_(i){return i[0]===0&&i[1]===100&&i[2]===255&&i[3]===155}function t5(i){let c=[];if(i[0]===32&&i[1]===2)c.push(i.slice(2,6));let T=i.slice(0,10).every((B)=>B===0),D=T&&i[10]===255&&i[11]===255,w=T&&i[10]===0&&i[11]===0,v=X_(i)&&i.slice(4,12).every((B)=>B===0),U=(i[8]===0||i[8]===2)&&i[9]===0&&i[10]===94&&i[11]===254;if(D||w||v||U)c.push(i.slice(12,16));return c}function J_(i){let c=i.toLowerCase().replace(/^\[|\]$/g,"");if(c.endsWith("."))c=c.slice(0,-1);if(c===""||c==="localhost"||c.endsWith(".localhost"))return!0;if(q9.has(c))return!0;if(c.startsWith("instance-data.")&&c.endsWith(".compute.internal"))return!0;if(J9(c)){if(V_.has(c))return!0;let[D=0,w=0,v=0,U=0]=c.split(".").map(Number);return Y_(D,w,v,U)}if(!Z9(c))return!1;let T=qa(c);if(T===void 0)return!0;if(e5(T))return!0;if(T.every((D)=>D===0))return!0;if(T.slice(0,15).every((D)=>D===0)&&T[15]===1)return!0;if(Q9.has(String(T)))return!0;if(T[0]===254&&(T[1]??0)>=128&&(T[1]??0)<=191)return!0;return t5(T).some((D)=>{let[w=0,v=0,U=0,B=0]=D;return Y_(w,v,U,B)||V_.has(`${w}.${v}.${U}.${B}`)})}import*as lt from"zod/v4";var Z_=["bash","powershell"];import*as q_ from"zod/v4";var Q_=e(()=>q_.enum(["continue","block"]).optional());var ti=e(()=>lt.string().optional().describe('Permission rule syntax to filter when this hook runs (e.g., "Bash(git *)"). Only runs if the tool call matches the pattern. Avoids spawning hooks for non-matching commands.')),eE=e(()=>Q_().describe("What a failure of this hook does: it could not start (a missing script or plugin directory), timed out, exited with a code other than 0 or 2, or printed JSON that is invalid or fails validation. 'continue' (default): the failure is reported and the action goes ahead. 'block': the failure counts as exit code 2, so the action the event guards (a tool call, a permission request, a prompt) is blocked. Ignored for async hooks and on Stop, SubagentStop, TaskCompleted and TeammateIdle."));function n5(){let i=lt.object({type:lt.literal("command").describe("Shell command hook type"),command:lt.string().describe("Shell command to execute"),args:lt.array(lt.string()).optional().describe("Argument list for exec form. When present, `command` is resolved as "+"an executable and spawned directly with these arguments — no shell. "+"Path placeholders like ${CLAUDE_PLUGIN_ROOT} are substituted per-element as plain strings, so paths with quotes, $, or backticks never reach a shell parser. When absent, `command` runs through a shell (bash on POSIX, PowerShell on Windows without Git Bash)."),if:ti(),shell:lt.enum(Z_).optional().describe("Shell interpreter. 'bash' uses your $SHELL (bash/zsh/sh); 'powershell' uses pwsh. Defaults to bash (powershell on Windows without Git Bash)."),timeout:lt.number().positive().optional().describe("Timeout in seconds for this specific command"),onFailure:eE(),statusMessage:lt.string().optional().describe("Custom status message to display in spinner while hook runs"),once:lt.boolean().optional().describe("If true, hook runs once and is removed after execution"),async:lt.boolean().optional().describe("If true, hook runs in background without blocking"),asyncRewake:lt.boolean().optional().describe("If true, hook runs in background and wakes the model on exit code 2 (blocking error). Implies async."),rewakeMessage:lt.string().min(1).optional().describe("@internal Custom prefix for the system-reminder shown to the model when an asyncRewake hook exits with code 2. The hook output is appended after this prefix."),rewakeSummary:lt.string().min(1).optional().describe('@internal One-line summary shown to the user in the terminal when an asyncRewake hook exits with code 2. Defaults to "Stop hook feedback".'),cloud:lt.enum(["device","skip"]).optional().catch("skip").describe("@internal Where this hook may run when a cloud session is driven from this machine. 'device': offer it to the cloud session and run it here even when its script sits where the cloud session can write on this machine or cannot be pinned — the author accepts that the session may have changed files this hook executes. 'skip': never offer it to cloud sessions. Omit for the default: a command hook whose script could be read and pinned and lies outside everything the cloud session can write here is offered; other command hooks are not. Applies to this entry only: the same hook written in another settings scope keeps its own setting. An unrecognised value reads as 'skip' (the file still loads; the hook stays on this machine).")}),c=lt.object({type:lt.literal("prompt").describe("LLM prompt hook type"),prompt:lt.string().describe("Prompt to evaluate with LLM. Use $ARGUMENTS placeholder for hook input JSON."),if:ti(),timeout:lt.number().positive().optional().describe("Timeout in seconds for this specific prompt evaluation"),model:lt.string().optional().describe('Model to use for this prompt hook (e.g., "claude-sonnet-5"). If not specified, uses the default small fast model.'),continueOnBlock:lt.boolean().optional().describe(`Sets the continue value for the decision:"block" produced when ok is false. Default false (turn ends). Whether continue:true lets the turn proceed depends on the event's decision:"block" semantics. On PostToolUse, the reason is fed back to Claude and the turn continues.`),statusMessage:lt.string().optional().describe("Custom status message to display in spinner while hook runs"),once:lt.boolean().optional().describe("If true, hook runs once and is removed after execution")}),T=lt.object({type:lt.literal("mcp_tool").describe("MCP tool hook type"),server:lt.string().describe("Name of an already-configured MCP server to invoke"),tool:lt.string().describe("Name of the tool on that server to call"),input:lt.record(lt.string(),lt.unknown()).optional().describe('Arguments passed to the MCP tool. String values support ${path} interpolation from the hook input JSON (e.g. "${tool_input.file_path}").'),if:ti(),timeout:lt.number().positive().optional().describe("Timeout in seconds for this specific tool call"),onFailure:lt.preprocess((v)=>v==="continue"?v:"block",lt.enum(["continue","block"])).optional().describe("What happens when this hook's call fails: its MCP server is not connected or not signed in, the call times out or returns an error, or the tool answers with JSON that fails validation. 'continue' (default): the failure is reported and the action goes ahead. 'block': the action the event guards (a tool call, a permission request, a prompt) is blocked each time, for as long as the call fails. With 'block', the tool must answer with a hook's JSON output, with {} or with nothing: plain text, an image, or JSON that holds none of a hook output's fields, or only 'reason', also counts as a failure. That does not hold on PreCompact and WorktreeCreate, where plain text is the hook's answer, or on events whose block stops nothing. Any other value reads as 'block'. Ignored on Setup, SessionStart, Stop, SubagentStop, TaskCompleted and TeammateIdle."),statusMessage:lt.string().optional().describe("Custom status message to display in spinner while hook runs"),once:lt.boolean().optional().describe("If true, hook runs once and is removed after execution")}),D=lt.object({type:lt.literal("http").describe("HTTP hook type"),url:lt.string().url().describe("URL to POST the hook input JSON to"),if:ti(),timeout:lt.number().positive().optional().describe("Timeout in seconds for this specific request"),onFailure:eE(),headers:lt.record(lt.string(),lt.string()).optional().describe('Additional headers to include in the request. Values may reference environment variables using $VAR_NAME or ${VAR_NAME} syntax (e.g., "Authorization": "Bearer $MY_TOKEN"). Only variables listed in allowedEnvVars will be interpolated. Content-Length and Transfer-Encoding given here are ignored: Claude Code works out the request\'s length from its body.'),allowedEnvVars:lt.array(lt.string()).optional().describe("Explicit list of environment variable names that may be interpolated in header values. Only variables listed here will be resolved; all other $VAR references are left as empty strings. Required for env var interpolation to work."),statusMessage:lt.string().optional().describe("Custom status message to display in spinner while hook runs"),once:lt.boolean().optional().describe("If true, hook runs once and is removed after execution"),cloud:lt.enum(["device","skip"]).optional().catch("skip").describe("@internal Where this hook may run when a cloud session is driven from this machine. 'skip': never offer it to cloud sessions; 'device' or omitted: offered (an HTTP hook has no script to pin). Applies to this entry only. An unrecognised value reads as 'skip' (the file still loads).")}),w=lt.object({type:lt.literal("agent").describe("Agentic verifier hook type"),prompt:lt.string().describe('Prompt describing what to verify (e.g. "Verify that unit tests ran and passed."). Use $ARGUMENTS placeholder for hook input JSON.'),if:ti(),timeout:lt.number().positive().optional().describe("Timeout in seconds for agent execution (default 60)"),model:lt.string().optional().describe('Model to use for this agent hook (e.g., "claude-sonnet-5"). If not specified, uses Haiku.'),statusMessage:lt.string().optional().describe("Custom status message to display in spinner while hook runs"),once:lt.boolean().optional().describe("If true, hook runs once and is removed after execution")});return{BashCommandHookSchema:i,PromptHookSchema:c,HttpHookSchema:D,AgentHookSchema:w,McpToolHookSchema:T}}var Qa=e(()=>{let{BashCommandHookSchema:i,PromptHookSchema:c,AgentHookSchema:T,HttpHookSchema:D,McpToolHookSchema:w}=n5();return lt.discriminatedUnion("type",[...[i,c,T,D,w]])}),ic=e(()=>lt.object({matcher:lt.string().optional().describe('String pattern to match (e.g. tool names like "Write")'),hooks:lt.array(Qa()).describe("List of hooks to execute when the matcher matches")})),_r=e(()=>lt.partialRecord(lt.enum(q),lt.array(ic())));function el(){return new Set(Qa().options.map((i)=>i.shape.type.value))}function o5(i,c){if(!i||typeof i!=="object"||Array.isArray(i)){let w=mr(i);return{problem:`Hook entry must be an object; received ${w}`,received:w,aboutType:!1}}let T=i.type;if(typeof T!=="string"){let w=mr(T);return{problem:T===void 0?'Hook entry has no "type"':`Hook entry "type" must be a string; received ${w}`,received:w,aboutType:!0}}if(!c.has(T)){let w=wt(T);return{problem:`Unknown hook type "${w}"`,received:w,aboutType:!0}}let D=Qa().safeParse(i);if(!D.success)return{problem:`Invalid ${T} hook (${tE(D.error)})`,received:T,aboutType:!1};return}function tE(i){return i.issues.map((c)=>c.path.length>0?`${c.path.join(".")}: ${c.message}`:c.message).join("; ")}function tl(i){if(!i||typeof i!=="object"||Array.isArray(i))return!1;if(!("matcher"in i)&&Object.keys(i).some((T)=>q.includes(T)))return!1;let c=i.hooks;if(Array.isArray(c))return c.length>0;return!!c&&typeof c==="object"&&(("matcher"in i)||typeof c.type==="string")}function gr(i,c=3,{matchersCount:T=!0,unscannedKeys:D=r5,inHooksList:w=!1}={}){if(rE(i))return!0;if(T&&tl(i))return!0;if(c===0||!i||typeof i!=="object")return!1;if(Array.isArray(i))return i.some((v)=>gr(v,c-1,{matchersCount:T,unscannedKeys:D,inHooksList:w}));if(w&&typeof i.type==="string")return!1;return Object.entries(i).some(([v,U])=>!D.has(v)&&gr(U,c-1,{unscannedKeys:D,matchersCount:T&&!q.includes(v),inHooksList:v==="hooks"&&Array.isArray(U)}))}function nE(i,c){if(!i||typeof i!=="object"||Array.isArray(i))return!1;return rE(i)||Object.entries(i).some(([T,D])=>T!=="hooks"&&!c.has(T)&&gr(D,3,{unscannedKeys:c,matchersCount:!q.includes(T)}))}var r5=new Set,oE=new Set(["mcpServers","managedMcpServers","lspServers","pluginConfigs","enabledPlugins","extraKnownMarketplaces","env","skillOverrides","modelSettings"]),s5=new Set(["metadata","mcpServers","lspServers"]),Wye=new Set([...s5,"experimental"]);function rE(i){if(!i||typeof i!=="object"||Array.isArray(i))return!1;return Object.entries(i).some(([c,T])=>ni.has(c)&&T!==null&&T!==void 0&&!(Array.isArray(T)&&T.length===0))}function ac(i){if(tl(i))return!0;if(Array.isArray(i))return i.some(ac);if(!i||typeof i!=="object")return!1;return Object.entries(i).some(([c,T])=>ni.has(c)&&T!==null&&T!==void 0&&!(Array.isArray(T)&&T.length===0))}var ni=new Set(["PreToolUse","PermissionRequest"]);function sE(i,c){if(!Array.isArray(i))return{stripped:[],unloadableGuards:[]};let T=ni.has(c),D=el(),w=ic(),v=[],U=[];for(let B=i.length-1;B>=0;B--){let K=i[B],de=(Pe,Re)=>{if(!T)i.splice(B,1);v.push({hookIndex:void 0,path:`${B}`,problem:Pe,received:Re,aboutType:!1})};if(gr(K,3,{matchersCount:!1})){(T?v:U).push({hookIndex:void 0,path:`${B}`,problem:"holds PreToolUse/PermissionRequest hooks where a matcher was expected",received:mr(K),aboutType:!1});continue}if(!K||typeof K!=="object"||Array.isArray(K)){de(`Hook matcher must be an object; received ${mr(K)}`,mr(K));continue}let pe=K.hooks;if(!Array.isArray(pe)){de(`Hook matcher "hooks" must be an array of hook entries; received ${mr(pe)}`,mr(pe));continue}let me=[];for(let Pe=pe.length-1;Pe>=0;Pe--){let Re=o5(pe[Pe],D);if(Re!==void 0){if(!T)pe.splice(Pe,1);me.push({hookIndex:Pe,path:`${B}.hooks.${Pe}`,...Re})}}let Ae=w.safeParse(T?{...K,hooks:[]}:K);if(!Ae.success){de(`Invalid hook matcher (${tE(Ae.error)})`,"matcher");continue}v.push(...me)}return v.reverse(),U.reverse(),T?{stripped:[],unloadableGuards:v}:{stripped:v,unloadableGuards:U}}var Oo="a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed";function mr(i){if(i===null||i===void 0)return String(i);if(Array.isArray(i))return"an array";let c=typeof i;return`${c==="object"?"an":"a"} ${c}`}var iE=new Set(["http","https","ws","wss","ftp"]);function Er(i){i=i.replace(/^[\x00-\x20]+/,"").replace(/[\t\n\r]/g,"");let c=i.indexOf("://");if(c===-1)return!1;let T=i.slice(c+3),D=i.slice(0,c).toLowerCase();if(iE.has(D)){let U=T.match(/^[/\\]+/)?.[0]??"";if(U.includes("\\"))return!0;T=T.slice(U.length)}let w=T.search(/[/?#]/);return(w===-1?T:T.slice(0,w)).includes("\\")}var Cn="github.com",Xye=[`git@${Cn}:`,`ssh://git@${Cn}/`],Jye=[`https://${Cn}`,`https://${Cn}/`,Cn],Zye=`users.noreply.${Cn}`;var i5=/[:/\\?#@\s]/;function oi(i){let c=lE(i.replace(/[\t\n\r]/g,"").toLowerCase());if(c===""||i5.test(c))return c;try{let T=new URL(`https://${c}`);if(T.username!==""||T.password!==""||T.port!==""||T.pathname!=="/"||T.search!==""||T.hash!=="")return c;return lE(T.hostname)}catch{return c}}var dE=Aa(function(c){let T=oi(c);while(T.startsWith("www."))T=T.slice(4);return T},(i)=>i,50);function cE(i,c){return dE(i)===c}function Xo(i){return cE(i,Cn)}function aE(i){return/[%\x00-\x1f\x7f-\u{10FFFF}]/u.test(i)}function lc(i){if(je(i))return!0;if(i.includes("://")){if(Er(i))return!0;try{let w=new URL(i);if(w.protocol==="http:"||w.protocol==="https:")return!1;return aE(w.hostname)}catch{return!0}}let c=i.indexOf(":"),T=i.indexOf("@");if(c>=0&&T>c)return!0;let D=i.match(/^(?:[^@]+@)?([^:]+):/)?.[1];return D?aE(D):!1}function lE(i){let c=i.length;while(c>0&&i[c-1]===".")c--;return i.slice(0,c)}function dc(i){let c=oi(i);return Xo(c)?Cn:c}function uE(i){let c=i.trimStart(),T=/^([A-Za-z][A-Za-z0-9+.-]*):\/\//.exec(c);if(T===null||/^https?$/i.test(T[1]??""))return ae(c);return ae(T[0]+rt(c.slice(T[0].length)))}function pE(i){let c=/^([^@:/[\]]+)@([^@:/[\]]+):(.*)$/s.exec(i);return c&&!je(i)?{user:c[1],host:c[2],path:c[3]}:null}import*as is from"zod/v4";var c5=64;class as{fields;activeWhenAbsent;keys;built=new Map;byPresentKeys=new Map;wholeSchema;constructor(i,c=new Set){this.fields=i;this.activeWhenAbsent=c;this.keys=Object.keys(i).filter((T)=>i[T]!==void 0)}has(i){return Object.hasOwn(this.fields,i)&&this.fields[i]!==void 0}field(i){let c=this.built.get(i);if(c)return c;let T=this.has(i)?this.fields[i]:void 0;if(!T)return;let D=T();return this.built.set(i,D),D}carries(i,c){return this.activeWhenAbsent.has(c)||typeof i==="object"&&i!==null&&c in i}whole(){return this.wholeSchema??=is.object(this.shapeOf(this.keys)).passthrough(),this.wholeSchema}forDocument(i,c="passthrough"){let T=this.keys.filter((B)=>this.carries(i,B));if(T.length===this.keys.length&&c==="passthrough")return this.whole();let D=`${c}
|
|
24
|
+
${T.join(`
|
|
25
|
+
`)}`,w=this.byPresentKeys.get(D);if(w)return this.byPresentKeys.delete(D),this.byPresentKeys.set(D,w),w;let v=this.shapeOf(T),U=c==="strip"?is.preprocess((B,K)=>{for(let de of this.wrongDocumentIssues(B,v))K.addIssue(de);return B},is.object(v)):is.object(v).passthrough().check((B)=>{B.issues.push(...this.wrongDocumentIssues(B.value,v))});if(this.byPresentKeys.size>=c5)for(let B of this.byPresentKeys.keys()){this.byPresentKeys.delete(B);break}return this.byPresentKeys.set(D,U),U}wrongDocumentIssues(i,c){if(typeof i!=="object"||i===null)return[];let T=[];for(let D of Object.keys(i))if(!Object.hasOwn(c,D)&&this.has(D))T.push({code:"custom",input:i[D],path:[D],message:"This settings schema was built for a document without this key"});return T}shapeOf(i){let c={};for(let T of i){let D=this.field(T);if(D)c[T]=D}return c}}var fE=600;var _c=500,f5=32;function OE(){return{claudeaiPluginId:ce.string().max(128).optional().catch(void 0),archiveSha256:rh().optional().catch(void 0)}}function AE(){return{directoryRepositoryKey:ce.string().max(4096).optional().catch(void 0)}}function CE(i){if(!/^https?:\/\/[^/\\]/i.test(i))return!1;try{let{protocol:c}=new URL(i);return c==="https:"||c==="http:"}catch{return!1}}function bE(){return{sourceCommand:ce.string().max(_c+20).optional().catch(void 0).describe("The `command`-source command the user accepted at explicit install/update. The once-per-session background re-resolve only runs while the marketplace entry still declares this exact command; a changed command (or an entry that became command-sourced later) is skipped with a warning until the user runs an explicit update."),sourceProducerPath:ce.string().max(4096).refine(mE,{message:"must be an absolute path"}).optional().catch(void 0).describe("The directory a `command`-source plugin was last resolved to (what its command printed). Served in place in link mode and re-copied every session in copy mode, so the sandbox write-denies it; refreshed on every install/update, including no-op updates that resolve to a new location."),previousProducerPaths:ce.array(ce.unknown()).transform((i)=>i.filter((c)=>typeof c==="string"&&c.length<=4096&&mE(c)).slice(-f5)).optional().catch(void 0).describe("Producer directories this installation was resolved to before the current one (most recent last, bounded). A concurrent older session may still serve one of them, so the sandbox keeps write-denying them too.")}}function mE(i){return u5.isAbsolute(i)||p5.isAbsolute(i)}var RE=/[^\x20-\x7E]| {4,}/;function Ec(){return ce.string().max(_c,{message:"headersHelper must not be longer than the install consent UI can display"}).refine((i)=>!RE.test(i),{message:"headersHelper must be printable ASCII (letters, digits, punctuation, single spaces) with no runs of 4 or more spaces"})}var m5="anthropic-plugin-directory",g5=["healthcare"],TE=new Set(["claude-community","claude-plugins-community",...g5]),DE=new Set(["claude-code-marketplace","claude-code-plugins","claude-plugins-official","anthropic-marketplace","anthropic-plugins","agent-skills","anthropic-agent-skills","life-sciences","knowledge-work-plugins","claude-for-legal","claude-for-financial-services","financial-services-plugins","first-party-plugins","claude-tag-plugins"]),_5=new Set([m5,"claude-plugin-directory"]),hc=new Set([...DE,...TE,..._5]);var LE=["marketplace","plugins","official"];function E5(){return LE}var IE="official[^a-z0-9]*(anthropic|claude)|(?:anthropic|claude)[^a-z0-9]*official",GOe=new RegExp(IE,"i");function wE(i){return new RegExp(`(?:${IE}|^(?:anthropic|claude)[^a-z0-9]*(${i.join("|")}))`,"i")}var h5=wE(E5()),S5=wE(LE),y5=/[^\u0020-\u007E]/;function PE(i){if(hc.has(i.toLowerCase()))return!1;if(O5(i))return!0;if(h5.test(i))return!0;return!1}function O5(i){return!hc.has(i.toLowerCase())&&(y5.test(i)||S5.test(i))}var Wn=e(()=>ce.string().startsWith("./")),hr=e(()=>Wn().endsWith(".json")),gE=e(()=>ce.union([ce.literal("."),Wn()])),_E=e(()=>ce.union([Wn().refine((i)=>i.endsWith(".mcpb")||i.endsWith(".dxt"),{message:"MCPB file path must end with .mcpb or .dxt"}).describe("Path to MCPB file relative to plugin root"),ce.string().url().refine((i)=>i.endsWith(".mcpb")||i.endsWith(".dxt"),{message:"MCPB URL must end with .mcpb or .dxt"}).describe("URL to MCPB file")])),pc=e(()=>Wn().endsWith(".md")),fc=e(()=>ce.union([pc(),Wn()])),xE={inline:"--plugin-dir session plugins",builtin:"built-in plugins","skills-dir":"plugins auto-loaded from .claude/skills/",synced:"plugins synced from your claude.ai account","claude-plugin-test":"plugins loaded by claude plugin test"};function Sc(i){return Object.hasOwn(xE,i)}var A5="Marketplace name impersonates an official Anthropic/Claude marketplace",yc=(i)=>ce.string().min(1,"Marketplace must have a name").refine((c)=>!c.includes(" "),{message:'Marketplace name cannot contain spaces. Use kebab-case (e.g., "my-marketplace")'}).refine((c)=>!ah.test(c),{message:"Marketplace name cannot contain control or bidirectional-formatting characters"}).refine((c)=>!c.includes("/")&&!c.includes("\\")&&!c.includes("..")&&c!==".",{message:'Marketplace name cannot contain path separators (/ or \\), ".." sequences, or be "."'}).refine((c)=>!i(c),{message:A5}).superRefine((c,T)=>{let D=c.toLowerCase();if(!Sc(D))return;T.addIssue({code:"custom",message:`Marketplace name "${D}" is reserved for ${xE[D]}`})}),C5=e(()=>yc(PE)),b5=e(()=>yc(()=>!1)),nl=e(()=>ce.string().min(1,"Plugin name cannot be empty").refine((i)=>!i.includes(" "),{message:'Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")'}).refine((i)=>!ah.test(i),{message:"Plugin name cannot contain control or bidirectional-formatting characters"})),Oc=e(()=>ce.object({name:ce.string().min(1,"Author name cannot be empty").describe("Display name of the plugin author or organization"),email:ce.string().optional().describe("Contact email for support or feedback"),url:ce.string().optional().describe("Website, GitHub profile, or organization URL")})),NE=e(()=>ce.preprocess((i)=>n(i)?i:void 0,ce.record(ce.string(),ce.unknown()).optional()).optional().describe('Versions of its hosts this plugin runs on. "claude-code" is a semver range (e.g. ">=2.1.320"): outside it, the plugin is not installed, updated or loaded. Other keys are ignored.')),R5=256,kE=e(()=>ce.preprocess((i)=>n(i)&&Array.isArray(i.hosts)?{hosts:i.hosts.slice(0,R5).map((c)=>typeof c==="string"?c:"")}:void 0,ce.object({hosts:ce.array(ce.string()).describe('Hosts in sandbox.network.allowedDomains syntax: a host, with an optional leading "*." and an optional ":port" (e.g. "api.example.com", "*.example.com", "db.example.com:5432"). An empty list says that none is needed.')}).optional()).optional()),cn=e(()=>ce.object({$schema:ce.string().optional().describe("JSON Schema reference for editor autocomplete/validation; ignored at load time"),name:nl().describe("Unique identifier for the plugin, used for namespacing (prefer kebab-case)"),displayName:ce.string().optional().describe('Human-readable name shown in UI (e.g., "GitHub Utils"). Falls back to `name` when omitted. Unlike `name`, may contain spaces and any casing; not used for namespacing or lookup.'),version:ce.string().optional().describe("Semantic version (e.g., 1.2.3) following semver.org specification"),description:ce.string().optional().describe("Brief, user-facing explanation of what the plugin provides"),author:Oc().optional().describe("Information about the plugin creator or maintainer"),homepage:ce.string().url().optional().describe("Plugin homepage or documentation URL"),repository:ce.string().optional().describe("Source code repository URL"),license:ce.string().optional().describe("SPDX license identifier (e.g., MIT, Apache-2.0)"),keywords:ce.array(ce.string()).optional().describe("Tags for plugin discovery and categorization"),defaultEnabled:ce.boolean().optional().describe("Whether the plugin starts enabled when the user has no explicit enabled/disabled setting for it (default: true). Explicit enabledPlugins values always win, and a plugin required by an enabled dependent is enabled regardless of this value. In a cloud session that began as a claude.ai chat, so is a plugin synced from the user's claude.ai account."),dependencies:ce.array(O8()).optional().describe(`Plugins that must be enabled for this plugin to function. Bare names (no "@marketplace") are resolved against the declaring plugin's own marketplace.`),metadata:ce.preprocess((i)=>n(i)?i:void 0,ce.record(ce.string(),ce.unknown()).optional()).describe("Free-form metadata for the plugin author's own use (e.g. entitlement or catalog fields). Preserved on the parsed manifest but not read by Claude Code."),engines:NE(),network:kE().describe("The network hosts any part of the plugin reaches, as its author states them, for `claude plugin validate` to list. Shown only: it is not checked, allows no host and limits nothing. In a marketplace entry it is read where the entry is the plugin's only manifest.")})),T5=1,WOe=e(()=>ce.object({$schema:ce.string().optional().catch(void 0).describe("JSON Schema reference for editor autocomplete/validation; ignored at load time"),description:ce.string().optional().describe("Brief, user-facing explanation of what these hooks provide"),hooks:ce.lazy(()=>_r()).optional().describe("The hooks provided by the plugin, in the same format as the one used for settings"),modules:ce.array(ce.string()).max(T5,{message:"hooks.json `modules` names one hooks module per plugin; a second entry is refused"}).optional().describe(`The hooks module: one path, relative to this hooks.json, of a module exporting register(on). The module, and every file it imports from the plugin, is named like code (${$9}; a file named otherwise is not loaded) and is an ES module whatever its suffix. What it hooks and calls is read from its source before it loads; \`claude plugin validate\` shows the result.`),surface:ce.never({error:'hooks.json `surface` is gone: name the module in the Client element, `Client({ module: "./board.tsx", key })`, a path relative to the file that builds it'}).optional()}).refine((i)=>i.hooks!==void 0||(i.modules?.length??0)>0,{message:"hooks.json must have `hooks` (the hook matchers) or `modules` (hooks modules), or both"})),vE=e(()=>ce.object({hooks:ce.union([hr().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),ce.lazy(()=>_r()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)"),ce.array(ce.union([hr().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),ce.lazy(()=>_r()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)")]))])})),D5=e(()=>ce.object({source:fc().optional().describe("Path to command markdown file, relative to plugin root"),content:ce.string().optional().describe("Inline markdown content for the command"),description:ce.string().optional().describe("Command description override"),argumentHint:ce.string().optional().describe('Hint for command arguments (e.g., "[file]")'),model:ce.string().optional().describe("Default model for this command"),allowedTools:ce.array(ce.string()).optional().describe("Tools allowed when command runs")}).refine((i)=>i.source&&!i.content||!i.source&&i.content,{message:'Command must have either "source" (file path) or "content" (inline markdown), but not both'})),ME=e(()=>ce.object({commands:ce.union([fc().describe("Path to a command file or skill directory, relative to the plugin root. When set, the commands/ directory is not auto-loaded — list its files here if you want both."),ce.array(fc().describe("Path to a command file or skill directory, relative to the plugin root. When set, the commands/ directory is not auto-loaded — list its files here if you want both.")).describe("List of command file or skill directory paths. When set, the commands/ directory is not auto-loaded."),ce.record(ce.string(),D5()).describe('Object mapping of command names to their metadata and source files. Command name becomes the slash command name (e.g., "about" → "/plugin:about")')])})),UE=e(()=>ce.object({agents:ce.union([pc().describe("Path to an agent file, relative to the plugin root. When set, the agents/ directory is not auto-loaded — list its files here if you want both."),ce.array(pc().describe("Path to an agent file, relative to the plugin root. When set, the agents/ directory is not auto-loaded — list its files here if you want both.")).describe("List of agent file paths. When set, the agents/ directory is not auto-loaded.")])})),HE=e(()=>ce.object({skills:ce.union([gE().describe('Path to a skill directory, relative to the plugin root ("." / "./" denote the plugin root itself). Loaded in addition to the skills/ directory (except: for a marketplace entry whose source resolves to the marketplace root, declaring a specific subdirectory replaces the skills/ scan).'),ce.array(gE().describe('Path to a skill directory, relative to the plugin root ("." / "./" denote the plugin root itself).')).describe("List of skill directory paths, loaded in addition to the skills/ directory (except: for a marketplace entry whose source resolves to the marketplace root, declaring specific subdirectories replaces the skills/ scan).")])})),L5=e(()=>ce.union([ce.string(),ce.array(ce.string())])),Ac=e(()=>ce.object({outputStyles:ce.union([Wn().describe("Path to an output-styles directory or file, relative to the plugin root. When set, the output-styles/ directory is not auto-loaded — list its files here if you want both."),ce.array(Wn().describe("Path to an output-styles directory or file, relative to the plugin root. When set, the output-styles/ directory is not auto-loaded — list its files here if you want both.")).describe("List of output-style directory or file paths. When set, the output-styles/ directory is not auto-loaded.")])})),I5=e(()=>ce.string().max(64).regex(/^[a-z][a-z0-9_-]*$/,"must match ^[a-z][a-z0-9_-]*$")),w5=16,P5=e(()=>ce.object({id:I5(),remote:ce.string().max(256).regex(/^(npm:[@a-z0-9/._-]+(@[a-z0-9._+-]+)?|github:[\w.-]+\/[\w.-]+@[\w./-]+#.+\.js)$/,"must be npm:<pkg>[@ver] or github:<owner>/<repo>@<ref>#<path>.js").optional(),integrity:ce.string().max(512).regex(/^sha(256|384|512)-[A-Za-z0-9+/=]+$/,"must be SRI form: sha256-, sha384-, or sha512-<base64>").optional()}).strict()),x5=e(()=>ce.object({syntaxHighlighting:ce.object({hljsLanguages:ce.array(P5()).max(w5)}).strict()})),Cc=e(()=>ce.object({themes:ce.union([Wn().describe("Path to a themes directory or file, relative to the plugin root. When set, the themes/ directory is not auto-loaded — list its files here if you want both."),ce.array(Wn().describe("Path to a themes directory or file, relative to the plugin root. When set, the themes/ directory is not auto-loaded — list its files here if you want both.")).describe("List of theme directory or file paths. When set, the themes/ directory is not auto-loaded.")])})),FE=e(()=>ce.object({workflows:ce.union([Wn().describe("Path to a workflows directory or .js file, relative to the plugin root. When set, the workflows/ directory is not auto-loaded — list its files here if you want both."),ce.array(Wn().describe("Path to a workflows directory or .js file, relative to the plugin root. When set, the workflows/ directory is not auto-loaded — list its files here if you want both.")).describe("List of workflow directory or .js file paths. When set, the workflows/ directory is not auto-loaded.")]).optional()})),EE=e(()=>ce.string().min(1)),N5=e(()=>ce.string().min(2).refine((i)=>i.startsWith("."),{message:'File extensions must start with dot (e.g., ".ts", not "ts")'})),hE=e(()=>{let[i,...c]=nc().options;return ce.union([i.extend({network:kE().describe("The network hosts this server reaches, as its author states them, for `claude plugin validate` to list. Shown only: it is not checked, allows no host, limits nothing and is not passed to the server.")}),...c])}),BE=e(()=>ce.object({mcpServers:ce.union([hr().describe("MCP servers to include in the plugin (in addition to those in the .mcp.json file, if it exists)"),_E().describe("Path or URL to MCPB file containing MCP server configuration"),ce.record(ce.string(),hE()).describe("MCP server configurations keyed by server name"),ce.array(ce.union([hr().describe("Path to MCP servers configuration file"),_E().describe("Path or URL to MCPB file"),ce.record(ce.string(),hE()).describe("Inline MCP server configurations")])).describe("Array of MCP server configurations (paths, MCPB files, or inline definitions)")])})),zE=e(()=>ce.object({type:ce.enum(["string","number","boolean","directory","file"]).describe("Type of the configuration value"),title:ce.string().describe("Human-readable label shown in the config dialog"),description:ce.string().describe("Help text shown beneath the field in the config dialog"),required:ce.boolean().optional().describe("If true, validation fails when this field is empty"),default:ce.union([ce.string(),ce.number(),ce.boolean(),ce.array(ce.string())]).optional().describe("Default value used when the user provides nothing"),multiple:ce.boolean().optional().describe("For string type: allow an array of strings"),sensitive:ce.boolean().optional().describe("If true, masks dialog input and stores value in secure storage (keychain/credentials file) instead of settings.json"),min:ce.number().optional().describe("Minimum value (number type only)"),max:ce.number().optional().describe("Maximum value (number type only)"),options:ce.array(ce.string().min(1,"An option cannot be empty").max(64,"An option can be at most 64 characters").refine((i)=>Kn(i)===i,{message:"An option cannot contain control, invisible or bidirectional-formatting characters"}).refine((i)=>i.trim()===i,{message:"An option cannot start or end with a space"})).min(1,"options needs at least one value").refine((i)=>new Set(i.map((c)=>c.toLowerCase())).size===i.length,{message:"options cannot repeat a value (in any letter case)"}).readonly().optional().describe("For string type: the only values the field takes. /config shows the field as a picker over them, and a stored value outside them counts as unset")}).strict().superRefine((i,c)=>{if(i.options===void 0)return;if(i.type!=="string"||i.multiple===!0||i.sensitive===!0){c.addIssue({code:"custom",path:["options"],message:'options is only for a field of type "string" that is neither multiple nor sensitive'});return}if(i.default===void 0){if(i.required!==!0)c.addIssue({code:"custom",path:["default"],message:"a field with options needs a default among them, or required: true"});return}if(typeof i.default!=="string"||!i.options.includes(i.default))c.addIssue({code:"custom",path:["default"],message:`default must be one of the options: ${i.options.join(", ")}`})})),GE=e(()=>ce.object({userConfig:ce.record(ce.string().regex(/^[A-Za-z_]\w*$/,"Option keys must be valid identifiers (letters, digits, underscore; no leading digit) — they become CLAUDE_PLUGIN_OPTION_<KEY> env vars in hooks"),zE()).optional().describe("User-configurable values this plugin needs. Prompted at enable time. Non-sensitive values saved to settings.json; sensitive values to secure storage. Available as ${user_config.KEY} in MCP/LSP server config, hook commands, and (non-sensitive only) skill/agent content. Keep sensitive value counts small.")})),WE=e(()=>ce.object({channels:ce.array(ce.object({server:ce.string().min(1).describe("Name of the MCP server this channel binds to. Must match a key in this plugin's mcpServers."),displayName:ce.string().optional().describe('Human-readable name shown in the config dialog title (e.g., "Telegram"). Defaults to the server name.'),userConfig:ce.record(ce.string(),zE()).optional().describe("Fields to prompt the user for when enabling this plugin in assistant mode. Saved values are substituted into ${user_config.KEY} references in the mcpServers env.")}).strict()).describe("Channels this plugin provides. Each entry declares an MCP server as a message channel and optionally specifies user configuration to prompt for at enable time.")})),SE=e(()=>ce.strictObject({command:ce.string().min(1).refine((i)=>{if(i.includes(" ")&&!i.startsWith("/"))return!1;return!0},{message:"Command should not contain spaces. Use args array for arguments."}).describe('Command to execute the LSP server (e.g., "typescript-language-server")'),args:ce.array(EE()).optional().describe("Command-line arguments to pass to the server"),extensionToLanguage:ce.record(N5(),EE()).refine((i)=>Object.keys(i).length>0,{message:"extensionToLanguage must have at least one mapping"}).describe("Mapping from file extension to LSP language ID. File extensions and languages are derived from this mapping."),transport:ce.enum(["stdio","socket"]).default("stdio").describe("Communication transport mechanism"),env:ce.record(ce.string(),ce.string()).optional().describe("Environment variables to set when starting the server"),initializationOptions:ce.unknown().optional().describe("Initialization options passed to the server during initialization"),settings:ce.unknown().optional().describe("Settings passed to the server via workspace/didChangeConfiguration"),workspaceFolder:ce.string().optional().describe("Workspace folder path to use for the server"),startupTimeout:ce.number().int().positive().optional().describe("Maximum time to wait for server startup (milliseconds)"),shutdownTimeout:ce.number().int().positive().optional().describe("Maximum time to wait for graceful shutdown (milliseconds)"),requestTimeout:ce.number().int().positive().max(2147483647).optional().describe("Maximum time to wait for the server to answer a request (milliseconds). Defaults to 60000."),restartOnCrash:ce.boolean().optional().describe("Whether to restart the server if it crashes"),maxRestarts:ce.number().int().nonnegative().optional().describe("Maximum number of restart attempts before giving up"),diagnostics:ce.boolean().optional().describe("Whether to push publishDiagnostics into the agent context after edits. Set to false to keep LSP navigation (goToDefinition, hover, etc.) but suppress automatic diagnostic injection. Defaults to true.")})),k5=e(()=>ce.strictObject({name:ce.string().min(1).describe("Identifier for this monitor, unique within the plugin. Used to dedupe so re-arming (plugin reload, repeat skill invoke) does not spawn duplicates."),command:ce.string().min(1).describe('Shell command to run as a persistent background monitor. Each stdout line is delivered to the model as a <task_notification> event; the process runs for the session lifetime. ${CLAUDE_PLUGIN_ROOT}, ${CLAUDE_PLUGIN_DATA}, ${CLAUDE_PROJECT_DIR}, ${user_config.*}, and ${ENV_VAR} are substituted. Runs in the session cwd (the named --project-config-root when a host set one) — prefix with `cd "${CLAUDE_PLUGIN_ROOT}" && ` if the script needs its own directory.'),description:ce.string().min(1).describe("Short human-readable description of what is being monitored (shown in task panel and notification summary)."),when:ce.union([ce.literal("always"),ce.string().startsWith("on-skill-invoke:").refine((i)=>i.length>16,{message:"on-skill-invoke: must specify a skill name"})]).default("always").describe('Arm trigger. "always" arms at session start and on plugin reload. "on-skill-invoke:<skill>" arms the first time that skill is dispatched (via Skill tool or slash command).')})),v5=e(()=>ce.array(k5()).refine((i)=>new Set(i.map((c)=>c.name)).size===i.length,{message:"Monitor names must be unique within a plugin"})),bc=e(()=>ce.object({monitors:ce.union([hr().describe("Path to a JSON file containing the monitors array, relative to the plugin root"),v5()]).describe("Background watch scripts the host arms as persistent Monitor tasks (unsandboxed, same trust tier as hooks) so plugins need not instruct the model to arm them. When omitted, monitors/monitors.json at the plugin root is loaded if present.")})),KE=e(()=>ce.object({lspServers:ce.union([hr().describe("Path to .lsp.json configuration file relative to plugin root"),ce.record(ce.string(),SE()).describe("LSP server configurations keyed by server name"),ce.array(ce.union([hr().describe("Path to LSP configuration file"),ce.record(ce.string(),SE()).describe("Inline LSP server configurations")])).describe("Array of LSP server configurations (paths or inline definitions)")])})),M5=/^@[a-z0-9][a-z0-9-._]*\/[a-z0-9][a-z0-9-._]*$/,U5=/^[a-z0-9][a-z0-9-._]*$/,H5=/^@[a-z0-9][a-z0-9-._]*\/\*$/;function Rc(i){return!i.includes("..")&&!i.includes("//")&&(M5.test(i)||U5.test(i))}var jE=e(()=>ce.string().refine((i)=>!i.includes("..")&&!i.includes("//"),"Package name cannot contain path traversal patterns").refine((i)=>Rc(i),"Invalid npm package name format")),$E=/^[a-z0-9](?:[a-z0-9._-]*[a-z0-9_-])?$/,F5=/^[0-9a-f]{64}$/;var B5=64;var z5=e(()=>ce.object({sha256:ce.string().regex(F5)}));function G5(i){let c=ce.record(ce.string(),ce.unknown()).safeParse(i);if(!c.success)return;let T=Object.create(null),D=0;for(let[w,v]of Object.entries(c.data)){if(D>=B5)break;let U=z5().safeParse(v);if($E.test(w)&&U.success)T[w]=U.data,D++}return D>0?T:void 0}var VE=e(()=>ce.object({binaries:ce.unknown().transform(G5).describe("sha256-pinned files to fetch into bin/ at install time, keyed by basename (target triple encoded in the name)")})),YE=e(()=>ce.object({settings:ce.record(ce.string(),ce.unknown()).optional().describe("Settings to merge into the user settings while this plugin is enabled. Only the documented allowlisted keys are applied.")})),XE=e(()=>ce.object({types:Wn().refine((i)=>i.endsWith(".d.ts"),{message:"types must name a TypeScript declaration file ending in '.d.ts'"}).refine((i)=>!i.split(/[\\/]/).includes(".."),{message:"types must stay inside the plugin directory (no '..' segment)"}).optional().describe("Path to the plugin's type contract, relative to the plugin root and starting with ./: a self-contained .d.ts (no import, export-from, require or reference) that exports the types of the noun the plugin's hooks module adds in engine.create at its top level and declares the noun in a `declare module 'claude-code' { interface EngineInterface { ... } }` block, nothing else. A mod that lists this plugin under dependencies gets the contract laid at .claude-plugin/types/<plugin>/index.d.ts each time the engine loads it from a folder the person owns, so it types against the noun with nothing copied; claude plugin validate checks the file.")})),JE=e(()=>ce.object({experimental:ce.preprocess((i)=>n(i)?i:void 0,ce.object({...Cc().partial().shape,...x5().partial().shape,...bc().partial().shape,...Ac().partial().shape,evals:L5().optional().describe("Directory of eval cases for the plugin evaluation harness, relative to the plugin root (default: evals/). A list is accepted; its first entry is the case directory.")}).passthrough().optional().describe("Components whose manifest shape may change without a deprecation cycle. Move a key out of here once it is promoted to stable."))}));var W5=e(()=>ce.object({...cn().shape,...vE().partial().shape,...ME().partial().shape,...UE().partial().shape,...HE().partial().shape,...Ac().partial().shape,...Cc().partial().shape,...FE().shape,...WE().partial().shape,...BE().partial().shape,...KE().partial().shape,...bc().partial().shape,...YE().partial().shape,...XE().partial().shape,...GE().partial().shape,...VE().partial().shape,...JE().partial().shape})),KOe=e(()=>new as({$schema:()=>cn().shape.$schema,name:()=>cn().shape.name,displayName:()=>cn().shape.displayName,version:()=>cn().shape.version,description:()=>cn().shape.description,author:()=>cn().shape.author,homepage:()=>cn().shape.homepage,repository:()=>cn().shape.repository,license:()=>cn().shape.license,keywords:()=>cn().shape.keywords,defaultEnabled:()=>cn().shape.defaultEnabled,dependencies:()=>cn().shape.dependencies,metadata:()=>cn().shape.metadata,engines:()=>cn().shape.engines,network:()=>cn().shape.network,hooks:()=>vE().partial().shape.hooks,commands:()=>ME().partial().shape.commands,agents:()=>UE().partial().shape.agents,skills:()=>HE().partial().shape.skills,outputStyles:()=>Ac().partial().shape.outputStyles,themes:()=>Cc().partial().shape.themes,workflows:()=>FE().shape.workflows,channels:()=>WE().partial().shape.channels,mcpServers:()=>BE().partial().shape.mcpServers,lspServers:()=>KE().partial().shape.lspServers,monitors:()=>bc().partial().shape.monitors,settings:()=>YE().partial().shape.settings,types:()=>XE().partial().shape.types,userConfig:()=>GE().partial().shape.userConfig,binaries:()=>VE().partial().shape.binaries,experimental:()=>JE().partial().shape.experimental},new Set(["name"])));var ZE=new Set(["url","github","git","npm","file","directory","skills-dir","hostPattern","pathPattern","settings"]);function qE(i){try{return new RegExp(i),!0}catch{return!1}}function K5(i){return Er(i)||je(i)}var QE="ssh.github.com";function cc(i){return Xo(i)||oi(i)===QE}var j5=/^[A-Za-z0-9._-]+$/;function $5(i){return j5.test(i)&&!i.startsWith("-")&&i!=="."&&i!==".."}function eh(i){if(!i.endsWith("/*"))return null;let c=i.slice(0,-2);return $5(c)?c:null}function V5(i){let c=[];for(let T of i.split("/")){if(T===".")continue;if(T===".."){c.pop();continue}c.push(T)}return c.filter((T)=>T!=="").join("/")}function Y5(i){let c=i.length;for(;;){let T=c;while(T>0&&i.charCodeAt(T-1)===47)T--;if(T>=4&&i.startsWith(".git",T-4))T-=4;if(T===c)return c===i.length?i:i.slice(0,c);c=T}}function yE(i){let c=dc(i);return c===QE?Cn:c}function X5(i,c){if(i.includes("://"))try{let D=uE(i);if(D===null)return i;D.hostname=yE(D.hostname),D.username="",D.password="",D.search="",D.hash="";try{D.pathname=decodeURIComponent(D.pathname)}catch{}let w=V5(D.pathname);return D.pathname=c?.stripDotGit?Y5(w):w,D.toString()}catch{return i}let T=We(i);return T?`${yE(T.host)}:${T.path}`:i}var J5=new Set(["http:","https:","git:","git+http:","git+https:"]);function Z5(i){if(lc(i))return i;if(i.includes("://"))try{let D=new URL(i);if(D.hostname=dc(D.hostname),J5.has(D.protocol)||Xo(D.hostname))D.username="",D.password="";return D.toString()}catch{return i}let c=pE(i);if(!c)return i;let T=c.host.toLowerCase().replace(/\.+$/,"");return Xo(T)?`${Cn}:${c.path}`:`${c.user}@${T}:${c.path}`}function th(i){if(i.includes("://")){if(K5(i))return!1;let v=We(i)?.host;if(v!==void 0&&cc(v)&&X5(i,{stripDotGit:!0}).includes("*"))return!0;let U=ae(i)?.hostname;if(!U||!cc(U))return!1;let B=Z5(i);try{let K=new URL(B);return K.hostname.includes("*")||K.pathname.includes("*")}catch{return B.includes("*")}}let c=We(i),T=c?.host,D=c?.path;if(!T||D===void 0||!cc(T))return!1;let w=D;try{w=decodeURIComponent(D)}catch{}return w.includes("*")}function nh(i){return ce.discriminatedUnion("source",[ce.object({source:ce.literal("url"),url:ce.string().url().describe("Direct URL to marketplace.json file"),headers:ce.record(ce.string(),ce.string()).optional().describe("Custom HTTP headers (e.g., for authentication)"),headersHelper:Ec().optional().describe("Command that prints a JSON object of HTTP headers (e.g. a short-lived auth token). Its output overrides `headers` and, like `headers`, is inherited by same-origin archive downloads from this marketplace. Runs from a fixed directory (the Claude config home, never the session's), so give a bare command found via PATH or an absolute path; it is re-run on later refreshes of this marketplace.")}),ce.object({source:ce.literal("github"),repo:ce.string().describe('GitHub repository in owner/repo format. ONLY in the managed-settings policy lists (strictKnownMarketplaces / blockedMarketplaces) the owner-wildcard form "owner/*" matches every repository under exactly that owner. Everywhere else (marketplace add, extraKnownMarketplaces, known_marketplaces.json) the value '+"must name a single repository — a wildcard is taken literally and fails to clone."),ref:ce.string().optional().describe('Git branch, tag or full commit id to use (e.g., "main", "v1.0.0"). Defaults to repository default branch. A full commit id (40 or 64 lowercase hex digits) holds the marketplace at that commit: refreshes and auto-updates do not move it. A branch or tag of the repository must hold the commit. Plugins listed with a remote source follow that source unless they name a `sha`. Reserved Anthropic marketplace names do not accept a commit id.'),path:ce.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:ce.array(ce.string()).optional().describe('Directories to include via git sparse-checkout (cone mode). Use for monorepos where the marketplace lives in a subdirectory. Example: [".claude-plugin", "plugins"]. If omitted, the full repository is cloned.'),skipLfs:ce.boolean().optional().describe("Has no effect; accepted so existing settings keep working. Claude Code's own git never downloads Git LFS content: LFS-tracked files in the marketplace repository are checked out as pointer files whether or not this is set, and adding or updating the marketplace says how many were. To fetch their content, run `git lfs pull` in the marketplace's checkout under ~/.claude/plugins/marketplaces/.")}),ce.object({source:ce.literal("git"),url:ce.string().describe("Full git repository URL"),ref:ce.string().optional().describe('Git branch, tag or full commit id to use (e.g., "main", "v1.0.0"). Defaults to repository default branch. A full commit id (40 or 64 lowercase hex digits) holds the marketplace at that commit: refreshes and auto-updates do not move it. A branch or tag of the repository must hold the commit. Plugins listed with a remote source follow that source unless they name a `sha`. Reserved Anthropic marketplace names do not accept a commit id.'),path:ce.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:ce.array(ce.string()).optional().describe('Directories to include via git sparse-checkout (cone mode). Use for monorepos where the marketplace lives in a subdirectory. Example: [".claude-plugin", "plugins"]. If omitted, the full repository is cloned.'),skipLfs:ce.boolean().optional().describe("Has no effect; accepted so existing settings keep working. Claude Code's own git never downloads Git LFS content: LFS-tracked files in the marketplace repository are checked out as pointer files whether or not this is set, and adding or updating the marketplace says how many were. To fetch their content, run `git lfs pull` in the marketplace's checkout under ~/.claude/plugins/marketplaces/.")}),ce.object({source:ce.literal("npm"),package:jE().or(ce.string().regex(H5,"Invalid npm package name format")).describe('npm package containing marketplace.json (e.g. "@acme/claude-marketplace"). A scope wildcard such as "@acme/*" still parses in a managed list, so a list that holds one stays valid, but it matches no marketplace package.'),version:ce.string().optional().describe('Version or range to fetch (e.g. "1.4.0", "^1.4"); defaults to the latest dist-tag'),registry:ce.string().url().refine(CE,"Registry must be an http(s) URL").optional().describe("Registry URL. When adding a marketplace: a one-off registry override (otherwise your npm configuration decides). Under allowManagedPermissionRulesOnly, an npm marketplace keeps plugin allowed-tools only when both the entry and the registration pin this same registry.")}),ce.object({source:ce.literal("file"),path:ce.string().describe("Local file path to marketplace.json")}),ce.object({source:ce.literal("directory"),path:ce.string().describe("Local directory containing .claude-plugin/marketplace.json")}),ce.object({source:ce.literal("skills-dir")}).describe("Policy-list sentinel for the ~/.claude/skills/ auto-load (@skills-dir plugins). In strictKnownMarketplaces: opt the scan back IN (by default any allowlist blocks it). In blockedMarketplaces: turn the scan OFF without otherwise restricting marketplaces. Only meaningful in those two managed-settings lists (areLocalPluginDirsAllowedByPolicy); known_marketplaces.json / marketplace add etc. ignore it."),ce.object({source:ce.literal("hostPattern"),hostPattern:ce.string().describe('Regex pattern to match the host/domain extracted from any marketplace source type. For github sources, matches against github.com. For git sources (SSH or HTTPS), extracts the hostname from the URL. Use in strictKnownMarketplaces to allow all marketplaces from a specific host (e.g., "^github\\.mycompany\\.com$").')}),ce.object({source:ce.literal("pathPattern"),pathPattern:ce.string().describe('Regex pattern matched against the .path field of file and directory sources. Use in strictKnownMarketplaces to allow filesystem-based marketplaces alongside hostPattern restrictions for network sources. Use ".*" to allow all filesystem paths, or a narrower pattern (e.g., "^/opt/approved/") to restrict to specific directories.')}),ce.object({source:ce.literal("settings"),name:i?b5().describe("Marketplace name, as stored in known_marketplaces.json. A reserved name is refused per entry at load (revalidateReservedNameEntry); a look-alike name is judged when that marketplace's own catalog is parsed (catalogNameSchemaFor)."):C5().refine((c)=>!hc.has(c.toLowerCase()),{message:"Reserved marketplace names cannot be used with settings sources. validateOfficialNameSource only accepts github/git sources from anthropics/* for these names; a settings source would be rejected after loadAndCacheMarketplace has already written to disk with cleanupNeeded=false."}).describe("Marketplace name. Must match the extraKnownMarketplaces key (enforced); the synthetic manifest is written under this name. Same validation "+"as PluginMarketplaceSchema plus reserved-name rejection — "+"validateOfficialNameSource runs after the disk write, too late to clean up."),plugins:ce.array(n8()).describe("Plugin entries declared inline in settings.json"),owner:Oc().optional()}).describe("Inline marketplace manifest defined directly in settings.json. The reconciler writes a synthetic marketplace.json to the cache; diffMarketplaces detects edits via isEqual on the stored source (the plugins array is inside this object, so edits surface as sourceChanged).")])}var ri=e(()=>nh(!1));var Tc=String.raw`[\w./+-]`,jOe=new RegExp(`^(?:#${Tc}*)?$`),$Oe=new RegExp(String.raw`^(?:(?:git\+)?ssh:\/\/)?[^@:/\\?#%]+@[^@:/\\?#]+:[^@?#]*(?:#${Tc}*)?$`),VOe=new RegExp(String.raw`^(?:(?:github|gitlab|bitbucket):)?[^@:/\\?#%]+(?:\/[^@:/\\?#%]+)+(?:#${Tc}*)?$`);var q5=e(()=>nh(!0));function oh(){return ri()}var Dc=e(()=>oh()),ol=e(()=>oh()),uc=e(()=>ce.string().length(40).regex(/^[a-f0-9]{40}$/,"Must be a full 40-character lowercase git commit SHA")),rh=e(()=>ce.string().regex(/^[0-9a-fA-F]{64}$/,"Must be a 64-character hex SHA-256 digest")),Q5="Archive URLs must use https:// and must not point at a loopback, link-local, or cloud-metadata host";function e8(i){try{let c=new URL(i);return c.protocol==="https:"&&!J_(c.hostname)}catch{return!1}}var t8=e(()=>ce.object({source:ce.literal("archive"),url:ce.string().url().refine(e8,{message:Q5}).describe("HTTPS URL of a zip archive containing the plugin. The plugin root (the directory holding .claude-plugin/) may be at the top of the archive "+"or nested one directory deep — a single wrapping directory is stripped."),sha256:rh().optional().describe("SHA-256 digest of the archive. When set, every download is verified against it and the install is refused on mismatch. It also serves as the version identity when neither plugin.json nor the marketplace entry declares a `version`. Recommended. Note the update signal is the version string (plugin.json "+"version, else the entry version, else this digest) — changing only the digest "+"while a version is declared does not trigger an update.")}).describe("Plugin distributed as a zip archive fetched over HTTPS — for hosting on any "+"static file server or artifact repository (S3, GitLab, nginx) with no git or npm on the client. Authentication: the entry's own `headers` / `headersHelper` (bound to this URL), overlaid on the enclosing url-source marketplace's headers (static or `headersHelper`-minted) when the archive shares its origin.")),sh=e(()=>ce.union([ce.preprocess((i)=>i==="."?"./":i,Wn()).describe("Path to the plugin root, relative to the marketplace root (the directory containing .claude-plugin/, not .claude-plugin/ itself)"),ce.object({source:ce.literal("npm"),package:jE().or(ce.string().refine((i)=>/^(?:file|https?|git(?:\+https?|\+ssh)?|ssh|github|gitlab|bitbucket):/i.test(i)||!i.includes(".."),'Package reference cannot contain ".." path segments')).describe("Package name (or url, or local path, or anything else that can be passed to `npm` as a package)"),version:ce.string().optional().describe("Specific version or version range (e.g., ^1.0.0, ~2.1.0)"),registry:ce.string().url().refine(CE,"Registry must be an http(s) URL").optional().describe("Custom NPM registry URL (defaults to using system default, likely npmjs.org)")}).describe("NPM package as plugin source"),ce.object({source:ce.literal("url"),url:ce.string().describe("Full git repository URL (https:// or git@)"),ref:ce.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:uc().optional().describe("Specific commit SHA to use")}),ce.object({source:ce.literal("github"),repo:ce.string().describe("GitHub repository in owner/repo format"),ref:ce.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:uc().optional().describe("Specific commit SHA to use")}),ce.object({source:ce.literal("git-subdir"),url:ce.string().describe("Git repository: GitHub owner/repo shorthand, https://, or git@ URL"),path:ce.string().min(1).describe('Subdirectory within the repo containing the plugin (e.g., "tools/claude-plugin"). '+"Checked out sparsely — over https or ssh as a partial clone (--filter=tree:0) — to minimize bandwidth for monorepos."),ref:ce.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:uc().optional().describe("Specific commit SHA to use")}).describe("Plugin located in a subdirectory of a larger repository (monorepo). Only the specified subdirectory is materialized; the rest of the repo is not downloaded."),t8(),ce.object({source:ce.literal("command"),command:ce.string().min(1).max(_c,{message:"command must not be longer than the install consent UI can display"}).refine((i)=>!RE.test(i),{message:"command must be printable ASCII (letters, digits, punctuation, single spaces) with no runs of 4 or more spaces"}).describe("Shell command that prints the absolute path of the plugin directory on stdout (exactly one line) and exits 0. It must leave a complete plugin in that directory before exiting; the directory is copied into the plugin cache, so the printed path may change between runs (it is re-resolved on every install and update, and once per session in the background). Runs through the platform shell (sh on macOS/Linux, cmd.exe on Windows) from the user's home directory with Claude Code's subprocess environment."),timeout:ce.number().int().positive().max(fE).optional().describe("Seconds to wait for the command before giving up (default: 60)"),mode:ce.enum(["copy","link"]).optional().describe("copy (default): the printed directory is copied into the plugin cache and content-hashed, so it may be deleted afterwards. link: the cache entry links to the printed directory "+"in place (no copy, no size limit; macOS/Linux) — for large exports; the directory must then stay "+"valid while Claude Code runs, and a different printed path is what signals new content.")}).describe("Plugin directory produced by a locally installed tool (e.g. an IDE that renders its plugin for the currently selected SDK). Claude Code runs the command, copies the directory it prints, and re-runs it in the background at startup to pick up changes."),ce.object({source:ce.literal("unsupported"),error:ce.string().optional()}).describe("Placeholder for source types this Claude Code version does not recognize, or a known type whose fields failed validation (then `error` "+"holds the reason). Never authored by hand — PluginMarketplaceSchema rewrites "+"unparseable sources to this so the entry remains in marketplace.plugins (detectDelistedPlugins must not see it as removed). Install attempts fail at cachePlugin with an actionable message.")])),n8=e(()=>ce.object({name:nl().describe("Plugin name as it appears in the target repository"),source:sh().describe("Where to fetch the plugin from. Must be a remote source — relative "+"paths have no marketplace repository to resolve against. Under allowManagedPermissionRulesOnly, a settings marketplace keeps its plugins' allowed-tools only when every npm entry here pins a `registry` on a bare package name; unpinned, the package resolves through the member's own npm config, and a non-bare spelling (an `npm:` alias, a `name@range`, a URL or git spec) packs as an "+"exotic spec the pin does not bind — either way the marketplace "+"vouches no tool grants."),description:ce.string().optional(),version:ce.string().optional(),strict:ce.boolean().optional(),engines:NE(),headers:ce.record(ce.string(),ce.string()).optional().describe("HTTP headers sent when downloading this entry's `archive` source."),headersHelper:Ec().optional().describe("Command that prints a JSON object of HTTP headers for downloading this entry's `archive` source. Runs only when a user explicitly installs or updates this plugin. Unlike a catalog entry, an entry written here does not need `strict: false`: it is declared in a settings file, which has no manifest fields to inline. A declaration in project settings is not operator-authored, so request-routing and client-identity header names are still filtered there. Use an absolute path.")}).refine((i)=>typeof i.source!=="string",{message:'Plugins in a settings-sourced marketplace must use remote sources (github, git-subdir, npm, url, archive, command). Relative-path sources like "./foo" have no marketplace repository to resolve against.'}).refine((i)=>typeof i.source==="string"||i.source.source!=="unsupported",{message:"source.source: 'unsupported' is a parse-time placeholder and cannot be authored. Use a remote source (github, git-subdir, npm, url, archive, command)."}));var o8=e(()=>ce.object({cli:ce.array(ce.string().max(64)).max(10).optional().describe('First command tokens (e.g. ["stripe"]) — exact match against commands run this session.'),hosts:ce.array(ce.string().max(128)).max(20).optional().describe('Hostnames (e.g. ["api.stripe.com"]) — exact, case-insensitive match against '+"hostnames seen in https?:// URLs in bash commands run this session. Bare hostname only: lowercase, no scheme, no port, no path."),filesRead:ce.array(ce.string().max(256)).max(10).optional().describe('Glob patterns (e.g. ["**/*.tf"]) — the plugin is relevant when a file Claude has read '+"this session matches any pattern. Matched against read-file paths, forward-slash normalized, case-insensitive."),manifestDeps:ce.array(ce.object({file:ce.string().max(256),pattern:ce.string().max(256)})).max(10).optional().describe("Dependency declared in a package manifest. Each {file, pattern} is a pair of RegExp sources: "+"`file` matches the manifest filename (package.json, go.mod, requirements.txt, …); "+"`pattern` matches the dependency declaration inside that file. Evaluated against files read this session."),cwd:ce.array(ce.string().max(256)).max(10).optional().describe('Glob patterns (e.g. ["Engine/Source/Runtime/Renderer/**"]) — the plugin is relevant when the '+`session's working directory is at or under a directory matching the pattern. Matched against the cwd both relative to the enclosing git repo root and as an absolute path, forward-slash normalized, case-insensitive. A bare directory (no glob characters) means "cwd is at or under this directory". Known at session start, so this signal can surface a suggestion before the first turn.`)})),r8=e(()=>ce.object({topic:ce.string().max(64).optional().describe('What the user is working with when this plugin is relevant — fills "Working with {topic}?". '+'Often the product name (e.g. "Stripe"); use a domain (e.g. "design") when the plugin name does not read naturally as a topic. Defaults to the plugin name with each hyphen-segment capitalized.'),signals:o8().optional().describe("Matchers that determine when the plugin is relevant.")})),s8=e(()=>W5().partial().extend({name:nl().describe("Unique identifier matching the plugin name"),source:sh().describe("Where to fetch the plugin from"),headers:ce.record(ce.string(),ce.string()).optional().describe("Custom HTTP headers for fetching this plugin's archive; overrides the marketplace's"),headersHelper:Ec().optional().describe("Command that prints a JSON object of HTTP headers for fetching this plugin's archive (e.g. a short-lived auth token); overrides this entry's `headers` and the marketplace's. Runs only when the user installs or updates this plugin, never during catalog browse. An entry that sets it must be `strict: false` with its manifest inlined here, so consent is informed from the entry alone before the command runs."),category:ce.string().optional().describe('Category for organizing plugins (e.g., "productivity", "development")'),tags:ce.array(ce.string()).optional().describe("Tags for searchability and discovery"),strict:ce.boolean().optional().default(!0).describe("Require the plugin manifest to be present in the plugin folder. If false, the marketplace entry provides the manifest."),relevance:ce.preprocess((i)=>n(i)?i:void 0,r8().optional()).describe(`Declares when this plugin is relevant to the user's work. Consumed by the spinner tip ("Working with {topic}?"), session-start auto-suggest, and marketplace browse ranking.`)})),i8=e(()=>ce.object({name:nl()}));function a8(i){let c=s8();return i.flatMap((T,D)=>{let w=c.safeParse(T);if(w.success){let B=w.data.source;if(typeof B==="object"&&B.source==="unsupported"&&B.error!==void 0)return[{...w.data,source:{source:"unsupported"}}];return[w.data]}let v=i8().safeParse(T).data?.name,U=w.error.issues.map((B)=>`${B.path.join(".")}: ${B.message}`).join(", ");if(v){t(`Stubbing unparseable marketplace plugin entry (${v}): ${U}`,{level:"warn"});let B=ih(n(T)?T.source:void 0)?g8:Lc(T)?void 0:c8(w.error.issues)??rl(w.error.issues);return[{name:v,source:{source:"unsupported",...B&&{error:B}},strict:!0}]}return t(`Dropping unparseable marketplace plugin entry (index ${D}): ${U}`,{level:"warn"}),[]})}function l8(i){if(!n(i))return i;let c=Object.keys(i).filter((T)=>typeof i[T]!=="string"&&i[T]!==null);if(c.length>0){if(t(`Unreadable entries in a marketplace's renames map: ${c.length}`,{level:"warn"}),Object.hasOwn(i,"__proto__"))return}return{...i,...Object.fromEntries(c.map((T)=>[T,T]))}}var d8=new Set(["npm","url","github","git-subdir","archive","command","unsupported"]);function Lc(i){if(!i||typeof i!=="object")return!1;let c=i.source;if(!c||typeof c!=="object")return!1;let T=c.source;return typeof T==="string"&&!d8.has(T)}function c8(i){let c=i.find((D)=>D.path.length===1&&D.path[0]==="source");if(!c||c.code!=="invalid_union")return;let T=c.errors.find((D)=>!D.some((w)=>w.path.length===0||w.code==="invalid_value"&&w.path[0]==="source"));if(!T||T.length===0)return;return rl(T.map((D)=>({...D,path:["source",...D.path]})))}var u8=/^[A-Za-z0-9_$.-]{1,40}$/;function Vn(i){return u8.test(i)?i:"<key>"}var p8=3,f8=160;function rl(i){let c=i.slice(0,p8).map((D)=>{let w=D.path.map(String).map((U)=>Vn(U)).join("."),v=D.code==="unrecognized_keys"?`Unrecognized ${D.keys.length===1?"field":"fields"}: ${D.keys.map(Vn).join(", ")}`:Vd(D.message,f8);return w?`${w}: ${v}`:v}),T=i.length-c.length;return T>0?`${c.join(", ")} (+${T} more)`:c.join(", ")}var m8=/^[A-Za-z0-9][-A-Za-z0-9._]*$/,g8='Bare source names resolve under metadata.pluginRoot, which this marketplace does not set (or sets to a path outside the marketplace root). Use a "./relative/path" source, or set metadata.pluginRoot to allow bare names.';function ih(i){return typeof i==="string"&&m8.test(i)&&!i.includes("..")}function _8(i){if(typeof i!=="string"||i===""||i.startsWith("/")||i.includes("\\")||i.includes(":"))return;let c=i.replace(/^\.\//,"").replace(/\/+$/,"");if(c===""||c===".")return".";if(c.split("/").some((T)=>T===""||T==="."||T===".."))return;return c}function E8(i,c){if(c===void 0||!n(i)||!ih(i.source))return i;let T=c==="."?`./${i.source}`:`./${c}/${i.source}`;return{...i,source:T}}function h8(i){if(!n(i)||!Array.isArray(i.plugins))return i;let c=n(i.metadata)?_8(i.metadata.pluginRoot):void 0;if(c===void 0)return i;return{...i,plugins:i.plugins.map((T)=>E8(T,c))}}var S8=e(()=>ce.object({$schema:ce.string().optional().describe("JSON Schema reference for editor autocomplete/validation; ignored at load time"),name:yc(PE),version:ce.string().optional().describe("Marketplace manifest version"),description:ce.string().optional().describe("Human-readable description of this marketplace"),owner:Oc().describe("Marketplace maintainer or curator information"),plugins:ce.array(ce.unknown()).transform(a8).describe("Collection of available plugins in this marketplace"),forceRemoveDeletedPlugins:ce.boolean().optional().describe("When true, plugins removed from this marketplace will be automatically uninstalled and flagged for users"),metadata:ce.object({pluginRoot:ce.string().optional().describe('Base directory for bare plugin source names, relative to the marketplace root (e.g. "./plugins" resolves "source": "formatter" as ./plugins/formatter). Sources that already start with "./" are unaffected.'),version:ce.string().optional().describe("Marketplace version"),description:ce.string().optional().describe("Marketplace description")}).optional().describe("Optional marketplace metadata"),allowCrossMarketplaceDependenciesOn:ce.array(ce.string()).optional().describe("Marketplace names whose plugins may be auto-installed as dependencies. Only the root marketplace's allowlist applies — no transitive trust."),renames:ce.preprocess(l8,ce.record(ce.string(),ce.string().nullable()).optional()).catch(void 0).describe("Append-only map of old plugin name → current name (or null when removed). The loader follows this on plugin-not-found and migrates user settings to the new name.")})),YOe=e(()=>ce.preprocess(h8,S8()));var mc="[A-Za-z0-9][-A-Za-z0-9._]*",XOe=new RegExp(`^${mc}$`);var ls=e(()=>ce.string().regex(new RegExp(`^${mc}@${mc}$`),"Plugin ID must be in format: plugin@marketplace")),JOe=new RegExp(`[@:\\s/\\\\${z}]`,"u"),ZOe=new RegExp(`[${z}]`,"u"),ah=/[\p{Cc}\u200E\u200F\u202A-\u202E\u2066-\u2069]/u,y8=/^[A-Za-z0-9][-A-Za-z0-9._]*(@[A-Za-z0-9][-A-Za-z0-9._]*)?(@\^[^@]*)?$/,O8=e(()=>ce.union([ce.string().regex(y8,"Dependency must be a plugin name, optionally qualified with @marketplace").transform((i)=>i.replace(/@\^[^@]*$/,"")),ce.object({name:ce.string().min(1).regex(/^[A-Za-z0-9][-A-Za-z0-9._]*$/),marketplace:ce.string().min(1).regex(/^[A-Za-z0-9][-A-Za-z0-9._]*$/).optional()}).loose().transform((i)=>i.marketplace?`${i.name}@${i.marketplace}`:i.name)])),A8=e(()=>ce.object({version:ce.string().describe("Currently installed version"),installedAt:ce.string().describe("ISO 8601 timestamp of installation"),lastUpdated:ce.string().optional().describe("ISO 8601 timestamp of last update"),installPath:ce.string().describe("Absolute path to the installed plugin directory"),gitCommitSha:ce.string().optional().describe("Git commit SHA for git-based plugins (for version tracking)"),resolvedVersion:ce.string().optional().describe("Tag-derived semver this install resolved to (when fetched via a version constraint). Used by verifyAndDemote in preference to manifest.version, since the upstream may have forgotten to bump plugin.json."),auto:ce.boolean().optional().describe("True when this plugin was pulled in as a dependency rather than installed explicitly. Auto-installed plugins are eligible for removal by the orphan sweep when nothing depends on them. Absent = manual (preserves pre-flag installs)."),...OE(),...AE(),...bE()})),qOe=e(()=>ce.object({version:ce.literal(1).describe("Schema version 1"),plugins:ce.record(ls(),A8()).describe("Map of plugin IDs to their installation metadata")})),C8=e(()=>ce.enum(["managed","user","project","local"])),b8=e(()=>ce.object({scope:C8().describe("Installation scope"),projectPath:ce.string().optional().describe("Project path (required for project/local scopes)"),installPath:ce.string().describe("Absolute path to the versioned plugin directory"),version:ce.string().optional().describe("Currently installed version"),installedAt:ce.string().optional().describe("ISO 8601 timestamp of installation"),lastUpdated:ce.string().optional().describe("ISO 8601 timestamp of last update"),gitCommitSha:ce.string().optional().describe("Git commit SHA for git-based plugins"),resolvedVersion:ce.string().optional().describe("Tag-derived semver this install resolved to"),auto:ce.boolean().optional().describe("True when pulled in as a dependency. Eligible for orphan sweep."),copyHash:ce.string().optional().catch(void 0).describe("What a plugin managed settings enable from a remote marketplace was copied as: compared at each load, and absent on any other plugin"),...OE(),...AE(),...bE()})),QOe=e(()=>ce.object({version:ce.literal(2).describe("Schema version 2"),plugins:ce.record(ls(),ce.array(b8())).describe("Map of plugin IDs to arrays of installation entries")})),eAe=e(()=>ce.object({version:ce.literal(2),plugins:ce.record(ce.string(),ce.unknown())}));var R8=e(()=>ce.object({source:q5().describe("Where to fetch the marketplace from"),installLocation:ce.string().describe("Local cache path where marketplace manifest is stored"),lastUpdated:ce.string().describe("ISO 8601 timestamp of last marketplace refresh"),autoUpdate:ce.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup"),declaredByManagedSettings:ce.literal(!0).optional().describe("Managed settings declared this source for this name: when they later declare another, it is the organization moving its marketplace, and what its plugins saved stays")})),tAe=e(()=>ce.record(ce.string(),R8()));import*as lh from"zod/v4";function ds(i){return i==="true"?!0:i==="false"?!1:i}var sl=["aspell","hunspell","ispell"];import*as jt from"zod/v4";var T8=["autoMode","deepLink","voice","briefView","screenReader"],D8={},wc={autoMode:{buildGate:()=>!0,shape:()=>({skipAutoPermissionPrompt:jt.boolean().optional().describe("Whether the user has accepted the auto mode opt-in dialog"),useAutoModeDuringPlan:jt.boolean().optional().describe("Whether plan mode uses auto mode semantics when auto mode is available (default: true)"),autoMode:jt.object({allow:jt.array(jt.string()).optional().describe('Rules for the auto mode classifier allow section. Include the literal string "$defaults" to inherit the built-in rules at that position.'),soft_deny:jt.array(jt.string()).optional().describe('Rules for the auto mode classifier SOFT BLOCK section — destructive/irreversible actions that user intent can clear. Include the literal string "$defaults" to inherit the built-in rules at that position.'),hard_deny:jt.array(jt.string()).optional().describe('Rules for the auto mode classifier HARD BLOCK section — security boundaries that user intent does NOT clear. Include the literal string "$defaults" to inherit the built-in rules at that position.'),...!1,...{},environment:jt.array(jt.string()).optional().describe('Entries for the auto mode classifier environment section. Include the literal string "$defaults" to inherit the built-in entries at that position.'),classifyAllShell:jt.boolean().optional().describe("When true, every Bash/PowerShell allow rule is suspended while auto mode is active so all shell commands are routed through the classifier (higher safety, more classifier calls). Default: false.")}).optional().describe("Auto mode classifier prompt customization")}),permissionModes:()=>[]},deepLink:{buildGate:()=>!0,shape:()=>({disableDeepLinkRegistration:jt.enum(["disable"]).optional().describe("Prevent claude-cli:// protocol handler registration with the OS")})},voice:{buildGate:()=>!0,shape:()=>({voiceEnabled:jt.boolean().optional().describe("Enable voice mode (hold-to-talk dictation)")})},briefView:{buildGate:()=>!0,shape:()=>({defaultView:jt.enum(["chat","transcript"]).optional().describe("Default transcript view: chat (SendUserMessage checkpoints only) or transcript (full)")})},screenReader:{buildGate:()=>!1,shape:()=>D8}};function cs(){return T8.filter((i)=>wc[i].buildGate())}function dh(i){let c={};for(let T of i)c={...c,...wc[T].shape()};return c}function Pc(i){let c=[];for(let T of i)c.push(...wc[T].permissionModes?.()??[]);return c}import*as al from"zod/v4";var dAe=new RegExp("\x00ESCAPED_STAR\x00","g"),cAe=new RegExp("\x00ESCAPED_BACKSLASH\x00","g");var uAe=new RegExp("\x00GLOBSTAR\x00","g");function ch(i){return i.match(/^(.+):\*$/)?.[1]??null}function uh(i){let c=i.trimEnd();if(!c.endsWith("*"))return!1;let T=0,D=c.length-2;while(D>=0&&c[D]==="\\")T++,D--;return T%2===0}var si={filePatternTools:["Read","Write","Edit","Glob","NotebookRead","NotebookEdit","Cd"],bashPrefixTools:["Bash"],customValidation:{WebSearch:(i)=>{if(i.includes("*")||i.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:(i)=>{if(i.includes("://")||i.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(!i.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}}}},fAe=[...si.filePatternTools,"Grep","MultiEdit","LS"];function xc(i){return si.filePatternTools.includes(i)}function ph(i){return si.bashPrefixTools.includes(i)}function fh(i){return Object.hasOwn(si.customValidation,i)?si.customValidation[i]:void 0}function _h(i,c){let T=0,D=c-1;while(D>=0&&i[D]==="\\")T++,D--;return T%2!==0}function mh(i,c){let T=0;for(let D=0;D<i.length;D++)if(i[D]===c&&!_h(i,D))T++;return T}var L8=/(?:^|[^\\])\\[()]/;function I8(i){return L8.test(i)&&mh(i,"(")!==mh(i,")")}var w8=/^(?:[|&;<>]|\d+[<>])/;function Eh(i){return w8.test(i)}function il(i){for(let c=0;c<i.length;c++)if(i[c]==="*"&&!_h(i,c))return!0;return!1}function P8(i){if(i.endsWith(":*"))return;let c=i.trim().split(/\s+/).filter(Boolean),T=c[0];if(c.length<3||T===void 0||il(T))return;let D=!1;for(let w of c.slice(1)){if(Eh(w))return;if(il(w)){D=!0;continue}if(w.startsWith("-"))continue;return D?T:void 0}return}function x8(i){if(i.endsWith(":*"))return;let c=i.trim().split(/\s+/).filter(Boolean),T=c.findIndex((w)=>!/^[A-Za-z_]\w*\+?=/.test(w)),D=c[T]??"";return!Eh(D)&&c.slice(0,T).some(il)?/^[^*]+/.exec(D)?.[0]:void 0}function gh(i){if(!qs(i))return null;let c=ns(i);if(c&&!qs(c.serverName))return null;return{valid:!1,error:`Wildcard tool name "${i}" is not supported in allow rules`,suggestion:"An allow pattern must name the scope it widens — globs are permitted only in the tool position after a literal mcp__<server>__ prefix. Deny and ask rules accept wildcards anywhere",examples:["mcp__puppeteer__*","mcp__github__get_*"]}}function Nc(i,c){if(!i||i.trim()==="")return{valid:!1,error:"Permission rule cannot be empty"};let T=Xd(i);if(T.kind==="malformed")return{valid:!1,error:"Malformed Tool(content) rule",suggestion:'Rules take the form Tool or Tool(content) and must end at the closing ")"; parentheses inside the content are literal'};if(T.kind==="call"&&T.rawContent===""){if(!T.toolName)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 "${T.toolName}" without parentheses`,examples:[`${T.toolName}`,`${T.toolName}(some-pattern)`]}}let D=k_(i),w=ns(D.toolName);if(w){if(T.kind==="call"){let U=w.toolName&&!qs(w.toolName)?`${D.toolName}__*`:void 0;return{valid:!1,error:"MCP rules do not support patterns in parentheses",suggestion:U===void 0?`Use "${D.toolName}" without parentheses, or use "mcp__${w.serverName}__*" for all tools`:`Use "${D.toolName}" without parentheses. For all tools of a server, use "mcp__${w.serverName}__*" for the server "${w.serverName}", or "${U}" for a server named "${w.serverName}__${w.toolName}"`,examples:[`mcp__${w.serverName}`,`mcp__${w.serverName}__*`,w.toolName&&w.toolName!=="*"?`mcp__${w.serverName}__${w.toolName}`:void 0,U].filter(Boolean)}}if(c==="allow"){let U=gh(D.toolName);if(U)return U}return{valid:!0}}if(!D.toolName||D.toolName.length===0)return{valid:!1,error:"Tool name cannot be empty"};if(c==="allow"){let U=gh(D.toolName);if(U)return U}if(!D.toolName.includes("_")&&D.toolName[0]!==D.toolName[0]?.toUpperCase())return{valid:!1,error:"Tool names must start with uppercase",suggestion:`Use "${et(String(D.toolName))}"`};if(T.kind==="call"&&I8(T.rawContent)){let U=xc(D.toolName);return{valid:!1,error:'Ambiguous "\\(" or "\\)" beside an unescaped parenthesis',suggestion:U?"Write a Windows path with forward slashes, or spell a literal parenthesis as [(] or [)]":'Double a backslash that is a path separator ("\\\\("), and escape literal parentheses in pairs',examples:U?[`${D.toolName}(C:/Projects/(drafts)/**)`,`${D.toolName}(C:\\Projects\\[(]drafts)\\**)`]:[`${D.toolName}(C:\\tools\\\\(x86)\\run.exe *)`]}}let v=fh(D.toolName);if(v&&D.ruleContent!==void 0){let U=v(D.ruleContent);if(!U.valid)return U}if(ph(D.toolName)&&D.ruleContent!==void 0){let U=D.ruleContent;if(U===":*")return{valid:!1,error:"Prefix cannot be empty before :*",suggestion:"Specify a command prefix before :*",examples:["Bash(npm *)","Bash(git *)"]};if(c==="allow"){let K=x8(U);if(K!==void 0)return{valid:!0,warning:`${Sn(D)} has a * in a variable's value. A * also matches spaces, so this rule can also approve a different command that has ${K} later in the line, without a prompt. Give the variable an exact value instead.`,securityNotice:`${Sn(D)} allows any command at the * in its value · use an exact value`};let de=P8(U);if(de!==void 0){let pe=de==="git",me=pe?" For git, options such as -c and --exec-path can run arbitrary commands.":"",Ae=pe?" (for example Bash(git status *))":"";return{valid:!0,warning:`${Sn(D)} has a wildcard before the rest of the command, so it also matches any options inserted at that position and approves them without a prompt.${me} Replace that * with the exact value you mean, or only use * after the subcommand${Ae}.`,securityNotice:`${Sn(D)} allows any option at its * · use an exact value`}}}let B=ch(U)?.trimEnd();if(B!==void 0){if(il(B)){let K=uh(B),de=K?"matches only commands containing a literal * at that position":"will likely never match",pe=K?B:`${B}*`,me=c==="allow"?" Replace that * with the exact value you mean.":pe.endsWith(":*")?"":` Use ${Sn({toolName:D.toolName,ruleContent:pe})} for wildcard matching.`;return{valid:!0,warning:`${Sn(D)} mixes * with the trailing :* prefix syntax, so it is matched as a literal prefix (the * is not expanded) and ${de}.${me}`,...c!=="allow"&&{securityNotice:`${Sn(D)} reads its * literally${pe.endsWith(":*")?"":` · use ${Sn({toolName:D.toolName,ruleContent:pe})}`}`}}}}else if(U.includes(":*")&&!U.endsWith(":*")){let K=c==="allow"?"Replace that :* with the exact value you mean.":"It already matches as a * wildcard; moving :* to the end would make it a literal prefix and change which commands match.";return{valid:!0,warning:`${Sn(D)} has a :* that is not at the end, so it is matched as a * wildcard (the : is literal), not as the trailing :* prefix syntax. ${K}`,...c==="allow"&&{securityNotice:`${Sn(D)} reads its :* as a wildcard · use an exact value`}}}}if(xc(D.toolName)&&D.ruleContent!==void 0){if(D.ruleContent.includes(":*"))return{valid:!1,error:'The ":*" syntax is only for Bash prefix rules',suggestion:'Use glob patterns like "*" or "**" for file matching',examples:[`${D.toolName}(*.ts) - matches .ts files`,`${D.toolName}(src/**) - matches all files in src`,`${D.toolName}(**/*.test.ts) - matches test files`]}}if(D.ruleContent!==void 0){let U=D.toolName==="Write"||D.toolName==="NotebookEdit"||D.toolName==="MultiEdit"?"Edit":D.toolName==="Glob"?"Read":void 0;if(U!==void 0&&!D.ruleContent.includes(":*"))return{valid:!0,warning:`${Sn(D)} is not matched by file permission checks — only ${U}(path) rules are. Use ${Sn({toolName:U,ruleContent:D.ruleContent})} instead (${U} rules cover all file-${U==="Edit"?"editing":"reading"} tools).`,...c!=="allow"&&{securityNotice:`${Sn(D)} never matches · use ${Sn({toolName:U,ruleContent:D.ruleContent})}`}}}return{valid:!0}}var kc=e(()=>Sh()),hh=e(()=>Sh("allow"));function Sh(i){return al.string().superRefine((c,T)=>{let D=Nc(c,i);if(!D.valid){let w=D.error;if(D.suggestion)w+=`. ${D.suggestion}`;if(D.examples&&D.examples.length>0)w+=`. Examples: ${D.examples.join(", ")}`;T.addIssue({code:al.ZodIssueCode.custom,message:w,params:{received:c}})}})}var di=["accept","hold","refuse"],pl=["off","basic","full"],N8=e(()=>X.record(X.string(),X.coerce.string()));function xh(i){return X.object({allow:X.array(hh()).optional().describe("List of permission rules for allowed operations"),deny:X.array(kc()).optional().describe("List of permission rules for denied operations"),ask:X.array(kc()).optional().describe("List of permission rules that should always prompt for confirmation"),defaultMode:X.preprocess(es,X.enum([...ur,...Pc(i)])).optional().describe("Default permission mode when Claude Code needs access ('manual' is accepted as an alias for 'default')"),disableBypassPermissionsMode:X.enum(["disable"]).optional().describe("Disable the ability to bypass permission prompts"),blockReadsOutsideWorkingDirectories:X.boolean().optional().describe('Refuse file-tool reads (Read, Grep, Glob, LSP) outside the working directories in every permission mode; true in any settings source wins. No allow rule lifts it. Also binds shell commands: one that names a path outside them is asked about in every mode, and the sandbox, where it is on, denies such reads. Also set when the user picks "block" on the one-time auto-mode prompt for a read outside the working directories.'),blockFileToolReadsOutsideWorkingDirectories:X.boolean().optional().describe("@internal For the program that starts Claude Code: read only from --settings at the launch; ignored in settings sent to a running session and in user, project, local and managed settings. Refuse reads outside the working directories, other than a shell command's, in every permission mode: reads by the file tools (Read, Grep, Glob, LSP) and by other built-in tools that send or publish a file, attachments, connectors' file inputs, Chrome uploads, memory recall, a project's CLAUDE.md includes and memory. No allow rule lifts it, and blockReadsExemptPaths applies to it. With it on, only the starting directory, --add-dir and the additionalDirectories of --settings or of settings sent later by that program (a full path, on Windows with its drive, or ~ or ~/…; a relative entry does not count) count as working directories, for it and for blockWritesOutsideWorkingDirectories: the user, project, local and managed settings and /add-dir add none. Claude Code's own files stay readable: this project's and this session's files in its configuration folder, this project's memory unless a user, project or local settings file, or managed settings, chose that folder, and the CLAUDE.md, rules, skills, plugins, agents and commands in its configuration folder. It is blockReadsOutsideWorkingDirectories without that setting's hold on the shell: it does not limit shell commands, sandboxed or not, nor what MCP servers and the programs that hooks run read by themselves. Like that setting, it does not stop Claude Code loading skills, commands, agents, output styles and workflows from .claude folders above the working directory (as far as the repository's root; outside a repository, the home folder or the disk's root), nor through links in a .claude folder, the working directory's own included. It does not limit writes, but Edit and Write need an existing file read first, and where Read is refused only a shell command (such as cat) can do that. Cloud sessions (Claude Code on the web), whose file tools run in a container that is itself the boundary, may not apply it."),blockWritesOutsideWorkingDirectories:X.boolean().optional().describe("Refuse file-tool writes (Write, Edit, NotebookEdit) outside the working directories in every permission mode; true in any settings source wins. No allow rule lifts it. Files that Claude Code keeps for the session are not refused: its plan files, scratchpad and background job folder, and the auto-memory of this project, unless a repository settings file points it elsewhere (a setting of the program that starts Claude Code can narrow this and the working directories). Nothing runs them unless the model asks. Also refuses file-tool writes to Claude Code settings files, inside the working directories too, and takes EnterWorktree and ExitWorktree, which move the working directory, out of the tools on offer (a setting of the program that starts Claude Code can keep them). Does not limit shell commands, MCP tools, the programs that hooks run, or the memory tools. Cloud sessions (Claude Code on the web), whose file tools run in a container that is itself the boundary, may not apply it."),blockReadsExemptPaths:X.array(X.string().catch("")).optional().catch(void 0).describe('For the program that starts Claude Code: read only from --settings and from settings that program sends while the session runs; ignored in user, project, local and managed settings. Absolute paths, each a folder with all below it or one file, that blockReadsOutsideWorkingDirectories lets through beside the working directories. It allows nothing: an allow rule, the permission mode or the user still decides each read, as with that setting off, and a shell command that hands such a path to a program is still asked about unless a Read allow rule covers it. The paths do not become working directories, so blockWritesOutsideWorkingDirectories refuses writes to them, and they are not told to MCP servers or to the model. Each path counts as written: a link in it is not followed and a pattern is not expanded, so list every spelling that a read may arrive by. Ignored: an entry that starts with ~, has a ".." segment or has white space at either end (as written or once normalized), a relative or network path, and the root of a filesystem. Does not change what sandboxed commands may read (sandbox.filesystem.allowRead does).'),workingDirectoriesAsGiven:X.array(X.string().catch("")).optional().catch(void 0).describe("For the program that starts Claude Code: read only from --settings and from settings that program sends while the session runs; ignored in user, project, local and managed settings. Absolute paths of working directories, each spelled exactly as it is passed, letter case included (the session folder, --add-dir, permissions.additionalDirectories). To decide what lies inside a listed working directory, Claude Code takes it as written and follows no link at it, so a link that later stands in its place gives the file tools no access to where the link leads. List real paths: the files of a listed path that runs through a link count as outside the working directories, because where they really are lies outside it. List a mapped network drive by its drive-letter path: Claude Code still derives the UNC form of that path by itself and adds it, as for any mapped drive. A file path that is itself spelled as a UNC path is judged as written, so a link on the share is not seen by that spelling. It adds no working directory and allows nothing. Once listed, a path stays so until the process ends, also if later settings leave it out. Ignored: an entry that is not already normalized (a relative path, one that starts with ~, a \"..\" segment, a separator at its end unless it is a filesystem root, forward slashes on Windows, white space at either end). Does not change what sandboxed commands may write."),disableAutoMode:X.enum(["disable"]).optional().describe("Disable auto mode"),denyInsteadOfPrompting:X.boolean().optional().describe("Never wait for a person to answer a tool permission prompt: a call that would prompt is denied at once, the model is told, and the turn carries on. This is what --permission-prompts none does for -p, in every kind of session, subagents and agent teams included. Allow rules, the permission mode, auto mode's classifier and PermissionRequest hooks decide first, as they do without it; it only ever denies, and allows nothing. Claude's questions and plan mode's tools are not offered to the model, and an MCP server's request for input is cancelled unless an Elicitation hook answers it. An app or script that answers prompts through canUseTool or --permission-prompt-tool is not asked either: answer from a PermissionRequest hook instead. Read from user settings, --settings and managed settings; project and local settings are ignored, and true in any of those sources wins."),additionalDirectories:X.array(X.string()).optional().describe("Additional directories to include in the permission scope")}).passthrough()}var sCe=e(()=>xh(cs())),k8=e(()=>X.union([X.string(),X.object({}).passthrough().describe('{ id: stable id (letters, digits, ".", "_", "-"; max 64), text: the tip (max 500 characters, one line), cooldownSessions?: sessions to wait before showing it again (default 0), priority?: tie-break weight among never-shown tips (default 0) }')])),v8=e(()=>X.preprocess((i)=>Array.isArray(i)?i.filter((c)=>typeof c==="string"||!!c&&typeof c==="object"&&!Array.isArray(c)):[],X.array(k8()))),Fc=e(()=>X.object({source:ri().describe("Where to fetch the marketplace from"),installLocation:X.string().optional().describe("Local cache path where marketplace manifest is stored (auto-generated if not provided)"),autoUpdate:X.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup"),pluginDigests:X.record(X.string(),X.array(X.string()).catch([])).optional().catch(void 0).describe("Deprecated and ignored: settings that hold it still load. A plugin takes the organization tier when managed settings enable it and declare its marketplace with a remote source.")})),Bc=e(()=>{let i=()=>X.number().min(0).max(L_);return X.object({input:i(),output:i(),cacheRead:i(),cacheWrite:i()})}),zc=e(()=>X.number().gt(0).lte(10).optional()),Gc=e(()=>X.object({model:X.string().describe('Model to select, taken verbatim: an alias ("opus"), an Anthropic model ID, or a provider-format ID (Vertex, Bedrock, gateway). Same values --model accepts.'),label:X.string().optional().describe("Row title. Defaults to the model name."),description:X.string().optional().describe("Row subtitle. Defaults to a generic description."),behavesAs:X.string().optional().describe("For a model this version of Claude Code does not know: the ID of a model it does know "+'(e.g. "claude-opus-4-8") whose client-side handling — prompt profile, capability and effort '+"defaults — applies to it. Changes neither the row's label nor the model ID sent. Without it, "+"a model-catalog row for a model this version does not know is not offered until Claude Code is updated.")})),fl=e(()=>X.object({serverName:X.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:X.array(X.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:X.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for allowed remote MCP servers')}).refine((i)=>Ne([i.serverName!==void 0,i.serverCommand!==void 0,i.serverUrl!==void 0],Boolean)===1,{message:'Entry must have exactly one of "serverName", "serverCommand", or "serverUrl"'})),ml=e(()=>X.object({serverName:X.string().min(1,"Server name must be non-empty").refine((i)=>i.trim().length>0,{message:"Server name must not be whitespace-only"}).refine((i)=>i===i.trim(),{message:"Server name has leading or trailing whitespace and will never match (names are compared verbatim)"}).optional().describe("Name of the MCP server that is explicitly blocked"),serverCommand:X.array(X.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:X.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for blocked remote MCP servers')}).refine((i)=>Ne([i.serverName!==void 0,i.serverCommand!==void 0,i.serverUrl!==void 0],Boolean)===1,{message:'Entry must have exactly one of "serverName", "serverCommand", or "serverUrl"'})),Nh=e(()=>X.object({marketplace:X.string(),plugin:X.string()})),M8=e(()=>X.preprocess((i)=>{if(typeof i!=="string"||!ls().safeParse(i).success)return i;let c=i.indexOf("@");return{marketplace:i.slice(c+1),plugin:i.slice(0,c)}},Nh())),U8=/[\x00-\x1f\x7f-\x9f\u2028\u2029]|\p{DI}/u;function H8(i){let c=i.replaceAll("/","\\");if(ee(c))return!1;return/^\\{2}[^\\]/.test(c)}function F8(i){return V(i)||/^\/network\/servers(\/|$)/i.test(i)||te(i)}function B8(i){return/^\/(proc|dev\/(fd|stdin|stdout|stderr))(\/|$)/i.test(i)}function z8(i,c,T={}){if(c==="win32"){let D=i.replaceAll("/","\\");if(ee(D))return!1;let w=H8(D);if(T.rejectUnc&&w)return!1;if(T.rejectDriveRelative){if(!/^[A-Za-z]:\\/.test(D)&&!w&&/^(\\|[A-Za-z]:)/.test(D))return!1}if(Ph.normalize(D)!==D)return!1;let v=D.split("\\");if(v.some((B)=>B==="."||B===".."))return!1;if(v.some((B,K)=>/[. ]$/.test(B)||B.includes(":")&&!(K===0&&/^[A-Za-z]:$/.test(B))))return!1;let U=D.startsWith("\\\\")?D.slice(2):D;if(/\\{2}/.test(U))return!1;return!D.endsWith("\\")||/^([A-Za-z]:)?\\$/.test(D)}if(T.rejectNetworkRoot&&F8(i))return!1;if(T.rejectMagicLinkRoot&&B8(i))return!1;if(wh.normalize(i)!==i)return!1;if(i.split("/").some((D)=>D==="."||D===".."))return!1;if(/\/{2}/.test(i))return!1;return!i.endsWith("/")||i==="/"}var G8=/\.(exe|ps1)$/i;function W8(i){return/\.ps1$/i.test(i)}function K8(i){return W8(i)&&/[[\]`*?]/.test(i)}var j8='a .ps1 path must not contain "[", "]", "`", "*", or "?" on Windows (PowerShell resolves them as wildcard syntax)',$8=()=>X.string().describe("Absolute path to the helper executable"),Jo=(i)=>X.preprocess((c)=>c===null?void 0:c,i.optional()).optional(),V8=ve,yh=(i)=>X.number().int().min(i).transform((c)=>Math.min(c,V8)),Oh=["path","script","defaultSettings"];function kh(i){if(!i||typeof i!=="object"||Array.isArray(i))return!1;let c=i;return Oh.some((T)=>c[T]===null)&&Oh.every((T)=>c[T]===null||c[T]===void 0)}var Ah=64,cl=e(()=>X.object({path:$8(),timeoutMs:Jo(yh(1000)),refreshIntervalMs:Jo(X.union([X.literal(0),yh(60000)]))})),vh=()=>X.enum(["replace","merge"]).describe("How the helper's managedSettings compose with the settings of the source that delivered this entry: 'replace' (default) — the output is the policy; 'merge' — the output is deep-merged over that source's own settings the way merged managed sources compose (helper scalars win, arrays union, objects merge — except fallbackModel, forceLoginOrgUUID, gatewayInternalNetworks, sandbox.filesystem.allowRead, sandbox.credentials.awsPairs, sandbox.ripgrep and the restriction allowlists such as allowedMcpServers, allowedProviders, availableModels and allowedHttpHookUrls, which are the helper's whole value when it emits one; tighten a permission with a deny), so a failed helper costs only the delta");function Mh(i){return i==="continue"||i==="refuse"}var Y8=()=>X.preprocess((i)=>i===void 0||Mh(i)?i:"refuse",X.enum(["continue","refuse"]).describe(`What happens when this entry's helper fails at startup (bad path, missing file or interpreter, non-zero exit, timeout, oversize or invalid output) and no static settings payload (this entry's own, the linux entry's on WSL, or the map's "default") applies in its place: 'refuse' — Claude Code does not start, naming the failure; 'continue' — Claude Code starts without the helper's output, on the delivering source's own settings, with a /status notice. Default: 'refuse' when the entry comes from MDM or the managed settings file, 'continue' when it comes from remote managed settings. Any other value is treated as 'refuse', with a /status notice. The install and update commands start no session and are never refused over a remote entry: they report the refusal in /status. An entry whose other fields fail validation runs no helper; from MDM or the managed settings file, any value but 'continue' on it then refuses to start Claude Code until the entry is fixed, unless a static settings payload (the entry's own, kept when it validates, the linux entry's for a wsl one, or the map's "default") serves in its place. From remote, a non-interactive session runs the helper off settings verified this session without the interactive approval, so 'refuse' there too means the helper ran and failed; a launch whose remote settings could not be verified this session (offline, fetch failed) starts without the helper regardless; and a failure first reached after the session has started (settings verified or approved mid-session, which on a machine that only ever runs non-interactively is every launch) ends a session no person watches (non-interactive, a background session no client is attached to, or a teammate session) as the refused start would have, and leaves a watched interactive one (a terminal, with or without remote control, or an attached background session) running under a /status notice with its next start refused. Background refresh failures always keep the last good output whatever this says`)),X8=5,J8=()=>X.number().int().min(0).transform((i)=>Math.min(i,X8)).describe("How many more times to run this entry's helper when a run fails to execute — it could not be launched, exited non-zero, or was stopped at timeoutMs — before that counts as a failure (a non-negative integer; default 0, a single attempt; above 5 is treated as 5). Attempts are separated by a short randomized backoff (from 250 ms, doubling per attempt, at most 4 s each) and each attempt gets the full timeoutMs, so a start that waits on the helper can wait up to (retries + 1) × timeoutMs plus the backoff. Output the helper did produce and that was refused — oversized, not a JSON object, an invalid envelope, or settings that fail validation — is not retried, and neither is an invalid path. Applies alike at startup and on each background refresh; only once the attempts are used up do the entry's failure rules (a static settings payload in its place, onFailure, the refresh notice) apply, naming the last attempt's failure"),Z8=(i)=>(i==="windows"?X.literal("pwsh",{message:"interpreter must be 'pwsh' on windows ('sh' is not supported there)"}):X.literal("sh",{message:"interpreter must be 'sh' on macos/linux/wsl"})).describe("Fixed interpreter for `script`: 'sh' (/bin/sh) on macos/linux/wsl entries; 'pwsh' (PowerShell at its fixed install locations, never PATH) on the windows entry"),q8="exactly one of path/script must be configured",Q8='"script" and "interpreter" must be configured together',e7="script must be ASCII-only on Windows (PowerShell decodes stdin with the console OEM code page); spell non-ASCII characters as escapes, e.g. [char]0x00E9",t7=(i)=>X.string({message:"script must be a string"}).min(1,{message:"script must not be empty"}).max(65536,{message:"script must be at most 65536 characters"}).refine((c)=>!c.includes("\x00"),{message:"script must not contain NUL bytes"}).refine((c)=>we(c),{message:"script must be valid UTF-8 (no lone surrogates)"}).refine((c)=>i!=="windows"||!/[\u0080-\uffff]/.test(c),{message:e7}).describe("Inline helper script, delivered to the fixed interpreter over stdin (never written to disk)");var mn=["macos","linux","windows","wsl"];function Wc(i){return i==="wsl"?["wsl","linux"]:[i]}function n7(i){return i==="windows"?"win32":"posix"}function o7(i){return{rejectDriveRelative:i==="windows",rejectUnc:i==="windows",rejectNetworkRoot:i!=="windows",rejectMagicLinkRoot:i!=="windows",requireWin32ExecutableSuffix:i==="windows"}}function r7(i){let c=n7(i),T=o7(i);return X.string().max(1024,{message:"path must be at most 1024 characters"}).refine((D)=>!U8.test(D),{message:"path must not contain control, line/paragraph-separator, or invisible (default-ignorable) characters"}).refine((D)=>(c==="win32"?Ph:wh).isAbsolute(D),{message:"path must be absolute"}).refine((D)=>!(c==="win32"&&T.requireWin32ExecutableSuffix)||G8.test(D),{message:"path must end in .exe or .ps1 on Windows"}).refine((D)=>c!=="win32"||!K8(D),{message:j8}).refine((D)=>z8(D,c,T),{message:c==="win32"?'path must be in normalized form: no "." or ".." segments, no doubled or trailing separators, no component ending in "." or a space, no ":" outside the drive letter, no device-namespace (\\\\?\\) prefix, no drive-relative (\\dir or C:name) or UNC (\\\\server\\share) form':'path must be in normalized form: no "." or ".." segments, no doubled or trailing separators, and not under a network automount root (/net/<host>, /Network/Servers, or macOS /.vol /.file /.nofollow /.resolve) or a kernel magic-link root (/proc, /dev/fd)'}).describe("Absolute path to the helper executable")}var Kc=[...mn,"default"],vc=["path","script","interpreter","outputBehavior","onFailure","retries","timeoutMs","refreshIntervalMs","defaultSettings"],dl=["managedSettings","appendSystemPrompt"],Sr=e(()=>X.record(X.string(),X.unknown()).superRefine((i,c)=>{for(let T of["policyHelper","policyHelpers"])if(i[T]!==void 0&&i[T]!==null)c.addIssue({code:"custom",message:`must not contain "${T}" — the default payload is applied as managed settings and cannot configure further policy helpers`});for(let T of vc)if(i[T]!==void 0&&i[T]!==null)c.addIssue({code:"custom",message:`must not contain "${T}" — a static payload is a managed-settings object, not a policyHelpers entry; entry fields (${vc.join("/")}) belong on the per-OS entries (policyHelpers.${mn.join("/")})`});for(let T of dl)if(i[T]!==void 0&&i[T]!==null)c.addIssue({code:"custom",message:`must not contain "${T}" — a static payload is the managedSettings SUBTREE, not the helper's stdout envelope; paste the object your helper emits UNDER "managedSettings", not the envelope around it`});for(let T of Kc)if(i[T]!==void 0&&i[T]!==null)c.addIssue({code:"custom",message:`must not contain "${T}" — a static payload is the VALUE of a policyHelpers key (a managed-settings object), never another policyHelpers map; don't paste the map or its "${T}" line inside the slot`})})),s7='Entry must carry "path" (a helper executable) or "script" + "interpreter" (an inline helper), and/or "defaultSettings" (a static settings payload)';function i7(i){let{path:c,script:T,interpreter:D,defaultSettings:w}=i;if(c!==void 0&&T!==void 0)return q8;if(T===void 0!==(D===void 0))return Q8;if(c===void 0&&T===void 0&&w===void 0)return s7;return null}function Uh(i,c){return cl().omit({path:!0}).extend({path:Jo(r7(i)),script:Jo(t7(i)),interpreter:Jo(Z8(i)),outputBehavior:Jo(vh()),onFailure:Jo(Y8()),retries:Jo(J8()),defaultSettings:X.preprocess((T)=>T===null?void 0:T,c.optional()).optional()}).check((T)=>{if(T.issues.length>0)return;let D=i7(T.value);if(D!==null)T.issues.push({code:"custom",message:D,input:T.value})})}var iCe=e(()=>Uh("linux",Sr()));function Mc(i,c=Sr()){return i==="default"?Sr():Uh(i,c)}var a7=e(()=>X.object(Object.fromEntries(Kc.map((i)=>[i,X.preprocess((c)=>{if(c===null)return;if(i!=="default"&&kh(c))return;return c},Mc(i).optional()).optional()])))),li=["skills","agents","hooks","mcp"];function Hh(i){return X.preprocess((c)=>{if(!Array.isArray(c))return c;let T=c.filter((D)=>li.includes(D));if(T.length<c.length)i?.(c.length-T.length);return T},X.union([X.boolean(),X.array(X.enum(li))]))}function Fh(){return X.union([X.array(X.string()),X.boolean(),X.undefined()])}var Ch=Object.freeze({type:"invalid-entry-stripped"}),l7=e(()=>X.union([X.object({type:X.literal("regex").describe('Config variant. This client understands "regex": matches turn output and builds a URL from named capture groups. Entries with other variants are preserved but skipped at runtime.'),pattern:X.string().describe("Regex matched against turn output (tool results and assistant text)"),url:X.string().describe("Link target. {name} placeholders are filled from named regex capture groups, e.g. (?<id>...) -> {id}. Values are URL-encoded; the origin must be literal in the template. The scheme must be https, http, or a recognized editor or workspace deep-link scheme: vscode, vscode-insiders, cursor, windsurf, zed, jetbrains, idea, slack, linear, notion, figma."),label:X.string().optional().describe("Badge text. {name} placeholders filled from named capture groups; defaults to the full match.")}).passthrough(),X.object({type:X.string().describe("Config variant discriminator for entries this client does not understand; the entry is preserved as-is and skipped at runtime.")}).passthrough()])),bh=()=>X.number().int().min(D_).optional().catch(void 0);function Bh(i,{strictPolicyHelperKeys:c=!1}={}){function T(w){return X.record(X.string(),Fc()).check((v)=>{for(let[U,B]of Object.entries(v.value))if(B.source.source==="settings"&&B.source.name!==U)v.issues.push({code:"custom",input:B.source.name,path:[U,"source","name"],message:`Settings-sourced marketplace name must match its ${w} key (got key "${U}" but source.name "${B.source.name}")`})})}let D=(w,v)=>c?X.preprocess((U)=>{if(U===null)return;return v?v(U):U},w):w.catch(void 0);return{$schema:()=>X.string().optional().describe("JSON Schema reference for Claude Code settings"),apiKeyHelper:()=>X.string().optional().describe("Path to a script that outputs authentication values"),proxyAuthHelper:()=>X.string().optional().describe("Shell command that outputs a Proxy-Authorization header value (EAP)"),awsCredentialExport:()=>X.string().optional().describe("Path to a script that exports AWS credentials"),awsAuthRefresh:()=>X.string().optional().describe("Path to a script that refreshes AWS authentication"),gcpAuthRefresh:()=>X.string().optional().describe("Command to refresh GCP authentication (e.g., gcloud auth application-default login)"),processWrapper:()=>X.string().optional().describe("Corporate launcher argv prefix for the background-agent supervisor, the sessions and workers it hosts, and the other covered background processes listed in the Claude Code corporate-launcher documentation. Equivalent to the CLAUDE_CODE_PROCESS_WRAPPER environment variable, which takes precedence when set. Honored from managed settings, a --settings/SDK-supplied settings file, and user settings, in that precedence order; project and local settings are ignored."),policyHelper:()=>D(cl().optional(),(w)=>w&&typeof w==="object"&&!Array.isArray(w)&&w.path===null?void 0:w).describe("Executable that computes managed settings at startup. Honored only from admin-controlled policy sources."),policyHelpers:()=>D(a7().optional()).describe(`@internal Per-OS variant of policyHelper, keyed by platform: macos, linux, windows, wsl, plus an optional "default" entry that is a STATIC settings payload (a JSON object of managed settings, not a helper). Each per-OS entry carries a helper — a "path", or an inline "script" + "interpreter" delivered to a fixed interpreter over stdin, either with timeoutMs/refreshIntervalMs — its own static "defaultSettings" payload, or both; an entry may be payload-only. Selection for a platform walks its chain (the platform's own entry; on wsl the linux entry next): the first helper on the chain wins over policyHelper; if no helper is configured — or the selected helper fails at startup or refresh — the first payload applies (the chain's "defaultSettings" in platform-specific-first order, then the top-level "default", applied with no process spawned; unrecognized platforms reach only "default"); with no payload either, policyHelper. Honored from admin-controlled policy sources, and from remote managed settings — a payload of plain policy as delivered, like any other remote key; a helper, or a payload carrying anything the managed-settings approval dialog lists, only once the settings are verified this session and approved there (policyHelper itself is never honored from remote).`),...Bt.CLAUDE_CODE_ENABLE_XAA&&{xaaIdp:()=>X.object({issuer:X.string().url().describe("IdP issuer URL for OIDC discovery"),clientId:X.string().describe("Claude Code's client_id registered at the IdP"),callbackPort:X.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:()=>X.object({type:X.literal("command"),command:X.string()}).optional().describe("Custom file suggestion configuration for @ mentions"),respectGitignore:()=>X.boolean().optional().describe("Whether file picker should respect .gitignore files (default: true). Note: .ignore files are always respected."),breakReminder:()=>X.object({enabled:X.boolean().optional().describe("Show a friendly nudge after sustained continuous use (default false). Must be true for the reminder to fire."),intervalMinutes:X.number().int().positive().optional().describe("Minutes of continuous use before the reminder fires (default 30). Re-fires every interval until you take a break."),breakThresholdMinutes:X.number().int().positive().optional().describe("Minutes of inactivity that count as a break and reset the timer (default 10)"),message:X.string().optional().describe("Custom reminder text. Leave unset for a rotating set of friendly nudges.")}).optional().describe("@internal Opt-in break reminder. When enabled, shows a dismissible nudge after sustained continuous use. Never blocks — just a friendly heads-up."),quietHours:()=>X.object({enabled:X.boolean().optional().describe("Show a one-time nudge when you start or keep using the CLI inside your quiet-hours window (default false)."),start:X.string().regex(/^([01]?\d|2[0-3]):[0-5]\d$/,'Expected 24-hour local time "HH:MM" (e.g. "22:00")').optional().describe('Start of the quiet-hours window, 24-hour local time "HH:MM".'),end:X.string().regex(/^([01]?\d|2[0-3]):[0-5]\d$/,'Expected 24-hour local time "HH:MM" (e.g. "07:00")').optional().describe('End of the quiet-hours window, 24-hour local time "HH:MM". May be earlier than start for an overnight range.')}).optional().describe("@internal Opt-in quiet hours. When enabled, shows a single soft nudge per session while inside the configured local-time window. Never blocks."),cleanupPeriodDays:()=>X.number().int().positive().optional().describe("Number of days to retain chat transcripts before automatic cleanup (default: 30). Minimum 1. Use a large value for long retention; use --no-session-persistence to disable transcript writes entirely. Cleanup deletes data only on this computer, not anything stored by Anthropic."),desktopSessionCleanupPeriodDays:()=>X.number().int().nonnegative().optional().describe("Retention ceiling in days for session transcripts created or last written by a desktop-host surface (Claude Desktop, Cowork), which are otherwise exempt from the cleanupPeriodDays sweep. 0 (the default) means no ceiling: such transcripts are kept until deleted another way. Unlike cleanupPeriodDays, 0 is allowed because this setting never disables writes — it only bounds an exemption from deletion. The ceiling is a hard cap: it also bounds an active archive grace, so the grace window of a release marker never keeps files past the ceiling. Ignored when cleanupPeriodDays is managed by org policy. A ceiling at or below cleanupPeriodDays effectively disables the exemption: those transcripts age out on the regular cleanupPeriodDays schedule, so the effective retention is whichever of the two periods is longer. Cleanup deletes data only on this computer, not anything stored by Anthropic."),syncClaudeAiSkills:()=>X.boolean().optional().describe("Set to false to turn off syncing of the skills you have enabled on claude.ai. In your user settings (or managed settings): nothing more is downloaded, previously synced skills (~/.claude/skills/synced) can no longer be run, are hidden from every session started afterwards, and are moved to ~/.claude/skills/.trash at the next launch (deleted after cleanupPeriodDays; re-downloaded, not restored, if you re-enable). In .claude/settings.local.json or --settings: downloads stop and synced skills are blocked and hidden for sessions in that workspace or invocation only (nothing is moved). Not read from project settings (.claude/settings.json). Only false is honored — the feature is enabled server-side for your account, so setting true does not turn it on early. While it is on, synced skills are available in every session, re-synced about every 10 minutes while a session is in use and a quarter as often otherwise, and removed when you disable them on claude.ai. Only applies when signed in with your Claude account."),syncClaudeAiPlugins:()=>X.boolean().optional().describe("Set to false to turn off syncing of the plugins you have enabled on claude.ai. In your user settings (or managed settings): nothing more is downloaded, previously synced plugins (~/.claude/plugins/synced) are hidden from every session started afterwards and moved to ~/.claude/plugins/.trash at the next launch (deleted after cleanupPeriodDays; re-downloaded, not restored, if you re-enable). In .claude/settings.local.json or --settings: downloads stop and synced plugins are hidden for sessions in that workspace or invocation only (nothing is moved). Not read from project settings (.claude/settings.json). Only false is honored — the feature is enabled server-side for your account, so setting true does not turn it on early. While it is on, synced plugins load in every session like plugins you installed yourself (a plugin you installed with the same name takes precedence), are re-synced at each launch, and are removed when you disable them on claude.ai. Only applies when signed in with your Claude account."),skillListingMaxDescChars:()=>X.number().int().positive().optional().describe("Per-skill description character cap in the skill listing sent to Claude (default: 1536). Descriptions longer than this are truncated. Raise to opt in to higher per-turn context cost."),skillListingBudgetFraction:()=>X.number().gt(0).lte(1).optional().describe("Fraction of the context window (in characters) reserved for the skill listing sent to Claude (default: 0.01 = 1%). When the listing exceeds this, descriptions are shortened to fit. Raise to opt in to higher per-turn context cost."),wslInheritsWindowsSettings:()=>X.boolean().optional().describe("When set to true in either admin-only Windows source — the HKLM SOFTWARE/Policies/ClaudeCode registry key or C:/Program Files/ClaudeCode/managed-settings.json — WSL reads managed settings from the full Windows policy chain (HKLM, C:/Program Files/ClaudeCode via DrvFs, HKCU) in addition to /etc/claude-code. Windows sources take priority. The flag is also required in HKCU itself for HKCU policy to apply on WSL (double opt-in: admin enables the chain, user confirms HKCU). On native Windows the flag has no effect."),env:()=>zn(()=>N8()).describe("Environment variables to set for Claude Code sessions"),attribution:()=>{let w=X.object({commit:X.string().optional().describe("Attribution text for git commits, including any trailers. Empty string hides attribution."),pr:X.string().optional().describe("Attribution text for pull request descriptions. Empty string hides attribution."),sessionUrl:X.boolean().optional().describe("Whether to append the claude.ai session link to commits and PRs created from web or Remote Control sessions (default: true). Set to false to omit the Claude-Session trailer and PR-body link."),...!1}).passthrough();return X.union([X.boolean(),w],{error:(v)=>{let U=(v.errors??[]).flat().filter((K)=>K.path.length>0);if(U.length>0)return U.map((K)=>`${K.path.join(".")}: ${K.message.replace(/^Invalid input: /,"")}`).join("; ");return`Expected false, true, or an object such as { "commit": "", "pr": "" }, but received ${Array.isArray(v.input)?"array":v.input===null?"null":typeof v.input}`}}).transform((v)=>{if(typeof v!=="boolean")return v;return v?{}:{commit:"",pr:"",sessionUrl:!1}}).pipe(w).optional().describe('Customize attribution text for commits and PRs. Each field defaults to the standard Claude Code attribution if not set. Set to false to hide all attribution, the same as { "commit": "", "pr": "", "sessionUrl": false }. Setting it to true is the same as leaving it out. Older Claude Code versions reject true or false here, so use the object form in settings files shared across versions.')},attributionProject:()=>X.string().optional().describe(`The claude.ai Project this session names for your organization's usage reports: the Project's ID, starting with "claude_proj_" or "chan_", or the UUID of a "claude_proj_" Project. An empty string names none and stops lower-precedence files from naming one; the organization default still applies. A Project is sent only when Claude Code uses your claude.ai login, connects directly to the Anthropic API, is not in a cloud session, and CLAUDE_CODE_ATTRIBUTION_HEADER is not 0. CLAUDE_CODE_ATTRIBUTION_PROJECT takes precedence over it. Set in managed settings, it overrides people's own settings files. A project's .claude/settings.json and settings.local.json count only once the folder is trusted; for runs in a folder nobody has trusted, such as CI, use CLAUDE_CODE_ATTRIBUTION_PROJECT. Behind a Claude apps gateway that reports usage by group, name one of your groups instead, such as "payments"; CLAUDE_CODE_ATTRIBUTION_HEADER does not affect that.`),attributionProjectPolicy:()=>X.object({default:X.string().optional().describe('The Project used when neither CLAUDE_CODE_ATTRIBUTION_PROJECT nor attributionProject names one: its ID, starting with "claude_proj_" or "chan_", or the UUID of a "claude_proj_" Project. Behind a Claude apps gateway that reports usage by group, a group name instead.')}).optional().describe("Your organization's default for attributionProject. Only honored from managed settings (server-managed, MDM / OS policy, or managed-settings.json); ignored in user, project, local and --settings sources."),includeCoAuthoredBy:()=>X.boolean().optional().describe("Deprecated: Use attribution instead. Whether to include Claude's co-authored by attribution in commits and PRs (defaults to true)"),...!1,...!1,includeGitInstructions:()=>X.boolean().optional().describe("Include built-in commit and PR workflow instructions in Claude's system prompt (default: true)"),permissions:()=>zn(()=>xh(i)).describe("Tool usage permissions configuration"),model:()=>X.string().optional().describe("Override the default model used by Claude Code"),fallbackModel:()=>X.array(X.string()).optional().describe('Fallback model(s) tried in order when the primary model is overloaded or unavailable. Each element accepts a model name or alias; "default" expands to the default model. CLI --fallback-model takes precedence.'),availableModels:()=>X.array(X.string()).optional().describe('Allowlist of models that users can select. Accepts family aliases ("opus" allows any opus version), version prefixes ("opus-4-5" allows that version and any model ID that extends it, so "claude-opus-5" also allows "claude-opus-5-5"), and full model IDs. An entry with a path before the model ID (a gateway route such as "route/claude-opus-5") does not allow the plain ID ("claude-opus-5"): list the plain ID too if some sessions send requests directly to the Anthropic API. If undefined, all models are available. If empty array, only the default model is available. Typically set in managed settings by enterprise administrators.'),enforceAvailableModels:()=>X.boolean().optional().describe("When true and availableModels is a non-empty array, the Default model selection is also constrained: if the default model for the user tier is not in availableModels, Default resolves to the first allowed availableModels entry instead. Has no effect when availableModels is unset or an empty array. Typically set in managed settings by enterprise administrators."),availableModelsMatch:()=>X.enum(["prefix","exact"]).optional().describe('How availableModels entries match model IDs. "prefix" (the default) lets an entry also allow any model ID that extends it, so "claude-opus-5" allows "claude-opus-5-5". "exact" keeps that matching but stops a model ID entry from allowing other versions: "claude-opus-5" allows Opus 5 and its dated and -fast IDs, but not Opus 5.5 or a later release until it is listed, and a -latest ID needs a -latest entry. Family aliases ("opus") still allow the whole family; aliases whose model depends on the release or settings (best, opusplan, default) are ignored. With "exact" and a list that names at least one model, the Default option also uses only a listed model; if none can be used, Claude Code will not start. Haiku background models, and hooks and other helper requests that pick their own model, are not restricted (deniedModels covers them; allowManagedHooksOnly limits hooks). Read from managed settings only.'),deniedModels:()=>X.array(X.string()).optional().describe('Models users cannot select, even when availableModels allows them. A family alias ("opus") blocks that family. A model ID blocks that version in every spelling: dates, -fast and provider prefixes are ignored, so "claude-opus-5-5" blocks every Opus 5.5 ID but not Opus 5. An ID with no minor version ("claude-opus-5") also blocks later minor versions, as it allows them in availableModels. Aliases whose model depends on the release or settings (best, opusplan, default) are ignored. The Default option steps down past a blocked model; if the Default has no allowed model to step down to, Claude Code will not start. Read from managed settings only.'),modelOverrides:()=>X.record(X.string(),X.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.'),modelPicker:()=>X.object({options:X.array(Gc()).describe("Rows to show in the /model picker, in order."),replaceBuiltInOptions:X.boolean().optional().describe("When true, the picker shows only the Default row and these options — the built-in "+"lineup, gateway-discovered models and ANTHROPIC_CUSTOM_MODEL_OPTION are hidden. When false or unset, these options are added after the built-in lineup.")}).optional().describe("Curate the /model picker: an ordered list of models with your own labels, independent of the built-in lineup and of Claude Code releases. availableModels still applies to these rows. Honored from managed, --settings/SDK, and user settings only (not from a project checkout); the highest-precedence of those that defines modelPicker wins outright (no merging across sources). Typically set in managed settings by enterprise administrators."),modelPricing:()=>X.object({multiplier:zc(),overrides:X.record(X.string(),Bc()).optional()}).optional().describe("Price usage at your organization's contracted rates instead of list price. "+"Affects every spend figure Claude Code reports — /cost, the status line, the SDK total_cost_usd, "+"--max-budget-usd, and the OpenTelemetry cost metric and events — which remain USD estimates, not an invoice "+'(the per-Mtok price labels in /model stay at list). "overrides" maps a model ID to its USD-per-million-token rates (input, output, cacheRead, '+"cacheWrite — all four required, each 0 to 10000; cacheWrite prices both 5-minute and 1-hour cache writes). "+"A matching row is charged exactly as written; fast-mode and US-data-residency surcharges are not added on top. "+'A key Claude Code itself uses for a built-in model — its ID such as "claude-sonnet-4-6", or its '+"first-party, Bedrock (any or no region prefix), Vertex or Foundry ID — covers every dated and provider form "+"of that model; any other key — a gateway model alias, or a spelling Claude Code does not itself use — "+'matches that model ID only (case-insensitive), and such an exact match wins over a built-in row. On Bedrock an application inference profile is matched by its backing model. An invalid row or multiplier is reported and skipped; the rest still apply. "multiplier" in (0, 10] scales every computed cost, overridden or not (0.85 = 85% of the price, 1.2 = 120%). Only honored from managed settings (server-managed, MDM / OS policy, or managed-settings.json), '+"or — when none of those sets it — when supplied by a host application that manages the model "+"provider; ignored in user, project, local and --settings sources."),...!1,enableAllProjectMcpServers:()=>X.boolean().optional().describe("Whether to automatically approve all MCP servers in the project"),enabledMcpjsonServers:()=>X.array(X.string()).optional().describe("List of approved MCP servers from .mcp.json"),disabledMcpjsonServers:()=>X.array(X.string()).optional().describe("List of rejected MCP servers from .mcp.json"),disableClaudeAiConnectors:()=>X.boolean().optional().describe("When true in any settings source, claude.ai MCP cloud connectors are not auto-fetched or connected, and a claudeai-proxy server passed explicitly (e.g. via --mcp-config or the SDK mcpServers option) does not connect either. Where a managed or served source sets it, the connectors that the desktop app's Code tab hands to a session do not connect either, from the app version that shows them as turned off. Any-source-true wins: a project can opt out, but a project-level false cannot override a user-level true."),skillOverrides:()=>X.record(X.string(),X.enum(["on","name-only","user-invocable-only","off"])).optional().describe('Per-skill listing overrides keyed by skill name. "name-only" lists the skill without its description; "user-invocable-only" hides it from the model but keeps /name; "off" hides it from both. Absent = on.'),disableBundledSkills:()=>X.boolean().optional().describe("Disable the skills and workflows that ship with Claude Code: bundled skills and workflows are removed entirely; built-in slash commands stay typable but are hidden from the model. Plugins, .claude/skills/, and .claude/commands/ are unaffected. Equivalent to CLAUDE_CODE_DISABLE_BUNDLED_SKILLS=1."),...{},managedMcpServers:()=>zn(()=>X.record(X.string().refine(qd,{error:Xa}),Qd(),{error:ec})).describe(`MCP servers the organization provides to every user, keyed by server name, each with the .mcp.json entry shape; only "http" and "sse" servers are accepted (nothing that names a program to run, no \${VAR} references). Honored from managed settings only; users cannot remove them, deniedMcpServers still applies, and they need no allowedMcpServers entry. Not read in Claude Desktop's Code tab on a third-party deployment or in Cowork sessions, where Claude Desktop supplies and locks the session's MCP servers itself.`),allowedMcpServers:()=>zn(()=>X.array(fl())).describe("Enterprise allowlist of the MCP servers users may use. Governs servers users add (user, project and local config, --mcp-config, agent frontmatter, plugins, claude.ai connectors); servers the organization itself delivers (managedMcpServers, and managed-mcp.json entries with no ${VAR} in their command, args, url or header values) are allowed without being listed; a managed-mcp.json entry with ${VAR} in any of those must match this list. An entry found only in a project's .claude/settings.json or .claude/settings.local.json can admit a server the organization provides (managed-mcp.json, managedMcpServers, or a plugin that managed settings list in enabledPlugins) but can't keep one out. If undefined, all servers are allowed. If empty array, users can use no servers of their own. Denylist takes precedence - if a server is on both lists, it is denied."),deniedMcpServers:()=>zn(()=>X.array(ml())).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. An entry found only in a project's .claude/settings.json or .claude/settings.local.json does not apply to a server the organization provides (managed-mcp.json, managedMcpServers, or a plugin that managed settings list in enabledPlugins). Denylist takes precedence over allowlist - if a server is on both lists, it is denied."),hooks:()=>zn(()=>_r()).describe("Custom commands to run before/after tool executions"),worktree:()=>X.object({symlinkDirectories:X.array(X.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:X.array(X.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."),baseRef:X.enum(["fresh","head"]).optional().describe("Which ref new worktrees branch from. 'fresh' (default) branches from origin/<default-branch> for a clean tree. 'head' branches from your current local HEAD so unpushed commits and feature-branch state are present. Applies to --worktree, EnterWorktree, and agent isolation."),bgIsolation:X.enum(["worktree","none"]).optional().catch(void 0).describe("Isolation mode for background sessions in this repo. 'worktree' (default) blocks Edit/Write in the main checkout until EnterWorktree is called. 'none' lets background jobs edit the working copy directly."),location:X.string().optional().catch(void 0).describe("Directory under which Claude Code Desktop creates the worktrees of SSH sessions that run on this machine (an absolute path or one starting with ~/), instead of <project>/.claude/worktrees. Read by the desktop app from the SSH host user settings; a location chosen in the desktop app's SSH connection settings takes precedence. The CLI (--worktree, EnterWorktree, agent isolation) does not read it yet.")}).optional().describe("Git worktree configuration: the CLI --worktree flag, EnterWorktree and agent isolation, plus the location Claude Code Desktop uses for SSH-session worktrees on this machine."),disableAllHooks:()=>X.boolean().optional().describe("Disable all hooks and statusLine execution: the hooks defined in settings files and by installed plugins. Features built into Claude Code are not hooks in this sense and keep working; each has its own switch."),disableReplyCheck:()=>X.boolean().optional().describe("Disable the reply check in Claude Tag sessions on a self-hosted runner. The check re-prompts Claude, at most four times a turn, when a turn ends without a call to one of Claude Tag's reply tools. It is not a hook, so disableAllHooks does not affect it. Disabling it also stops two messages to Claude that Anthropic's service can request for such a session: a nudge after a long stretch of work with no visible update, and a reminder added to prompts. Claude Code's built-in reminder to give progress updates, on models that have it, is then no longer held back. Set it in managed settings; false there keeps the check on. Everywhere else it is ignored and the check stays on. Has no effect on sessions that Anthropic hosts."),disableAgentView:()=>X.boolean().optional().describe("Disable agent view (`claude agents`, `--bg`, /background, the on-demand daemon). Typically set in managed settings. Equivalent to CLAUDE_CODE_DISABLE_AGENT_VIEW=1."),disableRemoteControl:()=>X.boolean().optional().describe("Disable Remote Control (claude.ai/code, `claude remote-control`, `--remote-control`/`--rc`, auto-start, and the in-session toggle). Typically set in managed settings."),disableWorkflows:()=>X.boolean().optional().describe("Disable the Workflows feature. Code Review on pull requests and /ultrareview run in Anthropic's cloud and are not stopped by this setting, except an /ultrareview that has to restart partway through. A machine that runs a review itself refuses it when that machine's own administrator set this, or CLAUDE_CODE_DISABLE_WORKFLOWS in an `env` block, in its managed settings (MDM, the managed-settings file or an administrator's policy helper). Set in the environment before Claude Code starts, CLAUDE_CODE_DISABLE_WORKFLOWS disables Workflows. Beyond the cases above it stops a review only when the review's own session starts with it set."),disableArtifact:()=>X.boolean().optional().describe("Deprecated: use enableArtifact: false. Still honored — true turns Artifacts off; false is ignored."),enableArtifact:()=>X.boolean().optional().describe("Turn Artifacts on or off. Off in any of managed, --settings, or user settings wins; project and local settings can only turn it off. Unset defaults to on once the feature is available."),enableWorkflows:()=>X.boolean().optional().describe("Enable or disable the Workflows feature for this user. Unset = default by plan once the feature is available."),workflowSizeGuideline:()=>X.enum(["unrestricted","small","medium","large"]).optional().describe('Advisory size guideline for the dynamic workflows Claude writes: "small" aims for fewer than 5 agents, "medium" fewer than 10, "large" fewer than 50, and "unrestricted" sends no guideline. Unset defaults to "medium", or "small" on Pro plans. A value here — including from managed settings — takes precedence over the "Dynamic workflow size" choice in /config, and that /config row is hidden while a settings file provides the key. This is a guideline, not an enforced limit.'),workflowKeywordTriggerEnabled:()=>X.boolean().optional().describe('Enable the "ultracode" keyword trigger: including the keyword in a prompt opts that turn into the Workflow tool. Set to false to disable the trigger. Default: true.'),disableSkillShellExecution:()=>X.boolean().optional().describe("Disable inline shell execution in skills and custom slash commands from user, project, or plugin sources. Commands are replaced with a placeholder instead of being run."),disableWindowsBashCommandSplit:()=>X.boolean().optional().describe("Windows only. Set to true to keep every Bash command in a single argument to bash, so that endpoint security tools that match text in process command lines see it whole. Otherwise Claude Code may split a long command over several arguments. With true, a command of about 7,000 characters or more, or fewer if it is full of quotes, may reach bash cut short, and then usually fails with a syntax error. Only honored from managed settings; ignored in user, project, local and --settings sources."),defaultShell:()=>X.enum(["bash","powershell"]).optional().describe("Default shell for input-box ! commands. Defaults to 'bash' on all platforms (no Windows auto-flip)."),bashEditDiffEnabled:()=>X.boolean().optional().describe("Whether the Bash tool shows a diff of the files a Bash command changed (PostToolUse Bash hooks get the changed-file list in tool_response). Set to false to turn that off. Default: off, except in auto and bypassPermissions modes when the Bash tool handles file edits or the model's configuration turns it on. Only user, flag or policy settings can turn it on in other modes."),bashOutputMaxChars:()=>X.number().int().positive().optional().catch(void 0).describe("How many characters of a successful Bash or PowerShell command's output Claude receives inline (default 30000; values clamp to 4000-128000). Output past this is saved to a file and Claude receives a short preview plus the path. When set, this also replaces BASH_MAX_OUTPUT_LENGTH, which on its own only sizes the read-back window."),taskOutputMaxChars:()=>X.number().int().positive().optional().catch(void 0).describe("Deprecated: no longer has any effect (the TaskOutput tool was removed). Read a background task's output file with the Read tool instead."),respondToBashCommands:()=>X.boolean().optional().describe("Whether Claude responds after an input-box ! bash command runs. Set to false to add the command output to context without a response. Default: true."),allowManagedHooksOnly:()=>X.boolean().optional().describe("When true (and set in managed settings), only hooks from managed settings and from plugins that managed settings enable run. User, project, and local hooks and the hooks of plugins the user installed are ignored. Features built into Claude Code are not hooks in this sense and keep working."),allowedHttpHookUrls:()=>X.array(X.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). Where managed settings do not set this list, a list in any other settings file does not apply to hooks that managed settings define, or that come from a plugin they enable from a local folder they name.'),httpHookAllowedEnvVars:()=>X.array(X.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). Where managed settings do not set this list, a list in any other settings file does not apply to hooks that managed settings define, or that come from a plugin they enable from a local folder they name."),allowManagedPermissionRulesOnly:()=>X.boolean().optional().describe("When true (and set in managed settings), permission rules from user, project, local, and --settings files and allow rules from --allowedTools are ignored; only managed settings can add allow rules through settings. "+"The allowed-tools frontmatter of skills and custom commands from user, project, and --add-dir sources, and of plugins no managed setting vouches for, is ignored too. Plugins keep theirs only on an admin-backed channel: host-delivered --plugin-dir plugins (in Claude Desktop, only while this is not set by the organization's own managed settings), the official marketplace registered from its unpinned anthropics source, claude.ai-synced plugins Anthropic attests, the saved login organization's claude.ai-hosted marketplaces, marketplaces whose registered source managed extraKnownMarketplaces declares or an exact or owner-pinned (owner/*) strictKnownMarketplaces entry names at the path it pins (an npm marketplace source only when the registration and the declared entry pin the same registry, and a settings marketplace source only when every nested npm plugin entry pins one on a bare package name — unpinned, the package resolves through the member's own npm config, and a non-bare spelling packs as an exotic spec the pin does not bind, so nothing an entry names is what was fetched) (host and path patterns and enabledPlugins ids do not vouch); managed and bundled skills keep theirs. "+"--disallowedTools, skill disallowed-tools, and other deny and ask rules from the command line or the current session still apply."),allowManagedMcpServersOnly:()=>X.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, in user settings for a server the organization provides. Users can still add their own MCP servers, but only the admin-defined allowlist applies."),allowAllClaudeAiMcps:()=>X.boolean().optional().describe("When true (and set in managed settings), claude.ai cloud MCP connectors load alongside managed-mcp.json instead of being suppressed by its exclusive-control lockdown. Default off preserves the lockdown. Read from managed settings only."),allowClaudeInChromeWithManagedMcp:()=>X.boolean().optional().describe("When true (and set in device managed settings: MDM, the managed-settings.json file, or a policy helper those configure), the built-in Claude in Chrome MCP server can run alongside managed-mcp.json instead of being blocked by its exclusive-control lockdown. deniedMcpServers and the organization's Claude in Chrome setting still block it. Default off preserves the lockdown."),strictPluginOnlyCustomization:()=>Hh().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:()=>X.object({type:X.literal("command"),command:X.string(),padding:X.number().optional(),refreshInterval:X.number().min(1).optional().catch(void 0).describe("Re-run the status line command every N seconds in addition to event-driven updates"),hideVimModeIndicator:X.boolean().optional().describe("Hide the built-in `-- INSERT --` / `-- VISUAL --` indicator below the prompt. Use this when your status line script renders `vim.mode` itself.")}).optional().describe("Custom status line display configuration"),prUrlTemplate:()=>X.string().optional().describe('URL template for PR links in the footer link badges and inline messages. The detected git PR is rendered as the first footer-link badge. Placeholders: {host} {owner} {repo} {number} {url}. Example: "https://reviews.example.com/{owner}/{repo}/pull/{number}"'),footerLinksRegexes:()=>X.array(l7().catch(Ch)).transform((w)=>w.filter((v)=>v!==Ch)).optional().catch(void 0).describe("Extra clickable footer badges that appear when a regex matches turn output (tool results and assistant responses). Read from user, flag, and managed settings only; ignored in project .claude/settings.json and local .claude/settings.local.json. At most 5 badges render; the oldest is displaced by newer matches and /clear removes them. Use to surface IDs printed by project CLIs as session links."),subagentStatusLine:()=>X.object({type:X.literal("command"),command:X.string()}).optional().catch(void 0).describe("Deprecated: still works, and will stop working in a future release. Custom per-subagent status line shown in the agent panel; receives row context as JSON on stdin"),enabledPlugins:()=>X.record(X.string(),Fh()).optional().describe('Enabled plugins using plugin-id@marketplace-id format. Example: { "formatter@anthropic-tools": true }. Only true turns on a marketplace plugin: a list of versions is accepted but leaves it off. Settings precedence is user < project < local < flag < policy, so to disable a plugin that project settings enable, set it to false in .claude/settings.local.json — setting false in ~/.claude/settings.json is overridden by the project.'),prependPlugins:()=>X.array(X.string()).optional().catch(void 0).describe("Managed plugins (plugin@marketplace ids that managed enabledPlugins sets true) whose hooks run first, outermost, in the listed order: the first id listed sees every event before any other plugin and every result after it. Managed plugins from a local folder or a remote marketplace managed settings name, and not listed here or in appendPlugins, follow the listed ones; user, project and marketplace plugins come after those; then appendPlugins; then the built-in plugins. The bundled cc-plugin-sec-default@builtin seats itself outermost (on a machine with managed settings and for Team and Enterprise organizations) unless this list is set, in which case list it where it should sit or leave it out. Name it there as sec-default@builtin, the id every release reads, for as long as any machine in the organization may run a release from before its rename; a release that knows the new id reads either. Any other id that is not an enabled managed plugin is skipped; an id listed in both keys is prepended. Only honored from managed settings (or, on a machine with none, from user settings for your own plugins); ignored in project, local and --settings sources."),appendPlugins:()=>X.array(X.string()).optional().catch(void 0).describe("Managed plugins (plugin@marketplace ids that managed enabledPlugins sets true) whose hooks run last among plugins, innermost, in the listed order: the last id listed sits just above the built-in plugins and sees each event as every other plugin left it. Only honored from managed settings (or, on a machine with none, from user settings for your own plugins); ignored in project, local and --settings sources."),extraKnownMarketplaces:()=>zn(()=>T("extraKnownMarketplaces")).describe("Additional marketplaces to make available for this repository. Typically used in repository .claude/settings.json to ensure team members have required plugin sources."),additionalMarketplaces:()=>zn(()=>T("additionalMarketplaces")).describe("Alias for extraKnownMarketplaces: this key is read exactly as if it were spelled "+"extraKnownMarketplaces. Do not set both in one file — if both appear, this key is ignored "+"with a warning. Claude Code may rewrite this key as extraKnownMarketplaces when it updates the file. Clients older than this alias ignore it, so prefer extraKnownMarketplaces while older Claude Code versions still share the same settings."),strictKnownMarketplaces:()=>zn(()=>X.array(ol())).describe('Enterprise strict list of allowed marketplace sources. When set in managed settings, ONLY these sources can be added as marketplaces. Entries match exactly, except that a github entry may use the owner-wildcard form {"source":"github","repo":"owner/*"} to allow every repository under that owner. 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."),allowedMarketplaces:()=>zn(()=>X.array(ol())).describe("Alias for strictKnownMarketplaces (managed settings only): this key is read exactly as if it "+"were spelled strictKnownMarketplaces. Do not set both in one file — if both appear, this key "+"is ignored with a warning. Clients older than this alias ignore it, so keep using strictKnownMarketplaces when the allowlist must also bind older Claude Code versions."),blockedMarketplaces:()=>zn(()=>X.array(Dc())).describe('Enterprise blocklist of marketplace sources. When set in managed settings, these sources are blocked from being added as marketplaces. Entries match exactly, except that a github entry may use the owner-wildcard form {"source":"github","repo":"owner/*"} to block every repository under that owner, and an entry naming a branch or tag in `ref` also blocks every full commit id in that repository. The check happens BEFORE downloading, so blocked sources never touch the filesystem.'),disableCommandPluginSources:()=>X.boolean().optional().describe("Controls the `command` plugin source, whose plugin directory is produced by running a marketplace-declared command on this machine. true: command-sourced plugins are never installed, updated, or re-resolved (the command never runs). false: explicitly allowed. "+"Unset: follows allowManagedHooksOnly — an org that restricts hook execution to managed "+"settings gets command sources disabled too. Only honored from managed settings."),...!1,disableSideloadFlags:()=>X.boolean().optional().describe("When true (and set in managed settings), rejects the --plugin-dir, --plugin-url, --agents, and non-sdk --mcp-config CLI flags at startup. Closes the CLI-flag bypass of strictKnownMarketplaces. Pair with allowedMcpServers for per-server MCP control; this setting does not gate other MCP entry points (SDK setMcpServers, claude mcp add, .mcp.json). Also blocks surfaces that spawn the CLI with these flags internally (see settings documentation). Only honored from managed settings; ignored in user/project/local settings."),pluginSuggestionMarketplaces:()=>X.array(X.string()).optional().describe("Marketplace names whose plugins may surface as contextual install suggestions (relevance-based tips). No marketplace-declared suggestions surface without this allowlist; the built-in tips for Anthropic's own plugins are unaffected. Only honored when set in managed settings (policy scope); the key is ignored in user, project, and local settings. A name only takes effect when the marketplace is registered on the machine AND its registered source is also declared in managed settings, either as the extraKnownMarketplaces entry for that name or as an entry of strictKnownMarketplaces. A marketplace registered from a different source under an allowlisted name is ignored. The official marketplace is exempt from the source requirement: allowlisting its name alone suffices, since that name can only register from the official Anthropic source."),forceLoginMethod:()=>X.enum(["claudeai","console","gateway"]).optional().catch(void 0).describe('Force a specific login method: "claudeai" for a Claude subscription (individual, Team, or Enterprise plans), "console" for Console billing, "gateway" for the Cloud gateway OIDC device flow'),forceLoginGatewayUrl:()=>X.string().min(1).optional().catch(void 0).describe('Cloud gateway URL to pre-fill during login, alongside forceLoginMethod: "gateway". Honored from admin-controlled managed settings (MDM / managed-settings.json / policy helper) and, on a machine with none of those, from your own user settings; ignored in project, local, flag, and remote-delivered settings.'),gatewayInternalNetworks:()=>X.array(X.string()).optional().catch([Wh]).meta({default:void 0}).describe("IPv4 CIDR blocks (at most 4, each /8 to /32, not overlapping) your Cloud gateway sits in: the public block your organization numbers its internal network from, which lets /login reach a gateway there. A block must lie entirely outside private space, where /login accepts a gateway without this key. /login accepts a gateway inside a listed block over a direct connection only, and only when this machine's own address on that connection is inside the same block, so /login must happen from a machine whose own address is inside the block (not through a proxy, VPN pool, container or NAT segment outside it). A bar against copied settings files, not proof of location. Honored only from admin-controlled managed settings (MDM / managed-settings.json / policy helper); ignored in user, project, and remote-delivered settings."),parentSettingsBehavior:()=>X.enum(["first-wins","merge"]).optional().describe(`Controls whether the SDK parent tier (Options.managedSettings / --managed-settings) layers under this admin tier. "first-wins" (the default, except in a gateway session Claude Desktop's Code `+'tab launched, where "merge" is): parent is dropped — admin tiers '+`are the only policy source. "merge": parent's restrictive-only-filtered settings union under the admin winner. Has no effect when no admin tier exists (parent applies as the sole policy tier, still filtered restrictive-only).`),managedSourcesBehavior:()=>X.enum(["first-wins","merge"]).optional().describe('Controls how the managed settings sources compose. "first-wins" (default): the highest-priority source present (server-managed > MDM (managed plist / HKLM) > managed-settings.json) is the managed tier alone. "merge": every present source deep-merges with fixed '+"precedence server-managed > MDM > managed-settings.json — scalars "+"take the highest source's value (a restrictive boolean or enum — "+"the allowManaged*Only locks, the disable* switches, the sandbox "+"lock family — takes the strictest value any source sets) and "+"arrays union, except fallbackModel, the restriction allowlists allowedMcpServers, allowedProviders, availableModels, strictKnownMarketplaces and allowedChannelPlugins, and sandbox.credentials.awsPairs and sandbox.ripgrep (the highest source that sets one owns it whole), modelOverrides (the whole map of the highest source that sets it, dropped when that source sits below the one that sets availableModels), managedMcpServers (server names union; a name set by two sources takes the higher source's whole entry), and the keys taken from the highest source only: the auth pins forceLoginOrgUUID, forceLoginMethod, forceLoginGatewayUrl and gatewayInternalNetworks, allowNestedModelAccessUnderForceLogin, the credential helpers apiKeyHelper, awsAuthRefresh, awsCredentialExport, gcpAuthRefresh, otelHeadersHelper and proxyAuthHelper, modelPicker, permissions.defaultMode, parentSettingsBehavior and the policyHelper configuration (env keeps its own per-key union). In both modes, a forceLoginOrgUUID, or a forceLoginMethod of claudeai or console, that this machine's own MDM policy or managed settings file sets applies ahead of server-managed settings. Honored only from the highest-priority source present; enable it only when every lower source is admin-controlled, since lower sources then contribute entries such as permissions.allow. HKCU and --managed-settings never take part in the merge."),forceLoginOrgUUID:()=>X.union([X.string(),X.array(X.string())]).optional().describe("Organization UUID to require for OAuth login. Accepts a single UUID string or an array of UUIDs (any one is permitted). When set in managed settings, login fails if the authenticated account does not belong to a listed organization."),allowNestedModelAccessUnderForceLogin:()=>X.boolean().optional().describe("Self-hosted runner hosts only. Set to true to let a Claude Code started by a runner session's command use the runner's model access (--nested-model-access) when this machine's managed settings set forceLoginOrgUUID or forceLoginMethod. It asks the runner which organization the session owner's sign-in belongs to, and stops if the pin does not permit it or the runner does not answer. Without this key it is left signed out. Any program on the machine can pretend to be the runner, so with this key the pin is not a security boundary: set it on runner hosts only, never in a profile that reaches people's own computers. Honored only from this machine's own administrator sources (MDM, the managed settings file, or a policy helper that they name); ignored in server-managed, user, project, local and --settings sources."),allowedProviders:()=>X.preprocess((w)=>Array.isArray(w)?w.filter(oc):w,X.array(X.enum(ei))).optional().catch(void 0).describe(`Managed settings only (managed-settings.json, MDM, or server-managed). The API providers Claude Code may use on this machine: "anthropic" (the Anthropic API on Anthropic's own host, via a claude.ai or Console sign-in or an API key; pair it with forceLoginMethod / forceLoginOrgUUID to require a sign-in), "bedrock", "vertex", "foundry", "anthropicAws", "mantle" (each meaning that provider's own service: its regional, FIPS, private-endpoint and sovereign-cloud hosts), "customEndpoint" (the `+"Anthropic API or a cloud provider's API sent to some other host — ANTHROPIC_BASE_URL, that "+"provider's ANTHROPIC_*_BASE_URL, a Foundry resource name that is not a bare name, or for "+"Bedrock the AWS SDK's AWS_ENDPOINT_URL[_BEDROCK[_RUNTIME]] — such as an LLM gateway; admitted "+`only for the value pinned in the "env" block of the same managed source), or "gateway" (the Cloud gateway sign-in). A session on a provider that is not listed is refused at startup, at login, and when it next contacts the API, with a message naming what selected the provider and the entry that would allow it. Under a list, where first-party traffic goes (ANTHROPIC_BASE_URL, a gateway sign-in) is honored only when the same managed source pins it in "env" (or forceLoginGatewayUrl), and a claude ssh tunnel into the machine is refused. A cloud provider's credential and tenancy variables, and the network path and TLS trust (HTTPS_PROXY, NODE_EXTRA_CA_CERTS, CLAUDE_CODE_CERT_STORE), are not judged by this list; set those for the fleet in the managed "env" block, whose values replace the user's. To route Bedrock through a gateway for a fleet, pin ANTHROPIC_BEDROCK_BASE_URL there (it is what the clients use, ahead of an endpoint_url in ~/.aws/config, which this list does not judge); the AWS SDK's AWS_ENDPOINT_URL* pins only sanction where the SDK's own clients go and never stand in for the "bedrock" entry. Unset allows every provider; an empty array allows none. Only a list in managed-settings.json or MDM is enforcement on the machine: it cannot be widened or hidden by server-managed settings and reaches every session. A list set `+"only in the admin console reaches only sessions that fetch your server-managed settings — not "+"a session on a cloud provider, another organization or a non-Anthropic ANTHROPIC_BASE_URL, one authenticating only with apiKeyHelper or ANTHROPIC_AUTH_TOKEN, a Pro/Max/Ultra login, --bare without "+"an API key, or a first launch before the fetch lands — all conditions the user controls. "+`Versions that predate this setting ignore it; pair it with a minimum-version policy on a mixed fleet. 'claude auth status' reports the Anthropic API as apiProvider "firstParty".`),...!1,forceRemoteSettingsRefresh:()=>X.boolean().optional().describe("When set in managed settings, the CLI blocks startup until remote managed settings are freshly fetched, and exits if the fetch fails"),otelHeadersHelper:()=>X.string().optional().describe("Path to a script that outputs OpenTelemetry headers"),outputStyle:()=>X.string().optional().describe("Controls the output style for assistant responses"),viewMode:()=>X.enum(["default","verbose","focus"]).optional().catch(void 0).describe("Default transcript view mode on startup"),language:()=>X.string().optional().describe('Preferred language for Claude responses and voice dictation (e.g., "japanese", "spanish")'),skipWebFetchPreflight:()=>X.boolean().optional().describe("Skip the WebFetch blocklist check for enterprise environments with restrictive security policies"),sandbox:()=>zn(()=>Ya()),...!1,feedbackSurveyRate:()=>X.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."),feedbackDrafts:()=>X.enum(["notify","quiet","off"]).optional().describe('Model-drafted feedback (the SendFeedback tool). "notify" (default) shows a one-line notice when a draft is queued; "quiet" shows only the footer counter; "off" disables the tool entirely so drafts are never queued.'),spinnerTipsEnabled:()=>X.boolean().optional().describe("Whether to show tips in the spinner"),clawdFileProgressEnabled:()=>X.boolean().optional().describe("@internal Whether to show Clawd, Claude Code's mascot, carrying the file on the progress line when a file goes to or from a connector"),spinnerVerbs:()=>X.object({mode:X.enum(["append","replace"]),verbs:X.array(X.string())}).optional().describe('Customize spinner verbs. mode: "append" adds verbs to defaults, "replace" uses only your verbs.'),spinnerTipsOverride:()=>X.object({excludeDefault:X.boolean().optional().catch(void 0),tips:v8().optional(),tipsFile:X.string().optional().catch(void 0).describe("Absolute or ~/ local path to a JSON file holding an array of tips (same shapes as `tips`); honored from user, --settings and on-disk managed settings only. Read once per CLI process (restart to pick up edits)."),label:X.string().optional().catch(void 0).describe('Prefix shown before your tips in the spinner (default "Tip")')}).passthrough().optional().catch(void 0).describe("Add your organization's own tips to the spinner tip rotation. tips: strings or {id, text, cooldownSessions?, priority?} objects; tipsFile: a JSON file of the same; label: prefix shown before your tips; excludeDefault: if true, only show your tips (default: false)."),syntaxHighlightingDisabled:()=>X.boolean().optional().describe("Whether to disable syntax highlighting in diffs"),maxProseWidth:()=>X.number().int().min(40).optional().catch(void 0).describe("Maximum width, in terminal columns, of the prose in Claude's responses (paragraphs, headings, lists, blockquotes). In a wider terminal the prose wraps at this width while tables and code blocks keep the full width; only the display wraps, the response text itself gains no line breaks. Minimum 40. Unset (the default) uses the full terminal width."),spellcheck:()=>X.object({enabled:X.boolean().optional().catch(void 0).describe("Turn on spell checking of the prompt input (default: false)"),checker:X.string().optional().catch(void 0).describe(`Which spell checker to run: ${sl.map((w)=>`"${w}"`).join(", ")}, or "auto" (default) for the first of those found on PATH`),language:X.string().optional().catch(void 0).describe(`Dictionary to use, passed to the checker as-is (aspell --lang, hunspell -d, ispell -d), e.g. "en_GB"; names are checker-specific (letters, digits and _ - . , only). Default: the checker's own default`),color:X.string().optional().catch(void 0).describe(`Color of misspelled words (they are also underlined): a terminal color name such as "red" or "magenta", "#rrggbb", "rgb(r,g,b)", "ansi256(n)" or "ansi:<name>". Default: the theme's error color`)}).passthrough().optional().catch(void 0).describe(`Underline misspelled words in the prompt input as you type, using an installed ${sl.slice(0,-1).join(", ")} or ${sl.at(-1)} (off unless "enabled" is true; does nothing if none is installed). Read from user, flag and managed settings only (the whole block from the highest-precedence of those applies); ignored in project .claude/settings.json and .claude/settings.local.json.`),terminalTitleFromRename:()=>X.boolean().optional().describe("Whether /rename updates the terminal tab title (defaults to true). Set to false to keep auto-generated topic titles."),promptCacheTtl:()=>X.enum(Xr).optional().catch(void 0).describe('Prompt cache TTL for the main conversation (interactive, -p and SDK turns, plus the helpers that run inline with it): "5m" or "1h". Unset = automatic: 1 hour on a Claude subscription within its usage limits, 5 minutes on an API key, Bedrock, Vertex or Foundry. 1-hour cache writes are billed at a higher rate; the cache stays warm across longer breaks. The CLAUDE_CODE_PROMPT_CACHE_TTL environment variable takes precedence.'),subagentPromptCacheTtl:()=>X.enum(Xr).optional().catch(void 0).describe("Prompt cache TTL for everything outside the main conversation — subagents, workflows, background and helper requests: "+'"5m" or "1h". Unset = automatic (5 minutes unless ENABLE_PROMPT_CACHING_1H=1). The CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL environment variable takes precedence.'),alwaysThinkingEnabled:()=>X.boolean().optional().describe("When false, thinking is disabled. When absent or true, thinking is enabled automatically for supported models."),effortLevel:()=>X.enum(["low","medium","high","xhigh"]).optional().catch(void 0).describe("Persisted effort level for supported models."),maxEffortLevel:()=>X.enum(js).optional().catch(void 0).describe("Maximum effort level. Anything above it (an /effort or /model pick, --effort, CLAUDE_CODE_EFFORT_LEVEL, a model default) is clamped to it, on every provider including Bedrock, Vertex and Foundry. Combines with an organization's per-model effort cap by taking the lower of the two; across settings files the lowest value wins, and modelSettings.<model>.maxEffortLevel replaces it per model. Enforced client-side: an effort supplied through CLAUDE_CODE_EXTRA_BODY is not clamped."),modelSettings:()=>X.preprocess((w)=>typeof w==="object"&&w!==null&&!Array.isArray(w)?cr(w,(v,U)=>Object.hasOwn(Object.prototype,U)):w,X.record(X.string(),X.object({effortLevel:X.enum(["low","medium","high","xhigh"]).optional().catch(void 0).describe("Persisted effort level for this model."),maxEffortLevel:X.enum(js).optional().catch(void 0).describe('Maximum effort level for this model. Within one settings file it replaces the top-level maxEffortLevel for the model ("max" exempts it); across settings files the lowest applicable value wins. Keyed like effortLevel: the canonical model name also matches its dated, [1m], Bedrock and Vertex spellings.'),autoCompactWindow:X.union([X.literal("auto"),bh()]).describe('Auto-compact window for this model, in tokens (at least 100000), or "auto" for the window tuned for the model. Within one settings file it replaces the top-level autoCompactWindow for the model. /autocompact saves here. The canonical model name as key also matches its dated, [1m], Bedrock and Vertex spellings.')}).passthrough().optional().catch(void 0))).optional().catch(void 0).describe("Per-model settings keyed by canonical model name."),ultracode:()=>X.boolean().optional().catch(void 0).describe("Enable ultracode for the session: standing dynamic-workflow orchestration at any effort level. "+"Session-scoped — typically provided via --settings or the apply_flag_settings control request; "+"interactive toggles never persist it. Requires workflows to be enabled and a model that supports ultracode."),autoCompactWindow:()=>bh().describe("Auto-compact window size"),...!1,advisorModel:()=>X.string().optional().describe("Advisor model for the server-side advisor tool."),fastMode:()=>X.boolean().optional().describe("When true, fast mode is enabled. When absent or false, fast mode is off. On Vertex a saved value is ignored: use /fast each session."),fastModePerSessionOptIn:()=>X.boolean().optional().describe("When true, fast mode does not persist across sessions. Each session starts with fast mode off."),promptSuggestionEnabled:()=>X.boolean().optional().describe("When false, prompt suggestions are disabled. When absent or true, prompt suggestions are enabled."),emojiCompletionEnabled:()=>X.boolean().optional().describe("When false, the :emoji: shortcode typeahead (the suggestion popup and the :name: inline replacement) is disabled. When absent or true, it is enabled."),awaySummaryEnabled:()=>X.boolean().optional().describe("@internal When false, the session recap (shown when you return after being away for 5+ minutes) is disabled. When absent or true, recap is enabled. Hidden from public SDK types until external launch."),responseComparisonEnabled:()=>X.boolean().optional().describe("@internal Set to false to stop Claude Code from showing two answers to one message and asking which is better. When absent or true, it may do so on some turns. Hidden from public SDK types until external launch."),showClearContextOnPlanAccept:()=>X.boolean().optional().describe('When true, the plan-approval dialog offers a "clear context" option. Defaults to false.'),askUserQuestionTimeout:()=>X.enum(["60s","5m","10m","never"]).optional().catch(void 0).describe(`Idle time before Claude's questions in the terminal auto-continue with any answers selected so far. When unset, the terminal does not auto-continue. The Claude desktop and web apps show Claude's questions in their own interface and may move on from some unanswered ones after a wait the app sets. Claude is then told that nobody answered and uses its best judgment. In sessions that read this setting, only "never" stops the apps from moving on. Leaving it unset does not. Cloud sessions and Cowork tasks do not read your user settings file (~/.claude/settings.json), and managed settings do not reach all of them. This setting is ignored in a project's settings files.`),dialogExpiry:()=>X.enum(["60s","5m","10m","never"]).optional().catch(void 0).describe('Max time a permission/user dialog forwarded to a remote client stays parked awaiting an answer, and how long a HELD cross-session message awaits approval, before either resolves to its safe no-action default (cancelled / dropped-with-denial). Defaults to 5m to match the long-standing remote-dialog deadline; "never" disables the deadline. Local-only permission prompts (no remote client) are unaffected. The CLAUDE_CODE_USER_DIALOG_TIMEOUT_MS env var, when set, overrides this. Read from trusted sources only (never a checked-in repo settings file).'),agent:()=>X.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."),modelProposedGoals:()=>X.enum(T_).optional().catch(void 0).describe("@internal Controls the session goal tools (model-proposed goals). 'auto' (the default when absent) lets the model choose per proposal whether to ask for approval via its ask_user parameter; 'alwaysAsk' routes every model-proposed goal through the approval dialog; 'disabled' turns the tools off. Typing /goal works under every value. Unless disabled, the model can pause any active goal until the user's next message. Consent-affecting, so it is read "+"from trusted sources only (user/policy/flag) — "+"workspace-resident project and local settings are ignored."),companyAnnouncements:()=>X.array(X.string()).optional().describe("Company announcements to display at startup (one will be randomly selected if multiple are provided)"),pluginConfigs:()=>X.record(X.string(),X.object({mcpServers:X.record(X.string(),X.record(X.string(),X.union([X.string(),X.number(),X.boolean(),X.array(X.string())]))).optional().describe("User configuration values for MCP servers keyed by server name"),options:X.record(X.string(),X.union([X.string(),X.number(),X.boolean(),X.array(X.string())])).optional().describe("Non-sensitive option values from plugin manifest userConfig, keyed by option name. Sensitive values go to secure storage instead.")}).or(X.undefined())).optional().describe("Per-plugin configuration including MCP server user configs, keyed by plugin ID (plugin@marketplace format)"),remote:()=>X.object({defaultEnvironmentId:X.string().optional().describe("Default environment ID to use for cloud sessions")}).optional().describe("Cloud session configuration"),autoUpdatesChannel:()=>X.enum(["latest","stable","rc"]).optional().describe("Release channel for auto-updates (latest or stable)"),minimumVersion:()=>X.string().optional().describe("Minimum version to stay on - prevents downgrades when switching to stable channel"),requiredMinimumVersion:()=>X.string().optional().describe("Minimum Claude Code version required to start. If the running version is older, Claude Code exits at startup with instructions to update. Only enforced from managed (policy) settings."),requiredMaximumVersion:()=>X.string().optional().describe("Maximum Claude Code version allowed to start. If the running version is newer, Claude Code exits at startup with instructions to install an approved version. Only enforced from managed (policy) settings."),plansDirectory:()=>X.string().optional().describe("Custom directory for plan files, relative to project root. If not set, defaults to ~/.claude/plans/"),tui:()=>X.enum(["default","fullscreen"]).optional().describe('Terminal UI renderer. "fullscreen" uses the flicker-free alt-screen renderer with virtualized scrollback (equivalent to CLAUDE_CODE_NO_FLICKER=1). "default" uses the classic main-screen renderer.'),...!1,voice:()=>X.object({enabled:X.boolean().optional(),mode:X.enum(["hold","tap"]).optional().describe("'hold' (default): hold to talk. 'tap': tap to start, tap to stop+submit."),autoSubmit:X.boolean().optional().describe("Submit the prompt when hold-to-talk is released (hold mode only)")}).optional().describe("Voice mode settings (hold-to-talk / tap-to-toggle dictation)"),channelsEnabled:()=>X.boolean().optional().describe("Managed-org opt-in for channel notifications (MCP servers with the claude/channel capability pushing inbound messages). claude.ai Teams/Enterprise: default off. Console: default on unless managed settings exist. Set true to allow; users then select servers via --channels."),allowedChannelPlugins:()=>X.array(Nh()).optional().describe("Managed-org 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."),prefersReducedMotion:()=>X.boolean().optional().describe("Reduce or disable animations for accessibility (spinner shimmer, flash effects, etc.)"),timeFormat:()=>X.union([X.enum(b_),X.string()]).optional().describe('Clock format for times shown in the UI: "auto" (default, follows the locale), "12-hour", "24-hour", "24-hour-utc" ("18:05Z"), or a strftime pattern such as "%H:%M" (any value containing "%"; other values read as "auto"). A pattern replaces the time everywhere; message timestamps show only the pattern, so include %Y-%m-%d for the date. /config offers the presets; a pattern is set here.'),timeZone:()=>X.string().optional().describe('IANA time zone for times shown in the UI, e.g. "UTC" or "Europe/Dublin". Default: the system time zone. An unknown name falls back to the system time zone.'),doneMeansMerged:()=>X.boolean().optional().describe("@internal When true, Claude keeps working until the PR is ready for you to merge, a cron/Monitor is armed to resume later, or it hands you a self-contained next step."),totalTokensReminder:()=>X.enum(["off","infinite","fixed","countdown","padded-countdown"]).optional().describe("@internal Emit a <total_tokens>N tokens left</total_tokens> block in the system prompt, after each tool result, and (when totalTokensReminderAfterUserTurn is on) after each regular user prompt. 'infinite' uses the literal value Infinite, 'fixed' uses 5000000, 'countdown' uses the live remaining context-window tokens, 'padded-countdown' counts down from totalTokensReminderBudget (re-anchoring to the full budget on each regular user prompt when totalTokensReminderAfterUserTurn "+"is on — task-budget semantics). Defaults to padded-countdown for a "+"model with the total_tokens_reminder capability, else off. Env var CLAUDE_CODE_TOTAL_TOKENS_REMINDER overrides."),totalTokensReminderBudget:()=>X.number().int().positive().optional().describe("@internal Starting budget (tokens) for totalTokensReminder 'padded-countdown' mode. Defaults to 15000000. Server-controlled via GrowthBook; env var CLAUDE_CODE_TOTAL_TOKENS_REMINDER_BUDGET overrides."),totalTokensReminderAfterUserTurn:()=>X.boolean().optional().describe("@internal When true, emit the totalTokensReminder block after each regular user prompt and (for 'padded-countdown') re-anchor the task budget to the full configured value at the start of each user turn. When false, the reminder appears only in the system prompt and after each tool-result batch, and 'padded-countdown' counts down over the whole session. Defaults to on. Env var CLAUDE_CODE_TOTAL_TOKENS_REMINDER_AFTER_USER_TURN overrides; server-controlled via GrowthBook tengu_lapis_anchor_user_turn."),autoMemoryEnabled:()=>X.boolean().optional().describe("Enable auto-memory for this project. When false, Claude will not read from or write to the auto-memory directory."),autoMemoryDirectory:()=>X.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/."),...!1,autoDreamEnabled:()=>X.boolean().optional().describe("Enable background memory consolidation (auto-dream). When set, overrides the server-side default."),showThinkingSummaries:()=>X.boolean().optional().describe("Request API-side thinking summaries and show them in the conversation and in the transcript view (ctrl+o). Set explicitly to override the default for your install."),skipDangerousModePermissionPrompt:()=>X.boolean().optional().describe("Whether the user has accepted the bypass permissions mode dialog"),skipWorkflowUsageWarning:()=>X.boolean().optional().describe("@internal Whether the user has accepted the multi-agent workflow usage warning. Until set, auto permission mode prompts before running a workflow."),disableAutoMode:()=>X.enum(["disable"]).optional().describe("Disable auto mode"),remoteTools:()=>X.object({allowUnattendedServing:X.boolean().optional().describe("@internal When false in managed or user settings, a cloud session in auto mode may not run commands on this computer without a person approving each one, whatever consent the computer has given; a project, local or --settings value is ignored. Default: true.")}).optional().describe("@internal How this computer serves tool calls to cloud sessions"),sshConfigs:()=>X.array(X.object({id:X.string().describe("Unique identifier for this SSH config. Used to match configs across settings sources."),name:X.string().describe("Display name for the SSH connection"),sshHost:X.string().describe('SSH host in format "user@hostname" or "hostname", or a host alias from ~/.ssh/config'),sshPort:X.number().int().optional().describe("SSH port (default: 22)"),sshIdentityFile:X.string().optional().describe("Path to SSH identity file (private key)"),startDirectory:X.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."),sshHostCommands:()=>X.unknown().meta({type:"array"}).optional().describe("SSH connections in Claude Desktop whose host comes from a command. A list of entries, each with `id`, `name` and `command`, and optionally `sshIdentityFile` and `startDirectory`. Desktop runs `command` on this computer when you create the connection or another host for it, not each time you connect. `command` is a program name or absolute path (single-quote a path with spaces), then plain arguments. Nothing else can be quoted. For pipes, variables or a leading `~`, use a script. On Windows, the program must be a full path from a drive letter, such as `C:/tools/acme.exe`, ending in `.exe`, `.cmd` or `.bat`. Quoted paths and Windows need Claude Desktop v4.16336.0 or later. The command must print only the host on standard output: `host` or `user@host` on one line, or a JSON object with `sshHost` and, optionally, `sshPort` and `startDirectory`. Desktop reads this key only from user settings and from this computer's managed settings. Claude Code itself does not use it."),claudeMd:()=>X.string().optional().describe("CLAUDE.md-style instructions injected as organization-managed memory. Only honored from managed/policy settings."),claudeMdExcludes:()=>X.array(X.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:()=>X.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.").'),theme:()=>X.union([X.enum(R_),X.string().startsWith("custom:").transform((w)=>w)]).optional().catch(void 0).describe("Color theme for the UI"),editorMode:()=>X.enum(C_).optional().catch(void 0).describe("Key binding mode for the prompt input"),keybindingFlavor:()=>X.enum(["classic","readline"]).optional().catch(void 0).describe("Deprecated: no longer has any effect. The prompt's word-editing keys always follow Bash (readline) conventions."),vimInsertModeRemaps:()=>X.record(X.string(),X.unknown()).optional().catch(void 0).describe('Vim INSERT-mode key-sequence remaps, e.g. {"jj": "<Esc>"}. Each key is exactly two printable characters typed in sequence; "<Esc>" (return to NORMAL mode) is the only supported target. Applies when editorMode is "vim".'),verbose:()=>X.boolean().optional().describe("Show full tool output instead of truncated summaries"),preferredNotifChannel:()=>X.enum(A_).optional().catch(void 0).describe("Preferred OS notification channel"),autoCompactEnabled:()=>X.boolean().optional().describe("Automatically compact conversation when context fills"),precomputeCompactionEnabled:()=>X.boolean().optional().describe("Precompute the compaction summary in the background before it is needed. Only applies when auto-compact is on."),precomputeArmTokens:()=>X.number().int().positive().optional().catch(void 0).describe("@internal Read from the flag settings only, for a host that sends /compact below the automatic threshold: the main conversation starts its background compaction summary at this many tokens, when that is sooner than it would by itself, so that /compact finds it ready. A window set below the billing boundary compacts without a background summary, and this does not change that."),autoCompactRaisedForLoad:()=>X.boolean().optional().catch(void 0).describe("@internal Read from the flag settings only, in Claude Desktop's Code tab: true lets a conversation compact at twice what is still in each request after a summary (system prompt, tools, instruction files), where that is above its auto-compact threshold."),autoCompactOfferAnswer:()=>X.object({model:X.string().min(1).max(200),choice:X.enum(["accept","keep","undo"]),tokens:X.number().int().positive(),at:X.number().int().positive()}).optional().catch(void 0).describe("@internal Read from the flag settings only, in Claude Desktop's Code tab: the person's answer to the app's offer of a lower auto-compact window, which Claude Code records on this computer. `tokens` is the window they chose or kept, and `at` is when they answered (epoch ms)"),idleCompaction:()=>X.boolean().optional().describe("Set to false to stop Claude Code from compacting a long conversation while the session is idle. Defaults to true."),switchModelsOnFlag:()=>X.boolean().optional().describe("When safeguards flag a message, automatically switch to a different model to keep chatting. When off, your session will pause instead."),autoContinueAtUsageLimit:()=>X.boolean().optional().describe("When a claude.ai usage limit stops your session, wait for the limit to reset and continue the task automatically. When off, the limit dialog offers the wait as a choice instead."),autoScrollEnabled:()=>X.boolean().optional().describe("Auto-scroll the conversation view to bottom (fullscreen mode only)"),wheelScrollAccelerationEnabled:()=>X.boolean().optional().describe("Ramp mouse-wheel scroll speed during fast scrolls (fullscreen mode only)"),fileCheckpointingEnabled:()=>X.boolean().optional().describe("Snapshot files before edits so /rewind can restore them"),showTurnDuration:()=>X.boolean().optional().describe('Show "Cooked for Nm Ns" after each assistant turn'),showMessageTimestamps:()=>X.boolean().optional().describe("Stamp each message with its arrival time"),terminalProgressBarEnabled:()=>X.boolean().optional().describe("Emit OSC 9;4 progress sequences during long operations"),todoFeatureEnabled:()=>X.boolean().optional().describe("Enable the todo / task tracking panel"),teammateMode:()=>X.enum(Zs).optional().catch(void 0).describe("How spawned teammates execute (tmux, iterm2, in-process, auto)"),remoteControlAtStartup:()=>X.boolean().optional().describe("Start Remote Control bridge automatically each session"),remoteControl:()=>X.object({shareHostProfile:X.enum(pl).optional().catch(void 0).describe("@internal What a Remote Control environment reports about this machine when it registers: 'off' reports nothing, 'basic' the OS, architecture and detected developer tools, 'full' also the names of MCP servers configured on this machine (never a repository's .mcp.json). When unset, the level comes from the feature rollout, which may be any of the three. Managed, --settings and user settings choose the level (the most restrictive wins); project and local settings can only lower it, never raise it. Read when Remote Control starts; lowering it later applies from the next registration, raising it from the next start.")}).optional().describe("@internal Remote Control (`claude remote-control`) options"),isolatePeerMachines:()=>X.boolean().optional().describe("Require explicit approval before SendMessage can reach a peer session on another machine via Remote Control"),daemonColdStart:()=>X.enum(["transient","ask"]).optional().describe("When no background service is running: 'transient' spawns one for this login session; 'ask' offers to install it persistently"),crossSessionInbound:()=>X.enum(di).optional().catch(void 0).describe("Inbound cross-session peer messages (SendMessage from your other sessions): 'accept' delivers them, 'hold' parks them for your review without letting Claude act, 'refuse' opts this session out. An explicit value always wins. Unset (mode parity): a message auto-delivers only when the sending session's permission-mode class matches yours (bypass↔bypass or prompting↔prompting); a mismatched sender's message is held for your approval; a sender that asserts no class is held only while this session bypasses permission prompts."),remoteMessageReceipts:()=>X.enum(["on","always","off"]).optional().catch(void 0).describe("@internal Delivery notices for messages between this session and cloud or Remote Control sessions. 'on' (default): notices, local ones too, start at most 30 turns an hour and one for each recipient that holds. 'always': neither limit, so two sessions can keep waking each other. 'off': no notices about those sessions, and no reports on messages received through them; the limits still apply to local ones. Read only from managed and user settings; --settings counts only with 'off'."),autoUploadSessions:()=>X.boolean().optional().describe("Mirror local sessions to claude.ai as view-only (no remote control)"),inputNeededNotifEnabled:()=>X.boolean().optional().describe("Push to mobile when a permission prompt or question is waiting"),agentPushNotifEnabled:()=>X.boolean().optional().describe("Allow Claude to push proactive mobile notifications"),...Ia(dh(i),(w)=>()=>w)}}function zh(i,c={}){let T=Bh(i,c);return new as(T).whole()}var d7=new Set,c7=new Set,gl=e(()=>new as(Bh(cs()),d7)),aCe=e(()=>gl().whole());function _l(i){return gl().forDocument(i)}var Rh=Object.freeze({serverName:"invalid-entry-stripped"});function Gh(i){for(let c of i){let T=c.path.length>0?`${c.path.map(String).join(".")}: `:"";if(c.code==="invalid_union"){for(let D of c.errors){let w=Gh(D);if(w!==null)return`${T}${w}`}if("note"in c&&typeof c.note==="string"&&c.note!=="")return`${T}${c.note}`}if(c.message!=="")return`${T}${c.message}`}return null}var jc=e(()=>{let i=gl();return Hn().flatMap(({path:c,restrictive:T})=>{if(c.length!==1||c[0]==="strictPluginOnlyCustomization"||c[0]==="disableAllHooks"||typeof T!=="boolean"&&typeof T!=="string")return[];let D=c[0],w=i.field(D);if(w===void 0||w instanceof X.ZodCatch)return[];return[{key:D,restrictive:T,field:w}]})}),El=e(()=>["strictKnownMarketplaces","blockedMarketplaces","strictPluginOnlyCustomization",...jc().map((i)=>i.key)]),Zo=["managedSourcesBehavior","wslInheritsWindowsSettings"];function ci(i){return n(i)&&Object.values(i).every(ci)}function $c(i){let c=i.wslInheritsWindowsSettings;if(c===void 0||c===null)return"disarmed";let T=ds(c);return T===!0?"armed":T===!1?"disarmed":"unreadable"}function Vc(i){let c=i.source==="hostPattern"?i.hostPattern:i.source==="pathPattern"?i.pathPattern:null;if(c!==null&&!qE(c))return`${i.source}: regex does not compile; the entry cannot be enforced`;if(i.source==="github"&&i.repo.includes("*")&&eh(i.repo)===null)return'github: an owner wildcard must be exactly "<owner>/*"; the entry cannot be enforced';if(i.source==="git"&&th(i.url))return'git: wildcards are only supported in github-form entries, as "<owner>/*"; the entry cannot be enforced';if((i.source==="github"||i.source==="git")&&i.ref!==void 0&&i.ref.includes("*"))return`${i.source}: ref contains "*", which git does not allow in ref names; the entry cannot be enforced`;return null}function Th(i,c){return X.union([X.null().transform(()=>{return}),X.array(X.unknown()).transform((T)=>{let D=[];for(let[w,v]of T.entries()){let U=(i==="blockedMarketplaces"?Dc():ol()).safeParse(v);if(U.success){let B=Vc(U.data);if(B!==null){if(i==="blockedMarketplaces")c({path:`${i}[${w}]`,message:`Unenforceable entry was kept: ${B}; it can never match a marketplace source, but marketplace restrictions stay active`}),D.push(U.data);else c({path:`${i}[${w}]`,message:`Invalid entry was ignored: ${B}`});continue}D.push(U.data)}else c({path:`${i}[${w}]`,message:`Invalid entry was ignored: ${Gh(U.error.issues)??"failed validation"}`})}if(i==="blockedMarketplaces"&&T.length>0&&D.length===0)c({path:i,message:'Every entry of "blockedMarketplaces" was invalid; none of them can be enforced until it is fixed.'});return D})]).optional()}function Dh(i,c,T){return X.array(c.catch((D)=>(T({path:`${i}[]`,message:`Invalid entry was ignored: ${D.issues[0]?.message??"failed validation"}`}),Rh))).transform((D)=>D.filter((w)=>w!==Rh)).optional()}var Wh="(unreadable)";function ll(i,c,T,D,w,v){return X.array(X.unknown()).transform((U)=>{let B=[];for(let[K,de]of U.entries()){let pe=c.safeParse(de);if(pe.success){B.push(pe.data);let me=w?.(de,pe.data);if(me!==void 0)T({path:`${i}[${K}]`,message:me,statusOnly:!0})}else{let me=pe.error.issues[0],Ae=me===void 0?"failed validation":me.path.length?`${me.path.join(".")}: ${me.message}`:me.message;T({path:`${i}[${K}]`,message:`Invalid entry was ignored: ${Ae}`,...v?.invalidEntryIsStatusOnly&&{statusOnly:!0}})}}if(U.length>0&&B.length===0)T({path:i,message:`Every entry of "${i}" was invalid; enforcing an empty allowlist (${D}) until it is fixed.`});return B}).optional().catch(()=>(T({path:i,message:`"${i}" was present but invalid; enforcing an empty allowlist (${D}) until it is fixed.`}),[]))}var us=e(()=>new Map(Hn().flatMap(({path:i,restrictive:c})=>i.length>1?[[i.join("."),So(c)[0]]]:[]))),qo=["soft_deny","hard_deny","deny"],u7=new Map([["permissions",{restrictions:["deny","ask"],grants:["allow","additionalDirectories","defaultMode"]}],["autoMode",{restrictions:qo,grants:["allow","environment"],withholdOnEntryDrop:!0}],["sandbox.network",{restrictions:["deniedDomains"],grants:["allowedDomains"],withholdOnEntryDrop:!0}],["sandbox.filesystem",{restrictions:["denyWrite","denyRead"],grants:["allowWrite","allowRead"],withholdOnEntryDrop:!0}]]),hl=new Map([["permissions.defaultMode",{read:(i)=>{let c=es(i);return[...ur,...Pc(cs())].find((T)=>T===c)},inert:new Set(["default","dontAsk","plan"]),floor:"default"}]]);function Yc(i,c,T,D){let w=[],v=u7.get(i);if(v===void 0)return w;let U=v.restrictions.flatMap((K)=>{switch(T(K)){case"unreadable":return[`"${K}"`];case"trimmed":return v.withholdOnEntryDrop?[`an entry of "${K}"`]:[];case void 0:return[]}});if(U.length===0)return w;let B=U.join(" and ");for(let K of v.grants){let de=hl.get(`${i}.${K}`),pe=de===void 0?c[K]:de.read(c[K]);if(pe===void 0||de?.inert.has(pe)===!0)continue;if(de===void 0)delete c[K];else c[K]=de.floor,w.push(K);D({path:`${i}.${K}`,message:de===void 0?`"${K}" was withheld because ${B} in the same block could not be read; it takes effect again once that is fixed.`:`"${K}" was withheld because ${B} in the same block could not be read; treating it as ${ai(de.floor)} until that is fixed.`,...de!==void 0&&{substituted:!0}})}return w}function ul(i){for(let c of us().keys())if(c.startsWith(`${i}.`))return!0;return!1}function Sl(i){return i!=="sandbox.credentials"&&!i.startsWith("sandbox.credentials.")&&ul(i)}function Xc(i){let c=i;while(c instanceof X.ZodOptional||c instanceof $d||c instanceof X.ZodPipe)c=c instanceof X.ZodPipe?c.out:c.unwrap();return c instanceof X.ZodObject?c:void 0}var Lh=new Set(["remoteTools","remoteControl"]);function Kh(i,c){return typeof c==="object"&&c!==null&&i.has(c)}function jh(i,c,T){let D={};for(let[w,v]of Object.entries(c.shape)){let U=`${i}.${w}`;if(T?.has(U))continue;let B=us().get(U),K=Xc(v);if(B!==void 0)D[w]=B;else if(K!==void 0&&ul(U))D[w]=jh(U,K,T)}return D}function Ih(i,c){return{path:i,message:`"${c}" was null, which is read as key removal; this source does not set it.`,statusOnly:!0,removal:!0}}function ai(i){return typeof i==="string"?`"${i}"`:String(i)}function ii(i,c=0){let T=i===void 0||i.input===void 0?"failed validation":i.code==="custom"&&i.message!==void 0?i.message:("expected"in i)&&typeof i.expected==="string"?`expected ${i.expected}`:("values"in i)&&Array.isArray(i.values)?`expected ${i.values.map(ai).join(" or ")}`:"failed validation",D=(i?.path??[]).slice(c);if(D.length===0)return T;return D.every((w)=>typeof w==="number")?`${D.join(".")}: ${T}`:`nested value: ${T}`}function $h(i){return i===!1||i==="false"}function Jc(i,c){if(c===null)return!0;return(i.includes(".")?us().get(i):jc().find((D)=>D.key===i)?.restrictive)==="disable"&&$h(c)}function Uc(i,c,T,D){let w=i.slice(i.lastIndexOf(".")+1);if(typeof c==="boolean")return X.preprocess((v)=>{let U=ds(v);if(U!==v)D({path:i,message:`"${w}" holds the string "${String(U)}" where a boolean belongs; reading it as ${String(U)}. Write it without quotes.`,statusOnly:!0});return U},T);if(c==="disable")return X.preprocess((v)=>{if($h(v)){D({path:i,message:`"${w}" was set to false; reading it as absent (the key's only value is "disable"). Remove the key instead.`,statusOnly:!0,removal:!0});return}return v},T);return T}function p7(i,c,T,D,w,v,U){let B=i.slice(i.lastIndexOf(".")+1),K=us().get(i),de=U?void 0:K,pe=hl.get(i),me=c instanceof X.ZodCatch?c.unwrap():void 0,Ae=me instanceof X.ZodType?me:c;return Uc(i,K,Ae,T).catch((Re)=>{if(de!==void 0)return T({path:i,message:`"${B}" was present but invalid (${ii(Re.issues[0])}); treating it as ${ai(de)}, its restrictive value, until it is fixed.`,substituted:!0}),D.add(B),de;if(pe!==void 0)return T({path:i,message:`"${B}" was present but invalid (${ii(Re.issues[0])}); treating it as ${ai(pe.floor)} until it is fixed.`,substituted:!0}),D.add(B),pe.floor;if(Ae.safeParse([]).success){let xe=Re.value;if(Array.isArray(xe)){let ke=new Map;for(let Fe of Re.issues){let $e=Fe.path?.[0];if(typeof $e==="number"&&!ke.has($e))ke.set($e,ii(Fe,1))}let Te=Ae.safeParse(xe.filter((Fe,$e)=>!ke.has($e)));if(ke.size>0&&ke.size<xe.length&&Te.success){for(let[Fe,$e]of ke)T({path:`${i}[${Fe}]`,message:`Invalid entry was ignored (${$e}); it cannot take effect until it is fixed.`});return v.add(B),Te.data}}}T({path:i,message:K===void 0?`"${B}" was present but invalid (${ii(Re.issues[0])}) and was ignored; it cannot take effect until it is fixed.`:`"${B}" was present but invalid (${ii(Re.issues[0])}) and was ignored, not treated as ${ai(K)}; it cannot take effect until it is fixed.`}),w.add(B);return})}function Hc(i,c,T,D={}){let w=i.slice(i.lastIndexOf(".")+1),v=new Set,U=new Set,B=new Set,K={};for(let[me,Ae]of Object.entries(c.shape)){let Pe=`${i}.${me}`,Re=Xc(Ae);K[me]=D.override?.[Pe]??(Re!==void 0&&ul(Pe)?Hc(Pe,Re,T,{...D,strictField:Ae}):p7(Pe,Ae,T,v,U,B,D.neverSubstitute?.has(Pe)===!0))}let de=new Set([...D.skeletonExclude??[],...D.neverSubstitute??[]]),pe=c.safeExtend(K);return X.unknown().transform((me)=>{if(me===null){T(Ih(i,w));return}v.clear(),U.clear(),B.clear();let Ae=n(me)||D.strictField===void 0?void 0:D.strictField.safeParse(me),Pe=Ae?.success===!0&&n(Ae.data)?Ae.data:me,Re=n(Pe)?pe.safeParse(cr(Pe,(Fe)=>Fe===null||Fe===void 0)):void 0;if(!n(Pe)||Re?.success!==!0){let Fe=jh(i,c,de),$e=Object.keys(Fe);if(T({path:i,message:$e.length>0?`"${w}" was present but not an object; treating its locks as their restrictive values (${$e.join(", ")}) until it is fixed.`:`"${w}" was present but not an object and was ignored; it cannot take effect until it is fixed.`,...$e.length>0&&{substituted:!0}}),$e.length===0)return;if(!Lh.has(i))D.synthesized?.add(Fe);return Fe}for(let[Fe,$e]of Object.entries(Pe)){let ot=`${i}.${Fe}`;if($e===null&&(us().has(ot)||ul(ot)))T(Ih(ot,Fe))}let xe={...Re.data};for(let Fe of Yc(i,xe,($e)=>U.has($e)?"unreadable":B.has($e)?"trimmed":void 0,T))v.add(Fe);let ke=cr(xe,(Fe)=>Fe===void 0);if(Object.keys(ke).length===0)return Object.entries(Pe).some(([Fe,$e])=>$e!==void 0&&Object.hasOwn(c.shape,Fe))?void 0:ke;let Te=D.synthesized;if(Te!==void 0&&!Lh.has(i)&&Object.entries(ke).every(([Fe,$e])=>v.has(Fe)||Kh(Te,$e)||ci($e)))Te.add(ke);return ke}).optional()}function Zc(i,c,T){let D=gl(),w=(Le)=>c7.has(Le)||D.carries(T,Le),v=(Le)=>{let De=D.field(Le);if(!De)throw Error("policyTolerantSettingsSchema: not a settings field of this build");return De},U=new Map,B=(Le,De)=>{U.set(Le,De)};for(let Le of["prependPlugins","appendPlugins"])if(D.has(Le))B(Le,()=>X.array(X.string()).optional().catch((De)=>{i({path:Le,message:`${De.issues[0]?.message??"Failed schema validation"}. This field was ignored; read as unset.`});return}));B("wslInheritsWindowsSettings",()=>X.union([X.null().transform(()=>{return}),X.preprocess((Le)=>{let De=ds(Le);if(De!==Le)i({path:"wslInheritsWindowsSettings",message:`"wslInheritsWindowsSettings" holds the string "${String(De)}" where a boolean belongs; reading it as ${String(De)}. Write it without quotes.`,statusOnly:!0});return De},v("wslInheritsWindowsSettings"))]).optional().catch(()=>{i({path:"wslInheritsWindowsSettings",message:`"wslInheritsWindowsSettings" was present but invalid (it takes true or false), so this source's WSL opt-in cannot be read until it is fixed. WSL fails it closed: in an administrator source it arms the Windows policy chain with no user-writable source (/etc/claude-code, HKCU) read beneath it; in HKCU it leaves HKCU unapplied.`});return})),B("strictKnownMarketplaces",()=>Th("strictKnownMarketplaces",i).catch(()=>(i({path:"strictKnownMarketplaces",message:'"strictKnownMarketplaces" was present but invalid; enforcing an empty allowlist (no marketplaces admitted) until it is fixed.'}),[]))),B("blockedMarketplaces",()=>Th("blockedMarketplaces",i).catch(()=>{i({path:"blockedMarketplaces",message:'"blockedMarketplaces" was present but invalid and was dropped; its entries cannot be enforced until it is fixed.'});return})),B("allowedMcpServers",()=>Dh("allowedMcpServers",fl(),i).catch(()=>(i({path:"allowedMcpServers",message:'"allowedMcpServers" was present but invalid; enforcing an empty allowlist (no MCP servers admitted) until it is fixed.'}),[]))),B("deniedMcpServers",()=>Dh("deniedMcpServers",ml(),i).catch(()=>{i({path:"deniedMcpServers",message:'"deniedMcpServers" was present but invalid and was dropped; its entries cannot be enforced until it is fixed.'});return})),B("managedMcpServers",()=>X.unknown().transform((Le)=>Ja(Le,(De,ze)=>i({path:De?`managedMcpServers.${De}`:"managedMcpServers",message:De?`Managed MCP server was ignored: ${ze}`:ze,statusOnly:!0}))).optional());let K=new Set;for(let{key:Le,restrictive:De,field:ze}of jc()){let it=typeof De==="string"?`"${De}"`:String(De);B(Le,()=>X.union([X.null().transform(()=>{return}),Uc(Le,De,ze,i)]).optional().catch(()=>(i({path:Le,message:`"${Le}" was present but invalid; treating it as ${it} (its restrictive value) until it is fixed.`,substituted:!0}),K.add(Le),De)))}B("strictPluginOnlyCustomization",()=>X.union([X.null().transform(()=>{return}),Hh((Le)=>i({path:"strictPluginOnlyCustomization",message:`"strictPluginOnlyCustomization" lists ${Le} ${se(Le,"entry","entries")} this version does not recognize as a surface (known: ${li.join(", ")}); an unrecognized entry locks nothing, so check it for a typo.`,statusOnly:!0}))]).optional().catch(()=>(i({path:"strictPluginOnlyCustomization",message:'"strictPluginOnlyCustomization" was present but invalid; treating it as true (skills, agents, hooks and MCP servers load from managed settings and plugins only) until it is fixed.',substituted:!0}),K.add("strictPluginOnlyCustomization"),!0))),B("enabledPlugins",()=>{let Le=Fh();return X.record(X.string(),X.unknown()).transform((De)=>{let ze=[],it=0;for(let[dt,gt]of Object.entries(De)){let ct=Le.safeParse(gt);if(ct.success){ze.push([dt,ct.data]);continue}it++,i({path:ls().safeParse(dt).success?`enabledPlugins.${dt}`:"enabledPlugins.<invalid id>",message:"Invalid entry was ignored: the value must be true, false, or a list of version constraints. This plugin is neither force-enabled nor blocked until it is fixed."})}if(it>0&&ze.length===0){i({path:"enabledPlugins",message:'Every entry of "enabledPlugins" was invalid; no plugin is force-enabled or blocked by it until it is fixed.'});return}return Object.fromEntries(ze)}).optional().catch(()=>{i({path:"enabledPlugins",message:'"enabledPlugins" was present but invalid (not a map of plugin ids) and was ignored; no plugin is force-enabled or blocked by it until it is fixed.'});return})}),B("availableModels",()=>X.array(X.unknown()).transform((Le)=>{let De=[];for(let ze of Le)if(typeof ze==="string")De.push(ze);else i({path:"availableModels",message:`"availableModels" contained a non-string entry (${JSON.stringify(ze)}); the entry was ignored.`});return De}).optional().catch(()=>(i({path:"availableModels",message:'"availableModels" was present but invalid; enforcing an empty allowlist (only the default model is available) until it is fixed.'}),[]))),B("deniedModels",()=>X.array(X.unknown()).transform((Le)=>{let{entries:De,notes:ze}=Pt(Le);for(let it of ze)i({path:"deniedModels",message:it});return De}).optional().catch(()=>{i({path:"deniedModels",message:It});return})),B("allowedHttpHookUrls",()=>ll("allowedHttpHookUrls",X.string(),i,"no HTTP hooks may run")),B("httpHookAllowedEnvVars",()=>ll("httpHookAllowedEnvVars",X.string(),i,"no environment variables may be interpolated into HTTP hook headers")),B("allowedChannelPlugins",()=>ll("allowedChannelPlugins",M8(),i,"no channel plugins admitted",(Le,De)=>typeof Le==="string"?`"allowedChannelPlugins" entry "${Le}" was accepted; prefer the documented object form {"plugin": "${De.plugin}", "marketplace": "${De.marketplace}"}.`:void 0)),B("gatewayInternalNetworks",()=>X.array(X.string()).optional().catch(()=>(i({path:"gatewayInternalNetworks",message:'"gatewayInternalNetworks" was present but invalid; gateway sign-in governed by this source is refused until it is fixed.'}),[Wh]))),B("forceLoginOrgUUID",()=>v("forceLoginOrgUUID").catch(()=>(i({path:"forceLoginOrgUUID",message:'"forceLoginOrgUUID" was present but invalid; no organization is permitted to log in until it is fixed.'}),[]))),B("allowedProviders",()=>ll("allowedProviders",X.custom(rc,{message:`not a known provider name (${ei.join(", ")})`}),i,"no API provider may be used, so Claude Code will not start on this machine",void 0,{invalidEntryIsStatusOnly:!0}));let de=!1,pe=(Le,De)=>{let ze=Le.safeParse(De);if(ze.success)return;return ze.error.issues.slice(0,3).map((it)=>it.path.length?`${it.path.join(".")}: ${it.message}`:it.message).join("; ")},me;B("policyHelper",()=>X.preprocess((Le)=>{if(de=!1,me=Le,Le&&typeof Le==="object"&&!Array.isArray(Le)){let De=Le;for(let ze of["defaultSettings","default",...dl])if(De[ze]!==void 0&&De[ze]!==null)i({path:"policyHelper",message:`"${ze}" on the singular policyHelper is ignored — static fallback payloads belong on the policyHelpers per-OS entries ("defaultSettings") or the map's "default" key. The intended fallback will NOT apply from here.`,statusOnly:!0});for(let ze of["policyHelper","policyHelpers"])if(De[ze]!==void 0&&De[ze]!==null)i({path:"policyHelper",message:`"${ze}" inside the singular policyHelper is ignored — "policyHelper" and "policyHelpers" are TOP-LEVEL settings keys; nothing nests inside the singular entry. The nested config will NOT apply from here.`,statusOnly:!0});for(let ze of mn)if(De[ze]!==void 0&&De[ze]!==null)i({path:"policyHelper",message:`"${ze}" on the singular policyHelper is ignored — per-OS entries live on the policyHelpers MAP ("policyHelpers": {"${ze}": ...}), not inside the singular key. The intended per-OS config will NOT apply from here.`,statusOnly:!0});if(De.claudeMd!==void 0&&De.claudeMd!==null)i({path:"policyHelper",message:`"claudeMd" on the singular policyHelper is ignored — "claudeMd" is a managed-settings key: put it at the settings top level or inside a static payload, or emit it from the helper's stdout envelope. The intended instructions will NOT apply from here.`,statusOnly:!0});if(De.outputBehavior!==void 0&&De.outputBehavior!==null)i({path:"policyHelper",message:`"outputBehavior" on the singular policyHelper is ignored — it is only honored on the policyHelpers per-OS entries (policyHelpers.${mn.join("/")}); this helper's output REPLACES the policy tier whatever the value says.`,statusOnly:!0});if(De.onFailure!==void 0&&De.onFailure!==null)i({path:"policyHelper",message:`"onFailure" on the singular policyHelper is ignored — it is only honored on the policyHelpers per-OS entries (policyHelpers.${mn.join("/")}); a failure of this helper REFUSES to start Claude Code whatever the value says.`,statusOnly:!0});if(De.retries!==void 0&&De.retries!==null)i({path:"policyHelper",message:`"retries" on the singular policyHelper is ignored — it is only honored on the policyHelpers per-OS entries (policyHelpers.${mn.join("/")}); this helper is run ONCE per start or refresh, never re-run, whatever the value says.`,statusOnly:!0});if(De.path===null||De.path===void 0)de=!0}return Le===null?void 0:Le},cl().optional()).catch((Le)=>{i({path:"policyHelper",message:`${Le.issues[0]?.message??pe(cl(),me)??"Failed schema validation"}. This field was ignored.`,...de&&{statusOnly:!0}});return}));let Ae=(Le,De)=>{i({path:Le,message:`"${Le}" is not a valid static settings payload: ${De??"failed validation"}. When delivered from an OS-admin policy source (MDM or the managed settings file), Claude Code will not start until this is fixed.`,startupFatal:!0})},Pe=[],Re=(Le)=>{let De=!1,ze,it=Mc(Le,Sr().optional().catch((dt)=>{De=!0,Ae(`policyHelpers.${Le}.defaultSettings`,dt.issues[0]?.message??pe(Sr(),ze&&typeof ze==="object"&&!Array.isArray(ze)?ze.defaultSettings:void 0));return}));return X.preprocess((dt)=>{if(De=!1,ze=dt,Le!=="default"&&dt&&typeof dt==="object"&&!Array.isArray(dt)){let gt=dt;for(let bt of[...dl,"claudeMd"])if(gt[bt]!==void 0&>[bt]!==null)i({path:`policyHelpers.${Le}`,message:`"${bt}" on the policyHelpers.${Le} entry is ignored — helper output cannot be pre-seeded on an entry; a static fallback payload goes under this entry's "defaultSettings" (a managed-settings object). The intended content will NOT apply from here.`,statusOnly:!0});for(let bt of["policyHelper","policyHelpers"])if(gt[bt]!==void 0&>[bt]!==null)i({path:`policyHelpers.${Le}`,message:`"${bt}" on the policyHelpers.${Le} entry is ignored — "policyHelper" and "policyHelpers" are TOP-LEVEL settings keys; nothing nests inside an entry. The nested config will NOT apply from here.`,statusOnly:!0});for(let bt of mn)if(gt[bt]!==void 0&>[bt]!==null)i({path:`policyHelpers.${Le}`,message:`"${bt}" on the policyHelpers.${Le} entry is ignored — per-OS entries are SIBLINGS on the policyHelpers map, not nested inside each other. The intended ${bt} config will NOT apply from here.`,statusOnly:!0});if(gt.default!==void 0&>.default!==null)i({path:`policyHelpers.${Le}`,message:`"default" on the policyHelpers.${Le} entry is ignored — the per-entry static payload field is spelled "defaultSettings"; "default" is the MAP's any-platform catch-all key (a sibling of the OS entries). The intended fallback will NOT apply from here.`,statusOnly:!0});let ct=gt.onFailure;if(ct!==void 0&&ct!==null&&!Mh(ct)){let bt;if(typeof ct==="string"){let Nn=ct.replace(/[^\x20-\x7e]/gu,"?");bt=JSON.stringify(Nn.length>Ah?`${Nn.slice(0,Ah-1)}…`:Nn)}else if(typeof ct==="number"||typeof ct==="boolean")bt=String(ct);else bt=`a non-string value (${Array.isArray(ct)?"array":typeof ct})`;i({path:`policyHelpers.${Le}.onFailure`,message:`"onFailure": ${bt} on the policyHelpers.${Le} entry is not a recognized value ("continue" or "refuse"); it is treated as "refuse" — a startup failure of this entry's helper with no static payload in its place will not start Claude Code.`,statusOnly:!0})}if(kh(dt))return}return dt===null?void 0:dt},it.optional()).catch((dt)=>{if(Le==="default"){Ae("policyHelpers.default",dt.issues[0]?.message??pe(Sr(),ze));return}if(De)return;let gt=pe(Mc(Le),ze)??"failed validation",ct=ze,bt=ct&&typeof ct==="object"&&!Array.isArray(ct)?ct:null,Nn=bt?.onFailure,Ao=Nn!==void 0&&Nn!==null&&Nn!=="continue",$t=(on)=>{let lo=`policyHelpers.${Le}`;if(Ao)Pe.push({entryKey:Le,message:on});else i({path:lo,message:on,statusOnly:!0})};if(bt){let on=bt.defaultSettings;if(on!==void 0&&on!==null){let lo=Sr().safeParse(on);if(lo.success){let co=bt.outputBehavior,bn=co===void 0||co===null?null:vh().safeParse(co);if(bn&&!bn.success){$t(`Invalid entry was ignored: ${gt}. Its "defaultSettings" static payload was NOT kept: "outputBehavior" is unrecognized, so whether the payload replaces or merges over this source's settings is unknown. No policy helper runs on ${Le} from this entry.`);return}return i({path:`policyHelpers.${Le}`,message:`Invalid entry: its helper fields were ignored (${gt}), but its "defaultSettings" static payload was kept. No policy helper runs on ${Le} from this entry.`,statusOnly:!0}),{defaultSettings:lo.data,...bn&&{outputBehavior:bn.data}}}}}$t(`Invalid entry was ignored: ${gt}. No policy helper runs on ${Le} from this entry.`);return})};B("policyHelpers",()=>X.preprocess((Le)=>{if(Pe=[],Le&&typeof Le==="object"&&!Array.isArray(Le)){let De=Le;for(let ze of["defaultSettings",...dl,"claudeMd"])if(De[ze]!==void 0&&De[ze]!==null)i({path:"policyHelpers",message:`"${ze}" directly on the policyHelpers map is ignored — static fallback payloads go on a per-OS entry's "defaultSettings" or the map's "default" key (a managed-settings object), and helper-output keys come from the helper's stdout. The intended content will NOT apply from here.`,statusOnly:!0});for(let ze of["policyHelper","policyHelpers"])if(De[ze]!==void 0&&De[ze]!==null)i({path:"policyHelpers",message:`"${ze}" inside the policyHelpers map is ignored — "policyHelper" and "policyHelpers" are TOP-LEVEL settings keys; the map's keys are the per-OS entries and "default". The nested config will NOT apply from here.`,statusOnly:!0});for(let ze of vc.filter((it)=>it!=="defaultSettings"))if(De[ze]!==void 0&&De[ze]!==null){let it=ze==="script"||ze==="interpreter"?"; inline scripts are per-OS only (the singular policyHelper key takes a path)":ze==="outputBehavior"||ze==="onFailure"||ze==="retries"?"":", or on the singular policyHelper key";i({path:"policyHelpers",message:`"${ze}" directly on the policyHelpers map is ignored — helper configs go on a per-OS entry (policyHelpers.${mn.join("/")})${it}. No helper runs from this field here.`,statusOnly:!0})}}return Le===null?void 0:Le},X.object(Object.fromEntries(Kc.map((Le)=>[Le,Re(Le)]))).transform((Le)=>{for(let De of Object.keys(Le))if(Le[De]===void 0)delete Le[De];for(let{entryKey:De,message:ze}of Pe){let it=`policyHelpers.${De}`,dt=Wc(De).find((ct)=>Le[ct]?.defaultSettings!==void 0&&Le[ct]?.defaultSettings!==null),gt=dt!==void 0?`${dt}.defaultSettings`:Le.default!==void 0?"default":null;i(gt!==null?{path:it,message:`${ze} Its "onFailure" requires the helper; the "policyHelpers.${gt}" static payload serves in its place.`,statusOnly:!0}:{path:it,message:`${ze} Its "onFailure" requires the helper, so when delivered from an OS-admin policy source (MDM or the managed settings file), Claude Code will not start until this is fixed.`,startupFatal:!0})}return Pe=[],Le}).optional().catch((Le)=>(i({path:"policyHelpers",message:`"policyHelpers" could not be parsed: expected an object mapping OS keys (${mn.join(", ")}) to helper entries, plus an optional "default" settings payload (${Le.issues[0]?.message??"failed schema validation"}). When delivered from an OS-admin policy source (MDM or the managed settings file), Claude Code will not start until this is fixed.`,startupFatal:!0}),{}))));let xe=new WeakSet;for(let Le of D.keys){if(Le==="sandbox"||!Sl(Le))continue;B(Le,()=>{let De=v(Le),ze=Xc(De);if(ze===void 0)return De.catch((it)=>{i({path:Le,message:`${it.issues[0]?.message??"Failed schema validation"}. This field was ignored.`});return});return Hc(Le,ze,i,{synthesized:xe,strictField:De})})}let ke=Object.freeze({mode:"deny"}),Te=Object.freeze({accessKeyIdVar:"_STRIPPED_",secretAccessKeyVar:"_STRIPPED_2_"}),Fe=0,$e=[],ot=new Set,ft=new Set,ut=c===void 0?"":`${[...c].reduce((Le,De)=>Math.imul(Le^De.charCodeAt(0),16777619)>>>0,2166136261).toString(16).toUpperCase().padStart(8,"0")}_`,st=(Le,De)=>{if(typeof Le!=="object"||Le===null)return;let ze=(Nt)=>De.some((uo)=>uo.path?.includes(Nt)),it=(Nt)=>{let uo=Le[Nt];if(typeof uo==="string")return uo;return ze(Nt)?"":void 0},dt=it("accessKeyIdVar"),gt=it("secretAccessKeyVar"),ct=it("sessionTokenVar"),bt=Vo;if(![dt,gt,ct].some((Nt)=>Nt!==void 0&&bt.includes(Nt)))return;let Nn=(Nt)=>Nt!==void 0&&Qr().safeParse(Nt).success;Fe+=1;let Ao=(Nt)=>`${jd}${Nt}_${ut}${Fe}_`,$t=Nn(dt)?dt:Ao("ACCESS_KEY_ID"),on=Nn(gt)&>!==$t?gt:Ao("SECRET_ACCESS_KEY"),lo=ct===void 0?void 0:Nn(ct)&&ct!==$t&&ct!==on?ct:Ao("SESSION_TOKEN"),co=(Nt)=>Nt.startsWith(jd);if(!co($t)&&!co(on)){let Nt=bt.includes(on)?on:void 0;if(on=Ao("SECRET_ACCESS_KEY"),Nt!==void 0){let uo=st({accessKeyIdVar:Nt},[]);if(uo!==void 0)$e.push(uo)}}let bn=Va().safeParse({accessKeyIdVar:$t,secretAccessKeyVar:on,...lo!==void 0&&{sessionTokenVar:lo}});return bn.success?bn.data:void 0},yt=(Le,De,ze)=>X.array(De.catch((it)=>{let dt=ze(it.value);if(dt!==void 0)return i({path:`sandbox.credentials.${Le}[]`,message:`Invalid entry was degraded to mode "deny": ${it.issues[0]?.message??"failed validation"}. The credential stays blocked (not masked) until the entry is fixed.${Le==="files"?" Under sandbox.filesystem.disabled, file read-denies are not enforced.":""}`,substituted:!0}),dt;return i({path:`sandbox.credentials.${Le}[]`,message:`Invalid entry was ignored: ${it.issues[0]?.message??"failed validation"}. This credential is NOT protected until the entry is fixed.`}),ke})).transform((it)=>{let dt=it.filter((gt)=>gt!==ke);if(it.length>0&&dt.length===0)ot.add(Le);return dt}).optional().catch((it)=>{if(typeof it.value==="object"&&it.value!==null&&!Array.isArray(it.value)){let dt=De.safeParse(it.value);if(dt.success)return i({path:`sandbox.credentials.${Le}`,message:`"${Le}" must be an array; a lone entry object was accepted as a one-element list. Wrap it in [ ] to silence this warning.`}),[dt.data];let gt=ze(it.value);if(gt!==void 0)return i({path:`sandbox.credentials.${Le}`,message:`"${Le}" must be an array; its lone entry object was invalid and was degraded to mode "deny". The credential stays blocked (not masked) until it is fixed.`,substituted:!0}),[gt]}return i({path:`sandbox.credentials.${Le}`,message:`${it.issues[0]?.message??"Invalid value"}. "${Le}" was ignored; these credential entries are NOT protected until it is fixed.`}),ot.add(Le),[]});B("sandbox",()=>{let Le=X.object({files:yt("files",Ka(),(De)=>{if(typeof De!=="object"||De===null||!("mode"in De)||De.mode!=="mask"&&De.mode!=="deny"||!("path"in De)||typeof De.path!=="string")return;let ze=Ka().safeParse({path:De.path,mode:"deny"});return ze.success?ze.data:void 0}),envVars:yt("envVars",ja(),(De)=>{if(typeof De!=="object"||De===null||!("mode"in De)||De.mode!=="mask"&&De.mode!=="deny"||!("name"in De)||typeof De.name!=="string")return;let ze=ja().safeParse({name:De.name,mode:"deny"});return ze.success?ze.data:void 0}),allowPlaintextInject:Uc("sandbox.credentials.allowPlaintextInject",us().get("sandbox.credentials.allowPlaintextInject"),X.boolean().optional(),i).catch((De)=>(i({path:"sandbox.credentials.allowPlaintextInject",message:`${De.issues[0]?.message??"Invalid value"}. "allowPlaintextInject" was degraded to an explicit false; plaintext credential injection stays disabled (lower-precedence values cannot enable it) until it is fixed.`,substituted:!0}),ot.add("allowPlaintextInject"),!1)),awsPairs:X.array(Va().catch((De)=>{let ze=st(De.value,De.issues);if(ze!==void 0)return i({path:"sandbox.credentials.awsPairs[]",message:`Invalid pair was degraded to a non-functional suppressor: ${De.issues[0]?.message??"failed validation"}. It keeps implicit AWS auto-pairing suppressed but re-signs nothing until it is fixed.`,substituted:!0}),ze;return i({path:"sandbox.credentials.awsPairs[]",message:`Invalid pair was ignored: ${De.issues[0]?.message??"failed validation"}. SigV4 re-signing stays unconfigured for this pair until it is fixed.`}),Te})).transform((De)=>{let ze=De.filter((it)=>it!==Te);if($e.length>0)ze.push(...$e),$e.length=0;if(De.length>0&&ze.length===0)ot.add("awsPairs");return ze}).optional().catch((De)=>{let ze=typeof De.value==="object"&&De.value!==null?st(De.value,[]):void 0,it=typeof De.value==="object"&&De.value!==null&&(("accessKeyIdVar"in De.value)||("secretAccessKeyVar"in De.value)||("sessionTokenVar"in De.value));if(ze===void 0&&it)return $e.length=0,i({path:"sandbox.credentials.awsPairs",message:`${De.issues[0]?.message??"Invalid value"}. "awsPairs" must be an array; its lone pair-shaped entry claimed no conventional AWS name and was ignored. SigV4 re-signing stays unconfigured until it is fixed.`}),ot.add("awsPairs"),[];let dt=ze!==void 0?[ze]:Vo.flatMap((gt)=>{let ct=st({accessKeyIdVar:gt},[]);return ct!==void 0?[ct]:[]});if($e.length>0)dt.push(...$e),$e.length=0;if(ze===void 0)ot.add("awsPairs");return i({path:"sandbox.credentials.awsPairs",message:`${De.issues[0]?.message??"Invalid value"}. "awsPairs" was degraded to non-functional suppressor pair(s); implicit AWS auto-pairing stays suppressed but nothing re-signs until it is fixed.`,substituted:!0}),dt}),sigv4:X.object(Object.fromEntries(["streaming","presigned","sigv4a"].map((De)=>[De,X.enum(["deny","passthrough"]).optional().catch((ze)=>(i({path:`sandbox.credentials.sigv4.${De}`,message:`${ze.issues[0]?.message??"Invalid value"}. "${De}" was degraded to an explicit deny; this SigV4 request shape stays denied until it is fixed.`,substituted:!0}),ft.add(De),"deny"))]))).transform((De)=>{let ze=Object.entries(De).filter(([,it])=>it!==void 0);if(ze.length>0&&ze.every(([it])=>ft.has(it)))ot.add("sigv4");return ft.clear(),De}).optional().catch((De)=>(i({path:"sandbox.credentials.sigv4",message:`${De.issues[0]?.message??"Invalid value"}. "sigv4" was degraded to an all-deny block (all shapes stay denied, and lower-precedence sigv4 values cannot take effect) until it is fixed.`,substituted:!0}),ft.clear(),ot.add("sigv4"),{streaming:"deny",presigned:"deny",sigv4a:"deny"}))}).transform((De)=>{let ze=Object.entries(De).filter(([,it])=>it!==void 0);if(ze.length>0&&ze.every(([it])=>ot.has(it)))xe.add(De);return ot.clear(),De}).optional().catch((De)=>{i({path:"sandbox.credentials",message:`${De.issues[0]?.message??"Failed schema validation"}. The credentials block was degraded to a fail-closed skeleton (all-deny sigv4, implicit AWS auto-pairing suppressed, no masking) until it is fixed.`,substituted:!0});let ze=Vo.flatMap((dt)=>{let gt=st({accessKeyIdVar:dt},[]);return gt!==void 0?[gt]:[]});$e.length=0,ot.clear(),ft.clear();let it={allowPlaintextInject:!1,awsPairs:ze,sigv4:{streaming:"deny",presigned:"deny",sigv4a:"deny"}};return xe.add(it),it});return Hc("sandbox",Ya(),i,{override:{"sandbox.credentials":Le},skeletonExclude:new Set(["sandbox.enabled"]),neverSubstitute:new Set(["sandbox.failIfUnavailable"]),synthesized:xe})});let Lt={};for(let Le of D.keys){if(!w(Le))continue;let De=U.get(Le);Lt[Le]=De?De():v(Le).catch((ze)=>{i({path:Le,message:`${ze.issues[0]?.message??"Failed schema validation"}. This field was ignored.`});return})}for(let[Le,De]of U)if(!(Le in Lt)&&w(Le))Lt[Le]=De();return X.object(Lt).passthrough().check((Le)=>{Le.issues.push(...D.wrongDocumentIssues(Le.value,Lt))}).transform((Le)=>{for(let it of Object.keys(Le))if(Le[it]===void 0)delete Le[it];let De=Object.keys(Le).filter((it)=>!Zo.some((dt)=>dt===it)&&!ci(Le[it])),ze=De.length>0&&De.every((it)=>K.has(it)||Kh(xe,Le[it]));if(K.clear(),ze)for(let it of De)i({path:it,message:`"${it}" holds nothing that could be applied as written and is this source's only policy content; its fail-closed reading binds (beside a lower managed settings source's policy, when one supplies it) until it is fixed.`,statusOnly:!0,onlySubstitutes:!0});return Le})}var qc=65536,Vh=new RegExp(`[${Gn("<")}]`,"gu");function f7(i){return f_(i)&&i.search(Vh)===-1}function ui(i){let c={},T=qc,D=0,w=new Set,v=0;for(let U of qo.toSorted((B,K)=>Number(K==="hard_deny")-Number(B==="hard_deny"))){let B=n(i)?i[U]:void 0;if(B!==void 0&&B!==null&&!Array.isArray(B))D++,w.add(U);let K=[$o];for(let de of Array.isArray(B)?B:[]){if(typeof de!=="string"){D++,w.add(U);continue}if(["",$o].includes(de.trim()))continue;let pe=de.length>2*T?1/0:en(de);if(pe>T){D++,w.add(U);continue}T-=pe;let Ae=Array.from(Fn(de),(Re)=>za(Re)||Ga(Re)?" ":Re).join("").replace(Vh,"<");if(Ae.trim()===$o)continue;let Pe=en(Ae)-pe;if(!f7(Ae)||Pe>T){if(D++,Ae.trim()!=="")w.add(U);continue}if(T-=Pe,K.push(Ae),Ae!==de)v++}if(K.length>1)c[U]=K}return{lists:c,leftOut:D,listsThatLostARule:w,mended:v}}function m7(i,c,T,D){var w=i.length,v=T+(D?1:-1);while(D?v--:++v<w)if(c(i[v],v,i))return v;return-1}var Yh=m7;function g7(i){return i!==i}var Xh=g7;function _7(i,c,T){var D=T-1,w=i.length;while(++D<w)if(i[D]===c)return D;return-1}var Jh=_7;function E7(i,c,T){return c===c?Jh(i,c,T):Yh(i,Xh,T)}var Zh=E7;function h7(i,c){var T=i==null?0:i.length;return!!T&&Zh(i,c,0)>-1}var qh=h7;function S7(i,c,T){var D=-1,w=i==null?0:i.length;while(++D<w)if(T(c,i[D]))return!0;return!1}var Qh=S7;function y7(){}var eS=y7;var O7=1/0,A7=!(Fo&&1/vr(new Fo([,-0]))[1]==O7)?eS:function(i){return new Fo(i)},tS=A7;var C7=200;function b7(i,c,T){var D=-1,w=qh,v=i.length,U=!0,B=[],K=B;if(T)U=!1,w=Qh;else if(v>=C7){var de=c?null:tS(i);if(de)return vr(de);U=!1,w=Xi,K=new Yi}else K=c?[]:B;e:while(++D<v){var pe=i[D],me=c?c(pe):pe;if(pe=T||pe!==0?pe:0,U&&me===me){var Ae=K.length;while(Ae--)if(K[Ae]===me)continue e;if(c)K.push(me);B.push(pe)}else if(!w(K,me,T)){if(K!==B)K.push(me);B.push(pe)}}return B}var nS=b7;function R7(i,c){return i&&i.length?nS(i,Eo(c,2)):[]}var oS=R7;import{join as Ty}from"path";function rS(){return xn()&&!(Qm()&&Bt.CLAUDE_CODE_SESSION_KIND==="bg")}var T7="tengu_fizzy_widget";class sS{reader=null;register(i){let c=this.reader;return this.reader=i,c}servedTrue(i){let c=this.reader;if(!c)return!1;try{return c(i,!1)===!0}catch{return!1}}}var D7=new sS,pi=a({settled:void 0,answeredOff:!1,answeredOn:!1},(i)=>{i.settled=void 0,i.answeredOff=!1,i.answeredOn=!1});function iS(){if(pi.settled!==void 0)return pi.settled;if(pi.answeredOff)return!1;let i=D7.servedTrue(T7);return pi.answeredOff=!i,pi.answeredOn||=i,i}import{createHash as L7}from"crypto";function fi(i){if(Array.isArray(i))return i.map(fi);if(i!==null&&typeof i==="object"){let c={};for(let T of Object.keys(i).sort())c[T]=fi(i[T]);return c}return i}function yl(i){if(typeof i==="number")return!Number.isFinite(i)||Object.is(i,-0);if(Array.isArray(i))return i.some(yl);if(i===null||typeof i!=="object")return!1;return Object.hasOwn(i,"__proto__")||Object.values(i).some(yl)}function aS(i){let c=fi(i),T=o(c);return`sha256:${L7("sha256").update(T).digest("hex")}`}import*as ps from"zod/v4";import{closeSync as I7,constants as w7,fstatSync as P7,lstatSync as x7,openSync as N7,readSync as k7}from"fs";function lS(i,c,{refuseLinkOnWindows:T}){let D;try{if(T&&ge===0&&!x7(i).isFile())return{kind:"refused"};D=N7(i,w7.O_RDONLY|ge);let w=P7(D);if(!w.isFile()||w.size>c)return{kind:"refused"};let v=Buffer.alloc(w.size),U=k7(D,v,0,w.size,0);return{kind:"ok",text:v.toString("utf-8",0,U)}}catch(w){return _(w)?{kind:"absent"}:{kind:"error",error:w}}finally{if(D!==void 0)try{I7(D)}catch{}}}import{verify as H7,X509Certificate as gS}from"crypto";import*as Ut from"zod/v4";var v7=[85,29,19];function Ol(i,c,T){if(c+2>T)throw Error("DER: truncated element header");let D=i[c];if((D&31)===31)throw Error("DER: high-tag-number form is not supported");let w=i[c+1],v=c+2,U;if(w<128)U=w;else{let K=w&127;if(K===0||K>3||v+K>T)throw Error("DER: unsupported length encoding");U=0;for(let de=0;de<K;de++)U=U*256+i[v+de];if(U<128||K>1&&i[v]===0)throw Error("DER: non-minimal length encoding");v+=K}let B=v+U;if(B>T)throw Error("DER: element overruns its container");return{tag:D,start:v,end:B}}function mi(i,c){let T=[],D=c.start;while(D<c.end){let w=Ol(i,D,c.end);T.push(w),D=w.end}return T}function M7(i,c,T){return c.end-c.start===T.length&&T.every((D,w)=>i[c.start+w]===D)}function Ro(i,c){if(i.tag!==c)throw Error("DER: unexpected tag");return i}function dS(i){let c=Ro(Ol(i,0,i.length),48);if(c.end!==i.length)throw Error("DER: bytes after the Certificate");let T=Ro(Ol(i,c.start,c.end),48),D=mi(i,T).find((K)=>K.tag===163);if(D===void 0)return;let[w,...v]=mi(i,D);if(w===void 0||v.length>0)throw Error("DER: [3] must wrap exactly one Extensions sequence");Ro(w,48);let U,B=!1;for(let K of mi(i,w)){Ro(K,48);let de=mi(i,K),pe=de[0],me=de.at(-1);if(pe===void 0||me===void 0||de.length<2||de.length>3)throw Error("DER: Extension is not { extnID, critical?, extnValue }");if(Ro(pe,6),!M7(i,pe,v7))continue;if(B)throw Error("DER: duplicate basicConstraints extension");if(B=!0,de.length===3)Ro(de[1],1);Ro(me,4);let Ae=Ro(Ol(i,me.start,me.end),48);if(Ae.end!==me.end)throw Error("DER: bytes after BasicConstraints");let Pe=mi(i,Ae),Re=Pe[0]?.tag===1?Pe.slice(1):Pe;if(Re.length>1)throw Error("DER: BasicConstraints has extra members");if(Re[0]!==void 0)Ro(Re[0],2),U=U7(i,Re[0])}return U}function U7(i,c){let T=c.end-c.start;if(T===0)throw Error("DER: empty INTEGER");let D=i[c.start];if(D&128)throw Error("DER: negative pathLenConstraint");if(T>1&&D===0&&!(i[c.start+1]&128))throw Error("DER: non-minimal INTEGER");if((D===0?T-1:T)>2)throw Error("DER: pathLenConstraint out of range");let v=0;for(let U=c.start;U<c.end;U++)v=v*256+i[U];return v}var F7=["enterprise","team","consumer","api","other"];function cS(i){return F7.find((c)=>c===i)??"other"}var _S=Symbol("signed-cache mint");class Qc{#r=!0;kind;state;bodySha;issuedAt;notAfter;plan;organizationUuid;accountUuid;constructor(i,{kind:c,state:T,bodySha:D,issuedAt:w,notAfter:v,plan:U,organizationUuid:B,accountUuid:K}){if(i!==_S)throw TypeError("only the verifier makes a VerifiedStatement");this.kind=c,this.state=T,this.bodySha=D,this.issuedAt=w,this.notAfter=v,this.plan=U,this.organizationUuid=B,this.accountUuid=K,Object.freeze(this)}static isMadeByVerifier(i){return#r in i}}function ES(i){return typeof i==="object"&&i!==null&&Qc.isMadeByVerifier(i)}var B7="sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",z7={"managed-settings":86400,"policy-limits":86400},G7=300,eu=16384,W7=8192,K7=300000,j7=3,$7=3600000,V7=/^[A-Za-z0-9_-]+$/,Y7=/^[A-Za-z0-9+/]+={0,2}$/,X7=e(()=>Ut.object({alg:Ut.literal("ES256"),typ:Ut.literal("cc-signed-cache+jws"),kid:Ut.string(),x5c:Ut.array(Ut.string().regex(Y7)).min(1).max(j7)})),J7=e(()=>Ut.object({v:Ut.literal(1),typ:Ut.string(),aud:Ut.string(),iat:Ut.number(),sha:Ut.string(),sub:Ut.string().optional(),ws:Ut.string().optional(),exp:Ut.int().optional(),abs:Ut.literal(!0).optional(),doc:Ut.string().optional(),plan:Ut.string().optional()})),Z7=e(()=>Ut.object({v:Ut.int().min(2)}));function hS({jws:i,...c}){if(!i)return{result:"unsigned"};let T={};try{let D=q7(i,c,T);if(typeof D==="string")return{result:D,...T};return{...T,result:"valid",issuedAt:D.issuedAt,notAfter:D.notAfter,plan:D.plan,verified:new Qc(_S,{kind:c.kind,state:D.state,bodySha:c.bodySha,issuedAt:D.issuedAt,notAfter:D.notAfter,plan:D.plan,organizationUuid:D.organizationUuid,accountUuid:D.accountUuid})}}catch{return{result:"malformed",...T}}}function q7(i,{kind:c,orgUuid:T,accountUuid:D,workspaceUuid:w,unanchoredClaims:v,bodySha:U,nowMs:B,roots:K},de){if(i.length>eu)return"malformed";let[pe,me,Ae,...Pe]=i.split(".");if(pe===void 0||me===void 0||Ae===void 0||Pe.length>0||![pe,me,Ae].every((ct)=>V7.test(ct)))return"malformed";let Re=X7().safeParse(mS(pe)),xe=mS(me),ke=J7().safeParse(xe);if(!Re.success||!(ke.success||Z7().safeParse(xe).success))return"malformed";if(ke.success){if(de.issuedAt=ke.data.iat,de.ageSeconds=Math.floor(B/1000)-ke.data.iat,de.wsUnanchored=w===void 0&&ke.data.ws!==void 0,de.statesLifetime=ke.data.exp!==void 0,de.absence=ke.data.abs===!0,de.plan=cS(ke.data.plan),ke.data.abs===!0&&ke.data.exp===void 0)return"malformed"}let Te=Re.data.x5c.map((ct)=>Buffer.from(ct,"base64"));if(Te.some((ct)=>ct.length>W7))return"malformed";let[Fe,...$e]=Te,ot=fS(Fe);if(de.certHoursLeft=Math.floor((Date.parse(ot.validTo)-B)/$7),K.length===0)return"no_embedded_root";let ft=[ot,...$e.map(fS)];for(let ct=0;ct+1<ft.length;ct++)if(!uS(ft[ct],ft[ct+1]))return"bad_chain";let ut=ft.at(-1),st;for(let ct of K){let bt=new gS(ct.pem);if(uS(ut,bt)){st={root:ct,certificate:bt};break}}if(st===void 0)return"bad_chain";for(let ct=1;ct<ft.length;ct++)if(pS(ft[ct],ct-1))return"bad_chain";if(pS(st.certificate,ft.length-1))return"bad_chain";if(ot.ca)return"bad_chain";if(st.root.issuingCommonName!==void 0&&(ft.length!==2||eZ(ft[1])!==st.root.issuingCommonName))return"bad_chain";let yt=ke.success?ke.data.iat*1000:B;if(![...ft,st.certificate].every((ct)=>tZ(ct,yt)))return"cert_expired";if(!Q7(ot.subjectAltName??"").includes(`URI:${st.root.marker}`))return"no_marker";if(ot.publicKey.asymmetricKeyType!=="ec"||ot.publicKey.asymmetricKeyDetails?.namedCurve!=="prime256v1")return"bad_signature";if(!H7("sha256",Buffer.from(`${pe}.${me}`,"utf8"),{key:ot.publicKey,dsaEncoding:"ieee-p1363"},Buffer.from(Ae,"base64url")))return"bad_signature";if(!ke.success)return"unsupported_version";if(ke.data.typ!==c)return"wrong_type";let Le=v==="refuse";if((T!==void 0||Le)&&ke.data.aud!==T)return"aud_mismatch";if((D!==void 0||Le)&&ke.data.sub!==D)return"sub_mismatch";if(w!==void 0&&ke.data.ws!==w)return"ws_mismatch";if(ke.data.sha!==U)return"sha_mismatch";let De=ke.data.abs===!0,ze=ke.data.sha===B7;if(c==="managed-settings"?(De||ke.data.exp!==void 0)&&(De!==ze||De&&ke.data.doc!==void 0):De)return"abs_mismatch";let it=Math.floor(B/1000)-ke.data.iat;if(it<-G7)return"future_iat";let dt=Math.min(z7[c],(ke.data.exp??Number.POSITIVE_INFINITY)-ke.data.iat),gt=ke.data.iat+dt;if(de.notAfter=gt,dt<=0||it>dt)return"stale";return{issuedAt:ke.data.iat,notAfter:gt,state:De?"absence":"document",plan:cS(ke.data.plan),organizationUuid:ke.data.aud,accountUuid:ke.data.sub}}function Q7(i){let c=[],T="",D=!1;for(let w=0;w<i.length;w++){let v=i[w];if(D){if(v==="\\"&&w+1<i.length){T+=v+i[w+1],w++;continue}if(T+=v,v==='"')D=!1;continue}if(v==='"'){D=!0,T+=v;continue}if(v===","){c.push(T),T="";let U=w+1;while(U<i.length&&/\s/.test(i[U]))U++;w=U-1;continue}T+=v}if(D)return[];return c.push(T),c}function uS(i,c){return c.ca&&Boolean(i.checkIssued(c))&&i.verify(c.publicKey)}function eZ(i){let c=i.toLegacyObject().subject?.CN;return typeof c==="string"?c:void 0}function pS(i,c){let T=dS(i.raw);return T!==void 0&&c>T}function fS(i){let c=new gS(i);if(c.raw.length!==i.length)throw Error("trailing bytes after x5c certificate DER");return c}function tZ(i,c){return c>=Date.parse(i.validFrom)-K7&&c<=Date.parse(i.validTo)}function mS(i){try{return S(Buffer.from(i,"base64url").toString("utf8"))}catch{return}}var nZ=eu+256,oZ=e(()=>ps.object({jws:ps.string().min(1),receivedAt:ps.number()}));function rZ(i){return`${i}.signature.json`}function sZ(i){return`${i}.signature-iat.json`}var Cbe=["remote-settings.json","policy-limits.json"].map(sZ);function SS(i){let c=iZ(rZ(i),oZ());return c.kind==="ok"?c.value:null}function iZ(i,c){if(g())return{kind:"absent"};let T=lS(i,nZ,{refuseLinkOnWindows:!0});if(T.kind!=="ok")return T.kind==="absent"?{kind:"absent"}:{kind:"unparsable"};try{let D=c.safeParse(S(T.text));return D.success?{kind:"ok",value:D.data}:{kind:"unparsable"}}catch{return{kind:"unparsable"}}}function tu(i,c){return c===void 0||c.includes(i)?void 0:"org_pin_mismatch"}function aZ({verification:i,held:c,pinnedOrgs:T}){if(c.orgUuid!==void 0){let w=tu(c.orgUuid,T);if(w!==void 0)return{trusted:!1,reason:w}}let D;switch(i.result){case"valid":if(!ES(i.verified))return{trusted:!1,reason:"error"};if(i.statesLifetime!==!0)return{trusted:!1,reason:"no_lifetime"};D=i.verified;break;case"unsigned":case"malformed":case"no_embedded_root":case"bad_chain":case"cert_expired":case"no_marker":case"bad_signature":case"unsupported_version":case"wrong_type":case"aud_mismatch":case"sub_mismatch":case"ws_mismatch":case"sha_mismatch":case"abs_mismatch":case"future_iat":case"stale":return{trusted:!1,reason:i.result};default:return{trusted:!1,reason:"error"}}if(c.orgUuid===void 0){let w=tu(D.organizationUuid,T);if(w!==void 0)return{trusted:!1,reason:w}}return{trusted:!0,principal:{orgUuid:c.orgUuid??D.organizationUuid,accountUuid:c.accountUuid??D.accountUuid,workspaceUuid:c.workspaceUuid}}}function Al(i){switch(i){case"stale":case"future_iat":case"no_lifetime":case"unsigned":case"unsupported_version":return!0;case"malformed":case"no_embedded_root":case"bad_chain":case"cert_expired":case"no_marker":case"bad_signature":case"wrong_type":case"aud_mismatch":case"sub_mismatch":case"ws_mismatch":case"sha_mismatch":case"abs_mismatch":case"org_pin_mismatch":case"org_pin_unknown":case"error":return!1}}function yS({kind:i,cachePath:c,live:T,body:D,bodySha:w,account:v,pinnedOrgs:U,nowMs:B,roots:K}){try{let de=v?.organizationUuid||void 0,pe=v?.accountUuid||void 0,me=v?.workspaceUuid||void 0,Ae={orgUuid:de,accountUuid:pe,workspaceUuid:me};if(de!==void 0&&tu(de,U)!==void 0)return{trusted:!1,reason:"org_pin_mismatch"};if(yl(D))return{trusted:!1,reason:"sha_mismatch"};return aZ({verification:hS({jws:T!==void 0?T.jws:SS(c)?.jws,kind:i,orgUuid:de,accountUuid:pe,workspaceUuid:me,unanchoredClaims:"accept",bodySha:w,nowMs:B,roots:K}),held:Ae,pinnedOrgs:U})}catch(de){return t(`signed-cache: judging a stored copy failed: ${h(de)}`,{level:"error"}),{trusted:!1,reason:"error"}}}var lZ={begin:"-----SIGNED-CACHE-ROOTS-BEGIN-----",roots:[{pem:`-----BEGIN CERTIFICATE-----
|
|
26
|
+
MIIB3TCCAYKgAwIBAgIUANUYY/tuc08yPd9Nsh7rY/zDEiwwCgYIKoZIzj0EAwIw
|
|
27
|
+
OjESMBAGA1UEChMJQW50aHJvcGljMSQwIgYDVQQDExtBbnRocm9waWMgQXBwcyBT
|
|
28
|
+
aWduaW5nIFJvb3QwHhcNMjYwOTAyMjMzNDMwWhcNNDEwODI5MjMzNDI5WjA6MRIw
|
|
29
|
+
EAYDVQQKEwlBbnRocm9waWMxJDAiBgNVBAMTG0FudGhyb3BpYyBBcHBzIFNpZ25p
|
|
30
|
+
bmcgUm9vdDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABAsUtD9z65VTC61W8M40
|
|
31
|
+
B+bGEhcvb+8mLm/9aTh39H4lwLH0agHzBBqkt4dvqqGzo1J2pJN7L7UoX9nEEVbO
|
|
32
|
+
7rmjZjBkMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEBMB0GA1Ud
|
|
33
|
+
DgQWBBQW+2L0kdDEOi+A6fBK5jpwNdtoCzAfBgNVHSMEGDAWgBQW+2L0kdDEOi+A
|
|
34
|
+
6fBK5jpwNdtoCzAKBggqhkjOPQQDAgNJADBGAiEA+vhhLCvaUT2ccO0ND0YZaUy0
|
|
35
|
+
e+zhUoJOBhE9hXPs+SkCIQCHdbMcFo/ZQEq/rVnaS8qv/BZvRfYoEm318TY0WBU4
|
|
36
|
+
XA==
|
|
37
|
+
-----END CERTIFICATE-----`,marker:"urn:anthropic:claude-code:signed-cache:production"}],end:"-----SIGNED-CACHE-ROOTS-END-----"},OS=lZ.roots;var AS={marker:"urn:anthropic:claude-code:signed-cache:production",issuingCommonName:"Claude Code Signed Cache Issuing CA"},fs=void 0,CS=Object.freeze(OS.map((i)=>Object.freeze({...i,issuingCommonName:fs!==void 0&&i.marker===fs.marker?fs.issuingCommonName:AS.issuingCommonName})));function dZ(){if(fs!==void 0&&$n()&&CS.some((i)=>i.marker===fs.marker))return fs.marker;return AS.marker}function cZ(i,c){return Object.freeze(i.filter((T)=>T.marker===c))}function bS(){return cZ(CS,dZ())}var Cl=["CLAUDE_CODE_USE_BEDROCK","CLAUDE_CODE_USE_FOUNDRY","CLAUDE_CODE_USE_ANTHROPIC_AWS","CLAUDE_CODE_USE_ANTHROPIC_GOOGLE_CLOUD","CLAUDE_CODE_USE_MANTLE","CLAUDE_CODE_USE_VERTEX"];var uZ=a(new Map,(i)=>i.clear());var bl=a({isOpen:!1},(i)=>{i.isOpen=!1}),pZ=a(new Map,(i)=>i.clear());function fZ(i){return process.env[i]}function RS(i,c){if(c===void 0){delete process.env[i];return}process.env[i]=c}function mZ(i){return fZ(i.name)===i.theirs}function gZ(){let i=[...uZ.values()];return bl.isOpen?i:i.filter(mZ)}function TS(i,c){if(bl.isOpen)return i();let T=gZ();if(T.length===0&&pZ.size===0)return i();let D=T.filter((w)=>w.writer===void 0||c===void 0||!c(w.writer));for(let w=D.length-1;w>=0;w--)RS(D[w].name,D[w].before);bl.isOpen=!0;try{return i()}finally{for(let w of D)RS(w.name,w.theirs);bl.isOpen=!1}}var DS="anthropic-skills";var Ybe=Object.freeze([]);var _Z=/[\u093b\u093e-\u0940\u0949-\u094c\u0982\u09be-\u09c0\u09c7\u09c8\u09cb\u09cc\u09d7\u0a3e-\u0a40\u0abe-\u0ac0\u0ac9\u0acb\u0acc\u0b02\u0b3e\u0b40\u0b47\u0b48\u0b4b\u0b4c\u0b57\u0bbe\u0bbf\u0bc1\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcc\u0bd7\u0c01\u0c02\u0c41-\u0c44\u0c82\u0cbe\u0cc0-\u0cc4\u0cc7\u0cc8\u0cca\u0ccb\u0cd5\u0cd6\u0d02\u0d3e-\u0d40\u0d46-\u0d48\u0d4a-\u0d4c]/,EZ=/[\u17a4\u17d8\u261d\u26f9\u270c\u270d\u2e3a\u2e3b\u3248-\u324f\u{1f1e6}-\u{1f1ff}\u{1f3cb}\u{1f3cc}\u{1f574}\u{1f575}\u{1f590}\u{1f93b}\u{1f946}]/u,_Re=new RegExp(_Z.source.slice(0,-1)+EZ.source.slice(1),"u");var hZ=[/^agent-a[0-9a-f]{16}$/,/^agent-a[0-9a-f]{7}$/,/^wf_[0-9a-f]{8}-[0-9a-f]{3}-\d+$/];var ORe=[...hZ,/^wf-\d+$/,/^bridge-[A-Za-z0-9_]+(-[A-Za-z0-9_]+)*$/,/^job-[a-zA-Z0-9._-]{1,55}-[0-9a-f]{8}$/,/^bg-[a-zA-Z0-9._-]{1,55}-[0-9a-f]{8}$/];var wS=/[\u200c-\u200f\u202a-\u202e\u206a-\u206f\ufeff]/,nu=new RegExp(wS,"g");function gi(i){return SZ(i,!0)}function SZ(i,c){let T=i.toLowerCase().replace(/\u0131/g,"i").replace(/\u017f/g,"s"),D=T.replace(nu,"");return(c?D.replace(/:.*$/,""):D).replace(/[. ]+$/,"")||T}var PS=String.raw`[A-Za-z0-9_-]+(?:\.[A-Za-z0-9_-]+)*\.?`,Rl="[A-Za-z0-9._-]+",ou="[A-Za-z0-9._~-]",yZ=`${ou}+(?::${ou}*)?@`,OZ=":[1-9][0-9]{0,4}",AZ=`(?:/(?:${ou}|%[0-9A-Fa-f]{2})*)*`,HRe=new RegExp(`^${Rl}/${Rl}$`),FRe=new RegExp(`^git@(${PS}):(${Rl}(?:/${Rl})*)/?$`),xS=`(?:${yZ})?(${PS})(?:${OZ})?(${AZ})$`,BRe=new RegExp(`^https://${xS}`),zRe=new RegExp(`^https?://${xS}`),GRe=`ssh.${Cn}`;var CZ="inline",tTe=`${DS}@${CZ}`;var ms="builtin";function NS(i){let c=i.toLowerCase();return Sc(c)?c:i}function kS(i){if(i.startsWith("@")&&Rc(i))return{name:i};if(i.includes("@")){let c=i.split("@");return{name:c[0]||"",marketplace:c[1]}}return{name:i}}function gs(i){return i.normalize("NFC").toLowerCase()}var vS=new Set(["disableAllHooks","disableReplyCheck"]),MS=["accessKeyIdVar","secretAccessKeyVar","sessionTokenVar"],bZ;function US(i){let c=i.enabledPlugins,T=Object.entries(c??{}).flatMap(([D,w])=>w===!1&&D.endsWith(`@${ms}`)&&bZ?.(c,D)===!0?[D]:[]);return T.length>0?Object.fromEntries(T.map((D)=>[D,!1])):void 0}var RZ;function HS(i,c){return RZ?.(i,c)}function ru(i){let c={};for(let Re of Hn()){let{path:xe,restrictive:ke}=Re;if(vS.has(xe[0]))continue;let Te=dr(Re,i);if((typeof Te==="boolean"||typeof Te==="string")&&So(ke).includes(Te))vt(c,xe,Te)}if(St(i,["attribution"])===!1)vt(c,["attribution","sessionUrl"],!1);let T=Tl(i.permissions,["deny","ask","disableBypassPermissionsMode","disableAutoMode"]);if(T)c.permissions={...c.permissions,...T};for(let Re of TZ)if(i[Re]!==void 0)c[Re]=i[Re];for(let[Re,xe]of Object.entries(i))if((Re.startsWith("disable")&&(xe===!0||xe==="disable")||Re.startsWith("enable")&&xe===!1)&&!vS.has(Re))c[Re]=xe;if(i.disableAllHooks===!0)c.allowManagedHooksOnly=!0;if(Array.isArray(i.httpHookAllowedEnvVars)&&i.httpHookAllowedEnvVars.length===0)c.httpHookAllowedEnvVars=[];let D=Tl(i.sandbox?.filesystem,["denyRead","denyWrite","allowManagedReadPathsOnly"]),w=Tl(i.sandbox?.network,["deniedDomains","strictAllowlist","allowManagedDomainsOnly"]),v=Tl(i.sandbox?.credentials,["files","envVars"])??{},U=i.sandbox?.credentials?.awsPairs,B=n(U)&&MS.some((Re)=>(Re in U)),de=(Array.isArray(U)?U:B?[U]:[]).flatMap((Re)=>n(Re)?MS.map((xe)=>Re[xe]):[]),pe=U!==void 0&&!Array.isArray(U)&&!B,me=Vo.filter((Re)=>pe||de.includes(Re));if(me.length>0)v.awsPairs=me.map((Re,xe)=>({accessKeyIdVar:Re,secretAccessKeyVar:`${$a}${xe+1}_`}));let Ae=i.sandbox?.credentials?.sigv4;if(Ae){let Re={};for(let[xe,ke]of Object.entries(Ae))if(ke==="deny")Re[xe]="deny";if(Object.keys(Re).length>0)v.sigv4=Re}let Pe=Object.keys(v).length>0;if(D||w||Pe){let Re=c.sandbox??{};c.sandbox={...Re,...D&&{filesystem:{...Re.filesystem,...D}},...w&&{network:{...Re.network,...w}},...Pe&&{credentials:{...Re.credentials,...v}}}}return Object.keys(c).length>0?c:null}function Tl(i,c){if(!i)return;let T={};for(let D of c)if(i[D]!==void 0)T[D]=i[D];return Object.keys(T).length>0?T:void 0}var TZ=["allowedMcpServers","deniedMcpServers","allowManagedMcpServersOnly","disabledMcpjsonServers","allowManagedHooksOnly","allowedHttpHookUrls","strictKnownMarketplaces","allowedMarketplaces","blockedMarketplaces","strictPluginOnlyCustomization","availableModels","enforceAvailableModels","availableModelsMatch","deniedModels","allowedProviders"];var DZ=["SSL_CERT_FILE","NODE_EXTRA_CA_CERTS","REQUESTS_CA_BUNDLE","CURL_CA_BUNDLE","CLOUDSDK_CORE_CUSTOM_CA_CERTS_FILE","HTTPLIB2_CA_CERTS"],LZ=["AWS_CA_BUNDLE","DENO_CERT","CARGO_HTTP_CAINFO","PIP_CERT","GIT_SSL_CAINFO","GRPC_DEFAULT_SSL_ROOTS_FILE_PATH","NIX_SSL_CERT_FILE","HEX_CACERTS_PATH"],FS=[...DZ,...LZ],BS={UV_NATIVE_TLS:"true",DENO_TLS_CA_STORE:"system,mozilla"};var IZ=Object.freeze(["-c","core.hooksPath=/dev/null","-c","core.fsmonitor="]);var dTe=Object.freeze(["--no-optional-locks","status","--porcelain","--untracked-files=normal","--ignore-submodules=dirty"]),wZ=Object.freeze({GIT_LFS_SKIP_SMUDGE:"1"});var PZ=["'alias.remote-none=version'","'alias.remote-none.command=version'","'alias.remote-/.command=version'","'fetch.bundleURI='","'help.autocorrect=0'"],xZ=PZ.join(" "),cTe=Object.freeze({GIT_ALLOW_PROTOCOL:"/",GIT_CONFIG_PARAMETERS:xZ,GIT_NO_LAZY_FETCH:"1",GIT_NO_REPLACE_OBJECTS:"1",GIT_TERMINAL_PROMPT:"0",...wZ}),uTe=Object.freeze({LC_ALL:"C",LANGUAGE:"C"}),pTe=Object.freeze({GIT_SSH_COMMAND:"false"});var fTe=Object.freeze([...IZ,"-c","safe.bareRepository=explicit","-c","protocol.file.allow=never"]),su=["GIT_DIR","GIT_WORK_TREE","GIT_COMMON_DIR","GIT_INDEX_FILE","GIT_CEILING_DIRECTORIES","GIT_DISCOVERY_ACROSS_FILESYSTEM","GIT_OBJECT_DIRECTORY","GIT_ALTERNATE_OBJECT_DIRECTORIES","GIT_SHALLOW_FILE","GIT_NAMESPACE","GIT_IMPLICIT_WORK_TREE","GIT_REFERENCE_BACKEND"],iu=[...su,"GIT_CONFIG_COUNT","GIT_CONFIG_PARAMETERS","GIT_CONFIG_GLOBAL","GIT_CONFIG_SYSTEM","GIT_CONFIG"],NZ=/^GIT_CONFIG_(KEY|VALUE)_\d+$/,kZ=new RegExp(NZ.source,"i");var mTe=new Set(iu);function GS(i){let c=0,T=i.length;while(c<T&&zS(i.charCodeAt(c)))c++;while(T>c&&zS(i.charCodeAt(T-1)))T--;let D=vZ(i.slice(c,T));if(D!==-1)return{kind:"line_break",index:au(i,c+D)};for(let w=c;w<T;w++){let v=i.charCodeAt(w);if(v===0)return{kind:"nul",index:au(i,w)};if(v>255)return{kind:"non_ascii",index:au(i,w),codePoint:MZ(i,w)}}return null}function vZ(i){let c=i.indexOf(`
|
|
38
|
+
`),T=i.indexOf("\r");if(c===-1)return T;return T===-1?c:Math.min(c,T)}function zS(i){return i===9||i===32||i===10||i===13}function MZ(i,c){return i.codePointAt(c)??i.charCodeAt(c)}function au(i,c){let T=0;for(let D=0;D<c;D++){let w=i.charCodeAt(D);if(w>=55296&&w<=56319&&D+1<i.length&&(i.charCodeAt(D+1)&64512)===56320)D++;T++}return T}var lu=["NODE_TLS_REJECT_UNAUTHORIZED","BUN_TLS_REFUSE_DISTRUSTED_KEYS"];var WS=["YARN_HTTP_PROXY","YARN_HTTPS_PROXY","npm_config_proxy","npm_config_https_proxy","npm_config_noproxy","GLOBAL_AGENT_HTTP_PROXY","GLOBAL_AGENT_HTTPS_PROXY","GLOBAL_AGENT_NO_PROXY","DOCKER_HTTP_PROXY","DOCKER_HTTPS_PROXY","ELECTRON_GET_USE_PROXY","CLOUDSDK_PROXY_TYPE","CLOUDSDK_PROXY_ADDRESS","CLOUDSDK_PROXY_PORT","CLOUDSDK_PROXY_USERNAME","CLOUDSDK_PROXY_PASSWORD","FSSPEC_GCS","JAVA_TOOL_OPTIONS"];var du=["CLAUDE_CODE_USE_BEDROCK","CLAUDE_CODE_USE_VERTEX","CLAUDE_CODE_USE_FOUNDRY","CLAUDE_CODE_USE_ANTHROPIC_AWS","CLAUDE_CODE_USE_ANTHROPIC_GOOGLE_CLOUD","CLAUDE_CODE_USE_MANTLE","CLAUDE_CODE_USE_GATEWAY","ANTHROPIC_FOUNDRY_RESOURCE","ANTHROPIC_VERTEX_PROJECT_ID","ANTHROPIC_AWS_WORKSPACE_ID","ANTHROPIC_GOOGLE_CLOUD_PROJECT","ANTHROPIC_GOOGLE_CLOUD_LOCATION","ANTHROPIC_GOOGLE_CLOUD_WORKSPACE_ID","CLOUD_ML_REGION"],KS=["CLAUDE_CODE_USE_BEDROCK","CLAUDE_CODE_USE_ANTHROPIC_AWS","CLAUDE_CODE_USE_MANTLE"];var jS="OTEL_EXPORTER_OTLP_",cu=["OTEL_LOG_RAW_API_BODIES","OTEL_LOG_USER_PROMPTS","OTEL_LOG_ASSISTANT_RESPONSES","OTEL_LOG_TOOL_CONTENT","OTEL_LOG_TOOL_DETAILS","OTEL_LOG_MANAGED_SETTINGS","OTEL_LOGS_EXPORTER","ENABLE_BETA_TRACING_DETAILED","BETA_TRACING_ENDPOINT","ANT_OTEL_LOGS_EXPORTER"],$S=[jS,`ANT_${jS}`];var VS={apiKeyHelper:["ANTHROPIC_BASE_URL","_CLAUDE_CODE_ASSUME_FIRST_PARTY_BASE_URL"],awsAuthRefresh:[...KS,"ANTHROPIC_BEDROCK_BASE_URL","ANTHROPIC_AWS_BASE_URL","ANTHROPIC_BEDROCK_MANTLE_BASE_URL"],awsCredentialExport:[...KS,"ANTHROPIC_BEDROCK_BASE_URL","ANTHROPIC_AWS_BASE_URL","ANTHROPIC_BEDROCK_MANTLE_BASE_URL"],gcpAuthRefresh:["CLAUDE_CODE_USE_VERTEX","CLAUDE_CODE_USE_ANTHROPIC_GOOGLE_CLOUD","ANTHROPIC_VERTEX_BASE_URL","ANTHROPIC_GOOGLE_CLOUD_BASE_URL"]},YS=["CLAUDE_CODE_MEMORY_API_BASE_URL","CLAUDE_CODE_MEMORY_API_TOKEN"];var XS=["CLAUDE_CODE_ARTIFACTS_API_BASE_URL","CLAUDE_CODE_ARTIFACTS_API_TOKEN","CLAUDE_CODE_ARTIFACT_ASSET_BASE_URL","CLAUDE_CODE_ARTIFACT_LIVE_BASE_URL","CLAUDE_CODE_ARTIFACT_SYNC_BASE_URL","CLAUDE_CODE_ARTIFACT_VIEWER_BASE_URL"],uu=["ANTHROPIC_BASE_URL","_CLAUDE_CODE_ASSUME_FIRST_PARTY_BASE_URL","ANTHROPIC_BEDROCK_BASE_URL","ANTHROPIC_VERTEX_BASE_URL","ANTHROPIC_FOUNDRY_BASE_URL","ANTHROPIC_AWS_BASE_URL","ANTHROPIC_GOOGLE_CLOUD_BASE_URL","ANTHROPIC_BEDROCK_MANTLE_BASE_URL",...XS,...YS],UZ=[{endpoint:"ANTHROPIC_BASE_URL",companions:["_CLAUDE_CODE_ASSUME_FIRST_PARTY_BASE_URL","ANTHROPIC_CUSTOM_HEADERS"]},{endpoint:"ANTHROPIC_BEDROCK_BASE_URL",selection:"CLAUDE_CODE_USE_BEDROCK",companions:["CLAUDE_CODE_SKIP_BEDROCK_AUTH","ANTHROPIC_CUSTOM_HEADERS"]},{endpoint:"ANTHROPIC_VERTEX_BASE_URL",selection:"CLAUDE_CODE_USE_VERTEX",companions:["CLAUDE_CODE_SKIP_VERTEX_AUTH","ANTHROPIC_CUSTOM_HEADERS"]},{endpoint:"ANTHROPIC_FOUNDRY_BASE_URL",selection:"CLAUDE_CODE_USE_FOUNDRY",companions:["CLAUDE_CODE_SKIP_FOUNDRY_AUTH","ANTHROPIC_CUSTOM_HEADERS"]},{endpoint:"ANTHROPIC_AWS_BASE_URL",selection:"CLAUDE_CODE_USE_ANTHROPIC_AWS",companions:["CLAUDE_CODE_SKIP_ANTHROPIC_AWS_AUTH","ANTHROPIC_CUSTOM_HEADERS"]},{endpoint:"ANTHROPIC_GOOGLE_CLOUD_BASE_URL",selection:"CLAUDE_CODE_USE_ANTHROPIC_GOOGLE_CLOUD",companions:["CLAUDE_CODE_SKIP_ANTHROPIC_GOOGLE_CLOUD_AUTH","ANTHROPIC_CUSTOM_HEADERS"]},{endpoint:"ANTHROPIC_BEDROCK_MANTLE_BASE_URL",selection:"CLAUDE_CODE_USE_MANTLE",companions:["CLAUDE_CODE_SKIP_MANTLE_AUTH","ANTHROPIC_CUSTOM_HEADERS"]}];var PTe=f(UZ.flatMap((i)=>[i.endpoint,...i.companions])),Dl=["ANTHROPIC_API_KEY","ANTHROPIC_AUTH_TOKEN","CLAUDE_CODE_OAUTH_TOKEN","AWS_BEARER_TOKEN_BEDROCK","ANTHROPIC_FOUNDRY_API_KEY","ANTHROPIC_FOUNDRY_AUTH_TOKEN","ANTHROPIC_AWS_API_KEY"];var xTe=[...Dl,"ANTHROPIC_CUSTOM_HEADERS"];var pu=["CLAUDE_CODE_SKIP_BEDROCK_AUTH","CLAUDE_CODE_SKIP_VERTEX_AUTH","CLAUDE_CODE_SKIP_FOUNDRY_AUTH","CLAUDE_CODE_SKIP_ANTHROPIC_AWS_AUTH","CLAUDE_CODE_SKIP_ANTHROPIC_GOOGLE_CLOUD_AUTH","CLAUDE_CODE_SKIP_MANTLE_AUTH"],fu=["ANTHROPIC_MODEL","ANTHROPIC_DEFAULT_MODEL","ANTHROPIC_DEFAULT_FABLE_MODEL","ANTHROPIC_DEFAULT_FABLE_MODEL_DESCRIPTION","ANTHROPIC_DEFAULT_FABLE_MODEL_NAME","ANTHROPIC_DEFAULT_FABLE_MODEL_SUPPORTED_CAPABILITIES","ANTHROPIC_DEFAULT_HAIKU_MODEL","ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION","ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME","ANTHROPIC_DEFAULT_HAIKU_MODEL_SUPPORTED_CAPABILITIES","ANTHROPIC_DEFAULT_OPUS_MODEL","ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION","ANTHROPIC_DEFAULT_OPUS_MODEL_NAME","ANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIES","ANTHROPIC_DEFAULT_SONNET_MODEL","ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION","ANTHROPIC_DEFAULT_SONNET_MODEL_NAME","ANTHROPIC_DEFAULT_SONNET_MODEL_SUPPORTED_CAPABILITIES","ANTHROPIC_SMALL_FAST_MODEL","ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION","CLAUDE_CODE_SUBAGENT_MODEL","CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL","CLAUDE_CODE_3P_PROBE_WROTE_SONNET_DEFAULT","CLAUDE_CODE_3P_PROBE_WROTE_OPUS_DEFAULT","CLAUDE_CODE_3P_PROBE_WROTE_HAIKU_DEFAULT","CLAUDE_CODE_3P_SEEDED_SONNET_DEFAULT","CLAUDE_CODE_3P_SEEDED_OPUS_DEFAULT"],mu=["ANTHROPIC_CUSTOM_MODEL_OPTION","ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION","ANTHROPIC_CUSTOM_MODEL_OPTION_NAME","ANTHROPIC_CUSTOM_MODEL_OPTION_SUPPORTED_CAPABILITIES"],HZ=["CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR","CLAUDE_CODE_GATEWAY_TOKEN_FILE_DESCRIPTOR","CLAUDE_CODE_API_KEY_FILE_DESCRIPTOR","CLAUDE_CODE_WEBSOCKET_AUTH_FILE_DESCRIPTOR","CCR_AGENT_PROXY_TOKEN_FILE_DESCRIPTOR"],NTe=[...XS,...YS,"CLAUDE_CODE_API_BASE_URL","CLAUDE_BRIDGE_BASE_URL","CLAUDE_BRIDGE_SESSION_INGRESS_URL","CLAUDE_REMOTE_TOOLS_BRIDGE_URL","CLAUDE_CODE_GB_BASE_URL","VOICE_STREAM_BASE_URL"],kTe=["CLAUDE_CODE_OAUTH_TOKEN","CLAUDE_CODE_SESSIONS_OAUTH_TOKEN",...HZ,"CLAUDE_CODE_ARTIFACTS_API_TOKEN","CLAUDE_CODE_SLACK_TAG_TOKEN","CLAUDE_CODE_HFI_BEARER_TOKEN","CLAUDE_BRIDGE_OAUTH_TOKEN","CLAUDE_TRUSTED_DEVICE_TOKEN","AGENT_PROXY_AUTH_TOKEN","CLAUDE_CODE_MCP_SERVE_AUTH_TOKEN","CLAUDE_BG_AUTH_SNAPSHOT_PATH","CLAUDE_BG_SOCKET_TOKENS_PATH","CLAUDE_BG_RV_AUTH","CLAUDE_BG_PTY_AUTH","CLAUDE_BG_CLAIM_AUTH"];var FZ=["AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN"],gu=[...FZ,"AWS_PROFILE","AWS_CONFIG_FILE","AWS_SHARED_CREDENTIALS_FILE","GOOGLE_APPLICATION_CREDENTIALS","GOOGLE_CLOUD_PROJECT"];var _i=["AWS_CONTAINER_CREDENTIALS_FULL_URI","AWS_CONTAINER_CREDENTIALS_RELATIVE_URI","AWS_CONTAINER_AUTHORIZATION_TOKEN","AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE","AWS_EC2_METADATA_SERVICE_ENDPOINT","AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE","AWS_WEB_IDENTITY_TOKEN_FILE","AWS_ROLE_ARN"],_u=["GCE_METADATA_HOST","GCE_METADATA_ROOT","GCE_METADATA_IP","METADATA_SERVER_DETECTION"],vTe=new Set(["CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST",...du,...uu,...Dl,...pu,"CLAUDE_CODE_HOST_AUTH_ENV_VAR","CLAUDE_CODE_SDK_HAS_HOST_AUTH_REFRESH","CLAUDE_CODE_HOST_AUTH_ASK_AT_START","CLAUDE_CODE_HOST_AUTH_REFRESH_TIMEOUT_MS","CLAUDE_CODE_HOST_CREDS_FILE",...gu,"GCLOUD_PROJECT","GOOGLE_CLOUD_QUOTA_PROJECT",..._u,..._i,"AWS_REGION","AWS_DEFAULT_REGION",...fu,"ANTHROPIC_BEDROCK_SERVICE_TIER","ANTHROPIC_BEDROCK_REGION_PREFIX","CLAUDE_CODE_CERT_STORE","CLAUDE_CODE_DISABLE_FEATURE_FLAGS","DISABLE_GROWTHBOOK","CLAUDE_CODE_AUTO_MODE_MODEL","CLAUDE_CODE_BG_CLASSIFIER_MODEL","CLAUDE_CODE_SUBAGENT_MODEL_FORCE",...mu]);var JS=["SSL_CERT_FILE","SSL_CERT_DIR","ALL_PROXY"],BZ=["NPM_CONFIG_HTTPS_PROXY","NPM_CONFIG_HTTP_PROXY","NPM_CONFIG_PROXY"],zZ=new Set(su),GZ=new Set(["HTTP_PROXY","HTTPS_PROXY","ALL_PROXY","NO_PROXY","CLAUDE_CODE_PROXY_RESOLVES_HOSTS","CLAUDE_CODE_HTTP_PROXY","CLAUDE_CODE_HTTPS_PROXY","NPM_CONFIG_PROXY","NPM_CONFIG_HTTP_PROXY","NPM_CONFIG_HTTPS_PROXY"]);var WZ=f([...FS,...Object.keys(BS),...WS.map((i)=>i.toUpperCase()),...JS,...iu.filter((i)=>!zZ.has(i))]).filter((i)=>i!=="NODE_EXTRA_CA_CERTS"&&i!=="JAVA_TOOL_OPTIONS"&&!GZ.has(i));var MTe=new Set(["CLAUDE_CODE_CLIENT_CERT","CLAUDE_CODE_CLIENT_KEY","CLAUDE_CODE_CLIENT_KEY_PASSPHRASE","NODE_EXTRA_CA_CERTS","CLAUDE_CODE_DISABLE_LOOPED_CROSS_CERT_DROP","CLAUDE_CODE_DISABLE_SELF_NAMED_CERT_DROP",...lu,"CLAUDE_CODE_OAUTH_SCOPES",...WZ]);var ZS="CLAUDE_CODE_AUTO_MODE_MODEL";var KZ=["HTTPS_PROXY","HTTP_PROXY","NO_PROXY",...JS,...BZ,"NODE_EXTRA_CA_CERTS","CLAUDE_CODE_CERT_STORE","CLAUDE_CODE_DISABLE_LOOPED_CROSS_CERT_DROP","CLAUDE_CODE_DISABLE_SELF_NAMED_CERT_DROP","CLAUDE_CODE_CLIENT_CERT","CLAUDE_CODE_CLIENT_KEY","CLAUDE_CODE_CLIENT_KEY_PASSPHRASE",...lu],qS=[...KZ,"CLAUDE_CODE_PROXY_RESOLVES_HOSTS","CLAUDE_CODE_ENABLE_PROXY_AUTH_HELPER","CLAUDE_CODE_PROXY_AUTH_HELPER_TTL_MS","CLAUDE_CODE_DISABLE_PROXY_SCHEME_REPAIR","API_FORCE_IDLE_TIMEOUT","ANTHROPIC_UNIX_SOCKET","CLAUDE_CODE_RUNNER_MODEL_SOCKET","CLAUDE_CODE_DISABLE_HTTPS_AGENT_KEEPING","NODE_OPTIONS"];var QS=["apiKeyHelper","awsAuthRefresh","awsCredentialExport","fileSuggestion","gcpAuthRefresh","otelHeadersHelper","processWrapper","policyHelpers","proxyAuthHelper","statusLine","subagentStatusLine"],Eu=["bwrapPath","ripgrep","socatPath"],ey=["allowAppleEvents","allowNestedUserNamespaces","credentials","enableWeakerNestedSandbox","enableWeakerNetworkIsolation","filesystem.disabled","network.allowAllUnixSockets","network.allowMachLookup","network.allowUnixSockets","network.httpProxyPort","network.socksProxyPort","network.tlsTerminate"],ty=["required","egress"],jZ=new Set(["ANTHROPIC_BEDROCK_REGION_PREFIX","ANTHROPIC_BEDROCK_SERVICE_TIER","ANTHROPIC_CUSTOM_MODEL_OPTION","ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION","ANTHROPIC_CUSTOM_MODEL_OPTION_NAME","ANTHROPIC_CUSTOM_MODEL_OPTION_SUPPORTED_CAPABILITIES","ANTHROPIC_DEFAULT_FABLE_MODEL","ANTHROPIC_DEFAULT_FABLE_MODEL_DESCRIPTION","ANTHROPIC_DEFAULT_FABLE_MODEL_NAME","ANTHROPIC_DEFAULT_FABLE_MODEL_SUPPORTED_CAPABILITIES","ANTHROPIC_DEFAULT_MODEL","ANTHROPIC_DEFAULT_HAIKU_MODEL","ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION","ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME","ANTHROPIC_DEFAULT_HAIKU_MODEL_SUPPORTED_CAPABILITIES","ANTHROPIC_DEFAULT_OPUS_MODEL","ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION","ANTHROPIC_DEFAULT_OPUS_MODEL_NAME","ANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIES","ANTHROPIC_DEFAULT_SONNET_MODEL","ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION","ANTHROPIC_DEFAULT_SONNET_MODEL_NAME","ANTHROPIC_DEFAULT_SONNET_MODEL_SUPPORTED_CAPABILITIES","ANTHROPIC_FOUNDRY_API_KEY","ANTHROPIC_MODEL","ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION","ANTHROPIC_SMALL_FAST_MODEL","AWS_DEFAULT_REGION","AWS_PROFILE","AWS_REGION","BASH_DEFAULT_TIMEOUT_MS","BASH_MAX_OUTPUT_LENGTH","BASH_MAX_TIMEOUT_MS","CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR","CLAUDE_CODE_API_KEY_HELPER_TTL_MS","CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS","CLAUDE_CODE_DISABLE_FEATURE_FLAGS","CLAUDE_CODE_DISABLE_TERMINAL_TITLE","CLAUDE_CODE_ENABLE_AUTO_MODE","CLAUDE_CODE_ENABLE_DESIGN_SYNC","CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL","CLAUDE_CODE_ENABLE_TELEMETRY","CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS","CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL","CLAUDE_CODE_MAX_MCP_DESCRIPTION_LENGTH","CLAUDE_CODE_MAX_OUTPUT_TOKENS","CLAUDE_CODE_SKIP_BEDROCK_AUTH","CLAUDE_CODE_SKIP_FOUNDRY_AUTH","CLAUDE_CODE_SKIP_ANTHROPIC_AWS_AUTH","CLAUDE_CODE_SKIP_ANTHROPIC_GOOGLE_CLOUD_AUTH","CLAUDE_CODE_SKIP_MANTLE_AUTH","CLAUDE_CODE_SKIP_VERTEX_AUTH","CLAUDE_CODE_SUBAGENT_MODEL","CLAUDE_CODE_USE_BEDROCK","CLAUDE_CODE_USE_FOUNDRY","CLAUDE_CODE_USE_ANTHROPIC_AWS","CLAUDE_CODE_USE_ANTHROPIC_GOOGLE_CLOUD","CLAUDE_CODE_USE_GATEWAY","CLAUDE_CODE_USE_MANTLE","CLAUDE_CODE_USE_POWERSHELL_TOOL","CLAUDE_CODE_USE_VERTEX","CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL","DISABLE_AUTOUPDATER","DISABLE_BUG_COMMAND","DISABLE_COST_WARNINGS","DISABLE_FEEDBACK_COMMAND","DISABLE_GROWTHBOOK","DISABLE_INSTALLATION_CHECKS","DISABLE_UPDATES","ENABLE_TOOL_SEARCH","MAX_MCP_OUTPUT_TOKENS","MAX_THINKING_TOKENS","MCP_CONNECT_TIMEOUT_MS","MCP_TIMEOUT","MCP_TOOL_TIMEOUT","OTEL_EXPORTER_OTLP_COMPRESSION","OTEL_EXPORTER_OTLP_HEADERS","OTEL_EXPORTER_OTLP_LOGS_COMPRESSION","OTEL_EXPORTER_OTLP_LOGS_HEADERS","OTEL_EXPORTER_OTLP_LOGS_PROTOCOL","OTEL_EXPORTER_OTLP_METRICS_COMPRESSION","OTEL_EXPORTER_OTLP_METRICS_HEADERS","OTEL_EXPORTER_OTLP_METRICS_PROTOCOL","OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE","OTEL_EXPORTER_OTLP_PROTOCOL","OTEL_EXPORTER_OTLP_TRACES_COMPRESSION","OTEL_EXPORTER_OTLP_TRACES_HEADERS","OTEL_EXPORTER_OTLP_TRACES_PROTOCOL","OTEL_LOG_ASSISTANT_RESPONSES","OTEL_LOG_TOOL_CONTENT","OTEL_LOG_TOOL_DETAILS","OTEL_LOG_USER_PROMPTS","OTEL_LOGS_EXPORT_INTERVAL","OTEL_LOGS_EXPORTER","OTEL_METRIC_EXPORT_INTERVAL","OTEL_METRICS_EXPORTER","OTEL_METRICS_INCLUDE_ACCOUNT_UUID","OTEL_METRICS_INCLUDE_ENTRYPOINT","OTEL_METRICS_INCLUDE_REPOSITORY","OTEL_METRICS_INCLUDE_RESOURCE_ATTRIBUTES","OTEL_METRICS_INCLUDE_SESSION_ID","OTEL_METRICS_INCLUDE_VERSION","OTEL_RESOURCE_ATTRIBUTES","OTEL_RESOURCE_INCLUDE_HOST","OTEL_SERVICE_NAME","OTEL_TRACES_EXPORT_INTERVAL","OTEL_TRACES_EXPORTER","USE_BUILTIN_RIPGREP","VERTEX_REGION_CLAUDE_3_5_HAIKU","VERTEX_REGION_CLAUDE_3_5_SONNET","VERTEX_REGION_CLAUDE_3_7_SONNET","VERTEX_REGION_CLAUDE_4_0_OPUS","VERTEX_REGION_CLAUDE_4_0_SONNET","VERTEX_REGION_CLAUDE_4_1_OPUS","VERTEX_REGION_CLAUDE_4_5_OPUS","VERTEX_REGION_CLAUDE_4_6_OPUS","VERTEX_REGION_CLAUDE_4_7_OPUS","VERTEX_REGION_CLAUDE_4_8_OPUS","VERTEX_REGION_CLAUDE_5_OPUS","VERTEX_REGION_CLAUDE_5_5_OPUS","VERTEX_REGION_CLAUDE_FABLE_5","VERTEX_REGION_CLAUDE_FABLE_5_1","VERTEX_REGION_CLAUDE_FABLE_5_2","VERTEX_REGION_CLAUDE_4_5_SONNET","VERTEX_REGION_CLAUDE_4_6_SONNET","VERTEX_REGION_CLAUDE_5_SONNET","VERTEX_REGION_CLAUDE_5_5_SONNET","VERTEX_REGION_CLAUDE_HAIKU_4_5","VERTEX_REGION_CLAUDE_HAIKU_5_5","CLAUDE_AUTOCOMPACT_PCT_OVERRIDE","CLAUDE_CODE_AUTO_COMPACT_WINDOW","CLAUDE_CODE_DISABLE_UNKNOWN_MODEL_WINDOW_ENFORCEMENT","CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS","CLAUDE_CODE_MAX_CONTEXT_TOKENS","DISABLE_AUTO_COMPACT","DISABLE_COMPACT","CLAUDE_CODE_ALWAYS_ENABLE_EFFORT","CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING","CLAUDE_CODE_DISABLE_FAST_MODE","CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP","CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK","CLAUDE_CODE_DISABLE_THINKING","CLAUDE_CODE_EFFORT_LEVEL","CLAUDE_CODE_MAX_EFFORT_REMINDER","CLAUDE_CODE_SUBAGENT_EFFORT","CLAUDE_CODE_MESSAGES_PROMPT_CACHE_TTL","CLAUDE_CODE_PROMPT_CACHE_TTL","CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL","DISABLE_INTERLEAVED_THINKING","DISABLE_PROMPT_CACHING","DISABLE_PROMPT_CACHING_FABLE","DISABLE_PROMPT_CACHING_HAIKU","DISABLE_PROMPT_CACHING_OPUS","DISABLE_PROMPT_CACHING_SONNET","ENABLE_PROMPT_CACHING_1H","ENABLE_PROMPT_CACHING_1H_BEDROCK","FALLBACK_FOR_ALL_PRIMARY_MODELS","FORCE_PROMPT_CACHING_5M","CLAUDE_AUTO_BACKGROUND_TASKS","CLAUDE_CODE_DISABLE_ADVISOR_TOOL","CLAUDE_CODE_DISABLE_AGENT_VIEW","CLAUDE_CODE_DISABLE_ARTIFACT","CLAUDE_CODE_DISABLE_BACKGROUND_TASKS","CLAUDE_CODE_DISABLE_BUNDLED_SKILLS","CLAUDE_CODE_DISABLE_CRON","CLAUDE_CODE_DISABLE_EXPLORE_PLAN_AGENTS","CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY","CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING","CLAUDE_CODE_DISABLE_MCP_TASK_BACKGROUND","CLAUDE_CODE_DISABLE_MEMORY_RO_UNSAVED_NOTICE","CLAUDE_CODE_DISABLE_WORKFLOWS","CLAUDE_CODE_ENABLE_AWAY_SUMMARY","CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING","CLAUDE_CODE_ENABLE_FUNCTION_HOOKS","CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION","CLAUDE_CODE_ENABLE_TASKS","CLAUDE_CODE_FORK_SUBAGENT","CLAUDE_CODE_PLAN_MODE_REQUIRED","DISABLE_DOCTOR_COMMAND","DISABLE_EXTRA_USAGE_COMMAND","DISABLE_INSTALL_GITHUB_APP_COMMAND","DISABLE_LOGIN_COMMAND","DISABLE_LOGOUT_COMMAND","DISABLE_UPGRADE_COMMAND","CLAUDE_AX_SCREEN_READER","CLAUDE_CODE_ACCESSIBILITY","CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN","CLAUDE_CODE_DISABLE_MOUSE","CLAUDE_CODE_DISABLE_MOUSE_CLICKS","CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL","CLAUDE_CODE_FORCE_STRIKETHROUGH","CLAUDE_CODE_FORCE_TERMINAL_IMAGES","CLAUDE_CODE_HIDE_CWD","CLAUDE_CODE_NATIVE_CURSOR","CLAUDE_CODE_NO_FLICKER","CLAUDE_CODE_SCROLL_SPEED","CLAUDE_CODE_SYNTAX_HIGHLIGHT","API_TIMEOUT_MS","CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS","CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS","CLAUDE_CODE_GLOB_TIMEOUT_SECONDS","CLAUDE_CODE_MAX_RETRIES","CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION","CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY","CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION","CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS","CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT","CLAUDE_CODE_TEAM_TEARDOWN_PARK_TIMEOUT_MS","CLAUDE_CODE_WEB_SEARCH_REFILLS_PER_HOUR","CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS","CLAUDE_STREAM_IDLE_TIMEOUT_MS","MAX_STRUCTURED_OUTPUT_RETRIES","MCP_REMOTE_SERVER_CONNECTION_BATCH_SIZE","MCP_SERVER_CONNECTION_BATCH_SIZE","SLASH_COMMAND_TOOL_CHAR_BUDGET","TASK_MAX_OUTPUT_LENGTH","MCP_CONNECTION_NONBLOCKING","CLAUDE_ENABLE_BYTE_WATCHDOG","CLAUDE_ENABLE_BYTE_WATCHDOG_BEDROCK","CLAUDE_ENABLE_STREAM_WATCHDOG"]),$Z=new Set(["API_FORCE_IDLE_TIMEOUT","CLAUDE_CODE_DISABLE_AGENT_PROGRESS_SUMMARIES","CLAUDE_CODE_DISABLE_MCP_TASKS","CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC","CLAUDE_CODE_DISABLE_RESPONSE_COMPARISON","CLAUDE_CODE_DISABLE_ULTRATHINK","CLAUDE_CODE_DISABLE_WEB_FETCH","DISABLE_ERROR_REPORTING","DISABLE_TELEMETRY","DO_NOT_TRACK"]),VZ=new Set([...[],"ENABLE_BETA_TRACING_DETAILED","OTEL_LOG_RAW_API_BODIES"]),YZ=/auth|key|token|cookie|secret|credential|session|signature|passw|jwt|assertion|cert|oidc|org|tenant|account|project|workspace|user|email|identity|principal|consumer|client|host|url|base|target|upstream|endpoint|proxy|forward|route|fallback|override|apigw|x-goog-|l5d-|bypass|guardrail|amz|x-ms-|azureml|extra-parameters|envoy|helicone|litellm|cf-aig|cf-access|beta|version|^anthropic-routing-/;function XZ(i){if(/\r(?!\n)/.test(i))return!0;return i.split(/\n|\r\n/).some((c)=>{let T=c.indexOf(":");if(T===-1)return!1;let D=c.slice(0,T).trim();return!JZ.test(D)||GS(c.slice(T+1))!==null||YZ.test(D.toLowerCase())})}var JZ=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function ny(i,c){let T=i.toUpperCase();return jZ.has(T)||ZZ(T,c)||T==="ANTHROPIC_CUSTOM_HEADERS"&&!XZ(c)}function ZZ(i,c){return $Z.has(i)&&d(c)||VZ.has(i)&&Z(c)}var Qo=[{alias:"additionalMarketplaces",canonical:"extraKnownMarketplaces"},{alias:"allowedMarketplaces",canonical:"strictKnownMarketplaces"}];function oy(i,c,T){if(!n(i))return[];let D=[];for(let{alias:w,canonical:v}of Qo){if(!(w in i))continue;if(i[w]===null){if(!(v in i)&&T?.loneNullAlias==="rename")i[v]=null;delete i[w];continue}if(v in i&&i[v]!==null)D.push({file:c,path:w,message:`"${w}" is an alias for "${v}" and this file sets both; the "${w}" value was ignored. Use only "${v}".`,severity:"warning",alias:w,canonical:v});else i[v]=i[w];delete i[w]}return D}function hu(){let i=mt();return i!==void 0&&Me(i)}function ry(){let i=m(),c=i==="wsl"&&!hu()?"linux":i;switch(c){case"unknown":return{platform:c,chain:[]};default:return{platform:c,chain:Wc(c)}}}var eq=["enabled","enabledPlatforms"],Ei="network.allowedDomains",tq=new Set(["OTEL_LOG_MANAGED_SETTINGS"]);function dy(i,c="enabling"){if(!i)return{shellSettings:{},envVars:{},sandboxSettings:{},isolationSettings:{},hasHooks:!1,payloadSlots:{}};let T=[["top",i],...hi(i),...hi(i).map(([K])=>[K,{slotPresent:!0}]),...mn.map((K)=>[`policyHelpers.${K}`,{outputBehavior:To(i,`policyHelpers.${K}.outputBehavior`)}])],D=cy(i,T,c),w=nq(i,T,c);oq([D,...w.map(([,K])=>K)]);let v={};for(let[K,de]of w){let pe={shellSettings:de.hasHooks?{...de.shellSettings,hooks:Do(de.hooks)}:de.shellSettings,envVars:de.envVars,sandboxSettings:de.sandboxSettings,isolationSettings:de.isolationSettings};if(fy(pe))v[K]=pe}let{sandboxSwitches:U,...B}=D;return{...B,payloadSlots:v}}function cy(i,c,T){let D={},w;for(let Pe of QS){let Re=i[Pe];if(Pe==="policyHelpers"){if(Re!==null&&typeof Re==="object")for(let ke of mn){let Te=uq(Re[ke]);if(Te){if(D[`policyHelpers.${ke}`]=Te.command,Te.scriptSize)w??={},w[`policyHelpers.${ke}`]=Te.scriptSize}}continue}let xe;if(typeof Re==="string")xe=Re;else if(Re!==null&&typeof Re==="object"&&"command"in Re&&typeof Re.command==="string")xe=Re.command;if(xe!==void 0&&xe.length>0)D[Pe]=xe}let v=yq(i);for(let[Pe,Re]of Eq(i,v,c,T))D[`extraKnownMarketplaces[${o(Pe)}].listedMods`]=Do({source:Object.hasOwn(v??{},Pe)?v?.[Pe]?.source??null:null,arming:hq(c,Re)});if(v&&typeof v==="object")for(let[Pe,Re]of Object.entries(v)){let xe=Re?.source;if(!xe||typeof xe!=="object")continue;if(xe.source==="url"&&typeof xe.headersHelper==="string"&&xe.headersHelper.length>0)D[`extraKnownMarketplaces[${o(Pe)}].source.headersHelper`]=ly(xe.headersHelper,"url",xe.url);if(xe.source==="settings"&&Array.isArray(xe.plugins)){let ke=new Map;for(let Te of xe.plugins){let Fe=o(Te?.name),$e=ke.get(Fe)??0;ke.set(Fe,$e+1);let ot=Te?.source;if(ot!==null&&typeof ot==="object"&&"source"in ot&&ot.source==="command"&&"command"in ot&&typeof ot.command==="string"&&ot.command.length>0)D[`extraKnownMarketplaces[${o(Pe)}].plugins[${o(Te.name)}][${$e}].source.command`]=ot.command;if(typeof Te?.headersHelper==="string"&&Te.headersHelper.length>0){let ft=Te.source,ut=ft!==null&&typeof ft==="object";D[`extraKnownMarketplaces[${o(Pe)}].plugins[${o(Te.name)}][${$e}].headersHelper`]=ly(Te.headersHelper,ut&&"source"in ft?ft.source:void 0,ut&&"url"in ft?ft.url:void 0)}}}}let U=i.sandbox,B={},K={enabled:To(U,"enabled"),enabledPlatforms:To(U,"enabledPlatforms"),[Ei]:To(U,Ei)};if(U!==null&&typeof U==="object"){let Pe={enabled:K.enabled,enabledPlatforms:K.enabledPlatforms};for(let Re of Eu){let xe=mq(U[Re]);if(xe)D[`sandbox.${Re}`]=Do({value:xe,...Pe})}for(let Re of ey){let xe=To(U,Re);if(rq(Re,xe))B[`sandbox.${Re}`]=Do({value:xe,...Pe,...my.has(Re)&&{allowedDomains:gy(K[Ei])}})}}let de=i.isolation,pe={};for(let Pe of ty){let Re=To(de,Pe);if(sq(Pe,Re))pe[`isolation.${Pe}`]=Do({value:Re})}let me={};if(i.env&&typeof i.env==="object")for(let[Pe,Re]of Object.entries(i.env)){if(Re===void 0)continue;let xe=String(Re);if(xe.length>0&&!tq.has(Pe.toUpperCase())&&!ny(Pe,xe))me[Pe]=xe}let Ae=i.hooks!==void 0&&i.hooks!==null&&typeof i.hooks==="object"&&Object.keys(i.hooks).length>0;return{shellSettings:D,inlineHelperScriptSizes:w,envVars:me,sandboxSettings:B,isolationSettings:pe,hasHooks:Ae,hooks:Ae?i.hooks:void 0,sandboxSwitches:K}}function nq(i,c,T){return hi(i).map(([D,w])=>[D,cy(w,c,T)])}function hi(i){let c=[];for(let T of py){let D=`policyHelpers.${T}`,w=To(i,D);if(!P(w))continue;let{policyHelper:v,policyHelpers:U,...B}=w;c.push([D,B])}return c}function yu(i){return mn.find((c)=>i===`policyHelpers.${c}.defaultSettings`)}function uy(i,c){let T=yu(c);return T!==void 0&&To(i,`policyHelpers.${T}.outputBehavior`)==="merge"}function oq(i){let c=i.map((D)=>Object.keys(D.sandboxSettings).length>0||Eu.some((w)=>D.shellSettings[`sandbox.${w}`]!==void 0)),T=i.map((D)=>[...my].some((w)=>D.sandboxSettings[`sandbox.${w}`]!==void 0));i.forEach((D,w)=>{if(c.some((v,U)=>v&&U!==w))for(let v of eq){let U=D.sandboxSwitches[v];if(U!==void 0)D.sandboxSettings[`sandbox.${v}`]=Do({value:U})}if(T.some((v,U)=>v&&U!==w)){let v=D.sandboxSwitches[Ei];if(v!==void 0)D.sandboxSettings[`sandbox.${Ei}`]=Do({value:gy(v)??v})}})}var py=[...mn.map((i)=>`${i}.defaultSettings`),"default"];function Su(i){let c=[];for(let T of py){let D=`policyHelpers.${T}`,w=i.payloadSlots[D];if(w!==void 0&&fy(w))c.push([D,w])}return c}function fy(i){return Object.keys(i.shellSettings).length>0||Object.keys(i.envVars).length>0||Object.keys(i.sandboxSettings).length>0||Object.keys(i.isolationSettings).length>0}var my=new Set(["credentials","network.tlsTerminate"]);function gy(i){return Array.isArray(i)?f(i.filter((c)=>typeof c==="string")).sort():void 0}function To(i,c){let T=i;for(let D of c.split(".")){if(T===null||typeof T!=="object")return;T=T[D]}return T}function rq(i,c){if(c===void 0||c===null||c===!1)return!1;if(Array.isArray(c)&&c.length===0)return!1;return!(i==="credentials"&&aq(c))}function sq(i,c){if(c===void 0||c===null)return!1;switch(i){case"required":return c!==!1;case"egress":return!P(c)||Object.entries(c).some(([T,D])=>iq.has(T)?D!==void 0&&D!==null&&!(Array.isArray(D)&&D.length===0):D!==void 0)}}var iq=new Set(["allowedHosts","deniedHosts"]);function aq(i){if(typeof i!=="object"||i===null)return!1;return Object.entries(i).every(([c,T])=>{if(T===void 0)return!0;if(c==="files"||c==="envVars")return Array.isArray(T)&&T.every((D)=>typeof D==="object"&&D!==null&&D.mode==="deny");if(c==="sigv4")return typeof T==="object"&&T!==null&&Object.values(T).every((D)=>D===void 0||D==="deny");return c==="allowPlaintextInject"&&T===!1})}function lq(i){return Object.keys(i.shellSettings).some(dq)}function dq(i){return mn.some((c)=>i===`policyHelpers.${c}`)}function _y(i){return lq(i)||Object.keys(i.shellSettings).some((c)=>c.startsWith("extraKnownMarketplaces["))||Su(i).length>0}function cq(i){return i==="sh"||i==="pwsh"}function uq(i){if(i===null||typeof i!=="object")return;let{path:c,script:T,interpreter:D,timeoutMs:w,refreshIntervalMs:v}=i,U,B;if(typeof c==="string"&&c)U=c;else if(typeof T==="string"&&T&&cq(D))U={interpreter:D,script:fq(T)},B=pq(T);else return;return{command:o([U,w??null,v??null]),scriptSize:B}}function pq(i){return{bytes:Buffer.byteLength(i,"utf8"),lines:Bn(i,`
|
|
39
|
+
`)+(i.endsWith(`
|
|
40
|
+
`)?0:1)}}function fq(i){return Ye(o(i))}function mq(i){if(typeof i==="string")return i||void 0;if(i===null||typeof i!=="object"||!("command"in i)||typeof i.command!=="string"||!i.command)return;let c="args"in i&&Array.isArray(i.args)?i.args.map(String):[];return o([i.command,...c])}function gq(i){return Do(Ey(i))}function Ey(i){return{shellSettings:i.shellSettings,envVars:i.envVars,sandboxSettings:Object.keys(i.sandboxSettings).length>0?i.sandboxSettings:void 0,...sy(i),hooks:i.hooks,payloadSlots:Su(i).length>0?Object.fromEntries(Su(i).map(([c,T])=>{let{isolationSettings:D,...w}=T;return[c,{...w,...sy(T)}]})):void 0}}function sy(i){return Object.keys(i.isolationSettings).length>0?{isolationSettings:i.isolationSettings}:{}}function iy(i){return[i.prependPlugins,i.appendPlugins].flatMap((c)=>Array.isArray(c)?c:[]).filter((c)=>typeof c==="string").map(gs)}function _q(i){return P(i.enabledPlugins)?Object.entries(i.enabledPlugins).filter(([,c])=>c!==!1&&!Array.isArray(c)).map(([c])=>gs(c)):[]}function ay(i){return kS(i).marketplace}function Eq(i,c,T,D){let w=T.flatMap(([,de])=>iy(de)),v=T.flatMap(([,de])=>_q(de)),U=Object.keys(c??{}),B=iy(i).filter((de)=>!de.endsWith(`@${ms}`)).flatMap((de)=>ay(de)??[]).filter((de)=>!U.some((pe)=>gs(pe)===de)),K=new Map;for(let de of[...U,...B]){let pe=gs(de),me=To(c?.[de],"source.source"),Ae=D==="enabling"&&U.includes(de)&&me!=="directory"&&me!=="file",Pe=[...w,...Ae?v:[]].filter((Re)=>ay(Re)===pe);if(Pe.length>0)K.set(de,Pe)}return K}function hq(i,c){let T=new Set(c);return i.flatMap(([D,w])=>["enabledPlugins","prependPlugins","appendPlugins","managedSourcesBehavior","outputBehavior","slotPresent"].flatMap((v)=>{let U=w[v],B=v==="enabledPlugins"?P(U):Array.isArray(U);if(U===void 0)return[];if(!B)return[[D,`${v}:whole`,U]];return(P(U)?Object.entries(U).toSorted():[U].flat().map((de)=>[de])).filter(([de])=>typeof de!=="string"||T.has(gs(de))).map((de)=>[D,v,...de])}))}function Do(i){return o(fi(i))}function hy(i){return Ye(gq(i))}function Sy(i,c,T){if(hy(c)===i)return!0;return typeof T==="string"&&T.length>0&&Ye(Do({...Ey(c),claudeMd:T}))===i}function ly(i,c,T){return o([i,typeof c==="string"?c:null,typeof T==="string"?T:null])}var Sq=new Set(["dns","unix","ipv4","ipv6"]),_De=new Set([...Sq,"http","https","ws","wss","ftp","file","grpc","grpcs","otlp","xds","tcp","udp","tls","h2","h2c","http2"]);function yy(i){return i.replace(/[^\x20-\x7e]/gu,"?")}function yq(i){let c=i.extraKnownMarketplaces;if(c!==void 0&&c!==null)return c;let T=i;for(let{alias:D,canonical:w}of Qo){if(w!=="extraKnownMarketplaces")continue;let v=T[D];if(v!==void 0&&v!==null&&typeof v==="object")return v}return}var Aq="remote-settings.json",Cq=5000;var Dy="remote-settings-helper-consent";function bq(){return Ty(C(),Dy)}function Rq(i,c){let T=dy(i,c);return _y(T)?T:void 0}function Tq(i){let c=cr(i,(T,D)=>D.startsWith("$")&&D!=="$schema");if(Object.keys(c).length!==Object.keys(i).length)Ly.set(c,i);return c}function Oy(i){return Ly.get(i)??i}var Ly=new WeakMap;class Iy{sessionCache=null;storedAccountReader=null;storedCopyGateCovers=!0;storedCopyOrgPin={kind:"unreadable"};mayHideDialog=()=>!1;writesForHiddenDialog=()=>!1;seededUnjudged=null;storedCopyTrust="not_asked";storedCopyRefusal=null;helperTierReadAtMs=null;refusedCopyHelperTier=null;droppedHelperTier=null;eligible=void 0;eligibilityMemo=void 0;machinePinsSignInMemo=void 0;ineligibleReason=void 0;evalPolicySnapshotOnly=!1;hybridTokenRenewalDue=!1;hybridOrganizationUuid=null;usesGatewayVariable=!1;hybridSignInEnded=!1;hybridBlockFilter=null;hybridHostsWithheld=!1;hybridProviderFromOrganization=!1;hybridOnlyForConnection=!1;hybridSignInKeepsCredentialAside=!1;hybridLeftOut=null;hybridMarketplacesOffered=null;hybridPluginLocksByUrl=new Map;hybridPluginLockRules=null;pluginMcpServersListed=[];pluginLocksByUrlView=null;hybridNote=null;hybridCacheLeftOut=null;lastLoadStatus=void 0;lastLoadOkAtMs=void 0;hybridCacheLastRead=void 0;loadCycleEnded=!1;loadCycleBegun=!1;loadCycleEndedSignal=p();loadBackstopReleased=!1;lastLoadStatusChanged=p();hybridStateWritten=p();policySettingsNotified=!1;verifiedPayload=null;verifiedByGateway=void 0;unverifiedView=null;projectedView=null;projectedParse=null;consentedPayload=null;storedPayload=null;deferredPayload=null;resetEpoch=0;backendView=void 0;coworkCloudHolds={};heldSoFar(i){let c=Object.keys(this.coworkCloudHolds).length>0;if(!c&&!$s())return i;if(i!==null){let T=Wd(this.coworkCloudHolds,i);return this.coworkCloudHolds=ba(T),T}return c?this.coworkCloudHolds:null}replaceSessionCache(i,c){let T=c?.verified===!0||!$s();if(!T&&i!==null&&i===this.sessionCache)return;let D=this.heldSoFar(T?xq(i):null);if(this.keepHelperLeaving(),this.sessionCache=D,c?.verified){if(this.seededUnjudged=null,this.verifiedPayload=D,this.verifiedByGateway=Pn()?.url,this.projectedView=null,this.projectedParse=null,c.consentDeferred)this.deferredPayload=D;this.hybridStateWritten.emit()}}seedFromDisk(i){let c=Object.keys(this.coworkCloudHolds).length>0?Wd(this.coworkCloudHolds,i):i;this.sessionCache=c,this.seedConsentBaseline(c)}seedConsentBaseline(i){let c=(T)=>{let D=Rq(i,T);if(D===void 0)return!0;let w=Uq();return w!==void 0&&Sy(w,D,i.claudeMd)};if(c("enabling"))this.consentedPayload??=i,this.storedPayload??=i;else if(c("listing"))this.storedPayload??=i}markConsented(i,c){if(this.storedPayload=i,c==="enabling")this.consentedPayload=i}dropConsentDeferral(){this.deferredPayload=null}markPolicySettingsNotified(){this.policySettingsNotified=!0}recordEligibility(i,c){if(this.eligible=i,c.memoize)this.eligibilityMemo=i,this.ineligibleReason=i?void 0:c.ineligibleReason}resetListener=null;registerResetListener(i){if(this.resetListener!==null)throw Error("registerSyncCacheResetListener: a listener is already registered; a second one would unhook the first");this.resetListener=i}keepHelperLeaving(){if(this.sessionCache===this.verifiedPayload){let i=Ou(this.sessionCache);this.droppedHelperTier=i===null?this.droppedHelperTier:{...i,env:{...this.droppedHelperTier?.env,...i.env}}}}reset(){this.keepHelperLeaving(),this.sessionCache=null,this.helperTierReadAtMs=null,this.storedCopyTrust="not_asked",this.storedCopyRefusal=null,this.refusedCopyHelperTier=null,this.storedAccountReader=null,this.storedCopyGateCovers=!0,this.storedCopyOrgPin={kind:"unreadable"},this.mayHideDialog=()=>!1,this.writesForHiddenDialog=()=>!1,this.seededUnjudged=null,this.eligible=void 0,this.eligibilityMemo=void 0,this.machinePinsSignInMemo=void 0,this.ineligibleReason=void 0,this.hybridTokenRenewalDue=!1,this.evalPolicySnapshotOnly=!1,this.hybridOrganizationUuid=null,this.usesGatewayVariable=!1,this.hybridSignInEnded=!1,this.hybridBlockFilter=null,this.hybridHostsWithheld=!1,this.hybridProviderFromOrganization=!1,this.hybridOnlyForConnection=!1,this.hybridSignInKeepsCredentialAside=!1,this.hybridLeftOut=null,this.hybridMarketplacesOffered=null,this.hybridPluginLocksByUrl=new Map,this.hybridPluginLockRules=null,this.pluginLocksByUrlView=null,this.hybridNote=null,this.hybridCacheLeftOut=null,this.lastLoadStatus=void 0,this.lastLoadOkAtMs=void 0,this.hybridCacheLastRead=void 0,this.loadCycleEnded=!1,this.loadCycleBegun=!1,this.loadBackstopReleased=!1,this.policySettingsNotified=!1,this.verifiedPayload=null,this.verifiedByGateway=void 0,this.unverifiedView=null,this.projectedView=null,this.projectedParse=null,this.consentedPayload=null,this.storedPayload=null,this.deferredPayload=null,this.resetEpoch++,this.emitLoadStatusChanged(void 0)}emitLoadStatusChanged(i){try{this.lastLoadStatusChanged.emit(i)}catch(c){t(`Remote settings: load-status listener threw: ${h(c)}`,{level:"error"})}}}var Dq=new s(()=>new Iy);function wn(){return Dq.of(R().host)}function Ll(){return iS()||(!Dn()&&!In()||rS())&&wn().mayHideDialog()}function wy(){return wn().lastLoadStatus}function _s(){return}function Lq(){return wn().evalPolicySnapshotOnly}var CLe=new s(()=>new Map);var bLe=new s(()=>new Set);var RLe=new s(()=>new Map);var TLe=new s(()=>new Map);var DLe=new s(()=>new Set);var LLe=new s(()=>({held:void 0,running:void 0,afterRefusal:!1,gatewaySignIn:{auth:null,heldAt:0,refreshInFlight:null},identityProviderRefusedAt:void 0,identityProviderGrant:{held:void 0,spent:void 0,readFailed:!1}}));var ILe=new s(()=>({credentials:new Set,resources:new Set}));var wLe=new s(()=>({value:!1}));var PLe=new s(()=>({value:!0}));var xLe=new s(()=>({value:!1}));function bu(){return g()||Lq()}function Py(i){let{projectedView:c,projectedParse:T}=wn();return i!==null&&(c?.view===i||T?.view===i||Iq(i))}function xy(i){let{projectedParse:c}=wn();return c?.view===i?c.raw:void 0}function Iq(i){return Jr()&&Object.keys(i).length>0&&O(ba(i),i)}var wq=[["allowedHttpHookUrls"],["httpHookAllowedEnvVars"],["isolation","required"]],Ny=[{path:["sandbox","credentials","files"],names:"path"},{path:["sandbox","credentials","envVars"],names:"name"}];function ky(i){for(let T of wq)vt(i,T,void 0);for(let{path:T,names:D}of Ny){let w=St(i,T),v=(Array.isArray(w)?w:[w]).flatMap((U)=>n(U)&&typeof U[D]==="string"?[{[D]:U[D],mode:"deny"}]:[]);vt(i,T,v.length>0?v:void 0)}for(let T of[["permissions","deny"],["permissions","ask"]]){let D=St(i,T);if(Array.isArray(D)){let w=D.filter((v)=>typeof v!=="string"||!lr.test(v));vt(i,T,w)}}for(let{path:T,restrictive:D}of Hn()){let w=St(i,T),v=T[0]==="strictPluginOnlyCustomization"?w:ds(w);if(D===!0&&v===!1)vt(i,T,void 0)}let c=i.strictPluginOnlyCustomization;if(Array.isArray(c)&&!c.some((T)=>li.includes(T)))delete i.strictPluginOnlyCustomization;if(i.availableModelsMatch==="prefix")delete i.availableModelsMatch}function vy(i){let c={...ru(i)};if(ky(c),i.parentSettingsBehavior==="merge")c.parentSettingsBehavior="merge";let T=Ko(i);if(T!==void 0)c.pluginConfigs=T;let D=Object.entries(i.enabledPlugins??{}).filter(([w,v])=>v===!1&&!(w.includes("@")&&NS(w.slice(w.lastIndexOf("@")+1))===ms));return D.length===0?c:{...c,enabledPlugins:Object.fromEntries(D)}}function Ay(i){if(!i||!bu())return i;let c={...ru(i)};if(g()){if(ky(c),i.fastMode===!1)c.fastMode=!1;if(i.fastModePerSessionOptIn===!0)c.fastModePerSessionOptIn=!0;let T=Object.entries(n(i.skillOverrides)?i.skillOverrides:{}).flatMap(([w,v])=>v==="off"?[[w,"off"]]:[]);if(T.length>0)c.skillOverrides=Object.fromEntries(T);let D=Ko(i);if(D!==void 0)c.pluginConfigs=D;if(i===wn().verifiedPayload){if(typeof i.claudeMd==="string"&&i.claudeMd!=="")c.claudeMd=i.claudeMd;let w=US(i);if(w!==void 0)c.enabledPlugins=w;for(let[v,U]of Object.entries(ui(i.autoMode).lists))vt(c,["autoMode",v],U)}}return{...c,managedSourcesBehavior:"merge"}}function Pq(){return TS(()=>$s()||Bt.CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST&&qm.has(Bt.CLAUDE_CODE_ENTRYPOINT??"")||Ks())}function My(){return _s()??Ty(C(),Aq)}var Uy=8388608;function Hy(i){return i}function xq(i){if(i===null||!$s())return i;let c=ba(i);return O(c,i)?i:c}function Nq(){if(Pq())return null;let i=wn(),c=i.storedCopyRefusal;if(c!==null&&Ll()&&Date.now()-c.atMs<Cq)return i.storedCopyTrust={trusted:!1,reason:c.reason},null;i.storedCopyTrust="not_asked",i.storedCopyRefusal=null,i.refusedCopyHelperTier=null;try{let T=Hq();if(T===null)return null;let D=S(Ce(T));if(!D||typeof D!=="object"||Array.isArray(D))return null;let w=Tq(D);return kq(w)?w:null}catch(T){if(Am(T))t(`Remote settings: Disk cache exceeds ${Uy} bytes; ignoring it as if absent`);return null}}function kq(i){let c=wn();if(!Ll()||!c.storedCopyGateCovers||_s()!==void 0||c.evalPolicySnapshotOnly)return c.storedCopyTrust="not_asked",!0;let T=c.storedCopyOrgPin;if(T.kind==="read"){let w=Cy(i,T.orgs);if(w.trusted)return c.storedCopyTrust=w,!0;return by(i,w.reason,Al(w.reason)),!1}let D=i.forceRemoteSettingsRefresh===!0?Cy(i,void 0):void 0;return by(i,"org_pin_unknown",D!==void 0&&(D.trusted||Al(D.reason))),!1}function Cy(i,c){try{return yS({kind:"managed-settings",cachePath:My(),body:Oy(i),bodySha:aS(Oy(i)),account:wn().storedAccountReader?.(),pinnedOrgs:c,nowMs:Date.now(),roots:bS()})}catch(T){return t(`Remote settings: the gate on a stored copy failed: ${h(T)}`,{level:"error"}),{trusted:!1,reason:"error"}}}function by(i,c,T){let D=wn();D.storedCopyTrust={trusted:!1,reason:c},D.storedCopyRefusal={atMs:Date.now(),reason:c,forcesRefresh:T&&i.forceRemoteSettingsRefresh===!0},D.refusedCopyHelperTier=Al(c)?vq(i):null,D.seedConsentBaseline(i),t(`Remote settings: the stored copy is not trusted at rest (${c}); treating it as absent`)}function Ou(i){if(i===null)return null;let{apiKeyHelper:c,env:T}=i;return typeof c==="string"&&c.trim()!==""?{apiKeyHelper:c,env:Vr(n(T)?T:{},(D)=>typeof D==="string")}:null}function vq(i){let[c]=By(i);if(i===null||c===void 0)return Ou(i);let[T,D]=c;return Ou(uy(i,T)?{...i,...D,env:{...i.env,...D.env}}:D)}var Mq=4096;function Uq(){let i=Ru();if(i!==void 0)return i.attestation;if(g())return;try{return Go(bq(),Mq).trim()||void 0}catch{return}}function Hq(){let i=Ru();if(i!==void 0)return i.content;if(g()&&_s()===void 0)return null;return Go(My(),Uy)}function Ru(){let i=wn().backendView;if(!u()||i===void 0||!i.ready||i.stoodDown||_s()!==void 0)return;if(!Mn(i.configHome)){i.standDown("config home changed");return}return i}var NLe=N.state("remote-settings"),kLe=N.state(Dy);var Fq=new Set([...qS,...du,...uu,"AWS_ENDPOINT_URL_STS","AWS_ENDPOINT_URL","AWS_ENDPOINT_URL_SSO","AWS_ENDPOINT_URL_SSO_OIDC","AWS_ENDPOINT_URL_BEDROCK","AWS_ENDPOINT_URL_BEDROCK_RUNTIME",...gu,..._i,..._u,"CLOUDSDK_CONFIG","GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES","GCLOUD_PROJECT","CLAUDE_CODE_CUSTOM_OAUTH_URL",...Dl,"CLAUDE_CODE_API_BASE_URL","CLAUDE_CODE_OAUTH_REFRESH_TOKEN","CLAUDE_CODE_OAUTH_SCOPES","CLAUDE_CODE_OAUTH_CLIENT_ID","CLAUDE_CODE_SESSION_ACCESS_TOKEN","CLAUDE_SESSION_INGRESS_TOKEN_FILE","CLAUDE_CODE_ENVIRONMENT_KIND","CLAUDE_CODE_REMOTE_SESSION_ID","ANTHROPIC_FEDERATION_RULE_ID","ANTHROPIC_ORGANIZATION_ID","ANTHROPIC_WORKSPACE_ID","ANTHROPIC_SERVICE_ACCOUNT_ID","ANTHROPIC_IDENTITY_TOKEN","ANTHROPIC_IDENTITY_TOKEN_FILE","ANTHROPIC_SCOPE","ANTHROPIC_PROFILE","ANTHROPIC_CONFIG_DIR","CLAUDE_CODE_FEDERATION_CACHE_DIR","HOME","XDG_CONFIG_HOME","APPDATA","USERPROFILE","HOMEDRIVE","HOMEPATH","PROGRAMDATA","ALLUSERSPROFILE","ANTHROPIC_CUSTOM_HEADERS","CLAUDE_CODE_HOST_CREDS_FILE","CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST","CLAUDE_CODE_HOST_AUTH_ENV_VAR","CLAUDE_CONFIG_DIR","CLAUDE_SECURESTORAGE_CONFIG_DIR","CLAUDE_CODE_REMOTE_SETTINGS_PATH","CLAUDE_CODE_MANAGED_SETTINGS_PATH","CLAUDE_CODE_DISABLE_ADMIN_ENV_UNION","CLAUDE_CODE_MOCK_REMOTE_SETTINGS","USE_LOCAL_OAUTH","USE_STAGING_OAUTH","CLAUDE_LOCAL_OAUTH_API_BASE","CLAUDE_LOCAL_OAUTH_APPS_BASE","CLAUDE_LOCAL_OAUTH_CONSOLE_BASE","CLAUDE_BRIDGE_BASE_URL","CLAUDE_BRIDGE_OAUTH_TOKEN","CLAUDE_BRIDGE_SESSION_INGRESS_URL","CLAUDE_REMOTE_TOOLS_BRIDGE_URL","CLAUDE_CODE_GB_BASE_URL"].map((i)=>i.toUpperCase()));function Bq(i){if(!i||!i.env&&!("managedMcpServers"in i))return i;let{managedMcpServers:c,...T}=i;return i.env?{...T,env:cr(i.env,(D,w)=>Fq.has(w.toUpperCase()))}:T}function Fy(){let i=Gy();if(i===null||bu()||zy(wn(),i))return!1;if(Ry(i))return!0;return By(i).some(([,c])=>Ry(c))}function By(i){let c=hi(i);if(c.length===0)return[];return[...ry().chain,void 0].flatMap((T)=>c.filter(([D])=>yu(D)===T))}function Ry(i){let c=i.managedMcpServers;return n(c)&&Object.keys(c).length>0}function zy(i,c){return c===i.verifiedPayload||Boolean(_s())}function Gy(){let i=wn();if(!_s()&&i.eligible!==!0)return i.heldSoFar(null);if(i.sessionCache){if(i.sessionCache!==i.seededUnjudged||!Ll())return i.sessionCache;i.sessionCache=null,i.seededUnjudged=null,un()}let c=Ru()!==void 0,T=Nq();if(T){if(i.seedFromDisk(T),i.seededUnjudged=Ll()?null:i.sessionCache,c)ue().invalidatePolicyLayer();else un();return i.sessionCache}return i.heldSoFar(null)}function Wy(i){let c=Gy(),T=wn(),D=zy(T,c)?c:zq(T,c);if(D===null)return null;if(!bu())return D;if(T.projectedView?.raw!==D)T.projectedView={raw:D,view:Ay(D)};let w=T.projectedView.view;if(!i)return w;if(T.projectedParse?.raw!==D){let v={...w},U=i(D);Au(v,Ay(U)??{});for(let{alias:B,canonical:K}of Qo)if((St(v,[K])??null)!==null&&(St(w,[K])??null)===null)delete v[B];if(g()){for(let{path:K,names:de}of Ny){let pe=[w,v].flatMap((me)=>St(me,K)??[]);if(pe.length>0)vt(v,K,oS(pe,de))}let B=D===T.verifiedPayload?HS(D,U??{}):void 0;if(B!==void 0)Au(v,{pluginConfigs:B})}T.projectedParse={raw:D,view:v}}return T.projectedParse.view}function Au(i,c){for(let[T,D]of Object.entries(c)){let w=i[T];if(w!==D&&n(w)&&n(D)){let v={...w};Au(v,D),i[T]=v}else i[T]=D}}function zq(i,c){if(c===null)return null;if(i.unverifiedView?.raw!==c)i.unverifiedView={raw:c,view:Bq(c)};return i.unverifiedView.view}var Gq=a(new Set,(i)=>i.clear());function jy(i){Gq.add(i)}var Ky=a(new Set,(i)=>i.clear());function $y(i,c){let T=c.filter((D)=>!Ky.has(`${i}:${D}`));for(let D of T)Ky.add(`${i}:${D}`);return T}var qLe=a({noFollowAny:"untried",localVolumes:void 0},(i)=>{i.noFollowAny="untried",i.localVolumes=void 0});var QLe=Symbol("no procfs"),eIe=Symbol("descriptor path unreadable");var tIe=Symbol("boundRead.linkToNothing");var Wq={opus:"ANTHROPIC_DEFAULT_OPUS_MODEL",sonnet:"ANTHROPIC_DEFAULT_SONNET_MODEL",haiku:"ANTHROPIC_DEFAULT_HAIKU_MODEL",fable:"ANTHROPIC_DEFAULT_FABLE_MODEL"},Vy=["ANTHROPIC_BEDROCK_BASE_URL","ANTHROPIC_BEDROCK_MANTLE_BASE_URL","ANTHROPIC_VERTEX_BASE_URL","ANTHROPIC_FOUNDRY_BASE_URL"],Yy=[...Cl,"ANTHROPIC_BASE_URL","CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS","CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP","AWS_REGION","AWS_PROFILE",...Vy,"AWS_BEARER_TOKEN_BEDROCK",...pu,"ANTHROPIC_VERTEX_PROJECT_ID","CLOUD_ML_REGION","ANTHROPIC_FOUNDRY_RESOURCE"],aIe=[...Cl,...Vy,"ANTHROPIC_BASE_URL","AWS_REGION","AWS_DEFAULT_REGION","AWS_PROFILE","CLOUD_ML_REGION","ANTHROPIC_VERTEX_PROJECT_ID","ANTHROPIC_FOUNDRY_RESOURCE","ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION",...Et.map(([,i])=>i)],lIe=[...Yy,"AWS_ENDPOINT_URL_BEDROCK_RUNTIME","AWS_ENDPOINT_URL_BEDROCK","AWS_ENDPOINT_URL","AWS_ENDPOINT_URL_STS","AWS_ENDPOINT_URL_SSO","AWS_ENDPOINT_URL_SSO_OIDC","AWS_ENDPOINT_URL_SIGNIN","ANTHROPIC_BEDROCK_REGION_PREFIX","AWS_CONFIG_FILE","AWS_SHARED_CREDENTIALS_FILE","GOOGLE_APPLICATION_CREDENTIALS","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN",..._i],Xy=["AWS_BEARER_TOKEN_BEDROCK","AWS_CONFIG_FILE","AWS_SHARED_CREDENTIALS_FILE","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","GOOGLE_APPLICATION_CREDENTIALS","ANTHROPIC_BEDROCK_SERVICE_TIER"],Kq=["ANTHROPIC_BEDROCK_BASE_URL","ANTHROPIC_BEDROCK_MANTLE_BASE_URL"];function jq(i,c){return}function Jy(i,c){let T=new Map(Object.entries(i).map(([de,pe])=>[de.toUpperCase(),pe])),D=new Set(Object.entries(c??{}).filter(([,de])=>de.trim()!=="").map(([de])=>de.toUpperCase())),w=jq(c,T.get("AWS_REGION"))!==void 0&&Kq.some((de)=>T.get(de)==="")?["AWS_BEARER_TOKEN_BEDROCK"]:[],v=Boolean(T.get("AWS_CONFIG_FILE"))&&T.get("AWS_ACCESS_KEY_ID")==="",U=D.has("AWS_PROFILE")||D.has("AWS_ACCESS_KEY_ID"),B=D.has("AWS_CONFIG_FILE")||D.has("AWS_SHARED_CREDENTIALS_FILE"),K=D.has("AWS_ACCESS_KEY_ID");if(!(B||K))return{dropped:[],cleared:w};return{dropped:["AWS_CONFIG_FILE","AWS_SHARED_CREDENTIALS_FILE",...v||K||D.has("AWS_PROFILE")?["AWS_PROFILE"]:[],...v&&!U?["AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","AWS_BEARER_TOKEN_BEDROCK"]:[]],cleared:[...w,...K&&!T.has("AWS_SESSION_TOKEN")&&!D.has("AWS_SESSION_TOKEN")?["AWS_SESSION_TOKEN"]:[]]}}var dIe=[...Yy,"AWS_CONFIG_FILE","AWS_SHARED_CREDENTIALS_FILE","GOOGLE_APPLICATION_CREDENTIALS","AWS_ACCESS_KEY_ID","AWS_SECRET_ACCESS_KEY","AWS_SESSION_TOKEN","ANTHROPIC_BEDROCK_SERVICE_TIER",...Object.values(Wq),"ANTHROPIC_DEFAULT_MODEL","ANTHROPIC_SMALL_FAST_MODEL","ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION",...Et.map(([,i])=>i),"ANTHROPIC_CUSTOM_HEADERS"],Zy=["availableModels","availableModelsMatch","modelPicker"];function qy(i){let c=fn(i.trim().toLowerCase());if(c==="")return{kind:"ignored"};if(Ie(c))return{kind:"family",family:c};let T=c.startsWith("claude-")?c.slice(7):"";if(Ie(T))return{kind:"family",family:T};if(Dt(c)||c==="default")return{kind:"ignored"};let D=J(c)!==null||c.startsWith("claude-")?c:`claude-${c}`,w=J(D);return w!==null?{kind:"model",id:w,latest:Vq(D,w),spelling:D}:{kind:"literal",value:c}}function $q(i,c){let T=i.toLowerCase(),D=T.lastIndexOf(c.base);return D===-1?"":T.slice(D+c.base.length)}function Vq(i,c){return c.trailer===void 0&&$q(i,c).startsWith("-latest")}function Yq(i,c){for(let T of c){if(Ie(T))continue;let D=T.indexOf(i);if(D===-1)continue;let w=D+i.length;if(w===T.length||T[w]==="-")return!0}return!1}function Xq(i){return i.charAt(0).toUpperCase()+i.slice(1)}function Qy(i){let c;for(let T of Qn){let D=J(T);if(D!==null&&D.family===i&&!D.legacyVersionFirst&&(c===void 0||er(D,c)>0))c=D}return c?.base}function eO(i,c){let T=qy(i);switch(T.kind){case"ignored":{if(i.trim()==="")return"An empty availableModels entry was ignored.";let D=Qy("opus");return`"${L(i)}" in availableModels was ignored, because "availableModelsMatch" is "exact" and this name means a different model depending on the release and settings. List the model IDs you want to allow instead${D===void 0?"":`, for example "${D}"`}.`}case"family":{let D=c.filter((v)=>qy(v).kind!=="ignored").map((v)=>fn(v.trim().toLowerCase()));if(Ie(i.trim().toLowerCase())&&Yq(T.family,D))return;let w=Qy(T.family);return`"${L(i)}" in availableModels allows every ${Xq(T.family)} model, including future releases, even though "availableModelsMatch" is "exact". To allow only some versions, list their model IDs instead${w===void 0?"":`, for example "${w}"`}.`}case"model":return;case"literal":return Jq(i,T.value)}}function Jq(i,c){let T=`"${L(i)}" in availableModels allows only a model named exactly "${L(c)}".`,D=c.replace(/(\d)\.(\d)/g,"$1-$2");if(D!==c){let v=D.startsWith("claude-")?D:`claude-${D}`;if(J(v)!==null)return`${T} To allow a version, write it with a hyphen: "${L(v)}".`}let w=new RegExp(`^(${Oe.join("|")})\\s+(\\d+)(?:\\.(\\d+))?$`).exec(c);if(w){let[,v,U,B]=w;return`${T} To allow a version, write its model ID, for example "claude-${v}-${U}${B!==void 0?`-${B}`:""}".`}return}function Zq(i){return i!==void 0&&(i.commit!==void 0||i.pr!==void 0)}function tO(i,c){let T=i?.commitTrailers;if(typeof T==="boolean")return T?"explicit-enabled":"disabled";if(i!==void 0&&Zq(i))return i.commit===""?"disabled":"implicit-enabled";if(c!==void 0)return c?"implicit-enabled":"disabled";return}import{closeSync as cQ,lstatSync as lO,openSync as uQ,readdirSync as pQ,readSync as fQ,realpath as mQ,realpathSync as gQ,statSync as _Q}from"node:fs";import{join as VIe,posix as Oi,resolve as dO,sep as EQ}from"node:path";import{promisify as hQ}from"node:util";import{posix as qq}from"path";var nO=String.raw`(?![\p{Default_Ignorable_Code_Point}\u{16FE4}])[\p{L}\p{M}\p{N}._-]`;var{dirname:Si,isAbsolute:bIe,join:yi,normalize:RIe,relative:TIe,sep:DIe}=qq,Es="/mnt/user-data/uploads",Qq="/uploads",oO="/uploads/cowork-folders/",LIe=`${Es}${oO.slice(Qq.length)}`;var IIe=new RegExp(`^(${oO}[a-z0-9-]+/)(?:CLAUDE\\.md|\\.cowork-folder)$`);var wIe=yi(Si(Es),"outputs");var PIe=yi(Si(Es),"attachments"),xIe=yi(Si(Es),"project-docs"),eQ="/connector-downloads",rO=String.raw`download-[0-9a-f]{8}\.[a-z0-9]{2,5}`,tQ=String.raw`(?!(?:(?<![\p{L}\p{N}\p{M}])|(?<=\p{M}{8}))\p{M})${nO}`,nQ=String.raw`[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}/(?:${rO}|(?![.-])(?:${tQ}){1,80}\.[a-z0-9]{2,5})`,NIe=new RegExp(`/${rO}$`),kIe=new RegExp(`^${nQ}$`,"u");var oQ=yi(Si(Es),eQ),rQ="/browser-downloads";var Tu=yi(Si(Es),rQ);function sO(){return oQ}var sQ="/mnt/project-files",vIe=Object.freeze({product:sQ,attach:"/mnt/attach/project-files"});import{join as iQ,resolve as aQ}from"node:path";function iO(i){let c=ye();if(c===null)return!1;let T=lQ(aQ(iQ(c,"projects"))),D=i.split(/[\\/]/).map((w)=>w.slice(0,255));return D.length===T.length+2&&T.every((w,v)=>w===gi(D[v]))&&/\.[0-9a-f]{16}$/.test(gi(D.at(-2)))}function lQ(i){return i.split(/[\\/]/).map(gi)}import{constants as Du}from"fs";function aO(){return Du.O_RDONLY|dQ()}function dQ(){if(m()==="windows")return 0;return Du.O_NOFOLLOW|Du.O_NONBLOCK}var iwe=hQ(mQ.native),cO="connector-downloads";function SQ(i){if(typeof i!=="string")return!1;return i.split(/[\\/]/).slice(0,-1).some(Lu)}function uO(i){if(typeof i!=="string")return!1;let c=Oi.normalize(i.split("/").slice(0,-1).join("/"));return c===Tu||c.startsWith(`${Tu}/`)}function yQ(i){return i!==void 0&&(SQ(`${i}/.`)||uO(`${i}/.`))}var OQ=new RegExp(`^${cO}[. ]*(?::.*)?$`);function Lu(i){return i.length>=cO.length&&OQ.test(i.toLowerCase().replaceAll("ſ","s").replace(nu,""))}var AQ=1000;var wl=a(new Map,(i)=>i.clear()),CQ=256,Pl=/^([^~./\\]{1,6})~\d+(\.[^./\\]{0,3})?$/;function bQ(i,c,T){if(wl.size>=CQ)wl.clear();wl.set(i,{expanded:c,dev:T.dev,ino:T.ino})}function RQ(i){if(process.platform!=="linux"||!i.startsWith("/"))return;let c=i.split("/").filter((D)=>D!=="");if(!c.some((D)=>Pl.test(D))||m()!=="wsl")return;let T="/";try{for(let D of c){let w=Pl.exec(D);if(w===null){T=Oi.join(T,D);continue}let v=Oi.join(T,D),U=_Q(v,{bigint:!0}),B=wl.get(v);if(B!==void 0&&B.dev===U.dev&&B.ino===U.ino){T=B.expanded;continue}let K;if(!Ze(U.ino)){let pe=pQ(T);for(let me of DQ(pe,D,w[1])){let Ae;try{Ae=lO(Oi.join(T,me),{bigint:!0})}catch{continue}if(Ae!==void 0&&Ae.dev===U.dev&&Ae.ino===U.ino){K=me;break}}}let de=Oi.join(T,K??D);bQ(v,de,U),T=de}}catch{return}return T}function TQ(i){if(process.platform!=="win32"||He(i))return;try{return gQ.native(i)}catch{return}}function DQ(i,c,T){let D=T.toLowerCase(),w=i.filter((K)=>K!==c),v=w.filter((K)=>!Pl.test(K)),U=v.filter(Lu),B=v.filter((K)=>!U.includes(K)&&K.replace(/[ .]/g,"").toLowerCase().startsWith(D));return[...U,...B,...v.filter((K)=>!U.includes(K)&&!B.includes(K)),...w.filter((K)=>Pl.test(K))].slice(0,AQ)}function LQ(i){return i.replace(/[\\/][^\\/]*$/,"")}var Il=a(new Map,(i)=>i.clear());function xl(i){if(uO(`${i}/.`))return!0;let c=Il.get(i);if(c!==void 0)return c;let T=!1;for(let D of pO(i)){let w=dO(D).split(/[\\/]/);for(let v=0;v<w.length&&!T;v++)if(Lu(w[v])){let U=w.slice(0,v+1).join("/");T=U===sO()||iO(U)||PQ(`${U}/.gitignore`)}}if(Il.size>=64)Il.clear();if(T||!i.includes("~"))Il.set(i,T);return T}var IQ=/^(download-[0-9a-f]{8}(-\d+)?(\.[^./\\]*)?|\..+\.from\.json|\.download-[0-9a-f]{8}(-\d+)?(\.[^./\\]*)?\.part)$/;function wQ(i){let c=lO(i);if(!c.isFile()||c.size>3)return"";let T=uQ(i,aO());try{let D=Buffer.alloc(4),w=fQ(T,D,0,D.length,0);return D.subarray(0,w).toString("utf8")}finally{cQ(T)}}function PQ(i){let c=l();try{let T=Qe(c,i);if(c.readdirSync(LQ(i)).some((w)=>IQ.test(w.name)))return!0;if(T.absentAt!==void 0)return!1;return["*",`*
|
|
41
|
+
`,`*\r
|
|
42
|
+
`].includes(wQ(i))}catch{return!0}}function Ai(i){return pO(i).some(yQ)}function pO(i){let c=m();if(!i.includes("~")||c!=="windows"&&c!=="wsl")return[i];let T=dO(i).split(/[\\/]/);return[i,...T.flatMap((D,w)=>{if(!D.includes("~")&&w<T.length-1)return[];let{resolvedPath:v,isCanonical:U}=be(l(),Je(T.slice(0,w+1).join(EQ)));return U?[TQ(v)??RQ(v)??v]:[]})]}var xQ=["allowManagedMcpServersOnly","allowedMcpServers","deniedMcpServers","disabledMcpjsonServers","enabledMcpjsonServers","enableAllProjectMcpServers","disableClaudeAiConnectors","managedMcpServers"];function Nl({slot:i,adminTiers:c}){return i?.allowManagedMcpServersOnly===!0||c.some((T)=>T.allowManagedMcpServersOnly===!0)}function Iu({slot:i,adminTiers:c}){return i?.allowedMcpServers??c.find((T)=>T.allowedMcpServers!==void 0)?.allowedMcpServers}function fO(i,c){return xQ.filter((T)=>i[T]!==void 0&&!NQ(T,i,c))}function NQ(i,c,T){let D=T.slot??{};switch(i){case"deniedMcpServers":return!0;case"allowManagedMcpServersOnly":return c.allowManagedMcpServersOnly===Nl(T);case"disableClaudeAiConnectors":return c.disableClaudeAiConnectors===(D.disableClaudeAiConnectors===!0||T.adminTiers.some((w)=>w.disableClaudeAiConnectors===!0));case"allowedMcpServers":return O(c.allowedMcpServers,Nl(T)?Iu(T):D.allowedMcpServers);case"disabledMcpjsonServers":return(c.disabledMcpjsonServers??[]).every((w)=>D.disabledMcpjsonServers?.includes(w)===!0);case"enabledMcpjsonServers":return(c.enabledMcpjsonServers??[]).every((w)=>D.enabledMcpjsonServers?.includes(w)===!0);case"enableAllProjectMcpServers":return(c.enableAllProjectMcpServers??!1)===(D.enableAllProjectMcpServers??!1);case"managedMcpServers":{let w=D.managedMcpServers??{};return Object.entries(c.managedMcpServers??{}).every(([v,U])=>Object.hasOwn(w,v)&&O(w[v],U))}}}var Ci=64;var kQ=2000000;function hs(i,c=Ci){if(!wu(i))return{copy:M(i),cut:0,dropped:[]};let T=Array.isArray(i)?[]:{},D=0,w=new Map,v=[{from:i,into:T,depth:1}],U=0;for(let K=v.pop();K;K=v.pop()){if(U+=1,U>kQ)throw RangeError("settings document has too many objects to copy");let de=Array.isArray(K.from)?K.from.entries():Object.entries(K.from);for(let[pe,me]of de){let Ae=K.top??String(pe),Pe=me;if(wu(me))if(K.depth>=c){D+=1;let Re=w.get(Ae);if(Re)Re.count+=1;else{let xe=[String(pe)];for(let ke=K;ke;ke=ke.up)if(ke.key!==void 0)xe.unshift(String(ke.key));w.set(Ae,{key:Ae,count:1,path:xe.join(".")})}if(!Array.isArray(K.into)&&vQ(me))continue;Pe=null}else{let Re=Array.isArray(me)?[]:{};v.push({from:me,into:Re,depth:K.depth+1,key:pe,up:K,top:Ae}),Pe=Re}else if(typeof me==="object"&&me!==null||typeof me==="function")Pe=M(me);if(Array.isArray(K.into))K.into.push(Pe);else Object.defineProperty(K.into,pe,{value:Pe,enumerable:!0,writable:!0,configurable:!0})}}let B=new Map(Object.keys(i).map((K,de)=>[K,de]));return{copy:T,cut:D,dropped:[...w.values()].sort((K,de)=>(B.get(K.key)??0)-(B.get(de.key)??0))}}function vQ(i){let c=new Set,T=[i];for(let D=T.pop();D;D=T.pop()){if(Array.isArray(D))return!1;if(c.has(D))continue;c.add(D);for(let w of Object.values(D)){if(!wu(w))return!1;T.push(w)}}return!0}function wu(i){if(typeof i!=="object"||i===null)return!1;let c=Object.getPrototypeOf(i);return Array.isArray(i)||c===Object.prototype||c===null}var mO=512;function Pu(i){return i.map(MQ)}function MQ(i){let{file:c,severity:T,docLink:D,statusOnly:w,startupFatal:v,loadedWithoutGuardHook:U,errorClass:B,errno:K,unreadCause:de,preserveOnWrite:pe,mcpErrorMetadata:me,userWritable:Ae,wslIgnored:Pe,substituted:Re,onlySubstitutes:xe,removal:ke,unattendedSafe:Te,line:Fe,column:$e,path:ot,message:ft,expected:ut,suggestion:st,invalidValue:yt,...Lt}=i,zt=Lt;return{file:c,severity:T,docLink:D,statusOnly:w,startupFatal:v,loadedWithoutGuardHook:U,errorClass:B,errno:K,unreadCause:de,preserveOnWrite:pe,mcpErrorMetadata:me,userWritable:Ae,wslIgnored:Pe,substituted:Re,onlySubstitutes:xe,removal:ke,unattendedSafe:Te,line:Fe,column:$e,path:bi(ot),message:bi(ft),expected:ut===void 0?void 0:bi(ut),suggestion:st===void 0?void 0:bi(st),invalidValue:typeof yt==="string"?bi(yt):void 0}}function bi(i){let c=yy(i.replace(/\s+/gu," "));return c.length>mO?`${c.slice(0,mO-1)}…`:c}function gO(i,c){if(c===null)return i;let T=[...c.values];return{settings:ln(hn(i.settings,T.filter(([,D])=>D===void 0).map(([D])=>D)),M(Object.fromEntries(T.filter(([,D])=>D!==void 0))),(D,w)=>w),errors:[...i.errors,...c.errors]}}var UQ=[["permissions","additionalDirectories"],["permissions","blockReadsExemptPaths"],["autoMode","allow"],["autoMode","environment"],["enabledMcpjsonServers"],["extraKnownMarketplaces"],["sandbox","excludedCommands"],["sandbox","ignoreViolations"],["sandbox","filesystem","allowRead"],["sandbox","filesystem","allowWrite"],["sandbox","network","allowedDomains"],["sandbox","network","allowMachLookup"],["sandbox","network","allowUnixSockets"],["sandbox","network","httpProxyPort"],["sandbox","network","socksProxyPort"]],HQ=[["allow",!0],["deny",!1],["ask",!1]];function _O(i){let c=M(i);for(let D of UQ)vt(c,D,void 0);for(let D of Hn()){let w=dr(D,c);if(D.path[0]!=="disableAllHooks"&&St(c,D.path)!==void 0&&!So(D.restrictive).some((v)=>v===w))vt(c,D.path,void 0)}for(let[D,w]of HQ){let v=["permissions",D],U=St(c,v);if(Array.isArray(U)){let B=U.filter((K)=>lr.test(String(K))===w);vt(c,v,B.length>0?B:void 0)}}for(let D of qo){let w=["autoMode",D],v=St(c,w);if(Array.isArray(v)&&!v.includes($o))vt(c,w,[$o,...v])}let T=St(c,["enabledPlugins"]);if(n(T)){let D=Object.entries(T).filter(([,w])=>w!==!0);vt(c,["enabledPlugins"],D.length>0?Object.fromEntries(D):void 0)}return c}var FQ="bot_protected_tengu_foamy_pebble",BQ=new pr;function EO(){return BQ.read(FQ,!0)}var Lo="https://code.claude.com/docs/en",zQ=[{matches:(i)=>i.path==="permissions.defaultMode"&&i.code==="invalid_value",tip:{suggestion:'Valid modes: "acceptEdits" (ask before file changes), "plan" (analysis only), "bypassPermissions" (auto-accept all), or "default" (standard behavior)',docLink:`${Lo}/iam#permission-modes`}},{matches:(i)=>i.path==="apiKeyHelper"&&i.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:(i)=>i.path==="cleanupPeriodDays"&&i.code==="too_small",tip:{suggestion:'cleanupPeriodDays must be at least 1. To keep transcripts for a long time, set a large number (e.g. 3650 for ~10 years). To disable transcript writes entirely, remove this setting and use the --no-session-persistence CLI flag or the SDK persistSession:false option instead. (0 is rejected because it previously silently disabled all transcript writes, which users setting it to mean "never clean up" did not expect.)'}},{matches:(i)=>i.path.startsWith("env.")&&i.code==="invalid_type",tip:{suggestion:'Environment variables must be strings. Wrap numbers and booleans in quotes. Example: "DEBUG": "true", "PORT": "3000"',docLink:`${Lo}/settings#environment-variables`}},{matches:(i)=>(i.path==="permissions.allow"||i.path==="permissions.deny")&&i.code==="invalid_type"&&i.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:(i)=>i.path==="hooks"&&i.code==="unrecognized_keys",tip:{suggestion:"Not a recognized hook event. Common events: PreToolUse, PostToolUse, UserPromptSubmit, SessionStart, SessionEnd, Stop. Check spelling and capitalization.",docLink:`${Lo}/hooks`}},{matches:(i)=>/\.hooks\.\d+\.command$/.test(i.path)&&i.code==="invalid_type"&&i.received==="undefined",tip:{suggestion:'Command hooks require `command`. For exec form (no shell), set `command` to the executable and `args` to its arguments: {"type": "command", "command": "echo", "args": ["hi"]}. For shell form, set `command` to the full shell string: {"type": "command", "command": "echo hi"}.',docLink:`${Lo}/hooks#exec-form-and-shell-form`}},{matches:(i)=>i.path.includes("hooks")&&i.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:(i)=>i.code==="invalid_type"&&i.expected==="boolean",tip:{suggestion:'Use true or false without quotes. Example: "includeCoAuthoredBy": true'}},{matches:(i)=>i.code==="unrecognized_keys",tip:{suggestion:"Check for typos or refer to the documentation for valid fields",docLink:`${Lo}/settings`}},{matches:(i)=>i.code==="invalid_value"&&i.enumValues!==void 0,tip:{suggestion:void 0}},{matches:(i)=>i.code==="invalid_type"&&i.expected==="object"&&i.received===null&&i.path==="",tip:{suggestion:"Check for missing commas, unmatched brackets, or trailing commas. Use a JSON validator to identify the exact syntax error."}},{matches:(i)=>i.path==="permissions.additionalDirectories"&&i.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:`${Lo}/iam#working-directories`}}],GQ={permissions:`${Lo}/iam#configuring-permissions`,env:`${Lo}/settings#environment-variables`,hooks:`${Lo}/hooks`};function hO(i){let c=zQ.find((D)=>D.matches(i));if(!c)return null;let T={...c.tip};if(i.code==="invalid_value"&&i.enumValues&&!T.suggestion)T.suggestion=`Valid values: ${i.enumValues.map((D)=>`"${D}"`).join(", ")}`;if(!T.docLink&&i.path)T.docLink=GQ[Tt(i.path,".")];return T}var Xwe=e(()=>zh(cs(),{strictPolicyHelperKeys:!0}).strict());function SO(i){return i.code==="invalid_type"}function yO(i){return i.code==="invalid_value"}function WQ(i){return i.code==="unrecognized_keys"}function OO(i){return i.code==="too_small"}function bO(i){return i.severity!=="warning"&&!i.loadedWithoutGuardHook}var KQ='a PreToolUse/PermissionRequest hook that cannot be loaded does not run, nor does any other hook of the document where "hooks" is listed here as ignored; fix or remove the entry. The managed settings document is not skipped for it, unlike a user or project settings file';function RO(i){return i.map((c)=>c.severity!=="warning"&&c.message.includes(Oo)?{...c,message:c.message.replace(Oo,()=>KQ),loadedWithoutGuardHook:!0}:c)}function gn(i){if(i===null)return"null";if(i===void 0)return"undefined";if(Array.isArray(i))return"array";return typeof i}function AO(i){let c=i.match(/received (\w+)/);return c?c[1]:void 0}function Ri(i,c){return i.issues.flatMap((D)=>{if(D.code!=="invalid_union"||D.path.join(".")!=="attribution")return[D];let w=D.errors.flat().filter((v)=>v.path.length>0);return w.length>0?w.map((v)=>({...v,path:[...D.path,...v.path]})):[D]}).map((D)=>{let w=D.path.map(String).join("."),v=D.message,U,B,K,de,pe;if(yO(D))B=D.values.map((Ae)=>String(Ae)),K=B.join(" | "),de=void 0,pe=void 0;else if(SO(D)){K=D.expected;let Ae=AO(D.message);de=Ae??gn(D.input),pe=Ae??gn(D.input)}else if(OO(D))K=String(D.minimum);else if(D.code==="custom"&&"params"in D)de=D.params.received,pe=de;let me=hO({path:w,code:D.code,expected:K,received:de,enumValues:B,message:D.message,value:de});if(yO(D))U=B?.map((Ae)=>`"${Ae}"`).join(", "),v=`Invalid value. Expected one of: ${U}`;else if(SO(D)){let Ae=AO(D.message)??gn(D.input);if(D.expected==="object"&&Ae==="null"&&w==="")v="Invalid or malformed JSON";else v=`Expected ${D.expected}, but received ${Ae}`}else if(WQ(D)){let Ae=D.keys.join(", ");v=`Unrecognized ${se(D.keys.length,"field")}: ${Ae}`}else if(OO(D))v=`Number must be greater than or equal to ${D.minimum}`,U=String(D.minimum);return{file:c,path:w,message:v,expected:U,invalidValue:pe,suggestion:me?.suggestion,docLink:me?.docLink}})}function jQ(i,c,T){if(!i||typeof i!=="object")return[];let D=i;if(!D.permissions||typeof D.permissions!=="object")return[];let w=D.permissions,v=[],U=new Map;for(let B of["allow","deny","ask"]){let K=w[B];if(!Array.isArray(K))continue;let de=K.filter((pe)=>{if(typeof pe!=="string")return v.push({file:c,path:`permissions.${B}`,message:`Non-string value in ${B} array was removed`,severity:"warning",invalidValue:pe}),!1;let me=Nc(pe,B);if(!me.valid){let Ae=`Invalid permission rule "${pe}" was skipped: ${me.error}`;if(me.suggestion)Ae+=`. ${me.suggestion}`;return v.push({file:c,path:`permissions.${B}`,message:Ae,severity:"warning",invalidValue:pe}),!1}return!0});if(T?.policySource&&B!=="allow"&&K.length>0&&de.length===0){if(!T.strictParseFollows)continue;U.set(B,"unreadable")}else if(de.length<K.length)U.set(B,"trimmed");w[B]=de}return Yc("permissions",w,(B)=>U.get(B),(B)=>v.push({file:c,path:B.path,message:B.message,severity:"warning",...B.substituted&&{substituted:B.substituted}})),v}var $Q=new Set(q),VQ=Ci/2;function YQ(i){let c=[{array:i,depth:1}];for(let T=c.pop();T;T=c.pop())for(let D of T.array)if(Array.isArray(D))c.push({array:D,depth:T.depth+1});else if(T.depth>=VQ&&(D===null||n(D)&&Object.values(D).includes(null)))return!0;return!1}function XQ(i,c){if(!i||typeof i!=="object")return[];return[...nE(i,oE)?[{file:c,path:"hooks",message:`PreToolUse/PermissionRequest hooks are declared outside "hooks" (at the top level or under another key) — ${Oo}.`,severity:"fatal",docLink:"https://code.claude.com/docs/en/hooks"}]:[],...JQ(i,c)]}function JQ(i,c){if(!("hooks"in i))return[];if(i.hooks===null||typeof i.hooks!=="object"||Array.isArray(i.hooks)){let w=gn(i.hooks);if(Array.isArray(i.hooks)&&(i.hooks.some(n)||ac(i.hooks)||YQ(i.hooks)))return[{file:c,path:"hooks",message:`"hooks" must be an object mapping event names to matcher arrays; received ${w} — ${Oo}.`,invalidValue:w,docLink:"https://code.claude.com/docs/en/hooks"}];return delete i.hooks,[{file:c,path:"hooks",message:`"hooks" must be an object mapping event names to matcher arrays; received ${w}. This field was ignored.`,severity:"warning",invalidValue:w,docLink:"https://code.claude.com/docs/en/hooks"}]}let T=i.hooks;if(tl(T))return[{file:c,path:"hooks",message:`"hooks" must be an object mapping event names to matcher arrays; received a single matcher — ${Oo}.`,docLink:"https://code.claude.com/docs/en/hooks"}];let D=[];for(let w of Object.keys(T)){let v=wt(w);if(!$Q.has(w)){if(gr(T[w],3,{matchersCount:!Array.isArray(T[w])})){D.push({file:c,path:`hooks.${v}`,message:`"${v}" is not a hook event, but it holds PreToolUse/PermissionRequest hooks — ${Oo}.`,docLink:"https://code.claude.com/docs/en/hooks"});continue}delete T[w],D.push({file:c,path:`hooks.${v}`,message:`Unknown hook event "${v}" was ignored. Valid events: ${q.join(", ")}`,severity:"warning",invalidValue:v,docLink:"https://code.claude.com/docs/en/hooks",preserveOnWrite:!0});continue}if(!Array.isArray(T[w])){let U=T[w],B=gn(U);if(ni.has(w)&&U!==null||gr(U,3,{matchersCount:!1})){D.push({file:c,path:`hooks.${v}`,message:`Hook event "${v}" must be an array of matchers; received ${B} — ${Oo}.`,invalidValue:B,docLink:"https://code.claude.com/docs/en/hooks"});continue}delete T[w],D.push({file:c,path:`hooks.${v}`,message:`Hook event "${v}" must be an array of matchers; received ${B}. This entry was ignored.`,severity:"warning",invalidValue:B,docLink:"https://code.claude.com/docs/en/hooks",...U!==null&&{preserveOnWrite:!0}})}}for(let[w,v]of Object.entries(T)){let{stripped:U,unloadableGuards:B}=sE(v,w);for(let K of B)D.push({file:c,path:K.aboutType?`hooks.${w}.${K.path}.type`:`hooks.${w}.${K.path}`,message:`${K.problem} — ${Oo}.${K.aboutType?` Valid types: ${[...el()].join(", ")}`:""}`,severity:"fatal",invalidValue:K.received,docLink:"https://code.claude.com/docs/en/hooks"});for(let K of U)D.push({file:c,path:K.aboutType?`hooks.${w}.${K.path}.type`:`hooks.${w}.${K.path}`,message:K.aboutType?`${K.problem}; entry ignored. Valid types: ${[...el()].join(", ")}`:`${K.problem}; ${K.hookIndex===void 0?"matcher":"entry"} ignored.`,severity:"warning",invalidValue:K.received,docLink:"https://code.claude.com/docs/en/hooks",preserveOnWrite:!0})}if(D.length>0&&Object.keys(T).length===0)delete i.hooks;return D}var ZQ=[{key:"allowedMcpServers",schema:fl},{key:"deniedMcpServers",schema:ml}];function qQ(i,c,T){if(!i||typeof i!=="object")return[];let D=i,w=[];for(let{key:v,schema:U}of ZQ){if(!(v in D))continue;if(!Array.isArray(D[v])){if(T?.keepWholeFieldInvalid)continue;let de=D[v];delete D[v],w.push({file:c,path:v,message:`"${v}" must be an array; received ${gn(de)}. This field was ignored.`,severity:"warning",invalidValue:de});continue}let B=D[v],K=[];for(let de=0;de<B.length;de++){let pe=U().safeParse(B[de]);if(pe.success)K.push(B[de]);else w.push({file:c,path:`${v}[${de}]`,message:`Invalid entry was ignored: ${pe.error.issues[0]?.message??"failed validation"}`,severity:"warning",invalidValue:B[de]})}if(K.length<B.length)D[v]=K}return w}var QQ=["strictKnownMarketplaces","blockedMarketplaces"];function eee(i){if(!n(i)||!Object.values(i).includes(null))return;for(let c of El())if(i[c]===null)delete i[c]}function tee(i,c,T){if(!n(i))return[];let D=[];for(let w of QQ){let v=i[w];if(!Array.isArray(v))continue;let U=[],B=[];for(let K=0;K<v.length;K++){let de=ri().safeParse(v[K]);if(!de.success){U.push(v[K]),B.push(K);continue}let pe=Vc(de.data);if(pe===null){U.push(v[K]),B.push(K);continue}if(w==="blockedMarketplaces"){U.push(v[K]),B.push(K),D.push({file:c,path:`${w}[${K}]`,message:`Unenforceable entry was kept: ${pe}; it can never match a marketplace source, but marketplace restrictions stay active`,severity:"warning"});continue}D.push({file:c,path:`${w}[${K}]`,message:`Invalid entry was ignored: ${pe}`,severity:"warning"})}if(U.length<v.length)i[w]=U,T?.set(w,B)}return D}function nee(i,c){if(!n(i)||i.managedMcpServers===void 0)return[];let D=[],w=Ja(i.managedMcpServers,(v,U)=>D.push({file:c,path:v?`managedMcpServers.${v}`:"managedMcpServers",message:v?`Managed MCP server was ignored: ${U}`:U,severity:"warning"}));if(w===void 0)delete i.managedMcpServers;else i.managedMcpServers=w;return D}function oee(i){if(!i||typeof i!=="object")return;let c=i.source;if(!c||typeof c!=="object")return;let T=c.source;return typeof T==="string"?T:void 0}function ree(i){if(!i||typeof i!=="object")return!1;let c=i.source;if(!c||typeof c!=="object")return!1;let T=c.plugins;return Array.isArray(T)&&T.some(Lc)}function see(i,c){if(!i||typeof i!=="object")return[];let T=i,D="extraKnownMarketplaces";if(!(D in T))return[];let w=T[D];if(!w||typeof w!=="object"||Array.isArray(w)){let B=gn(w);return delete T[D],[{file:c,path:D,message:`"${D}" must be an object mapping marketplace names to declarations; received ${B}. This field was ignored.`,severity:"warning",invalidValue:B}]}let v=w,U=[];for(let B of Object.keys(v)){let K=Fc().safeParse(v[B]),de,pe=!1;if(!K.success){let me=oee(v[B]);if(me!==void 0&&!ZE.has(me)||ree(v[B]))continue;de=rl(K.error.issues)}else if(K.data.source.source==="settings"&&K.data.source.name!==B)de=`key "${Vn(B)}" must match the settings source name "${Vn(K.data.source.name)}"`;if(de!==void 0)U.push({file:c,path:`${D}.${Vn(B)}`,message:pe?"Marketplace entry was ignored: its name reads like an official Anthropic or Claude marketplace. It stays in this file: rename it (the key and the source's name) to use it, or delete it. If /plugin also shows a marketplace of this name as refused, remove that one in /plugin → Marketplaces once this entry is renamed or deleted.":`Invalid marketplace entry was ignored: ${de}`,severity:"warning",...pe&&{preserveOnWrite:!0}}),delete v[B]}return U}function iee(i,c){if(!i||typeof i!=="object")return[];let T=i,D="modelPicker";if(!(D in T))return[];let w=T[D];if(!n(w)||!Array.isArray(w.options)){let K=n(w)?`options: ${gn(w.options)}`:gn(w);return delete T[D],[{file:c,path:D,message:`"${D}" must be an object with an "options" array of { model, label?, description?, behavesAs? } rows; received ${K}. This field was ignored.`,severity:"warning",invalidValue:K}]}let v=[];if("replaceBuiltInOptions"in w&&typeof w.replaceBuiltInOptions!=="boolean"){let K=gn(w.replaceBuiltInOptions);delete w.replaceBuiltInOptions,v.push({file:c,path:`${D}.replaceBuiltInOptions`,message:`"replaceBuiltInOptions" must be true or false; received ${K}. This entry was ignored (the rows are added to the built-in lineup).`,severity:"warning",invalidValue:K})}let U=w.options,B=[];for(let K=0;K<U.length;K++){let de=Gc().safeParse(U[K]);if(de.success){B.push(U[K]);continue}v.push({file:c,path:`${D}.options.${K}`,message:`${lee(de.error.issues[0])}. This row was ignored; the other rows still apply.`,severity:"warning",invalidValue:gn(U[K])})}if(B.length!==U.length)w.options=B;return v}function aee(i,c){if(!i||typeof i!=="object"||Array.isArray(i))return[];let T=i;if(!("modelPricing"in T)||T.modelPricing===void 0)return[];let D=T.modelPricing;if(!D||typeof D!=="object"||Array.isArray(D))return delete T.modelPricing,[{file:c,path:"modelPricing",message:`"modelPricing" must be an object; received ${gn(D)}. It was ignored.`,severity:"warning"}];let w=D,v=[];if(w.multiplier!==void 0&&!zc().safeParse(w.multiplier).success)v.push({file:c,path:"modelPricing.multiplier",message:'"multiplier" must be a number greater than 0 and at most 10. It was ignored.',severity:"warning",invalidValue:w.multiplier}),delete w.multiplier;if(w.overrides!==void 0){let U=w.overrides;if(!U||typeof U!=="object"||Array.isArray(U))v.push({file:c,path:"modelPricing.overrides",message:`"overrides" must be an object mapping model ID to rates; received ${gn(U)}. It was ignored.`,severity:"warning"}),delete w.overrides;else{let B=U;for(let K of Object.keys(B)){let de=Bc().safeParse(B[K]);if(de.success&&K!=="constructor"&&K!=="__proto__")continue;let pe=de.success?void 0:de.error.issues[0];v.push({file:c,path:`modelPricing.overrides.${Vn(K)}`,message:`Invalid pricing row was ignored (${pe?`${pe.path.join(".")||"row"}: ${pe.message}`:"not a model ID"}).`,severity:"warning",invalidValue:B[K]}),delete B[K]}}}return v}function lee(i){if(!i)return"Invalid modelPicker row";return`modelPicker row ${i.path.length>0?`"${i.path.join(".")}" `:""}${i.message}`.trim()}function dee(i,c,T){if(!i||typeof i!=="object"||Array.isArray(i))return[];let D=i,w=D.crossSessionInbound;if(w===void 0||cee(w))return[];if(T?.policySource)D.crossSessionInbound="refuse";else delete D.crossSessionInbound;return[mee(w,c,T?.policySource===!0)]}function cee(i){return typeof i==="string"&&di.includes(i)}var uee="crossSessionInbound";function Ti({dropped:i,copy:c},T,D=!1){return i.map(({key:w,count:v,path:U})=>{let B=Vn(w),K=`${v===1?"A value":`${v} values`} under "${B}" ${v===1?"is":"are"} nested more than ${Ci} levels deep`;if(w==="hooks"&&n(c)&&Array.isArray(c.hooks))return{file:T,path:"hooks",message:`"hooks" is written as nested arrays and holds ${v===1?"a value":`${v} values`} more than ${Ci} levels deep that ${v===1?"was":"were"} left out — ${Oo}. Write "hooks" as an object of event names.`,severity:"fatal",docLink:"https://code.claude.com/docs/en/hooks"};return{file:T,path:pee(U),message:`${K}, so Claude Code ignores ${v===1?"it":"them"}${D?`, and leaves ${v===1?"it":"them"} out if it saves a setting to this file`:""}. Reduce the nesting under "${B}".`,severity:"warning"}})}function xu(i,c){return{dropped:c.dropped.filter(({key:T})=>n(i)&&Object.hasOwn(i,T)),copy:i}}function pee(i){let c=i.split(".").map(Vn);return(c.length<=7?c:[...c.slice(0,6),"…"]).join(".")}function fee(i){let c=di.map((D)=>`"${D}"`).join(", "),T=typeof i==="string"?`"${Vn(i).replace(/^<key>$/,"<value>")}"`:gn(i);return`must be one of ${c}; received ${T}`}function mee(i,c,T=!1){let D=di.map((v)=>`"${v}"`).join(", "),w=T?'In managed settings an unrecognized value is treated as "refuse" (the most restrictive): cross-session messages to this session are turned away until an administrator fixes it.':"This value was ignored; while it is present, cross-session messages are held for your approval instead of being delivered. Set it to one of the values above.";return{file:c,path:uee,message:`"crossSessionInbound" ${fee(i)}. ${w}`,severity:"warning",expected:D,...T&&{statusOnly:!0}}}function gee(i,c,T){if(!n(i))return[];let D=i.teammateMode;if(D===void 0||Zs.some((K)=>K===D))return[];let w=T?.policySource===!0;if(!w)delete i.teammateMode;let v=Zs.map((K)=>`"${K}"`).join(", "),U=typeof D==="string"?`"${Vn(D).replace(/^<key>$/,"<value>")}"`:gn(D);return[{file:c,path:"teammateMode",message:`"teammateMode" must be one of ${v}; received ${U}. ${w?'In managed settings this value is ignored and teammates use the mode from other settings or the default ("in-process").':'This value is ignored and teammates use the mode from your other settings or the default ("in-process"); change it to one of the values above.'}`,severity:"warning",expected:v,...w?{statusOnly:!0}:{unattendedSafe:!0}}]}var CO="remoteControl.shareHostProfile";function _ee(i,c,T){if(!n(i)||i.remoteControl===void 0)return[];let D=T?.policySource===!0,w=pl.map((Ae)=>`"${Ae}"`).join(", "),v=D?'In managed settings this is treated as "off" (the most restrictive): Remote Control environments report nothing about this machine until an administrator fixes it.':"While it is present, Remote Control environments report nothing about this machine.",U=(Ae)=>({file:c,path:CO,message:`${Ae}. ${v}`,severity:"warning",expected:w,...D?{statusOnly:!0}:{preserveOnWrite:!0}}),B=(Ae)=>typeof Ae==="string"?`"${Vn(Ae).replace(/^<key>$/,"<value>")}"`:gn(Ae),K=i.remoteControl;if(!n(K)){if(D)i.remoteControl={shareHostProfile:"off"};else delete i.remoteControl;return[U(`"remoteControl" must be an object like { "shareHostProfile": ${w.replace(/, /g," | ")} }; received ${B(K)}`)]}let de=[],pe=Object.keys(K).filter((Ae)=>Ae!=="shareHostProfile");if(pe.length>0){if(D)K.shareHostProfile="off";de.push(U(`"remoteControl" has an unrecognized key ${pe.map((Ae)=>`"${Vn(Ae)}"`).join(", ")} (its only key is "shareHostProfile")`))}let me=K.shareHostProfile;if(me!==void 0&&!(typeof me==="string"&&pl.includes(me))){if(D)K.shareHostProfile="off";else delete K.shareHostProfile;de.push(U(`"${CO}" must be one of ${w}; received ${B(me)}`))}return de}var Eee=["enabledMcpjsonServers","disabledMcpjsonServers"],hee=/^[A-Za-z0-9_-]+$/;function See(i){if(!n(i))return;for(let c of Eee){let T=i[c];if(typeof T==="string"&&hee.test(T))i[c]=[T]}}function Di(i,c,T){let D=[...oy(i,c)];if(eee(i),!T?.policySource)See(i);return D.push(...jQ(i,c,{policySource:T?.policySource,strictParseFollows:T?.mcpServerEntrySalvageOnly}),...XQ(i,c),...see(i,c),...iee(i,c),...aee(i,c),...dee(i,c,{policySource:T?.policySource}),..._ee(i,c,{policySource:T?.policySource}),...gee(i,c,{policySource:T?.policySource}),...T?.skipMcpServerEntryFilter?[]:qQ(i,c,{keepWholeFieldInvalid:T?.mcpServerEntrySalvageOnly}),...T?.mcpServerEntrySalvageOnly?nee(i,c):[],...T?.mcpServerEntrySalvageOnly?tee(i,c,T.marketplacePatternIndexMapOut):[]),D}function Wu(i){let c=new Set(i.allowedSources);return c.add("flagSettings"),c.add("policySettings"),qn.filter((T)=>c.has(T))}function Cee(){return dn(Wo(),"managed-settings.json")}function TO(i){return i.path===""&&(bO(i)||i.userWritable===!0)}function Nu(i){return i.map((c)=>{let{invalidValue:T}=c,D=T!==void 0&&T!==null,w=D?nn(T):void 0,v=w===void 0?void 0:x(w);return{...c,path:x(c.path),message:x(c.message),...c.expected!==void 0&&{expected:x(c.expected)},...c.suggestion!==void 0&&{suggestion:x(c.suggestion)},...D&&(w===void 0||typeof T==="string"||v!==w)&&{invalidValue:v}}})}function Kl(i){if(i.diskless)return{settings:null,errors:[],documentHasPolicyContent:!1,loadState:"absent"};if(_a(i))return As(i.parentManaged??{},Fu);let c,T=(ut)=>{if(ut===Ku)return!0;return c??=i.asksOrganization?.()===!0,c&&ut()},D=!1,w=new Map,v=new Set,U=LO(i,(ut,st,yt)=>{if(ut.settings===null){if(w.delete(st),!T(yt))return ut;return ht.forEach((Lt)=>v.add(Lt)),{...ut,errors:Nu(ut.errors)}}if(!T(yt))return w.set(st,jo(ut.settings,Zo)),ut;return D=!0,{...ut,settings:{},errors:Nu(ut.errors)}});if(!D)return v.size===0?U:{...U,lostSignInPins:[...v]};let B=new Map,K=new Map,de=LO(i,(ut,st,yt)=>{if(ut.settings===null||!T(yt))return B.delete(st),K.delete(st),{...ut,settings:ut.settings&&{},errors:[]};let Lt=bee(ut,ut.settings,st);for(let zt of ht)if(ut.settings[zt]!==void 0&&Lt.settings?.[zt]===void 0)v.add(zt);return B.set(st,Object.keys(Lt.settings??{})),K.set(st,Lt.errors.slice(ut.errors.length)),Lt}),pe=new Set([...K.values()].flat()),me=de.errors.filter((ut)=>TO(ut)&&!pe.has(ut)&&!U.errors.some((st)=>TO(st)&&st.file===ut.file));if(me.length>0)ht.forEach((ut)=>v.add(ut));let Ae=[...U.errors,...Nu(me),...pe],Pe=io(Io(U),Io(de)),Re=U.settings??{},xe=de.settings??{},ke=!ys({...U,settings:Re})&&{heldOnly:!0};if(Object.keys(xe).length===0)return{...U,errors:Ae,loadState:Pe,...ke,lostSignInPins:[...v]};let Te=Object.keys(Re).length===0,Fe=Object.assign({},...w.values()),$e={...Te?xe:hn(Ul([Re,xe],"merge",!1,0).admin,"parentSettingsBehavior"),...jo(Re,"parentSettingsBehavior"),...Fe},ot=$e,ft=Re;for(let[ut,st]of B)for(let yt of st)if(yt in ft&&O(ot[yt],ft[yt]))Ae.push({file:ut,path:x(yt),message:`In a cloud session that takes its managed settings from your organization, a managed settings file may only restrict: "${x(yt)}" was ignored in ${x(ut)}, since another managed settings document sets it and this one adds nothing to it.`,severity:"warning",statusOnly:!0,userWritable:!0});return{...Te?de:U,settings:$e,errors:Ae,loadState:Pe,...ke,lostSignInPins:[...v],...!Rs(Re)&&{onlyHeldContent:!0},settingsNotHeld:Re,heldOffPlugins:Object.keys(xe.enabledPlugins??{}).filter((ut)=>Re.enabledPlugins?.[ut]===void 0),heldAllowLists:qu.filter((ut)=>xe[ut]!==void 0&&Re[ut]===void 0)}}function bee(i,c,T){let D=vy(c),w=Ree(c,D).map((v)=>({...v,key:x(v.key)}));if(w.length===0)return i;if(!DO.has(T))DO.add(T),t(`${x(T)}: not taken as written: ${w.map(({key:v})=>v).join(", ")}: this session takes its managed settings from its organization, and a managed settings file may only restrict there`,{level:"warn"});return{...i,settings:D,errors:[...i.errors,...w.filter(({key:v})=>!nr(v)).map(({key:v,became:U})=>({file:T,path:v,message:`In a cloud session that takes its managed settings from your organization, a managed settings file may only restrict: "${v}" ${U} in ${x(T)}.`,severity:"warning",statusOnly:!0,userWritable:!0}))]}}function Ree(i,c){let T=(D,w)=>w==="disableAllHooks"&&i.disableAllHooks===!0&&c.allowManagedHooksOnly===!0?'was taken as "allowManagedHooksOnly"':w==="allowManagedHooksOnly"&&D===!0?'was set by "disableAllHooks"':D===void 0?"was ignored":"was kept in part";return Object.keys(i).flatMap((D)=>{let w=i[D],v=c[D];if(O(w,v))return[];if(!n(w)||!n(v))return[{key:D,became:T(v,D)}];return Object.keys(w).filter((U)=>!O(w[U],v[U])).map((U)=>({key:`${D}.${U}`,became:T(v[U],D)}))})}function WO(i){return m()==="wsl"&&(!i||hu())}var DO=a(new Set,(i)=>i.clear()),ku=a(new Set,(i)=>i.clear());function LO(i,c){let T=i.mdm?.()?.heldDocuments??[];if(WO(i.asksOrganization?.()===!0)){let D=ao(jl({...i,file:()=>({settings:null,errors:[]})}));if(i.wslInherits?.()){let w=T.length===0?void 0:D||ao(Li(En,i.store)),v=Li(En,i.store,c,w?T:[]);if(w??(ao(v)||D))return v;let U=Li(Wo(),i.store,c,T);return{...U,errors:[...v.errors,...U.errors],loadState:io(v.loadState,U.loadState)}}if(D)return Li(null,i.store,c,T)}return Li(Wo(),i.store,c,T)}var Ku=()=>!0;function Tee(i,c,T){T.push(...c.errors);let{settings:D}=c;if(!D||Object.keys(D).length===0)return;for(let[w,v]of hl){let U=w.split(".");if(St(D,U)===void 0)continue;let B=c.errors.find((pe)=>pe.substituted&&pe.path===w),K=B!==void 0,de=St(i.merged,U);if(K&&de!==void 0&&!i.floors.has(w)){let pe=U.at(-1);if(v.inert.has(v.read(de))){c_(D,U),T.push({file:B.file,path:w,message:`That substitute is not applied: "${pe}" keeps the value an earlier managed-settings document of this folder wrote.`,severity:"warning",statusOnly:!0});continue}T.push({file:B.file,path:w,message:`That substitute also displaces the wider "${pe}" an earlier managed-settings document of this folder wrote, until this document is fixed.`,severity:"warning",statusOnly:!0})}if(K)i.floors.add(w);else i.floors.delete(w)}if(i.merged=ln(i.merged,D,so),i.found=!0,Rs(D)&&!c.errors.some((w)=>w.onlySubstitutes))i.authored=!0}function ju(i){return i.endsWith(".json")&&!i.startsWith(".")}function Dee(i){return(i.isFile()||i.isSymbolicLink())&&ju(i.name)}function IO(i,c,T,D){let w=i.managedFileProtections,v={file:D,folder:i.managedDocumentLinks.folderIsLink.get(c)===!1?w.folderOwners.get(c):void 0,posix:m()!=="windows"&&!T.startsWith(En)};return w.note(T,An({...v,linked:i.managedDocumentLinks.isLinked(T)})),()=>$u(i,T,v.file,v.folder)}function $u(i,c,T,D){let w=process.geteuid?.(),v=process.getuid?.();if(WO(!0)&&(c===Po||c.startsWith(`${En}${Aee}`)))return wO;if(w===0||v===0)return!0;if(m()==="windows"||w===void 0)return wO;let B=i.managedDocumentLinks.linkOf(c),K=$m(w,v);if(Md(K,T,B===null?D:T)!==!1||B?.kind==="unverified")return!0;let pe=i.policy.writableNow??=new Map,me=pe.get(c)??vd(c);if(pe.set(c,me),me!=="no")return!0;let Ae=i.policy.walkedDocuments??=new Map,Pe=Ae.get(c)??Vm(c,K,i.policy.certainDirectories??=new Map);return Ae.set(c,Pe),Pe}var wO=!1;function PO(i,c,T,D,w){let v=i.managedDocumentLinks;v.noteWalked(dn(c,...T),!D.errors.some((U)=>U.errorClass==="unreadable"),()=>Bm(c,T,w,v.folderIsLink,i.managedFileProtections.folderOwners))}function Li(i,c,T=(w)=>w,D=[]){let w=[],v={merged:{},found:!1,authored:!1,floors:new Set},U=!1,B="absent";for(let{path:Te,parsed:Fe,userWritable:$e}of D){let ot=vu(v,w,T,()=>({parsed:Fe,isHeld:Ku}),Te,$e);B=io(B,ot.loadState),U||=Os(ot.parsed)}if(i===null)return xO(v,w,U,B,c);let K=dn(i,"managed-settings.json"),de=vu(v,w,T,()=>{let Te=Fl(K,c,void 0,!0);if(Io(Te)==="absent")return{parsed:Te,isHeld:()=>!1};return PO(c,i,["managed-settings.json"],Te),{parsed:Te,isHeld:IO(c,Ft(i),K,Te.fileOwner)}},K);B=io(B,de.loadState),U||=Os(de.parsed);let pe=dn(i,"managed-settings.d"),me=[],Ae,Pe=c.frozenFolderMembership(pe),Re=void 0,xe,ke=(Te)=>{let Fe=r(Te),$e=Fe==="ENOENT"||Fe==="ENOTDIR";if(c.noteFolderListed(pe,$e?[]:"failed"),c.noteRawFolderListing(pe,$e?"absent":"failed"),!$e)t(`managed-settings.d read failed: ${Te}`,{level:"error"}),w.push(Pi(pe,Te,"directory")),B="didNotLoad",T({settings:null,errors:[]},pe,()=>!0)};try{let Te=c.folderListingForPolicyWalk(pe);if(Te!==void 0)me=Te;else{let Fe;try{Fe=l().readdirSync(pe).filter(Dee)}catch(ot){if(Pe===void 0)throw ot;Re=ot,Fe=[]}let $e=Fe.map((ot)=>ot.name).sort();if(xe=new Set($e),Ae=new Set(Fe.filter((ot)=>!ot.isFile()).map((ot)=>ot.name)),Re===void 0)c.noteRawFolderListing(pe,$e),c.noteWalkListing(pe,$e);me=$e}if(Pe!==void 0)me=f([...me,...Pe]).sort();c.noteFolderListed(pe,me)}catch(Te){ke(Te)}for(let Te of me){let Fe=dn(pe,Te),$e=vu(v,w,T,()=>{let ot=Fl(Fe,c,void 0,!0);if(Io(ot)==="absent")return{parsed:ot,isHeld:()=>!1};return PO(c,i,["managed-settings.d",Te],ot,xe?.has(Te)===!0?Ae?.has(Te):void 0),{parsed:ot,isHeld:IO(c,pe,Fe,ot.fileOwner)}},Fe);B=io(B,$e.loadState),U||=Os($e.parsed)}if(Re!==void 0)ke(Re);return xO(v,w,U,B,c)}function vu(i,c,T,D,w,v){let U=c.length,B={settings:null,errors:[],loadState:"didNotLoad"},K=B,de=()=>!0,pe;try{let me=D();K=me.parsed,de=me.isHeld;let Ae=T(K,w,de);if(Ae.settings&&Object.keys(Ae.settings).length>0)pe={...i,merged:M(i.merged),floors:new Set(i.floors)};if(Tee(i,Ae,c),pe!==void 0)ku.delete(w);return{parsed:K,loadState:Io(K)}}catch(me){if(Vt(me))throw me;if(!ku.has(w))ku.add(w),fe(me);if(pe!==void 0)Object.assign(i,pe);return c.length=U,c.push(Mee(w,me,{userWritable:v})),T(B,w,de===Ku?de:()=>{try{return de()}catch{return!0}}),{parsed:K,loadState:"didNotLoad"}}}function xO(i,c,T,D,w){let v=i.found&&bs(i.merged)?i.merged:null;if(v?.forceLoginOrgUUID!==void 0)w.managedFileProtections.setsOrgPin=!0;return{settings:v,errors:c,documentHasPolicyContent:T,loadState:D,...v!==null&&!i.authored&&Rs(v)&&{onlySubstitutes:!0}}}function Lee(i,c){if(_(i))Fee(c);else t(x(`settings file read failed at ${c}: ${i}`),{level:"error"})}function Fl(i,c,T,D){let w=T!==void 0?`${i}\x00pinned`:i,v=c.parsedFiles.get(w);if(v){if(v.settings!==null&&!c.walkRead(w)&&Object.keys(v.settings).length>0)c.noteReadFromDisk(i,!0);return{...v,settings:v.settings?M(v.settings):null}}let U,B=vee(i,T,D,({ino:K,size:de,mtimeMs:pe,ctimeMs:me})=>{U={ino:K,size:de,mtimeMs:pe,ctimeMs:me}});if(T===void 0&&B.loadState==="absent")U??=null;if(U!==void 0)c.noteFirstRead(i,U);if(T===void 0)c.noteReadFromDisk(i,B.settings!==null&&!!U?.size),c.noteRead(i,B,D===!0);return c.parsedFiles.set(w,B),{...B,settings:B.settings?M(B.settings):null}}function Hu(i,c,T){let D=Fl(i,c,T),w=D.settings===null&&D.errors.some((v)=>v.errorClass==="unreadable")?c.settingsAtLastRead(i):void 0;if(w===void 0||!EO())return D;return c.noteKeptCopyServed(i),{...D,settings:_O(w)}}function jl(i){let c=i.mdm?.();if(!c)return{settings:null,errors:[],documentHasPolicyContent:!1,loadState:"absent"};return{settings:c.settings&&Object.keys(c.settings).length>0?c.settings:null,errors:Gee(c,()=>Vu(i),()=>i.file?.()??Kl(i)),documentHasPolicyContent:Os(c),loadState:Io(c),...c.onlySubstitutes&&{onlySubstitutes:c.onlySubstitutes}}}function As(i,c){return Iee(KO(i,c))}function KO(i,c){let T=NO.get(i),D=T?.get(c);if(D)return D;let w=wee(i,c);if(T)T.set(c,w);else NO.set(i,new Map([[c,w]]));return w}function Iee(i){return{settings:i.settings&&M(i.settings),errors:i.errors.map((c)=>({...c})),documentHasPolicyContent:i.documentHasPolicyContent,loadState:i.loadState,removed:i.removed,...i.onlySubstitutes&&{onlySubstitutes:i.onlySubstitutes}}}var NO=new WeakMap;function wee(i,c){let T=hs(i),D=T.copy,w=[...Ti(T,c),...Di(D,c,{skipMcpServerEntryFilter:!0,policySource:!0})],v=[],U=Zc(YO(c,v),c,D).safeParse(D);if(!U.success)return{settings:null,errors:[...w,...Ri(U.error,c)],documentHasPolicyContent:!1,loadState:"didNotLoad",removed:[]};let B=[...aA(w,U.data,v),...v],K=i,de=Object.keys(U.data).length>0?U.data:null;return{settings:de,errors:B,documentHasPolicyContent:dA(i,U.data),loadState:"loaded",removed:Object.keys(K).filter((pe)=>jO(pe,K[pe])&&U.data[pe]===void 0&&B.every((me)=>me.statusOnly||me.path!==pe&&!me.path.startsWith(`${pe}.`))),...de!==null&&v.some((pe)=>pe.onlySubstitutes)&&{onlySubstitutes:!0}}}function jO(i,c){let T=El();return T.includes(i)||Qo.some(({alias:D,canonical:w})=>D===i&&T.includes(w))?Jc(i,c):Sl(i)&&$O(i,c)}function $O(i,c){return c===null||n(c)&&Object.keys(c).length>0&&Object.entries(c).every(([T,D])=>{let w=`${i}.${T}`;return Jc(w,D)||Sl(w)&&$O(w,D)})}function nr(i){return Ud()&&(i==="managedMcpServers"||i.startsWith("managedMcpServers."))}var $l=["managedMcpServers","isolation","attributionProjectPolicy"],Pee=[...$l,"deniedModels","availableModelsMatch"];function VO(i,c){if(!n(i))return[];let T=[];for(let D of Pee){if(!(D in i))continue;if(delete i[D],!nr(D))T.push({file:c,path:D,message:`"${D}" is only honored from managed settings and was ignored here.`,severity:"warning",preserveOnWrite:!0})}return T}function YO(i,c){return(T)=>{if(nr(T.path))return;if(c.push({file:i,path:T.path,message:T.message,severity:"warning",...T.statusOnly&&{statusOnly:T.statusOnly},...T.startupFatal&&{startupFatal:T.startupFatal},...T.substituted&&{substituted:T.substituted},...T.onlySubstitutes&&{onlySubstitutes:T.onlySubstitutes},...T.removal&&{removal:T.removal}}),T.statusOnly||T.startupFatal)t(x(`${i}: ${T.path}: ${T.message}`),{level:T.startupFatal?"error":"warn"})}}function Vu(i){let c=i?.remote?i.remote():Wy((Pe)=>As(Pe,"remote managed settings").settings),T=!i?.remote&&!nr("managedMcpServers")&&Fy()?[{file:"remote managed settings",path:"managedMcpServers",message:"The organization's MCP servers in the cached remote settings are withheld until the server confirms them this session; they connect as soon as it does.",severity:"warning",statusOnly:!0}]:[],D=i?.remote?void 0:wy(),w=(D?.state==="stale_cache"||D?.state==="failed")&&D.failure.errorKind==="ruled_empty"?Pu(D.failure.rulings??[]):[];if(!c||Object.keys(c).length===0)return{settings:null,errors:[...T,...w],servedSnapshot:!1,documentHasPolicyContent:!1};let{settings:v,errors:U,documentHasPolicyContent:B,onlySubstitutes:K}=As(c,"remote managed settings"),de=xy(c),pe=de&&KO(de,"remote managed settings"),me=(pe?.errors??[]).filter(({path:Pe,substituted:Re})=>Re===!0&&n(St(pe?.settings,Pe.split(".")))&&!Ta(St(de,Pe.split(".")))),Ae=[...OA,"deniedMcpServers","skillOverrides"].flatMap((Pe)=>{let Re=Pe.split("."),[xe,ke]=Re,Te=($e)=>{let ot=St($e,Re);return xe==="autoMode"&&ke!==void 0&&Array.isArray(ot)?ui(St($e,[xe])).lists[ke]===void 0:Ta(ot)},Fe=St(de,Re);return!Ta(Fe)&&!(Pe==="skillOverrides"&&n(Fe))&&Te(pe?.settings)&&Te(c)?pe?.errors.find(({path:$e})=>$e===Pe||$e.startsWith(`${Pe}[`))??(xe==="autoMode"&&ke!==void 0&&ui(St(pe?.settings,[xe])).listsThatLostARule.has(ke)?{file:"remote managed settings",path:Pe,message:`None of these rules is in effect: the autoMode block lists may hold ${qc} characters together, hard_deny first, and none of these fits`,suggestion:"Shorten the autoMode block lists",severity:"warning"}:[]):[]});return{settings:v,errors:[...T,...w,...Pu([...me,...Ae,...U])],servedSnapshot:Py(c),documentHasPolicyContent:B,...K&&{onlySubstitutes:K}}}var Fu="parent managed settings";function xee(i){let c=i.parentManaged;if(!c||Object.keys(c).length===0)return{settings:null,errors:[]};let T=As(c,Fu);for(let D of $l)if(T.settings?.[D]!==void 0&&!nr(D))T.errors.push({file:Fu,path:D,message:`"${D}" is only honored from the organization's managed settings sources (server-managed, MDM, managed-settings.json), not from settings a host passes in, and was ignored here.`,severity:"warning",statusOnly:!0});return T}function Nee(i){return null}function XO(i){let c=i.flagInline;if(!c)return{settings:null,errors:[]};let T=Ud(),D=i.store.inlineFlagParse;if(D?.inline!==c||D.desktopSupplied!==T)D={inline:c,desktopSupplied:T,parsed:kee(c)},i.store.inlineFlagParse=D;let{settings:w,errors:v}=D.parsed;return{settings:w&&M(w),errors:v.map((U)=>({...U}))}}function kee(i){let c=hs(i),T=c.copy,D=[...VO(T,"SDK inline settings"),...Ti(xu(T,c),"SDK inline settings"),...Di(T,"SDK inline settings")],w=_l(T).safeParse(T);if(!w.success)return{settings:null,errors:[...D,...Ri(w.error,"SDK inline settings")]};if(D.some((v)=>v.severity==="fatal"))return{settings:null,errors:D};return{settings:w.data,errors:D}}var wi=2097152;function vee(i,c,T,D){try{let w;if(c!==void 0)w=c;else{let v=T||Uee(i)?be(l(),i):Qe(l(),i);if(T){let U={};w=Go(v.resolvedPath,wi,(K)=>{U.owner={uid:K.uid,gid:K.gid,mode:K.mode},D?.(K)});let B=Bl(w,i,T);return U.owner?{...B,fileOwner:U.owner}:B}w=Go(v.resolvedPath,wi,D)}return Bl(w,i,T)}catch(w){return zee(w,i)}}function Bl(i,c,T){if(i.trim()==="")return{settings:{},errors:[],loadState:"loaded"};let D=ar(i,!1);if(T){if(!n(D))return{settings:null,errors:[Vl(c)],loadState:"didNotLoad"};let K=hs(D),de=K.copy,pe=[...Ti(K,c),...Di(de,c,{skipMcpServerEntryFilter:!0,policySource:!0})],me=[],Ae=Zc(YO(c,me),c,de).safeParse(de);if(!Ae.success)return{settings:null,errors:[...pe,...Ri(Ae.error,c)],documentHasPolicyContent:!1,loadState:"didNotLoad"};return{settings:Ae.data,errors:[...aA(pe,Ae.data,me),...me],documentHasPolicyContent:dA(D,Ae.data),loadState:"loaded"}}let w=hs(D),v=w.copy,U=[...VO(v,c),...Ti(xu(v,w),c,!0),...Di(v,c)],B=_l(v).safeParse(v);if(!B.success){let K=D===null?km(i):void 0,de=Ri(B.error,c).map((pe)=>({...pe,...K}));return{settings:null,errors:[...U,...de]}}if(U.some((K)=>K.severity==="fatal"))return{settings:null,errors:U};return{settings:B.data,errors:U}}function Vl(i,{userWritable:c=!1}={}){return JO(i,"could not be parsed as a JSON object; none of its settings are in effect. Fix or remove it.",c)}function Mee(i,c,{userWritable:T=!1}={}){return JO(i,`could not be applied because of a bug in Claude Code, so none of its settings are in effect. Report this to Anthropic support. Error: ${c instanceof Error?c.message:String(c)}`,T)}function JO(i,c,T){return T?{file:i,path:"",message:`Managed settings document (${i}) ${c}`,severity:"warning",statusOnly:!0,userWritable:!0}:{file:i,path:"",message:`Managed settings document ${c}`,startupFatal:!0}}function Uee(i){let c=ye();if(c===null)return!1;let T=E(Wl(Ft(i))),D=Ft(c);return T===E(D)||T===Hee(D)}var Mu;function Hee(i){if(Mu?.lexical!==i){let c=Wl(i);Mu={lexical:i,physical:E(dn(_t(c)??c,Oee(i)))}}return Mu.physical}function Fee(i){t(x(`Broken symlink or missing file encountered for settings.json at path: ${i}`))}function Bee(){return{settings:null,errors:[],loadState:"absent"}}function zee(i,c){if(Vt(i))throw i;if(Lee(i,c),_(i))return Bee();return{settings:null,errors:[Pi(c,i)],loadState:"didNotLoad"}}function Pi(i,c,T="file"){return{file:i,path:"",message:`${T==="directory"?"Managed settings drop-in directory":"Settings file"} could not be read: ${c instanceof Error?c.message:String(c)}`,severity:"fatal",errorClass:"unreadable",...r(c)!==void 0&&{errno:r(c)}}}function ZO(i){return{file:i,path:"wslInheritsWindowsSettings",message:`"wslInheritsWindowsSettings" in ${i} holds a value that cannot be read (it takes true or false) and no Windows administrator policy is deployed beside it (HKLM or ${En}), so whether WSL inherits Windows policy is unknown: no Windows or managed-file policy is in effect (/etc/claude-code is not read beneath it), and unless server-managed settings supply the policy — they apply regardless — sign-in and policy enforcement fail closed until the flag is fixed.`,severity:"fatal",statusOnly:!0}}function kO(i){return i.path==="wslInheritsWindowsSettings"&&i.severity==="fatal"}function Gee(i,c,T){let D=i.withheldFlagRecord&&T().heldOnly===!0?[...i.errors,i.withheldFlagRecord]:i.errors;if(!D.some(kO))return D;if(!ys(c()))return D;return D.map((w)=>kO(w)?{...w,severity:"warning"}:w)}function qO(i){return}function Bu(i,c){let T=qO(i);if(T!==void 0)return T;switch(i){case"userSettings":return Ft(C());case"policySettings":return Ft(kl(c));case"projectSettings":return Ft(c.projectConfigDir??kl(c));case"localSettings":{if(c.launchsLocalSettingsStoreRoot!==void 0)return c.launchsLocalSettingsStoreRoot;if(c.projectConfigDir!==void 0)return Ft(c.projectConfigDir);return eA(kl(c),c.canonicalGitRoot)}case"flagSettings":return c.flagPath?Wl(Ft(c.flagPath)):Ft(kl(c))}}function QO(i){if(i.launchsLocalSettingsStoreRoot!==void 0){let c=i.projectConfigDir??i.cwd;return c!==null&&i.launchsLocalSettingsStoreRoot!==Ft(c)?Ft(c):null}if(i.projectConfigDir!==void 0||i.cwd===null)return null;return eA(i.cwd,i.canonicalGitRoot)!==Ft(i.cwd)?Ft(i.cwd):null}function kl(i){if(i.cwd===null)throw new Xe;return i.cwd}function eA(i,c){let T=Wee(i,c);if(T.decided!==void 0)return T.decided;if(!Vee(T.root))return T.cwdResolved;return T.root}function Wee(i,c){let T=c?.(i);if(!T)return{decided:Ft(i)};let D=Ft(T),w=Ft(i);if(D===w)return{decided:D};let v;try{v=Yee()}catch{return{decided:w}}if(D===v)return{decided:w};return{decided:void 0,root:D,cwdResolved:w}}function Kee(i){return ue().localStoreProbes.canonicalRootOwnerUids(i,jee)}function jee(i){let c=l(),T=null;try{T=c.lstatSync(dn(i,".claude")).uid}catch(D){if(!_(D))throw D}return{rootUid:c.statSync(i).uid,gitEntryUid:$ee(i),claudeEntryUid:T}}function $ee(i){let c=l();try{return c.lstatSync(dn(i,".git")).uid}catch(T){throw T}}function Vee(i){if(typeof process.getuid!=="function"&&typeof process.geteuid!=="function")return t(`localSettings: not canonicalizing the consent store to ${i} — this platform has no uid semantics to verify directory ownership with, so the store stays at the session cwd (canonicalization is POSIX-only)`,{level:"warn"}),!1;let c=typeof process.geteuid==="function"?process.geteuid():process.getuid?.();try{let{rootUid:T,gitEntryUid:D,claudeEntryUid:w}=Kee(i);if(T===c&&D===c&&(w===null||w===c))return!0;return t(`localSettings: not canonicalizing the consent store to ${i} — it (uid ${T}), its .git entry (uid ${D}), or its .claude entry (uid ${w??"absent"}) is not owned by the current user (uid ${c}); the store stays at the session cwd (the pre-canonicalization behavior). If you own this repo, chown it (including .git and .claude) or run from a directory you own.`,{level:"warn"}),!1}catch(T){return t(`localSettings: not canonicalizing the consent store to ${i} — its ownership could not be verified (${T instanceof Error?T.message:String(T)}); the store stays at the session cwd`,{level:"warn"}),!1}}function Yee(){return ue().localStoreProbes.normalizedRealHomeDir(Xee)}function Xee(){let i=_t(yee());if(i===null)throw Error("home directory realpath unavailable");return E(i)}var vO={default:"settings.json",cowork:"cowork_settings.json"};function Jee(i){if(i.coworkPlugins||Bt.CLAUDE_CODE_USE_COWORK_PLUGINS)return vO.cowork;return vO.default}function Ar(i,c){switch(i){case"userSettings":return dn(Bu(i,c),Jee(c));case"projectSettings":case"localSettings":{if(c.diskless||c.cwd===null&&c.projectConfigDir===void 0)return;let T=Bu(i,c),D=dn(T,zl(i));if(Yu(c)&&Ai(T)&&xl(T))return;return D}case"policySettings":return Cee();case"flagSettings":return c.flagPath}}function zl(i){switch(i){case"projectSettings":return dn(".claude","settings.json");case"localSettings":return dn(".claude","settings.local.json")}}function tA(i){if(i.diskless||qO("localSettings")!==void 0)return;let c=QO(i);if(c===null||Yu(i))return;return dn(c,zl("localSettings"))}function Yu(i){let c=i.projectConfigDir??i.cwd;return c!==null&&Ai(Ft(c))&&xl(Ft(c))}function Zee(i,c){if(i!=="projectSettings"&&i!=="localSettings"||c.diskless||c.cwd===null&&c.projectConfigDir===void 0)return[];if(!Yu(c))return[];let T=[],D=Bu(i,c),w=dn(D,zl(i));if(Ai(D)&&xl(D))T.push(w);let v=i==="localSettings"?QO(c):null;if(v!==null&&Ai(v))T.push(dn(v,zl("localSettings")));return T}var qee=" is not used: it is in a connector-downloads folder, where Claude Code saves files from claude.ai connectors, so no settings are taken from it. To use it, move or rename the folder named connector-downloads.";function Qee(i){return{file:i,path:"",message:`${x(i)}${qee}`,severity:"fatal",statusOnly:!0}}function ete(i,c){let T=c.repoTierFreeze.tier(i);if(T!==void 0)return T.settings;return c.perSource.get(i)}function nA(i,c){let T=ete(i,c.store);if(T!==void 0)return T;let D=xte(i,c,{keepUnreadableFileSettings:!0}),w=D&&Ii(i,D,c);return c.store.perSource.set(i,w),w}function oA(i){return(i.parentSettingsBehavior??(Ks()?"merge":"first-wins"))==="merge"}function tte(i,c=!1){return!i||oA(i)||c}var nte=[["permissions","defaultMode"],["modelPicker","replaceBuiltInOptions"]];function ote(i){let c={};for(let{path:T,restrictive:D}of Hn()){let w=St(i,T);if(T[0]==="sandbox"&&So(D).includes(w))vt(c,T,w)}return c.sandbox??{}}function rA(i){let c=i?.disableAllHooks;return c!==void 0&&c!==null&&c!==!1&&c!=="false"}var Xu=["disableRemoteControl","disableAgentView","disableWorkflows","disableArtifact"],Ju=["enableWorkflows","enableArtifact"],rte=new Set([...Xu,...Ju]);function zu(i,c,T,D){let w={};if(i.allowManagedHooksOnly===!0||i.disableAllHooks===!0||rA(T))w.allowManagedHooksOnly=!0;if(i.disableSkillShellExecution===!0)w.disableSkillShellExecution=!0;for(let K of Xu)if(i[K]===!0)w[K]=!0;for(let K of Ju)if(i[K]===!1)w[K]=!1;if(c.hooks===void 0&&!Object.values(c.enabledPlugins??{}).some((K)=>K!==!1&&K!==void 0)){if(i.allowedHttpHookUrls?.length===0)w.allowedHttpHookUrls=[];if(i.httpHookAllowedEnvVars?.length===0)w.httpHookAllowedEnvVars=[]}if(i.disableCommandPluginSources===!0)w.disableCommandPluginSources=!0;if(i.disableSideloadFlags===!0)w.disableSideloadFlags=!0;let v=Ko(i)??Ko(T??{});if(v!==void 0)w.pluginConfigs=v;if(i.disableWindowsBashCommandSplit===!0)w.disableWindowsBashCommandSplit=!0;if(i.allowManagedMcpServersOnly===!0)w.allowManagedMcpServersOnly=!0;if(i.disableClaudeAiConnectors===!0)w.disableClaudeAiConnectors=!0;if(i.syncClaudeAiSkills===!1)w.syncClaudeAiSkills=!1;if(i.syncClaudeAiPlugins===!1)w.syncClaudeAiPlugins=!1;if(i.remoteTools?.allowUnattendedServing===!1)w.remoteTools={...w.remoteTools,allowUnattendedServing:!1};if(i.allowManagedPermissionRulesOnly===!0)w.allowManagedPermissionRulesOnly=!0;if(i.disableAutoMode==="disable")w.disableAutoMode="disable";let U=i.remoteControl?.shareHostProfile;if(U==="off"||U==="basic")w.remoteControl={...w.remoteControl,shareHostProfile:U};if(tO(i.attribution,i.includeCoAuthoredBy)==="disabled")w.attribution={...w.attribution,commitTrailers:!1};if(i.attribution?.sessionUrl===!1)w.attribution={...w.attribution,sessionUrl:!1};let B=i.strictPluginOnlyCustomization;if(B===!0||Array.isArray(B)&&B.length>0)w.strictPluginOnlyCustomization=B;if(i.deniedMcpServers)w.deniedMcpServers=i.deniedMcpServers;if(i.blockedMarketplaces?.length)w.blockedMarketplaces=i.blockedMarketplaces;if(i.deniedModels&&i.deniedModels.length>0)w.deniedModels=i.deniedModels;if(c.forceLoginOrgUUID===void 0&&i.forceLoginOrgUUID)w.forceLoginOrgUUID=i.forceLoginOrgUUID;for(let K of Ss)if(c[K]===void 0&&i[K])Object.assign(w,{[K]:i[K]});if(i.enforceAvailableModels===!0)w.enforceAvailableModels=!0;if(i.availableModelsMatch==="exact")w.availableModelsMatch="exact";if(i.permissions){let K=jo(i.permissions,["deny","ask"]);for(let de of["deny","ask"]){let pe=K[de];if(pe!==void 0)K[de]=pe.filter((me)=>{if(!lr.test(me))return!0;return t(`Ignoring ${de} rule "${me}" from the parent process's managed settings: a rule starting with "!" removes paths from the rules listed before it instead of restricting anything, so it is not merged into the policy rules. Spell the deny without the exception instead.`,{level:"warn"}),!1})}if(i.permissions.disableBypassPermissionsMode==="disable")K.disableBypassPermissionsMode="disable";if(i.permissions.disableAutoMode==="disable")K.disableAutoMode="disable";if(i.permissions.blockReadsOutsideWorkingDirectories===!0)K.blockReadsOutsideWorkingDirectories=!0;if(i.permissions.blockWritesOutsideWorkingDirectories===!0)K.blockWritesOutsideWorkingDirectories=!0;if(i.permissions.denyInsteadOfPrompting===!0)K.denyInsteadOfPrompting=!0;if(c.allowManagedPermissionRulesOnly!==!0){let{allow:de,additionalDirectories:pe}=i.permissions;if(de&&c.sandbox?.network?.allowManagedDomainsOnly!==!0)K.allow=de;if(pe)K.additionalDirectories=pe}if(Object.keys(K).length>0)w.permissions=K}if(i.sandbox){let{network:K,filesystem:de,credentials:pe}=i.sandbox,me={},Ae=K?jo(K,["deniedDomains"]):{},Pe=de?jo(de,["denyRead","denyWrite"]):{};if(K){if(c.sandbox?.network?.allowManagedDomainsOnly!==!0&&K.allowedDomains)Ae.allowedDomains=K.allowedDomains}if(Object.keys(Ae).length>0)me.network=Ae;if(de){if(c.sandbox?.filesystem?.allowManagedReadPathsOnly!==!0&&de.allowRead)Pe.allowRead=de.allowRead}if(Object.keys(Pe).length>0)me.filesystem=Pe;if(pe){let Re=(pe.files??[]).map((Te)=>Te.mode==="deny"?{path:Te.path,mode:"deny"}:{path:Te.path,mode:"mask",injectHosts:[]}),xe=(pe.envVars??[]).filter((Te)=>Te.mode==="deny").map((Te)=>({name:Te.name,mode:"deny"})),ke={...Re.length>0&&{files:Re},...xe.length>0&&{envVars:xe}};if(pe.sigv4){let Te={};for(let Fe of["streaming","presigned","sigv4a"])if(pe.sigv4[Fe]==="deny")Te[Fe]="deny";ke.sigv4=Te}{let Te=sA(pe.awsPairs??[],[]);if(Te.length>0)ke.awsPairs=Te}if(Object.keys(ke).length>0)me.credentials=ke}if(ln(me,ote(i)),Object.keys(me).length>0)w.sandbox=me}return w}function sA(i,c){let T=Vo,D=new Set(c.flatMap(MO));return f(i.flatMap(MO)).filter((w)=>T.includes(w)&&!D.has(w)).map((w,v)=>({accessKeyIdVar:w,secretAccessKeyVar:`${$a}${v+1}_`}))}function MO(i){if(!n(i))return[];return[i.accessKeyIdVar,i.secretAccessKeyVar,i.sessionTokenVar].filter((c)=>typeof c==="string")}var ste=new Set([...[...fu].filter((i)=>i!=="ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION"),...mu,"CLAUDE_CODE_AUTO_MODE_MODEL","CLAUDE_CODE_BG_CLASSIFIER_MODEL","CLAUDE_CODE_SUBAGENT_MODEL_FORCE"]);function ite(i,c){if(!c||!i)return null;let T={};if(i.model!==void 0)T.model=i.model;if(i.availableModels!==void 0)T.availableModels=i.availableModels;if(i.availableModelsMatch==="exact"||i.availableModelsMatch!==void 0&&i.availableModels!==void 0)T.availableModelsMatch=i.availableModelsMatch;if(i.enforceAvailableModels!==void 0)T.enforceAvailableModels=i.enforceAvailableModels;if(i.deniedModels!==void 0&&i.deniedModels.length>0)T.deniedModels=i.deniedModels;if(i.fallbackModel!==void 0)T.fallbackModel=i.fallbackModel;if(i.modelPicker!==void 0)T.modelPicker=i.modelPicker;return Object.keys(T).length>0?T:null}function ate(i){let c=[];for(let T of i?.deniedModels??[]){let{warning:D}=at(T);if(D!==void 0)c.push({file:"managed settings",path:"deniedModels",message:D,severity:"warning",statusOnly:!0})}return c}function lte(i){if(i?.availableModelsMatch!=="exact")return[];let c=i.availableModels??[];return c.flatMap((T)=>{let D=eO(T,c);return D===void 0?[]:[{file:"managed settings",path:"availableModels",message:D,severity:"warning",statusOnly:!0}]})}function UO(i,c){let T=i.deniedModels;if(Object.assign(i,c),T!==void 0&&c.deniedModels!==void 0)i.deniedModels=f([...T,...c.deniedModels])}function vl(i,c=!1){if(delete i.model,delete i.fallbackModel,delete i.modelPicker,delete i.modelOverrides,i.env){let T={};for(let[D,w]of Object.entries(i.env)){let v=D.toUpperCase();if(!ste.has(v)||c&&v===ZS)T[D]=w}i.env=T}}function dte(i){let c=i.store.policy.allTiers;if(c!==void 0)return c;let T=yte(i);return i.store.policy.allTiers=T,T}function Or(){return m()==="macos"?"plist":"hklm"}function iA(i){let c=xi(i);if(c.composes==="tier")return"helper";let T=Cs(i);if(c.composes==="remoteSlot"||T.present.remote)return"remote";if(T.present.mdm)return Or();if(T.present.file)return"file";if(T.parentSlice||T.hostModelOverlay)return"parent";let D=i.hkcu?.();return D&&Object.keys(D.settings).length>0?"hkcu":null}function Cs(i){let c=[],T=Vu(i),{settings:D,servedSnapshot:w}=T;c.push(...T.errors);let v=xi(i),U=v.composes==="remoteSlot"?v.helper:Hl(D),B=jl(i),K=B.settings;c.push(...B.errors);let de=Hl(K),pe=i.file?.()??Kl(i),me=pe.settings;c.push(...pe.errors);let Ae=Hl(me),Pe=ys(B),Re=ys(pe),xe=Re&&pe.heldOnly===!0,ke=i.policyOnlyServerTier?.()==="unconfirmed"&&(Pe&&i.mdm?.().userWritable!==!0||Re),Te=ke&&U?fte(U):U,Fe=!ke&&(v.composes==="remoteSlot"?Te!==null:ys(T)),$e=Uu(Te,Fe),ot=Uu(de,Pe),ft=pe.onlyHeldContent?lA:Uu(Ae,Re),ut=!ke&&Te!==null&&$e>=Math.max(ot,ft),st=de!==null&&ot>=ft,yt=[[ke?null:D,ut],[K,st],[me,Ae!==null]],zt=(v.composes==="remoteSlot"?v.helper:yt.find(([pt,Gt])=>pt!==null&&(pt===D&&w?Gt:pt.managedSourcesBehavior!==void 0||Gt))?.[0])?.managedSourcesBehavior,Le=ke?Te:null,De=Te!==null&&!ut,ze=De?null:Te,it=de!==null&&!st&&ze===null,dt=it?null:de,gt=[],ct=[[De,"remote",Te],[it,Or(),de]];for(let[pt,Gt,_n]of ct){if(!pt||_n===null)continue;if(gt.push([_n,Gt]),!Rs(_n)||_n===Le)continue;let wo=Gt==="remote"&&Pe?Or():"file";c.push({file:yr[Gt],path:Object.keys(_n).find((Dr)=>!Zo.includes(Dr))??"",message:`${yr[Gt]} holds only values that could not be applied as written, so ${yr[wo]} supplies the managed settings while that fail-closed reading still binds beside it (the most restrictive value of each such key applies), until it is fixed.`,severity:"warning",statusOnly:!0})}let{settings:bt,errors:Nn}=xee(i);c.push(...Nn);let Ao=Nee(i);c.push(...Ao?.errors??[]);let $t=Ao?.settings??bt,on=ze!==null&&w&&v.composes!=="remoteSlot",lo=!(ze!==null&&Fe&&!on)&&!(dt!==null&&Pe),co=lo&&(!Re||xe),bn=co&&xe,Nt=bn&&$t&&Ae?hn(Ae,Ss.filter((pt)=>$t[pt]!==void 0)):Ae,uo=(Pe?dt:null)??(Re?Ae:null),FA=$t!==null&&(uo===null||oA(uo)||bn),sn=[mte(ze,w&&v.composes!=="remoteSlot",[dt,Nt&&hn(Nt,pe.heldAllowLists??[]),...FA?[jo($t,Ss)]:[]]),dt,Nt,...gt.map(([pt])=>pt)].filter((pt)=>pt!==null),BA=[...ze!==null?["remote"]:[],...dt!==null?[Or()]:[],...Ae!==null?["file"]:[],...gt.map(([,pt])=>pt)],ip=(pt)=>sn.some((Gt)=>Gt!==Nt&&Gt[pt]!==void 0),Zl=Nt!==null&&pe.onlyHeldContent===!0&&lo&&zt!=="merge"&&sn[0]!==Nt,ql=ze!==null&&i.policyOnlyServerTier?.()!==void 0,{admin:Rr,merged:vi}=Ul(Zl?sn.filter((pt)=>pt!==Nt):sn,zt,on,Zl?sn.length-2:gt.length,ql),ap=(pt)=>Nl({slot:pt,adminTiers:sn})||$t?.allowManagedMcpServersOnly===!0&&pt?.allowManagedMcpServersOnly!==!1,lp=(pt,Gt)=>vi?ip(pt):sn[0]!==Nt&&sn[0]?.[pt]!==void 0||pt==="allowedMcpServers"&&ip(pt)&&ap(Gt),Tr=Rr&&Nt&&Zl?Ul([Rr,hn(Nt,qu.filter((pt)=>lp(pt,Rr)))],"merge",!1,0).admin:Rr&&Le&&!vi?Ul([Rr,Le],"merge",!1,0).admin:Rr;if(ql&&Tr!==null){let{kept:pt}=AA(i);for(let Gt of yA){let _n=St(pt,Gt),wo=St(Tr,Gt),Dr=Zy.some((Hi)=>Hi===Gt[0])&&St(sn[0],Gt)!==void 0;if(_n!==void 0&&!Dr)vt(Tr,Gt,OA.includes(Gt.join("."))&&Array.isArray(_n)&&Array.isArray(wo)?f([...wo,..._n]):_n)}}let Ls=Tr===null?[T,B,pe].find(Os):void 0,po=Tr??(Ls?{}:null),Ql={remote:ze!==null||Ls===T,mdm:dt!==null||Ls===B,file:Ae!==null||Ls===pe},dp=[];if(vi){let pt=Ql.remote?"remote":Ql.mdm?Or():"file",Gt=[[dt,Or()],[Nt,"file"]];for(let[_n,wo]of Gt){if(_n===null||_n===sn[0]||on&&_n===sn[1])continue;let Dr=Zu.filter((od)=>Object.values(_n[od]??{}).some((pp)=>pp!==void 0&&pp!==null)),[Hi]=Dr;if(Hi===void 0)continue;dp.push(wo),c.push({file:yr[wo],path:Hi,message:`${Dr.map((od)=>`"${od}"`).join(" and ")} in ${yr[wo]} ignored: policy helper configuration is read from the highest managed settings source only (${yr[pt]} here), even with managedSourcesBehavior "merge". Configure the helper in that source instead.`,severity:"warning",statusOnly:!0})}}let ed=(pt)=>pt!==null&&(pt===sn[0]||Object.keys(hn(pt,CA())).length>0),zA={remote:ed(ze),mdm:ed(dt),file:ed(Nt)},Is={allowManagedPermissionRulesOnly:sn.some((pt)=>pt.allowManagedPermissionRulesOnly===!0)||void 0,forceLoginOrgUUID:po?.forceLoginOrgUUID,...jo(po??{},Ss),hooks:po?.hooks,enabledPlugins:po?.enabledPlugins,allowedMcpServers:ap(po)?Iu({slot:po,adminTiers:sn}):po?.allowedMcpServers,sandbox:{network:{allowManagedDomainsOnly:sn.some((pt)=>pt.sandbox?.network?.allowManagedDomainsOnly===!0)||void 0},filesystem:{allowManagedReadPathsOnly:sn.some((pt)=>pt.sandbox?.filesystem?.allowManagedReadPathsOnly===!0)||void 0}}},td=!_a(i)&&tte(Tr,co),Mi=bn&&$t?HO($t,Is):$t,cp=td&&$t&&!bn?Ss.filter((pt)=>$t[pt]!==void 0&&pe.heldAllowLists?.includes(pt)===!0&&O(Is[pt],Ae?.[pt])&&!lp(pt,po)):[],nd=(Mi||rA(i.parentManaged)||Ko(i.parentManaged??{}))&&td?bn?zu(Mi??{},{...Is,allowManagedPermissionRulesOnly:!0,sandbox:{network:{allowManagedDomainsOnly:!0},filesystem:{allowManagedReadPathsOnly:!0}}},i.parentManaged,i.parentOrganizationSettings?.own):zu(Mi??{},hn(Is,cp),i.parentManaged,i.parentOrganizationSettings?.own):null,Ui=nd&&Object.keys(nd).length>0?nd:null,up=Ui&&!po&&Object.entries(Ui).every(([pt,Gt])=>rte.has(pt)&&i.parentOrganizationSettings?.own[pt]!==Gt)&&Object.keys(i.hkcu?.().settings??{}).length>0?Ui:null,GA=up?null:Ui,WA=ite($t===bt?Mi:bn&&bt?HO(bt,Is):bt,i.hostManagedProvider);return{tiers:sn,tierSources:BA,admin:po,parentSlice:GA,hostFeatureOverlay:up,hostModelOverlay:WA,errors:c,present:Ql,mode:zt,merged:vi,composed:zA,snapshotFirst:on,parentNeverShutOut:co,shadowedHelperSources:dp,parentIncluded:td,heldEmpty:Ls!==void 0,fileNotHeld:pe.settingsNotHeld,heldInTheHostsPlace:cp,policyOnlyLeads:ql}}function Ul(i,c,T,D,w=!1){let v=i[0];if(!v)return{admin:null,merged:!1};let{managedSourcesBehavior:U,...B}=v,K=c==="merge"&&i.length>=2;if(!K&&D===0&&!w)return{admin:U===void 0?v:B,merged:!1};let de=i.slice(K||w?1:i.length-D).map((me,Ae)=>{let Pe=K&&T&&Ae===0,Re=Pe?{...me}:hn(me,CA());if(!Pe){for(let ke of nte)if(St(Re,ke)!==void 0)vt(Re,ke,void 0)}let xe=St(Re.sandbox,["enabledPlatforms"]);if(Array.isArray(xe)&&xe.includes(m()))vt(Re,["sandbox","enabledPlatforms"],void 0);else if(xe!==void 0)delete Re.sandbox;return Re});if(!K)return FO(B,[v,...de]),{admin:B,merged:!1};let pe={};for(let me of[...de].reverse())ln(pe,me,Gu);return ln(pe,B,T?gte:Gu),FO(pe,[v,...de]),cte(pe,[v,...de],T),{admin:pe,merged:!0}}var Zu=["policyHelper","policyHelpers"],yr={remote:"server-managed settings",plist:"the managed preferences plist",hklm:"the HKLM policy key",file:"managed-settings.json"};function bs(i){return Object.keys(i).some((c)=>!Zo.includes(c))}function Rs(i){return Object.entries(i).some(([c,T])=>!Zo.includes(c)&&!ci(T))}function Hl(i){return i&&bs(i)?i:null}function ys(i){return i.settings!==null&&Rs(i.settings)&&!i.onlySubstitutes}function aA(i,c,T){return ys({settings:c})&&!T.some((D)=>D.onlySubstitutes)?RO(i):i}var lA=0;function Uu(i,c){if(i===null)return-1;if(c)return 2;return Rs(i)?1:lA}function dA(i,c){return Object.entries(i).some(([T,D])=>D!==null&&!jO(T,D)&&!Zo.includes(T))||c!==null&&bs(c)}function Os(i){return i.documentHasPolicyContent??(i.settings!==null&&bs(i.settings))}function Io(i){return i.loadState??(i.settings!==null?"loaded":"absent")}function io(i,c){if(i==="didNotLoad"||c==="didNotLoad")return"didNotLoad";return i==="loaded"||c==="loaded"?"loaded":"absent"}function ao(i){return i.userWritable!==!0&&(Os(i)||i.loadState==="didNotLoad")}function cte(i,c,T){let D=c.findIndex((v)=>v.availableModels!==void 0),w=c.findIndex((v)=>v.modelOverrides!==void 0);if(w!==-1&&(D===-1||w<=D||T&&D===0))i.modelOverrides={...c[w].modelOverrides};else delete i.modelOverrides}var cA=["allowedMcpServers","availableModels","strictKnownMarketplaces","allowedChannelPlugins","allowedProviders"],ute=["awsPairs","ripgrep"];function uA(i,c,T){if(c===void 0)return i;if(Array.isArray(c))return T==="awsPairs"&&Array.isArray(i)?[...c,...sA(i,c)]:[...c];if(!n(c))return c;return Ia(c,(D)=>Array.isArray(D)?[...D]:D)}var qu=["allowedMcpServers","availableModels","strictKnownMarketplaces","allowedChannelPlugins","allowedProviders","allowedMarketplaces","allowedHttpHookUrls","httpHookAllowedEnvVars"],Ss=["allowedMcpServers","availableModels","strictKnownMarketplaces","allowedProviders"],pA=[["allowManagedMcpServersOnly","allowedMcpServers"],["enforceAvailableModels","availableModels"]];function HO(i,c){return hn(i,pA.filter(([,T])=>i[T]===void 0&&c[T]===void 0).map(([T])=>T))}var pte=[...pA.map(([i])=>i),"allowManagedPermissionRulesOnly","allowManagedHooksOnly","pluginConfigs","disableAllHooks","allowedHttpHookUrls","httpHookAllowedEnvVars","strictPluginOnlyCustomization","sandbox.network.allowManagedDomainsOnly","sandbox.filesystem.allowManagedReadPathsOnly","sandbox.enabled"];function fte(i){return Hl(zu(hn(i,pte),{...Object.fromEntries(Ss.map((c)=>[c,[]])),forceLoginOrgUUID:[],allowManagedPermissionRulesOnly:!0,sandbox:{network:{allowManagedDomainsOnly:!0},filesystem:{allowManagedReadPathsOnly:!0}}}))}function mte(i,c,T){if(i===null||!c)return i;let D=qu.filter((w)=>T.some((v)=>v?.[w]!==void 0));return D.length===0?i:hn(i,D)}function Gu(i,c,T){if(T!==void 0&&(cA.includes(T)||ute.includes(T)))return uA(i,c,T);return fA(i,c,T)}function gte(i,c,T){if(T!==void 0&&cA.includes(T))return uA(i,c,T);return fA(i,c,T)}function fA(i,c,T){if(Array.isArray(i)&&Array.isArray(c)&&T!=="fallbackModel")return f([...c,...i]);return so(i,c,T)}function FO(i,c){let T=c[0],D=i;for(let w of Hn()){let{path:v,restrictive:U}=w,B=So(U),K=Math.min(...c.map((de)=>B.indexOf(dr(w,de))).filter((de)=>de!==-1));if(Number.isFinite(K))vt(D,v,B[K]);else if(St(T,v)===void 0&&St(i,v)!==void 0)vt(D,v,void 0)}if(i.strictPluginOnlyCustomization!==!0){let w=f(c.flatMap((v)=>Array.isArray(v.strictPluginOnlyCustomization)?v.strictPluginOnlyCustomization:[]));if(w.length>0)i.strictPluginOnlyCustomization=w;else if(T?.strictPluginOnlyCustomization===void 0)delete i.strictPluginOnlyCustomization}}function xi(i){let c=i.helper?.()??null;if(!c)return{composes:"none"};let T=i.helperArmedFromRemote?.()===!1?"tier":"remoteSlot";if(i.helperMergesOutput?.()!==!0)return{composes:T,helper:c,mergedOver:null};if(!i.store.policy.mergedHelper){let{base:D,mergedOver:w}=T==="remoteSlot"?{base:Vu(i).settings,mergedOver:"remote"}:mA(i);i.store.policy.mergedHelper={helper:Ste(D,c),mergedOver:Object.keys(gA(D)).length>0?w:null}}return{composes:T,...i.store.policy.mergedHelper}}function mA(i){let c=jl(i);if(Cs({...i,helper:void 0}).present.mdm)return{base:c.settings,mergedOver:Or(),errors:c.errors};let T=i.file?.()??Kl(i);return{base:T.settings,mergedOver:"file",errors:[...c.errors,...T.errors]}}function gA(i){return hn(i??{},Zu)}function _te(i,c){let T=new Map;for(let[w,v]of Object.entries(c)){let U=w.toUpperCase();if(!T.has(U))T.set(U,v)}let D={};for(let[w,v]of Object.entries(i))D[w]=T.get(w.toUpperCase())??v;return Object.assign(D,c)}var Ete=["forceLoginOrgUUID","gatewayInternalNetworks","allowedHttpHookUrls","httpHookAllowedEnvVars","allowRead"];function hte(i,c,T){let D=T!==void 0&&c!==void 0&&Ete.includes(T)?c:Gu(i,c,T);return D===c&&Array.isArray(D)?[...D]:D}function Ste(i,c){let T=gA(i),D=ln({},T,c,hte);if(T.env&&c.env)D.env=_te(T.env,c.env);return D}function _A(i){let c=jl(i);return i.mdm?.().userWritable!==!0&&c.loadState==="didNotLoad"||c.errors.some((T)=>T.errorClass==="unreadable"&&T.userWritable!==!0)}function EA(i){return Io(i.file?.()??Kl(i))==="didNotLoad"}function yte(i){let c=xi(i);if(c.composes==="tier")return[c.helper];let{tiers:T,parentSlice:D}=Cs(i);return D?[...T,D]:T}function Ote(i,c,T){let D={slot:T,adminTiers:i};return i.flatMap((w,v)=>{let U=c[v],B=fO(w,D);return U!==void 0&&B.length>0?[{source:U,keys:B}]:[]})}var hA=["apiKeyHelper","awsAuthRefresh","awsCredentialExport","gcpAuthRefresh"];var Gl=[...hA,"otelHeadersHelper","proxyAuthHelper"],Ate=["disableAllHooks","enabledPlugins","extraKnownMarketplaces","agent","allowedHttpHookUrls","httpHookAllowedEnvVars","autoMemoryDirectory","modelOverrides","allowedMcpServers","skipWebFetchPreflight","autoUploadSessions","xaaIdp","claudeMdExcludes","enableAllProjectMcpServers","enabledMcpjsonServers"];function Cte(i,c,T){let D=T.launchFolderKeysFrom?.(i)??"as_read";if(D==="as_read")return c;let w=Ate.filter((K)=>c[K]!==void 0),v={...c};for(let K of w)delete v[K];let U=D==="none"?[]:Hn().filter((K)=>K.path[0]!=="sandbox"&&St(v,K.path)!==void 0&&!So(K.restrictive).some((de)=>de===dr(K,v)));if(w.length===0&&U.length===0)return c;for(let{path:K}of U)vt(v,K,void 0);let B=$y(Ar(i,T)??i,U.map(({path:K})=>K.join(".")));if(B.length>0)t(`Ignoring ${B.join(", ")} in ${i==="localSettings"?".claude/settings.local.json":".claude/settings.json"}: this session's host does not trust the folder, so that file can make these settings stricter, not looser. To use such a value, set it in user or managed settings.`,{level:"warn"});if(w.length>0)jy("keys");return v}function Ii(i,c,T){return bte(i,Cte(i,c,T),T)}function bte(i,c,T){let D=Gl.some((B)=>c[B]!==void 0);if(!D&&i!=="policySettings")return c;let w=T.credentialHelperKeysFrom(i);if(w==="as_read")return c;let v=i==="policySettings"&&w==="machine_admin"?Rte(T):{};if(!D&&Object.keys(v).length===0)return c;let U={...c};for(let B of Gl)delete U[B];return Object.assign(U,v)}function Rte(i){let c=Qu(i),T={};for(let D of Gl){let w=c?.[D];if(w!==void 0)T[D]=w}return T}function Qu(i){let c=SA(i),T=xi(c);return T.composes==="tier"?T.helper:Cs(c).admin}function SA(i){let c=i.helperArmedFromRemote?.()===!1&&i.helperArmedFromUserWritableBase?.()===!1;return{...i,store:new he,remote:()=>null,helper:c?i.helper:()=>null,...i.mdm?.().userWritable===!0&&{mdm:()=>({settings:{},errors:[]})}}}function Tte(i){return i.helperArmedFromUserWritableBase?.()!==!1||i.helperMergesOutput?.()===!0&&i.mdm?.().userWritable===!0}function BO(i,c){if(c.store.policy.machineLoginPins===void 0){let w=Qu(c);c.store.policy.machineLoginPins={value:{forceLoginOrgUUID:w?.forceLoginOrgUUID,forceLoginMethod:w?.forceLoginMethod}}}let{forceLoginOrgUUID:T,forceLoginMethod:D}=c.store.policy.machineLoginPins.value;if(T!==void 0)i.forceLoginOrgUUID=T;if(D==="claudeai"||D==="console")i.forceLoginMethod=D}var yA=[["model"],["fallbackModel"],["advisorModel"],["modelOverrides"],["modelPricing"],["modelPicker"],["processWrapper"],["sandbox","credentials","files"],["sandbox","credentials","envVars"],["sandbox","credentials","awsPairs"],["availableModels"],["requiredMinimumVersion"],["requiredMaximumVersion"],["strictKnownMarketplaces"],["allowedMarketplaces"],["allowedChannelPlugins"],["permissions","deny"],["permissions","ask"],["deniedModels"],["blockedMarketplaces"],...qo.map((i)=>["autoMode",i]),["hooks"],["allowedHttpHookUrls"],["httpHookAllowedEnvVars"],["managedMcpServers"],["extraKnownMarketplaces"],["additionalMarketplaces"],["enabledPlugins"],["pluginConfigs"],["pluginTrustMessage"],["pluginSuggestionMarketplaces"],["claudeMd"],["cleanupPeriodDays"],["desktopSessionCleanupPeriodDays"]],OA=["permissions.deny","permissions.ask","deniedModels","blockedMarketplaces",...qo.map((i)=>`autoMode.${i}`)];function AA(i){if(i.store.policy.machineBeneathPolicyOnly===void 0){let c=Qu(i),T=c===null?null:Hy(c);if(T!==c)t(`Managed settings: Left out the "!" rules among this computer's ask and deny rules, under the organization's settings`,{level:"warn"});let D={};for(let w of yA){let v=St(T,w);if(v!==void 0)vt(D,w,v)}i.store.policy.machineBeneathPolicyOnly={kept:D,env:Dte(i)}}return i.store.policy.machineBeneathPolicyOnly}function Dte(i){return ep({...SA(i),helper:()=>null,hkcu:void 0,parentManaged:null}).settings?.env}var Lte=[...Gl,"forceLoginOrgUUID","forceLoginMethod","forceLoginGatewayUrl","gatewayInternalNetworks","allowNestedModelAccessUnderForceLogin","parentSettingsBehavior","env","modelPicker",...Zu,...Zo];function CA(){return Lte}function bA(i){return $S.some((c)=>i.startsWith(c))||cu.includes(i)}function Ite(i,c,T,D=0){let w=new Map,v=new Map,U=!1;for(let[B,K]of i.entries()){let de=new Set,pe=c?.[B]===!0;for(let[me,Ae]of Object.entries(K??{})){let Pe=me.toUpperCase(),Re=bA(Pe);if(Re&&Ae.trim()==="")continue;if(Re&&U)continue;if(Re&&B>D&&c?.[B]===!0)continue;let xe=w.get(Pe);if(xe!==void 0){if(de.has(Pe))v.set(me,Ae);else if(!v.has(me))v.set(me,xe);continue}if(B>D&&T?.[B]?.has(Pe))continue;if(v.set(me,Ae),de.add(Pe),w.set(Pe,Ae),Re)pe=!0}if(pe)U=!0}return Object.fromEntries(v)}var wte="CLAUDE_CODE_DISABLE_ADMIN_ENV_UNION";function zO(i){if(!i)return;let c={};for(let[T,D]of Object.entries(i))if(T.toUpperCase()!==wte)c[T]=D;return c}function Pte(i,c){let T=Object.entries(i??{}),D=c??{};return T.length===Object.keys(D).length&&T.every(([w,v])=>D[w]===v)}function GO(i,c){if(c===i.store.parentLeftOutReason)return;if(i.store.parentLeftOutReason=c,c!==null)t(`--managed-settings left out of the policy tier: ${c}`,{level:"warn"})}function ep(i){let c=xi(i),T=(i.helperWarnings?.()??[]).filter((st)=>!nr(st.path)),D=!_a(i)&&Object.keys(i.parentManaged??{}).length>0;if(c.composes==="tier"){GO(i,D?"a policy helper supplies that tier (parentSettingsBehavior does not apply to it)":null);let{helper:st}=c;i.store.lastPolicyEnvComposition=null;let yt=Tte(i),Lt=i.hostManagedProvider||yt?{...st}:st;if(i.hostManagedProvider)vl(Lt);if(yt)BO(Lt,i);i.store.policy.pairedModelOverrides={value:i.hostManagedProvider&&st.availableModels!==void 0?st.modelOverrides:void 0},i.store.policy.deniedModelsOverrides={value:i.hostManagedProvider?st.modelOverrides:void 0};let zt=i.store.policy.helperBaseStatusNotices??=[...i.helperMergesOutput?.()===!0?mA(i).errors.filter((Le)=>!Le.statusOnly):[],...Cs(i).errors.filter((Le)=>Le.statusOnly)];return{settings:Lt,errors:[...zt,...T]}}let{tiers:w,tierSources:v,admin:U,parentSlice:B,hostFeatureOverlay:K,hostModelOverlay:de,errors:pe,present:me,snapshotFirst:Ae,parentIncluded:Pe,heldInTheHostsPlace:Re,policyOnlyLeads:xe}=Cs(i),ke=null;if(D&&!Pe)ke="an administrator's managed settings apply and do not set parentSettingsBehavior to 'merge'";else if(D&&!B&&!K&&!de)ke="nothing shuts it out, yet none of its keys was kept (unreadable, no restriction, or already set by an administrator)";if(GO(i,ke),pe.push(...T),!U&&!B){i.store.lastPolicyEnvComposition=null,i.store.policy.pairedModelOverrides={value:void 0},i.store.policy.deniedModelsOverrides={value:void 0};let st=i.hkcu?.();if(st&&Object.keys(st.settings).length>0){let yt=i.hostManagedProvider||K?{...st.settings,...K}:st.settings;if(i.hostManagedProvider){if(vl(yt),de)UO(yt,de)}return{settings:yt,errors:[...pe,...st.errors]}}if(de)return{settings:{...de},errors:[...pe,...st?.errors??[]]};return{settings:null,errors:[...pe,...st?.errors??[]]}}let Te=ln({},B??{},hn(U??{},Re),so);if(B?.availableModelsMatch==="exact")Te.availableModelsMatch="exact";if(B?.allowManagedHooksOnly===!0)Te.allowManagedHooksOnly=!0;if(B?.disableSkillShellExecution===!0)Te.disableSkillShellExecution=!0;if(B?.disableWindowsBashCommandSplit===!0)Te.disableWindowsBashCommandSplit=!0;for(let st of Xu)if(B?.[st]===!0)Te[st]=!0;for(let st of Ju)if(B?.[st]===!1)Te[st]=!1;if(w.some((st)=>st.forceRemoteSettingsRefresh===!0))Te.forceRemoteSettingsRefresh=!0;if(v.includes("remote")||i.mdm?.().userWritable===!0)BO(Te,i);let Fe=Bt.CLAUDE_CODE_DISABLE_ADMIN_ENV_UNION===!0&&!xe,$e=Te.env;if(!Fe){let st=w;if(xe){let Lt=AA(i).env,zt=new Set(Object.entries(Lt??{}).filter(([,dt])=>dt.trim()!=="").map(([dt])=>dt.toUpperCase())),Le=Jy(w[0]?.env??{},Lt),De=Object.entries(w[0]?.env??{}).filter(([dt])=>{let gt=dt.toUpperCase();return!(Xy.includes(gt)&&zt.has(gt)||Le.dropped.includes(gt))}).concat(Le.cleared.map((dt)=>[dt,""])),[ze,it]=l_(De,([dt,gt])=>cu.includes(dt.toUpperCase())&&Z(gt));st=[{...w[0],env:Object.fromEntries(it.some(([dt])=>bA(dt.toUpperCase()))?De:it)},{env:{...Lt,...Object.fromEntries(ze)}}]}let yt=Ite(st.map((Lt)=>Lt.env),st.map((Lt)=>(Lt.otelHeadersHelper??"").trim()!==""),st.map((Lt)=>{let zt=new Set;for(let Le of hA){let De=Lt[Le];if(typeof De==="string"&&De.trim()!=="")for(let ze of VS[Le])zt.add(ze)}return zt.size>0?zt:void 0}),Ae||xe?1:0);if(Object.keys(yt).length>0)Te.env=yt;else delete Te.env}if(Te.env){let st=zO(Te.env);if(st&&Object.keys(st).length>0)Te.env=st;else delete Te.env}let ot=Zm();if(i.hostManagedProvider){if(vl(Te,ot),de)UO(Te,de)}let ft={env:zO($e)};if(i.hostManagedProvider)vl(ft,ot);let ut=!Fe&&!Pte(Te.env,ft.env);i.store.lastPolicyEnvComposition={unionOptedOut:Fe,unionChangedEnv:ut,remoteTierPresent:me.remote,mdmTierPresent:me.mdm,fileTierPresent:me.file,adminTierCount:w.length,tiersWithEnv:Ne(w,(st)=>Object.keys(st.env??{}).length>0)},i.store.policy.pairedModelOverrides={value:i.hostManagedProvider&&U?.availableModels!==void 0&&U.modelOverrides!==void 0&&de?.availableModels===void 0?U.modelOverrides:void 0},i.store.policy.deniedModelsOverrides={value:i.hostManagedProvider?U?.modelOverrides:void 0};for(let{source:st,keys:yt}of Ote(w,v,Te)){let[Lt]=yt;if(Lt===void 0)continue;let zt=yr[st],Le=yt.length===1;pe.push({file:zt,path:Lt,message:`${yt.map((De)=>`"${De}"`).join(" and ")} in ${zt} ${Le?"is":"are"} not applied: ${zt} is not the managed settings source that applies for ${Le?"this key":"these keys"} (/status lists the setting sources). Remove ${Le?"it":"them"} from ${zt}, or set ${Le?"it":"them"} in the source that applies.`,severity:"warning",statusOnly:!0})}return{settings:Te,errors:pe}}function xte(i,c,{includeLegacyLocalSettings:T=!0,keepUnreadableFileSettings:D=!1}={}){if(i==="policySettings")return ep(c).settings;let w=D?Hu:Fl,v=Ar(i,c),{settings:U}=v?w(v,c.store,i==="flagSettings"?c.flagExpectedContent:void 0):{settings:null};if(i==="flagSettings"){let{settings:B}=XO(c);if(B)return ln(U||{},B,so)}if(i==="localSettings"&&T){let B=tA(c);if(B){let{settings:K}=w(B,c.store);if(K)return c.onLegacyLocalSettingsRead?.("per_source"),ln(K,U||{},so)}}return U}function Nte(i,c){return{...i,...c}}function so(i,c,T){if(T==="modelPicker"&&c!==void 0)return RA(c);if(Array.isArray(i)&&Array.isArray(c)){if(T==="fallbackModel")return c;return f([...i,...c])}if((T==="extraKnownMarketplaces"||T==="managedMcpServers")&&n(i)&&n(c))return Nte(i,c);return}function RA(i){if(!n(i))return i;let c=i.options;return{...i,...Array.isArray(c)&&{options:c.map((T)=>n(T)?{...T}:T)}}}function kte(i,c){if(c){if(c.availableModels!==void 0)i.availableModels=[...c.availableModels];if(c.enforceAvailableModels!==void 0)i.enforceAvailableModels=c.enforceAvailableModels;if(c.modelPicker!==void 0)i.modelPicker=RA(c.modelPicker)}let T=c?.deniedModels;if(T!==void 0)i.deniedModels=[...T];else delete i.deniedModels}function vte(i){if(i.store.isLoadingFromDisk)return{settings:{},errors:[]};let c=Date.now();Fs("info","settings_load_started"),i.store.isLoadingFromDisk=!0;try{let T=i.store.pluginBase,D={};if(T)D=ln(D,T,so);let w=[],v=new Set,U=new Set,B=(xe)=>{for(let ke of xe){let Te=`${ke.file}:${ke.path}:${ke.message}`;if(!v.has(Te))v.add(Te),w.push(ke)}},K=[],de=[Wo()];if(m()==="wsl"&&i.wslInherits?.())de.push(En);let pe=new Set(de.map((xe)=>Ft(dn(xe,"managed-settings.json")))),me=new Set(de.map((xe)=>Ft(dn(xe,"managed-settings.d")))),Ae=(xe)=>{let ke=Ft(xe);return pe.has(ke)||me.has(Wl(ke))},Pe=(xe,ke,Te)=>{if(Te?.channelLabel!==!0&&Ae(xe))return;let Fe=ke.sandbox?.filesystem?.allowRead?.length??0,$e=ke.sandbox?.network?.allowedDomains?.length??0;if(Fe>0||$e>0)K.push({file:xe,allowReadCount:Fe,allowedDomainsCount:$e})},Re=null;for(let xe of Wu(i)){if(xe==="policySettings"){let{settings:Fe,errors:$e}=ep(i);if(Re=Fe,B(ate(Fe)),B(lte(Fe)),Fe)D=ln(D,Ii(xe,Fe,i),so);B($e);continue}let ke=i.store.repoTierFreeze.tier(xe);if(ke!==void 0){let Fe=Ar(xe,i);if(Fe)U.add(Ft(Fe));if(B([...ke.errors]),ke.settings)D=ln(D,ke.settings,so);continue}if(xe==="localSettings"){let Fe=tA(i);if(Fe&&!U.has(Ft(Fe))){U.add(Ft(Fe));let{settings:$e,errors:ot}=Hu(Fe,i.store);if(B(ot),$e)i.onLegacyLocalSettingsRead?.("cascade"),Pe(Fe,$e),D=ln(D,Ii(xe,$e,i),so)}}for(let Fe of Zee(xe,i)){let $e;try{$e=Qe(l(),Fe).absentAt===void 0}catch{$e=!0}if($e)B([Qee(Fe)]),t(`Settings file ${Fe} is not used: it is in a connector-downloads folder`)}let Te=Ar(xe,i);if(Te){let Fe=Ft(Te),$e=xe==="flagSettings"&&i.flagExpectedContent!==void 0;if(!U.has(Fe)||$e){U.add(Fe);let{settings:ot,errors:ft}=Hu(Te,i.store,xe==="flagSettings"?i.flagExpectedContent:void 0);if(B(ft),ot){if(xe==="flagSettings"&&i.flagInlineJson===!0)Pe(Jn,ot,{channelLabel:!0});else Pe(Te,ot);D=ln(D,Ii(xe,ot,i),so)}}}if(xe==="flagSettings"){let{settings:Fe,errors:$e}=XO(i);if(B($e),Fe)Pe("SDK inline settings",Fe,{channelLabel:!0}),D=ln(D,Ii(xe,Fe,i),so)}}if(kte(D,Re),K.length>0){let xe=dte(i),ke=(Te,Fe,$e,ot,ft)=>({file:Te,path:Fe,severity:"warning",statusOnly:!0,message:`${Fe} is ignored — managed settings set ${$e}, so only ${ot} from managed settings are honored. The ${ft===1?"entry":`${ft} entries`} in ${Te} will NOT apply (see https://code.claude.com/docs/en/settings#sandbox-settings).`});if(xe.some((Te)=>Te.sandbox?.filesystem?.allowManagedReadPathsOnly===!0)){for(let Te of K)if(Te.allowReadCount>0)B([ke(Te.file,"sandbox.filesystem.allowRead","allowManagedReadPathsOnly","allowRead paths",Te.allowReadCount)])}if(xe.some((Te)=>Te.sandbox?.network?.allowManagedDomainsOnly===!0)){for(let Te of K)if(Te.allowedDomainsCount>0)B([ke(Te.file,"sandbox.network.allowedDomains","allowManagedDomainsOnly","allowed domains (and WebFetch domain rules)",Te.allowedDomainsCount)])}}return Fs("info","settings_load_completed",{duration_ms:Date.now()-c,source_count:U.size,error_count:w.length}),i.store.hookedMerge.computed=D,gO({settings:D,errors:w},i.store.hookedMerge.answers)}finally{i.store.isLoadingFromDisk=!1}}function Mte(i){let c=i.store.mergedSettings;if(c!==null)return c;let T=vte(i);return i.store.mergedSettings=T,T}function Ute(i){let{settings:c}=Mte(i);return c||{}}function TA(i){i.store.invalidateAll();let c=[];for(let T of Wu(i)){let D=nA(T,i);if(D&&Object.keys(D).length>0)c.push({source:T,settings:D})}return{effective:Ute(i),sources:c}}function DA(i,c){let T=Wu(c);for(let D=T.length-1;D>=0;D--){let w=T[D];if(nA(w,c)?.[i]!==void 0)return w}return null}var xA=Object.freeze({settings:{},errors:[],loadState:"absent"}),Cr=Object.freeze({settings:{},errors:[]});class NA{mdm=null;hkcu=null;wslInherits=!1;whereAsked=void 0;readOutcomes=null;unansweredReadsInARow=0;lastAnswered=null;seatedWithNoAnswer=void 0;heldSince=void 0;loadPromise=null;sdkReread={lastReadAt:0,lastOutcomes:null,inFlight:void 0,lossSeen:""};reread={failedFor:void 0,failedAt:0,inFlight:void 0,startedAt:0};startLoad(i){if(this.loadPromise)return;this.loadPromise=(async()=>{let c=Date.now(),D=await(Lp()??Ki()),{mdm:w,hkcu:v,wslInherits:U,whereAsked:B}=await Xl(D,i);this.replace(w,v,U,B,D.outcomes),this.readOutcomes=D.outcomes;let K=Date.now()-c;t(`MDM settings load completed in ${K}ms`);try{le("tengu_managed_settings_os_read",ine(D,K))}catch{}let de=Ts();if(Object.keys(de.settings).length>0){t(`MDM settings found: ${Object.keys(de.settings).join(", ")}`);try{Fs("info","mdm_settings_loaded",{duration_ms:K,key_count:Object.keys(w.settings).length,error_count:w.errors.length})}catch{}}})()}replace(i,c,T,D,w){if(this.mdm=i,this.hkcu=c,this.wslInherits=T,this.whereAsked=D,this.sdkReread.lossSeen="",w===void 0)return;this.sdkReread.lastReadAt=Date.now(),this.sdkReread.lastOutcomes=w;let v={mdm:i,hkcu:c,wslInherits:T,whereAsked:D};if((w.hklm===null||w.hklm.answered)&&!Jl(v).mdm.errors.some((B)=>B.errorClass==="unreadable"&&B.errno===void 0&&B.userWritable!==!0))this.unansweredReadsInARow=0,this.lastAnswered=v,this.seatedWithNoAnswer=void 0;else this.unansweredReadsInARow++,this.seatedWithNoAnswer=i}reset(){this.mdm=null,this.hkcu=null,this.wslInherits=!1,this.whereAsked=void 0,this.readOutcomes=null,this.unansweredReadsInARow=0,this.lastAnswered=null,this.seatedWithNoAnswer=void 0,this.heldSince=void 0,this.loadPromise=null,this.sdkReread={lastReadAt:0,lastOutcomes:null,inFlight:void 0,lossSeen:""},this.reread={failedFor:void 0,failedAt:0,inFlight:void 0,startedAt:0}}}var LA="@builtin",zte=["prependPlugins","appendPlugins"];function Gte(i){return typeof i==="object"&&i!==null&&!Array.isArray(i)}var Wte=new s(()=>new NA);function Ds(){return Wte.of(R().host)}function Kte(i){Ds().startLoad(i)}async function jte(){let i=Ds();if(!i.loadPromise)Kte();await i.loadPromise}var $te=1800000,Vte=21600000,Yte=1000,Xte=30000;function Jte(i,c){let{mdm:T}=Jl(i),D={...Ts().settings,...ki().settings},w=i.readOutcomes?.hklm??null,v=w===null||w.answered||c&&!Wi(w),U=i.readOutcomes?.hkcu??null,B=U===null||U.answered||ao(T)||Object.keys(ki().settings).length===0;return i.readOutcomes!==void 0&&v&&B&&(!or()&&!ao(Ts())&&Object.keys(D).length===0||T.loadState!=="didNotLoad"&&!T.errors.some((K)=>K.severity!=="warning"&&K.userWritable!==!0))}function IA(i){let c=(T)=>T?.status==="exited"&&T.exitCode===1;return i!==null&&c(i.hklm)&&c(i.hkcu)&&!or()}function Zte(i){let c=Jl(i),T=Ts(),D={...T.settings,...ki().settings},w={...c.mdm.settings,...c.hkcu.settings};return[!ao(c.mdm)&&(ao(T)||Object.keys(D).length>0&&Object.keys(w).length===0)&&"all policy",T.plist===ld&&c.mdm.plist!==T.plist&&"the per-user plist",!c.wslInherits&&sp()&&"WSL's inheriting"].filter(Boolean).join()}async function kA(){await jte();let i=Ds(),{sdkReread:c,unansweredReadsInARow:T}=i;if(c.inFlight===void 0){let D=T>=1&&T<=4,w=IA(c.lastOutcomes)&&IA(i.readOutcomes)?Vte:$te,v=c.lossSeen?Xte:!D?w:T===1?0:Ep,U=Date.now()-c.lastReadAt;if(U>=0&&U<v)return;let B="",K=(async()=>{try{let de=await ene();if(c.lastOutcomes=de.readOutcomes??null,Jte(de,i.lastAnswered===null)){let pe=Zte(de);if(pe===""||pe===c.lossSeen){i.replace(de.mdm,de.hkcu,de.wslInherits,de.whereAsked,de.readOutcomes),i.readOutcomes=de.readOutcomes;return}if(!D){B=pe;return}}t("MDM re-read for resolveSettings was not taken: the reading in force stays")}catch(de){c.lastOutcomes=null,t(`MDM re-read for resolveSettings failed (${r(de)??(de instanceof Error?de.name:typeof de)})`,{level:"error"})}Qte()})().finally(()=>{c.lossSeen=B,c.lastReadAt=Date.now(),c.inFlight=void 0});c.inFlight=Se(K,Yte)}if(T<=1)await c.inFlight}function Ts(){if(md())return xA;return rp().mdm}function rp(){return qte()}function qte(){let{mdm:i,hkcu:c,wslInherits:T}=Jl(Ds());return{mdm:i??xA,hkcu:c??Cr,wslInherits:T}}function Jl(i){return i.whereAsked!==void 0&&Ra()?i.whereAsked:i}function vA(){return Ds().readOutcomes?.hklm??null}function ki(){if(md())return Cr;return rp().hkcu}function sp(){return rp().wslInherits}function Qte(){Ds().unansweredReadsInARow++}async function ene(i){let c=await Ki(!0);return{...await Xl(c,i),readOutcomes:c.outcomes}}function Ni(i,c,{userWritable:T=!1}={}){let D=ar(i,!1);if(!n(D))return{settings:{},errors:[Vl(c,{userWritable:T})],documentHasPolicyContent:!1,loadState:"didNotLoad"};let w=[],v=D;for(let Ae of T?$l:[]){if(!(Ae in v))continue;if(v=v===D?{...D}:v,delete v[Ae],!nr(Ae))w.push({file:c,path:Ae,message:`"${Ae}" is only honored from administrator-controlled managed settings and was ignored in ${c}, which the user account can write.`,severity:"warning",statusOnly:!0})}if(T){for(let Pe of zte){if(!(Pe in v))continue;v=v===D?{...D}:v,delete v[Pe],w.push({file:c,path:Pe,message:`"${Pe}" is only honored from administrator-controlled managed settings and was ignored in ${c}, which the user account can write.`,severity:"warning",statusOnly:!0})}let Ae=v.enabledPlugins;if(Gte(Ae)){if(Object.entries(Ae).filter(([Re,xe])=>Re.endsWith(LA)||xe!==!1).length>0){v=v===D?{...D}:v;let Re=Vr(Ae,(xe,ke)=>!ke.endsWith(LA)&&xe===!1);if(Object.keys(Re).length>0)v.enabledPlugins=Re;else delete v.enabledPlugins;w.push({file:c,path:"enabledPlugins",message:`"enabledPlugins" entries that enable a plugin, or name a built-in, are only honored from administrator-controlled managed settings and were ignored in ${c}, which the user account can write.`,severity:"warning",statusOnly:!0})}}}let{settings:U,errors:B,documentHasPolicyContent:K,loadState:de,onlySubstitutes:pe}=As(v,c),me=[...w,...B];return{settings:U??{},errors:T?me.map((Ae)=>({...Ae.severity==="warning"&&!Ae.startupFatal?Ae:{...tne(Ae),severity:"warning",statusOnly:!0},userWritable:!0})):me,documentHasPolicyContent:K,loadState:de,...pe&&{onlySubstitutes:pe}}}function tne({startupFatal:i,loadedWithoutGuardHook:c,...T}){return T}function tp(i,c,T,D){return{file:i,path:"",message:`Managed settings document (${i}) could not be read: ${c}; none of its settings are in effect.`,severity:T?"warning":"fatal",statusOnly:!0,errorClass:"unreadable",...D.errno!==void 0&&{errno:D.errno},...D.cause!==void 0&&{unreadCause:D.cause},...T&&{userWritable:!0}}}function Yl(i,c="Settings"){let T=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),D=new RegExp(`^[ \\t]+${T}[ \\t]+REG_(?:EXPAND_)?SZ[ \\t]+([\\s\\S]*)`,"im"),w=i.match(D)?.[1]?.trimEnd();return w?w:null}var nne=new Map([["ENOENT",k("ENOENT")],["EACCES",k("EACCES")],["EPERM",k("EPERM")],["ENOEXEC",k("ENOEXEC")],["EAGAIN",k("EAGAIN")],["EMFILE",k("EMFILE")],["ENOMEM",k("ENOMEM")],["ETIMEDOUT",k("ETIMEDOUT")],["ERR_CHILD_PROCESS_STDIO_MAXBUFFER",k("ERR_CHILD_PROCESS_STDIO_MAXBUFFER")]]),one=new Map([["SIGTERM",k("SIGTERM")],["SIGKILL",k("SIGKILL")],["SIGINT",k("SIGINT")]]);function rne(i){if(!i)return;return nne.get(i)??k("other")}function sne(i){if(!i)return;return one.get(i)??k("other")}function wA(i,c){if(!c)return{};return{[`${i}_status`]:Q(c.status),[`${i}_exit_code`]:c.exitCode??void 0,[`${i}_errno`]:rne(c.errno),[`${i}_signal`]:sne(c.signal),[`${i}_duration_ms`]:c.durationMs}}function ine(i,c){return{is_wsl:or(),await_ms:c,...wA("hklm",i.outcomes.hklm),...wA("hkcu",i.outcomes.hkcu)}}async function Xl(i,c,T=!1){let D=[],w=!1,v="absent";for(let Te of i.plistStdouts??[]){let{label:Fe,userWritable:$e}=Te;if($e&&w)continue;let ot=Te.stdout===null?{settings:{},errors:[tp(Fe,Te.unreadReason,$e,{errno:Te.unreadErrno,cause:Te.unreadCause})],documentHasPolicyContent:!1,loadState:"didNotLoad",...$e&&{userWritable:$e}}:{...Ni(Te.stdout,Fe,{userWritable:$e}),...$e&&{userWritable:$e}};if($e?bs(ot.settings):ot.documentHasPolicyContent)return{mdm:{...ot,errors:[...D,...ot.errors],documentHasPolicyContent:!0,plist:Fe},hkcu:Cr,wslInherits:!1};if(w||=ao(ot),D.push(...ot.errors),!$e)v=io(v,ot.loadState)}let U=`Registry: ${Fi}\\${Ps}`,B=null,K="disarmed",de=`Registry: ${Bi}\\${Ps}`;if(!T&&(i.hklmStdout!==null||i.hklmUnreadReason!==void 0||i.hkcuStdout!==null)&&process.platform!=="win32"&&ad()){let[Te,Fe]=await Promise.all([Po,Bte(Po)].map((ot)=>Fte(ot).then(({uid:ft,gid:ut,mode:st})=>({uid:ft,gid:ut,mode:st}),()=>{return}))),$e=!0;try{$e=$u(new he,Po,Te,Fe)}catch(ot){t(`registry tool: could not be asked about, held: ${ot}`,{level:"error"})}if($e){let ot=[];if(i.hklmStdout!==null)ot.push([U,Ni(Yl(i.hklmStdout)??"",U)]);else if(i.hklmUnreadReason!==void 0)ot.push([U,{settings:{},errors:[tp(U,i.hklmUnreadReason,!1,{cause:"oversize"})],documentHasPolicyContent:!1,loadState:"didNotLoad"}]);if(i.hkcuStdout!==null)ot.push([de,Ni(Yl(i.hkcuStdout)??"",de,{userWritable:!0})]);let ft=await Xl(i,c,!0),ut=await Xl({...i,hklmStdout:null,hklmUnreadReason:void 0,hkcuStdout:null},c,!0);return{...ft,whereAsked:{...ut,mdm:{...ut.mdm,heldDocuments:ot.map(([st,yt])=>({path:st,parsed:{...yt,settings:yt.loadState==="loaded"?yt.settings:null},...st===de&&{userWritable:!0}}))}}}}}if(i.hklmStdout!==null){let Te=Yl(i.hklmStdout)??"";B=Ni(Te,U);let Fe=ar(Te,!1);if(n(Fe))K=$c(Fe)}else if(i.hklmUnreadReason!==void 0)B={settings:{},errors:[tp(U,i.hklmUnreadReason,!1,{cause:"oversize"})],documentHasPolicyContent:!1,loadState:"didNotLoad"};let pe=B!==null&&ao(B);if(B)D.push(...B.errors),v=io(v,B.loadState);let me=or(),Ae="disarmed",Pe=U,Re=[];if(me){if(Ae=K,Ae!=="armed"){let Te=await lne(c);if(Re=Te.links,Te.flag==="armed"||Ae==="disarmed")Ae=Te.flag,Pe=Te.unreadableFlagPath??En;if(Ae==="disarmed")D.push(...Te.records),v=io(v,Te.loadState)}}let xe=Ae!=="disarmed",ke={settings:{},errors:D,loadState:v};if(me&&!xe){let Te=new Set(B?.errors.filter((Fe)=>Fe.severity==="warning"));return{mdm:{...ke,errors:ke.errors.map((Fe)=>Te.has(Fe)?{...Fe,wslIgnored:!0}:Fe),...Re.length>0&&{managedDocumentLinks:Re}},hkcu:Cr,wslInherits:!1}}if(B&&pe)return{mdm:B,hkcu:Cr,wslInherits:xe};if(Ae==="unreadable"){let Te=await op(En,c),Fe=ZO(Pe);return{mdm:{...ke,errors:Te?ke.errors:[...ke.errors,Fe],...Te&&{withheldFlagRecord:Fe},documentHasPolicyContent:!0,loadState:io(ke.loadState,"loaded")},hkcu:Cr,wslInherits:xe}}if(i.hkcuStdout!==null&&!g()&&!await ane(xe,c)){let Te=Ni(Yl(i.hkcuStdout)??"",de,{userWritable:!0});if(!me||Te.settings.wslInheritsWindowsSettings===!0){let{wslInheritsWindowsSettings:Fe,managedSourcesBehavior:$e,...ot}=Te.settings;return{mdm:ke,hkcu:{settings:ot,errors:Te.errors},wslInherits:xe}}if(Te.errors.length>0)return{mdm:ke,hkcu:{settings:{},errors:Te.errors},wslInherits:xe}}return{mdm:ke,hkcu:Cr,wslInherits:xe}}async function MA(i,c){if(u()&&c!==void 0)return(await Dd(i,wi)).content;return Go(i,wi)}async function ane(i,c){if(i&&await op(En,c))return!0;return op(Wo(),c)}async function PA(i,c){let T;try{T=await MA(i,c)}catch(D){return!_(D)}try{let D=Bl(T,i,!0);return ao({...D,loadState:Io(D)})}catch{return!0}}function np(i){let c=r(i);return c==="ENOENT"||c==="ENOTDIR"}async function lne(i){let c=[],T="absent",D=[],w=new Map;async function v(me,Ae){let Pe=br(En,...me),Re;try{Re=await MA(Pe,i)}catch(Te){if(np(Te))return"disarmed";c.push(Pi(Pe,Te)),T="didNotLoad"}let xe=await zm(En,me,Ae,w);if(xe!==null)D.push({link:xe,read:Re!==void 0});if(Re===void 0)return"disarmed";let ke=Re.trim()===""?{}:ar(Re,!1);if(!n(ke))return c.push(Vl(Pe)),T="didNotLoad","disarmed";return T=io(T,"loaded"),$c(ke)}let U=br(En,"managed-settings.json"),B=await v(["managed-settings.json"]);if(B==="armed")return{flag:B,records:c,loadState:T,links:D};let K=B==="unreadable"?U:void 0,de=br(En,"managed-settings.d"),pe;try{pe=await l().readdir(de)}catch(me){if(!np(me))c.push(Pi(de,me,"directory")),T="didNotLoad";return{flag:B,unreadableFlagPath:K,records:c,loadState:T,links:D}}for(let me of pe){if(!(me.isFile()||me.isSymbolicLink())||!me.name.endsWith(".json")||me.name.startsWith("."))continue;let Ae=await v(["managed-settings.d",me.name],me.isSymbolicLink());if(Ae==="armed")return{flag:Ae,records:c,loadState:T,links:D};if(Ae==="unreadable")B=Ae,K??=br(de,me.name)}return{flag:B,unreadableFlagPath:K,records:c,loadState:T,links:D}}async function op(i,c){if(await PA(br(i,"managed-settings.json"),c))return!0;let T=br(i,"managed-settings.d"),D;try{D=await l().readdir(T)}catch(w){return!np(w)}for(let w of D)if((w.isFile()||w.isSymbolicLink())&&ju(w.name)&&await PA(br(T,w.name),c))return!0;return!1}function UA(i){if(!Object.hasOwn(i,pn))return{tier:i,organization:null,memberLost:!1};let{[pn]:c,...T}=i;return{tier:T,organization:null,memberLost:!1}}var cne={user:"userSettings",project:"projectSettings",local:"localSettings"},HA={userSettings:"user",projectSettings:"project",localSettings:"local",flagSettings:"flag",policySettings:"managed"},une=["user","project","local"];async function rNe(i={}){await kA();let c=i.managedSettings&&UA(i.managedSettings),T={store:new he,cwd:dne(i.cwd??l().cwd()),allowedSources:(i.settingSources??une).map((pe)=>cne[pe]),diskless:g(),parentManaged:c?.tier??null,parentOrganizationSettings:c?.organization,flagInline:null,flagPath:void 0,mdm:Ts,hkcu:ki,wslInherits:sp,credentialHelperKeysFrom:()=>"as_read",asksOrganization:()=>Ra(),...i.serverManagedSettings!==void 0&&{remote:()=>i.serverManagedSettings}},{effective:D,sources:w}=TA(T),v=iA(T)??void 0,U=w.map(({source:pe,settings:me})=>({source:HA[pe],settings:me,path:pe==="policySettings"?void 0:Ar(pe,T),...pe==="policySettings"&&{policyOrigin:v}})),B={};for(let pe of Object.keys(D)){let me=DA(pe,T);if(me)B[pe]={source:HA[me],path:me==="policySettings"?void 0:Ar(me,T),...me==="policySettings"&&{policyOrigin:v}}}let K=vA(),de=[];if(_A(T))de.push(K===null?"profile":"registry");else if(K!==null&&Wi(K))de.push("registry");if(EA(T))de.push("file");return{effective:D,provenance:B,sources:U,machinePolicy:{didNotLoad:de.length>0&&de}}}export{rNe as resolveSettingsForSdk};
|