quadwork 1.5.3 → 1.5.5
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/bin/quadwork.js +4 -1
- package/out/404.html +1 -1
- package/out/__next.__PAGE__.txt +3 -3
- package/out/__next._full.txt +16 -15
- package/out/__next._head.txt +4 -4
- package/out/__next._index.txt +6 -5
- package/out/__next._tree.txt +1 -1
- package/out/_next/static/chunks/0.bbxho1vnxin.js +1 -0
- package/out/_next/static/chunks/{0.57eg262w~qg.js → 01xlw8hd842-c.js} +1 -1
- package/out/_next/static/chunks/{135rms05ismy4.js → 0656i.-.r7.a9.js} +2 -2
- package/out/_next/static/chunks/09elx026_5z7..js +1 -0
- package/out/_next/static/chunks/0d3shmwh5_nmn.js +1 -0
- package/out/_next/static/chunks/0fpg8z.yd2xb7.js +1 -0
- package/out/_next/static/chunks/0iwycgwby2dd_.js +1 -0
- package/out/_next/static/chunks/0mtmv-f5qymoi.js +1 -0
- package/out/_next/static/chunks/0o3_.p5ivp5sp.js +1 -0
- package/out/_next/static/chunks/0pqt~8bl3ukh4.js +4 -0
- package/out/_next/static/chunks/0tpl_-uk8hbaa.js +1 -0
- package/out/_next/static/chunks/0ze4gu236oq96.js +31 -0
- package/out/_next/static/chunks/0zfotsowwll1x.js +2 -0
- package/out/_next/static/chunks/0~xrqi87fqraz.js +1 -0
- package/out/_next/static/chunks/{0wreuebrwlg.2.js → 11oyj9c4m_ppy.js} +14 -14
- package/out/_next/static/chunks/11v7tu7pto6_x.js +1 -0
- package/out/_next/static/chunks/{0dmi9pk2bd712.js → 12i404gkhv7q..js} +2 -2
- package/out/_next/static/chunks/16g.ca89g7fib.js +1 -0
- package/out/_next/static/chunks/{turbopack-0wh29ykoy-rb5.js → turbopack-0lcwh84lrj9gi.js} +1 -1
- package/out/_not-found/__next._full.txt +17 -16
- package/out/_not-found/__next._head.txt +4 -4
- package/out/_not-found/__next._index.txt +6 -5
- package/out/_not-found/__next._not-found.__PAGE__.txt +2 -2
- package/out/_not-found/__next._not-found.txt +3 -3
- package/out/_not-found/__next._tree.txt +1 -1
- package/out/_not-found.html +1 -1
- package/out/_not-found.txt +17 -16
- package/out/app-shell/__next._full.txt +17 -16
- package/out/app-shell/__next._head.txt +4 -4
- package/out/app-shell/__next._index.txt +6 -5
- package/out/app-shell/__next._tree.txt +1 -1
- package/out/app-shell/__next.app-shell.__PAGE__.txt +2 -2
- package/out/app-shell/__next.app-shell.txt +3 -3
- package/out/app-shell.html +1 -1
- package/out/app-shell.txt +17 -16
- package/out/index.html +1 -1
- package/out/index.txt +16 -15
- package/out/project/_/__next._full.txt +18 -17
- package/out/project/_/__next._head.txt +4 -4
- package/out/project/_/__next._index.txt +6 -5
- package/out/project/_/__next._tree.txt +1 -1
- package/out/project/_/__next.project.$d$id.__PAGE__.txt +3 -3
- package/out/project/_/__next.project.$d$id.txt +3 -3
- package/out/project/_/__next.project.txt +3 -3
- package/out/project/_/memory/__next._full.txt +18 -17
- package/out/project/_/memory/__next._head.txt +4 -4
- package/out/project/_/memory/__next._index.txt +6 -5
- package/out/project/_/memory/__next._tree.txt +1 -1
- package/out/project/_/memory/__next.project.$d$id.memory.__PAGE__.txt +3 -3
- package/out/project/_/memory/__next.project.$d$id.memory.txt +3 -3
- package/out/project/_/memory/__next.project.$d$id.txt +3 -3
- package/out/project/_/memory/__next.project.txt +3 -3
- package/out/project/_/memory.html +1 -1
- package/out/project/_/memory.txt +18 -17
- package/out/project/_/queue/__next._full.txt +18 -17
- package/out/project/_/queue/__next._head.txt +4 -4
- package/out/project/_/queue/__next._index.txt +6 -5
- package/out/project/_/queue/__next._tree.txt +1 -1
- package/out/project/_/queue/__next.project.$d$id.queue.__PAGE__.txt +3 -3
- package/out/project/_/queue/__next.project.$d$id.queue.txt +3 -3
- package/out/project/_/queue/__next.project.$d$id.txt +3 -3
- package/out/project/_/queue/__next.project.txt +3 -3
- package/out/project/_/queue.html +1 -1
- package/out/project/_/queue.txt +18 -17
- package/out/project/_.html +1 -1
- package/out/project/_.txt +18 -17
- package/out/settings/__next._full.txt +18 -17
- package/out/settings/__next._head.txt +4 -4
- package/out/settings/__next._index.txt +6 -5
- package/out/settings/__next._tree.txt +1 -1
- package/out/settings/__next.settings.__PAGE__.txt +3 -3
- package/out/settings/__next.settings.txt +3 -3
- package/out/settings.html +1 -1
- package/out/settings.txt +18 -17
- package/out/setup/__next._full.txt +18 -17
- package/out/setup/__next._head.txt +4 -4
- package/out/setup/__next._index.txt +6 -5
- package/out/setup/__next._tree.txt +1 -1
- package/out/setup/__next.setup.__PAGE__.txt +3 -3
- package/out/setup/__next.setup.txt +3 -3
- package/out/setup.html +1 -1
- package/out/setup.txt +18 -17
- package/package.json +1 -1
- package/server/index.js +130 -41
- package/server/install-agentchattr.js +53 -0
- package/server/routes.js +25 -3
- package/server/routes.telegramBridge.test.js +4 -1
- package/templates/CLAUDE.md +2 -1
- package/templates/seeds/dev.AGENTS.md +2 -0
- package/templates/seeds/head.AGENTS.md +2 -0
- package/templates/seeds/reviewer1.AGENTS.md +3 -1
- package/templates/seeds/reviewer2.AGENTS.md +3 -1
- package/out/_next/static/chunks/04_t39bv8y9pe.js +0 -1
- package/out/_next/static/chunks/084lff9v4p_vh.js +0 -1
- package/out/_next/static/chunks/09sq17vme9g6p.js +0 -1
- package/out/_next/static/chunks/0e.ktwt1nyj...js +0 -1
- package/out/_next/static/chunks/0excsn2a_5qsb.js +0 -4
- package/out/_next/static/chunks/0ezniz80psxr6.js +0 -1
- package/out/_next/static/chunks/0g-nq4.uckan-.js +0 -1
- package/out/_next/static/chunks/0ox7p_szjhn69.js +0 -1
- package/out/_next/static/chunks/0r7t_sj_sejq9.js +0 -1
- package/out/_next/static/chunks/0r_tb4lmfa_yb.js +0 -1
- package/out/_next/static/chunks/0whtwwbpg72ar.js +0 -1
- package/out/_next/static/chunks/0z~0.4hivi.f2.js +0 -31
- package/out/_next/static/chunks/15i5_ay.0ap.6.js +0 -2
- package/out/_next/static/chunks/17y2walb2um9w.js +0 -1
- /package/out/_next/static/{X4zdS6Y6HkLOaElNeHwnq → KunOMCSnzzhSKSWu-o7QB}/_buildManifest.js +0 -0
- /package/out/_next/static/{X4zdS6Y6HkLOaElNeHwnq → KunOMCSnzzhSKSWu-o7QB}/_clientMiddlewareManifest.js +0 -0
- /package/out/_next/static/{X4zdS6Y6HkLOaElNeHwnq → KunOMCSnzzhSKSWu-o7QB}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67585,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BailoutToCSR",{enumerable:!0,get:function(){return l}});let r=e.r(32061);function l({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new r.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},9885,(e,t,n)=>{"use strict";function r(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"encodeURIPath",{enumerable:!0,get:function(){return r}})},52157,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"PreloadChunks",{enumerable:!0,get:function(){return i}});let r=e.r(43476),l=e.r(74080),o=e.r(63599),u=e.r(9885),a=e.r(43369);function i({moduleIds:e}){if("u">typeof window)return null;let t=o.workAsyncStorage.getStore();if(void 0===t)return null;let n=[];if(t.reactLoadableManifest&&e){let r=t.reactLoadableManifest;for(let t of e){if(!r[t])continue;let e=r[t].files;n.push(...e)}}if(0===n.length)return null;let s=(0,a.getAssetTokenQuery)();return(0,r.jsx)(r.Fragment,{children:n.map(e=>{let n=`${t.assetPrefix}/_next/${(0,u.encodeURIPath)(e)}${s}`;return e.endsWith(".css")?(0,r.jsx)("link",{precedence:"dynamic",href:n,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,l.preload)(n,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},69093,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return s}});let r=e.r(43476),l=e.r(71645),o=e.r(67585),u=e.r(52157);function a(e){return{default:e&&"default"in e?e.default:e}}let i={loader:()=>Promise.resolve(a(()=>null)),loading:null,ssr:!0},s=function(e){let t={...i,...e},n=(0,l.lazy)(()=>t.loader().then(a)),s=t.loading;function d(e){let a=s?(0,r.jsx)(s,{isLoading:!0,pastDelay:!0,error:null}):null,i=!t.ssr||!!t.loading,d=i?l.Suspense:l.Fragment,c=t.ssr?(0,r.jsxs)(r.Fragment,{children:["u"<typeof window?(0,r.jsx)(u.PreloadChunks,{moduleIds:t.modules}):null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(o.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(d,{...i?{fallback:a}:{},children:c})}return d.displayName="LoadableComponent",d}},70703,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return l}});let r=e.r(55682)._(e.r(69093));function l(e,t){let n={};"function"==typeof e&&(n.loader=e);let l={...n,...t};return(0,r.default)({...l,modules:l.loadableGenerated?.modules})}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},39950,e=>{"use strict";var t=e.i(43476),n=e.i(70703),r=e.i(18566);let l=(0,n.default)(()=>e.A(92229),{loadableGenerated:{modules:[68455]},ssr:!1});e.s(["default",0,function(){let e=(0,r.usePathname)().split("/")[2]||"";return e&&"_"!==e?(0,t.jsx)(l,{projectId:e}):null}])},92229,e=>{e.v(t=>Promise.all(["static/chunks/0656i.-.r7.a9.js"].map(t=>e.l(t))).then(()=>t(68455)))}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,72035,e=>{"use strict";var t=e.i(43476),s=e.i(71645);e.s(["default",0,function({projectId:e}){let[a,r]=(0,s.useState)([]),[n,o]=(0,s.useState)(""),[c,l]=(0,s.useState)(null),[d,i]=(0,s.useState)({}),[x,m]=(0,s.useState)(""),[p,h]=(0,s.useState)(""),[b,u]=(0,s.useState)(!1),[f,j]=(0,s.useState)(!1),[g,y]=(0,s.useState)(!1),[v,N]=(0,s.useState)("cards"),[S,C]=(0,s.useState)({memory_cards_dir:"",shared_memory_path:"",butler_scripts_dir:""}),[_,k]=(0,s.useState)(!1),[$,T]=(0,s.useState)(!1),w=(0,s.useCallback)(()=>{fetch(`/api/memory?project=${encodeURIComponent(e)}&action=cards&search=${encodeURIComponent(n)}`).then(e=>e.ok?e.json():[]).then(r).catch(()=>{})},[e,n]);(0,s.useEffect)(()=>{w()},[w]),(0,s.useEffect)(()=>{fetch(`/api/memory?project=${encodeURIComponent(e)}&action=status`).then(e=>e.ok?e.json():{agents:{}}).then(e=>i(e.agents||{})).catch(()=>{})},[e]),(0,s.useEffect)(()=>{fetch(`/api/memory?project=${encodeURIComponent(e)}&action=shared-memory`).then(e=>e.ok?e.json():{content:""}).then(e=>m(e.content)).catch(()=>{})},[e]),(0,s.useEffect)(()=>{fetch(`/api/memory?project=${encodeURIComponent(e)}&action=settings`).then(e=>e.ok?e.json():{}).then(e=>C({memory_cards_dir:e.memory_cards_dir||"",shared_memory_path:e.shared_memory_path||"",butler_scripts_dir:e.butler_scripts_dir||""})).catch(()=>{})},[e]);let R=t=>{u(!0),h(e=>e+`
|
|
2
2
|
> ${t}
|
|
3
3
|
`),fetch(`/api/memory?project=${encodeURIComponent(e)}&action=butler`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:t})}).then(e=>e.json()).then(s=>{h(e=>e+(s.ok?s.output:`Error: ${s.error}`)+"\n"),"inject.sh"===t&&fetch(`/api/memory?project=${encodeURIComponent(e)}&action=status`).then(e=>e.ok?e.json():{agents:{}}).then(e=>i(e.agents||{})).catch(()=>{}),("butler-scan.sh"===t||"butler-consolidate.sh"===t)&&w()}).catch(e=>h(t=>t+`Error: ${e.message}
|
|
4
|
-
`)).finally(()=>u(!1))};return(0,t.jsxs)("div",{className:"h-full flex flex-col p-6 max-w-5xl",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)("h1",{className:"text-lg font-semibold text-text tracking-tight",children:"Shared Memory"}),(0,t.jsxs)("div",{className:"flex items-center gap-1 border border-border",children:[(0,t.jsx)("button",{onClick:()=>N("cards"),className:`px-3 py-1 text-[11px] ${"cards"===v?"bg-accent text-bg":"text-text-muted hover:text-text"}`,children:"Cards"}),(0,t.jsx)("button",{onClick:()=>N("editor"),className:`px-3 py-1 text-[11px] ${"editor"===v?"bg-accent text-bg":"text-text-muted hover:text-text"}`,children:"Editor"}),(0,t.jsx)("button",{onClick:()=>N("settings"),className:`px-3 py-1 text-[11px] ${"settings"===v?"bg-accent text-bg":"text-text-muted hover:text-text"}`,children:"Settings"})]})]}),(0,t.jsx)("div",{className:"flex items-center gap-4 mb-4 text-[11px]",children:Object.entries(d).map(([e,s])=>(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${s.injected?"bg-accent":"bg-text-muted"}`}),(0,t.jsx)("span",{className:"text-text-muted",children:e.toUpperCase()}),s.lastModified&&(0,t.jsx)("span",{className:"text-text-muted text-[10px]",children:new Date(s.lastModified).toLocaleTimeString()})]},e))}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,t.jsx)("button",{onClick:()=>R("butler-scan.sh"),disabled:b,className:"px-3 py-1 text-[11px] border border-border text-text-muted hover:text-text hover:border-accent transition-colors disabled:opacity-50",children:"Scan"}),(0,t.jsx)("button",{onClick:()=>R("butler-consolidate.sh"),disabled:b,className:"px-3 py-1 text-[11px] border border-border text-text-muted hover:text-text hover:border-accent transition-colors disabled:opacity-50",children:"Consolidate"}),(0,t.jsx)("button",{onClick:()=>R("inject.sh"),disabled:b,className:"px-3 py-1 text-[11px] border border-border text-text-muted hover:text-text hover:border-accent transition-colors disabled:opacity-50",children:"Inject"}),b&&(0,t.jsx)("span",{className:"text-[10px] text-text-muted",children:"Running..."})]}),p&&(0,t.jsx)("div",{className:"mb-4 border border-border bg-bg-surface max-h-32 overflow-y-auto",children:(0,t.jsx)("pre",{className:"p-2 text-[10px] text-text-muted whitespace-pre-wrap",children:p.trim()})}),"cards"===v&&(0,t.jsxs)("div",{className:"flex-1 min-h-0 flex flex-col",children:[(0,t.jsx)("input",{value:n,onChange:e=>o(e.target.value),placeholder:"Search cards...",className:"mb-3 bg-transparent border border-border px-2 py-1.5 text-[12px] text-text outline-none focus:border-accent"}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto border border-border",children:[0===a.length&&(0,t.jsx)("div",{className:"p-3 text-[11px] text-text-muted",children:"No memory cards found"}),a.map(e=>(0,t.jsxs)("div",{className:"border-b border-border/50 last:border-b-0",children:[(0,t.jsxs)("button",{onClick:()=>l(c===e.file?null:e.file),className:"w-full flex items-center gap-3 px-3 py-1.5 hover:bg-[#1a1a1a] transition-colors text-left",children:[(0,t.jsx)("span",{className:"text-[11px] text-text flex-1 truncate",children:e.title}),(0,t.jsx)("span",{className:"text-[10px] text-text-muted shrink-0",children:e.agent}),(0,t.jsx)("span",{className:"text-[10px] text-text-muted shrink-0",children:e.date}),e.tags&&(0,t.jsx)("span",{className:"text-[10px] text-accent shrink-0",children:e.tags})]}),c===e.file&&(0,t.jsx)("div",{className:"px-3 pb-2 bg-bg-surface",children:(0,t.jsx)("pre",{className:"text-[11px] text-text whitespace-pre-wrap",children:e.content})})]},e.file))]})]}),"editor"===v&&(0,t.jsxs)("div",{className:"flex-1 min-h-0 flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)("span",{className:"text-[11px] text-text-muted",children:"shared-memory.md"}),(0,t.jsx)("button",{onClick:()=>{j(!0),fetch(`/api/memory?project=${encodeURIComponent(e)}&action=save-memory`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:x})}).then(e=>e.json()).then(e=>{e.ok&&(y(!0),setTimeout(()=>y(!1),2e3))}).catch(()=>{}).finally(()=>j(!1))},disabled:f,className:"px-4 py-1 bg-accent text-bg text-[12px] font-semibold hover:bg-accent-dim transition-colors disabled:opacity-50",children:f?"Saving...":g?"Saved":"Save"})]}),(0,t.jsx)("textarea",{value:x,onChange:e=>m(e.target.value),className:"flex-1 bg-bg-surface border border-border p-3 text-[12px] text-text outline-none focus:border-accent resize-none"})]}),"settings"===v&&(0,t.jsxs)("div",{className:"flex-1 min-h-0 flex flex-col gap-4",children:[(0,t.jsx)("p",{className:"text-[11px] text-text-muted",children:"Override default paths for this project. Leave blank to use defaults."}),(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[11px] text-text-muted",children:"Memory Cards Directory"}),(0,t.jsx)("input",{value:S.memory_cards_dir,onChange:e=>C({...S,memory_cards_dir:e.target.value}),placeholder:"../agent-memory/archive/v2/cards",className:"bg-transparent border border-border px-2 py-1.5 text-[12px] text-text outline-none focus:border-accent"})]}),(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[11px] text-text-muted",children:"Shared Memory Path"}),(0,t.jsx)("input",{value:S.shared_memory_path,onChange:e=>C({...S,shared_memory_path:e.target.value}),placeholder:"../agent-memory/central/short-term/agent-os.md",className:"bg-transparent border border-border px-2 py-1.5 text-[12px] text-text outline-none focus:border-accent"})]}),(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[11px] text-text-muted",children:"Butler Scripts Directory"}),(0,t.jsx)("input",{value:S.butler_scripts_dir,onChange:e=>C({...S,butler_scripts_dir:e.target.value}),placeholder:"../agent-memory/scripts",className:"bg-transparent border border-border px-2 py-1.5 text-[12px] text-text outline-none focus:border-accent"})]}),(0,t.jsx)("div",{children:(0,t.jsx)("button",{onClick:()=>{k(!0),fetch(`/api/memory?project=${encodeURIComponent(e)}&action=save-settings`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(S)}).then(e=>e.json()).then(e=>{e.ok&&(T(!0),setTimeout(()=>T(!1),2e3))}).catch(()=>{}).finally(()=>k(!1))},disabled:_,className:"px-4 py-1 bg-accent text-bg text-[12px] font-semibold hover:bg-accent-dim transition-colors disabled:opacity-50",children:_?"Saving...":$?"Saved":"Save Settings"})})]})]})}])},
|
|
4
|
+
`)).finally(()=>u(!1))};return(0,t.jsxs)("div",{className:"h-full flex flex-col p-6 max-w-5xl",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)("h1",{className:"text-lg font-semibold text-text tracking-tight",children:"Shared Memory"}),(0,t.jsxs)("div",{className:"flex items-center gap-1 border border-border",children:[(0,t.jsx)("button",{onClick:()=>N("cards"),className:`px-3 py-1 text-[11px] ${"cards"===v?"bg-accent text-bg":"text-text-muted hover:text-text"}`,children:"Cards"}),(0,t.jsx)("button",{onClick:()=>N("editor"),className:`px-3 py-1 text-[11px] ${"editor"===v?"bg-accent text-bg":"text-text-muted hover:text-text"}`,children:"Editor"}),(0,t.jsx)("button",{onClick:()=>N("settings"),className:`px-3 py-1 text-[11px] ${"settings"===v?"bg-accent text-bg":"text-text-muted hover:text-text"}`,children:"Settings"})]})]}),(0,t.jsx)("div",{className:"flex items-center gap-4 mb-4 text-[11px]",children:Object.entries(d).map(([e,s])=>(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${s.injected?"bg-accent":"bg-text-muted"}`}),(0,t.jsx)("span",{className:"text-text-muted",children:e.toUpperCase()}),s.lastModified&&(0,t.jsx)("span",{className:"text-text-muted text-[10px]",children:new Date(s.lastModified).toLocaleTimeString()})]},e))}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,t.jsx)("button",{onClick:()=>R("butler-scan.sh"),disabled:b,className:"px-3 py-1 text-[11px] border border-border text-text-muted hover:text-text hover:border-accent transition-colors disabled:opacity-50",children:"Scan"}),(0,t.jsx)("button",{onClick:()=>R("butler-consolidate.sh"),disabled:b,className:"px-3 py-1 text-[11px] border border-border text-text-muted hover:text-text hover:border-accent transition-colors disabled:opacity-50",children:"Consolidate"}),(0,t.jsx)("button",{onClick:()=>R("inject.sh"),disabled:b,className:"px-3 py-1 text-[11px] border border-border text-text-muted hover:text-text hover:border-accent transition-colors disabled:opacity-50",children:"Inject"}),b&&(0,t.jsx)("span",{className:"text-[10px] text-text-muted",children:"Running..."})]}),p&&(0,t.jsx)("div",{className:"mb-4 border border-border bg-bg-surface max-h-32 overflow-y-auto",children:(0,t.jsx)("pre",{className:"p-2 text-[10px] text-text-muted whitespace-pre-wrap",children:p.trim()})}),"cards"===v&&(0,t.jsxs)("div",{className:"flex-1 min-h-0 flex flex-col",children:[(0,t.jsx)("input",{value:n,onChange:e=>o(e.target.value),placeholder:"Search cards...",className:"mb-3 bg-transparent border border-border px-2 py-1.5 text-[12px] text-text outline-none focus:border-accent"}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto border border-border",children:[0===a.length&&(0,t.jsx)("div",{className:"p-3 text-[11px] text-text-muted",children:"No memory cards found"}),a.map(e=>(0,t.jsxs)("div",{className:"border-b border-border/50 last:border-b-0",children:[(0,t.jsxs)("button",{onClick:()=>l(c===e.file?null:e.file),className:"w-full flex items-center gap-3 px-3 py-1.5 hover:bg-[#1a1a1a] transition-colors text-left",children:[(0,t.jsx)("span",{className:"text-[11px] text-text flex-1 truncate",children:e.title}),(0,t.jsx)("span",{className:"text-[10px] text-text-muted shrink-0",children:e.agent}),(0,t.jsx)("span",{className:"text-[10px] text-text-muted shrink-0",children:e.date}),e.tags&&(0,t.jsx)("span",{className:"text-[10px] text-accent shrink-0",children:e.tags})]}),c===e.file&&(0,t.jsx)("div",{className:"px-3 pb-2 bg-bg-surface",children:(0,t.jsx)("pre",{className:"text-[11px] text-text whitespace-pre-wrap",children:e.content})})]},e.file))]})]}),"editor"===v&&(0,t.jsxs)("div",{className:"flex-1 min-h-0 flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)("span",{className:"text-[11px] text-text-muted",children:"shared-memory.md"}),(0,t.jsx)("button",{onClick:()=>{j(!0),fetch(`/api/memory?project=${encodeURIComponent(e)}&action=save-memory`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:x})}).then(e=>e.json()).then(e=>{e.ok&&(y(!0),setTimeout(()=>y(!1),2e3))}).catch(()=>{}).finally(()=>j(!1))},disabled:f,className:"px-4 py-1 bg-accent text-bg text-[12px] font-semibold hover:bg-accent-dim transition-colors disabled:opacity-50",children:f?"Saving...":g?"Saved":"Save"})]}),(0,t.jsx)("textarea",{value:x,onChange:e=>m(e.target.value),className:"flex-1 bg-bg-surface border border-border p-3 text-[12px] text-text outline-none focus:border-accent resize-none"})]}),"settings"===v&&(0,t.jsxs)("div",{className:"flex-1 min-h-0 flex flex-col gap-4",children:[(0,t.jsx)("p",{className:"text-[11px] text-text-muted",children:"Override default paths for this project. Leave blank to use defaults."}),(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[11px] text-text-muted",children:"Memory Cards Directory"}),(0,t.jsx)("input",{value:S.memory_cards_dir,onChange:e=>C({...S,memory_cards_dir:e.target.value}),placeholder:"../agent-memory/archive/v2/cards",className:"bg-transparent border border-border px-2 py-1.5 text-[12px] text-text outline-none focus:border-accent"})]}),(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[11px] text-text-muted",children:"Shared Memory Path"}),(0,t.jsx)("input",{value:S.shared_memory_path,onChange:e=>C({...S,shared_memory_path:e.target.value}),placeholder:"../agent-memory/central/short-term/agent-os.md",className:"bg-transparent border border-border px-2 py-1.5 text-[12px] text-text outline-none focus:border-accent"})]}),(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[11px] text-text-muted",children:"Butler Scripts Directory"}),(0,t.jsx)("input",{value:S.butler_scripts_dir,onChange:e=>C({...S,butler_scripts_dir:e.target.value}),placeholder:"../agent-memory/scripts",className:"bg-transparent border border-border px-2 py-1.5 text-[12px] text-text outline-none focus:border-accent"})]}),(0,t.jsx)("div",{children:(0,t.jsx)("button",{onClick:()=>{k(!0),fetch(`/api/memory?project=${encodeURIComponent(e)}&action=save-settings`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(S)}).then(e=>e.json()).then(e=>{e.ok&&(T(!0),setTimeout(()=>T(!1),2e3))}).catch(()=>{}).finally(()=>k(!1))},disabled:_,className:"px-4 py-1 bg-accent text-bg text-[12px] font-semibold hover:bg-accent-dim transition-colors disabled:opacity-50",children:_?"Saving...":$?"Saved":"Save Settings"})})]})]})}])},43200,e=>{e.n(e.i(72035))}]);
|