@researai/deepscientist 1.5.0 → 1.5.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.
Files changed (163) hide show
  1. package/AGENTS.md +26 -0
  2. package/README.md +19 -179
  3. package/assets/connectors/lingzhu/openclaw-bridge/README.md +124 -0
  4. package/assets/connectors/lingzhu/openclaw-bridge/index.ts +162 -0
  5. package/assets/connectors/lingzhu/openclaw-bridge/openclaw.plugin.json +145 -0
  6. package/assets/connectors/lingzhu/openclaw-bridge/package.json +35 -0
  7. package/assets/connectors/lingzhu/openclaw-bridge/src/cli.ts +180 -0
  8. package/assets/connectors/lingzhu/openclaw-bridge/src/config.ts +196 -0
  9. package/assets/connectors/lingzhu/openclaw-bridge/src/debug-log.ts +111 -0
  10. package/assets/connectors/lingzhu/openclaw-bridge/src/events.ts +4 -0
  11. package/assets/connectors/lingzhu/openclaw-bridge/src/http-handler.ts +1133 -0
  12. package/assets/connectors/lingzhu/openclaw-bridge/src/image-cache.ts +75 -0
  13. package/assets/connectors/lingzhu/openclaw-bridge/src/lingzhu-tools.ts +246 -0
  14. package/assets/connectors/lingzhu/openclaw-bridge/src/transform.ts +541 -0
  15. package/assets/connectors/lingzhu/openclaw-bridge/src/types.ts +131 -0
  16. package/assets/connectors/lingzhu/openclaw-bridge/tsconfig.json +14 -0
  17. package/assets/connectors/lingzhu/openclaw.lingzhu.config.template.json +39 -0
  18. package/bin/ds.js +233 -53
  19. package/docs/en/00_QUICK_START.md +134 -0
  20. package/docs/en/01_SETTINGS_REFERENCE.md +1104 -0
  21. package/docs/en/02_START_RESEARCH_GUIDE.md +404 -0
  22. package/docs/en/03_QQ_CONNECTOR_GUIDE.md +325 -0
  23. package/docs/en/04_LINGZHU_CONNECTOR_GUIDE.md +216 -0
  24. package/docs/en/05_TUI_GUIDE.md +141 -0
  25. package/docs/en/06_RUNTIME_AND_CANVAS.md +679 -0
  26. package/docs/en/07_MEMORY_AND_MCP.md +253 -0
  27. package/docs/en/08_FIGURE_STYLE_GUIDE.md +97 -0
  28. package/docs/en/09_DOCTOR.md +108 -0
  29. package/docs/en/90_ARCHITECTURE.md +245 -0
  30. package/docs/en/91_DEVELOPMENT.md +195 -0
  31. package/docs/en/99_ACKNOWLEDGEMENTS.md +29 -0
  32. package/docs/zh/00_QUICK_START.md +134 -0
  33. package/docs/zh/01_SETTINGS_REFERENCE.md +1137 -0
  34. package/docs/zh/02_START_RESEARCH_GUIDE.md +414 -0
  35. package/docs/zh/03_QQ_CONNECTOR_GUIDE.md +324 -0
  36. package/docs/zh/04_LINGZHU_CONNECTOR_GUIDE.md +230 -0
  37. package/docs/zh/05_TUI_GUIDE.md +128 -0
  38. package/docs/zh/06_RUNTIME_AND_CANVAS.md +271 -0
  39. package/docs/zh/07_MEMORY_AND_MCP.md +235 -0
  40. package/docs/zh/08_FIGURE_STYLE_GUIDE.md +97 -0
  41. package/docs/zh/09_DOCTOR.md +112 -0
  42. package/docs/zh/99_ACKNOWLEDGEMENTS.md +29 -0
  43. package/install.sh +32 -8
  44. package/package.json +4 -2
  45. package/pyproject.toml +1 -1
  46. package/src/deepscientist/artifact/guidance.py +9 -2
  47. package/src/deepscientist/artifact/service.py +482 -22
  48. package/src/deepscientist/bash_exec/monitor.py +27 -5
  49. package/src/deepscientist/bash_exec/runtime.py +639 -0
  50. package/src/deepscientist/bash_exec/service.py +99 -16
  51. package/src/deepscientist/bridges/base.py +3 -0
  52. package/src/deepscientist/bridges/connectors.py +292 -13
  53. package/src/deepscientist/channels/qq.py +19 -2
  54. package/src/deepscientist/channels/relay.py +1 -0
  55. package/src/deepscientist/cli.py +32 -25
  56. package/src/deepscientist/config/models.py +28 -2
  57. package/src/deepscientist/config/service.py +201 -6
  58. package/src/deepscientist/connector_runtime.py +2 -0
  59. package/src/deepscientist/daemon/api/handlers.py +50 -5
  60. package/src/deepscientist/daemon/api/router.py +1 -0
  61. package/src/deepscientist/daemon/app.py +442 -15
  62. package/src/deepscientist/doctor.py +444 -0
  63. package/src/deepscientist/home.py +1 -0
  64. package/src/deepscientist/latex_runtime.py +17 -4
  65. package/src/deepscientist/lingzhu_support.py +182 -0
  66. package/src/deepscientist/mcp/server.py +49 -2
  67. package/src/deepscientist/prompts/builder.py +181 -58
  68. package/src/deepscientist/quest/layout.py +1 -0
  69. package/src/deepscientist/quest/service.py +63 -2
  70. package/src/deepscientist/quest/stage_views.py +19 -1
  71. package/src/deepscientist/runtime_tools/__init__.py +16 -0
  72. package/src/deepscientist/runtime_tools/builtins.py +19 -0
  73. package/src/deepscientist/runtime_tools/models.py +29 -0
  74. package/src/deepscientist/runtime_tools/registry.py +40 -0
  75. package/src/deepscientist/runtime_tools/service.py +59 -0
  76. package/src/deepscientist/runtime_tools/tinytex.py +25 -0
  77. package/src/deepscientist/tinytex.py +276 -0
  78. package/src/prompts/connectors/lingzhu.md +12 -0
  79. package/src/prompts/connectors/qq.md +121 -0
  80. package/src/prompts/system.md +177 -33
  81. package/src/skills/analysis-campaign/SKILL.md +22 -6
  82. package/src/skills/baseline/SKILL.md +5 -4
  83. package/src/skills/decision/SKILL.md +4 -3
  84. package/src/skills/experiment/SKILL.md +5 -4
  85. package/src/skills/finalize/SKILL.md +5 -4
  86. package/src/skills/idea/SKILL.md +5 -4
  87. package/src/skills/intake-audit/SKILL.md +277 -0
  88. package/src/skills/intake-audit/references/state-audit-template.md +41 -0
  89. package/src/skills/rebuttal/SKILL.md +407 -0
  90. package/src/skills/rebuttal/references/action-plan-template.md +63 -0
  91. package/src/skills/rebuttal/references/evidence-update-template.md +30 -0
  92. package/src/skills/rebuttal/references/response-letter-template.md +113 -0
  93. package/src/skills/rebuttal/references/review-matrix-template.md +55 -0
  94. package/src/skills/review/SKILL.md +293 -0
  95. package/src/skills/review/references/experiment-todo-template.md +29 -0
  96. package/src/skills/review/references/review-report-template.md +83 -0
  97. package/src/skills/review/references/revision-log-template.md +40 -0
  98. package/src/skills/scout/SKILL.md +5 -4
  99. package/src/skills/write/SKILL.md +7 -3
  100. package/src/tui/dist/components/WelcomePanel.js +17 -43
  101. package/src/tui/dist/components/messages/BashExecOperationMessage.js +3 -2
  102. package/src/tui/package.json +1 -1
  103. package/src/ui/dist/assets/{AiManusChatView-7v-dHngU.js → AiManusChatView-w5lF2Ttt.js} +109 -575
  104. package/src/ui/dist/assets/{AnalysisPlugin-B_Xmz-KE.js → AnalysisPlugin-DJOED79I.js} +1 -1
  105. package/src/ui/dist/assets/{AutoFigurePlugin-Cko-0tm1.js → AutoFigurePlugin-DaG61Y0M.js} +63 -8
  106. package/src/ui/dist/assets/{CliPlugin-BsU0ht7q.js → CliPlugin-CV4LqUB_.js} +43 -609
  107. package/src/ui/dist/assets/{CodeEditorPlugin-DcMMP0Rt.js → CodeEditorPlugin-DylfAea4.js} +8 -8
  108. package/src/ui/dist/assets/{CodeViewerPlugin-BqoQ5QyY.js → CodeViewerPlugin-F7saY0LM.js} +5 -5
  109. package/src/ui/dist/assets/{DocViewerPlugin-D7eHNhU6.js → DocViewerPlugin-COP0c7jf.js} +3 -3
  110. package/src/ui/dist/assets/{GitDiffViewerPlugin-DLJN42T5.js → GitDiffViewerPlugin-CAS05pT9.js} +1 -1
  111. package/src/ui/dist/assets/{ImageViewerPlugin-gJMV7MOu.js → ImageViewerPlugin-Bco1CN_w.js} +5 -6
  112. package/src/ui/dist/assets/{LabCopilotPanel-B857sfxP.js → LabCopilotPanel-CvMlCD99.js} +12 -15
  113. package/src/ui/dist/assets/LabPlugin-BYankkE4.js +2676 -0
  114. package/src/ui/dist/assets/LabPlugin-D9jVIo0A.css +2698 -0
  115. package/src/ui/dist/assets/{LatexPlugin-DWKEo-Wj.js → LatexPlugin-LDSMR-t-.js} +16 -16
  116. package/src/ui/dist/assets/{MarkdownViewerPlugin-DBzoEmhv.js → MarkdownViewerPlugin-B7o80jgm.js} +4 -4
  117. package/src/ui/dist/assets/{MarketplacePlugin-DoHc-8vo.js → MarketplacePlugin-CM6ZOcpC.js} +3 -3
  118. package/src/ui/dist/assets/{NotebookEditor-CKjKH-yS.js → NotebookEditor-Dc61cXmK.js} +3 -3
  119. package/src/ui/dist/assets/{PdfLoader-zFoL0VPo.js → PdfLoader-DWowuQwx.js} +1 -1
  120. package/src/ui/dist/assets/{PdfMarkdownPlugin-DXPaL9Nt.js → PdfMarkdownPlugin-BsJM1q_a.js} +3 -3
  121. package/src/ui/dist/assets/{PdfViewerPlugin-DhK8qCFp.js → PdfViewerPlugin-DB2eEEFQ.js} +10 -10
  122. package/src/ui/dist/assets/{SearchPlugin-CdSi6krf.js → SearchPlugin-CraThSvt.js} +1 -1
  123. package/src/ui/dist/assets/{Stepper-V-WiDQJl.js → Stepper-CgocRTPq.js} +1 -1
  124. package/src/ui/dist/assets/{TextViewerPlugin-hIs1Efiu.js → TextViewerPlugin-B1JGhKtd.js} +4 -4
  125. package/src/ui/dist/assets/{VNCViewer-DG8b0q2X.js → VNCViewer-CclFC7FM.js} +9 -10
  126. package/src/ui/dist/assets/{bibtex-HDac6fVW.js → bibtex-D3IKsMl7.js} +1 -1
  127. package/src/ui/dist/assets/{code-BnBeNxBc.js → code-BP37Xx0p.js} +1 -1
  128. package/src/ui/dist/assets/{file-content-IRQ3jHb8.js → file-content-BAJSu-9r.js} +1 -1
  129. package/src/ui/dist/assets/{file-diff-panel-DZoQ9I6r.js → file-diff-panel-DUGeCTuy.js} +1 -1
  130. package/src/ui/dist/assets/{file-socket-BMCdLc-P.js → file-socket-CXc1Ojf7.js} +1 -1
  131. package/src/ui/dist/assets/{file-utils-CltILB3w.js → file-utils-2J21jt7M.js} +1 -1
  132. package/src/ui/dist/assets/{image-Boe6ffhu.js → image-CMMmgvcn.js} +1 -1
  133. package/src/ui/dist/assets/{index-BlplpvE1.js → index-BaVumsQT.js} +2 -2
  134. package/src/ui/dist/assets/{index-DZqJ-qAM.js → index-CWgMgpow.js} +60 -2154
  135. package/src/ui/dist/assets/{index-DO43pFZP.js → index-DmwmJmbW.js} +6372 -8434
  136. package/src/ui/dist/assets/{index-Bq2bvfkl.css → index-KGt-z-dD.css} +225 -2920
  137. package/src/ui/dist/assets/{index-2Zf65FZt.js → index-s7aHnNQ4.js} +1 -1
  138. package/src/ui/dist/assets/{message-square-mUHn_Ssb.js → message-square-CQRfX0Am.js} +1 -1
  139. package/src/ui/dist/assets/{monaco-fe0arNEU.js → monaco-B4TbdsrF.js} +1 -1
  140. package/src/ui/dist/assets/{popover-D_7i19qU.js → popover-B8Rokodk.js} +1 -1
  141. package/src/ui/dist/assets/{project-sync-DyVGrU7H.js → project-sync-D_i96KH4.js} +2 -8
  142. package/src/ui/dist/assets/{sigma-BzazRyxQ.js → sigma-D12PnzCN.js} +1 -1
  143. package/src/ui/dist/assets/{tooltip-DN_yjHFH.js → tooltip-B6YrI4aJ.js} +1 -1
  144. package/src/ui/dist/assets/trash-Bc8jGp0V.js +32 -0
  145. package/src/ui/dist/assets/{useCliAccess-DV2L2Qxy.js → useCliAccess-mXVCYSZ-.js} +12 -42
  146. package/src/ui/dist/assets/{useFileDiffOverlay-DyTj-p_V.js → useFileDiffOverlay-Bg6b9H9K.js} +1 -1
  147. package/src/ui/dist/assets/{wrap-text-ozYHtUwq.js → wrap-text-Drh5GEnL.js} +1 -1
  148. package/src/ui/dist/assets/{zoom-out-BN9MUyCQ.js → zoom-out-CJj9DZLn.js} +1 -1
  149. package/src/ui/dist/index.html +2 -2
  150. package/assets/fonts/Inter-Variable.ttf +0 -0
  151. package/assets/fonts/NotoSerifSC-Regular-C94HN_ZN.ttf +0 -0
  152. package/assets/fonts/NunitoSans-Variable.ttf +0 -0
  153. package/assets/fonts/Satoshi-Medium-ByP-Zb-9.woff2 +0 -0
  154. package/assets/fonts/SourceSans3-Variable.ttf +0 -0
  155. package/assets/fonts/ds-fonts.css +0 -83
  156. package/src/ui/dist/assets/Inter-Variable-VF2RPR_K.ttf +0 -0
  157. package/src/ui/dist/assets/LabPlugin-bL7rpic8.js +0 -43
  158. package/src/ui/dist/assets/NotoSerifSC-Regular-C94HN_ZN-C94HN_ZN.ttf +0 -0
  159. package/src/ui/dist/assets/NunitoSans-Variable-B_ZymHAd.ttf +0 -0
  160. package/src/ui/dist/assets/Satoshi-Medium-ByP-Zb-9-GkA34YXu.woff2 +0 -0
  161. package/src/ui/dist/assets/SourceSans3-Variable-CD-WOsSK.ttf +0 -0
  162. package/src/ui/dist/assets/info-CcsK_htA.js +0 -18
  163. package/src/ui/dist/assets/user-plus-BusDx-hF.js +0 -79
