@junando/core 0.11.1 → 0.12.1

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.ts CHANGED
@@ -518,13 +518,23 @@ declare class Fingerprint {
518
518
  }
519
519
  //#endregion
520
520
  //#region src/domain/ports/index.d.ts
521
+ /**
522
+ * Structured result of a deduplication check.
523
+ * Feeds the `dedup` section of the wide event.
524
+ */
525
+ interface DedupResult {
526
+ isNew: boolean;
527
+ ttlSeconds: number;
528
+ /** Fail-open error message when the store was unreachable (e.g. Redis down). */
529
+ error?: string;
530
+ }
521
531
  /**
522
532
  * Deduplication store.
523
533
  * Determines whether an alert fingerprint is new within a rolling TTL window.
524
534
  * Implementations: RedisDeduplicationStore, InMemoryDeduplicationStore (tests)
525
535
  */
526
536
  interface IDeduplicationStore {
527
- isNew(fingerprint: string, ttlSeconds: number): Promise<boolean>;
537
+ isNew(fingerprint: string, ttlSeconds: number): Promise<DedupResult>;
528
538
  reset(fingerprint: string): Promise<void>;
529
539
  }
530
540
  /**
@@ -543,13 +553,48 @@ interface IAlertQueue {
543
553
  interface ITraceRepository {
544
554
  findByTraceId(traceId: string): Promise<Record<string, unknown>[]>;
545
555
  }
556
+ /**
557
+ * Structured result of an LLM analysis call.
558
+ * Carries the diagnosis plus the observability metadata that feeds the
559
+ * `llm` section of the wide event (urgency comes from analysis.urgency_level;
560
+ * total tokens = promptTokens + completionTokens).
561
+ */
562
+ interface LLMResult {
563
+ analysis: LLMAnalysis;
564
+ provider: string;
565
+ model: string;
566
+ latencyMs: number;
567
+ promptTokens: number;
568
+ completionTokens: number;
569
+ }
546
570
  /**
547
571
  * LLM provider.
548
572
  * Analyzes an incident cluster and returns a structured diagnosis.
549
573
  * Implementations: GeminiProvider, ClaudeProvider, OpenAIProvider, MockLLMProvider (tests)
550
574
  */
551
575
  interface ILLMProvider {
552
- analyze(cluster: AlertCluster, traces: Record<string, unknown>[]): Promise<LLMAnalysis>;
576
+ analyze(cluster: AlertCluster, traces: Record<string, unknown>[]): Promise<LLMResult>;
577
+ }
578
+ /**
579
+ * Terminal outcome of a single notification send.
580
+ * Feeds the `notify` section of the wide event.
581
+ */
582
+ declare const NotifyOutcome: {
583
+ readonly Success: 'success';
584
+ readonly Failure: 'failure';
585
+ };
586
+ type NotifyOutcome = (typeof NotifyOutcome)[keyof typeof NotifyOutcome];
587
+ /**
588
+ * Structured result of a notification send.
589
+ * Adapters throw on failure (the caller records NotifyOutcome.Failure and
590
+ * rethrows for the queue retry), so a resolved promise always carries
591
+ * outcome=success.
592
+ */
593
+ interface NotifyResult {
594
+ outcome: NotifyOutcome;
595
+ latencyMs: number;
596
+ /** Concrete channels the notification was delivered to. */
597
+ channels: string[];
553
598
  }
554
599
  /**
555
600
  * Notifier.
@@ -564,7 +609,7 @@ interface INotifier {
564
609
  * instead of their default. Backward-compatible — existing call sites
565
610
  * work unchanged.
566
611
  */
567
- send(cluster: AlertCluster, analysis: LLMAnalysis | null, channel?: string): Promise<void>;
612
+ send(cluster: AlertCluster, analysis: LLMAnalysis | null, channel?: string): Promise<NotifyResult>;
568
613
  }
569
614
  /**
570
615
  * Indexer.
@@ -650,8 +695,14 @@ interface Dependencies {
650
695
  declare class ProcessIncidentUseCase {
651
696
  private readonly deps;
652
697
  private readonly clustering;
698
+ private readonly wideEventsEnabled;
653
699
  constructor(deps: Dependencies);
654
700
  execute(alerts: NormalizedAlert[], correlationId: string): Promise<void>;
701
+ /**
702
+ * Flushes the builder into a final event, applies tail sampling, redacts
703
+ * PII, and emits the single canonical log line for the cluster.
704
+ */
705
+ private emit;
655
706
  }
