@openagt/dashboard 0.54.0 → 0.56.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.
Files changed (156) hide show
  1. package/README.md +4 -2
  2. package/dist/appearance.d.ts +1 -1
  3. package/dist/appearance.d.ts.map +1 -1
  4. package/dist/appearance.js +1 -1
  5. package/dist/appearance.js.map +1 -1
  6. package/dist/clone-project.js +1 -1
  7. package/dist/clone-project.js.map +1 -1
  8. package/dist/daemon-runtime.d.ts.map +1 -1
  9. package/dist/daemon-runtime.js +8 -4
  10. package/dist/daemon-runtime.js.map +1 -1
  11. package/dist/daemon-services.d.ts +4 -4
  12. package/dist/daemon-services.js +6 -6
  13. package/dist/daemon-services.js.map +1 -1
  14. package/dist/daemon.d.ts +1 -1
  15. package/dist/daemon.d.ts.map +1 -1
  16. package/dist/daemon.js +11 -1
  17. package/dist/daemon.js.map +1 -1
  18. package/dist/dashboard/elsewhere.d.ts +1 -1
  19. package/dist/dashboard/elsewhere.d.ts.map +1 -1
  20. package/dist/dashboard/projects.js +1 -1
  21. package/dist/dashboard/projects.js.map +1 -1
  22. package/dist/dashboard/rpc-serve.d.ts +6 -0
  23. package/dist/dashboard/rpc-serve.d.ts.map +1 -1
  24. package/dist/dashboard/rpc-serve.js +21 -1
  25. package/dist/dashboard/rpc-serve.js.map +1 -1
  26. package/dist/dashboard/run-inbox.d.ts +4 -3
  27. package/dist/dashboard/run-inbox.d.ts.map +1 -1
  28. package/dist/dashboard/run-inbox.js +6 -5
  29. package/dist/dashboard/run-inbox.js.map +1 -1
  30. package/dist/dashboard/server.d.ts +16 -1
  31. package/dist/dashboard/server.d.ts.map +1 -1
  32. package/dist/dashboard/server.js +54 -12
  33. package/dist/dashboard/server.js.map +1 -1
  34. package/dist/dashboard/static.d.ts +15 -2
  35. package/dist/dashboard/static.d.ts.map +1 -1
  36. package/dist/dashboard/static.js +33 -18
  37. package/dist/dashboard/static.js.map +1 -1
  38. package/dist/dashboard/website.d.ts +34 -0
  39. package/dist/dashboard/website.d.ts.map +1 -0
  40. package/dist/dashboard/website.js +82 -0
  41. package/dist/dashboard/website.js.map +1 -0
  42. package/dist/dashboard-bundle/assets/host/module-BMyNrbiB.js +1 -0
  43. package/dist/dashboard-bundle/assets/main-BK8YIg7v.js +152 -0
  44. package/dist/dashboard-bundle/assets/main-mnNPGbsz.css +2 -0
  45. package/dist/dashboard-bundle/assets/{module-C1zreYB3.js → module-DY3Aigsz.js} +3 -3
  46. package/dist/dashboard-bundle/index.html +6 -6
  47. package/dist/dashboard-rpc/control.d.ts +22 -6
  48. package/dist/dashboard-rpc/control.d.ts.map +1 -1
  49. package/dist/dashboard-rpc/control.js +45 -9
  50. package/dist/dashboard-rpc/control.js.map +1 -1
  51. package/dist/dashboard-rpc/index.d.ts +3 -1
  52. package/dist/dashboard-rpc/index.d.ts.map +1 -1
  53. package/dist/dashboard-rpc/index.js +6 -2
  54. package/dist/dashboard-rpc/index.js.map +1 -1
  55. package/dist/dashboard-rpc/machines.d.ts.map +1 -1
  56. package/dist/dashboard-rpc/machines.js +1 -2
  57. package/dist/dashboard-rpc/machines.js.map +1 -1
  58. package/dist/dashboard-rpc/modules.js +2 -2
  59. package/dist/dashboard-rpc/modules.js.map +1 -1
  60. package/dist/dashboard-rpc/personal-folder.d.ts +23 -0
  61. package/dist/dashboard-rpc/personal-folder.d.ts.map +1 -0
  62. package/dist/dashboard-rpc/personal-folder.js +30 -0
  63. package/dist/dashboard-rpc/personal-folder.js.map +1 -0
  64. package/dist/dashboard-rpc/project-agent-data.d.ts +20 -0
  65. package/dist/dashboard-rpc/project-agent-data.d.ts.map +1 -0
  66. package/dist/dashboard-rpc/project-agent-data.js +38 -0
  67. package/dist/dashboard-rpc/project-agent-data.js.map +1 -0
  68. package/dist/dashboard-rpc/projects.d.ts +3 -5
  69. package/dist/dashboard-rpc/projects.d.ts.map +1 -1
  70. package/dist/dashboard-rpc/projects.js +5 -17
  71. package/dist/dashboard-rpc/projects.js.map +1 -1
  72. package/dist/dashboard-rpc/relay-dispatch.js +4 -4
  73. package/dist/dashboard-rpc/relay-dispatch.js.map +1 -1
  74. package/dist/index.d.ts +0 -1
  75. package/dist/index.d.ts.map +1 -1
  76. package/dist/join-dashboard.d.ts +6 -2
  77. package/dist/join-dashboard.d.ts.map +1 -1
  78. package/dist/join-dashboard.js +4 -2
  79. package/dist/join-dashboard.js.map +1 -1
  80. package/dist/module-types/dashboard/components/SettingsRows.d.ts +2 -2
  81. package/dist/module-types/src/appearance.d.ts +1 -1
  82. package/dist/module-types/src/dashboard/elsewhere.d.ts +1 -1
  83. package/dist/module-types/src/dashboard/rpc-serve.d.ts +6 -0
  84. package/dist/module-types/src/dashboard/run-inbox.d.ts +4 -3
  85. package/dist/module-types/src/dashboard-rpc/control.d.ts +22 -6
  86. package/dist/module-types/src/dashboard-rpc/index.d.ts +3 -1
  87. package/dist/module-types/src/dashboard-rpc/personal-folder.d.ts +22 -0
  88. package/dist/module-types/src/dashboard-rpc/project-agent-data.d.ts +19 -0
  89. package/dist/module-types/src/dashboard-rpc/projects.d.ts +3 -5
  90. package/dist/module-types/src/index.d.ts +0 -1
  91. package/dist/module-types/src/personal-folder-shown.d.ts +10 -0
  92. package/dist/module-types/src/registry.d.ts +1 -1
  93. package/dist/module-types/src/repository-url.d.ts +6 -0
  94. package/dist/module-types/src/secure-address.d.ts +31 -0
  95. package/dist/personal-folder-shown.d.ts +11 -0
  96. package/dist/personal-folder-shown.d.ts.map +1 -0
  97. package/dist/personal-folder-shown.js +8 -0
  98. package/dist/personal-folder-shown.js.map +1 -0
  99. package/dist/registry.d.ts +1 -1
  100. package/dist/registry.d.ts.map +1 -1
  101. package/dist/registry.js +1 -1
  102. package/dist/registry.js.map +1 -1
  103. package/dist/remove-files.d.ts +4 -3
  104. package/dist/remove-files.d.ts.map +1 -1
  105. package/dist/remove-files.js +6 -1
  106. package/dist/remove-files.js.map +1 -1
  107. package/dist/repository-url.d.ts +7 -0
  108. package/dist/repository-url.d.ts.map +1 -0
  109. package/dist/repository-url.js +17 -0
  110. package/dist/repository-url.js.map +1 -0
  111. package/dist/secure-address.d.ts +32 -0
  112. package/dist/secure-address.d.ts.map +1 -0
  113. package/dist/secure-address.js +50 -0
  114. package/dist/secure-address.js.map +1 -0
  115. package/dist/store/run-record.d.ts.map +1 -1
  116. package/dist/store/run-record.js +1 -0
  117. package/dist/store/run-record.js.map +1 -1
  118. package/dist/terminal.js +2 -0
  119. package/dist/terminal.js.map +1 -1
  120. package/dist/website/assets/chunks/chunk-BPgR-CZq.js +1 -0
  121. package/dist/website/assets/chunks/chunk-D1NQcEen.js +1 -0
  122. package/dist/website/assets/chunks/chunk-DeonM-eN.js +3 -0
  123. package/dist/website/assets/chunks/chunk-kQ9-9YDn.js +18 -0
  124. package/dist/website/assets/emoji-compass.svg +75 -0
  125. package/dist/website/assets/emoji-confused.svg +34 -0
  126. package/dist/website/assets/emoji-construction.svg +188 -0
  127. package/dist/website/assets/emoji-flex.svg +1 -0
  128. package/dist/website/assets/emoji-hand-raised.svg +180 -0
  129. package/dist/website/assets/emoji-mech-arm.svg +1 -0
  130. package/dist/website/assets/emoji-robot.svg +105 -0
  131. package/dist/website/assets/emoji-rocket.svg +49 -0
  132. package/dist/website/assets/entries/entry-client-routing.C33s8xOY.js +2 -0
  133. package/dist/website/assets/entries/pages_banner.BaN84ozS.js +1 -0
  134. package/dist/website/assets/entries/pages_go-to-dashboard.C3OBfFYB.js +1 -0
  135. package/dist/website/assets/entries/pages_index.DEALARsw.js +1 -0
  136. package/dist/website/assets/entries/pages_press.nvOiFHiQ.js +1 -0
  137. package/dist/website/assets/logo.svg +34 -0
  138. package/dist/website/assets/static/pages_index_styles-f7bc93a7.KSL83pUG.css +1 -0
  139. package/dist/website/banner/index.html +28 -0
  140. package/dist/website/banner/index.pageContext.json +1 -0
  141. package/dist/website/banner.jpg +0 -0
  142. package/dist/website/go-to-dashboard/index.html +30 -0
  143. package/dist/website/go-to-dashboard/index.pageContext.json +1 -0
  144. package/dist/website/index.html +30 -0
  145. package/dist/website/index.pageContext.json +1 -0
  146. package/dist/website/press/index.html +29 -0
  147. package/dist/website/press/index.pageContext.json +1 -0
  148. package/package.json +29 -25
  149. package/dist/dashboard-bundle/assets/host/module-BjrL8fFt.js +0 -1
  150. package/dist/dashboard-bundle/assets/main-C50vMcm3.js +0 -152
  151. package/dist/dashboard-bundle/assets/main-DkmEveyx.css +0 -2
  152. package/dist/module-types/src/repository-address.d.ts +0 -36
  153. package/dist/repository-address.d.ts +0 -37
  154. package/dist/repository-address.d.ts.map +0 -1
  155. package/dist/repository-address.js +0 -59
  156. package/dist/repository-address.js.map +0 -1
