@entrydesk/cli 2.0.0 → 2.1.0-beta.1

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 (78) hide show
  1. package/README.md +279 -0
  2. package/dist/add-Lh_kLR85.js +2 -0
  3. package/dist/agents-CLcXSbBp.js +2 -0
  4. package/dist/billing-DHrYi0SU.js +2 -0
  5. package/dist/{budget-DcULs51p.js → budget-D_DDPBBb.js} +1 -1
  6. package/dist/build-task-request-config-Y9X2h9Ia.js +2 -0
  7. package/dist/commands-3Yqb38G_.js +2 -0
  8. package/dist/commands-CdnyYMrx.js +2 -0
  9. package/dist/{config-CI3k8CUK.js → config-hGzOCx4u.js} +2 -2
  10. package/dist/connectors-CxzG22No.js +3 -0
  11. package/dist/file-upload-BmP4AJY0.js +16 -0
  12. package/dist/format-C3tQC6LL.js +2 -0
  13. package/dist/index.js +83 -10
  14. package/dist/instruction-CRCyBKQf.js +2 -0
  15. package/dist/{login-y8SlHgZ4.js → login-CwXjzUnO.js} +1 -1
  16. package/dist/{logout-CGGEe0it.js → logout-BYCFpaxh.js} +1 -1
  17. package/dist/{marketplace-CaIuJP0T.js → marketplace-NSEUjhXf.js} +1 -1
  18. package/dist/{mcp-Yz1qXxIb.js → mcp-B7wo_sRO.js} +2 -2
  19. package/dist/mcp-client-DMOEcmul.js +2 -0
  20. package/dist/meeting-yS83In45.js +3 -0
  21. package/dist/models-AN9cWKSj.js +3 -0
  22. package/dist/notifications-QF11-X32.js +2 -0
  23. package/dist/options-D6fCp3Q_.js +2 -0
  24. package/dist/paginate-CfIrho1f.js +2 -0
  25. package/dist/paths-C9BPsZVF.js +2 -0
  26. package/dist/{profile-1uJ5EHdo.js → profile-WtKtO0yp.js} +1 -1
  27. package/dist/profile-storage-Dv0xRb8J.js +58 -0
  28. package/dist/project-BhPYRsaZ.js +2 -0
  29. package/dist/project-context-Cc_Js6n4.js +2 -0
  30. package/dist/project-governance-C7rl6gDW.js +2 -0
  31. package/dist/project-sources-CzylP6oS.js +2 -0
  32. package/dist/project-sources-write-6cBfdUfV.js +2 -0
  33. package/dist/project-tasks-DaGBt4Cp.js +2 -0
  34. package/dist/push-Ce79oiu0.js +2 -0
  35. package/dist/{recordings-C0Ij3tfP.js → recordings-DoExjM1F.js} +1 -1
  36. package/dist/remove-bHAmCTdf.js +2 -0
  37. package/dist/resolve-f238uD6C.js +6 -0
  38. package/dist/schedules-tDaIGaad.js +21 -0
  39. package/dist/{skills-16msznfK.js → skills-CDd-emMc.js} +1 -1
  40. package/dist/status-CDMSNVD8.js +2 -0
  41. package/dist/{status-D6ebFbsw.js → status-gK3MA1oe.js} +1 -1
  42. package/dist/stdin-DzzLUF6W.js +2 -0
  43. package/dist/task-CHnFR-Zp.js +103 -0
  44. package/dist/tasks-D4RIFT8Y.js +14 -0
  45. package/dist/tasks-acCatE6n.js +2 -0
  46. package/dist/{tool-3NEPlGNR.js → tool-BEivzspP.js} +1 -1
  47. package/dist/update-CJlVgq8V.js +2 -0
  48. package/dist/usage-DOI9sowA.js +3 -0
  49. package/dist/{usage-audit-e6kpW0LZ.js → usage-audit-1GZx4VBG.js} +3 -3
  50. package/dist/version-C37EX5li.js +2 -0
  51. package/dist/workflow-DhomAltH.js +6 -0
  52. package/dist/{workspaces-BQiFZ5pV.js → workspaces-D0VOrP2A.js} +1 -1
  53. package/package.json +8 -4
  54. package/dist/add-CDlJBikf.js +0 -2
  55. package/dist/agents-vivPBsWo.js +0 -2
  56. package/dist/billing-BietwbvI.js +0 -2
  57. package/dist/build-task-request-config-Bbffa_rv.js +0 -2
  58. package/dist/commands-BCLJEd6x.js +0 -2
  59. package/dist/commands-CpuinJar.js +0 -2
  60. package/dist/connectors-CbkKDKQQ.js +0 -3
  61. package/dist/custom-connector-CxGNx65S.js +0 -2
  62. package/dist/format-BNEUX5Xv.js +0 -2
  63. package/dist/mcp-client-DdryEToX.js +0 -2
  64. package/dist/meeting-CWv3iUU6.js +0 -3
  65. package/dist/models-DFEIoTPH.js +0 -2
  66. package/dist/notifications-CBLIBZtc.js +0 -2
  67. package/dist/paths-Cqjaa_lJ.js +0 -2
  68. package/dist/profile-storage-DYUIMuP0.js +0 -72
  69. package/dist/push-BBY3QXxO.js +0 -2
  70. package/dist/remove-D-UQJ0IM.js +0 -2
  71. package/dist/schedules-CFjtG3p4.js +0 -21
  72. package/dist/status-kRSNf0Ap.js +0 -2
  73. package/dist/task-DKK82ixE.js +0 -115
  74. package/dist/tasks-DX7CQir8.js +0 -14
  75. package/dist/update-DhNwkiwD.js +0 -2
  76. package/dist/usage-050zvE6Q.js +0 -3
  77. package/dist/version-orM51hu_.js +0 -2
  78. package/dist/workflow-DHTrGTRn.js +0 -6
package/dist/index.js CHANGED
@@ -1,39 +1,112 @@
1
1
  #!/usr/bin/env node
