@entrydesk/cli 1.32.0-beta → 2.0.0-beta
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.
- package/README.md +148 -9
- package/dist/add-Cu0kBobt.js +2 -0
- package/dist/agents--2Fw5-et.js +2 -0
- package/dist/billing-B96487c6.js +2 -0
- package/dist/budget-DhX2gt5z.js +2 -0
- package/dist/commands-C1wX8XQY.js +2 -0
- package/dist/commands-DbXuQqse.js +2 -0
- package/dist/config-eCQwQAt1.js +3 -0
- package/dist/confirm-BrJZbaxf.js +2 -0
- package/dist/connectors-DGmZ4zTG.js +3 -0
- package/dist/hash-Ddmw8YE4.js +2 -0
- package/dist/index.js +49 -1
- package/dist/installer-iaoPJQn3.js +2 -0
- package/dist/login-IvudGta0.js +2 -0
- package/dist/logout-Bjmk9YUh.js +2 -0
- package/dist/marketplace-BPY5cD0d.js +4 -0
- package/dist/mcp-client-Cr_sHGPw.js +2 -0
- package/dist/mcp-ydzvH8kz.js +3 -0
- package/dist/meeting-BDhBTbm3.js +3 -0
- package/dist/models-BFnezI1c.js +2 -0
- package/dist/notifications-4bo-vcIW.js +2 -0
- package/dist/paths-BAZ2NsXN.js +2 -0
- package/dist/profile-BZo9STO2.js +2 -0
- package/dist/profile-storage-mtd3aKrx.js +72 -0
- package/dist/push-Mb0Xb42_.js +2 -0
- package/dist/recordings-D9jnWpxs.js +3 -0
- package/dist/remote-nEFOyIM2.js +2 -0
- package/dist/remove-CJiRVixg.js +2 -0
- package/dist/rolldown-runtime-CIdiawuB.js +2 -0
- package/dist/schedules-BFoirR6r.js +21 -0
- package/dist/skills-DYS1EQMn.js +2 -0
- package/dist/status-BgIfKAmr.js +2 -0
- package/dist/status-DzGv21m4.js +2 -0
- package/dist/task-Db4UcJ6G.js +115 -0
- package/dist/tasks-Dd-GdHfu.js +14 -0
- package/dist/tool-B6W8erW6.js +5 -0
- package/dist/update-CYieYkZl.js +2 -0
- package/dist/usage-BLdNvuse.js +3 -0
- package/dist/version-Cos6L15W.js +2 -0
- package/dist/workflow-DlQtL_J-.js +6 -0
- package/dist/workspaces-IAJitqaO.js +3 -0
- package/package.json +15 -10
- package/dist/agents-6VHSTGVU.js +0 -43
- package/dist/billing-WA7WGH7U.js +0 -24
- package/dist/budget-PC4EAZLV.js +0 -12
- package/dist/chunk-5QJUAR4K.js +0 -120
- package/dist/chunk-77D346VR.js +0 -2
- package/dist/chunk-JMYSCKCF.js +0 -2
- package/dist/chunk-YBS4DYFH.js +0 -2
- package/dist/config-ED6PZQ7J.js +0 -4
- package/dist/config-help-CTZHKILN.js +0 -2
- package/dist/connectors-O4K2ZFDM.js +0 -39
- package/dist/help-KDHCFJNF.js +0 -4
- package/dist/login-LX3ISJEI.js +0 -2
- package/dist/logout-YNCDJ5ST.js +0 -2
- package/dist/marketplace-FHSTOAWV.js +0 -38
- package/dist/mcp-2G4B3BVK.js +0 -4
- package/dist/meeting-UBBSEEHT.js +0 -68
- package/dist/models-PGGTDNI4.js +0 -3
- package/dist/notifications-DHPLCJFY.js +0 -28
- package/dist/profile-K4V2Y63H.js +0 -17
- package/dist/recordings-OXG66QN2.js +0 -42
- package/dist/schedules-R4U37II4.js +0 -66
- package/dist/skills-JVSRQSKA.js +0 -30
- package/dist/status-S37SXIYD.js +0 -2
- package/dist/task-H2COR6Z4.js +0 -180
- package/dist/tasks-7NS4UOBP.js +0 -41
- package/dist/tool-VLJFDXQ4.js +0 -35
- package/dist/update-5GLLNVRU.js +0 -4
- package/dist/usage-PAL5KJ5C.js +0 -29
- package/dist/version-ROABNJFL.js +0 -2
- package/dist/workflow-XERZYR3S.js +0 -62
- package/dist/workspaces-PLJMIDJR.js +0 -14
package/README.md
CHANGED
|
@@ -49,9 +49,6 @@ If the keychain is unavailable, it falls back to an encrypted file at
|
|
|
49
49
|
To force file storage (for example, in CI), set
|
|
50
50
|
`ENTRYDESK_FORCE_FILE_STORAGE=true`.
|
|
51
51
|
|
|
52
|
-
Login requires HTTPS by default. For local development against an HTTP API,
|
|
53
|
-
set `ENTRYDESK_ALLOW_INSECURE_LOGIN=true`.
|
|
54
|
-
|
|
55
52
|
## Task
|
|
56
53
|
|
|
57
54
|
```bash
|
|
@@ -59,8 +56,8 @@ entrydesk task -m "Hello" --model <model>
|
|
|
59
56
|
entrydesk task -a <agent>
|
|
60
57
|
entrydesk task -c 1 -m "Follow up"
|
|
61
58
|
entrydesk task -i
|
|
62
|
-
entrydesk task -i --
|
|
63
|
-
entrydesk task -i --no-
|
|
59
|
+
entrydesk task -i --full-output # Show full tool outputs
|
|
60
|
+
entrydesk task -i --no-file-system # Disable local file operations
|
|
64
61
|
entrydesk task -i --connectors id1,id2 # Use specific connectors
|
|
65
62
|
```
|
|
66
63
|
|
|
@@ -85,11 +82,22 @@ entrydesk tasks
|
|
|
85
82
|
entrydesk tasks 1
|
|
86
83
|
```
|
|
87
84
|
|
|
85
|
+
## Tools
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
entrydesk tool list # List all available tools
|
|
89
|
+
entrydesk tool list --prefix agent # Filter by tool prefix
|
|
90
|
+
entrydesk tool get agent__search_agents # Show a tool's details
|
|
91
|
+
entrydesk tool call agent__search_agents --input '{"limit": 5}'
|
|
92
|
+
entrydesk tool call agent__search_agents --input-file input.json
|
|
93
|
+
echo '{"limit": 5}' | entrydesk tool call agent__search_agents
|
|
94
|
+
```
|
|
95
|
+
|
|
88
96
|
## MCP Server
|
|
89
97
|
|
|
90
98
|
```bash
|
|
91
|
-
entrydesk mcp
|
|
92
|
-
entrydesk mcp --http --port 3100
|
|
99
|
+
entrydesk mcp-server # Stdio mode (for MCP clients)
|
|
100
|
+
entrydesk mcp-server --http --port 3100 # HTTP mode (for debugging)
|
|
93
101
|
```
|
|
94
102
|
|
|
95
103
|
## Skills Management
|
|
@@ -132,6 +140,76 @@ entrydesk agents update <agentId> --name "New Name" --description "..." --system
|
|
|
132
140
|
entrydesk agents delete <agentId>
|
|
133
141
|
```
|
|
134
142
|
|
|
143
|
+
## Meetings and Recordings
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
entrydesk meeting # List meetings
|
|
147
|
+
entrydesk meeting get <meetingId> # Details and its recordings
|
|
148
|
+
entrydesk meeting summary <meetingId> # Print the summary as markdown
|
|
149
|
+
entrydesk meeting transcript <recordingId> # Print a transcript (--raw for timestamps)
|
|
150
|
+
entrydesk meeting share <meetingId> --add-user <userId> --role viewer
|
|
151
|
+
|
|
152
|
+
entrydesk recordings # List recordings
|
|
153
|
+
entrydesk recordings import https://example.com/audio.mp3 --title "Standup"
|
|
154
|
+
entrydesk recordings audio-url <recordingId> # Signed URL to stream the audio
|
|
155
|
+
entrydesk recordings retry <recordingId> # Retry a failed recording
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Workflows
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
entrydesk workflow # List workflows
|
|
162
|
+
entrydesk workflow create --name "Nightly report" --file ./report.js
|
|
163
|
+
entrydesk workflow run <workflowId> --args '{"date":"2026-06-20"}' --wait
|
|
164
|
+
entrydesk workflow runs <workflowId>
|
|
165
|
+
entrydesk workflow run-get <workflowId> <runId>
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Schedules
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
entrydesk schedules # List schedules
|
|
172
|
+
entrydesk schedules create --name "Daily digest" --prompt "Summarize yesterday" \
|
|
173
|
+
--agent-id <agentId> --starts-at 2026-07-01T09:00:00Z \
|
|
174
|
+
--repeat-type days --every 1 --time 09:00
|
|
175
|
+
entrydesk schedules run <scheduleId> # Run now; prints the created taskId
|
|
176
|
+
entrydesk schedules pause <scheduleId>
|
|
177
|
+
entrydesk schedules runs <scheduleId> # Run history
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## Notifications
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
entrydesk notifications # List notifications
|
|
184
|
+
entrydesk notifications --tab action # Only items that need action
|
|
185
|
+
entrydesk notifications unread # Unread count
|
|
186
|
+
entrydesk notifications read <notificationId>
|
|
187
|
+
entrydesk notifications read-all
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Marketplace
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
entrydesk marketplace search # Browse agents and skills
|
|
194
|
+
entrydesk marketplace search --type agent
|
|
195
|
+
entrydesk marketplace show <slug>
|
|
196
|
+
entrydesk marketplace install <slug> --type agent
|
|
197
|
+
entrydesk marketplace roles # Role tags you can filter by
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
`search` and `show` are public; `install` requires login and
|
|
201
|
+
CreateAgent/CreateSkill permission in the current workspace.
|
|
202
|
+
|
|
203
|
+
## Billing
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
entrydesk billing # Plan, seats, and extra-usage balance
|
|
207
|
+
entrydesk billing invoices --limit 10
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Billing endpoints require an interactive login — a workspace PAT
|
|
211
|
+
(`ENTRYDESK_TOKEN`) cannot read them.
|
|
212
|
+
|
|
135
213
|
## Configuration
|
|
136
214
|
|
|
137
215
|
```bash
|
|
@@ -141,9 +219,33 @@ entrydesk config set hubUrl http://localhost:3000
|
|
|
141
219
|
entrydesk config unset apiUrl
|
|
142
220
|
```
|
|
143
221
|
|
|
222
|
+
### Running Against a Local API
|
|
223
|
+
|
|
224
|
+
Point the CLI at a locally running API for one command, or persist it in the
|
|
225
|
+
active profile:
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
ENTRYDESK_API_URL=http://localhost:3200 entrydesk status # one invocation
|
|
229
|
+
entrydesk config set apiUrl http://localhost:3200 # persist
|
|
230
|
+
entrydesk config set hubUrl http://localhost:3000 # login opens this Hub
|
|
231
|
+
entrydesk login
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Keep local work in its own profile so it cannot overwrite the credentials you
|
|
235
|
+
use against production:
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
entrydesk profile create local
|
|
239
|
+
entrydesk profile use local
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
If the local API serves a self-signed certificate, add
|
|
243
|
+
`ENTRYDESK_IGNORE_SSL_ERRORS=true`. It turns off TLS verification for the whole
|
|
244
|
+
process, so use it only against a local endpoint.
|
|
245
|
+
|
|
144
246
|
### Tool Call Timeouts
|
|
145
247
|
|
|
146
|
-
Tool calls (`entrydesk tool call`, and every call proxied by `entrydesk mcp`)
|
|
248
|
+
Tool calls (`entrydesk tool call`, and every call proxied by `entrydesk mcp-server`)
|
|
147
249
|
wait up to 5 minutes for a response, and a server that reports progress keeps
|
|
148
250
|
resetting that window up to an absolute cap of 30 minutes. Raise either limit
|
|
149
251
|
in milliseconds:
|
|
@@ -153,13 +255,50 @@ ENTRYDESK_MCP_TIMEOUT=900000 entrydesk tool call slow__tool -i '{}'
|
|
|
153
255
|
ENTRYDESK_MCP_MAX_TIMEOUT=3600000 entrydesk tool call slow__tool -i '{}'
|
|
154
256
|
```
|
|
155
257
|
|
|
156
|
-
For `entrydesk mcp`, set them in the `env` block of the MCP server entry so
|
|
258
|
+
For `entrydesk mcp-server`, set them in the `env` block of the MCP server entry so
|
|
157
259
|
the proxy never times out before the client that launched it does.
|
|
158
260
|
|
|
159
261
|
These are client-side limits. A tool served by a workspace connector is also
|
|
160
262
|
capped at 5 minutes by the API, so raising `ENTRYDESK_MCP_TIMEOUT` beyond that
|
|
161
263
|
only extends how long the CLI waits on EntryDesk's own long-running tools.
|
|
162
264
|
|
|
265
|
+
## Environment Variables
|
|
266
|
+
|
|
267
|
+
Environment variables take precedence over stored profile config, so a value
|
|
268
|
+
set for a single invocation always wins.
|
|
269
|
+
|
|
270
|
+
| Variable | Purpose | Expected value |
|
|
271
|
+
| -------------------------------- | ----------------------------------------------------------- | ------------------- |
|
|
272
|
+
| `ENTRYDESK_API_URL` | Override the API base URL | URL |
|
|
273
|
+
| `ENTRYDESK_HUB_URL` | Override the Hub URL used for login and share links | URL |
|
|
274
|
+
| `ENTRYDESK_TOKEN` | Personal access token for non-interactive auth | token |
|
|
275
|
+
| `ENTRYDESK_WORKSPACE_ID` | Workspace the PAT acts in (required with `ENTRYDESK_TOKEN`) | workspace id |
|
|
276
|
+
| `ENTRYDESK_FORCE_FILE_STORAGE` | Skip the OS keychain, store credentials in a file | `true` |
|
|
277
|
+
| `ENTRYDESK_IGNORE_SSL_ERRORS` | Disable TLS verification (local development only) | `true` |
|
|
278
|
+
| `ENTRYDESK_MCP_TIMEOUT` | Per-tool-call timeout (see Tool Call Timeouts above) | milliseconds |
|
|
279
|
+
| `ENTRYDESK_MCP_MAX_TIMEOUT` | Absolute cap for progress-extended tool calls | milliseconds |
|
|
280
|
+
| `ENTRYDESK_SANDBOX` | Enable sandbox authentication | `true` |
|
|
281
|
+
| `ENTRYDESK_SANDBOX_ACCESS_TOKEN` | Sandbox credential (required when sandbox is enabled) | token |
|
|
282
|
+
| `ENTRYDESK_SANDBOX_WORKSPACE_ID` | Sandbox workspace (required when sandbox is enabled) | workspace id |
|
|
283
|
+
| `ENTRYDESK_DEBUG` | Log credential-storage/keychain decisions | `true` |
|
|
284
|
+
| `DEBUG` | Verbose request, stream, and stack-trace output | any non-empty value |
|
|
285
|
+
| `NO_COLOR` | Disable colored tool output | any non-empty value |
|
|
286
|
+
|
|
287
|
+
### Non-Interactive Authentication
|
|
288
|
+
|
|
289
|
+
For CI and automation, authenticate with a personal access token instead of
|
|
290
|
+
`entrydesk login`. Both variables are required — setting only the token fails
|
|
291
|
+
with an explicit error:
|
|
292
|
+
|
|
293
|
+
```bash
|
|
294
|
+
export ENTRYDESK_TOKEN=<personal-access-token>
|
|
295
|
+
export ENTRYDESK_WORKSPACE_ID=<workspace-id>
|
|
296
|
+
entrydesk tasks --json
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
Note that billing endpoints are not readable with a PAT; they require an
|
|
300
|
+
interactive login.
|
|
301
|
+
|
|
163
302
|
## Profiles
|
|
164
303
|
|
|
165
304
|
```bash
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{C as e}from"./profile-storage-mtd3aKrx.js";import{d as t,h as n,i as r,n as i,r as a,u as o}from"./paths-BAZ2NsXN.js";import{t as s}from"./hash-Ddmw8YE4.js";import{r as c}from"./installer-iaoPJQn3.js";import{t as l}from"./remote-nEFOyIM2.js";import u from"node:fs";import d from"node:os";import f from"node:path";import{execFileSync as p}from"node:child_process";function m(e,t){let n=f.dirname(e);u.mkdirSync(n,{recursive:!0});let r=u.mkdtempSync(f.join(n,`.${f.basename(e)}.tmp-`)),i=f.join(r,`next`),a=f.join(r,`prev`);u.mkdirSync(i,{recursive:!0});let o=!1;try{t(i),u.existsSync(e)&&(u.renameSync(e,a),o=!0),u.renameSync(i,e)}catch(t){throw o&&!u.existsSync(e)&&u.renameSync(a,e),t}finally{u.rmSync(r,{recursive:!0,force:!0})}}const h=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu,g=/^([\w.-]+)\/([\w.-]+)(?:\/(.+))?$/u;function _(e){return e===`~`?d.homedir():e.startsWith(`~/`)||e.startsWith(`~\\`)?f.join(d.homedir(),e.slice(2)):e}function v(e){return e.startsWith(`./`)||e.startsWith(`../`)||e.startsWith(`/`)||e.startsWith(`~`)||e.startsWith(`.\\`)||/^[a-zA-Z]:[\\/]/u.test(e)}function y(e){let t=/^https?:\/\/github\.com\/([\w.-]+)\/([\w.-]+?)(?:\.git)?(?:\/tree\/([^/]+)(?:\/(.+))?)?\/?$/u.exec(e);return t?{type:`github`,owner:t[1],repo:t[2],gitRef:t[3],subpath:t[4],url:`https://github.com/${t[1]}/${t[2]}`}:null}function b(e){let t=e.trim();if(v(t))return{type:`local`,path:f.resolve(_(t))};if(t.startsWith(`ed:`)){let e=t.slice(3);return{type:`entrydesk`,ref:e,isId:h.test(e)}}if(h.test(t))return{type:`entrydesk`,ref:t,isId:!0};if(t.startsWith(`git@`)||t.endsWith(`.git`))return{type:`git`,url:t};let n=y(t);if(n)return n;if(/^https?:\/\//u.test(t))return{type:`git`,url:t};let r=g.exec(t);return r?{type:`github`,owner:r[1],repo:r[2],subpath:r[3],url:`https://github.com/${r[1]}/${r[2]}`}:{type:`entrydesk`,ref:t,isId:!1}}function x(e){return e.type===`github`?`github`:e.type}const S=new Set([`.git`,`node_modules`,`__pycache__`,`.DS_Store`,`.entrydesk`]);function C(e,t){if(!u.existsSync(f.join(e,`SKILL.md`)))throw Error(`No SKILL.md found at ${e}`);let n=u.realpathSync(e);if(n===(u.existsSync(t)?u.realpathSync(t):f.resolve(t)))return;let r=u.mkdtempSync(f.join(d.tmpdir(),`ed-local-skill-`)),i=f.join(r,`skill`);try{u.cpSync(n,i,{recursive:!0,filter:e=>!S.has(f.basename(e))}),m(t,e=>{u.cpSync(i,e,{recursive:!0})})}finally{u.rmSync(r,{recursive:!0,force:!0})}}function w(e){try{let t=u.readFileSync(f.join(e,`SKILL.md`),`utf8`),n=/^name:\s*(.+?)\s*$/mu.exec(t.split(/^---\s*$/mu)[1]??``);if(n?.[1])return n[1].replace(/^['"]|['"]$/gu,``)}catch{}return f.basename(e)}async function T(e,t){let{default:n}=await import(`adm-zip`),r=new n(e);m(t,e=>{let t=f.resolve(e)+f.sep;for(let n of r.getEntries()){if(n.isDirectory)continue;let r=f.resolve(e,n.entryName);if(!r.startsWith(t))throw Error(`Zip entry contains path traversal: ${n.entryName}`);u.mkdirSync(f.dirname(r),{recursive:!0}),u.writeFileSync(r,n.getData())}})}async function E(e,t){if(t.isId)return t.ref;let n=(await l(e.client,e.accessToken,e.workspaceId)).find(e=>e.name===t.ref||e.id===t.ref);if(!n)throw Error(`Skill not found in workspace: ${t.ref}`);return n.id}function D(e,t,n){let r=u.mkdtempSync(f.join(d.tmpdir(),`ed-npx-skills-`)),i=[`-y`,`skills@1.5.12`,`add`,e,`--copy`,`--yes`];try{p(`npx`,i,{cwd:r,stdio:n?[`ignore`,`pipe`,`pipe`]:`inherit`})}catch(t){throw u.rmSync(r,{recursive:!0,force:!0}),Error(`npx skills failed for ${e}. Ensure npx + network are available. (${t instanceof Error?t.message:String(t)})`,{cause:t})}let a=f.join(r,`.agents`,`skills`);if(!u.existsSync(a))throw u.rmSync(r,{recursive:!0,force:!0}),Error(`npx skills produced no skills under ${a}`);let o=u.readdirSync(a,{withFileTypes:!0}).filter(e=>e.isDirectory());if(o.length===0)throw u.rmSync(r,{recursive:!0,force:!0}),Error(`npx skills installed no skill directory`);let s=o[0];if(o.length>1){let e=t.type===`github`&&t.subpath?f.basename(t.subpath):void 0,n=e?o.find(t=>t.name===e):void 0;if(!n)throw u.rmSync(r,{recursive:!0,force:!0}),Error(`npx skills installed [${o.map(e=>e.name).join(`, `)}]; ${e?`none matched the subpath "${e}"`:`specify a subpath to pick one`}.`);s=n}return{dir:f.join(a,s.name),tmpRoot:r}}async function O(l,d,f){let p=b(l),m=!!d.global,h=a(m,f.workspaceId),g=h.rootDir,_={...f,workspaceId:h.workspaceId};if(!h.linked){let n={workspaceId:f.workspaceId,apiUrl:e()};r(),m?o(n):t(process.cwd(),n)}let v,y,S;if(p.type===`entrydesk`){y=await E(_,p);let e=await _.client.downloadSkillCurrent(_.accessToken,_.workspaceId,y);v=e.name,S=i(g,v);let t=await fetch(e.url);if(!t.ok)throw Error(`Failed to download ${v}: ${t.status}`);await T(Buffer.from(await t.arrayBuffer()),S)}else if(p.type===`local`)v=w(p.path),S=i(g,v),C(p.path,S);else{let{dir:e,tmpRoot:t}=D(l,p,!!d.json);try{v=w(e),S=i(g,v),C(e,S)}finally{u.rmSync(t,{recursive:!0,force:!0})}}let O=s(S),k={source:l,sourceType:x(p),skillId:y,localHash:O,lastPulledHash:p.type===`entrydesk`?O:``,mode:`symlink`,...p.type===`github`?{sourceUrl:p.url,ref:p.gitRef,subpath:p.subpath}:{},...p.type===`git`?{sourceUrl:p.url}:{}};n(g,v,k);let A=c(S,v,g,`symlink`,d.agent);d.json?console.info(JSON.stringify({name:v,sourceType:x(p),hash:O},null,2)):console.info(`✓ added ${v} (${p.type}, ${O.slice(0,12)}) → agents: ${A.map(e=>e.agentId).join(`, `)}`)}export{O as runSkillsAdd};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{U as e,Z as t,b as n,et as r,j as i,l as a,tt as o}from"./profile-storage-mtd3aKrx.js";function s(e){return e?o([...new Set(e)]):t}function c(e){console.log(`Available agents (${e.length}):\n`);for(let t of e){if(console.log(` ${t.name} (${t.visibility})`),t.description){let e=t.description.length>80?`${t.description.slice(0,80)}…`:t.description;console.log(` ${e}`)}console.log(` ID: ${t.id}`),console.log(``)}}function l(e){console.log(`My agents (${e.length}):\n`);for(let t of e){let e=[];t.latestVersionNumber!=null&&e.push(`v${t.latestVersionNumber}`),t.hasUnpublishedChanges&&e.push(`unpublished changes`);let n=e.length>0?` (${e.join(` · `)})`:``;if(console.log(` ${t.name}${n}`),t.description){let e=t.description.length>80?`${t.description.slice(0,80)}…`:t.description;console.log(` ${e}`)}console.log(` ${t.myRole??`no-role`} · ID: ${t.id}`),console.log(``)}}function u(t){if(console.log(`${t.name}\n`),console.log(` ID: ${t.id}`),t.visibility&&console.log(` Visibility: ${t.visibility}`),t.model&&console.log(` Model: ${t.model.name}`),t.author&&console.log(` Author: ${t.author.name}${t.author.isMe?` (you)`:``}`),t.description&&console.log(` Description: ${t.description}`),t.capabilities){let n=r(t.capabilities).map(t=>e(t));n.length>0&&console.log(` Capabilities: ${n.join(`, `)}`)}t.connectors&&t.connectors.length>0&&console.log(` Connectors: ${t.connectors.map(e=>e.name).join(`, `)}`),t.tools&&t.tools.length>0&&console.log(` Tools: ${t.tools.length}`),t.conversationStarters&&t.conversationStarters.length>0&&console.log(` Starters: ${t.conversationStarters.length}`),t.systemPrompt&&console.log(`\n System prompt:\n${t.systemPrompt}`)}function d(e){let t=i(e);if(console.log(`User grants (${t.length}):`),t.length===0){console.log(` (none)`);return}for(let e of t)console.log(` - ${e.user.name} <${e.user.email}> · ${e.role}`),console.log(` ID: ${e.userId}`)}async function f(e){let{accessToken:t,workspaceId:r}=await a(),i=new n;if(e.mine){let n=[],a=e.all?void 0:e.nextKey;for(let o=0;;o++){o>=100&&(console.error(`Reached maximum page limit (100). Use --limit and --next-key for manual pagination.`),process.exit(1));let s=await i.getMyAgents(t,r,{limit:e.limit,nextKey:a});if(n.push(...s.agents),a=s.nextKey,!e.all||!a)break}if(e.json){console.log(JSON.stringify({agents:n,nextKey:a}));return}if(n.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(n),!e.all&&a&&console.log(`Next page: --next-key ${a}`);return}if(e.all){let n=[],a;for(let o=0;;o++){o>=100&&(console.error(`Reached maximum page limit (100). Use --limit and --next-key for manual pagination.`),process.exit(1));let s=await i.getAgents(t,r,{limit:e.limit??100,nextKey:a});if(n.push(...s.agents),a=s.nextKey,!a)break}if(e.json){console.log(JSON.stringify({agents:n}));return}if(n.length===0){console.log("No agents in this workspace yet. Create one with `entrydesk agents create`, or browse `entrydesk marketplace`.");return}c(n);return}let{agents:o,nextKey:s}=await i.getAgents(t,r,{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 p(e,t){let{accessToken:r,workspaceId:i}=await a(),o=await new n().getAgent(r,i,e);if(t.json){console.log(JSON.stringify(o));return}u(o)}async function m(e){let{accessToken:t,workspaceId:r}=await a(),i=await new n().createAgent(t,r,{name:e.name,description:e.description,systemPrompt:e.systemPrompt,modelId:e.modelId,connectorIds:e.connectorIds??[],capabilities:s(e.capabilities),conversationStarters:e.conversationStarters??[],tools:e.tools,iconId:e.iconId});if(e.json){console.log(JSON.stringify(i));return}console.log(`Created agent: ${i.name}`),console.log(` ID: ${i.id}`)}async function h(e,t){let{accessToken:r,workspaceId:i}=await a(),o=new n,c=await o.getAgent(r,i,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(r,i,e,l),console.log(`Updated agent: ${e}`)}async function g(e){let{accessToken:t,workspaceId:r}=await a();await new n().deleteAgent(t,r,e),console.log(`Deleted agent: ${e}`)}async function _(e,t){let{accessToken:r,workspaceId:i}=await a();if(await new n().publishAgent(r,i,e),t.json){console.log(JSON.stringify({id:e,published:!0}));return}console.log(`Published agent to the workspace: ${e}`)}async function v(e,t){let{accessToken:r,workspaceId:i}=await a(),o=new n;if(t.addUser){let n=await o.upsertAgentGrant(r,i,e,t.addUser,t.role);if(t.json){console.log(JSON.stringify(n));return}console.log(`Granted ${t.role} to user ${t.addUser}`);return}if(t.removeUser){if(await o.removeAgentGrant(r,i,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 s=await o.getAgentGrants(r,i,e);if(t.json){console.log(JSON.stringify(s));return}d(s)}export{m as createAgent,g as deleteAgent,f as listAgents,_ as publishAgent,v as shareAgent,p as showAgent,h as updateAgent};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{b as e,l as t,v as n}from"./profile-storage-mtd3aKrx.js";function r(e){return`$${e.toFixed(2)}`}function i(e){if(console.log(`Billing status: ${e.lifecycle.kind}`),e.subscription){let t=e.subscription,n=t.nextInvoiceDueAt?` · next invoice ${new Date(t.nextInvoiceDueAt).toLocaleDateString()}`:``;console.log(` Plan: ${t.planName} · ~${r(t.estimatedMonthlyChargeUsd)}/month${n}`)}else console.log(` Plan: (no active subscription)`);let t=e.seats;console.log(` Seats: pro ${t.assigned.pro}/${t.purchased.pro}, premium ${t.assigned.premium}/${t.purchased.premium} (assigned/purchased)`);let n=e.extraUsage;console.log(` Balance: ${r(n.balanceUsd)} extra usage`),console.log(` Spent: ${r(n.currentSpentUsd)} this period`),n.monthlyExtraUsageLimitUsd!=null&&console.log(` Limit: ${r(n.monthlyExtraUsageLimitUsd)} / month`)}function a(e){console.log(`Invoices (${e.length}):\n`);for(let t of e){let e=new Date(t.billingDate).toLocaleDateString();console.log(` ${e} · ${t.type} · ${t.status} · ${r(t.totalUsd)}`),t.hostedInvoiceUrl&&console.log(` ${t.hostedInvoiceUrl}`),console.log(` ID: ${t.id}`),console.log(``)}}async function o(){return n()&&(console.error("Billing requires an interactive login. A workspace PAT (ENTRYDESK_TOKEN) cannot read billing — run `entrydesk login`."),process.exit(1)),t()}async function s(t){let{accessToken:n,workspaceId:r}=await o(),a=await new e().getBillingOverview(n,r);if(t.json){console.log(JSON.stringify(a));return}i(a)}async function c(t){let{accessToken:n,workspaceId:r}=await o(),i=new e;if(t.all){let e=[],o;for(let a=0;;a++){a>=100&&(console.error(`Reached maximum page limit (100). Use --limit and --next-key for manual pagination.`),process.exit(1));let s=await i.getBillingInvoices(n,r,{limit:t.limit??20,nextKey:o});if(e.push(...s.invoices),o=s.nextKey,!o)break}if(t.json){console.log(JSON.stringify({invoices:e}));return}if(e.length===0){console.log(`No invoices.`);return}a(e);return}let{invoices:s,nextKey:c}=await i.getBillingInvoices(n,r,{limit:t.limit,nextKey:t.nextKey});if(t.json){console.log(JSON.stringify({invoices:s,nextKey:c}));return}if(s.length===0){console.log(`No invoices.`);return}a(s),c&&console.log(`Next page: --next-key ${c}`)}export{c as listInvoices,s as showBillingStatus};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{b as e,l as t}from"./profile-storage-mtd3aKrx.js";async function n(n){let{accessToken:r,workspaceId:i}=await t(),a=await new e().getBudget(r,i);if(n.json){console.log(JSON.stringify(a));return}if(a.budget===null){console.log(`No budget set for this workspace.`);return}console.log(`Current workspace budget: $${a.budget}`)}async function r(n,r){let{accessToken:i,workspaceId:a}=await t(),o=new e;if(await o.updateBudget(i,a,n),r.json){console.log(JSON.stringify(await o.getBudget(i,a)));return}console.log(`Budget updated: $${n}`)}async function i(n){let{accessToken:r,workspaceId:i}=await t(),a=new e;if(await a.updateBudget(r,i,null),n.json){console.log(JSON.stringify(await a.getBudget(r,i)));return}console.log(`Budget cleared.`)}export{i as clearBudget,r as setBudget,n as showBudget};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{C as e}from"./profile-storage-mtd3aKrx.js";import{a as t,c as n,d as r,h as i,i as a,l as o,n as s,o as c,p as l,r as u,s as d,u as f}from"./paths-BAZ2NsXN.js";import{t as p}from"./hash-Ddmw8YE4.js";import{r as m}from"./installer-iaoPJQn3.js";import h from"node:path";import g from"node:fs/promises";const _=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu;function v(t,n,i){let o=t&&_.test(t)?t:i.workspaceId,s={workspaceId:o,apiUrl:e()};if(a(),n.global)f(s),console.info(`Linked ${c()} → workspace ${o}`);else{let e=process.cwd();r(e,s),console.info(`Linked ${d(e)} → workspace ${o}`)}}function y(e){if(e.global){n()?console.info(`Unlinked ${c()}`):console.info(`No global link found.`);return}let r=t(process.cwd());r&&o(r)?console.info(`Unlinked ${d(r)}`):console.info(`No project link found.`)}async function b(e,t,n,r,a){let o=n.skillId;if(!o){let{skills:t}=await e.client.listAvailableSkills(e.accessToken,e.workspaceId),r=t.find(e=>e.name===n.name);if(!r)throw Error(`Skill not found in workspace: ${n.name}`);o=r.id}let{url:c,name:l}=await e.client.downloadSkillCurrent(e.accessToken,e.workspaceId,o),u=await fetch(c);if(!u.ok)throw Error(`Failed to download ${l}: ${u.status}`);let d=Buffer.from(await u.arrayBuffer()),f=s(t,l);await g.rm(f,{recursive:!0,force:!0}),await g.mkdir(f,{recursive:!0});let{default:_}=await import(`adm-zip`),v=h.resolve(f)+h.sep;for(let e of new _(d).getEntries()){if(e.isDirectory)continue;let t=h.resolve(f,e.entryName);if(!t.startsWith(v))throw Error(`Zip entry contains path traversal: ${e.entryName}`);await g.mkdir(h.dirname(t),{recursive:!0}),await g.writeFile(t,e.getData())}let y=p(f);i(t,l,{source:o,sourceType:`entrydesk`,skillId:o,localHash:y,lastPulledHash:y,mode:`symlink`});let b=m(f,l,t,`symlink`,a);return r||console.info(`✓ pulled ${l} (${y.slice(0,12)}) → agents: ${b.map(e=>e.agentId).join(`, `)}`),{name:l,hash:y}}async function x(e,t,n){let{rootDir:r,workspaceId:i}=u(!!t.global,n.workspaceId),a={...n,workspaceId:i},o=!!t.json,s=[];if(e)s.push(_.test(e)?{skillId:e}:{name:e});else{let e=l(r).skills;for(let[t,n]of Object.entries(e))s.push({skillId:n.skillId,name:t});if(s.length===0){console.info(`Nothing to pull — no tracked skills. Try: entrydesk skills pull <name>`);return}}let c=[];for(let e of s)c.push(await b(a,r,e,o,t.agent));o&&console.info(JSON.stringify(c,null,2))}export{x as n,y as r,v as t};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{D as e,O as t,t as n}from"./profile-storage-mtd3aKrx.js";function r(e){try{let{pathname:t}=new URL(e);return t.replace(/\/+$/u,``).endsWith(`/api`)}catch{return!1}}function i(r){let i=t.getAll();if(r.json){console.log(JSON.stringify(i));return}let a=Object.entries(i);if(console.log(`Profile: ${n.getEffectiveProfileName()}`),a.length===0){console.log(`No configuration set.`),console.log(`Available keys: ${e.join(`, `)}`);return}console.log(`Configuration:
|
|
3
|
+
`);for(let[e,t]of a)console.log(` ${e}=${t}`);console.log(`\nAvailable keys: ${e.join(`, `)}`)}function a(e,n){let r=t.get(e);n.json?console.log(JSON.stringify({[e]:r??null})):console.log(r||`Not set`)}function o(e,i){t.set(e,i),console.log(`Set ${e}=${i}`),console.error(`(profile: ${n.getEffectiveProfileName()})`),e===`apiUrl`&&r(i)&&console.error(`Warning: ${i} looks like a web app's "/api" browser proxy path. Such proxies usually strip the Authorization header, so CLI requests will fail with 401 missing_token — prefer the API server's own URL unless you know this proxy forwards Authorization.`)}function s(e){t.unset(e),console.log(`Unset ${e}`),console.error(`(profile: ${n.getEffectiveProfileName()})`)}export{a as getConfigValue,i as listConfig,o as setConfigValue,s as unsetConfigValue};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{b as e,l as t}from"./profile-storage-mtd3aKrx.js";import{t as n}from"./confirm-BrJZbaxf.js";async function r(n){let{accessToken:r,workspaceId:i}=await t(),{connectors:a,nextKey:o}=await new e().getConnectors(r,i,{connectionStatus:n.all?`all`:`connected`,search:n.search,limit:n.limit,nextKey:n.nextKey});if(n.json){console.log(JSON.stringify({connectors:a,nextKey:o}));return}if(a.length===0){console.log(n.all?`No connectors found.`:`No connected connectors. Use --all to browse connectable ones.`);return}let s=n.all?`Connectors`:`Connected connectors`;console.log(`${s} (${a.length}):\n`);for(let e of a){let t=e.connected?`connected`:`not connected`;console.log(` ${e.name} (${t})`),console.log(` Provider: ${e.provider}`),console.log(` ID: ${e.id}`),e.authorization?.type&&console.log(` Auth: ${e.authorization.type}`),console.log(``)}o&&console.log(`More results: --next-key ${o}`)}async function i(n,r){let{accessToken:i,workspaceId:a}=await t(),{tools:o}=await new e().getConnectorTools(i,a,n);if(r.json){console.log(JSON.stringify({tools:o}));return}if(o.length===0){console.log(`This connector exposes no tools.`);return}console.log(`Tools (${o.length}):\n`);for(let e of o)console.log(` ${e.name} [${e.policy}]`),e.description&&console.log(` ${e.description}`)}async function a(n,r){let{accessToken:i,workspaceId:a}=await t(),o=new e;if(r.oauth){let{url:e}=await o.getConnectorAuthUrl(i,a,n);if(r.json){console.log(JSON.stringify({url:e}));return}console.log(`Open this URL in your browser to authorize the connector:`),console.log(` ${e}`),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;r.token?s={token:r.token}:r.username&&r.password?s={username:r.username,password:r.password}:(console.error(`Provide --token, or --username and --password, or --oauth to connect.`),process.exit(1)),await o.connectConnectorToken(i,a,n,s),console.log(r.json?JSON.stringify({id:n,connected:!0}):`Connected connector ${n}.`)}async function o(r,i){let{accessToken:a,workspaceId:o}=await t();if(!i.yes&&(process.stdin.isTTY||(console.error(`Disconnecting connector ${r} needs confirmation. Re-run with --yes.`),process.exit(1)),!await n(`Disconnect connector ${r}?`))){console.log(`Aborted.`);return}await new e().disconnectConnector(a,o,r),console.log(i.json?JSON.stringify({id:r,disconnected:!0}):`Disconnected connector ${r}.`)}export{a as connectConnector,o as disconnectConnector,i as listConnectorTools,r as listConnectors};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import e from"node:fs";import t from"node:path";import{createHash as n}from"node:crypto";const r=new Set([`.git`,`node_modules`,`__pycache__`,`.DS_Store`,`__MACOSX`]),i=`SKILL.md`;function a(n){let a=e.readdirSync(n,{withFileTypes:!0}).filter(e=>!r.has(e.name));if(a.some(e=>e.isFile()&&e.name===i))return n;let o=a.filter(e=>e.isDirectory());if(o.length===1){let r=t.join(n,o[0].name);if(e.existsSync(t.join(r,i)))return r}return n}function o(n,i,a){for(let s of e.readdirSync(i,{withFileTypes:!0})){if(r.has(s.name))continue;let e=t.join(i,s.name);s.isDirectory()?o(n,e,a):s.isFile()&&a.push({rel:t.relative(n,e).split(t.sep).join(`/`),abs:e})}}function s(t){let r=[];o(t,t,r),r.sort((e,t)=>e.rel<t.rel?-1:+(e.rel>t.rel));let i=n(`sha256`);for(let t of r){let r=n(`sha256`).update(e.readFileSync(t.abs)).digest(`hex`);i.update(t.rel).update(`\0`).update(r).update(`\0`)}return i.digest(`hex`)}function c(e){return s(a(e))}export{c as t};
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,50 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{T as k,c as d,d as b,q as u,v as m}from"./chunk-5QJUAR4K.js";import"./chunk-JMYSCKCF.js";var x=new Set(["--profile"]),N=new Set(["--json"]);function y(i){let l=0;for(;l<i.length;){let n=i[l];if(x.has(n))l+=2;else if(N.has(n))l+=1;else break}let c=i[l];return!c||c.startsWith("-")?{command:"task",args:i,noCommand:!0}:{command:c,args:[...i.slice(0,l),...i.slice(l+1)],noCommand:!1}}function p(i){let[l,c]=i.split(":"),n=Number.parseInt(l,10),e=Number.parseInt(c,10);if(!(Number.isNaN(n)||Number.isNaN(e)))return{hour:n,minute:e}}function I(i){let[l,c]=i.split("-");if(!l||!c)return;let n=p(l),e=p(c);if(!(!n||!e))return{start:n,end:e}}function h(i,l,c=!1){let n={},e={};for(let o=c?0:1;o<i.length;o++){let t=i[o];if(t==="--json")n.json=!0;else if(t==="--help"||t==="-h")n.help=!0;else if(t==="--profile")n.profile=i[++o];else switch(l){case"login":break;case"task":if(t==="-m"||t==="--message")e.message=i[++o];else if(t==="-a"||t==="--agent")e.agentId=i[++o];else if(t==="--model")e.model=i[++o];else if(t==="--connectors"){let s=i[++o];e.connectors=s?.split(",").map(r=>r.trim())}else if(t==="-i"||t==="--interactive")e.interactive=!0;else if(t==="--full-output")e.fullOutput=!0;else if(t==="-c"||t==="--continue")e.continue=Number.parseInt(i[++o],10);else if(t==="--plain")e.plain=!0;else if(t==="--output")e.output=i[++o];else if(t==="--file-system")e.fileSystem=!0;else if(t==="--no-file-system")e.noFileSystem=!0;else if(t==="--tool-approval-mode"){let s=b.safeParse(i[++o]);s.success?e.toolApprovalMode=s.data:(console.error(`--tool-approval-mode must be one of: ${Object.values(d).join(", ")}`),process.exit(1))}else t==="--dangerously-auto-approve-tools"&&(e.dangerouslyAutoApproveTools=!0);break;case"agents":if(t==="--name")e.name=i[++o];else if(t==="--description")e.description=i[++o];else if(t==="--system-prompt")e.systemPrompt=i[++o];else if(t==="--model-id")e.modelId=i[++o];else if(t==="--connector-ids"){let s=i[++o];e.connectorIds=s?.split(",").map(r=>r.trim()).filter(Boolean)}else if(t==="--capabilities"){let s=i[++o];e.capabilities=s?.split(",").map(r=>r.trim()).filter(Boolean)}else if(t==="--conversation-starters"){let s=i[++o];e.conversationStarters=s?.split(",").map(r=>r.trim()).filter(Boolean)}else if(t==="--tools"){let s=i[++o];e.tools=s?.split(",").map(r=>r.trim()).filter(Boolean)}else if(t==="--icon-id")e.iconId=i[++o];else if(t==="--limit"){let s=Number.parseInt(i[++o],10);(Number.isNaN(s)||s<1||s>100)&&(console.error("--limit must be an integer between 1 and 100"),process.exit(1)),e.limit=s}else if(t==="--next-key"){let s=i[++o];s||(console.error("--next-key requires a value"),process.exit(1)),e.nextKey=s}else if(t==="--all")e.all=!0;else if(t==="--mine"||t==="--me")e.mine=!0;else if(t==="--add-user")e.addUser=i[++o];else if(t==="--remove-user")e.removeUser=i[++o];else if(t==="--role"){let s=i[++o];s==="owner"||s==="editor"||s==="viewer"?e.role=s:(console.error("--role must be one of: owner, editor, viewer"),process.exit(1))}else t.startsWith("-")||(e.action?e.agentId=t:e.action=t);break;case"meeting":if(t==="--filter"){let s=i[++o];s==="mine"||s==="shared"||s==="all"?e.filter=s:(console.error("--filter must be one of: mine, shared, all"),process.exit(1))}else if(t==="--search")e.search=i[++o];else if(t==="--sort"){let s=i[++o];s==="updated"||s==="updated_at"?e.sortBy="updated_at":s==="start"||s==="start_time"?e.sortBy="start_time":(console.error("--sort must be one of: updated, start"),process.exit(1))}else if(t==="--limit"){let s=Number.parseInt(i[++o],10);(Number.isNaN(s)||s<1||s>100)&&(console.error("--limit must be an integer between 1 and 100"),process.exit(1)),e.limit=s}else if(t==="--next-key"){let s=i[++o];s||(console.error("--next-key requires a value"),process.exit(1)),e.nextKey=s}else if(t==="--all")e.all=!0;else if(t==="--title")e.title=i[++o];else if(t==="--description")e.description=i[++o];else if(t==="--location")e.location=i[++o];else if(t==="--start")e.startTime=i[++o];else if(t==="--end")e.endTime=i[++o];else if(t==="--conference-link")e.conferenceLink=i[++o];else if(t==="--notes")e.notes=i[++o];else if(t==="--status"){let s=i[++o];s==="scheduled"||s==="in_progress"||s==="completed"||s==="cancelled"?e.status=s:(console.error("--status must be one of: scheduled, in_progress, completed, cancelled"),process.exit(1))}else if(t==="--visibility"){let s=i[++o];s==="private"||s==="workspace"?e.visibility=s:(console.error("--visibility must be one of: private, workspace"),process.exit(1))}else if(t==="--raw")e.raw=!0;else if(t==="--add-user")e.addUser=i[++o];else if(t==="--remove-user")e.removeUser=i[++o];else if(t==="--add-team")e.addTeam=i[++o];else if(t==="--remove-team")e.removeTeam=i[++o];else if(t==="--role"){let s=i[++o];s==="viewer"||s==="editor"?e.role=s:(console.error("--role must be one of: viewer, editor"),process.exit(1))}else t.startsWith("-")||(e.action?e.action==="transcript"?e.recordingId=t:e.meetingId=t:e.action=t);break;case"workflow":if(t==="--search")e.search=i[++o];else if(t==="--limit"){let s=Number.parseInt(i[++o],10);(Number.isNaN(s)||s<1||s>100)&&(console.error("--limit must be an integer between 1 and 100"),process.exit(1)),e.limit=s}else if(t==="--next-key"){let s=i[++o];s||(console.error("--next-key requires a value"),process.exit(1)),e.nextKey=s}else if(t==="--all")e.all=!0;else if(t==="--name")e.name=i[++o];else if(t==="--description")e.description=i[++o];else if(t==="--file")e.file=i[++o];else if(t==="--activate")e.activate=!0;else if(t==="--deactivate")e.deactivate=!0;else if(t==="--show-source")e.showSource=!0;else if(t==="--args")e.args=i[++o];else if(t==="--args-file")e.argsFile=i[++o];else if(t==="--wait")e.wait=!0;else if(t==="--add-user")e.addUser=i[++o];else if(t==="--remove-user")e.removeUser=i[++o];else if(t==="--role"){let s=i[++o];s==="owner"||s==="editor"||s==="viewer"?e.role=s:(console.error("--role must be one of: owner, editor, viewer"),process.exit(1))}else t.startsWith("-")||(e.action?e.workflowId?e.action==="run-get"&&!e.runId?e.runId=t:(console.error(`Unexpected positional argument: ${t}`),process.exit(1)):e.workflowId=t:e.action=t);break;case"notifications":if(t==="--tab"){let s=i[++o];s==="all"||s==="action"||s==="info"?e.tab=s:(console.error("--tab must be one of: all, action, info"),process.exit(1))}else if(t==="--event-type")e.eventType=i[++o];else if(t==="--limit"){let s=Number.parseInt(i[++o],10);(Number.isNaN(s)||s<1||s>100)&&(console.error("--limit must be an integer between 1 and 100"),process.exit(1)),e.limit=s}else if(t==="--next-key"){let s=i[++o];s||(console.error("--next-key requires a value"),process.exit(1)),e.nextKey=s}else t==="--all"?e.all=!0:t.startsWith("-")||(e.action?e.notificationId=t:e.action=t);break;case"recordings":if(t==="--title")e.title=i[++o];else if(t==="--model")e.modelId=i[++o];else if(t==="--language")e.language=i[++o];else if(t==="--yes"||t==="-y")e.yes=!0;else if(t==="--search"){let s=i[++o];s&&s.length>200&&(console.error("--search must be at most 200 characters"),process.exit(1)),e.search=s}else if(t==="--limit"){let s=Number.parseInt(i[++o],10);(Number.isNaN(s)||s<1||s>100)&&(console.error("--limit must be an integer between 1 and 100"),process.exit(1)),e.limit=s}else if(t==="--next-key"){let s=i[++o];s||(console.error("--next-key requires a value"),process.exit(1)),e.nextKey=s}else t.startsWith("-")||(e.action?e.action==="import"||e.action==="preview"?e.url||(e.url=t):e.recordingId||(e.recordingId=t):e.action=t);break;case"connectors":if(t==="--token")e.token=i[++o];else if(t==="--yes"||t==="-y")e.yes=!0;else if(t==="--username")e.username=i[++o];else if(t==="--password")e.password=i[++o];else if(t==="--oauth")e.oauth=!0;else if(t==="--all")e.all=!0;else if(t==="--search"){let s=i[++o];s&&s.length>200&&(console.error("--search must be at most 200 characters"),process.exit(1)),e.search=s}else if(t==="--limit"){let s=Number.parseInt(i[++o],10);(Number.isNaN(s)||s<1||s>100)&&(console.error("--limit must be an integer between 1 and 100"),process.exit(1)),e.limit=s}else if(t==="--next-key"){let s=i[++o];s||(console.error("--next-key requires a value"),process.exit(1)),e.nextKey=s}else t.startsWith("-")||(e.action?e.connectorId||(e.connectorId=t):e.action=t);break;case"marketplace":if(t==="--type"){let s=i[++o];u.includes(s)?e.type=s:(console.error(`--type must be one of: ${u.join(", ")}`),process.exit(1))}else if(t==="--tag")e.tag=i[++o];else if(t==="--limit"){let s=Number.parseInt(i[++o],10);(Number.isNaN(s)||s<1||s>100)&&(console.error("--limit must be an integer between 1 and 100"),process.exit(1)),e.limit=s}else if(t==="--cursor"){let s=i[++o];s||(console.error("--cursor requires a value"),process.exit(1)),e.cursor=s}else t.startsWith("-")||(e.action?e.action==="search"?e.tag||(e.tag=t):e.slug||(e.slug=t):e.action=t);break;case"skills":if(t==="--force")e.force=!0;else if(t==="--me"||t==="--mine")e.createdBy="me";else if(t==="--enable")e.enable=!0;else if(t==="--disable")e.disable=!0;else if(t==="--add-user")e.addUser=i[++o];else if(t==="--remove-user")e.removeUser=i[++o];else if(t==="--role"){let s=i[++o];s==="owner"||s==="editor"||s==="viewer"?e.role=s:(console.error("--role must be one of: owner, editor, viewer"),process.exit(1))}else if(t==="-g"||t==="--global")e.global=!0;else if(t==="--local")e.local=!0;else if(t==="--remote")e.remote=!0;else if(t==="--all")e.all=!0;else if(t==="-a"||t==="--agent"){let s=i[o+1];(!s||s.startsWith("-"))&&(console.error("--agent requires a value"),process.exit(1));let r=e.agents??[];r.push(i[++o]),e.agents=r}else t.startsWith("-")||(e.action?e.configKey=t:e.action=t);break;case"schedules":if(t==="--name")e.name=i[++o];else if(t==="--prompt")e.prompt=i[++o];else if(t==="--agent-id")e.agentId=i[++o];else if(t==="--starts-at")e.startsAt=i[++o];else if(t==="--utc-offset")e.utcOffset=i[++o];else if(t==="--repeat-type"){let s=i[++o];s==="no-repeat"||s==="minutes"||s==="hours"||s==="days"||s==="weeks"||s==="months"?e.repeatType=s:(console.error("--repeat-type must be one of: no-repeat, minutes, hours, days, weeks, months"),process.exit(1))}else if(t==="--every")e.every=Number.parseInt(i[++o],10);else if(t==="--time")e.time=i[++o];else if(t==="--days-of-week"){let s=i[++o];e.daysOfWeek=s?.split(",").map(r=>Number.parseInt(r.trim(),10)).filter(r=>!Number.isNaN(r))}else if(t==="--daily-windows"){let s=i[++o];e.dailyWindows=s?.split(",").map(I).filter(r=>r!==void 0)}else if(t==="--holiday-calendars"){let s=i[++o];e.holidayCalendars=s?.split(",").map(r=>r.trim()).filter(r=>r.length>0)}else if(t==="--times"){let s=i[++o];e.times=s?.split(",").map(r=>p(r.trim())).filter(r=>r!==void 0)}else if(t==="--days-of-month"){let s=i[++o];e.daysOfMonth=s?.split(",").map(r=>Number.parseInt(r.trim(),10)).filter(r=>!Number.isNaN(r))}else if(t==="--last-day-of-month")e.lastDayOfMonth=!0;else if(t==="--limit"){let s=Number.parseInt(i[++o],10);(Number.isNaN(s)||s<1||s>100)&&(console.error("--limit must be an integer between 1 and 100"),process.exit(1)),e.limit=s}else if(t==="--next-key"){let s=i[++o];s||(console.error("--next-key requires a value"),process.exit(1)),e.nextKey=s}else t==="--all"?e.all=!0:t.startsWith("-")||(e.action?e.scheduleId=t:e.action=t);break;case"config":!e.action&&!t.startsWith("-")?e.action=t:!e.configKey&&!t.startsWith("-")?e.configKey=t:!e.value&&!t.startsWith("-")&&(e.value=t);break;case"profile":!e.action&&!t.startsWith("-")?e.action=t:!e.name&&!t.startsWith("-")?e.name=t:!e.value&&!t.startsWith("-")&&(e.value=t);break;case"tasks":if(t==="--share"||t==="-s")e.shareId=i[++o];else if(t==="--full-output")e.fullOutput=!0;else if(t==="--output")e.output=i[++o];else if(t==="--search"||t==="-q")e.search=i[++o];else if(t==="--limit"){let s=Number.parseInt(i[++o],10);(Number.isNaN(s)||s<1||s>50)&&(console.error("--limit must be an integer between 1 and 50"),process.exit(1)),e.limit=s}else if(t==="--next-key"){let s=i[++o];s||(console.error("--next-key requires a value"),process.exit(1)),e.nextKey=s}else!e.taskId&&!t.startsWith("-")&&(e.taskId=t);break;case"budget":!e.action&&!t.startsWith("-")?e.action=t:!e.configKey&&!t.startsWith("-")&&(e.configKey=t);break;case"usage":if(t==="--limit")e.limit=Number.parseInt(i[++o],10);else if(t==="--sort-by"){let s=i[++o];(s==="cost"||s==="operations")&&(e.sortBy=s)}else t==="--offset"?e.offset=Number.parseInt(i[++o],10):t==="--period-start"?e.periodStart=i[++o]:t==="-o"||t==="--output"?e.output=i[++o]:!e.action&&!t.startsWith("-")&&(e.action=t);break;case"billing":if(t==="--limit"){let s=Number.parseInt(i[++o],10);(Number.isNaN(s)||s<1||s>100)&&(console.error("--limit must be an integer between 1 and 100"),process.exit(1)),e.limit=s}else if(t==="--next-key"){let s=i[++o];s||(console.error("--next-key requires a value"),process.exit(1)),e.nextKey=s}else t==="--all"?e.all=!0:!e.action&&!t.startsWith("-")&&(e.action=t);break;case"mcp-server":t==="--http"?e.http=!0:(t==="-p"||t==="--port")&&(e.port=Number.parseInt(i[++o],10));break;case"tool":t==="-i"||t==="--input"?e.input=i[++o]:t==="-f"||t==="--input-file"?e.inputFile=i[++o]:t==="-p"||t==="--prefix"?e.prefix=i[++o]:t.startsWith("-")||(e.action?e.name||(e.name=t):e.action=t);break;case"workspaces":t.startsWith("-")||(e.action?e.configKey||(e.configKey=t):e.action=t);break;case"update":t==="--check"&&(e.check=!0);break;default:break}}switch(l){case"login":return{command:"login",...n,...e};case"logout":return{command:"logout",...n,...e};case"status":return{command:"status",...n,...e};case"workspaces":return{command:"workspaces",...n,...e};case"agents":return{command:"agents",...n,...e};case"meeting":return{command:"meeting",...n,...e};case"workflow":return{command:"workflow",...n,...e};case"notifications":return{command:"notifications",...n,...e};case"models":return{command:"models",...n,...e};case"marketplace":return{command:"marketplace",...n,...e};case"recordings":return{command:"recordings",...n,...e};case"connectors":return{command:"connectors",...n,...e};case"skills":return{command:"skills",...n,...e};case"schedules":return{command:"schedules",...n,...e};case"config":return{command:"config",...n,...e};case"profile":return{command:"profile",...n,...e};case"task":return{command:"task",...n,...e};case"tasks":return{command:"tasks",...n,...e};case"budget":return{command:"budget",...n,...e};case"usage":return{command:"usage",...n,...e};case"billing":return{command:"billing",...n,...e};case"mcp-server":return{command:"mcp-server",...n,...e};case"tool":return{command:"tool",...n,...e};case"version":return{command:"version",...n,...e};case"update":return{command:"update",...n,...e};default:return{command:"help",...n,...e}}}var f=process.argv.slice(2);if(f[0]==="--help"||f[0]==="-h"){let{printHelp:i}=await import("./help-KDHCFJNF.js");i(),process.exit(0)}if(f[0]==="--version"||f[0]==="-v"){let{printVersion:i}=await import("./version-ROABNJFL.js");i(),process.exit(0)}var{command:W,args:g,noCommand:v}=y(f),a=h(g,W,!0);v&&a.command==="task"&&(a.interactive=!0);if(!v&&a.help&&a.command!=="help"){let{COMMANDS_WITH_OWN_HELP:i,printCommandHelp:l}=await import("./help-KDHCFJNF.js");i.has(a.command)||(l(a.command),process.exit(0))}async function K(){try{if(a.command!=="profile"){let i=a.profile||m.getCurrentProfileName();m.ensureProfileExists(i),m.setOverrideProfile(i)}switch(a.command){case"login":{let{runLogin:i}=await import("./login-LX3ISJEI.js");await i(a);break}case"logout":{let{runLogout:i}=await import("./logout-YNCDJ5ST.js");await i(a);break}case"status":{let{runStatus:i}=await import("./status-S37SXIYD.js");await i(a);break}case"workspaces":{let{runWorkspaces:i}=await import("./workspaces-PLJMIDJR.js");await i(a);break}case"agents":{let{runAgents:i}=await import("./agents-6VHSTGVU.js");await i(a);break}case"meeting":{let{runMeeting:i}=await import("./meeting-UBBSEEHT.js");await i(a);break}case"recordings":{let{runRecordings:i}=await import("./recordings-OXG66QN2.js");await i(a);break}case"workflow":{let{runWorkflow:i}=await import("./workflow-XERZYR3S.js");await i(a);break}case"notifications":{let{runNotifications:i}=await import("./notifications-DHPLCJFY.js");await i(a);break}case"models":{let{runModels:i}=await import("./models-PGGTDNI4.js");await i(a);break}case"marketplace":{let{runMarketplace:i}=await import("./marketplace-FHSTOAWV.js");await i(a);break}case"connectors":{let{runConnectors:i}=await import("./connectors-O4K2ZFDM.js");await i(a);break}case"skills":{let{runSkills:i}=await import("./skills-JVSRQSKA.js");await i(a);break}case"schedules":{let{runSchedules:i}=await import("./schedules-R4U37II4.js");await i(a);break}case"tasks":{let{runTasks:i}=await import("./tasks-7NS4UOBP.js");await i(a);break}case"budget":{let{runBudget:i}=await import("./budget-PC4EAZLV.js");await i(a);break}case"usage":{let{runUsage:i}=await import("./usage-PAL5KJ5C.js");await i(a);break}case"billing":{let{runBilling:i}=await import("./billing-WA7WGH7U.js");await i(a);break}case"config":if(a.action==="help"||f[1]==="--help"){let{renderConfigHelp:i}=await import("./config-help-CTZHKILN.js");i()}else{let{runConfig:i}=await import("./config-ED6PZQ7J.js");await i(a)}break;case"profile":{let{runProfile:i}=await import("./profile-K4V2Y63H.js");await i(a);break}case"task":if(a.help){let{printTaskHelp:i}=await import("./task-H2COR6Z4.js");i()}else{let{runTask:i}=await import("./task-H2COR6Z4.js");await i(a)}break;case"mcp-server":{let{startMcpServer:i}=await import("./mcp-2G4B3BVK.js");await i({mode:a.http?"http":"stdio",port:a.port});break}case"tool":{let{runTool:i}=await import("./tool-VLJFDXQ4.js");await i(a);break}case"version":{let{printVersion:i}=await import("./version-ROABNJFL.js");i();break}case"update":{let{runUpdate:i}=await import("./update-5GLLNVRU.js");await i(a);break}default:{let{printHelp:i}=await import("./help-KDHCFJNF.js");i();break}}}catch(i){k(i)}}K();
|
|
2
|
+
import{$ as e,D as t,F as n,I as r,L as i,M as ee,N as te,Q as a,X as o,Y as ne,a as re,t as s,w as ie}from"./profile-storage-mtd3aKrx.js";import{t as ae}from"./version-Cos6L15W.js";import{Argument as oe,Command as c,InvalidArgumentError as l,Option as u}from"@commander-js/extra-typings";function d(e){if(!/^[+-]?\d+$/u.test(e.trim()))throw new l(`must be an integer`);return Number.parseInt(e,10)}function f(e,t){return n=>{let r=d(n);if(r<e||r>t)throw new l(`must be an integer between ${e} and ${t}`);return r}}function p(e){return t=>{if(t.length>e)throw new l(`must be at most ${e} characters`);return t}}function m(e){let t=e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0);if(t.length===0)throw new l(`must list at least one value`);return t}function h(e,t){let n=f(e,t);return e=>m(e).map(n)}function g(e,t=[]){return[...t,e]}const _=new Map([[`web`,a.WEB_SEARCH],[`image`,a.CREATION],[`image-gen`,a.CREATION],[`image_generation`,a.CREATION]]);function v(t){return m(t).map(t=>{let n=t.replaceAll(`-`,`_`),r=_.get(t)??e.find(e=>e===n);if(!r)throw new l(`"${t}" is not one of: ${e.join(`, `)}`);return r})}function y(e){let t=/^(\d{1,2}):(\d{2})$/u.exec(e);if(!t)throw new l(`"${e}" is not an HH:MM time`);let n=Number.parseInt(t[1],10),r=Number.parseInt(t[2],10);if(n>23||r>59)throw new l(`"${e}" is not a valid time of day`);return{hour:n,minute:r}}function b(e){return m(e).map(y)}function se(e){return m(e).map(e=>{let[t,n]=e.split(`-`);if(!t||!n)throw new l(`"${e}" is not an HH:MM-HH:MM range`);return{start:y(t),end:y(n)}})}const x=`--profile <name>`;function S(e){return e.option(`--json`,`Output JSON for scripting`)}function C(e,t){return e.option(`--limit <number>`,`Max results per page (default: ${t})`,f(1,100)).option(`--next-key <cursor>`,`Fetch the next page using this cursor`)}function w(e,t){return C(e,t).addOption(new u(`--all`,`Fetch every page (auto-paginate)`).conflicts(`nextKey`))}function T(e){return e.addOption(new u(`--add-user <userId>`,`Grant a user access`).conflicts(`removeUser`)).option(`--remove-user <userId>`,`Revoke a user's access`)}function E(e){return T(e).addOption(new u(`--role <role>`,`Role for --add-user`).choices(o.options).default(o.enum.viewer))}const D={chat:`Chat & Tasks:`,build:`Build:`,workspace:`Workspace:`,setup:`Setup:`};function ce(){return new c().name(`entrydesk`).description(`EntryDesk CLI — interact with EntryDesk from your terminal`).option(`--json`,`Output JSON for scripting (most commands support it)`).option(x,`Use a specific profile for this command`).version(`entrydesk ${ae()}`,`-v, --version`,`Show the version number`).showHelpAfterError("(run `entrydesk --help` to see the command list)").configureHelp({showGlobalOptions:!0}).addHelpText(`after`,`
|
|
3
|
+
Examples:
|
|
4
|
+
entrydesk task -m "Summarize my open tasks" --model <model>
|
|
5
|
+
entrydesk meeting transcript <recordingId> | entrydesk task -m "List action items"
|
|
6
|
+
entrydesk agents list --mine --json
|
|
7
|
+
|
|
8
|
+
Docs: https://entrydesk.com/docs/cli`)}function O(t){return t.option(`--connector-ids <ids>`,`Comma-separated connector ids`,m).option(`--capabilities <list>`,`Comma-separated capabilities (${e.join(`, `)})`,v).option(`--conversation-starters <list>`,`Comma-separated conversation starters`,m).option(`--tools <list>`,`Comma-separated tool names (prefix__tool)`,m).option(`--icon-id <iconId>`,`Icon to use`)}function k(e){let t=e.command(`agents`).summary(`List, show, create, publish, and share agents`).helpGroup(D.build);S(w(t.command(`list`,{isDefault:!0}).description(`List available agents`).option(`--me, --mine`,`List agents you own or edit, with their publish state`),100)).action(async(e,t)=>{let{listAgents:n}=await import(`./agents--2Fw5-et.js`);await n(t.optsWithGlobals())}),S(t.command(`show`).description(`Show one agent's full details`).argument(`<agentId>`,`Agent to show`)).action(async(e,t,n)=>{let{showAgent:r}=await import(`./agents--2Fw5-et.js`);await r(e,n.optsWithGlobals())}),S(O(t.command(`create`).description(`Create a new agent`).requiredOption(`--name <name>`,`Agent name`).requiredOption(`--description <text>`,`Short description`).requiredOption(`--system-prompt <text>`,`System prompt`).requiredOption(`--model-id <modelId>`,`Model to run the agent on`))).action(async(e,t)=>{let{createAgent:n}=await import(`./agents--2Fw5-et.js`);await n(t.optsWithGlobals())}),S(O(t.command(`update`).description(`Update an agent you own`).argument(`<agentId>`,`Agent to update`).option(`--name <name>`,`Agent name`).option(`--description <text>`,`Short description`).option(`--system-prompt <text>`,`System prompt`).option(`--model-id <modelId>`,`Model to run the agent on`))).action(async(e,t,n)=>{let{updateAgent:r}=await import(`./agents--2Fw5-et.js`);await r(e,n.optsWithGlobals())}),t.command(`delete`).description(`Delete an agent you own`).argument(`<agentId>`,`Agent to delete`).action(async e=>{let{deleteAgent:t}=await import(`./agents--2Fw5-et.js`);await t(e)}),S(t.command(`publish`).description(`Publish an agent to the workspace`).argument(`<agentId>`,`Agent to publish`)).action(async(e,t,n)=>{let{publishAgent:r}=await import(`./agents--2Fw5-et.js`);await r(e,n.optsWithGlobals())}),S(E(t.command(`share`).description(`Show or manage sharing (user grants)`).argument(`<agentId>`,`Agent to share`))).action(async(e,t,n)=>{let{shareAgent:r}=await import(`./agents--2Fw5-et.js`);await r(e,n.optsWithGlobals())})}function A(e){let t=e.command(`billing`).summary(`Show billing status and invoices`).helpGroup(D.workspace).addHelpText(`after`,`
|
|
9
|
+
Note: billing endpoints require an interactive login (OAuth); a workspace
|
|
10
|
+
PAT (ENTRYDESK_TOKEN) cannot read billing.`);S(t.command(`status`,{isDefault:!0}).description(`Plan, seats, and extra-usage balance`)).action(async(e,t)=>{let{showBillingStatus:n}=await import(`./billing-B96487c6.js`);await n(t.optsWithGlobals())}),S(w(t.command(`invoices`).description(`List finalized invoices`),20)).action(async(e,t)=>{let{listInvoices:n}=await import(`./billing-B96487c6.js`);await n(t.optsWithGlobals())})}function j(e){if(!/^\d+(\.\d+)?$/u.test(e.trim()))throw new l(`must be a positive number`);return e}function M(e){let t=e.command(`budget`).summary(`View or manage the workspace budget`).helpGroup(D.workspace);S(t.command(`get`,{isDefault:!0}).description(`Show the current workspace budget`)).action(async(e,t)=>{let{showBudget:n}=await import(`./budget-DhX2gt5z.js`);await n(t.optsWithGlobals())}),S(t.command(`set`).description(`Set the workspace budget`).argument(`<amount>`,`Budget amount, e.g. 100.00`,j)).action(async(e,t,n)=>{let{setBudget:r}=await import(`./budget-DhX2gt5z.js`);await r(e,n.optsWithGlobals())}),S(t.command(`clear`).description(`Remove the workspace budget`)).action(async(e,t)=>{let{clearBudget:n}=await import(`./budget-DhX2gt5z.js`);await n(t.optsWithGlobals())})}const N=()=>new oe(`<key>`,`Configuration key`).choices(t);function P(e){let t=e.command(`config`).summary(`Manage CLI configuration`).helpGroup(D.setup).addHelpText(`after`,()=>{let{apiUrl:e,hubUrl:t}=ie();return`
|
|
11
|
+
Keys:
|
|
12
|
+
apiUrl API server URL (default: ${e})
|
|
13
|
+
hubUrl Hub server URL (default: ${t})
|
|
14
|
+
|
|
15
|
+
Examples:
|
|
16
|
+
entrydesk config set apiUrl http://localhost:3200
|
|
17
|
+
entrydesk config get apiUrl
|
|
18
|
+
entrydesk config unset apiUrl`});S(t.command(`list`,{isDefault:!0}).description(`List all configuration`)).action(async(e,t)=>{let{listConfig:n}=await import(`./config-eCQwQAt1.js`);n(t.optsWithGlobals())}),S(t.command(`get`).description(`Get a configuration value`).addArgument(N())).action(async(e,t,n)=>{let{getConfigValue:r}=await import(`./config-eCQwQAt1.js`);r(e,n.optsWithGlobals())}),t.command(`set`).description(`Set a configuration value`).addArgument(N()).argument(`<value>`,`Value to store`).action(async(e,t)=>{let{setConfigValue:n}=await import(`./config-eCQwQAt1.js`);n(e,t)}),t.command(`unset`).description(`Remove a configuration value`).addArgument(N()).action(async e=>{let{unsetConfigValue:t}=await import(`./config-eCQwQAt1.js`);t(e)})}function F(e){let t=e.command(`connectors`).summary(`List connectors and connect/disconnect them`).helpGroup(D.workspace);S(C(t.command(`list`,{isDefault:!0}).description(`List connected connectors`).option(`--all`,`Include connectors you haven't connected yet`).option(`--search <query>`,`Filter by name`,p(200)),100)).action(async(e,t)=>{let{listConnectors:n}=await import(`./connectors-DGmZ4zTG.js`);await n(t.optsWithGlobals())}),S(t.command(`tools`).description(`List the tools a connector exposes`).argument(`<connectorId>`,`Connector to inspect`)).action(async(e,t,n)=>{let{listConnectorTools:r}=await import(`./connectors-DGmZ4zTG.js`);await r(e,n.optsWithGlobals())}),S(t.command(`connect`).description(`Connect a connector`).argument(`<connectorId>`,`Connector to connect`).addOption(new u(`--token <token>`,`Connect with a static token / API key`).conflicts([`username`,`password`,`oauth`])).addOption(new u(`--username <username>`,`Connect with credentials (prefer env vars; argv is visible in process listings)`).conflicts(`oauth`)).addOption(new u(`--password <password>`,`Password to pair with --username`).conflicts(`oauth`)).option(`--oauth`,`Print an OAuth URL to open in your browser`)).action(async(e,t,n)=>{let{connectConnector:r}=await import(`./connectors-DGmZ4zTG.js`);await r(e,n.optsWithGlobals())}),S(t.command(`disconnect`).description(`Remove your connection to a connector`).argument(`<connectorId>`,`Connector to disconnect`).option(`-y, --yes`,`Skip the confirmation prompt`)).action(async(e,t,n)=>{let{disconnectConnector:r}=await import(`./connectors-DGmZ4zTG.js`);await r(e,n.optsWithGlobals())})}const I=e=>new u(`--type <type>`,e).choices(te);function L(e){let t=e.command(`marketplace`).summary(`Browse and install marketplace agents and skills`).helpGroup(D.build).addHelpText(`after`,`
|
|
19
|
+
Note: search/show are public; install requires login and CreateAgent/CreateSkill
|
|
20
|
+
permission in the current workspace.`);S(t.command(`search`,{isDefault:!0}).description(`List marketplace agents and skills`).argument(`[tag]`,`Filter by a tag (shorthand for --tag)`).addOption(I(`Only list this resource type`)).option(`--tag <tag>`,`Filter by a tag`).option(`--limit <number>`,`Max results (default: 30)`,f(1,100)).option(`--cursor <key>`,`Pagination cursor from a previous page`)).action(async(e,t,n)=>{let{searchMarketplace:r}=await import(`./marketplace-BPY5cD0d.js`);await r(e,n.optsWithGlobals())}),S(t.command(`show`).description(`Show an agent or skill's details`).argument(`<slug>`,`Marketplace slug`).addOption(I(`Resource type (auto-detected when omitted)`))).action(async(e,t,n)=>{let{showMarketplaceResource:r}=await import(`./marketplace-BPY5cD0d.js`);await r(e,n.optsWithGlobals())}),S(t.command(`install`).description(`Install an agent or skill into the current workspace`).argument(`<slug>`,`Marketplace slug`).addOption(I(`Resource type (auto-detected when omitted)`))).action(async(e,t,n)=>{let{installMarketplaceResource:r}=await import(`./marketplace-BPY5cD0d.js`);await r(e,n.optsWithGlobals())}),S(t.command(`roles`).description(`List role tags you can filter by`)).action(async(e,t)=>{let{showMarketplaceRoles:n}=await import(`./marketplace-BPY5cD0d.js`);await n(t.optsWithGlobals())})}const R=[`mine`,`shared`,`all`],z=[`updated_at`,`start_time`],B=[`no-repeat`,`minutes`,`hours`,`days`,`weeks`,`months`],V=[`stream-json`],H=[`cost`,`operations`];function U(e){return e.option(`--description <text>`,`Meeting description`).option(`--location <text>`,`Meeting location`).option(`--start <iso>`,`Start time, ISO 8601`).option(`--end <iso>`,`End time, ISO 8601`).option(`--conference-link <url>`,`Conference link`).option(`--notes <text>`,`Meeting notes`)}function W(e){let t=e.command(`meeting`).summary(`Manage meetings, summaries, transcripts, and sharing`).helpGroup(D.build);S(w(t.command(`list`,{isDefault:!0}).description(`List meetings`).addOption(new u(`--filter <scope>`,`Filter meetings`).choices(R).default(`all`)).option(`--search <text>`,`Search title and description`).addOption(new u(`--sort <field>`,`Sort order`).choices(z).default(`updated_at`)),20)).action(async(e,t)=>{let{listMeetings:n}=await import(`./meeting-BDhBTbm3.js`);await n(t.optsWithGlobals())}),S(t.command(`get`).description(`Show meeting details and its recordings`).argument(`<meetingId>`,`Meeting to show`)).action(async(e,t,n)=>{let{showMeeting:r}=await import(`./meeting-BDhBTbm3.js`);await r(e,n.optsWithGlobals())}),S(U(t.command(`create`).description(`Create a meeting manually`).requiredOption(`--title <text>`,`Meeting title`))).action(async(e,t)=>{let{createMeeting:n}=await import(`./meeting-BDhBTbm3.js`);await n(t.optsWithGlobals())}),S(U(t.command(`update`).description(`Update a meeting`).argument(`<meetingId>`,`Meeting to update`).option(`--title <text>`,`Meeting title`)).addOption(new u(`--status <status>`,`Meeting status`).choices(r.options)).addOption(new u(`--visibility <visibility>`,`Who can see it`).choices(i.options))).action(async(e,t,n)=>{let{updateMeeting:r}=await import(`./meeting-BDhBTbm3.js`);await r(e,n.optsWithGlobals())}),S(t.command(`delete`).description(`Delete a meeting (soft delete)`).argument(`<meetingId>`,`Meeting to delete`)).action(async(e,t,n)=>{let{deleteMeeting:r}=await import(`./meeting-BDhBTbm3.js`);await r(e,n.optsWithGlobals())}),S(t.command(`summary`).description(`Print the meeting summary (markdown) to stdout`).argument(`<meetingId>`,`Meeting to summarize`)).action(async(e,t,n)=>{let{showMeetingSummary:r}=await import(`./meeting-BDhBTbm3.js`);await r(e,n.optsWithGlobals())}),S(t.command(`transcript`).description(`Print a recording transcript to stdout`).argument(`<recordingId>`,`Recording to transcribe`).option(`--raw`,`Output the raw transcript with timestamps`)).action(async(e,t,n)=>{let{showMeetingTranscript:r}=await import(`./meeting-BDhBTbm3.js`);await r(e,n.optsWithGlobals())}),S(t.command(`previous`).description(`Show the previous meeting's brief in the same series`).argument(`<meetingId>`,`Meeting whose series to look back in`)).action(async(e,t,n)=>{let{showPreviousMeeting:r}=await import(`./meeting-BDhBTbm3.js`);await r(e,n.optsWithGlobals())}),S(T(t.command(`share`).description(`Show or manage sharing (visibility, user/team grants)`).argument(`<meetingId>`,`Meeting to share`).addOption(new u(`--visibility <visibility>`,`Change who can see the meeting (owner only)`).choices(i.options))).addOption(new u(`--add-team <teamId>`,`Grant a team access`).conflicts(`removeTeam`)).option(`--remove-team <teamId>`,`Revoke a team's access`).addOption(new u(`--role <role>`,`Role for --add-user/--add-team`).choices(n.options).default(n.enum.viewer))).action(async(e,t,n)=>{let{shareMeeting:r}=await import(`./meeting-BDhBTbm3.js`);await r(e,n.optsWithGlobals())})}function G(e){let t=e.command(`notifications`).summary(`List, count, or mark notifications read`).helpGroup(D.build);S(w(t.command(`list`,{isDefault:!0}).description(`List notifications`).addOption(new u(`--tab <tab>`,`Filter by category`).choices(ee).default(`all`)).option(`--event-type <type>`,`Filter by a single event type (e.g. task_complete)`),20)).action(async(e,t)=>{let{listNotifications:n}=await import(`./notifications-4bo-vcIW.js`);await n(t.optsWithGlobals())}),S(t.command(`unread`).description(`Show the unread notification count`)).action(async(e,t)=>{let{showUnreadCount:n}=await import(`./notifications-4bo-vcIW.js`);await n(t.optsWithGlobals())}),S(t.command(`read`).description(`Mark a notification as read`).argument(`<notificationId>`,`Notification to mark read`)).action(async(e,t,n)=>{let{markNotificationRead:r}=await import(`./notifications-4bo-vcIW.js`);await r(e,n.optsWithGlobals())}),S(t.command(`read-all`).description(`Mark every notification as read`)).action(async(e,t)=>{let{markAllNotificationsRead:n}=await import(`./notifications-4bo-vcIW.js`);await n(t.optsWithGlobals())})}function le(e){let t=e.command(`profile`).summary(`Manage profiles`).helpGroup(D.setup);S(t.command(`list`,{isDefault:!0}).description(`List profiles`)).action(async(e,t)=>{let{listProfiles:n}=await import(`./profile-BZo9STO2.js`);n(t.optsWithGlobals())}),S(t.command(`current`).description(`Show the active profile`)).action(async(e,t)=>{let{showCurrentProfile:n}=await import(`./profile-BZo9STO2.js`);n(t.optsWithGlobals())}),S(t.command(`show`).description(`Show profile details`).argument(`[name]`,`Profile to show`)).action(async(e,t,n)=>{let{showProfile:r}=await import(`./profile-BZo9STO2.js`);await r(e,n.optsWithGlobals())}),S(t.command(`create`).description(`Create a profile`).argument(`[name]`,`Profile name (default: default)`)).action(async(e,t,n)=>{let{createProfile:r}=await import(`./profile-BZo9STO2.js`);r(e,n.optsWithGlobals())}),S(t.command(`use`).alias(`switch`).description(`Switch the active profile`).argument(`[name]`,`Profile to switch to`)).action(async(e,t,n)=>{let{useProfile:r}=await import(`./profile-BZo9STO2.js`);r(e,n.optsWithGlobals())}),S(t.command(`delete`).aliases([`remove`,`rm`]).description(`Delete a profile`).argument(`[name]`,`Profile to delete`)).action(async(e,t,n)=>{let{deleteProfile:r}=await import(`./profile-BZo9STO2.js`);await r(e,n.optsWithGlobals())}),S(t.command(`rename`).aliases([`move`,`mv`]).description(`Rename a profile`).argument(`<from>`,`Existing profile name`).argument(`<to>`,`New profile name`)).action(async(e,t,n,r)=>{let{renameProfile:i}=await import(`./profile-BZo9STO2.js`);await i(e,t,r.optsWithGlobals())}),S(t.command(`clone`).alias(`copy`).description(`Clone config defaults into a new profile (no credentials)`).argument(`<from>`,`Profile to clone`).argument(`<to>`,`New profile name`)).action(async(e,t,n,r)=>{let{cloneProfile:i}=await import(`./profile-BZo9STO2.js`);await i(e,t,r.optsWithGlobals())})}function ue(e){let t=e.command(`recordings`).summary(`List, import, retry, and manage recordings`).helpGroup(D.build).addHelpText(`after`,"\nNote: full transcripts live in `entrydesk meeting transcript <recordingId>`.");S(C(t.command(`list`,{isDefault:!0}).description(`List recordings`).option(`--search <query>`,`Filter by title/transcript`,p(200)),20)).action(async(e,t)=>{let{listRecordings:n}=await import(`./recordings-D9jnWpxs.js`);await n(t.optsWithGlobals())}),S(t.command(`get`).description(`Show a recording's metadata, summary, and status`).argument(`<recordingId>`,`Recording to show`)).action(async(e,t,n)=>{let{showRecording:r}=await import(`./recordings-D9jnWpxs.js`);await r(e,n.optsWithGlobals())}),S(t.command(`import`).description(`Import a recording from a media URL`).argument(`<url>`,`Media URL to import`).option(`--title <text>`,`Title for the imported recording`).option(`--model <modelId>`,`Model for transcription and summary`).option(`--language <code>`,`Preferred transcript language (e.g. zh-TW)`)).action(async(e,t,n)=>{let{importRecording:r}=await import(`./recordings-D9jnWpxs.js`);await r(e,n.optsWithGlobals())}),S(t.command(`preview`).description(`Preview a media URL's metadata before importing`).argument(`<url>`,`Media URL to preview`)).action(async(e,t,n)=>{let{previewRecording:r}=await import(`./recordings-D9jnWpxs.js`);await r(e,n.optsWithGlobals())}),S(t.command(`audio-url`).description(`Get a signed URL to stream or download the audio`).argument(`<recordingId>`,`Recording to link`)).action(async(e,t,n)=>{let{showRecordingAudioUrl:r}=await import(`./recordings-D9jnWpxs.js`);await r(e,n.optsWithGlobals())}),S(t.command(`retry`).description(`Retry processing of a failed recording`).argument(`<recordingId>`,`Recording to retry`)).action(async(e,t,n)=>{let{retryRecording:r}=await import(`./recordings-D9jnWpxs.js`);await r(e,n.optsWithGlobals())}),S(t.command(`delete`).description(`Delete a recording`).argument(`<recordingId>`,`Recording to delete`).option(`-y, --yes`,`Skip the confirmation prompt`)).action(async(e,t,n)=>{let{deleteRecording:r}=await import(`./recordings-D9jnWpxs.js`);await r(e,n.optsWithGlobals())})}function K(e){return e.option(`--utc-offset <offset>`,`Timezone offset, e.g. +08:00`).option(`--holiday-calendars <ids>`,`Comma-separated connected calendar ids to skip on holiday`,m).addOption(new u(`--repeat-type <type>`,`Repeat unit`).choices(B)).option(`--every <n>`,`Repeat every N units`,f(1,1e3)).option(`--time <HH:MM>`,`Time of day (days, weeks, months)`,y).option(`--times <HH:MM,...>`,`Multiple daily trigger times (days only)`,b).option(`--days-of-week <0-6>`,`Comma-separated days, 0=Sunday`,h(0,6)).option(`--days-of-month <1-31>`,`Comma-separated days of the month`,h(1,31)).option(`--last-day-of-month`,`Include the last day of the month`).option(`--daily-windows <ranges>`,`Comma-separated HH:MM-HH:MM active-time windows (minutes, hours)`,se)}function de(e){let t=e.command(`schedules`).summary(`Create and manage scheduled tasks`).helpGroup(D.build);S(t.command(`list`,{isDefault:!0}).description(`List schedules`)).action(async(e,t)=>{let{listSchedules:n}=await import(`./schedules-BFoirR6r.js`);await n(t.optsWithGlobals())}),S(t.command(`get`).description(`Show schedule details`).argument(`<scheduleId>`,`Schedule to show`)).action(async(e,t,n)=>{let{showSchedule:r}=await import(`./schedules-BFoirR6r.js`);await r(e,n.optsWithGlobals())}),S(K(t.command(`create`).description(`Create a new schedule`).requiredOption(`--name <name>`,`Schedule name`).requiredOption(`--prompt <text>`,`Prompt to send to the agent`).requiredOption(`--agent-id <id>`,`Agent to run`).requiredOption(`--starts-at <datetime>`,`Start time, ISO 8601`))).action(async(e,t)=>{let{createSchedule:n}=await import(`./schedules-BFoirR6r.js`);await n(t.optsWithGlobals())}),S(K(t.command(`edit`).description(`Update a schedule (only the fields you pass)`).argument(`<scheduleId>`,`Schedule to update`).option(`--name <name>`,`Schedule name`).option(`--prompt <text>`,`Prompt to send to the agent`).option(`--agent-id <id>`,`Agent to run`).option(`--starts-at <datetime>`,`Start time, ISO 8601`))).action(async(e,t,n)=>{let{editSchedule:r}=await import(`./schedules-BFoirR6r.js`);await r(e,n.optsWithGlobals())}),S(t.command(`activate`).description(`Resume a paused schedule`).argument(`<scheduleId>`,`Schedule to activate`)).action(async(e,t,n)=>{let{setScheduleActive:r}=await import(`./schedules-BFoirR6r.js`);await r(e,!0,n.optsWithGlobals())}),S(t.command(`pause`).description(`Pause an active schedule`).argument(`<scheduleId>`,`Schedule to pause`)).action(async(e,t,n)=>{let{setScheduleActive:r}=await import(`./schedules-BFoirR6r.js`);await r(e,!1,n.optsWithGlobals())}),S(t.command(`run`).description(`Run a schedule now; prints the created taskId`).argument(`<scheduleId>`,`Schedule to run`)).action(async(e,t,n)=>{let{runScheduleNow:r}=await import(`./schedules-BFoirR6r.js`);await r(e,n.optsWithGlobals())}),S(w(t.command(`runs`).description(`List a schedule's run history`).argument(`<scheduleId>`,`Schedule whose runs to list`),20)).action(async(e,t,n)=>{let{listScheduleRuns:r}=await import(`./schedules-BFoirR6r.js`);await r(e,n.optsWithGlobals())}),t.command(`delete`).description(`Delete a schedule`).argument(`<scheduleId>`,`Schedule to delete`).action(async e=>{let{deleteSchedule:t}=await import(`./schedules-BFoirR6r.js`);await t(e)}),S(t.command(`calendars`).description(`List connected calendar accounts`)).action(async(e,t)=>{let{listCalendarAccounts:n}=await import(`./schedules-BFoirR6r.js`);await n(t.optsWithGlobals())})}function fe(e){S(e.command(`login`).summary(`Log in to EntryDesk`).helpGroup(D.setup)).action(async(e,t)=>{let{runLogin:n}=await import(`./login-IvudGta0.js`);await n(t.optsWithGlobals())})}function pe(e){e.command(`logout`).summary(`Log out and clear credentials`).helpGroup(D.setup).action(async()=>{let{runLogout:e}=await import(`./logout-Bjmk9YUh.js`);await e()})}function me(e){S(e.command(`status`).summary(`Show who you are logged in as`).helpGroup(D.setup)).action(async(e,t)=>{let{runStatus:n}=await import(`./status-BgIfKAmr.js`);await n(t.optsWithGlobals())})}function he(e){S(e.command(`models`).summary(`List available models`).helpGroup(D.workspace)).action(async(e,t)=>{let{runModels:n}=await import(`./models-BFnezI1c.js`);await n(t.optsWithGlobals())})}function ge(e){e.command(`version`).summary(`Show the version number`).helpGroup(D.setup).action(()=>console.log(e.version()))}function _e(e){S(e.command(`update`).summary(`Update the CLI to the latest version`).helpGroup(D.setup).option(`--check`,`Only check for a newer version, don't install`)).action(async(e,t)=>{let{runUpdate:n}=await import(`./update-CYieYkZl.js`);await n(t.optsWithGlobals())})}function ve(e){e.command(`mcp-server`).summary(`Start the MCP server (stdio or HTTP)`).helpGroup(D.setup).option(`--http`,`Serve over HTTP instead of stdio`).option(`-p, --port <number>`,`Port to listen on`,f(1,65535)).action(async e=>{let{startMcpServer:t}=await import(`./mcp-ydzvH8kz.js`);await t({mode:e.http?`http`:`stdio`,port:e.port})})}function q(e){return e.option(`-g, --global`,`Act at user (global) scope instead of the project`)}function J(e){return e.option(`-a, --agent <agentId>`,`Restrict install to specific agents (repeatable; '*' for all)`,g)}function ye(e){let t=e.command(`skills`).summary(`List, upload, version, toggle, and share skills`).helpGroup(D.build);S(q(t.command(`list`,{isDefault:!0}).description(`List available skills`).option(`--me, --mine`,`Only skills you created`).option(`--local`,`Only locally-tracked skills`).option(`--remote`,`Only workspace skills`).option(`--all`,`Both local and remote, merged`))).action(async(e,t)=>{let{listSkills:n}=await import(`./skills-DYS1EQMn.js`);await n(t.optsWithGlobals())}),S(t.command(`upload`).description(`Upload a skill zip file or folder`).argument(`<path>`,`Zip file or folder to upload`).option(`--force`,`Overwrite an existing skill with the same name`)).action(async(e,t,n)=>{let{uploadSkill:r}=await import(`./skills-DYS1EQMn.js`);await r(e,n.optsWithGlobals())}),S(t.command(`toggle`).description(`Enable or disable a skill for yourself`).argument(`<skillId>`,`Skill to toggle`).addOption(new u(`--enable`,`Turn the skill on`).conflicts(`disable`)).option(`--disable`,`Turn the skill off`)).action(async(e,t,n)=>{let{toggleSkill:r}=await import(`./skills-DYS1EQMn.js`);await r(e,n.optsWithGlobals())}),S(t.command(`versions`).description(`List a skill's version history`).argument(`<skillId>`,`Skill to inspect`)).action(async(e,t,n)=>{let{listSkillVersions:r}=await import(`./skills-DYS1EQMn.js`);await r(e,n.optsWithGlobals())}),S(E(t.command(`share`).description(`Show or manage sharing (user grants)`).argument(`<skillId>`,`Skill to share`))).action(async(e,t,n)=>{let{shareSkill:r}=await import(`./skills-DYS1EQMn.js`);await r(e,n.optsWithGlobals())}),t.command(`delete`).description(`Delete a skill you own`).argument(`<skillId>`,`Skill to delete`).action(async e=>{let{deleteSkill:t}=await import(`./skills-DYS1EQMn.js`);await t(e)}),S(t.command(`download`).description(`Download and extract a skill to ./<skill-name>/`).argument(`<skillId>`,`Skill to download`)).action(async(e,t,n)=>{let{downloadSkill:r}=await import(`./skills-DYS1EQMn.js`);await r(e,n.optsWithGlobals())}),S(J(q(t.command(`add`).description(`Install a skill from an EntryDesk slug/id, a git URL, or a local path`).argument(`<source>`,`Skill source`)))).action(async(e,t,n)=>{let{addSkill:r}=await import(`./skills-DYS1EQMn.js`);await r(e,n.optsWithGlobals())}),S(J(q(t.command(`pull`).description(`Download the latest from the workspace`).argument(`[nameOrId]`,`Skill to pull (default: every tracked one)`)))).action(async(e,t,n)=>{let{pullSkill:r}=await import(`./skills-DYS1EQMn.js`);await r(e,n.optsWithGlobals())}),S(q(t.command(`push`).description(`Upload local changes to the workspace`).argument(`[name]`,`Skill to push (default: every changed one)`).option(`--force`,`Overwrite the workspace copy`))).action(async(e,t,n)=>{let{pushSkill:r}=await import(`./skills-DYS1EQMn.js`);await r(e,n.optsWithGlobals())}),S(q(t.command(`status`).description(`Show local vs workspace drift`))).action(async(e,t)=>{let{showSkillsStatus:n}=await import(`./skills-DYS1EQMn.js`);await n(t.optsWithGlobals())}),S(q(t.command(`remove`).description(`Uninstall a skill locally`).argument(`<name>`,`Skill to remove`).option(`--remote`,`Also delete the skill from the workspace`))).action(async(e,t,n)=>{let{removeSkill:r}=await import(`./skills-DYS1EQMn.js`);await r(e,n.optsWithGlobals())}),S(q(t.command(`link`).description(`Bind this directory (or the user) to a workspace`).argument(`[workspaceId]`,`Workspace to bind to`))).action(async(e,t,n)=>{let{linkSkillsDirectory:r}=await import(`./skills-DYS1EQMn.js`);await r(e,n.optsWithGlobals())}),S(q(t.command(`unlink`).description(`Remove the workspace binding`))).action(async(e,t)=>{let{runSkillsUnlink:n}=await import(`./commands-C1wX8XQY.js`);n(t.optsWithGlobals())})}function be(e){e.command(`task`,{isDefault:!0}).summary(`Send a message or run an interactive task`).description(`Send a message to a model or agent, or start an interactive session.`).helpGroup(D.chat).option(`-m, --message <text>`,`Message to send (or pipe via stdin)`).option(`--model <modelId>`,`Model to use (instead of an agent)`).option(`-a, --agent <agentId>`,`Agent to use (instead of --model)`).option(`-c, --continue <n>`,`Continue recent task #n`,f(1,20)).option(`-i, --interactive`,`Interactive mode (continuous chat)`).option(`--connectors <ids>`,`Limit to specific connectors (default: all connected)`,m).option(`--plain`,`Plain text output`).addOption(new u(`--output <mode>`,`Stream events as JSON`).choices(V)).option(`--full-output`,`Show full tool outputs`).option(`--file-system`,`Enable local file operations`).option(`--no-file-system`,`Disable local file operations`).addOption(new u(`--tool-approval-mode <mode>`,`Defaults to the mode /approval saved. Non-interactive runs deny every approval they are asked for`).choices(ne.options)).option(`--dangerously-auto-approve-tools`,`Deprecated alias for --tool-approval-mode always_allow`).addHelpText(`after`,`
|
|
21
|
+
Examples:
|
|
22
|
+
entrydesk task -m "Hello" --model <model>
|
|
23
|
+
entrydesk task -m "Hello" -a <agentId>
|
|
24
|
+
entrydesk task -c 1 -m "Follow up" # Continue recent task
|
|
25
|
+
entrydesk task -i # Interactive mode
|
|
26
|
+
echo "Explain this" | entrydesk task --model <model> # Pipe stdin
|
|
27
|
+
|
|
28
|
+
List available models: entrydesk models
|
|
29
|
+
List available agents: entrydesk agents
|
|
30
|
+
List recent tasks: entrydesk tasks`).action(async(e,t)=>{let[n]=t.parent?.args??[],r=n===t.name()||t.aliases().includes(n??``),{runTask:i}=await import(`./task-Db4UcJ6G.js`);await i({...e,interactive:e.interactive??!r})})}function xe(e){S(e.command(`tasks`).summary(`List, search, or view tasks`).helpGroup(D.chat).argument(`[taskId]`,`Task id, or a 1-based index into recent tasks`).addOption(new u(`-q, --search <query>`,`Filter tasks by a search query`).conflicts(`share`)).option(`--limit <number>`,`Max tasks to return`,f(1,50)).option(`--next-key <cursor>`,`Fetch the next page using this cursor`).option(`-s, --share <shareId>`,`View a shared task's messages (no login needed)`).addOption(new u(`--output <mode>`,`Stream messages as JSON events`).choices(V)).option(`--full-output`,`Show full tool outputs when viewing a task`).addHelpText(`after`,`
|
|
31
|
+
Examples:
|
|
32
|
+
entrydesk tasks # List recent tasks
|
|
33
|
+
entrydesk tasks -q "deploy" --limit 20 # Search tasks
|
|
34
|
+
entrydesk tasks <taskId> # View a task's messages
|
|
35
|
+
entrydesk tasks <taskId> --full-output # …with full tool outputs
|
|
36
|
+
entrydesk tasks -s <shareId> # View a shared task`)).action(async(e,t,n)=>{let{runTasks:r}=await import(`./tasks-Dd-GdHfu.js`);await r(e,n.optsWithGlobals())})}function Se(e){let t=e.command(`tool`).summary(`List, get, or call MCP tools`).helpGroup(D.chat);S(t.command(`list`,{isDefault:!0}).description(`List all available tools`).option(`-p, --prefix <name>`,`Filter tools by connector prefix`)).action(async(e,t)=>{let{listTools:n}=await import(`./tool-B6W8erW6.js`);await n(t.optsWithGlobals())}),S(t.command(`get`).description(`Get details of a specific tool`).argument(`<name>`,`Tool name`)).action(async(e,t,n)=>{let{getTool:r}=await import(`./tool-B6W8erW6.js`);await r(e,n.optsWithGlobals())}),S(t.command(`call`).description(`Call a tool with JSON input`).argument(`<name>`,`Tool name`).option(`-i, --input <json>`,`JSON input for the tool call`).option(`-f, --input-file <path>`,`Read the JSON input from a file`).addHelpText(`after`,`
|
|
37
|
+
Input priority:
|
|
38
|
+
1. --input (direct JSON string)
|
|
39
|
+
2. --input-file (read from file)
|
|
40
|
+
3. stdin (piped input)
|
|
41
|
+
|
|
42
|
+
Examples:
|
|
43
|
+
entrydesk tool call agent__search_agents --input '{"limit": 5}'
|
|
44
|
+
entrydesk tool call agent__search_agents --input-file input.json
|
|
45
|
+
echo '{"limit": 5}' | entrydesk tool call agent__search_agents`)).action(async(e,t,n)=>{let{runToolCall:r}=await import(`./tool-B6W8erW6.js`);await r(e,n.optsWithGlobals())})}function Ce(e){let t=e.command(`usage`).summary(`Show balance, per-user breakdown, or CSV export`).helpGroup(D.workspace);S(t.command(`summary`,{isDefault:!0}).description(`Per-user monthly cost/operations summary`).option(`--limit <number>`,`Limit rows (default: all)`,f(1,100)).addOption(new u(`--sort-by <field>`,`Sort the summary`).choices(H).default(`cost`))).action(async(e,t)=>{let{showUsageSummary:n}=await import(`./usage-BLdNvuse.js`);await n(t.optsWithGlobals())}),S(t.command(`balance`).description(`Workspace USD balance, spend, and limits`)).action(async(e,t)=>{let{showUsageBalance:n}=await import(`./usage-BLdNvuse.js`);await n(t.optsWithGlobals())}),S(t.command(`me`).description(`Your own usage and availability`)).action(async(e,t)=>{let{showOwnUsage:n}=await import(`./usage-BLdNvuse.js`);await n(t.optsWithGlobals())}),S(t.command(`consumptions`).description(`Per-user extra-usage breakdown`).option(`--limit <number>`,`Max rows (default: 20)`,f(1,100)).option(`--offset <number>`,`Pagination offset`,d).option(`--period-start <iso>`,`Period start`)).action(async(e,t)=>{let{listUsageConsumptions:n}=await import(`./usage-BLdNvuse.js`);await n(t.optsWithGlobals())}),t.command(`export`).description(`Export per-user usage as CSV`).option(`--period-start <iso>`,`Period start`).option(`-o, --output <file>`,`Write the CSV to a file (default: stdout)`).action(async e=>{let{exportUsage:t}=await import(`./usage-BLdNvuse.js`);await t(e)})}function we(e){let t=e.command(`workflow`).summary(`Create, run, and manage workflows`).helpGroup(D.build).addHelpText(`after`,`
|
|
46
|
+
Examples:
|
|
47
|
+
entrydesk workflow list --search report
|
|
48
|
+
entrydesk workflow create --name "Nightly report" --file ./report.js
|
|
49
|
+
entrydesk workflow run <workflowId> --args '{"date":"2026-06-20"}' --wait
|
|
50
|
+
entrydesk workflow run-get <workflowId> <runId>`);S(w(t.command(`list`,{isDefault:!0}).description(`List workflows`).option(`--search <text>`,`Search by name`),20)).action(async(e,t)=>{let{listWorkflows:n}=await import(`./workflow-DlQtL_J-.js`);await n(t.optsWithGlobals())}),S(t.command(`get`).description(`Show workflow details`).argument(`<workflowId>`,`Workflow to show`).option(`--show-source`,`Print the full script source`)).action(async(e,t,n)=>{let{showWorkflow:r}=await import(`./workflow-DlQtL_J-.js`);await r(e,n.optsWithGlobals())}),S(t.command(`create`).description(`Create a workflow from a local script file`).requiredOption(`--name <text>`,`Workflow name`).requiredOption(`--file <path>`,`Script source file (.js)`).option(`--description <text>`,`Workflow description`)).action(async(e,t)=>{let{createWorkflow:n}=await import(`./workflow-DlQtL_J-.js`);await n(t.optsWithGlobals())}),S(t.command(`update`).description(`Update name, description, script, or active state`).argument(`<workflowId>`,`Workflow to update`).option(`--name <text>`,`Workflow name`).option(`--description <text>`,`Workflow description`).option(`--file <path>`,`Script source file (.js)`).addOption(new u(`--activate`,`Enable the workflow`).conflicts(`deactivate`)).option(`--deactivate`,`Disable the workflow`)).action(async(e,t,n)=>{let{updateWorkflow:r}=await import(`./workflow-DlQtL_J-.js`);await r(e,n.optsWithGlobals())}),S(t.command(`run`).description(`Trigger a run`).argument(`<workflowId>`,`Workflow to run`).addOption(new u(`--args <json>`,`Inline JSON passed to the workflow's args global`).conflicts(`argsFile`)).option(`--args-file <path>`,`Read the JSON args from a file`).option(`--wait`,`Poll the run until it finishes, then print the result`)).action(async(e,t,n)=>{let{triggerWorkflowRun:r}=await import(`./workflow-DlQtL_J-.js`);await r(e,n.optsWithGlobals())}),S(w(t.command(`runs`).description(`List runs of a workflow`).argument(`<workflowId>`,`Workflow whose runs to list`),20)).action(async(e,t,n)=>{let{listWorkflowRuns:r}=await import(`./workflow-DlQtL_J-.js`);await r(e,n.optsWithGlobals())}),S(t.command(`run-get`).description(`Show a run's status, nodes, and logs`).argument(`<workflowId>`,`Workflow the run belongs to`).argument(`<runId>`,`Run to show`)).action(async(e,t,n,r)=>{let{showWorkflowRun:i}=await import(`./workflow-DlQtL_J-.js`);await i(e,t,r.optsWithGlobals())}),S(E(t.command(`share`).description(`Show or manage sharing (user grants)`).argument(`<workflowId>`,`Workflow to share`))).action(async(e,t,n)=>{let{shareWorkflow:r}=await import(`./workflow-DlQtL_J-.js`);await r(e,n.optsWithGlobals())})}function Y(e){let t=e.command(`workspaces`).summary(`List or switch workspaces`).helpGroup(D.workspace);S(t.command(`list`,{isDefault:!0}).description(`List all workspaces`)).action(async(e,t)=>{let{listWorkspaces:n}=await import(`./workspaces-IAJitqaO.js`);await n(t.optsWithGlobals())}),S(t.command(`switch`).alias(`use`).description(`Switch to a workspace`).argument(`<workspaceId>`,`Workspace to switch to`)).action(async(e,t,n)=>{let{switchWorkspace:r}=await import(`./workspaces-IAJitqaO.js`);await r(e,n.optsWithGlobals())})}function X(e){return e.commands.length>0}function Z(e,t){return e.options.some(e=>e.long===t)}function Q(e,t){return e.name()===t||e.aliases().includes(t)}function Te(e){X(e)&&!Z(e,`--json`)&&e.addOption(new u(`--json`).hideHelp()),Z(e,`--profile`)||e.addOption(new u(x).hideHelp())}function Ee(e){e.hook(`preSubcommand`,(e,t)=>{let[n]=e.args;n===void 0||n.startsWith(`-`)||Q(t,n)||t.registeredArguments.length>0||e.commands.some(e=>Q(e,n))||e.error(`error: unknown command '${n}'`,{code:`commander.unknownCommand`})})}function $(e,t){t||Te(e),X(e)&&Ee(e);for(let t of e.commands)t.name()!==`help`&&$(t,!1)}function De(e){let t=e.optsWithGlobals().profile;return typeof t==`string`?t:void 0}function Oe(e){let t=e;for(;t.parent?.parent;)t=t.parent;return t.name()}function ke(){let e=ce();return e.hook(`preAction`,(e,t)=>{if(Oe(t)===`profile`)return;let n=De(t)??s.getCurrentProfileName();s.ensureProfileExists(n),s.setOverrideProfile(n)}),be(e),xe(e),Se(e),k(e),fe(e),pe(e),me(e),Y(e),he(e),F(e),L(e),we(e),W(e),ye(e),de(e),ue(e),G(e),Ce(e),M(e),A(e),P(e),le(e),ge(e),_e(e),ve(e),$(e,!0),e}try{await ke().parseAsync(process.argv)}catch(e){re(e)}export{};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import e from"node:fs";import t from"node:path";const n=[{id:`claude-code`,displayName:`Claude Code`,skillsSubdir:t.join(`.claude`,`skills`),rootMarker:`.claude`},{id:`codex`,displayName:`Codex`,skillsSubdir:t.join(`.codex`,`skills`),rootMarker:`.codex`},{id:`cursor`,displayName:`Cursor`,skillsSubdir:t.join(`.cursor`,`skills`),rootMarker:`.cursor`},{id:`universal`,displayName:`Universal (.agents)`,skillsSubdir:t.join(`.agents`,`skills`),rootMarker:`.agents`}];function r(e,n){return t.join(n,e.skillsSubdir)}function i(r){let i=n.filter(n=>n.id===`universal`||e.existsSync(t.join(r,n.rootMarker)));return i.length>0?i:n.filter(e=>e.id===`universal`)}function a(t){let n;try{n=e.lstatSync(t)}catch{return}n.isSymbolicLink()?e.unlinkSync(t):n.isDirectory()?e.rmSync(t,{recursive:!0,force:!0}):e.rmSync(t,{force:!0})}function o(n,r,i,o=`symlink`){let s=t.basename(t.dirname(r))||r,c=t.join(r,i);if(e.mkdirSync(r,{recursive:!0}),a(c),o===`symlink`)try{let i=t.relative(r,n);return e.symlinkSync(i,c,process.platform===`win32`?`junction`:`dir`),{agentId:s,linkPath:c,mode:`symlink`,ok:!0}}catch{}try{return e.cpSync(n,c,{recursive:!0}),{agentId:s,linkPath:c,mode:`copy`,ok:!0}}catch(e){return{agentId:s,linkPath:c,mode:`copy`,ok:!1,error:e instanceof Error?e.message:String(e)}}}function s(n,r){let i=t.join(n,r);try{e.lstatSync(i)}catch{return!1}return a(i),!0}function c(n,r){let i;try{i=e.lstatSync(n)}catch{return!1}return i.isSymbolicLink()?t.resolve(t.dirname(n),e.readlinkSync(n))===t.resolve(r):!1}function l(e,t){return t&&t.length>0?t.includes(`*`)?[...n]:n.filter(e=>t.includes(e.id)):i(e)}function u(e,t,n,i=`symlink`,a){return l(n,a).map(a=>o(e,r(a,n),t,i))}export{s as a,c as i,r as n,u as r,n as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{C as e,S as t,T as n,_ as r,b as i,h as a,p as o,y as s}from"./profile-storage-mtd3aKrx.js";async function c(c){let l=r();if(l){c.json?console.log(JSON.stringify({alreadyAuthenticated:!0,authSource:`sandbox-env`,workspaceId:l.workspaceId})):(console.log(`Already authenticated via ${a}.`),console.log(`No login required — environment credentials are active.`));return}s()&&console.error(`Warning: ENTRYDESK_TOKEN is set — workspace commands will keep using it instead of the credentials saved by this login. Unset ENTRYDESK_TOKEN if you want this login to take effect.`),process.env.DEBUG&&(console.log(`[DEBUG] Hub URL: ${n()}`),console.log(`[DEBUG] API URL: ${e()}`));let u=await o({onDeviceCodeReceived:(e,t)=>{c.json||(console.log(``),console.log(`To finish logging in:`),console.log(``),console.log(` 1. Visit: ${t}`),console.log(` 2. Enter code: ${e}`),console.log(``))},onBrowserOpening:()=>{c.json||console.log(`Opening browser…`)},onWaitingForAuthorization:()=>{c.json||console.log(`Waiting for authorization…`)},onAuthorized:()=>{c.json||console.log(`Authorization successful.`)},onWarning:e=>{console.error(`Warning: ${e}`)}}),{workspaces:d}=await new i().getWorkspaces(u.accessToken),f=d[0];await t.saveAll({accessToken:u.accessToken,refreshToken:u.refreshToken,email:u.email,workspaceId:f?.id}),c.json?console.log(JSON.stringify({email:u.email,workspaceId:f?.id,workspaceName:f?.name,server:e()})):(console.log(`Logged in as ${u.email}`),f&&console.log(`Workspace: ${f.name}`),console.log(`Server: ${e()}`))}export{c as runLogin};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{S as e,b as t,f as n}from"./profile-storage-mtd3aKrx.js";async function r(){let r=await e.getAll();if(!r){console.log(`Not logged in.`);return}try{r.refreshToken&&await new t().revokeOAuthToken({token:r.refreshToken,clientId:n})}catch{}await e.clear(),console.log(`Logged out.`)}export{r as runLogout};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{O as e,b as t,l as n}from"./profile-storage-mtd3aKrx.js";import{isHTTPError as r}from"ky";function i(e){return r(e)&&e.response.status===404}var a=class extends Error{slug;constructor(e){super(`"${e}" matches both an agent and a skill`),this.slug=e,this.name=`AmbiguousResourceError`}},o=class extends Error{slug;constructor(e){super(`Marketplace resource not found: ${e}`),this.slug=e,this.name=`ResourceNotFoundError`}};async function s(e){try{return await e}catch(e){if(i(e))return null;throw e}}async function c(e,t,n){if(n===`agent`)return{type:n,view:await e.getMarketplaceAgent(t)};if(n===`skill`)return{type:n,view:await e.getMarketplaceSkill(t)};let[r,i]=await Promise.all([s(e.getMarketplaceAgent(t)),s(e.getMarketplaceSkill(t))]);if(r&&i)throw new a(t);if(r)return{type:`agent`,view:r};if(i)return{type:`skill`,view:i};throw new o(t)}async function l(e,t){try{return await t()}catch(t){throw t instanceof a&&(console.error(`"${t.slug}" matches both an agent and a skill. Re-run with --type agent|skill.`),process.exit(1)),(t instanceof o||i(t))&&(console.error(`Marketplace resource not found: ${e}`),process.exit(1)),t}}async function u(e,n){let r=await new t().searchMarketplace({type:n.type,tag:e??n.tag,limit:n.limit,cursor:n.cursor});if(n.json){console.log(JSON.stringify(r));return}if(r.items.length===0){console.log(`No marketplace resources found.`);return}console.log(`Marketplace (${r.items.length}):\n`);for(let e of r.items)console.log(` ${e.name} [${e.type}]`),console.log(` Slug: ${e.slug}`),e.description&&console.log(` ${e.description}`),e.tags.length>0&&console.log(` Tags: ${e.tags.map(e=>e.label).join(`, `)}`),console.log(``);r.nextCursor&&console.log(`More results: --cursor ${r.nextCursor}`)}async function d(e,n){let{type:r,view:i}=await l(e,()=>c(new t,e,n.type));if(n.json){console.log(JSON.stringify(i));return}if(console.log(`${i.name} [${r}]`),console.log(`Slug: ${i.slug}`),i.description&&console.log(`\n${i.description}`),i.tags.length>0&&console.log(`\nTags: ${i.tags.map(e=>e.label).join(`, `)}`),r===`agent`){if(i.starterPrompts.length>0){console.log(`
|
|
3
|
+
Starter prompts:`);for(let e of i.starterPrompts)console.log(` - ${e}`)}if(i.connectors.length>0){console.log(`
|
|
4
|
+
Connectors:`);for(let e of i.connectors)console.log(` - ${e.name} (${e.provider})`)}}console.log(`\nInstall with: entrydesk marketplace install ${i.slug} --type ${r}`)}async function f(r,i){let a=new t,{accessToken:o,workspaceId:s}=await n(),{type:u}=i.type?{type:i.type}:await l(r,()=>c(a,r)),d=await l(r,()=>a.installMarketplaceResource(o,s,u,r,e.getToolApprovalMode()??void 0));if(i.json){console.log(JSON.stringify(d));return}console.log(`Installed ${u} "${r}" into the workspace.`),console.log(` ${u} ID: ${d.resourceId}`),d.taskId&&(console.log(` Setup task: ${d.taskId}`),console.log(` Continue setup: entrydesk tasks ${d.taskId}`))}async function p(e){let{items:n}=await new t().listMarketplaceRoles();if(e.json){console.log(JSON.stringify(n));return}if(n.length===0){console.log(`No marketplace roles found.`);return}console.log(`Marketplace roles (${n.length}):\n`);for(let e of n)console.log(` ${e.tag} ${e.name}`),e.tagline&&console.log(` ${e.tagline}`)}export{f as installMarketplaceResource,u as searchMarketplace,d as showMarketplaceResource,p as showMarketplaceRoles};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{E as e,l as t,w as n,x as r}from"./profile-storage-mtd3aKrx.js";import{Client as i,StreamableHTTPClientTransport as a}from"@modelcontextprotocol/client";const o=()=>{};function s(t={}){let{requestTimeout:n,requestMaxTotalTimeout:r}=e();return{timeout:n,maxTotalTimeout:r,resetTimeoutOnProgress:!0,onprogress:t.onProgress??o,signal:t.signal}}async function c(e={}){let o=e.apiUrl,s=e.accessToken,c=e.workspaceId;if(!s||!c){let e=await t();s||=e.accessToken,c||=e.workspaceId}o||=n().apiUrl;let l=new i({name:e.name??`entrydesk-cli`,version:`1.0.0`}),u=new a(new URL(`${o}/v1/workspaces/${c}/mcp`),{requestInit:{headers:{Authorization:`Bearer ${s}`,...r()}}});return await l.connect(u),l}async function l(){return c()}export{l as n,s as r,c as t};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{S as e,d as t,l as n,u as r,w as i}from"./profile-storage-mtd3aKrx.js";import{r as a,t as o}from"./mcp-client-Cr_sHGPw.js";import s from"node:http";import{stderr as c}from"node:process";import{NodeStreamableHTTPServerTransport as l}from"@modelcontextprotocol/node";import{Server as u}from"@modelcontextprotocol/server";import{StdioServerTransport as d}from"@modelcontextprotocol/server/stdio";function f(e){c.write(`${e}\n`)}function p(e,t,n){return o({apiUrl:e,accessToken:t,workspaceId:n,name:`entrydesk-cli-proxy`})}function m(e){let t=new u({name:`entrydesk-cli`,version:`1.0.0`},{capabilities:{tools:{}}});return t.setRequestHandler(`tools/list`,async(t,n)=>({tools:(await(await e()).listTools({},a({signal:n.mcpReq.signal}))).tools})),t.setRequestHandler(`tools/call`,async(t,n)=>{let{name:r,arguments:i}=t.params,{progressToken:o}=n.mcpReq._meta??{},s=await(await e()).callTool({name:r,arguments:i},a({signal:n.mcpReq.signal,onProgress:o===void 0?void 0:e=>{n.mcpReq.notify({method:`notifications/progress`,params:{...e,progressToken:o}}).catch(()=>{})}})),c=Array.isArray(s.content)?[...s.content]:[];return s.structuredContent&&c.push({type:`text`,text:JSON.stringify(s.structuredContent,null,2)}),{content:c,structuredContent:s.structuredContent,isError:s.isError}}),t}async function h(e,t,n){let r=s.createServer(async(t,n)=>{if(t.method===`OPTIONS`){n.setHeader(`Access-Control-Allow-Origin`,`*`),n.setHeader(`Access-Control-Allow-Methods`,`GET, POST, DELETE, OPTIONS`),n.setHeader(`Access-Control-Allow-Headers`,`Content-Type, Accept`),n.writeHead(204),n.end();return}if(t.url!==`/mcp`){n.writeHead(404,{"Content-Type":`application/json`}),n.end(JSON.stringify({error:`Not found`}));return}let r=m(e),i=new l({sessionIdGenerator:void 0});if(n.setHeader(`Access-Control-Allow-Origin`,`*`),n.on(`close`,()=>{i.close(),r.close()}),await r.connect(i),t.method===`POST`){let e=``;t.on(`data`,t=>{e+=t.toString()}),t.on(`end`,async()=>{try{let r=JSON.parse(e);await i.handleRequest(t,n,r)}catch{n.writeHead(400,{"Content-Type":`application/json`}),n.end(JSON.stringify({error:`Invalid JSON`}))}})}else await i.handleRequest(t,n)});r.listen(n,()=>{f(`EntryDesk MCP server running at http://localhost:${n}/mcp`),f(`Press Ctrl+C to stop`)}),process.on(`SIGINT`,async()=>{f(`
|
|
3
|
+
Shutting down…`),r.close(),await t(),process.exit(0)}),process.on(`SIGTERM`,async()=>{r.close(),await t(),process.exit(0)})}async function g(e,t){let n=m(e),r=new d;r.onclose=async()=>{await t()},await n.connect(r)}const _={mode:`stdio`};async function v(a=_){process.on(`unhandledRejection`,e=>{console.error(`[entrydesk-mcp] Unhandled rejection:`,e)}),process.on(`uncaughtException`,e=>{console.error(`[entrydesk-mcp] Uncaught exception:`,e)});try{f(`[entrydesk-mcp] Starting MCP server…`);let o,s;try{let e=await n();o=e.accessToken,s=e.workspaceId}catch(e){let t=e instanceof Error?e.message:`Authentication failed`;console.error(t),process.exit(1)}let{apiUrl:c,mcp:l}=i();f(`[entrydesk-mcp] Connecting to ${c}…`),f(`[entrydesk-mcp] Workspace: ${s}`);let u=await p(c,o,s);f(`[entrydesk-mcp] Connected to EntryDesk API`);let d=null,m=async()=>r(o)?d||(d=(async()=>{f(`[entrydesk-mcp] Token expiring soon, refreshing…`);let n=await e.getAll();if(!n?.accessToken)throw Error("Not logged in. Run `entrydesk login` again.");let r=await t(n);if(r!==o){o=r;try{await u.close()}catch{}u=await p(c,o,s),f(`[entrydesk-mcp] Token refreshed, reconnected`)}return u})().finally(()=>{d=null}),d):u,_=async()=>{try{await u.close()}catch{}};a.mode===`http`?await h(m,_,a.port??l.httpPort):(f(`[entrydesk-mcp] Starting stdio server…`),await g(m,_),f(`[entrydesk-mcp] Stdio server started`))}catch(e){console.error(`[entrydesk-mcp] Fatal error:`,e),process.exit(1)}}export{v as startMcpServer};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{P as e,b as t,l as n}from"./profile-storage-mtd3aKrx.js";function r(e){if(!e)return``;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function i(e){return!e||e<=0?``:`${Math.round(e/60)}m`}function a(e){console.log(`Meetings (${e.length}):\n`);for(let t of e){let e=[`(${t.status??`unknown`})`],n=r(t.startTime??t.sortTime);n&&e.push(n),t.hasRecordings&&e.push(`🎙️`),e.push(t.isOwner?`owner`:t.myRole),console.log(` ${t.title}`),console.log(` ${e.join(` · `)}`),t.processingStatus&&console.log(` processing: ${t.processingStatus}`),console.log(` ID: ${t.id}`),console.log(``)}}function o(e){if(console.log(`${e.title}\n`),console.log(` ID: ${e.id}`),console.log(` Status: ${e.status}`),console.log(` Visibility: ${e.visibility}`),console.log(` Source: ${e.source}`),e.myRole&&console.log(` My role: ${e.isOwner?`owner`:e.myRole}`),e.startTime&&console.log(` Start: ${r(e.startTime)}`),e.endTime&&console.log(` End: ${r(e.endTime)}`),e.location&&console.log(` Location: ${e.location}`),e.conferenceLink&&console.log(` Conference: ${e.conferenceLink}`),e.participants&&e.participants.length>0){console.log(` Participants (${e.participants.length}):`);for(let t of e.participants){let e=t.displayName??t.email;console.log(` - ${e}${t.role?` (${t.role})`:``}`)}}e.summary&&console.log(`\n Summary:\n${e.summary}`);let t=e.recordings??[];if(console.log(`\n Recordings (${t.length}):`),t.length===0){console.log(` (none)`);return}for(let e of t){let t=[];e.processingStatus&&t.push(e.processingStatus);let n=i(e.duration);n&&t.push(n),e.hasTranscript&&t.push(`transcript✓`),e.hasSummary&&t.push(`summary✓`),console.log(` - ${e.title}`),t.length>0&&console.log(` ${t.join(` · `)}`),console.log(` ID: ${e.id}`)}}function s(e){if(console.log(`Visibility: ${e.visibility}\n`),console.log(`User grants (${e.userGrants.length}):`),e.userGrants.length===0)console.log(` (none)`);else for(let t of e.userGrants)console.log(` - ${t.userName} <${t.userEmail}> · ${t.role}`),console.log(` ID: ${t.userId}`);if(console.log(`\nTeam grants (${e.teamGrants.length}):`),e.teamGrants.length===0)console.log(` (none)`);else for(let t of e.teamGrants)console.log(` - ${t.teamName} (${t.memberCount} members) · ${t.role}`),console.log(` ID: ${t.teamId}`)}async function c(e){let{accessToken:r,workspaceId:i}=await n(),o=new t,s={search:e.search,filter:e.filter,sortBy:e.sort};if(e.all){let t=[],n;for(let a=0;;a++){a>=100&&(console.error(`Reached maximum page limit (100). Use --limit and --next-key for manual pagination.`),process.exit(1));let c=await o.getMeetings(r,i,{limit:e.limit??20,nextKey:n,...s});if(t.push(...c.meetings),n=c.nextKey,!n)break}if(e.json){console.log(JSON.stringify({meetings:t}));return}if(t.length===0){console.log(`No meetings found in this workspace.`);return}a(t);return}let{meetings:c,nextKey:l}=await o.getMeetings(r,i,{limit:e.limit,nextKey:e.nextKey,...s});if(e.json){console.log(JSON.stringify({meetings:c,nextKey:l}));return}if(c.length===0){console.log(`No meetings found in this workspace.`);return}a(c),l&&console.log(`Next page: --next-key ${l}`)}async function l(e,r){let{accessToken:i,workspaceId:a}=await n(),s=await new t().getMeeting(i,a,e);if(r.json){console.log(JSON.stringify(s));return}o(s)}async function u(e){let{accessToken:r,workspaceId:i}=await n(),a={title:e.title};e.description!==void 0&&(a.description=e.description),e.location!==void 0&&(a.location=e.location),e.start!==void 0&&(a.startTime=e.start),e.end!==void 0&&(a.endTime=e.end),e.conferenceLink!==void 0&&(a.conferenceLink=e.conferenceLink),e.notes!==void 0&&(a.notes=e.notes);let o=await new t().createMeeting(r,i,a);if(e.json){console.log(JSON.stringify(o));return}console.log(`Created meeting: ${o.title}`),console.log(` ID: ${o.id}`)}async function d(e,r){let i={};r.title!==void 0&&(i.title=r.title),r.description!==void 0&&(i.description=r.description),r.location!==void 0&&(i.location=r.location),r.start!==void 0&&(i.startTime=r.start),r.end!==void 0&&(i.endTime=r.end),r.conferenceLink!==void 0&&(i.conferenceLink=r.conferenceLink),r.notes!==void 0&&(i.notes=r.notes),r.status!==void 0&&(i.status=r.status),r.visibility!==void 0&&(i.visibility=r.visibility),Object.keys(i).length===0&&(console.error(`No fields provided to update.`),process.exit(1));let{accessToken:a,workspaceId:o}=await n(),s=await new t().updateMeeting(a,o,e,i);if(r.json){console.log(JSON.stringify(s));return}console.log(`Updated meeting: ${e}`)}async function f(e,r){let{accessToken:i,workspaceId:a}=await n();if(await new t().deleteMeeting(i,a,e),r.json){console.log(JSON.stringify({id:e,deleted:!0}));return}console.log(`Deleted meeting: ${e}`)}async function p(r,i){let{accessToken:a,workspaceId:o}=await n(),s=e(await new t().getMeeting(a,o,r));if(i.json){console.log(JSON.stringify({summary:s??null}));return}s||(console.error(`This meeting has no summary yet.`),process.exit(1)),console.log(s)}async function m(e,r){let{accessToken:i,workspaceId:a}=await n(),o=await new t().getRecording(i,a,e),s=r.raw?o.transcriptWithTimestamps:o.transcript;if(r.json){console.log(JSON.stringify({transcript:s,processingStatus:o.processingStatus}));return}s||(console.error(o.processingStatus&&o.processingStatus!==`completed`?`Transcript not ready (processing status: ${o.processingStatus}).`:`This recording has no transcript.`),process.exit(1)),console.log(s)}async function h(e,i){let{accessToken:a,workspaceId:o}=await n(),{previous:s}=await new t().getMeetingPreviousBrief(a,o,e);if(i.json){console.log(JSON.stringify({previous:s}));return}if(!s){console.log(`No previous meeting found in this series.`);return}if(console.log(`Previous: ${s.title}`),s.startTime&&console.log(` ${r(s.startTime)}`),s.summary&&console.log(`\nSummary:\n${s.summary}`),s.actionItems.length>0){console.log(`
|
|
3
|
+
Action items:`);for(let e of s.actionItems){let t=e.completed?`[x]`:`[ ]`,n=e.assignee?` (@${e.assignee})`:``;console.log(` ${t} ${e.description}${n}`)}}}async function g(e,r){let{accessToken:i,workspaceId:a}=await n(),o=new t;if(r.addUser){let t=await o.upsertMeetingUserGrant(i,a,e,r.addUser,r.role);if(r.json){console.log(JSON.stringify(t));return}console.log(`Granted ${r.role} to user ${r.addUser}`);return}if(r.removeUser){if(await o.removeMeetingUserGrant(i,a,e,r.removeUser),r.json){console.log(JSON.stringify({userId:r.removeUser,removed:!0}));return}console.log(`Revoked access for user ${r.removeUser}`);return}if(r.addTeam){let t=await o.upsertMeetingTeamGrant(i,a,e,r.addTeam,r.role);if(r.json){console.log(JSON.stringify(t));return}console.log(`Granted ${r.role} to team ${r.addTeam}`);return}if(r.removeTeam){if(await o.removeMeetingTeamGrant(i,a,e,r.removeTeam),r.json){console.log(JSON.stringify({teamId:r.removeTeam,removed:!0}));return}console.log(`Revoked access for team ${r.removeTeam}`);return}if(r.visibility){let t=await o.updateMeeting(i,a,e,{visibility:r.visibility});if(r.json){console.log(JSON.stringify({visibility:t.visibility}));return}console.log(`Set visibility to ${t.visibility}`);return}let c=await o.getMeetingShares(i,a,e);if(r.json){console.log(JSON.stringify(c));return}s(c)}export{u as createMeeting,f as deleteMeeting,c as listMeetings,g as shareMeeting,l as showMeeting,p as showMeetingSummary,m as showMeetingTranscript,h as showPreviousMeeting,d as updateMeeting};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{b as e,l as t}from"./profile-storage-mtd3aKrx.js";async function n(n){let{accessToken:r,workspaceId:i}=await t(),{models:a}=await new e().listSelectableModels(r,i);if(n.json){console.log(JSON.stringify(a));return}if(a.length===0){console.log(`No models available in this workspace.`);return}console.log(`Available models (${a.length}):\n`);for(let e of a)console.log(` ${e.name}`),e.description&&console.log(` ${e.description.slice(0,80)}`),console.log(` ID: ${e.id}`),console.log(``)}export{n as runModels};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{b as e,l as t}from"./profile-storage-mtd3aKrx.js";function n(e){if(!e)return``;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function r(e,t){let n=e.replace(/\s+/g,` `).trim();return n.length>t?`${n.slice(0,t)}…`:n}function i(e){console.log(`Notifications (${e.length}):\n`);for(let t of e){let e=t.readAt?` `:`●`;console.log(` ${e} [${t.category}] ${t.rendered.title}`),t.rendered.body&&console.log(` ${r(t.rendered.body,100)}`);let i=n(t.createdAt);console.log(` ${i} · ${t.eventType} · ID: ${t.id}`),console.log(``)}}async function a(n){let{accessToken:r,workspaceId:a}=await t(),o=new e,s={tab:n.tab,eventType:n.eventType};if(n.all){let e=[],t;for(let i=0;;i++){i>=100&&(console.error(`Reached maximum page limit (100). Use --limit and --next-key for manual pagination.`),process.exit(1));let c=await o.getNotifications(r,a,{...s,limit:n.limit??20,cursor:t});if(e.push(...c.items),t=c.nextKey,!t)break}if(n.json){console.log(JSON.stringify({items:e}));return}if(e.length===0){console.log(`No notifications.`);return}i(e);return}let{items:c,nextKey:l}=await o.getNotifications(r,a,{...s,limit:n.limit,cursor:n.nextKey});if(n.json){console.log(JSON.stringify({items:c,nextKey:l}));return}if(c.length===0){console.log(`No notifications.`);return}i(c),l&&console.log(`Next page: --next-key ${l}`)}async function o(n){let{accessToken:r,workspaceId:i}=await t(),{count:a,capped:o}=await new e().getNotificationUnreadCount(r,i);if(n.json){console.log(JSON.stringify({count:a,capped:o??!1}));return}console.log(`${o?`${a}+`:a} unread`)}async function s(n,r){let{accessToken:i,workspaceId:a}=await t();if(await new e().markNotificationRead(i,a,n),r.json){console.log(JSON.stringify({id:n,read:!0}));return}console.log(`Marked notification read: ${n}`)}async function c(n){let{accessToken:r,workspaceId:i}=await t();if(await new e().markAllNotificationsRead(r,i),n.json){console.log(JSON.stringify({readAll:!0}));return}console.log(`Marked all notifications read.`)}export{a as listNotifications,c as markAllNotificationsRead,s as markNotificationRead,o as showUnreadCount};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{C as e}from"./profile-storage-mtd3aKrx.js";import t from"node:fs";import n from"node:os";import r from"node:path";const i=`.entrydesk`;function a(){return{version:1,skills:{}}}function o(e){return r.join(e,i,`skills-lock.json`)}function s(e){try{let n=JSON.parse(t.readFileSync(o(e),`utf8`));return n.version!==1||typeof n.skills!=`object`||n.skills===null?a():n}catch{return a()}}function c(e,n){let i={};for(let e of Object.keys(n.skills).toSorted())i[e]=n.skills[e];let a={version:1,...n.workspaceId?{workspaceId:n.workspaceId}:{},skills:i},s=o(e);t.mkdirSync(r.dirname(s),{recursive:!0}),t.writeFileSync(s,`${JSON.stringify(a,null,2)}\n`,`utf8`)}function l(e,t){return s(e).skills[t]}function u(e,t,n){let r=s(e);r.skills[t]=n,c(e,r)}function d(e,t){let n=s(e);if(!(t in n.skills))return!1;let{[t]:r,...i}=n.skills;return c(e,{...n,skills:i}),!0}function f(e){try{let n=JSON.parse(t.readFileSync(e,`utf8`));return typeof n.workspaceId!=`string`||n.workspaceId===``?void 0:n}catch{return}}function p(e,n){t.mkdirSync(r.dirname(e),{recursive:!0}),t.writeFileSync(e,`${JSON.stringify(n,null,2)}\n`,`utf8`)}function m(e){return t.existsSync(e)?(t.rmSync(e),!0):!1}function h(e){return r.join(e,i,`project.json`)}function g(){return r.join(n.homedir(),i,`global-link.json`)}function _(){return f(g())}function v(e){p(g(),e)}function y(){return m(g())}function b(e=process.cwd()){let n=r.resolve(e);for(;;){if(t.existsSync(h(n)))return n;let e=r.dirname(n);if(e===n)return;n=e}}function x(e){return f(h(e))}function S(e,t){p(h(e),t)}function C(e){return m(h(e))}function w(e=process.cwd()){let t=b(e);if(!t)return;let n=x(t);return n?{rootDir:t,link:n}:void 0}function T(t){let n=e();if(t&&n&&t!==n)throw Error(`This directory is linked to a workspace on ${t}, but the active profile points at ${n}. Re-run 'entrydesk skills link' or switch profile.`)}function E(){process.env.ENTRYDESK_API_URL&&console.error(`Note: the recorded apiUrl comes from the ENTRYDESK_API_URL environment variable. This link pins the directory to that API — if the override was temporary, re-run the link without it.`)}function D(e,t){if(e){let e=n.homedir(),r=_();return r?(T(r.apiUrl),{rootDir:e,workspaceId:r.workspaceId,linked:!0}):{rootDir:e,workspaceId:t,linked:!1}}let r=w(process.cwd());return r?(T(r.link.apiUrl),{rootDir:r.rootDir,workspaceId:r.link.workspaceId,linked:!0}):{rootDir:process.cwd(),workspaceId:t,linked:!1}}const O=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u;function k(e){if(!O.test(e))throw Error(`Invalid skill name "${e}": must be lowercase letters, digits and single hyphens (e.g. "my-skill").`)}function A(e,t){k(t);let n=r.resolve(e,`.entrydesk`,`skills`),i=r.resolve(n,t);if(i!==r.join(n,t)||!i.startsWith(n+r.sep))throw Error(`Refusing unsafe skill path for "${t}".`);return i}export{b as a,y as c,S as d,l as f,u as h,E as i,C as l,d as m,A as n,g as o,s as p,D as r,h as s,k as t,v as u};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{O as e,S as t,r as n,t as r}from"./profile-storage-mtd3aKrx.js";function i(e,t){let i=e??t.profile;if(i)return i;if(r.getProfileCount()===1)return r.getProfileNames()[0];throw new n(`Profile name is required when multiple profiles exist.`)}function a(e){let t=r.getCurrentProfileName(),n=r.getProfileNames();if(e.json){console.log(JSON.stringify({currentProfile:t,profiles:n.map(e=>({name:e,isCurrent:e===t}))}));return}console.log(`Profiles (${n.length}):`);for(let e of n)console.log(` ${e}${e===t?` (current)`:``}`)}function o(e){let t=r.getCurrentProfileName();if(e.json){console.log(JSON.stringify({name:t,isCurrent:!0}));return}console.log(`Current profile: ${t}`)}async function s(n,a){let o=i(n,a),s=e.getAll(o),c=await t.getAll(o),l=!!c?.accessToken,u=o===r.getCurrentProfileName();if(a.json){console.log(JSON.stringify({name:o,isCurrent:u,config:s,auth:l?{loggedIn:!0,email:c?.email??null,workspaceId:c?.workspaceId??null}:{loggedIn:!1}}));return}console.log(`Profile: ${o}${u?` (current)`:``}`),console.log(` API URL: ${s.apiUrl??`default`}`),console.log(` Hub URL: ${s.hubUrl??`default`}`),console.log(` Model: ${s.model?.default??`unset`}`);let d=s.connectors?.defaults&&s.connectors.defaults.length>0?s.connectors.defaults.join(`, `):`unset`;console.log(` Connectors: ${d}`),console.log(l?` Logged in as: ${c?.email??`unknown`}`:` Not logged in`),l&&c?.workspaceId&&console.log(` Workspace ID: ${c.workspaceId}`)}function c(e,t){let n=e??t.profile??r.DEFAULT_PROFILE;if(r.createProfile(n),t.json){console.log(JSON.stringify({name:n,created:!0}));return}console.log(`Profile created: ${n}`)}function l(e,t){let n=i(e,t);if(r.setCurrentProfile(n),t.json){console.log(JSON.stringify({name:n,current:!0}));return}console.log(`Switched to profile: ${n}`)}async function u(e,n){let a=i(e,n),o=r.deleteProfile(a);if(await t.deleteProfileCredentials(a),n.json){console.log(JSON.stringify({deleted:a,currentProfile:o.currentProfile}));return}console.log(`Profile deleted: ${a}`),console.log(`Current profile: ${o.currentProfile}`)}async function d(e,n,i){let a=r.renameProfile(e,n);if(await t.moveProfileCredentials(e,n),i.json){console.log(JSON.stringify({renamed:e,name:n,currentProfile:a.currentProfile}));return}console.log(`Profile renamed: ${e} -> ${n}`),console.log(`Current profile: ${a.currentProfile}`)}async function f(n,i,a){let o=e.getAll(n);if(r.createProfile(i),e.setAll(o,i),await t.clear(i),a.json){console.log(JSON.stringify({source:n,name:i,cloned:!0}));return}console.log(`Profile cloned: ${n} -> ${i}`)}export{f as cloneProfile,c as createProfile,u as deleteProfile,a as listProfiles,d as renameProfile,o as showCurrentProfile,s as showProfile,l as useProfile};
|