@@ -1,9 +1,9 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-2Zf65FZt.js","assets/index-DO43pFZP.js","assets/index-Bq2bvfkl.css"])))=>i.map(i=>d[i]);
2
- import { o as createLucideIcon, bP as interpolate, bQ as frame, bR as isMotionValue, bS as JSAnimation, bT as useMotionValue, bU as useIsomorphicLayoutEffect, bV as cancelFrame, bW as collectMotionValues, bX as useConstant, r as reactExports, bY as MotionConfigContext, bZ as useInView, j as jsxRuntimeExports, b as cn, u as useI18n, b_ as useCliStore, _ as __vitePreload, bH as ChevronRight, g as RefreshCw, b3 as Plus, a$ as ScrollArea, bE as ChevronLeft, b$ as GlareHover, a6 as Button, bJ as Input, l as Search, k as FileText, c0 as Folder, aa as Terminal, H as Sparkles, b9 as Dialog, ba as DialogContent, bb as DialogHeader, bc as DialogTitle, bI as DialogDescription, bd as DialogFooter, c1 as useTerminal, b4 as Select, b5 as SelectTrigger, b6 as SelectValue, b7 as SelectContent, b8 as SelectItem, c2 as uploadCliFile, br as Textarea, c3 as CircleCheck, K as create, bK as persist, w as useToast, c4 as unbindCliServer, I as ConnectionState, c5 as updateCliSession, c6 as SpotlightCard, bk as DropdownMenu, bl as DropdownMenuTrigger, bm as DropdownMenuContent, bo as DropdownMenuItem, a0 as Play, c7 as DropdownMenuSeparator, X, c8 as Pencil, J as EnhancedTerminal, c9 as listCliSessions, ca as FadeContent, y as apiClient, cb as getMyToken, c as copyToClipboard, cc as Bell, cd as Trash2, d as Check, ce as getCliServerMetrics, cf as refreshCliServerStatus, cg as ResponsiveContainer, ch as LineChart, ci as XAxis, cj as YAxis, ck as Tooltip, cl as Line, cm as getCliHealth, cn as Cpu, co as listCliFiles, cp as readCliFile, cq as writeCliFile, cr as deleteCliFile, cs as axios, a1 as Download, v as useTabsStore, ct as getPluginIdFromExtension, z as BUILTIN_PLUGINS, cu as getPluginIdFromMimeType, cv as downloadCliFile, cw as buildCliFileId, cx as toCliResourcePath, cy as Upload, L as LoaderCircle, cz as listCliLogs, cA as getCliLogObject, cB as listCliTasks, T as TriangleAlert, cC as listCliFindings, cD as listCliMethods, cE as createCliMethod, cF as listCliServers, bh as listCliShares, cG as createCliShare, cH as updateCliShare, cI as deleteCliShare, cJ as updateCliServer, cK as removeCliServerFromProject, A as useMaxEntitlement, cL as Noise } from './index-DO43pFZP.js';
3
- import { S as Server, L as Layers, n as normalizePath, f as formatFileSize, s as splitPath, j as joinPath, a as findSensitiveMarker, D as DOWNLOAD_MAX_BYTES, T as TEXT_PREVIEW_MAX_BYTES } from './file-utils-CltILB3w.js';
4
- import { S as SquareCheckBig } from './index-2Zf65FZt.js';
5
- import { w as wrapEnvelope, g as getCliClientId, c as acquireCliSocket, n as nextSeq, d as unwrapPayload, a as useCliSocket, e as buildSharedSessionId, f as buildConversationSessionId, u as useCliAccess } from './useCliAccess-DV2L2Qxy.js';
6
- import { C as CloudUpload, S as Stepper, a as Step } from './Stepper-V-WiDQJl.js';
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-s7aHnNQ4.js","assets/index-DmwmJmbW.js","assets/index-KGt-z-dD.css"])))=>i.map(i=>d[i]);
2
+ import { z as createLucideIcon, cj as interpolate, ck as frame, cl as isMotionValue, cm as JSAnimation, cn as useMotionValue, co as useIsomorphicLayoutEffect, cp as cancelFrame, cq as collectMotionValues, cr as useConstant, r as reactExports, cs as MotionConfigContext, ct as useInView, j as jsxRuntimeExports, b as cn, u as useI18n, bG as useCliStore, _ as __vitePreload, c5 as ChevronRight, g as RefreshCw, b2 as Plus, aZ as ScrollArea, c2 as ChevronLeft, cu as GlareHover, a3 as Button, c7 as Input, l as Search, k as FileText, cv as Folder, a7 as Terminal, D as Sparkles, b8 as Dialog, b9 as DialogContent, ba as DialogHeader, bb as DialogTitle, c6 as DialogDescription, bc as DialogFooter, cw as useTerminal, b3 as Select, b4 as SelectTrigger, b5 as SelectValue, b6 as SelectContent, b7 as SelectItem, cx as uploadCliFile, bU as Textarea, cy as CircleCheck, I as create, c8 as persist, v as useToast, cz as unbindCliServer, G as ConnectionState, cA as updateCliSession, cB as SpotlightCard, bO as DropdownMenu, bP as DropdownMenuTrigger, bQ as DropdownMenuContent, bS as DropdownMenuItem, Z as Play, cC as DropdownMenuSeparator, X, cD as Pencil, H as EnhancedTerminal, cE as listCliSessions, cF as FadeContent, x as apiClient, cG as getMyToken, c as copyToClipboard, cH as Bell, cc as Trash2, d as Check, cI as getCliServerMetrics, cJ as refreshCliServerStatus, cK as ResponsiveContainer, cL as LineChart, cM as XAxis, cN as YAxis, cO as Tooltip, cP as Line, cQ as getCliHealth, cR as Cpu, cS as listCliFiles, cT as readCliFile, cU as writeCliFile, cV as deleteCliFile, cW as axios, $ as Download, t as useTabsStore, cX as getPluginIdFromExtension, y as BUILTIN_PLUGINS, cY as getPluginIdFromMimeType, cZ as downloadCliFile, c_ as buildCliFileId, c$ as toCliResourcePath, d0 as Upload, L as LoaderCircle, d1 as listCliLogs, d2 as getCliLogObject, d3 as listCliTasks, T as TriangleAlert, d4 as listCliFindings, d5 as listCliMethods, d6 as createCliMethod, bL as useMaxEntitlement, d7 as Noise } from './index-DmwmJmbW.js';
3
+ import { S as Server, L as Layers, n as normalizePath, f as formatFileSize, s as splitPath, j as joinPath, a as findSensitiveMarker, D as DOWNLOAD_MAX_BYTES, T as TEXT_PREVIEW_MAX_BYTES } from './file-utils-2J21jt7M.js';
4
+ import { S as SquareCheckBig } from './index-s7aHnNQ4.js';
5
+ import { w as wrapEnvelope, g as getCliClientId, c as acquireCliSocket, n as nextSeq, d as unwrapPayload, a as useCliSocket, e as buildDefaultSessionId, f as buildConversationSessionId, u as useCliAccess } from './useCliAccess-mXVCYSZ-.js';
6
+ import { C as CloudUpload, S as Stepper, a as Step } from './Stepper-CgocRTPq.js';
7
7
 
