@entrydesk/cli 2.1.0 → 2.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +127 -29
- package/dist/add-BJv6tPO-.js +10 -0
- package/dist/agents-fP3hIH7X.js +10 -0
- package/dist/billing-Cy0BYngu.js +10 -0
- package/dist/budget-MVbF8WbS.js +10 -0
- package/dist/{build-task-request-config-C62XneUL.js → build-task-request-config-BzI-dDZP.js} +1 -1
- package/dist/commands-CfDSEDKI.js +10 -0
- package/dist/{commands-D5BrzwFc.js → commands-DU48SG8W.js} +1 -1
- package/dist/config-Cl-c7scx.js +11 -0
- package/dist/connectors-DVzXDbUU.js +11 -0
- package/dist/file-upload-Dq6B0x4m.js +24 -0
- package/dist/format-CIj0qQba.js +10 -0
- package/dist/{hash-CnSb1n2t.js → hash-92fWniGT.js} +1 -1
- package/dist/index.js +46 -26
- package/dist/{instruction-BzftVNfK.js → instruction-6ZWRQh4G.js} +1 -1
- package/dist/login-CO1aBG6c.js +10 -0
- package/dist/{logout-BFFnjWjY.js → logout-WKIZVWJ7.js} +1 -1
- package/dist/marketplace-C0C2JpYf.js +12 -0
- package/dist/{mcp-D2zejorr.js → mcp-CqMrd5AI.js} +2 -2
- package/dist/{mcp-client-ltOwvE7T.js → mcp-client-CEH9X7Vs.js} +1 -1
- package/dist/meeting-C5vHfcTw.js +11 -0
- package/dist/message-utils-D48Yqd9T.js +25 -0
- package/dist/models-BENTHton.js +11 -0
- package/dist/notifications-DdadH0Wc.js +10 -0
- package/dist/{paginate-C9ixtica.js → paginate-Cbe4RaEq.js} +1 -1
- package/dist/paths-BiowKnkz.js +10 -0
- package/dist/profile-hhU_G-Ea.js +10 -0
- package/dist/profile-storage-CKrZ-xsd.js +73 -0
- package/dist/{project-context-C0ozCzKH.js → project-context-DeYepfN2.js} +1 -1
- package/dist/project-governance-R__UPIhr.js +10 -0
- package/dist/{project-sources-DFn7Tn7u.js → project-sources-C-MXx6j-.js} +1 -1
- package/dist/project-sources-write-ygvHaDUu.js +10 -0
- package/dist/project-tasks-B0STK_8Q.js +10 -0
- package/dist/project-xiz3Jopl.js +10 -0
- package/dist/{push-mojEdys2.js → push-BxQQWCZ2.js} +1 -1
- package/dist/recordings-68Oe1Kvd.js +11 -0
- package/dist/remove-C7BCBdoq.js +10 -0
- package/dist/resolve-IOW00hfy.js +14 -0
- package/dist/resource-grants-Bb4evqsH.js +10 -0
- package/dist/schedules-wopieg4D.js +29 -0
- package/dist/skills-Drr0gw-l.js +10 -0
- package/dist/status-Bw2E5bfa.js +10 -0
- package/dist/status-DX6A6ugk.js +10 -0
- package/dist/task-bZNZ_yxV.js +116 -0
- package/dist/tasks-ZC9uSdkB.js +22 -0
- package/dist/{tasks-CA2QZ8rX.js → tasks-lK8PTMnE.js} +1 -1
- package/dist/team-8-enl9cj.js +11 -0
- package/dist/teams-ByeuT2Ks.js +10 -0
- package/dist/terminal-text-cBPBiP3x.js +10 -0
- package/dist/{isRecord-BNZWvqVS.js → token-DrAF7BWj.js} +1 -1
- package/dist/tool-82NKBr29.js +17 -0
- package/dist/update-DfOBWme1.js +10 -0
- package/dist/usage-BS_didkP.js +11 -0
- package/dist/usage-audit-DOuyWGaq.js +12 -0
- package/dist/{version-C1OwBsCd.js → version-D7DOD1ug.js} +1 -1
- package/dist/webhook-Da2l-gv6.js +11 -0
- package/dist/workflow-oudE3gsp.js +14 -0
- package/dist/workspaces-9SRfDSh3.js +11 -0
- package/package.json +8 -7
- package/dist/add-D4yZrlJH.js +0 -10
- package/dist/agents-3dOJzTmM.js +0 -10
- package/dist/billing-Cyk-IzGv.js +0 -10
- package/dist/budget-znTQ0rkG.js +0 -10
- package/dist/commands--5Ein-MI.js +0 -10
- package/dist/config-D-9dIy19.js +0 -11
- package/dist/connectors-B7smri5B.js +0 -11
- package/dist/file-upload-D2s_clGk.js +0 -24
- package/dist/format-DCvznP70.js +0 -10
- package/dist/login-Ch3S9nh6.js +0 -10
- package/dist/marketplace-DNm78dKX.js +0 -12
- package/dist/meeting-BdLr54zK.js +0 -11
- package/dist/message-utils-DiNLK_84.js +0 -15
- package/dist/models-6WioEQKB.js +0 -11
- package/dist/notifications-DIokyl4e.js +0 -10
- package/dist/paths-CZAS8cbS.js +0 -10
- package/dist/profile-CWsA2P_O.js +0 -10
- package/dist/profile-storage-CuiJZpFD.js +0 -68
- package/dist/project-c8F30d-Q.js +0 -10
- package/dist/project-governance-DRDjqvX8.js +0 -10
- package/dist/project-sources-write-Bz0lGCid.js +0 -10
- package/dist/project-tasks-DnOrMxr3.js +0 -10
- package/dist/recordings-BbeRVH0H.js +0 -11
- package/dist/remove-BLF3muSH.js +0 -10
- package/dist/resolve-BoqGhxVK.js +0 -14
- package/dist/resource-grants-CtIINiDN.js +0 -10
- package/dist/schedules-ec4cS2A0.js +0 -29
- package/dist/skills-C0xCUb-M.js +0 -10
- package/dist/status-Bfh5hjTq.js +0 -10
- package/dist/status-DpYhlJPA.js +0 -10
- package/dist/task-DfLoMsmZ.js +0 -108
- package/dist/tasks-Bl8A2HW6.js +0 -22
- package/dist/tool-B8CuZYYb.js +0 -17
- package/dist/update-BVBj3leV.js +0 -10
- package/dist/usage-CIhTZm98.js +0 -11
- package/dist/usage-audit-BUcbqdAc.js +0 -12
- package/dist/workflow-DJSq8hY5.js +0 -14
- package/dist/workspaces-BM_3Miqs.js +0 -11
package/README.md
CHANGED
|
@@ -43,8 +43,29 @@ entrydesk
|
|
|
43
43
|
entrydesk login # OAuth device flow — prints a verification URL + code to enter
|
|
44
44
|
entrydesk status
|
|
45
45
|
entrydesk logout
|
|
46
|
+
entrydesk token # Print a fresh access token for scripts
|
|
46
47
|
```
|
|
47
48
|
|
|
49
|
+
### Scripting with the access token
|
|
50
|
+
|
|
51
|
+
`entrydesk token` prints a valid access token and nothing else, refreshing the
|
|
52
|
+
stored session first when it is about to expire, so scripts and CI can call the
|
|
53
|
+
API directly without reading the keychain:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
entrydesk token --json # {"token":"…","expiresAt":"…","workspaceId":"…"}
|
|
57
|
+
WORKSPACE_ID=$(entrydesk token --json | jq -r .workspaceId)
|
|
58
|
+
curl -H "Authorization: Bearer $(entrydesk token)" \
|
|
59
|
+
"https://api.entrydesk.com/v1/workspaces/$WORKSPACE_ID/agents"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Call workspace-scoped endpoints (`/v1/workspaces/<id>/...`) with the printed
|
|
63
|
+
token: a personal access token (`ENTRYDESK_TOKEN`) is only accepted there, and
|
|
64
|
+
account-level endpoints such as `/v1/workspaces` reject it with 403.
|
|
65
|
+
`expiresAt` is read from the token itself and omitted when it carries none;
|
|
66
|
+
when `ENTRYDESK_TOKEN` is set, that token is printed as-is. The token is a
|
|
67
|
+
bearer credential for your account — keep it out of logs and shared output.
|
|
68
|
+
|
|
48
69
|
### Credential Storage
|
|
49
70
|
|
|
50
71
|
By default, EntryDesk CLI stores credentials in the OS keychain when available.
|
|
@@ -200,11 +221,18 @@ equivalent:
|
|
|
200
221
|
entrydesk project note 2 -m "Shipped the retry fix"
|
|
201
222
|
entrydesk project note 2 -f ./summary.md
|
|
202
223
|
git log -1 | entrydesk project note 2 --title "Fixed the login race"
|
|
224
|
+
entrydesk project note 2 -m "Audit: 3 docs lack an owner" --visibility project
|
|
203
225
|
```
|
|
204
226
|
|
|
227
|
+
`--visibility project` shares the note with every current project member as it
|
|
228
|
+
is filed and notifies them. The workspace sharing policy and the
|
|
229
|
+
sensitive-content check still apply; if either blocks the share, the note is
|
|
230
|
+
still filed privately and the output says why.
|
|
231
|
+
|
|
205
232
|
It prints the new task's id and a Hub link; `--json` returns
|
|
206
|
-
`{ "taskId", "projectId", "url" }
|
|
207
|
-
|
|
233
|
+
`{ "taskId", "projectId", "visibility", "url" }`, plus `shareLink` when the
|
|
234
|
+
note was shared, or `shareFailure` (the server's error code) when it was not.
|
|
235
|
+
Reach for `task --project` above whenever you want the AI to answer instead.
|
|
208
236
|
|
|
209
237
|
### Tasks in a project
|
|
210
238
|
|
|
@@ -223,6 +251,8 @@ entrydesk project task-add 1 <taskId> --confirm-asset-sharing
|
|
|
223
251
|
entrydesk project task-remove 1 <taskId> # Move it out; its assets stay
|
|
224
252
|
entrydesk project task-share 1 <taskId> --add-user <userId>
|
|
225
253
|
entrydesk project task-share 1 <taskId> --remove-user <userId>
|
|
254
|
+
entrydesk project task-share 1 <taskId> --add-team "Design"
|
|
255
|
+
entrydesk project task-share 1 <taskId> --remove-team <teamId>
|
|
226
256
|
entrydesk project task-share 1 <taskId> --visibility project
|
|
227
257
|
entrydesk project task-share 1 <taskId> --visibility self
|
|
228
258
|
```
|
|
@@ -237,17 +267,21 @@ history; only the task moves.
|
|
|
237
267
|
|
|
238
268
|
`task-share` does one thing per call and never prompts. `--add-user` and
|
|
239
269
|
`--remove-user` name one project member by id (`project get <project> --json`
|
|
240
|
-
lists the members with theirs); `--
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
270
|
+
lists the members with theirs); `--add-team` and `--remove-team` name one team
|
|
271
|
+
that is already in the project, by id or by name (`project members <project>`
|
|
272
|
+
lists them), and everyone in that team can view the task, read-only;
|
|
273
|
+
`--visibility project` opens the task to every member and `--visibility self`
|
|
274
|
+
closes it again, keeping whoever you named. The five flags are mutually
|
|
275
|
+
exclusive and each needs its value; with none of them the command prints the
|
|
276
|
+
usage and exits 1. A task has to be in the project you
|
|
244
277
|
name — `task-share` and `task-remove` refuse one that is elsewhere rather than
|
|
245
278
|
acting on the project it is actually in.
|
|
246
279
|
|
|
247
280
|
`project tasks` reads with `tasks:read`; the three that write need
|
|
248
281
|
`tasks:write`, and `task-remove` and `task-share` also read the task first with
|
|
249
|
-
`tasks:read`.
|
|
250
|
-
|
|
282
|
+
`tasks:read`. `--add-team` and `--remove-team` also read the project's teams,
|
|
283
|
+
which needs `projects:read`. A project you are not a member of answers
|
|
284
|
+
`Project not found` from all four.
|
|
251
285
|
|
|
252
286
|
### Sources and context
|
|
253
287
|
|
|
@@ -286,9 +320,20 @@ entrydesk project sources-add 1 https://example.com/spec
|
|
|
286
320
|
entrydesk project sources-edit 1 file <fileId> --description "Signed-off scope"
|
|
287
321
|
entrydesk project sources-edit 1 file <fileId> --title "Launch brief" # How the AI names it
|
|
288
322
|
entrydesk project sources-refetch 1 <linkId> # Snapshot goes back to pending
|
|
323
|
+
entrydesk project sources-replace 1 <fileId> ./brief.md --expected-version 3
|
|
289
324
|
entrydesk project sources-rm 1 link <linkId>
|
|
290
325
|
```
|
|
291
326
|
|
|
327
|
+
`sources-replace` swaps a file's content in place: its id, title and
|
|
328
|
+
description stay, and its version number goes up by one. Pass the version
|
|
329
|
+
`project sources` showed when you read the file. If someone replaced it since,
|
|
330
|
+
nothing changes: the command exits 1 and names the current version, who saved
|
|
331
|
+
it and a URL to read it from. Under `--json` the error carries
|
|
332
|
+
`code: "project_file_version_conflict"` and the same details under `data`. The
|
|
333
|
+
CLI never retries a replace on its own, so a conflict always means someone
|
|
334
|
+
else's write. Merge your change into that content and replace again with that
|
|
335
|
+
version. The replaced content is kept as an earlier version, up to the latest 20.
|
|
336
|
+
|
|
292
337
|
A link starts fetching its snapshot as soon as it is added, and `sources-refetch`
|
|
293
338
|
starts that over, so both report it as `pending`; `project sources` shows when
|
|
294
339
|
it is `ready`. Re-fetching a link whose fetch is still in flight is refused
|
|
@@ -343,10 +388,12 @@ the same rules the Hub applies. Whoever creates it is its owner:
|
|
|
343
388
|
```bash
|
|
344
389
|
entrydesk project create --name "Q4 Launch" --description "Launch coordination"
|
|
345
390
|
cat brief.md | entrydesk project create --name "Q4 Launch" --instruction-file -
|
|
346
|
-
entrydesk project members 1 # Each member, role and id
|
|
391
|
+
entrydesk project members 1 # Each member, role and id, then each team
|
|
347
392
|
entrydesk project member-add 1 <userId> # Takes effect at once
|
|
348
393
|
entrydesk project member-role 1 <userId> --role owner
|
|
349
394
|
entrydesk project member-remove 1 <userId> # Your own id leaves the project
|
|
395
|
+
entrydesk project team-add 1 --team "Design" # Everyone in the team, now and later
|
|
396
|
+
entrydesk project team-remove 1 --team <teamId>
|
|
350
397
|
entrydesk project delete 1 # Lists what goes, then asks
|
|
351
398
|
entrydesk project delete 1 -y # No prompt
|
|
352
399
|
```
|
|
@@ -366,6 +413,22 @@ someone else first. Each refusal comes back as its own message, and with
|
|
|
366
413
|
are not in is `Project not found` for every one of these commands, exactly as
|
|
367
414
|
it is for `get`.
|
|
368
415
|
|
|
416
|
+
A team in a project makes everyone in it a member, and anyone who joins the team
|
|
417
|
+
later too; the team is always a member, never an owner. `project members` lists
|
|
418
|
+
the teams after the members, each with its size, visibility and id, and
|
|
419
|
+
`--json` carries them as `teams[]` beside `members[]`. A hidden team you are not
|
|
420
|
+
in shows as `locked`: its name and size, never who is in it. `team-add` and
|
|
421
|
+
`team-remove` take `--team` as an id or a name. A name has to match exactly,
|
|
422
|
+
case included — team names are unique in a workspace, so an exact name is
|
|
423
|
+
never ambiguous. A name that only matches in a different case is never picked:
|
|
424
|
+
the command fails with `project_team_not_found` and lists the similar names
|
|
425
|
+
with their ids as hints. `team-add` checks the project's own teams first, so a
|
|
426
|
+
name already in the project is `project_team_already_added`. Only an owner can add or remove a
|
|
427
|
+
team, and a hidden team can only be added by one of its own members
|
|
428
|
+
(`project_team_not_found` otherwise, and for a team that is already gone);
|
|
429
|
+
adding one twice is `project_team_already_added`. Both need `projects:write`;
|
|
430
|
+
`team-remove`, and `team-add` given a name, also read with `projects:read`.
|
|
431
|
+
|
|
369
432
|
Deleting a project detaches its tasks, which return to their owners' main
|
|
370
433
|
lists, and deletes its sources, its assets and every version in their history.
|
|
371
434
|
Without `-y` the command prints those effects for the project in question and
|
|
@@ -487,12 +550,21 @@ entrydesk agents --json # Output in JSON format
|
|
|
487
550
|
entrydesk agents create --name "My Agent" --description "..." --system-prompt "..." --model-id <modelId>
|
|
488
551
|
entrydesk agents update <agentId> --name "New Name" --description "..." --system-prompt "..." --model-id <modelId>
|
|
489
552
|
entrydesk agents delete <agentId>
|
|
553
|
+
|
|
554
|
+
# Icons: give an agentId to apply the icon to that agent, or omit it to only print the iconId and URL
|
|
555
|
+
entrydesk agents icon generate <agentId> # AI icon from the agent's name and description
|
|
556
|
+
entrydesk agents icon generate --name "Bot" --description "..." # Icon for --icon-id on create/update
|
|
557
|
+
entrydesk agents icon upload ./icon.png <agentId> # PNG, JPEG, GIF, or WebP, up to 10MB
|
|
558
|
+
# generate falls back to the system prompt when the agent has no description.
|
|
559
|
+
# Applying an icon fails instead of overwriting if someone edits the agent meanwhile;
|
|
560
|
+
# the error prints the `agents update <agentId> --icon-id <iconId>` command to apply it.
|
|
490
561
|
```
|
|
491
562
|
|
|
492
563
|
## Meetings and Recordings
|
|
493
564
|
|
|
494
565
|
```bash
|
|
495
566
|
entrydesk meeting # List meetings
|
|
567
|
+
entrydesk meeting record https://meet.google.com/abc-defg-hij # Send a recording bot into the call now
|
|
496
568
|
entrydesk meeting get <meetingId> # Details and its recordings
|
|
497
569
|
entrydesk meeting summary <meetingId> # Print the summary as markdown
|
|
498
570
|
entrydesk meeting transcript <recordingId> # Print a transcript (--raw for timestamps)
|
|
@@ -526,6 +598,27 @@ entrydesk schedules pause <scheduleId>
|
|
|
526
598
|
entrydesk schedules runs <scheduleId> # Run history
|
|
527
599
|
```
|
|
528
600
|
|
|
601
|
+
## Webhooks
|
|
602
|
+
|
|
603
|
+
Outgoing webhook destinations, for environments where an operator has enabled them. Managing them needs the Manage workspace permission.
|
|
604
|
+
|
|
605
|
+
```bash
|
|
606
|
+
entrydesk webhook # List destinations
|
|
607
|
+
entrydesk webhook event-types # Event types you can subscribe to
|
|
608
|
+
entrydesk webhook create --url https://hooks.example.com/entrydesk --name BPM \
|
|
609
|
+
--events budget.limit_reached,budget.threshold_reached # or --all-events
|
|
610
|
+
entrydesk webhook test <id> # Send destination.test_sent now
|
|
611
|
+
entrydesk webhook deliveries <id> --status failed
|
|
612
|
+
entrydesk webhook delivery <id> <deliveryId>
|
|
613
|
+
entrydesk webhook resend <id> <deliveryId>
|
|
614
|
+
entrydesk webhook rotate-secret <id> --expire-previous 24h # or now
|
|
615
|
+
entrydesk webhook update <id> --name "BPM (prod)"
|
|
616
|
+
entrydesk webhook disable <id> # enable <id> resumes
|
|
617
|
+
entrydesk webhook delete <id> --yes
|
|
618
|
+
```
|
|
619
|
+
|
|
620
|
+
Write commands need the `workspaces:write` scope; a session from before this release lacks it, so run `entrydesk login` once. `create` and `rotate-secret` print the signing secret only once. Each request carries `X-ED-Timestamp` and `X-ED-Signature: v1=<hex>`, where the hex is HMAC-SHA256 of `"{X-ED-Timestamp}.{raw body}"`.
|
|
621
|
+
|
|
529
622
|
## Notifications
|
|
530
623
|
|
|
531
624
|
```bash
|
|
@@ -561,18 +654,25 @@ Billing endpoints require an interactive login — a workspace PAT
|
|
|
561
654
|
|
|
562
655
|
## Configuration
|
|
563
656
|
|
|
657
|
+
Server URLs live in the profile. `profile set` writes the current profile;
|
|
658
|
+
add `--profile <name>` to write another one without switching. The older
|
|
659
|
+
`entrydesk config list|get|set|unset` still works but is deprecated: it prints a
|
|
660
|
+
warning naming the `profile` command to use and will be removed in a future
|
|
661
|
+
release.
|
|
662
|
+
|
|
564
663
|
```bash
|
|
565
|
-
entrydesk
|
|
566
|
-
entrydesk
|
|
567
|
-
entrydesk
|
|
568
|
-
entrydesk
|
|
664
|
+
entrydesk profile show
|
|
665
|
+
entrydesk profile set apiUrl http://localhost:3200
|
|
666
|
+
entrydesk profile set hubUrl http://localhost:3000 --profile local
|
|
667
|
+
entrydesk profile get apiUrl
|
|
668
|
+
entrydesk profile unset apiUrl
|
|
569
669
|
```
|
|
570
670
|
|
|
571
671
|
When only `hubUrl` is set, the CLI asks that Hub where its API lives
|
|
572
672
|
(`GET <hubUrl>/.well-known/entrydesk/client`) the first time a command sends an
|
|
573
673
|
API request, and caches the answer per Hub in `~/.entrydesk/hub-discovery.json`
|
|
574
674
|
for five minutes; the profile config is left untouched. Commands that never
|
|
575
|
-
call the API (`
|
|
675
|
+
call the API (`profile`, `config`, `version`) do not contact the Hub, and
|
|
576
676
|
`entrydesk status` shows the API as resolved on first request until then.
|
|
577
677
|
`entrydesk logout` does reach the API to revoke the session, so it resolves
|
|
578
678
|
the URL, and it clears the local credentials either way.
|
|
@@ -585,22 +685,16 @@ set, the CLI uses `https://app.entrydesk.com` and `https://api.entrydesk.com`.
|
|
|
585
685
|
|
|
586
686
|
### Running Against a Local API
|
|
587
687
|
|
|
588
|
-
Point the CLI at a locally running API for one command, or
|
|
589
|
-
|
|
688
|
+
Point the CLI at a locally running API for one command, or create a profile
|
|
689
|
+
for it. A profile of its own keeps local credentials apart from the ones you
|
|
690
|
+
use against production, and `create` switches to it and logs in in one go:
|
|
590
691
|
|
|
591
692
|
```bash
|
|
592
693
|
ENTRYDESK_API_URL=http://localhost:3200 entrydesk status # one invocation
|
|
593
|
-
entrydesk
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
Keep local work in its own profile so it cannot overwrite the credentials you
|
|
599
|
-
use against production:
|
|
600
|
-
|
|
601
|
-
```bash
|
|
602
|
-
entrydesk profile create local
|
|
603
|
-
entrydesk profile use local
|
|
694
|
+
entrydesk profile create local \
|
|
695
|
+
--api-url http://localhost:3200 \
|
|
696
|
+
--hub-url http://localhost:3000 \
|
|
697
|
+
--login
|
|
604
698
|
```
|
|
605
699
|
|
|
606
700
|
If the local API serves a self-signed certificate, add
|
|
@@ -670,9 +764,13 @@ scope together, and refuse with the missing ones named otherwise.
|
|
|
670
764
|
|
|
671
765
|
```bash
|
|
672
766
|
entrydesk profile # List profiles
|
|
673
|
-
entrydesk profile create staging # Create a profile
|
|
767
|
+
entrydesk profile create staging # Create a profile and switch to it
|
|
768
|
+
entrydesk profile create staging --hub-url https://stage.gntc.io --login
|
|
769
|
+
entrydesk profile create staging --no-use # Create without switching
|
|
770
|
+
entrydesk profile create staging --no-use --login # Log in to it, stay on the current one
|
|
674
771
|
entrydesk profile use staging # Switch active profile
|
|
675
|
-
entrydesk profile show staging # Show profile details
|
|
772
|
+
entrydesk profile show staging # Show profile details (URLs, model, login)
|
|
773
|
+
entrydesk profile set apiUrl <url> # Set a value on the current profile
|
|
676
774
|
entrydesk profile clone default staging # Clone config defaults (no credentials)
|
|
677
775
|
entrydesk profile rename staging qa # Rename a profile (credentials follow)
|
|
678
776
|
entrydesk profile delete staging
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var __entrydeskNodeFloor = 24;
|
|
3
|
+
if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
4
|
+
process.stderr.write(
|
|
5
|
+
'entrydesk: Node.js ' + __entrydeskNodeFloor + ' or newer is required, but this is Node ' + process.versions.node + '.\n' +
|
|
6
|
+
'Upgrade Node (https://nodejs.org/en/download), then reinstall @entrydesk/cli.\n'
|
|
7
|
+
);
|
|
8
|
+
process.exit(1);
|
|
9
|
+
}
|
|
10
|
+
import{I as e}from"./profile-storage-CKrZ-xsd.js";import{t}from"./terminal-text-cBPBiP3x.js";import{a as n,d as r,f as i,g as a,i as o,r as s}from"./paths-BiowKnkz.js";import{t as c}from"./hash-92fWniGT.js";import{r as l}from"./installer-CKB3jBE-.js";import{t as u}from"./remote-D3JMUBbh.js";import d from"node:fs";import f from"node:os";import p from"node:path";import m from"cross-spawn";function h(e,t){let n=p.dirname(e);d.mkdirSync(n,{recursive:!0});let r=d.mkdtempSync(p.join(n,`.${p.basename(e)}.tmp-`)),i=p.join(r,`next`),a=p.join(r,`prev`);d.mkdirSync(i,{recursive:!0});let o=!1;try{t(i),d.existsSync(e)&&(d.renameSync(e,a),o=!0),d.renameSync(i,e)}catch(t){throw o&&!d.existsSync(e)&&d.renameSync(a,e),t}finally{d.rmSync(r,{recursive:!0,force:!0})}}const g=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu,_=/^([\w.-]+)\/([\w.-]+)(?:\/(.+))?$/u;function v(e){return e===`~`?f.homedir():e.startsWith(`~/`)||e.startsWith(`~\\`)?p.join(f.homedir(),e.slice(2)):e}function y(e){return e.startsWith(`./`)||e.startsWith(`../`)||e.startsWith(`/`)||e.startsWith(`~`)||e.startsWith(`.\\`)||/^[a-zA-Z]:[\\/]/u.test(e)}function b(e){let[,t,n,r,i]=/^https?:\/\/github\.com\/([\w.-]+)\/([\w.-]+?)(?:\.git)?(?:\/tree\/([^/]+)(?:\/(.+))?)?\/?$/u.exec(e)??[];return t===void 0||n===void 0?null:{type:`github`,owner:t,repo:n,gitRef:r,subpath:i,url:`https://github.com/${t}/${n}`}}function x(e){let t=e.trim();if(y(t))return{type:`local`,path:p.resolve(v(t))};if(t.startsWith(`ed:`)){let e=t.slice(3);return{type:`entrydesk`,ref:e,isId:g.test(e)}}if(g.test(t))return{type:`entrydesk`,ref:t,isId:!0};if(t.startsWith(`git@`)||t.endsWith(`.git`))return{type:`git`,url:t};let n=b(t);if(n)return n;if(/^https?:\/\//u.test(t))return{type:`git`,url:t};let[,r,i,a]=_.exec(t)??[];return r!==void 0&&i!==void 0?{type:`github`,owner:r,repo:i,subpath:a,url:`https://github.com/${r}/${i}`}:{type:`entrydesk`,ref:t,isId:!1}}function S(e){return e.type===`github`?`github`:e.type}const C=new Set([`.git`,`node_modules`,`__pycache__`,`.DS_Store`,`.entrydesk`]);function w(e,t){if(!d.existsSync(p.join(e,`SKILL.md`)))throw Error(`No SKILL.md found at ${e}`);let n=d.realpathSync(e);if(n===(d.existsSync(t)?d.realpathSync(t):p.resolve(t)))return;let r=d.mkdtempSync(p.join(f.tmpdir(),`ed-local-skill-`)),i=p.join(r,`skill`);try{d.cpSync(n,i,{recursive:!0,filter:e=>!C.has(p.basename(e))}),h(t,e=>{d.cpSync(i,e,{recursive:!0})})}finally{d.rmSync(r,{recursive:!0,force:!0})}}function T(e){try{let t=d.readFileSync(p.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 p.basename(e)}async function E(e,t){let{default:n}=await import(`adm-zip`),r=new n(e);h(t,e=>{let t=p.resolve(e)+p.sep;for(let n of r.getEntries()){if(n.isDirectory)continue;let r=p.resolve(e,n.entryName);if(!r.startsWith(t))throw Error(`Zip entry contains path traversal: ${n.entryName}`);d.mkdirSync(p.dirname(r),{recursive:!0}),d.writeFileSync(r,n.getData())}})}async function D(e,t){if(t.isId)return t.ref;let n=(await u(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 O(e,t,n){let r=d.mkdtempSync(p.join(f.tmpdir(),`ed-npx-skills-`)),i=[`-y`,`skills@1.5.12`,`add`,e,`--copy`,`--yes`];try{let e=m.sync(`npx`,i,{cwd:r,stdio:n?[`ignore`,`pipe`,`pipe`]:`inherit`});if(e.error)throw e.error;if(e.status!==0){let t=e.stderr?.toString().trim();throw Error(`npx exited with code ${e.status??`null`}${t?`: ${t}`:``}`)}}catch(t){throw d.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=p.join(r,`.agents`,`skills`);if(!d.existsSync(a))throw d.rmSync(r,{recursive:!0,force:!0}),Error(`npx skills produced no skills under ${a}`);let o=d.readdirSync(a,{withFileTypes:!0}).filter(e=>e.isDirectory()),[s]=o;if(s===void 0)throw d.rmSync(r,{recursive:!0,force:!0}),Error(`npx skills installed no skill directory`);let c=s;if(o.length>1){let e=t.type===`github`&&t.subpath?p.basename(t.subpath):void 0,n=e?o.find(t=>t.name===e):void 0;if(!n)throw d.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`}.`);c=n}return{dir:p.join(a,c.name),tmpRoot:r}}async function k(u,f,p){let m=x(u),h=!!f.global,g=await o(h,p.workspaceId),_=g.rootDir,v={...p,workspaceId:g.workspaceId};if(!g.linked){let t={workspaceId:p.workspaceId,apiUrl:await e()};n(),h?r(t):i(process.cwd(),t)}let y,b,C;if(m.type===`entrydesk`){b=await D(v,m);let e=await v.client.downloadSkillCurrent(v.accessToken,v.workspaceId,b);y=e.name,C=s(_,y);let t=await fetch(e.url);if(!t.ok)throw Error(`Failed to download ${y}: ${t.status}`);await E(Buffer.from(await t.arrayBuffer()),C)}else if(m.type===`local`)y=T(m.path),C=s(_,y),w(m.path,C);else{let{dir:e,tmpRoot:t}=O(u,m,!!f.json);try{y=T(e),C=s(_,y),w(e,C)}finally{d.rmSync(t,{recursive:!0,force:!0})}}let k=c(C),A={source:u,sourceType:S(m),skillId:b,localHash:k,lastPulledHash:m.type===`entrydesk`?k:``,mode:`symlink`,...m.type===`github`?{sourceUrl:m.url,ref:m.gitRef,subpath:m.subpath}:{},...m.type===`git`?{sourceUrl:m.url}:{}};a(_,y,A);let j=l(C,y,_,`symlink`,f.agent);f.json?console.info(t({name:y,sourceType:S(m),hash:k},2)):console.info(`✓ added ${y} (${m.type}, ${k.slice(0,12)}) → agents: ${j.map(e=>e.agentId).join(`, `)}`)}export{k as runSkillsAdd};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var __entrydeskNodeFloor = 24;
|
|
3
|
+
if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
4
|
+
process.stderr.write(
|
|
5
|
+
'entrydesk: Node.js ' + __entrydeskNodeFloor + ' or newer is required, but this is Node ' + process.versions.node + '.\n' +
|
|
6
|
+
'Upgrade Node (https://nodejs.org/en/download), then reinstall @entrydesk/cli.\n'
|
|
7
|
+
);
|
|
8
|
+
process.exit(1);
|
|
9
|
+
}
|
|
10
|
+
import{C as e,D as t,O as n,an as r,bt as i,cn as a,in as o,ln as s,p as c,r as l,tn as u,yt as d}from"./profile-storage-CKrZ-xsd.js";import{n as f,t as p}from"./file-upload-Dq6B0x4m.js";import{n as m,t as h}from"./terminal-text-cBPBiP3x.js";import{t as g}from"./resource-grants-Bb4evqsH.js";import{HTTPError as _}from"ky";const v=new Set([`image/png`,`image/jpeg`,`image/gif`,`image/webp`]);function y(e){return e?s([...new Set(e)]):r}function b(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 x(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 S(e){if(console.log(`${e.name}\n`),console.log(` ID: ${e.id}`),e.visibility&&console.log(` Visibility: ${e.visibility}`),e.model&&console.log(` Model: ${e.model.name}`),e.author&&console.log(` Author: ${e.author.name}${e.author.isMe?` (you)`:``}`),e.description&&console.log(` Description: ${e.description}`),e.capabilities){let t=a(e.capabilities).map(e=>i(e));t.length>0&&console.log(` Capabilities: ${t.join(`, `)}`)}e.connectors&&e.connectors.length>0&&console.log(` Connectors: ${e.connectors.map(e=>e.name).join(`, `)}`),e.tools&&e.tools.length>0&&console.log(` Tools: ${e.tools.length}`),e.conversationStarters&&e.conversationStarters.length>0&&console.log(` Starters: ${e.conversationStarters.length}`),e.systemPrompt&&console.log(`\n System prompt:\n${e.systemPrompt}`)}async function C(t){let{accessToken:n,workspaceId:r}=await c(),i=new e;if(t.mine){let e=[],a=t.all?void 0:t.nextKey;for(let o=0;;o++){o>=100&&(console.error(`Reached maximum page limit (100). Use --limit and --next-key for manual pagination.`),process.exit(1));let s=await i.getMyAgents(n,r,{limit:t.limit,nextKey:a});if(e.push(...s.agents),a=s.nextKey,!t.all||!a)break}if(t.json){console.log(h({agents:e,nextKey:a}));return}if(e.length===0){console.log("You own no agents in this workspace. Create one with `entrydesk agents create --name <name> …`, or browse `entrydesk marketplace`.");return}x(e),!t.all&&a&&console.log(`Next page: --next-key ${a}`);return}if(t.all){let e=[],a;for(let o=0;;o++){o>=100&&(console.error(`Reached maximum page limit (100). Use --limit and --next-key for manual pagination.`),process.exit(1));let s=await i.getAgents(n,r,{limit:t.limit??100,nextKey:a});if(e.push(...s.agents),a=s.nextKey,!a)break}if(t.json){console.log(h({agents:e}));return}if(e.length===0){console.log("No agents in this workspace yet. Create one with `entrydesk agents create`, or browse `entrydesk marketplace`.");return}b(e);return}let{agents:a,nextKey:o}=await i.getAgents(n,r,{limit:t.limit,nextKey:t.nextKey});if(t.json){console.log(h({agents:a,nextKey:o}));return}if(a.length===0){console.log("No agents in this workspace yet. Create one with `entrydesk agents create`, or browse `entrydesk marketplace`.");return}b(a),o&&console.log(`Next page: --next-key ${o}`)}async function w(t,n){let{accessToken:r,workspaceId:i}=await c(),a=await new e().getAgent(r,i,t);if(n.json){console.log(h(a));return}S(a)}async function T(t){let{accessToken:n,workspaceId:r}=await c(),i=await new e().createAgent(n,r,{name:t.name,description:t.description,systemPrompt:t.systemPrompt,modelId:t.modelId,connectorIds:t.connectorIds??[],capabilities:y(t.capabilities),conversationStarters:t.conversationStarters??[],tools:t.tools,iconId:t.iconId});if(t.json){console.log(h(i));return}console.log(`Created agent: ${i.name}`),console.log(` ID: ${i.id}`)}function E(e,t){return{name:t.name??e.name,description:t.description??e.description,systemPrompt:t.systemPrompt??e.systemPrompt??``,modelId:t.modelId??e.model?.id??``,connectorIds:t.connectorIds??e.connectors?.map(e=>e.id)??[],capabilities:t.capabilities?y(t.capabilities):e.capabilities??{},conversationStarters:t.conversationStarters??e.conversationStarters??[],tools:t.tools??e.tools??[],iconId:t.iconId??e.iconId}}async function D(t,n){let{accessToken:r,workspaceId:i}=await c(),a=new e,o=await a.getAgent(r,i,t);await a.updateAgent(r,i,t,E(o,n)),console.log(`Updated agent: ${t}`)}async function O(e){let t=n(e),r;try{r=await f(e,{maxBytes:d})}catch(e){if(!(e instanceof p))throw e;switch(e.problem){case`missing`:throw new l(`No file at ${t}.`);case`not_a_file`:throw new l(`${t} is not a regular file.`);case`too_large`:throw new l(`${t} is larger than ${d/1024/1024}MB, the agent icon limit.`);case`unreadable`:throw new l(`Could not read ${t}. Check its permissions.`)}}if(!v.has(r.mimeType))throw new l(`${t} is not a supported icon image. Use a PNG, JPEG, GIF, or WebP file (.png, .jpg, .jpeg, .gif, .webp).`);return r}async function k(t){let{accessToken:n,workspaceId:r}=await c(),i=new e;return{client:i,accessToken:n,workspaceId:r,agent:t?await i.getAgent(n,r,t):void 0}}async function A({client:e,accessToken:n,workspaceId:r},i,a){let o=await e.getAgentHeadVersionId(n,r,i),s=await e.getAgent(n,r,i);try{await e.updateAgent(n,r,i,{...E(s,{iconId:a}),expectedHeadVersionId:o})}catch(e){throw e instanceof _&&t(e.data)===`agent_version_conflict`?new l(`Agent ${i} was changed by someone else while the icon was being made, so it was not applied. Apply it with \`entrydesk agents update ${i} --icon-id ${a}\`.`):e}}async function j(e,t,n){let{agent:r}=e;if(r&&await A(e,r.id,t.iconId),n.json){console.log(h({...t,agentId:r?.id}));return}if(console.log(`Icon ID: ${t.iconId}`),console.log(`URL: ${m(t.url)}`),r){console.log(`\nApplied the icon to agent: ${m(r.name)} (${r.id})`);return}console.log(`\nApply it with \`entrydesk agents update <agentId> --icon-id ${t.iconId}\`.`)}async function M(e,t){if(!e&&(!t.name?.trim()||!t.description?.trim()))throw new l(`Pass --name and --description, or an agentId to generate the icon from that agent.`);let n=await k(e),r=t.name??n.agent?.name??``,i=t.description??(n.agent?.description.trim()?n.agent.description:n.agent?.systemPrompt??``);if(!r.trim()||!i.trim())throw new l(`Agent ${e} has no ${r.trim()?`description or system prompt`:`name`} to generate an icon from. Pass --name and --description.`);await j(n,await n.client.generateAgentIcon(n.accessToken,n.workspaceId,{name:r,description:i}),t)}async function N(e,t,n){let r=await O(e),i=await k(t);await j(i,await i.client.uploadAgentIcon(i.accessToken,i.workspaceId,r),n)}async function P(t){let{accessToken:n,workspaceId:r}=await c();await new e().deleteAgent(n,r,t),console.log(`Deleted agent: ${t}`)}async function F(e,t,n,r){let i;do{let a=await e.getMyAgents(t,n,{nextKey:i}),o=a.agents.find(e=>e.id===r);if(o)return o;i=a.nextKey}while(i)}function I(e){return{resource:{collection:`agents`,id:e},label:`agent`,publishResourceType:o.AGENT,findEditable:(t,n,r)=>F(t,n,r,e)}}async function L(e,t){await g(I(e),{...t,addWorkspace:!0,role:u.VIEWER})}async function R(e,t){await g(I(e),t)}export{T as createAgent,P as deleteAgent,M as generateAgentIcon,C as listAgents,L as publishAgent,R as shareAgent,w as showAgent,D as updateAgent,N as uploadAgentIcon};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var __entrydeskNodeFloor = 24;
|
|
3
|
+
if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
4
|
+
process.stderr.write(
|
|
5
|
+
'entrydesk: Node.js ' + __entrydeskNodeFloor + ' or newer is required, but this is Node ' + process.versions.node + '.\n' +
|
|
6
|
+
'Upgrade Node (https://nodejs.org/en/download), then reinstall @entrydesk/cli.\n'
|
|
7
|
+
);
|
|
8
|
+
process.exit(1);
|
|
9
|
+
}
|
|
10
|
+
import{C as e,p as t,x as n}from"./profile-storage-CKrZ-xsd.js";import{t as r}from"./terminal-text-cBPBiP3x.js";import{i,n as a}from"./format-CIj0qQba.js";import{t as o}from"./paginate-Cbe4RaEq.js";function s(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} · ~${i(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: ${i(n.balanceUsd)} extra usage`),console.log(` Spent: ${a(n.currentSpentUsd)} this period`),n.monthlyExtraUsageLimitUsd!=null&&console.log(` Limit: ${i(n.monthlyExtraUsageLimitUsd)} / month`)}function c(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} · ${i(t.totalUsd)}`),t.hostedInvoiceUrl&&console.log(` ${t.hostedInvoiceUrl}`),console.log(` ID: ${t.id}`),console.log(``)}}async function l(){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 u(t){let{accessToken:n,workspaceId:i}=await l(),a=await new e().getBillingOverview(n,i);if(t.json){console.log(r(a));return}s(a)}async function d(t){let{accessToken:n,workspaceId:i}=await l(),a=new e;if(t.all){let e=await o(async e=>{let r=await a.getBillingInvoices(n,i,{limit:t.limit??20,nextKey:e});return{items:r.invoices,nextKey:r.nextKey}});if(t.json){console.log(r({invoices:e}));return}if(e.length===0){console.log(`No invoices.`);return}c(e);return}let{invoices:s,nextKey:u}=await a.getBillingInvoices(n,i,{limit:t.limit,nextKey:t.nextKey});if(t.json){console.log(r({invoices:s,nextKey:u}));return}if(s.length===0){console.log(`No invoices.`);return}c(s),u&&console.log(`Next page: --next-key ${u}`)}export{d as listInvoices,u as showBillingStatus};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var __entrydeskNodeFloor = 24;
|
|
3
|
+
if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
4
|
+
process.stderr.write(
|
|
5
|
+
'entrydesk: Node.js ' + __entrydeskNodeFloor + ' or newer is required, but this is Node ' + process.versions.node + '.\n' +
|
|
6
|
+
'Upgrade Node (https://nodejs.org/en/download), then reinstall @entrydesk/cli.\n'
|
|
7
|
+
);
|
|
8
|
+
process.exit(1);
|
|
9
|
+
}
|
|
10
|
+
import{C as e,p as t}from"./profile-storage-CKrZ-xsd.js";import{t as n}from"./terminal-text-cBPBiP3x.js";async function r(r){let{accessToken:i,workspaceId:a}=await t(),o=await new e().getBudget(i,a);if(r.json){console.log(n(o));return}if(o.budget===null){console.log(`No budget set for this workspace.`);return}console.log(`Current workspace budget: $${o.budget}`)}async function i(r,i){let{accessToken:a,workspaceId:o}=await t(),s=new e;if(await s.updateBudget(a,o,r),i.json){console.log(n(await s.getBudget(a,o)));return}console.log(`Budget updated: $${r}`)}async function a(r){let{accessToken:i,workspaceId:a}=await t(),o=new e;if(await o.updateBudget(i,a,null),r.json){console.log(n(await o.getBudget(i,a)));return}console.log(`Budget cleared.`)}export{a as clearBudget,i as setBudget,r as showBudget};
|
package/dist/{build-task-request-config-C62XneUL.js → build-task-request-config-BzI-dDZP.js}
RENAMED
|
@@ -7,4 +7,4 @@ if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
|
7
7
|
);
|
|
8
8
|
process.exit(1);
|
|
9
9
|
}
|
|
10
|
-
import{
|
|
10
|
+
import{$t as e,Ct as t,Qt as n,St as r}from"./profile-storage-CKrZ-xsd.js";function i({allowedTools:e,disallowedTools:n}){if(!(!e?.length&&!n?.length))return[...t(e?.map(e=>({toolName:e,policy:r.ALWAYS_ALLOW})),n?.map(e=>({toolName:e,policy:r.BLOCK})))].map(([e,t])=>({toolName:e,policy:t}))}function a(e,n){let i=[...n].map(e=>({toolName:e,policy:r.ALWAYS_ALLOW}));return i.length===0?e:[...t(e,i)].map(([e,t])=>({toolName:e,policy:t}))}function o({agentId:t,model:r,projectId:i,connectorIds:a,clientTools:o,clientToolSystemPrompt:s,toolApprovalMode:c,toolPolicies:l}){return{...i?{projectId:i}:{},...t?{agentId:t}:{...r?{model:r}:{},...a?.length?{connectorIds:a}:{}},...o?{clientTools:e(o,n.DIRECT)}:{},...s?{clientToolSystemPrompt:s}:{},...c?{toolApprovalMode:c}:{},...l?.length?{toolPolicies:l}:{}}}export{i as n,a as r,o as t};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var __entrydeskNodeFloor = 24;
|
|
3
|
+
if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
4
|
+
process.stderr.write(
|
|
5
|
+
'entrydesk: Node.js ' + __entrydeskNodeFloor + ' or newer is required, but this is Node ' + process.versions.node + '.\n' +
|
|
6
|
+
'Upgrade Node (https://nodejs.org/en/download), then reinstall @entrydesk/cli.\n'
|
|
7
|
+
);
|
|
8
|
+
process.exit(1);
|
|
9
|
+
}
|
|
10
|
+
import{I as e}from"./profile-storage-CKrZ-xsd.js";import{t}from"./terminal-text-cBPBiP3x.js";import{a as n,c as r,d as i,f as a,g as o,i as s,l as c,m as l,o as u,r as d,s as f,u as p}from"./paths-BiowKnkz.js";import{t as m}from"./hash-92fWniGT.js";import{r as h}from"./installer-CKB3jBE-.js";import g from"node:path";import _ from"node:fs/promises";const v=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu;async function y(t,o,s){let c=t&&v.test(t)?t:s.workspaceId,l={workspaceId:c,apiUrl:await e()};if(n(),o.global)i(l),console.info(`Linked ${f()} → workspace ${c}`);else{let e=process.cwd();a(e,l),console.info(`Linked ${r(e)} → workspace ${c}`)}}function b(e){if(e.global){c()?console.info(`Unlinked ${f()}`):console.info(`No global link found.`);return}let t=u(process.cwd());t&&p(t)?console.info(`Unlinked ${r(t)}`):console.info(`No project link found.`)}async function x(e,t,n,r,i){let a=n.skillId;if(!a){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}`);a=r.id}let{url:s,name:c}=await e.client.downloadSkillCurrent(e.accessToken,e.workspaceId,a),l=await fetch(s);if(!l.ok)throw Error(`Failed to download ${c}: ${l.status}`);let u=Buffer.from(await l.arrayBuffer()),f=d(t,c);await _.rm(f,{recursive:!0,force:!0}),await _.mkdir(f,{recursive:!0});let{default:p}=await import(`adm-zip`),v=g.resolve(f)+g.sep;for(let e of new p(u).getEntries()){if(e.isDirectory)continue;let t=g.resolve(f,e.entryName);if(!t.startsWith(v))throw Error(`Zip entry contains path traversal: ${e.entryName}`);await _.mkdir(g.dirname(t),{recursive:!0}),await _.writeFile(t,e.getData())}let y=m(f);o(t,c,{source:a,sourceType:`entrydesk`,skillId:a,localHash:y,lastPulledHash:y,mode:`symlink`});let b=h(f,c,t,`symlink`,i);return r||console.info(`✓ pulled ${c} (${y.slice(0,12)}) → agents: ${b.map(e=>e.agentId).join(`, `)}`),{name:c,hash:y}}async function S(e,n,r){let{rootDir:i,workspaceId:a}=await s(!!n.global,r.workspaceId),o={...r,workspaceId:a},c=!!n.json,u=[];if(e)u.push(v.test(e)?{skillId:e}:{name:e});else{let e=l(i).skills;for(let[t,n]of Object.entries(e))u.push({skillId:n.skillId,name:t});if(u.length===0){console.info(`Nothing to pull — no tracked skills. Try: entrydesk skills pull <name>`);return}}let d=[];for(let e of u)d.push(await x(o,i,e,c,n.agent));c&&console.info(t(d,2))}export{S as n,b as r,y as t};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var __entrydeskNodeFloor = 24;
|
|
3
|
+
if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
4
|
+
process.stderr.write(
|
|
5
|
+
'entrydesk: Node.js ' + __entrydeskNodeFloor + ' or newer is required, but this is Node ' + process.versions.node + '.\n' +
|
|
6
|
+
'Upgrade Node (https://nodejs.org/en/download), then reinstall @entrydesk/cli.\n'
|
|
7
|
+
);
|
|
8
|
+
process.exit(1);
|
|
9
|
+
}
|
|
10
|
+
import{R as e,t,z as n}from"./profile-storage-CKrZ-xsd.js";import{t as r}from"./terminal-text-cBPBiP3x.js";function i(i){let a=n.getAll();if(i.json){console.log(r(a));return}let o=Object.entries(a);if(console.log(`Profile: ${t.getEffectiveProfileName()}`),o.length===0){console.log(`No configuration set.`),console.log(`Available keys: ${e.join(`, `)}`);return}console.log(`Configuration:
|
|
11
|
+
`);for(let[e,t]of o)console.log(` ${e}=${t}`);console.log(`\nAvailable keys: ${e.join(`, `)}`)}export{i as listConfig};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var __entrydeskNodeFloor = 24;
|
|
3
|
+
if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
4
|
+
process.stderr.write(
|
|
5
|
+
'entrydesk: Node.js ' + __entrydeskNodeFloor + ' or newer is required, but this is Node ' + process.versions.node + '.\n' +
|
|
6
|
+
'Upgrade Node (https://nodejs.org/en/download), then reinstall @entrydesk/cli.\n'
|
|
7
|
+
);
|
|
8
|
+
process.exit(1);
|
|
9
|
+
}
|
|
10
|
+
import{C as e,Gt as t,Kt as n,Vt as r,p as i,qt as a,zt as o}from"./profile-storage-CKrZ-xsd.js";import{t as s}from"./terminal-text-cBPBiP3x.js";import{t as c}from"./confirm-Ct432t3K.js";function l(e,n){return n?t(n)?`Next: entrydesk connectors connect ${e} --oauth`:n===`credentials`?`Next: entrydesk connectors connect ${e} --username <username> --password <password>`:`Next: entrydesk connectors connect ${e} --token <token>`:`This connector needs no authorization — there is no connect step.`}async function u(t){let{accessToken:n,workspaceId:r}=await i(),{connectors:a,nextKey:o}=await new e().getConnectors(n,r,{connectionStatus:t.all?`all`:`connected`,search:t.search,limit:t.limit,nextKey:t.nextKey});if(t.json){console.log(s({connectors:a,nextKey:o}));return}if(a.length===0){console.log(t.all?`No connectors found.`:`No connected connectors. Use --all to browse connectable ones.`);return}let c=t.all?`Connectors`:`Connected connectors`;console.log(`${c} (${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 d(t,n){let{accessToken:r,workspaceId:a}=await i(),{tools:o}=await new e().getConnectorTools(r,a,t);if(n.json){console.log(s({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 f(t,n){let{accessToken:r,workspaceId:a}=await i();await new e().syncConnectorTools(r,a,t),console.log(n.json?s({id:t,synced:!0}):`Synced tools for connector ${t}.`)}async function p(t,n){let{accessToken:r,workspaceId:a}=await i(),o=new e;if(n.oauth){let{url:e}=await o.getConnectorAuthUrl(r,a,t);if(n.json){console.log(s({url:e}));return}console.log(`Open this URL in your browser to authorize the connector:`),console.log(` ${e}`),console.log(`
|
|
11
|
+
After you approve, the connection is saved automatically — re-run`),console.log("`entrydesk connectors` to confirm it shows as connected.");return}let c;n.token?c={token:n.token}:n.username&&n.password?c={username:n.username,password:n.password}:(console.error(`Provide --token, or --username and --password, or --oauth to connect.`),process.exit(1)),await o.connectConnectorToken(r,a,t,c),console.log(n.json?s({id:t,connected:!0}):`Connected connector ${t}.`)}function m(e){let t=e.auth===`oauth`||e.auth===`google-iap`;if(t&&(!e.provider||!e.scope?.length)&&(console.error(`--auth ${e.auth} needs --provider and at least one --scope.`),process.exit(1)),!t&&(e.provider||e.scope?.length)&&(console.error(e.auth?`--provider and --scope apply only to --auth oauth and --auth google-iap, not --auth ${e.auth}.`:`--provider and --scope need --auth oauth or --auth google-iap.`),process.exit(1)),e.auth!==void 0)return e.auth===!1?null:{type:e.auth,...e.provider?{provider:e.provider}:{},...e.scope?.length?{scopes:e.scope}:{}}}async function h(t){let c=m(t),u=t.toolNamespace??t.toolPrefix,d=u??n(t.name),f=r(d);if(f){let e=o[f];console.error(u?`--tool-namespace ${e}.`:`The tool namespace derived from --name ("${d}") ${e}. Pass --tool-namespace explicitly.`),process.exit(1)}let{accessToken:p,workspaceId:h}=await i(),g=await new e().createCustomConnector(p,h,{type:a.CUSTOM_REMOTE_URL,name:t.name,description:t.description,transport:t.transport,url:t.url,toolNamespace:d,...c?{authorization:c}:{}});if(t.json){console.log(s(g));return}console.log(`Created connector ${g.name}.`),console.log(` ID: ${g.id}`),console.log(` URL: ${g.url}`),console.log(` Tool namespace: ${g.toolNamespace}`),console.log(`\n${l(g.id,t.auth)}`)}function g(e,t){return t===void 0?e:t===null||t.type!==e?.type?t:{...e,...t}}async function _(t,n){[n.name,n.url,n.description,n.transport,n.toolNamespace,n.auth,n.provider,n.scope].every(e=>e===void 0)&&(console.error(`Nothing to update. Pass at least one of --name, --url, --description, --transport, --tool-namespace, --auth or --no-auth.`),process.exit(1));let r=m(n),{accessToken:o,workspaceId:c}=await i(),l=new e,u=await l.getCustomConnector(o,c,t),d=await l.updateCustomConnector(o,c,t,{type:a.CUSTOM_REMOTE_URL,name:n.name??u.name,description:n.description??u.description,transport:n.transport??u.transport,url:n.url??u.url,toolNamespace:n.toolNamespace??u.toolNamespace,authorization:g(u.authorization,r)});if(n.json){console.log(s(d));return}console.log(`Updated connector ${d.name}.`),console.log(` ID: ${d.id}`),console.log(` URL: ${d.url}`),console.log(` Tool namespace: ${d.toolNamespace}`)}async function v(t,n){let{accessToken:r,workspaceId:a}=await i();if(!n.yes&&(process.stdin.isTTY||(console.error(`Disconnecting connector ${t} needs confirmation. Re-run with --yes.`),process.exit(1)),!await c(`Disconnect connector ${t}?`))){console.log(`Aborted.`);return}await new e().disconnectConnector(r,a,t),console.log(n.json?s({id:t,disconnected:!0}):`Disconnected connector ${t}.`)}export{p as connectConnector,h as createConnector,v as disconnectConnector,d as listConnectorTools,u as listConnectors,f as syncConnectorTools,_ as updateConnector};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var __entrydeskNodeFloor = 24;
|
|
3
|
+
if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
4
|
+
process.stderr.write(
|
|
5
|
+
'entrydesk: Node.js ' + __entrydeskNodeFloor + ' or newer is required, but this is Node ' + process.versions.node + '.\n' +
|
|
6
|
+
'Upgrade Node (https://nodejs.org/en/download), then reinstall @entrydesk/cli.\n'
|
|
7
|
+
);
|
|
8
|
+
process.exit(1);
|
|
9
|
+
}
|
|
10
|
+
import"./profile-storage-CKrZ-xsd.js";import e,{promises as t}from"node:fs";import n from"node:os";import r from"node:path";import{execFile as i}from"node:child_process";import a from"node:fs/promises";import{promisify as o}from"node:util";function s(e){return e instanceof Error&&`code`in e}const c=o(i);async function l(){let t=r.join(n.tmpdir(),`entrydesk-clipboard-${Date.now()}.png`);try{let e=`
|
|
11
|
+
set imageData to the clipboard as "PNGf"
|
|
12
|
+
set fileRef to open for access POSIX file "${t}" with write permission
|
|
13
|
+
set eof fileRef to 0
|
|
14
|
+
write imageData to fileRef
|
|
15
|
+
close access fileRef
|
|
16
|
+
`;return await c(`osascript`,[`-e`,e]),(await a.stat(t)).size===0?void 0:{buffer:await a.readFile(t),mime:`image/png`}}catch{return}finally{try{e.existsSync(t)&&await a.unlink(t)}catch{}}}async function u(){try{let{stdout:e}=await c(`powershell.exe`,[`-command`,`
|
|
17
|
+
Add-Type -AssemblyName System.Windows.Forms
|
|
18
|
+
$img = [System.Windows.Forms.Clipboard]::GetImage()
|
|
19
|
+
if ($img) {
|
|
20
|
+
$ms = New-Object System.IO.MemoryStream
|
|
21
|
+
$img.Save($ms, [System.Drawing.Imaging.ImageFormat]::Png)
|
|
22
|
+
[System.Convert]::ToBase64String($ms.ToArray())
|
|
23
|
+
}
|
|
24
|
+
`]),t=e.trim();if(!t)return;let n=Buffer.from(t,`base64`);return n.length===0?void 0:{buffer:n,mime:`image/png`}}catch{return}}async function d(){try{let{stdout:e}=await c(`wl-paste`,[`-t`,`image/png`],{encoding:`buffer`,maxBuffer:50*1024*1024});if(e.length>0)return{buffer:e,mime:`image/png`}}catch{}try{let{stdout:e}=await c(`xclip`,[`-selection`,`clipboard`,`-t`,`image/png`,`-o`],{encoding:`buffer`,maxBuffer:50*1024*1024});if(e.length>0)return{buffer:e,mime:`image/png`}}catch{}}async function f(){let e=n.platform();if(e===`darwin`)return l();if(e===`win32`)return u();if(e===`linux`)return d()}const p=new Set(`.png,.jpg,.jpeg,.gif,.webp,.bmp,.ico,.heic,.heif,.pdf,.txt,.md,.rtf,.csv,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.key,.pages,.numbers,.odt,.ods,.odp,.json,.xml,.yaml,.yml`.split(`,`));function m(e){let t=r.extname(e).toLowerCase();return p.has(t)}function h(e){return{".png":`image/png`,".jpg":`image/jpeg`,".jpeg":`image/jpeg`,".gif":`image/gif`,".webp":`image/webp`,".bmp":`image/bmp`,".ico":`image/x-icon`,".heic":`image/heic`,".heif":`image/heif`,".txt":`text/plain`,".md":`text/markdown`,".pdf":`application/pdf`,".csv":`text/csv`,".rtf":`application/rtf`,".doc":`application/msword`,".docx":`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,".xls":`application/vnd.ms-excel`,".xlsx":`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,".ppt":`application/vnd.ms-powerpoint`,".pptx":`application/vnd.openxmlformats-officedocument.presentationml.presentation`,".key":`application/vnd.apple.keynote`,".pages":`application/vnd.apple.pages`,".numbers":`application/vnd.apple.numbers`,".odt":`application/vnd.oasis.opendocument.text`,".ods":`application/vnd.oasis.opendocument.spreadsheet`,".odp":`application/vnd.oasis.opendocument.presentation`,".json":`application/json`,".xml":`application/xml`,".yaml":`text/yaml`,".yml":`text/yaml`}[r.extname(e).toLowerCase()]||`application/octet-stream`}function g(e){let t=e.trim();return t.startsWith(`file://`)&&(t=decodeURIComponent(t.slice(7))),(t.startsWith(`'`)&&t.endsWith(`'`)||t.startsWith(`"`)&&t.endsWith(`"`))&&(t=t.slice(1,-1)),t=t.replace(/\\(.)/g,`$1`),t}async function _(e){let t=g(e);if(/^https?:\/\//.test(t))return!1;try{return await a.access(t),!0}catch{return!1}}var v=class extends Error{problem;filePath;constructor(e,t){super(`${e}: ${t}`),this.problem=e,this.filePath=t,this.name=`LocalFileError`}};function y(e){if(s(e)){if(e.code===`ENOENT`||e.code===`ENOTDIR`)return`missing`;if(e.code===`EISDIR`)return`not_a_file`}return`unreadable`}async function b(e,{maxBytes:n=1/0}={}){try{let i=await t.stat(e);if(!i.isFile())throw new v(`not_a_file`,e);if(i.size>n)throw new v(`too_large`,e);return{buffer:await t.readFile(e),filename:r.basename(e),mimeType:h(e)}}catch(t){throw t instanceof v?t:new v(y(t),e)}}export{g as a,_ as i,b as n,f as o,m as r,s,v as t};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var __entrydeskNodeFloor = 24;
|
|
3
|
+
if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
4
|
+
process.stderr.write(
|
|
5
|
+
'entrydesk: Node.js ' + __entrydeskNodeFloor + ' or newer is required, but this is Node ' + process.versions.node + '.\n' +
|
|
6
|
+
'Upgrade Node (https://nodejs.org/en/download), then reinstall @entrydesk/cli.\n'
|
|
7
|
+
);
|
|
8
|
+
process.exit(1);
|
|
9
|
+
}
|
|
10
|
+
import{Q as e}from"./profile-storage-CKrZ-xsd.js";function t(e){return`$${e.toFixed(2)}`}function n(t){return`$${e(t)}`}function r(e){if(e==null)return`—`;let t=Math.round(e),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60,a=String(r).padStart(2,`0`),o=String(i).padStart(2,`0`);return n>0?`${n}:${a}:${o}`:`${r}:${o}`}function i(e){if(!e)return``;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function a(e,t){return`${e} ${t}${e===1?``:`s`}`}export{a,t as i,n,i as r,r as t};
|
|
@@ -7,4 +7,4 @@ if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
|
7
7
|
);
|
|
8
8
|
process.exit(1);
|
|
9
9
|
}
|
|
10
|
-
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,
|
|
10
|
+
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()),[s]=o;if(o.length===1&&s!==void 0){let r=t.join(n,s.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};
|