@brickkit/cli 0.11.0 → 0.13.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 (177) hide show
  1. package/dashboard-dist/CollapsiblePanel-CbUysOp5.js +2 -0
  2. package/dashboard-dist/CompositeRoot-D4sRkYq3.js +1 -0
  3. package/dashboard-dist/Geist-Variable.woff2 +0 -0
  4. package/dashboard-dist/GeistMono-Variable.woff2 +0 -0
  5. package/dashboard-dist/PopoverPopup-CiI2avT_.js +1 -0
  6. package/dashboard-dist/api-reference-mT9VNcPb.js +265 -0
  7. package/dashboard-dist/app.css +2 -2
  8. package/dashboard-dist/app.js +12 -13
  9. package/dashboard-dist/ccount-CcG1m-Yh.js +1 -0
  10. package/dashboard-dist/client-CwATkLJa.js +1 -0
  11. package/dashboard-dist/core-BEUWp6B5.js +1 -0
  12. package/dashboard-dist/docs-BRrtyxDB.js +4 -0
  13. package/dashboard-dist/docs.css +1 -1
  14. package/dashboard-dist/kit.js +1 -1
  15. package/dashboard-dist/popover-Bj9x-88h.js +1 -0
  16. package/dist/bin.d.ts +0 -2
  17. package/dist/bin.js +309 -211
  18. package/dist/bin.js.map +1 -1
  19. package/dist/build.js +463 -0
  20. package/dist/build.js.map +1 -0
  21. package/dist/client-contract-file.js +356 -1
  22. package/dist/client-contract-file.js.map +1 -0
  23. package/dist/compiler.d.ts +12 -3
  24. package/dist/compiler.js +1 -1
  25. package/dist/compiler2.js +13 -7
  26. package/dist/compiler2.js.map +1 -1
  27. package/dist/config.d.ts +3 -0
  28. package/dist/config.js +1 -252
  29. package/dist/config2.d.ts +122 -0
  30. package/dist/config2.js +207 -0
  31. package/dist/config2.js.map +1 -0
  32. package/dist/dashboard-extension.d.ts +3 -2
  33. package/dist/{dev-telemetry-store.js → dashboard-host.js} +1381 -1432
  34. package/dist/dashboard-host.js.map +1 -0
  35. package/dist/dashboard-protocol.js +189 -0
  36. package/dist/dashboard-protocol.js.map +1 -0
  37. package/dist/dashboard.d.ts +8 -135
  38. package/dist/definitions.js +33 -0
  39. package/dist/definitions.js.map +1 -0
  40. package/dist/dev-application.js +34 -0
  41. package/dist/dev-application.js.map +1 -0
  42. package/dist/dev-protocol.js +21 -0
  43. package/dist/dev-protocol.js.map +1 -0
  44. package/dist/dev-reporter.d.ts +0 -2
  45. package/dist/dev-reporter.js +3 -3
  46. package/dist/dev-reporter.js.map +1 -1
  47. package/dist/dev-telemetry.js +8 -24
  48. package/dist/dev-telemetry.js.map +1 -1
  49. package/dist/dev-worker.js +80 -21
  50. package/dist/dev-worker.js.map +1 -1
  51. package/dist/index.d.ts +18 -87
  52. package/dist/index.js +12 -6
  53. package/dist/index.js.map +1 -0
  54. package/dist/lint/oxlint.d.ts +0 -2
  55. package/dist/lint/oxlint.js +6 -5
  56. package/dist/lint/oxlint.js.map +1 -1
  57. package/dist/own-module.js +7 -0
  58. package/dist/own-module.js.map +1 -0
  59. package/dist/plugin.d.ts +6 -11
  60. package/dist/plugin.js +6 -42
  61. package/dist/plugin.js.map +1 -1
  62. package/dist/production-dashboard.d.ts +2 -0
  63. package/dist/production-dashboard.js +51 -0
  64. package/dist/production-dashboard.js.map +1 -0
  65. package/dist/production-dashboard2.d.ts +34 -0
  66. package/dist/{presets.js → project.js} +107 -113
  67. package/dist/project.js.map +1 -0
  68. package/dist/serve.d.ts +24 -0
  69. package/dist/serve.js +1 -0
  70. package/dist/serve2.js +49 -0
  71. package/dist/serve2.js.map +1 -0
  72. package/dist/vite.d.ts +0 -2
  73. package/dist/vite.js +28 -51
  74. package/dist/vite.js.map +1 -1
  75. package/dist/workflows.d.ts +2 -4
  76. package/dist/workflows2.js +60 -39
  77. package/dist/workflows2.js.map +1 -1
  78. package/inspector-dist/client/assets/api.rpc-BvRk9kiK.js +0 -0
  79. package/inspector-dist/client/assets/api.stream._streamId-BvRk9kiK.js +0 -0
  80. package/inspector-dist/client/assets/app-CeSwVsRm.css +2 -0
  81. package/inspector-dist/client/assets/dist-BK8w6xOr.js +3930 -0
  82. package/inspector-dist/client/assets/dist-CG2aVufI.js +197 -0
  83. package/inspector-dist/client/assets/entry.client-D9jbgmTR.js +9391 -0
  84. package/inspector-dist/client/assets/highlighted-body-B3W2YXNL-CfRnuITN.js +34 -0
  85. package/inspector-dist/client/assets/home-hwPlkNhv.js +4034 -0
  86. package/inspector-dist/client/assets/jsx-runtime-CPEah4WQ.js +7084 -0
  87. package/inspector-dist/client/assets/manifest-0e76e9ac.js +1 -0
  88. package/inspector-dist/client/assets/mermaid-3ZIDBTTL-ZDR2PNY_.js +1 -0
  89. package/inspector-dist/client/assets/root-ChBNTZd2.css +2 -0
  90. package/inspector-dist/client/assets/root-SLeEf-sT.js +320 -0
  91. package/inspector-dist/client/assets/run-detail-DYbVkIFH.js +1871 -0
  92. package/inspector-dist/client/assets/tabs-CaJisoyb.js +73751 -0
  93. package/inspector-dist/client/assets/tabs-L5XKzOpP.css +1 -0
  94. package/inspector-dist/client/assets/zstd-browser-decoder-D94wmfAU.js +41 -0
  95. package/inspector-dist/server/assets/app-DGlfWVUI.js +99330 -0
  96. package/inspector-dist/server/assets/chunk-RLXIAIE6-F0SJZlei.js +42975 -0
  97. package/inspector-dist/server/assets/dist-BCbwm6jl.js +10325 -0
  98. package/inspector-dist/server/assets/dist-CG2aVufI.js +197 -0
  99. package/inspector-dist/server/assets/dist-Ce0I2PUv.js +1137 -0
  100. package/inspector-dist/server/assets/dist-DY0UlahA.js +1642 -0
  101. package/inspector-dist/server/assets/encryption-DdQgC8Rk.js +886 -0
  102. package/inspector-dist/server/assets/event-metadata-n7E4zEmT.js +145 -0
  103. package/inspector-dist/server/assets/functions-CNVQtbgg.js +1170 -0
  104. package/inspector-dist/server/assets/global-singleton-D8sIN5du.js +80 -0
  105. package/inspector-dist/server/assets/highlighted-body-B3W2YXNL-CWRzMxYD.js +34 -0
  106. package/inspector-dist/server/assets/mermaid-3ZIDBTTL-D0v0ngVr.js +1 -0
  107. package/inspector-dist/server/assets/parse-Begau9cA.js +469 -0
  108. package/inspector-dist/server/assets/rolldown-runtime-C1I3wEg2.js +43 -0
  109. package/inspector-dist/server/assets/serialization-format-BbuGfHog.js +476 -0
  110. package/inspector-dist/server/assets/token-BgMmJNP5.js +60 -0
  111. package/inspector-dist/server/assets/token-BrUX0bxz.js +55 -0
  112. package/inspector-dist/server/assets/token-util-DZN32qmT.js +455 -0
  113. package/inspector-dist/server/assets/wrapper-CIC3w0oC.js +3624 -0
  114. package/inspector-dist/server/assets/ws-transport-CxTYB11n.js +29476 -0
  115. package/inspector-dist/server/assets/zstd-browser-decoder-D7bCXbGg.js +38 -0
  116. package/inspector-dist/server/index.js +1 -58
  117. package/package.json +39 -28
  118. package/vite-client.d.ts +1 -1
  119. package/dashboard-dist/CollapsiblePanel-BX79_W-b.js +0 -2
  120. package/dashboard-dist/CompositeRoot-xzybXjnx.js +0 -1
  121. package/dashboard-dist/PopoverPopup-CvlmC7EL.js +0 -1
  122. package/dashboard-dist/api-reference-BcAYVYwJ.js +0 -260
  123. package/dashboard-dist/core-BGO9JZ1r.js +0 -1
  124. package/dashboard-dist/docs-DHikPD2v.js +0 -4
  125. package/dashboard-dist/popover-DG498XHH.js +0 -1
  126. package/dist/app-entry.js +0 -1
  127. package/dist/app-entry2.js +0 -19
  128. package/dist/app-entry2.js.map +0 -1
  129. package/dist/bin.d.ts.map +0 -1
  130. package/dist/client-contract-file2.js +0 -34
  131. package/dist/client-contract-file2.js.map +0 -1
  132. package/dist/client-contract.js +0 -1
  133. package/dist/client-contract2.js +0 -294
  134. package/dist/client-contract2.js.map +0 -1
  135. package/dist/config.js.map +0 -1
  136. package/dist/dashboard-extension.d.ts.map +0 -1
  137. package/dist/dev-reporter.d.ts.map +0 -1
  138. package/dist/dev-telemetry-store.js.map +0 -1
  139. package/dist/emit.d.ts +0 -7
  140. package/dist/emit.d.ts.map +0 -1
  141. package/dist/index.d.ts.map +0 -1
  142. package/dist/lint/oxlint.d.ts.map +0 -1
  143. package/dist/plugin.d.ts.map +0 -1
  144. package/dist/presets.js.map +0 -1
  145. package/dist/runner.js +0 -523
  146. package/dist/runner.js.map +0 -1
  147. package/dist/vite.d.ts.map +0 -1
  148. package/dist/workflows.d.ts.map +0 -1
  149. package/inspector-dist/client/assets/api.rpc-l0sNRNKZ.js +0 -1
  150. package/inspector-dist/client/assets/api.stream._streamId-l0sNRNKZ.js +0 -1
  151. package/inspector-dist/client/assets/app-CvoGgWcV.css +0 -1
  152. package/inspector-dist/client/assets/entry.client-BJ6G3n5t.js +0 -11697
  153. package/inspector-dist/client/assets/highlighted-body-B3W2YXNL-C-3wZnxf.js +0 -19
  154. package/inspector-dist/client/assets/home-CSKAS4P2.js +0 -4979
  155. package/inspector-dist/client/assets/index-DECCyMR0.js +0 -4482
  156. package/inspector-dist/client/assets/index-Dot7CgrA.js +0 -9837
  157. package/inspector-dist/client/assets/index-HqNj_XIX.js +0 -200
  158. package/inspector-dist/client/assets/manifest-139c9319.js +0 -1
  159. package/inspector-dist/client/assets/mermaid-3ZIDBTTL-DC0K8uTy.js +0 -58626
  160. package/inspector-dist/client/assets/mermaid-3ZIDBTTL-F88p7PFX.css +0 -1
  161. package/inspector-dist/client/assets/root-BMHd_XHz.css +0 -1
  162. package/inspector-dist/client/assets/root-cbi6iYwg.js +0 -305
  163. package/inspector-dist/client/assets/run-detail-CWoGxu_0.css +0 -1
  164. package/inspector-dist/client/assets/run-detail-Cc7tSGNq.js +0 -6237
  165. package/inspector-dist/client/assets/world-config-context-BAD1QCrR.js +0 -26
  166. package/inspector-dist/client/assets/zstd-browser-decoder-BQoRpP7L.js +0 -28
  167. package/inspector-dist/server/assets/app-DUP5RybL.js +0 -174880
  168. package/inspector-dist/server/assets/highlighted-body-B3W2YXNL-D2g4hL2-.js +0 -71
  169. package/inspector-dist/server/assets/index-BfLBLRRi.js +0 -204
  170. package/inspector-dist/server/assets/index-BzrGWk7J.js +0 -1164
  171. package/inspector-dist/server/assets/index-D71yP6AL.js +0 -191
  172. package/inspector-dist/server/assets/index-wGSWRns3.js +0 -1296
  173. package/inspector-dist/server/assets/mermaid-3ZIDBTTL-DsvuKoEV.js +0 -58
  174. package/inspector-dist/server/assets/token-ClUZZwXl.js +0 -95
  175. package/inspector-dist/server/assets/token-util-DSxMZ6nI.js +0 -33
  176. package/inspector-dist/server/assets/wrapper-B3vstpCO.js +0 -67
  177. package/inspector-dist/server/assets/zstd-browser-decoder-Dn82m2BU.js +0 -77