8
8
  /**
9
9
  * @license lucide-react v0.511.0 - ISC
@@ -466,7 +466,7 @@ const statusClasses$1 = {
466
466
  idle: "bg-[var(--cli-status-idle)]",
467
467
  busy: "bg-[var(--cli-status-busy)]"
468
468
  };
469
- function formatTimestamp$9(value) {
469
+ function formatTimestamp$8(value) {
470
470
  if (!value) return "n/a";
471
471
  const parsed = new Date(value);
472
472
  if (Number.isNaN(parsed.getTime())) return "n/a";
@@ -521,7 +521,7 @@ function ServerCard({
521
521
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-2 text-[10px] text-[var(--cli-muted-1)]", children: [
522
522
  server.status,
523
523
  " · Last heartbeat ",
524
- formatTimestamp$9(server.last_seen_at)
524
+ formatTimestamp$8(server.last_seen_at)
525
525
  ] })
526
526
  ]
527
527
  }
@@ -616,7 +616,7 @@ function ServerList({
616
616
  const container = listRef.current;
617
617
  const targets = container.querySelectorAll("[data-cli-server-card]");
618
618
  if (targets.length === 0) return;
619
- __vitePreload(async () => { const {default: anime} = await import('./index-2Zf65FZt.js').then(n => n.i);return { default: anime }},true?__vite__mapDeps([0,1,2]):void 0).then(({ default: anime }) => {
619
+ __vitePreload(async () => { const {default: anime} = await import('./index-s7aHnNQ4.js').then(n => n.i);return { default: anime }},true?__vite__mapDeps([0,1,2]):void 0).then(({ default: anime }) => {
620
620
  if (cancelled) return;
621
621
  anime({
622
622
  targets,
@@ -1359,7 +1359,7 @@ function BatchOperationsDialog({
1359
1359
  const sessionByServerRef = reactExports.useRef(/* @__PURE__ */ new Map());
1360
1360
  const closeTimeoutByServerRef = reactExports.useRef(/* @__PURE__ */ new Map());
1361
1361
  const clientIdRef = reactExports.useRef(crypto.randomUUID());
