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.
Files changed (414) hide show
  1. package/dist/web/assets/{AboutPage-Bgcf03U0.js → AboutPage-DJxp-WMU.js} +1 -1
  2. package/dist/web/assets/AboutSectionHeading-BUu85T3-.js +1 -0
  3. package/dist/web/assets/AboutSectionHeading-CaZhhuuu.css +1 -0
  4. package/dist/web/assets/AgentAppsPage-Di4HU1sH.js +1 -0
  5. package/dist/web/assets/AgentAvatar-N7IaseYC.js +1 -0
  6. package/dist/web/assets/AgentAvatar-VUEAsIqM.css +1 -0
  7. package/dist/web/assets/{AgentHand-BwE2VGth.js → AgentHand-BDCERx8p.js} +1 -1
  8. package/dist/web/assets/AgentManagement-CJLZoyuq.js +7 -0
  9. package/dist/web/assets/AgentManagement-Cc00RLSO.css +1 -0
  10. package/dist/web/assets/{AgentMentionCopy-y3JD1Cef.js → AgentMentionCopy-Cpsy2XwV.js} +1 -1
  11. package/dist/web/assets/{AgentName-XrBcHq4R.js → AgentName-B150JTrl.js} +1 -1
  12. package/dist/web/assets/{AgentProfilePage-DE7z980p.js → AgentProfilePage-rckt2qEt.js} +3 -3
  13. package/dist/web/assets/AgentServicesPage-_rY596Cl.js +1 -0
  14. package/dist/web/assets/{AppViewerPage-BaKMk9pp.js → AppViewerPage-Kq3r1mwI.js} +1 -1
  15. package/dist/web/assets/{BackToTop-DITd9y7X.js → BackToTop-Da6u7_d8.js} +1 -1
  16. package/dist/web/assets/{BoardCardFieldsMenu-CWtHiVR-.js → BoardCardFieldsMenu-CyJSO3vT.js} +1 -1
  17. package/dist/web/assets/{BoardMoveMenu-CEDdltY7.js → BoardMoveMenu-B_lUROwH.js} +1 -1
  18. package/dist/web/assets/{Breadcrumb-C98voz9V.js → Breadcrumb-CA0zg3OI.js} +1 -1
  19. package/dist/web/assets/{CaptureChangePage-CE8tJfiQ.js → CaptureChangePage-nnCFkG4H.js} +1 -1
  20. package/dist/web/assets/Collection-CL-ehAUe.js +1 -0
  21. package/dist/web/assets/{CopyFixPrompt-C2hC04lV.js → CopyFixPrompt-Bp3GsUzJ.js} +1 -1
  22. package/dist/web/assets/{DataFormatPage-BjZkck9o.js → DataFormatPage-COPJnuZH.js} +1 -1
  23. package/dist/web/assets/DebugTurnPage-CuREiHr-.js +1 -0
  24. package/dist/web/assets/{DebugTurnsPage-BlDDz1Fk.js → DebugTurnsPage-i2jPDad3.js} +1 -1
  25. package/dist/web/assets/DialogTitle-aiTJ0Qmu.js +1 -0
  26. package/dist/web/assets/{EmployeeRedirectPage-CSSuvAqx.js → EmployeeRedirectPage-DPSjSW-l.js} +1 -1
  27. package/dist/web/assets/EmployeeScopeDialog-Bui2TPpl.js +1 -0
  28. package/dist/web/assets/{EmployeeWorkbench-DvEojWb7.js → EmployeeWorkbench-DAC8kuJP.js} +1 -1
  29. package/dist/web/assets/FieldRoot-B2x8LUg_.js +1 -0
  30. package/dist/web/assets/FlaBlockedTasks-CWa5T5nU.css +1 -0
  31. package/dist/web/assets/FlaBlockedTasks-Ds1c5xaw.js +1 -0
  32. package/dist/web/assets/{FlaGrowth-OdlmgEVi.js → FlaGrowth-CJSExsDl.js} +1 -1
  33. package/dist/web/assets/{FlaOccupationKit-CnouVWnU.js → FlaOccupationKit-yibMGA7g.js} +1 -1
  34. package/dist/web/assets/{FlaTaskSheets-rSIdCtzz.js → FlaTaskSheets-CJSjxa9s.js} +1 -1
  35. package/dist/web/assets/{FlasPage-BZ791caF.js → FlasPage-BvIsNjmr.js} +1 -1
  36. package/dist/web/assets/{GrowthLoading-BYOSvxZY.js → GrowthLoading-Ddj4TqCR.js} +1 -1
  37. package/dist/web/assets/{HowtoPage-DNTwYQCD.css → HowtoPage-DfHVIb8E.css} +1 -1
  38. package/dist/web/assets/HowtoPage-kSC2Tym0.js +1 -0
  39. package/dist/web/assets/{InboxPage-C3cSvJjB.js → InboxPage-Qfx9kB6z.js} +3 -3
  40. package/dist/web/assets/{KnowledgeDeleteButton-yc8Gi-BH.js → KnowledgeDeleteButton-yq2NE_5V.js} +1 -1
  41. package/dist/web/assets/{KnowledgeHardDeleteSection-D9Ktc-uC.js → KnowledgeHardDeleteSection-DYLuMTkw.js} +1 -1
  42. package/dist/web/assets/{KnowledgeItemEditPage-Csy4oOxD.js → KnowledgeItemEditPage-C_6CCT0l.js} +1 -1
  43. package/dist/web/assets/{KnowledgeItemSummaryCard-BH5UYmde.js → KnowledgeItemSummaryCard-DaS6I6IJ.js} +1 -1
  44. package/dist/web/assets/KnowledgeOrganizerPage-C0TW5FWc.js +1 -0
  45. package/dist/web/assets/KnowledgePage-CpU8zlbY.js +1 -0
  46. package/dist/web/assets/KnowledgePeek-C8KO5NBx.js +1 -0
  47. package/dist/web/assets/{KnowledgeTurnReceiptPage-Bd_LIdCc.js → KnowledgeTurnReceiptPage-Bss7rO8X.js} +1 -1
  48. package/dist/web/assets/{KnowledgeWorkspace-Be2gUul5.css → KnowledgeWorkspace-B2YB4aaQ.css} +1 -1
  49. package/dist/web/assets/KnowledgeWorkspace-NBt_5LEZ.js +4 -0
  50. package/dist/web/assets/{MeAvatar-CmhuRFOf.js → MeAvatar-ec_0AfqZ.js} +1 -1
  51. package/dist/web/assets/{MeLink-BesUihiS.js → MeLink-mcOCZh0y.js} +1 -1
  52. package/dist/web/assets/MenuSeparator-BdUe-nrq.js +1 -0
  53. package/dist/web/assets/ModelSettingsPage-DG4g9dZG.js +1 -0
  54. package/dist/web/assets/{NewSessionPanel-Bvp9ElzU.js → NewSessionPanel-Dp9REysi.js} +1 -1
  55. package/dist/web/assets/{NotFoundPage-BrolI2fz.js → NotFoundPage-mQNgXOdV.js} +1 -1
  56. package/dist/web/assets/NoticeRow-CVxAQhy5.js +1 -0
  57. package/dist/web/assets/NoticeRow-ktVO_9Es.css +1 -0
  58. package/dist/web/assets/OccupationsPage-M2bNGjfX.js +1 -0
  59. package/dist/web/assets/{PageOutline-DULpqEwg.js → PageOutline-BIuKlaez.js} +1 -1
  60. package/dist/web/assets/{PageStack-DTzWJuae.js → PageStack-CJdqrH8a.js} +1 -1
  61. package/dist/web/assets/PersonalProfilePage-CbgimIFG.js +1 -0
  62. package/dist/web/assets/PersonalProjectsPage-Dm38FUPv.js +1 -0
  63. package/dist/web/assets/{PinIcon-YYoaYKTx.js → PinIcon-DBS7pHXp.js} +1 -1
  64. package/dist/web/assets/PopperContent-DyZQrl-r.js +1 -0
  65. package/dist/web/assets/Presence-wz-KVyjT.js +3 -0
  66. package/dist/web/assets/{ProfileAuthorChip-BEfiuJbm.js → ProfileAuthorChip-DAY42zZ8.js} +1 -1
  67. package/dist/web/assets/ProjectAgentsPage-BKWGB-4t.js +5 -0
  68. package/dist/web/assets/{ProjectJudgmentPolicy-CCzHtmOb.js → ProjectJudgmentPolicy-D1UHlAih.js} +1 -1
  69. package/dist/web/assets/RequesterModeSelect-BpaRF_th.js +1 -0
  70. package/dist/web/assets/RequesterModeSelect-DH1PGLmn.css +1 -0
  71. package/dist/web/assets/RoundtablesPage-9mlvO7FV.js +13 -0
  72. package/dist/web/assets/{RoundtablesPage-DL-IOngN.css → RoundtablesPage-Cdbl7Tbx.css} +1 -1
  73. package/dist/web/assets/RovingFocusGroup-CHDkM3pP.js +1 -0
  74. package/dist/web/assets/RovingFocusItem-H6anRCEm.js +1 -0
  75. package/dist/web/assets/{SessionMigrationPage-DrK4df0L.js → SessionMigrationPage-DZfyUaJe.js} +1 -1
  76. package/dist/web/assets/{SessionRecordsPage-CFAgM65g.js → SessionRecordsPage-CK6iztwv.js} +1 -1
  77. package/dist/web/assets/SettingsPage-CVM1Gw0D.js +1 -0
  78. package/dist/web/assets/SettingsPage-DqZGF8J1.css +1 -0
  79. package/dist/web/assets/{SharedJefaReportPage-DbTPYwa_.js → SharedJefaReportPage-cfEk0Tzn.js} +1 -1
  80. package/dist/web/assets/{StatementCalendarPage-CIo5R14R.js → StatementCalendarPage-OmZa4AdL.js} +1 -1
  81. package/dist/web/assets/{StatementRows-CubaC9KG.js → StatementRows-Cdv1wlMo.js} +1 -1
  82. package/dist/web/assets/{TagVocabularyPage-BVlLmKv2.js → TagVocabularyPage-C9pRT-Co.js} +1 -1
  83. package/dist/web/assets/TaskBlockerClear-BBmPbomO.css +1 -0
  84. package/dist/web/assets/TaskBlockerClear-BGpJYYbz.js +1 -0
  85. package/dist/web/assets/TaskBlockerNotice-BtOREiqc.js +1 -0
  86. package/dist/web/assets/{TaskReason-CrLPeiOg.js → TaskReason-Dys3TUp_.js} +1 -1
  87. package/dist/web/assets/{TeamCard-SBMJMd7P.js → TeamCard-D7FU45G4.js} +1 -1
  88. package/dist/web/assets/{TeamCardsWidget-CGLW04TH.js → TeamCardsWidget-hYsXSXcW.js} +1 -1
  89. package/dist/web/assets/TeamIsland-Bw875ekj.js +9 -0
  90. package/dist/web/assets/Teleport-DcReQWaw.js +1 -0
  91. package/dist/web/assets/{TextField-Cd8UOHKv.js → TextField-BO5vPcVo.js} +1 -1
  92. package/dist/web/assets/TodayPage-D9HV_tMn.js +1 -0
  93. package/dist/web/assets/TodayPage-uBkMchn5.css +1 -0
  94. package/dist/web/assets/{TonborgDelegationSwitch-BOidSjkk.js → TonborgDelegationSwitch-TCl6Nu4Q.js} +1 -1
  95. package/dist/web/assets/{UiChip-B2z0UERX.js → UiChip-BDaNYy7i.js} +1 -1
  96. package/dist/web/assets/UiDialog-CkrPgXkI.js +1 -0
  97. package/dist/web/assets/{UiDisclosure-Bw4Wu0Dm.js → UiDisclosure-DHBkq9rj.js} +1 -1
  98. package/dist/web/assets/{UiIcon-BuaIQ57Z.js → UiIcon-BBBPl7ce.js} +1 -1
  99. package/dist/web/assets/UiSegmented-EzA-Ehx4.js +1 -0
  100. package/dist/web/assets/{UiWeight-DpBexUUy.js → UiWeight-EHzBhu5a.js} +1 -1
  101. package/dist/web/assets/{VirtualDirectoryList-RV2XtTPO.js → VirtualDirectoryList-BJrM_eeP.js} +1 -1
  102. package/dist/web/assets/VisitRequestDialog-ISewTzM3.css +1 -0
  103. package/dist/web/assets/VisitRequestDialog-jbgJBF2e.js +1 -0
  104. package/dist/web/assets/VisitRequestsPage-Bkxxiaxy.js +1 -0
  105. package/dist/web/assets/VisitRequestsPage-DfIzoLBx.css +1 -0
  106. package/dist/web/assets/{VisuallyHidden-DciDIEua.js → VisuallyHidden-CgxInDXj.js} +1 -1
  107. package/dist/web/assets/VisuallyHiddenInput-CaWSS7uB.js +1 -0
  108. package/dist/web/assets/WidgetSlot-DENSHLjb.js +2 -0
  109. package/dist/web/assets/WorkbenchListPage-J-UpUosh.js +1 -0
  110. package/dist/web/assets/_plugin-vue_export-helper-B0wc-mt_.js +9 -0
  111. package/dist/web/assets/{agent-apps-B_0syRPr.js → agent-apps-BNje45bS.js} +1 -1
  112. package/dist/web/assets/agent-occupation-aAG5t3l1.js +1 -0
  113. package/dist/web/assets/{agent-pins-B9wMvxGh.js → agent-pins-BCrkTGGW.js} +1 -1
  114. package/dist/web/assets/{agent-roster-records-CY0aSUNq.js → agent-roster-records-BFUsBcZY.js} +1 -1
  115. package/dist/web/assets/{agent-work-summary-Cs8jPFL0.js → agent-work-summary-B_VLOm6o.js} +1 -1
  116. package/dist/web/assets/{attach-closest-edge-BRDsvYPn.js → attach-closest-edge-BPnS_9Lk.js} +1 -1
  117. package/dist/web/assets/{attention-store-HMiJ1K6M.js → attention-store-qIzsiW3O.js} +1 -1
  118. package/dist/web/assets/{badge-jafr8Jg1.js → badge-CtWdRMi-.js} +1 -1
  119. package/dist/web/assets/{button-d6TCVE0s.js → button-_gyKncGb.js} +1 -1
  120. package/dist/web/assets/{card-ebnaJXQA.js → card-BYD6uklY.js} +1 -1
  121. package/dist/web/assets/{catalog-CvdvPGYk.js → catalog-PjA5J9yg.js} +1 -1
  122. package/dist/web/assets/checkbox-5re4FS0U.js +1 -0
  123. package/dist/web/assets/{client--hZxcKYo.js → client-LxAXnO12.js} +1 -1
  124. package/dist/web/assets/{client-links-store-XyR0EzJi.js → client-links-store-CYdBPEgD.js} +1 -1
  125. package/dist/web/assets/combobox-BPUtDA5_.js +1 -0
  126. package/dist/web/assets/{console-D597wx3f.js → console-D45-ZZfX.js} +1 -1
  127. package/dist/web/assets/{conversation-launcher-settings-CFFH9C2y.js → conversation-launcher-settings-BS2bz1uR.js} +1 -1
  128. package/dist/web/assets/copy-mention-D0xSzmH6.js +1 -0
  129. package/dist/web/assets/dialog-xaUosJps.js +1 -0
  130. package/dist/web/assets/{dist-B78L06NL.js → dist-C0lQzDOh.js} +1 -1
  131. package/dist/web/assets/{dist-Dy5JoHWF.js → dist-C1Hez3C6.js} +1 -1
  132. package/dist/web/assets/dropdown-menu-8tDY2fah.js +1 -0
  133. package/dist/web/assets/{field-DeguT8it.js → field-B9eFY0rX.js} +1 -1
  134. package/dist/web/assets/{format-bytes-Br4RwHnA.js → format-bytes-DHztF0Wp.js} +1 -1
  135. package/dist/web/assets/hover-card-CCcSIBsB.js +1 -0
  136. package/dist/web/assets/{identity-V8oA_IuB.js → identity-CW-Srg08.js} +1 -1
  137. package/dist/web/assets/index-CpxVWv-F.js +24 -0
  138. package/dist/web/assets/{input-CRCpCN_c.js → input-BiH7RC9P.js} +1 -1
  139. package/dist/web/assets/label-BdftnoQ0.js +1 -0
  140. package/dist/web/assets/label-table-CLQKbitJ.js +1 -0
  141. package/dist/web/assets/{model-BwOv-HBS.js → model-C7tDPa_1.js} +1 -1
  142. package/dist/web/assets/{model-CB4ObIOH.js → model-Cg5zXaMF.js} +1 -1
  143. package/dist/web/assets/{model-CwFZ_IgV.js → model-DDyIT1eK.js} +1 -1
  144. package/dist/web/assets/{model-CjQPAeCy.js → model-DMd25lv5.js} +1 -1
  145. package/dist/web/assets/{model-C-60EMcI.js → model-DXpi8vqS.js} +1 -1
  146. package/dist/web/assets/{model-D-vak-m0.js → model-DaJv8e-8.js} +1 -1
  147. package/dist/web/assets/{model-B4AuKvPj.js → model-Q1SCdf0F.js} +1 -1
  148. package/dist/web/assets/{model-CUAxIOXR.js → model-qBLcWPQW.js} +1 -1
  149. package/dist/web/assets/{motion-D5Fs3-ut.js → motion-4AmdlpVT.js} +1 -1
  150. package/dist/web/assets/{motion-Cr9JChF9.js → motion-D-GVIJyc.js} +1 -1
  151. package/dist/web/assets/{motion-preference-DgdzdVh8.js → motion-preference-CXHE1-Z7.js} +1 -1
  152. package/dist/web/assets/{occupation-catalog-DHsjkd_q.js → occupation-catalog-CsWai-cw.js} +1 -1
  153. package/dist/web/assets/{occupation-kits-BVLLRN4V.js → occupation-kits-CZQzDPeY.js} +1 -1
  154. package/dist/web/assets/{option-DhAwzags.js → option-B_OFUmRs.js} +1 -1
  155. package/dist/web/assets/{orchestration-filters-lhR2CHlQ.js → orchestration-filters-DqAPmniI.js} +1 -1
  156. package/dist/web/assets/{overview-data-QDnygL-x.js → overview-data-BbAd5G_f.js} +1 -1
  157. package/dist/web/assets/{page-refresh-BVRlo-dI.js → page-refresh-abwcdMEQ.js} +1 -1
  158. package/dist/web/assets/{page-title-ReSXziuS.js → page-title-cvuGZaZo.js} +1 -1
  159. package/dist/web/assets/{person-profile-BgUfg57K.js → person-profile-C8eoODdy.js} +1 -1
  160. package/dist/web/assets/popover-h4zQ7MDI.js +1 -0
  161. package/dist/web/assets/popup-host-8S4Sf9UR.js +1 -0
  162. package/dist/web/assets/{preference-conflicts-a-H51vUw.js → preference-conflicts-Cu00Gk8W.js} +1 -1
  163. package/dist/web/assets/{profile-model-CM98TJsj.js → profile-model-BZIzIQTS.js} +1 -1
  164. package/dist/web/assets/{project-board-layout-RH6UXkCA.js → project-board-layout-DxdyuEpb.js} +1 -1
  165. package/dist/web/assets/{project-capture-DcQ8cXIt.js → project-capture-BQ0ryWdP.js} +1 -1
  166. package/dist/web/assets/{project-origin-BNzeAazi.js → project-origin-CdqHLvij.js} +1 -1
  167. package/dist/web/assets/{quick-edit-api-COKVNuPk.js → quick-edit-api-sf5vVWXR.js} +1 -1
  168. package/dist/web/assets/radio-group-BdWVlNgf.js +1 -0
  169. package/dist/web/assets/{review-api-CAKGInLD.js → review-api-Cbrwrt6C.js} +1 -1
  170. package/dist/web/assets/{review-list-CbpXvBp-.js → review-list-D18L_t-q.js} +1 -1
  171. package/dist/web/assets/{review-store-BzrmqVoj.js → review-store-1jNUbNaJ.js} +1 -1
  172. package/dist/web/assets/{role-names-Ba0c6AbS.js → role-names-CiUKQtV9.js} +1 -1
  173. package/dist/web/assets/{roundtable-live-CoKmaXKd.js → roundtable-live-BzB34cUe.js} +1 -1
  174. package/dist/web/assets/{runtime-dom.esm-bundler-CaYBCU9Y.js → runtime-dom.esm-bundler-BwoD95K8.js} +1 -1
  175. package/dist/web/assets/select-D9sqPsDx.js +1 -0
  176. package/dist/web/assets/{session-launch-offers-C-oBkMKe.js → session-launch-offers-BOZp9NmT.js} +1 -1
  177. package/dist/web/assets/{settings-autosave-C3bTildI.js → settings-autosave-F9mwjeN-.js} +1 -1
  178. package/dist/web/assets/{settings-tabs-C9VDs91j.css → settings-tabs-D8608YHW.css} +1 -1
  179. package/dist/web/assets/settings-tabs-dWS8xFQR.js +1 -0
  180. package/dist/web/assets/shared-report-BmpdFBj3.js +3 -0
  181. package/dist/web/assets/{source-adapters-CunVF9JG.js → source-adapters-CZGvDHoP.js} +1 -1
  182. package/dist/web/assets/switch-BFhMPFpu.js +1 -0
  183. package/dist/web/assets/tabs-B6N6pM8p.js +1 -0
  184. package/dist/web/assets/{task-card-fields-Ce11pWnv.js → task-card-fields-G9NoV8iz.js} +1 -1
  185. package/dist/web/assets/{task-labels-BulIuDQB.js → task-labels-Y0y3oeAL.js} +1 -1
  186. package/dist/web/assets/{task-reason-gHlp8KHO.js → task-reason-D84kviwH.js} +1 -1
  187. package/dist/web/assets/{team-sheets-BzV1WjjK.js → team-sheets-DtMFWcPH.js} +1 -1
  188. package/dist/web/assets/{textarea-D6czUY3a.js → textarea-8EWEgEpw.js} +1 -1
  189. package/dist/web/assets/ui-BxmkvkMK.js +1 -0
  190. package/dist/web/assets/{useAgentRecords-DijrJ79w.js → useAgentRecords-D5CXJVEf.js} +1 -1
  191. package/dist/web/assets/{useAgentWorkSummary-CUv88AVP.js → useAgentWorkSummary-D1Ep9uAl.js} +1 -1
  192. package/dist/web/assets/{useApi-CROJJdhE-CxqsMZ6P.js → useApi-CROJJdhE-Cb6lwzpM.js} +1 -1
  193. package/dist/web/assets/{useClipboardCopy-uGyNKuWB.js → useClipboardCopy-C3PFlW0X.js} +1 -1
  194. package/dist/web/assets/{useFocusReturn-7BKdKvqF.js → useFocusReturn-B73WeAHQ.js} +1 -1
  195. package/dist/web/assets/useFormControl-DwHlZ4bV.js +1 -0
  196. package/dist/web/assets/useForwardExpose-4rpHye8H.js +1 -0
  197. package/dist/web/assets/{useForwardPropsEmits-BMeknK03.js → useForwardPropsEmits-DX7VZylm.js} +1 -1
  198. package/dist/web/assets/useForwardScopeId-BJDKoqyi.js +1 -0
  199. package/dist/web/assets/{useKnowledgeConfirm-mFWI8EbK.js → useKnowledgeConfirm-yhZ8Iqzc.js} +1 -1
  200. package/dist/web/assets/{useKnowledgeItemPeek-DtazLM2s.js → useKnowledgeItemPeek-D-zThKj5.js} +1 -1
  201. package/dist/web/assets/useListPages-BNB3C09x.js +1 -0
  202. package/dist/web/assets/{useMinimumLoadingDisplay-D5UC2KRz.js → useMinimumLoadingDisplay-DzHl6chR.js} +1 -1
  203. package/dist/web/assets/useNow-ChD63hSg.js +1 -0
  204. package/dist/web/assets/{usePageTools-BXkR_gpB.js → usePageTools-D3N7UX5-.js} +1 -1
  205. package/dist/web/assets/usePrimitiveElement-CdgGZRug.js +1 -0
  206. package/dist/web/assets/{useProjectAgentRoster-blZ5REnH.js → useProjectAgentRoster-BhjNHid8.js} +1 -1
  207. package/dist/web/assets/{useRoutePeek-D_j5KVFv.js → useRoutePeek-C2k0liTX.js} +1 -1
  208. package/dist/web/assets/{useTeamWork-e57CKhLW.js → useTeamWork-Bo2hjiA1.js} +1 -1
  209. package/dist/web/assets/{useTypeahead-6a1q-4Oq.js → useTypeahead-DTOx7gNa.js} +1 -1
  210. package/dist/web/assets/{utils-DBsOpQt4.js → utils-DXRJ1hJ4.js} +1 -1
  211. package/dist/web/assets/utils-DeBPoCtM.js +1 -0
  212. package/dist/web/assets/{verification-BlF0avgs.js → verification-DRKJF06P.js} +1 -1
  213. package/dist/web/assets/{version-oG6VyAd6.js → version-B2XiHNBv.js} +1 -1
  214. package/dist/web/assets/{vue-router-CCvxNose.js → vue-router-CbcwRkrV.js} +1 -1
  215. package/dist/web/assets/{NoticeRow-DD-J76Yo.css → workbench-card-Dt0820yW.css} +1 -1
  216. package/dist/web/index.html +77 -74
  217. package/docs/agent-roundtable.md +214 -3
  218. package/graph-provider/fuli_graph/graph_field_contract.py +2 -0
  219. package/graph-provider/fuli_graph/graph_format_migrations.py +5 -0
  220. package/graph-provider/fuli_graph/knowledge_search.py +84 -7
  221. package/graph-provider/fuli_graph/knowledge_sensitivity.py +105 -0
  222. package/graph-provider/fuli_graph/knowledge_source_delete_copies.py +36 -0
  223. package/graph-provider/fuli_graph/models.py +25 -0
  224. package/graph-provider/fuli_graph/project_agent_remote_origins.py +27 -13
  225. package/graph-provider/pyproject.toml +1 -1
  226. package/native/win32/fuli-win-helper.exe +0 -0
  227. package/npm-shrinkwrap.json +2 -2
  228. package/package.json +1 -1
  229. package/packages/roundtable/src/agents/claude-code/constrained-run.js +58 -0
  230. package/packages/roundtable/src/agents/claude-code/wake.js +32 -12
  231. package/packages/roundtable/src/agents/codex/wake.js +25 -7
  232. package/packages/roundtable/src/agents/wake-usage.js +14 -0
  233. package/packages/roundtable/src/host.js +33 -0
  234. package/packages/roundtable/src/peer/control-cli.js +5 -1
  235. package/packages/roundtable/src/peer/control.js +10 -3
  236. package/packages/roundtable/src/peer/coordinator-service.js +30 -13
  237. package/packages/roundtable/src/peer/coordinator-store.js +11 -4
  238. package/packages/roundtable/src/peer/lan-addresses.js +8 -2
  239. package/packages/roundtable/src/peer/nearby-pairing.js +13 -1
  240. package/packages/roundtable/src/peer/origin-proof.js +17 -2
  241. package/packages/roundtable/src/peer/peer-port.js +45 -7
  242. package/packages/roundtable/src/peer/peer-runtime.js +40 -6
  243. package/packages/roundtable/src/peer/protocol.js +89 -2
  244. package/packages/roundtable/src/peer/query-answer.js +110 -0
  245. package/packages/roundtable/src/peer/runner.js +108 -13
  246. package/packages/roundtable/src/roundtable/constrained-run.js +48 -0
  247. package/packages/roundtable/src/roundtable/group-discussion.js +1 -1
  248. package/packages/roundtable/src/roundtable/service.js +120 -21
  249. package/packages/roundtable/src/roundtable/store.js +14 -0
  250. package/packages/roundtable/src/roundtable/wake-attempt-store.js +41 -0
  251. package/packages/roundtable/src/roundtable/wake-claim-release.js +20 -12
  252. package/packages/roundtable/src/roundtable/wake-failure.js +81 -0
  253. package/packages/roundtable/src/roundtable/wake-ladder.js +5 -0
  254. package/packages/roundtable/src/roundtable/wake.js +69 -24
  255. package/packages/roundtable/src/standalone/host.js +5 -2
  256. package/skills/capturing-session-knowledge/references/coordination.md +19 -0
  257. package/skills/operating-fuli/SKILL.md +12 -3
  258. package/skills/operating-fuli/references/workflow-recipes.md +7 -3
  259. package/src/agent-apps/host-tools/catalog.js +1 -0
  260. package/src/agent-kits/fuli-mcp-entry.js +25 -0
  261. package/src/agent-peer/http.js +15 -1
  262. package/src/agent-roundtable/tools.js +11 -0
  263. package/src/agent-tools/interface-catalog.js +21 -6
  264. package/src/agent-tools/statement-definitions.js +3 -1
  265. package/src/agents/claude-code/hook-contract.js +29 -0
  266. package/src/agents/claude-code/lifecycle-event.js +337 -0
  267. package/src/agents/claude-code/lifecycle-hook.js +10 -296
  268. package/src/agents/codex/hook-contract.js +31 -0
  269. package/src/agents/codex/lifecycle-event.js +350 -0
  270. package/src/agents/codex/lifecycle-hook.js +10 -326
  271. package/src/agents/lifecycle-events.js +75 -0
  272. package/src/agents/lifecycle-failure.js +3 -2
  273. package/src/agents/lifecycle-forwarder.js +268 -0
  274. package/src/agents/lifecycle-hook-calls.js +93 -0
  275. package/src/agents/source-applications.js +8 -0
  276. package/src/agents/token-usage-resolver.js +10 -0
  277. package/src/data-format/data-newer-than-package.js +65 -0
  278. package/src/data-format/local-stores.js +4 -1
  279. package/src/desktop/failed-update-recovery.js +80 -0
  280. package/src/desktop/macos-app-update.js +86 -22
  281. package/src/desktop/windows-controller.js +17 -4
  282. package/src/desktop/windows-installation-context.js +26 -1
  283. package/src/desktop/windows-installation-switch.js +83 -21
  284. package/src/desktop/windows-rollback.js +4 -4
  285. package/src/desktop/windows-tray-update.js +1 -1
  286. package/src/desktop/windows-update-command.js +4 -1
  287. package/src/desktop/windows-update.js +4 -4
  288. package/src/diagnostics/failure-records.js +18 -2
  289. package/src/diagnostics/query.js +2 -2
  290. package/src/diagnostics/safe-event.js +38 -12
  291. package/src/external-knowledge/safe-diagnostic.js +2 -5
  292. package/src/graphiti/federated-application.js +2 -1
  293. package/src/graphiti/local-runtimes.js +25 -1
  294. package/src/graphiti/project-agent-task-sessions.js +1 -8
  295. package/src/graphiti/roundtable-host.js +62 -0
  296. package/src/graphiti/runtime-config.js +3 -1
  297. package/src/graphiti/task-context-entry.js +6 -3
  298. package/src/guest-access/failed-bearer-limit.js +31 -0
  299. package/src/guest-access/guest-card.js +22 -0
  300. package/src/guest-access/guest-mcp.js +34 -0
  301. package/src/guest-access/guest-routes.js +144 -0
  302. package/src/guest-access/listener.js +152 -0
  303. package/src/guest-access/refusal-tally.js +37 -0
  304. package/src/guest-access/runtime.js +117 -0
  305. package/src/http/api-router.js +10 -1
  306. package/src/http/guest-links-api-router.js +42 -0
  307. package/src/http/lifecycle-hooks-api-router.js +128 -0
  308. package/src/http/response.js +7 -6
  309. package/src/http/statement-api-router.js +10 -3
  310. package/src/http/visitor-access-api-router.js +51 -0
  311. package/src/judgment/routing.js +6 -1
  312. package/src/knowledge-impressions/store.js +30 -6
  313. package/src/local-runtime/console-autostart-record.js +10 -0
  314. package/src/local-runtime/console-health.js +7 -2
  315. package/src/local-runtime/lifecycle.js +2 -3
  316. package/src/mcp/create-mcp-server.js +2 -0
  317. package/src/mcp/http-session-transport.js +384 -0
  318. package/src/mcp/remote-http-server.js +27 -357
  319. package/src/mcp/session-id.js +1 -1
  320. package/src/mcp/tool-annotations.js +3 -1
  321. package/src/native-runtime/runtime.js +28 -3
  322. package/src/native-runtime/windows-processes.js +6 -6
  323. package/src/presence/windows-helper-pin.js +1 -1
  324. package/src/server/lan-access.js +43 -9
  325. package/src/server.js +31 -2
  326. package/src/setup/graph-runtime.js +10 -6
  327. package/src/statement/agent-tool.js +16 -8
  328. package/src/statement/compounding-statement.js +55 -0
  329. package/src/system/doctor.js +1 -1
  330. package/src/system/fuli-process-scan.js +81 -0
  331. package/src/system/system-service.js +2 -2
  332. package/src/text/control-characters.js +9 -0
  333. package/src/text/local-paths.js +98 -0
  334. package/src/text/shareable-text.js +23 -0
  335. package/src/visit-requests/auto-envelope.js +101 -0
  336. package/src/visit-requests/git-names.js +10 -0
  337. package/src/visit-requests/http.js +105 -0
  338. package/src/visit-requests/peer-entry.js +18 -0
  339. package/src/visit-requests/records.js +140 -0
  340. package/src/visit-requests/runner.js +164 -0
  341. package/src/visit-requests/service.js +575 -0
  342. package/src/visit-requests/worktree.js +351 -0
  343. package/src/visitor-access/guest-links.js +75 -0
  344. package/src/visitor-access/port.js +269 -0
  345. package/src/visitor-access/rate-limit.js +49 -0
  346. package/src/visitor-access/shared-project-search.js +129 -0
  347. package/src/visitor-access/store.js +313 -0
  348. package/src/whats-new/lines/0.27.3.json +13 -0
  349. package/src/whats-new/lines/0.27.4.json +13 -0
  350. package/dist/web/assets/AboutSectionHeading-BaQBY_Xs.js +0 -1
  351. package/dist/web/assets/AboutSectionHeading-DjXpIV27.css +0 -1
  352. package/dist/web/assets/AgentAppsPage-DNuujLT2.js +0 -1
  353. package/dist/web/assets/AgentAvatar-DGXedNUs.js +0 -1
  354. package/dist/web/assets/AgentAvatar-DbsG1_BY.css +0 -1
  355. package/dist/web/assets/AgentManagement-2r8DUS1N.js +0 -7
  356. package/dist/web/assets/AgentManagement-hRkMpjvY.css +0 -1
  357. package/dist/web/assets/AgentServicesPage-CWfGSxcb.js +0 -1
  358. package/dist/web/assets/DebugTurnPage-B82geu1y.js +0 -1
  359. package/dist/web/assets/DialogTitle-fpANsAcy.js +0 -1
  360. package/dist/web/assets/EmployeeScopeDialog-BoEMQOEj.js +0 -1
  361. package/dist/web/assets/FieldRoot-D3lnRut5.js +0 -1
  362. package/dist/web/assets/HowtoPage-lYwzi4Vm.js +0 -1
  363. package/dist/web/assets/KnowledgeOrganizerPage-BTeQX0gH.js +0 -1
  364. package/dist/web/assets/KnowledgePage-BuukvNxz.js +0 -1
  365. package/dist/web/assets/KnowledgePeek-D0pcU7U5.js +0 -1
  366. package/dist/web/assets/KnowledgeWorkspace-Dr-zYpDQ.js +0 -4
  367. package/dist/web/assets/MenuSeparator-BGo0DgyF.js +0 -1
  368. package/dist/web/assets/ModelSettingsPage-CBPwuIBM.js +0 -1
  369. package/dist/web/assets/NoticeRow-Q9QT5NqB.js +0 -1
  370. package/dist/web/assets/OccupationsPage-CZCeeihl.js +0 -1
  371. package/dist/web/assets/PersonalProfilePage-DbXWycCQ.js +0 -1
  372. package/dist/web/assets/PersonalProjectsPage-pdAJpnZd.js +0 -1
  373. package/dist/web/assets/PopperContent-CnNwFMIA.js +0 -1
  374. package/dist/web/assets/Presence-CuIoA2sH.js +0 -3
  375. package/dist/web/assets/ProjectAgentsPage-BPf2RLsw.js +0 -5
  376. package/dist/web/assets/RoundtablesPage-BDU4W-bg.js +0 -13
  377. package/dist/web/assets/RovingFocusGroup-DS4v3bEq.js +0 -1
  378. package/dist/web/assets/RovingFocusItem-bLEnnw2Y.js +0 -1
  379. package/dist/web/assets/SettingsPage-CsJxhhsu.js +0 -1
  380. package/dist/web/assets/SettingsPage-VX_e4ty2.css +0 -1
  381. package/dist/web/assets/TaskBlockerNotice-YSvmy6B4.js +0 -1
  382. package/dist/web/assets/TeamIsland-jJKTwCJD.js +0 -9
  383. package/dist/web/assets/Teleport-CRjWb-eC.js +0 -1
  384. package/dist/web/assets/TodayPage-BvbZCEFJ.js +0 -1
  385. package/dist/web/assets/TodayPage-EJ8SWFE0.css +0 -1
  386. package/dist/web/assets/UiSegmented-DlI1vR3k.js +0 -1
  387. package/dist/web/assets/VisuallyHiddenInput-mfi7gVBu.js +0 -1
  388. package/dist/web/assets/WidgetSlot-xFZKjZ5z.js +0 -2
  389. package/dist/web/assets/WorkbenchListPage-suawrzji.js +0 -1
  390. package/dist/web/assets/_plugin-vue_export-helper-CYsAcErn.js +0 -9
  391. package/dist/web/assets/agent-occupation-C-9THmIG.js +0 -1
  392. package/dist/web/assets/checkbox-CdIozFRY.js +0 -1
  393. package/dist/web/assets/combobox-DzLSYxyO.js +0 -1
  394. package/dist/web/assets/copy-mention-CWsw8po1.js +0 -1
  395. package/dist/web/assets/dialog-SLa8cPbS.js +0 -1
  396. package/dist/web/assets/dropdown-menu-C-PcZxRY.js +0 -1
  397. package/dist/web/assets/hover-card-B-H7mMvg.js +0 -1
  398. package/dist/web/assets/index-DdAVEwQV.js +0 -24
  399. package/dist/web/assets/label-DwMBzI2m.js +0 -1
  400. package/dist/web/assets/label-table-DiaZlHIp.js +0 -1
  401. package/dist/web/assets/popover-UYksnAeH.js +0 -1
  402. package/dist/web/assets/popup-host-DMoMkD3v.js +0 -1
  403. package/dist/web/assets/radio-group-DfegNkLG.js +0 -1
  404. package/dist/web/assets/select-Bq2TQ0Gw.js +0 -1
  405. package/dist/web/assets/settings-tabs-DFZcxOaQ.js +0 -1
  406. package/dist/web/assets/shared-report-Ci1jBiYV.js +0 -3
  407. package/dist/web/assets/switch-DaUSEDq0.js +0 -1
  408. package/dist/web/assets/tabs-B_7xQRfl.js +0 -1
  409. package/dist/web/assets/ui-BCHzwL4X.js +0 -1
  410. package/dist/web/assets/useDirection-Bi78LycK.js +0 -1
  411. package/dist/web/assets/useForwardScopeId-DHGSyWlZ.js +0 -1
  412. package/dist/web/assets/usePrimitiveElement-BxOn-Fn_.js +0 -1
  413. package/dist/web/assets/utils-BQtZ8ZUw.js +0 -1
  414. package/src/system/mcp-process-scan.js +0 -55
