@entrydesk/cli 2.2.0-beta.1 → 2.2.0-beta.2

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 (64) hide show
  1. package/README.md +2 -2
  2. package/dist/{add-BJv6tPO-.js → add-BYupRwo_.js} +1 -1
  3. package/dist/{agents-fP3hIH7X.js → agents-CeXkI4US.js} +1 -1
  4. package/dist/billing-BeaQvLSK.js +10 -0
  5. package/dist/{budget-MVbF8WbS.js → budget-B4SKcu-1.js} +1 -1
  6. package/dist/build-task-request-config-eOeyGAfk.js +10 -0
  7. package/dist/{commands-CfDSEDKI.js → commands-Bisc9IY0.js} +1 -1
  8. package/dist/{commands-DU48SG8W.js → commands-Drf0_Uu8.js} +1 -1
  9. package/dist/{config-Cl-c7scx.js → config-ROg2C1qz.js} +1 -1
  10. package/dist/{connectors-DVzXDbUU.js → connectors-jktsuWlk.js} +2 -2
  11. package/dist/{file-upload-Dq6B0x4m.js → file-upload-ClVCUJp1.js} +1 -1
  12. package/dist/{format-CIj0qQba.js → format-B6a10P86.js} +1 -1
  13. package/dist/index.js +19 -19
  14. package/dist/{instruction-6ZWRQh4G.js → instruction-D0Sy5WJu.js} +1 -1
  15. package/dist/{login-CO1aBG6c.js → login-7nuzjqqL.js} +1 -1
  16. package/dist/{logout-WKIZVWJ7.js → logout-O7uVmxmK.js} +1 -1
  17. package/dist/{marketplace-C0C2JpYf.js → marketplace-8V1DNOld.js} +1 -1
  18. package/dist/{mcp-CqMrd5AI.js → mcp-DwMCTWU-.js} +1 -1
  19. package/dist/{mcp-client-CEH9X7Vs.js → mcp-client-DpDabxv9.js} +1 -1
  20. package/dist/{meeting-C5vHfcTw.js → meeting-DCMyPA59.js} +1 -1
  21. package/dist/{message-utils-D48Yqd9T.js → message-utils-C6JS91tT.js} +5 -5
  22. package/dist/{models-BENTHton.js → models-BdxCIBZD.js} +1 -1
  23. package/dist/{notifications-DdadH0Wc.js → notifications-BZxmGqEM.js} +1 -1
  24. package/dist/{paginate-Cbe4RaEq.js → paginate-B-nHzQ0j.js} +1 -1
  25. package/dist/{paths-BiowKnkz.js → paths-ZPsPG0IC.js} +1 -1
  26. package/dist/{profile-hhU_G-Ea.js → profile-D4jP-vQE.js} +1 -1
  27. package/dist/profile-storage--QCh_u_Q.js +73 -0
  28. package/dist/{project-xiz3Jopl.js → project-Ba5LBPMF.js} +1 -1
  29. package/dist/project-context-8lb14kaU.js +10 -0
  30. package/dist/{project-governance-R__UPIhr.js → project-governance-B66BEQxO.js} +1 -1
  31. package/dist/{project-sources-C-MXx6j-.js → project-sources-D4m1oEvu.js} +1 -1
  32. package/dist/{project-sources-write-ygvHaDUu.js → project-sources-write-CCICd6f8.js} +1 -1
  33. package/dist/{project-tasks-B0STK_8Q.js → project-tasks-ylwpld2n.js} +1 -1
  34. package/dist/push-CNZNGP6D.js +10 -0
  35. package/dist/{recordings-68Oe1Kvd.js → recordings-DpDUq0iw.js} +1 -1
  36. package/dist/{remove-C7BCBdoq.js → remove-CbGljmXk.js} +1 -1
  37. package/dist/{resolve-IOW00hfy.js → resolve-Di6ohyyF.js} +2 -2
  38. package/dist/{resource-grants-Bb4evqsH.js → resource-grants-DojPWFs8.js} +1 -1
  39. package/dist/{schedules-wopieg4D.js → schedules-CTFIi2SL.js} +2 -2
  40. package/dist/{skills-Drr0gw-l.js → skills-DbFd9oBS.js} +1 -1
  41. package/dist/{status-Bw2E5bfa.js → status-Br8KI96N.js} +1 -1
  42. package/dist/{status-DX6A6ugk.js → status-DLI2OgMv.js} +1 -1
  43. package/dist/task-CRwWxEOf.js +116 -0
  44. package/dist/{tasks-lK8PTMnE.js → tasks-CNUJbs7w.js} +1 -1
  45. package/dist/tasks-VEfTbXVT.js +22 -0
  46. package/dist/{team-8-enl9cj.js → team-BfBb-uk2.js} +1 -1
  47. package/dist/{teams-ByeuT2Ks.js → teams-47YS8wYw.js} +1 -1
  48. package/dist/{token-DrAF7BWj.js → token-CvjOXFDB.js} +1 -1
  49. package/dist/{tool-82NKBr29.js → tool-D_n28XK0.js} +7 -7
  50. package/dist/{update-DfOBWme1.js → update-B8gxXkSO.js} +1 -1
  51. package/dist/{usage-BS_didkP.js → usage-BPyHU-GL.js} +1 -1
  52. package/dist/{usage-audit-DOuyWGaq.js → usage-audit-STxCfVta.js} +1 -1
  53. package/dist/{version-D7DOD1ug.js → version-Ca4arzgb.js} +1 -1
  54. package/dist/{webhook-Da2l-gv6.js → webhook-B0E0M2EK.js} +1 -1
  55. package/dist/{workflow-oudE3gsp.js → workflow-B-iN8d5R.js} +1 -1
  56. package/dist/{workspaces-9SRfDSh3.js → workspaces-DmqtYNX1.js} +1 -1
  57. package/package.json +5 -5
  58. package/dist/billing-Cy0BYngu.js +0 -10
  59. package/dist/build-task-request-config-BzI-dDZP.js +0 -10
  60. package/dist/profile-storage-CKrZ-xsd.js +0 -73
  61. package/dist/project-context-DeYepfN2.js +0 -10
  62. package/dist/push-BxQQWCZ2.js +0 -10
  63. package/dist/task-bZNZ_yxV.js +0 -116
  64. package/dist/tasks-ZC9uSdkB.js +0 -22