1362
- const { socket, release } = reactExports.useMemo(() => acquireCliSocket({ authMode: "user" }), []);
1362
+ const { socket, release } = reactExports.useMemo(() => acquireCliSocket({ }), []);
1363
1363
  const emitEnvelope = reactExports.useCallback(
1364
1364
  (event, serverId, payload, meta = {}) => {
1365
1365
  const envelope = wrapEnvelope(payload, {
@@ -1971,7 +1971,6 @@ function TerminalView({
1971
1971
  projectId,
1972
1972
  server,
1973
1973
  readOnly,
1974
- authMode,
1975
1974
  canUnbind
1976
1975
  }) {
1977
1976
  const sessionManagerRef = reactExports.useRef(new SessionManager());
@@ -2003,7 +2002,6 @@ function TerminalView({
2003
2002
  const persistTimeoutRef = reactExports.useRef(null);
2004
2003
  const recordingPersistRef = reactExports.useRef(/* @__PURE__ */ new Map());
2005
2004
  const lastStatusRef = reactExports.useRef(server.status);
2006
- const sharedSessionIdRef = reactExports.useRef(null);
2007
2005
  const autoCreatedRef = reactExports.useRef(false);
2008
2006
  const recordingRef = reactExports.useRef(/* @__PURE__ */ new Map());
2009
2007
  const terminalSerializeRef = reactExports.useRef(() => "");
@@ -2324,7 +2322,6 @@ function TerminalView({
2324
2322
  const { socket, status, sendTerminalInput, sendTerminalResize, emitEnvelope } = useCliSocket({
2325
2323
  projectId,
2326
2324
  serverId: server.id,
2327
- authMode,
2328
2325
  handlers: socketHandlers
2329
2326
  });
2330
2327
  const requestSessionRecovery = reactExports.useCallback(
@@ -2479,16 +2476,15 @@ function TerminalView({
2479
2476
  return null;
2480
2477
  }
2481
2478
  }, [activeSessionId, captureSerialized, clearTerminal, emitEnvelope, server.id, setSessionsInStore]);
2482
- const ensureSharedSession = reactExports.useCallback(async () => {
2479
+ const ensureDefaultSession = reactExports.useCallback(async () => {
2483
2480
  if (!projectId) return null;
2484
- const sharedId = await buildSharedSessionId(projectId, server.id);
2485
- sharedSessionIdRef.current = sharedId;
2486
- const existing = sessionManagerRef.current.getSession(sharedId);
2481
+ const defaultSessionId = await buildDefaultSessionId(projectId, server.id);
2482
+ const existing = sessionManagerRef.current.getSession(defaultSessionId);
2487
2483
  if (existing && existing.state !== "closed") {
2488
2484
  setActiveSessionId(existing.id);
2489
2485
  return existing;
2490
2486
  }
2491
- return createSession({ id: sharedId });
2487
+ return createSession({ id: defaultSessionId });
2492
2488
  }, [createSession, projectId, server.id]);
2493
2489
  const ensureConversationSession = reactExports.useCallback(async () => {
2494
2490
  if (!projectId || !conversationId) return null;
@@ -2544,7 +2540,7 @@ function TerminalView({
2544
2540
  });
2545
2541
  const updated2 = sessionManagerRef.current.getSessionsByServer(server.id);
2546
2542
  if (updated2.length === 0) {
2547
- await ensureSharedSession();
2543
+ await ensureDefaultSession();
2548
2544
  return;
2549
2545
  }
2550
2546
  setSessions(updated2);
@@ -2558,7 +2554,7 @@ function TerminalView({
2558
2554
  const persisted = loadPersistedSessions().filter((session) => session.serverId === server.id);
2559
2555
  if (persisted.length === 0) {
2560
2556
  if (sessionManagerRef.current.getSessionsByServer(server.id).length === 0) {
2561
- await ensureSharedSession();
2557
+ await ensureDefaultSession();
2562
2558
  }
2563
2559
  return;
2564
2560
  }
@@ -2587,7 +2583,7 @@ function TerminalView({
2587
2583
  }
2588
2584
  const updated = sessionManagerRef.current.getSessionsByServer(server.id);
2589
2585
  if (updated.length === 0) {
2590
- await ensureSharedSession();
2586
+ await ensureDefaultSession();
2591
2587
  return;
2592
2588
  }
2593
2589
  setSessions(updated);
@@ -2595,7 +2591,7 @@ function TerminalView({
2595
2591
  setActiveSessionId(updated[0]?.id ?? null);
2596
2592
  };
2597
2593
  void restore();
2598
- }, [projectId, status.state, server.id, socket, createSession, ensureSharedSession, setSessionsInStore]);
2594
+ }, [projectId, status.state, server.id, socket, createSession, ensureDefaultSession, setSessionsInStore]);
2599
2595
  reactExports.useEffect(() => {
2600
2596
  if (autoCreatedRef.current) return;
2601
2597
  if (sessions.length > 0 || activeSessionId) return;
@@ -2603,9 +2599,9 @@ function TerminalView({
2603
2599
  if (conversationId) {
2604
2600
  void ensureConversationSession();
2605
2601
  } else {
2606
- void ensureSharedSession();
2602
+ void ensureDefaultSession();
2607
2603
  }
2608
- }, [activeSessionId, conversationId, ensureConversationSession, ensureSharedSession, sessions.length]);
2604
+ }, [activeSessionId, conversationId, ensureConversationSession, ensureDefaultSession, sessions.length]);
2609
2605
  const restoreActiveSession = reactExports.useCallback(() => {
2610
2606
  if (!activeSession || !terminalReady) return;
2611
2607
  clearTerminal();
@@ -3519,7 +3515,7 @@ const statusClasses = {
3519
3515
  idle: "bg-[var(--cli-status-idle)] text-[var(--cli-ink-0)]",
3520
3516
  busy: "bg-[var(--cli-status-busy)] text-[var(--cli-ink-0)]"
3521
3517
  };
3522
- function formatTimestamp$8(value) {
3518
+ function formatTimestamp$7(value) {
3523
3519
  if (!value) return "n/a";
3524
3520
  const parsed = new Date(value);
3525
3521
  if (Number.isNaN(parsed.getTime())) return "n/a";
@@ -3575,7 +3571,6 @@ function OverviewPanel({
3575
3571
  server,
3576
3572
  connectionStatus,
3577
3573
  accessLabel,
3578
- isShareView,
3579
3574
  canUnbind
3580
3575
  }) {
3581
3576
  const statusClass = statusClasses[server.status] || statusClasses.offline;
@@ -3696,7 +3691,7 @@ function OverviewPanel({
3696
3691
  ] }),
3697
3692
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
3698
3693
  "Last heartbeat: ",
3699
- formatTimestamp$8(server.last_seen_at)
3694
+ formatTimestamp$7(server.last_seen_at)
3700
3695
  ] })
3701
3696
  ] })
3702
3697
  ] }),
@@ -3719,8 +3714,7 @@ function OverviewPanel({
3719
3714
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-1", children: [
3720
3715
  "Access: ",
3721
3716
  accessLabel || "n/a"
3722
- ] }),
3723
- isShareView ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-1", children: "Share view" }) : null
3717
+ ] })
3724
3718
  ] })
3725
3719
  ] }) }) }),
3726
3720
  /* @__PURE__ */ jsxRuntimeExports.jsx(FadeContent, { delay: 0.05, duration: 0.45, y: 12, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid gap-4 md:grid-cols-3", children: [
@@ -3777,7 +3771,7 @@ function OverviewPanel({
3777
3771
  ] }),
3778
3772
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-3 text-[11px] text-[var(--cli-muted-1)]", children: [
3779
3773
  "Last checked: ",
3780
- formatTimestamp$8(health?.timestamp)
3774
+ formatTimestamp$7(health?.timestamp)
3781
3775
  ] })
3782
3776
  ] }),
3783
3777
  /* @__PURE__ */ jsxRuntimeExports.jsxs(SpotlightCard, { className: "cli-card rounded-2xl border border-white/40 bg-white/70 p-4", children: [
@@ -4030,7 +4024,7 @@ const formatRelative$1 = (value) => {
4030
4024
  if (diffMs < 864e5) return `${Math.round(diffMs / 36e5)}h ago`;
4031
4025
  return `${Math.round(diffMs / 864e5)}d ago`;
4032
4026
  };
4033
- const formatTimestamp$7 = (value) => {
4027
+ const formatTimestamp$6 = (value) => {
4034
4028
  if (!value) return "n/a";
4035
4029
  const parsed = new Date(value);
4036
4030
  if (Number.isNaN(parsed.getTime())) return "n/a";
@@ -4386,7 +4380,7 @@ function FileBrowser({
4386
4380
  "Last heartbeat ",
4387
4381
  formatRelative$1(serverLastSeenAt),
4388
4382
  " (",
4389
- formatTimestamp$7(serverLastSeenAt),
4383
+ formatTimestamp$6(serverLastSeenAt),
4390
4384
  ")"
4391
4385
  ] })
4392
4386
  ] }) : null,
@@ -4514,7 +4508,7 @@ function useOperationLogs(projectId, serverId) {
4514
4508
  };
4515
4509
  }
4516
4510
 