@@ -13,10 +13,13 @@ import { agentDiscoveryProfile, matchesAgentDiscovery } from './discovery.js';
13
13
  import { CLIENT_LABELS, deliveryState } from './delivery-state.js';
14
14
 
15
15
  import { RoundtableError } from '../errors.js';
16
+ import { visitView } from '../peer/query-answer.js';
17
+ import { isOpaqueId, validVisitRequest } from '../peer/protocol.js';
16
18
  import { assertRoundtableHost } from '../host.js';
17
19
  import { nearNames } from './near-names.js';
18
20
  import { WAKE_CLIENTS, resolveClientCommand, sessionTurnRunning, sessionWorkingDirectory, wakeAgent } from './wake.js';
19
- import { createWakeLadder, standInAllowed } from './wake-ladder.js';
21
+ import { REMOTE_WAKE_ATTEMPTS, createWakeLadder, standInAllowed } from './wake-ladder.js';
22
+ import { outwardFailureView, wakeAttemptRecord } from './wake-failure.js';
20
23
  import { enterStandIn, recordStandInReply, standInState } from './stand-in.js';
21
24
 
22
25
  const THREAD_MESSAGE_LIMIT = 24;
@@ -25,6 +28,9 @@ const REMOTE_PENDING = new Set(['sent', 'queued', 'claimed', 'running']);
25
28
  const REMOTE_FINAL = new Set(['answered', 'failed', 'cancelled', 'expired', 'unknown']);
