@walkeros/cli 4.1.0-next-1778161443961 → 4.1.0-next-1779362268386

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.
package/CHANGELOG.md CHANGED
@@ -1,9 +1,148 @@
1
1
  # @walkeros/cli
2
2
 
3
- ## 4.1.0-next-1778161443961
3
+ ## 4.1.0-next-1779362268386
4
4
 
5
5
  ### Minor Changes
6
6
 
7
+ - b276173: **Breaking:** `code: "<exportName>"` is no longer accepted on any
8
+ step. Replace with `import: "<exportName>"` alongside `package`.
9
+
10
+ **New:** Every step (source, transformer, destination, store) accepts
11
+ `import?: string`. With `package`, it selects a named export. `package` alone
12
+ still loads the default export. Inline code stays
13
+ `code: { push, type?, init? }`. Empty steps are valid no-ops. `flow_validate`
14
+ and the CLI bundler raise `OBSOLETE_CODE_STRING` on the legacy shape with a
15
+ precise rename hint.
16
+
17
+ - dd9f5ad: Pass-through transformer steps + closed-schema validation.
18
+
19
+ **Validation:** `validateTransformerEntry` in `@walkeros/core` is now the
20
+ single source of truth. Bundler, `flow_validate`, and collector runtime all
21
+ delegate. Closed schema: unknown top-level keys are errors. `code` + `package`
22
+ together is a `CONFLICT`.
23
+
24
+ **Pass-through steps:** A transformer entry with no `code` and no `package` is
25
+ valid; the collector synthesizes its push. Three variants:
26
+ - before/next chain only (named hop)
27
+ - cache only (e.g. dedup)
28
+ - mapping only (event-to-event transform via `Mapping.Config`)
29
+
30
+ **Mapping at the transformer position:** new `mapping?: Mapping.Config` field
31
+ on `Transformer.Config` / `InitTransformer`. Same shape as
32
+ `Destination.Config.mapping`, event-to-event semantic. `data` / `silent` are
33
+ ignored at the transformer position with a one-time warning.
34
+
35
+ **Engine tag:** synthesized instance now uses `type: 'pass'` (was `'path'`).
36
+ Hard cut.
37
+
38
+ **Runtime fixes:**
39
+ - `compileNext` handles mixed-shape `next` arrays (`["a", { case }]`) via a
40
+ new `'sequence'` variant.
41
+ - A destination's `before` referencing a pass-through transformer now walks
42
+ that transformer's own `before` / `next`.
43
+ - `cache.stop: true` at a pre-collector transformer halts the pipeline
44
+ (matches `cache.mdx`).
45
+
46
+ **Migration:** Typo keys on a step now fail validation.
47
+ `instance.type === 'path'` consumers must read `'pass'`. `runTransformerChain`
48
+ consumers should branch on the new `stopped` flag.
49
+
50
+ ### Patch Changes
51
+
52
+ - 1a8f2d7: Flow v4 routing & cache cleanup.
53
+
54
+ **Cache:**
55
+ - `cache.full` is renamed to `cache.stop`. Search-and-replace.
56
+ - `cacheRule.match` is now optional. Omitted means always-match. The literal
57
+ `'*'` is dropped from the schema and the TypeScript types; `compileMatcher`
58
+ still tolerates the string at runtime for migration.
59
+ - New `cache.namespace?: string` field. Omit to write keys directly to the
60
+ store. Same store + same key + same namespace = same cache entry.
61
+ - Implicit per-step namespace prefixes (`s:`, `t:`, `d:`) are removed. If you
62
+ relied on them to separate same-keyed caches across
63
+ sources/transformers/destinations using the same store, set
64
+ `cache.namespace` explicitly.
65
+
66
+ **Routing:**
67
+ - Unified recursive `Route` type. A Route is `string | Route[] | RouteConfig`.
68
+ - New `case` operator replaces the legacy `Route[]` first-match shape. The
69
+ legacy shape is compiled as an implicit `{ case: [...] }` for runtime
70
+ compatibility, but new configs should use `case` explicitly.
71
+ - `RouteConfig` is a disjoint union enforced at the TypeScript type level via
72
+ `never` fields: a single RouteConfig sets at most one of `next` / `case`. A
73
+ bare `{ match }` is a gate (pass-through when the match fires, fall-through
74
+ when it fails). JSON Schema validation currently emits `anyOf` and does not
75
+ enforce disjointness at runtime — see follow-up notes.
76
+ - Sequence sugar (`next: [A, B, C]`) is preserved.
77
+
78
+ **Path:**
79
+ - A transformer entry with no `code` is a `path` — a code-less passthrough.
80
+ The engine synthesizes `(e) => ({ event: e })`. Use paths to name and share
81
+ `before` chains across destinations. Validation: a path must declare at
82
+ least one of `package`, `before`, `next`, or `cache`.
83
+
84
+ **Schema & tooling:**
85
+ - Updated Zod schemas (cache, route, matcher).
86
+ - Updated MCP tool descriptions and resource references.
87
+ - Updated `flow_validate` to enforce the new constraints (`EMPTY_TRANSFORMER`
88
+ error code added).
89
+
90
+ **Migration:** Hard cut at the schema/type level. Configs using `cache.full`
91
+ will fail validation — rename to `stop`. Configs using `match: "*"` will fail
92
+ validation — omit `match`. Configs using `Route[]` first-match still work at
93
+ runtime (compiled as implicit `case`) but new configs should use `case`
94
+ explicitly.
95
+
96
+ `$schema: "v4"` is preserved. No version bump.
97
+
98
+ - adeebea: Route grammar: rename `case` to `one` (first-match dispatch) and add
99
+ `many` (all-match parallel fan-out, pre-collector only). `many` terminates the
100
+ main chain and is rejected at post-collector positions (`destination.before`,
101
+ `destination.next`); use multiple destinations for post-collector fan-out.
102
+ `RouteCaseConfig` is renamed to `RouteOneConfig`; no aliases.
103
+ - Updated dependencies [e155ff8]
104
+ - Updated dependencies [e800974]
105
+ - Updated dependencies [e155ff8]
106
+ - Updated dependencies [1a8f2d7]
107
+ - Updated dependencies [1a8f2d7]
108
+ - Updated dependencies [b276173]
109
+ - Updated dependencies [dd9f5ad]
110
+ - Updated dependencies [c60ef35]
111
+ - Updated dependencies [adeebea]
112
+ - Updated dependencies [13aaeaa]
113
+ - Updated dependencies [e800974]
114
+ - Updated dependencies [adeebea]
115
+ - Updated dependencies [6cdc362]
116
+ - Updated dependencies [e800974]
117
+ - Updated dependencies [e800974]
118
+ - Updated dependencies [058f7ed]
119
+ - Updated dependencies [28a8ac2]
120
+ - Updated dependencies [fd6076e]
121
+ - @walkeros/core@4.1.0-next-1779362268386
122
+ - @walkeros/collector@4.1.0-next-1779362268386
123
+ - @walkeros/server-core@4.1.0-next-1779362268386
124
+ - @walkeros/server-destination-api@4.1.0-next-1779362268386
125
+
126
+ ## 4.0.2
127
+
128
+ ### Patch Changes
129
+
130
+ - a6a0ea7: Rename routing types: `NextRule` to `Route`, `Next` to `RouteSpec`
131
+ (Zod schemas and `MatcherNext*` IDs renamed in step). Widen
132
+ `Flow.*.before/next` to `RouteSpec` so `Route[]` conditional routing
133
+ type-checks at the JSON layer. Fix the CLI bundler dropping `Route[]` data via
134
+ a narrowing cast on the inline path. Hard cut, no aliases; flow.json shape
135
+ unchanged.
136
+ - Updated dependencies [a6a0ea7]
137
+ - @walkeros/core@4.0.2
138
+ - @walkeros/collector@4.0.2
139
+ - @walkeros/server-core@4.0.2
140
+ - @walkeros/server-destination-api@4.0.2
141
+
142
+ ## 4.0.1
143
+
144
+ ### Patch Changes
145
+
7
146
  - abfb0bb: @walkeros/cli: Server bundles now use @vercel/nft to trace
