@walkeros/core 4.3.0 → 4.3.1-next-1784373088875

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,5 +1,21 @@
1
1
  # @walkeros/core
2
2
 
3
+ ## 4.3.1-next-1784373088875
4
+
5
+ ### Patch Changes
6
+
7
+ - f2030ab: Push results now report when an event was intentionally dropped by a
8
+ transformer chain, via a new `PushResult.dropped` flag, instead of a drop
9
+ looking identical to a normal delivery. The chain result also names which
10
+ transformer stopped the chain (`ChainResult.droppedBy`), and the collector
11
+ logs the drop at debug level.
12
+ - 2d6ab82: Connect a running flow to an observation session and watch its live
13
+ events from web, server, or bundled runtimes. Commit only a public observer
14
+ URL and project binding; the per-session credential arrives out-of-band, so no
15
+ secrets land in code or artifacts. Ingest posts carry a versioned envelope
16
+ with release provenance, and `walkeros observe start` opens sessions from the
17
+ terminal.
18
+
3
19
  ## 4.3.0
4
20
 
5
21
  ### Minor Changes
package/dist/dev.d.mts CHANGED
@@ -3568,6 +3568,21 @@ declare const InitConfigSchema: z.ZodObject<{
3568
3568
  stores: z.ZodOptional<z.ZodUnknown>;
3569
3569
  custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>>;
3570
3570
  hooks: z.ZodOptional<z.ZodUnknown>;
3571
+ observe: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
3572
+ url: z.ZodString;
3573
+ binding: z.ZodString;
3574
+ }, z.core.$strip>, z.ZodObject<{
3575
+ url: z.ZodString;
3576
+ sessionId: z.ZodString;
3577
+ token: z.ZodString;
3578
+ level: z.ZodOptional<z.ZodEnum<{
3579
+ trace: "trace";
3580
+ off: "off";
3581
+ standard: "standard";
3582
+ }>>;
3583
+ sample: z.ZodOptional<z.ZodNumber>;
3584
+ }, z.core.$strip>]>>;
3585
+ observers: z.ZodOptional<z.ZodUnknown>;
3571
3586
  }, z.core.$strip>;
3572
3587
  /**
3573
3588
  * PushContext - Context for collector.push
@@ -5272,12 +5287,30 @@ declare const ContractSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
5272
5287
  events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
5273
5288
  schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5274
5289
  }, z.core.$strip>>;
5290
+ /**
5291
+ * Observe schema (Flow.Observe).
5292
+ *
5293
+ * @remarks
5294
+ * Observability configuration block. `url` + `binding` form the public web
5295
+ * connect pair (safe to commit; the per-session credential arrives
5296
+ * out-of-band). `level` and `sample` are managed-telemetry knobs.
5297
+ */
5298
+ declare const ObserveSchema: z.ZodObject<{
5299
+ level: z.ZodOptional<z.ZodEnum<{
5300
+ trace: "trace";
5301
+ off: "off";
5302
+ standard: "standard";
5303
+ }>>;
5304
+ sample: z.ZodOptional<z.ZodNumber>;
5305
+ url: z.ZodOptional<z.ZodString>;
5306
+ binding: z.ZodOptional<z.ZodString>;
5307
+ }, z.core.$strip>;
5275
5308
  /**
5276
5309
  * Per-flow Config schema (Flow.Config).
5277
5310
  *
5278
5311
  * @remarks
5279
5312
  * Groups platform identity, optional public URL, free-form settings bag,
5280
- * and bundle (build-time) configuration.
5313
+ * bundle (build-time) configuration, and observability configuration.
5281
5314
  */
