@entrydesk/cli 2.2.0-beta → 2.2.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 (76) hide show
  1. package/README.md +30 -0
  2. package/dist/add-BJv6tPO-.js +10 -0
  3. package/dist/agents-fP3hIH7X.js +10 -0
  4. package/dist/{billing-DHV0Wfwm.js → billing-Cy0BYngu.js} +1 -1
  5. package/dist/{budget-Dvl1Q6_g.js → budget-MVbF8WbS.js} +1 -1
  6. package/dist/build-task-request-config-BzI-dDZP.js +10 -0
  7. package/dist/{commands-qNH4DlB_.js → commands-CfDSEDKI.js} +1 -1
  8. package/dist/{commands-ghS7KAQr.js → commands-DU48SG8W.js} +1 -1
  9. package/dist/config-Cl-c7scx.js +11 -0
  10. package/dist/connectors-DVzXDbUU.js +11 -0
  11. package/dist/{file-upload-CgLvxPGL.js → file-upload-Dq6B0x4m.js} +3 -3
  12. package/dist/{format-BaXJBAlk.js → format-CIj0qQba.js} +1 -1
  13. package/dist/{hash-CnSb1n2t.js → hash-92fWniGT.js} +1 -1
  14. package/dist/index.js +25 -20
  15. package/dist/{instruction-DaoJgFgE.js → instruction-6ZWRQh4G.js} +1 -1
  16. package/dist/{login-CVUzJp76.js → login-CO1aBG6c.js} +1 -1
  17. package/dist/{resource-grants-DMj0dy5m.js → logout-WKIZVWJ7.js} +1 -1
  18. package/dist/{marketplace-C-7CArF7.js → marketplace-C0C2JpYf.js} +2 -2
  19. package/dist/{mcp-BnFLUTG-.js → mcp-CqMrd5AI.js} +2 -2
  20. package/dist/{mcp-client-CPFC6TCy.js → mcp-client-CEH9X7Vs.js} +1 -1
  21. package/dist/meeting-C5vHfcTw.js +11 -0
  22. package/dist/message-utils-D48Yqd9T.js +25 -0
  23. package/dist/{models-pzt8nNX7.js → models-BENTHton.js} +2 -2
  24. package/dist/{notifications-Bo7oPqK5.js → notifications-DdadH0Wc.js} +1 -1
  25. package/dist/{paginate-DetNe5nU.js → paginate-Cbe4RaEq.js} +1 -1
  26. package/dist/paths-BiowKnkz.js +10 -0
  27. package/dist/profile-hhU_G-Ea.js +10 -0
  28. package/dist/profile-storage-CKrZ-xsd.js +73 -0
  29. package/dist/{project-context-D8YawkvR.js → project-context-DeYepfN2.js} +1 -1
  30. package/dist/{project-governance-EFbI_Qan.js → project-governance-R__UPIhr.js} +1 -1
  31. package/dist/{project-sources-CFgB4loh.js → project-sources-C-MXx6j-.js} +1 -1
  32. package/dist/project-sources-write-ygvHaDUu.js +10 -0
  33. package/dist/{project-tasks-Bk8-wOyn.js → project-tasks-B0STK_8Q.js} +1 -1
  34. package/dist/{project-CPKxduou.js → project-xiz3Jopl.js} +1 -1
  35. package/dist/{push-4Y4mjxO7.js → push-BxQQWCZ2.js} +1 -1
  36. package/dist/{recordings-DtgXMjp2.js → recordings-68Oe1Kvd.js} +2 -2
  37. package/dist/{remove-DUFnCuRT.js → remove-C7BCBdoq.js} +1 -1
  38. package/dist/resolve-IOW00hfy.js +14 -0
  39. package/dist/resource-grants-Bb4evqsH.js +10 -0
  40. package/dist/{schedules-6T2-994t.js → schedules-wopieg4D.js} +2 -2
  41. package/dist/skills-Drr0gw-l.js +10 -0
  42. package/dist/{status-DHllWQ7c.js → status-Bw2E5bfa.js} +1 -1
  43. package/dist/status-DX6A6ugk.js +10 -0
  44. package/dist/task-bZNZ_yxV.js +116 -0
  45. package/dist/tasks-ZC9uSdkB.js +22 -0
  46. package/dist/{tasks-CLlI3fiV.js → tasks-lK8PTMnE.js} +1 -1
  47. package/dist/{team-aQszguLF.js → team-8-enl9cj.js} +2 -2
  48. package/dist/teams-ByeuT2Ks.js +10 -0
  49. package/dist/{logout-B6Bb4w2Y.js → token-DrAF7BWj.js} +1 -1
  50. package/dist/tool-82NKBr29.js +17 -0
  51. package/dist/update-DfOBWme1.js +10 -0
  52. package/dist/{usage-BLPq7c6l.js → usage-BS_didkP.js} +1 -1
  53. package/dist/{usage-audit-BYvZgTJp.js → usage-audit-DOuyWGaq.js} +3 -3
  54. package/dist/{version-jPJWKUcc.js → version-D7DOD1ug.js} +1 -1
  55. package/dist/{webhook-BxPA95wd.js → webhook-Da2l-gv6.js} +1 -1
  56. package/dist/{workflow-DJkPvmuA.js → workflow-oudE3gsp.js} +4 -4
  57. package/dist/{workspaces-CDotU443.js → workspaces-9SRfDSh3.js} +2 -2
  58. package/package.json +5 -4
  59. package/dist/add-A1EZKhMH.js +0 -10
  60. package/dist/agents-CZzVru0_.js +0 -10
  61. package/dist/build-task-request-config-B_mlDg_c.js +0 -10
  62. package/dist/config-B3pbK-VP.js +0 -11
  63. package/dist/connectors-Dqa8qg7s.js +0 -11
  64. package/dist/meeting-B5-UQSO3.js +0 -11
  65. package/dist/message-utils-DRHsMlj2.js +0 -15
  66. package/dist/paths-CLGwOhp4.js +0 -10
  67. package/dist/profile-Cth2_rzi.js +0 -10
  68. package/dist/profile-storage-BVSyHoBn.js +0 -68
  69. package/dist/project-sources-write-DUx1voCZ.js +0 -10
  70. package/dist/resolve-yAqzT64X.js +0 -14
  71. package/dist/skills-C56S2Z62.js +0 -10
  72. package/dist/status-BBvz4l0p.js +0 -10
  73. package/dist/task-Hcgf0oDf.js +0 -110
  74. package/dist/tasks-D2CtxbpJ.js +0 -22
  75. package/dist/tool-CASBzR_z.js +0 -17
  76. package/dist/update-CSh9DfHK.js +0 -10
package/dist/index.js CHANGED
@@ -7,30 +7,30 @@ if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
7
7
  );
8
8
  process.exit(1);
9
9
  }
