@cline/core 0.0.95 → 0.2.0-nightly.1793312794
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/dist/ClineCore.d.ts +6 -1
- package/dist/account/rpc.d.ts +3 -1
- package/dist/account/types.d.ts +2 -0
- package/dist/artifacts/cloud/fetch.d.ts +8 -0
- package/dist/artifacts/cloud/publish.d.ts +6 -0
- package/dist/artifacts/publish.d.ts +30 -0
- package/dist/cline-core/runtime-services.d.ts +4 -2
- package/dist/cloud/computer-use-prompt.d.ts +9 -0
- package/dist/cloud/controller.d.ts +26 -4
- package/dist/cloud/hub-client.d.ts +53 -0
- package/dist/cloud/hub-protocol.d.ts +32 -0
- package/dist/cloud/index.d.ts +5 -0
- package/dist/cloud/index.js +34 -17
- package/dist/cloud/types.d.ts +4 -1
- package/dist/extensions/context/compaction-shared.d.ts +1 -0
- package/dist/extensions/context/compaction.d.ts +7 -0
- package/dist/extensions/context/summarize-conversation.d.ts +7 -0
- package/dist/extensions/context/summary-generation.d.ts +14 -0
- package/dist/extensions/mcp/apps.d.ts +16 -0
- package/dist/extensions/mcp/client.d.ts +1 -0
- package/dist/extensions/mcp/index.d.ts +5 -1
- package/dist/extensions/mcp/manager.d.ts +2 -1
- package/dist/extensions/mcp/session-apps.d.ts +28 -0
- package/dist/extensions/mcp/types.d.ts +22 -0
- package/dist/extensions/plugin/plugin-command-origin.d.ts +8 -0
- package/dist/extensions/plugin/plugin-registry.d.ts +1 -0
- package/dist/extensions/plugin/plugin-runtime.d.ts +7 -0
- package/dist/hub/client/index.d.ts +6 -0
- package/dist/hub/client/managed-hub-build-watcher.d.ts +2 -0
- package/dist/hub/client/plugin-commands.d.ts +4 -0
- package/dist/hub/client/session-client.d.ts +2 -0
- package/dist/hub/daemon/entry.js +248 -229
- package/dist/hub/daemon/index.d.ts +2 -0
- package/dist/hub/index.d.ts +1 -0
- package/dist/hub/index.js +238 -219
- package/dist/hub/runtime-host/hub-runtime-host.d.ts +6 -0
- package/dist/hub/server/cloud-session-service.d.ts +52 -0
- package/dist/hub/server/handlers/capability-handlers.d.ts +18 -1
- package/dist/hub/server/handlers/context.d.ts +13 -2
- package/dist/hub/server/handlers/mcp-apps-handlers.d.ts +5 -0
- package/dist/hub/server/handlers/session-handlers.d.ts +4 -0
- package/dist/hub/server/hub-server-options.d.ts +3 -0
- package/dist/hub/server/hub-server-transport.d.ts +2 -0
- package/dist/index.d.ts +10 -5
- package/dist/index.js +284 -258
- package/dist/plugin-runtime/node_modules/@cline/agents/dist/index.js +76 -0
- package/dist/plugin-runtime/node_modules/@cline/agents/package.json +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/ai-sdk-bdvd54cj.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/anthropic-d88t4w67.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/bedrock-4rh6dw0e.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/cline-dex049wz.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/cloud/index.js +38 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/community-adrseffv.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/foundation-models-embedding-model-strategy-SAVQFBF4-vf44v1q1.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/foundation-models-language-model-strategy-BPQO66W7-np6pavev.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-bsd-1xg0n8py.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-bsd-2h2811k3.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-darwin-918h9zb6.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-darwin-9g9qz8kw.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-linux-8p52y0t4.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-linux-cr4wnstr.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-unsupported-aa72jh2v.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-unsupported-k2y10eep.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-win-1hvm2h6v.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-win-7nqbajdc.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/google-nqn5r579.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/hub/daemon/entry.js +1166 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/hub/index.js +1153 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-0ahmqye5.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-1jwj53tz.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-3qy7846d.js +14 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-418gvd4a.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-4etvmc8g.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-4pm9q9we.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-4tgv599k.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-5hwscy9s.js +15 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-6dpcn5cw.js +9 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-7ycwqbm0.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-8qjtgvqw.js +9 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-8zb5grad.js +1210 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-94jdgxt6.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-9g67p34k.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-a9d2sjh0.js +85 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-agemt17a.js +3 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bhf7enwn.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bnwxdgvg.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-brjxtvsh.js +4 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bvb7f701.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bwet95hr.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-cadyf2yp.js +14 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-cxfnnrmh.js +9 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-cyyvppz9.js +6 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-d4pbedxj.js +137 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ddwn220p.js +12 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-edf1hmcw.js +62 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ejyd73x5.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-f25bf131.js +4 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-f4rfmj6q.js +3 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-fet3kwk6.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ffna8yzn.js +121 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-g2y6ptdc.js +213 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ge184xvn.js +6 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-gevnedsc.js +13 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-hkmarmve.js +190 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-kqacxn3s.js +39 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-m3gtj35r.js +14 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-neczvge6.js +21 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-p5k5hnam.js +75 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-sdvqs19c.js +20 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-t75m2pgm.js +146 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v4-qqb2kabr.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v6mehmme.js +12 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v80fh3x3.js +16 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-vd605jwp.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-vryppqt1.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-w55v4n1n.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-w9n2kgjk.js +140 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-yjbp9r76.js +142 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ztb3cjfh.js +3 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/jiti-static-kj4rdeey.js +473 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/jiti-y9tt7gmq.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/langfuse-stream-telemetry-bg81k3qh.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/langfuse-telemetry-tkbfbx5w.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/mistral-mkw95amh.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/multipart-parser-9z19cm6q.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/ollama-sjp09b7p.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/openai-1eyn4hw0.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/openai-compatible-f99c7syq.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/orchestration-embedding-model-strategy-GT27AFII-19936r1a.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/orchestration-language-model-strategy-YEQPUCOT-eavx3zc3.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/services/feature-flags/posthog.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/services/telemetry/index.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/token-04d0mwe8.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/token-util-mt7pvm61.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/vertex-6armtc3s.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/package.json +1 -0
- package/dist/plugin-runtime/node_modules/@cline/llms/dist/index.browser.js +16 -0
- package/dist/plugin-runtime/node_modules/@cline/llms/dist/index.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/llms/package.json +1 -0
- package/dist/plugin-runtime/node_modules/@cline/sdk/dist/index.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/sdk/package.json +1 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/dist/automation/index.js +57 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/dist/db/index.js +127 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/dist/index.browser.js +110 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/dist/index.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/dist/node.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/dist/remote-config/index.js +68 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/dist/storage/index.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/dist/types/index.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/package.json +1 -0
- package/dist/plugin-runtime/package.json +1 -0
- package/dist/{extensions → plugin-runtime}/plugin-sandbox-bootstrap.js +129 -129
- package/dist/remote/remote-environments.d.ts +1 -0
- package/dist/runtime/config/agent-runtime-config-builder.d.ts +2 -0
- package/dist/runtime/host/local-runtime-host.d.ts +10 -0
- package/dist/runtime/host/runtime-host.d.ts +6 -0
- package/dist/runtime/orchestration/runtime-oauth-token-manager.d.ts +3 -0
- package/dist/runtime/orchestration/session-runtime-orchestrator.d.ts +10 -1
- package/dist/runtime/orchestration/session-runtime.d.ts +2 -0
- package/dist/runtime/tools/subprocess-sandbox.d.ts +22 -0
- package/dist/services/cloud-handoff/git-preparation.d.ts +22 -0
- package/dist/services/global-settings.d.ts +6 -0
- package/dist/services/llms/cline-recommended-models.d.ts +2 -0
- package/dist/services/local-runtime-bootstrap.d.ts +1 -0
- package/dist/services/plugin-command-api.d.ts +47 -0
- package/dist/services/plugin-commands.d.ts +25 -27
- package/dist/services/skills-cli.d.ts +2 -0
- package/dist/services/telemetry/core-events.d.ts +26 -0
- package/dist/services/telemetry/index.js +1 -1
- package/dist/services/telemetry/run-health.d.ts +40 -0
- package/dist/services/telemetry/stall-signals.d.ts +12 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/session.d.ts +7 -0
- package/package.json +6 -5
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import{_c,St,ie,e,n,r,m,Vs,ri,o,t,p,w,d,s,a,cn,si,J,je}from"../../core/dist/index-edf1hmcw.js";var yt=["none","minimal","low","medium","high","xhigh","max"],en=s(yt),tn=en.exclude(["none"]),nn=s([...yt,"default"]).nullable(),rn=w("type",[t({type:a("toggle")}).strict(),t({type:a("effort"),values:o(nn)}).strict(),t({type:a("budget_tokens"),min:n().min(-1).optional(),max:n().min(0).optional()}).strict().refine((i)=>i.min===void 0||i.max===void 0||i.min<=i.max,{message:"Minimum reasoning budget cannot exceed maximum",path:["min"]})]),on=s(["default","openai-responses","r1"]),ai={DEFAULT:"default",OPENAI_RESPONSES:"openai-responses",R1:"r1"},an=s(["images","video","tools","streaming","prompt-cache","reasoning","reasoning-effort","computer-use","global-endpoint","structured_output","temperature","files"]),sn=s(["active","preview","deprecated","legacy"]),ln=t({input:n().optional(),output:n().optional(),cacheWrite:n().optional(),cacheRead:n().optional()}),un=t({maxBudget:n().optional(),outputPrice:n().optional(),thinkingLevel:s(["low","high"]).optional()}),dn=t({reasoningDefaultOn:r().optional(),apiProtocol:s(["openai-chat","openai-responses","anthropic","gemini"]).optional()}).catchall(m()),ze=s(["text","image","audio","video","pdf"]),pn=t({input:o(ze),output:o(ze)});function mn(i){return(i?.input===void 0||i.input.includes("text"))&&(i?.output===void 0||i.output.includes("text"))}var fn=s(["language","image-generation","speech-generation","video-generation","transcription","realtime"]);function li(i){let l=i.modalities?.input,u=i.modalities?.output;return l?.length===1&&l[0]==="audio"&&u?.length===1&&u[0]==="text"}function ui(i){return(i.operation===void 0||i.operation==="language")&&mn(i.modalities)}var gn=s(["batch","streaming"]);function ci(i){return i.modalities?.input.includes("text")===!0&&i.modalities.output.includes("image")}function di(i){return i.operation==="image-generation"}function bt(i,l,u){let c=i.capabilities;if(c===void 0||c.length===0)return u?.assumeWhenUnspecified??!1;return c.includes(l)}function pi(i){return bt(i,"tools",{assumeWhenUnspecified:!0})}function mi(i){return bt(i,"images",{assumeWhenUnspecified:!0})}var vt=t({id:e(),name:e().optional(),description:e().optional(),maxTokens:n().optional(),contextWindow:n().optional(),maxInputTokens:n().optional(),capabilities:o(an).optional(),operation:fn.optional(),operationModes:o(gn).optional(),modalities:pn.optional(),reasoningOptions:o(rn).optional(),apiFormat:on.optional(),systemRole:s(["system","developer"]).optional(),temperature:n().optional(),pricing:ln.optional(),thinkingConfig:un.optional(),status:sn.optional(),deprecationNotice:e().optional(),replacedBy:e().optional(),releaseDate:e().optional(),deprecationDate:e().optional(),family:e().optional(),metadata:dn.optional()}),gi="This tool call was rejected by the user and not executed.",hi="NOT a tool or system failure. Clarify with user before proceeding.",hn=t({id:e(),name:e(),execution:s(["client","provider"]).optional(),input:m(),output:m(),error:e().optional(),durationMs:n(),startedAt:ri(),endedAt:ri()}),yn=s(["completed","max_iterations","aborted","mistake_limit","error"]),bn=t({inputTokens:n(),outputTokens:n(),cacheReadTokens:n().optional(),cacheWriteTokens:n().optional(),totalCost:n().optional()}),yi=t({text:e(),usage:bn,messages:o(J()),toolCalls:o(hn),iterations:n(),finishReason:yn,model:t({id:e(),provider:e(),info:vt.optional()}),startedAt:ri(),endedAt:ri(),durationMs:n()}),bi=t({distinctId:e().optional(),sessionId:e().optional(),providerId:e(),modelId:e(),apiKey:e().optional(),baseUrl:e().url().optional(),headers:d(e(),e()).optional(),knownModels:d(e(),vt).optional(),providerConfig:m().optional(),initialMessages:o(J()).optional(),systemPrompt:e(),tools:o(J()),modelTools:o(J()).optional(),maxIterations:n().positive().optional(),maxParallelToolCalls:n().int().positive().default(8),maxTokensPerTurn:n().positive().optional(),temperature:n().nonnegative().optional(),apiTimeoutMs:n().positive().default(180000),userFileContentLoader:si().input([e()]).output(cn(e())).optional(),toolContextMetadata:d(e(),m()).optional(),execution:t({maxConsecutiveMistakes:n().int().positive().optional(),reminderAfterIterations:n().nonnegative().optional(),reminderText:e().optional(),loopDetection:p([a(!1),t({softThreshold:n().int().positive().optional(),hardThreshold:n().int().positive().optional()})]).optional()}).optional(),reasoningEffort:tn.optional(),thinkingBudgetTokens:n().positive().optional(),thinking:r().optional(),onEvent:si().input([J()]).output(Vs()).optional(),hooks:J().optional(),parentAgentId:e().optional(),extensions:o(J()).optional(),hookErrorMode:s(["ignore","throw"]).default("ignore"),toolPolicies:d(e(),t({enabled:r().optional(),autoApprove:r().optional()})).optional(),requestToolApproval:si().input([t({sessionId:e(),agentId:e(),conversationId:e(),iteration:n(),toolCallId:e(),toolName:e(),input:m(),policy:t({enabled:r().optional(),autoApprove:r().optional()}).default({})})]).output(p([t({approved:r(),reason:e().optional()}),cn(t({approved:r(),reason:e().optional()}))])).optional(),onConsecutiveMistakeLimitReached:si().input([t({iteration:n().int().positive(),consecutiveMistakes:n().int().positive(),maxConsecutiveMistakes:n().int().positive(),reason:s(["api_error","invalid_tool_call","tool_execution_failed"]),details:e().optional()})]).output(p([t({action:a("continue"),guidance:e().optional()}),t({action:a("stop"),reason:e().optional()}),cn(p([t({action:a("continue"),guidance:e().optional()}),t({action:a("stop"),reason:e().optional()})]))])).optional(),logger:J().optional(),extensionContext:J().optional(),abortSignal:J().optional()}),vn=s(["connector.started","connector.stopping","session.authorize","message.received","message.denied","message.completed","message.failed","session.started","session.reused","session.reset","schedule.delivery.started","schedule.delivery.sent","schedule.delivery.failed"]),En=t({id:e().optional(),label:e().optional(),role:e().optional(),participantKey:e().optional(),participantLabel:e().optional(),platformUserId:e().optional(),metadata:d(e(),m()).optional()}),Tn=t({source:e(),sourceEvent:e(),threadId:e(),channelId:e(),isDM:r(),sessionId:e().optional(),workspaceRoot:e().optional(),metadata:d(e(),m()).optional()}),Ei=t({actor:En,context:Tn,payload:d(e(),m()).optional()}),Ti=t({action:s(["allow","deny"]).default("allow"),message:e().optional(),reason:e().optional(),metadata:d(e(),m()).optional()}),_i=t({adapter:e(),botUserName:e().optional(),event:vn,payload:d(e(),m()),ts:e()}),_n=[{name:"discord",description:"Discord interactions and gateway bridge backed by RPC runtime sessions"},{name:"gchat",description:"Google Chat webhook bridge backed by RPC runtime sessions"},{name:"linear",description:"Linear webhook bridge backed by RPC runtime sessions"},{name:"slack",description:"Slack webhook/socket bridge backed by RPC runtime sessions"},{name:"telegram",description:"Bridge Telegram bot messages into RPC chat sessions"},{name:"whatsapp",description:"Bridge WhatsApp webhook messages into RPC chat sessions"}];function In(){return _n.map((i)=>({...i}))}function Ii(i,l){let u=i.includeWhen;if(!u)return!0;let c=l[u.flag]??"";if(u.equals!==void 0&&c!==u.equals)return!1;if(u.notEquals!==void 0&&c===u.notEquals)return!1;return!0}function ki(i=An){let l=new Set(In().map((u)=>u.name));return i.filter((u)=>l.has(u.id)).map((u)=>({id:u.id,name:u.name,type:u.type,hint:u.hint,fields:u.fields.map((c)=>({flag:c.flag,label:c.label,placeholder:c.placeholder,required:c.required,help:c.help,initialValue:c.initialValue,options:c.options,includeWhen:c.includeWhen})),security:u.security?{prompt:u.security.prompt,fields:u.security.fields.map((c)=>({key:c.key,label:c.label,placeholder:c.placeholder,help:c.help,requiredMessage:c.requiredMessage}))}:void 0}))}function kn(i){return/^\d+$/.test(i)?void 0:"Telegram user ID must contain digits only"}function Sn(i){return/^T[A-Z0-9]+$/.test(i)?void 0:"Slack workspace ID must start with T and contain uppercase letters or digits only"}function wn(i){return/^[UW][A-Z0-9]+$/.test(i)?void 0:"Slack member ID must start with U or W and contain uppercase letters or digits only"}var An=[{id:"telegram",name:"Telegram",type:"polling",hint:"Easiest to set up. No public URL needed.",derivedReconnectFlags:["-m","--bot-username"],fields:[{flag:"-k",aliases:["--bot-token"],label:"Bot token",placeholder:"7123456789:AAH...",required:!0,help:["Open Telegram and start a chat with @BotFather","Send /newbot and follow the prompts","BotFather gives you this after creating the bot","It looks like 7123456789:AAHxxx..."]}],security:{prompt:"By default, anyone who finds your bot can message it and run tasks on your machine. Restrict access to your Telegram user ID?",fields:[{key:"userId",label:"Your Telegram user ID",placeholder:"123456789",help:["Message @userinfobot on Telegram","It will reply with your numeric user ID"],requiredMessage:"User ID is required to restrict access",validate:kn}],argumentFlags:["--allowed-user-id","--hook-command"],buildArgs:({userId:i})=>["--allowed-user-id",i??""]}},{id:"slack",name:"Slack",type:"hybrid",hint:"Public URL for webhook mode; leave blank for socket mode.",fields:[{flag:"--bot-token",label:"Bot token",placeholder:"xoxb-...",required:!0,help:["Go to api.slack.com/apps and create a new app","Add Bot Token Scopes: chat:write, app_mentions:read, channels:history, channels:read, im:history, im:read, im:write, users:read","Install to workspace and copy the Bot Token"]},{flag:"--base-url",label:"Public base URL",placeholder:"leave blank for socket mode",help:["Enter a publicly accessible URL for webhook mode","Leave blank to use Slack socket mode instead"]},{flag:"--signing-secret",label:"Signing secret",required:!0,help:["Found in your app's Basic Information page"],includeWhen:{flag:"--base-url",notEquals:""}},{flag:"--app-token",label:"App-level token",placeholder:"xapp-...",required:!0,help:["Enable Socket Mode in the Slack app","Generate an app-level token with the connections:write scope"],includeWhen:{flag:"--base-url",equals:""}}],security:{prompt:"Restrict which Slack users can interact with the bot?",fields:[{key:"teamId",label:"Allowed Slack workspace ID",placeholder:"T01ABC123",help:["Open your Slack workspace URL in a browser","The workspace ID is the segment after /client/, for example T01ABC123"],requiredMessage:"Workspace ID is required to restrict access",validate:Sn},{key:"userId",label:"Allowed Slack member ID",placeholder:"U01ABC123",help:["Click a user's name in Slack, then View full profile","Click ... and Copy member ID"],requiredMessage:"Member ID is required to restrict access",validate:wn}],argumentFlags:["--hook-command"],buildArgs:({teamId:i,userId:l})=>["--hook-command",`jq -r ".payload.actor.participantKey" | grep -qx "slack:team:${i}:user:${l}" && echo '{"action":"allow"}' || echo '{"action":"deny"}'`]}},{id:"discord",name:"Discord",type:"webhook",hint:"Requires a Discord app and public URL.",fields:[{flag:"--application-id",aliases:["--app-id"],label:"Application ID",required:!0,help:["Go to discord.com/developers/applications","Create a new app, copy the Application ID"]},{flag:"--bot-token",aliases:["--token"],label:"Bot token",required:!0,help:["Go to Bot section, create a bot, copy the token"]},{flag:"--public-key",label:"Public key",required:!0,help:["Found in General Information of your app"]},{flag:"--base-url",label:"Public base URL",placeholder:"https://example.com",required:!0,help:["Base URL for the connector","For Discord, set the Interactions Endpoint URL to <base-url>/api/webhooks/discord"]}]},{id:"whatsapp",name:"WhatsApp",type:"webhook",hint:"Requires Meta developer account and public URL.",fields:[{flag:"--phone-number-id",label:"Phone number ID",required:!0,help:["From your WhatsApp Business account in Meta Developer portal"]},{flag:"--access-token",label:"Access token",required:!0,help:["Generate a permanent token in Meta Developer portal"]},{flag:"--app-secret",label:"App secret",required:!0,help:["Found in App Settings > Basic"]},{flag:"--verify-token",label:"Webhook verify token",placeholder:"my-verify-token",required:!0,help:["Any string you choose, used to verify webhook setup"]},{flag:"--base-url",label:"Public base URL",placeholder:"https://example.com",required:!0}]},{id:"gchat",name:"Google Chat",type:"webhook",hint:"Requires Google Cloud project and public URL.",fields:[{flag:"--credentials-json",label:"Service account credentials JSON",required:!0,help:["Create a service account in Google Cloud Console","Download the credentials JSON file","Paste the JSON content here"]},{flag:"--base-url",label:"Public base URL",placeholder:"https://example.com",required:!0}]},{id:"linear",name:"Linear",type:"webhook",hint:"React to Linear issues and comments.",fields:[{flag:"--api-key",label:"API key",required:!0,help:["Go to Linear Settings > API > Personal API keys"]},{flag:"--webhook-secret",label:"Webhook signing secret",required:!0,help:["Go to Settings > API > Webhooks, create one","Copy the signing secret"]},{flag:"--base-url",label:"Public base URL",placeholder:"https://example.com",required:!0}]}],On=["hooks","tools","commands","rules","skills","messageBuilders","providers","automationEvents","mcp"],xn=new Set(On);function Et(i,l){return i.name||`extension_${String(l).padStart(4,"0")}`}function Ve(i){return Array.isArray(i)&&i.every((l)=>typeof l==="string")}function Ye(i){if(!Array.isArray(i))return;let l=i.filter((u)=>typeof u==="string").map((u)=>u.trim()).filter((u)=>u.length>0);return l.length>0?l:void 0}function Cn(i){let l=Ye(i.providerIds),u=Ye(i.modelIds);return{...i,...l?{providerIds:l}:{},...u?{modelIds:u}:{}}}function Rn(i,l){let u=Et(i,l),c=i.manifest;if(!c||typeof c!=="object")throw Error(`Invalid manifest for extension "${u}": manifest is required`);if(!Array.isArray(c.capabilities)||c.capabilities.length===0)throw Error(`Invalid manifest for extension "${u}": capabilities must be a non-empty array`);let f=new Set;for(let h of c.capabilities){if(!xn.has(h))throw Error(`Invalid manifest for extension "${u}": unsupported capability "${String(h)}"`);f.add(h)}if(Object.hasOwn(c,"providerIds")&&!Ve(c.providerIds))throw Error(`Invalid manifest for extension "${u}": providerIds must be a string array when provided`);if(Object.hasOwn(c,"modelIds")&&!Ve(c.modelIds))throw Error(`Invalid manifest for extension "${u}": modelIds must be a string array when provided`);let g=f.has("hooks");if(i.hooks!==void 0&&!g)throw Error(`Invalid manifest for extension "${u}": runtime hooks require the "hooks" capability`);return{capabilities:f,raw:Cn(c)}}function Mn(i,l){if(!i||typeof i!=="object")throw Error(`Invalid automation event contribution for extension "${l}": expected object`);let u=typeof i.eventType==="string"?i.eventType.trim():"",c=typeof i.source==="string"?i.source.trim():"";if(!u)throw Error(`Invalid automation event contribution for extension "${l}": eventType is required`);if(!c)throw Error(`Invalid automation event contribution for extension "${l}": source is required`);return{...i,eventType:u,source:c,examples:i.examples?[...i.examples]:void 0,metadata:i.metadata?{...i.metadata}:void 0}}class Tt{extensions;registry={tools:[],commands:[],rules:[],messageBuilder:[],providers:[],automationEventTypes:[],mcpServers:[]};normalized=[];phase="resolve";setupContext;constructor(i={}){this.extensions=i.extensions??[],this.setupContext=i.setupContext??{}}resolve(){if(this.phase!=="resolve")return;this.normalized=this.extensions.map((i,l)=>({extension:i,order:l,manifest:{capabilities:new Set,raw:i.manifest}})),this.phase="validate"}validate(){if(this.phase==="resolve")this.resolve();if(this.phase!=="validate")return;this.normalized=this.normalized.map((i)=>({...i,manifest:Rn(i.extension,i.order)})),this.phase="setup"}async setup(i={}){if(this.phase==="resolve")this.resolve();if(this.phase==="validate")this.validate();if(this.phase!=="setup")return;let l,u=[];for(let c of this.normalized){let{extension:f}=c;if(f.disabled)continue;let g=Et(f,c.order),h={tools:[],commands:[],rules:[],messageBuilder:[],providers:[],automationEventTypes:[],mcpServers:[]},y={registerTool:(E)=>h.tools.push(E),registerCommand:(E)=>h.commands.push(E),registerRule:(E)=>{if(!c.manifest.capabilities.has("rules"))throw Error(`Invalid setup for extension "${g}": registerRule requires the "rules" capability`);h.rules.push(E)},registerMessageBuilder:(E)=>h.messageBuilder.push(E),registerProvider:(E)=>h.providers.push(E),registerAutomationEventType:(E)=>{if(!c.manifest.capabilities.has("automationEvents"))throw Error(`Invalid setup for extension "${g}": registerAutomationEventType requires the "automationEvents" capability`);h.automationEventTypes.push(Mn(E,g))},registerMcpServer:(E)=>{if(!c.manifest.capabilities.has("mcp"))throw Error(`Invalid setup for extension "${g}": registerMcpServer requires the "mcp" capability`);h.mcpServers.push({...E,metadata:{...E.metadata??{},source:"plugin",plugin:g}})}},_=c.manifest.capabilities.has("automationEvents")?this.setupContext:{...this.setupContext,automation:void 0};try{await f.setup?.(y,_),u.push(h)}catch(E){if(i.tolerateSetupErrors!==!0)throw E;l??=E}}if(l&&i.tolerateSetupErrors!==!0)throw l;for(let c of u)this.registry.tools.push(...c.tools),this.registry.commands.push(...c.commands),this.registry.rules.push(...c.rules),this.registry.messageBuilder.push(...c.messageBuilder),this.registry.providers.push(...c.providers),this.registry.automationEventTypes.push(...c.automationEventTypes),this.registry.mcpServers.push(...c.mcpServers);if(this.phase="activate",l)throw l}activate(){if(this.phase==="resolve")this.resolve();if(this.phase==="validate")this.validate();if(this.phase==="setup")throw Error("Contribution registry setup must complete before activation");if(this.phase!=="activate")return;this.phase="run"}async initialize(i={}){this.resolve(),this.validate();try{await this.setup(i)}finally{if(this.phase==="activate")this.activate()}}isActivated(){return this.phase==="run"}getRegistrySnapshot(){return{tools:[...this.registry.tools],commands:[...this.registry.commands],rules:[...this.registry.rules],messageBuilder:[...this.registry.messageBuilder],providers:[...this.registry.providers],automationEventTypes:[...this.registry.automationEventTypes],mcpServers:[...this.registry.mcpServers]}}getRegisteredTools(){return[...this.registry.tools]}getRegisteredRules(){return[...this.registry.rules]}getRegisteredAutomationEventTypes(){return[...this.registry.automationEventTypes]}getRegisteredMcpServers(){return[...this.registry.mcpServers]}getValidatedExtensions(){if(this.phase==="resolve")this.resolve();if(this.phase==="validate")this.validate();return this.normalized.slice().sort((i,l)=>i.order-l.order).map(({extension:i})=>i)}}function Si(i={}){return new Tt(i)}var wi=[".js",".ts"],Q={CLINE_PASS:"ext-cline-pass",CODE_CLOUD_AGENTS:"code-cloud-agents",CODE_ONBOARDING_GITHUB:"code-onboarding-github",CLINE_COMPOSIO_BETA:"CLINE_COMPOSIO_BETA",CLOUD_COMPUTER_USE:"cloud-computer-use"},Ai={[Q.CLINE_PASS]:!1,[Q.CODE_CLOUD_AGENTS]:!1,[Q.CODE_ONBOARDING_GITHUB]:!1,[Q.CLINE_COMPOSIO_BETA]:!1,[Q.CLOUD_COMPUTER_USE]:!1},Oi=Object.values(Q),Nn=s(["agent_start","agent_resume","agent_abort","agent_end","agent_error","tool_call","tool_result","prompt_submit","pre_compact","session_shutdown"]),K=d(e(),e()),Ln=t({toolName:e(),parameters:K}),Pn=t({toolName:e(),parameters:K,result:e(),success:r(),executionTimeMs:n()}),Dn=t({prompt:e(),attachments:o(e())}),Bn=t({taskMetadata:K}),Un=t({taskMetadata:K,previousState:K}),jn=t({taskMetadata:K}),$n=t({taskMetadata:K}),Fn=t({taskId:e(),ulid:e(),contextSize:n(),compactionStrategy:e(),previousApiReqIndex:n(),tokensIn:n(),tokensOut:n(),tokensInCache:n(),tokensOutCache:n(),deletedRangeStart:n(),deletedRangeEnd:n(),contextJsonPath:e(),contextRawPath:e()}),qn=t({clineVersion:e(),hookName:Nn,timestamp:e(),taskId:e(),sessionContext:t({rootSessionId:e().optional(),hookLogPath:e().optional()}).optional(),workspaceRoots:o(e()),workspaceInfo:J().optional(),userId:e(),agent_id:e(),parent_agent_id:e().nullable(),iteration:n().optional(),reason:e().optional(),tool_call:t({id:e(),name:e(),input:m()}).optional(),tool_result:J().optional(),turn:m().optional(),error:t({name:e(),message:e(),stack:e().optional()}).optional(),preToolUse:Ln.optional(),postToolUse:Pn.optional(),userPromptSubmit:Dn.optional(),taskStart:Bn.optional(),taskResume:Un.optional(),taskCancel:jn.optional(),taskComplete:$n.optional(),preCompact:Fn.optional()}).passthrough();function Ci(i){let l=qn.safeParse(i);if(!l.success)return;return l.data}var Ri="v1",Mi="v1",Ni="v1",Li=["client.register","client.list","session.create","session.list","session.get","session.run","session.abort","schedule.create","schedule.list","task.create","task.list","task.get","task.update","task.approve","task.cancel","task.run","task.automation.get","task.automation.set","settings.get","settings.set","connector.start","connector.stop","connector.supervised","run.enqueue","run.list","hub.drain","hub.status","plugins.list","plugins.status","plugins.reload","stream.replay"];function pe(i){let l=/^v(\d+)$/.exec(i?.trim()??"");if(!l)return;return Number.parseInt(l[1]??"",10)}function Pi(i,l="v1"){let u=pe(i.protocolVersion),c=pe(l);if(u===void 0||c===void 0)return{compatible:!1,reason:"missing_protocol"};let f=pe(i.minClientProtocolVersion)??u,g=pe(i.maxClientProtocolVersion)??u;return c>=f&&c<=g?{compatible:!0}:{compatible:!1,reason:"unsupported_protocol"}}var Di="approval.respond",Bi="0",Ui="__hubScheduleRunAt",_t=["act","plan","yolo"];function Hn(i){return _t.some((l)=>l===i)}function ji(i,l){if(!i||!Object.hasOwn(i,"mode"))return l;let u=i.mode;if(Hn(u))return u;throw Error(`mode must be one of: ${_t.join(", ")}`)}var Gn=30000,$i=5000;function Wn(i){switch(i){case"run.start":case"session.send_input":case"plugins.commands.run":return null;default:return Gn}}function Fi(i,l){return l===void 0?Wn(i):l}var zn=["readFile","search","bash","webFetch","editor","applyPatch","skills","askQuestion","submit"],Vn=new Set(zn);function qi(i){return typeof i==="string"&&Vn.has(i)}var Hi="tool_executor.",Gi="custom_tool.",Wi="hook.",zi="compaction.compact",Vi="checkpoint.create",Yi="mistake_limit.decide",Ki="user_instructions.snapshot";function Xi(i){let l=i.activeSessionCount;if(typeof l!=="number"||l<=0)return"active sessions from other Cline clients";let u=`${l} active session${l===1?"":"s"}`,c=i.participantClientCount;if(typeof c!=="number"||c<=0)return u;return`${u} from ${c} connected Cline client${c===1?"":"s"}`}function Yn(i,l){return`<file_content path="${i}">
|
|
2
|
+
${l}
|
|
3
|
+
</file_content>`}function Ji(i,l="act"){return`<user_input mode="${l}">${i}</user_input>`}function Zi(i,l){return`<user_command slash="${l}">${i}</user_command>`}function Qi(i,l){return`<mode_notice>The user switched from ${i} mode to ${l} mode before sending this message.</mode_notice>`}function ea(){let i=null;return{record(l,u){if(l===u)return;if(i){i=i.from===u?null:{from:i.from,to:u};return}i={from:l,to:u}},consume(){let l=i;return i=null,l}}}function Kn(i,l){let u=i.trim(),c=new RegExp(`^<${l}\\b([^>]*)>([\\s\\S]*?)<\\/${l}>$`,"i").exec(u);if(!c)return;return{attrs:c[1]??"",content:c[2]??""}}function Xn(i,l){return new RegExp(`${l}="([^"]+)"`,"i").exec(i)?.[1]?.trim()||void 0}function Jn(i){if(!i?.trim())return;let l=Kn(i,"user_command");if(!l)return;let u=Xn(l.attrs,"slash");if(!u)return;return{slash:u,content:l.content.trim()}}function Zn(i){if(!i?.trim())return"";let l=i.trim();for(let u of["user_input","user_command"]){let c=rr(l,u);l=(c!==l?c:l.replace(new RegExp(`<${u}[^>]*>`,"g"),"")).trim()}return l}function Qn(i){if(!i?.trim())return"";return er(i,"mode_notice").trim()}function er(i,l){let u=`<${l}>`,c=`</${l}>`,f=i,g=f.indexOf(u);while(g!==-1){let h=f.indexOf(c,g+u.length);if(h===-1)break;f=f.slice(0,g)+f.slice(h+c.length),g=f.indexOf(u,g)}return f}function It(i){let l=Qn(Zn(i)),u=Jn(i);if(!u)return l;if(u.slash.toLowerCase()==="team"){let c=l.toLowerCase().startsWith("spawn a team of agents for the following task:")?l.slice(46).trim():l;return c?`/team ${c}`:"/team"}return l?`/${u.slash} ${l}`:`/${u.slash}`}var tr=240,nr=480;function kt(i,l){let u=i.replace(/\s+/gu," ").trim();if(u.length<=l)return u;return`${u.slice(0,l-1).trimEnd()}…`}function ta(i){return kt(It(i),tr)}function na(i,l){let u=l?.trim()??"",c=i.toLowerCase(),f=c==="user"||c==="session"?It(u):u;return kt(f,nr)}function rr(i,l){if(!i?.trim())return"";if(!l)return i;let u=new RegExp(`<${l}\\b[^>]*>([\\s\\S]*?)</${l}>`,"g");return i.replace(u,"$1")}var ye="[media omitted: invalid or exceeds size limit]",be="[Image attached — this model cannot view images]",or=s(["image","audio","video","file"]),ir=w("type",[t({type:a("base64"),data:e().min(1)}),t({type:a("url"),url:e().url().refine((i)=>{let l=new URL(i).protocol;return l==="http:"||l==="https:"},"Generated media URLs must use HTTP or HTTPS")}),t({type:a("artifact"),artifactId:e().min(1)})]);function wt(i){if(i.startsWith("image/"))return"image";if(i.startsWith("audio/"))return"audio";if(i.startsWith("video/"))return"video";return"file"}var ar=t({id:e().min(1),modality:or,mediaType:e().min(1),source:ir,name:e().min(1).optional(),sizeBytes:n().int().nonnegative().optional()}).refine((i)=>wt(i.mediaType)===i.modality,{message:"Generated media modality must match its media type",path:["modality"]});function oa(i){return ar.safeParse(i).success}function ia(i){return wt(i)}var At=["image/png","image/jpeg","image/gif","image/webp"],Ot=5242880,G=Ot,Y=6291456,sr=8388608;function aa(i){return i.length}function xt(i){let l=i.endsWith("==")?2:i.endsWith("=")?1:0;return Math.floor(i.length*3/4)-l}function sa(i=Ot){return Math.floor(i*3/4)}function lr(i){return Math.ceil(i/3)*4}function Ct(i={}){return{maxImageEncodedBytes:i.maxImageEncodedBytes??G,maxImageDecodedBytes:i.maxImageDecodedBytes??Y,maxTotalMediaBytes:i.maxTotalMediaBytes??sr}}function Rt(){return{totalEncodedBytes:0,keptImages:0,omittedImages:0,omittedReasons:{}}}function ge(i,l){i.omittedImages+=1,i.omittedReasons[l]=(i.omittedReasons[l]??0)+1}function Pe(i,l,u,c){let f=Ct(u);if(i>f.maxImageEncodedBytes){let g={ok:!1,reason:"encoded_limit",message:`Image media exceeds the ${f.maxImageEncodedBytes} byte encoded limit`};return ge(c,g.reason),g}if(l>f.maxImageDecodedBytes){let g={ok:!1,reason:"decoded_limit",message:`Image media exceeds the ${f.maxImageDecodedBytes} byte decoded limit`};return ge(c,g.reason),g}if(c.totalEncodedBytes+i>f.maxTotalMediaBytes){let g={ok:!1,reason:"total_limit",message:`Image media exceeds the ${f.maxTotalMediaBytes} byte total media limit`};return ge(c,g.reason),g}return c.totalEncodedBytes+=i,c.keptImages+=1,null}function ur(i){return i>=65&&i<=90||i>=97&&i<=122||i>=48&&i<=57||i===43||i===47}function la(i){return i.length>0&&De(i,0,i.length)}function ua(i,l,u){let c=Mt(i),f=c.end-c.start;if(f===0)return{ok:!1,reason:"invalid_base64",message:"Generated media must contain valid base64"};let g=Ct(l);if(u.totalEncodedBytes+f>g.maxTotalMediaBytes)return{ok:!1,reason:"total_limit",message:`Generated media exceeds the ${g.maxTotalMediaBytes} byte total media limit`};if(!De(i,c.start,c.end))return{ok:!1,reason:"invalid_base64",message:"Generated media must contain valid base64"};let h=i.slice(c.start,c.end);return u.totalEncodedBytes+=f,{ok:!0,base64:h,encodedBytes:f,decodedBytes:xt(h)}}function De(i,l,u){let c=u-l;if(c%4!==0)return!1;let f=u;if(c>=2&&i.charCodeAt(u-2)===61&&i.charCodeAt(u-1)===61)f-=2;else if(c>=1&&i.charCodeAt(u-1)===61)f-=1;for(let g=l;g<f;g++)if(!ur(i.charCodeAt(g)))return!1;for(let g=f;g<u;g++)if(i.charCodeAt(g)!==61)return!1;return!0}function cr(i,l,u){return u-l>=5&&(i.charCodeAt(l)|32)===100&&(i.charCodeAt(l+1)|32)===97&&(i.charCodeAt(l+2)|32)===116&&(i.charCodeAt(l+3)|32)===97&&i.charCodeAt(l+4)===58}function Mt(i){let l=0,u=i.length;while(l<u&&/\s/.test(i[l]??""))l+=1;while(u>l&&/\s/.test(i[u-1]??""))u-=1;return{start:l,end:u}}function dr(i,l,u){if(!cr(i,l,u))return;let c=l+5,f=i.indexOf(",",c);if(f===-1||f>=u)return;if(f-c>128)return;let g=i.slice(c,f).toLowerCase(),h=";base64";if(!g.endsWith(h))return;let y=g.slice(0,-h.length);if(!y||y.includes(";"))return;return{mediaType:y,base64Start:f+1,base64End:u}}function pr(i,l,u={}){let c=u.maxEncodedBytes??G,f=u.maxDecodedBytes??Y,g=new Set(u.supportedMediaTypes??At),h=i?.toLowerCase(),y=Mt(l),{start:_,end:E}=y,T=dr(l,y.start,y.end);if(T){if(h&&h!==T.mediaType)return{ok:!1,reason:"media_type_mismatch",message:`Image media type ${i} does not match data URL type ${T.mediaType}`};h=T.mediaType,_=T.base64Start,E=T.base64End}if(!h||!g.has(h))return{ok:!1,reason:"unsupported_media_type",message:`Unsupported image media type: ${i??"unknown"}`};let k=E-_;if(k===0)return{ok:!1,reason:"invalid_base64",message:"Image media must contain valid base64"};if(k>c)return{ok:!1,reason:"encoded_limit",message:`Image media exceeds the ${c} byte encoded limit`};if(!De(l,_,E))return{ok:!1,reason:"invalid_base64",message:"Image media must contain valid base64"};let S=l.slice(_,E),R=xt(S);if(R>f)return{ok:!1,reason:"decoded_limit",message:`Image media exceeds the ${f} byte decoded limit`};return{ok:!0,mediaType:h,base64:S,encodedBytes:k,decodedBytes:R}}function Oe(i,l,u,c){let f=pr(i,l,{maxEncodedBytes:u.maxImageEncodedBytes,maxDecodedBytes:u.maxImageDecodedBytes});if(!f.ok)return ge(c,f.reason),f;let g=Pe(f.encodedBytes,f.decodedBytes,u,c);if(g)return g;return f}function D(i){return i.replace(/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g,"�")}var me="ERROR: EMPTY CONTENT",mr="[image attached]",fr="[generated image]";function gr(i){return`[generated ${i}]`}function fe(i){return{type:"text",text:`[generated ${i.modality} unavailable to this model]`}}function Ie(i,l){let u=i[i.length-1];if(l.role==="tool"&&u?.role==="tool"&&Array.isArray(u.content)&&Array.isArray(l.content)){u.content.push(...l.content);return}i.push(l)}function hr(i){if(!Array.isArray(i)||i.length===0)return!1;return i.every((l)=>{if(!l||typeof l!=="object")return!1;let u=l;if(u.type==="text")return typeof u.text==="string";if(u.type==="image")return typeof u.data==="string"&&typeof u.mediaType==="string";return!1})}function W(){return{type:"text",text:ye}}function Ke(i){return Pe(G,0,{maxImageEncodedBytes:G,maxImageDecodedBytes:Y},i)===null}function Nt(i){try{return new URL(i).protocol}catch{return}}function xe(i,l){let u=Oe(i.mediaType,i.data,{maxImageEncodedBytes:G,maxImageDecodedBytes:Y},l);if(!u.ok)return W();return Lt(u.base64,u.mediaType)}function Lt(i,l){return{type:"file",data:{type:"data",data:i},mediaType:l}}function ee(i,l){return{type:"file",data:i,mediaType:l??"image"}}function Ce(i,l){if(i.image instanceof URL){if(i.image.protocol==="data:"){let g=Oe(i.mediaType,i.image.href,{maxImageEncodedBytes:G,maxImageDecodedBytes:Y},l);if(!g.ok)return W();return ee(`data:${g.mediaType};base64,${g.base64}`,g.mediaType)}if(i.image.protocol!=="http:"&&i.image.protocol!=="https:")return W();if(!Ke(l))return W();return ee(i.image,i.mediaType)}if(typeof i.image==="string"){let g=Nt(i.image);if(g==="http:"||g==="https:"){if(!Ke(l))return W();return ee(i.image,i.mediaType)}let h=g==="data:",y=Oe(i.mediaType??(h?void 0:"image/png"),i.image,{maxImageEncodedBytes:G,maxImageDecodedBytes:Y},l);if(!y.ok)return W();return ee(h?`data:${y.mediaType};base64,${y.base64}`:y.base64,y.mediaType)}let u=i.image.byteLength,c=lr(u),f=i.mediaType?.toLowerCase()??"image/png";if(!At.includes(f)||Pe(c,u,{maxImageEncodedBytes:G,maxImageDecodedBytes:Y},l))return W();return ee(i.image,f)}function yr(i,l){if(!l)return!0;if(i.modality==="file")return i.mediaType==="application/pdf"&&l.includes("pdf");return l.includes(i.modality)}function Xe(i,l,u){if(!yr(i,u))return fe(i);if(i.modality==="image"){if(i.source.type==="artifact")return fe(i);return Ce({type:"image",image:i.source.type==="url"?i.source.url:i.source.data,mediaType:i.mediaType},l)}if(i.source.type==="artifact")return fe(i);if(i.source.type==="url"){let c=Nt(i.source.url);if(c!=="http:"&&c!=="https:"&&c!=="data:")return fe(i)}return ee(i.source.type==="url"?i.source.url:i.source.data,i.mediaType)}function Re(i,l,u,c){let{hoistImages:f,inlineImagePlaceholder:g}=c;if(i==null||typeof i!=="object")return{value:i,changed:!1,mediaChanged:!1};if(Array.isArray(i)){let T=[],k=!1,S=!1;for(let R of i){if(R&&typeof R==="object"){let I=R;if(I.type==="image"&&typeof I.data==="string"&&typeof I.mediaType==="string"){if(!f){T.push(g),k=!0,S=!0;continue}let Ee={type:"image",data:I.data,mediaType:I.mediaType},L=xe(Ee,u);if(L.type==="file")l.push({type:"image",data:L.data.data,mediaType:L.mediaType});else T.push(L.text);k=!0,S=!0;continue}if(I.type==="image"){T.push(ye),k=!0,S=!0;continue}if(I.type==="text"&&typeof I.text==="string"){T.push(I.text),k=!0;continue}}let M=Re(R,l,u,c);T.push(M.value),k||=M.changed,S||=M.mediaChanged}return{value:k?T:i,changed:k,mediaChanged:S}}let h=i;if(h.type==="image"){if(typeof h.data==="string"&&typeof h.mediaType==="string"){if(!f)return{value:g,changed:!0,mediaChanged:!0};let T={type:"image",data:h.data,mediaType:h.mediaType},k=xe(T,u);if(k.type==="file")return l.push({type:"image",data:k.data.data,mediaType:k.mediaType}),{value:mr,changed:!0,mediaChanged:!0};return{value:k.text,changed:!0,mediaChanged:!0}}return{value:ye,changed:!0,mediaChanged:!0}}let y={},_=!1,E=!1;for(let[T,k]of Object.entries(h)){let S=Re(k,l,u,c);y[T]=S.value,_||=S.changed,E||=S.mediaChanged}return{value:_?y:i,changed:_,mediaChanged:E}}function le(i){if(typeof i==="string")return D(i);if(Array.isArray(i))return i.map((l)=>le(l));if(i!==null&&typeof i==="object"){let l=i,u={};for(let[c,f]of Object.entries(l))u[c]=le(f);return u}return i}function br(i,l=!1,u=Rt(),c){let f=c?.supportsImages??!0;if(typeof i==="string")return{type:l?"error-text":"text",value:D(i)};if(!l&&hr(i))return{type:"content",value:i.map((g)=>g.type==="image"?f?xe(g,u):{type:"text",text:be}:{type:"text",text:D(g.text)})};if(i!==null&&typeof i==="object"){let g=[],h=Re(i,g,u,{hoistImages:!l&&f,inlineImagePlaceholder:f?ye:be});if(!l&&g.length>0)return{type:"content",value:[{type:"text",text:typeof h.value==="string"?D(h.value):JSON.stringify(le(h.value))},...g.map((y)=>Lt(y.data,y.mediaType))]};if(h.mediaChanged)return{type:l?"error-json":"json",value:le(h.value)}}if(i===null||typeof i==="boolean"||typeof i==="number"||typeof i==="object")return{type:l?"error-json":"json",value:le(i)};return{type:l?"error-text":"text",value:D(String(i))}}function ca(i,l,u){let c=u?.assistantToolCallArgKey??"input",f=u?.supportedInputModalities,g=!f||f.includes("image"),h=[],y=Rt(),_=[],E=()=>_.splice(0).map((T)=>T.type==="image"?g?Ce(T,y):{type:"text",text:be}:Xe(T.media,y,f));if(typeof i==="string"&&i.trim().length>0||Array.isArray(i)&&i.length>0)h.push({role:"system",content:typeof i==="string"?D(i):i});for(let T of l){let k=T.content;if(typeof k==="string"){let I=T.role==="user"&&_.length>0?E():[];if(I.length>0){h.push({role:T.role,content:[{type:"text",text:k.trim().length>0?D(k):me},...I]});continue}if(k.trim().length===0){h.push({role:T.role,content:[{type:"text",text:me}]});continue}h.push({role:T.role,content:D(k)});continue}let S=[],R=[];if(k.length===0){h.push({role:T.role,content:[{type:"text",text:me}]});continue}for(let I of k)switch(I.type){case"text":S.push({type:"text",text:D(I.text),...I.providerOptions?{providerOptions:I.providerOptions}:{}});break;case"reasoning":S.push({type:"reasoning",text:D(I.text),...I.providerOptions?{providerOptions:I.providerOptions}:{}});break;case"image":if(T.role==="assistant")_.push(I),S.push({type:"text",text:fr});else S.push(g?Ce(I,y):{type:"text",text:be});break;case"media":if(T.role==="assistant")_.push(I),S.push({type:"text",text:gr(I.media.modality)});else S.push(Xe(I.media,y,f));break;case"file":S.push({type:"text",text:Yn(I.path,D(I.content))});break;case"tool-call":if(T.role==="assistant")S.push({type:"tool-call",toolCallId:I.toolCallId,toolName:I.toolName,[c]:I.input,...I.providerOptions?{providerOptions:I.providerOptions}:{}});break;case"tool-result":{R.push({type:"tool-result",toolCallId:I.toolCallId,toolName:I.toolName,output:br(I.output,I.isError??!1,y,{supportsImages:g})});break}}let M=R.length>0;if(T.role==="user"&&!M&&_.length>0)S.push(...E());if(S.length>0&&S.every((I)=>I.type==="text"&&typeof I.text==="string"&&I.text.trim().length===0))S.splice(0,S.length,{type:"text",text:me});if(S.length>0)Ie(h,{role:T.role,content:S});if(M)Ie(h,{role:"tool",content:R})}if(_.length>0)Ie(h,{role:"user",content:E()});return h}var da=["show","hide","subscription"];function Je(i){return typeof i==="object"&&i!==null&&!Array.isArray(i)}function pa(i,l){if(!i&&!l)return;let u=i?.metadata,c=l?.metadata,f={...i??{},...l??{}};if(Je(u)&&Je(c))f.metadata={...u,...c};return f}var ma=["web_search","image_generation"],fa=["web_search"],he={max:1,xhigh:0.95,high:0.8,medium:0.5,low:0.2,minimal:0.1,none:0},ga=void 0;function ha(i,l){if(typeof i==="string"&&i.toLowerCase()in he)return i.toLowerCase();return l?void 0:void 0}function vr(i,l){let u=typeof i==="string"?i.toLowerCase():void 0;if(u&&u in he)return he[u];if(l?.fallbackEffort)return he[l.fallbackEffort];return}function ya(i){let l=vr(i.effort,{fallbackEffort:i.fallbackEffort});if(l===void 0)return;if(l<=0)return 0;let u=i.minimumBudget??1;if(i.maxBudget<u)return;let c=i.scaleTokens??i.maxBudget;return Math.min(Math.max(Math.floor(c*l),u),i.maxBudget)}function ba(i){return i instanceof Error?{name:i.name,message:i.message}:i}var va=3;function Er(i){return Math.max(1,Math.ceil(i/3))}var Tr=1600;function _r(){let i=0;return{replacer:(l,u)=>{if(u===null||typeof u!=="object"||u.type!=="image")return u;let c=u;if(typeof c.data==="string")return i+=1,{...c,data:""};if("image"in c)return i+=1,{...c,image:""};return u},imageCount:()=>i}}function ke(i){let l=new WeakSet;try{return JSON.stringify(i,(u,c)=>{if(typeof c==="bigint")return c.toString();if(typeof c!=="object"||c===null)return c;if(l.has(c))return"[Circular]";return l.add(c),c})??""}catch{return String(i??"")}}function Ea(i){let{replacer:l,imageCount:u}=_r(),c,f=0;try{c=JSON.stringify({systemPrompt:i.systemPrompt,messages:i.messages,tools:i.tools},l),f=u()}catch{c=[ke(i.systemPrompt),ke(i.messages),ke(i.tools)].join(`
|
|
4
|
+
`)}return Er(c.length)+f*Tr}var Ta={debug:()=>{},log:()=>{},error:()=>{}},_a=60,Ia=1,ka=3600;function Ir(i){return typeof i==="number"&&Number.isFinite(i)}function kr(i){return Math.min(Math.max(i,1),3600)}function Sa(i){if(!Ir(i))return 60;return kr(i)}function wa(i,l,u){let c=u?` (${u})`:"",f=Math.round(l/100)/10;return`MCP request to "${i}"${c} timed out after ${f}s. Increase the "timeout" field (in seconds) for this server in cline_mcp_settings.json.`}function Aa(i){if(i instanceof Error)return i.message;return String(i)}function Oa(i){if(i&&typeof i==="object"&&"code"in i&&typeof i.code==="string")return i.code;return""}class z extends Error{constructor(i,l){super(`${i} at position ${l}`);this.position=l}}function Sr(i){return/^[0-9A-Fa-f]$/.test(i)}function q(i){return i>="0"&&i<="9"}function wr(i){return i>=" "}function re(i){return`,:[]/{}()
|
|
5
|
+
+`.includes(i)}function Ze(i){return i>="a"&&i<="z"||i>="A"&&i<="Z"||i==="_"||i==="$"}function Se(i){return i>="a"&&i<="z"||i>="A"&&i<="Z"||i==="_"||i==="$"||i>="0"&&i<="9"}var Qe=/^(http|https|ftp|mailto|file|data|irc):\/\/$/,et=/^[A-Za-z0-9-._~:/?#@!$&'()*+;=]$/;function tt(i){return`,[]/{}
|
|
6
|
+
+`.includes(i)}function nt(i){return ae(i)||Ar.test(i)}var Ar=/^[[{\w-]$/;function rt(i){return i===`
|
|
7
|
+
`||i==="\r"||i==="\t"||i==="\b"||i==="\f"}function H(i,l){let u=i.charCodeAt(l);return u===32||u===10||u===9||u===13}function Or(i,l){let u=i.charCodeAt(l);return u===32||u===9||u===13}function xr(i,l){let u=i.charCodeAt(l);return u===160||u===6158||u>=8192&&u<=8203||u===8239||u===8287||u===12288||u===65279}function ae(i){return Pt(i)||Me(i)}function Pt(i){return i==='"'||i==="“"||i==="”"}function ot(i){return i==='"'}function Me(i){return i==="'"||i==="‘"||i==="’"||i==="`"||i==="´"}function it(i){return i==="'"}function oe(i,l){let u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,c=i.lastIndexOf(l);return c!==-1?i.substring(0,c)+(u?"":i.substring(c+1)):i}function P(i,l){let u=i.length;if(!H(i,u-1))return i+l;while(H(i,u-1))u--;return i.substring(0,u)+l+i.substring(u)}function Cr(i,l,u){return i.substring(0,l)+i.substring(l+u)}function Rr(i){return/[,\n][ \t\r]*$/.test(i)}var Mr={""":'"',"&":"&","<":"<",">":">","'":"'"},at=12;function st(i){if(i.charAt(0)!=="&")return null;let l=i.indexOf(";");if(l===-1)return null;let u=i.substring(0,l+1),c=Mr[u];if(c!==void 0)return{char:c,length:u.length};if(i.charAt(1)==="#"){let f=i.substring(2,l),g=f.charAt(0)==="x"||f.charAt(0)==="X",h=g?f.substring(1):f;if(h.length>0){let y=Number.parseInt(h,g?16:10);if(!Number.isNaN(y)&&y>=0&&y<=1114111)return{char:String.fromCodePoint(y),length:u.length}}}return null}function Nr(i){return i!==null&&i.char==='"'}function Lr(i){return i!==null&&i.char==="'"}function Z(i,l){let u=0;for(let c=0;c<i.length;c++)if(i.charAt(c)===l)u++;return u}function Pr(i,l){switch(l){case")":return Z(i,"(")>Z(i,")");case"]":return Z(i,"[")>Z(i,"]");case"}":return Z(i,"{")>Z(i,"}");default:return!1}}var lt={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Dr={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
8
|
+
`,r:"\r",t:"\t"};function Br(i){let l=0,u="";if(_(["```","[```","{```"]),!f())Xt();_(["```","```]","```}"]);let c=T(",");if(c)g();if(nt(i[l])&&Rr(u)){if(!c)u=P(u,",");Ee()}else if(c)u=oe(u,",");while(i[l]==="}"||i[l]==="]")l++,g();if(l>=i.length)return u;Te();function f(){g();let b=M()||I()||L()||Wt()||zt()||$e(!1)||Vt();return g(),b}function g(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,v=l,A=h(b);do if(A=y(),A)A=h(b);while(A);return l>v}function h(b){let v=b?H:Or,A="";while(!0)if(v(i,l))A+=i[l],l++;else if(xr(i,l))A+=" ",l++;else break;if(A.length>0)return u+=A,!0;return!1}function y(){if(i[l]==="/"&&i[l+1]==="*"){while(l<i.length&&!Ur(i,l))l++;return l+=2,!0}if(i[l]==="/"&&i[l+1]==="/"){while(l<i.length&&i[l]!==`
|
|
9
|
+
`)l++;return!0}return!1}function _(b){if(E(b)){if(Ze(i[l]))while(l<i.length&&Se(i[l]))l++;return g(),!0}return!1}function E(b){h(!0);for(let v of b){let A=l+v.length;if(i.slice(l,A)===v)return l=A,!0}return!1}function T(b){if(i[l]===b)return u+=i[l],l++,!0;return!1}function k(b){if(i[l]===b)return l++,!0;return!1}function S(){return k("\\")}function R(){if(g(),i[l]==="."&&i[l+1]==="."&&i[l+2]===".")return l+=3,g(),k(","),!0;return!1}function M(){if(i[l]==="{"){if(u+="{",l++,g(),k(","))g();let b=!0;while(l<i.length&&i[l]!=="}"){let v;if(!b){if(v=T(","),!v)u=P(u,",");g()}else v=!0;if(R(),!(L()||$e(!0))){if(i[l]==="}"||i[l]==="{"||i[l]==="]"||i[l]==="["||i[l]===void 0){if(!b)u=oe(u,",")}else Jt();break}g();let A=T(":"),U=l>=i.length;if(!A)if(nt(i[l])||U)u=P(u,":");else He();if(!f())if(A||U)u+="null";else He();b=!1}if(i[l]==="}")u+="}",l++;else u=P(u,"}");return!0}return!1}function I(){if(i[l]==="["){if(u+="[",l++,g(),k(","))g();let b=!0;while(l<i.length&&i[l]!=="]"){if(!b){if(!T(","))u=P(u,",")}if(R(),!f()){if(!b)u=oe(u,",");break}b=!1}if(i[l]==="]")u+="]",l++;else u=P(u,"]");return!0}return!1}function Ee(){let b=!0,v=!0;while(v){if(!b){if(!T(","))u=P(u,",")}else b=!1;v=f()}if(!v)u=oe(u,",");u=`[
|
|
10
|
+
${u}
|
|
11
|
+
]`}function L(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1,A=i[l]==="\\";if(A){if(l++,!ae(i[l]))Te()}let U=i[l]==="&"?st(i.slice(l,l+at)):null,_e=Nr(U)||Lr(U);if(ae(i[l])||_e){let Qt=ot(i[l])?ot:it(i[l])?it:Me(i[l])?Me:Pt,ce=l,de=u.length,O='"';l+=_e&&U?U.length:1;while(!0){if(l>=i.length){let C=Fe(l-1);if(!b&&re(i.charAt(C)))return l=ce,u=u.substring(0,de),L(!0);return O=P(O,'"'),u+=O,!0}if(l===v)return O=P(O,'"'),u+=O,!0;let j=_e&&i[l]==="&"?st(i.slice(l,l+at)):null;if(j&&U?j.char===U.char:Qt(i[l])){let C=l,F=O.length;if(O+='"',l+=j?j.length:1,u+=O,g(!1),b||l>=i.length||re(i[l])&&!Pr(O,i[l])||ae(i[l])&&!Yt(l)||q(i[l]))return Ue(),!0;if(i[l]==="\\")Te();let Ge=Fe(C-1),We=i.charAt(Ge);if(We===",")return l=ce,u=u.substring(0,de),L(!1,Ge);if(re(We))return l=ce,u=u.substring(0,de),L(!0);u=u.substring(0,de),l=C+(j?j.length:1),O=`${O.substring(0,F)}\\${O.substring(F)}`}else if(b&&tt(i[l])){if(i[l-1]===":"&&Qe.test(i.substring(ce+1,l+2)))while(l<i.length&&et.test(i[l]))O+=i[l],l++;return O=P(O,'"'),u+=O,Ue(),!0}else if(j){let C=j.char;if(C==='"')O+="\\\"";else if(rt(C))O+=lt[C];else O+=C;l+=j.length}else if(i[l]==="\\"){let C=i.charAt(l+1);if(Dr[C]!==void 0)O+=i.slice(l,l+2),l+=2;else if(C==="u"){let F=2;while(F<6&&Sr(i[l+F]))F++;if(F===6)O+=i.slice(l,l+6),l+=6;else if(l+F>=i.length)l=i.length;else Zt()}else if(C===`
|
|
12
|
+
`)O+="\\n",l+=2;else O+=C,l+=2}else{let C=i.charAt(l);if(C==='"'&&i[l-1]!=="\\")O+=`\\${C}`,l++;else if(rt(C))O+=lt[C],l++;else{if(!wr(C))Kt(C);O+=C,l++}}if(A)S()}}return!1}function Ue(){let b=!1;g();while(i[l]==="+"){b=!0,l++,g(),u=oe(u,'"',!0);let v=u.length;if(L())u=Cr(u,v,1);else u=P(u,'"')}return b}function Wt(){let b=l,v="",A=!1;if(i[l]==="-"){if(v+=i[l],l++,!q(i[l])&&qe())v+="0"}if(i[l]==="0"&&q(i[l+1]))A=!0;while(q(i[l]))v+=i[l],l++;if(i[l]==="."){if(v===""||v==="-")v+="0";if(v+=i[l],l++,!q(i[l]))v+="0";while(q(i[l]))v+=i[l],l++}if(l>b){if(i[l]==="e"||i[l]==="E"){if(v==="-")A=!0;if(v+=i[l],l++,i[l]==="-"||i[l]==="+")v+=i[l],l++;if(!q(i[l]))v+="0";while(q(i[l]))v+=i[l],l++}if(!qe())return l=b,!1;return u+=A?`"${i.substring(b,l)}"`:v,!0}return!1}function zt(){return X("true","true")||X("false","false")||X("null","null")||X("True","true")||X("False","false")||X("None","null")}function X(b,v){if(i.slice(l,l+b.length)===b&&!Se(i[l+b.length]))return u+=v,l+=b.length,!0;return!1}function $e(b){let v=l;if(Ze(i[l])){while(l<i.length&&Se(i[l]))l++;let A=l;while(H(i,A))A++;if(i[A]==="("){if(l=A+1,f(),i[l]===")"){if(l++,i[l]===";")l++}return!0}}while(l<i.length&&!tt(i[l])&&!ae(i[l])&&(!b||i[l]!==":"))l++;if(i[l-1]===":"&&Qe.test(i.substring(v,l+2)))while(l<i.length&&et.test(i[l]))l++;if(l>v){while(H(i,l-1)&&l>0)l--;let A=i.slice(v,l);if(u+=A==="undefined"?"null":JSON.stringify(A),i[l]==='"')l++;return!0}}function Vt(){if(i[l]==="/"){let b=l;l++;while(l<i.length&&(i[l]!=="/"||i[l-1]==="\\"))l++;return l++,u+=JSON.stringify(i.substring(b,l)),!0}}function Fe(b){let v=b;while(v>0&&H(i,v))v--;return v}function Yt(b){let v=b+1;while(v<i.length&&H(i,v))v++;return v>=i.length||re(i[v])}function qe(){return l>=i.length||re(i[l])||H(i,l)}function Kt(b){throw new z(`Invalid character ${JSON.stringify(b)}`,l)}function Te(){throw new z(`Unexpected character ${JSON.stringify(i[l])}`,l)}function Xt(){throw new z("Unexpected end of json string",i.length)}function Jt(){throw new z("Object key expected",l)}function He(){throw new z("Colon expected",l)}function Zt(){let b=i.slice(l,l+6);throw new z(`Invalid unicode character "${b}"`,l)}}function Ur(i,l){return i[l]==="*"&&i[l+1]==="/"}function jr(i){let l=!1,u=!1,c=!1;for(let f=0;f<i.length;f+=1){let g=i[f];if(c){c=!1;continue}if(g==="\\"){c=!0;continue}if(!u&&g==='"')l=!l;else if(!l&&g==="'")u=!u}return l||u}var $r=/^\{\s*"([A-Za-z0-9_.$-]+)"\s*:\s*([\s\S]+?)\s*\}$/;function Fr(i){let l=i.match($r);if(!l)return;let[,u,c]=l,f=c.trim();if(!f)return;let g=f[0];if(g==='"'||g==="{"||g==="["||f==="true"||f==="false"||f==="null"||Number.isFinite(Number(f)))return;return JSON.parse(`{"${u}":${JSON.stringify(f)}}`)}function xa(i){if(typeof i!=="string")return i;let l=i.trimStart();if(l[0]!=="{"&&l[0]!=="[")return i;try{return JSON.parse(l)}catch{}if(!jr(l))try{return JSON.parse(Br(l))}catch{}return Fr(l)??i}function Ca(i){let l=new WeakSet;try{return JSON.stringify(i,(u,c)=>{if(typeof c==="bigint")return c.toString();if(c&&typeof c==="object"){if(l.has(c))return"[Circular]";l.add(c)}return c})??"null"}catch{return String(i)}}function Ra(i){try{return JSON.parse(i)}catch{return}}function te(i){return typeof i==="object"&&i!==null&&!Array.isArray(i)}function qr(i){let l=i.type;if(typeof l==="string")return[l];return Array.isArray(l)?l.filter((u)=>typeof u==="string"):[]}function Ne(i,l){if(qr(i).includes(l))return!0;for(let u of["anyOf","oneOf","allOf"]){let c=i[u];if(Array.isArray(c)&&c.some((f)=>te(f)&&Ne(f,l)))return!0}return!1}function Hr(i,l){if(typeof i!=="string")return i;let u=i.trim(),c=Ne(l,"array"),f=Ne(l,"object");if((!c||!u.startsWith("["))&&(!f||!u.startsWith("{")))return i;try{let g=JSON.parse(u);if(Array.isArray(g))return c?g:i;if(te(g))return f?g:i;return i}catch{return i}}function ut(i,l){let u=Hr(i,l);if(Array.isArray(u)){let h=l.items;if(!te(h))return u;let y=!1,_=u.map((E)=>{let T=ut(E,h);return y||=T!==E,T});return y?_:u}if(!te(u))return u;let c=l.properties;if(!te(c))return u;let f=!1,g={...u};for(let[h,y]of Object.entries(c)){if(!(h in u)||!te(y))continue;let _=ut(u[h],y);if(_!==u[h])g[h]=_,f=!0}return f?g:u}function Gr(i){if(typeof globalThis.atob==="function")try{let l=globalThis.atob(i),u=Uint8Array.from(l,(c)=>c.charCodeAt(0));return new TextDecoder().decode(u)}catch{return null}if(typeof Buffer<"u")try{return Buffer.from(i,"base64").toString("utf8")}catch{return null}return null}function Ma(i){let l=i?.trim();if(!l)return null;try{let u=l.split(".");if(u.length!==3)return null;let c=u[1];if(!c)return null;let f=c.replace(/-/g,"+").replace(/_/g,"/"),g=f.padEnd(f.length+(4-f.length%4)%4,"="),h=Gr(g);return h?JSON.parse(h):null}catch{return null}}function Na(i){return Object.fromEntries(Object.entries(i).filter(([,l])=>l!==void 0))}function Dt(i){let l=i.replaceAll("\\","/"),u=l.lastIndexOf("/");return(u>=0?l.slice(u+1):l).toLowerCase()}function La(i){return i==="win32"?"powershell":"/bin/bash"}function Bt(i){let l=Dt(i);if(ue(i)!==void 0)return"powershell";if(l==="cmd"||l==="cmd.exe")return"cmd";if(l==="wsl"||l==="wsl.exe")return"wsl";return"posix"}var Wr=new Set(["-nologo","-noninteractive","-noprofile"]),zr="-noprofile";function Vr(i,l){let u="";for(let c=0;c<i.length;c++){let f=i[c];if(f==="`"&&c+1<i.length){let g=i[c+1];if(g==="u"&&l==="core"&&i[c+2]==="{"){let h=i.indexOf("}",c+3),y=h>c+3?i.slice(c+3,h):"",_=Number.parseInt(y,16);if(y.length<=6&&/^[0-9a-fA-F]+$/.test(y)&&_<=1114111){u+=String.fromCodePoint(_),c=h;continue}}switch(g){case"n":u+=`
|
|
13
|
+
`;break;case"r":u+="\r";break;case"t":u+="\t";break;case"b":u+="\b";break;case"f":u+="\f";break;case"v":u+="\v";break;case"0":u+="\x00";break;case"a":u+="\x07";break;case"e":u+=l==="core"?"\x1B":"e";break;default:u+=g}c++;continue}if(f==='"'&&i[c+1]==='"'){u+='"',c++;continue}u+=f}return u}function Yr(i){let l=i[0];if(l!=="'"&&l!=='"')return;for(let u=1;u<i.length;u++){let c=i[u];if(l==='"'&&c==="`"){u++;continue}if(c===l){if(i[u+1]===l){u++;continue}if(i.slice(u+1).trim()!=="")return;return{quote:l,body:i.slice(1,u)}}}return}function ue(i){let l=Dt(i);if(l==="powershell"||l==="powershell.exe")return"windows";if(l==="pwsh"||l==="pwsh.exe")return"core";return}function Kr(i,l){let u=Yr(i);if(!u)return;let c=(u.quote==="'"?u.body.replaceAll("''","'"):Vr(u.body,l)).trim();return c.length>0?c:void 0}function Xr(i,l){let u=/^[ \t]*(?:&[ \t]*(?:"([^"$`]*)"|'((?:[^']|'')*)')|(?:&[ \t]*)?([^\s$`"';&|<>(){}#@,]+))[ \t]+([\S\s]*)$/.exec(i);if(!u)return;let c=u[1]??u[2]?.replaceAll("''","'")??u[3],f=ue(l);if(!f||!ue(c))return;let g=u[4],h=!1;for(;;){let y=/^(-[^\s=]+)[ \t]*([\S\s]*)$/.exec(g);if(!y)return;let _=y[1].toLowerCase();if(_==="-command"){let E=h?Kr(y[2],f):void 0;return E===void 0?void 0:{executable:c,script:E}}if(!Wr.has(_))return;if(_===zr)h=!0;g=y[2]}}function Jr(i,l){if(!/[\\/:]/.test(l)&&ue(l)===ue(i))return i;return l}function Zr(i,l){switch(Bt(i)){case"powershell":{let u={executable:i,script:l};for(;;){let c=Xr(u.script,u.executable);if(!c)break;u={executable:Jr(i,c.executable),script:c.script}}return{executable:u.executable,args:["-NoProfile","-NonInteractive","-Command","[Console]::InputEncoding=[Text.UTF8Encoding]::new();[Console]::OutputEncoding=[Text.UTF8Encoding]::new();$ErrorActionPreference='Stop';$c=[Console]::In.ReadToEnd();$c+=[Environment]::NewLine+'if(-not $?){exit 1}';& ([ScriptBlock]::Create($c))"],input:u.script}}case"cmd":return{executable:i,args:["/d","/s","/c",l]};case"wsl":return{executable:i,args:["bash","-c",l]};case"posix":return{executable:i,args:["-c",l]}}}function Pa(i,l){if(Bt(i)==="powershell")return["-NoProfile","-NonInteractive","-Command",l];return Zr(i,l).args}function Da(i){return i.toLowerCase().replace(/[^\w.-]+/g,"_")}function Ba(i){let l=i?.trim();return l?l:void 0}function Qr(i,l){if(i.length<=l)return i;return`${i.slice(0,l-1)}…`}function Ua(i,l="/",u=100){if(!i||i.length<=u)return i||"";let c=i.split(l)?.shift()?.trim()?.slice(0,u-1);return c?`${c}…`:Qr(i,u)}function ja(i){if(i.length<=8)return"****";return`${i.slice(0,4)}...${i.slice(-4)}`}function $a(i){return i.charCodeAt(0)===65279?i.slice(1):i}function Fa(i){if(!i)return"(unknown-date)";let l=new Date(i);if(Number.isNaN(l.getTime()))return i;return l.toLocaleString("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0})}function qa(i){let l=Math.max(0,Math.floor(i/1000)),u=Math.floor(l/86400),c=Math.floor(l%86400/3600),f=Math.floor(l%3600/60),g=l%60;if(u>0)return`${u}d ${c}h`;if(c>0)return`${c}h ${f}m`;if(f>0)return`${f}m ${g}s`;return`${g}s`}function Ga(i,l){let u=i.safeParse(l);if(!u.success)throw Error(_c(u.error));return u.data}function eo(i){return St(i)}function to(i){return i==="cline"||i==="cline-pass"}var no=`You are Cline, an AI coding agent. Your primary goal is to assist users with various coding tasks by leveraging your knowledge and the tools at your disposal. Given the user's prompt, you should use the tools available to you to answer user's question.
|
|
14
|
+
|
|
15
|
+
Always gather all the necessary context before starting to work on a task. For example, if you are generating a unit test or new code, make sure you understand the requirement, the naming conventions, frameworks and libraries used and aligned in the current codebase, and the environment and commands used to run and test the code etc. Always validate the new unit test at the end including running the code if possible for live feedback.
|
|
16
|
+
Review each question carefully and answer it with detailed, accurate information.
|
|
17
|
+
If you need more information, use one of the available tools or ask for clarification instead of making assumptions or lies.
|
|
18
|
+
|
|
19
|
+
Environment you are running in:
|
|
20
|
+
<env>
|
|
21
|
+
1. Platform: {{PLATFORM_NAME}}
|
|
22
|
+
2. Date: {{CURRENT_DATE}}
|
|
23
|
+
3. IDE: {{IDE_NAME}}
|
|
24
|
+
4. Working Directory: {{CWD}}
|
|
25
|
+
</env>
|
|
26
|
+
|
|
27
|
+
Remember:
|
|
28
|
+
- Always adhere to existing code conventions and patterns.
|
|
29
|
+
- Use only libraries and frameworks that are confirmed to be in use in the current codebase.
|
|
30
|
+
- Provide complete and functional code without omissions or placeholders.
|
|
31
|
+
- Be explicit about any assumptions or limitations in your solution.
|
|
32
|
+
- Always show your planning process before executing any task. This will help ensure that you have a clear understanding of the requirements and that your approach aligns with the user's needs.
|
|
33
|
+
- Always use absolute paths when referring to files.
|
|
34
|
+
- You can call multiple tools in a single response. Before using tools, identify every independent read, search, command, or edit needed for the next step and emit all of those tool calls now, either as multiple tool calls or as one batched input for tools that accept arrays. Do not wait for one independent result before requesting another. Do not split independent reads, searches, checks, or edits across separate turns.
|
|
35
|
+
- Good parallelism examples: read all known relevant files in one read_files call; run independent inspection commands in one run_commands call; emit independent read_files, search_codebase, and run_commands calls together in one response; emit multiple editor calls together when editing different files or non-overlapping regions.
|
|
36
|
+
- Always verify the files you have edited or created at the end of the task to ensure they are completed and working as expected.
|
|
37
|
+
|
|
38
|
+
Begin by analyzing the user's input and gathering any necessary additional context. Then, present your plan at the start of your response along with tool calls before proceeding with the task. It's OK for this section to be quite long.
|
|
39
|
+
|
|
40
|
+
REMEMBER, be helpful and proactive! Don't ask for permission to do something when you can do it! Do not indicates you will be using a tool unless you are actually going to use it.
|
|
41
|
+
|
|
42
|
+
IMPORTANT: Always includes tool calls in your response until the task is completed. Response without tool calls will considered as completed with final answer.
|
|
43
|
+
|
|
44
|
+
When you have completed the task, please provide a summary of what you did and any relevant information that the user should know. This will help ensure that the user understands the changes made and can easily follow up if they have any questions or need further assistance. Do not indicate that you will perform an action without actually doing it. Always provide the final result in your response. Always validate your answer with checking the code and running it if possible.
|
|
45
|
+
|
|
46
|
+
If user asked a simple question without any coding context, answer it directly without using any tools.
|
|
47
|
+
{{CLINE_RULES}}
|
|
48
|
+
{{CLINE_METADATA}}`,ro=`You are Cline, a careful and helpful coding agent that works in the background.
|
|
49
|
+
You are tasked to solve an issue reported by the user who you cannot communicate with directly.
|
|
50
|
+
Your goal is to utilize the tools at your disposal to investigate and answer the question according to user's instructions with the aim to verify that the issue is resolved.
|
|
51
|
+
|
|
52
|
+
RULES:
|
|
53
|
+
- Always match output format exactly as shown in examples or existing files.
|
|
54
|
+
- Use only libraries and frameworks that are confirmed and compatible to be in use in the current codebase.
|
|
55
|
+
- Provide complete and functional code without omissions or placeholders.
|
|
56
|
+
- During thinking stage, show your planning process. Keep the plan to one short paragraph.
|
|
57
|
+
- Be proactive and avoid overthinking. Once the next action is clear, execute it. Do not seek perfect certainty, repeatedly compare alternatives, or revisit settled decisions without new evidence. Use focused tool calls to resolve uncertainty.
|
|
58
|
+
- If repeated fixes fail without new evidence, stop making similar edits. Test your assumptions with a focused check or minimal reproduction, then adjust your approach based on the result.
|
|
59
|
+
- Put complete code, commands, and edit payloads in the tool arguments. Do not draft them in full in your plan if you can execute them directly.
|
|
60
|
+
- Provide text response when it adds value: a brief plan summary for multi-step work, a meaningful progress update, concise task notes, a blocker, or the final result. Routine tool calls need no text preamble. Keep plan summaries and progress updates to one short paragraph, reporting decisions and new evidence rather than internal deliberation.
|
|
61
|
+
- Keep task notes focused on confirmed facts, decisions, and remaining work. Update existing notes when possible instead of repeating the task history.
|
|
62
|
+
- Always use absolute paths when referring to files.
|
|
63
|
+
- You can call multiple tools in a single response. Before using tools, identify every independent read, search, command, or edit needed for the next step and emit all of those tool calls now, either as multiple tool calls or as one batched input for tools that accept arrays. Do not wait for one independent result before requesting another. Do not split independent reads, searches, checks, or edits across separate turns.
|
|
64
|
+
- Good parallelism examples: read all known relevant files in one read_files call; run independent inspection commands in one run_commands call; emit independent read_files, search_codebase, and run_commands calls together in one response; emit multiple editor calls together when editing different files or non-overlapping regions.
|
|
65
|
+
- Always verify the files you have edited or created at the end of the task to ensure they are completed and working as expected.
|
|
66
|
+
|
|
67
|
+
Environment you are running in:
|
|
68
|
+
<env>
|
|
69
|
+
1. Platform: {{PLATFORM_NAME}}
|
|
70
|
+
2. Date: {{CURRENT_DATE}}
|
|
71
|
+
3. IDE: {{IDE_NAME}}
|
|
72
|
+
4. Working Directory: {{CWD}}
|
|
73
|
+
</env>
|
|
74
|
+
|
|
75
|
+
IMPORTANT:
|
|
76
|
+
- When the user describes a bug, unexpected behavior, or provides a bug report, your primary goal is to produce a correct fix in the source code that resolves the issue.
|
|
77
|
+
- A correct fix means the underlying behavior is fixed — not just the symptoms addressed superficially.
|
|
78
|
+
- Verify by execution, never by assumption. Before considering any task done, gather concrete evidence from your own tool output that every requirement is satisfied:
|
|
79
|
+
- If a test suite, tests, or assertions are provided or referenced, run them and confirm they pass. If they fail, analyze the failures, revise, and re-run until they pass.
|
|
80
|
+
- If no tests are provided, construct your own verification: actually run the program, script, or command you produced; confirm every required output file exists at the exact path requested; and confirm its contents match the expected format, data types, and values described in the task. Read the output back to confirm.
|
|
81
|
+
- Treat "this should work", "assume it works", or "probably correct" as a signal that you have NOT verified yet — go run the check instead of finishing.
|
|
82
|
+
- Do not consider the task complete until you have observed evidence that all stated requirements are met.
|
|
83
|
+
- Always includes tool calls in your response until the task is completed. You should only end the task when all the requirements are met by calling the 'submit_and_exit' tool.
|
|
84
|
+
- When you call 'submit_and_exit', set 'verified' to true only if your tool output shows the requirements are met; otherwise set it to false.
|
|
85
|
+
- Response without the submit_and_exit tool call will considered not completed and the task will continue.
|
|
86
|
+
{{CLINE_RULES}}
|
|
87
|
+
{{CLINE_METADATA}}`,ct={ACT:no,YOLO:ro},Le="# Workspace Configuration",oo=`# Plan / Act Modes
|
|
88
|
+
|
|
89
|
+
User messages arrive wrapped in a <user_input mode="..."> tag. The mode attribute is the interaction mode the user was in when they sent that message: "plan" means plan-mode constraints applied (explore, analyze, and align on a plan -- no edits or state-changing commands), while "act" (or "yolo") means implementation was allowed. If the mode attribute changes between messages, the user switched modes -- the newest message's mode is what governs right now, regardless of what earlier messages allowed. A <mode_notice> block inside a message marks exactly when such a switch happened.`,Ut=`# Plan Mode
|
|
90
|
+
|
|
91
|
+
You are in Plan mode. Your role is to explore, analyze, and plan -- not to execute.
|
|
92
|
+
|
|
93
|
+
- Read files, search the codebase, and gather context to understand the problem
|
|
94
|
+
- Ask clarifying questions when requirements are ambiguous
|
|
95
|
+
- Present your plan as a structured outline with clear steps
|
|
96
|
+
- Explain tradeoffs between different approaches when they exist
|
|
97
|
+
- Do NOT edit files, write code, run destructive commands, or make any changes
|
|
98
|
+
- Do NOT implement anything -- focus on understanding and alignment first
|
|
99
|
+
|
|
100
|
+
The run_commands tool remains available in plan mode strictly for read-only inspection -- listing files, searching (grep), reading configs, inspecting git history and diffs, checking tool versions, and the like. Never use it to change anything: no creating, modifying, or deleting files, no writing scripts that make changes, and no state-changing commands (installs, migrations, database or schema changes, container commands that mutate state, etc.). File-editing commands (rm/mv/cp, in-place edits like sed -i, output redirection to files outside /tmp, git commands that change the working tree, package installs) are hard-blocked in plan mode: they are not executed and return a tool error instead, so do not attempt them. If the task requires a mutation, put it in the plan; it happens only after the user switches to act mode.`,io=`${Ut}
|
|
101
|
+
|
|
102
|
+
Once the user has reviewed your plan and explicitly approved it in a follow-up message, use the switch_to_act_mode tool to switch to act mode and begin implementation. Calling switch_to_act_mode immediately starts execution, so never call it in the same turn you present a plan and never treat the original task request as approval -- end your turn after presenting the plan and wait for the user's response.`,ao=`${Ut}
|
|
103
|
+
|
|
104
|
+
Once you have presented your plan, end your turn and wait for the user's response. You do NOT have the ability to switch to act mode yourself -- the user must do it manually with the Plan/Act toggle once they are satisfied with the plan. If the task requires tools that are only available in act mode, ask the user to "toggle to Act mode" (use those words).`;function dt(i,l,u){if(u?.trim()?.includes(Le))return u.trim();let c=u||JSON.stringify({workspaces:{[i]:{hint:l||i.split("/").at(-1)||i}}},null,2);return`
|
|
105
|
+
${Le}
|
|
106
|
+
${c}`}function Wa(i){let{ide:l="Terminal Shell",mode:u,platform:c="unknown",workspaceName:f,metadata:g,rules:h,overridePrompt:y,providerId:_,planModeSwitchTool:E=!0}=i,T=i.workspaceRoot??i.rootPath??"",k=to(_||"");if(y?.trim()){let M=y.trim();if(k&&g?.trim()&&!M.includes(Le))return`${M}
|
|
107
|
+
|
|
108
|
+
${dt(T,f,g)}`.trim();return M}let S=u==="yolo"?ct.YOLO:ct.ACT,R=[h,u==="yolo"?void 0:oo,u==="plan"?E?io:ao:void 0].filter(Boolean).join(`
|
|
109
|
+
|
|
110
|
+
`);return S.replace("{{PLATFORM_NAME}}",c).replace("{{CWD}}",T).replace("{{CURRENT_DATE}}",new Date().toLocaleDateString()).replace("{{IDE_NAME}}",l).replace("{{CLINE_METADATA}}",k?dt(T,f,g):"").replace("{{CLINE_RULES}}",R).trim()}function za(i){return i?.metadata?.apiKeyOptional===!0}function Va(i){let l=i?.metadata?.localCliCommand;if(typeof l!=="string"||!l.trim())return;return{command:l.trim(),docsUrl:i?.docsUrl}}var Ya="anthropic/claude-sonnet-5.5",Ka="remote://",so=t({id:e(),temperature:n().optional(),maxTokens:n().optional(),contextWindow:n().optional(),inputPrice:n().optional(),outputPrice:n().optional(),supportsImages:r().optional()}),lo=t({models:o(so).optional(),openAiBaseUrl:e().optional(),openAiHeaders:d(e(),e()).optional(),azureApiVersion:e().optional(),azureIdentity:r().optional()}),uo=t({id:e(),thinkingBudgetTokens:n().optional()}),co=t({name:e(),baseModelId:e(),thinkingBudgetTokens:n().optional()}),po=t({models:o(uo).optional(),customModels:o(co).optional(),awsRegion:e().optional(),awsUseCrossRegionInference:r().optional(),awsUseGlobalInference:r().optional(),awsBedrockUsePromptCache:r().optional(),awsBedrockEndpoint:e().optional()}),mo=t({id:e()}),fo=t({models:o(mo).optional()}),go=t({id:e(),thinkingBudgetTokens:n().optional()}),ho=t({models:o(go).optional(),vertexProjectId:e().optional(),vertexRegion:e().optional()}),yo=t({id:e(),thinkingBudgetTokens:n().optional(),promptCachingEnabled:r().optional()}),bo=t({models:o(yo).optional(),baseUrl:e().optional()}),vo=t({id:e(),thinkingBudgetTokens:n().optional()}),Eo=t({models:o(vo).optional(),baseUrl:e().optional()}),To=t({OpenAiCompatible:lo.optional(),AwsBedrock:po.optional(),Cline:fo.optional(),Vertex:ho.optional(),LiteLLM:bo.optional(),Anthropic:Eo.optional()}),_o=t({id:e()}),Io=t({name:e(),url:e(),alwaysEnabled:r().optional(),headers:d(e(),e()).optional()}),pt=t({alwaysEnabled:r(),name:e(),contents:e()}),we=t({bucket:e(),accessKeyId:e(),secretAccessKey:e(),region:e().optional(),endpoint:e().optional(),accountId:e().optional()}),ko=t({enabled:r().optional(),type:p([a("s3_access_keys"),a("r2_access_keys"),a("azure_access_keys")]).optional(),s3AccessSettings:we.optional(),r2AccessSettings:we.optional(),azureAccessSettings:we.optional()}),So=t({promptUploading:ko.optional()}),Ja=t({version:e(),providerSettings:To.optional(),telemetryEnabled:r().optional(),kanbanEnabled:r().optional(),mcpMarketplaceEnabled:r().optional(),allowedMCPServers:o(_o).optional(),remoteMCPServers:o(Io).optional(),blockPersonalRemoteMCPServers:r().optional(),yoloModeAllowed:r().optional(),openTelemetryEnabled:r().optional(),openTelemetryMetricsExporter:e().optional(),openTelemetryLogsExporter:e().optional(),openTelemetryOtlpProtocol:e().optional(),openTelemetryOtlpEndpoint:e().optional(),openTelemetryOtlpHeaders:d(e(),e()).optional(),openTelemetryOtlpMetricsProtocol:e().optional(),openTelemetryOtlpMetricsEndpoint:e().optional(),openTelemetryOtlpMetricsHeaders:d(e(),e()).optional(),openTelemetryOtlpLogsProtocol:e().optional(),openTelemetryOtlpLogsEndpoint:e().optional(),openTelemetryOtlpLogsHeaders:d(e(),e()).optional(),openTelemetryMetricExportInterval:n().optional(),openTelemetryOtlpInsecure:r().optional(),openTelemetryLogBatchSize:n().optional(),openTelemetryLogBatchTimeout:n().optional(),openTelemetryLogMaxQueueSize:n().optional(),enterpriseTelemetry:So.optional(),globalRules:o(pt).optional(),globalWorkflows:o(pt).optional()}),Za=d(e(),e()),Qa=4317,es="127.0.0.1:4317",ns=s(["reasoning","prompt-cache","tools","provider-tools","oauth","temperature","files","streaming","vision","computer-use","local-auth","popular"]),rs=s(["anthropic","gemini","openai-chat","openai-responses","openai-r1","ai-sdk"]),os=s(["anthropic","ai-sdk","ai-sdk-community","openai","openai-compatible","openai-r1","gemini","bedrock","custom","fetch","vertex"]),is="runtime.team.progress.v1",as="runtime.team.lifecycle.v1";function jt(){return globalThis}function ss(i){jt().__clineClientIdentity=i}function ls(){return jt().__clineClientIdentity}var us="CLINE_ENVIRONMENT",cs="CLINE_ENVIRONMENT_OVERRIDE",mt={production:{environment:"production",appBaseUrl:"https://app.cline.bot",apiBaseUrl:"https://api.cline.bot",mcpBaseUrl:"https://api.cline.bot/v1/mcp",workOsClientId:"client_01K3A541FN8TA3EPPHTD2325AR"},staging:{environment:"staging",appBaseUrl:"https://staging-app.cline.bot",apiBaseUrl:"https://core-api.staging.int.cline.bot",mcpBaseUrl:"https://core-api.staging.int.cline.bot/v1/mcp",workOsClientId:"client_01K3A5415VF6QBQBG3XYCW91G6"},local:{environment:"local",appBaseUrl:"http://localhost:3000",apiBaseUrl:"http://localhost:7777",mcpBaseUrl:"http://localhost:7777/v1/mcp",workOsClientId:"client_01K6XQAY7JK6T5HXVSZW2S5VYK"}},ds="production";function ft(i){let l=i?.trim().toLowerCase();if(l==="production"||l==="staging"||l==="local")return l;return}function $t(){if(typeof process>"u"||!process?.env)return{};return process.env}function wo(){let i=$t();return ft(i.CLINE_ENVIRONMENT_OVERRIDE)??ft(i.CLINE_ENVIRONMENT)??"production"}function Ao(i){if(typeof i==="string")return mt[i];return mt[wo()]}function Oo(i,l){if(l.CLINE_API_BASE_URL)i={...i,apiBaseUrl:l.CLINE_API_BASE_URL,mcpBaseUrl:`${l.CLINE_API_BASE_URL}/v1/mcp`};return i}function ps(i){let l=Ao(i);return Oo(l,$t())}function ms(i,l){if(!i||!l)return;try{let u=new URL(i,l);return u.origin===new URL(l).origin?u.href:void 0}catch{return}}var fs="agent.reasoning.unexpected_tokens",gs="task.provider_request_started",hs="task.provider_stream_started",ys="task.first_chunk_received",bs="task.provider_stream_failed",vs="task.cancelled",Es="task.max_tokens_recovery",Ts="sdk.error",V=new Map;function _s(){V.clear()}function xo(i,l){let u=typeof l.error_message==="string"?l.error_message:"";return[i,l.component,l.operation,l.error_type,l.error_code??"",l.error_status??"",u.replace(/\d+/g,"#").replace(/\s+/g," ").trim().toLowerCase().slice(0,256)].join("\x00")}function Co(i){let l=Date.now(),u=V.get(i);if(u&&l-u.startMs<3600000){if(u.emitted<5)return u.emitted+=1,{emit:!0,suppressed:0};return u.suppressed+=1,{emit:!1,suppressed:u.suppressed}}let c=u?.suppressed??0;if(V.delete(i),V.size>=512){let f=V.keys().next();if(!f.done)V.delete(f.value)}return V.set(i,{startMs:l,emitted:1,suppressed:0}),{emit:!0,suppressed:c}}function Is(i,l){i?.capture({event:"agent.reasoning.unexpected_tokens",properties:Be({sessionId:l.sessionId,agentId:l.agentId,runId:l.runId,iteration:l.iteration,providerId:l.providerId,modelId:l.modelId,requestedThinking:l.requestedThinking,reasoningTokenCount:l.reasoningTokenCount})})}function ks(i,l){if(!i)return;i.capture({event:l.event,properties:Be({sessionId:l.sessionId,modelRequestId:l.modelRequestId,ulid:l.ulid??l.sessionId,agentId:l.agentId,conversationId:l.conversationId,runId:l.runId,iteration:l.iteration,provider:l.providerId,providerId:l.providerId,model:l.modelId,modelId:l.modelId,phase:l.phase,durationMs:l.durationMs,eventType:l.eventType,...l.error===void 0?{}:Ft(l.error,l.messageLimit),error_class:l.errorClass})})}function Ss(i,l){if(!i)return!1;let u=l.event??"sdk.error",c=Ro(l),f=0;try{let g=Co(xo(u,c));if(!g.emit)return!0;f=g.suppressed}catch{}return i.capture({event:u,properties:f>0?{...c,suppressed_count:f}:c}),!0}function Ro(i){return Be({...i.context??{},component:i.component,operation:i.operation,severity:i.severity??"error",handled:i.handled??!0,...Ft(i.error,i.messageLimit,i.errorMessage)})}function Be(i){let l={};for(let[u,c]of Object.entries(i))if(c!==void 0)l[u]=c;return l}function Ft(i,l=500,u){let c=gt(i)?i:void 0,f=i instanceof Error?i:void 0,g=se(u)??se(f?.message)??se(c?.message)??Lo(i)??"Unknown error",h=ht(c?.code),y=[],_=new Set([i]),E=c?.cause;while(gt(E)&&!_.has(E)&&y.length<8)_.add(E),y.push(E),E=E.cause;let T=y.map((S)=>ht(S.code)).find((S)=>S!==void 0),k=Ae(c?.status)??Ae(c?.statusCode)??Ae(c?.responseStatus);return{error_type:f?.name?.trim()||se(c?.name)||f?.constructor?.name||"Error",error_message:No(Mo(g),l),...h!==void 0?{error_code:h}:{},...T!==void 0?{error_cause_code:T}:{},...typeof c?.isRetryable==="boolean"?{error_retryable:c.isRetryable}:{},...k!==void 0?{error_status:k}:{}}}function Mo(i){return i.replace(/(authorization=Bearer\s+)[^&\s]+/gi,"$1[redacted]").replace(/(api[_-]?key|access[_-]?token|refresh[_-]?token|authorization|password|secret)=([^&\s]+)/gi,"$1=[redacted]").replace(/(Bearer\s+)[A-Za-z0-9._~+/-]+=*/gi,"$1[redacted]").replace(/\/Users\/[^/\s]+/g,"/Users/[redacted]").replace(/\/home\/[^/\s]+/g,"/home/[redacted]").replace(/([A-Za-z]:[\\/]+Users[\\/]+)[^\\/\s]+/g,"$1[redacted]")}function No(i,l){let u=Math.max(1,Math.floor(l));return i.length>u?i.substring(0,u):i}function gt(i){return typeof i==="object"&&i!==null}function se(i){return typeof i==="string"&&i.trim().length>0?i:void 0}function Lo(i){if(i instanceof Error)return;let l=typeof i==="string"?i:String(i);return l==="[object Object]"?void 0:se(l)}function ht(i){if(typeof i==="string"&&i.trim().length>0)return i;if(typeof i==="number"&&Number.isFinite(i))return i;return}function Ae(i){return typeof i==="number"&&Number.isFinite(i)?i:void 0}function Po(i){let l={};if(!i)return l;return i.split(",").forEach((u)=>{let c=u.indexOf("=");if(c<=0)return;try{let f=decodeURIComponent(u.substring(0,c).trim()),g=decodeURIComponent(u.substring(c+1).trim());if(!f||!g)return;l[f]=g}catch{}}),l}function Do(){if(!process.env)return{enabled:!1};return{enabled:process.env.OTEL_TELEMETRY_ENABLED==="1"||process.env.OTEL_TELEMETRY_ENABLED==="true",metricsExporter:process.env.OTEL_METRICS_EXPORTER||"otlp",logsExporter:process.env.OTEL_LOGS_EXPORTER||"otlp",tracesExporter:process.env.OTEL_TRACES_EXPORTER,otlpProtocol:process.env.OTEL_EXPORTER_OTLP_PROTOCOL||"http/json",otlpEndpoint:process.env.OTEL_EXPORTER_OTLP_ENDPOINT,metricExportInterval:process.env.OTEL_METRIC_EXPORT_INTERVAL?Number.parseInt(process.env.OTEL_METRIC_EXPORT_INTERVAL,10):void 0,otlpHeaders:process.env.OTEL_EXPORTER_OTLP_HEADERS?Po(process.env.OTEL_EXPORTER_OTLP_HEADERS):void 0}}function Bo(i={}){return{extension_version:"unknown",cline_type:"unknown",platform:"terminal",platform_version:process?.version||"unknown",os_type:process?.platform||"unknown",os_version:process?.platform==="win32"?process?.env?.OS??"unknown":"unknown",...i}}function ws(i={}){return{...Do(),...i,metadata:Bo(i.metadata)}}var Uo=new Set(["http:","https:"]);function jo(i){if(!i)return"";try{let l=new URL(i);return Uo.has(l.protocol)&&l.host?l.host:"invalid-endpoint-url"}catch{return"invalid-endpoint-url"}}function As(i){return{telemetry_selfcheck:!0,enabled:i.enabled===!0,otlp_endpoint_host:jo(i.otlpEndpoint),logs_exporter:i.logsExporter??"",metrics_exporter:i.metricsExporter??"",traces_exporter:i.tracesExporter??""}}function qt(i){let l=i?.trim();return l?l:void 0}function Os(i,l){if(!i)return;let u=typeof i==="function"?i(l):i;if(!u)return;let c=qt(u.rootSessionId);if(!c)return;return{rootSessionId:c}}function xs(i){return qt(i?.rootSessionId)}var $o=(i)=>crypto.getRandomValues(new Uint8Array(i)),Fo=(i,l,u)=>{let c=256-256%i.length;if(c===256){let g=i.length-1;return(h=l)=>{if(!h)return"";let y="";while(!0){let _=u(h),E=h;while(E--)if(y+=i[_[E]&g],y.length>=h)return y}}}let f=Math.ceil(409.6*l/c);return(g=l)=>{if(!g)return"";let h="";while(!0){let y=u(f),_=f;while(_--)if(y[_]<c){if(h+=i[y[_]%i.length],h.length>=g)return h}}}},qo=(i,l=21)=>Fo(i,l|0,$o);function Cs(i="",l=""){let u=qo("1234567890abcdefghijklmnopqrstuvwxyz",10);return`${i}${Date.now()}_${u(5)}${l}`}var Rs=["idle","running","pending","completed","failed","cancelled"],Ht=["rules","skills","workflows","plugins","hooks"],Ho=Ht,Go=new Set(Ht);function Wo(i){return typeof i==="string"&&Go.has(i)}function Ms(i){if(!Array.isArray(i))return;let l=i.map((u)=>typeof u==="string"?u.trim():"").filter(Wo);return[...new Set(l)]}function Ns(i,l){return new Set(i??Ho).has(l)}var zo=t({rootPath:e().min(1),hint:e().min(1).optional(),associatedRemoteUrls:o(e().min(1)).optional(),latestGitCommitHash:e().min(1).optional(),latestGitBranchName:e().min(1).optional()}),Vo=t({currentWorkspacePath:e().min(1).optional(),workspaces:d(e().min(1),zo)});function Ps(){return{workspaces:{}}}function Ds(i,l){let u={...i,workspaces:{...i.workspaces,[l.rootPath]:l}};if(!u.currentWorkspacePath)u.currentWorkspacePath=l.rootPath;return Vo.parse(u)}var Bs="workspaces",Us="chat";function js(i){let l=i.trim(),u=/^[A-Za-z]:[\\/]/.test(l)||l.startsWith("\\\\"),c=l.startsWith("/");if(!u&&!c)return!1;let f=l.split(u?/[\\/]+/:/\/+/).filter(Boolean),g=f.at(-1)??"",h=f.at(-2)??"",y=f.at(-3)??"";return(f.at(-4)??"")===".cline"&&y==="data"&&h==="workspaces"&&g==="chat"}var Yo=["current_state","boundary_analysis","interface_proposal"],Fs=3600000,qs=240,Hs=400,B=je((i)=>i instanceof Date?i.toISOString():i,e().datetime()),ne=s(["pending","in_progress","blocked","completed"]),Gt=s(["queued","running","completed","failed","cancelled","interrupted"]),ve=s(["draft","in_review","finalized"]),Ko=t({agentId:e(),role:s(["lead","teammate"]),description:e().optional(),status:s(["idle","running","stopped"])}),Gs=t({agentId:e(),rolePrompt:e(),modelId:e().optional(),maxIterations:n().optional()});function x(i){return je((l)=>l===null?void 0:l,i.optional())}var Ws=t({agentId:e().min(1).describe("Teammate identifier"),rolePrompt:e().min(1).describe("System prompt describing teammate role")}).strict(),zs=t({agentId:e().min(1).describe("Teammate identifier"),reason:x(e().min(1)).describe("Optional shutdown reason")}),Ys=t({}),Xo={create:["title","description"],list:[],claim:["taskId"],complete:["taskId","summary"],block:["taskId","reason"]},Ks={create:["status","taskId","summary","reason"]},Xs=t({action:s(["create","list","claim","complete","block"]),title:x(e().min(1)).describe("Task title"),description:x(e().min(1)).describe("Task details"),dependsOn:x(o(e().describe("Dependency task ID"))).describe("Array of dependency task IDs"),assignee:x(e().min(1)).describe("Optional assignee"),status:x(s(["pending","in_progress","blocked","completed"])).describe("Optional task status filter"),taskId:x(e()).describe("Task ID"),summary:x(e().min(1)).describe("Completion summary"),reason:x(e().min(1)).describe("Blocking reason")}).superRefine((i,l)=>{for(let u of Xo[i.action]){if(i[u]!==void 0)continue;l.addIssue({code:"custom",path:[u],message:`Field "${u}" is required when action=${i.action}`})}}),Js=t({agentId:e().describe("Teammate agent ID"),task:e().min(1).describe("Task instructions for the teammate"),taskId:x(e()).describe("Optional shared task list ID"),runMode:x(s(["sync","async"])).describe("Execution mode: 'sync' blocks until the teammate finishes and returns the result (default if omitted); 'async' queues the run and returns a runId immediately — use team_await_runs to collect results later."),continueConversation:x(r()).describe("If true, continue the teammate conversation; otherwise start fresh")}),Zs=t({status:x(s(["queued","running","completed","failed","cancelled","interrupted"])).describe("Optional run status filter. Omit to include all statuses."),agentId:x(e().min(1)).describe("Optional teammate ID filter. Omit to include all teammates."),includeCompleted:x(r()).describe("Include completed/failed runs (default true)")}),Qs=t({runId:e().min(1).describe("Run ID"),reason:x(e().min(1)).describe("Optional cancellation reason")}),el=t({runId:x(e().min(1)).describe("Optional async run ID to await. Omit to wait for all active async runs.")}).strict(),tl=t({toAgentId:e().min(1).describe("Recipient agent ID"),subject:e().min(1).describe("Message subject"),body:e().min(1).describe("Message body"),taskId:x(e().min(1)).describe("Optional task ID context")}),nl=t({subject:e().min(1).describe("Message subject"),body:e().min(1).describe("Message body"),taskId:x(e().min(1)).describe("Optional task ID context")}),rl=t({unreadOnly:x(r()).describe("Only unread messages for read action (default true)")}),ol=t({kind:s(["progress","handoff","blocked","decision","done","error"]),summary:e().min(1).describe("Update summary"),taskId:x(e().min(1)).describe("Optional task ID context"),evidence:x(o(e().min(1))).describe("Optional evidence links/snippets"),nextAction:x(e().min(1)).describe("Planned next step")}),il=t({}),al=t({title:e().describe("Outcome title"),requiredSections:o(e()).default(Yo).describe("Required sections for finalization gate (defaults to current_state,boundary_analysis,interface_proposal)")}),sl=t({outcomeId:e().describe("Outcome ID"),section:e().describe("Section name"),sourceRunId:x(e()).describe("Optional source run ID"),content:e().describe("Section fragment content")}),ll=t({fragmentId:e().describe("Fragment ID"),approved:r().describe("Review decision")}),ul=t({outcomeId:e().describe("Outcome ID")}),cl=t({}),dl=t({teamId:e(),teamName:e(),members:o(Ko),taskCounts:d(ne,n()),unreadMessages:n(),missionLogEntries:n(),activeRuns:n(),queuedRuns:n(),outcomeCounts:d(ve,n())}),Jo=t({id:e(),title:e(),description:e(),status:ne,createdAt:B,updatedAt:B,createdBy:e(),assignee:e().optional(),dependsOn:o(e()),summary:e().optional(),isReady:r(),blockedBy:o(e())}),pl=w("action",[t({action:a("create"),taskId:e(),status:ne,ignoredFields:o(e()).optional(),note:e().optional()}),t({action:a("list"),tasks:o(Jo)}),t({action:a("claim"),taskId:e(),status:ne,nextStep:e()}),t({action:a("complete"),taskId:e(),status:ne}),t({action:a("block"),taskId:e(),status:ne})]),ml=t({agentId:e(),mode:s(["sync","async"]),status:s(["dispatched","running","queued","joined"]),dispatched:r(),message:e(),deduped:r().optional(),runId:e().optional(),text:e().optional(),iterations:n().optional()}),Zo=t({textPreview:e(),iterations:n(),finishReason:e(),durationMs:n(),usage:t({inputTokens:n(),outputTokens:n(),cacheReadTokens:n().optional(),cacheWriteTokens:n().optional(),totalCost:n().optional()})}),fl=t({id:e(),agentId:e(),taskId:e().optional(),status:Gt,messagePreview:e(),priority:n(),retryCount:n(),maxRetries:n(),nextAttemptAt:B.optional(),continueConversation:r().optional(),startedAt:B,endedAt:B.optional(),leaseOwner:e().optional(),heartbeatAt:B.optional(),lastProgressAt:B.optional(),lastProgressMessage:e().optional(),currentActivity:e().optional(),error:e().optional(),resultSummary:Zo.optional()}),gl=t({id:e(),teamId:e(),fromAgentId:e(),toAgentId:e(),subject:e(),body:e(),taskId:e().optional(),sentAt:B,readAt:B.optional()}),hl=t({id:e(),teamId:e(),title:e(),status:ve,requiredSections:o(e()),createdBy:e(),createdAt:B,finalizedAt:B.optional()}),yl=t({outcomeId:e(),status:ve,requiredSections:o(e())}),bl=t({agentId:e(),status:e()}),vl=t({runId:e(),status:Gt}),El=t({id:e(),toAgentId:e()}),Tl=t({delivered:n()}),_l=t({id:e()}),Il=t({status:e()}),kl=t({fragmentId:e(),status:e()}),Sl=t({outcomeId:e(),status:ve}),Qo;((i)=>{i.TaskStart="task_start",i.TaskEnd="task_end",i.AgentEvent="agent_event",i.TeammateSpawned="teammate_spawned",i.TeammateShutdown="teammate_shutdown",i.TeamTaskUpdated="team_task_updated",i.TeamMessage="team_message",i.TeamMissionLog="team_mission_log",i.TeamTaskCompleted="team_task_completed",i.RunStarted="run_started",i.RunQueued="run_queued",i.RunProgress="run_progress",i.RunCompleted="run_completed",i.RunFailed="run_failed",i.RunCancelled="run_cancelled",i.RunInterrupted="run_interrupted",i.OutcomeCreated="outcome_created",i.OutcomeFragmentAttached="outcome_fragment_attached",i.OutcomeFragmentReviewed="outcome_fragment_reviewed",i.OutcomeFinalized="outcome_finalized"})(Qo||={});function ei(i){let{$schema:l,...u}=i;if(typeof u.type==="string")return u;if("properties"in u||"required"in u||"additionalProperties"in u)return{type:"object",...u};for(let c of["oneOf","anyOf","allOf"]){let f=u[c];if(!Array.isArray(f)||f.length===0)continue;if(c==="allOf"){if(f.some((g)=>g&&typeof g==="object"&&g.type==="object"))return{type:"object",...u};throw Error('Tool inputSchema must describe an object at the top level, but the schema has a top-level "allOf" with no branch that asserts type: "object". Add type: "object" to at least one allOf branch to make the object constraint explicit.')}if(f.every((g)=>g&&typeof g==="object"&&g.type==="object"))return{type:"object",...u};throw Error(`Tool inputSchema must describe an object at the top level, but the schema has a top-level "${c}" whose branches include non-object types. Pass the strict object schema as inputSchema and reserve union/coercion schemas for use inside execute().`)}return u}function Al(i){let l=ei(i.inputSchema instanceof ie?eo(i.inputSchema):i.inputSchema);return{name:i.name,resultPolicy:i.resultPolicy,description:i.description,inputSchema:l,lifecycle:i.lifecycle,successContext:i.successContext,executionMode:i.executionMode,timeoutMs:i.timeoutMs??30000,retryable:i.retryable??!0,maxRetries:i.maxRetries??3,execute:i.execute}}var ti=["401","403","unauthorized","forbidden","invalid token","expired token","authentication"];function Ol(i){let l=(i instanceof Error?i.message:String(i)).toLowerCase();return ti.some((u)=>l.includes(u))}export{fs as AGENT_UNEXPECTED_REASONING_TOKENS_EVENT,Za as APIKeySchema,ti as AUTH_ERROR_PATTERNS,bi as AgentConfigSchema,yn as AgentFinishReasonSchema,yi as AgentResultSchema,bn as AgentUsageSchema,_o as AllowedMCPServerSchema,vo as AnthropicModelSchema,Eo as AnthropicSchema,ai as ApiFormat,on as ApiFormatSchema,co as AwsBedrockCustomModelSchema,uo as AwsBedrockModelSchema,po as AwsBedrockSettingsSchema,va as CHARS_PER_TOKEN,Us as CLINE_CHAT_WORKSPACE_DIRECTORY_NAME,Ya as CLINE_DEFAULT_MODEL_ID,es as CLINE_DEFAULT_RPC_ADDRESS,Qa as CLINE_DEFAULT_RPC_PORT,mt as CLINE_ENVIRONMENTS,us as CLINE_ENVIRONMENT_ENV,cs as CLINE_ENVIRONMENT_OVERRIDE_ENV,Bs as CLINE_WORKSPACES_DIRECTORY_NAME,fa as CONFIGURABLE_MODEL_TOOL_NAMES,_n as CONNECTOR_CATALOG,An as CONNECTOR_PLATFORMS,Ri as CURRENT_HUB_PROTOCOL_VERSION,mo as ClineModelSchema,fo as ClineSettingsSchema,Ti as ConnectorAuthorizationDecisionSchema,Ei as ConnectorAuthorizationRequestSchema,En as ConnectorEventActorSchema,Tn as ConnectorEventContextSchema,vn as ConnectorHookEventNameSchema,_i as ConnectorHookEventSchema,Tt as ContributionRegistry,ds as DEFAULT_CLINE_ENVIRONMENT,Ot as DEFAULT_MAX_IMAGE_BASE64_BYTES,Y as DEFAULT_MAX_IMAGE_DECODED_BYTES,G as DEFAULT_MAX_IMAGE_ENCODED_BYTES,sr as DEFAULT_MAX_TOTAL_MEDIA_BYTES,_a as DEFAULT_MCP_TIMEOUT_SECONDS,Yo as DEFAULT_OUTCOME_REQUIRED_SECTIONS,ga as DEFAULT_REASONING_EFFORT,Ho as DEFAULT_RUNTIME_CONFIG_EXTENSIONS,me as EMPTY_CONTENT_TEXT,Tr as ESTIMATED_TOKENS_PER_IMAGE,So as EnterpriseTelemetrySchema,Oi as FEATURE_FLAGS,Q as FeatureFlag,Ai as FeatureFlagDefaultValue,or as GeneratedMediaModalitySchema,ar as GeneratedMediaSchema,ir as GeneratedMediaSourceSchema,pt as GlobalInstructionsFileSchema,Li as HUB_CAPABILITIES,Vi as HUB_CHECKPOINT_CAPABILITY,Di as HUB_CLIENT_TOOL_APPROVAL_CAPABILITY,$i as HUB_COMMAND_SLOW_LOG_MS,zi as HUB_COMPACTION_CAPABILITY,Gi as HUB_CUSTOM_TOOL_CAPABILITY_PREFIX,Gn as HUB_DEFAULT_COMMAND_TIMEOUT_MS,Wi as HUB_HOOK_CAPABILITY_PREFIX,Yi as HUB_MISTAKE_LIMIT_CAPABILITY,_t as HUB_SCHEDULE_MODES,Hi as HUB_TOOL_EXECUTOR_CAPABILITY_PREFIX,zn as HUB_TOOL_EXECUTOR_NAMES,Ki as HUB_USER_INSTRUCTIONS_SNAPSHOT_CAPABILITY,Nn as HookEventNameSchema,qn as HookEventPayloadSchema,ye as IMAGE_OMITTED_PLACEHOLDER,be as IMAGE_UNSUPPORTED_PLACEHOLDER,yo as LiteLLMModelSchema,bo as LiteLLMSchema,Ni as MAX_CLIENT_HUB_PROTOCOL_VERSION,ka as MAX_MCP_TIMEOUT_SECONDS,Mi as MIN_CLIENT_HUB_PROTOCOL_VERSION,Ia as MIN_MCP_TIMEOUT_SECONDS,ma as MODEL_TOOL_NAMES,oo as MODE_TAG_INSTRUCTIONS,an as ModelCapabilitySchema,vt as ModelInfoSchema,dn as ModelMetadataSchema,pn as ModelModalitiesSchema,ze as ModelModalitySchema,gn as ModelOperationModeSchema,fn as ModelOperationSchema,ln as ModelPricingSchema,rn as ModelReasoningOptionSchema,sn as ModelStatusSchema,Bi as ONE_TIME_SCHEDULE_CRON_PATTERN,Ui as ONE_TIME_SCHEDULE_RUN_AT_METADATA_KEY,so as OpenAiCompatibleModelSchema,lo as OpenAiCompatibleSchema,io as PLAN_MODE_INSTRUCTIONS,ao as PLAN_MODE_INSTRUCTIONS_MANUAL_SWITCH,wi as PLUGIN_FILE_EXTENSIONS,ko as PromptUploadingSchema,ns as ProviderCapabilitySchema,os as ProviderClientSchema,rs as ProviderProtocolSchema,he as REASONING_EFFORT_RATIOS,yt as REASONING_LEVELS,Ka as REMOTE_URI_SCHEME,Ht as RUNTIME_CONFIG_EXTENSION_KINDS,tn as ReasoningEffortSchema,en as ReasoningLevelSchema,Ja as RemoteConfigSchema,Io as RemoteMCPServerSchema,we as S3AccessKeySettingsSchema,Ts as SDK_ERROR_TELEMETRY_EVENT,nr as SESSION_SEARCH_PREVIEW_MAX_LENGTH,tr as SESSION_SEARCH_TITLE_MAX_LENGTH,Rs as SESSION_STATUS_VALUES,At as SUPPORTED_IMAGE_MEDIA_TYPES,vs as TASK_CANCELLED_EVENT,ys as TASK_FIRST_CHUNK_RECEIVED_EVENT,Es as TASK_MAX_TOKENS_RECOVERY_EVENT,gs as TASK_PROVIDER_REQUEST_STARTED_EVENT,bs as TASK_PROVIDER_STREAM_FAILED_EVENT,hs as TASK_PROVIDER_STREAM_STARTED_EVENT,Fs as TEAM_AWAIT_TIMEOUT_MS,as as TEAM_LIFECYCLE_EVENT_TYPE,is as TEAM_PROGRESS_EVENT_TYPE,qs as TEAM_RUN_MESSAGE_PREVIEW_LIMIT,Hs as TEAM_RUN_TEXT_PREVIEW_LIMIT,Ks as TEAM_TASK_IGNORED_FIELDS_BY_ACTION,hi as TOOL_REJECTION_SUFFIX,sl as TeamAttachOutcomeFragmentInputSchema,el as TeamAwaitRunsInputSchema,nl as TeamBroadcastInputSchema,Tl as TeamBroadcastToolResultSchema,Qs as TeamCancelRunInputSchema,vl as TeamCancelRunToolResultSchema,il as TeamCleanupInputSchema,Il as TeamCleanupToolResultSchema,al as TeamCreateOutcomeInputSchema,yl as TeamCreateOutcomeToolResultSchema,ul as TeamFinalizeOutcomeInputSchema,Sl as TeamFinalizeOutcomeToolResultSchema,cl as TeamListOutcomesInputSchema,Zs as TeamListRunsInputSchema,gl as TeamMailboxMessageToolResultSchema,Qo as TeamMessageType,ol as TeamMissionLogInputSchema,_l as TeamMissionLogToolResultSchema,kl as TeamOutcomeFragmentToolResultSchema,hl as TeamOutcomeToolResultSchema,rl as TeamReadMailboxInputSchema,ll as TeamReviewOutcomeFragmentInputSchema,Zo as TeamRunResultSummarySchema,Js as TeamRunTaskInputSchema,ml as TeamRunTaskToolResultSchema,fl as TeamRunToolSummarySchema,tl as TeamSendMessageInputSchema,El as TeamSendMessageToolResultSchema,zs as TeamShutdownTeammateInputSchema,bl as TeamSimpleAgentStatusToolResultSchema,Ws as TeamSpawnTeammateInputSchema,Ys as TeamStatusInputSchema,dl as TeamStatusToolResultSchema,Xs as TeamTaskInputSchema,Jo as TeamTaskListItemToolResultSchema,pl as TeamTaskToolResultSchema,Gs as TeamTeammateSpecSchema,un as ThinkingConfigSchema,hn as ToolCallRecordSchema,da as USAGE_COST_DISPLAYS,gi as USER_REJECTED_TOOL_REASON,go as VertexModelSchema,ho as VertexSettingsSchema,zo as WorkspaceInfoSchema,Vo as WorkspaceManifestSchema,Wa as buildClineSystemPrompt,Ro as buildSdkErrorProperties,As as buildTelemetrySelfcheckReport,Is as captureAgentUnexpectedReasoningTokens,Ss as captureSdkError,ks as captureTaskLifecycleEvent,kr as clampMcpTimeoutSeconds,ki as connectorChannelsFromPlatforms,ws as createClineTelemetryServiceConfig,Bo as createClineTelemetryServiceMetadata,Si as createContributionRegistry,_r as createImageAwareReplacer,Rt as createMediaBudgetState,ea as createModeSwitchNoticeTracker,Cs as createSessionId,Al as createTool,Ma as decodeJwtPayload,Xi as describeOutdatedHubSessions,Ps as emptyWorkspaceManifest,Ea as estimateRequestInputTokens,Er as estimateTokens,It as formatDisplayUserInput,Yn as formatFileContentBlock,Fa as formatHumanReadableDate,wa as formatMcpTimeoutErrorMessage,ca as formatMessagesForAiSdk,Qi as formatModeSwitchNotice,na as formatSessionSearchPreview,ta as formatSessionSearchTitle,qa as formatUptime,Zi as formatUserCommandBlock,Ji as formatUserInputBlock,ia as generatedMediaModalityFromMediaType,ls as getClineClientIdentity,ps as getClineEnvironmentConfig,Wn as getDefaultHubCommandTimeoutMs,La as getDefaultShell,Oa as getErrorCode,Aa as getErrorMessage,Pa as getShellArgs,Zr as getShellInvocation,Bt as getShellKind,Ns as hasRuntimeConfigExtension,xt as imageBase64DecodedByteLength,aa as imageBase64EncodedByteLength,lr as imageBase64LengthForDecodedBytes,sa as imageFileMaxDecodedBytesForBase64Limit,ur as isBase64Char,la as isCanonicalBase64,ui as isChatCompatibleModel,js as isChatWorkspacePath,to as isClineProvider,oa as isGeneratedMedia,Pi as isHubProtocolCompatible,Hn as isHubScheduleMode,qi as isHubToolExecutorName,Ol as isLikelyAuthError,Ir as isMcpTimeoutConfigured,Wo as isRuntimeConfigExtensionKind,li as isTranscriptionModel,In as listConnectorCatalog,ja as maskSecret,pa as mergeModelOptions,bt as modelHasCapability,ci as modelProducesImages,mi as modelSupportsImageInput,pi as modelSupportsToolCalling,Ta as noopBasicLogger,ut as normalizeJsonLikeStringsForSchema,Cn as normalizePluginManifest,Ft as normalizeSdkError,Zn as normalizeUserInput,Na as omitUndefinedValues,Ci as parseHookEventPayload,xa as parseJsonStream,Ms as parseRuntimeConfigExtensions,Jn as parseUserCommandEnvelope,ji as readHubScheduleMode,Pe as reserveImageMediaBytes,_s as resetSdkErrorRateLimiterForTests,ms as resolveClineAppUrl,wo as resolveClineEnvironment,ha as resolveEffectiveReasoningEffort,Os as resolveHookSessionContext,Fi as resolveHubCommandTimeoutMs,Sa as resolveMcpTimeoutSeconds,Ct as resolveMediaBudget,za as resolveProviderApiKeyOptional,Va as resolveProviderLocalCli,ya as resolveReasoningBudgetFromRatio,vr as resolveReasoningEffortRatio,xs as resolveRootSessionId,Ra as safeJsonParse,Ca as safeJsonStringify,Da as sanitizeFileName,D as sanitizeSurrogates,ba as serializeAbortReason,ss as setClineClientIdentity,Ii as shouldIncludeConnectorField,Qn as stripModeNotices,$a as stripUtf8Bom,mn as supportsChatModalities,br as toAiSdkToolResultOutput,Ba as trimNonEmpty,Ua as truncateSplit,Qr as truncateStr,Ds as upsertWorkspaceInfo,di as usesImageGenerationOperation,ua as validateAndReserveBase64Media,Oe as validateAndReserveImageMedia,pr as validateImageMedia,Ga as validateWithZod,rr as xmlTagsRemoval,eo as zodToJsonSchema};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ip,II,np,SI,EI,jE,RI,AI,OI,CI,PI,cw,DI,MI,WI,ap,zf,NI,Cs,pl,lw,Gf,$E,uw,qE,Vf,LI,UI,BI,zE,GE,FI,jI,$I,VE,KE,HE,qI,zI,GI,QE,YE,JE,VI,KI,XE,HI,pw,ZE,e5,dl,t5,i5,QI,YI,n5,a5,o5,r5,s5,c5,l5,u5,p5,dw,JI,d5,XI,m5,ZI,h5,eS,g5,f5,y5,x5,b5,v5,w5,T5,_5,tS,k5,I5,S5,E5,R5,iS,nS,aS,mw,oS,rS,A5,O5,sS,Ps,Fm,cS,lS,jm,C5,Kf,hw,gw,gi,en,uS,P5,fw,D5,pS,yw,Ds,Ms,dS,Hf,$m,op,Pr,Ai,qm,mS,Qf,Yf,rp,M5,W5,zm,N5,L5,hS,sp,U5,B5,Dr,gS,fS,Jf,F5,j5,$5,q5,yS,xS,z5,G5,V5,K5,Xf,Zf,cp,lp,ey,ty,H5,Q5,xw,up,bS,Y5,J5,fi,vS,X5,Z5,e6,t6,i6,n6,wS,ta,TS,_S,kS,a6,o6,r6,iy,pp,IS,s6,c6,l6,SS,u6,p6,d6,m6,ES,RS,AS,OS,CS,PS,DS,MS,WS,NS,LS,US,BS,FS,jS,bw,ny,$S,qS,h6,g6,f6,y6,x6,b6,v6,w6,T6,_6,k6,ay,zS,GS,vw,I6,S6,E6,R6,oy,A6,O6,ww,C6,VS,gc,P6,D6,M6,W6,N6,L6,U6,B6,F6,j6,KS,$6,q6,z6,G6,V6,K6,H6,Q6,HS,Y6,J6,X6,Z6,ry,sy,cy,ly,uy,ml,eR,tR,iR,py,dy,hl,QS,Tw,_w,nR,aR,YS,oR,rR,sR,cR,lR,uR,kw,JS,XS,pR,dR,ZS,eE,mR,hR,gR,fR,yR,tE,xR,bR,vR,wR,TR,_R,kR,IR,SR,ER,RR,AR,OR,CR,PR,DR,MR,WR,NR,LR,UR,BR,FR,jR,iE,$R,qR,nE,zR,GR,VR,KR,HR,QR,YR,JR,XR,ZR,e4,t4,aE,i4,oE,n4,a4}from"../../core/dist/index-hkmarmve.js";export{Z6 as AGENT_UNEXPECTED_REASONING_TOKENS_EVENT,g6 as APIKeySchema,oE as AUTH_ERROR_PATTERNS,GE as AgentConfigSchema,UI as AgentFinishReasonSchema,zE as AgentResultSchema,BI as AgentUsageSchema,FS as AllowedMCPServerSchema,US as AnthropicModelSchema,BS as AnthropicSchema,jE as ApiFormat,EI as ApiFormatSchema,OS as AwsBedrockCustomModelSchema,AS as AwsBedrockModelSchema,CS as AwsBedrockSettingsSchema,B5 as CHARS_PER_TOKEN,ay as CLINE_BUILD_ENV_ENV,fR as CLINE_CHAT_WORKSPACE_DIRECTORY_NAME,M6 as CLINE_CONNECTOR_CLI_LAUNCH_ENV,W6 as CLINE_CONNECTOR_STARTING_INSTANCE_ENV,N6 as CLINE_CONNECTOR_SUPERVISED_ENV,zS as CLINE_DEBUG_HOST_ENV,GS as CLINE_DEBUG_PORT_BASE_ENV,pp as CLINE_DEFAULT_MODEL_ID,b6 as CLINE_DEFAULT_RPC_ADDRESS,x6 as CLINE_DEFAULT_RPC_PORT,ww as CLINE_ENVIRONMENTS,A6 as CLINE_ENVIRONMENT_ENV,O6 as CLINE_ENVIRONMENT_OVERRIDE_ENV,y6 as CLINE_HUB_DEV_PORT,L6 as CLINE_HUB_LAUNCHER_CLIENT_ENV,B6 as CLINE_HUB_LAUNCHER_TRANSPORT_ENV,U6 as CLINE_HUB_LAUNCHER_VERSION_ENV,f6 as CLINE_HUB_PORT,D6 as CLINE_RUN_AS_HUB_DAEMON_ENV,gR as CLINE_WORKSPACES_DIRECTORY_NAME,W5 as CONFIGURABLE_MODEL_TOOL_NAMES,qI as CONNECTOR_CATALOG,VI as CONNECTOR_PLATFORMS,eR as CORE_SPAWN_REASONS,a5 as CURRENT_HUB_PROTOCOL_VERSION,PS as ClineModelSchema,DS as ClineSettingsSchema,KE as ConnectorAuthorizationDecisionSchema,VE as ConnectorAuthorizationRequestSchema,jI as ConnectorEventActorSchema,$I as ConnectorEventContextSchema,FI as ConnectorHookEventNameSchema,HE as ConnectorHookEventSchema,pw as ContributionRegistry,C6 as DEFAULT_CLINE_ENVIRONMENT,gw as DEFAULT_MAX_IMAGE_BASE64_BYTES,en as DEFAULT_MAX_IMAGE_DECODED_BYTES,gi as DEFAULT_MAX_IMAGE_ENCODED_BYTES,uS as DEFAULT_MAX_TOTAL_MEDIA_BYTES,j5 as DEFAULT_MCP_TIMEOUT_SECONDS,tE as DEFAULT_OUTCOME_REQUIRED_SECTIONS,N5 as DEFAULT_REASONING_EFFORT,JS as DEFAULT_RUNTIME_CONFIG_EXTENSIONS,qm as EMPTY_CONTENT_TEXT,gS as ESTIMATED_TOKENS_PER_IMAGE,qS as EnterpriseTelemetrySchema,i5 as FEATURE_FLAGS,dl as FeatureFlag,t5 as FeatureFlagDefaultValue,cS as GeneratedMediaModalitySchema,jm as GeneratedMediaSchema,lS as GeneratedMediaSourceSchema,bw as GlobalInstructionsFileSchema,s5 as HUB_CAPABILITIES,v5 as HUB_CHECKPOINT_CAPABILITY,l5 as HUB_CLIENT_TOOL_APPROVAL_CAPABILITY,m5 as HUB_COMMAND_SLOW_LOG_MS,b5 as HUB_COMPACTION_CAPABILITY,y5 as HUB_CUSTOM_TOOL_CAPABILITY_PREFIX,XI as HUB_DEFAULT_COMMAND_TIMEOUT_MS,x5 as HUB_HOOK_CAPABILITY_PREFIX,w5 as HUB_MISTAKE_LIMIT_CAPABILITY,dw as HUB_SCHEDULE_MODES,f5 as HUB_TOOL_EXECUTOR_CAPABILITY_PREFIX,eS as HUB_TOOL_EXECUTOR_NAMES,T5 as HUB_USER_INSTRUCTIONS_SNAPSHOT_CAPABILITY,QI as HookEventNameSchema,YI as HookEventPayloadSchema,Ps as IMAGE_OMITTED_PLACEHOLDER,Fm as IMAGE_UNSUPPORTED_PLACEHOLDER,HS as LOOPBACK_NO_PROXY_HOSTS,NS as LiteLLMModelSchema,LS as LiteLLMSchema,r5 as MAX_CLIENT_HUB_PROTOCOL_VERSION,q5 as MAX_MCP_TIMEOUT_SECONDS,o5 as MIN_CLIENT_HUB_PROTOCOL_VERSION,$5 as MIN_MCP_TIMEOUT_SECONDS,M5 as MODEL_TOOL_NAMES,TS as MODE_TAG_INSTRUCTIONS,RI as ModelCapabilitySchema,uw as ModelInfoSchema,PI as ModelMetadataSchema,DI as ModelModalitiesSchema,cw as ModelModalitySchema,NI as ModelOperationModeSchema,WI as ModelOperationSchema,OI as ModelPricingSchema,SI as ModelReasoningOptionSchema,AI as ModelStatusSchema,J6 as NO_DEFAULT_CURRENT_DIRECTORY_IN_EXE_PATH_ENV,u5 as ONE_TIME_SCHEDULE_CRON_PATTERN,p5 as ONE_TIME_SCHEDULE_RUN_AT_METADATA_KEY,_w as OTLP_TRACE_RELAY_MARKER,ES as OpenAiCompatibleModelSchema,RS as OpenAiCompatibleSchema,_S as PLAN_MODE_INSTRUCTIONS,kS as PLAN_MODE_INSTRUCTIONS_MANUAL_SWITCH,e5 as PLUGIN_FILE_EXTENSIONS,$S as PromptUploadingSchema,v6 as ProviderCapabilitySchema,T6 as ProviderClientSchema,w6 as ProviderProtocolSchema,zm as REASONING_EFFORT_RATIOS,ip as REASONING_LEVELS,IS as REMOTE_CONFIG_SESSION_BLOB_UPLOAD_METADATA_KEY,p6 as REMOTE_URI_SCHEME,kw as RUNTIME_CONFIG_EXTENSION_KINDS,np as ReasoningEffortSchema,II as ReasoningLevelSchema,h6 as RemoteConfigSchema,jS as RemoteMCPServerSchema,ny as S3AccessKeySettingsSchema,tR as SDK_ERROR_TELEMETRY_EVENT,rS as SESSION_SEARCH_PREVIEW_MAX_LENGTH,oS as SESSION_SEARCH_TITLE_MAX_LENGTH,uR as SESSION_STATUS_VALUES,hw as SUPPORTED_IMAGE_MEDIA_TYPES,uy as TASK_CANCELLED_EVENT,cy as TASK_FIRST_CHUNK_RECEIVED_EVENT,ml as TASK_MAX_TOKENS_RECOVERY_EVENT,ry as TASK_PROVIDER_REQUEST_STARTED_EVENT,ly as TASK_PROVIDER_STREAM_FAILED_EVENT,sy as TASK_PROVIDER_STREAM_STARTED_EVENT,xR as TEAM_AWAIT_TIMEOUT_MS,k6 as TEAM_LIFECYCLE_EVENT_TYPE,_6 as TEAM_PROGRESS_EVENT_TYPE,bR as TEAM_RUN_MESSAGE_PREVIEW_LIMIT,vR as TEAM_RUN_TEXT_PREVIEW_LIMIT,IR as TEAM_TASK_IGNORED_FIELDS_BY_ACTION,Vf as TOOL_REJECTION_SUFFIX,LR as TeamAttachOutcomeFragmentInputSchema,OR as TeamAwaitRunsInputSchema,PR as TeamBroadcastInputSchema,JR as TeamBroadcastToolResultSchema,AR as TeamCancelRunInputSchema,QR as TeamCancelRunToolResultSchema,WR as TeamCleanupInputSchema,ZR as TeamCleanupToolResultSchema,NR as TeamCreateOutcomeInputSchema,KR as TeamCreateOutcomeToolResultSchema,BR as TeamFinalizeOutcomeInputSchema,t4 as TeamFinalizeOutcomeToolResultSchema,FR as TeamListOutcomesInputSchema,RR as TeamListRunsInputSchema,GR as TeamMailboxMessageToolResultSchema,aE as TeamMessageType,MR as TeamMissionLogInputSchema,XR as TeamMissionLogToolResultSchema,e4 as TeamOutcomeFragmentToolResultSchema,VR as TeamOutcomeToolResultSchema,DR as TeamReadMailboxInputSchema,UR as TeamReviewOutcomeFragmentInputSchema,nE as TeamRunResultSummarySchema,ER as TeamRunTaskInputSchema,qR as TeamRunTaskToolResultSchema,zR as TeamRunToolSummarySchema,CR as TeamSendMessageInputSchema,YR as TeamSendMessageToolResultSchema,_R as TeamShutdownTeammateInputSchema,HR as TeamSimpleAgentStatusToolResultSchema,TR as TeamSpawnTeammateInputSchema,kR as TeamStatusInputSchema,jR as TeamStatusToolResultSchema,SR as TeamTaskInputSchema,iE as TeamTaskListItemToolResultSchema,$R as TeamTaskToolResultSchema,wR as TeamTeammateSpecSchema,CI as ThinkingConfigSchema,LI as ToolCallRecordSchema,Yf as USAGE_COST_DISPLAYS,qE as USER_REJECTED_TOOL_REASON,MS as VertexModelSchema,WS as VertexSettingsSchema,ZS as WorkspaceInfoSchema,eE as WorkspaceManifestSchema,S6 as augmentNodeCommandForDebug,o6 as buildClineSystemPrompt,QE as buildConnectorConnectArgs,s6 as buildRemoteConfigSessionBlobUploadMetadata,QS as buildSdkErrorProperties,rR as buildTelemetrySelfcheckReport,py as captureAgentUnexpectedReasoningTokens,hl as captureSdkError,dy as captureTaskLifecycleEvent,$6 as claimHubDaemonProcess,j6 as claimHubLauncherIdentity,G6 as claimSupervisedConnectorProcess,xS as clampMcpTimeoutSeconds,d6 as clearMaterializedRemoteConfigRuntime,l6 as clearRemoteConfigSessionBlobUpload,JE as connectorChannelsFromPlatforms,oR as createClineTelemetryServiceConfig,YS as createClineTelemetryServiceMetadata,ZE as createContributionRegistry,fS as createImageAwareReplacer,Ds as createMediaBudgetState,R5 as createModeSwitchNoticeTracker,u6 as createRemoteConfigSessionMessagesArtifactUploader,lR as createSessionId,i4 as createTool,ey as decodeJwtPayload,_5 as describeOutdatedHubSessions,X6 as disableCurrentDirectoryExecutableSearch,XE as disposeAll,mR as emptyWorkspaceManifest,Y6 as ensureLoopbackProxyBypass,Jf as estimateRequestInputTokens,Dr as estimateTokens,mw as formatDisplayUserInput,tS as formatFileContentBlock,t6 as formatHumanReadableDate,G5 as formatMcpTimeoutErrorMessage,Qf as formatMessagesForAiSdk,E5 as formatModeSwitchNotice,O5 as formatSessionSearchPreview,A5 as formatSessionSearchTitle,i6 as formatUptime,I5 as formatUserCommandBlock,k5 as formatUserInputBlock,Kf as generatedMediaModalityFromMediaType,oy as getClineClientIdentity,gc as getClineEnvironmentConfig,ZI as getDefaultHubCommandTimeoutMs,Q5 as getDefaultShell,K5 as getErrorCode,V5 as getErrorMessage,up as getPowerShellEdition,Y5 as getShellArgs,bS as getShellInvocation,xw as getShellKind,dR as hasRuntimeConfigExtension,fw as imageBase64DecodedByteLength,P5 as imageBase64EncodedByteLength,pS as imageBase64LengthForDecodedBytes,D5 as imageFileMaxDecodedBytesForBase64Limit,a4 as initVcr,dS as isBase64Char,E6 as isBunEmbeddedModulePath,Hf as isCanonicalBase64,zf as isChatCompatibleModel,yR as isChatWorkspacePath,ta as isClineProvider,C5 as isGeneratedMedia,q6 as isHubDaemonProcess,c5 as isHubProtocolCompatible,JI as isHubScheduleMode,g5 as isHubToolExecutorName,n4 as isLikelyAuthError,yS as isMcpTimeoutConfigured,aR as isOtlpTraceRelayProvider,XS as isRuntimeConfigExtensionKind,V6 as isSupervisedConnectorProcess,ap as isTranscriptionModel,zI as listConnectorCatalog,nR as markOtlpTraceRelayProvider,Z5 as maskSecret,YE as mergeConnectorConnectArgs,rp as mergeModelOptions,lw as modelHasCapability,Cs as modelProducesImages,$E as modelSupportsImageInput,Gf as modelSupportsToolCalling,F5 as noopBasicLogger,lp as normalizeJsonLikeStringsForSchema,HI as normalizePluginManifest,Tw as normalizeSdkError,nS as normalizeUserInput,ty as omitUndefinedValues,n5 as parseHookEventPayload,Xf as parseJsonStream,pR as parseRuntimeConfigExtensions,iS as parseUserCommandEnvelope,S5 as parseUserInputMode,m6 as prepareRemoteConfigRuntime,a6 as processWorkspaceInfo,Q6 as readConnectorCliLaunchSpec,KS as readHubLauncherIdentity,d5 as readHubScheduleMode,SS as readRemoteConfigSessionBlobUploadMetadata,H6 as readStartingConnectorInstance,KI as registerDisposable,c6 as registerRemoteConfigSessionBlobUpload,Ms as reserveImageMediaBytes,iR as resetSdkErrorRateLimiterForTests,P6 as resolveClineAppUrl,vw as resolveClineBuildEnv,VS as resolveClineEnvironment,L5 as resolveEffectiveReasoningEffort,sR as resolveHookSessionContext,h5 as resolveHubCommandTimeoutMs,z5 as resolveMcpTimeoutSeconds,yw as resolveMediaBudget,r6 as resolveProviderApiKeyOptional,iy as resolveProviderLocalCli,sp as resolveReasoningBudgetFromRatio,hS as resolveReasoningEffortRatio,cR as resolveRootSessionId,cp as safeJsonParse,Zf as safeJsonStringify,J5 as sanitizeFileName,Ai as sanitizeSurrogates,U5 as serializeAbortReason,R6 as setClineClientIdentity,z6 as setConnectorCliLaunchSpec,K6 as setStartingConnectorInstance,GI as shouldIncludeConnectorField,aS as stripModeNotices,e6 as stripUtf8Bom,MI as supportsChatModalities,mS as toAiSdkToolResultOutput,H5 as toPosixSeparators,fi as trimNonEmpty,X5 as truncateSplit,vS as truncateStr,hR as upsertWorkspaceInfo,pl as usesImageGenerationOperation,$m as validateAndReserveBase64Media,Pr as validateAndReserveImageMedia,op as validateImageMedia,n6 as validateWithZod,F6 as withHubLauncherIdentity,I6 as withResolvedClineBuildEnv,sS as xmlTagsRemoval,wS as zodToJsonSchema};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{readFileSync as e}from"node:fs";import{readFile as i}from"node:fs/promises";function n(r){return r.charCodeAt(0)===65279?r.slice(1):r}function o(r){return n(e(r,"utf8"))}async function c(r){return n(await i(r,"utf8"))}export{c as readFileStrippingUtf8Bom,o as readFileSyncStrippingUtf8Bom};
|