qati-sdk 1.0.0 → 1.0.2

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/dist/index.d.cts CHANGED
@@ -222,7 +222,7 @@ declare class HttpClient {
222
222
  private retryRequest;
223
223
  }
224
224
 
225
- declare const ADVISORY_TYPES: readonly ["DRIFT_WARNING", "ANOMALY_CLUSTER", "CONFIDENCE_COLLAPSE", "MODEL_INSTABILITY", "RAPID_ESCALATION_NEW_DEVICE", "RAPID_ESCALATION_EXISTING_ENTITY", "SUSTAINED_DEGRADATION", "SINGLE_EVENT_SPIKE", "CAUSAL_INSTABILITY_PROPAGATION", "DOMINANT_UPSTREAM_DEPENDENCY", "IDENTITY_CONTEXT_MISMATCH", "RECOVERY_IN_PROGRESS"];
225
+ declare const ADVISORY_TYPES: readonly ["DRIFT_WARNING", "ANOMALY_CLUSTER", "CONFIDENCE_COLLAPSE", "MODEL_INSTABILITY", "RAPID_ESCALATION_NEW_DEVICE", "RAPID_ESCALATION_EXISTING_ENTITY", "SUSTAINED_DEGRADATION", "SINGLE_EVENT_SPIKE", "CAUSAL_INSTABILITY_PROPAGATION", "DOMINANT_UPSTREAM_DEPENDENCY", "IDENTITY_CONTEXT_MISMATCH", "RECOVERY_IN_PROGRESS", "PROMPT_INJECTION_PRESSURE", "CONTEXT_DRIFT_WARNING", "LOW_TRUST_CONTEXT", "UNAUTHORIZED_TOOL_ATTEMPT", "POLICY_CONFLICT_WARNING", "QUALITY_DEGRADATION", "EXECUTION_RISK_ESCALATION", "MISSING_APPROVAL", "UNAUTHORIZED_API_CALL"];
226
226
  /**
227
227
  * Exhaustive set of advisory `type` values accepted by the Query API filters and payloads.
228
228
  */