4517
- function formatTimestamp$6(value) {
4511
+ function formatTimestamp$5(value) {
4518
4512
  if (!value) return "n/a";
4519
4513
  const parsed = new Date(value);
4520
4514
  if (Number.isNaN(parsed.getTime())) return "n/a";
@@ -4527,9 +4521,9 @@ function OperationLogItem({
4527
4521
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3 rounded-xl border border-white/40 bg-white/70 px-4 py-3", children: [
4528
4522
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
4529
4523
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-sm font-medium text-[var(--cli-ink-1)]", children: [
4530
- formatTimestamp$6(log.time_start),
4524
+ formatTimestamp$5(log.time_start),
4531
4525
  " - ",
4532
- formatTimestamp$6(log.time_end)
4526
+ formatTimestamp$5(log.time_end)
4533
4527
  ] }),
4534
4528
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-1 text-xs text-[var(--cli-muted-1)]", children: [
4535
4529
  log.entry_count,
@@ -4550,7 +4544,7 @@ function toIso(value) {
4550
4544
  if (Number.isNaN(parsed.getTime())) return void 0;
4551
4545
  return parsed.toISOString();
4552
4546
  }
4553
- function formatTimestamp$5(value) {
4547
+ function formatTimestamp$4(value) {
4554
4548
  if (!value) return "n/a";
4555
4549
  const parsed = new Date(value);
4556
4550
  if (Number.isNaN(parsed.getTime())) return "n/a";
@@ -4913,7 +4907,7 @@ function OperationLogs({
4913
4907
  {
4914
4908
  className: "flex items-center justify-between gap-3 border-b border-white/30 px-3 py-2 text-xs text-[var(--cli-muted-1)]",
4915
4909
  children: [
4916
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "min-w-[160px] text-[var(--cli-ink-1)]", children: formatTimestamp$5(stamp) }),
4910
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "min-w-[160px] text-[var(--cli-ink-1)]", children: formatTimestamp$4(stamp) }),
4917
4911
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "min-w-[120px] text-[var(--cli-ink-1)]", children: eventType || "event" }),
4918
4912
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "min-w-[120px]", children: actor || "n/a" }),
4919
4913
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "min-w-[80px]", children: level || "n/a" }),
@@ -4929,7 +4923,7 @@ function OperationLogs({
4929
4923
  ] });
4930
4924
  }
4931
4925
 
4932
- function formatTimestamp$4(value) {
4926
+ function formatTimestamp$3(value) {
4933
4927
  if (!value) return "n/a";
4934
4928
  const parsed = new Date(value);
4935
4929
  if (Number.isNaN(parsed.getTime())) return "n/a";
@@ -5018,7 +5012,7 @@ function TasksPanel({ projectId, serverId }) {
5018
5012
  let cancelled = false;
5019
5013
  const targets = listRef.current.querySelectorAll("[data-cli-task-item]");
5020
5014
  if (targets.length === 0) return;
5021
- __vitePreload(async () => { const {default: anime} = await import('./index-2Zf65FZt.js').then(n => n.i);return { default: anime }},true?__vite__mapDeps([0,1,2]):void 0).then(({ default: anime }) => {
5015
+ __vitePreload(async () => { const {default: anime} = await import('./index-s7aHnNQ4.js').then(n => n.i);return { default: anime }},true?__vite__mapDeps([0,1,2]):void 0).then(({ default: anime }) => {
5022
5016
  if (cancelled) return;
5023
5017
  anime({
5024
5018
  targets,
@@ -5079,7 +5073,7 @@ function TasksPanel({ projectId, serverId }) {
5079
5073
  ] }),
5080
5074
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-1 text-xs text-[var(--cli-muted-1)]", children: [
5081
5075
  "Updated: ",
5082
- formatTimestamp$4(task.updated_at)
5076
+ formatTimestamp$3(task.updated_at)
5083
5077
  ] })
5084
5078
  ]
5085
5079
  },
@@ -5088,7 +5082,7 @@ function TasksPanel({ projectId, serverId }) {
5088
5082
  ] });
5089
5083
  }
5090
5084
 
5091
- function formatTimestamp$3(value) {
5085
+ function formatTimestamp$2(value) {
5092
5086
  if (!value) return "n/a";
5093
5087
  const parsed = new Date(value);
5094
5088
  if (Number.isNaN(parsed.getTime())) return "n/a";
@@ -5145,7 +5139,7 @@ function FindingsPanel({ projectId, serverId }) {
5145
5139
  let cancelled = false;
5146
5140
  const targets = listRef.current.querySelectorAll("[data-cli-finding-item]");
5147
5141
  if (targets.length === 0) return;
5148
- __vitePreload(async () => { const {default: anime} = await import('./index-2Zf65FZt.js').then(n => n.i);return { default: anime }},true?__vite__mapDeps([0,1,2]):void 0).then(({ default: anime }) => {
5142
+ __vitePreload(async () => { const {default: anime} = await import('./index-s7aHnNQ4.js').then(n => n.i);return { default: anime }},true?__vite__mapDeps([0,1,2]):void 0).then(({ default: anime }) => {
5149
5143
  if (cancelled) return;
5150
5144
  anime({
5151
5145
  targets,
@@ -5206,7 +5200,7 @@ function FindingsPanel({ projectId, serverId }) {
5206
5200
  ] }),
5207
5201
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-1 text-xs text-[var(--cli-muted-1)]", children: [
5208
5202
  "Updated: ",
5209
- formatTimestamp$3(finding.updated_at)
5203
+ formatTimestamp$2(finding.updated_at)
5210
5204
  ] })
5211
5205
  ]
5212
5206
  },
@@ -5222,13 +5216,13 @@ const createId = () => {
5222
5216
  return `method-${Date.now()}-${Math.random().toString(16).slice(2)}`;
5223
5217
  }
5224
5218
  };
5225
- const formatTimestamp$2 = (value) => {
5219
+ const formatTimestamp$1 = (value) => {
5226
5220
  if (!value) return "n/a";
5227
5221
  const parsed = new Date(value);
5228
5222
  if (Number.isNaN(parsed.getTime())) return String(value);
5229
5223
  return parsed.toLocaleString();
5230
5224
  };
5231
- function MethodPanel({ projectId, serverId, canCreate, authMode = "user" }) {
5225
+ function MethodPanel({ projectId, serverId, canCreate }) {
5232
5226
  const [methods, setMethods] = reactExports.useState([]);
5233
5227
  const [methodsLoading, setMethodsLoading] = reactExports.useState(false);
5234
5228
  const [methodsError, setMethodsError] = reactExports.useState(null);
@@ -5321,7 +5315,6 @@ function MethodPanel({ projectId, serverId, canCreate, authMode = "user" }) {
5321
5315
  useCliSocket({
5322
5316
  projectId,
5323
5317
  serverId,
5324
- authMode,
5325
5318
  handlers: socketHandlers
5326
5319
  });
5327
5320
  reactExports.useEffect(() => {
@@ -5660,7 +5653,7 @@ function MethodPanel({ projectId, serverId, canCreate, authMode = "user" }) {
5660
5653
  ] }),
5661
5654
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
5662
5655
  "Created: ",
5663
- formatTimestamp$2(method.created_at)
5656
+ formatTimestamp$1(method.created_at)
5664
5657
  ] })
5665
5658
  ] })
5666
5659
  ]
@@ -5673,544 +5666,6 @@ function MethodPanel({ projectId, serverId, canCreate, authMode = "user" }) {
5673
5666
  ] });
5674
5667
  }
5675
5668
 
