@senpi/runtime 3.0.6-dev.runtime-phase-2.20260630134327 → 3.0.6-dev.runtime-phase-2.20260630134451

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 (326) hide show
  1. package/dist/actions/{tracking-helpers.d.ts → action-events.d.ts} +24 -23
  2. package/dist/actions/action-events.d.ts.map +1 -0
  3. package/dist/actions/{tracking-helpers.js → action-events.js} +25 -77
  4. package/dist/actions/action-events.js.map +1 -0
  5. package/dist/actions/close-position/close-position.action.d.ts.map +1 -1
  6. package/dist/actions/close-position/close-position.action.js +8 -17
  7. package/dist/actions/close-position/close-position.action.js.map +1 -1
  8. package/dist/actions/event-derivation.d.ts +5 -6
  9. package/dist/actions/event-derivation.d.ts.map +1 -1
  10. package/dist/actions/event-derivation.js +4 -5
  11. package/dist/actions/event-derivation.js.map +1 -1
  12. package/dist/actions/llm-decision/anthropic-llm-decision.d.ts +5 -9
  13. package/dist/actions/llm-decision/anthropic-llm-decision.d.ts.map +1 -1
  14. package/dist/actions/llm-decision/anthropic-llm-decision.js +6 -86
  15. package/dist/actions/llm-decision/anthropic-llm-decision.js.map +1 -1
  16. package/dist/actions/llm-decision/factory.d.ts +0 -6
  17. package/dist/actions/llm-decision/factory.d.ts.map +1 -1
  18. package/dist/actions/llm-decision/factory.js +0 -2
  19. package/dist/actions/llm-decision/factory.js.map +1 -1
  20. package/dist/actions/llm-decision/openclaw-llm-decision.d.ts.map +1 -1
  21. package/dist/actions/llm-decision/openclaw-llm-decision.js +25 -5
  22. package/dist/actions/llm-decision/openclaw-llm-decision.js.map +1 -1
  23. package/dist/actions/open-position/open-position.action.d.ts.map +1 -1
  24. package/dist/actions/open-position/open-position.action.js +9 -17
  25. package/dist/actions/open-position/open-position.action.js.map +1 -1
  26. package/dist/actions/position-tracker/position-tracker.action.d.ts.map +1 -1
  27. package/dist/actions/position-tracker/position-tracker.action.js +1 -2
  28. package/dist/actions/position-tracker/position-tracker.action.js.map +1 -1
  29. package/dist/dsl/engine-client/event-mapping.d.ts.map +1 -1
  30. package/dist/dsl/engine-client/event-mapping.js +0 -3
  31. package/dist/dsl/engine-client/event-mapping.js.map +1 -1
  32. package/dist/dsl/events/build-closed-event.d.ts.map +1 -1
  33. package/dist/dsl/events/build-closed-event.js +0 -1
  34. package/dist/dsl/events/build-closed-event.js.map +1 -1
  35. package/dist/dsl/events/handlers.d.ts.map +1 -1
  36. package/dist/dsl/events/handlers.js +2 -4
  37. package/dist/dsl/events/handlers.js.map +1 -1
  38. package/dist/dsl/monitor/create-monitor.d.ts +1 -1
  39. package/dist/dsl/monitor/create-monitor.d.ts.map +1 -1
  40. package/dist/dsl/monitor/create-monitor.js +0 -30
  41. package/dist/dsl/monitor/create-monitor.js.map +1 -1
  42. package/dist/dsl/monitor/process-one-position.d.ts.map +1 -1
  43. package/dist/dsl/monitor/process-one-position.js +0 -121
  44. package/dist/dsl/monitor/process-one-position.js.map +1 -1
  45. package/dist/dsl/plugin/index.js +3 -3
  46. package/dist/dsl/plugin/index.js.map +1 -1
  47. package/dist/dsl/plugin/options.d.ts +1 -1
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +27 -60
  50. package/dist/index.js.map +1 -1
  51. package/dist/runtime/__tests__/helpers/runtime-gateway-harness.d.ts +2 -0
  52. package/dist/runtime/__tests__/helpers/runtime-gateway-harness.d.ts.map +1 -1
  53. package/dist/runtime/__tests__/helpers/runtime-gateway-harness.js +24 -3
  54. package/dist/runtime/__tests__/helpers/runtime-gateway-harness.js.map +1 -1
  55. package/dist/runtime/create-runtime-context.d.ts +1 -1
  56. package/dist/runtime/create-runtime-context.d.ts.map +1 -1
  57. package/dist/runtime/create-scanner-module.d.ts +1 -1
  58. package/dist/runtime/domain-events.d.ts +4 -4
  59. package/dist/runtime/domain-events.d.ts.map +1 -1
  60. package/dist/runtime/domain-events.js +4 -4
  61. package/dist/runtime/domain-events.js.map +1 -1
  62. package/dist/runtime/lifecycle-events.d.ts +3 -3
  63. package/dist/runtime/lifecycle-events.js +5 -5
  64. package/dist/runtime/lifecycle-events.js.map +1 -1
  65. package/dist/{tracking → runtime}/position-id-registry.d.ts +14 -1
  66. package/dist/runtime/position-id-registry.d.ts.map +1 -0
  67. package/dist/{tracking → runtime}/position-id-registry.js +20 -3
  68. package/dist/runtime/position-id-registry.js.map +1 -0
  69. package/dist/runtime/run.d.ts +2 -4
  70. package/dist/runtime/run.d.ts.map +1 -1
  71. package/dist/runtime/run.js.map +1 -1
  72. package/dist/runtime/runtime-schema.d.ts +120 -486
  73. package/dist/runtime/runtime-schema.d.ts.map +1 -1
  74. package/dist/runtime/runtime-schema.js +0 -27
  75. package/dist/runtime/runtime-schema.js.map +1 -1
  76. package/dist/runtime/runtime.d.ts +4 -9
  77. package/dist/runtime/runtime.d.ts.map +1 -1
  78. package/dist/runtime/runtime.js +33 -190
  79. package/dist/runtime/runtime.js.map +1 -1
  80. package/dist/scanners/engine/data-providers.d.ts +1 -1
  81. package/dist/scanners/runtime-module.d.ts +1 -1
  82. package/dist/senpi/client.d.ts +10 -0
  83. package/dist/senpi/client.d.ts.map +1 -1
  84. package/dist/senpi/client.js +70 -50
  85. package/dist/senpi/client.js.map +1 -1
  86. package/dist/telemetry/attributes.d.ts +13 -0
  87. package/dist/telemetry/attributes.d.ts.map +1 -0
  88. package/dist/telemetry/attributes.js +22 -0
  89. package/dist/telemetry/attributes.js.map +1 -0
  90. package/dist/{tracking → telemetry}/context.d.ts +6 -5
  91. package/dist/telemetry/context.d.ts.map +1 -0
  92. package/dist/{tracking → telemetry}/context.js +4 -4
  93. package/dist/telemetry/context.js.map +1 -0
  94. package/dist/{recording/records.d.ts → telemetry/event-builders.d.ts} +138 -30
  95. package/dist/telemetry/event-builders.d.ts.map +1 -0
  96. package/dist/{recording/wiring/record-builders.js → telemetry/event-builders.js} +90 -39
  97. package/dist/telemetry/event-builders.js.map +1 -0
  98. package/dist/telemetry/identity.d.ts +62 -0
  99. package/dist/telemetry/identity.d.ts.map +1 -0
  100. package/dist/{recording/wiring → telemetry}/identity.js +5 -2
  101. package/dist/telemetry/identity.js.map +1 -0
  102. package/dist/telemetry/metrics.d.ts +47 -0
  103. package/dist/telemetry/metrics.d.ts.map +1 -0
  104. package/dist/telemetry/metrics.js +154 -0
  105. package/dist/telemetry/metrics.js.map +1 -0
  106. package/dist/telemetry/otel-sdk.d.ts +21 -33
  107. package/dist/telemetry/otel-sdk.d.ts.map +1 -1
  108. package/dist/telemetry/otel-sdk.js +77 -50
  109. package/dist/telemetry/otel-sdk.js.map +1 -1
  110. package/dist/telemetry/spans/constants.d.ts +12 -0
  111. package/dist/telemetry/spans/constants.d.ts.map +1 -0
  112. package/dist/telemetry/spans/constants.js +12 -0
  113. package/dist/telemetry/spans/constants.js.map +1 -0
  114. package/dist/telemetry/spans/gen-ai.d.ts +70 -0
  115. package/dist/telemetry/spans/gen-ai.d.ts.map +1 -0
  116. package/dist/telemetry/spans/gen-ai.js +330 -0
  117. package/dist/telemetry/spans/gen-ai.js.map +1 -0
  118. package/dist/telemetry/spans/index.d.ts +11 -0
  119. package/dist/telemetry/spans/index.d.ts.map +1 -0
  120. package/dist/telemetry/spans/index.js +11 -0
  121. package/dist/telemetry/spans/index.js.map +1 -0
  122. package/dist/{tracking → telemetry}/spans/redact-pii.d.ts +18 -20
  123. package/dist/telemetry/spans/redact-pii.d.ts.map +1 -0
  124. package/dist/{tracking → telemetry}/spans/redact-pii.js +30 -29
  125. package/dist/telemetry/spans/redact-pii.js.map +1 -0
  126. package/dist/telemetry/spans/sanitize-payload.d.ts.map +1 -0
  127. package/dist/telemetry/spans/sanitize-payload.js.map +1 -0
  128. package/dist/telemetry/spans/span-hooks.d.ts +11 -0
  129. package/dist/telemetry/spans/span-hooks.d.ts.map +1 -0
  130. package/dist/telemetry/spans/span-hooks.js +609 -0
  131. package/dist/telemetry/spans/span-hooks.js.map +1 -0
  132. package/dist/telemetry/trace-identity.d.ts +1 -1
  133. package/dist/telemetry/tracing.d.ts +2 -1
  134. package/dist/telemetry/tracing.d.ts.map +1 -1
  135. package/dist/telemetry/tracing.js +1 -1
  136. package/dist/telemetry/tracing.js.map +1 -1
  137. package/dist/types/dsl/index.d.ts +2 -9
  138. package/dist/types/dsl/index.d.ts.map +1 -1
  139. package/dist/types/runtime.d.ts +1 -1
  140. package/dist/types/runtime.d.ts.map +1 -1
  141. package/dist/utils/event-catalog.d.ts +2 -2
  142. package/dist/utils/event-catalog.js +2 -2
  143. package/dist/utils/logger.js +3 -4
  144. package/dist/utils/logger.js.map +1 -1
  145. package/package.json +1 -1
  146. package/dist/actions/tracking-helpers.d.ts.map +0 -1
  147. package/dist/actions/tracking-helpers.js.map +0 -1
  148. package/dist/recording/emitter.d.ts +0 -27
  149. package/dist/recording/emitter.d.ts.map +0 -1
  150. package/dist/recording/emitter.js +0 -2
  151. package/dist/recording/emitter.js.map +0 -1
  152. package/dist/recording/identity.d.ts +0 -34
  153. package/dist/recording/identity.d.ts.map +0 -1
  154. package/dist/recording/identity.js +0 -2
  155. package/dist/recording/identity.js.map +0 -1
  156. package/dist/recording/index.d.ts +0 -11
  157. package/dist/recording/index.d.ts.map +0 -1
  158. package/dist/recording/index.js +0 -2
  159. package/dist/recording/index.js.map +0 -1
  160. package/dist/recording/noop-emitter.d.ts +0 -23
  161. package/dist/recording/noop-emitter.d.ts.map +0 -1
  162. package/dist/recording/noop-emitter.js +0 -22
  163. package/dist/recording/noop-emitter.js.map +0 -1
  164. package/dist/recording/otel/attributes.d.ts +0 -37
  165. package/dist/recording/otel/attributes.d.ts.map +0 -1
  166. package/dist/recording/otel/attributes.js +0 -131
  167. package/dist/recording/otel/attributes.js.map +0 -1
  168. package/dist/recording/otel/constants.d.ts +0 -123
  169. package/dist/recording/otel/constants.d.ts.map +0 -1
  170. package/dist/recording/otel/constants.js +0 -172
  171. package/dist/recording/otel/constants.js.map +0 -1
  172. package/dist/recording/otel/ids.d.ts +0 -25
  173. package/dist/recording/otel/ids.d.ts.map +0 -1
  174. package/dist/recording/otel/ids.js +0 -37
  175. package/dist/recording/otel/ids.js.map +0 -1
  176. package/dist/recording/otel/index.d.ts +0 -13
  177. package/dist/recording/otel/index.d.ts.map +0 -1
  178. package/dist/recording/otel/index.js +0 -9
  179. package/dist/recording/otel/index.js.map +0 -1
  180. package/dist/recording/otel/mappers.d.ts +0 -100
  181. package/dist/recording/otel/mappers.d.ts.map +0 -1
  182. package/dist/recording/otel/mappers.js +0 -684
  183. package/dist/recording/otel/mappers.js.map +0 -1
  184. package/dist/recording/otel/otel-emitter.d.ts +0 -43
  185. package/dist/recording/otel/otel-emitter.d.ts.map +0 -1
  186. package/dist/recording/otel/otel-emitter.js +0 -99
  187. package/dist/recording/otel/otel-emitter.js.map +0 -1
  188. package/dist/recording/otel/redaction.d.ts +0 -47
  189. package/dist/recording/otel/redaction.d.ts.map +0 -1
  190. package/dist/recording/otel/redaction.js +0 -88
  191. package/dist/recording/otel/redaction.js.map +0 -1
  192. package/dist/recording/records.d.ts.map +0 -1
  193. package/dist/recording/records.js +0 -14
  194. package/dist/recording/records.js.map +0 -1
  195. package/dist/recording/transport/batcher.d.ts +0 -59
  196. package/dist/recording/transport/batcher.d.ts.map +0 -1
  197. package/dist/recording/transport/batcher.js +0 -234
  198. package/dist/recording/transport/batcher.js.map +0 -1
  199. package/dist/recording/transport/client.d.ts +0 -41
  200. package/dist/recording/transport/client.d.ts.map +0 -1
  201. package/dist/recording/transport/client.js +0 -69
  202. package/dist/recording/transport/client.js.map +0 -1
  203. package/dist/recording/transport/config.d.ts +0 -53
  204. package/dist/recording/transport/config.d.ts.map +0 -1
  205. package/dist/recording/transport/config.js +0 -41
  206. package/dist/recording/transport/config.js.map +0 -1
  207. package/dist/recording/transport/index.d.ts +0 -16
  208. package/dist/recording/transport/index.d.ts.map +0 -1
  209. package/dist/recording/transport/index.js +0 -12
  210. package/dist/recording/transport/index.js.map +0 -1
  211. package/dist/recording/transport/rows.d.ts +0 -88
  212. package/dist/recording/transport/rows.d.ts.map +0 -1
  213. package/dist/recording/transport/rows.js +0 -15
  214. package/dist/recording/transport/rows.js.map +0 -1
  215. package/dist/recording/wiring/emitter-factory.d.ts +0 -39
  216. package/dist/recording/wiring/emitter-factory.d.ts.map +0 -1
  217. package/dist/recording/wiring/emitter-factory.js +0 -62
  218. package/dist/recording/wiring/emitter-factory.js.map +0 -1
  219. package/dist/recording/wiring/identity.d.ts +0 -27
  220. package/dist/recording/wiring/identity.d.ts.map +0 -1
  221. package/dist/recording/wiring/identity.js.map +0 -1
  222. package/dist/recording/wiring/index.d.ts +0 -12
  223. package/dist/recording/wiring/index.d.ts.map +0 -1
  224. package/dist/recording/wiring/index.js +0 -9
  225. package/dist/recording/wiring/index.js.map +0 -1
  226. package/dist/recording/wiring/record-builders.d.ts +0 -107
  227. package/dist/recording/wiring/record-builders.d.ts.map +0 -1
  228. package/dist/recording/wiring/record-builders.js.map +0 -1
  229. package/dist/recording/wiring/subscriber.d.ts +0 -28
  230. package/dist/recording/wiring/subscriber.d.ts.map +0 -1
  231. package/dist/recording/wiring/subscriber.js +0 -173
  232. package/dist/recording/wiring/subscriber.js.map +0 -1
  233. package/dist/recording/wiring/values.d.ts +0 -19
  234. package/dist/recording/wiring/values.d.ts.map +0 -1
  235. package/dist/recording/wiring/values.js +0 -49
  236. package/dist/recording/wiring/values.js.map +0 -1
  237. package/dist/tracking/build-rehydrate-items.d.ts +0 -15
  238. package/dist/tracking/build-rehydrate-items.d.ts.map +0 -1
  239. package/dist/tracking/build-rehydrate-items.js +0 -19
  240. package/dist/tracking/build-rehydrate-items.js.map +0 -1
  241. package/dist/tracking/constants.d.ts +0 -24
  242. package/dist/tracking/constants.d.ts.map +0 -1
  243. package/dist/tracking/constants.js +0 -52
  244. package/dist/tracking/constants.js.map +0 -1
  245. package/dist/tracking/context.d.ts.map +0 -1
  246. package/dist/tracking/context.js.map +0 -1
  247. package/dist/tracking/index.d.ts +0 -16
  248. package/dist/tracking/index.d.ts.map +0 -1
  249. package/dist/tracking/index.js +0 -11
  250. package/dist/tracking/index.js.map +0 -1
  251. package/dist/tracking/plugin-event-tracker.d.ts +0 -13
  252. package/dist/tracking/plugin-event-tracker.d.ts.map +0 -1
  253. package/dist/tracking/plugin-event-tracker.js +0 -27
  254. package/dist/tracking/plugin-event-tracker.js.map +0 -1
  255. package/dist/tracking/position-id-registry.d.ts.map +0 -1
  256. package/dist/tracking/position-id-registry.js.map +0 -1
  257. package/dist/tracking/spans/constants.d.ts +0 -19
  258. package/dist/tracking/spans/constants.d.ts.map +0 -1
  259. package/dist/tracking/spans/constants.js +0 -31
  260. package/dist/tracking/spans/constants.js.map +0 -1
  261. package/dist/tracking/spans/fan-out-span-transport.d.ts +0 -22
  262. package/dist/tracking/spans/fan-out-span-transport.d.ts.map +0 -1
  263. package/dist/tracking/spans/fan-out-span-transport.js +0 -49
  264. package/dist/tracking/spans/fan-out-span-transport.js.map +0 -1
  265. package/dist/tracking/spans/index.d.ts +0 -13
  266. package/dist/tracking/spans/index.d.ts.map +0 -1
  267. package/dist/tracking/spans/index.js +0 -16
  268. package/dist/tracking/spans/index.js.map +0 -1
  269. package/dist/tracking/spans/otel/fit-row-budget.d.ts +0 -22
  270. package/dist/tracking/spans/otel/fit-row-budget.d.ts.map +0 -1
  271. package/dist/tracking/spans/otel/fit-row-budget.js +0 -91
  272. package/dist/tracking/spans/otel/fit-row-budget.js.map +0 -1
  273. package/dist/tracking/spans/otel/map-span-to-trace-row.d.ts +0 -16
  274. package/dist/tracking/spans/otel/map-span-to-trace-row.d.ts.map +0 -1
  275. package/dist/tracking/spans/otel/map-span-to-trace-row.js +0 -227
  276. package/dist/tracking/spans/otel/map-span-to-trace-row.js.map +0 -1
  277. package/dist/tracking/spans/otel/recording-span-transport.d.ts +0 -43
  278. package/dist/tracking/spans/otel/recording-span-transport.d.ts.map +0 -1
  279. package/dist/tracking/spans/otel/recording-span-transport.js +0 -67
  280. package/dist/tracking/spans/otel/recording-span-transport.js.map +0 -1
  281. package/dist/tracking/spans/otel/span-ids.d.ts +0 -22
  282. package/dist/tracking/spans/otel/span-ids.d.ts.map +0 -1
  283. package/dist/tracking/spans/otel/span-ids.js +0 -32
  284. package/dist/tracking/spans/otel/span-ids.js.map +0 -1
  285. package/dist/tracking/spans/plugin-span-tracker.d.ts +0 -9
  286. package/dist/tracking/spans/plugin-span-tracker.d.ts.map +0 -1
  287. package/dist/tracking/spans/plugin-span-tracker.js +0 -115
  288. package/dist/tracking/spans/plugin-span-tracker.js.map +0 -1
  289. package/dist/tracking/spans/redact-pii.d.ts.map +0 -1
  290. package/dist/tracking/spans/redact-pii.js.map +0 -1
  291. package/dist/tracking/spans/sanitize-payload.d.ts.map +0 -1
  292. package/dist/tracking/spans/sanitize-payload.js.map +0 -1
  293. package/dist/tracking/spans/span-hooks.d.ts +0 -28
  294. package/dist/tracking/spans/span-hooks.d.ts.map +0 -1
  295. package/dist/tracking/spans/span-hooks.js +0 -409
  296. package/dist/tracking/spans/span-hooks.js.map +0 -1
  297. package/dist/tracking/spans/span-tracker.d.ts +0 -133
  298. package/dist/tracking/spans/span-tracker.d.ts.map +0 -1
  299. package/dist/tracking/spans/span-tracker.js +0 -721
  300. package/dist/tracking/spans/span-tracker.js.map +0 -1
  301. package/dist/tracking/spans/span-transport.d.ts +0 -71
  302. package/dist/tracking/spans/span-transport.d.ts.map +0 -1
  303. package/dist/tracking/spans/span-transport.js +0 -240
  304. package/dist/tracking/spans/span-transport.js.map +0 -1
  305. package/dist/tracking/spans/types.d.ts +0 -101
  306. package/dist/tracking/spans/types.d.ts.map +0 -1
  307. package/dist/tracking/spans/types.js +0 -6
  308. package/dist/tracking/spans/types.js.map +0 -1
  309. package/dist/tracking/tracker.d.ts +0 -30
  310. package/dist/tracking/tracker.d.ts.map +0 -1
  311. package/dist/tracking/tracker.js +0 -66
  312. package/dist/tracking/tracker.js.map +0 -1
  313. package/dist/tracking/tracking-handler.d.ts +0 -12
  314. package/dist/tracking/tracking-handler.d.ts.map +0 -1
  315. package/dist/tracking/tracking-handler.js +0 -148
  316. package/dist/tracking/tracking-handler.js.map +0 -1
  317. package/dist/tracking/transport.d.ts +0 -35
  318. package/dist/tracking/transport.d.ts.map +0 -1
  319. package/dist/tracking/transport.js +0 -133
  320. package/dist/tracking/transport.js.map +0 -1
  321. package/dist/tracking/types.d.ts +0 -21
  322. package/dist/tracking/types.d.ts.map +0 -1
  323. package/dist/tracking/types.js +0 -6
  324. package/dist/tracking/types.js.map +0 -1
  325. /package/dist/{tracking → telemetry}/spans/sanitize-payload.d.ts +0 -0
  326. /package/dist/{tracking → telemetry}/spans/sanitize-payload.js +0 -0
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Attribute-capping primitives shared by the telemetry emit paths: the per-value/bag/total size
3
+ * caps and the value truncator. Caps bound the per-record OTLP log-record / span attribute size.
4
+ */
5
+ /** Per-value character cap; longer values are truncated with {@link TRUNCATE_MARKER}. */
6
+ export declare const MAX_ATTR_VALUE_CHARS = 4096;
7
+ /** Max keys flattened out of a single open bag, bounding key cardinality from an unbounded bag. */
8
+ export declare const MAX_BAG_KEYS = 64;
9
+ /** Total character budget across one row's attribute map — the total-attr guard. */
10
+ export declare const MAX_TOTAL_ATTR_CHARS = 65536;
11
+ /** Truncate a value past the per-value cap, marking it so the cut is visible downstream. */
12
+ export declare function capValue(value: string, max: number): string;
13
+ //# sourceMappingURL=attributes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../src/telemetry/attributes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,yFAAyF;AACzF,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAGzC,mGAAmG;AACnG,eAAO,MAAM,YAAY,KAAK,CAAC;AAC/B,oFAAoF;AACpF,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAE1C,4FAA4F;AAC5F,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAK3D"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Attribute-capping primitives shared by the telemetry emit paths: the per-value/bag/total size
3
+ * caps and the value truncator. Caps bound the per-record OTLP log-record / span attribute size.
4
+ */
5
+ // ── Size caps ────────────────────────────────────────────────────────────────
6
+ /** Per-value character cap; longer values are truncated with {@link TRUNCATE_MARKER}. */
7
+ export const MAX_ATTR_VALUE_CHARS = 4096;
8
+ /** Marker appended to a truncated value. */
9
+ const TRUNCATE_MARKER = "…[truncated]";
10
+ /** Max keys flattened out of a single open bag, bounding key cardinality from an unbounded bag. */
11
+ export const MAX_BAG_KEYS = 64;
12
+ /** Total character budget across one row's attribute map — the total-attr guard. */
13
+ export const MAX_TOTAL_ATTR_CHARS = 65536;
14
+ /** Truncate a value past the per-value cap, marking it so the cut is visible downstream. */
15
+ export function capValue(value, max) {
16
+ if (value.length <= max)
17
+ return value;
18
+ // `max` could be smaller than the marker (defensive: no current caller passes one that small);
19
+ // clamp the kept length to ≥ 0 so the slice index never goes negative.
20
+ return value.slice(0, Math.max(0, max - TRUNCATE_MARKER.length)) + TRUNCATE_MARKER;
21
+ }
22
+ //# sourceMappingURL=attributes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attributes.js","sourceRoot":"","sources":["../../src/telemetry/attributes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,gFAAgF;AAChF,yFAAyF;AACzF,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC;AACzC,4CAA4C;AAC5C,MAAM,eAAe,GAAG,cAAc,CAAC;AACvC,mGAAmG;AACnG,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC;AAC/B,oFAAoF;AACpF,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC;AAE1C,4FAA4F;AAC5F,MAAM,UAAU,QAAQ,CAAC,KAAa,EAAE,GAAW;IACjD,IAAI,KAAK,CAAC,MAAM,IAAI,GAAG;QAAE,OAAO,KAAK,CAAC;IACtC,+FAA+F;IAC/F,uEAAuE;IACvE,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,GAAG,eAAe,CAAC;AACrF,CAAC"}
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * AsyncLocalStorage-based propagation of senpi tracking context.
3
3
  *
