chainlesschain 0.166.106 → 0.166.108

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 (225) hide show
  1. package/README.md +187 -8
  2. package/package.json +2 -2
  3. package/src/assets/linux-subreaper/linux-arm64/manifest.json +1 -1
  4. package/src/assets/linux-subreaper/linux-x64/manifest.json +1 -1
  5. package/src/assets/web-panel/assets/{AIOps-CKwEku2e.js → AIOps-B5HWUFaS.js} +1 -1
  6. package/src/assets/web-panel/assets/{ActionButton-BSUOuTpW.js → ActionButton-DCIKpxoQ.js} +1 -1
  7. package/src/assets/web-panel/assets/{Analytics-CGxvL_FI.js → Analytics-dsgvjCEQ.js} +3 -3
  8. package/src/assets/web-panel/assets/{AppLayout-bCPwz-5w.js → AppLayout-DWDH5Qbm.js} +5 -5
  9. package/src/assets/web-panel/assets/{Artifacts-2_BOWo6e.js → Artifacts-BD8S8kzU.js} +1 -1
  10. package/src/assets/web-panel/assets/{Audit-CBOruzgW.js → Audit-CDXv4Aoj.js} +1 -1
  11. package/src/assets/web-panel/assets/{BackgroundAgents-lg0IU5HN.js → BackgroundAgents-BLAQ5Uy0.js} +1 -1
  12. package/src/assets/web-panel/assets/{Backup-OspCi452.js → Backup-moPac6tF.js} +1 -1
  13. package/src/assets/web-panel/assets/{BaseInput-BMkliqlz.js → BaseInput-C_6nzsLU.js} +1 -1
  14. package/src/assets/web-panel/assets/{Chat-BfoiUZwp.js → Chat-cYuslkFG.js} +6 -6
  15. package/src/assets/web-panel/assets/{ChatBubbleRenderer-BjnfMwep.js → ChatBubbleRenderer-Ceh3MG6M.js} +1 -1
  16. package/src/assets/web-panel/assets/{Checkbox-jTMlkNQZ.js → Checkbox-Qjb-XOX_.js} +1 -1
  17. package/src/assets/web-panel/assets/{Codegen-CycyJcnU.js → Codegen-IYRWXlMA.js} +1 -1
  18. package/src/assets/web-panel/assets/{Col-BVWlReQj.js → Col-CsQ9jv8M.js} +1 -1
  19. package/src/assets/web-panel/assets/{Community-CKRHl4xK.js → Community-BbNmfTwe.js} +1 -1
  20. package/src/assets/web-panel/assets/{Compact-BtpfMdhT.js → Compact-SShDx-nr.js} +1 -1
  21. package/src/assets/web-panel/assets/{Compliance-DtHB1Ct1.js → Compliance-CLWhKIJp.js} +1 -1
  22. package/src/assets/web-panel/assets/{Cowork-D_8X7-RK.js → Cowork-D4tK9_s3.js} +2 -2
  23. package/src/assets/web-panel/assets/{Cron-DMCOyvEa.js → Cron-D7GnfQ1z.js} +2 -2
  24. package/src/assets/web-panel/assets/{Crosschain-CeHdsu7m.js → Crosschain-TG86SH3X.js} +1 -1
  25. package/src/assets/web-panel/assets/{DID-CL6mR6zX.js → DID-6pue0NCO.js} +2 -2
  26. package/src/assets/web-panel/assets/{Dashboard-oz9n6DC7.js → Dashboard-BwkJ29du.js} +2 -2
  27. package/src/assets/web-panel/assets/{Dropdown-CbWm8mWu.js → Dropdown-DEvpYDof.js} +1 -1
  28. package/src/assets/web-panel/assets/EmailListRenderer-CQj7UlKJ.js +1 -0
  29. package/src/assets/web-panel/assets/{EvolutionSettings-DPwqgRYm.js → EvolutionSettings-tpvPMM9W.js} +1 -1
  30. package/src/assets/web-panel/assets/{FamilyGuardDashboard-DkV4YMFj.js → FamilyGuardDashboard-CWYFW75O.js} +1 -1
  31. package/src/assets/web-panel/assets/{Federation-CpUKHIOH.js → Federation-gRIi96rM.js} +1 -1
  32. package/src/assets/web-panel/assets/{FormItemContext-C6KXRgjR.js → FormItemContext-B7Nr3YkV.js} +1 -1
  33. package/src/assets/web-panel/assets/{GenericCardRenderer-C5Y4L5E3.js → GenericCardRenderer-b1BgGgLT.js} +1 -1
  34. package/src/assets/web-panel/assets/{Git-CBwKdF8s.js → Git-Dis1jjO7.js} +2 -2
  35. package/src/assets/web-panel/assets/{Governance-Dt-OR7Aa.js → Governance-C4Yg99Am.js} +1 -1
  36. package/src/assets/web-panel/assets/{Inference-Czkl-Lhl.js → Inference-D4UQRbGu.js} +1 -1
  37. package/src/assets/web-panel/assets/{KnowledgeGraph-C7NE4949.js → KnowledgeGraph-Co_kLMAq.js} +1 -1
  38. package/src/assets/web-panel/assets/{Logs-CoAuZiMG.js → Logs-D4BRp7bg.js} +2 -2
  39. package/src/assets/web-panel/assets/{MarkdownRenderer-DTkjTwGI.js → MarkdownRenderer-Dgy8arQI.js} +1 -1
  40. package/src/assets/web-panel/assets/{Marketplace-IzrV-7zH.js → Marketplace-ys0j1vr9.js} +1 -1
  41. package/src/assets/web-panel/assets/{McpTools-DYEea7aS.js → McpTools-B3ZvRZe_.js} +2 -2
  42. package/src/assets/web-panel/assets/{Memory-Uqe7ZrV6.js → Memory-BOa0jbr-.js} +2 -2
  43. package/src/assets/web-panel/assets/{MobileBridge-D092EGyM.js → MobileBridge-CWJRmUbj.js} +1 -1
  44. package/src/assets/web-panel/assets/MobileProjects-7ty8vTpj.js +1 -0
  45. package/src/assets/web-panel/assets/{Mtc-gg4jzfB-.js → Mtc-CCcOk5m5.js} +5 -5
  46. package/src/assets/web-panel/assets/{MtcAudit-BibGfs71.js → MtcAudit-vlrrScbQ.js} +4 -4
  47. package/src/assets/web-panel/assets/{Multisig-BmB5yRXP.js → Multisig-C8K59S_8.js} +3 -3
  48. package/src/assets/web-panel/assets/{NLProgramming-BBSlPDyY.js → NLProgramming-oTpFYVme.js} +1 -1
  49. package/src/assets/web-panel/assets/{Notes-Bui3-KiC.js → Notes-BhqAJWiz.js} +3 -3
  50. package/src/assets/web-panel/assets/{NotificationSettings-ovXtbHe5.js → NotificationSettings-DCnV1CJM.js} +1 -1
  51. package/src/assets/web-panel/assets/{OrderTableRenderer-Bq-qD7eG.js → OrderTableRenderer-CZGnsrVW.js} +1 -1
  52. package/src/assets/web-panel/assets/{Organization-DacIY9oJ.js → Organization-DX1LuQlJ.js} +4 -4
  53. package/src/assets/web-panel/assets/{Overflow-CX8osheZ.js → Overflow-CbfKrFdT.js} +1 -1
  54. package/src/assets/web-panel/assets/{P2P-1lnikqVp.js → P2P-BEwYZuHL.js} +2 -2
  55. package/src/assets/web-panel/assets/{PdhVaultBrowser-DCrU-V6A.js → PdhVaultBrowser-YNmWbwd7.js} +3 -3
  56. package/src/assets/web-panel/assets/{Permissions-Dfcb6kM2.js → Permissions-DyZ18LiA.js} +4 -4
  57. package/src/assets/web-panel/assets/{PersonalDataHub-dvgai4hf.js → PersonalDataHub-B2J3aw2g.js} +4 -4
  58. package/src/assets/web-panel/assets/{Pipeline-nymAEtnK.js → Pipeline-CXl2ZlhQ.js} +1 -1
  59. package/src/assets/web-panel/assets/{Privacy-D0Vd91oM.js → Privacy-I5SDmgAp.js} +1 -1
  60. package/src/assets/web-panel/assets/{ProjectInit-BpUBcu7o.js → ProjectInit-Crl9tXw3.js} +2 -2
  61. package/src/assets/web-panel/assets/{ProjectSettings-DIzwTT-M.js → ProjectSettings-DCFtFlSK.js} +2 -2
  62. package/src/assets/web-panel/assets/{Projects-Den4RUw6.js → Projects-Do5BQq1i.js} +1 -1
  63. package/src/assets/web-panel/assets/{Providers-Cq8p-M0d.js → Providers-Cb7OWa3y.js} +1 -1
  64. package/src/assets/web-panel/assets/{QrScannerModal-DSmqOfYk.js → QrScannerModal-CJmhAU-s.js} +1 -1
  65. package/src/assets/web-panel/assets/{QuickAsk-BDHCeSnA.js → QuickAsk-Cu6lEWou.js} +1 -1
  66. package/src/assets/web-panel/assets/{Recommend-B_9M8oF4.js → Recommend-Crip3jLB.js} +1 -1
  67. package/src/assets/web-panel/assets/{RemoteSession-5ot4leHy.js → RemoteSession-KxYY-2CB.js} +3 -3
  68. package/src/assets/web-panel/assets/{Reputation-B3F013PY.js → Reputation-D0vN-htI.js} +1 -1
  69. package/src/assets/web-panel/assets/{Row-BMyBJnZw.js → Row-wqzd_xCD.js} +1 -1
  70. package/src/assets/web-panel/assets/{RssFeed-WmV0l52g.js → RssFeed-8lsPfb0a.js} +3 -3
  71. package/src/assets/web-panel/assets/{Search-Wl80yXnR.js → Search-C-e8qAeU.js} +1 -1
  72. package/src/assets/web-panel/assets/{Security-gbDMKb5m.js → Security-CMM9WgFy.js} +4 -4
  73. package/src/assets/web-panel/assets/{Services-Bx2Bjhah.js → Services-CZdxjN2B.js} +2 -2
  74. package/src/assets/web-panel/assets/{Skeleton-BvJNybjV.js → Skeleton-BI3XNk35.js} +1 -1
  75. package/src/assets/web-panel/assets/Skills-DMlsh9It.js +1 -0
  76. package/src/assets/web-panel/assets/{Sla-BM9gyZwc.js → Sla-HQruznKY.js} +1 -1
  77. package/src/assets/web-panel/assets/{SpeechSettings-Bu9FL9Tz.js → SpeechSettings-Dl-MFq3w.js} +1 -1
  78. package/src/assets/web-panel/assets/{SyncSettings-D8ICJsMt.js → SyncSettings-BU224vDm.js} +2 -2
  79. package/src/assets/web-panel/assets/Tasks-DESg3yCs.js +1 -0
  80. package/src/assets/web-panel/assets/{Templates-BJzpTD0W.js → Templates-Jb3TPz4Q.js} +1 -1
  81. package/src/assets/web-panel/assets/{Tenant-BN8eX4R2.js → Tenant-CQ-GTrfa.js} +1 -1
  82. package/src/assets/web-panel/assets/{Terminal-CjtP9bpq.js → Terminal-BbMl3Rue.js} +2 -2
  83. package/src/assets/web-panel/assets/{TimelineRenderer-CpNRa4XW.js → TimelineRenderer-CS_vstKF.js} +1 -1
  84. package/src/assets/web-panel/assets/{Tokens-2lNNvNAH.js → Tokens-BaopVl1f.js} +1 -1
  85. package/src/assets/web-panel/assets/{Trigger-DxtxXyPg.js → Trigger-DtnD4WUN.js} +1 -1
  86. package/src/assets/web-panel/assets/{Trust-CakzGeF9.js → Trust-CsvG4Tmf.js} +1 -1
  87. package/src/assets/web-panel/assets/{UkeySign-CvJeRXwV.js → UkeySign-C1-A-cOV.js} +1 -1
  88. package/src/assets/web-panel/assets/{VideoEditing-D80pMzcO.js → VideoEditing-CNgJPdSL.js} +1 -1
  89. package/src/assets/web-panel/assets/{Wallet-BF-VOBmZ.js → Wallet-CdF41501.js} +4 -4
  90. package/src/assets/web-panel/assets/{WebAuthn-DXyoAzE_.js → WebAuthn-D-JmxD5g.js} +4 -4
  91. package/src/assets/web-panel/assets/{WorkflowEditor-X6CDxzrF.js → WorkflowEditor-C0XunR13.js} +1 -1
  92. package/src/assets/web-panel/assets/{chat-BcUhqjeA.js → chat-BBAZpD_G.js} +1 -1
  93. package/src/assets/web-panel/assets/{colors-Dw4bKaCm.js → colors-BxSxO5BX.js} +1 -1
  94. package/src/assets/web-panel/assets/{compact-item-BWhu5Eri.js → compact-item-BoxL8pg5.js} +1 -1
  95. package/src/assets/web-panel/assets/{createContext-BLJ9JKoN.js → createContext-W5JAyZmY.js} +1 -1
  96. package/src/assets/web-panel/assets/devWarning-BI5TZ7EX.js +1 -0
  97. package/src/assets/web-panel/assets/{hasIn-DIkCiJbt.js → hasIn-HpiKDPVC.js} +1 -1
  98. package/src/assets/web-panel/assets/index-9-JLDK5n.js +1 -0
  99. package/src/assets/web-panel/assets/{index-BAwcMKaD.js → index-9caMEwQ-.js} +1 -1
  100. package/src/assets/web-panel/assets/{index-0mHbawfQ.js → index-B05_YRHZ.js} +1 -1
  101. package/src/assets/web-panel/assets/index-B7m8ioaQ.js +1 -0
  102. package/src/assets/web-panel/assets/{index-D3wp_jgy.js → index-B9VxE1C-.js} +1 -1
  103. package/src/assets/web-panel/assets/{index-BotMuGS2.js → index-BA3WWQAT.js} +1 -1
  104. package/src/assets/web-panel/assets/{index-LOsZYbic.js → index-BSJ0cAle.js} +1 -1
  105. package/src/assets/web-panel/assets/{index-C5qms36i.js → index-BW4PP5GN.js} +1 -1
  106. package/src/assets/web-panel/assets/{index-CDfB6hWf.js → index-BZAbaY64.js} +1 -1
  107. package/src/assets/web-panel/assets/{index-BipG-tDs.js → index-Ba4usRFM.js} +1 -1
  108. package/src/assets/web-panel/assets/{index-CgsVg5Up.js → index-BgMViZIY.js} +1 -1
  109. package/src/assets/web-panel/assets/{index-CTPoBbIR.js → index-BtFAEG08.js} +1 -1
  110. package/src/assets/web-panel/assets/{index-DKzG3kBM.js → index-Bwn6k_qw.js} +1 -1
  111. package/src/assets/web-panel/assets/{index-PRYboDFm.js → index-C4uI7WCB.js} +1 -1
  112. package/src/assets/web-panel/assets/{index-DQbWGvE4.js → index-C5kqii-G.js} +1 -1
  113. package/src/assets/web-panel/assets/{index-B1fufz1A.js → index-C7GIUWWF.js} +1 -1
  114. package/src/assets/web-panel/assets/{index-DjEP26Te.js → index-CM_gdohF.js} +1 -1
  115. package/src/assets/web-panel/assets/{index-BcTch6Fp.js → index-CRg3aOoj.js} +1 -1
  116. package/src/assets/web-panel/assets/{index-04SKBH8l.js → index-CcyzZloJ.js} +1 -1
  117. package/src/assets/web-panel/assets/{index-DHLW27Je.js → index-CehxfRUR.js} +1 -1
  118. package/src/assets/web-panel/assets/{index-5vzPcr1g.js → index-D6m6B4Wy.js} +1 -1
  119. package/src/assets/web-panel/assets/{index-DV4FSjmI.js → index-DSyfxxQS.js} +3 -3
  120. package/src/assets/web-panel/assets/{index-D5vFJmmX.js → index-DaJk9U9V.js} +1 -1
  121. package/src/assets/web-panel/assets/{index-BxLDNxEQ.js → index-DcmAiq_Y.js} +1 -1
  122. package/src/assets/web-panel/assets/{index-D-Erv8A9.js → index-DdEcQ1rp.js} +1 -1
  123. package/src/assets/web-panel/assets/{index-CqGqoID5.js → index-DinY7IQa.js} +1 -1
  124. package/src/assets/web-panel/assets/{index-BGMzh2oj.js → index-DkSnlgK_.js} +1 -1
  125. package/src/assets/web-panel/assets/{index-BxfimJOH.js → index-DlPvZgv8.js} +1 -1
  126. package/src/assets/web-panel/assets/{index-DOjQi7oU.js → index-DuM9I1If.js} +1 -1
  127. package/src/assets/web-panel/assets/{index-uMtx6e3D.js → index-DwidpDEE.js} +1 -1
  128. package/src/assets/web-panel/assets/{index-CXJ8t1hK.js → index-IO2I7nzu.js} +1 -1
  129. package/src/assets/web-panel/assets/{index-Cmc7qH2C.js → index-JrMBRi62.js} +1 -1
  130. package/src/assets/web-panel/assets/{index-BaStonJm.js → index-QzlEbtRL.js} +1 -1
  131. package/src/assets/web-panel/assets/{index-Cr05twNa.js → index-V6VIJe2N.js} +1 -1
  132. package/src/assets/web-panel/assets/{index-BGFqk1-E.js → index-_38IJqoP.js} +1 -1
  133. package/src/assets/web-panel/assets/{index-u0tqS0iq.js → index-_p4e3KfB.js} +1 -1
  134. package/src/assets/web-panel/assets/{index-D1r2R4a-.js → index-gvfIRZxJ.js} +1 -1
  135. package/src/assets/web-panel/assets/{index-CFGOV-YT.js → index-ooP1pQCt.js} +1 -1
  136. package/src/assets/web-panel/assets/{index-BUC4TZWg.js → index-p6rNtYud.js} +1 -1
  137. package/src/assets/web-panel/assets/{initDefaultProps-Bx6Hj_FG.js → initDefaultProps-Dfn6M05J.js} +1 -1
  138. package/src/assets/web-panel/assets/{motion-BSWivB70.js → motion-BRRwFqGO.js} +1 -1
  139. package/src/assets/web-panel/assets/{move-Dv1Pg9R7.js → move-DpDPN6zR.js} +1 -1
  140. package/src/assets/web-panel/assets/{mtc-parser-Bqtl8fsk.js → mtc-parser-BHlSE87F.js} +1 -1
  141. package/src/assets/web-panel/assets/{omit-DpOBjOSQ.js → omit-CEOri_L5.js} +1 -1
  142. package/src/assets/web-panel/assets/{pickAttrs-D-M-dz48.js → pickAttrs-DqICh-ad.js} +1 -1
  143. package/src/assets/web-panel/assets/{placementArrow-DsTLAifk.js → placementArrow-DQizFFiV.js} +1 -1
  144. package/src/assets/web-panel/assets/{responsiveObserve-BVTetMpc.js → responsiveObserve-DmFHPdvC.js} +1 -1
  145. package/src/assets/web-panel/assets/{slide-abEcz-Cv.js → slide-s2s1XS3T.js} +1 -1
  146. package/src/assets/web-panel/assets/{statusUtils-CBhrdU2G.js → statusUtils-IwEIbBan.js} +1 -1
  147. package/src/assets/web-panel/assets/{styleChecker-CFq8ZCKa.js → styleChecker-CIFLlbXH.js} +1 -1
  148. package/src/assets/web-panel/assets/{useFlexGapSupport-o4eE7fDV.js → useFlexGapSupport-CFkN2Cgh.js} +1 -1
  149. package/src/assets/web-panel/assets/{useFs-Hs9W8ihi.js → useFs-BSY6O48s.js} +1 -1
  150. package/src/assets/web-panel/assets/{usePersonalDataHub-Bnet5Jho.js → usePersonalDataHub-iJl3VnU0.js} +1 -1
  151. package/src/assets/web-panel/assets/{vnode-DJfN4kWs.js → vnode-vu8ReMs7.js} +1 -1
  152. package/src/assets/web-panel/assets/{zoom-BzV-2e7X.js → zoom-CeSrYAHp.js} +1 -1
  153. package/src/assets/web-panel/index.html +1 -1
  154. package/src/command-help-index.json +2 -2
  155. package/src/commands/agent.js +20 -20
  156. package/src/commands/goal.js +299 -1
  157. package/src/commands/plugin.js +129 -68
  158. package/src/constants.js +2 -2
  159. package/src/data/changelog.json +29 -3
  160. package/src/harness/jsonl-session-store.js +128 -5
  161. package/src/harness/prompt-compressor.js +18 -10
  162. package/src/harness/structured-handoff.js +151 -13
  163. package/src/lib/agent-session-export.js +20 -0
  164. package/src/lib/background-agent-supervisor.js +54 -0
  165. package/src/lib/cli-goal-catalog.js +129 -0
  166. package/src/lib/cli-goal-source.js +119 -0
  167. package/src/lib/coding-task-guidance.js +2 -1
  168. package/src/lib/config-schema.js +1 -1
  169. package/src/lib/context-memory-kernel/live-compaction.js +75 -12
  170. package/src/lib/eval/stream-terminal.js +27 -2
  171. package/src/lib/evolution/evolution-artifact-ports.js +22 -11
  172. package/src/lib/evolution/evolution-file-witness.js +86 -63
  173. package/src/lib/evolution/evolution-ledger-file-backend.js +22 -0
  174. package/src/lib/evolution/evolution-ledger-file-manifest-catalog.js +34 -35
  175. package/src/lib/evolution/evolution-ledger-file-manifest-head-store.js +32 -39
  176. package/src/lib/evolution/evolution-ledger.js +367 -169
  177. package/src/lib/evolution/evolution-manifest-state-reader.js +58 -0
  178. package/src/lib/evolution/evolution-physical-state-reader.js +308 -0
  179. package/src/lib/evolution/evolution-witness-segments.js +12 -13
  180. package/src/lib/evolution/governed-wiki-pruning-ledger-adapter.js +82 -56
  181. package/src/lib/evolution/rrsi-observed-text-index.js +17 -1
  182. package/src/lib/evolution/rrsi-tenant-index-anchor-history.js +5 -0
  183. package/src/lib/execution-location-failure-site.js +20 -3
  184. package/src/lib/goal-store.js +8 -1
  185. package/src/lib/image-input.js +43 -14
  186. package/src/lib/llm-providers.js +1 -0
  187. package/src/lib/plugin-runtime/capabilities.js +10 -0
  188. package/src/lib/plugin-runtime/cli-goal-draft-request.js +138 -0
  189. package/src/lib/plugin-runtime/cli-goal-drafts.js +413 -0
  190. package/src/lib/plugin-runtime/cli-goal-extension-host.js +234 -0
  191. package/src/lib/plugin-runtime/examples/goal-description-drafter/plugin.json +17 -0
  192. package/src/lib/plugin-runtime/examples/goal-evidence-viewer/plugin.json +25 -0
  193. package/src/lib/plugin-runtime/examples/goal-progress-viewer/plugin.json +21 -0
  194. package/src/lib/plugin-runtime/examples/project-delivery-assistant/plugin.json +38 -0
  195. package/src/lib/plugin-runtime/goal-extension-contract.js +190 -0
  196. package/src/lib/plugin-runtime/goal-extensions.js +277 -0
  197. package/src/lib/plugin-runtime/install.js +40 -40
  198. package/src/lib/plugin-runtime/manifest.js +12 -0
  199. package/src/lib/plugin-runtime/policy.js +1 -0
  200. package/src/lib/project-goal-connection.js +225 -0
  201. package/src/lib/project-goal-draft-connection.js +217 -0
  202. package/src/lib/read-file-loop-guard.js +124 -8
  203. package/src/lib/session-host-snapshot.js +3 -0
  204. package/src/lib/session-message-provenance.js +24 -5
  205. package/src/lib/session-tool-round.js +39 -0
  206. package/src/lib/session-transcript-history.js +2 -0
  207. package/src/lib/session-transcript-page.js +4 -1
  208. package/src/lib/session-transcript-structure.js +4 -0
  209. package/src/lib/task-model-selector.js +1 -1
  210. package/src/repl/agent-repl.js +14 -7
  211. package/src/repl/config-summary.js +1 -1
  212. package/src/runtime/__tests__/message-roles.test.js +29 -0
  213. package/src/runtime/agent-core.js +116 -44
  214. package/src/runtime/headless-runner.js +191 -34
  215. package/src/runtime/headless-stream.js +144 -48
  216. package/src/runtime/message-roles.js +43 -0
  217. package/src/runtime/policies/agent-policy.js +1 -0
  218. package/src/workers/background-agent-worker.js +146 -47
  219. package/src/assets/web-panel/assets/EmailListRenderer-DXlmbC45.js +0 -1
  220. package/src/assets/web-panel/assets/MobileProjects-CwA1VoVJ.js +0 -1
  221. package/src/assets/web-panel/assets/Skills-Tz4rQcDp.js +0 -1
  222. package/src/assets/web-panel/assets/Tasks-B6MowBDo.js +0 -1
  223. package/src/assets/web-panel/assets/devWarning-D_MJgDGJ.js +0 -1
  224. package/src/assets/web-panel/assets/index-BP8log78.js +0 -1
  225. package/src/assets/web-panel/assets/index-PexF9zYf.js +0 -1
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "goal-progress-viewer",
3
+ "version": "0.1.0",
4
+ "description": "Read-only summary of an explicitly selected standalone CLI goal",
5
+ "permissions": { "goalExtension": ["panel:goal.summary"] },
6
+ "goalExtension": {
7
+ "apiVersion": "1.0.0",
8
+ "hosts": { "cli": ">=0.166.104" },
9
+ "events": [],
10
+ "panels": [
11
+ {
12
+ "id": "goal-progress",
13
+ "title": "Goal progress",
14
+ "slot": "goal.summary",
15
+ "fields": ["objective", "status"],
16
+ "fallback": "text"
17
+ }
18
+ ],
19
+ "proposals": []
20
+ }
21
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "project-delivery-assistant",
3
+ "version": "0.1.0",
4
+ "description": "Declarative project delivery assistant prototype; requires a goal extension host adapter",
5
+ "permissions": {
6
+ "goalExtension": [
7
+ "event:goal.status.changed",
8
+ "event:risk.review.completed",
9
+ "event:action.receipt.updated",
10
+ "panel:goal.evidence",
11
+ "proposal:task.create",
12
+ "proposal:task.description.update"
13
+ ]
14
+ },
15
+ "goalExtension": {
16
+ "apiVersion": "1.0.0",
17
+ "hosts": {
18
+ "cli": ">=0.166.104",
19
+ "vscode": ">=0.37.149",
20
+ "jetbrains": ">=0.4.166"
21
+ },
22
+ "events": [
23
+ "goal.status.changed",
24
+ "risk.review.completed",
25
+ "action.receipt.updated"
26
+ ],
27
+ "panels": [
28
+ {
29
+ "id": "delivery-evidence",
30
+ "title": "Project delivery evidence",
31
+ "slot": "goal.evidence",
32
+ "fields": ["objective", "status", "riskSummary", "receiptSummary"],
33
+ "fallback": "text"
34
+ }
35
+ ],
36
+ "proposals": ["task.create", "task.description.update"]
37
+ }
38
+ }
@@ -0,0 +1,190 @@
1
+ /** DMM-07: data-only declarations. Compatibility never grants execution. */
2
+ import semver from "semver";
3
+
4
+ export const GOAL_EXTENSION_API_VERSION = "1.0.0";
5
+ export const GOAL_EXTENSION_HOSTS = Object.freeze([
6
+ "cli",
7
+ "vscode",
8
+ "jetbrains",
9
+ "desktop",
10
+ ]);
11
+ export const GOAL_EXTENSION_EVENTS = Object.freeze([
12
+ "goal.status.changed",
13
+ "risk.review.completed",
14
+ "action.receipt.updated",
15
+ ]);
16
+ export const GOAL_EXTENSION_SLOTS = Object.freeze([
17
+ "goal.summary",
18
+ "goal.evidence",
19
+ "goal.actions",
20
+ ]);
21
+ export const GOAL_EXTENSION_PROPOSALS = Object.freeze([
22
+ "task.create",
23
+ "task.description.update",
24
+ ]);
25
+ const PANEL_FIELDS = ["objective", "status", "riskSummary", "receiptSummary"];
26
+
27
+ function object(value, keys, label) {
28
+ if (!value || typeof value !== "object" || Array.isArray(value))
29
+ throw new Error(`${label} must be an object`);
30
+ for (const key of Object.keys(value)) {
31
+ if (!keys.includes(key))
32
+ throw new Error(`${label}: unsupported field ${key}`);
33
+ }
34
+ }
35
+
36
+ function text(value, label, max = 128) {
37
+ if (
38
+ typeof value !== "string" ||
39
+ !value.trim() ||
40
+ value.length > max ||
41
+ /[\u0000-\u001f\u007f]/.test(value)
42
+ )
43
+ throw new Error(`${label} must be non-empty text (max ${max})`);
44
+ return value;
45
+ }
46
+
47
+ function list(value, allowed, label) {
48
+ if (
49
+ !Array.isArray(value) ||
50
+ value.length > 16 ||
51
+ value.some((entry) => !allowed.includes(entry)) ||
52
+ new Set(value).size !== value.length
53
+ )
54
+ throw new Error(
55
+ `${label} must be a unique list of supported values (max 16)`,
56
+ );
57
+ return [...value];
58
+ }
59
+
60
+ export function requiredGoalExtensionCapabilities(extension) {
61
+ return [
62
+ ...new Set([
63
+ ...extension.events.map((event) => `event:${event}`),
64
+ ...extension.panels.map((panel) => `panel:${panel.slot}`),
65
+ ...extension.proposals.map((action) => `proposal:${action}`),
66
+ ]),
67
+ ].sort();
68
+ }
69
+
70
+ /** Unknown fields include code entrypoints, approval claims and receipt writers. */
71
+ export function normalizeGoalExtension(raw, permissions) {
72
+ if (raw === undefined) return null;
73
+ object(
74
+ raw,
75
+ ["apiVersion", "hosts", "events", "panels", "proposals"],
76
+ "goalExtension",
77
+ );
78
+ const apiVersion = text(raw.apiVersion, "goalExtension.apiVersion");
79
+ if (!semver.valid(apiVersion))
80
+ throw new Error("goalExtension.apiVersion must be semver");
81
+ object(raw.hosts, GOAL_EXTENSION_HOSTS, "goalExtension.hosts");
82
+ if (!Object.keys(raw.hosts).length)
83
+ throw new Error("goalExtension.hosts must declare a host");
84
+ const hosts = {};
85
+ for (const [host, range] of Object.entries(raw.hosts)) {
86
+ text(range, `goalExtension.hosts.${host}`);
87
+ if (!semver.validRange(range))
88
+ throw new Error(`goalExtension.hosts.${host} must be a semver range`);
89
+ hosts[host] = range;
90
+ }
91
+ const events = list(
92
+ raw.events ?? [],
93
+ GOAL_EXTENSION_EVENTS,
94
+ "goalExtension.events",
95
+ );
96
+ const proposals = list(
97
+ raw.proposals ?? [],
98
+ GOAL_EXTENSION_PROPOSALS,
99
+ "goalExtension.proposals",
100
+ );
101
+ if (!Array.isArray(raw.panels ?? []) || (raw.panels ?? []).length > 16)
102
+ throw new Error("goalExtension.panels must be a list (max 16)");
103
+ const ids = new Set();
104
+ const panels = (raw.panels ?? []).map((panel) => {
105
+ object(
106
+ panel,
107
+ ["id", "title", "slot", "fields", "fallback"],
108
+ "goalExtension.panel",
109
+ );
110
+ const id = text(panel.id, "goalExtension.panel.id", 64);
111
+ if (!/^[a-z][a-z0-9-]*$/.test(id) || ids.has(id))
112
+ throw new Error("goalExtension.panel.id must be unique kebab-case");
113
+ ids.add(id);
114
+ if (!GOAL_EXTENSION_SLOTS.includes(panel.slot))
115
+ throw new Error("goalExtension.panel.slot is unsupported");
116
+ if (panel.fallback !== "text")
117
+ throw new Error("goalExtension.panel.fallback must be text");
118
+ return {
119
+ id,
120
+ title: text(panel.title, "goalExtension.panel.title"),
121
+ slot: panel.slot,
122
+ fields: list(panel.fields, PANEL_FIELDS, "goalExtension.panel.fields"),
123
+ fallback: "text",
124
+ };
125
+ });
126
+ const extension = { apiVersion, hosts, events, panels, proposals };
127
+ const allowed = [
128
+ ...GOAL_EXTENSION_EVENTS.map((event) => `event:${event}`),
129
+ ...GOAL_EXTENSION_SLOTS.map((slot) => `panel:${slot}`),
130
+ ...GOAL_EXTENSION_PROPOSALS.map((action) => `proposal:${action}`),
131
+ ];
132
+ // Validate RAW permissions: permissive legacy coercion cannot admit this API.
133
+ object(permissions, Object.keys(permissions || {}), "permissions");
134
+ const grants = list(
135
+ permissions.goalExtension,
136
+ allowed,
137
+ "permissions.goalExtension",
138
+ );
139
+ for (const required of requiredGoalExtensionCapabilities(extension)) {
140
+ if (!grants.includes(required))
141
+ throw new Error(
142
+ `goalExtension requires permissions.goalExtension: ${required}`,
143
+ );
144
+ }
145
+ return extension;
146
+ }
147
+
148
+ /** Pure version/capability check; callers must still check current authorization. */
149
+ export function checkGoalExtensionCompatibility(extension, host = {}) {
150
+ if (!extension) return { compatible: false, reason: "legacy_unsupported" };
151
+ if (!semver.eq(extension.apiVersion, GOAL_EXTENSION_API_VERSION))
152
+ return { compatible: false, reason: "unsupported_api" };
153
+ if (!Object.hasOwn(extension.hosts, host.id))
154
+ return { compatible: false, reason: "unsupported_host" };
155
+ if (
156
+ !semver.valid(host.version) ||
157
+ !semver.satisfies(host.version, extension.hosts[host.id])
158
+ )
159
+ return { compatible: false, reason: "host_version_mismatch" };
160
+ const supported = Array.isArray(host.capabilities) ? host.capabilities : [];
161
+ const missing = requiredGoalExtensionCapabilities(extension).filter(
162
+ (cap) => !supported.includes(cap),
163
+ );
164
+ return missing.length
165
+ ? { compatible: false, reason: "unsupported_capabilities", missing }
166
+ : { compatible: true, reason: "compatible" };
167
+ }
168
+
169
+ /** Safe management summary; never an admission token or a claim of a live host. */
170
+ export function summarizeGoalExtension(manifest) {
171
+ const extension = manifest?.goalExtension;
172
+ if (!extension)
173
+ return {
174
+ status: manifest?.goalExtensionDeclared ? "invalid" : "legacy",
175
+ runtimeAvailable: false,
176
+ };
177
+ return {
178
+ status: "declaration-only",
179
+ runtimeAvailable: false,
180
+ apiVersion: extension.apiVersion,
181
+ apiCompatible: semver.eq(extension.apiVersion, GOAL_EXTENSION_API_VERSION),
182
+ hosts: { ...extension.hosts },
183
+ events: [...extension.events],
184
+ panels: extension.panels.map((panel) => ({
185
+ ...panel,
186
+ fields: [...panel.fields],
187
+ })),
188
+ proposals: [...extension.proposals],
189
+ };
190
+ }
@@ -0,0 +1,277 @@
1
+ import {
2
+ goalExtensionRef as goalRef,
3
+ normalizeGoalExtensionProposal,
4
+ } from "@chainlesschain/session-core/goal-extension-proposal-contract";
5
+ /**
6
+ * DMM-07 host boundary. Only trusted host code calls this module; plugins supply
7
+ * declarations, never callbacks. Re-discover for every delivery/proposal so a
8
+ * retained session cannot outlive disable, uninstall, policy or consent changes.
9
+ */
10
+ import { discoverPlugins } from "./scopes.js";
11
+ import { loadManagedPluginPolicy, filterByManagedPolicy } from "./policy.js";
12
+ import { isPluginTrusted } from "./trust.js";
13
+ import { isPluginCapabilityConsented } from "./capability-consent.js";
14
+ import { checkGoalExtensionCompatibility } from "./goal-extension-contract.js";
15
+ import path from "node:path";
16
+ import { managedSettingsPath } from "../settings-loader.cjs";
17
+
18
+ export const _deps = {
19
+ discoverPlugins,
20
+ loadManagedPluginPolicy,
21
+ filterByManagedPolicy,
22
+ isPluginTrusted,
23
+ isPluginCapabilityConsented,
24
+ };
25
+
26
+ function fixedHostOptions(options) {
27
+ const env = Object.freeze({ ...(options.env || process.env) });
28
+ return Object.freeze({
29
+ cwd: path.resolve(options.cwd || process.cwd()),
30
+ env,
31
+ managedSettingsFile: managedSettingsPath({
32
+ env,
33
+ managedSettingsFile: options.managedSettingsFile,
34
+ }),
35
+ host: Object.freeze({
36
+ id: options.host?.id,
37
+ version: options.host?.version,
38
+ capabilities: Object.freeze([...(options.host?.capabilities || [])]),
39
+ }),
40
+ authorize: options.authorize,
41
+ readEvent: options.readEvent,
42
+ readPanel: options.readPanel,
43
+ enqueueProposal: options.enqueueProposal,
44
+ });
45
+ }
46
+
47
+ /** Compatibility and mandatory consent are independent of legacy policy flags. */
48
+ export function collectGoalExtensions(options = {}) {
49
+ const extensions = [];
50
+ const dropped = [];
51
+ try {
52
+ const { cwd, env, managedSettingsFile, host } = fixedHostOptions(options);
53
+ const managed = _deps.loadManagedPluginPolicy({
54
+ env,
55
+ managedSettingsFile,
56
+ fresh: true,
57
+ });
58
+ const plugins = _deps.discoverPlugins({
59
+ cwd,
60
+ env,
61
+ managedSettingsFile,
62
+ skipPolicy: true,
63
+ includeDisabled: true,
64
+ includeBlocked: true,
65
+ });
66
+ for (const plugin of plugins) {
67
+ let reason = null;
68
+ try {
69
+ if (plugin.runtimeBlocked || plugin.manifest?.ok !== true)
70
+ reason = "invalid_plugin";
71
+ else if (plugin.enabled === false) reason = "disabled";
72
+ else if (!_deps.filterByManagedPolicy([plugin], managed).kept.length)
73
+ reason = "policy_blocked";
74
+ else {
75
+ const compatibility = checkGoalExtensionCompatibility(
76
+ plugin.manifest.goalExtension,
77
+ host,
78
+ );
79
+ if (!compatibility.compatible) reason = compatibility.reason;
80
+ else if (plugin.manifest.capabilitiesDeclared !== true)
81
+ reason = "capabilities_undeclared";
82
+ else if (
83
+ !_deps.isPluginTrusted({
84
+ ...plugin,
85
+ workspaceRoot: cwd || process.cwd(),
86
+ })
87
+ )
88
+ reason = "untrusted";
89
+ else if (
90
+ !_deps.isPluginCapabilityConsented(
91
+ plugin,
92
+ plugin.manifest.capabilities,
93
+ )
94
+ )
95
+ reason = "consent_required";
96
+ }
97
+ } catch {
98
+ reason = "authorization_unavailable";
99
+ }
100
+ if (reason)
101
+ dropped.push({ name: plugin.name, scope: plugin.scope, reason });
102
+ else
103
+ extensions.push({
104
+ name: plugin.name,
105
+ scope: plugin.scope,
106
+ version: plugin.version,
107
+ declaration: JSON.parse(
108
+ JSON.stringify(plugin.manifest.goalExtension),
109
+ ),
110
+ });
111
+ }
112
+ } catch {
113
+ // Management I/O failure is never permission to continue with old state.
114
+ return { extensions: [], dropped: [{ reason: "discovery_unavailable" }] };
115
+ }
116
+ return { extensions, dropped };
117
+ }
118
+
119
+ function admittedPlugin(ref, options, kind, value) {
120
+ const plugin = collectGoalExtensions(options).extensions.find(
121
+ (entry) =>
122
+ entry.name === ref?.name &&
123
+ entry.scope === ref?.scope &&
124
+ entry.version === ref?.version,
125
+ );
126
+ if (!plugin) throw new Error("goal extension is not currently admitted");
127
+ if (kind && !plugin.declaration[kind].includes(value))
128
+ throw new Error(`goal extension ${kind} is undeclared`);
129
+ return plugin;
130
+ }
131
+
132
+ async function authorize(callback, context) {
133
+ if (typeof callback !== "function" || (await callback(context)) !== true)
134
+ throw new Error("goal extension source authorization denied");
135
+ }
136
+
137
+ /** Deliver a bounded read-only view, checking source access again after I/O. */
138
+ export async function projectGoalExtensionEvent(ref, request, options = {}) {
139
+ options = fixedHostOptions(options);
140
+ const type = request?.type;
141
+ const plugin = admittedPlugin(ref, options, "events", type);
142
+ const source = goalRef(request.goalRef);
143
+ const context = Object.freeze({
144
+ plugin: Object.freeze({
145
+ name: plugin.name,
146
+ scope: plugin.scope,
147
+ version: plugin.version,
148
+ }),
149
+ goalRef: source,
150
+ operation: "read-event",
151
+ type,
152
+ });
153
+ await authorize(options.authorize, context);
154
+ if (typeof options.readEvent !== "function")
155
+ throw new Error("host event reader unavailable");
156
+ const data = await options.readEvent(context);
157
+ await authorize(options.authorize, context);
158
+ admittedPlugin(context.plugin, options, "events", type);
159
+ // The host reader owns object access. Never spread raw goal/memory/receipt data.
160
+ if (
161
+ !data ||
162
+ typeof data.summary !== "string" ||
163
+ data.summary.length > 4096 ||
164
+ typeof data.occurredAt !== "string" ||
165
+ data.occurredAt.length > 64 ||
166
+ !Number.isFinite(Date.parse(data.occurredAt))
167
+ )
168
+ throw new Error("invalid host event projection");
169
+ return Object.freeze({
170
+ type,
171
+ goalRef: source,
172
+ summary: data.summary,
173
+ occurredAt: data.occurredAt,
174
+ });
175
+ }
176
+
177
+ /** Fixed-slot UI has a plain-text fallback; extensions cannot supply markup. */
178
+ export async function projectGoalExtensionPanel(ref, request, options = {}) {
179
+ options = fixedHostOptions(options);
180
+ const plugin = admittedPlugin(ref, options);
181
+ const panel = plugin.declaration.panels.find(
182
+ (entry) => entry.id === request?.panelId,
183
+ );
184
+ if (!panel) throw new Error("goal extension panel is undeclared");
185
+ const source = goalRef(request.goalRef);
186
+ const context = Object.freeze({
187
+ plugin: Object.freeze({
188
+ name: plugin.name,
189
+ scope: plugin.scope,
190
+ version: plugin.version,
191
+ }),
192
+ goalRef: source,
193
+ operation: "read-panel",
194
+ panel: Object.freeze({
195
+ ...panel,
196
+ fields: Object.freeze([...panel.fields]),
197
+ }),
198
+ });
199
+ await authorize(options.authorize, context);
200
+ if (typeof options.readPanel !== "function")
201
+ throw new Error("host panel reader unavailable");
202
+ const data = await options.readPanel(context);
203
+ await authorize(options.authorize, context);
204
+ const current = admittedPlugin(context.plugin, options);
205
+ if (
206
+ !current.declaration.panels.some(
207
+ (entry) => JSON.stringify(entry) === JSON.stringify(panel),
208
+ )
209
+ )
210
+ throw new Error("goal extension panel changed during projection");
211
+ const lines = [panel.title];
212
+ for (const field of panel.fields) {
213
+ if (typeof data?.[field] !== "string" || data[field].length > 4096)
214
+ throw new Error(`invalid host panel field ${field}`);
215
+ lines.push(`${field}: ${data[field]}`);
216
+ }
217
+ return Object.freeze({
218
+ id: panel.id,
219
+ slot: panel.slot,
220
+ format: "text",
221
+ text: lines.join("\n"),
222
+ });
223
+ }
224
+
225
+ /** Queue an unapproved proposal through a host adapter; no action execution API. */
226
+ export async function proposeGoalExtensionAction(ref, raw, options = {}) {
227
+ options = fixedHostOptions(options);
228
+ const plugin = admittedPlugin(ref, options);
229
+ raw = normalizeGoalExtensionProposal(raw);
230
+ if (!plugin.declaration.proposals.includes(raw.type))
231
+ throw new Error("goal extension proposal is undeclared");
232
+ const source = raw.goalRef;
233
+ const title = raw.title;
234
+ const description = raw.description;
235
+ const context = Object.freeze({
236
+ plugin: Object.freeze({
237
+ name: plugin.name,
238
+ scope: plugin.scope,
239
+ version: plugin.version,
240
+ }),
241
+ goalRef: source,
242
+ operation: "propose-action",
243
+ type: raw.type,
244
+ sourceRef: raw.sourceRef,
245
+ requestId: raw.requestId,
246
+ });
247
+ await authorize(options.authorize, context);
248
+ if (typeof options.enqueueProposal !== "function")
249
+ throw new Error("host proposal queue unavailable");
250
+ admittedPlugin(context.plugin, options, "proposals", context.type);
251
+ // The host queue must revalidate source revision/control generation in its
252
+ // transaction, and deduplicate requestId within plugin/version/goal identity.
253
+ // It stores a pending suggestion; native confirmation stays later.
254
+ const result = await options.enqueueProposal(
255
+ Object.freeze({
256
+ ...context,
257
+ title,
258
+ description,
259
+ state: "pending-confirmation",
260
+ }),
261
+ );
262
+ if (
263
+ !result ||
264
+ typeof result !== "object" ||
265
+ Array.isArray(result) ||
266
+ Object.keys(result).some((key) => !["proposalId", "state"].includes(key)) ||
267
+ result.state !== "pending-confirmation" ||
268
+ typeof result.proposalId !== "string" ||
269
+ !result.proposalId ||
270
+ result.proposalId.length > 256
271
+ )
272
+ throw new Error("invalid host proposal receipt");
273
+ return Object.freeze({
274
+ proposalId: result.proposalId,
275
+ state: "pending-confirmation",
276
+ });
277
+ }
@@ -17,6 +17,7 @@
17
17
  */