5676
- const Label = reactExports.forwardRef(
5677
- ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
5678
- "label",
5679
- {
5680
- ref,
5681
- className: cn(
5682
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
5683
- className
5684
- ),
5685
- ...props
5686
- }
5687
- )
5688
- );
5689
- Label.displayName = "Label";
5690
-
5691
- function formatTimestamp$1(value) {
5692
- if (!value) return "n/a";
5693
- const parsed = new Date(value);
5694
- if (Number.isNaN(parsed.getTime())) return "n/a";
5695
- return parsed.toLocaleString();
5696
- }
5697
- function AdminPanel({
5698
- projectId,
5699
- serverId,
5700
- readOnly
5701
- }) {
5702
- const { addToast } = useToast();
5703
- const [server, setServer] = reactExports.useState(null);
5704
- const [serverName, setServerName] = reactExports.useState("");
5705
- const [serverLoading, setServerLoading] = reactExports.useState(false);
5706
- const [serverError, setServerError] = reactExports.useState(null);
5707
- const [serverUpdating, setServerUpdating] = reactExports.useState(false);
5708
- const [serverRefreshing, setServerRefreshing] = reactExports.useState(false);
5709
- const [serverUnbinding, setServerUnbinding] = reactExports.useState(false);
5710
- const [serverRemoving, setServerRemoving] = reactExports.useState(false);
5711
- const [shares, setShares] = reactExports.useState([]);
5712
- const [isLoading, setIsLoading] = reactExports.useState(false);
5713
- const [error, setError] = reactExports.useState(null);
5714
- const [email, setEmail] = reactExports.useState("");
5715
- const [permission, setPermission] = reactExports.useState("view");
5716
- const [expiresAt, setExpiresAt] = reactExports.useState("");
5717
- const [allowTerminalInput, setAllowTerminalInput] = reactExports.useState(true);
5718
- const [allowFileEdit, setAllowFileEdit] = reactExports.useState(true);
5719
- const [updatingShare, setUpdatingShare] = reactExports.useState(null);
5720
- const refreshServers = useCliStore((state) => state.refreshServers);
5721
- const setActiveServer = useCliStore((state) => state.setActiveServer);
5722
- const loadServer = reactExports.useCallback(async () => {
5723
- setServerLoading(true);
5724
- setServerError(null);
5725
- try {
5726
- const response = await listCliServers(projectId);
5727
- const match = response.find((item) => item.id === serverId) ?? null;
5728
- setServer(match);
5729
- setServerName(match?.name ?? "");
5730
- if (!match) setServerError("Server not found");
5731
- } catch (err) {
5732
- console.error("[CLI] Failed to load server:", err);
5733
- setServerError("Failed to load server details");
5734
- } finally {
5735
- setServerLoading(false);
5736
- }
5737
- }, [projectId, serverId]);
5738
- const loadShares = reactExports.useCallback(async () => {
5739
- setIsLoading(true);
5740
- setError(null);
5741
- try {
5742
- const response = await listCliShares(projectId, serverId);
5743
- setShares(response.users);
5744
- } catch (err) {
5745
- console.error("[CLI] Failed to load shares:", err);
5746
- setError("Failed to load shares");
5747
- } finally {
5748
- setIsLoading(false);
5749
- }
5750
- }, [projectId, serverId]);
5751
- reactExports.useEffect(() => {
5752
- void loadShares();
5753
- void loadServer();
5754
- }, [loadServer, loadShares]);
5755
- const handleCreateShare = reactExports.useCallback(async () => {
5756
- if (readOnly) return;
5757
- if (!email.trim()) return;
5758
- const payload = {
5759
- email: email.trim(),
5760
- permission,
5761
- edit_granularity: permission === "edit" ? { allowTerminalInput, allowFileEdit } : void 0,
5762
- expires_at: expiresAt ? new Date(expiresAt).toISOString() : void 0
5763
- };
5764
- try {
5765
- await createCliShare(projectId, serverId, payload);
5766
- setEmail("");
5767
- setExpiresAt("");
5768
- await loadShares();
5769
- } catch (err) {
5770
- addToast({
5771
- type: "error",
5772
- title: "Share failed",
5773
- description: "Unable to create share for this user."
5774
- });
5775
- }
5776
- }, [
5777
- addToast,
5778
- allowFileEdit,
5779
- allowTerminalInput,
5780
- email,
5781
- expiresAt,
5782
- loadShares,
5783
- permission,
5784
- projectId,
5785
- readOnly,
5786
- serverId
5787
- ]);
5788
- const handleUpdateShare = reactExports.useCallback(
5789
- async (share, updates) => {
5790
- if (readOnly) return;
5791
- setUpdatingShare(share.id);
5792
- try {
5793
- const nextPermission = updates.permission ?? share.permission;
5794
- await updateCliShare(projectId, serverId, share.id, {
5795
- permission: nextPermission,
5796
- edit_granularity: nextPermission === "edit" ? {
5797
- allowTerminalInput: updates.edit_granularity?.allowTerminalInput ?? share.edit_granularity?.allowTerminalInput ?? true,
5798
- allowFileEdit: updates.edit_granularity?.allowFileEdit ?? share.edit_granularity?.allowFileEdit ?? true
5799
- } : void 0,
5800
- expires_at: updates.expires_at ?? void 0
5801
- });
5802
- await loadShares();
5803
- } catch (err) {
5804
- addToast({
5805
- type: "error",
5806
- title: "Update failed",
5807
- description: "Unable to update this share."
5808
- });
5809
- } finally {
5810
- setUpdatingShare(null);
5811
- }
5812
- },
5813
- [addToast, loadShares, projectId, readOnly, serverId]
5814
- );
5815
- const handleDeleteShare = reactExports.useCallback(
5816
- async (shareId) => {
5817
- if (readOnly) return;
5818
- try {
5819
- await deleteCliShare(projectId, serverId, shareId);
5820
- setShares((prev) => prev.filter((share) => share.id !== shareId));
5821
- } catch (err) {
5822
- addToast({
5823
- type: "error",
5824
- title: "Delete failed",
5825
- description: "Unable to remove this share."
5826
- });
5827
- }
5828
- },
5829
- [addToast, projectId, readOnly, serverId]
5830
- );
5831
- const handleUpdateServerName = reactExports.useCallback(async () => {
5832
- if (readOnly || !server) return;
5833
- setServerUpdating(true);
5834
- try {
5835
- const updated = await updateCliServer(projectId, serverId, { name: serverName.trim() || void 0 });
5836
- setServer(updated);
5837
- setServerName(updated.name ?? "");
5838
- } catch (err) {
5839
- addToast({
5840
- type: "error",
5841
- title: "Update failed",
5842
- description: "Unable to update the server name."
5843
- });
5844
- } finally {
5845
- setServerUpdating(false);
5846
- }
5847
- }, [addToast, projectId, readOnly, server, serverId, serverName]);
5848
- const handleRefreshServer = reactExports.useCallback(async () => {
5849
- if (readOnly) return;
5850
- setServerRefreshing(true);
5851
- try {
5852
- await refreshCliServerStatus(projectId, serverId);
5853
- await loadServer();
5854
- } catch (err) {
5855
- addToast({
5856
- type: "error",
5857
- title: "Refresh failed",
5858
- description: "Unable to refresh server status."
5859
- });
5860
- } finally {
5861
- setServerRefreshing(false);
5862
- }
5863
- }, [addToast, loadServer, projectId, readOnly, serverId]);
5864
- const handleRemoveServer = reactExports.useCallback(async () => {
5865
- if (readOnly) return;
5866
- const confirmed = window.confirm(
5867
- "Remove this server from the current project? It will stay available for other projects."
5868
- );
5869
- if (!confirmed) return;
5870
- setServerRemoving(true);
5871
- try {
5872
- const response = await removeCliServerFromProject(projectId, serverId);
5873
- await refreshServers();
5874
- setActiveServer(null);
5875
- await loadServer();
5876
- addToast({
5877
- type: "success",
5878
- title: response.action === "unbound" ? "Server unbound" : "Server removed",
5879
- description: response.action === "unbound" ? "The legacy server was unbound and disconnected." : "The server has been removed from this project."
5880
- });
5881
- } catch (err) {
5882
- addToast({
5883
- type: "error",
5884
- title: "Remove failed",
5885
- description: "Unable to remove this server."
5886
- });
5887
- } finally {
5888
- setServerRemoving(false);
5889
- }
5890
- }, [addToast, loadServer, projectId, readOnly, refreshServers, serverId, setActiveServer]);
5891
- const handleUnbindServer = reactExports.useCallback(async () => {
5892
- if (readOnly) return;
5893
- const confirmed = window.confirm(
5894
- "Unbind this server globally? The agent will disconnect and be removed from all projects."
5895
- );
5896
- if (!confirmed) return;
5897
- setServerUnbinding(true);
5898
- try {
5899
- await unbindCliServer(projectId, serverId);
5900
- await refreshServers();
5901
- setActiveServer(null);
5902
- await loadServer();
5903
- addToast({
5904
- type: "success",
5905
- title: "Server unbound",
5906
- description: "The server has been disconnected and removed from all projects."
5907
- });
5908
- } catch (err) {
5909
- addToast({
5910
- type: "error",
5911
- title: "Unbind failed",
5912
- description: "Unable to unbind this server."
5913
- });
5914
- } finally {
5915
- setServerUnbinding(false);
5916
- }
5917
- }, [addToast, loadServer, projectId, readOnly, refreshServers, serverId, setActiveServer]);
5918
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
5919
- /* @__PURE__ */ jsxRuntimeExports.jsx(FadeContent, { duration: 0.45, y: 12, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(SpotlightCard, { className: "rounded-2xl border border-white/40 bg-white/70 p-5", children: [
5920
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-wrap items-start justify-between gap-3", children: [
5921
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
5922
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-base font-semibold text-[var(--cli-ink-1)]", children: "Server governance" }),
5923
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-2 text-xs text-[var(--cli-muted-1)]", children: "Monitor identity, refresh status, or disconnect this server. Actions apply immediately." }),
5924
- readOnly ? /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-2 text-xs text-[var(--cli-muted-1)]", children: "You have view-only access in this workspace." }) : null
5925
- ] }),
5926
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-[10px] text-[var(--cli-muted-1)]", children: server ? `Status: ${server.status}` : "Server unavailable" })
5927
- ] }),
5928
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 grid gap-4 lg:grid-cols-[1.2fr_0.8fr]", children: [
5929
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "rounded-xl border border-white/40 bg-white/70 p-4 text-xs text-[var(--cli-muted-1)]", children: [
5930
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm font-semibold text-[var(--cli-ink-1)]", children: "Identity" }),
5931
- serverLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-2", children: "Loading server details..." }) : null,
5932
- serverError ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-2", children: serverError }) : null,
5933
- server ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-3 grid gap-2", children: [
5934
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
5935
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "rounded-full border border-white/60 bg-white/80 px-2 py-0.5 text-[10px] text-[var(--cli-muted-1)]", children: [
5936
- "Status: ",
5937
- server.status
5938
- ] }),
5939
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "rounded-full border border-white/60 bg-white/80 px-2 py-0.5 text-[10px] text-[var(--cli-muted-1)]", children: [
5940
- "Host: ",
5941
- server.hostname
5942
- ] })
5943
- ] }),
5944
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
5945
- "IP: ",
5946
- server.ip_address ?? "n/a"
5947
- ] }),
5948
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
5949
- "OS: ",
5950
- server.os_info ?? "n/a"
5951
- ] }),
5952
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
5953
- "Last heartbeat: ",
5954
- formatTimestamp$1(server.last_seen_at)
5955
- ] }),
5956
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
5957
- "Registered: ",
5958
- formatTimestamp$1(server.registered_at)
5959
- ] })
5960
- ] }) : null,
5961
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 grid gap-3 md:grid-cols-[1fr_auto]", children: [
5962
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1", children: [
5963
- /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { htmlFor: "cli-server-name", children: "Server name" }),
5964
- /* @__PURE__ */ jsxRuntimeExports.jsx(
5965
- Input,
5966
- {
5967
- id: "cli-server-name",
5968
- value: serverName,
5969
- onChange: (event) => setServerName(event.target.value),
5970
- placeholder: "e.g. GPU rig 01",
5971
- disabled: readOnly || serverLoading || !server
5972
- }
5973
- )
5974
- ] }),
5975
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
5976
- Button,
5977
- {
5978
- size: "sm",
5979
- onClick: handleUpdateServerName,
5980
- isLoading: serverUpdating,
5981
- disabled: readOnly || !server || serverUpdating || serverLoading,
5982
- children: "Update name"
5983
- }
5984
- ) })
5985
- ] })
5986
- ] }),
5987
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "rounded-xl border border-white/40 bg-white/70 p-4 text-xs text-[var(--cli-muted-1)]", children: [
5988
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm font-semibold text-[var(--cli-ink-1)]", children: "Compliance controls" }),
5989
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-2", children: "Use refresh to pull the latest heartbeat. Remove hides this server for the current project." }),
5990
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-3 flex flex-wrap gap-2", children: [
5991
- /* @__PURE__ */ jsxRuntimeExports.jsx(
5992
- Button,
5993
- {
5994
- variant: "secondary",
5995
- size: "sm",
5996
- onClick: handleRefreshServer,
5997
- isLoading: serverRefreshing,
5998
- disabled: readOnly || !server,
5999
- children: "Refresh status"
6000
- }
6001
- ),
6002
- /* @__PURE__ */ jsxRuntimeExports.jsx(
6003
- Button,
6004
- {
6005
- variant: "secondary",
6006
- size: "sm",
6007
- onClick: handleRemoveServer,
6008
- isLoading: serverRemoving,
6009
- disabled: readOnly || !server,
6010
- children: "Remove from project"
6011
- }
6012
- ),
6013
- /* @__PURE__ */ jsxRuntimeExports.jsx(
6014
- Button,
6015
- {
6016
- variant: "destructive",
6017
- size: "sm",
6018
- onClick: handleUnbindServer,
6019
- isLoading: serverUnbinding,
6020
- disabled: readOnly || !server,
6021
- children: "Unbind globally"
6022
- }
6023
- )
6024
- ] }),
6025
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-3 grid gap-1 text-[10px] text-[var(--cli-muted-1)]", children: [
6026
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
6027
- "Device fingerprint: ",
6028
- server?.device_fingerprint ?? "n/a"
6029
- ] }),
6030
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
6031
- "Server root: ",
6032
- server?.server_root ?? "n/a"
6033
- ] })
6034
- ] })
6035
- ] })
6036
- ] })
6037
- ] }) }),
6038
- /* @__PURE__ */ jsxRuntimeExports.jsx(FadeContent, { delay: 0.1, duration: 0.45, y: 12, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(SpotlightCard, { className: "rounded-2xl border border-white/40 bg-white/70 p-5", children: [
6039
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-base font-semibold text-[var(--cli-ink-1)]", children: "Share access" }),
6040
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-2 text-xs text-[var(--cli-muted-1)]", children: "Invite project members to access this CLI server. All changes apply immediately." }),
6041
- readOnly ? /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-2 text-xs text-[var(--cli-muted-1)]", children: "You have view-only access in this workspace." }) : null,
6042
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 grid gap-3 md:grid-cols-[1.4fr_0.8fr_0.8fr_auto]", children: [
6043
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1", children: [
6044
- /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { htmlFor: "cli-share-email", children: "User email" }),
6045
- /* @__PURE__ */ jsxRuntimeExports.jsx(
6046
- Input,
6047
- {
6048
- id: "cli-share-email",
6049
- value: email,
6050
- onChange: (event) => setEmail(event.target.value),
6051
- placeholder: "teammate@example.com",
6052
- disabled: readOnly
6053
- }
6054
- )
6055
- ] }),
6056
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1", children: [
6057
- /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { children: "Permission" }),
6058
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
6059
- "select",
6060
- {
6061
- value: permission,
6062
- onChange: (event) => setPermission(event.target.value),
6063
- className: "w-full rounded-lg border border-white/40 bg-white/70 px-3 py-2 text-sm text-[var(--cli-ink-1)]",
6064
- disabled: readOnly,
6065
- children: [
6066
- /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "view", children: "View" }),
6067
- /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "edit", children: "Edit" }),
6068
- /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "admin", children: "Admin" })
6069
- ]
6070
- }
6071
- )
6072
- ] }),
6073
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1", children: [
6074
- /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { children: "Expiry" }),
6075
- /* @__PURE__ */ jsxRuntimeExports.jsx(
6076
- Input,
6077
- {
6078
- type: "datetime-local",
6079
- value: expiresAt,
6080
- onChange: (event) => setExpiresAt(event.target.value),
6081
- disabled: readOnly
6082
- }
6083
- )
6084
- ] }),
6085
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { size: "sm", onClick: handleCreateShare, disabled: readOnly || !email.trim(), children: "Add share" }) })
6086
- ] }),
6087
- permission === "edit" ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-3 flex flex-wrap gap-3 text-xs text-[var(--cli-muted-1)]", children: [
6088
- /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "flex items-center gap-2", children: [
6089
- /* @__PURE__ */ jsxRuntimeExports.jsx(
6090
- "input",
6091
- {
6092
- type: "checkbox",
6093
- checked: allowTerminalInput,
6094
- onChange: (event) => setAllowTerminalInput(event.target.checked),
6095
- disabled: readOnly
6096
- }
6097
- ),
6098
- "Allow terminal input"
6099
- ] }),
6100
- /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "flex items-center gap-2", children: [
6101
- /* @__PURE__ */ jsxRuntimeExports.jsx(
6102
- "input",
6103
- {
6104
- type: "checkbox",
6105
- checked: allowFileEdit,
6106
- onChange: (event) => setAllowFileEdit(event.target.checked),
6107
- disabled: readOnly
6108
- }
6109
- ),
6110
- "Allow file edit/upload/delete"
6111
- ] })
6112
- ] }) : null
6113
- ] }) }),
6114
- /* @__PURE__ */ jsxRuntimeExports.jsx(FadeContent, { delay: 0.15, duration: 0.45, y: 12, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(SpotlightCard, { className: "rounded-2xl border border-white/40 bg-white/70 p-5", children: [
6115
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm font-semibold text-[var(--cli-ink-1)]", children: "Current shares" }),
6116
- isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-3 text-xs text-[var(--cli-muted-1)]", children: "Loading shares..." }) : null,
6117
- error ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-3 text-xs text-[var(--cli-muted-1)]", children: error }) : null,
6118
- !isLoading && shares.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-3 text-xs text-[var(--cli-muted-1)]", children: "No shared users yet." }) : null,
6119
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-3 space-y-3", children: shares.map((share) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
6120
- "div",
6121
- {
6122
- className: "rounded-xl border border-white/40 bg-white/70 px-4 py-3 text-xs text-[var(--cli-muted-1)]",
6123
- children: [
6124
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [
6125
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
6126
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm font-medium text-[var(--cli-ink-1)]", children: share.name }),
6127
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: share.email })
6128
- ] }),
6129
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
6130
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
6131
- "select",
6132
- {
6133
- value: share.permission,
6134
- onChange: (event) => handleUpdateShare(share, { permission: event.target.value }),
6135
- className: "rounded-lg border border-white/40 bg-white/70 px-2 py-1 text-xs text-[var(--cli-ink-1)]",
6136
- disabled: readOnly || updatingShare === share.id,
6137
- children: [
6138
- /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "view", children: "View" }),
6139
- /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "edit", children: "Edit" }),
6140
- /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "admin", children: "Admin" })
6141
- ]
6142
- }
6143
- ),
6144
- /* @__PURE__ */ jsxRuntimeExports.jsx(
6145
- Button,
6146
- {
6147
- variant: "secondary",
6148
- size: "sm",
6149
- onClick: () => handleDeleteShare(share.id),
6150
- disabled: readOnly || updatingShare === share.id,
6151
- children: "Remove"
6152
- }
6153
- )
6154
- ] })
6155
- ] }),
6156
- share.permission === "edit" ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-2 flex flex-wrap gap-3", children: [
6157
- /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "flex items-center gap-2", children: [
6158
- /* @__PURE__ */ jsxRuntimeExports.jsx(
6159
- "input",
6160
- {
6161
- type: "checkbox",
6162
- checked: share.edit_granularity?.allowTerminalInput ?? true,
6163
- onChange: (event) => handleUpdateShare(share, {
6164
- edit_granularity: {
6165
- allowTerminalInput: event.target.checked,
6166
- allowFileEdit: share.edit_granularity?.allowFileEdit ?? true
6167
- }
6168
- }),
6169
- disabled: readOnly || updatingShare === share.id
6170
- }
6171
- ),
6172
- "Allow terminal input"
6173
- ] }),
6174
- /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "flex items-center gap-2", children: [
6175
- /* @__PURE__ */ jsxRuntimeExports.jsx(
6176
- "input",
6177
- {
6178
- type: "checkbox",
6179
- checked: share.edit_granularity?.allowFileEdit ?? true,
6180
- onChange: (event) => handleUpdateShare(share, {
6181
- edit_granularity: {
6182
- allowTerminalInput: share.edit_granularity?.allowTerminalInput ?? true,
6183
- allowFileEdit: event.target.checked
6184
- }
6185
- }),
6186
- disabled: readOnly || updatingShare === share.id
6187
- }
6188
- ),
6189
- "Allow file edit/upload/delete"
6190
- ] })
6191
- ] }) : null,
6192
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-2 grid gap-1 text-[10px] text-[var(--cli-muted-1)]", children: [
6193
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
6194
- "Shared: ",
6195
- formatTimestamp$1(share.shared_at)
6196
- ] }),
6197
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
6198
- "Expires: ",
6199
- formatTimestamp$1(share.expires_at)
6200
- ] }),
6201
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
6202
- "Last access: ",
6203
- formatTimestamp$1(share.last_access_at)
6204
- ] })
6205
- ] })
6206
- ]
6207
- },
6208
- share.id
6209
- )) })
6210
- ] }) })
6211
- ] });
6212
- }
6213
-
6214
5669
  const isOfflineStatus = (status) => status === "offline" || status === "error";
