dorkos 0.88.0 → 0.89.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/core-extensions/linear-issues/index.ts +1 -1
- package/dist/bin/cli.js +610 -48
- package/dist/client/assets/{AboutPage-xqba6OSc.js → AboutPage-BXOwVTO0.js} +1 -1
- package/dist/client/assets/{AdapterIcon-BfxdKjYz.js → AdapterIcon-Bs0C7eSH.js} +1 -1
- package/dist/client/assets/{AppearancePage-MXRyK6j4.js → AppearancePage-C0FZ72U0.js} +1 -1
- package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-D6lj5D9_.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-BRr08I-_.js} +3 -3
- package/dist/client/assets/{BlintzCanvas-BmTo8WiT.js → BlintzCanvas-DCLSn9jx.js} +23 -23
- package/dist/client/assets/{CanvasCsvContent-C57uDWEL.js → CanvasCsvContent-CGQsl4FY.js} +1 -1
- package/dist/client/assets/{CanvasFileContent-1qt_NtYW.js → CanvasFileContent-CqLAG04I.js} +2 -2
- package/dist/client/assets/{CanvasModel3dContent-CJ2bwQjt.js → CanvasModel3dContent-DkPwdlTD.js} +2 -2
- package/dist/client/assets/{CodeMirrorDiff-6LU4OiJj.js → CodeMirrorDiff-BkTLxJoa.js} +1 -1
- package/dist/client/assets/{CodeMirrorEditor-Jq49Np0j.js → CodeMirrorEditor-CIgTB7Sa.js} +1 -1
- package/dist/client/assets/ConnectionAccessLists-BNgZnsD7.js +1 -0
- package/dist/client/assets/{ConnectionsPage-BAcGLK2V.js → ConnectionsPage-BlE8iku_.js} +2 -2
- package/dist/client/assets/{ConventionPage-DdKmGIcU.js → ConventionPage-DQZsWbi1.js} +3 -3
- package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-9LderCq4.js → FloatingTanStackRouterDevtools-CqogiFob-De2qH2l6.js} +1 -1
- package/dist/client/assets/HandlePage-BXDfRIy3.js +1 -0
- package/dist/client/assets/{LexicalField-DsPLNKLN.js → LexicalField-C_3WYQGQ.js} +1 -1
- package/dist/client/assets/{ManagesPage-C34dzjEv.js → ManagesPage-DFFt9mh7.js} +1 -1
- package/dist/client/assets/{Model3dViewer-PXpUR_oW.js → Model3dViewer-CqkgfgBg.js} +1 -1
- package/dist/client/assets/NamePage-Qtv820fs.js +1 -0
- package/dist/client/assets/{NotificationsPage-CTPdo_E9.js → NotificationsPage-CX4b6MCK.js} +1 -1
- package/dist/client/assets/{PermissionsPage-Ij8O_uFN.js → PermissionsPage-B7CCInRo.js} +1 -1
- package/dist/client/assets/{PersonalityPopover-D0pS2YVR.js → PersonalityPopover-BOphzXEY.js} +1 -1
- package/dist/client/assets/PhotoPage-DgXAydiI.js +1 -0
- package/dist/client/assets/{RoomsPage-C_jMQGJC.js → RoomsPage-_DIjKTpi.js} +1 -1
- package/dist/client/assets/RunsOnPopover-DOsGV_7l.js +1 -0
- package/dist/client/assets/SessionsPage-BOsRKUqZ.js +6 -0
- package/dist/client/assets/{SkillsPage-CSUclnmu.js → SkillsPage-seFT2etr.js} +1 -1
- package/dist/client/assets/{TasksPage-COCsTj5k.js → TasksPage-Imt9oPoi.js} +1 -1
- package/dist/client/assets/{ToolsPage-CIgwvhZM.js → ToolsPage-CGM0Jiil.js} +2 -2
- package/dist/client/assets/{TopologyGraph-BOcP_UPd.js → TopologyGraph-vhFyjSzJ.js} +1 -1
- package/dist/client/assets/{agent-browser-Cm6bXvCt.js → agent-browser-B6WqW-og.js} +1 -1
- package/dist/client/assets/airtable-B7_XMoPM.png +0 -0
- package/dist/client/assets/{highlighted-body-KPVGNVTW-CmLzbGDT.js → highlighted-body-KPVGNVTW-DkoFzbOS.js} +1 -1
- package/dist/client/assets/hubspot-BQJQ5DfV.png +0 -0
- package/dist/client/assets/{index-C7jBVjvK.js → index-BFoejqZA.js} +1 -1
- package/dist/client/assets/{index-BndjtRZA.js → index-BMUNBDCe.js} +1 -1
- package/dist/client/assets/index-BY3yxmfx.js +1 -0
- package/dist/client/assets/index-BiDsr32v.js +1 -0
- package/dist/client/assets/{index-Cd9I6lUD.js → index-BmbhktM1.js} +1 -1
- package/dist/client/assets/{index-CQzyikQJ.js → index-Br_-H83G.js} +1 -1
- package/dist/client/assets/{index-D1Y7OlGq.js → index-BsXXogDR.js} +2 -2
- package/dist/client/assets/{index-DArP7LVM.js → index-C55PP6X5.js} +1 -1
- package/dist/client/assets/{index-CLJKvTfN.js → index-C79__bWb.js} +1 -1
- package/dist/client/assets/{index-wIEie2VH.js → index-CCelL1vs.js} +1 -1
- package/dist/client/assets/{index-CRom-Nt5.js → index-CMh3FD3Q.js} +1 -1
- package/dist/client/assets/{index-B5b98af8.js → index-CbAiJmOw.js} +1 -1
- package/dist/client/assets/{index-r8MCK2Zn.js → index-Ciuu1JwG.js} +1 -1
- package/dist/client/assets/{index-D_3Gtukh.js → index-CmezFzDD.js} +1 -1
- package/dist/client/assets/{index-CqP01Nbn.js → index-D-IcFrZb.js} +1 -1
- package/dist/client/assets/{index-B9kyvuKW.js → index-D0Q-sDBn.js} +1 -1
- package/dist/client/assets/{index-DOZ6l8Os.js → index-D7L3s5xT.js} +1 -1
- package/dist/client/assets/{index-mHL0gmHU.js → index-D8qzXtVa.js} +3 -3
- package/dist/client/assets/{index-D6Noae7w.js → index-DA2x36Z1.js} +1 -1
- package/dist/client/assets/{index-DrRfKYSH.js → index-DAogWPwG.js} +1 -1
- package/dist/client/assets/{index-DIAn8UxO.js → index-DBI4lgHw.js} +1 -1
- package/dist/client/assets/index-DDftPKpL.js +1 -0
- package/dist/client/assets/{index-Gs10j_MB.js → index-D_qmPmef.js} +1 -1
- package/dist/client/assets/{index-wpJKx9Mi.js → index-DcrgiH5I.js} +1 -1
- package/dist/client/assets/{index-_1qDsPCM.js → index-DgM6zNKn.js} +426 -435
- package/dist/client/assets/{index-vlk24smC.js → index-Dj4UMRJj.js} +1 -1
- package/dist/client/assets/index-DmX9plz6.js +38 -0
- package/dist/client/assets/{index-BxfmjO0b.js → index-Dt1n757u.js} +1 -1
- package/dist/client/assets/{index-DpN4Unzc.js → index-DwX-1WZf.js} +1 -1
- package/dist/client/assets/{index-C4GR43mL.js → index-DxBAUxqG.js} +1 -1
- package/dist/client/assets/{index-noUdLKRN.js → index-Dzt17e2e.js} +1 -1
- package/dist/client/assets/{index-rEcs1cWl.js → index-GqFxPMLJ.js} +1 -1
- package/dist/client/assets/{index-DWOxbvGH.js → index-HGlT1rGv.js} +1 -1
- package/dist/client/assets/index-fh0Br4xv.js +17 -0
- package/dist/client/assets/{index-BvuOztsk.js → index-mnHv12yO.js} +1 -1
- package/dist/client/assets/index-ojjbEHz5.css +1 -0
- package/dist/client/assets/{index-20DQ0WIE.js → index-yQNEOaWT.js} +1 -1
- package/dist/client/assets/linear-BihyrT6v.svg +1 -0
- package/dist/client/assets/notion-egi6fb2a.png +0 -0
- package/dist/client/assets/room-files-source-Cyx8H6V6.js +6 -0
- package/dist/client/assets/{soul-file-BWnNRUqb.js → soul-file-DUY5SyDc.js} +1 -1
- package/dist/client/assets/{use-personality-commit-CKnXk3oQ.js → use-personality-commit-D1Go4jUE.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/drizzle/0118_session_context.sql +6 -0
- package/dist/drizzle/0119_session_continue.sql +5 -0
- package/dist/drizzle/0120_session_limit_history.sql +24 -0
- package/dist/drizzle/0121_session_auto_resume.sql +1 -0
- package/dist/drizzle/meta/0118_snapshot.json +9264 -0
- package/dist/drizzle/meta/0119_snapshot.json +9299 -0
- package/dist/drizzle/meta/0120_snapshot.json +9430 -0
- package/dist/drizzle/meta/0121_snapshot.json +9437 -0
- package/dist/drizzle/meta/_journal.json +28 -0
- package/dist/server/index.js +181119 -172125
- package/dist/server/index.js.map +2 -2
- package/package.json +4 -4
- package/dist/client/assets/ConnectionAccessLists-uBJL31Ay.js +0 -1
- package/dist/client/assets/HandlePage-C6lAHsBo.js +0 -1
- package/dist/client/assets/NamePage-C0Mhnk4v.js +0 -1
- package/dist/client/assets/PhotoPage-DK8jrI66.js +0 -1
- package/dist/client/assets/RunsOnPopover-Dj0c45ua.js +0 -1
- package/dist/client/assets/SessionsPage-BMABy-lt.js +0 -6
- package/dist/client/assets/index-CV_tZl11.js +0 -1
- package/dist/client/assets/index-D5zhwLA1.js +0 -1
- package/dist/client/assets/index-DBrS_qK1.js +0 -1
- package/dist/client/assets/index-DtWF2VPM.css +0 -1
- package/dist/client/assets/index-GxKQ7usg.js +0 -33
- package/dist/client/assets/index-irBM12M1.js +0 -17
- package/dist/client/assets/room-files-source-Tt08gsJM.js +0 -6
package/dist/server/index.js.map
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/dist/server/index.js.map
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 42176800 bytes
|
|
4
|
+
sha256: 666f484a44ad248c0da8957953f2a77da76a8ac9042d5537f612e855edcfc87e
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dorkos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.89.0",
|
|
4
4
|
"description": "You, multiplied. All your agents in one place: Claude Code, Codex, and OpenCode. See every session, approve what your agents do, and run them on a schedule. Self-hosted, MIT.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Dorian Collier",
|
|
@@ -83,13 +83,13 @@
|
|
|
83
83
|
"tsx": "^4.23.13",
|
|
84
84
|
"typescript": "^5.9.3",
|
|
85
85
|
"vitest": "^4.1.11",
|
|
86
|
+
"@dorkos/marketplace": "0.0.0",
|
|
87
|
+
"@dorkos/db": "0.0.0",
|
|
88
|
+
"@dorkos/server": "0.0.0",
|
|
86
89
|
"@dorkos/eslint-config": "0.0.0",
|
|
87
90
|
"@dorkos/harness": "0.0.0",
|
|
88
|
-
"@dorkos/marketplace": "0.0.0",
|
|
89
91
|
"@dorkos/typescript-config": "0.0.0",
|
|
90
|
-
"@dorkos/server": "0.0.0",
|
|
91
92
|
"@dorkos/shared": "0.0.0",
|
|
92
|
-
"@dorkos/db": "0.0.0",
|
|
93
93
|
"@dorkos/client": "0.0.0"
|
|
94
94
|
},
|
|
95
95
|
"scripts": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{O as g,j as e,a as u,Q as p,B as d,R as x,U as j,V as m,W as h,Y as f}from"./index-_1qDsPCM.js";const N={inherited:"Inherited from agent",session_only:"Allowed only in this session",disabled:"Disabled in this session"},v={none:null,connection_paused:"The account is paused.",connection_revoked:"The account was disconnected.",authentication_required:"The account needs to be signed in again.",grant_revoked:"This access was removed.",session_detached:"This session is blocked from using the account.",reconciliation_required:"The account access needs review.",authority_sync_required:"Account access has not finished updating."};function b({agentId:o,onManage:i}){var n;const a=g(o);if(a.isPending)return e.jsx(u,{className:"h-24 w-full rounded-lg"});if(a.isError)return e.jsx(p,{title:"Couldn’t load account access",description:"No access details were changed. Try again.",onRetry:()=>void a.refetch(),isRetrying:a.isFetching});const r=((n=a.data)==null?void 0:n.connections)??[];return e.jsxs("section",{"aria-labelledby":"agent-account-access",className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h3",{id:"agent-account-access",className:"text-sm font-semibold",children:"Account access"}),e.jsx("p",{className:"text-muted-foreground mt-0.5 text-xs",children:"Accounts this agent may use for approved actions."})]}),i&&e.jsxs(d,{variant:"ghost",size:"sm",onClick:i,children:["Manage",e.jsx(x,{className:"size-3.5","aria-hidden":!0})]})]}),r.length===0?e.jsxs("div",{className:"bg-muted/40 rounded-lg p-4 text-sm",children:[e.jsx("p",{className:"font-medium",children:"No account access"}),e.jsx("p",{className:"text-muted-foreground mt-1 text-xs",children:"Grant an account from Connections when this agent needs it."})]}):e.jsx("ul",{className:"space-y-1.5",children:r.map(s=>{const c=s.lifecycle==="connected"&&s.authenticationStatus==="active"&&s.reconciliationStatus==="ready"&&s.authoritySync.status==="ready";return e.jsxs("li",{"data-testid":`agent-connection-${s.connectionId}`,className:"bg-muted/40 flex min-h-11 items-center gap-3 rounded-lg px-3 py-2",children:[e.jsx(j,{className:"text-muted-foreground size-4 shrink-0","aria-hidden":!0}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("p",{className:"truncate text-sm font-medium",children:[m(s.toolkit)," (",s.label,")"]}),e.jsxs("p",{className:"text-muted-foreground text-xs",children:[s.operationRevisionIds.length," approved"," ",s.operationRevisionIds.length===1?"action":"actions",s.everyAgent&&" · given to every agent"]})]}),e.jsx(h,{size:"xs",variant:c?"secondary":"outline",children:c?"Available":"Unavailable"})]},s.connectionId)})})]})}function C({sessionId:o,onManage:i,emptyAction:a,footer:r}){var c;const n=f(o);if(n.isPending)return e.jsx(u,{className:"h-16 w-full rounded-lg"});if(n.isError)return e.jsxs("section",{"data-testid":"session-connectors",className:"space-y-2",children:[e.jsx("p",{role:"alert",className:"text-destructive px-1 text-xs",children:"Couldn’t load account access."}),e.jsx(d,{variant:"ghost",size:"sm",onClick:()=>void n.refetch(),children:"Try again"})]});const s=((c=n.data)==null?void 0:c.connections)??[];return e.jsxs("section",{"data-testid":"session-connectors","aria-labelledby":"session-account-access",className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2 px-1 pb-1",children:[e.jsx("h3",{id:"session-account-access",className:"text-muted-foreground text-xs font-medium tracking-wide uppercase",children:"Connections"}),i&&e.jsxs(d,{variant:"ghost",size:"xs",onClick:i,children:["Manage agent access",e.jsx(x,{className:"size-3","aria-hidden":!0})]})]}),s.length===0?e.jsxs("div",{className:"bg-muted/40 space-y-2 rounded-md px-2.5 py-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"No account access"}),e.jsx("p",{className:"text-muted-foreground mt-1 text-xs",children:"Ask this agent to request the service and actions it needs."})]}),a]}):s.map(t=>{const l=v[t.dominatingReason];return e.jsxs("div",{"data-testid":`session-connection-${t.connectionId}`,className:"bg-muted/40 rounded-md px-2.5 py-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[e.jsxs("span",{className:"text-sm font-medium",children:[m(t.toolkit)," (",t.label,")"]}),e.jsx(h,{size:"xs",variant:t.access==="disabled"?"outline":"secondary",children:N[t.access]})]}),e.jsx("p",{className:l?"text-destructive mt-1 text-xs":"text-muted-foreground mt-1 text-xs",children:l??`${t.operationRevisionIds.length} actions available in this session.`})]},t.connectionId)}),s.length>0&&r]})}export{b as A,C as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r,i}from"./index-_1qDsPCM.js";function o({member:e}){return r.jsx(i,{member:e})}export{o as HandlePage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r,h as o}from"./index-_1qDsPCM.js";function a({member:e}){return r.jsx(o,{member:e})}export{a as NamePage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t,k as r}from"./index-_1qDsPCM.js";function i({member:o}){return t.jsx(r,{member:o})}export{i as PhotoPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as y,j as e,aN as ce,ct as de,J as ue,aj as j,cT as B,cU as G,cV as J,cW as Z,cX as F,cY as fe,ad as me,ah as pe,cZ as xe,c_ as ee,c$ as he,d0 as te,d1 as be,d2 as je,d3 as Y,d4 as ge,d5 as ve,d6 as T,d7 as Ne,d8 as E,d9 as Se,da as se,aP as Ee,u as ye,a as Ce,db as ke,dc as we,dd as Ae,de as Te,df as Le,dg as Ie}from"./index-_1qDsPCM.js";const Pe={duration:.12,ease:"easeOut"},$e={type:"spring",stiffness:320,damping:28};function ae({isSetHere:a,serverDefault:l,onUseServerDefault:i,warning:r,className:n,"data-testid":d}){const[f,p]=y.useState(!1),o=a?"set here":`server default · ${l??"none"}`,s=a&&!!i,m=e.jsxs("span",{className:j("text-3xs inline-flex h-5 items-center gap-1 rounded-full px-2 leading-none whitespace-nowrap",r?B.warning:B.neutral,s&&"hover:bg-accent hover:text-accent-foreground transition-colors",n),"data-testid":d,children:[r&&e.jsx(ce,{className:"size-2.5 shrink-0","aria-hidden":!0}),e.jsx(de,{mode:"wait",initial:!1,children:e.jsx(ue.span,{initial:{opacity:0,y:2},animate:{opacity:1,y:0,transition:$e},exit:{opacity:0},transition:Pe,children:o},o)})]});return s?e.jsxs(G,{open:f,onOpenChange:p,children:[e.jsx(J,{asChild:!0,children:e.jsx("button",{type:"button","aria-label":`Set here${r?`: ${r}`:""}`,children:m})}),e.jsxs(Z,{className:"w-64 p-2",align:"start",children:[e.jsx(F,{children:"Where this value comes from"}),r&&e.jsx("p",{className:j("px-2 pt-1 text-xs",fe.warning),children:r}),e.jsxs("button",{type:"button",onClick:()=>{i(),p(!1)},className:"hover:bg-accent mt-1 w-full rounded-md px-2 py-1.5 text-left text-sm transition-colors","data-testid":d?`${d}-reset`:void 0,children:["Use server default",l?e.jsxs("span",{className:"text-muted-foreground block text-xs",children:["currently ",l]}):e.jsx("span",{className:"text-muted-foreground block text-xs",children:"the runtime picks, nothing is set"})]})]})]}):r?e.jsx("span",{title:r,"aria-label":`${o}: ${r}`,children:m}):m}const _e=["agents"];function Me(a){const l=me(),i=pe();return xe({...a!=null&&a.errorLabel?{meta:{errorLabel:a.errorLabel}}:{},mutationFn:r=>l.updateMeshAgent(r.id,r.updates),onSuccess:()=>{i.invalidateQueries({queryKey:["mesh","agents"]})},onSettled:()=>{i.invalidateQueries({queryKey:_e})}})}const ne="text-muted-foreground text-3xs font-medium tracking-wider uppercase";function w({label:a,valueLabel:l,options:i,selected:r,isSetHere:n,serverDefault:d,warning:f,onSelect:p,onInherit:o,testId:s,showHeader:m=!0,className:C,describedBy:h}){const S=ee(),[b,c]=y.useState(!1);return e.jsxs("div",{className:j("space-y-1",C),children:[m&&e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:ne,children:a}),!S&&e.jsx(ae,{isSetHere:n,serverDefault:d,warning:f,onUseServerDefault:o,"data-testid":`${s}-chip`})]}),e.jsxs(G,{open:b,onOpenChange:c,children:[e.jsx(J,{asChild:!0,children:e.jsxs("button",{type:"button",className:"border-input hover:bg-accent flex h-8 w-full items-center gap-1 rounded-md border px-2 text-sm transition-colors",...h?{"aria-describedby":h}:{},"data-testid":s,children:[e.jsx("span",{className:j("truncate",f?"text-amber-700 dark:text-amber-400":n?"md:text-foreground text-amber-700 dark:text-amber-400":"md:text-foreground text-emerald-700 dark:text-emerald-400"),children:l}),e.jsx(Ee,{className:"text-muted-foreground ml-auto size-3.5 shrink-0"})]})}),e.jsxs(Z,{className:"w-64 p-1",align:"start",children:[e.jsx(F,{children:a}),e.jsx("div",{className:"max-h-72 overflow-y-auto",children:i.map(u=>e.jsxs("button",{type:"button","data-testid":`${s}-option-${u.value}`,onClick:()=>{p(u.value),c(!1)},className:j("hover:bg-accent w-full rounded-md px-2 py-1.5 text-left text-sm transition-colors",u.value===r&&"bg-accent"),children:[u.label,u.hint&&e.jsx("span",{className:"text-muted-foreground block text-xs",children:u.hint})]},u.value))}),e.jsx("button",{type:"button",onClick:()=>{o(),c(!1)},className:"hover:bg-accent border-border text-muted-foreground mt-1 w-full border-t px-2 py-2 text-left text-xs transition-colors","data-testid":`${s}-inherit`,children:d?`Using server default: ${d}. Tap to restore`:"Use server default: the runtime picks"})]})]})]})}function Oe({agent:a,onUpdate:l,className:i}){var V,q,z,K,Q,W;const r=ee(),{data:n}=he(),{data:d,isPending:f}=te(),p=((V=n==null?void 0:n.executionDefaults)==null?void 0:V.runtime)??"claude-code",o=a.runtime??p,s=(q=n==null?void 0:n.executionDefaults)==null?void 0:q.perRuntime.find(t=>t.runtime===o),{data:m}=be({runtime:o}),C=a.model!=null,h=a.effort!=null,S=(s==null?void 0:s.model)??null,b=a.model??S,c=b?(m??[]).find(t=>t.value===b):void 0,u=(s==null?void 0:s.supportsEffort)??((z=je(d,o))==null?void 0:z.supportsEffort),L=u===void 0&&f,I=u!==!1,P=c?c.supportsEffort??!1:void 0,g=(K=n==null?void 0:n.claudeCode)==null?void 0:K.accounts,x=g==null?void 0:g.flatMap(t=>t.id===null?[]:[{id:t.id,label:Y(t.path,g),path:t.path}]),v=a.account??null,$=v!==null,_=n!=null&&n.claudeCode?Y(n.claudeCode.resolvedAccount,g??[]):null,M=Me({errorLabel:"Couldn’t change this agent’s account"}),O=y.useCallback(t=>{M.mutate({id:a.id,updates:{account:t}})},[a.id,M]),le=ge({agent:{runtime:a.runtime,model:a.model,effort:a.effort,account:a.account},defaultRuntime:p,serverDefaultModel:S,knownModels:ve(m),knownAccounts:x,accountsUnavailable:(Q=n==null?void 0:n.claudeCode)==null?void 0:Q.accountsUnavailable,modelSupportsEffort:P,runtimeSupportsEffort:u,runtimeLabel:t=>T(t).label}),N=t=>{var X;return((X=le.breakages.find(ie=>t.includes(ie.kind)))==null?void 0:X.message)??null},k=!L&&I&&P!==!1,U=a.effort??(s==null?void 0:s.effort)??null,H=T(o).label,re=o==="claude-code"&&x!==void 0&&(x.length>1||$),oe=N(["account-unregistered"]),D=(m??[]).some(t=>t.unverified),R=y.useId();return e.jsxs("div",{className:j("grid grid-cols-2 gap-3",i),children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(w,{label:"Model",valueLabel:(c==null?void 0:c.displayName)??b??"Automatic",options:[...(m??[]).map(t=>({value:t.value,label:t.displayName,hint:t.description}))],selected:b,isSetHere:C,serverDefault:(s==null?void 0:s.model)??null,warning:N(["model-unavailable"]),onSelect:t=>l({model:t}),onInherit:()=>l({model:null}),testId:"agent-model-row",describedBy:D?R:void 0}),D&&e.jsx(Ne,{id:R})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:ne,children:"Effort"}),(!r||!k)&&(h||k)&&e.jsx(ae,{isSetHere:h,serverDefault:s!=null&&s.effort?E(s.effort):null,warning:N(["effort-unsupported-runtime","effort-unsupported-model"]),onUseServerDefault:()=>l({effort:null}),"data-testid":"agent-effort-row-chip"})]}),L?e.jsx(A,{testId:"agent-effort-pending",text:`Checking what ${H} supports`,warning:null}):I?k?e.jsx(w,{label:"Effort",valueLabel:E(U),options:Se.filter(t=>!(c!=null&&c.supportedEffortLevels)||c.supportedEffortLevels.includes(t)).map(t=>({value:t,label:E(t)})),selected:U,isSetHere:h,serverDefault:s!=null&&s.effort?E(s.effort):null,warning:null,showHeader:!1,onSelect:t=>l({effort:t}),onInherit:()=>l({effort:null}),testId:"agent-effort-row"}):e.jsx(A,{testId:"agent-effort-unsupported-model",text:"This model doesn’t take an effort setting",warning:N(["effort-unsupported-model"])}):e.jsx(A,{testId:"agent-effort-unsupported-runtime",text:`Not supported by ${H}`,warning:N(["effort-unsupported-runtime"])})]}),re&&e.jsx(w,{label:"Account",valueLabel:v!==null?((W=x==null?void 0:x.find(t=>t.id===v))==null?void 0:W.label)??v:_??"Default account",options:(x??[]).map(t=>({value:t.id,label:t.label,hint:se(t.path)})),selected:v,isSetHere:$,serverDefault:_,warning:oe,onSelect:t=>O(t),onInherit:()=>O(null),testId:"agent-account-row",className:"col-span-full"})]})}function A({text:a,warning:l,testId:i}){return e.jsxs("div",{className:"flex h-8 flex-col justify-center","data-testid":i,children:[e.jsx("p",{className:"text-muted-foreground text-xs",children:a}),l&&e.jsx("p",{className:"text-xs text-amber-700 dark:text-amber-400",children:l})]})}const Ue="text-muted-foreground text-3xs font-medium tracking-wider uppercase";function De({member:a}){const{agent:l,projectPath:i,isPending:r,update:n}=ye(a),{data:d}=te();if(r)return e.jsx(Ce,{className:"h-24 w-full"});if(!l)return e.jsx("p",{className:"text-muted-foreground p-1 text-sm",children:"Couldn’t read this agent’s settings."});const f=d?Object.keys(d.capabilities):[l.runtime],p=f.includes(l.runtime)?f:[l.runtime,...f];return e.jsxs("div",{className:"space-y-3 p-1","data-slot":"profile-runs-on",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:Ue,children:"Runtime"}),e.jsxs(ke,{value:l.runtime??"claude-code",onValueChange:o=>n({runtime:o}),children:[e.jsx(we,{className:"h-8 text-sm",responsive:!1,children:e.jsx(Ae,{})}),e.jsx(Te,{children:p.map(o=>e.jsx(Le,{value:o,responsive:!1,children:T(o).label},o))})]})]}),e.jsx(Oe,{agent:l,onUpdate:n,className:"grid-cols-1"}),i&&e.jsxs("div",{className:"text-muted-foreground flex min-w-0 items-center gap-1.5",children:[e.jsx(Ie,{"aria-hidden":!0,className:"size-3.5 shrink-0"}),e.jsx("span",{className:"min-w-0 truncate font-mono text-xs",children:se(i)})]})]})}export{De as RunsOnPopover};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{dz as ae,ex as ne,ey as ie,ad as E,r as d,ez as re,eA as oe,eB as le,eC as ce,bk as P,eD as ue,m as de,eE as me,eF as xe,j as e,eG as pe,eH as fe,eI as ge,eJ as I,am as D,eK as he,eL as F,ct as ve,J as w,eM as je,eN as be,bJ as C,d6 as ye,eO as Ce,aj as S,eP as O,eQ as Ne,cu as R,cv as M,cw as A,eR as V,aE as K,eS as _,eT as we,eU as B,aP as Se,eV as $,eW as G,eX as T,eY as ke,eZ as Re,e_ as Me,ax as Ae,e$ as Pe,ay as Te,az as Le,aA as Ie,aB as ze,f0 as Ee,e as De,ah as Fe,f1 as Oe,f2 as Ve,a as Ke,f3 as _e,I as Be,f4 as $e,f5 as Ge,f6 as Qe,aY as We}from"./index-_1qDsPCM.js";/**
|
|
2
|
-
* @license lucide-react v1.47.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const Q={name:"git-fork",size:24,node:[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]]};Q.node;const W=ae(Q);function qe(){const t=ne(),s=ie(r=>r.contextReadings),a=E(),i=d.useMemo(()=>Array.from(new Set(t.map(r=>r.runtime))),[t]),n=d.useCallback(r=>{const u={};return i.forEach((c,f)=>{var m;const p=(m=r[f])==null?void 0:m.data;if(!p)return;const v={};for(const h of p)h.contextWindow!=null&&(v[h.value]=h.contextWindow);u[c]=v}),u},[i]),l=re({queries:i.map(r=>oe(a,{runtime:r})),combine:n});return d.useMemo(()=>{var u;const r={total:0,known:0,unknown:0,warning:0,critical:0,autoCompacted:0};for(const c of t){r.total+=1;const f=c.model?(u=l[c.runtime])==null?void 0:u[c.model]:void 0,p=le(c,{reading:s[c.id]??null,window:f});p.autoCompactedAt&&(r.autoCompacted+=1),p.status==="known"?(r.known+=1,p.severity==="warning"?r.warning+=1:p.severity==="critical"&&(r.critical+=1)):r.unknown+=1}return r},[t,s,l])}function He(t,s,a){return t&&s!==void 0&&!a}function q(t,s,a,i="borderLeftColor"){const n=ce()??!1,l=He(t,a,n);return d.useMemo(()=>!l||!a?{animate:void 0,transition:void 0,pulsing:!1}:{animate:{[i]:[s,a,s]},transition:{[i]:{duration:2,repeat:1/0,ease:"easeInOut"}},pulsing:!0},[l,s,a,i])}function H({value:t,onCommit:s,onEnd:a}){const[i,n]=d.useState(!1),[l,r]=d.useState(""),u=d.useRef(null),c=d.useRef(!1),f=P(t),p=P(s),v=P(a);d.useEffect(()=>{if(!i)return;c.current=!1;const o=requestAnimationFrame(()=>{var x,k;(x=u.current)==null||x.focus(),(k=u.current)==null||k.select()});return()=>cancelAnimationFrame(o)},[i]);const m=d.useCallback(()=>{var o;n(!1),(o=v.read())==null||o()},[v]),h=d.useCallback(()=>{r(f.read()),n(!0)},[f]),j=d.useCallback(()=>{if(c.current)return;c.current=!0,m();const o=l.trim();o.length===0||o===f.read()||p.read()(o)},[m,l,f,p]),b=d.useCallback(()=>{c.current=!0,m()},[m]),y=d.useCallback(o=>{o.key==="Enter"?(o.preventDefault(),j()):o.key==="Escape"&&(o.preventDefault(),b())},[j,b]);return{isRenaming:i,renameValue:l,setRenameValue:r,inputRef:u,start:h,commit:j,cancel:b,handleKeyDown:y}}function U(t){const s=ue(t.id,{enabled:!1,fallback:t.permissionMode})??t.permissionMode,a=de(t.runtime),i=a==null?void 0:a.permissionModes.values.find(l=>l.id===s),n=i?me(i):xe(s);return{permissionMode:s,isFullPower:n}}function J({children:t,onRename:s,onFork:a}){return!s&&!a?e.jsx(e.Fragment,{children:t}):e.jsxs(pe,{children:[e.jsx(fe,{asChild:!0,children:t}),e.jsxs(ge,{className:"w-44",children:[s&&e.jsxs(I,{onClick:s,children:[e.jsx(D,{className:"mr-2 size-4"}),"Rename"]}),s&&a&&e.jsx(he,{}),a&&e.jsxs(I,{onClick:a,children:[e.jsx(W,{className:"mr-2 size-4"}),"Fork session"]})]})]})}const N="font-mono select-all";function z(t){try{return new Date(t).toLocaleString([],{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return t}}function Ue({session:t,expanded:s,onFork:a,className:i}){var f;const{permissionMode:n,isFullPower:l}=U(t),r=l?"Full power":Ne(n),{nameFor:u}=F(),c=t.account?u(t.account):null;return e.jsx(ve,{initial:!1,children:s&&e.jsx(w.div,{variants:be,initial:"initial",animate:"animate",exit:"exit",transition:je,className:"relative z-10 overflow-hidden","data-slot":"session-details-panel",children:e.jsxs("div",{className:S("text-muted-foreground text-2xs mx-2 space-y-1.5 px-3 pt-2 pb-2",i),children:[e.jsx(C,{label:"Session ID",align:"start",copyValue:t.id,valueClassName:N,children:t.id}),e.jsx(C,{label:"Created",align:"start",valueClassName:N,children:z(t.createdAt)}),e.jsx(C,{label:"Updated",align:"start",valueClassName:N,children:z(t.updatedAt)}),e.jsx(C,{label:"Runtime",align:"start",valueClassName:N,children:ye(t.runtime).label}),c&&e.jsx(C,{label:"Account",align:"start",copyValue:t.account,valueClassName:N,children:c}),e.jsx(C,{label:"Origin",align:"start",valueClassName:N,children:t.originLabel??((f=Ce(t.origin))==null?void 0:f.label)??"You"}),e.jsx(C,{label:"Permissions",align:"start",valueClassName:S(N,l&&O.power),children:r}),a&&e.jsxs("button",{type:"button",onClick:p=>{p.stopPropagation(),a(t.id)},className:"hover:bg-secondary/80 text-muted-foreground/60 hover:text-muted-foreground mt-1 inline-flex items-center gap-1 rounded px-1.5 py-0.5 transition-colors duration-100","aria-label":"Fork session",children:[e.jsx(W,{className:"size-(--size-icon-xs)"}),e.jsx("span",{children:"Fork"})]})]})})})}function Y({account:t,className:s}){const{isMultiAccount:a,nameFor:i}=F();if(!t||!a)return null;const n=i(t);return e.jsxs(R,{children:[e.jsx(M,{asChild:!0,children:e.jsx("span",{"aria-label":`Account: ${n}`,className:S("text-3xs max-w-24 shrink-0 truncate",s),children:n})}),e.jsx(A,{side:"top",sideOffset:4,children:t})]})}function Je({session:t,isActive:s,onClick:a,onFork:i,onRename:n,isNew:l=!1}){const[r,u]=d.useState(!1),{isRenaming:c,renameValue:f,setRenameValue:p,inputRef:v,start:m,commit:h,handleKeyDown:j}=H({value:t.title,onCommit:g=>n==null?void 0:n(t.id,g)}),{isFullPower:b}=U(t),y=V(6e4),o=d.useMemo(()=>K(t.updatedAt),[t.updatedAt,y]),x=_(t.id),k=d.useCallback(g=>{g.stopPropagation(),u(se=>!se)},[]),X=d.useCallback(g=>{g.stopPropagation(),m()},[m]),{animate:Z,transition:ee,initial:te,pulsing:L}=Xe({isNew:l,borderState:x});return e.jsx(R,{children:e.jsxs(w.div,{"data-testid":"session-row",initial:te,animate:Z,transition:ee,"data-pulsing":L?"true":"false",style:L?void 0:{borderLeftColor:x.color},className:S("group relative rounded-lg border-l-2 transition-colors duration-150",s?"text-foreground":"hover:bg-secondary/60"),children:[s&&e.jsx(w.div,{layoutId:"active-session-bg",className:"bg-secondary absolute inset-0 rounded-lg",transition:{type:"spring",stiffness:280,damping:32}}),e.jsx(J,{onRename:n?m:void 0,onFork:i?()=>i(t.id):void 0,children:e.jsx(M,{asChild:!0,disabled:x.kind==="idle",children:e.jsxs(w.div,{role:"button",tabIndex:0,"aria-current":s?"page":void 0,"aria-label":`Session: ${T(t.title)}. ${x.label}.`,onClick:a,onKeyDown:g=>{c||(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),a())},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:30},className:"relative z-10 cursor-pointer px-3 py-2",children:[e.jsxs("div",{className:"text-muted-foreground flex items-center gap-1 text-xs",children:[e.jsx("span",{className:"min-w-0 flex-1",children:o}),e.jsxs("span",{className:"flex flex-shrink-0 items-center gap-1",children:[e.jsx(we,{session:t}),x.kind==="pendingApproval"&&e.jsx(B,{className:"size-(--size-icon-xs) text-amber-500","aria-label":"Awaiting your approval"}),b&&e.jsx(Ye,{}),n&&!c&&e.jsx("button",{type:"button",onClick:X,className:"text-muted-foreground/60 hover:text-muted-foreground rounded p-0.5 opacity-0 transition-opacity duration-150 group-hover:opacity-100 focus-visible:opacity-100 max-md:p-1.5 max-md:opacity-100","aria-label":"Rename session",children:e.jsx(D,{className:"size-(--size-icon-xs)"})}),e.jsx("button",{type:"button",onClick:k,className:S("rounded p-0.5 transition-opacity duration-150 max-md:p-1.5",r?"text-muted-foreground opacity-100":"text-muted-foreground/60 hover:text-muted-foreground opacity-0 group-hover:opacity-100 focus-visible:opacity-100 max-md:opacity-100"),"aria-label":"Session details","aria-expanded":r,children:e.jsx(w.div,{animate:{rotate:r?180:0},transition:{type:"spring",stiffness:400,damping:30},children:e.jsx(Se,{className:"size-(--size-icon-sm)"})})})]})]}),c?e.jsx("input",{ref:v,autoFocus:!0,value:f,onChange:g=>p(g.target.value),onBlur:h,onKeyDown:j,onClick:g=>g.stopPropagation(),className:"bg-background text-foreground mt-0.5 w-full rounded border px-1 text-xs outline-none","aria-label":"Session title"}):e.jsxs("div",{className:"mt-0.5 flex items-center gap-1.5",children:[e.jsx($,{origin:t.origin,label:t.originLabel,className:"text-muted-foreground/50"}),e.jsx(G,{type:t.runtime,model:t.model,className:"text-muted-foreground/50"}),e.jsx(Y,{account:t.account,className:"text-muted-foreground/60"}),e.jsx("div",{className:"text-muted-foreground/70 min-w-0 flex-1 truncate text-xs",title:n?"Click the pencil icon to rename":void 0,children:T(t.title)})]})]})})}),e.jsx(A,{side:"right",sideOffset:8,children:x.label}),e.jsx(Ue,{session:t,expanded:r,className:"border-border/30 border-t",...i?{onFork:i}:{}})]})})}function Ye(){return e.jsxs(R,{children:[e.jsx(M,{asChild:!0,children:e.jsx("button",{type:"button",className:"inline-flex cursor-help","aria-label":ke,onClick:t=>t.stopPropagation(),children:e.jsx(Re,{className:`size-(--size-icon-xs) ${O.power}`})})}),e.jsx(A,{side:"top",sideOffset:4,children:"This chat runs commands without stopping for approval."})]})}function Xe({isNew:t,borderState:s}){const{animate:a,transition:i,pulsing:n}=q(s.pulse,s.color,s.dimColor);return d.useMemo(()=>{if(!(t||n))return{initial:void 0,animate:void 0,transition:void 0,pulsing:n};const r={...t?{opacity:1,y:0}:{},...a},u={...t?{opacity:{duration:.2,ease:[0,0,.2,1]},y:{duration:.2,ease:[0,0,.2,1]}}:{},...i};return{initial:t?{opacity:0,y:-8}:void 0,animate:r,transition:u,pulsing:n}},[t,n,a,i])}function Ze({session:t,isActive:s,onClick:a,onFork:i,onRename:n}){const{isRenaming:l,renameValue:r,setRenameValue:u,inputRef:c,start:f,commit:p,handleKeyDown:v}=H({value:t.title,onCommit:x=>n==null?void 0:n(t.id,x)}),m=_(t.id),h=V(6e4),j=d.useMemo(()=>K(t.updatedAt),[t.updatedAt,h]),{animate:b,transition:y,pulsing:o}=q(m.pulse,m.color,m.dimColor,"backgroundColor");return e.jsxs(R,{children:[e.jsx(J,{onRename:n?f:void 0,onFork:i?()=>i(t.id):void 0,children:e.jsx(M,{asChild:!0,children:e.jsxs("button",{type:"button","data-testid":"session-row",onClick:a,className:S("flex w-full items-center gap-2 rounded-md px-2.5 py-1.5 text-left text-xs",Me,s?"bg-secondary text-foreground":"text-muted-foreground hover:bg-accent hover:text-foreground"),children:[e.jsx(w.span,{"aria-hidden":!0,"data-pulsing":o?"true":"false",animate:b,transition:y,style:o?void 0:{backgroundColor:m.color},className:"size-1.5 shrink-0 rounded-full"}),l?e.jsx("input",{ref:c,autoFocus:!0,value:r,onChange:x=>u(x.target.value),onBlur:p,onKeyDown:v,onClick:x=>x.stopPropagation(),className:"bg-background text-foreground min-w-0 flex-1 rounded border px-1 text-xs outline-none","aria-label":"Session title"}):e.jsx("span",{className:"min-w-0 flex-1 truncate",children:T(t.title)}),e.jsxs("span",{className:"flex shrink-0 items-center gap-1",children:[m.kind==="pendingApproval"&&e.jsx(B,{className:"size-(--size-icon-xs) text-amber-500","aria-label":"Awaiting approval"}),e.jsx($,{origin:t.origin,label:t.originLabel,className:"text-muted-foreground/50"}),e.jsx(G,{type:t.runtime,model:t.model,className:"text-muted-foreground/50"}),e.jsx(Y,{account:t.account,className:"text-muted-foreground/60"}),e.jsx("span",{className:"text-muted-foreground/60 text-3xs",children:j})]})]})})}),m.kind!=="idle"&&e.jsx(A,{side:"right",sideOffset:8,children:m.label})]})}function et({variant:t,session:s,isActive:a,onClick:i,onFork:n,onRename:l,isNew:r}){return t==="compact"?e.jsx(Ze,{session:s,isActive:a,onClick:i,onFork:n,onRename:l}):e.jsx(Je,{session:s,isActive:a,onClick:i,onFork:n,onRename:l,isNew:r})}function tt(){const{known:t,warning:s,critical:a,autoCompacted:i}=qe(),n=s+a;if(t===0&&n===0&&i===0)return null;const l=n>0||i>0,r=l?a>0?"bg-red-500":n>0?"bg-amber-500":"bg-muted-foreground/40":"bg-emerald-500",u=l?[n>0?`${n} near full`:null,i>0?`${i} auto-compacted`:null].filter(Boolean).join(" · "):"All sessions have room.";return e.jsxs("div",{className:"text-muted-foreground flex items-center gap-2 border-b px-3 py-1.5 text-xs","data-testid":"fleet-context-bar",children:[e.jsx("span",{className:`size-2 shrink-0 rounded-full ${r}`,"aria-hidden":"true"}),e.jsx("span",{className:"truncate",children:u})]})}function st({activeSessionId:t,groupedSessions:s,onSessionClick:a,onForkSession:i,onRenameSession:n}){const l=d.useId();return e.jsxs(Ae,{type:"scroll",className:"h-full",viewportClassName:"[&>div]:!block",children:[e.jsx(tt,{}),e.jsx(w.div,{layout:!0,children:e.jsx(Pe,{id:l,children:s.length>0?e.jsx(e.Fragment,{children:s.map(r=>{const u=s.length===1&&r.label==="Today";return e.jsxs(Te,{children:[!u&&e.jsx(Le,{className:"text-2xs text-muted-foreground/70 font-medium tracking-wider uppercase",children:r.label}),e.jsx(Ie,{children:r.sessions.map(c=>e.jsx(ze,{children:e.jsx(et,{variant:"full",session:c,isActive:c.id===t,onClick:()=>a(c.id),onFork:i,onRename:n})},c.id))})]},r.label)})}):e.jsx("div",{className:"flex h-32 items-center justify-center",children:e.jsx("p",{className:"text-muted-foreground/60 text-sm",children:"No conversations yet"})})})})]})}function at(t,s){return s===""?!0:(t.title??"").toLowerCase().includes(s)}function it({member:t}){var y;const s=((y=t.agent)==null?void 0:y.projectPath)??null,{sessions:a,isLoading:i,isError:n,activeSessionId:l}=Ee(s),r=De(),u=E(),c=Fe(),f=Oe(s),[p,v]=d.useState(""),m=p.trim().toLowerCase(),h=d.useMemo(()=>Ve(a.filter(o=>at(o,m))),[a,m]);function j(o){!r||s===null||($e.getState().recordOpened("agent",s),r(Ge({dir:s,session:o})))}async function b(o){try{const x=await u.forkSession(o,void 0,s??void 0);await c.invalidateQueries({queryKey:Qe.listRoot}),j(x.id)}catch(x){We.error("Couldn’t branch off this conversation.",{description:x instanceof Error?x.message:"The original is untouched."})}}return i?e.jsx(Ke,{className:"h-16 w-full"}):n?e.jsxs("p",{className:"text-muted-foreground text-sm",children:["Couldn’t read ",t.displayName,"’s conversations."]}):a.length===0?e.jsxs("p",{className:"text-muted-foreground text-sm",children:["No conversations yet. ",t.displayName," starts one the first time you message it."]}):e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2",children:[e.jsxs("div",{className:"relative shrink-0",children:[e.jsx(_e,{"aria-hidden":!0,className:"text-muted-foreground pointer-events-none absolute top-1/2 left-2 size-3.5 -translate-y-1/2"}),e.jsx(Be,{value:p,onChange:o=>v(o.target.value),placeholder:"Search conversations","aria-label":"Search conversations",className:"h-8 pl-7 text-sm"})]}),h.length===0?e.jsxs("p",{className:"text-muted-foreground text-sm",children:["No conversation matches “",p.trim(),"”."]}):e.jsx("div",{className:"min-h-0 flex-1 overflow-auto",children:e.jsx(st,{activeSessionId:l,groupedSessions:h,onSessionClick:j,onForkSession:o=>void b(o),onRenameSession:(o,x)=>f.mutate({sessionId:o,title:x})})})]})}export{it as SessionsPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bC as x,j as s,B as h,bD as m,bE as b,bF as g,ae as j,bG as p,bH as f,bI as S,bJ as t,aj as v,bK as k,bL as r,bM as N,bN as I,bO as C,bP as w,r as c,bQ as y,W as M}from"./index-_1qDsPCM.js";import{bR as K,bS as V,bT as W,bU as J,bV as X,bW as Y,bX as Z,bY as ee,bZ as se,b_ as te,b$ as ne,c0 as ae,c1 as oe,c2 as re,c3 as ie,c4 as le,c5 as ce,c6 as ue,c7 as de,c8 as xe,c9 as he,ca as me,cb as be,cc as ge,cd as je,ce as pe,cf as fe,cg as Se,ch as ve,ci as ke,cj as Ne,ck as Ie}from"./index-_1qDsPCM.js";import{S as P}from"./ConnectionAccessLists-uBJL31Ay.js";const R="I need access to another service. Ask me which service and actions you need, then request only that access.";function T({sessionId:e}){const a=x(),o=s.jsx(h,{variant:"secondary",size:"sm","data-testid":`ask-agent-for-connection-${e}`,onClick:()=>m(R),children:"Ask your agent"});return s.jsx(P,{sessionId:e,onManage:()=>void a({to:"/connections"}),emptyAction:o,footer:s.jsx("div",{className:"pt-1",children:o})})}const D=1e3;function z(){const[e]=b(),a=g(e??""),o=j(n=>n.rightPanelOpen);return e?s.jsx(U,{diagnostics:a,live:o,connectors:s.jsx(T,{sessionId:e})}):s.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-6 text-center text-xs",children:"Open a session to see what it is doing."})}function U({diagnostics:e,live:a=!0,connectors:o}){return s.jsxs("div",{"data-slot":"session-inspector",className:"flex h-full min-w-0 flex-col gap-4 overflow-y-auto p-3",children:[s.jsx(E,{diagnostics:e,live:a}),s.jsx($,{diagnostics:e}),s.jsx(A,{diagnostics:e}),s.jsx(G,{diagnostics:e}),o,s.jsxs("div",{className:"mt-auto pt-2",children:[s.jsx(p,{className:"mb-2"}),s.jsx(f,{diagnostics:e,className:"w-full justify-center"})]})]})}function E({diagnostics:e,live:a}){const o=_(e.lastEventAt,a),n=S[e.connectionState];return s.jsxs(l,{label:"Live",children:[s.jsx(t,{label:"Live updates",children:s.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[s.jsx("span",{"aria-hidden":!0,className:v("inline-block size-1.5 rounded-full",n.color,n.tasks&&"animate-breath")}),n.shortLabel]})}),s.jsx(t,{label:"Turn",children:L(e)}),s.jsx(t,{label:"Last event",children:e.lastEventSeq===0?"none yet":`seq ${e.lastEventSeq}`}),s.jsx(t,{label:"Resumed from",children:e.snapshotCursor===null?"not hydrated":`cursor ${e.snapshotCursor}`}),s.jsx(t,{label:"Last update",children:o===null?"—":`${k(o)} ago`}),s.jsx(t,{label:"Queued messages",children:String(e.queueDepth)})]})}function $({diagnostics:e}){return s.jsxs(l,{label:"Resolved",children:[s.jsx(t,{label:"Directory",wrap:!0,children:e.cwd??"—"}),s.jsx(t,{label:"Git",children:B(e.git)}),s.jsx(t,{label:"Runtime",children:e.runtime??"—"}),s.jsx(t,{label:"Model",wrap:!0,children:e.model??"—"}),e.selectedModel!==null&&e.selectedModel!==e.model&&s.jsx(t,{label:"Model selected",children:e.selectedModel}),s.jsx(t,{label:"Effort",children:e.effort??"—"}),s.jsx(t,{label:"Fast mode",children:e.fastMode?"on":"off"}),s.jsx(t,{label:"Permissions",children:e.permissionMode}),s.jsx(t,{label:"Session id",wrap:!0,children:e.sessionId}),s.jsx(t,{label:"DorkOS version",children:e.clientVersion??"—"})]})}function A({diagnostics:e}){var o;const a=(((o=e.contextUsage)==null?void 0:o.categories)??[]).filter(n=>n.tokens>0).sort((n,i)=>i.tokens-n.tokens);return s.jsxs(l,{label:"Usage",children:[s.jsx(t,{label:"Context",children:e.contextPercent===null?"—":`${e.contextPercent}% full`}),e.contextUsage&&s.jsxs(t,{label:"Tokens",children:[r(e.contextUsage.totalTokens)," / ",r(e.contextUsage.maxTokens)]}),a.map(n=>s.jsx(t,{label:n.name,indent:!0,swatch:n.color,"data-testid":`context-category-${n.name}`,children:r(n.tokens)},n.name)),e.cache===null?s.jsx(t,{label:"Cache",children:"nothing cached yet"}):s.jsxs(s.Fragment,{children:[s.jsx(t,{label:"Cache hit",children:`${N(e.cache)}%`}),s.jsx(t,{label:"Cache read",indent:!0,children:r(e.cache.readTokens)}),s.jsx(t,{label:"Cache written",indent:!0,children:r(e.cache.creationTokens)})]}),e.usage!==null&&I(e.usage)?s.jsx("div",{className:"pt-1",children:s.jsx(C,{usage:e.usage})}):s.jsx(t,{label:"Usage & cost",children:"no usage reported"})]})}function G({diagnostics:e}){const{running:a,finished:o}=w(e.activeSubagents);return s.jsxs(l,{label:"Subagents",children:[s.jsx(t,{label:"Running",children:O(a.length,e.runningSubagentCount)}),a.map(n=>s.jsx(u,{subagent:n},n.taskId)),o.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(t,{label:"Finished this turn",children:String(o.length)}),o.map(n=>s.jsx(u,{subagent:n},n.taskId))]}),s.jsx(t,{label:"Available",children:e.subagents.length===0?"none":e.subagents.map(n=>n.name).join(", ")})]})}function u({subagent:e}){return s.jsxs("div",{"data-testid":`active-subagent-${e.taskId}`,"data-status":e.status,className:"space-y-0.5 py-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(y,{className:"text-muted-foreground size-3.5 shrink-0","aria-hidden":!0}),s.jsx("span",{className:"min-w-0 flex-1 truncate",children:e.description??e.taskId}),s.jsx(M,{size:"xs",variant:"secondary",className:"shrink-0",children:e.status})]}),s.jsxs("p",{className:"text-muted-foreground text-3xs pl-5 leading-tight",children:[e.toolUses??0," tool",e.toolUses===1?"":"s",e.lastToolName?` · last ${e.lastToolName}`:""]})]})}function l({label:e,children:a}){return s.jsxs("section",{className:"min-w-0",children:[s.jsx("h3",{className:"text-muted-foreground px-1 pb-1 text-xs font-medium tracking-wide uppercase",children:e}),s.jsx("div",{className:"space-y-1 px-1 text-xs",children:a})]})}function L(e){return e.triggerPending?"sending":e.streaming?"streaming":e.lifecycle??"not hydrated"}function O(e,a){const o=e===0?"none":String(e);return a===null||a===e?o:`${o} · server says ${a}`}function B(e){return e.state==="unknown"?"—":e.state==="no-repo"?"no repo":e.dirty?`${e.branch} · changed`:`${e.branch} · clean`}function _(e,a){const[o,n]=c.useState(()=>Date.now());return c.useEffect(()=>{if(e===null||!a)return;const i=()=>n(Date.now());i();const d=setInterval(i,D);return()=>clearInterval(d)},[e,a]),e===null?null:Math.max(0,o-e)}export{K as AutoModeConfirmDialog,V as AutonomyConfirmDialog,W as ConnectionItem,J as ContextItem,X as CwdItem,Y as GitStatusItem,Z as MakeDefaultStopLine,ee as ModelConfigPopover,se as PermissionModeItem,te as PlanModeItem,ne as ReadOnlyModeNotice,ae as RuntimeItem,z as SessionInspector,oe as SessionPopover,U as SessionReadout,re as StatusLine,ie as SubagentsItem,le as UsageRevealPopover,ce as UsageStatusItem,ue as applyStatusBudget,de as formatDiagnostics,xe as gitPromotionState,I as hasRenderableUsage,he as isGitStatusOk,w as partitionSubagents,me as resolveStatusBudget,be as selectPromotedItems,ge as useGitStatus,je as useMakeDefaultStop,pe as useReadOnlyModeHint,fe as useResolvedSessionRuntime,Se as useRuntimeChip,g as useSessionDiagnostics,ve as useSessionPermissionPicker,ke as useSessionPopoverShortcut,Ne as useStatusBarPins,Ie as useStatusBudget};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s,bC as x,dh as m,c_ as p,di as P,dj as g,dk as w,dl as C,ct as S,dm as R,J as T,dn as L,dp as E,B as v,dq as I,dr as _,ds as M,dt as O}from"./index-_1qDsPCM.js";import{du as D}from"./index-_1qDsPCM.js";function j({label:n,empty:t,allClear:a,action:o,children:c}){return s.jsxs("section",{children:[s.jsxs("div",{className:"mb-2 flex min-h-6 items-center justify-between gap-2",children:[s.jsx("h3",{className:"text-muted-foreground text-xs font-medium tracking-widest uppercase",children:n}),!t&&o]}),t?s.jsx("p",{className:"text-muted-foreground/70 text-xs",children:a}):c]})}const u=5,k={animate:{transition:{staggerChildren:.04}}};function B(){const n=x(),t=m(),a=p(),{schedules:o,errors:c,activity:d,isLoading:l,total:i}=P(),f=g(l),A=w(),y=C(o),N=t==="/"&&!a,r=y.slice(0,u),h=c.slice(0,u-r.length),b=d.slice(0,u-r.length-h.length);return N?null:s.jsxs(j,{label:"Needs attention",empty:!f&&i===0&&r.length===0,allClear:"All quiet. Nothing needs you.",action:s.jsx(v,{variant:"ghost",size:"sm",className:"h-6 text-xs",onClick:()=>n({to:"/"}),children:"View all →"}),children:[s.jsx(S,{initial:!1,children:r.map(e=>s.jsx(R,{task:e,className:"mb-2"},e.id))}),s.jsxs(T.div,{variants:k,initial:"initial",animate:"animate",children:[h.map(e=>s.jsx(L,{signal:e},e.id)),b.map(e=>s.jsx(E,{notification:e,onOpen:()=>A(e)},e.id))]})]})}const F=5;function q(){const n=x(),t=m(),a=p(),{groups:o,isLoading:c}=I(),d=g(c);if(t==="/activity"&&!a)return null;const l=o.flatMap(i=>i.items).slice(0,F);return s.jsx(j,{label:"Activity",empty:!d&&l.length===0,allClear:"No recent activity.",action:s.jsx(v,{variant:"ghost",size:"sm",className:"h-6 text-xs",onClick:()=>n({to:"/activity"}),children:"Open activity →"}),children:s.jsx(_,{children:s.jsx(M,{children:l.map(i=>s.jsx(O,{item:i},i.id))})})})}function H(){return s.jsxs("div",{"data-slot":"pulse",className:"flex h-full flex-col gap-6 overflow-y-auto p-4",children:[s.jsx(B,{}),s.jsx(q,{})]})}export{H as PulsePanel,D as usePulseFreshness};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as T,j as e,aM as R,aN as $,aJ as A,aO as I,aP as z,aj as S,aQ as O,B as C,W as w,aR as P,aS as M,aT as B,aU as L,aV as _,aW as k,aX as q,aY as h}from"./index-_1qDsPCM.js";import{aZ as F,a_ as J,a$ as Q,b0 as Z,b1 as G,b2 as K}from"./index-_1qDsPCM.js";const H=new Set(["disabled","discovered","incompatible","invalid"]);function U({extension:t,onToggle:j,isToggling:m,onSetRunApproval:c,isSettingApproval:x}){const{manifest:n,status:i,scope:v,error:o,serverError:p,origin:g,approvedToRun:N}=t,[d,f]=T.useState(!1),u=!H.has(i),s=i==="incompatible",a=i==="invalid",r=i==="compile_error"||i==="activate_error",l=!s&&!a,b=!(g==="core"&&n.canDisable===!1),D=t.hasServerEntry||t.hasDataProxy,y=r?"Error":s?"Incompatible":a?"Invalid":null;return e.jsx(R,{"data-slot":"extension-card","data-testid":`extension-card-${t.id}`,radius:"lg",gap:"none",className:S(r&&"border-amber-500/50",(s||a)&&"opacity-70"),children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r&&e.jsx($,{className:"size-4 shrink-0 text-amber-500","aria-hidden":"true"}),(s||a)&&!r&&e.jsx(A,{className:"text-muted-foreground size-4 shrink-0","aria-hidden":"true"}),!r&&!s&&!a&&e.jsx(I,{className:"text-muted-foreground size-4 shrink-0","aria-hidden":"true"}),e.jsx("span",{className:"font-medium",children:n.name}),e.jsxs("span",{className:"text-muted-foreground text-sm",children:["v",n.version]})]}),n.description&&e.jsx("p",{className:"text-muted-foreground text-sm",children:n.description}),s&&n.minHostVersion&&e.jsxs("p",{className:"text-muted-foreground text-sm",children:["Requires DorkOS >= ",n.minHostVersion]}),r&&o&&e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"text-sm text-amber-600 dark:text-amber-400",children:[i==="compile_error"?"Compilation error: ":"Activation failed: ",o.message]}),o.details&&e.jsxs("button",{type:"button",onClick:()=>f(E=>!E),className:"text-muted-foreground hover:text-foreground flex items-center gap-1 text-xs transition-colors","aria-expanded":d,children:[e.jsx(z,{className:S("size-3 transition-transform",d&&"rotate-180")}),d?"Hide details":"Show details"]}),d&&o.details&&e.jsx("pre",{className:"bg-muted mt-1 max-h-32 overflow-auto rounded-md p-2 text-xs",children:o.details})]}),p&&e.jsxs("p",{className:"text-sm text-amber-600 dark:text-amber-400",children:["Server side failed to rebuild: ",p.message,". The previous version is still running."]}),g==="user"&&(N?e.jsxs("div",{className:"text-muted-foreground flex flex-wrap items-center gap-2 text-xs","data-testid":`extension-run-allowed-${t.id}`,children:[e.jsx(O,{className:"size-3.5 shrink-0","aria-hidden":"true"}),e.jsx("span",{children:"You allowed this to run inside DorkOS."}),e.jsx("button",{type:"button",onClick:()=>c(t.id,!1),disabled:x,className:"hover:text-foreground underline underline-offset-2 disabled:opacity-50",children:"Stop it"})]}):e.jsxs("div",{className:"space-y-2 rounded-lg border border-amber-500/40 bg-amber-500/5 p-3","data-testid":`extension-needs-approval-${t.id}`,children:[e.jsx("p",{className:"text-sm font-medium",children:"This extension is waiting for you"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:D?"None of it has run yet. Allowing it lets its code run inside DorkOS, both on this machine, where it can reach anything DorkOS can, and on this page, signed in as you. Allow it only if you trust where it came from.":"None of it has run yet. Allowing it lets its code run on this page, signed in as you, so it can do anything you can do in DorkOS. Allow it only if you trust where it came from."}),e.jsx(C,{size:"sm",onClick:()=>c(t.id,!0),disabled:x,"data-testid":`extension-approve-run-${t.id}`,children:"Allow it to run"})]})),e.jsxs("div",{className:"text-muted-foreground flex flex-wrap items-center gap-2 text-xs",children:[e.jsx(w,{variant:"outline",children:v}),y&&e.jsx(w,{variant:y==="Error"?"destructive":"secondary","data-testid":`extension-health-${t.id}`,children:y}),n.author&&e.jsx("span",{children:n.author})]})]}),e.jsx("div",{className:"flex shrink-0 items-center pt-0.5",children:b?e.jsx(P,{checked:u,onCheckedChange:E=>j(t.id,E),disabled:!l||m,"aria-label":`${u?"Disable":"Enable"} ${n.name}`}):e.jsx(w,{variant:"secondary",title:"This extension is required and is always on","data-testid":`extension-required-${t.id}`,children:"Required"})})]})})}function W(){const{data:t=[],isLoading:j}=M(),m=B(),c=L(),x=_(),n=k(!0),i=k(!1),v=new Set([...m.variables?[m.variables]:[],...c.variables?[c.variables]:[]]),o=new Set([...n.isPending&&n.variables?[n.variables]:[],...i.isPending&&i.variables?[i.variables]:[]]);function p(s,a){(a?n:i).mutate(s,{onSuccess:l=>{const b=l.extension.manifest.name;h.success(a?`${b} can now run inside DorkOS`:`${b} has stopped running inside DorkOS`)},onError:l=>{h.error(a?"Couldn’t let it run.":"Couldn’t stop it running.",{description:l.message})}})}async function g(s,a){(a?m:c).mutate(s,{onError:l=>{h.error(a?"Couldn’t turn that on.":"Couldn’t turn that off.",{description:l.message})}})}function N(){x.mutate(void 0,{onSuccess:s=>{h.success(`Reloaded ${s.length} extension${s.length===1?"":"s"}`)},onError:s=>{h.error("Couldn’t reload your extensions.",{description:s.message})}})}if(j)return e.jsx("div",{className:"text-muted-foreground py-8 text-center text-sm",children:"Loading extensions…"});const d=t.filter(s=>s.origin==="core"),f=t.filter(s=>s.origin==="user"),u=s=>e.jsx(U,{extension:s,onToggle:g,isToggling:v.has(s.id),onSetRunApproval:p,isSettingApproval:o.has(s.id)},s.id);return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("p",{className:"text-muted-foreground text-sm",children:["Extensions add new UI and capabilities to DorkOS. Core extensions ship with DorkOS; installed extensions live in"," ",e.jsx("code",{className:"bg-muted rounded px-1",children:"~/.dork/extensions/"})," or"," ",e.jsx("code",{className:"bg-muted rounded px-1",children:".dork/extensions/"})," in your project."]}),t.length===0?e.jsx("div",{className:"text-muted-foreground py-8 text-center text-sm","data-testid":"no-extensions",children:e.jsx("p",{children:"No extensions installed."})}):e.jsxs(e.Fragment,{children:[d.length>0&&e.jsxs("section",{className:"space-y-3","data-testid":"core-extensions-section",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"Core extensions"}),e.jsx("div",{className:"space-y-3",children:d.map(u)})]}),e.jsxs("section",{className:"space-y-3","data-testid":"installed-extensions-section",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"Installed extensions"}),f.length>0?e.jsx("div",{className:"space-y-3",children:f.map(u)}):e.jsxs("div",{className:"text-muted-foreground rounded-xl border border-dashed p-4 text-sm","data-testid":"no-installed-extensions",children:["No extensions installed yet. Browse"," ",e.jsx("span",{className:"text-foreground font-medium",children:"Marketplace"})," to add some."]})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsxs(C,{variant:"outline",size:"sm",onClick:N,disabled:x.isPending,"data-testid":"reload-extensions-button",children:[e.jsx(q,{className:S("mr-2 size-4",x.isPending&&"animate-spin")}),"Reload extensions"]})})]})}export{F as ExtensionEventBridge,J as ExtensionLoader,Q as ExtensionProvider,W as ExtensionsSettingsTab,Z as createExtensionAPI,G as createExtensionEventBridge,K as useExtensions};
|