semiotic 3.9.2 → 3.10.0

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 (452) hide show
  1. package/README.md +99 -74
  2. package/agent-skill/semiotic-charts/SKILL.md +13 -7
  3. package/ai/artifact-contract-reference.md +408 -0
  4. package/ai/artifact-surface-inventory.json +5586 -0
  5. package/ai/behaviorContracts.cjs +24 -2
  6. package/ai/cli.js +480 -56
  7. package/ai/dist/mcp-server.js +68 -68
  8. package/ai/examples.md +1 -1
  9. package/ai/reference.md +31 -14
  10. package/ai/schema.json +1868 -438
  11. package/ai/surface-manifest.json +11 -4
  12. package/ai/system-prompt.md +2 -0
  13. package/ai/task-packets/compare-category-totals.json +301 -0
  14. package/ai/task-packets/compare-category-totals.md +188 -0
  15. package/ai/task-packets/correct-published-chart.json +271 -0
  16. package/ai/task-packets/correct-published-chart.md +597 -0
  17. package/ai/task-packets/index.json +40 -0
  18. package/ai/task-packets/update-live-chart.json +289 -0
  19. package/ai/task-packets/update-live-chart.md +424 -0
  20. package/dist/c-2N7IU2NY.min.js +1 -0
  21. package/dist/c-2WK7YJLL.min.js +1 -0
  22. package/dist/c-33QOXEUG.min.js +1 -0
  23. package/dist/c-42PLDTX7.min.js +1 -0
  24. package/dist/c-447VIMRO.min.js +1 -0
  25. package/dist/c-4FN7Q6VQ.min.js +1 -0
  26. package/dist/c-553QUDKA.min.js +1 -0
  27. package/dist/c-55BAJ333.min.js +1 -0
  28. package/dist/c-7242NXSG.min.js +1 -0
  29. package/dist/c-7EGHJU2F.min.js +1 -0
  30. package/dist/c-7HP7MB2I.min.js +1 -0
  31. package/dist/c-7NBU5ZKS.min.js +1 -0
  32. package/dist/c-AFBSWT77.min.js +1 -0
  33. package/dist/c-AJ7EC32V.min.js +1 -0
  34. package/dist/c-AQADQNY7.min.js +1 -0
  35. package/dist/c-ATM475SA.min.js +1 -0
  36. package/dist/c-AVO3Q7T7.min.js +1 -0
  37. package/dist/c-AZKPVBOC.min.js +1 -0
  38. package/dist/c-BNFJMDHN.min.js +1 -0
  39. package/dist/c-BNG5ECK5.min.js +1 -0
  40. package/dist/c-BOHCQILI.min.js +1 -0
  41. package/dist/c-CCTGN5CK.min.js +1 -0
  42. package/dist/c-CPSPZH6A.min.js +1 -0
  43. package/dist/c-CPV4N35K.min.js +1 -0
  44. package/dist/c-D6HAAPTX.min.js +1 -0
  45. package/dist/c-DE5Q3U2X.min.js +1 -0
  46. package/dist/c-DK662R77.min.js +1 -0
  47. package/dist/c-DY2676CR.min.js +1 -0
  48. package/dist/c-E32M6XW5.min.js +1 -0
  49. package/dist/c-E4JDJH4I.min.js +1 -0
  50. package/dist/c-E7I2L7CU.min.js +1 -0
  51. package/dist/c-EBOQ7ER7.min.js +1 -0
  52. package/dist/c-ELDWAO2V.min.js +1 -0
  53. package/dist/c-EUBTECGM.min.js +1 -0
  54. package/dist/c-GNTXRXRN.min.js +1 -0
  55. package/dist/c-GSZRZRD6.min.js +1 -0
  56. package/dist/c-GWX7JGMF.min.js +1 -0
  57. package/dist/c-GXV3C3MO.min.js +1 -0
  58. package/dist/c-HHTK2R75.min.js +1 -0
  59. package/dist/c-HLLFJYTY.min.js +1 -0
  60. package/dist/c-HPOYKCCG.min.js +1 -0
  61. package/dist/c-HXDKPIKR.min.js +1 -0
  62. package/dist/c-I4QJ6YLM.min.js +1 -0
  63. package/dist/c-IDJV3CZK.min.js +1 -0
  64. package/dist/c-ITKX3RC5.min.js +1 -0
  65. package/dist/c-JG2JCQLP.min.js +1 -0
  66. package/dist/c-JLGRHXGZ.min.js +1 -0
  67. package/dist/c-JO2UGTCP.min.js +1 -0
  68. package/dist/c-JUKIWTBJ.min.js +1 -0
  69. package/dist/c-KCRJGUHP.min.js +1 -0
  70. package/dist/c-LMGSSD2E.min.js +1 -0
  71. package/dist/c-LYQMZMZQ.min.js +1 -0
  72. package/dist/c-LYVKDBQJ.min.js +1 -0
  73. package/dist/c-MVR3RWF3.min.js +1 -0
  74. package/dist/c-MXCP7GNZ.min.js +1 -0
  75. package/dist/c-NG7BLZTR.min.js +1 -0
  76. package/dist/c-NYZ2QNAM.min.js +1 -0
  77. package/dist/c-OO5QLMJC.min.js +1 -0
  78. package/dist/c-OOVX2JPQ.min.js +1 -0
  79. package/dist/c-ORLEBW72.min.js +1 -0
  80. package/dist/c-P65V6HLO.min.js +1 -0
  81. package/dist/c-PP6VY3QU.min.js +1 -0
  82. package/dist/c-PRIKOLTE.min.js +1 -0
  83. package/dist/c-PSNI6KAZ.min.js +1 -0
  84. package/dist/c-PYNW54D2.min.js +1 -0
  85. package/dist/c-QA3HMQJP.min.js +1 -0
  86. package/dist/c-ROEHCIGV.min.js +1 -0
  87. package/dist/c-S3AZX5PP.min.js +1 -0
  88. package/dist/c-T2V7O2LO.min.js +1 -0
  89. package/dist/c-TIXX5CAU.min.js +1 -0
  90. package/dist/c-TKG2NP7G.min.js +1 -0
  91. package/dist/c-VJTDST2R.min.js +1 -0
  92. package/dist/c-VXLOLYTO.min.js +1 -0
  93. package/dist/c-W4ZUKSEQ.min.js +1 -0
  94. package/dist/c-WH2O53VI.min.js +1 -0
  95. package/dist/c-WNGH47HF.min.js +1 -0
  96. package/dist/c-WUWXGQYA.min.js +1 -0
  97. package/dist/c-XDQKXPX4.min.js +1 -0
  98. package/dist/{c-CKLIFCGN.min.js → c-XSB27XPS.min.js} +1 -1
  99. package/dist/c-YDECTEUW.min.js +1 -0
  100. package/dist/c-YF3YKVQI.min.js +1 -0
  101. package/dist/c-YLZIV3VS.min.js +1 -0
  102. package/dist/c-ZYPXQF7B.min.js +1 -0
  103. package/dist/components/Annotation.d.ts +2 -1
  104. package/dist/components/ai/chartRecipeRegistry.d.ts +6 -1
  105. package/dist/components/ai/chartRecipes.d.ts +4 -0
  106. package/dist/components/ai/describePhysicsProjection.d.ts +18 -0
  107. package/dist/components/ai/describePhysicsSource.d.ts +13 -0
  108. package/dist/components/artifact/ArtifactInspector.d.ts +26 -0
  109. package/dist/components/artifact/ArtifactInspectorContextSections.d.ts +18 -0
  110. package/dist/components/artifact/artifactContractDiff.d.ts +8 -0
  111. package/dist/components/artifact/artifactInspectorSummary.d.ts +53 -0
  112. package/dist/components/artifact/artifactRevision.d.ts +54 -0
  113. package/dist/components/artifact/artifactTestFixtures.d.ts +17 -0
  114. package/dist/components/artifact/attachmentAudit.d.ts +13 -0
  115. package/dist/components/artifact/claimCorrections.d.ts +3 -0
  116. package/dist/components/artifact/claimGraph.d.ts +5 -0
  117. package/dist/components/artifact/claimLifecycle.d.ts +32 -0
  118. package/dist/components/artifact/claims.d.ts +24 -0
  119. package/dist/components/artifact/collection.d.ts +10 -0
  120. package/dist/components/artifact/collectionCorrectionScope.d.ts +4 -0
  121. package/dist/components/artifact/collectionImpact.d.ts +11 -0
  122. package/dist/components/artifact/collectionLineage.d.ts +3 -0
  123. package/dist/components/artifact/collectionOperations.d.ts +8 -0
  124. package/dist/components/artifact/collectionPolicy.d.ts +22 -0
  125. package/dist/components/artifact/collectionTypes.d.ts +117 -0
  126. package/dist/components/artifact/configurationRepair.d.ts +8 -0
  127. package/dist/components/artifact/contract.d.ts +30 -0
  128. package/dist/components/artifact/evaluateArtifact.d.ts +12 -0
  129. package/dist/components/artifact/evaluateArtifactTypes.d.ts +78 -0
  130. package/dist/components/artifact/evaluationPresentation.d.ts +9 -0
  131. package/dist/components/artifact/evidenceSample.d.ts +8 -0
  132. package/dist/components/artifact/exportPaths.d.ts +8 -0
  133. package/dist/components/artifact/fieldPolicies.d.ts +12 -0
  134. package/dist/components/artifact/fingerprint.d.ts +36 -0
  135. package/dist/components/artifact/grounding.d.ts +51 -0
  136. package/dist/components/artifact/groundingBudget.d.ts +38 -0
  137. package/dist/components/artifact/hostTransfer.d.ts +13 -0
  138. package/dist/components/artifact/identity.d.ts +19 -0
  139. package/dist/components/artifact/inheritance.d.ts +48 -0
  140. package/dist/components/artifact/inheritanceIntegrity.d.ts +3 -0
  141. package/dist/components/artifact/jsonCompatibility.d.ts +2 -0
  142. package/dist/components/artifact/obligations.d.ts +3 -0
  143. package/dist/components/artifact/policies.d.ts +45 -0
  144. package/dist/components/artifact/policyRelations.d.ts +3 -0
  145. package/dist/components/artifact/recordProjection.d.ts +7 -0
  146. package/dist/components/artifact/representation.d.ts +50 -0
  147. package/dist/components/artifact/serialization.d.ts +40 -0
  148. package/dist/components/artifact/temporal.d.ts +32 -0
  149. package/dist/components/artifact/temporalAdapters.d.ts +75 -0
  150. package/dist/components/artifact/temporalAuditHelpers.d.ts +12 -0
  151. package/dist/components/artifact/temporalPresentation.d.ts +8 -0
  152. package/dist/components/artifact/types.d.ts +341 -0
  153. package/dist/components/artifact/validation.d.ts +13 -0
  154. package/dist/components/artifact/validationFieldStatus.d.ts +7 -0
  155. package/dist/components/artifact/validationPrimitives.d.ts +24 -0
  156. package/dist/components/artifact/validationSurfaces.d.ts +7 -0
  157. package/dist/components/artifact/validationTemporal.d.ts +3 -0
  158. package/dist/components/charts/geo/FlowMap.d.ts +7 -0
  159. package/dist/components/charts/geo/flowMapLineStyle.d.ts +18 -0
  160. package/dist/components/charts/ordinal/DonutChart.d.ts +2 -0
  161. package/dist/components/charts/ordinal/FunnelChart.d.ts +2 -0
  162. package/dist/components/charts/ordinal/GroupedBarChart.d.ts +6 -0
  163. package/dist/components/charts/ordinal/PieChart.d.ts +2 -0
  164. package/dist/components/charts/ordinal/RadarChart.d.ts +2 -0
  165. package/dist/components/charts/ordinal/StackedBarChart.d.ts +6 -0
  166. package/dist/components/charts/physics/CollisionSwarmChart.d.ts +1 -1
  167. package/dist/components/charts/physics/EventDropChart.d.ts +3 -1
  168. package/dist/components/charts/physics/GaltonBoardChart.d.ts +4 -2
  169. package/dist/components/charts/physics/ProcessFlowChart.d.ts +6 -0
  170. package/dist/components/charts/physics/UnitPileChart.d.ts +2 -1
  171. package/dist/components/charts/physics/collisionSwarmPacking.d.ts +14 -0
  172. package/dist/components/charts/physics/collisionSwarmPhysics.d.ts +1 -0
  173. package/dist/components/charts/physics/eventDropAdmission.d.ts +32 -0
  174. package/dist/components/charts/physics/eventDropPhysics.d.ts +22 -1
  175. package/dist/components/charts/physics/galtonBoardPhysics.d.ts +2 -9
  176. package/dist/components/charts/physics/physicsChartReconcile.d.ts +4 -0
  177. package/dist/components/charts/physics/physicsChartUtils.d.ts +1 -1
  178. package/dist/components/charts/physics/physicsGaltonData.d.ts +10 -0
  179. package/dist/components/charts/physics/physicsHocHandle.d.ts +2 -0
  180. package/dist/components/charts/physics/physicsPileData.d.ts +11 -0
  181. package/dist/components/charts/physics/physicsPilePhysics.d.ts +5 -12
  182. package/dist/components/charts/physics/physicsProjectionOverlays.d.ts +1 -1
  183. package/dist/components/charts/physics/physicsSourceRows.d.ts +8 -0
  184. package/dist/components/charts/physics/usePhysicsChartData.d.ts +19 -0
  185. package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +4 -0
  186. package/dist/components/charts/realtime/RealtimeHistogram.d.ts +14 -6
  187. package/dist/components/charts/realtime/RealtimeLineChart.d.ts +4 -0
  188. package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +4 -0
  189. package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +4 -0
  190. package/dist/components/charts/realtime/realtimeAccessors.d.ts +4 -0
  191. package/dist/components/charts/realtime/realtimeChartRuntime.d.ts +8 -7
  192. package/dist/components/charts/realtime/realtimeChartTypes.d.ts +7 -0
  193. package/dist/components/charts/realtime/temporalHistogramConfig.d.ts +17 -11
  194. package/dist/components/charts/shared/GaugeReadout.d.ts +9 -0
  195. package/dist/components/charts/shared/ThresholdAnnotation.d.ts +18 -0
  196. package/dist/components/charts/shared/ThresholdEndCap.d.ts +7 -0
  197. package/dist/components/charts/shared/auditAccessibilityText.d.ts +4 -2
  198. package/dist/components/charts/shared/numericTickFormatter.d.ts +2 -0
  199. package/dist/components/charts/shared/radialCenterContent.d.ts +10 -0
  200. package/dist/components/charts/shared/tooltipUtils.d.ts +1 -1
  201. package/dist/components/charts/shared/useChartLegend.d.ts +4 -0
  202. package/dist/components/charts/shared/useXYPointStyle.d.ts +2 -0
  203. package/dist/components/charts/xy/BubbleChart.d.ts +7 -0
  204. package/dist/components/charts/xy/CandlestickChart.d.ts +7 -0
  205. package/dist/components/charts/xy/DifferenceChart.d.ts +7 -0
  206. package/dist/components/charts/xy/MinimapChart.d.ts +7 -0
  207. package/dist/components/charts/xy/MultiAxisLineChart.d.ts +7 -0
  208. package/dist/components/charts/xy/ScatterplotMatrix.d.ts +6 -0
  209. package/dist/components/charts/xy/WaterfallChart.d.ts +8 -0
  210. package/dist/components/charts/xy/differenceMarkStyle.d.ts +28 -0
  211. package/dist/components/charts/xy/multiAxisFields.d.ts +23 -0
  212. package/dist/components/charts/xy/scatterplotMatrixCells.d.ts +50 -0
  213. package/dist/components/evidence/chartEvidenceEnvelope.d.ts +16 -8
  214. package/dist/components/evidence/evidenceEnvelopeInput.d.ts +8 -0
  215. package/dist/components/evidence/evidenceEnvelopeValidation.d.ts +11 -0
  216. package/dist/components/evidence/evidenceGate.d.ts +3 -1
  217. package/dist/components/evidence/renderedSceneHash.d.ts +23 -0
  218. package/dist/components/evidence/stableJsonHash.d.ts +4 -0
  219. package/dist/components/export/chartConfig.d.ts +40 -5
  220. package/dist/components/export/chartConfigArtifact.d.ts +6 -0
  221. package/dist/components/legendLayout.d.ts +18 -0
  222. package/dist/components/legendStyles.d.ts +4 -0
  223. package/dist/components/recipes/firstAvailableTrack.d.ts +17 -0
  224. package/dist/components/recipes/intervals.d.ts +1 -1
  225. package/dist/components/semiotic-ai-core.d.ts +33 -22
  226. package/dist/components/semiotic-ai.d.ts +15 -3
  227. package/dist/components/semiotic-artifact-react.d.ts +10 -0
  228. package/dist/components/semiotic-artifact.d.ts +23 -0
  229. package/dist/components/semiotic-experimental.d.ts +1 -1
  230. package/dist/components/semiotic-physics.d.ts +4 -4
  231. package/dist/components/semiotic-text.d.ts +2 -0
  232. package/dist/components/semiotic-utils-core.d.ts +18 -18
  233. package/dist/components/semiotic.d.ts +3 -3
  234. package/dist/components/server/renderEvidence.d.ts +12 -0
  235. package/dist/components/server/renderToStaticSVG.d.ts +3 -0
  236. package/dist/components/server/staticSVGChrome.d.ts +1 -4
  237. package/dist/components/server/staticXYAxisTicks.d.ts +2 -38
  238. package/dist/components/server/staticXYGrid.d.ts +1 -1
  239. package/dist/components/server/svgSizing.d.ts +6 -0
  240. package/dist/components/shared/svgRoot.d.ts +17 -0
  241. package/dist/components/store/selectionProvenance.d.ts +6 -0
  242. package/dist/components/stream/GeoSVGOverlay.d.ts +4 -0
  243. package/dist/components/stream/NetworkSVGOverlay.d.ts +4 -0
  244. package/dist/components/stream/OrdinalSVGOverlay.d.ts +4 -0
  245. package/dist/components/stream/SVGOverlay.d.ts +4 -0
  246. package/dist/components/stream/SceneToSVG.d.ts +4 -19
  247. package/dist/components/stream/SceneToSVGXY.d.ts +13 -0
  248. package/dist/components/stream/StreamGeoFrame.d.ts +1 -2
  249. package/dist/components/stream/StreamOrdinalFrame.d.ts +1 -2
  250. package/dist/components/stream/XYGrid.d.ts +11 -0
  251. package/dist/components/stream/axisTickUtils.d.ts +0 -1
  252. package/dist/components/stream/hitTestUtils.d.ts +2 -0
  253. package/dist/components/stream/overlayAccessibleText.d.ts +18 -0
  254. package/dist/components/stream/physics/PhysicsControllers.d.ts +1 -1
  255. package/dist/components/stream/physics/PhysicsKernel.d.ts +9 -0
  256. package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +5 -4
  257. package/dist/components/stream/physics/PhysicsPipelineTypes.d.ts +9 -0
  258. package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +3 -0
  259. package/dist/components/stream/physics/physicsCanvasCoordinates.d.ts +5 -0
  260. package/dist/components/stream/physics/physicsFixedPosition.d.ts +16 -0
  261. package/dist/components/stream/physics/physicsKernelCloning.d.ts +6 -0
  262. package/dist/components/stream/physics/physicsPipelineObservations.d.ts +2 -0
  263. package/dist/components/stream/physics/physicsPipelineSettle.d.ts +15 -9
  264. package/dist/components/stream/physics/physicsRegionRuntime.d.ts +8 -17
  265. package/dist/components/stream/physics/physicsSemanticUI.d.ts +9 -0
  266. package/dist/components/stream/pipelineConfig.d.ts +4 -0
  267. package/dist/components/stream/pipelineStoreUpdateResults.d.ts +1 -1
  268. package/dist/components/stream/resolveXYAxes.d.ts +13 -0
  269. package/dist/components/stream/sceneToSVGShared.d.ts +2 -1
  270. package/dist/components/stream/seriesGeometry.d.ts +13 -0
  271. package/dist/components/stream/streamEncodingTypes.d.ts +53 -0
  272. package/dist/components/stream/types.d.ts +4 -53
  273. package/dist/components/stream/useGeoFrameHandle.d.ts +16 -0
  274. package/dist/components/stream/useOrdinalFrameHandle.d.ts +15 -0
  275. package/dist/components/stream/useXYFrameHandle.d.ts +15 -0
  276. package/dist/components/stream/xyAxisTicks.d.ts +25 -0
  277. package/dist/components/stream/xyDateTicks.d.ts +3 -2
  278. package/dist/components/stream/xyFrameAxisTypes.d.ts +2 -0
  279. package/dist/components/stream/xySceneBuilders/ribbonScene.d.ts +1 -1
  280. package/dist/components/stream/xySceneBuilders/types.d.ts +1 -0
  281. package/dist/components/text/annotationTextLayout.d.ts +28 -0
  282. package/dist/components/text/pretextAnnotationLayout.d.ts +29 -0
  283. package/dist/components/text/usePretextAnnotations.d.ts +12 -0
  284. package/dist/controls.module.min.js +1 -1
  285. package/dist/geo.min.js +1 -1
  286. package/dist/geo.module.min.js +1 -1
  287. package/dist/network.module.min.js +1 -1
  288. package/dist/ordinal.module.min.js +1 -1
  289. package/dist/physics-matter.min.js +1 -1
  290. package/dist/physics-matter.module.min.js +1 -1
  291. package/dist/physics-rapier.min.js +1 -1
  292. package/dist/physics-rapier.module.min.js +1 -1
  293. package/dist/physics.module.min.js +1 -1
  294. package/dist/physicsWorker.js +1 -1
  295. package/dist/processSankeyLayoutWorker.js +1 -1
  296. package/dist/rough.min.js +1 -1
  297. package/dist/rough.module.min.js +1 -1
  298. package/dist/semiotic-access.module.min.js +1 -1
  299. package/dist/semiotic-ai-artifact-policy-constants.module.min.js +2 -0
  300. package/dist/semiotic-ai-core.d.ts +33 -22
  301. package/dist/semiotic-ai-core.min.js +1 -1
  302. package/dist/semiotic-ai-core.module.min.js +1 -1
  303. package/dist/semiotic-ai-hash-primitives.module.min.js +2 -0
  304. package/dist/semiotic-ai.d.ts +15 -3
  305. package/dist/semiotic-ai.module.min.js +1 -1
  306. package/dist/semiotic-artifact-react.d.ts +10 -0
  307. package/dist/semiotic-artifact-react.min.js +2 -0
  308. package/dist/semiotic-artifact-react.module.min.js +2 -0
  309. package/dist/semiotic-artifact.d.ts +23 -0
  310. package/dist/semiotic-artifact.min.js +1 -0
  311. package/dist/semiotic-artifact.module.min.js +1 -0
  312. package/dist/semiotic-client-cjs-shared.min.js +1 -1
  313. package/dist/semiotic-client-glyph.module.min.js +1 -1
  314. package/dist/semiotic-client-responsive.module.min.js +1 -1
  315. package/dist/semiotic-client-shared.module.min.js +1 -1
  316. package/dist/semiotic-custom-layout-selection-cjs-shared.min.js +1 -1
  317. package/dist/semiotic-data.min.js +1 -1
  318. package/dist/semiotic-data.module.min.js +1 -1
  319. package/dist/semiotic-evidence.min.js +1 -1
  320. package/dist/semiotic-evidence.module.min.js +1 -1
  321. package/dist/semiotic-experimental-auxiliary.module.min.js +1 -1
  322. package/dist/semiotic-experimental-node-auxiliary.module.min.js +1 -1
  323. package/dist/semiotic-experimental-react-shared.module.min.js +1 -1
  324. package/dist/semiotic-experimental-vacp.min.js +1 -1
  325. package/dist/semiotic-experimental-vacp.module.min.js +1 -1
  326. package/dist/semiotic-experimental.d.ts +1 -1
  327. package/dist/semiotic-line.module.min.js +1 -1
  328. package/dist/semiotic-physics.d.ts +4 -4
  329. package/dist/semiotic-realtime-core.module.min.js +1 -1
  330. package/dist/semiotic-realtime-react.module.min.js +1 -1
  331. package/dist/semiotic-recipes-core-cjs-base.min.js +1 -1
  332. package/dist/semiotic-recipes-core.module.min.js +1 -1
  333. package/dist/semiotic-recipes-geo-cjs.min.js +1 -1
  334. package/dist/semiotic-recipes-react.min.js +1 -1
  335. package/dist/semiotic-server-edge-node.module.min.js +1 -1
  336. package/dist/semiotic-server-edge.min.js +1 -1
  337. package/dist/semiotic-server-edge.module.min.js +1 -1
  338. package/dist/semiotic-server-node.min.js +1 -1
  339. package/dist/semiotic-server-node.module.min.js +1 -1
  340. package/dist/semiotic-text.d.ts +2 -0
  341. package/dist/semiotic-text.min.js +2 -0
  342. package/dist/semiotic-text.module.min.js +2 -0
  343. package/dist/semiotic-themes-core.min.js +1 -1
  344. package/dist/semiotic-themes-core.module.min.js +1 -1
  345. package/dist/semiotic-themes.min.js +1 -1
  346. package/dist/semiotic-themes.module.min.js +1 -1
  347. package/dist/semiotic-utils-core.d.ts +18 -18
  348. package/dist/semiotic-utils-core.min.js +1 -1
  349. package/dist/semiotic-utils-core.module.min.js +1 -1
  350. package/dist/semiotic-value.module.min.js +1 -1
  351. package/dist/semiotic.d.ts +3 -3
  352. package/dist/semiotic.module.min.js +1 -1
  353. package/dist/server.min.js +1 -1
  354. package/dist/server.module.min.js +1 -1
  355. package/dist/xy.module.min.js +1 -1
  356. package/package.json +55 -14
  357. package/spec/README.md +8 -3
  358. package/spec/v0.1/artifact-contract.schema.json +2299 -0
  359. package/spec/v0.1/examples/artifact-contract-full.json +369 -0
  360. package/spec/v0.1/examples/artifact-contract-unknown-state.json +46 -0
  361. package/dist/c-3BLJEQNG.min.js +0 -1
  362. package/dist/c-3SCUN5HI.min.js +0 -1
  363. package/dist/c-3VVKFA4M.min.js +0 -1
  364. package/dist/c-43TJZS3F.min.js +0 -1
  365. package/dist/c-4DTZPSUD.min.js +0 -1
  366. package/dist/c-4ES5367Y.min.js +0 -1
  367. package/dist/c-52TEGIUJ.min.js +0 -1
  368. package/dist/c-54IRWOGM.min.js +0 -1
  369. package/dist/c-5D2S4RMI.min.js +0 -1
  370. package/dist/c-5JWCTX3G.min.js +0 -1
  371. package/dist/c-6CMMSN6N.min.js +0 -1
  372. package/dist/c-6HRB2L7H.min.js +0 -1
  373. package/dist/c-6O5EVOPH.min.js +0 -1
  374. package/dist/c-7W4SV36A.min.js +0 -1
  375. package/dist/c-A4WRGZFX.min.js +0 -1
  376. package/dist/c-AG7WWVIH.min.js +0 -1
  377. package/dist/c-AH6J4MTN.min.js +0 -1
  378. package/dist/c-AKAF6JAD.min.js +0 -1
  379. package/dist/c-ALYR5LKK.min.js +0 -1
  380. package/dist/c-BBKITSXB.min.js +0 -1
  381. package/dist/c-BYDPC44I.min.js +0 -1
  382. package/dist/c-CFFIU2MW.min.js +0 -1
  383. package/dist/c-CGNHBHCE.min.js +0 -1
  384. package/dist/c-CJYSXIFV.min.js +0 -1
  385. package/dist/c-CZF7MV67.min.js +0 -1
  386. package/dist/c-D53OKBSY.min.js +0 -1
  387. package/dist/c-DADXPJXV.min.js +0 -1
  388. package/dist/c-DBQ2V7CH.min.js +0 -1
  389. package/dist/c-DPMVAUAW.min.js +0 -1
  390. package/dist/c-ECJCKLYY.min.js +0 -1
  391. package/dist/c-EGATGOWJ.min.js +0 -1
  392. package/dist/c-EGR6VYBW.min.js +0 -1
  393. package/dist/c-ESNR43AN.min.js +0 -1
  394. package/dist/c-F3LIKINL.min.js +0 -1
  395. package/dist/c-F5ZB5GJ6.min.js +0 -1
  396. package/dist/c-G36WS6LN.min.js +0 -1
  397. package/dist/c-G3VYMHKE.min.js +0 -1
  398. package/dist/c-GGISSW5E.min.js +0 -1
  399. package/dist/c-GR6MOEQC.min.js +0 -1
  400. package/dist/c-GSVCN34B.min.js +0 -1
  401. package/dist/c-GYOQCEFP.min.js +0 -1
  402. package/dist/c-H3DNMTCC.min.js +0 -1
  403. package/dist/c-I6J3FEZE.min.js +0 -1
  404. package/dist/c-IGH6MGJ5.min.js +0 -1
  405. package/dist/c-II2EEAJN.min.js +0 -1
  406. package/dist/c-IUHFPMHD.min.js +0 -1
  407. package/dist/c-J6M4JHRS.min.js +0 -1
  408. package/dist/c-JM3MGLQV.min.js +0 -1
  409. package/dist/c-KM3N7F7R.min.js +0 -1
  410. package/dist/c-LF5BZFNC.min.js +0 -1
  411. package/dist/c-LKBSGFQC.min.js +0 -1
  412. package/dist/c-MNF2S4AA.min.js +0 -1
  413. package/dist/c-MT3WBK7M.min.js +0 -1
  414. package/dist/c-NDJADPIF.min.js +0 -1
  415. package/dist/c-NVPQCIL5.min.js +0 -1
  416. package/dist/c-NY3JWV2K.min.js +0 -1
  417. package/dist/c-OFWJBEE5.min.js +0 -1
  418. package/dist/c-OYFHP5F5.min.js +0 -1
  419. package/dist/c-PGKQGGQ2.min.js +0 -1
  420. package/dist/c-PPWDL5ZI.min.js +0 -1
  421. package/dist/c-Q2IPZ3MU.min.js +0 -1
  422. package/dist/c-QKHMBE2E.min.js +0 -1
  423. package/dist/c-QMVM3AY6.min.js +0 -1
  424. package/dist/c-QSGWX53A.min.js +0 -1
  425. package/dist/c-RJKEKZOO.min.js +0 -1
  426. package/dist/c-RSVIHIQ4.min.js +0 -1
  427. package/dist/c-S6U5CGT5.min.js +0 -1
  428. package/dist/c-SFDIIU5G.min.js +0 -1
  429. package/dist/c-SLGMUBUL.min.js +0 -1
  430. package/dist/c-SRTBCRVE.min.js +0 -1
  431. package/dist/c-T6UAIKBH.min.js +0 -1
  432. package/dist/c-TMCTEVVW.min.js +0 -1
  433. package/dist/c-TMOSJLT3.min.js +0 -1
  434. package/dist/c-TZW3JGJ5.min.js +0 -1
  435. package/dist/c-U6ESPM7V.min.js +0 -1
  436. package/dist/c-UC5PTTFI.min.js +0 -1
  437. package/dist/c-USFMFKIH.min.js +0 -1
  438. package/dist/c-VGKUEZBC.min.js +0 -1
  439. package/dist/c-VGW3VG3I.min.js +0 -1
  440. package/dist/c-VN2HG5BS.min.js +0 -1
  441. package/dist/c-VPZDY5Q4.min.js +0 -1
  442. package/dist/c-VRXUB2F2.min.js +0 -1
  443. package/dist/c-VUBQNQJH.min.js +0 -1
  444. package/dist/c-VUH4PGZY.min.js +0 -1
  445. package/dist/c-W3CE4A4S.min.js +0 -1
  446. package/dist/c-X5UBGU2V.min.js +0 -1
  447. package/dist/c-XDRV7RKW.min.js +0 -1
  448. package/dist/c-YGZHURXZ.min.js +0 -1
  449. package/dist/c-YZVRZGX2.min.js +0 -1
  450. /package/dist/{c-N4G2L7ID.min.js → c-HYW2XA4Q.min.js} +0 -0
  451. /package/dist/{c-ENF72HU5.min.js → c-QAVFOEUY.min.js} +0 -0
  452. /package/dist/{c-OCI56QF2.min.js → c-V4XMSLC3.min.js} +0 -0