10
- import{At as e,D as t,E as n,Et as r,F as i,G as a,Gt as o,Kt as s,Mt as ee,Nt as te,Pt as c,Qt as l,U as ne,Ut as u,V as re,W as d,_t as ie,bt as f,cn as ae,ct as p,gt as oe,ht as m,jt as se,kt as ce,ln as le,lt as h,mt as g,ot as ue,s as de,sn as fe,st as pe,t as _}from"./profile-storage-BVSyHoBn.js";import{t as me}from"./version-jPJWKUcc.js";import{a as v,c as he,i as ge,n as _e,o as ve,r as ye,s as be,t as xe}from"./options-Dpxg1wT1.js";import{Argument as y,Command as Se,InvalidArgumentError as b,Option as x}from"@commander-js/extra-typings";function Ce(e){if(!/^[+-]?\d+$/u.test(e.trim()))throw new b(`must be an integer`);return Number.parseInt(e,10)}function S(e,t){return n=>{let r=Ce(n);if(r<e||r>t)throw new b(`must be an integer between ${e} and ${t}`);return r}}function C(e){return t=>{let n=Number(t.trim());if(t.trim()===``||!Number.isFinite(n))throw new b(`must be a number`);if(n<e)throw new b(`must be at least ${e}`);return n}}function w(e){return t=>{if(t.length>e)throw new b(`must be at most ${e} characters`);return t}}function T(e){let t=w(e);return e=>{let n=e.trim();if(n.length===0)throw new b(`must not be empty`);return t(n)}}function E(t){let n=te(t);if(n)throw new b(e[n]);return t}function D(e){let t=se(e);if(t)throw new b(ce[t]);return e}function O(e){let t=e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0);if(t.length===0)throw new b(`must list at least one value`);return t}function k(e,t){let n=S(e,t);return e=>O(e).map(n)}function we(e,t=[]){return[...t,e]}const Te=/[()*]/u;function A(e,t=[]){let n=e.split(/[\s,]+/u).filter(e=>e.length>0);if(n.length===0)throw new b(`must name at least one tool`);for(let e of n)if(Te.test(e))throw new b(`"${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 Ee=new Map([[`web`,o.WEB_SEARCH],[`image`,o.CREATION],[`image-gen`,o.CREATION],[`image_generation`,o.CREATION]]);function De(e){return O(e).map(e=>{let t=e.replaceAll(`-`,`_`),n=Ee.get(e)??s.find(e=>e===t);if(!n)throw new b(`"${e}" is not one of: ${s.join(`, `)}`);return n})}function j(e){let t=/^(\d{1,2}):(\d{2})$/u.exec(e);if(!t)throw new b(`"${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 b(`"${e}" is not a valid time of day`);return{hour:n,minute:r}}function Oe(e){return O(e).map(j)}function ke(e){return O(e).map(e=>{let[t,n]=e.split(`-`);if(!t||!n)throw new b(`"${e}" is not an HH:MM-HH:MM range`);return{start:j(t),end:j(n)}})}const M=`--profile <name>`;function N(e){return e.option(`--json`,`Output JSON for scripting`)}function P(e,t){return e.option(`--limit <number>`,`Max results per page (default: ${t})`,S(1,100)).option(`--next-key <cursor>`,`Fetch the next page using this cursor`)}function F(e,t){return P(e,t).addOption(new x(`--all`,`Fetch every page (auto-paginate)`).conflicts(`nextKey`))}function I(e){return e.addOption(new x(`--add-user <userId>`,`Grant a user access`).conflicts(`removeUser`)).option(`--remove-user <userId>`,`Revoke a user's access`)}function L(e){return I(e).addOption(new x(`--role <role>`,`Role for --add-user`).choices(u.options).default(u.enum.viewer))}function R(e){return O(e).map(e=>{let t=p.find(t=>t===e);if(!t)throw new b(`"${e}" is not one of: ${p.join(`, `)}`);return t})}const Ae=new Map([[`m`,60],[`h`,3600],[`d`,1440*60]]);function je(e){if(e===`now`)return 0;let t=/^(\d+)([mhd])$/u.exec(e),n=Number(t?.[1])*(Ae.get(t?.[2]??``)??0);if(!t||n<=0||n>604800)throw new b(`must be "now" or a duration up to 7d, such as 30m, 24h or 7d`);return n}const z={chat:`Chat & Tasks:`,build:`Build:`,workspace:`Workspace:`,setup:`Setup:`};function Me(){return new Se().name(`entrydesk`).description(`EntryDesk CLI — interact with EntryDesk from your terminal`).option(`--json`,`Output JSON for scripting (most commands support it)`).option(M,`Use a specific profile for this command`).version(`entrydesk ${me()}`,`-v, --version`,`Show the version number`).showHelpAfterError("(run `entrydesk --help` to see the command list)").configureHelp({showGlobalOptions:!0}).addHelpText(`after`,`
10
+ import{A as e,At as t,Bt as n,Cn as r,Dt as i,Et as a,Ht as ee,It as te,R as o,Sn as ne,Tt as s,Ut as re,Vt as ie,Wt as c,X as l,Y as u,Z as ae,_t as d,gt as oe,ht as se,k as ce,nn as f,on as p,pn as m,q as le,s as ue,sn as h,t as g,vt as de,wn as fe,wt as pe,zt as me}from"./profile-storage-CKrZ-xsd.js";import{t as he}from"./version-D7DOD1ug.js";import{a as _,c as ge,i as _e,n as ve,o as ye,r as be,s as xe,t as Se}from"./options-Dpxg1wT1.js";import{Argument as v,Command as Ce,InvalidArgumentError as y,Option as b}from"@commander-js/extra-typings";import{validate as we}from"uuid";function Te(e){if(!/^[+-]?\d+$/u.test(e.trim()))throw new y(`must be an integer`);return Number.parseInt(e,10)}function x(e,t){return n=>{let r=Te(n);if(r<e||r>t)throw new y(`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 y(`must be a number`);if(n<e)throw new y(`must be at least ${e}`);return n}}function C(e){return t=>{if(t.length>e)throw new y(`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 y(`must not be empty`);return t(n)}}function Ee(e){let t=URL.parse(e.trim());if(t?.protocol!==`http:`&&t?.protocol!==`https:`)throw new y(`must be an http(s) URL`);return t.href}function De(e){let t=e.trim();if(!we(t))throw new y(`must be a UUID`);return t}function T(e){let t=re(e);if(t)throw new y(n[t]);return e}function E(e){let t=ie(e);if(t)throw new y(me[t]);return e}function D(e){let t=e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0);if(t.length===0)throw new y(`must list at least one value`);return t}function O(e,t){let n=x(e,t);return e=>D(e).map(n)}function Oe(e,t=[]){return[...t,e]}const ke=/[()*]/u;function k(e,t=[]){let n=e.split(/[\s,]+/u).filter(e=>e.length>0);if(n.length===0)throw new y(`must name at least one tool`);for(let e of n)if(ke.test(e))throw new y(`"${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 Ae=new Map([[`web`,p.WEB_SEARCH],[`image`,p.CREATION],[`image-gen`,p.CREATION],[`image_generation`,p.CREATION]]);function je(e){return D(e).map(e=>{let t=e.replaceAll(`-`,`_`),n=Ae.get(e)??h.find(e=>e===t);if(!n)throw new y(`"${e}" is not one of: ${h.join(`, `)}`);return n})}function A(e){let[,t,n]=/^(\d{1,2}):(\d{2})$/u.exec(e)??[];if(t===void 0||n===void 0)throw new y(`"${e}" is not an HH:MM time`);let r=Number.parseInt(t,10),i=Number.parseInt(n,10);if(r>23||i>59)throw new y(`"${e}" is not a valid time of day`);return{hour:r,minute:i}}function Me(e){return D(e).map(A)}function Ne(e){return D(e).map(e=>{let[t,n]=e.split(`-`);if(!t||!n)throw new y(`"${e}" is not an HH:MM-HH:MM range`);return{start:A(t),end:A(n)}})}const j=`--profile <name>`;function M(e){return e.option(`--json`,`Output JSON for scripting`)}function N(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 P(e,t){return N(e,t).addOption(new b(`--all`,`Fetch every page (auto-paginate)`).conflicts(`nextKey`))}const F=w(100);function I(e){return e.addOption(new b(`--add-user <userId>`,`Grant a user access`).argParser(F).conflicts(`removeUser`)).addOption(new b(`--remove-user <userId>`,`Revoke a user's access`).argParser(F))}function L(e){return e.addOption(new b(`--add-team <teamId>`,"Grant everyone in a team access; `entrydesk teams` lists team ids").argParser(F).conflicts([`removeTeam`,`addUser`,`removeUser`])).addOption(new b(`--remove-team <teamId>`,`Revoke a team's access`).argParser(F).conflicts([`addUser`,`removeUser`]))}function R(e){return I(e).addOption(new b(`--role <role>`,`Role to grant; a team can be viewer or editor, never owner`).choices(f.options).default(f.enum.viewer))}const z=[`addUser`,`removeUser`,`addTeam`,`removeTeam`];function B(e){return e.addOption(new b(`--add-workspace`,`Share with everyone in the workspace (publishes it; may need admin approval)`).conflicts([`removeWorkspace`,...z])).addOption(new b(`--remove-workspace`,`Stop sharing with the whole workspace`).conflicts(z))}function V(e){return D(e).map(e=>{let t=d.find(t=>t===e);if(!t)throw new y(`"${e}" is not one of: ${d.join(`, `)}`);return t})}const Pe=new Map([[`m`,60],[`h`,3600],[`d`,1440*60]]);function Fe(e){if(e===`now`)return 0;let t=/^(\d+)([mhd])$/u.exec(e),n=Number(t?.[1])*(Pe.get(t?.[2]??``)??0);if(!t||n<=0||n>604800)throw new y(`must be "now" or a duration up to 7d, such as 30m, 24h or 7d`);return n}const H={chat:`Chat & Tasks:`,build:`Build:`,workspace:`Workspace:`,setup:`Setup:`};function Ie(){return new Ce().name(`entrydesk`).description(`EntryDesk CLI — interact with EntryDesk from your terminal`).option(`--json`,`Output JSON for scripting (most commands support it)`).option(j,`Use a specific profile for this command`).version(`entrydesk ${he()}`,`-v, --version`,`Show the version number`).showHelpAfterError("(run `entrydesk --help` to see the command list)").configureHelp({showGlobalOptions:!0}).addHelpText(`after`,`
11
11
  Examples:
12
12
  entrydesk task -m "Summarize my open tasks" --model <model>
13
13
  entrydesk meeting transcript <recordingId> | entrydesk task -m "List action items"
14
14
  entrydesk agents list --mine --json
15
15
 
16
- Docs: https://entrydesk.com/docs/cli`)}function B(e){return e.option(`--connector-ids <ids>`,`Comma-separated connector ids`,O).option(`--capabilities <list>`,`Comma-separated capabilities (${s.join(`, `)})`,De).option(`--conversation-starters <list>`,`Comma-separated conversation starters`,O).option(`--tools <list>`,`Comma-separated tool names (prefix__tool)`,O).option(`--icon-id <iconId>`,`Icon to use`)}function Ne(e){let t=e.command(`agents`).summary(`List, show, create, publish, and share agents`).helpGroup(z.build);N(F(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-CZzVru0_.js`);await n(t.optsWithGlobals())}),N(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-CZzVru0_.js`);await r(e,n.optsWithGlobals())}),N(B(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-CZzVru0_.js`);await n(t.optsWithGlobals())}),N(B(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-CZzVru0_.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-CZzVru0_.js`);await t(e)}),N(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-CZzVru0_.js`);await r(e,n.optsWithGlobals())}),N(L(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-CZzVru0_.js`);await r(e,n.optsWithGlobals())})}function Pe(e){let t=e.command(`billing`).summary(`Show billing status and invoices`).helpGroup(z.workspace).addHelpText(`after`,`
16
+ Docs: https://entrydesk.com/docs/cli`)}function U(e){return e.option(`--connector-ids <ids>`,`Comma-separated connector ids`,D).option(`--capabilities <list>`,`Comma-separated capabilities (${h.join(`, `)})`,je).option(`--conversation-starters <list>`,`Comma-separated conversation starters`,D).option(`--tools <list>`,`Comma-separated tool names (prefix__tool)`,D).option(`--icon-id <iconId>`,"Icon to use (from `entrydesk agents icon generate|upload`)")}function Le(e){let t=e.command(`agents`).summary(`List, show, create, publish, and share agents`).helpGroup(H.build);M(P(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-fP3hIH7X.js`);await n(t.optsWithGlobals())}),M(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-fP3hIH7X.js`);await r(e,n.optsWithGlobals())}),M(U(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-fP3hIH7X.js`);await n(t.optsWithGlobals())}),M(U(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-fP3hIH7X.js`);await r(e,n.optsWithGlobals())});let n=t.command(`icon`).description(`Generate or upload an agent icon`);M(n.command(`generate`).description(`Generate an icon with AI; apply it to the agent when one is given`).argument(`[agentId]`,`Agent to apply the icon to; its name and description are the defaults`).option(`--name <name>`,`Name to generate the icon from`).option(`--description <text>`,`Description to generate the icon from`)).action(async(e,t,n)=>{let{generateAgentIcon:r}=await import(`./agents-fP3hIH7X.js`);await r(e,n.optsWithGlobals())}),M(n.command(`upload`).description(`Upload a PNG, JPEG, GIF, or WebP icon; apply it to the agent when one is given`).argument(`<path>`,`Image file to upload`).argument(`[agentId]`,`Agent to apply the icon to`)).action(async(e,t,n,r)=>{let{uploadAgentIcon:i}=await import(`./agents-fP3hIH7X.js`);await i(e,t,r.optsWithGlobals())}),t.command(`delete`).description(`Delete an agent you own`).argument(`<agentId>`,`Agent to delete`).action(async e=>{let{deleteAgent:t}=await import(`./agents-fP3hIH7X.js`);await t(e)}),M(t.command(`publish`).description("Share an agent with everyone in the workspace; same as `agents share --add-workspace`").argument(`<agentId>`,`Agent to publish`)).action(async(e,t,n)=>{let{publishAgent:r}=await import(`./agents-fP3hIH7X.js`);await r(e,n.optsWithGlobals())}),M(B(R(L(t.command(`share`).description(`Show or manage sharing (workspace, team and user grants)`).argument(`<agentId>`,`Agent to share`))))).action(async(e,t,n)=>{let{shareAgent:r}=await import(`./agents-fP3hIH7X.js`);await r(e,n.optsWithGlobals())})}function Re(e){let t=e.command(`billing`).summary(`Show billing status and invoices`).helpGroup(H.workspace).addHelpText(`after`,`
17
17
  Note: billing endpoints require an interactive login (OAuth); a workspace
18
- PAT (ENTRYDESK_TOKEN) cannot read billing.`);N(t.command(`status`,{isDefault:!0}).description(`Plan, seats, and extra-usage balance`)).action(async(e,t)=>{let{showBillingStatus:n}=await import(`./billing-DHV0Wfwm.js`);await n(t.optsWithGlobals())}),N(F(t.command(`invoices`).description(`List finalized invoices`),20)).action(async(e,t)=>{let{listInvoices:n}=await import(`./billing-DHV0Wfwm.js`);await n(t.optsWithGlobals())})}function Fe(e){if(!/^\d+(\.\d+)?$/u.test(e.trim()))throw new b(`must be a positive number`);return e}function Ie(e){let t=e.command(`budget`).summary(`View or manage the workspace budget`).helpGroup(z.workspace);N(t.command(`get`,{isDefault:!0}).description(`Show the current workspace budget`)).action(async(e,t)=>{let{showBudget:n}=await import(`./budget-Dvl1Q6_g.js`);await n(t.optsWithGlobals())}),N(t.command(`set`).description(`Set the workspace budget`).argument(`<amount>`,`Budget amount, e.g. 100.00`,Fe)).action(async(e,t,n)=>{let{setBudget:r}=await import(`./budget-Dvl1Q6_g.js`);await r(e,n.optsWithGlobals())}),N(t.command(`clear`).description(`Remove the workspace budget`)).action(async(e,t)=>{let{clearBudget:n}=await import(`./budget-Dvl1Q6_g.js`);await n(t.optsWithGlobals())})}const V=()=>new y(`<key>`,`Configuration key`).choices(i),Le={list:`profile show`,get:`profile get`,set:`profile set`,unset:`profile unset`};function Re(e){let t=e.command(`config`).summary("[deprecated] Use `entrydesk profile` instead").helpGroup(z.setup).addHelpText(`after`,"\nDeprecated: server URLs are profile settings. Use `entrydesk profile set|get|unset <key>`\nand `entrydesk profile show`; this command will be removed in a future release.");t.hook(`preAction`,(e,t)=>{let n=Le[t.name()]??`profile`;console.error(`Warning: \`entrydesk config\` is deprecated and will be removed in a future release. Use \`entrydesk ${n}\` instead.`)}),N(t.command(`list`,{isDefault:!0}).description(`List all configuration`)).action(async(e,t)=>{let{listConfig:n}=await import(`./config-B3pbK-VP.js`);n(t.optsWithGlobals())}),N(t.command(`get`).description(`Get a configuration value`).addArgument(V())).action(async(e,t,n)=>{let{getProfileValue:r}=await import(`./profile-Cth2_rzi.js`);r(e,n.optsWithGlobals())}),t.command(`set`).description(`Set a configuration value`).addArgument(V()).argument(`<value>`,`Value to store`).action(async(e,t,n,r)=>{let{setProfileValue:i}=await import(`./profile-Cth2_rzi.js`);i(e,t,r.optsWithGlobals())}),t.command(`unset`).description(`Remove a configuration value`).addArgument(V()).action(async(e,t,n)=>{let{unsetProfileValue:r}=await import(`./profile-Cth2_rzi.js`);r(e,n.optsWithGlobals())})}const H=ee.exclude([`dcard-dual`]).options;function ze(e){let t=e.command(`connectors`).summary(`List connectors and connect/disconnect them`).helpGroup(z.workspace);N(P(t.command(`list`,{isDefault:!0}).description(`List connected connectors`).option(`--all`,`Include connectors you haven't connected yet`).option(`--search <query>`,`Filter by name`,w(200)),100)).action(async(e,t)=>{let{listConnectors:n}=await import(`./connectors-Dqa8qg7s.js`);await n(t.optsWithGlobals())}),N(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-Dqa8qg7s.js`);await r(e,n.optsWithGlobals())}),N(t.command(`sync`).description(`Re-fetch a connector's tools from its MCP server now`).argument(`<connectorId>`,`Connector to sync`)).action(async(e,t,n)=>{let{syncConnectorTools:r}=await import(`./connectors-Dqa8qg7s.js`);await r(e,n.optsWithGlobals())}),N(t.command(`connect`).description(`Connect a connector`).argument(`<connectorId>`,`Connector to connect`).addOption(new x(`--token <token>`,`Connect with a static token / API key`).conflicts([`username`,`password`,`oauth`])).addOption(new x(`--username <username>`,`Connect with credentials (prefer env vars; argv is visible in process listings)`).conflicts(`oauth`)).addOption(new x(`--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-Dqa8qg7s.js`);await r(e,n.optsWithGlobals())}),N(t.command(`create`).description(`Create a custom connector pointing at a remote MCP server`).requiredOption(`--name <name>`,`Display name (letters, digits and single spaces)`,E).requiredOption(`--url <url>`,`MCP server URL`).requiredOption(`--description <text>`,`What the connector is for`,w(500)).addOption(new x(`--transport <transport>`,`MCP transport`).choices(c.options).default(`streamable_http`)).addOption(new x(`--tool-namespace <namespace>`,`Namespace for this connector's tools (default: the name, lowercased)`).argParser(D)).addOption(new x(`--tool-prefix <namespace>`).argParser(D).hideHelp()).addOption(new x(`--auth <type>`,`Authorization the server requires; omit for an open server`).choices(H)).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-Dqa8qg7s.js`);await n(t.optsWithGlobals())}),N(t.command(`update`).description(`Update a custom connector (only the fields you pass)`).addHelpText(`after`,`
18
+ PAT (ENTRYDESK_TOKEN) cannot read billing.`);M(t.command(`status`,{isDefault:!0}).description(`Plan, seats, and extra-usage balance`)).action(async(e,t)=>{let{showBillingStatus:n}=await import(`./billing-Cy0BYngu.js`);await n(t.optsWithGlobals())}),M(P(t.command(`invoices`).description(`List finalized invoices`),20)).action(async(e,t)=>{let{listInvoices:n}=await import(`./billing-Cy0BYngu.js`);await n(t.optsWithGlobals())})}function ze(e){if(!/^\d+(\.\d+)?$/u.test(e.trim()))throw new y(`must be a positive number`);return e}function Be(e){let t=e.command(`budget`).summary(`View or manage the workspace budget`).helpGroup(H.workspace);M(t.command(`get`,{isDefault:!0}).description(`Show the current workspace budget`)).action(async(e,t)=>{let{showBudget:n}=await import(`./budget-MVbF8WbS.js`);await n(t.optsWithGlobals())}),M(t.command(`set`).description(`Set the workspace budget`).argument(`<amount>`,`Budget amount, e.g. 100.00`,ze)).action(async(e,t,n)=>{let{setBudget:r}=await import(`./budget-MVbF8WbS.js`);await r(e,n.optsWithGlobals())}),M(t.command(`clear`).description(`Remove the workspace budget`)).action(async(e,t)=>{let{clearBudget:n}=await import(`./budget-MVbF8WbS.js`);await n(t.optsWithGlobals())})}const W=()=>new v(`<key>`,`Configuration key`).choices(o),Ve={list:`profile show`,get:`profile get`,set:`profile set`,unset:`profile unset`};function He(e){let t=e.command(`config`).summary("[deprecated] Use `entrydesk profile` instead").helpGroup(H.setup).addHelpText(`after`,"\nDeprecated: server URLs are profile settings. Use `entrydesk profile set|get|unset <key>`\nand `entrydesk profile show`; this command will be removed in a future release.");t.hook(`preAction`,(e,t)=>{let n=Ve[t.name()]??`profile`;console.error(`Warning: \`entrydesk config\` is deprecated and will be removed in a future release. Use \`entrydesk ${n}\` instead.`)}),M(t.command(`list`,{isDefault:!0}).description(`List all configuration`)).action(async(e,t)=>{let{listConfig:n}=await import(`./config-Cl-c7scx.js`);n(t.optsWithGlobals())}),M(t.command(`get`).description(`Get a configuration value`).addArgument(W())).action(async(e,t,n)=>{let{getProfileValue:r}=await import(`./profile-hhU_G-Ea.js`);r(e,n.optsWithGlobals())}),t.command(`set`).description(`Set a configuration value`).addArgument(W()).argument(`<value>`,`Value to store`).action(async(e,t,n,r)=>{let{setProfileValue:i}=await import(`./profile-hhU_G-Ea.js`);i(e,t,r.optsWithGlobals())}),t.command(`unset`).description(`Remove a configuration value`).addArgument(W()).action(async(e,t,n)=>{let{unsetProfileValue:r}=await import(`./profile-hhU_G-Ea.js`);r(e,n.optsWithGlobals())})}const G=ee.exclude([`dcard-dual`]).options;function Ue(e){let t=e.command(`connectors`).summary(`List connectors and connect/disconnect them`).helpGroup(H.workspace);M(N(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-DVzXDbUU.js`);await n(t.optsWithGlobals())}),M(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-DVzXDbUU.js`);await r(e,n.optsWithGlobals())}),M(t.command(`sync`).description(`Re-fetch a connector's tools from its MCP server now`).argument(`<connectorId>`,`Connector to sync`)).action(async(e,t,n)=>{let{syncConnectorTools:r}=await import(`./connectors-DVzXDbUU.js`);await r(e,n.optsWithGlobals())}),M(t.command(`connect`).description(`Connect a connector`).argument(`<connectorId>`,`Connector to connect`).addOption(new b(`--token <token>`,`Connect with a static token / API key`).conflicts([`username`,`password`,`oauth`])).addOption(new b(`--username <username>`,`Connect with credentials (prefer env vars; argv is visible in process listings)`).conflicts(`oauth`)).addOption(new b(`--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-DVzXDbUU.js`);await r(e,n.optsWithGlobals())}),M(t.command(`create`).description(`Create a custom connector pointing at a remote MCP server`).requiredOption(`--name <name>`,`Display name (letters, digits and single spaces)`,T).requiredOption(`--url <url>`,`MCP server URL`).requiredOption(`--description <text>`,`What the connector is for`,C(500)).addOption(new b(`--transport <transport>`,`MCP transport`).choices(c.options).default(`streamable_http`)).addOption(new b(`--tool-namespace <namespace>`,`Namespace for this connector's tools (default: the name, lowercased)`).argParser(E)).addOption(new b(`--tool-prefix <namespace>`).argParser(E).hideHelp()).addOption(new b(`--auth <type>`,`Authorization the server requires; omit for an open server`).choices(G)).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-DVzXDbUU.js`);await n(t.optsWithGlobals())}),M(t.command(`update`).description(`Update a custom connector (only the fields you pass)`).addHelpText(`after`,`
19
19
  Note: the API replaces the whole connector, so this reads the current one
20
20
  first; a PAT (ENTRYDESK_TOKEN) needs both connectors:read and
21
- connectors:write.`).argument(`<connectorId>`,`Connector to update`).option(`--name <name>`,`Display name (letters, digits and single spaces)`,E).option(`--url <url>`,`MCP server URL`).option(`--description <text>`,`What the connector is for`,w(500)).addOption(new x(`--transport <transport>`,`MCP transport`).choices(c.options)).addOption(new x(`--tool-namespace <namespace>`,`Namespace for this connector's tools`).argParser(D)).addOption(new x(`--auth <type>`,`Replace the authorization the server requires`).choices(H)).option(`--no-auth`,`Remove the authorization, for an open server`).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,n)=>{let{updateConnector:r}=await import(`./connectors-Dqa8qg7s.js`);await r(e,n.optsWithGlobals())}),N(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-Dqa8qg7s.js`);await r(e,n.optsWithGlobals())})}const U=e=>new x(`--type <type>`,e).choices(re);function Be(e){let t=e.command(`marketplace`).summary(`Browse and install marketplace agents and skills`).helpGroup(z.build).addHelpText(`after`,`
21
+ connectors:write.`).argument(`<connectorId>`,`Connector to update`).option(`--name <name>`,`Display name (letters, digits and single spaces)`,T).option(`--url <url>`,`MCP server URL`).option(`--description <text>`,`What the connector is for`,C(500)).addOption(new b(`--transport <transport>`,`MCP transport`).choices(c.options)).addOption(new b(`--tool-namespace <namespace>`,`Namespace for this connector's tools`).argParser(E)).addOption(new b(`--auth <type>`,`Replace the authorization the server requires`).choices(G)).option(`--no-auth`,`Remove the authorization, for an open server`).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,n)=>{let{updateConnector:r}=await import(`./connectors-DVzXDbUU.js`);await r(e,n.optsWithGlobals())}),M(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-DVzXDbUU.js`);await r(e,n.optsWithGlobals())})}const K=e=>new b(`--type <type>`,e).choices(le);function We(e){let t=e.command(`marketplace`).summary(`Browse and install marketplace agents and skills`).helpGroup(H.build).addHelpText(`after`,`
22
22
  Note: search/show are public; install requires login and CreateAgent/CreateSkill
23
- permission in the current workspace.`);N(t.command(`search`,{isDefault:!0}).description(`List marketplace agents and skills`).argument(`[tag]`,`Filter by a tag (shorthand for --tag)`).addOption(U(`Only list this resource type`)).option(`--tag <tag>`,`Filter by a tag`).option(`--limit <number>`,`Max results (default: 30)`,S(1,100)).option(`--cursor <key>`,`Pagination cursor from a previous page`)).action(async(e,t,n)=>{let{searchMarketplace:r}=await import(`./marketplace-C-7CArF7.js`);await r(e,n.optsWithGlobals())}),N(t.command(`show`).description(`Show an agent or skill's details`).argument(`<slug>`,`Marketplace slug`).addOption(U(`Resource type (auto-detected when omitted)`))).action(async(e,t,n)=>{let{showMarketplaceResource:r}=await import(`./marketplace-C-7CArF7.js`);await r(e,n.optsWithGlobals())}),N(t.command(`install`).description(`Install an agent or skill into the current workspace`).argument(`<slug>`,`Marketplace slug`).addOption(U(`Resource type (auto-detected when omitted)`))).action(async(e,t,n)=>{let{installMarketplaceResource:r}=await import(`./marketplace-C-7CArF7.js`);await r(e,n.optsWithGlobals())}),N(t.command(`roles`).description(`List role tags you can filter by`)).action(async(e,t)=>{let{showMarketplaceRoles:n}=await import(`./marketplace-C-7CArF7.js`);await n(t.optsWithGlobals())})}function W(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(z.build);N(F(t.command(`list`,{isDefault:!0}).description(`List meetings`).addOption(new x(`--filter <scope>`,`Filter meetings`).choices(xe).default(`all`)).option(`--search <text>`,`Search title and description`).addOption(new x(`--sort <field>`,`Sort order`).choices(_e).default(`updated_at`)),20)).action(async(e,t)=>{let{listMeetings:n}=await import(`./meeting-B5-UQSO3.js`);await n(t.optsWithGlobals())}),N(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-B5-UQSO3.js`);await r(e,n.optsWithGlobals())}),N(W(t.command(`create`).description(`Create a meeting manually`).requiredOption(`--title <text>`,`Meeting title`))).action(async(e,t)=>{let{createMeeting:n}=await import(`./meeting-B5-UQSO3.js`);await n(t.optsWithGlobals())}),N(W(t.command(`update`).description(`Update a meeting`).argument(`<meetingId>`,`Meeting to update`).option(`--title <text>`,`Meeting title`)).addOption(new x(`--status <status>`,`Meeting status`).choices(a.options)).addOption(new x(`--visibility <visibility>`,`Who can see it`).choices(d.options))).action(async(e,t,n)=>{let{updateMeeting:r}=await import(`./meeting-B5-UQSO3.js`);await r(e,n.optsWithGlobals())}),N(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-B5-UQSO3.js`);await r(e,n.optsWithGlobals())}),N(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-B5-UQSO3.js`);await r(e,n.optsWithGlobals())}),N(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-B5-UQSO3.js`);await r(e,n.optsWithGlobals())}),N(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-B5-UQSO3.js`);await r(e,n.optsWithGlobals())}),N(I(t.command(`share`).description(`Show or manage sharing (visibility, user/team grants)`).argument(`<meetingId>`,`Meeting to share`).addOption(new x(`--visibility <visibility>`,`Change who can see the meeting (owner only)`).choices(d.options))).addOption(new x(`--add-team <teamId>`,`Grant a team access`).conflicts(`removeTeam`)).option(`--remove-team <teamId>`,`Revoke a team's access`).addOption(new x(`--role <role>`,`Role for --add-user/--add-team`).choices(ne.options).default(ne.enum.viewer))).action(async(e,t,n)=>{let{shareMeeting:r}=await import(`./meeting-B5-UQSO3.js`);await r(e,n.optsWithGlobals())})}function He(e){let t=e.command(`notifications`).summary(`List, count, or mark notifications read`).helpGroup(z.build);N(F(t.command(`list`,{isDefault:!0}).description(`List notifications`).addOption(new x(`--tab <tab>`,`Filter by category`).choices(le).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-Bo7oPqK5.js`);await n(t.optsWithGlobals())}),N(t.command(`unread`).description(`Show the unread notification count`)).action(async(e,t)=>{let{showUnreadCount:n}=await import(`./notifications-Bo7oPqK5.js`);await n(t.optsWithGlobals())}),N(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-Bo7oPqK5.js`);await r(e,n.optsWithGlobals())}),N(t.command(`read-all`).description(`Mark every notification as read`)).action(async(e,t)=>{let{markAllNotificationsRead:n}=await import(`./notifications-Bo7oPqK5.js`);await n(t.optsWithGlobals())})}const G=()=>new y(`<key>`,`Configuration key`).choices(i);function Ue(e){let r=e.command(`profile`).summary(`Manage profiles`).helpGroup(z.setup).addHelpText(`after`,`
23
+ permission in the current workspace.`);M(t.command(`search`,{isDefault:!0}).description(`List marketplace agents and skills`).argument(`[tag]`,`Filter by a tag (shorthand for --tag)`).addOption(K(`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-C0C2JpYf.js`);await r(e,n.optsWithGlobals())}),M(t.command(`show`).description(`Show an agent or skill's details`).argument(`<slug>`,`Marketplace slug`).addOption(K(`Resource type (auto-detected when omitted)`))).action(async(e,t,n)=>{let{showMarketplaceResource:r}=await import(`./marketplace-C0C2JpYf.js`);await r(e,n.optsWithGlobals())}),M(t.command(`install`).description(`Install an agent or skill into the current workspace`).argument(`<slug>`,`Marketplace slug`).addOption(K(`Resource type (auto-detected when omitted)`))).action(async(e,t,n)=>{let{installMarketplaceResource:r}=await import(`./marketplace-C0C2JpYf.js`);await r(e,n.optsWithGlobals())}),M(t.command(`roles`).description(`List role tags you can filter by`)).action(async(e,t)=>{let{showMarketplaceRoles:n}=await import(`./marketplace-C0C2JpYf.js`);await n(t.optsWithGlobals())})}function q(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 Ge(e){let t=e.command(`meeting`).summary(`Manage meetings, summaries, transcripts, and sharing`).helpGroup(H.build);M(P(t.command(`list`,{isDefault:!0}).description(`List meetings`).addOption(new b(`--filter <scope>`,`Filter meetings`).choices(Se).default(`all`)).option(`--search <text>`,`Search title and description`).addOption(new b(`--sort <field>`,`Sort order`).choices(ve).default(`updated_at`)),20)).action(async(e,t)=>{let{listMeetings:n}=await import(`./meeting-C5vHfcTw.js`);await n(t.optsWithGlobals())}),M(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-C5vHfcTw.js`);await r(e,n.optsWithGlobals())}),M(q(t.command(`create`).description(`Create a meeting manually`).requiredOption(`--title <text>`,`Meeting title`))).action(async(e,t)=>{let{createMeeting:n}=await import(`./meeting-C5vHfcTw.js`);await n(t.optsWithGlobals())}),M(q(t.command(`update`).description(`Update a meeting`).argument(`<meetingId>`,`Meeting to update`).option(`--title <text>`,`Meeting title`)).addOption(new b(`--status <status>`,`Meeting status`).choices(ae.options)).addOption(new b(`--visibility <visibility>`,`Who can see it`).choices(l.options))).action(async(e,t,n)=>{let{updateMeeting:r}=await import(`./meeting-C5vHfcTw.js`);await r(e,n.optsWithGlobals())}),M(t.command(`record`).description(`Send a recording bot into a call (Google Meet, Zoom, Teams)`).argument(`<meetingUrl>`,`Call link for the bot to join`,Ee).option(`--title <text>`,`Title for the new meeting (default: the link)`,w(500)).addOption(new b(`--meeting <meetingId>`,`Record into an existing meeting instead of creating one`).argParser(De).conflicts(`title`)).option(`--bot-name <name>`,`Name the bot shows in the call`,w(80)).option(`--video`,`Save video as well as audio`)).action(async(e,t,n)=>{let{recordMeeting:r}=await import(`./meeting-C5vHfcTw.js`);await r(e,n.optsWithGlobals())}),M(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-C5vHfcTw.js`);await r(e,n.optsWithGlobals())}),M(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-C5vHfcTw.js`);await r(e,n.optsWithGlobals())}),M(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-C5vHfcTw.js`);await r(e,n.optsWithGlobals())}),M(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-C5vHfcTw.js`);await r(e,n.optsWithGlobals())}),M(L(I(t.command(`share`).description(`Show or manage sharing (visibility, user/team grants)`).argument(`<meetingId>`,`Meeting to share`).addOption(new b(`--visibility <visibility>`,`Change who can see the meeting (owner only)`).choices(l.options)))).addOption(new b(`--role <role>`,`Role for --add-user/--add-team`).choices(u.options).default(u.enum.viewer))).action(async(e,t,n)=>{let{shareMeeting:r}=await import(`./meeting-C5vHfcTw.js`);await r(e,n.optsWithGlobals())})}function Ke(e){let t=e.command(`notifications`).summary(`List, count, or mark notifications read`).helpGroup(H.build);M(P(t.command(`list`,{isDefault:!0}).description(`List notifications`).addOption(new b(`--tab <tab>`,`Filter by category`).choices(fe).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-DdadH0Wc.js`);await n(t.optsWithGlobals())}),M(t.command(`unread`).description(`Show the unread notification count`)).action(async(e,t)=>{let{showUnreadCount:n}=await import(`./notifications-DdadH0Wc.js`);await n(t.optsWithGlobals())}),M(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-DdadH0Wc.js`);await r(e,n.optsWithGlobals())}),M(t.command(`read-all`).description(`Mark every notification as read`)).action(async(e,t)=>{let{markAllNotificationsRead:n}=await import(`./notifications-DdadH0Wc.js`);await n(t.optsWithGlobals())})}const J=()=>new v(`<key>`,`Configuration key`).choices(o);function qe(t){let n=t.command(`profile`).summary(`Manage profiles`).helpGroup(H.setup).addHelpText(`after`,`
24
24
  Keys:
25
- apiUrl API server URL (default: discovered from hubUrl when hubUrl is set, otherwise ${n})
26
- hubUrl Hub server URL (default: ${t})
25
+ apiUrl API server URL (default: discovered from hubUrl when hubUrl is set, otherwise ${ce})
26
+ hubUrl Hub server URL (default: ${e})
27
27
 
28
28
  Examples:
29
29
  entrydesk profile create local --api-url http://localhost:3200 --hub-url http://localhost:3000 --login
30
30
  entrydesk profile set apiUrl http://localhost:3200
31
31
  entrydesk profile set apiUrl http://localhost:3200 --profile local
32
32
  entrydesk profile get apiUrl
33
- entrydesk profile unset apiUrl`);N(r.command(`list`,{isDefault:!0}).description(`List profiles`)).action(async(e,t)=>{let{listProfiles:n}=await import(`./profile-Cth2_rzi.js`);n(t.optsWithGlobals())}),N(r.command(`current`).description(`Show the active profile`)).action(async(e,t)=>{let{showCurrentProfile:n}=await import(`./profile-Cth2_rzi.js`);n(t.optsWithGlobals())}),N(r.command(`show`).description(`Show profile details`).argument(`[name]`,`Profile to show`)).action(async(e,t,n)=>{let{showProfile:r}=await import(`./profile-Cth2_rzi.js`);await r(e,n.optsWithGlobals())}),N(r.command(`create`).description(`Create a profile and switch to it`).argument(`[name]`,`Profile name (default: default)`).option(`--api-url <url>`,`API server URL to store in the profile`).option(`--hub-url <url>`,`Hub server URL to store in the profile`).option(`--no-use`,`Create without switching to the new profile`).option(`--login`,`Log in to the new profile after creating it (also with --no-use)`)).action(async(e,t,n)=>{let{createProfile:r}=await import(`./profile-Cth2_rzi.js`);await r(e,n.optsWithGlobals())}),N(r.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-Cth2_rzi.js`);r(e,n.optsWithGlobals())}),N(r.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-Cth2_rzi.js`);await r(e,n.optsWithGlobals())}),N(r.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-Cth2_rzi.js`);await i(e,t,r.optsWithGlobals())}),N(r.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-Cth2_rzi.js`);await i(e,t,r.optsWithGlobals())}),N(r.command(`get`).description(`Get a configuration value (current profile, or --profile)`).addArgument(G())).action(async(e,t,n)=>{let{getProfileValue:r}=await import(`./profile-Cth2_rzi.js`);r(e,n.optsWithGlobals())}),r.command(`set`).description(`Set a configuration value (current profile, or --profile)`).addArgument(G()).argument(`<value>`,`Value to store`).action(async(e,t,n,r)=>{let{setProfileValue:i}=await import(`./profile-Cth2_rzi.js`);i(e,t,r.optsWithGlobals())}),r.command(`unset`).description(`Remove a configuration value (current profile, or --profile)`).addArgument(G()).action(async(e,t,n)=>{let{unsetProfileValue:r}=await import(`./profile-Cth2_rzi.js`);r(e,n.optsWithGlobals())})}const K="User id (a UUID); `project members <project>` prints one beside each member",q="Team id (a UUID) or the exact team name, case included; `project members <project>` lists the teams in a project";function We(e,t){N(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 ${g} characters)`).option(`--instruction <text>`,`The standing brief every task in the project starts from (up to ${m} 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-EFbI_Qan.js`);await n(t.optsWithGlobals())}),N(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-EFbI_Qan.js`);await r(e,n.optsWithGlobals())}),N(e.command(`members`).description(`List the members of a project with their role and id, and the teams in it with their size`).argument(`<project>`,t)).action(async(e,t,n)=>{let{listProjectMembers:r}=await import(`./project-governance-EFbI_Qan.js`);await r(e,n.optsWithGlobals())}),N(e.command(`member-add`).description(`Add a workspace member to a project you own; it takes effect at once`).argument(`<project>`,t).argument(`<userId>`,K)).action(async(e,t,n,r)=>{let{addProjectMember:i}=await import(`./project-governance-EFbI_Qan.js`);await i(e,t,r.optsWithGlobals())}),N(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>`,K)).action(async(e,t,n,r)=>{let{removeProjectMember:i}=await import(`./project-governance-EFbI_Qan.js`);await i(e,t,r.optsWithGlobals())}),N(e.command(`team-add`).description(`Add a workspace team to a project you own. Everyone in the team, now and later, becomes a member; a hidden team can only be added by its own members`).argument(`<project>`,t).requiredOption(`--team <team>`,q,T(100))).action(async(e,t,n)=>{let{addProjectTeam:r}=await import(`./project-governance-EFbI_Qan.js`);await r(e,n.optsWithGlobals())}),N(e.command(`team-remove`).description(`Remove a team from a project you own. Its members lose access unless they are also direct members or in another team of the project`).argument(`<project>`,t).requiredOption(`--team <team>`,q,T(100))).action(async(e,t,n)=>{let{removeProjectTeam:r}=await import(`./project-governance-EFbI_Qan.js`);await r(e,n.optsWithGlobals())}),N(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>`,K).option(`--role <role>`,`New role: owner or member`)).action(async(e,t,n,r)=>{let{setProjectMemberRole:i}=await import(`./project-governance-EFbI_Qan.js`);await i(e,t,r.optsWithGlobals())})}const J="Project id, or a 1-based index into a plain `project list` (a `--filter`, `--sort-by`, `--order` or `--all` listing prints no index). Projects are numbered in creation order, so a project created later takes the next number and an index only shifts when a project is deleted; pass an id when the reference has to outlive that",Y=`Task id — ${ve}`;function Ge(e){N(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>`,J).option(`-q, --search <query>`,`Search within those tasks`).option(`--limit <number>`,`Max tasks to return`,S(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-Bk8-wOyn.js`);await r(e,n.optsWithGlobals())}),N(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>`,J).argument(`<taskId>`,Y).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-Bk8-wOyn.js`);await i(e,t,r.optsWithGlobals())}),N(e.command(`task-remove`).description(`Move a task you own out of a project. Any assets it produced stay in the project`).argument(`<project>`,J).argument(`<taskId>`,Y)).action(async(e,t,n,r)=>{let{removeTaskFromProject:i}=await import(`./project-tasks-Bk8-wOyn.js`);await i(e,t,r.optsWithGlobals())}),N(e.command(`task-share`).description(`Share a task you own inside its project: with one member by id, with one team in the project by id or name, or with every member by setting its visibility. One flag per call, never a prompt`).argument(`<project>`,J).argument(`<taskId>`,Y).option(`--add-user [userId]`,`Let one project member view the task`).option(`--remove-user [userId]`,`Take one member's access back`).option(`--add-team [team]`,`Let everyone in one team of the project view the task; a team id, or its exact name`,T(100)).option(`--remove-team [team]`,`Take one team's access back; a team id, or its exact name`,T(100)).option(`--visibility [level]`,"Who can see the task: `project` is every member, `self` is you plus anyone you named").addHelpText(`after`,`
33
+ entrydesk profile unset apiUrl`);M(n.command(`list`,{isDefault:!0}).description(`List profiles`)).action(async(e,t)=>{let{listProfiles:n}=await import(`./profile-hhU_G-Ea.js`);n(t.optsWithGlobals())}),M(n.command(`current`).description(`Show the active profile`)).action(async(e,t)=>{let{showCurrentProfile:n}=await import(`./profile-hhU_G-Ea.js`);n(t.optsWithGlobals())}),M(n.command(`show`).description(`Show profile details`).argument(`[name]`,`Profile to show`)).action(async(e,t,n)=>{let{showProfile:r}=await import(`./profile-hhU_G-Ea.js`);await r(e,n.optsWithGlobals())}),M(n.command(`create`).description(`Create a profile and switch to it`).argument(`[name]`,`Profile name (default: default)`).option(`--api-url <url>`,`API server URL to store in the profile`).option(`--hub-url <url>`,`Hub server URL to store in the profile`).option(`--no-use`,`Create without switching to the new profile`).option(`--login`,`Log in to the new profile after creating it (also with --no-use)`)).action(async(e,t,n)=>{let{createProfile:r}=await import(`./profile-hhU_G-Ea.js`);await r(e,n.optsWithGlobals())}),M(n.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-hhU_G-Ea.js`);r(e,n.optsWithGlobals())}),M(n.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-hhU_G-Ea.js`);await r(e,n.optsWithGlobals())}),M(n.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-hhU_G-Ea.js`);await i(e,t,r.optsWithGlobals())}),M(n.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-hhU_G-Ea.js`);await i(e,t,r.optsWithGlobals())}),M(n.command(`get`).description(`Get a configuration value (current profile, or --profile)`).addArgument(J())).action(async(e,t,n)=>{let{getProfileValue:r}=await import(`./profile-hhU_G-Ea.js`);r(e,n.optsWithGlobals())}),n.command(`set`).description(`Set a configuration value (current profile, or --profile)`).addArgument(J()).argument(`<value>`,`Value to store`).action(async(e,t,n,r)=>{let{setProfileValue:i}=await import(`./profile-hhU_G-Ea.js`);i(e,t,r.optsWithGlobals())}),n.command(`unset`).description(`Remove a configuration value (current profile, or --profile)`).addArgument(J()).action(async(e,t,n)=>{let{unsetProfileValue:r}=await import(`./profile-hhU_G-Ea.js`);r(e,n.optsWithGlobals())})}const Y="User id (a UUID); `project members <project>` prints one beside each member",X="Team id (a UUID) or the exact team name, case included; `project members <project>` lists the teams in a project";function Je(e,t){M(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 ${pe} characters)`).option(`--instruction <text>`,`The standing brief every task in the project starts from (up to ${s} 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-R__UPIhr.js`);await n(t.optsWithGlobals())}),M(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-R__UPIhr.js`);await r(e,n.optsWithGlobals())}),M(e.command(`members`).description(`List the members of a project with their role and id, and the teams in it with their size`).argument(`<project>`,t)).action(async(e,t,n)=>{let{listProjectMembers:r}=await import(`./project-governance-R__UPIhr.js`);await r(e,n.optsWithGlobals())}),M(e.command(`member-add`).description(`Add a workspace member to a project you own; it takes effect at once`).argument(`<project>`,t).argument(`<userId>`,Y)).action(async(e,t,n,r)=>{let{addProjectMember:i}=await import(`./project-governance-R__UPIhr.js`);await i(e,t,r.optsWithGlobals())}),M(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>`,Y)).action(async(e,t,n,r)=>{let{removeProjectMember:i}=await import(`./project-governance-R__UPIhr.js`);await i(e,t,r.optsWithGlobals())}),M(e.command(`team-add`).description(`Add a workspace team to a project you own. Everyone in the team, now and later, becomes a member; a hidden team can only be added by its own members`).argument(`<project>`,t).requiredOption(`--team <team>`,X,w(100))).action(async(e,t,n)=>{let{addProjectTeam:r}=await import(`./project-governance-R__UPIhr.js`);await r(e,n.optsWithGlobals())}),M(e.command(`team-remove`).description(`Remove a team from a project you own. Its members lose access unless they are also direct members or in another team of the project`).argument(`<project>`,t).requiredOption(`--team <team>`,X,w(100))).action(async(e,t,n)=>{let{removeProjectTeam:r}=await import(`./project-governance-R__UPIhr.js`);await r(e,n.optsWithGlobals())}),M(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>`,Y).option(`--role <role>`,`New role: owner or member`)).action(async(e,t,n,r)=>{let{setProjectMemberRole:i}=await import(`./project-governance-R__UPIhr.js`);await i(e,t,r.optsWithGlobals())})}const Z="Project id, or a 1-based index into a plain `project list` (a `--filter`, `--sort-by`, `--order` or `--all` listing prints no index). Projects are numbered in creation order, so a project created later takes the next number and an index only shifts when a project is deleted; pass an id when the reference has to outlive that",Q=`Task id — ${ye}`;function Ye(e){M(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>`,Z).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-B0STK_8Q.js`);await r(e,n.optsWithGlobals())}),M(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>`,Z).argument(`<taskId>`,Q).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-B0STK_8Q.js`);await i(e,t,r.optsWithGlobals())}),M(e.command(`task-remove`).description(`Move a task you own out of a project. Any assets it produced stay in the project`).argument(`<project>`,Z).argument(`<taskId>`,Q)).action(async(e,t,n,r)=>{let{removeTaskFromProject:i}=await import(`./project-tasks-B0STK_8Q.js`);await i(e,t,r.optsWithGlobals())}),M(e.command(`task-share`).description(`Share a task you own inside its project: with one member by id, with one team in the project by id or name, or with every member by setting its visibility. One flag per call, never a prompt`).argument(`<project>`,Z).argument(`<taskId>`,Q).option(`--add-user [userId]`,`Let one project member view the task`).option(`--remove-user [userId]`,`Take one member's access back`).option(`--add-team [team]`,`Let everyone in one team of the project view the task; a team id, or its exact name`,w(100)).option(`--remove-team [team]`,`Take one team's access back; a team id, or its exact name`,w(100)).option(`--visibility [level]`,"Who can see the task: `project` is every member, `self` is you plus anyone you named").addHelpText(`after`,`
34
34
  --add-user, --remove-user, --add-team, --remove-team and --visibility are