4
- * Why: when a senpi runtime processes a signal it owns a correlationId that
5
- * connects all events for that flow (scanner → decision → action → position →
6
- * DSL). If that flow makes LLM calls, the spans those calls produce should
7
- * carry the same correlationId so events and spans can be joined downstream.
4
+ * Why: when a senpi runtime processes a signal it owns a runId that connects
5
+ * all events for that flow (scanner → decision → action → position → DSL). If
6
+ * that flow makes LLM calls, the spans those calls produce should carry the
7
+ * same runId so events and spans can be joined downstream.
8
8
  *
9
9
  * AsyncLocalStorage is per-async-call-chain, so it is concurrency-safe even if
10
10
  * signal processing is parallelized later. Crossing process boundaries
@@ -13,7 +13,8 @@
13
13
  */
14
14
  import { AsyncLocalStorage } from "node:async_hooks";
15
15
  export interface TrackingContext {
16
- correlationId: string;
16
+ /** Per-scan-run id joining this flow's events and spans to the producing scanner run. */
17
+ runId: string;
17
18
  /** Strategy wallet (lowercased). May be empty when a runtime has no wallet (rare). */
18
19
  address: string;
19
20
  /** Recipe name (the YAML `name:` field). User-meaningful label, e.g. "viper". */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/telemetry/context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,WAAW,eAAe;IAC9B,yFAAyF;IACzF,KAAK,EAAE,MAAM,CAAC;IACd,sFAAsF;IACtF,OAAO,EAAE,MAAM,CAAC;IAChB,iFAAiF;IACjF,UAAU,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,4FAA4F;IAC5F,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;CACtD;AAED,eAAO,MAAM,eAAe,oCAA2C,CAAC;AAExE,0FAA0F;AAC1F,wBAAgB,kBAAkB,IAAI,eAAe,GAAG,IAAI,CAE3D"}
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * AsyncLocalStorage-based propagation of senpi tracking context.
3
3
  *
4
- * Why: when a senpi runtime processes a signal it owns a correlationId that
5
- * connects all events for that flow (scanner → decision → action → position →
6
- * DSL). If that flow makes LLM calls, the spans those calls produce should
7
- * carry the same correlationId so events and spans can be joined downstream.
4
+ * Why: when a senpi runtime processes a signal it owns a runId that connects
5
+ * all events for that flow (scanner → decision → action → position → DSL). If
6
+ * that flow makes LLM calls, the spans those calls produce should carry the
7
+ * same runId so events and spans can be joined downstream.
8
8
  *
9
9
  * AsyncLocalStorage is per-async-call-chain, so it is concurrency-safe even if
10
10
  * signal processing is parallelized later. Crossing process boundaries
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/telemetry/context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAuBrD,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,iBAAiB,EAAmB,CAAC;AAExE,0FAA0F;AAC1F,MAAM,UAAU,kBAAkB;IAChC,OAAO,eAAe,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC;AAC5C,CAAC"}
@@ -1,15 +1,33 @@
1
1
  /**
2
- * Recording contract — the record types the runtime hands to a {@link RecordingEmitter}, covering
3
- * domain events and runtime errors.
2
+ * Event contract types + pure builders: bus-event payloads → telemetry records.
4
3
  *
5
4
  * Each record is one atomic "work unit": plain, immutable, serializable data with no methods or
6
5
  * builder dance; variants are modelled with a discriminator field plus optionals. The types are
7
6
  * transport-agnostic — nothing here knows about spans, attributes, or any wire format.
8
7
  *
9
- * Identity (service, recipe, runtime, strategy address, boot id) is stamped by the emitter and is
10
- * never on a record — see {@link IdentityEnvelope}. Timestamps are epoch milliseconds; ISO strings
11
- * from the bus are converted before they reach a record, so consumers never parse dates.
8
+ * The builders read a loosely-typed payload defensively (the `asObject`/`str`/`num`/`bool`/
9
+ * `toEpochMs` helpers below) and return a fully-populated record (or `null` when the event cannot
10
+ * yield one). Redaction is NOT done here — records are populated faithfully; a downstream mapper is
11
+ * the single redaction seam.
12
+ *
13
+ * Identity (service, recipe, runtime, strategy address, boot id) is stamped by the identity layer
14
+ * and is never on a record — see {@link IdentityEnvelope}. Timestamps are epoch milliseconds; ISO
15
+ * strings (and, for a scan result, an epoch-ms number) from the bus are converted once here, so
16
+ * consumers never parse dates.
17
+ */
18
+ /** A plain object, or `undefined` for anything else (null, array, primitive). */
19
+ export declare function asObject(value: unknown): Record<string, unknown> | undefined;
20
+ /** A non-empty string, or `undefined`. */
21
+ export declare function str(value: unknown): string | undefined;
22
+ /** A finite number, coercing numeric strings; `undefined` otherwise. */
23
+ export declare function num(value: unknown): number | undefined;
24
+ /** A boolean, or `undefined` (so absence stays distinct from `false`). */
25
+ export declare function bool(value: unknown): boolean | undefined;
26
+ /**
27
+ * ISO string or epoch-ms number → epoch ms. Falls back to `fallbackMs` when the value is missing
28
+ * or unparseable, so a record always carries a usable timestamp instead of `NaN`.
12
29
  */
30
+ export declare function toEpochMs(value: unknown, fallbackMs: number): number;
13
31
  /**
14
32
  * Trade direction as the bus reports it. The alias itself is non-null; sites that admit a
15
33
  * non-directional signal widen it to `TradeDirection | null` (e.g. {@link SignalSummary}).
@@ -36,7 +54,7 @@ export type ScannerRunOutcome = "complete" | "skipped" | "error";
36
54
  * One scanner execution attempt (the work unit). Folds the bus's `scanner:run:start` +
37
55
  * terminal `scanner:run:{complete,skip,error}` events into a single atomic record so a
38
56
  * duration is always derivable (`endedAt - startedAt`). Skip/error early-exit paths can
39
- * terminate without a paired `scanner:run:start` event; in that case Task 4 fills `startedAt`
57
+ * terminate without a paired `scanner:run:start` event; in that case `startedAt` is filled
40
58
  * with the run's attempt timestamp (which equals `endedAt`), so duration is 0 rather than absent.
41
59
  * The skipped/disabled distinction lives on `outcome`/`statusDetail`, not on a missing start.
42
60
  */
@@ -49,8 +67,8 @@ export interface ScannerRunRecord {
49
67
  /** Raw engine status: `ok`|`heartbeat`|`skipped`|`halted`|`disabled`|`error`. */
50
68
  readonly statusDetail?: string;
51
69
  /**
52
- * Run start, epoch ms (from `scanner:run:start`). Required: on a no-start early-exit path Task 4
53
- * sets it to the attempt timestamp (= `endedAt`), so a `Duration` is always derivable.
70
+ * Run start, epoch ms (from `scanner:run:start`). Required: on a no-start early-exit path it is
71
+ * set to the attempt timestamp (= `endedAt`), so a `Duration` is always derivable.
54
72
  */
55
73
  readonly startedAt: number;
56
74
  /** Run completion, epoch ms (terminal event timestamp). */
@@ -68,7 +86,7 @@ export interface ScannerRunRecord {
68
86
  /** Error class name (`Error.name`) when `outcome === "error"` — the error-grouping key. */
69
87
  readonly errorName?: string;
70
88
  }
71
- /** How the decision was produced (`emitTrackingDecision` reports this). */
89
+ /** How the decision was produced. */
72
90
  export type DecisionMode = "llm" | "script" | "agent" | "rule" | "none";
73
91
  /** Decision produced by the decision layer for an evaluation pass. */
74
92
  export interface SignalDecision {
@@ -87,8 +105,6 @@ export interface SignalDecision {
87
105
  readonly model?: string;
88
106
  readonly tokensUsed?: number | null;
89
107
  readonly durationMs?: number;
90
- /** Epoch ms when the decision phase ended — the llm.decision child's end; its window is `[endedAt − durationMs, endedAt]`. */
91
- readonly endedAt?: number;
92
108
  }
93
109
  /** Coarse result of acting on an evaluated signal. */
94
110
  export type SignalOutcomeResult = "executed" | "rejected" | "skipped" | "below_confidence" | "error";
@@ -219,7 +235,7 @@ export interface PositionLifecycleRecord {
219
235
  * Externally-detected vs runtime-opened discriminator (`"runtime_opened"` |
220
236
  * `"externally_detected"`), from the PositionIdRegistry's intent-vs-fresh mint observation.
221
237
  * Populated on `opened` only (the registry surfaces it solely on confirm-open); absent on every
222
- * other lifecycle event. See the Task 8a impl notes.
238
+ * other lifecycle event.
223
239
  */
224
240
  readonly reconciliationSource?: string;
225
241
  }
@@ -414,14 +430,14 @@ export interface RuntimeStateRecord {
414
430
  export type DecisionActionIntent = "open" | "close" | "none";
415
431
  /**
416
432
  * The judgment over one evaluation pass, as a discrete log event (`decision.made`). Derived from
417
- * the same `tracking.action_result` path that builds {@link SignalEvaluatedRecord} — no new bus
418
- * event. The trace view keeps the decision on the `llm.decision` span; this is its logs-only twin so
433
+ * the same action-result payload that builds {@link SignalEvaluatedRecord}. The trace view keeps the
434
+ * decision on the `llm.decision` span; this is its logs-only twin so
419
435
  * a logs-only consumer (the self-learning agent) can read "what the strategy decided and why"
420
436
  * without walking spans.
421
437
  *
422
438
  * `reasoning` is the Body (uncapped free-text). Market-context fields (`fundingRegime`/
423
- * `marketRegime`/`markPrice`) are reserved keys: they are NOT on the `tracking.action_result`
424
- * payload today, so 8a leaves them undefined (absent = NULL) — see the Task 8a implementation notes.
439
+ * `marketRegime`/`markPrice`) are reserved keys: they are NOT on the action-result
440
+ * payload today, so they are left undefined (absent = NULL).
425
441
  */
426
442
  export interface DecisionMadeRecord {
427
443
  readonly type: "decision_made";
@@ -444,8 +460,8 @@ export interface DecisionMadeRecord {
444
460
  export type SignalOutcomeDisposition = "accepted" | "rejected" | "blocked" | "error";
445
461
  /**
446
462
  * One signal's disposition, as a discrete log event (`signal.outcome`). One per evaluation in the
447
- * pass, derived from the same `tracking.action_result` path that builds {@link SignalEvaluatedRecord}
448
- * — no new bus event. The four-value `result` collapses the granular per-signal
463
+ * pass, derived from the same action-result payload that builds {@link SignalEvaluatedRecord}.
464
+ * The four-value `result` collapses the granular per-signal
449
465
  * {@link SignalOutcomeResult}; the open `reasonCode` is kept verbatim for the fine-grained reason.
450
466
  *
451
467
  * `rawSignal` is the variable-shaped scanner evidence → the Body (redacted in the mapper). The
@@ -481,11 +497,11 @@ export interface SignalOutcomeRecord {
481
497
  }
482
498
  /**
483
499
  * One DSL exit attempt as a discrete log event (`dsl.close_attempt`) — exit attempts / venue
484
- * failures / retries, span-only today. Derived from the existing `tracking.dsl_close_attempt` event
500
+ * failures / retries, span-only today. Derived from the DSL close-attempt payload
485
501
  * (already consumed to build the {@link DslTickRecord} trace) — a second consumer for the log.
486
502
  *
487
503
  * No `errorName`: only `String(e)` is available at the producer emit site, so the error class name
488
- * is omitted (see the Task 8a impl notes).
504
+ * is omitted.
489
505
  */
490
506
  export interface DslCloseAttemptRecord {
491
507
  readonly type: "dsl_close_attempt";
@@ -501,8 +517,8 @@ export interface DslCloseAttemptRecord {
501
517
  }
502
518
  /**
503
519
  * One scan's funnel summary as a discrete log event (`scanner.summary`) — the anti-spam roll-up of
504
- * what a scan considered and dropped. Derived from the SAME `tracking.scanner_run` payload that
505
- * builds {@link ScannerRunRecord} (its `summary.funnel`), so no new bus event. One row per scan: the
520
+ * what a scan considered and dropped. Derived from the SAME scanner-run payload that
521
+ * builds {@link ScannerRunRecord} (its `summary.funnel`). One row per scan: the
506
522
  * dropped candidates are ONE Body array, never one row per drop.
507
523
  *
508
524
  * `passedAssets` is a small linkage list (the survivors, each detailed by its own `signal.outcome`);
@@ -530,15 +546,14 @@ export type OrderEventKind = "placed" | "filled" | "failed";
530
546
  * One order-execution event as a discrete log event (`order.{placed,filled,failed}`) — the venue
531
547
  * execution granularity (placement vs fill, maker/taker, venue rejects) that the position-level
532
548
  * `position_lifecycle` event can't carry. Emitted additively by the open/close actions at the
533
- * submit/success/failure points (the new `tracking.order_*` bus events). `event` discriminates which
549
+ * submit/success/failure points. `event` discriminates which
534
550
  * optional fields apply.
535
551
  *
536
552
  * Overlap with `position_lifecycle.opened`/`.closed` is intentional: the lifecycle event is the
537
553
  * settled position-level fact; `order.*` is the execution-level fact. Both are emitted; no dedupe.
538
554
  *
539
- * `limitPrice`/`fees`/`partial` are reserved-but-unpopulated in 8a — they are not in scope at the
540
- * action's submission point (see the Task 8a impl notes). `error` on `failed` is the optional venue
541
- * raw response → the Body.
555
+ * `limitPrice`/`fees`/`partial` are reserved-but-unpopulated — they are not in scope at the action's
556
+ * submission point. `error` on `failed` is the optional venue raw response → the Body.
542
557
  */
543
558
  export interface OrderEventRecord {
544
559
  readonly type: "order_event";
@@ -551,15 +566,15 @@ export interface OrderEventRecord {
551
566
  readonly direction?: TradeDirection | null;
552
567
  readonly orderType?: string;
553
568
  readonly size?: number;
554
- /** Reserved — unpopulated in 8a (not in scope at the submission point; see impl notes). */
569
+ /** Reserved — unpopulated (not in scope at the submission point). */
555
570
  readonly limitPrice?: number;
556
571
  readonly reduceOnly?: boolean;
557
572
  readonly fillPrice?: number;
558
573
  readonly fillSize?: number;
559
574
  readonly executionAsMaker?: boolean | null;
560
- /** Reserved — unpopulated in 8a (not in scope; see impl notes). */
575
+ /** Reserved — unpopulated (not in scope). */
561
576
  readonly fees?: number;
562
- /** Reserved — unpopulated in 8a (not in scope; see impl notes). */
577
+ /** Reserved — unpopulated (not in scope). */
563
578
  readonly partial?: boolean;
564
579
  readonly reason?: string;
565
580
  readonly errorName?: string;
@@ -568,4 +583,97 @@ export interface OrderEventRecord {
568
583
  }
569
584
  /** Discriminated union of every record type. */
570
585
  export type RecordingRecord = ScannerRunRecord | SignalEvaluatedRecord | PositionLifecycleRecord | DslTransitionRecord | DslTickRecord | RuntimeErrorRecord | RuntimeLifecycleRecord | RuntimeStateRecord | DecisionMadeRecord | SignalOutcomeRecord | ScannerSummaryRecord | DslCloseAttemptRecord | OrderEventRecord;
571
- //# sourceMappingURL=records.d.ts.map
586
+ /** From a scanner-run payload (complete / skipped / error): complete runs carry the whole
587
+ * `ScanResult`; skip/error carry status + reason. */
588
+ export declare function buildScannerRun(payload: unknown, nowMs: number): ScannerRunRecord | null;
589
+ /**
590
+ * The `scanner.summary` anti-spam log record, derived from the SAME scanner-run payload
591
+ * that {@link buildScannerRun} reads (its `data.summary.funnel.dropped`).
592
+ *
593
+ * Returns `null` when there is no `data.summary.funnel`: skip/error runs and scanners without a
594
+ * funnel produce no summary event (the survivors are detailed by their own `signal.outcome` events,
595
+ * and "didn't run at all" is `scanner_run.skipped`). One record per scan; the dropped candidates are
596
+ * one Body array, never one row per drop.
597
+ */
598
+ export declare function buildScannerSummary(payload: unknown, nowMs: number): ScannerSummaryRecord | null;
599
+ /**
600
+ * Read-only position.id lookup, (address, dex, asset) → the live id or undefined. Injected by
601
+ * the runtime as a narrow accessor over the PositionIdRegistry — the registry is the single
602
+ * source of truth; builders never receive the registry (or RuntimeContext) itself.
603
+ */
604
+ export type PositionIdResolver = (address: string, dex: string, asset: string) => string | undefined;
605
+ /**
606
+ * Build the whole pass record from an action-result payload alone — the producers echo the scan
607
+ * provenance onto the payload (`scannerId`, `scannerSignals`, `minConfidence`, `runId`), and the
608
+ * decision itself rides `result.data._decisionMeta`, so no pairing is needed.
609
+ *
610
+ * `evaluations` is one entry per per-signal result, each enriched with the matching input signal
611
+ * (or a summary synthesized from the result entry when none matches — e.g. close-position's
612
+ * static-params path, which carries no `scannerSignals`). A pass without `_decisionMeta` yields no
613
+ * `decision` (the contract allows a decision-less pass).
614
+ *
615
+ * The pass window is a point anchored at the action-result timestamp (`startedAt === endedAt`); the
616
+ * decision's own `durationMs` (from `_decisionMeta`) carries the timing.
617
+ */
618
+ export declare function buildSignalEvaluated(actionResultPayload: unknown, nowMs: number, resolvePositionId?: PositionIdResolver): SignalEvaluatedRecord | null;
619
+ /**
620
+ * The pass's `decision.made` log record, derived from the built pass record — `null` when the pass
621
+ * carried no decision (a decision-less pass yields no judgment event). One per pass.
622
+ */
623
+ export declare function buildDecisionMade(record: SignalEvaluatedRecord): DecisionMadeRecord | null;
624
+ /**
625
+ * One `signal.outcome` log record per evaluation in the pass, derived from the built pass record.
626
+ * `rawSignal` is the evaluation's {@link SignalSummary} (incl. its `meta`/`factors`) — the variable
627
+ * scanner evidence; redaction over it happens in the mapper, not here.
628
+ */
629
+ export declare function buildSignalOutcomes(record: SignalEvaluatedRecord): SignalOutcomeRecord[];
630
+ /**
631
+ * From the DSL close-attempt monitor payload — the second consumer (alongside the
632
+ * tick trace). Fields at the payload root: `positionId`, `asset`, `dex`, `closeReason`, `attempt`,
633
+ * `outcome` ("ok"|"error"), `error`, ISO `timestamp`. `null` when the payload is not an object.
634
+ */
635
+ export declare function buildDslCloseAttempt(payload: unknown, nowMs: number): DslCloseAttemptRecord | null;
636
+ /**
637
+ * From the additive order events the open/close actions fire (the HookEvent shape:
638
+ * fields under a `data` envelope). One record per event; `eventKind` discriminates which fields the
639
+ * payload carries (placed: order/size; filled: fill; failed: reason/error). `positionId` maps from
640
+ * `__positionId`. `null` when no `asset` is resolvable — the asset is the one always-present scalar.
641
+ *
642
+ * Faithful population only (no redaction here — the mapper is the single redaction seam).
643
+ */
644
+ export declare function buildOrderEvent(eventKind: OrderEventKind, payload: unknown, nowMs: number): OrderEventRecord | null;
645
+ /**
646
+ * From an `on_position_*` event. Action-driven events arrive as HookEvents (fields under a `data`
647
+ * envelope); the DSL monitor / reconcile paths emit `on_position_closed` flat (fields at the root,
648
+ * always with an `asset`), so a flat payload carrying an `asset` is read as-is. The DSL archive
649
+ * handler's re-broadcast of a close is marked `source: "dsl_archive"` and skipped — the close it
650
+ * mirrors was already recorded from the original emit. (`on_open_order_submitted` is deliberately
651
+ * not recorded — its submit fact is already on the signal-evaluation view, avoiding a double count.)
652
+ */
653
+ export declare function buildPositionLifecycle(event: PositionLifecycleEvent, payload: unknown, nowMs: number): PositionLifecycleRecord | null;
654
+ /** From a `dsl.*` event (fields live at the payload root, with an ISO `timestamp`). */
655
+ export declare function buildDslTransition(transition: DslTransitionKind, payload: unknown, nowMs: number): DslTransitionRecord | null;
656
+ /**
657
+ * From the monitor's DSL tick / position / close-attempt / sl-update payloads (fields at the
658
+ * payload root). Each payload yields one record —
659
+ * the deterministic ids derived from `tickId` (and `tickId:positionKey`, both bootId-scoped by
660
+ * the mapper) thread them into one trace, so no pairing is needed here. Essentials are `tickId`
661
+ * plus a numeric work window; on clock skew (`endedAt < startedAt`) the start is pulled up to the
662
+ * end, matching the pass-window convention. The price-fetch window is kept only when both stamps
663
+ * are present (a half window is fabricated extent). No `nowMs` fallback: work windows are
664
+ * producer-stamped; nothing here is fabricated.
665
+ */
666
+ export declare function buildDslTick(unit: DslTickUnit, payload: unknown): DslTickRecord | null;
667
+ /** From `signal_processing_error` — a bucket-2 error with no specific domain record home. */
668
+ export declare function buildRuntimeError(payload: unknown, nowMs: number): RuntimeErrorRecord | null;
669
+ /**
670
+ * From the runtime-started payload. The `config` blob is the injected **unresolved** config (not the
671
+ * resolved `data.config`): resolving inlines secrets, and the unresolved form is what the
672
+ * `configHash` is computed over, so blob and hash agree.
673
+ */
674
+ export declare function buildRuntimeStarted(payload: unknown, unresolvedConfig: Record<string, unknown> | undefined, nowMs: number): RuntimeLifecycleRecord | null;
675
+ /** From the runtime-stopped payload. */
676
+ export declare function buildRuntimeStopped(payload: unknown, nowMs: number): RuntimeLifecycleRecord | null;
677
+ /** From the self-pause HookEvents (`on_strategy_self_paused`/`on_daily_limit_hit`/`on_drawdown_cap_hit`). */
678
+ export declare function buildRuntimePaused(payload: unknown, fallbackGateId: string, nowMs: number): RuntimeStateRecord | null;
679
+ //# sourceMappingURL=event-builders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-builders.d.ts","sourceRoot":"","sources":["../../src/telemetry/event-builders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAOH,iFAAiF;AACjF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAK5E;AAED,0CAA0C;AAC1C,wBAAgB,GAAG,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS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