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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +32 -16
  2. package/dist/{add-Lh_kLR85.js → add-DXYghmJz.js} +1 -1
  3. package/dist/agents-Drg2ZD85.js +2 -0
  4. package/dist/{billing-DHrYi0SU.js → billing-Bkk1BhAw.js} +1 -1
  5. package/dist/{budget-D_DDPBBb.js → budget-dazpYOON.js} +1 -1
  6. package/dist/build-task-request-config-BDlX-M_P.js +2 -0
  7. package/dist/{commands-3Yqb38G_.js → commands-DUKXJUfr.js} +1 -1
  8. package/dist/commands-FVFeS1MV.js +2 -0
  9. package/dist/{config-hGzOCx4u.js → config-CSJx1Xlt.js} +1 -1
  10. package/dist/{connectors-CxzG22No.js → connectors-CHcopt49.js} +2 -2
  11. package/dist/index.js +15 -14
  12. package/dist/{instruction-CRCyBKQf.js → instruction-BXKEUplM.js} +1 -1
  13. package/dist/{login-CwXjzUnO.js → login-ACaFCfsh.js} +1 -1
  14. package/dist/{logout-BYCFpaxh.js → logout-BX4YsOqw.js} +1 -1
  15. package/dist/{marketplace-NSEUjhXf.js → marketplace-S_4fkbWt.js} +1 -1
  16. package/dist/{mcp-B7wo_sRO.js → mcp-DOUHU2_Z.js} +1 -1
  17. package/dist/{mcp-client-DMOEcmul.js → mcp-client-LcmqajIh.js} +1 -1
  18. package/dist/{meeting-yS83In45.js → meeting-BG76tnT9.js} +1 -1
  19. package/dist/{models-AN9cWKSj.js → models-CkepW_-c.js} +1 -1
  20. package/dist/{notifications-QF11-X32.js → notifications-BAMcYXhl.js} +1 -1
  21. package/dist/options-CgmngSTC.js +2 -0
  22. package/dist/{paginate-CfIrho1f.js → paginate-DUu8qbek.js} +1 -1
  23. package/dist/{paths-C9BPsZVF.js → paths-DQh1PdjS.js} +1 -1
  24. package/dist/{profile-WtKtO0yp.js → profile-BzXbLYDw.js} +1 -1
  25. package/dist/profile-storage-DlaupNlV.js +60 -0
  26. package/dist/project-B9uLW5nn.js +2 -0
  27. package/dist/{project-context-Cc_Js6n4.js → project-context-VlX5GZxr.js} +1 -1
  28. package/dist/{project-governance-C7rl6gDW.js → project-governance-CwVlxGE2.js} +1 -1
  29. package/dist/{project-sources-CzylP6oS.js → project-sources-BzMkopCj.js} +1 -1
  30. package/dist/project-sources-write-D3WzWqet.js +2 -0
  31. package/dist/{project-tasks-DaGBt4Cp.js → project-tasks-CnXLm061.js} +1 -1
  32. package/dist/{push-Ce79oiu0.js → push-DWIgzvqe.js} +1 -1
  33. package/dist/{recordings-DoExjM1F.js → recordings-_HnTtukO.js} +1 -1
  34. package/dist/{remove-bHAmCTdf.js → remove-Cpen9pWn.js} +1 -1
  35. package/dist/resolve-7OXPmNrX.js +6 -0
  36. package/dist/resource-grants-D-ImlByb.js +2 -0
  37. package/dist/{schedules-tDaIGaad.js → schedules-DACWrdY_.js} +2 -2
  38. package/dist/skills-BenhDHKq.js +2 -0
  39. package/dist/{status-CDMSNVD8.js → status-BKd81bGK.js} +1 -1
  40. package/dist/{status-gK3MA1oe.js → status-ErhWpQxW.js} +1 -1
  41. package/dist/task-CvQD8Y4d.js +104 -0
  42. package/dist/tasks-C4dAgHmR.js +2 -0
  43. package/dist/tasks-CnncSIan.js +14 -0
  44. package/dist/terminal-text-D04u1hg1.js +2 -0
  45. package/dist/{tool-BEivzspP.js → tool-CpSoLUlR.js} +1 -1
  46. package/dist/{update-CJlVgq8V.js → update-D09UponU.js} +1 -1
  47. package/dist/{usage-DOI9sowA.js → usage-Dibnsgtg.js} +1 -1
  48. package/dist/{usage-audit-1GZx4VBG.js → usage-audit-Be431Kj1.js} +1 -1
  49. package/dist/version-BTqAbDeB.js +2 -0
  50. package/dist/workflow-Dx41WM43.js +6 -0
  51. package/dist/{workspaces-D0VOrP2A.js → workspaces-rVOwf5zp.js} +1 -1
  52. package/package.json +1 -1
  53. package/dist/agents-CLcXSbBp.js +0 -2
  54. package/dist/build-task-request-config-Y9X2h9Ia.js +0 -2
  55. package/dist/commands-CdnyYMrx.js +0 -2
  56. package/dist/options-D6fCp3Q_.js +0 -2
  57. package/dist/profile-storage-Dv0xRb8J.js +0 -58
  58. package/dist/project-BhPYRsaZ.js +0 -2
  59. package/dist/project-sources-write-6cBfdUfV.js +0 -2
  60. package/dist/resolve-f238uD6C.js +0 -6
  61. package/dist/skills-CDd-emMc.js +0 -2
  62. package/dist/task-CHnFR-Zp.js +0 -103
  63. package/dist/tasks-D4RIFT8Y.js +0 -14
  64. package/dist/tasks-acCatE6n.js +0 -2
  65. package/dist/version-C37EX5li.js +0 -2
  66. package/dist/workflow-DhomAltH.js +0 -6
package/README.md CHANGED
@@ -98,14 +98,19 @@ entrydesk project edit 1 --name "Q4 Launch" --description "Launch coordination"
98
98
  ```
99
99
 
100
100
  A `<project>` number always means a position in a **plain** `project list`. A
101
- `--filter` or `--all` listing renumbers from 1, so those print no position
102
- column — pass an id there.
101
+ `--filter`, `--sort-by`, `--order` or `--all` listing renumbers from 1, so those
102
+ print no position column — pass an id there.
103
103
 
104
- The number is resolved against the listing as it stands at that moment, not
105
- against the one you last looked at, so a project created in between shifts the
106
- positions — the same trade-off `entrydesk tasks <n>` makes. Numbers are for
107
- typing by hand; scripts, and anything that has to keep pointing at one project,
108
- should use the id.
104
+ A plain listing is in creation order, oldest first, and the number is resolved
105
+ against that listing as it stands at that moment. A project created after you
106
+ looked takes the next number, so the ones you saw keep theirs; only a deletion
107
+ shifts the numbers after it. `entrydesk tasks <n>` numbers newest first, so a
108
+ new task does shift its positions. Numbers are for typing by hand; scripts, and
109
+ anything that has to keep pointing at one project across deletions, should use
110
+ the id.
111
+
112
+ `--sort-by lastActivityAt --order desc` shows the most recently active project first, the
113
+ order the Hub uses; that listing prints ids instead of positions.
109
114
 
110
115
  The instruction is plain text on stdout with nothing around it, so it pipes and
111
116
  redirects cleanly, and a project without one prints nothing and exits 0:
@@ -286,9 +291,9 @@ only `file` or `link`. `--json` prints the source the API returned with a
286
291
  `type` field beside it, and `sources-rm --json` prints `{ "type", "id",
287
292
  "removed": true }`.
288
293
 
289
- Uploading a file goes through the same route the task commands use, which is
290
- declared on `tasks:write`; attaching it, and every other `sources-*` call, is
291
- `projects:write`. A token short of either is told which one it lacks.
294
+ Uploading a file, attaching it and saving its `--description` is one request,
295
+ declared on `projects:write` like every other `sources-*` call; nothing is
296
+ left behind when the project refuses it. A token short of that scope is told so.
292
297
 
293
298
  `context-read` writes the source's text and nothing else to stdout, so it pipes
294
299
  straight into a task in the same project:
@@ -355,11 +360,19 @@ JSON on stderr under `--json`), so a stray id in a script cannot delete
355
360
  anything.
356
361
 
357
362
  A project command fails in one of three ways, each with its own message: the
358
- server has projects turned off, your token predates project support (run
359
- `entrydesk login` again, or issue a PAT with `projects:read`, `projects:write`,
360
- `tasks:read` and `tasks:write`), or the project is not one you can see —
361
- reported as `Project not found` whether it is someone else's or does not exist.
362
- With `--json` the error is JSON on stderr and the exit code is non-zero.
363
+ server has projects turned off, your token is missing a scope the command
364
+ needs (the message names each missing scope — run `entrydesk login` again, or
365
+ issue a PAT that grants it), or the project is not one you can see — reported
366
+ as `Project not found` whether it is someone else's or does not exist. With
367
+ `--json` the error is JSON on stderr and the exit code is non-zero.
368
+
369
+ Commands that only read or edit the project itself need `projects:read` or
370
+ `projects:write`; the task commands need `tasks:read` or `tasks:write`.
371
+ `project note`, `context-search` and `context-read` reach both a project's
372
+ sources and its tasks, so each requires both families at once: `project note`
373
+ needs `projects:write` and `tasks:write`, and the two context commands need
374
+ `projects:read` and `tasks:read`. `entrydesk login` grants all four; a PAT has
375
+ to be issued with them.
363
376
 
364
377
  ## Tools
365
378
 
@@ -576,7 +589,10 @@ entrydesk tasks --json
576
589
  ```
577
590
 
578
591
  Note that billing endpoints are not readable with a PAT; they require an
579
- interactive login.
592
+ interactive login. A PAT for the project commands needs `projects:read`,
593
+ `projects:write`, `tasks:read` and `tasks:write` — `project note`,
594
+ `context-search` and `context-read` each require a `projects:*` and a `tasks:*`
595
+ scope together, and refuse with the missing ones named otherwise.
580
596
 
581
597
  ## Profiles