@@ -0,0 +1,82 @@
1
+ import { stat } from 'node:fs/promises';
2
+ import { dirname, join } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+ import { fileIn, sendFile } from './static.js';
5
+ /**
6
+ * The website on an installed computer (#1919). There, the website's own name is answered by this
7
+ * dashboard (the secure address), which carries a copy of the website, built with it into
8
+ * `dist/website`. Its `/` shows the dashboard, or the landing page once the person picks it on
9
+ * the toggle under the logo; the website's other pages are at their own paths, beside the
10
+ * dashboard's, whose files never have the same names.
11
+ */
12
+ /** Where the toggle is answered: `HEAD /_view` says this is the dashboard's copy, `/_view/<view>` picks one. */
13
+ export const VIEW_PREFIX = '/_view';
14
+ /** What `/` shows, kept in the browser. */
15
+ export const VIEW_COOKIE = 'openagent-view';
16
+ /** The website's copy, when the dashboard was built with one. */
17
+ export async function resolveWebsite() {
18
+ // From the package root, as the dashboard bundle is: the same folder from `dist/`, `dist-test/` and `src/`.
19
+ const dir = join(dirname(fileURLToPath(import.meta.url)), '..', '..', 'dist', 'website');
20
+ return (await stat(join(dir, 'index.html')).then(s => s.isFile()).catch(() => false)) ? dir : undefined;
21
+ }
22
+ /** The view this browser picked, if it picked one. */
23
+ function pickedView(req) {
24
+ const cookies = (req.headers.cookie ?? '').split(';').map(part => part.trim());
25
+ if (cookies.includes(`${VIEW_COOKIE}=landing`))
26
+ return 'landing';
27
+ return cookies.includes(`${VIEW_COOKIE}=dashboard`) ? 'dashboard' : undefined;
28
+ }
29
+ /** What `/` shows this browser: the dashboard, unless it picked the landing page. */
30
+ export function viewOf(req) {
31
+ return pickedView(req) ?? 'dashboard';
32
+ }
33
+ /** The cookie that keeps `view`. Readable by the page: it is how the dashboard knows to draw the toggle. */
34
+ function viewCookie(view) {
35
+ return `${VIEW_COOKIE}=${view}; Path=/; Max-Age=31536000; Secure; SameSite=Lax`;
36
+ }
37
+ /**
38
+ * A browser on the secure address that picked nothing yet is given the dashboard as its pick, so
39
+ * the dashboard's page knows from its first frame that the toggle is there (its `ViewToggle`).
40
+ */
41
+ export function keepView(req, res) {
42
+ if (pickedView(req) === undefined)
43
+ res.setHeader('set-cookie', viewCookie('dashboard'));
44
+ }
45
+ /**
46
+ * The toggle's own route. `/_view` answers 204, which is how a page tells this copy from the
47
+ * public website (404 there). `/_view/landing` and `/_view/dashboard` keep the pick and go to `/`.
48
+ */
49
+ export function handleViewRequest(res, pathname) {
50
+ if (pathname === VIEW_PREFIX) {
51
+ res.writeHead(204).end();
52
+ return;
53
+ }
54
+ const view = pathname.slice(VIEW_PREFIX.length + 1);
55
+ if (view !== 'landing' && view !== 'dashboard') {
56
+ res.writeHead(404, { 'content-type': 'text/plain' }).end('no such view');
57
+ return;
58
+ }
59
+ res
60
+ .writeHead(303, {
61
+ location: '/',
62
+ 'set-cookie': viewCookie(view),
63
+ 'cache-control': 'no-store',
64
+ })
65
+ .end();
66
+ }
67
+ /**
68
+ * Serve the website's file for this request, when it is one: its landing page at `/` when this
69
+ * browser picked it, and any of its other files at its own path. Resolves false when the request
70
+ * is the dashboard's.
71
+ */
72
+ export async function serveWebsite(req, res, dir, pathname) {
73
+ if (pathname === '/' && viewOf(req) === 'dashboard')
74
+ return false;
75
+ const target = await fileIn(dir, pathname);
76
+ if (target === undefined)
77
+ return false;
78
+ // A browser asks again for `/` each time, and the two pages are told apart by their tags, so a switch shows at once.
79
+ await sendFile(req, res, dir, target);
80
+ return true;
81
+ }
82
+ //# sourceMappingURL=website.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"website.js","sourceRoot":"","sources":["../../src/dashboard/website.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE9C;;;;;;GAMG;AAEH,gHAAgH;AAChH,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAA;AACnC,2CAA2C;AAC3C,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAA;AAI3C,iEAAiE;AACjE,MAAM,CAAC,KAAK,UAAU,cAAc;IAClC,4GAA4G;IAC5G,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,CAAA;IACxF,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAA;AACzG,CAAC;AAED,sDAAsD;AACtD,SAAS,UAAU,CAAC,GAAoB;IACtC,MAAM,OAAO,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,E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,UAAU,CAAC,IAAI,CAAC;QAC9B,eAAe,EAAE,UAAU;KAC5B,CAAC;SACD,GAAG,EAAE,CAAA;AACV,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,GAAoB,EAAE,GAAmB,EAAE,GAAW,EAAE,QAAgB;IACzG,IAAI,QAAQ,KAAK,GAAG,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,WAAW;QAAE,OAAO,KAAK,CAAA;IACjE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;IAC1C,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,KAAK,CAAA;IACtC,qHAAqH;IACrH,MAAM,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,CAAA;IACrC,OAAO,IAAI,CAAA;AACb,CAAC"}
@@ -0,0 +1 @@
1
+ import{$ as e,A as t,B as n,Bn as r,Cr as i,Ct as a,D as o,Dn as s,Er as c,Et as l,F as u,Fr as d,H as f,Ha as p,I as m,J as h,K as g,L as _,La as v,Lr as y,M as b,Mt as x,N as S,Nt as C,O as w,Or as T,P as E,Pr as D,Q as O,R as k,Ra as A,Rt as j,Si as M,Sn as N,Sr as P,St as F,T as I,Tr as L,Tt as R,U as z,Ua as B,V,Vn as H,W as U,Wa as W,X as G,Y as K,Z as q,_ as J,a as Y,at as X,bn as Z,br as Q,c as $,ct as ee,dn as te,dr as ne,et as re,f as ie,fn as ae,gn as oe,i as se,ir as ce,it as le,j as ue,jr as de,k as fe,l as pe,mn as me,n as he,nt as ge,o as _e,ot as ve,p as ye,pn as be,q as xe,qa as Se,r as Ce,rr as we,s as Te,t as Ee,u as De,un as Oe,v as ke,vn as Ae,vr as je,w as Me,wi as Ne,wt as Pe,x as Fe,xi as Ie,xn as Le,xr as Re,y as ze,yn as Be,z as Ve,za as He,zn as Ue,zt as We}from"../module-DY3Aigsz.js";export{z as Badge,v as Button,F as Card,a as CardContent,Pe as CardHeader,R as CardTitle,l as CardTitleLink,X as Checkbox,P as ClaudeLogo,i as CodexLogo,re as ConfirmDialog,w as ContextMenu,fe as ContextMenuTrigger,x as Dialog,t as DiffStat,ae as DropdownMenu,be as DropdownMenuCheckboxItem,me as DropdownMenuContent,oe as DropdownMenuItem,Ae as DropdownMenuSeparator,Be as DropdownMenuSub,Z as DropdownMenuSubContent,Le as DropdownMenuSubTrigger,N as DropdownMenuTrigger,ke as FileIcon,ge as FileLinks,ze as FilterChips,U as GaugeFace,we as Input,u as Label,ye as LinkActions,Se as MAX_SPEND_OFFSET,y as MachineMark,le as Markdown,Ee as ModuleHostContext,Me as Page,I as PaneActions,o as PaneTitle,D as PersonMark,ve as Pieces,b as Popover,S as PopoverContent,E as PopoverTrigger,De as QrCode,Ue as RadioGroup,r as RadioGroupItem,H as RadioGroupOption,ue as RangeSlider,s as ScrollArea,K as Select,G as SelectContent,q as SelectItem,O as SelectTrigger,e as SelectValue,Oe as Separator,g as SettingsRow,xe as SettingsSection,h as SettingsSelectRow,te as Skeleton,J as StartAgentButton,Fe as StatTile,f as Switch,m as Table,_ as TableBody,k as TableCell,Ve as TableHead,n as TableHeader,V as TableRow,C as Textarea,Ie as Tooltip,M as TooltipContent,Ne as TooltipTrigger,$ as Waiting,A as buttonVariants,He as cn,he as defineModule,je as forgetRemembered,L as formatAge,c as formatDateTime,T as formatDuration,de as formatRelative,p as machineKind,B as machineName,Ce as moduleHost,Y as pathsIn,d as personName,j as personSaid,W as reachedByLine,ce as useAction,ne as useCodingAgents,_e as useFileNames,We as useGitHostPeople,ee as useHighlighted,Q as useLoaded,se as useModuleHost,pe as useNarrow,Re as usePolled,Te as useSchedule,ie as useSettingsCrumb};