@@ -355,7 +355,7 @@ declare class AdvisoryResource {
355
355
  declare const BaseEventSchema: z.ZodObject<{
356
356
  tenant_id: z.ZodString;
357
357
  signal_version: z.ZodString;
358
- signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT"]>;
358
+ signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT", "SESSION", "PROMPT_INPUT", "CONTEXT_INTEGRITY", "TOOL_CALL", "RAG_RETRIEVAL", "POLICY_EVENT", "USER_FEEDBACK", "WORKFLOW_ACTION", "API_CALL"]>;
359
359
  signal_payload: z.ZodRecord<z.ZodString, z.ZodAny>;
360
360
  principal: z.ZodObject<{
361
361
  user_id: z.ZodOptional<z.ZodString>;
@@ -364,13 +364,23 @@ declare const BaseEventSchema: z.ZodObject<{
364
364
  session_id: z.ZodOptional<z.ZodString>;
365
365
  model_id: z.ZodOptional<z.ZodString>;
366
366
  service_id: z.ZodOptional<z.ZodString>;
367
- }, "strip", z.ZodTypeAny, {
367
+ conversation_id: z.ZodOptional<z.ZodString>;
368
+ document_id: z.ZodOptional<z.ZodString>;
369
+ tool_id: z.ZodOptional<z.ZodString>;
370
+ workflow_id: z.ZodOptional<z.ZodString>;
371
+ api_key_id: z.ZodOptional<z.ZodString>;
372
+ }, "strict", z.ZodTypeAny, {
368
373
  user_id?: string | undefined;
369
374
  account_id?: string | undefined;
370
375
  device_id?: string | undefined;
371
376
  session_id?: string | undefined;
372
377
  model_id?: string | undefined;
373
378
  service_id?: string | undefined;
379
+ conversation_id?: string | undefined;
380
+ document_id?: string | undefined;
381
+ tool_id?: string | undefined;
382
+ workflow_id?: string | undefined;
383
+ api_key_id?: string | undefined;
374
384
  }, {
375
385
  user_id?: string | undefined;
376
386
  account_id?: string | undefined;
@@ -378,6 +388,11 @@ declare const BaseEventSchema: z.ZodObject<{
378
388
  session_id?: string | undefined;
379
389
  model_id?: string | undefined;
380
390
  service_id?: string | undefined;
391
+ conversation_id?: string | undefined;
392
+ document_id?: string | undefined;
393
+ tool_id?: string | undefined;
394
+ workflow_id?: string | undefined;
395
+ api_key_id?: string | undefined;
381
396
  }>;
382
397
  timestamp: z.ZodOptional<z.ZodDefault<z.ZodString>>;
383
398
  confidence_hint: z.ZodOptional<z.ZodNumber>;
@@ -410,7 +425,7 @@ declare const BaseEventSchema: z.ZodObject<{
410
425
  }, "strip", z.ZodTypeAny, {
411
426
  tenant_id: string;
412
427
  signal_version: string;
413
- signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT";
428
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
414
429
  signal_payload: Record<string, any>;
415
430
  principal: {
416
431
  user_id?: string | undefined;
@@ -419,6 +434,11 @@ declare const BaseEventSchema: z.ZodObject<{
419
434
  session_id?: string | undefined;
420
435
  model_id?: string | undefined;
421
436
  service_id?: string | undefined;
437
+ conversation_id?: string | undefined;
438
+ document_id?: string | undefined;
439
+ tool_id?: string | undefined;
440
+ workflow_id?: string | undefined;
441
+ api_key_id?: string | undefined;
422
442
  };
423
443
  integrity?: {
424
444
  hash?: string | undefined;
@@ -435,7 +455,7 @@ declare const BaseEventSchema: z.ZodObject<{
435
455
  }, {
436
456
  tenant_id: string;
437
457
  signal_version: string;
438
- signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT";
458
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
439
459
  signal_payload: Record<string, any>;
440
460
  principal: {
441
461
  user_id?: string | undefined;
@@ -444,6 +464,11 @@ declare const BaseEventSchema: z.ZodObject<{
444
464
  session_id?: string | undefined;
445
465
  model_id?: string | undefined;
446
466
  service_id?: string | undefined;
467
+ conversation_id?: string | undefined;
468
+ document_id?: string | undefined;
469
+ tool_id?: string | undefined;
470
+ workflow_id?: string | undefined;
471
+ api_key_id?: string | undefined;
447
472
  };
448
473
  integrity?: {
449
474
  hash?: string | undefined;
@@ -546,18 +571,18 @@ declare const ExplainResponseSchema: z.ZodObject<{
546
571
  momentum: z.ZodNumber;
547
572
  top_events: z.ZodDefault<z.ZodArray<z.ZodObject<{
548
573
  event_id: z.ZodString;
549
- signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT"]>;
574
+ signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT", "SESSION", "PROMPT_INPUT", "CONTEXT_INTEGRITY", "TOOL_CALL", "RAG_RETRIEVAL", "POLICY_EVENT", "USER_FEEDBACK", "WORKFLOW_ACTION", "API_CALL"]>;
550
575
  contribution: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
551
576
  recency_weight: z.ZodNumber;
552
577
  reason_code: z.ZodString;
553
578
  }, "strip", z.ZodTypeAny, {
554
- signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT";
579
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
555
580
  event_id: string;
556
581
  recency_weight: number;
557
582
  reason_code: string;
558
583
  contribution?: number | null | undefined;
559
584
  }, {
560
- signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT";
585
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
561
586
  event_id: string;
562
587
  recency_weight: number;
563
588
  reason_code: string;
@@ -577,17 +602,17 @@ declare const ExplainResponseSchema: z.ZodObject<{
577
602
  event_layer_fraction: number;
578
603
  }>, "many">>;
579
604
  active_advisories: z.ZodDefault<z.ZodArray<z.ZodObject<{
580
- type: z.ZodEnum<["DRIFT_WARNING", "ANOMALY_CLUSTER", "CONFIDENCE_COLLAPSE", "MODEL_INSTABILITY", "RAPID_ESCALATION_NEW_DEVICE", "RAPID_ESCALATION_EXISTING_ENTITY", "SUSTAINED_DEGRADATION", "SINGLE_EVENT_SPIKE", "CAUSAL_INSTABILITY_PROPAGATION", "DOMINANT_UPSTREAM_DEPENDENCY", "IDENTITY_CONTEXT_MISMATCH", "RECOVERY_IN_PROGRESS"]>;
605
+ type: z.ZodEnum<["DRIFT_WARNING", "ANOMALY_CLUSTER", "CONFIDENCE_COLLAPSE", "MODEL_INSTABILITY", "RAPID_ESCALATION_NEW_DEVICE", "RAPID_ESCALATION_EXISTING_ENTITY", "SUSTAINED_DEGRADATION", "SINGLE_EVENT_SPIKE", "CAUSAL_INSTABILITY_PROPAGATION", "DOMINANT_UPSTREAM_DEPENDENCY", "IDENTITY_CONTEXT_MISMATCH", "RECOVERY_IN_PROGRESS", "PROMPT_INJECTION_PRESSURE", "CONTEXT_DRIFT_WARNING", "LOW_TRUST_CONTEXT", "UNAUTHORIZED_TOOL_ATTEMPT", "POLICY_CONFLICT_WARNING", "QUALITY_DEGRADATION", "EXECUTION_RISK_ESCALATION", "MISSING_APPROVAL", "UNAUTHORIZED_API_CALL"]>;
581
606
  entity_key: z.ZodString;
582
607
  severity: z.ZodOptional<z.ZodNullable<z.ZodEnum<["LOW", "ELEVATED", "HIGH", "CRITICAL"]>>>;
583
608
  triggering_condition: z.ZodRecord<z.ZodString, z.ZodUnknown>;
584
609
  }, "strip", z.ZodTypeAny, {
585
- type: "DRIFT_WARNING" | "ANOMALY_CLUSTER" | "CONFIDENCE_COLLAPSE" | "MODEL_INSTABILITY" | "RAPID_ESCALATION_NEW_DEVICE" | "RAPID_ESCALATION_EXISTING_ENTITY" | "SUSTAINED_DEGRADATION" | "SINGLE_EVENT_SPIKE" | "CAUSAL_INSTABILITY_PROPAGATION" | "DOMINANT_UPSTREAM_DEPENDENCY" | "IDENTITY_CONTEXT_MISMATCH" | "RECOVERY_IN_PROGRESS";
610
+ type: "DRIFT_WARNING" | "ANOMALY_CLUSTER" | "CONFIDENCE_COLLAPSE" | "MODEL_INSTABILITY" | "RAPID_ESCALATION_NEW_DEVICE" | "RAPID_ESCALATION_EXISTING_ENTITY" | "SUSTAINED_DEGRADATION" | "SINGLE_EVENT_SPIKE" | "CAUSAL_INSTABILITY_PROPAGATION" | "DOMINANT_UPSTREAM_DEPENDENCY" | "IDENTITY_CONTEXT_MISMATCH" | "RECOVERY_IN_PROGRESS" | "PROMPT_INJECTION_PRESSURE" | "CONTEXT_DRIFT_WARNING" | "LOW_TRUST_CONTEXT" | "UNAUTHORIZED_TOOL_ATTEMPT" | "POLICY_CONFLICT_WARNING" | "QUALITY_DEGRADATION" | "EXECUTION_RISK_ESCALATION" | "MISSING_APPROVAL" | "UNAUTHORIZED_API_CALL";
586
611
  entity_key: string;
587
612
  triggering_condition: Record<string, unknown>;
588
613
  severity?: "LOW" | "ELEVATED" | "HIGH" | "CRITICAL" | null | undefined;
589
614
  }, {
590
- type: "DRIFT_WARNING" | "ANOMALY_CLUSTER" | "CONFIDENCE_COLLAPSE" | "MODEL_INSTABILITY" | "RAPID_ESCALATION_NEW_DEVICE" | "RAPID_ESCALATION_EXISTING_ENTITY" | "SUSTAINED_DEGRADATION" | "SINGLE_EVENT_SPIKE" | "CAUSAL_INSTABILITY_PROPAGATION" | "DOMINANT_UPSTREAM_DEPENDENCY" | "IDENTITY_CONTEXT_MISMATCH" | "RECOVERY_IN_PROGRESS";
615
+ type: "DRIFT_WARNING" | "ANOMALY_CLUSTER" | "CONFIDENCE_COLLAPSE" | "MODEL_INSTABILITY" | "RAPID_ESCALATION_NEW_DEVICE" | "RAPID_ESCALATION_EXISTING_ENTITY" | "SUSTAINED_DEGRADATION" | "SINGLE_EVENT_SPIKE" | "CAUSAL_INSTABILITY_PROPAGATION" | "DOMINANT_UPSTREAM_DEPENDENCY" | "IDENTITY_CONTEXT_MISMATCH" | "RECOVERY_IN_PROGRESS" | "PROMPT_INJECTION_PRESSURE" | "CONTEXT_DRIFT_WARNING" | "LOW_TRUST_CONTEXT" | "UNAUTHORIZED_TOOL_ATTEMPT" | "POLICY_CONFLICT_WARNING" | "QUALITY_DEGRADATION" | "EXECUTION_RISK_ESCALATION" | "MISSING_APPROVAL" | "UNAUTHORIZED_API_CALL";
591
616
  entity_key: string;
592
617
  triggering_condition: Record<string, unknown>;
593
618
  severity?: "LOW" | "ELEVATED" | "HIGH" | "CRITICAL" | null | undefined;
@@ -600,7 +625,7 @@ declare const ExplainResponseSchema: z.ZodObject<{
600
625
  cc_delta: number;
601
626
  momentum: number;
602
627
  top_events: {
603
- signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT";
628
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
604
629
  event_id: string;
605
630
  recency_weight: number;
606
631
  reason_code: string;
@@ -612,7 +637,7 @@ declare const ExplainResponseSchema: z.ZodObject<{
612
637
  event_layer_fraction: number;
613
638
  }[];
614
639
  active_advisories: {
615
- type: "DRIFT_WARNING" | "ANOMALY_CLUSTER" | "CONFIDENCE_COLLAPSE" | "MODEL_INSTABILITY" | "RAPID_ESCALATION_NEW_DEVICE" | "RAPID_ESCALATION_EXISTING_ENTITY" | "SUSTAINED_DEGRADATION" | "SINGLE_EVENT_SPIKE" | "CAUSAL_INSTABILITY_PROPAGATION" | "DOMINANT_UPSTREAM_DEPENDENCY" | "IDENTITY_CONTEXT_MISMATCH" | "RECOVERY_IN_PROGRESS";
640
+ type: "DRIFT_WARNING" | "ANOMALY_CLUSTER" | "CONFIDENCE_COLLAPSE" | "MODEL_INSTABILITY" | "RAPID_ESCALATION_NEW_DEVICE" | "RAPID_ESCALATION_EXISTING_ENTITY" | "SUSTAINED_DEGRADATION" | "SINGLE_EVENT_SPIKE" | "CAUSAL_INSTABILITY_PROPAGATION" | "DOMINANT_UPSTREAM_DEPENDENCY" | "IDENTITY_CONTEXT_MISMATCH" | "RECOVERY_IN_PROGRESS" | "PROMPT_INJECTION_PRESSURE" | "CONTEXT_DRIFT_WARNING" | "LOW_TRUST_CONTEXT" | "UNAUTHORIZED_TOOL_ATTEMPT" | "POLICY_CONFLICT_WARNING" | "QUALITY_DEGRADATION" | "EXECUTION_RISK_ESCALATION" | "MISSING_APPROVAL" | "UNAUTHORIZED_API_CALL";
616
641
  entity_key: string;
617
642
  triggering_condition: Record<string, unknown>;
618
643
  severity?: "LOW" | "ELEVATED" | "HIGH" | "CRITICAL" | null | undefined;
@@ -625,7 +650,7 @@ declare const ExplainResponseSchema: z.ZodObject<{
625
650
  cc_delta: number;
626
651
  momentum: number;
627
652
  top_events?: {
628
- signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT";
653
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
629
654
  event_id: string;
630
655
  recency_weight: number;
631
656
  reason_code: string;
@@ -637,7 +662,7 @@ declare const ExplainResponseSchema: z.ZodObject<{
637
662
  event_layer_fraction: number;
638
663
  }[] | undefined;
639
664
  active_advisories?: {
640
- type: "DRIFT_WARNING" | "ANOMALY_CLUSTER" | "CONFIDENCE_COLLAPSE" | "MODEL_INSTABILITY" | "RAPID_ESCALATION_NEW_DEVICE" | "RAPID_ESCALATION_EXISTING_ENTITY" | "SUSTAINED_DEGRADATION" | "SINGLE_EVENT_SPIKE" | "CAUSAL_INSTABILITY_PROPAGATION" | "DOMINANT_UPSTREAM_DEPENDENCY" | "IDENTITY_CONTEXT_MISMATCH" | "RECOVERY_IN_PROGRESS";
665
+ type: "DRIFT_WARNING" | "ANOMALY_CLUSTER" | "CONFIDENCE_COLLAPSE" | "MODEL_INSTABILITY" | "RAPID_ESCALATION_NEW_DEVICE" | "RAPID_ESCALATION_EXISTING_ENTITY" | "SUSTAINED_DEGRADATION" | "SINGLE_EVENT_SPIKE" | "CAUSAL_INSTABILITY_PROPAGATION" | "DOMINANT_UPSTREAM_DEPENDENCY" | "IDENTITY_CONTEXT_MISMATCH" | "RECOVERY_IN_PROGRESS" | "PROMPT_INJECTION_PRESSURE" | "CONTEXT_DRIFT_WARNING" | "LOW_TRUST_CONTEXT" | "UNAUTHORIZED_TOOL_ATTEMPT" | "POLICY_CONFLICT_WARNING" | "QUALITY_DEGRADATION" | "EXECUTION_RISK_ESCALATION" | "MISSING_APPROVAL" | "UNAUTHORIZED_API_CALL";
641
666
  entity_key: string;
642
667
  triggering_condition: Record<string, unknown>;
643
668
  severity?: "LOW" | "ELEVATED" | "HIGH" | "CRITICAL" | null | undefined;
@@ -704,7 +729,7 @@ declare class TenantResource {
704
729
  verifyCredentials(): Promise<VerifyCredentialsResponse>;
705
730
  }
706
731
 
707
- declare const ENTITY_TYPES: readonly ["USER", "DEVICE", "ACCOUNT", "MODEL", "SESSION", "SERVICE"];
732
+ declare const ENTITY_TYPES: readonly ["USER", "DEVICE", "ACCOUNT", "MODEL", "SESSION", "SERVICE", "CONVERSATION", "DOCUMENT", "TOOL", "WORKFLOW", "API_KEY"];
708
733
  /**
709
734
  * Canonical uppercase entity kinds used in `entity_key` prefixes and ingestion principals.
710
735
  */
@@ -777,7 +802,7 @@ declare class TrustStateResource {
777
802
  /**
778
803
  * Fetches the latest trust state for one entity.
779
804
  *
780
- * @param entityType - Lowercase entity class: `user`, `device`, `account`, `model`, `session`, or `service` (see {@link EntityTypeLowerCase}).
805
+ * @param entityType - Lowercase entity class (see {@link EntityTypeLowerCase}).
781
806
  * @param entityId - Id for the entity(Required)
782
807
  * @param options - Optional contributor limits/window.
783
808
  * @returns {@link TrustState} including `current_closure_score`, `risk_tier`, and `top_contributors`.
@@ -786,7 +811,7 @@ declare class TrustStateResource {
786
811
  /**
787
812
  * Fetches trust states for many entities in one request.
788
813
  *
789
- * @param entityType - Lowercase entity class: `user`, `device`, `account`, `model`, `session`, or `service` (see {@link EntityTypeLowerCase}).
814
+ * @param entityType - Lowercase entity class (see {@link EntityTypeLowerCase}).
790
815
  * @param entityIds - Distinct ids to query. Prefer length ≤ 100 or the server may reject the request.
791
816
  * @param options - Optional contributor limits/window.
792
817
  * @returns Array of {@link TrustState} in server-defined order; empty array when `entityIds` is empty.
@@ -931,16 +956,10 @@ type BatchEventResponse = {
931
956
  errors: EventError[];
932
957
  };
933
958
 
934
- /**
935
- * Zod schemas extending `BaseEventSchema` with per-`signal_type` payloads for v1 ingestion.
936
- *
937
- * **Numeric constraints:** several fields use `[0, 1]` ranges, non-negative amounts, or integer counts as annotated on each schema.
938
- */
939
-
940
- declare const TransactionSignalSchema: z.ZodObject<{
959
+ declare const AnomalyFlagSignalSchema: z.ZodObject<{
941
960
  tenant_id: z.ZodString;
942
961
  signal_version: z.ZodString;
943
- signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT"]>;
962
+ signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT", "SESSION", "PROMPT_INPUT", "CONTEXT_INTEGRITY", "TOOL_CALL", "RAG_RETRIEVAL", "POLICY_EVENT", "USER_FEEDBACK", "WORKFLOW_ACTION", "API_CALL"]>;
944
963
  principal: z.ZodObject<{
945
964
  user_id: z.ZodOptional<z.ZodString>;
946
965
  account_id: z.ZodOptional<z.ZodString>;
@@ -948,13 +967,23 @@ declare const TransactionSignalSchema: z.ZodObject<{
948
967
  session_id: z.ZodOptional<z.ZodString>;
949
968
  model_id: z.ZodOptional<z.ZodString>;
950
969
  service_id: z.ZodOptional<z.ZodString>;
951
- }, "strip", z.ZodTypeAny, {
970
+ conversation_id: z.ZodOptional<z.ZodString>;
971
+ document_id: z.ZodOptional<z.ZodString>;
972
+ tool_id: z.ZodOptional<z.ZodString>;
973
+ workflow_id: z.ZodOptional<z.ZodString>;
974
+ api_key_id: z.ZodOptional<z.ZodString>;
975
+ }, "strict", z.ZodTypeAny, {
952
976
  user_id?: string | undefined;
953
977
  account_id?: string | undefined;
954
978
  device_id?: string | undefined;
955
979
  session_id?: string | undefined;
956
980
  model_id?: string | undefined;
957
981
  service_id?: string | undefined;
982
+ conversation_id?: string | undefined;
983
+ document_id?: string | undefined;
984
+ tool_id?: string | undefined;
985
+ workflow_id?: string | undefined;
986
+ api_key_id?: string | undefined;
958
987
  }, {
959
988
  user_id?: string | undefined;
960
989
  account_id?: string | undefined;
@@ -962,6 +991,11 @@ declare const TransactionSignalSchema: z.ZodObject<{
962
991
  session_id?: string | undefined;
963
992
  model_id?: string | undefined;
964
993
  service_id?: string | undefined;
994
+ conversation_id?: string | undefined;
995
+ document_id?: string | undefined;
996
+ tool_id?: string | undefined;
997
+ workflow_id?: string | undefined;
998
+ api_key_id?: string | undefined;
965
999
  }>;
966
1000
  timestamp: z.ZodOptional<z.ZodDefault<z.ZodString>>;
967
1001
  confidence_hint: z.ZodOptional<z.ZodNumber>;
@@ -993,98 +1027,18 @@ declare const TransactionSignalSchema: z.ZodObject<{
993
1027
  }>>;
994
1028
  } & {
995
1029
  signal_payload: z.ZodObject<{
996
- amount: z.ZodDefault<z.ZodNumber>;
997
- amount_minor: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
998
- amount_usd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
999
- currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1000
- merchant_category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1001
- merchant_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1002
- channel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1003
- country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1004
- velocity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1005
- external_anomaly_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1006
- geo_distance: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1007
- geo_distance_km: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1008
- records_accessed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1009
- baseline_records_accessed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1010
- sensitivity_level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1011
- export_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1012
- bulk_export: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1013
- contains_phi: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1014
- control_command: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1015
- authorized: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1016
- safety_critical: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1030
+ severity: z.ZodNumber;
1017
1031
  }, "strip", z.ZodTypeAny, {
1018
- amount: number;
1019
- bulk_export: boolean;
1020
- contains_phi: boolean;
1021
- safety_critical: boolean;
1022
- amount_minor?: number | null | undefined;
1023
- amount_usd?: number | null | undefined;
1024
- currency?: string | null | undefined;
1025
- merchant_category?: string | null | undefined;
1026
- merchant_id?: string | null | undefined;
1027
- channel?: string | null | undefined;
1028
- country?: string | null | undefined;
1029
- velocity?: number | null | undefined;
1030
- external_anomaly_score?: number | null | undefined;
1031
- geo_distance?: number | null | undefined;
1032
- geo_distance_km?: number | null | undefined;
1033
- records_accessed?: number | null | undefined;
1034
- baseline_records_accessed?: number | null | undefined;
1035
- sensitivity_level?: string | null | undefined;
1036
- export_count?: number | null | undefined;
1037
- control_command?: string | null | undefined;
1038
- authorized?: boolean | null | undefined;
1032
+ severity: number;
1039
1033
  }, {
1040
- amount?: number | undefined;
1041
- amount_minor?: number | null | undefined;
1042
- amount_usd?: number | null | undefined;
1043
- currency?: string | null | undefined;
1044
- merchant_category?: string | null | undefined;
1045
- merchant_id?: string | null | undefined;
1046
- channel?: string | null | undefined;
1047
- country?: string | null | undefined;
1048
- velocity?: number | null | undefined;
1049
- external_anomaly_score?: number | null | undefined;
1050
- geo_distance?: number | null | undefined;
1051
- geo_distance_km?: number | null | undefined;
1052
- records_accessed?: number | null | undefined;
1053
- baseline_records_accessed?: number | null | undefined;
1054
- sensitivity_level?: string | null | undefined;
1055
- export_count?: number | null | undefined;
1056
- bulk_export?: boolean | undefined;
1057
- contains_phi?: boolean | undefined;
1058
- control_command?: string | null | undefined;
1059
- authorized?: boolean | null | undefined;
1060
- safety_critical?: boolean | undefined;
1034
+ severity: number;
1061
1035
  }>;
1062
1036
  }, "strip", z.ZodTypeAny, {
1063
1037
  tenant_id: string;
1064
1038
  signal_version: string;
1065
- signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT";
1039
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
1066
1040
  signal_payload: {
1067
- amount: number;
1068
- bulk_export: boolean;
1069
- contains_phi: boolean;
1070
- safety_critical: boolean;
1071
- amount_minor?: number | null | undefined;
1072
- amount_usd?: number | null | undefined;
1073
- currency?: string | null | undefined;
1074
- merchant_category?: string | null | undefined;
1075
- merchant_id?: string | null | undefined;
1076
- channel?: string | null | undefined;
1077
- country?: string | null | undefined;
1078
- velocity?: number | null | undefined;
1079
- external_anomaly_score?: number | null | undefined;
1080
- geo_distance?: number | null | undefined;
1081
- geo_distance_km?: number | null | undefined;
1082
- records_accessed?: number | null | undefined;
1083
- baseline_records_accessed?: number | null | undefined;
1084
- sensitivity_level?: string | null | undefined;
1085
- export_count?: number | null | undefined;
1086
- control_command?: string | null | undefined;
1087
- authorized?: boolean | null | undefined;
1041
+ severity: number;
1088
1042
  };
1089
1043
  principal: {
1090
1044
  user_id?: string | undefined;
@@ -1093,6 +1047,11 @@ declare const TransactionSignalSchema: z.ZodObject<{
1093
1047
  session_id?: string | undefined;
1094
1048
  model_id?: string | undefined;
1095
1049
  service_id?: string | undefined;
1050
+ conversation_id?: string | undefined;
1051
+ document_id?: string | undefined;
1052
+ tool_id?: string | undefined;
1053
+ workflow_id?: string | undefined;
1054
+ api_key_id?: string | undefined;
1096
1055
  };
1097
1056
  integrity?: {
1098
1057
  hash?: string | undefined;
@@ -1109,29 +1068,9 @@ declare const TransactionSignalSchema: z.ZodObject<{
1109
1068
  }, {
1110
1069
  tenant_id: string;
1111
1070
  signal_version: string;
1112
- signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT";
1071
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
1113
1072
  signal_payload: {
1114
- amount?: number | undefined;
1115
- amount_minor?: number | null | undefined;
1116
- amount_usd?: number | null | undefined;
1117
- currency?: string | null | undefined;
1118
- merchant_category?: string | null | undefined;
1119
- merchant_id?: string | null | undefined;
1120
- channel?: string | null | undefined;
1121
- country?: string | null | undefined;
1122
- velocity?: number | null | undefined;
1123
- external_anomaly_score?: number | null | undefined;
1124
- geo_distance?: number | null | undefined;
1125
- geo_distance_km?: number | null | undefined;
1126
- records_accessed?: number | null | undefined;
1127
- baseline_records_accessed?: number | null | undefined;
1128
- sensitivity_level?: string | null | undefined;
1129
- export_count?: number | null | undefined;
1130
- bulk_export?: boolean | undefined;
1131
- contains_phi?: boolean | undefined;
1132
- control_command?: string | null | undefined;
1133
- authorized?: boolean | null | undefined;
1134
- safety_critical?: boolean | undefined;
1073
+ severity: number;
1135
1074
  };
1136
1075
  principal: {
1137
1076
  user_id?: string | undefined;
@@ -1140,6 +1079,11 @@ declare const TransactionSignalSchema: z.ZodObject<{
1140
1079
  session_id?: string | undefined;
1141
1080
  model_id?: string | undefined;
1142
1081
  service_id?: string | undefined;
1082
+ conversation_id?: string | undefined;
1083
+ document_id?: string | undefined;
1084
+ tool_id?: string | undefined;
1085
+ workflow_id?: string | undefined;
1086
+ api_key_id?: string | undefined;
1143
1087
  };
1144
1088
  integrity?: {
1145
1089
  hash?: string | undefined;
@@ -1154,10 +1098,15 @@ declare const TransactionSignalSchema: z.ZodObject<{
1154
1098
  health_summary?: string | Record<string, unknown> | undefined;
1155
1099
  } | undefined;
1156
1100
  }>;
1157
- declare const AnomalyFlagSignalSchema: z.ZodObject<{
1101
+ /** `signal_type: 'ANOMALY_FLAG'` — `severity` required in `[0, 1]`. */
1102
+ type AnomalyFlagSignalEvent = z.infer<typeof AnomalyFlagSignalSchema>;
1103
+
1104
+ declare const createAnomalyFlagEvent: (event: AnomalyFlagSignalEvent) => RawEventRequest;
1105
+
1106
+ declare const ApiCallSignalSchema: z.ZodObject<{
1158
1107
  tenant_id: z.ZodString;
1159
1108
  signal_version: z.ZodString;
1160
- signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT"]>;
1109
+ signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT", "SESSION", "PROMPT_INPUT", "CONTEXT_INTEGRITY", "TOOL_CALL", "RAG_RETRIEVAL", "POLICY_EVENT", "USER_FEEDBACK", "WORKFLOW_ACTION", "API_CALL"]>;
1161
1110
  principal: z.ZodObject<{
1162
1111
  user_id: z.ZodOptional<z.ZodString>;
1163
1112
  account_id: z.ZodOptional<z.ZodString>;
@@ -1165,13 +1114,23 @@ declare const AnomalyFlagSignalSchema: z.ZodObject<{
1165
1114
  session_id: z.ZodOptional<z.ZodString>;
1166
1115
  model_id: z.ZodOptional<z.ZodString>;
1167
1116
  service_id: z.ZodOptional<z.ZodString>;
1168
- }, "strip", z.ZodTypeAny, {
1117
+ conversation_id: z.ZodOptional<z.ZodString>;
1118
+ document_id: z.ZodOptional<z.ZodString>;
1119
+ tool_id: z.ZodOptional<z.ZodString>;
1120
+ workflow_id: z.ZodOptional<z.ZodString>;
1121
+ api_key_id: z.ZodOptional<z.ZodString>;
1122
+ }, "strict", z.ZodTypeAny, {
1169
1123
  user_id?: string | undefined;
1170
1124
  account_id?: string | undefined;
1171
1125
  device_id?: string | undefined;
1172
1126
  session_id?: string | undefined;
1173
1127
  model_id?: string | undefined;
1174
1128
  service_id?: string | undefined;
1129
+ conversation_id?: string | undefined;
1130
+ document_id?: string | undefined;
1131
+ tool_id?: string | undefined;
1132
+ workflow_id?: string | undefined;
1133
+ api_key_id?: string | undefined;
1175
1134
  }, {
1176
1135
  user_id?: string | undefined;
1177
1136
  account_id?: string | undefined;
@@ -1179,6 +1138,11 @@ declare const AnomalyFlagSignalSchema: z.ZodObject<{
1179
1138
  session_id?: string | undefined;
1180
1139
  model_id?: string | undefined;
1181
1140
  service_id?: string | undefined;
1141
+ conversation_id?: string | undefined;
1142
+ document_id?: string | undefined;
1143
+ tool_id?: string | undefined;
1144
+ workflow_id?: string | undefined;
1145
+ api_key_id?: string | undefined;
1182
1146
  }>;
1183
1147
  timestamp: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1184
1148
  confidence_hint: z.ZodOptional<z.ZodNumber>;
@@ -1210,18 +1174,70 @@ declare const AnomalyFlagSignalSchema: z.ZodObject<{
1210
1174
  }>>;
1211
1175
  } & {
1212
1176
  signal_payload: z.ZodObject<{
1213
- severity: z.ZodNumber;
1177
+ service_id: z.ZodString;
1178
+ endpoint: z.ZodString;
1179
+ method: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>;
1180
+ status_code: z.ZodNumber;
1181
+ authorized: z.ZodNullable<z.ZodBoolean>;
1182
+ authentication_present: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1183
+ rate_limited: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1184
+ external_side_effect: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1185
+ records_returned: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1186
+ records_modified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1187
+ contains_sensitive_data: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1188
+ latency_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1189
+ retry_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1190
+ api_key_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1214
1191
  }, "strip", z.ZodTypeAny, {
1215
- severity: number;
1192
+ method: "GET" | "DELETE" | "POST" | "PUT" | "PATCH";
1193
+ service_id: string;
1194
+ endpoint: string;
1195
+ status_code: number;
1196
+ authorized: boolean | null;
1197
+ api_key_id?: string | null | undefined;
1198
+ authentication_present?: boolean | null | undefined;
1199
+ rate_limited?: boolean | null | undefined;
1200
+ external_side_effect?: boolean | null | undefined;
1201
+ records_returned?: number | null | undefined;
1202
+ records_modified?: number | null | undefined;
1203
+ contains_sensitive_data?: boolean | null | undefined;
1204
+ latency_ms?: number | null | undefined;
1205
+ retry_count?: number | null | undefined;
1216
1206
  }, {
1217
- severity: number;
1207
+ method: "GET" | "DELETE" | "POST" | "PUT" | "PATCH";
1208
+ service_id: string;
1209
+ endpoint: string;
1210
+ status_code: number;
1211
+ authorized: boolean | null;
1212
+ api_key_id?: string | null | undefined;
1213
+ authentication_present?: boolean | null | undefined;
1214
+ rate_limited?: boolean | null | undefined;
1215
+ external_side_effect?: boolean | null | undefined;
1216
+ records_returned?: number | null | undefined;
1217
+ records_modified?: number | null | undefined;
1218
+ contains_sensitive_data?: boolean | null | undefined;
1219
+ latency_ms?: number | null | undefined;
1220
+ retry_count?: number | null | undefined;
1218
1221
  }>;
1219
1222
  }, "strip", z.ZodTypeAny, {
1220
1223
  tenant_id: string;
1221
1224
  signal_version: string;
1222
- signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT";
1225
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
1223
1226
  signal_payload: {
1224
- severity: number;
1227
+ method: "GET" | "DELETE" | "POST" | "PUT" | "PATCH";
1228
+ service_id: string;
1229
+ endpoint: string;
1230
+ status_code: number;
1231
+ authorized: boolean | null;
1232
+ api_key_id?: string | null | undefined;
1233
+ authentication_present?: boolean | null | undefined;
1234
+ rate_limited?: boolean | null | undefined;
1235
+ external_side_effect?: boolean | null | undefined;
1236
+ records_returned?: number | null | undefined;
1237
+ records_modified?: number | null | undefined;
1238
+ contains_sensitive_data?: boolean | null | undefined;
1239
+ latency_ms?: number | null | undefined;
1240
+ retry_count?: number | null | undefined;
1225
1241
  };
1226
1242
  principal: {
1227
1243
  user_id?: string | undefined;
@@ -1230,6 +1246,11 @@ declare const AnomalyFlagSignalSchema: z.ZodObject<{
1230
1246
  session_id?: string | undefined;
1231
1247
  model_id?: string | undefined;
1232
1248
  service_id?: string | undefined;
1249
+ conversation_id?: string | undefined;
1250
+ document_id?: string | undefined;
1251
+ tool_id?: string | undefined;
1252
+ workflow_id?: string | undefined;
1253
+ api_key_id?: string | undefined;
1233
1254
  };
1234
1255
  integrity?: {
1235
1256
  hash?: string | undefined;
@@ -1246,9 +1267,22 @@ declare const AnomalyFlagSignalSchema: z.ZodObject<{
1246
1267
  }, {
1247
1268
  tenant_id: string;
1248
1269
  signal_version: string;
1249
- signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT";
1270
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
1250
1271
  signal_payload: {
1251
- severity: number;
1272
+ method: "GET" | "DELETE" | "POST" | "PUT" | "PATCH";
1273
+ service_id: string;
1274
+ endpoint: string;
1275
+ status_code: number;
1276
+ authorized: boolean | null;
1277
+ api_key_id?: string | null | undefined;
1278
+ authentication_present?: boolean | null | undefined;
1279
+ rate_limited?: boolean | null | undefined;
1280
+ external_side_effect?: boolean | null | undefined;
1281
+ records_returned?: number | null | undefined;
1282
+ records_modified?: number | null | undefined;
1283
+ contains_sensitive_data?: boolean | null | undefined;
1284
+ latency_ms?: number | null | undefined;
1285
+ retry_count?: number | null | undefined;
1252
1286
  };
1253
1287
  principal: {
1254
1288
  user_id?: string | undefined;
@@ -1257,6 +1291,11 @@ declare const AnomalyFlagSignalSchema: z.ZodObject<{
1257
1291
  session_id?: string | undefined;
1258
1292
  model_id?: string | undefined;
1259
1293
  service_id?: string | undefined;
1294
+ conversation_id?: string | undefined;
1295
+ document_id?: string | undefined;
1296
+ tool_id?: string | undefined;
1297
+ workflow_id?: string | undefined;
1298
+ api_key_id?: string | undefined;
1260
1299
  };
1261
1300
  integrity?: {
1262
1301
  hash?: string | undefined;
@@ -1271,10 +1310,15 @@ declare const AnomalyFlagSignalSchema: z.ZodObject<{
1271
1310
  health_summary?: string | Record<string, unknown> | undefined;
1272
1311
  } | undefined;
1273
1312
  }>;
1313
+ /** `signal_type: 'API_CALL'` with backend API operation metadata. */
1314
+ type ApiCallSignalEvent = z.infer<typeof ApiCallSignalSchema>;
1315
+
1316
+ declare const createApiCallEvent: (event: ApiCallSignalEvent) => RawEventRequest;
1317
+
1274
1318
  declare const AuthSignalSchema: z.ZodObject<{
1275
1319
  tenant_id: z.ZodString;
1276
1320
  signal_version: z.ZodString;
1277
- signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT"]>;
1321
+ signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT", "SESSION", "PROMPT_INPUT", "CONTEXT_INTEGRITY", "TOOL_CALL", "RAG_RETRIEVAL", "POLICY_EVENT", "USER_FEEDBACK", "WORKFLOW_ACTION", "API_CALL"]>;
1278
1322
  principal: z.ZodObject<{
1279
1323
  user_id: z.ZodOptional<z.ZodString>;
1280
1324
  account_id: z.ZodOptional<z.ZodString>;
@@ -1282,13 +1326,23 @@ declare const AuthSignalSchema: z.ZodObject<{
1282
1326
  session_id: z.ZodOptional<z.ZodString>;
1283
1327
  model_id: z.ZodOptional<z.ZodString>;
1284
1328
  service_id: z.ZodOptional<z.ZodString>;
1285
- }, "strip", z.ZodTypeAny, {
1329
+ conversation_id: z.ZodOptional<z.ZodString>;
1330
+ document_id: z.ZodOptional<z.ZodString>;
1331
+ tool_id: z.ZodOptional<z.ZodString>;
1332
+ workflow_id: z.ZodOptional<z.ZodString>;
1333
+ api_key_id: z.ZodOptional<z.ZodString>;
1334
+ }, "strict", z.ZodTypeAny, {
1286
1335
  user_id?: string | undefined;
1287
1336
  account_id?: string | undefined;
1288
1337
  device_id?: string | undefined;
1289
1338
  session_id?: string | undefined;
1290
1339
  model_id?: string | undefined;
1291
1340
  service_id?: string | undefined;
1341
+ conversation_id?: string | undefined;
1342
+ document_id?: string | undefined;
1343
+ tool_id?: string | undefined;
1344
+ workflow_id?: string | undefined;
1345
+ api_key_id?: string | undefined;
1292
1346
  }, {
1293
1347
  user_id?: string | undefined;
1294
1348
  account_id?: string | undefined;
@@ -1296,6 +1350,11 @@ declare const AuthSignalSchema: z.ZodObject<{
1296
1350
  session_id?: string | undefined;
1297
1351
  model_id?: string | undefined;
1298
1352
  service_id?: string | undefined;
1353
+ conversation_id?: string | undefined;
1354
+ document_id?: string | undefined;
1355
+ tool_id?: string | undefined;
1356
+ workflow_id?: string | undefined;
1357
+ api_key_id?: string | undefined;
1299
1358
  }>;
1300
1359
  timestamp: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1301
1360
  confidence_hint: z.ZodOptional<z.ZodNumber>;
@@ -1342,20 +1401,20 @@ declare const AuthSignalSchema: z.ZodObject<{
1342
1401
  failed_attempts: number;
1343
1402
  unusual_location: boolean;
1344
1403
  after_hours_login: boolean;
1345
- country?: string | null | undefined;
1346
1404
  result?: string | null | undefined;
1347
1405
  auth_method?: string | null | undefined;
1348
1406
  mfa_used?: boolean | null | undefined;
1349
1407
  ip?: string | null | undefined;
1408
+ country?: string | null | undefined;
1350
1409
  user_agent?: string | null | undefined;
1351
1410
  }, {
1352
- country?: string | null | undefined;
1353
1411
  result?: string | null | undefined;
1354
1412
  auth_method?: string | null | undefined;
1355
1413
  mfa_used?: boolean | null | undefined;
1356
1414
  mfa_bypassed?: boolean | undefined;
1357
1415
  failed_attempts?: number | undefined;
1358
1416
  ip?: string | null | undefined;
1417
+ country?: string | null | undefined;
1359
1418
  user_agent?: string | null | undefined;
1360
1419
  unusual_location?: boolean | undefined;
1361
1420
  after_hours_login?: boolean | undefined;
@@ -1363,17 +1422,17 @@ declare const AuthSignalSchema: z.ZodObject<{
1363
1422
  }, "strip", z.ZodTypeAny, {
1364
1423
  tenant_id: string;
1365
1424
  signal_version: string;
1366
- signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT";
1425
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
1367
1426
  signal_payload: {
1368
1427
  mfa_bypassed: boolean;
1369
1428
  failed_attempts: number;
1370
1429
  unusual_location: boolean;
1371
1430
  after_hours_login: boolean;
1372
- country?: string | null | undefined;
1373
1431
  result?: string | null | undefined;
1374
1432
  auth_method?: string | null | undefined;
1375
1433
  mfa_used?: boolean | null | undefined;
1376
1434
  ip?: string | null | undefined;
1435
+ country?: string | null | undefined;
1377
1436
  user_agent?: string | null | undefined;
1378
1437
  };
1379
1438
  principal: {
@@ -1383,6 +1442,11 @@ declare const AuthSignalSchema: z.ZodObject<{
1383
1442
  session_id?: string | undefined;
1384
1443
  model_id?: string | undefined;
1385
1444
  service_id?: string | undefined;
1445
+ conversation_id?: string | undefined;
1446
+ document_id?: string | undefined;
1447
+ tool_id?: string | undefined;
1448
+ workflow_id?: string | undefined;
1449
+ api_key_id?: string | undefined;
1386
1450
  };
1387
1451
  integrity?: {
1388
1452
  hash?: string | undefined;
@@ -1399,15 +1463,15 @@ declare const AuthSignalSchema: z.ZodObject<{
1399
1463
  }, {
1400
1464
  tenant_id: string;
1401
1465
  signal_version: string;
1402
- signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT";
1466
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
1403
1467
  signal_payload: {
1404
- country?: string | null | undefined;
1405
1468
  result?: string | null | undefined;
1406
1469
  auth_method?: string | null | undefined;
1407
1470
  mfa_used?: boolean | null | undefined;
1408
1471
  mfa_bypassed?: boolean | undefined;
1409
1472
  failed_attempts?: number | undefined;
1410
1473
  ip?: string | null | undefined;
1474
+ country?: string | null | undefined;
1411
1475
  user_agent?: string | null | undefined;
1412
1476
  unusual_location?: boolean | undefined;
1413
1477
  after_hours_login?: boolean | undefined;
@@ -1419,6 +1483,11 @@ declare const AuthSignalSchema: z.ZodObject<{
1419
1483
  session_id?: string | undefined;
1420
1484
  model_id?: string | undefined;
1421
1485
  service_id?: string | undefined;
1486
+ conversation_id?: string | undefined;
1487
+ document_id?: string | undefined;
1488
+ tool_id?: string | undefined;
1489
+ workflow_id?: string | undefined;
1490
+ api_key_id?: string | undefined;
1422
1491
  };
1423
1492
  integrity?: {
1424
1493
  hash?: string | undefined;
@@ -1433,10 +1502,15 @@ declare const AuthSignalSchema: z.ZodObject<{
1433
1502
  health_summary?: string | Record<string, unknown> | undefined;
1434
1503
  } | undefined;
1435
1504
  }>;
1505
+ /** `signal_type: 'AUTH'` with authentication outcome metadata. */
1506
+ type AuthSignalEvent = z.infer<typeof AuthSignalSchema>;
1507
+
1508
+ declare const createAuthEvent: (event: AuthSignalEvent) => RawEventRequest;
1509
+
1436
1510
  declare const BehaviorSignalSchema: z.ZodObject<{
1437
1511
  tenant_id: z.ZodString;
1438
1512
  signal_version: z.ZodString;
1439
- signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT"]>;
1513
+ signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT", "SESSION", "PROMPT_INPUT", "CONTEXT_INTEGRITY", "TOOL_CALL", "RAG_RETRIEVAL", "POLICY_EVENT", "USER_FEEDBACK", "WORKFLOW_ACTION", "API_CALL"]>;
1440
1514
  principal: z.ZodObject<{
1441
1515
  user_id: z.ZodOptional<z.ZodString>;
1442
1516
  account_id: z.ZodOptional<z.ZodString>;
@@ -1444,13 +1518,23 @@ declare const BehaviorSignalSchema: z.ZodObject<{
1444
1518
  session_id: z.ZodOptional<z.ZodString>;
1445
1519
  model_id: z.ZodOptional<z.ZodString>;
1446
1520
  service_id: z.ZodOptional<z.ZodString>;
1447
- }, "strip", z.ZodTypeAny, {
1521
+ conversation_id: z.ZodOptional<z.ZodString>;
1522
+ document_id: z.ZodOptional<z.ZodString>;
1523
+ tool_id: z.ZodOptional<z.ZodString>;
1524
+ workflow_id: z.ZodOptional<z.ZodString>;
1525
+ api_key_id: z.ZodOptional<z.ZodString>;
1526
+ }, "strict", z.ZodTypeAny, {
1448
1527
  user_id?: string | undefined;
1449
1528
  account_id?: string | undefined;
1450
1529
  device_id?: string | undefined;
1451
1530
  session_id?: string | undefined;
1452
1531
  model_id?: string | undefined;
1453
1532
  service_id?: string | undefined;
1533
+ conversation_id?: string | undefined;
1534
+ document_id?: string | undefined;
1535
+ tool_id?: string | undefined;
1536
+ workflow_id?: string | undefined;
1537
+ api_key_id?: string | undefined;
1454
1538
  }, {
1455
1539
  user_id?: string | undefined;
1456
1540
  account_id?: string | undefined;
@@ -1458,6 +1542,11 @@ declare const BehaviorSignalSchema: z.ZodObject<{
1458
1542
  session_id?: string | undefined;
1459
1543
  model_id?: string | undefined;
1460
1544
  service_id?: string | undefined;
1545
+ conversation_id?: string | undefined;
1546
+ document_id?: string | undefined;
1547
+ tool_id?: string | undefined;
1548
+ workflow_id?: string | undefined;
1549
+ api_key_id?: string | undefined;
1461
1550
  }>;
1462
1551
  timestamp: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1463
1552
  confidence_hint: z.ZodOptional<z.ZodNumber>;
@@ -1498,7 +1587,7 @@ declare const BehaviorSignalSchema: z.ZodObject<{
1498
1587
  }, "strip", z.ZodTypeAny, {
1499
1588
  tenant_id: string;
1500
1589
  signal_version: string;
1501
- signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT";
1590
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
1502
1591
  signal_payload: {
1503
1592
  deviation_score: number;
1504
1593
  };
@@ -1509,6 +1598,11 @@ declare const BehaviorSignalSchema: z.ZodObject<{
1509
1598
  session_id?: string | undefined;
1510
1599
  model_id?: string | undefined;
1511
1600
  service_id?: string | undefined;
1601
+ conversation_id?: string | undefined;
1602
+ document_id?: string | undefined;
1603
+ tool_id?: string | undefined;
1604
+ workflow_id?: string | undefined;
1605
+ api_key_id?: string | undefined;
1512
1606
  };
1513
1607
  integrity?: {
1514
1608
  hash?: string | undefined;
@@ -1525,7 +1619,7 @@ declare const BehaviorSignalSchema: z.ZodObject<{
1525
1619
  }, {
1526
1620
  tenant_id: string;
1527
1621
  signal_version: string;
1528
- signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT";
1622
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
1529
1623
  signal_payload: {
1530
1624
  deviation_score: number;
1531
1625
  };
@@ -1536,6 +1630,11 @@ declare const BehaviorSignalSchema: z.ZodObject<{
1536
1630
  session_id?: string | undefined;
1537
1631
  model_id?: string | undefined;
1538
1632
  service_id?: string | undefined;
1633
+ conversation_id?: string | undefined;
1634
+ document_id?: string | undefined;
1635
+ tool_id?: string | undefined;
1636
+ workflow_id?: string | undefined;
1637
+ api_key_id?: string | undefined;
1539
1638
  };
1540
1639
  integrity?: {
1541
1640
  hash?: string | undefined;
@@ -1550,10 +1649,15 @@ declare const BehaviorSignalSchema: z.ZodObject<{
1550
1649
  health_summary?: string | Record<string, unknown> | undefined;
1551
1650
  } | undefined;
1552
1651
  }>;
1553
- declare const NetworkSignalSchema: z.ZodObject<{
1652
+ /** `signal_type: 'BEHAVIOR'` — `deviation_score` in `[0, 1]`. */
1653
+ type BehaviorSignalEvent = z.infer<typeof BehaviorSignalSchema>;
1654
+
1655
+ declare const createBehaviorEvent: (event: BehaviorSignalEvent) => RawEventRequest;
1656
+
1657
+ declare const ContextIntegritySignalSchema: z.ZodObject<{
1554
1658
  tenant_id: z.ZodString;
1555
1659
  signal_version: z.ZodString;
1556
- signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT"]>;
1660
+ signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT", "SESSION", "PROMPT_INPUT", "CONTEXT_INTEGRITY", "TOOL_CALL", "RAG_RETRIEVAL", "POLICY_EVENT", "USER_FEEDBACK", "WORKFLOW_ACTION", "API_CALL"]>;
1557
1661
  principal: z.ZodObject<{
1558
1662
  user_id: z.ZodOptional<z.ZodString>;
1559
1663
  account_id: z.ZodOptional<z.ZodString>;
@@ -1561,13 +1665,23 @@ declare const NetworkSignalSchema: z.ZodObject<{
1561
1665
  session_id: z.ZodOptional<z.ZodString>;
1562
1666
  model_id: z.ZodOptional<z.ZodString>;
1563
1667
  service_id: z.ZodOptional<z.ZodString>;
1564
- }, "strip", z.ZodTypeAny, {
1668
+ conversation_id: z.ZodOptional<z.ZodString>;
1669
+ document_id: z.ZodOptional<z.ZodString>;
1670
+ tool_id: z.ZodOptional<z.ZodString>;
1671
+ workflow_id: z.ZodOptional<z.ZodString>;
1672
+ api_key_id: z.ZodOptional<z.ZodString>;
1673
+ }, "strict", z.ZodTypeAny, {
1565
1674
  user_id?: string | undefined;
1566
1675
  account_id?: string | undefined;
1567
1676
  device_id?: string | undefined;
1568
1677
  session_id?: string | undefined;
1569
1678
  model_id?: string | undefined;
1570
1679
  service_id?: string | undefined;
1680
+ conversation_id?: string | undefined;
1681
+ document_id?: string | undefined;
1682
+ tool_id?: string | undefined;
1683
+ workflow_id?: string | undefined;
1684
+ api_key_id?: string | undefined;
1571
1685
  }, {
1572
1686
  user_id?: string | undefined;
1573
1687
  account_id?: string | undefined;
@@ -1575,6 +1689,11 @@ declare const NetworkSignalSchema: z.ZodObject<{
1575
1689
  session_id?: string | undefined;
1576
1690
  model_id?: string | undefined;
1577
1691
  service_id?: string | undefined;
1692
+ conversation_id?: string | undefined;
1693
+ document_id?: string | undefined;
1694
+ tool_id?: string | undefined;
1695
+ workflow_id?: string | undefined;
1696
+ api_key_id?: string | undefined;
1578
1697
  }>;
1579
1698
  timestamp: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1580
1699
  confidence_hint: z.ZodOptional<z.ZodNumber>;
@@ -1606,42 +1725,86 @@ declare const NetworkSignalSchema: z.ZodObject<{
1606
1725
  }>>;
1607
1726
  } & {
1608
1727
  signal_payload: z.ZodObject<{
1609
- ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1610
- asn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1611
- reputation_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1612
- threat_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1613
- is_datacenter: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1614
- is_untrusted_segment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1615
- asn_reputation: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1728
+ context_source: z.ZodEnum<["CONVERSATION_HISTORY", "RETRIEVED_DOCUMENT", "TOOL_OUTPUT", "SYSTEM", "DEVELOPER", "USER"]>;
1729
+ instruction_conflict_detected: z.ZodBoolean;
1730
+ untrusted_instruction_detected: z.ZodBoolean;
1731
+ context_priority_violation: z.ZodBoolean;
1732
+ recursive_instruction_pattern: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1733
+ context_drift_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1734
+ system_prompt_conflict_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1735
+ developer_prompt_conflict_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1736
+ retrieved_instruction_count: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1737
+ hidden_instruction_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1738
+ source_document_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1739
+ untrusted_source_count: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1740
+ source_trust_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1741
+ lowest_source_trust_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1742
+ recursive_pattern_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1743
+ prompt_injection_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1744
+ contains_instruction_override: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1745
+ context_injection_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1616
1746
  }, "strip", z.ZodTypeAny, {
1617
- is_untrusted_segment: boolean;
1618
- ip?: string | null | undefined;
1619
- asn?: string | null | undefined;
1620
- reputation_score?: number | null | undefined;
1621
- threat_score?: number | null | undefined;
1622
- is_datacenter?: boolean | null | undefined;
1623
- asn_reputation?: number | null | undefined;
1747
+ context_source: "USER" | "CONVERSATION_HISTORY" | "RETRIEVED_DOCUMENT" | "TOOL_OUTPUT" | "SYSTEM" | "DEVELOPER";
1748
+ instruction_conflict_detected: boolean;
1749
+ untrusted_instruction_detected: boolean;
1750
+ context_priority_violation: boolean;
1751
+ recursive_instruction_pattern: boolean;
1752
+ retrieved_instruction_count: number;
1753
+ untrusted_source_count: number;
1754
+ contains_instruction_override: boolean;
1755
+ context_drift_score?: number | null | undefined;
1756
+ system_prompt_conflict_score?: number | null | undefined;
1757
+ developer_prompt_conflict_score?: number | null | undefined;
1758
+ hidden_instruction_score?: number | null | undefined;
1759
+ source_document_id?: string | null | undefined;
1760
+ source_trust_score?: number | null | undefined;
1761
+ lowest_source_trust_score?: number | null | undefined;
1762
+ recursive_pattern_score?: number | null | undefined;
1763
+ prompt_injection_score?: number | null | undefined;
1764
+ context_injection_score?: number | null | undefined;
1624
1765
  }, {
1625
- ip?: string | null | undefined;
1626
- asn?: string | null | undefined;
1627
- reputation_score?: number | null | undefined;
1628
- threat_score?: number | null | undefined;
1629
- is_datacenter?: boolean | null | undefined;
1630
- is_untrusted_segment?: boolean | undefined;
1631
- asn_reputation?: number | null | undefined;
1766
+ context_source: "USER" | "CONVERSATION_HISTORY" | "RETRIEVED_DOCUMENT" | "TOOL_OUTPUT" | "SYSTEM" | "DEVELOPER";
1767
+ instruction_conflict_detected: boolean;
1768
+ untrusted_instruction_detected: boolean;
1769
+ context_priority_violation: boolean;
1770
+ recursive_instruction_pattern?: boolean | undefined;
1771
+ context_drift_score?: number | null | undefined;
1772
+ system_prompt_conflict_score?: number | null | undefined;
1773
+ developer_prompt_conflict_score?: number | null | undefined;
1774
+ retrieved_instruction_count?: number | undefined;
1775
+ hidden_instruction_score?: number | null | undefined;
1776
+ source_document_id?: string | null | undefined;
1777
+ untrusted_source_count?: number | undefined;
1778
+ source_trust_score?: number | null | undefined;
1779
+ lowest_source_trust_score?: number | null | undefined;
1780
+ recursive_pattern_score?: number | null | undefined;
1781
+ prompt_injection_score?: number | null | undefined;
1782
+ contains_instruction_override?: boolean | undefined;
1783
+ context_injection_score?: number | null | undefined;
1632
1784
  }>;
1633
1785
  }, "strip", z.ZodTypeAny, {
1634
1786
  tenant_id: string;
1635
1787
  signal_version: string;
1636
- signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT";
1788
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
1637
1789
  signal_payload: {
1638
- is_untrusted_segment: boolean;
1639
- ip?: string | null | undefined;
1640
- asn?: string | null | undefined;
1641
- reputation_score?: number | null | undefined;
1642
- threat_score?: number | null | undefined;
1643
- is_datacenter?: boolean | null | undefined;
1644
- asn_reputation?: number | null | undefined;
1790
+ context_source: "USER" | "CONVERSATION_HISTORY" | "RETRIEVED_DOCUMENT" | "TOOL_OUTPUT" | "SYSTEM" | "DEVELOPER";
1791
+ instruction_conflict_detected: boolean;
1792
+ untrusted_instruction_detected: boolean;
1793
+ context_priority_violation: boolean;
1794
+ recursive_instruction_pattern: boolean;
1795
+ retrieved_instruction_count: number;
1796
+ untrusted_source_count: number;
1797
+ contains_instruction_override: boolean;
1798
+ context_drift_score?: number | null | undefined;
1799
+ system_prompt_conflict_score?: number | null | undefined;
1800
+ developer_prompt_conflict_score?: number | null | undefined;
1801
+ hidden_instruction_score?: number | null | undefined;
1802
+ source_document_id?: string | null | undefined;
1803
+ source_trust_score?: number | null | undefined;
1804
+ lowest_source_trust_score?: number | null | undefined;
1805
+ recursive_pattern_score?: number | null | undefined;
1806
+ prompt_injection_score?: number | null | undefined;
1807
+ context_injection_score?: number | null | undefined;
1645
1808
  };
1646
1809
  principal: {
1647
1810
  user_id?: string | undefined;
@@ -1650,6 +1813,11 @@ declare const NetworkSignalSchema: z.ZodObject<{
1650
1813
  session_id?: string | undefined;
1651
1814
  model_id?: string | undefined;
1652
1815
  service_id?: string | undefined;
1816
+ conversation_id?: string | undefined;
1817
+ document_id?: string | undefined;
1818
+ tool_id?: string | undefined;
1819
+ workflow_id?: string | undefined;
1820
+ api_key_id?: string | undefined;
1653
1821
  };
1654
1822
  integrity?: {
1655
1823
  hash?: string | undefined;
@@ -1666,15 +1834,26 @@ declare const NetworkSignalSchema: z.ZodObject<{
1666
1834
  }, {
1667
1835
  tenant_id: string;
1668
1836
  signal_version: string;
1669
- signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT";
1837
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
1670
1838
  signal_payload: {
1671
- ip?: string | null | undefined;
1672
- asn?: string | null | undefined;
1673
- reputation_score?: number | null | undefined;
1674
- threat_score?: number | null | undefined;
1675
- is_datacenter?: boolean | null | undefined;
1676
- is_untrusted_segment?: boolean | undefined;
1677
- asn_reputation?: number | null | undefined;
1839
+ context_source: "USER" | "CONVERSATION_HISTORY" | "RETRIEVED_DOCUMENT" | "TOOL_OUTPUT" | "SYSTEM" | "DEVELOPER";
1840
+ instruction_conflict_detected: boolean;
1841
+ untrusted_instruction_detected: boolean;
1842
+ context_priority_violation: boolean;
1843
+ recursive_instruction_pattern?: boolean | undefined;
1844
+ context_drift_score?: number | null | undefined;
1845
+ system_prompt_conflict_score?: number | null | undefined;
1846
+ developer_prompt_conflict_score?: number | null | undefined;
1847
+ retrieved_instruction_count?: number | undefined;
1848
+ hidden_instruction_score?: number | null | undefined;
1849
+ source_document_id?: string | null | undefined;
1850
+ untrusted_source_count?: number | undefined;
1851
+ source_trust_score?: number | null | undefined;
1852
+ lowest_source_trust_score?: number | null | undefined;
1853
+ recursive_pattern_score?: number | null | undefined;
1854
+ prompt_injection_score?: number | null | undefined;
1855
+ contains_instruction_override?: boolean | undefined;
1856
+ context_injection_score?: number | null | undefined;
1678
1857
  };
1679
1858
  principal: {
1680
1859
  user_id?: string | undefined;
@@ -1683,6 +1862,11 @@ declare const NetworkSignalSchema: z.ZodObject<{
1683
1862
  session_id?: string | undefined;
1684
1863
  model_id?: string | undefined;
1685
1864
  service_id?: string | undefined;
1865
+ conversation_id?: string | undefined;
1866
+ document_id?: string | undefined;
1867
+ tool_id?: string | undefined;
1868
+ workflow_id?: string | undefined;
1869
+ api_key_id?: string | undefined;
1686
1870
  };
1687
1871
  integrity?: {
1688
1872
  hash?: string | undefined;
@@ -1697,10 +1881,15 @@ declare const NetworkSignalSchema: z.ZodObject<{
1697
1881
  health_summary?: string | Record<string, unknown> | undefined;
1698
1882
  } | undefined;
1699
1883
  }>;
1884
+ /** `signal_type: 'CONTEXT_INTEGRITY'` with context contamination checks. */
1885
+ type ContextIntegritySignalEvent = z.infer<typeof ContextIntegritySignalSchema>;
1886
+
1887
+ declare const createContextIntegrityEvent: (event: ContextIntegritySignalEvent) => RawEventRequest;
1888
+
1700
1889
  declare const ModelOutputSignalSchema: z.ZodObject<{
1701
1890
  tenant_id: z.ZodString;
1702
1891
  signal_version: z.ZodString;
1703
- signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT"]>;
1892
+ signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT", "SESSION", "PROMPT_INPUT", "CONTEXT_INTEGRITY", "TOOL_CALL", "RAG_RETRIEVAL", "POLICY_EVENT", "USER_FEEDBACK", "WORKFLOW_ACTION", "API_CALL"]>;
1704
1893
  principal: z.ZodObject<{
1705
1894
  user_id: z.ZodOptional<z.ZodString>;
1706
1895
  account_id: z.ZodOptional<z.ZodString>;
@@ -1708,13 +1897,23 @@ declare const ModelOutputSignalSchema: z.ZodObject<{
1708
1897
  session_id: z.ZodOptional<z.ZodString>;
1709
1898
  model_id: z.ZodOptional<z.ZodString>;
1710
1899
  service_id: z.ZodOptional<z.ZodString>;
1711
- }, "strip", z.ZodTypeAny, {
1900
+ conversation_id: z.ZodOptional<z.ZodString>;
1901
+ document_id: z.ZodOptional<z.ZodString>;
1902
+ tool_id: z.ZodOptional<z.ZodString>;
1903
+ workflow_id: z.ZodOptional<z.ZodString>;
1904
+ api_key_id: z.ZodOptional<z.ZodString>;
1905
+ }, "strict", z.ZodTypeAny, {
1712
1906
  user_id?: string | undefined;
1713
1907
  account_id?: string | undefined;
1714
1908
  device_id?: string | undefined;
1715
1909
  session_id?: string | undefined;
1716
1910
  model_id?: string | undefined;
1717
1911
  service_id?: string | undefined;
1912
+ conversation_id?: string | undefined;
1913
+ document_id?: string | undefined;
1914
+ tool_id?: string | undefined;
1915
+ workflow_id?: string | undefined;
1916
+ api_key_id?: string | undefined;
1718
1917
  }, {
1719
1918
  user_id?: string | undefined;
1720
1919
  account_id?: string | undefined;
@@ -1722,6 +1921,11 @@ declare const ModelOutputSignalSchema: z.ZodObject<{
1722
1921
  session_id?: string | undefined;
1723
1922
  model_id?: string | undefined;
1724
1923
  service_id?: string | undefined;
1924
+ conversation_id?: string | undefined;
1925
+ document_id?: string | undefined;
1926
+ tool_id?: string | undefined;
1927
+ workflow_id?: string | undefined;
1928
+ api_key_id?: string | undefined;
1725
1929
  }>;
1726
1930
  timestamp: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1727
1931
  confidence_hint: z.ZodOptional<z.ZodNumber>;
@@ -1762,9 +1966,14 @@ declare const ModelOutputSignalSchema: z.ZodObject<{
1762
1966
  tool_inconsistency_rate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1763
1967
  tool_miss_rate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1764
1968
  eval_window_n: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1969
+ hallucination_risk_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1970
+ self_contradiction_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1971
+ grounding_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1972
+ contains_unsupported_claims: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1765
1973
  }, "strip", z.ZodTypeAny, {
1766
1974
  policy_violations: number;
1767
1975
  tool_call_inconsistency: number;
1976
+ contains_unsupported_claims: boolean;
1768
1977
  missing_citations_rate?: number | null | undefined;
1769
1978
  citation_rate?: number | null | undefined;
1770
1979
  expected_citation_rate?: number | null | undefined;
@@ -1772,6 +1981,9 @@ declare const ModelOutputSignalSchema: z.ZodObject<{
1772
1981
  tool_inconsistency_rate?: number | null | undefined;
1773
1982
  tool_miss_rate?: number | null | undefined;
1774
1983
  eval_window_n?: number | null | undefined;
1984
+ hallucination_risk_score?: number | null | undefined;
1985
+ self_contradiction_score?: number | null | undefined;
1986
+ grounding_score?: number | null | undefined;
1775
1987
  }, {
1776
1988
  missing_citations_rate?: number | null | undefined;
1777
1989
  citation_rate?: number | null | undefined;
@@ -1782,14 +1994,19 @@ declare const ModelOutputSignalSchema: z.ZodObject<{
1782
1994
  tool_inconsistency_rate?: number | null | undefined;
1783
1995
  tool_miss_rate?: number | null | undefined;
1784
1996
  eval_window_n?: number | null | undefined;
1997
+ hallucination_risk_score?: number | null | undefined;
1998
+ self_contradiction_score?: number | null | undefined;
1999
+ grounding_score?: number | null | undefined;
2000
+ contains_unsupported_claims?: boolean | undefined;
1785
2001
  }>;
1786
2002
  }, "strip", z.ZodTypeAny, {
1787
2003
  tenant_id: string;
1788
2004
  signal_version: string;
1789
- signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT";
2005
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
1790
2006
  signal_payload: {
1791
2007
  policy_violations: number;
1792
2008
  tool_call_inconsistency: number;
2009
+ contains_unsupported_claims: boolean;
1793
2010
  missing_citations_rate?: number | null | undefined;
1794
2011
  citation_rate?: number | null | undefined;
1795
2012
  expected_citation_rate?: number | null | undefined;
@@ -1797,6 +2014,9 @@ declare const ModelOutputSignalSchema: z.ZodObject<{
1797
2014
  tool_inconsistency_rate?: number | null | undefined;
1798
2015
  tool_miss_rate?: number | null | undefined;
1799
2016
  eval_window_n?: number | null | undefined;
2017
+ hallucination_risk_score?: number | null | undefined;
2018
+ self_contradiction_score?: number | null | undefined;
2019
+ grounding_score?: number | null | undefined;
1800
2020
  };
1801
2021
  principal: {
1802
2022
  user_id?: string | undefined;
@@ -1805,6 +2025,11 @@ declare const ModelOutputSignalSchema: z.ZodObject<{
1805
2025
  session_id?: string | undefined;
1806
2026
  model_id?: string | undefined;
1807
2027
  service_id?: string | undefined;
2028
+ conversation_id?: string | undefined;
2029
+ document_id?: string | undefined;
2030
+ tool_id?: string | undefined;
2031
+ workflow_id?: string | undefined;
2032
+ api_key_id?: string | undefined;
1808
2033
  };
1809
2034
  integrity?: {
1810
2035
  hash?: string | undefined;
@@ -1821,7 +2046,7 @@ declare const ModelOutputSignalSchema: z.ZodObject<{
1821
2046
  }, {
1822
2047
  tenant_id: string;
1823
2048
  signal_version: string;
1824
- signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT";
2049
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
1825
2050
  signal_payload: {
1826
2051
  missing_citations_rate?: number | null | undefined;
1827
2052
  citation_rate?: number | null | undefined;
@@ -1832,6 +2057,10 @@ declare const ModelOutputSignalSchema: z.ZodObject<{
1832
2057
  tool_inconsistency_rate?: number | null | undefined;
1833
2058
  tool_miss_rate?: number | null | undefined;
1834
2059
  eval_window_n?: number | null | undefined;
2060
+ hallucination_risk_score?: number | null | undefined;
2061
+ self_contradiction_score?: number | null | undefined;
2062
+ grounding_score?: number | null | undefined;
2063
+ contains_unsupported_claims?: boolean | undefined;
1835
2064
  };
1836
2065
  principal: {
1837
2066
  user_id?: string | undefined;
@@ -1840,6 +2069,11 @@ declare const ModelOutputSignalSchema: z.ZodObject<{
1840
2069
  session_id?: string | undefined;
1841
2070
  model_id?: string | undefined;
1842
2071
  service_id?: string | undefined;
2072
+ conversation_id?: string | undefined;
2073
+ document_id?: string | undefined;
2074
+ tool_id?: string | undefined;
2075
+ workflow_id?: string | undefined;
2076
+ api_key_id?: string | undefined;
1843
2077
  };
1844
2078
  integrity?: {
1845
2079
  hash?: string | undefined;
@@ -1854,10 +2088,21 @@ declare const ModelOutputSignalSchema: z.ZodObject<{
1854
2088
  health_summary?: string | Record<string, unknown> | undefined;
1855
2089
  } | undefined;
1856
2090
  }>;
1857
- declare const SystemTelemetrySignalSchema: z.ZodObject<{
2091
+ /** `signal_type: 'MODEL_OUTPUT'` with citation / tool-consistency metrics in `[0, 1]` where applicable. */
2092
+ type ModelOutputSignalEvent = z.infer<typeof ModelOutputSignalSchema>;
2093
+
2094
+ /**
2095
+ * Builds a `RawEventRequest` for a `MODEL_OUTPUT` signal.
2096
+ *
2097
+ * @param event - The `ModelOutputSignalEvent` to build a `RawEventRequest` for.
2098
+ * @returns A `RawEventRequest` for a `MODEL_OUTPUT` signal.
2099
+ */
2100
+ declare const createModelOutputEvent: (event: ModelOutputSignalEvent) => RawEventRequest;
2101
+
2102
+ declare const NetworkSignalSchema: z.ZodObject<{
1858
2103
  tenant_id: z.ZodString;
1859
2104
  signal_version: z.ZodString;
1860
- signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT"]>;
2105
+ signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT", "SESSION", "PROMPT_INPUT", "CONTEXT_INTEGRITY", "TOOL_CALL", "RAG_RETRIEVAL", "POLICY_EVENT", "USER_FEEDBACK", "WORKFLOW_ACTION", "API_CALL"]>;
1861
2106
  principal: z.ZodObject<{
1862
2107
  user_id: z.ZodOptional<z.ZodString>;
1863
2108
  account_id: z.ZodOptional<z.ZodString>;
@@ -1865,13 +2110,23 @@ declare const SystemTelemetrySignalSchema: z.ZodObject<{
1865
2110
  session_id: z.ZodOptional<z.ZodString>;
1866
2111
  model_id: z.ZodOptional<z.ZodString>;
1867
2112
  service_id: z.ZodOptional<z.ZodString>;
1868
- }, "strip", z.ZodTypeAny, {
2113
+ conversation_id: z.ZodOptional<z.ZodString>;
2114
+ document_id: z.ZodOptional<z.ZodString>;
2115
+ tool_id: z.ZodOptional<z.ZodString>;
2116
+ workflow_id: z.ZodOptional<z.ZodString>;
2117
+ api_key_id: z.ZodOptional<z.ZodString>;
2118
+ }, "strict", z.ZodTypeAny, {
1869
2119
  user_id?: string | undefined;
1870
2120
  account_id?: string | undefined;
1871
2121
  device_id?: string | undefined;
1872
2122
  session_id?: string | undefined;
1873
2123
  model_id?: string | undefined;
1874
2124
  service_id?: string | undefined;
2125
+ conversation_id?: string | undefined;
2126
+ document_id?: string | undefined;
2127
+ tool_id?: string | undefined;
2128
+ workflow_id?: string | undefined;
2129
+ api_key_id?: string | undefined;
1875
2130
  }, {
1876
2131
  user_id?: string | undefined;
1877
2132
  account_id?: string | undefined;
@@ -1879,6 +2134,11 @@ declare const SystemTelemetrySignalSchema: z.ZodObject<{
1879
2134
  session_id?: string | undefined;
1880
2135
  model_id?: string | undefined;
1881
2136
  service_id?: string | undefined;
2137
+ conversation_id?: string | undefined;
2138
+ document_id?: string | undefined;
2139
+ tool_id?: string | undefined;
2140
+ workflow_id?: string | undefined;
2141
+ api_key_id?: string | undefined;
1882
2142
  }>;
1883
2143
  timestamp: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1884
2144
  confidence_hint: z.ZodOptional<z.ZodNumber>;
@@ -1910,54 +2170,42 @@ declare const SystemTelemetrySignalSchema: z.ZodObject<{
1910
2170
  }>>;
1911
2171
  } & {
1912
2172
  signal_payload: z.ZodObject<{
1913
- metric_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1914
- value: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1915
- baseline: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1916
- window_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1917
- error_rate: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1918
- baseline_error_rate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1919
- unusual_auth_rate: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1920
- firmware_hash_changed: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1921
- expected_hash_match: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1922
- sensor_deviation_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2173
+ ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2174
+ asn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2175
+ reputation_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2176
+ threat_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2177
+ is_datacenter: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
2178
+ is_untrusted_segment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2179
+ asn_reputation: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1923
2180
  }, "strip", z.ZodTypeAny, {
1924
- error_rate: number;
1925
- unusual_auth_rate: number;
1926
- firmware_hash_changed: boolean;
1927
- value?: number | null | undefined;
1928
- metric_name?: string | null | undefined;
1929
- baseline?: number | null | undefined;
1930
- window_seconds?: number | null | undefined;
1931
- baseline_error_rate?: number | null | undefined;
1932
- expected_hash_match?: boolean | null | undefined;
1933
- sensor_deviation_score?: number | null | undefined;
2181
+ is_untrusted_segment: boolean;
2182
+ ip?: string | null | undefined;
2183
+ asn?: string | null | undefined;
2184
+ reputation_score?: number | null | undefined;
2185
+ threat_score?: number | null | undefined;
2186
+ is_datacenter?: boolean | null | undefined;
2187
+ asn_reputation?: number | null | undefined;
1934
2188
  }, {
1935
- value?: number | null | undefined;
1936
- metric_name?: string | null | undefined;
1937
- baseline?: number | null | undefined;
1938
- window_seconds?: number | null | undefined;
1939
- error_rate?: number | undefined;
1940
- baseline_error_rate?: number | null | undefined;
1941
- unusual_auth_rate?: number | undefined;
1942
- firmware_hash_changed?: boolean | undefined;
1943
- expected_hash_match?: boolean | null | undefined;
1944
- sensor_deviation_score?: number | null | undefined;
2189
+ ip?: string | null | undefined;
2190
+ asn?: string | null | undefined;
2191
+ reputation_score?: number | null | undefined;
2192
+ threat_score?: number | null | undefined;
2193
+ is_datacenter?: boolean | null | undefined;
2194
+ is_untrusted_segment?: boolean | undefined;
2195
+ asn_reputation?: number | null | undefined;
1945
2196
  }>;
1946
2197
  }, "strip", z.ZodTypeAny, {
1947
2198
  tenant_id: string;
1948
2199
  signal_version: string;
1949
- signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT";
2200
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
1950
2201
  signal_payload: {
1951
- error_rate: number;
1952
- unusual_auth_rate: number;
1953
- firmware_hash_changed: boolean;
1954
- value?: number | null | undefined;
1955
- metric_name?: string | null | undefined;
1956
- baseline?: number | null | undefined;
1957
- window_seconds?: number | null | undefined;
1958
- baseline_error_rate?: number | null | undefined;
1959
- expected_hash_match?: boolean | null | undefined;
1960
- sensor_deviation_score?: number | null | undefined;
2202
+ is_untrusted_segment: boolean;
2203
+ ip?: string | null | undefined;
2204
+ asn?: string | null | undefined;
2205
+ reputation_score?: number | null | undefined;
2206
+ threat_score?: number | null | undefined;
2207
+ is_datacenter?: boolean | null | undefined;
2208
+ asn_reputation?: number | null | undefined;
1961
2209
  };
1962
2210
  principal: {
1963
2211
  user_id?: string | undefined;
@@ -1966,6 +2214,11 @@ declare const SystemTelemetrySignalSchema: z.ZodObject<{
1966
2214
  session_id?: string | undefined;
1967
2215
  model_id?: string | undefined;
1968
2216
  service_id?: string | undefined;
2217
+ conversation_id?: string | undefined;
2218
+ document_id?: string | undefined;
2219
+ tool_id?: string | undefined;
2220
+ workflow_id?: string | undefined;
2221
+ api_key_id?: string | undefined;
1969
2222
  };
1970
2223
  integrity?: {
1971
2224
  hash?: string | undefined;
@@ -1982,18 +2235,15 @@ declare const SystemTelemetrySignalSchema: z.ZodObject<{
1982
2235
  }, {
1983
2236
  tenant_id: string;
1984
2237
  signal_version: string;
1985
- signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT";
2238
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
1986
2239
  signal_payload: {
1987
- value?: number | null | undefined;
1988
- metric_name?: string | null | undefined;
1989
- baseline?: number | null | undefined;
1990
- window_seconds?: number | null | undefined;
1991
- error_rate?: number | undefined;
1992
- baseline_error_rate?: number | null | undefined;
1993
- unusual_auth_rate?: number | undefined;
1994
- firmware_hash_changed?: boolean | undefined;
1995
- expected_hash_match?: boolean | null | undefined;
1996
- sensor_deviation_score?: number | null | undefined;
2240
+ ip?: string | null | undefined;
2241
+ asn?: string | null | undefined;
2242
+ reputation_score?: number | null | undefined;
2243
+ threat_score?: number | null | undefined;
2244
+ is_datacenter?: boolean | null | undefined;
2245
+ is_untrusted_segment?: boolean | undefined;
2246
+ asn_reputation?: number | null | undefined;
1997
2247
  };
1998
2248
  principal: {
1999
2249
  user_id?: string | undefined;
@@ -2002,6 +2252,11 @@ declare const SystemTelemetrySignalSchema: z.ZodObject<{
2002
2252
  session_id?: string | undefined;
2003
2253
  model_id?: string | undefined;
2004
2254
  service_id?: string | undefined;
2255
+ conversation_id?: string | undefined;
2256
+ document_id?: string | undefined;
2257
+ tool_id?: string | undefined;
2258
+ workflow_id?: string | undefined;
2259
+ api_key_id?: string | undefined;
2005
2260
  };
2006
2261
  integrity?: {
2007
2262
  hash?: string | undefined;
@@ -2016,132 +2271,1907 @@ declare const SystemTelemetrySignalSchema: z.ZodObject<{
2016
2271
  health_summary?: string | Record<string, unknown> | undefined;
2017
2272
  } | undefined;
2018
2273
  }>;
2019
- /** `signal_type: 'TRANSACTION'` with typed `signal_payload`. */
2020
- type TransactionSignalEvent = z.infer<typeof TransactionSignalSchema>;
2021
- /** `signal_type: 'ANOMALY_FLAG'` — `severity` required in `[0, 1]`. */
2022
- type AnomalyFlagSignalEvent = z.infer<typeof AnomalyFlagSignalSchema>;
2023
- /** `signal_type: 'AUTH'` with authentication outcome metadata. */
2024
- type AuthSignalEvent = z.infer<typeof AuthSignalSchema>;
2025
- /** `signal_type: 'BEHAVIOR'` — `deviation_score` in `[0, 1]`. */
2026
- type BehaviorSignalEvent = z.infer<typeof BehaviorSignalSchema>;
2027
2274
  /** `signal_type: 'NETWORK_EVENT'` with ASN/IP/reputation fields. */
2028
2275
  type NetworkSignalEvent = z.infer<typeof NetworkSignalSchema>;
2029
- /** `signal_type: 'MODEL_OUTPUT'` with citation / tool-consistency metrics in `[0, 1]` where applicable. */
2030
- type ModelOutputSignalEvent = z.infer<typeof ModelOutputSignalSchema>;
2031
- /** `signal_type: 'SYSTEM_TELEMETRY'` with metric samples and optional error-rate fractions in `[0, 1]`. */
2032
- type SystemTelemetrySignalEvent = z.infer<typeof SystemTelemetrySignalSchema>;
2033
-
2034
- /**
2035
- * Factory functions that build ingestion {@link RawEventRequest} values for signal schema **v1**.
2036
- *
2037
- * Each builder validates the typed envelope and `signal_payload` with Zod, writes `payload.signal_version` to `'v1'` and the correct `signal_type`. The ingestion API assigns the persisted event id (UUID v7); omitting `timestamp` on the envelope yields an RFC 3339 default from {@link BaseEventSchema}.
2038
- *
2039
- */
2040
2276
 
2041
2277
  /**
2042
- * Transforms an incoming AuthSignalEvent into a validated RawEventRequest labeled as 'AUTH'.
2043
- *
2044
- * @remarks
2045
- * This function validates the `event.signal_payload` against the {@link AuthSignalPayloadSchema}.
2046
- * If the payload is malformed, a ZodError will be thrown.
2047
- *
2048
- * @param event - The raw signal data received from the authentication provider.
2049
- * @returns A formatted RawEventRequest ready for ingestion (enqueue / batch POST).
2050
- * @throws {ZodError} If the signal_payload does not match the expected schema.
2051
- *
2052
- * @example
2053
- * const raw = createAuthEvent(incomingData);
2054
- */
2055
- declare const createAuthEvent: (event: AuthSignalEvent) => RawEventRequest;
2056
- /**
2057
- * Transforms an incoming TransactionSignalEvent into a validated RawEventRequest labeled as 'TRANSACTION'.
2058
- *
2059
- * @remarks
2060
- * This function validates the `event.signal_payload` against the {@link TransactionSignalPayloadSchema}.
2061
- * If the payload is malformed, a ZodError will be thrown.
2062
- *
2063
- * @param event - The raw signal data received from the transaction provider.
2064
- * @returns A formatted RawEventRequest ready for ingestion (enqueue / batch POST).
2065
- * @throws {ZodError} If the signal_payload does not match the expected schema.
2066
- *
2067
- * @example
2068
- * const raw = createTransactionEvent(incomingData);
2069
- */
2070
- declare function createTransactionEvent(event: TransactionSignalEvent): RawEventRequest;
2071
- /**
2072
- * Transforms an incoming AnomalyFlagSignalEvent into a validated RawEventRequest labeled as 'ANOMALY_FLAG'.
2073
- *
2074
- * @remarks
2075
- * This function validates the `event.signal_payload` against the {@link AnomalyFlagSignalPayloadSchema}.
2076
- * If the payload is malformed, a ZodError will be thrown.
2077
- *
2078
- * @param event - The raw signal data received from the anomaly flag provider.
2079
- * @returns A formatted RawEventRequest ready for ingestion (enqueue / batch POST).
2080
- * @throws {ZodError} If the signal_payload does not match the expected schema.
2081
- *
2082
- * @example
2083
- * const raw = createAnomalyFlagEvent(incomingData);
2084
- */
2085
- declare const createAnomalyFlagEvent: (event: AnomalyFlagSignalEvent) => RawEventRequest;
2086
- /**
2087
- * Transforms an incoming BehaviorSignalEvent into a validated RawEventRequest labeled as 'BEHAVIOR'.
2088
- *
2089
- * @remarks
2090
- * This function validates the `event.signal_payload` against the {@link BehaviorSignalPayloadSchema}.
2091
- * If the payload is malformed, a ZodError will be thrown.
2092
- *
2093
- * @param event - The raw signal data received from the behavior provider.
2094
- * @returns A formatted RawEventRequest ready for ingestion (enqueue / batch POST).
2095
- * @throws {ZodError} If the signal_payload does not match the expected schema.
2096
- *
2097
- * @example
2098
- * const raw = createBehaviorEvent(incomingData);
2099
- */
2100
- declare const createBehaviorEvent: (event: BehaviorSignalEvent) => RawEventRequest;
2101
- /**
2102
- * Transforms an incoming NetworkSignalEvent into a validated RawEventRequest labeled as 'NETWORK_EVENT'.
2278
+ * Builds a `RawEventRequest` for a `NETWORK_EVENT` signal.
2103
2279
  *
2104
- * @remarks
2105
- * This function validates the `event.signal_payload` against the {@link NetworkSignalPayloadSchema}.
2106
- * If the payload is malformed, a ZodError will be thrown.
2107
- *
2108
- * @param event - The raw signal data received from the network provider.
2109
- * @returns A formatted RawEventRequest ready for ingestion (enqueue / batch POST).
2110
- * @throws {ZodError} If the signal_payload does not match the expected schema.
2111
- *
2112
- * @example
2113
- * const raw = createNetworkEvent(incomingData);
2280
+ * @param event - The `NetworkSignalEvent` to build a `RawEventRequest` for.
2281
+ * @returns A `RawEventRequest` for a `NETWORK_EVENT` signal.
2114
2282
  */
2115
2283
  declare const createNetworkEvent: (event: NetworkSignalEvent) => RawEventRequest;
2284
+
2285
+ declare const PolicyEventSignalSchema: z.ZodObject<{
2286
+ tenant_id: z.ZodString;
2287
+ signal_version: z.ZodString;
2288
+ signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT", "SESSION", "PROMPT_INPUT", "CONTEXT_INTEGRITY", "TOOL_CALL", "RAG_RETRIEVAL", "POLICY_EVENT", "USER_FEEDBACK", "WORKFLOW_ACTION", "API_CALL"]>;
2289
+ principal: z.ZodObject<{
2290
+ user_id: z.ZodOptional<z.ZodString>;
2291
+ account_id: z.ZodOptional<z.ZodString>;
2292
+ device_id: z.ZodOptional<z.ZodString>;
2293
+ session_id: z.ZodOptional<z.ZodString>;
2294
+ model_id: z.ZodOptional<z.ZodString>;
2295
+ service_id: z.ZodOptional<z.ZodString>;
2296
+ conversation_id: z.ZodOptional<z.ZodString>;
2297
+ document_id: z.ZodOptional<z.ZodString>;
2298
+ tool_id: z.ZodOptional<z.ZodString>;
2299
+ workflow_id: z.ZodOptional<z.ZodString>;
2300
+ api_key_id: z.ZodOptional<z.ZodString>;
2301
+ }, "strict", z.ZodTypeAny, {
2302
+ user_id?: string | undefined;
2303
+ account_id?: string | undefined;
2304
+ device_id?: string | undefined;
2305
+ session_id?: string | undefined;
2306
+ model_id?: string | undefined;
2307
+ service_id?: string | undefined;
2308
+ conversation_id?: string | undefined;
2309
+ document_id?: string | undefined;
2310
+ tool_id?: string | undefined;
2311
+ workflow_id?: string | undefined;
2312
+ api_key_id?: string | undefined;
2313
+ }, {
2314
+ user_id?: string | undefined;
2315
+ account_id?: string | undefined;
2316
+ device_id?: string | undefined;
2317
+ session_id?: string | undefined;
2318
+ model_id?: string | undefined;
2319
+ service_id?: string | undefined;
2320
+ conversation_id?: string | undefined;
2321
+ document_id?: string | undefined;
2322
+ tool_id?: string | undefined;
2323
+ workflow_id?: string | undefined;
2324
+ api_key_id?: string | undefined;
2325
+ }>;
2326
+ timestamp: z.ZodOptional<z.ZodDefault<z.ZodString>>;
2327
+ confidence_hint: z.ZodOptional<z.ZodNumber>;
2328
+ provenance: z.ZodOptional<z.ZodObject<{
2329
+ mode: z.ZodOptional<z.ZodEnum<["DETERMINISTIC", "EXTERNAL_RNG", "ATTESTED"]>>;
2330
+ source_id: z.ZodOptional<z.ZodString>;
2331
+ epoch_counter: z.ZodOptional<z.ZodNumber>;
2332
+ health_summary: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
2333
+ }, "strip", z.ZodTypeAny, {
2334
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
2335
+ source_id?: string | undefined;
2336
+ epoch_counter?: number | undefined;
2337
+ health_summary?: string | Record<string, unknown> | undefined;
2338
+ }, {
2339
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
2340
+ source_id?: string | undefined;
2341
+ epoch_counter?: number | undefined;
2342
+ health_summary?: string | Record<string, unknown> | undefined;
2343
+ }>>;
2344
+ integrity: z.ZodOptional<z.ZodObject<{
2345
+ hash: z.ZodOptional<z.ZodString>;
2346
+ signature: z.ZodOptional<z.ZodString>;
2347
+ }, "strip", z.ZodTypeAny, {
2348
+ hash?: string | undefined;
2349
+ signature?: string | undefined;
2350
+ }, {
2351
+ hash?: string | undefined;
2352
+ signature?: string | undefined;
2353
+ }>>;
2354
+ } & {
2355
+ signal_payload: z.ZodObject<{
2356
+ policy_check_name: z.ZodString;
2357
+ policy_category: z.ZodEnum<["SAFETY", "PRIVACY", "SECURITY", "COMPLIANCE", "CONTENT", "OTHER"]>;
2358
+ policy_result: z.ZodEnum<["PASS", "WARN", "FAIL", "BLOCKED"]>;
2359
+ severity: z.ZodNumber;
2360
+ blocked: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2361
+ violation_count: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2362
+ policy_confidence: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2363
+ redaction_applied: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2364
+ }, "strip", z.ZodTypeAny, {
2365
+ severity: number;
2366
+ policy_check_name: string;
2367
+ policy_category: "SAFETY" | "PRIVACY" | "SECURITY" | "COMPLIANCE" | "CONTENT" | "OTHER";
2368
+ policy_result: "PASS" | "WARN" | "FAIL" | "BLOCKED";
2369
+ blocked: boolean;
2370
+ violation_count: number;
2371
+ redaction_applied: boolean;
2372
+ policy_confidence?: number | null | undefined;
2373
+ }, {
2374
+ severity: number;
2375
+ policy_check_name: string;
2376
+ policy_category: "SAFETY" | "PRIVACY" | "SECURITY" | "COMPLIANCE" | "CONTENT" | "OTHER";
2377
+ policy_result: "PASS" | "WARN" | "FAIL" | "BLOCKED";
2378
+ blocked?: boolean | undefined;
2379
+ violation_count?: number | undefined;
2380
+ policy_confidence?: number | null | undefined;
2381
+ redaction_applied?: boolean | undefined;
2382
+ }>;
2383
+ }, "strip", z.ZodTypeAny, {
2384
+ tenant_id: string;
2385
+ signal_version: string;
2386
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
2387
+ signal_payload: {
2388
+ severity: number;
2389
+ policy_check_name: string;
2390
+ policy_category: "SAFETY" | "PRIVACY" | "SECURITY" | "COMPLIANCE" | "CONTENT" | "OTHER";
2391
+ policy_result: "PASS" | "WARN" | "FAIL" | "BLOCKED";
2392
+ blocked: boolean;
2393
+ violation_count: number;
2394
+ redaction_applied: boolean;
2395
+ policy_confidence?: number | null | undefined;
2396
+ };
2397
+ principal: {
2398
+ user_id?: string | undefined;
2399
+ account_id?: string | undefined;
2400
+ device_id?: string | undefined;
2401
+ session_id?: string | undefined;
2402
+ model_id?: string | undefined;
2403
+ service_id?: string | undefined;
2404
+ conversation_id?: string | undefined;
2405
+ document_id?: string | undefined;
2406
+ tool_id?: string | undefined;
2407
+ workflow_id?: string | undefined;
2408
+ api_key_id?: string | undefined;
2409
+ };
2410
+ integrity?: {
2411
+ hash?: string | undefined;
2412
+ signature?: string | undefined;
2413
+ } | undefined;
2414
+ timestamp?: string | undefined;
2415
+ confidence_hint?: number | undefined;
2416
+ provenance?: {
2417
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
2418
+ source_id?: string | undefined;
2419
+ epoch_counter?: number | undefined;
2420
+ health_summary?: string | Record<string, unknown> | undefined;
2421
+ } | undefined;
2422
+ }, {
2423
+ tenant_id: string;
2424
+ signal_version: string;
2425
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
2426
+ signal_payload: {
2427
+ severity: number;
2428
+ policy_check_name: string;
2429
+ policy_category: "SAFETY" | "PRIVACY" | "SECURITY" | "COMPLIANCE" | "CONTENT" | "OTHER";
2430
+ policy_result: "PASS" | "WARN" | "FAIL" | "BLOCKED";
2431
+ blocked?: boolean | undefined;
2432
+ violation_count?: number | undefined;
2433
+ policy_confidence?: number | null | undefined;
2434
+ redaction_applied?: boolean | undefined;
2435
+ };
2436
+ principal: {
2437
+ user_id?: string | undefined;
2438
+ account_id?: string | undefined;
2439
+ device_id?: string | undefined;
2440
+ session_id?: string | undefined;
2441
+ model_id?: string | undefined;
2442
+ service_id?: string | undefined;
2443
+ conversation_id?: string | undefined;
2444
+ document_id?: string | undefined;
2445
+ tool_id?: string | undefined;
2446
+ workflow_id?: string | undefined;
2447
+ api_key_id?: string | undefined;
2448
+ };
2449
+ integrity?: {
2450
+ hash?: string | undefined;
2451
+ signature?: string | undefined;
2452
+ } | undefined;
2453
+ timestamp?: string | undefined;
2454
+ confidence_hint?: number | undefined;
2455
+ provenance?: {
2456
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
2457
+ source_id?: string | undefined;
2458
+ epoch_counter?: number | undefined;
2459
+ health_summary?: string | Record<string, unknown> | undefined;
2460
+ } | undefined;
2461
+ }>;
2462
+ /** `signal_type: 'POLICY_EVENT'` with policy check outcome metadata. */
2463
+ type PolicyEventSignalEvent = z.infer<typeof PolicyEventSignalSchema>;
2464
+
2116
2465
  /**
2117
- * Transforms an incoming ModelOutputSignalEvent into a validated RawEventRequest labeled as 'MODEL_OUTPUT'.
2118
- *
2119
- * @remarks
2120
- * This function validates the `event.signal_payload` against the {@link ModelOutputSignalPayloadSchema}.
2121
- * If the payload is malformed, a ZodError will be thrown.
2122
- *
2123
- * @param event - The raw signal data received from the model output provider.
2124
- * @returns A formatted RawEventRequest ready for ingestion (enqueue / batch POST).
2125
- * @throws {ZodError} If the signal_payload does not match the expected schema.
2126
- *
2127
- * @example
2128
- * const raw = createModelOutputEvent(incomingData);
2129
- */
2130
- declare const createModelOutputEvent: (event: ModelOutputSignalEvent) => RawEventRequest;
2131
- /**
2132
- * Transforms an incoming SystemTelemetrySignalEvent into a validated RawEventRequest labeled as 'SYSTEM_TELEMETRY'.
2466
+ * Builds a `RawEventRequest` for a `POLICY_EVENT` signal.
2133
2467
  *
2134
- * @remarks
2135
- * This function validates the `event.signal_payload` against the {@link SystemTelemetrySignalPayloadSchema}.
2136
- * If the payload is malformed, a ZodError will be thrown.
2137
- *
2138
- * @param event - The raw signal data received from the system telemetry provider.
2139
- * @returns A formatted RawEventRequest ready for ingestion (enqueue / batch POST).
2140
- * @throws {ZodError} If the signal_payload does not match the expected schema.
2141
- *
2142
- * @example
2143
- * const raw = createSystemTelemetryEvent(incomingData);
2468
+ * @param event - The `PolicyEventSignalEvent` to build a `RawEventRequest` for.
2469
+ * @returns A `RawEventRequest` for a `POLICY_EVENT` signal.
2144
2470
  */
2145
- declare const createSystemTelemetryEvent: (event: SystemTelemetrySignalEvent) => RawEventRequest;
2471
+ declare const createPolicyEvent: (event: PolicyEventSignalEvent) => RawEventRequest;
2472
+
2473
+ declare const PromptInputSignalSchema: z.ZodObject<{
2474
+ tenant_id: z.ZodString;
2475
+ signal_version: z.ZodString;
2476
+ signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT", "SESSION", "PROMPT_INPUT", "CONTEXT_INTEGRITY", "TOOL_CALL", "RAG_RETRIEVAL", "POLICY_EVENT", "USER_FEEDBACK", "WORKFLOW_ACTION", "API_CALL"]>;
2477
+ principal: z.ZodObject<{
2478
+ user_id: z.ZodOptional<z.ZodString>;
2479
+ account_id: z.ZodOptional<z.ZodString>;
2480
+ device_id: z.ZodOptional<z.ZodString>;
2481
+ session_id: z.ZodOptional<z.ZodString>;
2482
+ model_id: z.ZodOptional<z.ZodString>;
2483
+ service_id: z.ZodOptional<z.ZodString>;
2484
+ conversation_id: z.ZodOptional<z.ZodString>;
2485
+ document_id: z.ZodOptional<z.ZodString>;
2486
+ tool_id: z.ZodOptional<z.ZodString>;
2487
+ workflow_id: z.ZodOptional<z.ZodString>;
2488
+ api_key_id: z.ZodOptional<z.ZodString>;
2489
+ }, "strict", z.ZodTypeAny, {
2490
+ user_id?: string | undefined;
2491
+ account_id?: string | undefined;
2492
+ device_id?: string | undefined;
2493
+ session_id?: string | undefined;
2494
+ model_id?: string | undefined;
2495
+ service_id?: string | undefined;
2496
+ conversation_id?: string | undefined;
2497
+ document_id?: string | undefined;
2498
+ tool_id?: string | undefined;
2499
+ workflow_id?: string | undefined;
2500
+ api_key_id?: string | undefined;
2501
+ }, {
2502
+ user_id?: string | undefined;
2503
+ account_id?: string | undefined;
2504
+ device_id?: string | undefined;
2505
+ session_id?: string | undefined;
2506
+ model_id?: string | undefined;
2507
+ service_id?: string | undefined;
2508
+ conversation_id?: string | undefined;
2509
+ document_id?: string | undefined;
2510
+ tool_id?: string | undefined;
2511
+ workflow_id?: string | undefined;
2512
+ api_key_id?: string | undefined;
2513
+ }>;
2514
+ timestamp: z.ZodOptional<z.ZodDefault<z.ZodString>>;
2515
+ confidence_hint: z.ZodOptional<z.ZodNumber>;
2516
+ provenance: z.ZodOptional<z.ZodObject<{
2517
+ mode: z.ZodOptional<z.ZodEnum<["DETERMINISTIC", "EXTERNAL_RNG", "ATTESTED"]>>;
2518
+ source_id: z.ZodOptional<z.ZodString>;
2519
+ epoch_counter: z.ZodOptional<z.ZodNumber>;
2520
+ health_summary: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
2521
+ }, "strip", z.ZodTypeAny, {
2522
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
2523
+ source_id?: string | undefined;
2524
+ epoch_counter?: number | undefined;
2525
+ health_summary?: string | Record<string, unknown> | undefined;
2526
+ }, {
2527
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
2528
+ source_id?: string | undefined;
2529
+ epoch_counter?: number | undefined;
2530
+ health_summary?: string | Record<string, unknown> | undefined;
2531
+ }>>;
2532
+ integrity: z.ZodOptional<z.ZodObject<{
2533
+ hash: z.ZodOptional<z.ZodString>;
2534
+ signature: z.ZodOptional<z.ZodString>;
2535
+ }, "strip", z.ZodTypeAny, {
2536
+ hash?: string | undefined;
2537
+ signature?: string | undefined;
2538
+ }, {
2539
+ hash?: string | undefined;
2540
+ signature?: string | undefined;
2541
+ }>>;
2542
+ } & {
2543
+ signal_payload: z.ZodObject<{
2544
+ prompt_length_chars: z.ZodNumber;
2545
+ conversation_turn_index: z.ZodNumber;
2546
+ contains_instruction_override: z.ZodBoolean;
2547
+ contains_tool_request: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2548
+ contains_secret_request: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2549
+ contains_policy_challenge: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2550
+ recursive_pattern_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2551
+ prompt_injection_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2552
+ sensitive_domain: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2553
+ complexity_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2554
+ prompt_hash: z.ZodOptional<z.ZodString>;
2555
+ }, "strip", z.ZodTypeAny, {
2556
+ contains_instruction_override: boolean;
2557
+ prompt_length_chars: number;
2558
+ conversation_turn_index: number;
2559
+ contains_tool_request: boolean;
2560
+ contains_secret_request: boolean;
2561
+ contains_policy_challenge: boolean;
2562
+ sensitive_domain: boolean;
2563
+ recursive_pattern_score?: number | null | undefined;
2564
+ prompt_injection_score?: number | null | undefined;
2565
+ complexity_score?: number | null | undefined;
2566
+ prompt_hash?: string | undefined;
2567
+ }, {
2568
+ contains_instruction_override: boolean;
2569
+ prompt_length_chars: number;
2570
+ conversation_turn_index: number;
2571
+ recursive_pattern_score?: number | null | undefined;
2572
+ prompt_injection_score?: number | null | undefined;
2573
+ contains_tool_request?: boolean | undefined;
2574
+ contains_secret_request?: boolean | undefined;
2575
+ contains_policy_challenge?: boolean | undefined;
2576
+ sensitive_domain?: boolean | undefined;
2577
+ complexity_score?: number | null | undefined;
2578
+ prompt_hash?: string | undefined;
2579
+ }>;
2580
+ }, "strip", z.ZodTypeAny, {
2581
+ tenant_id: string;
2582
+ signal_version: string;
2583
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
2584
+ signal_payload: {
2585
+ contains_instruction_override: boolean;
2586
+ prompt_length_chars: number;
2587
+ conversation_turn_index: number;
2588
+ contains_tool_request: boolean;
2589
+ contains_secret_request: boolean;
2590
+ contains_policy_challenge: boolean;
2591
+ sensitive_domain: boolean;
2592
+ recursive_pattern_score?: number | null | undefined;
2593
+ prompt_injection_score?: number | null | undefined;
2594
+ complexity_score?: number | null | undefined;
2595
+ prompt_hash?: string | undefined;
2596
+ };
2597
+ principal: {
2598
+ user_id?: string | undefined;
2599
+ account_id?: string | undefined;
2600
+ device_id?: string | undefined;
2601
+ session_id?: string | undefined;
2602
+ model_id?: string | undefined;
2603
+ service_id?: string | undefined;
2604
+ conversation_id?: string | undefined;
2605
+ document_id?: string | undefined;
2606
+ tool_id?: string | undefined;
2607
+ workflow_id?: string | undefined;
2608
+ api_key_id?: string | undefined;
2609
+ };
2610
+ integrity?: {
2611
+ hash?: string | undefined;
2612
+ signature?: string | undefined;
2613
+ } | undefined;
2614
+ timestamp?: string | undefined;
2615
+ confidence_hint?: number | undefined;
2616
+ provenance?: {
2617
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
2618
+ source_id?: string | undefined;
2619
+ epoch_counter?: number | undefined;
2620
+ health_summary?: string | Record<string, unknown> | undefined;
2621
+ } | undefined;
2622
+ }, {
2623
+ tenant_id: string;
2624
+ signal_version: string;
2625
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
2626
+ signal_payload: {
2627
+ contains_instruction_override: boolean;
2628
+ prompt_length_chars: number;
2629
+ conversation_turn_index: number;
2630
+ recursive_pattern_score?: number | null | undefined;
2631
+ prompt_injection_score?: number | null | undefined;
2632
+ contains_tool_request?: boolean | undefined;
2633
+ contains_secret_request?: boolean | undefined;
2634
+ contains_policy_challenge?: boolean | undefined;
2635
+ sensitive_domain?: boolean | undefined;
2636
+ complexity_score?: number | null | undefined;
2637
+ prompt_hash?: string | undefined;
2638
+ };
2639
+ principal: {
2640
+ user_id?: string | undefined;
2641
+ account_id?: string | undefined;
2642
+ device_id?: string | undefined;
2643
+ session_id?: string | undefined;
2644
+ model_id?: string | undefined;
2645
+ service_id?: string | undefined;
2646
+ conversation_id?: string | undefined;
2647
+ document_id?: string | undefined;
2648
+ tool_id?: string | undefined;
2649
+ workflow_id?: string | undefined;
2650
+ api_key_id?: string | undefined;
2651
+ };
2652
+ integrity?: {
2653
+ hash?: string | undefined;
2654
+ signature?: string | undefined;
2655
+ } | undefined;
2656
+ timestamp?: string | undefined;
2657
+ confidence_hint?: number | undefined;
2658
+ provenance?: {
2659
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
2660
+ source_id?: string | undefined;
2661
+ epoch_counter?: number | undefined;
2662
+ health_summary?: string | Record<string, unknown> | undefined;
2663
+ } | undefined;
2664
+ }>;
2665
+ /** `signal_type: 'PROMPT_INPUT'` with prompt analysis metadata (no raw text). */
2666
+ type PromptInputSignalEvent = z.infer<typeof PromptInputSignalSchema>;
2667
+
2668
+ /**
2669
+ * Builds a `RawEventRequest` for a `PROMPT_INPUT` signal.
2670
+ *
2671
+ * @param event - The `PromptInputSignalEvent` to build a `RawEventRequest` for.
2672
+ * @returns A `RawEventRequest` for a `PROMPT_INPUT` signal.
2673
+ */
2674
+ declare const createPromptInputEvent: (event: PromptInputSignalEvent) => RawEventRequest;
2675
+
2676
+ declare const RagRetrievalSignalSchema: z.ZodObject<{
2677
+ tenant_id: z.ZodString;
2678
+ signal_version: z.ZodString;
2679
+ signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT", "SESSION", "PROMPT_INPUT", "CONTEXT_INTEGRITY", "TOOL_CALL", "RAG_RETRIEVAL", "POLICY_EVENT", "USER_FEEDBACK", "WORKFLOW_ACTION", "API_CALL"]>;
2680
+ principal: z.ZodObject<{
2681
+ user_id: z.ZodOptional<z.ZodString>;
2682
+ account_id: z.ZodOptional<z.ZodString>;
2683
+ device_id: z.ZodOptional<z.ZodString>;
2684
+ session_id: z.ZodOptional<z.ZodString>;
2685
+ model_id: z.ZodOptional<z.ZodString>;
2686
+ service_id: z.ZodOptional<z.ZodString>;
2687
+ conversation_id: z.ZodOptional<z.ZodString>;
2688
+ document_id: z.ZodOptional<z.ZodString>;
2689
+ tool_id: z.ZodOptional<z.ZodString>;
2690
+ workflow_id: z.ZodOptional<z.ZodString>;
2691
+ api_key_id: z.ZodOptional<z.ZodString>;
2692
+ }, "strict", z.ZodTypeAny, {
2693
+ user_id?: string | undefined;
2694
+ account_id?: string | undefined;
2695
+ device_id?: string | undefined;
2696
+ session_id?: string | undefined;
2697
+ model_id?: string | undefined;
2698
+ service_id?: string | undefined;
2699
+ conversation_id?: string | undefined;
2700
+ document_id?: string | undefined;
2701
+ tool_id?: string | undefined;
2702
+ workflow_id?: string | undefined;
2703
+ api_key_id?: string | undefined;
2704
+ }, {
2705
+ user_id?: string | undefined;
2706
+ account_id?: string | undefined;
2707
+ device_id?: string | undefined;
2708
+ session_id?: string | undefined;
2709
+ model_id?: string | undefined;
2710
+ service_id?: string | undefined;
2711
+ conversation_id?: string | undefined;
2712
+ document_id?: string | undefined;
2713
+ tool_id?: string | undefined;
2714
+ workflow_id?: string | undefined;
2715
+ api_key_id?: string | undefined;
2716
+ }>;
2717
+ timestamp: z.ZodOptional<z.ZodDefault<z.ZodString>>;
2718
+ confidence_hint: z.ZodOptional<z.ZodNumber>;
2719
+ provenance: z.ZodOptional<z.ZodObject<{
2720
+ mode: z.ZodOptional<z.ZodEnum<["DETERMINISTIC", "EXTERNAL_RNG", "ATTESTED"]>>;
2721
+ source_id: z.ZodOptional<z.ZodString>;
2722
+ epoch_counter: z.ZodOptional<z.ZodNumber>;
2723
+ health_summary: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
2724
+ }, "strip", z.ZodTypeAny, {
2725
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
2726
+ source_id?: string | undefined;
2727
+ epoch_counter?: number | undefined;
2728
+ health_summary?: string | Record<string, unknown> | undefined;
2729
+ }, {
2730
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
2731
+ source_id?: string | undefined;
2732
+ epoch_counter?: number | undefined;
2733
+ health_summary?: string | Record<string, unknown> | undefined;
2734
+ }>>;
2735
+ integrity: z.ZodOptional<z.ZodObject<{
2736
+ hash: z.ZodOptional<z.ZodString>;
2737
+ signature: z.ZodOptional<z.ZodString>;
2738
+ }, "strip", z.ZodTypeAny, {
2739
+ hash?: string | undefined;
2740
+ signature?: string | undefined;
2741
+ }, {
2742
+ hash?: string | undefined;
2743
+ signature?: string | undefined;
2744
+ }>>;
2745
+ } & {
2746
+ signal_payload: z.ZodObject<{
2747
+ retriever_id: z.ZodString;
2748
+ query_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2749
+ documents_retrieved: z.ZodNumber;
2750
+ top_k: z.ZodNumber;
2751
+ average_relevance_score: z.ZodNumber;
2752
+ source_trust_score: z.ZodNumber;
2753
+ lowest_source_trust_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2754
+ untrusted_source_count: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2755
+ retrieved_context_tokens: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2756
+ context_injection_score: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2757
+ document_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
2758
+ }, "strip", z.ZodTypeAny, {
2759
+ untrusted_source_count: number;
2760
+ source_trust_score: number;
2761
+ context_injection_score: number;
2762
+ retriever_id: string;
2763
+ documents_retrieved: number;
2764
+ top_k: number;
2765
+ average_relevance_score: number;
2766
+ retrieved_context_tokens: number;
2767
+ document_ids: string[];
2768
+ lowest_source_trust_score?: number | null | undefined;
2769
+ query_hash?: string | null | undefined;
2770
+ }, {
2771
+ source_trust_score: number;
2772
+ retriever_id: string;
2773
+ documents_retrieved: number;
2774
+ top_k: number;
2775
+ average_relevance_score: number;
2776
+ untrusted_source_count?: number | undefined;
2777
+ lowest_source_trust_score?: number | null | undefined;
2778
+ context_injection_score?: number | undefined;
2779
+ query_hash?: string | null | undefined;
2780
+ retrieved_context_tokens?: number | undefined;
2781
+ document_ids?: string[] | undefined;
2782
+ }>;
2783
+ }, "strip", z.ZodTypeAny, {
2784
+ tenant_id: string;
2785
+ signal_version: string;
2786
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
2787
+ signal_payload: {
2788
+ untrusted_source_count: number;
2789
+ source_trust_score: number;
2790
+ context_injection_score: number;
2791
+ retriever_id: string;
2792
+ documents_retrieved: number;
2793
+ top_k: number;
2794
+ average_relevance_score: number;
2795
+ retrieved_context_tokens: number;
2796
+ document_ids: string[];
2797
+ lowest_source_trust_score?: number | null | undefined;
2798
+ query_hash?: string | null | undefined;
2799
+ };
2800
+ principal: {
2801
+ user_id?: string | undefined;
2802
+ account_id?: string | undefined;
2803
+ device_id?: string | undefined;
2804
+ session_id?: string | undefined;
2805
+ model_id?: string | undefined;
2806
+ service_id?: string | undefined;
2807
+ conversation_id?: string | undefined;
2808
+ document_id?: string | undefined;
2809
+ tool_id?: string | undefined;
2810
+ workflow_id?: string | undefined;
2811
+ api_key_id?: string | undefined;
2812
+ };
2813
+ integrity?: {
2814
+ hash?: string | undefined;
2815
+ signature?: string | undefined;
2816
+ } | undefined;
2817
+ timestamp?: string | undefined;
2818
+ confidence_hint?: number | undefined;
2819
+ provenance?: {
2820
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
2821
+ source_id?: string | undefined;
2822
+ epoch_counter?: number | undefined;
2823
+ health_summary?: string | Record<string, unknown> | undefined;
2824
+ } | undefined;
2825
+ }, {
2826
+ tenant_id: string;
2827
+ signal_version: string;
2828
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
2829
+ signal_payload: {
2830
+ source_trust_score: number;
2831
+ retriever_id: string;
2832
+ documents_retrieved: number;
2833
+ top_k: number;
2834
+ average_relevance_score: number;
2835
+ untrusted_source_count?: number | undefined;
2836
+ lowest_source_trust_score?: number | null | undefined;
2837
+ context_injection_score?: number | undefined;
2838
+ query_hash?: string | null | undefined;
2839
+ retrieved_context_tokens?: number | undefined;
2840
+ document_ids?: string[] | undefined;
2841
+ };
2842
+ principal: {
2843
+ user_id?: string | undefined;
2844
+ account_id?: string | undefined;
2845
+ device_id?: string | undefined;
2846
+ session_id?: string | undefined;
2847
+ model_id?: string | undefined;
2848
+ service_id?: string | undefined;
2849
+ conversation_id?: string | undefined;
2850
+ document_id?: string | undefined;
2851
+ tool_id?: string | undefined;
2852
+ workflow_id?: string | undefined;
2853
+ api_key_id?: string | undefined;
2854
+ };
2855
+ integrity?: {
2856
+ hash?: string | undefined;
2857
+ signature?: string | undefined;
2858
+ } | undefined;
2859
+ timestamp?: string | undefined;
2860
+ confidence_hint?: number | undefined;
2861
+ provenance?: {
2862
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
2863
+ source_id?: string | undefined;
2864
+ epoch_counter?: number | undefined;
2865
+ health_summary?: string | Record<string, unknown> | undefined;
2866
+ } | undefined;
2867
+ }>;
2868
+ /** `signal_type: 'RAG_RETRIEVAL'` with retrieval trust metadata. */
2869
+ type RagRetrievalSignalEvent = z.infer<typeof RagRetrievalSignalSchema>;
2870
+
2871
+ /**
2872
+ * Builds a `RawEventRequest` for a `RAG_RETRIEVAL` signal.
2873
+ *
2874
+ * @param event - The `RagRetrievalSignalEvent` to build a `RawEventRequest` for.
2875
+ * @returns A `RawEventRequest` for a `RAG_RETRIEVAL` signal.
2876
+ */
2877
+ declare const createRagRetrievalEvent: (event: RagRetrievalSignalEvent) => RawEventRequest;
2878
+
2879
+ declare const SessionSignalSchema: z.ZodObject<{
2880
+ tenant_id: z.ZodString;
2881
+ signal_version: z.ZodString;
2882
+ signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT", "SESSION", "PROMPT_INPUT", "CONTEXT_INTEGRITY", "TOOL_CALL", "RAG_RETRIEVAL", "POLICY_EVENT", "USER_FEEDBACK", "WORKFLOW_ACTION", "API_CALL"]>;
2883
+ principal: z.ZodObject<{
2884
+ user_id: z.ZodOptional<z.ZodString>;
2885
+ account_id: z.ZodOptional<z.ZodString>;
2886
+ device_id: z.ZodOptional<z.ZodString>;
2887
+ session_id: z.ZodOptional<z.ZodString>;
2888
+ model_id: z.ZodOptional<z.ZodString>;
2889
+ service_id: z.ZodOptional<z.ZodString>;
2890
+ conversation_id: z.ZodOptional<z.ZodString>;
2891
+ document_id: z.ZodOptional<z.ZodString>;
2892
+ tool_id: z.ZodOptional<z.ZodString>;
2893
+ workflow_id: z.ZodOptional<z.ZodString>;
2894
+ api_key_id: z.ZodOptional<z.ZodString>;
2895
+ }, "strict", z.ZodTypeAny, {
2896
+ user_id?: string | undefined;
2897
+ account_id?: string | undefined;
2898
+ device_id?: string | undefined;
2899
+ session_id?: string | undefined;
2900
+ model_id?: string | undefined;
2901
+ service_id?: string | undefined;
2902
+ conversation_id?: string | undefined;
2903
+ document_id?: string | undefined;
2904
+ tool_id?: string | undefined;
2905
+ workflow_id?: string | undefined;
2906
+ api_key_id?: string | undefined;
2907
+ }, {
2908
+ user_id?: string | undefined;
2909
+ account_id?: string | undefined;
2910
+ device_id?: string | undefined;
2911
+ session_id?: string | undefined;
2912
+ model_id?: string | undefined;
2913
+ service_id?: string | undefined;
2914
+ conversation_id?: string | undefined;
2915
+ document_id?: string | undefined;
2916
+ tool_id?: string | undefined;
2917
+ workflow_id?: string | undefined;
2918
+ api_key_id?: string | undefined;
2919
+ }>;
2920
+ timestamp: z.ZodOptional<z.ZodDefault<z.ZodString>>;
2921
+ confidence_hint: z.ZodOptional<z.ZodNumber>;
2922
+ provenance: z.ZodOptional<z.ZodObject<{
2923
+ mode: z.ZodOptional<z.ZodEnum<["DETERMINISTIC", "EXTERNAL_RNG", "ATTESTED"]>>;
2924
+ source_id: z.ZodOptional<z.ZodString>;
2925
+ epoch_counter: z.ZodOptional<z.ZodNumber>;
2926
+ health_summary: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
2927
+ }, "strip", z.ZodTypeAny, {
2928
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
2929
+ source_id?: string | undefined;
2930
+ epoch_counter?: number | undefined;
2931
+ health_summary?: string | Record<string, unknown> | undefined;
2932
+ }, {
2933
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
2934
+ source_id?: string | undefined;
2935
+ epoch_counter?: number | undefined;
2936
+ health_summary?: string | Record<string, unknown> | undefined;
2937
+ }>>;
2938
+ integrity: z.ZodOptional<z.ZodObject<{
2939
+ hash: z.ZodOptional<z.ZodString>;
2940
+ signature: z.ZodOptional<z.ZodString>;
2941
+ }, "strip", z.ZodTypeAny, {
2942
+ hash?: string | undefined;
2943
+ signature?: string | undefined;
2944
+ }, {
2945
+ hash?: string | undefined;
2946
+ signature?: string | undefined;
2947
+ }>>;
2948
+ } & {
2949
+ signal_payload: z.ZodObject<{
2950
+ session_status: z.ZodEnum<["STARTED", "ACTIVE", "ENDED", "TIMEOUT", "ABANDONED"]>;
2951
+ session_age_seconds: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2952
+ turn_count: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2953
+ messages_last_minute: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2954
+ avg_seconds_between_turns: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2955
+ restart_count_10m: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2956
+ session_timeout: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2957
+ abandoned: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2958
+ conversation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2959
+ user_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2960
+ }, "strip", z.ZodTypeAny, {
2961
+ session_status: "STARTED" | "ACTIVE" | "ENDED" | "TIMEOUT" | "ABANDONED";
2962
+ session_age_seconds: number;
2963
+ turn_count: number;
2964
+ messages_last_minute: number;
2965
+ restart_count_10m: number;
2966
+ session_timeout: boolean;
2967
+ abandoned: boolean;
2968
+ user_id?: string | null | undefined;
2969
+ conversation_id?: string | null | undefined;
2970
+ avg_seconds_between_turns?: number | null | undefined;
2971
+ }, {
2972
+ session_status: "STARTED" | "ACTIVE" | "ENDED" | "TIMEOUT" | "ABANDONED";
2973
+ user_id?: string | null | undefined;
2974
+ conversation_id?: string | null | undefined;
2975
+ session_age_seconds?: number | undefined;
2976
+ turn_count?: number | undefined;
2977
+ messages_last_minute?: number | undefined;
2978
+ avg_seconds_between_turns?: number | null | undefined;
2979
+ restart_count_10m?: number | undefined;
2980
+ session_timeout?: boolean | undefined;
2981
+ abandoned?: boolean | undefined;
2982
+ }>;
2983
+ }, "strip", z.ZodTypeAny, {
2984
+ tenant_id: string;
2985
+ signal_version: string;
2986
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
2987
+ signal_payload: {
2988
+ session_status: "STARTED" | "ACTIVE" | "ENDED" | "TIMEOUT" | "ABANDONED";
2989
+ session_age_seconds: number;
2990
+ turn_count: number;
2991
+ messages_last_minute: number;
2992
+ restart_count_10m: number;
2993
+ session_timeout: boolean;
2994
+ abandoned: boolean;
2995
+ user_id?: string | null | undefined;
2996
+ conversation_id?: string | null | undefined;
2997
+ avg_seconds_between_turns?: number | null | undefined;
2998
+ };
2999
+ principal: {
3000
+ user_id?: string | undefined;
3001
+ account_id?: string | undefined;
3002
+ device_id?: string | undefined;
3003
+ session_id?: string | undefined;
3004
+ model_id?: string | undefined;
3005
+ service_id?: string | undefined;
3006
+ conversation_id?: string | undefined;
3007
+ document_id?: string | undefined;
3008
+ tool_id?: string | undefined;
3009
+ workflow_id?: string | undefined;
3010
+ api_key_id?: string | undefined;
3011
+ };
3012
+ integrity?: {
3013
+ hash?: string | undefined;
3014
+ signature?: string | undefined;
3015
+ } | undefined;
3016
+ timestamp?: string | undefined;
3017
+ confidence_hint?: number | undefined;
3018
+ provenance?: {
3019
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
3020
+ source_id?: string | undefined;
3021
+ epoch_counter?: number | undefined;
3022
+ health_summary?: string | Record<string, unknown> | undefined;
3023
+ } | undefined;
3024
+ }, {
3025
+ tenant_id: string;
3026
+ signal_version: string;
3027
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
3028
+ signal_payload: {
3029
+ session_status: "STARTED" | "ACTIVE" | "ENDED" | "TIMEOUT" | "ABANDONED";
3030
+ user_id?: string | null | undefined;
3031
+ conversation_id?: string | null | undefined;
3032
+ session_age_seconds?: number | undefined;
3033
+ turn_count?: number | undefined;
3034
+ messages_last_minute?: number | undefined;
3035
+ avg_seconds_between_turns?: number | null | undefined;
3036
+ restart_count_10m?: number | undefined;
3037
+ session_timeout?: boolean | undefined;
3038
+ abandoned?: boolean | undefined;
3039
+ };
3040
+ principal: {
3041
+ user_id?: string | undefined;
3042
+ account_id?: string | undefined;
3043
+ device_id?: string | undefined;
3044
+ session_id?: string | undefined;
3045
+ model_id?: string | undefined;
3046
+ service_id?: string | undefined;
3047
+ conversation_id?: string | undefined;
3048
+ document_id?: string | undefined;
3049
+ tool_id?: string | undefined;
3050
+ workflow_id?: string | undefined;
3051
+ api_key_id?: string | undefined;
3052
+ };
3053
+ integrity?: {
3054
+ hash?: string | undefined;
3055
+ signature?: string | undefined;
3056
+ } | undefined;
3057
+ timestamp?: string | undefined;
3058
+ confidence_hint?: number | undefined;
3059
+ provenance?: {
3060
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
3061
+ source_id?: string | undefined;
3062
+ epoch_counter?: number | undefined;
3063
+ health_summary?: string | Record<string, unknown> | undefined;
3064
+ } | undefined;
3065
+ }>;
3066
+ /** `signal_type: 'SESSION'` with conversation lifecycle metadata. */
3067
+ type SessionSignalEvent = z.infer<typeof SessionSignalSchema>;
3068
+
3069
+ /**
3070
+ * Builds a `RawEventRequest` for a `SESSION` signal.
3071
+ *
3072
+ * @param event - The `SessionSignalEvent` to build a `RawEventRequest` for.
3073
+ * @returns A `RawEventRequest` for a `SESSION` signal.
3074
+ */
3075
+ declare const createSessionEvent: (event: SessionSignalEvent) => RawEventRequest;
3076
+
3077
+ declare const SystemTelemetrySignalSchema: z.ZodObject<{
3078
+ tenant_id: z.ZodString;
3079
+ signal_version: z.ZodString;
3080
+ signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT", "SESSION", "PROMPT_INPUT", "CONTEXT_INTEGRITY", "TOOL_CALL", "RAG_RETRIEVAL", "POLICY_EVENT", "USER_FEEDBACK", "WORKFLOW_ACTION", "API_CALL"]>;
3081
+ principal: z.ZodObject<{
3082
+ user_id: z.ZodOptional<z.ZodString>;
3083
+ account_id: z.ZodOptional<z.ZodString>;
3084
+ device_id: z.ZodOptional<z.ZodString>;
3085
+ session_id: z.ZodOptional<z.ZodString>;
3086
+ model_id: z.ZodOptional<z.ZodString>;
3087
+ service_id: z.ZodOptional<z.ZodString>;
3088
+ conversation_id: z.ZodOptional<z.ZodString>;
3089
+ document_id: z.ZodOptional<z.ZodString>;
3090
+ tool_id: z.ZodOptional<z.ZodString>;
3091
+ workflow_id: z.ZodOptional<z.ZodString>;
3092
+ api_key_id: z.ZodOptional<z.ZodString>;
3093
+ }, "strict", z.ZodTypeAny, {
3094
+ user_id?: string | undefined;
3095
+ account_id?: string | undefined;
3096
+ device_id?: string | undefined;
3097
+ session_id?: string | undefined;
3098
+ model_id?: string | undefined;
3099
+ service_id?: string | undefined;
3100
+ conversation_id?: string | undefined;
3101
+ document_id?: string | undefined;
3102
+ tool_id?: string | undefined;
3103
+ workflow_id?: string | undefined;
3104
+ api_key_id?: string | undefined;
3105
+ }, {
3106
+ user_id?: string | undefined;
3107
+ account_id?: string | undefined;
3108
+ device_id?: string | undefined;
3109
+ session_id?: string | undefined;
3110
+ model_id?: string | undefined;
3111
+ service_id?: string | undefined;
3112
+ conversation_id?: string | undefined;
3113
+ document_id?: string | undefined;
3114
+ tool_id?: string | undefined;
3115
+ workflow_id?: string | undefined;
3116
+ api_key_id?: string | undefined;
3117
+ }>;
3118
+ timestamp: z.ZodOptional<z.ZodDefault<z.ZodString>>;
3119
+ confidence_hint: z.ZodOptional<z.ZodNumber>;
3120
+ provenance: z.ZodOptional<z.ZodObject<{
3121
+ mode: z.ZodOptional<z.ZodEnum<["DETERMINISTIC", "EXTERNAL_RNG", "ATTESTED"]>>;
3122
+ source_id: z.ZodOptional<z.ZodString>;
3123
+ epoch_counter: z.ZodOptional<z.ZodNumber>;
3124
+ health_summary: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
3125
+ }, "strip", z.ZodTypeAny, {
3126
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
3127
+ source_id?: string | undefined;
3128
+ epoch_counter?: number | undefined;
3129
+ health_summary?: string | Record<string, unknown> | undefined;
3130
+ }, {
3131
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
3132
+ source_id?: string | undefined;
3133
+ epoch_counter?: number | undefined;
3134
+ health_summary?: string | Record<string, unknown> | undefined;
3135
+ }>>;
3136
+ integrity: z.ZodOptional<z.ZodObject<{
3137
+ hash: z.ZodOptional<z.ZodString>;
3138
+ signature: z.ZodOptional<z.ZodString>;
3139
+ }, "strip", z.ZodTypeAny, {
3140
+ hash?: string | undefined;
3141
+ signature?: string | undefined;
3142
+ }, {
3143
+ hash?: string | undefined;
3144
+ signature?: string | undefined;
3145
+ }>>;
3146
+ } & {
3147
+ signal_payload: z.ZodObject<{
3148
+ metric_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3149
+ value: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3150
+ baseline: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3151
+ window_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3152
+ error_rate: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3153
+ baseline_error_rate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3154
+ unusual_auth_rate: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3155
+ firmware_hash_changed: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3156
+ expected_hash_match: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
3157
+ sensor_deviation_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3158
+ }, "strip", z.ZodTypeAny, {
3159
+ error_rate: number;
3160
+ unusual_auth_rate: number;
3161
+ firmware_hash_changed: boolean;
3162
+ value?: number | null | undefined;
3163
+ metric_name?: string | null | undefined;
3164
+ baseline?: number | null | undefined;
3165
+ window_seconds?: number | null | undefined;
3166
+ baseline_error_rate?: number | null | undefined;
3167
+ expected_hash_match?: boolean | null | undefined;
3168
+ sensor_deviation_score?: number | null | undefined;
3169
+ }, {
3170
+ value?: number | null | undefined;
3171
+ metric_name?: string | null | undefined;
3172
+ baseline?: number | null | undefined;
3173
+ window_seconds?: number | null | undefined;
3174
+ error_rate?: number | undefined;
3175
+ baseline_error_rate?: number | null | undefined;
3176
+ unusual_auth_rate?: number | undefined;
3177
+ firmware_hash_changed?: boolean | undefined;
3178
+ expected_hash_match?: boolean | null | undefined;
3179
+ sensor_deviation_score?: number | null | undefined;
3180
+ }>;
3181
+ }, "strip", z.ZodTypeAny, {
3182
+ tenant_id: string;
3183
+ signal_version: string;
3184
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
3185
+ signal_payload: {
3186
+ error_rate: number;
3187
+ unusual_auth_rate: number;
3188
+ firmware_hash_changed: boolean;
3189
+ value?: number | null | undefined;
3190
+ metric_name?: string | null | undefined;
3191
+ baseline?: number | null | undefined;
3192
+ window_seconds?: number | null | undefined;
3193
+ baseline_error_rate?: number | null | undefined;
3194
+ expected_hash_match?: boolean | null | undefined;
3195
+ sensor_deviation_score?: number | null | undefined;
3196
+ };
3197
+ principal: {
3198
+ user_id?: string | undefined;
3199
+ account_id?: string | undefined;
3200
+ device_id?: string | undefined;
3201
+ session_id?: string | undefined;
3202
+ model_id?: string | undefined;
3203
+ service_id?: string | undefined;
3204
+ conversation_id?: string | undefined;
3205
+ document_id?: string | undefined;
3206
+ tool_id?: string | undefined;
3207
+ workflow_id?: string | undefined;
3208
+ api_key_id?: string | undefined;
3209
+ };
3210
+ integrity?: {
3211
+ hash?: string | undefined;
3212
+ signature?: string | undefined;
3213
+ } | undefined;
3214
+ timestamp?: string | undefined;
3215
+ confidence_hint?: number | undefined;
3216
+ provenance?: {
3217
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
3218
+ source_id?: string | undefined;
3219
+ epoch_counter?: number | undefined;
3220
+ health_summary?: string | Record<string, unknown> | undefined;
3221
+ } | undefined;
3222
+ }, {
3223
+ tenant_id: string;
3224
+ signal_version: string;
3225
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
3226
+ signal_payload: {
3227
+ value?: number | null | undefined;
3228
+ metric_name?: string | null | undefined;
3229
+ baseline?: number | null | undefined;
3230
+ window_seconds?: number | null | undefined;
3231
+ error_rate?: number | undefined;
3232
+ baseline_error_rate?: number | null | undefined;
3233
+ unusual_auth_rate?: number | undefined;
3234
+ firmware_hash_changed?: boolean | undefined;
3235
+ expected_hash_match?: boolean | null | undefined;
3236
+ sensor_deviation_score?: number | null | undefined;
3237
+ };
3238
+ principal: {
3239
+ user_id?: string | undefined;
3240
+ account_id?: string | undefined;
3241
+ device_id?: string | undefined;
3242
+ session_id?: string | undefined;
3243
+ model_id?: string | undefined;
3244
+ service_id?: string | undefined;
3245
+ conversation_id?: string | undefined;
3246
+ document_id?: string | undefined;
3247
+ tool_id?: string | undefined;
3248
+ workflow_id?: string | undefined;
3249
+ api_key_id?: string | undefined;
3250
+ };
3251
+ integrity?: {
3252
+ hash?: string | undefined;
3253
+ signature?: string | undefined;
3254
+ } | undefined;
3255
+ timestamp?: string | undefined;
3256
+ confidence_hint?: number | undefined;
3257
+ provenance?: {
3258
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
3259
+ source_id?: string | undefined;
3260
+ epoch_counter?: number | undefined;
3261
+ health_summary?: string | Record<string, unknown> | undefined;
3262
+ } | undefined;
3263
+ }>;
3264
+ /** `signal_type: 'SYSTEM_TELEMETRY'` with metric samples and optional error-rate fractions in `[0, 1]`. */
3265
+ type SystemTelemetrySignalEvent = z.infer<typeof SystemTelemetrySignalSchema>;
3266
+
3267
+ /**
3268
+ * Builds a `RawEventRequest` for a `SYSTEM_TELEMETRY` signal.
3269
+ *
3270
+ * @param event - The `SystemTelemetrySignalEvent` to build a `RawEventRequest` for.
3271
+ * @returns A `RawEventRequest` for a `SYSTEM_TELEMETRY` signal.
3272
+ */
3273
+ declare const createSystemTelemetryEvent: (event: SystemTelemetrySignalEvent) => RawEventRequest;
3274
+
3275
+ declare const ToolCallSignalSchema: z.ZodObject<{
3276
+ tenant_id: z.ZodString;
3277
+ signal_version: z.ZodString;
3278
+ signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT", "SESSION", "PROMPT_INPUT", "CONTEXT_INTEGRITY", "TOOL_CALL", "RAG_RETRIEVAL", "POLICY_EVENT", "USER_FEEDBACK", "WORKFLOW_ACTION", "API_CALL"]>;
3279
+ principal: z.ZodObject<{
3280
+ user_id: z.ZodOptional<z.ZodString>;
3281
+ account_id: z.ZodOptional<z.ZodString>;
3282
+ device_id: z.ZodOptional<z.ZodString>;
3283
+ session_id: z.ZodOptional<z.ZodString>;
3284
+ model_id: z.ZodOptional<z.ZodString>;
3285
+ service_id: z.ZodOptional<z.ZodString>;
3286
+ conversation_id: z.ZodOptional<z.ZodString>;
3287
+ document_id: z.ZodOptional<z.ZodString>;
3288
+ tool_id: z.ZodOptional<z.ZodString>;
3289
+ workflow_id: z.ZodOptional<z.ZodString>;
3290
+ api_key_id: z.ZodOptional<z.ZodString>;
3291
+ }, "strict", z.ZodTypeAny, {
3292
+ user_id?: string | undefined;
3293
+ account_id?: string | undefined;
3294
+ device_id?: string | undefined;
3295
+ session_id?: string | undefined;
3296
+ model_id?: string | undefined;
3297
+ service_id?: string | undefined;
3298
+ conversation_id?: string | undefined;
3299
+ document_id?: string | undefined;
3300
+ tool_id?: string | undefined;
3301
+ workflow_id?: string | undefined;
3302
+ api_key_id?: string | undefined;
3303
+ }, {
3304
+ user_id?: string | undefined;
3305
+ account_id?: string | undefined;
3306
+ device_id?: string | undefined;
3307
+ session_id?: string | undefined;
3308
+ model_id?: string | undefined;
3309
+ service_id?: string | undefined;
3310
+ conversation_id?: string | undefined;
3311
+ document_id?: string | undefined;
3312
+ tool_id?: string | undefined;
3313
+ workflow_id?: string | undefined;
3314
+ api_key_id?: string | undefined;
3315
+ }>;
3316
+ timestamp: z.ZodOptional<z.ZodDefault<z.ZodString>>;
3317
+ confidence_hint: z.ZodOptional<z.ZodNumber>;
3318
+ provenance: z.ZodOptional<z.ZodObject<{
3319
+ mode: z.ZodOptional<z.ZodEnum<["DETERMINISTIC", "EXTERNAL_RNG", "ATTESTED"]>>;
3320
+ source_id: z.ZodOptional<z.ZodString>;
3321
+ epoch_counter: z.ZodOptional<z.ZodNumber>;
3322
+ health_summary: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
3323
+ }, "strip", z.ZodTypeAny, {
3324
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
3325
+ source_id?: string | undefined;
3326
+ epoch_counter?: number | undefined;
3327
+ health_summary?: string | Record<string, unknown> | undefined;
3328
+ }, {
3329
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
3330
+ source_id?: string | undefined;
3331
+ epoch_counter?: number | undefined;
3332
+ health_summary?: string | Record<string, unknown> | undefined;
3333
+ }>>;
3334
+ integrity: z.ZodOptional<z.ZodObject<{
3335
+ hash: z.ZodOptional<z.ZodString>;
3336
+ signature: z.ZodOptional<z.ZodString>;
3337
+ }, "strip", z.ZodTypeAny, {
3338
+ hash?: string | undefined;
3339
+ signature?: string | undefined;
3340
+ }, {
3341
+ hash?: string | undefined;
3342
+ signature?: string | undefined;
3343
+ }>>;
3344
+ } & {
3345
+ signal_payload: z.ZodObject<{
3346
+ tool_name: z.ZodString;
3347
+ tool_category: z.ZodEnum<["RETRIEVAL", "DATABASE", "PAYMENT", "MESSAGING", "CODE_EXECUTION", "FILE", "EXTERNAL_API", "OTHER"]>;
3348
+ action: z.ZodString;
3349
+ authorized: z.ZodNullable<z.ZodBoolean>;
3350
+ safety_critical: z.ZodBoolean;
3351
+ external_side_effect: z.ZodBoolean;
3352
+ tool_call_success: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
3353
+ latency_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3354
+ error_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3355
+ argument_risk_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3356
+ result_size_bytes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3357
+ records_accessed: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3358
+ contains_sensitive_data: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3359
+ action_category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3360
+ method: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3361
+ sensitive_data_involved: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3362
+ contains_phi: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3363
+ sensitive_domain: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3364
+ }, "strip", z.ZodTypeAny, {
3365
+ authorized: boolean | null;
3366
+ external_side_effect: boolean;
3367
+ contains_sensitive_data: boolean;
3368
+ sensitive_domain: boolean;
3369
+ tool_name: string;
3370
+ tool_category: "OTHER" | "RETRIEVAL" | "DATABASE" | "PAYMENT" | "MESSAGING" | "CODE_EXECUTION" | "FILE" | "EXTERNAL_API";
3371
+ action: string;
3372
+ safety_critical: boolean;
3373
+ records_accessed: number;
3374
+ sensitive_data_involved: boolean;
3375
+ contains_phi: boolean;
3376
+ method?: string | null | undefined;
3377
+ latency_ms?: number | null | undefined;
3378
+ tool_call_success?: boolean | null | undefined;
3379
+ error_code?: string | null | undefined;
3380
+ argument_risk_score?: number | null | undefined;
3381
+ result_size_bytes?: number | null | undefined;
3382
+ action_category?: string | null | undefined;
3383
+ }, {
3384
+ authorized: boolean | null;
3385
+ external_side_effect: boolean;
3386
+ tool_name: string;
3387
+ tool_category: "OTHER" | "RETRIEVAL" | "DATABASE" | "PAYMENT" | "MESSAGING" | "CODE_EXECUTION" | "FILE" | "EXTERNAL_API";
3388
+ action: string;
3389
+ safety_critical: boolean;
3390
+ method?: string | null | undefined;
3391
+ contains_sensitive_data?: boolean | undefined;
3392
+ latency_ms?: number | null | undefined;
3393
+ sensitive_domain?: boolean | undefined;
3394
+ tool_call_success?: boolean | null | undefined;
3395
+ error_code?: string | null | undefined;
3396
+ argument_risk_score?: number | null | undefined;
3397
+ result_size_bytes?: number | null | undefined;
3398
+ records_accessed?: number | undefined;
3399
+ action_category?: string | null | undefined;
3400
+ sensitive_data_involved?: boolean | undefined;
3401
+ contains_phi?: boolean | undefined;
3402
+ }>;
3403
+ }, "strip", z.ZodTypeAny, {
3404
+ tenant_id: string;
3405
+ signal_version: string;
3406
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
3407
+ signal_payload: {
3408
+ authorized: boolean | null;
3409
+ external_side_effect: boolean;
3410
+ contains_sensitive_data: boolean;
3411
+ sensitive_domain: boolean;
3412
+ tool_name: string;
3413
+ tool_category: "OTHER" | "RETRIEVAL" | "DATABASE" | "PAYMENT" | "MESSAGING" | "CODE_EXECUTION" | "FILE" | "EXTERNAL_API";
3414
+ action: string;
3415
+ safety_critical: boolean;
3416
+ records_accessed: number;
3417
+ sensitive_data_involved: boolean;
3418
+ contains_phi: boolean;
3419
+ method?: string | null | undefined;
3420
+ latency_ms?: number | null | undefined;
3421
+ tool_call_success?: boolean | null | undefined;
3422
+ error_code?: string | null | undefined;
3423
+ argument_risk_score?: number | null | undefined;
3424
+ result_size_bytes?: number | null | undefined;
3425
+ action_category?: string | null | undefined;
3426
+ };
3427
+ principal: {
3428
+ user_id?: string | undefined;
3429
+ account_id?: string | undefined;
3430
+ device_id?: string | undefined;
3431
+ session_id?: string | undefined;
3432
+ model_id?: string | undefined;
3433
+ service_id?: string | undefined;
3434
+ conversation_id?: string | undefined;
3435
+ document_id?: string | undefined;
3436
+ tool_id?: string | undefined;
3437
+ workflow_id?: string | undefined;
3438
+ api_key_id?: string | undefined;
3439
+ };
3440
+ integrity?: {
3441
+ hash?: string | undefined;
3442
+ signature?: string | undefined;
3443
+ } | undefined;
3444
+ timestamp?: string | undefined;
3445
+ confidence_hint?: number | undefined;
3446
+ provenance?: {
3447
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
3448
+ source_id?: string | undefined;
3449
+ epoch_counter?: number | undefined;
3450
+ health_summary?: string | Record<string, unknown> | undefined;
3451
+ } | undefined;
3452
+ }, {
3453
+ tenant_id: string;
3454
+ signal_version: string;
3455
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
3456
+ signal_payload: {
3457
+ authorized: boolean | null;
3458
+ external_side_effect: boolean;
3459
+ tool_name: string;
3460
+ tool_category: "OTHER" | "RETRIEVAL" | "DATABASE" | "PAYMENT" | "MESSAGING" | "CODE_EXECUTION" | "FILE" | "EXTERNAL_API";
3461
+ action: string;
3462
+ safety_critical: boolean;
3463
+ method?: string | null | undefined;
3464
+ contains_sensitive_data?: boolean | undefined;
3465
+ latency_ms?: number | null | undefined;
3466
+ sensitive_domain?: boolean | undefined;
3467
+ tool_call_success?: boolean | null | undefined;
3468
+ error_code?: string | null | undefined;
3469
+ argument_risk_score?: number | null | undefined;
3470
+ result_size_bytes?: number | null | undefined;
3471
+ records_accessed?: number | undefined;
3472
+ action_category?: string | null | undefined;
3473
+ sensitive_data_involved?: boolean | undefined;
3474
+ contains_phi?: boolean | undefined;
3475
+ };
3476
+ principal: {
3477
+ user_id?: string | undefined;
3478
+ account_id?: string | undefined;
3479
+ device_id?: string | undefined;
3480
+ session_id?: string | undefined;
3481
+ model_id?: string | undefined;
3482
+ service_id?: string | undefined;
3483
+ conversation_id?: string | undefined;
3484
+ document_id?: string | undefined;
3485
+ tool_id?: string | undefined;
3486
+ workflow_id?: string | undefined;
3487
+ api_key_id?: string | undefined;
3488
+ };
3489
+ integrity?: {
3490
+ hash?: string | undefined;
3491
+ signature?: string | undefined;
3492
+ } | undefined;
3493
+ timestamp?: string | undefined;
3494
+ confidence_hint?: number | undefined;
3495
+ provenance?: {
3496
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
3497
+ source_id?: string | undefined;
3498
+ epoch_counter?: number | undefined;
3499
+ health_summary?: string | Record<string, unknown> | undefined;
3500
+ } | undefined;
3501
+ }>;
3502
+ /** `signal_type: 'TOOL_CALL'` with tool invocation metadata. */
3503
+ type ToolCallSignalEvent = z.infer<typeof ToolCallSignalSchema>;
3504
+
3505
+ /**
3506
+ * Builds a `RawEventRequest` for a `TOOL_CALL` signal.
3507
+ *
3508
+ * @param event - The `ToolCallSignalEvent` to build a `RawEventRequest` for.
3509
+ * @returns A `RawEventRequest` for a `TOOL_CALL` signal.
3510
+ */
3511
+ declare const createToolCallEvent: (event: ToolCallSignalEvent) => RawEventRequest;
3512
+
3513
+ declare const TransactionSignalSchema: z.ZodObject<{
3514
+ tenant_id: z.ZodString;
3515
+ signal_version: z.ZodString;
3516
+ signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT", "SESSION", "PROMPT_INPUT", "CONTEXT_INTEGRITY", "TOOL_CALL", "RAG_RETRIEVAL", "POLICY_EVENT", "USER_FEEDBACK", "WORKFLOW_ACTION", "API_CALL"]>;
3517
+ principal: z.ZodObject<{
3518
+ user_id: z.ZodOptional<z.ZodString>;
3519
+ account_id: z.ZodOptional<z.ZodString>;
3520
+ device_id: z.ZodOptional<z.ZodString>;
3521
+ session_id: z.ZodOptional<z.ZodString>;
3522
+ model_id: z.ZodOptional<z.ZodString>;
3523
+ service_id: z.ZodOptional<z.ZodString>;
3524
+ conversation_id: z.ZodOptional<z.ZodString>;
3525
+ document_id: z.ZodOptional<z.ZodString>;
3526
+ tool_id: z.ZodOptional<z.ZodString>;
3527
+ workflow_id: z.ZodOptional<z.ZodString>;
3528
+ api_key_id: z.ZodOptional<z.ZodString>;
3529
+ }, "strict", z.ZodTypeAny, {
3530
+ user_id?: string | undefined;
3531
+ account_id?: string | undefined;
3532
+ device_id?: string | undefined;
3533
+ session_id?: string | undefined;
3534
+ model_id?: string | undefined;
3535
+ service_id?: string | undefined;
3536
+ conversation_id?: string | undefined;
3537
+ document_id?: string | undefined;
3538
+ tool_id?: string | undefined;
3539
+ workflow_id?: string | undefined;
3540
+ api_key_id?: string | undefined;
3541
+ }, {
3542
+ user_id?: string | undefined;
3543
+ account_id?: string | undefined;
3544
+ device_id?: string | undefined;
3545
+ session_id?: string | undefined;
3546
+ model_id?: string | undefined;
3547
+ service_id?: string | undefined;
3548
+ conversation_id?: string | undefined;
3549
+ document_id?: string | undefined;
3550
+ tool_id?: string | undefined;
3551
+ workflow_id?: string | undefined;
3552
+ api_key_id?: string | undefined;
3553
+ }>;
3554
+ timestamp: z.ZodOptional<z.ZodDefault<z.ZodString>>;
3555
+ confidence_hint: z.ZodOptional<z.ZodNumber>;
3556
+ provenance: z.ZodOptional<z.ZodObject<{
3557
+ mode: z.ZodOptional<z.ZodEnum<["DETERMINISTIC", "EXTERNAL_RNG", "ATTESTED"]>>;
3558
+ source_id: z.ZodOptional<z.ZodString>;
3559
+ epoch_counter: z.ZodOptional<z.ZodNumber>;
3560
+ health_summary: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
3561
+ }, "strip", z.ZodTypeAny, {
3562
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
3563
+ source_id?: string | undefined;
3564
+ epoch_counter?: number | undefined;
3565
+ health_summary?: string | Record<string, unknown> | undefined;
3566
+ }, {
3567
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
3568
+ source_id?: string | undefined;
3569
+ epoch_counter?: number | undefined;
3570
+ health_summary?: string | Record<string, unknown> | undefined;
3571
+ }>>;
3572
+ integrity: z.ZodOptional<z.ZodObject<{
3573
+ hash: z.ZodOptional<z.ZodString>;
3574
+ signature: z.ZodOptional<z.ZodString>;
3575
+ }, "strip", z.ZodTypeAny, {
3576
+ hash?: string | undefined;
3577
+ signature?: string | undefined;
3578
+ }, {
3579
+ hash?: string | undefined;
3580
+ signature?: string | undefined;
3581
+ }>>;
3582
+ } & {
3583
+ signal_payload: z.ZodObject<{
3584
+ amount: z.ZodDefault<z.ZodNumber>;
3585
+ amount_minor: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3586
+ amount_usd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3587
+ currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3588
+ merchant_category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3589
+ merchant_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3590
+ channel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3591
+ country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3592
+ velocity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3593
+ external_anomaly_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3594
+ geo_distance: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3595
+ geo_distance_km: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3596
+ records_accessed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3597
+ baseline_records_accessed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3598
+ sensitivity_level: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3599
+ export_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3600
+ bulk_export: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3601
+ contains_phi: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3602
+ control_command: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3603
+ authorized: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
3604
+ safety_critical: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3605
+ }, "strip", z.ZodTypeAny, {
3606
+ safety_critical: boolean;
3607
+ contains_phi: boolean;
3608
+ amount: number;
3609
+ bulk_export: boolean;
3610
+ authorized?: boolean | null | undefined;
3611
+ country?: string | null | undefined;
3612
+ records_accessed?: number | null | undefined;
3613
+ amount_minor?: number | null | undefined;
3614
+ amount_usd?: number | null | undefined;
3615
+ currency?: string | null | undefined;
3616
+ merchant_category?: string | null | undefined;
3617
+ merchant_id?: string | null | undefined;
3618
+ channel?: string | null | undefined;
3619
+ velocity?: number | null | undefined;
3620
+ external_anomaly_score?: number | null | undefined;
3621
+ geo_distance?: number | null | undefined;
3622
+ geo_distance_km?: number | null | undefined;
3623
+ baseline_records_accessed?: number | null | undefined;
3624
+ sensitivity_level?: string | null | undefined;
3625
+ export_count?: number | null | undefined;
3626
+ control_command?: string | null | undefined;
3627
+ }, {
3628
+ authorized?: boolean | null | undefined;
3629
+ country?: string | null | undefined;
3630
+ safety_critical?: boolean | undefined;
3631
+ records_accessed?: number | null | undefined;
3632
+ contains_phi?: boolean | undefined;
3633
+ amount?: number | undefined;
3634
+ amount_minor?: number | null | undefined;
3635
+ amount_usd?: number | null | undefined;
3636
+ currency?: string | null | undefined;
3637
+ merchant_category?: string | null | undefined;
3638
+ merchant_id?: string | null | undefined;
3639
+ channel?: string | null | undefined;
3640
+ velocity?: number | null | undefined;
3641
+ external_anomaly_score?: number | null | undefined;
3642
+ geo_distance?: number | null | undefined;
3643
+ geo_distance_km?: number | null | undefined;
3644
+ baseline_records_accessed?: number | null | undefined;
3645
+ sensitivity_level?: string | null | undefined;
3646
+ export_count?: number | null | undefined;
3647
+ bulk_export?: boolean | undefined;
3648
+ control_command?: string | null | undefined;
3649
+ }>;
3650
+ }, "strip", z.ZodTypeAny, {
3651
+ tenant_id: string;
3652
+ signal_version: string;
3653
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
3654
+ signal_payload: {
3655
+ safety_critical: boolean;
3656
+ contains_phi: boolean;
3657
+ amount: number;
3658
+ bulk_export: boolean;
3659
+ authorized?: boolean | null | undefined;
3660
+ country?: string | null | undefined;
3661
+ records_accessed?: number | null | undefined;
3662
+ amount_minor?: number | null | undefined;
3663
+ amount_usd?: number | null | undefined;
3664
+ currency?: string | null | undefined;
3665
+ merchant_category?: string | null | undefined;
3666
+ merchant_id?: string | null | undefined;
3667
+ channel?: string | null | undefined;
3668
+ velocity?: number | null | undefined;
3669
+ external_anomaly_score?: number | null | undefined;
3670
+ geo_distance?: number | null | undefined;
3671
+ geo_distance_km?: number | null | undefined;
3672
+ baseline_records_accessed?: number | null | undefined;
3673
+ sensitivity_level?: string | null | undefined;
3674
+ export_count?: number | null | undefined;
3675
+ control_command?: string | null | undefined;
3676
+ };
3677
+ principal: {
3678
+ user_id?: string | undefined;
3679
+ account_id?: string | undefined;
3680
+ device_id?: string | undefined;
3681
+ session_id?: string | undefined;
3682
+ model_id?: string | undefined;
3683
+ service_id?: string | undefined;
3684
+ conversation_id?: string | undefined;
3685
+ document_id?: string | undefined;
3686
+ tool_id?: string | undefined;
3687
+ workflow_id?: string | undefined;
3688
+ api_key_id?: string | undefined;
3689
+ };
3690
+ integrity?: {
3691
+ hash?: string | undefined;
3692
+ signature?: string | undefined;
3693
+ } | undefined;
3694
+ timestamp?: string | undefined;
3695
+ confidence_hint?: number | undefined;
3696
+ provenance?: {
3697
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
3698
+ source_id?: string | undefined;
3699
+ epoch_counter?: number | undefined;
3700
+ health_summary?: string | Record<string, unknown> | undefined;
3701
+ } | undefined;
3702
+ }, {
3703
+ tenant_id: string;
3704
+ signal_version: string;
3705
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
3706
+ signal_payload: {
3707
+ authorized?: boolean | null | undefined;
3708
+ country?: string | null | undefined;
3709
+ safety_critical?: boolean | undefined;
3710
+ records_accessed?: number | null | undefined;
3711
+ contains_phi?: boolean | undefined;
3712
+ amount?: number | undefined;
3713
+ amount_minor?: number | null | undefined;
3714
+ amount_usd?: number | null | undefined;
3715
+ currency?: string | null | undefined;
3716
+ merchant_category?: string | null | undefined;
3717
+ merchant_id?: string | null | undefined;
3718
+ channel?: string | null | undefined;
3719
+ velocity?: number | null | undefined;
3720
+ external_anomaly_score?: number | null | undefined;
3721
+ geo_distance?: number | null | undefined;
3722
+ geo_distance_km?: number | null | undefined;
3723
+ baseline_records_accessed?: number | null | undefined;
3724
+ sensitivity_level?: string | null | undefined;
3725
+ export_count?: number | null | undefined;
3726
+ bulk_export?: boolean | undefined;
3727
+ control_command?: string | null | undefined;
3728
+ };
3729
+ principal: {
3730
+ user_id?: string | undefined;
3731
+ account_id?: string | undefined;
3732
+ device_id?: string | undefined;
3733
+ session_id?: string | undefined;
3734
+ model_id?: string | undefined;
3735
+ service_id?: string | undefined;
3736
+ conversation_id?: string | undefined;
3737
+ document_id?: string | undefined;
3738
+ tool_id?: string | undefined;
3739
+ workflow_id?: string | undefined;
3740
+ api_key_id?: string | undefined;
3741
+ };
3742
+ integrity?: {
3743
+ hash?: string | undefined;
3744
+ signature?: string | undefined;
3745
+ } | undefined;
3746
+ timestamp?: string | undefined;
3747
+ confidence_hint?: number | undefined;
3748
+ provenance?: {
3749
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
3750
+ source_id?: string | undefined;
3751
+ epoch_counter?: number | undefined;
3752
+ health_summary?: string | Record<string, unknown> | undefined;
3753
+ } | undefined;
3754
+ }>;
3755
+ /** `signal_type: 'TRANSACTION'` with typed `signal_payload`. */
3756
+ type TransactionSignalEvent = z.infer<typeof TransactionSignalSchema>;
3757
+
3758
+ /**
3759
+ * Builds a `RawEventRequest` for a `TRANSACTION` signal.
3760
+ *
3761
+ * @param event - The `TransactionSignalEvent` to build a `RawEventRequest` for.
3762
+ * @returns A `RawEventRequest` for a `TRANSACTION` signal.
3763
+ */
3764
+ declare const createTransactionEvent: (event: TransactionSignalEvent) => RawEventRequest;
3765
+
3766
+ declare const UserFeedbackSignalSchema: z.ZodObject<{
3767
+ tenant_id: z.ZodString;
3768
+ signal_version: z.ZodString;
3769
+ signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT", "SESSION", "PROMPT_INPUT", "CONTEXT_INTEGRITY", "TOOL_CALL", "RAG_RETRIEVAL", "POLICY_EVENT", "USER_FEEDBACK", "WORKFLOW_ACTION", "API_CALL"]>;
3770
+ principal: z.ZodObject<{
3771
+ user_id: z.ZodOptional<z.ZodString>;
3772
+ account_id: z.ZodOptional<z.ZodString>;
3773
+ device_id: z.ZodOptional<z.ZodString>;
3774
+ session_id: z.ZodOptional<z.ZodString>;
3775
+ model_id: z.ZodOptional<z.ZodString>;
3776
+ service_id: z.ZodOptional<z.ZodString>;
3777
+ conversation_id: z.ZodOptional<z.ZodString>;
3778
+ document_id: z.ZodOptional<z.ZodString>;
3779
+ tool_id: z.ZodOptional<z.ZodString>;
3780
+ workflow_id: z.ZodOptional<z.ZodString>;
3781
+ api_key_id: z.ZodOptional<z.ZodString>;
3782
+ }, "strict", z.ZodTypeAny, {
3783
+ user_id?: string | undefined;
3784
+ account_id?: string | undefined;
3785
+ device_id?: string | undefined;
3786
+ session_id?: string | undefined;
3787
+ model_id?: string | undefined;
3788
+ service_id?: string | undefined;
3789
+ conversation_id?: string | undefined;
3790
+ document_id?: string | undefined;
3791
+ tool_id?: string | undefined;
3792
+ workflow_id?: string | undefined;
3793
+ api_key_id?: string | undefined;
3794
+ }, {
3795
+ user_id?: string | undefined;
3796
+ account_id?: string | undefined;
3797
+ device_id?: string | undefined;
3798
+ session_id?: string | undefined;
3799
+ model_id?: string | undefined;
3800
+ service_id?: string | undefined;
3801
+ conversation_id?: string | undefined;
3802
+ document_id?: string | undefined;
3803
+ tool_id?: string | undefined;
3804
+ workflow_id?: string | undefined;
3805
+ api_key_id?: string | undefined;
3806
+ }>;
3807
+ timestamp: z.ZodOptional<z.ZodDefault<z.ZodString>>;
3808
+ confidence_hint: z.ZodOptional<z.ZodNumber>;
3809
+ provenance: z.ZodOptional<z.ZodObject<{
3810
+ mode: z.ZodOptional<z.ZodEnum<["DETERMINISTIC", "EXTERNAL_RNG", "ATTESTED"]>>;
3811
+ source_id: z.ZodOptional<z.ZodString>;
3812
+ epoch_counter: z.ZodOptional<z.ZodNumber>;
3813
+ health_summary: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
3814
+ }, "strip", z.ZodTypeAny, {
3815
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
3816
+ source_id?: string | undefined;
3817
+ epoch_counter?: number | undefined;
3818
+ health_summary?: string | Record<string, unknown> | undefined;
3819
+ }, {
3820
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
3821
+ source_id?: string | undefined;
3822
+ epoch_counter?: number | undefined;
3823
+ health_summary?: string | Record<string, unknown> | undefined;
3824
+ }>>;
3825
+ integrity: z.ZodOptional<z.ZodObject<{
3826
+ hash: z.ZodOptional<z.ZodString>;
3827
+ signature: z.ZodOptional<z.ZodString>;
3828
+ }, "strip", z.ZodTypeAny, {
3829
+ hash?: string | undefined;
3830
+ signature?: string | undefined;
3831
+ }, {
3832
+ hash?: string | undefined;
3833
+ signature?: string | undefined;
3834
+ }>>;
3835
+ } & {
3836
+ signal_payload: z.ZodObject<{
3837
+ feedback_type: z.ZodEnum<["THUMBS_UP", "THUMBS_DOWN", "REPORT", "CORRECTION", "RATING"]>;
3838
+ rating: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3839
+ reported_issue: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3840
+ issue_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<["HALLUCINATION", "UNSAFE", "IRRELEVANT", "PRIVACY", "OFFENSIVE", "OTHER"]>>>;
3841
+ severity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3842
+ response_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3843
+ user_comment_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3844
+ }, "strip", z.ZodTypeAny, {
3845
+ feedback_type: "THUMBS_UP" | "THUMBS_DOWN" | "REPORT" | "CORRECTION" | "RATING";
3846
+ reported_issue: boolean;
3847
+ severity?: number | null | undefined;
3848
+ rating?: number | null | undefined;
3849
+ issue_type?: "PRIVACY" | "OTHER" | "HALLUCINATION" | "UNSAFE" | "IRRELEVANT" | "OFFENSIVE" | null | undefined;
3850
+ response_id?: string | null | undefined;
3851
+ user_comment_hash?: string | null | undefined;
3852
+ }, {
3853
+ feedback_type: "THUMBS_UP" | "THUMBS_DOWN" | "REPORT" | "CORRECTION" | "RATING";
3854
+ severity?: number | null | undefined;
3855
+ rating?: number | null | undefined;
3856
+ reported_issue?: boolean | undefined;
3857
+ issue_type?: "PRIVACY" | "OTHER" | "HALLUCINATION" | "UNSAFE" | "IRRELEVANT" | "OFFENSIVE" | null | undefined;
3858
+ response_id?: string | null | undefined;
3859
+ user_comment_hash?: string | null | undefined;
3860
+ }>;
3861
+ }, "strip", z.ZodTypeAny, {
3862
+ tenant_id: string;
3863
+ signal_version: string;
3864
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
3865
+ signal_payload: {
3866
+ feedback_type: "THUMBS_UP" | "THUMBS_DOWN" | "REPORT" | "CORRECTION" | "RATING";
3867
+ reported_issue: boolean;
3868
+ severity?: number | null | undefined;
3869
+ rating?: number | null | undefined;
3870
+ issue_type?: "PRIVACY" | "OTHER" | "HALLUCINATION" | "UNSAFE" | "IRRELEVANT" | "OFFENSIVE" | null | undefined;
3871
+ response_id?: string | null | undefined;
3872
+ user_comment_hash?: string | null | undefined;
3873
+ };
3874
+ principal: {
3875
+ user_id?: string | undefined;
3876
+ account_id?: string | undefined;
3877
+ device_id?: string | undefined;
3878
+ session_id?: string | undefined;
3879
+ model_id?: string | undefined;
3880
+ service_id?: string | undefined;
3881
+ conversation_id?: string | undefined;
3882
+ document_id?: string | undefined;
3883
+ tool_id?: string | undefined;
3884
+ workflow_id?: string | undefined;
3885
+ api_key_id?: string | undefined;
3886
+ };
3887
+ integrity?: {
3888
+ hash?: string | undefined;
3889
+ signature?: string | undefined;
3890
+ } | undefined;
3891
+ timestamp?: string | undefined;
3892
+ confidence_hint?: number | undefined;
3893
+ provenance?: {
3894
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
3895
+ source_id?: string | undefined;
3896
+ epoch_counter?: number | undefined;
3897
+ health_summary?: string | Record<string, unknown> | undefined;
3898
+ } | undefined;
3899
+ }, {
3900
+ tenant_id: string;
3901
+ signal_version: string;
3902
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
3903
+ signal_payload: {
3904
+ feedback_type: "THUMBS_UP" | "THUMBS_DOWN" | "REPORT" | "CORRECTION" | "RATING";
3905
+ severity?: number | null | undefined;
3906
+ rating?: number | null | undefined;
3907
+ reported_issue?: boolean | undefined;
3908
+ issue_type?: "PRIVACY" | "OTHER" | "HALLUCINATION" | "UNSAFE" | "IRRELEVANT" | "OFFENSIVE" | null | undefined;
3909
+ response_id?: string | null | undefined;
3910
+ user_comment_hash?: string | null | undefined;
3911
+ };
3912
+ principal: {
3913
+ user_id?: string | undefined;
3914
+ account_id?: string | undefined;
3915
+ device_id?: string | undefined;
3916
+ session_id?: string | undefined;
3917
+ model_id?: string | undefined;
3918
+ service_id?: string | undefined;
3919
+ conversation_id?: string | undefined;
3920
+ document_id?: string | undefined;
3921
+ tool_id?: string | undefined;
3922
+ workflow_id?: string | undefined;
3923
+ api_key_id?: string | undefined;
3924
+ };
3925
+ integrity?: {
3926
+ hash?: string | undefined;
3927
+ signature?: string | undefined;
3928
+ } | undefined;
3929
+ timestamp?: string | undefined;
3930
+ confidence_hint?: number | undefined;
3931
+ provenance?: {
3932
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
3933
+ source_id?: string | undefined;
3934
+ epoch_counter?: number | undefined;
3935
+ health_summary?: string | Record<string, unknown> | undefined;
3936
+ } | undefined;
3937
+ }>;
3938
+ /** `signal_type: 'USER_FEEDBACK'` with subjective user evaluation metadata. */
3939
+ type UserFeedbackSignalEvent = z.infer<typeof UserFeedbackSignalSchema>;
3940
+
3941
+ /**
3942
+ * Builds a `RawEventRequest` for a `USER_FEEDBACK` signal.
3943
+ *
3944
+ * @param event - The `UserFeedbackSignalEvent` to build a `RawEventRequest` for.
3945
+ * @returns A `RawEventRequest` for a `USER_FEEDBACK` signal.
3946
+ */
3947
+ declare const createUserFeedbackEvent: (event: UserFeedbackSignalEvent) => RawEventRequest;
3948
+
3949
+ declare const WorkflowActionSignalSchema: z.ZodObject<{
3950
+ tenant_id: z.ZodString;
3951
+ signal_version: z.ZodString;
3952
+ signal_type: z.ZodEnum<["TRANSACTION", "AUTH", "BEHAVIOR", "SYSTEM_TELEMETRY", "MODEL_OUTPUT", "ANOMALY_FLAG", "NETWORK_EVENT", "SESSION", "PROMPT_INPUT", "CONTEXT_INTEGRITY", "TOOL_CALL", "RAG_RETRIEVAL", "POLICY_EVENT", "USER_FEEDBACK", "WORKFLOW_ACTION", "API_CALL"]>;
3953
+ principal: z.ZodObject<{
3954
+ user_id: z.ZodOptional<z.ZodString>;
3955
+ account_id: z.ZodOptional<z.ZodString>;
3956
+ device_id: z.ZodOptional<z.ZodString>;
3957
+ session_id: z.ZodOptional<z.ZodString>;
3958
+ model_id: z.ZodOptional<z.ZodString>;
3959
+ service_id: z.ZodOptional<z.ZodString>;
3960
+ conversation_id: z.ZodOptional<z.ZodString>;
3961
+ document_id: z.ZodOptional<z.ZodString>;
3962
+ tool_id: z.ZodOptional<z.ZodString>;
3963
+ workflow_id: z.ZodOptional<z.ZodString>;
3964
+ api_key_id: z.ZodOptional<z.ZodString>;
3965
+ }, "strict", z.ZodTypeAny, {
3966
+ user_id?: string | undefined;
3967
+ account_id?: string | undefined;
3968
+ device_id?: string | undefined;
3969
+ session_id?: string | undefined;
3970
+ model_id?: string | undefined;
3971
+ service_id?: string | undefined;
3972
+ conversation_id?: string | undefined;
3973
+ document_id?: string | undefined;
3974
+ tool_id?: string | undefined;
3975
+ workflow_id?: string | undefined;
3976
+ api_key_id?: string | undefined;
3977
+ }, {
3978
+ user_id?: string | undefined;
3979
+ account_id?: string | undefined;
3980
+ device_id?: string | undefined;
3981
+ session_id?: string | undefined;
3982
+ model_id?: string | undefined;
3983
+ service_id?: string | undefined;
3984
+ conversation_id?: string | undefined;
3985
+ document_id?: string | undefined;
3986
+ tool_id?: string | undefined;
3987
+ workflow_id?: string | undefined;
3988
+ api_key_id?: string | undefined;
3989
+ }>;
3990
+ timestamp: z.ZodOptional<z.ZodDefault<z.ZodString>>;
3991
+ confidence_hint: z.ZodOptional<z.ZodNumber>;
3992
+ provenance: z.ZodOptional<z.ZodObject<{
3993
+ mode: z.ZodOptional<z.ZodEnum<["DETERMINISTIC", "EXTERNAL_RNG", "ATTESTED"]>>;
3994
+ source_id: z.ZodOptional<z.ZodString>;
3995
+ epoch_counter: z.ZodOptional<z.ZodNumber>;
3996
+ health_summary: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
3997
+ }, "strip", z.ZodTypeAny, {
3998
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
3999
+ source_id?: string | undefined;
4000
+ epoch_counter?: number | undefined;
4001
+ health_summary?: string | Record<string, unknown> | undefined;
4002
+ }, {
4003
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
4004
+ source_id?: string | undefined;
4005
+ epoch_counter?: number | undefined;
4006
+ health_summary?: string | Record<string, unknown> | undefined;
4007
+ }>>;
4008
+ integrity: z.ZodOptional<z.ZodObject<{
4009
+ hash: z.ZodOptional<z.ZodString>;
4010
+ signature: z.ZodOptional<z.ZodString>;
4011
+ }, "strip", z.ZodTypeAny, {
4012
+ hash?: string | undefined;
4013
+ signature?: string | undefined;
4014
+ }, {
4015
+ hash?: string | undefined;
4016
+ signature?: string | undefined;
4017
+ }>>;
4018
+ } & {
4019
+ signal_payload: z.ZodObject<{
4020
+ workflow_id: z.ZodString;
4021
+ workflow_type: z.ZodString;
4022
+ action_name: z.ZodString;
4023
+ action_category: z.ZodEnum<["FINANCIAL", "DATA_ACCESS", "COMMUNICATION", "ADMIN", "SECURITY", "CODE", "OTHER"]>;
4024
+ action_stage: z.ZodEnum<["PROPOSED", "PRE_EXECUTION", "EXECUTED", "FAILED", "ROLLED_BACK"]>;
4025
+ actor_type: z.ZodEnum<["USER", "AI_AGENT", "SYSTEM"]>;
4026
+ requires_approval: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
4027
+ approval_present: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
4028
+ external_side_effect: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
4029
+ safety_critical: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
4030
+ amount_usd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4031
+ sensitive_data_involved: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
4032
+ new_counterparty: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
4033
+ is_new_vendor: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
4034
+ is_new_recipient: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
4035
+ is_new_endpoint: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
4036
+ }, "strip", z.ZodTypeAny, {
4037
+ workflow_id: string;
4038
+ action_category: "SECURITY" | "OTHER" | "FINANCIAL" | "DATA_ACCESS" | "COMMUNICATION" | "ADMIN" | "CODE";
4039
+ sensitive_data_involved: boolean;
4040
+ workflow_type: string;
4041
+ action_name: string;
4042
+ action_stage: "PROPOSED" | "PRE_EXECUTION" | "EXECUTED" | "FAILED" | "ROLLED_BACK";
4043
+ actor_type: "USER" | "SYSTEM" | "AI_AGENT";
4044
+ requires_approval: boolean;
4045
+ approval_present: boolean;
4046
+ new_counterparty: boolean;
4047
+ is_new_vendor: boolean;
4048
+ is_new_recipient: boolean;
4049
+ is_new_endpoint: boolean;
4050
+ external_side_effect?: boolean | null | undefined;
4051
+ safety_critical?: boolean | null | undefined;
4052
+ amount_usd?: number | null | undefined;
4053
+ }, {
4054
+ workflow_id: string;
4055
+ action_category: "SECURITY" | "OTHER" | "FINANCIAL" | "DATA_ACCESS" | "COMMUNICATION" | "ADMIN" | "CODE";
4056
+ workflow_type: string;
4057
+ action_name: string;
4058
+ action_stage: "PROPOSED" | "PRE_EXECUTION" | "EXECUTED" | "FAILED" | "ROLLED_BACK";
4059
+ actor_type: "USER" | "SYSTEM" | "AI_AGENT";
4060
+ external_side_effect?: boolean | null | undefined;
4061
+ safety_critical?: boolean | null | undefined;
4062
+ sensitive_data_involved?: boolean | undefined;
4063
+ amount_usd?: number | null | undefined;
4064
+ requires_approval?: boolean | undefined;
4065
+ approval_present?: boolean | undefined;
4066
+ new_counterparty?: boolean | undefined;
4067
+ is_new_vendor?: boolean | undefined;
4068
+ is_new_recipient?: boolean | undefined;
4069
+ is_new_endpoint?: boolean | undefined;
4070
+ }>;
4071
+ }, "strip", z.ZodTypeAny, {
4072
+ tenant_id: string;
4073
+ signal_version: string;
4074
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
4075
+ signal_payload: {
4076
+ workflow_id: string;
4077
+ action_category: "SECURITY" | "OTHER" | "FINANCIAL" | "DATA_ACCESS" | "COMMUNICATION" | "ADMIN" | "CODE";
4078
+ sensitive_data_involved: boolean;
4079
+ workflow_type: string;
4080
+ action_name: string;
4081
+ action_stage: "PROPOSED" | "PRE_EXECUTION" | "EXECUTED" | "FAILED" | "ROLLED_BACK";
4082
+ actor_type: "USER" | "SYSTEM" | "AI_AGENT";
4083
+ requires_approval: boolean;
4084
+ approval_present: boolean;
4085
+ new_counterparty: boolean;
4086
+ is_new_vendor: boolean;
4087
+ is_new_recipient: boolean;
4088
+ is_new_endpoint: boolean;
4089
+ external_side_effect?: boolean | null | undefined;
4090
+ safety_critical?: boolean | null | undefined;
4091
+ amount_usd?: number | null | undefined;
4092
+ };
4093
+ principal: {
4094
+ user_id?: string | undefined;
4095
+ account_id?: string | undefined;
4096
+ device_id?: string | undefined;
4097
+ session_id?: string | undefined;
4098
+ model_id?: string | undefined;
4099
+ service_id?: string | undefined;
4100
+ conversation_id?: string | undefined;
4101
+ document_id?: string | undefined;
4102
+ tool_id?: string | undefined;
4103
+ workflow_id?: string | undefined;
4104
+ api_key_id?: string | undefined;
4105
+ };
4106
+ integrity?: {
4107
+ hash?: string | undefined;
4108
+ signature?: string | undefined;
4109
+ } | undefined;
4110
+ timestamp?: string | undefined;
4111
+ confidence_hint?: number | undefined;
4112
+ provenance?: {
4113
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
4114
+ source_id?: string | undefined;
4115
+ epoch_counter?: number | undefined;
4116
+ health_summary?: string | Record<string, unknown> | undefined;
4117
+ } | undefined;
4118
+ }, {
4119
+ tenant_id: string;
4120
+ signal_version: string;
4121
+ signal_type: "TRANSACTION" | "AUTH" | "BEHAVIOR" | "SYSTEM_TELEMETRY" | "MODEL_OUTPUT" | "ANOMALY_FLAG" | "NETWORK_EVENT" | "SESSION" | "PROMPT_INPUT" | "CONTEXT_INTEGRITY" | "TOOL_CALL" | "RAG_RETRIEVAL" | "POLICY_EVENT" | "USER_FEEDBACK" | "WORKFLOW_ACTION" | "API_CALL";
4122
+ signal_payload: {
4123
+ workflow_id: string;
4124
+ action_category: "SECURITY" | "OTHER" | "FINANCIAL" | "DATA_ACCESS" | "COMMUNICATION" | "ADMIN" | "CODE";
4125
+ workflow_type: string;
4126
+ action_name: string;
4127
+ action_stage: "PROPOSED" | "PRE_EXECUTION" | "EXECUTED" | "FAILED" | "ROLLED_BACK";
4128
+ actor_type: "USER" | "SYSTEM" | "AI_AGENT";
4129
+ external_side_effect?: boolean | null | undefined;
4130
+ safety_critical?: boolean | null | undefined;
4131
+ sensitive_data_involved?: boolean | undefined;
4132
+ amount_usd?: number | null | undefined;
4133
+ requires_approval?: boolean | undefined;
4134
+ approval_present?: boolean | undefined;
4135
+ new_counterparty?: boolean | undefined;
4136
+ is_new_vendor?: boolean | undefined;
4137
+ is_new_recipient?: boolean | undefined;
4138
+ is_new_endpoint?: boolean | undefined;
4139
+ };
4140
+ principal: {
4141
+ user_id?: string | undefined;
4142
+ account_id?: string | undefined;
4143
+ device_id?: string | undefined;
4144
+ session_id?: string | undefined;
4145
+ model_id?: string | undefined;
4146
+ service_id?: string | undefined;
4147
+ conversation_id?: string | undefined;
4148
+ document_id?: string | undefined;
4149
+ tool_id?: string | undefined;
4150
+ workflow_id?: string | undefined;
4151
+ api_key_id?: string | undefined;
4152
+ };
4153
+ integrity?: {
4154
+ hash?: string | undefined;
4155
+ signature?: string | undefined;
4156
+ } | undefined;
4157
+ timestamp?: string | undefined;
4158
+ confidence_hint?: number | undefined;
4159
+ provenance?: {
4160
+ mode?: "DETERMINISTIC" | "EXTERNAL_RNG" | "ATTESTED" | undefined;
4161
+ source_id?: string | undefined;
4162
+ epoch_counter?: number | undefined;
4163
+ health_summary?: string | Record<string, unknown> | undefined;
4164
+ } | undefined;
4165
+ }>;
4166
+ /** `signal_type: 'WORKFLOW_ACTION'` with workflow step metadata. */
4167
+ type WorkflowActionSignalEvent = z.infer<typeof WorkflowActionSignalSchema>;
4168
+
4169
+ /**
4170
+ * Builds a `RawEventRequest` for a `WORKFLOW_ACTION` signal.
4171
+ *
4172
+ * @param event - The `WorkflowActionSignalEvent` to build a `RawEventRequest` for.
4173
+ * @returns A `RawEventRequest` for a `WORKFLOW_ACTION` signal.
4174
+ */
4175
+ declare const createWorkflowActionEvent: (event: WorkflowActionSignalEvent) => RawEventRequest;
2146
4176
 
2147
- export { type APIErrorDetail, API_REGISTRY, type AdvisoryListResponse, type AdvisoryResponse, type AdvisorySeverity, type AdvisoryType, type AnomalyFlagSignalEvent, type AuthSignalEvent, type BaseEvent, type BatchEventResponse, type BehaviorSignalEvent, type EntityType, type EntityTypeLowerCase, type EventAcknowledgement, type EventError, type EventResourceOptions, type ExplainResponse, type ExplanationTrace, type ListAdvisoriesOptions, type ModelOutputSignalEvent, type NetworkSignalEvent, QatiAPIError, QatiAuthError, QatiConfigError, type QatiConfigInput, type QatiConfigOutput, QatiNotFoundError, QatiRateLimitError, QatiSDKError, QatiServerError, type RawEventRequest, RawEventRequestSchema, type RecommendedAction, Session, type SystemTelemetrySignalEvent, type TopContributor, type TransactionSignalEvent, type TrustState, type TrustStateOptions, type VerifyCredentialsResponse, baseUrlFor, createAnomalyFlagEvent, createAuthEvent, createBehaviorEvent, createModelOutputEvent, createNetworkEvent, createSystemTelemetryEvent, createTransactionEvent, parseQatiConfig, resolveQatiConfig };
4177
+ export { type APIErrorDetail, API_REGISTRY, type AdvisoryListResponse, type AdvisoryResponse, type AdvisorySeverity, type AdvisoryType, type AnomalyFlagSignalEvent, type ApiCallSignalEvent, type AuthSignalEvent, type BaseEvent, type BatchEventResponse, type BehaviorSignalEvent, type ContextIntegritySignalEvent, type EntityType, type EntityTypeLowerCase, type EventAcknowledgement, type EventError, type EventResourceOptions, type ExplainResponse, type ExplanationTrace, type ListAdvisoriesOptions, type ModelOutputSignalEvent, type NetworkSignalEvent, type PolicyEventSignalEvent, type PromptInputSignalEvent, QatiAPIError, QatiAuthError, QatiConfigError, type QatiConfigInput, type QatiConfigOutput, QatiNotFoundError, QatiRateLimitError, QatiSDKError, QatiServerError, type RagRetrievalSignalEvent, type RawEventRequest, RawEventRequestSchema, type RecommendedAction, Session, type SessionSignalEvent, type SystemTelemetrySignalEvent, type ToolCallSignalEvent, type TopContributor, type TransactionSignalEvent, type TrustState, type TrustStateOptions, type UserFeedbackSignalEvent, type VerifyCredentialsResponse, type WorkflowActionSignalEvent, baseUrlFor, createAnomalyFlagEvent, createApiCallEvent, createAuthEvent, createBehaviorEvent, createContextIntegrityEvent, createModelOutputEvent, createNetworkEvent, createPolicyEvent, createPromptInputEvent, createRagRetrievalEvent, createSessionEvent, createSystemTelemetryEvent, createToolCallEvent, createTransactionEvent, createUserFeedbackEvent, createWorkflowActionEvent, parseQatiConfig, resolveQatiConfig };