@entrydesk/cli 2.1.0-beta.4 → 2.1.0
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 +15 -0
- package/dist/{add-4VqDcbIj.js → add-D4yZrlJH.js} +1 -1
- package/dist/{agents-CCOqroYN.js → agents-3dOJzTmM.js} +1 -1
- package/dist/{billing-BV5kdyQb.js → billing-Cyk-IzGv.js} +1 -1
- package/dist/{budget-CnxbNkne.js → budget-znTQ0rkG.js} +1 -1
- package/dist/build-task-request-config-C62XneUL.js +10 -0
- package/dist/commands--5Ein-MI.js +10 -0
- package/dist/{commands-DRUlUd-I.js → commands-D5BrzwFc.js} +1 -1
- package/dist/{config-CJf4r7wp.js → config-D-9dIy19.js} +1 -1
- package/dist/{connectors-C_Re7e0l.js → connectors-B7smri5B.js} +2 -2
- package/dist/index.js +17 -17
- package/dist/{instruction-DYgn39xF.js → instruction-BzftVNfK.js} +1 -1
- package/dist/{login-C0Zz6tHG.js → login-Ch3S9nh6.js} +1 -1
- package/dist/{logout-DnFBlXMZ.js → logout-BFFnjWjY.js} +1 -1
- package/dist/{marketplace-DQsEzT6T.js → marketplace-DNm78dKX.js} +1 -1
- package/dist/mcp-D2zejorr.js +11 -0
- package/dist/mcp-client-ltOwvE7T.js +10 -0
- package/dist/{meeting-C6H_GJB7.js → meeting-BdLr54zK.js} +1 -1
- package/dist/{message-utils-Cq_Fel5P.js → message-utils-DiNLK_84.js} +1 -1
- package/dist/{models-DT78HZxx.js → models-6WioEQKB.js} +1 -1
- package/dist/{notifications-3UrKbGaT.js → notifications-DIokyl4e.js} +1 -1
- package/dist/{paginate-Brd-j5V8.js → paginate-C9ixtica.js} +1 -1
- package/dist/{paths-mBL9tt9p.js → paths-CZAS8cbS.js} +1 -1
- package/dist/{profile-D4m5ZAG7.js → profile-CWsA2P_O.js} +1 -1
- package/dist/profile-storage-CuiJZpFD.js +68 -0
- package/dist/{project-C5_rCWCh.js → project-c8F30d-Q.js} +1 -1
- package/dist/{project-context-DnIuy1T0.js → project-context-C0ozCzKH.js} +1 -1
- package/dist/{project-governance-CxDZSThr.js → project-governance-DRDjqvX8.js} +1 -1
- package/dist/{project-sources-D17oXXhL.js → project-sources-DFn7Tn7u.js} +1 -1
- package/dist/{project-sources-write-C-W8gjLg.js → project-sources-write-Bz0lGCid.js} +1 -1
- package/dist/{project-tasks-t4HFgEoZ.js → project-tasks-DnOrMxr3.js} +1 -1
- package/dist/{push-CJZLFEdk.js → push-mojEdys2.js} +1 -1
- package/dist/{recordings-DeB1LqiS.js → recordings-BbeRVH0H.js} +1 -1
- package/dist/remove-BLF3muSH.js +10 -0
- package/dist/{resolve-Czx_OkYk.js → resolve-BoqGhxVK.js} +2 -2
- package/dist/{resource-grants-zAoqe73P.js → resource-grants-CtIINiDN.js} +1 -1
- package/dist/{schedules-COBaV-Be.js → schedules-ec4cS2A0.js} +2 -2
- package/dist/skills-C0xCUb-M.js +10 -0
- package/dist/status-Bfh5hjTq.js +10 -0
- package/dist/status-DpYhlJPA.js +10 -0
- package/dist/{task-C8PttINZ.js → task-DfLoMsmZ.js} +36 -36
- package/dist/{tasks-CAmfAGsn.js → tasks-Bl8A2HW6.js} +1 -1
- package/dist/{tasks-dv0gJ38_.js → tasks-CA2QZ8rX.js} +1 -1
- package/dist/{tool-kEevHrsQ.js → tool-B8CuZYYb.js} +1 -1
- package/dist/{update-Y9S-P4wG.js → update-BVBj3leV.js} +1 -1
- package/dist/{usage-CHIhyA8S.js → usage-CIhTZm98.js} +1 -1
- package/dist/{usage-audit-C1xGe42N.js → usage-audit-BUcbqdAc.js} +3 -3
- package/dist/{version-Dgsb7T5N.js → version-C1OwBsCd.js} +1 -1
- package/dist/{workflow-DWmgcRJ_.js → workflow-DJSq8hY5.js} +1 -1
- package/dist/{workspaces-3PFiXy1I.js → workspaces-BM_3Miqs.js} +1 -1
- package/package.json +5 -4
- package/dist/build-task-request-config-CjKDSNjv.js +0 -10
- package/dist/commands-gyHmiEsC.js +0 -10
- package/dist/mcp-DHXuIFWP.js +0 -11
- package/dist/mcp-client-EK-Fh8gM.js +0 -10
- package/dist/profile-storage-CPg61h-2.js +0 -68
- package/dist/remove-ChV-BE95.js +0 -10
- package/dist/skills-OLZywcSs.js +0 -10
- package/dist/status-CpfDbB9S.js +0 -10
- package/dist/status-Oo8upbyy.js +0 -10
|
@@ -7,4 +7,4 @@ if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
|
7
7
|
);
|
|
8
8
|
process.exit(1);
|
|
9
9
|
}
|
|
10
|
-
import{
|
|
10
|
+
import{A as e,O as t,S as n,_ as r,b as i,h as a,m as o,y as s}from"./profile-storage-CuiJZpFD.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: ${e()}`),console.log(`[DEBUG] API URL: ${t()}`));let u=await o({onDeviceCodeReceived:(e,t)=>{c.json||(console.log(``),console.log(`To finish logging in:`),console.log(``),console.log(` 1. Visit: ${t}`),console.log(` 2. Enter code: ${e}`),console.log(``))},onBrowserOpening:()=>{c.json||console.log(`Opening browser…`)},onWaitingForAuthorization:()=>{c.json||console.log(`Waiting for authorization…`)},onAuthorized:()=>{c.json||console.log(`Authorization successful.`)},onWarning:e=>{console.error(`Warning: ${e}`)}}),{workspaces:d}=await new i().getWorkspaces(u.accessToken),f=d[0];await n.saveAll({accessToken:u.accessToken,refreshToken:u.refreshToken,email:u.email,workspaceId:f?.id}),c.json?console.log(JSON.stringify({email:u.email,workspaceId:f?.id,workspaceName:f?.name,server:t()})):(console.log(`Logged in as ${u.email}`),f&&console.log(`Workspace: ${f.name}`),console.log(`Server: ${t()}`))}export{c as runLogin};
|
|
@@ -7,4 +7,4 @@ if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
|
7
7
|
);
|
|
8
8
|
process.exit(1);
|
|
9
9
|
}
|
|
10
|
-
import{
|
|
10
|
+
import{S as e,b as t,p as n}from"./profile-storage-CuiJZpFD.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};
|
|
@@ -7,6 +7,6 @@ if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
|
7
7
|
);
|
|
8
8
|
process.exit(1);
|
|
9
9
|
}
|
|
10
|
-
import{
|
|
10
|
+
import{F as e,b as t,u as n}from"./profile-storage-CuiJZpFD.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(`
|
|
11
11
|
Starter prompts:`);for(let e of i.starterPrompts)console.log(` - ${e}`)}if(i.connectors.length>0){console.log(`
|
|
12
12
|
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,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{M as e,S as t,d as n,f as r,j as i,u as a}from"./profile-storage-CuiJZpFD.js";import{r as o,t as s}from"./mcp-client-ltOwvE7T.js";import c from"node:http";import{stderr as l}from"node:process";import{NodeStreamableHTTPServerTransport as u}from"@modelcontextprotocol/node";import{Server as d}from"@modelcontextprotocol/server";import{StdioServerTransport as f}from"@modelcontextprotocol/server/stdio";function p(e){l.write(`${e}\n`)}function m(e,t,n){return s({apiUrl:e,accessToken:t,workspaceId:n,name:`entrydesk-cli-proxy`})}function h(e){let t=new d({name:`entrydesk-cli`,version:`1.0.0`},{capabilities:{tools:{}}});return t.setRequestHandler(`tools/list`,async(t,n)=>({tools:(await(await e()).listTools({},o({signal:n.mcpReq.signal}))).tools})),t.setRequestHandler(`tools/call`,async(t,n)=>{let{name:r,arguments:i}=t.params,{progressToken:a}=n.mcpReq._meta??{},s=await(await e()).callTool({name:r,arguments:i},o({signal:n.mcpReq.signal,onProgress:a===void 0?void 0:e=>{n.mcpReq.notify({method:`notifications/progress`,params:{...e,progressToken:a}}).catch(()=>{})}})),c=Array.isArray(s.content)?[...s.content]:[];return s.structuredContent&&c.push({type:`text`,text:JSON.stringify(s.structuredContent,null,2)}),{content:c,structuredContent:s.structuredContent,isError:s.isError}}),t}async function g(e,t,n){let r=c.createServer(async(t,n)=>{if(t.method===`OPTIONS`){n.setHeader(`Access-Control-Allow-Origin`,`*`),n.setHeader(`Access-Control-Allow-Methods`,`GET, POST, DELETE, OPTIONS`),n.setHeader(`Access-Control-Allow-Headers`,`Content-Type, Accept`),n.writeHead(204),n.end();return}if(t.url!==`/mcp`){n.writeHead(404,{"Content-Type":`application/json`}),n.end(JSON.stringify({error:`Not found`}));return}let r=h(e),i=new u({sessionIdGenerator:void 0});if(n.setHeader(`Access-Control-Allow-Origin`,`*`),n.on(`close`,()=>{i.close(),r.close()}),await r.connect(i),t.method===`POST`){let e=``;t.on(`data`,t=>{e+=t.toString()}),t.on(`end`,async()=>{try{let r=JSON.parse(e);await i.handleRequest(t,n,r)}catch{n.writeHead(400,{"Content-Type":`application/json`}),n.end(JSON.stringify({error:`Invalid JSON`}))}})}else await i.handleRequest(t,n)});r.listen(n,()=>{p(`EntryDesk MCP server running at http://localhost:${n}/mcp`),p(`Press Ctrl+C to stop`)}),process.on(`SIGINT`,async()=>{p(`
|
|
11
|
+
Shutting down…`),r.close(),await t(),process.exit(0)}),process.on(`SIGTERM`,async()=>{r.close(),await t(),process.exit(0)})}async function _(e,t){let n=h(e),r=new f;r.onclose=async()=>{await t()},await n.connect(r)}const v={mode:`stdio`};async function y(o=v){process.on(`unhandledRejection`,e=>{console.error(`[entrydesk-mcp] Unhandled rejection:`,e)}),process.on(`uncaughtException`,e=>{console.error(`[entrydesk-mcp] Uncaught exception:`,e)});try{p(`[entrydesk-mcp] Starting MCP server…`);let s,c;try{let e=await a();s=e.accessToken,c=e.workspaceId}catch(e){let t=e instanceof Error?e.message:`Authentication failed`;console.error(t),process.exit(1)}let l=await e(),u=i();p(`[entrydesk-mcp] Connecting to ${l}…`),p(`[entrydesk-mcp] Workspace: ${c}`);let d=await m(l,s,c);p(`[entrydesk-mcp] Connected to EntryDesk API`);let f=null,h=async()=>n(s)?f||(f=(async()=>{p(`[entrydesk-mcp] Token expiring soon, refreshing…`);let n=await t.getAll();if(!n?.accessToken)throw Error("Not logged in. Run `entrydesk login` again.");let i=await r(n);if(i!==s){s=i;try{await d.close()}catch{}d=await m(await e(),s,c),p(`[entrydesk-mcp] Token refreshed, reconnected`)}return d})().finally(()=>{f=null}),f):d,v=async()=>{try{await d.close()}catch{}};o.mode===`http`?await g(h,v,o.port??u.httpPort):(p(`[entrydesk-mcp] Starting stdio server…`),await _(h,v),p(`[entrydesk-mcp] Stdio server started`))}catch(e){console.error(`[entrydesk-mcp] Fatal error:`,e),process.exit(1)}}export{y as startMcpServer};
|
|
@@ -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{D as e,M as t,N as n,j as r,u as i}from"./profile-storage-CuiJZpFD.js";import{Client as a,StreamableHTTPClientTransport as o}from"@modelcontextprotocol/client";const s=()=>{};function c(e={}){let{requestTimeout:t,requestMaxTotalTimeout:n}=r();return{timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:!0,onprogress:e.onProgress??s,signal:e.signal}}async function l(r={}){let s=r.apiUrl,c=r.accessToken,l=r.workspaceId;if(!c||!l){let e=await i();c||=e.accessToken,l||=e.workspaceId}s||=await t();let u=new a({name:r.name??`entrydesk-cli`,version:`1.0.0`},{versionNegotiation:{mode:`auto`}}),d=new o(new URL(`${s}/v1/workspaces/${l}/mcp`),{requestInit:{headers:{Authorization:`Bearer ${c}`,...n(s)}},fetch:e(s)});return await u.connect(d),u}async function u(){return l()}export{u as n,c as r,l as t};
|
|
@@ -7,5 +7,5 @@ if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
|
7
7
|
);
|
|
8
8
|
process.exit(1);
|
|
9
9
|
}
|
|
10
|
-
import{
|
|
10
|
+
import{B as e,b as t,u as n}from"./profile-storage-CuiJZpFD.js";import{n as r}from"./format-DCvznP70.js";import{t as i}from"./paginate-C9ixtica.js";function a(e){return!e||e<=0?``:`${Math.round(e/60)}m`}function o(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 s(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=a(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 c(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 l(e){let{accessToken:r,workspaceId:a}=await n(),s=new t,c={search:e.search,filter:e.filter,sortBy:e.sort};if(e.all){let t=await i(async t=>{let n=await s.getMeetings(r,a,{limit:e.limit??20,nextKey:t,...c});return{items:n.meetings,nextKey:n.nextKey}});if(e.json){console.log(JSON.stringify({meetings:t}));return}if(t.length===0){console.log(`No meetings found in this workspace.`);return}o(t);return}let{meetings:l,nextKey:u}=await s.getMeetings(r,a,{limit:e.limit,nextKey:e.nextKey,...c});if(e.json){console.log(JSON.stringify({meetings:l,nextKey:u}));return}if(l.length===0){console.log(`No meetings found in this workspace.`);return}o(l),u&&console.log(`Next page: --next-key ${u}`)}async function u(e,r){let{accessToken:i,workspaceId:a}=await n(),o=await new t().getMeeting(i,a,e);if(r.json){console.log(JSON.stringify(o));return}s(o)}async function d(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 f(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 p(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 m(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 h(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 g(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(`
|
|
11
11
|
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 _(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 s=await o.getMeetingShares(i,a,e);if(r.json){console.log(JSON.stringify(s));return}c(s)}export{d as createMeeting,p as deleteMeeting,l as listMeetings,_ as shareMeeting,u as showMeeting,m as showMeetingSummary,h as showMeetingTranscript,g as showPreviousMeeting,f as updateMeeting};
|
|
@@ -7,7 +7,7 @@ if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
|
7
7
|
);
|
|
8
8
|
process.exit(1);
|
|
9
9
|
}
|
|
10
|
-
import{
|
|
10
|
+
import{Bt as e,Ht as t}from"./profile-storage-CuiJZpFD.js";import{t as n}from"./isRecord-BNZWvqVS.js";function r(e,t){return e.replace(/\u001B\][^\u001B\u0007]*(?:\u0007|\u001B\\)/gu,``).replace(/\u001B\[[0-?]*[ -/]*[@-~]/gu,``).replace(t,``)}function i(e){return r(e,/[\u0000-\u001F\u007F-\u009F]/gu)}function a(e){return r(e,/[\u0000-\u0008\u000B-\u001F\u007F-\u009F]/gu)}const o=`\x1B[2m`,s=`\x1B[0m`,c=`\x1B[36m`,l=`\x1B[32m`,u=`\x1B[38;2;59;91;204m`,d=`\x1B[38;2;126;200;248m`,f=`\x1B[38;2;244;196;78m`,p={preauthorized:`Auto-approved · preauthorized for this task`,low_risk:`Auto-approved · assessed low risk`};function m(e){if(!n(e))return;let r=t({approved:e.approved===!0,isAutomatic:e.isAutomatic===!0,reason:typeof e.reason==`string`?e.reason:void 0});return r?p[r.kind]:void 0}function h(t){if(t.state===`output-denied`||t.state===`approval-responded`&&t.approval?.approved===!1)return t.approval?.reason||e.BY_USER}function g(e,t){if(!e)return`(no result)`;if(typeof e!=`object`){let n=String(e);return t||n.length<=200?n:n.slice(0,200)+`…`}let n=e;if(`structuredContent`in n&&n.structuredContent){let e=n.structuredContent;if(e.stdout&&typeof e.stdout==`string`){let n=e.stdout.trim();return t||n.length<=200?n:n.slice(0,200)+`…`}}if(`content`in n&&Array.isArray(n.content)){let e=n.content.filter(e=>e.type===`text`&&e.text).map(e=>e.text).join(`
|
|
11
11
|
`);return e?t||e.length<=200?e:e.slice(0,200)+`…`:`(result)`}if(n.type===`text`&&typeof n.content==`string`){let e=n.content;return t||e.length<=200?e:e.slice(0,200)+`…`}let r=JSON.stringify(e,null,t?2:void 0);return t||r.length<=200?r:r.slice(0,200)+`…`}function _(e,t){return a(g(e,t))}function v(e,t=!1){let n=[];for(let r of e)if(r.type===`text`&&r.text)n.push(a(r.text));else if(r.type===`reasoning`&&r.text)t?n.push(`${o}[Thinking]\n${a(r.text)}${s}`):n.push(`${o}[Thinking…]${s}`);else if(r.type===`tool-call`&&r.toolName){let e=[`${c}┌─ Tool: ${i(r.toolName)}${s}`];if(r.args){let n=JSON.stringify(r.args,null,t?2:void 0),a=t||n.length<=100?n:n.slice(0,100)+`…`;e.push(`${o}│ Input: ${i(a)}${s}`)}r.result===void 0?e.push(`${c}└─${s}`):(e.push(`${l}│ Output: ${_(r.result,t)}${s}`),e.push(`${c}└─ completed${s}`)),n.push(e.join(`
|
|
12
12
|
`))}else if(r.type.startsWith(`tool-`)&&r.type!==`tool-call`){let e=[`${c}┌─ Tool: ${i(r.title||r.type.slice(5).replaceAll(`__`,` `))}${s}`];if(r.input){let n=JSON.stringify(r.input,null,t?2:void 0),a=t||n.length<=100?n:n.slice(0,100)+`…`;e.push(`${o}│ Input: ${i(a)}${s}`)}let a=h(r);if(r.output!==void 0&&r.state===`output-available`){e.push(`${l}│ Output: ${_(r.output,t)}${s}`);let n=m(r.approval);n&&e.push(`${o}│ ${n}${s}`),e.push(`${c}└─ completed${s}`)}else a===void 0?r.state===`error`?e.push(`${c}└─ failed${s}`):e.push(`${c}└─${s}`):(e.push(`${o}│ ${i(a)}${s}`),e.push(`${c}└─ rejected${s}`));n.push(e.join(`
|
|
13
13
|
`))}return n.join(`
|
|
@@ -7,5 +7,5 @@ if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
|
7
7
|
);
|
|
8
8
|
process.exit(1);
|
|
9
9
|
}
|
|
10
|
-
import{b as e,u as t}from"./profile-storage-
|
|
10
|
+
import{b as e,u as t}from"./profile-storage-CuiJZpFD.js";function n(e){return e===`saas`?{resolvesFrom:`model tiers`,note:`A task picks a tier (lite / pro / max) and the platform-default tier row decides the concrete model — but not always: a workspace with additional models enabled, or one on a subscription-pool model, can pin a concrete model id that resolves from its own rows and bypasses the tier mapping entirely.`}:{resolvesFrom:`this workspace's own rows`,note:`A task picks either a tier slug or a concrete model id. Tier rows are read per workspace and never fall back to the platform defaults, so changing a platform tier does not reach this workspace.`}}async function r(e){try{return await e()}catch(e){return{error:e instanceof Error?e.message:String(e)}}}function i(e){return` ${e.tier.padEnd(14)} → ${e.model?.id??`(no row)`}`}function a(e){if(`notExposed`in e){console.log(` Tier mappings: not exposed on SaaS — the public tier API strips the backing model id.`);return}if(`error`in e){console.log(` Tier mappings: unavailable (${e.error})`);return}if(e.tiers.length===0){console.log(` Tier mappings: none`);return}console.log(` Tier mappings (${e.tiers.length}):`);for(let t of e.tiers)console.log(i(t))}async function o(i){let{accessToken:o,workspaceId:s}=await t(),c=new e,{deploymentMode:l}=await c.getRuntimeConfig(),{resolvesFrom:u,note:d}=n(l),f=l===`saas`?Promise.resolve({notExposed:!0}):r(()=>c.getModelTierMappings(o,s)),[p,m]=await Promise.all([f,r(()=>c.getModels(o,s))]);if(i.json){console.log(JSON.stringify({deploymentMode:l,resolvesFrom:u,mappings:p,concrete:m}));return}console.log(`Model configuration
|
|
11
11
|
`),console.log(` Deployment mode: ${l}`),console.log(` Selection resolves from: ${u}`),console.log(` ${d}\n`),a(p),console.log(`error`in m?` Concrete models: unavailable (${m.error})`:` Concrete models available: ${m.models.length}`)}async function s(n){if(n.config){await o(n);return}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{s as runModels};
|
|
@@ -7,4 +7,4 @@ if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
|
7
7
|
);
|
|
8
8
|
process.exit(1);
|
|
9
9
|
}
|
|
10
|
-
import{b as e,u as t}from"./profile-storage-
|
|
10
|
+
import{b as e,u as t}from"./profile-storage-CuiJZpFD.js";import{n}from"./format-DCvznP70.js";import{t as r}from"./paginate-C9ixtica.js";function i(e,t){let n=e.replace(/\s+/g,` `).trim();return n.length>t?`${n.slice(0,t)}…`:n}function a(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(` ${i(t.rendered.body,100)}`);let r=n(t.createdAt);console.log(` ${r} · ${t.eventType} · ID: ${t.id}`),console.log(``)}}async function o(n){let{accessToken:i,workspaceId:o}=await t(),s=new e,c={tab:n.tab,eventType:n.eventType};if(n.all){let e=await r(async e=>{let t=await s.getNotifications(i,o,{...c,limit:n.limit??20,cursor:e});return{items:t.items,nextKey:t.nextKey}});if(n.json){console.log(JSON.stringify({items:e}));return}if(e.length===0){console.log(`No notifications.`);return}a(e);return}let{items:l,nextKey:u}=await s.getNotifications(i,o,{...c,limit:n.limit,cursor:n.nextKey});if(n.json){console.log(JSON.stringify({items:l,nextKey:u}));return}if(l.length===0){console.log(`No notifications.`);return}a(l),u&&console.log(`Next page: --next-key ${u}`)}async function s(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 c(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 l(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{o as listNotifications,l as markAllNotificationsRead,c as markNotificationRead,s as showUnreadCount};
|
|
@@ -7,4 +7,4 @@ if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
|
7
7
|
);
|
|
8
8
|
process.exit(1);
|
|
9
9
|
}
|
|
10
|
-
import{r as e}from"./profile-storage-
|
|
10
|
+
import{r as e}from"./profile-storage-CuiJZpFD.js";async function t(t){let n=[],r;for(let i=0;;i++){if(i>=100)throw new e(`Reached maximum page limit (100). Use --limit and --next-key for manual pagination.`);let a=await t(r);if(n.push(...a.items),r=a.nextKey,!r)return n}}export{t};
|
|
@@ -7,4 +7,4 @@ if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
|
7
7
|
);
|
|
8
8
|
process.exit(1);
|
|
9
9
|
}
|
|
10
|
-
import{
|
|
10
|
+
import{M as e}from"./profile-storage-CuiJZpFD.js";import t from"node:fs";import n from"node:os";import r from"node:path";import{windowsReservedNameRegex as i}from"filename-reserved-regex";const a=`.entrydesk`;function o(){return{version:1,skills:{}}}function s(e){return r.join(e,a,`skills-lock.json`)}function c(e){try{let n=JSON.parse(t.readFileSync(s(e),`utf8`));return n.version!==1||typeof n.skills!=`object`||n.skills===null?o():n}catch{return o()}}function l(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},o=s(e);t.mkdirSync(r.dirname(o),{recursive:!0}),t.writeFileSync(o,`${JSON.stringify(a,null,2)}\n`,`utf8`)}function u(e,t){return c(e).skills[t]}function d(e,t,n){let r=c(e);r.skills[t]=n,l(e,r)}function f(e,t){let n=c(e);if(!(t in n.skills))return!1;let{[t]:r,...i}=n.skills;return l(e,{...n,skills:i}),!0}function p(e){try{let n=JSON.parse(t.readFileSync(e,`utf8`));return typeof n.workspaceId!=`string`||n.workspaceId===``?void 0:n}catch{return}}function m(e,n){t.mkdirSync(r.dirname(e),{recursive:!0}),t.writeFileSync(e,`${JSON.stringify(n,null,2)}\n`,`utf8`)}function h(e){return t.existsSync(e)?(t.rmSync(e),!0):!1}function g(e){return r.join(e,a,`project.json`)}function _(){return r.join(n.homedir(),a,`global-link.json`)}function v(){return p(_())}function y(e){m(_(),e)}function b(){return h(_())}function x(e=process.cwd()){let n=r.resolve(e);for(;;){if(t.existsSync(g(n)))return n;let e=r.dirname(n);if(e===n)return;n=e}}function S(e){return p(g(e))}function C(e,t){m(g(e),t)}function w(e){return h(g(e))}function T(e=process.cwd()){let t=x(e);if(!t)return;let n=S(t);return n?{rootDir:t,link:n}:void 0}async function E(t){let n=await 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 D(){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.`)}async function O(e,t){if(e){let e=n.homedir(),r=v();return r?(await E(r.apiUrl),{rootDir:e,workspaceId:r.workspaceId,linked:!0}):{rootDir:e,workspaceId:t,linked:!1}}let r=T(process.cwd());return r?(await E(r.link.apiUrl),{rootDir:r.rootDir,workspaceId:r.link.workspaceId,linked:!0}):{rootDir:process.cwd(),workspaceId:t,linked:!1}}const k=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u;function A(e){if(!k.test(e))throw Error(`Invalid skill name "${e}": must be lowercase letters, digits and single hyphens (e.g. "my-skill").`)}function j(e,t){A(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}function M(e,t){let n=j(e,t);if(i().test(t))throw Error(`Invalid skill name "${t}": reserved as a device name on Windows.`);return n}function N(e,t){return process.platform!==`win32`&&u(e,t)!==void 0?j(e,t):M(e,t)}export{D as a,g as c,y as d,C as f,d as g,f as h,O as i,b as l,c as m,j as n,x as o,u as p,N as r,_ as s,A as t,w as u};
|
|
@@ -7,4 +7,4 @@ if (parseInt(process.versions.node, 10) < __entrydeskNodeFloor) {
|
|
|
7
7
|
);
|
|
8
8
|
process.exit(1);
|
|
9
9
|
}
|
|
10
|
-
import{
|
|
10
|
+
import{F as e,S as t,r as n,t as r}from"./profile-storage-CuiJZpFD.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};
|