2
- import{B as e,D as t,F as n,I as r,L as i,M as a,N as ee,V as o,a as te,dt as s,et as c,ot as ne,st as l,t as u,ut as d,w as f}from"./profile-storage-DYUIMuP0.js";import{n as re,t as ie}from"./custom-connector-CxGNx65S.js";import{t as ae}from"./version-orM51hu_.js";import{Argument as p,Command as oe,InvalidArgumentError as m,Option as h}from"@commander-js/extra-typings";function g(e){if(!/^[+-]?\d+$/u.test(e.trim()))throw new m(`must be an integer`);return Number.parseInt(e,10)}function _(e,t){return n=>{let r=g(n);if(r<e||r>t)throw new m(`must be an integer between ${e} and ${t}`);return r}}function v(e){return t=>{let n=Number(t.trim());if(t.trim()===``||!Number.isFinite(n))throw new m(`must be a number`);if(n<e)throw new m(`must be at least ${e}`);return n}}function y(e){return t=>{if(t.length>e)throw new m(`must be at most ${e} characters`);return t}}function se(e){let t=ie(e);if(t)throw new m(t);return e}function b(e){let t=re(e);if(t)throw new m(t);return e}function x(e){let t=e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0);if(t.length===0)throw new m(`must list at least one value`);return t}function S(e,t){let n=_(e,t);return e=>x(e).map(n)}function C(e,t=[]){return[...t,e]}const ce=/[()*]/u;function w(e,t=[]){let n=e.split(/[\s,]+/u).filter(e=>e.length>0);if(n.length===0)throw new m(`must name at least one tool`);for(let e of n)if(ce.test(e))throw new m(`"${e}" is not a tool name. Name each tool in full, as it is exposed to the model (for example slack__send_message); narrowing one to some of its arguments or matching a whole namespace is not supported`);return[...t,...n]}const le=new Map([[`web`,d.WEB_SEARCH],[`image`,d.CREATION],[`image-gen`,d.CREATION],[`image_generation`,d.CREATION]]);function ue(e){return x(e).map(e=>{let t=e.replaceAll(`-`,`_`),n=le.get(e)??s.find(e=>e===t);if(!n)throw new m(`"${e}" is not one of: ${s.join(`, `)}`);return n})}function T(e){let t=/^(\d{1,2}):(\d{2})$/u.exec(e);if(!t)throw new m(`"${e}" is not an HH:MM time`);let n=Number.parseInt(t[1],10),r=Number.parseInt(t[2],10);if(n>23||r>59)throw new m(`"${e}" is not a valid time of day`);return{hour:n,minute:r}}function de(e){return x(e).map(T)}function fe(e){return x(e).map(e=>{let[t,n]=e.split(`-`);if(!t||!n)throw new m(`"${e}" is not an HH:MM-HH:MM range`);return{start:T(t),end:T(n)}})}const E=`--profile <name>`;function D(e){return e.option(`--json`,`Output JSON for scripting`)}function O(e,t){return e.option(`--limit <number>`,`Max results per page (default: ${t})`,_(1,100)).option(`--next-key <cursor>`,`Fetch the next page using this cursor`)}function k(e,t){return O(e,t).addOption(new h(`--all`,`Fetch every page (auto-paginate)`).conflicts(`nextKey`))}function A(e){return e.addOption(new h(`--add-user <userId>`,`Grant a user access`).conflicts(`removeUser`)).option(`--remove-user <userId>`,`Revoke a user's access`)}function j(e){return A(e).addOption(new h(`--role <role>`,`Role for --add-user`).choices(l.options).default(l.enum.viewer))}const M={chat:`Chat & Tasks:`,build:`Build:`,workspace:`Workspace:`,setup:`Setup:`};function N(){return new oe().name(`entrydesk`).description(`EntryDesk CLI — interact with EntryDesk from your terminal`).option(`--json`,`Output JSON for scripting (most commands support it)`).option(E,`Use a specific profile for this command`).version(`entrydesk ${ae()}`,`-v, --version`,`Show the version number`).showHelpAfterError("(run `entrydesk --help` to see the command list)").configureHelp({showGlobalOptions:!0}).addHelpText(`after`,`
2
+ import{B as e,D as t,G as n,H as r,I as i,Nt as a,Ot as o,R as s,Tt as c,U as ee,V as te,W as ne,_t as l,gt as re,j as ie,kt as u,lt as d,o as ae,t as f,vt as p,xt as m,yt as oe,z as se}from"./profile-storage-Dv0xRb8J.js";import{t as ce}from"./version-C37EX5li.js";import{a as le,i as h,n as ue,o as g,r as _,s as de,t as fe}from"./options-D6fCp3Q_.js";import{Argument as pe,Command as me,InvalidArgumentError as v,Option as y}from"@commander-js/extra-typings";function he(e){if(e.length===0)return`must not be empty`;if(e.length>50)return`must be at most 50 characters`;if(!r.test(e))return`must use only letters, digits and spaces`;if(/\s{2,}/u.test(e))return`must not contain consecutive spaces`;if(e.trim()!==e)return`must not start or end with whitespace`}function b(e){if(!/^[+-]?\d+$/u.test(e.trim()))throw new v(`must be an integer`);return Number.parseInt(e,10)}function x(e,t){return n=>{let r=b(n);if(r<e||r>t)throw new v(`must be an integer between ${e} and ${t}`);return r}}function S(e){return t=>{let n=Number(t.trim());if(t.trim()===``||!Number.isFinite(n))throw new v(`must be a number`);if(n<e)throw new v(`must be at least ${e}`);return n}}function C(e){return t=>{if(t.length>e)throw new v(`must be at most ${e} characters`);return t}}function w(e){let t=C(e);return e=>{let n=e.trim();if(n.length===0)throw new v(`must not be empty`);return t(n)}}function ge(e){let t=he(e);if(t)throw new v(t);return e}function _e(e){let t=ee(e);if(t)throw new v(te[t]);return e}function T(e){let t=e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0);if(t.length===0)throw new v(`must list at least one value`);return t}function E(e,t){let n=x(e,t);return e=>T(e).map(n)}function ve(e,t=[]){return[...t,e]}const ye=/[()*]/u;function D(e,t=[]){let n=e.split(/[\s,]+/u).filter(e=>e.length>0);if(n.length===0)throw new v(`must name at least one tool`);for(let e of n)if(ye.test(e))throw new v(`"${e}" is not a tool name. Name each tool in full, as it is exposed to the model (for example slack__send_message); narrowing one to some of its arguments or matching a whole namespace is not supported`);return[...t,...n]}const be=new Map([[`web`,o.WEB_SEARCH],[`image`,o.CREATION],[`image-gen`,o.CREATION],[`image_generation`,o.CREATION]]);function xe(e){return T(e).map(e=>{let t=e.replaceAll(`-`,`_`),n=be.get(e)??u.find(e=>e===t);if(!n)throw new v(`"${e}" is not one of: ${u.join(`, `)}`);return n})}function O(e){let t=/^(\d{1,2}):(\d{2})$/u.exec(e);if(!t)throw new v(`"${e}" is not an HH:MM time`);let n=Number.parseInt(t[1],10),r=Number.parseInt(t[2],10);if(n>23||r>59)throw new v(`"${e}" is not a valid time of day`);return{hour:n,minute:r}}function Se(e){return T(e).map(O)}function Ce(e){return T(e).map(e=>{let[t,n]=e.split(`-`);if(!t||!n)throw new v(`"${e}" is not an HH:MM-HH:MM range`);return{start:O(t),end:O(n)}})}const k=`--profile <name>`;function A(e){return e.option(`--json`,`Output JSON for scripting`)}function j(e,t){return e.option(`--limit <number>`,`Max results per page (default: ${t})`,x(1,100)).option(`--next-key <cursor>`,`Fetch the next page using this cursor`)}function M(e,t){return j(e,t).addOption(new y(`--all`,`Fetch every page (auto-paginate)`).conflicts(`nextKey`))}function N(e){return e.addOption(new y(`--add-user <userId>`,`Grant a user access`).conflicts(`removeUser`)).option(`--remove-user <userId>`,`Revoke a user's access`)}function P(e){return N(e).addOption(new y(`--role <role>`,`Role for --add-user`).choices(c.options).default(c.enum.viewer))}const F={chat:`Chat & Tasks:`,build:`Build:`,workspace:`Workspace:`,setup:`Setup:`};function we(){return new me().name(`entrydesk`).description(`EntryDesk CLI — interact with EntryDesk from your terminal`).option(`--json`,`Output JSON for scripting (most commands support it)`).option(k,`Use a specific profile for this command`).version(`entrydesk ${ce()}`,`-v, --version`,`Show the version number`).showHelpAfterError("(run `entrydesk --help` to see the command list)").configureHelp({showGlobalOptions:!0}).addHelpText(`after`,`
3
3
  Examples:
4
4
  entrydesk task -m "Summarize my open tasks" --model <model>
5
5
  entrydesk meeting transcript <recordingId> | entrydesk task -m "List action items"
6
6
  entrydesk agents list --mine --json
7
7
 
8
- Docs: https://entrydesk.com/docs/cli`)}function P(e){return e.option(`--connector-ids <ids>`,`Comma-separated connector ids`,x).option(`--capabilities <list>`,`Comma-separated capabilities (${s.join(`, `)})`,ue).option(`--conversation-starters <list>`,`Comma-separated conversation starters`,x).option(`--tools <list>`,`Comma-separated tool names (prefix__tool)`,x).option(`--icon-id <iconId>`,`Icon to use`)}function F(e){let t=e.command(`agents`).summary(`List, show, create, publish, and share agents`).helpGroup(M.build);D(k(t.command(`list`,{isDefault:!0}).description(`List available agents`).option(`--me, --mine`,`List agents you own or edit, with their publish state`),100)).action(async(e,t)=>{let{listAgents:n}=await import(`./agents-vivPBsWo.js`);await n(t.optsWithGlobals())}),D(t.command(`show`).description(`Show one agent's full details`).argument(`<agentId>`,`Agent to show`)).action(async(e,t,n)=>{let{showAgent:r}=await import(`./agents-vivPBsWo.js`);await r(e,n.optsWithGlobals())}),D(P(t.command(`create`).description(`Create a new agent`).requiredOption(`--name <name>`,`Agent name`).requiredOption(`--description <text>`,`Short description`).requiredOption(`--system-prompt <text>`,`System prompt`).requiredOption(`--model-id <modelId>`,`Model to run the agent on`))).action(async(e,t)=>{let{createAgent:n}=await import(`./agents-vivPBsWo.js`);await n(t.optsWithGlobals())}),D(P(t.command(`update`).description(`Update an agent you own`).argument(`<agentId>`,`Agent to update`).option(`--name <name>`,`Agent name`).option(`--description <text>`,`Short description`).option(`--system-prompt <text>`,`System prompt`).option(`--model-id <modelId>`,`Model to run the agent on`))).action(async(e,t,n)=>{let{updateAgent:r}=await import(`./agents-vivPBsWo.js`);await r(e,n.optsWithGlobals())}),t.command(`delete`).description(`Delete an agent you own`).argument(`<agentId>`,`Agent to delete`).action(async e=>{let{deleteAgent:t}=await import(`./agents-vivPBsWo.js`);await t(e)}),D(t.command(`publish`).description(`Publish an agent to the workspace`).argument(`<agentId>`,`Agent to publish`)).action(async(e,t,n)=>{let{publishAgent:r}=await import(`./agents-vivPBsWo.js`);await r(e,n.optsWithGlobals())}),D(j(t.command(`share`).description(`Show or manage sharing (user grants)`).argument(`<agentId>`,`Agent to share`))).action(async(e,t,n)=>{let{shareAgent:r}=await import(`./agents-vivPBsWo.js`);await r(e,n.optsWithGlobals())})}function I(e){let t=e.command(`billing`).summary(`Show billing status and invoices`).helpGroup(M.workspace).addHelpText(`after`,`
8
+ Docs: https://entrydesk.com/docs/cli`)}function I(e){return e.option(`--connector-ids <ids>`,`Comma-separated connector ids`,T).option(`--capabilities <list>`,`Comma-separated capabilities (${u.join(`, `)})`,xe).option(`--conversation-starters <list>`,`Comma-separated conversation starters`,T).option(`--tools <list>`,`Comma-separated tool names (prefix__tool)`,T).option(`--icon-id <iconId>`,`Icon to use`)}function Te(e){let t=e.command(`agents`).summary(`List, show, create, publish, and share agents`).helpGroup(F.build);A(M(t.command(`list`,{isDefault:!0}).description(`List available agents`).option(`--me, --mine`,`List agents you own or edit, with their publish state`),100)).action(async(e,t)=>{let{listAgents:n}=await import(`./agents-CLcXSbBp.js`);await n(t.optsWithGlobals())}),A(t.command(`show`).description(`Show one agent's full details`).argument(`<agentId>`,`Agent to show`)).action(async(e,t,n)=>{let{showAgent:r}=await import(`./agents-CLcXSbBp.js`);await r(e,n.optsWithGlobals())}),A(I(t.command(`create`).description(`Create a new agent`).requiredOption(`--name <name>`,`Agent name`).requiredOption(`--description <text>`,`Short description`).requiredOption(`--system-prompt <text>`,`System prompt`).requiredOption(`--model-id <modelId>`,`Model to run the agent on`))).action(async(e,t)=>{let{createAgent:n}=await import(`./agents-CLcXSbBp.js`);await n(t.optsWithGlobals())}),A(I(t.command(`update`).description(`Update an agent you own`).argument(`<agentId>`,`Agent to update`).option(`--name <name>`,`Agent name`).option(`--description <text>`,`Short description`).option(`--system-prompt <text>`,`System prompt`).option(`--model-id <modelId>`,`Model to run the agent on`))).action(async(e,t,n)=>{let{updateAgent:r}=await import(`./agents-CLcXSbBp.js`);await r(e,n.optsWithGlobals())}),t.command(`delete`).description(`Delete an agent you own`).argument(`<agentId>`,`Agent to delete`).action(async e=>{let{deleteAgent:t}=await import(`./agents-CLcXSbBp.js`);await t(e)}),A(t.command(`publish`).description(`Publish an agent to the workspace`).argument(`<agentId>`,`Agent to publish`)).action(async(e,t,n)=>{let{publishAgent:r}=await import(`./agents-CLcXSbBp.js`);await r(e,n.optsWithGlobals())}),A(P(t.command(`share`).description(`Show or manage sharing (user grants)`).argument(`<agentId>`,`Agent to share`))).action(async(e,t,n)=>{let{shareAgent:r}=await import(`./agents-CLcXSbBp.js`);await r(e,n.optsWithGlobals())})}function Ee(e){let t=e.command(`billing`).summary(`Show billing status and invoices`).helpGroup(F.workspace).addHelpText(`after`,`
9
9
  Note: billing endpoints require an interactive login (OAuth); a workspace
10
- PAT (ENTRYDESK_TOKEN) cannot read billing.`);D(t.command(`status`,{isDefault:!0}).description(`Plan, seats, and extra-usage balance`)).action(async(e,t)=>{let{showBillingStatus:n}=await import(`./billing-BietwbvI.js`);await n(t.optsWithGlobals())}),D(k(t.command(`invoices`).description(`List finalized invoices`),20)).action(async(e,t)=>{let{listInvoices:n}=await import(`./billing-BietwbvI.js`);await n(t.optsWithGlobals())})}function L(e){if(!/^\d+(\.\d+)?$/u.test(e.trim()))throw new m(`must be a positive number`);return e}function R(e){let t=e.command(`budget`).summary(`View or manage the workspace budget`).helpGroup(M.workspace);D(t.command(`get`,{isDefault:!0}).description(`Show the current workspace budget`)).action(async(e,t)=>{let{showBudget:n}=await import(`./budget-DcULs51p.js`);await n(t.optsWithGlobals())}),D(t.command(`set`).description(`Set the workspace budget`).argument(`<amount>`,`Budget amount, e.g. 100.00`,L)).action(async(e,t,n)=>{let{setBudget:r}=await import(`./budget-DcULs51p.js`);await r(e,n.optsWithGlobals())}),D(t.command(`clear`).description(`Remove the workspace budget`)).action(async(e,t)=>{let{clearBudget:n}=await import(`./budget-DcULs51p.js`);await n(t.optsWithGlobals())})}const z=()=>new p(`<key>`,`Configuration key`).choices(t);function B(e){let t=e.command(`config`).summary(`Manage CLI configuration`).helpGroup(M.setup).addHelpText(`after`,()=>{let{apiUrl:e,hubUrl:t}=f();return`
10
+ PAT (ENTRYDESK_TOKEN) cannot read billing.`);A(t.command(`status`,{isDefault:!0}).description(`Plan, seats, and extra-usage balance`)).action(async(e,t)=>{let{showBillingStatus:n}=await import(`./billing-DHrYi0SU.js`);await n(t.optsWithGlobals())}),A(M(t.command(`invoices`).description(`List finalized invoices`),20)).action(async(e,t)=>{let{listInvoices:n}=await import(`./billing-DHrYi0SU.js`);await n(t.optsWithGlobals())})}function De(e){if(!/^\d+(\.\d+)?$/u.test(e.trim()))throw new v(`must be a positive number`);return e}function Oe(e){let t=e.command(`budget`).summary(`View or manage the workspace budget`).helpGroup(F.workspace);A(t.command(`get`,{isDefault:!0}).description(`Show the current workspace budget`)).action(async(e,t)=>{let{showBudget:n}=await import(`./budget-D_DDPBBb.js`);await n(t.optsWithGlobals())}),A(t.command(`set`).description(`Set the workspace budget`).argument(`<amount>`,`Budget amount, e.g. 100.00`,De)).action(async(e,t,n)=>{let{setBudget:r}=await import(`./budget-D_DDPBBb.js`);await r(e,n.optsWithGlobals())}),A(t.command(`clear`).description(`Remove the workspace budget`)).action(async(e,t)=>{let{clearBudget:n}=await import(`./budget-D_DDPBBb.js`);await n(t.optsWithGlobals())})}const L=()=>new pe(`<key>`,`Configuration key`).choices(ie);function ke(e){let n=e.command(`config`).summary(`Manage CLI configuration`).helpGroup(F.setup).addHelpText(`after`,()=>{let{apiUrl:e,hubUrl:n}=t();return`
11
11
  Keys:
12
12
  apiUrl API server URL (default: ${e})
13
- hubUrl Hub server URL (default: ${t})
13
+ hubUrl Hub server URL (default: ${n})
14
14
 
15
15
  Examples:
16
16
  entrydesk config set apiUrl http://localhost:3200
17
17
  entrydesk config get apiUrl
18
- entrydesk config unset apiUrl`});D(t.command(`list`,{isDefault:!0}).description(`List all configuration`)).action(async(e,t)=>{let{listConfig:n}=await import(`./config-CI3k8CUK.js`);n(t.optsWithGlobals())}),D(t.command(`get`).description(`Get a configuration value`).addArgument(z())).action(async(e,t,n)=>{let{getConfigValue:r}=await import(`./config-CI3k8CUK.js`);r(e,n.optsWithGlobals())}),t.command(`set`).description(`Set a configuration value`).addArgument(z()).argument(`<value>`,`Value to store`).action(async(e,t)=>{let{setConfigValue:n}=await import(`./config-CI3k8CUK.js`);n(e,t)}),t.command(`unset`).description(`Remove a configuration value`).addArgument(z()).action(async e=>{let{unsetConfigValue:t}=await import(`./config-CI3k8CUK.js`);t(e)})}function V(t){let n=t.command(`connectors`).summary(`List connectors and connect/disconnect them`).helpGroup(M.workspace);D(O(n.command(`list`,{isDefault:!0}).description(`List connected connectors`).option(`--all`,`Include connectors you haven't connected yet`).option(`--search <query>`,`Filter by name`,y(200)),100)).action(async(e,t)=>{let{listConnectors:n}=await import(`./connectors-CbkKDKQQ.js`);await n(t.optsWithGlobals())}),D(n.command(`tools`).description(`List the tools a connector exposes`).argument(`<connectorId>`,`Connector to inspect`)).action(async(e,t,n)=>{let{listConnectorTools:r}=await import(`./connectors-CbkKDKQQ.js`);await r(e,n.optsWithGlobals())}),D(n.command(`connect`).description(`Connect a connector`).argument(`<connectorId>`,`Connector to connect`).addOption(new h(`--token <token>`,`Connect with a static token / API key`).conflicts([`username`,`password`,`oauth`])).addOption(new h(`--username <username>`,`Connect with credentials (prefer env vars; argv is visible in process listings)`).conflicts(`oauth`)).addOption(new h(`--password <password>`,`Password to pair with --username`).conflicts(`oauth`)).option(`--oauth`,`Print an OAuth URL to open in your browser`)).action(async(e,t,n)=>{let{connectConnector:r}=await import(`./connectors-CbkKDKQQ.js`);await r(e,n.optsWithGlobals())}),D(n.command(`create`).description(`Create a custom connector pointing at a remote MCP server`).requiredOption(`--name <name>`,`Display name (letters, digits and single spaces)`,se).requiredOption(`--url <url>`,`MCP server URL`).requiredOption(`--description <text>`,`What the connector is for`,y(500)).addOption(new h(`--transport <transport>`,`MCP transport`).choices(o.options).default(`streamable_http`)).option(`--tool-prefix <prefix>`,`Namespace for this connector's tools (default: the name, lowercased)`,b).addOption(new h(`--auth <type>`,`Authorization the server requires; omit for an open server`).choices(e.options)).option(`--provider <name>`,`OAuth provider name, as configured in the workspace (required for --auth oauth / google-iap)`).option(`--scope <scope...>`,`OAuth scope, repeatable (required for --auth oauth / google-iap)`)).action(async(e,t)=>{let{createConnector:n}=await import(`./connectors-CbkKDKQQ.js`);await n(t.optsWithGlobals())}),D(n.command(`disconnect`).description(`Remove your connection to a connector`).argument(`<connectorId>`,`Connector to disconnect`).option(`-y, --yes`,`Skip the confirmation prompt`)).action(async(e,t,n)=>{let{disconnectConnector:r}=await import(`./connectors-CbkKDKQQ.js`);await r(e,n.optsWithGlobals())})}const H=e=>new h(`--type <type>`,e).choices(ee);function pe(e){let t=e.command(`marketplace`).summary(`Browse and install marketplace agents and skills`).helpGroup(M.build).addHelpText(`after`,`
18
+ entrydesk config unset apiUrl`});A(n.command(`list`,{isDefault:!0}).description(`List all configuration`)).action(async(e,t)=>{let{listConfig:n}=await import(`./config-hGzOCx4u.js`);n(t.optsWithGlobals())}),A(n.command(`get`).description(`Get a configuration value`).addArgument(L())).action(async(e,t,n)=>{let{getConfigValue:r}=await import(`./config-hGzOCx4u.js`);r(e,n.optsWithGlobals())}),n.command(`set`).description(`Set a configuration value`).addArgument(L()).argument(`<value>`,`Value to store`).action(async(e,t)=>{let{setConfigValue:n}=await import(`./config-hGzOCx4u.js`);n(e,t)}),n.command(`unset`).description(`Remove a configuration value`).addArgument(L()).action(async e=>{let{unsetConfigValue:t}=await import(`./config-hGzOCx4u.js`);t(e)})}function Ae(e){let t=e.command(`connectors`).summary(`List connectors and connect/disconnect them`).helpGroup(F.workspace);A(j(t.command(`list`,{isDefault:!0}).description(`List connected connectors`).option(`--all`,`Include connectors you haven't connected yet`).option(`--search <query>`,`Filter by name`,C(200)),100)).action(async(e,t)=>{let{listConnectors:n}=await import(`./connectors-CxzG22No.js`);await n(t.optsWithGlobals())}),A(t.command(`tools`).description(`List the tools a connector exposes`).argument(`<connectorId>`,`Connector to inspect`)).action(async(e,t,n)=>{let{listConnectorTools:r}=await import(`./connectors-CxzG22No.js`);await r(e,n.optsWithGlobals())}),A(t.command(`connect`).description(`Connect a connector`).argument(`<connectorId>`,`Connector to connect`).addOption(new y(`--token <token>`,`Connect with a static token / API key`).conflicts([`username`,`password`,`oauth`])).addOption(new y(`--username <username>`,`Connect with credentials (prefer env vars; argv is visible in process listings)`).conflicts(`oauth`)).addOption(new y(`--password <password>`,`Password to pair with --username`).conflicts(`oauth`)).option(`--oauth`,`Print an OAuth URL to open in your browser`)).action(async(e,t,n)=>{let{connectConnector:r}=await import(`./connectors-CxzG22No.js`);await r(e,n.optsWithGlobals())}),A(t.command(`create`).description(`Create a custom connector pointing at a remote MCP server`).requiredOption(`--name <name>`,`Display name (letters, digits and single spaces)`,ge).requiredOption(`--url <url>`,`MCP server URL`).requiredOption(`--description <text>`,`What the connector is for`,C(500)).addOption(new y(`--transport <transport>`,`MCP transport`).choices(n.options).default(`streamable_http`)).option(`--tool-prefix <prefix>`,`Namespace for this connector's tools (default: the name, lowercased)`,_e).addOption(new y(`--auth <type>`,`Authorization the server requires; omit for an open server`).choices(ne.options)).option(`--provider <name>`,`OAuth provider name, as configured in the workspace (required for --auth oauth / google-iap)`).option(`--scope <scope...>`,`OAuth scope, repeatable (required for --auth oauth / google-iap)`)).action(async(e,t)=>{let{createConnector:n}=await import(`./connectors-CxzG22No.js`);await n(t.optsWithGlobals())}),A(t.command(`disconnect`).description(`Remove your connection to a connector`).argument(`<connectorId>`,`Connector to disconnect`).option(`-y, --yes`,`Skip the confirmation prompt`)).action(async(e,t,n)=>{let{disconnectConnector:r}=await import(`./connectors-CxzG22No.js`);await r(e,n.optsWithGlobals())})}const R=e=>new y(`--type <type>`,e).choices(i);function je(e){let t=e.command(`marketplace`).summary(`Browse and install marketplace agents and skills`).helpGroup(F.build).addHelpText(`after`,`
19
19
  Note: search/show are public; install requires login and CreateAgent/CreateSkill
20
- permission in the current workspace.`);D(t.command(`search`,{isDefault:!0}).description(`List marketplace agents and skills`).argument(`[tag]`,`Filter by a tag (shorthand for --tag)`).addOption(H(`Only list this resource type`)).option(`--tag <tag>`,`Filter by a tag`).option(`--limit <number>`,`Max results (default: 30)`,_(1,100)).option(`--cursor <key>`,`Pagination cursor from a previous page`)).action(async(e,t,n)=>{let{searchMarketplace:r}=await import(`./marketplace-CaIuJP0T.js`);await r(e,n.optsWithGlobals())}),D(t.command(`show`).description(`Show an agent or skill's details`).argument(`<slug>`,`Marketplace slug`).addOption(H(`Resource type (auto-detected when omitted)`))).action(async(e,t,n)=>{let{showMarketplaceResource:r}=await import(`./marketplace-CaIuJP0T.js`);await r(e,n.optsWithGlobals())}),D(t.command(`install`).description(`Install an agent or skill into the current workspace`).argument(`<slug>`,`Marketplace slug`).addOption(H(`Resource type (auto-detected when omitted)`))).action(async(e,t,n)=>{let{installMarketplaceResource:r}=await import(`./marketplace-CaIuJP0T.js`);await r(e,n.optsWithGlobals())}),D(t.command(`roles`).description(`List role tags you can filter by`)).action(async(e,t)=>{let{showMarketplaceRoles:n}=await import(`./marketplace-CaIuJP0T.js`);await n(t.optsWithGlobals())})}const me=[`mine`,`shared`,`all`],he=[`updated_at`,`start_time`],ge=[`no-repeat`,`minutes`,`hours`,`days`,`weeks`,`months`],U=[`stream-json`],W=[`cost`,`operations`],_e=[`user`,`agent`,`schedule`,`model`];function G(e){return e.option(`--description <text>`,`Meeting description`).option(`--location <text>`,`Meeting location`).option(`--start <iso>`,`Start time, ISO 8601`).option(`--end <iso>`,`End time, ISO 8601`).option(`--conference-link <url>`,`Conference link`).option(`--notes <text>`,`Meeting notes`)}function ve(e){let t=e.command(`meeting`).summary(`Manage meetings, summaries, transcripts, and sharing`).helpGroup(M.build);D(k(t.command(`list`,{isDefault:!0}).description(`List meetings`).addOption(new h(`--filter <scope>`,`Filter meetings`).choices(me).default(`all`)).option(`--search <text>`,`Search title and description`).addOption(new h(`--sort <field>`,`Sort order`).choices(he).default(`updated_at`)),20)).action(async(e,t)=>{let{listMeetings:n}=await import(`./meeting-CWv3iUU6.js`);await n(t.optsWithGlobals())}),D(t.command(`get`).description(`Show meeting details and its recordings`).argument(`<meetingId>`,`Meeting to show`)).action(async(e,t,n)=>{let{showMeeting:r}=await import(`./meeting-CWv3iUU6.js`);await r(e,n.optsWithGlobals())}),D(G(t.command(`create`).description(`Create a meeting manually`).requiredOption(`--title <text>`,`Meeting title`))).action(async(e,t)=>{let{createMeeting:n}=await import(`./meeting-CWv3iUU6.js`);await n(t.optsWithGlobals())}),D(G(t.command(`update`).description(`Update a meeting`).argument(`<meetingId>`,`Meeting to update`).option(`--title <text>`,`Meeting title`)).addOption(new h(`--status <status>`,`Meeting status`).choices(r.options)).addOption(new h(`--visibility <visibility>`,`Who can see it`).choices(i.options))).action(async(e,t,n)=>{let{updateMeeting:r}=await import(`./meeting-CWv3iUU6.js`);await r(e,n.optsWithGlobals())}),D(t.command(`delete`).description(`Delete a meeting (soft delete)`).argument(`<meetingId>`,`Meeting to delete`)).action(async(e,t,n)=>{let{deleteMeeting:r}=await import(`./meeting-CWv3iUU6.js`);await r(e,n.optsWithGlobals())}),D(t.command(`summary`).description(`Print the meeting summary (markdown) to stdout`).argument(`<meetingId>`,`Meeting to summarize`)).action(async(e,t,n)=>{let{showMeetingSummary:r}=await import(`./meeting-CWv3iUU6.js`);await r(e,n.optsWithGlobals())}),D(t.command(`transcript`).description(`Print a recording transcript to stdout`).argument(`<recordingId>`,`Recording to transcribe`).option(`--raw`,`Output the raw transcript with timestamps`)).action(async(e,t,n)=>{let{showMeetingTranscript:r}=await import(`./meeting-CWv3iUU6.js`);await r(e,n.optsWithGlobals())}),D(t.command(`previous`).description(`Show the previous meeting's brief in the same series`).argument(`<meetingId>`,`Meeting whose series to look back in`)).action(async(e,t,n)=>{let{showPreviousMeeting:r}=await import(`./meeting-CWv3iUU6.js`);await r(e,n.optsWithGlobals())}),D(A(t.command(`share`).description(`Show or manage sharing (visibility, user/team grants)`).argument(`<meetingId>`,`Meeting to share`).addOption(new h(`--visibility <visibility>`,`Change who can see the meeting (owner only)`).choices(i.options))).addOption(new h(`--add-team <teamId>`,`Grant a team access`).conflicts(`removeTeam`)).option(`--remove-team <teamId>`,`Revoke a team's access`).addOption(new h(`--role <role>`,`Role for --add-user/--add-team`).choices(n.options).default(n.enum.viewer))).action(async(e,t,n)=>{let{shareMeeting:r}=await import(`./meeting-CWv3iUU6.js`);await r(e,n.optsWithGlobals())})}function ye(e){let t=e.command(`notifications`).summary(`List, count, or mark notifications read`).helpGroup(M.build);D(k(t.command(`list`,{isDefault:!0}).description(`List notifications`).addOption(new h(`--tab <tab>`,`Filter by category`).choices(a).default(`all`)).option(`--event-type <type>`,`Filter by a single event type (e.g. task_complete)`),20)).action(async(e,t)=>{let{listNotifications:n}=await import(`./notifications-CBLIBZtc.js`);await n(t.optsWithGlobals())}),D(t.command(`unread`).description(`Show the unread notification count`)).action(async(e,t)=>{let{showUnreadCount:n}=await import(`./notifications-CBLIBZtc.js`);await n(t.optsWithGlobals())}),D(t.command(`read`).description(`Mark a notification as read`).argument(`<notificationId>`,`Notification to mark read`)).action(async(e,t,n)=>{let{markNotificationRead:r}=await import(`./notifications-CBLIBZtc.js`);await r(e,n.optsWithGlobals())}),D(t.command(`read-all`).description(`Mark every notification as read`)).action(async(e,t)=>{let{markAllNotificationsRead:n}=await import(`./notifications-CBLIBZtc.js`);await n(t.optsWithGlobals())})}function be(e){let t=e.command(`profile`).summary(`Manage profiles`).helpGroup(M.setup);D(t.command(`list`,{isDefault:!0}).description(`List profiles`)).action(async(e,t)=>{let{listProfiles:n}=await import(`./profile-1uJ5EHdo.js`);n(t.optsWithGlobals())}),D(t.command(`current`).description(`Show the active profile`)).action(async(e,t)=>{let{showCurrentProfile:n}=await import(`./profile-1uJ5EHdo.js`);n(t.optsWithGlobals())}),D(t.command(`show`).description(`Show profile details`).argument(`[name]`,`Profile to show`)).action(async(e,t,n)=>{let{showProfile:r}=await import(`./profile-1uJ5EHdo.js`);await r(e,n.optsWithGlobals())}),D(t.command(`create`).description(`Create a profile`).argument(`[name]`,`Profile name (default: default)`)).action(async(e,t,n)=>{let{createProfile:r}=await import(`./profile-1uJ5EHdo.js`);r(e,n.optsWithGlobals())}),D(t.command(`use`).alias(`switch`).description(`Switch the active profile`).argument(`[name]`,`Profile to switch to`)).action(async(e,t,n)=>{let{useProfile:r}=await import(`./profile-1uJ5EHdo.js`);r(e,n.optsWithGlobals())}),D(t.command(`delete`).aliases([`remove`,`rm`]).description(`Delete a profile`).argument(`[name]`,`Profile to delete`)).action(async(e,t,n)=>{let{deleteProfile:r}=await import(`./profile-1uJ5EHdo.js`);await r(e,n.optsWithGlobals())}),D(t.command(`rename`).aliases([`move`,`mv`]).description(`Rename a profile`).argument(`<from>`,`Existing profile name`).argument(`<to>`,`New profile name`)).action(async(e,t,n,r)=>{let{renameProfile:i}=await import(`./profile-1uJ5EHdo.js`);await i(e,t,r.optsWithGlobals())}),D(t.command(`clone`).alias(`copy`).description(`Clone config defaults into a new profile (no credentials)`).argument(`<from>`,`Profile to clone`).argument(`<to>`,`New profile name`)).action(async(e,t,n,r)=>{let{cloneProfile:i}=await import(`./profile-1uJ5EHdo.js`);await i(e,t,r.optsWithGlobals())})}function xe(e){let t=e.command(`recordings`).summary(`List, import, retry, and manage recordings`).helpGroup(M.build).addHelpText(`after`,"\nNote: full transcripts live in `entrydesk meeting transcript <recordingId>`.");D(O(t.command(`list`,{isDefault:!0}).description(`List recordings`).option(`--search <query>`,`Filter by title/transcript`,y(200)),20)).action(async(e,t)=>{let{listRecordings:n}=await import(`./recordings-C0Ij3tfP.js`);await n(t.optsWithGlobals())}),D(t.command(`get`).description(`Show a recording's metadata, summary, and status`).argument(`<recordingId>`,`Recording to show`)).action(async(e,t,n)=>{let{showRecording:r}=await import(`./recordings-C0Ij3tfP.js`);await r(e,n.optsWithGlobals())}),D(t.command(`import`).description(`Import a recording from a media URL`).argument(`<url>`,`Media URL to import`).option(`--title <text>`,`Title for the imported recording`).option(`--model <modelId>`,`Model for transcription and summary`).option(`--language <code>`,`Preferred transcript language (e.g. zh-TW)`)).action(async(e,t,n)=>{let{importRecording:r}=await import(`./recordings-C0Ij3tfP.js`);await r(e,n.optsWithGlobals())}),D(t.command(`preview`).description(`Preview a media URL's metadata before importing`).argument(`<url>`,`Media URL to preview`)).action(async(e,t,n)=>{let{previewRecording:r}=await import(`./recordings-C0Ij3tfP.js`);await r(e,n.optsWithGlobals())}),D(t.command(`audio-url`).description(`Get a signed URL to stream or download the audio`).argument(`<recordingId>`,`Recording to link`)).action(async(e,t,n)=>{let{showRecordingAudioUrl:r}=await import(`./recordings-C0Ij3tfP.js`);await r(e,n.optsWithGlobals())}),D(t.command(`retry`).description(`Retry processing of a failed recording`).argument(`<recordingId>`,`Recording to retry`)).action(async(e,t,n)=>{let{retryRecording:r}=await import(`./recordings-C0Ij3tfP.js`);await r(e,n.optsWithGlobals())}),D(t.command(`delete`).description(`Delete a recording`).argument(`<recordingId>`,`Recording to delete`).option(`-y, --yes`,`Skip the confirmation prompt`)).action(async(e,t,n)=>{let{deleteRecording:r}=await import(`./recordings-C0Ij3tfP.js`);await r(e,n.optsWithGlobals())})}const Se=[...new Set(c.map(e=>e.toolApprovalMode))],Ce=[...new Set(c.map(e=>e.approvalHandling))];function K(e){return e.addOption(new h(`--tool-approval-mode <mode>`,`Which tools runs may use without asking: always_allow gates nothing, auto gates high-risk tools. Pass with --approval-handling`).choices(Se)).addOption(new h(`--approval-handling <handling>`,`What a run does at a gated tool: ask pauses until approved in Hub, deny skips the call, bypass runs it. Pass with --tool-approval-mode`).choices(Ce)).option(`--allowed-tools <tools...>`,`Pre-authorize these tools for this schedule (comma or space separated)`,w).option(`--disallowed-tools <tools...>`,`Block these tools for this schedule. Wins over --allowed-tools`,w)}function q(e){return e.option(`--utc-offset <offset>`,`Timezone offset, e.g. +08:00`).option(`--holiday-calendars <ids>`,`Comma-separated connected calendar ids to skip on holiday`,x).addOption(new h(`--repeat-type <type>`,`Repeat unit`).choices(ge)).option(`--every <n>`,`Repeat every N units`,_(1,1e3)).option(`--time <HH:MM>`,`Time of day (days, weeks, months)`,T).option(`--times <HH:MM,...>`,`Multiple daily trigger times (days only)`,de).option(`--days-of-week <0-6>`,`Comma-separated days, 0=Sunday`,S(0,6)).option(`--days-of-month <1-31>`,`Comma-separated days of the month`,S(1,31)).option(`--last-day-of-month`,`Include the last day of the month`).option(`--daily-windows <ranges>`,`Comma-separated HH:MM-HH:MM active-time windows (minutes, hours)`,fe)}function we(e){let t=e.command(`schedules`).summary(`Create and manage scheduled tasks`).helpGroup(M.build);D(t.command(`list`,{isDefault:!0}).description(`List schedules`)).action(async(e,t)=>{let{listSchedules:n}=await import(`./schedules-CFjtG3p4.js`);await n(t.optsWithGlobals())}),D(t.command(`get`).description(`Show schedule details`).argument(`<scheduleId>`,`Schedule to show`)).action(async(e,t,n)=>{let{showSchedule:r}=await import(`./schedules-CFjtG3p4.js`);await r(e,n.optsWithGlobals())}),D(K(q(t.command(`create`).description(`Create a new schedule`).requiredOption(`--name <name>`,`Schedule name`).requiredOption(`--prompt <text>`,`Prompt to send to the agent`).requiredOption(`--agent-id <id>`,`Agent to run`).requiredOption(`--starts-at <datetime>`,`Start time, ISO 8601`)))).action(async(e,t)=>{let{createSchedule:n}=await import(`./schedules-CFjtG3p4.js`);await n(t.optsWithGlobals())}),D(K(q(t.command(`edit`).description(`Update a schedule (only the fields you pass)`).argument(`<scheduleId>`,`Schedule to update`).option(`--name <name>`,`Schedule name`).option(`--prompt <text>`,`Prompt to send to the agent`).option(`--agent-id <id>`,`Agent to run`).option(`--starts-at <datetime>`,`Start time, ISO 8601`)))).action(async(e,t,n)=>{let{editSchedule:r}=await import(`./schedules-CFjtG3p4.js`);await r(e,n.optsWithGlobals())}),D(t.command(`activate`).description(`Resume a paused schedule`).argument(`<scheduleId>`,`Schedule to activate`)).action(async(e,t,n)=>{let{setScheduleActive:r}=await import(`./schedules-CFjtG3p4.js`);await r(e,!0,n.optsWithGlobals())}),D(t.command(`pause`).description(`Pause an active schedule`).argument(`<scheduleId>`,`Schedule to pause`)).action(async(e,t,n)=>{let{setScheduleActive:r}=await import(`./schedules-CFjtG3p4.js`);await r(e,!1,n.optsWithGlobals())}),D(t.command(`run`).description(`Run a schedule now; prints the created taskId`).argument(`<scheduleId>`,`Schedule to run`)).action(async(e,t,n)=>{let{runScheduleNow:r}=await import(`./schedules-CFjtG3p4.js`);await r(e,n.optsWithGlobals())}),D(k(t.command(`runs`).description(`List a schedule's run history`).argument(`<scheduleId>`,`Schedule whose runs to list`),20)).action(async(e,t,n)=>{let{listScheduleRuns:r}=await import(`./schedules-CFjtG3p4.js`);await r(e,n.optsWithGlobals())}),t.command(`delete`).description(`Delete a schedule`).argument(`<scheduleId>`,`Schedule to delete`).action(async e=>{let{deleteSchedule:t}=await import(`./schedules-CFjtG3p4.js`);await t(e)}),D(t.command(`calendars`).description(`List connected calendar accounts`)).action(async(e,t)=>{let{listCalendarAccounts:n}=await import(`./schedules-CFjtG3p4.js`);await n(t.optsWithGlobals())})}function Te(e){D(e.command(`login`).summary(`Log in to EntryDesk`).helpGroup(M.setup)).action(async(e,t)=>{let{runLogin:n}=await import(`./login-y8SlHgZ4.js`);await n(t.optsWithGlobals())})}function Ee(e){e.command(`logout`).summary(`Log out and clear credentials`).helpGroup(M.setup).action(async()=>{let{runLogout:e}=await import(`./logout-CGGEe0it.js`);await e()})}function De(e){D(e.command(`status`).summary(`Show who you are logged in as`).helpGroup(M.setup)).action(async(e,t)=>{let{runStatus:n}=await import(`./status-D6ebFbsw.js`);await n(t.optsWithGlobals())})}function Oe(e){D(e.command(`models`).summary(`List available models`).helpGroup(M.workspace)).action(async(e,t)=>{let{runModels:n}=await import(`./models-DFEIoTPH.js`);await n(t.optsWithGlobals())})}function ke(e){e.command(`version`).summary(`Show the version number`).helpGroup(M.setup).action(()=>console.log(e.version()))}function Ae(e){D(e.command(`update`).summary(`Update the CLI to the latest version`).helpGroup(M.setup).option(`--check`,`Only check for a newer version, don't install`)).action(async(e,t)=>{let{runUpdate:n}=await import(`./update-DhNwkiwD.js`);await n(t.optsWithGlobals())})}function je(e){e.command(`mcp-server`).summary(`Start the MCP server (stdio or HTTP)`).helpGroup(M.setup).option(`--http`,`Serve over HTTP instead of stdio`).option(`-p, --port <number>`,`Port to listen on`,_(1,65535)).action(async e=>{let{startMcpServer:t}=await import(`./mcp-Yz1qXxIb.js`);await t({mode:e.http?`http`:`stdio`,port:e.port})})}function J(e){return e.option(`-g, --global`,`Act at user (global) scope instead of the project`)}function Y(e){return e.option(`-a, --agent <agentId>`,`Restrict install to specific agents (repeatable; '*' for all)`,C)}function Me(e){let t=e.command(`skills`).summary(`List, upload, version, toggle, and share skills`).helpGroup(M.build);D(J(t.command(`list`,{isDefault:!0}).description(`List available skills`).option(`--me, --mine`,`Only skills you created`).option(`--local`,`Only locally-tracked skills`).option(`--remote`,`Only workspace skills`).option(`--all`,`Both local and remote, merged`))).action(async(e,t)=>{let{listSkills:n}=await import(`./skills-16msznfK.js`);await n(t.optsWithGlobals())}),D(t.command(`upload`).description(`Upload a skill zip file or folder`).argument(`<path>`,`Zip file or folder to upload`).option(`--force`,`Overwrite an existing skill with the same name`)).action(async(e,t,n)=>{let{uploadSkill:r}=await import(`./skills-16msznfK.js`);await r(e,n.optsWithGlobals())}),D(t.command(`toggle`).description(`Enable or disable a skill for yourself`).argument(`<skillId>`,`Skill to toggle`).addOption(new h(`--enable`,`Turn the skill on`).conflicts(`disable`)).option(`--disable`,`Turn the skill off`)).action(async(e,t,n)=>{let{toggleSkill:r}=await import(`./skills-16msznfK.js`);await r(e,n.optsWithGlobals())}),D(t.command(`versions`).description(`List a skill's version history`).argument(`<skillId>`,`Skill to inspect`)).action(async(e,t,n)=>{let{listSkillVersions:r}=await import(`./skills-16msznfK.js`);await r(e,n.optsWithGlobals())}),D(j(t.command(`share`).description(`Show or manage sharing (user grants)`).argument(`<skillId>`,`Skill to share`))).action(async(e,t,n)=>{let{shareSkill:r}=await import(`./skills-16msznfK.js`);await r(e,n.optsWithGlobals())}),t.command(`delete`).description(`Delete a skill you own`).argument(`<skillId>`,`Skill to delete`).action(async e=>{let{deleteSkill:t}=await import(`./skills-16msznfK.js`);await t(e)}),D(t.command(`download`).description(`Download and extract a skill to ./<skill-name>/`).argument(`<skillId>`,`Skill to download`)).action(async(e,t,n)=>{let{downloadSkill:r}=await import(`./skills-16msznfK.js`);await r(e,n.optsWithGlobals())}),D(Y(J(t.command(`add`).description(`Install a skill from an EntryDesk slug/id, a git URL, or a local path`).argument(`<source>`,`Skill source`)))).action(async(e,t,n)=>{let{addSkill:r}=await import(`./skills-16msznfK.js`);await r(e,n.optsWithGlobals())}),D(Y(J(t.command(`pull`).description(`Download the latest from the workspace`).argument(`[nameOrId]`,`Skill to pull (default: every tracked one)`)))).action(async(e,t,n)=>{let{pullSkill:r}=await import(`./skills-16msznfK.js`);await r(e,n.optsWithGlobals())}),D(J(t.command(`push`).description(`Upload local changes to the workspace`).argument(`[name]`,`Skill to push (default: every changed one)`).option(`--force`,`Overwrite the workspace copy`))).action(async(e,t,n)=>{let{pushSkill:r}=await import(`./skills-16msznfK.js`);await r(e,n.optsWithGlobals())}),D(J(t.command(`status`).description(`Show local vs workspace drift`))).action(async(e,t)=>{let{showSkillsStatus:n}=await import(`./skills-16msznfK.js`);await n(t.optsWithGlobals())}),D(J(t.command(`remove`).description(`Uninstall a skill locally`).argument(`<name>`,`Skill to remove`).option(`--remote`,`Also delete the skill from the workspace`))).action(async(e,t,n)=>{let{removeSkill:r}=await import(`./skills-16msznfK.js`);await r(e,n.optsWithGlobals())}),D(J(t.command(`link`).description(`Bind this directory (or the user) to a workspace`).argument(`[workspaceId]`,`Workspace to bind to`))).action(async(e,t,n)=>{let{linkSkillsDirectory:r}=await import(`./skills-16msznfK.js`);await r(e,n.optsWithGlobals())}),D(J(t.command(`unlink`).description(`Remove the workspace binding`))).action(async(e,t)=>{let{runSkillsUnlink:n}=await import(`./commands-BCLJEd6x.js`);n(t.optsWithGlobals())})}function Ne(e){e.command(`task`,{isDefault:!0}).summary(`Send a message or run an interactive task`).description(`Send a message to a model or agent, or start an interactive session.`).helpGroup(M.chat).option(`-m, --message <text>`,`Message to send (or pipe via stdin)`).option(`--model <modelId>`,`Model to use (instead of an agent)`).option(`-a, --agent <agentId>`,`Agent to use (instead of --model)`).option(`-c, --continue <n>`,`Continue recent task #n`,_(1,20)).option(`-i, --interactive`,`Interactive mode (continuous chat)`).option(`--connectors <ids>`,`Limit to specific connectors (default: all connected)`,x).option(`--plain`,`Plain text output`).addOption(new h(`--output <mode>`,`Stream events as JSON`).choices(U)).option(`--full-output`,`Show full tool outputs`).option(`--file-system`,`Enable local file operations`).option(`--no-file-system`,`Disable local file operations`).addOption(new h(`--tool-approval-mode <mode>`,`Defaults to the mode /approval saved. Non-interactive runs deny every approval they are asked for`).choices(ne.options)).option(`--allowed-tools <tools...>`,`Pre-authorize these tools, so they run without asking (comma or space separated)`,w).option(`--disallowed-tools <tools...>`,`Refuse these tools. Wins over --allowed-tools and --tool-approval-mode`,w).option(`--dangerously-auto-approve-tools`,`Deprecated alias for --tool-approval-mode always_allow`).addHelpText(`after`,`
20
+ permission in the current workspace.`);A(t.command(`search`,{isDefault:!0}).description(`List marketplace agents and skills`).argument(`[tag]`,`Filter by a tag (shorthand for --tag)`).addOption(R(`Only list this resource type`)).option(`--tag <tag>`,`Filter by a tag`).option(`--limit <number>`,`Max results (default: 30)`,x(1,100)).option(`--cursor <key>`,`Pagination cursor from a previous page`)).action(async(e,t,n)=>{let{searchMarketplace:r}=await import(`./marketplace-NSEUjhXf.js`);await r(e,n.optsWithGlobals())}),A(t.command(`show`).description(`Show an agent or skill's details`).argument(`<slug>`,`Marketplace slug`).addOption(R(`Resource type (auto-detected when omitted)`))).action(async(e,t,n)=>{let{showMarketplaceResource:r}=await import(`./marketplace-NSEUjhXf.js`);await r(e,n.optsWithGlobals())}),A(t.command(`install`).description(`Install an agent or skill into the current workspace`).argument(`<slug>`,`Marketplace slug`).addOption(R(`Resource type (auto-detected when omitted)`))).action(async(e,t,n)=>{let{installMarketplaceResource:r}=await import(`./marketplace-NSEUjhXf.js`);await r(e,n.optsWithGlobals())}),A(t.command(`roles`).description(`List role tags you can filter by`)).action(async(e,t)=>{let{showMarketplaceRoles:n}=await import(`./marketplace-NSEUjhXf.js`);await n(t.optsWithGlobals())})}function z(e){return e.option(`--description <text>`,`Meeting description`).option(`--location <text>`,`Meeting location`).option(`--start <iso>`,`Start time, ISO 8601`).option(`--end <iso>`,`End time, ISO 8601`).option(`--conference-link <url>`,`Conference link`).option(`--notes <text>`,`Meeting notes`)}function Me(t){let n=t.command(`meeting`).summary(`Manage meetings, summaries, transcripts, and sharing`).helpGroup(F.build);A(M(n.command(`list`,{isDefault:!0}).description(`List meetings`).addOption(new y(`--filter <scope>`,`Filter meetings`).choices(fe).default(`all`)).option(`--search <text>`,`Search title and description`).addOption(new y(`--sort <field>`,`Sort order`).choices(ue).default(`updated_at`)),20)).action(async(e,t)=>{let{listMeetings:n}=await import(`./meeting-yS83In45.js`);await n(t.optsWithGlobals())}),A(n.command(`get`).description(`Show meeting details and its recordings`).argument(`<meetingId>`,`Meeting to show`)).action(async(e,t,n)=>{let{showMeeting:r}=await import(`./meeting-yS83In45.js`);await r(e,n.optsWithGlobals())}),A(z(n.command(`create`).description(`Create a meeting manually`).requiredOption(`--title <text>`,`Meeting title`))).action(async(e,t)=>{let{createMeeting:n}=await import(`./meeting-yS83In45.js`);await n(t.optsWithGlobals())}),A(z(n.command(`update`).description(`Update a meeting`).argument(`<meetingId>`,`Meeting to update`).option(`--title <text>`,`Meeting title`)).addOption(new y(`--status <status>`,`Meeting status`).choices(se.options)).addOption(new y(`--visibility <visibility>`,`Who can see it`).choices(e.options))).action(async(e,t,n)=>{let{updateMeeting:r}=await import(`./meeting-yS83In45.js`);await r(e,n.optsWithGlobals())}),A(n.command(`delete`).description(`Delete a meeting (soft delete)`).argument(`<meetingId>`,`Meeting to delete`)).action(async(e,t,n)=>{let{deleteMeeting:r}=await import(`./meeting-yS83In45.js`);await r(e,n.optsWithGlobals())}),A(n.command(`summary`).description(`Print the meeting summary (markdown) to stdout`).argument(`<meetingId>`,`Meeting to summarize`)).action(async(e,t,n)=>{let{showMeetingSummary:r}=await import(`./meeting-yS83In45.js`);await r(e,n.optsWithGlobals())}),A(n.command(`transcript`).description(`Print a recording transcript to stdout`).argument(`<recordingId>`,`Recording to transcribe`).option(`--raw`,`Output the raw transcript with timestamps`)).action(async(e,t,n)=>{let{showMeetingTranscript:r}=await import(`./meeting-yS83In45.js`);await r(e,n.optsWithGlobals())}),A(n.command(`previous`).description(`Show the previous meeting's brief in the same series`).argument(`<meetingId>`,`Meeting whose series to look back in`)).action(async(e,t,n)=>{let{showPreviousMeeting:r}=await import(`./meeting-yS83In45.js`);await r(e,n.optsWithGlobals())}),A(N(n.command(`share`).description(`Show or manage sharing (visibility, user/team grants)`).argument(`<meetingId>`,`Meeting to share`).addOption(new y(`--visibility <visibility>`,`Change who can see the meeting (owner only)`).choices(e.options))).addOption(new y(`--add-team <teamId>`,`Grant a team access`).conflicts(`removeTeam`)).option(`--remove-team <teamId>`,`Revoke a team's access`).addOption(new y(`--role <role>`,`Role for --add-user/--add-team`).choices(s.options).default(s.enum.viewer))).action(async(e,t,n)=>{let{shareMeeting:r}=await import(`./meeting-yS83In45.js`);await r(e,n.optsWithGlobals())})}function Ne(e){let t=e.command(`notifications`).summary(`List, count, or mark notifications read`).helpGroup(F.build);A(M(t.command(`list`,{isDefault:!0}).description(`List notifications`).addOption(new y(`--tab <tab>`,`Filter by category`).choices(a).default(`all`)).option(`--event-type <type>`,`Filter by a single event type (e.g. task_complete)`),20)).action(async(e,t)=>{let{listNotifications:n}=await import(`./notifications-QF11-X32.js`);await n(t.optsWithGlobals())}),A(t.command(`unread`).description(`Show the unread notification count`)).action(async(e,t)=>{let{showUnreadCount:n}=await import(`./notifications-QF11-X32.js`);await n(t.optsWithGlobals())}),A(t.command(`read`).description(`Mark a notification as read`).argument(`<notificationId>`,`Notification to mark read`)).action(async(e,t,n)=>{let{markNotificationRead:r}=await import(`./notifications-QF11-X32.js`);await r(e,n.optsWithGlobals())}),A(t.command(`read-all`).description(`Mark every notification as read`)).action(async(e,t)=>{let{markAllNotificationsRead:n}=await import(`./notifications-QF11-X32.js`);await n(t.optsWithGlobals())})}function Pe(e){let t=e.command(`profile`).summary(`Manage profiles`).helpGroup(F.setup);A(t.command(`list`,{isDefault:!0}).description(`List profiles`)).action(async(e,t)=>{let{listProfiles:n}=await import(`./profile-WtKtO0yp.js`);n(t.optsWithGlobals())}),A(t.command(`current`).description(`Show the active profile`)).action(async(e,t)=>{let{showCurrentProfile:n}=await import(`./profile-WtKtO0yp.js`);n(t.optsWithGlobals())}),A(t.command(`show`).description(`Show profile details`).argument(`[name]`,`Profile to show`)).action(async(e,t,n)=>{let{showProfile:r}=await import(`./profile-WtKtO0yp.js`);await r(e,n.optsWithGlobals())}),A(t.command(`create`).description(`Create a profile`).argument(`[name]`,`Profile name (default: default)`)).action(async(e,t,n)=>{let{createProfile:r}=await import(`./profile-WtKtO0yp.js`);r(e,n.optsWithGlobals())}),A(t.command(`use`).alias(`switch`).description(`Switch the active profile`).argument(`[name]`,`Profile to switch to`)).action(async(e,t,n)=>{let{useProfile:r}=await import(`./profile-WtKtO0yp.js`);r(e,n.optsWithGlobals())}),A(t.command(`delete`).aliases([`remove`,`rm`]).description(`Delete a profile`).argument(`[name]`,`Profile to delete`)).action(async(e,t,n)=>{let{deleteProfile:r}=await import(`./profile-WtKtO0yp.js`);await r(e,n.optsWithGlobals())}),A(t.command(`rename`).aliases([`move`,`mv`]).description(`Rename a profile`).argument(`<from>`,`Existing profile name`).argument(`<to>`,`New profile name`)).action(async(e,t,n,r)=>{let{renameProfile:i}=await import(`./profile-WtKtO0yp.js`);await i(e,t,r.optsWithGlobals())}),A(t.command(`clone`).alias(`copy`).description(`Clone config defaults into a new profile (no credentials)`).argument(`<from>`,`Profile to clone`).argument(`<to>`,`New profile name`)).action(async(e,t,n,r)=>{let{cloneProfile:i}=await import(`./profile-WtKtO0yp.js`);await i(e,t,r.optsWithGlobals())})}const B="User id (a UUID); `project members <project>` prints one beside each member";function Fe(e,t){A(e.command(`create`).description(`Create a project. You become its owner; the id and Hub address are printed`).option(`--name <text>`,`Project name (required, up to 255 characters)`).option(`--description <text>`,`Project description (up to ${l} characters)`).option(`--instruction <text>`,`The standing brief every task in the project starts from (up to ${p} characters)`).option(`--instruction-file <path>`,"Read the instruction from a file, or `-` for stdin")).action(async(e,t)=>{let{createProject:n}=await import(`./project-governance-C7rl6gDW.js`);await n(t.optsWithGlobals())}),A(e.command(`delete`).summary(`Delete a project you own`).description(`Delete a project you own. Its tasks leave the project and return to their owners' main lists; its sources, assets and their version history are deleted. Without --yes the effects are listed and you are asked to confirm; a non-interactive run without --yes is refused.`).argument(`<project>`,t).option(`-y, --yes`,`Skip the confirmation prompt`)).action(async(e,t,n)=>{let{deleteProject:r}=await import(`./project-governance-C7rl6gDW.js`);await r(e,n.optsWithGlobals())}),A(e.command(`members`).description(`List the members of a project with their role and id`).argument(`<project>`,t)).action(async(e,t,n)=>{let{listProjectMembers:r}=await import(`./project-governance-C7rl6gDW.js`);await r(e,n.optsWithGlobals())}),A(e.command(`member-add`).description(`Add a workspace member to a project you own; it takes effect at once`).argument(`<project>`,t).argument(`<userId>`,B)).action(async(e,t,n,r)=>{let{addProjectMember:i}=await import(`./project-governance-C7rl6gDW.js`);await i(e,t,r.optsWithGlobals())}),A(e.command(`member-remove`).description(`Remove a member from a project you own, or pass your own id to leave it. The last owner cannot leave`).argument(`<project>`,t).argument(`<userId>`,B)).action(async(e,t,n,r)=>{let{removeProjectMember:i}=await import(`./project-governance-C7rl6gDW.js`);await i(e,t,r.optsWithGlobals())}),A(e.command(`member-role`).description(`Set a member's role in a project you own. The last owner cannot be demoted`).argument(`<project>`,t).argument(`<userId>`,B).option(`--role <role>`,`New role: owner or member`)).action(async(e,t,n,r)=>{let{setProjectMemberRole:i}=await import(`./project-governance-C7rl6gDW.js`);await i(e,t,r.optsWithGlobals())})}const V="Project id, or a 1-based index into a plain `project list` (a `--filter` or `--all` listing prints no index). An index is resolved against the listing as it stands now, so pass an id when the reference has to be stable",H=`Task id — ${le}`;function Ie(e){A(e.command(`tasks`).description("List the tasks you can see in a project — the same listing as `entrydesk tasks --project`, printed with ids").argument(`<project>`,V).option(`-q, --search <query>`,`Search within those tasks`).option(`--limit <number>`,`Max tasks to return`,x(1,50)).option(`--next-key <cursor>`,`Fetch the next page using this cursor`)).action(async(e,t,n)=>{let{listProjectTasks:r}=await import(`./project-tasks-DaGBt4Cp.js`);await r(e,n.optsWithGlobals())}),A(e.command(`task-add`).description(`Move a task you own into a project. A task whose assets the project does not hold yet is refused until you confirm sharing them with every member`).argument(`<project>`,V).argument(`<taskId>`,H).option(`--confirm-asset-sharing`,`Share the task's assets with the project members as part of the move`)).action(async(e,t,n,r)=>{let{addTaskToProject:i}=await import(`./project-tasks-DaGBt4Cp.js`);await i(e,t,r.optsWithGlobals())}),A(e.command(`task-remove`).description(`Move a task you own out of a project. Any assets it produced stay in the project`).argument(`<project>`,V).argument(`<taskId>`,H)).action(async(e,t,n,r)=>{let{removeTaskFromProject:i}=await import(`./project-tasks-DaGBt4Cp.js`);await i(e,t,r.optsWithGlobals())}),A(e.command(`task-share`).description(`Share a task you own inside its project: with one member by id, or with every member by setting its visibility. One flag per call, never a prompt`).argument(`<project>`,V).argument(`<taskId>`,H).option(`--add-user [userId]`,`Let one project member view the task`).option(`--remove-user [userId]`,`Take one member's access back`).option(`--visibility [level]`,"Who can see the task: `project` is every member, `self` is you plus anyone you named").addHelpText(`after`,`
21
+ --add-user, --remove-user and --visibility are mutually exclusive, and each
22
+ needs its value; with none of them the command prints this usage and exits 1.
23
+
24
+ Examples:
25
+ entrydesk project task-share 1 <taskId> --add-user <userId>
26
+ entrydesk project task-share 1 <taskId> --remove-user <userId>
27
+ entrydesk project task-share 1 <taskId> --visibility project
28
+ entrydesk project task-share 1 <taskId> --visibility self`)).action(async(e,t,n,r)=>{let{shareProjectTask:i}=await import(`./project-tasks-DaGBt4Cp.js`);await i(e,t,r.optsWithGlobals())})}const U="Which kind of source, as `project sources` lists it: file or link",W="Id of the file or link, as `project sources` lists it";function Le(e){let t=e.command(`project`).summary(`Read and edit a project you belong to`).description(`Read and edit a project you belong to.
29
+
30
+ A project holds sources (the files and links you put in it), the tasks that belong to it, and the assets those tasks produce. Its instruction is the standing brief every task in the project starts from.
31
+
32
+ These commands read and edit the project itself; none of them talks to the AI.`).helpGroup(F.chat).addHelpText(`after`,`
33
+ Examples:
34
+ entrydesk project # List projects you belong to
35
+ entrydesk project list --filter mine
36
+ entrydesk project get 1 # …by its number in that list
37
+ entrydesk project get <projectId> # …by id, the stable reference
38
+ entrydesk project instruction 1 > brief.md
39
+ entrydesk project edit 1 --name "Q4 Launch"
40
+ cat brief.md | entrydesk project edit 1 --instruction-file -
41
+ git log -1 | entrydesk project note 1 --title "Fixed the login race"
42
+ entrydesk project sources 1
43
+ entrydesk project sources-add 1 ./brief.pdf --description "Launch brief"
44
+ entrydesk project sources-add 1 https://example.com/spec
45
+ entrydesk project sources-rm 1 link <linkId>
46
+ entrydesk project context-search 1 "login race" --type task
47
+ entrydesk project context-read 1 file <fileId>
48
+ entrydesk project create --name "Q4 Launch" --instruction-file brief.md
49
+ entrydesk project members 1
50
+ entrydesk project member-add 1 <userId>
51
+ entrydesk project delete 1
52
+ entrydesk project tasks 1
53
+ entrydesk project task-add 1 <taskId>
54
+ entrydesk project task-share 1 <taskId> --add-user <userId>`);A(M(t.command(`list`,{isDefault:!0}).description("List the projects you belong to. Positions are shown only on a plain listing, since that is what a `<project>` index resolves against").addOption(new y(`--filter <scope>`,`Which projects to list`).choices(oe.options)),20)).action(async(e,t)=>{let{listProjects:n}=await import(`./project-BhPYRsaZ.js`);await n(t.optsWithGlobals())}),A(t.command(`get`).description(`Show a project: members, counts, and its full instruction`).argument(`<project>`,V)).action(async(e,t,n)=>{let{showProject:r}=await import(`./project-BhPYRsaZ.js`);await r(e,n.optsWithGlobals())}),A(t.command(`instruction`).description(`Print a project's instruction as plain text, ready to pipe`).argument(`<project>`,V)).action(async(e,t,n)=>{let{showProjectInstruction:r}=await import(`./project-BhPYRsaZ.js`);await r(e,n.optsWithGlobals())}),A(t.command(`edit`).description(`Edit a project's name, description, or instruction`).argument(`<project>`,V).option(`--name <text>`,`New project name`,w(255)).option(`--description <text>`,`New project description`,C(l)).addOption(new y(`--instruction <text>`,`Replace the instruction with this text`).argParser(C(p)).conflicts([`instructionFile`,`clearInstruction`])).addOption(new y(`--instruction-file <path>`,"Read the instruction from a file, or `-` for stdin").conflicts(`clearInstruction`)).option(`--clear-instruction`,`Remove the instruction`)).action(async(e,t,n)=>{let{editProject:r}=await import(`./project-BhPYRsaZ.js`);await r(e,n.optsWithGlobals())}),A(t.command(`note`).summary(`Report a work note into a project, with no AI reply`).description("Report a work note into a project: a task under your name, private until you share it, that does not trigger an AI reply. Reach for `entrydesk task --project <project>` instead when you want the AI to answer.").argument(`<project>`,V).option(`-m, --message <text>`,`Note content; wins over --file and stdin`).option(`-f, --file <path>`,"Read the note from a file, or `-` for stdin; wins over piped stdin").option(`--title <text>`,`Note title; defaults to the content's first line`,w(100))).action(async(e,t,n)=>{let{reportProjectNote:r}=await import(`./project-BhPYRsaZ.js`);await r(e,n.optsWithGlobals())}),A(t.command(`sources`).description(`List the sources of a project — the files and links you put in it — with the retrieval description and, for links, the fetch status`).argument(`<project>`,V)).action(async(e,t,n)=>{let{listProjectSources:r}=await import(`./project-sources-CzylP6oS.js`);await r(e,n.optsWithGlobals())}),A(t.command(`sources-add`).description(`Add a source to a project: upload a local file, or add a link when the argument starts with http:// or https://`).argument(`<project>`,V).argument(`<path|url>`,`Path of a local file to upload, or an http(s) URL to add as a link`).option(`--description <text>`,`What this source is for, so the AI knows when to reach for it (up to ${m} characters)`).addHelpText(`after`,`
55
+ A link starts fetching its snapshot as soon as it is added; \`project sources\`
56
+ shows it as pending until the snapshot is ready.
57
+
58
+ Examples:
59
+ entrydesk project sources-add 1 ./brief.pdf
60
+ entrydesk project sources-add 1 https://example.com/spec --description "The API spec"`)).action(async(e,t,n,r)=>{let{addProjectSource:i}=await import(`./project-sources-write-6cBfdUfV.js`);await i(e,t,r.optsWithGlobals())}),A(t.command(`sources-edit`).description(`Edit a source's description — what it is for, so the AI knows when to reach for it`).argument(`<project>`,V).argument(`<file|link>`,U).argument(`<id>`,W).option(`--description <text>`,`The new description (up to ${m} characters); an empty string clears it`)).action(async(e,t,n,r,i)=>{let{editProjectSource:a}=await import(`./project-sources-write-6cBfdUfV.js`);await a(e,t,n,i.optsWithGlobals())}),A(t.command(`sources-refetch`).description(`Fetch a link's snapshot again; it shows as pending until the new snapshot is ready`).argument(`<project>`,V).argument(`<linkId>`,"Id of the link, as `project sources` lists it")).action(async(e,t,n,r)=>{let{refetchProjectSource:i}=await import(`./project-sources-write-6cBfdUfV.js`);await i(e,t,r.optsWithGlobals())}),A(t.command(`sources-rm`).description(`Remove a file or link from a project. Assets are removed in the Hub`).argument(`<project>`,V).argument(`<file|link>`,U).argument(`<id>`,W)).action(async(e,t,n,r,i)=>{let{removeProjectSource:a}=await import(`./project-sources-write-6cBfdUfV.js`);await a(e,t,n,i.optsWithGlobals())}),A(t.command(`context-search`).description(`Search a project's context — across the tasks you can see and its sources — and print a snippet of each match`).argument(`<project>`,V).argument(`<query>`,`Keywords to match`).option(`--type <type>`,`Search only one kind of source: task, file or link`).option(`--limit <number>`,`Max results (default: 10, up to 20)`)).action(async(e,t,n,r)=>{let{searchProjectContext:i}=await import(`./project-context-Cc_Js6n4.js`);await i(e,t,r.optsWithGlobals())}),A(t.command(`context-read`).description(`Print one piece of a project's context — a task you can see, or one of its sources — as plain text, ready to pipe`).argument(`<project>`,V).argument(`<sourceType>`,`What to read: task, file or link`).argument(`<id>`,`Id of the task, file or link`).option(`--full`,`Read a task in full instead of its summary. A file or a link snapshot has one depth — the server serves its stored text up to a fixed cap either way`).option(`--offset <number>`,`Resume a task from this character offset, as reported when the previous read was truncated; implies --full, the only depth an offset means anything against. A truncated file or link snapshot reports no offset because the server does not page one`).addHelpText(`after`,`
61
+ Only text reaches stdout. A file with no text to extract, and a link whose
62
+ snapshot is still being fetched or failed, print nothing there — the reason
63
+ goes to stderr and the exit code is non-zero, so a pipe never carries an
64
+ explanation where the content should be.
65
+
66
+ Examples:
67
+ entrydesk project context-read 1 file <fileId> > brief.md
68
+ entrydesk project context-read 1 task <taskId> --full`)).action(async(e,t,n,r,i)=>{let{readProjectContext:a}=await import(`./project-context-Cc_Js6n4.js`);await a(e,t,n,i.optsWithGlobals())}),Fe(t,V),Ie(t)}function Re(e){let t=e.command(`recordings`).summary(`List, import, retry, and manage recordings`).helpGroup(F.build).addHelpText(`after`,"\nNote: full transcripts live in `entrydesk meeting transcript <recordingId>`.");A(j(t.command(`list`,{isDefault:!0}).description(`List recordings`).option(`--search <query>`,`Filter by title/transcript`,C(200)),20)).action(async(e,t)=>{let{listRecordings:n}=await import(`./recordings-DoExjM1F.js`);await n(t.optsWithGlobals())}),A(t.command(`get`).description(`Show a recording's metadata, summary, and status`).argument(`<recordingId>`,`Recording to show`)).action(async(e,t,n)=>{let{showRecording:r}=await import(`./recordings-DoExjM1F.js`);await r(e,n.optsWithGlobals())}),A(t.command(`import`).description(`Import a recording from a media URL`).argument(`<url>`,`Media URL to import`).option(`--title <text>`,`Title for the imported recording`).option(`--model <modelId>`,`Model for transcription and summary`).option(`--language <code>`,`Preferred transcript language (e.g. zh-TW)`)).action(async(e,t,n)=>{let{importRecording:r}=await import(`./recordings-DoExjM1F.js`);await r(e,n.optsWithGlobals())}),A(t.command(`preview`).description(`Preview a media URL's metadata before importing`).argument(`<url>`,`Media URL to preview`)).action(async(e,t,n)=>{let{previewRecording:r}=await import(`./recordings-DoExjM1F.js`);await r(e,n.optsWithGlobals())}),A(t.command(`audio-url`).description(`Get a signed URL to stream or download the audio`).argument(`<recordingId>`,`Recording to link`)).action(async(e,t,n)=>{let{showRecordingAudioUrl:r}=await import(`./recordings-DoExjM1F.js`);await r(e,n.optsWithGlobals())}),A(t.command(`retry`).description(`Retry processing of a failed recording`).argument(`<recordingId>`,`Recording to retry`)).action(async(e,t,n)=>{let{retryRecording:r}=await import(`./recordings-DoExjM1F.js`);await r(e,n.optsWithGlobals())}),A(t.command(`delete`).description(`Delete a recording`).argument(`<recordingId>`,`Recording to delete`).option(`-y, --yes`,`Skip the confirmation prompt`)).action(async(e,t,n)=>{let{deleteRecording:r}=await import(`./recordings-DoExjM1F.js`);await r(e,n.optsWithGlobals())})}const ze=[...new Set(d.map(e=>e.toolApprovalMode))],Be=[...new Set(d.map(e=>e.approvalHandling))];function G(e){return e.addOption(new y(`--tool-approval-mode <mode>`,`Which tools runs may use without asking: always_allow gates nothing, auto gates high-risk tools. Pass with --approval-handling`).choices(ze)).addOption(new y(`--approval-handling <handling>`,`What a run does at a gated tool: ask pauses until approved in Hub, deny skips the call, bypass runs it. Pass with --tool-approval-mode`).choices(Be)).option(`--allowed-tools <tools...>`,`Pre-authorize these tools for this schedule (comma or space separated)`,D).option(`--disallowed-tools <tools...>`,`Block these tools for this schedule. Wins over --allowed-tools`,D)}function K(e){return e.option(`--utc-offset <offset>`,`Timezone offset, e.g. +08:00`).option(`--holiday-calendars <ids>`,`Comma-separated connected calendar ids to skip on holiday`,T).addOption(new y(`--repeat-type <type>`,`Repeat unit`).choices(_)).option(`--every <n>`,`Repeat every N units`,x(1,1e3)).option(`--time <HH:MM>`,`Time of day (days, weeks, months)`,O).option(`--times <HH:MM,...>`,`Multiple daily trigger times (days only)`,Se).option(`--days-of-week <0-6>`,`Comma-separated days, 0=Sunday`,E(0,6)).option(`--days-of-month <1-31>`,`Comma-separated days of the month`,E(1,31)).option(`--last-day-of-month`,`Include the last day of the month`).option(`--daily-windows <ranges>`,`Comma-separated HH:MM-HH:MM active-time windows (minutes, hours)`,Ce)}function Ve(e){let t=e.command(`schedules`).summary(`Create and manage scheduled tasks`).helpGroup(F.build);A(t.command(`list`,{isDefault:!0}).description(`List schedules`)).action(async(e,t)=>{let{listSchedules:n}=await import(`./schedules-tDaIGaad.js`);await n(t.optsWithGlobals())}),A(t.command(`get`).description(`Show schedule details`).argument(`<scheduleId>`,`Schedule to show`)).action(async(e,t,n)=>{let{showSchedule:r}=await import(`./schedules-tDaIGaad.js`);await r(e,n.optsWithGlobals())}),A(G(K(t.command(`create`).description(`Create a new schedule`).requiredOption(`--name <name>`,`Schedule name`).requiredOption(`--prompt <text>`,`Prompt to send to the agent`).requiredOption(`--agent-id <id>`,`Agent to run`).requiredOption(`--starts-at <datetime>`,`Start time, ISO 8601`)))).action(async(e,t)=>{let{createSchedule:n}=await import(`./schedules-tDaIGaad.js`);await n(t.optsWithGlobals())}),A(G(K(t.command(`edit`).description(`Update a schedule (only the fields you pass)`).argument(`<scheduleId>`,`Schedule to update`).option(`--name <name>`,`Schedule name`).option(`--prompt <text>`,`Prompt to send to the agent`).option(`--agent-id <id>`,`Agent to run`).option(`--agent-version <n>`,`Agent version number to use`,x(1,2**53-1)).option(`--starts-at <datetime>`,`Start time, ISO 8601`)))).action(async(e,t,n)=>{let{editSchedule:r}=await import(`./schedules-tDaIGaad.js`);await r(e,n.optsWithGlobals())}),A(t.command(`activate`).description(`Resume a paused schedule`).argument(`<scheduleId>`,`Schedule to activate`)).action(async(e,t,n)=>{let{setScheduleActive:r}=await import(`./schedules-tDaIGaad.js`);await r(e,!0,n.optsWithGlobals())}),A(t.command(`pause`).description(`Pause an active schedule`).argument(`<scheduleId>`,`Schedule to pause`)).action(async(e,t,n)=>{let{setScheduleActive:r}=await import(`./schedules-tDaIGaad.js`);await r(e,!1,n.optsWithGlobals())}),A(t.command(`run`).description(`Run a schedule now; prints the created taskId`).argument(`<scheduleId>`,`Schedule to run`)).action(async(e,t,n)=>{let{runScheduleNow:r}=await import(`./schedules-tDaIGaad.js`);await r(e,n.optsWithGlobals())}),A(M(t.command(`runs`).description(`List a schedule's run history`).argument(`<scheduleId>`,`Schedule whose runs to list`),20)).action(async(e,t,n)=>{let{listScheduleRuns:r}=await import(`./schedules-tDaIGaad.js`);await r(e,n.optsWithGlobals())}),t.command(`delete`).description(`Delete a schedule`).argument(`<scheduleId>`,`Schedule to delete`).action(async e=>{let{deleteSchedule:t}=await import(`./schedules-tDaIGaad.js`);await t(e)}),A(t.command(`calendars`).description(`List connected calendar accounts`)).action(async(e,t)=>{let{listCalendarAccounts:n}=await import(`./schedules-tDaIGaad.js`);await n(t.optsWithGlobals())})}function He(e){A(e.command(`login`).summary(`Log in to EntryDesk`).helpGroup(F.setup)).action(async(e,t)=>{let{runLogin:n}=await import(`./login-CwXjzUnO.js`);await n(t.optsWithGlobals())})}function Ue(e){e.command(`logout`).summary(`Log out and clear credentials`).helpGroup(F.setup).action(async()=>{let{runLogout:e}=await import(`./logout-BYCFpaxh.js`);await e()})}function We(e){A(e.command(`status`).summary(`Show who you are logged in as`).helpGroup(F.setup)).action(async(e,t)=>{let{runStatus:n}=await import(`./status-gK3MA1oe.js`);await n(t.optsWithGlobals())})}function Ge(e){A(e.command(`models`).summary(`List available models`).option(`--config`,`Show where this deployment resolves a task's model from, and the tier → model mapping`).helpGroup(F.workspace)).action(async(e,t)=>{let{runModels:n}=await import(`./models-AN9cWKSj.js`);await n(t.optsWithGlobals())})}function Ke(e){e.command(`version`).summary(`Show the version number`).helpGroup(F.setup).action(()=>console.log(e.version()))}function qe(e){A(e.command(`update`).summary(`Update the CLI to the latest version`).helpGroup(F.setup).option(`--check`,`Only check for a newer version, don't install`)).action(async(e,t)=>{let{runUpdate:n}=await import(`./update-CJlVgq8V.js`);await n(t.optsWithGlobals())})}function Je(e){e.command(`mcp-server`).summary(`Start the MCP server (stdio or HTTP)`).helpGroup(F.setup).option(`--http`,`Serve over HTTP instead of stdio`).option(`-p, --port <number>`,`Port to listen on`,x(1,65535)).action(async e=>{let{startMcpServer:t}=await import(`./mcp-B7wo_sRO.js`);await t({mode:e.http?`http`:`stdio`,port:e.port})})}function q(e){return e.option(`-g, --global`,`Act at user (global) scope instead of the project`)}function J(e){return e.option(`-a, --agent <agentId>`,`Restrict install to specific agents (repeatable; '*' for all)`,ve)}function Ye(e){let t=e.command(`skills`).summary(`List, upload, version, toggle, and share skills`).helpGroup(F.build);A(q(t.command(`list`,{isDefault:!0}).description(`List available skills`).option(`--me, --mine`,`Only skills you created`).option(`--local`,`Only locally-tracked skills`).option(`--remote`,`Only workspace skills`).option(`--all`,`Both local and remote, merged`))).action(async(e,t)=>{let{listSkills:n}=await import(`./skills-CDd-emMc.js`);await n(t.optsWithGlobals())}),A(t.command(`upload`).description(`Upload a skill zip file or folder`).argument(`<path>`,`Zip file or folder to upload`).option(`--force`,`Overwrite an existing skill with the same name`)).action(async(e,t,n)=>{let{uploadSkill:r}=await import(`./skills-CDd-emMc.js`);await r(e,n.optsWithGlobals())}),A(t.command(`toggle`).description(`Enable or disable a skill for yourself`).argument(`<skillId>`,`Skill to toggle`).addOption(new y(`--enable`,`Turn the skill on`).conflicts(`disable`)).option(`--disable`,`Turn the skill off`)).action(async(e,t,n)=>{let{toggleSkill:r}=await import(`./skills-CDd-emMc.js`);await r(e,n.optsWithGlobals())}),A(t.command(`versions`).description(`List a skill's version history`).argument(`<skillId>`,`Skill to inspect`)).action(async(e,t,n)=>{let{listSkillVersions:r}=await import(`./skills-CDd-emMc.js`);await r(e,n.optsWithGlobals())}),A(P(t.command(`share`).description(`Show or manage sharing (user grants)`).argument(`<skillId>`,`Skill to share`))).action(async(e,t,n)=>{let{shareSkill:r}=await import(`./skills-CDd-emMc.js`);await r(e,n.optsWithGlobals())}),t.command(`delete`).description(`Delete a skill you own`).argument(`<skillId>`,`Skill to delete`).action(async e=>{let{deleteSkill:t}=await import(`./skills-CDd-emMc.js`);await t(e)}),A(t.command(`download`).description(`Download and extract a skill to ./<skill-name>/`).argument(`<skillId>`,`Skill to download`)).action(async(e,t,n)=>{let{downloadSkill:r}=await import(`./skills-CDd-emMc.js`);await r(e,n.optsWithGlobals())}),A(J(q(t.command(`add`).description(`Install a skill from an EntryDesk slug/id, a git URL, or a local path`).argument(`<source>`,`Skill source`)))).action(async(e,t,n)=>{let{addSkill:r}=await import(`./skills-CDd-emMc.js`);await r(e,n.optsWithGlobals())}),A(J(q(t.command(`pull`).description(`Download the latest from the workspace`).argument(`[nameOrId]`,`Skill to pull (default: every tracked one)`)))).action(async(e,t,n)=>{let{pullSkill:r}=await import(`./skills-CDd-emMc.js`);await r(e,n.optsWithGlobals())}),A(q(t.command(`push`).description(`Upload local changes to the workspace`).argument(`[name]`,`Skill to push (default: every changed one)`).option(`--force`,`Overwrite the workspace copy`))).action(async(e,t,n)=>{let{pushSkill:r}=await import(`./skills-CDd-emMc.js`);await r(e,n.optsWithGlobals())}),A(q(t.command(`status`).description(`Show local vs workspace drift`))).action(async(e,t)=>{let{showSkillsStatus:n}=await import(`./skills-CDd-emMc.js`);await n(t.optsWithGlobals())}),A(q(t.command(`remove`).description(`Uninstall a skill locally`).argument(`<name>`,`Skill to remove`).option(`--remote`,`Also delete the skill from the workspace`))).action(async(e,t,n)=>{let{removeSkill:r}=await import(`./skills-CDd-emMc.js`);await r(e,n.optsWithGlobals())}),A(q(t.command(`link`).description(`Bind this directory (or the user) to a workspace`).argument(`[workspaceId]`,`Workspace to bind to`))).action(async(e,t,n)=>{let{linkSkillsDirectory:r}=await import(`./skills-CDd-emMc.js`);await r(e,n.optsWithGlobals())}),A(q(t.command(`unlink`).description(`Remove the workspace binding`))).action(async(e,t)=>{let{runSkillsUnlink:n}=await import(`./commands-CdnyYMrx.js`);n(t.optsWithGlobals())})}function Xe(e){e.command(`task`,{isDefault:!0}).summary(`Send a message or run an interactive task`).description(`Send a message to a model or agent, or start an interactive session.`).helpGroup(F.chat).option(`-m, --message <text>`,`Message to send (or pipe via stdin)`).option(`--model <modelId>`,`Model to use (instead of an agent)`).option(`-a, --agent <agentId>`,`Agent to use (instead of --model)`).option(`-c, --continue <n>`,`Continue recent task #n`,x(1,20)).option(`-i, --interactive`,`Interactive mode (continuous chat)`).option(`--project <project>`,"Create the task in this project (a project id, or — with `projects:read` — a 1-based index into a plain `entrydesk project list`)").option(`--connectors <ids>`,`Limit to specific connectors (default: all connected)`,T).option(`--plain`,`Plain text output`).addOption(new y(`--output <mode>`,`Stream events as JSON`).choices(h)).option(`--full-output`,`Show full tool outputs`).option(`--file-system`,`Enable local file operations`).option(`--no-file-system`,`Disable local file operations`).addOption(new y(`--tool-approval-mode <mode>`,`Defaults to the mode /approval saved. Non-interactive runs deny every approval they are asked for`).choices(re.options)).option(`--allowed-tools <tools...>`,`Pre-authorize these tools, so they run without asking (comma or space separated)`,D).option(`--disallowed-tools <tools...>`,`Refuse these tools. Wins over --allowed-tools and --tool-approval-mode`,D).option(`--dangerously-auto-approve-tools`,`Deprecated alias for --tool-approval-mode always_allow`).addHelpText(`after`,`
69
+ Working inside a project:
70
+ --project files the new task in that project, so the turn starts from the
71
+ project instruction and its members can be given access. The AI answers as
72
+ it always does; \`entrydesk project note\` is the other path, filing a work
73
+ note with no AI reply. It also scopes the numbering: with --project,
74
+ -c/--continue counts down \`entrydesk tasks --project <project>\` rather than
75
+ the recent list, which never contains a project's tasks. A project id needs
76
+ only the task scopes; a project index is resolved against \`project list\`,
77
+ which needs projects:read.
78
+
79
+ Message and stdin:
80
+ -m alone sends that message. Piped stdin alone is the message. Given both,
81
+ the AI receives both — -m is your instruction and stdin is the material it
82
+ works on, passed along as content to read rather than as instructions to
83
+ follow. Whenever stdin is a pipe it is read to its end, -m or not, so a
84
+ producer that takes seconds to answer is waited for rather than dropped; a
85
+ command spawned with an inherited stdin it does not mean to send should
86
+ close it (</dev/null). Interactive mode (-i) never reads stdin.
87
+
21
88
  Examples:
22
89
  entrydesk task -m "Hello" --model <model>
23
90
  entrydesk task -m "Hello" -a <agentId>
24
91
  entrydesk task -c 1 -m "Follow up" # Continue recent task
25
92
  entrydesk task -i # Interactive mode
26
93
  echo "Explain this" | entrydesk task --model <model> # Pipe stdin
94
+ entrydesk task --project 2 -m "List the open questions"
95
+ entrydesk project context-read 2 file <id> --full \\
96
+ | entrydesk task --project 2 -m "Turn this into a checklist"
27
97
 
28
98
  List available models: entrydesk models
29
99
  List available agents: entrydesk agents
30
- List recent tasks: entrydesk tasks`).action(async(e,t)=>{let[n]=t.parent?.args??[],r=n===t.name()||t.aliases().includes(n??``),{runTask:i}=await import(`./task-DKK82ixE.js`);await i({...e,interactive:e.interactive??!r})})}function Pe(e){D(e.command(`tasks`).summary(`List, search, or view tasks`).helpGroup(M.chat).argument(`[taskId]`,`Task id, or a 1-based index into recent tasks`).addOption(new h(`-q, --search <query>`,`Filter tasks by a search query`).conflicts(`share`)).option(`--limit <number>`,`Max tasks to return`,_(1,50)).option(`--next-key <cursor>`,`Fetch the next page using this cursor`).option(`-s, --share <shareId>`,`View a shared task's messages (no login needed)`).addOption(new h(`--output <mode>`,`Stream messages as JSON events`).choices(U)).option(`--full-output`,`Show full tool outputs when viewing a task`).addHelpText(`after`,`
100
+ List recent tasks: entrydesk tasks
101
+ List a project's tasks: entrydesk tasks --project <project>`).action(async(e,t)=>{let[n]=t.parent?.args??[],r=n===t.name()||t.aliases().includes(n??``),{runTask:i}=await import(`./task-CHnFR-Zp.js`);await i({...e,interactive:e.interactive??!r})})}function Ze(e){A(e.command(`tasks`).summary(`List, search, or view tasks`).helpGroup(F.chat).argument(`[taskId]`,`Task id, or a 1-based index into recent tasks`).addOption(new y(`-q, --search <query>`,`Filter tasks by a search query`).conflicts(`share`)).option(`--limit <number>`,`Max tasks to return`,x(1,50)).option(`--next-key <cursor>`,`Fetch the next page using this cursor`).addOption(new y(`-s, --share <shareId>`,`View a shared task's messages (no login needed)`).conflicts(`project`)).option(`--project <project>`,"Limit the listing and `-q` to the tasks you can see in this project (a project id, or — with `projects:read` — a 1-based index into a plain `entrydesk project list`)").addOption(new y(`--output <mode>`,`Stream messages as JSON events`).choices(h)).option(`--full-output`,`Show full tool outputs when viewing a task`).addHelpText(`after`,`
31
102
  Examples:
32
103
  entrydesk tasks # List recent tasks
33
104
  entrydesk tasks -q "deploy" --limit 20 # Search tasks
34
105
  entrydesk tasks <taskId> # View a task's messages
35
106
  entrydesk tasks <taskId> --full-output # …with full tool outputs
36
- entrydesk tasks -s <shareId> # View a shared task`)).action(async(e,t,n)=>{let{runTasks:r}=await import(`./tasks-DX7CQir8.js`);await r(e,n.optsWithGlobals())})}function Fe(e){let t=e.command(`tool`).summary(`List, get, or call MCP tools`).helpGroup(M.chat);D(t.command(`list`,{isDefault:!0}).description(`List all available tools`).option(`-p, --prefix <name>`,`Filter tools by connector prefix`)).action(async(e,t)=>{let{listTools:n}=await import(`./tool-3NEPlGNR.js`);await n(t.optsWithGlobals())}),D(t.command(`get`).description(`Get details of a specific tool`).argument(`<name>`,`Tool name`)).action(async(e,t,n)=>{let{getTool:r}=await import(`./tool-3NEPlGNR.js`);await r(e,n.optsWithGlobals())}),D(t.command(`call`).description(`Call a tool with JSON input`).argument(`<name>`,`Tool name`).option(`-i, --input <json>`,`JSON input for the tool call`).option(`-f, --input-file <path>`,`Read the JSON input from a file`).addHelpText(`after`,`
107
+ entrydesk tasks -s <shareId> # View a shared task
108
+ entrydesk tasks --project 2 # Tasks you can see in project 2
109
+ entrydesk tasks --project 2 -q "deploy" # …searched within it`)).action(async(e,t,n)=>{let{runTasks:r}=await import(`./tasks-acCatE6n.js`);await r(e,n.optsWithGlobals())})}function Qe(e){let t=e.command(`tool`).summary(`List, get, or call MCP tools`).helpGroup(F.chat);A(t.command(`list`,{isDefault:!0}).description(`List all available tools`).option(`-p, --prefix <name>`,`Filter tools by connector prefix`)).action(async(e,t)=>{let{listTools:n}=await import(`./tool-BEivzspP.js`);await n(t.optsWithGlobals())}),A(t.command(`get`).description(`Get details of a specific tool`).argument(`<name>`,`Tool name`)).action(async(e,t,n)=>{let{getTool:r}=await import(`./tool-BEivzspP.js`);await r(e,n.optsWithGlobals())}),A(t.command(`call`).description(`Call a tool with JSON input`).argument(`<name>`,`Tool name`).option(`-i, --input <json>`,`JSON input for the tool call`).option(`-f, --input-file <path>`,`Read the JSON input from a file`).addHelpText(`after`,`
37
110
  Input priority:
38
111
  1. --input (direct JSON string)
39
112
  2. --input-file (read from file)
@@ -42,9 +115,9 @@ Input priority:
42
115
  Examples:
43
116
  entrydesk tool call agent__search_agents --input '{"limit": 5}'
44
117
  entrydesk tool call agent__search_agents --input-file input.json
45
- echo '{"limit": 5}' | entrydesk tool call agent__search_agents`)).action(async(e,t,n)=>{let{runToolCall:r}=await import(`./tool-3NEPlGNR.js`);await r(e,n.optsWithGlobals())})}function Ie(e){let t=e.command(`usage`).summary(`Show balance, spend rankings, per-user breakdown, or CSV export`).helpGroup(M.workspace);D(t.command(`summary`,{isDefault:!0}).description(`Per-user monthly cost/operations summary`).option(`--limit <number>`,`Limit rows (default: all)`,_(1,100)).addOption(new h(`--sort-by <field>`,`Sort the summary`).choices(W).default(`cost`))).action(async(e,t)=>{let{showUsageSummary:n}=await import(`./usage-050zvE6Q.js`);await n(t.optsWithGlobals())}),D(t.command(`balance`).description(`Workspace USD balance, spend, and limits`)).action(async(e,t)=>{let{showUsageBalance:n}=await import(`./usage-050zvE6Q.js`);await n(t.optsWithGlobals())}),D(t.command(`me`).description(`Your own usage and availability`)).action(async(e,t)=>{let{showOwnUsage:n}=await import(`./usage-050zvE6Q.js`);await n(t.optsWithGlobals())}),D(t.command(`consumptions`).description(`Per-user extra-usage breakdown`).option(`--limit <number>`,`Max rows (default: 20)`,_(1,100)).option(`--offset <number>`,`Pagination offset`,g).option(`--period-start <iso>`,`Period start`)).action(async(e,t)=>{let{listUsageConsumptions:n}=await import(`./usage-050zvE6Q.js`);await n(t.optsWithGlobals())}),D(t.command(`rank`).description(`Rank workspace spend by user, agent, schedule, or model`).addOption(new h(`--by <field>`,`Dimension to rank by`).choices(_e).default(`user`)).option(`--days <number>`,`Rolling window in days (default: all time)`,_(1,365)).option(`--model <substring>`,`Only count calls whose model matches this substring`).option(`--limit <number>`,`Max rows (default: 30)`,_(1,100))).action(async(e,t)=>{let{rankUsage:n}=await import(`./usage-audit-e6kpW0LZ.js`);await n(t.optsWithGlobals())}),D(t.command(`drill`).argument(`<email>`,`Workspace member to drill into`).description(`Break one member's spend down by agent, day, and schedule`).option(`--days <number>`,`Lookback in days (default: 30)`,_(1,60),30).option(`--min-cost <number>`,`Only list buckets above this spend (default: 0)`,v(0))).action(async(e,t,n)=>{let{drillUsage:r}=await import(`./usage-audit-e6kpW0LZ.js`);await r(e,n.optsWithGlobals())}),D(t.command(`waste`).description(`Find schedules that keep spending while nobody reads the output`).option(`--days <number>`,`Lookback in days (default: 30)`,_(7,60),30).option(`--min-cost <number>`,`Only flag schedules above this spend`,v(0)).option(`--limit <number>`,`Max rows`,_(1,50))).action(async(e,t)=>{let{findUsageWaste:n}=await import(`./usage-audit-e6kpW0LZ.js`);await n(t.optsWithGlobals())}),t.command(`export`).description(`Export per-user usage as CSV`).option(`--period-start <iso>`,`Period start`).option(`-o, --output <file>`,`Write the CSV to a file (default: stdout)`).action(async e=>{let{exportUsage:t}=await import(`./usage-050zvE6Q.js`);await t(e)})}function Le(e){let t=e.command(`workflow`).summary(`Create, run, and manage workflows`).helpGroup(M.build).addHelpText(`after`,`
118
+ echo '{"limit": 5}' | entrydesk tool call agent__search_agents`)).action(async(e,t,n)=>{let{runToolCall:r}=await import(`./tool-BEivzspP.js`);await r(e,n.optsWithGlobals())})}function Y(e){let t=e.command(`usage`).summary(`Show balance, spend rankings, per-user breakdown, or CSV export`).helpGroup(F.workspace);A(t.command(`summary`,{isDefault:!0}).description(`Per-user monthly cost/operations summary`).option(`--limit <number>`,`Limit rows (default: all)`,x(1,100)).addOption(new y(`--sort-by <field>`,`Sort the summary`).choices(de).default(`cost`))).action(async(e,t)=>{let{showUsageSummary:n}=await import(`./usage-DOI9sowA.js`);await n(t.optsWithGlobals())}),A(t.command(`balance`).description(`Workspace USD balance, spend, and limits`)).action(async(e,t)=>{let{showUsageBalance:n}=await import(`./usage-DOI9sowA.js`);await n(t.optsWithGlobals())}),A(t.command(`me`).description(`Your own usage and availability`)).action(async(e,t)=>{let{showOwnUsage:n}=await import(`./usage-DOI9sowA.js`);await n(t.optsWithGlobals())}),A(t.command(`consumptions`).description(`Per-user extra-usage breakdown`).option(`--limit <number>`,`Max rows (default: 20)`,x(1,100)).option(`--offset <number>`,`Pagination offset`,b).option(`--period-start <iso>`,`Period start`)).action(async(e,t)=>{let{listUsageConsumptions:n}=await import(`./usage-DOI9sowA.js`);await n(t.optsWithGlobals())}),A(t.command(`rank`).description(`Rank workspace spend by user, agent, schedule, or model`).addOption(new y(`--by <field>`,`Dimension to rank by`).choices(g).default(`user`)).option(`--days <number>`,`Rolling window in days (default: all time)`,x(1,365)).option(`--model <substring>`,`Only count calls whose model matches this substring`).option(`--limit <number>`,`Max rows (default: 30)`,x(1,100))).action(async(e,t)=>{let{rankUsage:n}=await import(`./usage-audit-1GZx4VBG.js`);await n(t.optsWithGlobals())}),A(t.command(`drill`).argument(`<email>`,`Workspace member to drill into`).description(`Break one member's spend down by agent, day, and schedule`).option(`--days <number>`,`Lookback in days (default: 30)`,x(1,60),30).option(`--min-cost <number>`,`Only list buckets above this spend (default: 0)`,S(0))).action(async(e,t,n)=>{let{drillUsage:r}=await import(`./usage-audit-1GZx4VBG.js`);await r(e,n.optsWithGlobals())}),A(t.command(`waste`).description(`Find schedules that keep spending while nobody reads the output`).option(`--days <number>`,`Lookback in days (default: 30)`,x(7,60),30).option(`--min-cost <number>`,`Only flag schedules above this spend`,S(0)).option(`--limit <number>`,`Max rows`,x(1,50))).action(async(e,t)=>{let{findUsageWaste:n}=await import(`./usage-audit-1GZx4VBG.js`);await n(t.optsWithGlobals())}),t.command(`export`).description(`Export per-user usage as CSV`).option(`--period-start <iso>`,`Period start`).option(`-o, --output <file>`,`Write the CSV to a file (default: stdout)`).action(async e=>{let{exportUsage:t}=await import(`./usage-DOI9sowA.js`);await t(e)})}function $e(e){let t=e.command(`workflow`).summary(`Create, run, and manage workflows`).helpGroup(F.build).addHelpText(`after`,`
46
119
  Examples:
47
120
  entrydesk workflow list --search report
48
121
  entrydesk workflow create --name "Nightly report" --file ./report.js
49
122
  entrydesk workflow run <workflowId> --args '{"date":"2026-06-20"}' --wait
50
- entrydesk workflow run-get <workflowId> <runId>`);D(k(t.command(`list`,{isDefault:!0}).description(`List workflows`).option(`--search <text>`,`Search by name`),20)).action(async(e,t)=>{let{listWorkflows:n}=await import(`./workflow-DHTrGTRn.js`);await n(t.optsWithGlobals())}),D(t.command(`get`).description(`Show workflow details`).argument(`<workflowId>`,`Workflow to show`).option(`--show-source`,`Print the full script source`)).action(async(e,t,n)=>{let{showWorkflow:r}=await import(`./workflow-DHTrGTRn.js`);await r(e,n.optsWithGlobals())}),D(t.command(`create`).description(`Create a workflow from a local script file`).requiredOption(`--name <text>`,`Workflow name`).requiredOption(`--file <path>`,`Script source file (.js)`).option(`--description <text>`,`Workflow description`)).action(async(e,t)=>{let{createWorkflow:n}=await import(`./workflow-DHTrGTRn.js`);await n(t.optsWithGlobals())}),D(t.command(`update`).description(`Update name, description, script, or active state`).argument(`<workflowId>`,`Workflow to update`).option(`--name <text>`,`Workflow name`).option(`--description <text>`,`Workflow description`).option(`--file <path>`,`Script source file (.js)`).addOption(new h(`--activate`,`Enable the workflow`).conflicts(`deactivate`)).option(`--deactivate`,`Disable the workflow`)).action(async(e,t,n)=>{let{updateWorkflow:r}=await import(`./workflow-DHTrGTRn.js`);await r(e,n.optsWithGlobals())}),D(t.command(`run`).description(`Trigger a run`).argument(`<workflowId>`,`Workflow to run`).addOption(new h(`--args <json>`,`Inline JSON passed to the workflow's args global`).conflicts(`argsFile`)).option(`--args-file <path>`,`Read the JSON args from a file`).option(`--wait`,`Poll the run until it finishes, then print the result`)).action(async(e,t,n)=>{let{triggerWorkflowRun:r}=await import(`./workflow-DHTrGTRn.js`);await r(e,n.optsWithGlobals())}),D(k(t.command(`runs`).description(`List runs of a workflow`).argument(`<workflowId>`,`Workflow whose runs to list`),20)).action(async(e,t,n)=>{let{listWorkflowRuns:r}=await import(`./workflow-DHTrGTRn.js`);await r(e,n.optsWithGlobals())}),D(t.command(`run-get`).description(`Show a run's status, nodes, and logs`).argument(`<workflowId>`,`Workflow the run belongs to`).argument(`<runId>`,`Run to show`)).action(async(e,t,n,r)=>{let{showWorkflowRun:i}=await import(`./workflow-DHTrGTRn.js`);await i(e,t,r.optsWithGlobals())}),D(j(t.command(`share`).description(`Show or manage sharing (user grants)`).argument(`<workflowId>`,`Workflow to share`))).action(async(e,t,n)=>{let{shareWorkflow:r}=await import(`./workflow-DHTrGTRn.js`);await r(e,n.optsWithGlobals())})}function Re(e){let t=e.command(`workspaces`).summary(`List or switch workspaces`).helpGroup(M.workspace);D(t.command(`list`,{isDefault:!0}).description(`List all workspaces`)).action(async(e,t)=>{let{listWorkspaces:n}=await import(`./workspaces-BQiFZ5pV.js`);await n(t.optsWithGlobals())}),D(t.command(`switch`).alias(`use`).description(`Switch to a workspace`).argument(`<workspaceId>`,`Workspace to switch to`)).action(async(e,t,n)=>{let{switchWorkspace:r}=await import(`./workspaces-BQiFZ5pV.js`);await r(e,n.optsWithGlobals())})}function X(e){return e.commands.length>0}function Z(e,t){return e.options.some(e=>e.long===t)}function Q(e,t){return e.name()===t||e.aliases().includes(t)}function ze(e){X(e)&&!Z(e,`--json`)&&e.addOption(new h(`--json`).hideHelp()),Z(e,`--profile`)||e.addOption(new h(E).hideHelp())}function Be(e){e.hook(`preSubcommand`,(e,t)=>{let[n]=e.args;n===void 0||n.startsWith(`-`)||Q(t,n)||t.registeredArguments.length>0||e.commands.some(e=>Q(e,n))||e.error(`error: unknown command '${n}'`,{code:`commander.unknownCommand`})})}function $(e,t){t||ze(e),X(e)&&Be(e);for(let t of e.commands)t.name()!==`help`&&$(t,!1)}function Ve(e){let t=e.optsWithGlobals().profile;return typeof t==`string`?t:void 0}function He(e){let t=e;for(;t.parent?.parent;)t=t.parent;return t.name()}function Ue(){let e=N();return e.hook(`preAction`,(e,t)=>{if(He(t)===`profile`)return;let n=Ve(t)??u.getCurrentProfileName();u.ensureProfileExists(n),u.setOverrideProfile(n)}),Ne(e),Pe(e),Fe(e),F(e),Te(e),Ee(e),De(e),Re(e),Oe(e),V(e),pe(e),Le(e),ve(e),Me(e),we(e),xe(e),ye(e),Ie(e),R(e),I(e),B(e),be(e),ke(e),Ae(e),je(e),$(e,!0),e}try{await Ue().parseAsync(process.argv)}catch(e){te(e)}export{};
123
+ entrydesk workflow run-get <workflowId> <runId>`);A(M(t.command(`list`,{isDefault:!0}).description(`List workflows`).option(`--search <text>`,`Search by name`),20)).action(async(e,t)=>{let{listWorkflows:n}=await import(`./workflow-DhomAltH.js`);await n(t.optsWithGlobals())}),A(t.command(`get`).description(`Show workflow details`).argument(`<workflowId>`,`Workflow to show`).option(`--show-source`,`Print the full script source`)).action(async(e,t,n)=>{let{showWorkflow:r}=await import(`./workflow-DhomAltH.js`);await r(e,n.optsWithGlobals())}),A(t.command(`create`).description(`Create a workflow from a local script file`).requiredOption(`--name <text>`,`Workflow name`).requiredOption(`--file <path>`,`Script source file (.js)`).option(`--description <text>`,`Workflow description`)).action(async(e,t)=>{let{createWorkflow:n}=await import(`./workflow-DhomAltH.js`);await n(t.optsWithGlobals())}),A(t.command(`update`).description(`Update name, description, script, or active state`).argument(`<workflowId>`,`Workflow to update`).option(`--name <text>`,`Workflow name`).option(`--description <text>`,`Workflow description`).option(`--file <path>`,`Script source file (.js)`).addOption(new y(`--activate`,`Enable the workflow`).conflicts(`deactivate`)).option(`--deactivate`,`Disable the workflow`)).action(async(e,t,n)=>{let{updateWorkflow:r}=await import(`./workflow-DhomAltH.js`);await r(e,n.optsWithGlobals())}),A(t.command(`run`).description(`Trigger a run`).argument(`<workflowId>`,`Workflow to run`).addOption(new y(`--args <json>`,`Inline JSON passed to the workflow's args global`).conflicts(`argsFile`)).option(`--args-file <path>`,`Read the JSON args from a file`).option(`--wait`,`Poll the run until it finishes, then print the result`)).action(async(e,t,n)=>{let{triggerWorkflowRun:r}=await import(`./workflow-DhomAltH.js`);await r(e,n.optsWithGlobals())}),A(M(t.command(`runs`).description(`List runs of a workflow`).argument(`<workflowId>`,`Workflow whose runs to list`),20)).action(async(e,t,n)=>{let{listWorkflowRuns:r}=await import(`./workflow-DhomAltH.js`);await r(e,n.optsWithGlobals())}),A(t.command(`run-get`).description(`Show a run's status, nodes, and logs`).argument(`<workflowId>`,`Workflow the run belongs to`).argument(`<runId>`,`Run to show`)).action(async(e,t,n,r)=>{let{showWorkflowRun:i}=await import(`./workflow-DhomAltH.js`);await i(e,t,r.optsWithGlobals())}),A(P(t.command(`share`).description(`Show or manage sharing (user grants)`).argument(`<workflowId>`,`Workflow to share`))).action(async(e,t,n)=>{let{shareWorkflow:r}=await import(`./workflow-DhomAltH.js`);await r(e,n.optsWithGlobals())})}function et(e){let t=e.command(`workspaces`).summary(`List or switch workspaces`).helpGroup(F.workspace);A(t.command(`list`,{isDefault:!0}).description(`List all workspaces`)).action(async(e,t)=>{let{listWorkspaces:n}=await import(`./workspaces-D0VOrP2A.js`);await n(t.optsWithGlobals())}),A(t.command(`switch`).alias(`use`).description(`Switch to a workspace`).argument(`<workspaceId>`,`Workspace to switch to`)).action(async(e,t,n)=>{let{switchWorkspace:r}=await import(`./workspaces-D0VOrP2A.js`);await r(e,n.optsWithGlobals())})}function X(e){return e.commands.length>0}function Z(e,t){return e.options.some(e=>e.long===t)}function Q(e,t){return e.name()===t||e.aliases().includes(t)}function tt(e){X(e)&&!Z(e,`--json`)&&e.addOption(new y(`--json`).hideHelp()),Z(e,`--profile`)||e.addOption(new y(k).hideHelp())}function nt(e){e.hook(`preSubcommand`,(e,t)=>{let[n]=e.args;n===void 0||n.startsWith(`-`)||Q(t,n)||t.registeredArguments.length>0||e.commands.some(e=>Q(e,n))||e.error(`error: unknown command '${n}'`,{code:`commander.unknownCommand`})})}function $(e,t){t||tt(e),X(e)&&nt(e);for(let t of e.commands)t.name()!==`help`&&$(t,!1)}function rt(e){let t=e.optsWithGlobals().profile;return typeof t==`string`?t:void 0}function it(e){let t=e;for(;t.parent?.parent;)t=t.parent;return t.name()}function at(){let e=we();return e.hook(`preAction`,(e,t)=>{if(it(t)===`profile`)return;let n=rt(t)??f.getCurrentProfileName();f.ensureProfileExists(n),f.setOverrideProfile(n)}),Xe(e),Ze(e),Qe(e),Te(e),He(e),Ue(e),We(e),et(e),Ge(e),Ae(e),je(e),Le(e),$e(e),Me(e),Ye(e),Ve(e),Re(e),Ne(e),Y(e),Oe(e),Ee(e),ke(e),Pe(e),Ke(e),qe(e),Je(e),$(e,!0),e}try{await at().parseAsync(process.argv)}catch(e){ae(e)}export{};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{T as e,vt as t}from"./profile-storage-Dv0xRb8J.js";import{o as n}from"./resolve-f238uD6C.js";import{t as r}from"./stdin-DzzLUF6W.js";import{readFileSync as i}from"node:fs";async function a(t,a){if(t===`-`)return r();try{return i(t,`utf8`)}catch{throw new n(`${a}_file_unreadable`,`Cannot read ${a} file: ${e(t)}`)}}async function o(e){let r=e.instructionFile===void 0?e.instruction:await a(e.instructionFile,`instruction`);if(r!==void 0&&r.length>1e4)throw new n(`project_field_too_long`,`Instruction is too long: the maximum is ${t} characters.`);return r}export{o as n,a as t};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{C as e,S as t,T as n,_ as r,b as i,h as a,p as o,y as s}from"./profile-storage-DYUIMuP0.js";async function c(c){let l=r();if(l){c.json?console.log(JSON.stringify({alreadyAuthenticated:!0,authSource:`sandbox-env`,workspaceId:l.workspaceId})):(console.log(`Already authenticated via ${a}.`),console.log(`No login required — environment credentials are active.`));return}s()&&console.error(`Warning: ENTRYDESK_TOKEN is set — workspace commands will keep using it instead of the credentials saved by this login. Unset ENTRYDESK_TOKEN if you want this login to take effect.`),process.env.DEBUG&&(console.log(`[DEBUG] Hub URL: ${n()}`),console.log(`[DEBUG] API URL: ${e()}`));let u=await o({onDeviceCodeReceived:(e,t)=>{c.json||(console.log(``),console.log(`To finish logging in:`),console.log(``),console.log(` 1. Visit: ${t}`),console.log(` 2. Enter code: ${e}`),console.log(``))},onBrowserOpening:()=>{c.json||console.log(`Opening browser…`)},onWaitingForAuthorization:()=>{c.json||console.log(`Waiting for authorization…`)},onAuthorized:()=>{c.json||console.log(`Authorization successful.`)},onWarning:e=>{console.error(`Warning: ${e}`)}}),{workspaces:d}=await new i().getWorkspaces(u.accessToken),f=d[0];await t.saveAll({accessToken:u.accessToken,refreshToken:u.refreshToken,email:u.email,workspaceId:f?.id}),c.json?console.log(JSON.stringify({email:u.email,workspaceId:f?.id,workspaceName:f?.name,server:e()})):(console.log(`Logged in as ${u.email}`),f&&console.log(`Workspace: ${f.name}`),console.log(`Server: ${e()}`))}export{c as runLogin};
2
+ import{C as e,E as t,_ as n,b as r,h as i,k as a,m as o,y as s}from"./profile-storage-Dv0xRb8J.js";async function c(c){let l=n();if(l){c.json?console.log(JSON.stringify({alreadyAuthenticated:!0,authSource:`sandbox-env`,workspaceId:l.workspaceId})):(console.log(`Already authenticated via ${i}.`),console.log(`No login required — environment credentials are active.`));return}s()&&console.error(`Warning: ENTRYDESK_TOKEN is set — workspace commands will keep using it instead of the credentials saved by this login. Unset ENTRYDESK_TOKEN if you want this login to take effect.`),process.env.DEBUG&&(console.log(`[DEBUG] Hub URL: ${a()}`),console.log(`[DEBUG] API URL: ${t()}`));let u=await o({onDeviceCodeReceived:(e,t)=>{c.json||(console.log(``),console.log(`To finish logging in:`),console.log(``),console.log(` 1. Visit: ${t}`),console.log(` 2. Enter code: ${e}`),console.log(``))},onBrowserOpening:()=>{c.json||console.log(`Opening browser…`)},onWaitingForAuthorization:()=>{c.json||console.log(`Waiting for authorization…`)},onAuthorized:()=>{c.json||console.log(`Authorization successful.`)},onWarning:e=>{console.error(`Warning: ${e}`)}}),{workspaces:d}=await new r().getWorkspaces(u.accessToken),f=d[0];await e.saveAll({accessToken:u.accessToken,refreshToken:u.refreshToken,email:u.email,workspaceId:f?.id}),c.json?console.log(JSON.stringify({email:u.email,workspaceId:f?.id,workspaceName:f?.name,server:t()})):(console.log(`Logged in as ${u.email}`),f&&console.log(`Workspace: ${f.name}`),console.log(`Server: ${t()}`))}export{c as runLogin};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{S as e,b as t,f as n}from"./profile-storage-DYUIMuP0.js";async function r(){let r=await e.getAll();if(!r){console.log(`Not logged in.`);return}try{r.refreshToken&&await new t().revokeOAuthToken({token:r.refreshToken,clientId:n})}catch{}await e.clear(),console.log(`Logged out.`)}export{r as runLogout};
2
+ import{C as e,b as t,p as n}from"./profile-storage-Dv0xRb8J.js";async function r(){let r=await e.getAll();if(!r){console.log(`Not logged in.`);return}try{r.refreshToken&&await new t().revokeOAuthToken({token:r.refreshToken,clientId:n})}catch{}await e.clear(),console.log(`Logged out.`)}export{r as runLogout};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{O as e,b as t,l as n}from"./profile-storage-DYUIMuP0.js";import{isHTTPError as r}from"ky";function i(e){return r(e)&&e.response.status===404}var a=class extends Error{slug;constructor(e){super(`"${e}" matches both an agent and a skill`),this.slug=e,this.name=`AmbiguousResourceError`}},o=class extends Error{slug;constructor(e){super(`Marketplace resource not found: ${e}`),this.slug=e,this.name=`ResourceNotFoundError`}};async function s(e){try{return await e}catch(e){if(i(e))return null;throw e}}async function c(e,t,n){if(n===`agent`)return{type:n,view:await e.getMarketplaceAgent(t)};if(n===`skill`)return{type:n,view:await e.getMarketplaceSkill(t)};let[r,i]=await Promise.all([s(e.getMarketplaceAgent(t)),s(e.getMarketplaceSkill(t))]);if(r&&i)throw new a(t);if(r)return{type:`agent`,view:r};if(i)return{type:`skill`,view:i};throw new o(t)}async function l(e,t){try{return await t()}catch(t){throw t instanceof a&&(console.error(`"${t.slug}" matches both an agent and a skill. Re-run with --type agent|skill.`),process.exit(1)),(t instanceof o||i(t))&&(console.error(`Marketplace resource not found: ${e}`),process.exit(1)),t}}async function u(e,n){let r=await new t().searchMarketplace({type:n.type,tag:e??n.tag,limit:n.limit,cursor:n.cursor});if(n.json){console.log(JSON.stringify(r));return}if(r.items.length===0){console.log(`No marketplace resources found.`);return}console.log(`Marketplace (${r.items.length}):\n`);for(let e of r.items)console.log(` ${e.name} [${e.type}]`),console.log(` Slug: ${e.slug}`),e.description&&console.log(` ${e.description}`),e.tags.length>0&&console.log(` Tags: ${e.tags.map(e=>e.label).join(`, `)}`),console.log(``);r.nextCursor&&console.log(`More results: --cursor ${r.nextCursor}`)}async function d(e,n){let{type:r,view:i}=await l(e,()=>c(new t,e,n.type));if(n.json){console.log(JSON.stringify(i));return}if(console.log(`${i.name} [${r}]`),console.log(`Slug: ${i.slug}`),i.description&&console.log(`\n${i.description}`),i.tags.length>0&&console.log(`\nTags: ${i.tags.map(e=>e.label).join(`, `)}`),r===`agent`){if(i.starterPrompts.length>0){console.log(`
2
+ import{M as e,b as t,u as n}from"./profile-storage-Dv0xRb8J.js";import{isHTTPError as r}from"ky";function i(e){return r(e)&&e.response.status===404}var a=class extends Error{slug;constructor(e){super(`"${e}" matches both an agent and a skill`),this.slug=e,this.name=`AmbiguousResourceError`}},o=class extends Error{slug;constructor(e){super(`Marketplace resource not found: ${e}`),this.slug=e,this.name=`ResourceNotFoundError`}};async function s(e){try{return await e}catch(e){if(i(e))return null;throw e}}async function c(e,t,n){if(n===`agent`)return{type:n,view:await e.getMarketplaceAgent(t)};if(n===`skill`)return{type:n,view:await e.getMarketplaceSkill(t)};let[r,i]=await Promise.all([s(e.getMarketplaceAgent(t)),s(e.getMarketplaceSkill(t))]);if(r&&i)throw new a(t);if(r)return{type:`agent`,view:r};if(i)return{type:`skill`,view:i};throw new o(t)}async function l(e,t){try{return await t()}catch(t){throw t instanceof a&&(console.error(`"${t.slug}" matches both an agent and a skill. Re-run with --type agent|skill.`),process.exit(1)),(t instanceof o||i(t))&&(console.error(`Marketplace resource not found: ${e}`),process.exit(1)),t}}async function u(e,n){let r=await new t().searchMarketplace({type:n.type,tag:e??n.tag,limit:n.limit,cursor:n.cursor});if(n.json){console.log(JSON.stringify(r));return}if(r.items.length===0){console.log(`No marketplace resources found.`);return}console.log(`Marketplace (${r.items.length}):\n`);for(let e of r.items)console.log(` ${e.name} [${e.type}]`),console.log(` Slug: ${e.slug}`),e.description&&console.log(` ${e.description}`),e.tags.length>0&&console.log(` Tags: ${e.tags.map(e=>e.label).join(`, `)}`),console.log(``);r.nextCursor&&console.log(`More results: --cursor ${r.nextCursor}`)}async function d(e,n){let{type:r,view:i}=await l(e,()=>c(new t,e,n.type));if(n.json){console.log(JSON.stringify(i));return}if(console.log(`${i.name} [${r}]`),console.log(`Slug: ${i.slug}`),i.description&&console.log(`\n${i.description}`),i.tags.length>0&&console.log(`\nTags: ${i.tags.map(e=>e.label).join(`, `)}`),r===`agent`){if(i.starterPrompts.length>0){console.log(`
3
3
  Starter prompts:`);for(let e of i.starterPrompts)console.log(` - ${e}`)}if(i.connectors.length>0){console.log(`
4
4
  Connectors:`);for(let e of i.connectors)console.log(` - ${e.name} (${e.provider})`)}}console.log(`\nInstall with: entrydesk marketplace install ${i.slug} --type ${r}`)}async function f(r,i){let a=new t,{accessToken:o,workspaceId:s}=await n(),{type:u}=i.type?{type:i.type}:await l(r,()=>c(a,r)),d=await l(r,()=>a.installMarketplaceResource(o,s,u,r,e.getToolApprovalMode()??void 0));if(i.json){console.log(JSON.stringify(d));return}console.log(`Installed ${u} "${r}" into the workspace.`),console.log(` ${u} ID: ${d.resourceId}`),d.taskId&&(console.log(` Setup task: ${d.taskId}`),console.log(` Continue setup: entrydesk tasks ${d.taskId}`))}async function p(e){let{items:n}=await new t().listMarketplaceRoles();if(e.json){console.log(JSON.stringify(n));return}if(n.length===0){console.log(`No marketplace roles found.`);return}console.log(`Marketplace roles (${n.length}):\n`);for(let e of n)console.log(` ${e.tag} ${e.name}`),e.tagline&&console.log(` ${e.tagline}`)}export{f as installMarketplaceResource,u as searchMarketplace,d as showMarketplaceResource,p as showMarketplaceRoles};
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{S as e,d as t,l as n,u as r,w as i}from"./profile-storage-DYUIMuP0.js";import{r as a,t as o}from"./mcp-client-DdryEToX.js";import s from"node:http";import{stderr as c}from"node:process";import{NodeStreamableHTTPServerTransport as l}from"@modelcontextprotocol/node";import{Server as u}from"@modelcontextprotocol/server";import{StdioServerTransport as d}from"@modelcontextprotocol/server/stdio";function f(e){c.write(`${e}\n`)}function p(e,t,n){return o({apiUrl:e,accessToken:t,workspaceId:n,name:`entrydesk-cli-proxy`})}function m(e){let t=new u({name:`entrydesk-cli`,version:`1.0.0`},{capabilities:{tools:{}}});return t.setRequestHandler(`tools/list`,async(t,n)=>({tools:(await(await e()).listTools({},a({signal:n.mcpReq.signal}))).tools})),t.setRequestHandler(`tools/call`,async(t,n)=>{let{name:r,arguments:i}=t.params,{progressToken:o}=n.mcpReq._meta??{},s=await(await e()).callTool({name:r,arguments:i},a({signal:n.mcpReq.signal,onProgress:o===void 0?void 0:e=>{n.mcpReq.notify({method:`notifications/progress`,params:{...e,progressToken:o}}).catch(()=>{})}})),c=Array.isArray(s.content)?[...s.content]:[];return s.structuredContent&&c.push({type:`text`,text:JSON.stringify(s.structuredContent,null,2)}),{content:c,structuredContent:s.structuredContent,isError:s.isError}}),t}async function h(e,t,n){let r=s.createServer(async(t,n)=>{if(t.method===`OPTIONS`){n.setHeader(`Access-Control-Allow-Origin`,`*`),n.setHeader(`Access-Control-Allow-Methods`,`GET, POST, DELETE, OPTIONS`),n.setHeader(`Access-Control-Allow-Headers`,`Content-Type, Accept`),n.writeHead(204),n.end();return}if(t.url!==`/mcp`){n.writeHead(404,{"Content-Type":`application/json`}),n.end(JSON.stringify({error:`Not found`}));return}let r=m(e),i=new l({sessionIdGenerator:void 0});if(n.setHeader(`Access-Control-Allow-Origin`,`*`),n.on(`close`,()=>{i.close(),r.close()}),await r.connect(i),t.method===`POST`){let e=``;t.on(`data`,t=>{e+=t.toString()}),t.on(`end`,async()=>{try{let r=JSON.parse(e);await i.handleRequest(t,n,r)}catch{n.writeHead(400,{"Content-Type":`application/json`}),n.end(JSON.stringify({error:`Invalid JSON`}))}})}else await i.handleRequest(t,n)});r.listen(n,()=>{f(`EntryDesk MCP server running at http://localhost:${n}/mcp`),f(`Press Ctrl+C to stop`)}),process.on(`SIGINT`,async()=>{f(`
3
- Shutting down…`),r.close(),await t(),process.exit(0)}),process.on(`SIGTERM`,async()=>{r.close(),await t(),process.exit(0)})}async function g(e,t){let n=m(e),r=new d;r.onclose=async()=>{await t()},await n.connect(r)}const _={mode:`stdio`};async function v(a=_){process.on(`unhandledRejection`,e=>{console.error(`[entrydesk-mcp] Unhandled rejection:`,e)}),process.on(`uncaughtException`,e=>{console.error(`[entrydesk-mcp] Uncaught exception:`,e)});try{f(`[entrydesk-mcp] Starting MCP server…`);let o,s;try{let e=await n();o=e.accessToken,s=e.workspaceId}catch(e){let t=e instanceof Error?e.message:`Authentication failed`;console.error(t),process.exit(1)}let{apiUrl:c,mcp:l}=i();f(`[entrydesk-mcp] Connecting to ${c}…`),f(`[entrydesk-mcp] Workspace: ${s}`);let u=await p(c,o,s);f(`[entrydesk-mcp] Connected to EntryDesk API`);let d=null,m=async()=>r(o)?d||(d=(async()=>{f(`[entrydesk-mcp] Token expiring soon, refreshing…`);let n=await e.getAll();if(!n?.accessToken)throw Error("Not logged in. Run `entrydesk login` again.");let r=await t(n);if(r!==o){o=r;try{await u.close()}catch{}u=await p(c,o,s),f(`[entrydesk-mcp] Token refreshed, reconnected`)}return u})().finally(()=>{d=null}),d):u,_=async()=>{try{await u.close()}catch{}};a.mode===`http`?await h(m,_,a.port??l.httpPort):(f(`[entrydesk-mcp] Starting stdio server…`),await g(m,_),f(`[entrydesk-mcp] Stdio server started`))}catch(e){console.error(`[entrydesk-mcp] Fatal error:`,e),process.exit(1)}}export{v as startMcpServer};
2
+ import{C as e,D as t,d as n,f as r,u as i}from"./profile-storage-Dv0xRb8J.js";import{r as a,t as o}from"./mcp-client-DMOEcmul.js";import s from"node:http";import{stderr as c}from"node:process";import{NodeStreamableHTTPServerTransport as l}from"@modelcontextprotocol/node";import{Server as u}from"@modelcontextprotocol/server";import{StdioServerTransport as d}from"@modelcontextprotocol/server/stdio";function f(e){c.write(`${e}\n`)}function p(e,t,n){return o({apiUrl:e,accessToken:t,workspaceId:n,name:`entrydesk-cli-proxy`})}function m(e){let t=new u({name:`entrydesk-cli`,version:`1.0.0`},{capabilities:{tools:{}}});return t.setRequestHandler(`tools/list`,async(t,n)=>({tools:(await(await e()).listTools({},a({signal:n.mcpReq.signal}))).tools})),t.setRequestHandler(`tools/call`,async(t,n)=>{let{name:r,arguments:i}=t.params,{progressToken:o}=n.mcpReq._meta??{},s=await(await e()).callTool({name:r,arguments:i},a({signal:n.mcpReq.signal,onProgress:o===void 0?void 0:e=>{n.mcpReq.notify({method:`notifications/progress`,params:{...e,progressToken:o}}).catch(()=>{})}})),c=Array.isArray(s.content)?[...s.content]:[];return s.structuredContent&&c.push({type:`text`,text:JSON.stringify(s.structuredContent,null,2)}),{content:c,structuredContent:s.structuredContent,isError:s.isError}}),t}async function h(e,t,n){let r=s.createServer(async(t,n)=>{if(t.method===`OPTIONS`){n.setHeader(`Access-Control-Allow-Origin`,`*`),n.setHeader(`Access-Control-Allow-Methods`,`GET, POST, DELETE, OPTIONS`),n.setHeader(`Access-Control-Allow-Headers`,`Content-Type, Accept`),n.writeHead(204),n.end();return}if(t.url!==`/mcp`){n.writeHead(404,{"Content-Type":`application/json`}),n.end(JSON.stringify({error:`Not found`}));return}let r=m(e),i=new l({sessionIdGenerator:void 0});if(n.setHeader(`Access-Control-Allow-Origin`,`*`),n.on(`close`,()=>{i.close(),r.close()}),await r.connect(i),t.method===`POST`){let e=``;t.on(`data`,t=>{e+=t.toString()}),t.on(`end`,async()=>{try{let r=JSON.parse(e);await i.handleRequest(t,n,r)}catch{n.writeHead(400,{"Content-Type":`application/json`}),n.end(JSON.stringify({error:`Invalid JSON`}))}})}else await i.handleRequest(t,n)});r.listen(n,()=>{f(`EntryDesk MCP server running at http://localhost:${n}/mcp`),f(`Press Ctrl+C to stop`)}),process.on(`SIGINT`,async()=>{f(`
3
+ Shutting down…`),r.close(),await t(),process.exit(0)}),process.on(`SIGTERM`,async()=>{r.close(),await t(),process.exit(0)})}async function g(e,t){let n=m(e),r=new d;r.onclose=async()=>{await t()},await n.connect(r)}const _={mode:`stdio`};async function v(a=_){process.on(`unhandledRejection`,e=>{console.error(`[entrydesk-mcp] Unhandled rejection:`,e)}),process.on(`uncaughtException`,e=>{console.error(`[entrydesk-mcp] Uncaught exception:`,e)});try{f(`[entrydesk-mcp] Starting MCP server…`);let o,s;try{let e=await i();o=e.accessToken,s=e.workspaceId}catch(e){let t=e instanceof Error?e.message:`Authentication failed`;console.error(t),process.exit(1)}let{apiUrl:c,mcp:l}=t();f(`[entrydesk-mcp] Connecting to ${c}…`),f(`[entrydesk-mcp] Workspace: ${s}`);let u=await p(c,o,s);f(`[entrydesk-mcp] Connected to EntryDesk API`);let d=null,m=async()=>n(o)?d||(d=(async()=>{f(`[entrydesk-mcp] Token expiring soon, refreshing…`);let t=await e.getAll();if(!t?.accessToken)throw Error("Not logged in. Run `entrydesk login` again.");let n=await r(t);if(n!==o){o=n;try{await u.close()}catch{}u=await p(c,o,s),f(`[entrydesk-mcp] Token refreshed, reconnected`)}return u})().finally(()=>{d=null}),d):u,_=async()=>{try{await u.close()}catch{}};a.mode===`http`?await h(m,_,a.port??l.httpPort):(f(`[entrydesk-mcp] Starting stdio server…`),await g(m,_),f(`[entrydesk-mcp] Stdio server started`))}catch(e){console.error(`[entrydesk-mcp] Fatal error:`,e),process.exit(1)}}export{v as startMcpServer};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{A as e,D as t,S as n,u as r}from"./profile-storage-Dv0xRb8J.js";import{Client as i,StreamableHTTPClientTransport as a}from"@modelcontextprotocol/client";const o=()=>{};function s(t={}){let{requestTimeout:n,requestMaxTotalTimeout:r}=e();return{timeout:n,maxTotalTimeout:r,resetTimeoutOnProgress:!0,onprogress:t.onProgress??o,signal:t.signal}}async function c(e={}){let o=e.apiUrl,s=e.accessToken,c=e.workspaceId;if(!s||!c){let e=await r();s||=e.accessToken,c||=e.workspaceId}o||=t().apiUrl;let l=new i({name:e.name??`entrydesk-cli`,version:`1.0.0`},{versionNegotiation:{mode:`auto`}}),u=new a(new URL(`${o}/v1/workspaces/${c}/mcp`),{requestInit:{headers:{Authorization:`Bearer ${s}`,...n()}}});return await l.connect(u),l}async function l(){return c()}export{l as n,s as r,c as t};
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import{L as e,b as t,u as n}from"./profile-storage-Dv0xRb8J.js";import{n as r}from"./format-C3tQC6LL.js";import{t as i}from"./paginate-CfIrho1f.js";function a(e){return!e||e<=0?``:`${Math.round(e/60)}m`}function o(e){console.log(`Meetings (${e.length}):\n`);for(let t of e){let e=[`(${t.status??`unknown`})`],n=r(t.startTime??t.sortTime);n&&e.push(n),t.hasRecordings&&e.push(`🎙️`),e.push(t.isOwner?`owner`:t.myRole),console.log(` ${t.title}`),console.log(` ${e.join(` · `)}`),t.processingStatus&&console.log(` processing: ${t.processingStatus}`),console.log(` ID: ${t.id}`),console.log(``)}}function s(e){if(console.log(`${e.title}\n`),console.log(` ID: ${e.id}`),console.log(` Status: ${e.status}`),console.log(` Visibility: ${e.visibility}`),console.log(` Source: ${e.source}`),e.myRole&&console.log(` My role: ${e.isOwner?`owner`:e.myRole}`),e.startTime&&console.log(` Start: ${r(e.startTime)}`),e.endTime&&console.log(` End: ${r(e.endTime)}`),e.location&&console.log(` Location: ${e.location}`),e.conferenceLink&&console.log(` Conference: ${e.conferenceLink}`),e.participants&&e.participants.length>0){console.log(` Participants (${e.participants.length}):`);for(let t of e.participants){let e=t.displayName??t.email;console.log(` - ${e}${t.role?` (${t.role})`:``}`)}}e.summary&&console.log(`\n Summary:\n${e.summary}`);let t=e.recordings??[];if(console.log(`\n Recordings (${t.length}):`),t.length===0){console.log(` (none)`);return}for(let e of t){let t=[];e.processingStatus&&t.push(e.processingStatus);let n=a(e.duration);n&&t.push(n),e.hasTranscript&&t.push(`transcript✓`),e.hasSummary&&t.push(`summary✓`),console.log(` - ${e.title}`),t.length>0&&console.log(` ${t.join(` · `)}`),console.log(` ID: ${e.id}`)}}function c(e){if(console.log(`Visibility: ${e.visibility}\n`),console.log(`User grants (${e.userGrants.length}):`),e.userGrants.length===0)console.log(` (none)`);else for(let t of e.userGrants)console.log(` - ${t.userName} <${t.userEmail}> · ${t.role}`),console.log(` ID: ${t.userId}`);if(console.log(`\nTeam grants (${e.teamGrants.length}):`),e.teamGrants.length===0)console.log(` (none)`);else for(let t of e.teamGrants)console.log(` - ${t.teamName} (${t.memberCount} members) · ${t.role}`),console.log(` ID: ${t.teamId}`)}async function l(e){let{accessToken:r,workspaceId:a}=await n(),s=new t,c={search:e.search,filter:e.filter,sortBy:e.sort};if(e.all){let t=await i(async t=>{let n=await s.getMeetings(r,a,{limit:e.limit??20,nextKey:t,...c});return{items:n.meetings,nextKey:n.nextKey}});if(e.json){console.log(JSON.stringify({meetings:t}));return}if(t.length===0){console.log(`No meetings found in this workspace.`);return}o(t);return}let{meetings:l,nextKey:u}=await s.getMeetings(r,a,{limit:e.limit,nextKey:e.nextKey,...c});if(e.json){console.log(JSON.stringify({meetings:l,nextKey:u}));return}if(l.length===0){console.log(`No meetings found in this workspace.`);return}o(l),u&&console.log(`Next page: --next-key ${u}`)}async function u(e,r){let{accessToken:i,workspaceId:a}=await n(),o=await new t().getMeeting(i,a,e);if(r.json){console.log(JSON.stringify(o));return}s(o)}async function d(e){let{accessToken:r,workspaceId:i}=await n(),a={title:e.title};e.description!==void 0&&(a.description=e.description),e.location!==void 0&&(a.location=e.location),e.start!==void 0&&(a.startTime=e.start),e.end!==void 0&&(a.endTime=e.end),e.conferenceLink!==void 0&&(a.conferenceLink=e.conferenceLink),e.notes!==void 0&&(a.notes=e.notes);let o=await new t().createMeeting(r,i,a);if(e.json){console.log(JSON.stringify(o));return}console.log(`Created meeting: ${o.title}`),console.log(` ID: ${o.id}`)}async function f(e,r){let i={};r.title!==void 0&&(i.title=r.title),r.description!==void 0&&(i.description=r.description),r.location!==void 0&&(i.location=r.location),r.start!==void 0&&(i.startTime=r.start),r.end!==void 0&&(i.endTime=r.end),r.conferenceLink!==void 0&&(i.conferenceLink=r.conferenceLink),r.notes!==void 0&&(i.notes=r.notes),r.status!==void 0&&(i.status=r.status),r.visibility!==void 0&&(i.visibility=r.visibility),Object.keys(i).length===0&&(console.error(`No fields provided to update.`),process.exit(1));let{accessToken:a,workspaceId:o}=await n(),s=await new t().updateMeeting(a,o,e,i);if(r.json){console.log(JSON.stringify(s));return}console.log(`Updated meeting: ${e}`)}async function p(e,r){let{accessToken:i,workspaceId:a}=await n();if(await new t().deleteMeeting(i,a,e),r.json){console.log(JSON.stringify({id:e,deleted:!0}));return}console.log(`Deleted meeting: ${e}`)}async function m(r,i){let{accessToken:a,workspaceId:o}=await n(),s=e(await new t().getMeeting(a,o,r));if(i.json){console.log(JSON.stringify({summary:s??null}));return}s||(console.error(`This meeting has no summary yet.`),process.exit(1)),console.log(s)}async function h(e,r){let{accessToken:i,workspaceId:a}=await n(),o=await new t().getRecording(i,a,e),s=r.raw?o.transcriptWithTimestamps:o.transcript;if(r.json){console.log(JSON.stringify({transcript:s,processingStatus:o.processingStatus}));return}s||(console.error(o.processingStatus&&o.processingStatus!==`completed`?`Transcript not ready (processing status: ${o.processingStatus}).`:`This recording has no transcript.`),process.exit(1)),console.log(s)}async function g(e,i){let{accessToken:a,workspaceId:o}=await n(),{previous:s}=await new t().getMeetingPreviousBrief(a,o,e);if(i.json){console.log(JSON.stringify({previous:s}));return}if(!s){console.log(`No previous meeting found in this series.`);return}if(console.log(`Previous: ${s.title}`),s.startTime&&console.log(` ${r(s.startTime)}`),s.summary&&console.log(`\nSummary:\n${s.summary}`),s.actionItems.length>0){console.log(`
3
+ Action items:`);for(let e of s.actionItems){let t=e.completed?`[x]`:`[ ]`,n=e.assignee?` (@${e.assignee})`:``;console.log(` ${t} ${e.description}${n}`)}}}async function _(e,r){let{accessToken:i,workspaceId:a}=await n(),o=new t;if(r.addUser){let t=await o.upsertMeetingUserGrant(i,a,e,r.addUser,r.role);if(r.json){console.log(JSON.stringify(t));return}console.log(`Granted ${r.role} to user ${r.addUser}`);return}if(r.removeUser){if(await o.removeMeetingUserGrant(i,a,e,r.removeUser),r.json){console.log(JSON.stringify({userId:r.removeUser,removed:!0}));return}console.log(`Revoked access for user ${r.removeUser}`);return}if(r.addTeam){let t=await o.upsertMeetingTeamGrant(i,a,e,r.addTeam,r.role);if(r.json){console.log(JSON.stringify(t));return}console.log(`Granted ${r.role} to team ${r.addTeam}`);return}if(r.removeTeam){if(await o.removeMeetingTeamGrant(i,a,e,r.removeTeam),r.json){console.log(JSON.stringify({teamId:r.removeTeam,removed:!0}));return}console.log(`Revoked access for team ${r.removeTeam}`);return}if(r.visibility){let t=await o.updateMeeting(i,a,e,{visibility:r.visibility});if(r.json){console.log(JSON.stringify({visibility:t.visibility}));return}console.log(`Set visibility to ${t.visibility}`);return}let s=await o.getMeetingShares(i,a,e);if(r.json){console.log(JSON.stringify(s));return}c(s)}export{d as createMeeting,p as deleteMeeting,l as listMeetings,_ as shareMeeting,u as showMeeting,m as showMeetingSummary,h as showMeetingTranscript,g as showPreviousMeeting,f as updateMeeting};
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import{b as e,u as t}from"./profile-storage-Dv0xRb8J.js";function n(e){return e===`saas`?{resolvesFrom:`model tiers`,note:`A task picks a tier (lite / pro / max) and the platform-default tier row decides the concrete model — but not always: a workspace with additional models enabled, or one on a subscription-pool model, can pin a concrete model id that resolves from its own rows and bypasses the tier mapping entirely.`}:{resolvesFrom:`this workspace's own rows`,note:`A task picks either a tier slug or a concrete model id. Tier rows are read per workspace and never fall back to the platform defaults, so changing a platform tier does not reach this workspace.`}}async function r(e){try{return await e()}catch(e){return{error:e instanceof Error?e.message:String(e)}}}function i(e){return` ${e.tier.padEnd(14)} → ${e.model?.id??`(no row)`}`}function a(e){if(`notExposed`in e){console.log(` Tier mappings: not exposed on SaaS — the public tier API strips the backing model id.`);return}if(`error`in e){console.log(` Tier mappings: unavailable (${e.error})`);return}if(e.tiers.length===0){console.log(` Tier mappings: none`);return}console.log(` Tier mappings (${e.tiers.length}):`);for(let t of e.tiers)console.log(i(t))}async function o(i){let{accessToken:o,workspaceId:s}=await t(),c=new e,{deploymentMode:l}=await c.getRuntimeConfig(),{resolvesFrom:u,note:d}=n(l),f=l===`saas`?Promise.resolve({notExposed:!0}):r(()=>c.getModelTierMappings(o,s)),[p,m]=await Promise.all([f,r(()=>c.getModels(o,s))]);if(i.json){console.log(JSON.stringify({deploymentMode:l,resolvesFrom:u,mappings:p,concrete:m}));return}console.log(`Model configuration
3
+ `),console.log(` Deployment mode: ${l}`),console.log(` Selection resolves from: ${u}`),console.log(` ${d}\n`),a(p),console.log(`error`in m?` Concrete models: unavailable (${m.error})`:` Concrete models available: ${m.models.length}`)}async function s(n){if(n.config){await o(n);return}let{accessToken:r,workspaceId:i}=await t(),{models:a}=await new e().listSelectableModels(r,i);if(n.json){console.log(JSON.stringify(a));return}if(a.length===0){console.log(`No models available in this workspace.`);return}console.log(`Available models (${a.length}):\n`);for(let e of a)console.log(` ${e.name}`),e.description&&console.log(` ${e.description.slice(0,80)}`),console.log(` ID: ${e.id}`),console.log(``)}export{s as runModels};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{b as e,u as t}from"./profile-storage-Dv0xRb8J.js";import{n}from"./format-C3tQC6LL.js";import{t as r}from"./paginate-CfIrho1f.js";function i(e,t){let n=e.replace(/\s+/g,` `).trim();return n.length>t?`${n.slice(0,t)}…`:n}function a(e){console.log(`Notifications (${e.length}):\n`);for(let t of e){let e=t.readAt?` `:`●`;console.log(` ${e} [${t.category}] ${t.rendered.title}`),t.rendered.body&&console.log(` ${i(t.rendered.body,100)}`);let r=n(t.createdAt);console.log(` ${r} · ${t.eventType} · ID: ${t.id}`),console.log(``)}}async function o(n){let{accessToken:i,workspaceId:o}=await t(),s=new e,c={tab:n.tab,eventType:n.eventType};if(n.all){let e=await r(async e=>{let t=await s.getNotifications(i,o,{...c,limit:n.limit??20,cursor:e});return{items:t.items,nextKey:t.nextKey}});if(n.json){console.log(JSON.stringify({items:e}));return}if(e.length===0){console.log(`No notifications.`);return}a(e);return}let{items:l,nextKey:u}=await s.getNotifications(i,o,{...c,limit:n.limit,cursor:n.nextKey});if(n.json){console.log(JSON.stringify({items:l,nextKey:u}));return}if(l.length===0){console.log(`No notifications.`);return}a(l),u&&console.log(`Next page: --next-key ${u}`)}async function s(n){let{accessToken:r,workspaceId:i}=await t(),{count:a,capped:o}=await new e().getNotificationUnreadCount(r,i);if(n.json){console.log(JSON.stringify({count:a,capped:o??!1}));return}console.log(`${o?`${a}+`:a} unread`)}async function c(n,r){let{accessToken:i,workspaceId:a}=await t();if(await new e().markNotificationRead(i,a,n),r.json){console.log(JSON.stringify({id:n,read:!0}));return}console.log(`Marked notification read: ${n}`)}async function l(n){let{accessToken:r,workspaceId:i}=await t();if(await new e().markAllNotificationsRead(r,i),n.json){console.log(JSON.stringify({readAll:!0}));return}console.log(`Marked all notifications read.`)}export{o as listNotifications,l as markAllNotificationsRead,c as markNotificationRead,s as showUnreadCount};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ const e=[`mine`,`shared`,`all`],t=[`updated_at`,`start_time`],n="the UUID `entrydesk tasks --json` prints",r=[`no-repeat`,`minutes`,`hours`,`days`,`weeks`,`months`],i=[`stream-json`],a=[`cost`,`operations`],o=[`user`,`agent`,`schedule`,`model`];export{n as a,i,t as n,o,r,a as s,e as t};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{r as e}from"./profile-storage-Dv0xRb8J.js";async function t(t){let n=[],r;for(let i=0;;i++){if(i>=100)throw new e(`Reached maximum page limit (100). Use --limit and --next-key for manual pagination.`);let a=await t(r);if(n.push(...a.items),r=a.nextKey,!r)return n}}export{t};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{E as e}from"./profile-storage-Dv0xRb8J.js";import t from"node:fs";import n from"node:os";import r from"node:path";import{windowsReservedNameRegex as i}from"filename-reserved-regex";const a=`.entrydesk`;function o(){return{version:1,skills:{}}}function s(e){return r.join(e,a,`skills-lock.json`)}function c(e){try{let n=JSON.parse(t.readFileSync(s(e),`utf8`));return n.version!==1||typeof n.skills!=`object`||n.skills===null?o():n}catch{return o()}}function l(e,n){let i={};for(let e of Object.keys(n.skills).toSorted())i[e]=n.skills[e];let a={version:1,...n.workspaceId?{workspaceId:n.workspaceId}:{},skills:i},o=s(e);t.mkdirSync(r.dirname(o),{recursive:!0}),t.writeFileSync(o,`${JSON.stringify(a,null,2)}\n`,`utf8`)}function u(e,t){return c(e).skills[t]}function d(e,t,n){let r=c(e);r.skills[t]=n,l(e,r)}function f(e,t){let n=c(e);if(!(t in n.skills))return!1;let{[t]:r,...i}=n.skills;return l(e,{...n,skills:i}),!0}function p(e){try{let n=JSON.parse(t.readFileSync(e,`utf8`));return typeof n.workspaceId!=`string`||n.workspaceId===``?void 0:n}catch{return}}function m(e,n){t.mkdirSync(r.dirname(e),{recursive:!0}),t.writeFileSync(e,`${JSON.stringify(n,null,2)}\n`,`utf8`)}function h(e){return t.existsSync(e)?(t.rmSync(e),!0):!1}function g(e){return r.join(e,a,`project.json`)}function _(){return r.join(n.homedir(),a,`global-link.json`)}function v(){return p(_())}function y(e){m(_(),e)}function b(){return h(_())}function x(e=process.cwd()){let n=r.resolve(e);for(;;){if(t.existsSync(g(n)))return n;let e=r.dirname(n);if(e===n)return;n=e}}function S(e){return p(g(e))}function C(e,t){m(g(e),t)}function w(e){return h(g(e))}function T(e=process.cwd()){let t=x(e);if(!t)return;let n=S(t);return n?{rootDir:t,link:n}:void 0}function E(t){let n=e();if(t&&n&&t!==n)throw Error(`This directory is linked to a workspace on ${t}, but the active profile points at ${n}. Re-run 'entrydesk skills link' or switch profile.`)}function D(){process.env.ENTRYDESK_API_URL&&console.error(`Note: the recorded apiUrl comes from the ENTRYDESK_API_URL environment variable. This link pins the directory to that API — if the override was temporary, re-run the link without it.`)}function O(e,t){if(e){let e=n.homedir(),r=v();return r?(E(r.apiUrl),{rootDir:e,workspaceId:r.workspaceId,linked:!0}):{rootDir:e,workspaceId:t,linked:!1}}let r=T(process.cwd());return r?(E(r.link.apiUrl),{rootDir:r.rootDir,workspaceId:r.link.workspaceId,linked:!0}):{rootDir:process.cwd(),workspaceId:t,linked:!1}}const k=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u;function A(e){if(!k.test(e))throw Error(`Invalid skill name "${e}": must be lowercase letters, digits and single hyphens (e.g. "my-skill").`)}function j(e,t){A(t);let n=r.resolve(e,`.entrydesk`,`skills`),i=r.resolve(n,t);if(i!==r.join(n,t)||!i.startsWith(n+r.sep))throw Error(`Refusing unsafe skill path for "${t}".`);return i}function M(e,t){let n=j(e,t);if(i().test(t))throw Error(`Invalid skill name "${t}": reserved as a device name on Windows.`);return n}function N(e,t){return process.platform!==`win32`&&u(e,t)!==void 0?j(e,t):M(e,t)}export{D as a,g as c,y as d,C as f,d as g,f as h,O as i,b as l,c as m,j as n,x as o,u as p,N as r,_ as s,A as t,w as u};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{O as e,S as t,r as n,t as r}from"./profile-storage-DYUIMuP0.js";function i(e,t){let i=e??t.profile;if(i)return i;if(r.getProfileCount()===1)return r.getProfileNames()[0];throw new n(`Profile name is required when multiple profiles exist.`)}function a(e){let t=r.getCurrentProfileName(),n=r.getProfileNames();if(e.json){console.log(JSON.stringify({currentProfile:t,profiles:n.map(e=>({name:e,isCurrent:e===t}))}));return}console.log(`Profiles (${n.length}):`);for(let e of n)console.log(` ${e}${e===t?` (current)`:``}`)}function o(e){let t=r.getCurrentProfileName();if(e.json){console.log(JSON.stringify({name:t,isCurrent:!0}));return}console.log(`Current profile: ${t}`)}async function s(n,a){let o=i(n,a),s=e.getAll(o),c=await t.getAll(o),l=!!c?.accessToken,u=o===r.getCurrentProfileName();if(a.json){console.log(JSON.stringify({name:o,isCurrent:u,config:s,auth:l?{loggedIn:!0,email:c?.email??null,workspaceId:c?.workspaceId??null}:{loggedIn:!1}}));return}console.log(`Profile: ${o}${u?` (current)`:``}`),console.log(` API URL: ${s.apiUrl??`default`}`),console.log(` Hub URL: ${s.hubUrl??`default`}`),console.log(` Model: ${s.model?.default??`unset`}`);let d=s.connectors?.defaults&&s.connectors.defaults.length>0?s.connectors.defaults.join(`, `):`unset`;console.log(` Connectors: ${d}`),console.log(l?` Logged in as: ${c?.email??`unknown`}`:` Not logged in`),l&&c?.workspaceId&&console.log(` Workspace ID: ${c.workspaceId}`)}function c(e,t){let n=e??t.profile??r.DEFAULT_PROFILE;if(r.createProfile(n),t.json){console.log(JSON.stringify({name:n,created:!0}));return}console.log(`Profile created: ${n}`)}function l(e,t){let n=i(e,t);if(r.setCurrentProfile(n),t.json){console.log(JSON.stringify({name:n,current:!0}));return}console.log(`Switched to profile: ${n}`)}async function u(e,n){let a=i(e,n),o=r.deleteProfile(a);if(await t.deleteProfileCredentials(a),n.json){console.log(JSON.stringify({deleted:a,currentProfile:o.currentProfile}));return}console.log(`Profile deleted: ${a}`),console.log(`Current profile: ${o.currentProfile}`)}async function d(e,n,i){let a=r.renameProfile(e,n);if(await t.moveProfileCredentials(e,n),i.json){console.log(JSON.stringify({renamed:e,name:n,currentProfile:a.currentProfile}));return}console.log(`Profile renamed: ${e} -> ${n}`),console.log(`Current profile: ${a.currentProfile}`)}async function f(n,i,a){let o=e.getAll(n);if(r.createProfile(i),e.setAll(o,i),await t.clear(i),a.json){console.log(JSON.stringify({source:n,name:i,cloned:!0}));return}console.log(`Profile cloned: ${n} -> ${i}`)}export{f as cloneProfile,c as createProfile,u as deleteProfile,a as listProfiles,d as renameProfile,o as showCurrentProfile,s as showProfile,l as useProfile};
2
+ import{C as e,M as t,r as n,t as r}from"./profile-storage-Dv0xRb8J.js";function i(e,t){let i=e??t.profile;if(i)return i;if(r.getProfileCount()===1)return r.getProfileNames()[0];throw new n(`Profile name is required when multiple profiles exist.`)}function a(e){let t=r.getCurrentProfileName(),n=r.getProfileNames();if(e.json){console.log(JSON.stringify({currentProfile:t,profiles:n.map(e=>({name:e,isCurrent:e===t}))}));return}console.log(`Profiles (${n.length}):`);for(let e of n)console.log(` ${e}${e===t?` (current)`:``}`)}function o(e){let t=r.getCurrentProfileName();if(e.json){console.log(JSON.stringify({name:t,isCurrent:!0}));return}console.log(`Current profile: ${t}`)}async function s(n,a){let o=i(n,a),s=t.getAll(o),c=await e.getAll(o),l=!!c?.accessToken,u=o===r.getCurrentProfileName();if(a.json){console.log(JSON.stringify({name:o,isCurrent:u,config:s,auth:l?{loggedIn:!0,email:c?.email??null,workspaceId:c?.workspaceId??null}:{loggedIn:!1}}));return}console.log(`Profile: ${o}${u?` (current)`:``}`),console.log(` API URL: ${s.apiUrl??`default`}`),console.log(` Hub URL: ${s.hubUrl??`default`}`),console.log(` Model: ${s.model?.default??`unset`}`);let d=s.connectors?.defaults&&s.connectors.defaults.length>0?s.connectors.defaults.join(`, `):`unset`;console.log(` Connectors: ${d}`),console.log(l?` Logged in as: ${c?.email??`unknown`}`:` Not logged in`),l&&c?.workspaceId&&console.log(` Workspace ID: ${c.workspaceId}`)}function c(e,t){let n=e??t.profile??r.DEFAULT_PROFILE;if(r.createProfile(n),t.json){console.log(JSON.stringify({name:n,created:!0}));return}console.log(`Profile created: ${n}`)}function l(e,t){let n=i(e,t);if(r.setCurrentProfile(n),t.json){console.log(JSON.stringify({name:n,current:!0}));return}console.log(`Switched to profile: ${n}`)}async function u(t,n){let a=i(t,n),o=r.deleteProfile(a);if(await e.deleteProfileCredentials(a),n.json){console.log(JSON.stringify({deleted:a,currentProfile:o.currentProfile}));return}console.log(`Profile deleted: ${a}`),console.log(`Current profile: ${o.currentProfile}`)}async function d(t,n,i){let a=r.renameProfile(t,n);if(await e.moveProfileCredentials(t,n),i.json){console.log(JSON.stringify({renamed:t,name:n,currentProfile:a.currentProfile}));return}console.log(`Profile renamed: ${t} -> ${n}`),console.log(`Current profile: ${a.currentProfile}`)}async function f(n,i,a){let o=t.getAll(n);if(r.createProfile(i),t.setAll(o,i),await e.clear(i),a.json){console.log(JSON.stringify({source:n,name:i,cloned:!0}));return}console.log(`Profile cloned: ${n} -> ${i}`)}export{f as cloneProfile,c as createProfile,u as deleteProfile,a as listProfiles,d as renameProfile,o as showCurrentProfile,s as showProfile,l as useProfile};