fuli-context 0.21.0-beta.2 → 0.21.0-beta.3

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.
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SharedJefaReportPage-B54qEdIV.js","assets/_plugin-vue_export-helper-RegzAV-H.js","assets/useApi-CROJJdhE-CH5wlWTU.js","assets/button-A2esxd6G.js","assets/GrowthLoading-Cs9brXcN.js","assets/GrowthLoading-B_QrPkEy.css","assets/Card-89NKHANE.js","assets/shared-report-BLmBg2FG.js","assets/client-DAoXcTUz.js","assets/UiIcon-BADOYtHM.js","assets/UiIcon-EWCwhyKc.css","assets/ui-CtW0tAA1.js","assets/UiDialog-7pnZ-eQA.js","assets/UiIconButton-CkBP6pnX.js","assets/UiSegmented-FwOnE2IZ.js","assets/UiSelect-BIhr03Gk.js","assets/UiSelect-CiSPw-7k.css","assets/UiToggle-bpyawyIe.js","assets/UiToggle-B2sPCVZe.css","assets/UiWeight-TyBehy3K.js","assets/UiWeight-aUNtanHz.css","assets/ui-CE38wkv4.css","assets/preload-helper-BLdHbfdN.js","assets/task-board-model-BohbBuwF.js","assets/ProjectScopePicker-ClDUoUHW.js","assets/ProjectScopePicker-BM3MbIYV.css","assets/board-task-peek-C7CQ78B5.js","assets/shared-report-eUYPCJTS.css","assets/SharedJefaReportPage-CcD-06mK.css","assets/RoundtablesPage-2Akxagrm.js","assets/console-DiNe1hFP.js","assets/vue-router-Dad-4p7O.js","assets/agent-identity-color-RqpT7gtx.js","assets/BackLink-nM3e40IT.js","assets/task-updates-ChvjLQXV.js","assets/RoundtablesPage-BMYSDYH8.css","assets/OverviewPage-D5W-DhOz.js","assets/project-origin-JnGPwlfA.js","assets/design-lab-UWXx2ZtA.js","assets/attention-store-g2-_vAhV.js","assets/profile-model-kCmPHrmk.js","assets/paths-CDREouhi.js","assets/date-time-Clwafva-.js","assets/badge-BIoC0hjn.js","assets/dist-D-8b3yGa.js","assets/workbench-model-CaNC35vW.js","assets/agent-work-summary-D0a836ik.js","assets/task-evidence-i9SDhd3E.js","assets/task-labels-BArOYZEW.js","assets/OverviewPage-YBQHyU7s.css","assets/PersonalProfilePage-CndOcRQ6.js","assets/useMinimumLoadingDisplay-GhG1ICNJ.js","assets/model-CtmCtjml.js","assets/model-BCnsjEuP.js","assets/KnowledgeEditDialog-Ccgj30Wu.js","assets/identity-FG3YqHVj.js","assets/KnowledgeEditDialog-D0se__D4.css","assets/KnowledgePeek-Bc0bqyZp.js","assets/dialog-DTVE8tN1.js","assets/Presence-BLar6FCs.js","assets/Teleport-BKN3dSMk.js","assets/handleAndDispatchCustomEvent-Bng2rRDf.js","assets/UiDisclosure-COV4NwHI.js","assets/conversation-launcher-settings-CtOlr9uP.js","assets/KnowledgePeek-DEo6IbBP.css","assets/useKnowledgeItemPeek-Cfvr5H1q.js","assets/useFocusReturn-DX2zmPSK.js","assets/useRoutePeek-DydCbUhy.js","assets/personal-profile-graph-IYovB9sV.js","assets/PersonalProfilePage-CGW50MHm.css","assets/WritingTastePage-D-ELo7mh.js","assets/CardHeader-9MwjWRxl.js","assets/CardTitle-BAhmXjAK.js","assets/WritingTastePage-asIa-2U5.css","assets/PersonalProjectsPage-CXBOwEqC.js","assets/DialogFooter-D9A9hRP4.js","assets/KnowledgeWorkspace-BGlODG7G.js","assets/TabsTrigger-CHnq6mkI.js","assets/RovingFocusGroup-D5mf9s6I.js","assets/RovingFocusItem-DAumq9xD.js","assets/Input-DGf4juEs.js","assets/debounce-CFk-gEUl.js","assets/AgentName-n4oqQUwE.js","assets/AgentName-BQTFCWn0.css","assets/project-team-api-Cfn41MCR.js","assets/CreateProjectDialog-crpLTyDf.js","assets/CreateProjectDialog-BaPfiS1T.css","assets/VirtualDirectoryList-DNQP6X8j.js","assets/VirtualDirectoryList-pgDELOEf.css","assets/project-capture-BvIPecIS.js","assets/KnowledgeWorkspace-C6l_yvWO.css","assets/PersonalProjectsPage-Cf5mrQmy.css","assets/KnowledgeOrganizerPage-CRC3mk0j.js","assets/KnowledgeOrganizerPage-BIOaMzgQ.css","assets/AgentsDirectoryPage-xwIRrNb8.js","assets/agent-pins-Bb7-1Uoz.js","assets/avatars-CUyfvsKO.js","assets/useAgentRecords-BoOqLQcf.js","assets/agent-occupation-Ba5Fl0ys.js","assets/occupation-catalog-q0ZjGx2o.js","assets/agent-profile.css_vue_type_style_index_0_src_true_lang-wT8gjVyZ.js","assets/agent-profile-LzhgJINr.css","assets/orchestration-filters-CKf_Gzdl.js","assets/ProjectAgentFirstTask-CbOWaP7Q.js","assets/ProjectAgentFirstTask-BVDcaNNi.css","assets/UnassignedConversationsPanel-B4PqImRi.js","assets/short-ids-BpNwVgnt.js","assets/EmployeeRecruitDialog-DeB0XHeM.js","assets/EmployeeRecruitDialog-C6ADVxkQ.css","assets/AgentsDirectoryPage-BwF-0nFO.css","assets/AgentProfilePage-DH54S93r.js","assets/TabsContent-DZQE2Iq8.js","assets/page-title-BLHrexaP.js","assets/TaskExecutionPlan-IYG_JeuT.js","assets/motion-preference-DeZURhN7.js","assets/TaskExecutionPlan-C9kJJJKk.css","assets/AgentProfilePage-DXvLQu-C.css","assets/OccupationsPage-CnSp6362.js","assets/TextField-DoKtn--E.js","assets/TextField-CM9C-zEI.css","assets/OccupationsPage-BTormZIO.css","assets/TaskSchedulesPage-Cxjqc8XQ.js","assets/dropdown-menu-NcUrhhmG.js","assets/useArrowNavigation-LczgkNfS.js","assets/PopperContent-BXbztFFi.js","assets/TaskSchedulesPage-DcmDdY10.css","assets/ProjectAgentsPage-Y6qCYRZj.js","assets/ProjectAgentDialog-Bg0V3Zr2.js","assets/ProjectAgentDialog-DHP7BfAf.css","assets/ProjectAgentsPage-BBzKAhZx.css","assets/ProjectAgentDetailPage-SmZ2NYTw.js","assets/ProjectAgentDetailPage-CRFE6n-s.css","assets/EmployeeWorkbenchPage-0oK2RfIh.js","assets/judgment-types-rLsl2Cis.js","assets/EmployeeWorkbenchPage-CMutwFBC.css","assets/PublicProjectsPage-C63vW9UZ.js","assets/PublicProjectsPage-Ditr0SY-.css","assets/KnowledgePage-NsKFUWth.js","assets/KnowledgeItemEditPage-C0Y2DsHz.js","assets/RadioGroupItem-tL_2upmD.js","assets/checkbox-DxBVlC6t.js","assets/model-BcMr6R8m.js","assets/field-6mg5DSC8.js","assets/Label-CafdTnDF.js","assets/model-CeF2BATq.js","assets/quick-edit-api-DzpRAPsr.js","assets/KnowledgeHardDeleteSection-CSnqisUv.js","assets/accordion-DpqAdXTB.js","assets/KnowledgeItemSummaryCard-BRvaf4Fw.js","assets/SessionRecordsPage-DIc2GoCQ.js","assets/model-CYJ_LZ47.js","assets/SessionMigrationPage-B5r2PWCF.js","assets/TagVocabularyPage-BIsHYk2i.js","assets/KnowledgeTurnReceiptPage-Dl0KeFDe.js","assets/InboxPage-CTQ425Ez.js","assets/InboxPage-CbbiHgTr.css","assets/ConnectionsPage-Yf4UvjDT.js","assets/SettingsPage-BAxKpnBx.js","assets/SettingsPage-BbX9ysTX.css","assets/ModelSettingsPage-Bz1tMXtW.js","assets/model-t2ZvD7wL.js","assets/ModelSettingsPage-DJuEaw6p.css","assets/DataFormatPage-BPuUH0PG.js","assets/DataFormatPage-Dp7mePUw.css","assets/CaptureChangePage-DWdz9dEk.js","assets/CaptureChangePage-Cch3mT4b.css","assets/AboutPage-D0dTwKq8.js","assets/fuli-logo-Bu9WBuQe.js","assets/AboutPage-Bxm7RJZg.css","assets/NotFoundPage-TfZ2eoA2.js"])))=>i.map(i=>d[i]);
2
- import{$ as e,A as t,C as n,D as r,Dt as i,E as a,G as o,J as s,M as c,Mt as l,T as u,U as d,V as f,X as p,Y as m,a as h,b as g,d as _,i as v,it as y,jt as b,k as x,kt as S,n as C,o as w,ot as T,r as E,rt as D,s as O,t as k,v as A,vt as j,w as M,xt as N}from"./_plugin-vue_export-helper-RegzAV-H.js";import{n as P,t as F}from"./console-DiNe1hFP.js";import{m as I}from"./useApi-CROJJdhE-CH5wlWTU.js";import{i as ee,n as L,r as te,t as R}from"./vue-router-Dad-4p7O.js";import{t as z}from"./button-A2esxd6G.js";import{t as ne}from"./checkbox-DxBVlC6t.js";import{a as re,i as ie,n as ae,r as oe,t as se}from"./dialog-DTVE8tN1.js";import{n as ce,t as le}from"./RadioGroupItem-tL_2upmD.js";import{a as ue,r as de}from"./client-DAoXcTUz.js";import{i as fe,n as pe,r as me,t as he}from"./agent-pins-Bb7-1Uoz.js";import{t as ge}from"./UiIcon-BADOYtHM.js";import{t as _e}from"./DialogFooter-D9A9hRP4.js";import{i as ve,n as ye,r as be}from"./project-origin-JnGPwlfA.js";import{i as xe,n as Se,t as Ce}from"./motion-preference-DeZURhN7.js";import{r as we}from"./ui-CtW0tAA1.js";import{t as B}from"./UiIconButton-CkBP6pnX.js";import{t as V}from"./UiSegmented-FwOnE2IZ.js";import{t as Te}from"./UiToggle-bpyawyIe.js";import{i as Ee,n as De,r as H,t as Oe}from"./design-lab-UWXx2ZtA.js";import{r as ke}from"./attention-store-g2-_vAhV.js";import{t as Ae}from"./fuli-logo-Bu9WBuQe.js";import{t as je}from"./avatars-CUyfvsKO.js";import{t as Me}from"./agent-identity-color-RqpT7gtx.js";import{n as Ne,t as U}from"./profile-model-kCmPHrmk.js";import{n as Pe}from"./useAgentRecords-BoOqLQcf.js";import{n as Fe,t as Ie}from"./paths-CDREouhi.js";import{t as Le}from"./page-title-BLHrexaP.js";import{t as W}from"./preload-helper-BLdHbfdN.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Re=[`aria-label`],ze=[`lang`,`aria-label`,`aria-pressed`,`onClick`],Be=c({__name:`LocaleSwitcher`,setup(e){let t=n(()=>E()),a={"zh-CN":`中`,"en-US":`EN`};function o(e){e!==t.value&&w(e)}return(e,n)=>(s(),r(`div`,{class:`locale-switcher`,role:`group`,"aria-label":i(O)(`common.language.label`)},[(s(!0),r(g,null,p(i(C),e=>(s(),r(`button`,{key:e,type:`button`,lang:e,"aria-label":i(O)(e===`zh-CN`?`common.language.chinese`:`common.language.english`),"aria-pressed":t.value===e,onClick:t=>o(e)},l(a[e]),9,ze))),128))],8,Re))}}),G=N(null);function Ve(e){let t=e.onError((t,n)=>{let r=e.resolve(n).href;r.startsWith(`/`)&&!r.startsWith(`//`)&&(G.value={href:r,resourceFailure:/dynamically imported module|module script|loading chunk|preload css|importing a module/i.test(String(t))})}),n=e.afterEach((e,t,n)=>{n||(G.value=null)});return()=>{t(),n()}}var He={key:0,class:`navigation-recovery`,role:`alert`},Ue=[`href`],We=k(c({__name:`NavigationRecovery`,setup(e){return(e,n)=>i(G)?(s(),r(`div`,He,[M(`div`,null,[M(`strong`,null,l(i(O)(`routes.loadFailure.title`)),1),M(`p`,null,l(i(O)(i(G).resourceFailure?`routes.loadFailure.resources`:`routes.loadFailure.message`)),1)]),t(i(z),{"as-child":``,variant:`outline`},{default:T(()=>[M(`a`,{href:i(G).href},l(i(O)(`routes.loadFailure.reload`)),9,Ue)]),_:1}),t(i(z),{variant:`ghost`,onClick:n[0]||=e=>G.value=null},{default:T(()=>[x(l(i(O)(`routes.loadFailure.dismiss`)),1)]),_:1})])):a(``,!0)}}),[[`__scopeId`,`data-v-96f1f3c2`]]);function Ge(e){return e?e.enabled?(e.projectMode??`all`)===`all`?`all`:e.projectMode===`selected`?`selected`:null:`off`:null}var Ke=[`data-capture-scope`,`data-selected`],qe={key:0,class:`onboarding-projects`,"data-capture-scope-projects":``},Je={class:`onboarding-projects-label`},Ye={key:0,class:`onboarding-note`},Xe={key:1},Ze=[`data-capture-scope-project`],Qe={class:`onboarding-project-name`},$e={key:1,class:`onboarding-error`,role:`alert`,"data-capture-scope-error":``},et=k(c({__name:`CaptureOnboardingDialog`,setup(e){let o=[`all`,`selected`,`off`],c=F(),d=j(!1),f=n(()=>c.state?.captureOnboarding?.ask===!0&&!d.value),m=j(null),h=j({}),_=j(null),v=n(()=>_.value!==null),y=j(``),b=n(()=>c.activePersonalSpace?.id??``),S=n(()=>be((c.state?.personalProjects??[]).filter(e=>e.personal_space_id===b.value&&ye(e))).map(e=>({id:e.project_id,name:ve(e)})));function C(e){!e&&!v.value&&(d.value=!0)}function w(e){m.value=e,y.value=``}async function E(){let e=m.value;if(e&&!v.value){_.value=`saving`,y.value=``;try{let t=await c.answerCaptureScope(e===`selected`?{choice:e,selectedProjectIds:S.value.filter(e=>h.value[e.id]).map(e=>e.id)}:{choice:e});c.notify(t.status===`answered`?O(`capture.onboarding.saved.${t.choice}`):O(`capture.onboarding.gone`))}catch(e){await D(de(e))}finally{_.value=null}}}async function D(e){_.value=`checking`,y.value=O(`capture.onboarding.unconfirmed`);try{let t=await c.readCaptureOnboarding();if(t.ask){y.value=O(`capture.onboarding.notSaved`,{reason:e});return}y.value=``;let n=Ge(t.capturePolicy);c.notify(O(n?`capture.onboarding.saved.${n}`:`capture.onboarding.gone`))}catch(e){y.value=O(`capture.onboarding.unknown`,{reason:de(e)})}}return(e,n)=>(s(),u(i(re),{open:f.value,"onUpdate:open":C},{default:T(()=>[t(i(ie),{"data-capture-onboarding":``,onPointerDownOutside:n[1]||=A(()=>{},[`prevent`])},{default:T(()=>[t(i(ae),null,{default:T(()=>[t(i(se),null,{default:T(()=>[x(l(i(O)(`capture.onboarding.title`)),1)]),_:1}),t(i(oe),null,{default:T(()=>[x(l(i(O)(`capture.onboarding.description`)),1)]),_:1})]),_:1}),t(i(ce),{"model-value":m.value??void 0,"aria-label":i(O)(`capture.onboarding.choicesLabel`),class:`grid gap-2`,disabled:v.value,"onUpdate:modelValue":w},{default:T(()=>[(s(),r(g,null,p(o,e=>M(`label`,{key:e,class:`onboarding-option`,"data-capture-scope":e,"data-selected":m.value===e||void 0},[t(i(le),{value:e},null,8,[`value`]),M(`span`,null,[M(`strong`,null,l(i(O)(`capture.onboarding.choices.${e}`)),1),M(`small`,null,l(i(O)(`capture.onboarding.hints.${e}`)),1)])],8,Ke)),64))]),_:1},8,[`model-value`,`aria-label`,`disabled`]),m.value===`selected`?(s(),r(`section`,qe,[M(`span`,Je,l(i(O)(`capture.onboarding.projectsLabel`)),1),S.value.length?(s(),r(`ul`,Xe,[(s(!0),r(g,null,p(S.value,e=>(s(),r(`li`,{key:e.id,"data-capture-scope-project":e.id},[M(`label`,null,[t(i(ne),{"model-value":h.value[e.id]===!0,disabled:v.value,"onUpdate:modelValue":t=>h.value={...h.value,[e.id]:t===!0}},null,8,[`model-value`,`disabled`,`onUpdate:modelValue`]),M(`span`,Qe,l(e.name),1)])],8,Ze))),128))])):(s(),r(`p`,Ye,l(i(O)(`capture.onboarding.noProjects`)),1))])):a(``,!0),y.value?(s(),r(`p`,$e,l(y.value),1)):a(``,!0),t(i(_e),null,{default:T(()=>[t(i(z),{variant:`ghost`,disabled:v.value,"data-capture-scope-later":``,onClick:n[0]||=e=>C(!1)},{default:T(()=>[x(l(i(O)(`capture.onboarding.later`)),1)]),_:1},8,[`disabled`]),t(i(z),{disabled:!m.value,loading:v.value,"loading-label":i(O)(_.value===`checking`?`capture.onboarding.checking`:`capture.onboarding.saving`),"data-capture-scope-save":``,onClick:E},{default:T(()=>[x(l(i(O)(`capture.onboarding.save`)),1)]),_:1},8,[`disabled`,`loading`,`loading-label`])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),[[`__scopeId`,`data-v-257b023c`]]),tt=`fuli.palette`,nt=[`jade`,`ink`,`gold`,`indigo`,`sprout`],K=`jade`,q=j(K),rt=e=>nt.includes(e);function it(){if(typeof window>`u`)return K;try{let e=window.localStorage.getItem(tt);return rt(e)?e:K}catch{return K}}function at(e){typeof document<`u`&&(e===K?delete document.documentElement.dataset.palette:document.documentElement.dataset.palette=e)}function ot(){q.value=it(),at(q.value)}function st(e){if(q.value=e,at(e),typeof window<`u`)try{e===K?window.localStorage.removeItem(tt):window.localStorage.setItem(tt,e)}catch{}}var ct=[{id:`current`,labelKey:`designLab.workbench.current`},{id:`focus`,labelKey:`workbench.variants.focus`},{id:`board`,labelKey:`workbench.variants.board`},{id:`timeline`,labelKey:`workbench.variants.timeline`},{id:`constellation`,labelKey:`workbench.variants.constellation`},{id:`office`,labelKey:`workbench.variants.office`},{id:`galaxy3d`,labelKey:`workbench.variants.galaxy3d`}],lt=[`aria-label`],ut=[`title`],dt={class:`design-lab-hint`},ft={class:`design-lab-group`},pt={class:`design-lab-label`},mt={class:`design-lab-group`},ht={class:`design-lab-label`},gt={class:`design-lab-group`},_t={class:`design-lab-label`},vt={class:`design-lab-row`},yt={class:`design-lab-row`},bt={class:`design-lab-row`},xt={class:`design-lab-row`},St={key:0,class:`design-lab-group`},Ct={class:`design-lab-label`},wt={class:`design-lab-foot`},Tt=4,Et=k(c({__name:`DesignLabPanel`,setup(e){let c=j(null),f=n(()=>nt.map(e=>({value:e,label:O(`designLab.palettes.${e}`),swatch:`var(--palette-swatch-${e})`}))),m=n(()=>De.map(e=>({value:e,label:O(`designLab.transitions.${e}`)}))),h=[`cards`,`density`,`radius`],_=e=>Oe[e].map(t=>({value:t,label:O(`designLab.choices.${e}.${t}`)})),v=n(()=>ct.map(({id:e,labelKey:t})=>({value:e,label:O(t)}))),y=n(()=>H.value.x===null||H.value.y===null?void 0:{left:`${H.value.x}px`,top:`${H.value.y}px`,right:`auto`,bottom:`auto`}),S=null;function C(e){if(!c.value||e.target.closest(`button`))return;let t=c.value.getBoundingClientRect();S={dx:e.clientX-t.left,dy:e.clientY-t.top},window.addEventListener(`pointermove`,w),window.addEventListener(`pointerup`,E,{once:!0})}function w(e){if(!S||!c.value)return;let{width:t,height:n}=c.value.getBoundingClientRect();H.value.x=Math.round(Math.min(Math.max(0,e.clientX-S.dx),window.innerWidth-t)),H.value.y=Math.round(Math.min(Math.max(0,e.clientY-S.dy),window.innerHeight-n))}function E(){S=null,window.removeEventListener(`pointermove`,w)}d(E);let D=j(null),k=n(()=>D.value?{left:`${D.value.x}px`,top:`${D.value.y}px`,right:`auto`,bottom:`auto`}:void 0),A=null,N=!1;function P(e){let t=e.currentTarget.getBoundingClientRect();A={startX:e.clientX,startY:e.clientY,dx:e.clientX-t.left,dy:e.clientY-t.top,width:t.width,height:t.height,moved:!1},window.addEventListener(`pointermove`,F),window.addEventListener(`pointerup`,I,{once:!0})}function F(e){A&&(!A.moved&&Math.hypot(e.clientX-A.startX,e.clientY-A.startY)<Tt||(A.moved=!0,D.value={x:Math.round(Math.min(Math.max(0,e.clientX-A.dx),window.innerWidth-A.width)),y:Math.round(Math.min(Math.max(0,e.clientY-A.dy),window.innerHeight-A.height))}))}function I(){N=!!A?.moved,A=null,window.removeEventListener(`pointermove`,F)}function ee(){N?N=!1:H.value.open=!0}let L=()=>{D.value=null};o(()=>window.addEventListener(`resize`,L)),d(()=>{I(),window.removeEventListener(`resize`,L)});function te(){Ee(),st(`jade`),xe(`system`)}return(e,n)=>i(H).open?(s(),r(`section`,{key:1,ref_key:`panel`,ref:c,class:`design-lab`,style:b(y.value),"aria-label":i(O)(`designLab.title`),"data-design-lab":``},[M(`header`,{class:`design-lab-head`,title:i(O)(`designLab.drag`),onPointerdown:C},[M(`strong`,null,l(i(O)(`designLab.title`)),1),t(i(B),{icon:`close`,size:`sm`,label:i(O)(`designLab.close`),"data-design-lab-close":``,onClick:n[0]||=e=>i(H).open=!1},null,8,[`label`])],40,ut),M(`p`,dt,l(i(O)(`designLab.hint`)),1),M(`div`,ft,[M(`span`,pt,l(i(O)(`designLab.palette`)),1),t(i(V),{class:`design-lab-choices`,"data-lab-palette":``,"model-value":i(q),options:f.value,label:i(O)(`designLab.palette`),"onUpdate:modelValue":i(st)},null,8,[`model-value`,`options`,`label`,`onUpdate:modelValue`])]),M(`div`,mt,[M(`span`,ht,l(i(O)(`designLab.look`)),1),(s(),r(g,null,p(h,e=>M(`div`,{key:e,class:`design-lab-row`},[M(`span`,null,l(i(O)(`designLab.choices.${e}.label`)),1),t(i(V),{modelValue:i(H).choices[e],"onUpdate:modelValue":t=>i(H).choices[e]=t,"data-lab-choice":e,options:_(e),label:i(O)(`designLab.choices.${e}.label`)},null,8,[`modelValue`,`onUpdate:modelValue`,`data-lab-choice`,`options`,`label`])])),64))]),M(`div`,gt,[M(`span`,_t,l(i(O)(`designLab.motion`)),1),M(`label`,vt,[M(`span`,null,l(i(O)(`designLab.reduceMotion`)),1),t(i(Te),{"model-value":i(Se)===`reduced`,label:i(O)(`designLab.reduceMotion`),"onUpdate:modelValue":n[1]||=e=>i(xe)(e?`reduced`:`system`)},null,8,[`model-value`,`label`])]),M(`div`,yt,[M(`span`,null,l(i(O)(`designLab.transition`)),1),t(i(V),{modelValue:i(H).transition,"onUpdate:modelValue":n[2]||=e=>i(H).transition=e,"data-lab-transition":``,options:m.value,label:i(O)(`designLab.transition`)},null,8,[`modelValue`,`options`,`label`])]),M(`div`,bt,[M(`span`,null,l(i(O)(`designLab.choices.ring.label`)),1),t(i(V),{modelValue:i(H).choices.ring,"onUpdate:modelValue":n[3]||=e=>i(H).choices.ring=e,"data-lab-choice":`ring`,options:_(`ring`),label:i(O)(`designLab.choices.ring.label`)},null,8,[`modelValue`,`options`,`label`])]),M(`label`,xt,[M(`span`,null,l(i(O)(`designLab.cardLift`)),1),t(i(Te),{modelValue:i(H).cardLift,"onUpdate:modelValue":n[4]||=e=>i(H).cardLift=e,"data-lab-lift":``,label:i(O)(`designLab.cardLift`)},null,8,[`modelValue`,`label`])])]),v.value.length>1?(s(),r(`div`,St,[M(`span`,Ct,l(i(O)(`designLab.workbench.title`)),1),t(i(V),{modelValue:i(H).workbench,"onUpdate:modelValue":n[5]||=e=>i(H).workbench=e,class:`design-lab-choices`,"data-lab-workbench":``,options:v.value,label:i(O)(`designLab.workbench.title`)},null,8,[`modelValue`,`options`,`label`])])):a(``,!0),M(`footer`,wt,[t(i(z),{variant:`ghost`,size:`sm`,"data-design-lab-reset":``,onClick:te},{default:T(()=>[x(l(i(O)(`designLab.reset`)),1)]),_:1})])],12,lt)):(s(),u(i(B),{key:0,class:`design-lab-launcher`,icon:`grid`,label:i(O)(`designLab.open`),"data-design-lab-open":``,style:b(k.value),onPointerdown:P,onClick:ee},null,8,[`label`,`style`]))}}),[[`__scopeId`,`data-v-9b25bd4d`]]),J=(e,t,n,r)=>({id:`${e}.${t}`,group:e,labelKey:n,bodyKey:r}),Dt=[...[`known_known`,`known_unknown`,`unknown_known`,`unknown_unknown`].map(e=>J(`quadrant`,e,`knowledge.domain.quadrants.${e}`,`knowledge.domain.quadrants.descriptions.${e}`)),...[`confirmed`,`agent_confirmed`,`ai_reviewed`,`pending`].map(e=>J(`review`,e,`knowledge.domain.reviewStates.${e}`,`glossary.review.${e}`)),...[`taste`,`personality`,`judgment_preference`].map(e=>J(`profile`,e,`knowledge.domain.profiles.${e}`,`glossary.profile.${e}`)),...[`running`,`queued`,`backlog`,`paused`,`blocked`,`awaiting_review`,`awaiting_recruitment`,`none`,`ended`].map(e=>J(`work`,e,`agentRedesign.workStatus.${e}`,`glossary.work.${e}`)),...[`working`,`waiting`,`idle`,`error`].map(e=>J(`presence`,e,`glossary.presence.${e}.label`,`glossary.presence.${e}.body`)),...[`pending`,`agent`,`person`].map(e=>J(`weight`,e,`glossary.weight.${e}.label`,`glossary.weight.${e}.body`))],Ot=new Map(Dt.map(e=>[e.id,e]));function kt(e,t){return t.split(`.`).reduce((e,t)=>e&&typeof e==`object`?e[t]:void 0,h[e])}var At=e=>e.replace(/\s+/g,` `).trim().toLocaleLowerCase(),jt=new Map;for(let e of Dt)for(let t of C){let n=kt(t,e.labelKey);typeof n==`string`&&!jt.has(At(n))&&jt.set(At(n),e)}var Mt=24,Nt=4;function Pt(e){if(!(e instanceof Element))return;let t=e.closest(`[data-term]`),n=t?.dataset.term&&Ot.get(t.dataset.term);if(t&&n)return{term:n,element:t};let r=e instanceof HTMLElement?e:e.parentElement;for(let e=0;r&&e<Nt;e++,r=r.parentElement){let e=r.textContent??``;if(e.length>Mt)return;let t=jt.get(At(e));if(t)return{term:t,element:r}}}var Ft=j(!1),Y=j(!1);function It(){return{held:Ft,pinned:Y,active:n(()=>Ft.value||Y.value),toggle:()=>{Y.value=!Y.value},reset:()=>{Ft.value=!1,Y.value=!1}}}var Lt={key:0,class:`glossary-live`,role:`status`},Rt=[`data-glossary-term`],zt=k(c({__name:`GlossaryLayer`,setup(e){let{held:n,pinned:c,active:u}=It(),f=j(null),p=null;function m(e){p!==e&&(p?.removeAttribute(`data-glossary-hit`),p=e,p?.setAttribute(`data-glossary-hit`,``))}function h(e){e.key!==`Alt`||e.repeat||(e.preventDefault(),n.value=!0)}function _(e){e.key===`Alt`&&(n.value=!1)}function v(){n.value=!1}function y(e){u.value&&m(Pt(e.target)?.element??null)}function b(e){if(!u.value||e.target instanceof Element&&e.target.closest(`[data-glossary-toggle]`))return;e.preventDefault(),e.stopPropagation();let t=Pt(e.target);t&&(f.value={term:t.term,anchor:t.element.getBoundingClientRect()})}return D(u,e=>{document.documentElement.toggleAttribute(`data-glossary`,e),e||m(null)},{immediate:!0}),o(()=>{window.addEventListener(`keydown`,h),window.addEventListener(`keyup`,_),window.addEventListener(`blur`,v),window.addEventListener(`pointermove`,y,{passive:!0}),window.addEventListener(`click`,b,!0)}),d(()=>{window.removeEventListener(`keydown`,h),window.removeEventListener(`keyup`,_),window.removeEventListener(`blur`,v),window.removeEventListener(`pointermove`,y),window.removeEventListener(`click`,b,!0),n.value=!1,c.value=!1,m(null),document.documentElement.removeAttribute(`data-glossary`)}),(e,n)=>(s(),r(g,null,[i(u)?(s(),r(`span`,Lt,l(i(O)(`glossary.modeOn`)),1)):a(``,!0),t(i(we),{open:!!f.value,anchor:f.value?.anchor??null,label:f.value?i(O)(f.value.term.labelKey):``,onClose:n[0]||=e=>f.value=null},{default:T(()=>[f.value?(s(),r(`div`,{key:0,class:`glossary-card`,"data-glossary-term":f.value.term.id},[M(`small`,null,l(i(O)(`glossary.groups.${f.value.term.group}`)),1),M(`strong`,null,l(i(O)(f.value.term.labelKey)),1),M(`p`,null,l(i(O)(f.value.term.bodyKey)),1)],8,Rt)):a(``,!0)]),_:1},8,[`open`,`anchor`,`label`])],64))}}),[[`__scopeId`,`data-v-b4734ca4`]]),Bt=k(c({__name:`GlossaryToggle`,setup(e){let n=It();return(e,r)=>i(n).pinned.value?(s(),u(i(z),{key:0,variant:`outline`,class:`glossary-return`,size:`sm`,"data-glossary-toggle":``,"data-glossary-return":``,"aria-label":i(O)(`glossary.toggleOn`),title:i(O)(`glossary.toggleOn`),onClick:i(n).toggle},{default:T(()=>[t(i(ge),{class:`glossary-return-icon`,name:`tray`,size:16}),x(l(i(O)(`glossary.return`)),1)]),_:1},8,[`aria-label`,`title`,`onClick`])):(s(),u(i(B),{key:1,icon:`info`,"data-glossary-toggle":``,active:i(n).active.value,label:i(O)(`glossary.toggle`),onClick:i(n).toggle},null,8,[`active`,`label`,`onClick`]))}}),[[`__scopeId`,`data-v-f3db80f2`]]);function Vt(e,t=``){let n=typeof e==`string`&&e?e:t;return n&&v.global.te(n)?O(n):n}function Ht(e){if(typeof document>`u`)return;let t=Vt(e,`routes.overview.title`);document.title=`${t} · ${O(`common.brand`)}`}var X={name:`fuli-context`,version:`0.21.0-beta.2`,description:`Local-first collaboration relationship graph for AI agents.`,type:`module`,files:[`README.zh-CN.md`,`npm-shrinkwrap.json`,`src/`,`native/win32/fuli-win-helper.exe`,`packages/roundtable/package.json`,`packages/roundtable/bin/`,`packages/roundtable/src/`,`dist/web/`,`docs/external-knowledge-architecture.md`,`docs/public-personal-architecture.md`,`docs/project-agent-memory.md`,`docs/agent-conversations-and-collaboration.md`,`docs/employee-agents.md`,`docs/agent-apps.md`,`docs/agent-interface-architecture.md`,`docs/agent-roundtable.md`,`examples/external-knowledge/markdown-folder.mjs`,`graph-provider/Dockerfile`,`graph-provider/pyproject.toml`,`graph-provider/fuli_graph/*.py`,`graph-provider/fuli_graph/**/*.py`,`skills/`,`compose.graphiti.yml`,`docs/judgment-and-autonomy.md`,`docs/client-connections.md`],bin:{fl:`src/cli.js`,fuli:`src/cli.js`},keywords:[`ai-agent`,`mcp`,`context`,`knowledge-graph`,`local-first`,`codex`,`claude-code`],scripts:{mcp:`node src/mcp-server.js`,dev:`run-p dev:server dev:web`,"dev:server":`node src/server.js`,"dev:web":`vite`,build:`run-s typecheck:web build:web`,"build:web":`vite build`,"build:site":`node scripts/build-site.js`,"typecheck:web":`vue-tsc --noEmit -p tsconfig.app.json`,"test:node":`node --test`,"test:web":`vitest run --config vitest.config.ts`,"test:package":`node scripts/package-smoke.js`,"test:neo4j":`node --test --test-concurrency=1 test/agent-dismissal-acceptance.test.js test/conversation-hook-neo4j-acceptance.test.js test/project-agent-memory-acceptance.test.js test/task-memory-checkpoint-atomicity.test.js`,"test:knowledge:live":`node acceptance/knowledge-live.js`,"measure:context-delivery":`node acceptance/context-delivery-replay/run.js`,"test:external-knowledge:live":`node scripts/validate-external-knowledge-live.js`,start:`node src/server.js`,"graph:setup":`node src/graphiti/setup.js`,"graph:up":`docker compose -f compose.graphiti.yml up -d --build`,"graph:down":`docker compose -f compose.graphiti.yml down`,"test:structure":`node --test test/source-structure.test.js`,pretest:`npm run build:web`,test:`run-s typecheck:web test:node test:web`,prepack:`npm run build`,prepublishOnly:`node scripts/release-gate.js && npm test`},engines:{node:`>=24.12`},repository:{type:`git`,url:`git+https://github.com/JevonsCode/fuli.git`},homepage:`https://jevonscode.github.io/fuli/`,bugs:{url:`https://github.com/JevonsCode/fuli/issues`},publishConfig:{access:`public`},license:`Apache-2.0`,dependencies:{"@a2a-js/sdk":`1.3.0`,"@agentclientprotocol/sdk":`1.5.0`,"@hono/node-server":`2.0.12`,"@modelcontextprotocol/sdk":`^1.31.0`,"@peculiar/x509":`2.1.0`,"jsonc-parser":`3.3.1`,"reflect-metadata":`0.2.2`,"smol-toml":`1.9.1`,zod:`^4.6.7`},devDependencies:{"@atlaskit/pragmatic-drag-and-drop":`4.0.0`,"@atlaskit/pragmatic-drag-and-drop-auto-scroll":`3.2.1`,"@atlaskit/pragmatic-drag-and-drop-hitbox":`3.0.0`,"@tailwindcss/vite":`4.3.3`,"@types/d3":`^7.4.3`,"@types/node":`^24.13.3`,"@types/three":`0.169.0`,"@vitejs/plugin-vue":`^6.0.8`,"@vue/test-utils":`^2.4.11`,"@vueuse/core":`14.4.0`,"brace-expansion":`5.0.12`,"class-variance-authority":`0.7.1`,clsx:`2.1.1`,d3:`^7.9.0`,jsdom:`^29.1.1`,linkedom:`^0.18.12`,"npm-run-all2":`^9.0.2`,pinia:`^4.0.2`,"reka-ui":`2.11.0`,"tailwind-merge":`3.7.0`,tailwindcss:`4.3.3`,three:`0.169.0`,typescript:`~6.0.0`,vite:`^8.1.5`,vitest:`^4.1.12`,vue:`^3.5.42`,"vue-i18n":`^11.4.8`,"vue-router":`^5.2.0`,"vue-tsc":`^3.3.8`},overrides:{"@modelcontextprotocol/sdk":{"@hono/node-server":`2.0.12`},"brace-expansion":`$brace-expansion`,"fast-uri":`3.1.9`,qs:`6.16.1`}}.version,Ut=[`aria-label`],Wt={class:`brand-mark-wrap`},Gt=[`src`],Kt=[`aria-label`,`aria-expanded`],qt={key:1,class:`brand-copy`},Jt={class:`brand-title-row`},Yt={class:`brand-name`},Xt=[`aria-label`,`aria-expanded`],Zt={class:`brand-version`},Qt={key:1,class:`brand-version`},$t={class:`brand-title-row`},en={class:`brand-name`},tn={class:`brand-version`},nn=[`aria-label`],rn=[`href`],an=k(c({__name:`BrandEasterEgg`,props:{compact:{type:Boolean,default:!1}},setup(e){let t=e,c=j(null),u=j(null),p=j(0),m=j(!1),h=j(!1),_=j(!1),v=j(null),y=n(()=>v.value?.status===`ready`&&v.value.updateAvailable&&!!v.value.latestVersion),b=n(()=>v.value?.latestVersion??``),x=n(()=>v.value?.packageUrl??`https://www.npmjs.com/package/fuli-context`),C=new AbortController,w=!1,T;function E(){p.value+=1,m.value=!0,clearTimeout(T),t.compact&&(T=setTimeout(D,700))}function D(){m.value=!1}function k(){y.value&&(_.value=!_.value)}function N(e){w=!1,h.value=!1,_.value&&!c.value?.contains(e.target)&&(_.value=!1)}function P(e){e.key===`Tab`&&(w=!0),e.key===`Escape`&&_.value&&(e.preventDefault(),_.value=!1,f(()=>u.value?.focus()))}function F(){h.value=w}function I(){h.value=!1}return o(()=>{window.addEventListener(`pointerdown`,N,!0),window.addEventListener(`keydown`,P,!0),ue(`/api/system/version`,{signal:C.signal}).then(e=>{v.value=e}).catch(()=>{})}),d(()=>{clearTimeout(T),C.abort(),window.removeEventListener(`pointerdown`,N,!0),window.removeEventListener(`keydown`,P,!0)}),(e,n)=>(s(),r(`div`,{ref_key:`root`,ref:c,class:S([`brand-block`,{"is-compact":t.compact,"is-sparkling":m.value,"is-keyboard-focused":h.value}])},[M(`button`,{class:`brand-effect-button`,type:`button`,"aria-label":i(O)(`console.brandEffect.aria`),onClick:E,onFocus:F,onBlur:I},[M(`span`,Wt,[M(`img`,{class:`brand-mark`,src:i(Ae),alt:``,"aria-hidden":`true`},null,8,Gt),m.value?(s(),r(g,{key:0},[t.compact?a(``,!0):(s(),r(`span`,{key:`ripple-${p.value}`,class:`brand-ripple`,"aria-hidden":`true`}))],64)):a(``,!0)])],40,Ut),t.compact&&y.value?(s(),r(`button`,{key:0,ref_key:`versionButton`,ref:u,class:`brand-compact-update`,type:`button`,"aria-label":i(O)(`console.update.aria`,{version:b.value}),"aria-expanded":_.value,"aria-controls":`brand-update-details`,onClick:k},null,8,Kt)):a(``,!0),t.compact?a(``,!0):(s(),r(`span`,qt,[M(`span`,Jt,[M(`span`,Yt,l(i(O)(`common.brand`)),1),y.value?(s(),r(`button`,{key:0,ref_key:`versionButton`,ref:u,class:`brand-version-button`,type:`button`,"aria-label":i(O)(`console.update.aria`,{version:b.value}),"aria-expanded":_.value,"aria-controls":`brand-update-details`,onClick:k},[M(`span`,Zt,`v`+l(i(X)),1),n[0]||=M(`span`,{class:`brand-update-dot`,"aria-hidden":`true`},null,-1)],8,Xt)):(s(),r(`span`,Qt,`v`+l(i(X)),1))]),n[1]||=M(`span`,{class:`brand-subtitle`},`Context Graph`,-1),m.value?(s(),r(`span`,{key:`copy-reflection-${p.value}`,class:`brand-copy-reflection`,"aria-hidden":`true`,onAnimationend:A(D,[`self`])},[M(`span`,$t,[M(`span`,en,l(i(O)(`common.brand`)),1),M(`span`,tn,`v`+l(i(X)),1)])],32)):a(``,!0)])),_.value?(s(),r(`div`,{key:2,id:`brand-update-details`,class:`brand-update-popover`,role:`dialog`,"aria-label":i(O)(`console.update.title`,{version:b.value})},[M(`strong`,null,l(i(O)(`console.update.title`,{version:b.value})),1),M(`p`,null,l(i(O)(`console.update.copy`)),1),n[2]||=M(`code`,null,`fuli update --yes`,-1),M(`a`,{href:x.value,target:`_blank`,rel:`noopener noreferrer`},l(i(O)(`console.update.npmLink`)),9,rn)],8,nn)):a(``,!0)],2))}}),[[`__scopeId`,`data-v-f0649f93`]]),on=[`aria-label`],sn=[`src`],cn={key:0,class:`pinned-rail-name`},ln={key:1,class:`pinned-rail-error`,role:`alert`},un=k(c({__name:`PinnedAgentsRail`,props:{spaceId:{},expanded:{type:Boolean}},setup(e){let o=e,c=I(),u=n(()=>o.spaceId),d=fe(u),{records:f,error:m,load:h}=Pe(u,d.agentIds),_=n(()=>d.agentIds.value.map(e=>f.value[e]).filter(e=>e!==void 0)),v=n(()=>d.error.value||m.value),y=e=>c.path===Ne(o.spaceId,e);function C(){d.load({force:!0}),h({force:!0})}return(n,o)=>u.value&&_.value.length?(s(),r(`ul`,{key:0,class:S([`pinned-rail`,{"is-expanded":e.expanded}]),"aria-label":i(pe)(`navigation.title`,`pin`)},[(s(!0),r(g,null,p(_.value,n=>(s(),r(`li`,{key:n.agentId},[t(i(R),{class:S([`pinned-rail-link`,{"is-active":y(n.agentId)}]),to:i(Ne)(u.value,n.agentId),"aria-current":y(n.agentId)?`page`:void 0,"aria-label":`${i(U)(n)} · ${i(O)(`agentProfiles.profile`)}`,title:e.expanded?void 0:i(U)(n),"data-pinned-agent":n.agentId},{default:T(()=>[M(`span`,{class:`pinned-rail-portrait`,style:b(i(Me)(n.agentId)),"aria-hidden":`true`},[i(je)(n.agentId)?(s(),r(`img`,{key:0,src:i(je)(n.agentId),alt:``},null,8,sn)):(s(),r(g,{key:1},[x(l(n.profile.occupationEmoji||i(U)(n).slice(0,1)),1)],64))],4),e.expanded?(s(),r(`span`,cn,l(i(U)(n)),1)):a(``,!0)]),_:2},1032,[`class`,`to`,`aria-current`,`aria-label`,`title`,`data-pinned-agent`])]))),128))],10,on)):u.value&&e.expanded&&v.value?(s(),r(`div`,ln,[M(`span`,null,l(v.value),1),t(i(z),{variant:`ghost`,size:`sm`,onClick:C},{default:T(()=>[x(l(i(pe)(`retry`,`Retry`)),1)]),_:1})])):a(``,!0)}}),[[`__scopeId`,`data-v-0bebe48a`]]),dn=[`aria-label`,`data-expanded`],fn=[`title`],pn={key:0,class:`nav-rail-wordmark`},mn={class:`nav-rail-links`},hn={class:`nav-rail-label`},gn=[`aria-label`],_n=[`aria-label`],vn={class:`nav-rail-foot`},yn=[`title`],bn={key:0,class:`nav-rail-version`,"data-version":``},xn=`fuli.nav.expanded`,Sn=k(c({__name:`NavRail`,props:{destinations:{},activeKey:{},attentionCount:{},runtimeReady:{type:Boolean},spaceId:{}},setup(e){let n=e;function o(){try{return localStorage.getItem(xn)!==`0`}catch{return!0}}let c=j(o()),d=I(),f=[`taste`,`personality`,`judgment_preference`],m=e=>d.path===`/preferences`&&d.query.aspect===e,h=()=>!!n.spaceId&&d.path.startsWith(`/agents/${encodeURIComponent(n.spaceId)}/`),_=e=>c.value&&(e===`memory`&&f.some(m)||e===`agents`&&h());return D(c,e=>{try{localStorage.setItem(xn,e?`1`:`0`)}catch{}}),(n,o)=>(s(),r(`nav`,{class:S([`nav-rail`,{"is-expanded":c.value}]),"aria-label":i(O)(`shell.aria`),"data-expanded":c.value},[M(`div`,{class:`nav-rail-brand`,title:c.value?void 0:i(O)(`shell.brand`)},[t(an,{compact:``}),c.value?(s(),r(`span`,pn,l(i(O)(`shell.brand`)),1)):a(``,!0)],8,fn),M(`ul`,mn,[(s(!0),r(g,null,p(e.destinations,n=>(s(),r(`li`,{key:n.key},[t(i(R),{to:n.to,class:S([`nav-rail-link`,{"is-active":n.key===e.activeKey,"has-active-child":_(n.key)}]),"aria-current":n.key===e.activeKey?`page`:void 0,"aria-label":i(O)(`shell.destinations.${n.key}`),title:c.value?void 0:i(O)(`shell.destinations.${n.key}`),"data-destination":n.key},{default:T(()=>[t(i(ge),{name:n.icon,size:c.value?20:22},null,8,[`name`,`size`]),M(`span`,hn,l(i(O)(`shell.destinations.${n.key}`)),1),n.key===`chat`&&e.attentionCount?(s(),r(`span`,{key:0,class:`nav-rail-badge`,"aria-label":i(O)(`shell.attentionBadge`,{count:e.attentionCount}),"data-attention-badge":``},l(e.attentionCount>9?`9+`:e.attentionCount),9,gn)):a(``,!0)]),_:2},1032,[`to`,`class`,`aria-current`,`aria-label`,`title`,`data-destination`]),c.value&&n.key===`memory`?(s(),r(`ul`,{key:0,class:`nav-rail-sublinks`,"aria-label":i(O)(`shell.profileAria`)},[(s(),r(g,null,p(f,e=>M(`li`,{key:e},[t(i(R),{to:{path:`/preferences`,query:{aspect:e}},class:S([`nav-rail-sublink`,{"is-active":m(e)}]),"aria-current":m(e)?`page`:void 0,"data-aspect":e},{default:T(()=>[x(l(i(O)(`knowledge.domain.profiles.${e}`)),1)]),_:2},1032,[`to`,`class`,`aria-current`,`data-aspect`])])),64))],8,_n)):a(``,!0),n.key===`agents`?(s(),u(un,{key:1,"space-id":e.spaceId,expanded:c.value},null,8,[`space-id`,`expanded`])):a(``,!0)]))),128))]),M(`div`,vn,[M(`span`,{class:S([`nav-rail-runtime`,{"is-ready":e.runtimeReady}]),role:`status`,title:`${i(O)(e.runtimeReady?`shell.runtimeReady`:`shell.runtimeOffline`)} · v${i(X)}`},[o[1]||=M(`span`,{class:`nav-rail-runtime-dot`,"aria-hidden":`true`},null,-1),M(`span`,{class:S([`nav-rail-runtime-text`,{"is-visible":!e.runtimeReady}])},l(i(O)(e.runtimeReady?`shell.runtimeReady`:`shell.runtimeOffline`)),3),c.value&&e.runtimeReady?(s(),r(`span`,bn,`v`+l(i(X)),1)):a(``,!0)],10,yn),t(i(B),{class:`nav-rail-toggle`,icon:c.value?`chevron-left`:`chevron-right`,size:`sm`,label:i(O)(c.value?`shell.collapse`:`shell.expand`),"data-nav-toggle":``,onClick:o[0]||=e=>c.value=!c.value},null,8,[`icon`,`label`])])],10,dn))}}),[[`__scopeId`,`data-v-c3e9fba0`]]),Cn=[`aria-label`],wn=k(c({__name:`SectionTabs`,props:{sections:{},activeKey:{}},setup(e){return(t,n)=>e.sections.length>1?(s(),r(`nav`,{key:0,class:`section-tabs`,"aria-label":i(O)(`shell.sectionsAria`)},[(s(!0),r(g,null,p(e.sections,t=>(s(),u(i(R),{key:t.key,to:t.to,class:S([`section-tab`,{"is-active":t.key===e.activeKey}]),"aria-current":t.key===e.activeKey?`page`:void 0,"data-section":t.key},{default:T(()=>[x(l(i(O)(`shell.sections.${t.key}`)),1)]),_:2},1032,[`to`,`class`,`aria-current`,`data-section`]))),128))],8,Cn)):a(``,!0)}}),[[`__scopeId`,`data-v-dd883582`]]);function Tn({spaceId:e,publicProjects:t}){let n=Fe(e,`graph`),r=Ie(`personal`,e,`directory`);return[{key:`constellation`,icon:`constellation`,to:`/`,owns:[`/`],exact:!0,sections:[]},{key:`agents`,icon:`agents`,to:`/project-agents`,owns:[`/project-agents`,`/agents/`,`/employees/`],sections:[{key:`agentDirectory`,to:`/project-agents`,owns:[`/project-agents`,`/agents/`,`/employees/`]},{key:`orchestrate`,to:`/project-agents/manage`,owns:[`/project-agents/manage`]},{key:`schedules`,to:`/project-agents/schedules`,owns:[`/project-agents/schedules`]},{key:`occupations`,to:`/project-agents/occupations`,owns:[`/project-agents/occupations`]}]},{key:`chat`,icon:`chat`,to:`/roundtables`,owns:[`/roundtables`,`/inbox`],sections:[{key:`roundtables`,to:`/roundtables`,owns:[`/roundtables`]},{key:`askedYou`,to:`/inbox`,owns:[`/inbox`]}]},{key:`projects`,icon:`project`,to:n,owns:[`/personal/`,`/public-projects`],sections:[{key:`myProjects`,to:n,owns:[`/personal/`]},...t?[{key:`publicProjects`,to:`/public-projects`,owns:[`/public-projects`]}]:[]]},{key:`memory`,icon:`memory`,to:r,owns:[`/knowledge`,`/preferences`,`/organize`,`/tags`],sections:[{key:`knowledge`,to:r,owns:[`/knowledge`]},{key:`preferences`,to:`/preferences`,owns:[`/preferences`]},{key:`writing`,to:`/preferences/writing`,owns:[`/preferences/writing`]},{key:`organize`,to:`/organize`,owns:[`/organize`]},{key:`tags`,to:`/tags`,owns:[`/tags`]}]},{key:`settings`,icon:`settings`,to:`/settings`,owns:[`/settings`,`/connections`,`/about`],sections:[{key:`settings`,to:`/settings`,owns:[`/settings`]},{key:`connections`,to:`/connections`,owns:[`/connections`]},{key:`about`,to:`/about`,owns:[`/about`]}]}]}function En(e,t,n=!1){return e.some(e=>n||e===`/`?t===e:t===e||t.startsWith(e.endsWith(`/`)?e:`${e}/`))}function Dn(e,t){return e.find(e=>En(e.owns,t,e.exact))}function On(e,t){return e?.sections.filter(e=>En(e.owns,t)).sort((e,t)=>Math.max(...t.owns.map(e=>e.length))-Math.max(...e.owns.map(e=>e.length)))[0]}function kn(e){let t=e.meta.layout;return typeof t==`function`?t(e):t}var An={class:`app-frame`},jn=[`data-layout`],Mn={class:`app-topbar`},Nn={class:`app-topbar-inner`},Pn={class:`app-title`},Fn={class:`app-actions`},In={key:0,class:`app-feedback-row`},Ln=[`role`,`aria-live`],Rn=k(c({__name:`AppShell`,setup(c){let f=F(),p=I(),h=n(()=>f.activePersonalSpace?.id??``),g=n(()=>Tn({spaceId:h.value||`current`,publicProjects:f.state?.capabilities?.browsePublicProjects!==!1})),_=n(()=>Dn(g.value,p.path)),v=n(()=>On(_.value,p.path)),b=n(()=>Le.value.path===p.path?Le.value.text:``),x=n(()=>b.value||(_.value&&_.value.sections.length>1&&v.value&&!p.meta.detail?O(`shell.destinations.${_.value.key}`):Vt(p.meta.title,`routes.overview.title`))),C=n(()=>kn(p)),w=n(()=>p.meta.detail?[]:_.value?.sections??[]),E=n(()=>p.name!==`overview`&&p.path!==`/preferences`&&!p.path.startsWith(`/roundtables`)&&p.meta.saveBar!==!0);m(he,me(h));let k=ke();D(h,e=>k.setSpace(e),{immediate:!0});let A;function j(){document.visibilityState===`visible`&&!k.loading&&!k.open&&k.refresh()}function N(){f.refresh(),k.loading||k.refresh()}return o(()=>{f.runtimeStatus===`idle`&&f.refresh(),A=setInterval(j,3e4),document.addEventListener(`visibilitychange`,j)}),d(()=>{clearInterval(A),document.removeEventListener(`visibilitychange`,j),k.setSpace(``)}),y(()=>{p.fullPath,Ht(b.value||p.meta.title)}),(n,o)=>(s(),r(`div`,An,[t(Sn,{destinations:g.value,"active-key":_.value?.key,"attention-count":i(k).total,"runtime-ready":i(f).runtimeStatus===`ready`,"space-id":h.value},null,8,[`destinations`,`active-key`,`attention-count`,`runtime-ready`,`space-id`]),M(`main`,{class:`app-main`,"data-layout":C.value},[M(`header`,Mn,[M(`div`,Nn,[M(`h1`,Pn,l(x.value),1),t(wn,{sections:w.value,"active-key":v.value?.key},null,8,[`sections`,`active-key`]),M(`div`,Fn,[t(Bt),t(Be),t(i(B),{icon:`refresh`,label:i(O)(`common.actions.refresh`),disabled:i(f).runtimeStatus===`loading`,"data-shell-refresh":``,onClick:N},null,8,[`label`,`disabled`])])])]),t(We),i(f).feedback?(s(),r(`div`,In,[M(`div`,{class:S([`feedback feedback-message`,{success:i(f).feedback.tone===`success`}]),role:i(f).feedback.tone===`error`?`alert`:`status`,"aria-live":i(f).feedback.tone===`error`?`assertive`:`polite`},[M(`span`,null,l(i(f).feedback.message),1),t(i(B),{icon:`close`,size:`sm`,label:i(O)(`common.actions.close`),onClick:i(f).clearFeedback},null,8,[`label`,`onClick`])],10,Ln)])):a(``,!0),t(i(L),null,{default:T(({Component:t})=>[(s(),u(e(t)))]),_:1}),t(zt),t(et)],8,jn),E.value?(s(),u(Et,{key:0})):a(``,!0)]))}}),[[`__scopeId`,`data-v-37597d26`]]),zn=c({__name:`App`,setup(e){let t=I();return(e,n)=>i(t).meta.publicReport?(s(),u(i(L),{key:0})):(s(),u(Rn,{key:1}))}});function Bn(e){let t=e.match(/^#\/knowledge\/([^/?#]+)\/([^/?#]+)\/(entity|relationship)\/([^/?#]+)(?:\?([^#]*))?$/);if(!t)return null;let[,n,r,i,a,o]=t;return`/knowledge/${n}/${r}/directory/${i}/${a}${o?`?${o}`:``}`}var Vn=e=>e.params.threadId||e.params.chatId?`column`:`canvas`,Z=e=>e.params.mode===`overview`?`column`:`canvas`,Hn=new Set([`assistant`,`tonborg`]),Q=te({history:ee(`/`),routes:[{path:`/reports/jefa`,name:`shared-jefa-report`,component:()=>W(()=>import(`./SharedJefaReportPage-B54qEdIV.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28])),meta:{publicReport:!0,title:`employees.share.title`}},{path:`/roundtables/chat/:chatId`,name:`roundtable-chat`,component:()=>W(()=>import(`./RoundtablesPage-2Akxagrm.js`),__vite__mapDeps([29,1,30,8,2,31,3,4,5,32,33,34,35])),meta:{title:`routes.roundtable.title`,layout:Vn}},{path:`/roundtables/:threadId?`,name:`roundtables`,component:()=>W(()=>import(`./RoundtablesPage-2Akxagrm.js`),__vite__mapDeps([29,1,30,8,2,31,3,4,5,32,33,34,35])),meta:{title:`routes.roundtable.title`,layout:Vn}},{path:`/`,name:`overview`,component:()=>W(()=>import(`./OverviewPage-D5W-DhOz.js`),__vite__mapDeps([36,1,30,8,31,2,3,4,5,37,15,16,38,39,40,41,22,6,42,43,44,45,46,47,48,49])),meta:{title:`routes.overview.title`,layout:`column`}},{path:`/preferences`,name:`personal-profile`,component:()=>W(()=>import(`./PersonalProfilePage-CndOcRQ6.js`),__vite__mapDeps([50,1,30,8,2,3,4,5,11,9,10,12,13,14,15,16,17,18,19,20,21,51,52,41,53,42,54,55,56,57,58,59,44,60,61,62,63,64,65,66,67,68,69])),meta:{title:`routes.preferences.title`,layout:`column`}},{path:`/preferences/writing`,name:`writing-taste`,component:()=>W(()=>import(`./WritingTastePage-D-ELo7mh.js`),__vite__mapDeps([70,1,30,8,3,4,5,11,9,10,12,13,14,15,16,17,18,19,20,21,6,71,72,43,44,51,62,53,42,54,55,56,68,73])),meta:{title:`routes.writingTaste.title`,layout:`column`}},{path:`/personal/:spaceId/projects/:projectId/:mode/:itemKind/:itemId`,name:`personal-project-item`,component:()=>W(()=>import(`./PersonalProjectsPage-CXBOwEqC.js`),__vite__mapDeps([74,1,30,8,3,4,5,58,59,44,60,61,9,10,75,37,53,42,76,2,31,77,78,79,11,12,13,14,15,16,17,18,19,20,21,41,80,51,81,52,62,82,40,83,84,85,86,55,87,88,54,56,57,63,64,89,90,91])),meta:{title:`routes.personalProjects.title`,layout:Z}},{path:`/personal/:spaceId/projects/:mode/:itemKind/:itemId`,name:`personal-projects-item`,component:()=>W(()=>import(`./PersonalProjectsPage-CXBOwEqC.js`),__vite__mapDeps([74,1,30,8,3,4,5,58,59,44,60,61,9,10,75,37,53,42,76,2,31,77,78,79,11,12,13,14,15,16,17,18,19,20,21,41,80,51,81,52,62,82,40,83,84,85,86,55,87,88,54,56,57,63,64,89,90,91])),meta:{title:`routes.personalProjects.title`,layout:Z,description:`routes.personalProjects.description`}},{path:`/personal/:spaceId/projects/:mode`,name:`personal-projects`,component:()=>W(()=>import(`./PersonalProjectsPage-CXBOwEqC.js`),__vite__mapDeps([74,1,30,8,3,4,5,58,59,44,60,61,9,10,75,37,53,42,76,2,31,77,78,79,11,12,13,14,15,16,17,18,19,20,21,41,80,51,81,52,62,82,40,83,84,85,86,55,87,88,54,56,57,63,64,89,90,91])),meta:{title:`routes.personalProjects.title`,layout:Z,description:`routes.personalProjects.description`}},{path:`/personal/:spaceId/projects/:projectId/:mode`,name:`personal-project`,component:()=>W(()=>import(`./PersonalProjectsPage-CXBOwEqC.js`),__vite__mapDeps([74,1,30,8,3,4,5,58,59,44,60,61,9,10,75,37,53,42,76,2,31,77,78,79,11,12,13,14,15,16,17,18,19,20,21,41,80,51,81,52,62,82,40,83,84,85,86,55,87,88,54,56,57,63,64,89,90,91])),meta:{title:`routes.personalProjects.title`,layout:Z}},{path:`/organize`,name:`knowledge-organizer`,component:()=>W(()=>import(`./KnowledgeOrganizerPage-CRC3mk0j.js`),__vite__mapDeps([92,1,30,8,3,4,5,11,9,10,12,13,14,15,16,17,18,19,20,21,80,59,44,51,55,87,88,53,42,54,56,57,58,60,61,62,63,64,65,66,2,67,93])),meta:{title:`routes.organizer.title`,layout:`canvas`}},{path:`/project-agents`,name:`project-agents`,component:()=>W(()=>import(`./AgentsDirectoryPage-xwIRrNb8.js`),__vite__mapDeps([94,1,30,8,2,31,3,4,5,58,59,44,60,61,9,10,95,37,13,14,15,16,96,32,40,47,97,41,43,82,83,98,99,46,100,101,84,102,103,75,104,66,67,105,42,85,12,86,106,107,39,24,25,108,109])),meta:{title:`routes.projectAgents.title`,layout:`canvas`}},{path:`/agents/:spaceId/:agentId`,name:`agent-profile`,component:()=>W(()=>import(`./AgentProfilePage-DH54S93r.js`),__vite__mapDeps([110,1,30,8,2,31,3,4,5,77,59,44,78,79,111,11,9,10,12,13,14,15,16,17,18,19,20,21,96,32,40,47,97,41,112,6,43,33,62,82,83,99,98,113,114,34,115,46,37,100,101,84,48,42,102,116])),meta:{title:`agentProfiles.profile`,layout:`column`,detail:!0}},{path:`/project-agents/occupations`,name:`occupations`,component:()=>W(()=>import(`./OccupationsPage-CnSp6362.js`),__vite__mapDeps([117,1,30,8,3,4,5,58,59,44,60,61,9,10,75,11,12,13,14,15,16,17,18,19,20,21,43,99,66,2,67,118,119,120])),meta:{title:`occupations.title`,layout:`canvas`}},{path:`/project-agents/schedules`,name:`task-schedules`,component:()=>W(()=>import(`./TaskSchedulesPage-Cxjqc8XQ.js`),__vite__mapDeps([121,1,30,8,2,3,4,5,44,58,59,60,61,9,10,122,123,78,124,75,11,12,13,14,15,16,17,18,19,20,21,47,43,48,42,66,67,106,118,119,125])),meta:{title:`taskSchedules.title`,layout:`canvas`}},{path:`/project-agents/manage`,name:`agent-management`,component:()=>W(()=>import(`./ProjectAgentsPage-Y6qCYRZj.js`),__vite__mapDeps([126,1,30,8,2,31,3,4,5,58,59,44,60,61,9,10,14,15,16,96,32,40,47,43,100,101,48,42,102,46,37,103,95,75,98,99,104,66,67,107,12,39,41,24,25,108,127,128,129])),meta:{title:`shell.sections.orchestrate`,layout:`canvas`}},{path:`/project-agents/manage/:spaceId/:agentId`,name:`agent-management-detail`,component:()=>W(()=>import(`./ProjectAgentDetailPage-SmZ2NYTw.js`),__vite__mapDeps([130,1,30,8,2,31,3,4,5,77,59,44,78,79,111,12,15,16,96,32,40,47,112,6,42,43,33,113,114,34,115,46,37,100,101,48,102,107,39,41,24,25,108,127,128,131])),meta:{title:`projectAgents.pageTitle`,layout:`column`,detail:!0}},{path:`/employees/:templateId`,name:`employee-workbench`,component:()=>W(()=>import(`./EmployeeWorkbenchPage-0oK2RfIh.js`),__vite__mapDeps([132,1,30,8,2,31,3,4,5,77,59,44,78,79,111,9,10,37,12,14,15,16,96,40,112,42,23,43,80,33,82,83,100,101,48,47,67,105,85,86,106,107,39,41,24,25,108,26,7,11,13,17,18,19,20,21,22,27,133,134])),meta:{title:`routes.employeeWorkbench.title`,layout:e=>Hn.has(String(e.params.templateId))?`column`:`canvas`,detail:!0}},{path:`/public-projects`,name:`public-projects`,component:()=>W(()=>import(`./PublicProjectsPage-C63vW9UZ.js`),__vite__mapDeps([135,1,30,8,2,3,4,5,58,59,44,60,61,9,10,75,12,15,16,41,6,72,42,43,66,67,55,53,136])),meta:{title:`routes.publicProjects.title`,description:`routes.publicProjects.description`,layout:`column`}},{path:`/knowledge`,name:`knowledge-default`,component:()=>W(()=>import(`./KnowledgePage-NsKFUWth.js`),__vite__mapDeps([137,1,76,30,8,2,31,3,4,5,77,59,44,78,79,37,11,9,10,12,13,14,15,16,17,18,19,20,21,41,80,51,81,52,62,82,40,83,84,85,86,55,87,88,53,42,54,56,57,58,60,61,63,64,89,90])),meta:{title:`routes.knowledge.title`,layout:`canvas`}},{path:`/knowledge/item/:spaceId/:itemKind(entity|relationship)/:itemId`,name:`knowledge-item-edit`,component:()=>W(()=>import(`./KnowledgeItemEditPage-C0Y2DsHz.js`),__vite__mapDeps([138,1,30,8,2,31,3,4,5,59,44,58,60,61,9,10,139,140,78,79,75,13,15,16,112,6,71,72,42,43,80,51,141,142,143,33,52,41,144,66,67,145,146,147,123,148,19,20])),meta:{title:`routes.knowledgeItem.title`,layout:`form`,detail:!0}},{path:`/s/:sessionId`,name:`session-records`,component:()=>W(()=>import(`./SessionRecordsPage-DIc2GoCQ.js`),__vite__mapDeps([149,1,30,8,2,31,3,4,5,58,59,44,60,61,9,10,75,43,51,52,41,144,42,150,66,67,146,140,78,79,147,123,6,80,142,143,148,19,20])),meta:{title:`routes.sessionRecords.title`,layout:`column`,detail:!0}},{path:`/s/:sessionId/migrate`,name:`session-migration`,component:()=>W(()=>import(`./SessionMigrationPage-B5r2PWCF.js`),__vite__mapDeps([151,1,30,8,2,31,3,4,5,140,59,44,78,79,9,10,43,80,51,142,143,33,52,41,144,42,150])),meta:{title:`routes.sessionMigration.title`,layout:`form`,detail:!0}},{path:`/tags`,name:`tags`,component:()=>W(()=>import(`./TagVocabularyPage-BIsHYk2i.js`),__vite__mapDeps([152,1,30,8,2,3,4,5,140,59,44,78,79,9,10,61,60,124,58,139,77,75,42,43,80,51,81,141,142,143])),meta:{title:`routes.tags.title`,layout:`canvas`}},{path:`/knowledge/turn/:spaceId`,name:`knowledge-turn-receipt`,component:()=>W(()=>import(`./KnowledgeTurnReceiptPage-Dl0KeFDe.js`),__vite__mapDeps([153,1,2,31,3,4,5,43,44,51,52,8,41,145,148,19,9,10,20,6])),meta:{title:`routes.knowledgeTurn.title`,layout:`form`,detail:!0}},{path:`/knowledge/:scope/:spaceId/:projectId/:mode/:itemKind/:itemId`,name:`project-knowledge-item`,component:()=>W(()=>import(`./KnowledgePage-NsKFUWth.js`),__vite__mapDeps([137,1,76,30,8,2,31,3,4,5,77,59,44,78,79,37,11,9,10,12,13,14,15,16,17,18,19,20,21,41,80,51,81,52,62,82,40,83,84,85,86,55,87,88,53,42,54,56,57,58,60,61,63,64,89,90])),meta:{title:`routes.knowledge.title`,layout:`canvas`}},{path:`/knowledge/:scope/:spaceId/:mode/:itemKind/:itemId`,name:`knowledge-item`,component:()=>W(()=>import(`./KnowledgePage-NsKFUWth.js`),__vite__mapDeps([137,1,76,30,8,2,31,3,4,5,77,59,44,78,79,37,11,9,10,12,13,14,15,16,17,18,19,20,21,41,80,51,81,52,62,82,40,83,84,85,86,55,87,88,53,42,54,56,57,58,60,61,63,64,89,90])),meta:{title:`routes.knowledge.title`,layout:`canvas`}},{path:`/knowledge/:scope/:spaceId/:projectId/:mode`,name:`project-knowledge`,component:()=>W(()=>import(`./KnowledgePage-NsKFUWth.js`),__vite__mapDeps([137,1,76,30,8,2,31,3,4,5,77,59,44,78,79,37,11,9,10,12,13,14,15,16,17,18,19,20,21,41,80,51,81,52,62,82,40,83,84,85,86,55,87,88,53,42,54,56,57,58,60,61,63,64,89,90])),meta:{title:`routes.knowledge.title`,layout:`canvas`}},{path:`/knowledge/:scope/:spaceId/:mode`,name:`knowledge`,component:()=>W(()=>import(`./KnowledgePage-NsKFUWth.js`),__vite__mapDeps([137,1,76,30,8,2,31,3,4,5,77,59,44,78,79,37,11,9,10,12,13,14,15,16,17,18,19,20,21,41,80,51,81,52,62,82,40,83,84,85,86,55,87,88,53,42,54,56,57,58,60,61,63,64,89,90])),meta:{title:`routes.knowledge.title`,layout:`canvas`}},{path:`/inbox`,name:`inbox`,component:()=>W(()=>import(`./InboxPage-CTQ425Ez.js`),__vite__mapDeps([154,1,30,8,2,31,3,4,5,58,59,44,60,61,9,10,39,97,47,43,62,66,67,155])),meta:{title:`attention.title`,layout:`canvas`}},{path:`/review`,redirect:`/public-projects`},{path:`/connections`,name:`connections`,component:()=>W(()=>import(`./ConnectionsPage-Yf4UvjDT.js`),__vite__mapDeps([156,1,30,8,3,4,5,15,16,6,72,43,44,62,118,119,55])),meta:{title:`routes.connections.title`,description:`routes.connections.description`,layout:`form`}},{path:`/settings`,name:`settings`,component:()=>W(()=>import(`./SettingsPage-BAxKpnBx.js`),__vite__mapDeps([157,1,30,8,2,3,4,5,140,59,44,78,79,9,10,147,123,139,61,77,111,37,114,15,16,17,18,6,71,72,42,62,133,63,89,158])),meta:{title:`routes.settings.title`,layout:`form`,saveBar:!0}},{path:`/settings/models`,name:`model-settings`,component:()=>W(()=>import(`./ModelSettingsPage-Bz1tMXtW.js`),__vite__mapDeps([159,1,30,8,31,2,3,4,5,140,59,44,78,79,9,10,147,123,143,11,12,13,14,15,16,17,18,19,20,21,97,47,42,43,80,142,33,82,40,83,67,160,106,26,161])),meta:{title:`modelSettings.title`,layout:`form`,detail:!0}},{path:`/settings/data-format`,name:`data-format`,component:()=>W(()=>import(`./DataFormatPage-BPuUH0PG.js`),__vite__mapDeps([162,1,3,4,5,140,59,44,78,79,9,10,143,11,12,13,14,15,16,17,18,19,20,21,6,71,72,43,33,2,31,160,8,106,163])),meta:{title:`dataFormat.title`,layout:`form`,detail:!0}},{path:`/capture-change/:previewId`,name:`capture-change`,component:()=>W(()=>import(`./CaptureChangePage-DWdz9dEk.js`),__vite__mapDeps([164,1,30,8,2,31,3,4,5,37,6,71,72,42,165])),meta:{title:`capture.confirm.title`,layout:`form`,detail:!0}},{path:`/about`,name:`about`,component:()=>W(()=>import(`./AboutPage-D0dTwKq8.js`),__vite__mapDeps([166,1,167,168])),meta:{title:`routes.about.title`,layout:`form`}},{path:`/:pathMatch(.*)*`,name:`not-found`,component:()=>W(()=>import(`./NotFoundPage-TfZ2eoA2.js`),__vite__mapDeps([169,1,31,2,3,4,5,6])),meta:{title:`common.errors.pageNotFound`,layout:`form`}}],scrollBehavior:(e,t,n)=>n??(e.path!==t.path&&{top:0})});Ve(Q),Q.beforeEach(e=>e.path!==`/`||typeof window>`u`?!0:Bn(window.location.hash)??!0),Q.afterEach(e=>{Ht(e.meta.title)}),Ce(),ot();var $=_(zn);$.use(P()),$.use(v),$.use(Q),await Q.isReady().catch(()=>void 0),$.mount(`#app`);
2
+ import{$ as e,A as t,C as n,D as r,Dt as i,E as a,G as o,J as s,M as c,Mt as l,T as u,U as d,V as f,X as p,Y as m,a as h,b as g,d as _,i as v,it as y,jt as b,k as x,kt as S,n as C,o as w,ot as T,r as E,rt as D,s as O,t as k,v as A,vt as j,w as M,xt as N}from"./_plugin-vue_export-helper-RegzAV-H.js";import{n as P,t as F}from"./console-DiNe1hFP.js";import{m as I}from"./useApi-CROJJdhE-CH5wlWTU.js";import{i as ee,n as L,r as te,t as R}from"./vue-router-Dad-4p7O.js";import{t as z}from"./button-A2esxd6G.js";import{t as ne}from"./checkbox-DxBVlC6t.js";import{a as re,i as ie,n as ae,r as oe,t as se}from"./dialog-DTVE8tN1.js";import{n as ce,t as le}from"./RadioGroupItem-tL_2upmD.js";import{a as ue,r as de}from"./client-DAoXcTUz.js";import{i as fe,n as pe,r as me,t as he}from"./agent-pins-Bb7-1Uoz.js";import{t as ge}from"./UiIcon-BADOYtHM.js";import{t as _e}from"./DialogFooter-D9A9hRP4.js";import{i as ve,n as ye,r as be}from"./project-origin-JnGPwlfA.js";import{i as xe,n as Se,t as Ce}from"./motion-preference-DeZURhN7.js";import{r as we}from"./ui-CtW0tAA1.js";import{t as B}from"./UiIconButton-CkBP6pnX.js";import{t as V}from"./UiSegmented-FwOnE2IZ.js";import{t as Te}from"./UiToggle-bpyawyIe.js";import{i as Ee,n as De,r as H,t as Oe}from"./design-lab-UWXx2ZtA.js";import{r as ke}from"./attention-store-g2-_vAhV.js";import{t as Ae}from"./fuli-logo-Bu9WBuQe.js";import{t as je}from"./avatars-CUyfvsKO.js";import{t as Me}from"./agent-identity-color-RqpT7gtx.js";import{n as Ne,t as U}from"./profile-model-kCmPHrmk.js";import{n as Pe}from"./useAgentRecords-BoOqLQcf.js";import{n as Fe,t as Ie}from"./paths-CDREouhi.js";import{t as Le}from"./page-title-BLHrexaP.js";import{t as W}from"./preload-helper-BLdHbfdN.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Re=[`aria-label`],ze=[`lang`,`aria-label`,`aria-pressed`,`onClick`],Be=c({__name:`LocaleSwitcher`,setup(e){let t=n(()=>E()),a={"zh-CN":`中`,"en-US":`EN`};function o(e){e!==t.value&&w(e)}return(e,n)=>(s(),r(`div`,{class:`locale-switcher`,role:`group`,"aria-label":i(O)(`common.language.label`)},[(s(!0),r(g,null,p(i(C),e=>(s(),r(`button`,{key:e,type:`button`,lang:e,"aria-label":i(O)(e===`zh-CN`?`common.language.chinese`:`common.language.english`),"aria-pressed":t.value===e,onClick:t=>o(e)},l(a[e]),9,ze))),128))],8,Re))}}),G=N(null);function Ve(e){let t=e.onError((t,n)=>{let r=e.resolve(n).href;r.startsWith(`/`)&&!r.startsWith(`//`)&&(G.value={href:r,resourceFailure:/dynamically imported module|module script|loading chunk|preload css|importing a module/i.test(String(t))})}),n=e.afterEach((e,t,n)=>{n||(G.value=null)});return()=>{t(),n()}}var He={key:0,class:`navigation-recovery`,role:`alert`},Ue=[`href`],We=k(c({__name:`NavigationRecovery`,setup(e){return(e,n)=>i(G)?(s(),r(`div`,He,[M(`div`,null,[M(`strong`,null,l(i(O)(`routes.loadFailure.title`)),1),M(`p`,null,l(i(O)(i(G).resourceFailure?`routes.loadFailure.resources`:`routes.loadFailure.message`)),1)]),t(i(z),{"as-child":``,variant:`outline`},{default:T(()=>[M(`a`,{href:i(G).href},l(i(O)(`routes.loadFailure.reload`)),9,Ue)]),_:1}),t(i(z),{variant:`ghost`,onClick:n[0]||=e=>G.value=null},{default:T(()=>[x(l(i(O)(`routes.loadFailure.dismiss`)),1)]),_:1})])):a(``,!0)}}),[[`__scopeId`,`data-v-96f1f3c2`]]);function Ge(e){return e?e.enabled?(e.projectMode??`all`)===`all`?`all`:e.projectMode===`selected`?`selected`:null:`off`:null}var Ke=[`data-capture-scope`,`data-selected`],qe={key:0,class:`onboarding-projects`,"data-capture-scope-projects":``},Je={class:`onboarding-projects-label`},Ye={key:0,class:`onboarding-note`},Xe={key:1},Ze=[`data-capture-scope-project`],Qe={class:`onboarding-project-name`},$e={key:1,class:`onboarding-error`,role:`alert`,"data-capture-scope-error":``},et=k(c({__name:`CaptureOnboardingDialog`,setup(e){let o=[`all`,`selected`,`off`],c=F(),d=j(!1),f=n(()=>c.state?.captureOnboarding?.ask===!0&&!d.value),m=j(null),h=j({}),_=j(null),v=n(()=>_.value!==null),y=j(``),b=n(()=>c.activePersonalSpace?.id??``),S=n(()=>be((c.state?.personalProjects??[]).filter(e=>e.personal_space_id===b.value&&ye(e))).map(e=>({id:e.project_id,name:ve(e)})));function C(e){!e&&!v.value&&(d.value=!0)}function w(e){m.value=e,y.value=``}async function E(){let e=m.value;if(e&&!v.value){_.value=`saving`,y.value=``;try{let t=await c.answerCaptureScope(e===`selected`?{choice:e,selectedProjectIds:S.value.filter(e=>h.value[e.id]).map(e=>e.id)}:{choice:e});c.notify(t.status===`answered`?O(`capture.onboarding.saved.${t.choice}`):O(`capture.onboarding.gone`))}catch(e){await D(de(e))}finally{_.value=null}}}async function D(e){_.value=`checking`,y.value=O(`capture.onboarding.unconfirmed`);try{let t=await c.readCaptureOnboarding();if(t.ask){y.value=O(`capture.onboarding.notSaved`,{reason:e});return}y.value=``;let n=Ge(t.capturePolicy);c.notify(O(n?`capture.onboarding.saved.${n}`:`capture.onboarding.gone`))}catch(e){y.value=O(`capture.onboarding.unknown`,{reason:de(e)})}}return(e,n)=>(s(),u(i(re),{open:f.value,"onUpdate:open":C},{default:T(()=>[t(i(ie),{"data-capture-onboarding":``,onPointerDownOutside:n[1]||=A(()=>{},[`prevent`])},{default:T(()=>[t(i(ae),null,{default:T(()=>[t(i(se),null,{default:T(()=>[x(l(i(O)(`capture.onboarding.title`)),1)]),_:1}),t(i(oe),null,{default:T(()=>[x(l(i(O)(`capture.onboarding.description`)),1)]),_:1})]),_:1}),t(i(ce),{"model-value":m.value??void 0,"aria-label":i(O)(`capture.onboarding.choicesLabel`),class:`grid gap-2`,disabled:v.value,"onUpdate:modelValue":w},{default:T(()=>[(s(),r(g,null,p(o,e=>M(`label`,{key:e,class:`onboarding-option`,"data-capture-scope":e,"data-selected":m.value===e||void 0},[t(i(le),{value:e},null,8,[`value`]),M(`span`,null,[M(`strong`,null,l(i(O)(`capture.onboarding.choices.${e}`)),1),M(`small`,null,l(i(O)(`capture.onboarding.hints.${e}`)),1)])],8,Ke)),64))]),_:1},8,[`model-value`,`aria-label`,`disabled`]),m.value===`selected`?(s(),r(`section`,qe,[M(`span`,Je,l(i(O)(`capture.onboarding.projectsLabel`)),1),S.value.length?(s(),r(`ul`,Xe,[(s(!0),r(g,null,p(S.value,e=>(s(),r(`li`,{key:e.id,"data-capture-scope-project":e.id},[M(`label`,null,[t(i(ne),{"model-value":h.value[e.id]===!0,disabled:v.value,"onUpdate:modelValue":t=>h.value={...h.value,[e.id]:t===!0}},null,8,[`model-value`,`disabled`,`onUpdate:modelValue`]),M(`span`,Qe,l(e.name),1)])],8,Ze))),128))])):(s(),r(`p`,Ye,l(i(O)(`capture.onboarding.noProjects`)),1))])):a(``,!0),y.value?(s(),r(`p`,$e,l(y.value),1)):a(``,!0),t(i(_e),null,{default:T(()=>[t(i(z),{variant:`ghost`,disabled:v.value,"data-capture-scope-later":``,onClick:n[0]||=e=>C(!1)},{default:T(()=>[x(l(i(O)(`capture.onboarding.later`)),1)]),_:1},8,[`disabled`]),t(i(z),{disabled:!m.value,loading:v.value,"loading-label":i(O)(_.value===`checking`?`capture.onboarding.checking`:`capture.onboarding.saving`),"data-capture-scope-save":``,onClick:E},{default:T(()=>[x(l(i(O)(`capture.onboarding.save`)),1)]),_:1},8,[`disabled`,`loading`,`loading-label`])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),[[`__scopeId`,`data-v-257b023c`]]),tt=`fuli.palette`,nt=[`jade`,`ink`,`gold`,`indigo`,`sprout`],K=`jade`,q=j(K),rt=e=>nt.includes(e);function it(){if(typeof window>`u`)return K;try{let e=window.localStorage.getItem(tt);return rt(e)?e:K}catch{return K}}function at(e){typeof document<`u`&&(e===K?delete document.documentElement.dataset.palette:document.documentElement.dataset.palette=e)}function ot(){q.value=it(),at(q.value)}function st(e){if(q.value=e,at(e),typeof window<`u`)try{e===K?window.localStorage.removeItem(tt):window.localStorage.setItem(tt,e)}catch{}}var ct=[{id:`current`,labelKey:`designLab.workbench.current`},{id:`focus`,labelKey:`workbench.variants.focus`},{id:`board`,labelKey:`workbench.variants.board`},{id:`timeline`,labelKey:`workbench.variants.timeline`},{id:`constellation`,labelKey:`workbench.variants.constellation`},{id:`office`,labelKey:`workbench.variants.office`},{id:`galaxy3d`,labelKey:`workbench.variants.galaxy3d`}],lt=[`aria-label`],ut=[`title`],dt={class:`design-lab-hint`},ft={class:`design-lab-group`},pt={class:`design-lab-label`},mt={class:`design-lab-group`},ht={class:`design-lab-label`},gt={class:`design-lab-group`},_t={class:`design-lab-label`},vt={class:`design-lab-row`},yt={class:`design-lab-row`},bt={class:`design-lab-row`},xt={class:`design-lab-row`},St={key:0,class:`design-lab-group`},Ct={class:`design-lab-label`},wt={class:`design-lab-foot`},Tt=4,Et=k(c({__name:`DesignLabPanel`,setup(e){let c=j(null),f=n(()=>nt.map(e=>({value:e,label:O(`designLab.palettes.${e}`),swatch:`var(--palette-swatch-${e})`}))),m=n(()=>De.map(e=>({value:e,label:O(`designLab.transitions.${e}`)}))),h=[`cards`,`density`,`radius`],_=e=>Oe[e].map(t=>({value:t,label:O(`designLab.choices.${e}.${t}`)})),v=n(()=>ct.map(({id:e,labelKey:t})=>({value:e,label:O(t)}))),y=n(()=>H.value.x===null||H.value.y===null?void 0:{left:`${H.value.x}px`,top:`${H.value.y}px`,right:`auto`,bottom:`auto`}),S=null;function C(e){if(!c.value||e.target.closest(`button`))return;let t=c.value.getBoundingClientRect();S={dx:e.clientX-t.left,dy:e.clientY-t.top},window.addEventListener(`pointermove`,w),window.addEventListener(`pointerup`,E,{once:!0})}function w(e){if(!S||!c.value)return;let{width:t,height:n}=c.value.getBoundingClientRect();H.value.x=Math.round(Math.min(Math.max(0,e.clientX-S.dx),window.innerWidth-t)),H.value.y=Math.round(Math.min(Math.max(0,e.clientY-S.dy),window.innerHeight-n))}function E(){S=null,window.removeEventListener(`pointermove`,w)}d(E);let D=j(null),k=n(()=>D.value?{left:`${D.value.x}px`,top:`${D.value.y}px`,right:`auto`,bottom:`auto`}:void 0),A=null,N=!1;function P(e){let t=e.currentTarget.getBoundingClientRect();A={startX:e.clientX,startY:e.clientY,dx:e.clientX-t.left,dy:e.clientY-t.top,width:t.width,height:t.height,moved:!1},window.addEventListener(`pointermove`,F),window.addEventListener(`pointerup`,I,{once:!0})}function F(e){A&&(!A.moved&&Math.hypot(e.clientX-A.startX,e.clientY-A.startY)<Tt||(A.moved=!0,D.value={x:Math.round(Math.min(Math.max(0,e.clientX-A.dx),window.innerWidth-A.width)),y:Math.round(Math.min(Math.max(0,e.clientY-A.dy),window.innerHeight-A.height))}))}function I(){N=!!A?.moved,A=null,window.removeEventListener(`pointermove`,F)}function ee(){N?N=!1:H.value.open=!0}let L=()=>{D.value=null};o(()=>window.addEventListener(`resize`,L)),d(()=>{I(),window.removeEventListener(`resize`,L)});function te(){Ee(),st(`jade`),xe(`system`)}return(e,n)=>i(H).open?(s(),r(`section`,{key:1,ref_key:`panel`,ref:c,class:`design-lab`,style:b(y.value),"aria-label":i(O)(`designLab.title`),"data-design-lab":``},[M(`header`,{class:`design-lab-head`,title:i(O)(`designLab.drag`),onPointerdown:C},[M(`strong`,null,l(i(O)(`designLab.title`)),1),t(i(B),{icon:`close`,size:`sm`,label:i(O)(`designLab.close`),"data-design-lab-close":``,onClick:n[0]||=e=>i(H).open=!1},null,8,[`label`])],40,ut),M(`p`,dt,l(i(O)(`designLab.hint`)),1),M(`div`,ft,[M(`span`,pt,l(i(O)(`designLab.palette`)),1),t(i(V),{class:`design-lab-choices`,"data-lab-palette":``,"model-value":i(q),options:f.value,label:i(O)(`designLab.palette`),"onUpdate:modelValue":i(st)},null,8,[`model-value`,`options`,`label`,`onUpdate:modelValue`])]),M(`div`,mt,[M(`span`,ht,l(i(O)(`designLab.look`)),1),(s(),r(g,null,p(h,e=>M(`div`,{key:e,class:`design-lab-row`},[M(`span`,null,l(i(O)(`designLab.choices.${e}.label`)),1),t(i(V),{modelValue:i(H).choices[e],"onUpdate:modelValue":t=>i(H).choices[e]=t,"data-lab-choice":e,options:_(e),label:i(O)(`designLab.choices.${e}.label`)},null,8,[`modelValue`,`onUpdate:modelValue`,`data-lab-choice`,`options`,`label`])])),64))]),M(`div`,gt,[M(`span`,_t,l(i(O)(`designLab.motion`)),1),M(`label`,vt,[M(`span`,null,l(i(O)(`designLab.reduceMotion`)),1),t(i(Te),{"model-value":i(Se)===`reduced`,label:i(O)(`designLab.reduceMotion`),"onUpdate:modelValue":n[1]||=e=>i(xe)(e?`reduced`:`system`)},null,8,[`model-value`,`label`])]),M(`div`,yt,[M(`span`,null,l(i(O)(`designLab.transition`)),1),t(i(V),{modelValue:i(H).transition,"onUpdate:modelValue":n[2]||=e=>i(H).transition=e,"data-lab-transition":``,options:m.value,label:i(O)(`designLab.transition`)},null,8,[`modelValue`,`options`,`label`])]),M(`div`,bt,[M(`span`,null,l(i(O)(`designLab.choices.ring.label`)),1),t(i(V),{modelValue:i(H).choices.ring,"onUpdate:modelValue":n[3]||=e=>i(H).choices.ring=e,"data-lab-choice":`ring`,options:_(`ring`),label:i(O)(`designLab.choices.ring.label`)},null,8,[`modelValue`,`options`,`label`])]),M(`label`,xt,[M(`span`,null,l(i(O)(`designLab.cardLift`)),1),t(i(Te),{modelValue:i(H).cardLift,"onUpdate:modelValue":n[4]||=e=>i(H).cardLift=e,"data-lab-lift":``,label:i(O)(`designLab.cardLift`)},null,8,[`modelValue`,`label`])])]),v.value.length>1?(s(),r(`div`,St,[M(`span`,Ct,l(i(O)(`designLab.workbench.title`)),1),t(i(V),{modelValue:i(H).workbench,"onUpdate:modelValue":n[5]||=e=>i(H).workbench=e,class:`design-lab-choices`,"data-lab-workbench":``,options:v.value,label:i(O)(`designLab.workbench.title`)},null,8,[`modelValue`,`options`,`label`])])):a(``,!0),M(`footer`,wt,[t(i(z),{variant:`ghost`,size:`sm`,"data-design-lab-reset":``,onClick:te},{default:T(()=>[x(l(i(O)(`designLab.reset`)),1)]),_:1})])],12,lt)):(s(),u(i(B),{key:0,class:`design-lab-launcher`,icon:`grid`,label:i(O)(`designLab.open`),"data-design-lab-open":``,style:b(k.value),onPointerdown:P,onClick:ee},null,8,[`label`,`style`]))}}),[[`__scopeId`,`data-v-9b25bd4d`]]),J=(e,t,n,r)=>({id:`${e}.${t}`,group:e,labelKey:n,bodyKey:r}),Dt=[...[`known_known`,`known_unknown`,`unknown_known`,`unknown_unknown`].map(e=>J(`quadrant`,e,`knowledge.domain.quadrants.${e}`,`knowledge.domain.quadrants.descriptions.${e}`)),...[`confirmed`,`agent_confirmed`,`ai_reviewed`,`pending`].map(e=>J(`review`,e,`knowledge.domain.reviewStates.${e}`,`glossary.review.${e}`)),...[`taste`,`personality`,`judgment_preference`].map(e=>J(`profile`,e,`knowledge.domain.profiles.${e}`,`glossary.profile.${e}`)),...[`running`,`queued`,`backlog`,`paused`,`blocked`,`awaiting_review`,`awaiting_recruitment`,`none`,`ended`].map(e=>J(`work`,e,`agentRedesign.workStatus.${e}`,`glossary.work.${e}`)),...[`working`,`waiting`,`idle`,`error`].map(e=>J(`presence`,e,`glossary.presence.${e}.label`,`glossary.presence.${e}.body`)),...[`pending`,`agent`,`person`].map(e=>J(`weight`,e,`glossary.weight.${e}.label`,`glossary.weight.${e}.body`))],Ot=new Map(Dt.map(e=>[e.id,e]));function kt(e,t){return t.split(`.`).reduce((e,t)=>e&&typeof e==`object`?e[t]:void 0,h[e])}var At=e=>e.replace(/\s+/g,` `).trim().toLocaleLowerCase(),jt=new Map;for(let e of Dt)for(let t of C){let n=kt(t,e.labelKey);typeof n==`string`&&!jt.has(At(n))&&jt.set(At(n),e)}var Mt=24,Nt=4;function Pt(e){if(!(e instanceof Element))return;let t=e.closest(`[data-term]`),n=t?.dataset.term&&Ot.get(t.dataset.term);if(t&&n)return{term:n,element:t};let r=e instanceof HTMLElement?e:e.parentElement;for(let e=0;r&&e<Nt;e++,r=r.parentElement){let e=r.textContent??``;if(e.length>Mt)return;let t=jt.get(At(e));if(t)return{term:t,element:r}}}var Ft=j(!1),Y=j(!1);function It(){return{held:Ft,pinned:Y,active:n(()=>Ft.value||Y.value),toggle:()=>{Y.value=!Y.value},reset:()=>{Ft.value=!1,Y.value=!1}}}var Lt={key:0,class:`glossary-live`,role:`status`},Rt=[`data-glossary-term`],zt=k(c({__name:`GlossaryLayer`,setup(e){let{held:n,pinned:c,active:u}=It(),f=j(null),p=null;function m(e){p!==e&&(p?.removeAttribute(`data-glossary-hit`),p=e,p?.setAttribute(`data-glossary-hit`,``))}function h(e){e.key!==`Alt`||e.repeat||(e.preventDefault(),n.value=!0)}function _(e){e.key===`Alt`&&(n.value=!1)}function v(){n.value=!1}function y(e){u.value&&m(Pt(e.target)?.element??null)}function b(e){if(!u.value||e.target instanceof Element&&e.target.closest(`[data-glossary-toggle]`))return;e.preventDefault(),e.stopPropagation();let t=Pt(e.target);t&&(f.value={term:t.term,anchor:t.element.getBoundingClientRect()})}return D(u,e=>{document.documentElement.toggleAttribute(`data-glossary`,e),e||m(null)},{immediate:!0}),o(()=>{window.addEventListener(`keydown`,h),window.addEventListener(`keyup`,_),window.addEventListener(`blur`,v),window.addEventListener(`pointermove`,y,{passive:!0}),window.addEventListener(`click`,b,!0)}),d(()=>{window.removeEventListener(`keydown`,h),window.removeEventListener(`keyup`,_),window.removeEventListener(`blur`,v),window.removeEventListener(`pointermove`,y),window.removeEventListener(`click`,b,!0),n.value=!1,c.value=!1,m(null),document.documentElement.removeAttribute(`data-glossary`)}),(e,n)=>(s(),r(g,null,[i(u)?(s(),r(`span`,Lt,l(i(O)(`glossary.modeOn`)),1)):a(``,!0),t(i(we),{open:!!f.value,anchor:f.value?.anchor??null,label:f.value?i(O)(f.value.term.labelKey):``,onClose:n[0]||=e=>f.value=null},{default:T(()=>[f.value?(s(),r(`div`,{key:0,class:`glossary-card`,"data-glossary-term":f.value.term.id},[M(`small`,null,l(i(O)(`glossary.groups.${f.value.term.group}`)),1),M(`strong`,null,l(i(O)(f.value.term.labelKey)),1),M(`p`,null,l(i(O)(f.value.term.bodyKey)),1)],8,Rt)):a(``,!0)]),_:1},8,[`open`,`anchor`,`label`])],64))}}),[[`__scopeId`,`data-v-b4734ca4`]]),Bt=k(c({__name:`GlossaryToggle`,setup(e){let n=It();return(e,r)=>i(n).pinned.value?(s(),u(i(z),{key:0,variant:`outline`,class:`glossary-return`,size:`sm`,"data-glossary-toggle":``,"data-glossary-return":``,"aria-label":i(O)(`glossary.toggleOn`),title:i(O)(`glossary.toggleOn`),onClick:i(n).toggle},{default:T(()=>[t(i(ge),{class:`glossary-return-icon`,name:`tray`,size:16}),x(l(i(O)(`glossary.return`)),1)]),_:1},8,[`aria-label`,`title`,`onClick`])):(s(),u(i(B),{key:1,icon:`info`,"data-glossary-toggle":``,active:i(n).active.value,label:i(O)(`glossary.toggle`),onClick:i(n).toggle},null,8,[`active`,`label`,`onClick`]))}}),[[`__scopeId`,`data-v-f3db80f2`]]);function Vt(e,t=``){let n=typeof e==`string`&&e?e:t;return n&&v.global.te(n)?O(n):n}function Ht(e){if(typeof document>`u`)return;let t=Vt(e,`routes.overview.title`);document.title=`${t} · ${O(`common.brand`)}`}var X={name:`fuli-context`,version:`0.21.0-beta.3`,description:`Local-first collaboration relationship graph for AI agents.`,type:`module`,files:[`README.zh-CN.md`,`npm-shrinkwrap.json`,`src/`,`native/win32/fuli-win-helper.exe`,`packages/roundtable/package.json`,`packages/roundtable/bin/`,`packages/roundtable/src/`,`dist/web/`,`docs/external-knowledge-architecture.md`,`docs/public-personal-architecture.md`,`docs/project-agent-memory.md`,`docs/agent-conversations-and-collaboration.md`,`docs/employee-agents.md`,`docs/agent-apps.md`,`docs/agent-interface-architecture.md`,`docs/agent-roundtable.md`,`examples/external-knowledge/markdown-folder.mjs`,`graph-provider/Dockerfile`,`graph-provider/pyproject.toml`,`graph-provider/fuli_graph/*.py`,`graph-provider/fuli_graph/**/*.py`,`skills/`,`compose.graphiti.yml`,`docs/judgment-and-autonomy.md`,`docs/client-connections.md`],bin:{fl:`src/cli.js`,fuli:`src/cli.js`},keywords:[`ai-agent`,`mcp`,`context`,`knowledge-graph`,`local-first`,`codex`,`claude-code`],scripts:{mcp:`node src/mcp-server.js`,dev:`run-p dev:server dev:web`,"dev:server":`node src/server.js`,"dev:web":`vite`,build:`run-s typecheck:web build:web`,"build:web":`vite build`,"build:site":`node scripts/build-site.js`,"typecheck:web":`vue-tsc --noEmit -p tsconfig.app.json`,"test:node":`node --test`,"test:web":`vitest run --config vitest.config.ts`,"test:package":`node scripts/package-smoke.js`,"test:neo4j":`node --test --test-concurrency=1 test/agent-dismissal-acceptance.test.js test/conversation-hook-neo4j-acceptance.test.js test/project-agent-memory-acceptance.test.js test/task-memory-checkpoint-atomicity.test.js`,"test:knowledge:live":`node acceptance/knowledge-live.js`,"measure:context-delivery":`node acceptance/context-delivery-replay/run.js`,"test:external-knowledge:live":`node scripts/validate-external-knowledge-live.js`,start:`node src/server.js`,"graph:setup":`node src/graphiti/setup.js`,"graph:up":`docker compose -f compose.graphiti.yml up -d --build`,"graph:down":`docker compose -f compose.graphiti.yml down`,"test:structure":`node --test test/source-structure.test.js`,pretest:`npm run build:web`,test:`run-s typecheck:web test:node test:web`,prepack:`npm run build`,prepublishOnly:`node scripts/release-gate.js && npm test`},engines:{node:`>=24.12`},repository:{type:`git`,url:`git+https://github.com/JevonsCode/fuli.git`},homepage:`https://jevonscode.github.io/fuli/`,bugs:{url:`https://github.com/JevonsCode/fuli/issues`},publishConfig:{access:`public`},license:`Apache-2.0`,dependencies:{"@a2a-js/sdk":`1.3.0`,"@agentclientprotocol/sdk":`1.5.0`,"@hono/node-server":`2.0.12`,"@modelcontextprotocol/sdk":`^1.31.0`,"@peculiar/x509":`2.1.0`,"jsonc-parser":`3.3.1`,"reflect-metadata":`0.2.2`,"smol-toml":`1.9.1`,zod:`^4.6.7`},devDependencies:{"@atlaskit/pragmatic-drag-and-drop":`4.0.0`,"@atlaskit/pragmatic-drag-and-drop-auto-scroll":`3.2.1`,"@atlaskit/pragmatic-drag-and-drop-hitbox":`3.0.0`,"@tailwindcss/vite":`4.3.3`,"@types/d3":`^7.4.3`,"@types/node":`^24.13.3`,"@types/three":`0.169.0`,"@vitejs/plugin-vue":`^6.0.8`,"@vue/test-utils":`^2.4.11`,"@vueuse/core":`14.4.0`,"brace-expansion":`5.0.12`,"class-variance-authority":`0.7.1`,clsx:`2.1.1`,d3:`^7.9.0`,jsdom:`^29.1.1`,linkedom:`^0.18.12`,"npm-run-all2":`^9.0.2`,pinia:`^4.0.2`,"reka-ui":`2.11.0`,"tailwind-merge":`3.7.0`,tailwindcss:`4.3.3`,three:`0.169.0`,typescript:`~6.0.0`,vite:`^8.1.5`,vitest:`^4.1.12`,vue:`^3.5.42`,"vue-i18n":`^11.4.8`,"vue-router":`^5.2.0`,"vue-tsc":`^3.3.8`},overrides:{"@modelcontextprotocol/sdk":{"@hono/node-server":`2.0.12`},"brace-expansion":`$brace-expansion`,"fast-uri":`3.1.9`,qs:`6.16.1`}}.version,Ut=[`aria-label`],Wt={class:`brand-mark-wrap`},Gt=[`src`],Kt=[`aria-label`,`aria-expanded`],qt={key:1,class:`brand-copy`},Jt={class:`brand-title-row`},Yt={class:`brand-name`},Xt=[`aria-label`,`aria-expanded`],Zt={class:`brand-version`},Qt={key:1,class:`brand-version`},$t={class:`brand-title-row`},en={class:`brand-name`},tn={class:`brand-version`},nn=[`aria-label`],rn=[`href`],an=k(c({__name:`BrandEasterEgg`,props:{compact:{type:Boolean,default:!1}},setup(e){let t=e,c=j(null),u=j(null),p=j(0),m=j(!1),h=j(!1),_=j(!1),v=j(null),y=n(()=>v.value?.status===`ready`&&v.value.updateAvailable&&!!v.value.latestVersion),b=n(()=>v.value?.latestVersion??``),x=n(()=>v.value?.packageUrl??`https://www.npmjs.com/package/fuli-context`),C=new AbortController,w=!1,T;function E(){p.value+=1,m.value=!0,clearTimeout(T),t.compact&&(T=setTimeout(D,700))}function D(){m.value=!1}function k(){y.value&&(_.value=!_.value)}function N(e){w=!1,h.value=!1,_.value&&!c.value?.contains(e.target)&&(_.value=!1)}function P(e){e.key===`Tab`&&(w=!0),e.key===`Escape`&&_.value&&(e.preventDefault(),_.value=!1,f(()=>u.value?.focus()))}function F(){h.value=w}function I(){h.value=!1}return o(()=>{window.addEventListener(`pointerdown`,N,!0),window.addEventListener(`keydown`,P,!0),ue(`/api/system/version`,{signal:C.signal}).then(e=>{v.value=e}).catch(()=>{})}),d(()=>{clearTimeout(T),C.abort(),window.removeEventListener(`pointerdown`,N,!0),window.removeEventListener(`keydown`,P,!0)}),(e,n)=>(s(),r(`div`,{ref_key:`root`,ref:c,class:S([`brand-block`,{"is-compact":t.compact,"is-sparkling":m.value,"is-keyboard-focused":h.value}])},[M(`button`,{class:`brand-effect-button`,type:`button`,"aria-label":i(O)(`console.brandEffect.aria`),onClick:E,onFocus:F,onBlur:I},[M(`span`,Wt,[M(`img`,{class:`brand-mark`,src:i(Ae),alt:``,"aria-hidden":`true`},null,8,Gt),m.value?(s(),r(g,{key:0},[t.compact?a(``,!0):(s(),r(`span`,{key:`ripple-${p.value}`,class:`brand-ripple`,"aria-hidden":`true`}))],64)):a(``,!0)])],40,Ut),t.compact&&y.value?(s(),r(`button`,{key:0,ref_key:`versionButton`,ref:u,class:`brand-compact-update`,type:`button`,"aria-label":i(O)(`console.update.aria`,{version:b.value}),"aria-expanded":_.value,"aria-controls":`brand-update-details`,onClick:k},null,8,Kt)):a(``,!0),t.compact?a(``,!0):(s(),r(`span`,qt,[M(`span`,Jt,[M(`span`,Yt,l(i(O)(`common.brand`)),1),y.value?(s(),r(`button`,{key:0,ref_key:`versionButton`,ref:u,class:`brand-version-button`,type:`button`,"aria-label":i(O)(`console.update.aria`,{version:b.value}),"aria-expanded":_.value,"aria-controls":`brand-update-details`,onClick:k},[M(`span`,Zt,`v`+l(i(X)),1),n[0]||=M(`span`,{class:`brand-update-dot`,"aria-hidden":`true`},null,-1)],8,Xt)):(s(),r(`span`,Qt,`v`+l(i(X)),1))]),n[1]||=M(`span`,{class:`brand-subtitle`},`Context Graph`,-1),m.value?(s(),r(`span`,{key:`copy-reflection-${p.value}`,class:`brand-copy-reflection`,"aria-hidden":`true`,onAnimationend:A(D,[`self`])},[M(`span`,$t,[M(`span`,en,l(i(O)(`common.brand`)),1),M(`span`,tn,`v`+l(i(X)),1)])],32)):a(``,!0)])),_.value?(s(),r(`div`,{key:2,id:`brand-update-details`,class:`brand-update-popover`,role:`dialog`,"aria-label":i(O)(`console.update.title`,{version:b.value})},[M(`strong`,null,l(i(O)(`console.update.title`,{version:b.value})),1),M(`p`,null,l(i(O)(`console.update.copy`)),1),n[2]||=M(`code`,null,`fuli update --yes`,-1),M(`a`,{href:x.value,target:`_blank`,rel:`noopener noreferrer`},l(i(O)(`console.update.npmLink`)),9,rn)],8,nn)):a(``,!0)],2))}}),[[`__scopeId`,`data-v-f0649f93`]]),on=[`aria-label`],sn=[`src`],cn={key:0,class:`pinned-rail-name`},ln={key:1,class:`pinned-rail-error`,role:`alert`},un=k(c({__name:`PinnedAgentsRail`,props:{spaceId:{},expanded:{type:Boolean}},setup(e){let o=e,c=I(),u=n(()=>o.spaceId),d=fe(u),{records:f,error:m,load:h}=Pe(u,d.agentIds),_=n(()=>d.agentIds.value.map(e=>f.value[e]).filter(e=>e!==void 0)),v=n(()=>d.error.value||m.value),y=e=>c.path===Ne(o.spaceId,e);function C(){d.load({force:!0}),h({force:!0})}return(n,o)=>u.value&&_.value.length?(s(),r(`ul`,{key:0,class:S([`pinned-rail`,{"is-expanded":e.expanded}]),"aria-label":i(pe)(`navigation.title`,`pin`)},[(s(!0),r(g,null,p(_.value,n=>(s(),r(`li`,{key:n.agentId},[t(i(R),{class:S([`pinned-rail-link`,{"is-active":y(n.agentId)}]),to:i(Ne)(u.value,n.agentId),"aria-current":y(n.agentId)?`page`:void 0,"aria-label":`${i(U)(n)} · ${i(O)(`agentProfiles.profile`)}`,title:e.expanded?void 0:i(U)(n),"data-pinned-agent":n.agentId},{default:T(()=>[M(`span`,{class:`pinned-rail-portrait`,style:b(i(Me)(n.agentId)),"aria-hidden":`true`},[i(je)(n.agentId)?(s(),r(`img`,{key:0,src:i(je)(n.agentId),alt:``},null,8,sn)):(s(),r(g,{key:1},[x(l(n.profile.occupationEmoji||i(U)(n).slice(0,1)),1)],64))],4),e.expanded?(s(),r(`span`,cn,l(i(U)(n)),1)):a(``,!0)]),_:2},1032,[`class`,`to`,`aria-current`,`aria-label`,`title`,`data-pinned-agent`])]))),128))],10,on)):u.value&&e.expanded&&v.value?(s(),r(`div`,ln,[M(`span`,null,l(v.value),1),t(i(z),{variant:`ghost`,size:`sm`,onClick:C},{default:T(()=>[x(l(i(pe)(`retry`,`Retry`)),1)]),_:1})])):a(``,!0)}}),[[`__scopeId`,`data-v-0bebe48a`]]),dn=[`aria-label`,`data-expanded`],fn=[`title`],pn={key:0,class:`nav-rail-wordmark`},mn={class:`nav-rail-links`},hn={class:`nav-rail-label`},gn=[`aria-label`],_n=[`aria-label`],vn={class:`nav-rail-foot`},yn=[`title`],bn={key:0,class:`nav-rail-version`,"data-version":``},xn=`fuli.nav.expanded`,Sn=k(c({__name:`NavRail`,props:{destinations:{},activeKey:{},attentionCount:{},runtimeReady:{type:Boolean},spaceId:{}},setup(e){let n=e;function o(){try{return localStorage.getItem(xn)!==`0`}catch{return!0}}let c=j(o()),d=I(),f=[`taste`,`personality`,`judgment_preference`],m=e=>d.path===`/preferences`&&d.query.aspect===e,h=()=>!!n.spaceId&&d.path.startsWith(`/agents/${encodeURIComponent(n.spaceId)}/`),_=e=>c.value&&(e===`memory`&&f.some(m)||e===`agents`&&h());return D(c,e=>{try{localStorage.setItem(xn,e?`1`:`0`)}catch{}}),(n,o)=>(s(),r(`nav`,{class:S([`nav-rail`,{"is-expanded":c.value}]),"aria-label":i(O)(`shell.aria`),"data-expanded":c.value},[M(`div`,{class:`nav-rail-brand`,title:c.value?void 0:i(O)(`shell.brand`)},[t(an,{compact:``}),c.value?(s(),r(`span`,pn,l(i(O)(`shell.brand`)),1)):a(``,!0)],8,fn),M(`ul`,mn,[(s(!0),r(g,null,p(e.destinations,n=>(s(),r(`li`,{key:n.key},[t(i(R),{to:n.to,class:S([`nav-rail-link`,{"is-active":n.key===e.activeKey,"has-active-child":_(n.key)}]),"aria-current":n.key===e.activeKey?`page`:void 0,"aria-label":i(O)(`shell.destinations.${n.key}`),title:c.value?void 0:i(O)(`shell.destinations.${n.key}`),"data-destination":n.key},{default:T(()=>[t(i(ge),{name:n.icon,size:c.value?20:22},null,8,[`name`,`size`]),M(`span`,hn,l(i(O)(`shell.destinations.${n.key}`)),1),n.key===`chat`&&e.attentionCount?(s(),r(`span`,{key:0,class:`nav-rail-badge`,"aria-label":i(O)(`shell.attentionBadge`,{count:e.attentionCount}),"data-attention-badge":``},l(e.attentionCount>9?`9+`:e.attentionCount),9,gn)):a(``,!0)]),_:2},1032,[`to`,`class`,`aria-current`,`aria-label`,`title`,`data-destination`]),c.value&&n.key===`memory`?(s(),r(`ul`,{key:0,class:`nav-rail-sublinks`,"aria-label":i(O)(`shell.profileAria`)},[(s(),r(g,null,p(f,e=>M(`li`,{key:e},[t(i(R),{to:{path:`/preferences`,query:{aspect:e}},class:S([`nav-rail-sublink`,{"is-active":m(e)}]),"aria-current":m(e)?`page`:void 0,"data-aspect":e},{default:T(()=>[x(l(i(O)(`knowledge.domain.profiles.${e}`)),1)]),_:2},1032,[`to`,`class`,`aria-current`,`data-aspect`])])),64))],8,_n)):a(``,!0),n.key===`agents`?(s(),u(un,{key:1,"space-id":e.spaceId,expanded:c.value},null,8,[`space-id`,`expanded`])):a(``,!0)]))),128))]),M(`div`,vn,[M(`span`,{class:S([`nav-rail-runtime`,{"is-ready":e.runtimeReady}]),role:`status`,title:`${i(O)(e.runtimeReady?`shell.runtimeReady`:`shell.runtimeOffline`)} · v${i(X)}`},[o[1]||=M(`span`,{class:`nav-rail-runtime-dot`,"aria-hidden":`true`},null,-1),M(`span`,{class:S([`nav-rail-runtime-text`,{"is-visible":!e.runtimeReady}])},l(i(O)(e.runtimeReady?`shell.runtimeReady`:`shell.runtimeOffline`)),3),c.value&&e.runtimeReady?(s(),r(`span`,bn,`v`+l(i(X)),1)):a(``,!0)],10,yn),t(i(B),{class:`nav-rail-toggle`,icon:c.value?`chevron-left`:`chevron-right`,size:`sm`,label:i(O)(c.value?`shell.collapse`:`shell.expand`),"data-nav-toggle":``,onClick:o[0]||=e=>c.value=!c.value},null,8,[`icon`,`label`])])],10,dn))}}),[[`__scopeId`,`data-v-c3e9fba0`]]),Cn=[`aria-label`],wn=k(c({__name:`SectionTabs`,props:{sections:{},activeKey:{}},setup(e){return(t,n)=>e.sections.length>1?(s(),r(`nav`,{key:0,class:`section-tabs`,"aria-label":i(O)(`shell.sectionsAria`)},[(s(!0),r(g,null,p(e.sections,t=>(s(),u(i(R),{key:t.key,to:t.to,class:S([`section-tab`,{"is-active":t.key===e.activeKey}]),"aria-current":t.key===e.activeKey?`page`:void 0,"data-section":t.key},{default:T(()=>[x(l(i(O)(`shell.sections.${t.key}`)),1)]),_:2},1032,[`to`,`class`,`aria-current`,`data-section`]))),128))],8,Cn)):a(``,!0)}}),[[`__scopeId`,`data-v-dd883582`]]);function Tn({spaceId:e,publicProjects:t}){let n=Fe(e,`graph`),r=Ie(`personal`,e,`directory`);return[{key:`constellation`,icon:`constellation`,to:`/`,owns:[`/`],exact:!0,sections:[]},{key:`agents`,icon:`agents`,to:`/project-agents`,owns:[`/project-agents`,`/agents/`,`/employees/`],sections:[{key:`agentDirectory`,to:`/project-agents`,owns:[`/project-agents`,`/agents/`,`/employees/`]},{key:`orchestrate`,to:`/project-agents/manage`,owns:[`/project-agents/manage`]},{key:`schedules`,to:`/project-agents/schedules`,owns:[`/project-agents/schedules`]},{key:`occupations`,to:`/project-agents/occupations`,owns:[`/project-agents/occupations`]}]},{key:`chat`,icon:`chat`,to:`/roundtables`,owns:[`/roundtables`,`/inbox`],sections:[{key:`roundtables`,to:`/roundtables`,owns:[`/roundtables`]},{key:`askedYou`,to:`/inbox`,owns:[`/inbox`]}]},{key:`projects`,icon:`project`,to:n,owns:[`/personal/`,`/public-projects`],sections:[{key:`myProjects`,to:n,owns:[`/personal/`]},...t?[{key:`publicProjects`,to:`/public-projects`,owns:[`/public-projects`]}]:[]]},{key:`memory`,icon:`memory`,to:r,owns:[`/knowledge`,`/preferences`,`/organize`,`/tags`],sections:[{key:`knowledge`,to:r,owns:[`/knowledge`]},{key:`preferences`,to:`/preferences`,owns:[`/preferences`]},{key:`writing`,to:`/preferences/writing`,owns:[`/preferences/writing`]},{key:`organize`,to:`/organize`,owns:[`/organize`]},{key:`tags`,to:`/tags`,owns:[`/tags`]}]},{key:`settings`,icon:`settings`,to:`/settings`,owns:[`/settings`,`/connections`,`/about`],sections:[{key:`settings`,to:`/settings`,owns:[`/settings`]},{key:`connections`,to:`/connections`,owns:[`/connections`]},{key:`about`,to:`/about`,owns:[`/about`]}]}]}function En(e,t,n=!1){return e.some(e=>n||e===`/`?t===e:t===e||t.startsWith(e.endsWith(`/`)?e:`${e}/`))}function Dn(e,t){return e.find(e=>En(e.owns,t,e.exact))}function On(e,t){return e?.sections.filter(e=>En(e.owns,t)).sort((e,t)=>Math.max(...t.owns.map(e=>e.length))-Math.max(...e.owns.map(e=>e.length)))[0]}function kn(e){let t=e.meta.layout;return typeof t==`function`?t(e):t}var An={class:`app-frame`},jn=[`data-layout`],Mn={class:`app-topbar`},Nn={class:`app-topbar-inner`},Pn={class:`app-title`},Fn={class:`app-actions`},In={key:0,class:`app-feedback-row`},Ln=[`role`,`aria-live`],Rn=k(c({__name:`AppShell`,setup(c){let f=F(),p=I(),h=n(()=>f.activePersonalSpace?.id??``),g=n(()=>Tn({spaceId:h.value||`current`,publicProjects:f.state?.capabilities?.browsePublicProjects!==!1})),_=n(()=>Dn(g.value,p.path)),v=n(()=>On(_.value,p.path)),b=n(()=>Le.value.path===p.path?Le.value.text:``),x=n(()=>b.value||(_.value&&_.value.sections.length>1&&v.value&&!p.meta.detail?O(`shell.destinations.${_.value.key}`):Vt(p.meta.title,`routes.overview.title`))),C=n(()=>kn(p)),w=n(()=>p.meta.detail?[]:_.value?.sections??[]),E=n(()=>p.name!==`overview`&&p.path!==`/preferences`&&!p.path.startsWith(`/roundtables`)&&p.meta.saveBar!==!0);m(he,me(h));let k=ke();D(h,e=>k.setSpace(e),{immediate:!0});let A;function j(){document.visibilityState===`visible`&&!k.loading&&!k.open&&k.refresh()}function N(){f.refresh(),k.loading||k.refresh()}return o(()=>{f.runtimeStatus===`idle`&&f.refresh(),A=setInterval(j,3e4),document.addEventListener(`visibilitychange`,j)}),d(()=>{clearInterval(A),document.removeEventListener(`visibilitychange`,j),k.setSpace(``)}),y(()=>{p.fullPath,Ht(b.value||p.meta.title)}),(n,o)=>(s(),r(`div`,An,[t(Sn,{destinations:g.value,"active-key":_.value?.key,"attention-count":i(k).total,"runtime-ready":i(f).runtimeStatus===`ready`,"space-id":h.value},null,8,[`destinations`,`active-key`,`attention-count`,`runtime-ready`,`space-id`]),M(`main`,{class:`app-main`,"data-layout":C.value},[M(`header`,Mn,[M(`div`,Nn,[M(`h1`,Pn,l(x.value),1),t(wn,{sections:w.value,"active-key":v.value?.key},null,8,[`sections`,`active-key`]),M(`div`,Fn,[t(Bt),t(Be),t(i(B),{icon:`refresh`,label:i(O)(`common.actions.refresh`),disabled:i(f).runtimeStatus===`loading`,"data-shell-refresh":``,onClick:N},null,8,[`label`,`disabled`])])])]),t(We),i(f).feedback?(s(),r(`div`,In,[M(`div`,{class:S([`feedback feedback-message`,{success:i(f).feedback.tone===`success`}]),role:i(f).feedback.tone===`error`?`alert`:`status`,"aria-live":i(f).feedback.tone===`error`?`assertive`:`polite`},[M(`span`,null,l(i(f).feedback.message),1),t(i(B),{icon:`close`,size:`sm`,label:i(O)(`common.actions.close`),onClick:i(f).clearFeedback},null,8,[`label`,`onClick`])],10,Ln)])):a(``,!0),t(i(L),null,{default:T(({Component:t})=>[(s(),u(e(t)))]),_:1}),t(zt),t(et)],8,jn),E.value?(s(),u(Et,{key:0})):a(``,!0)]))}}),[[`__scopeId`,`data-v-37597d26`]]),zn=c({__name:`App`,setup(e){let t=I();return(e,n)=>i(t).meta.publicReport?(s(),u(i(L),{key:0})):(s(),u(Rn,{key:1}))}});function Bn(e){let t=e.match(/^#\/knowledge\/([^/?#]+)\/([^/?#]+)\/(entity|relationship)\/([^/?#]+)(?:\?([^#]*))?$/);if(!t)return null;let[,n,r,i,a,o]=t;return`/knowledge/${n}/${r}/directory/${i}/${a}${o?`?${o}`:``}`}var Vn=e=>e.params.threadId||e.params.chatId?`column`:`canvas`,Z=e=>e.params.mode===`overview`?`column`:`canvas`,Hn=new Set([`assistant`,`tonborg`]),Q=te({history:ee(`/`),routes:[{path:`/reports/jefa`,name:`shared-jefa-report`,component:()=>W(()=>import(`./SharedJefaReportPage-B54qEdIV.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28])),meta:{publicReport:!0,title:`employees.share.title`}},{path:`/roundtables/chat/:chatId`,name:`roundtable-chat`,component:()=>W(()=>import(`./RoundtablesPage-2Akxagrm.js`),__vite__mapDeps([29,1,30,8,2,31,3,4,5,32,33,34,35])),meta:{title:`routes.roundtable.title`,layout:Vn}},{path:`/roundtables/:threadId?`,name:`roundtables`,component:()=>W(()=>import(`./RoundtablesPage-2Akxagrm.js`),__vite__mapDeps([29,1,30,8,2,31,3,4,5,32,33,34,35])),meta:{title:`routes.roundtable.title`,layout:Vn}},{path:`/`,name:`overview`,component:()=>W(()=>import(`./OverviewPage-D5W-DhOz.js`),__vite__mapDeps([36,1,30,8,31,2,3,4,5,37,15,16,38,39,40,41,22,6,42,43,44,45,46,47,48,49])),meta:{title:`routes.overview.title`,layout:`column`}},{path:`/preferences`,name:`personal-profile`,component:()=>W(()=>import(`./PersonalProfilePage-CndOcRQ6.js`),__vite__mapDeps([50,1,30,8,2,3,4,5,11,9,10,12,13,14,15,16,17,18,19,20,21,51,52,41,53,42,54,55,56,57,58,59,44,60,61,62,63,64,65,66,67,68,69])),meta:{title:`routes.preferences.title`,layout:`column`}},{path:`/preferences/writing`,name:`writing-taste`,component:()=>W(()=>import(`./WritingTastePage-D-ELo7mh.js`),__vite__mapDeps([70,1,30,8,3,4,5,11,9,10,12,13,14,15,16,17,18,19,20,21,6,71,72,43,44,51,62,53,42,54,55,56,68,73])),meta:{title:`routes.writingTaste.title`,layout:`column`}},{path:`/personal/:spaceId/projects/:projectId/:mode/:itemKind/:itemId`,name:`personal-project-item`,component:()=>W(()=>import(`./PersonalProjectsPage-CXBOwEqC.js`),__vite__mapDeps([74,1,30,8,3,4,5,58,59,44,60,61,9,10,75,37,53,42,76,2,31,77,78,79,11,12,13,14,15,16,17,18,19,20,21,41,80,51,81,52,62,82,40,83,84,85,86,55,87,88,54,56,57,63,64,89,90,91])),meta:{title:`routes.personalProjects.title`,layout:Z}},{path:`/personal/:spaceId/projects/:mode/:itemKind/:itemId`,name:`personal-projects-item`,component:()=>W(()=>import(`./PersonalProjectsPage-CXBOwEqC.js`),__vite__mapDeps([74,1,30,8,3,4,5,58,59,44,60,61,9,10,75,37,53,42,76,2,31,77,78,79,11,12,13,14,15,16,17,18,19,20,21,41,80,51,81,52,62,82,40,83,84,85,86,55,87,88,54,56,57,63,64,89,90,91])),meta:{title:`routes.personalProjects.title`,layout:Z,description:`routes.personalProjects.description`}},{path:`/personal/:spaceId/projects/:mode`,name:`personal-projects`,component:()=>W(()=>import(`./PersonalProjectsPage-CXBOwEqC.js`),__vite__mapDeps([74,1,30,8,3,4,5,58,59,44,60,61,9,10,75,37,53,42,76,2,31,77,78,79,11,12,13,14,15,16,17,18,19,20,21,41,80,51,81,52,62,82,40,83,84,85,86,55,87,88,54,56,57,63,64,89,90,91])),meta:{title:`routes.personalProjects.title`,layout:Z,description:`routes.personalProjects.description`}},{path:`/personal/:spaceId/projects/:projectId/:mode`,name:`personal-project`,component:()=>W(()=>import(`./PersonalProjectsPage-CXBOwEqC.js`),__vite__mapDeps([74,1,30,8,3,4,5,58,59,44,60,61,9,10,75,37,53,42,76,2,31,77,78,79,11,12,13,14,15,16,17,18,19,20,21,41,80,51,81,52,62,82,40,83,84,85,86,55,87,88,54,56,57,63,64,89,90,91])),meta:{title:`routes.personalProjects.title`,layout:Z}},{path:`/organize`,name:`knowledge-organizer`,component:()=>W(()=>import(`./KnowledgeOrganizerPage-CRC3mk0j.js`),__vite__mapDeps([92,1,30,8,3,4,5,11,9,10,12,13,14,15,16,17,18,19,20,21,80,59,44,51,55,87,88,53,42,54,56,57,58,60,61,62,63,64,65,66,2,67,93])),meta:{title:`routes.organizer.title`,layout:`canvas`}},{path:`/project-agents`,name:`project-agents`,component:()=>W(()=>import(`./AgentsDirectoryPage-xwIRrNb8.js`),__vite__mapDeps([94,1,30,8,2,31,3,4,5,58,59,44,60,61,9,10,95,37,13,14,15,16,96,32,40,47,97,41,43,82,83,98,99,46,100,101,84,102,103,75,104,66,67,105,42,85,12,86,106,107,39,24,25,108,109])),meta:{title:`routes.projectAgents.title`,layout:`canvas`}},{path:`/agents/:spaceId/:agentId`,name:`agent-profile`,component:()=>W(()=>import(`./AgentProfilePage-DH54S93r.js`),__vite__mapDeps([110,1,30,8,2,31,3,4,5,77,59,44,78,79,111,11,9,10,12,13,14,15,16,17,18,19,20,21,96,32,40,47,97,41,112,6,43,33,62,82,83,99,98,113,114,34,115,46,37,100,101,84,48,42,102,116])),meta:{title:`agentProfiles.profile`,layout:`column`,detail:!0}},{path:`/project-agents/occupations`,name:`occupations`,component:()=>W(()=>import(`./OccupationsPage-CnSp6362.js`),__vite__mapDeps([117,1,30,8,3,4,5,58,59,44,60,61,9,10,75,11,12,13,14,15,16,17,18,19,20,21,43,99,66,2,67,118,119,120])),meta:{title:`occupations.title`,layout:`canvas`}},{path:`/project-agents/schedules`,name:`task-schedules`,component:()=>W(()=>import(`./TaskSchedulesPage-Cxjqc8XQ.js`),__vite__mapDeps([121,1,30,8,2,3,4,5,44,58,59,60,61,9,10,122,123,78,124,75,11,12,13,14,15,16,17,18,19,20,21,47,43,48,42,66,67,106,118,119,125])),meta:{title:`taskSchedules.title`,layout:`canvas`}},{path:`/project-agents/manage`,name:`agent-management`,component:()=>W(()=>import(`./ProjectAgentsPage-Y6qCYRZj.js`),__vite__mapDeps([126,1,30,8,2,31,3,4,5,58,59,44,60,61,9,10,14,15,16,96,32,40,47,43,100,101,48,42,102,46,37,103,95,75,98,99,104,66,67,107,12,39,41,24,25,108,127,128,129])),meta:{title:`shell.sections.orchestrate`,layout:`canvas`}},{path:`/project-agents/manage/:spaceId/:agentId`,name:`agent-management-detail`,component:()=>W(()=>import(`./ProjectAgentDetailPage-SmZ2NYTw.js`),__vite__mapDeps([130,1,30,8,2,31,3,4,5,77,59,44,78,79,111,12,15,16,96,32,40,47,112,6,42,43,33,113,114,34,115,46,37,100,101,48,102,107,39,41,24,25,108,127,128,131])),meta:{title:`projectAgents.pageTitle`,layout:`column`,detail:!0}},{path:`/employees/:templateId`,name:`employee-workbench`,component:()=>W(()=>import(`./EmployeeWorkbenchPage-0oK2RfIh.js`),__vite__mapDeps([132,1,30,8,2,31,3,4,5,77,59,44,78,79,111,9,10,37,12,14,15,16,96,40,112,42,23,43,80,33,82,83,100,101,48,47,67,105,85,86,106,107,39,41,24,25,108,26,7,11,13,17,18,19,20,21,22,27,133,134])),meta:{title:`routes.employeeWorkbench.title`,layout:e=>Hn.has(String(e.params.templateId))?`column`:`canvas`,detail:!0}},{path:`/public-projects`,name:`public-projects`,component:()=>W(()=>import(`./PublicProjectsPage-C63vW9UZ.js`),__vite__mapDeps([135,1,30,8,2,3,4,5,58,59,44,60,61,9,10,75,12,15,16,41,6,72,42,43,66,67,55,53,136])),meta:{title:`routes.publicProjects.title`,description:`routes.publicProjects.description`,layout:`column`}},{path:`/knowledge`,name:`knowledge-default`,component:()=>W(()=>import(`./KnowledgePage-NsKFUWth.js`),__vite__mapDeps([137,1,76,30,8,2,31,3,4,5,77,59,44,78,79,37,11,9,10,12,13,14,15,16,17,18,19,20,21,41,80,51,81,52,62,82,40,83,84,85,86,55,87,88,53,42,54,56,57,58,60,61,63,64,89,90])),meta:{title:`routes.knowledge.title`,layout:`canvas`}},{path:`/knowledge/item/:spaceId/:itemKind(entity|relationship)/:itemId`,name:`knowledge-item-edit`,component:()=>W(()=>import(`./KnowledgeItemEditPage-C0Y2DsHz.js`),__vite__mapDeps([138,1,30,8,2,31,3,4,5,59,44,58,60,61,9,10,139,140,78,79,75,13,15,16,112,6,71,72,42,43,80,51,141,142,143,33,52,41,144,66,67,145,146,147,123,148,19,20])),meta:{title:`routes.knowledgeItem.title`,layout:`form`,detail:!0}},{path:`/s/:sessionId`,name:`session-records`,component:()=>W(()=>import(`./SessionRecordsPage-DIc2GoCQ.js`),__vite__mapDeps([149,1,30,8,2,31,3,4,5,58,59,44,60,61,9,10,75,43,51,52,41,144,42,150,66,67,146,140,78,79,147,123,6,80,142,143,148,19,20])),meta:{title:`routes.sessionRecords.title`,layout:`column`,detail:!0}},{path:`/s/:sessionId/migrate`,name:`session-migration`,component:()=>W(()=>import(`./SessionMigrationPage-B5r2PWCF.js`),__vite__mapDeps([151,1,30,8,2,31,3,4,5,140,59,44,78,79,9,10,43,80,51,142,143,33,52,41,144,42,150])),meta:{title:`routes.sessionMigration.title`,layout:`form`,detail:!0}},{path:`/tags`,name:`tags`,component:()=>W(()=>import(`./TagVocabularyPage-BIsHYk2i.js`),__vite__mapDeps([152,1,30,8,2,3,4,5,140,59,44,78,79,9,10,61,60,124,58,139,77,75,42,43,80,51,81,141,142,143])),meta:{title:`routes.tags.title`,layout:`canvas`}},{path:`/knowledge/turn/:spaceId`,name:`knowledge-turn-receipt`,component:()=>W(()=>import(`./KnowledgeTurnReceiptPage-Dl0KeFDe.js`),__vite__mapDeps([153,1,2,31,3,4,5,43,44,51,52,8,41,145,148,19,9,10,20,6])),meta:{title:`routes.knowledgeTurn.title`,layout:`form`,detail:!0}},{path:`/knowledge/:scope/:spaceId/:projectId/:mode/:itemKind/:itemId`,name:`project-knowledge-item`,component:()=>W(()=>import(`./KnowledgePage-NsKFUWth.js`),__vite__mapDeps([137,1,76,30,8,2,31,3,4,5,77,59,44,78,79,37,11,9,10,12,13,14,15,16,17,18,19,20,21,41,80,51,81,52,62,82,40,83,84,85,86,55,87,88,53,42,54,56,57,58,60,61,63,64,89,90])),meta:{title:`routes.knowledge.title`,layout:`canvas`}},{path:`/knowledge/:scope/:spaceId/:mode/:itemKind/:itemId`,name:`knowledge-item`,component:()=>W(()=>import(`./KnowledgePage-NsKFUWth.js`),__vite__mapDeps([137,1,76,30,8,2,31,3,4,5,77,59,44,78,79,37,11,9,10,12,13,14,15,16,17,18,19,20,21,41,80,51,81,52,62,82,40,83,84,85,86,55,87,88,53,42,54,56,57,58,60,61,63,64,89,90])),meta:{title:`routes.knowledge.title`,layout:`canvas`}},{path:`/knowledge/:scope/:spaceId/:projectId/:mode`,name:`project-knowledge`,component:()=>W(()=>import(`./KnowledgePage-NsKFUWth.js`),__vite__mapDeps([137,1,76,30,8,2,31,3,4,5,77,59,44,78,79,37,11,9,10,12,13,14,15,16,17,18,19,20,21,41,80,51,81,52,62,82,40,83,84,85,86,55,87,88,53,42,54,56,57,58,60,61,63,64,89,90])),meta:{title:`routes.knowledge.title`,layout:`canvas`}},{path:`/knowledge/:scope/:spaceId/:mode`,name:`knowledge`,component:()=>W(()=>import(`./KnowledgePage-NsKFUWth.js`),__vite__mapDeps([137,1,76,30,8,2,31,3,4,5,77,59,44,78,79,37,11,9,10,12,13,14,15,16,17,18,19,20,21,41,80,51,81,52,62,82,40,83,84,85,86,55,87,88,53,42,54,56,57,58,60,61,63,64,89,90])),meta:{title:`routes.knowledge.title`,layout:`canvas`}},{path:`/inbox`,name:`inbox`,component:()=>W(()=>import(`./InboxPage-CTQ425Ez.js`),__vite__mapDeps([154,1,30,8,2,31,3,4,5,58,59,44,60,61,9,10,39,97,47,43,62,66,67,155])),meta:{title:`attention.title`,layout:`canvas`}},{path:`/review`,redirect:`/public-projects`},{path:`/connections`,name:`connections`,component:()=>W(()=>import(`./ConnectionsPage-Yf4UvjDT.js`),__vite__mapDeps([156,1,30,8,3,4,5,15,16,6,72,43,44,62,118,119,55])),meta:{title:`routes.connections.title`,description:`routes.connections.description`,layout:`form`}},{path:`/settings`,name:`settings`,component:()=>W(()=>import(`./SettingsPage-BAxKpnBx.js`),__vite__mapDeps([157,1,30,8,2,3,4,5,140,59,44,78,79,9,10,147,123,139,61,77,111,37,114,15,16,17,18,6,71,72,42,62,133,63,89,158])),meta:{title:`routes.settings.title`,layout:`form`,saveBar:!0}},{path:`/settings/models`,name:`model-settings`,component:()=>W(()=>import(`./ModelSettingsPage-Bz1tMXtW.js`),__vite__mapDeps([159,1,30,8,31,2,3,4,5,140,59,44,78,79,9,10,147,123,143,11,12,13,14,15,16,17,18,19,20,21,97,47,42,43,80,142,33,82,40,83,67,160,106,26,161])),meta:{title:`modelSettings.title`,layout:`form`,detail:!0}},{path:`/settings/data-format`,name:`data-format`,component:()=>W(()=>import(`./DataFormatPage-BPuUH0PG.js`),__vite__mapDeps([162,1,3,4,5,140,59,44,78,79,9,10,143,11,12,13,14,15,16,17,18,19,20,21,6,71,72,43,33,2,31,160,8,106,163])),meta:{title:`dataFormat.title`,layout:`form`,detail:!0}},{path:`/capture-change/:previewId`,name:`capture-change`,component:()=>W(()=>import(`./CaptureChangePage-DWdz9dEk.js`),__vite__mapDeps([164,1,30,8,2,31,3,4,5,37,6,71,72,42,165])),meta:{title:`capture.confirm.title`,layout:`form`,detail:!0}},{path:`/about`,name:`about`,component:()=>W(()=>import(`./AboutPage-D0dTwKq8.js`),__vite__mapDeps([166,1,167,168])),meta:{title:`routes.about.title`,layout:`form`}},{path:`/:pathMatch(.*)*`,name:`not-found`,component:()=>W(()=>import(`./NotFoundPage-TfZ2eoA2.js`),__vite__mapDeps([169,1,31,2,3,4,5,6])),meta:{title:`common.errors.pageNotFound`,layout:`form`}}],scrollBehavior:(e,t,n)=>n??(e.path!==t.path&&{top:0})});Ve(Q),Q.beforeEach(e=>e.path!==`/`||typeof window>`u`?!0:Bn(window.location.hash)??!0),Q.afterEach(e=>{Ht(e.meta.title)}),Ce(),ot();var $=_(zn);$.use(P()),$.use(v),$.use(Q),await Q.isReady().catch(()=>void 0),$.mount(`#app`);
@@ -9,7 +9,7 @@
9
9
  />