656
707
  //#endregion
657
708
  //#region src/infrastructure/dedup/redis-dedup.adapter.d.ts
@@ -659,12 +710,12 @@ declare class RedisDeduplicationStore implements IDeduplicationStore {
659
710
  private readonly redis;
660
711
  private readonly keyPrefix;
661
712
  constructor(redis: Redis);
662
- isNew(fingerprint: string, ttlSeconds: number): Promise<boolean>;
713
+ isNew(fingerprint: string, ttlSeconds: number): Promise<DedupResult>;
663
714
  reset(fingerprint: string): Promise<void>;
664
715
  }
665
716
  declare class InMemoryDeduplicationStore implements IDeduplicationStore {
666
717
  private readonly store;
667
- isNew(fingerprint: string, ttlSeconds: number): Promise<boolean>;
718
+ isNew(fingerprint: string, ttlSeconds: number): Promise<DedupResult>;
668
719
  reset(fingerprint: string): Promise<void>;
669
720
  clear(): void;
670
721
  }
@@ -710,7 +761,8 @@ declare class GeminiProvider implements ILLMProvider {
710
761
  private readonly model;
711
762
  private readonly breaker;
712
763
  constructor(apiKey: string, model?: string);
713
- analyze(cluster: AlertCluster, traces: Record<string, unknown>[]): Promise<LLMAnalysis>;
764
+ analyze(cluster: AlertCluster, traces: Record<string, unknown>[]): Promise<LLMResult>;
765
+ private analyzeWithBreaker;
714
766
  private analyzeRaw;
715
767
  }
716
768
  /**
@@ -721,7 +773,7 @@ declare class ClaudeProvider implements ILLMProvider {
721
773
  private readonly apiKey;
722
774
  private readonly model;
723
775
  constructor(apiKey: string, model?: string);
724
- analyze(cluster: AlertCluster, traces: Record<string, unknown>[]): Promise<LLMAnalysis>;
776
+ analyze(cluster: AlertCluster, traces: Record<string, unknown>[]): Promise<LLMResult>;
725
777
  }
726
778
  /**
727
779
  * Mock LLM provider for testing and local development.
@@ -731,7 +783,7 @@ declare class MockLLMProvider implements ILLMProvider {
731
783
  readonly callLog: Array<{
732
784
  cluster: AlertCluster;
733
785
  }>;
734
- analyze(cluster: AlertCluster, _traces: Record<string, unknown>[]): Promise<LLMAnalysis>;
786
+ analyze(cluster: AlertCluster, _traces: Record<string, unknown>[]): Promise<LLMResult>;
735
787
  }
736
788
  /**
737
789
  * Options for configuring the OpenRouter fallback chain.
@@ -744,6 +796,12 @@ interface FallbackOptions {
744
796
  declare function createLLMProvider(provider: string, apiKey: string, model?: string, options?: FallbackOptions): ILLMProvider;
745
797
  //#endregion
746
798
  //#region src/shared/config/index.d.ts
799
+ declare enum NodeEnvironment {
800
+ Development = "development",
801
+ Test = "test",
802
+ Staging = "staging",
803
+ Production = "production"
804
+ }
747
805
  declare const ConfigSchema: z.ZodObject<{
748
806
  llmProvider: z.ZodEnum<{
749
807
  claude: "claude";
@@ -773,11 +831,7 @@ declare const ConfigSchema: z.ZodObject<{
773
831
  trace: "trace";
774
832
  warn: "warn";
775
833
  }>>;
776
- nodeEnv: z.ZodDefault<z.ZodEnum<{
777
- development: "development";
778
- production: "production";
779
- test: "test";
780
- }>>;
834
+ nodeEnv: z.ZodDefault<z.ZodEnum<typeof NodeEnvironment>>;
781
835
  llmFallbackModels: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string[], string | undefined>>;
782
836
  llmFallbackTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
783
837
  rulesConfigPath: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
@@ -804,7 +858,7 @@ declare class SlackNotifier implements INotifier {
804
858
  private readonly botToken;
805
859
  private readonly channel;
806
860
  constructor(botToken: string, channel: string);
807
- send(cluster: AlertCluster, analysis: LLMAnalysis | null, _channel?: string): Promise<void>;
861
+ send(cluster: AlertCluster, analysis: LLMAnalysis | null, _channel?: string): Promise<NotifyResult>;
808
862
  private buildAnalysisMessage;
809
863
  private buildFallbackMessage;
810
864
  }
@@ -813,7 +867,7 @@ declare class ConsoleNotifier implements INotifier {
813
867
  cluster: AlertCluster;
814
868
  analysis: LLMAnalysis | null;
815
869
  }>;
816
- send(cluster: AlertCluster, analysis: LLMAnalysis | null, _channel?: string): Promise<void>;
870
+ send(cluster: AlertCluster, analysis: LLMAnalysis | null, _channel?: string): Promise<NotifyResult>;
817
871
  }
818
872
  //#endregion
819
873
  //#region src/infrastructure/notifier/teams.adapter.d.ts
@@ -825,7 +879,7 @@ declare class TeamsNotifier implements INotifier {
825
879
  private readonly timeoutMs;
826
880
  private readonly hostForErrors;
827
881
  constructor(webhookUrl: string, timeoutMs?: number);
828
- send(cluster: AlertCluster, analysis: LLMAnalysis | null, _channel?: string): Promise<void>;
882
+ send(cluster: AlertCluster, analysis: LLMAnalysis | null, _channel?: string): Promise<NotifyResult>;
829
883
  }
830
884
  //#endregion
831
885
  //#region src/infrastructure/rules/channel-registry.d.ts
@@ -863,7 +917,7 @@ declare class RoutingNotifier implements INotifier {
863
917
  * Implements INotifier.send — sends via default notifier.
864
918
  * Backward-compatible with existing call sites that don't use rule actions.
865
919
  */
