@cline/shared 0.0.38-nightly.1778113663

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.
Files changed (71) hide show
  1. package/README.md +47 -0
  2. package/dist/agent.d.ts +397 -0
  3. package/dist/agents/index.d.ts +1 -0
  4. package/dist/agents/types.d.ts +959 -0
  5. package/dist/automation/index.d.ts +3 -0
  6. package/dist/automation/index.js +65 -0
  7. package/dist/automation/schemas.d.ts +89 -0
  8. package/dist/automation/types.d.ts +151 -0
  9. package/dist/connectors/events.d.ts +93 -0
  10. package/dist/connectors/options.d.ts +173 -0
  11. package/dist/cron/cron-spec-types.d.ts +94 -0
  12. package/dist/cron/index.d.ts +1 -0
  13. package/dist/db/index.d.ts +2 -0
  14. package/dist/db/index.js +80 -0
  15. package/dist/db/sqlite-db.d.ts +24 -0
  16. package/dist/dispose.d.ts +13 -0
  17. package/dist/extensions/context.d.ts +76 -0
  18. package/dist/extensions/contribution-registry.d.ts +195 -0
  19. package/dist/extensions/plugin.d.ts +1 -0
  20. package/dist/hooks/contracts.d.ts +9 -0
  21. package/dist/hooks/events.d.ts +194 -0
  22. package/dist/hub.d.ts +468 -0
  23. package/dist/index.browser.d.ts +57 -0
  24. package/dist/index.browser.js +76 -0
  25. package/dist/index.d.ts +63 -0
  26. package/dist/index.js +149 -0
  27. package/dist/llms/ai-sdk-format.d.ts +42 -0
  28. package/dist/llms/gateway.d.ts +117 -0
  29. package/dist/llms/messages.d.ts +147 -0
  30. package/dist/llms/model-info.d.ts +112 -0
  31. package/dist/llms/reasoning-effort.d.ts +21 -0
  32. package/dist/llms/requests.d.ts +2 -0
  33. package/dist/llms/tools.d.ts +86 -0
  34. package/dist/logging/logger.d.ts +37 -0
  35. package/dist/parse/error.d.ts +2 -0
  36. package/dist/parse/headers/utils.d.ts +1 -0
  37. package/dist/parse/json.d.ts +3 -0
  38. package/dist/parse/shell.d.ts +2 -0
  39. package/dist/parse/string.d.ts +4 -0
  40. package/dist/parse/time.d.ts +9 -0
  41. package/dist/parse/zod.d.ts +12 -0
  42. package/dist/prompt/cline.d.ts +24 -0
  43. package/dist/prompt/format.d.ts +11 -0
  44. package/dist/prompt/system.d.ts +2 -0
  45. package/dist/remote-config/constants.d.ts +5 -0
  46. package/dist/remote-config/schema.d.ts +408 -0
  47. package/dist/rpc/index.d.ts +5 -0
  48. package/dist/rpc/runtime.d.ts +320 -0
  49. package/dist/rpc/team-progress.d.ts +53 -0
  50. package/dist/runtime/build-env.d.ts +13 -0
  51. package/dist/runtime/hub-daemon-env.d.ts +2 -0
  52. package/dist/services/telemetry-config.d.ts +6 -0
  53. package/dist/services/telemetry.d.ts +117 -0
  54. package/dist/session/hook-context.d.ts +12 -0
  55. package/dist/session/index.d.ts +1 -0
  56. package/dist/session/records.d.ts +31 -0
  57. package/dist/session/runtime-config.d.ts +26 -0
  58. package/dist/session/runtime-env.d.ts +8 -0
  59. package/dist/session/workspace.d.ts +28 -0
  60. package/dist/storage/index.d.ts +1 -0
  61. package/dist/storage/index.js +1 -0
  62. package/dist/storage/paths.d.ts +86 -0
  63. package/dist/team/index.d.ts +2 -0
  64. package/dist/team/schema.d.ts +411 -0
  65. package/dist/team/types.d.ts +196 -0
  66. package/dist/tools/create.d.ts +22 -0
  67. package/dist/types/auth.d.ts +20 -0
  68. package/dist/types/index.d.ts +2 -0
  69. package/dist/types/vcr.d.ts +12 -0
  70. package/dist/vcr.d.ts +39 -0
  71. package/package.json +65 -0
