@cline/cli-windows-x64 0.0.11-nightly.1778113920
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/bin/clite.exe
ADDED
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRequire as n}from"node:module";var t=n(import.meta.url);import{normalizePluginManifest as GY}from"@cline/shared";import{existsSync as z,readFileSync as k}from"node:fs";import{builtinModules as r,createRequire as E}from"node:module";import{dirname as j,extname as S,isAbsolute as a,resolve as K}from"node:path";import{fileURLToPath as y}from"node:url";import{PLUGIN_FILE_EXTENSIONS as s}from"@cline/shared";var i=j(y(import.meta.url)),x=E(import.meta.url),e=K(i,"..","..","..","..",".."),N=YY(e),O=new Set(r.flatMap((Y)=>[Y,Y.replace(/^node:/,"")])),L=new Set(s);function YY(Y){let Z={},$={"@cline/agents":K(Y,"packages/agents/src/index.ts"),"@cline/core":K(Y,"packages/core/src/index.ts"),"@cline/llms":K(Y,"packages/llms/src/index.ts"),"@cline/shared":K(Y,"packages/shared/src/index.ts"),"@cline/shared/storage":K(Y,"packages/shared/src/storage/index.ts"),"@cline/shared/db":K(Y,"packages/shared/src/db/index.ts")};for(let[Q,q]of Object.entries($))if(z(q))Z[Q]=q;return Z}function f(Y){return!(Y.startsWith(".")||Y.startsWith("/")||Y.startsWith("file:")||Y.startsWith("data:")||Y.startsWith("http:")||Y.startsWith("https:"))}function b(Y){if(Y.startsWith("@")){let[Z,$]=Y.split("/",3);return $?`${Z}/${$}`:Y}return Y.split("/",1)[0]??Y}function v(Y,Z){let $=b(Z),Q=j(Y);while(!0){let q=K(Q,"node_modules",$);if(z(q)||z(K(q,"package.json")))return!0;let G=K(Q,"..");if(G===Q)return!1;Q=G}}function ZY(Y){try{return x.resolve(Y),!0}catch{return!1}}function $Y(Y){try{return x.resolve(Y)}catch{return null}}function QY(Y){let $=j(Y);for(let Q=0;Q<4;Q++){let q=K($,"package.json");if(z(q))try{let V=JSON.parse(k(q,"utf8"));return V!=null&&typeof V==="object"&&"cline"in V}catch{return!1}let G=K($,"..");if(G===$)return!1;$=G}return!1}function qY(Y,Z){let $=Z.startsWith("file:")?y(Z):a(Z)?Z:K(j(Y),Z);if(z($)&&L.has(S($)))return $;for(let Q of L){let q=`${$}${Q}`;if(z(q))return q}for(let Q of L){let q=K($,`index${Q}`);if(z(q))return q}return null}function h(Y){let Z=new Set,$=[/\bimport\s+(?:type\s+)?[^"'`]*?\bfrom\s*["'`]([^"'`]+)["'`]/g,/\bexport\s+[^"'`]*?\bfrom\s*["'`]([^"'`]+)["'`]/g,/\bimport\s*\(\s*["'`]([^"'`]+)["'`]\s*\)/g,/\brequire\s*\(\s*["'`]([^"'`]+)["'`]\s*\)/g];for(let Q of $)for(let q of Y.matchAll(Q)){let G=q[1];if(G)Z.add(G)}return[...Z]}function P(Y,Z,$=new Set){if($.has(Y)||!z(Y))return;if($.add(Y),!L.has(S(Y)))return;let Q=k(Y,"utf8");for(let q of h(Q)){if(q.startsWith("node:")||O.has(q))continue;if(f(q)){if(Object.hasOwn(N,q)||Object.hasOwn(N,b(q))||v(Y,q)||Z&&ZY(q))continue;throw Error(`Cannot find module '${b(q)}'`)}let G=qY(Y,q);if(G)P(G,Z,$)}}function wY(Y,Z){let $=E(Y),Q={};for(let[q,G]of Object.entries(N)){try{$.resolve(q);continue}catch{}Q[q]=G}if(Z){let q=k(Y,"utf8");for(let G of h(q)){if(!f(G)||G.startsWith("node:")||O.has(G)||Object.hasOwn(Q,G)||v(Y,G))continue;let V=$Y(G);if(V)Q[G]=V}}return Q}async function m(Y,Z={}){let $=!QY(Y);P(Y,$);let Q=wY(Y,$),q=await import("jiti"),G=typeof q==="function"?q:typeof q.default==="function"?q.default:void 0;if(!G)throw Error("Unable to load jiti");return await G(Y,{alias:Q,cache:Z.useCache,requireCache:Z.useCache,esmResolve:!0,interopDefault:!1,nativeModules:[...O],transformModules:Object.keys(Q)}).import(Y,{})}function d(Y,Z){if(!Y)return!0;if(Y.providerIds?.length){if(!Z?.providerId||!Y.providerIds.includes(Z.providerId))return!1}if(Y.modelIds?.length){if(!Z?.modelId||!Y.modelIds.includes(Z.modelId))return!1}return!0}function X(Y){return typeof Y==="object"&&Y!==null}function c(Y){return Array.isArray(Y)&&Y.every((Z)=>typeof Z==="string")}function JY(Y,Z){if(!X(Y))throw Error(`Invalid plugin module: ${Z}`);if(typeof Y.name!=="string"||!Y.name)throw Error(`Invalid plugin name: ${Z}`);if(!X(Y.manifest))throw Error(`Invalid plugin manifest: ${Z}`);if(Object.hasOwn(Y.manifest,"providerIds")&&!c(Y.manifest.providerIds))throw Error(`Invalid plugin manifest.providerIds: ${Z}`);if(Object.hasOwn(Y.manifest,"modelIds")&&!c(Y.manifest.modelIds))throw Error(`Invalid plugin manifest.modelIds: ${Z}`)}function KY(Y){if(!X(Y))throw Error("Plugin setup context must be an object");if(Y.session!==void 0&&!X(Y.session))throw Error("Plugin setup context session must be an object");if(Y.client!==void 0&&!X(Y.client))throw Error("Plugin setup context client must be an object");if(Y.user!==void 0&&!X(Y.user))throw Error("Plugin setup context user must be an object");if(Y.workspaceInfo!==void 0&&!X(Y.workspaceInfo))throw Error("Plugin setup context workspaceInfo must be an object");if(Y.automation!==void 0&&!X(Y.automation))throw Error("Plugin setup context automation must be an object");if(Y.automation!==void 0&&typeof Y.automation.ingestEvent!=="function")throw Error("Plugin setup context automation.ingestEvent must be a function");if(Y.logger!==void 0&&!X(Y.logger))throw Error("Plugin setup context logger must be an object")}var o=0,A=new Map,T=new Map;function VY(Y){let Z=Y instanceof Error?Y.message:String(Y),$=Y instanceof Error?Y.stack:void 0;return{message:Z,stack:$}}function R(Y,Z,$,Q){if(!process.send)return;process.send({type:"response",id:Y,ok:Z,result:$,error:Q})}function I(Y,Z){if(!process.send)return;process.send({type:"event",name:Y,payload:Z})}globalThis.__clinePluginHost={emitEvent:I};globalThis.__clineSessionEnv={cwd:void 0,workspaceInfo:void 0};function u(Y){if(!Y||typeof Y!=="object")return{};return Y}function WY(Y){if(!Y||typeof Y!=="object")return;let Z={...Y};if(Z.error instanceof Error)Z.error={name:Z.error.name,message:Z.error.message,stack:Z.error.stack};return Z}function XY(Y){let Z=($,Q,q)=>{I("plugin_log",{level:$,pluginName:Y,message:Q,metadata:WY(q)})};return{debug:($,Q)=>Z("debug",$,Q),log:($,Q)=>Z("log",$,Q),error:($,Q)=>Z("error",$,Q)}}function C(Y,Z){let $=`${Y}:${Z}`,Q=(T.get($)??0)+1;return T.set($,Q),`${Y}_${Z}_${Q}`}function FY(Y){let Z=typeof Y.eventType==="string"?Y.eventType.trim():"",$=typeof Y.source==="string"?Y.source.trim():"";if(!Z)throw Error("Automation event type contribution requires eventType");if(!$)throw Error("Automation event type contribution requires source");return{...Y,eventType:Z,source:$,examples:Y.examples?[...Y.examples]:void 0,metadata:Y.metadata?u(Y.metadata):void 0}}function _(Y){let Z=A.get(Y);if(!Z)throw Error(`Unknown sandbox plugin id: ${Y}`);return Z}async function zY(Y){if(A.clear(),o=0,T.clear(),Y.cwd)try{process.chdir(Y.cwd)}catch{}let Z=globalThis.__clineSessionEnv;if(Z)Z.cwd=Y.cwd,Z.workspaceInfo=Y.workspaceInfo;let $=[],Q=[],q=[],G=Y.exportName||"plugin",V=new Map,l={providerId:Y.providerId,modelId:Y.modelId};for(let M of Y.pluginPaths||[]){let J;try{let F=await m(M);if(J=F.default??F[G],JY(J,M),J.manifest=GY(J.manifest),!d(J.manifest,l))continue;let U=`plugin_${++o}`,B={tools:[],commands:[],messageBuilders:[],providers:[],automationEventTypes:[],shortcuts:[],flags:[]},H={tools:new Map,commands:new Map,messageBuilders:new Map},g={registerTool:(w)=>{let W=C(U,"tool");H.tools.set(W,w.execute),B.tools.push({id:W,name:w.name,description:w.description,inputSchema:w.inputSchema,timeoutMs:w.timeoutMs,retryable:w.retryable})},registerCommand:(w)=>{let W=C(U,"command");if(typeof w.handler==="function")H.commands.set(W,w.handler);B.commands.push({id:W,name:w.name,description:w.description})},registerMessageBuilder:(w)=>{let W=C(U,"builder");H.messageBuilders.set(W,w.build),B.messageBuilders.push({id:W,name:w.name})},registerProvider:(w)=>{B.providers.push({id:C(U,"provider"),name:w.name,description:w.description,metadata:u(w.metadata)})},registerAutomationEventType:(w)=>{B.automationEventTypes.push({id:C(U,"automation_event"),...FY(w)})}};if(typeof J.setup==="function")try{let w={session:Y.session,client:Y.client,user:Y.user,workspaceInfo:Y.workspaceInfo,...Y.loggerEnabled?{logger:XY(J.name)}:{},...J.manifest.capabilities.includes("automationEvents")?{automation:{ingestEvent:(W)=>{I("automation_event",W)}}}:{}};KY(w),await J.setup(g,w)}catch(w){Q.push({pluginPath:M,pluginName:J.name,phase:"setup",message:w instanceof Error?w.message:String(w),stack:w instanceof Error?w.stack:void 0});continue}let D=V.get(J.name);if(D!==void 0){let w=$[D];if(!w)V.delete(J.name);else{q.push({type:"duplicate_plugin_override",pluginName:J.name,pluginPath:M,overriddenPluginPath:w.pluginPath,message:`Plugin "${J.name}" from ${M} overrides ${w.pluginPath}`}),A.delete(w.pluginId),$.splice(D,1),V.clear();for(let[W,p]of $.entries())V.set(p.name,W)}}A.set(U,{plugin:J,handlers:H}),V.set(J.name,$.length),$.push({pluginId:U,pluginPath:M,name:J.name,manifest:J.manifest,hooks:J.hooks?Object.entries(J.hooks).filter(([,w])=>typeof w==="function").map(([w])=>w):void 0,contributions:B})}catch(F){Q.push({pluginPath:M,pluginName:J?.name,phase:"load",message:F instanceof Error?F.message:String(F),stack:F instanceof Error?F.stack:void 0})}}return{plugins:$,failures:Q,warnings:q}}async function MY(Y){let $=_(Y.pluginId).plugin.hooks?.[Y.hookName];if(typeof $!=="function")return;return await $(Y.payload)}async function UY(Y){let $=_(Y.pluginId).handlers.tools.get(Y.contributionId);if(typeof $!=="function")throw Error("Unknown sandbox tool contribution");return await $(Y.input,Y.context)}async function BY(Y){let $=_(Y.pluginId).handlers.commands.get(Y.contributionId);if(typeof $!=="function")return"";return await $(Y.input)}async function CY(Y){let $=_(Y.pluginId).handlers.messageBuilders.get(Y.contributionId);if(typeof $!=="function")return[];return await $(Y.messages)}var HY={initialize:zY,invokeHook:MY,executeTool:UY,executeCommand:BY,buildMessages:CY};process.on("message",async(Y)=>{if(!Y||Y.type!=="call")return;let Z=HY[Y.method];if(!Z){R(Y.id,!1,void 0,{message:`Unknown method: ${String(Y.method)}`});return}try{let $=await Z(Y.args||{});R(Y.id,!0,$)}catch($){R(Y.id,!1,void 0,VY($))}});
|
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cline/cli-windows-x64",
|
|
3
|
+
"version": "0.0.11-nightly.1778113920",
|
|
4
|
+
"description": "Cline CLI binary for windows x64",
|
|
5
|
+
"os": [
|
|
6
|
+
"win32"
|
|
7
|
+
],
|
|
8
|
+
"cpu": [
|
|
9
|
+
"x64"
|
|
10
|
+
],
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/cline/sdk.git",
|
|
14
|
+
"directory": "apps/cli"
|
|
15
|
+
},
|
|
16
|
+
"bin": {
|
|
17
|
+
"clite": "bin/clite.exe"
|
|
18
|
+
}
|
|
19
|
+
}
|