@entrydesk/cli 2.0.0-beta → 2.0.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 (45) hide show
  1. package/dist/{add-Cu0kBobt.js → add-B1NhONLo.js} +1 -1
  2. package/dist/agents-CmqbjcOy.js +2 -0
  3. package/dist/{billing-B96487c6.js → billing-1jI7tuUm.js} +1 -1
  4. package/dist/{budget-DhX2gt5z.js → budget-5BgMv02k.js} +1 -1
  5. package/dist/build-task-request-config-BvfeDz3u.js +2 -0
  6. package/dist/commands-B0bUDitb.js +2 -0
  7. package/dist/{commands-DbXuQqse.js → commands-DCchuLQ9.js} +1 -1
  8. package/dist/{config-eCQwQAt1.js → config-B9tUjrKe.js} +1 -1
  9. package/dist/connectors-Du0gwdNw.js +3 -0
  10. package/dist/custom-connector-D5nYtPdy.js +2 -0
  11. package/dist/index.js +9 -9
  12. package/dist/{login-IvudGta0.js → login-DDHPKjnl.js} +1 -1
  13. package/dist/{logout-Bjmk9YUh.js → logout-BfBH5eJn.js} +1 -1
  14. package/dist/{marketplace-BPY5cD0d.js → marketplace-uKCzG2ZZ.js} +1 -1
  15. package/dist/{mcp-ydzvH8kz.js → mcp-DINA1zRb.js} +1 -1
  16. package/dist/{mcp-client-Cr_sHGPw.js → mcp-client-CmjAqUI6.js} +1 -1
  17. package/dist/{meeting-BDhBTbm3.js → meeting-DyRLAlio.js} +1 -1
  18. package/dist/{models-BFnezI1c.js → models-MjAV8n3p.js} +1 -1
  19. package/dist/{notifications-4bo-vcIW.js → notifications-ChqOyq50.js} +1 -1
  20. package/dist/{paths-BAZ2NsXN.js → paths-B_0RLzm4.js} +1 -1
  21. package/dist/{profile-BZo9STO2.js → profile-BvYUZvxC.js} +1 -1
  22. package/dist/profile-storage-CsigYr0Q.js +72 -0
  23. package/dist/{push-Mb0Xb42_.js → push-Dv7v6CZ8.js} +1 -1
  24. package/dist/{recordings-D9jnWpxs.js → recordings-k6uAy1-Z.js} +1 -1
  25. package/dist/{remove-CJiRVixg.js → remove-C846BKtl.js} +1 -1
  26. package/dist/schedules-gNv67oB_.js +21 -0
  27. package/dist/{skills-DYS1EQMn.js → skills-fZI01pai.js} +1 -1
  28. package/dist/{status-BgIfKAmr.js → status-DmJ-xYvm.js} +1 -1
  29. package/dist/{status-DzGv21m4.js → status-gxTm4vOE.js} +1 -1
  30. package/dist/task-Cu8s2pLl.js +115 -0
  31. package/dist/{tasks-Dd-GdHfu.js → tasks-iSFyXmqr.js} +2 -2
  32. package/dist/{tool-B6W8erW6.js → tool-Cok2kze5.js} +1 -1
  33. package/dist/{update-CYieYkZl.js → update-DvJ7nqZt.js} +1 -1
  34. package/dist/{usage-BLdNvuse.js → usage-BwizU9L8.js} +1 -1
  35. package/dist/version-Db_lMuAl.js +2 -0
  36. package/dist/{workflow-DlQtL_J-.js → workflow-BZblFLYG.js} +1 -1
  37. package/dist/{workspaces-IAJitqaO.js → workspaces-DE3ileKk.js} +1 -1
  38. package/package.json +7 -7
  39. package/dist/agents--2Fw5-et.js +0 -2
  40. package/dist/commands-C1wX8XQY.js +0 -2
  41. package/dist/connectors-DGmZ4zTG.js +0 -3
  42. package/dist/profile-storage-mtd3aKrx.js +0 -72
  43. package/dist/schedules-BFoirR6r.js +0 -21
  44. package/dist/task-Db4UcJ6G.js +0 -115
  45. package/dist/version-Cos6L15W.js +0 -2
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{C as e}from"./profile-storage-mtd3aKrx.js";import{d as t,h as n,i as r,n as i,r as a,u as o}from"./paths-BAZ2NsXN.js";import{t as s}from"./hash-Ddmw8YE4.js";import{r as c}from"./installer-iaoPJQn3.js";import{t as l}from"./remote-nEFOyIM2.js";import u from"node:fs";import d from"node:os";import f from"node:path";import{execFileSync as p}from"node:child_process";function m(e,t){let n=f.dirname(e);u.mkdirSync(n,{recursive:!0});let r=u.mkdtempSync(f.join(n,`.${f.basename(e)}.tmp-`)),i=f.join(r,`next`),a=f.join(r,`prev`);u.mkdirSync(i,{recursive:!0});let o=!1;try{t(i),u.existsSync(e)&&(u.renameSync(e,a),o=!0),u.renameSync(i,e)}catch(t){throw o&&!u.existsSync(e)&&u.renameSync(a,e),t}finally{u.rmSync(r,{recursive:!0,force:!0})}}const h=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu,g=/^([\w.-]+)\/([\w.-]+)(?:\/(.+))?$/u;function _(e){return e===`~`?d.homedir():e.startsWith(`~/`)||e.startsWith(`~\\`)?f.join(d.homedir(),e.slice(2)):e}function v(e){return e.startsWith(`./`)||e.startsWith(`../`)||e.startsWith(`/`)||e.startsWith(`~`)||e.startsWith(`.\\`)||/^[a-zA-Z]:[\\/]/u.test(e)}function y(e){let t=/^https?:\/\/github\.com\/([\w.-]+)\/([\w.-]+?)(?:\.git)?(?:\/tree\/([^/]+)(?:\/(.+))?)?\/?$/u.exec(e);return t?{type:`github`,owner:t[1],repo:t[2],gitRef:t[3],subpath:t[4],url:`https://github.com/${t[1]}/${t[2]}`}:null}function b(e){let t=e.trim();if(v(t))return{type:`local`,path:f.resolve(_(t))};if(t.startsWith(`ed:`)){let e=t.slice(3);return{type:`entrydesk`,ref:e,isId:h.test(e)}}if(h.test(t))return{type:`entrydesk`,ref:t,isId:!0};if(t.startsWith(`git@`)||t.endsWith(`.git`))return{type:`git`,url:t};let n=y(t);if(n)return n;if(/^https?:\/\//u.test(t))return{type:`git`,url:t};let r=g.exec(t);return r?{type:`github`,owner:r[1],repo:r[2],subpath:r[3],url:`https://github.com/${r[1]}/${r[2]}`}:{type:`entrydesk`,ref:t,isId:!1}}function x(e){return e.type===`github`?`github`:e.type}const S=new Set([`.git`,`node_modules`,`__pycache__`,`.DS_Store`,`.entrydesk`]);function C(e,t){if(!u.existsSync(f.join(e,`SKILL.md`)))throw Error(`No SKILL.md found at ${e}`);let n=u.realpathSync(e);if(n===(u.existsSync(t)?u.realpathSync(t):f.resolve(t)))return;let r=u.mkdtempSync(f.join(d.tmpdir(),`ed-local-skill-`)),i=f.join(r,`skill`);try{u.cpSync(n,i,{recursive:!0,filter:e=>!S.has(f.basename(e))}),m(t,e=>{u.cpSync(i,e,{recursive:!0})})}finally{u.rmSync(r,{recursive:!0,force:!0})}}function w(e){try{let t=u.readFileSync(f.join(e,`SKILL.md`),`utf8`),n=/^name:\s*(.+?)\s*$/mu.exec(t.split(/^---\s*$/mu)[1]??``);if(n?.[1])return n[1].replace(/^['"]|['"]$/gu,``)}catch{}return f.basename(e)}async function T(e,t){let{default:n}=await import(`adm-zip`),r=new n(e);m(t,e=>{let t=f.resolve(e)+f.sep;for(let n of r.getEntries()){if(n.isDirectory)continue;let r=f.resolve(e,n.entryName);if(!r.startsWith(t))throw Error(`Zip entry contains path traversal: ${n.entryName}`);u.mkdirSync(f.dirname(r),{recursive:!0}),u.writeFileSync(r,n.getData())}})}async function E(e,t){if(t.isId)return t.ref;let n=(await l(e.client,e.accessToken,e.workspaceId)).find(e=>e.name===t.ref||e.id===t.ref);if(!n)throw Error(`Skill not found in workspace: ${t.ref}`);return n.id}function D(e,t,n){let r=u.mkdtempSync(f.join(d.tmpdir(),`ed-npx-skills-`)),i=[`-y`,`skills@1.5.12`,`add`,e,`--copy`,`--yes`];try{p(`npx`,i,{cwd:r,stdio:n?[`ignore`,`pipe`,`pipe`]:`inherit`})}catch(t){throw u.rmSync(r,{recursive:!0,force:!0}),Error(`npx skills failed for ${e}. Ensure npx + network are available. (${t instanceof Error?t.message:String(t)})`,{cause:t})}let a=f.join(r,`.agents`,`skills`);if(!u.existsSync(a))throw u.rmSync(r,{recursive:!0,force:!0}),Error(`npx skills produced no skills under ${a}`);let o=u.readdirSync(a,{withFileTypes:!0}).filter(e=>e.isDirectory());if(o.length===0)throw u.rmSync(r,{recursive:!0,force:!0}),Error(`npx skills installed no skill directory`);let s=o[0];if(o.length>1){let e=t.type===`github`&&t.subpath?f.basename(t.subpath):void 0,n=e?o.find(t=>t.name===e):void 0;if(!n)throw u.rmSync(r,{recursive:!0,force:!0}),Error(`npx skills installed [${o.map(e=>e.name).join(`, `)}]; ${e?`none matched the subpath "${e}"`:`specify a subpath to pick one`}.`);s=n}return{dir:f.join(a,s.name),tmpRoot:r}}async function O(l,d,f){let p=b(l),m=!!d.global,h=a(m,f.workspaceId),g=h.rootDir,_={...f,workspaceId:h.workspaceId};if(!h.linked){let n={workspaceId:f.workspaceId,apiUrl:e()};r(),m?o(n):t(process.cwd(),n)}let v,y,S;if(p.type===`entrydesk`){y=await E(_,p);let e=await _.client.downloadSkillCurrent(_.accessToken,_.workspaceId,y);v=e.name,S=i(g,v);let t=await fetch(e.url);if(!t.ok)throw Error(`Failed to download ${v}: ${t.status}`);await T(Buffer.from(await t.arrayBuffer()),S)}else if(p.type===`local`)v=w(p.path),S=i(g,v),C(p.path,S);else{let{dir:e,tmpRoot:t}=D(l,p,!!d.json);try{v=w(e),S=i(g,v),C(e,S)}finally{u.rmSync(t,{recursive:!0,force:!0})}}let O=s(S),k={source:l,sourceType:x(p),skillId:y,localHash:O,lastPulledHash:p.type===`entrydesk`?O:``,mode:`symlink`,...p.type===`github`?{sourceUrl:p.url,ref:p.gitRef,subpath:p.subpath}:{},...p.type===`git`?{sourceUrl:p.url}:{}};n(g,v,k);let A=c(S,v,g,`symlink`,d.agent);d.json?console.info(JSON.stringify({name:v,sourceType:x(p),hash:O},null,2)):console.info(`✓ added ${v} (${p.type}, ${O.slice(0,12)}) → agents: ${A.map(e=>e.agentId).join(`, `)}`)}export{O as runSkillsAdd};
2
+ import{C as e}from"./profile-storage-CsigYr0Q.js";import{d as t,h as n,i as r,n as i,r as a,u as o}from"./paths-B_0RLzm4.js";import{t as s}from"./hash-Ddmw8YE4.js";import{r as c}from"./installer-iaoPJQn3.js";import{t as l}from"./remote-nEFOyIM2.js";import u from"node:fs";import d from"node:os";import f from"node:path";import{execFileSync as p}from"node:child_process";function m(e,t){let n=f.dirname(e);u.mkdirSync(n,{recursive:!0});let r=u.mkdtempSync(f.join(n,`.${f.basename(e)}.tmp-`)),i=f.join(r,`next`),a=f.join(r,`prev`);u.mkdirSync(i,{recursive:!0});let o=!1;try{t(i),u.existsSync(e)&&(u.renameSync(e,a),o=!0),u.renameSync(i,e)}catch(t){throw o&&!u.existsSync(e)&&u.renameSync(a,e),t}finally{u.rmSync(r,{recursive:!0,force:!0})}}const h=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu,g=/^([\w.-]+)\/([\w.-]+)(?:\/(.+))?$/u;function _(e){return e===`~`?d.homedir():e.startsWith(`~/`)||e.startsWith(`~\\`)?f.join(d.homedir(),e.slice(2)):e}function v(e){return e.startsWith(`./`)||e.startsWith(`../`)||e.startsWith(`/`)||e.startsWith(`~`)||e.startsWith(`.\\`)||/^[a-zA-Z]:[\\/]/u.test(e)}function y(e){let t=/^https?:\/\/github\.com\/([\w.-]+)\/([\w.-]+?)(?:\.git)?(?:\/tree\/([^/]+)(?:\/(.+))?)?\/?$/u.exec(e);return t?{type:`github`,owner:t[1],repo:t[2],gitRef:t[3],subpath:t[4],url:`https://github.com/${t[1]}/${t[2]}`}:null}function b(e){let t=e.trim();if(v(t))return{type:`local`,path:f.resolve(_(t))};if(t.startsWith(`ed:`)){let e=t.slice(3);return{type:`entrydesk`,ref:e,isId:h.test(e)}}if(h.test(t))return{type:`entrydesk`,ref:t,isId:!0};if(t.startsWith(`git@`)||t.endsWith(`.git`))return{type:`git`,url:t};let n=y(t);if(n)return n;if(/^https?:\/\//u.test(t))return{type:`git`,url:t};let r=g.exec(t);return r?{type:`github`,owner:r[1],repo:r[2],subpath:r[3],url:`https://github.com/${r[1]}/${r[2]}`}:{type:`entrydesk`,ref:t,isId:!1}}function x(e){return e.type===`github`?`github`:e.type}const S=new Set([`.git`,`node_modules`,`__pycache__`,`.DS_Store`,`.entrydesk`]);function C(e,t){if(!u.existsSync(f.join(e,`SKILL.md`)))throw Error(`No SKILL.md found at ${e}`);let n=u.realpathSync(e);if(n===(u.existsSync(t)?u.realpathSync(t):f.resolve(t)))return;let r=u.mkdtempSync(f.join(d.tmpdir(),`ed-local-skill-`)),i=f.join(r,`skill`);try{u.cpSync(n,i,{recursive:!0,filter:e=>!S.has(f.basename(e))}),m(t,e=>{u.cpSync(i,e,{recursive:!0})})}finally{u.rmSync(r,{recursive:!0,force:!0})}}function w(e){try{let t=u.readFileSync(f.join(e,`SKILL.md`),`utf8`),n=/^name:\s*(.+?)\s*$/mu.exec(t.split(/^---\s*$/mu)[1]??``);if(n?.[1])return n[1].replace(/^['"]|['"]$/gu,``)}catch{}return f.basename(e)}async function T(e,t){let{default:n}=await import(`adm-zip`),r=new n(e);m(t,e=>{let t=f.resolve(e)+f.sep;for(let n of r.getEntries()){if(n.isDirectory)continue;let r=f.resolve(e,n.entryName);if(!r.startsWith(t))throw Error(`Zip entry contains path traversal: ${n.entryName}`);u.mkdirSync(f.dirname(r),{recursive:!0}),u.writeFileSync(r,n.getData())}})}async function E(e,t){if(t.isId)return t.ref;let n=(await l(e.client,e.accessToken,e.workspaceId)).find(e=>e.name===t.ref||e.id===t.ref);if(!n)throw Error(`Skill not found in workspace: ${t.ref}`);return n.id}function D(e,t,n){let r=u.mkdtempSync(f.join(d.tmpdir(),`ed-npx-skills-`)),i=[`-y`,`skills@1.5.12`,`add`,e,`--copy`,`--yes`];try{p(`npx`,i,{cwd:r,stdio:n?[`ignore`,`pipe`,`pipe`]:`inherit`})}catch(t){throw u.rmSync(r,{recursive:!0,force:!0}),Error(`npx skills failed for ${e}. Ensure npx + network are available. (${t instanceof Error?t.message:String(t)})`,{cause:t})}let a=f.join(r,`.agents`,`skills`);if(!u.existsSync(a))throw u.rmSync(r,{recursive:!0,force:!0}),Error(`npx skills produced no skills under ${a}`);let o=u.readdirSync(a,{withFileTypes:!0}).filter(e=>e.isDirectory());if(o.length===0)throw u.rmSync(r,{recursive:!0,force:!0}),Error(`npx skills installed no skill directory`);let s=o[0];if(o.length>1){let e=t.type===`github`&&t.subpath?f.basename(t.subpath):void 0,n=e?o.find(t=>t.name===e):void 0;if(!n)throw u.rmSync(r,{recursive:!0,force:!0}),Error(`npx skills installed [${o.map(e=>e.name).join(`, `)}]; ${e?`none matched the subpath "${e}"`:`specify a subpath to pick one`}.`);s=n}return{dir:f.join(a,s.name),tmpRoot:r}}async function O(l,d,f){let p=b(l),m=!!d.global,h=a(m,f.workspaceId),g=h.rootDir,_={...f,workspaceId:h.workspaceId};if(!h.linked){let n={workspaceId:f.workspaceId,apiUrl:e()};r(),m?o(n):t(process.cwd(),n)}let v,y,S;if(p.type===`entrydesk`){y=await E(_,p);let e=await _.client.downloadSkillCurrent(_.accessToken,_.workspaceId,y);v=e.name,S=i(g,v);let t=await fetch(e.url);if(!t.ok)throw Error(`Failed to download ${v}: ${t.status}`);await T(Buffer.from(await t.arrayBuffer()),S)}else if(p.type===`local`)v=w(p.path),S=i(g,v),C(p.path,S);else{let{dir:e,tmpRoot:t}=D(l,p,!!d.json);try{v=w(e),S=i(g,v),C(e,S)}finally{u.rmSync(t,{recursive:!0,force:!0})}}let O=s(S),k={source:l,sourceType:x(p),skillId:y,localHash:O,lastPulledHash:p.type===`entrydesk`?O:``,mode:`symlink`,...p.type===`github`?{sourceUrl:p.url,ref:p.gitRef,subpath:p.subpath}:{},...p.type===`git`?{sourceUrl:p.url}:{}};n(g,v,k);let A=c(S,v,g,`symlink`,d.agent);d.json?console.info(JSON.stringify({name:v,sourceType:x(p),hash:O},null,2)):console.info(`✓ added ${v} (${p.type}, ${O.slice(0,12)}) → agents: ${A.map(e=>e.agentId).join(`, `)}`)}export{O as runSkillsAdd};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{Y as e,b as t,ct as n,dt as r,ft as i,j as a,l as o}from"./profile-storage-CsigYr0Q.js";function s(e){return e?i([...new Set(e)]):n}function c(e){console.log(`Available agents (${e.length}):\n`);for(let t of e){if(console.log(` ${t.name} (${t.visibility})`),t.description){let e=t.description.length>80?`${t.description.slice(0,80)}…`:t.description;console.log(` ${e}`)}console.log(` ID: ${t.id}`),console.log(``)}}function l(e){console.log(`My agents (${e.length}):\n`);for(let t of e){let e=[];t.latestVersionNumber!=null&&e.push(`v${t.latestVersionNumber}`),t.hasUnpublishedChanges&&e.push(`unpublished changes`);let n=e.length>0?` (${e.join(` · `)})`:``;if(console.log(` ${t.name}${n}`),t.description){let e=t.description.length>80?`${t.description.slice(0,80)}…`:t.description;console.log(` ${e}`)}console.log(` ${t.myRole??`no-role`} · ID: ${t.id}`),console.log(``)}}function u(t){if(console.log(`${t.name}\n`),console.log(` ID: ${t.id}`),t.visibility&&console.log(` Visibility: ${t.visibility}`),t.model&&console.log(` Model: ${t.model.name}`),t.author&&console.log(` Author: ${t.author.name}${t.author.isMe?` (you)`:``}`),t.description&&console.log(` Description: ${t.description}`),t.capabilities){let n=r(t.capabilities).map(t=>e(t));n.length>0&&console.log(` Capabilities: ${n.join(`, `)}`)}t.connectors&&t.connectors.length>0&&console.log(` Connectors: ${t.connectors.map(e=>e.name).join(`, `)}`),t.tools&&t.tools.length>0&&console.log(` Tools: ${t.tools.length}`),t.conversationStarters&&t.conversationStarters.length>0&&console.log(` Starters: ${t.conversationStarters.length}`),t.systemPrompt&&console.log(`\n System prompt:\n${t.systemPrompt}`)}function d(e){let t=a(e);if(console.log(`User grants (${t.length}):`),t.length===0){console.log(` (none)`);return}for(let e of t)console.log(` - ${e.user.name} <${e.user.email}> · ${e.role}`),console.log(` ID: ${e.userId}`)}async function f(e){let{accessToken:n,workspaceId:r}=await o(),i=new t;if(e.mine){let t=[],a=e.all?void 0:e.nextKey;for(let o=0;;o++){o>=100&&(console.error(`Reached maximum page limit (100). Use --limit and --next-key for manual pagination.`),process.exit(1));let s=await i.getMyAgents(n,r,{limit:e.limit,nextKey:a});if(t.push(...s.agents),a=s.nextKey,!e.all||!a)break}if(e.json){console.log(JSON.stringify({agents:t,nextKey:a}));return}if(t.length===0){console.log("You own no agents in this workspace. Create one with `entrydesk agents create --name <name> …`, or browse `entrydesk marketplace`.");return}l(t),!e.all&&a&&console.log(`Next page: --next-key ${a}`);return}if(e.all){let t=[],a;for(let o=0;;o++){o>=100&&(console.error(`Reached maximum page limit (100). Use --limit and --next-key for manual pagination.`),process.exit(1));let s=await i.getAgents(n,r,{limit:e.limit??100,nextKey:a});if(t.push(...s.agents),a=s.nextKey,!a)break}if(e.json){console.log(JSON.stringify({agents:t}));return}if(t.length===0){console.log("No agents in this workspace yet. Create one with `entrydesk agents create`, or browse `entrydesk marketplace`.");return}c(t);return}let{agents:a,nextKey:s}=await i.getAgents(n,r,{limit:e.limit,nextKey:e.nextKey});if(e.json){console.log(JSON.stringify({agents:a,nextKey:s}));return}if(a.length===0){console.log("No agents in this workspace yet. Create one with `entrydesk agents create`, or browse `entrydesk marketplace`.");return}c(a),s&&console.log(`Next page: --next-key ${s}`)}async function p(e,n){let{accessToken:r,workspaceId:i}=await o(),a=await new t().getAgent(r,i,e);if(n.json){console.log(JSON.stringify(a));return}u(a)}async function m(e){let{accessToken:n,workspaceId:r}=await o(),i=await new t().createAgent(n,r,{name:e.name,description:e.description,systemPrompt:e.systemPrompt,modelId:e.modelId,connectorIds:e.connectorIds??[],capabilities:s(e.capabilities),conversationStarters:e.conversationStarters??[],tools:e.tools,iconId:e.iconId});if(e.json){console.log(JSON.stringify(i));return}console.log(`Created agent: ${i.name}`),console.log(` ID: ${i.id}`)}async function h(e,n){let{accessToken:r,workspaceId:i}=await o(),a=new t,c=await a.getAgent(r,i,e),l={name:n.name??c.name,description:n.description??c.description,systemPrompt:n.systemPrompt??c.systemPrompt??``,modelId:n.modelId??c.model?.id??``,connectorIds:n.connectorIds??c.connectors?.map(e=>e.id)??[],capabilities:n.capabilities?s(n.capabilities):c.capabilities??{},conversationStarters:n.conversationStarters??c.conversationStarters??[],tools:n.tools??c.tools??[],iconId:n.iconId??c.iconId};await a.updateAgent(r,i,e,l),console.log(`Updated agent: ${e}`)}async function g(e){let{accessToken:n,workspaceId:r}=await o();await new t().deleteAgent(n,r,e),console.log(`Deleted agent: ${e}`)}async function _(e,n){let{accessToken:r,workspaceId:i}=await o();if(await new t().publishAgent(r,i,e),n.json){console.log(JSON.stringify({id:e,published:!0}));return}console.log(`Published agent to the workspace: ${e}`)}async function v(e,n){let{accessToken:r,workspaceId:i}=await o(),a=new t;if(n.addUser){let t=await a.upsertAgentGrant(r,i,e,n.addUser,n.role);if(n.json){console.log(JSON.stringify(t));return}console.log(`Granted ${n.role} to user ${n.addUser}`);return}if(n.removeUser){if(await a.removeAgentGrant(r,i,e,n.removeUser),n.json){console.log(JSON.stringify({userId:n.removeUser,removed:!0}));return}console.log(`Revoked access for user ${n.removeUser}`);return}let s=await a.getAgentGrants(r,i,e);if(n.json){console.log(JSON.stringify(s));return}d(s)}export{m as createAgent,g as deleteAgent,f as listAgents,_ as publishAgent,v as shareAgent,p as showAgent,h as updateAgent};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{b as e,l as t,v as n}from"./profile-storage-mtd3aKrx.js";function r(e){return`$${e.toFixed(2)}`}function i(e){if(console.log(`Billing status: ${e.lifecycle.kind}`),e.subscription){let t=e.subscription,n=t.nextInvoiceDueAt?` · next invoice ${new Date(t.nextInvoiceDueAt).toLocaleDateString()}`:``;console.log(` Plan: ${t.planName} · ~${r(t.estimatedMonthlyChargeUsd)}/month${n}`)}else console.log(` Plan: (no active subscription)`);let t=e.seats;console.log(` Seats: pro ${t.assigned.pro}/${t.purchased.pro}, premium ${t.assigned.premium}/${t.purchased.premium} (assigned/purchased)`);let n=e.extraUsage;console.log(` Balance: ${r(n.balanceUsd)} extra usage`),console.log(` Spent: ${r(n.currentSpentUsd)} this period`),n.monthlyExtraUsageLimitUsd!=null&&console.log(` Limit: ${r(n.monthlyExtraUsageLimitUsd)} / month`)}function a(e){console.log(`Invoices (${e.length}):\n`);for(let t of e){let e=new Date(t.billingDate).toLocaleDateString();console.log(` ${e} · ${t.type} · ${t.status} · ${r(t.totalUsd)}`),t.hostedInvoiceUrl&&console.log(` ${t.hostedInvoiceUrl}`),console.log(` ID: ${t.id}`),console.log(``)}}async function o(){return n()&&(console.error("Billing requires an interactive login. A workspace PAT (ENTRYDESK_TOKEN) cannot read billing — run `entrydesk login`."),process.exit(1)),t()}async function s(t){let{accessToken:n,workspaceId:r}=await o(),a=await new e().getBillingOverview(n,r);if(t.json){console.log(JSON.stringify(a));return}i(a)}async function c(t){let{accessToken:n,workspaceId:r}=await o(),i=new e;if(t.all){let e=[],o;for(let a=0;;a++){a>=100&&(console.error(`Reached maximum page limit (100). Use --limit and --next-key for manual pagination.`),process.exit(1));let s=await i.getBillingInvoices(n,r,{limit:t.limit??20,nextKey:o});if(e.push(...s.invoices),o=s.nextKey,!o)break}if(t.json){console.log(JSON.stringify({invoices:e}));return}if(e.length===0){console.log(`No invoices.`);return}a(e);return}let{invoices:s,nextKey:c}=await i.getBillingInvoices(n,r,{limit:t.limit,nextKey:t.nextKey});if(t.json){console.log(JSON.stringify({invoices:s,nextKey:c}));return}if(s.length===0){console.log(`No invoices.`);return}a(s),c&&console.log(`Next page: --next-key ${c}`)}export{c as listInvoices,s as showBillingStatus};
2
+ import{b as e,l as t,v as n}from"./profile-storage-CsigYr0Q.js";function r(e){return`$${e.toFixed(2)}`}function i(e){if(console.log(`Billing status: ${e.lifecycle.kind}`),e.subscription){let t=e.subscription,n=t.nextInvoiceDueAt?` · next invoice ${new Date(t.nextInvoiceDueAt).toLocaleDateString()}`:``;console.log(` Plan: ${t.planName} · ~${r(t.estimatedMonthlyChargeUsd)}/month${n}`)}else console.log(` Plan: (no active subscription)`);let t=e.seats;console.log(` Seats: pro ${t.assigned.pro}/${t.purchased.pro}, premium ${t.assigned.premium}/${t.purchased.premium} (assigned/purchased)`);let n=e.extraUsage;console.log(` Balance: ${r(n.balanceUsd)} extra usage`),console.log(` Spent: ${r(n.currentSpentUsd)} this period`),n.monthlyExtraUsageLimitUsd!=null&&console.log(` Limit: ${r(n.monthlyExtraUsageLimitUsd)} / month`)}function a(e){console.log(`Invoices (${e.length}):\n`);for(let t of e){let e=new Date(t.billingDate).toLocaleDateString();console.log(` ${e} · ${t.type} · ${t.status} · ${r(t.totalUsd)}`),t.hostedInvoiceUrl&&console.log(` ${t.hostedInvoiceUrl}`),console.log(` ID: ${t.id}`),console.log(``)}}async function o(){return n()&&(console.error("Billing requires an interactive login. A workspace PAT (ENTRYDESK_TOKEN) cannot read billing — run `entrydesk login`."),process.exit(1)),t()}async function s(t){let{accessToken:n,workspaceId:r}=await o(),a=await new e().getBillingOverview(n,r);if(t.json){console.log(JSON.stringify(a));return}i(a)}async function c(t){let{accessToken:n,workspaceId:r}=await o(),i=new e;if(t.all){let e=[],o;for(let a=0;;a++){a>=100&&(console.error(`Reached maximum page limit (100). Use --limit and --next-key for manual pagination.`),process.exit(1));let s=await i.getBillingInvoices(n,r,{limit:t.limit??20,nextKey:o});if(e.push(...s.invoices),o=s.nextKey,!o)break}if(t.json){console.log(JSON.stringify({invoices:e}));return}if(e.length===0){console.log(`No invoices.`);return}a(e);return}let{invoices:s,nextKey:c}=await i.getBillingInvoices(n,r,{limit:t.limit,nextKey:t.nextKey});if(t.json){console.log(JSON.stringify({invoices:s,nextKey:c}));return}if(s.length===0){console.log(`No invoices.`);return}a(s),c&&console.log(`Next page: --next-key ${c}`)}export{c as listInvoices,s as showBillingStatus};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{b as e,l as t}from"./profile-storage-mtd3aKrx.js";async function n(n){let{accessToken:r,workspaceId:i}=await t(),a=await new e().getBudget(r,i);if(n.json){console.log(JSON.stringify(a));return}if(a.budget===null){console.log(`No budget set for this workspace.`);return}console.log(`Current workspace budget: $${a.budget}`)}async function r(n,r){let{accessToken:i,workspaceId:a}=await t(),o=new e;if(await o.updateBudget(i,a,n),r.json){console.log(JSON.stringify(await o.getBudget(i,a)));return}console.log(`Budget updated: $${n}`)}async function i(n){let{accessToken:r,workspaceId:i}=await t(),a=new e;if(await a.updateBudget(r,i,null),n.json){console.log(JSON.stringify(await a.getBudget(r,i)));return}console.log(`Budget cleared.`)}export{i as clearBudget,r as setBudget,n as showBudget};
2
+ import{b as e,l as t}from"./profile-storage-CsigYr0Q.js";async function n(n){let{accessToken:r,workspaceId:i}=await t(),a=await new e().getBudget(r,i);if(n.json){console.log(JSON.stringify(a));return}if(a.budget===null){console.log(`No budget set for this workspace.`);return}console.log(`Current workspace budget: $${a.budget}`)}async function r(n,r){let{accessToken:i,workspaceId:a}=await t(),o=new e;if(await o.updateBudget(i,a,n),r.json){console.log(JSON.stringify(await o.getBudget(i,a)));return}console.log(`Budget updated: $${n}`)}async function i(n){let{accessToken:r,workspaceId:i}=await t(),a=new e;if(await a.updateBudget(r,i,null),n.json){console.log(JSON.stringify(await a.getBudget(r,i)));return}console.log(`Budget cleared.`)}export{i as clearBudget,r as setBudget,n as showBudget};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{X as e,Z as t}from"./profile-storage-CsigYr0Q.js";function n({allowedTools:n,disallowedTools:r}){if(!(!n?.length&&!r?.length))return[...t(n?.map(t=>({toolName:t,policy:e.ALWAYS_ALLOW})),r?.map(t=>({toolName:t,policy:e.BLOCK})))].map(([e,t])=>({toolName:e,policy:t}))}function r({agentId:e,model:t,connectorIds:n,clientTools:r,clientToolSystemPrompt:i,toolApprovalMode:a,toolPolicies:o}){return{...e?{agentId:e}:{...t?{model:t}:{},...n?.length?{connectorIds:n}:{}},...r?{clientTools:r}:{},...i?{clientToolSystemPrompt:i}:{},...a?{toolApprovalMode:a}:{},...o?.length?{toolPolicies:o}:{}}}export{n,r as t};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{r as e}from"./commands-DCchuLQ9.js";export{e as runSkillsUnlink};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{C as e}from"./profile-storage-mtd3aKrx.js";import{a as t,c as n,d as r,h as i,i as a,l as o,n as s,o as c,p as l,r as u,s as d,u as f}from"./paths-BAZ2NsXN.js";import{t as p}from"./hash-Ddmw8YE4.js";import{r as m}from"./installer-iaoPJQn3.js";import h from"node:path";import g from"node:fs/promises";const _=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu;function v(t,n,i){let o=t&&_.test(t)?t:i.workspaceId,s={workspaceId:o,apiUrl:e()};if(a(),n.global)f(s),console.info(`Linked ${c()} → workspace ${o}`);else{let e=process.cwd();r(e,s),console.info(`Linked ${d(e)} → workspace ${o}`)}}function y(e){if(e.global){n()?console.info(`Unlinked ${c()}`):console.info(`No global link found.`);return}let r=t(process.cwd());r&&o(r)?console.info(`Unlinked ${d(r)}`):console.info(`No project link found.`)}async function b(e,t,n,r,a){let o=n.skillId;if(!o){let{skills:t}=await e.client.listAvailableSkills(e.accessToken,e.workspaceId),r=t.find(e=>e.name===n.name);if(!r)throw Error(`Skill not found in workspace: ${n.name}`);o=r.id}let{url:c,name:l}=await e.client.downloadSkillCurrent(e.accessToken,e.workspaceId,o),u=await fetch(c);if(!u.ok)throw Error(`Failed to download ${l}: ${u.status}`);let d=Buffer.from(await u.arrayBuffer()),f=s(t,l);await g.rm(f,{recursive:!0,force:!0}),await g.mkdir(f,{recursive:!0});let{default:_}=await import(`adm-zip`),v=h.resolve(f)+h.sep;for(let e of new _(d).getEntries()){if(e.isDirectory)continue;let t=h.resolve(f,e.entryName);if(!t.startsWith(v))throw Error(`Zip entry contains path traversal: ${e.entryName}`);await g.mkdir(h.dirname(t),{recursive:!0}),await g.writeFile(t,e.getData())}let y=p(f);i(t,l,{source:o,sourceType:`entrydesk`,skillId:o,localHash:y,lastPulledHash:y,mode:`symlink`});let b=m(f,l,t,`symlink`,a);return r||console.info(`✓ pulled ${l} (${y.slice(0,12)}) → agents: ${b.map(e=>e.agentId).join(`, `)}`),{name:l,hash:y}}async function x(e,t,n){let{rootDir:r,workspaceId:i}=u(!!t.global,n.workspaceId),a={...n,workspaceId:i},o=!!t.json,s=[];if(e)s.push(_.test(e)?{skillId:e}:{name:e});else{let e=l(r).skills;for(let[t,n]of Object.entries(e))s.push({skillId:n.skillId,name:t});if(s.length===0){console.info(`Nothing to pull — no tracked skills. Try: entrydesk skills pull <name>`);return}}let c=[];for(let e of s)c.push(await b(a,r,e,o,t.agent));o&&console.info(JSON.stringify(c,null,2))}export{x as n,y as r,v as t};
2
+ import{C as e}from"./profile-storage-CsigYr0Q.js";import{a as t,c as n,d as r,h as i,i as a,l as o,n as s,o as c,p as l,r as u,s as d,u as f}from"./paths-B_0RLzm4.js";import{t as p}from"./hash-Ddmw8YE4.js";import{r as m}from"./installer-iaoPJQn3.js";import h from"node:path";import g from"node:fs/promises";const _=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu;function v(t,n,i){let o=t&&_.test(t)?t:i.workspaceId,s={workspaceId:o,apiUrl:e()};if(a(),n.global)f(s),console.info(`Linked ${c()} → workspace ${o}`);else{let e=process.cwd();r(e,s),console.info(`Linked ${d(e)} → workspace ${o}`)}}function y(e){if(e.global){n()?console.info(`Unlinked ${c()}`):console.info(`No global link found.`);return}let r=t(process.cwd());r&&o(r)?console.info(`Unlinked ${d(r)}`):console.info(`No project link found.`)}async function b(e,t,n,r,a){let o=n.skillId;if(!o){let{skills:t}=await e.client.listAvailableSkills(e.accessToken,e.workspaceId),r=t.find(e=>e.name===n.name);if(!r)throw Error(`Skill not found in workspace: ${n.name}`);o=r.id}let{url:c,name:l}=await e.client.downloadSkillCurrent(e.accessToken,e.workspaceId,o),u=await fetch(c);if(!u.ok)throw Error(`Failed to download ${l}: ${u.status}`);let d=Buffer.from(await u.arrayBuffer()),f=s(t,l);await g.rm(f,{recursive:!0,force:!0}),await g.mkdir(f,{recursive:!0});let{default:_}=await import(`adm-zip`),v=h.resolve(f)+h.sep;for(let e of new _(d).getEntries()){if(e.isDirectory)continue;let t=h.resolve(f,e.entryName);if(!t.startsWith(v))throw Error(`Zip entry contains path traversal: ${e.entryName}`);await g.mkdir(h.dirname(t),{recursive:!0}),await g.writeFile(t,e.getData())}let y=p(f);i(t,l,{source:o,sourceType:`entrydesk`,skillId:o,localHash:y,lastPulledHash:y,mode:`symlink`});let b=m(f,l,t,`symlink`,a);return r||console.info(`✓ pulled ${l} (${y.slice(0,12)}) → agents: ${b.map(e=>e.agentId).join(`, `)}`),{name:l,hash:y}}async function x(e,t,n){let{rootDir:r,workspaceId:i}=u(!!t.global,n.workspaceId),a={...n,workspaceId:i},o=!!t.json,s=[];if(e)s.push(_.test(e)?{skillId:e}:{name:e});else{let e=l(r).skills;for(let[t,n]of Object.entries(e))s.push({skillId:n.skillId,name:t});if(s.length===0){console.info(`Nothing to pull — no tracked skills. Try: entrydesk skills pull <name>`);return}}let c=[];for(let e of s)c.push(await b(a,r,e,o,t.agent));o&&console.info(JSON.stringify(c,null,2))}export{x as n,y as r,v as t};
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{D as e,O as t,t as n}from"./profile-storage-mtd3aKrx.js";function r(e){try{let{pathname:t}=new URL(e);return t.replace(/\/+$/u,``).endsWith(`/api`)}catch{return!1}}function i(r){let i=t.getAll();if(r.json){console.log(JSON.stringify(i));return}let a=Object.entries(i);if(console.log(`Profile: ${n.getEffectiveProfileName()}`),a.length===0){console.log(`No configuration set.`),console.log(`Available keys: ${e.join(`, `)}`);return}console.log(`Configuration:
2
+ import{D as e,O as t,t as n}from"./profile-storage-CsigYr0Q.js";function r(e){try{let{pathname:t}=new URL(e);return t.replace(/\/+$/u,``).endsWith(`/api`)}catch{return!1}}function i(r){let i=t.getAll();if(r.json){console.log(JSON.stringify(i));return}let a=Object.entries(i);if(console.log(`Profile: ${n.getEffectiveProfileName()}`),a.length===0){console.log(`No configuration set.`),console.log(`Available keys: ${e.join(`, `)}`);return}console.log(`Configuration:
3
3
  `);for(let[e,t]of a)console.log(` ${e}=${t}`);console.log(`\nAvailable keys: ${e.join(`, `)}`)}function a(e,n){let r=t.get(e);n.json?console.log(JSON.stringify({[e]:r??null})):console.log(r||`Not set`)}function o(e,i){t.set(e,i),console.log(`Set ${e}=${i}`),console.error(`(profile: ${n.getEffectiveProfileName()})`),e===`apiUrl`&&r(i)&&console.error(`Warning: ${i} looks like a web app's "/api" browser proxy path. Such proxies usually strip the Authorization header, so CLI requests will fail with 401 missing_token — prefer the API server's own URL unless you know this proxy forwards Authorization.`)}function s(e){t.unset(e),console.log(`Unset ${e}`),console.error(`(profile: ${n.getEffectiveProfileName()})`)}export{a as getConfigValue,i as listConfig,o as setConfigValue,s as unsetConfigValue};
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import{H as e,U as t,b as n,l as r,st as i}from"./profile-storage-CsigYr0Q.js";import{n as a}from"./custom-connector-D5nYtPdy.js";import{t as o}from"./confirm-BrJZbaxf.js";function s(t,n){return n?e(n)?`Next: entrydesk connectors connect ${t} --oauth`:n===`credentials`?`Next: entrydesk connectors connect ${t} --username <username> --password <password>`:`Next: entrydesk connectors connect ${t} --token <token>`:`This connector needs no authorization — there is no connect step.`}async function c(e){let{accessToken:t,workspaceId:i}=await r(),{connectors:a,nextKey:o}=await new n().getConnectors(t,i,{connectionStatus:e.all?`all`:`connected`,search:e.search,limit:e.limit,nextKey:e.nextKey});if(e.json){console.log(JSON.stringify({connectors:a,nextKey:o}));return}if(a.length===0){console.log(e.all?`No connectors found.`:`No connected connectors. Use --all to browse connectable ones.`);return}let s=e.all?`Connectors`:`Connected connectors`;console.log(`${s} (${a.length}):\n`);for(let e of a){let t=e.connected?`connected`:`not connected`;console.log(` ${e.name} (${t})`),console.log(` Provider: ${e.provider}`),console.log(` ID: ${e.id}`),e.authorization?.type&&console.log(` Auth: ${e.authorization.type}`),console.log(``)}o&&console.log(`More results: --next-key ${o}`)}async function l(e,t){let{accessToken:i,workspaceId:a}=await r(),{tools:o}=await new n().getConnectorTools(i,a,e);if(t.json){console.log(JSON.stringify({tools:o}));return}if(o.length===0){console.log(`This connector exposes no tools.`);return}console.log(`Tools (${o.length}):\n`);for(let e of o)console.log(` ${e.name} [${e.policy}]`),e.description&&console.log(` ${e.description}`)}async function u(e,t){let{accessToken:i,workspaceId:a}=await r(),o=new n;if(t.oauth){let{url:n}=await o.getConnectorAuthUrl(i,a,e);if(t.json){console.log(JSON.stringify({url:n}));return}console.log(`Open this URL in your browser to authorize the connector:`),console.log(` ${n}`),console.log(`
3
+ After you approve, the connection is saved automatically — re-run`),console.log("`entrydesk connectors` to confirm it shows as connected.");return}let s;t.token?s={token:t.token}:t.username&&t.password?s={username:t.username,password:t.password}:(console.error(`Provide --token, or --username and --password, or --oauth to connect.`),process.exit(1)),await o.connectConnectorToken(i,a,e,s),console.log(t.json?JSON.stringify({id:e,connected:!0}):`Connected connector ${e}.`)}async function d(e){let o=e.auth===`oauth`||e.auth===`google-iap`;o&&(!e.provider||!e.scope?.length)&&(console.error(`--auth ${e.auth} needs --provider and at least one --scope.`),process.exit(1)),!o&&(e.provider||e.scope?.length)&&(console.error(e.auth?`--provider and --scope apply only to --auth oauth and --auth google-iap, not --auth ${e.auth}.`:`--provider and --scope need --auth oauth or --auth google-iap.`),process.exit(1));let c=e.toolPrefix??t(e.name),l=a(c);l&&(console.error(e.toolPrefix?`--tool-prefix ${l}.`:`The tool prefix derived from --name ("${c}") ${l}. Pass --tool-prefix explicitly.`),process.exit(1));let{accessToken:u,workspaceId:d}=await r(),f=e.auth?{type:e.auth,...e.provider?{provider:e.provider}:{},...e.scope?.length?{scopes:e.scope}:{}}:void 0,p=await new n().createCustomConnector(u,d,{type:i.CUSTOM_REMOTE_URL,name:e.name,description:e.description,transport:e.transport,url:e.url,toolPrefix:c,...f?{authorization:f}:{}});if(e.json){console.log(JSON.stringify(p));return}console.log(`Created connector ${p.name}.`),console.log(` ID: ${p.id}`),console.log(` URL: ${p.url}`),console.log(` Tool prefix: ${p.toolPrefix}`),console.log(`\n${s(p.id,e.auth)}`)}async function f(e,t){let{accessToken:i,workspaceId:a}=await r();if(!t.yes&&(process.stdin.isTTY||(console.error(`Disconnecting connector ${e} needs confirmation. Re-run with --yes.`),process.exit(1)),!await o(`Disconnect connector ${e}?`))){console.log(`Aborted.`);return}await new n().disconnectConnector(i,a,e),console.log(t.json?JSON.stringify({id:e,disconnected:!0}):`Disconnected connector ${e}.`)}export{u as connectConnector,d as createConnector,f as disconnectConnector,l as listConnectorTools,c as listConnectors};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{R as e,z as t}from"./profile-storage-CsigYr0Q.js";function n(t){if(t.length===0)return`must not be empty`;if(t.length>50)return`must be at most 50 characters`;if(!e.test(t))return`must use only letters, digits and spaces`;if(/\s{2,}/u.test(t))return`must not contain consecutive spaces`;if(t.trim()!==t)return`must not start or end with whitespace`}function r(e){if(e.length===0)return`must not be empty`;if(e.length>20)return`must be at most 20 characters`;if(!t.test(e))return`must use only lowercase letters, digits, hyphen and underscore`;if(/__+/u.test(e))return`must not contain consecutive underscores`}export{r as n,n as t};
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
- import{$ as e,D as t,F as n,I as r,L as i,M as ee,N as te,Q as a,X as o,Y as ne,a as re,t as s,w as ie}from"./profile-storage-mtd3aKrx.js";import{t as ae}from"./version-Cos6L15W.js";import{Argument as oe,Command as c,InvalidArgumentError as l,Option as u}from"@commander-js/extra-typings";function d(e){if(!/^[+-]?\d+$/u.test(e.trim()))throw new l(`must be an integer`);return Number.parseInt(e,10)}function f(e,t){return n=>{let r=d(n);if(r<e||r>t)throw new l(`must be an integer between ${e} and ${t}`);return r}}function p(e){return t=>{if(t.length>e)throw new l(`must be at most ${e} characters`);return t}}function m(e){let t=e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0);if(t.length===0)throw new l(`must list at least one value`);return t}function h(e,t){let n=f(e,t);return e=>m(e).map(n)}function g(e,t=[]){return[...t,e]}const _=new Map([[`web`,a.WEB_SEARCH],[`image`,a.CREATION],[`image-gen`,a.CREATION],[`image_generation`,a.CREATION]]);function v(t){return m(t).map(t=>{let n=t.replaceAll(`-`,`_`),r=_.get(t)??e.find(e=>e===n);if(!r)throw new l(`"${t}" is not one of: ${e.join(`, `)}`);return r})}function y(e){let t=/^(\d{1,2}):(\d{2})$/u.exec(e);if(!t)throw new l(`"${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 l(`"${e}" is not a valid time of day`);return{hour:n,minute:r}}function b(e){return m(e).map(y)}function se(e){return m(e).map(e=>{let[t,n]=e.split(`-`);if(!t||!n)throw new l(`"${e}" is not an HH:MM-HH:MM range`);return{start:y(t),end:y(n)}})}const x=`--profile <name>`;function S(e){return e.option(`--json`,`Output JSON for scripting`)}function C(e,t){return e.option(`--limit <number>`,`Max results per page (default: ${t})`,f(1,100)).option(`--next-key <cursor>`,`Fetch the next page using this cursor`)}function w(e,t){return C(e,t).addOption(new u(`--all`,`Fetch every page (auto-paginate)`).conflicts(`nextKey`))}function T(e){return e.addOption(new u(`--add-user <userId>`,`Grant a user access`).conflicts(`removeUser`)).option(`--remove-user <userId>`,`Revoke a user's access`)}function E(e){return T(e).addOption(new u(`--role <role>`,`Role for --add-user`).choices(o.options).default(o.enum.viewer))}const D={chat:`Chat & Tasks:`,build:`Build:`,workspace:`Workspace:`,setup:`Setup:`};function ce(){return new c().name(`entrydesk`).description(`EntryDesk CLI — interact with EntryDesk from your terminal`).option(`--json`,`Output JSON for scripting (most commands support it)`).option(x,`Use a specific profile for this command`).version(`entrydesk ${ae()}`,`-v, --version`,`Show the version number`).showHelpAfterError("(run `entrydesk --help` to see the command list)").configureHelp({showGlobalOptions:!0}).addHelpText(`after`,`
2
+ import{$ as e,B as t,D as n,F as r,I as i,L as a,M as o,N as s,V as c,a as l,at as ee,lt as u,ot as d,t as f,ut as p,w as m}from"./profile-storage-CsigYr0Q.js";import{n as te,t as ne}from"./custom-connector-D5nYtPdy.js";import{t as re}from"./version-Db_lMuAl.js";import{Argument as ie,Command as ae,InvalidArgumentError as h,Option as g}from"@commander-js/extra-typings";function _(e){if(!/^[+-]?\d+$/u.test(e.trim()))throw new h(`must be an integer`);return Number.parseInt(e,10)}function v(e,t){return n=>{let r=_(n);if(r<e||r>t)throw new h(`must be an integer between ${e} and ${t}`);return r}}function y(e){return t=>{if(t.length>e)throw new h(`must be at most ${e} characters`);return t}}function b(e){let t=ne(e);if(t)throw new h(t);return e}function x(e){let t=te(e);if(t)throw new h(t);return e}function S(e){let t=e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0);if(t.length===0)throw new h(`must list at least one value`);return t}function C(e,t){let n=v(e,t);return e=>S(e).map(n)}function oe(e,t=[]){return[...t,e]}const se=/[()*]/u;function w(e,t=[]){let n=e.split(/[\s,]+/u).filter(e=>e.length>0);if(n.length===0)throw new h(`must name at least one tool`);for(let e of n)if(se.test(e))throw new h(`"${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 ce=new Map([[`web`,u.WEB_SEARCH],[`image`,u.CREATION],[`image-gen`,u.CREATION],[`image_generation`,u.CREATION]]);function le(e){return S(e).map(e=>{let t=e.replaceAll(`-`,`_`),n=ce.get(e)??p.find(e=>e===t);if(!n)throw new h(`"${e}" is not one of: ${p.join(`, `)}`);return n})}function T(e){let t=/^(\d{1,2}):(\d{2})$/u.exec(e);if(!t)throw new h(`"${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 h(`"${e}" is not a valid time of day`);return{hour:n,minute:r}}function ue(e){return S(e).map(T)}function de(e){return S(e).map(e=>{let[t,n]=e.split(`-`);if(!t||!n)throw new h(`"${e}" is not an HH:MM-HH:MM range`);return{start:T(t),end:T(n)}})}const E=`--profile <name>`;function D(e){return e.option(`--json`,`Output JSON for scripting`)}function O(e,t){return e.option(`--limit <number>`,`Max results per page (default: ${t})`,v(1,100)).option(`--next-key <cursor>`,`Fetch the next page using this cursor`)}function k(e,t){return O(e,t).addOption(new g(`--all`,`Fetch every page (auto-paginate)`).conflicts(`nextKey`))}function A(e){return e.addOption(new g(`--add-user <userId>`,`Grant a user access`).conflicts(`removeUser`)).option(`--remove-user <userId>`,`Revoke a user's access`)}function j(e){return A(e).addOption(new g(`--role <role>`,`Role for --add-user`).choices(d.options).default(d.enum.viewer))}const M={chat:`Chat & Tasks:`,build:`Build:`,workspace:`Workspace:`,setup:`Setup:`};function N(){return new ae().name(`entrydesk`).description(`EntryDesk CLI — interact with EntryDesk from your terminal`).option(`--json`,`Output JSON for scripting (most commands support it)`).option(E,`Use a specific profile for this command`).version(`entrydesk ${re()}`,`-v, --version`,`Show the version number`).showHelpAfterError("(run `entrydesk --help` to see the command list)").configureHelp({showGlobalOptions:!0}).addHelpText(`after`,`
3
3
  Examples:
4
4
  entrydesk task -m "Summarize my open tasks" --model <model>
5
5
  entrydesk meeting transcript <recordingId> | entrydesk task -m "List action items"
6
6
  entrydesk agents list --mine --json
7
7
 
8
- Docs: https://entrydesk.com/docs/cli`)}function O(t){return t.option(`--connector-ids <ids>`,`Comma-separated connector ids`,m).option(`--capabilities <list>`,`Comma-separated capabilities (${e.join(`, `)})`,v).option(`--conversation-starters <list>`,`Comma-separated conversation starters`,m).option(`--tools <list>`,`Comma-separated tool names (prefix__tool)`,m).option(`--icon-id <iconId>`,`Icon to use`)}function k(e){let t=e.command(`agents`).summary(`List, show, create, publish, and share agents`).helpGroup(D.build);S(w(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--2Fw5-et.js`);await n(t.optsWithGlobals())}),S(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--2Fw5-et.js`);await r(e,n.optsWithGlobals())}),S(O(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--2Fw5-et.js`);await n(t.optsWithGlobals())}),S(O(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--2Fw5-et.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--2Fw5-et.js`);await t(e)}),S(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--2Fw5-et.js`);await r(e,n.optsWithGlobals())}),S(E(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--2Fw5-et.js`);await r(e,n.optsWithGlobals())})}function A(e){let t=e.command(`billing`).summary(`Show billing status and invoices`).helpGroup(D.workspace).addHelpText(`after`,`
8
+ Docs: https://entrydesk.com/docs/cli`)}function P(e){return e.option(`--connector-ids <ids>`,`Comma-separated connector ids`,S).option(`--capabilities <list>`,`Comma-separated capabilities (${p.join(`, `)})`,le).option(`--conversation-starters <list>`,`Comma-separated conversation starters`,S).option(`--tools <list>`,`Comma-separated tool names (prefix__tool)`,S).option(`--icon-id <iconId>`,`Icon to use`)}function F(e){let t=e.command(`agents`).summary(`List, show, create, publish, and share agents`).helpGroup(M.build);D(k(t.command(`list`,{isDefault:!0}).description(`List available agents`).option(`--me, --mine`,`List agents you own or edit, with their publish state`),100)).action(async(e,t)=>{let{listAgents:n}=await import(`./agents-CmqbjcOy.js`);await n(t.optsWithGlobals())}),D(t.command(`show`).description(`Show one agent's full details`).argument(`<agentId>`,`Agent to show`)).action(async(e,t,n)=>{let{showAgent:r}=await import(`./agents-CmqbjcOy.js`);await r(e,n.optsWithGlobals())}),D(P(t.command(`create`).description(`Create a new agent`).requiredOption(`--name <name>`,`Agent name`).requiredOption(`--description <text>`,`Short description`).requiredOption(`--system-prompt <text>`,`System prompt`).requiredOption(`--model-id <modelId>`,`Model to run the agent on`))).action(async(e,t)=>{let{createAgent:n}=await import(`./agents-CmqbjcOy.js`);await n(t.optsWithGlobals())}),D(P(t.command(`update`).description(`Update an agent you own`).argument(`<agentId>`,`Agent to update`).option(`--name <name>`,`Agent name`).option(`--description <text>`,`Short description`).option(`--system-prompt <text>`,`System prompt`).option(`--model-id <modelId>`,`Model to run the agent on`))).action(async(e,t,n)=>{let{updateAgent:r}=await import(`./agents-CmqbjcOy.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-CmqbjcOy.js`);await t(e)}),D(t.command(`publish`).description(`Publish an agent to the workspace`).argument(`<agentId>`,`Agent to publish`)).action(async(e,t,n)=>{let{publishAgent:r}=await import(`./agents-CmqbjcOy.js`);await r(e,n.optsWithGlobals())}),D(j(t.command(`share`).description(`Show or manage sharing (user grants)`).argument(`<agentId>`,`Agent to share`))).action(async(e,t,n)=>{let{shareAgent:r}=await import(`./agents-CmqbjcOy.js`);await r(e,n.optsWithGlobals())})}function I(e){let t=e.command(`billing`).summary(`Show billing status and invoices`).helpGroup(M.workspace).addHelpText(`after`,`
9
9
  Note: billing endpoints require an interactive login (OAuth); a workspace
10
- PAT (ENTRYDESK_TOKEN) cannot read billing.`);S(t.command(`status`,{isDefault:!0}).description(`Plan, seats, and extra-usage balance`)).action(async(e,t)=>{let{showBillingStatus:n}=await import(`./billing-B96487c6.js`);await n(t.optsWithGlobals())}),S(w(t.command(`invoices`).description(`List finalized invoices`),20)).action(async(e,t)=>{let{listInvoices:n}=await import(`./billing-B96487c6.js`);await n(t.optsWithGlobals())})}function j(e){if(!/^\d+(\.\d+)?$/u.test(e.trim()))throw new l(`must be a positive number`);return e}function M(e){let t=e.command(`budget`).summary(`View or manage the workspace budget`).helpGroup(D.workspace);S(t.command(`get`,{isDefault:!0}).description(`Show the current workspace budget`)).action(async(e,t)=>{let{showBudget:n}=await import(`./budget-DhX2gt5z.js`);await n(t.optsWithGlobals())}),S(t.command(`set`).description(`Set the workspace budget`).argument(`<amount>`,`Budget amount, e.g. 100.00`,j)).action(async(e,t,n)=>{let{setBudget:r}=await import(`./budget-DhX2gt5z.js`);await r(e,n.optsWithGlobals())}),S(t.command(`clear`).description(`Remove the workspace budget`)).action(async(e,t)=>{let{clearBudget:n}=await import(`./budget-DhX2gt5z.js`);await n(t.optsWithGlobals())})}const N=()=>new oe(`<key>`,`Configuration key`).choices(t);function P(e){let t=e.command(`config`).summary(`Manage CLI configuration`).helpGroup(D.setup).addHelpText(`after`,()=>{let{apiUrl:e,hubUrl:t}=ie();return`
10
+ PAT (ENTRYDESK_TOKEN) cannot read billing.`);D(t.command(`status`,{isDefault:!0}).description(`Plan, seats, and extra-usage balance`)).action(async(e,t)=>{let{showBillingStatus:n}=await import(`./billing-1jI7tuUm.js`);await n(t.optsWithGlobals())}),D(k(t.command(`invoices`).description(`List finalized invoices`),20)).action(async(e,t)=>{let{listInvoices:n}=await import(`./billing-1jI7tuUm.js`);await n(t.optsWithGlobals())})}function L(e){if(!/^\d+(\.\d+)?$/u.test(e.trim()))throw new h(`must be a positive number`);return e}function R(e){let t=e.command(`budget`).summary(`View or manage the workspace budget`).helpGroup(M.workspace);D(t.command(`get`,{isDefault:!0}).description(`Show the current workspace budget`)).action(async(e,t)=>{let{showBudget:n}=await import(`./budget-5BgMv02k.js`);await n(t.optsWithGlobals())}),D(t.command(`set`).description(`Set the workspace budget`).argument(`<amount>`,`Budget amount, e.g. 100.00`,L)).action(async(e,t,n)=>{let{setBudget:r}=await import(`./budget-5BgMv02k.js`);await r(e,n.optsWithGlobals())}),D(t.command(`clear`).description(`Remove the workspace budget`)).action(async(e,t)=>{let{clearBudget:n}=await import(`./budget-5BgMv02k.js`);await n(t.optsWithGlobals())})}const z=()=>new ie(`<key>`,`Configuration key`).choices(n);function B(e){let t=e.command(`config`).summary(`Manage CLI configuration`).helpGroup(M.setup).addHelpText(`after`,()=>{let{apiUrl:e,hubUrl:t}=m();return`
11
11
  Keys:
12
12
  apiUrl API server URL (default: ${e})
13
13
  hubUrl Hub server URL (default: ${t})
@@ -15,9 +15,9 @@ hubUrl Hub server URL (default: ${t})
15
15
  Examples:
16
16
  entrydesk config set apiUrl http://localhost:3200
17
17
  entrydesk config get apiUrl
18
- entrydesk config unset apiUrl`});S(t.command(`list`,{isDefault:!0}).description(`List all configuration`)).action(async(e,t)=>{let{listConfig:n}=await import(`./config-eCQwQAt1.js`);n(t.optsWithGlobals())}),S(t.command(`get`).description(`Get a configuration value`).addArgument(N())).action(async(e,t,n)=>{let{getConfigValue:r}=await import(`./config-eCQwQAt1.js`);r(e,n.optsWithGlobals())}),t.command(`set`).description(`Set a configuration value`).addArgument(N()).argument(`<value>`,`Value to store`).action(async(e,t)=>{let{setConfigValue:n}=await import(`./config-eCQwQAt1.js`);n(e,t)}),t.command(`unset`).description(`Remove a configuration value`).addArgument(N()).action(async e=>{let{unsetConfigValue:t}=await import(`./config-eCQwQAt1.js`);t(e)})}function F(e){let t=e.command(`connectors`).summary(`List connectors and connect/disconnect them`).helpGroup(D.workspace);S(C(t.command(`list`,{isDefault:!0}).description(`List connected connectors`).option(`--all`,`Include connectors you haven't connected yet`).option(`--search <query>`,`Filter by name`,p(200)),100)).action(async(e,t)=>{let{listConnectors:n}=await import(`./connectors-DGmZ4zTG.js`);await n(t.optsWithGlobals())}),S(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-DGmZ4zTG.js`);await r(e,n.optsWithGlobals())}),S(t.command(`connect`).description(`Connect a connector`).argument(`<connectorId>`,`Connector to connect`).addOption(new u(`--token <token>`,`Connect with a static token / API key`).conflicts([`username`,`password`,`oauth`])).addOption(new u(`--username <username>`,`Connect with credentials (prefer env vars; argv is visible in process listings)`).conflicts(`oauth`)).addOption(new u(`--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-DGmZ4zTG.js`);await r(e,n.optsWithGlobals())}),S(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-DGmZ4zTG.js`);await r(e,n.optsWithGlobals())})}const I=e=>new u(`--type <type>`,e).choices(te);function L(e){let t=e.command(`marketplace`).summary(`Browse and install marketplace agents and skills`).helpGroup(D.build).addHelpText(`after`,`
18
+ entrydesk config unset apiUrl`});D(t.command(`list`,{isDefault:!0}).description(`List all configuration`)).action(async(e,t)=>{let{listConfig:n}=await import(`./config-B9tUjrKe.js`);n(t.optsWithGlobals())}),D(t.command(`get`).description(`Get a configuration value`).addArgument(z())).action(async(e,t,n)=>{let{getConfigValue:r}=await import(`./config-B9tUjrKe.js`);r(e,n.optsWithGlobals())}),t.command(`set`).description(`Set a configuration value`).addArgument(z()).argument(`<value>`,`Value to store`).action(async(e,t)=>{let{setConfigValue:n}=await import(`./config-B9tUjrKe.js`);n(e,t)}),t.command(`unset`).description(`Remove a configuration value`).addArgument(z()).action(async e=>{let{unsetConfigValue:t}=await import(`./config-B9tUjrKe.js`);t(e)})}function V(e){let n=e.command(`connectors`).summary(`List connectors and connect/disconnect them`).helpGroup(M.workspace);D(O(n.command(`list`,{isDefault:!0}).description(`List connected connectors`).option(`--all`,`Include connectors you haven't connected yet`).option(`--search <query>`,`Filter by name`,y(200)),100)).action(async(e,t)=>{let{listConnectors:n}=await import(`./connectors-Du0gwdNw.js`);await n(t.optsWithGlobals())}),D(n.command(`tools`).description(`List the tools a connector exposes`).argument(`<connectorId>`,`Connector to inspect`)).action(async(e,t,n)=>{let{listConnectorTools:r}=await import(`./connectors-Du0gwdNw.js`);await r(e,n.optsWithGlobals())}),D(n.command(`connect`).description(`Connect a connector`).argument(`<connectorId>`,`Connector to connect`).addOption(new g(`--token <token>`,`Connect with a static token / API key`).conflicts([`username`,`password`,`oauth`])).addOption(new g(`--username <username>`,`Connect with credentials (prefer env vars; argv is visible in process listings)`).conflicts(`oauth`)).addOption(new g(`--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-Du0gwdNw.js`);await r(e,n.optsWithGlobals())}),D(n.command(`create`).description(`Create a custom connector pointing at a remote MCP server`).requiredOption(`--name <name>`,`Display name (letters, digits and single spaces)`,b).requiredOption(`--url <url>`,`MCP server URL`).requiredOption(`--description <text>`,`What the connector is for`,y(500)).addOption(new g(`--transport <transport>`,`MCP transport`).choices(c.options).default(`streamable_http`)).option(`--tool-prefix <prefix>`,`Namespace for this connector's tools (default: the name, lowercased)`,x).addOption(new g(`--auth <type>`,`Authorization the server requires; omit for an open server`).choices(t.options)).option(`--provider <name>`,`OAuth provider name, as configured in the workspace (required for --auth oauth / google-iap)`).option(`--scope <scope...>`,`OAuth scope, repeatable (required for --auth oauth / google-iap)`)).action(async(e,t)=>{let{createConnector:n}=await import(`./connectors-Du0gwdNw.js`);await n(t.optsWithGlobals())}),D(n.command(`disconnect`).description(`Remove your connection to a connector`).argument(`<connectorId>`,`Connector to disconnect`).option(`-y, --yes`,`Skip the confirmation prompt`)).action(async(e,t,n)=>{let{disconnectConnector:r}=await import(`./connectors-Du0gwdNw.js`);await r(e,n.optsWithGlobals())})}const H=e=>new g(`--type <type>`,e).choices(s);function fe(e){let t=e.command(`marketplace`).summary(`Browse and install marketplace agents and skills`).helpGroup(M.build).addHelpText(`after`,`
19
19
  Note: search/show are public; install requires login and CreateAgent/CreateSkill
20
- permission in the current workspace.`);S(t.command(`search`,{isDefault:!0}).description(`List marketplace agents and skills`).argument(`[tag]`,`Filter by a tag (shorthand for --tag)`).addOption(I(`Only list this resource type`)).option(`--tag <tag>`,`Filter by a tag`).option(`--limit <number>`,`Max results (default: 30)`,f(1,100)).option(`--cursor <key>`,`Pagination cursor from a previous page`)).action(async(e,t,n)=>{let{searchMarketplace:r}=await import(`./marketplace-BPY5cD0d.js`);await r(e,n.optsWithGlobals())}),S(t.command(`show`).description(`Show an agent or skill's details`).argument(`<slug>`,`Marketplace slug`).addOption(I(`Resource type (auto-detected when omitted)`))).action(async(e,t,n)=>{let{showMarketplaceResource:r}=await import(`./marketplace-BPY5cD0d.js`);await r(e,n.optsWithGlobals())}),S(t.command(`install`).description(`Install an agent or skill into the current workspace`).argument(`<slug>`,`Marketplace slug`).addOption(I(`Resource type (auto-detected when omitted)`))).action(async(e,t,n)=>{let{installMarketplaceResource:r}=await import(`./marketplace-BPY5cD0d.js`);await r(e,n.optsWithGlobals())}),S(t.command(`roles`).description(`List role tags you can filter by`)).action(async(e,t)=>{let{showMarketplaceRoles:n}=await import(`./marketplace-BPY5cD0d.js`);await n(t.optsWithGlobals())})}const R=[`mine`,`shared`,`all`],z=[`updated_at`,`start_time`],B=[`no-repeat`,`minutes`,`hours`,`days`,`weeks`,`months`],V=[`stream-json`],H=[`cost`,`operations`];function U(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 W(e){let t=e.command(`meeting`).summary(`Manage meetings, summaries, transcripts, and sharing`).helpGroup(D.build);S(w(t.command(`list`,{isDefault:!0}).description(`List meetings`).addOption(new u(`--filter <scope>`,`Filter meetings`).choices(R).default(`all`)).option(`--search <text>`,`Search title and description`).addOption(new u(`--sort <field>`,`Sort order`).choices(z).default(`updated_at`)),20)).action(async(e,t)=>{let{listMeetings:n}=await import(`./meeting-BDhBTbm3.js`);await n(t.optsWithGlobals())}),S(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-BDhBTbm3.js`);await r(e,n.optsWithGlobals())}),S(U(t.command(`create`).description(`Create a meeting manually`).requiredOption(`--title <text>`,`Meeting title`))).action(async(e,t)=>{let{createMeeting:n}=await import(`./meeting-BDhBTbm3.js`);await n(t.optsWithGlobals())}),S(U(t.command(`update`).description(`Update a meeting`).argument(`<meetingId>`,`Meeting to update`).option(`--title <text>`,`Meeting title`)).addOption(new u(`--status <status>`,`Meeting status`).choices(r.options)).addOption(new u(`--visibility <visibility>`,`Who can see it`).choices(i.options))).action(async(e,t,n)=>{let{updateMeeting:r}=await import(`./meeting-BDhBTbm3.js`);await r(e,n.optsWithGlobals())}),S(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-BDhBTbm3.js`);await r(e,n.optsWithGlobals())}),S(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-BDhBTbm3.js`);await r(e,n.optsWithGlobals())}),S(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-BDhBTbm3.js`);await r(e,n.optsWithGlobals())}),S(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-BDhBTbm3.js`);await r(e,n.optsWithGlobals())}),S(T(t.command(`share`).description(`Show or manage sharing (visibility, user/team grants)`).argument(`<meetingId>`,`Meeting to share`).addOption(new u(`--visibility <visibility>`,`Change who can see the meeting (owner only)`).choices(i.options))).addOption(new u(`--add-team <teamId>`,`Grant a team access`).conflicts(`removeTeam`)).option(`--remove-team <teamId>`,`Revoke a team's access`).addOption(new u(`--role <role>`,`Role for --add-user/--add-team`).choices(n.options).default(n.enum.viewer))).action(async(e,t,n)=>{let{shareMeeting:r}=await import(`./meeting-BDhBTbm3.js`);await r(e,n.optsWithGlobals())})}function G(e){let t=e.command(`notifications`).summary(`List, count, or mark notifications read`).helpGroup(D.build);S(w(t.command(`list`,{isDefault:!0}).description(`List notifications`).addOption(new u(`--tab <tab>`,`Filter by category`).choices(ee).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-4bo-vcIW.js`);await n(t.optsWithGlobals())}),S(t.command(`unread`).description(`Show the unread notification count`)).action(async(e,t)=>{let{showUnreadCount:n}=await import(`./notifications-4bo-vcIW.js`);await n(t.optsWithGlobals())}),S(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-4bo-vcIW.js`);await r(e,n.optsWithGlobals())}),S(t.command(`read-all`).description(`Mark every notification as read`)).action(async(e,t)=>{let{markAllNotificationsRead:n}=await import(`./notifications-4bo-vcIW.js`);await n(t.optsWithGlobals())})}function le(e){let t=e.command(`profile`).summary(`Manage profiles`).helpGroup(D.setup);S(t.command(`list`,{isDefault:!0}).description(`List profiles`)).action(async(e,t)=>{let{listProfiles:n}=await import(`./profile-BZo9STO2.js`);n(t.optsWithGlobals())}),S(t.command(`current`).description(`Show the active profile`)).action(async(e,t)=>{let{showCurrentProfile:n}=await import(`./profile-BZo9STO2.js`);n(t.optsWithGlobals())}),S(t.command(`show`).description(`Show profile details`).argument(`[name]`,`Profile to show`)).action(async(e,t,n)=>{let{showProfile:r}=await import(`./profile-BZo9STO2.js`);await r(e,n.optsWithGlobals())}),S(t.command(`create`).description(`Create a profile`).argument(`[name]`,`Profile name (default: default)`)).action(async(e,t,n)=>{let{createProfile:r}=await import(`./profile-BZo9STO2.js`);r(e,n.optsWithGlobals())}),S(t.command(`use`).alias(`switch`).description(`Switch the active profile`).argument(`[name]`,`Profile to switch to`)).action(async(e,t,n)=>{let{useProfile:r}=await import(`./profile-BZo9STO2.js`);r(e,n.optsWithGlobals())}),S(t.command(`delete`).aliases([`remove`,`rm`]).description(`Delete a profile`).argument(`[name]`,`Profile to delete`)).action(async(e,t,n)=>{let{deleteProfile:r}=await import(`./profile-BZo9STO2.js`);await r(e,n.optsWithGlobals())}),S(t.command(`rename`).aliases([`move`,`mv`]).description(`Rename a profile`).argument(`<from>`,`Existing profile name`).argument(`<to>`,`New profile name`)).action(async(e,t,n,r)=>{let{renameProfile:i}=await import(`./profile-BZo9STO2.js`);await i(e,t,r.optsWithGlobals())}),S(t.command(`clone`).alias(`copy`).description(`Clone config defaults into a new profile (no credentials)`).argument(`<from>`,`Profile to clone`).argument(`<to>`,`New profile name`)).action(async(e,t,n,r)=>{let{cloneProfile:i}=await import(`./profile-BZo9STO2.js`);await i(e,t,r.optsWithGlobals())})}function ue(e){let t=e.command(`recordings`).summary(`List, import, retry, and manage recordings`).helpGroup(D.build).addHelpText(`after`,"\nNote: full transcripts live in `entrydesk meeting transcript <recordingId>`.");S(C(t.command(`list`,{isDefault:!0}).description(`List recordings`).option(`--search <query>`,`Filter by title/transcript`,p(200)),20)).action(async(e,t)=>{let{listRecordings:n}=await import(`./recordings-D9jnWpxs.js`);await n(t.optsWithGlobals())}),S(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-D9jnWpxs.js`);await r(e,n.optsWithGlobals())}),S(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-D9jnWpxs.js`);await r(e,n.optsWithGlobals())}),S(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-D9jnWpxs.js`);await r(e,n.optsWithGlobals())}),S(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-D9jnWpxs.js`);await r(e,n.optsWithGlobals())}),S(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-D9jnWpxs.js`);await r(e,n.optsWithGlobals())}),S(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-D9jnWpxs.js`);await r(e,n.optsWithGlobals())})}function K(e){return e.option(`--utc-offset <offset>`,`Timezone offset, e.g. +08:00`).option(`--holiday-calendars <ids>`,`Comma-separated connected calendar ids to skip on holiday`,m).addOption(new u(`--repeat-type <type>`,`Repeat unit`).choices(B)).option(`--every <n>`,`Repeat every N units`,f(1,1e3)).option(`--time <HH:MM>`,`Time of day (days, weeks, months)`,y).option(`--times <HH:MM,...>`,`Multiple daily trigger times (days only)`,b).option(`--days-of-week <0-6>`,`Comma-separated days, 0=Sunday`,h(0,6)).option(`--days-of-month <1-31>`,`Comma-separated days of the month`,h(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)`,se)}function de(e){let t=e.command(`schedules`).summary(`Create and manage scheduled tasks`).helpGroup(D.build);S(t.command(`list`,{isDefault:!0}).description(`List schedules`)).action(async(e,t)=>{let{listSchedules:n}=await import(`./schedules-BFoirR6r.js`);await n(t.optsWithGlobals())}),S(t.command(`get`).description(`Show schedule details`).argument(`<scheduleId>`,`Schedule to show`)).action(async(e,t,n)=>{let{showSchedule:r}=await import(`./schedules-BFoirR6r.js`);await r(e,n.optsWithGlobals())}),S(K(t.command(`create`).description(`Create a new schedule`).requiredOption(`--name <name>`,`Schedule name`).requiredOption(`--prompt <text>`,`Prompt to send to the agent`).requiredOption(`--agent-id <id>`,`Agent to run`).requiredOption(`--starts-at <datetime>`,`Start time, ISO 8601`))).action(async(e,t)=>{let{createSchedule:n}=await import(`./schedules-BFoirR6r.js`);await n(t.optsWithGlobals())}),S(K(t.command(`edit`).description(`Update a schedule (only the fields you pass)`).argument(`<scheduleId>`,`Schedule to update`).option(`--name <name>`,`Schedule name`).option(`--prompt <text>`,`Prompt to send to the agent`).option(`--agent-id <id>`,`Agent to run`).option(`--starts-at <datetime>`,`Start time, ISO 8601`))).action(async(e,t,n)=>{let{editSchedule:r}=await import(`./schedules-BFoirR6r.js`);await r(e,n.optsWithGlobals())}),S(t.command(`activate`).description(`Resume a paused schedule`).argument(`<scheduleId>`,`Schedule to activate`)).action(async(e,t,n)=>{let{setScheduleActive:r}=await import(`./schedules-BFoirR6r.js`);await r(e,!0,n.optsWithGlobals())}),S(t.command(`pause`).description(`Pause an active schedule`).argument(`<scheduleId>`,`Schedule to pause`)).action(async(e,t,n)=>{let{setScheduleActive:r}=await import(`./schedules-BFoirR6r.js`);await r(e,!1,n.optsWithGlobals())}),S(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-BFoirR6r.js`);await r(e,n.optsWithGlobals())}),S(w(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-BFoirR6r.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-BFoirR6r.js`);await t(e)}),S(t.command(`calendars`).description(`List connected calendar accounts`)).action(async(e,t)=>{let{listCalendarAccounts:n}=await import(`./schedules-BFoirR6r.js`);await n(t.optsWithGlobals())})}function fe(e){S(e.command(`login`).summary(`Log in to EntryDesk`).helpGroup(D.setup)).action(async(e,t)=>{let{runLogin:n}=await import(`./login-IvudGta0.js`);await n(t.optsWithGlobals())})}function pe(e){e.command(`logout`).summary(`Log out and clear credentials`).helpGroup(D.setup).action(async()=>{let{runLogout:e}=await import(`./logout-Bjmk9YUh.js`);await e()})}function me(e){S(e.command(`status`).summary(`Show who you are logged in as`).helpGroup(D.setup)).action(async(e,t)=>{let{runStatus:n}=await import(`./status-BgIfKAmr.js`);await n(t.optsWithGlobals())})}function he(e){S(e.command(`models`).summary(`List available models`).helpGroup(D.workspace)).action(async(e,t)=>{let{runModels:n}=await import(`./models-BFnezI1c.js`);await n(t.optsWithGlobals())})}function ge(e){e.command(`version`).summary(`Show the version number`).helpGroup(D.setup).action(()=>console.log(e.version()))}function _e(e){S(e.command(`update`).summary(`Update the CLI to the latest version`).helpGroup(D.setup).option(`--check`,`Only check for a newer version, don't install`)).action(async(e,t)=>{let{runUpdate:n}=await import(`./update-CYieYkZl.js`);await n(t.optsWithGlobals())})}function ve(e){e.command(`mcp-server`).summary(`Start the MCP server (stdio or HTTP)`).helpGroup(D.setup).option(`--http`,`Serve over HTTP instead of stdio`).option(`-p, --port <number>`,`Port to listen on`,f(1,65535)).action(async e=>{let{startMcpServer:t}=await import(`./mcp-ydzvH8kz.js`);await t({mode:e.http?`http`:`stdio`,port:e.port})})}function q(e){return e.option(`-g, --global`,`Act at user (global) scope instead of the project`)}function J(e){return e.option(`-a, --agent <agentId>`,`Restrict install to specific agents (repeatable; '*' for all)`,g)}function ye(e){let t=e.command(`skills`).summary(`List, upload, version, toggle, and share skills`).helpGroup(D.build);S(q(t.command(`list`,{isDefault:!0}).description(`List available skills`).option(`--me, --mine`,`Only skills you created`).option(`--local`,`Only locally-tracked skills`).option(`--remote`,`Only workspace skills`).option(`--all`,`Both local and remote, merged`))).action(async(e,t)=>{let{listSkills:n}=await import(`./skills-DYS1EQMn.js`);await n(t.optsWithGlobals())}),S(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-DYS1EQMn.js`);await r(e,n.optsWithGlobals())}),S(t.command(`toggle`).description(`Enable or disable a skill for yourself`).argument(`<skillId>`,`Skill to toggle`).addOption(new u(`--enable`,`Turn the skill on`).conflicts(`disable`)).option(`--disable`,`Turn the skill off`)).action(async(e,t,n)=>{let{toggleSkill:r}=await import(`./skills-DYS1EQMn.js`);await r(e,n.optsWithGlobals())}),S(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-DYS1EQMn.js`);await r(e,n.optsWithGlobals())}),S(E(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-DYS1EQMn.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-DYS1EQMn.js`);await t(e)}),S(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-DYS1EQMn.js`);await r(e,n.optsWithGlobals())}),S(J(q(t.command(`add`).description(`Install a skill from an EntryDesk slug/id, a git URL, or a local path`).argument(`<source>`,`Skill source`)))).action(async(e,t,n)=>{let{addSkill:r}=await import(`./skills-DYS1EQMn.js`);await r(e,n.optsWithGlobals())}),S(J(q(t.command(`pull`).description(`Download the latest from the workspace`).argument(`[nameOrId]`,`Skill to pull (default: every tracked one)`)))).action(async(e,t,n)=>{let{pullSkill:r}=await import(`./skills-DYS1EQMn.js`);await r(e,n.optsWithGlobals())}),S(q(t.command(`push`).description(`Upload local changes to the workspace`).argument(`[name]`,`Skill to push (default: every changed one)`).option(`--force`,`Overwrite the workspace copy`))).action(async(e,t,n)=>{let{pushSkill:r}=await import(`./skills-DYS1EQMn.js`);await r(e,n.optsWithGlobals())}),S(q(t.command(`status`).description(`Show local vs workspace drift`))).action(async(e,t)=>{let{showSkillsStatus:n}=await import(`./skills-DYS1EQMn.js`);await n(t.optsWithGlobals())}),S(q(t.command(`remove`).description(`Uninstall a skill locally`).argument(`<name>`,`Skill to remove`).option(`--remote`,`Also delete the skill from the workspace`))).action(async(e,t,n)=>{let{removeSkill:r}=await import(`./skills-DYS1EQMn.js`);await r(e,n.optsWithGlobals())}),S(q(t.command(`link`).description(`Bind this directory (or the user) to a workspace`).argument(`[workspaceId]`,`Workspace to bind to`))).action(async(e,t,n)=>{let{linkSkillsDirectory:r}=await import(`./skills-DYS1EQMn.js`);await r(e,n.optsWithGlobals())}),S(q(t.command(`unlink`).description(`Remove the workspace binding`))).action(async(e,t)=>{let{runSkillsUnlink:n}=await import(`./commands-C1wX8XQY.js`);n(t.optsWithGlobals())})}function be(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(D.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`,f(1,20)).option(`-i, --interactive`,`Interactive mode (continuous chat)`).option(`--connectors <ids>`,`Limit to specific connectors (default: all connected)`,m).option(`--plain`,`Plain text output`).addOption(new u(`--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 u(`--tool-approval-mode <mode>`,`Defaults to the mode /approval saved. Non-interactive runs deny every approval they are asked for`).choices(ne.options)).option(`--dangerously-auto-approve-tools`,`Deprecated alias for --tool-approval-mode always_allow`).addHelpText(`after`,`
20
+ permission in the current workspace.`);D(t.command(`search`,{isDefault:!0}).description(`List marketplace agents and skills`).argument(`[tag]`,`Filter by a tag (shorthand for --tag)`).addOption(H(`Only list this resource type`)).option(`--tag <tag>`,`Filter by a tag`).option(`--limit <number>`,`Max results (default: 30)`,v(1,100)).option(`--cursor <key>`,`Pagination cursor from a previous page`)).action(async(e,t,n)=>{let{searchMarketplace:r}=await import(`./marketplace-uKCzG2ZZ.js`);await r(e,n.optsWithGlobals())}),D(t.command(`show`).description(`Show an agent or skill's details`).argument(`<slug>`,`Marketplace slug`).addOption(H(`Resource type (auto-detected when omitted)`))).action(async(e,t,n)=>{let{showMarketplaceResource:r}=await import(`./marketplace-uKCzG2ZZ.js`);await r(e,n.optsWithGlobals())}),D(t.command(`install`).description(`Install an agent or skill into the current workspace`).argument(`<slug>`,`Marketplace slug`).addOption(H(`Resource type (auto-detected when omitted)`))).action(async(e,t,n)=>{let{installMarketplaceResource:r}=await import(`./marketplace-uKCzG2ZZ.js`);await r(e,n.optsWithGlobals())}),D(t.command(`roles`).description(`List role tags you can filter by`)).action(async(e,t)=>{let{showMarketplaceRoles:n}=await import(`./marketplace-uKCzG2ZZ.js`);await n(t.optsWithGlobals())})}const pe=[`mine`,`shared`,`all`],me=[`updated_at`,`start_time`],he=[`no-repeat`,`minutes`,`hours`,`days`,`weeks`,`months`],U=[`stream-json`],ge=[`cost`,`operations`];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 _e(e){let t=e.command(`meeting`).summary(`Manage meetings, summaries, transcripts, and sharing`).helpGroup(M.build);D(k(t.command(`list`,{isDefault:!0}).description(`List meetings`).addOption(new g(`--filter <scope>`,`Filter meetings`).choices(pe).default(`all`)).option(`--search <text>`,`Search title and description`).addOption(new g(`--sort <field>`,`Sort order`).choices(me).default(`updated_at`)),20)).action(async(e,t)=>{let{listMeetings:n}=await import(`./meeting-DyRLAlio.js`);await n(t.optsWithGlobals())}),D(t.command(`get`).description(`Show meeting details and its recordings`).argument(`<meetingId>`,`Meeting to show`)).action(async(e,t,n)=>{let{showMeeting:r}=await import(`./meeting-DyRLAlio.js`);await r(e,n.optsWithGlobals())}),D(W(t.command(`create`).description(`Create a meeting manually`).requiredOption(`--title <text>`,`Meeting title`))).action(async(e,t)=>{let{createMeeting:n}=await import(`./meeting-DyRLAlio.js`);await n(t.optsWithGlobals())}),D(W(t.command(`update`).description(`Update a meeting`).argument(`<meetingId>`,`Meeting to update`).option(`--title <text>`,`Meeting title`)).addOption(new g(`--status <status>`,`Meeting status`).choices(i.options)).addOption(new g(`--visibility <visibility>`,`Who can see it`).choices(a.options))).action(async(e,t,n)=>{let{updateMeeting:r}=await import(`./meeting-DyRLAlio.js`);await r(e,n.optsWithGlobals())}),D(t.command(`delete`).description(`Delete a meeting (soft delete)`).argument(`<meetingId>`,`Meeting to delete`)).action(async(e,t,n)=>{let{deleteMeeting:r}=await import(`./meeting-DyRLAlio.js`);await r(e,n.optsWithGlobals())}),D(t.command(`summary`).description(`Print the meeting summary (markdown) to stdout`).argument(`<meetingId>`,`Meeting to summarize`)).action(async(e,t,n)=>{let{showMeetingSummary:r}=await import(`./meeting-DyRLAlio.js`);await r(e,n.optsWithGlobals())}),D(t.command(`transcript`).description(`Print a recording transcript to stdout`).argument(`<recordingId>`,`Recording to transcribe`).option(`--raw`,`Output the raw transcript with timestamps`)).action(async(e,t,n)=>{let{showMeetingTranscript:r}=await import(`./meeting-DyRLAlio.js`);await r(e,n.optsWithGlobals())}),D(t.command(`previous`).description(`Show the previous meeting's brief in the same series`).argument(`<meetingId>`,`Meeting whose series to look back in`)).action(async(e,t,n)=>{let{showPreviousMeeting:r}=await import(`./meeting-DyRLAlio.js`);await r(e,n.optsWithGlobals())}),D(A(t.command(`share`).description(`Show or manage sharing (visibility, user/team grants)`).argument(`<meetingId>`,`Meeting to share`).addOption(new g(`--visibility <visibility>`,`Change who can see the meeting (owner only)`).choices(a.options))).addOption(new g(`--add-team <teamId>`,`Grant a team access`).conflicts(`removeTeam`)).option(`--remove-team <teamId>`,`Revoke a team's access`).addOption(new g(`--role <role>`,`Role for --add-user/--add-team`).choices(r.options).default(r.enum.viewer))).action(async(e,t,n)=>{let{shareMeeting:r}=await import(`./meeting-DyRLAlio.js`);await r(e,n.optsWithGlobals())})}function ve(e){let t=e.command(`notifications`).summary(`List, count, or mark notifications read`).helpGroup(M.build);D(k(t.command(`list`,{isDefault:!0}).description(`List notifications`).addOption(new g(`--tab <tab>`,`Filter by category`).choices(o).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-ChqOyq50.js`);await n(t.optsWithGlobals())}),D(t.command(`unread`).description(`Show the unread notification count`)).action(async(e,t)=>{let{showUnreadCount:n}=await import(`./notifications-ChqOyq50.js`);await n(t.optsWithGlobals())}),D(t.command(`read`).description(`Mark a notification as read`).argument(`<notificationId>`,`Notification to mark read`)).action(async(e,t,n)=>{let{markNotificationRead:r}=await import(`./notifications-ChqOyq50.js`);await r(e,n.optsWithGlobals())}),D(t.command(`read-all`).description(`Mark every notification as read`)).action(async(e,t)=>{let{markAllNotificationsRead:n}=await import(`./notifications-ChqOyq50.js`);await n(t.optsWithGlobals())})}function ye(e){let t=e.command(`profile`).summary(`Manage profiles`).helpGroup(M.setup);D(t.command(`list`,{isDefault:!0}).description(`List profiles`)).action(async(e,t)=>{let{listProfiles:n}=await import(`./profile-BvYUZvxC.js`);n(t.optsWithGlobals())}),D(t.command(`current`).description(`Show the active profile`)).action(async(e,t)=>{let{showCurrentProfile:n}=await import(`./profile-BvYUZvxC.js`);n(t.optsWithGlobals())}),D(t.command(`show`).description(`Show profile details`).argument(`[name]`,`Profile to show`)).action(async(e,t,n)=>{let{showProfile:r}=await import(`./profile-BvYUZvxC.js`);await r(e,n.optsWithGlobals())}),D(t.command(`create`).description(`Create a profile`).argument(`[name]`,`Profile name (default: default)`)).action(async(e,t,n)=>{let{createProfile:r}=await import(`./profile-BvYUZvxC.js`);r(e,n.optsWithGlobals())}),D(t.command(`use`).alias(`switch`).description(`Switch the active profile`).argument(`[name]`,`Profile to switch to`)).action(async(e,t,n)=>{let{useProfile:r}=await import(`./profile-BvYUZvxC.js`);r(e,n.optsWithGlobals())}),D(t.command(`delete`).aliases([`remove`,`rm`]).description(`Delete a profile`).argument(`[name]`,`Profile to delete`)).action(async(e,t,n)=>{let{deleteProfile:r}=await import(`./profile-BvYUZvxC.js`);await r(e,n.optsWithGlobals())}),D(t.command(`rename`).aliases([`move`,`mv`]).description(`Rename a profile`).argument(`<from>`,`Existing profile name`).argument(`<to>`,`New profile name`)).action(async(e,t,n,r)=>{let{renameProfile:i}=await import(`./profile-BvYUZvxC.js`);await i(e,t,r.optsWithGlobals())}),D(t.command(`clone`).alias(`copy`).description(`Clone config defaults into a new profile (no credentials)`).argument(`<from>`,`Profile to clone`).argument(`<to>`,`New profile name`)).action(async(e,t,n,r)=>{let{cloneProfile:i}=await import(`./profile-BvYUZvxC.js`);await i(e,t,r.optsWithGlobals())})}function be(e){let t=e.command(`recordings`).summary(`List, import, retry, and manage recordings`).helpGroup(M.build).addHelpText(`after`,"\nNote: full transcripts live in `entrydesk meeting transcript <recordingId>`.");D(O(t.command(`list`,{isDefault:!0}).description(`List recordings`).option(`--search <query>`,`Filter by title/transcript`,y(200)),20)).action(async(e,t)=>{let{listRecordings:n}=await import(`./recordings-k6uAy1-Z.js`);await n(t.optsWithGlobals())}),D(t.command(`get`).description(`Show a recording's metadata, summary, and status`).argument(`<recordingId>`,`Recording to show`)).action(async(e,t,n)=>{let{showRecording:r}=await import(`./recordings-k6uAy1-Z.js`);await r(e,n.optsWithGlobals())}),D(t.command(`import`).description(`Import a recording from a media URL`).argument(`<url>`,`Media URL to import`).option(`--title <text>`,`Title for the imported recording`).option(`--model <modelId>`,`Model for transcription and summary`).option(`--language <code>`,`Preferred transcript language (e.g. zh-TW)`)).action(async(e,t,n)=>{let{importRecording:r}=await import(`./recordings-k6uAy1-Z.js`);await r(e,n.optsWithGlobals())}),D(t.command(`preview`).description(`Preview a media URL's metadata before importing`).argument(`<url>`,`Media URL to preview`)).action(async(e,t,n)=>{let{previewRecording:r}=await import(`./recordings-k6uAy1-Z.js`);await r(e,n.optsWithGlobals())}),D(t.command(`audio-url`).description(`Get a signed URL to stream or download the audio`).argument(`<recordingId>`,`Recording to link`)).action(async(e,t,n)=>{let{showRecordingAudioUrl:r}=await import(`./recordings-k6uAy1-Z.js`);await r(e,n.optsWithGlobals())}),D(t.command(`retry`).description(`Retry processing of a failed recording`).argument(`<recordingId>`,`Recording to retry`)).action(async(e,t,n)=>{let{retryRecording:r}=await import(`./recordings-k6uAy1-Z.js`);await r(e,n.optsWithGlobals())}),D(t.command(`delete`).description(`Delete a recording`).argument(`<recordingId>`,`Recording to delete`).option(`-y, --yes`,`Skip the confirmation prompt`)).action(async(e,t,n)=>{let{deleteRecording:r}=await import(`./recordings-k6uAy1-Z.js`);await r(e,n.optsWithGlobals())})}const xe=[...new Set(e.map(e=>e.toolApprovalMode))],Se=[...new Set(e.map(e=>e.approvalHandling))];function G(e){return e.addOption(new g(`--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(xe)).addOption(new g(`--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(Se)).option(`--allowed-tools <tools...>`,`Pre-authorize these tools for this schedule (comma or space separated)`,w).option(`--disallowed-tools <tools...>`,`Block these tools for this schedule. Wins over --allowed-tools`,w)}function K(e){return e.option(`--utc-offset <offset>`,`Timezone offset, e.g. +08:00`).option(`--holiday-calendars <ids>`,`Comma-separated connected calendar ids to skip on holiday`,S).addOption(new g(`--repeat-type <type>`,`Repeat unit`).choices(he)).option(`--every <n>`,`Repeat every N units`,v(1,1e3)).option(`--time <HH:MM>`,`Time of day (days, weeks, months)`,T).option(`--times <HH:MM,...>`,`Multiple daily trigger times (days only)`,ue).option(`--days-of-week <0-6>`,`Comma-separated days, 0=Sunday`,C(0,6)).option(`--days-of-month <1-31>`,`Comma-separated days of the month`,C(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)`,de)}function Ce(e){let t=e.command(`schedules`).summary(`Create and manage scheduled tasks`).helpGroup(M.build);D(t.command(`list`,{isDefault:!0}).description(`List schedules`)).action(async(e,t)=>{let{listSchedules:n}=await import(`./schedules-gNv67oB_.js`);await n(t.optsWithGlobals())}),D(t.command(`get`).description(`Show schedule details`).argument(`<scheduleId>`,`Schedule to show`)).action(async(e,t,n)=>{let{showSchedule:r}=await import(`./schedules-gNv67oB_.js`);await r(e,n.optsWithGlobals())}),D(G(K(t.command(`create`).description(`Create a new schedule`).requiredOption(`--name <name>`,`Schedule name`).requiredOption(`--prompt <text>`,`Prompt to send to the agent`).requiredOption(`--agent-id <id>`,`Agent to run`).requiredOption(`--starts-at <datetime>`,`Start time, ISO 8601`)))).action(async(e,t)=>{let{createSchedule:n}=await import(`./schedules-gNv67oB_.js`);await n(t.optsWithGlobals())}),D(G(K(t.command(`edit`).description(`Update a schedule (only the fields you pass)`).argument(`<scheduleId>`,`Schedule to update`).option(`--name <name>`,`Schedule name`).option(`--prompt <text>`,`Prompt to send to the agent`).option(`--agent-id <id>`,`Agent to run`).option(`--starts-at <datetime>`,`Start time, ISO 8601`)))).action(async(e,t,n)=>{let{editSchedule:r}=await import(`./schedules-gNv67oB_.js`);await r(e,n.optsWithGlobals())}),D(t.command(`activate`).description(`Resume a paused schedule`).argument(`<scheduleId>`,`Schedule to activate`)).action(async(e,t,n)=>{let{setScheduleActive:r}=await import(`./schedules-gNv67oB_.js`);await r(e,!0,n.optsWithGlobals())}),D(t.command(`pause`).description(`Pause an active schedule`).argument(`<scheduleId>`,`Schedule to pause`)).action(async(e,t,n)=>{let{setScheduleActive:r}=await import(`./schedules-gNv67oB_.js`);await r(e,!1,n.optsWithGlobals())}),D(t.command(`run`).description(`Run a schedule now; prints the created taskId`).argument(`<scheduleId>`,`Schedule to run`)).action(async(e,t,n)=>{let{runScheduleNow:r}=await import(`./schedules-gNv67oB_.js`);await r(e,n.optsWithGlobals())}),D(k(t.command(`runs`).description(`List a schedule's run history`).argument(`<scheduleId>`,`Schedule whose runs to list`),20)).action(async(e,t,n)=>{let{listScheduleRuns:r}=await import(`./schedules-gNv67oB_.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-gNv67oB_.js`);await t(e)}),D(t.command(`calendars`).description(`List connected calendar accounts`)).action(async(e,t)=>{let{listCalendarAccounts:n}=await import(`./schedules-gNv67oB_.js`);await n(t.optsWithGlobals())})}function we(e){D(e.command(`login`).summary(`Log in to EntryDesk`).helpGroup(M.setup)).action(async(e,t)=>{let{runLogin:n}=await import(`./login-DDHPKjnl.js`);await n(t.optsWithGlobals())})}function Te(e){e.command(`logout`).summary(`Log out and clear credentials`).helpGroup(M.setup).action(async()=>{let{runLogout:e}=await import(`./logout-BfBH5eJn.js`);await e()})}function Ee(e){D(e.command(`status`).summary(`Show who you are logged in as`).helpGroup(M.setup)).action(async(e,t)=>{let{runStatus:n}=await import(`./status-DmJ-xYvm.js`);await n(t.optsWithGlobals())})}function De(e){D(e.command(`models`).summary(`List available models`).helpGroup(M.workspace)).action(async(e,t)=>{let{runModels:n}=await import(`./models-MjAV8n3p.js`);await n(t.optsWithGlobals())})}function Oe(e){e.command(`version`).summary(`Show the version number`).helpGroup(M.setup).action(()=>console.log(e.version()))}function ke(e){D(e.command(`update`).summary(`Update the CLI to the latest version`).helpGroup(M.setup).option(`--check`,`Only check for a newer version, don't install`)).action(async(e,t)=>{let{runUpdate:n}=await import(`./update-DvJ7nqZt.js`);await n(t.optsWithGlobals())})}function Ae(e){e.command(`mcp-server`).summary(`Start the MCP server (stdio or HTTP)`).helpGroup(M.setup).option(`--http`,`Serve over HTTP instead of stdio`).option(`-p, --port <number>`,`Port to listen on`,v(1,65535)).action(async e=>{let{startMcpServer:t}=await import(`./mcp-DINA1zRb.js`);await t({mode:e.http?`http`:`stdio`,port:e.port})})}function q(e){return e.option(`-g, --global`,`Act at user (global) scope instead of the project`)}function J(e){return e.option(`-a, --agent <agentId>`,`Restrict install to specific agents (repeatable; '*' for all)`,oe)}function je(e){let t=e.command(`skills`).summary(`List, upload, version, toggle, and share skills`).helpGroup(M.build);D(q(t.command(`list`,{isDefault:!0}).description(`List available skills`).option(`--me, --mine`,`Only skills you created`).option(`--local`,`Only locally-tracked skills`).option(`--remote`,`Only workspace skills`).option(`--all`,`Both local and remote, merged`))).action(async(e,t)=>{let{listSkills:n}=await import(`./skills-fZI01pai.js`);await n(t.optsWithGlobals())}),D(t.command(`upload`).description(`Upload a skill zip file or folder`).argument(`<path>`,`Zip file or folder to upload`).option(`--force`,`Overwrite an existing skill with the same name`)).action(async(e,t,n)=>{let{uploadSkill:r}=await import(`./skills-fZI01pai.js`);await r(e,n.optsWithGlobals())}),D(t.command(`toggle`).description(`Enable or disable a skill for yourself`).argument(`<skillId>`,`Skill to toggle`).addOption(new g(`--enable`,`Turn the skill on`).conflicts(`disable`)).option(`--disable`,`Turn the skill off`)).action(async(e,t,n)=>{let{toggleSkill:r}=await import(`./skills-fZI01pai.js`);await r(e,n.optsWithGlobals())}),D(t.command(`versions`).description(`List a skill's version history`).argument(`<skillId>`,`Skill to inspect`)).action(async(e,t,n)=>{let{listSkillVersions:r}=await import(`./skills-fZI01pai.js`);await r(e,n.optsWithGlobals())}),D(j(t.command(`share`).description(`Show or manage sharing (user grants)`).argument(`<skillId>`,`Skill to share`))).action(async(e,t,n)=>{let{shareSkill:r}=await import(`./skills-fZI01pai.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-fZI01pai.js`);await t(e)}),D(t.command(`download`).description(`Download and extract a skill to ./<skill-name>/`).argument(`<skillId>`,`Skill to download`)).action(async(e,t,n)=>{let{downloadSkill:r}=await import(`./skills-fZI01pai.js`);await r(e,n.optsWithGlobals())}),D(J(q(t.command(`add`).description(`Install a skill from an EntryDesk slug/id, a git URL, or a local path`).argument(`<source>`,`Skill source`)))).action(async(e,t,n)=>{let{addSkill:r}=await import(`./skills-fZI01pai.js`);await r(e,n.optsWithGlobals())}),D(J(q(t.command(`pull`).description(`Download the latest from the workspace`).argument(`[nameOrId]`,`Skill to pull (default: every tracked one)`)))).action(async(e,t,n)=>{let{pullSkill:r}=await import(`./skills-fZI01pai.js`);await r(e,n.optsWithGlobals())}),D(q(t.command(`push`).description(`Upload local changes to the workspace`).argument(`[name]`,`Skill to push (default: every changed one)`).option(`--force`,`Overwrite the workspace copy`))).action(async(e,t,n)=>{let{pushSkill:r}=await import(`./skills-fZI01pai.js`);await r(e,n.optsWithGlobals())}),D(q(t.command(`status`).description(`Show local vs workspace drift`))).action(async(e,t)=>{let{showSkillsStatus:n}=await import(`./skills-fZI01pai.js`);await n(t.optsWithGlobals())}),D(q(t.command(`remove`).description(`Uninstall a skill locally`).argument(`<name>`,`Skill to remove`).option(`--remote`,`Also delete the skill from the workspace`))).action(async(e,t,n)=>{let{removeSkill:r}=await import(`./skills-fZI01pai.js`);await r(e,n.optsWithGlobals())}),D(q(t.command(`link`).description(`Bind this directory (or the user) to a workspace`).argument(`[workspaceId]`,`Workspace to bind to`))).action(async(e,t,n)=>{let{linkSkillsDirectory:r}=await import(`./skills-fZI01pai.js`);await r(e,n.optsWithGlobals())}),D(q(t.command(`unlink`).description(`Remove the workspace binding`))).action(async(e,t)=>{let{runSkillsUnlink:n}=await import(`./commands-B0bUDitb.js`);n(t.optsWithGlobals())})}function Me(e){e.command(`task`,{isDefault:!0}).summary(`Send a message or run an interactive task`).description(`Send a message to a model or agent, or start an interactive session.`).helpGroup(M.chat).option(`-m, --message <text>`,`Message to send (or pipe via stdin)`).option(`--model <modelId>`,`Model to use (instead of an agent)`).option(`-a, --agent <agentId>`,`Agent to use (instead of --model)`).option(`-c, --continue <n>`,`Continue recent task #n`,v(1,20)).option(`-i, --interactive`,`Interactive mode (continuous chat)`).option(`--connectors <ids>`,`Limit to specific connectors (default: all connected)`,S).option(`--plain`,`Plain text output`).addOption(new g(`--output <mode>`,`Stream events as JSON`).choices(U)).option(`--full-output`,`Show full tool outputs`).option(`--file-system`,`Enable local file operations`).option(`--no-file-system`,`Disable local file operations`).addOption(new g(`--tool-approval-mode <mode>`,`Defaults to the mode /approval saved. Non-interactive runs deny every approval they are asked for`).choices(ee.options)).option(`--allowed-tools <tools...>`,`Pre-authorize these tools, so they run without asking (comma or space separated)`,w).option(`--disallowed-tools <tools...>`,`Refuse these tools. Wins over --allowed-tools and --tool-approval-mode`,w).option(`--dangerously-auto-approve-tools`,`Deprecated alias for --tool-approval-mode always_allow`).addHelpText(`after`,`
21
21
  Examples:
22
22
  entrydesk task -m "Hello" --model <model>
23
23
  entrydesk task -m "Hello" -a <agentId>
@@ -27,13 +27,13 @@ Examples:
27
27
 
28
28
  List available models: entrydesk models
29
29
  List available agents: entrydesk agents
30
- List recent tasks: entrydesk tasks`).action(async(e,t)=>{let[n]=t.parent?.args??[],r=n===t.name()||t.aliases().includes(n??``),{runTask:i}=await import(`./task-Db4UcJ6G.js`);await i({...e,interactive:e.interactive??!r})})}function xe(e){S(e.command(`tasks`).summary(`List, search, or view tasks`).helpGroup(D.chat).argument(`[taskId]`,`Task id, or a 1-based index into recent tasks`).addOption(new u(`-q, --search <query>`,`Filter tasks by a search query`).conflicts(`share`)).option(`--limit <number>`,`Max tasks to return`,f(1,50)).option(`--next-key <cursor>`,`Fetch the next page using this cursor`).option(`-s, --share <shareId>`,`View a shared task's messages (no login needed)`).addOption(new u(`--output <mode>`,`Stream messages as JSON events`).choices(V)).option(`--full-output`,`Show full tool outputs when viewing a task`).addHelpText(`after`,`
30
+ List recent tasks: entrydesk tasks`).action(async(e,t)=>{let[n]=t.parent?.args??[],r=n===t.name()||t.aliases().includes(n??``),{runTask:i}=await import(`./task-Cu8s2pLl.js`);await i({...e,interactive:e.interactive??!r})})}function Ne(e){D(e.command(`tasks`).summary(`List, search, or view tasks`).helpGroup(M.chat).argument(`[taskId]`,`Task id, or a 1-based index into recent tasks`).addOption(new g(`-q, --search <query>`,`Filter tasks by a search query`).conflicts(`share`)).option(`--limit <number>`,`Max tasks to return`,v(1,50)).option(`--next-key <cursor>`,`Fetch the next page using this cursor`).option(`-s, --share <shareId>`,`View a shared task's messages (no login needed)`).addOption(new g(`--output <mode>`,`Stream messages as JSON events`).choices(U)).option(`--full-output`,`Show full tool outputs when viewing a task`).addHelpText(`after`,`
31
31
  Examples:
32
32
  entrydesk tasks # List recent tasks
33
33
  entrydesk tasks -q "deploy" --limit 20 # Search tasks
34
34
  entrydesk tasks <taskId> # View a task's messages
35
35
  entrydesk tasks <taskId> --full-output # …with full tool outputs
36
- entrydesk tasks -s <shareId> # View a shared task`)).action(async(e,t,n)=>{let{runTasks:r}=await import(`./tasks-Dd-GdHfu.js`);await r(e,n.optsWithGlobals())})}function Se(e){let t=e.command(`tool`).summary(`List, get, or call MCP tools`).helpGroup(D.chat);S(t.command(`list`,{isDefault:!0}).description(`List all available tools`).option(`-p, --prefix <name>`,`Filter tools by connector prefix`)).action(async(e,t)=>{let{listTools:n}=await import(`./tool-B6W8erW6.js`);await n(t.optsWithGlobals())}),S(t.command(`get`).description(`Get details of a specific tool`).argument(`<name>`,`Tool name`)).action(async(e,t,n)=>{let{getTool:r}=await import(`./tool-B6W8erW6.js`);await r(e,n.optsWithGlobals())}),S(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`,`
36
+ entrydesk tasks -s <shareId> # View a shared task`)).action(async(e,t,n)=>{let{runTasks:r}=await import(`./tasks-iSFyXmqr.js`);await r(e,n.optsWithGlobals())})}function Pe(e){let t=e.command(`tool`).summary(`List, get, or call MCP tools`).helpGroup(M.chat);D(t.command(`list`,{isDefault:!0}).description(`List all available tools`).option(`-p, --prefix <name>`,`Filter tools by connector prefix`)).action(async(e,t)=>{let{listTools:n}=await import(`./tool-Cok2kze5.js`);await n(t.optsWithGlobals())}),D(t.command(`get`).description(`Get details of a specific tool`).argument(`<name>`,`Tool name`)).action(async(e,t,n)=>{let{getTool:r}=await import(`./tool-Cok2kze5.js`);await r(e,n.optsWithGlobals())}),D(t.command(`call`).description(`Call a tool with JSON input`).argument(`<name>`,`Tool name`).option(`-i, --input <json>`,`JSON input for the tool call`).option(`-f, --input-file <path>`,`Read the JSON input from a file`).addHelpText(`after`,`
37
37
  Input priority:
38
38
  1. --input (direct JSON string)
39
39
  2. --input-file (read from file)
@@ -42,9 +42,9 @@ Input priority:
42
42
  Examples:
43
43
  entrydesk tool call agent__search_agents --input '{"limit": 5}'
44
44
  entrydesk tool call agent__search_agents --input-file input.json
45
- echo '{"limit": 5}' | entrydesk tool call agent__search_agents`)).action(async(e,t,n)=>{let{runToolCall:r}=await import(`./tool-B6W8erW6.js`);await r(e,n.optsWithGlobals())})}function Ce(e){let t=e.command(`usage`).summary(`Show balance, per-user breakdown, or CSV export`).helpGroup(D.workspace);S(t.command(`summary`,{isDefault:!0}).description(`Per-user monthly cost/operations summary`).option(`--limit <number>`,`Limit rows (default: all)`,f(1,100)).addOption(new u(`--sort-by <field>`,`Sort the summary`).choices(H).default(`cost`))).action(async(e,t)=>{let{showUsageSummary:n}=await import(`./usage-BLdNvuse.js`);await n(t.optsWithGlobals())}),S(t.command(`balance`).description(`Workspace USD balance, spend, and limits`)).action(async(e,t)=>{let{showUsageBalance:n}=await import(`./usage-BLdNvuse.js`);await n(t.optsWithGlobals())}),S(t.command(`me`).description(`Your own usage and availability`)).action(async(e,t)=>{let{showOwnUsage:n}=await import(`./usage-BLdNvuse.js`);await n(t.optsWithGlobals())}),S(t.command(`consumptions`).description(`Per-user extra-usage breakdown`).option(`--limit <number>`,`Max rows (default: 20)`,f(1,100)).option(`--offset <number>`,`Pagination offset`,d).option(`--period-start <iso>`,`Period start`)).action(async(e,t)=>{let{listUsageConsumptions:n}=await import(`./usage-BLdNvuse.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-BLdNvuse.js`);await t(e)})}function we(e){let t=e.command(`workflow`).summary(`Create, run, and manage workflows`).helpGroup(D.build).addHelpText(`after`,`
45
+ echo '{"limit": 5}' | entrydesk tool call agent__search_agents`)).action(async(e,t,n)=>{let{runToolCall:r}=await import(`./tool-Cok2kze5.js`);await r(e,n.optsWithGlobals())})}function Fe(e){let t=e.command(`usage`).summary(`Show balance, per-user breakdown, or CSV export`).helpGroup(M.workspace);D(t.command(`summary`,{isDefault:!0}).description(`Per-user monthly cost/operations summary`).option(`--limit <number>`,`Limit rows (default: all)`,v(1,100)).addOption(new g(`--sort-by <field>`,`Sort the summary`).choices(ge).default(`cost`))).action(async(e,t)=>{let{showUsageSummary:n}=await import(`./usage-BwizU9L8.js`);await n(t.optsWithGlobals())}),D(t.command(`balance`).description(`Workspace USD balance, spend, and limits`)).action(async(e,t)=>{let{showUsageBalance:n}=await import(`./usage-BwizU9L8.js`);await n(t.optsWithGlobals())}),D(t.command(`me`).description(`Your own usage and availability`)).action(async(e,t)=>{let{showOwnUsage:n}=await import(`./usage-BwizU9L8.js`);await n(t.optsWithGlobals())}),D(t.command(`consumptions`).description(`Per-user extra-usage breakdown`).option(`--limit <number>`,`Max rows (default: 20)`,v(1,100)).option(`--offset <number>`,`Pagination offset`,_).option(`--period-start <iso>`,`Period start`)).action(async(e,t)=>{let{listUsageConsumptions:n}=await import(`./usage-BwizU9L8.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-BwizU9L8.js`);await t(e)})}function Ie(e){let t=e.command(`workflow`).summary(`Create, run, and manage workflows`).helpGroup(M.build).addHelpText(`after`,`
46
46
  Examples:
47
47
  entrydesk workflow list --search report
48
48
  entrydesk workflow create --name "Nightly report" --file ./report.js
49
49
  entrydesk workflow run <workflowId> --args '{"date":"2026-06-20"}' --wait
50
- entrydesk workflow run-get <workflowId> <runId>`);S(w(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-DlQtL_J-.js`);await n(t.optsWithGlobals())}),S(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-DlQtL_J-.js`);await r(e,n.optsWithGlobals())}),S(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-DlQtL_J-.js`);await n(t.optsWithGlobals())}),S(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 u(`--activate`,`Enable the workflow`).conflicts(`deactivate`)).option(`--deactivate`,`Disable the workflow`)).action(async(e,t,n)=>{let{updateWorkflow:r}=await import(`./workflow-DlQtL_J-.js`);await r(e,n.optsWithGlobals())}),S(t.command(`run`).description(`Trigger a run`).argument(`<workflowId>`,`Workflow to run`).addOption(new u(`--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-DlQtL_J-.js`);await r(e,n.optsWithGlobals())}),S(w(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-DlQtL_J-.js`);await r(e,n.optsWithGlobals())}),S(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-DlQtL_J-.js`);await i(e,t,r.optsWithGlobals())}),S(E(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-DlQtL_J-.js`);await r(e,n.optsWithGlobals())})}function Y(e){let t=e.command(`workspaces`).summary(`List or switch workspaces`).helpGroup(D.workspace);S(t.command(`list`,{isDefault:!0}).description(`List all workspaces`)).action(async(e,t)=>{let{listWorkspaces:n}=await import(`./workspaces-IAJitqaO.js`);await n(t.optsWithGlobals())}),S(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-IAJitqaO.js`);await r(e,n.optsWithGlobals())})}function X(e){return e.commands.length>0}function Z(e,t){return e.options.some(e=>e.long===t)}function Q(e,t){return e.name()===t||e.aliases().includes(t)}function Te(e){X(e)&&!Z(e,`--json`)&&e.addOption(new u(`--json`).hideHelp()),Z(e,`--profile`)||e.addOption(new u(x).hideHelp())}function Ee(e){e.hook(`preSubcommand`,(e,t)=>{let[n]=e.args;n===void 0||n.startsWith(`-`)||Q(t,n)||t.registeredArguments.length>0||e.commands.some(e=>Q(e,n))||e.error(`error: unknown command '${n}'`,{code:`commander.unknownCommand`})})}function $(e,t){t||Te(e),X(e)&&Ee(e);for(let t of e.commands)t.name()!==`help`&&$(t,!1)}function De(e){let t=e.optsWithGlobals().profile;return typeof t==`string`?t:void 0}function Oe(e){let t=e;for(;t.parent?.parent;)t=t.parent;return t.name()}function ke(){let e=ce();return e.hook(`preAction`,(e,t)=>{if(Oe(t)===`profile`)return;let n=De(t)??s.getCurrentProfileName();s.ensureProfileExists(n),s.setOverrideProfile(n)}),be(e),xe(e),Se(e),k(e),fe(e),pe(e),me(e),Y(e),he(e),F(e),L(e),we(e),W(e),ye(e),de(e),ue(e),G(e),Ce(e),M(e),A(e),P(e),le(e),ge(e),_e(e),ve(e),$(e,!0),e}try{await ke().parseAsync(process.argv)}catch(e){re(e)}export{};
50
+ entrydesk workflow run-get <workflowId> <runId>`);D(k(t.command(`list`,{isDefault:!0}).description(`List workflows`).option(`--search <text>`,`Search by name`),20)).action(async(e,t)=>{let{listWorkflows:n}=await import(`./workflow-BZblFLYG.js`);await n(t.optsWithGlobals())}),D(t.command(`get`).description(`Show workflow details`).argument(`<workflowId>`,`Workflow to show`).option(`--show-source`,`Print the full script source`)).action(async(e,t,n)=>{let{showWorkflow:r}=await import(`./workflow-BZblFLYG.js`);await r(e,n.optsWithGlobals())}),D(t.command(`create`).description(`Create a workflow from a local script file`).requiredOption(`--name <text>`,`Workflow name`).requiredOption(`--file <path>`,`Script source file (.js)`).option(`--description <text>`,`Workflow description`)).action(async(e,t)=>{let{createWorkflow:n}=await import(`./workflow-BZblFLYG.js`);await n(t.optsWithGlobals())}),D(t.command(`update`).description(`Update name, description, script, or active state`).argument(`<workflowId>`,`Workflow to update`).option(`--name <text>`,`Workflow name`).option(`--description <text>`,`Workflow description`).option(`--file <path>`,`Script source file (.js)`).addOption(new g(`--activate`,`Enable the workflow`).conflicts(`deactivate`)).option(`--deactivate`,`Disable the workflow`)).action(async(e,t,n)=>{let{updateWorkflow:r}=await import(`./workflow-BZblFLYG.js`);await r(e,n.optsWithGlobals())}),D(t.command(`run`).description(`Trigger a run`).argument(`<workflowId>`,`Workflow to run`).addOption(new g(`--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-BZblFLYG.js`);await r(e,n.optsWithGlobals())}),D(k(t.command(`runs`).description(`List runs of a workflow`).argument(`<workflowId>`,`Workflow whose runs to list`),20)).action(async(e,t,n)=>{let{listWorkflowRuns:r}=await import(`./workflow-BZblFLYG.js`);await r(e,n.optsWithGlobals())}),D(t.command(`run-get`).description(`Show a run's status, nodes, and logs`).argument(`<workflowId>`,`Workflow the run belongs to`).argument(`<runId>`,`Run to show`)).action(async(e,t,n,r)=>{let{showWorkflowRun:i}=await import(`./workflow-BZblFLYG.js`);await i(e,t,r.optsWithGlobals())}),D(j(t.command(`share`).description(`Show or manage sharing (user grants)`).argument(`<workflowId>`,`Workflow to share`))).action(async(e,t,n)=>{let{shareWorkflow:r}=await import(`./workflow-BZblFLYG.js`);await r(e,n.optsWithGlobals())})}function Le(e){let t=e.command(`workspaces`).summary(`List or switch workspaces`).helpGroup(M.workspace);D(t.command(`list`,{isDefault:!0}).description(`List all workspaces`)).action(async(e,t)=>{let{listWorkspaces:n}=await import(`./workspaces-DE3ileKk.js`);await n(t.optsWithGlobals())}),D(t.command(`switch`).alias(`use`).description(`Switch to a workspace`).argument(`<workspaceId>`,`Workspace to switch to`)).action(async(e,t,n)=>{let{switchWorkspace:r}=await import(`./workspaces-DE3ileKk.js`);await r(e,n.optsWithGlobals())})}function Y(e){return e.commands.length>0}function X(e,t){return e.options.some(e=>e.long===t)}function Z(e,t){return e.name()===t||e.aliases().includes(t)}function Re(e){Y(e)&&!X(e,`--json`)&&e.addOption(new g(`--json`).hideHelp()),X(e,`--profile`)||e.addOption(new g(E).hideHelp())}function Q(e){e.hook(`preSubcommand`,(e,t)=>{let[n]=e.args;n===void 0||n.startsWith(`-`)||Z(t,n)||t.registeredArguments.length>0||e.commands.some(e=>Z(e,n))||e.error(`error: unknown command '${n}'`,{code:`commander.unknownCommand`})})}function $(e,t){t||Re(e),Y(e)&&Q(e);for(let t of e.commands)t.name()!==`help`&&$(t,!1)}function ze(e){let t=e.optsWithGlobals().profile;return typeof t==`string`?t:void 0}function Be(e){let t=e;for(;t.parent?.parent;)t=t.parent;return t.name()}function Ve(){let e=N();return e.hook(`preAction`,(e,t)=>{if(Be(t)===`profile`)return;let n=ze(t)??f.getCurrentProfileName();f.ensureProfileExists(n),f.setOverrideProfile(n)}),Me(e),Ne(e),Pe(e),F(e),we(e),Te(e),Ee(e),Le(e),De(e),V(e),fe(e),Ie(e),_e(e),je(e),Ce(e),be(e),ve(e),Fe(e),R(e),I(e),B(e),ye(e),Oe(e),ke(e),Ae(e),$(e,!0),e}try{await Ve().parseAsync(process.argv)}catch(e){l(e)}export{};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{C as e,S as t,T as n,_ as r,b as i,h as a,p as o,y as s}from"./profile-storage-mtd3aKrx.js";async function c(c){let l=r();if(l){c.json?console.log(JSON.stringify({alreadyAuthenticated:!0,authSource:`sandbox-env`,workspaceId:l.workspaceId})):(console.log(`Already authenticated via ${a}.`),console.log(`No login required — environment credentials are active.`));return}s()&&console.error(`Warning: ENTRYDESK_TOKEN is set — workspace commands will keep using it instead of the credentials saved by this login. Unset ENTRYDESK_TOKEN if you want this login to take effect.`),process.env.DEBUG&&(console.log(`[DEBUG] Hub URL: ${n()}`),console.log(`[DEBUG] API URL: ${e()}`));let u=await o({onDeviceCodeReceived:(e,t)=>{c.json||(console.log(``),console.log(`To finish logging in:`),console.log(``),console.log(` 1. Visit: ${t}`),console.log(` 2. Enter code: ${e}`),console.log(``))},onBrowserOpening:()=>{c.json||console.log(`Opening browser…`)},onWaitingForAuthorization:()=>{c.json||console.log(`Waiting for authorization…`)},onAuthorized:()=>{c.json||console.log(`Authorization successful.`)},onWarning:e=>{console.error(`Warning: ${e}`)}}),{workspaces:d}=await new i().getWorkspaces(u.accessToken),f=d[0];await t.saveAll({accessToken:u.accessToken,refreshToken:u.refreshToken,email:u.email,workspaceId:f?.id}),c.json?console.log(JSON.stringify({email:u.email,workspaceId:f?.id,workspaceName:f?.name,server:e()})):(console.log(`Logged in as ${u.email}`),f&&console.log(`Workspace: ${f.name}`),console.log(`Server: ${e()}`))}export{c as runLogin};
2
+ import{C as e,S as t,T as n,_ as r,b as i,h as a,p as o,y as s}from"./profile-storage-CsigYr0Q.js";async function c(c){let l=r();if(l){c.json?console.log(JSON.stringify({alreadyAuthenticated:!0,authSource:`sandbox-env`,workspaceId:l.workspaceId})):(console.log(`Already authenticated via ${a}.`),console.log(`No login required — environment credentials are active.`));return}s()&&console.error(`Warning: ENTRYDESK_TOKEN is set — workspace commands will keep using it instead of the credentials saved by this login. Unset ENTRYDESK_TOKEN if you want this login to take effect.`),process.env.DEBUG&&(console.log(`[DEBUG] Hub URL: ${n()}`),console.log(`[DEBUG] API URL: ${e()}`));let u=await o({onDeviceCodeReceived:(e,t)=>{c.json||(console.log(``),console.log(`To finish logging in:`),console.log(``),console.log(` 1. Visit: ${t}`),console.log(` 2. Enter code: ${e}`),console.log(``))},onBrowserOpening:()=>{c.json||console.log(`Opening browser…`)},onWaitingForAuthorization:()=>{c.json||console.log(`Waiting for authorization…`)},onAuthorized:()=>{c.json||console.log(`Authorization successful.`)},onWarning:e=>{console.error(`Warning: ${e}`)}}),{workspaces:d}=await new i().getWorkspaces(u.accessToken),f=d[0];await t.saveAll({accessToken:u.accessToken,refreshToken:u.refreshToken,email:u.email,workspaceId:f?.id}),c.json?console.log(JSON.stringify({email:u.email,workspaceId:f?.id,workspaceName:f?.name,server:e()})):(console.log(`Logged in as ${u.email}`),f&&console.log(`Workspace: ${f.name}`),console.log(`Server: ${e()}`))}export{c as runLogin};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{S as e,b as t,f as n}from"./profile-storage-mtd3aKrx.js";async function r(){let r=await e.getAll();if(!r){console.log(`Not logged in.`);return}try{r.refreshToken&&await new t().revokeOAuthToken({token:r.refreshToken,clientId:n})}catch{}await e.clear(),console.log(`Logged out.`)}export{r as runLogout};
2
+ import{S as e,b as t,f as n}from"./profile-storage-CsigYr0Q.js";async function r(){let r=await e.getAll();if(!r){console.log(`Not logged in.`);return}try{r.refreshToken&&await new t().revokeOAuthToken({token:r.refreshToken,clientId:n})}catch{}await e.clear(),console.log(`Logged out.`)}export{r as runLogout};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{O as e,b as t,l as n}from"./profile-storage-mtd3aKrx.js";import{isHTTPError as r}from"ky";function i(e){return r(e)&&e.response.status===404}var a=class extends Error{slug;constructor(e){super(`"${e}" matches both an agent and a skill`),this.slug=e,this.name=`AmbiguousResourceError`}},o=class extends Error{slug;constructor(e){super(`Marketplace resource not found: ${e}`),this.slug=e,this.name=`ResourceNotFoundError`}};async function s(e){try{return await e}catch(e){if(i(e))return null;throw e}}async function c(e,t,n){if(n===`agent`)return{type:n,view:await e.getMarketplaceAgent(t)};if(n===`skill`)return{type:n,view:await e.getMarketplaceSkill(t)};let[r,i]=await Promise.all([s(e.getMarketplaceAgent(t)),s(e.getMarketplaceSkill(t))]);if(r&&i)throw new a(t);if(r)return{type:`agent`,view:r};if(i)return{type:`skill`,view:i};throw new o(t)}async function l(e,t){try{return await t()}catch(t){throw t instanceof a&&(console.error(`"${t.slug}" matches both an agent and a skill. Re-run with --type agent|skill.`),process.exit(1)),(t instanceof o||i(t))&&(console.error(`Marketplace resource not found: ${e}`),process.exit(1)),t}}async function u(e,n){let r=await new t().searchMarketplace({type:n.type,tag:e??n.tag,limit:n.limit,cursor:n.cursor});if(n.json){console.log(JSON.stringify(r));return}if(r.items.length===0){console.log(`No marketplace resources found.`);return}console.log(`Marketplace (${r.items.length}):\n`);for(let e of r.items)console.log(` ${e.name} [${e.type}]`),console.log(` Slug: ${e.slug}`),e.description&&console.log(` ${e.description}`),e.tags.length>0&&console.log(` Tags: ${e.tags.map(e=>e.label).join(`, `)}`),console.log(``);r.nextCursor&&console.log(`More results: --cursor ${r.nextCursor}`)}async function d(e,n){let{type:r,view:i}=await l(e,()=>c(new t,e,n.type));if(n.json){console.log(JSON.stringify(i));return}if(console.log(`${i.name} [${r}]`),console.log(`Slug: ${i.slug}`),i.description&&console.log(`\n${i.description}`),i.tags.length>0&&console.log(`\nTags: ${i.tags.map(e=>e.label).join(`, `)}`),r===`agent`){if(i.starterPrompts.length>0){console.log(`
2
+ import{O as e,b as t,l as n}from"./profile-storage-CsigYr0Q.js";import{isHTTPError as r}from"ky";function i(e){return r(e)&&e.response.status===404}var a=class extends Error{slug;constructor(e){super(`"${e}" matches both an agent and a skill`),this.slug=e,this.name=`AmbiguousResourceError`}},o=class extends Error{slug;constructor(e){super(`Marketplace resource not found: ${e}`),this.slug=e,this.name=`ResourceNotFoundError`}};async function s(e){try{return await e}catch(e){if(i(e))return null;throw e}}async function c(e,t,n){if(n===`agent`)return{type:n,view:await e.getMarketplaceAgent(t)};if(n===`skill`)return{type:n,view:await e.getMarketplaceSkill(t)};let[r,i]=await Promise.all([s(e.getMarketplaceAgent(t)),s(e.getMarketplaceSkill(t))]);if(r&&i)throw new a(t);if(r)return{type:`agent`,view:r};if(i)return{type:`skill`,view:i};throw new o(t)}async function l(e,t){try{return await t()}catch(t){throw t instanceof a&&(console.error(`"${t.slug}" matches both an agent and a skill. Re-run with --type agent|skill.`),process.exit(1)),(t instanceof o||i(t))&&(console.error(`Marketplace resource not found: ${e}`),process.exit(1)),t}}async function u(e,n){let r=await new t().searchMarketplace({type:n.type,tag:e??n.tag,limit:n.limit,cursor:n.cursor});if(n.json){console.log(JSON.stringify(r));return}if(r.items.length===0){console.log(`No marketplace resources found.`);return}console.log(`Marketplace (${r.items.length}):\n`);for(let e of r.items)console.log(` ${e.name} [${e.type}]`),console.log(` Slug: ${e.slug}`),e.description&&console.log(` ${e.description}`),e.tags.length>0&&console.log(` Tags: ${e.tags.map(e=>e.label).join(`, `)}`),console.log(``);r.nextCursor&&console.log(`More results: --cursor ${r.nextCursor}`)}async function d(e,n){let{type:r,view:i}=await l(e,()=>c(new t,e,n.type));if(n.json){console.log(JSON.stringify(i));return}if(console.log(`${i.name} [${r}]`),console.log(`Slug: ${i.slug}`),i.description&&console.log(`\n${i.description}`),i.tags.length>0&&console.log(`\nTags: ${i.tags.map(e=>e.label).join(`, `)}`),r===`agent`){if(i.starterPrompts.length>0){console.log(`
3
3
  Starter prompts:`);for(let e of i.starterPrompts)console.log(` - ${e}`)}if(i.connectors.length>0){console.log(`
4
4
  Connectors:`);for(let e of i.connectors)console.log(` - ${e.name} (${e.provider})`)}}console.log(`\nInstall with: entrydesk marketplace install ${i.slug} --type ${r}`)}async function f(r,i){let a=new t,{accessToken:o,workspaceId:s}=await n(),{type:u}=i.type?{type:i.type}:await l(r,()=>c(a,r)),d=await l(r,()=>a.installMarketplaceResource(o,s,u,r,e.getToolApprovalMode()??void 0));if(i.json){console.log(JSON.stringify(d));return}console.log(`Installed ${u} "${r}" into the workspace.`),console.log(` ${u} ID: ${d.resourceId}`),d.taskId&&(console.log(` Setup task: ${d.taskId}`),console.log(` Continue setup: entrydesk tasks ${d.taskId}`))}async function p(e){let{items:n}=await new t().listMarketplaceRoles();if(e.json){console.log(JSON.stringify(n));return}if(n.length===0){console.log(`No marketplace roles found.`);return}console.log(`Marketplace roles (${n.length}):\n`);for(let e of n)console.log(` ${e.tag} ${e.name}`),e.tagline&&console.log(` ${e.tagline}`)}export{f as installMarketplaceResource,u as searchMarketplace,d as showMarketplaceResource,p as showMarketplaceRoles};
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{S as e,d as t,l as n,u as r,w as i}from"./profile-storage-mtd3aKrx.js";import{r as a,t as o}from"./mcp-client-Cr_sHGPw.js";import s from"node:http";import{stderr as c}from"node:process";import{NodeStreamableHTTPServerTransport as l}from"@modelcontextprotocol/node";import{Server as u}from"@modelcontextprotocol/server";import{StdioServerTransport as d}from"@modelcontextprotocol/server/stdio";function f(e){c.write(`${e}\n`)}function p(e,t,n){return o({apiUrl:e,accessToken:t,workspaceId:n,name:`entrydesk-cli-proxy`})}function m(e){let t=new u({name:`entrydesk-cli`,version:`1.0.0`},{capabilities:{tools:{}}});return t.setRequestHandler(`tools/list`,async(t,n)=>({tools:(await(await e()).listTools({},a({signal:n.mcpReq.signal}))).tools})),t.setRequestHandler(`tools/call`,async(t,n)=>{let{name:r,arguments:i}=t.params,{progressToken:o}=n.mcpReq._meta??{},s=await(await e()).callTool({name:r,arguments:i},a({signal:n.mcpReq.signal,onProgress:o===void 0?void 0:e=>{n.mcpReq.notify({method:`notifications/progress`,params:{...e,progressToken:o}}).catch(()=>{})}})),c=Array.isArray(s.content)?[...s.content]:[];return s.structuredContent&&c.push({type:`text`,text:JSON.stringify(s.structuredContent,null,2)}),{content:c,structuredContent:s.structuredContent,isError:s.isError}}),t}async function h(e,t,n){let r=s.createServer(async(t,n)=>{if(t.method===`OPTIONS`){n.setHeader(`Access-Control-Allow-Origin`,`*`),n.setHeader(`Access-Control-Allow-Methods`,`GET, POST, DELETE, OPTIONS`),n.setHeader(`Access-Control-Allow-Headers`,`Content-Type, Accept`),n.writeHead(204),n.end();return}if(t.url!==`/mcp`){n.writeHead(404,{"Content-Type":`application/json`}),n.end(JSON.stringify({error:`Not found`}));return}let r=m(e),i=new l({sessionIdGenerator:void 0});if(n.setHeader(`Access-Control-Allow-Origin`,`*`),n.on(`close`,()=>{i.close(),r.close()}),await r.connect(i),t.method===`POST`){let e=``;t.on(`data`,t=>{e+=t.toString()}),t.on(`end`,async()=>{try{let r=JSON.parse(e);await i.handleRequest(t,n,r)}catch{n.writeHead(400,{"Content-Type":`application/json`}),n.end(JSON.stringify({error:`Invalid JSON`}))}})}else await i.handleRequest(t,n)});r.listen(n,()=>{f(`EntryDesk MCP server running at http://localhost:${n}/mcp`),f(`Press Ctrl+C to stop`)}),process.on(`SIGINT`,async()=>{f(`
2
+ import{S as e,d as t,l as n,u as r,w as i}from"./profile-storage-CsigYr0Q.js";import{r as a,t as o}from"./mcp-client-CmjAqUI6.js";import s from"node:http";import{stderr as c}from"node:process";import{NodeStreamableHTTPServerTransport as l}from"@modelcontextprotocol/node";import{Server as u}from"@modelcontextprotocol/server";import{StdioServerTransport as d}from"@modelcontextprotocol/server/stdio";function f(e){c.write(`${e}\n`)}function p(e,t,n){return o({apiUrl:e,accessToken:t,workspaceId:n,name:`entrydesk-cli-proxy`})}function m(e){let t=new u({name:`entrydesk-cli`,version:`1.0.0`},{capabilities:{tools:{}}});return t.setRequestHandler(`tools/list`,async(t,n)=>({tools:(await(await e()).listTools({},a({signal:n.mcpReq.signal}))).tools})),t.setRequestHandler(`tools/call`,async(t,n)=>{let{name:r,arguments:i}=t.params,{progressToken:o}=n.mcpReq._meta??{},s=await(await e()).callTool({name:r,arguments:i},a({signal:n.mcpReq.signal,onProgress:o===void 0?void 0:e=>{n.mcpReq.notify({method:`notifications/progress`,params:{...e,progressToken:o}}).catch(()=>{})}})),c=Array.isArray(s.content)?[...s.content]:[];return s.structuredContent&&c.push({type:`text`,text:JSON.stringify(s.structuredContent,null,2)}),{content:c,structuredContent:s.structuredContent,isError:s.isError}}),t}async function h(e,t,n){let r=s.createServer(async(t,n)=>{if(t.method===`OPTIONS`){n.setHeader(`Access-Control-Allow-Origin`,`*`),n.setHeader(`Access-Control-Allow-Methods`,`GET, POST, DELETE, OPTIONS`),n.setHeader(`Access-Control-Allow-Headers`,`Content-Type, Accept`),n.writeHead(204),n.end();return}if(t.url!==`/mcp`){n.writeHead(404,{"Content-Type":`application/json`}),n.end(JSON.stringify({error:`Not found`}));return}let r=m(e),i=new l({sessionIdGenerator:void 0});if(n.setHeader(`Access-Control-Allow-Origin`,`*`),n.on(`close`,()=>{i.close(),r.close()}),await r.connect(i),t.method===`POST`){let e=``;t.on(`data`,t=>{e+=t.toString()}),t.on(`end`,async()=>{try{let r=JSON.parse(e);await i.handleRequest(t,n,r)}catch{n.writeHead(400,{"Content-Type":`application/json`}),n.end(JSON.stringify({error:`Invalid JSON`}))}})}else await i.handleRequest(t,n)});r.listen(n,()=>{f(`EntryDesk MCP server running at http://localhost:${n}/mcp`),f(`Press Ctrl+C to stop`)}),process.on(`SIGINT`,async()=>{f(`
3
3
  Shutting down…`),r.close(),await t(),process.exit(0)}),process.on(`SIGTERM`,async()=>{r.close(),await t(),process.exit(0)})}async function g(e,t){let n=m(e),r=new d;r.onclose=async()=>{await t()},await n.connect(r)}const _={mode:`stdio`};async function v(a=_){process.on(`unhandledRejection`,e=>{console.error(`[entrydesk-mcp] Unhandled rejection:`,e)}),process.on(`uncaughtException`,e=>{console.error(`[entrydesk-mcp] Uncaught exception:`,e)});try{f(`[entrydesk-mcp] Starting MCP server…`);let o,s;try{let e=await n();o=e.accessToken,s=e.workspaceId}catch(e){let t=e instanceof Error?e.message:`Authentication failed`;console.error(t),process.exit(1)}let{apiUrl:c,mcp:l}=i();f(`[entrydesk-mcp] Connecting to ${c}…`),f(`[entrydesk-mcp] Workspace: ${s}`);let u=await p(c,o,s);f(`[entrydesk-mcp] Connected to EntryDesk API`);let d=null,m=async()=>r(o)?d||(d=(async()=>{f(`[entrydesk-mcp] Token expiring soon, refreshing…`);let n=await e.getAll();if(!n?.accessToken)throw Error("Not logged in. Run `entrydesk login` again.");let r=await t(n);if(r!==o){o=r;try{await u.close()}catch{}u=await p(c,o,s),f(`[entrydesk-mcp] Token refreshed, reconnected`)}return u})().finally(()=>{d=null}),d):u,_=async()=>{try{await u.close()}catch{}};a.mode===`http`?await h(m,_,a.port??l.httpPort):(f(`[entrydesk-mcp] Starting stdio server…`),await g(m,_),f(`[entrydesk-mcp] Stdio server started`))}catch(e){console.error(`[entrydesk-mcp] Fatal error:`,e),process.exit(1)}}export{v as startMcpServer};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{E as e,l as t,w as n,x as r}from"./profile-storage-mtd3aKrx.js";import{Client as i,StreamableHTTPClientTransport as a}from"@modelcontextprotocol/client";const o=()=>{};function s(t={}){let{requestTimeout:n,requestMaxTotalTimeout:r}=e();return{timeout:n,maxTotalTimeout:r,resetTimeoutOnProgress:!0,onprogress:t.onProgress??o,signal:t.signal}}async function c(e={}){let o=e.apiUrl,s=e.accessToken,c=e.workspaceId;if(!s||!c){let e=await t();s||=e.accessToken,c||=e.workspaceId}o||=n().apiUrl;let l=new i({name:e.name??`entrydesk-cli`,version:`1.0.0`}),u=new a(new URL(`${o}/v1/workspaces/${c}/mcp`),{requestInit:{headers:{Authorization:`Bearer ${s}`,...r()}}});return await l.connect(u),l}async function l(){return c()}export{l as n,s as r,c as t};
2
+ import{E as e,l as t,w as n,x as r}from"./profile-storage-CsigYr0Q.js";import{Client as i,StreamableHTTPClientTransport as a}from"@modelcontextprotocol/client";const o=()=>{};function s(t={}){let{requestTimeout:n,requestMaxTotalTimeout:r}=e();return{timeout:n,maxTotalTimeout:r,resetTimeoutOnProgress:!0,onprogress:t.onProgress??o,signal:t.signal}}async function c(e={}){let o=e.apiUrl,s=e.accessToken,c=e.workspaceId;if(!s||!c){let e=await t();s||=e.accessToken,c||=e.workspaceId}o||=n().apiUrl;let l=new i({name:e.name??`entrydesk-cli`,version:`1.0.0`}),u=new a(new URL(`${o}/v1/workspaces/${c}/mcp`),{requestInit:{headers:{Authorization:`Bearer ${s}`,...r()}}});return await l.connect(u),l}async function l(){return c()}export{l as n,s as r,c as t};
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{P as e,b as t,l as n}from"./profile-storage-mtd3aKrx.js";function r(e){if(!e)return``;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function i(e){return!e||e<=0?``:`${Math.round(e/60)}m`}function a(e){console.log(`Meetings (${e.length}):\n`);for(let t of e){let e=[`(${t.status??`unknown`})`],n=r(t.startTime??t.sortTime);n&&e.push(n),t.hasRecordings&&e.push(`🎙️`),e.push(t.isOwner?`owner`:t.myRole),console.log(` ${t.title}`),console.log(` ${e.join(` · `)}`),t.processingStatus&&console.log(` processing: ${t.processingStatus}`),console.log(` ID: ${t.id}`),console.log(``)}}function o(e){if(console.log(`${e.title}\n`),console.log(` ID: ${e.id}`),console.log(` Status: ${e.status}`),console.log(` Visibility: ${e.visibility}`),console.log(` Source: ${e.source}`),e.myRole&&console.log(` My role: ${e.isOwner?`owner`:e.myRole}`),e.startTime&&console.log(` Start: ${r(e.startTime)}`),e.endTime&&console.log(` End: ${r(e.endTime)}`),e.location&&console.log(` Location: ${e.location}`),e.conferenceLink&&console.log(` Conference: ${e.conferenceLink}`),e.participants&&e.participants.length>0){console.log(` Participants (${e.participants.length}):`);for(let t of e.participants){let e=t.displayName??t.email;console.log(` - ${e}${t.role?` (${t.role})`:``}`)}}e.summary&&console.log(`\n Summary:\n${e.summary}`);let t=e.recordings??[];if(console.log(`\n Recordings (${t.length}):`),t.length===0){console.log(` (none)`);return}for(let e of t){let t=[];e.processingStatus&&t.push(e.processingStatus);let n=i(e.duration);n&&t.push(n),e.hasTranscript&&t.push(`transcript✓`),e.hasSummary&&t.push(`summary✓`),console.log(` - ${e.title}`),t.length>0&&console.log(` ${t.join(` · `)}`),console.log(` ID: ${e.id}`)}}function s(e){if(console.log(`Visibility: ${e.visibility}\n`),console.log(`User grants (${e.userGrants.length}):`),e.userGrants.length===0)console.log(` (none)`);else for(let t of e.userGrants)console.log(` - ${t.userName} <${t.userEmail}> · ${t.role}`),console.log(` ID: ${t.userId}`);if(console.log(`\nTeam grants (${e.teamGrants.length}):`),e.teamGrants.length===0)console.log(` (none)`);else for(let t of e.teamGrants)console.log(` - ${t.teamName} (${t.memberCount} members) · ${t.role}`),console.log(` ID: ${t.teamId}`)}async function c(e){let{accessToken:r,workspaceId:i}=await n(),o=new t,s={search:e.search,filter:e.filter,sortBy:e.sort};if(e.all){let t=[],n;for(let a=0;;a++){a>=100&&(console.error(`Reached maximum page limit (100). Use --limit and --next-key for manual pagination.`),process.exit(1));let c=await o.getMeetings(r,i,{limit:e.limit??20,nextKey:n,...s});if(t.push(...c.meetings),n=c.nextKey,!n)break}if(e.json){console.log(JSON.stringify({meetings:t}));return}if(t.length===0){console.log(`No meetings found in this workspace.`);return}a(t);return}let{meetings:c,nextKey:l}=await o.getMeetings(r,i,{limit:e.limit,nextKey:e.nextKey,...s});if(e.json){console.log(JSON.stringify({meetings:c,nextKey:l}));return}if(c.length===0){console.log(`No meetings found in this workspace.`);return}a(c),l&&console.log(`Next page: --next-key ${l}`)}async function l(e,r){let{accessToken:i,workspaceId:a}=await n(),s=await new t().getMeeting(i,a,e);if(r.json){console.log(JSON.stringify(s));return}o(s)}async function u(e){let{accessToken:r,workspaceId:i}=await n(),a={title:e.title};e.description!==void 0&&(a.description=e.description),e.location!==void 0&&(a.location=e.location),e.start!==void 0&&(a.startTime=e.start),e.end!==void 0&&(a.endTime=e.end),e.conferenceLink!==void 0&&(a.conferenceLink=e.conferenceLink),e.notes!==void 0&&(a.notes=e.notes);let o=await new t().createMeeting(r,i,a);if(e.json){console.log(JSON.stringify(o));return}console.log(`Created meeting: ${o.title}`),console.log(` ID: ${o.id}`)}async function d(e,r){let i={};r.title!==void 0&&(i.title=r.title),r.description!==void 0&&(i.description=r.description),r.location!==void 0&&(i.location=r.location),r.start!==void 0&&(i.startTime=r.start),r.end!==void 0&&(i.endTime=r.end),r.conferenceLink!==void 0&&(i.conferenceLink=r.conferenceLink),r.notes!==void 0&&(i.notes=r.notes),r.status!==void 0&&(i.status=r.status),r.visibility!==void 0&&(i.visibility=r.visibility),Object.keys(i).length===0&&(console.error(`No fields provided to update.`),process.exit(1));let{accessToken:a,workspaceId:o}=await n(),s=await new t().updateMeeting(a,o,e,i);if(r.json){console.log(JSON.stringify(s));return}console.log(`Updated meeting: ${e}`)}async function f(e,r){let{accessToken:i,workspaceId:a}=await n();if(await new t().deleteMeeting(i,a,e),r.json){console.log(JSON.stringify({id:e,deleted:!0}));return}console.log(`Deleted meeting: ${e}`)}async function p(r,i){let{accessToken:a,workspaceId:o}=await n(),s=e(await new t().getMeeting(a,o,r));if(i.json){console.log(JSON.stringify({summary:s??null}));return}s||(console.error(`This meeting has no summary yet.`),process.exit(1)),console.log(s)}async function m(e,r){let{accessToken:i,workspaceId:a}=await n(),o=await new t().getRecording(i,a,e),s=r.raw?o.transcriptWithTimestamps:o.transcript;if(r.json){console.log(JSON.stringify({transcript:s,processingStatus:o.processingStatus}));return}s||(console.error(o.processingStatus&&o.processingStatus!==`completed`?`Transcript not ready (processing status: ${o.processingStatus}).`:`This recording has no transcript.`),process.exit(1)),console.log(s)}async function h(e,i){let{accessToken:a,workspaceId:o}=await n(),{previous:s}=await new t().getMeetingPreviousBrief(a,o,e);if(i.json){console.log(JSON.stringify({previous:s}));return}if(!s){console.log(`No previous meeting found in this series.`);return}if(console.log(`Previous: ${s.title}`),s.startTime&&console.log(` ${r(s.startTime)}`),s.summary&&console.log(`\nSummary:\n${s.summary}`),s.actionItems.length>0){console.log(`
2
+ import{P as e,b as t,l as n}from"./profile-storage-CsigYr0Q.js";function r(e){if(!e)return``;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function i(e){return!e||e<=0?``:`${Math.round(e/60)}m`}function a(e){console.log(`Meetings (${e.length}):\n`);for(let t of e){let e=[`(${t.status??`unknown`})`],n=r(t.startTime??t.sortTime);n&&e.push(n),t.hasRecordings&&e.push(`🎙️`),e.push(t.isOwner?`owner`:t.myRole),console.log(` ${t.title}`),console.log(` ${e.join(` · `)}`),t.processingStatus&&console.log(` processing: ${t.processingStatus}`),console.log(` ID: ${t.id}`),console.log(``)}}function o(e){if(console.log(`${e.title}\n`),console.log(` ID: ${e.id}`),console.log(` Status: ${e.status}`),console.log(` Visibility: ${e.visibility}`),console.log(` Source: ${e.source}`),e.myRole&&console.log(` My role: ${e.isOwner?`owner`:e.myRole}`),e.startTime&&console.log(` Start: ${r(e.startTime)}`),e.endTime&&console.log(` End: ${r(e.endTime)}`),e.location&&console.log(` Location: ${e.location}`),e.conferenceLink&&console.log(` Conference: ${e.conferenceLink}`),e.participants&&e.participants.length>0){console.log(` Participants (${e.participants.length}):`);for(let t of e.participants){let e=t.displayName??t.email;console.log(` - ${e}${t.role?` (${t.role})`:``}`)}}e.summary&&console.log(`\n Summary:\n${e.summary}`);let t=e.recordings??[];if(console.log(`\n Recordings (${t.length}):`),t.length===0){console.log(` (none)`);return}for(let e of t){let t=[];e.processingStatus&&t.push(e.processingStatus);let n=i(e.duration);n&&t.push(n),e.hasTranscript&&t.push(`transcript✓`),e.hasSummary&&t.push(`summary✓`),console.log(` - ${e.title}`),t.length>0&&console.log(` ${t.join(` · `)}`),console.log(` ID: ${e.id}`)}}function s(e){if(console.log(`Visibility: ${e.visibility}\n`),console.log(`User grants (${e.userGrants.length}):`),e.userGrants.length===0)console.log(` (none)`);else for(let t of e.userGrants)console.log(` - ${t.userName} <${t.userEmail}> · ${t.role}`),console.log(` ID: ${t.userId}`);if(console.log(`\nTeam grants (${e.teamGrants.length}):`),e.teamGrants.length===0)console.log(` (none)`);else for(let t of e.teamGrants)console.log(` - ${t.teamName} (${t.memberCount} members) · ${t.role}`),console.log(` ID: ${t.teamId}`)}async function c(e){let{accessToken:r,workspaceId:i}=await n(),o=new t,s={search:e.search,filter:e.filter,sortBy:e.sort};if(e.all){let t=[],n;for(let a=0;;a++){a>=100&&(console.error(`Reached maximum page limit (100). Use --limit and --next-key for manual pagination.`),process.exit(1));let c=await o.getMeetings(r,i,{limit:e.limit??20,nextKey:n,...s});if(t.push(...c.meetings),n=c.nextKey,!n)break}if(e.json){console.log(JSON.stringify({meetings:t}));return}if(t.length===0){console.log(`No meetings found in this workspace.`);return}a(t);return}let{meetings:c,nextKey:l}=await o.getMeetings(r,i,{limit:e.limit,nextKey:e.nextKey,...s});if(e.json){console.log(JSON.stringify({meetings:c,nextKey:l}));return}if(c.length===0){console.log(`No meetings found in this workspace.`);return}a(c),l&&console.log(`Next page: --next-key ${l}`)}async function l(e,r){let{accessToken:i,workspaceId:a}=await n(),s=await new t().getMeeting(i,a,e);if(r.json){console.log(JSON.stringify(s));return}o(s)}async function u(e){let{accessToken:r,workspaceId:i}=await n(),a={title:e.title};e.description!==void 0&&(a.description=e.description),e.location!==void 0&&(a.location=e.location),e.start!==void 0&&(a.startTime=e.start),e.end!==void 0&&(a.endTime=e.end),e.conferenceLink!==void 0&&(a.conferenceLink=e.conferenceLink),e.notes!==void 0&&(a.notes=e.notes);let o=await new t().createMeeting(r,i,a);if(e.json){console.log(JSON.stringify(o));return}console.log(`Created meeting: ${o.title}`),console.log(` ID: ${o.id}`)}async function d(e,r){let i={};r.title!==void 0&&(i.title=r.title),r.description!==void 0&&(i.description=r.description),r.location!==void 0&&(i.location=r.location),r.start!==void 0&&(i.startTime=r.start),r.end!==void 0&&(i.endTime=r.end),r.conferenceLink!==void 0&&(i.conferenceLink=r.conferenceLink),r.notes!==void 0&&(i.notes=r.notes),r.status!==void 0&&(i.status=r.status),r.visibility!==void 0&&(i.visibility=r.visibility),Object.keys(i).length===0&&(console.error(`No fields provided to update.`),process.exit(1));let{accessToken:a,workspaceId:o}=await n(),s=await new t().updateMeeting(a,o,e,i);if(r.json){console.log(JSON.stringify(s));return}console.log(`Updated meeting: ${e}`)}async function f(e,r){let{accessToken:i,workspaceId:a}=await n();if(await new t().deleteMeeting(i,a,e),r.json){console.log(JSON.stringify({id:e,deleted:!0}));return}console.log(`Deleted meeting: ${e}`)}async function p(r,i){let{accessToken:a,workspaceId:o}=await n(),s=e(await new t().getMeeting(a,o,r));if(i.json){console.log(JSON.stringify({summary:s??null}));return}s||(console.error(`This meeting has no summary yet.`),process.exit(1)),console.log(s)}async function m(e,r){let{accessToken:i,workspaceId:a}=await n(),o=await new t().getRecording(i,a,e),s=r.raw?o.transcriptWithTimestamps:o.transcript;if(r.json){console.log(JSON.stringify({transcript:s,processingStatus:o.processingStatus}));return}s||(console.error(o.processingStatus&&o.processingStatus!==`completed`?`Transcript not ready (processing status: ${o.processingStatus}).`:`This recording has no transcript.`),process.exit(1)),console.log(s)}async function h(e,i){let{accessToken:a,workspaceId:o}=await n(),{previous:s}=await new t().getMeetingPreviousBrief(a,o,e);if(i.json){console.log(JSON.stringify({previous:s}));return}if(!s){console.log(`No previous meeting found in this series.`);return}if(console.log(`Previous: ${s.title}`),s.startTime&&console.log(` ${r(s.startTime)}`),s.summary&&console.log(`\nSummary:\n${s.summary}`),s.actionItems.length>0){console.log(`
3
3
  Action items:`);for(let e of s.actionItems){let t=e.completed?`[x]`:`[ ]`,n=e.assignee?` (@${e.assignee})`:``;console.log(` ${t} ${e.description}${n}`)}}}async function g(e,r){let{accessToken:i,workspaceId:a}=await n(),o=new t;if(r.addUser){let t=await o.upsertMeetingUserGrant(i,a,e,r.addUser,r.role);if(r.json){console.log(JSON.stringify(t));return}console.log(`Granted ${r.role} to user ${r.addUser}`);return}if(r.removeUser){if(await o.removeMeetingUserGrant(i,a,e,r.removeUser),r.json){console.log(JSON.stringify({userId:r.removeUser,removed:!0}));return}console.log(`Revoked access for user ${r.removeUser}`);return}if(r.addTeam){let t=await o.upsertMeetingTeamGrant(i,a,e,r.addTeam,r.role);if(r.json){console.log(JSON.stringify(t));return}console.log(`Granted ${r.role} to team ${r.addTeam}`);return}if(r.removeTeam){if(await o.removeMeetingTeamGrant(i,a,e,r.removeTeam),r.json){console.log(JSON.stringify({teamId:r.removeTeam,removed:!0}));return}console.log(`Revoked access for team ${r.removeTeam}`);return}if(r.visibility){let t=await o.updateMeeting(i,a,e,{visibility:r.visibility});if(r.json){console.log(JSON.stringify({visibility:t.visibility}));return}console.log(`Set visibility to ${t.visibility}`);return}let c=await o.getMeetingShares(i,a,e);if(r.json){console.log(JSON.stringify(c));return}s(c)}export{u as createMeeting,f as deleteMeeting,c as listMeetings,g as shareMeeting,l as showMeeting,p as showMeetingSummary,m as showMeetingTranscript,h as showPreviousMeeting,d as updateMeeting};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{b as e,l as t}from"./profile-storage-mtd3aKrx.js";async function n(n){let{accessToken:r,workspaceId:i}=await t(),{models:a}=await new e().listSelectableModels(r,i);if(n.json){console.log(JSON.stringify(a));return}if(a.length===0){console.log(`No models available in this workspace.`);return}console.log(`Available models (${a.length}):\n`);for(let e of a)console.log(` ${e.name}`),e.description&&console.log(` ${e.description.slice(0,80)}`),console.log(` ID: ${e.id}`),console.log(``)}export{n as runModels};
2
+ import{b as e,l as t}from"./profile-storage-CsigYr0Q.js";async function n(n){let{accessToken:r,workspaceId:i}=await t(),{models:a}=await new e().listSelectableModels(r,i);if(n.json){console.log(JSON.stringify(a));return}if(a.length===0){console.log(`No models available in this workspace.`);return}console.log(`Available models (${a.length}):\n`);for(let e of a)console.log(` ${e.name}`),e.description&&console.log(` ${e.description.slice(0,80)}`),console.log(` ID: ${e.id}`),console.log(``)}export{n as runModels};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{b as e,l as t}from"./profile-storage-mtd3aKrx.js";function n(e){if(!e)return``;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function r(e,t){let n=e.replace(/\s+/g,` `).trim();return n.length>t?`${n.slice(0,t)}…`:n}function i(e){console.log(`Notifications (${e.length}):\n`);for(let t of e){let e=t.readAt?` `:`●`;console.log(` ${e} [${t.category}] ${t.rendered.title}`),t.rendered.body&&console.log(` ${r(t.rendered.body,100)}`);let i=n(t.createdAt);console.log(` ${i} · ${t.eventType} · ID: ${t.id}`),console.log(``)}}async function a(n){let{accessToken:r,workspaceId:a}=await t(),o=new e,s={tab:n.tab,eventType:n.eventType};if(n.all){let e=[],t;for(let i=0;;i++){i>=100&&(console.error(`Reached maximum page limit (100). Use --limit and --next-key for manual pagination.`),process.exit(1));let c=await o.getNotifications(r,a,{...s,limit:n.limit??20,cursor:t});if(e.push(...c.items),t=c.nextKey,!t)break}if(n.json){console.log(JSON.stringify({items:e}));return}if(e.length===0){console.log(`No notifications.`);return}i(e);return}let{items:c,nextKey:l}=await o.getNotifications(r,a,{...s,limit:n.limit,cursor:n.nextKey});if(n.json){console.log(JSON.stringify({items:c,nextKey:l}));return}if(c.length===0){console.log(`No notifications.`);return}i(c),l&&console.log(`Next page: --next-key ${l}`)}async function o(n){let{accessToken:r,workspaceId:i}=await t(),{count:a,capped:o}=await new e().getNotificationUnreadCount(r,i);if(n.json){console.log(JSON.stringify({count:a,capped:o??!1}));return}console.log(`${o?`${a}+`:a} unread`)}async function s(n,r){let{accessToken:i,workspaceId:a}=await t();if(await new e().markNotificationRead(i,a,n),r.json){console.log(JSON.stringify({id:n,read:!0}));return}console.log(`Marked notification read: ${n}`)}async function c(n){let{accessToken:r,workspaceId:i}=await t();if(await new e().markAllNotificationsRead(r,i),n.json){console.log(JSON.stringify({readAll:!0}));return}console.log(`Marked all notifications read.`)}export{a as listNotifications,c as markAllNotificationsRead,s as markNotificationRead,o as showUnreadCount};
2
+ import{b as e,l as t}from"./profile-storage-CsigYr0Q.js";function n(e){if(!e)return``;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function r(e,t){let n=e.replace(/\s+/g,` `).trim();return n.length>t?`${n.slice(0,t)}…`:n}function i(e){console.log(`Notifications (${e.length}):\n`);for(let t of e){let e=t.readAt?` `:`●`;console.log(` ${e} [${t.category}] ${t.rendered.title}`),t.rendered.body&&console.log(` ${r(t.rendered.body,100)}`);let i=n(t.createdAt);console.log(` ${i} · ${t.eventType} · ID: ${t.id}`),console.log(``)}}async function a(n){let{accessToken:r,workspaceId:a}=await t(),o=new e,s={tab:n.tab,eventType:n.eventType};if(n.all){let e=[],t;for(let i=0;;i++){i>=100&&(console.error(`Reached maximum page limit (100). Use --limit and --next-key for manual pagination.`),process.exit(1));let c=await o.getNotifications(r,a,{...s,limit:n.limit??20,cursor:t});if(e.push(...c.items),t=c.nextKey,!t)break}if(n.json){console.log(JSON.stringify({items:e}));return}if(e.length===0){console.log(`No notifications.`);return}i(e);return}let{items:c,nextKey:l}=await o.getNotifications(r,a,{...s,limit:n.limit,cursor:n.nextKey});if(n.json){console.log(JSON.stringify({items:c,nextKey:l}));return}if(c.length===0){console.log(`No notifications.`);return}i(c),l&&console.log(`Next page: --next-key ${l}`)}async function o(n){let{accessToken:r,workspaceId:i}=await t(),{count:a,capped:o}=await new e().getNotificationUnreadCount(r,i);if(n.json){console.log(JSON.stringify({count:a,capped:o??!1}));return}console.log(`${o?`${a}+`:a} unread`)}async function s(n,r){let{accessToken:i,workspaceId:a}=await t();if(await new e().markNotificationRead(i,a,n),r.json){console.log(JSON.stringify({id:n,read:!0}));return}console.log(`Marked notification read: ${n}`)}async function c(n){let{accessToken:r,workspaceId:i}=await t();if(await new e().markAllNotificationsRead(r,i),n.json){console.log(JSON.stringify({readAll:!0}));return}console.log(`Marked all notifications read.`)}export{a as listNotifications,c as markAllNotificationsRead,s as markNotificationRead,o as showUnreadCount};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{C as e}from"./profile-storage-mtd3aKrx.js";import t from"node:fs";import n from"node:os";import r from"node:path";const i=`.entrydesk`;function a(){return{version:1,skills:{}}}function o(e){return r.join(e,i,`skills-lock.json`)}function s(e){try{let n=JSON.parse(t.readFileSync(o(e),`utf8`));return n.version!==1||typeof n.skills!=`object`||n.skills===null?a():n}catch{return a()}}function c(e,n){let i={};for(let e of Object.keys(n.skills).toSorted())i[e]=n.skills[e];let a={version:1,...n.workspaceId?{workspaceId:n.workspaceId}:{},skills:i},s=o(e);t.mkdirSync(r.dirname(s),{recursive:!0}),t.writeFileSync(s,`${JSON.stringify(a,null,2)}\n`,`utf8`)}function l(e,t){return s(e).skills[t]}function u(e,t,n){let r=s(e);r.skills[t]=n,c(e,r)}function d(e,t){let n=s(e);if(!(t in n.skills))return!1;let{[t]:r,...i}=n.skills;return c(e,{...n,skills:i}),!0}function f(e){try{let n=JSON.parse(t.readFileSync(e,`utf8`));return typeof n.workspaceId!=`string`||n.workspaceId===``?void 0:n}catch{return}}function p(e,n){t.mkdirSync(r.dirname(e),{recursive:!0}),t.writeFileSync(e,`${JSON.stringify(n,null,2)}\n`,`utf8`)}function m(e){return t.existsSync(e)?(t.rmSync(e),!0):!1}function h(e){return r.join(e,i,`project.json`)}function g(){return r.join(n.homedir(),i,`global-link.json`)}function _(){return f(g())}function v(e){p(g(),e)}function y(){return m(g())}function b(e=process.cwd()){let n=r.resolve(e);for(;;){if(t.existsSync(h(n)))return n;let e=r.dirname(n);if(e===n)return;n=e}}function x(e){return f(h(e))}function S(e,t){p(h(e),t)}function C(e){return m(h(e))}function w(e=process.cwd()){let t=b(e);if(!t)return;let n=x(t);return n?{rootDir:t,link:n}:void 0}function T(t){let n=e();if(t&&n&&t!==n)throw Error(`This directory is linked to a workspace on ${t}, but the active profile points at ${n}. Re-run 'entrydesk skills link' or switch profile.`)}function E(){process.env.ENTRYDESK_API_URL&&console.error(`Note: the recorded apiUrl comes from the ENTRYDESK_API_URL environment variable. This link pins the directory to that API — if the override was temporary, re-run the link without it.`)}function D(e,t){if(e){let e=n.homedir(),r=_();return r?(T(r.apiUrl),{rootDir:e,workspaceId:r.workspaceId,linked:!0}):{rootDir:e,workspaceId:t,linked:!1}}let r=w(process.cwd());return r?(T(r.link.apiUrl),{rootDir:r.rootDir,workspaceId:r.link.workspaceId,linked:!0}):{rootDir:process.cwd(),workspaceId:t,linked:!1}}const O=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u;function k(e){if(!O.test(e))throw Error(`Invalid skill name "${e}": must be lowercase letters, digits and single hyphens (e.g. "my-skill").`)}function A(e,t){k(t);let n=r.resolve(e,`.entrydesk`,`skills`),i=r.resolve(n,t);if(i!==r.join(n,t)||!i.startsWith(n+r.sep))throw Error(`Refusing unsafe skill path for "${t}".`);return i}export{b as a,y as c,S as d,l as f,u as h,E as i,C as l,d as m,A as n,g as o,s as p,D as r,h as s,k as t,v as u};
2
+ import{C as e}from"./profile-storage-CsigYr0Q.js";import t from"node:fs";import n from"node:os";import r from"node:path";const i=`.entrydesk`;function a(){return{version:1,skills:{}}}function o(e){return r.join(e,i,`skills-lock.json`)}function s(e){try{let n=JSON.parse(t.readFileSync(o(e),`utf8`));return n.version!==1||typeof n.skills!=`object`||n.skills===null?a():n}catch{return a()}}function c(e,n){let i={};for(let e of Object.keys(n.skills).toSorted())i[e]=n.skills[e];let a={version:1,...n.workspaceId?{workspaceId:n.workspaceId}:{},skills:i},s=o(e);t.mkdirSync(r.dirname(s),{recursive:!0}),t.writeFileSync(s,`${JSON.stringify(a,null,2)}\n`,`utf8`)}function l(e,t){return s(e).skills[t]}function u(e,t,n){let r=s(e);r.skills[t]=n,c(e,r)}function d(e,t){let n=s(e);if(!(t in n.skills))return!1;let{[t]:r,...i}=n.skills;return c(e,{...n,skills:i}),!0}function f(e){try{let n=JSON.parse(t.readFileSync(e,`utf8`));return typeof n.workspaceId!=`string`||n.workspaceId===``?void 0:n}catch{return}}function p(e,n){t.mkdirSync(r.dirname(e),{recursive:!0}),t.writeFileSync(e,`${JSON.stringify(n,null,2)}\n`,`utf8`)}function m(e){return t.existsSync(e)?(t.rmSync(e),!0):!1}function h(e){return r.join(e,i,`project.json`)}function g(){return r.join(n.homedir(),i,`global-link.json`)}function _(){return f(g())}function v(e){p(g(),e)}function y(){return m(g())}function b(e=process.cwd()){let n=r.resolve(e);for(;;){if(t.existsSync(h(n)))return n;let e=r.dirname(n);if(e===n)return;n=e}}function x(e){return f(h(e))}function S(e,t){p(h(e),t)}function C(e){return m(h(e))}function w(e=process.cwd()){let t=b(e);if(!t)return;let n=x(t);return n?{rootDir:t,link:n}:void 0}function T(t){let n=e();if(t&&n&&t!==n)throw Error(`This directory is linked to a workspace on ${t}, but the active profile points at ${n}. Re-run 'entrydesk skills link' or switch profile.`)}function E(){process.env.ENTRYDESK_API_URL&&console.error(`Note: the recorded apiUrl comes from the ENTRYDESK_API_URL environment variable. This link pins the directory to that API — if the override was temporary, re-run the link without it.`)}function D(e,t){if(e){let e=n.homedir(),r=_();return r?(T(r.apiUrl),{rootDir:e,workspaceId:r.workspaceId,linked:!0}):{rootDir:e,workspaceId:t,linked:!1}}let r=w(process.cwd());return r?(T(r.link.apiUrl),{rootDir:r.rootDir,workspaceId:r.link.workspaceId,linked:!0}):{rootDir:process.cwd(),workspaceId:t,linked:!1}}const O=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u;function k(e){if(!O.test(e))throw Error(`Invalid skill name "${e}": must be lowercase letters, digits and single hyphens (e.g. "my-skill").`)}function A(e,t){k(t);let n=r.resolve(e,`.entrydesk`,`skills`),i=r.resolve(n,t);if(i!==r.join(n,t)||!i.startsWith(n+r.sep))throw Error(`Refusing unsafe skill path for "${t}".`);return i}export{b as a,y as c,S as d,l as f,u as h,E as i,C as l,d as m,A as n,g as o,s as p,D as r,h as s,k as t,v as u};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{O as e,S as t,r as n,t as r}from"./profile-storage-mtd3aKrx.js";function i(e,t){let i=e??t.profile;if(i)return i;if(r.getProfileCount()===1)return r.getProfileNames()[0];throw new n(`Profile name is required when multiple profiles exist.`)}function a(e){let t=r.getCurrentProfileName(),n=r.getProfileNames();if(e.json){console.log(JSON.stringify({currentProfile:t,profiles:n.map(e=>({name:e,isCurrent:e===t}))}));return}console.log(`Profiles (${n.length}):`);for(let e of n)console.log(` ${e}${e===t?` (current)`:``}`)}function o(e){let t=r.getCurrentProfileName();if(e.json){console.log(JSON.stringify({name:t,isCurrent:!0}));return}console.log(`Current profile: ${t}`)}async function s(n,a){let o=i(n,a),s=e.getAll(o),c=await t.getAll(o),l=!!c?.accessToken,u=o===r.getCurrentProfileName();if(a.json){console.log(JSON.stringify({name:o,isCurrent:u,config:s,auth:l?{loggedIn:!0,email:c?.email??null,workspaceId:c?.workspaceId??null}:{loggedIn:!1}}));return}console.log(`Profile: ${o}${u?` (current)`:``}`),console.log(` API URL: ${s.apiUrl??`default`}`),console.log(` Hub URL: ${s.hubUrl??`default`}`),console.log(` Model: ${s.model?.default??`unset`}`);let d=s.connectors?.defaults&&s.connectors.defaults.length>0?s.connectors.defaults.join(`, `):`unset`;console.log(` Connectors: ${d}`),console.log(l?` Logged in as: ${c?.email??`unknown`}`:` Not logged in`),l&&c?.workspaceId&&console.log(` Workspace ID: ${c.workspaceId}`)}function c(e,t){let n=e??t.profile??r.DEFAULT_PROFILE;if(r.createProfile(n),t.json){console.log(JSON.stringify({name:n,created:!0}));return}console.log(`Profile created: ${n}`)}function l(e,t){let n=i(e,t);if(r.setCurrentProfile(n),t.json){console.log(JSON.stringify({name:n,current:!0}));return}console.log(`Switched to profile: ${n}`)}async function u(e,n){let a=i(e,n),o=r.deleteProfile(a);if(await t.deleteProfileCredentials(a),n.json){console.log(JSON.stringify({deleted:a,currentProfile:o.currentProfile}));return}console.log(`Profile deleted: ${a}`),console.log(`Current profile: ${o.currentProfile}`)}async function d(e,n,i){let a=r.renameProfile(e,n);if(await t.moveProfileCredentials(e,n),i.json){console.log(JSON.stringify({renamed:e,name:n,currentProfile:a.currentProfile}));return}console.log(`Profile renamed: ${e} -> ${n}`),console.log(`Current profile: ${a.currentProfile}`)}async function f(n,i,a){let o=e.getAll(n);if(r.createProfile(i),e.setAll(o,i),await t.clear(i),a.json){console.log(JSON.stringify({source:n,name:i,cloned:!0}));return}console.log(`Profile cloned: ${n} -> ${i}`)}export{f as cloneProfile,c as createProfile,u as deleteProfile,a as listProfiles,d as renameProfile,o as showCurrentProfile,s as showProfile,l as useProfile};
2
+ import{O as e,S as t,r as n,t as r}from"./profile-storage-CsigYr0Q.js";function i(e,t){let i=e??t.profile;if(i)return i;if(r.getProfileCount()===1)return r.getProfileNames()[0];throw new n(`Profile name is required when multiple profiles exist.`)}function a(e){let t=r.getCurrentProfileName(),n=r.getProfileNames();if(e.json){console.log(JSON.stringify({currentProfile:t,profiles:n.map(e=>({name:e,isCurrent:e===t}))}));return}console.log(`Profiles (${n.length}):`);for(let e of n)console.log(` ${e}${e===t?` (current)`:``}`)}function o(e){let t=r.getCurrentProfileName();if(e.json){console.log(JSON.stringify({name:t,isCurrent:!0}));return}console.log(`Current profile: ${t}`)}async function s(n,a){let o=i(n,a),s=e.getAll(o),c=await t.getAll(o),l=!!c?.accessToken,u=o===r.getCurrentProfileName();if(a.json){console.log(JSON.stringify({name:o,isCurrent:u,config:s,auth:l?{loggedIn:!0,email:c?.email??null,workspaceId:c?.workspaceId??null}:{loggedIn:!1}}));return}console.log(`Profile: ${o}${u?` (current)`:``}`),console.log(` API URL: ${s.apiUrl??`default`}`),console.log(` Hub URL: ${s.hubUrl??`default`}`),console.log(` Model: ${s.model?.default??`unset`}`);let d=s.connectors?.defaults&&s.connectors.defaults.length>0?s.connectors.defaults.join(`, `):`unset`;console.log(` Connectors: ${d}`),console.log(l?` Logged in as: ${c?.email??`unknown`}`:` Not logged in`),l&&c?.workspaceId&&console.log(` Workspace ID: ${c.workspaceId}`)}function c(e,t){let n=e??t.profile??r.DEFAULT_PROFILE;if(r.createProfile(n),t.json){console.log(JSON.stringify({name:n,created:!0}));return}console.log(`Profile created: ${n}`)}function l(e,t){let n=i(e,t);if(r.setCurrentProfile(n),t.json){console.log(JSON.stringify({name:n,current:!0}));return}console.log(`Switched to profile: ${n}`)}async function u(e,n){let a=i(e,n),o=r.deleteProfile(a);if(await t.deleteProfileCredentials(a),n.json){console.log(JSON.stringify({deleted:a,currentProfile:o.currentProfile}));return}console.log(`Profile deleted: ${a}`),console.log(`Current profile: ${o.currentProfile}`)}async function d(e,n,i){let a=r.renameProfile(e,n);if(await t.moveProfileCredentials(e,n),i.json){console.log(JSON.stringify({renamed:e,name:n,currentProfile:a.currentProfile}));return}console.log(`Profile renamed: ${e} -> ${n}`),console.log(`Current profile: ${a.currentProfile}`)}async function f(n,i,a){let o=e.getAll(n);if(r.createProfile(i),e.setAll(o,i),await t.clear(i),a.json){console.log(JSON.stringify({source:n,name:i,cloned:!0}));return}console.log(`Profile cloned: ${n} -> ${i}`)}export{f as cloneProfile,c as createProfile,u as deleteProfile,a as listProfiles,d as renameProfile,o as showCurrentProfile,s as showProfile,l as useProfile};