@brickkit/cli 0.11.0 → 0.12.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 (140) 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-B-bZRtNV.js +265 -0
  7. package/dashboard-dist/app.css +2 -2
  8. package/dashboard-dist/app.js +11 -11
  9. package/dashboard-dist/ccount-CcG1m-Yh.js +1 -0
  10. package/dashboard-dist/client-BJJtVSVr.js +1 -0
  11. package/dashboard-dist/core-Z7NJFk0K.js +1 -0
  12. package/dashboard-dist/docs-Dpfc0wJb.js +4 -0
  13. package/dashboard-dist/docs.css +1 -1
  14. package/dashboard-dist/kit.js +1 -1
  15. package/dashboard-dist/popover-BzejBolB.js +1 -0
  16. package/dist/app-entry2.js +2 -3
  17. package/dist/bin.d.ts +0 -2
  18. package/dist/bin.js +173 -12
  19. package/dist/bin.js.map +1 -1
  20. package/dist/client-contract-file2.js +1 -2
  21. package/dist/client-contract2.js +6 -4
  22. package/dist/client-contract2.js.map +1 -1
  23. package/dist/compiler.d.ts +1 -2
  24. package/dist/compiler.js +1 -1
  25. package/dist/compiler2.js +3 -4
  26. package/dist/config.js +5 -7
  27. package/dist/config.js.map +1 -1
  28. package/dist/dashboard-extension.d.ts +0 -2
  29. package/dist/dashboard.d.ts +4 -134
  30. package/dist/dev-reporter.d.ts +0 -2
  31. package/dist/dev-reporter.js +1 -2
  32. package/dist/dev-telemetry-store.js +9 -19
  33. package/dist/dev-telemetry-store.js.map +1 -1
  34. package/dist/dev-telemetry.js +3 -4
  35. package/dist/dev-telemetry.js.map +1 -1
  36. package/dist/dev-worker.js +1 -2
  37. package/dist/emit.d.ts +0 -2
  38. package/dist/index.d.ts +7 -17
  39. package/dist/index.js +3 -4
  40. package/dist/lint/oxlint.d.ts +0 -2
  41. package/dist/lint/oxlint.js +1 -2
  42. package/dist/plugin.d.ts +0 -6
  43. package/dist/plugin.js +2 -4
  44. package/dist/plugin.js.map +1 -1
  45. package/dist/presets.js +3 -7
  46. package/dist/presets.js.map +1 -1
  47. package/dist/runner.js +5 -9
  48. package/dist/runner.js.map +1 -1
  49. package/dist/vite.d.ts +0 -2
  50. package/dist/vite.js +5 -7
  51. package/dist/vite.js.map +1 -1
  52. package/dist/workflows.d.ts +0 -2
  53. package/dist/workflows2.js +2 -3
  54. package/inspector-dist/client/assets/api.rpc-BvRk9kiK.js +0 -0
  55. package/inspector-dist/client/assets/api.stream._streamId-BvRk9kiK.js +0 -0
  56. package/inspector-dist/client/assets/app-CCzpuUz_.css +2 -0
  57. package/inspector-dist/client/assets/dist-BK8w6xOr.js +3930 -0
  58. package/inspector-dist/client/assets/dist-CG2aVufI.js +197 -0
  59. package/inspector-dist/client/assets/entry.client-D9jbgmTR.js +9391 -0
  60. package/inspector-dist/client/assets/highlighted-body-B3W2YXNL-DYVdwGy2.js +34 -0
  61. package/inspector-dist/client/assets/home-CyjkvtII.js +2883 -0
  62. package/inspector-dist/client/assets/jsx-runtime-CPEah4WQ.js +7084 -0
  63. package/inspector-dist/client/assets/manifest-ba30b52d.js +1 -0
  64. package/inspector-dist/client/assets/mermaid-3ZIDBTTL-Dy6IVqPy.js +1 -0
  65. package/inspector-dist/client/assets/root-8BMab1lL.css +2 -0
  66. package/inspector-dist/client/assets/root-DX9wtogx.js +332 -0
  67. package/inspector-dist/client/assets/run-detail-C69EJGql.js +1549 -0
  68. package/inspector-dist/client/assets/tabs-B6B88IjT.js +75692 -0
  69. package/inspector-dist/client/assets/tabs-L5XKzOpP.css +1 -0
  70. package/inspector-dist/client/assets/world-config-context-C3BqXPIv.js +30 -0
  71. package/inspector-dist/client/assets/zstd-browser-decoder-ByUgcY9H.js +41 -0
  72. package/inspector-dist/server/assets/app-WoDoT62X.js +100155 -0
  73. package/inspector-dist/server/assets/chunk-RLXIAIE6-CbvDIAEa.js +42977 -0
  74. package/inspector-dist/server/assets/dist-BRxZSWUN.js +1140 -0
  75. package/inspector-dist/server/assets/dist-CQnQcIJg.js +199 -0
  76. package/inspector-dist/server/assets/dist-DqRd9pyS.js +1644 -0
  77. package/inspector-dist/server/assets/dist-qR-969AD.js +10327 -0
  78. package/inspector-dist/server/assets/encryption-_PuklZNX.js +888 -0
  79. package/inspector-dist/server/assets/event-metadata-BVakQJ_y.js +147 -0
  80. package/inspector-dist/server/assets/functions-CImcpqNl.js +1172 -0
  81. package/inspector-dist/server/assets/global-singleton-CPirHxFh.js +82 -0
  82. package/inspector-dist/server/assets/highlighted-body-B3W2YXNL-fPMB_t7F.js +36 -0
  83. package/inspector-dist/server/assets/mermaid-3ZIDBTTL-bADXySE3.js +3 -0
  84. package/inspector-dist/server/assets/parse-D9Vvgzt9.js +471 -0
  85. package/inspector-dist/server/assets/rolldown-runtime-CLg409Sh.js +44 -0
  86. package/inspector-dist/server/assets/serialization-format-DDtsVTU1.js +478 -0
  87. package/inspector-dist/server/assets/token-BW4GdQZh.js +62 -0
  88. package/inspector-dist/server/assets/token-D6FXdkJT.js +57 -0
  89. package/inspector-dist/server/assets/token-util-BoNmi-wE.js +457 -0
  90. package/inspector-dist/server/assets/wrapper-wiqsGXcE.js +3626 -0
  91. package/inspector-dist/server/assets/ws-transport-DV7oG4mL.js +29478 -0
  92. package/inspector-dist/server/assets/zstd-browser-decoder-Cswf0KO6.js +40 -0
  93. package/inspector-dist/server/index.js +2 -57
  94. package/package.json +29 -28
  95. package/vite-client.d.ts +1 -1
  96. package/dashboard-dist/CollapsiblePanel-BX79_W-b.js +0 -2
  97. package/dashboard-dist/CompositeRoot-xzybXjnx.js +0 -1
  98. package/dashboard-dist/PopoverPopup-CvlmC7EL.js +0 -1
  99. package/dashboard-dist/api-reference-BcAYVYwJ.js +0 -260
  100. package/dashboard-dist/core-BGO9JZ1r.js +0 -1
  101. package/dashboard-dist/docs-DHikPD2v.js +0 -4
  102. package/dashboard-dist/popover-DG498XHH.js +0 -1
  103. package/dist/bin.d.ts.map +0 -1
  104. package/dist/dashboard-extension.d.ts.map +0 -1
  105. package/dist/dev-reporter.d.ts.map +0 -1
  106. package/dist/emit.d.ts.map +0 -1
  107. package/dist/index.d.ts.map +0 -1
  108. package/dist/lint/oxlint.d.ts.map +0 -1
  109. package/dist/plugin.d.ts.map +0 -1
  110. package/dist/vite.d.ts.map +0 -1
  111. package/dist/workflows.d.ts.map +0 -1
  112. package/inspector-dist/client/assets/api.rpc-l0sNRNKZ.js +0 -1
  113. package/inspector-dist/client/assets/api.stream._streamId-l0sNRNKZ.js +0 -1
  114. package/inspector-dist/client/assets/app-CvoGgWcV.css +0 -1
  115. package/inspector-dist/client/assets/entry.client-BJ6G3n5t.js +0 -11697
  116. package/inspector-dist/client/assets/highlighted-body-B3W2YXNL-C-3wZnxf.js +0 -19
  117. package/inspector-dist/client/assets/home-CSKAS4P2.js +0 -4979
  118. package/inspector-dist/client/assets/index-DECCyMR0.js +0 -4482
  119. package/inspector-dist/client/assets/index-Dot7CgrA.js +0 -9837
  120. package/inspector-dist/client/assets/index-HqNj_XIX.js +0 -200
  121. package/inspector-dist/client/assets/manifest-139c9319.js +0 -1
  122. package/inspector-dist/client/assets/mermaid-3ZIDBTTL-DC0K8uTy.js +0 -58626
  123. package/inspector-dist/client/assets/mermaid-3ZIDBTTL-F88p7PFX.css +0 -1
  124. package/inspector-dist/client/assets/root-BMHd_XHz.css +0 -1
  125. package/inspector-dist/client/assets/root-cbi6iYwg.js +0 -305
  126. package/inspector-dist/client/assets/run-detail-CWoGxu_0.css +0 -1
  127. package/inspector-dist/client/assets/run-detail-Cc7tSGNq.js +0 -6237
  128. package/inspector-dist/client/assets/world-config-context-BAD1QCrR.js +0 -26
  129. package/inspector-dist/client/assets/zstd-browser-decoder-BQoRpP7L.js +0 -28
  130. package/inspector-dist/server/assets/app-DUP5RybL.js +0 -174880
  131. package/inspector-dist/server/assets/highlighted-body-B3W2YXNL-D2g4hL2-.js +0 -71
  132. package/inspector-dist/server/assets/index-BfLBLRRi.js +0 -204
  133. package/inspector-dist/server/assets/index-BzrGWk7J.js +0 -1164
  134. package/inspector-dist/server/assets/index-D71yP6AL.js +0 -191
  135. package/inspector-dist/server/assets/index-wGSWRns3.js +0 -1296
  136. package/inspector-dist/server/assets/mermaid-3ZIDBTTL-DsvuKoEV.js +0 -58
  137. package/inspector-dist/server/assets/token-ClUZZwXl.js +0 -95
  138. package/inspector-dist/server/assets/token-util-DSxMZ6nI.js +0 -33
  139. package/inspector-dist/server/assets/wrapper-B3vstpCO.js +0 -67
  140. package/inspector-dist/server/assets/zstd-browser-decoder-Dn82m2BU.js +0 -77
