fuli-context 0.20.0-beta.14 → 0.20.0-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/web/assets/{index-BDCkW4Ii.js → index-GEnfRzSe.js} +1 -1
- package/dist/web/index.html +1 -1
- package/graph-provider/pyproject.toml +1 -1
- package/native/win32/fuli-win-helper.exe +0 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/skills/capturing-session-knowledge/references/retrieval.md +6 -0
- package/src/agent-tools/session-fuli-gate.js +55 -26
- package/src/agent-tools.js +2 -4
- package/src/agents/claude-code/lifecycle-hook.js +4 -3
- package/src/agents/codex/lifecycle-hook.js +4 -3
- package/src/agents/lifecycle-message.js +18 -0
- package/src/app/agent-request-context.js +18 -0
- package/src/graphiti/capture-notice.js +4 -1
- package/src/graphiti/knowledge-result-budget.js +63 -12
- package/src/graphiti/session-layer-decision.js +28 -6
- package/src/mcp/preference-delivery.js +7 -4
- package/src/mcp/provider-task-context-registry.js +15 -0
- package/src/mcp/tool-result.js +3 -3
- package/src/presence/windows-helper-pin.js +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SharedJefaReportPage-B_rreEep.js","assets/_plugin-vue_export-helper-BmfQlfI8.js","assets/useApi-CROJJdhE-BujjnKN_.js","assets/button-CFEnxtio.js","assets/GrowthLoading-smW3-Gfp.js","assets/GrowthLoading-B_QrPkEy.css","assets/Card-BZFLZ_2I.js","assets/shared-report-D3Hem1t5.js","assets/client-lh80ewvs.js","assets/UiIcon-B8eZeuGI.js","assets/UiIcon-EWCwhyKc.css","assets/ui-Ck58paqr.js","assets/UiDialog-BSDblUpR.js","assets/UiIconButton-e754Tmnq.js","assets/UiSegmented-D1HD-qin.js","assets/UiSelect-CbkTsi2e.js","assets/UiSelect-CiSPw-7k.css","assets/UiToggle-Dz93aXFK.js","assets/UiToggle-B2sPCVZe.css","assets/UiWeight-CUvyApSB.js","assets/UiWeight-aUNtanHz.css","assets/ui-CE38wkv4.css","assets/preload-helper-BLdHbfdN.js","assets/task-board-model-BohbBuwF.js","assets/ProjectScopePicker-D0oxbwOd.js","assets/ProjectScopePicker-BM3MbIYV.css","assets/board-task-peek-C7CQ78B5.js","assets/shared-report-eUYPCJTS.css","assets/SharedJefaReportPage-CcD-06mK.css","assets/RoundtablesPage-BEUaKOjI.js","assets/console-CQMgYkk9.js","assets/vue-router-Bl55c88B.js","assets/agent-identity-color-RqpT7gtx.js","assets/BackLink-D7oAvDG5.js","assets/task-updates-ChvjLQXV.js","assets/RoundtablesPage-BMYSDYH8.css","assets/OverviewPage-DiwYSnhh.js","assets/project-origin-ppsYHpYL.js","assets/design-lab-BDKwIbI8.js","assets/attention-store-CG9cF6DX.js","assets/profile-model-kCmPHrmk.js","assets/paths-CDREouhi.js","assets/date-time-Clwafva-.js","assets/badge-DvvDq2Wb.js","assets/dist-PmK0PfVA.js","assets/workbench-model-CaNC35vW.js","assets/agent-work-summary-C9yMf019.js","assets/task-evidence-i9SDhd3E.js","assets/task-labels-7KyNw9id.js","assets/OverviewPage-YBQHyU7s.css","assets/PersonalProfilePage-C_v2BFee.js","assets/useMinimumLoadingDisplay-HnxkDut6.js","assets/model-CuY1vtEy.js","assets/model-Cengn9fg.js","assets/KnowledgeEditDialog-VdQwbX4E.js","assets/identity-bK-fJdnj.js","assets/KnowledgeEditDialog-D0se__D4.css","assets/KnowledgePeek-BNBkh1ey.js","assets/dialog-D2mO6m3B.js","assets/Presence-BYfYJNMD.js","assets/Teleport-BZX1Eb7R.js","assets/handleAndDispatchCustomEvent-Bng2rRDf.js","assets/UiDisclosure-DLmVwmy1.js","assets/conversation-launcher-settings-B1QM-wZB.js","assets/KnowledgePeek-DEo6IbBP.css","assets/useKnowledgeItemPeek-C6nAzvDL.js","assets/useFocusReturn-D9IOIg17.js","assets/useRoutePeek-BvYFc1BA.js","assets/personal-profile-graph-tMneNj_m.js","assets/PersonalProfilePage-CGW50MHm.css","assets/WritingTastePage-B7KojA4r.js","assets/CardHeader-C_c0keQn.js","assets/CardTitle-yXOhV577.js","assets/WritingTastePage-asIa-2U5.css","assets/PersonalProjectsPage-DGRV8cM5.js","assets/DialogFooter-DYawfDCD.js","assets/KnowledgeWorkspace-pH2tAFld.js","assets/TabsTrigger-Cd6SI2yI.js","assets/RovingFocusGroup-X9U-ufYr.js","assets/RovingFocusItem-_uA_OCLT.js","assets/Input-F1oftPWh.js","assets/debounce-CFk-gEUl.js","assets/AgentName-DdlJlpT3.js","assets/AgentName-BQTFCWn0.css","assets/project-team-api-DwP0O3rn.js","assets/CreateProjectDialog-BVJqWdlT.js","assets/CreateProjectDialog-BaPfiS1T.css","assets/VirtualDirectoryList-Dv6PwLjU.js","assets/VirtualDirectoryList-pgDELOEf.css","assets/project-capture-QgMw6qvo.js","assets/KnowledgeWorkspace-C6l_yvWO.css","assets/PersonalProjectsPage-Cf5mrQmy.css","assets/KnowledgeOrganizerPage-BVgAyu6U.js","assets/KnowledgeOrganizerPage-BIOaMzgQ.css","assets/AgentsDirectoryPage-DylT-GSW.js","assets/agent-pins-Chh_rdBi.js","assets/avatars-CUyfvsKO.js","assets/useAgentRecords-C6RrZwwv.js","assets/agent-occupation-ChN-1QjC.js","assets/occupation-catalog-DxwlYD1L.js","assets/agent-profile.css_vue_type_style_index_0_src_true_lang-DWlz7UoN.js","assets/agent-profile-LzhgJINr.css","assets/orchestration-filters-DZpJ0FN3.js","assets/ProjectAgentFirstTask-DrSd3nR-.js","assets/ProjectAgentFirstTask-BVDcaNNi.css","assets/UnassignedConversationsPanel-xY7gsFot.js","assets/short-ids-BpNwVgnt.js","assets/EmployeeRecruitDialog-CB4ARFkM.js","assets/EmployeeRecruitDialog-C6ADVxkQ.css","assets/AgentsDirectoryPage-BwF-0nFO.css","assets/AgentProfilePage-Cx_Uf5Vf.js","assets/TabsContent-8pXwYJPz.js","assets/page-title-Bg-mVyrS.js","assets/TaskExecutionPlan-CupxJeyo.js","assets/motion-preference-A1AMssSH.js","assets/TaskExecutionPlan-C9kJJJKk.css","assets/AgentProfilePage-DXvLQu-C.css","assets/OccupationsPage-PNoqE21Y.js","assets/TextField-CielK4l3.js","assets/TextField-CM9C-zEI.css","assets/OccupationsPage-BTormZIO.css","assets/TaskSchedulesPage-zYQs7s6T.js","assets/dropdown-menu-YzCnvjAb.js","assets/useArrowNavigation-LczgkNfS.js","assets/PopperContent-5zqbtnYr.js","assets/TaskSchedulesPage-DcmDdY10.css","assets/ProjectAgentsPage-U4Om3EPu.js","assets/ProjectAgentDialog-BGckQDTq.js","assets/ProjectAgentDialog-DHP7BfAf.css","assets/ProjectAgentsPage-BBzKAhZx.css","assets/ProjectAgentDetailPage-BQ9ffaCX.js","assets/ProjectAgentDetailPage-CRFE6n-s.css","assets/EmployeeWorkbenchPage-BUMfMBc8.js","assets/judgment-types-DJnAr9c0.js","assets/EmployeeWorkbenchPage-BenZP7De.css","assets/PublicProjectsPage-CvkQ3E8I.js","assets/PublicProjectsPage-Ditr0SY-.css","assets/KnowledgePage-Bfbfz_Z8.js","assets/KnowledgeItemEditPage-CQo3TbCJ.js","assets/RadioGroupItem-CBpbQlHx.js","assets/checkbox-DovdRz8u.js","assets/model-rumuELTi.js","assets/field-BMEFEyVC.js","assets/Label-yDCtlpkb.js","assets/model-BwNZZZNP.js","assets/quick-edit-api-BiyK3ih-.js","assets/KnowledgeHardDeleteSection-CXRmNnZF.js","assets/accordion-gXElbGP_.js","assets/KnowledgeItemSummaryCard-Dd2McM-d.js","assets/SessionRecordsPage-Bs2eLXEi.js","assets/model-DpVrfbnj.js","assets/SessionMigrationPage-WVFSDcUO.js","assets/TagVocabularyPage-BQiuKG-4.js","assets/KnowledgeTurnReceiptPage-Ckw_olrt.js","assets/InboxPage-Crn1UU7s.js","assets/InboxPage-CbbiHgTr.css","assets/ConnectionsPage-DlnHdtwn.js","assets/SettingsPage-DlIwICIz.js","assets/SettingsPage-BbX9ysTX.css","assets/ModelSettingsPage-C3eBDWRL.js","assets/model-CPMYnu3S.js","assets/ModelSettingsPage-DZkrJw7R.css","assets/DataFormatPage-BdcjcyhZ.js","assets/DataFormatPage-Dp7mePUw.css","assets/CaptureChangePage-DEuqPb14.js","assets/CaptureChangePage-Cch3mT4b.css","assets/AboutPage-CjDenGS_.js","assets/fuli-logo-Bu9WBuQe.js","assets/AboutPage-Bxm7RJZg.css","assets/NotFoundPage-8gVVukRR.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-BmfQlfI8.js";import{n as P,t as F}from"./console-CQMgYkk9.js";import{m as I}from"./useApi-CROJJdhE-BujjnKN_.js";import{i as ee,n as L,r as te,t as R}from"./vue-router-Bl55c88B.js";import{t as z}from"./button-CFEnxtio.js";import{t as ne}from"./checkbox-DovdRz8u.js";import{a as re,i as ie,n as ae,r as oe,t as se}from"./dialog-D2mO6m3B.js";import{n as ce,t as le}from"./RadioGroupItem-CBpbQlHx.js";import{a as ue,r as de}from"./client-lh80ewvs.js";import{i as fe,n as pe,r as me,t as he}from"./agent-pins-Chh_rdBi.js";import{t as ge}from"./UiIcon-B8eZeuGI.js";import{t as _e}from"./DialogFooter-DYawfDCD.js";import{i as ve,n as ye,r as be}from"./project-origin-ppsYHpYL.js";import{i as xe,n as Se,t as Ce}from"./motion-preference-A1AMssSH.js";import{r as we}from"./ui-Ck58paqr.js";import{t as B}from"./UiIconButton-e754Tmnq.js";import{t as V}from"./UiSegmented-D1HD-qin.js";import{t as Te}from"./UiToggle-Dz93aXFK.js";import{i as Ee,n as De,r as H,t as Oe}from"./design-lab-BDKwIbI8.js";import{r as ke}from"./attention-store-CG9cF6DX.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-C6RrZwwv.js";import{n as Fe,t as Ie}from"./paths-CDREouhi.js";import{t as Le}from"./page-title-Bg-mVyrS.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.20.0-beta.14`,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-B_rreEep.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-BEUaKOjI.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-BEUaKOjI.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-DiwYSnhh.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-C_v2BFee.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-B7KojA4r.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-DGRV8cM5.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-DGRV8cM5.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-DGRV8cM5.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-DGRV8cM5.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-BVgAyu6U.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-DylT-GSW.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-Cx_Uf5Vf.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-PNoqE21Y.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-zYQs7s6T.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-U4Om3EPu.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-BQ9ffaCX.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-BUMfMBc8.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-CvkQ3E8I.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-Bfbfz_Z8.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-CQo3TbCJ.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-Bs2eLXEi.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-WVFSDcUO.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-BQiuKG-4.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-Ckw_olrt.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-Bfbfz_Z8.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-Bfbfz_Z8.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-Bfbfz_Z8.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-Bfbfz_Z8.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-Crn1UU7s.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-DlnHdtwn.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-DlIwICIz.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-C3eBDWRL.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-BdcjcyhZ.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-DEuqPb14.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-CjDenGS_.js`),__vite__mapDeps([166,1,167,168])),meta:{title:`routes.about.title`,layout:`form`}},{path:`/:pathMatch(.*)*`,name:`not-found`,component:()=>W(()=>import(`./NotFoundPage-8gVVukRR.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-BmfQlfI8.js";import{n as P,t as F}from"./console-CQMgYkk9.js";import{m as I}from"./useApi-CROJJdhE-BujjnKN_.js";import{i as ee,n as L,r as te,t as R}from"./vue-router-Bl55c88B.js";import{t as z}from"./button-CFEnxtio.js";import{t as ne}from"./checkbox-DovdRz8u.js";import{a as re,i as ie,n as ae,r as oe,t as se}from"./dialog-D2mO6m3B.js";import{n as ce,t as le}from"./RadioGroupItem-CBpbQlHx.js";import{a as ue,r as de}from"./client-lh80ewvs.js";import{i as fe,n as pe,r as me,t as he}from"./agent-pins-Chh_rdBi.js";import{t as ge}from"./UiIcon-B8eZeuGI.js";import{t as _e}from"./DialogFooter-DYawfDCD.js";import{i as ve,n as ye,r as be}from"./project-origin-ppsYHpYL.js";import{i as xe,n as Se,t as Ce}from"./motion-preference-A1AMssSH.js";import{r as we}from"./ui-Ck58paqr.js";import{t as B}from"./UiIconButton-e754Tmnq.js";import{t as V}from"./UiSegmented-D1HD-qin.js";import{t as Te}from"./UiToggle-Dz93aXFK.js";import{i as Ee,n as De,r as H,t as Oe}from"./design-lab-BDKwIbI8.js";import{r as ke}from"./attention-store-CG9cF6DX.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-C6RrZwwv.js";import{n as Fe,t as Ie}from"./paths-CDREouhi.js";import{t as Le}from"./page-title-Bg-mVyrS.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.20.0-beta.15`,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-B_rreEep.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-BEUaKOjI.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-BEUaKOjI.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-DiwYSnhh.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-C_v2BFee.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-B7KojA4r.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-DGRV8cM5.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-DGRV8cM5.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-DGRV8cM5.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-DGRV8cM5.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-BVgAyu6U.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-DylT-GSW.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-Cx_Uf5Vf.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-PNoqE21Y.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-zYQs7s6T.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-U4Om3EPu.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-BQ9ffaCX.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-BUMfMBc8.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-CvkQ3E8I.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-Bfbfz_Z8.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-CQo3TbCJ.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-Bs2eLXEi.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-WVFSDcUO.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-BQiuKG-4.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-Ckw_olrt.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-Bfbfz_Z8.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-Bfbfz_Z8.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-Bfbfz_Z8.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-Bfbfz_Z8.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-Crn1UU7s.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-DlnHdtwn.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-DlIwICIz.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-C3eBDWRL.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-BdcjcyhZ.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-DEuqPb14.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-CjDenGS_.js`),__vite__mapDeps([166,1,167,168])),meta:{title:`routes.about.title`,layout:`form`}},{path:`/:pathMatch(.*)*`,name:`not-found`,component:()=>W(()=>import(`./NotFoundPage-8gVVukRR.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`);
|
package/dist/web/index.html
CHANGED
|
@@ -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-
|
|
12
|
+
<script type="module" crossorigin src="/assets/index-GEnfRzSe.js"></script>
|
|
13
13
|
<link rel="modulepreload" crossorigin href="/assets/_plugin-vue_export-helper-BmfQlfI8.js">
|
|
14
14
|
<link rel="modulepreload" crossorigin href="/assets/client-lh80ewvs.js">
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/console-CQMgYkk9.js">
|
|
Binary file
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fuli-context",
|
|
3
|
-
"version": "0.20.0-beta.
|
|
3
|
+
"version": "0.20.0-beta.15",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "fuli-context",
|
|
9
|
-
"version": "0.20.0-beta.
|
|
9
|
+
"version": "0.20.0-beta.15",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@a2a-js/sdk": "1.3.0",
|
package/package.json
CHANGED
|
@@ -33,6 +33,12 @@ identifier, and likely runbook category. Never pass the full conversational requ
|
|
|
33
33
|
query. For example, a version-release request should search release/publish and push/commit
|
|
34
34
|
runbook concepts separately instead of searching the entire sentence.
|
|
35
35
|
|
|
36
|
+
Its response states `retrievalGuidance`, `noMatchSourceMarker` and the shared scope fields once
|
|
37
|
+
at the top level; each entry in `results` keeps its own `query`, records and `sourceMarker`. On a
|
|
38
|
+
bounded page (`next_cursor` present), a query with nothing on that page shows only `query` and
|
|
39
|
+
`total_items`; its records arrive on a later page. Long project ID lists name a prefix and count
|
|
40
|
+
the rest in `project_ids_omitted`.
|
|
41
|
+
|
|
36
42
|
Pending knowledge is eligible for on-demand retrieval and must remain visibly marked.
|
|
37
43
|
`agent_confirmed` knowledge is usable but ranks below user or authoritative-source
|
|
38
44
|
confirmation.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { sessionsMayBeOff, sessionUseDecision } from '../graphiti/session-layer-decision.js';
|
|
1
|
+
import { sessionsMayBeOff, sessionsMayBeWithoutCapture, sessionUseDecision } from '../graphiti/session-layer-decision.js';
|
|
2
2
|
import { captureNotice } from '../graphiti/capture-notice.js';
|
|
3
|
-
import { activeAgentHostClient } from '../app/agent-request-context.js';
|
|
3
|
+
import { activeAgentHostClient, runWithTaskBoundSession } from '../app/agent-request-context.js';
|
|
4
4
|
|
|
5
5
|
// What an Agent may still call for a session FULI is off for (rec#5 C3b).
|
|
6
6
|
// Every other tool returns stored memory or preferences to the model (entry,
|
|
@@ -19,18 +19,22 @@ const OPEN_TOOLS = new Set([
|
|
|
19
19
|
'acquire_runtime_lease', 'refresh_runtime_lease', 'release_runtime_lease'
|
|
20
20
|
]);
|
|
21
21
|
export const SESSION_FULI_OFF = 'fuli_off';
|
|
22
|
-
// Tools an Agent calls without a task of
|
|
23
|
-
// judgment reads)
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
//
|
|
22
|
+
// Tools whose own schema names no task: those an Agent calls without a task of
|
|
23
|
+
// their own (entry, recall, team and judgment reads) and the records a task
|
|
24
|
+
// writes as it goes or closes. They take the current taskContextToken only to
|
|
25
|
+
// say which session they are for: without it, a call is refused while any
|
|
26
|
+
// session of its client is off, since no host session shows the current one
|
|
27
|
+
// (option Y, #251). The token is used here and never reaches the tool.
|
|
27
28
|
const ATTRIBUTED_TOOLS = new Set([
|
|
28
29
|
'get_collaboration_preferences', 'get_user_taste_skill', 'search_current_project_knowledge', 'search_knowledge_graph',
|
|
29
30
|
'search_connected_knowledge', 'list_project_agents', 'get_project_agent_context', 'get_project_agent_memory',
|
|
30
31
|
'list_preference_conflicts', 'resolve_deferred_preference_conflict', 'request_agent_attention', 'assess_agent_action',
|
|
31
|
-
'review_with_tonborg', 'get_agent_quality_gate', 'get_project_team', 'recommend_next_workflow_steps', 'find_agents'
|
|
32
|
+
'review_with_tonborg', 'get_agent_quality_gate', 'get_project_team', 'recommend_next_workflow_steps', 'find_agents',
|
|
33
|
+
'capture_session_knowledge', 'record_decision_trace', 'record_workflow_transition_observation',
|
|
34
|
+
'checkpoint_project_agent_memory', 'record_project_agent_task_activity', 'record_project_agent_executor_actual',
|
|
35
|
+
'record_project_agent_task_outcome'
|
|
32
36
|
]);
|
|
33
|
-
// Bare: a value
|
|
37
|
+
// Bare: a value that is not a current task token only leaves the call without a session.
|
|
34
38
|
const TOKEN_FIELD = Object.freeze({ type: 'string' });
|
|
35
39
|
|
|
36
40
|
// A tool definition as Agents see it: an attributed tool lists the token.
|
|
@@ -46,36 +50,61 @@ export function withoutSessionAttribution(name, input) {
|
|
|
46
50
|
return rest;
|
|
47
51
|
}
|
|
48
52
|
const GUIDANCE = 'FULI is off for this session, so nothing was read, injected, recorded or started. Do not call FULI tools for this session or add an agent_receipt; only the person can turn it on (/fuli start).';
|
|
49
|
-
|
|
53
|
+
// The refusals that are not the person turning FULI off here.
|
|
54
|
+
const REASON_GUIDANCE = Object.freeze({
|
|
55
|
+
session_unattributed: 'FULI could not tell which session this call comes from while a session of this client has FULI off, so nothing was read or started. Calls that carry the current taskContextToken of this session are served; do not describe this as the person stopping FULI here.',
|
|
56
|
+
// Every prompt, a "continue" included, begins a new task; only a session's
|
|
57
|
+
// current task can be checkpointed (store_task_contexts.py).
|
|
58
|
+
task_token_not_current: 'This call\'s taskContextToken is not the current task of its session (each new prompt, a "continue" included, begins a new task with a new token; a token of another client or one FULI never issued looks the same), and a session of this client has FULI off, so nothing was read, recorded or started. Retry with the taskContextToken from this turn\'s FULI context. Do not try to checkpoint or record the earlier task: a task that is no longer current cannot be checkpointed. Do not describe this as the person stopping FULI here.',
|
|
59
|
+
policy_unavailable: 'FULI could not read what it needs to decide whether this session may be served (its session state or this call\'s task), so nothing was read, recorded or started. This is not the person stopping FULI; a later call may be served.'
|
|
60
|
+
});
|
|
50
61
|
|
|
51
|
-
//
|
|
52
|
-
// not open while FULI may be off for some
|
|
53
|
-
|
|
54
|
-
|
|
62
|
+
// Runs an Agent's tool call (inside its request context) through the session
|
|
63
|
+
// layer. A tool that is not open is refused while FULI may be off for some
|
|
64
|
+
// session; otherwise it runs as before. A current task token an attributed
|
|
65
|
+
// tool carries binds the rest of the call to the token's session, so the
|
|
66
|
+
// capture decisions of its writes count that session as their task's, with
|
|
67
|
+
// its pause and stop, while another session of the client records nothing.
|
|
68
|
+
// A call that needs neither runs as before, synchronously.
|
|
69
|
+
export function runSessionGated(app, name, input, dispatch) {
|
|
70
|
+
const checked = !OPEN_TOOLS.has(name) && sessionsMayBeOff(app);
|
|
71
|
+
if (!checked && !ATTRIBUTED_TOOLS.has(name)) return dispatch();
|
|
72
|
+
// The client the call's process was started for decides, whatever the payload names or omits.
|
|
73
|
+
const sourceApplication = activeAgentHostClient() ?? input?.sourceApplication ?? 'other';
|
|
74
|
+
if (!checked && !sessionsMayBeWithoutCapture(app, sourceApplication)) return dispatch();
|
|
75
|
+
return gatedCall(app, name, input, dispatch, { checked, sourceApplication });
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
async function gatedCall(app, name, input, dispatch, { checked, sourceApplication }) {
|
|
79
|
+
const binding = await tokenBinding(app, input, sourceApplication);
|
|
80
|
+
const refusal = checked ? sessionFuliRefusal(app, input, sourceApplication, binding) : null;
|
|
81
|
+
if (refusal) return refusal;
|
|
82
|
+
return ATTRIBUTED_TOOLS.has(name) && binding.boundSessionId
|
|
83
|
+
? runWithTaskBoundSession(binding.boundSessionId, dispatch) : dispatch();
|
|
55
84
|
}
|
|
56
85
|
|
|
57
86
|
// The refusal a tool returns instead of running, or null. The session is the
|
|
58
87
|
// one the call's task token was bound to, the host session of the call or a
|
|
59
88
|
// session it names (session-layer-decision.js), never one a model can choose
|
|
60
89
|
// to allow it.
|
|
61
|
-
|
|
62
|
-
// The client the call's process was started for decides, whatever the payload names or omits.
|
|
63
|
-
const sourceApplication = activeAgentHostClient() ?? input?.sourceApplication ?? 'other';
|
|
90
|
+
function sessionFuliRefusal(app, input, sourceApplication, binding) {
|
|
64
91
|
const decision = sessionUseDecision(app, { sourceApplication,
|
|
65
|
-
sessionId: input?.sessionId ?? input?.sourceSessionId ?? null,
|
|
92
|
+
sessionId: input?.sessionId ?? input?.sourceSessionId ?? null, ...binding });
|
|
66
93
|
return decision.allowed ? null : { status: SESSION_FULI_OFF, reason: decision.reason,
|
|
67
|
-
notice: captureNotice(decision.reason, decision.since),
|
|
68
|
-
guidance: decision.reason === 'session_unattributed' ? UNATTRIBUTED_GUIDANCE : GUIDANCE };
|
|
94
|
+
notice: captureNotice(decision.reason, decision.since), guidance: REASON_GUIDANCE[decision.reason] ?? GUIDANCE };
|
|
69
95
|
}
|
|
70
96
|
|
|
71
|
-
//
|
|
72
|
-
//
|
|
73
|
-
|
|
97
|
+
// The session the call's task token is bound to or, for a token that binds it
|
|
98
|
+
// to none, why: it is not its session's current task, or the registry could
|
|
99
|
+
// not answer. That leaves the decision to the other identities; the tool
|
|
100
|
+
// itself then refuses the token. A value that cannot be a token says nothing.
|
|
101
|
+
async function tokenBinding(app, input, sourceApplication) {
|
|
74
102
|
const token = input?.taskContextToken;
|
|
75
|
-
if (typeof token !== 'string' || !token || token.length > 256 || !app.taskContextRegistry) return
|
|
103
|
+
if (typeof token !== 'string' || !token || token.length > 256 || !app.taskContextRegistry) return {};
|
|
76
104
|
try {
|
|
77
|
-
|
|
105
|
+
const boundSessionId = await app.taskContextRegistry.currentTaskSession(token, sourceApplication);
|
|
106
|
+
return boundSessionId ? { boundSessionId } : { tokenUnresolved: 'task_token_not_current' };
|
|
78
107
|
} catch {
|
|
79
|
-
return
|
|
108
|
+
return { tokenUnresolved: 'policy_unavailable' };
|
|
80
109
|
}
|
|
81
110
|
}
|
package/src/agent-tools.js
CHANGED
|
@@ -4,8 +4,7 @@ import { runWithAgentRequestContext } from './app/agent-request-context.js';
|
|
|
4
4
|
import { ROUNDTABLE_TOOL_DEFINITIONS, ROUNDTABLE_TOOL_NAMES, callRoundtableTool } from './agent-roundtable/tools.js';
|
|
5
5
|
import { ApplicationError } from './app/application-error.js';
|
|
6
6
|
import { withCaptureLookups } from './graphiti/capture-decision.js';
|
|
7
|
-
import {
|
|
8
|
-
from './agent-tools/session-fuli-gate.js';
|
|
7
|
+
import { runSessionGated, withoutSessionAttribution, withSessionAttribution } from './agent-tools/session-fuli-gate.js';
|
|
9
8
|
|
|
10
9
|
const TOOL_DEFINITIONS = [...GRAPH_TOOL_DEFINITIONS, ...ROUNDTABLE_TOOL_DEFINITIONS].map(withSessionAttribution);
|
|
11
10
|
|
|
@@ -22,8 +21,7 @@ export function callAgentTool(app, name, input = {}, requestContext = null) {
|
|
|
22
21
|
? callRoundtableTool(app.roundtable, name, toolInput)
|
|
23
22
|
: withCaptureLookups(() => dispatchGraphTool(app, name, toolInput));
|
|
24
23
|
// A session FULI is off for gets no memory and starts no collaboration (rec#5 C3b).
|
|
25
|
-
return runWithAgentRequestContext(requestContext,
|
|
26
|
-
? async () => await sessionFuliRefusal(app, input) ?? dispatch() : dispatch);
|
|
24
|
+
return runWithAgentRequestContext(requestContext, () => runSessionGated(app, name, input, dispatch));
|
|
27
25
|
}
|
|
28
26
|
|
|
29
27
|
function clone(value) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { randomUUID } from 'node:crypto';
|
|
3
|
-
import { PASS_TASK_TOKEN, TASK_RULES_ON_DEMAND } from '../lifecycle-message.js';
|
|
3
|
+
import { PASS_TASK_TOKEN, TASK_RULES_ON_DEMAND, taskClosingInstruction } from '../lifecycle-message.js';
|
|
4
4
|
import { transcriptLifecycle } from '../../conversations/transcript-lifecycle.js';
|
|
5
5
|
import { transcriptCaptureScope } from '../../conversations/sync-transcript.js';
|
|
6
6
|
import { captureDecision, withCaptureLookups } from '../../graphiti/capture-decision.js';
|
|
@@ -50,8 +50,9 @@ export async function claudeLifecycleOutput(event, input, invoke, { delivery, cu
|
|
|
50
50
|
const context = await invoke('begin_task_context', {
|
|
51
51
|
sessionId, projectPath: input.cwd, taskPrompt: input.prompt.slice(0, 8192), ...source, ...taskSceneInput(input.prompt)
|
|
52
52
|
});
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
const entry = compactTaskContext(context);
|
|
54
|
+
return preferenceHookOutput(entry, event, input, delivery, 'claude_code',
|
|
55
|
+
'Fuli task context. Apply effective_preferences. ' + taskClosingInstruction(entry) + PASS_TASK_TOKEN + TASK_RULES_ON_DEMAND);
|
|
55
56
|
}
|
|
56
57
|
const check = await invoke('verify_task_checkpoint', { sessionId, ...source });
|
|
57
58
|
return stopHookOutcome(check, invoke, source);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { randomUUID } from 'node:crypto';
|
|
3
|
-
import { PASS_TASK_TOKEN, TASK_RULES_ON_DEMAND } from '../lifecycle-message.js';
|
|
3
|
+
import { PASS_TASK_TOKEN, TASK_RULES_ON_DEMAND, taskClosingInstruction } from '../lifecycle-message.js';
|
|
4
4
|
import { outdatedMcpNotice, withOutdatedMcpNotice } from '../../mcp/process-registry.js';
|
|
5
5
|
import { FULI_VERSION } from '../../package-metadata.js';
|
|
6
6
|
import { transcriptLifecycle } from '../../conversations/transcript-lifecycle.js';
|
|
@@ -72,8 +72,9 @@ export async function codexLifecycleOutput(event, input, invoke, { delivery, cur
|
|
|
72
72
|
const context = await invoke('begin_task_context', { sessionId: input.session_id,
|
|
73
73
|
turnId: input.turn_id ?? null, projectPath: input.cwd, taskPrompt: input.prompt.slice(0, 8192),
|
|
74
74
|
sourceApplication: 'codex', sourceSessionId: input.session_id, ...taskSceneInput(input.prompt) });
|
|
75
|
-
const
|
|
76
|
-
|
|
75
|
+
const entry = compactTaskContext(context);
|
|
76
|
+
const output = await preferenceHookOutput(entry, event, input, delivery, 'codex',
|
|
77
|
+
'Fuli task context. Apply effective_preferences. ' + taskClosingInstruction(entry) + PASS_TASK_TOKEN + TASK_RULES_ON_DEMAND);
|
|
77
78
|
return review ? withCodexReviewGuidance(output) : output;
|
|
78
79
|
}
|
|
79
80
|
|
|
@@ -5,6 +5,24 @@
|
|
|
5
5
|
export const PASS_TASK_TOKEN = 'Pass taskContextToken to every FULI call. ';
|
|
6
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).';
|
|
7
7
|
|
|
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.
|
|
13
|
+
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
|
+
const checkpoint = entry.checkpoint_required === true ? `Before your final reply, call ${call}. `
|
|
18
|
+
: entry.checkpoint_guidance ? `The Stop hook closes this task. Call ${call} only when something is worth recording `
|
|
19
|
+
+ '(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
|
+
+ '(a receipt returned by checkpoint_task_knowledge replaces it). ' : '';
|
|
23
|
+
return checkpoint + receipt;
|
|
24
|
+
}
|
|
25
|
+
|
|
8
26
|
const DEFAULT_MAX_BYTES = 8_000;
|
|
9
27
|
const TRUNCATION_SUFFIX = '… [truncated]';
|
|
10
28
|
|
|
@@ -37,6 +37,24 @@ export function agentHostRequestContext(value, hostSessionId, sourceApplication
|
|
|
37
37
|
...(sourceApplication ? { [HOST_CLIENT]: sourceApplication } : {}) };
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
// Runs the rest of an Agent call for the session its task token is bound to.
|
|
41
|
+
// Only the session gate calls this, with the session the task registry
|
|
42
|
+
// resolved for a current token (session-fuli-gate.js); a payload field or a raw
|
|
43
|
+
// token never reaches it. Every session decision of the call then counts that
|
|
44
|
+
// session as the call's task session.
|
|
45
|
+
export function runWithTaskBoundSession(sessionId, operation) {
|
|
46
|
+
const store = requestContext.getStore();
|
|
47
|
+
if (!store || typeof sessionId !== 'string' || !sessionId) {
|
|
48
|
+
throw new TypeError('A task-bound session needs an Agent request and a resolved session');
|
|
49
|
+
}
|
|
50
|
+
return requestContext.run({ ...store, taskBoundSession: sessionId }, operation);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// The session the call's current task token was resolved to, or null.
|
|
54
|
+
export function activeTaskBoundSession() {
|
|
55
|
+
return requestContext.getStore()?.taskBoundSession ?? null;
|
|
56
|
+
}
|
|
57
|
+
|
|
40
58
|
// The host session of the Agent call being served: a session ID, null when the
|
|
41
59
|
// client named none, undefined outside an Agent's own call (hooks, console).
|
|
42
60
|
export function activeAgentHostSession() {
|
|
@@ -19,7 +19,10 @@ const REASON_NOTICES = Object.freeze({
|
|
|
19
19
|
session_start_unsaved: 'FULI 未能保存本会话开始时的设置,本会话保持停用,输入 /fuli start 可启用',
|
|
20
20
|
// The call carries no task token and its client cannot say which session it
|
|
21
21
|
// is, while one of that client's sessions has FULI off (session-layer-decision.js).
|
|
22
|
-
session_unattributed: 'FULI 无法确认这次调用来自哪个会话,而本客户端有会话已停用 FULI,所以没有提供'
|
|
22
|
+
session_unattributed: 'FULI 无法确认这次调用来自哪个会话,而本客户端有会话已停用 FULI,所以没有提供',
|
|
23
|
+
// The call's task token is not its session's current task (each new prompt
|
|
24
|
+
// begins a new one), under the same condition (session-fuli-gate.js).
|
|
25
|
+
task_token_not_current: '这次调用带的任务 token 已不是会话当前的任务(每次新的提问都会换新 token),而本客户端有会话已停用 FULI,所以没有提供'
|
|
23
26
|
});
|
|
24
27
|
// The global and client switches, and any reason without wording of its own.
|
|
25
28
|
const RECORDING_OFF = '自动记录已关闭';
|
|
@@ -5,19 +5,30 @@ import { utf8Preview } from '../text/utf8-preview.js';
|
|
|
5
5
|
|
|
6
6
|
export const AUTOMATIC_RECALL_BYTES = 4 * 1024;
|
|
7
7
|
export const SEARCH_PAGE_BYTES = 8 * 1024;
|
|
8
|
+
const QUERY_PREVIEW_BYTES = 160;
|
|
9
|
+
const PROJECT_ID_LIST_BYTES = 512;
|
|
10
|
+
const PROJECT_ID_LISTS = ['searchedPersonalProjectIds', 'requestedProjectIds', 'searchedProjectIds', 'failedProjectIds'];
|
|
11
|
+
// What a search call derives from its scope rather than from one query's
|
|
12
|
+
// results. A compound search states each once when every query shares it.
|
|
13
|
+
const CALL_SCOPE_FIELDS = ['retrievalGuidance', 'noMatchSourceMarker', 'personalGlobalIncluded',
|
|
14
|
+
'personalProjectScope', 'projectAgentId', ...PROJECT_ID_LISTS, 'project_ids_omitted', 'partial',
|
|
15
|
+
'subscriptions_omitted'];
|
|
8
16
|
const jsonBytes = value => Buffer.byteLength(JSON.stringify(value));
|
|
17
|
+
// Bounded by the bytes a page sends: JSON escaping turns a control character
|
|
18
|
+
// into six bytes and a quote or backslash into two.
|
|
19
|
+
const jsonPreview = (text, limit) => utf8Preview(text, limit, jsonBytes);
|
|
9
20
|
|
|
10
21
|
function itemPreview(item, textBytes) {
|
|
11
22
|
const result = { ...item };
|
|
12
23
|
delete result.attributes;
|
|
13
24
|
for (const key of ['name', 'type', 'source_entity', 'target_entity', 'relationship', 'fact', 'summary']) {
|
|
14
25
|
if (typeof result[key] !== 'string') continue;
|
|
15
|
-
const limited =
|
|
26
|
+
const limited = jsonPreview(result[key], ['fact', 'summary'].includes(key) ? textBytes : 160);
|
|
16
27
|
if (limited !== result[key]) result.text_truncated = true;
|
|
17
28
|
result[key] = limited;
|
|
18
29
|
}
|
|
19
30
|
const sources = Array.isArray(item.source_uris) ? item.source_uris : [];
|
|
20
|
-
result.source_uris = sources.filter(uri => typeof uri === 'string' &&
|
|
31
|
+
result.source_uris = sources.filter(uri => typeof uri === 'string' && jsonBytes(uri) <= 768).slice(0, 2);
|
|
21
32
|
if (sources.length > result.source_uris.length) result.source_uris_omitted = sources.length - result.source_uris.length;
|
|
22
33
|
return result;
|
|
23
34
|
}
|
|
@@ -85,21 +96,28 @@ export function budgetKnowledgeSearch(value, { cursor, context, consoleUrl,
|
|
|
85
96
|
if (!Number.isSafeInteger(index) || !Number.isSafeInteger(offset) || index >= entries.length
|
|
86
97
|
|| offset >= Array.from(entries[index].serialized).length) throw staleCursor();
|
|
87
98
|
}
|
|
88
|
-
const whole = { ...value,
|
|
99
|
+
const whole = { ...(compound ? sharedScope(value, value.results) : value),
|
|
100
|
+
retrieval_budget: { limit_bytes: SEARCH_PAGE_BYTES, complete: true } };
|
|
89
101
|
if (!cursor && jsonBytes(whole) <= SEARCH_PAGE_BYTES) return whole;
|
|
90
|
-
const
|
|
102
|
+
const top = compound ? sharedScope(searchMetadata(value), groups.map(searchMetadata)) : null;
|
|
103
|
+
const bases = compound ? top.results : [searchMetadata(value)];
|
|
91
104
|
const selected = [];
|
|
92
105
|
const render = (nextIndex, nextOffset = 0) => {
|
|
93
106
|
const rendered = bases.map((base, group) => {
|
|
94
107
|
const local = selected.filter(entry => entry.group === group);
|
|
108
|
+
const total_items = lists[group].length;
|
|
109
|
+
// A query with nothing on this page names itself and its count only;
|
|
110
|
+
// its details come with the page that carries its records.
|
|
111
|
+
if (compound && !local.length) return compactGroup(base, total_items);
|
|
95
112
|
const facts = local.filter(entry => entry.kind === 'facts').map(entry => entry.view);
|
|
96
113
|
const entities = local.filter(entry => entry.kind === 'entities').map(entry => entry.view);
|
|
97
|
-
|
|
98
|
-
|
|
114
|
+
const view = { ...base, facts, entities, sourceMarker: marker({ facts, entities }, consoleUrl) };
|
|
115
|
+
return compound ? { ...view, total_items } : { ...view, noMatchSourceMarker: marker({}, consoleUrl) };
|
|
99
116
|
});
|
|
100
117
|
const next = nextIndex < entries.length ? encode(nextIndex, nextOffset) : null;
|
|
101
|
-
return { ...(compound ? { ...
|
|
102
|
-
retrieval_budget: { limit_bytes: SEARCH_PAGE_BYTES, complete: !next, returned_items: selected.length
|
|
118
|
+
return { ...(compound ? { ...top, noMatchSourceMarker: marker({}, consoleUrl), results: rendered } : rendered[0]),
|
|
119
|
+
retrieval_budget: { limit_bytes: SEARCH_PAGE_BYTES, complete: !next, returned_items: selected.length,
|
|
120
|
+
total_items: entries.length },
|
|
103
121
|
...(next ? { next_cursor: next, continuation_tool: 'fuli_call', continuation_tool_name: toolName,
|
|
104
122
|
continuation_guidance: 'Repeat the same search and scope with next_cursor as cursor through fuli_call; do not widen scope.' } : {}) };
|
|
105
123
|
};
|
|
@@ -142,24 +160,57 @@ function identityPreview(item) {
|
|
|
142
160
|
.filter(key => item[key] !== undefined).map(key => [key, item[key]]));
|
|
143
161
|
}
|
|
144
162
|
|
|
163
|
+
// Fields every query group shares move to the top level once; a field that
|
|
164
|
+
// differs between queries stays on each group.
|
|
165
|
+
function sharedScope(top, groups) {
|
|
166
|
+
const shared = CALL_SCOPE_FIELDS.filter(key => groups.length && !(key in top) && key in groups[0]
|
|
167
|
+
&& groups.every(group => key in group && JSON.stringify(group[key]) === JSON.stringify(groups[0][key])));
|
|
168
|
+
return { ...top, ...Object.fromEntries(shared.map(key => [key, groups[0][key]])),
|
|
169
|
+
results: groups.map(group => Object.fromEntries(Object.entries(group).filter(([key]) => !shared.includes(key)))) };
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function compactGroup(base, total_items) {
|
|
173
|
+
return { query: base.query, total_items,
|
|
174
|
+
...Object.fromEntries(CALL_SCOPE_FIELDS.filter(key => key in base).map(key => [key, base[key]])) };
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Scope lists are informational: a continuation re-runs the search from its
|
|
178
|
+
// own input, so a page may name a prefix and count the rest.
|
|
179
|
+
function boundedIds(ids) {
|
|
180
|
+
const kept = [];
|
|
181
|
+
for (const id of ids) {
|
|
182
|
+
if (jsonBytes([...kept, id]) > PROJECT_ID_LIST_BYTES) break;
|
|
183
|
+
kept.push(id);
|
|
184
|
+
}
|
|
185
|
+
return kept;
|
|
186
|
+
}
|
|
187
|
+
|
|
145
188
|
function searchMetadata(value) {
|
|
146
189
|
const { facts, entities, results, sourceMarker, noMatchSourceMarker, subscriptions,
|
|
147
190
|
relatedProjectSuggestions, related_project_suggestions, ...rest } = value;
|
|
148
191
|
const result = { ...rest };
|
|
149
|
-
if (typeof result.query === 'string') result.query =
|
|
192
|
+
if (typeof result.query === 'string') result.query = jsonPreview(result.query, QUERY_PREVIEW_BYTES);
|
|
150
193
|
if (subscriptions?.length) result.subscriptions_omitted = subscriptions.length;
|
|
194
|
+
for (const key of PROJECT_ID_LISTS) {
|
|
195
|
+
if (!Array.isArray(result[key])) continue;
|
|
196
|
+
const kept = boundedIds(result[key]);
|
|
197
|
+
if (kept.length < result[key].length) {
|
|
198
|
+
result.project_ids_omitted = { ...result.project_ids_omitted, [key]: result[key].length - kept.length };
|
|
199
|
+
}
|
|
200
|
+
result[key] = kept;
|
|
201
|
+
}
|
|
151
202
|
for (const [key, items] of [['relatedProjectSuggestions', relatedProjectSuggestions],
|
|
152
203
|
['related_project_suggestions', related_project_suggestions]]) {
|
|
153
204
|
if (!Array.isArray(items)) continue;
|
|
154
205
|
result[key] = items.slice(0, 3).map(item => ({ ...item,
|
|
155
|
-
project_name: typeof item.project_name === 'string' ?
|
|
156
|
-
reason: typeof item.reason === 'string' ?
|
|
206
|
+
project_name: typeof item.project_name === 'string' ? jsonPreview(item.project_name, 160) : item.project_name,
|
|
207
|
+
reason: typeof item.reason === 'string' ? jsonPreview(item.reason, 256) : item.reason }));
|
|
157
208
|
if (items.length > 3) result.related_suggestions_omitted = items.length - 3;
|
|
158
209
|
}
|
|
159
210
|
// Detailed suggestions remain available on focused queries. Permission flags
|
|
160
211
|
// and exact confirmed_search targets above are retained, never inferred.
|
|
161
212
|
for (const key of ['relatedProjectGuidance', 'related_project_guidance']) {
|
|
162
|
-
if (typeof result[key] === 'string') result[key] =
|
|
213
|
+
if (typeof result[key] === 'string') result[key] = jsonPreview(result[key], 512);
|
|
163
214
|
}
|
|
164
215
|
return result;
|
|
165
216
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { debuglog } from 'node:util';
|
|
2
|
-
import { activeAgentHostClient, activeAgentHostSession } from '../app/agent-request-context.js';
|
|
2
|
+
import { activeAgentHostClient, activeAgentHostSession, activeTaskBoundSession } from '../app/agent-request-context.js';
|
|
3
3
|
import { isFuliProcessSession } from '../mcp/session-id.js';
|
|
4
4
|
|
|
5
5
|
// The session layer of what FULI does for a caller (rec#5 C3 and C3b): whether
|
|
@@ -9,7 +9,9 @@ import { isFuliProcessSession } from '../mcp/session-id.js';
|
|
|
9
9
|
// would trigger). Both answers rest on the same identities.
|
|
10
10
|
//
|
|
11
11
|
// Only two identities can authorize a call: the session bound to its task (the
|
|
12
|
-
// hook issued the task's token for the session it ran in
|
|
12
|
+
// hook issued the task's token for the session it ran in; a tool whose schema
|
|
13
|
+
// names no task is bound by the current token it carries, which the session
|
|
14
|
+
// gate resolved through the task registry) and, for an Agent's
|
|
13
15
|
// own MCP or CLI call, the host session its client process runs in
|
|
14
16
|
// (agentHostRequestContext()). A session the call merely names can only refuse
|
|
15
17
|
// it, never allow it. Calls outside an Agent call (hooks, the console) are
|
|
@@ -18,7 +20,10 @@ import { isFuliProcessSession } from '../mcp/session-id.js';
|
|
|
18
20
|
// window's port carry the session layer; a port composed without one (a test
|
|
19
21
|
// double) has no paused or stopped sessions.
|
|
20
22
|
//
|
|
21
|
-
// scope: { sourceApplication, boundSessionId, sessionId }
|
|
23
|
+
// scope: { sourceApplication, boundSessionId, sessionId, tokenUnresolved }
|
|
24
|
+
// tokenUnresolved: why a task token the call carried bound it to no session
|
|
25
|
+
// ('task_token_not_current' or 'policy_unavailable'). It changes no decision,
|
|
26
|
+
// only the reason a call refused for want of a task says.
|
|
22
27
|
|
|
23
28
|
const ALLOWED = Object.freeze({ allowed: true, reason: null, layer: null });
|
|
24
29
|
// NODE_DEBUG=fuli-capture shows decisions made without a session layer.
|
|
@@ -47,11 +52,12 @@ export function sessionCaptureDecision(application, scope) {
|
|
|
47
52
|
// FULI could not record, so a call without a task token is refused then too.
|
|
48
53
|
// Calls with a task token keep one window's stop out of another (C3b-5); a
|
|
49
54
|
// token's session with no durable record follows the default, so it is off.
|
|
55
|
+
// A call whose token did not resolve is refused the same way, saying why.
|
|
50
56
|
export function sessionUseDecision(application, scope) {
|
|
51
57
|
if (!sessionsMayBeOff(application)) return ALLOWED;
|
|
52
58
|
return decideSessions(application, scope, { refusal: offRefusal,
|
|
53
59
|
unattributed: sourceApplication => application.hasStoppedSession(sourceApplication)
|
|
54
|
-
|| !application.sessionFuliDefault().enabled ? denied('session_unattributed') : null });
|
|
60
|
+
|| !application.sessionFuliDefault().enabled ? denied(scope.tokenUnresolved ?? 'session_unattributed') : null });
|
|
55
61
|
}
|
|
56
62
|
|
|
57
63
|
// False when FULI is on for every session, the usual case, so a caller can
|
|
@@ -66,6 +72,18 @@ export function sessionsMayBeOff(application) {
|
|
|
66
72
|
}
|
|
67
73
|
}
|
|
68
74
|
|
|
75
|
+
// Whether a session of the client may record nothing (paused, stopped or
|
|
76
|
+
// started off), so a call's writes need to know which session they are for.
|
|
77
|
+
// True when the state cannot be read.
|
|
78
|
+
export function sessionsMayBeWithoutCapture(application, sourceApplication) {
|
|
79
|
+
if (!application.getSessionCapturePause) return false;
|
|
80
|
+
try {
|
|
81
|
+
return application.hasSessionWithoutCapture(sourceApplication);
|
|
82
|
+
} catch {
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
69
87
|
// Whether FULI is on for one host session and why, and the default for new
|
|
70
88
|
// sessions, for the session switch and its status (rec#5 C3b). Throws when
|
|
71
89
|
// the state cannot be read.
|
|
@@ -80,8 +98,12 @@ export function newSessionsFuli(application) {
|
|
|
80
98
|
return application.sessionFuliDefault().enabled ? 'on' : 'off';
|
|
81
99
|
}
|
|
82
100
|
|
|
83
|
-
function decideSessions(application, { boundSessionId = null, sessionId = null, sourceApplication: named = 'other' }, policy) {
|
|
101
|
+
function decideSessions(application, { boundSessionId: scopeTask = null, sessionId = null, sourceApplication: named = 'other' }, policy) {
|
|
84
102
|
const host = activeAgentHostSession();
|
|
103
|
+
// A tool whose schema names no task, called with a current task token: the
|
|
104
|
+
// session the registry resolved for it is the call's task session too.
|
|
105
|
+
const callTask = activeTaskBoundSession();
|
|
106
|
+
const boundSessionId = scopeTask ?? callTask;
|
|
85
107
|
// An Agent call's client is the one its process was started for, never the payload's.
|
|
86
108
|
const sourceApplication = activeAgentHostClient() ?? named;
|
|
87
109
|
const agentCall = host !== undefined;
|
|
@@ -100,7 +122,7 @@ function decideSessions(application, { boundSessionId = null, sessionId = null,
|
|
|
100
122
|
// The call's own sessions: its task's, any it names and, without a task,
|
|
101
123
|
// the host session of the call. With a task, the host session is checked
|
|
102
124
|
// below even when the MCP layer filled it in as the named session.
|
|
103
|
-
const own = boundSessionId ? [boundSessionId, sessionId === host ? null : sessionId] : [sessionId, host];
|
|
125
|
+
const own = boundSessionId ? [boundSessionId, callTask, sessionId === host ? null : sessionId] : [sessionId, host];
|
|
104
126
|
for (const id of new Set(own.filter(Boolean))) {
|
|
105
127
|
const refusal = policy.refusal(stateOf(id));
|
|
106
128
|
if (refusal) return refusal;
|
|
@@ -49,11 +49,14 @@ export function preferenceAuthorityView(value) {
|
|
|
49
49
|
return { ...present(value, [...PREFERENCE_FIELDS, ...REQUIRED_ENTRY_FIELDS, ...IDENTITY_FIELDS]), ...entryIdentity(value) };
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
//
|
|
53
|
-
//
|
|
54
|
-
|
|
52
|
+
// The token, checkpoint requirement and receipt lead, so a host that keeps
|
|
53
|
+
// only a preview of a long entry still shows how to close the task (rec#47
|
|
54
|
+
// F1); static rule references and canonically ordered instructions follow.
|
|
55
|
+
// This only reorders existing fields; the required byte budget stays.
|
|
56
|
+
export function entryFieldOrder(value) {
|
|
55
57
|
if (!value || typeof value !== 'object') return value;
|
|
56
|
-
const fields = ['task_guidance', 'application_guidance', 'effective_preferences',
|
|
58
|
+
const fields = [...REQUIRED_ENTRY_FIELDS, 'task_guidance', 'application_guidance', 'effective_preferences',
|
|
59
|
+
'preference_updates', 'preference_delivery'];
|
|
57
60
|
return { ...present(value, fields), ...Object.fromEntries(Object.entries(value).filter(([key]) => !fields.includes(key))) };
|
|
58
61
|
}
|
|
59
62
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
2
|
import { parseTaskAgentAssignment } from '../graphiti/task-agent-assignment.js';
|
|
3
3
|
import { taskActivityOrigin } from '../graphiti/task-activity-origin.js';
|
|
4
|
+
import { ProviderRequestError } from '../graphiti/provider-client.js';
|
|
4
5
|
|
|
5
6
|
// The Provider is the sole source of truth. Hooks commonly use separate MCP
|
|
6
7
|
// processes; a process-local cache cannot prove that a task was checkpointed.
|
|
@@ -40,6 +41,20 @@ export class ProviderTaskContextRegistry {
|
|
|
40
41
|
}));
|
|
41
42
|
}
|
|
42
43
|
|
|
44
|
+
// The host session of the task a token names while it is that session's
|
|
45
|
+
// current task, or null when it is not. The Provider answers 404 alike for a
|
|
46
|
+
// task a newer one of its session superseded (every prompt begins one), a
|
|
47
|
+
// task of another client and a token it never issued, so these are not told
|
|
48
|
+
// apart. Any other failure throws.
|
|
49
|
+
async currentTaskSession(token, sourceApplication = 'other') {
|
|
50
|
+
try {
|
|
51
|
+
return (await this.context(token, sourceApplication)).sessionId;
|
|
52
|
+
} catch (error) {
|
|
53
|
+
if (error instanceof ProviderRequestError && error.status === 404) return null;
|
|
54
|
+
throw error;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
43
58
|
async current(sessionId, sourceApplication = 'other') {
|
|
44
59
|
const value = await this.provider.currentTaskContext({
|
|
45
60
|
personal_space_id: this.personalSpaceId, session_id: sessionId,
|
package/src/mcp/tool-result.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApplicationError, isControlledError } from '../app/application-error.js';
|
|
2
2
|
import { BLOCKED_PREFERENCE_LABEL, blockedPreferenceDelivery, completeBlockedPreferenceDelivery,
|
|
3
|
-
preferenceDeliveryReason,
|
|
3
|
+
preferenceDeliveryReason, entryFieldOrder, TASK_PREFERENCE_RESULT_LIMIT_BYTES } from './preference-delivery.js';
|
|
4
4
|
|
|
5
5
|
const OMITTED_KEYS = new Set([
|
|
6
6
|
'store',
|
|
@@ -50,7 +50,7 @@ export function completePreferenceToolResult(value, limitBytes = TASK_PREFERENCE
|
|
|
50
50
|
else if (Object.keys(value ?? {}).some(key => !allowed.has(key)) || unsafe(value)) {
|
|
51
51
|
candidate = blockedPreferenceDelivery(value, 'unsafe_projection');
|
|
52
52
|
}
|
|
53
|
-
let result = envelope(
|
|
53
|
+
let result = envelope(entryFieldOrder(candidate));
|
|
54
54
|
if (jsonBytes(result) > limitBytes) {
|
|
55
55
|
result = envelope(blockedPreferenceDelivery(value, 'delivery_budget'));
|
|
56
56
|
if (jsonBytes(result) > limitBytes) throw new ApplicationError('validation', 'Cannot deliver the complete blocked preference recovery');
|
|
@@ -101,7 +101,7 @@ export function successToolResult(value, { limitBytes = RESULT_LIMIT_BYTES, item
|
|
|
101
101
|
);
|
|
102
102
|
const reason = preferenceContext && preferenceDeliveryReason(value, structuredContent);
|
|
103
103
|
if (reason) return blockedResult(reason);
|
|
104
|
-
const delivered = preferenceContext ?
|
|
104
|
+
const delivered = preferenceContext ? entryFieldOrder(structuredContent) : structuredContent;
|
|
105
105
|
return { content: [{ type: 'text', text: JSON.stringify(delivered) }], structuredContent: delivered };
|
|
106
106
|
}
|
|
107
107
|
|
|
@@ -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 = '
|
|
6
|
+
export const WIN_HELPER_SHA256 = '99ad273f8f06703de3455eba6eb6a559cb1966ca18983a6fa94f8c6f66583648';
|