@walkeros/core 4.4.0-next-1785261149472 → 4.4.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.
- package/CHANGELOG.md +14 -1
- package/dist/dev.d.mts +40 -9
- package/dist/dev.d.ts +40 -9
- package/dist/dev.js +1 -1
- package/dist/dev.js.map +1 -1
- package/dist/dev.mjs +1 -1
- package/dist/dev.mjs.map +1 -1
- package/dist/index.d.mts +38 -9
- package/dist/index.d.ts +38 -9
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @walkeros/core
|
|
2
2
|
|
|
3
|
-
## 4.4.0
|
|
3
|
+
## 4.4.0
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
@@ -11,6 +11,19 @@
|
|
|
11
11
|
`parentEventId`, instead of folding them into a single row. A new optional
|
|
12
12
|
`unattributed` summary reports records the assembly could not attribute to any
|
|
13
13
|
event instead of dropping them silently.
|
|
14
|
+
- 034b1de: Events pushed before the collector runs are now held and replayed at
|
|
15
|
+
run instead of being dropped, bounded by `queueMax`. `walker init <element>`
|
|
16
|
+
re-fires load triggers for already-tracked elements, restoring the SPA re-init
|
|
17
|
+
pattern. Queue sources start consuming at run and no longer acknowledge
|
|
18
|
+
messages the pipeline did not accept.
|
|
19
|
+
- d00e2bd: A source's `env` is now unambiguously the author's dependency bag:
|
|
20
|
+
the collector-provided `push`, `elb`, `command`, `logger` and `sources` always
|
|
21
|
+
win, so setting them in `env` has no effect. Sources that need the pipeline to
|
|
22
|
+
end elsewhere declare the new `terminus`, which receives the raw event and
|
|
23
|
+
skips the pipeline entirely; previously an `env.push` silently replaced the
|
|
24
|
+
pipeline's end and disabled some, but not all, of its stages, and flows that
|
|
25
|
+
set it should move to `terminus`. Stored flows now also reject unknown keys on
|
|
26
|
+
a source entry at validation instead of silently ignoring them.
|
|
14
27
|
|
|
15
28
|
### Patch Changes
|
|
16
29
|
|
package/dist/dev.d.mts
CHANGED
|
@@ -3867,12 +3867,15 @@ declare namespace collector {
|
|
|
3867
3867
|
* - sources: Other registered sources
|
|
3868
3868
|
* - elb: Public API function (alias for collector.push)
|
|
3869
3869
|
*
|
|
3870
|
-
*
|
|
3871
|
-
*
|
|
3870
|
+
* The capability keys above (plus logger) are runtime-owned: the collector
|
|
3871
|
+
* applies them last, so author values for them are ignored. Platform-specific
|
|
3872
|
+
* sources extend the env with their own requirements (e.g., window, document,
|
|
3873
|
+
* fetch, req, res), and those author dependencies pass through untouched.
|
|
3872
3874
|
*
|
|
3873
3875
|
* This makes sources:
|
|
3874
3876
|
* - Platform-agnostic (no direct dependencies)
|
|
3875
|
-
* - Testable (mock env
|
|
3877
|
+
* - Testable (mock author dependencies via env; mock the collector boundary
|
|
3878
|
+
* via a hand-built Context or InitSource.terminus)
|
|
3876
3879
|
* - Composable (share env between sources)
|
|
3877
3880
|
*/
|
|
3878
3881
|
declare const BaseEnvSchema: z.ZodObject<{
|
|
@@ -5112,7 +5115,7 @@ declare const SourceSchema: z.ZodObject<{
|
|
|
5112
5115
|
update: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
5113
5116
|
}, z.core.$strip>>;
|
|
5114
5117
|
}, z.core.$strip>>;
|
|
5115
|
-
}, z.core.$
|
|
5118
|
+
}, z.core.$strict>;
|
|
5116
5119
|
/**
|
|
5117
5120
|
* Transformer reference schema (Flow.Transformer).
|
|
5118
5121
|
*/
|
|
@@ -5419,7 +5422,7 @@ declare const FlowSchema: z.ZodObject<{
|
|
|
5419
5422
|
update: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
5420
5423
|
}, z.core.$strip>>;
|
|
5421
5424
|
}, z.core.$strip>>;
|
|
5422
|
-
}, z.core.$
|
|
5425
|
+
}, z.core.$strict>>>;
|
|
5423
5426
|
destinations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
5424
5427
|
package: z.ZodOptional<z.ZodString>;
|
|
5425
5428
|
code: z.ZodOptional<z.ZodObject<{
|
|
@@ -5643,7 +5646,7 @@ declare const JsonSchema$1: z.ZodObject<{
|
|
|
5643
5646
|
update: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
5644
5647
|
}, z.core.$strip>>;
|
|
5645
5648
|
}, z.core.$strip>>;
|
|
5646
|
-
}, z.core.$
|
|
5649
|
+
}, z.core.$strict>>>;
|
|
5647
5650
|
destinations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
5648
5651
|
package: z.ZodOptional<z.ZodString>;
|
|
5649
5652
|
code: z.ZodOptional<z.ZodObject<{
|
|
@@ -6278,7 +6281,7 @@ declare const configJsonSchema: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<
|
|
|
6278
6281
|
update: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
6279
6282
|
}, z.core.$strip>>;
|
|
6280
6283
|
}, z.core.$strip>>;
|
|
6281
|
-
}, z.core.$
|
|
6284
|
+
}, z.core.$strict>>>;
|
|
6282
6285
|
destinations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
6283
6286
|
package: z.ZodOptional<z.ZodString>;
|
|
6284
6287
|
code: z.ZodOptional<z.ZodObject<{
|
|
@@ -7796,6 +7799,15 @@ interface Instance$5 {
|
|
|
7796
7799
|
logger: Instance$3;
|
|
7797
7800
|
on: OnConfig;
|
|
7798
7801
|
queue: Events;
|
|
7802
|
+
/**
|
|
7803
|
+
* Events pushed while `allowed === false`, held raw (pre-pipeline) and
|
|
7804
|
+
* replayed FIFO by the run command. Bounded by `config.queueMax`
|
|
7805
|
+
* (drop-oldest). RECORD-immediate/DELIVER-gated, extended to events.
|
|
7806
|
+
*/
|
|
7807
|
+
preRunQueue: Array<{
|
|
7808
|
+
event: DeepPartialEvent;
|
|
7809
|
+
options: PushOptions;
|
|
7810
|
+
}>;
|
|
7799
7811
|
round: number;
|
|
7800
7812
|
/** Run-scoped W3C trace id, minted on each run and stamped onto events. */
|
|
7801
7813
|
trace?: string;
|
|
@@ -8665,8 +8677,12 @@ interface InitTransformers {
|
|
|
8665
8677
|
/**
|
|
8666
8678
|
* Base Env interface for dependency injection into sources.
|
|
8667
8679
|
*
|
|
8668
|
-
*
|
|
8669
|
-
* making
|
|
8680
|
+
* `env` is the author's dependency bag: platform and vendor dependencies are
|
|
8681
|
+
* injected here, making sources platform-agnostic. The five capabilities the
|
|
8682
|
+
* collector provides (`push`, `command`, `sources`, `elb`, `logger`) are
|
|
8683
|
+
* runtime-owned and applied last, so author values for them are ignored. To
|
|
8684
|
+
* mock the collector boundary in a test, call the factory directly with a
|
|
8685
|
+
* hand-built `Context`, or declare `InitSource.terminus`.
|
|
8670
8686
|
*/
|
|
8671
8687
|
interface BaseEnv$1 {
|
|
8672
8688
|
[key: string]: unknown;
|
|
@@ -8862,6 +8878,21 @@ type InitSource<T extends TypesGeneric$1 = Types$1> = {
|
|
|
8862
8878
|
primary?: boolean;
|
|
8863
8879
|
next?: Route;
|
|
8864
8880
|
before?: Route;
|
|
8881
|
+
/**
|
|
8882
|
+
* Replace the collector at the END of this source's pipeline.
|
|
8883
|
+
*
|
|
8884
|
+
* A terminus receives the event exactly as the source emitted it and the
|
|
8885
|
+
* entire pipeline is skipped: no `before`/`next` chains, no source `cache`,
|
|
8886
|
+
* no `state`, no `mapping`, no minted span id, no per-source ingest, no
|
|
8887
|
+
* `respond`, no `status.sources` counting and no observability records.
|
|
8888
|
+
*
|
|
8889
|
+
* This is a TOTAL bypass, deliberately, so there is one thing to know rather
|
|
8890
|
+
* than a list of exceptions. It exists for deterministic capture at the
|
|
8891
|
+
* source→collector boundary (step examples, dev tooling). Production flows
|
|
8892
|
+
* leave it unset. Runtime-only: stored-flow validation rejects unknown
|
|
8893
|
+
* source keys, so a persisted flow cannot carry it.
|
|
8894
|
+
*/
|
|
8895
|
+
terminus?: PushFn$1;
|
|
8865
8896
|
cache?: Cache;
|
|
8866
8897
|
state?: State | State[];
|
|
8867
8898
|
};
|
package/dist/dev.d.ts
CHANGED
|
@@ -3867,12 +3867,15 @@ declare namespace collector {
|
|
|
3867
3867
|
* - sources: Other registered sources
|
|
3868
3868
|
* - elb: Public API function (alias for collector.push)
|
|
3869
3869
|
*
|
|
3870
|
-
*
|
|
3871
|
-
*
|
|
3870
|
+
* The capability keys above (plus logger) are runtime-owned: the collector
|
|
3871
|
+
* applies them last, so author values for them are ignored. Platform-specific
|
|
3872
|
+
* sources extend the env with their own requirements (e.g., window, document,
|
|
3873
|
+
* fetch, req, res), and those author dependencies pass through untouched.
|
|
3872
3874
|
*
|
|
3873
3875
|
* This makes sources:
|
|
3874
3876
|
* - Platform-agnostic (no direct dependencies)
|
|
3875
|
-
* - Testable (mock env
|
|
3877
|
+
* - Testable (mock author dependencies via env; mock the collector boundary
|
|
3878
|
+
* via a hand-built Context or InitSource.terminus)
|
|
3876
3879
|
* - Composable (share env between sources)
|
|
3877
3880
|
*/
|
|
3878
3881
|
declare const BaseEnvSchema: z.ZodObject<{
|
|
@@ -5112,7 +5115,7 @@ declare const SourceSchema: z.ZodObject<{
|
|
|
5112
5115
|
update: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
5113
5116
|
}, z.core.$strip>>;
|
|
5114
5117
|
}, z.core.$strip>>;
|
|
5115
|
-
}, z.core.$
|
|
5118
|
+
}, z.core.$strict>;
|
|
5116
5119
|
/**
|
|
5117
5120
|
* Transformer reference schema (Flow.Transformer).
|
|
5118
5121
|
*/
|
|
@@ -5419,7 +5422,7 @@ declare const FlowSchema: z.ZodObject<{
|
|
|
5419
5422
|
update: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
5420
5423
|
}, z.core.$strip>>;
|
|
5421
5424
|
}, z.core.$strip>>;
|
|
5422
|
-
}, z.core.$
|
|
5425
|
+
}, z.core.$strict>>>;
|
|
5423
5426
|
destinations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
5424
5427
|
package: z.ZodOptional<z.ZodString>;
|
|
5425
5428
|
code: z.ZodOptional<z.ZodObject<{
|
|
@@ -5643,7 +5646,7 @@ declare const JsonSchema$1: z.ZodObject<{
|
|
|
5643
5646
|
update: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
5644
5647
|
}, z.core.$strip>>;
|
|
5645
5648
|
}, z.core.$strip>>;
|
|
5646
|
-
}, z.core.$
|
|
5649
|
+
}, z.core.$strict>>>;
|
|
5647
5650
|
destinations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
5648
5651
|
package: z.ZodOptional<z.ZodString>;
|
|
5649
5652
|
code: z.ZodOptional<z.ZodObject<{
|
|
@@ -6278,7 +6281,7 @@ declare const configJsonSchema: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<
|
|
|
6278
6281
|
update: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
6279
6282
|
}, z.core.$strip>>;
|
|
6280
6283
|
}, z.core.$strip>>;
|
|
6281
|
-
}, z.core.$
|
|
6284
|
+
}, z.core.$strict>>>;
|
|
6282
6285
|
destinations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
6283
6286
|
package: z.ZodOptional<z.ZodString>;
|
|
6284
6287
|
code: z.ZodOptional<z.ZodObject<{
|
|
@@ -7796,6 +7799,15 @@ interface Instance$5 {
|
|
|
7796
7799
|
logger: Instance$3;
|
|
7797
7800
|
on: OnConfig;
|
|
7798
7801
|
queue: Events;
|
|
7802
|
+
/**
|
|
7803
|
+
* Events pushed while `allowed === false`, held raw (pre-pipeline) and
|
|
7804
|
+
* replayed FIFO by the run command. Bounded by `config.queueMax`
|
|
7805
|
+
* (drop-oldest). RECORD-immediate/DELIVER-gated, extended to events.
|
|
7806
|
+
*/
|
|
7807
|
+
preRunQueue: Array<{
|
|
7808
|
+
event: DeepPartialEvent;
|
|
7809
|
+
options: PushOptions;
|
|
7810
|
+
}>;
|
|
7799
7811
|
round: number;
|
|
7800
7812
|
/** Run-scoped W3C trace id, minted on each run and stamped onto events. */
|
|
7801
7813
|
trace?: string;
|
|
@@ -8665,8 +8677,12 @@ interface InitTransformers {
|
|
|
8665
8677
|
/**
|
|
8666
8678
|
* Base Env interface for dependency injection into sources.
|
|
8667
8679
|
*
|
|
8668
|
-
*
|
|
8669
|
-
* making
|
|
8680
|
+
* `env` is the author's dependency bag: platform and vendor dependencies are
|
|
8681
|
+
* injected here, making sources platform-agnostic. The five capabilities the
|
|
8682
|
+
* collector provides (`push`, `command`, `sources`, `elb`, `logger`) are
|
|
8683
|
+
* runtime-owned and applied last, so author values for them are ignored. To
|
|
8684
|
+
* mock the collector boundary in a test, call the factory directly with a
|
|
8685
|
+
* hand-built `Context`, or declare `InitSource.terminus`.
|
|
8670
8686
|
*/
|
|
8671
8687
|
interface BaseEnv$1 {
|
|
8672
8688
|
[key: string]: unknown;
|
|
@@ -8862,6 +8878,21 @@ type InitSource<T extends TypesGeneric$1 = Types$1> = {
|
|
|
8862
8878
|
primary?: boolean;
|
|
8863
8879
|
next?: Route;
|
|
8864
8880
|
before?: Route;
|
|
8881
|
+
/**
|
|
8882
|
+
* Replace the collector at the END of this source's pipeline.
|
|
8883
|
+
*
|
|
8884
|
+
* A terminus receives the event exactly as the source emitted it and the
|
|
8885
|
+
* entire pipeline is skipped: no `before`/`next` chains, no source `cache`,
|
|
8886
|
+
* no `state`, no `mapping`, no minted span id, no per-source ingest, no
|
|
8887
|
+
* `respond`, no `status.sources` counting and no observability records.
|
|
8888
|
+
*
|
|
8889
|
+
* This is a TOTAL bypass, deliberately, so there is one thing to know rather
|
|
8890
|
+
* than a list of exceptions. It exists for deterministic capture at the
|
|
8891
|
+
* source→collector boundary (step examples, dev tooling). Production flows
|
|
8892
|
+
* leave it unset. Runtime-only: stored-flow validation rejects unknown
|
|
8893
|
+
* source keys, so a persisted flow cannot carry it.
|
|
8894
|
+
*/
|
|
8895
|
+
terminus?: PushFn$1;
|
|
8865
8896
|
cache?: Cache;
|
|
8866
8897
|
state?: State | State[];
|
|
8867
8898
|
};
|