5282
5315
  declare const ConfigSchema: z.ZodObject<{
5283
5316
  platform: z.ZodEnum<{
@@ -5295,6 +5328,16 @@ declare const ConfigSchema: z.ZodObject<{
5295
5328
  overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5296
5329
  traceInclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
5297
5330
  }, z.core.$strict>>;
5331
+ observe: z.ZodOptional<z.ZodObject<{
5332
+ level: z.ZodOptional<z.ZodEnum<{
5333
+ trace: "trace";
5334
+ off: "off";
5335
+ standard: "standard";
5336
+ }>>;
5337
+ sample: z.ZodOptional<z.ZodNumber>;
5338
+ url: z.ZodOptional<z.ZodString>;
5339
+ binding: z.ZodOptional<z.ZodString>;
5340
+ }, z.core.$strip>>;
5298
5341
  }, z.core.$strip>;
5299
5342
  /**
5300
5343
  * Single flow schema (Flow).
@@ -5320,6 +5363,16 @@ declare const FlowSchema: z.ZodObject<{
5320
5363
  overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5321
5364
  traceInclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
5322
5365
  }, z.core.$strict>>;
5366
+ observe: z.ZodOptional<z.ZodObject<{
5367
+ level: z.ZodOptional<z.ZodEnum<{
5368
+ trace: "trace";
5369
+ off: "off";
5370
+ standard: "standard";
5371
+ }>>;
5372
+ sample: z.ZodOptional<z.ZodNumber>;
5373
+ url: z.ZodOptional<z.ZodString>;
5374
+ binding: z.ZodOptional<z.ZodString>;
5375
+ }, z.core.$strip>>;
5323
5376
  }, z.core.$strip>>;
5324
5377
  sources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
5325
5378
  package: z.ZodOptional<z.ZodString>;
@@ -5534,6 +5587,16 @@ declare const JsonSchema$1: z.ZodObject<{
5534
5587
  overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5535
5588
  traceInclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
5536
5589
  }, z.core.$strict>>;
5590
+ observe: z.ZodOptional<z.ZodObject<{
5591
+ level: z.ZodOptional<z.ZodEnum<{
5592
+ trace: "trace";
5593
+ off: "off";
5594
+ standard: "standard";
5595
+ }>>;
5596
+ sample: z.ZodOptional<z.ZodNumber>;
5597
+ url: z.ZodOptional<z.ZodString>;
5598
+ binding: z.ZodOptional<z.ZodString>;
5599
+ }, z.core.$strip>>;
5537
5600
  }, z.core.$strip>>;
5538
5601
  sources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
5539
5602
  package: z.ZodOptional<z.ZodString>;
@@ -5753,6 +5816,12 @@ declare function safeParseConfig(data: unknown): z.ZodSafeParseResult<{
5753
5816
  overrides?: Record<string, string> | undefined;
5754
5817
  traceInclude?: string[] | undefined;
5755
5818
  } | undefined;
5819
+ observe?: {
5820
+ level?: "trace" | "off" | "standard" | undefined;
5821
+ sample?: number | undefined;
5822
+ url?: string | undefined;
5823
+ binding?: string | undefined;
5824
+ } | undefined;
5756
5825
  } | undefined;
5757
5826
  sources?: Record<string, {
5758
5827
  package?: string | undefined;
@@ -5950,6 +6019,12 @@ declare function safeParseFlow(data: unknown): z.ZodSafeParseResult<{
5950
6019
  overrides?: Record<string, string> | undefined;
5951
6020
  traceInclude?: string[] | undefined;
5952
6021
  } | undefined;
6022
+ observe?: {
6023
+ level?: "trace" | "off" | "standard" | undefined;
6024
+ sample?: number | undefined;
6025
+ url?: string | undefined;
6026
+ binding?: string | undefined;
6027
+ } | undefined;
5953
6028
  } | undefined;
5954
6029
  sources?: Record<string, {
5955
6030
  package?: string | undefined;
@@ -6147,6 +6222,16 @@ declare const configJsonSchema: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<
6147
6222
  overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
6148
6223
  traceInclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
6149
6224
  }, z.core.$strict>>;
6225
+ observe: z.ZodOptional<z.ZodObject<{
6226
+ level: z.ZodOptional<z.ZodEnum<{
6227
+ trace: "trace";
6228
+ off: "off";
6229
+ standard: "standard";
6230
+ }>>;
6231
+ sample: z.ZodOptional<z.ZodNumber>;
6232
+ url: z.ZodOptional<z.ZodString>;
6233
+ binding: z.ZodOptional<z.ZodString>;
6234
+ }, z.core.$strip>>;
6150
6235
  }, z.core.$strip>>;
6151
6236
  sources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
6152
6237
  package: z.ZodOptional<z.ZodString>;
@@ -6375,6 +6460,7 @@ declare const flow_ContractSchemaEntry: typeof ContractSchemaEntry;
6375
6460
  declare const flow_DestinationSchema: typeof DestinationSchema;
6376
6461
  declare const flow_FlowSchema: typeof FlowSchema;
6377
6462
  declare const flow_JsonSchemaSchema: typeof JsonSchemaSchema;
6463
+ declare const flow_ObserveSchema: typeof ObserveSchema;
6378
6464
  declare const flow_SettingsSchema: typeof SettingsSchema;
6379
6465
  declare const flow_SourceSchema: typeof SourceSchema;
6380
6466
  declare const flow_StepExampleSchema: typeof StepExampleSchema;
@@ -6399,7 +6485,7 @@ declare const flow_storeJsonSchema: typeof storeJsonSchema;
6399
6485
  declare const flow_transformerJsonSchema: typeof transformerJsonSchema;
6400
6486
  declare const flow_validateEventsJsonSchema: typeof validateEventsJsonSchema;
6401
6487
  declare namespace flow {
6402
- export { flow_BundlePackageSchema as BundlePackageSchema, flow_BundleSchema as BundleSchema, CodeSchema$1 as CodeSchema, flow_ConfigSchema as ConfigSchema, flow_ContractActionsSchema as ContractActionsSchema, flow_ContractEventsSchema as ContractEventsSchema, flow_ContractRuleSchema as ContractRuleSchema, flow_ContractSchema as ContractSchema, flow_ContractSchemaEntry as ContractSchemaEntry, flow_DestinationSchema as DestinationSchema, flow_FlowSchema as FlowSchema, JsonSchema$1 as JsonSchema, flow_JsonSchemaSchema as JsonSchemaSchema, flow_SettingsSchema as SettingsSchema, flow_SourceSchema as SourceSchema, flow_StepExampleSchema as StepExampleSchema, flow_StepExamplesSchema as StepExamplesSchema, flow_StoreSchema as StoreSchema, flow_TransformerSchema as TransformerSchema, flow_TriggerDescriptorSchema as TriggerDescriptorSchema, flow_ValidateEventsSchema as ValidateEventsSchema, flow_VariablesSchema as VariablesSchema, flow_configJsonSchema as configJsonSchema, flow_contractJsonSchema as contractJsonSchema, flow_contractRuleJsonSchema as contractRuleJsonSchema, flow_destinationJsonSchema as destinationJsonSchema, flow_flowConfigJsonSchema as flowConfigJsonSchema, flow_flowJsonSchema as flowJsonSchema, flow_parseConfig as parseConfig, flow_parseFlow as parseFlow, flow_safeParseConfig as safeParseConfig, flow_safeParseFlow as safeParseFlow, flow_sourceJsonSchema as sourceJsonSchema, flow_storeJsonSchema as storeJsonSchema, flow_transformerJsonSchema as transformerJsonSchema, flow_validateEventsJsonSchema as validateEventsJsonSchema };
6488
+ export { flow_BundlePackageSchema as BundlePackageSchema, flow_BundleSchema as BundleSchema, CodeSchema$1 as CodeSchema, flow_ConfigSchema as ConfigSchema, flow_ContractActionsSchema as ContractActionsSchema, flow_ContractEventsSchema as ContractEventsSchema, flow_ContractRuleSchema as ContractRuleSchema, flow_ContractSchema as ContractSchema, flow_ContractSchemaEntry as ContractSchemaEntry, flow_DestinationSchema as DestinationSchema, flow_FlowSchema as FlowSchema, JsonSchema$1 as JsonSchema, flow_JsonSchemaSchema as JsonSchemaSchema, flow_ObserveSchema as ObserveSchema, flow_SettingsSchema as SettingsSchema, flow_SourceSchema as SourceSchema, flow_StepExampleSchema as StepExampleSchema, flow_StepExamplesSchema as StepExamplesSchema, flow_StoreSchema as StoreSchema, flow_TransformerSchema as TransformerSchema, flow_TriggerDescriptorSchema as TriggerDescriptorSchema, flow_ValidateEventsSchema as ValidateEventsSchema, flow_VariablesSchema as VariablesSchema, flow_configJsonSchema as configJsonSchema, flow_contractJsonSchema as contractJsonSchema, flow_contractRuleJsonSchema as contractRuleJsonSchema, flow_destinationJsonSchema as destinationJsonSchema, flow_flowConfigJsonSchema as flowConfigJsonSchema, flow_flowJsonSchema as flowJsonSchema, flow_parseConfig as parseConfig, flow_parseFlow as parseFlow, flow_safeParseConfig as safeParseConfig, flow_safeParseFlow as safeParseFlow, flow_sourceJsonSchema as sourceJsonSchema, flow_storeJsonSchema as storeJsonSchema, flow_transformerJsonSchema as transformerJsonSchema, flow_validateEventsJsonSchema as validateEventsJsonSchema };
6403
6489
  }
6404
6490
 
6405
6491
  /**
@@ -7304,6 +7390,43 @@ interface Ingest {
7304
7390
  _meta: IngestMeta;
7305
7391
  }
7306
7392
 
7393
+ /**
7394
+ * Unified observation connect protocol: the public shapes and pure parsers a
7395
+ * customer-side runtime uses to attach to an observation session. Everything a
7396
+ * customer commits is public (`url`, `binding`); the per-session credential
7397
+ * arrives out-of-band and is only parsed here, never verified: the observer
7398
+ * is its verifier. No DOM, no Node, pure string/object functions.
7399
+ */
7400
+ /** Web arm connect config. Every value is public and safe to commit. */
7401
+ interface ObserveWeb {
7402
+ url: string;
7403
+ binding: string;
7404
+ /**
7405
+ * FlowState scoping id stamped onto every posted record. Defaults to the
7406
+ * collector's flow name; bakers (e.g. a preview artifact) set it so records
7407
+ * carry the platform's flow id rather than the config's local name.
7408
+ */
7409
+ flowId?: string;
7410
+ /**
7411
+ * Observer verbosity once a credential attaches. Defaults to 'standard'.
7412
+ * Also drives the collector-wide capture level supplier, so 'trace'
7413
+ * enables destination call capture.
7414
+ */
7415
+ level?: 'off' | 'standard' | 'trace';
7416
+ /** Deterministic sample fraction in [0, 1]. Defaults to 1. */
7417
+ sample?: number;
7418
+ }
7419
+ /** Server arm connect config, assembled from the deployment's env trio. */
7420
+ interface ObserveServer {
7421
+ url: string;
7422
+ sessionId: string;
7423
+ token: string;
7424
+ level?: 'off' | 'standard' | 'trace';
7425
+ /** Deterministic sample fraction in [0, 1]. Defaults to 1. */
7426
+ sample?: number;
7427
+ }
7428
+ type Observe = ObserveWeb | ObserveServer;
7429
+
7307
7430
  /**
7308
7431
  * FlowState is the canonical observation record emitted at each hop in a
7309
7432
  * walkerOS pipeline. Telemetry helpers populate one of these per (step,
@@ -7344,6 +7467,8 @@ interface FlowState {
7344
7467
  sourceId?: string;
7345
7468
  /** Per-poster monotonic record counter for gap detection. Stamped by the batched poster, not emitters. */
7346
7469
  seq?: number;
7470
+ /** Release provenance of the runtime that produced this state, e.g. a deployment id. Stamped by the wiring layer, not emitters. */
7471
+ release?: string;
7347
7472
  /**
7348
7473
  * Vendor calls recorded via wrapEnv on destination out records. Captured only
7349
7474
  * at trace level and only when the destination declares a `calls` list
@@ -7471,6 +7596,20 @@ interface InitConfig extends Partial<Config$6> {
7471
7596
  custom?: Properties;
7472
7597
  /** Hooks for pipeline observation and interception */
7473
7598
  hooks?: Functions;
7599
+ /**
7600
+ * Observation session connect config, wired by `startFlow` before the run
7601
+ * command. The server form attaches a telemetry poster directly from its
7602
+ * config trio; the web form attaches only when an `elbObserve` credential
7603
+ * is present (URL param or storage slot) and its binding matches. Purely
7604
+ * advisory: nothing on this path can affect event processing.
7605
+ */
7606
+ observe?: Observe;
7607
+ /**
7608
+ * Caller-supplied observers, added verbatim to `collector.observers` by
7609
+ * `startFlow`. Escape hatch for custom emit targets; same advisory
7610
+ * contract as every observer (thrown values are swallowed by emitStep).
7611
+ */
7612
+ observers?: ObserverFn[];
7474
7613
  }