@@ -0,0 +1,147 @@
1
+ import { createRequire as __wkfCreateRequire } from "node:module";
2
+ if (typeof require === "undefined") globalThis.require = __wkfCreateRequire(import.meta.url);
3
+ // ../../node_modules/.bun/@workflow+world@5.1.0/node_modules/@workflow/world/dist/event-metadata.js
4
+ function getOwnProperty(object, key) {
5
+ return Object.hasOwn(object, key) ? object[key] : void 0;
6
+ }
7
+ /**
8
+ * Whether an event is a sealed-log filler occupying an abandoned slot.
9
+ *
10
+ * The single home for this test, deliberately: a noop is invisible to the run
11
+ * but it is a real row of the log, so every pass over a log has to decide
12
+ * whether it is walking positions (count it) or reconstructing what happened
13
+ * (skip it). The replay engines and observability trace builder must agree
14
+ * that a noop's `createdAt` — the sealer's wall clock, which can postdate every
15
+ * real event around it — never becomes a time the run observed.
16
+ *
17
+ * Keeping the classifier in this schema-free module lets replay code make that
18
+ * decision without pulling the event validation graph into workflow bundles.
19
+ */
20
+ function isSealedNoopEvent(event) {
21
+ return event.eventType === "noop";
22
+ }
23
+ /**
24
+ * Groups event types into the classes a replay tracks per entity: the entity
25
+ * named by the event's `correlationId`, or the run itself for run events,
26
+ * which carry none.
27
+ *
28
+ * Types that share a class are the mutually exclusive outcomes of one
29
+ * decision, so the log records the class once and the first event of it is the
30
+ * one that counts: a step either completes or fails.
31
+ *
32
+ * Classes are independent of each other. A step whose result is in the log has
33
+ * still recorded exactly one `step_created`, and can still record another
34
+ * `step_started` if an attempt is running somewhere. What a class bounds is
35
+ * which events can be *ignored*: a replay may pass over an event whose class
36
+ * it already recorded for that entity and which no consumer wants (see
37
+ * `EventsConsumer`), and only then.
38
+ *
39
+ * `attr_set` is here for the correlation id a workflow-body attribute write
40
+ * draws, which resolves exactly once: the dispatcher's consumer takes the
41
+ * matching event and deregisters, so a second event under that id has no
42
+ * callback left and never will. Without a class it would instead be parked for
43
+ * a consumer that cannot come, and parking is only ever settled by the
44
+ * workflow function returning, at which point it is reported as a stranded
45
+ * event and kills a run that did all its work correctly. An attribute write
46
+ * from a *step* body carries no correlation id and is claimed by the
47
+ * structural lifecycle consumer in `workflow.ts` on the way past, so it is
48
+ * consumed rather than skipped and several of them never collapse into one
49
+ * class.
50
+ *
51
+ * Note the omissions, all of them types a mapping would be dead weight for.
52
+ * `hook_received` and `hook_conflict` are deliveries whose consumer subscribes
53
+ * lazily, and `run_created` precedes every replay. The terminal run types are
54
+ * absent for a different reason: recording a class requires a consumer to take
55
+ * an event of it, and no consumer takes `run_completed` / `run_failed` /
56
+ * `run_cancelled`: the runtime exits before replaying the body once the log
57
+ * holds one, so they never reach a consumer at all. An entry for them could
58
+ * never match.
59
+ */
60
+ var ENTITY_EVENT_CLASS_BY_TYPE = {
61
+ attr_set: "attr_set",
62
+ step_created: "step_created",
63
+ step_started: "step_started",
64
+ step_retrying: "step_retrying",
65
+ step_completed: "step_terminal",
66
+ step_failed: "step_terminal",
67
+ wait_created: "wait_created",
68
+ wait_completed: "wait_completed",
69
+ hook_created: "hook_created",
70
+ hook_disposed: "hook_disposed",
71
+ run_started: "run_started"
72
+ };
73
+ function entityEventClass(eventType) {
74
+ return getOwnProperty(ENTITY_EVENT_CLASS_BY_TYPE, eventType);
75
+ }
76
+ /**
77
+ * Classes whose event closes its entity: the consumer deregisters on it, so
78
+ * nothing claims another event under that correlation id afterwards.
79
+ *
80
+ * This is what makes a later event of an already-recorded class a straggler
81
+ * rather than another attempt. A class not listed here leaves its entity open,
82
+ * and a repeat is claimed by the live consumer: each retry of a step writes
83
+ * another `step_started`, and a step that has not finished absorbs a second
84
+ * `step_created`.
85
+ *
86
+ * `attr_set` is one of these. The dispatcher's consumer in
87
+ * `attribute-dispatcher.ts` returns `Finished` on the event it matches, so an
88
+ * attribute id closes on the first event under it.
89
+ */
90
+ var TERMINAL_EVENT_CLASSES = /* @__PURE__ */ new Set([
91
+ "attr_set",
92
+ "step_terminal",
93
+ "wait_completed",
94
+ "hook_disposed"
95
+ ]);
96
+ /**
97
+ * The class and entity an event is tracked under, or `undefined` when it is
98
+ * tracked under none and can therefore never be read as a repeat of one.
99
+ *
100
+ * The single home for the rule, because two codebases apply it and a run is
101
+ * misread if they disagree: the runtime skips an event by it while replaying
102
+ * (`EventsConsumer`), and the observability UI greys one out by it after the
103
+ * fact (`@workflow/web-shared`). A shared fixture corpus pins them together
104
+ * (see `test-support/duplicate-event-fixtures.ts`).
105
+ *
106
+ * An entity class needs an entity. Every classed type carries a correlation id
107
+ * except two: `run_started`, whose class is the run's own and keys off
108
+ * {@link RUN_ENTITY_KEY}, and an `attr_set` written from a *step* body, which
109
+ * has no workflow-body call behind it and so names no entity. Without this the
110
+ * step-written ones would all collapse into one class for the run and the
111
+ * second of them would read as a repeat of the first, which would hide
112
+ * attribute writes that really happened — a run can carry dozens.
113
+ */
114
+ function classifyEntityEvent(event) {
115
+ const eventClass = entityEventClass(event.eventType);
116
+ if (eventClass === void 0) return;
117
+ if (eventClass === "run_started") return {
118
+ eventClass,
119
+ entity: ""
120
+ };
121
+ return event.correlationId ? {
122
+ eventClass,
123
+ entity: event.correlationId
124
+ } : void 0;
125
+ }
126
+ /** Opaque payload fields removed when events load without referenced data. */
127
+ var EVENT_DATA_REF_FIELDS_BY_EVENT_TYPE = {
128
+ run_created: ["input"],
129
+ run_started: ["input"],
130
+ run_completed: ["output"],
131
+ run_failed: ["error"],
132
+ step_created: ["input"],
133
+ step_started: ["input"],
134
+ step_completed: ["result"],
135
+ step_failed: ["error"],
136
+ step_retrying: ["error"],
137
+ hook_created: ["metadata"],
138
+ hook_received: ["payload"]
139
+ };
140
+ var NO_EVENT_DATA_REF_FIELDS = [];
141
+ function getEventDataRefFields(eventType) {
142
+ return getOwnProperty(EVENT_DATA_REF_FIELDS_BY_EVENT_TYPE, eventType) ?? NO_EVENT_DATA_REF_FIELDS;
143
+ }
144
+ function getEventDataPayloadField(eventType) {
145
+ return getEventDataRefFields(eventType)[0];
146
+ }
147
+ export { isSealedNoopEvent as a, getEventDataRefFields as i, classifyEntityEvent as n, getEventDataPayloadField as r, TERMINAL_EVENT_CLASSES as t };