fuli-context 0.27.2 → 0.27.4
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/{AboutPage-Bgcf03U0.js → AboutPage-DJxp-WMU.js} +1 -1
- package/dist/web/assets/AboutSectionHeading-BUu85T3-.js +1 -0
- package/dist/web/assets/AboutSectionHeading-CaZhhuuu.css +1 -0
- package/dist/web/assets/AgentAppsPage-Di4HU1sH.js +1 -0
- package/dist/web/assets/AgentAvatar-N7IaseYC.js +1 -0
- package/dist/web/assets/AgentAvatar-VUEAsIqM.css +1 -0
- package/dist/web/assets/{AgentHand-BwE2VGth.js → AgentHand-BDCERx8p.js} +1 -1
- package/dist/web/assets/AgentManagement-CJLZoyuq.js +7 -0
- package/dist/web/assets/AgentManagement-Cc00RLSO.css +1 -0
- package/dist/web/assets/{AgentMentionCopy-y3JD1Cef.js → AgentMentionCopy-Cpsy2XwV.js} +1 -1
- package/dist/web/assets/{AgentName-XrBcHq4R.js → AgentName-B150JTrl.js} +1 -1
- package/dist/web/assets/{AgentProfilePage-DE7z980p.js → AgentProfilePage-rckt2qEt.js} +3 -3
- package/dist/web/assets/AgentServicesPage-_rY596Cl.js +1 -0
- package/dist/web/assets/{AppViewerPage-BaKMk9pp.js → AppViewerPage-Kq3r1mwI.js} +1 -1
- package/dist/web/assets/{BackToTop-DITd9y7X.js → BackToTop-Da6u7_d8.js} +1 -1
- package/dist/web/assets/{BoardCardFieldsMenu-CWtHiVR-.js → BoardCardFieldsMenu-CyJSO3vT.js} +1 -1
- package/dist/web/assets/{BoardMoveMenu-CEDdltY7.js → BoardMoveMenu-B_lUROwH.js} +1 -1
- package/dist/web/assets/{Breadcrumb-C98voz9V.js → Breadcrumb-CA0zg3OI.js} +1 -1
- package/dist/web/assets/{CaptureChangePage-CE8tJfiQ.js → CaptureChangePage-nnCFkG4H.js} +1 -1
- package/dist/web/assets/Collection-CL-ehAUe.js +1 -0
- package/dist/web/assets/{CopyFixPrompt-C2hC04lV.js → CopyFixPrompt-Bp3GsUzJ.js} +1 -1
- package/dist/web/assets/{DataFormatPage-BjZkck9o.js → DataFormatPage-COPJnuZH.js} +1 -1
- package/dist/web/assets/DebugTurnPage-CuREiHr-.js +1 -0
- package/dist/web/assets/{DebugTurnsPage-BlDDz1Fk.js → DebugTurnsPage-i2jPDad3.js} +1 -1
- package/dist/web/assets/DialogTitle-aiTJ0Qmu.js +1 -0
- package/dist/web/assets/{EmployeeRedirectPage-CSSuvAqx.js → EmployeeRedirectPage-DPSjSW-l.js} +1 -1
- package/dist/web/assets/EmployeeScopeDialog-Bui2TPpl.js +1 -0
- package/dist/web/assets/{EmployeeWorkbench-DvEojWb7.js → EmployeeWorkbench-DAC8kuJP.js} +1 -1
- package/dist/web/assets/FieldRoot-B2x8LUg_.js +1 -0
- package/dist/web/assets/FlaBlockedTasks-CWa5T5nU.css +1 -0
- package/dist/web/assets/FlaBlockedTasks-Ds1c5xaw.js +1 -0
- package/dist/web/assets/{FlaGrowth-OdlmgEVi.js → FlaGrowth-CJSExsDl.js} +1 -1
- package/dist/web/assets/{FlaOccupationKit-CnouVWnU.js → FlaOccupationKit-yibMGA7g.js} +1 -1
- package/dist/web/assets/{FlaTaskSheets-rSIdCtzz.js → FlaTaskSheets-CJSjxa9s.js} +1 -1
- package/dist/web/assets/{FlasPage-BZ791caF.js → FlasPage-BvIsNjmr.js} +1 -1
- package/dist/web/assets/{GrowthLoading-BYOSvxZY.js → GrowthLoading-Ddj4TqCR.js} +1 -1
- package/dist/web/assets/{HowtoPage-DNTwYQCD.css → HowtoPage-DfHVIb8E.css} +1 -1
- package/dist/web/assets/HowtoPage-kSC2Tym0.js +1 -0
- package/dist/web/assets/{InboxPage-C3cSvJjB.js → InboxPage-Qfx9kB6z.js} +3 -3
- package/dist/web/assets/{KnowledgeDeleteButton-yc8Gi-BH.js → KnowledgeDeleteButton-yq2NE_5V.js} +1 -1
- package/dist/web/assets/{KnowledgeHardDeleteSection-D9Ktc-uC.js → KnowledgeHardDeleteSection-DYLuMTkw.js} +1 -1
- package/dist/web/assets/{KnowledgeItemEditPage-Csy4oOxD.js → KnowledgeItemEditPage-C_6CCT0l.js} +1 -1
- package/dist/web/assets/{KnowledgeItemSummaryCard-BH5UYmde.js → KnowledgeItemSummaryCard-DaS6I6IJ.js} +1 -1
- package/dist/web/assets/KnowledgeOrganizerPage-C0TW5FWc.js +1 -0
- package/dist/web/assets/KnowledgePage-CpU8zlbY.js +1 -0
- package/dist/web/assets/KnowledgePeek-C8KO5NBx.js +1 -0
- package/dist/web/assets/{KnowledgeTurnReceiptPage-Bd_LIdCc.js → KnowledgeTurnReceiptPage-Bss7rO8X.js} +1 -1
- package/dist/web/assets/{KnowledgeWorkspace-Be2gUul5.css → KnowledgeWorkspace-B2YB4aaQ.css} +1 -1
- package/dist/web/assets/KnowledgeWorkspace-NBt_5LEZ.js +4 -0
- package/dist/web/assets/{MeAvatar-CmhuRFOf.js → MeAvatar-ec_0AfqZ.js} +1 -1
- package/dist/web/assets/{MeLink-BesUihiS.js → MeLink-mcOCZh0y.js} +1 -1
- package/dist/web/assets/MenuSeparator-BdUe-nrq.js +1 -0
- package/dist/web/assets/ModelSettingsPage-DG4g9dZG.js +1 -0
- package/dist/web/assets/{NewSessionPanel-Bvp9ElzU.js → NewSessionPanel-Dp9REysi.js} +1 -1
- package/dist/web/assets/{NotFoundPage-BrolI2fz.js → NotFoundPage-mQNgXOdV.js} +1 -1
- package/dist/web/assets/NoticeRow-CVxAQhy5.js +1 -0
- package/dist/web/assets/NoticeRow-ktVO_9Es.css +1 -0
- package/dist/web/assets/OccupationsPage-M2bNGjfX.js +1 -0
- package/dist/web/assets/{PageOutline-DULpqEwg.js → PageOutline-BIuKlaez.js} +1 -1
- package/dist/web/assets/{PageStack-DTzWJuae.js → PageStack-CJdqrH8a.js} +1 -1
- package/dist/web/assets/PersonalProfilePage-CbgimIFG.js +1 -0
- package/dist/web/assets/PersonalProjectsPage-Dm38FUPv.js +1 -0
- package/dist/web/assets/{PinIcon-YYoaYKTx.js → PinIcon-DBS7pHXp.js} +1 -1
- package/dist/web/assets/PopperContent-DyZQrl-r.js +1 -0
- package/dist/web/assets/Presence-wz-KVyjT.js +3 -0
- package/dist/web/assets/{ProfileAuthorChip-BEfiuJbm.js → ProfileAuthorChip-DAY42zZ8.js} +1 -1
- package/dist/web/assets/ProjectAgentsPage-BKWGB-4t.js +5 -0
- package/dist/web/assets/{ProjectJudgmentPolicy-CCzHtmOb.js → ProjectJudgmentPolicy-D1UHlAih.js} +1 -1
- package/dist/web/assets/RequesterModeSelect-BpaRF_th.js +1 -0
- package/dist/web/assets/RequesterModeSelect-DH1PGLmn.css +1 -0
- package/dist/web/assets/RoundtablesPage-9mlvO7FV.js +13 -0
- package/dist/web/assets/{RoundtablesPage-DL-IOngN.css → RoundtablesPage-Cdbl7Tbx.css} +1 -1
- package/dist/web/assets/RovingFocusGroup-CHDkM3pP.js +1 -0
- package/dist/web/assets/RovingFocusItem-H6anRCEm.js +1 -0
- package/dist/web/assets/{SessionMigrationPage-DrK4df0L.js → SessionMigrationPage-DZfyUaJe.js} +1 -1
- package/dist/web/assets/{SessionRecordsPage-CFAgM65g.js → SessionRecordsPage-CK6iztwv.js} +1 -1
- package/dist/web/assets/SettingsPage-CVM1Gw0D.js +1 -0
- package/dist/web/assets/SettingsPage-DqZGF8J1.css +1 -0
- package/dist/web/assets/{SharedJefaReportPage-DbTPYwa_.js → SharedJefaReportPage-cfEk0Tzn.js} +1 -1
- package/dist/web/assets/{StatementCalendarPage-CIo5R14R.js → StatementCalendarPage-OmZa4AdL.js} +1 -1
- package/dist/web/assets/{StatementRows-CubaC9KG.js → StatementRows-Cdv1wlMo.js} +1 -1
- package/dist/web/assets/{TagVocabularyPage-BVlLmKv2.js → TagVocabularyPage-C9pRT-Co.js} +1 -1
- package/dist/web/assets/TaskBlockerClear-BBmPbomO.css +1 -0
- package/dist/web/assets/TaskBlockerClear-BGpJYYbz.js +1 -0
- package/dist/web/assets/TaskBlockerNotice-BtOREiqc.js +1 -0
- package/dist/web/assets/{TaskReason-CrLPeiOg.js → TaskReason-Dys3TUp_.js} +1 -1
- package/dist/web/assets/{TeamCard-SBMJMd7P.js → TeamCard-D7FU45G4.js} +1 -1
- package/dist/web/assets/{TeamCardsWidget-CGLW04TH.js → TeamCardsWidget-hYsXSXcW.js} +1 -1
- package/dist/web/assets/TeamIsland-Bw875ekj.js +9 -0
- package/dist/web/assets/Teleport-DcReQWaw.js +1 -0
- package/dist/web/assets/{TextField-Cd8UOHKv.js → TextField-BO5vPcVo.js} +1 -1
- package/dist/web/assets/TodayPage-D9HV_tMn.js +1 -0
- package/dist/web/assets/TodayPage-uBkMchn5.css +1 -0
- package/dist/web/assets/{TonborgDelegationSwitch-BOidSjkk.js → TonborgDelegationSwitch-TCl6Nu4Q.js} +1 -1
- package/dist/web/assets/{UiChip-B2z0UERX.js → UiChip-BDaNYy7i.js} +1 -1
- package/dist/web/assets/UiDialog-CkrPgXkI.js +1 -0
- package/dist/web/assets/{UiDisclosure-Bw4Wu0Dm.js → UiDisclosure-DHBkq9rj.js} +1 -1
- package/dist/web/assets/{UiIcon-BuaIQ57Z.js → UiIcon-BBBPl7ce.js} +1 -1
- package/dist/web/assets/UiSegmented-EzA-Ehx4.js +1 -0
- package/dist/web/assets/{UiWeight-DpBexUUy.js → UiWeight-EHzBhu5a.js} +1 -1
- package/dist/web/assets/{VirtualDirectoryList-RV2XtTPO.js → VirtualDirectoryList-BJrM_eeP.js} +1 -1
- package/dist/web/assets/VisitRequestDialog-ISewTzM3.css +1 -0
- package/dist/web/assets/VisitRequestDialog-jbgJBF2e.js +1 -0
- package/dist/web/assets/VisitRequestsPage-Bkxxiaxy.js +1 -0
- package/dist/web/assets/VisitRequestsPage-DfIzoLBx.css +1 -0
- package/dist/web/assets/{VisuallyHidden-DciDIEua.js → VisuallyHidden-CgxInDXj.js} +1 -1
- package/dist/web/assets/VisuallyHiddenInput-CaWSS7uB.js +1 -0
- package/dist/web/assets/WidgetSlot-DENSHLjb.js +2 -0
- package/dist/web/assets/WorkbenchListPage-J-UpUosh.js +1 -0
- package/dist/web/assets/_plugin-vue_export-helper-B0wc-mt_.js +9 -0
- package/dist/web/assets/{agent-apps-B_0syRPr.js → agent-apps-BNje45bS.js} +1 -1
- package/dist/web/assets/agent-occupation-aAG5t3l1.js +1 -0
- package/dist/web/assets/{agent-pins-B9wMvxGh.js → agent-pins-BCrkTGGW.js} +1 -1
- package/dist/web/assets/{agent-roster-records-CY0aSUNq.js → agent-roster-records-BFUsBcZY.js} +1 -1
- package/dist/web/assets/{agent-work-summary-Cs8jPFL0.js → agent-work-summary-B_VLOm6o.js} +1 -1
- package/dist/web/assets/{attach-closest-edge-BRDsvYPn.js → attach-closest-edge-BPnS_9Lk.js} +1 -1
- package/dist/web/assets/{attention-store-HMiJ1K6M.js → attention-store-qIzsiW3O.js} +1 -1
- package/dist/web/assets/{badge-jafr8Jg1.js → badge-CtWdRMi-.js} +1 -1
- package/dist/web/assets/{button-d6TCVE0s.js → button-_gyKncGb.js} +1 -1
- package/dist/web/assets/{card-ebnaJXQA.js → card-BYD6uklY.js} +1 -1
- package/dist/web/assets/{catalog-CvdvPGYk.js → catalog-PjA5J9yg.js} +1 -1
- package/dist/web/assets/checkbox-5re4FS0U.js +1 -0
- package/dist/web/assets/{client--hZxcKYo.js → client-LxAXnO12.js} +1 -1
- package/dist/web/assets/{client-links-store-XyR0EzJi.js → client-links-store-CYdBPEgD.js} +1 -1
- package/dist/web/assets/combobox-BPUtDA5_.js +1 -0
- package/dist/web/assets/{console-D597wx3f.js → console-D45-ZZfX.js} +1 -1
- package/dist/web/assets/{conversation-launcher-settings-CFFH9C2y.js → conversation-launcher-settings-BS2bz1uR.js} +1 -1
- package/dist/web/assets/copy-mention-D0xSzmH6.js +1 -0
- package/dist/web/assets/dialog-xaUosJps.js +1 -0
- package/dist/web/assets/{dist-B78L06NL.js → dist-C0lQzDOh.js} +1 -1
- package/dist/web/assets/{dist-Dy5JoHWF.js → dist-C1Hez3C6.js} +1 -1
- package/dist/web/assets/dropdown-menu-8tDY2fah.js +1 -0
- package/dist/web/assets/{field-DeguT8it.js → field-B9eFY0rX.js} +1 -1
- package/dist/web/assets/{format-bytes-Br4RwHnA.js → format-bytes-DHztF0Wp.js} +1 -1
- package/dist/web/assets/hover-card-CCcSIBsB.js +1 -0
- package/dist/web/assets/{identity-V8oA_IuB.js → identity-CW-Srg08.js} +1 -1
- package/dist/web/assets/index-CpxVWv-F.js +24 -0
- package/dist/web/assets/{input-CRCpCN_c.js → input-BiH7RC9P.js} +1 -1
- package/dist/web/assets/label-BdftnoQ0.js +1 -0
- package/dist/web/assets/label-table-CLQKbitJ.js +1 -0
- package/dist/web/assets/{model-BwOv-HBS.js → model-C7tDPa_1.js} +1 -1
- package/dist/web/assets/{model-CB4ObIOH.js → model-Cg5zXaMF.js} +1 -1
- package/dist/web/assets/{model-CwFZ_IgV.js → model-DDyIT1eK.js} +1 -1
- package/dist/web/assets/{model-CjQPAeCy.js → model-DMd25lv5.js} +1 -1
- package/dist/web/assets/{model-C-60EMcI.js → model-DXpi8vqS.js} +1 -1
- package/dist/web/assets/{model-D-vak-m0.js → model-DaJv8e-8.js} +1 -1
- package/dist/web/assets/{model-B4AuKvPj.js → model-Q1SCdf0F.js} +1 -1
- package/dist/web/assets/{model-CUAxIOXR.js → model-qBLcWPQW.js} +1 -1
- package/dist/web/assets/{motion-D5Fs3-ut.js → motion-4AmdlpVT.js} +1 -1
- package/dist/web/assets/{motion-Cr9JChF9.js → motion-D-GVIJyc.js} +1 -1
- package/dist/web/assets/{motion-preference-DgdzdVh8.js → motion-preference-CXHE1-Z7.js} +1 -1
- package/dist/web/assets/{occupation-catalog-DHsjkd_q.js → occupation-catalog-CsWai-cw.js} +1 -1
- package/dist/web/assets/{occupation-kits-BVLLRN4V.js → occupation-kits-CZQzDPeY.js} +1 -1
- package/dist/web/assets/{option-DhAwzags.js → option-B_OFUmRs.js} +1 -1
- package/dist/web/assets/{orchestration-filters-lhR2CHlQ.js → orchestration-filters-DqAPmniI.js} +1 -1
- package/dist/web/assets/{overview-data-QDnygL-x.js → overview-data-BbAd5G_f.js} +1 -1
- package/dist/web/assets/{page-refresh-BVRlo-dI.js → page-refresh-abwcdMEQ.js} +1 -1
- package/dist/web/assets/{page-title-ReSXziuS.js → page-title-cvuGZaZo.js} +1 -1
- package/dist/web/assets/{person-profile-BgUfg57K.js → person-profile-C8eoODdy.js} +1 -1
- package/dist/web/assets/popover-h4zQ7MDI.js +1 -0
- package/dist/web/assets/popup-host-8S4Sf9UR.js +1 -0
- package/dist/web/assets/{preference-conflicts-a-H51vUw.js → preference-conflicts-Cu00Gk8W.js} +1 -1
- package/dist/web/assets/{profile-model-CM98TJsj.js → profile-model-BZIzIQTS.js} +1 -1
- package/dist/web/assets/{project-board-layout-RH6UXkCA.js → project-board-layout-DxdyuEpb.js} +1 -1
- package/dist/web/assets/{project-capture-DcQ8cXIt.js → project-capture-BQ0ryWdP.js} +1 -1
- package/dist/web/assets/{project-origin-BNzeAazi.js → project-origin-CdqHLvij.js} +1 -1
- package/dist/web/assets/{quick-edit-api-COKVNuPk.js → quick-edit-api-sf5vVWXR.js} +1 -1
- package/dist/web/assets/radio-group-BdWVlNgf.js +1 -0
- package/dist/web/assets/{review-api-CAKGInLD.js → review-api-Cbrwrt6C.js} +1 -1
- package/dist/web/assets/{review-list-CbpXvBp-.js → review-list-D18L_t-q.js} +1 -1
- package/dist/web/assets/{review-store-BzrmqVoj.js → review-store-1jNUbNaJ.js} +1 -1
- package/dist/web/assets/{role-names-Ba0c6AbS.js → role-names-CiUKQtV9.js} +1 -1
- package/dist/web/assets/{roundtable-live-CoKmaXKd.js → roundtable-live-BzB34cUe.js} +1 -1
- package/dist/web/assets/{runtime-dom.esm-bundler-CaYBCU9Y.js → runtime-dom.esm-bundler-BwoD95K8.js} +1 -1
- package/dist/web/assets/select-D9sqPsDx.js +1 -0
- package/dist/web/assets/{session-launch-offers-C-oBkMKe.js → session-launch-offers-BOZp9NmT.js} +1 -1
- package/dist/web/assets/{settings-autosave-C3bTildI.js → settings-autosave-F9mwjeN-.js} +1 -1
- package/dist/web/assets/{settings-tabs-C9VDs91j.css → settings-tabs-D8608YHW.css} +1 -1
- package/dist/web/assets/settings-tabs-dWS8xFQR.js +1 -0
- package/dist/web/assets/shared-report-BmpdFBj3.js +3 -0
- package/dist/web/assets/{source-adapters-CunVF9JG.js → source-adapters-CZGvDHoP.js} +1 -1
- package/dist/web/assets/switch-BFhMPFpu.js +1 -0
- package/dist/web/assets/tabs-B6N6pM8p.js +1 -0
- package/dist/web/assets/{task-card-fields-Ce11pWnv.js → task-card-fields-G9NoV8iz.js} +1 -1
- package/dist/web/assets/{task-labels-BulIuDQB.js → task-labels-Y0y3oeAL.js} +1 -1
- package/dist/web/assets/{task-reason-gHlp8KHO.js → task-reason-D84kviwH.js} +1 -1
- package/dist/web/assets/{team-sheets-BzV1WjjK.js → team-sheets-DtMFWcPH.js} +1 -1
- package/dist/web/assets/{textarea-D6czUY3a.js → textarea-8EWEgEpw.js} +1 -1
- package/dist/web/assets/ui-BxmkvkMK.js +1 -0
- package/dist/web/assets/{useAgentRecords-DijrJ79w.js → useAgentRecords-D5CXJVEf.js} +1 -1
- package/dist/web/assets/{useAgentWorkSummary-CUv88AVP.js → useAgentWorkSummary-D1Ep9uAl.js} +1 -1
- package/dist/web/assets/{useApi-CROJJdhE-CxqsMZ6P.js → useApi-CROJJdhE-Cb6lwzpM.js} +1 -1
- package/dist/web/assets/{useClipboardCopy-uGyNKuWB.js → useClipboardCopy-C3PFlW0X.js} +1 -1
- package/dist/web/assets/{useFocusReturn-7BKdKvqF.js → useFocusReturn-B73WeAHQ.js} +1 -1
- package/dist/web/assets/useFormControl-DwHlZ4bV.js +1 -0
- package/dist/web/assets/useForwardExpose-4rpHye8H.js +1 -0
- package/dist/web/assets/{useForwardPropsEmits-BMeknK03.js → useForwardPropsEmits-DX7VZylm.js} +1 -1
- package/dist/web/assets/useForwardScopeId-BJDKoqyi.js +1 -0
- package/dist/web/assets/{useKnowledgeConfirm-mFWI8EbK.js → useKnowledgeConfirm-yhZ8Iqzc.js} +1 -1
- package/dist/web/assets/{useKnowledgeItemPeek-DtazLM2s.js → useKnowledgeItemPeek-D-zThKj5.js} +1 -1
- package/dist/web/assets/useListPages-BNB3C09x.js +1 -0
- package/dist/web/assets/{useMinimumLoadingDisplay-D5UC2KRz.js → useMinimumLoadingDisplay-DzHl6chR.js} +1 -1
- package/dist/web/assets/useNow-ChD63hSg.js +1 -0
- package/dist/web/assets/{usePageTools-BXkR_gpB.js → usePageTools-D3N7UX5-.js} +1 -1
- package/dist/web/assets/usePrimitiveElement-CdgGZRug.js +1 -0
- package/dist/web/assets/{useProjectAgentRoster-blZ5REnH.js → useProjectAgentRoster-BhjNHid8.js} +1 -1
- package/dist/web/assets/{useRoutePeek-D_j5KVFv.js → useRoutePeek-C2k0liTX.js} +1 -1
- package/dist/web/assets/{useTeamWork-e57CKhLW.js → useTeamWork-Bo2hjiA1.js} +1 -1
- package/dist/web/assets/{useTypeahead-6a1q-4Oq.js → useTypeahead-DTOx7gNa.js} +1 -1
- package/dist/web/assets/{utils-DBsOpQt4.js → utils-DXRJ1hJ4.js} +1 -1
- package/dist/web/assets/utils-DeBPoCtM.js +1 -0
- package/dist/web/assets/{verification-BlF0avgs.js → verification-DRKJF06P.js} +1 -1
- package/dist/web/assets/{version-oG6VyAd6.js → version-B2XiHNBv.js} +1 -1
- package/dist/web/assets/{vue-router-CCvxNose.js → vue-router-CbcwRkrV.js} +1 -1
- package/dist/web/assets/{NoticeRow-DD-J76Yo.css → workbench-card-Dt0820yW.css} +1 -1
- package/dist/web/index.html +77 -74
- package/docs/agent-roundtable.md +214 -3
- package/graph-provider/fuli_graph/graph_field_contract.py +2 -0
- package/graph-provider/fuli_graph/graph_format_migrations.py +5 -0
- package/graph-provider/fuli_graph/knowledge_search.py +84 -7
- package/graph-provider/fuli_graph/knowledge_sensitivity.py +105 -0
- package/graph-provider/fuli_graph/knowledge_source_delete_copies.py +36 -0
- package/graph-provider/fuli_graph/models.py +25 -0
- package/graph-provider/fuli_graph/project_agent_remote_origins.py +27 -13
- 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/packages/roundtable/src/agents/claude-code/constrained-run.js +58 -0
- package/packages/roundtable/src/agents/claude-code/wake.js +32 -12
- package/packages/roundtable/src/agents/codex/wake.js +25 -7
- package/packages/roundtable/src/agents/wake-usage.js +14 -0
- package/packages/roundtable/src/host.js +33 -0
- package/packages/roundtable/src/peer/control-cli.js +5 -1
- package/packages/roundtable/src/peer/control.js +10 -3
- package/packages/roundtable/src/peer/coordinator-service.js +30 -13
- package/packages/roundtable/src/peer/coordinator-store.js +11 -4
- package/packages/roundtable/src/peer/lan-addresses.js +8 -2
- package/packages/roundtable/src/peer/nearby-pairing.js +13 -1
- package/packages/roundtable/src/peer/origin-proof.js +17 -2
- package/packages/roundtable/src/peer/peer-port.js +45 -7
- package/packages/roundtable/src/peer/peer-runtime.js +40 -6
- package/packages/roundtable/src/peer/protocol.js +89 -2
- package/packages/roundtable/src/peer/query-answer.js +110 -0
- package/packages/roundtable/src/peer/runner.js +108 -13
- package/packages/roundtable/src/roundtable/constrained-run.js +48 -0
- package/packages/roundtable/src/roundtable/group-discussion.js +1 -1
- package/packages/roundtable/src/roundtable/service.js +120 -21
- package/packages/roundtable/src/roundtable/store.js +14 -0
- package/packages/roundtable/src/roundtable/wake-attempt-store.js +41 -0
- package/packages/roundtable/src/roundtable/wake-claim-release.js +20 -12
- package/packages/roundtable/src/roundtable/wake-failure.js +81 -0
- package/packages/roundtable/src/roundtable/wake-ladder.js +5 -0
- package/packages/roundtable/src/roundtable/wake.js +69 -24
- package/packages/roundtable/src/standalone/host.js +5 -2
- package/skills/capturing-session-knowledge/references/coordination.md +19 -0
- package/skills/operating-fuli/SKILL.md +12 -3
- package/skills/operating-fuli/references/workflow-recipes.md +7 -3
- package/src/agent-apps/host-tools/catalog.js +1 -0
- package/src/agent-kits/fuli-mcp-entry.js +25 -0
- package/src/agent-peer/http.js +15 -1
- package/src/agent-roundtable/tools.js +11 -0
- package/src/agent-tools/interface-catalog.js +21 -6
- package/src/agent-tools/statement-definitions.js +3 -1
- package/src/agents/claude-code/hook-contract.js +29 -0
- package/src/agents/claude-code/lifecycle-event.js +337 -0
- package/src/agents/claude-code/lifecycle-hook.js +10 -296
- package/src/agents/codex/hook-contract.js +31 -0
- package/src/agents/codex/lifecycle-event.js +350 -0
- package/src/agents/codex/lifecycle-hook.js +10 -326
- package/src/agents/lifecycle-events.js +75 -0
- package/src/agents/lifecycle-failure.js +3 -2
- package/src/agents/lifecycle-forwarder.js +268 -0
- package/src/agents/lifecycle-hook-calls.js +93 -0
- package/src/agents/source-applications.js +8 -0
- package/src/agents/token-usage-resolver.js +10 -0
- package/src/data-format/data-newer-than-package.js +65 -0
- package/src/data-format/local-stores.js +4 -1
- package/src/desktop/failed-update-recovery.js +80 -0
- package/src/desktop/macos-app-update.js +86 -22
- package/src/desktop/windows-controller.js +17 -4
- package/src/desktop/windows-installation-context.js +26 -1
- package/src/desktop/windows-installation-switch.js +83 -21
- package/src/desktop/windows-rollback.js +4 -4
- package/src/desktop/windows-tray-update.js +1 -1
- package/src/desktop/windows-update-command.js +4 -1
- package/src/desktop/windows-update.js +4 -4
- package/src/diagnostics/failure-records.js +18 -2
- package/src/diagnostics/query.js +2 -2
- package/src/diagnostics/safe-event.js +38 -12
- package/src/external-knowledge/safe-diagnostic.js +2 -5
- package/src/graphiti/federated-application.js +2 -1
- package/src/graphiti/local-runtimes.js +25 -1
- package/src/graphiti/project-agent-task-sessions.js +1 -8
- package/src/graphiti/roundtable-host.js +62 -0
- package/src/graphiti/runtime-config.js +3 -1
- package/src/graphiti/task-context-entry.js +6 -3
- package/src/guest-access/failed-bearer-limit.js +31 -0
- package/src/guest-access/guest-card.js +22 -0
- package/src/guest-access/guest-mcp.js +34 -0
- package/src/guest-access/guest-routes.js +144 -0
- package/src/guest-access/listener.js +152 -0
- package/src/guest-access/refusal-tally.js +37 -0
- package/src/guest-access/runtime.js +117 -0
- package/src/http/api-router.js +10 -1
- package/src/http/guest-links-api-router.js +42 -0
- package/src/http/lifecycle-hooks-api-router.js +128 -0
- package/src/http/response.js +7 -6
- package/src/http/statement-api-router.js +10 -3
- package/src/http/visitor-access-api-router.js +51 -0
- package/src/judgment/routing.js +6 -1
- package/src/knowledge-impressions/store.js +30 -6
- package/src/local-runtime/console-autostart-record.js +10 -0
- package/src/local-runtime/console-health.js +7 -2
- package/src/local-runtime/lifecycle.js +2 -3
- package/src/mcp/create-mcp-server.js +2 -0
- package/src/mcp/http-session-transport.js +384 -0
- package/src/mcp/remote-http-server.js +27 -357
- package/src/mcp/session-id.js +1 -1
- package/src/mcp/tool-annotations.js +3 -1
- package/src/native-runtime/runtime.js +28 -3
- package/src/native-runtime/windows-processes.js +6 -6
- package/src/presence/windows-helper-pin.js +1 -1
- package/src/server/lan-access.js +43 -9
- package/src/server.js +31 -2
- package/src/setup/graph-runtime.js +10 -6
- package/src/statement/agent-tool.js +16 -8
- package/src/statement/compounding-statement.js +55 -0
- package/src/system/doctor.js +1 -1
- package/src/system/fuli-process-scan.js +81 -0
- package/src/system/system-service.js +2 -2
- package/src/text/control-characters.js +9 -0
- package/src/text/local-paths.js +98 -0
- package/src/text/shareable-text.js +23 -0
- package/src/visit-requests/auto-envelope.js +101 -0
- package/src/visit-requests/git-names.js +10 -0
- package/src/visit-requests/http.js +105 -0
- package/src/visit-requests/peer-entry.js +18 -0
- package/src/visit-requests/records.js +140 -0
- package/src/visit-requests/runner.js +164 -0
- package/src/visit-requests/service.js +575 -0
- package/src/visit-requests/worktree.js +351 -0
- package/src/visitor-access/guest-links.js +75 -0
- package/src/visitor-access/port.js +269 -0
- package/src/visitor-access/rate-limit.js +49 -0
- package/src/visitor-access/shared-project-search.js +129 -0
- package/src/visitor-access/store.js +313 -0
- package/src/whats-new/lines/0.27.3.json +13 -0
- package/src/whats-new/lines/0.27.4.json +13 -0
- package/dist/web/assets/AboutSectionHeading-BaQBY_Xs.js +0 -1
- package/dist/web/assets/AboutSectionHeading-DjXpIV27.css +0 -1
- package/dist/web/assets/AgentAppsPage-DNuujLT2.js +0 -1
- package/dist/web/assets/AgentAvatar-DGXedNUs.js +0 -1
- package/dist/web/assets/AgentAvatar-DbsG1_BY.css +0 -1
- package/dist/web/assets/AgentManagement-2r8DUS1N.js +0 -7
- package/dist/web/assets/AgentManagement-hRkMpjvY.css +0 -1
- package/dist/web/assets/AgentServicesPage-CWfGSxcb.js +0 -1
- package/dist/web/assets/DebugTurnPage-B82geu1y.js +0 -1
- package/dist/web/assets/DialogTitle-fpANsAcy.js +0 -1
- package/dist/web/assets/EmployeeScopeDialog-BoEMQOEj.js +0 -1
- package/dist/web/assets/FieldRoot-D3lnRut5.js +0 -1
- package/dist/web/assets/HowtoPage-lYwzi4Vm.js +0 -1
- package/dist/web/assets/KnowledgeOrganizerPage-BTeQX0gH.js +0 -1
- package/dist/web/assets/KnowledgePage-BuukvNxz.js +0 -1
- package/dist/web/assets/KnowledgePeek-D0pcU7U5.js +0 -1
- package/dist/web/assets/KnowledgeWorkspace-Dr-zYpDQ.js +0 -4
- package/dist/web/assets/MenuSeparator-BGo0DgyF.js +0 -1
- package/dist/web/assets/ModelSettingsPage-CBPwuIBM.js +0 -1
- package/dist/web/assets/NoticeRow-Q9QT5NqB.js +0 -1
- package/dist/web/assets/OccupationsPage-CZCeeihl.js +0 -1
- package/dist/web/assets/PersonalProfilePage-DbXWycCQ.js +0 -1
- package/dist/web/assets/PersonalProjectsPage-pdAJpnZd.js +0 -1
- package/dist/web/assets/PopperContent-CnNwFMIA.js +0 -1
- package/dist/web/assets/Presence-CuIoA2sH.js +0 -3
- package/dist/web/assets/ProjectAgentsPage-BPf2RLsw.js +0 -5
- package/dist/web/assets/RoundtablesPage-BDU4W-bg.js +0 -13
- package/dist/web/assets/RovingFocusGroup-DS4v3bEq.js +0 -1
- package/dist/web/assets/RovingFocusItem-bLEnnw2Y.js +0 -1
- package/dist/web/assets/SettingsPage-CsJxhhsu.js +0 -1
- package/dist/web/assets/SettingsPage-VX_e4ty2.css +0 -1
- package/dist/web/assets/TaskBlockerNotice-YSvmy6B4.js +0 -1
- package/dist/web/assets/TeamIsland-jJKTwCJD.js +0 -9
- package/dist/web/assets/Teleport-CRjWb-eC.js +0 -1
- package/dist/web/assets/TodayPage-BvbZCEFJ.js +0 -1
- package/dist/web/assets/TodayPage-EJ8SWFE0.css +0 -1
- package/dist/web/assets/UiSegmented-DlI1vR3k.js +0 -1
- package/dist/web/assets/VisuallyHiddenInput-mfi7gVBu.js +0 -1
- package/dist/web/assets/WidgetSlot-xFZKjZ5z.js +0 -2
- package/dist/web/assets/WorkbenchListPage-suawrzji.js +0 -1
- package/dist/web/assets/_plugin-vue_export-helper-CYsAcErn.js +0 -9
- package/dist/web/assets/agent-occupation-C-9THmIG.js +0 -1
- package/dist/web/assets/checkbox-CdIozFRY.js +0 -1
- package/dist/web/assets/combobox-DzLSYxyO.js +0 -1
- package/dist/web/assets/copy-mention-CWsw8po1.js +0 -1
- package/dist/web/assets/dialog-SLa8cPbS.js +0 -1
- package/dist/web/assets/dropdown-menu-C-PcZxRY.js +0 -1
- package/dist/web/assets/hover-card-B-H7mMvg.js +0 -1
- package/dist/web/assets/index-DdAVEwQV.js +0 -24
- package/dist/web/assets/label-DwMBzI2m.js +0 -1
- package/dist/web/assets/label-table-DiaZlHIp.js +0 -1
- package/dist/web/assets/popover-UYksnAeH.js +0 -1
- package/dist/web/assets/popup-host-DMoMkD3v.js +0 -1
- package/dist/web/assets/radio-group-DfegNkLG.js +0 -1
- package/dist/web/assets/select-Bq2TQ0Gw.js +0 -1
- package/dist/web/assets/settings-tabs-DFZcxOaQ.js +0 -1
- package/dist/web/assets/shared-report-Ci1jBiYV.js +0 -3
- package/dist/web/assets/switch-DaUSEDq0.js +0 -1
- package/dist/web/assets/tabs-B_7xQRfl.js +0 -1
- package/dist/web/assets/ui-BCHzwL4X.js +0 -1
- package/dist/web/assets/useDirection-Bi78LycK.js +0 -1
- package/dist/web/assets/useForwardScopeId-DHGSyWlZ.js +0 -1
- package/dist/web/assets/usePrimitiveElement-BxOn-Fn_.js +0 -1
- package/dist/web/assets/utils-BQtZ8ZUw.js +0 -1
- package/src/system/mcp-process-scan.js +0 -55
|
@@ -23,6 +23,7 @@ from .search_projection import (
|
|
|
23
23
|
source_uris_from_references,
|
|
24
24
|
)
|
|
25
25
|
from .knowledge_semantic import cosine_parts, fused_ranking, standing_out, usable_cosine, vector_norm
|
|
26
|
+
from .knowledge_sensitivity import normal_only_ids
|
|
26
27
|
from .knowledge_weight import knowledge_weight, ranking_weight
|
|
27
28
|
from .knowledge_tag_ranking import TagRanking
|
|
28
29
|
from .knowledge_visibility import AgentReader, fla_endpoints_visible_cypher, fla_visible, reader_parameter
|
|
@@ -87,6 +88,9 @@ async def search_knowledge(store, actor: dict, request: SearchRequest, *, tag_ex
|
|
|
87
88
|
edges = [*edges, *(edge for edge in meaning_edges if edge.uuid not in lexical_ids)]
|
|
88
89
|
if not request.include_historical:
|
|
89
90
|
edges = [edge for edge in edges if edge.invalid_at is None]
|
|
91
|
+
if _visitor(request):
|
|
92
|
+
normal_ids = await normal_only_ids(store, 'relationship', [edge.uuid for edge in edges])
|
|
93
|
+
edges = [edge for edge in edges if edge.uuid in normal_ids]
|
|
90
94
|
project_scopes = {}
|
|
91
95
|
if personal_space:
|
|
92
96
|
project_scopes = await personal_project_scopes(
|
|
@@ -99,10 +103,17 @@ async def search_knowledge(store, actor: dict, request: SearchRequest, *, tag_ex
|
|
|
99
103
|
personal_space,
|
|
100
104
|
request,
|
|
101
105
|
project_scopes,
|
|
102
|
-
request
|
|
106
|
+
_personal_global(request),
|
|
103
107
|
[edge.uuid for edge in edges],
|
|
104
108
|
)
|
|
105
109
|
edges = [edge for edge in edges if edge.uuid in allowed]
|
|
110
|
+
if _visitor(request):
|
|
111
|
+
# Before names are read: a hidden endpoint's name takes no part in scoring.
|
|
112
|
+
visible = await _visible_endpoints(store, personal_space, request, project_scopes, edges)
|
|
113
|
+
edges = [edge for edge in edges
|
|
114
|
+
if edge.source_node_uuid in visible and edge.target_node_uuid in visible]
|
|
115
|
+
if request.excluded_entity_types:
|
|
116
|
+
edges = await _without_excluded_endpoints(store, request, edges)
|
|
106
117
|
epistemic = await read_edge_epistemic_metadata(store, [edge.uuid for edge in edges])
|
|
107
118
|
if personal_space:
|
|
108
119
|
epistemic = {
|
|
@@ -174,6 +185,59 @@ async def search_knowledge(store, actor: dict, request: SearchRequest, *, tag_ex
|
|
|
174
185
|
)
|
|
175
186
|
|
|
176
187
|
|
|
188
|
+
def _visitor(request: SearchRequest) -> bool:
|
|
189
|
+
"""A visitor's search (max_sensitivity='normal'). It implies the strict
|
|
190
|
+
visitor scope whatever the request's other switches say: only items
|
|
191
|
+
defined in the active project (not inherited, referenced or global), no
|
|
192
|
+
preferences and no FLA memory. The request model also refuses a visitor
|
|
193
|
+
search whose switches say otherwise."""
|
|
194
|
+
return request.max_sensitivity == 'normal'
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
def _personal_global(request: SearchRequest) -> bool:
|
|
198
|
+
return request.include_personal_global and not _visitor(request)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
def _visitor_scope_allows(record, scope, request: SearchRequest) -> bool:
|
|
202
|
+
return (scope.get('defined_project_id') == request.active_personal_project_id
|
|
203
|
+
and not scope.get('inherited') and not scope.get('project_agent_id')
|
|
204
|
+
and not record.get('profile_aspect'))
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
async def _visible_endpoints(store, space, request: SearchRequest, project_scopes, edges) -> set[str]:
|
|
208
|
+
"""The endpoints a visitor search may show as entities itself (the
|
|
209
|
+
visitor scope, of no excluded type, current, confirmed, only normal
|
|
210
|
+
sources). A relationship reaching any other entity says something about
|
|
211
|
+
it, so it is left out with it."""
|
|
212
|
+
endpoint_ids = list(dict.fromkeys(
|
|
213
|
+
uuid for edge in edges for uuid in (edge.source_node_uuid, edge.target_node_uuid)))
|
|
214
|
+
if not endpoint_ids:
|
|
215
|
+
return set()
|
|
216
|
+
records = await _scoped_entity_records(store, space, request, project_scopes, entity_ids=endpoint_ids)
|
|
217
|
+
return {record['id'] for record in records}
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
async def _without_excluded_endpoints(store, request: SearchRequest, edges):
|
|
221
|
+
"""The relationships none of whose endpoints is of an excluded type."""
|
|
222
|
+
endpoint_ids = list(dict.fromkeys(
|
|
223
|
+
uuid for edge in edges for uuid in (edge.source_node_uuid, edge.target_node_uuid)))
|
|
224
|
+
if not endpoint_ids:
|
|
225
|
+
return edges
|
|
226
|
+
records, _, _ = await store.runtime.driver.execute_query(
|
|
227
|
+
'''
|
|
228
|
+
MATCH (node:Entity) WHERE node.uuid IN $uuids
|
|
229
|
+
AND coalesce(node.fuli_type, 'Entity') IN $excluded_entity_types
|
|
230
|
+
RETURN node.uuid AS uuid
|
|
231
|
+
''',
|
|
232
|
+
uuids=endpoint_ids,
|
|
233
|
+
excluded_entity_types=list(request.excluded_entity_types),
|
|
234
|
+
routing_='r',
|
|
235
|
+
)
|
|
236
|
+
excluded = {record['uuid'] for record in records}
|
|
237
|
+
return [edge for edge in edges
|
|
238
|
+
if edge.source_node_uuid not in excluded and edge.target_node_uuid not in excluded]
|
|
239
|
+
|
|
240
|
+
|
|
177
241
|
async def personal_edge_scopes(
|
|
178
242
|
store,
|
|
179
243
|
space: dict,
|
|
@@ -245,6 +309,7 @@ async def personal_edge_scopes(
|
|
|
245
309
|
include_personal_global,
|
|
246
310
|
)
|
|
247
311
|
) is not None
|
|
312
|
+
and (not _visitor(request) or _visitor_scope_allows(record, scope, request))
|
|
248
313
|
}
|
|
249
314
|
|
|
250
315
|
|
|
@@ -265,6 +330,7 @@ async def personal_project_scopes(
|
|
|
265
330
|
if (
|
|
266
331
|
not active_id
|
|
267
332
|
or not request.inherit_project_knowledge
|
|
333
|
+
or _visitor(request)
|
|
268
334
|
):
|
|
269
335
|
return scopes
|
|
270
336
|
records, _, _ = await store.runtime.driver.execute_query(
|
|
@@ -353,7 +419,7 @@ async def _personal_entities(
|
|
|
353
419
|
tag_ranking=None,
|
|
354
420
|
tag_explanations=None,
|
|
355
421
|
) -> list[EntitySearchResult]:
|
|
356
|
-
if not project_scopes and not request
|
|
422
|
+
if not project_scopes and not _personal_global(request):
|
|
357
423
|
return []
|
|
358
424
|
scoped_records = await _scoped_entity_records(store, space, request, project_scopes)
|
|
359
425
|
term_weights = _term_weights(request.query, scoped_records)
|
|
@@ -376,7 +442,8 @@ async def _personal_entities(
|
|
|
376
442
|
|
|
377
443
|
|
|
378
444
|
async def _scoped_entity_records(store, space, request: SearchRequest, project_scopes: dict[str, dict],
|
|
379
|
-
*, semantic_model: str | None = None
|
|
445
|
+
*, semantic_model: str | None = None,
|
|
446
|
+
entity_ids: list[str] | None = None) -> list[dict]:
|
|
380
447
|
"""The entities this search may return, with their scope. With a
|
|
381
448
|
semantic_model, only those carrying a vector of that model, and what
|
|
382
449
|
its cosine with the query is made of: the same filters decide either way
|
|
@@ -384,7 +451,9 @@ async def _scoped_entity_records(store, space, request: SearchRequest, project_s
|
|
|
384
451
|
records, _, _ = await store.runtime.driver.execute_query(
|
|
385
452
|
'''
|
|
386
453
|
MATCH (node:Entity {group_id: $group_id})
|
|
387
|
-
WHERE $semantic_model IS NULL OR node.fuli_semantic_model = $semantic_model
|
|
454
|
+
WHERE ($semantic_model IS NULL OR node.fuli_semantic_model = $semantic_model)
|
|
455
|
+
AND ($entity_ids IS NULL OR node.uuid IN $entity_ids)
|
|
456
|
+
AND NOT coalesce(node.fuli_type, 'Entity') IN $excluded_entity_types
|
|
388
457
|
OPTIONAL MATCH (episode:Episodic {group_id: $group_id})-[:MENTIONS]->(node)
|
|
389
458
|
WITH node, collect(DISTINCT episode) AS episodes
|
|
390
459
|
OPTIONAL MATCH (assignment:FuliKnowledgeAssignment {
|
|
@@ -491,6 +560,8 @@ async def _scoped_entity_records(store, space, request: SearchRequest, project_s
|
|
|
491
560
|
project_ids=list(project_scopes),
|
|
492
561
|
include_historical=request.include_historical,
|
|
493
562
|
include_pending=request.include_pending,
|
|
563
|
+
entity_ids=entity_ids,
|
|
564
|
+
excluded_entity_types=list(request.excluded_entity_types),
|
|
494
565
|
semantic_model=semantic_model,
|
|
495
566
|
**({'query_vector': request.semantic.vector, 'length': len(request.semantic.vector)} if semantic_model else {}),
|
|
496
567
|
candidate_limit=SEMANTIC_CANDIDATE_LIMIT if semantic_model else store.settings.graph_limit,
|
|
@@ -515,10 +586,13 @@ async def _scoped_entity_records(store, space, request: SearchRequest, project_s
|
|
|
515
586
|
record,
|
|
516
587
|
request,
|
|
517
588
|
project_scopes,
|
|
518
|
-
request
|
|
589
|
+
_personal_global(request),
|
|
519
590
|
)
|
|
520
|
-
if scope is not None:
|
|
591
|
+
if scope is not None and (not _visitor(request) or _visitor_scope_allows(record, scope, request)):
|
|
521
592
|
scoped_records.append({**record, **scope})
|
|
593
|
+
if _visitor(request):
|
|
594
|
+
normal_ids = await normal_only_ids(store, 'entity', [record['id'] for record in scoped_records])
|
|
595
|
+
scoped_records = [record for record in scoped_records if record['id'] in normal_ids]
|
|
522
596
|
return scoped_records
|
|
523
597
|
|
|
524
598
|
|
|
@@ -669,7 +743,10 @@ def _item_scope_metadata(
|
|
|
669
743
|
project_scopes[request.active_personal_project_id],
|
|
670
744
|
request.project_agent_id,
|
|
671
745
|
)
|
|
672
|
-
|
|
746
|
+
# A reference shows another project's item here; a search that asks for
|
|
747
|
+
# only this project's own items leaves it out.
|
|
748
|
+
reference_project_ids = (list(record.get('reference_project_ids') or [])
|
|
749
|
+
if request.include_project_references and not _visitor(request) else [])
|
|
673
750
|
project_ids = (
|
|
674
751
|
[assignment_project_id]
|
|
675
752
|
if assignment_project_id else episode_project_ids
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"""Which knowledge items a visitor's search may return (max_sensitivity='normal').
|
|
2
|
+
|
|
3
|
+
Sensitivity is stored only on episodes (`fuli_sensitivity`). An item reaches
|
|
4
|
+
a visitor only when every source it has, and every source of every version
|
|
5
|
+
it replaced or absorbed (edits, supersedes and duplicate merges all point the
|
|
6
|
+
older item at the newer one with fuli_replaced_by_item_id), is explicitly
|
|
7
|
+
normal, and there is at least one. One private or restricted source anywhere
|
|
8
|
+
in that lineage keeps the item out: an entity a private capture created
|
|
9
|
+
keeps that capture's words even after a normal one mentions it.
|
|
10
|
+
|
|
11
|
+
An edit episode (knowledge_versions._write_edit_episodes) says nothing about
|
|
12
|
+
how sensitive the knowledge is, so it counts neither way. An episode without
|
|
13
|
+
a stored sensitivity is not normal: every FULI writer has set it since the
|
|
14
|
+
graph's first release, so a missing value is not FULI's capture and is not
|
|
15
|
+
trusted.
|
|
16
|
+
|
|
17
|
+
The walk reads MAX_VERSION_DEPTH levels of predecessors; a lineage with a
|
|
18
|
+
predecessor still unread after that is left out.
|
|
19
|
+
|
|
20
|
+
Deleted sources. A relationship lists its episodes by id (`episodes`); one
|
|
21
|
+
whose list names an episode that no longer exists is left out, since that
|
|
22
|
+
episode's sensitivity cannot be read. FULI's own source delete
|
|
23
|
+
(knowledge_source_delete_copies) marks every item that outlives the deletion
|
|
24
|
+
of a non-normal, non-edit source with fuli_had_restricted_source = true
|
|
25
|
+
(graph format 20); a lineage with that marker on any version is left out.
|
|
26
|
+
Known limits, not checked here:
|
|
27
|
+
- A source deleted before graph format 20 left no marker, and none is
|
|
28
|
+
backfilled.
|
|
29
|
+
- A deletion outside FULI's source delete leaves nothing on an entity (it
|
|
30
|
+
records no list of its sources) or on a successor (the version link is
|
|
31
|
+
stored only on the older item).
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
MAX_VERSION_DEPTH = 20
|
|
35
|
+
EDIT_SOURCE_KINDS = ('human_knowledge_edit', 'agent_knowledge_edit')
|
|
36
|
+
|
|
37
|
+
_ITEM = {
|
|
38
|
+
'entity': ('(item:Entity)', '''
|
|
39
|
+
OPTIONAL MATCH (episode:Episodic {group_id: item.group_id})-[:MENTIONS]->(item)
|
|
40
|
+
WITH origin, item, collect(DISTINCT episode) AS episodes, 0 AS missing'''),
|
|
41
|
+
'relationship': ('()-[item:RELATES_TO]->()', '''
|
|
42
|
+
OPTIONAL MATCH (episode:Episodic {group_id: item.group_id})
|
|
43
|
+
WHERE episode.uuid IN coalesce(item.episodes, [])
|
|
44
|
+
WITH origin, item, collect(DISTINCT episode) AS episodes
|
|
45
|
+
WITH origin, item, episodes,
|
|
46
|
+
size([id IN coalesce(item.episodes, []) WHERE NOT id IN [found IN episodes | found.uuid]]) AS missing'''),
|
|
47
|
+
}
|
|
48
|
+
_SOURCES = '''
|
|
49
|
+
RETURN origin, item.uuid AS id, item.group_id AS group_id, missing,
|
|
50
|
+
coalesce(item.fuli_had_restricted_source, false) AS had_restricted_source,
|
|
51
|
+
[episode IN episodes | {kind: episode.fuli_source_kind,
|
|
52
|
+
sensitivity: episode.fuli_sensitivity}] AS sources
|
|
53
|
+
'''
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
async def normal_only_ids(store, item_kind: str, item_ids: list[str]) -> set[str]:
|
|
57
|
+
"""The items among item_ids whose whole lineage has only normal sources."""
|
|
58
|
+
if not item_ids:
|
|
59
|
+
return set()
|
|
60
|
+
pattern, episodes = _ITEM[item_kind]
|
|
61
|
+
predecessors = f'''
|
|
62
|
+
UNWIND $frontier AS row
|
|
63
|
+
MATCH {pattern}
|
|
64
|
+
WHERE item.group_id = row.group_id AND item.fuli_replaced_by_item_id = row.id
|
|
65
|
+
AND coalesce(item.fuli_replaced_by_item_kind, $item_kind) = $item_kind
|
|
66
|
+
WITH row.origin AS origin, item{episodes}{_SOURCES}'''
|
|
67
|
+
lineages = {}
|
|
68
|
+
frontier = _merge(lineages, await _read(store, f'''
|
|
69
|
+
MATCH {pattern} WHERE item.uuid IN $item_ids
|
|
70
|
+
WITH item.uuid AS origin, item{episodes}{_SOURCES}''', item_ids=list(dict.fromkeys(item_ids))))
|
|
71
|
+
for _ in range(MAX_VERSION_DEPTH):
|
|
72
|
+
if not frontier:
|
|
73
|
+
break
|
|
74
|
+
frontier = _merge(lineages, await _read(store, predecessors, frontier=frontier, item_kind=item_kind))
|
|
75
|
+
if frontier:
|
|
76
|
+
# Read, not merged: only whether anything is left past the last level.
|
|
77
|
+
for row in await _read(store, predecessors, frontier=frontier, item_kind=item_kind):
|
|
78
|
+
lineages[row['origin']]['withheld'] = True
|
|
79
|
+
return {origin for origin, lineage in lineages.items() if lineage['sources'] and not lineage['withheld']}
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
async def _read(store, query, **parameters) -> list[dict]:
|
|
83
|
+
records, _, _ = await store.runtime.driver.execute_query(query, **parameters, routing_='r')
|
|
84
|
+
return [dict(record) for record in records]
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def _merge(lineages: dict, rows) -> list[dict]:
|
|
88
|
+
"""Adds each version's sources to its origin's lineage; answers the
|
|
89
|
+
versions whose predecessors are still to read. A version already seen
|
|
90
|
+
(a cycle) is not read again, and a lineage withheld at this level is not
|
|
91
|
+
followed further, whichever of its versions withheld it."""
|
|
92
|
+
found = []
|
|
93
|
+
for row in rows:
|
|
94
|
+
lineage = lineages.setdefault(row['origin'], {'seen': set(), 'sources': 0, 'withheld': False})
|
|
95
|
+
if row['id'] in lineage['seen']:
|
|
96
|
+
continue
|
|
97
|
+
lineage['seen'].add(row['id'])
|
|
98
|
+
lineage['withheld'] |= bool(row.get('missing')) or bool(row.get('had_restricted_source'))
|
|
99
|
+
for source in row['sources']:
|
|
100
|
+
if source.get('kind') in EDIT_SOURCE_KINDS:
|
|
101
|
+
continue
|
|
102
|
+
lineage['sources'] += 1
|
|
103
|
+
lineage['withheld'] |= source.get('sensitivity') != 'normal'
|
|
104
|
+
found.append({'origin': row['origin'], 'id': row['id'], 'group_id': row['group_id']})
|
|
105
|
+
return [version for version in found if not lineages[version['origin']]['withheld']]
|
|
@@ -7,11 +7,47 @@ mutation erases local publication drafts in the same transaction; remote copies
|
|
|
7
7
|
are outside this local source operation.
|
|
8
8
|
"""
|
|
9
9
|
from .conversation_context import message_bytes
|
|
10
|
+
from .knowledge_sensitivity import EDIT_SOURCE_KINDS
|
|
10
11
|
from .store_agent_conversations import decode_event
|
|
11
12
|
|
|
13
|
+
# A deleted source that was not explicitly normal (private, restricted or
|
|
14
|
+
# unknown) and not an edit episode, which says nothing about the knowledge.
|
|
15
|
+
_NON_NORMAL_SOURCE = '''
|
|
16
|
+
NOT coalesce(episode.fuli_source_kind, '') IN $edit_kinds
|
|
17
|
+
AND coalesce(episode.fuli_sensitivity, '') <> 'normal'
|
|
18
|
+
'''
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
async def _mark_restricted_source_loss(scoped, space, episode_ids):
|
|
22
|
+
"""Before the episodes go, in the delete's own transaction: every item a
|
|
23
|
+
non-normal one of them is a source of, and that outlives the delete (the
|
|
24
|
+
items that go were removed before this), carries
|
|
25
|
+
fuli_had_restricted_source = true from now on, so a visitor's search
|
|
26
|
+
(knowledge_sensitivity) still withholds it. The marker is never unset;
|
|
27
|
+
only that search reads it."""
|
|
28
|
+
if not episode_ids:
|
|
29
|
+
return
|
|
30
|
+
params = {'group_id': space['group_id'], 'episode_ids': episode_ids, 'edit_kinds': list(EDIT_SOURCE_KINDS)}
|
|
31
|
+
await scoped.runtime.driver.execute_query(
|
|
32
|
+
'''
|
|
33
|
+
MATCH (episode:Episodic {group_id: $group_id})-[:MENTIONS]->(item:Entity {group_id: $group_id})
|
|
34
|
+
WHERE episode.uuid IN $episode_ids AND''' + _NON_NORMAL_SOURCE + '''
|
|
35
|
+
SET item.fuli_had_restricted_source = true
|
|
36
|
+
''', **params)
|
|
37
|
+
await scoped.runtime.driver.execute_query(
|
|
38
|
+
'''
|
|
39
|
+
MATCH (episode:Episodic {group_id: $group_id})
|
|
40
|
+
WHERE episode.uuid IN $episode_ids AND''' + _NON_NORMAL_SOURCE + '''
|
|
41
|
+
WITH collect(episode.uuid) AS withheld
|
|
42
|
+
MATCH ()-[item:RELATES_TO {group_id: $group_id}]->()
|
|
43
|
+
WHERE any(id IN coalesce(item.episodes, []) WHERE id IN withheld)
|
|
44
|
+
SET item.fuli_had_restricted_source = true
|
|
45
|
+
''', **params)
|
|
46
|
+
|
|
12
47
|
|
|
13
48
|
async def remove_source_copies(scoped, space, inventory):
|
|
14
49
|
episode_ids = [episode['uuid'] for episode in inventory['episodes']]
|
|
50
|
+
await _mark_restricted_source_loss(scoped, space, episode_ids)
|
|
15
51
|
await scoped.runtime.driver.execute_query(
|
|
16
52
|
'''
|
|
17
53
|
MATCH ()-[item:RELATES_TO {group_id: $group_id}]->()
|
|
@@ -756,6 +756,15 @@ class SearchRequest(StrictModel):
|
|
|
756
756
|
inherit_project_knowledge: bool = True
|
|
757
757
|
include_personal_global: bool = False
|
|
758
758
|
semantic: SemanticQuery | None = None
|
|
759
|
+
# 'normal' (a visitor's search): only items whose every source, in every
|
|
760
|
+
# version they replaced, is normal, and relationships whose two endpoints
|
|
761
|
+
# this search may return too (knowledge_sensitivity). None: no such filter.
|
|
762
|
+
max_sensitivity: Literal['normal'] | None = None
|
|
763
|
+
# False: an item another project defined and this one only references is
|
|
764
|
+
# not this project's. True keeps every existing caller's view.
|
|
765
|
+
include_project_references: bool = True
|
|
766
|
+
# Entity types this search never returns, nor lets a relationship reach.
|
|
767
|
+
excluded_entity_types: list[str] = Field(default_factory=list, max_length=16)
|
|
759
768
|
|
|
760
769
|
@field_validator('personal_project_ids')
|
|
761
770
|
@classmethod
|
|
@@ -778,6 +787,22 @@ class SearchRequest(StrictModel):
|
|
|
778
787
|
)
|
|
779
788
|
if self.project_agent_id and not self.active_personal_project_id:
|
|
780
789
|
raise ValueError('project Agent search requires active_personal_project_id')
|
|
790
|
+
# A visitor's search reads one project's own current, confirmed items
|
|
791
|
+
# only; the search enforces that scope anyway, and a request that asks
|
|
792
|
+
# for anything wider is a caller's mistake worth refusing.
|
|
793
|
+
if self.max_sensitivity:
|
|
794
|
+
widened = [name for name, wide in (
|
|
795
|
+
('include_project_references', self.include_project_references),
|
|
796
|
+
('inherit_project_knowledge', self.inherit_project_knowledge),
|
|
797
|
+
('include_personal_global', self.include_personal_global),
|
|
798
|
+
('include_pending', self.include_pending),
|
|
799
|
+
('include_historical', self.include_historical),
|
|
800
|
+
('project_agent_id', self.project_agent_id is not None),
|
|
801
|
+
) if wide]
|
|
802
|
+
if not self.active_personal_project_id:
|
|
803
|
+
raise ValueError('a max_sensitivity search requires active_personal_project_id')
|
|
804
|
+
if widened:
|
|
805
|
+
raise ValueError(f'a max_sensitivity search requires {", ".join(widened)} to be off')
|
|
781
806
|
return self
|
|
782
807
|
|
|
783
808
|
|
|
@@ -26,6 +26,18 @@ DIGEST = r'^[0-9a-f]{64}$'
|
|
|
26
26
|
CANONICAL_TIME = r'^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$'
|
|
27
27
|
PROOF_VERSION = 'fuli-remote-origin/1'
|
|
28
28
|
CHAT_PROOF_VERSION = 'fuli-chat-origin/1'
|
|
29
|
+
# Each purpose signs under its own version, so a verifier that knows only some
|
|
30
|
+
# purposes rejects the others. Execution keeps the version and wire shape it
|
|
31
|
+
# had before purposes existed; every other proof also signs its purpose.
|
|
32
|
+
PROOF_VERSIONS = {
|
|
33
|
+
'execution': PROOF_VERSION,
|
|
34
|
+
'chat': CHAT_PROOF_VERSION,
|
|
35
|
+
'query': 'fuli-query-origin/1',
|
|
36
|
+
'request': 'fuli-request-origin/1',
|
|
37
|
+
}
|
|
38
|
+
# Asking another computer to act stays with the project lead. Chat and a
|
|
39
|
+
# visitor's query are asked by any Agent of a live project task.
|
|
40
|
+
LEAD_PURPOSES = frozenset({'execution', 'request'})
|
|
29
41
|
MAX_LIFETIME = timedelta(minutes=30)
|
|
30
42
|
|
|
31
43
|
|
|
@@ -38,7 +50,7 @@ class AgentRemoteOriginIssue(StrictModel):
|
|
|
38
50
|
target_node: str = Field(pattern=DIGEST)
|
|
39
51
|
binding_id: str = Field(min_length=1, max_length=128, pattern=OPAQUE)
|
|
40
52
|
expires_at: str = Field(pattern=CANONICAL_TIME)
|
|
41
|
-
purpose: Literal['execution', 'chat'] = 'execution'
|
|
53
|
+
purpose: Literal['execution', 'chat', 'query', 'request'] = 'execution'
|
|
42
54
|
|
|
43
55
|
|
|
44
56
|
def _encode(value):
|
|
@@ -93,13 +105,13 @@ class StoreRemoteAgentOrigins:
|
|
|
93
105
|
project_id = context.get('personal_project_id')
|
|
94
106
|
if not agent_id or not project_id or (context.get('checkpoint') or {}).get('phase') == 'complete':
|
|
95
107
|
raise HTTPException(409, 'A remote ask requires an active project task of a FULI Agent')
|
|
96
|
-
if request.purpose
|
|
108
|
+
if request.purpose != 'execution' and (context.get('agent_memory_scope') == 'task_only'
|
|
97
109
|
or (context.get('turn_id') or '').startswith('worker-run:')):
|
|
98
|
-
raise HTTPException(403, 'A restricted worker cannot open cross-device chats')
|
|
110
|
+
raise HTTPException(403, 'A restricted worker cannot open cross-device chats, queries or requests')
|
|
99
111
|
await authorize_personal_project(self, actor, space, project_id)
|
|
100
112
|
policy = await self.get_project_agent_coordination_policy(actor, request.personal_space_id, project_id)
|
|
101
|
-
# Execution
|
|
102
|
-
if request.purpose
|
|
113
|
+
# Execution and requests stay with the project lead; chat and queries do not act.
|
|
114
|
+
if request.purpose in LEAD_PURPOSES and (not policy.team_lead_agent_id or agent_id != policy.team_lead_agent_id):
|
|
103
115
|
raise HTTPException(403, 'Only the project lead can ask Agents on other devices')
|
|
104
116
|
agent = await self.get_project_agent(actor, request.personal_space_id, project_id, agent_id)
|
|
105
117
|
if agent.profile.status != 'active':
|
|
@@ -126,7 +138,7 @@ class StoreRemoteAgentOrigins:
|
|
|
126
138
|
MATCH (project)-[:HAS_PROJECT_AGENT_ASSIGNMENT]->
|
|
127
139
|
(:FuliProjectAgentAssignment {status: 'active'})-[:ASSIGNED_AGENT]->(role)
|
|
128
140
|
} AS assigned
|
|
129
|
-
WITH live_task, lead, assigned, live_task AND (lead OR $
|
|
141
|
+
WITH live_task, lead, assigned, live_task AND (lead OR NOT $lead_required) AND assigned AS allowed
|
|
130
142
|
FOREACH (ignored IN CASE WHEN allowed THEN [1] ELSE [] END |
|
|
131
143
|
MERGE (origin:FuliRemoteAgentOrigin {space_id: $space_id, message_id: $message_id})
|
|
132
144
|
ON CREATE SET origin.digest = $digest, origin.agent_id = $agent_id, origin.project_id = $project_id,
|
|
@@ -141,26 +153,28 @@ class StoreRemoteAgentOrigins:
|
|
|
141
153
|
RETURN live_task, lead, assigned, same''',
|
|
142
154
|
space_id=request.personal_space_id, token=request.task_context_token, message_id=request.message_id,
|
|
143
155
|
digest=request.digest, agent_id=agent_id, project_id=project_id, target_node=request.target_node,
|
|
144
|
-
binding_id=request.binding_id, task_hash=task_hash, expires_at=request.expires_at, purpose=request.purpose
|
|
156
|
+
binding_id=request.binding_id, task_hash=task_hash, expires_at=request.expires_at, purpose=request.purpose,
|
|
157
|
+
lead_required=request.purpose in LEAD_PURPOSES)
|
|
145
158
|
row = rows[0] if rows else None
|
|
146
159
|
if not row or not row['live_task']:
|
|
147
160
|
raise HTTPException(404, 'The sending task is no longer current')
|
|
148
|
-
if (request.purpose
|
|
161
|
+
if (request.purpose in LEAD_PURPOSES and not row['lead']) or not row['assigned']:
|
|
149
162
|
raise HTTPException(403, 'Only the project lead can ask Agents on other devices')
|
|
150
163
|
if not row['same']:
|
|
151
164
|
raise HTTPException(409, 'This message ID already belongs to a different remote ask')
|
|
152
165
|
key = await self._remote_origin_key(request.personal_space_id)
|
|
153
166
|
claims = {
|
|
154
|
-
'version':
|
|
167
|
+
'version': PROOF_VERSIONS[request.purpose],
|
|
155
168
|
'key_id': key['key_id'], 'space_id': request.personal_space_id,
|
|
156
169
|
'project_id': project_id, 'agent_id': agent_id, 'task_hash': task_hash,
|
|
157
170
|
'message_id': request.message_id, 'digest': request.digest, 'target_node': request.target_node,
|
|
158
171
|
'binding_id': request.binding_id, 'issued_at': canonical_time(now), 'expires_at': request.expires_at,
|
|
159
172
|
}
|
|
160
|
-
# Existing execution proofs retain their exact wire shape.
|
|
161
|
-
#
|
|
162
|
-
|
|
163
|
-
|
|
173
|
+
# Existing execution proofs retain their exact wire shape. Every other
|
|
174
|
+
# purpose uses a distinct version and signs its purpose, so even older
|
|
175
|
+
# execution ports reject it.
|
|
176
|
+
if request.purpose != 'execution':
|
|
177
|
+
claims['purpose'] = request.purpose
|
|
164
178
|
payload = json.dumps(claims, sort_keys=True, separators=(',', ':')).encode()
|
|
165
179
|
signature = SigningKey(_decode(key['private_key'])).sign(payload).signature
|
|
166
180
|
return {'agent_id': agent_id, 'agent_name': agent.profile.display_name or agent.profile.name or agent_id,
|
|
Binary file
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fuli-context",
|
|
3
|
-
"version": "0.27.
|
|
3
|
+
"version": "0.27.4",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "fuli-context",
|
|
9
|
-
"version": "0.27.
|
|
9
|
+
"version": "0.27.4",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@agentclientprotocol/sdk": "1.5.0",
|
package/package.json
CHANGED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
|
|
4
|
+
// A plain constrained Claude Code run (a visit request's planning pass or its
|
|
5
|
+
// edit), not a session of any Agent: restricted mode, which removes the tools
|
|
6
|
+
// that run commands or code and WebFetch unless --tools names them, ignores
|
|
7
|
+
// the user, project and local settings files, confines the file tools to the
|
|
8
|
+
// working directory, refuses bypassPermissions and leaves writes to settings,
|
|
9
|
+
// Git and tool configuration to a person; only the named tools; and an empty
|
|
10
|
+
// strict MCP configuration, so no MCP server at all, FULI's included.
|
|
11
|
+
const EMPTY_MCP = JSON.stringify({ mcpServers: {} });
|
|
12
|
+
const READ_TOOLS = Object.freeze(['Read', 'Grep', 'Glob']);
|
|
13
|
+
const EDIT_TOOLS = Object.freeze(['Read', 'Grep', 'Glob', 'Edit', 'Write', 'MultiEdit']);
|
|
14
|
+
const DENIED_TOOLS = Object.freeze(['Bash', 'PowerShell', 'WebFetch', 'WebSearch', 'NotebookEdit']);
|
|
15
|
+
const STEPS = Object.freeze({
|
|
16
|
+
// Reads only, in the owner's project folder.
|
|
17
|
+
plan: ['--permission-mode', 'dontAsk', '--tools', READ_TOOLS.join(','),
|
|
18
|
+
'--disallowedTools', [...DENIED_TOOLS, 'Edit', 'Write', 'MultiEdit'].join(',')],
|
|
19
|
+
// Reads and edits, in the request's worktree.
|
|
20
|
+
edit: ['--permission-mode', 'acceptEdits', '--tools', EDIT_TOOLS.join(','), '--disallowedTools', DENIED_TOOLS.join(',')],
|
|
21
|
+
});
|
|
22
|
+
const STEP_TOOLS = Object.freeze({ plan: READ_TOOLS, edit: EDIT_TOOLS });
|
|
23
|
+
// What an older CLI says about the flag it does not know.
|
|
24
|
+
const UNKNOWN_RESTRICTED = /unknown option[^\n]*--restricted/i;
|
|
25
|
+
|
|
26
|
+
export const claudeCodeConstrainedRun = Object.freeze({
|
|
27
|
+
id: 'claude_code',
|
|
28
|
+
|
|
29
|
+
args(step) {
|
|
30
|
+
return ['-p', '--output-format', 'stream-json', '--verbose', '--restricted', ...STEPS[step],
|
|
31
|
+
'--strict-mcp-config', '--mcp-config', EMPTY_MCP];
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
// Restricted mode ignores the person's settings files, so the model access
|
|
35
|
+
// they configured in the env block of their user settings (a base URL, a
|
|
36
|
+
// model name) is passed to the child process's environment instead: only
|
|
37
|
+
// string values, never on the command line, never logged or kept.
|
|
38
|
+
// CLAUDE_CONFIG_DIR moves the settings folder as Claude Code itself does.
|
|
39
|
+
environment({ env, home, readText = (path) => readFileSync(path, 'utf8') }) {
|
|
40
|
+
try {
|
|
41
|
+
const settings = JSON.parse(readText(join(env.CLAUDE_CONFIG_DIR || join(home, '.claude'), 'settings.json')));
|
|
42
|
+
const block = settings?.env && typeof settings.env === 'object' && !Array.isArray(settings.env) ? settings.env : {};
|
|
43
|
+
return Object.fromEntries(Object.entries(block).filter(([key, value]) => typeof value === 'string' && /^[A-Za-z_][A-Za-z0-9_]*$/.test(key)));
|
|
44
|
+
} catch { return {}; }
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
// A CLI without restricted mode never runs the step unrestricted: the wake fails with its own detail.
|
|
48
|
+
restrictedUnsupported: (stderr) => UNKNOWN_RESTRICTED.test(stderr),
|
|
49
|
+
|
|
50
|
+
// stream-json's system init event names the tools and MCP servers the run has.
|
|
51
|
+
startedWith: (event) => (event?.type === 'system' && event.subtype === 'init'
|
|
52
|
+
? { tools: Array.isArray(event.tools) ? event.tools : null, mcpServers: Array.isArray(event.mcp_servers) ? event.mcp_servers : [] }
|
|
53
|
+
: null),
|
|
54
|
+
|
|
55
|
+
// Only the step's own tools and no MCP server at all.
|
|
56
|
+
restrictedAs: (step, { tools, mcpServers }) => Array.isArray(tools)
|
|
57
|
+
&& tools.every((tool) => STEP_TOOLS[step].includes(tool)) && mcpServers.length === 0,
|
|
58
|
+
});
|
|
@@ -2,9 +2,21 @@ import { existsSync } from 'node:fs';
|
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
|
|
4
4
|
import { firstField, listDirectory } from '../session-log.js';
|
|
5
|
+
import { reportedWakeUsage } from '../wake-usage.js';
|
|
5
6
|
|
|
6
|
-
//
|
|
7
|
-
|
|
7
|
+
// A read-only wake has only the built-in tools that read. Whatever edits a file, runs a command
|
|
8
|
+
// (Bash, PowerShell), fetches from the web or starts another agent is not there; the edit and
|
|
9
|
+
// shell tools are denied as well, since a deny rule wins over any allow rule the person keeps.
|
|
10
|
+
// Tools of MCP servers the person configured are not built in: a wake given mcpServers (an ask
|
|
11
|
+
// from another computer, or a discussion turn where FULI can name its own entry) loads exactly
|
|
12
|
+
// those (--strict-mcp-config), FULI's own or none; a read-only wake given none still follows
|
|
13
|
+
// that person's own allow rules (docs/agent-roundtable.md).
|
|
14
|
+
const READ_ONLY_TOOLS = Object.freeze(['Read', 'Grep', 'Glob']);
|
|
15
|
+
const READ_ONLY_DENIED_TOOLS = Object.freeze(['Edit', 'Write', 'NotebookEdit', 'MultiEdit', 'Bash', 'PowerShell']);
|
|
16
|
+
const MODE_ARGUMENTS = Object.freeze({
|
|
17
|
+
answer: ['--permission-mode', 'dontAsk'],
|
|
18
|
+
read_only: ['--permission-mode', 'dontAsk', '--tools', READ_ONLY_TOOLS.join(','), '--disallowedTools', READ_ONLY_DENIED_TOOLS.join(',')],
|
|
19
|
+
});
|
|
8
20
|
|
|
9
21
|
// Wakes Claude Code headlessly. Resuming forks the session, so an open window is
|
|
10
22
|
// never written concurrently while the answer still has that conversation's context.
|
|
@@ -19,14 +31,17 @@ export const claudeCodeWake = Object.freeze({
|
|
|
19
31
|
// delegated wake names the (forked) session up front and binds it first.
|
|
20
32
|
plansSession: true,
|
|
21
33
|
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
// or run commands. (Plan mode is
|
|
26
|
-
// or an empty answer instead of the
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
// mode (roundtable/wake.js WAKE_MODES): answer keeps the person's own rules;
|
|
35
|
+
// read_only (a group discussion turn, an ask from another computer) keeps the
|
|
36
|
+
// same non-interactive mode with the reading tools only, so the woken session
|
|
37
|
+
// can read and answer but not change files or run commands. (Plan mode is
|
|
38
|
+
// avoided: headless it may end with a plan or an empty answer instead of the
|
|
39
|
+
// member's view.) mcpServers ({ name: { command, args } }, possibly empty): a
|
|
40
|
+
// read_only wake then loads exactly these MCP servers, none of the person's.
|
|
41
|
+
args({ sessionId, plannedSessionId = null, mode, mcpServers = null }) {
|
|
42
|
+
const only = mcpServers && mode === 'read_only' ? ['--strict-mcp-config', '--mcp-config', JSON.stringify({ mcpServers:
|
|
43
|
+
Object.fromEntries(Object.entries(mcpServers).map(([name, entry]) => [name, { type: 'stdio', command: entry.command, args: entry.args }])) })] : [];
|
|
44
|
+
return ['-p', '--output-format', 'stream-json', '--verbose', ...MODE_ARGUMENTS[mode], ...only,
|
|
30
45
|
...(sessionId ? ['--resume', sessionId, '--fork-session'] : []),
|
|
31
46
|
...(plannedSessionId ? ['--session-id', plannedSessionId] : [])];
|
|
32
47
|
},
|
|
@@ -42,13 +57,18 @@ export const claudeCodeWake = Object.freeze({
|
|
|
42
57
|
},
|
|
43
58
|
|
|
44
59
|
// stream-json ends with one `result` event carrying the final answer. Its
|
|
45
|
-
// `system` `init` event names the model the session runs (rec#129)
|
|
46
|
-
|
|
60
|
+
// `system` `init` event names the model the session runs (rec#129); the
|
|
61
|
+
// `result` event's usage counts the run's tokens, input apart from the
|
|
62
|
+
// cache reads and writes, so the whole input is the three together.
|
|
63
|
+
initialState: () => ({ body: '', completed: true, failed: false, model: null, usage: null }),
|
|
47
64
|
nativeSessionId: event => event.type === 'system' && event.subtype === 'init' ? event.session_id : null,
|
|
48
65
|
readEvent(event, state) {
|
|
49
66
|
if (event.type === 'system' && event.subtype === 'init' && typeof event.model === 'string') state.model = event.model;
|
|
50
67
|
if (event.type !== 'result') return;
|
|
51
68
|
state.body = event.result ?? '';
|
|
69
|
+
const usage = event.usage ?? {};
|
|
70
|
+
state.usage = reportedWakeUsage({ output: usage.output_tokens,
|
|
71
|
+
inputParts: [usage.input_tokens, usage.cache_read_input_tokens, usage.cache_creation_input_tokens] });
|
|
52
72
|
state.failed ||= Boolean(event.is_error);
|
|
53
73
|
},
|
|
54
74
|
});
|