fuli-context 0.22.0 → 0.22.1

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 (162) hide show
  1. package/dist/web/assets/{AboutPage-C2Ak6Jii.js → AboutPage-45tAvgRN.js} +1 -1
  2. package/dist/web/assets/{AgentHand-Cxou5bPl.js → AgentHand-CQbDVBYv.js} +1 -1
  3. package/dist/web/assets/{AgentMentionCopy-CibgcJTC.js → AgentMentionCopy-BHFp527T.js} +1 -1
  4. package/dist/web/assets/{AgentName-CrIgUC1K.js → AgentName-ChhbnrG9.js} +1 -1
  5. package/dist/web/assets/{AgentProfilePage-ffwdNhMX.js → AgentProfilePage-ZzEtdSKe.js} +1 -1
  6. package/dist/web/assets/{AgentServicesPage-D1_fa1SC.js → AgentServicesPage-B92EXg56.js} +1 -1
  7. package/dist/web/assets/{AgentsDirectoryPage-SgbPuztQ.js → AgentsDirectoryPage-B841hRHZ.js} +1 -1
  8. package/dist/web/assets/{BackLink-BrzA4htj.js → BackLink-C0mcoSn4.js} +1 -1
  9. package/dist/web/assets/{BoardMoveMenu-DgPJT8s1.js → BoardMoveMenu-CX8jKv0V.js} +1 -1
  10. package/dist/web/assets/{CaptureChangePage-bCYtY611.js → CaptureChangePage-B9wtEGy3.js} +1 -1
  11. package/dist/web/assets/{Card-Zhpf1co5.js → Card-BOk3WbC1.js} +1 -1
  12. package/dist/web/assets/{CardHeader-C9JtHZXs.js → CardHeader-79hIs3Wc.js} +1 -1
  13. package/dist/web/assets/{CardTitle-B8HEul5N.js → CardTitle-CMWcRH62.js} +1 -1
  14. package/dist/web/assets/{ConnectionsPage-CSWl_R-1.js → ConnectionsPage-CCSZ-v6k.js} +1 -1
  15. package/dist/web/assets/{CreateProjectDialog-CApQ6Yzi.js → CreateProjectDialog-vDAHEZ6t.js} +1 -1
  16. package/dist/web/assets/DataFormatPage-CpWphMGD.css +1 -0
  17. package/dist/web/assets/DataFormatPage-oRc6mBRh.js +2 -0
  18. package/dist/web/assets/{DialogFooter-CRWvDbVh.js → DialogFooter-mK0XBX_L.js} +1 -1
  19. package/dist/web/assets/{EmployeeScopeDialog-Brpg45xh.js → EmployeeScopeDialog-Bp0zLRG5.js} +1 -1
  20. package/dist/web/assets/{EmployeeWorkbenchPage-7cyTmiY7.js → EmployeeWorkbenchPage-D34173ED.js} +1 -1
  21. package/dist/web/assets/{FieldDescription-C1ZURDEJ.js → FieldDescription-C33NBGIe.js} +1 -1
  22. package/dist/web/assets/{GrowthLoading-DnSjbwAi.js → GrowthLoading-CTsRhLfj.js} +1 -1
  23. package/dist/web/assets/{InboxPage-mwimM5mD.js → InboxPage-CekhZG9R.js} +1 -1
  24. package/dist/web/assets/{Input-B45GFhbM.js → Input-jNvD1lEt.js} +1 -1
  25. package/dist/web/assets/{KnowledgeHardDeleteSection-BaJhsOxD.js → KnowledgeHardDeleteSection-OgNe3xoA.js} +1 -1
  26. package/dist/web/assets/{KnowledgeItemEditPage-BpnyOFSx.js → KnowledgeItemEditPage-CxUFvj7Q.js} +1 -1
  27. package/dist/web/assets/{KnowledgeItemSummaryCard-0N1WaM7k.js → KnowledgeItemSummaryCard-CkD55bXQ.js} +1 -1
  28. package/dist/web/assets/{KnowledgeOrganizerPage-CCBudWpM.js → KnowledgeOrganizerPage-DTfhmq7x.js} +1 -1
  29. package/dist/web/assets/KnowledgePage-D_XPxm7U.js +1 -0
  30. package/dist/web/assets/{KnowledgePeek-B9r1G3ix.js → KnowledgePeek-fE8eZ9yB.js} +1 -1
  31. package/dist/web/assets/{KnowledgeTurnReceiptPage-D4c47u_s.js → KnowledgeTurnReceiptPage-CNoJA8j_.js} +1 -1
  32. package/dist/web/assets/{KnowledgeWorkspace-CJmm-Xs7.js → KnowledgeWorkspace-CizF6YnE.js} +1 -1
  33. package/dist/web/assets/{Label-CBRsKlFL.js → Label-BuJcMh9m.js} +1 -1
  34. package/dist/web/assets/{ModelSettingsPage-CeEp6z6R.js → ModelSettingsPage-adiuhTSX.js} +1 -1
  35. package/dist/web/assets/{NotFoundPage-CWfYMNhr.js → NotFoundPage-JAy5KIL8.js} +1 -1
  36. package/dist/web/assets/{OccupationsPage-BEbQ19dD.js → OccupationsPage-DG0uQx85.js} +1 -1
  37. package/dist/web/assets/{OverviewPage-Dg3wnb1d.js → OverviewPage-DwCiWNdy.js} +2 -2
  38. package/dist/web/assets/{PersonalProfilePage-CLD5CnhQ.js → PersonalProfilePage-Cb-AKL4K.js} +1 -1
  39. package/dist/web/assets/{PersonalProjectsPage-Dcbgmfi_.js → PersonalProjectsPage-BT7ebQUu.js} +1 -1
  40. package/dist/web/assets/{PopperContent-CESNmYJq.js → PopperContent-Dtpk5py4.js} +1 -1
  41. package/dist/web/assets/{Presence-DXkWbJEH.js → Presence-9_BFOmAz.js} +1 -1
  42. package/dist/web/assets/{ProjectAgentDetailPage-io2UP0of.js → ProjectAgentDetailPage-WmxfcCCM.js} +1 -1
  43. package/dist/web/assets/{ProjectAgentDialog-DlzKuGB1.js → ProjectAgentDialog-BgdFB7il.js} +1 -1
  44. package/dist/web/assets/{ProjectAgentFirstTask-Dy06Eyzw.js → ProjectAgentFirstTask-BfX-v_g5.js} +1 -1
  45. package/dist/web/assets/{ProjectAgentsPage-CbUffuyy.js → ProjectAgentsPage-DAlfUVqM.js} +1 -1
  46. package/dist/web/assets/{ProjectJudgmentPolicy-BFx527E9.js → ProjectJudgmentPolicy-DGFTRTvW.js} +1 -1
  47. package/dist/web/assets/{ProjectScopePicker-Cqk9DQKF.js → ProjectScopePicker-wlhLR465.js} +1 -1
  48. package/dist/web/assets/{PublicProjectsPage-W3CZmgxE.js → PublicProjectsPage-LTXsYNme.js} +1 -1
  49. package/dist/web/assets/{RadioGroupItem-4VcuuIZK.js → RadioGroupItem-CUyRbWCt.js} +1 -1
  50. package/dist/web/assets/{RoundtablesPage-BvfBQcJ7.js → RoundtablesPage-slbD8isz.js} +1 -1
  51. package/dist/web/assets/{RovingFocusGroup-DyLR4_0m.js → RovingFocusGroup-DJ9gp0xI.js} +1 -1
  52. package/dist/web/assets/{RovingFocusItem-CkXsXOwz.js → RovingFocusItem-BGt9xXis.js} +1 -1
  53. package/dist/web/assets/{SessionMigrationPage-elCVaNnK.js → SessionMigrationPage-HxM5zSjY.js} +1 -1
  54. package/dist/web/assets/{SessionRecordsPage-CgTk9zqc.js → SessionRecordsPage-CbZ4xiIb.js} +1 -1
  55. package/dist/web/assets/{SettingsPage-9AMTjLAu.js → SettingsPage-BSXZinjo.js} +1 -1
  56. package/dist/web/assets/{SharedJefaReportPage-CViBxD_v.js → SharedJefaReportPage-4MylH5Ao.js} +1 -1
  57. package/dist/web/assets/{TableHeader-B6al55kg.js → TableHeader-aFcD9wsQ.js} +1 -1
  58. package/dist/web/assets/{TabsContent-C6fnXu6I.js → TabsContent-ZCMehxYx.js} +1 -1
  59. package/dist/web/assets/{TabsTrigger-CIQwVltR.js → TabsTrigger-BTZQbe9n.js} +1 -1
  60. package/dist/web/assets/{TagVocabularyPage-D88AyXKA.js → TagVocabularyPage-CCm1HBg3.js} +1 -1
  61. package/dist/web/assets/{TaskBlockerClear-B_xAPoLz.js → TaskBlockerClear-Dg1T2rcU.js} +1 -1
  62. package/dist/web/assets/{TaskBlockerNotice-B3PHEmtC.js → TaskBlockerNotice-DVYIiv3y.js} +1 -1
  63. package/dist/web/assets/{TaskExecutionPlan-CVcrXGM8.js → TaskExecutionPlan-B411P1VJ.js} +1 -1
  64. package/dist/web/assets/{TaskReason-TdaOCf7S.js → TaskReason-CVnoUuFe.js} +1 -1
  65. package/dist/web/assets/{Teleport-DQmFiMAU.js → Teleport-Co_blCnp.js} +1 -1
  66. package/dist/web/assets/{TextField-BdQdL1Lx.js → TextField-BqL6E9zF.js} +1 -1
  67. package/dist/web/assets/{Textarea-CnjoFPB6.js → Textarea-DIra6o5H.js} +1 -1
  68. package/dist/web/assets/{UiChip-CILP7dOO.js → UiChip-FMcrDGe6.js} +1 -1
  69. package/dist/web/assets/{UiDialog-BIxwydDu.js → UiDialog-CvESkb45.js} +1 -1
  70. package/dist/web/assets/{UiDisclosure-SMhU3tcV.js → UiDisclosure-D3xZRwVK.js} +1 -1
  71. package/dist/web/assets/{UiIcon-BPTz4pnL.js → UiIcon-CSLaDsID.js} +1 -1
  72. package/dist/web/assets/{UiIconButton-jmIfQNdm.js → UiIconButton-C1o6HJ39.js} +1 -1
  73. package/dist/web/assets/{UiNotice-DsJRHRTA.js → UiNotice-CR_4j5lF.js} +1 -1
  74. package/dist/web/assets/{UiSegmented-D-dME5Lr.js → UiSegmented-Iu9IH18R.js} +1 -1
  75. package/dist/web/assets/{UiSelect-B7p9uzs4.js → UiSelect-Cs53P6h-.js} +1 -1
  76. package/dist/web/assets/{UiToggle-Bkg9nRN4.js → UiToggle-CSb7ErVS.js} +1 -1
  77. package/dist/web/assets/{UiWeight-B_8vlc3_.js → UiWeight-BsbP9h9p.js} +1 -1
  78. package/dist/web/assets/{UnassignedConversationsPanel-BGrKUSEX.js → UnassignedConversationsPanel-D2Y2Vs-z.js} +1 -1
  79. package/dist/web/assets/{VirtualDirectoryList-B_L9kwcm.js → VirtualDirectoryList-DLhTuyoY.js} +1 -1
  80. package/dist/web/assets/{VisuallyHiddenInput-BHE2kO_O.js → VisuallyHiddenInput-DoZPyFZU.js} +1 -1
  81. package/dist/web/assets/{Workbench3D-Doh6x9Ot.js → Workbench3D-BBEJ0vTb.js} +1 -1
  82. package/dist/web/assets/{_plugin-vue_export-helper-Be38Jawd.js → _plugin-vue_export-helper-DKHjpKWY.js} +1 -1
  83. package/dist/web/assets/{accordion-B2ZGR46D.js → accordion-DX4SO0oU.js} +1 -1
  84. package/dist/web/assets/{agent-pins-CJDVKD1Y.js → agent-pins-Djo8-s9j.js} +1 -1
  85. package/dist/web/assets/{agent-profile.css_vue_type_style_index_0_src_true_lang-W7mMZ3bu.js → agent-profile.css_vue_type_style_index_0_src_true_lang-Cmz1y1IL.js} +1 -1
  86. package/dist/web/assets/{agent-roster-records-DGNNHsa3.js → agent-roster-records-DVgD9i6q.js} +1 -1
  87. package/dist/web/assets/{agent-work-summary-CbZjWLGE.js → agent-work-summary-CUMg6XKp.js} +1 -1
  88. package/dist/web/assets/{attach-closest-edge-B0bgWmui.js → attach-closest-edge-BqQXNoAj.js} +1 -1
  89. package/dist/web/assets/{attention-store-BklrG2I7.js → attention-store-C0D-sZNV.js} +1 -1
  90. package/dist/web/assets/{badge-G1xmTvLV.js → badge-CBT_nrTA.js} +1 -1
  91. package/dist/web/assets/{button-Xb0cKhdr.js → button-BXkZ6rdB.js} +1 -1
  92. package/dist/web/assets/{checkbox-CZg0Iow1.js → checkbox-BPKmRFwj.js} +1 -1
  93. package/dist/web/assets/{client-CJGUYN1M.js → client-BgxDxCVo.js} +1 -1
  94. package/dist/web/assets/{client-links-store-HoGAJb4t.js → client-links-store-BoDDNO2M.js} +1 -1
  95. package/dist/web/assets/{console-Cnye1IOw.js → console-KIWUM9xy.js} +1 -1
  96. package/dist/web/assets/{conversation-launcher-settings-BmsEEQjr.js → conversation-launcher-settings-Dfhkli80.js} +1 -1
  97. package/dist/web/assets/{design-lab-B9JU_TOQ.js → design-lab-B-njEjVo.js} +1 -1
  98. package/dist/web/assets/{dialog-CWJVMpu3.js → dialog-BSKT8LUI.js} +1 -1
  99. package/dist/web/assets/{dist-lEETOIok.js → dist-KV3E0kAK.js} +1 -1
  100. package/dist/web/assets/{dropdown-menu-DVE0b7Uc.js → dropdown-menu-BMeAsFQe.js} +1 -1
  101. package/dist/web/assets/{field-ZZ-C7-wp.js → field-D_zmve89.js} +1 -1
  102. package/dist/web/assets/{identity-wHyBLirA.js → identity-IcZw_zYG.js} +1 -1
  103. package/dist/web/assets/{index-DdT-r351.js → index-CyoKfCXy.js} +2 -2
  104. package/dist/web/assets/{judgment-api-BwOm0hL8.js → judgment-api-ldtIv-Jc.js} +1 -1
  105. package/dist/web/assets/label-table-BAIaH-tx.js +1 -0
  106. package/dist/web/assets/{model-DdrMcS8b.js → model-2gNC7xGH.js} +1 -1
  107. package/dist/web/assets/model-D2VmKHYm.js +1 -0
  108. package/dist/web/assets/{model-BnIF0iqb.js → model-DL29Qg9K.js} +1 -1
  109. package/dist/web/assets/{model-YwLQNm5s.js → model-DvwLThbs.js} +1 -1
  110. package/dist/web/assets/{model-BndkODhT.js → model-DvzuuyNk.js} +1 -1
  111. package/dist/web/assets/{model-DqILignz.js → model-mDDN02UJ.js} +1 -1
  112. package/dist/web/assets/{motion-preference-D7rorL9a.js → motion-preference-BquW2Vpx.js} +1 -1
  113. package/dist/web/assets/{occupation-catalog-BG1VjWtG.js → occupation-catalog-CwMNzUWJ.js} +1 -1
  114. package/dist/web/assets/{orchestration-filters-BKS3yBja.js → orchestration-filters-DhxYUaNx.js} +1 -1
  115. package/dist/web/assets/{page-title-BiSHyu6N.js → page-title-B2inyRB1.js} +1 -1
  116. package/dist/web/assets/{profile-model-i36bqqb2.js → profile-model-C7xYkCgE.js} +1 -1
  117. package/dist/web/assets/{project-board-layout-DPItL60Q.js → project-board-layout-LQu5EwBM.js} +1 -1
  118. package/dist/web/assets/{project-capture-CFeMGS5O.js → project-capture-DHvCDGGz.js} +1 -1
  119. package/dist/web/assets/{project-origin-wTTsd0pp.js → project-origin-DDVfUP1_.js} +1 -1
  120. package/dist/web/assets/project-team-api-DNSZitOp.js +1 -0
  121. package/dist/web/assets/{quick-edit-api-BbKWyjWy.js → quick-edit-api-DPb69BlT.js} +1 -1
  122. package/dist/web/assets/{select-DrMXPnfK.js → select-ByHJaNRv.js} +1 -1
  123. package/dist/web/assets/{shared-report-D6AgVQoO.js → shared-report-ClDt0UMJ.js} +3 -3
  124. package/dist/web/assets/{task-labels-CIzXKt-p.js → task-labels-De_F8I3O.js} +1 -1
  125. package/dist/web/assets/{ui-D936HGK2.js → ui-CMR2UkVp.js} +1 -1
  126. package/dist/web/assets/{useAgentRecords-V5t2SdoJ.js → useAgentRecords-D3upwp_U.js} +1 -1
  127. package/dist/web/assets/{useApi-CROJJdhE-BUho7jmG.js → useApi-CROJJdhE-lwt7Bu-G.js} +1 -1
  128. package/dist/web/assets/useDirection-DhUUV4Jm.js +1 -0
  129. package/dist/web/assets/{useFocusReturn-DaWUYyV8.js → useFocusReturn-ChxuGVqv.js} +1 -1
  130. package/dist/web/assets/{useForwardExpose-BW43swEH.js → useForwardExpose-BRdp7olV.js} +1 -1
  131. package/dist/web/assets/{useKnowledgeItemPeek-BJBUG0nY.js → useKnowledgeItemPeek-CRNR9LmU.js} +1 -1
  132. package/dist/web/assets/{useMinimumLoadingDisplay-DT1pktOl.js → useMinimumLoadingDisplay-DejHIUi_.js} +1 -1
  133. package/dist/web/assets/{useRoutePeek-dXJW_jIl.js → useRoutePeek-B5Ukp8vX.js} +1 -1
  134. package/dist/web/assets/{useTypeahead-BVDZWCri.js → useTypeahead-C4mRUlUC.js} +1 -1
  135. package/dist/web/assets/{utils-BTTEEOG-.js → utils-BH3OkU12.js} +1 -1
  136. package/dist/web/assets/{vue-router-DMMH71_5.js → vue-router-B6l0ZzTV.js} +1 -1
  137. package/dist/web/index.html +39 -39
  138. package/native/win32/fuli-win-helper.exe +0 -0
  139. package/npm-shrinkwrap.json +2 -2
  140. package/package.json +1 -1
  141. package/src/agent-tools/interface-catalog.js +1 -0
  142. package/src/cli/local-runtime-command.js +15 -14
  143. package/src/cli/migrate-command.js +13 -10
  144. package/src/cli/setup-command.js +16 -14
  145. package/src/cli/terminal-io.js +7 -0
  146. package/src/data-format/format-notices.js +19 -11
  147. package/src/data-format/local-stores.js +2 -0
  148. package/src/data-format/migration-operations.js +15 -3
  149. package/src/data-format/notice-delivery.js +124 -0
  150. package/src/data-format/operations-log.js +6 -1
  151. package/src/graphiti/task-knowledge-checkpoint.js +1 -1
  152. package/src/graphiti/task-preference-reader.js +1 -1
  153. package/src/graphiti/turn-receipt-delivery.js +3 -0
  154. package/src/http/data-format-api-router.js +3 -1
  155. package/src/presence/windows-helper-pin.js +1 -1
  156. package/dist/web/assets/DataFormatPage-DmCKskrj.css +0 -1
  157. package/dist/web/assets/DataFormatPage-Mrr5EvW-.js +0 -2
  158. package/dist/web/assets/KnowledgePage-DXibFNna.js +0 -1
  159. package/dist/web/assets/label-table-DA5V7oXM.js +0 -1
  160. package/dist/web/assets/model-cgiHaWsF.js +0 -1
  161. package/dist/web/assets/project-team-api-BrC4ewpy.js +0 -1
  162. package/dist/web/assets/useDirection-C0EDWveN.js +0 -1