10
10
  <link rel="icon" type="image/png" href="/assets/fuli-logo-ER1wQ8Kk.png" />
11
11
  <title>复利 · Context Graph</title>
12
- <script type="module" crossorigin src="/assets/index-BpQe3IT5.js"></script>
12
+ <script type="module" crossorigin src="/assets/index-CsXqY09Q.js"></script>
13
13
  <link rel="modulepreload" crossorigin href="/assets/_plugin-vue_export-helper-RegzAV-H.js">
14
14
  <link rel="modulepreload" crossorigin href="/assets/client-DAoXcTUz.js">
15
15
  <link rel="modulepreload" crossorigin href="/assets/console-DiNe1hFP.js">
Binary file
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "fuli-context",
3
- "version": "0.21.0-beta.2",
3
+ "version": "0.21.0-beta.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "fuli-context",
9
- "version": "0.21.0-beta.2",
9
+ "version": "0.21.0-beta.3",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "@a2a-js/sdk": "1.3.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fuli-context",
3
- "version": "0.21.0-beta.2",
3
+ "version": "0.21.0-beta.3",
4
4
  "description": "Local-first collaboration relationship graph for AI agents.",
5
5
  "type": "module",
6
6
  "files": [
@@ -49,8 +49,9 @@ export async function claudeLifecycleOutput(event, input, invoke, { delivery, cu
49
49
  throw new TypeError('Claude lifecycle requires a host session identifier');
50
50
  }
51
51
  const source = { sourceApplication: 'claude_code', sourceSessionId: sessionId };
52
- if (PREFERENCE_RESET_EVENTS.includes(event)) return preferenceLifecycleOutput(event, input,
53
- { sourceApplication: 'claude_code', delivery, currentTask, invoke, replayedSources: CLAUDE_REPLAYED_SOURCES });
52
+ if (PREFERENCE_RESET_EVENTS.includes(event)) return withinInlineLimit(event, input, await preferenceLifecycleOutput(event, input,
53
+ { sourceApplication: 'claude_code', delivery, currentTask, invoke, replayedSources: CLAUDE_REPLAYED_SOURCES,
54
+ inlineChars: CLAUDE_ENTRY_INLINE_CHARS }));
54
55
  if (event === 'UserPromptSubmit') {
55
56
  if (typeof input.cwd !== 'string' || !input.cwd.trim() || typeof input.prompt !== 'string') {
56
57
  throw new TypeError('Claude task entry requires cwd and prompt');
@@ -59,19 +60,32 @@ export async function claudeLifecycleOutput(event, input, invoke, { delivery, cu
59
60
  const off = await entryRefusal?.();
60
61
  if (off) return { hookSpecificOutput: { hookEventName: event, additionalContext: sessionFuliOffContext(off) } };
61
62
  const basis = inPlaceRefreshBasis(input);
62
- if (basis) return claudeRefreshOutput(event, input, invoke, { delivery, currentTask, onCurrentTask }, basis);
63
+ if (basis) return withinInlineLimit(event, input,
64
+ await claudeRefreshOutput(event, input, invoke, { delivery, currentTask, onCurrentTask }, basis));
63
65
  const context = await invoke('begin_task_context', {
64
66
  sessionId, projectPath: input.cwd, taskPrompt: input.prompt.slice(0, 8192), ...source, ...taskSceneInput(input.prompt)
65
67
  });
66
68
  const entry = compactTaskContext(context);
67
- return preferenceHookOutput(entry, event, input, delivery, 'claude_code',
69
+ return withinInlineLimit(event, input, await preferenceHookOutput(entry, event, input, delivery, 'claude_code',
68
70
  'Fuli task context. Apply effective_preferences. ' + taskClosingInstruction(entry) + PASS_TASK_TOKEN + TASK_RULES_ON_DEMAND,
69
- false, { inlineChars: CLAUDE_ENTRY_INLINE_CHARS });
71
+ false, { inlineChars: CLAUDE_ENTRY_INLINE_CHARS }));
70
72
  }
71
73
  const check = await invoke('verify_task_checkpoint', { sessionId, ...source });
72
74
  return stopHookOutcome(check, invoke, source);
73
75
  }
74
76
 
77
+ // The last guard of the inline limit (rec#11 D-72): a context the bounded
78
+ // fit could not bring under it, not even as its blocked frame, is never sent;
79
+ // the turn gets the unavailable output instead.
80
+ function withinInlineLimit(event, input, output) {
81
+ const text = output?.hookSpecificOutput?.additionalContext;
82
+ return typeof text === 'string' && text.length > CLAUDE_ENTRY_INLINE_CHARS
83
+ ? claudeLifecycleUnavailable(event, input, INLINE_LIMIT_UNAVAILABLE) : output;
84
+ }
85
+
86
+ const INLINE_LIMIT_UNAVAILABLE = 'Fuli task context does not fit Claude Code\'s inline limit, not even as a blocked frame; '
87
+ + 'memory recovery and task checkpoint are not verified. Continue with the user request and use Fuli MCP when it becomes available.';
88
+
75
89
  // A turn whose task transition cannot be proven re-reads the current task in
76
90
  // place (rec#15, unresolved-turns.js). The installed hook holds the turn as
77
91
  // unresolved before any of this (runClaudeLifecycleHook); onCurrentTask names
@@ -189,9 +203,9 @@ const CLAUDE_TRANSCRIPT = Object.freeze({ normalize: normalizeClaudeRecord, veri
189
203
  // Claude Code's policy for unresolved turns (unresolved-turns.js): a
190
204
  // successful checkpoint_task_knowledge with the task's token in the turn,
191
205
  // recorded by the host, proves the turn that task's (turn-ownership.js), and
192
- // the model is told exactly that.
206
+ // the model is told exactly that. The refreshed context is bounded like an entry.
193
207
  const CLAUDE_UNRESOLVED_TURNS = Object.freeze({
194
- sourceApplication: 'claude_code', adapter: CLAUDE_TRANSCRIPT,
208
+ sourceApplication: 'claude_code', adapter: CLAUDE_TRANSCRIPT, inlineChars: CLAUDE_ENTRY_INLINE_CHARS,
195
209
  resolution: 'The current task context of this session follows for reference, refreshed now. Its taskContextToken '
196
210
  + 'is not this turn\'s confirmed task. This turn becomes that task\'s only by a successful checkpoint_task_knowledge with '
197
211
  + 'that token in this turn, which you should make only if you know this turn continues that task\'s own work.',
@@ -3,24 +3,30 @@
3
3
  // A call that carries its task token is decided by that session; without one
4
4
  // it may be refused while another session of the client is off (rec#5 C3b).
5
5
  export const PASS_TASK_TOKEN = 'Pass taskContextToken to every FULI call. ';
6
- export const TASK_RULES_ON_DEMAND = 'Shared rules are referenced by version. Do not read fuli://rules/task-entry for an ordinary task; read one referenced section only when you must act on it (workers, memory merge, conflicts).';
6
+ export const TASK_RULES_ON_DEMAND = 'Shared rules are referenced by version. Do not read fuli://rules/task-entry for an ordinary task; read one referenced section only when you must act on it (workers, Agent choices, board writes, memory merge, conflicts).';
7
7
 
8
8
  // How a hook-delivered task ends, in the entry's own label (rec#47 F1). The
9
- // entry only references the checkpoint and receipt rules, and a host may keep
10
- // just a preview of a long entry, so the label carries the token and receipt.
11
- // The Stop hook closes a task whose entry has checkpoint_guidance
12
- // (stop-auto-close.js); a required checkpoint is left to the model.
9
+ // entry only references the checkpoint and receipt rules, so the label says
10
+ // what to do with its fields. It names them rather than repeating their values:
11
+ // the whole context reaches the model, also on a host that keeps only a
12
+ // preview of a longer one, as Claude Code's entry is bounded to it
13
+ // (entry-inline-budget.js, rec#11 D-72). The Stop hook closes a task whose
14
+ // entry has checkpoint_guidance (stop-auto-close.js); a required checkpoint is
15
+ // left to the model.
13
16
  export function taskClosingInstruction(entry) {
14
- const token = entry?.taskContextToken;
15
- if (typeof token !== 'string') return '';
16
- const call = `checkpoint_task_knowledge with taskContextToken ${JSON.stringify(token)}`;
17
+ if (typeof entry?.taskContextToken !== 'string') return '';
18
+ const call = 'checkpoint_task_knowledge with this taskContextToken';
17
19
  const checkpoint = entry.checkpoint_required === true ? `Before your final reply, call ${call}. `
18
20
  : entry.checkpoint_guidance ? `The Stop hook closes this task. Call ${call} only when something is worth recording `
19
21
  + '(knowledge, experience, memory changes, collaborators, a meaningful workLog). ' : '';
20
- const receipt = entry.agent_receipt?.required === true && typeof entry.agent_receipt.markdown === 'string'
21
- ? `End your final reply with this agent_receipt markdown, unchanged and once: ${JSON.stringify(entry.agent_receipt.markdown)} `
22
+ return checkpoint + taskReceiptInstruction(entry);
23
+ }
24
+
25
+ // The receipt sentence alone: a blocked frame keeps it too (preference-lifecycle.js).
26
+ export function taskReceiptInstruction(entry) {
27
+ return entry?.agent_receipt?.required === true && typeof entry.agent_receipt.markdown === 'string'
28
+ ? 'End your final reply with agent_receipt.markdown, unchanged and once '
22
29
  + '(a receipt returned by checkpoint_task_knowledge replaces it). ' : '';
23
- return checkpoint + receipt;
24
30
  }
25
31
 
26
32
  const DEFAULT_MAX_BYTES = 8_000;
@@ -1,5 +1,6 @@
1
1
  import { entryBudgets as budgets, entryTimeBelow } from './entry-time.js';
2
2
  import { managementContextView, receiptView } from './task-context-view.js';
3
+ import { ruleTextView } from './entry-rules.js';
3
4
 
4
5
  // A built-in Agent's model hint (Astro, Jefa) may take its 3 s model decision
5
6
  // plus a few Provider reads; with less than this left the entry goes without.
@@ -78,7 +79,8 @@ export function partialEntryText(budget) {
78
79
  // Bounded parts the entry built before the deadline, in their entry view.
79
80
  function builtParts({ agent_receipt: receipt, project_management_context: management, task_knowledge_recall: recall }) {
80
81
  return { ...(receipt ? { agent_receipt: receiptView(receipt) } : {}),
81
- ...(management ? { project_management_context: management.managers ? managementContextView(management) : management } : {}),
82
+ ...(management ? { project_management_context: management.managers
83
+ ? managementContextView(management, guidance => ruleTextView(guidance, 'manager_guidance')) : management } : {}),
82
84
  ...(recall ? { task_knowledge_recall: recall } : {}) };
83
85
  }
84
86
 
@@ -1,6 +1,9 @@
1
1
  import { copyPreferenceScope, entryWorkKind } from './preference-snapshot.js';
2
2
  import { preferenceAlwaysInline, preferenceNamesWorkKind, preferenceSceneReplaceable } from '../graphiti/preference-task-scope.js';
3
- import { blockedByDeliveryBudget } from '../mcp/preference-delivery.js';
3
+ import { blockedByDeliveryBudget, blockedPreferenceDelivery } from '../mcp/preference-delivery.js';
4
+
5
+ // The blocked reason of an entry that does not fit its host's inline limit.
6
+ const INLINE_BUDGET = 'inline_budget';
4
7
 
5
8
  // A task entry bounded to the inline limit of the host that shows it (rec#11
6
9
  // D-54). An Agent adapter whose host keeps only a preview of a longer hook
@@ -13,6 +16,10 @@ export const ALWAYS_INLINE_OMITTED_LABEL = 'Hard rules are among them (preferenc
13
16
  + 'if they are not already in this conversation, read the omitted ones once with read_task_preferences before acting; '
14
17
  + 'they stay in force.';
15
18
 
19
+ // Added when the active conflicts are left out (D-72).
20
+ export const OMITTED_CONFLICTS_LABEL = 'Unresolved preference conflicts apply that this entry does not list (active_conflicts_omitted): '
21
+ + 'read them with read_task_preferences before acting where one may apply, and apply no alternative until it is resolved.';
22
+
16
23
  // The default: the entry as it is.
17
24
  export const WHOLE_ENTRY = (value, { deliver }) => deliver(value);
18
25
 
@@ -30,20 +37,31 @@ export function fitUncached(fit, value, render) {
30
37
  // An entry that fits is unchanged. Otherwise, in this order:
31
38
  // 1. the automatic recall becomes a pointer to its search, then the recent
32
39
  // conversation drops its oldest messages, as the Provider's own window does;
33
- // 2. then preferences go, lowest ranked first. Closing fields, identity,
34
- // role, authority, conflicts and everything outside effective_preferences
35
- // stay; so do hard rules (preferenceAlwaysInline). The rest rank by kind
36
- // and task scene: a boundary a scene switch never revokes first, then an
37
- // item whose own scene key names the task's work kind, then human-confirmed
38
- // before agent-confirmed, then the Provider's order. The set is the largest
39
- // ranked prefix whose complete frame fits with the leanest context, so the
40
- // same preferences select the same set on the next turn, and a delta follows;
41
- // 3. then as much recall and conversation as still fits comes back.
40
+ // 2. then preferences go, lowest ranked first, except hard rules
41
+ // (preferenceAlwaysInline). The rest rank by kind and task scene: a
42
+ // boundary a scene switch never revokes first, then an item whose own scene
43
+ // key names the task's work kind, then human-confirmed before
44
+ // agent-confirmed, then the Provider's order. The set is the largest ranked
45
+ // prefix whose complete frame fits with the leanest context of step 1, so
46
+ // the same preferences select the same set on the next turn, and a delta
47
+ // follows;
48
+ // 3. where even the hard rules do not fit beside the rest, the entry's details
49
+ // give way to them, one at a time, each to a count or preview with its
50
+ // reader (D-72, detailLevels): the working-memory previews (global layer
51
+ // first; each keeps its revision), the directory snapshot, the team roster,
52
+ // the managers' details and then the active conflicts. The role is never
53
+ // cut. The ranked preferences are bounded beside the hard rules at the
54
+ // first detail level where those fit;
55
+ // 4. then as much recall and conversation as still fits comes back, and each
56
+ // reduced detail on its own while it fits, the last reduced first.
42
57
  // What is left out is named by count with its reader. If the hard rules alone
43
- // are over the limit (D-69), they are bounded the same way, as the largest
44
- // prefix by scope (Agent, project, global) and then the Provider's order, and
45
- // the omission says so (includes_always_inline): past Claude Code's preview
46
- // they were never seen.
58
+ // are still over the limit (D-69), they are bounded the same way, as the
59
+ // largest prefix by scope (Agent, project, global) and then the Provider's
60
+ // order, and the omission says so (includes_always_inline): past Claude
61
+ // Code's preview they were never seen. Closing fields and identity always
62
+ // stay. An entry that does not fit even so is never sent past the limit: it is
63
+ // the blocked frame (inline_budget) that keeps the token, closing fields and
64
+ // identity and recovers through read_task_preferences.
47
65
  export function inlineEntryFit(limit, length) {
48
66
  return (value, { deliver, complete }) => {
49
67
  // A frame the renderer blocked as over its own delivery budget is short,
@@ -58,27 +76,41 @@ export function inlineEntryFit(limit, length) {
58
76
  }
59
77
  const preferences = Array.isArray(value.effective_preferences) ? value.effective_preferences : [];
60
78
  const { kept, ranked } = inlineRanking(preferences, entryWorkKind(value));
61
- const leanestFits = selected => fits(complete(withPreferences(levels.at(-1), selected, preferences.length)));
62
- // What the search may leave out: the ranked rest after every hard rule,
63
- // or the hard rules themselves when they alone do not fit.
64
- const [fixed, order] = !kept.length || leanestFits(new Set(kept)) ? [kept, ranked] : [[], kept];
65
- if (!order.length) return deliver(levels.at(-1));
79
+ const leanest = levels.at(-1);
80
+ const steps = detailSteps(leanest);
81
+ const bounded = [...levels, ...steps.map((_, index) => reducedDetails(leanest, steps.slice(0, index + 1)))];
82
+ const fitsAt = (level, selected) => fits(complete(withPreferences(level, selected, preferences.length)));
83
+ // The richest level where every hard rule fits, and what the search may
84
+ // leave out there: the ranked rest. Where none fits, the hard rules
85
+ // themselves at the leanest level.
86
+ const base = bounded.slice(levels.length - 1).find(level => fitsAt(level, new Set(kept)));
87
+ const [level, fixed, order] = base ? [base, kept, ranked] : [bounded.at(-1), [], kept.length ? kept : ranked];
88
+ const richer = bounded.slice(0, bounded.indexOf(level) + 1);
66
89
  const selection = count => new Set([...fixed, ...order.slice(0, count)]);
67
- // At least one item of `order` is left out: with all of them nothing fit.
90
+ // The largest prefix of `order` that fits; at a detail level that may be all of it.
68
91
  let low = 0;
69
- let high = order.length - 1;
92
+ let high = order.length;
70
93
  while (low < high) {
71
94
  const middle = Math.ceil((low + high) / 2);
72
- if (leanestFits(selection(middle))) low = middle;
95
+ if (fitsAt(level, selection(middle))) low = middle;
73
96
  else high = middle - 1;
74
97
  }
75
- const selected = selection(low);
76
- let attempt;
77
- for (const level of levels) {
78
- attempt = deliver(withPreferences(level, selected, preferences.length));
79
- if (fits(attempt)) return attempt;
98
+ const frame = candidate => low === order.length ? candidate : withPreferences(candidate, selection(low), preferences.length);
99
+ for (const [index, candidate] of richer.entries()) {
100
+ const attempt = deliver(frame(candidate));
101
+ if (!fits(attempt)) continue;
102
+ // A detail level reduces every detail before its own; each of them
103
+ // comes back on its own while it fits, the last reduced first.
104
+ let reduced = steps.slice(0, Math.max(0, index - levels.length + 1));
105
+ let best = attempt;
106
+ for (const step of [...reduced].reverse()) {
107
+ const without = reduced.filter(item => item !== step);
108
+ const restored = deliver(frame(reducedDetails(leanest, without)));
109
+ if (fits(restored)) [reduced, best] = [without, restored];
110
+ }
111
+ return best;
80
112
  }
81
- return attempt;
113
+ return deliver(blockedPreferenceDelivery(value, INLINE_BUDGET));
82
114
  };
83
115
  }
84
116
 
@@ -101,8 +133,17 @@ function inlineRanking(preferences, workKind) {
101
133
  return { kept, ranked };
102
134
  }
103
135
 
136
+ // A frame that leaves preferences or conflicts out is not the complete set a
137
+ // reader's result (read_task_preferences, behind a restore or refresh)
138
+ // declares, so those claims go. preferences_complete is not set false, which
139
+ // would make it a blocked frame.
140
+ function withoutCompleteClaims(value) {
141
+ const { preferences_complete: _complete, same_task_recovery_available: _recovery, preference_delivery: delivery, ...rest } = value;
142
+ return { ...rest, ...(delivery && delivery.status !== 'complete' ? { preference_delivery: delivery } : {}) };
143
+ }
144
+
104
145
  function withPreferences(level, selected, total) {
105
- return copyPreferenceScope(level, { ...level,
146
+ return copyPreferenceScope(level, { ...withoutCompleteClaims(level),
106
147
  effective_preferences: level.effective_preferences.filter((_, index) => selected.has(index)),
107
148
  preferences_omitted: { count: total - selected.size,
108
149
  ...(level.effective_preferences.some((item, index) => !selected.has(index) && preferenceAlwaysInline(item))
@@ -132,6 +173,64 @@ function contextLevels(value) {
132
173
  return levels;
133
174
  }
134
175
 
176
+ // The detail steps that have something to reduce in `leanest`, in order.
177
+ // Each touches one field, so any subset of them applies on its own.
178
+ function detailSteps(leanest) {
179
+ return DETAIL_STEPS.filter(step => step(leanest));
180
+ }
181
+
182
+ function reducedDetails(leanest, steps) {
183
+ return copyPreferenceScope(leanest, steps.reduce((value, step) => step(value) ?? value, leanest));
184
+ }
185
+
186
+ const withContinuity = (value, field, view) => ({ ...value, project_agent_context: { ...value.project_agent_context, [field]: view } });
187
+ const present = values => Object.fromEntries(Object.entries(values).filter(([, item]) => item !== undefined));
188
+ const memoryArguments = (value, personalProjectId) => present({ personalSpaceId: value.context?.personal_space_id,
189
+ personalProjectId, agentId: value.context?.project_agent_id ?? value.project_agent_context?.project_agent_id });
190
+
191
+ // Each step returns the entry with one detail reduced to what it counts and
192
+ // the call that reads it, or null when there is nothing to reduce. The role is
193
+ // never cut: recovery does not cut role instructions either
194
+ // (task-preference-reader.js), so an entry that needs it is the blocked frame.
195
+ const DETAIL_STEPS = [
196
+ // The global layer first, as it is the less specific one.
197
+ value => value.project_agent_context?.global_memory?.current ? withContinuity(value, 'global_memory',
198
+ memoryPointer(value.project_agent_context.global_memory, memoryArguments(value, null))) : null,
199
+ value => value.project_agent_context?.memory?.current ? withContinuity(value, 'memory',
200
+ memoryPointer(value.project_agent_context.memory, memoryArguments(value, value.context?.personal_project_id ?? null))) : null,
201
+ // The snapshot's files are written with the memory the layers' read returns.
202
+ value => {
203
+ const snapshot = value.project_agent_context?.directorySnapshot;
204
+ return Array.isArray(snapshot?.files) ? withContinuity(value, 'directorySnapshot',
205
+ { status: snapshot.status, path: snapshot.path, files_omitted: snapshot.files.length,
206
+ read: { tool: 'get_project_agent_memory', arguments: memoryArguments(value, value.context?.personal_project_id ?? null) } }) : null;
207
+ },
208
+ value => {
209
+ const team = value.project_agent_context?.team;
210
+ return team?.roster?.length ? withContinuity(value, 'team', { roster_total: team.roster_total ?? team.roster.length,
211
+ read: { tool: 'get_project_team', arguments: present({ personalSpaceId: value.context?.personal_space_id,
212
+ personalProjectId: value.context?.personal_project_id ?? value.project_agent_context?.personal_project_id }) } }) : null;
213
+ },
214
+ value => {
215
+ const managers = value.project_management_context?.managers;
216
+ return managers?.length ? { ...value, project_management_context: { ...value.project_management_context,
217
+ managers: managers.map(manager => present({ template_id: manager.template_id, agent_id: manager.agent_id, name: manager.name,
218
+ title_mode: manager.title_mode, suggested_match: manager.suggested_match, guidance: manager.guidance,
219
+ read: { tool: manager.tools?.discover ?? 'list_employee_tools',
220
+ arguments: { templateId: manager.template_id, personalProjectId: manager.personal_project_id } } })) } } : null;
221
+ },
222
+ ({ active_conflicts: conflicts, ...value }) => conflicts?.length ? { ...withoutCompleteClaims(value),
223
+ active_conflicts_omitted: { count: conflicts.length,
224
+ read: { tool: 'read_task_preferences', arguments: { taskContextToken: value.taskContextToken } } } } : null
225
+ ];
226
+
227
+ // A layer's preview without its notes: its scope, revision and rules stay,
228
+ // so a checkpoint still names the revision it read (task-context-view.js).
229
+ function memoryPointer(memory, readArguments) {
230
+ const { current: _current, notesTruncated: _cut, ...pointer } = memory;
231
+ return { ...pointer, view: 'omitted', read: { tool: 'get_project_agent_memory', arguments: readArguments } };
232
+ }
233
+
135
234
  // The recall without its items: what it matched, how many, and the search
136
235
  // that reads them (task_knowledge_recall's own guidance says how to query).
137
236
  // A title-only knowledge_index (rec#51 D-59) is per task like the recall, so
@@ -6,6 +6,8 @@ import { CONVERSATION_GUIDANCE } from '../graphiti/agent-conversations.js';
6
6
  import { PROJECT_AGENT_CONTINUITY_GUIDANCE } from '../graphiti/project-agent-task-entry.js';
7
7
  import { TEAM_GUIDANCE } from '../graphiti/project-agent-team-context.js';
8
8
  import { CONTINUATION_GUIDANCE, RECEIPT_GUIDANCE } from '../agents/identity-receipt.js';
9
+ import { MANAGER_ENTRY_GUIDANCE, MANAGER_ENTRY_SUMMARY } from '../employees/task-entry.js';
10
+ import { AUTO_JUDGMENT_GUIDANCE, AUTO_JUDGMENT_SUMMARY } from '../graphiti/task-entry-preferences.js';
9
11
 
10
12
  const MEMORY_GUIDANCE = 'Use get_project_agent_memory before merging or checkpointing working memory; this preview omits history and may truncate notes.';
11
13
  export const DETAILS_GUIDANCE = 'Read get_project_team for staffing and list_project_agent_tasks for task history when needed.';
@@ -35,8 +37,11 @@ const PREFERENCE_DELIVERY_GUIDANCE = Object.freeze({
35
37
  const GLOBAL_MEMORY_GUIDANCE = 'Global layer of the same employee. Read get_project_agent_memory with personalProjectId: null before merging or checkpointing it; this preview omits history and may truncate notes.';
36
38
 
37
39
  // Task-independent rule text shared by every task entry. The hot path sends a
38
- // versioned reference; the full text stays readable as one MCP resource.
40
+ // versioned reference; the full text stays readable as one MCP resource, and
41
+ // each section as its own, the form a reference names: an MCP client matches
42
+ // a resource by its whole URI, so a #fragment never resolved (rec#11 D-72).
39
43
  export const ENTRY_RULES_URI = 'fuli://rules/task-entry';
44
+ export const ENTRY_RULES_SECTION_TEMPLATE = `${ENTRY_RULES_URI}/{section}`;
40
45
 
41
46
  let rules = null;
42
47
 
@@ -51,14 +56,19 @@ export function entryRules() {
51
56
  global_memory_guidance: GLOBAL_MEMORY_GUIDANCE, continuation_guidance: CONTINUATION_GUIDANCE,
52
57
  scope_guidance: { ...GENERIC_SCOPE_GUIDANCE }, receipt_guidance: RECEIPT_GUIDANCE,
53
58
  details_guidance: DETAILS_GUIDANCE, checkpoint_guidance: STOP_HOOK_CHECKPOINT_GUIDANCE,
59
+ manager_guidance: MANAGER_ENTRY_GUIDANCE, judgment_guidance: AUTO_JUDGMENT_GUIDANCE,
54
60
  preference_delivery: { ...PREFERENCE_DELIVERY_GUIDANCE } };
55
61
  rules = Object.freeze({ sections, version: contentHash(sections).slice(0, 12) });
56
62
  }
57
63
  return rules;
58
64
  }
59
65
 
66
+ // A section whose rule an ordinary task acts on keeps that one sentence inline.
67
+ const SECTION_SUMMARIES = () => ({ manager_guidance: MANAGER_ENTRY_SUMMARY, judgment_guidance: AUTO_JUDGMENT_SUMMARY });
68
+
60
69
  export function entryRulesReference(section) {
61
- return { rules: `${ENTRY_RULES_URI}#${section}`, version: entryRules().version };
70
+ const summary = SECTION_SUMMARIES()[section];
71
+ return { ...(summary ? { summary } : {}), rules: `${ENTRY_RULES_URI}/${section}`, version: entryRules().version };
62
72
  }
63
73
 
64
74
  // True only when every static key is present with exactly the shared text.
@@ -74,10 +84,20 @@ export function ruleTextView(value, section) {
74
84
 
75
85
  export function entryRulesMarkdown() {
76
86
  const { sections, version } = entryRules();
77
- const block = (title, entries) => [`## ${title}`, ...entries.map(([key, text]) =>
78
- `- **${key}**: ${typeof text === 'string' ? text : JSON.stringify(text)}`)];
79
87
  return [`# FULI task entry rules (version ${version})`, '',
80
88
  'Task entries reference these sections instead of repeating them each turn.', '',
81
- ...Object.entries(sections).flatMap(([title, value]) => typeof value === 'string'
82
- ? [`## ${title}`, value, ''] : [...block(title, Object.entries(value)), ''])].join('\n');
89
+ ...Object.entries(sections).flatMap(([title, value]) => sectionMarkdown(title, value))].join('\n');
90
+ }
91
+
92
+ // One section, as its reference reads it; null for a section that does not exist.
93
+ export function entryRulesSectionMarkdown(section) {
94
+ const { sections, version } = entryRules();
95
+ if (!Object.hasOwn(sections, section)) return null;
96
+ return [`# FULI task entry rules (version ${version})`, '', ...sectionMarkdown(section, sections[section])].join('\n');
97
+ }
98
+
99
+ function sectionMarkdown(title, value) {
100
+ return typeof value === 'string' ? [`## ${title}`, value, '']
101
+ : [`## ${title}`, ...Object.entries(value).map(([key, text]) =>
102
+ `- **${key}**: ${typeof text === 'string' ? text : JSON.stringify(text)}`), ''];
83
103
  }
@@ -2,19 +2,25 @@ import { compactTaskContext } from './task-context-view.js';
2
2
  import { hookAdditionalContextToolResult } from '../mcp/tool-result.js';
3
3
  import { SESSION_FULI_OFF } from '../agent-tools/session-fuli-gate.js';
4
4
  import { withoutDeliveryProofs } from './recent-context.js';
5
- import { ALWAYS_INLINE_OMITTED_LABEL, fitUncached, inlineEntryFit, OMITTED_PREFERENCES_LABEL, WHOLE_ENTRY }
6
- from './entry-inline-budget.js';
5
+ import { copyPreferenceScope } from './preference-snapshot.js';
6
+ import { ALWAYS_INLINE_OMITTED_LABEL, fitUncached, inlineEntryFit, OMITTED_CONFLICTS_LABEL, OMITTED_PREFERENCES_LABEL,
7
+ WHOLE_ENTRY } from './entry-inline-budget.js';
8
+ import { BLOCKED_PREFERENCE_LABEL } from '../mcp/preference-delivery.js';
9
+ import { taskReceiptInstruction } from '../agents/lifecycle-message.js';
7
10
 
8
11
  export const PREFERENCE_RESET_EVENTS = Object.freeze(['SessionStart', 'PreCompact']);
9
12
  const RESTORED_LABEL = 'Fuli restored current mandatory preferences for the same owned task. Apply this full result; no replacement task or Agent was selected.';
13
+ // The same restore bounded to the host's inline limit: what it leaves out is named in its own sentences.
14
+ const RESTORED_BOUNDED_LABEL = 'Fuli restored current mandatory preferences for the same owned task, bounded to this host\'s inline limit. Apply this result; no replacement task or Agent was selected.';
10
15
 
11
16
  // `replayedSources`: the SessionStart sources after which the Agent's host
12
17
  // replays the same native transcript into the model's context (Claude Code's
13
18
  // resume, rec#11 D-69). The frames delivered before stay model-visible, so the
14
19
  // context generation and its pending frames are kept and nothing is restored;
15
20
  // a compaction the host records still starts a new generation.
21
+ // `inlineChars`: the host's inline limit, as for its task entry (preferenceHookOutput).
16
22
  export async function preferenceLifecycleOutput(event, input, { sourceApplication, delivery, currentTask, invoke,
17
- replayedSources = [] }) {
23
+ replayedSources = [], inlineChars = null }) {
18
24
  if (typeof input?.session_id !== 'string' || !input.session_id.trim() || input.session_id.length > 256) {
19
25
  throw new TypeError('Preference reset requires a native session identifier');
20
26
  }
@@ -26,7 +32,8 @@ export async function preferenceLifecycleOutput(event, input, { sourceApplicatio
26
32
  if (refresh.status === 'other_session') throw new TypeError('Preference recovery requires the same owned native task');
27
33
  // No open task, or FULI was stopped for the session since its task began (rec#5 C3b): nothing to restore.
28
34
  if (refresh.status !== 'refreshed') return {};
29
- return preferenceHookOutput(refresh.context, event, input, delivery, sourceApplication, RESTORED_LABEL, true);
35
+ return preferenceHookOutput(refresh.context, event, input, delivery, sourceApplication, RESTORED_LABEL, true,
36
+ { inlineChars, boundedLabel: RESTORED_BOUNDED_LABEL });
30
37
  }
31
38
 
32
39
  // A fresh read of the session's current task, in place: the same token, scope
@@ -46,10 +53,17 @@ export async function currentTaskPreferences(input, { sourceApplication, current
46
53
 
47
54
  // `inlineChars` is the inline limit of a host that keeps only a preview of a
48
55
  // longer hook context (entry-inline-budget.js); without it the entry is whole.
49
- export async function preferenceHookOutput(value, event, input, delivery, sourceApplication, label, forceFull = false,
50
- { inlineChars = null } = {}) {
56
+ // The model passes taskContextToken (PASS_TASK_TOKEN), so the hook context
57
+ // leaves out its snake_case copy; MCP results keep both (rec#11 D-72).
58
+ // `boundedLabel` replaces `label` for a frame that leaves something out. A
59
+ // blocked frame keeps the receipt sentence: its agent_receipt is still copied.
60
+ export async function preferenceHookOutput(entry, event, input, delivery, sourceApplication, label, forceFull = false,
61
+ { inlineChars = null, boundedLabel = label } = {}) {
62
+ const { task_context_token: _copy, ...rest } = entry;
63
+ const value = copyPreferenceScope(entry, rest);
51
64
  const format = projected => hookAdditionalContextToolResult(projected, { hookEventName: event,
52
- label: omittedLabel(label, projected?.preferences_omitted), limitBytes: 128 * 1024, itemLimit: 1000 });
65
+ label: omittedLabel(label, boundedLabel, projected), limitBytes: 128 * 1024, itemLimit: 1000,
66
+ blockedLabel: `${BLOCKED_PREFERENCE_LABEL} ${taskReceiptInstruction(value)}`.trim() });
53
67
  const fit = inlineChars ? inlineEntryFit(inlineChars, hookContextLength) : WHOLE_ENTRY;
54
68
  const result = delivery ? await delivery.deliver(value, { sourceApplication,
55
69
  nativeSessionId: input.session_id, transcriptPath: input.transcript_path, forceFull }, format, fit)
@@ -57,9 +71,11 @@ export async function preferenceHookOutput(value, event, input, delivery, source
57
71
  return JSON.parse(result.content[0].text);
58
72
  }
59
73
 
60
- function omittedLabel(label, omitted) {
61
- if (!omitted) return label;
62
- return [label, OMITTED_PREFERENCES_LABEL, ...(omitted.includes_always_inline ? [ALWAYS_INLINE_OMITTED_LABEL] : [])].join(' ');
74
+ function omittedLabel(label, boundedLabel, projected) {
75
+ const omitted = projected?.preferences_omitted, conflicts = projected?.active_conflicts_omitted;
76
+ if (!omitted && !conflicts) return label;
77
+ return [boundedLabel, ...(omitted ? [OMITTED_PREFERENCES_LABEL] : []),
78
+ ...(omitted?.includes_always_inline ? [ALWAYS_INLINE_OMITTED_LABEL] : []), ...(conflicts ? [OMITTED_CONFLICTS_LABEL] : [])].join(' ');
63
79
  }
64
80
 
65
81
  function hookContextLength(result) {
@@ -95,7 +95,8 @@ export function preferenceSnapshot(value) {
95
95
 
96
96
  // A complete result as it is, plus the revision a later delta can name.
97
97
  // `shown` is null when this session can never confirm the frame, and an empty
98
- // set never needs a base: both stay exactly the uncached result.
98
+ // set (outside a bounded frame) never needs a base: both stay exactly the
99
+ // uncached result.
99
100
  export function completePreferenceFrame(value, shown) {
100
101
  return withRevision(value, preferenceSnapshot(value), shown);
101
102
  }
@@ -166,8 +167,11 @@ export function applySceneSwitchSnapshot(value, frame, base, scene) {
166
167
  return { ...listed, units, snapshotHash: contentHash({ scopeHash: listed.scopeHash, units }) };
167
168
  }
168
169
 
170
+ // An empty set needs no base, except in a bounded frame that leaves every
171
+ // preference out (rec#11 D-72): its revision is the base the next delta names.
169
172
  function withRevision(value, snapshot, shown) {
170
- const revision = shown && snapshot?.preferences.length ? uniqueRevision(snapshot.snapshotHash, shown) : null;
173
+ const based = snapshot?.preferences.length || Object.hasOwn(value, 'preferences_omitted');
174
+ const revision = shown && based ? uniqueRevision(snapshot.snapshotHash, shown) : null;
171
175
  return revision ? withPreferenceScope({ ...value, revision }, value[SCOPE]) : value;
172
176
  }
173
177
 
@@ -47,12 +47,15 @@ export function compactTaskContext(value) {
47
47
  continuation: { ...value.agent_receipt.continuation,
48
48
  guidance: text(value.agent_receipt.continuation.guidance, 'continuation_guidance') } };
49
49
  if (Array.isArray(value.effective_preferences)) result.effective_preferences = value.effective_preferences.map(preferenceInstructionView);
50
- if (value.project_management_context?.managers) result.project_management_context = managementContextView(value.project_management_context);
50
+ if (value.project_management_context?.managers) result.project_management_context = managementContextView(
51
+ value.project_management_context, guidance => text(guidance, 'manager_guidance'));
51
52
  const continuity = value.project_agent_context;
52
53
  const management = value.project_management_context;
53
54
  const omitTeam = !value.worker_run && Object.hasOwn(value, 'project_management_context')
54
55
  && (management?.status === 'degraded' || !management?.managers?.length);
55
56
  if (omitTeam) delete result.judgment_context;
57
+ else if (value.judgment_context?.guidance) result.judgment_context = { ...value.judgment_context,
58
+ guidance: text(value.judgment_context.guidance, 'judgment_guidance') };
56
59
  const teamRules = !omitTeam && (continuity?.team?.guidance ?? continuity?.team_guidance);
57
60
  const teamGuidance = teamRules ? text(teamRules, 'team_guidance') : undefined;
58
61
  if (continuity) result.project_agent_context = { ...continuity,
@@ -74,12 +77,15 @@ export function compactTaskContext(value) {
74
77
  }
75
78
 
76
79
  // Each manager's routing, title policy and tools; the board itself is read on
77
- // demand through the manager's own read_board tool.
78
- export function managementContextView(management) {
80
+ // demand through the manager's own read_board tool, as its routing rules say.
81
+ // `guidance` gives those rules as this entry delivers them (a task entry
82
+ // references them). The receipt of the entry's own board read names no work
83
+ // the Agent did, so the view leaves it out.
84
+ export function managementContextView(management, guidance) {
79
85
  return { ...management,
80
- managers: management.managers.map(manager => ({ ...manager,
81
- board: manager.board && { version: manager.board.version, total: manager.board.total,
82
- view: 'on_demand', guidance: 'Discover and call the manager read_board tool before matching, creating or updating a work item; this entry omits board details.' }
86
+ managers: management.managers.map(({ collaboration_receipt: _receipt, ...manager }) => ({ ...manager,
87
+ ...(manager.guidance ? { guidance: guidance(manager.guidance) } : {}),
88
+ board: manager.board && { version: manager.board.version, total: manager.board.total, view: 'on_demand' }
83
89
  }))
84
90
  };
85
91
  }
@@ -144,10 +150,14 @@ function memoryPreview(memory, guidance) {
144
150
  openThreads: list(notes.openThreads),
145
151
  nextActions: list(notes.nextActions)
146
152
  };
147
- // Space, project and Agent IDs are already in the entry context.
153
+ // Space, project and Agent IDs are already in the entry context, and the
154
+ // record's revision is the layer's (scopedAgentMemoryView checks both). Its
155
+ // checkpoint, task and session IDs are provenance the full read returns.
156
+ const { personalSpaceId: _space, personalProjectId: _project, agentId: _agent, revision: _revision,
157
+ checkpointId: _checkpoint, taskId: _task, sourceSessionId: _session, ...record } = current ?? {};
148
158
  return { ...memory, history: undefined, workLog: undefined, personalSpaceId: undefined,
149
159
  personalProjectId: undefined, agentId: undefined, storage: undefined,
150
- current: current && { ...current, memory: preview },
160
+ current: current && { ...record, memory: preview },
151
161
  view: 'preview', notesTruncated, requiresFullReadBeforeWrite: true, guidance };
152
162
  }
153
163
 
@@ -25,6 +25,8 @@ export function turnStart(transcriptPath) {
25
25
  // sourceApplication, adapter the Agent and its native transcript adapter
26
26
  // unconfirmed bilingual sentence: why this turn's ownership is not confirmed
27
27
  // resolution what the refreshed task's token can and cannot do for this turn
28
+ // inlineChars the host's inline limit for the refreshed context, if it has one
29
+ // (entry-inline-budget.js)
28
30
  // continuedInTurn(input, token, from) the Agent's evidence of an explicit
29
31
  // continuation in its native history; without one no turn is ever proven
30
32
 
@@ -34,7 +36,7 @@ export function turnStart(transcriptPath) {
34
36
  // claims that this turn belongs to that task. Without a readable owned task it
35
37
  // establishes none. onCurrentTask names the task found.
36
38
  export async function refreshCurrentTaskInPlace(event, input, invoke,
37
- { sourceApplication, unconfirmed, resolution }, { delivery, currentTask, onCurrentTask }) {
39
+ { sourceApplication, unconfirmed, resolution, inlineChars = null }, { delivery, currentTask, onCurrentTask }) {
38
40
  let refresh;
39
41
  const lookup = async (...parameters) => {
40
42
  const task = await currentTask?.(...parameters);
@@ -48,7 +50,7 @@ export async function refreshCurrentTaskInPlace(event, input, invoke,
48
50
  refresh = { status: 'unreadable', reason: error?.code === 'preference_recovery_blocked' ? error.message : null };
49
51
  }
50
52
  return refresh.status === 'refreshed' ? preferenceHookOutput(refresh.context, event, input, delivery, sourceApplication,
51
- `${unconfirmed} ${resolution} ${START_NEW_WORK} ${TASK_RULES_ON_DEMAND}`, true)
53
+ `${unconfirmed} ${resolution} ${START_NEW_WORK} ${TASK_RULES_ON_DEMAND}`, true, { inlineChars })
52
54
  : { hookSpecificOutput: { hookEventName: event, additionalContext: noValidContext(refresh) } };
53
55
  }
54
56
 
@@ -4,6 +4,11 @@ import { employeeCollaborationReceipt } from '../agents/identity-receipt.js';
4
4
 
5
5
  // The board window a task entry lists; Jefa's board match reads the same one.
6
6
  export const TASK_ENTRY_BOARD_LIMIT = 8;
7
+ // How an Agent works with a manager its task entry lists. The entry
8
+ // references it by version (entry-rules.js, manager_guidance) beside the
9
+ // summary, the one sentence an ordinary task acts on.
10
+ export const MANAGER_ENTRY_SUMMARY = 'Route actionable project work through this manager: read_board before matching or creating items.';
11
+ export const MANAGER_ENTRY_GUIDANCE = 'Route actionable work in this project through this manager: read its board with its read_board tool, then match existing board items, or create a concise task for new work. Keep conversation-only questions out of the backlog. Update linked items as evidence arrives; Agent completion goes to review, never human-confirmed done. When this conversation materially advances a matched task and its progress was actually recorded, end the user-facing response with a short receipt naming that task; never claim a task update that did not succeed. Before creating or editing, discover the installed tool schemas and preserve versions/idempotency. If title_mode is auto or suggest, prepare a title from only this session’s linked work item IDs. Auto applies only when the current host exposes a native session rename capability and the exact target session is known: execute the returned action in that host, then report its actual result. Never edit client databases or transcripts, invent an execution receipt, rename another session, or override a locked/manual title. Do not start an additional model solely for this entry.';
7
12
 
8
13
  export async function employeeTaskEntry({ app, registry, recruitment, workspace }, input) {
9
14
  if (!input.personalProjectId) return { status: 'project_unresolved', managers: [], worker_started: false };
@@ -36,7 +41,7 @@ export async function employeeTaskEntry({ app, registry, recruitment, workspace
36
41
  session: { sourceApplication: input.sourceApplication ?? 'other', sessionId: input.sourceSessionId ?? input.sessionId ?? null },
37
42
  tools: { discover: 'list_employee_tools', call: 'call_employee_tool',
38
43
  read_board: manifest.taskEntry.boardTool, prepare_title: manifest.taskEntry.titleTool ?? null },
39
- guidance: 'Route actionable work in this project through this manager: match existing board items, or create a concise task for new work. Keep conversation-only questions out of the backlog. Update linked items as evidence arrives; Agent completion goes to review, never human-confirmed done. When this conversation materially advances a matched task and its progress was actually recorded, end the user-facing response with a short receipt naming that task; never claim a task update that did not succeed. Before creating or editing, discover the installed tool schemas and preserve versions/idempotency. If title_mode is auto or suggest, prepare a title from only this session’s linked work item IDs. Auto applies only when the current host exposes a native session rename capability and the exact target session is known: execute the returned action in that host, then report its actual result. Never edit client databases or transcripts, invent an execution receipt, rename another session, or override a locked/manual title. Do not start an additional model solely for this entry.'
44
+ guidance: MANAGER_ENTRY_GUIDANCE
40
45
  });
41
46
  } catch (error) {
42
47
  // Excluded/unassigned/inactive projects never reach the plugin runtime.
@@ -159,11 +159,16 @@ async function entryPreferences(application, projectResolution, {
159
159
  }) };
160
160
  }
161
161
 
162
+ // What an automatic judgment policy asks of the Agent. The entry references
163
+ // it by version (entry-rules.js, judgment_guidance) beside the summary.
164
+ export const AUTO_JUDGMENT_SUMMARY = 'Before choosing a new subagent, session, client or model, call assess_agent_action.';
165
+ export const AUTO_JUDGMENT_GUIDANCE = 'Before choosing a new subagent, session, client or model, use assess_agent_action with the exact project, Agent and task. Use its eligible recommendation within the saved policy; recheck host capability before dispatch. Do not ask again for an already delegated routine choice. Escalations, user rules and locked executor policies still apply. For an awaiting-review FULI task, its accountable lead can use assess_task_completion with exact task/artifact revision and real verification evidence. Jefa human acceptance and external publication remain separate. Recommendations are not permissions or execution receipts.';
166
+
162
167
  export async function taskJudgmentContext(application, personalProjectId) {
163
168
  const judgmentPolicy = await application.judgment?.policy({ personalSpaceId: application.config.personal.spaceId,
164
169
  personalProjectId: personalProjectId ?? null });
165
170
  return judgmentPolicy ? { agentId: 'employee.tonborg', policy: judgmentPolicy,
166
171
  guidance: judgmentPolicy.mode === 'manual'
167
172
  ? 'Tonborg is available for advice via assess_agent_action; retain human review.'
168
- : 'Before choosing a new subagent, session, client or model, use assess_agent_action with the exact project, Agent and task. Use its eligible recommendation within the saved policy; recheck host capability before dispatch. Do not ask again for an already delegated routine choice. Escalations, user rules and locked executor policies still apply. For an awaiting-review FULI task, its accountable lead can use assess_task_completion with exact task/artifact revision and real verification evidence. Jefa human acceptance and external publication remain separate. Recommendations are not permissions or execution receipts.' } : null;
173
+ : AUTO_JUDGMENT_GUIDANCE } : null;
169
174
  }
@@ -1,5 +1,7 @@
1
1
  import { ResourceTemplate } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import { ENTRY_RULES_URI, entryRulesMarkdown } from '../conversations/entry-rules.js';
2
+ import { ErrorCode, McpError } from '@modelcontextprotocol/sdk/types.js';
3
+ import { ENTRY_RULES_SECTION_TEMPLATE, ENTRY_RULES_URI, entryRulesMarkdown, entryRulesSectionMarkdown }
4
+ from '../conversations/entry-rules.js';
3
5
  import { singleLine } from '../text/single-line.js';
4
6
 
5
7
  const PROJECT_RESOURCE_TEMPLATE = 'fuli://projects/{projectId}';
@@ -36,6 +38,22 @@ export function registerFuliContextResources(server, app, {
36
38
  (uri) => markdownResource(uri, entryRulesMarkdown())
37
39
  );
38
40
 
41
+ // The form every entry reference names (entryRulesReference): one section.
42
+ server.registerResource(
43
+ 'fuli-task-entry-rule-section',
44
+ new ResourceTemplate(ENTRY_RULES_SECTION_TEMPLATE, { list: undefined }),
45
+ {
46
+ title: 'FULI · Task entry rule section',
47
+ description: 'One section of the shared task entry rules, as a task entry references it.',
48
+ mimeType: RESOURCE_MIME_TYPE
49
+ },
50
+ (uri, variables) => {
51
+ const text = entryRulesSectionMarkdown(String(variables?.section ?? ''));
52
+ if (text === null) throw new McpError(ErrorCode.InvalidParams, `FULI task entry rule section not found: ${variables?.section}`);
53
+ return markdownResource(uri, text);
54
+ }
55
+ );
56
+
39
57
  const projectResources = new ResourceTemplate(PROJECT_RESOURCE_TEMPLATE, {
40
58
  list: () => withRuntimeLease(
41
59
  'mcp-resource:list-projects',
@@ -110,6 +110,7 @@ export function hookAdditionalContextToolResult(
110
110
  {
111
111
  hookEventName,
112
112
  label,
113
+ blockedLabel = BLOCKED_PREFERENCE_LABEL,
113
114
  limitBytes = RESULT_LIMIT_BYTES,
114
115
  itemLimit = RESULT_ITEM_LIMIT
115
116
  }
@@ -119,7 +120,7 @@ export function hookAdditionalContextToolResult(
119
120
  const warning = !blocked && result.structuredContent.truncated
120
121
  ? '\nContext delivery is incomplete. Do not claim full employee recovery or merge truncated memory. Read get_project_agent_memory for the exact role and project before continuing its work.'
121
122
  : '';
122
- const additionalContext = `${blocked ? BLOCKED_PREFERENCE_LABEL : label}${warning}\n${JSON.stringify(result.structuredContent)}`;
123
+ const additionalContext = `${blocked ? blockedLabel : label}${warning}\n${JSON.stringify(result.structuredContent)}`;
123
124
  return {
124
125
  ...result,
125
126
  content: [{
@@ -3,4 +3,4 @@
3
3
  // and writes its digest here before publishing (scripts/pin-win-helper.js); a
4
4
  // source checkout has no helper and no pin, so Windows Hello is unavailable there.
5
5
  // The helper is not Authenticode-signed: this digest is its only integrity check.
6
- export const WIN_HELPER_SHA256 = '7335d962b0b06cfc380f21bdd5540e74f8922b9d6e6de1544fbe04350dc23520';
6
+ export const WIN_HELPER_SHA256 = '39fcf9904dc9e29d7bc7453a44af690a811ebfa3bdfed7e078c9be647633418d';