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
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
import { execFile } from 'node:child_process';
|
|
2
|
+
import { closeSync, existsSync, ftruncateSync, lstatSync, openSync, readdirSync, readFileSync, writeSync } from 'node:fs';
|
|
3
|
+
import { lstat, mkdir, readdir, readFile, rm, rmdir, stat, unlink } from 'node:fs/promises';
|
|
4
|
+
import { basename, dirname, join, relative, resolve, sep } from 'node:path';
|
|
5
|
+
|
|
6
|
+
import { sha256Bytes, sha256File } from '../security/digest.js';
|
|
7
|
+
import { fileIdentity } from '../system/file-identity.js';
|
|
8
|
+
import { gitDirectoryName, gitModulesName } from './git-names.js';
|
|
9
|
+
|
|
10
|
+
// The isolated copy a visit request is worked on: a Git worktree of the
|
|
11
|
+
// project's repository on its own branch, cut from a commit (so the owner's
|
|
12
|
+
// uncommitted changes neither leak in nor get touched), under FULI's data
|
|
13
|
+
// directory. FULI itself commits what the run changed, as a fixed visit
|
|
14
|
+
// identity with no personal data, never merges or pushes.
|
|
15
|
+
//
|
|
16
|
+
// What the run wrote is untrusted, so no Git call ever lets it decide
|
|
17
|
+
// anything: a call on the worktree names its Git directory and work tree
|
|
18
|
+
// explicitly, both computed from the owner's repository (never discovered
|
|
19
|
+
// from files in the worktree), and every call runs with the hardened options
|
|
20
|
+
// below, without the system and global configuration (GIT_CONFIG_NOSYSTEM,
|
|
21
|
+
// GIT_CONFIG_GLOBAL = /dev/null: the commit's identity comes from -c,
|
|
22
|
+
// so nothing of the person's own Git setup is needed). Before anything is
|
|
23
|
+
// staged, the worktree is checked for content that would make Git act on its
|
|
24
|
+
// own (inspectVisitWorktree).
|
|
25
|
+
export const VISIT_BRANCH_PREFIX = 'fuli/visit/';
|
|
26
|
+
const VISIT_AUTHOR = ['-c', 'user.name=FULI visit', '-c', 'user.email=visit@fuli.invalid', '-c', 'commit.gpgsign=false'];
|
|
27
|
+
const OUTPUT_BYTES = 32 * 1024 * 1024;
|
|
28
|
+
// The patch the owner reads on the card, never more.
|
|
29
|
+
const PATCH_BYTES = 512 * 1024;
|
|
30
|
+
// A run past these is held as too_large before anything reaches the object store.
|
|
31
|
+
const MAX_CHANGED_FILES = 2000;
|
|
32
|
+
const MAX_CHANGED_BYTES = 50 * 1024 * 1024;
|
|
33
|
+
const GITLINK_MODE = '160000';
|
|
34
|
+
// Git's own name for nothing, on every platform (Git for Windows maps it too;
|
|
35
|
+
// Node's '\\.\nul' is refused there): no global configuration and no hooks
|
|
36
|
+
// folder, and no file a run could plant under FULI's data directory instead.
|
|
37
|
+
const NO_FILE = '/dev/null';
|
|
38
|
+
// A step of the integrity snapshot (a status of a large checkout) waits no longer than this.
|
|
39
|
+
const SNAPSHOT_STEP_MS = 60_000;
|
|
40
|
+
|
|
41
|
+
// Where a request's worktree and branch will be, recorded before they are made
|
|
42
|
+
// so a restart in between still finds and tidies both.
|
|
43
|
+
export const plannedVisitWorktree = ({ root, id }) => ({ worktreePath: join(root, id), branch: `${VISIT_BRANCH_PREFIX}${id}` });
|
|
44
|
+
|
|
45
|
+
// rootIdentity: the identity (dev:ino) of root as the worktree is made in it,
|
|
46
|
+
// recorded with the request so a removal can tell root was not replaced since.
|
|
47
|
+
// root must be a plain folder, never a link or junction.
|
|
48
|
+
export async function createVisitWorktree({ folder, root, id }) {
|
|
49
|
+
const repository = await repositoryRoot({ folder, root });
|
|
50
|
+
await mkdir(root, { recursive: true });
|
|
51
|
+
const rootIdentity = await plainFolderIdentity(root, 'worktree_root_unexpected');
|
|
52
|
+
const baseCommit = (await git(repository, ['rev-parse', 'HEAD'], root)).trim();
|
|
53
|
+
const { worktreePath, branch } = plannedVisitWorktree({ root, id });
|
|
54
|
+
await git(repository, ['worktree', 'add', '-b', branch, worktreePath, baseCommit], root);
|
|
55
|
+
const { gitDir } = await location({ repository, root, id });
|
|
56
|
+
// Git named the worktree's administrative folder by its last path segment;
|
|
57
|
+
// anything else (a name already taken) is refused rather than guessed.
|
|
58
|
+
if (!existsSync(join(gitDir, 'HEAD'))) throw coded('worktree_unexpected');
|
|
59
|
+
writePointer(join(worktreePath, '.git'), pointerText(gitDir));
|
|
60
|
+
return { worktreePath, branch, baseCommit, rootIdentity };
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// What would let the run's content act through Git or through FULI's own
|
|
64
|
+
// clean-up, or fill the owner's object store: the worktree's own .git pointer
|
|
65
|
+
// changed, any symbolic link, junction or other link (removing a worktree
|
|
66
|
+
// must never reach past it), another .git (file or folder, under any name Git
|
|
67
|
+
// or the file system treats as .git) anywhere, a .gitmodules added or changed,
|
|
68
|
+
// a file inside a submodule path, or more than MAX_CHANGED_FILES /
|
|
69
|
+
// MAX_CHANGED_BYTES changed.
|
|
70
|
+
// Answers the hold reason (unsafe_content, too_large) or null. Nothing is
|
|
71
|
+
// staged here; status runs only once the content checks passed.
|
|
72
|
+
export async function inspectVisitWorktree({ folder, root, id, worktreePath, baseCommit }) {
|
|
73
|
+
const repository = await repositoryRoot({ folder, root });
|
|
74
|
+
const { gitDir } = await location({ repository, root, id });
|
|
75
|
+
const pointer = join(worktreePath, '.git');
|
|
76
|
+
if (!existsSync(pointer) || !lstatSync(pointer).isFile() || readFileSync(pointer, 'utf8') !== pointerText(gitDir)) return 'unsafe_content';
|
|
77
|
+
const gitlinks = (await git(repository, ['ls-tree', '-r', '-z', '--full-tree', baseCommit], root)).split('\0').filter(Boolean)
|
|
78
|
+
.filter((entry) => entry.startsWith(`${GITLINK_MODE} `)).map((entry) => entry.split('\t')[1]);
|
|
79
|
+
for await (const { path, link } of walk(worktreePath)) {
|
|
80
|
+
const name = path.split('/').at(-1);
|
|
81
|
+
if (link) return 'unsafe_content';
|
|
82
|
+
if (path !== '.git' && gitDirectoryName(name)) return 'unsafe_content';
|
|
83
|
+
if (gitlinks.some((gitlink) => path.toLowerCase().startsWith(`${gitlink.toLowerCase()}/`))) return 'unsafe_content';
|
|
84
|
+
if (gitModulesName(name)) {
|
|
85
|
+
const before = await git(repository, ['cat-file', 'blob', `${baseCommit}:${path}`], root).catch(() => null);
|
|
86
|
+
if (before === null || readFileSync(join(worktreePath, path), 'utf8') !== before) return 'unsafe_content';
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
const changed = (await worktreeGit({ gitDir, worktreePath, root },
|
|
90
|
+
['status', '--porcelain=v1', '-z', '--untracked-files=all', '--ignore-submodules=all', '--no-renames']))
|
|
91
|
+
.split('\0').filter(Boolean).map((entry) => entry.slice(3));
|
|
92
|
+
if (changed.length > MAX_CHANGED_FILES) return 'too_large';
|
|
93
|
+
let bytes = 0;
|
|
94
|
+
for (const path of changed) {
|
|
95
|
+
const file = join(worktreePath, path);
|
|
96
|
+
if (existsSync(file)) bytes += lstatSync(file).size;
|
|
97
|
+
if (bytes > MAX_CHANGED_BYTES) return 'too_large';
|
|
98
|
+
}
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Commits whatever the run left in the worktree on its branch; false when
|
|
103
|
+
// nothing changed. Call only after inspectVisitWorktree answered null. A
|
|
104
|
+
// commit that fails after add leaves its blobs as unreachable loose objects,
|
|
105
|
+
// which Git's own gc prunes after its expiry; FULI does not prune the owner's
|
|
106
|
+
// object store itself.
|
|
107
|
+
export async function commitVisitWorktree({ folder, root, id, worktreePath, message }) {
|
|
108
|
+
const repository = await repositoryRoot({ folder, root });
|
|
109
|
+
const { gitDir } = await location({ repository, root, id });
|
|
110
|
+
const run = (args) => worktreeGit({ gitDir, worktreePath, root }, args);
|
|
111
|
+
await run(['add', '-A', '--ignore-errors']);
|
|
112
|
+
if (!(await run(['status', '--porcelain=v1', '--ignore-submodules=all'])).trim()) return false;
|
|
113
|
+
await run([...VISIT_AUTHOR, 'commit', '--no-verify', '-q', '-m', message]);
|
|
114
|
+
return true;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// The branch's changes against its base, as Git reports them (never as the run
|
|
118
|
+
// described them): each file with its added and removed lines and whether it
|
|
119
|
+
// is executable, binary or a link; the added text for the secret scan; the
|
|
120
|
+
// patch for the owner, bounded.
|
|
121
|
+
export async function branchChanges({ repository, baseCommit, branch, root }) {
|
|
122
|
+
const range = [baseCommit, `refs/heads/${branch}`];
|
|
123
|
+
const diff = (args) => git(repository, ['diff', '--no-renames', '--no-ext-diff', '--no-textconv', '--ignore-submodules=all', ...args, ...range], root);
|
|
124
|
+
const numstat = (await diff(['--numstat', '-z'])).split('\0').filter(Boolean).map((entry) => entry.split('\t'));
|
|
125
|
+
const raw = (await diff(['--raw', '-z'])).split('\0');
|
|
126
|
+
const modes = new Map();
|
|
127
|
+
for (let index = 0; index + 1 < raw.length; index += 2) {
|
|
128
|
+
const [, , newMode] = raw[index].split(' ');
|
|
129
|
+
modes.set(raw[index + 1], newMode);
|
|
130
|
+
}
|
|
131
|
+
const files = numstat.map(([added, removed, path]) => ({ path, added: added === '-' ? 0 : Number(added),
|
|
132
|
+
removed: removed === '-' ? 0 : Number(removed), binary: added === '-',
|
|
133
|
+
executable: modes.get(path) === '100755', symlink: modes.get(path) === '120000' }));
|
|
134
|
+
const patch = await diff(['--no-color']);
|
|
135
|
+
const addedText = patch.split('\n').filter((line) => line.startsWith('+') && !line.startsWith('+++')).join('\n');
|
|
136
|
+
const bytes = Buffer.byteLength(patch);
|
|
137
|
+
return { files, addedText, diffstat: { files: files.length, added: files.reduce((sum, file) => sum + file.added, 0),
|
|
138
|
+
removed: files.reduce((sum, file) => sum + file.removed, 0) },
|
|
139
|
+
patch: bytes > PATCH_BYTES ? Buffer.from(patch).subarray(0, PATCH_BYTES).toString('utf8') : patch, truncated: bytes > PATCH_BYTES };
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// A digest of what a run must not change outside its own branch: the owner's
|
|
143
|
+
// checkout (its status, the content of every tracked change against HEAD and
|
|
144
|
+
// of every untracked file Git does not ignore, and the names Git ignores, so a
|
|
145
|
+
// new self-ignoring folder shows), the repository's config, config.worktree,
|
|
146
|
+
// info/exclude, info/attributes, objects/info/alternates, its hooks folder
|
|
147
|
+
// (names and contents), the other worktrees Git knows (names; this request's
|
|
148
|
+
// own excepted) and every ref except this request's own branch (other visit
|
|
149
|
+
// branches included). Taken before and after a run, a difference is detected
|
|
150
|
+
// and the result held; nothing is restored. Read without taking Git's
|
|
151
|
+
// optional locks, so the owner's own Git commands are never blocked by it.
|
|
152
|
+
// Each Git step of it has SNAPSHOT_STEP_MS; past that it throws and the
|
|
153
|
+
// caller holds the result as integrity_unknown instead of waiting.
|
|
154
|
+
export async function integritySnapshot({ repository, root, ownBranch, id }) {
|
|
155
|
+
const read = (args) => gitCall(['-C', repository, '--no-optional-locks', ...args], { cwd: repository, root, timeoutMs: SNAPSHOT_STEP_MS });
|
|
156
|
+
const status = await read(['status', '--porcelain=v1', '-z', '--untracked-files=all', '--ignore-submodules=all']);
|
|
157
|
+
const ignored = (await read(['status', '--porcelain=v1', '-z', '--ignored', '--untracked-files=normal', '--ignore-submodules=all']))
|
|
158
|
+
.split('\0').filter((entry) => entry.startsWith('!! '));
|
|
159
|
+
const tracked = sha256Bytes(await read(['diff', '--no-ext-diff', '--no-textconv', '--no-color', '--binary', '--ignore-submodules=all', 'HEAD']));
|
|
160
|
+
const untracked = await Promise.all((await read(['ls-files', '--others', '--exclude-standard', '-z'])).split('\0').filter(Boolean)
|
|
161
|
+
.map(async (path) => [path, await sha256File(join(repository, path)).catch(() => null)]));
|
|
162
|
+
const refs = (await read(['for-each-ref', '--format=%(refname) %(objectname)'])).split('\n')
|
|
163
|
+
.filter((line) => line && !line.startsWith(`refs/heads/${ownBranch} `));
|
|
164
|
+
const head = (await read(['rev-parse', 'HEAD'])).trim();
|
|
165
|
+
const common = (await read(['rev-parse', '--path-format=absolute', '--git-common-dir'])).trim();
|
|
166
|
+
const files = await Promise.all(['config', 'config.worktree', join('info', 'exclude'), join('info', 'attributes'),
|
|
167
|
+
join('objects', 'info', 'alternates')].map(async (name) => [name, await sha256File(join(common, name)).catch(() => null)]));
|
|
168
|
+
const hooksFolder = join(common, 'hooks');
|
|
169
|
+
const hooks = existsSync(hooksFolder) ? await Promise.all(readdirSync(hooksFolder).sort()
|
|
170
|
+
.map(async (name) => [name, await sha256File(join(hooksFolder, name)).catch(() => 'folder')])) : [];
|
|
171
|
+
const worktreesFolder = join(common, 'worktrees');
|
|
172
|
+
// Entry names are folder names Git made, ours being exactly the request id (the last
|
|
173
|
+
// segment of the path FULI gave it), so a name compares as text.
|
|
174
|
+
const worktrees = existsSync(worktreesFolder) ? readdirSync(worktreesFolder).filter((name) => name !== id).sort() : [];
|
|
175
|
+
return sha256Bytes(JSON.stringify({ status, ignored, tracked, untracked, refs, head, files, hooks, worktrees }));
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// keepBranch: the owner kept the result (or it expired unreviewed); only the
|
|
179
|
+
// worktree goes. Never `git worktree remove --force`, which follows a junction
|
|
180
|
+
// planted inside, and never `git worktree prune`, which would also drop the
|
|
181
|
+
// owner's other worktrees whose folders are missing (one on an unplugged
|
|
182
|
+
// drive): links, junctions and other reparse points are unlinked themselves,
|
|
183
|
+
// never followed, then the plain tree is deleted by Node, then only this
|
|
184
|
+
// request's own entry in Git's worktrees folder goes, once its gitdir file
|
|
185
|
+
// names this worktree. Nothing outside root (<dataDir>/visit-worktrees) or
|
|
186
|
+
// that folder is ever removed, and nothing at all once root is not the folder
|
|
187
|
+
// the worktree was made in (worktree_root_changed): root itself a link or
|
|
188
|
+
// junction now, or, by the rootIdentity recorded at creation, another folder,
|
|
189
|
+
// for example because a folder above it now leads elsewhere. A request
|
|
190
|
+
// recorded without rootIdentity gets the link check only. Answers what could
|
|
191
|
+
// not be done, so the owner sees it: entryKept (Git's entry for the worktree
|
|
192
|
+
// did not name it, so it and the branch stay) and branchKept (Git refused to
|
|
193
|
+
// delete the branch).
|
|
194
|
+
export async function removeVisitWorktree({ repository, worktreePath, branch, root, rootIdentity = null }, { keepBranch }) {
|
|
195
|
+
let entryKept = false;
|
|
196
|
+
if (worktreePath) {
|
|
197
|
+
const current = await plainFolderIdentity(root, 'worktree_root_changed');
|
|
198
|
+
if (current && rootIdentity && current !== rootIdentity) throw coded('worktree_root_changed');
|
|
199
|
+
// Matched before the folder goes: the folder's identity is part of the match.
|
|
200
|
+
const entry = await ownAdminEntry({ repository, worktreePath, root });
|
|
201
|
+
await removeTreeUnder(worktreePath, root, rootIdentity);
|
|
202
|
+
if (entry.matched) await removeTreeUnder(entry.path, entry.entries);
|
|
203
|
+
entryKept = entry.exists && !entry.matched;
|
|
204
|
+
}
|
|
205
|
+
let branchKept = false;
|
|
206
|
+
if (!keepBranch && branch) {
|
|
207
|
+
// While Git still lists the worktree, it would refuse anyway: the branch stays, said once.
|
|
208
|
+
branchKept = entryKept || await git(repository, ['branch', '-D', branch], root).then(() => false, () => true);
|
|
209
|
+
}
|
|
210
|
+
return { entryKept, branchKept };
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// Git's administrative entry for this worktree, and whether it is ours: the
|
|
214
|
+
// folder its gitdir file names is the same place as this request's worktree,
|
|
215
|
+
// compared by the identity of the actual folder (so 8.3 short names, letter
|
|
216
|
+
// case, slash direction and symlinked temp folders such as /var ->
|
|
217
|
+
// /private/var all agree), never by the text of the two paths.
|
|
218
|
+
async function ownAdminEntry({ repository, worktreePath, root }) {
|
|
219
|
+
const common = (await git(repository, ['rev-parse', '--path-format=absolute', '--git-common-dir'], root)).trim();
|
|
220
|
+
const entries = join(common, 'worktrees');
|
|
221
|
+
const path = join(entries, basename(worktreePath));
|
|
222
|
+
const named = await readFile(join(path, 'gitdir'), 'utf8').catch(() => null);
|
|
223
|
+
if (named === null) return { exists: existsSync(path), matched: false, path, entries };
|
|
224
|
+
return { exists: true, matched: await sameLocation(dirname(named.trim()), worktreePath), path, entries };
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// Two paths name the same place: their parents are the same folder (by
|
|
228
|
+
// dev:ino, whatever the volume's case rules) and their last names are the
|
|
229
|
+
// same text (the request id FULI gave Git). The parent is compared, not the
|
|
230
|
+
// folder itself, so the comparison still holds once the folder is gone.
|
|
231
|
+
async function sameLocation(left, right) {
|
|
232
|
+
const parents = await Promise.all([left, right].map((path) => identityOf(dirname(resolve(path)))));
|
|
233
|
+
return parents[0] !== null && parents[0] === parents[1] && basename(resolve(left)) === basename(resolve(right));
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// The identity of the folder a path leads to (links followed), or null when there is none or it is unknown.
|
|
237
|
+
const identityOf = (path) => stat(path, { bigint: true }).then(knownIdentity, () => null);
|
|
238
|
+
|
|
239
|
+
// A file ID of 0 (some network shares report it for every file) names no folder in particular: unknown.
|
|
240
|
+
const knownIdentity = (stats) => (stats.ino === 0n ? null : fileIdentity(stats));
|
|
241
|
+
|
|
242
|
+
// The identity of a folder that must be a plain folder, not a link, junction
|
|
243
|
+
// or other reparse point, with a known identity (refused with code); null
|
|
244
|
+
// when it does not exist.
|
|
245
|
+
async function plainFolderIdentity(path, code) {
|
|
246
|
+
const stats = await lstat(path, { bigint: true }).catch(() => null);
|
|
247
|
+
if (!stats) return null;
|
|
248
|
+
const identity = isLinkStats(stats) || !stats.isDirectory() ? null : knownIdentity(stats);
|
|
249
|
+
if (!identity) throw coded(code);
|
|
250
|
+
return identity;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// Removes path, which must sit directly in root, a plain folder; compared by
|
|
254
|
+
// folder identity (expected: root's identity recorded at creation, if any).
|
|
255
|
+
// Root is read again right before each unlink and before the delete, so it
|
|
256
|
+
// cannot be swapped for another folder while the tree is walked.
|
|
257
|
+
async function removeTreeUnder(path, root, expected = null) {
|
|
258
|
+
const stats = await lstat(path).catch(() => null);
|
|
259
|
+
if (!stats) return;
|
|
260
|
+
const folder = await plainFolderIdentity(root, 'worktree_outside_root');
|
|
261
|
+
if (expected && folder !== expected) throw coded('worktree_root_changed');
|
|
262
|
+
const parent = await identityOf(dirname(resolve(path)));
|
|
263
|
+
if (!parent || parent !== folder) throw coded('worktree_outside_root');
|
|
264
|
+
const unchanged = async () => {
|
|
265
|
+
if (await plainFolderIdentity(root, 'worktree_root_changed') !== folder) throw coded('worktree_root_changed');
|
|
266
|
+
};
|
|
267
|
+
if (isLinkStats(stats)) { await unchanged(); await unlinkLink(path); return; }
|
|
268
|
+
const links = [];
|
|
269
|
+
for await (const { path: inner, link } of walk(path)) if (link) links.push(join(path, inner));
|
|
270
|
+
for (const link of links) { await unchanged(); await unlinkLink(link); }
|
|
271
|
+
await unchanged();
|
|
272
|
+
// Only plain folders and files are left; rm does not follow links (and none is left to follow).
|
|
273
|
+
await rm(path, { recursive: true, force: true, maxRetries: 3 });
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// A symbolic link, junction or other reparse point as lstat sees it.
|
|
277
|
+
const isLinkStats = (stats) => stats.isSymbolicLink() || !(stats.isFile() || stats.isDirectory());
|
|
278
|
+
|
|
279
|
+
// Removes the link itself: a file link with unlink, a folder link or junction
|
|
280
|
+
// with rmdir on the link (Windows), neither ever touching its target.
|
|
281
|
+
async function unlinkLink(path) {
|
|
282
|
+
try { await unlink(path); } catch { await rmdir(path); }
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export async function repositoryRoot({ folder, root }) {
|
|
286
|
+
return (await git(folder, ['rev-parse', '--show-toplevel'], root)).trim();
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
// The worktree's Git directory, from the owner's repository's common directory.
|
|
290
|
+
async function location({ repository, root, id }) {
|
|
291
|
+
const common = (await git(repository, ['rev-parse', '--path-format=absolute', '--git-common-dir'], root)).trim();
|
|
292
|
+
return { gitDir: resolve(common, 'worktrees', id) };
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// The pointer FULI writes into the worktree; anything else there is the run's doing.
|
|
296
|
+
// Compared as text on purpose: FULI writes it and later rebuilds it from the same
|
|
297
|
+
// source (Git's common directory, read the same way), so any other spelling of the
|
|
298
|
+
// same place was written by someone else.
|
|
299
|
+
const pointerText = (gitDir) => `gitdir: ${gitDir.split(sep).join('/')}\n`;
|
|
300
|
+
|
|
301
|
+
// Rewritten in place: Git for Windows marks the file hidden, which a plain write refuses.
|
|
302
|
+
function writePointer(path, text) {
|
|
303
|
+
const descriptor = openSync(path, 'r+');
|
|
304
|
+
try {
|
|
305
|
+
ftruncateSync(descriptor, 0);
|
|
306
|
+
writeSync(descriptor, text, 0);
|
|
307
|
+
} finally { closeSync(descriptor); }
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// Every file and folder under the worktree, relative with forward slashes, by
|
|
311
|
+
// lstat: a link, junction or other reparse point is reported (link: true) and
|
|
312
|
+
// never descended into. Asynchronous, so a large tree never blocks the
|
|
313
|
+
// console's event loop.
|
|
314
|
+
async function* walk(top, folder = top) {
|
|
315
|
+
for (const name of await readdir(folder)) {
|
|
316
|
+
const path = join(folder, name);
|
|
317
|
+
const stats = await lstat(path);
|
|
318
|
+
const link = isLinkStats(stats);
|
|
319
|
+
yield { path: relative(top, path).split(sep).join('/'), link };
|
|
320
|
+
if (!link && stats.isDirectory()) yield* walk(top, path);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
// One Git call on the visit worktree: its Git directory and work tree named, never discovered.
|
|
325
|
+
function worktreeGit({ gitDir, worktreePath, root }, args) {
|
|
326
|
+
return gitCall([`--git-dir=${gitDir}`, `--work-tree=${worktreePath}`, ...args], { cwd: worktreePath, root });
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
// One Git call on the owner's repository (trusted to locate itself).
|
|
330
|
+
function git(cwd, args, root) {
|
|
331
|
+
return gitCall(['-C', cwd, ...args], { cwd, root });
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
// Every call: no fsmonitor, untracked cache, submodule recursion, hooks
|
|
335
|
+
// (a folder that does not exist), file-protocol transport, external diff,
|
|
336
|
+
// pager or editor; no system or global configuration; none of the caller's
|
|
337
|
+
// GIT_ variables; never a prompt.
|
|
338
|
+
// timeoutMs: optional; past it the call is stopped and throws.
|
|
339
|
+
function gitCall(args, { cwd, root, timeoutMs = 0 }) {
|
|
340
|
+
const env = Object.fromEntries(Object.entries(process.env).filter(([key]) => !key.startsWith('GIT_')));
|
|
341
|
+
const hardened = ['--no-pager', '-c', 'core.fsmonitor=false', '-c', 'core.untrackedCache=false', '-c', 'submodule.recurse=false',
|
|
342
|
+
'-c', `core.hooksPath=${NO_FILE}`, '-c', 'protocol.file.allow=never', '-c', 'diff.external=',
|
|
343
|
+
'-c', 'core.editor=false', '-c', 'safe.directory=*'];
|
|
344
|
+
return new Promise((done, reject) => execFile('git', [...hardened, ...args],
|
|
345
|
+
{ cwd: existsSync(cwd) ? cwd : root, env: { ...env, GIT_TERMINAL_PROMPT: '0', GIT_CONFIG_NOSYSTEM: '1', GIT_CONFIG_GLOBAL: NO_FILE,
|
|
346
|
+
GIT_PAGER: 'cat', GIT_EDITOR: 'false' }, maxBuffer: OUTPUT_BYTES, windowsHide: true, encoding: 'utf8', timeout: timeoutMs },
|
|
347
|
+
(error, stdout, stderr) => (error ? reject(Object.assign(new Error('A Git step of the visit request failed'),
|
|
348
|
+
{ code: 'git_failed', stderr: String(stderr).slice(-2000) })) : done(stdout))));
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
const coded = (code) => Object.assign(new Error(code), { code });
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { randomBytes, timingSafeEqual } from 'node:crypto';
|
|
2
|
+
|
|
3
|
+
import { sha256Bytes } from '../security/digest.js';
|
|
4
|
+
import { searchableProject } from './shared-project-search.js';
|
|
5
|
+
|
|
6
|
+
// Guest links: one project of this computer that a person without FULI may
|
|
7
|
+
// ask, read-only, from their own AI client on the same network (rec issue
|
|
8
|
+
// 133, deliverable B). The token is 'fgl_' and 32 random bytes, shown once at
|
|
9
|
+
// creation; only its SHA-256 is stored. Every use reads the link again, so a
|
|
10
|
+
// revoked or expired link stops at the next request. The requester key of a
|
|
11
|
+
// link's visits is 'guest:<link id>', and a link only asks (mode ask_only).
|
|
12
|
+
// Entries answer { ok: true, … } or { ok: false, code }.
|
|
13
|
+
const GUEST_LINK_DAYS = Object.freeze([1, 7, 30]);
|
|
14
|
+
const DEFAULT_DAYS = 7;
|
|
15
|
+
const DAY_MS = 24 * 60 * 60 * 1000;
|
|
16
|
+
const TOKEN_PREFIX = 'fgl_';
|
|
17
|
+
const TOKEN_BYTES = 32;
|
|
18
|
+
const LINK_ID_BYTES = 9;
|
|
19
|
+
const TOKEN = /^fgl_[A-Za-z0-9_-]{43}$/;
|
|
20
|
+
const LINK_ID = /^[A-Za-z0-9_-]{12}$/;
|
|
21
|
+
|
|
22
|
+
export function createGuestLinks({ store, now }) {
|
|
23
|
+
return {
|
|
24
|
+
create({ projectId, days = DEFAULT_DAYS } = {}) {
|
|
25
|
+
if (!searchableProject(projectId)) return refused('project_invalid');
|
|
26
|
+
if (!GUEST_LINK_DAYS.includes(days)) return refused('days_invalid');
|
|
27
|
+
const id = randomBytes(LINK_ID_BYTES).toString('base64url');
|
|
28
|
+
const token = `${TOKEN_PREFIX}${randomBytes(TOKEN_BYTES).toString('base64url')}`;
|
|
29
|
+
const createdAt = now();
|
|
30
|
+
store.insertGuestLink({ id, projectId, tokenHash: sha256Bytes(token), label: `guest-${id.slice(0, 6)}`,
|
|
31
|
+
createdAt: createdAt.toISOString(), expiresAt: new Date(createdAt.getTime() + days * DAY_MS).toISOString() });
|
|
32
|
+
return { ok: true, token, link: linkView(store.liveGuestLinks(createdAt.toISOString(), projectId).find(link => link.id === id)) };
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
// Live links (neither revoked nor expired), newest first.
|
|
36
|
+
list({ projectId = null } = {}) {
|
|
37
|
+
if (projectId !== null && !searchableProject(projectId)) return refused('project_invalid');
|
|
38
|
+
return { ok: true, links: store.liveGuestLinks(now().toISOString(), projectId).map(linkView) };
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
revoke(id) {
|
|
42
|
+
if (typeof id !== 'string' || !LINK_ID.test(id)) return refused('link_unknown');
|
|
43
|
+
return store.revokeGuestLink(id, now().toISOString()) ? { ok: true } : refused('link_unknown');
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
// The live link a bearer token opens, compared in constant time against
|
|
47
|
+
// every live link's hash; its last use is recorded. Any other token, an
|
|
48
|
+
// expired or a revoked one alike, is the same refusal.
|
|
49
|
+
authenticate(token) {
|
|
50
|
+
if (typeof token !== 'string' || !TOKEN.test(token)) return refused('unauthorized');
|
|
51
|
+
const presented = Buffer.from(sha256Bytes(token), 'hex');
|
|
52
|
+
const at = now().toISOString();
|
|
53
|
+
let opened = null;
|
|
54
|
+
for (const link of store.liveGuestLinks(at)) {
|
|
55
|
+
if (timingSafeEqual(presented, Buffer.from(link.tokenHash, 'hex'))) opened = link;
|
|
56
|
+
}
|
|
57
|
+
if (!opened) return refused('unauthorized');
|
|
58
|
+
store.touchGuestLink(opened.id, at);
|
|
59
|
+
return { ok: true, link: linkView({ ...opened, lastUsedAt: at }) };
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
// When the set of live links next changes by itself (the earliest expiry), or null.
|
|
63
|
+
nextExpiry() {
|
|
64
|
+
const links = store.liveGuestLinks(now().toISOString());
|
|
65
|
+
return links.length ? links.map(link => link.expiresAt).sort()[0] : null;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const refused = code => ({ ok: false, code });
|
|
71
|
+
|
|
72
|
+
function linkView(link) {
|
|
73
|
+
return { id: link.id, projectId: link.projectId, label: link.label, createdAt: link.createdAt,
|
|
74
|
+
expiresAt: link.expiresAt, lastUsedAt: link.lastUsedAt };
|
|
75
|
+
}
|