18
18
 
19
19
  import fs from "fs";
20
+ import { summarizeGoalExtension } from "./goal-extension-contract.js";
20
21
  import os from "os";
21
22
  import path from "path";
22
23
  import crypto from "node:crypto";
@@ -2115,6 +2116,7 @@ export function listInstalled(opts = {}) {
2115
2116
  scope: p.scope,
2116
2117
  dir: p.root,
2117
2118
  ok: p.manifest?.ok === true,
2119
+ goalExtension: summarizeGoalExtension(p.manifest),
2118
2120
  enabled: p.enabled !== false,
2119
2121
  runtimeBlocked: p.runtimeBlocked === true,
2120
2122
  activePointer: {
@@ -3388,17 +3390,17 @@ function sameSourceAuthority(current, candidate) {
3388
3390
  if (current.type === "registry") {
3389
3391
  return Boolean(
3390
3392
  current.sourceDigest &&
3391
- candidate.sourceDigest &&
3392
- current.sourceDigest === candidate.sourceDigest &&
3393
- current.resolvedSourceDigest &&
3394
- candidate.resolvedSourceDigest &&
3395
- current.resolvedSourceDigest === candidate.resolvedSourceDigest,
3393
+ candidate.sourceDigest &&
3394
+ current.sourceDigest === candidate.sourceDigest &&
3395
+ current.resolvedSourceDigest &&
3396
+ candidate.resolvedSourceDigest &&
3397
+ current.resolvedSourceDigest === candidate.resolvedSourceDigest,
3396
3398
  );
3397
3399
  }
3398
3400
  return Boolean(
3399
3401
  current.sourceDigest &&
3400
- candidate.sourceDigest &&
3401
- current.sourceDigest === candidate.sourceDigest,
3402
+ candidate.sourceDigest &&
3403
+ current.sourceDigest === candidate.sourceDigest,
3402
3404
  );
3403
3405
  }
3404
3406
 
@@ -3661,11 +3663,7 @@ function normalizeSourceMetadata(value) {
3661
3663
  value.resolvedSource,
3662
3664
  catalogAuthority.commandSource,
3663
3665
  )
3664
- : pluginSourceAuthorityDigest(
3665
- value.resolvedSource,
3666
- "git",
3667
- value.ref,
3668
- )
3666
+ : pluginSourceAuthorityDigest(value.resolvedSource, "git", value.ref)
3669
3667
  : null);
3670
3668
  const policyDigest = normalizeSourceAuthorityDigest(value.policyDigest);
3671
3669
  if (resolvedSourceDigest) {
@@ -3998,8 +3996,8 @@ function assertCatalogRemoteArtifactBindings(metadata) {
3998
3996
  const expectedSignature = expectations.signature || {};
3999
3997
  const expectsRemoteSignature = Boolean(
4000
3998
  expectedSignature.url &&
4001
- expectedSignature.publicKeyUrl &&
4002
- expectedSignature.publicKeySha256,
3999
+ expectedSignature.publicKeyUrl &&
4000
+ expectedSignature.publicKeySha256,
4003
4001
  );
4004
4002
  if (expectsRemoteSignature !== Boolean(evidence.signature)) {
4005
4003
  throw new Error(
@@ -5628,9 +5626,9 @@ function samePointerState(left, right) {
5628
5626
  if (!left.present) return true;
5629
5627
  return Boolean(
5630
5628
  Buffer.isBuffer(left.bytes) &&
5631
- Buffer.isBuffer(right.bytes) &&
5632
- left.bytes.equals(right.bytes) &&
5633
- sameFileGeneration(left.generation, right.generation),
5629
+ Buffer.isBuffer(right.bytes) &&
5630
+ left.bytes.equals(right.bytes) &&
5631
+ sameFileGeneration(left.generation, right.generation),
5634
5632
  );
5635
5633
  }
5636
5634
 
@@ -5668,9 +5666,9 @@ function sameLifecycleFileState(left, right) {
5668
5666
  if (!left.present) return true;
5669
5667
  return Boolean(
5670
5668
  Buffer.isBuffer(left.bytes) &&
5671
- Buffer.isBuffer(right.bytes) &&
5672
- left.bytes.equals(right.bytes) &&
5673
- sameFileGeneration(left.generation, right.generation),
5669
+ Buffer.isBuffer(right.bytes) &&
5670
+ left.bytes.equals(right.bytes) &&
5671
+ sameFileGeneration(left.generation, right.generation),
5674
5672
  );
5675
5673
  }
5676
5674
 
@@ -5718,11 +5716,11 @@ function serializePluginNameState(state) {
5718
5716
  function samePluginNameState(left, right) {
5719
5717
  return Boolean(
5720
5718
  left &&
5721
- right &&
5722
- sameFileGeneration(left.generation, right.generation) &&
5723
- left.payloadDigest === right.payloadDigest &&
5724
- left.fileCount === right.fileCount &&
5725
- left.totalBytes === right.totalBytes,
5719
+ right &&
5720
+ sameFileGeneration(left.generation, right.generation) &&
5721
+ left.payloadDigest === right.payloadDigest &&
5722
+ left.fileCount === right.fileCount &&
5723
+ left.totalBytes === right.totalBytes,
5726
5724
  );
5727
5725
  }
5728
5726
 
@@ -5745,8 +5743,8 @@ function lifecycleFileContentMatches(left, right) {
5745
5743
  if (!left.present) return true;
5746
5744
  return Boolean(
5747
5745
  Buffer.isBuffer(left.bytes) &&
5748
- Buffer.isBuffer(right.bytes) &&
5749
- left.bytes.equals(right.bytes),
5746
+ Buffer.isBuffer(right.bytes) &&
5747
+ left.bytes.equals(right.bytes),
5750
5748
  );
5751
5749
  }
5752
5750
 
@@ -5812,7 +5810,9 @@ function hasRetainedLifecycleRecovery(nameDir) {
5812
5810
  function authoritativeTransactionCleanupPending(cleanup) {
5813
5811
  return Boolean(
5814
5812
  cleanup?.cleanupPending === true &&
5815
- /^\.(?:install|uninstall)-/u.test(path.basename(cleanup.cleanupPath || "")),
5813
+ /^\.(?:install|uninstall)-/u.test(
5814
+ path.basename(cleanup.cleanupPath || ""),
5815
+ ),
5816
5816
  );
5817
5817
  }
5818
5818
 
@@ -5902,22 +5902,22 @@ function fileGeneration(stat) {
5902
5902
  function sameFileGeneration(left, right) {
5903
5903
  return Boolean(
5904
5904
  left &&
5905
- right &&
5906
- left.dev === right.dev &&
5907
- left.ino === right.ino &&
5908
- left.birthtimeMs === right.birthtimeMs &&
5909
- left.mtimeMs === right.mtimeMs &&
5910
- left.size === right.size,
5905
+ right &&
5906
+ left.dev === right.dev &&
5907
+ left.ino === right.ino &&
5908
+ left.birthtimeMs === right.birthtimeMs &&
5909
+ left.mtimeMs === right.mtimeMs &&
5910
+ left.size === right.size,
5911
5911
  );
5912
5912
  }
5913
5913
 
5914
5914
  function sameInstalledVersionState(left, right) {
5915
5915
  return Boolean(
5916
5916
  left &&
5917
- right &&
5918
- sameFileGeneration(left.generation, right.generation) &&
5919
- left.payloadDigest === right.payloadDigest &&
5920
- left.sourceDigest === right.sourceDigest,
5917
+ right &&
5918
+ sameFileGeneration(left.generation, right.generation) &&
5919
+ left.payloadDigest === right.payloadDigest &&
5920
+ left.sourceDigest === right.sourceDigest,
5921
5921
  );
5922
5922
  }
5923
5923
 
@@ -5999,8 +5999,8 @@ function activePointerMatchesSnapshot(transaction) {
5999
5999
  if (!snapshot.present) return true;
6000
6000
  return Boolean(
6001
6001
  Buffer.isBuffer(current.bytes) &&
6002
- Buffer.isBuffer(snapshot.bytes) &&
6003
- current.bytes.equals(snapshot.bytes),
6002
+ Buffer.isBuffer(snapshot.bytes) &&
6003
+ current.bytes.equals(snapshot.bytes),
6004
6004
  );
6005
6005
  }
6006
6006