35
35
  mutually exclusive, and each needs its value; with none of them the command
36
36
  prints this usage and exits 1. A team has to be in the project already;
@@ -42,11 +42,11 @@ Examples:
42
42
  entrydesk project task-share 1 <taskId> --add-team "Design"
43
43
  entrydesk project task-share 1 <taskId> --remove-team <teamId>
44
44
  entrydesk project task-share 1 <taskId> --visibility project
45
- entrydesk project task-share 1 <taskId> --visibility self`)).action(async(e,t,n,r)=>{let{shareProjectTask:i}=await import(`./project-tasks-Bk8-wOyn.js`);await i(e,t,r.optsWithGlobals())})}const X="Which kind of source, as `project sources` lists it: file or link",Z="Id of the file or link, as `project sources` lists it";function Ke(e){let t=e.command(`project`).summary(`Read and edit a project you belong to`).description(`Read and edit a project you belong to.
45
+ entrydesk project task-share 1 <taskId> --visibility self`)).action(async(e,t,n,r)=>{let{shareProjectTask:i}=await import(`./project-tasks-B0STK_8Q.js`);await i(e,t,r.optsWithGlobals())})}const Xe="Which kind of source, as `project sources` lists it: file or link",Ze="Id of the file or link, as `project sources` lists it";function Qe(e){let n=e.command(`project`).summary(`Read and edit a project you belong to`).description(`Read and edit a project you belong to.
46
46
 