@@ -0,0 +1,145 @@
1
+ // ../../node_modules/.bun/@workflow+world@5.1.0/node_modules/@workflow/world/dist/event-metadata.js
2
+ function getOwnProperty(object, key) {
3
+ return Object.hasOwn(object, key) ? object[key] : void 0;
4
+ }
5
+ /**
6
+ * Whether an event is a sealed-log filler occupying an abandoned slot.
7
+ *
8
+ * The single home for this test, deliberately: a noop is invisible to the run
9
+ * but it is a real row of the log, so every pass over a log has to decide
10
+ * whether it is walking positions (count it) or reconstructing what happened
11
+ * (skip it). The replay engines and observability trace builder must agree
12
+ * that a noop's `createdAt` — the sealer's wall clock, which can postdate every
13
+ * real event around it — never becomes a time the run observed.
14
+ *
15
+ * Keeping the classifier in this schema-free module lets replay code make that
16
+ * decision without pulling the event validation graph into workflow bundles.
17
+ */
18
+ function isSealedNoopEvent(event) {
19
+ return event.eventType === "noop";
20
+ }
21
+ /**
22
+ * Groups event types into the classes a replay tracks per entity: the entity
23
+ * named by the event's `correlationId`, or the run itself for run events,
24
+ * which carry none.
25
+ *
26
+ * Types that share a class are the mutually exclusive outcomes of one
27
+ * decision, so the log records the class once and the first event of it is the
28
+ * one that counts: a step either completes or fails.
29
+ *
30
+ * Classes are independent of each other. A step whose result is in the log has
31
+ * still recorded exactly one `step_created`, and can still record another
32
+ * `step_started` if an attempt is running somewhere. What a class bounds is
33
+ * which events can be *ignored*: a replay may pass over an event whose class
34
+ * it already recorded for that entity and which no consumer wants (see
35
+ * `EventsConsumer`), and only then.
36
+ *
37
+ * `attr_set` is here for the correlation id a workflow-body attribute write
38
+ * draws, which resolves exactly once: the dispatcher's consumer takes the
39
+ * matching event and deregisters, so a second event under that id has no
40
+ * callback left and never will. Without a class it would instead be parked for
41
+ * a consumer that cannot come, and parking is only ever settled by the
42
+ * workflow function returning, at which point it is reported as a stranded
43
+ * event and kills a run that did all its work correctly. An attribute write
44
+ * from a *step* body carries no correlation id and is claimed by the
45
+ * structural lifecycle consumer in `workflow.ts` on the way past, so it is
46
+ * consumed rather than skipped and several of them never collapse into one
47
+ * class.
48
+ *
49
+ * Note the omissions, all of them types a mapping would be dead weight for.
50
+ * `hook_received` and `hook_conflict` are deliveries whose consumer subscribes
51
+ * lazily, and `run_created` precedes every replay. The terminal run types are
52
+ * absent for a different reason: recording a class requires a consumer to take
53
+ * an event of it, and no consumer takes `run_completed` / `run_failed` /
54
+ * `run_cancelled`: the runtime exits before replaying the body once the log
55
+ * holds one, so they never reach a consumer at all. An entry for them could
56
+ * never match.
57
+ */
58
+ var ENTITY_EVENT_CLASS_BY_TYPE = {
59
+ attr_set: "attr_set",
60
+ step_created: "step_created",
61
+ step_started: "step_started",
62
+ step_retrying: "step_retrying",
63
+ step_completed: "step_terminal",
64
+ step_failed: "step_terminal",
65
+ wait_created: "wait_created",
66
+ wait_completed: "wait_completed",
67
+ hook_created: "hook_created",
68
+ hook_disposed: "hook_disposed",
69
+ run_started: "run_started"
70
+ };
71
+ function entityEventClass(eventType) {
72
+ return getOwnProperty(ENTITY_EVENT_CLASS_BY_TYPE, eventType);
73
+ }
74
+ /**
75
+ * Classes whose event closes its entity: the consumer deregisters on it, so
76
+ * nothing claims another event under that correlation id afterwards.
77
+ *
78
+ * This is what makes a later event of an already-recorded class a straggler
79
+ * rather than another attempt. A class not listed here leaves its entity open,
80
+ * and a repeat is claimed by the live consumer: each retry of a step writes
81
+ * another `step_started`, and a step that has not finished absorbs a second
82
+ * `step_created`.
83
+ *
84
+ * `attr_set` is one of these. The dispatcher's consumer in
85
+ * `attribute-dispatcher.ts` returns `Finished` on the event it matches, so an
86
+ * attribute id closes on the first event under it.
87
+ */
88
+ var TERMINAL_EVENT_CLASSES = /* @__PURE__ */ new Set([
89
+ "attr_set",
90
+ "step_terminal",
91
+ "wait_completed",
92
+ "hook_disposed"
93
+ ]);
94
+ /**
95
+ * The class and entity an event is tracked under, or `undefined` when it is
96
+ * tracked under none and can therefore never be read as a repeat of one.
97
+ *
98
+ * The single home for the rule, because two codebases apply it and a run is
99
+ * misread if they disagree: the runtime skips an event by it while replaying
100
+ * (`EventsConsumer`), and the observability UI greys one out by it after the
101
+ * fact (`@workflow/web-shared`). A shared fixture corpus pins them together
102
+ * (see `test-support/duplicate-event-fixtures.ts`).
103
+ *
104
+ * An entity class needs an entity. Every classed type carries a correlation id
105
+ * except two: `run_started`, whose class is the run's own and keys off
106
+ * {@link RUN_ENTITY_KEY}, and an `attr_set` written from a *step* body, which
107
+ * has no workflow-body call behind it and so names no entity. Without this the
108
+ * step-written ones would all collapse into one class for the run and the
109
+ * second of them would read as a repeat of the first, which would hide
110
+ * attribute writes that really happened — a run can carry dozens.
111
+ */
112
+ function classifyEntityEvent(event) {
113
+ const eventClass = entityEventClass(event.eventType);
114
+ if (eventClass === void 0) return;
115
+ if (eventClass === "run_started") return {
116
+ eventClass,
117
+ entity: ""
118
+ };
119
+ return event.correlationId ? {
120
+ eventClass,
121
+ entity: event.correlationId
122
+ } : void 0;
123
+ }
124
+ /** Opaque payload fields removed when events load without referenced data. */
125
+ var EVENT_DATA_REF_FIELDS_BY_EVENT_TYPE = {
126
+ run_created: ["input"],
127
+ run_started: ["input"],
128
+ run_completed: ["output"],
129
+ run_failed: ["error"],
130
+ step_created: ["input"],
131
+ step_started: ["input"],
132
+ step_completed: ["result"],
133
+ step_failed: ["error"],
134
+ step_retrying: ["error"],
135
+ hook_created: ["metadata"],
136
+ hook_received: ["payload"]
137
+ };
138
+ var NO_EVENT_DATA_REF_FIELDS = [];
139
+ function getEventDataRefFields(eventType) {
140
+ return getOwnProperty(EVENT_DATA_REF_FIELDS_BY_EVENT_TYPE, eventType) ?? NO_EVENT_DATA_REF_FIELDS;
141
+ }
142
+ function getEventDataPayloadField(eventType) {
143
+ return getEventDataRefFields(eventType)[0];
144
+ }
145
+ export { isSealedNoopEvent as a, getEventDataRefFields as i, classifyEntityEvent as n, getEventDataPayloadField as r, TERMINAL_EVENT_CLASSES as t };