@entrydesk/cli 2.1.0-beta.4 → 2.1.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 +15 -0
- package/dist/{add-4VqDcbIj.js → add-D4yZrlJH.js} +1 -1
- package/dist/{agents-CCOqroYN.js → agents-3dOJzTmM.js} +1 -1
- package/dist/{billing-BV5kdyQb.js → billing-Cyk-IzGv.js} +1 -1
- package/dist/{budget-CnxbNkne.js → budget-znTQ0rkG.js} +1 -1
- package/dist/build-task-request-config-C62XneUL.js +10 -0
- package/dist/commands--5Ein-MI.js +10 -0
- package/dist/{commands-DRUlUd-I.js → commands-D5BrzwFc.js} +1 -1
- package/dist/{config-CJf4r7wp.js → config-D-9dIy19.js} +1 -1
- package/dist/{connectors-C_Re7e0l.js → connectors-B7smri5B.js} +2 -2
- package/dist/index.js +17 -17
- package/dist/{instruction-DYgn39xF.js → instruction-BzftVNfK.js} +1 -1
- package/dist/{login-C0Zz6tHG.js → login-Ch3S9nh6.js} +1 -1
- package/dist/{logout-DnFBlXMZ.js → logout-BFFnjWjY.js} +1 -1
- package/dist/{marketplace-DQsEzT6T.js → marketplace-DNm78dKX.js} +1 -1
- package/dist/mcp-D2zejorr.js +11 -0
- package/dist/mcp-client-ltOwvE7T.js +10 -0
- package/dist/{meeting-C6H_GJB7.js → meeting-BdLr54zK.js} +1 -1
- package/dist/{message-utils-Cq_Fel5P.js → message-utils-DiNLK_84.js} +1 -1
- package/dist/{models-DT78HZxx.js → models-6WioEQKB.js} +1 -1
- package/dist/{notifications-3UrKbGaT.js → notifications-DIokyl4e.js} +1 -1
- package/dist/{paginate-Brd-j5V8.js → paginate-C9ixtica.js} +1 -1
- package/dist/{paths-mBL9tt9p.js → paths-CZAS8cbS.js} +1 -1
- package/dist/{profile-D4m5ZAG7.js → profile-CWsA2P_O.js} +1 -1
- package/dist/profile-storage-CuiJZpFD.js +68 -0
- package/dist/{project-C5_rCWCh.js → project-c8F30d-Q.js} +1 -1
- package/dist/{project-context-DnIuy1T0.js → project-context-C0ozCzKH.js} +1 -1
- package/dist/{project-governance-CxDZSThr.js → project-governance-DRDjqvX8.js} +1 -1
- package/dist/{project-sources-D17oXXhL.js → project-sources-DFn7Tn7u.js} +1 -1
- package/dist/{project-sources-write-C-W8gjLg.js → project-sources-write-Bz0lGCid.js} +1 -1
- package/dist/{project-tasks-t4HFgEoZ.js → project-tasks-DnOrMxr3.js} +1 -1
- package/dist/{push-CJZLFEdk.js → push-mojEdys2.js} +1 -1
- package/dist/{recordings-DeB1LqiS.js → recordings-BbeRVH0H.js} +1 -1
- package/dist/remove-BLF3muSH.js +10 -0
- package/dist/{resolve-Czx_OkYk.js → resolve-BoqGhxVK.js} +2 -2
- package/dist/{resource-grants-zAoqe73P.js → resource-grants-CtIINiDN.js} +1 -1
- package/dist/{schedules-COBaV-Be.js → schedules-ec4cS2A0.js} +2 -2
- package/dist/skills-C0xCUb-M.js +10 -0
- package/dist/status-Bfh5hjTq.js +10 -0
- package/dist/status-DpYhlJPA.js +10 -0
- package/dist/{task-C8PttINZ.js → task-DfLoMsmZ.js} +36 -36
- package/dist/{tasks-CAmfAGsn.js → tasks-Bl8A2HW6.js} +1 -1
- package/dist/{tasks-dv0gJ38_.js → tasks-CA2QZ8rX.js} +1 -1
- package/dist/{tool-kEevHrsQ.js → tool-B8CuZYYb.js} +1 -1
- package/dist/{update-Y9S-P4wG.js → update-BVBj3leV.js} +1 -1
- package/dist/{usage-CHIhyA8S.js → usage-CIhTZm98.js} +1 -1
- package/dist/{usage-audit-C1xGe42N.js → usage-audit-BUcbqdAc.js} +3 -3
- package/dist/{version-Dgsb7T5N.js → version-C1OwBsCd.js} +1 -1
- package/dist/{workflow-DWmgcRJ_.js → workflow-DJSq8hY5.js} +1 -1
- package/dist/{workspaces-3PFiXy1I.js → workspaces-BM_3Miqs.js} +1 -1
- package/package.json +5 -4
- package/dist/build-task-request-config-CjKDSNjv.js +0 -10
- package/dist/commands-gyHmiEsC.js +0 -10
- package/dist/mcp-DHXuIFWP.js +0 -11
- package/dist/mcp-client-EK-Fh8gM.js +0 -10
- package/dist/profile-storage-CPg61h-2.js +0 -68
- package/dist/remove-ChV-BE95.js +0 -10
- package/dist/skills-OLZywcSs.js +0 -10
- package/dist/status-CpfDbB9S.js +0 -10
- package/dist/status-Oo8upbyy.js +0 -10
package/dist/remove-ChV-BE95.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
var __entrydeskNodeFloor = 24;
|
|
3
|
-
if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
4
|
-
process.stderr.write(
|
|
5
|
-
'entrydesk: Node.js ' + __entrydeskNodeFloor + ' or newer is required, but this is Node ' + process.versions.node + '.\n' +
|
|
6
|
-
'Upgrade Node (https://nodejs.org/en/download), then reinstall @entrydesk/cli.\n'
|
|
7
|
-
);
|
|
8
|
-
process.exit(1);
|
|
9
|
-
}
|
|
10
|
-
import{h as e,i as t,n,p as r,t as i}from"./paths-mBL9tt9p.js";import{a,i as o,n as s,t as c}from"./installer-CKB3jBE-.js";import l from"node:fs";import u from"node:path";function d(e,t,n,r){let i=[],a=[];for(let d of c){let c=u.join(s(d,t),e);try{l.lstatSync(c)}catch{continue}r||o(c,n)?i.push(d.id):a.push(d.id)}return{removable:i,preserved:a}}async function f(o,u,f){i(o);let{rootDir:p,workspaceId:m}=t(!!u.global,f.workspaceId),h=r(p,o),g=n(p,o),_=l.existsSync(g),v=!!h||_,{removable:y,preserved:b}=d(o,p,g,v);if(!(v||y.length>0)&&!(u.remote&&h?.skillId)){b.length>0?console.info(`Left ${o} untouched in ${b.join(`, `)} — not EntryDesk-managed; remove it manually if intended.`):console.info(`Nothing to remove — ${o} is not installed.`);return}let x=!1;u.remote&&(h?.skillId?(await f.client.deleteSkill(f.accessToken,m,h.skillId),x=!0):console.info(`· skipped --remote: no known workspace skillId for ${o} (it was never pushed from here).`));for(let e of c)y.includes(e.id)&&a(s(e,p),o);_&&l.rmSync(g,{recursive:!0,force:!0}),e(p,o);let S={name:o,canonicalRemoved:_,agentsUnlinked:y,agentsPreserved:b,untracked:!h,remoteDeleted:x};if(u.json){console.info(JSON.stringify(S,null,2));return}let C=y.length>0?` (agents: ${y.join(`, `)})`:``,w=b.length>0?` — kept non-managed entries in ${b.join(`, `)}`:``;console.info(`✓ removed ${o}${C}${x?` + deleted from workspace`:``}${w}`)}export{f as runSkillsRemove};
|
package/dist/skills-OLZywcSs.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
var __entrydeskNodeFloor = 24;
|
|
3
|
-
if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
4
|
-
process.stderr.write(
|
|
5
|
-
'entrydesk: Node.js ' + __entrydeskNodeFloor + ' or newer is required, but this is Node ' + process.versions.node + '.\n' +
|
|
6
|
-
'Upgrade Node (https://nodejs.org/en/download), then reinstall @entrydesk/cli.\n'
|
|
7
|
-
);
|
|
8
|
-
process.exit(1);
|
|
9
|
-
}
|
|
10
|
-
import{b as e,u as t}from"./profile-storage-CPg61h-2.js";import{t as n}from"./resource-grants-zAoqe73P.js";import{i as r,m as i}from"./paths-mBL9tt9p.js";import{n as a,t as o}from"./commands-gyHmiEsC.js";import{t as s}from"./remote-D3JMUBbh.js";import c from"node:fs";import l from"node:os";import u from"node:path";import{isHTTPError as d}from"ky";import f from"node:crypto";import p from"node:fs/promises";import{Readable as m}from"node:stream";import{pipeline as h}from"node:stream/promises";import g from"adm-zip";import _ from"archiver";function v(e){return e.all?`all`:e.remote&&!e.local?`remote`:e.local&&!e.remote?`local`:`all`}function y(e,t,n){let r=new Map(t.map(e=>[e.name,e])),i=new Map(Object.entries(e)),a=new Set;if(n!==`remote`)for(let e of i.keys())a.add(e);if(n!==`local`)for(let e of r.keys())a.add(e);let o=[];for(let e of a){let t=i.get(e),n=r.get(e);o.push({name:e,local:!!t,remote:!!n,sourceType:t?.sourceType,skillId:t?.skillId??n?.id})}return o.sort((e,t)=>e.name<t.name?-1:+(e.name>t.name)),o}function b(e){return e.local&&e.remote?`local+remote`:e.local?`local-only`:`remote-only`}async function x(e,t){let n=v(e),{rootDir:a,workspaceId:o}=r(!!e.global,t.workspaceId),c=y(n===`remote`?{}:i(a).skills,n===`local`?[]:await s(t.client,t.accessToken,o),n);if(e.json){console.info(JSON.stringify(c,null,2));return}if(c.length===0){console.info(n===`local`?`No skills tracked locally.`:`No skills available in the workspace.`);return}let l=(e,t)=>e.padEnd(t);console.info(`${l(`NAME`,28)}${l(`WHERE`,14)}SOURCE`);for(let e of c)console.info(`${l(e.name,28)}${l(b(e),14)}${e.sourceType??`—`}`)}async function S(){let{accessToken:n,workspaceId:r}=await t();return{accessToken:n,workspaceId:r,client:new e}}function C(e,t){let n=u.relative(e,t);return n===``||!n.startsWith(`..`)&&!u.isAbsolute(n)}async function w(e){let t=await p.realpath(e),n=[process.cwd(),l.homedir()];if(!(await Promise.all(n.map(async e=>{try{return await p.realpath(e)}catch{return u.resolve(e)}}))).some(e=>C(e,t)))throw Error(`Invalid upload path: must be within the current directory or your home directory.`)}async function T(e){let t=await p.mkdtemp(u.join(l.tmpdir(),`entrydesk-skill-`)),n=u.join(t,`${u.basename(e)}.zip`);return await new Promise((t,r)=>{let i=c.createWriteStream(n),a=_(`zip`,{zlib:{level:9}});i.on(`close`,()=>t()),i.on(`error`,r),a.on(`error`,r),a.pipe(i),a.directory(e,!1),a.finalize()}),{zipPath:n,cleanupDir:t}}function E(e){console.log(`Versions (${e.length}):\n`);for(let t of e){let e=new Date(t.createdAt).toLocaleString();if(console.log(` v${t.versionNumber} · ${e}`),t.description){let e=t.description.length>100?`${t.description.slice(0,100)}…`:t.description;console.log(` ${e}`)}console.log(` Version ID: ${t.id}`),console.log(``)}}async function D(e){let t=await S();if(e.local||e.remote||e.all){await x(e,t);return}let n=[],r;do{let i=await t.client.listAvailableSkills(t.accessToken,t.workspaceId,{createdBy:e.mine?`me`:void 0,nextKey:r,limit:100});n.push(...i.skills),r=i.nextKey}while(r);if(e.json){console.log(JSON.stringify(n));return}if(n.length===0){console.log("No skills in this workspace yet. Upload one with `entrydesk skills upload <path>`, or browse `entrydesk marketplace`.");return}console.log(`Available skills (${n.length}):\n`);for(let e of n)console.log(e.provider?` ${e.name} (${e.provider})`:` ${e.name}`),console.log(` ${e.description.slice(0,120)}`),console.log(` ID: ${e.id}`),e.author&&console.log(` Author: ${e.author.name}`),console.log(``)}async function O(n,r){let{accessToken:i,workspaceId:a}=await t(),o=new e,s=u.resolve(n),c;try{c=await p.stat(s)}catch{console.error(`File not found: ${s}`),process.exit(1)}let l=s,f=null;try{try{await w(s)}catch(e){let t=e instanceof Error?e.message:`Invalid upload path.`;console.error(t),process.exit(1)}if(c.isDirectory()){let e=await T(s);l=e.zipPath,f=e.cleanupDir}else c.isFile()||(console.error(`Not a file or directory: ${s}`),process.exit(1));u.extname(l).toLowerCase()!==`.zip`&&(console.error(`Only .zip files are supported for upload.`),process.exit(1));let e=await p.readFile(l),t=new FormData;t.append(`file`,new Blob([e],{type:`application/zip`}),u.basename(l)),r.force&&t.append(`force`,`true`);let n;try{n=await o.uploadSkill(i,a,t)}catch(e){throw d(e)&&e.response.status===409&&(console.error(`Upload failed: A skill with this name already exists.`),console.error(`Use --force to overwrite the existing skill.`),process.exit(1)),e}if(r.json){console.log(JSON.stringify(n));return}console.log(`Uploaded skill: ${n.name}`),console.log(` ID: ${n.id}`),console.log(` Version ID: ${n.currentVersionId}`),console.log(` Description: ${n.description}`)}finally{f&&await p.rm(f,{recursive:!0,force:!0})}}async function k(n,r){!r.enable&&!r.disable&&(console.error(`Pass exactly one of --enable or --disable.`),process.exit(1));let i=!!r.enable,{accessToken:a,workspaceId:o}=await t(),s=await new e().updateSkillPreference(a,o,n,i);if(r.json){console.log(JSON.stringify(s));return}console.log(`${s.isEnabled?`Enabled`:`Disabled`} skill for you: ${n}`)}async function A(n,r){let{accessToken:i,workspaceId:a}=await t(),o=await new e().getSkillVersions(i,a,n);if(r.json){console.log(JSON.stringify(o));return}if(o.versions.length===0){console.log(`No versions for this skill.`);return}E(o.versions)}async function j(r,i){let{accessToken:a,workspaceId:o}=await t(),s=new e;if(i.addUser){let e=await s.upsertSkillGrant(a,o,r,i.addUser,i.role);if(i.json){console.log(JSON.stringify(e));return}console.log(`Granted ${i.role} to user ${i.addUser}`);return}if(i.removeUser){if(await s.removeSkillGrant(a,o,r,i.removeUser),i.json){console.log(JSON.stringify({userId:i.removeUser,removed:!0}));return}console.log(`Revoked access for user ${i.removeUser}`);return}let c=await s.getSkillGrants(a,o,r);if(i.json){console.log(JSON.stringify(c));return}n(c)}async function M(n){let{accessToken:r,workspaceId:i}=await t();await new e().deleteSkill(r,i,n),console.log(`Deleted skill: ${n}`)}async function N(n,r){let{accessToken:i,workspaceId:a}=await t(),{url:o,name:s}=await new e().downloadSkillCurrent(i,a,n);(s.includes(`/`)||s.includes(u.sep)||s===`.`||s===`..`||!s)&&(console.error(`Invalid skill name for output directory: ${s}`),process.exit(1));let d=u.resolve(s),_=await p.mkdtemp(u.join(l.tmpdir(),`entrydesk-skill-download-`)),v=u.join(_,`${s}.zip`);try{let e=await fetch(o);if(!e.ok)throw Error(`Failed to download skill zip: ${e.status} ${e.statusText}`);if(!e.body)throw Error(`Response body is empty`);let t=c.createWriteStream(v);await h(m.fromWeb(e.body),t);let i=await p.mkdtemp(u.join(u.dirname(d),`.entrydesk-skill-extract-`)),a=null;try{r.json||console.log(`Extracting…`);let e=new g(v),t=u.resolve(i)+u.sep;for(let n of e.getEntries()){if(n.isDirectory)continue;let e=u.resolve(i,n.entryName);if(!e.startsWith(t))throw Error(`Zip entry contains path traversal: ${n.entryName}`);await p.mkdir(u.dirname(e),{recursive:!0}),await p.writeFile(e,n.getData())}c.existsSync(d)&&(a=u.join(u.dirname(d),`.entrydesk-backup-${f.randomUUID()}`),r.json||console.log(`Replacing existing directory: ${d}`),await p.rename(d,a));try{await p.rename(i,d),a&&c.existsSync(a)&&(await p.rm(a,{recursive:!0,force:!0}),a=null)}catch(e){throw a&&c.existsSync(a)&&(await p.rename(a,d),a=null),e}}catch(e){if(await p.rm(i,{recursive:!0,force:!0}),a&&c.existsSync(a))try{await p.rename(a,d)}catch{console.error(`Warning: Could not restore backup. Your original files are at: ${a}`)}throw e}if(r.json){console.log(JSON.stringify({skillId:n,skillName:s,outputDir:d}));return}console.log(`Downloaded skill "${s}" to ${d}`)}finally{await p.rm(_,{recursive:!0,force:!0})}}async function P(e,t){let{runSkillsAdd:n}=await import(`./add-4VqDcbIj.js`);await n(e,t,await S())}async function F(e,t){await a(e,t,await S())}async function I(e,t){let{runSkillsPush:n}=await import(`./push-CJZLFEdk.js`);await n(e,t,await S())}async function L(e){let{runSkillsStatus:t}=await import(`./status-CpfDbB9S.js`);await t(e,await S())}async function R(e,t){let{runSkillsRemove:n}=await import(`./remove-ChV-BE95.js`);await n(e,t,await S())}async function z(e,t){o(e,t,await S())}export{P as addSkill,M as deleteSkill,N as downloadSkill,z as linkSkillsDirectory,A as listSkillVersions,D as listSkills,F as pullSkill,I as pushSkill,R as removeSkill,j as shareSkill,L as showSkillsStatus,k as toggleSkill,O as uploadSkill};
|
package/dist/status-CpfDbB9S.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
var __entrydeskNodeFloor = 24;
|
|
3
|
-
if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
4
|
-
process.stderr.write(
|
|
5
|
-
'entrydesk: Node.js ' + __entrydeskNodeFloor + ' or newer is required, but this is Node ' + process.versions.node + '.\n' +
|
|
6
|
-
'Upgrade Node (https://nodejs.org/en/download), then reinstall @entrydesk/cli.\n'
|
|
7
|
-
);
|
|
8
|
-
process.exit(1);
|
|
9
|
-
}
|
|
10
|
-
import{i as e,m as t,n}from"./paths-mBL9tt9p.js";import{t as r}from"./hash-CnSb1n2t.js";import{t as i}from"./remote-D3JMUBbh.js";import a from"node:fs";function o(e,t,n){return t?(n??e.localHash)===e.lastPulledHash?`synced`:`ahead`:e.skillId?`remote-deleted`:`local-only`}const s={synced:`—`,ahead:`push (local edits)`,"local-only":`push (never uploaded)`,"remote-deleted":`push to restore, or remove`,"remote-only":`add / pull to install`},c={synced:`✓`,ahead:`↑`,"local-only":`⊙`,"remote-deleted":`⚠`,"remote-only":`☁`};async function l(l,u){let d=!!l.global,{rootDir:f,workspaceId:p}=e(d,u.workspaceId),m=d?`global`:`project`,h=t(f).skills,g=await i(u.client,u.accessToken,p),_=new Map(g.map(e=>[e.id,e])),v=new Map(g.map(e=>[e.name,e])),y=[],b=new Set;for(let[e,t]of Object.entries(h)){let i=t.skillId?_.get(t.skillId):v.get(e);i&&b.add(i.id);let c=n(f,e),l=a.existsSync(c)?r(c):null,u=o(t,!!i,l);y.push({name:e,scope:m,state:u,hint:s[u]})}for(let e of g)b.has(e.id)||y.push({name:e.name,scope:m,state:`remote-only`,hint:s[`remote-only`]});if(y.sort((e,t)=>e.name<t.name?-1:+(e.name>t.name)),l.json){console.info(JSON.stringify(y,null,2));return}if(y.length===0){console.info(`No skills tracked locally or available in the workspace.`);return}let x=(e,t)=>e.padEnd(t);console.info(`${x(`NAME`,26)}${x(`SCOPE`,9)}STATUS`);for(let e of y)console.info(`${x(e.name,26)}${x(e.scope,9)}${c[e.state]} ${x(e.state,16)}${e.hint}`)}export{l as runSkillsStatus};
|
package/dist/status-Oo8upbyy.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
var __entrydeskNodeFloor = 24;
|
|
3
|
-
if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
4
|
-
process.stderr.write(
|
|
5
|
-
'entrydesk: Node.js ' + __entrydeskNodeFloor + ' or newer is required, but this is Node ' + process.versions.node + '.\n' +
|
|
6
|
-
'Upgrade Node (https://nodejs.org/en/download), then reinstall @entrydesk/cli.\n'
|
|
7
|
-
);
|
|
8
|
-
process.exit(1);
|
|
9
|
-
}
|
|
10
|
-
import{C as e,E as t,M as n,b as r,c as i,g as a,l as o,t as s}from"./profile-storage-CPg61h-2.js";async function c(c){let l=s.getEffectiveProfileName(),u=t(),d={model:n.getDefaultModel(),connectors:n.getDefaultConnectorIds()},f=a();if(f){c.json?console.log(JSON.stringify({loggedIn:!0,authSource:f.authSource,profile:l,server:u,workspaceId:f.workspaceId,defaults:d})):(console.log(`Profile: ${l}`),console.log(`Server: ${u}`),console.log(`Authenticated via ${f.label} (no login required)`),console.log(`Workspace ID: ${f.workspaceId}`));return}let p=await e.getAll();if(!p){c.json?console.log(JSON.stringify({loggedIn:!1,profile:l,server:u,defaults:d})):(console.log(`Profile: ${l}`),console.log(`Server: ${u}`),console.log(`Not logged in`),console.log("Run `entrydesk login` to log in"));return}let m;if(p.workspaceId)try{let e=new r,t=await o(),{workspaces:n}=await e.getWorkspaces(t);m=n.find(e=>e.id===p.workspaceId)?.name}catch(e){if(e instanceof i){c.json?console.log(JSON.stringify({loggedIn:!1,profile:l,server:u,defaults:d})):(console.log(`Profile: ${l}`),console.log(`Server: ${u}`),console.log(`Not logged in`),console.log("Run `entrydesk login` to log in"));return}}c.json?console.log(JSON.stringify({loggedIn:!0,authSource:`file`,profile:l,server:u,email:p.email,workspaceId:p.workspaceId,workspaceName:m,defaults:d})):(console.log(`Profile: ${l}`),console.log(`Server: ${u}`),console.log(`Logged in as ${p.email}`),m&&console.log(`Workspace: ${m}`),p.workspaceId&&console.log(`Workspace ID: ${p.workspaceId}`))}export{c as runStatus};
|