26
29
  // Claim refusals kept on the ask; a chat wait is the chat's own state, not the ask's.
27
30
  const RECORDED_REFUSALS = new Set(['execution_claimed', 'cleanup_unconfirmed']);
31
+ // A later wake of a remote ask starts only with this much of its deadline left
32
+ // (the shortest grant lifetime the Provider issues).
33
+ const MIN_REMOTE_WAKE_MS = 30_000;
28
34
 
29
35
  // Agents talk to each other directly: an ask wakes the recipient in its own
30
36
  // client and returns its answer, or waits in its inbox for its next task.
@@ -190,8 +196,9 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
190
196
  ladder?.skip('new_session', { client: preferClient,
191
197
  reason: permitted.includes(preferClient) ? 'client_unavailable' : 'client_not_allowed' });
192
198
  }
199
+ // A share names its clients in the owner's order.
193
200
  const freshClients = explicit ? [resumable.client]
194
- : [...new Set([preferClient ?? resumable?.client, ...WAKE_CLIENTS])].filter((client) => allowed.includes(client));
201
+ : [...new Set([preferClient ?? resumable?.client, ...(clients ?? WAKE_CLIENTS)])].filter((client) => allowed.includes(client));
195
202
  // A strict delivery only starts new sessions in a folder known for this project.