@@ -9,12 +9,13 @@ import {
9
9
  DEFAULT_RUNTIME_SETTINGS,
10
10
  runtimeSettingsWithOverrides
11
11
  } from '../system/runtime-settings.js';
12
- import { confirmInTerminal, interactiveTerminal, writeLine } from './terminal-io.js';
12
+ import { confirmInTerminal, copyableValueStyle, interactiveTerminal, writeLine } from './terminal-io.js';
13
13
  import { askCaptureScope, captureScopeSummary } from './capture-scope-prompt.js';
14
14
  import { captureOnboardingFor } from '../setup/first-run-capture.js';
15
15
  import { setupMigrationNotice } from '../data-format/format-notices.js';
16
16
  import { knowledgeReconciliationMessage } from '../knowledge-hard-delete/reconcile-local.js';
17
17
  import { formatShadowedLaunchers, inspectUpdateInstallation } from './update-installation.js';
18
+ import { quoteShellArgument } from './shell-argument.js';
18
19
 
19
20
  export async function runSetupCommand(args, dependencies = {}) {
20
21
  const options = parseSetupOptions(args);
@@ -24,6 +25,7 @@ export async function runSetupCommand(args, dependencies = {}) {
24
25
  ?? (() => confirmInTerminal('Only the items above will change. Continue? [Y/n] ', { defaultYes: true }));
25
26
  const selectAgents = dependencies.selectAgents ?? promptAgentSelection;
26
27
  const write = dependencies.write ?? writeLine;
28
+ const copy = copyableValueStyle({ output: dependencies.output, env: dependencies.env });
27
29
  let plan = planSetup(options, dependencies);
28
30
  if (options.connectedOnly) {
29
31
  plan = applyAgentSelection(plan, plan.agents.filter((agent) =>
@@ -33,7 +35,7 @@ export async function runSetupCommand(args, dependencies = {}) {
33
35
  const detected = plan.agents.filter(({ available }) => available);
34
36
  plan = applyAgentSelection(plan, await selectAgents(detected));
35
37
  }
36
- write(formatSetupPreview(plan, options));
38
+ write(formatSetupPreview(plan, options, copy));
37
39
 
38
40
  if (!options.yes && !await confirm()) {
39
41
  write('Cancelled. No changes were made.');
@@ -44,7 +46,7 @@ export async function runSetupCommand(args, dependencies = {}) {
44
46
  ...dependencies,
45
47
  onProgress: write
46
48
  });
47
- write(formatSetupResult(result, plan));
49
+ write(formatSetupResult(result, plan, copy));
48
50
  // Stubbed setups in tests never read the data directory they name.
49
51
  const onboardingFor = dependencies.captureOnboarding ?? (applySetup === applyLocalSetup ? captureOnboardingFor : null);
50
52
  const captureScope = onboardingFor && plan.paths
@@ -53,7 +55,7 @@ export async function runSetupCommand(args, dependencies = {}) {
53
55
  // Stubbed setups in tests name no real data directory either.
54
56
  const migrationNotice = dependencies.migrationNotice ?? (applySetup === applyLocalSetup ? setupMigrationNotice : null);
55
57
  const waiting = migrationNotice && plan.paths?.dataDir ? await migrationNotice(plan.paths.dataDir) : null;
56
- if (waiting) write(waiting);
58
+ if (waiting) write(waiting.replaceAll('fuli migrate preview', copy('fuli migrate preview')));
57
59
  // Stubbed setups in tests leave the host PATH alone too.
58
60
  const shadowedLaunchers = dependencies.shadowedLaunchers ?? (applySetup === applyLocalSetup
59
61
  ? () => formatShadowedLaunchers(inspectUpdateInstallation({ env: dependencies.env ?? process.env })) : null);
@@ -72,7 +74,7 @@ async function firstRunCaptureScope(onboarding, options, result, dependencies) {
72
74
  return captureScopeSummary(outcome, result.runtime?.url ?? null);
73
75
  }
74
76
 
75
- export function formatSetupPreview(plan, options) {
77
+ export function formatSetupPreview(plan, options, copy = String) {
76
78
  const available = plan.agents.filter(({ available }) => available);
77
79
  const selected = available.filter(({ selected }) => selected !== false);
78
80
  const agentSummary = options.skipAgents || (available.length > 0 && selected.length === 0)
@@ -99,9 +101,9 @@ export function formatSetupPreview(plan, options) {
99
101
  'disabled; graph services stay running'}`,
100
102
  `Management UI: ${options.noStart
101
103
  ? 'will not start'
102
- : `http://127.0.0.1:${runtimeSettings.ports.console}`}`,
104
+ : copy(`http://127.0.0.1:${runtimeSettings.ports.console}`)}`,
103
105
  `Automatic client setup: ${agentSummary}`,
104
- 'Other MCP clients: connect after setup with fuli connect (no model required)'
106
+ `Other MCP clients: connect after setup with ${copy('fuli connect')} (no model required)`
105
107
  ];
106
108
  if (
107
109
  runtimeMode !== 'native' &&
@@ -120,20 +122,20 @@ export function formatSetupPreview(plan, options) {
120
122
  return lines.join('\n');
121
123
  }
122
124
 
123
- export function formatSetupResult(result, plan) {
125
+ export function formatSetupResult(result, plan, copy = String) {
124
126
  const lines = [result.status === 'ready'
125
127
  ? 'Fuli is ready.'
126
128
  : result.knowledgeRecovery?.status === 'pending'
127
129
  ? 'Fuli setup needs knowledge recovery before local stores are ready.'
128
130
  : 'Fuli started, but one or more Agents are not connected.'];
129
131
  if (result.knowledgeRecovery) lines.push(knowledgeReconciliationMessage(result.knowledgeRecovery));
130
- if (result.runtime.url) lines.push(`Open: ${result.runtime.url}`);
132
+ if (result.runtime.url) lines.push(`Open: ${copy(result.runtime.url)}`);
131
133
  if (result.runtime.lan === true) {
132
134
  lines.push(
133
135
  'LAN URLs:',
134
- ...result.runtime.lanUrls.map((url) => ` ${url}`),
135
- `Username: ${result.runtime.lanAccess.username}`,
136
- `Temporary access code: ${result.runtime.lanAccess.accessCode}`,
136
+ ...result.runtime.lanUrls.map((url) => ` ${copy(url)}`),
137
+ `Username: ${copy(result.runtime.lanAccess.username)}`,
138
+ `Temporary access code: ${copy(result.runtime.lanAccess.accessCode)}`,
137
139
  'Use only on trusted Wi-Fi. Restarting LAN mode rotates the access code.'
138
140
  );
139
141
  }
@@ -162,8 +164,8 @@ export function formatSetupResult(result, plan) {
162
164
  lines.push('After a package upgrade, reconnect Fuli in already-open clients or restart the clients, then open a new task. Existing MCP processes are not replaced automatically.');
163
165
  }
164
166
  const dataDir = plan?.paths?.dataDir;
165
- lines.push('Other MCP clients: run fuli connect and merge the fuli entry into your MCP settings.');
166
- if (dataDir) lines.push(`For this installation, use --data-dir ${JSON.stringify(dataDir)}.`);
167
+ lines.push(`Other MCP clients: run ${copy('fuli connect')} and merge the fuli entry into your MCP settings.`);
168
+ if (dataDir) lines.push(`For this installation, use ${copy(`--data-dir ${quoteShellArgument(dataDir)}`)}.`);
167
169
  lines.push('MCP provides tools and memory. Automatic conversation capture and wake/resume require a client adapter.');
168
170
  return lines.join('\n');
169
171
  }
@@ -5,6 +5,13 @@ export function writeLine(value) {
5
5
  process.stdout.write(`${value}\n`);
6
6
  }
7
7
 
8
+ // Keep redirected output and machines that opt out of color free of escapes.
9
+ // Labels remain present so copying or reading the plain output still works.
10
+ export function copyableValueStyle({ output = process.stdout, env = process.env } = {}) {
11
+ const color = output.isTTY === true && env.TERM !== 'dumb' && !env.NO_COLOR;
12
+ return (value) => color ? `\u001b[1;36m${value}\u001b[0m` : String(value);
13
+ }
14
+
8
15
  const ENTER = new Set(['\r', '\n', '\u0004']);
9
16
  const ERASE = new Set(['\u007f', '\b']);
10
17
  const CANCEL = '\u0003';
@@ -1,9 +1,11 @@
1
1
  import { dirname } from 'node:path';
2
2
 
3
+ import { receiptConsoleUrl } from '../agents/identity-receipt.js';
3
4
  import { externalWritersLines } from './external-writers.js';
4
5
  import { PERSONAL_GRAPH_LABEL, personalGraphFormatState } from './format-status.js';
5
6
  import { inspectLocalStores } from './local-stores.js';
6
7
  import { readFormatOperations } from './operations-log.js';
8
+ import { claimAppliedFormatNotices } from './notice-delivery.js';
7
9
 
8
10
  // The local stores this FULI cannot use as they are, by store and step, for
9
11
  // the console's startup log and /api/health (rec#17 D-09). Read only, like
@@ -56,13 +58,11 @@ export function dataFormatNoticeLine({ store, label, state, steps }) {
56
58
  + 'Run `fuli migrate status` for details.';
57
59
  }
58
60
 
59
- // How long an applied migration is still mentioned in a receipt.
60
- const APPLIED_NOTICE_MS = 24 * 60 * 60 * 1000;
61
61
  const GRAPH_STATE_TTL_MS = 60_000;
62
62
 
63
63
  // The receipt's data format notice (rec#17 D-09 part 2, rec#20), from the
64
64
  // same notices the console reports plus the operations log: a step waiting
65
- // for a person, or a migration applied in the last day. null — no bytes at
65
+ // for a person, or a migration claimed for this task. null — no bytes at
66
66
  // all — when there is neither. graphState() resolves the personal graph's
67
67
  // format state from its provider health ({ state, pending }) or null.
68
68
  export function dataFormatReceiptNotice(dataDir, { notices = dataFormatNotices(dataDir),
@@ -76,18 +76,25 @@ export function dataFormatReceiptNotice(dataDir, { notices = dataFormatNotices(d
76
76
  }
77
77
  return graphCache.steps;
78
78
  };
79
- return async () => {
80
- const pending = [...notices().filter((notice) => notice.state === 'pending_confirmation')
81
- .flatMap((notice) => notice.steps.length ? notice.steps : [notice.store]), ...await graphPending()];
82
- const applied = operations().filter((event) => event.kind === 'applied'
83
- && now() - Date.parse(event.at) < APPLIED_NOTICE_MS).map((event) => event.migrationId);
79
+ return async ({ taskId = null, includePending = true, closeUrl = null } = {}) => {
80
+ const pending = includePending ? [...notices().filter((notice) => notice.state === 'pending_confirmation')
81
+ .flatMap((notice) => notice.steps.length ? notice.steps : [notice.store]), ...await graphPending()] : [];
82
+ let applied = [];
83
+ try { applied = claimAppliedFormatNotices(dataDir, operations(), taskId, now()); } catch { /* A notice cannot block a task. */ }
84
84
  return [
85
85
  pending.length ? `数据格式待确认:${several(pending)}(fuli migrate preview)` : null,
86
- applied.length ? `数据格式已迁移:${several(applied.reverse())}` : null
86
+ ...appliedNoticeLines(applied),
87
+ closeUrl && applied.some((item) => item.remaining > 0) ? `[关闭提醒](<${closeUrl}>)` : null
87
88
  ].filter(Boolean).join(' · ') || null;
88
89
  };
89
90
  }
90
91
 
92
+ function appliedNoticeLines(applied) {
93
+ const groups = new Map();
94
+ for (const item of applied) groups.set(item.remaining, [...(groups.get(item.remaining) ?? []), item.migrationId]);
95
+ return [...groups].map(([remaining, ids]) => `数据格式已迁移:${several(ids)}(本次后还提示 ${remaining} 次)`);
96
+ }
97
+
91
98
  function several(ids) {
92
99
  return ids.length > 1 ? `${ids[0]} 等 ${ids.length} 项` : ids[0];
93
100
  }
@@ -107,8 +114,9 @@ function applicationFormatNotice(application) {
107
114
  return APPLICATION_NOTICES.get(application);
108
115
  }
109
116
 
110
- export async function receiptFormatNotices(application) {
111
- const notice = await applicationFormatNotice(application)?.();
117
+ export async function receiptFormatNotices(application, options = {}) {
118
+ const closeUrl = `${receiptConsoleUrl(application).replace(/\/$/, '')}/settings/data-format`;
119
+ const notice = await applicationFormatNotice(application)?.({ ...options, closeUrl });
112
120
  return notice ? [notice] : [];
113
121
  }
114
122
 
@@ -35,6 +35,7 @@ import { MODEL_USAGE_FORMAT } from '../model-backends/usage-ledger.js';
35
35
  import { inspectJsonStore } from '../storage/json-format.js';
36
36
  import { APPLY_RECEIPTS_FORMAT } from './apply-receipts.js';
37
37
  import { FORMAT_OPERATIONS_FORMAT } from './operations-log.js';
38
+ import { FORMAT_NOTICE_DELIVERY_FORMAT } from './notice-delivery.js';
38
39
  import { MODEL_SECRETS_FORMAT } from '../model-backends/secret-store.js';
39
40
  import { STANDING_ASSIGNMENTS_FORMAT } from '../standing-assignments/store.js';
40
41
  import { CLIENT_CONNECTION_HISTORY_FORMAT } from '../system/client-connection-status.js';
@@ -89,6 +90,7 @@ const jsonStores = () => [
89
90
  ['model-secrets.json', MODEL_SECRETS_FORMAT],
90
91
  ['client-connection-observations.json', CLIENT_CONNECTION_HISTORY_FORMAT],
91
92
  ['format-operations.json', FORMAT_OPERATIONS_FORMAT],
93
+ ['format-notice-delivery.json', FORMAT_NOTICE_DELIVERY_FORMAT],
92
94
  ['format-apply-receipts.json', APPLY_RECEIPTS_FORMAT],
93
95
  // A person's permanent deletes, content-free: their state and the fence local stores check (rec#5 C9).
94
96
  [HARD_DELETE_LEDGER_FILE, HARD_DELETE_LEDGER_FORMAT],
@@ -3,7 +3,8 @@ import { backupRetentionPolicy, pruneFormatBackups } from './backup-retention.js
3
3
  import { pruneFormatRetention } from './format-retention.js';
4
4
  import { GRAPH_LABEL, localStore, localStoresWithEngines, previewMigrations } from './migration-plan.js';
5
5
  import { findApplyReceipt, recordApplyReceipt } from './apply-receipts.js';
6
- import { recordFormatOperations } from './operations-log.js';
6
+ import { readFormatOperations, recordFormatOperations } from './operations-log.js';
7
+ import { dismissAppliedFormatNotices, listAppliedFormatNotices } from './notice-delivery.js';
7
8
 
8
9
  // A person's confirmed data format operations on one data directory (rec#17
9
10
  // D-09 part 2). Callers are `fuli migrate` at an interactive terminal and the
@@ -39,7 +40,10 @@ export async function applyMigrations({ dataDir, digest, actor, graph, now = ()
39
40
  throw new DataFormatError('data-format', 'data_format_stale_preview', plan.digest
40
41
  ? 'The stores no longer match the preview that was confirmed. Nothing was changed; run the preview again '
41
42
  + 'and confirm what it shows.'
42
- : 'Nothing waits for a confirmation now. Nothing was changed.');
43
+ : plan.blocked.length
44
+ ? `The migration plan could not be checked: ${plan.blocked.map((store) =>
45
+ `${store.label} — ${store.reason}`).join('; ')}. Nothing was changed; run the preview again.`
46
+ : 'Nothing waits for a confirmation now. Nothing was changed.');
43
47
  }
44
48
  stores = started.stores;
45
49
  } else {
@@ -172,9 +176,17 @@ function pruneQuietly(prune, dataDir) {
172
176
  // whole-store restore (console-restore.js), which restarts FULI around it.
173
177
  export function dataFormatMigrations(dataDir, { graph, restore = null, prune = pruneFormatBackups,
174
178
  now = () => new Date() } = {}) {
179
+ const notice = () => {
180
+ try { return { active: listAppliedFormatNotices(dataDir, readFormatOperations(dataDir), now().getTime()) }; }
181
+ catch { return { active: [], unavailable: true }; }
182
+ };
175
183
  return {
176
184
  // With the retention budget, so the console says the one `fuli migrate prune` uses.
177
- preview: async () => ({ ...await previewMigrations({ dataDir, graph }), retention: retentionPolicyOrNull() }),
185
+ preview: async () => ({ ...await previewMigrations({ dataDir, graph }), retention: retentionPolicyOrNull(), notice: notice() }),
186
+ dismissNotices: (ids) => {
187
+ dismissAppliedFormatNotices(dataDir, readFormatOperations(dataDir), ids, now().getTime());
188
+ return { notice: notice() };
189
+ },
178
190
  apply: ({ digest, actor }) => applyMigrations({ dataDir, digest, actor, graph }),
179
191
  rollback: ({ label, migrationId, actor }) => rollbackMigration({ dataDir, label, migrationId, actor, graph }),
180
192
  // The person's check of a graph prune whose answer never came: the same
@@ -0,0 +1,124 @@
1
+ import { existsSync } from 'node:fs';
2
+ import { join } from 'node:path';
3
+
4
+ import { contentHash } from '../../packages/roundtable/src/canonical-json.js';
5
+ import { sha256Bytes } from '../security/digest.js';
6
+ import { jsonFormat, requireJsonFormatVersion, updateVersionedJsonFileAtomic } from '../storage/json-format.js';
7
+ import { readJsonFile } from '../storage/json-file.js';
8
+
9
+ const FORMAT_VERSION = 1;
10
+ const NOTICE_LIMIT = 7;
11
+ const LEGACY_NOTICE_MS = 24 * 60 * 60 * 1000;
12
+ export const FORMAT_NOTICE_DELIVERY_FORMAT = jsonFormat({ store: 'format-notice-delivery', versions: [FORMAT_VERSION] });
13
+
14
+ function eventId(event) {
15
+ return contentHash({ label: event.label ?? null, store: event.store ?? null,
16
+ migrationId: event.migrationId, at: event.at });
17
+ }
18
+
19
+ // Older versions did not mark new events for count-based delivery. Only their
20
+ // still-visible last-day notices join the new queue; events logged by this
21
+ // version remain eligible even if the person returns much later.
22
+ function eligible(event, entries, now) {
23
+ if (event.kind !== 'applied' || !event.migrationId || !event.at) return false;
24
+ const entry = entries[eventId(event)];
25
+ return !entry?.retired && (Boolean(entry) || event.noticeEligible === true || now - Date.parse(event.at) < LEGACY_NOTICE_MS);
26
+ }
27
+
28
+ function activeEvents(events, entries, now) {
29
+ const logged = new Set(events.filter((event) => event.kind === 'applied').map(eventId));
30
+ const saved = Object.values(entries).flatMap((entry) => entry.event && !logged.has(eventId(entry.event)) ? [entry.event] : []);
31
+ const all = [...saved, ...events];
32
+ return all.filter((event, index) => eligible(event, entries, now) && !all.slice(index + 1).some((later) =>
33
+ later.label === event.label && (later.kind === 'restored'
34
+ || (later.kind === 'rolled_back' && later.migrationId === event.migrationId))));
35
+ }
36
+
37
+ // The operations log has a bounded history. Keep a compact event in the
38
+ // delivery store so its seven claims survive unrelated log pruning.
39
+ export function trackFormatOperationNotices(dataDir, events, readHistory = () => events) {
40
+ if (!events.some((event) => ['applied', 'rolled_back', 'restored'].includes(event.kind))) return;
41
+ const path = join(dataDir, 'format-notice-delivery.json');
42
+ updateVersionedJsonFileAtomic(path, FORMAT_NOTICE_DELIVERY_FORMAT, (current) => {
43
+ const entries = { ...(current?.entries ?? {}) };
44
+ let changed = false;
45
+ for (const event of events) {
46
+ if (event.kind === 'applied' && event.migrationId && event.at) {
47
+ const id = eventId(event);
48
+ if (!entries[id]) {
49
+ entries[id] = { event: { kind: 'applied', label: event.label, store: event.store,
50
+ migrationId: event.migrationId, at: event.at, noticeEligible: true }, claims: [], dismissed: false };
51
+ changed = true;
52
+ }
53
+ }
54
+ }
55
+ // The log is read under the shared format lock. A rollback may have
56
+ // completed between an apply's log write and its notice being queued.
57
+ const active = new Set(activeEvents(readHistory(), entries, Date.now()).map(eventId));
58
+ for (const [id, entry] of Object.entries(entries)) {
59
+ if (entry.event && !entry.retired && !active.has(id)) {
60
+ entries[id] = { ...entry, retired: true };
61
+ changed = true;
62
+ }
63
+ }
64
+ return changed ? { ...current, version: FORMAT_VERSION, entries } : undefined;
65
+ });
66
+ }
67
+
68
+ // One claim per task and event, shared across MCP processes and retries. The
69
+ // task token itself is not stored. A retried checkpoint gets the same count.
70
+ export function claimAppliedFormatNotices(dataDir, events, taskId, now) {
71
+ const path = join(dataDir, 'format-notice-delivery.json');
72
+ if (!taskId || (!events.some((event) => event.kind === 'applied') && !existsSync(path))) return [];
73
+ const taskHash = sha256Bytes(taskId);
74
+ const shown = [];
75
+ updateVersionedJsonFileAtomic(path, FORMAT_NOTICE_DELIVERY_FORMAT, (current) => {
76
+ const entries = { ...(current?.entries ?? {}) };
77
+ let changed = false;
78
+ for (const event of activeEvents(events, entries, now).reverse()) {
79
+ const id = eventId(event);
80
+ const entry = entries[id] ?? { claims: [], dismissed: false };
81
+ if (entry.dismissed) continue;
82
+ let claim = entry.claims.indexOf(taskHash);
83
+ if (claim < 0) {
84
+ if (entry.claims.length >= NOTICE_LIMIT) continue;
85
+ claim = entry.claims.length;
86
+ entries[id] = { ...entry, event, claims: [...entry.claims, taskHash] };
87
+ changed = true;
88
+ }
89
+ shown.push({ id, migrationId: event.migrationId, remaining: NOTICE_LIMIT - claim - 1 });
90
+ }
91
+ return changed ? { ...current, version: FORMAT_VERSION, entries } : undefined;
92
+ });
93
+ return shown;
94
+ }
95
+
96
+ // The console reads without claiming a delivery. Its IDs bind the person's
97
+ // dismissal to exactly the migrations shown, even if another arrives later.
98
+ export function listAppliedFormatNotices(dataDir, events, now) {
99
+ const current = readJsonFile(join(dataDir, 'format-notice-delivery.json'), null);
100
+ if (current) requireJsonFormatVersion(current, FORMAT_NOTICE_DELIVERY_FORMAT);
101
+ const entries = current?.entries ?? {};
102
+ return activeEvents(events, entries, now).reverse().flatMap((event) => {
103
+ const id = eventId(event);
104
+ const entry = entries[id];
105
+ const remaining = NOTICE_LIMIT - (entry?.claims.length ?? 0);
106
+ return entry?.dismissed || remaining <= 0 ? [] : [{ id, migrationId: event.migrationId, remaining }];
107
+ });
108
+ }
109
+
110
+ export function dismissAppliedFormatNotices(dataDir, events, ids, now) {
111
+ const wanted = new Set(ids);
112
+ const path = join(dataDir, 'format-notice-delivery.json');
113
+ updateVersionedJsonFileAtomic(path, FORMAT_NOTICE_DELIVERY_FORMAT, (current) => {
114
+ const entries = { ...(current?.entries ?? {}) };
115
+ let changed = false;
116
+ for (const event of activeEvents(events, entries, now)) {
117
+ const id = eventId(event);
118
+ if (!wanted.has(id) || entries[id]?.dismissed) continue;
119
+ entries[id] = { ...(entries[id] ?? { claims: [] }), dismissed: true };
120
+ changed = true;
121
+ }
122
+ return changed ? { ...current, version: FORMAT_VERSION, entries } : undefined;
123
+ });
124
+ }
@@ -2,6 +2,7 @@ import { join } from 'node:path';
2
2
 
3
3
  import { jsonFormat, updateVersionedJsonFileAtomic } from '../storage/json-format.js';
4
4
  import { readJsonFile } from '../storage/json-file.js';
5
+ import { trackFormatOperationNotices } from './notice-delivery.js';
5
6
 
6
7
  // What a person did to the data formats of one data directory (rec#17 D-09
7
8
  // part 2): applied, undone and restored migrations and pruned backups. Store,
@@ -18,9 +19,13 @@ function formatOperationsPath(dataDir) {
18
19
 
19
20
  export function recordFormatOperations(dataDir, events) {
20
21
  if (!events.length) return;
22
+ const recorded = events.map((event) => event.kind === 'applied' ? { ...event, noticeEligible: true } : event);
21
23
  updateVersionedJsonFileAtomic(formatOperationsPath(dataDir), FORMAT_OPERATIONS_FORMAT, (current) => ({
22
- version: LOG_VERSION, events: [...(current?.events ?? []), ...events].slice(-KEPT_EVENTS)
24
+ version: LOG_VERSION, events: [...(current?.events ?? []), ...recorded].slice(-KEPT_EVENTS)
23
25
  }));
26
+ // A reminder is secondary to the already-completed data operation. If its
27
+ // local queue cannot be written, the operations log can still supply it.
28
+ try { trackFormatOperationNotices(dataDir, recorded, () => readFormatOperations(dataDir)); } catch { /* keep the operation result */ }
24
29
  }
25
30
 
26
31
  export function readFormatOperations(dataDir) {
@@ -104,7 +104,7 @@ export async function checkpointTaskKnowledge(application, {
104
104
  agentId: task.projectAgentId ?? null, name: team.name, role: team.role, sourceApplication: task.sourceApplication,
105
105
  workStatus: effectiveLog.status, conversationId: conversation?.conversation_id ?? null,
106
106
  persistence: conversation?.status ?? null, collaborators: team.collaborators,
107
- notices: [...namedFlaReceiptNotices(task), ...standingReceiptNotices(task), ...receiptNotices(captureCheck, [], { settingsUrl: captureSettingsUrl(application) }), ...await receiptFormatNotices(application)],
107
+ notices: [...namedFlaReceiptNotices(task), ...standingReceiptNotices(task), ...receiptNotices(captureCheck, [], { settingsUrl: captureSettingsUrl(application) }), ...await receiptFormatNotices(application, { taskId: task.token })],
108
108
  turnReceipt: await checkpointTurnReceipt(application, checkpointTask, { memory, agentName: team.name }) }),
109
109
  ...(team.ignored.length ? { ignored_collaborators: team.ignored } : {}) };
110
110
  };
@@ -95,7 +95,7 @@ export async function readTaskPreferences(application, {
95
95
  agent_receipt: taskAgentReceipt(application, { projectId: task.personalProjectId,
96
96
  agentId: task.projectAgentId, name: rawAgent.profile?.display_name ?? null, role: rawAgent.profile?.name ?? null, sourceApplication: task.sourceApplication,
97
97
  notices: [...receiptNotices(await captureDecision(application, taskCaptureScope(task)), [],
98
- { settingsUrl: captureSettingsUrl(application) }), ...await receiptFormatNotices(application)] }),
98
+ { settingsUrl: captureSettingsUrl(application) }), ...await receiptFormatNotices(application, { taskId: task.token })] }),
99
99
  preference_delivery: { status: 'complete' }, preferences_complete: true,
100
100
  same_task_recovery_available: true, truncated: false
101
101
  };
@@ -3,6 +3,7 @@ import { deferredTurnReceipt, MAX_LIST_EPISODES, readEpisodeReceipts, readTurnRe
3
3
  import { withReceiptLines, withTurnReceipt } from '../agents/identity-receipt.js';
4
4
  import { taskKnowledgeReader } from './knowledge-reader.js';
5
5
  import { formalTask, sessionMigrationLine, sessionMigrationOffer } from './session-knowledge-migration.js';
6
+ import { receiptFormatNotices } from '../data-format/format-notices.js';
6
7
 
7
8
  // When a turn's receipt reaches a reply, exactly once (rec#20). The Provider
8
9
  // marks a checkpoint that saved knowledge as unread. Its own reply claims it
@@ -44,6 +45,8 @@ async function savedTurnReceipt(application, task, results, { memory, agentName
44
45
  // never showed, then the offer to migrate what the session's temporary project
45
46
  // holds once the session linked to a formal project (rec#20 part 2).
46
47
  export async function entryAgentReceipt(application, task, receipt) {
48
+ const format = await receiptFormatNotices(application, { taskId: task.token, includePending: false });
49
+ if (format.length) receipt = { ...receipt, markdown: [receipt.markdown, ...format].join(' · ') };
47
50
  const late = await unreadTurnReceipt(application, task);
48
51
  const migration = await sessionMigrationOffer(application, task);
49
52
  return withReceiptLines(withTurnReceipt(receipt, late), migration ? [migration] : []);
@@ -19,9 +19,10 @@ const BODIES = Object.freeze({
19
19
  apply: z.object({ digest: z.string().regex(/^[0-9a-f]{64}$/) }).strict(),
20
20
  rollback: z.object({ label, migrationId: z.string().min(1).max(128) }).strict(),
21
21
  prune: z.object({}).strict(),
22
+ 'dismiss-notices': z.object({ ids: z.array(z.string().regex(/^[0-9a-f]{64}$/)).min(1).max(200) }).strict(),
22
23
  restore: z.object({ label, backupRef, currentDigest: z.string().min(1).max(128).nullable() }).strict()
23
24
  });
24
- const ACTIONS = /^\/api\/data-format\/(apply|rollback|prune|restore)$/;
25
+ const ACTIONS = /^\/api\/data-format\/(apply|rollback|prune|restore|dismiss-notices)$/;
25
26
  const RESTORE_READS = new Set(['/api/data-format/restore', '/api/data-format/restore/status']);
26
27
 
27
28
  export async function handleDataFormatApiRequest({ request, response, url, migrations }) {
@@ -58,6 +59,7 @@ const ACTION_HANDLERS = Object.freeze({
58
59
  rollback: (migrations, body) => migrations.rollback({ label: body.label, migrationId: body.migrationId,
59
60
  actor: LOCAL_CONSOLE }),
60
61
  prune: async (migrations) => ({ pruned: await migrations.retain() }),
62
+ 'dismiss-notices': (migrations, body) => migrations.dismissNotices(body.ids),
61
63
  restore: (migrations, body) => restorePort(migrations.restore).start(body)
62
64
  });
63
65
 
@@ -3,4 +3,4 @@
3
3
  // and writes its digest here before publishing (scripts/pin-win-helper.js); a
4
4
  // source checkout has no helper and no pin, so Windows Hello is unavailable there.
5
5
  // The helper is not Authenticode-signed: this digest is its only integrity check.
6
- export const WIN_HELPER_SHA256 = '4c3e84d3b3b270cce5782600e73184506332785d0df3209618a50c0c8586cbe4';
6
+ export const WIN_HELPER_SHA256 = '685edec08590b6ce5e871999086142c93072813ba80f50925ec174f7f95f7d7e';
@@ -1 +0,0 @@
1
- .store-restore-body[data-v-06f62a17]{gap:16px;padding-inline:20px;font-size:14px;display:grid}.store-restore-body p[data-v-06f62a17]{margin:0}.store-restore-label[data-v-06f62a17]{color:var(--color-muted);font-size:13px}.store-restore-option[data-v-06f62a17],.store-restore-check[data-v-06f62a17]{overflow-wrap:anywhere;align-items:flex-start;gap:10px;display:flex}.store-restore-impact[data-v-06f62a17]{gap:12px;display:grid}.store-restore-impact ul[data-v-06f62a17]{color:var(--color-muted);gap:4px;margin:0;padding-left:18px;font-size:13.5px;display:grid}.store-restore-loss[data-v-06f62a17],.store-restore-error[data-v-06f62a17]{color:var(--color-danger)}.store-restore-actions[data-v-06f62a17]{flex-wrap:wrap;align-items:center;gap:12px;display:flex}.data-format-view[data-v-30fcad5d]{color:var(--color-ink);padding-top:clamp(16px,3vw,32px);padding-bottom:96px}.data-format-content[data-v-30fcad5d]{width:100%;max-width:var(--layout-max);gap:16px;margin:0 auto;display:grid}.data-format-lede[data-v-30fcad5d],.data-format-restore[data-v-30fcad5d],.data-format-presence[data-v-30fcad5d],.data-format-external[data-v-30fcad5d]{color:var(--color-muted);margin:0;font-size:14px;line-height:1.6}.data-format-store[data-v-30fcad5d]{overflow-wrap:anywhere;flex-wrap:wrap;align-items:center;gap:8px;display:flex}.data-format-facts[data-v-30fcad5d]{grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:12px 24px;margin:0;display:grid}.data-format-body[data-v-30fcad5d]{gap:16px;padding-inline:20px;display:grid}.data-format-facts div[data-v-30fcad5d]{min-width:0}.data-format-samples[data-v-30fcad5d]{grid-column:1/-1}.data-format-facts dt[data-v-30fcad5d]{color:var(--color-muted);font-size:12px}.data-format-facts dd[data-v-30fcad5d]{overflow-wrap:anywhere;flex-wrap:wrap;gap:6px;margin:2px 0 0;display:flex}code[data-v-30fcad5d]{font-family:var(--font-mono);overflow-wrap:anywhere;font-size:12.5px}.data-format-chip[data-v-30fcad5d]{border:1px solid var(--color-border);background:var(--color-surface-subtle);border-radius:999px;padding:2px 8px}.data-format-more[data-v-30fcad5d]{color:var(--color-muted);font-size:13px}.data-format-blocked[data-v-30fcad5d],.data-format-undo[data-v-30fcad5d]{gap:12px;margin:0;padding-block:0;list-style:none;display:grid}.data-format-undo[data-v-30fcad5d]{padding-inline:0}.data-format-blocked li[data-v-30fcad5d],.data-format-undo li[data-v-30fcad5d]{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px 12px;min-width:0;display:flex}.data-format-blocked li span[data-v-30fcad5d]{color:var(--color-muted);flex-basis:100%;font-size:13px}.data-format-digest[data-v-30fcad5d]{color:var(--color-muted);flex-wrap:wrap;gap:8px;margin:0;font-size:13px;display:flex}.data-format-check[data-v-30fcad5d]{align-items:flex-start;gap:10px;display:flex}.data-format-prune[data-v-30fcad5d]{flex-wrap:wrap;align-items:center;gap:8px 12px;display:flex}.data-format-actions[data-v-30fcad5d]{flex-wrap:wrap;align-items:center;gap:12px;display:flex}.data-format-results[data-v-30fcad5d]{border:1px solid var(--color-border);border-radius:var(--radius-card);background:var(--color-surface);margin:0;padding:12px 16px;font-size:14px}.data-format-results p[data-v-30fcad5d]{margin:0}.data-format-error[data-v-30fcad5d]{color:var(--color-danger);margin:0;font-size:14px}.data-format-warning[data-v-30fcad5d],.data-format-warnings[data-v-30fcad5d]{color:var(--color-danger);margin:0;font-size:13.5px;line-height:1.6}.data-format-warnings[data-v-30fcad5d]{gap:6px;padding:0;list-style:none;display:grid}
@@ -1,2 +0,0 @@
1
- import{A as e,C as t,D as n,Dt as r,E as i,G as a,J as o,M as ee,Mt as s,T as c,U as te,X as l,b as u,k as d,ot as f,r as p,s as m,t as h,vt as g,w as _}from"./_plugin-vue_export-helper-Be38Jawd.js";import{t as v}from"./button-Xb0cKhdr.js";import{t as ne}from"./checkbox-CZg0Iow1.js";import{t as re}from"./Label-CBRsKlFL.js";import{n as y,t as b}from"./RadioGroupItem-4VcuuIZK.js";import{t as ie}from"./GrowthLoading-DnSjbwAi.js";import{i as ae}from"./ui-D936HGK2.js";import{t as x}from"./UiNotice-DsJRHRTA.js";import{t as S}from"./Card-Zhpf1co5.js";import{n as oe,t as C}from"./CardHeader-C9JtHZXs.js";import{t as w}from"./CardTitle-B8HEul5N.js";import{i as T,r as E}from"./date-time-Clwafva-.js";import{t as D}from"./badge-G1xmTvLV.js";import{t as se}from"./BackLink-BrzA4htj.js";import{_ as O,a as k,c as A,d as j,f as M,g as N,h as P,i as F,l as I,m as L,n as R,o as z,p as B,r as V,s as H,t as U,u as W}from"./model-cgiHaWsF.js";var G={class:`store-restore-body`},K=[`role`,`data-restore-outcome`],q={key:1,role:`alert`},J={key:0},Y={key:2,class:`store-restore-error`,role:`alert`},X={key:3},Z={id:`store-restore-choose`,class:`store-restore-label`},ce={key:0},le={key:1,class:`store-restore-impact`,"data-restore-impact":``},ue={class:`store-restore-loss`},de={class:`store-restore-check`},fe={class:`store-restore-actions`},pe={key:4,class:`store-restore-error`,role:`alert`},Q=2e3,me=3e5,he=h(ee({__name:`StoreRestore`,emits:[`restored`],setup(a,{emit:ee}){let h=ee,ae=g(!1),x=g(!1),D=g(``),se=g([]),O=g(``),k=g(null),A=g(!1),j=g(!1),P=g(!1),F=g(null),L=g(null),z=g(!1),V=g(``),H,U=!1,he=t(()=>se.value.flatMap(e=>e.backups.map(t=>({value:`${e.label}\n${t.ref}`,text:m(`dataFormat.restore.option`,{label:e.label,time:ge(t.takenAt),version:t.version??`-`})})))),$=t(()=>{let[e=``,t=``]=O.value.split(`
2
- `);return{label:e,backupRef:t}});function ge(e){return T(e,p(),E,{missing:`—`})}async function _e(){ae.value=!0,x.value=!0,D.value=``;try{let e=await I();se.value=e.stores,e.restore&&!B(e.restore,e.restore.id)&&xe(e.restore)}catch(e){D.value=M(e)}finally{x.value=!1}}function ve(e){O.value=typeof e==`string`?e:``,k.value=null,j.value=!1,V.value=``}async function ye(){if(O.value){A.value=!0,V.value=``;try{k.value=(await R($.value.label,$.value.backupRef)).impact,j.value=!1}catch(e){V.value=M(e)}finally{A.value=!1}}}async function be(){if(k.value&&j.value){P.value=!0,V.value=``,L.value=null;try{xe(await N($.value.label,$.value.backupRef,k.value.currentDigest))}catch(e){V.value=M(e)}finally{P.value=!1}}}function xe(e){F.value=e,z.value=!1;let t=Date.now()+me,n=async()=>{if(U)return;let r=null;try{r=(await W()).restore}catch{}U||(r&&B(r,e.id)?(L.value=r,F.value=null,k.value=null,O.value=``,h(`restored`)):Date.now()>=t?(F.value=null,z.value=!0):H=setTimeout(n,Q))};B(e,e.id)?n():H=setTimeout(n,Q)}function Se(e){let t={label:e.label,backup:e.backupRef,safety:e.safetyBackupRef??``,reason:e.error??``};return e.status===`failed`?m(`dataFormat.restore.failed`,t):e.error?m(`dataFormat.restore.restoredWithError`,t):m(`dataFormat.restore.restored`,t)}return te(()=>{U=!0,clearTimeout(H)}),(t,a)=>(o(),c(r(S),{as:`section`,class:`store-restore`,"aria-labelledby":`store-restore-title`,"data-store-restore":``},{default:f(()=>[e(r(C),null,{default:f(()=>[e(r(w),{id:`store-restore-title`,as:`h2`},{default:f(()=>[d(s(r(m)(`dataFormat.restore.title`)),1)]),_:1}),e(r(oe),null,{default:f(()=>[d(s(r(m)(`dataFormat.restore.lede`)),1)]),_:1})]),_:1}),_(`div`,G,[L.value?(o(),n(`p`,{key:0,role:L.value.status===`failed`?`alert`:`status`,"data-restore-outcome":L.value.status},s(Se(L.value)),9,K)):i(``,!0),z.value?(o(),n(`p`,q,s(r(m)(`dataFormat.restore.notBack`)),1)):i(``,!0),F.value?(o(),c(ie,{key:2,variant:`inline`,label:r(m)(`dataFormat.restore.running`,{label:F.value.label})},null,8,[`label`])):(o(),n(u,{key:3},[ae.value?x.value?(o(),c(ie,{key:1,variant:`compact`,label:r(m)(`dataFormat.restore.loading`)},null,8,[`label`])):D.value?(o(),n(`p`,Y,s(r(m)(`dataFormat.restore.loadFailed`))+` `+s(D.value),1)):he.value.length?(o(),n(u,{key:4},[_(`span`,Z,s(r(m)(`dataFormat.restore.choose`)),1),e(r(y),{"model-value":O.value,"aria-labelledby":`store-restore-choose`,class:`grid gap-2`,disabled:A.value||P.value,"onUpdate:modelValue":ve},{default:f(()=>[(o(!0),n(u,null,l(he.value,t=>(o(),n(`label`,{key:t.value,class:`store-restore-option`,"data-restore-backup":``},[e(r(b),{value:t.value},null,8,[`value`]),_(`span`,null,s(t.text),1)]))),128))]),_:1},8,[`model-value`,`disabled`]),O.value&&!k.value?(o(),n(`div`,ce,[e(r(v),{variant:`outline`,"data-restore-describe":``,loading:A.value,"loading-label":r(m)(`dataFormat.restore.describing`,{label:$.value.label}),onClick:ye},{default:f(()=>[d(s(r(m)(`dataFormat.restore.describe`)),1)]),_:1},8,[`loading`,`loading-label`])])):i(``,!0),k.value?(o(),n(`div`,le,[_(`p`,ue,s(r(m)(`dataFormat.restore.loss`,{label:$.value.label,time:ge(k.value.takenAt)})),1),_(`ul`,null,[_(`li`,null,s(r(m)(`dataFormat.restore.versions`,{current:k.value.currentVersion??`-`,backup:k.value.backupVersion??`-`})),1),(o(!0),n(u,null,l(k.value.tables??[],e=>(o(),n(`li`,{key:e.table},s(r(m)(`dataFormat.restore.table`,e)),1))),128)),(o(!0),n(u,null,l(k.value.laterMigrations,e=>(o(),n(`li`,{key:e.migrationId},s(r(m)(`dataFormat.restore.later`,{id:e.migrationId,status:e.status})),1))),128))]),_(`div`,de,[e(r(ne),{id:`store-restore-understood`,modelValue:j.value,"onUpdate:modelValue":a[0]||=e=>j.value=e,disabled:P.value},null,8,[`modelValue`,`disabled`]),e(r(re),{for:`store-restore-understood`},{default:f(()=>[d(s(r(m)(`dataFormat.restore.understand`,{label:$.value.label})),1)]),_:1})]),_(`div`,fe,[e(r(v),{variant:`destructive`,"data-restore-confirm":``,disabled:!j.value,loading:P.value,"loading-label":r(m)(`dataFormat.restore.running`,{label:$.value.label}),onClick:be},{default:f(()=>[d(s(r(m)(`dataFormat.restore.confirm`)),1)]),_:1},8,[`disabled`,`loading`,`loading-label`]),e(r(v),{variant:`ghost`,disabled:P.value,onClick:a[1]||=e=>ve(``)},{default:f(()=>[d(s(r(m)(`dataFormat.restore.cancel`)),1)]),_:1},8,[`disabled`])])])):i(``,!0)],64)):(o(),n(`p`,X,s(r(m)(`dataFormat.restore.none`)),1)):(o(),n(`div`,J,[e(r(v),{variant:`outline`,"data-restore-open":``,onClick:_e},{default:f(()=>[d(s(r(m)(`dataFormat.restore.open`)),1)]),_:1})]))],64)),V.value?(o(),n(`p`,pe,s(V.value),1)):i(``,!0)])]),_:1}))}}),[[`__scopeId`,`data-v-06f62a17`]]),$=[`aria-label`],ge={class:`data-format-content`},_e={class:`data-format-lede`},ve={class:`data-format-body`},ye=[`aria-label`],be=[`data-result`],xe={key:2,class:`data-format-prune`,"data-prune-unverified":``},Se={class:`data-format-error`,role:`alert`},Ce={key:3,role:`status`,"data-prune-checked":``},we={key:4,class:`data-format-error`,role:`alert`},Te={key:5,class:`data-format-error`,role:`alert`,"data-audit-failed":``},Ee={class:`data-format-facts data-format-body`},De={class:`data-format-samples`},Oe=[`title`],ke={key:0,"aria-hidden":`true`},Ae={key:0,class:`data-format-more`},je={key:0},Me={key:0,class:`data-format-warning data-format-body`,"data-store-warning":``},Ne={class:`data-format-blocked data-format-body`},Pe={key:0},Fe={class:`data-format-body`},Ie={key:0,class:`data-format-warnings`,"data-confirm-warnings":``},Le={class:`data-format-digest`},Re=[`title`],ze={class:`data-format-external`,"data-external-writers":``},Be={class:`data-format-check`},Ve={class:`data-format-presence`},He={key:1,class:`data-format-error`,role:`alert`},Ue={class:`data-format-actions`},We={class:`data-format-body`},Ge={class:`data-format-external`,"data-external-writers":``},Ke={class:`data-format-undo`},qe={key:0},Je={key:1,class:`data-format-actions`},Ye={key:0,role:`status`},Xe={key:1,class:`data-format-error`,role:`alert`},Ze={key:10,class:`data-format-restore`,"data-retention":``},Qe=h(ee({__name:`DataFormatPage`,setup(ee){let p=g(null),h=g(!0),y=g(``),b=g(!1),T=g(!1),E=g(!1),N=g(``),I=g(null),R=g(null),B=g(null),W=g(``),G=g(``),K=g(!1),q=g(``),J=g(!1),Y=g(null),X=g(``),Z=null,ce=/^\/settings(?:[?#]|$)/,le=t(()=>p.value?.stores??[]),ue=t(()=>p.value?.blocked??[]),de=t(()=>p.value?.undoable??[]),fe=t(()=>le.value.filter(e=>e.warning)),pe=t(()=>{let e=p.value?.retention;return e?{keep:e.keep,megabytes:Math.round(e.maxBytes/1048576)}:null});async function Q(){Z?.abort(),Z=new AbortController,h.value=!0,y.value=``;try{p.value=await A(Z.signal),b.value=!1}catch(e){e?.name!==`AbortError`&&(y.value=M(e))}finally{h.value=!1}}async function me(){let e=p.value?.digest;if(e&&b.value){T.value=!0,N.value=``,E.value=!1,I.value=null,K.value=!1,q.value=``;try{I.value=await U(e),K.value=H(I.value.pruned),q.value=k(I.value.pruned),await Q()}catch(e){j(e)===`data_format_stale_preview`?(E.value=!0,await Q()):N.value=M(e)}finally{T.value=!1}}}function Qe(e){return e.status===`applied`?m(`dataFormat.resultApplied`,{id:e.migrationId}):e.status===`already_applied`?m(`dataFormat.resultAlready`,{id:e.migrationId}):m(`dataFormat.resultFailed`,{message:e.message??e.code??``})}async function $e(e){B.value=e,G.value=``,W.value=``,K.value=!1,q.value=``;try{let t=await O(e.label,e.migrationId);K.value=H(t.pruned),q.value=k(t.pruned),W.value=m(`dataFormat.undone`,{id:e.migrationId,version:t.version}),R.value=null,await Q()}catch(e){G.value=M(e)}finally{B.value=null}}async function et(){J.value=!0,Y.value=null,X.value=``;try{let{pruned:e}=await F(),t=z(e);K.value=t.kind===`unverified`,Y.value=t.kind===`unverified`?null:{kind:t.kind,count:t.count},q.value=k(e)}catch(e){X.value=M(e)}finally{J.value=!1}}return a(Q),te(()=>Z?.abort()),(t,a)=>(o(),n(`section`,{class:`view data-format-view`,"aria-label":r(m)(`dataFormat.title`)},[_(`div`,ge,[e(se,{to:`/settings`,from:ce},{default:f(()=>[d(s(r(m)(`dataFormat.back`)),1)]),_:1}),_(`p`,_e,s(r(m)(`dataFormat.lede`)),1),h.value&&!p.value?(o(),c(ie,{key:0,label:r(m)(`dataFormat.loading`)},null,8,[`label`])):y.value&&!p.value?(o(),c(r(S),{key:1,as:`section`,class:`data-format-card`,role:`alert`},{default:f(()=>[_(`div`,ve,[_(`p`,null,s(r(m)(`dataFormat.loadFailed`))+` `+s(y.value),1),e(r(v),{variant:`outline`,onClick:Q},{default:f(()=>[d(s(r(m)(`dataFormat.retry`)),1)]),_:1})])]),_:1})):p.value?(o(),n(u,{key:2},[E.value?(o(),c(r(x),{key:0,tone:`error`},{default:f(()=>[d(s(r(m)(`dataFormat.stale`)),1)]),_:1})):i(``,!0),I.value?(o(),n(`section`,{key:1,class:`data-format-results`,"aria-label":r(m)(`dataFormat.results`),role:`status`},[(o(!0),n(u,null,l(I.value.results,e=>(o(),n(`p`,{key:e.label,"data-result":e.status},[_(`strong`,null,s(e.label),1),d(` `+s(Qe(e)),1)],8,be))),128)),(o(!0),n(u,null,l(I.value.skipped,e=>(o(),n(`p`,{key:e.label},[_(`strong`,null,s(e.label),1),d(` `+s(r(m)(`dataFormat.resultSkipped`,{id:e.migrationId})),1)]))),128))],8,ye)):i(``,!0),K.value?(o(),n(`div`,xe,[_(`p`,Se,s(r(m)(`dataFormat.pruneUnverified`)),1),e(r(v),{variant:`outline`,"data-prune-check":``,loading:J.value,"loading-label":r(m)(`dataFormat.pruneChecking`),onClick:et},{default:f(()=>[d(s(r(m)(`dataFormat.pruneCheck`)),1)]),_:1},8,[`loading`,`loading-label`])])):i(``,!0),Y.value?(o(),n(`p`,Ce,s(Y.value.kind===`checked`?r(m)(`dataFormat.pruneChecked`,{count:Y.value.count}):r(m)(`dataFormat.pruneUnreached`)),1)):i(``,!0),X.value?(o(),n(`p`,we,s(X.value),1)):i(``,!0),q.value?(o(),n(`p`,Te,s(r(m)(`dataFormat.auditFailed`,{message:q.value})),1)):i(``,!0),!le.value.length&&!ue.value.length?(o(),c(r(ae),{key:6,icon:`check`,text:r(m)(`dataFormat.nothingPending`)},null,8,[`text`])):i(``,!0),(o(!0),n(u,null,l(le.value,t=>(o(),c(r(S),{key:t.label,as:`article`,class:`data-format-card`,"data-store-plan":``,"aria-labelledby":`plan-${t.store}`},{default:f(()=>[e(r(C),null,{default:f(()=>[e(r(w),{id:`plan-${t.store}`,as:`h2`,class:`data-format-store`},{default:f(()=>[_(`span`,null,s(t.label),1),e(r(D),{variant:`outline`},{default:f(()=>[d(s(r(m)(`dataFormat.kinds.${t.kind}`)),1)]),_:2},1024)]),_:2},1032,[`id`]),e(r(oe),null,{default:f(()=>[d(s(t.step.summary),1)]),_:2},1024)]),_:2},1024),_(`dl`,Ee,[_(`div`,null,[_(`dt`,null,s(r(m)(`dataFormat.step`)),1),_(`dd`,null,[_(`code`,null,s(t.step.id),1)])]),_(`div`,null,[_(`dt`,null,s(r(m)(`dataFormat.version`)),1),_(`dd`,null,s(t.step.fromVersion)+` → `+s(t.step.toVersion),1)]),_(`div`,null,[_(`dt`,null,s(r(m)(`dataFormat.records`)),1),_(`dd`,null,s(r(m)(`dataFormat.recordCount`,{count:t.step.count})),1)]),_(`div`,De,[_(`dt`,null,s(r(m)(`dataFormat.samples`)),1),_(`dd`,null,[(o(!0),n(u,null,l(r(L)(t.step),e=>(o(),n(`code`,{key:e.id,title:e.id,class:`data-format-chip`},[d(s(e.text),1),e.cut?(o(),n(`span`,ke,`…`)):i(``,!0)],8,Oe))),128)),r(V)(t.step)?(o(),n(`span`,Ae,s(r(m)(`dataFormat.more`,{count:r(V)(t.step)})),1)):i(``,!0)])]),t.automatic.length?(o(),n(`div`,je,[_(`dt`,null,s(r(m)(`dataFormat.runsFirst`)),1),_(`dd`,null,[_(`code`,null,s(t.automatic.join(`, `)),1)])])):i(``,!0),_(`div`,null,[_(`dt`,null,s(r(m)(`dataFormat.undo`)),1),_(`dd`,null,s(t.undo===`available`?r(m)(`dataFormat.undoAvailable`):r(m)(`dataFormat.undoRestoreOnly`)),1)]),_(`div`,null,[_(`dt`,null,s(r(m)(`dataFormat.backup`)),1),_(`dd`,null,s(t.kind===`neo4j`?r(m)(`dataFormat.backupJournal`):r(m)(`dataFormat.backupFile`)),1)])]),t.warning?(o(),n(`p`,Me,s(t.warning),1)):i(``,!0)]),_:2},1032,[`aria-labelledby`]))),128)),ue.value.length?(o(),c(r(S),{key:7,as:`section`,class:`data-format-card`,"aria-labelledby":`data-format-blocked`},{default:f(()=>[e(r(C),null,{default:f(()=>[e(r(w),{id:`data-format-blocked`,as:`h2`},{default:f(()=>[d(s(r(m)(`dataFormat.blockedTitle`)),1)]),_:1})]),_:1}),_(`ul`,Ne,[(o(!0),n(u,null,l(ue.value,e=>(o(),n(`li`,{key:e.label},[_(`strong`,null,s(e.label),1),e.steps.length?(o(),n(`code`,Pe,s(e.steps.join(`, `)),1)):i(``,!0),_(`span`,null,s(e.reason),1)]))),128))])]),_:1})):i(``,!0),p.value.digest?(o(),c(r(S),{key:8,as:`section`,class:`data-format-card data-format-confirm`,"aria-labelledby":`data-format-confirm`},{default:f(()=>[e(r(C),null,{default:f(()=>[e(r(w),{id:`data-format-confirm`,as:`h2`},{default:f(()=>[d(s(r(m)(`dataFormat.confirmTitle`)),1)]),_:1}),e(r(oe),null,{default:f(()=>[d(s(r(m)(`dataFormat.digestNote`)),1)]),_:1})]),_:1}),_(`div`,Fe,[fe.value.length?(o(),n(`ul`,Ie,[(o(!0),n(u,null,l(fe.value,e=>(o(),n(`li`,{key:e.label},[_(`strong`,null,s(e.label),1),d(` `+s(e.warning),1)]))),128))])):i(``,!0),_(`p`,Le,[_(`span`,null,s(r(m)(`dataFormat.digest`)),1),_(`code`,{title:p.value.digest,"data-plan-digest":``},s(r(P)(p.value.digest))+`…`,9,Re)]),_(`p`,ze,s(r(m)(`dataFormat.externalWriters`)),1),_(`div`,Be,[e(r(ne),{id:`data-format-reviewed`,modelValue:b.value,"onUpdate:modelValue":a[0]||=e=>b.value=e,disabled:T.value},null,8,[`modelValue`,`disabled`]),e(r(re),{for:`data-format-reviewed`},{default:f(()=>[d(s(r(m)(`dataFormat.reviewed`)),1)]),_:1})]),_(`p`,Ve,s(r(m)(`dataFormat.presence`)),1),N.value?(o(),n(`p`,He,s(N.value),1)):i(``,!0),_(`div`,Ue,[e(r(v),{"data-apply":``,disabled:!b.value,loading:T.value,"loading-label":r(m)(`dataFormat.applying`),onClick:me},{default:f(()=>[d(s(r(m)(`dataFormat.apply`)),1)]),_:1},8,[`disabled`,`loading`,`loading-label`])])])]),_:1})):i(``,!0),de.value.length?(o(),c(r(S),{key:9,as:`section`,class:`data-format-card`,"aria-labelledby":`data-format-undo`},{default:f(()=>[e(r(C),null,{default:f(()=>[e(r(w),{id:`data-format-undo`,as:`h2`},{default:f(()=>[d(s(r(m)(`dataFormat.undoTitle`)),1)]),_:1}),e(r(oe),null,{default:f(()=>[d(s(r(m)(`dataFormat.undoLede`)),1)]),_:1})]),_:1}),_(`div`,We,[_(`p`,Ge,s(r(m)(`dataFormat.externalWriters`)),1),_(`ul`,Ke,[(o(!0),n(u,null,l(de.value,t=>(o(),n(`li`,{key:`${t.label}:${t.migrationId}`},[_(`span`,null,[_(`strong`,null,s(t.label),1),a[2]||=d(),_(`code`,null,s(t.migrationId),1),d(` `+s(t.toVersion)+` → `+s(t.fromVersion),1)]),t.reversible===!1?(o(),n(`span`,qe,s(r(m)(`dataFormat.undoRestoreOnly`)),1)):R.value===t?(o(),n(`span`,Je,[e(r(v),{variant:`destructive`,"data-confirm-undo":``,loading:B.value===t,"loading-label":r(m)(`dataFormat.undoing`,{id:t.migrationId}),onClick:e=>$e(t)},{default:f(()=>[d(s(r(m)(`dataFormat.undoConfirm`)),1)]),_:1},8,[`loading`,`loading-label`,`onClick`]),e(r(v),{variant:`ghost`,disabled:B.value===t,onClick:a[1]||=e=>R.value=null},{default:f(()=>[d(s(r(m)(`dataFormat.undoCancel`)),1)]),_:1},8,[`disabled`])])):(o(),c(r(v),{key:2,variant:`outline`,"data-undo":``,onClick:e=>R.value=t},{default:f(()=>[d(s(r(m)(`dataFormat.undo`)),1)]),_:1},8,[`onClick`]))]))),128))]),W.value?(o(),n(`p`,Ye,s(W.value),1)):i(``,!0),G.value?(o(),n(`p`,Xe,s(G.value),1)):i(``,!0)])]),_:1})):i(``,!0),pe.value?(o(),n(`p`,Ze,s(r(m)(`dataFormat.retention`,pe.value)),1)):i(``,!0),e(he,{onRestored:Q})],64)):i(``,!0)])],8,$))}}),[[`__scopeId`,`data-v-30fcad5d`]]);export{Qe as default};
@@ -1 +0,0 @@
1
- import{J as e,M as t,T as n}from"./_plugin-vue_export-helper-Be38Jawd.js";import{t as r}from"./KnowledgeWorkspace-CJmm-Xs7.js";var i=t({__name:`KnowledgePage`,setup(t){return(t,i)=>(e(),n(r))}});export{i as default};
@@ -1 +0,0 @@
1
- import{s as e}from"./_plugin-vue_export-helper-Be38Jawd.js";var t=/^[A-Za-z0-9_-]+$/;function n(n,r){if(!r||!t.test(r))return null;let i=`${n}.${r}`,a=e(i);return a===i?null:a}export{n as t};
@@ -1 +0,0 @@
1
- import{a as e,c as t,t as n}from"./client-CJGUYN1M.js";import{t as r}from"./short-ids-BpNwVgnt.js";function i(e){return(e??[]).some(e=>e.kind===`prune_unverified`)}function a(e){return(e??[]).find(e=>e.auditError)?.auditError?.message??``}var o=t=>e(`/api/data-format`,{signal:t}),s=e=>t(`/api/data-format/apply`,{digest:e}),c=(e,n)=>t(`/api/data-format/rollback`,{label:e,migrationId:n}),l=()=>t(`/api/data-format/prune`,{});function u(e){let t=e.filter(e=>e.kind===`pruned`).length;return i(e)?{kind:`unverified`,count:t}:e.some(e=>e.kind===`prune_failed`)?{kind:`unreached`,count:t}:{kind:`checked`,count:t}}var d=()=>e(`/api/data-format/restore`),f=(t,n)=>e(`/api/data-format/restore?${new URLSearchParams({label:t,backup:n})}`),p=(e,n,r)=>t(`/api/data-format/restore`,{label:e,backupRef:n,currentDigest:r}),m=()=>e(`/api/data-format/restore/status`);function h(e,t){return e?.id===t&&(e.status===`restored`||e.status===`failed`)}function g(e){let t=r(e.sampleIds);return e.sampleIds.map(e=>({id:e,text:t.get(e)??e,cut:(t.get(e)??e)!==e}))}function _(e){return Math.max(0,e.count-e.sampleIds.length)}function v(e){return e.slice(0,12)}function y(e){if(!(e instanceof n)||e.status!==409)return null;try{let t=JSON.parse(e.detail);return typeof t.code==`string`?t.code:null}catch{return null}}function b(e){if(e instanceof n)try{let t=JSON.parse(e.detail);if(typeof t.error==`string`)return t.error}catch{}return e instanceof Error?e.message:String(e)}export{c as _,a,o as c,y as d,b as f,p as g,v as h,l as i,d as l,g as m,f as n,u as o,h as p,_ as r,i as s,s as t,m as u};
@@ -1 +0,0 @@
1
- import{a as e}from"./client-CJGUYN1M.js";function t(t,n){let r=new URLSearchParams({personalSpaceId:t,personalProjectId:n});return e(`/api/project-team?${r}`)}export{t};
@@ -1 +0,0 @@
1
- import{C as e,vt as t}from"./_plugin-vue_export-helper-Be38Jawd.js";import{o as n}from"./Presence-DXkWbJEH.js";function r(r){let i=n({dir:t(`ltr`)});return e(()=>r?.value||i.dir?.value||`ltr`)}export{r as t};