6215
5670
  const formatRelative = (value) => {
6216
5671
  if (!value) return "n/a";
@@ -6267,13 +5722,11 @@ function CliPlugin({ context, setTitle }) {
6267
5722
  readOnly
6268
5723
  });
6269
5724
  const canManageServers = access.permission === "admin" || access.permission === "owner";
6270
- const canSeeAdmin = access.capabilities.manage_permissions;
6271
5725
  const canTerminalInput = access.capabilities.terminal_input;
6272
5726
  const canFileEdit = access.capabilities.file_edit;
6273
5727
  const canFileDelete = access.capabilities.file_delete;
6274
5728
  const canFileUpload = access.capabilities.file_upload;
6275
5729
  const canFileDownload = access.capabilities.file_download;
6276
- const canManagePermissions = access.capabilities.manage_permissions;
6277
5730
  const canUnbindServer = access.capabilities.disconnect_server;
6278
5731
  const tabItems = reactExports.useMemo(
6279
5732
  () => {
@@ -6285,19 +5738,11 @@ function CliPlugin({ context, setTitle }) {
6285
5738
  { value: "tasks", label: t("tab_tasks") },
6286
5739
  { value: "findings", label: t("tab_findings") }
6287
5740
  ];
6288
- if (canSeeAdmin) {
6289
- items.push({ value: "admin", label: t("tab_admin") });
6290
- }
6291
5741
  items.push({ value: "overview", label: t("tab_overview") });
6292
5742
  return items;
6293
5743
  },
6294
- [canSeeAdmin, t]
5744
+ [t]
6295
5745
  );
