@entrydesk/cli 1.13.1 → 1.14.0
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/README.md +1 -12
- package/dist/{agents-ZR66NNSY.js → agents-TARZZ62G.js} +1 -1
- package/dist/{budget-EGS3V6HN.js → budget-XBWKWNB2.js} +1 -1
- package/dist/chunk-35QGVUAZ.js +2 -0
- package/dist/chunk-KURQCTT3.js +2 -0
- package/dist/{chunk-JTCLYSZY.js → chunk-XWM2TUUW.js} +2 -2
- package/dist/config-ESK6NTS2.js +2 -0
- package/dist/{config-4RVJN66P.js → config-LWO7CQLZ.js} +1 -1
- package/dist/config-help-HI4DZEFV.js +2 -0
- package/dist/connectors-GK2PHHPP.js +3 -0
- package/dist/{help-GFQ2C2W7.js → help-SWG6TVZE.js} +15 -1
- package/dist/index.js +1 -1
- package/dist/login-K4YOI227.js +2 -0
- package/dist/logout-N3WQ7RMN.js +2 -0
- package/dist/{mcp-ULOVG4WA.js → mcp-7EB6ETN5.js} +1 -1
- package/dist/meeting-EBFZOMXT.js +149 -0
- package/dist/models-HRVZ5J2G.js +3 -0
- package/dist/{profile-ILE2CZXU.js → profile-VHHFZKJO.js} +1 -1
- package/dist/{schedules-MQ3EOUY3.js → schedules-DGPWNY6X.js} +1 -1
- package/dist/{skills-YLNX66WZ.js → skills-Q7SGQIS6.js} +1 -1
- package/dist/status-BFUFZRDY.js +2 -0
- package/dist/{task-KWHAVWU3.js → task-6L2JLCH2.js} +2 -2
- package/dist/{tasks-SL45DMX5.js → tasks-DO7J2KSF.js} +1 -1
- package/dist/token-TTVFX36M.js +2 -0
- package/dist/token-util-YJCUCZTI.js +2 -0
- package/dist/{tool-M7CAZ2AI.js → tool-UQDP2DFY.js} +1 -1
- package/dist/{usage-G3AVDMRT.js → usage-6MSX36WF.js} +1 -1
- package/dist/version-2AFS3STR.js +2 -0
- package/dist/{workspaces-DWQJOVPH.js → workspaces-4X36ZVUA.js} +1 -1
- package/package.json +4 -2
- package/dist/config-25E5B67E.js +0 -2
- package/dist/config-help-YO4QSRCK.js +0 -2
- package/dist/connectors-EKR3476E.js +0 -3
- package/dist/login-VGPCYAW2.js +0 -2
- package/dist/logout-WDQ5ZZH2.js +0 -2
- package/dist/models-V4OAT2JA.js +0 -3
- package/dist/status-2YOTI6DI.js +0 -2
- package/dist/version-RLAGJNTG.js +0 -2
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{h as n,q as t,s as l}from"./chunk-XWM2TUUW.js";import"./chunk-KURQCTT3.js";async function p(c){try{let e,r;try{let o=await t();e=o.accessToken,r=o.workspaceId}catch(o){let a=o instanceof Error?o.message:"Authentication failed";console.error(a),process.exit(1)}let i=new n,{models:s}=await i.getModels(e,r);if(c.json){console.log(JSON.stringify(s));return}if(s.length===0){console.log("No models available in this workspace.");return}console.log(`Available Models (${s.length}):
|
|
3
|
+
`);for(let o of s)console.log(` ${o.name}`),o.description&&console.log(` ${o.description.slice(0,80)}`),console.log(` ID: ${o.id}`),console.log("")}catch(e){l(e)}}export{p as runModels};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as t,b as a,g as m,r as f,s as d}from"./chunk-
|
|
2
|
+
import{a as t,b as a,g as m,r as f,s as d}from"./chunk-XWM2TUUW.js";import"./chunk-KURQCTT3.js";function P(){console.log(`
|
|
3
3
|
Usage: entrydesk profile [list|show|current|create|use|delete|rename|clone] [args]
|
|
4
4
|
|
|
5
5
|
Commands:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{h as f,q as m,s as p}from"./chunk-
|
|
2
|
+
import{h as f,q as m,s as p}from"./chunk-XWM2TUUW.js";import"./chunk-KURQCTT3.js";function d(){console.log(`
|
|
3
3
|
Usage: entrydesk schedules [list|get|create|delete] [options]
|
|
4
4
|
|
|
5
5
|
Commands:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{h as S,j as z,q as I,s as P}from"./chunk-
|
|
2
|
+
import{h as S,j as z,q as I,s as P}from"./chunk-XWM2TUUW.js";import"./chunk-KURQCTT3.js";import A from"crypto";import g from"fs";import i from"fs/promises";import b from"os";import o from"path";import{Readable as j}from"stream";import{pipeline as E}from"stream/promises";import N from"adm-zip";import O from"archiver";import{isHTTPError as T}from"ky";function x(){console.log(`
|
|
3
3
|
Usage: entrydesk skills [list|upload|delete|download] [options]
|
|
4
4
|
|
|
5
5
|
Commands:
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{a as c,b as i,g as a,h as g,i as f,m as p,p as d,s as u}from"./chunk-XWM2TUUW.js";import"./chunk-KURQCTT3.js";async function W(t){try{let o=c.getEffectiveProfileName(),n={model:i.getDefaultModel(),connectors:i.getDefaultConnectorIds()},r=f();if(r){t.json?console.log(JSON.stringify({loggedIn:!0,authSource:r.authSource,profile:o,workspaceId:r.workspaceId,defaults:n})):(console.log(`Profile: ${o}`),console.log(`Authenticated via ${r.label} (no login required)`),console.log(`Workspace ID: ${r.workspaceId}`));return}let e=await a.getAll();if(!e){t.json?console.log(JSON.stringify({loggedIn:!1,profile:o,defaults:n})):(console.log(`Profile: ${o}`),console.log("Not logged in"),console.log("Run `entrydesk login` to authenticate"));return}let l;if(e.workspaceId)try{let s=new g,m=await d(),{workspaces:k}=await s.getWorkspaces(m);l=k.find(I=>I.id===e.workspaceId)?.name}catch(s){if(s instanceof p){t.json?console.log(JSON.stringify({loggedIn:!1,profile:o,defaults:n})):(console.log(`Profile: ${o}`),console.log("Not logged in"),console.log("Run `entrydesk login` to authenticate"));return}}t.json?console.log(JSON.stringify({loggedIn:!0,authSource:"file",profile:o,email:e.email,workspaceId:e.workspaceId,workspaceName:l,defaults:n})):(console.log(`Profile: ${o}`),console.log(`Logged in as ${e.email}`),l&&console.log(`Workspace: ${l}`),e.workspaceId&&console.log(`Workspace ID: ${e.workspaceId}`))}catch(o){u(o)}}export{W as runStatus};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as ie,b as fe,c as Bt,g as rt,h as pe,m as Je,p as an,q as Me,s as cn}from"./chunk-
|
|
2
|
+
import{a as ie,b as fe,c as Bt,g as rt,h as pe,m as Je,p as an,q as Me,s as cn}from"./chunk-XWM2TUUW.js";import"./chunk-KURQCTT3.js";import{render as ms}from"ink";import{v4 as uo}from"uuid";import{exec as pn}from"child_process";import ho from"fs";import Oe from"fs/promises";import mn from"os";import Ut from"path";import{promisify as yo}from"util";import{glob as wo}from"glob";var xo=yo(pn),To=`## Filesystem Tool Instructions
|
|
3
3
|
|
|
4
4
|
You have access to filesystem tools that allow you to interact with the user's local filesystem.
|
|
5
5
|
|
|
@@ -166,7 +166,7 @@ ID: ${r.id}`)}}}else if(W==="connectors"){let o=Array.from(S);H(o.length>0?o:voi
|
|
|
166
166
|
`)||Le.length===0)return;if(Ee===null){st(e);let r=Le.length-1;We(r),t(Le[r]);return}let o=Math.max(0,Ee-1);We(o),t(Le[o]);return}if(f.downArrow){if(e.includes(`
|
|
167
167
|
`)||Ee===null)return;if(Ee>=Le.length-1){We(null),t(Ft);return}let o=Ee+1;We(o),t(Le[o])}}),{suggestions:K,suggestionIndex:V,showSuggestions:X,argMode:W,argItems:L,argIndex:m,selectedConnectorIds:S,selectedCapabilities:me,deleteConfirmMode:Fe,handleInputChange:ht,handleSubmit:Ot}}import{useCallback as pt,useRef as ss,useState as rs}from"react";function lo({credentials:e,currentModel:t,modelProviders:n,onUploadSuccess:s,onUploadError:l}){let[a,g]=rs([]),y=ss(0),w=pt(b=>{if(!(!Array.isArray(n)||n.length===0)){for(let N of n)if(N.models.some(G=>G.id===b))return N.id;return n[0]?.id}},[n]),h=pt(async b=>{if(!e){l?.(b.filename,"Not logged in");return}if(!Array.isArray(n)||n.length===0){l?.(b.filename,"Model providers not loaded yet. Please wait and try again.");return}let N=t?w(t):n[0]?.id;if(!N){l?.(b.filename,"No model provider available");return}let D=`file-${++y.current}`;g(G=>[...G,{id:D,filename:b.filename,mimeType:b.mimeType,status:"uploading"}]);try{let Q=await new pe().uploadFile(e.accessToken,e.workspaceId,b,N);g(j=>j.map(J=>J.id===D?{...J,status:"uploaded",fileId:Q.id}:J)),s?.(b.filename)}catch(G){let Q=G instanceof Error?G.message:"Upload failed";g(j=>j.map(J=>J.id===D?{...J,status:"error",error:Q}:J)),l?.(b.filename,Q)}},[e,t,w,n,s,l]),O=pt(b=>{g(N=>N.filter(D=>D.id!==b))},[]),$=pt(()=>{g([])},[]),P=pt(()=>a.filter(b=>b.status==="uploaded"&&b.fileId).map(b=>b.fileId),[a]),H=a.some(b=>b.status==="uploading"),k=a.length>0;return{pendingFiles:a,addFile:h,removeFile:O,clearFiles:$,getUploadedFileIds:P,hasUploadingFiles:H,hasFiles:k}}import{jsx as q,jsxs as se}from"react/jsx-runtime";var ls=[" ______ _ ____ _","| ____| | | | _ \\ | |","| |__ _ __ | |_ _ __ _ _ | | | | ___ ___| | __","| __| | '_ \\| __| '__| | | || | | |/ _ \\/ __| |/ /","| |____| | | | |_| | | |_| || |_| | __/\\__ \\ <","|______|_| |_|\\__|_| \\__, ||____/ \\___||___/_|\\_\\"," __/ |"," |___/"],as=[Zt,Zt,Qt,Qt,Ye,Ye,Ye,Ye],ao=ls.map((e,t)=>`${as[t]??Ye}${e}${z}`).join(`
|
|
168
168
|
`),cs=`${Ye}EntryDesk${z}`,us=500;function ds(e){let t="",n=0;for(;n<e.length;){if(e.charCodeAt(n)===27&&e[n+1]==="["){for(n+=2;n<e.length;){let s=e.charCodeAt(n);if(s>=64&&s<=126){n+=1;break}n+=1}continue}t+=e[n],n+=1}return t}function fs(e){let t=ds(e);return Math.max(...t.split(`
|
|
169
|
-
`).map(n=>n.length))}function ps(e){let t=fs(ao);return e>=t?ao:cs}function co({agentId:e,model:t,message:n,taskId:s,taskTitle:l,connectorIds:a,enableFileSystem:g=!0}){let y=process.stdout.columns??80,w=ps(y),h=rn(null),O=qn(s,l),{state:$,setState:P,messages:H,setMessages:k,input:b,setInput:N,taskId:D,setTaskId:G,currentTaskTitle:Q,setCurrentTaskTitle:j,hasPersistedTask:J,setHasPersistedTask:le,credentials:i,setCredentials:p,currentResponse:E,setCurrentResponse:B,fullOutput:C,setFullOutput:de,addSystemMessage:Y,startNewTask:T}=O,{credentials:I}=Jn(P);Et(()=>{I&&!i&&p(I)},[I,i,p]);let{availableConnectors:U,availableModels:ne,availableAgents:K,modelProviders:ee,loading:V}=Yn(i),{currentModel:oe,setCurrentModel:X,currentAgentId:ce,setCurrentAgentId:W,activeConnectorIds:_,setActiveConnectorIds:L}=eo(t,e,a),v=rn(!1);Et(()=>{if(!v.current){if(v.current=!0,!t&&!e){let c=fe.getDefaultModel();c&&X(c)}if(!a&&!e){let c=fe.getDefaultConnectorIds();c&&L(c.length>0?c:void 0)}}},[t,e,a,X,L]);let{currentAgentDetails:m}=Zn(ce,i),{fileSystem:d,setFileSystem:S,capabilityLabelMap:re}=Qn(g),{pendingFiles:me,addFile:R,removeFile:Re,clearFiles:mt,getUploadedFileIds:_e,hasUploadingFiles:Lt,hasFiles:ve}=lo({credentials:i,currentModel:oe,modelProviders:ee,onUploadSuccess:c=>{Y(`\u2713 Attached: ${c}`)},onUploadError:(c,A)=>{Y(`\u2717 Failed to upload ${c}: ${A}`)}}),{sendMessage:ot}=zn({taskId:D,credentials:i,currentAgentId:ce,currentModel:oe,activeConnectorIds:_,localTools:d,fullOutput:C,setMessages:k,setState:P,setCurrentResponse:B,setCredentials:p,setHasPersistedTask:le,getFileIds:_e,clearFiles:mt}),Le=sn(c=>{T(c),B("")},[T]),[gt,Ee]=is(!1),We=sn(async c=>{let A=c.text.trim(),Z=St(A);if(/^https?:\/\//.test(Z))return;if(await jn(A)&&Un(Z)){let M=await Wn(A);M&&(c.preventDefault(),await R(M))}},[R]),Ft=sn(async()=>{if(!(gt||$.status!=="ready")){if(V||ee.length===0){Y("Please wait for resources to load before pasting images.");return}Y("Reading clipboard..."),Ee(!0);try{let c=await Bn();if(c){let A=`clipboard-${Date.now()}.png`;Y(`Uploading: ${A} (${Math.round(c.buffer.length/1024)}KB)`),await R({buffer:c.buffer,filename:A,mimeType:c.mime})}else Y("No image found in clipboard. Copy an image first.")}catch(c){let A=c instanceof Error?c.message:"Failed to read clipboard";Y(`Clipboard error: ${A}`)}finally{Ee(!1)}}},[R,Y,gt,$.status,V,ee.length]),{suggestions:st,suggestionIndex:ze,showSuggestions:Fe,argMode:xe,argItems:Xe,argIndex:Qe,selectedConnectorIds:Te,selectedCapabilities:Se,deleteConfirmMode:Ne,handleInputChange:qe,handleSubmit:ht}=io({input:b,setInput:N,taskId:D,setTaskId:G,currentTaskTitle:Q,setCurrentTaskTitle:j,currentModel:oe,setCurrentModel:X,currentAgentId:ce,setCurrentAgentId:W,currentAgentDetails:m,setCurrentAgentDetails:()=>{},activeConnectorIds:_,setActiveConnectorIds:L,fileSystem:d,setFileSystem:S,availableModels:ne,availableAgents:K,availableConnectors:U,messages:H,hasPersistedTask:J,setHasPersistedTask:le,setMessages:k,addSystemMessage:Y,startNewTask:Le,sendMessage:ot,setFullOutput:de,credentials:i,setCredentials:p,setState:P,defaultCapabilities:{fileSystem:g},capabilityLabelMap:re,hasUploadingFiles:Lt});nn((c,A)=>{(A.ctrl||A.meta)&&c==="v"&&Ft()},{isActive:$.status==="ready"&&!xe}),nn((c,A)=>{if(!A.escape)return;let Z=Date.now(),ke=h.current;h.current=Z,!(!ke||Z-ke>us)&&(xe||Fe||(h.current=null,ve&&mt(),b.length>0&&qe("")))},{isActive:$.status==="ready"}),nn((c,A)=>{A.return&&(Le("Started a new task."),P({status:"ready"}))},{isActive:$.status==="error"}),Et(()=>{if(i&&!V&&$.status==="loading")if(!oe&&!ce){let c=fe.getDefaultModel(),A=c&&ne.some(ke=>ke.id===c),Z=A?c:ne[0]?.id;Z?(A||fe.setDefaultModel(Z),X(Z),P({status:"ready"})):K.length===0?P({status:"no-model"}):P({status:"ready"})}else P({status:"ready"})},[i,V,oe,ce,ne,K,$.status,X,P]);let Ze=rn(!1);if(Et(()=>{Ze.current||n&&i&&$.status==="ready"&&(Ze.current=!0,ot(n))},[i,n,$.status,ot]),$.status==="loading")return se(ye,{flexDirection:"column",children:[q(F,{children:w}),se(ye,{children:[q(F,{color:"cyan",children:q(on,{type:"dots"})}),q(F,{children:" Initializing task..."})]})]});if($.status==="not-logged-in")return se(ye,{flexDirection:"column",children:[q(F,{children:w}),q(F,{color:"yellow",children:"Not logged in"}),q(F,{dimColor:!0,children:"Run `entrydesk login` to authenticate first."})]});if($.status==="no-workspace")return se(ye,{flexDirection:"column",children:[q(F,{children:w}),q(F,{color:"yellow",children:"No workspace selected"}),q(F,{dimColor:!0,children:"Run `entrydesk workspaces` to select a workspace first."})]});if($.status==="no-model")return se(ye,{flexDirection:"column",children:[q(F,{children:w}),q(F,{color:"yellow",children:"No model or agent specified"}),s&&q(F,{dimColor:!0,children:"Could not determine the model used in this task."}),q(F,{dimColor:!0,children:"Please specify a model with --model or use an agent with -a."}),q(F,{dimColor:!0,children:"Example: entrydesk task -c 1 -i --model gemini-2.5-flash-lite"})]});if($.status==="error")return se(ye,{flexDirection:"column",children:[q(F,{children:w}),se(F,{color:"red",children:["Error: ",$.message]}),q(F,{dimColor:!0,children:"Press Enter to start a new task, or Ctrl+C to exit"})]});let Ot=ce?m?m.connectors&&m.connectors.length>0?m.connectors.map(c=>c.name).join(", "):"none":"loading...":_&&_.length>0?U.filter(c=>_.includes(c.id)).map(c=>c.name).join(", ")||`${_.length} connector(s)`:"none",x=[];if(ce)if(m?.capabilities)for(let c of m.capabilities)x.push(re.get(c)??c);else x.push("loading...");d&&x.push("FileSystem");let f=ie.getCurrentProfileName(),o=f!=="default",r=(()=>{switch(xe){case"model":return"Select model:";case"agent":return"Select agent:";case"skills":return"Select skill:";case"connectors":return"Select connectors:";case"capabilities":return"Select capabilities:";default:return"Select task:"}})(),u=(()=>{if(xe==="connectors")return Te;if(xe==="capabilities")return Se})();return se(ye,{flexDirection:"column",children:[se(ye,{marginBottom:1,flexDirection:"column",children:[q(F,{children:w}),se(ye,{children:[q(F,{bold:!0,color:"cyan",children:Q?`Continuing: ${Q}`:"EntryDesk CLI"}),se(F,{dimColor:!0,children:[" v","1.
|
|
169
|
+
`).map(n=>n.length))}function ps(e){let t=fs(ao);return e>=t?ao:cs}function co({agentId:e,model:t,message:n,taskId:s,taskTitle:l,connectorIds:a,enableFileSystem:g=!0}){let y=process.stdout.columns??80,w=ps(y),h=rn(null),O=qn(s,l),{state:$,setState:P,messages:H,setMessages:k,input:b,setInput:N,taskId:D,setTaskId:G,currentTaskTitle:Q,setCurrentTaskTitle:j,hasPersistedTask:J,setHasPersistedTask:le,credentials:i,setCredentials:p,currentResponse:E,setCurrentResponse:B,fullOutput:C,setFullOutput:de,addSystemMessage:Y,startNewTask:T}=O,{credentials:I}=Jn(P);Et(()=>{I&&!i&&p(I)},[I,i,p]);let{availableConnectors:U,availableModels:ne,availableAgents:K,modelProviders:ee,loading:V}=Yn(i),{currentModel:oe,setCurrentModel:X,currentAgentId:ce,setCurrentAgentId:W,activeConnectorIds:_,setActiveConnectorIds:L}=eo(t,e,a),v=rn(!1);Et(()=>{if(!v.current){if(v.current=!0,!t&&!e){let c=fe.getDefaultModel();c&&X(c)}if(!a&&!e){let c=fe.getDefaultConnectorIds();c&&L(c.length>0?c:void 0)}}},[t,e,a,X,L]);let{currentAgentDetails:m}=Zn(ce,i),{fileSystem:d,setFileSystem:S,capabilityLabelMap:re}=Qn(g),{pendingFiles:me,addFile:R,removeFile:Re,clearFiles:mt,getUploadedFileIds:_e,hasUploadingFiles:Lt,hasFiles:ve}=lo({credentials:i,currentModel:oe,modelProviders:ee,onUploadSuccess:c=>{Y(`\u2713 Attached: ${c}`)},onUploadError:(c,A)=>{Y(`\u2717 Failed to upload ${c}: ${A}`)}}),{sendMessage:ot}=zn({taskId:D,credentials:i,currentAgentId:ce,currentModel:oe,activeConnectorIds:_,localTools:d,fullOutput:C,setMessages:k,setState:P,setCurrentResponse:B,setCredentials:p,setHasPersistedTask:le,getFileIds:_e,clearFiles:mt}),Le=sn(c=>{T(c),B("")},[T]),[gt,Ee]=is(!1),We=sn(async c=>{let A=c.text.trim(),Z=St(A);if(/^https?:\/\//.test(Z))return;if(await jn(A)&&Un(Z)){let M=await Wn(A);M&&(c.preventDefault(),await R(M))}},[R]),Ft=sn(async()=>{if(!(gt||$.status!=="ready")){if(V||ee.length===0){Y("Please wait for resources to load before pasting images.");return}Y("Reading clipboard..."),Ee(!0);try{let c=await Bn();if(c){let A=`clipboard-${Date.now()}.png`;Y(`Uploading: ${A} (${Math.round(c.buffer.length/1024)}KB)`),await R({buffer:c.buffer,filename:A,mimeType:c.mime})}else Y("No image found in clipboard. Copy an image first.")}catch(c){let A=c instanceof Error?c.message:"Failed to read clipboard";Y(`Clipboard error: ${A}`)}finally{Ee(!1)}}},[R,Y,gt,$.status,V,ee.length]),{suggestions:st,suggestionIndex:ze,showSuggestions:Fe,argMode:xe,argItems:Xe,argIndex:Qe,selectedConnectorIds:Te,selectedCapabilities:Se,deleteConfirmMode:Ne,handleInputChange:qe,handleSubmit:ht}=io({input:b,setInput:N,taskId:D,setTaskId:G,currentTaskTitle:Q,setCurrentTaskTitle:j,currentModel:oe,setCurrentModel:X,currentAgentId:ce,setCurrentAgentId:W,currentAgentDetails:m,setCurrentAgentDetails:()=>{},activeConnectorIds:_,setActiveConnectorIds:L,fileSystem:d,setFileSystem:S,availableModels:ne,availableAgents:K,availableConnectors:U,messages:H,hasPersistedTask:J,setHasPersistedTask:le,setMessages:k,addSystemMessage:Y,startNewTask:Le,sendMessage:ot,setFullOutput:de,credentials:i,setCredentials:p,setState:P,defaultCapabilities:{fileSystem:g},capabilityLabelMap:re,hasUploadingFiles:Lt});nn((c,A)=>{(A.ctrl||A.meta)&&c==="v"&&Ft()},{isActive:$.status==="ready"&&!xe}),nn((c,A)=>{if(!A.escape)return;let Z=Date.now(),ke=h.current;h.current=Z,!(!ke||Z-ke>us)&&(xe||Fe||(h.current=null,ve&&mt(),b.length>0&&qe("")))},{isActive:$.status==="ready"}),nn((c,A)=>{A.return&&(Le("Started a new task."),P({status:"ready"}))},{isActive:$.status==="error"}),Et(()=>{if(i&&!V&&$.status==="loading")if(!oe&&!ce){let c=fe.getDefaultModel(),A=c&&ne.some(ke=>ke.id===c),Z=A?c:ne[0]?.id;Z?(A||fe.setDefaultModel(Z),X(Z),P({status:"ready"})):K.length===0?P({status:"no-model"}):P({status:"ready"})}else P({status:"ready"})},[i,V,oe,ce,ne,K,$.status,X,P]);let Ze=rn(!1);if(Et(()=>{Ze.current||n&&i&&$.status==="ready"&&(Ze.current=!0,ot(n))},[i,n,$.status,ot]),$.status==="loading")return se(ye,{flexDirection:"column",children:[q(F,{children:w}),se(ye,{children:[q(F,{color:"cyan",children:q(on,{type:"dots"})}),q(F,{children:" Initializing task..."})]})]});if($.status==="not-logged-in")return se(ye,{flexDirection:"column",children:[q(F,{children:w}),q(F,{color:"yellow",children:"Not logged in"}),q(F,{dimColor:!0,children:"Run `entrydesk login` to authenticate first."})]});if($.status==="no-workspace")return se(ye,{flexDirection:"column",children:[q(F,{children:w}),q(F,{color:"yellow",children:"No workspace selected"}),q(F,{dimColor:!0,children:"Run `entrydesk workspaces` to select a workspace first."})]});if($.status==="no-model")return se(ye,{flexDirection:"column",children:[q(F,{children:w}),q(F,{color:"yellow",children:"No model or agent specified"}),s&&q(F,{dimColor:!0,children:"Could not determine the model used in this task."}),q(F,{dimColor:!0,children:"Please specify a model with --model or use an agent with -a."}),q(F,{dimColor:!0,children:"Example: entrydesk task -c 1 -i --model gemini-2.5-flash-lite"})]});if($.status==="error")return se(ye,{flexDirection:"column",children:[q(F,{children:w}),se(F,{color:"red",children:["Error: ",$.message]}),q(F,{dimColor:!0,children:"Press Enter to start a new task, or Ctrl+C to exit"})]});let Ot=ce?m?m.connectors&&m.connectors.length>0?m.connectors.map(c=>c.name).join(", "):"none":"loading...":_&&_.length>0?U.filter(c=>_.includes(c.id)).map(c=>c.name).join(", ")||`${_.length} connector(s)`:"none",x=[];if(ce)if(m?.capabilities)for(let c of m.capabilities)x.push(re.get(c)??c);else x.push("loading...");d&&x.push("FileSystem");let f=ie.getCurrentProfileName(),o=f!=="default",r=(()=>{switch(xe){case"model":return"Select model:";case"agent":return"Select agent:";case"skills":return"Select skill:";case"connectors":return"Select connectors:";case"capabilities":return"Select capabilities:";default:return"Select task:"}})(),u=(()=>{if(xe==="connectors")return Te;if(xe==="capabilities")return Se})();return se(ye,{flexDirection:"column",children:[se(ye,{marginBottom:1,flexDirection:"column",children:[q(F,{children:w}),se(ye,{children:[q(F,{bold:!0,color:"cyan",children:Q?`Continuing: ${Q}`:"EntryDesk CLI"}),se(F,{dimColor:!0,children:[" v","1.14.0"]}),o&&se(F,{color:"magenta",children:[" [",f,"]"]}),q(F,{dimColor:!0,children:" (type /help for commands)"})]})]}),H.map((c,A)=>{let Z=c.parts&&C?Ke(c.parts,!0):c.content,ke=c.role==="user"?"green":c.role==="system"?"yellow":"blue",M=c.role==="user"?"You":c.role==="system"?"System":"Assistant";return se(ye,{flexDirection:"column",marginBottom:1,children:[se(F,{bold:!0,color:ke,children:[M,":"]}),q(Xt,{text:Z})]},A)}),E&&se(ye,{flexDirection:"column",marginBottom:1,children:[q(F,{bold:!0,color:"blue",children:"Assistant:"}),q(Xt,{text:E})]}),$.status==="ready"&&q(kn,{suggestions:st,activeIndex:ze,visible:Fe}),$.status==="ready"&&xe&&q(Tn,{items:Xe,activeIndex:Qe,pageSize:xe==="agent"||xe==="skills"||xe==="model"?5:10,selectedIds:u,multiSelect:xe==="connectors"||xe==="capabilities",visible:!0,title:r}),$.status==="sending"&&!E?se(ye,{children:[q(F,{color:"cyan",children:q(on,{type:"dots"})}),q(F,{children:" Thinking..."})]}):$.status==="ready"&&!xe?se(ye,{flexDirection:"column",children:[Ne&&q(ye,{marginBottom:1,children:q(F,{color:"yellow",children:"\u26A0\uFE0F Delete this task? (y/N) "})}),ve&&!Ne&&se(ye,{marginBottom:1,flexDirection:"row",gap:1,children:[q(F,{dimColor:!0,children:"Attachments:"}),me.map((c,A)=>se(F,{children:[c.status==="uploading"?se(F,{color:"yellow",children:[q(on,{type:"dots"})," ",c.filename]}):c.status==="error"?se(F,{color:"red",children:["\u2717 ",c.filename]}):se(F,{color:"green",children:["\u2713 ",c.filename]}),A<me.length-1&&q(F,{children:", "})]},c.id))]}),se(ye,{children:[q(F,{color:"green",children:"> "}),q(_n,{value:b,onChange:qe,onSubmit:ht,onPaste:We,leadingOffset:2,multiline:!0})]})]}):null,se(ye,{marginTop:1,flexDirection:"column",children:[se(ye,{gap:2,children:[se(F,{children:[q(F,{dimColor:!0,children:"Model: "}),q(F,{color:"magenta",children:ce?m?.model?.name||"loading...":ne.find(c=>c.id===oe)?.name||oe||"none"})]}),se(F,{children:[q(F,{dimColor:!0,children:"Connectors: "}),q(F,{color:"cyan",children:Ot})]}),se(F,{children:[q(F,{dimColor:!0,children:"Capabilities: "}),q(F,{color:"green",children:x.length>0?x.join(", "):"none"})]})]}),se(F,{dimColor:!0,children:["Esc Esc: Clear input & attachments | Ctrl+V: Paste image | Ctrl+O: Toggle full output ",C?"(ON)":"(OFF)"," | Ctrl+C: Exit"]})]})]})}import{jsx as xs}from"react/jsx-runtime";async function gs(){let e=[];for await(let t of process.stdin)e.push(t);return Buffer.concat(e).toString("utf8").trim()}async function hs(e,t,n,s){if(s<1)return console.error("Task number must be 1 or greater"),null;let{tasks:l}=await e.getTasks(t,n,20);if(l.length===0)return console.error("No tasks found. Start a new task first."),null;if(s>l.length)return console.error(`Task number ${s} not found. You have ${l.length} recent tasks.`),console.error("Use `entrydesk tasks` to see available tasks."),null;let a=l[s-1],g;if(!a.agentId){let{messages:y}=await e.getMessages(t,n,a.id,10);g=y.find(h=>h.role==="assistant"&&h.modelId)?.modelId}return{task:a,modelId:g}}var Ve="\x1B[2m",we="\x1B[0m",ln="\x1B[36m",Rt="\x1B[33m",Nt="\x1B[32m",fo="stream-json";function ys(e,t,n,s){e&&t&&(console.error(`Error: Cannot use both ${n} and ${s}`),process.exit(1))}function At(e,t){let n=t===void 0?{event:e}:{event:e,data:t};process.stdout.write(`${JSON.stringify(n)}
|
|
170
170
|
`)}function Dt(e,t){if(t)return e;let n=e.split(`
|
|
171
171
|
`);if(n.length<=20)return e;let s=n.slice(0,5),l=n.slice(-5),a=n.length-10;return[...s,`${Ve}... (${a} lines omitted, use --full-output to see all) ...${we}`,...l].join(`
|
|
172
172
|
`)}function ws(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function po(e,t){if(!e)return"(no result)";if(typeof e!="object")return Dt(String(e),t);let n=e;if("structuredContent"in n&&n.structuredContent){let s=n.structuredContent,l=[];if(s.stdout&&typeof s.stdout=="string"&&s.stdout.trim()&&l.push(s.stdout.trim()),s.stderr&&typeof s.stderr=="string"&&s.stderr.trim()&&l.push(`${Rt}[stderr]${we} ${s.stderr.trim()}`),s.urls&&Array.isArray(s.urls)){let a=s.urls;for(let g of a)g.path&&g.url&&l.push(`${g.path}: ${g.url}`)}return l.length===0&&l.push(JSON.stringify(s,null,2)),Dt(l.join(`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{h as A,p as I,q as b,s as O}from"./chunk-
|
|
2
|
+
import{h as A,p as I,q as b,s as O}from"./chunk-XWM2TUUW.js";import"./chunk-KURQCTT3.js";var $="\x1B[2m",a="\x1B[0m",d="\x1B[36m",w="\x1B[33m",R="\x1B[32m",v="stream-json";function f(e,s){let o=s===void 0?{event:e}:{event:e,data:s};process.stdout.write(`${JSON.stringify(o)}
|
|
3
3
|
`)}function S(e){let s=new Date(e),t=new Date().getTime()-s.getTime(),n=Math.floor(t/(1e3*60*60*24));return n===0?s.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}):n===1?"Yesterday":n<7?`${n} days ago`:s.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function y(e,s){if(s)return e;let o=e.split(`
|
|
4
4
|
`);if(o.length<=15)return e;let t=o.slice(0,6),n=o.slice(-4),i=o.length-10;return[...t,`... (${i} lines omitted, use --full-output to see all) ...`,...n].join(`
|
|
5
5
|
`)}function N(e){if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(N);let s={};for(let[o,t]of Object.entries(e))typeof t=="string"&&t.length>200?s[o]=t.slice(0,150)+"... (truncated)":typeof t=="object"&&t!==null?s[o]=N(t):s[o]=t;return s}function j(e){if(!e||typeof e!="object")return String(e);try{return JSON.stringify(e,null,2)}catch{return String(e)}}function E(e,s){if(!e)return"(no result)";if(typeof e!="object")return y(String(e),s);let o=s?e:N(e);if("structuredContent"in o&&o.structuredContent){let t=o.structuredContent,n=[];if(t.stdout&&typeof t.stdout=="string"&&t.stdout.trim()&&n.push(t.stdout.trim()),t.stderr&&typeof t.stderr=="string"&&t.stderr.trim()&&n.push(`${w}[stderr]${a} ${t.stderr.trim()}`),t.urls&&Array.isArray(t.urls)){let i=t.urls;for(let r of i)r.path&&r.url&&n.push(`${r.path}: ${r.url}`)}return n.length===0&&n.push(JSON.stringify(t,null,2)),y(n.join(`
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{a as _,b as k}from"./chunk-35QGVUAZ.js";import{b as s}from"./chunk-KURQCTT3.js";var T=s((w,f)=>{var i=Object.defineProperty,l=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,d=Object.prototype.hasOwnProperty,O=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},j=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of u(e))!d.call(t,r)&&r!==o&&i(t,r,{get:()=>e[r],enumerable:!(n=l(e,r))||n.enumerable});return t},v=t=>j(i({},"__esModule",{value:!0}),t),p={};O(p,{refreshToken:()=>y});f.exports=v(p);var c=_(),a=k();async function y(t){let e=t?.project,o=t?.team;if(!e&&!o){let r=(0,a.findProjectInfo)();e=r.projectId,o=r.teamId}else if(!e||!o){let r=(0,a.findProjectInfo)();e=e??r.projectId,o=o??r.teamId}if(!e)throw new c.VercelOidcTokenError("Failed to refresh OIDC token: No project specified. Try re-linking your project with `vc link`");let n=(0,a.loadToken)(e);if(!n||(0,a.isExpired)((0,a.getTokenPayload)(n.token),t?.expirationBufferMs)){let r=await(0,a.getVercelToken)({expirationBufferMs:t?.expirationBufferMs});if(n=await(0,a.getVercelOidcToken)(r,e,o),!n)throw new c.VercelOidcTokenError("Failed to refresh OIDC token");(0,a.saveToken)(n,e)}process.env.VERCEL_OIDC_TOKEN=n.token}});export default T();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{c as S,q as _}from"./chunk-
|
|
2
|
+
import{c as S,q as _}from"./chunk-XWM2TUUW.js";import"./chunk-KURQCTT3.js";import B from"fs";import{Client as L}from"@modelcontextprotocol/sdk/client/index.js";import{StreamableHTTPClientTransport as x}from"@modelcontextprotocol/sdk/client/streamableHttp.js";async function A(e={}){let t=e.apiUrl,n=e.accessToken,o=e.workspaceId;if(!n||!o){let l=await _();n=n||l.accessToken,o=o||l.workspaceId}t||(t=S().apiUrl);let i=new L({name:"entrydesk-cli",version:"1.0.0"}),s=new URL(`${t}/v1/workspaces/${o}/mcp`),r=new x(s,{requestInit:{headers:{Authorization:`Bearer ${n}`}}});return await i.connect(r),i}async function T(){return A()}import h from"fs/promises";import v from"os";import d from"path";var y=!process.env.NO_COLOR&&!!process.stdout.isTTY,p={green:y?"\x1B[32m":"",yellow:y?"\x1B[33m":"",reset:y?"\x1B[0m":""},D=10*1024,O=8*1024,I=2*1024,P=100,b=100;function M(){return d.join(v.homedir(),".entrydesk","tool-results")}function F(e){let t=e.trim().replace(/[/\\:*?"<>|\s]/g,"_").replace(/_+/g,"_").replace(/^[._]+|[._]+$/g,"").slice(0,P);return!t||t==="."||t===".."?"unnamed_tool":t}function J(e){try{return JSON.stringify(e,(t,n)=>typeof n=="bigint"?`${n}n`:typeof n=="function"?"[Function]":typeof n=="symbol"?n.toString():n,2)}catch{return String(e)}}function U(e){let t=new Date,n=[t.getFullYear(),String(t.getMonth()+1).padStart(2,"0"),String(t.getDate()).padStart(2,"0")].join("-")+"_"+[String(t.getHours()).padStart(2,"0"),String(t.getMinutes()).padStart(2,"0"),String(t.getSeconds()).padStart(2,"0")].join("-"),o=F(e);return`${n}_${o}.json`}async function N(e,t){try{return await h.writeFile(e,t,{encoding:"utf8",flag:"wx"}),!0}catch(n){if(n instanceof Error&&"code"in n&&n.code==="EEXIST")return!1;throw n}}async function C(e,t){try{let n=M();await h.mkdir(n,{recursive:!0});let o=U(e),i=d.extname(o),s=o.slice(0,-i.length),r=J(t),l=d.join(n,o);if(await N(l,r))return l;for(let c=1;c<=b;c++){let w=d.join(n,`${s}-${c}${i}`);if(await N(w,r))return w}let u=Math.random().toString(36).slice(2,10),a=d.join(n,`${s}-${u}${i}`);return await h.writeFile(a,r,{encoding:"utf8",flag:"wx"}),a}catch(n){let o=n instanceof Error?n.message:"unknown error";return console.error(`${p.yellow}Warning: Could not save result to file: ${o}${p.reset}`),null}}function k(e,t){let n=Buffer.byteLength(e,"utf8");if(n<=D)return e;let o=e.slice(0,O),i=e.slice(-I),r=((n-O-I)/1024).toFixed(1),l=(n/1024).toFixed(1),u=` ... (skipped ${r}KB of ${l}KB) ...`;return t&&(u+=`
|
|
3
3
|
Tip: jq -r '.structuredContent.field' <file> | grep/head/tail`),`${o}
|
|
4
4
|
|
|
5
5
|
${u}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{g as a,h as w,p as k}from"./chunk-
|
|
2
|
+
import{g as a,h as w,p as k}from"./chunk-XWM2TUUW.js";import"./chunk-KURQCTT3.js";function l(){console.log(`
|
|
3
3
|
Usage: entrydesk workspaces [list|switch|use] [options]
|
|
4
4
|
|
|
5
5
|
Commands:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entrydesk/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "EntryDesk CLI - Interact with EntryDesk from your terminal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@lydell/node-pty": "^1.1.0",
|
|
27
|
-
"@testing-library/react": "^16.3.
|
|
27
|
+
"@testing-library/react": "^16.3.2",
|
|
28
28
|
"@types/adm-zip": "^0.5.8",
|
|
29
29
|
"@types/archiver": "^7.0.0",
|
|
30
30
|
"@types/node": "^24.12.4",
|
|
@@ -36,6 +36,8 @@
|
|
|
36
36
|
"tsup": "^8.5.0",
|
|
37
37
|
"typescript": "^6.0.3",
|
|
38
38
|
"vitest": "^4.1.6",
|
|
39
|
+
"@entrydesk/ci": "^0.0.0",
|
|
40
|
+
"@entrydesk/utils": "^0.0.0",
|
|
39
41
|
"@entrydesk/shared": "^0.0.0"
|
|
40
42
|
},
|
|
41
43
|
"optionalDependencies": {
|
package/dist/config-25E5B67E.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{c as i}from"./chunk-JTCLYSZY.js";import{Box as r,Text as e,render as l}from"ink";import{jsx as t,jsxs as n}from"react/jsx-runtime";function a(){let o=i();return n(r,{flexDirection:"column",children:[t(e,{bold:!0,children:"entrydesk config"}),t(e,{children:" "}),t(e,{children:"Manage CLI configuration"}),t(e,{children:" "}),t(e,{bold:!0,children:"Usage:"}),t(e,{children:" entrydesk config List all configuration"}),n(e,{children:[" entrydesk config get ","<key>"," Get a configuration value"]}),n(e,{children:[" ","entrydesk config set ","<key>"," ","<value>"," Set a configuration value"]}),n(e,{children:[" ","entrydesk config unset ","<key>"," Remove a configuration value"]}),t(e,{children:" "}),t(e,{bold:!0,children:"Available keys:"}),n(e,{children:[" apiUrl API server URL (default: ",o.apiUrl,")"]}),n(e,{children:[" hubUrl Hub server URL (default: ",o.hubUrl,")"]}),t(e,{children:" "}),t(e,{bold:!0,children:"Examples:"}),t(e,{children:" entrydesk config set apiUrl http://localhost:3200"}),t(e,{children:" entrydesk config get apiUrl"}),t(e,{children:" entrydesk config unset apiUrl"})]})}function g(){l(t(a,{}))}export{g as renderConfigHelp};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{h as c,q as s,s as i}from"./chunk-JTCLYSZY.js";async function p(l){try{let n,t;try{let o=await s();n=o.accessToken,t=o.workspaceId}catch(o){let r=o instanceof Error?o.message:"Authentication failed";console.error(r),process.exit(1)}let a=new c,{connectors:e}=await a.getConnectors(n,t);if(l.json){console.log(JSON.stringify(e));return}if(e.length===0){console.log("No connectors found in this workspace.");return}console.log(`Connected Connectors (${e.length}):
|
|
3
|
-
`);for(let o of e){let r=o.connected?"connected":"disconnected";console.log(` ${o.name} (${r})`),console.log(` Provider: ${o.provider}`),console.log(` ID: ${o.id}`),console.log("")}}catch(n){i(n)}}export{p as runConnectors};
|
package/dist/login-VGPCYAW2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{g as l,h as c,i as r,l as a}from"./chunk-JTCLYSZY.js";async function h(o){let i=r();if(i?.authSource==="sandbox-env"){o.json?console.log(JSON.stringify({alreadyAuthenticated:!0,authSource:i.authSource,workspaceId:i.workspaceId})):(console.log(`Already authenticated via ${i.label}.`),console.log("No login required \u2014 environment credentials are active."));return}if(process.env.DEBUG){let{getApiUrl:s,getHubUrl:t}=await import("./config-25E5B67E.js");console.log(`[DEBUG] Hub URL: ${t()}`),console.log(`[DEBUG] API URL: ${s()}`)}let e=await a({onDeviceCodeReceived:(s,t)=>{o.json||(console.log(""),console.log("To authenticate, please:"),console.log(""),console.log(` 1. Visit: ${t}`),console.log(` 2. Enter code: ${s}`),console.log(""))},onBrowserOpening:()=>{o.json||console.log("Opening browser...")},onWaitingForAuthorization:()=>{o.json||console.log("Waiting for authorization...")},onAuthorized:()=>{o.json||console.log("Authorization successful!")}}),g=new c,{workspaces:u}=await g.getWorkspaces(e.accessToken),n=u[0];await l.saveAll({accessToken:e.accessToken,refreshToken:e.refreshToken,email:e.email,workspaceId:n?.id}),o.json?console.log(JSON.stringify({email:e.email,workspaceId:n?.id,workspaceName:n?.name})):(console.log(`Logged in as ${e.email}`),n&&console.log(`Workspace: ${n.name}`))}export{h as runLogin};
|
package/dist/logout-WDQ5ZZH2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{g as r,h as e,k as t,s as n}from"./chunk-JTCLYSZY.js";async function f(i){try{let o=await r.getAll();if(!o){console.log("Not logged in");return}try{o.refreshToken&&await new e().revokeOAuthToken({token:o.refreshToken,clientId:t})}catch{}await r.clear(),console.log("Logged out successfully")}catch(o){n(o)}}export{f as runLogout};
|
package/dist/models-V4OAT2JA.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{h as n,q as t,s as l}from"./chunk-JTCLYSZY.js";async function p(c){try{let e,r;try{let o=await t();e=o.accessToken,r=o.workspaceId}catch(o){let a=o instanceof Error?o.message:"Authentication failed";console.error(a),process.exit(1)}let i=new n,{models:s}=await i.getModels(e,r);if(c.json){console.log(JSON.stringify(s));return}if(s.length===0){console.log("No models available in this workspace.");return}console.log(`Available Models (${s.length}):
|
|
3
|
-
`);for(let o of s)console.log(` ${o.name}`),o.description&&console.log(` ${o.description.slice(0,80)}`),console.log(` ID: ${o.id}`),console.log("")}catch(e){l(e)}}export{p as runModels};
|
package/dist/status-2YOTI6DI.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a as c,b as i,g as a,h as g,i as f,m as p,p as d,s as u}from"./chunk-JTCLYSZY.js";async function W(t){try{let o=c.getEffectiveProfileName(),n={model:i.getDefaultModel(),connectors:i.getDefaultConnectorIds()},r=f();if(r){t.json?console.log(JSON.stringify({loggedIn:!0,authSource:r.authSource,profile:o,workspaceId:r.workspaceId,defaults:n})):(console.log(`Profile: ${o}`),console.log(`Authenticated via ${r.label} (no login required)`),console.log(`Workspace ID: ${r.workspaceId}`));return}let e=await a.getAll();if(!e){t.json?console.log(JSON.stringify({loggedIn:!1,profile:o,defaults:n})):(console.log(`Profile: ${o}`),console.log("Not logged in"),console.log("Run `entrydesk login` to authenticate"));return}let l;if(e.workspaceId)try{let s=new g,m=await d(),{workspaces:k}=await s.getWorkspaces(m);l=k.find(I=>I.id===e.workspaceId)?.name}catch(s){if(s instanceof p){t.json?console.log(JSON.stringify({loggedIn:!1,profile:o,defaults:n})):(console.log(`Profile: ${o}`),console.log("Not logged in"),console.log("Run `entrydesk login` to authenticate"));return}}t.json?console.log(JSON.stringify({loggedIn:!0,authSource:"file",profile:o,email:e.email,workspaceId:e.workspaceId,workspaceName:l,defaults:n})):(console.log(`Profile: ${o}`),console.log(`Logged in as ${e.email}`),l&&console.log(`Workspace: ${l}`),e.workspaceId&&console.log(`Workspace ID: ${e.workspaceId}`))}catch(o){u(o)}}export{W as runStatus};
|
package/dist/version-RLAGJNTG.js
DELETED