8
147
  dependencies and copy only files actually used into dist/node_modules/. Pacote
9
148
  remains the install layer (driven by flow.json's config.bundle.packages field;
@@ -22,8 +161,6 @@
22
161
  annotation from package manifest. nft handles externalization automatically.
23
162
  No behavior change for consumers.
24
163
 
25
- ### Patch Changes
26
-
27
164
  - ed304b4: Bundler honors `walkerOS.bundle.external` declared in step-package
28
165
  package.json files. Listed packages are externalized from the ESM bundle and
29
166
  the bundler always installs them (plus their full transitive deps) into
@@ -95,13 +232,14 @@
95
232
  interpolation requires scalars. Deep paths and recursive resolution with cycle
96
233
  detection now supported. `Flow.Definitions`, `Flow.Primitive`, and the `$def.`
97
234
  reference syntax are removed.
235
+ - Updated dependencies [cb265eb]
98
236
  - Updated dependencies [381dfe7]
99
237
  - Updated dependencies [1524275]
100
238
  - Updated dependencies [03d7055]
101
- - @walkeros/core@4.1.0-next-1778161443961
102
- - @walkeros/collector@4.1.0-next-1778161443961
103
- - @walkeros/server-core@4.1.0-next-1778161443961
104
- - @walkeros/server-destination-api@4.1.0-next-1778161443961
239
+ - @walkeros/collector@4.0.1
240
+ - @walkeros/core@4.0.1
241
+ - @walkeros/server-core@4.0.1
242
+ - @walkeros/server-destination-api@4.0.1
105
243
 
106
244
  ## 4.0.0
107
245