6296
- reactExports.useEffect(() => {
6297
- if (activeTab === "admin" && !canSeeAdmin) {
6298
- setActiveTab("overview");
6299
- }
6300
- }, [activeTab, canSeeAdmin]);
6301
5746
  if (!projectId) {
6302
5747
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "cli-root flex h-full items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-[var(--cli-muted-1)]", children: t("no_project_selected") }) });
6303
5748
  }
@@ -6344,7 +5789,6 @@ function CliPlugin({ context, setTitle }) {
6344
5789
  projectId,
6345
5790
  server: activeServer,
6346
5791
  readOnly: !canTerminalInput,
6347
- authMode: access.isShareView ? "share" : "user",
6348
5792
  canUnbind: canUnbindServer
6349
5793
  }
6350
5794
  ) }, activeTab) : /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollArea, { className: "flex-1 min-h-0 pr-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "h-full min-h-0 cli-tab-enter", children: [
@@ -6355,7 +5799,6 @@ function CliPlugin({ context, setTitle }) {
6355
5799
  server: activeServer,
6356
5800
  connectionStatus,
6357
5801
  accessLabel: access.permission,
6358
- isShareView: access.isShareView,
6359
5802
  canUnbind: canUnbindServer
6360
5803
  }
6361
5804
  ) : null,
@@ -6364,8 +5807,7 @@ function CliPlugin({ context, setTitle }) {
6364
5807
  {
6365
5808
  projectId,
6366
5809
  serverId: activeServer.id,
6367
- canCreate: canFileEdit,
6368
- authMode: access.isShareView ? "share" : "user"
5810
+ canCreate: canFileEdit
6369
5811
  }
6370
5812
  ) : null,
6371
5813
  activeTab === "files" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -6391,15 +5833,7 @@ function CliPlugin({ context, setTitle }) {
6391
5833
  }
6392
5834
  ) : null,
6393
5835
  activeTab === "tasks" ? /* @__PURE__ */ jsxRuntimeExports.jsx(TasksPanel, { projectId, serverId: activeServer.id }) : null,
6394
- activeTab === "findings" ? /* @__PURE__ */ jsxRuntimeExports.jsx(FindingsPanel, { projectId, serverId: activeServer.id }) : null,
6395
- activeTab === "admin" && canSeeAdmin ? /* @__PURE__ */ jsxRuntimeExports.jsx(
6396
- AdminPanel,
6397
- {
6398
- projectId,
6399
- serverId: activeServer.id,
6400
- readOnly: !canManagePermissions
6401
- }
6402
- ) : null
5836
+ activeTab === "findings" ? /* @__PURE__ */ jsxRuntimeExports.jsx(FindingsPanel, { projectId, serverId: activeServer.id }) : null
6403
5837
  ] }, activeTab) })
6404
5838
  ] }) }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex h-full items-center justify-center p-6", children: servers.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(EmptyState, { onBind: () => setBindDialogOpen(true) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-[var(--cli-muted-1)]", children: t("select_server_from_list") }) }) }),
6405
5839
  /* @__PURE__ */ jsxRuntimeExports.jsx(BindServerDialog, { open: bindDialogOpen, onOpenChange: setBindDialogOpen })