866
- send(cluster: AlertCluster, analysis: LLMAnalysis | null): Promise<void>;
920
+ send(cluster: AlertCluster, analysis: LLMAnalysis | null): Promise<NotifyResult>;
867
921
  /**
868
922
  * Dispatch notifications based on rule engine actions.
869
923
  *
@@ -1009,5 +1063,5 @@ declare class FactoryRegistry<T> {
1009
1063
  */
1010
1064
  declare function flushLoki(): Promise<void>;
1011
1065
  //#endregion
1012
- export { ALERT_TYPE_LABELS, AlertCluster, AlertClusterSchema, AlertErrorType, AlertStatus, AlertStatusSchema, AlertType, AlertmanagerPayload, AlertmanagerPayloadSchema, CIRCUIT_BREAKER, ChannelRegistry, ClaudeProvider, ClusteringService, type Config, ConsoleNotifier, DEDUP_TTL_MS_MULTIPLIER, DEV_SERVER_PORT, FactoryRegistry, Fingerprint, GeminiProvider, HOUR_MS, HTTP_TIMEOUT_MS, type IAlertQueue, type IDeduplicationStore, type IIndexer, type ILLMProvider, type INotifier, type IRuleEngine, type ITraceRepository, InMemoryAlertQueue, InMemoryDeduplicationStore, InMemoryIndexer, Incident, IncidentSchema, LLMAnalysis, LLMAnalysisSchema, LLMProviderType, LLM_FALLBACK_DEFAULTS, LLM_MAX_TOKENS, LLM_MODELS, type Logger, type LoggerOptions, LokiTraceRepository, MockLLMProvider, MockTraceRepository, NormalizedAlert, NormalizedAlertSchema, type OpenSearchHttpFetcher, type OpenSearchHttpResponse, OpenSearchIndexer, type OpenSearchIndexerDeps, PAYLOAD_DEFAULTS, ProcessIncidentUseCase, RATE_LIMITER, REDIS_KEY_PREFIX, RedisDeduplicationStore, RoutingNotifier, Rule, RuleAction, type RuleActionResult, RuleActionSchema, RuleActionType, RuleCondition, RuleConditionSchema, RuleConfiguration, RuleConfigurationSchema, RuleEngine, RuleEvaluationPhase, RuleSchema, RuleSection, RuleSectionSchema, SLACK_API_URL, SQSAlertQueue, SeverityLevel, type SignedHttpRequest, SlackNotifier, TEAMS_WEBHOOK_TIMEOUT_MS, TeamsNotifier, TeamsNotifierError, type TraceabilityDocument, URGENCY_EMOJI, UrgencyLevel, UrgencyLevelSchema, ValidatedRule, ValidatedRuleAction, ValidatedRuleCondition, ValidatedRuleConfiguration, ValidatedRuleSection, WEBHOOK_DEFAULTS, compileCondition, createLLMProvider, createLogger, createNotifier, dispatchActions, flushLoki, loadConfig, index_d_exports as metrics, normalizePayload, parseRuleConfig, reinitLogger, startSqsLagPoller };
1066
+ export { ALERT_TYPE_LABELS, AlertCluster, AlertClusterSchema, AlertErrorType, AlertStatus, AlertStatusSchema, AlertType, AlertmanagerPayload, AlertmanagerPayloadSchema, CIRCUIT_BREAKER, ChannelRegistry, ClaudeProvider, ClusteringService, type Config, ConsoleNotifier, DEDUP_TTL_MS_MULTIPLIER, DEV_SERVER_PORT, type DedupResult, FactoryRegistry, Fingerprint, GeminiProvider, HOUR_MS, HTTP_TIMEOUT_MS, type IAlertQueue, type IDeduplicationStore, type IIndexer, type ILLMProvider, type INotifier, type IRuleEngine, type ITraceRepository, InMemoryAlertQueue, InMemoryDeduplicationStore, InMemoryIndexer, Incident, IncidentSchema, LLMAnalysis, LLMAnalysisSchema, LLMProviderType, type LLMResult, LLM_FALLBACK_DEFAULTS, LLM_MAX_TOKENS, LLM_MODELS, type Logger, type LoggerOptions, LokiTraceRepository, MockLLMProvider, MockTraceRepository, NormalizedAlert, NormalizedAlertSchema, NotifyOutcome, type NotifyResult, type OpenSearchHttpFetcher, type OpenSearchHttpResponse, OpenSearchIndexer, type OpenSearchIndexerDeps, PAYLOAD_DEFAULTS, ProcessIncidentUseCase, RATE_LIMITER, REDIS_KEY_PREFIX, RedisDeduplicationStore, RoutingNotifier, Rule, RuleAction, type RuleActionResult, RuleActionSchema, RuleActionType, RuleCondition, RuleConditionSchema, RuleConfiguration, RuleConfigurationSchema, RuleEngine, RuleEvaluationPhase, RuleSchema, RuleSection, RuleSectionSchema, SLACK_API_URL, SQSAlertQueue, SeverityLevel, type SignedHttpRequest, SlackNotifier, TEAMS_WEBHOOK_TIMEOUT_MS, TeamsNotifier, TeamsNotifierError, type TraceabilityDocument, URGENCY_EMOJI, UrgencyLevel, UrgencyLevelSchema, ValidatedRule, ValidatedRuleAction, ValidatedRuleCondition, ValidatedRuleConfiguration, ValidatedRuleSection, WEBHOOK_DEFAULTS, compileCondition, createLLMProvider, createLogger, createNotifier, dispatchActions, flushLoki, loadConfig, index_d_exports as metrics, normalizePayload, parseRuleConfig, reinitLogger, startSqsLagPoller };
1013
1067
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/shared/constants.ts","../src/domain/entities/alert.ts","../src/domain/entities/cluster.ts","../src/domain/entities/incident.ts","../src/domain/entities/rule.ts","../src/domain/entities/traceability.ts","../src/domain/value-objects/fingerprint.ts","../src/domain/ports/index.ts","../src/domain/services/clustering.service.ts","../src/application/dtos/normalize-payload.ts","../src/shared/logger/index.ts","../src/application/use-cases/process-incident.use-case.ts","../src/infrastructure/dedup/redis-dedup.adapter.ts","../src/infrastructure/indexer/opensearch.adapter.ts","../src/infrastructure/llm/llm.adapter.ts","../src/shared/config/index.ts","../src/infrastructure/notifier/factory.ts","../src/infrastructure/notifier/slack.adapter.ts","../src/infrastructure/notifier/teams.adapter.ts","../src/infrastructure/rules/channel-registry.ts","../src/infrastructure/notifier/routing-notifier.ts","../src/infrastructure/queue/sqs.adapter.ts","../src/infrastructure/queue/sqs-lag-poller.ts","../src/infrastructure/traces/loki-trace.adapter.ts","../src/infrastructure/rules/yaml-rule-loader.ts","../src/infrastructure/rules/condition-evaluator.ts","../src/infrastructure/rules/action-dispatcher.ts","../src/infrastructure/rules/rule-engine.ts","../src/shared/factory-registry.ts","../src/shared/logger/loki-transport.ts"],"mappings":";;;;;;aAMY;EACV;EACA;EACA;;UAGQ;WACC;WACA;WACA,UAAU,iBAAiB,WAAW;;cAG3C,mBAAmB,OAAO,WAAW;cAmB9B,mBAAmB,gBAAgB;aAIpC;EACV;EACA;EACA;EACA;;cAIW,iBAAe;;;;cAKf,iBAAe;;;;;cAMf;cAGA,cAAY;;;;cAMZ;cAGA;cAGA;cAGA,uBAAqB;;;;cAUrB,YAAU;;;;;cAOV;cAGA;cAEP,eAAe;cAMR,eAAe,gBAAgB;cAG/B;cAGA,kBAAgB;;;;cAKhB,kBAAgB;;;;;;;cC5GhB,mBAAiB,EAAA;;;;cAEjB,uBAAqB,EAAA;;;;;;;;;;;;;;;;cAgBrB,2BAAyB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;KAwB1B,cAAc,EAAE,aAAa;KAC7B,kBAAkB,EAAE,aAAa;KACjC,sBAAsB,EAAE,aAAa;KAGrC,iBAAiB;;;cC9ChB,oBAAkB,EAAA;;;;;;;;;;;;;;;;;KAenB,eAAe,EAAE,aAAa;;;cCtB7B,oBAAkB,EAAA;;;;;;cAGlB,mBAAiB,EAAA;;;;;;;;;;;;cAQjB,gBAAc,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAOf,eAAe,EAAE,aAAa;KAC9B,cAAc,EAAE,aAAa;KAC7B,WAAW,EAAE,aAAa;;;aCf1B;EACV;EACA;EACA;EACA;;aAGU;EACV;EACA;EACA;EACA;;;aAIU;EACV;EACA;;UAOe;EACf;EACA,YAAY;EACZ,WAAW;EACX,SAAS;EACT;EACA;IAAe;IAAc;;EAC7B;IAAiB;IAAc;;;EAE/B,eAAe,EAAE,aAAa;EAC9B;EACA;;cAaW,qBAAmB,EAAA;;;;;;;;;;;;;;;;;;;;;;;KAiBpB;EACN,MAAM,eAAe;;EACrB,MAAM,eAAe;EAAO;;EA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YAAY;EAE7C,cAAc,kBAAkB,QAAQ;EAI9C,WAAW,iBAAiB,OAAO;;;;;;;;;;iBChDrB,gBAAgB,qBAAqB;;;KCLhD,aAAa,SAAS,cAAc,WAAW;;;;;;;;;iBA6FpC,iBAAiB,WAAW,yBAAyB;;;;;;;;;;iBC7DrD,gBAAgB,SAAS,eAAe;;;cCrB3C,sBAAsB;mBAChB;mBACA;EAEjB,YAAY,QAAQ;;;;;;EAUpB,eAAe,SAAS,eAAe;;;;;;EASvC,gBACE,SAAS,cACT,UAAU,cACT;UAMK;UAQA;;;;cCxDG,gBAAgB;mBACV;UACT;;;;;EAQR,SAAS,aAAa,eAAe;;;;EAOrC,gBAAgB,eAAe;;;;;EAQ/B,QAAQ,cAAc;;;;EAWtB,IAAI;;;;EAOJ;;;;;;;;;iBCkDoB,aAAa"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/shared/constants.ts","../src/domain/entities/alert.ts","../src/domain/entities/cluster.ts","../src/domain/entities/incident.ts","../src/domain/entities/rule.ts","../src/domain/entities/traceability.ts","../src/domain/value-objects/fingerprint.ts","../src/domain/ports/index.ts","../src/domain/services/clustering.service.ts","../src/application/dtos/normalize-payload.ts","../src/shared/logger/index.ts","../src/application/use-cases/process-incident.use-case.ts","../src/infrastructure/dedup/redis-dedup.adapter.ts","../src/infrastructure/indexer/opensearch.adapter.ts","../src/infrastructure/llm/llm.adapter.ts","../src/shared/config/index.ts","../src/infrastructure/notifier/factory.ts","../src/infrastructure/notifier/slack.adapter.ts","../src/infrastructure/notifier/teams.adapter.ts","../src/infrastructure/rules/channel-registry.ts","../src/infrastructure/notifier/routing-notifier.ts","../src/infrastructure/queue/sqs.adapter.ts","../src/infrastructure/queue/sqs-lag-poller.ts","../src/infrastructure/traces/loki-trace.adapter.ts","../src/infrastructure/rules/yaml-rule-loader.ts","../src/infrastructure/rules/condition-evaluator.ts","../src/infrastructure/rules/action-dispatcher.ts","../src/infrastructure/rules/rule-engine.ts","../src/shared/factory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