@@ -0,0 +1,289 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "generatedBy": "scripts/generate-ai-task-packets.mjs",
4
+ "id": "update-live-chart",
5
+ "title": "Update a live chart by record ID",
6
+ "summary": "Maintain a bounded window of incoming records, apply corrections, and reconcile the display after reconnecting.",
7
+ "route": "/tasks/update-live-chart",
8
+ "identity": {
9
+ "packageName": "semiotic",
10
+ "packageVersion": "3.10.0",
11
+ "channel": "source",
12
+ "sourceRevision": "sha256:6b65d57a034fd350a344bdb5e68c916519ec0877bd488029ff09c0632285fc31",
13
+ "revisionKind": "content-digest",
14
+ "runtime": {
15
+ "digest": "sha256:cf510709caa078398644ff232870d8405551b420c1b8967da1d08dbc9c7fc821",
16
+ "fileCount": 1082
17
+ },
18
+ "taskSources": {
19
+ "digest": "sha256:62733dc8fadd1c8655adc743fb1fcb2c555c73dd191c1df8cf8f6c689e2085ba",
20
+ "fileCount": 36
21
+ },
22
+ "availability": "Verified source checkout guidance; npm package, hosted site and MCP deployment identities require separate checks."
23
+ },
24
+ "job": "Show incoming observations, keep the UI stable, and correct existing records without duplicates.",
25
+ "dataShape": "Synthetic observations with stable IDs, numeric event time and value; a four-record retained window.",
26
+ "fit": [
27
+ "Use when a React application needs ref-based updates and explicit record correction.",
28
+ "The host owns subscription lifecycle, replay and reconnection policy."
29
+ ],
30
+ "exclusions": [
31
+ "Static SVG cannot establish subscription cleanup, correct replay or browser lifecycle behavior.",
32
+ "This simulated feed is not a production network protocol, durable queue or live service."
33
+ ],
34
+ "api": {
35
+ "name": "LineChart",
36
+ "category": "xy",
37
+ "importPath": "semiotic/line",
38
+ "schemaResourceUri": "semiotic://schema/LineChart",
39
+ "renderable": true,
40
+ "requiresLiveData": false,
41
+ "description": "Line traces with curve interpolation, area fill, and point markers. Use for time series, trends, and continuous data.",
42
+ "component": "LineChart",
43
+ "usageMode": "push",
44
+ "dataRequired": false,
45
+ "schema": {
46
+ "type": "object",
47
+ "properties": {
48
+ "xAccessor": {
49
+ "type": "string",
50
+ "description": "Key or accessor function for x-axis values. Functions can derive a value, e.g. `d => d.timestamp`.",
51
+ "default": "x",
52
+ "x-semiotic-runtime-types": [
53
+ "string",
54
+ "function"
55
+ ]
56
+ },
57
+ "yAccessor": {
58
+ "type": "string",
59
+ "description": "Key or accessor function for y-axis values. Functions support dynamic lookups, e.g. `d => d[d.metricLabel]`.",
60
+ "default": "y",
61
+ "x-semiotic-runtime-types": [
62
+ "string",
63
+ "function"
64
+ ]
65
+ },
66
+ "pointIdAccessor": {
67
+ "type": "string",
68
+ "description": "Stable ID for point annotations and push-mode remove()/update().",
69
+ "x-semiotic-runtime-types": [
70
+ "string",
71
+ "function"
72
+ ]
73
+ },
74
+ "title": {
75
+ "type": "string",
76
+ "description": "Visible chart title and the chart's accessible name."
77
+ },
78
+ "description": {
79
+ "type": "string",
80
+ "description": "Concise accessible description that overrides the chart's generated aria-label."
81
+ },
82
+ "summary": {
83
+ "type": "string",
84
+ "description": "Screen-reader-only summary of the chart's key takeaway; include keyboard interaction guidance when relevant."
85
+ },
86
+ "accessibleTable": {
87
+ "type": [
88
+ "boolean",
89
+ "object"
90
+ ],
91
+ "description": "Expose the chart data through Semiotic's screen-reader data table. Object form `{ portalTarget: string }` relocates its interactive UI to the DOM element with that ID.",
92
+ "default": true,
93
+ "oneOf": [
94
+ {
95
+ "type": "boolean"
96
+ },
97
+ {
98
+ "type": "object",
99
+ "additionalProperties": false,
100
+ "required": [
101
+ "portalTarget"
102
+ ],
103
+ "properties": {
104
+ "portalTarget": {
105
+ "type": "string",
106
+ "description": "ID of a DOM element outside any consumer-owned role=img wrapper. React callers may also pass an Element or a callback through the typed API."
107
+ }
108
+ }
109
+ }
110
+ ]
111
+ },
112
+ "height": {
113
+ "type": "number",
114
+ "default": 400
115
+ },
116
+ "responsiveWidth": {
117
+ "type": "boolean"
118
+ }
119
+ },
120
+ "requiredForStatic": [
121
+ "data"
122
+ ]
123
+ },
124
+ "schemaScope": "Selected properties copied from ai/schema.json; retrieve the component resource for the full schema. React push mode follows the included behavior contracts.",
125
+ "contracts": [
126
+ {
127
+ "id": "accessibility.description-props",
128
+ "title": "Accessible chart text uses direct chart props",
129
+ "summary": "High-level charts expose title for the visible name, description for a concise accessible description, summary for a screen-reader-only takeaway and interaction guidance, and accessibleTable for the data-table fallback.",
130
+ "action": "Put title, description, summary, and accessibleTable directly on the chart component when they appear in its schema. If a consumer-owned role=img wraps the chart, use accessibleTable: { portalTarget: \"element-id\" } and render that target outside the image. For generated L1–L3 description or a navigable chart tree, use ChartContainer with chartConfig plus describe and/or navigable; do not invent frameProps fields."
131
+ },
132
+ {
133
+ "id": "props.data-required-by-usage-mode",
134
+ "title": "Data required by usage mode",
135
+ "summary": "Static usage (`renderChart`, MCP previews, SSR snapshots, and copy/paste examples with immediate data) requires data in props. React push mode selects live ingestion by omitting data and mutating through a ref.",
136
+ "action": "Pass usageMode=\"push\" to `semiotic-ai --doctor` when validating ref-based JSX with no data prop. Keep usageMode=\"static\" or omit it for renderChart/MCP/static configs where data must be present."
137
+ },
138
+ {
139
+ "id": "streaming.push-mode-data",
140
+ "title": "Push mode omits data",
141
+ "summary": "HOC push mode is selected by omitting the data prop entirely. Passing data={[]} is static empty data and can clear/reinitialize the frame on render.",
142
+ "action": "For live charts, create a ref, omit data, then call ref.current.push() or pushMany(). For static renderChart/MCP snapshots, provide data because renderChart cannot push later."
143
+ },
144
+ {
145
+ "id": "streaming.ref-mutations-require-id-accessors",
146
+ "title": "Ref mutations need stable IDs",
147
+ "summary": "push() and pushMany() can append without IDs, but remove(id) and update(id, updater) require a stable ID accessor: pointIdAccessor for XY/realtime charts, dataIdAccessor for ordinal charts, and nodeIDAccessor/edgeIdAccessor for network operations.",
148
+ "action": "When generating code that calls remove() or update(), include the matching ID accessor and make sure pushed rows carry that ID field."
149
+ },
150
+ {
151
+ "id": "rendering.renderchart-static-props",
152
+ "title": "renderChart uses static props only",
153
+ "summary": "MCP renderChart and semiotic/server renderChart render a single static SVG/PNG snapshot. Browser-only realtime components and future ref pushes are not renderable through that path.",
154
+ "action": "Use renderChart only with renderable HOC components and complete static data. For live behavior, return React code with a ref and do not promise MCP-rendered output."
155
+ }
156
+ ]
157
+ },
158
+ "examples": [
159
+ {
160
+ "title": "Mounted browser lifecycle",
161
+ "environment": "React browser only",
162
+ "path": "docs/src/pages/tasks/examples/LiveChartExample.tsx",
163
+ "source": "import React, { useEffect, useRef, useState } from \"react\"\nimport { LineChart } from \"semiotic/line\"\nimport {\n connectLiveChart,\n createLiveSource,\n LIVE_EVENTS,\n liveChartProps,\n type LiveSource,\n type Observation,\n} from \"./live-chart\"\nimport \"./live-chart.css\"\n\n/** The optional source lets lifecycle tests inspect subscriptions directly. */\nexport function LiveChartSession({ source }: { source: LiveSource }) {\n const chartRef = useRef<React.ComponentRef<typeof LineChart>>(null)\n const [connected, setConnected] = useState(true)\n const [playing, setPlaying] = useState(false)\n const [sourceCursor, setSourceCursor] = useState(source.cursor)\n const [display, setDisplay] = useState<{ rows: Observation[]; cursor: number }>({\n rows: [],\n cursor: 0,\n })\n\n useEffect(() => {\n if (!connected || !chartRef.current) return\n // Effects run after the child ref is available. Cleanup also handles\n // React StrictMode's setup/cleanup/setup cycle without duplicate listeners.\n return connectLiveChart(source, chartRef.current, (rows, cursor) => {\n setDisplay({ rows, cursor })\n })\n }, [source, connected])\n\n useEffect(() => {\n if (!playing || !connected) return\n const timer = window.setInterval(() => {\n const advanced = source.advance()\n setSourceCursor(source.cursor)\n if (!advanced || source.cursor === LIVE_EVENTS.length) setPlaying(false)\n }, 1_000)\n return () => window.clearInterval(timer)\n }, [source, playing, connected])\n\n function advance() {\n source.advance()\n setSourceCursor(source.cursor)\n }\n\n const finished = sourceCursor === LIVE_EVENTS.length\n const lag = sourceCursor - display.cursor\n return (\n <section className=\"task-live\" aria-label=\"Live chart demonstration\">\n <p>\n <strong>Synthetic fixture.</strong> Three readings start at 09:00–09:02. Five events include\n two corrections and three new observations. The line uses observation time; the event\n counter records processing order.\n </p>\n <div className=\"task-live__controls\">\n <button type=\"button\" onClick={advance} disabled={finished || playing}>\n Advance source\n </button>\n <button\n type=\"button\"\n onClick={() => setPlaying((value) => !value)}\n disabled={!connected || finished}\n >\n {playing ? \"Pause replay\" : \"Play replay\"}\n </button>\n <button\n type=\"button\"\n onClick={() => {\n setPlaying(false)\n setConnected((value) => !value)\n }}\n >\n {connected ? \"Disconnect\" : \"Reconnect\"}\n </button>\n </div>\n <p role=\"status\" aria-live=\"polite\" data-testid=\"live-chart-status\">\n {connected ? \"Connected\" : \"Disconnected\"}. Source event {sourceCursor} of{\" \"}\n {LIVE_EVENTS.length}; display through event {display.cursor}.{\" \"}\n {lag ? `${lag} unapplied event${lag === 1 ? \"\" : \"s\"}.` : \"Display is current.\"}\n </p>\n <p>\n {finished ? \"Replay complete.\" : `Next event: ${LIVE_EVENTS[sourceCursor].label}.`}\n {!connected &&\n \" Advance the source while disconnected, then reconnect to replace the frozen display with the source’s current window.\"}\n </p>\n <div data-testid=\"live-chart-rendering\">\n {/* No data prop: push mode remains active across control re-renders. */}\n <LineChart ref={chartRef} {...liveChartProps} height={320} responsiveWidth />\n </div>\n <div className=\"task-live__table\">\n <table>\n <caption>Records currently retained by the chart</caption>\n <thead>\n <tr>\n <th scope=\"col\">Record ID</th>\n <th scope=\"col\">Observation time</th>\n <th scope=\"col\">Reading (units)</th>\n </tr>\n </thead>\n <tbody>\n {display.rows.map((row) => (\n <tr key={row.id}>\n <th scope=\"row\">{row.id}</th>\n <td>09:{String(row.minute).padStart(2, \"0\")}</td>\n <td>{row.value}</td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n <p>\n Retention: the four latest observations by event time. Corrections replace a retained record\n by ID; older observations are removed. A reconnect takes the current source window, so it\n can recover a missed correction without retaining a complete event history. At completion,\n expect obs-03 = 17, obs-04 = 20, obs-05 = 16 and obs-06 = 19.\n </p>\n </section>\n )\n}\n\nexport default function LiveChartExample() {\n const [source, setSource] = useState(createLiveSource)\n const [session, setSession] = useState(0)\n function restart() {\n setSource(createLiveSource())\n setSession((value) => value + 1)\n }\n return (\n <>\n <LiveChartSession key={session} source={source} />\n <button type=\"button\" onClick={restart}>\n Restart fixture\n </button>\n </>\n )\n}\n",
164
+ "digest": "sha256:523ab188132a8fb182913b4a3c797fb2125519a75e5655e76f912f6e644af583"
165
+ },
166
+ {
167
+ "title": "Deterministic source and reconnect policy",
168
+ "environment": "Host-owned synthetic feed",
169
+ "path": "docs/src/pages/tasks/examples/live-chart.ts",
170
+ "source": "import type { ComponentRef } from \"react\"\nimport type { LineChart } from \"semiotic/line\"\n\nexport interface Observation {\n id: string\n minute: number\n value: number\n}\n\nexport const RETAINED_RECORDS = 4\nexport const INITIAL_OBSERVATIONS: Observation[] = [\n { id: \"obs-01\", minute: 0, value: 12 },\n { id: \"obs-02\", minute: 1, value: 18 },\n { id: \"obs-03\", minute: 2, value: 15 },\n]\n\n// Event order is processing order. A correction preserves the observation's\n// event time and ID; it does not create a new point at its arrival time.\nexport const LIVE_EVENTS = [\n { row: { id: \"obs-02\", minute: 1, value: 14 }, label: \"Correct obs-02 from 18 to 14\" },\n { row: { id: \"obs-04\", minute: 3, value: 20 }, label: \"Add obs-04 at minute 3\" },\n { row: { id: \"obs-05\", minute: 4, value: 16 }, label: \"Add obs-05; discard obs-01\" },\n { row: { id: \"obs-03\", minute: 2, value: 17 }, label: \"Correct obs-03 from 15 to 17\" },\n { row: { id: \"obs-06\", minute: 5, value: 19 }, label: \"Add obs-06; discard obs-02\" },\n] satisfies Array<{ row: Observation; label: string }>\n\nexport const liveChartProps = {\n xAccessor: \"minute\",\n yAccessor: \"value\",\n pointIdAccessor: \"id\",\n xLabel: \"Observation time (minutes after 09:00)\",\n yLabel: \"Synthetic reading (units)\",\n title: \"The latest four observations\",\n description:\n \"Synthetic observations by event time. Corrections keep their original time and record ID.\",\n summary:\n \"Advance the source to inspect corrections and retention. Disconnect to freeze the displayed window, then reconnect to catch up.\",\n showPoints: true,\n showGrid: true,\n accessibleTable: true,\n xExtent: [0, 5] as [number, number],\n yExtent: [0, 24] as [number, number],\n}\n\ntype FeedMessage =\n | { kind: \"snapshot\"; rows: Observation[]; cursor: number }\n | { kind: \"change\"; row: Observation; removed: string[]; cursor: number }\n\n/** A deterministic, in-memory source, not a network or ordering protocol. */\nexport function createLiveSource() {\n let rows = INITIAL_OBSERVATIONS.map((row) => ({ ...row }))\n let cursor = 0\n const listeners = new Set<(message: FeedMessage) => void>()\n return {\n get cursor() {\n return cursor\n },\n get subscriberCount() {\n return listeners.size\n },\n get rows() {\n return rows.map((row) => ({ ...row }))\n },\n subscribe(listener: (message: FeedMessage) => void) {\n listeners.add(listener)\n // Registration and snapshot are synchronous in this fixture. A remote\n // source needs an atomic snapshot/cursor handoff to avoid losing events.\n listener({ kind: \"snapshot\", rows: rows.map((row) => ({ ...row })), cursor })\n return () => {\n listeners.delete(listener)\n }\n },\n advance() {\n const event = LIVE_EVENTS[cursor]\n if (!event) return false\n const byId = new Map(rows.map((row) => [row.id, row]))\n byId.set(event.row.id, { ...event.row })\n const ordered = [...byId.values()].sort((a, b) => a.minute - b.minute)\n const removed = ordered.slice(0, -RETAINED_RECORDS).map((row) => row.id)\n rows = ordered.slice(-RETAINED_RECORDS)\n cursor += 1\n for (const listener of listeners) {\n listener({ kind: \"change\", row: { ...event.row }, removed, cursor })\n }\n return true\n },\n }\n}\n\nexport type LiveSource = ReturnType<typeof createLiveSource>\ntype LiveChartHandle = ComponentRef<typeof LineChart>\n\n/** Connect only after React mounts the chart and supplies its ref. */\nexport function connectLiveChart(\n source: LiveSource,\n chart: LiveChartHandle,\n onReadback: (rows: Observation[], cursor: number) => void,\n) {\n const retainedIds = new Set<string>()\n return source.subscribe((message) => {\n if (message.kind === \"snapshot\") {\n chart.clear()\n chart.pushMany(message.rows)\n retainedIds.clear()\n for (const row of message.rows) retainedIds.add(row.id)\n } else {\n for (const id of message.removed) {\n chart.remove(id)\n retainedIds.delete(id)\n }\n if (retainedIds.has(message.row.id)) {\n chart.update(message.row.id, (previous) => ({ ...previous, ...message.row }))\n } else if (!message.removed.includes(message.row.id)) {\n chart.push(message.row)\n retainedIds.add(message.row.id)\n }\n }\n // Inspect the chart's retained store, rather than echoing the source rows.\n const actual = chart.getData().map((row) => ({\n id: String(row.id),\n minute: Number(row.minute),\n value: Number(row.value),\n }))\n onReadback(actual, message.cursor)\n })\n}\n",
171
+ "digest": "sha256:6bf1419436e062c710580585ff8ccc18b4a92dab13d8cd49dcd291e862a7b813"
172
+ },
173
+ {
174
+ "title": "Example styles",
175
+ "environment": "Browser presentation",
176
+ "path": "docs/src/pages/tasks/examples/live-chart.css",
177
+ "source": ".task-live {\n min-width: 0;\n}\n.task-live__controls {\n display: flex;\n flex-wrap: wrap;\n gap: 0.6rem;\n}\n.task-live__controls button {\n min-height: 40px;\n padding: 0.4rem 0.8rem;\n}\n.task-live__table {\n overflow-x: auto;\n margin: 1rem 0;\n}\n.task-live__table table {\n width: 100%;\n border-collapse: collapse;\n}\n.task-live__table caption {\n text-align: left;\n font-weight: 600;\n margin-bottom: 0.5rem;\n}\n.task-live__table th,\n.task-live__table td {\n text-align: left;\n padding: 0.5rem;\n border-bottom: 1px solid var(--border-color, #aaa);\n}\n",
178
+ "digest": "sha256:2c0d749ff8f1683e524f5b2cf5a75b7515c49b30bfa52724254c98130e5cda1c"
179
+ }
180
+ ],
181
+ "evidence": {
182
+ "claimId": "task.update-live-chart",
183
+ "statement": "Maintain a bounded window of incoming records, apply corrections, and reconcile the display after reconnecting.",
184
+ "owner": "Semiotic repository maintainers",
185
+ "status": "supported-in-scope",
186
+ "observed": {
187
+ "verifiedAt": "2026-09-11T03:13:52.427Z",
188
+ "environment": {
189
+ "node": "v22.22.1",
190
+ "platform": "darwin",
191
+ "architecture": "arm64",
192
+ "browser": "Playwright Chromium"
193
+ },
194
+ "runs": [
195
+ {
196
+ "kind": "unit",
197
+ "targets": [
198
+ "docs/src/pages/tasks/examples/category-comparison.test.ts",
199
+ "docs/src/pages/tasks/examples/live-chart.test.tsx",
200
+ "docs/src/pages/tasks/examples/source-correction.test.ts"
201
+ ],
202
+ "name": "Task source units",
203
+ "command": "node node_modules/vitest/vitest.mjs run ./docs/src/pages/tasks/examples/category-comparison.test.ts ./docs/src/pages/tasks/examples/live-chart.test.tsx ./docs/src/pages/tasks/examples/source-correction.test.ts --reporter=default --reporter=json --outputFile=<temporary-report-directory>/unit.json --allowOnly=false",
204
+ "exitCode": 0,
205
+ "passed": 14,
206
+ "skipped": 0,
207
+ "passedByFile": {
208
+ "docs/src/pages/tasks/examples/category-comparison.test.ts": 4,
209
+ "docs/src/pages/tasks/examples/live-chart.test.tsx": 5,
210
+ "docs/src/pages/tasks/examples/source-correction.test.ts": 5
211
+ }
212
+ },
213
+ {
214
+ "kind": "browser",
215
+ "targets": [
216
+ "integration-tests/docs-examples-task-live.spec.ts",
217
+ "integration-tests/docs-examples-tasks.spec.ts"
218
+ ],
219
+ "name": "Task browser behavior",
220
+ "command": "node node_modules/@playwright/test/cli.js test --config playwright.docs-examples.config.ts ./integration-tests/docs-examples-task-live.spec.ts ./integration-tests/docs-examples-tasks.spec.ts --reporter=list,json --forbid-only",
221
+ "exitCode": 0,
222
+ "passed": 6,
223
+ "skipped": 0,
224
+ "passedByFile": {
225
+ "integration-tests/docs-examples-task-live.spec.ts": 2,
226
+ "integration-tests/docs-examples-tasks.spec.ts": 4
227
+ }
228
+ }
229
+ ],
230
+ "record": "ai/tasks/verification.json",
231
+ "authorship": "Agent-observed execution of repository tests; independent review is not recorded."
232
+ },
233
+ "validity": "Only the content digests and environment recorded here; not a release range or an adoption result.",
234
+ "invalidation": "Changes to runtime source, schemas, manifests, task examples, tests, verification tooling or this task definition invalidate the recorded result.",
235
+ "commands": [
236
+ "npx vitest run docs/src/pages/tasks/examples/live-chart.test.tsx",
237
+ "npx playwright test --config playwright.docs-examples.config.ts integration-tests/docs-examples-task-live.spec.ts"
238
+ ],
239
+ "checks": {
240
+ "unit": "docs/src/pages/tasks/examples/live-chart.test.tsx",
241
+ "browser": "integration-tests/docs-examples-task-live.spec.ts"
242
+ },
243
+ "expected": [
244
+ "Corrections replace records by stable ID without increasing the retained count.",
245
+ "At most four records remain in the chart after new observations.",
246
+ "While disconnected, the displayed window remains unchanged; reconnect replaces it with the current source window.",
247
+ "Unmount and StrictMode cleanup leave no active subscription or playback timer.",
248
+ "After all five events, retained IDs obs-03 through obs-06 have values 17, 20, 16 and 19."
249
+ ],
250
+ "unassessed": [
251
+ "Real transport failures, server retention, clock synchronization and production backpressure.",
252
+ "Performance on physical devices or under a production event rate.",
253
+ "Assistive-technology reception and organic adoption."
254
+ ]
255
+ },
256
+ "recovery": [
257
+ {
258
+ "symptom": "Pushed rows disappear when React renders again.",
259
+ "contractId": "streaming.push-mode-data",
260
+ "action": "Omit data entirely in push mode. Push the initial window through the mounted ref; do not pass data={[]}.",
261
+ "recheck": "Change host UI state and confirm that the retained records survive."
262
+ },
263
+ {
264
+ "symptom": "A correction cannot find a record or creates duplicates.",
265
+ "contractId": "streaming.ref-mutations-require-id-accessors",
266
+ "action": "Set pointIdAccessor to id and use update(id, updater). On reconnect, replace the bounded window from the authoritative host snapshot.",
267
+ "recheck": "Inspect the chart handle's data after correction and reconnect, including IDs, values and count."
268
+ }
269
+ ],
270
+ "continuation": {
271
+ "rationale": "The host needs explicit correction and reconnect behavior over a bounded observation window.",
272
+ "recheck": [
273
+ "Cleanup, stable IDs, retention, data-prop omission and reconnect replacement after lifecycle or dependency changes."
274
+ ],
275
+ "loss": "A static export records one window. It does not carry an active subscription, prove cleanup or promise future updates."
276
+ },
277
+ "update": {
278
+ "status": "source-only",
279
+ "introducedIn": null,
280
+ "previousAssumption": "A static render or an empty data array demonstrates a working live chart.",
281
+ "action": "Omit data for push mode. Establish the subscription after the ref mounts, correct records by ID, clean up and reconcile from the authoritative window on reconnect.",
282
+ "recheck": [
283
+ "Retained records and actual canvas paint through correction, disconnect, reconnect and restart.",
284
+ "Subscriptions and replay timers after unmount and StrictMode cleanup."
285
+ ],
286
+ "remaining": "Production transport reliability and event-rate performance require their own environment-specific checks."
287
+ },
288
+ "definition": "ai/tasks/update-live-chart.json"
289
+ }