196
203
  const strictFolder = strictCwd ? freshCwd ?? resumable?.cwd ?? await projectFolder(agent, projectId) : null;
197
204
  if (strictCwd && !strictFolder) return resumable ? [resumable] : [];
@@ -213,27 +220,52 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
213
220
 
214
221
  // Tries each target until one answers as the restored Agent. The grant is the
215
222
  // only authority the woken session receives and is revoked after every attempt.
216
- async function deliver({ ask, attempts, prompt, timeoutMs, issueGrant, signal, onSpawn, peerDepth, oneGrant = false,
217
- readOnly = false, ladder = null }) {
223
+ // remote ({ deadline }): a paired device's ask wakes at most REMOTE_WAKE_ATTEMPTS
224
+ // times, all within its one execution deadline, and a refused grant ends it.
225
+ // onlyFuliMcp: the woken session loads only FULI's own MCP server where the
226
+ // host can name it (host.fuliMcpServer), else no MCP server at all; an ask
227
+ // from another computer runs on text from elsewhere, so it never gets the
228
+ // person's others. preferFuliMcp: a group discussion turn, whose text is
229
+ // the person's own Agents', loads only FULI's server where the host can
230
+ // name it and stays as it was (the client's own servers) where it cannot,
231
+ // so a discussion never fails for the lack of that entry.
232
+ const fuliOnly = (client) => {
233
+ const entry = host.fuliMcpServer?.(client) ?? null;
234
+ return entry ? { fuli: entry } : {};
235
+ };
236
+ const wakeServers = (client, { onlyFuliMcp, preferFuliMcp }) => {
237
+ const servers = onlyFuliMcp || preferFuliMcp ? fuliOnly(client) : null;
238
+ return servers && (onlyFuliMcp || servers.fuli) ? { mcpServers: servers } : {};
239
+ };
240
+ async function deliver({ ask, attempts, prompt, timeoutMs, issueGrant, signal, onSpawn, peerDepth, remote = null,
241
+ wakeMode = 'answer', ladder = null, onlyFuliMcp = false, preferFuliMcp = false }) {
218
242
  const unusable = new Set();
219
243
  let failure = 'wake_failed';
244
+ let detail = null;
245
+ let woken = 0;
220
246
  let cleanup = null;
221
247
  for (const delivery of attempts) {
222
248
  if (unusable.has(delivery.client)) continue;
223
- if (signal?.aborted) { failure = 'cancelled'; break; }
249
+ if (signal?.aborted) { failure = 'cancelled'; detail = 'cancelled'; break; }
224
250
  // Resuming in place would write into a turn that is still running.
225
251
  if (delivery.busy) {
226
252
  failure = 'session_busy';
253
+ detail = null;
227
254
  ladder?.skip('resume', { client: delivery.client, session: delivery.sessionId, reason: failure });
228
255
  continue;
229
256
  }
257
+ const waitMs = remote ? Math.min(timeoutMs, remote.deadline - now()) : timeoutMs;
258
+ if (remote && woken && (woken >= REMOTE_WAKE_ATTEMPTS || waitMs < MIN_REMOTE_WAKE_MS)) break;
230
259
  store.updateMessage(ask.id, { status: 'delivering', toClient: delivery.client, toSession: delivery.sessionId });
231
260
  let answer;
232
261
  let grant;
262
+ const startedAt = now();
233
263
  try {
234
- grant = await issueGrant(delivery, timeoutMs / 1000);
264
+ grant = await issueGrant(delivery, waitMs / 1000);
265
+ woken += 1;
235
266
  answer = await wake({ client: delivery.client, sessionId: delivery.sessionId, cwd: delivery.cwd,
236
- timeoutMs, prompt, delegationToken: grant.token, peerDepth, signal, readOnly,
267
+ timeoutMs: waitMs, prompt, delegationToken: grant.token, peerDepth, signal, mode: wakeMode,
268
+ ...wakeServers(delivery.client, { onlyFuliMcp, preferFuliMcp }),
237
269
  onSpawn: (pid) => { wakeClaims.recordSpawn(ask.id, pid); onSpawn?.(pid); },
238
270
  onSession: session => host.sealDelegation({ token: grant.token, sessionId: session }) });
239
271
  const verified = answer.sessionId && await host.verifyDelegation({ token: grant.token, sessionId: answer.sessionId });
@@ -242,7 +274,11 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
242
274
  store.recordMemoryResult(ask.id, verified.memoryResultCount ?? 0);
243
275
  } catch (error) {
244
276
  failure = attemptFailure(error);
277
+ detail = error.detail ?? null;
245
278
  ladder?.attempt(delivery, 'failed', failure);
279
+ // A failed wake still keeps what its client reported (the stream before
280
+ // it failed, or an answer whose session did not restore the Agent).
281
+ if (grant) recordWake(ask, delivery, { startedAt, remote, error, reported: error.reported ?? answer });
246
282
  // The team rules refused this Agent: no other channel or stand-in may reach it.
247
283
  if (failure === 'not_permitted') break;
248
284
  // A process that may still be running must not get a sibling on another channel.
@@ -256,19 +292,36 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
256
292
  if (['client_login_required', 'client_unavailable'].includes(failure)) unusable.add(delivery.client);
257
293
  // A timeout already used the caller's wait; a cancellation ends the delivery.
258
294
  if (failure === 'wake_timeout' || failure === 'cancelled') break;
259
- // A remote attempt receives authority once; a second channel would only be
260
- // refused and hide why the first one failed.
261
- if (oneGrant) break;
295
+ // Each wake of a remote ask is authorised as the first one was (its own
296
+ // grant from the owner's Provider); a refused grant ends the ask.
297
+ if (remote && !grant) break;
262
298
  continue;
263
299
  } finally {
264
300
  // Even failed or timed-out attempts lose their authority. Expiry remains
265
301
  // the fail-closed backstop if the Provider is temporarily unreachable.
266
302
  if (grant?.token) await host.revokeDelegation({ token: grant.token }).catch(() => {});
267
303
  }
304
+ recordWake(ask, delivery, { startedAt, remote, reported: answer });
268
305
  ladder?.attempt(delivery, 'answered');
269
306
  return { answer, delivery, via: `${delivery.client}:${delivery.sessionId ? 'resume' : 'new'}` };
270
307
  }
271
- throw Object.assign(new Error('No client answered'), { code: failure, ...(cleanup ? { cleanup } : {}) });
308
+ throw Object.assign(new Error('No client answered'), { code: failure, ...(detail ? { detail } : {}),
309
+ ...(remote ? { attempts: woken } : {}), ...(cleanup ? { cleanup } : {}) });
310
+ }
311
+
312
+ // Each wake is kept where it ran, its output only as the host redacts it
313
+ // (wake-failure.js); a failure also reaches the host's diagnostics, without that output.
314
+ // The record is diagnostics: failing to keep it never changes what the ask answers.
315
+ // reported: the model and usage the client reported for this wake, if any.
316
+ function recordWake(ask, delivery, { startedAt, remote, error = null, reported = null }) {
317
+ try {
318
+ const record = wakeAttemptRecord({ client: delivery.client, sessionId: delivery.sessionId, error, reported,
319
+ durationMs: now() - startedAt, redact: host.redactDiagnostic });
320
+ store.wakeAttempts.record(ask.id, record);
321
+ if (!error || record.code === 'cancelled') return;
322
+ const { client, sessionMode, code, detail, exitCode, signal, durationMs } = record;
323
+ host.recordWakeFailure?.({ client, sessionMode, code, detail, exitCode, signal, durationMs, remote: Boolean(remote) });
324
+ } catch { /* the wake's own outcome stands */ }
272
325
  }
273
326
 
274
327
  // While an earlier wake of this Agent may still be running, no new one starts.
@@ -280,8 +333,9 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
280
333
 
281
334
  async function messageAgent({ taskContextToken = null, sourceApplication, to, body, threadId = null,
282
335
  conversation = 'auto', wait = true, timeoutSeconds = 300, projectPath = null, roundtableProjectId = null, signal, chatWakeChatId = null, chatWake = null,
283
- // readOnly: a group discussion turn, woken where it can change nothing (wake adapters).
284
- readOnly = false } = {}) {
336
+ // wakeMode: read_only for a group discussion turn, woken where it can change nothing (wake adapters).
337
+ wakeMode = 'answer' } = {}) {
338
+ const readOnly = wakeMode === 'read_only';
285
339
  if (roundtableProjectId && peer?.isRemoteAddress(to)) throw validation('This scoped consultation cannot leave its project');
286
340
  if (peer?.isRemoteAddress(to)) {
287
341
  return messageRemote({ taskContextToken, sourceApplication, to, body, threadId, conversation, wait, timeoutSeconds, chatWake, signal });
@@ -315,7 +369,7 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
315
369
  if (!taskContextToken) return queued(thread, ask, target, 'task_context_required');
316
370
  const ladder = createWakeLadder();
317
371
  // A task outside every project holds no authority the Provider can pass on.
318
- const woken = !from.projectId ? withoutGrant(ask, ladder) : await wakeAsk({ thread, ask, target, chatWakeChatId, signal, readOnly, ladder,
372
+ const woken = !from.projectId ? withoutGrant(ask, ladder) : await wakeAsk({ thread, ask, target, chatWakeChatId, signal, wakeMode, ladder,
319
373
  timeoutMs: Math.min(Math.max(timeoutSeconds, 30), 900) * 1000,
320
374
  targets: async () => deliveryTargets(target, conversation, targetProjectId, crossProject ? null : projectPath,
321
375
  { preferClient: from.client, ladder,
@@ -358,7 +412,7 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
358
412
  // verified answer becomes its reply. An ask that is not answered stays queued
359
413
  // with the reason, so the recipient still sees it when it next works.
360
414
  async function wakeAsk({ thread, ask, target, targets, noTargets, prompt, timeoutMs, signal, issueGrant, replyTo,
361
- chatWakeChatId = null, readOnly = false, ladder = null }) {
415
+ chatWakeChatId = null, wakeMode = 'answer', ladder = null }) {
362
416
  await wakeClaims.release(spaceId(), target.agentId);
363
417
  const claim = store.claimExecution(spaceId(), target.agentId, ask.id, { chatWakeChatId });
364
418
  if (!claim.claimed) {
@@ -376,10 +430,11 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
376
430
  return { status: 'queued', reason };
377
431
  }
378
432
  // A read-only turn cannot go to a desktop conversation, which runs with the person's own settings.
379
- const app = readOnly ? null : desktopApp(attempts[0].client);
433
+ const app = wakeMode === 'read_only' ? null : desktopApp(attempts[0].client);
380
434
  if (app) return handToDesktop({ thread, ask, target, delivery: attempts[0], app, timeoutMs, signal, ladder });
381
435
  try {
382
- const { answer, delivery, via } = await deliver({ ask, attempts, prompt, timeoutMs, signal, readOnly, issueGrant, ladder });
436
+ const { answer, delivery, via } = await deliver({ ask, attempts, prompt, timeoutMs, signal, wakeMode, issueGrant, ladder,
437
+ preferFuliMcp: wakeMode === 'read_only' });
383
438
  finishWake(ask);
384
439
  store.updateMessage(ask.id, { status: 'answered', via });
385
440
  const reply = store.appendMessage(thread.id, { id: idFactory(), kind: 'reply', body: answer.body, status: 'sent',
@@ -504,6 +559,28 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
504
559
  return handedOver(remoteView(applyRemote(ask.id, state)), 'message_agent');
505
560
  }
506
561
 
562
+ // The visiting assistant: the current task's Agent reads a paired device's
563
+ // shared project with this client's own model. The other device answers from
564
+ // its shared knowledge and wakes nothing; message_agent is the path that wakes its lead.
565
+ async function visitSharedLead({ taskContextToken = null, sourceApplication, address, action, queries, request, requestId, signal }) {
566
+ if (!peer?.isRemoteAddress(address)) throw validation('Visit a paired device\'s lead by its peer:<device>:<binding> address from find_agents');
567
+ if (!VISIT_ACTIONS.has(action)) throw validation('action is card, search, request or request_status');
568
+ if (action === 'search' && (!Array.isArray(queries) || !queries.length || queries.length > 4
569
+ || !queries.every((query) => typeof query === 'string' && query.trim() && query.length <= 200))) {
570
+ throw validation('search needs 1-4 focused queries of at most 200 characters');
571
+ }
572
+ if (action === 'request' && !validVisitRequest(request)) {
573
+ throw validation('request needs request: { title (≤160), what (≤4000), expectedAreas? (≤10 paths of ≤200) }');
574
+ }
575
+ if (action === 'request_status' && !isOpaqueId(requestId)) throw validation('request_status needs the requestId request answered');
576
+ const from = await sender({ taskContextToken, sourceApplication });
577
+ if (!from.agent || !from.projectId) throw validation('A visit must come from an active project task of a FULI Agent; pass taskContextToken');
578
+ const target = await peer.resolveRemote(address);
579
+ const answer = await peer.query(target, visitQuestion({ action, queries, request, requestId }), { taskContextToken,
580
+ sourceApplication: from.client, from: { agentId: from.agent.agentId, name: label(from.agent) }, signal });
581
+ return visitView({ address: target.address, device: target.deviceName, action, answer });
582
+ }
583
+
507
584
  function applyRemote(messageId, state) {
508
585
  const ask = store.getMessage(messageId);
509
586
  if (!ask || !state || !REMOTE_PENDING.has(ask.status)) return ask;
@@ -528,7 +605,7 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
528
605
  ? store.messages(ask.thread_id).find((message) => message.in_reply_to === ask.id) : null;
529
606
  return { status: ask.status === 'sent' ? 'queued' : ask.status, threadId: ask.thread_id, messageId: ask.id,
530
607
  recipient: { agentId: ask.to_agent, name: ask.to_name }, remote: true,
531
- ...(reply ? { reply: reply.body, via: reply.via } : {}), ...(ask.error ? { reason: ask.error } : {}),
608
+ ...(reply ? { reply: reply.body, via: reply.via } : {}), ...(ask.error ? outwardFailureView(ask.error) : {}),
532
609
  ...cleanupView(storedCleanup(ask)),
533
610
  ...(REMOTE_FINAL.has(ask.status) ? {} : { guidance: 'The remote device has not answered yet. Check later with get_agent_message_status; it does not mean the work ran.' }),
534
611
  ...(ask.status === 'unknown' ? { guidance: 'The remote device lost track of this attempt; it may or may not have run. It is not retried automatically.' } : {}) };
@@ -576,8 +653,9 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
576
653
  }
577
654
  const prompt = promptOverride ?? wakePrompt({ thread, ask, target, senderName: ask.from_name, senderClient: ask.from_client });
578
655
  try {
656
+ // A paired device only asks: every client is woken read-only on this computer.
579
657
  const { answer, delivery, via } = await deliver({ ask, attempts, prompt, timeoutMs, issueGrant, signal, onSpawn,
580
- peerDepth: assertion.depth, oneGrant: true });
658
+ peerDepth: assertion.depth, wakeMode: 'read_only', onlyFuliMcp: true, remote: { deadline: now() + timeoutMs } });
581
659
  finishWake(ask);
582
660
  store.updateMessage(ask.id, { status: 'answered', via });
583
661
  store.appendMessage(thread.id, { id: idFactory(), kind: 'reply', body: answer.body, status: 'sent', inReplyTo: ask.id, via,
@@ -831,9 +909,13 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
831
909
  // conversations, who is subscribed and how each one receives a post.
832
910
  const ownerThread = async ({ threadId }) => ({ ...thread({ threadId }), ...await person.view(threadId) });
833
911
  return { ...chat, findAgents, messageAgent, readMessages, replyMessage, threads, thread, refreshRemote, taskEntryDelegation,
834
- messageStatus, cancelMessage, answerRemote,
912
+ messageStatus, cancelMessage, answerRemote, visitSharedLead,
913
+ // The lead's clients that could run on this computer, in order (a visit request picks its constrained one).
914
+ visitClients: async ({ agentId }) => { const agent = await agentById(agentId); return agent ? wakeClientsFor(agent) : []; },
835
915
  // The folder a fresh wake of this lead would use: its latest session in the project, else the host's.
836
916
  knownProjectFolder: ({ agentId, projectId }) => projectFolder({ agentId }, projectId),
917
+ // Woken clients' answers in [from, to) by client and reported model (statement usage).
918
+ wakeUsage: ({ from, to }) => store.wakeAttempts.usageBetween(spaceId(), from, to),
837
919
  discuss: discussions.discuss,
838
920
  ownerGroupDiscussion: discussions.ownerView,
839
921
  ownerStopGroupDiscussion: discussions.ownerStop,
@@ -842,7 +924,12 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
842
924
  groupDiscussionStatus: discussions.ownerStatus,
843
925
  joinGroupDiscussion: discussions.ownerJoin,
844
926
  groupDiscussionTurns: discussions.ownerSessionTurn,
845
- ownerMessageStatus: ({ messageId }) => statusOf(ownedAsk(messageId)),
927
+ // The owner also sees each wake this computer started for the ask and why it failed.
928
+ ownerMessageStatus: async ({ messageId }) => {
929
+ const ask = ownedAsk(messageId);
930
+ const wakeAttempts = store.wakeAttempts.forMessage(ask.id);
931
+ return { ...await statusOf(ask), ...(wakeAttempts.length ? { wakeAttempts } : {}) };
932
+ },
846
933
  // Cancelling is not evidence that a possibly running process exited; any cleanup hold stays.
847
934
  ownerCancelMessage: ({ messageId }) => cancelAsk(ownedAsk(messageId)),
848
935
  pending: (agentId, projectId = undefined) => store.pendingFor(spaceId(), agentId)
@@ -915,6 +1002,18 @@ function inboxGreeting(target) {
915
1002
  return `FULI 圆桌会把发给「${label(target)}」的消息排进这个对话。现在只需回复「好」。`;
916
1003
  }
917
1004
 
1005
+ const VISIT_ACTIONS = new Set(['card', 'search', 'request', 'request_status']);
1006
+
1007
+ // Exactly the fields each visit action carries across devices.
1008
+ function visitQuestion({ action, queries, request, requestId }) {
1009
+ if (action === 'search') return { action, queries };
1010
+ if (action === 'request') {
1011
+ const { title, what, expectedAreas } = request;
1012
+ return { action, request: { title, what, ...(expectedAreas ? { expectedAreas } : {}) } };
1013
+ }
1014
+ return action === 'request_status' ? { action, requestId } : { action };
1015
+ }
1016
+
918
1017
  function label(agent) {
919
1018
  return agent.profile.displayName || agent.profile.name || agent.agentId;
920
1019
  }
@@ -5,6 +5,7 @@ import { GROUP_DISCUSSION_JOIN_COLUMNS, GROUP_DISCUSSION_JOIN_TABLES, GROUP_DISC
5
5
  createGroupDiscussionStore } from './group-discussion-store.js';
6
6
  import { THREAD_SUBSCRIPTION_TABLES, createThreadSubscriptionStore } from './thread-subscriptions.js';
7
7
  import { DESKTOP_INBOX_TABLES, createDesktopInboxStore } from './desktop-inbox-store.js';
8
+ import { WAKE_ATTEMPT_TABLES, WAKE_ATTEMPT_USAGE_COLUMNS, createWakeAttemptStore } from './wake-attempt-store.js';
8
9
 
9
10
  export const ROUNDTABLE_FORMAT = sqliteFormat({
10
11
  store: 'roundtable',
@@ -66,6 +67,17 @@ export const ROUNDTABLE_FORMAT = sqliteFormat({
66
67
  id: 'roundtable/9-group-discussion-joins', to: 9, kind: 'add-table', table: 'group_discussion_joins',
67
68
  summary: 'members who joined a group discussion by code, and the client and model of each message',
68
69
  create: GROUP_DISCUSSION_JOIN_TABLES
70
+ }, {
71
+ // Why a wake did not answer, kept where it ran (wake-attempt-store.js).
72
+ id: 'roundtable/10-wake-attempts', to: 10, kind: 'add-table', table: 'wake_attempts',
73
+ summary: 'each wake an ask started: client, resumed or new session, failure code, exit code and a redacted output summary',
74
+ create: WAKE_ATTEMPT_TABLES
75
+ }, {
76
+ // The model and tokens each woken client reported for that wake, answered
77
+ // or failed; null when it reported none. Older attempts carry none.
78
+ id: 'roundtable/11-wake-attempt-usage', to: 11, kind: 'add-columns', table: 'wake_attempts',
79
+ summary: 'the model and tokens a woken client reported for each wake',
80
+ columns: WAKE_ATTEMPT_USAGE_COLUMNS
69
81
  }],
70
82
  pragmas: 'PRAGMA journal_mode = WAL;'
71
83
  });
@@ -81,6 +93,7 @@ export function createRoundtableStore(path = ':memory:', { clock = () => new Dat
81
93
  const discussions = createGroupDiscussionStore(database, chat);
82
94
  const subscriptions = createThreadSubscriptionStore(database, chat);
83
95
  const desktopInboxes = createDesktopInboxStore(database);
96
+ const wakeAttempts = createWakeAttemptStore(database, now);
84
97
  const transaction = (work) => {
85
98
  database.exec('BEGIN IMMEDIATE');
86
99
  let result;
@@ -96,6 +109,7 @@ export function createRoundtableStore(path = ':memory:', { clock = () => new Dat
96
109
  discussions,
97
110
  subscriptions,
98
111
  desktopInboxes,
112
+ wakeAttempts,
99
113
  transaction,
100
114
  createThread({ id, spaceId, projectId = null, subject }) {
101
115
  const at = now();
@@ -0,0 +1,41 @@
1
+ // Every wake an ask started on this computer and how it ended: the client, a
2
+ // resumed or new session, the failure code and its detail (wake-failure.js),
3
+ // exit code and signal, how long it ran, and a redacted, bounded summary of the
4
+ // client's output. Kept where the wake ran and never sent to another computer.
5
+ // Part of the roundtable store format (roundtable/10-wake-attempts). Since
6
+ // roundtable/11-wake-attempt-usage each attempt also keeps the model and tokens
7
+ // the woken client reported for it, answered or failed; null when none.
8
+ export const WAKE_ATTEMPT_TABLES = `
9
+ CREATE TABLE IF NOT EXISTS wake_attempts (
10
+ message_id TEXT NOT NULL, attempt INTEGER NOT NULL, client TEXT NOT NULL, session_mode TEXT NOT NULL,
11
+ outcome TEXT NOT NULL, code TEXT, detail TEXT, exit_code INTEGER, signal TEXT, duration_ms INTEGER,
12
+ output_summary TEXT, created_at TEXT NOT NULL, PRIMARY KEY(message_id, attempt));
13
+ `;
14
+ export const WAKE_ATTEMPT_USAGE_COLUMNS = Object.freeze({ model: 'TEXT', input_tokens: 'INTEGER', output_tokens: 'INTEGER' });
15
+
16
+ export function createWakeAttemptStore(db, now) {
17
+ return {
18
+ // The attempt number is the next one of this ask, decided in the insert itself.
19
+ record(messageId, { client, sessionMode, outcome, code, detail, exitCode, signal, durationMs, outputSummary,
20
+ model = null, inputTokens = null, outputTokens = null }) {
21
+ db.prepare(`INSERT INTO wake_attempts(message_id, attempt, client, session_mode, outcome, code, detail,
22
+ exit_code, signal, duration_ms, output_summary, created_at, model, input_tokens, output_tokens)
23
+ SELECT ?, coalesce(max(attempt), 0) + 1, ?,?,?,?,?,?,?,?,?,?,?,?,? FROM wake_attempts WHERE message_id = ?`)
24
+ .run(messageId, client, sessionMode, outcome, code, detail, exitCode, signal, durationMs, outputSummary, now(),
25
+ model, inputTokens, outputTokens, messageId);
26
+ },
27
+ forMessage: messageId => db.prepare(`SELECT attempt, client, session_mode AS sessionMode, outcome, code, detail,
28
+ exit_code AS exitCode, signal, duration_ms AS durationMs, output_summary AS outputSummary, created_at AS createdAt
29
+ FROM wake_attempts WHERE message_id = ? ORDER BY attempt`).all(messageId),
30
+ // Wakes of this space's asks in [from, to), per client and the model it
31
+ // reported (null: none), most first: answered and failed apart. Tokens add
32
+ // up only what clients reported; tokenWakes says how many wakes reported any.
33
+ usageBetween: (spaceId, from, to) => db.prepare(`SELECT w.client AS client, w.model AS model,
34
+ count(CASE WHEN w.outcome = 'answered' THEN 1 END) AS wakes, count(CASE WHEN w.outcome <> 'answered' THEN 1 END) AS failedWakes,
35
+ sum(w.input_tokens) AS inputTokens, sum(w.output_tokens) AS outputTokens,
36
+ count(coalesce(w.input_tokens, w.output_tokens)) AS tokenWakes
37
+ FROM wake_attempts w JOIN messages m ON m.id = w.message_id JOIN threads t ON t.id = m.thread_id
38
+ WHERE t.space_id = ? AND w.created_at >= ? AND w.created_at < ?
39
+ GROUP BY w.client, w.model ORDER BY count(*) DESC, client, model`).all(spaceId, from, to).map(row => ({ ...row }))
40
+ };
41
+ }
@@ -31,18 +31,9 @@ export function createWakeClaimRelease({ store, inspectProcess = async () => nul
31
31
  const age = now() - Date.parse(claim.execution_claimed_at);
32
32
  const unproven = age >= LEGACY_CLAIM_TTL_MS;
33
33
  if (claim.wake_process_evidence !== '1' || !claim.wake_pid) return unproven;
34
- const pid = Number(claim.wake_pid);
35
- const running = await inspectProcess([pid]).catch(() => null);
36
- if (!running) return false;
37
- const current = running.get(pid);
38
- const reused = Boolean(current && claim.wake_pid_identity && current.identity
39
- && String(current.identity) !== claim.wake_pid_identity);
40
- if (current && !reused) return false;
41
- const group = groupAlive(pid);
42
- if (group === false) return true;
43
- // A group that still answers may be the woken client's descendants, or the
44
- // reused PID's own group: only the second is left to the day's limit.
45
- return group === true && reused && unproven;
34
+ const ended = await recordedProcessEnded({ pid: Number(claim.wake_pid), identity: claim.wake_pid_identity },
35
+ { inspectProcess, groupAlive });
36
+ return ended === true || (ended === 'reused' && unproven);
46
37
  }
47
38
 
48
39
  // Releases what the evidence allows; the number of claims released.
@@ -74,6 +65,23 @@ export function createWakeClaimRelease({ store, inspectProcess = async () => nul
74
65
  return { release, recordSpawn };
75
66
  }
76
67
 
68
+ // Whether a recorded wake process has ended: true when it is gone, or its PID
69
+ // now belongs to another process, and (POSIX) no member of its group is left;
70
+ // 'reused' when its PID belongs to another process whose own group still
71
+ // answers, so it cannot be told from the woken client's descendants; false
72
+ // while it runs or when the OS cannot tell. identity: as inspectProcess read
73
+ // it at spawn, or null.
74
+ export async function recordedProcessEnded({ pid, identity }, { inspectProcess, groupAlive = processGroupAlive }) {
75
+ const running = await inspectProcess([pid]).catch(() => null);
76
+ if (!running) return false;
77
+ const current = running.get(pid);
78
+ const reused = Boolean(current && identity && current.identity && String(current.identity) !== identity);
79
+ if (current && !reused) return false;
80
+ const group = groupAlive(pid);
81
+ if (group === false) return true;
82
+ return group === true && reused ? 'reused' : false;
83
+ }
84
+
77
85
  // The woken client leads its own process group on POSIX (detached, wake.js).
78
86
  // Signal 0 only asks whether any member exists.
79
87
  export function processGroupAlive(pgid, { platform = process.platform, kill = process.kill } = {}) {
@@ -0,0 +1,81 @@
1
+ // Why one wake did not answer, kept on the computer where it ran.
2
+ //
3
+ // A failed wake keeps its outward code (wake_failed, wake_timeout,
4
+ // client_unavailable, ...), which the ladder and older peers read, and adds a
5
+ // detail from this closed set. The client's own output stays local: it is kept
6
+ // only as a redacted, bounded summary in the roundtable store, and never
7
+ // crosses to another computer; only the detail code and the attempt count do.
8
+
9
+ const WAKE_FAILURE_DETAILS = Object.freeze([
10
+ 'client_not_found', // no command for the client, or the OS could not find it
11
+ 'spawn_error', // the OS refused to start it
12
+ 'login_required', // the client said it is not logged in
13
+ 'client_exit_nonzero', // it exited with a non-zero code or a signal
14
+ 'no_final_answer', // it exited 0 without a complete final answer
15
+ 'output_too_large', // it wrote more than a wake may read
16
+ 'timed_out', // it did not answer within the wake's time
17
+ 'cancelled', // the asker or the owner stopped it
18
+ 'restricted_mode_unsupported' // a constrained run's client is too old for restricted mode (never run without it)
19
+ ]);
20
+
21
+ // The summary of a client's output that may be kept: already redacted, then bounded.
22
+ const SUMMARY_CHARS = 600;
23
+ const OUTWARD = /^([a-z_]{1,64})(?:;detail=([a-z_]{1,32}))?(?:;attempts=([1-9]))?$/;
24
+ // A bare code as older peers and coordinators send it. Anything else another computer put in
25
+ // the error text is not shown to the asking Agent.
26
+ const BARE_CODE = /^[A-Za-z0-9_.:-]{1,64}$/;
27
+
28
+ // A failure error the wake throws. output: the captured tails, never sent anywhere.
29
+ export function wakeFailure(code, detail, message, { exitCode = null, signal = null, output = null } = {}) {
30
+ return Object.assign(new Error(message), { code, detail, exitCode, signal, output });
31
+ }
32
+
33
+ // The record kept for one wake attempt. redact: the host's redaction of text
34
+ // that leaves the process; without one, the client's output is dropped and
35
+ // only the codes, exit code and signal are kept.
36
+ // reported: the model and usage the client itself reported for the wake (wake.js), or null.
37
+ export function wakeAttemptRecord({ client, sessionId, error = null, reported = null, durationMs, redact = null }) {
38
+ const detail = WAKE_FAILURE_DETAILS.includes(error?.detail) ? error.detail : null;
39
+ let summary = null;
40
+ if (error && redact) {
41
+ try { summary = summaryOf([error.output?.stderr, error.output?.stdout], redact); } catch { summary = null; }
42
+ }
43
+ return { client, sessionMode: sessionId ? 'resumed' : 'new', outcome: error ? 'failed' : 'answered',
44
+ code: error ? error.code ?? 'wake_failed' : null, detail,
45
+ exitCode: Number.isSafeInteger(error?.exitCode) ? error.exitCode : null,
46
+ signal: typeof error?.signal === 'string' && /^SIG[A-Z0-9]{1,12}$/.test(error.signal) ? error.signal : null,
47
+ durationMs: Math.max(0, Math.round(durationMs)), outputSummary: summary,
48
+ model: reported?.model ?? null, inputTokens: reported?.usage?.inputTokens ?? null,
49
+ outputTokens: reported?.usage?.outputTokens ?? null };
50
+ }
51
+
52
+ // The end of each captured part, stderr first: a client's own error is its last lines.
53
+ // Each part is redacted whole before it is cut, so a cut never splits what redaction would remove.
54
+ function summaryOf(parts, redact) {
55
+ const kept = [];
56
+ let room = SUMMARY_CHARS;
57
+ for (const part of parts) {
58
+ if (!part || room <= 0) continue;
59
+ const text = String(redact(part)).slice(-room);
60
+ kept.push(text);
61
+ room -= text.length + 1;
62
+ }
63
+ return kept.join('\n') || null;
64
+ }
65
+
66
+ // What a paired device reports for an ask it could not answer: the code, the
67
+ // detail code and how many wakes it tried, in the one error string every
68
+ // coordinator already relays (an older asker shows it as it is).
69
+ export function outwardFailure({ code, detail = null, attempts = null }) {
70
+ return `${code ?? 'wake_failed'}${WAKE_FAILURE_DETAILS.includes(detail) ? `;detail=${detail}` : ''}`
71
+ + `${Number.isSafeInteger(attempts) && attempts > 0 && attempts < 10 ? `;attempts=${attempts}` : ''}`;
72
+ }
73
+
74
+ // The asker's reading of that string: an unknown detail is dropped, a bare
75
+ // code an older peer sent stays the reason as it is, and free text reads as
76
+ // remote_error.
77
+ export function outwardFailureView(error) {
78
+ const [, reason, detail, attempts] = OUTWARD.exec(error) ?? [null, BARE_CODE.test(error) ? error : 'remote_error'];
79
+ return { reason, ...(WAKE_FAILURE_DETAILS.includes(detail) ? { detail } : {}),
80
+ ...(attempts ? { attempts: Number(attempts) } : {}) };
81
+ }
@@ -9,6 +9,11 @@
9
9
 
10
10
  const LADDER_TIERS = Object.freeze(['resume', 'new_session', 'stand_in']);
11
11
 
12
+ // A paired device's ask wakes at most this many times on the owner's computer
13
+ // (the latest session, a new one in its client, then the share's other
14
+ // clients), each with its own grant; no stand-in answers for a remote ask.
15
+ export const REMOTE_WAKE_ATTEMPTS = 3;
16
+
12
17
  // Why a step did not answer, in words the person reads as they are.
13
18
  const REASONS = {
14
19
  no_previous_session: '没有可续接的历史会话',