@@ -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{Mt as e,O as t}from"./profile-storage-CKrZ-xsd.js";import{C as n,S as r,a as i,d as a,k as o,o as s,p as c,y as l}from"./resolve-IOW00hfy.js";const u=e.options.join(`, `),d=`tasks:read`;function f(e,t){return c(t,t=>i(t,e))}function p(n){return e.safeParse(n).success?null:n===`asset`||n===`assets`?new s(`asset_not_on_context_surface`,`Assets are not part of the CLI context surface — open them in the Hub. Pass one of: ${u}.`):new s(`invalid_context_source_type`,`"${t(n)}" is not a context source type. Pass one of: ${u}.`)}function m(e,t){return new s(`invalid_argument`,`${e} ${t}.`)}function h(e,t,n,r){if(!/^[+-]?\d+$/u.test(t.trim()))return m(e,`must be an integer`);let i=Number.parseInt(t,10);return i<n||i>r?m(e,`must be between ${n} and ${r}`):null}async function g(e,t,n,r,i){if(t===void 0)return;let o=h(e,t,n,r);return o&&await a(i,o),Number.parseInt(t,10)}async function _(e,t){let n=e.trim();return n.length===0&&await a(t,m(`<query>`,`must not be empty`)),n.length>200&&await a(t,m(`<query>`,`must be at most 200 characters`)),n}async function v(e,t){let n=p(e);return n&&await a(t,n),e}async function y(e,n,i){let a=await _(n,i),o=i.type?await v(i.type,i):void 0,s=await g(`--limit`,i.limit,1,20,i),u=await f(e,i);await c(i,async e=>{let{results:n}=await e.client.searchProjectContext(e.accessToken,e.workspaceId,u,{q:a,...o&&{type:o},...s!==void 0&&{limit:s}});if(i.json){r({results:n});return}if(n.length===0){console.log(`Nothing matched ${t(a)}.`);return}l(n)},d)}function b(e){if(e.nextOffset===void 0)return`Output was truncated at this source's text limit.`;let t=e.revision===void 0?``:` --revision ${e.revision}`;return`Output was truncated. Read on with --offset ${e.nextOffset}${t}.`}function x(e,t){if(t.json){r(e);return}process.stdout.write(o(e.content)),e.truncated&&console.error(b(e))}function S(e){let n=t(e.title);return e.status===`download`?`"${n}" holds no text to read. Download it instead — the link is short-lived and tied to you: ${t(e.downloadUrl)}`:e.status===`pending`?`"${n}" is still being fetched. Try again once its snapshot is ready.`:`"${n}" could not be fetched: ${t(e.error)}`}function C(e,t){t.json?n(e):console.error(`Error: ${S(e)}`),process.exit(1)}async function w(e,t,n,r){let i=await v(t,r),a=await g(`--offset`,r.offset,0,2**53-1,r),o=await f(e,r),s=await c(r,async e=>e.client.readProjectContext(e.accessToken,e.workspaceId,o,{sourceType:i,sourceId:n},{depth:i===`task`&&(r.full||a!==void 0)?`full`:`summary`,...a!==void 0&&{offset:a},...r.revision!==void 0&&{revision:r.revision}}),d);if(s.status===`text`){x(s,r);return}C(s,r)}export{w as readProjectContext,y as searchProjectContext};
@@ -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{g as e,i as t,m as n,n as r,p as i}from"./paths-BiowKnkz.js";import{t as a}from"./hash-92fWniGT.js";import{t as o}from"./remote-D3JMUBbh.js";import s from"node:fs";import c from"node:os";import l from"node:path";import u from"archiver";function d(e){return typeof e!=`object`||!e?!1:e.response?.status===404||/\b404\b/u.test(e.message??``)}function f(e){return e.remoteHash===null?`create`:e.currentHash===e.baseHash?`noop`:!e.force&&e.remoteHash!==e.lastPulledHash?`stale`:`push`}function p(e){return new Promise((t,n)=>{let r=[],i=u(`zip`,{zlib:{level:9}});i.on(`data`,e=>r.push(e)),i.on(`error`,n),i.on(`end`,()=>t(Buffer.concat(r))),i.directory(e,!1),i.finalize()})}async function m(e,t){let{url:n}=await e.client.downloadSkillCurrent(e.accessToken,e.workspaceId,t),r=await fetch(n);if(!r.ok)throw Error(`download for staleness check failed: ${r.status}`);let i=s.mkdtempSync(l.join(c.tmpdir(),`ed-push-cmp-`));try{let{default:e}=await import(`adm-zip`);for(let t of new e(Buffer.from(await r.arrayBuffer())).getEntries()){if(t.isDirectory)continue;let e=l.resolve(i,t.entryName);e.startsWith(l.resolve(i)+l.sep)&&(s.mkdirSync(l.dirname(e),{recursive:!0}),s.writeFileSync(e,t.getData()))}return a(i)}finally{s.rmSync(i,{recursive:!0,force:!0})}}async function h(t,n,r,i,a,o,s){let c=await p(i),l=new FormData;l.append(`file`,new Blob([c],{type:`application/zip`}),`${r}.zip`),s&&l.append(`force`,`true`);let u=await t.client.uploadSkill(t.accessToken,t.workspaceId,l);e(n,r,{...o,skillId:u.id,localHash:a,lastPulledHash:a})}async function g(e,t,n,i,c){let l=r(t,n);if(!s.existsSync(l))throw Error(`No local copy for ${n}`);let u=a(l);if(i.skillId){let r=null;try{r=await m(e,i.skillId)}catch(e){if(!d(e))throw e}if(r!==null){let a=f({currentHash:u,baseHash:i.localHash,lastPulledHash:i.lastPulledHash,remoteHash:r,force:c});return a===`noop`||a===`stale`||await h(e,t,n,l,u,i,!0),a}}let p=(await o(e.client,e.accessToken,e.workspaceId)).find(e=>e.name===n);return p&&!c?`name-conflict`:(await h(e,t,n,l,u,i,!!p),`create`)}async function _(e,r,a){let{rootDir:o,workspaceId:s}=await t(!!r.global,a.workspaceId),c={...a,workspaceId:s},l=!!r.force,u=e?[e]:Object.keys(n(o).skills);if(u.length===0){console.info(`Nothing to push — no tracked skills.`);return}let d=!1;for(let e of u){let t=i(o,e);if(!t){console.info(`✗ ${e}: not tracked (run: entrydesk skills add <source>)`),d=!0;continue}let n=await g(c,o,e,t,l),r={create:`✓ pushed ${e} (created in workspace)`,push:`✓ pushed ${e}`,noop:`· ${e} unchanged`,stale:`✗ ${e} rejected — remote changed since last pull. Run 'entrydesk skills pull ${e}' first (or --force).`,"name-conflict":`✗ ${e} rejected — a different skill named "${e}" already exists in the workspace. Pull it first, or --force to overwrite.`};console.info(r[n]),(n===`stale`||n===`name-conflict`)&&(d=!0)}d&&(process.exitCode=1)}export{_ as runSkillsPush};