47
47
  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.
48
48
 
49
- These commands read and edit the project itself; none of them talks to the AI.`).helpGroup(z.chat).addHelpText(`after`,`
49
+ These commands read and edit the project itself; none of them talks to the AI.`).helpGroup(H.chat).addHelpText(`after`,`
50
50
  Examples:
51
51
  entrydesk project # List projects you belong to, oldest first
52
52
  entrydesk project list --filter mine
@@ -72,19 +72,19 @@ Examples:
72
72
  entrydesk project delete 1
73
73
  entrydesk project tasks 1
74
74
  entrydesk project task-add 1 <taskId>
75
- entrydesk project task-share 1 <taskId> --add-user <userId>`);N(F(t.command(`list`,{isDefault:!0}).description("List the projects you belong to, oldest created first. Positions are shown only on a plain listing, since that is what a `<project>` index resolves against: a new project lands at the end, so existing numbers move only when a project is deleted").addOption(new x(`--filter <scope>`,`Which projects to list`).choices(oe.options)).addOption(new x(`--sort-by <field>`,`Order by creation time, or by your latest task activity as the Hub does`).choices(ie.options).default(ye)).addOption(new x(`--order <direction>`,`Ascending or descending`).choices(ae).default(`asc`)),20)).action(async(e,t)=>{let{listProjects:n}=await import(`./project-CPKxduou.js`);await n(t.optsWithGlobals())}),N(t.command(`get`).description(`Show a project: members, counts, and its full instruction`).argument(`<project>`,J)).action(async(e,t,n)=>{let{showProject:r}=await import(`./project-CPKxduou.js`);await r(e,n.optsWithGlobals())}),N(t.command(`instruction`).description(`Print a project's instruction as plain text, ready to pipe`).argument(`<project>`,J)).action(async(e,t,n)=>{let{showProjectInstruction:r}=await import(`./project-CPKxduou.js`);await r(e,n.optsWithGlobals())}),N(t.command(`edit`).description(`Edit a project's name, description, or instruction`).argument(`<project>`,J).option(`--name <text>`,`New project name`,T(255)).option(`--description <text>`,`New project description`,w(g)).addOption(new x(`--instruction <text>`,`Replace the instruction with this text`).argParser(w(m)).conflicts([`instructionFile`,`clearInstruction`])).addOption(new x(`--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-CPKxduou.js`);await r(e,n.optsWithGlobals())}),N(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 that does not trigger an AI reply. It stays private unless you pass `--visibility project`. Reach for `entrydesk task --project <project>` instead when you want the AI to answer.").argument(`<project>`,J).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`,T(100)).addOption(new x(`--visibility <level>`,"Who can see the note: `self` (default) is only you, `project` shares it with every member and notifies them").choices(r.options))).action(async(e,t,n)=>{let{reportProjectNote:r}=await import(`./project-CPKxduou.js`);await r(e,n.optsWithGlobals())}),N(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>`,J)).action(async(e,t,n)=>{let{listProjectSources:r}=await import(`./project-sources-CFgB4loh.js`);await r(e,n.optsWithGlobals())}),N(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>`,J).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 ${f} characters)`).addHelpText(`after`,`
75
+ entrydesk project task-share 1 <taskId> --add-user <userId>`);M(P(n.command(`list`,{isDefault:!0}).description("List the projects you belong to, oldest created first. Positions are shown only on a plain listing, since that is what a `<project>` index resolves against: a new project lands at the end, so existing numbers move only when a project is deleted").addOption(new b(`--filter <scope>`,`Which projects to list`).choices(a.options)).addOption(new b(`--sort-by <field>`,`Order by creation time, or by your latest task activity as the Hub does`).choices(i.options).default(be)).addOption(new b(`--order <direction>`,`Ascending or descending`).choices(r).default(`asc`)),20)).action(async(e,t)=>{let{listProjects:n}=await import(`./project-xiz3Jopl.js`);await n(t.optsWithGlobals())}),M(n.command(`get`).description(`Show a project: members, counts, and its full instruction`).argument(`<project>`,Z)).action(async(e,t,n)=>{let{showProject:r}=await import(`./project-xiz3Jopl.js`);await r(e,n.optsWithGlobals())}),M(n.command(`instruction`).description(`Print a project's instruction as plain text, ready to pipe`).argument(`<project>`,Z)).action(async(e,t,n)=>{let{showProjectInstruction:r}=await import(`./project-xiz3Jopl.js`);await r(e,n.optsWithGlobals())}),M(n.command(`edit`).description(`Edit a project's name, description, or instruction`).argument(`<project>`,Z).option(`--name <text>`,`New project name`,w(255)).option(`--description <text>`,`New project description`,C(pe)).addOption(new b(`--instruction <text>`,`Replace the instruction with this text`).argParser(C(s)).conflicts([`instructionFile`,`clearInstruction`])).addOption(new b(`--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-xiz3Jopl.js`);await r(e,n.optsWithGlobals())}),M(n.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 that does not trigger an AI reply. It stays private unless you pass `--visibility project`. Reach for `entrydesk task --project <project>` instead when you want the AI to answer.").argument(`<project>`,Z).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)).addOption(new b(`--visibility <level>`,"Who can see the note: `self` (default) is only you, `project` shares it with every member and notifies them").choices(te.options))).action(async(e,t,n)=>{let{reportProjectNote:r}=await import(`./project-xiz3Jopl.js`);await r(e,n.optsWithGlobals())}),M(n.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>`,Z)).action(async(e,t,n)=>{let{listProjectSources:r}=await import(`./project-sources-C-MXx6j-.js`);await r(e,n.optsWithGlobals())}),M(n.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>`,Z).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 ${t} characters)`).addHelpText(`after`,`
76
76
  A link starts fetching its snapshot as soon as it is added; \`project sources\`
77
77
  shows it as pending until the snapshot is ready.
78
78
 
79
79
  Examples:
80
80
  entrydesk project sources-add 1 ./brief.pdf
81
- 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-DUx1voCZ.js`);await i(e,t,r.optsWithGlobals())}),N(t.command(`sources-replace`).description(`Replace a file source's content with a local file, keeping its id, title and description. Refused when someone replaced it after the version you read, so no edit is silently overwritten`).argument(`<project>`,J).argument(`<id>`,"Id of the file, as `project sources` lists it").argument(`<path>`,`Path of the local file holding the new content`).requiredOption(`--expected-version <n>`,"The version your edit is based on, as `project sources` lists it").addHelpText(`after`,`
81
+ 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-ygvHaDUu.js`);await i(e,t,r.optsWithGlobals())}),M(n.command(`sources-replace`).description(`Replace a file source's content with a local file, keeping its id, title and description. Refused when someone replaced it after the version you read, so no edit is silently overwritten`).argument(`<project>`,Z).argument(`<id>`,"Id of the file, as `project sources` lists it").argument(`<path>`,`Path of the local file holding the new content`).requiredOption(`--expected-version <n>`,"The version your edit is based on, as `project sources` lists it").addHelpText(`after`,`
82
82
  If the file was replaced after the version you read, nothing changes and the
83
83
  command reports the current version, who wrote it and where to read it: merge
84
84
  your change into that content and replace again with that version.
85
85
 
86
86
  Examples:
87
- entrydesk project sources-replace 1 <fileId> ./brief.md --expected-version 3`)).action(async(e,t,n,r,i)=>{let{replaceProjectSource:a}=await import(`./project-sources-write-DUx1voCZ.js`);await a(e,t,n,i.optsWithGlobals())}),N(t.command(`sources-edit`).description(`Edit a source's title or description — how the AI names it and what it is for, so it knows when to reach for it`).argument(`<project>`,J).argument(`<file|link>`,X).argument(`<id>`,Z).option(`--title <text>`,`The new title (up to 200 characters); an empty string falls back to the file name or URL`).option(`--description <text>`,`The new description (up to ${f} characters); an empty string clears it`)).action(async(e,t,n,r,i)=>{let{editProjectSource:a}=await import(`./project-sources-write-DUx1voCZ.js`);await a(e,t,n,i.optsWithGlobals())}),N(t.command(`sources-refetch`).description(`Fetch a link's snapshot again; it shows as pending until the new snapshot is ready`).argument(`<project>`,J).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-DUx1voCZ.js`);await i(e,t,r.optsWithGlobals())}),N(t.command(`sources-rm`).description(`Remove a file or link from a project. Assets are removed in the Hub`).argument(`<project>`,J).argument(`<file|link>`,X).argument(`<id>`,Z)).action(async(e,t,n,r,i)=>{let{removeProjectSource:a}=await import(`./project-sources-write-DUx1voCZ.js`);await a(e,t,n,i.optsWithGlobals())}),N(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>`,J).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-D8YawkvR.js`);await i(e,t,r.optsWithGlobals())}),N(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>`,J).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 one capped page at a time either way`).option(`--offset <number>`,`Continue a truncated read from the offset the previous one reported (on stderr, or as nextOffset under --json); implies --full for a task`).option(`--revision <id>`,`The revision the previous page reported alongside its offset; a file or link whose stored text was replaced since then fails instead of continuing at the old offset`).addHelpText(`after`,`
87
+ entrydesk project sources-replace 1 <fileId> ./brief.md --expected-version 3`)).action(async(e,t,n,r,i)=>{let{replaceProjectSource:a}=await import(`./project-sources-write-ygvHaDUu.js`);await a(e,t,n,i.optsWithGlobals())}),M(n.command(`sources-edit`).description(`Edit a source's title or description — how the AI names it and what it is for, so it knows when to reach for it`).argument(`<project>`,Z).argument(`<file|link>`,Xe).argument(`<id>`,Ze).option(`--title <text>`,`The new title (up to 200 characters); an empty string falls back to the file name or URL`).option(`--description <text>`,`The new description (up to ${t} characters); an empty string clears it`)).action(async(e,t,n,r,i)=>{let{editProjectSource:a}=await import(`./project-sources-write-ygvHaDUu.js`);await a(e,t,n,i.optsWithGlobals())}),M(n.command(`sources-refetch`).description(`Fetch a link's snapshot again; it shows as pending until the new snapshot is ready`).argument(`<project>`,Z).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-ygvHaDUu.js`);await i(e,t,r.optsWithGlobals())}),M(n.command(`sources-rm`).description(`Remove a file or link from a project. Assets are removed in the Hub`).argument(`<project>`,Z).argument(`<file|link>`,Xe).argument(`<id>`,Ze)).action(async(e,t,n,r,i)=>{let{removeProjectSource:a}=await import(`./project-sources-write-ygvHaDUu.js`);await a(e,t,n,i.optsWithGlobals())}),M(n.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>`,Z).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-DeYepfN2.js`);await i(e,t,r.optsWithGlobals())}),M(n.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>`,Z).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 one capped page at a time either way`).option(`--offset <number>`,`Continue a truncated read from the offset the previous one reported (on stderr, or as nextOffset under --json); implies --full for a task`).option(`--revision <id>`,`The revision the previous page reported alongside its offset; a file or link whose stored text was replaced since then fails instead of continuing at the old offset`).addHelpText(`after`,`
88
88
  A long source comes back one capped page at a time: repeat the read with the
89
89
  offset it reported until the output is no longer truncated. For a task the
90
90
  offset counts newest messages to skip; for a file or a link snapshot it is a
@@ -99,7 +99,12 @@ explanation where the content should be.
99
99
  Examples:
100
100
  entrydesk project context-read 1 file <fileId> > brief.md
101
101
  entrydesk project context-read 1 file <fileId> --offset 50000 --revision <rev> >> brief.md
102
- entrydesk project context-read 1 task <taskId> --full`)).action(async(e,t,n,r,i)=>{let{readProjectContext:a}=await import(`./project-context-D8YawkvR.js`);await a(e,t,n,i.optsWithGlobals())}),We(t,J),Ge(t)}function qe(e){let t=e.command(`recordings`).summary(`List, import, retry, and manage recordings`).helpGroup(z.build).addHelpText(`after`,"\nNote: full transcripts live in `entrydesk meeting transcript <recordingId>`.");N(P(t.command(`list`,{isDefault:!0}).description(`List recordings`).option(`--search <query>`,`Filter by title/transcript`,w(200)),20)).action(async(e,t)=>{let{listRecordings:n}=await import(`./recordings-DtgXMjp2.js`);await n(t.optsWithGlobals())}),N(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-DtgXMjp2.js`);await r(e,n.optsWithGlobals())}),N(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-DtgXMjp2.js`);await r(e,n.optsWithGlobals())}),N(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-DtgXMjp2.js`);await r(e,n.optsWithGlobals())}),N(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-DtgXMjp2.js`);await r(e,n.optsWithGlobals())}),N(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-DtgXMjp2.js`);await r(e,n.optsWithGlobals())}),N(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-DtgXMjp2.js`);await r(e,n.optsWithGlobals())})}const Je=[...new Set(l.map(e=>e.toolApprovalMode))],Ye=[...new Set(l.map(e=>e.approvalHandling))];function Q(e){return e.addOption(new x(`--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(Je)).addOption(new x(`--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(Ye)).option(`--allowed-tools <tools...>`,`Pre-authorize these tools for this schedule (comma or space separated)`,A).option(`--disallowed-tools <tools...>`,`Block these tools for this schedule. Wins over --allowed-tools`,A)}function Xe(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`,O).addOption(new x(`--repeat-type <type>`,`Repeat unit`).choices(ge)).option(`--every <n>`,`Repeat every N units`,S(1,1e3)).option(`--time <HH:MM>`,`Time of day (days, weeks, months)`,j).option(`--times <HH:MM,...>`,`Multiple daily trigger times (days only)`,Oe).option(`--days-of-week <0-6>`,`Comma-separated days, 0=Sunday`,k(0,6)).option(`--days-of-month <1-31>`,`Comma-separated days of the month`,k(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)`,ke)}function Ze(e){let t=e.command(`schedules`).summary(`Create and manage scheduled tasks`).helpGroup(z.build);N(t.command(`list`,{isDefault:!0}).description(`List schedules`)).action(async(e,t)=>{let{listSchedules:n}=await import(`./schedules-6T2-994t.js`);await n(t.optsWithGlobals())}),N(t.command(`get`).description(`Show schedule details`).argument(`<scheduleId>`,`Schedule to show`)).action(async(e,t,n)=>{let{showSchedule:r}=await import(`./schedules-6T2-994t.js`);await r(e,n.optsWithGlobals())}),N(Q(Xe(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-6T2-994t.js`);await n(t.optsWithGlobals())}),N(Q(Xe(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`,S(1,2**53-1)).option(`--starts-at <datetime>`,`Start time, ISO 8601`)))).action(async(e,t,n)=>{let{editSchedule:r}=await import(`./schedules-6T2-994t.js`);await r(e,n.optsWithGlobals())}),N(t.command(`activate`).description(`Resume a paused schedule`).argument(`<scheduleId>`,`Schedule to activate`)).action(async(e,t,n)=>{let{setScheduleActive:r}=await import(`./schedules-6T2-994t.js`);await r(e,!0,n.optsWithGlobals())}),N(t.command(`pause`).description(`Pause an active schedule`).argument(`<scheduleId>`,`Schedule to pause`)).action(async(e,t,n)=>{let{setScheduleActive:r}=await import(`./schedules-6T2-994t.js`);await r(e,!1,n.optsWithGlobals())}),N(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-6T2-994t.js`);await r(e,n.optsWithGlobals())}),N(F(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-6T2-994t.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-6T2-994t.js`);await t(e)}),N(t.command(`calendars`).description(`List connected calendar accounts`)).action(async(e,t)=>{let{listCalendarAccounts:n}=await import(`./schedules-6T2-994t.js`);await n(t.optsWithGlobals())})}function Qe(e){N(e.command(`login`).summary(`Log in to EntryDesk`).helpGroup(z.setup)).action(async(e,t)=>{let{runLogin:n}=await import(`./login-CVUzJp76.js`);await n(t.optsWithGlobals())})}function $e(e){e.command(`logout`).summary(`Log out and clear credentials`).helpGroup(z.setup).action(async()=>{let{runLogout:e}=await import(`./logout-B6Bb4w2Y.js`);await e()})}function et(e){N(e.command(`status`).summary(`Show who you are logged in as`).helpGroup(z.setup)).action(async(e,t)=>{let{runStatus:n}=await import(`./status-BBvz4l0p.js`);await n(t.optsWithGlobals())})}function tt(e){N(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(z.workspace)).action(async(e,t)=>{let{runModels:n}=await import(`./models-pzt8nNX7.js`);await n(t.optsWithGlobals())})}function nt(e){e.command(`version`).summary(`Show the version number`).helpGroup(z.setup).action(()=>console.log(e.version()))}function rt(e){N(e.command(`update`).summary(`Update the CLI to the latest version`).helpGroup(z.setup).option(`--check`,`Only check for a newer version, don't install`)).action(async(e,t)=>{let{runUpdate:n}=await import(`./update-CSh9DfHK.js`);await n(t.optsWithGlobals())})}function it(e){e.command(`mcp-server`).summary(`Start the MCP server (stdio or HTTP)`).helpGroup(z.setup).option(`--http`,`Serve over HTTP instead of stdio`).option(`-p, --port <number>`,`Port to listen on`,S(1,65535)).action(async e=>{let{startMcpServer:t}=await import(`./mcp-BnFLUTG-.js`);await t({mode:e.http?`http`:`stdio`,port:e.port})})}function $(e){return e.option(`-g, --global`,`Act at user (global) scope instead of the project`)}function at(e){return e.option(`-a, --agent <agentId>`,`Restrict install to specific agents (repeatable; '*' for all)`,we)}function ot(e){let t=e.command(`skills`).summary(`List, upload, version, toggle, and share skills`).helpGroup(z.build);N($(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-C56S2Z62.js`);await n(t.optsWithGlobals())}),N(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-C56S2Z62.js`);await r(e,n.optsWithGlobals())}),N(t.command(`toggle`).description(`Enable or disable a skill for yourself`).argument(`<skillId>`,`Skill to toggle`).addOption(new x(`--enable`,`Turn the skill on`).conflicts(`disable`)).option(`--disable`,`Turn the skill off`)).action(async(e,t,n)=>{let{toggleSkill:r}=await import(`./skills-C56S2Z62.js`);await r(e,n.optsWithGlobals())}),N(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-C56S2Z62.js`);await r(e,n.optsWithGlobals())}),N(L(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-C56S2Z62.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-C56S2Z62.js`);await t(e)}),N(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-C56S2Z62.js`);await r(e,n.optsWithGlobals())}),N(at($(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-C56S2Z62.js`);await r(e,n.optsWithGlobals())}),N(at($(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-C56S2Z62.js`);await r(e,n.optsWithGlobals())}),N($(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-C56S2Z62.js`);await r(e,n.optsWithGlobals())}),N($(t.command(`status`).description(`Show local vs workspace drift`))).action(async(e,t)=>{let{showSkillsStatus:n}=await import(`./skills-C56S2Z62.js`);await n(t.optsWithGlobals())}),N($(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-C56S2Z62.js`);await r(e,n.optsWithGlobals())}),N($(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-C56S2Z62.js`);await r(e,n.optsWithGlobals())}),N($(t.command(`unlink`).description(`Remove the workspace binding`))).action(async(e,t)=>{let{runSkillsUnlink:n}=await import(`./commands-ghS7KAQr.js`);n(t.optsWithGlobals())})}function st(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(z.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`,S(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)`,O).option(`--plain`,`Plain text output`).addOption(new x(`--output <mode>`,`Stream events as JSON`).choices(v)).option(`--full-output`,`Show full tool outputs`).option(`--file-system`,`Enable local file operations`).option(`--no-file-system`,`Disable local file operations`).addOption(new x(`--tool-approval-mode <mode>`,`Defaults to the mode /approval saved. Non-interactive runs deny every approval they are asked for`).choices(fe.options)).option(`--allowed-tools <tools...>`,`Pre-authorize these tools, so they run without asking (comma or space separated)`,A).option(`--disallowed-tools <tools...>`,`Refuse these tools. Wins over --allowed-tools and --tool-approval-mode`,A).option(`--dangerously-auto-approve-tools`,`Deprecated alias for --tool-approval-mode always_allow`).addHelpText(`after`,`
102
+ entrydesk project context-read 1 task <taskId> --full`)).action(async(e,t,n,r,i)=>{let{readProjectContext:a}=await import(`./project-context-DeYepfN2.js`);await a(e,t,n,i.optsWithGlobals())}),Je(n,Z),Ye(n)}function $e(e){let t=e.command(`recordings`).summary(`List, import, retry, and manage recordings`).helpGroup(H.build).addHelpText(`after`,"\nNote: full transcripts live in `entrydesk meeting transcript <recordingId>`.");M(N(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-68Oe1Kvd.js`);await n(t.optsWithGlobals())}),M(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-68Oe1Kvd.js`);await r(e,n.optsWithGlobals())}),M(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-68Oe1Kvd.js`);await r(e,n.optsWithGlobals())}),M(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-68Oe1Kvd.js`);await r(e,n.optsWithGlobals())}),M(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-68Oe1Kvd.js`);await r(e,n.optsWithGlobals())}),M(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-68Oe1Kvd.js`);await r(e,n.optsWithGlobals())}),M(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-68Oe1Kvd.js`);await r(e,n.optsWithGlobals())})}const et=[...new Set(m.map(e=>e.toolApprovalMode))],tt=[...new Set(m.map(e=>e.approvalHandling))];function nt(e){return e.addOption(new b(`--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(et)).addOption(new b(`--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(tt)).option(`--allowed-tools <tools...>`,`Pre-authorize these tools for this schedule (comma or space separated)`,k).option(`--disallowed-tools <tools...>`,`Block these tools for this schedule. Wins over --allowed-tools`,k)}function rt(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`,D).addOption(new b(`--repeat-type <type>`,`Repeat unit`).choices(_e)).option(`--every <n>`,`Repeat every N units`,x(1,1e3)).option(`--time <HH:MM>`,`Time of day (days, weeks, months)`,A).option(`--times <HH:MM,...>`,`Multiple daily trigger times (days only)`,Me).option(`--days-of-week <0-6>`,`Comma-separated days, 0=Sunday`,O(0,6)).option(`--days-of-month <1-31>`,`Comma-separated days of the month`,O(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)`,Ne)}function it(e){let t=e.command(`schedules`).summary(`Create and manage scheduled tasks`).helpGroup(H.build);M(t.command(`list`,{isDefault:!0}).description(`List schedules`)).action(async(e,t)=>{let{listSchedules:n}=await import(`./schedules-wopieg4D.js`);await n(t.optsWithGlobals())}),M(t.command(`get`).description(`Show schedule details`).argument(`<scheduleId>`,`Schedule to show`)).action(async(e,t,n)=>{let{showSchedule:r}=await import(`./schedules-wopieg4D.js`);await r(e,n.optsWithGlobals())}),M(nt(rt(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-wopieg4D.js`);await n(t.optsWithGlobals())}),M(nt(rt(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-wopieg4D.js`);await r(e,n.optsWithGlobals())}),M(t.command(`activate`).description(`Resume a paused schedule`).argument(`<scheduleId>`,`Schedule to activate`)).action(async(e,t,n)=>{let{setScheduleActive:r}=await import(`./schedules-wopieg4D.js`);await r(e,!0,n.optsWithGlobals())}),M(t.command(`pause`).description(`Pause an active schedule`).argument(`<scheduleId>`,`Schedule to pause`)).action(async(e,t,n)=>{let{setScheduleActive:r}=await import(`./schedules-wopieg4D.js`);await r(e,!1,n.optsWithGlobals())}),M(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-wopieg4D.js`);await r(e,n.optsWithGlobals())}),M(P(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-wopieg4D.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-wopieg4D.js`);await t(e)}),M(t.command(`calendars`).description(`List connected calendar accounts`)).action(async(e,t)=>{let{listCalendarAccounts:n}=await import(`./schedules-wopieg4D.js`);await n(t.optsWithGlobals())})}function at(e){M(e.command(`login`).summary(`Log in to EntryDesk`).helpGroup(H.setup)).action(async(e,t)=>{let{runLogin:n}=await import(`./login-CO1aBG6c.js`);await n(t.optsWithGlobals())})}function ot(e){e.command(`logout`).summary(`Log out and clear credentials`).helpGroup(H.setup).action(async()=>{let{runLogout:e}=await import(`./logout-WKIZVWJ7.js`);await e()})}function st(e){M(e.command(`status`).summary(`Show who you are logged in as`).helpGroup(H.setup)).action(async(e,t)=>{let{runStatus:n}=await import(`./status-DX6A6ugk.js`);await n(t.optsWithGlobals())})}function ct(e){M(e.command(`token`).summary(`Print a fresh access token for scripts`).description(`Print a valid access token to stdout and nothing else, refreshing the stored session first when it is about to expire. With --json, print { token, expiresAt, workspaceId }; expiresAt is omitted when the token carries no expiry, such as a PAT. ENTRYDESK_TOKEN is printed as-is when set.`).helpGroup(H.setup).addHelpText(`after`,`
103
+ Note: the printed token is a bearer credential for your account — never log
104
+ it or paste it into shared output. Consume it directly, against a
105
+ workspace-scoped endpoint (a personal access token is rejected elsewhere):
106
+ curl -H "Authorization: Bearer $(entrydesk token)" \\
107
+ "https://api.entrydesk.com/v1/workspaces/$(entrydesk token --json | jq -r .workspaceId)/agents"`)).action(async(e,t)=>{let{printAccessToken:n}=await import(`./token-DrAF7BWj.js`);await n(t.optsWithGlobals())})}function lt(e){M(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(H.workspace)).action(async(e,t)=>{let{runModels:n}=await import(`./models-BENTHton.js`);await n(t.optsWithGlobals())})}function ut(e){e.command(`version`).summary(`Show the version number`).helpGroup(H.setup).action(()=>console.log(e.version()))}function dt(e){M(e.command(`update`).summary(`Update the CLI to the latest version`).helpGroup(H.setup).option(`--check`,`Only check for a newer version, don't install`)).action(async(e,t)=>{let{runUpdate:n}=await import(`./update-DfOBWme1.js`);await n(t.optsWithGlobals())})}function ft(e){e.command(`mcp-server`).summary(`Start the MCP server (stdio or HTTP)`).helpGroup(H.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-CqMrd5AI.js`);await t({mode:e.http?`http`:`stdio`,port:e.port})})}function $(e){return e.option(`-g, --global`,`Act at user (global) scope instead of the project`)}function pt(e){return e.option(`-a, --agent <agentId>`,`Restrict install to specific agents (repeatable; '*' for all)`,Oe)}function mt(e){let t=e.command(`skills`).summary(`List, upload, version, toggle, and share skills`).helpGroup(H.build);M($(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-Drr0gw-l.js`);await n(t.optsWithGlobals())}),M(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-Drr0gw-l.js`);await r(e,n.optsWithGlobals())}),M(t.command(`toggle`).description(`Enable or disable a skill for yourself`).argument(`<skillId>`,`Skill to toggle`).addOption(new b(`--enable`,`Turn the skill on`).conflicts(`disable`)).option(`--disable`,`Turn the skill off`)).action(async(e,t,n)=>{let{toggleSkill:r}=await import(`./skills-Drr0gw-l.js`);await r(e,n.optsWithGlobals())}),M(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-Drr0gw-l.js`);await r(e,n.optsWithGlobals())}),M(B(R(L(t.command(`share`).description(`Show or manage sharing (workspace, team and user grants)`).argument(`<skillId>`,`Skill to share`))))).action(async(e,t,n)=>{let{shareSkill:r}=await import(`./skills-Drr0gw-l.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-Drr0gw-l.js`);await t(e)}),M(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-Drr0gw-l.js`);await r(e,n.optsWithGlobals())}),M(pt($(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-Drr0gw-l.js`);await r(e,n.optsWithGlobals())}),M(pt($(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-Drr0gw-l.js`);await r(e,n.optsWithGlobals())}),M($(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-Drr0gw-l.js`);await r(e,n.optsWithGlobals())}),M($(t.command(`status`).description(`Show local vs workspace drift`))).action(async(e,t)=>{let{showSkillsStatus:n}=await import(`./skills-Drr0gw-l.js`);await n(t.optsWithGlobals())}),M($(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-Drr0gw-l.js`);await r(e,n.optsWithGlobals())}),M($(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-Drr0gw-l.js`);await r(e,n.optsWithGlobals())}),M($(t.command(`unlink`).description(`Remove the workspace binding`))).action(async(e,t)=>{let{runSkillsUnlink:n}=await import(`./commands-DU48SG8W.js`);n(t.optsWithGlobals())})}function ht(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(H.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)`,D).option(`--plain`,`Plain text output`).addOption(new b(`--output <mode>`,`Stream events as JSON`).choices(_)).option(`--full-output`,`Show full tool outputs`).option(`--file-system`,`Enable local file operations`).option(`--no-file-system`,`Disable local file operations`).addOption(new b(`--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)`,k).option(`--disallowed-tools <tools...>`,`Refuse these tools. Wins over --allowed-tools and --tool-approval-mode`,k).option(`--dangerously-auto-approve-tools`,`Deprecated alias for --tool-approval-mode always_allow`).addHelpText(`after`,`
103
108
  Working inside a project:
104
109
  --project files the new task in that project, so the turn starts from the
105
110
  project instruction and its members can be given access. The AI answers as
@@ -132,7 +137,7 @@ Examples:
132
137
  List available models: entrydesk models
133
138
  List available agents: entrydesk agents
134
139
  List recent tasks: entrydesk tasks
135
- 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-Hcgf0oDf.js`);await i({...e,interactive:e.interactive??!r})})}function ct(e){N(e.command(`tasks`).summary(`List, search, or view tasks`).helpGroup(z.chat).argument(`[taskId]`,`Task id, or a 1-based index into recent tasks`).addOption(new x(`-q, --search <query>`,`Filter tasks by a search query`).conflicts(`share`)).option(`--limit <number>`,`Max tasks to return`,S(1,50)).option(`--next-key <cursor>`,`Fetch the next page using this cursor`).addOption(new x(`-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 x(`--output <mode>`,`Stream messages as JSON events`).choices(v)).option(`--full-output`,`Show full tool outputs when viewing a task`).addHelpText(`after`,`
140
+ 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-bZNZ_yxV.js`);await i({...e,interactive:e.interactive??!r})})}function gt(e){M(e.command(`tasks`).summary(`List, search, or view tasks`).helpGroup(H.chat).argument(`[taskId]`,`Task id, or a 1-based index into recent tasks`).addOption(new b(`-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 b(`-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 b(`--output <mode>`,`Stream messages as JSON events`).choices(_)).option(`--full-output`,`Show full tool outputs when viewing a task`).addHelpText(`after`,`
136
141
  Examples:
137
142
  entrydesk tasks # List recent tasks
138
143
  entrydesk tasks -q "deploy" --limit 20 # Search tasks
@@ -140,20 +145,20 @@ Examples:
140
145
  entrydesk tasks <taskId> --full-output # …with full tool outputs
141
146
  entrydesk tasks -s <shareId> # View a shared task
142
147
  entrydesk tasks --project 2 # Tasks you can see in project 2
143
- entrydesk tasks --project 2 -q "deploy" # …searched within it`)).action(async(e,t,n)=>{let{runTasks:r}=await import(`./tasks-CLlI3fiV.js`);await r(e,n.optsWithGlobals())})}function lt(e){let t=e.command(`tool`).summary(`Discover, inspect, and call tools`).helpGroup(z.chat).addHelpText(`after`,`
148
+ entrydesk tasks --project 2 -q "deploy" # …searched within it`)).action(async(e,t,n)=>{let{runTasks:r}=await import(`./tasks-lK8PTMnE.js`);await r(e,n.optsWithGlobals())})}function _t(e){M(e.command(`teams`).summary(`List teams in the workspace`).helpGroup(H.workspace).command(`list`,{isDefault:!0}).description("List the teams you can see in the current workspace, with the ids `share --add-team` takes").option(`--search <text>`,`Only teams whose name matches`)).action(async(e,t)=>{let{listTeams:n}=await import(`./teams-ByeuT2Ks.js`);await n(t.optsWithGlobals())})}function vt(e){let t=e.command(`tool`).summary(`Discover, inspect, and call tools`).helpGroup(H.chat).addHelpText(`after`,`
144
149
  Find a tool: entrydesk tool search "send a group chat message"
145
150
  Inspect it: entrydesk tool get <name> --json
146
151
  Run it: entrydesk tool call <name> --input-file input.json --json
147
152
 
148
153
  The direct tool list is not a complete connector catalog. Search or get can
149
- discover connector tools that are absent from list.`);N(t.command(`list`,{isDefault:!0}).description(`List directly exposed tools; use search to discover connector tools`).option(`-p, --prefix <name>`,`Filter the direct list by tool namespace prefix`)).action(async(e,t)=>{let{listTools:n}=await import(`./tool-CASBzR_z.js`);await n(t.optsWithGlobals())}),N(t.command(`search`).description(`Find tools by an English query, including unlisted connector tools`).argument(`<query>`,`English description, e.g. "send a group chat message"`).option(`--namespace <names...>`,`Search exact connector namespaces from previous results`).addHelpText(`after`,`
154
+ discover connector tools that are absent from list.`);M(t.command(`list`,{isDefault:!0}).description(`List directly exposed tools; use search to discover connector tools`).option(`-p, --prefix <name>`,`Filter the direct list by tool namespace prefix`)).action(async(e,t)=>{let{listTools:n}=await import(`./tool-82NKBr29.js`);await n(t.optsWithGlobals())}),M(t.command(`search`).description(`Find tools by an English query, including unlisted connector tools`).argument(`<query>`,`English description, e.g. "send a group chat message"`).option(`--namespace <names...>`,`Search exact connector namespaces from previous results`).addHelpText(`after`,`
150
155
  Examples:
151
156
  entrydesk tool search "send a group chat message" --json
152
157
  entrydesk tool search "read a spreadsheet" --namespace google_drive --json
153
158
 
154
159
  JSON output includes matched tools, schemas, connection status, and provider
155
160
  errors. A partial search prints its results and exits with status 1. Use get
156
- for a complete schema, then call with --input-file or stdin.`)).action(async(e,t,n)=>{let{searchTools:r}=await import(`./tool-CASBzR_z.js`);await r(e,n.optsWithGlobals())}),N(t.command(`get`).description(`Get a tool schema by exact name, including unlisted connector tools`).argument(`<name>`,`Tool name`)).action(async(e,t,n)=>{let{getTool:r}=await import(`./tool-CASBzR_z.js`);await r(e,n.optsWithGlobals())}),N(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`,`
161
+ for a complete schema, then call with --input-file or stdin.`)).action(async(e,t,n)=>{let{searchTools:r}=await import(`./tool-82NKBr29.js`);await r(e,n.optsWithGlobals())}),M(t.command(`get`).description(`Get a tool schema by exact name, including unlisted connector tools`).argument(`<name>`,`Tool name`)).action(async(e,t,n)=>{let{getTool:r}=await import(`./tool-82NKBr29.js`);await r(e,n.optsWithGlobals())}),M(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`,`
157
162
  Input priority:
158
163
  1. --input (direct JSON string)
159
164
  2. --input-file (read from file)
@@ -166,9 +171,9 @@ appear in tool list before it can be called.
166
171
  Examples:
167
172
  entrydesk tool call agent__search_agents --input '{"limit": 5}'
168
173
  entrydesk tool call agent__search_agents --input-file input.json
169
- echo '{"limit": 5}' | entrydesk tool call agent__search_agents`)).action(async(e,t,n)=>{let{runToolCall:r}=await import(`./tool-CASBzR_z.js`);await r(e,n.optsWithGlobals())})}function ut(e){let t=e.command(`usage`).summary(`Show balance, spend rankings, per-user breakdown, or CSV export`).helpGroup(z.workspace);N(t.command(`summary`,{isDefault:!0}).description(`Per-user monthly cost/operations summary`).option(`--limit <number>`,`Limit rows (default: all)`,S(1,100)).addOption(new x(`--sort-by <field>`,`Sort the summary`).choices(he).default(`cost`))).action(async(e,t)=>{let{showUsageSummary:n}=await import(`./usage-BLPq7c6l.js`);await n(t.optsWithGlobals())}),N(t.command(`balance`).description(`Workspace USD balance, spend, and limits`)).action(async(e,t)=>{let{showUsageBalance:n}=await import(`./usage-BLPq7c6l.js`);await n(t.optsWithGlobals())}),N(t.command(`me`).description(`Your own usage and availability`)).action(async(e,t)=>{let{showOwnUsage:n}=await import(`./usage-BLPq7c6l.js`);await n(t.optsWithGlobals())}),N(t.command(`consumptions`).description(`Per-user extra-usage breakdown`).option(`--limit <number>`,`Max rows (default: 20)`,S(1,100)).option(`--offset <number>`,`Pagination offset`,Ce).option(`--period-start <iso>`,`Period start`)).action(async(e,t)=>{let{listUsageConsumptions:n}=await import(`./usage-BLPq7c6l.js`);await n(t.optsWithGlobals())}),N(t.command(`rank`).description(`Rank workspace spend by user, agent, schedule, or model`).addOption(new x(`--by <field>`,`Dimension to rank by`).choices(be).default(`user`)).option(`--days <number>`,`Rolling window in days (default: all time)`,S(1,365)).option(`--model <substring>`,`Only count calls whose model matches this substring`).option(`--limit <number>`,`Max rows (default: 30)`,S(1,100))).action(async(e,t)=>{let{rankUsage:n}=await import(`./usage-audit-BYvZgTJp.js`);await n(t.optsWithGlobals())}),N(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)`,S(1,60),30).option(`--min-cost <number>`,`Only list buckets above this spend (default: 0)`,C(0))).action(async(e,t,n)=>{let{drillUsage:r}=await import(`./usage-audit-BYvZgTJp.js`);await r(e,n.optsWithGlobals())}),N(t.command(`waste`).description(`Find schedules that keep spending while nobody reads the output`).option(`--days <number>`,`Lookback in days (default: 30)`,S(7,60),30).option(`--min-cost <number>`,`Only flag schedules above this spend`,C(0)).option(`--limit <number>`,`Max rows`,S(1,50))).action(async(e,t)=>{let{findUsageWaste:n}=await import(`./usage-audit-BYvZgTJp.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-BLPq7c6l.js`);await t(e)})}const dt=`Comma-separated event types to receive (${p.join(`, `)}); see \`entrydesk webhook event-types\``;function ft(e){let t=e.command(`webhook`).summary(`Manage outgoing webhook destinations and deliveries`).helpGroup(z.workspace);N(t.command(`list`,{isDefault:!0}).description(`List destinations with status, subscriptions and the last 7 days of error rate`)).action(async(e,t)=>{let{listWebhooks:n}=await import(`./webhook-BxPA95wd.js`);await n(t.optsWithGlobals())}),N(t.command(`get`).description(`Show a destination and its last 7 days of metrics`).argument(`<id>`,"Destination id from `entrydesk webhook list`")).action(async(e,t,n)=>{let{showWebhook:r}=await import(`./webhook-BxPA95wd.js`);await r(e,n.optsWithGlobals())}),N(t.command(`create`).description(`Create a destination. The signing secret is printed only this once`).requiredOption(`--url <url>`,`HTTPS endpoint that receives the POSTs`).requiredOption(`--name <name>`,`Destination name`).option(`--description <text>`,`Description`).addOption(new x(`--events <types>`,dt).argParser(R).conflicts(`allEvents`)).option(`--all-events`,`Receive every event type, including ones added later`).addOption(new x(`--api-version <version>`,`Payload version to lock (default: latest)`).choices(h))).action(async(e,t)=>{let{createWebhook:n}=await import(`./webhook-BxPA95wd.js`);await n({...t.optsWithGlobals(),...e})}),N(t.command(`update`).description(`Update only the fields you pass`).argument(`<id>`,`Destination id`).option(`--url <url>`,`HTTPS endpoint`).option(`--name <name>`,`Destination name`).option(`--description <text>`,`Description`).addOption(new x(`--events <types>`,dt).argParser(R).conflicts(`allEvents`)).option(`--all-events`,`Receive every event type`).addOption(new x(`--api-version <version>`,`Payload version`).choices(h))).action(async(e,t,n)=>{let{updateWebhook:r}=await import(`./webhook-BxPA95wd.js`);await r(e,{...n.optsWithGlobals(),...t})}),N(t.command(`enable`).description(`Resume deliveries to a destination`).argument(`<id>`,`Destination id`)).action(async(e,t,n)=>{let{setWebhookEnabled:r}=await import(`./webhook-BxPA95wd.js`);await r(e,!0,n.optsWithGlobals())}),N(t.command(`disable`).description(`Stop deliveries to a destination`).argument(`<id>`,`Destination id`)).action(async(e,t,n)=>{let{setWebhookEnabled:r}=await import(`./webhook-BxPA95wd.js`);await r(e,!1,n.optsWithGlobals())}),N(t.command(`delete`).description(`Delete a destination and its signing secret`).argument(`<id>`,`Destination id`).option(`-y, --yes`,`Skip the confirmation prompt`)).action(async(e,t,n)=>{let{deleteWebhook:r}=await import(`./webhook-BxPA95wd.js`);await r(e,{...n.optsWithGlobals(),...t})}),N(t.command(`rotate-secret`).description(`Issue a new signing secret. The new secret is printed only this once`).argument(`<id>`,`Destination id`).option(`--expire-previous <duration|now>`,`How long the previous secret keeps signing alongside the new one, e.g. 24h, 30m, 7d or now (default: 24h)`,je)).action(async(e,t,n)=>{let{rotateWebhookSecret:r}=await import(`./webhook-BxPA95wd.js`);await r(e,{...n.optsWithGlobals(),...t})}),N(F(t.command(`deliveries`).description(`List deliveries to a destination, newest first`).argument(`<id>`,`Destination id`).addOption(new x(`--status <status>`,`Filter by status`).choices(ue)).addOption(new x(`--event-type <type>`,`Filter by event type`).choices(pe)),20)).action(async(e,t,n)=>{let{listWebhookDeliveries:r}=await import(`./webhook-BxPA95wd.js`);await r(e,{...n.optsWithGlobals(),...t})}),N(t.command(`delivery`).description(`Show a delivery: request body and every attempt with its response`).argument(`<id>`,`Destination id`).argument(`<deliveryId>`,"Delivery id from `entrydesk webhook deliveries`")).action(async(e,t,n,r)=>{let{showWebhookDelivery:i}=await import(`./webhook-BxPA95wd.js`);await i(e,t,r.optsWithGlobals())}),N(t.command(`resend`).description(`Send a delivery again; if it fails, it keeps retrying with the remaining attempt budget. The event id stays the same`).argument(`<id>`,`Destination id`).argument(`<deliveryId>`,`Delivery id`)).action(async(e,t,n,r)=>{let{resendWebhookDelivery:i}=await import(`./webhook-BxPA95wd.js`);await i(e,t,r.optsWithGlobals())}),N(t.command(`test`).description(`Send a destination.test_sent event now and print the endpoint response`).argument(`<id>`,`Destination id`).addOption(new x(`--event-type <type>`,`Event type the test stands in for (default: budget.limit_reached)`).choices(p))).action(async(e,t,n)=>{let{sendWebhookTest:r}=await import(`./webhook-BxPA95wd.js`);await r(e,{...n.optsWithGlobals(),...t})}),N(t.command(`event-types`).description(`List the event types you can subscribe to`)).action(async(e,t)=>{let{listWebhookEventTypes:n}=await import(`./webhook-BxPA95wd.js`);await n(t.optsWithGlobals())})}function pt(e){let t=e.command(`workflow`).summary(`Create, run, and manage workflows`).helpGroup(z.build).addHelpText(`after`,`
174
+ echo '{"limit": 5}' | entrydesk tool call agent__search_agents`)).action(async(e,t,n)=>{let{runToolCall:r}=await import(`./tool-82NKBr29.js`);await r(e,n.optsWithGlobals())})}function yt(e){let t=e.command(`usage`).summary(`Show balance, spend rankings, per-user breakdown, or CSV export`).helpGroup(H.workspace);M(t.command(`summary`,{isDefault:!0}).description(`Per-user monthly cost/operations summary`).option(`--limit <number>`,`Limit rows (default: all)`,x(1,100)).addOption(new b(`--sort-by <field>`,`Sort the summary`).choices(ge).default(`cost`))).action(async(e,t)=>{let{showUsageSummary:n}=await import(`./usage-BS_didkP.js`);await n(t.optsWithGlobals())}),M(t.command(`balance`).description(`Workspace USD balance, spend, and limits`)).action(async(e,t)=>{let{showUsageBalance:n}=await import(`./usage-BS_didkP.js`);await n(t.optsWithGlobals())}),M(t.command(`me`).description(`Your own usage and availability`)).action(async(e,t)=>{let{showOwnUsage:n}=await import(`./usage-BS_didkP.js`);await n(t.optsWithGlobals())}),M(t.command(`consumptions`).description(`Per-user extra-usage breakdown`).option(`--limit <number>`,`Max rows (default: 20)`,x(1,100)).option(`--offset <number>`,`Pagination offset`,Te).option(`--period-start <iso>`,`Period start`)).action(async(e,t)=>{let{listUsageConsumptions:n}=await import(`./usage-BS_didkP.js`);await n(t.optsWithGlobals())}),M(t.command(`rank`).description(`Rank workspace spend by user, agent, schedule, or model`).addOption(new b(`--by <field>`,`Dimension to rank by`).choices(xe).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-DOuyWGaq.js`);await n(t.optsWithGlobals())}),M(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-DOuyWGaq.js`);await r(e,n.optsWithGlobals())}),M(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-DOuyWGaq.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-BS_didkP.js`);await t(e)})}const bt=`Comma-separated event types to receive (${d.join(`, `)}); see \`entrydesk webhook event-types\``;function xt(e){let t=e.command(`webhook`).summary(`Manage outgoing webhook destinations and deliveries`).helpGroup(H.workspace);M(t.command(`list`,{isDefault:!0}).description(`List destinations with status, subscriptions and the last 7 days of error rate`)).action(async(e,t)=>{let{listWebhooks:n}=await import(`./webhook-Da2l-gv6.js`);await n(t.optsWithGlobals())}),M(t.command(`get`).description(`Show a destination and its last 7 days of metrics`).argument(`<id>`,"Destination id from `entrydesk webhook list`")).action(async(e,t,n)=>{let{showWebhook:r}=await import(`./webhook-Da2l-gv6.js`);await r(e,n.optsWithGlobals())}),M(t.command(`create`).description(`Create a destination. The signing secret is printed only this once`).requiredOption(`--url <url>`,`HTTPS endpoint that receives the POSTs`).requiredOption(`--name <name>`,`Destination name`).option(`--description <text>`,`Description`).addOption(new b(`--events <types>`,bt).argParser(V).conflicts(`allEvents`)).option(`--all-events`,`Receive every event type, including ones added later`).addOption(new b(`--api-version <version>`,`Payload version to lock (default: latest)`).choices(de))).action(async(e,t)=>{let{createWebhook:n}=await import(`./webhook-Da2l-gv6.js`);await n({...t.optsWithGlobals(),...e})}),M(t.command(`update`).description(`Update only the fields you pass`).argument(`<id>`,`Destination id`).option(`--url <url>`,`HTTPS endpoint`).option(`--name <name>`,`Destination name`).option(`--description <text>`,`Description`).addOption(new b(`--events <types>`,bt).argParser(V).conflicts(`allEvents`)).option(`--all-events`,`Receive every event type`).addOption(new b(`--api-version <version>`,`Payload version`).choices(de))).action(async(e,t,n)=>{let{updateWebhook:r}=await import(`./webhook-Da2l-gv6.js`);await r(e,{...n.optsWithGlobals(),...t})}),M(t.command(`enable`).description(`Resume deliveries to a destination`).argument(`<id>`,`Destination id`)).action(async(e,t,n)=>{let{setWebhookEnabled:r}=await import(`./webhook-Da2l-gv6.js`);await r(e,!0,n.optsWithGlobals())}),M(t.command(`disable`).description(`Stop deliveries to a destination`).argument(`<id>`,`Destination id`)).action(async(e,t,n)=>{let{setWebhookEnabled:r}=await import(`./webhook-Da2l-gv6.js`);await r(e,!1,n.optsWithGlobals())}),M(t.command(`delete`).description(`Delete a destination and its signing secret`).argument(`<id>`,`Destination id`).option(`-y, --yes`,`Skip the confirmation prompt`)).action(async(e,t,n)=>{let{deleteWebhook:r}=await import(`./webhook-Da2l-gv6.js`);await r(e,{...n.optsWithGlobals(),...t})}),M(t.command(`rotate-secret`).description(`Issue a new signing secret. The new secret is printed only this once`).argument(`<id>`,`Destination id`).option(`--expire-previous <duration|now>`,`How long the previous secret keeps signing alongside the new one, e.g. 24h, 30m, 7d or now (default: 24h)`,Fe)).action(async(e,t,n)=>{let{rotateWebhookSecret:r}=await import(`./webhook-Da2l-gv6.js`);await r(e,{...n.optsWithGlobals(),...t})}),M(P(t.command(`deliveries`).description(`List deliveries to a destination, newest first`).argument(`<id>`,`Destination id`).addOption(new b(`--status <status>`,`Filter by status`).choices(se)).addOption(new b(`--event-type <type>`,`Filter by event type`).choices(oe)),20)).action(async(e,t,n)=>{let{listWebhookDeliveries:r}=await import(`./webhook-Da2l-gv6.js`);await r(e,{...n.optsWithGlobals(),...t})}),M(t.command(`delivery`).description(`Show a delivery: request body and every attempt with its response`).argument(`<id>`,`Destination id`).argument(`<deliveryId>`,"Delivery id from `entrydesk webhook deliveries`")).action(async(e,t,n,r)=>{let{showWebhookDelivery:i}=await import(`./webhook-Da2l-gv6.js`);await i(e,t,r.optsWithGlobals())}),M(t.command(`resend`).description(`Send a delivery again; if it fails, it keeps retrying with the remaining attempt budget. The event id stays the same`).argument(`<id>`,`Destination id`).argument(`<deliveryId>`,`Delivery id`)).action(async(e,t,n,r)=>{let{resendWebhookDelivery:i}=await import(`./webhook-Da2l-gv6.js`);await i(e,t,r.optsWithGlobals())}),M(t.command(`test`).description(`Send a destination.test_sent event now and print the endpoint response`).argument(`<id>`,`Destination id`).addOption(new b(`--event-type <type>`,`Event type the test stands in for (default: budget.limit_reached)`).choices(d))).action(async(e,t,n)=>{let{sendWebhookTest:r}=await import(`./webhook-Da2l-gv6.js`);await r(e,{...n.optsWithGlobals(),...t})}),M(t.command(`event-types`).description(`List the event types you can subscribe to`)).action(async(e,t)=>{let{listWebhookEventTypes:n}=await import(`./webhook-Da2l-gv6.js`);await n(t.optsWithGlobals())})}function St(e){let t=e.command(`workflow`).summary(`Create, run, and manage workflows`).helpGroup(H.build).addHelpText(`after`,`
170
175
  Examples:
171
176
  entrydesk workflow list --search report
172
177
  entrydesk workflow create --name "Nightly report" --file ./report.js
173
178
  entrydesk workflow run <workflowId> --args '{"date":"2026-06-20"}' --wait
174
- entrydesk workflow run-get <workflowId> <runId>`);N(F(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-DJkPvmuA.js`);await n(t.optsWithGlobals())}),N(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-DJkPvmuA.js`);await r(e,n.optsWithGlobals())}),N(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-DJkPvmuA.js`);await n(t.optsWithGlobals())}),N(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 x(`--activate`,`Enable the workflow`).conflicts(`deactivate`)).option(`--deactivate`,`Disable the workflow`)).action(async(e,t,n)=>{let{updateWorkflow:r}=await import(`./workflow-DJkPvmuA.js`);await r(e,n.optsWithGlobals())}),N(t.command(`run`).description(`Trigger a run`).argument(`<workflowId>`,`Workflow to run`).addOption(new x(`--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-DJkPvmuA.js`);await r(e,n.optsWithGlobals())}),N(F(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-DJkPvmuA.js`);await r(e,n.optsWithGlobals())}),N(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-DJkPvmuA.js`);await i(e,t,r.optsWithGlobals())}),N(L(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-DJkPvmuA.js`);await r(e,n.optsWithGlobals())})}function mt(e){let t=e.command(`workspaces`).summary(`List or switch workspaces`).helpGroup(z.workspace);N(t.command(`list`,{isDefault:!0}).description(`List all workspaces`)).action(async(e,t)=>{let{listWorkspaces:n}=await import(`./workspaces-CDotU443.js`);await n(t.optsWithGlobals())}),N(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-CDotU443.js`);await r(e,n.optsWithGlobals())})}function ht(e){return e.commands.length>0}function gt(e,t){return e.options.some(e=>e.long===t)}function _t(e,t){return e.name()===t||e.aliases().includes(t)}function vt(e){ht(e)&&!gt(e,`--json`)&&e.addOption(new x(`--json`).hideHelp()),gt(e,`--profile`)||e.addOption(new x(M).hideHelp())}function yt(e){e.hook(`preSubcommand`,(e,t)=>{let[n]=e.args;n===void 0||n.startsWith(`-`)||_t(t,n)||t.registeredArguments.length>0||e.commands.some(e=>_t(e,n))||e.error(`error: unknown command '${n}'`,{code:`commander.unknownCommand`})})}function bt(e,t){t||vt(e),ht(e)&&yt(e);for(let t of e.commands)t.name()!==`help`&&bt(t,!1)}function xt(e){let t=e.optsWithGlobals().profile;return typeof t==`string`?t:void 0}function St(e){let t=e;for(;t.parent?.parent;)t=t.parent;return t.name()}function Ct(){let e=Me();return e.hook(`preAction`,(e,t)=>{if(St(t)===`profile`)return;let n=xt(t)??_.getCurrentProfileName();_.ensureProfileExists(n),_.setOverrideProfile(n)}),st(e),ct(e),lt(e),Ne(e),Qe(e),$e(e),et(e),mt(e),tt(e),ze(e),Be(e),Ke(e),pt(e),Ve(e),ot(e),Ze(e),qe(e),He(e),ut(e),Ie(e),ft(e),Pe(e),Ue(e),Re(e),nt(e),rt(e),it(e),bt(e,!0),e}try{await Ct().parseAsync(process.argv)}catch(e){de(e)}export{};
179
+ entrydesk workflow run-get <workflowId> <runId>`);M(P(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-oudE3gsp.js`);await n(t.optsWithGlobals())}),M(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-oudE3gsp.js`);await r(e,n.optsWithGlobals())}),M(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-oudE3gsp.js`);await n(t.optsWithGlobals())}),M(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 b(`--activate`,`Enable the workflow`).conflicts(`deactivate`)).option(`--deactivate`,`Disable the workflow`)).action(async(e,t,n)=>{let{updateWorkflow:r}=await import(`./workflow-oudE3gsp.js`);await r(e,n.optsWithGlobals())}),M(t.command(`run`).description(`Trigger a run`).argument(`<workflowId>`,`Workflow to run`).addOption(new b(`--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-oudE3gsp.js`);await r(e,n.optsWithGlobals())}),M(P(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-oudE3gsp.js`);await r(e,n.optsWithGlobals())}),M(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-oudE3gsp.js`);await i(e,t,r.optsWithGlobals())}),M(R(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-oudE3gsp.js`);await r(e,n.optsWithGlobals())})}function Ct(e){let t=e.command(`workspaces`).summary(`List or switch workspaces`).helpGroup(H.workspace);M(t.command(`list`,{isDefault:!0}).description(`List all workspaces`)).action(async(e,t)=>{let{listWorkspaces:n}=await import(`./workspaces-9SRfDSh3.js`);await n(t.optsWithGlobals())}),M(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-9SRfDSh3.js`);await r(e,n.optsWithGlobals())})}function wt(e){return e.commands.length>0}function Tt(e,t){return e.options.some(e=>e.long===t)}function Et(e,t){return e.name()===t||e.aliases().includes(t)}function Dt(e){wt(e)&&!Tt(e,`--json`)&&e.addOption(new b(`--json`).hideHelp()),Tt(e,`--profile`)||e.addOption(new b(j).hideHelp())}function Ot(e){e.hook(`preSubcommand`,(e,t)=>{let[n]=e.args;n===void 0||n.startsWith(`-`)||Et(t,n)||t.registeredArguments.length>0||e.commands.some(e=>Et(e,n))||e.error(`error: unknown command '${n}'`,{code:`commander.unknownCommand`})})}function kt(e,t){t||Dt(e),wt(e)&&Ot(e);for(let t of e.commands)t.name()!==`help`&&kt(t,!1)}function At(e){let t=e.optsWithGlobals().profile;return typeof t==`string`?t:void 0}function jt(e){let t=e;for(;t.parent?.parent;)t=t.parent;return t.name()}function Mt(){let e=Ie();return e.hook(`preAction`,(e,t)=>{if(jt(t)===`profile`)return;let n=At(t)??g.getCurrentProfileName();g.ensureProfileExists(n),g.setOverrideProfile(n)}),ht(e),gt(e),vt(e),Le(e),at(e),ot(e),st(e),ct(e),Ct(e),_t(e),lt(e),Ue(e),We(e),Qe(e),St(e),Ge(e),mt(e),it(e),$e(e),Ke(e),yt(e),Be(e),xt(e),Re(e),qe(e),He(e),ut(e),dt(e),ft(e),kt(e,!0),e}try{await Mt().parseAsync(process.argv)}catch(e){ue(e)}export{};
@@ -7,4 +7,4 @@ if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
7
7
  );
8
8
  process.exit(1);
9
9
  }
10
- import{T as e,ht as t}from"./profile-storage-BVSyHoBn.js";import{o as n}from"./resolve-yAqzT64X.js";import{t as r}from"./stdin-B18x8pUF.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};
10
+ import{O as e,Tt as t}from"./profile-storage-CKrZ-xsd.js";import{o as n}from"./resolve-IOW00hfy.js";import{t as r}from"./stdin-B18x8pUF.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};
@@ -7,4 +7,4 @@ if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
7
7
  );
8
8
  process.exit(1);
9
9
  }
10
- import{C as e,b as t,g as n,h as r,j as i,k as a,v as o,x as s}from"./profile-storage-BVSyHoBn.js";import{t as c}from"./terminal-text-cBPBiP3x.js";function l(e,t){if(t.json){console.log(c(e));return}if(`alreadyAuthenticated`in e){console.log(`Already authenticated via ${n}.`),console.log(`No login required — environment credentials are active.`);return}console.log(`Logged in as ${e.email}`),e.workspaceName&&console.log(`Workspace: ${e.workspaceName}`),console.log(`Server: ${e.server}`)}async function u(n){let c=o();if(c)return{alreadyAuthenticated:!0,authSource:`sandbox-env`,workspaceId:c.workspaceId};t()&&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: ${i()}`),console.log(`[DEBUG] API URL: ${a()}`));let l=await r({onDeviceCodeReceived:(e,t)=>{n.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:()=>{n.json||console.log(`Opening browser…`)},onWaitingForAuthorization:()=>{n.json||console.log(`Waiting for authorization…`)},onAuthorized:()=>{n.json||console.log(`Authorization successful.`)},onWarning:e=>{console.error(`Warning: ${e}`)}}),{workspaces:u}=await new s().getWorkspaces(l.accessToken),d=u[0];return await e.saveAll({accessToken:l.accessToken,refreshToken:l.refreshToken,email:l.email,workspaceId:d?.id}),{email:l.email,workspaceId:d?.id,workspaceName:d?.name,server:a()}}async function d(e){l(await u(e),e)}export{u as performLogin,l as printLoginResult,d as runLogin};
10
+ import{C as e,E as t,M as n,P as r,S as i,_ as a,b as o,v as s}from"./profile-storage-CKrZ-xsd.js";import{t as c}from"./terminal-text-cBPBiP3x.js";function l(e,t){if(t.json){console.log(c(e));return}if(`alreadyAuthenticated`in e){console.log(`Already authenticated via ${s}.`),console.log(`No login required — environment credentials are active.`);return}console.log(`Logged in as ${e.email}`),e.workspaceName&&console.log(`Workspace: ${e.workspaceName}`),console.log(`Server: ${e.server}`)}async function u(s){let c=o();if(c)return{alreadyAuthenticated:!0,authSource:`sandbox-env`,workspaceId:c.workspaceId};i()&&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: ${r()}`),console.log(`[DEBUG] API URL: ${n()}`));let l=await a({onDeviceCodeReceived:(e,t)=>{s.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:()=>{s.json||console.log(`Opening browser…`)},onWaitingForAuthorization:()=>{s.json||console.log(`Waiting for authorization…`)},onAuthorized:()=>{s.json||console.log(`Authorization successful.`)},onWarning:e=>{console.error(`Warning: ${e}`)}}),{workspaces:u}=await new e().getWorkspaces(l.accessToken),d=u[0];return await t.saveAll({accessToken:l.accessToken,refreshToken:l.refreshToken,email:l.email,workspaceId:d?.id}),{email:l.email,workspaceId:d?.id,workspaceName:d?.name,server:n()}}async function d(e){l(await u(e),e)}export{u as performLogin,l as printLoginResult,d as runLogin};
@@ -7,4 +7,4 @@ if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
7
7
  );
8
8
  process.exit(1);
9
9
  }
10
- import{B as e}from"./profile-storage-BVSyHoBn.js";function t(t){let n=e(t);if(console.log(`User grants (${n.length}):`),n.length===0){console.log(` (none)`);return}for(let e of n)console.log(` - ${e.user.name} <${e.user.email}> · ${e.role}`),console.log(` ID: ${e.subjectId}`)}export{t};
10
+ import{C as e,E as t,g as n}from"./profile-storage-CKrZ-xsd.js";async function r(){let r=await t.getAll();if(!r){console.log(`Not logged in.`);return}try{r.refreshToken&&await new e().revokeOAuthToken({token:r.refreshToken,clientId:n})}catch{}await t.clear(),console.log(`Logged out.`)}export{r as runLogout};
@@ -7,6 +7,6 @@ if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
7
7
  );
8
8
  process.exit(1);
9
9
  }
10
- import{I as e,d as t,x as n}from"./profile-storage-BVSyHoBn.js";import{t as r}from"./terminal-text-cBPBiP3x.js";import{isHTTPError as i}from"ky";function a(e){return i(e)&&e.response.status===404}var o=class extends Error{slug;constructor(e){super(`"${e}" matches both an agent and a skill`),this.slug=e,this.name=`AmbiguousResourceError`}},s=class extends Error{slug;constructor(e){super(`Marketplace resource not found: ${e}`),this.slug=e,this.name=`ResourceNotFoundError`}};async function c(e){try{return await e}catch(e){if(a(e))return null;throw e}}async function l(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([c(e.getMarketplaceAgent(t)),c(e.getMarketplaceSkill(t))]);if(r&&i)throw new o(t);if(r)return{type:`agent`,view:r};if(i)return{type:`skill`,view:i};throw new s(t)}async function u(e,t){try{return await t()}catch(t){throw t instanceof o&&(console.error(`"${t.slug}" matches both an agent and a skill. Re-run with --type agent|skill.`),process.exit(1)),(t instanceof s||a(t))&&(console.error(`Marketplace resource not found: ${e}`),process.exit(1)),t}}async function d(e,t){let i=await new n().searchMarketplace({type:t.type,tag:e??t.tag,limit:t.limit,cursor:t.cursor});if(t.json){console.log(r(i));return}if(i.items.length===0){console.log(`No marketplace resources found.`);return}console.log(`Marketplace (${i.items.length}):\n`);for(let e of i.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(``);i.nextCursor&&console.log(`More results: --cursor ${i.nextCursor}`)}async function f(e,t){let{type:i,view:a}=await u(e,()=>l(new n,e,t.type));if(t.json){console.log(r(a));return}if(console.log(`${a.name} [${i}]`),console.log(`Slug: ${a.slug}`),a.description&&console.log(`\n${a.description}`),a.tags.length>0&&console.log(`\nTags: ${a.tags.map(e=>e.label).join(`, `)}`),i===`agent`){if(a.starterPrompts.length>0){console.log(`
10
+ import{C as e,p as t,z as n}from"./profile-storage-CKrZ-xsd.js";import{t as r}from"./terminal-text-cBPBiP3x.js";import{isHTTPError as i}from"ky";function a(e){return i(e)&&e.response.status===404}var o=class extends Error{slug;constructor(e){super(`"${e}" matches both an agent and a skill`),this.slug=e,this.name=`AmbiguousResourceError`}},s=class extends Error{slug;constructor(e){super(`Marketplace resource not found: ${e}`),this.slug=e,this.name=`ResourceNotFoundError`}};async function c(e){try{return await e}catch(e){if(a(e))return null;throw e}}async function l(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([c(e.getMarketplaceAgent(t)),c(e.getMarketplaceSkill(t))]);if(r&&i)throw new o(t);if(r)return{type:`agent`,view:r};if(i)return{type:`skill`,view:i};throw new s(t)}async function u(e,t){try{return await t()}catch(t){throw t instanceof o&&(console.error(`"${t.slug}" matches both an agent and a skill. Re-run with --type agent|skill.`),process.exit(1)),(t instanceof s||a(t))&&(console.error(`Marketplace resource not found: ${e}`),process.exit(1)),t}}async function d(t,n){let i=await new e().searchMarketplace({type:n.type,tag:t??n.tag,limit:n.limit,cursor:n.cursor});if(n.json){console.log(r(i));return}if(i.items.length===0){console.log(`No marketplace resources found.`);return}console.log(`Marketplace (${i.items.length}):\n`);for(let e of i.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(``);i.nextCursor&&console.log(`More results: --cursor ${i.nextCursor}`)}async function f(t,n){let{type:i,view:a}=await u(t,()=>l(new e,t,n.type));if(n.json){console.log(r(a));return}if(console.log(`${a.name} [${i}]`),console.log(`Slug: ${a.slug}`),a.description&&console.log(`\n${a.description}`),a.tags.length>0&&console.log(`\nTags: ${a.tags.map(e=>e.label).join(`, `)}`),i===`agent`){if(a.starterPrompts.length>0){console.log(`
11
11
  Starter prompts:`);for(let e of a.starterPrompts)console.log(` - ${e}`)}if(a.connectors.length>0){console.log(`
12
- Connectors:`);for(let e of a.connectors)console.log(` - ${e.name} (${e.provider})`)}}console.log(`\nInstall with: entrydesk marketplace install ${a.slug} --type ${i}`)}async function p(i,a){let o=new n,{accessToken:s,workspaceId:c}=await t(),{type:d}=a.type?{type:a.type}:await u(i,()=>l(o,i)),f=await u(i,()=>o.installMarketplaceResource(s,c,d,i,e.getToolApprovalMode()??void 0));if(a.json){console.log(r(f));return}console.log(`Installed ${d} "${i}" into the workspace.`),console.log(` ${d} ID: ${f.resourceId}`),f.taskId&&(console.log(` Setup task: ${f.taskId}`),console.log(` Continue setup: entrydesk tasks ${f.taskId}`))}async function m(e){let{items:t}=await new n().listMarketplaceRoles();if(e.json){console.log(r(t));return}if(t.length===0){console.log(`No marketplace roles found.`);return}console.log(`Marketplace roles (${t.length}):\n`);for(let e of t)console.log(` ${e.tag} ${e.name}`),e.tagline&&console.log(` ${e.tagline}`)}export{p as installMarketplaceResource,d as searchMarketplace,f as showMarketplaceResource,m as showMarketplaceRoles};
12
+ Connectors:`);for(let e of a.connectors)console.log(` - ${e.name} (${e.provider})`)}}console.log(`\nInstall with: entrydesk marketplace install ${a.slug} --type ${i}`)}async function p(i,a){let o=new e,{accessToken:s,workspaceId:c}=await t(),{type:d}=a.type?{type:a.type}:await u(i,()=>l(o,i)),f=await u(i,()=>o.installMarketplaceResource(s,c,d,i,n.getToolApprovalMode()??void 0));if(a.json){console.log(r(f));return}console.log(`Installed ${d} "${i}" into the workspace.`),console.log(` ${d} ID: ${f.resourceId}`),f.taskId&&(console.log(` Setup task: ${f.taskId}`),console.log(` Continue setup: entrydesk tasks ${f.taskId}`))}async function m(t){let{items:n}=await new e().listMarketplaceRoles();if(t.json){console.log(r(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{p as installMarketplaceResource,d as searchMarketplace,f as showMarketplaceResource,m as showMarketplaceRoles};
@@ -7,5 +7,5 @@ if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
7
7
  );
8
8
  process.exit(1);
9
9
  }
10
- import{C as e,M as t,N as n,d as r,f as i,p as a}from"./profile-storage-BVSyHoBn.js";import{r as o,t as s}from"./mcp-client-CPFC6TCy.js";import c from"node:http";import{stderr as l}from"node:process";import{NodeStreamableHTTPServerTransport as u}from"@modelcontextprotocol/node";import{Server as d}from"@modelcontextprotocol/server";import{StdioServerTransport as f}from"@modelcontextprotocol/server/stdio";function p(e){l.write(`${e}\n`)}function m(e,t,n){return s({apiUrl:e,accessToken:t,workspaceId:n,name:`entrydesk-cli-proxy`})}function h(e){let t=new d({name:`entrydesk-cli`,version:`1.0.0`},{capabilities:{tools:{}}});return t.setRequestHandler(`tools/list`,async(t,n)=>({tools:(await(await e()).listTools({},o({signal:n.mcpReq.signal}))).tools})),t.setRequestHandler(`tools/call`,async(t,n)=>{let{name:r,arguments:i}=t.params,{progressToken:a}=n.mcpReq._meta??{},s=await(await e()).callTool({name:r,arguments:i},o({signal:n.mcpReq.signal,onProgress:a===void 0?void 0:e=>{n.mcpReq.notify({method:`notifications/progress`,params:{...e,progressToken:a}}).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 g(e,t,n){let r=c.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=h(e),i=new u({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,()=>{p(`EntryDesk MCP server running at http://localhost:${n}/mcp`),p(`Press Ctrl+C to stop`)}),process.on(`SIGINT`,async()=>{p(`
11
- Shutting down…`),r.close(),await t(),process.exit(0)}),process.on(`SIGTERM`,async()=>{r.close(),await t(),process.exit(0)})}async function _(e,t){let n=h(e),r=new f;r.onclose=()=>{t()},await n.connect(r)}const v={mode:`stdio`};async function y(o=v){process.on(`unhandledRejection`,e=>{console.error(`[entrydesk-mcp] Unhandled rejection:`,e)}),process.on(`uncaughtException`,e=>{console.error(`[entrydesk-mcp] Uncaught exception:`,e)});try{p(`[entrydesk-mcp] Starting MCP server…`);let s,c;try{let e=await r();s=e.accessToken,c=e.workspaceId}catch(e){let t=e instanceof Error?e.message:`Authentication failed`;console.error(t),process.exit(1)}let l=await n(),u=t();p(`[entrydesk-mcp] Connecting to ${l}…`),p(`[entrydesk-mcp] Workspace: ${c}`);let d=await m(l,s,c);p(`[entrydesk-mcp] Connected to EntryDesk API`);let f=null,h=async()=>i(s)?f||(f=(async()=>{p(`[entrydesk-mcp] Token expiring soon, refreshing…`);let t=await e.getAll();if(!t?.accessToken)throw Error("Not logged in. Run `entrydesk login` again.");let r=await a(t);if(r!==s){s=r;try{await d.close()}catch{}d=await m(await n(),s,c),p(`[entrydesk-mcp] Token refreshed, reconnected`)}return d})().finally(()=>{f=null}),f):d,v=async()=>{try{await d.close()}catch{}};o.mode===`http`?await g(h,v,o.port??u.httpPort):(p(`[entrydesk-mcp] Starting stdio server…`),await _(h,v),p(`[entrydesk-mcp] Stdio server started`))}catch(e){console.error(`[entrydesk-mcp] Fatal error:`,e),process.exit(1)}}export{y as startMcpServer};
10
+ import{E as e,F as t,I as n,h as r,m as i,p as a}from"./profile-storage-CKrZ-xsd.js";import{r as o,t as s}from"./mcp-client-CEH9X7Vs.js";import c from"node:http";import{stderr as l}from"node:process";import{NodeStreamableHTTPServerTransport as u}from"@modelcontextprotocol/node";import{Server as d}from"@modelcontextprotocol/server";import{StdioServerTransport as f}from"@modelcontextprotocol/server/stdio";function p(e){l.write(`${e}\n`)}function m(e,t,n){return s({apiUrl:e,accessToken:t,workspaceId:n,name:`entrydesk-cli-proxy`})}function h(e){let t=new d({name:`entrydesk-cli`,version:`1.0.0`},{capabilities:{tools:{}}});return t.setRequestHandler(`tools/list`,async(t,n)=>({tools:(await(await e()).listTools({},o({signal:n.mcpReq.signal}))).tools})),t.setRequestHandler(`tools/call`,async(t,n)=>{let{name:r,arguments:i}=t.params,{progressToken:a}=n.mcpReq._meta??{},s=await(await e()).callTool({name:r,arguments:i},o({signal:n.mcpReq.signal,onProgress:a===void 0?void 0:e=>{n.mcpReq.notify({method:`notifications/progress`,params:{...e,progressToken:a}}).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 g(e,t,n){let r=c.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=h(e),i=new u({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,()=>{p(`EntryDesk MCP server running at http://localhost:${n}/mcp`),p(`Press Ctrl+C to stop`)}),process.on(`SIGINT`,async()=>{p(`
11
+ Shutting down…`),r.close(),await t(),process.exit(0)}),process.on(`SIGTERM`,async()=>{r.close(),await t(),process.exit(0)})}async function _(e,t){let n=h(e),r=new f;r.onclose=()=>{t()},await n.connect(r)}const v={mode:`stdio`};async function y(o=v){process.on(`unhandledRejection`,e=>{console.error(`[entrydesk-mcp] Unhandled rejection:`,e)}),process.on(`uncaughtException`,e=>{console.error(`[entrydesk-mcp] Uncaught exception:`,e)});try{p(`[entrydesk-mcp] Starting MCP server…`);let s,c;try{let e=await a();s=e.accessToken,c=e.workspaceId}catch(e){let t=e instanceof Error?e.message:`Authentication failed`;console.error(t),process.exit(1)}let l=await n(),u=t();p(`[entrydesk-mcp] Connecting to ${l}…`),p(`[entrydesk-mcp] Workspace: ${c}`);let d=await m(l,s,c);p(`[entrydesk-mcp] Connected to EntryDesk API`);let f=null,h=async()=>i(s)?f||(f=(async()=>{p(`[entrydesk-mcp] Token expiring soon, refreshing…`);let t=await e.getAll();if(!t?.accessToken)throw Error("Not logged in. Run `entrydesk login` again.");let i=await r(t);if(i!==s){s=i;try{await d.close()}catch{}d=await m(await n(),s,c),p(`[entrydesk-mcp] Token refreshed, reconnected`)}return d})().finally(()=>{f=null}),f):d,v=async()=>{try{await d.close()}catch{}};o.mode===`http`?await g(h,v,o.port??u.httpPort):(p(`[entrydesk-mcp] Starting stdio server…`),await _(h,v),p(`[entrydesk-mcp] Stdio server started`))}catch(e){console.error(`[entrydesk-mcp] Fatal error:`,e),process.exit(1)}}export{y as startMcpServer};
@@ -7,4 +7,4 @@ if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
7
7
  );
8
8
  process.exit(1);
9
9
  }
10
- import{M as e,N as t,O as n,P as r,d as i}from"./profile-storage-BVSyHoBn.js";import{Client as a,StreamableHTTPClientTransport as o}from"@modelcontextprotocol/client";const s=()=>{};function c(t={}){let{requestTimeout:n,requestMaxTotalTimeout:r}=e();return{timeout:n,maxTotalTimeout:r,resetTimeoutOnProgress:!0,onprogress:t.onProgress??s,signal:t.signal}}async function l(e={}){let s=e.apiUrl,c=e.accessToken,l=e.workspaceId;if(!c||!l){let e=await i();c||=e.accessToken,l||=e.workspaceId}s||=await t();let u=new a({name:e.name??`entrydesk-cli`,version:`1.0.0`},{versionNegotiation:{mode:`auto`}}),d=new o(new URL(`${s}/v1/workspaces/${l}/mcp`),{requestInit:{headers:{Authorization:`Bearer ${c}`,...r(s)}},fetch:n(s)});return await u.connect(d),u}async function u(){return l()}export{u as n,c as r,l as t};
10
+ import{F as e,I as t,L as n,j as r,p as i}from"./profile-storage-CKrZ-xsd.js";import{Client as a,StreamableHTTPClientTransport as o}from"@modelcontextprotocol/client";const s=()=>{};function c(t={}){let{requestTimeout:n,requestMaxTotalTimeout:r}=e();return{timeout:n,maxTotalTimeout:r,resetTimeoutOnProgress:!0,onprogress:t.onProgress??s,signal:t.signal}}async function l(e={}){let s=e.apiUrl,c=e.accessToken,l=e.workspaceId;if(!c||!l){let e=await i();c||=e.accessToken,l||=e.workspaceId}s||=await t();let u=new a({name:e.name??`entrydesk-cli`,version:`1.0.0`},{versionNegotiation:{mode:`auto`}}),d=new o(new URL(`${s}/v1/workspaces/${l}/mcp`),{requestInit:{headers:{Authorization:`Bearer ${c}`,...n(s)}},fetch:r(s)});return await u.connect(d),u}async function u(){return l()}export{u as n,c as r,l as t};