@@ -0,0 +1,76 @@
1
+ import{z as g}from"zod";import{z as R}from"zod";var Fn=R.enum(["default","openai-responses","r1"]),mo={DEFAULT:"default",OPENAI_RESPONSES:"openai-responses",R1:"r1"},qn=R.enum(["images","tools","streaming","prompt-cache","reasoning","reasoning-effort","computer-use","global-endpoint","structured_output","temperature","files"]),Pn=R.enum(["active","preview","deprecated","legacy"]),Un=R.object({input:R.number().optional(),output:R.number().optional(),cacheWrite:R.number().optional(),cacheRead:R.number().optional()}),Dn=R.object({maxBudget:R.number().optional(),outputPrice:R.number().optional(),thinkingLevel:R.enum(["low","high"]).optional()}),K=R.object({id:R.string(),name:R.string().optional(),description:R.string().optional(),maxTokens:R.number().optional(),contextWindow:R.number().optional(),capabilities:R.array(qn).optional(),apiFormat:Fn.optional(),systemRole:R.enum(["system","developer"]).optional(),temperature:R.number().optional(),pricing:Un.optional(),thinkingConfig:Dn.optional(),status:Pn.optional(),deprecationNotice:R.string().optional(),replacedBy:R.string().optional(),releaseDate:R.string().optional(),deprecationDate:R.string().optional(),family:R.string().optional()});import{z as U}from"zod";var x=U.object({id:U.string(),name:U.string(),input:U.unknown(),output:U.unknown(),error:U.string().optional(),durationMs:U.number(),startedAt:U.date(),endedAt:U.date()});var Mo=g.enum(["completed","max_iterations","aborted","mistake_limit","error"]),So=g.object({inputTokens:g.number(),outputTokens:g.number(),cacheReadTokens:g.number().optional(),cacheWriteTokens:g.number().optional(),totalCost:g.number().optional()}),Zf=g.object({text:g.string(),usage:So,messages:g.array(g.custom()),toolCalls:g.array(x),iterations:g.number(),finishReason:Mo,model:g.object({id:g.string(),provider:g.string(),info:K.optional()}),startedAt:g.date(),endedAt:g.date(),durationMs:g.number()}),Co=g.enum(["low","medium","high","xhigh"]),Vf=g.object({sessionId:g.string().optional(),providerId:g.string(),modelId:g.string(),apiKey:g.string().optional(),baseUrl:g.string().url().optional(),headers:g.record(g.string(),g.string()).optional(),knownModels:g.record(g.string(),K).optional(),providerConfig:g.unknown().optional(),initialMessages:g.array(g.custom()).optional(),systemPrompt:g.string(),tools:g.array(g.custom()),maxIterations:g.number().positive().optional(),maxParallelToolCalls:g.number().int().positive().default(8),maxTokensPerTurn:g.number().positive().optional(),apiTimeoutMs:g.number().positive().default(180000),userFileContentLoader:g.function().input([g.string()]).output(g.promise(g.string())).optional(),toolContextMetadata:g.record(g.string(),g.unknown()).optional(),execution:g.object({maxConsecutiveMistakes:g.number().int().positive().optional(),reminderAfterIterations:g.number().nonnegative().optional(),reminderText:g.string().optional(),loopDetection:g.union([g.literal(!1),g.object({softThreshold:g.number().int().positive().optional(),hardThreshold:g.number().int().positive().optional()})]).optional()}).optional(),reasoningEffort:Co.optional(),thinkingBudgetTokens:g.number().positive().optional(),thinking:g.boolean().optional(),onEvent:g.function().input([g.custom()]).output(g.void()).optional(),hooks:g.custom().optional(),parentAgentId:g.string().optional(),extensions:g.array(g.custom()).optional(),hookErrorMode:g.enum(["ignore","throw"]).default("ignore"),toolPolicies:g.record(g.string(),g.object({enabled:g.boolean().optional(),autoApprove:g.boolean().optional()})).optional(),requestToolApproval:g.function().input([g.object({sessionId:g.string(),agentId:g.string(),conversationId:g.string(),iteration:g.number(),toolCallId:g.string(),toolName:g.string(),input:g.unknown(),policy:g.object({enabled:g.boolean().optional(),autoApprove:g.boolean().optional()}).default({})})]).output(g.union([g.object({approved:g.boolean(),reason:g.string().optional()}),g.promise(g.object({approved:g.boolean(),reason:g.string().optional()}))])).optional(),onConsecutiveMistakeLimitReached:g.function().input([g.object({iteration:g.number().int().positive(),consecutiveMistakes:g.number().int().positive(),maxConsecutiveMistakes:g.number().int().positive(),reason:g.enum(["api_error","invalid_tool_call","tool_execution_failed"]),details:g.string().optional()})]).output(g.union([g.object({action:g.literal("continue"),guidance:g.string().optional()}),g.object({action:g.literal("stop"),reason:g.string().optional()}),g.promise(g.union([g.object({action:g.literal("continue"),guidance:g.string().optional()}),g.object({action:g.literal("stop"),reason:g.string().optional()})]))])).optional(),logger:g.custom().optional(),extensionContext:g.custom().optional(),abortSignal:g.custom().optional()});import{z as $}from"zod";var Yn=$.enum(["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"]),An=$.object({id:$.string().optional(),label:$.string().optional(),role:$.string().optional(),participantKey:$.string().optional(),participantLabel:$.string().optional(),platformUserId:$.string().optional(),metadata:$.record($.string(),$.unknown()).optional()}),Gn=$.object({source:$.string(),sourceEvent:$.string(),threadId:$.string(),channelId:$.string(),isDM:$.boolean(),sessionId:$.string().optional(),workspaceRoot:$.string().optional(),metadata:$.record($.string(),$.unknown()).optional()}),No=$.object({actor:An,context:Gn,payload:$.record($.string(),$.unknown()).optional()}),Ko=$.object({action:$.enum(["allow","deny"]).default("allow"),message:$.string().optional(),reason:$.string().optional(),metadata:$.record($.string(),$.unknown()).optional()}),Oo=$.object({adapter:$.string(),botUserName:$.string().optional(),event:Yn,payload:$.record($.string(),$.unknown()),ts:$.string()});var ho=["hooks","tools","commands","rules","messageBuilders","providers","automationEvents"],vo=new Set(ho);function Vn(n,o){return n.name||`extension_${String(o).padStart(4,"0")}`}function Xn(n){return Array.isArray(n)&&n.every((o)=>typeof o==="string")}function Zn(n){if(!Array.isArray(n))return;let o=n.filter((r)=>typeof r==="string").map((r)=>r.trim()).filter((r)=>r.length>0);return o.length>0?o:void 0}function Bn(n){let o=Zn(n.providerIds),r=Zn(n.modelIds);return{...n,...o?{providerIds:o}:{},...r?{modelIds:r}:{}}}function ao(n,o){let r=Vn(n,o),s=n.manifest;if(!s||typeof s!=="object")throw Error(`Invalid manifest for extension "${r}": manifest is required`);if(!Array.isArray(s.capabilities)||s.capabilities.length===0)throw Error(`Invalid manifest for extension "${r}": capabilities must be a non-empty array`);let d=new Set;for(let u of s.capabilities){if(!vo.has(u))throw Error(`Invalid manifest for extension "${r}": unsupported capability "${String(u)}"`);d.add(u)}if(Object.hasOwn(s,"providerIds")&&!Xn(s.providerIds))throw Error(`Invalid manifest for extension "${r}": providerIds must be a string array when provided`);if(Object.hasOwn(s,"modelIds")&&!Xn(s.modelIds))throw Error(`Invalid manifest for extension "${r}": modelIds must be a string array when provided`);let y=d.has("hooks");if(n.hooks!==void 0&&!y)throw Error(`Invalid manifest for extension "${r}": runtime hooks require the "hooks" capability`);return{capabilities:d,raw:Bn(s)}}function po(n,o){if(!n||typeof n!=="object")throw Error(`Invalid automation event contribution for extension "${o}": expected object`);let r=typeof n.eventType==="string"?n.eventType.trim():"",s=typeof n.source==="string"?n.source.trim():"";if(!r)throw Error(`Invalid automation event contribution for extension "${o}": eventType is required`);if(!s)throw Error(`Invalid automation event contribution for extension "${o}": source is required`);return{...n,eventType:r,source:s,examples:n.examples?[...n.examples]:void 0,metadata:n.metadata?{...n.metadata}:void 0}}class z{extensions;registry={tools:[],commands:[],rules:[],messageBuilder:[],providers:[],automationEventTypes:[]};normalized=[];phase="resolve";setupContext;constructor(n={}){this.extensions=n.extensions??[],this.setupContext=n.setupContext??{}}resolve(){if(this.phase!=="resolve")return;this.normalized=this.extensions.map((n,o)=>({extension:n,order:o,manifest:{capabilities:new Set,raw:n.manifest}})),this.phase="validate"}validate(){if(this.phase==="resolve")this.resolve();if(this.phase!=="validate")return;this.normalized=this.normalized.map((n)=>({...n,manifest:ao(n.extension,n.order)})),this.phase="setup"}async setup(){if(this.phase==="resolve")this.resolve();if(this.phase==="validate")this.validate();if(this.phase!=="setup")return;for(let n of this.normalized){let{extension:o}=n;if(o.disabled)continue;let r=Vn(o,n.order),s={registerTool:(y)=>this.registry.tools.push(y),registerCommand:(y)=>this.registry.commands.push(y),registerRule:(y)=>{if(!n.manifest.capabilities.has("rules"))throw Error(`Invalid setup for extension "${r}": registerRule requires the "rules" capability`);this.registry.rules.push(y)},registerMessageBuilder:(y)=>this.registry.messageBuilder.push(y),registerProvider:(y)=>this.registry.providers.push(y),registerAutomationEventType:(y)=>{if(!n.manifest.capabilities.has("automationEvents"))throw Error(`Invalid setup for extension "${r}": registerAutomationEventType requires the "automationEvents" capability`);this.registry.automationEventTypes.push(po(y,r))}},d=n.manifest.capabilities.has("automationEvents")?this.setupContext:{...this.setupContext,automation:void 0};await o.setup?.(s,d)}this.phase="activate"}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(){this.resolve(),this.validate(),await this.setup(),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]}}getRegisteredTools(){return[...this.registry.tools]}getRegisteredRules(){return[...this.registry.rules]}getRegisteredAutomationEventTypes(){return[...this.registry.automationEventTypes]}getValidatedExtensions(){if(this.phase==="resolve")this.resolve();if(this.phase==="validate")this.validate();return this.normalized.slice().sort((n,o)=>n.order-o.order).map(({extension:n})=>n)}}function xo(n={}){return new z(n)}var zo=[".js",".ts"];import{z as e}from"zod";var Jn=e.enum(["agent_start","agent_resume","agent_abort","agent_end","agent_error","tool_call","tool_result","prompt_submit","pre_compact","session_shutdown"]),Z=e.record(e.string(),e.string()),nr=e.object({toolName:e.string(),parameters:Z}),or=e.object({toolName:e.string(),parameters:Z,result:e.string(),success:e.boolean(),executionTimeMs:e.number()}),rr=e.object({prompt:e.string(),attachments:e.array(e.string())}),fr=e.object({taskMetadata:Z}),lr=e.object({taskMetadata:Z,previousState:Z}),gr=e.object({taskMetadata:Z}),sr=e.object({taskMetadata:Z}),dr=e.object({taskId:e.string(),ulid:e.string(),contextSize:e.number(),compactionStrategy:e.string(),previousApiReqIndex:e.number(),tokensIn:e.number(),tokensOut:e.number(),tokensInCache:e.number(),tokensOutCache:e.number(),deletedRangeStart:e.number(),deletedRangeEnd:e.number(),contextJsonPath:e.string(),contextRawPath:e.string()}),Qn=e.object({clineVersion:e.string(),hookName:Jn,timestamp:e.string(),taskId:e.string(),sessionContext:e.object({rootSessionId:e.string().optional(),hookLogPath:e.string().optional()}).optional(),workspaceRoots:e.array(e.string()),workspaceInfo:e.custom().optional(),userId:e.string(),agent_id:e.string(),parent_agent_id:e.string().nullable(),iteration:e.number().optional(),reason:e.string().optional(),tool_call:e.object({id:e.string(),name:e.string(),input:e.unknown()}).optional(),tool_result:e.custom().optional(),turn:e.unknown().optional(),error:e.object({name:e.string(),message:e.string(),stack:e.string().optional()}).optional(),preToolUse:nr.optional(),postToolUse:or.optional(),userPromptSubmit:rr.optional(),taskStart:fr.optional(),taskResume:lr.optional(),taskCancel:gr.optional(),taskComplete:sr.optional(),preCompact:dr.optional()}).passthrough();function er(n){let o=Qn.safeParse(n);if(!o.success)return;return o.data}var Cf=30000,Nf=5000;function wr(n){switch(n){case"run.start":case"session.send_input":return null;default:return 30000}}function Kf(n,o){return o===void 0?wr(n):o}var yr=["readFile","search","bash","webFetch","editor","applyPatch","skills","askQuestion","submit"],Er=new Set(yr);function Of(n){return typeof n==="string"&&Er.has(n)}var hf="tool_executor.",vf="custom_tool.",af="hook.",pf="compaction.compact",xf="checkpoint.create",zf="mistake_limit.decide",nl="user_instructions.snapshot";function nn(n,o){return`<file_content path="${n}">
2
+ ${o}
3
+ </file_content>`}function $r(n,o="act"){return`<user_input mode="${o}">${n}</user_input>`}function tr(n,o){return`<user_command slash="${o}">${n}</user_command>`}function cr(n,o){let r=n.trim(),s=new RegExp(`^<${o}\\b([^>]*)>([\\s\\S]*?)<\\/${o}>$`,"i").exec(r);if(!s)return;return{attrs:s[1]??"",content:s[2]??""}}function ur(n,o){return new RegExp(`${o}="([^"]+)"`,"i").exec(n)?.[1]?.trim()||void 0}function Tn(n){if(!n?.trim())return;let o=cr(n,"user_command");if(!o)return;let r=ur(o.attrs,"slash");if(!r)return;return{slash:r,content:o.content.trim()}}function jn(n){if(!n?.trim())return"";let o=n.trim();for(let r of["user_input","user_command"]){let s=Wn(o,r);o=(s!==o?s:o.replace(new RegExp(`<${r}[^>]*>`,"g"),"")).trim()}return o}function _r(n){let o=jn(n),r=Tn(n);if(!r)return o;if(r.slash.toLowerCase()==="team"){let d=o.toLowerCase().startsWith("spawn a team of agents for the following task:")?o.slice(46).trim():o;return d?`/team ${d}`:"/team"}return o?`/${r.slash} ${o}`:`/${r.slash}`}function Wn(n,o){if(!n?.trim())return"";if(!o)return n;let r=new RegExp(`<${o}\\b[^>]*>([\\s\\S]*?)</${o}>`,"g");return n.replace(r,"$1")}function mn(n,o){let r=n[n.length-1];if(o.role==="tool"&&r?.role==="tool"&&Array.isArray(r.content)&&Array.isArray(o.content)){r.content.push(...o.content);return}n.push(o)}function Rr(n){if(!Array.isArray(n)||n.length===0)return!1;return n.every((o)=>{if(!o||typeof o!=="object")return!1;let r=o;if(r.type==="text")return typeof r.text==="string";if(r.type==="image")return typeof r.data==="string"&&typeof r.mediaType==="string";return!1})}function on(n,o){if(n==null||typeof n!=="object")return n;if(Array.isArray(n)){let d=[];for(let y of n){if(y&&typeof y==="object"){let E=y;if(E.type==="image"&&typeof E.data==="string"&&typeof E.mediaType==="string"){o.push({type:"image",data:E.data,mediaType:E.mediaType});continue}if(E.type==="text"&&typeof E.text==="string"){d.push(E.text);continue}}d.push(on(y,o))}return d}let r=n,s={};for(let[d,y]of Object.entries(r))s[d]=on(y,o);return s}function Mn(n,o=!1){if(typeof n==="string")return{type:o?"error-text":"text",value:n};if(!o&&Rr(n))return{type:"content",value:n.map((r)=>r.type==="image"?{type:"image-data",data:r.data,mediaType:r.mediaType}:{type:"text",text:r.text})};if(!o&&n!==null&&typeof n==="object"){let r=[],s=on(n,r);if(r.length>0)return{type:"content",value:[{type:"text",text:typeof s==="string"?s:JSON.stringify(s)},...r.map((y)=>({type:"image-data",data:y.data,mediaType:y.mediaType}))]}}if(n===null||typeof n==="boolean"||typeof n==="number"||typeof n==="object")return{type:o?"error-json":"json",value:n};return{type:o?"error-text":"text",value:String(n)}}function br(n,o,r){let s=r?.assistantToolCallArgKey??"input",d=[];if(typeof n==="string"&&n.trim().length>0||Array.isArray(n)&&n.length>0)d.push({role:"system",content:n});for(let y of o){let E=y.content;if(typeof E==="string"){d.push({role:y.role,content:E});continue}let u=[],L=[];for(let _ of E)switch(_.type){case"text":u.push({type:"text",text:_.text});break;case"reasoning":u.push({type:"reasoning",text:_.text,..._.providerOptions?{providerOptions:_.providerOptions}:{}});break;case"image":u.push({type:"image",image:_.image,mediaType:_.mediaType});break;case"file":u.push({type:"text",text:nn(_.path,_.content)});break;case"tool-call":if(y.role==="assistant")u.push({type:"tool-call",toolCallId:_.toolCallId,toolName:_.toolName,[s]:_.input,..._.providerOptions?{providerOptions:_.providerOptions}:{}});break;case"tool-result":L.push({type:"tool-result",toolCallId:_.toolCallId,toolName:_.toolName,output:Mn(_.output,_.isError??!1)});break}if(u.length>0)mn(d,{role:y.role,content:u});if(L.length>0)mn(d,{role:"tool",content:L})}return d}var W={xhigh:0.95,high:0.8,medium:0.5,low:0.2,minimal:0.1,none:0},kr=void 0;function Ir(n,o){if(typeof n==="string"&&n.toLowerCase()in W)return n.toLowerCase();return o?void 0:void 0}function Sn(n,o){let r=typeof n==="string"?n.toLowerCase():void 0;if(r&&r in W)return W[r];if(o?.fallbackEffort)return W[o.fallbackEffort];return}function Hr(n){let o=Sn(n.effort,{fallbackEffort:n.fallbackEffort});if(o===void 0)return;if(o<=0)return 0;let r=n.minimumBudget??1;if(n.maxBudget<r)return;let s=n.scaleTokens??n.maxBudget;return Math.min(Math.max(Math.floor(s*o),r),n.maxBudget)}var Lr={"HTTP-Referer":"https://cline.bot","X-Title":"Cline","X-IS-MULTIROOT":"false","X-CLIENT-TYPE":"cline-sdk"};function Fr(n){return n instanceof Error?{name:n.name,message:n.message}:n}var qr={debug:()=>{},log:()=>{},error:()=>{}};class Y extends Error{constructor(n,o){super(`${n} at position ${o}`);this.position=o}}function Cn(n){return/^[0-9A-Fa-f]$/.test(n)}function G(n){return n>="0"&&n<="9"}function Nn(n){return n>=" "}function m(n){return`,:[]/{}()
4
+ +`.includes(n)}function rn(n){return n>="a"&&n<="z"||n>="A"&&n<="Z"||n==="_"||n==="$"}function fn(n){return n>="a"&&n<="z"||n>="A"&&n<="Z"||n==="_"||n==="$"||n>="0"&&n<="9"}var ln=/^(http|https|ftp|mailto|file|data|irc):\/\/$/,gn=/^[A-Za-z0-9-._~:/?#@!$&'()*+;=]$/;function sn(n){return`,[]/{}
5
+ +`.includes(n)}function dn(n){return M(n)||Pr.test(n)}var Pr=/^[[{\w-]$/;function Kn(n){return n===`
6
+ `||n==="\r"||n==="\t"||n==="\b"||n==="\f"}function A(n,o){let r=n.charCodeAt(o);return r===32||r===10||r===9||r===13}function On(n,o){let r=n.charCodeAt(o);return r===32||r===9||r===13}function hn(n,o){let r=n.charCodeAt(o);return r===160||r===6158||r>=8192&&r<=8203||r===8239||r===8287||r===12288||r===65279}function M(n){return en(n)||O(n)}function en(n){return n==='"'||n==="“"||n==="”"}function wn(n){return n==='"'}function O(n){return n==="'"||n==="‘"||n==="’"||n==="`"||n==="´"}function yn(n){return n==="'"}function Q(n,o){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=n.lastIndexOf(o);return s!==-1?n.substring(0,s)+(r?"":n.substring(s+1)):n}function F(n,o){let r=n.length;if(!A(n,r-1))return n+o;while(A(n,r-1))r--;return n.substring(0,r)+o+n.substring(r)}function vn(n,o,r){return n.substring(0,o)+n.substring(o+r)}function an(n){return/[,\n][ \t\r]*$/.test(n)}var Ur={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},ir={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
7
+ `,r:"\r",t:"\t"};function En(n){let o=0,r="";if(_(["```","[```","{```"]),!y())To();_(["```","```]","```}"]);let d=V(",");if(d)E();if(dn(n[o])&&an(r)){if(!d)r=F(r,",");Zo()}else if(d)r=Q(r,",");while(n[o]==="}"||n[o]==="]")o++,E();if(o>=n.length)return r;Qo();function y(){E();let w=Go()||Xo()||B()||I()||Vo()||kn(!1)||Bo();return E(),w}function E(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=o,c=u(w);do if(c=L(),c)c=u(w);while(c);return o>t}function u(w){let t=w?A:On,c="";while(!0)if(t(n,o))c+=n[o],o++;else if(hn(n,o))c+=" ",o++;else break;if(c.length>0)return r+=c,!0;return!1}function L(){if(n[o]==="/"&&n[o+1]==="*"){while(o<n.length&&!Dr(n,o))o++;return o+=2,!0}if(n[o]==="/"&&n[o+1]==="/"){while(o<n.length&&n[o]!==`
8
+ `)o++;return!0}return!1}function _(w){if(S(w)){if(rn(n[o]))while(o<n.length&&fn(n[o]))o++;return E(),!0}return!1}function S(w){u(!0);for(let t of w){let c=o+t.length;if(n.slice(o,c)===t)return o=c,!0}return!1}function V(w){if(n[o]===w)return r+=n[o],o++,!0;return!1}function i(w){if(n[o]===w)return o++,!0;return!1}function Ao(){return i("\\")}function Rn(){if(E(),n[o]==="."&&n[o+1]==="."&&n[o+2]===".")return o+=3,E(),i(","),!0;return!1}function Go(){if(n[o]==="{"){if(r+="{",o++,E(),i(","))E();let w=!0;while(o<n.length&&n[o]!=="}"){let t;if(!w){if(t=V(","),!t)r=F(r,",");E()}else t=!0,w=!1;if(Rn(),!(B()||kn(!0))){if(n[o]==="}"||n[o]==="{"||n[o]==="]"||n[o]==="["||n[o]===void 0)r=Q(r,",");else jo();break}E();let N=V(":"),X=o>=n.length;if(!N)if(dn(n[o])||X)r=F(r,":");else Hn();if(!y())if(N||X)r+="null";else Hn()}if(n[o]==="}")r+="}",o++;else r=F(r,"}");return!0}return!1}function Xo(){if(n[o]==="["){if(r+="[",o++,E(),i(","))E();let w=!0;while(o<n.length&&n[o]!=="]"){if(!w){if(!V(","))r=F(r,",")}else w=!1;if(Rn(),!y()){r=Q(r,",");break}}if(n[o]==="]")r+="]",o++;else r=F(r,"]");return!0}return!1}function Zo(){let w=!0,t=!0;while(t){if(!w){if(!V(","))r=F(r,",")}else w=!1;t=y()}if(!t)r=Q(r,",");r=`[
9
+ ${r}
10
+ ]`}function B(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1,c=n[o]==="\\";if(c)o++,c=!0;if(M(n[o])){let N=wn(n[o])?wn:yn(n[o])?yn:O(n[o])?O:en,X=o,j=r.length,k='"';o++;while(!0){if(o>=n.length){let H=In(o-1);if(!w&&m(n.charAt(H)))return o=X,r=r.substring(0,j),B(!0);return k=F(k,'"'),r+=k,!0}if(o===t)return k=F(k,'"'),r+=k,!0;if(N(n[o])){let H=o,p=k.length;if(k+='"',o++,r+=k,E(!1),w||o>=n.length||m(n[o])||M(n[o])||G(n[o]))return bn(),!0;let D=In(H-1),Ln=n.charAt(D);if(Ln===",")return o=X,r=r.substring(0,j),B(!1,D);if(m(Ln))return o=X,r=r.substring(0,j),B(!0);r=r.substring(0,j),o=H+1,k=`${k.substring(0,p)}\\${k.substring(p)}`}else if(w&&sn(n[o])){if(n[o-1]===":"&&ln.test(n.substring(X+1,o+2)))while(o<n.length&&gn.test(n[o]))k+=n[o],o++;return k=F(k,'"'),r+=k,bn(),!0}else if(n[o]==="\\"){let H=n.charAt(o+1);if(ir[H]!==void 0)k+=n.slice(o,o+2),o+=2;else if(H==="u"){let D=2;while(D<6&&Cn(n[o+D]))D++;if(D===6)k+=n.slice(o,o+6),o+=6;else if(o+D>=n.length)o=n.length;else Wo()}else if(H===`
11
+ `)k+="\\n",o+=2;else k+=H,o+=2}else{let H=n.charAt(o);if(H==='"'&&n[o-1]!=="\\")k+=`\\${H}`,o++;else if(Kn(H))k+=Ur[H],o++;else{if(!Nn(H))Jo(H);k+=H,o++}}if(c)Ao()}}return!1}function bn(){let w=!1;E();while(n[o]==="+"){w=!0,o++,E(),r=Q(r,'"',!0);let t=r.length;if(B())r=vn(r,t,1);else r=F(r,'"')}return w}function I(){let w=o;if(n[o]==="-"){if(o++,C())return a(w),!0;if(!G(n[o]))return o=w,!1}while(G(n[o]))o++;if(n[o]==="."){if(o++,C())return a(w),!0;if(!G(n[o]))return o=w,!1;while(G(n[o]))o++}if(n[o]==="e"||n[o]==="E"){if(o++,n[o]==="-"||n[o]==="+")o++;if(C())return a(w),!0;if(!G(n[o]))return o=w,!1;while(G(n[o]))o++}if(!C())return o=w,!1;if(o>w){let t=n.slice(w,o),c=/^0\d/.test(t);return r+=c?`"${t}"`:t,!0}return!1}function Vo(){return J("true","true")||J("false","false")||J("null","null")||J("True","true")||J("False","false")||J("None","null")}function J(w,t){if(n.slice(o,o+w.length)===w)return r+=t,o+=w.length,!0;return!1}function kn(w){let t=o;if(rn(n[o])){while(o<n.length&&fn(n[o]))o++;let c=o;while(A(n,c))c++;if(n[c]==="("){if(o=c+1,y(),n[o]===")"){if(o++,n[o]===";")o++}return!0}}while(o<n.length&&!sn(n[o])&&!M(n[o])&&(!w||n[o]!==":"))o++;if(n[o-1]===":"&&ln.test(n.substring(t,o+2)))while(o<n.length&&gn.test(n[o]))o++;if(o>t){while(A(n,o-1)&&o>0)o--;let c=n.slice(t,o);if(r+=c==="undefined"?"null":JSON.stringify(c),n[o]==='"')o++;return!0}}function Bo(){if(n[o]==="/"){let w=o;o++;while(o<n.length&&(n[o]!=="/"||n[o-1]==="\\"))o++;return o++,r+=JSON.stringify(n.substring(w,o)),!0}}function In(w){let t=w;while(t>0&&A(n,t))t--;return t}function C(){return o>=n.length||m(n[o])||A(n,o)}function a(w){r+=`${n.slice(w,o)}0`}function Jo(w){throw new Y(`Invalid character ${JSON.stringify(w)}`,o)}function Qo(){throw new Y(`Unexpected character ${JSON.stringify(n[o])}`,o)}function To(){throw new Y("Unexpected end of json string",n.length)}function jo(){throw new Y("Object key expected",o)}function Hn(){throw new Y("Colon expected",o)}function Wo(){let w=n.slice(o,o+6);throw new Y(`Invalid unicode character "${w}"`,o)}}function Dr(n,o){return n[o]==="*"&&n[o+1]==="/"}var Yr=/^\{\s*"([A-Za-z0-9_.$-]+)"\s*:\s*([\s\S]+?)\s*\}$/;function Ar(n){let o=n.match(Yr);if(!o)return;let[,r,s]=o,d=s.trim();if(!d)return;let y=d[0];if(y==='"'||y==="{"||y==="["||d==="true"||d==="false"||d==="null"||Number.isFinite(Number(d)))return;return JSON.parse(`{"${r}":${JSON.stringify(d)}}`)}var Gr=[(n)=>JSON.parse(n),(n)=>JSON.parse(En(n)),Ar];function Xr(n){if(typeof n!=="string")return n;let o=n.trimStart();if(o[0]!=="{"&&o[0]!=="[")return n;for(let r of Gr)try{let s=r(o);if(s!==void 0)return s}catch{}return n}function Zr(n){let o=new WeakSet;try{return JSON.stringify(n,(s,d)=>{if(typeof d==="bigint")return d.toString();if(d&&typeof d==="object"){if(o.has(d))return"[Circular]";o.add(d)}return d})??"null"}catch{return String(n)}}function Vr(n){try{return JSON.parse(n)}catch{return}}function Br(n){let o=n.replaceAll("\\","/"),r=o.lastIndexOf("/");return(r>=0?o.slice(r+1):o).toLowerCase()}function Jr(n){return n==="win32"?"powershell":"/bin/bash"}function Qr(n,o){let r=Br(n);if(r==="powershell"||r==="powershell.exe"||r==="pwsh"||r==="pwsh.exe")return["-NoProfile","-NonInteractive","-Command",o];if(r==="cmd"||r==="cmd.exe")return["/d","/s","/c",o];return["-c",o]}function Tr(n){return n.toLowerCase().replace(/[^\w.-]+/g,"_")}function pn(n,o){if(n.length<=o)return n;return`${n.slice(0,o-1)}…`}function jr(n,o="/",r=100){if(!n||n.length<=r)return n||"";let s=n.split(o)?.shift()?.trim()?.slice(0,r-1);return s?`${s}…`:pn(n,r)}function Wr(n){if(n.length<=8)return"****";return`${n.slice(0,4)}...${n.slice(-4)}`}function mr(n){if(!n)return"(unknown-date)";let o=new Date(n);if(Number.isNaN(o.getTime()))return n;return o.toLocaleString("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0})}function Mr(n){let o=Math.max(0,Math.floor(n/1000)),r=Math.floor(o/86400),s=Math.floor(o%86400/3600),d=Math.floor(o%3600/60),y=o%60;if(r>0)return`${r}d ${s}h`;if(s>0)return`${s}h ${d}m`;if(d>0)return`${d}m ${y}s`;return`${y}s`}import{z as xn}from"zod";function Sr(n,o){let r=n.safeParse(o);if(!r.success)throw Error(xn.prettifyError(r.error));return r.data}function $n(n){return xn.toJSONSchema(n)}var zn=`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.
12
+
13
+ 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.
14
+ Review each question carefully and answer it with detailed, accurate information.
15
+ If you need more information, use one of the available tools or ask for clarification instead of making assumptions or lies.
16
+
17
+ Environment you are running in:
18
+ <env>
19
+ 1. Platform: {{PLATFORM_NAME}}
20
+ 2. Date: {{CURRENT_DATE}}
21
+ 3. IDE: {{IDE_NAME}}
22
+ 4. Working Directory: {{CWD}}
23
+ </env>
24
+
25
+ Remember:
26
+ - Always adhere to existing code conventions and patterns.
27
+ - Use only libraries and frameworks that are confirmed to be in use in the current codebase.
28
+ - Provide complete and functional code without omissions or placeholders.
29
+ - Be explicit about any assumptions or limitations in your solution.
30
+ - 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.
31
+ - Always use absolute paths when referring to files.
32
+ - Always verify the files you have edited or created at the end of the task to ensure they are completed and working as expected.
33
+
34
+ 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.
35
+
36
+ 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.
37
+
38
+ IMPORTANT: Always includes tool calls in your response until the task is completed. Response without tool calls will considered as completed with final answer.
39
+
40
+ 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.
41
+
42
+ If user asked a simple question without any coding context, answer it directly without using any tools.
43
+ {{CLINE_RULES}}
44
+ {{CLINE_METADATA}}`,no=`You are Cline, a careful and helpful coding agent that works in the background.
45
+ You are tasked to solve an issue reported by the user who you cannot communicate with directly.
46
+ 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.
47
+
48
+ RULES:
49
+ - Always adhere to existing code conventions and patterns.
50
+ - Use only libraries and frameworks that are confirmed and compatible to be in use in the current codebase.
51
+ - Provide complete and functional code without omissions or placeholders.
52
+ - 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 request.
53
+ - Always use absolute paths when referring to files.
54
+ - Always verify the files you have edited or created at the end of the task to ensure they are completed and working as expected.
55
+
56
+ Environment you are running in:
57
+ <env>
58
+ 1. Platform: {{PLATFORM_NAME}}
59
+ 2. Date: {{CURRENT_DATE}}
60
+ 3. IDE: {{IDE_NAME}}
61
+ 4. Working Directory: {{CWD}}
62
+ </env>
63
+
64
+ IMPORTANT:
65
+ 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.
66
+ A correct fix means the underlying behavior is fixed — not just the symptoms addressed superficially.
67
+ After applying your fix, you must run the relevant test suite to confirm your changes actually resolve the problem. If tests fail, analyze the failures, revise your fix, and re-run until tests pass.
68
+ Do not consider the task complete until tests pass.
69
+ 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.
70
+ Response without the submit_and_exit tool call will considered not completed and the task will continue.
71
+ {{CLINE_RULES}}
72
+ {{CLINE_METADATA}}`;var tn="# Workspace Configuration";function oo(n,o,r){if(r?.trim()?.includes(tn))return r.trim();let s=r||JSON.stringify({workspaces:{[n]:{hint:o||n.split("/").at(-1)||n}}},null,2);return`
73
+ ${tn}
74
+ ${s}`}function Cr(n){let{ide:o="Terminal Shell",mode:r,platform:s="unknown",workspaceName:d,metadata:y,rules:E,overridePrompt:u,providerId:L}=n,_=n.workspaceRoot??n.rootPath??"",S=L==="cline";if(u?.trim()){let i=u.trim();if(S&&y?.trim()&&!i.includes(tn))return`${i}
75
+
76
+ ${oo(_,d,y)}`.trim();return i}return(r==="yolo"?no:zn).replace("{{PLATFORM_NAME}}",s).replace("{{CWD}}",_).replace("{{CURRENT_DATE}}",new Date().toLocaleDateString()).replace("{{IDE_NAME}}",o).replace("{{CLINE_METADATA}}",S?oo(_,d,y):"").replace("{{CLINE_RULES}}",E||"").trim()}var Nr="remote://";import{z as l}from"zod";var ro=l.object({id:l.string(),temperature:l.number().optional(),isR1FormatRequired:l.boolean().optional(),maxTokens:l.number().optional(),contextWindow:l.number().optional(),inputPrice:l.number().optional(),outputPrice:l.number().optional(),supportsImages:l.boolean().optional()}),fo=l.object({models:l.array(ro).optional(),openAiBaseUrl:l.string().optional(),openAiHeaders:l.record(l.string(),l.string()).optional(),azureApiVersion:l.string().optional(),azureIdentity:l.boolean().optional()}),lo=l.object({id:l.string(),thinkingBudgetTokens:l.number().optional()}),go=l.object({name:l.string(),baseModelId:l.string(),thinkingBudgetTokens:l.number().optional()}),so=l.object({models:l.array(lo).optional(),customModels:l.array(go).optional(),awsRegion:l.string().optional(),awsUseCrossRegionInference:l.boolean().optional(),awsUseGlobalInference:l.boolean().optional(),awsBedrockUsePromptCache:l.boolean().optional(),awsBedrockEndpoint:l.string().optional()}),eo=l.object({id:l.string()}),wo=l.object({models:l.array(eo).optional()}),yo=l.object({id:l.string(),thinkingBudgetTokens:l.number().optional()}),Eo=l.object({models:l.array(yo).optional(),vertexProjectId:l.string().optional(),vertexRegion:l.string().optional()}),$o=l.object({id:l.string(),thinkingBudgetTokens:l.number().optional(),promptCachingEnabled:l.boolean().optional()}),to=l.object({models:l.array($o).optional(),baseUrl:l.string().optional()}),co=l.object({id:l.string(),thinkingBudgetTokens:l.number().optional()}),uo=l.object({models:l.array(co).optional(),baseUrl:l.string().optional()}),Kr=l.object({OpenAiCompatible:fo.optional(),AwsBedrock:so.optional(),Cline:wo.optional(),Vertex:Eo.optional(),LiteLLM:to.optional(),Anthropic:uo.optional()}),_o=l.object({id:l.string()}),Ro=l.object({name:l.string(),url:l.string(),alwaysEnabled:l.boolean().optional(),headers:l.record(l.string(),l.string()).optional()}),cn=l.object({alwaysEnabled:l.boolean(),name:l.string(),contents:l.string()}),h=l.object({bucket:l.string(),accessKeyId:l.string(),secretAccessKey:l.string(),region:l.string().optional(),endpoint:l.string().optional(),accountId:l.string().optional()}),bo=l.object({enabled:l.boolean().optional(),type:l.union([l.literal("s3_access_keys"),l.literal("r2_access_keys"),l.literal("azure_access_keys")]).optional(),s3AccessSettings:h.optional(),r2AccessSettings:h.optional(),azureAccessSettings:h.optional()}),ko=l.object({promptUploading:bo.optional()}),Or=l.object({version:l.string(),providerSettings:Kr.optional(),telemetryEnabled:l.boolean().optional(),kanbanEnabled:l.boolean().optional(),mcpMarketplaceEnabled:l.boolean().optional(),allowedMCPServers:l.array(_o).optional(),remoteMCPServers:l.array(Ro).optional(),blockPersonalRemoteMCPServers:l.boolean().optional(),yoloModeAllowed:l.boolean().optional(),openTelemetryEnabled:l.boolean().optional(),openTelemetryMetricsExporter:l.string().optional(),openTelemetryLogsExporter:l.string().optional(),openTelemetryOtlpProtocol:l.string().optional(),openTelemetryOtlpEndpoint:l.string().optional(),openTelemetryOtlpHeaders:l.record(l.string(),l.string()).optional(),openTelemetryOtlpMetricsProtocol:l.string().optional(),openTelemetryOtlpMetricsEndpoint:l.string().optional(),openTelemetryOtlpMetricsHeaders:l.record(l.string(),l.string()).optional(),openTelemetryOtlpLogsProtocol:l.string().optional(),openTelemetryOtlpLogsEndpoint:l.string().optional(),openTelemetryOtlpLogsHeaders:l.record(l.string(),l.string()).optional(),openTelemetryMetricExportInterval:l.number().optional(),openTelemetryOtlpInsecure:l.boolean().optional(),openTelemetryLogBatchSize:l.number().optional(),openTelemetryLogBatchTimeout:l.number().optional(),openTelemetryLogMaxQueueSize:l.number().optional(),enterpriseTelemetry:ko.optional(),globalRules:l.array(cn).optional(),globalWorkflows:l.array(cn).optional()}),hr=l.record(l.string(),l.string());var vr=4317;var ar="127.0.0.1:4317";import un from"zod";var pr=un.enum(["reasoning","prompt-cache","tools","provider-tools","oauth","temperature","files","streaming","vision","computer-use","local-auth"]),xr=un.enum(["anthropic","gemini","openai-chat","openai-responses","openai-r1","ai-sdk"]),zr=un.enum(["anthropic","ai-sdk","ai-sdk-community","openai","openai-compatible","openai-r1","gemini","bedrock","custom","fetch","vertex"]);var nf="runtime.team.progress.v1",of="runtime.team.lifecycle.v1";function Io(n){let o={};if(!n)return o;try{n.split(",").forEach((r)=>{let s=r.indexOf("=");if(s<=0)return;let d=decodeURIComponent(r.substring(0,s).trim()),y=decodeURIComponent(r.substring(s+1).trim());if(!d||!y)return;o[d]=y})}catch{}return o}function rf(){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?Io(process?.env?.OTEL_EXPORTER_OTLP_HEADERS):void 0}}function Ho(n={}){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",...n}}function ff(n={}){return{...rf(),...n,metadata:Ho(n.metadata)}}function Lo(n){let o=n?.trim();return o?o:void 0}function lf(n,o){if(!n)return;let r=typeof n==="function"?n(o):n;if(!r)return;let s=Lo(r.rootSessionId);if(!s)return;return{rootSessionId:s}}function gf(n){return Lo(n?.rootSessionId)}var sf=(n)=>crypto.getRandomValues(new Uint8Array(n)),df=(n,o,r)=>{let s=256-256%n.length;if(s===256){let y=n.length-1;return(E=o)=>{if(!E)return"";let u="";while(!0){let L=r(E),_=E;while(_--)if(u+=n[L[_]&y],u.length>=E)return u}}}let d=Math.ceil(409.6*o/s);return(y=o)=>{if(!y)return"";let E="";while(!0){let u=r(d),L=d;while(L--)if(u[L]<s){if(E+=n[u[L]%n.length],E.length>=y)return E}}}},Fo=(n,o=21)=>df(n,o|0,sf);function ef(n="",o=""){let r=Fo("1234567890abcdefghijklmnopqrstuvwxyz",10);return`${n}${Date.now()}_${r(5)}${o}`}var wf=["running","completed","failed","cancelled"];var _n=["rules","skills","workflows","plugins"],qo=_n,yf=new Set(_n);function Po(n){return typeof n==="string"&&yf.has(n)}function Ef(n){if(!Array.isArray(n))return;let o=n.map((r)=>typeof r==="string"?r.trim():"").filter(Po);return[...new Set(o)]}function $f(n,o){return new Set(n??qo).has(o)}import{z as q}from"zod";var tf=q.object({rootPath:q.string().min(1),hint:q.string().min(1).optional(),associatedRemoteUrls:q.array(q.string().min(1)).optional(),latestGitCommitHash:q.string().min(1).optional(),latestGitBranchName:q.string().min(1).optional()}),cf=q.object({currentWorkspacePath:q.string().min(1).optional(),workspaces:q.record(q.string().min(1),tf)});function Cl(){return{workspaces:{}}}function Nl(n,o){let r={...n,workspaces:{...n.workspaces,[o.rootPath]:o}};if(!r.currentWorkspacePath)r.currentWorkspacePath=o.rootPath;return cf.parse(r)}import{z as f}from"zod";var uf=["current_state","boundary_analysis","interface_proposal"],hl=3600000,vl=240,al=400,P=f.preprocess((n)=>n instanceof Date?n.toISOString():n,f.string().datetime()),T=f.enum(["pending","in_progress","blocked","completed"]),Uo=f.enum(["queued","running","completed","failed","cancelled","interrupted"]),v=f.enum(["draft","in_review","finalized"]),_f=f.object({agentId:f.string(),role:f.enum(["lead","teammate"]),description:f.string().optional(),status:f.enum(["idle","running","stopped"])}),pl=f.object({agentId:f.string(),rolePrompt:f.string(),modelId:f.string().optional(),maxIterations:f.number().optional()});function b(n){return f.preprocess((o)=>o===null?void 0:o,n.optional())}var xl=f.object({agentId:f.string().min(1).describe("Teammate identifier"),rolePrompt:f.string().min(1).describe("System prompt describing teammate role")}).strict(),zl=f.object({agentId:f.string().min(1).describe("Teammate identifier"),reason:b(f.string().min(1)).describe("Optional shutdown reason")}),ng=f.object({}),Rf={create:["title","description"],list:[],claim:["taskId"],complete:["taskId","summary"],block:["taskId","reason"]},og={create:["status","taskId","summary","reason"]},rg=f.object({action:f.enum(["create","list","claim","complete","block"]),title:b(f.string().min(1)).describe("Task title"),description:b(f.string().min(1)).describe("Task details"),dependsOn:b(f.array(f.string().describe("Dependency task ID"))).describe("Array of dependency task IDs"),assignee:b(f.string().min(1)).describe("Optional assignee"),status:b(f.enum(["pending","in_progress","blocked","completed"])).describe("Optional task status filter"),taskId:b(f.string()).describe("Task ID"),summary:b(f.string().min(1)).describe("Completion summary"),reason:b(f.string().min(1)).describe("Blocking reason")}).superRefine((n,o)=>{for(let r of Rf[n.action]){if(n[r]!==void 0)continue;o.addIssue({code:"custom",path:[r],message:`Field "${r}" is required when action=${n.action}`})}}),fg=f.object({agentId:f.string().describe("Teammate agent ID"),task:f.string().min(1).describe("Task instructions for the teammate"),taskId:b(f.string()).describe("Optional shared task list ID"),runMode:b(f.enum(["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:b(f.boolean()).describe("If true, continue the teammate conversation; otherwise start fresh")}),lg=f.object({status:b(f.enum(["queued","running","completed","failed","cancelled","interrupted"])).describe("Optional run status filter. Omit to include all statuses."),agentId:b(f.string().min(1)).describe("Optional teammate ID filter. Omit to include all teammates."),includeCompleted:b(f.boolean()).describe("Include completed/failed runs (default true)")}),gg=f.object({runId:f.string().min(1).describe("Run ID"),reason:b(f.string().min(1)).describe("Optional cancellation reason")}),sg=f.object({runId:b(f.string().min(1)).describe("Optional async run ID to await. Omit to wait for all active async runs.")}).strict(),dg=f.object({toAgentId:f.string().min(1).describe("Recipient agent ID"),subject:f.string().min(1).describe("Message subject"),body:f.string().min(1).describe("Message body"),taskId:b(f.string().min(1)).describe("Optional task ID context")}),eg=f.object({subject:f.string().min(1).describe("Message subject"),body:f.string().min(1).describe("Message body"),taskId:b(f.string().min(1)).describe("Optional task ID context")}),wg=f.object({unreadOnly:b(f.boolean()).describe("Only unread messages for read action (default true)")}),yg=f.object({kind:f.enum(["progress","handoff","blocked","decision","done","error"]),summary:f.string().min(1).describe("Update summary"),taskId:b(f.string().min(1)).describe("Optional task ID context"),evidence:b(f.array(f.string().min(1))).describe("Optional evidence links/snippets"),nextAction:b(f.string().min(1)).describe("Planned next step")}),Eg=f.object({}),$g=f.object({title:f.string().describe("Outcome title"),requiredSections:f.array(f.string()).default(uf).describe("Required sections for finalization gate (defaults to current_state,boundary_analysis,interface_proposal)")}),tg=f.object({outcomeId:f.string().describe("Outcome ID"),section:f.string().describe("Section name"),sourceRunId:b(f.string()).describe("Optional source run ID"),content:f.string().describe("Section fragment content")}),cg=f.object({fragmentId:f.string().describe("Fragment ID"),approved:f.boolean().describe("Review decision")}),ug=f.object({outcomeId:f.string().describe("Outcome ID")}),_g=f.object({}),Rg=f.object({teamId:f.string(),teamName:f.string(),members:f.array(_f),taskCounts:f.record(T,f.number()),unreadMessages:f.number(),missionLogEntries:f.number(),activeRuns:f.number(),queuedRuns:f.number(),outcomeCounts:f.record(v,f.number())}),bf=f.object({id:f.string(),title:f.string(),description:f.string(),status:T,createdAt:P,updatedAt:P,createdBy:f.string(),assignee:f.string().optional(),dependsOn:f.array(f.string()),summary:f.string().optional(),isReady:f.boolean(),blockedBy:f.array(f.string())}),bg=f.discriminatedUnion("action",[f.object({action:f.literal("create"),taskId:f.string(),status:T,ignoredFields:f.array(f.string()).optional(),note:f.string().optional()}),f.object({action:f.literal("list"),tasks:f.array(bf)}),f.object({action:f.literal("claim"),taskId:f.string(),status:T,nextStep:f.string()}),f.object({action:f.literal("complete"),taskId:f.string(),status:T}),f.object({action:f.literal("block"),taskId:f.string(),status:T})]),kg=f.object({agentId:f.string(),mode:f.enum(["sync","async"]),status:f.enum(["dispatched","running","queued","joined"]),dispatched:f.boolean(),message:f.string(),deduped:f.boolean().optional(),runId:f.string().optional(),text:f.string().optional(),iterations:f.number().optional()}),kf=f.object({textPreview:f.string(),iterations:f.number(),finishReason:f.string(),durationMs:f.number(),usage:f.object({inputTokens:f.number(),outputTokens:f.number(),cacheReadTokens:f.number().optional(),cacheWriteTokens:f.number().optional(),totalCost:f.number().optional()})}),Ig=f.object({id:f.string(),agentId:f.string(),taskId:f.string().optional(),status:Uo,messagePreview:f.string(),priority:f.number(),retryCount:f.number(),maxRetries:f.number(),nextAttemptAt:P.optional(),continueConversation:f.boolean().optional(),startedAt:P,endedAt:P.optional(),leaseOwner:f.string().optional(),heartbeatAt:P.optional(),lastProgressAt:P.optional(),lastProgressMessage:f.string().optional(),currentActivity:f.string().optional(),error:f.string().optional(),resultSummary:kf.optional()}),Hg=f.object({id:f.string(),teamId:f.string(),fromAgentId:f.string(),toAgentId:f.string(),subject:f.string(),body:f.string(),taskId:f.string().optional(),sentAt:P,readAt:P.optional()}),Lg=f.object({id:f.string(),teamId:f.string(),title:f.string(),status:v,requiredSections:f.array(f.string()),createdBy:f.string(),createdAt:P,finalizedAt:P.optional()}),Fg=f.object({outcomeId:f.string(),status:v,requiredSections:f.array(f.string())}),qg=f.object({agentId:f.string(),status:f.string()}),Pg=f.object({runId:f.string(),status:Uo}),Ug=f.object({id:f.string(),toAgentId:f.string()}),ig=f.object({delivered:f.number()}),Dg=f.object({id:f.string()}),Yg=f.object({status:f.string()}),Ag=f.object({fragmentId:f.string(),status:f.string()}),Gg=f.object({outcomeId:f.string(),status:v});var If;((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"})(If||={});import{z as Hf}from"zod";function Lf(n){let{$schema:o,...r}=n;if(typeof r.type==="string")return r;if("properties"in r||"required"in r||"additionalProperties"in r)return{type:"object",...r};for(let s of["oneOf","anyOf","allOf"]){let d=r[s];if(!Array.isArray(d)||d.length===0)continue;if(s==="allOf"){if(d.some((u)=>u&&typeof u==="object"&&u.type==="object"))return{type:"object",...r};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(d.every((E)=>E&&typeof E==="object"&&E.type==="object"))return{type:"object",...r};throw Error(`Tool inputSchema must describe an object at the top level, but the schema has a top-level "${s}" whose branches include non-object types. Pass the strict object schema as inputSchema and reserve union/coercion schemas for use inside execute().`)}return r}function Ff(n){let o=Lf(n.inputSchema instanceof Hf.ZodType?$n(n.inputSchema):n.inputSchema);return{name:n.name,description:n.description,inputSchema:o,lifecycle:n.lifecycle,timeoutMs:n.timeoutMs??30000,retryable:n.retryable??!0,maxRetries:n.maxRetries??3,execute:n.execute}}var io=["cline","oca","openai-codex"];function Do(n){return io.includes(n)}var Yo=["401","403","unauthorized","forbidden","invalid token","expired token","authentication"];function qf(n,o){if(!Do(o))return!1;let r=n instanceof Error?n.message.toLowerCase():String(n);return Yo.some((s)=>r.includes(s))}export{$n as zodToJsonSchema,Wn as xmlTagsRemoval,Sr as validateWithZod,Nl as upsertWorkspaceInfo,pn as truncateStr,jr as truncateSplit,Mn as toAiSdkToolResultOutput,Fr as serializeAbortReason,Tr as sanitizeFileName,Zr as safeJsonStringify,Vr as safeJsonParse,gf as resolveRootSessionId,Sn as resolveReasoningEffortRatio,Hr as resolveReasoningBudgetFromRatio,Kf as resolveHubCommandTimeoutMs,lf as resolveHookSessionContext,Ir as resolveEffectiveReasoningEffort,Tn as parseUserCommandEnvelope,Ef as parseRuntimeConfigExtensions,Xr as parseJsonStream,er as parseHookEventPayload,jn as normalizeUserInput,Bn as normalizePluginManifest,qr as noopBasicLogger,Wr as maskSecret,Po as isRuntimeConfigExtensionKind,Do as isOAuthProviderId,qf as isLikelyAuthError,Of as isHubToolExecutorName,$f as hasRuntimeConfigExtension,Qr as getShellArgs,Jr as getDefaultShell,wr as getDefaultHubCommandTimeoutMs,$r as formatUserInputBlock,tr as formatUserCommandBlock,Mr as formatUptime,br as formatMessagesForAiSdk,mr as formatHumanReadableDate,nn as formatFileContentBlock,_r as formatDisplayUserInput,Cl as emptyWorkspaceManifest,Ff as createTool,ef as createSessionId,xo as createContributionRegistry,Ho as createClineTelemetryServiceMetadata,ff as createClineTelemetryServiceConfig,Cr as buildClineSystemPrompt,cf as WorkspaceManifestSchema,tf as WorkspaceInfoSchema,Eo as VertexSettingsSchema,yo as VertexModelSchema,x as ToolCallRecordSchema,Dn as ThinkingConfigSchema,pl as TeamTeammateSpecSchema,bg as TeamTaskToolResultSchema,bf as TeamTaskListItemToolResultSchema,rg as TeamTaskInputSchema,Rg as TeamStatusToolResultSchema,ng as TeamStatusInputSchema,xl as TeamSpawnTeammateInputSchema,qg as TeamSimpleAgentStatusToolResultSchema,zl as TeamShutdownTeammateInputSchema,Ug as TeamSendMessageToolResultSchema,dg as TeamSendMessageInputSchema,Ig as TeamRunToolSummarySchema,kg as TeamRunTaskToolResultSchema,fg as TeamRunTaskInputSchema,kf as TeamRunResultSummarySchema,cg as TeamReviewOutcomeFragmentInputSchema,wg as TeamReadMailboxInputSchema,Lg as TeamOutcomeToolResultSchema,Ag as TeamOutcomeFragmentToolResultSchema,Dg as TeamMissionLogToolResultSchema,yg as TeamMissionLogInputSchema,If as TeamMessageType,Hg as TeamMailboxMessageToolResultSchema,lg as TeamListRunsInputSchema,_g as TeamListOutcomesInputSchema,Gg as TeamFinalizeOutcomeToolResultSchema,ug as TeamFinalizeOutcomeInputSchema,Fg as TeamCreateOutcomeToolResultSchema,$g as TeamCreateOutcomeInputSchema,Yg as TeamCleanupToolResultSchema,Eg as TeamCleanupInputSchema,Pg as TeamCancelRunToolResultSchema,gg as TeamCancelRunInputSchema,ig as TeamBroadcastToolResultSchema,eg as TeamBroadcastInputSchema,sg as TeamAwaitRunsInputSchema,tg as TeamAttachOutcomeFragmentInputSchema,og as TEAM_TASK_IGNORED_FIELDS_BY_ACTION,al as TEAM_RUN_TEXT_PREVIEW_LIMIT,vl as TEAM_RUN_MESSAGE_PREVIEW_LIMIT,nf as TEAM_PROGRESS_EVENT_TYPE,of as TEAM_LIFECYCLE_EVENT_TYPE,hl as TEAM_AWAIT_TIMEOUT_MS,wf as SESSION_STATUS_VALUES,h as S3AccessKeySettingsSchema,Ro as RemoteMCPServerSchema,Or as RemoteConfigSchema,Co as ReasoningEffortSchema,_n as RUNTIME_CONFIG_EXTENSION_KINDS,Nr as REMOTE_URI_SCHEME,W as REASONING_EFFORT_RATIOS,xr as ProviderProtocolSchema,zr as ProviderClientSchema,pr as ProviderCapabilitySchema,bo as PromptUploadingSchema,zo as PLUGIN_FILE_EXTENSIONS,fo as OpenAiCompatibleSchema,ro as OpenAiCompatibleModelSchema,io as OAUTH_PROVIDER_IDS,Pn as ModelStatusSchema,Un as ModelPricingSchema,K as ModelInfoSchema,qn as ModelCapabilitySchema,to as LiteLLMSchema,$o as LiteLLMModelSchema,Qn as HookEventPayloadSchema,Jn as HookEventNameSchema,nl as HUB_USER_INSTRUCTIONS_SNAPSHOT_CAPABILITY,yr as HUB_TOOL_EXECUTOR_NAMES,hf as HUB_TOOL_EXECUTOR_CAPABILITY_PREFIX,zf as HUB_MISTAKE_LIMIT_CAPABILITY,af as HUB_HOOK_CAPABILITY_PREFIX,Cf as HUB_DEFAULT_COMMAND_TIMEOUT_MS,vf as HUB_CUSTOM_TOOL_CAPABILITY_PREFIX,pf as HUB_COMPACTION_CAPABILITY,Nf as HUB_COMMAND_SLOW_LOG_MS,xf as HUB_CHECKPOINT_CAPABILITY,cn as GlobalInstructionsFileSchema,ko as EnterpriseTelemetrySchema,qo as DEFAULT_RUNTIME_CONFIG_EXTENSIONS,Lr as DEFAULT_REQUEST_HEADERS,kr as DEFAULT_REASONING_EFFORT,uf as DEFAULT_OUTCOME_REQUIRED_SECTIONS,z as ContributionRegistry,Oo as ConnectorHookEventSchema,Yn as ConnectorHookEventNameSchema,Gn as ConnectorEventContextSchema,An as ConnectorEventActorSchema,No as ConnectorAuthorizationRequestSchema,Ko as ConnectorAuthorizationDecisionSchema,wo as ClineSettingsSchema,eo as ClineModelSchema,vr as CLINE_DEFAULT_RPC_PORT,ar as CLINE_DEFAULT_RPC_ADDRESS,so as AwsBedrockSettingsSchema,lo as AwsBedrockModelSchema,go as AwsBedrockCustomModelSchema,Fn as ApiFormatSchema,mo as ApiFormat,uo as AnthropicSchema,co as AnthropicModelSchema,_o as AllowedMCPServerSchema,So as AgentUsageSchema,Zf as AgentResultSchema,Mo as AgentFinishReasonSchema,Vf as AgentConfigSchema,Yo as AUTH_ERROR_PATTERNS,hr as APIKeySchema};
@@ -0,0 +1,63 @@
1
+ export * from "./agent";
2
+ export * from "./agents";
3
+ export type { ConnectorAuthorizationDecision, ConnectorAuthorizationRequest, ConnectorEventActor, ConnectorEventContext, ConnectorHookEvent, ConnectorHookEventName, } from "./connectors/events";
4
+ export { ConnectorAuthorizationDecisionSchema, ConnectorAuthorizationRequestSchema, ConnectorEventActorSchema, ConnectorEventContextSchema, ConnectorHookEventNameSchema, ConnectorHookEventSchema, } from "./connectors/events";
5
+ export type * from "./connectors/options";
6
+ export type { AutomationEventEnvelope, CronEventSpec, CronOneOffSpec, CronScheduleSpec, CronSpec, CronSpecCommonFields, CronSpecExtensionKind, CronSpecMode, CronSpecModelSelection, CronSpecParseResult, CronTriggerKind, } from "./cron";
7
+ export type { Disposable } from "./dispose";
8
+ export { disposeAll, registerDisposable } from "./dispose";
9
+ export type { ClientContext, ClientName, ExtensionContext, UserContext, WorkspaceContext, } from "./extensions/context";
10
+ export type { AgentExtensionApi, AgentExtensionAutomationContext, AgentExtensionAutomationEventType, AgentExtensionCapability, AgentExtensionCommand, AgentExtensionHooks, AgentExtensionMessageBuilder, AgentExtensionProvider, AgentExtensionRegistry, AgentExtensionRule, AgentExtensionSessionContext, ContributionRegistryExtension, ContributionRegistryOptions, PluginManifest, PluginSetupContext, } from "./extensions/contribution-registry";
11
+ export { ContributionRegistry, createContributionRegistry, normalizePluginManifest, } from "./extensions/contribution-registry";
12
+ export { PLUGIN_FILE_EXTENSIONS } from "./extensions/plugin";
13
+ export type { HookControl } from "./hooks/contracts";
14
+ export type { AgentAbortHookPayload, AgentEndHookPayload, AgentErrorHookPayload, AgentResumeHookPayload, AgentStartHookPayload, HookEventName, HookEventPayload, HookEventPayloadBase, PostToolUseData, PreCompactData, PreCompactHookPayload, PreToolUseData, PromptSubmitHookPayload, SessionShutdownHookPayload, TaskCancelData, TaskCompleteData, TaskResumeData, TaskStartData, ToolCallHookPayload, ToolResultHookPayload, UserPromptSubmitData, } from "./hooks/events";
15
+ export { HookEventNameSchema, HookEventPayloadSchema, parseHookEventPayload, } from "./hooks/events";
16
+ export * from "./hub";
17
+ export type { AiSdkFormatterMessage, AiSdkFormatterMessageRole, AiSdkFormatterPart, AiSdkMessage, AiSdkMessagePart, } from "./llms/ai-sdk-format";
18
+ export { formatMessagesForAiSdk, toAiSdkToolResultOutput, } from "./llms/ai-sdk-format";
19
+ export type * from "./llms/gateway";
20
+ export type { ContentBlock, FileContent, ImageContent, Message, MessageRole, MessageWithMetadata, RedactedThinkingContent, TextContent, ThinkingContent, ToolDefinition, ToolResultContent, ToolUseContent, } from "./llms/messages";
21
+ export { ApiFormat, ApiFormatSchema, type ModelCapability, ModelCapabilitySchema, type ModelInfo, ModelInfoSchema, type ModelPricing, ModelPricingSchema, type ModelStatus, ModelStatusSchema, type ThinkingConfig, ThinkingConfigSchema, } from "./llms/model-info";
22
+ export { DEFAULT_REASONING_EFFORT, REASONING_EFFORT_RATIOS, resolveEffectiveReasoningEffort, resolveReasoningBudgetFromRatio, resolveReasoningEffortRatio, } from "./llms/reasoning-effort";
23
+ export { DEFAULT_REQUEST_HEADERS, serializeAbortReason } from "./llms/requests";
24
+ export type { ToolApprovalRequest, ToolApprovalResult, ToolCallRecord, ToolPolicy, } from "./llms/tools";
25
+ export { ToolCallRecordSchema } from "./llms/tools";
26
+ export { type BasicLogger, type BasicLogMetadata, noopBasicLogger, } from "./logging/logger";
27
+ export { parseJsonStream, safeJsonParse, safeJsonStringify, } from "./parse/json";
28
+ export { getDefaultShell, getShellArgs } from "./parse/shell";
29
+ export { maskSecret, sanitizeFileName, truncateSplit, truncateStr, } from "./parse/string";
30
+ export { formatHumanReadableDate, formatUptime } from "./parse/time";
31
+ export { validateWithZod, zodToJsonSchema } from "./parse/zod";
32
+ export type { ClineSystemPromptOptions } from "./prompt/cline";
33
+ export { buildClineSystemPrompt, processWorkspaceInfo } from "./prompt/cline";
34
+ export { formatDisplayUserInput, formatFileContentBlock, formatUserCommandBlock, formatUserInputBlock, normalizeUserInput, parseUserCommandEnvelope, xmlTagsRemoval, } from "./prompt/format";
35
+ export { REMOTE_URI_SCHEME } from "./remote-config/constants";
36
+ export type { AnthropicModel, AnthropicSettings, APIKeySettings, AwsBedrockCustomModel, AwsBedrockModel, AwsBedrockSettings, EnterpriseTelemetry, GlobalInstructionsFile, LiteLLMModel, LiteLLMSettings, MCPServer, OpenAiCompatible, OpenAiCompatibleModel, PromptUploading, ProviderSettings, RemoteConfig, RemoteMCPServer, S3AccessKeySettings, VertexModel, VertexSettings, } from "./remote-config/schema";
37
+ export { AllowedMCPServerSchema, AnthropicModelSchema, AnthropicSchema, APIKeySchema, AwsBedrockCustomModelSchema, AwsBedrockModelSchema, AwsBedrockSettingsSchema, ClineModelSchema, ClineSettingsSchema, EnterpriseTelemetrySchema, GlobalInstructionsFileSchema, LiteLLMModelSchema, LiteLLMSchema, OpenAiCompatibleModelSchema, OpenAiCompatibleSchema, PromptUploadingSchema, RemoteConfigSchema, RemoteMCPServerSchema, S3AccessKeySettingsSchema, VertexModelSchema, VertexSettingsSchema, } from "./remote-config/schema";
38
+ export { CLINE_DEFAULT_RPC_ADDRESS, CLINE_DEFAULT_RPC_PORT, CLINE_HUB_DEV_PORT, CLINE_HUB_PORT, } from "./rpc";
39
+ export type { AddProviderActionRequest, ChatAttachmentFile, ChatAttachments, ChatRunTurnRequest, ChatRuntimeConfig, ChatStartSessionArtifacts, ChatStartSessionRequest, ChatStartSessionResponse, ChatToolCallResult, ChatTurnResult, ClineAccountActionRequest, EnterpriseAuthenticateRequest, EnterpriseAuthenticateResponse, EnterpriseStatusRequest, EnterpriseStatusResponse, EnterpriseSyncRequest, EnterpriseSyncResponse, GetProviderModelsActionRequest, ListProvidersActionRequest, ProviderActionRequest, ProviderCapability, ProviderCatalogResponse, ProviderClient, ProviderListItem, ProviderModel, ProviderModelsResponse, ProviderOAuthLoginResponse, ProviderProtocol, ProviderSettingsActionRequest, RuntimeLoggerConfig, SaveProviderSettingsActionRequest, } from "./rpc/runtime";
40
+ export { ProviderCapabilitySchema, ProviderClientSchema, ProviderProtocolSchema, } from "./rpc/runtime";
41
+ export type { TeamProgressCounts, TeamProgressLifecycleEvent, TeamProgressMemberRole, TeamProgressMemberStatus, TeamProgressOutcomeFragmentStatus, TeamProgressOutcomeStatus, TeamProgressProjectionEvent, TeamProgressRunStatus, TeamProgressSummary, TeamProgressTaskStatus, } from "./rpc/team-progress";
42
+ export { TEAM_LIFECYCLE_EVENT_TYPE, TEAM_PROGRESS_EVENT_TYPE, } from "./rpc/team-progress";
43
+ export type { ClineBuildEnv, ClineDebugRole, ResolveClineBuildEnvOptions, } from "./runtime/build-env";
44
+ export { augmentNodeCommandForDebug, CLINE_BUILD_ENV_ENV, CLINE_DEBUG_HOST_ENV, CLINE_DEBUG_PORT_BASE_ENV, resolveClineBuildEnv, withResolvedClineBuildEnv, } from "./runtime/build-env";
45
+ export { CLINE_RUN_AS_HUB_DAEMON_ENV, isHubDaemonProcess, } from "./runtime/hub-daemon-env";
46
+ export type { ITelemetryService, OpenTelemetryClientConfig, TelemetryArray, TelemetryMetadata, TelemetryObject, TelemetryPrimitive, TelemetryProperties, TelemetryValue, } from "./services/telemetry";
47
+ export type { ClineTelemetryServiceConfig } from "./services/telemetry-config";
48
+ export { createClineTelemetryServiceConfig, createClineTelemetryServiceMetadata, } from "./services/telemetry-config";
49
+ export type { HookSessionContext, HookSessionContextLookup, HookSessionContextProvider, } from "./session/hook-context";
50
+ export { resolveHookSessionContext, resolveRootSessionId, } from "./session/hook-context";
51
+ export { createSessionId } from "./session/index";
52
+ export type { SessionLineage, SessionRuntimeRecordShape, SharedSessionStatus, } from "./session/records";
53
+ export { SESSION_STATUS_VALUES } from "./session/records";
54
+ export type { AgentMode, RuntimeConfigExtensionKind, SessionExecutionConfig, SessionPromptConfig, SessionWorkspaceConfig, } from "./session/runtime-config";
55
+ export { DEFAULT_RUNTIME_CONFIG_EXTENSIONS, hasRuntimeConfigExtension, isRuntimeConfigExtensionKind, parseRuntimeConfigExtensions, RUNTIME_CONFIG_EXTENSION_KINDS, } from "./session/runtime-config";
56
+ export type { RuntimeEnv } from "./session/runtime-env";
57
+ export * from "./session/workspace";
58
+ export * from "./team";
59
+ export { createTool } from "./tools/create";
60
+ export * from "./types";
61
+ export type { OAuthProviderId } from "./types/auth";
62
+ export { AUTH_ERROR_PATTERNS, isLikelyAuthError, isOAuthProviderId, OAUTH_PROVIDER_IDS, } from "./types/auth";
63
+ export { initVcr } from "./vcr";