582
598
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{E as e}from"./profile-storage-Dv0xRb8J.js";import{a as t,d as n,f as r,g as i,i as a,r as o}from"./paths-C9BPsZVF.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 p from"cross-spawn";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{let e=p.sync(`npx`,i,{cwd:r,stdio:n?[`ignore`,`pipe`,`pipe`]:`inherit`});if(e.error)throw e.error;if(e.status!==0){let t=e.stderr?.toString().trim();throw Error(`npx exited with code ${e.status??`null`}${t?`: ${t}`:``}`)}}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 i={workspaceId:f.workspaceId,apiUrl:e()};t(),m?n(i):r(process.cwd(),i)}let v,y,S;if(p.type===`entrydesk`){y=await E(_,p);let e=await _.client.downloadSkillCurrent(_.accessToken,_.workspaceId,y);v=e.name,S=o(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=o(g,v),C(p.path,S);else{let{dir:e,tmpRoot:t}=D(l,p,!!d.json);try{v=w(e),S=o(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}:{}};i(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{E as e}from"./profile-storage-DlaupNlV.js";import{a as t,d as n,f as r,g as i,i as a,r as o}from"./paths-DQh1PdjS.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 p from"cross-spawn";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{let e=p.sync(`npx`,i,{cwd:r,stdio:n?[`ignore`,`pipe`,`pipe`]:`inherit`});if(e.error)throw e.error;if(e.status!==0){let t=e.stderr?.toString().trim();throw Error(`npx exited with code ${e.status??`null`}${t?`: ${t}`:``}`)}}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 i={workspaceId:f.workspaceId,apiUrl:e()};t(),m?n(i):r(process.cwd(),i)}let v,y,S;if(p.type===`entrydesk`){y=await E(_,p);let e=await _.client.downloadSkillCurrent(_.accessToken,_.workspaceId,y);v=e.name,S=o(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=o(g,v),C(p.path,S);else{let{dir:e,tmpRoot:t}=D(l,p,!!d.json);try{v=w(e),S=o(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}:{}};i(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{At as e,Nt as t,Pt as n,at as r,b as i,u as a}from"./profile-storage-DlaupNlV.js";import{t as o}from"./resource-grants-D-ImlByb.js";function s(t){return t?n([...new Set(t)]):e}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(e){if(console.log(`${e.name}\n`),console.log(` ID: ${e.id}`),e.visibility&&console.log(` Visibility: ${e.visibility}`),e.model&&console.log(` Model: ${e.model.name}`),e.author&&console.log(` Author: ${e.author.name}${e.author.isMe?` (you)`:``}`),e.description&&console.log(` Description: ${e.description}`),e.capabilities){let n=t(e.capabilities).map(e=>r(e));n.length>0&&console.log(` Capabilities: ${n.join(`, `)}`)}e.connectors&&e.connectors.length>0&&console.log(` Connectors: ${e.connectors.map(e=>e.name).join(`, `)}`),e.tools&&e.tools.length>0&&console.log(` Tools: ${e.tools.length}`),e.conversationStarters&&e.conversationStarters.length>0&&console.log(` Starters: ${e.conversationStarters.length}`),e.systemPrompt&&console.log(`\n System prompt:\n${e.systemPrompt}`)}async function d(e){let{accessToken:t,workspaceId:n}=await a(),r=new i;if(e.mine){let i=[],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 r.getMyAgents(t,n,{limit:e.limit,nextKey:a});if(i.push(...s.agents),a=s.nextKey,!e.all||!a)break}if(e.json){console.log(JSON.stringify({agents:i,nextKey:a}));return}if(i.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(i),!e.all&&a&&console.log(`Next page: --next-key ${a}`);return}if(e.all){let i=[],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 r.getAgents(t,n,{limit:e.limit??100,nextKey:a});if(i.push(...s.agents),a=s.nextKey,!a)break}if(e.json){console.log(JSON.stringify({agents:i}));return}if(i.length===0){console.log("No agents in this workspace yet. Create one with `entrydesk agents create`, or browse `entrydesk marketplace`.");return}c(i);return}let{agents:o,nextKey:s}=await r.getAgents(t,n,{limit:e.limit,nextKey:e.nextKey});if(e.json){console.log(JSON.stringify({agents:o,nextKey:s}));return}if(o.length===0){console.log("No agents in this workspace yet. Create one with `entrydesk agents create`, or browse `entrydesk marketplace`.");return}c(o),s&&console.log(`Next page: --next-key ${s}`)}async function f(e,t){let{accessToken:n,workspaceId:r}=await a(),o=await new i().getAgent(n,r,e);if(t.json){console.log(JSON.stringify(o));return}u(o)}async function p(e){let{accessToken:t,workspaceId:n}=await a(),r=await new i().createAgent(t,n,{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(r));return}console.log(`Created agent: ${r.name}`),console.log(` ID: ${r.id}`)}async function m(e,t){let{accessToken:n,workspaceId:r}=await a(),o=new i,c=await o.getAgent(n,r,e),l={name:t.name??c.name,description:t.description??c.description,systemPrompt:t.systemPrompt??c.systemPrompt??``,modelId:t.modelId??c.model?.id??``,connectorIds:t.connectorIds??c.connectors?.map(e=>e.id)??[],capabilities:t.capabilities?s(t.capabilities):c.capabilities??{},conversationStarters:t.conversationStarters??c.conversationStarters??[],tools:t.tools??c.tools??[],iconId:t.iconId??c.iconId};await o.updateAgent(n,r,e,l),console.log(`Updated agent: ${e}`)}async function h(e){let{accessToken:t,workspaceId:n}=await a();await new i().deleteAgent(t,n,e),console.log(`Deleted agent: ${e}`)}async function g(e,t){let{accessToken:n,workspaceId:r}=await a();if(await new i().publishAgent(n,r,e),t.json){console.log(JSON.stringify({id:e,published:!0}));return}console.log(`Published agent to the workspace: ${e}`)}async function _(e,t){let{accessToken:n,workspaceId:r}=await a(),s=new i;if(t.addUser){let i=await s.upsertAgentGrant(n,r,e,t.addUser,t.role);if(t.json){console.log(JSON.stringify(i));return}console.log(`Granted ${t.role} to user ${t.addUser}`);return}if(t.removeUser){if(await s.removeAgentGrant(n,r,e,t.removeUser),t.json){console.log(JSON.stringify({userId:t.removeUser,removed:!0}));return}console.log(`Revoked access for user ${t.removeUser}`);return}let c=await s.getAgentGrants(n,r,e);if(t.json){console.log(JSON.stringify(c));return}o(c)}export{p as createAgent,h as deleteAgent,d as listAgents,g as publishAgent,_ as shareAgent,f as showAgent,m as updateAgent};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{b as e,u as t,v as n}from"./profile-storage-Dv0xRb8J.js";import{r}from"./format-C3tQC6LL.js";import{t as i}from"./paginate-CfIrho1f.js";function a(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 o(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 s(){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 c(t){let{accessToken:n,workspaceId:r}=await s(),i=await new e().getBillingOverview(n,r);if(t.json){console.log(JSON.stringify(i));return}a(i)}async function l(t){let{accessToken:n,workspaceId:r}=await s(),a=new e;if(t.all){let e=await i(async e=>{let i=await a.getBillingInvoices(n,r,{limit:t.limit??20,nextKey:e});return{items:i.invoices,nextKey:i.nextKey}});if(t.json){console.log(JSON.stringify({invoices:e}));return}if(e.length===0){console.log(`No invoices.`);return}o(e);return}let{invoices:c,nextKey:l}=await a.getBillingInvoices(n,r,{limit:t.limit,nextKey:t.nextKey});if(t.json){console.log(JSON.stringify({invoices:c,nextKey:l}));return}if(c.length===0){console.log(`No invoices.`);return}o(c),l&&console.log(`Next page: --next-key ${l}`)}export{l as listInvoices,c as showBillingStatus};
2
+ import{b as e,u as t,v as n}from"./profile-storage-DlaupNlV.js";import{r}from"./format-C3tQC6LL.js";import{t as i}from"./paginate-DUu8qbek.js";function a(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 o(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 s(){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 c(t){let{accessToken:n,workspaceId:r}=await s(),i=await new e().getBillingOverview(n,r);if(t.json){console.log(JSON.stringify(i));return}a(i)}async function l(t){let{accessToken:n,workspaceId:r}=await s(),a=new e;if(t.all){let e=await i(async e=>{let i=await a.getBillingInvoices(n,r,{limit:t.limit??20,nextKey:e});return{items:i.invoices,nextKey:i.nextKey}});if(t.json){console.log(JSON.stringify({invoices:e}));return}if(e.length===0){console.log(`No invoices.`);return}o(e);return}let{invoices:c,nextKey:l}=await a.getBillingInvoices(n,r,{limit:t.limit,nextKey:t.nextKey});if(t.json){console.log(JSON.stringify({invoices:c,nextKey:l}));return}if(c.length===0){console.log(`No invoices.`);return}o(c),l&&console.log(`Next page: --next-key ${l}`)}export{l as listInvoices,c as showBillingStatus};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{b as e,u as t}from"./profile-storage-Dv0xRb8J.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,u as t}from"./profile-storage-DlaupNlV.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{ct as e,it as t,rt as n,st as r}from"./profile-storage-DlaupNlV.js";function i({allowedTools:t,disallowedTools:n}){if(!(!t?.length&&!n?.length))return[...e(t?.map(e=>({toolName:e,policy:r.ALWAYS_ALLOW})),n?.map(e=>({toolName:e,policy:r.BLOCK})))].map(([e,t])=>({toolName:e,policy:t}))}function a({agentId:e,model:r,projectId:i,connectorIds:a,clientTools:o,clientToolSystemPrompt:s,toolApprovalMode:c,toolPolicies:l}){return{...i?{projectId:i}:{},...e?{agentId:e}:{...r?{model:r}:{},...a?.length?{connectorIds:a}:{}},...o?{clientTools:t(o,n.DIRECT)}:{},...s?{clientToolSystemPrompt:s}:{},...c?{toolApprovalMode:c}:{},...l?.length?{toolPolicies:l}:{}}}export{i as n,a as t};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{E as e}from"./profile-storage-Dv0xRb8J.js";import{a as t,c as n,d as r,f as i,g as a,i as o,l as s,m as c,o as l,r as u,s as d,u as f}from"./paths-C9BPsZVF.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(a,o,s){let c=a&&_.test(a)?a:s.workspaceId,l={workspaceId:c,apiUrl:e()};if(t(),o.global)r(l),console.info(`Linked ${d()} → workspace ${c}`);else{let e=process.cwd();i(e,l),console.info(`Linked ${n(e)} → workspace ${c}`)}}function y(e){if(e.global){s()?console.info(`Unlinked ${d()}`):console.info(`No global link found.`);return}let t=l(process.cwd());t&&f(t)?console.info(`Unlinked ${n(t)}`):console.info(`No project link found.`)}async function b(e,t,n,r,i){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:s,name:c}=await e.client.downloadSkillCurrent(e.accessToken,e.workspaceId,o),l=await fetch(s);if(!l.ok)throw Error(`Failed to download ${c}: ${l.status}`);let d=Buffer.from(await l.arrayBuffer()),f=u(t,c);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);a(t,c,{source:o,sourceType:`entrydesk`,skillId:o,localHash:y,lastPulledHash:y,mode:`symlink`});let b=m(f,c,t,`symlink`,i);return r||console.info(`✓ pulled ${c} (${y.slice(0,12)}) → agents: ${b.map(e=>e.agentId).join(`, `)}`),{name:c,hash:y}}async function x(e,t,n){let{rootDir:r,workspaceId:i}=o(!!t.global,n.workspaceId),a={...n,workspaceId:i},s=!!t.json,l=[];if(e)l.push(_.test(e)?{skillId:e}:{name:e});else{let e=c(r).skills;for(let[t,n]of Object.entries(e))l.push({skillId:n.skillId,name:t});if(l.length===0){console.info(`Nothing to pull — no tracked skills. Try: entrydesk skills pull <name>`);return}}let u=[];for(let e of l)u.push(await b(a,r,e,s,t.agent));s&&console.info(JSON.stringify(u,null,2))}export{x as n,y as r,v as t};
2
+ import{E as e}from"./profile-storage-DlaupNlV.js";import{a as t,c as n,d as r,f as i,g as a,i as o,l as s,m as c,o as l,r as u,s as d,u as f}from"./paths-DQh1PdjS.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(a,o,s){let c=a&&_.test(a)?a:s.workspaceId,l={workspaceId:c,apiUrl:e()};if(t(),o.global)r(l),console.info(`Linked ${d()} → workspace ${c}`);else{let e=process.cwd();i(e,l),console.info(`Linked ${n(e)} → workspace ${c}`)}}function y(e){if(e.global){s()?console.info(`Unlinked ${d()}`):console.info(`No global link found.`);return}let t=l(process.cwd());t&&f(t)?console.info(`Unlinked ${n(t)}`):console.info(`No project link found.`)}async function b(e,t,n,r,i){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:s,name:c}=await e.client.downloadSkillCurrent(e.accessToken,e.workspaceId,o),l=await fetch(s);if(!l.ok)throw Error(`Failed to download ${c}: ${l.status}`);let d=Buffer.from(await l.arrayBuffer()),f=u(t,c);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);a(t,c,{source:o,sourceType:`entrydesk`,skillId:o,localHash:y,lastPulledHash:y,mode:`symlink`});let b=m(f,c,t,`symlink`,i);return r||console.info(`✓ pulled ${c} (${y.slice(0,12)}) → agents: ${b.map(e=>e.agentId).join(`, `)}`),{name:c,hash:y}}async function x(e,t,n){let{rootDir:r,workspaceId:i}=o(!!t.global,n.workspaceId),a={...n,workspaceId:i},s=!!t.json,l=[];if(e)l.push(_.test(e)?{skillId:e}:{name:e});else{let e=c(r).skills;for(let[t,n]of Object.entries(e))l.push({skillId:n.skillId,name:t});if(l.length===0){console.info(`Nothing to pull — no tracked skills. Try: entrydesk skills pull <name>`);return}}let u=[];for(let e of l)u.push(await b(a,r,e,s,t.agent));s&&console.info(JSON.stringify(u,null,2))}export{x as n,y as r,v as t};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{r as e}from"./commands-DUKXJUfr.js";export{e as runSkillsUnlink};
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{M as e,j as t,t as n}from"./profile-storage-Dv0xRb8J.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=e.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: ${t.join(`, `)}`);return}console.log(`Configuration:
2
+ import{M as e,j as t,t as n}from"./profile-storage-DlaupNlV.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=e.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: ${t.join(`, `)}`);return}console.log(`Configuration:
3
3
  `);for(let[e,t]of a)console.log(` ${e}=${t}`);console.log(`\nAvailable keys: ${t.join(`, `)}`)}function a(t,n){let r=e.get(t);n.json?console.log(JSON.stringify({[t]:r??null})):console.log(r||`Not set`)}function o(t,i){e.set(t,i),console.log(`Set ${t}=${i}`),console.error(`(profile: ${n.getEffectiveProfileName()})`),t===`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(t){e.unset(t),console.log(`Unset ${t}`),console.error(`(profile: ${n.getEffectiveProfileName()})`)}export{a as getConfigValue,i as listConfig,o as setConfigValue,s as unsetConfigValue};
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{Et as e,K as t,U as n,V as r,b as i,q as a,u as o}from"./profile-storage-Dv0xRb8J.js";import{t as s}from"./confirm-BrJZbaxf.js";function c(e,n){return n?t(n)?`Next: entrydesk connectors connect ${e} --oauth`:n===`credentials`?`Next: entrydesk connectors connect ${e} --username <username> --password <password>`:`Next: entrydesk connectors connect ${e} --token <token>`:`This connector needs no authorization — there is no connect step.`}async function l(e){let{accessToken:t,workspaceId:n}=await o(),{connectors:r,nextKey:a}=await new i().getConnectors(t,n,{connectionStatus:e.all?`all`:`connected`,search:e.search,limit:e.limit,nextKey:e.nextKey});if(e.json){console.log(JSON.stringify({connectors:r,nextKey:a}));return}if(r.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} (${r.length}):\n`);for(let e of r){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(``)}a&&console.log(`More results: --next-key ${a}`)}async function u(e,t){let{accessToken:n,workspaceId:r}=await o(),{tools:a}=await new i().getConnectorTools(n,r,e);if(t.json){console.log(JSON.stringify({tools:a}));return}if(a.length===0){console.log(`This connector exposes no tools.`);return}console.log(`Tools (${a.length}):\n`);for(let e of a)console.log(` ${e.name} [${e.policy}]`),e.description&&console.log(` ${e.description}`)}async function d(e,t){let{accessToken:n,workspaceId:r}=await o(),a=new i;if(t.oauth){let{url:i}=await a.getConnectorAuthUrl(n,r,e);if(t.json){console.log(JSON.stringify({url:i}));return}console.log(`Open this URL in your browser to authorize the connector:`),console.log(` ${i}`),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 a.connectConnectorToken(n,r,e,s),console.log(t.json?JSON.stringify({id:e,connected:!0}):`Connected connector ${e}.`)}async function f(t){let s=t.auth===`oauth`||t.auth===`google-iap`;s&&(!t.provider||!t.scope?.length)&&(console.error(`--auth ${t.auth} needs --provider and at least one --scope.`),process.exit(1)),!s&&(t.provider||t.scope?.length)&&(console.error(t.auth?`--provider and --scope apply only to --auth oauth and --auth google-iap, not --auth ${t.auth}.`:`--provider and --scope need --auth oauth or --auth google-iap.`),process.exit(1));let l=t.toolPrefix??a(t.name),u=n(l);if(u){let e=r[u];console.error(t.toolPrefix?`--tool-prefix ${e}.`:`The tool prefix derived from --name ("${l}") ${e}. Pass --tool-prefix explicitly.`),process.exit(1)}let{accessToken:d,workspaceId:f}=await o(),p=t.auth?{type:t.auth,...t.provider?{provider:t.provider}:{},...t.scope?.length?{scopes:t.scope}:{}}:void 0,m=await new i().createCustomConnector(d,f,{type:e.CUSTOM_REMOTE_URL,name:t.name,description:t.description,transport:t.transport,url:t.url,toolPrefix:l,...p?{authorization:p}:{}});if(t.json){console.log(JSON.stringify(m));return}console.log(`Created connector ${m.name}.`),console.log(` ID: ${m.id}`),console.log(` URL: ${m.url}`),console.log(` Tool prefix: ${m.toolPrefix}`),console.log(`\n${c(m.id,t.auth)}`)}async function p(e,t){let{accessToken:n,workspaceId:r}=await o();if(!t.yes&&(process.stdin.isTTY||(console.error(`Disconnecting connector ${e} needs confirmation. Re-run with --yes.`),process.exit(1)),!await s(`Disconnect connector ${e}?`))){console.log(`Aborted.`);return}await new i().disconnectConnector(n,r,e),console.log(t.json?JSON.stringify({id:e,disconnected:!0}):`Disconnected connector ${e}.`)}export{d as connectConnector,f as createConnector,p as disconnectConnector,u as listConnectorTools,l as listConnectors};
2
+ import{J as e,U as t,V as n,b as r,kt as i,q as a,u as o}from"./profile-storage-DlaupNlV.js";import{t as s}from"./confirm-BrJZbaxf.js";function c(e,t){return t?a(t)?`Next: entrydesk connectors connect ${e} --oauth`:t===`credentials`?`Next: entrydesk connectors connect ${e} --username <username> --password <password>`:`Next: entrydesk connectors connect ${e} --token <token>`:`This connector needs no authorization — there is no connect step.`}async function l(e){let{accessToken:t,workspaceId:n}=await o(),{connectors:i,nextKey:a}=await new r().getConnectors(t,n,{connectionStatus:e.all?`all`:`connected`,search:e.search,limit:e.limit,nextKey:e.nextKey});if(e.json){console.log(JSON.stringify({connectors:i,nextKey:a}));return}if(i.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} (${i.length}):\n`);for(let e of i){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(``)}a&&console.log(`More results: --next-key ${a}`)}async function u(e,t){let{accessToken:n,workspaceId:i}=await o(),{tools:a}=await new r().getConnectorTools(n,i,e);if(t.json){console.log(JSON.stringify({tools:a}));return}if(a.length===0){console.log(`This connector exposes no tools.`);return}console.log(`Tools (${a.length}):\n`);for(let e of a)console.log(` ${e.name} [${e.policy}]`),e.description&&console.log(` ${e.description}`)}async function d(e,t){let{accessToken:n,workspaceId:i}=await o(),a=new r;if(t.oauth){let{url:r}=await a.getConnectorAuthUrl(n,i,e);if(t.json){console.log(JSON.stringify({url:r}));return}console.log(`Open this URL in your browser to authorize the connector:`),console.log(` ${r}`),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 a.connectConnectorToken(n,i,e,s),console.log(t.json?JSON.stringify({id:e,connected:!0}):`Connected connector ${e}.`)}async function f(a){let s=a.auth===`oauth`||a.auth===`google-iap`;s&&(!a.provider||!a.scope?.length)&&(console.error(`--auth ${a.auth} needs --provider and at least one --scope.`),process.exit(1)),!s&&(a.provider||a.scope?.length)&&(console.error(a.auth?`--provider and --scope apply only to --auth oauth and --auth google-iap, not --auth ${a.auth}.`:`--provider and --scope need --auth oauth or --auth google-iap.`),process.exit(1));let l=a.toolPrefix??e(a.name),u=t(l);if(u){let e=n[u];console.error(a.toolPrefix?`--tool-prefix ${e}.`:`The tool prefix derived from --name ("${l}") ${e}. Pass --tool-prefix explicitly.`),process.exit(1)}let{accessToken:d,workspaceId:f}=await o(),p=a.auth?{type:a.auth,...a.provider?{provider:a.provider}:{},...a.scope?.length?{scopes:a.scope}:{}}:void 0,m=await new r().createCustomConnector(d,f,{type:i.CUSTOM_REMOTE_URL,name:a.name,description:a.description,transport:a.transport,url:a.url,toolPrefix:l,...p?{authorization:p}:{}});if(a.json){console.log(JSON.stringify(m));return}console.log(`Created connector ${m.name}.`),console.log(` ID: ${m.id}`),console.log(` URL: ${m.url}`),console.log(` Tool prefix: ${m.toolPrefix}`),console.log(`\n${c(m.id,a.auth)}`)}async function p(e,t){let{accessToken:n,workspaceId:i}=await o();if(!t.yes&&(process.stdin.isTTY||(console.error(`Disconnecting connector ${e} needs confirmation. Re-run with --yes.`),process.exit(1)),!await s(`Disconnect connector ${e}?`))){console.log(`Aborted.`);return}await new r().disconnectConnector(n,i,e),console.log(t.json?JSON.stringify({id:e,disconnected:!0}):`Disconnected connector ${e}.`)}export{d as connectConnector,f as createConnector,p as disconnectConnector,u as listConnectorTools,l as listConnectors};
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
- import{B as e,D as t,G as n,H as r,I as i,Nt as a,Ot as o,R as s,Tt as c,U as ee,V as te,W as ne,_t as l,gt as re,j as ie,kt as u,lt as d,o as ae,t as f,vt as p,xt as m,yt as oe,z as se}from"./profile-storage-Dv0xRb8J.js";import{t as ce}from"./version-C37EX5li.js";import{a as le,i as h,n as ue,o as g,r as _,s as de,t as fe}from"./options-D6fCp3Q_.js";import{Argument as pe,Command as me,InvalidArgumentError as v,Option as y}from"@commander-js/extra-typings";function he(e){if(e.length===0)return`must not be empty`;if(e.length>50)return`must be at most 50 characters`;if(!r.test(e))return`must use only letters, digits and spaces`;if(/\s{2,}/u.test(e))return`must not contain consecutive spaces`;if(e.trim()!==e)return`must not start or end with whitespace`}function b(e){if(!/^[+-]?\d+$/u.test(e.trim()))throw new v(`must be an integer`);return Number.parseInt(e,10)}function x(e,t){return n=>{let r=b(n);if(r<e||r>t)throw new v(`must be an integer between ${e} and ${t}`);return r}}function S(e){return t=>{let n=Number(t.trim());if(t.trim()===``||!Number.isFinite(n))throw new v(`must be a number`);if(n<e)throw new v(`must be at least ${e}`);return n}}function C(e){return t=>{if(t.length>e)throw new v(`must be at most ${e} characters`);return t}}function w(e){let t=C(e);return e=>{let n=e.trim();if(n.length===0)throw new v(`must not be empty`);return t(n)}}function ge(e){let t=he(e);if(t)throw new v(t);return e}function _e(e){let t=ee(e);if(t)throw new v(te[t]);return e}function T(e){let t=e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0);if(t.length===0)throw new v(`must list at least one value`);return t}function E(e,t){let n=x(e,t);return e=>T(e).map(n)}function ve(e,t=[]){return[...t,e]}const ye=/[()*]/u;function D(e,t=[]){let n=e.split(/[\s,]+/u).filter(e=>e.length>0);if(n.length===0)throw new v(`must name at least one tool`);for(let e of n)if(ye.test(e))throw new v(`"${e}" is not a tool name. Name each tool in full, as it is exposed to the model (for example slack__send_message); narrowing one to some of its arguments or matching a whole namespace is not supported`);return[...t,...n]}const be=new Map([[`web`,o.WEB_SEARCH],[`image`,o.CREATION],[`image-gen`,o.CREATION],[`image_generation`,o.CREATION]]);function xe(e){return T(e).map(e=>{let t=e.replaceAll(`-`,`_`),n=be.get(e)??u.find(e=>e===t);if(!n)throw new v(`"${e}" is not one of: ${u.join(`, `)}`);return n})}function O(e){let t=/^(\d{1,2}):(\d{2})$/u.exec(e);if(!t)throw new v(`"${e}" is not an HH:MM time`);let n=Number.parseInt(t[1],10),r=Number.parseInt(t[2],10);if(n>23||r>59)throw new v(`"${e}" is not a valid time of day`);return{hour:n,minute:r}}function Se(e){return T(e).map(O)}function Ce(e){return T(e).map(e=>{let[t,n]=e.split(`-`);if(!t||!n)throw new v(`"${e}" is not an HH:MM-HH:MM range`);return{start:O(t),end:O(n)}})}const k=`--profile <name>`;function A(e){return e.option(`--json`,`Output JSON for scripting`)}function j(e,t){return e.option(`--limit <number>`,`Max results per page (default: ${t})`,x(1,100)).option(`--next-key <cursor>`,`Fetch the next page using this cursor`)}function M(e,t){return j(e,t).addOption(new y(`--all`,`Fetch every page (auto-paginate)`).conflicts(`nextKey`))}function N(e){return e.addOption(new y(`--add-user <userId>`,`Grant a user access`).conflicts(`removeUser`)).option(`--remove-user <userId>`,`Revoke a user's access`)}function P(e){return N(e).addOption(new y(`--role <role>`,`Role for --add-user`).choices(c.options).default(c.enum.viewer))}const F={chat:`Chat & Tasks:`,build:`Build:`,workspace:`Workspace:`,setup:`Setup:`};function we(){return new me().name(`entrydesk`).description(`EntryDesk CLI — interact with EntryDesk from your terminal`).option(`--json`,`Output JSON for scripting (most commands support it)`).option(k,`Use a specific profile for this command`).version(`entrydesk ${ce()}`,`-v, --version`,`Show the version number`).showHelpAfterError("(run `entrydesk --help` to see the command list)").configureHelp({showGlobalOptions:!0}).addHelpText(`after`,`
2
+ import{B as e,D as t,G as n,H as r,I as i,K as a,Lt as ee,Mt as o,Ot as s,R as c,Rt as te,St as ne,U as re,V as ie,W as ae,bt as l,j as oe,jt as u,o as se,t as d,ut as f,vt as ce,wt as p,xt as le,yt as m,z as h}from"./profile-storage-DlaupNlV.js";import{t as ue}from"./version-BTqAbDeB.js";import{a as g,c as de,i as fe,n as pe,o as me,r as he,s as ge,t as _e}from"./options-CgmngSTC.js";import{Argument as ve,Command as ye,InvalidArgumentError as _,Option as v}from"@commander-js/extra-typings";function y(e){if(!/^[+-]?\d+$/u.test(e.trim()))throw new _(`must be an integer`);return Number.parseInt(e,10)}function b(e,t){return n=>{let r=y(n);if(r<e||r>t)throw new _(`must be an integer between ${e} and ${t}`);return r}}function x(e){return t=>{let n=Number(t.trim());if(t.trim()===``||!Number.isFinite(n))throw new _(`must be a number`);if(n<e)throw new _(`must be at least ${e}`);return n}}function S(e){return t=>{if(t.length>e)throw new _(`must be at most ${e} characters`);return t}}function C(e){let t=S(e);return e=>{let n=e.trim();if(n.length===0)throw new _(`must not be empty`);return t(n)}}function be(e){let t=n(e);if(t)throw new _(r[t]);return e}function xe(e){let t=re(e);if(t)throw new _(ie[t]);return e}function w(e){let t=e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0);if(t.length===0)throw new _(`must list at least one value`);return t}function T(e,t){let n=b(e,t);return e=>w(e).map(n)}function Se(e,t=[]){return[...t,e]}const Ce=/[()*]/u;function E(e,t=[]){let n=e.split(/[\s,]+/u).filter(e=>e.length>0);if(n.length===0)throw new _(`must name at least one tool`);for(let e of n)if(Ce.test(e))throw new _(`"${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 we=new Map([[`web`,u.WEB_SEARCH],[`image`,u.CREATION],[`image-gen`,u.CREATION],[`image_generation`,u.CREATION]]);function Te(e){return w(e).map(e=>{let t=e.replaceAll(`-`,`_`),n=we.get(e)??o.find(e=>e===t);if(!n)throw new _(`"${e}" is not one of: ${o.join(`, `)}`);return n})}function D(e){let t=/^(\d{1,2}):(\d{2})$/u.exec(e);if(!t)throw new _(`"${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 _(`"${e}" is not a valid time of day`);return{hour:n,minute:r}}function O(e){return w(e).map(D)}function Ee(e){return w(e).map(e=>{let[t,n]=e.split(`-`);if(!t||!n)throw new _(`"${e}" is not an HH:MM-HH:MM range`);return{start:D(t),end:D(n)}})}const k=`--profile <name>`;function A(e){return e.option(`--json`,`Output JSON for scripting`)}function j(e,t){return e.option(`--limit <number>`,`Max results per page (default: ${t})`,b(1,100)).option(`--next-key <cursor>`,`Fetch the next page using this cursor`)}function M(e,t){return j(e,t).addOption(new v(`--all`,`Fetch every page (auto-paginate)`).conflicts(`nextKey`))}function N(e){return e.addOption(new v(`--add-user <userId>`,`Grant a user access`).conflicts(`removeUser`)).option(`--remove-user <userId>`,`Revoke a user's access`)}function P(e){return N(e).addOption(new v(`--role <role>`,`Role for --add-user`).choices(s.options).default(s.enum.viewer))}const F={chat:`Chat & Tasks:`,build:`Build:`,workspace:`Workspace:`,setup:`Setup:`};function De(){return new ye().name(`entrydesk`).description(`EntryDesk CLI — interact with EntryDesk from your terminal`).option(`--json`,`Output JSON for scripting (most commands support it)`).option(k,`Use a specific profile for this command`).version(`entrydesk ${ue()}`,`-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 I(e){return e.option(`--connector-ids <ids>`,`Comma-separated connector ids`,T).option(`--capabilities <list>`,`Comma-separated capabilities (${u.join(`, `)})`,xe).option(`--conversation-starters <list>`,`Comma-separated conversation starters`,T).option(`--tools <list>`,`Comma-separated tool names (prefix__tool)`,T).option(`--icon-id <iconId>`,`Icon to use`)}function Te(e){let t=e.command(`agents`).summary(`List, show, create, publish, and share agents`).helpGroup(F.build);A(M(t.command(`list`,{isDefault:!0}).description(`List available agents`).option(`--me, --mine`,`List agents you own or edit, with their publish state`),100)).action(async(e,t)=>{let{listAgents:n}=await import(`./agents-CLcXSbBp.js`);await n(t.optsWithGlobals())}),A(t.command(`show`).description(`Show one agent's full details`).argument(`<agentId>`,`Agent to show`)).action(async(e,t,n)=>{let{showAgent:r}=await import(`./agents-CLcXSbBp.js`);await r(e,n.optsWithGlobals())}),A(I(t.command(`create`).description(`Create a new agent`).requiredOption(`--name <name>`,`Agent name`).requiredOption(`--description <text>`,`Short description`).requiredOption(`--system-prompt <text>`,`System prompt`).requiredOption(`--model-id <modelId>`,`Model to run the agent on`))).action(async(e,t)=>{let{createAgent:n}=await import(`./agents-CLcXSbBp.js`);await n(t.optsWithGlobals())}),A(I(t.command(`update`).description(`Update an agent you own`).argument(`<agentId>`,`Agent to update`).option(`--name <name>`,`Agent name`).option(`--description <text>`,`Short description`).option(`--system-prompt <text>`,`System prompt`).option(`--model-id <modelId>`,`Model to run the agent on`))).action(async(e,t,n)=>{let{updateAgent:r}=await import(`./agents-CLcXSbBp.js`);await r(e,n.optsWithGlobals())}),t.command(`delete`).description(`Delete an agent you own`).argument(`<agentId>`,`Agent to delete`).action(async e=>{let{deleteAgent:t}=await import(`./agents-CLcXSbBp.js`);await t(e)}),A(t.command(`publish`).description(`Publish an agent to the workspace`).argument(`<agentId>`,`Agent to publish`)).action(async(e,t,n)=>{let{publishAgent:r}=await import(`./agents-CLcXSbBp.js`);await r(e,n.optsWithGlobals())}),A(P(t.command(`share`).description(`Show or manage sharing (user grants)`).argument(`<agentId>`,`Agent to share`))).action(async(e,t,n)=>{let{shareAgent:r}=await import(`./agents-CLcXSbBp.js`);await r(e,n.optsWithGlobals())})}function Ee(e){let t=e.command(`billing`).summary(`Show billing status and invoices`).helpGroup(F.workspace).addHelpText(`after`,`
8
+ Docs: https://entrydesk.com/docs/cli`)}function I(e){return e.option(`--connector-ids <ids>`,`Comma-separated connector ids`,w).option(`--capabilities <list>`,`Comma-separated capabilities (${o.join(`, `)})`,Te).option(`--conversation-starters <list>`,`Comma-separated conversation starters`,w).option(`--tools <list>`,`Comma-separated tool names (prefix__tool)`,w).option(`--icon-id <iconId>`,`Icon to use`)}function Oe(e){let t=e.command(`agents`).summary(`List, show, create, publish, and share agents`).helpGroup(F.build);A(M(t.command(`list`,{isDefault:!0}).description(`List available agents`).option(`--me, --mine`,`List agents you own or edit, with their publish state`),100)).action(async(e,t)=>{let{listAgents:n}=await import(`./agents-Drg2ZD85.js`);await n(t.optsWithGlobals())}),A(t.command(`show`).description(`Show one agent's full details`).argument(`<agentId>`,`Agent to show`)).action(async(e,t,n)=>{let{showAgent:r}=await import(`./agents-Drg2ZD85.js`);await r(e,n.optsWithGlobals())}),A(I(t.command(`create`).description(`Create a new agent`).requiredOption(`--name <name>`,`Agent name`).requiredOption(`--description <text>`,`Short description`).requiredOption(`--system-prompt <text>`,`System prompt`).requiredOption(`--model-id <modelId>`,`Model to run the agent on`))).action(async(e,t)=>{let{createAgent:n}=await import(`./agents-Drg2ZD85.js`);await n(t.optsWithGlobals())}),A(I(t.command(`update`).description(`Update an agent you own`).argument(`<agentId>`,`Agent to update`).option(`--name <name>`,`Agent name`).option(`--description <text>`,`Short description`).option(`--system-prompt <text>`,`System prompt`).option(`--model-id <modelId>`,`Model to run the agent on`))).action(async(e,t,n)=>{let{updateAgent:r}=await import(`./agents-Drg2ZD85.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-Drg2ZD85.js`);await t(e)}),A(t.command(`publish`).description(`Publish an agent to the workspace`).argument(`<agentId>`,`Agent to publish`)).action(async(e,t,n)=>{let{publishAgent:r}=await import(`./agents-Drg2ZD85.js`);await r(e,n.optsWithGlobals())}),A(P(t.command(`share`).description(`Show or manage sharing (user grants)`).argument(`<agentId>`,`Agent to share`))).action(async(e,t,n)=>{let{shareAgent:r}=await import(`./agents-Drg2ZD85.js`);await r(e,n.optsWithGlobals())})}function ke(e){let t=e.command(`billing`).summary(`Show billing status and invoices`).helpGroup(F.workspace).addHelpText(`after`,`
9
9
  Note: billing endpoints require an interactive login (OAuth); a workspace
10
- PAT (ENTRYDESK_TOKEN) cannot read billing.`);A(t.command(`status`,{isDefault:!0}).description(`Plan, seats, and extra-usage balance`)).action(async(e,t)=>{let{showBillingStatus:n}=await import(`./billing-DHrYi0SU.js`);await n(t.optsWithGlobals())}),A(M(t.command(`invoices`).description(`List finalized invoices`),20)).action(async(e,t)=>{let{listInvoices:n}=await import(`./billing-DHrYi0SU.js`);await n(t.optsWithGlobals())})}function De(e){if(!/^\d+(\.\d+)?$/u.test(e.trim()))throw new v(`must be a positive number`);return e}function Oe(e){let t=e.command(`budget`).summary(`View or manage the workspace budget`).helpGroup(F.workspace);A(t.command(`get`,{isDefault:!0}).description(`Show the current workspace budget`)).action(async(e,t)=>{let{showBudget:n}=await import(`./budget-D_DDPBBb.js`);await n(t.optsWithGlobals())}),A(t.command(`set`).description(`Set the workspace budget`).argument(`<amount>`,`Budget amount, e.g. 100.00`,De)).action(async(e,t,n)=>{let{setBudget:r}=await import(`./budget-D_DDPBBb.js`);await r(e,n.optsWithGlobals())}),A(t.command(`clear`).description(`Remove the workspace budget`)).action(async(e,t)=>{let{clearBudget:n}=await import(`./budget-D_DDPBBb.js`);await n(t.optsWithGlobals())})}const L=()=>new pe(`<key>`,`Configuration key`).choices(ie);function ke(e){let n=e.command(`config`).summary(`Manage CLI configuration`).helpGroup(F.setup).addHelpText(`after`,()=>{let{apiUrl:e,hubUrl:n}=t();return`
10
+ PAT (ENTRYDESK_TOKEN) cannot read billing.`);A(t.command(`status`,{isDefault:!0}).description(`Plan, seats, and extra-usage balance`)).action(async(e,t)=>{let{showBillingStatus:n}=await import(`./billing-Bkk1BhAw.js`);await n(t.optsWithGlobals())}),A(M(t.command(`invoices`).description(`List finalized invoices`),20)).action(async(e,t)=>{let{listInvoices:n}=await import(`./billing-Bkk1BhAw.js`);await n(t.optsWithGlobals())})}function Ae(e){if(!/^\d+(\.\d+)?$/u.test(e.trim()))throw new _(`must be a positive number`);return e}function je(e){let t=e.command(`budget`).summary(`View or manage the workspace budget`).helpGroup(F.workspace);A(t.command(`get`,{isDefault:!0}).description(`Show the current workspace budget`)).action(async(e,t)=>{let{showBudget:n}=await import(`./budget-dazpYOON.js`);await n(t.optsWithGlobals())}),A(t.command(`set`).description(`Set the workspace budget`).argument(`<amount>`,`Budget amount, e.g. 100.00`,Ae)).action(async(e,t,n)=>{let{setBudget:r}=await import(`./budget-dazpYOON.js`);await r(e,n.optsWithGlobals())}),A(t.command(`clear`).description(`Remove the workspace budget`)).action(async(e,t)=>{let{clearBudget:n}=await import(`./budget-dazpYOON.js`);await n(t.optsWithGlobals())})}const L=()=>new ve(`<key>`,`Configuration key`).choices(oe);function Me(e){let n=e.command(`config`).summary(`Manage CLI configuration`).helpGroup(F.setup).addHelpText(`after`,()=>{let{apiUrl:e,hubUrl:n}=t();return`
11
11
  Keys:
12
12
  apiUrl API server URL (default: ${e})
13
13
  hubUrl Hub server URL (default: ${n})
@@ -15,9 +15,9 @@ hubUrl Hub server URL (default: ${n})
15
15
  Examples:
16
16
  entrydesk config set apiUrl http://localhost:3200
17
17
  entrydesk config get apiUrl
18
- entrydesk config unset apiUrl`});A(n.command(`list`,{isDefault:!0}).description(`List all configuration`)).action(async(e,t)=>{let{listConfig:n}=await import(`./config-hGzOCx4u.js`);n(t.optsWithGlobals())}),A(n.command(`get`).description(`Get a configuration value`).addArgument(L())).action(async(e,t,n)=>{let{getConfigValue:r}=await import(`./config-hGzOCx4u.js`);r(e,n.optsWithGlobals())}),n.command(`set`).description(`Set a configuration value`).addArgument(L()).argument(`<value>`,`Value to store`).action(async(e,t)=>{let{setConfigValue:n}=await import(`./config-hGzOCx4u.js`);n(e,t)}),n.command(`unset`).description(`Remove a configuration value`).addArgument(L()).action(async e=>{let{unsetConfigValue:t}=await import(`./config-hGzOCx4u.js`);t(e)})}function Ae(e){let t=e.command(`connectors`).summary(`List connectors and connect/disconnect them`).helpGroup(F.workspace);A(j(t.command(`list`,{isDefault:!0}).description(`List connected connectors`).option(`--all`,`Include connectors you haven't connected yet`).option(`--search <query>`,`Filter by name`,C(200)),100)).action(async(e,t)=>{let{listConnectors:n}=await import(`./connectors-CxzG22No.js`);await n(t.optsWithGlobals())}),A(t.command(`tools`).description(`List the tools a connector exposes`).argument(`<connectorId>`,`Connector to inspect`)).action(async(e,t,n)=>{let{listConnectorTools:r}=await import(`./connectors-CxzG22No.js`);await r(e,n.optsWithGlobals())}),A(t.command(`connect`).description(`Connect a connector`).argument(`<connectorId>`,`Connector to connect`).addOption(new y(`--token <token>`,`Connect with a static token / API key`).conflicts([`username`,`password`,`oauth`])).addOption(new y(`--username <username>`,`Connect with credentials (prefer env vars; argv is visible in process listings)`).conflicts(`oauth`)).addOption(new y(`--password <password>`,`Password to pair with --username`).conflicts(`oauth`)).option(`--oauth`,`Print an OAuth URL to open in your browser`)).action(async(e,t,n)=>{let{connectConnector:r}=await import(`./connectors-CxzG22No.js`);await r(e,n.optsWithGlobals())}),A(t.command(`create`).description(`Create a custom connector pointing at a remote MCP server`).requiredOption(`--name <name>`,`Display name (letters, digits and single spaces)`,ge).requiredOption(`--url <url>`,`MCP server URL`).requiredOption(`--description <text>`,`What the connector is for`,C(500)).addOption(new y(`--transport <transport>`,`MCP transport`).choices(n.options).default(`streamable_http`)).option(`--tool-prefix <prefix>`,`Namespace for this connector's tools (default: the name, lowercased)`,_e).addOption(new y(`--auth <type>`,`Authorization the server requires; omit for an open server`).choices(ne.options)).option(`--provider <name>`,`OAuth provider name, as configured in the workspace (required for --auth oauth / google-iap)`).option(`--scope <scope...>`,`OAuth scope, repeatable (required for --auth oauth / google-iap)`)).action(async(e,t)=>{let{createConnector:n}=await import(`./connectors-CxzG22No.js`);await n(t.optsWithGlobals())}),A(t.command(`disconnect`).description(`Remove your connection to a connector`).argument(`<connectorId>`,`Connector to disconnect`).option(`-y, --yes`,`Skip the confirmation prompt`)).action(async(e,t,n)=>{let{disconnectConnector:r}=await import(`./connectors-CxzG22No.js`);await r(e,n.optsWithGlobals())})}const R=e=>new y(`--type <type>`,e).choices(i);function je(e){let t=e.command(`marketplace`).summary(`Browse and install marketplace agents and skills`).helpGroup(F.build).addHelpText(`after`,`
18
+ entrydesk config unset apiUrl`});A(n.command(`list`,{isDefault:!0}).description(`List all configuration`)).action(async(e,t)=>{let{listConfig:n}=await import(`./config-CSJx1Xlt.js`);n(t.optsWithGlobals())}),A(n.command(`get`).description(`Get a configuration value`).addArgument(L())).action(async(e,t,n)=>{let{getConfigValue:r}=await import(`./config-CSJx1Xlt.js`);r(e,n.optsWithGlobals())}),n.command(`set`).description(`Set a configuration value`).addArgument(L()).argument(`<value>`,`Value to store`).action(async(e,t)=>{let{setConfigValue:n}=await import(`./config-CSJx1Xlt.js`);n(e,t)}),n.command(`unset`).description(`Remove a configuration value`).addArgument(L()).action(async e=>{let{unsetConfigValue:t}=await import(`./config-CSJx1Xlt.js`);t(e)})}function Ne(e){let t=e.command(`connectors`).summary(`List connectors and connect/disconnect them`).helpGroup(F.workspace);A(j(t.command(`list`,{isDefault:!0}).description(`List connected connectors`).option(`--all`,`Include connectors you haven't connected yet`).option(`--search <query>`,`Filter by name`,S(200)),100)).action(async(e,t)=>{let{listConnectors:n}=await import(`./connectors-CHcopt49.js`);await n(t.optsWithGlobals())}),A(t.command(`tools`).description(`List the tools a connector exposes`).argument(`<connectorId>`,`Connector to inspect`)).action(async(e,t,n)=>{let{listConnectorTools:r}=await import(`./connectors-CHcopt49.js`);await r(e,n.optsWithGlobals())}),A(t.command(`connect`).description(`Connect a connector`).argument(`<connectorId>`,`Connector to connect`).addOption(new v(`--token <token>`,`Connect with a static token / API key`).conflicts([`username`,`password`,`oauth`])).addOption(new v(`--username <username>`,`Connect with credentials (prefer env vars; argv is visible in process listings)`).conflicts(`oauth`)).addOption(new v(`--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-CHcopt49.js`);await r(e,n.optsWithGlobals())}),A(t.command(`create`).description(`Create a custom connector pointing at a remote MCP server`).requiredOption(`--name <name>`,`Display name (letters, digits and single spaces)`,be).requiredOption(`--url <url>`,`MCP server URL`).requiredOption(`--description <text>`,`What the connector is for`,S(500)).addOption(new v(`--transport <transport>`,`MCP transport`).choices(a.options).default(`streamable_http`)).option(`--tool-prefix <prefix>`,`Namespace for this connector's tools (default: the name, lowercased)`,xe).addOption(new v(`--auth <type>`,`Authorization the server requires; omit for an open server`).choices(ae.exclude([`dcard-dual`]).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-CHcopt49.js`);await n(t.optsWithGlobals())}),A(t.command(`disconnect`).description(`Remove your connection to a connector`).argument(`<connectorId>`,`Connector to disconnect`).option(`-y, --yes`,`Skip the confirmation prompt`)).action(async(e,t,n)=>{let{disconnectConnector:r}=await import(`./connectors-CHcopt49.js`);await r(e,n.optsWithGlobals())})}const R=e=>new v(`--type <type>`,e).choices(i);function Pe(e){let t=e.command(`marketplace`).summary(`Browse and install marketplace agents and skills`).helpGroup(F.build).addHelpText(`after`,`
19
19
  Note: search/show are public; install requires login and CreateAgent/CreateSkill
20
- permission in the current workspace.`);A(t.command(`search`,{isDefault:!0}).description(`List marketplace agents and skills`).argument(`[tag]`,`Filter by a tag (shorthand for --tag)`).addOption(R(`Only list this resource type`)).option(`--tag <tag>`,`Filter by a tag`).option(`--limit <number>`,`Max results (default: 30)`,x(1,100)).option(`--cursor <key>`,`Pagination cursor from a previous page`)).action(async(e,t,n)=>{let{searchMarketplace:r}=await import(`./marketplace-NSEUjhXf.js`);await r(e,n.optsWithGlobals())}),A(t.command(`show`).description(`Show an agent or skill's details`).argument(`<slug>`,`Marketplace slug`).addOption(R(`Resource type (auto-detected when omitted)`))).action(async(e,t,n)=>{let{showMarketplaceResource:r}=await import(`./marketplace-NSEUjhXf.js`);await r(e,n.optsWithGlobals())}),A(t.command(`install`).description(`Install an agent or skill into the current workspace`).argument(`<slug>`,`Marketplace slug`).addOption(R(`Resource type (auto-detected when omitted)`))).action(async(e,t,n)=>{let{installMarketplaceResource:r}=await import(`./marketplace-NSEUjhXf.js`);await r(e,n.optsWithGlobals())}),A(t.command(`roles`).description(`List role tags you can filter by`)).action(async(e,t)=>{let{showMarketplaceRoles:n}=await import(`./marketplace-NSEUjhXf.js`);await n(t.optsWithGlobals())})}function z(e){return e.option(`--description <text>`,`Meeting description`).option(`--location <text>`,`Meeting location`).option(`--start <iso>`,`Start time, ISO 8601`).option(`--end <iso>`,`End time, ISO 8601`).option(`--conference-link <url>`,`Conference link`).option(`--notes <text>`,`Meeting notes`)}function Me(t){let n=t.command(`meeting`).summary(`Manage meetings, summaries, transcripts, and sharing`).helpGroup(F.build);A(M(n.command(`list`,{isDefault:!0}).description(`List meetings`).addOption(new y(`--filter <scope>`,`Filter meetings`).choices(fe).default(`all`)).option(`--search <text>`,`Search title and description`).addOption(new y(`--sort <field>`,`Sort order`).choices(ue).default(`updated_at`)),20)).action(async(e,t)=>{let{listMeetings:n}=await import(`./meeting-yS83In45.js`);await n(t.optsWithGlobals())}),A(n.command(`get`).description(`Show meeting details and its recordings`).argument(`<meetingId>`,`Meeting to show`)).action(async(e,t,n)=>{let{showMeeting:r}=await import(`./meeting-yS83In45.js`);await r(e,n.optsWithGlobals())}),A(z(n.command(`create`).description(`Create a meeting manually`).requiredOption(`--title <text>`,`Meeting title`))).action(async(e,t)=>{let{createMeeting:n}=await import(`./meeting-yS83In45.js`);await n(t.optsWithGlobals())}),A(z(n.command(`update`).description(`Update a meeting`).argument(`<meetingId>`,`Meeting to update`).option(`--title <text>`,`Meeting title`)).addOption(new y(`--status <status>`,`Meeting status`).choices(se.options)).addOption(new y(`--visibility <visibility>`,`Who can see it`).choices(e.options))).action(async(e,t,n)=>{let{updateMeeting:r}=await import(`./meeting-yS83In45.js`);await r(e,n.optsWithGlobals())}),A(n.command(`delete`).description(`Delete a meeting (soft delete)`).argument(`<meetingId>`,`Meeting to delete`)).action(async(e,t,n)=>{let{deleteMeeting:r}=await import(`./meeting-yS83In45.js`);await r(e,n.optsWithGlobals())}),A(n.command(`summary`).description(`Print the meeting summary (markdown) to stdout`).argument(`<meetingId>`,`Meeting to summarize`)).action(async(e,t,n)=>{let{showMeetingSummary:r}=await import(`./meeting-yS83In45.js`);await r(e,n.optsWithGlobals())}),A(n.command(`transcript`).description(`Print a recording transcript to stdout`).argument(`<recordingId>`,`Recording to transcribe`).option(`--raw`,`Output the raw transcript with timestamps`)).action(async(e,t,n)=>{let{showMeetingTranscript:r}=await import(`./meeting-yS83In45.js`);await r(e,n.optsWithGlobals())}),A(n.command(`previous`).description(`Show the previous meeting's brief in the same series`).argument(`<meetingId>`,`Meeting whose series to look back in`)).action(async(e,t,n)=>{let{showPreviousMeeting:r}=await import(`./meeting-yS83In45.js`);await r(e,n.optsWithGlobals())}),A(N(n.command(`share`).description(`Show or manage sharing (visibility, user/team grants)`).argument(`<meetingId>`,`Meeting to share`).addOption(new y(`--visibility <visibility>`,`Change who can see the meeting (owner only)`).choices(e.options))).addOption(new y(`--add-team <teamId>`,`Grant a team access`).conflicts(`removeTeam`)).option(`--remove-team <teamId>`,`Revoke a team's access`).addOption(new y(`--role <role>`,`Role for --add-user/--add-team`).choices(s.options).default(s.enum.viewer))).action(async(e,t,n)=>{let{shareMeeting:r}=await import(`./meeting-yS83In45.js`);await r(e,n.optsWithGlobals())})}function Ne(e){let t=e.command(`notifications`).summary(`List, count, or mark notifications read`).helpGroup(F.build);A(M(t.command(`list`,{isDefault:!0}).description(`List notifications`).addOption(new y(`--tab <tab>`,`Filter by category`).choices(a).default(`all`)).option(`--event-type <type>`,`Filter by a single event type (e.g. task_complete)`),20)).action(async(e,t)=>{let{listNotifications:n}=await import(`./notifications-QF11-X32.js`);await n(t.optsWithGlobals())}),A(t.command(`unread`).description(`Show the unread notification count`)).action(async(e,t)=>{let{showUnreadCount:n}=await import(`./notifications-QF11-X32.js`);await n(t.optsWithGlobals())}),A(t.command(`read`).description(`Mark a notification as read`).argument(`<notificationId>`,`Notification to mark read`)).action(async(e,t,n)=>{let{markNotificationRead:r}=await import(`./notifications-QF11-X32.js`);await r(e,n.optsWithGlobals())}),A(t.command(`read-all`).description(`Mark every notification as read`)).action(async(e,t)=>{let{markAllNotificationsRead:n}=await import(`./notifications-QF11-X32.js`);await n(t.optsWithGlobals())})}function Pe(e){let t=e.command(`profile`).summary(`Manage profiles`).helpGroup(F.setup);A(t.command(`list`,{isDefault:!0}).description(`List profiles`)).action(async(e,t)=>{let{listProfiles:n}=await import(`./profile-WtKtO0yp.js`);n(t.optsWithGlobals())}),A(t.command(`current`).description(`Show the active profile`)).action(async(e,t)=>{let{showCurrentProfile:n}=await import(`./profile-WtKtO0yp.js`);n(t.optsWithGlobals())}),A(t.command(`show`).description(`Show profile details`).argument(`[name]`,`Profile to show`)).action(async(e,t,n)=>{let{showProfile:r}=await import(`./profile-WtKtO0yp.js`);await r(e,n.optsWithGlobals())}),A(t.command(`create`).description(`Create a profile`).argument(`[name]`,`Profile name (default: default)`)).action(async(e,t,n)=>{let{createProfile:r}=await import(`./profile-WtKtO0yp.js`);r(e,n.optsWithGlobals())}),A(t.command(`use`).alias(`switch`).description(`Switch the active profile`).argument(`[name]`,`Profile to switch to`)).action(async(e,t,n)=>{let{useProfile:r}=await import(`./profile-WtKtO0yp.js`);r(e,n.optsWithGlobals())}),A(t.command(`delete`).aliases([`remove`,`rm`]).description(`Delete a profile`).argument(`[name]`,`Profile to delete`)).action(async(e,t,n)=>{let{deleteProfile:r}=await import(`./profile-WtKtO0yp.js`);await r(e,n.optsWithGlobals())}),A(t.command(`rename`).aliases([`move`,`mv`]).description(`Rename a profile`).argument(`<from>`,`Existing profile name`).argument(`<to>`,`New profile name`)).action(async(e,t,n,r)=>{let{renameProfile:i}=await import(`./profile-WtKtO0yp.js`);await i(e,t,r.optsWithGlobals())}),A(t.command(`clone`).alias(`copy`).description(`Clone config defaults into a new profile (no credentials)`).argument(`<from>`,`Profile to clone`).argument(`<to>`,`New profile name`)).action(async(e,t,n,r)=>{let{cloneProfile:i}=await import(`./profile-WtKtO0yp.js`);await i(e,t,r.optsWithGlobals())})}const B="User id (a UUID); `project members <project>` prints one beside each member";function Fe(e,t){A(e.command(`create`).description(`Create a project. You become its owner; the id and Hub address are printed`).option(`--name <text>`,`Project name (required, up to 255 characters)`).option(`--description <text>`,`Project description (up to ${l} characters)`).option(`--instruction <text>`,`The standing brief every task in the project starts from (up to ${p} characters)`).option(`--instruction-file <path>`,"Read the instruction from a file, or `-` for stdin")).action(async(e,t)=>{let{createProject:n}=await import(`./project-governance-C7rl6gDW.js`);await n(t.optsWithGlobals())}),A(e.command(`delete`).summary(`Delete a project you own`).description(`Delete a project you own. Its tasks leave the project and return to their owners' main lists; its sources, assets and their version history are deleted. Without --yes the effects are listed and you are asked to confirm; a non-interactive run without --yes is refused.`).argument(`<project>`,t).option(`-y, --yes`,`Skip the confirmation prompt`)).action(async(e,t,n)=>{let{deleteProject:r}=await import(`./project-governance-C7rl6gDW.js`);await r(e,n.optsWithGlobals())}),A(e.command(`members`).description(`List the members of a project with their role and id`).argument(`<project>`,t)).action(async(e,t,n)=>{let{listProjectMembers:r}=await import(`./project-governance-C7rl6gDW.js`);await r(e,n.optsWithGlobals())}),A(e.command(`member-add`).description(`Add a workspace member to a project you own; it takes effect at once`).argument(`<project>`,t).argument(`<userId>`,B)).action(async(e,t,n,r)=>{let{addProjectMember:i}=await import(`./project-governance-C7rl6gDW.js`);await i(e,t,r.optsWithGlobals())}),A(e.command(`member-remove`).description(`Remove a member from a project you own, or pass your own id to leave it. The last owner cannot leave`).argument(`<project>`,t).argument(`<userId>`,B)).action(async(e,t,n,r)=>{let{removeProjectMember:i}=await import(`./project-governance-C7rl6gDW.js`);await i(e,t,r.optsWithGlobals())}),A(e.command(`member-role`).description(`Set a member's role in a project you own. The last owner cannot be demoted`).argument(`<project>`,t).argument(`<userId>`,B).option(`--role <role>`,`New role: owner or member`)).action(async(e,t,n,r)=>{let{setProjectMemberRole:i}=await import(`./project-governance-C7rl6gDW.js`);await i(e,t,r.optsWithGlobals())})}const V="Project id, or a 1-based index into a plain `project list` (a `--filter` or `--all` listing prints no index). An index is resolved against the listing as it stands now, so pass an id when the reference has to be stable",H=`Task id — ${le}`;function Ie(e){A(e.command(`tasks`).description("List the tasks you can see in a project — the same listing as `entrydesk tasks --project`, printed with ids").argument(`<project>`,V).option(`-q, --search <query>`,`Search within those tasks`).option(`--limit <number>`,`Max tasks to return`,x(1,50)).option(`--next-key <cursor>`,`Fetch the next page using this cursor`)).action(async(e,t,n)=>{let{listProjectTasks:r}=await import(`./project-tasks-DaGBt4Cp.js`);await r(e,n.optsWithGlobals())}),A(e.command(`task-add`).description(`Move a task you own into a project. A task whose assets the project does not hold yet is refused until you confirm sharing them with every member`).argument(`<project>`,V).argument(`<taskId>`,H).option(`--confirm-asset-sharing`,`Share the task's assets with the project members as part of the move`)).action(async(e,t,n,r)=>{let{addTaskToProject:i}=await import(`./project-tasks-DaGBt4Cp.js`);await i(e,t,r.optsWithGlobals())}),A(e.command(`task-remove`).description(`Move a task you own out of a project. Any assets it produced stay in the project`).argument(`<project>`,V).argument(`<taskId>`,H)).action(async(e,t,n,r)=>{let{removeTaskFromProject:i}=await import(`./project-tasks-DaGBt4Cp.js`);await i(e,t,r.optsWithGlobals())}),A(e.command(`task-share`).description(`Share a task you own inside its project: with one member by id, or with every member by setting its visibility. One flag per call, never a prompt`).argument(`<project>`,V).argument(`<taskId>`,H).option(`--add-user [userId]`,`Let one project member view the task`).option(`--remove-user [userId]`,`Take one member's access back`).option(`--visibility [level]`,"Who can see the task: `project` is every member, `self` is you plus anyone you named").addHelpText(`after`,`
20
+ permission in the current workspace.`);A(t.command(`search`,{isDefault:!0}).description(`List marketplace agents and skills`).argument(`[tag]`,`Filter by a tag (shorthand for --tag)`).addOption(R(`Only list this resource type`)).option(`--tag <tag>`,`Filter by a tag`).option(`--limit <number>`,`Max results (default: 30)`,b(1,100)).option(`--cursor <key>`,`Pagination cursor from a previous page`)).action(async(e,t,n)=>{let{searchMarketplace:r}=await import(`./marketplace-S_4fkbWt.js`);await r(e,n.optsWithGlobals())}),A(t.command(`show`).description(`Show an agent or skill's details`).argument(`<slug>`,`Marketplace slug`).addOption(R(`Resource type (auto-detected when omitted)`))).action(async(e,t,n)=>{let{showMarketplaceResource:r}=await import(`./marketplace-S_4fkbWt.js`);await r(e,n.optsWithGlobals())}),A(t.command(`install`).description(`Install an agent or skill into the current workspace`).argument(`<slug>`,`Marketplace slug`).addOption(R(`Resource type (auto-detected when omitted)`))).action(async(e,t,n)=>{let{installMarketplaceResource:r}=await import(`./marketplace-S_4fkbWt.js`);await r(e,n.optsWithGlobals())}),A(t.command(`roles`).description(`List role tags you can filter by`)).action(async(e,t)=>{let{showMarketplaceRoles:n}=await import(`./marketplace-S_4fkbWt.js`);await n(t.optsWithGlobals())})}function z(e){return e.option(`--description <text>`,`Meeting description`).option(`--location <text>`,`Meeting location`).option(`--start <iso>`,`Start time, ISO 8601`).option(`--end <iso>`,`End time, ISO 8601`).option(`--conference-link <url>`,`Conference link`).option(`--notes <text>`,`Meeting notes`)}function Fe(t){let n=t.command(`meeting`).summary(`Manage meetings, summaries, transcripts, and sharing`).helpGroup(F.build);A(M(n.command(`list`,{isDefault:!0}).description(`List meetings`).addOption(new v(`--filter <scope>`,`Filter meetings`).choices(_e).default(`all`)).option(`--search <text>`,`Search title and description`).addOption(new v(`--sort <field>`,`Sort order`).choices(pe).default(`updated_at`)),20)).action(async(e,t)=>{let{listMeetings:n}=await import(`./meeting-BG76tnT9.js`);await n(t.optsWithGlobals())}),A(n.command(`get`).description(`Show meeting details and its recordings`).argument(`<meetingId>`,`Meeting to show`)).action(async(e,t,n)=>{let{showMeeting:r}=await import(`./meeting-BG76tnT9.js`);await r(e,n.optsWithGlobals())}),A(z(n.command(`create`).description(`Create a meeting manually`).requiredOption(`--title <text>`,`Meeting title`))).action(async(e,t)=>{let{createMeeting:n}=await import(`./meeting-BG76tnT9.js`);await n(t.optsWithGlobals())}),A(z(n.command(`update`).description(`Update a meeting`).argument(`<meetingId>`,`Meeting to update`).option(`--title <text>`,`Meeting title`)).addOption(new v(`--status <status>`,`Meeting status`).choices(e.options)).addOption(new v(`--visibility <visibility>`,`Who can see it`).choices(h.options))).action(async(e,t,n)=>{let{updateMeeting:r}=await import(`./meeting-BG76tnT9.js`);await r(e,n.optsWithGlobals())}),A(n.command(`delete`).description(`Delete a meeting (soft delete)`).argument(`<meetingId>`,`Meeting to delete`)).action(async(e,t,n)=>{let{deleteMeeting:r}=await import(`./meeting-BG76tnT9.js`);await r(e,n.optsWithGlobals())}),A(n.command(`summary`).description(`Print the meeting summary (markdown) to stdout`).argument(`<meetingId>`,`Meeting to summarize`)).action(async(e,t,n)=>{let{showMeetingSummary:r}=await import(`./meeting-BG76tnT9.js`);await r(e,n.optsWithGlobals())}),A(n.command(`transcript`).description(`Print a recording transcript to stdout`).argument(`<recordingId>`,`Recording to transcribe`).option(`--raw`,`Output the raw transcript with timestamps`)).action(async(e,t,n)=>{let{showMeetingTranscript:r}=await import(`./meeting-BG76tnT9.js`);await r(e,n.optsWithGlobals())}),A(n.command(`previous`).description(`Show the previous meeting's brief in the same series`).argument(`<meetingId>`,`Meeting whose series to look back in`)).action(async(e,t,n)=>{let{showPreviousMeeting:r}=await import(`./meeting-BG76tnT9.js`);await r(e,n.optsWithGlobals())}),A(N(n.command(`share`).description(`Show or manage sharing (visibility, user/team grants)`).argument(`<meetingId>`,`Meeting to share`).addOption(new v(`--visibility <visibility>`,`Change who can see the meeting (owner only)`).choices(h.options))).addOption(new v(`--add-team <teamId>`,`Grant a team access`).conflicts(`removeTeam`)).option(`--remove-team <teamId>`,`Revoke a team's access`).addOption(new v(`--role <role>`,`Role for --add-user/--add-team`).choices(c.options).default(c.enum.viewer))).action(async(e,t,n)=>{let{shareMeeting:r}=await import(`./meeting-BG76tnT9.js`);await r(e,n.optsWithGlobals())})}function B(e){let t=e.command(`notifications`).summary(`List, count, or mark notifications read`).helpGroup(F.build);A(M(t.command(`list`,{isDefault:!0}).description(`List notifications`).addOption(new v(`--tab <tab>`,`Filter by category`).choices(te).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-BAMcYXhl.js`);await n(t.optsWithGlobals())}),A(t.command(`unread`).description(`Show the unread notification count`)).action(async(e,t)=>{let{showUnreadCount:n}=await import(`./notifications-BAMcYXhl.js`);await n(t.optsWithGlobals())}),A(t.command(`read`).description(`Mark a notification as read`).argument(`<notificationId>`,`Notification to mark read`)).action(async(e,t,n)=>{let{markNotificationRead:r}=await import(`./notifications-BAMcYXhl.js`);await r(e,n.optsWithGlobals())}),A(t.command(`read-all`).description(`Mark every notification as read`)).action(async(e,t)=>{let{markAllNotificationsRead:n}=await import(`./notifications-BAMcYXhl.js`);await n(t.optsWithGlobals())})}function Ie(e){let t=e.command(`profile`).summary(`Manage profiles`).helpGroup(F.setup);A(t.command(`list`,{isDefault:!0}).description(`List profiles`)).action(async(e,t)=>{let{listProfiles:n}=await import(`./profile-BzXbLYDw.js`);n(t.optsWithGlobals())}),A(t.command(`current`).description(`Show the active profile`)).action(async(e,t)=>{let{showCurrentProfile:n}=await import(`./profile-BzXbLYDw.js`);n(t.optsWithGlobals())}),A(t.command(`show`).description(`Show profile details`).argument(`[name]`,`Profile to show`)).action(async(e,t,n)=>{let{showProfile:r}=await import(`./profile-BzXbLYDw.js`);await r(e,n.optsWithGlobals())}),A(t.command(`create`).description(`Create a profile`).argument(`[name]`,`Profile name (default: default)`)).action(async(e,t,n)=>{let{createProfile:r}=await import(`./profile-BzXbLYDw.js`);r(e,n.optsWithGlobals())}),A(t.command(`use`).alias(`switch`).description(`Switch the active profile`).argument(`[name]`,`Profile to switch to`)).action(async(e,t,n)=>{let{useProfile:r}=await import(`./profile-BzXbLYDw.js`);r(e,n.optsWithGlobals())}),A(t.command(`delete`).aliases([`remove`,`rm`]).description(`Delete a profile`).argument(`[name]`,`Profile to delete`)).action(async(e,t,n)=>{let{deleteProfile:r}=await import(`./profile-BzXbLYDw.js`);await r(e,n.optsWithGlobals())}),A(t.command(`rename`).aliases([`move`,`mv`]).description(`Rename a profile`).argument(`<from>`,`Existing profile name`).argument(`<to>`,`New profile name`)).action(async(e,t,n,r)=>{let{renameProfile:i}=await import(`./profile-BzXbLYDw.js`);await i(e,t,r.optsWithGlobals())}),A(t.command(`clone`).alias(`copy`).description(`Clone config defaults into a new profile (no credentials)`).argument(`<from>`,`Profile to clone`).argument(`<to>`,`New profile name`)).action(async(e,t,n,r)=>{let{cloneProfile:i}=await import(`./profile-BzXbLYDw.js`);await i(e,t,r.optsWithGlobals())})}const V="User id (a UUID); `project members <project>` prints one beside each member";function Le(e,t){A(e.command(`create`).description(`Create a project. You become its owner; the id and Hub address are printed`).option(`--name <text>`,`Project name (required, up to 255 characters)`).option(`--description <text>`,`Project description (up to ${m} characters)`).option(`--instruction <text>`,`The standing brief every task in the project starts from (up to ${l} characters)`).option(`--instruction-file <path>`,"Read the instruction from a file, or `-` for stdin")).action(async(e,t)=>{let{createProject:n}=await import(`./project-governance-CwVlxGE2.js`);await n(t.optsWithGlobals())}),A(e.command(`delete`).summary(`Delete a project you own`).description(`Delete a project you own. Its tasks leave the project and return to their owners' main lists; its sources, assets and their version history are deleted. Without --yes the effects are listed and you are asked to confirm; a non-interactive run without --yes is refused.`).argument(`<project>`,t).option(`-y, --yes`,`Skip the confirmation prompt`)).action(async(e,t,n)=>{let{deleteProject:r}=await import(`./project-governance-CwVlxGE2.js`);await r(e,n.optsWithGlobals())}),A(e.command(`members`).description(`List the members of a project with their role and id`).argument(`<project>`,t)).action(async(e,t,n)=>{let{listProjectMembers:r}=await import(`./project-governance-CwVlxGE2.js`);await r(e,n.optsWithGlobals())}),A(e.command(`member-add`).description(`Add a workspace member to a project you own; it takes effect at once`).argument(`<project>`,t).argument(`<userId>`,V)).action(async(e,t,n,r)=>{let{addProjectMember:i}=await import(`./project-governance-CwVlxGE2.js`);await i(e,t,r.optsWithGlobals())}),A(e.command(`member-remove`).description(`Remove a member from a project you own, or pass your own id to leave it. The last owner cannot leave`).argument(`<project>`,t).argument(`<userId>`,V)).action(async(e,t,n,r)=>{let{removeProjectMember:i}=await import(`./project-governance-CwVlxGE2.js`);await i(e,t,r.optsWithGlobals())}),A(e.command(`member-role`).description(`Set a member's role in a project you own. The last owner cannot be demoted`).argument(`<project>`,t).argument(`<userId>`,V).option(`--role <role>`,`New role: owner or member`)).action(async(e,t,n,r)=>{let{setProjectMemberRole:i}=await import(`./project-governance-CwVlxGE2.js`);await i(e,t,r.optsWithGlobals())})}const H="Project id, or a 1-based index into a plain `project list` (a `--filter`, `--sort-by`, `--order` or `--all` listing prints no index). Projects are numbered in creation order, so a project created later takes the next number and an index only shifts when a project is deleted; pass an id when the reference has to outlive that",U=`Task id — ${me}`;function Re(e){A(e.command(`tasks`).description("List the tasks you can see in a project — the same listing as `entrydesk tasks --project`, printed with ids").argument(`<project>`,H).option(`-q, --search <query>`,`Search within those tasks`).option(`--limit <number>`,`Max tasks to return`,b(1,50)).option(`--next-key <cursor>`,`Fetch the next page using this cursor`)).action(async(e,t,n)=>{let{listProjectTasks:r}=await import(`./project-tasks-CnXLm061.js`);await r(e,n.optsWithGlobals())}),A(e.command(`task-add`).description(`Move a task you own into a project. A task whose assets the project does not hold yet is refused until you confirm sharing them with every member`).argument(`<project>`,H).argument(`<taskId>`,U).option(`--confirm-asset-sharing`,`Share the task's assets with the project members as part of the move`)).action(async(e,t,n,r)=>{let{addTaskToProject:i}=await import(`./project-tasks-CnXLm061.js`);await i(e,t,r.optsWithGlobals())}),A(e.command(`task-remove`).description(`Move a task you own out of a project. Any assets it produced stay in the project`).argument(`<project>`,H).argument(`<taskId>`,U)).action(async(e,t,n,r)=>{let{removeTaskFromProject:i}=await import(`./project-tasks-CnXLm061.js`);await i(e,t,r.optsWithGlobals())}),A(e.command(`task-share`).description(`Share a task you own inside its project: with one member by id, or with every member by setting its visibility. One flag per call, never a prompt`).argument(`<project>`,H).argument(`<taskId>`,U).option(`--add-user [userId]`,`Let one project member view the task`).option(`--remove-user [userId]`,`Take one member's access back`).option(`--visibility [level]`,"Who can see the task: `project` is every member, `self` is you plus anyone you named").addHelpText(`after`,`
21
21
  --add-user, --remove-user and --visibility are mutually exclusive, and each
22
22
  needs its value; with none of them the command prints this usage and exits 1.
23
23
 
@@ -25,14 +25,15 @@ Examples:
25
25
  entrydesk project task-share 1 <taskId> --add-user <userId>
26
26
  entrydesk project task-share 1 <taskId> --remove-user <userId>
27
27
  entrydesk project task-share 1 <taskId> --visibility project
28
- entrydesk project task-share 1 <taskId> --visibility self`)).action(async(e,t,n,r)=>{let{shareProjectTask:i}=await import(`./project-tasks-DaGBt4Cp.js`);await i(e,t,r.optsWithGlobals())})}const U="Which kind of source, as `project sources` lists it: file or link",W="Id of the file or link, as `project sources` lists it";function Le(e){let t=e.command(`project`).summary(`Read and edit a project you belong to`).description(`Read and edit a project you belong to.
28
+ entrydesk project task-share 1 <taskId> --visibility self`)).action(async(e,t,n,r)=>{let{shareProjectTask:i}=await import(`./project-tasks-CnXLm061.js`);await i(e,t,r.optsWithGlobals())})}const W="Which kind of source, as `project sources` lists it: file or link",G="Id of the file or link, as `project sources` lists it";function ze(e){let t=e.command(`project`).summary(`Read and edit a project you belong to`).description(`Read and edit a project you belong to.
29
29
 
30
30
  A project holds sources (the files and links you put in it), the tasks that belong to it, and the assets those tasks produce. Its instruction is the standing brief every task in the project starts from.
31
31
 
32
32
  These commands read and edit the project itself; none of them talks to the AI.`).helpGroup(F.chat).addHelpText(`after`,`
33
33
  Examples:
34
- entrydesk project # List projects you belong to
34
+ entrydesk project # List projects you belong to, oldest first
35
35
  entrydesk project list --filter mine
36
+ entrydesk project list --sort-by lastActivityAt --order desc # Most recently active first, as the Hub shows
36
37
  entrydesk project get 1 # …by its number in that list
37
38
  entrydesk project get <projectId> # …by id, the stable reference
38
39
  entrydesk project instruction 1 > brief.md
@@ -51,13 +52,13 @@ Examples:
51
52
  entrydesk project delete 1
52
53
  entrydesk project tasks 1
53
54
  entrydesk project task-add 1 <taskId>
54
- entrydesk project task-share 1 <taskId> --add-user <userId>`);A(M(t.command(`list`,{isDefault:!0}).description("List the projects you belong to. Positions are shown only on a plain listing, since that is what a `<project>` index resolves against").addOption(new y(`--filter <scope>`,`Which projects to list`).choices(oe.options)),20)).action(async(e,t)=>{let{listProjects:n}=await import(`./project-BhPYRsaZ.js`);await n(t.optsWithGlobals())}),A(t.command(`get`).description(`Show a project: members, counts, and its full instruction`).argument(`<project>`,V)).action(async(e,t,n)=>{let{showProject:r}=await import(`./project-BhPYRsaZ.js`);await r(e,n.optsWithGlobals())}),A(t.command(`instruction`).description(`Print a project's instruction as plain text, ready to pipe`).argument(`<project>`,V)).action(async(e,t,n)=>{let{showProjectInstruction:r}=await import(`./project-BhPYRsaZ.js`);await r(e,n.optsWithGlobals())}),A(t.command(`edit`).description(`Edit a project's name, description, or instruction`).argument(`<project>`,V).option(`--name <text>`,`New project name`,w(255)).option(`--description <text>`,`New project description`,C(l)).addOption(new y(`--instruction <text>`,`Replace the instruction with this text`).argParser(C(p)).conflicts([`instructionFile`,`clearInstruction`])).addOption(new y(`--instruction-file <path>`,"Read the instruction from a file, or `-` for stdin").conflicts(`clearInstruction`)).option(`--clear-instruction`,`Remove the instruction`)).action(async(e,t,n)=>{let{editProject:r}=await import(`./project-BhPYRsaZ.js`);await r(e,n.optsWithGlobals())}),A(t.command(`note`).summary(`Report a work note into a project, with no AI reply`).description("Report a work note into a project: a task under your name, private until you share it, that does not trigger an AI reply. Reach for `entrydesk task --project <project>` instead when you want the AI to answer.").argument(`<project>`,V).option(`-m, --message <text>`,`Note content; wins over --file and stdin`).option(`-f, --file <path>`,"Read the note from a file, or `-` for stdin; wins over piped stdin").option(`--title <text>`,`Note title; defaults to the content's first line`,w(100))).action(async(e,t,n)=>{let{reportProjectNote:r}=await import(`./project-BhPYRsaZ.js`);await r(e,n.optsWithGlobals())}),A(t.command(`sources`).description(`List the sources of a project — the files and links you put in it — with the retrieval description and, for links, the fetch status`).argument(`<project>`,V)).action(async(e,t,n)=>{let{listProjectSources:r}=await import(`./project-sources-CzylP6oS.js`);await r(e,n.optsWithGlobals())}),A(t.command(`sources-add`).description(`Add a source to a project: upload a local file, or add a link when the argument starts with http:// or https://`).argument(`<project>`,V).argument(`<path|url>`,`Path of a local file to upload, or an http(s) URL to add as a link`).option(`--description <text>`,`What this source is for, so the AI knows when to reach for it (up to ${m} characters)`).addHelpText(`after`,`
55
+ entrydesk project task-share 1 <taskId> --add-user <userId>`);A(M(t.command(`list`,{isDefault:!0}).description("List the projects you belong to, oldest created first. Positions are shown only on a plain listing, since that is what a `<project>` index resolves against: a new project lands at the end, so existing numbers move only when a project is deleted").addOption(new v(`--filter <scope>`,`Which projects to list`).choices(le.options)).addOption(new v(`--sort-by <field>`,`Order by creation time, or by your latest task activity as the Hub does`).choices(ne.options).default(he)).addOption(new v(`--order <direction>`,`Ascending or descending`).choices(ee).default(`asc`)),20)).action(async(e,t)=>{let{listProjects:n}=await import(`./project-B9uLW5nn.js`);await n(t.optsWithGlobals())}),A(t.command(`get`).description(`Show a project: members, counts, and its full instruction`).argument(`<project>`,H)).action(async(e,t,n)=>{let{showProject:r}=await import(`./project-B9uLW5nn.js`);await r(e,n.optsWithGlobals())}),A(t.command(`instruction`).description(`Print a project's instruction as plain text, ready to pipe`).argument(`<project>`,H)).action(async(e,t,n)=>{let{showProjectInstruction:r}=await import(`./project-B9uLW5nn.js`);await r(e,n.optsWithGlobals())}),A(t.command(`edit`).description(`Edit a project's name, description, or instruction`).argument(`<project>`,H).option(`--name <text>`,`New project name`,C(255)).option(`--description <text>`,`New project description`,S(m)).addOption(new v(`--instruction <text>`,`Replace the instruction with this text`).argParser(S(l)).conflicts([`instructionFile`,`clearInstruction`])).addOption(new v(`--instruction-file <path>`,"Read the instruction from a file, or `-` for stdin").conflicts(`clearInstruction`)).option(`--clear-instruction`,`Remove the instruction`)).action(async(e,t,n)=>{let{editProject:r}=await import(`./project-B9uLW5nn.js`);await r(e,n.optsWithGlobals())}),A(t.command(`note`).summary(`Report a work note into a project, with no AI reply`).description("Report a work note into a project: a task under your name, private until you share it, that does not trigger an AI reply. Reach for `entrydesk task --project <project>` instead when you want the AI to answer.").argument(`<project>`,H).option(`-m, --message <text>`,`Note content; wins over --file and stdin`).option(`-f, --file <path>`,"Read the note from a file, or `-` for stdin; wins over piped stdin").option(`--title <text>`,`Note title; defaults to the content's first line`,C(100))).action(async(e,t,n)=>{let{reportProjectNote:r}=await import(`./project-B9uLW5nn.js`);await r(e,n.optsWithGlobals())}),A(t.command(`sources`).description(`List the sources of a project — the files and links you put in it — with the retrieval description and, for links, the fetch status`).argument(`<project>`,H)).action(async(e,t,n)=>{let{listProjectSources:r}=await import(`./project-sources-BzMkopCj.js`);await r(e,n.optsWithGlobals())}),A(t.command(`sources-add`).description(`Add a source to a project: upload a local file, or add a link when the argument starts with http:// or https://`).argument(`<project>`,H).argument(`<path|url>`,`Path of a local file to upload, or an http(s) URL to add as a link`).option(`--description <text>`,`What this source is for, so the AI knows when to reach for it (up to ${p} characters)`).addHelpText(`after`,`
55
56
  A link starts fetching its snapshot as soon as it is added; \`project sources\`
56
57
  shows it as pending until the snapshot is ready.
57
58
 
58
59
  Examples:
59
60
  entrydesk project sources-add 1 ./brief.pdf
60
- entrydesk project sources-add 1 https://example.com/spec --description "The API spec"`)).action(async(e,t,n,r)=>{let{addProjectSource:i}=await import(`./project-sources-write-6cBfdUfV.js`);await i(e,t,r.optsWithGlobals())}),A(t.command(`sources-edit`).description(`Edit a source's description — what it is for, so the AI knows when to reach for it`).argument(`<project>`,V).argument(`<file|link>`,U).argument(`<id>`,W).option(`--description <text>`,`The new description (up to ${m} characters); an empty string clears it`)).action(async(e,t,n,r,i)=>{let{editProjectSource:a}=await import(`./project-sources-write-6cBfdUfV.js`);await a(e,t,n,i.optsWithGlobals())}),A(t.command(`sources-refetch`).description(`Fetch a link's snapshot again; it shows as pending until the new snapshot is ready`).argument(`<project>`,V).argument(`<linkId>`,"Id of the link, as `project sources` lists it")).action(async(e,t,n,r)=>{let{refetchProjectSource:i}=await import(`./project-sources-write-6cBfdUfV.js`);await i(e,t,r.optsWithGlobals())}),A(t.command(`sources-rm`).description(`Remove a file or link from a project. Assets are removed in the Hub`).argument(`<project>`,V).argument(`<file|link>`,U).argument(`<id>`,W)).action(async(e,t,n,r,i)=>{let{removeProjectSource:a}=await import(`./project-sources-write-6cBfdUfV.js`);await a(e,t,n,i.optsWithGlobals())}),A(t.command(`context-search`).description(`Search a project's context — across the tasks you can see and its sources — and print a snippet of each match`).argument(`<project>`,V).argument(`<query>`,`Keywords to match`).option(`--type <type>`,`Search only one kind of source: task, file or link`).option(`--limit <number>`,`Max results (default: 10, up to 20)`)).action(async(e,t,n,r)=>{let{searchProjectContext:i}=await import(`./project-context-Cc_Js6n4.js`);await i(e,t,r.optsWithGlobals())}),A(t.command(`context-read`).description(`Print one piece of a project's context — a task you can see, or one of its sources — as plain text, ready to pipe`).argument(`<project>`,V).argument(`<sourceType>`,`What to read: task, file or link`).argument(`<id>`,`Id of the task, file or link`).option(`--full`,`Read a task in full instead of its summary. A file or a link snapshot has one depth — the server serves its stored text up to a fixed cap either way`).option(`--offset <number>`,`Resume a task from this character offset, as reported when the previous read was truncated; implies --full, the only depth an offset means anything against. A truncated file or link snapshot reports no offset because the server does not page one`).addHelpText(`after`,`
61
+ entrydesk project sources-add 1 https://example.com/spec --description "The API spec"`)).action(async(e,t,n,r)=>{let{addProjectSource:i}=await import(`./project-sources-write-D3WzWqet.js`);await i(e,t,r.optsWithGlobals())}),A(t.command(`sources-edit`).description(`Edit a source's description — what it is for, so the AI knows when to reach for it`).argument(`<project>`,H).argument(`<file|link>`,W).argument(`<id>`,G).option(`--description <text>`,`The new description (up to ${p} characters); an empty string clears it`)).action(async(e,t,n,r,i)=>{let{editProjectSource:a}=await import(`./project-sources-write-D3WzWqet.js`);await a(e,t,n,i.optsWithGlobals())}),A(t.command(`sources-refetch`).description(`Fetch a link's snapshot again; it shows as pending until the new snapshot is ready`).argument(`<project>`,H).argument(`<linkId>`,"Id of the link, as `project sources` lists it")).action(async(e,t,n,r)=>{let{refetchProjectSource:i}=await import(`./project-sources-write-D3WzWqet.js`);await i(e,t,r.optsWithGlobals())}),A(t.command(`sources-rm`).description(`Remove a file or link from a project. Assets are removed in the Hub`).argument(`<project>`,H).argument(`<file|link>`,W).argument(`<id>`,G)).action(async(e,t,n,r,i)=>{let{removeProjectSource:a}=await import(`./project-sources-write-D3WzWqet.js`);await a(e,t,n,i.optsWithGlobals())}),A(t.command(`context-search`).description(`Search a project's context — across the tasks you can see and its sources — and print a snippet of each match`).argument(`<project>`,H).argument(`<query>`,`Keywords to match`).option(`--type <type>`,`Search only one kind of source: task, file or link`).option(`--limit <number>`,`Max results (default: 10, up to 20)`)).action(async(e,t,n,r)=>{let{searchProjectContext:i}=await import(`./project-context-VlX5GZxr.js`);await i(e,t,r.optsWithGlobals())}),A(t.command(`context-read`).description(`Print one piece of a project's context — a task you can see, or one of its sources — as plain text, ready to pipe`).argument(`<project>`,H).argument(`<sourceType>`,`What to read: task, file or link`).argument(`<id>`,`Id of the task, file or link`).option(`--full`,`Read a task in full instead of its summary. A file or a link snapshot has one depth — the server serves its stored text up to a fixed cap either way`).option(`--offset <number>`,`Resume a task from this character offset, as reported when the previous read was truncated; implies --full, the only depth an offset means anything against. A truncated file or link snapshot reports no offset because the server does not page one`).addHelpText(`after`,`
61
62
  Only text reaches stdout. A file with no text to extract, and a link whose
62
63
  snapshot is still being fetched or failed, print nothing there — the reason
63
64
  goes to stderr and the exit code is non-zero, so a pipe never carries an
@@ -65,7 +66,7 @@ explanation where the content should be.
65
66
 
66
67
  Examples:
67
68
  entrydesk project context-read 1 file <fileId> > brief.md
68
- entrydesk project context-read 1 task <taskId> --full`)).action(async(e,t,n,r,i)=>{let{readProjectContext:a}=await import(`./project-context-Cc_Js6n4.js`);await a(e,t,n,i.optsWithGlobals())}),Fe(t,V),Ie(t)}function Re(e){let t=e.command(`recordings`).summary(`List, import, retry, and manage recordings`).helpGroup(F.build).addHelpText(`after`,"\nNote: full transcripts live in `entrydesk meeting transcript <recordingId>`.");A(j(t.command(`list`,{isDefault:!0}).description(`List recordings`).option(`--search <query>`,`Filter by title/transcript`,C(200)),20)).action(async(e,t)=>{let{listRecordings:n}=await import(`./recordings-DoExjM1F.js`);await n(t.optsWithGlobals())}),A(t.command(`get`).description(`Show a recording's metadata, summary, and status`).argument(`<recordingId>`,`Recording to show`)).action(async(e,t,n)=>{let{showRecording:r}=await import(`./recordings-DoExjM1F.js`);await r(e,n.optsWithGlobals())}),A(t.command(`import`).description(`Import a recording from a media URL`).argument(`<url>`,`Media URL to import`).option(`--title <text>`,`Title for the imported recording`).option(`--model <modelId>`,`Model for transcription and summary`).option(`--language <code>`,`Preferred transcript language (e.g. zh-TW)`)).action(async(e,t,n)=>{let{importRecording:r}=await import(`./recordings-DoExjM1F.js`);await r(e,n.optsWithGlobals())}),A(t.command(`preview`).description(`Preview a media URL's metadata before importing`).argument(`<url>`,`Media URL to preview`)).action(async(e,t,n)=>{let{previewRecording:r}=await import(`./recordings-DoExjM1F.js`);await r(e,n.optsWithGlobals())}),A(t.command(`audio-url`).description(`Get a signed URL to stream or download the audio`).argument(`<recordingId>`,`Recording to link`)).action(async(e,t,n)=>{let{showRecordingAudioUrl:r}=await import(`./recordings-DoExjM1F.js`);await r(e,n.optsWithGlobals())}),A(t.command(`retry`).description(`Retry processing of a failed recording`).argument(`<recordingId>`,`Recording to retry`)).action(async(e,t,n)=>{let{retryRecording:r}=await import(`./recordings-DoExjM1F.js`);await r(e,n.optsWithGlobals())}),A(t.command(`delete`).description(`Delete a recording`).argument(`<recordingId>`,`Recording to delete`).option(`-y, --yes`,`Skip the confirmation prompt`)).action(async(e,t,n)=>{let{deleteRecording:r}=await import(`./recordings-DoExjM1F.js`);await r(e,n.optsWithGlobals())})}const ze=[...new Set(d.map(e=>e.toolApprovalMode))],Be=[...new Set(d.map(e=>e.approvalHandling))];function G(e){return e.addOption(new y(`--tool-approval-mode <mode>`,`Which tools runs may use without asking: always_allow gates nothing, auto gates high-risk tools. Pass with --approval-handling`).choices(ze)).addOption(new y(`--approval-handling <handling>`,`What a run does at a gated tool: ask pauses until approved in Hub, deny skips the call, bypass runs it. Pass with --tool-approval-mode`).choices(Be)).option(`--allowed-tools <tools...>`,`Pre-authorize these tools for this schedule (comma or space separated)`,D).option(`--disallowed-tools <tools...>`,`Block these tools for this schedule. Wins over --allowed-tools`,D)}function K(e){return e.option(`--utc-offset <offset>`,`Timezone offset, e.g. +08:00`).option(`--holiday-calendars <ids>`,`Comma-separated connected calendar ids to skip on holiday`,T).addOption(new y(`--repeat-type <type>`,`Repeat unit`).choices(_)).option(`--every <n>`,`Repeat every N units`,x(1,1e3)).option(`--time <HH:MM>`,`Time of day (days, weeks, months)`,O).option(`--times <HH:MM,...>`,`Multiple daily trigger times (days only)`,Se).option(`--days-of-week <0-6>`,`Comma-separated days, 0=Sunday`,E(0,6)).option(`--days-of-month <1-31>`,`Comma-separated days of the month`,E(1,31)).option(`--last-day-of-month`,`Include the last day of the month`).option(`--daily-windows <ranges>`,`Comma-separated HH:MM-HH:MM active-time windows (minutes, hours)`,Ce)}function Ve(e){let t=e.command(`schedules`).summary(`Create and manage scheduled tasks`).helpGroup(F.build);A(t.command(`list`,{isDefault:!0}).description(`List schedules`)).action(async(e,t)=>{let{listSchedules:n}=await import(`./schedules-tDaIGaad.js`);await n(t.optsWithGlobals())}),A(t.command(`get`).description(`Show schedule details`).argument(`<scheduleId>`,`Schedule to show`)).action(async(e,t,n)=>{let{showSchedule:r}=await import(`./schedules-tDaIGaad.js`);await r(e,n.optsWithGlobals())}),A(G(K(t.command(`create`).description(`Create a new schedule`).requiredOption(`--name <name>`,`Schedule name`).requiredOption(`--prompt <text>`,`Prompt to send to the agent`).requiredOption(`--agent-id <id>`,`Agent to run`).requiredOption(`--starts-at <datetime>`,`Start time, ISO 8601`)))).action(async(e,t)=>{let{createSchedule:n}=await import(`./schedules-tDaIGaad.js`);await n(t.optsWithGlobals())}),A(G(K(t.command(`edit`).description(`Update a schedule (only the fields you pass)`).argument(`<scheduleId>`,`Schedule to update`).option(`--name <name>`,`Schedule name`).option(`--prompt <text>`,`Prompt to send to the agent`).option(`--agent-id <id>`,`Agent to run`).option(`--agent-version <n>`,`Agent version number to use`,x(1,2**53-1)).option(`--starts-at <datetime>`,`Start time, ISO 8601`)))).action(async(e,t,n)=>{let{editSchedule:r}=await import(`./schedules-tDaIGaad.js`);await r(e,n.optsWithGlobals())}),A(t.command(`activate`).description(`Resume a paused schedule`).argument(`<scheduleId>`,`Schedule to activate`)).action(async(e,t,n)=>{let{setScheduleActive:r}=await import(`./schedules-tDaIGaad.js`);await r(e,!0,n.optsWithGlobals())}),A(t.command(`pause`).description(`Pause an active schedule`).argument(`<scheduleId>`,`Schedule to pause`)).action(async(e,t,n)=>{let{setScheduleActive:r}=await import(`./schedules-tDaIGaad.js`);await r(e,!1,n.optsWithGlobals())}),A(t.command(`run`).description(`Run a schedule now; prints the created taskId`).argument(`<scheduleId>`,`Schedule to run`)).action(async(e,t,n)=>{let{runScheduleNow:r}=await import(`./schedules-tDaIGaad.js`);await r(e,n.optsWithGlobals())}),A(M(t.command(`runs`).description(`List a schedule's run history`).argument(`<scheduleId>`,`Schedule whose runs to list`),20)).action(async(e,t,n)=>{let{listScheduleRuns:r}=await import(`./schedules-tDaIGaad.js`);await r(e,n.optsWithGlobals())}),t.command(`delete`).description(`Delete a schedule`).argument(`<scheduleId>`,`Schedule to delete`).action(async e=>{let{deleteSchedule:t}=await import(`./schedules-tDaIGaad.js`);await t(e)}),A(t.command(`calendars`).description(`List connected calendar accounts`)).action(async(e,t)=>{let{listCalendarAccounts:n}=await import(`./schedules-tDaIGaad.js`);await n(t.optsWithGlobals())})}function He(e){A(e.command(`login`).summary(`Log in to EntryDesk`).helpGroup(F.setup)).action(async(e,t)=>{let{runLogin:n}=await import(`./login-CwXjzUnO.js`);await n(t.optsWithGlobals())})}function Ue(e){e.command(`logout`).summary(`Log out and clear credentials`).helpGroup(F.setup).action(async()=>{let{runLogout:e}=await import(`./logout-BYCFpaxh.js`);await e()})}function We(e){A(e.command(`status`).summary(`Show who you are logged in as`).helpGroup(F.setup)).action(async(e,t)=>{let{runStatus:n}=await import(`./status-gK3MA1oe.js`);await n(t.optsWithGlobals())})}function Ge(e){A(e.command(`models`).summary(`List available models`).option(`--config`,`Show where this deployment resolves a task's model from, and the tier → model mapping`).helpGroup(F.workspace)).action(async(e,t)=>{let{runModels:n}=await import(`./models-AN9cWKSj.js`);await n(t.optsWithGlobals())})}function Ke(e){e.command(`version`).summary(`Show the version number`).helpGroup(F.setup).action(()=>console.log(e.version()))}function qe(e){A(e.command(`update`).summary(`Update the CLI to the latest version`).helpGroup(F.setup).option(`--check`,`Only check for a newer version, don't install`)).action(async(e,t)=>{let{runUpdate:n}=await import(`./update-CJlVgq8V.js`);await n(t.optsWithGlobals())})}function Je(e){e.command(`mcp-server`).summary(`Start the MCP server (stdio or HTTP)`).helpGroup(F.setup).option(`--http`,`Serve over HTTP instead of stdio`).option(`-p, --port <number>`,`Port to listen on`,x(1,65535)).action(async e=>{let{startMcpServer:t}=await import(`./mcp-B7wo_sRO.js`);await t({mode:e.http?`http`:`stdio`,port:e.port})})}function q(e){return e.option(`-g, --global`,`Act at user (global) scope instead of the project`)}function J(e){return e.option(`-a, --agent <agentId>`,`Restrict install to specific agents (repeatable; '*' for all)`,ve)}function Ye(e){let t=e.command(`skills`).summary(`List, upload, version, toggle, and share skills`).helpGroup(F.build);A(q(t.command(`list`,{isDefault:!0}).description(`List available skills`).option(`--me, --mine`,`Only skills you created`).option(`--local`,`Only locally-tracked skills`).option(`--remote`,`Only workspace skills`).option(`--all`,`Both local and remote, merged`))).action(async(e,t)=>{let{listSkills:n}=await import(`./skills-CDd-emMc.js`);await n(t.optsWithGlobals())}),A(t.command(`upload`).description(`Upload a skill zip file or folder`).argument(`<path>`,`Zip file or folder to upload`).option(`--force`,`Overwrite an existing skill with the same name`)).action(async(e,t,n)=>{let{uploadSkill:r}=await import(`./skills-CDd-emMc.js`);await r(e,n.optsWithGlobals())}),A(t.command(`toggle`).description(`Enable or disable a skill for yourself`).argument(`<skillId>`,`Skill to toggle`).addOption(new y(`--enable`,`Turn the skill on`).conflicts(`disable`)).option(`--disable`,`Turn the skill off`)).action(async(e,t,n)=>{let{toggleSkill:r}=await import(`./skills-CDd-emMc.js`);await r(e,n.optsWithGlobals())}),A(t.command(`versions`).description(`List a skill's version history`).argument(`<skillId>`,`Skill to inspect`)).action(async(e,t,n)=>{let{listSkillVersions:r}=await import(`./skills-CDd-emMc.js`);await r(e,n.optsWithGlobals())}),A(P(t.command(`share`).description(`Show or manage sharing (user grants)`).argument(`<skillId>`,`Skill to share`))).action(async(e,t,n)=>{let{shareSkill:r}=await import(`./skills-CDd-emMc.js`);await r(e,n.optsWithGlobals())}),t.command(`delete`).description(`Delete a skill you own`).argument(`<skillId>`,`Skill to delete`).action(async e=>{let{deleteSkill:t}=await import(`./skills-CDd-emMc.js`);await t(e)}),A(t.command(`download`).description(`Download and extract a skill to ./<skill-name>/`).argument(`<skillId>`,`Skill to download`)).action(async(e,t,n)=>{let{downloadSkill:r}=await import(`./skills-CDd-emMc.js`);await r(e,n.optsWithGlobals())}),A(J(q(t.command(`add`).description(`Install a skill from an EntryDesk slug/id, a git URL, or a local path`).argument(`<source>`,`Skill source`)))).action(async(e,t,n)=>{let{addSkill:r}=await import(`./skills-CDd-emMc.js`);await r(e,n.optsWithGlobals())}),A(J(q(t.command(`pull`).description(`Download the latest from the workspace`).argument(`[nameOrId]`,`Skill to pull (default: every tracked one)`)))).action(async(e,t,n)=>{let{pullSkill:r}=await import(`./skills-CDd-emMc.js`);await r(e,n.optsWithGlobals())}),A(q(t.command(`push`).description(`Upload local changes to the workspace`).argument(`[name]`,`Skill to push (default: every changed one)`).option(`--force`,`Overwrite the workspace copy`))).action(async(e,t,n)=>{let{pushSkill:r}=await import(`./skills-CDd-emMc.js`);await r(e,n.optsWithGlobals())}),A(q(t.command(`status`).description(`Show local vs workspace drift`))).action(async(e,t)=>{let{showSkillsStatus:n}=await import(`./skills-CDd-emMc.js`);await n(t.optsWithGlobals())}),A(q(t.command(`remove`).description(`Uninstall a skill locally`).argument(`<name>`,`Skill to remove`).option(`--remote`,`Also delete the skill from the workspace`))).action(async(e,t,n)=>{let{removeSkill:r}=await import(`./skills-CDd-emMc.js`);await r(e,n.optsWithGlobals())}),A(q(t.command(`link`).description(`Bind this directory (or the user) to a workspace`).argument(`[workspaceId]`,`Workspace to bind to`))).action(async(e,t,n)=>{let{linkSkillsDirectory:r}=await import(`./skills-CDd-emMc.js`);await r(e,n.optsWithGlobals())}),A(q(t.command(`unlink`).description(`Remove the workspace binding`))).action(async(e,t)=>{let{runSkillsUnlink:n}=await import(`./commands-CdnyYMrx.js`);n(t.optsWithGlobals())})}function Xe(e){e.command(`task`,{isDefault:!0}).summary(`Send a message or run an interactive task`).description(`Send a message to a model or agent, or start an interactive session.`).helpGroup(F.chat).option(`-m, --message <text>`,`Message to send (or pipe via stdin)`).option(`--model <modelId>`,`Model to use (instead of an agent)`).option(`-a, --agent <agentId>`,`Agent to use (instead of --model)`).option(`-c, --continue <n>`,`Continue recent task #n`,x(1,20)).option(`-i, --interactive`,`Interactive mode (continuous chat)`).option(`--project <project>`,"Create the task in this project (a project id, or — with `projects:read` — a 1-based index into a plain `entrydesk project list`)").option(`--connectors <ids>`,`Limit to specific connectors (default: all connected)`,T).option(`--plain`,`Plain text output`).addOption(new y(`--output <mode>`,`Stream events as JSON`).choices(h)).option(`--full-output`,`Show full tool outputs`).option(`--file-system`,`Enable local file operations`).option(`--no-file-system`,`Disable local file operations`).addOption(new y(`--tool-approval-mode <mode>`,`Defaults to the mode /approval saved. Non-interactive runs deny every approval they are asked for`).choices(re.options)).option(`--allowed-tools <tools...>`,`Pre-authorize these tools, so they run without asking (comma or space separated)`,D).option(`--disallowed-tools <tools...>`,`Refuse these tools. Wins over --allowed-tools and --tool-approval-mode`,D).option(`--dangerously-auto-approve-tools`,`Deprecated alias for --tool-approval-mode always_allow`).addHelpText(`after`,`
69
+ entrydesk project context-read 1 task <taskId> --full`)).action(async(e,t,n,r,i)=>{let{readProjectContext:a}=await import(`./project-context-VlX5GZxr.js`);await a(e,t,n,i.optsWithGlobals())}),Le(t,H),Re(t)}function Be(e){let t=e.command(`recordings`).summary(`List, import, retry, and manage recordings`).helpGroup(F.build).addHelpText(`after`,"\nNote: full transcripts live in `entrydesk meeting transcript <recordingId>`.");A(j(t.command(`list`,{isDefault:!0}).description(`List recordings`).option(`--search <query>`,`Filter by title/transcript`,S(200)),20)).action(async(e,t)=>{let{listRecordings:n}=await import(`./recordings-_HnTtukO.js`);await n(t.optsWithGlobals())}),A(t.command(`get`).description(`Show a recording's metadata, summary, and status`).argument(`<recordingId>`,`Recording to show`)).action(async(e,t,n)=>{let{showRecording:r}=await import(`./recordings-_HnTtukO.js`);await r(e,n.optsWithGlobals())}),A(t.command(`import`).description(`Import a recording from a media URL`).argument(`<url>`,`Media URL to import`).option(`--title <text>`,`Title for the imported recording`).option(`--model <modelId>`,`Model for transcription and summary`).option(`--language <code>`,`Preferred transcript language (e.g. zh-TW)`)).action(async(e,t,n)=>{let{importRecording:r}=await import(`./recordings-_HnTtukO.js`);await r(e,n.optsWithGlobals())}),A(t.command(`preview`).description(`Preview a media URL's metadata before importing`).argument(`<url>`,`Media URL to preview`)).action(async(e,t,n)=>{let{previewRecording:r}=await import(`./recordings-_HnTtukO.js`);await r(e,n.optsWithGlobals())}),A(t.command(`audio-url`).description(`Get a signed URL to stream or download the audio`).argument(`<recordingId>`,`Recording to link`)).action(async(e,t,n)=>{let{showRecordingAudioUrl:r}=await import(`./recordings-_HnTtukO.js`);await r(e,n.optsWithGlobals())}),A(t.command(`retry`).description(`Retry processing of a failed recording`).argument(`<recordingId>`,`Recording to retry`)).action(async(e,t,n)=>{let{retryRecording:r}=await import(`./recordings-_HnTtukO.js`);await r(e,n.optsWithGlobals())}),A(t.command(`delete`).description(`Delete a recording`).argument(`<recordingId>`,`Recording to delete`).option(`-y, --yes`,`Skip the confirmation prompt`)).action(async(e,t,n)=>{let{deleteRecording:r}=await import(`./recordings-_HnTtukO.js`);await r(e,n.optsWithGlobals())})}const Ve=[...new Set(f.map(e=>e.toolApprovalMode))],He=[...new Set(f.map(e=>e.approvalHandling))];function K(e){return e.addOption(new v(`--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(Ve)).addOption(new v(`--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(He)).option(`--allowed-tools <tools...>`,`Pre-authorize these tools for this schedule (comma or space separated)`,E).option(`--disallowed-tools <tools...>`,`Block these tools for this schedule. Wins over --allowed-tools`,E)}function q(e){return e.option(`--utc-offset <offset>`,`Timezone offset, e.g. +08:00`).option(`--holiday-calendars <ids>`,`Comma-separated connected calendar ids to skip on holiday`,w).addOption(new v(`--repeat-type <type>`,`Repeat unit`).choices(fe)).option(`--every <n>`,`Repeat every N units`,b(1,1e3)).option(`--time <HH:MM>`,`Time of day (days, weeks, months)`,D).option(`--times <HH:MM,...>`,`Multiple daily trigger times (days only)`,O).option(`--days-of-week <0-6>`,`Comma-separated days, 0=Sunday`,T(0,6)).option(`--days-of-month <1-31>`,`Comma-separated days of the month`,T(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)`,Ee)}function Ue(e){let t=e.command(`schedules`).summary(`Create and manage scheduled tasks`).helpGroup(F.build);A(t.command(`list`,{isDefault:!0}).description(`List schedules`)).action(async(e,t)=>{let{listSchedules:n}=await import(`./schedules-DACWrdY_.js`);await n(t.optsWithGlobals())}),A(t.command(`get`).description(`Show schedule details`).argument(`<scheduleId>`,`Schedule to show`)).action(async(e,t,n)=>{let{showSchedule:r}=await import(`./schedules-DACWrdY_.js`);await r(e,n.optsWithGlobals())}),A(K(q(t.command(`create`).description(`Create a new schedule`).requiredOption(`--name <name>`,`Schedule name`).requiredOption(`--prompt <text>`,`Prompt to send to the agent`).requiredOption(`--agent-id <id>`,`Agent to run`).requiredOption(`--starts-at <datetime>`,`Start time, ISO 8601`)))).action(async(e,t)=>{let{createSchedule:n}=await import(`./schedules-DACWrdY_.js`);await n(t.optsWithGlobals())}),A(K(q(t.command(`edit`).description(`Update a schedule (only the fields you pass)`).argument(`<scheduleId>`,`Schedule to update`).option(`--name <name>`,`Schedule name`).option(`--prompt <text>`,`Prompt to send to the agent`).option(`--agent-id <id>`,`Agent to run`).option(`--agent-version <n>`,`Agent version number to use`,b(1,2**53-1)).option(`--starts-at <datetime>`,`Start time, ISO 8601`)))).action(async(e,t,n)=>{let{editSchedule:r}=await import(`./schedules-DACWrdY_.js`);await r(e,n.optsWithGlobals())}),A(t.command(`activate`).description(`Resume a paused schedule`).argument(`<scheduleId>`,`Schedule to activate`)).action(async(e,t,n)=>{let{setScheduleActive:r}=await import(`./schedules-DACWrdY_.js`);await r(e,!0,n.optsWithGlobals())}),A(t.command(`pause`).description(`Pause an active schedule`).argument(`<scheduleId>`,`Schedule to pause`)).action(async(e,t,n)=>{let{setScheduleActive:r}=await import(`./schedules-DACWrdY_.js`);await r(e,!1,n.optsWithGlobals())}),A(t.command(`run`).description(`Run a schedule now; prints the created taskId`).argument(`<scheduleId>`,`Schedule to run`)).action(async(e,t,n)=>{let{runScheduleNow:r}=await import(`./schedules-DACWrdY_.js`);await r(e,n.optsWithGlobals())}),A(M(t.command(`runs`).description(`List a schedule's run history`).argument(`<scheduleId>`,`Schedule whose runs to list`),20)).action(async(e,t,n)=>{let{listScheduleRuns:r}=await import(`./schedules-DACWrdY_.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-DACWrdY_.js`);await t(e)}),A(t.command(`calendars`).description(`List connected calendar accounts`)).action(async(e,t)=>{let{listCalendarAccounts:n}=await import(`./schedules-DACWrdY_.js`);await n(t.optsWithGlobals())})}function We(e){A(e.command(`login`).summary(`Log in to EntryDesk`).helpGroup(F.setup)).action(async(e,t)=>{let{runLogin:n}=await import(`./login-ACaFCfsh.js`);await n(t.optsWithGlobals())})}function Ge(e){e.command(`logout`).summary(`Log out and clear credentials`).helpGroup(F.setup).action(async()=>{let{runLogout:e}=await import(`./logout-BX4YsOqw.js`);await e()})}function Ke(e){A(e.command(`status`).summary(`Show who you are logged in as`).helpGroup(F.setup)).action(async(e,t)=>{let{runStatus:n}=await import(`./status-ErhWpQxW.js`);await n(t.optsWithGlobals())})}function qe(e){A(e.command(`models`).summary(`List available models`).option(`--config`,`Show where this deployment resolves a task's model from, and the tier → model mapping`).helpGroup(F.workspace)).action(async(e,t)=>{let{runModels:n}=await import(`./models-CkepW_-c.js`);await n(t.optsWithGlobals())})}function Je(e){e.command(`version`).summary(`Show the version number`).helpGroup(F.setup).action(()=>console.log(e.version()))}function Ye(e){A(e.command(`update`).summary(`Update the CLI to the latest version`).helpGroup(F.setup).option(`--check`,`Only check for a newer version, don't install`)).action(async(e,t)=>{let{runUpdate:n}=await import(`./update-D09UponU.js`);await n(t.optsWithGlobals())})}function Xe(e){e.command(`mcp-server`).summary(`Start the MCP server (stdio or HTTP)`).helpGroup(F.setup).option(`--http`,`Serve over HTTP instead of stdio`).option(`-p, --port <number>`,`Port to listen on`,b(1,65535)).action(async e=>{let{startMcpServer:t}=await import(`./mcp-DOUHU2_Z.js`);await t({mode:e.http?`http`:`stdio`,port:e.port})})}function J(e){return e.option(`-g, --global`,`Act at user (global) scope instead of the project`)}function Y(e){return e.option(`-a, --agent <agentId>`,`Restrict install to specific agents (repeatable; '*' for all)`,Se)}function Ze(e){let t=e.command(`skills`).summary(`List, upload, version, toggle, and share skills`).helpGroup(F.build);A(J(t.command(`list`,{isDefault:!0}).description(`List available skills`).option(`--me, --mine`,`Only skills you created`).option(`--local`,`Only locally-tracked skills`).option(`--remote`,`Only workspace skills`).option(`--all`,`Both local and remote, merged`))).action(async(e,t)=>{let{listSkills:n}=await import(`./skills-BenhDHKq.js`);await n(t.optsWithGlobals())}),A(t.command(`upload`).description(`Upload a skill zip file or folder`).argument(`<path>`,`Zip file or folder to upload`).option(`--force`,`Overwrite an existing skill with the same name`)).action(async(e,t,n)=>{let{uploadSkill:r}=await import(`./skills-BenhDHKq.js`);await r(e,n.optsWithGlobals())}),A(t.command(`toggle`).description(`Enable or disable a skill for yourself`).argument(`<skillId>`,`Skill to toggle`).addOption(new v(`--enable`,`Turn the skill on`).conflicts(`disable`)).option(`--disable`,`Turn the skill off`)).action(async(e,t,n)=>{let{toggleSkill:r}=await import(`./skills-BenhDHKq.js`);await r(e,n.optsWithGlobals())}),A(t.command(`versions`).description(`List a skill's version history`).argument(`<skillId>`,`Skill to inspect`)).action(async(e,t,n)=>{let{listSkillVersions:r}=await import(`./skills-BenhDHKq.js`);await r(e,n.optsWithGlobals())}),A(P(t.command(`share`).description(`Show or manage sharing (user grants)`).argument(`<skillId>`,`Skill to share`))).action(async(e,t,n)=>{let{shareSkill:r}=await import(`./skills-BenhDHKq.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-BenhDHKq.js`);await t(e)}),A(t.command(`download`).description(`Download and extract a skill to ./<skill-name>/`).argument(`<skillId>`,`Skill to download`)).action(async(e,t,n)=>{let{downloadSkill:r}=await import(`./skills-BenhDHKq.js`);await r(e,n.optsWithGlobals())}),A(Y(J(t.command(`add`).description(`Install a skill from an EntryDesk slug/id, a git URL, or a local path`).argument(`<source>`,`Skill source`)))).action(async(e,t,n)=>{let{addSkill:r}=await import(`./skills-BenhDHKq.js`);await r(e,n.optsWithGlobals())}),A(Y(J(t.command(`pull`).description(`Download the latest from the workspace`).argument(`[nameOrId]`,`Skill to pull (default: every tracked one)`)))).action(async(e,t,n)=>{let{pullSkill:r}=await import(`./skills-BenhDHKq.js`);await r(e,n.optsWithGlobals())}),A(J(t.command(`push`).description(`Upload local changes to the workspace`).argument(`[name]`,`Skill to push (default: every changed one)`).option(`--force`,`Overwrite the workspace copy`))).action(async(e,t,n)=>{let{pushSkill:r}=await import(`./skills-BenhDHKq.js`);await r(e,n.optsWithGlobals())}),A(J(t.command(`status`).description(`Show local vs workspace drift`))).action(async(e,t)=>{let{showSkillsStatus:n}=await import(`./skills-BenhDHKq.js`);await n(t.optsWithGlobals())}),A(J(t.command(`remove`).description(`Uninstall a skill locally`).argument(`<name>`,`Skill to remove`).option(`--remote`,`Also delete the skill from the workspace`))).action(async(e,t,n)=>{let{removeSkill:r}=await import(`./skills-BenhDHKq.js`);await r(e,n.optsWithGlobals())}),A(J(t.command(`link`).description(`Bind this directory (or the user) to a workspace`).argument(`[workspaceId]`,`Workspace to bind to`))).action(async(e,t,n)=>{let{linkSkillsDirectory:r}=await import(`./skills-BenhDHKq.js`);await r(e,n.optsWithGlobals())}),A(J(t.command(`unlink`).description(`Remove the workspace binding`))).action(async(e,t)=>{let{runSkillsUnlink:n}=await import(`./commands-FVFeS1MV.js`);n(t.optsWithGlobals())})}function Qe(e){e.command(`task`,{isDefault:!0}).summary(`Send a message or run an interactive task`).description(`Send a message to a model or agent, or start an interactive session.`).helpGroup(F.chat).option(`-m, --message <text>`,`Message to send (or pipe via stdin)`).option(`--model <modelId>`,`Model to use (instead of an agent)`).option(`-a, --agent <agentId>`,`Agent to use (instead of --model)`).option(`-c, --continue <n>`,`Continue recent task #n`,b(1,20)).option(`-i, --interactive`,`Interactive mode (continuous chat)`).option(`--project <project>`,"Create the task in this project (a project id, or — with `projects:read` — a 1-based index into a plain `entrydesk project list`)").option(`--connectors <ids>`,`Limit to specific connectors (default: all connected)`,w).option(`--plain`,`Plain text output`).addOption(new v(`--output <mode>`,`Stream events as JSON`).choices(g)).option(`--full-output`,`Show full tool outputs`).option(`--file-system`,`Enable local file operations`).option(`--no-file-system`,`Disable local file operations`).addOption(new v(`--tool-approval-mode <mode>`,`Defaults to the mode /approval saved. Non-interactive runs deny every approval they are asked for`).choices(ce.options)).option(`--allowed-tools <tools...>`,`Pre-authorize these tools, so they run without asking (comma or space separated)`,E).option(`--disallowed-tools <tools...>`,`Refuse these tools. Wins over --allowed-tools and --tool-approval-mode`,E).option(`--dangerously-auto-approve-tools`,`Deprecated alias for --tool-approval-mode always_allow`).addHelpText(`after`,`
69
70
  Working inside a project:
70
71
  --project files the new task in that project, so the turn starts from the
71
72
  project instruction and its members can be given access. The AI answers as
@@ -98,7 +99,7 @@ Examples:
98
99
  List available models: entrydesk models
99
100
  List available agents: entrydesk agents
100
101
  List recent tasks: entrydesk tasks
101
- List a project's tasks: entrydesk tasks --project <project>`).action(async(e,t)=>{let[n]=t.parent?.args??[],r=n===t.name()||t.aliases().includes(n??``),{runTask:i}=await import(`./task-CHnFR-Zp.js`);await i({...e,interactive:e.interactive??!r})})}function Ze(e){A(e.command(`tasks`).summary(`List, search, or view tasks`).helpGroup(F.chat).argument(`[taskId]`,`Task id, or a 1-based index into recent tasks`).addOption(new y(`-q, --search <query>`,`Filter tasks by a search query`).conflicts(`share`)).option(`--limit <number>`,`Max tasks to return`,x(1,50)).option(`--next-key <cursor>`,`Fetch the next page using this cursor`).addOption(new y(`-s, --share <shareId>`,`View a shared task's messages (no login needed)`).conflicts(`project`)).option(`--project <project>`,"Limit the listing and `-q` to the tasks you can see in this project (a project id, or — with `projects:read` — a 1-based index into a plain `entrydesk project list`)").addOption(new y(`--output <mode>`,`Stream messages as JSON events`).choices(h)).option(`--full-output`,`Show full tool outputs when viewing a task`).addHelpText(`after`,`
102
+ List a project's tasks: entrydesk tasks --project <project>`).action(async(e,t)=>{let[n]=t.parent?.args??[],r=n===t.name()||t.aliases().includes(n??``),{runTask:i}=await import(`./task-CvQD8Y4d.js`);await i({...e,interactive:e.interactive??!r})})}function $e(e){A(e.command(`tasks`).summary(`List, search, or view tasks`).helpGroup(F.chat).argument(`[taskId]`,`Task id, or a 1-based index into recent tasks`).addOption(new v(`-q, --search <query>`,`Filter tasks by a search query`).conflicts(`share`)).option(`--limit <number>`,`Max tasks to return`,b(1,50)).option(`--next-key <cursor>`,`Fetch the next page using this cursor`).addOption(new v(`-s, --share <shareId>`,`View a shared task's messages (no login needed)`).conflicts(`project`)).option(`--project <project>`,"Limit the listing and `-q` to the tasks you can see in this project (a project id, or — with `projects:read` — a 1-based index into a plain `entrydesk project list`)").addOption(new v(`--output <mode>`,`Stream messages as JSON events`).choices(g)).option(`--full-output`,`Show full tool outputs when viewing a task`).addHelpText(`after`,`
102
103
  Examples:
103
104
  entrydesk tasks # List recent tasks
104
105
  entrydesk tasks -q "deploy" --limit 20 # Search tasks
@@ -106,7 +107,7 @@ Examples:
106
107
  entrydesk tasks <taskId> --full-output # …with full tool outputs
107
108
  entrydesk tasks -s <shareId> # View a shared task
108
109
  entrydesk tasks --project 2 # Tasks you can see in project 2
109
- entrydesk tasks --project 2 -q "deploy" # …searched within it`)).action(async(e,t,n)=>{let{runTasks:r}=await import(`./tasks-acCatE6n.js`);await r(e,n.optsWithGlobals())})}function Qe(e){let t=e.command(`tool`).summary(`List, get, or call MCP tools`).helpGroup(F.chat);A(t.command(`list`,{isDefault:!0}).description(`List all available tools`).option(`-p, --prefix <name>`,`Filter tools by connector prefix`)).action(async(e,t)=>{let{listTools:n}=await import(`./tool-BEivzspP.js`);await n(t.optsWithGlobals())}),A(t.command(`get`).description(`Get details of a specific tool`).argument(`<name>`,`Tool name`)).action(async(e,t,n)=>{let{getTool:r}=await import(`./tool-BEivzspP.js`);await r(e,n.optsWithGlobals())}),A(t.command(`call`).description(`Call a tool with JSON input`).argument(`<name>`,`Tool name`).option(`-i, --input <json>`,`JSON input for the tool call`).option(`-f, --input-file <path>`,`Read the JSON input from a file`).addHelpText(`after`,`
110
+ entrydesk tasks --project 2 -q "deploy" # …searched within it`)).action(async(e,t,n)=>{let{runTasks:r}=await import(`./tasks-C4dAgHmR.js`);await r(e,n.optsWithGlobals())})}function et(e){let t=e.command(`tool`).summary(`List, get, or call MCP tools`).helpGroup(F.chat);A(t.command(`list`,{isDefault:!0}).description(`List all available tools`).option(`-p, --prefix <name>`,`Filter tools by connector prefix`)).action(async(e,t)=>{let{listTools:n}=await import(`./tool-CpSoLUlR.js`);await n(t.optsWithGlobals())}),A(t.command(`get`).description(`Get details of a specific tool`).argument(`<name>`,`Tool name`)).action(async(e,t,n)=>{let{getTool:r}=await import(`./tool-CpSoLUlR.js`);await r(e,n.optsWithGlobals())}),A(t.command(`call`).description(`Call a tool with JSON input`).argument(`<name>`,`Tool name`).option(`-i, --input <json>`,`JSON input for the tool call`).option(`-f, --input-file <path>`,`Read the JSON input from a file`).addHelpText(`after`,`
110
111
  Input priority:
111
112
  1. --input (direct JSON string)
112
113
  2. --input-file (read from file)
@@ -115,9 +116,9 @@ Input priority:
115
116
  Examples:
116
117
  entrydesk tool call agent__search_agents --input '{"limit": 5}'
117
118
  entrydesk tool call agent__search_agents --input-file input.json
118
- echo '{"limit": 5}' | entrydesk tool call agent__search_agents`)).action(async(e,t,n)=>{let{runToolCall:r}=await import(`./tool-BEivzspP.js`);await r(e,n.optsWithGlobals())})}function Y(e){let t=e.command(`usage`).summary(`Show balance, spend rankings, per-user breakdown, or CSV export`).helpGroup(F.workspace);A(t.command(`summary`,{isDefault:!0}).description(`Per-user monthly cost/operations summary`).option(`--limit <number>`,`Limit rows (default: all)`,x(1,100)).addOption(new y(`--sort-by <field>`,`Sort the summary`).choices(de).default(`cost`))).action(async(e,t)=>{let{showUsageSummary:n}=await import(`./usage-DOI9sowA.js`);await n(t.optsWithGlobals())}),A(t.command(`balance`).description(`Workspace USD balance, spend, and limits`)).action(async(e,t)=>{let{showUsageBalance:n}=await import(`./usage-DOI9sowA.js`);await n(t.optsWithGlobals())}),A(t.command(`me`).description(`Your own usage and availability`)).action(async(e,t)=>{let{showOwnUsage:n}=await import(`./usage-DOI9sowA.js`);await n(t.optsWithGlobals())}),A(t.command(`consumptions`).description(`Per-user extra-usage breakdown`).option(`--limit <number>`,`Max rows (default: 20)`,x(1,100)).option(`--offset <number>`,`Pagination offset`,b).option(`--period-start <iso>`,`Period start`)).action(async(e,t)=>{let{listUsageConsumptions:n}=await import(`./usage-DOI9sowA.js`);await n(t.optsWithGlobals())}),A(t.command(`rank`).description(`Rank workspace spend by user, agent, schedule, or model`).addOption(new y(`--by <field>`,`Dimension to rank by`).choices(g).default(`user`)).option(`--days <number>`,`Rolling window in days (default: all time)`,x(1,365)).option(`--model <substring>`,`Only count calls whose model matches this substring`).option(`--limit <number>`,`Max rows (default: 30)`,x(1,100))).action(async(e,t)=>{let{rankUsage:n}=await import(`./usage-audit-1GZx4VBG.js`);await n(t.optsWithGlobals())}),A(t.command(`drill`).argument(`<email>`,`Workspace member to drill into`).description(`Break one member's spend down by agent, day, and schedule`).option(`--days <number>`,`Lookback in days (default: 30)`,x(1,60),30).option(`--min-cost <number>`,`Only list buckets above this spend (default: 0)`,S(0))).action(async(e,t,n)=>{let{drillUsage:r}=await import(`./usage-audit-1GZx4VBG.js`);await r(e,n.optsWithGlobals())}),A(t.command(`waste`).description(`Find schedules that keep spending while nobody reads the output`).option(`--days <number>`,`Lookback in days (default: 30)`,x(7,60),30).option(`--min-cost <number>`,`Only flag schedules above this spend`,S(0)).option(`--limit <number>`,`Max rows`,x(1,50))).action(async(e,t)=>{let{findUsageWaste:n}=await import(`./usage-audit-1GZx4VBG.js`);await n(t.optsWithGlobals())}),t.command(`export`).description(`Export per-user usage as CSV`).option(`--period-start <iso>`,`Period start`).option(`-o, --output <file>`,`Write the CSV to a file (default: stdout)`).action(async e=>{let{exportUsage:t}=await import(`./usage-DOI9sowA.js`);await t(e)})}function $e(e){let t=e.command(`workflow`).summary(`Create, run, and manage workflows`).helpGroup(F.build).addHelpText(`after`,`
119
+ echo '{"limit": 5}' | entrydesk tool call agent__search_agents`)).action(async(e,t,n)=>{let{runToolCall:r}=await import(`./tool-CpSoLUlR.js`);await r(e,n.optsWithGlobals())})}function tt(e){let t=e.command(`usage`).summary(`Show balance, spend rankings, per-user breakdown, or CSV export`).helpGroup(F.workspace);A(t.command(`summary`,{isDefault:!0}).description(`Per-user monthly cost/operations summary`).option(`--limit <number>`,`Limit rows (default: all)`,b(1,100)).addOption(new v(`--sort-by <field>`,`Sort the summary`).choices(de).default(`cost`))).action(async(e,t)=>{let{showUsageSummary:n}=await import(`./usage-Dibnsgtg.js`);await n(t.optsWithGlobals())}),A(t.command(`balance`).description(`Workspace USD balance, spend, and limits`)).action(async(e,t)=>{let{showUsageBalance:n}=await import(`./usage-Dibnsgtg.js`);await n(t.optsWithGlobals())}),A(t.command(`me`).description(`Your own usage and availability`)).action(async(e,t)=>{let{showOwnUsage:n}=await import(`./usage-Dibnsgtg.js`);await n(t.optsWithGlobals())}),A(t.command(`consumptions`).description(`Per-user extra-usage breakdown`).option(`--limit <number>`,`Max rows (default: 20)`,b(1,100)).option(`--offset <number>`,`Pagination offset`,y).option(`--period-start <iso>`,`Period start`)).action(async(e,t)=>{let{listUsageConsumptions:n}=await import(`./usage-Dibnsgtg.js`);await n(t.optsWithGlobals())}),A(t.command(`rank`).description(`Rank workspace spend by user, agent, schedule, or model`).addOption(new v(`--by <field>`,`Dimension to rank by`).choices(ge).default(`user`)).option(`--days <number>`,`Rolling window in days (default: all time)`,b(1,365)).option(`--model <substring>`,`Only count calls whose model matches this substring`).option(`--limit <number>`,`Max rows (default: 30)`,b(1,100))).action(async(e,t)=>{let{rankUsage:n}=await import(`./usage-audit-Be431Kj1.js`);await n(t.optsWithGlobals())}),A(t.command(`drill`).argument(`<email>`,`Workspace member to drill into`).description(`Break one member's spend down by agent, day, and schedule`).option(`--days <number>`,`Lookback in days (default: 30)`,b(1,60),30).option(`--min-cost <number>`,`Only list buckets above this spend (default: 0)`,x(0))).action(async(e,t,n)=>{let{drillUsage:r}=await import(`./usage-audit-Be431Kj1.js`);await r(e,n.optsWithGlobals())}),A(t.command(`waste`).description(`Find schedules that keep spending while nobody reads the output`).option(`--days <number>`,`Lookback in days (default: 30)`,b(7,60),30).option(`--min-cost <number>`,`Only flag schedules above this spend`,x(0)).option(`--limit <number>`,`Max rows`,b(1,50))).action(async(e,t)=>{let{findUsageWaste:n}=await import(`./usage-audit-Be431Kj1.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-Dibnsgtg.js`);await t(e)})}function nt(e){let t=e.command(`workflow`).summary(`Create, run, and manage workflows`).helpGroup(F.build).addHelpText(`after`,`
119
120
  Examples:
120
121
  entrydesk workflow list --search report
121
122
  entrydesk workflow create --name "Nightly report" --file ./report.js
122
123
  entrydesk workflow run <workflowId> --args '{"date":"2026-06-20"}' --wait
123
- entrydesk workflow run-get <workflowId> <runId>`);A(M(t.command(`list`,{isDefault:!0}).description(`List workflows`).option(`--search <text>`,`Search by name`),20)).action(async(e,t)=>{let{listWorkflows:n}=await import(`./workflow-DhomAltH.js`);await n(t.optsWithGlobals())}),A(t.command(`get`).description(`Show workflow details`).argument(`<workflowId>`,`Workflow to show`).option(`--show-source`,`Print the full script source`)).action(async(e,t,n)=>{let{showWorkflow:r}=await import(`./workflow-DhomAltH.js`);await r(e,n.optsWithGlobals())}),A(t.command(`create`).description(`Create a workflow from a local script file`).requiredOption(`--name <text>`,`Workflow name`).requiredOption(`--file <path>`,`Script source file (.js)`).option(`--description <text>`,`Workflow description`)).action(async(e,t)=>{let{createWorkflow:n}=await import(`./workflow-DhomAltH.js`);await n(t.optsWithGlobals())}),A(t.command(`update`).description(`Update name, description, script, or active state`).argument(`<workflowId>`,`Workflow to update`).option(`--name <text>`,`Workflow name`).option(`--description <text>`,`Workflow description`).option(`--file <path>`,`Script source file (.js)`).addOption(new y(`--activate`,`Enable the workflow`).conflicts(`deactivate`)).option(`--deactivate`,`Disable the workflow`)).action(async(e,t,n)=>{let{updateWorkflow:r}=await import(`./workflow-DhomAltH.js`);await r(e,n.optsWithGlobals())}),A(t.command(`run`).description(`Trigger a run`).argument(`<workflowId>`,`Workflow to run`).addOption(new y(`--args <json>`,`Inline JSON passed to the workflow's args global`).conflicts(`argsFile`)).option(`--args-file <path>`,`Read the JSON args from a file`).option(`--wait`,`Poll the run until it finishes, then print the result`)).action(async(e,t,n)=>{let{triggerWorkflowRun:r}=await import(`./workflow-DhomAltH.js`);await r(e,n.optsWithGlobals())}),A(M(t.command(`runs`).description(`List runs of a workflow`).argument(`<workflowId>`,`Workflow whose runs to list`),20)).action(async(e,t,n)=>{let{listWorkflowRuns:r}=await import(`./workflow-DhomAltH.js`);await r(e,n.optsWithGlobals())}),A(t.command(`run-get`).description(`Show a run's status, nodes, and logs`).argument(`<workflowId>`,`Workflow the run belongs to`).argument(`<runId>`,`Run to show`)).action(async(e,t,n,r)=>{let{showWorkflowRun:i}=await import(`./workflow-DhomAltH.js`);await i(e,t,r.optsWithGlobals())}),A(P(t.command(`share`).description(`Show or manage sharing (user grants)`).argument(`<workflowId>`,`Workflow to share`))).action(async(e,t,n)=>{let{shareWorkflow:r}=await import(`./workflow-DhomAltH.js`);await r(e,n.optsWithGlobals())})}function et(e){let t=e.command(`workspaces`).summary(`List or switch workspaces`).helpGroup(F.workspace);A(t.command(`list`,{isDefault:!0}).description(`List all workspaces`)).action(async(e,t)=>{let{listWorkspaces:n}=await import(`./workspaces-D0VOrP2A.js`);await n(t.optsWithGlobals())}),A(t.command(`switch`).alias(`use`).description(`Switch to a workspace`).argument(`<workspaceId>`,`Workspace to switch to`)).action(async(e,t,n)=>{let{switchWorkspace:r}=await import(`./workspaces-D0VOrP2A.js`);await r(e,n.optsWithGlobals())})}function X(e){return e.commands.length>0}function Z(e,t){return e.options.some(e=>e.long===t)}function Q(e,t){return e.name()===t||e.aliases().includes(t)}function tt(e){X(e)&&!Z(e,`--json`)&&e.addOption(new y(`--json`).hideHelp()),Z(e,`--profile`)||e.addOption(new y(k).hideHelp())}function nt(e){e.hook(`preSubcommand`,(e,t)=>{let[n]=e.args;n===void 0||n.startsWith(`-`)||Q(t,n)||t.registeredArguments.length>0||e.commands.some(e=>Q(e,n))||e.error(`error: unknown command '${n}'`,{code:`commander.unknownCommand`})})}function $(e,t){t||tt(e),X(e)&&nt(e);for(let t of e.commands)t.name()!==`help`&&$(t,!1)}function rt(e){let t=e.optsWithGlobals().profile;return typeof t==`string`?t:void 0}function it(e){let t=e;for(;t.parent?.parent;)t=t.parent;return t.name()}function at(){let e=we();return e.hook(`preAction`,(e,t)=>{if(it(t)===`profile`)return;let n=rt(t)??f.getCurrentProfileName();f.ensureProfileExists(n),f.setOverrideProfile(n)}),Xe(e),Ze(e),Qe(e),Te(e),He(e),Ue(e),We(e),et(e),Ge(e),Ae(e),je(e),Le(e),$e(e),Me(e),Ye(e),Ve(e),Re(e),Ne(e),Y(e),Oe(e),Ee(e),ke(e),Pe(e),Ke(e),qe(e),Je(e),$(e,!0),e}try{await at().parseAsync(process.argv)}catch(e){ae(e)}export{};
124
+ entrydesk workflow run-get <workflowId> <runId>`);A(M(t.command(`list`,{isDefault:!0}).description(`List workflows`).option(`--search <text>`,`Search by name`),20)).action(async(e,t)=>{let{listWorkflows:n}=await import(`./workflow-Dx41WM43.js`);await n(t.optsWithGlobals())}),A(t.command(`get`).description(`Show workflow details`).argument(`<workflowId>`,`Workflow to show`).option(`--show-source`,`Print the full script source`)).action(async(e,t,n)=>{let{showWorkflow:r}=await import(`./workflow-Dx41WM43.js`);await r(e,n.optsWithGlobals())}),A(t.command(`create`).description(`Create a workflow from a local script file`).requiredOption(`--name <text>`,`Workflow name`).requiredOption(`--file <path>`,`Script source file (.js)`).option(`--description <text>`,`Workflow description`)).action(async(e,t)=>{let{createWorkflow:n}=await import(`./workflow-Dx41WM43.js`);await n(t.optsWithGlobals())}),A(t.command(`update`).description(`Update name, description, script, or active state`).argument(`<workflowId>`,`Workflow to update`).option(`--name <text>`,`Workflow name`).option(`--description <text>`,`Workflow description`).option(`--file <path>`,`Script source file (.js)`).addOption(new v(`--activate`,`Enable the workflow`).conflicts(`deactivate`)).option(`--deactivate`,`Disable the workflow`)).action(async(e,t,n)=>{let{updateWorkflow:r}=await import(`./workflow-Dx41WM43.js`);await r(e,n.optsWithGlobals())}),A(t.command(`run`).description(`Trigger a run`).argument(`<workflowId>`,`Workflow to run`).addOption(new v(`--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-Dx41WM43.js`);await r(e,n.optsWithGlobals())}),A(M(t.command(`runs`).description(`List runs of a workflow`).argument(`<workflowId>`,`Workflow whose runs to list`),20)).action(async(e,t,n)=>{let{listWorkflowRuns:r}=await import(`./workflow-Dx41WM43.js`);await r(e,n.optsWithGlobals())}),A(t.command(`run-get`).description(`Show a run's status, nodes, and logs`).argument(`<workflowId>`,`Workflow the run belongs to`).argument(`<runId>`,`Run to show`)).action(async(e,t,n,r)=>{let{showWorkflowRun:i}=await import(`./workflow-Dx41WM43.js`);await i(e,t,r.optsWithGlobals())}),A(P(t.command(`share`).description(`Show or manage sharing (user grants)`).argument(`<workflowId>`,`Workflow to share`))).action(async(e,t,n)=>{let{shareWorkflow:r}=await import(`./workflow-Dx41WM43.js`);await r(e,n.optsWithGlobals())})}function rt(e){let t=e.command(`workspaces`).summary(`List or switch workspaces`).helpGroup(F.workspace);A(t.command(`list`,{isDefault:!0}).description(`List all workspaces`)).action(async(e,t)=>{let{listWorkspaces:n}=await import(`./workspaces-rVOwf5zp.js`);await n(t.optsWithGlobals())}),A(t.command(`switch`).alias(`use`).description(`Switch to a workspace`).argument(`<workspaceId>`,`Workspace to switch to`)).action(async(e,t,n)=>{let{switchWorkspace:r}=await import(`./workspaces-rVOwf5zp.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 it(e){X(e)&&!Z(e,`--json`)&&e.addOption(new v(`--json`).hideHelp()),Z(e,`--profile`)||e.addOption(new v(k).hideHelp())}function at(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||it(e),X(e)&&at(e);for(let t of e.commands)t.name()!==`help`&&$(t,!1)}function ot(e){let t=e.optsWithGlobals().profile;return typeof t==`string`?t:void 0}function st(e){let t=e;for(;t.parent?.parent;)t=t.parent;return t.name()}function ct(){let e=De();return e.hook(`preAction`,(e,t)=>{if(st(t)===`profile`)return;let n=ot(t)??d.getCurrentProfileName();d.ensureProfileExists(n),d.setOverrideProfile(n)}),Qe(e),$e(e),et(e),Oe(e),We(e),Ge(e),Ke(e),rt(e),qe(e),Ne(e),Pe(e),ze(e),nt(e),Fe(e),Ze(e),Ue(e),Be(e),B(e),tt(e),je(e),ke(e),Me(e),Ie(e),Je(e),Ye(e),Xe(e),$(e,!0),e}try{await ct().parseAsync(process.argv)}catch(e){se(e)}export{};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{T as e,vt as t}from"./profile-storage-Dv0xRb8J.js";import{o as n}from"./resolve-f238uD6C.js";import{t as r}from"./stdin-DzzLUF6W.js";import{readFileSync as i}from"node:fs";async function a(t,a){if(t===`-`)return r();try{return i(t,`utf8`)}catch{throw new n(`${a}_file_unreadable`,`Cannot read ${a} file: ${e(t)}`)}}async function o(e){let r=e.instructionFile===void 0?e.instruction:await a(e.instructionFile,`instruction`);if(r!==void 0&&r.length>1e4)throw new n(`project_field_too_long`,`Instruction is too long: the maximum is ${t} characters.`);return r}export{o as n,a as t};
2
+ import{T as e,bt as t}from"./profile-storage-DlaupNlV.js";import{o as n}from"./resolve-7OXPmNrX.js";import{t as r}from"./stdin-DzzLUF6W.js";import{readFileSync as i}from"node:fs";async function a(t,a){if(t===`-`)return r();try{return i(t,`utf8`)}catch{throw new n(`${a}_file_unreadable`,`Cannot read ${a} file: ${e(t)}`)}}async function o(e){let r=e.instructionFile===void 0?e.instruction:await a(e.instructionFile,`instruction`);if(r!==void 0&&r.length>1e4)throw new n(`project_field_too_long`,`Instruction is too long: the maximum is ${t} characters.`);return r}export{o as n,a as t};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{C as e,E as t,_ as n,b as r,h as i,k as a,m as o,y as s}from"./profile-storage-Dv0xRb8J.js";async function c(c){let l=n();if(l){c.json?console.log(JSON.stringify({alreadyAuthenticated:!0,authSource:`sandbox-env`,workspaceId:l.workspaceId})):(console.log(`Already authenticated via ${i}.`),console.log(`No login required — environment credentials are active.`));return}s()&&console.error(`Warning: ENTRYDESK_TOKEN is set — workspace commands will keep using it instead of the credentials saved by this login. Unset ENTRYDESK_TOKEN if you want this login to take effect.`),process.env.DEBUG&&(console.log(`[DEBUG] Hub URL: ${a()}`),console.log(`[DEBUG] API URL: ${t()}`));let u=await o({onDeviceCodeReceived:(e,t)=>{c.json||(console.log(``),console.log(`To finish logging in:`),console.log(``),console.log(` 1. Visit: ${t}`),console.log(` 2. Enter code: ${e}`),console.log(``))},onBrowserOpening:()=>{c.json||console.log(`Opening browser…`)},onWaitingForAuthorization:()=>{c.json||console.log(`Waiting for authorization…`)},onAuthorized:()=>{c.json||console.log(`Authorization successful.`)},onWarning:e=>{console.error(`Warning: ${e}`)}}),{workspaces:d}=await new r().getWorkspaces(u.accessToken),f=d[0];await e.saveAll({accessToken:u.accessToken,refreshToken:u.refreshToken,email:u.email,workspaceId:f?.id}),c.json?console.log(JSON.stringify({email:u.email,workspaceId:f?.id,workspaceName:f?.name,server:t()})):(console.log(`Logged in as ${u.email}`),f&&console.log(`Workspace: ${f.name}`),console.log(`Server: ${t()}`))}export{c as runLogin};
2
+ import{C as e,E as t,_ as n,b as r,h as i,k as a,m as o,y as s}from"./profile-storage-DlaupNlV.js";async function c(c){let l=n();if(l){c.json?console.log(JSON.stringify({alreadyAuthenticated:!0,authSource:`sandbox-env`,workspaceId:l.workspaceId})):(console.log(`Already authenticated via ${i}.`),console.log(`No login required — environment credentials are active.`));return}s()&&console.error(`Warning: ENTRYDESK_TOKEN is set — workspace commands will keep using it instead of the credentials saved by this login. Unset ENTRYDESK_TOKEN if you want this login to take effect.`),process.env.DEBUG&&(console.log(`[DEBUG] Hub URL: ${a()}`),console.log(`[DEBUG] API URL: ${t()}`));let u=await o({onDeviceCodeReceived:(e,t)=>{c.json||(console.log(``),console.log(`To finish logging in:`),console.log(``),console.log(` 1. Visit: ${t}`),console.log(` 2. Enter code: ${e}`),console.log(``))},onBrowserOpening:()=>{c.json||console.log(`Opening browser…`)},onWaitingForAuthorization:()=>{c.json||console.log(`Waiting for authorization…`)},onAuthorized:()=>{c.json||console.log(`Authorization successful.`)},onWarning:e=>{console.error(`Warning: ${e}`)}}),{workspaces:d}=await new r().getWorkspaces(u.accessToken),f=d[0];await e.saveAll({accessToken:u.accessToken,refreshToken:u.refreshToken,email:u.email,workspaceId:f?.id}),c.json?console.log(JSON.stringify({email:u.email,workspaceId:f?.id,workspaceName:f?.name,server:t()})):(console.log(`Logged in as ${u.email}`),f&&console.log(`Workspace: ${f.name}`),console.log(`Server: ${t()}`))}export{c as runLogin};