7475
7614
  interface SessionData extends Properties {
7476
7615
  isStart: boolean;
@@ -9173,6 +9312,19 @@ declare namespace Flow {
9173
9312
  level?: 'off' | 'standard' | 'trace';
9174
9313
  /** Deterministic sample fraction in [0, 1]. Defaults to 1. */
9175
9314
  sample?: number;
9315
+ /**
9316
+ * Observer base URL for the web connect form. Public, safe to commit.
9317
+ * When `url` and `binding` are both set on a web flow, the bundler bakes
9318
+ * exactly this pair into the generated startFlow config; the runtime
9319
+ * attaches only when an out-of-band `elbObserve` credential is present.
9320
+ * Secrets never live in flow config.
9321
+ */
9322
+ url?: string;
9323
+ /**
9324
+ * Public project binding a web observe credential must match. Paired
9325
+ * with `url`; public, safe to commit.
9326
+ */
9327
+ binding?: string;
9176
9328
  }
9177
9329
  /**
9178
9330
  * Reusable values referenced via `$var.name` (with optional deep paths).
package/dist/dev.d.ts CHANGED
@@ -3568,6 +3568,21 @@ declare const InitConfigSchema: z.ZodObject<{
3568
3568
  stores: z.ZodOptional<z.ZodUnknown>;
3569
3569
  custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>>;
3570
3570
  hooks: z.ZodOptional<z.ZodUnknown>;
3571
+ observe: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
3572
+ url: z.ZodString;
3573
+ binding: z.ZodString;
3574
+ }, z.core.$strip>, z.ZodObject<{
3575
+ url: z.ZodString;
3576
+ sessionId: z.ZodString;
3577
+ token: z.ZodString;
3578
+ level: z.ZodOptional<z.ZodEnum<{
3579
+ trace: "trace";
3580
+ off: "off";
3581
+ standard: "standard";
3582
+ }>>;
3583
+ sample: z.ZodOptional<z.ZodNumber>;
3584
+ }, z.core.$strip>]>>;
3585
+ observers: z.ZodOptional<z.ZodUnknown>;
3571
3586
  }, z.core.$strip>;
3572
3587
  /**
3573
3588
  * PushContext - Context for collector.push
@@ -5272,12 +5287,30 @@ declare const ContractSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
5272
5287
  events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
5273
5288
  schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5274
5289
  }, z.core.$strip>>;
5290
+ /**
5291
+ * Observe schema (Flow.Observe).
5292
+ *
5293
+ * @remarks
5294
+ * Observability configuration block. `url` + `binding` form the public web
5295
+ * connect pair (safe to commit; the per-session credential arrives
5296
+ * out-of-band). `level` and `sample` are managed-telemetry knobs.
5297
+ */
5298
+ declare const ObserveSchema: z.ZodObject<{
5299
+ level: z.ZodOptional<z.ZodEnum<{
5300
+ trace: "trace";
5301
+ off: "off";
5302
+ standard: "standard";
5303
+ }>>;
5304
+ sample: z.ZodOptional<z.ZodNumber>;
5305
+ url: z.ZodOptional<z.ZodString>;
5306
+ binding: z.ZodOptional<z.ZodString>;
5307
+ }, z.core.$strip>;
5275
5308
  /**
5276
5309
  * Per-flow Config schema (Flow.Config).
5277
5310
  *
5278
5311
  * @remarks
5279
5312
  * Groups platform identity, optional public URL, free-form settings bag,
5280
- * and bundle (build-time) configuration.
5313
+ * bundle (build-time) configuration, and observability configuration.
5281
5314
  */
5282
5315
  declare const ConfigSchema: z.ZodObject<{
5283
5316
  platform: z.ZodEnum<{
@@ -5295,6 +5328,16 @@ declare const ConfigSchema: z.ZodObject<{
5295
5328
  overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5296
5329
  traceInclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
5297
5330
  }, z.core.$strict>>;
5331
+ observe: z.ZodOptional<z.ZodObject<{
5332
+ level: z.ZodOptional<z.ZodEnum<{
5333
+ trace: "trace";
5334
+ off: "off";
5335
+ standard: "standard";
5336
+ }>>;
5337
+ sample: z.ZodOptional<z.ZodNumber>;
5338
+ url: z.ZodOptional<z.ZodString>;
5339
+ binding: z.ZodOptional<z.ZodString>;
5340
+ }, z.core.$strip>>;
5298
5341
  }, z.core.$strip>;
5299
5342
  /**
5300
5343
  * Single flow schema (Flow).
@@ -5320,6 +5363,16 @@ declare const FlowSchema: z.ZodObject<{
5320
5363
  overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5321
5364
  traceInclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
5322
5365
  }, z.core.$strict>>;
5366
+ observe: z.ZodOptional<z.ZodObject<{
5367
+ level: z.ZodOptional<z.ZodEnum<{
5368
+ trace: "trace";
5369
+ off: "off";
5370
+ standard: "standard";
5371
+ }>>;
5372
+ sample: z.ZodOptional<z.ZodNumber>;
5373
+ url: z.ZodOptional<z.ZodString>;
5374
+ binding: z.ZodOptional<z.ZodString>;
5375
+ }, z.core.$strip>>;
5323
5376
  }, z.core.$strip>>;
5324
5377
  sources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
5325
5378
  package: z.ZodOptional<z.ZodString>;
@@ -5534,6 +5587,16 @@ declare const JsonSchema$1: z.ZodObject<{
5534
5587
  overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5535
5588
  traceInclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
5536
5589
  }, z.core.$strict>>;
5590
+ observe: z.ZodOptional<z.ZodObject<{
5591
+ level: z.ZodOptional<z.ZodEnum<{
5592
+ trace: "trace";
5593
+ off: "off";
5594
+ standard: "standard";
5595
+ }>>;
5596
+ sample: z.ZodOptional<z.ZodNumber>;
5597
+ url: z.ZodOptional<z.ZodString>;
5598
+ binding: z.ZodOptional<z.ZodString>;
5599
+ }, z.core.$strip>>;
5537
5600
  }, z.core.$strip>>;
5538
5601
  sources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
5539
5602
  package: z.ZodOptional<z.ZodString>;
@@ -5753,6 +5816,12 @@ declare function safeParseConfig(data: unknown): z.ZodSafeParseResult<{
5753
5816
  overrides?: Record<string, string> | undefined;
5754
5817
  traceInclude?: string[] | undefined;
5755
5818
  } | undefined;
5819
+ observe?: {
5820
+ level?: "trace" | "off" | "standard" | undefined;
5821
+ sample?: number | undefined;
5822
+ url?: string | undefined;
5823
+ binding?: string | undefined;
5824
+ } | undefined;
5756
5825
  } | undefined;
5757
5826
  sources?: Record<string, {
5758
5827
  package?: string | undefined;
@@ -5950,6 +6019,12 @@ declare function safeParseFlow(data: unknown): z.ZodSafeParseResult<{
5950
6019
  overrides?: Record<string, string> | undefined;
5951
6020
  traceInclude?: string[] | undefined;
5952
6021
  } | undefined;
6022
+ observe?: {
6023
+ level?: "trace" | "off" | "standard" | undefined;
6024
+ sample?: number | undefined;
6025
+ url?: string | undefined;
6026
+ binding?: string | undefined;
6027
+ } | undefined;
5953
6028
  } | undefined;
5954
6029
  sources?: Record<string, {
5955
6030
  package?: string | undefined;
@@ -6147,6 +6222,16 @@ declare const configJsonSchema: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<
6147
6222
  overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
6148
6223
  traceInclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
6149
6224
  }, z.core.$strict>>;
6225
+ observe: z.ZodOptional<z.ZodObject<{
6226
+ level: z.ZodOptional<z.ZodEnum<{
6227
+ trace: "trace";
6228
+ off: "off";
6229
+ standard: "standard";
6230
+ }>>;
6231
+ sample: z.ZodOptional<z.ZodNumber>;
6232
+ url: z.ZodOptional<z.ZodString>;
6233
+ binding: z.ZodOptional<z.ZodString>;
6234
+ }, z.core.$strip>>;
6150
6235
  }, z.core.$strip>>;
6151
6236
  sources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
6152
6237
  package: z.ZodOptional<z.ZodString>;
@@ -6375,6 +6460,7 @@ declare const flow_ContractSchemaEntry: typeof ContractSchemaEntry;
6375
6460
  declare const flow_DestinationSchema: typeof DestinationSchema;
6376
6461
  declare const flow_FlowSchema: typeof FlowSchema;
6377
6462
  declare const flow_JsonSchemaSchema: typeof JsonSchemaSchema;
6463
+ declare const flow_ObserveSchema: typeof ObserveSchema;
6378
6464
  declare const flow_SettingsSchema: typeof SettingsSchema;
6379
6465
  declare const flow_SourceSchema: typeof SourceSchema;
6380
6466
  declare const flow_StepExampleSchema: typeof StepExampleSchema;
@@ -6399,7 +6485,7 @@ declare const flow_storeJsonSchema: typeof storeJsonSchema;
6399
6485
  declare const flow_transformerJsonSchema: typeof transformerJsonSchema;
6400
6486
  declare const flow_validateEventsJsonSchema: typeof validateEventsJsonSchema;
6401
6487
  declare namespace flow {
6402
- export { flow_BundlePackageSchema as BundlePackageSchema, flow_BundleSchema as BundleSchema, CodeSchema$1 as CodeSchema, flow_ConfigSchema as ConfigSchema, flow_ContractActionsSchema as ContractActionsSchema, flow_ContractEventsSchema as ContractEventsSchema, flow_ContractRuleSchema as ContractRuleSchema, flow_ContractSchema as ContractSchema, flow_ContractSchemaEntry as ContractSchemaEntry, flow_DestinationSchema as DestinationSchema, flow_FlowSchema as FlowSchema, JsonSchema$1 as JsonSchema, flow_JsonSchemaSchema as JsonSchemaSchema, flow_SettingsSchema as SettingsSchema, flow_SourceSchema as SourceSchema, flow_StepExampleSchema as StepExampleSchema, flow_StepExamplesSchema as StepExamplesSchema, flow_StoreSchema as StoreSchema, flow_TransformerSchema as TransformerSchema, flow_TriggerDescriptorSchema as TriggerDescriptorSchema, flow_ValidateEventsSchema as ValidateEventsSchema, flow_VariablesSchema as VariablesSchema, flow_configJsonSchema as configJsonSchema, flow_contractJsonSchema as contractJsonSchema, flow_contractRuleJsonSchema as contractRuleJsonSchema, flow_destinationJsonSchema as destinationJsonSchema, flow_flowConfigJsonSchema as flowConfigJsonSchema, flow_flowJsonSchema as flowJsonSchema, flow_parseConfig as parseConfig, flow_parseFlow as parseFlow, flow_safeParseConfig as safeParseConfig, flow_safeParseFlow as safeParseFlow, flow_sourceJsonSchema as sourceJsonSchema, flow_storeJsonSchema as storeJsonSchema, flow_transformerJsonSchema as transformerJsonSchema, flow_validateEventsJsonSchema as validateEventsJsonSchema };
6488
+ export { flow_BundlePackageSchema as BundlePackageSchema, flow_BundleSchema as BundleSchema, CodeSchema$1 as CodeSchema, flow_ConfigSchema as ConfigSchema, flow_ContractActionsSchema as ContractActionsSchema, flow_ContractEventsSchema as ContractEventsSchema, flow_ContractRuleSchema as ContractRuleSchema, flow_ContractSchema as ContractSchema, flow_ContractSchemaEntry as ContractSchemaEntry, flow_DestinationSchema as DestinationSchema, flow_FlowSchema as FlowSchema, JsonSchema$1 as JsonSchema, flow_JsonSchemaSchema as JsonSchemaSchema, flow_ObserveSchema as ObserveSchema, flow_SettingsSchema as SettingsSchema, flow_SourceSchema as SourceSchema, flow_StepExampleSchema as StepExampleSchema, flow_StepExamplesSchema as StepExamplesSchema, flow_StoreSchema as StoreSchema, flow_TransformerSchema as TransformerSchema, flow_TriggerDescriptorSchema as TriggerDescriptorSchema, flow_ValidateEventsSchema as ValidateEventsSchema, flow_VariablesSchema as VariablesSchema, flow_configJsonSchema as configJsonSchema, flow_contractJsonSchema as contractJsonSchema, flow_contractRuleJsonSchema as contractRuleJsonSchema, flow_destinationJsonSchema as destinationJsonSchema, flow_flowConfigJsonSchema as flowConfigJsonSchema, flow_flowJsonSchema as flowJsonSchema, flow_parseConfig as parseConfig, flow_parseFlow as parseFlow, flow_safeParseConfig as safeParseConfig, flow_safeParseFlow as safeParseFlow, flow_sourceJsonSchema as sourceJsonSchema, flow_storeJsonSchema as storeJsonSchema, flow_transformerJsonSchema as transformerJsonSchema, flow_validateEventsJsonSchema as validateEventsJsonSchema };
6403
6489
  }
6404
6490
 
6405
6491
  /**
@@ -7304,6 +7390,43 @@ interface Ingest {
7304
7390
  _meta: IngestMeta;
7305
7391
  }
7306
7392
 
7393
+ /**
7394
+ * Unified observation connect protocol: the public shapes and pure parsers a
7395
+ * customer-side runtime uses to attach to an observation session. Everything a
7396
+ * customer commits is public (`url`, `binding`); the per-session credential
7397
+ * arrives out-of-band and is only parsed here, never verified: the observer
7398
+ * is its verifier. No DOM, no Node, pure string/object functions.
7399
+ */
7400
+ /** Web arm connect config. Every value is public and safe to commit. */
7401
+ interface ObserveWeb {
7402
+ url: string;
7403
+ binding: string;
7404
+ /**
7405
+ * FlowState scoping id stamped onto every posted record. Defaults to the
7406
+ * collector's flow name; bakers (e.g. a preview artifact) set it so records
7407
+ * carry the platform's flow id rather than the config's local name.
7408
+ */
7409
+ flowId?: string;
7410
+ /**
7411
+ * Observer verbosity once a credential attaches. Defaults to 'standard'.
7412
+ * Also drives the collector-wide capture level supplier, so 'trace'
7413
+ * enables destination call capture.
7414
+ */
7415
+ level?: 'off' | 'standard' | 'trace';
7416
+ /** Deterministic sample fraction in [0, 1]. Defaults to 1. */
7417
+ sample?: number;
7418
+ }
7419
+ /** Server arm connect config, assembled from the deployment's env trio. */
7420
+ interface ObserveServer {
7421
+ url: string;
7422
+ sessionId: string;
7423
+ token: string;
7424
+ level?: 'off' | 'standard' | 'trace';
7425
+ /** Deterministic sample fraction in [0, 1]. Defaults to 1. */
7426
+ sample?: number;
7427
+ }
7428
+ type Observe = ObserveWeb | ObserveServer;
7429
+
7307
7430
  /**
7308
7431
  * FlowState is the canonical observation record emitted at each hop in a
7309
7432
  * walkerOS pipeline. Telemetry helpers populate one of these per (step,
@@ -7344,6 +7467,8 @@ interface FlowState {
7344
7467
  sourceId?: string;
7345
7468
  /** Per-poster monotonic record counter for gap detection. Stamped by the batched poster, not emitters. */
7346
7469
  seq?: number;
7470
+ /** Release provenance of the runtime that produced this state, e.g. a deployment id. Stamped by the wiring layer, not emitters. */
7471
+ release?: string;
7347
7472
  /**
7348
7473
  * Vendor calls recorded via wrapEnv on destination out records. Captured only
7349
7474
  * at trace level and only when the destination declares a `calls` list
@@ -7471,6 +7596,20 @@ interface InitConfig extends Partial<Config$6> {
7471
7596
  custom?: Properties;
7472
7597
  /** Hooks for pipeline observation and interception */
7473
7598
  hooks?: Functions;
7599
+ /**
7600
+ * Observation session connect config, wired by `startFlow` before the run
7601
+ * command. The server form attaches a telemetry poster directly from its
7602
+ * config trio; the web form attaches only when an `elbObserve` credential
7603
+ * is present (URL param or storage slot) and its binding matches. Purely
7604
+ * advisory: nothing on this path can affect event processing.
7605
+ */
7606
+ observe?: Observe;
7607
+ /**
7608
+ * Caller-supplied observers, added verbatim to `collector.observers` by
7609
+ * `startFlow`. Escape hatch for custom emit targets; same advisory
7610
+ * contract as every observer (thrown values are swallowed by emitStep).
7611
+ */
7612
+ observers?: ObserverFn[];
7474
7613
  }
7475
7614
  interface SessionData extends Properties {
7476
7615
  isStart: boolean;
@@ -9173,6 +9312,19 @@ declare namespace Flow {
9173
9312
  level?: 'off' | 'standard' | 'trace';
9174
9313
  /** Deterministic sample fraction in [0, 1]. Defaults to 1. */
9175
9314
  sample?: number;
9315
+ /**
9316
+ * Observer base URL for the web connect form. Public, safe to commit.
9317
+ * When `url` and `binding` are both set on a web flow, the bundler bakes
9318
+ * exactly this pair into the generated startFlow config; the runtime
9319
+ * attaches only when an out-of-band `elbObserve` credential is present.
9320
+ * Secrets never live in flow config.
9321
+ */
9322
+ url?: string;
9323
+ /**
9324
+ * Public project binding a web observe credential must match. Paired
9325
+ * with `url`; public, safe to commit.
9326
+ */
9327
+ binding?: string;
9176
9328
  }
9177
9329
  /**
9178
9330
  * Reusable values referenced via `$var.name` (with optional deep paths).