@kosdev-code/kos-ui-sdk 0.1.0-dev.5053 → 0.1.0-dev.5072

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.
Files changed (41) hide show
  1. package/core/core/decorators/index.d.ts +2 -0
  2. package/core/core/decorators/index.d.ts.map +1 -1
  3. package/core/core/decorators/kos-execution-context.d.ts +60 -0
  4. package/core/core/decorators/kos-execution-context.d.ts.map +1 -0
  5. package/core/core/decorators/kos-service-request.d.ts +381 -0
  6. package/core/core/decorators/kos-service-request.d.ts.map +1 -0
  7. package/core/core/decorators/kosTopicHandler.d.ts +33 -5
  8. package/core/core/decorators/kosTopicHandler.d.ts.map +1 -1
  9. package/core/core/kosModel.d.ts +2 -0
  10. package/core/core/kosModel.d.ts.map +1 -1
  11. package/core/core/model/kos-model-component-factory.d.ts +4 -0
  12. package/core/core/model/kos-model-component-factory.d.ts.map +1 -1
  13. package/core/core/model/kos-offline-queue.d.ts +78 -1
  14. package/core/core/model/kos-offline-queue.d.ts.map +1 -1
  15. package/core/core/model/kos-service-request-manager.d.ts +102 -0
  16. package/core/core/model/kos-service-request-manager.d.ts.map +1 -0
  17. package/core/core/model/kos-subscription-manager.d.ts +18 -0
  18. package/core/core/model/kos-subscription-manager.d.ts.map +1 -1
  19. package/core/core/model/model-introspection-utils.d.ts +1 -0
  20. package/core/core/model/model-introspection-utils.d.ts.map +1 -1
  21. package/core/core/model/service-response-store.d.ts +164 -0
  22. package/core/core/model/service-response-store.d.ts.map +1 -0
  23. package/core/types/index.d.ts +1 -0
  24. package/core/types/index.d.ts.map +1 -1
  25. package/core/types/service-response-store.d.ts +152 -0
  26. package/core/types/service-response-store.d.ts.map +1 -0
  27. package/core/util/index.d.ts +1 -0
  28. package/core/util/index.d.ts.map +1 -1
  29. package/core/util/kos-service-request.d.ts +8 -0
  30. package/core/util/kos-service-request.d.ts.map +1 -1
  31. package/core/util/service-response.d.ts +110 -0
  32. package/core/util/service-response.d.ts.map +1 -0
  33. package/index.cjs +77 -77
  34. package/index.cjs.map +1 -1
  35. package/index.js +7721 -6766
  36. package/index.js.map +1 -1
  37. package/models/decorators/future-service.d.ts +7 -0
  38. package/models/decorators/future-service.d.ts.map +1 -1
  39. package/models/utils/service.d.ts +58 -2
  40. package/models/utils/service.d.ts.map +1 -1
  41. package/package.json +2 -2
@@ -1,15 +1,92 @@
1
+ import { ReplayStrategy } from '../../types/service-response-store';
2
+
1
3
  export interface KosOfflineQueueLogger {
2
4
  info: (...args: any[]) => void;
3
5
  warn: (...args: any[]) => void;
4
6
  error: (...args: any[]) => void;
5
7
  debug: (...args: any[]) => void;
6
8
  }
9
+ /**
10
+ * Queued event with temporal metadata
11
+ */
12
+ export interface QueuedEvent {
13
+ /**
14
+ * Event handler function
15
+ */
16
+ handler: () => void;
17
+ /**
18
+ * When this event was received at the framework (timestamp)
19
+ * Used for baseline-delta temporal filtering
20
+ */
21
+ receivedAt: number;
22
+ /**
23
+ * Topic this event was received on (for debugging)
24
+ */
25
+ topic?: string;
26
+ /**
27
+ * Event payload (for debugging)
28
+ */
29
+ payload?: any;
30
+ }
31
+ /**
32
+ * Statistics about queued events
33
+ */
34
+ export interface QueueStatistics {
35
+ /**
36
+ * Total events in queue
37
+ */
38
+ total: number;
39
+ /**
40
+ * Oldest event timestamp
41
+ */
42
+ oldestEventAt?: number;
43
+ /**
44
+ * Newest event timestamp
45
+ */
46
+ newestEventAt?: number;
47
+ /**
48
+ * Events that would be replayed with AFTER_REQUEST strategy
49
+ */
50
+ afterRequest?: number;
51
+ /**
52
+ * Events that would be replayed with AFTER_RESPONSE strategy
53
+ */
54
+ afterResponse?: number;
55
+ }
7
56
  export declare class KosOfflineQueue {
8
57
  private log;
9
58
  private queue;
10
59
  constructor(log: KosOfflineQueueLogger);
11
- enqueue(handler: () => void): void;
60
+ /**
61
+ * Enqueue an event handler with temporal tracking
62
+ *
63
+ * @param handler - Event handler function
64
+ * @param topic - Optional topic for debugging
65
+ * @param payload - Optional payload for debugging
66
+ */
67
+ enqueue(handler: () => void, topic?: string, payload?: any): void;
68
+ /**
69
+ * Flush all queued events (original behavior for backward compatibility)
70
+ */
12
71
  flush(): void;
72
+ /**
73
+ * Flush queued events with temporal filtering strategy
74
+ * Used for baseline-delta race condition handling
75
+ *
76
+ * @param strategy - Replay strategy to use
77
+ * @param baselineRequestedAt - When baseline request was sent (for AFTER_REQUEST)
78
+ * @param baselineReceivedAt - When baseline response received (for AFTER_RESPONSE)
79
+ */
80
+ flushWithStrategy(strategy: ReplayStrategy, baselineRequestedAt?: number, baselineReceivedAt?: number): void;
81
+ /**
82
+ * Filter events based on replay strategy
83
+ * @private
84
+ */
85
+ private filterEventsByStrategy;
86
+ /**
87
+ * Get queue statistics for monitoring
88
+ */
89
+ getStatistics(baselineRequestedAt?: number, baselineReceivedAt?: number): QueueStatistics;
13
90
  clear(): void;
14
91
  get length(): number;
15
92
  get isEmpty(): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"kos-offline-queue.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/model/kos-offline-queue.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAC/B,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAC/B,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAChC,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;CACjC;AAED,qBAAa,eAAe;IAGd,OAAO,CAAC,GAAG;IAFvB,OAAO,CAAC,KAAK,CAAsB;gBAEf,GAAG,EAAE,qBAAqB;IAE9C,OAAO,CAAC,OAAO,EAAE,MAAM,IAAI,GAAG,IAAI;IAIlC,KAAK,IAAI,IAAI;IAgBb,KAAK,IAAI,IAAI;IAIb,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,IAAI,OAAO,IAAI,OAAO,CAErB;CACF"}
1
+ {"version":3,"file":"kos-offline-queue.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/model/kos-offline-queue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEpE,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAC/B,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAC/B,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAChC,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,GAAG,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,qBAAa,eAAe;IAGd,OAAO,CAAC,GAAG;IAFvB,OAAO,CAAC,KAAK,CAAqB;gBAEd,GAAG,EAAE,qBAAqB;IAE9C;;;;;;OAMG;IACH,OAAO,CAAC,OAAO,EAAE,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,IAAI;IASjE;;OAEG;IACH,KAAK,IAAI,IAAI;IAgBb;;;;;;;OAOG;IACH,iBAAiB,CACf,QAAQ,EAAE,cAAc,EACxB,mBAAmB,CAAC,EAAE,MAAM,EAC5B,kBAAkB,CAAC,EAAE,MAAM,GAC1B,IAAI;IAgCP;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAwC9B;;OAEG;IACH,aAAa,CACX,mBAAmB,CAAC,EAAE,MAAM,EAC5B,kBAAkB,CAAC,EAAE,MAAM,GAC1B,eAAe;IA2BlB,KAAK,IAAI,IAAI;IAIb,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,IAAI,OAAO,IAAI,OAAO,CAErB;CACF"}
@@ -0,0 +1,102 @@
1
+ import { ServiceResponseStore } from './service-response-store';
2
+ import { IKosDataModel } from '../kosModel';
3
+ import { DependencyLifecycle } from '../../types';
4
+
5
+ /**
6
+ * Manages lifecycle-driven service requests for KOS models
7
+ *
8
+ * The ServiceRequestManager executes @kosServiceRequest decorated methods
9
+ * during the appropriate lifecycle phase (INIT, LOAD, READY, ACTIVATE).
10
+ *
11
+ * @internal
12
+ */
13
+ export declare class ServiceRequestManager {
14
+ private model;
15
+ private responseStore;
16
+ private handlers;
17
+ constructor(model: IKosDataModel, responseStore: ServiceResponseStore);
18
+ /**
19
+ * Discover and organize service request handlers by lifecycle phase
20
+ */
21
+ private discoverHandlers;
22
+ /**
23
+ * Execute all service requests for a specific lifecycle phase
24
+ *
25
+ * @param lifecycle - The lifecycle phase to execute
26
+ */
27
+ executeForLifecycle(lifecycle: DependencyLifecycle): Promise<void>;
28
+ /**
29
+ * Zone 1: Orchestrates the entire service request flow
30
+ */
31
+ private executeHandler;
32
+ /**
33
+ * Zone 2: Validates request preconditions
34
+ */
35
+ private shouldProcessRequest;
36
+ /**
37
+ * Zone 2: Coordinates request preparation, execution, and timing capture
38
+ */
39
+ private prepareAndExecuteRequest;
40
+ /**
41
+ * Zone 3: Captures request timestamp
42
+ */
43
+ private captureRequestTiming;
44
+ /**
45
+ * Zone 3: Captures response timestamp
46
+ */
47
+ private captureResponseTiming;
48
+ /**
49
+ * Zone 2: Coordinates response processing and storage
50
+ */
51
+ private processAndStoreResponse;
52
+ /**
53
+ * Zone 2: Prepares request parameters by coordinating parameter resolution
54
+ * @internal
55
+ */
56
+ private prepareRequest;
57
+ /**
58
+ * Zone 3: Performs the HTTP request
59
+ * @internal
60
+ */
61
+ private performRequest;
62
+ /**
63
+ * Zone 2: Processes response by coordinating transformations
64
+ * @internal
65
+ */
66
+ private processResponse;
67
+ /**
68
+ * Zone 2: Stores response and invokes handler with cleanup
69
+ * @internal
70
+ */
71
+ private storeAndInvokeHandler;
72
+ /**
73
+ * Trigger queue flush for topic handlers waiting on this baseline
74
+ * @private
75
+ */
76
+ private triggerBaselineQueueFlush;
77
+ /**
78
+ * Make HTTP request using existing KOS API client
79
+ */
80
+ private makeRequest;
81
+ /**
82
+ * Zone 2: Applies field mappings to response data by coordinating extraction, transformation, and validation
83
+ */
84
+ private applyMappings;
85
+ /**
86
+ * Get nested value from object using dot notation
87
+ */
88
+ private getNestedValue;
89
+ /**
90
+ * Apply transformation to a value
91
+ */
92
+ private applyTransform;
93
+ /**
94
+ * Handle array iteration and model creation
95
+ */
96
+ private handleIteration;
97
+ /**
98
+ * Handle errors according to configured strategy
99
+ */
100
+ private handleError;
101
+ }
102
+ //# sourceMappingURL=kos-service-request-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kos-service-request-manager.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/model/kos-service-request-manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AASlD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAsJhE;;;;;;;GAOG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,KAAK,CAAgB;IAC7B,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,QAAQ,CAAqD;gBAEzD,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,oBAAoB;IAQrE;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAwBxB;;;;OAIG;IACG,mBAAmB,CAAC,SAAS,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAexE;;OAEG;YACW,cAAc;IAgB5B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAQ5B;;OAEG;YACW,wBAAwB;IAetC;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAI5B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAI7B;;OAEG;YACW,uBAAuB;IAkCrC;;;OAGG;IACH,OAAO,CAAC,cAAc;IAgBtB;;;OAGG;YACW,cAAc;IAkB5B;;;OAGG;YACW,eAAe;IAwB7B;;;OAGG;YACW,qBAAqB;IAiCnC;;;OAGG;IACH,OAAO,CAAC,yBAAyB;IAcjC;;OAEG;YACW,WAAW;IA2BzB;;OAEG;IACH,OAAO,CAAC,aAAa;IAoCrB;;OAEG;IACH,OAAO,CAAC,cAAc;IAItB;;OAEG;IACH,OAAO,CAAC,cAAc;IA0BtB;;OAEG;YACW,eAAe;IA4D7B;;OAEG;YACW,WAAW;CA0C1B"}
@@ -10,6 +10,7 @@ export declare class KosSubscriptionManager {
10
10
  private disposers;
11
11
  private activatableDisposers;
12
12
  private flowControllers;
13
+ private baselineDependencies;
13
14
  constructor(model: IKosModel, modelData: IKosDataModel, modelId: string, offlineQueue: KosOfflineQueue, log: KosOfflineQueueLogger);
14
15
  registerAll(lifecycle?: string): void;
15
16
  deactivate(): void;
@@ -27,5 +28,22 @@ export declare class KosSubscriptionManager {
27
28
  * Get flow control statistics for monitoring
28
29
  */
29
30
  getFlowControlStats(): Record<string, any>;
31
+ /**
32
+ * Get ServiceResponseStore from model
33
+ * @private
34
+ */
35
+ private getResponseStore;
36
+ /**
37
+ * Check if baseline is ready for a topic handler
38
+ * @private
39
+ */
40
+ private isBaselineReady;
41
+ /**
42
+ * Trigger smart queue flush with baseline temporal filtering
43
+ * Called after baseline loads to replay queued events
44
+ *
45
+ * @param topic - Topic that had baseline dependency
46
+ */
47
+ flushQueueForBaseline(topic: string): void;
30
48
  }
31
49
  //# sourceMappingURL=kos-subscription-manager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"kos-subscription-manager.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/model/kos-subscription-manager.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACtB,MAAM,qBAAqB,CAAC;AAG7B,qBAAa,sBAAsB;IAM/B,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,GAAG;IATb,OAAO,CAAC,SAAS,CAAsB;IACvC,OAAO,CAAC,oBAAoB,CAAsB;IAClD,OAAO,CAAC,eAAe,CAAyC;gBAGtD,KAAK,EAAE,SAAS,EAChB,SAAS,EAAE,aAAa,EACxB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,eAAe,EAC7B,GAAG,EAAE,qBAAqB;IAGpC,WAAW,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;IAmCrC,UAAU,IAAI,IAAI;IAalB,UAAU,IAAI,IAAI;IAuBlB,OAAO,CAAC,SAAS;IA8BjB,OAAO,CAAC,aAAa;IA+DrB,OAAO,CAAC,sBAAsB;IAkB9B,OAAO,CAAC,uBAAuB;IA6B/B,OAAO,CAAC,cAAc;YAgBR,wBAAwB;YAmCxB,mBAAmB;IA0DjC,OAAO,CAAC,wBAAwB;YAqClB,YAAY;IAoB1B;;OAEG;IACI,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CASlD"}
1
+ {"version":3,"file":"kos-subscription-manager.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/model/kos-subscription-manager.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACtB,MAAM,qBAAqB,CAAC;AAG7B,qBAAa,sBAAsB;IAO/B,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,GAAG;IAVb,OAAO,CAAC,SAAS,CAAsB;IACvC,OAAO,CAAC,oBAAoB,CAAsB;IAClD,OAAO,CAAC,eAAe,CAAyC;IAChE,OAAO,CAAC,oBAAoB,CAAyC;gBAG3D,KAAK,EAAE,SAAS,EAChB,SAAS,EAAE,aAAa,EACxB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,eAAe,EAC7B,GAAG,EAAE,qBAAqB;IAGpC,WAAW,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;IA2CrC,UAAU,IAAI,IAAI;IAalB,UAAU,IAAI,IAAI;IAuBlB,OAAO,CAAC,SAAS;IA8BjB,OAAO,CAAC,aAAa;IAwErB,OAAO,CAAC,sBAAsB;IAkB9B,OAAO,CAAC,uBAAuB;IA6B/B,OAAO,CAAC,cAAc;YAgBR,wBAAwB;YAsCxB,mBAAmB;IA+DjC,OAAO,CAAC,wBAAwB;YAyDlB,YAAY;IA+B1B;;OAEG;IACI,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAYjD;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAIxB;;;OAGG;IACH,OAAO,CAAC,eAAe;IAkBvB;;;;;OAKG;IACI,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;CA0ClD"}
@@ -3,4 +3,5 @@ import { IKosDataModel } from '../kosModel';
3
3
  export declare function hasModelEffects(modelData: IKosDataModel): boolean;
4
4
  export declare function hasSubscriptionHandlers(modelData: IKosDataModel): boolean;
5
5
  export declare function hasHttpRouteHandlers(modelData: IKosDataModel): boolean;
6
+ export declare function hasServiceRequestHandlers(modelData: IKosDataModel): boolean;
6
7
  //# sourceMappingURL=model-introspection-utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model-introspection-utils.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/model/model-introspection-utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,wBAAgB,eAAe,CAAC,SAAS,EAAE,aAAa,GAAG,OAAO,CAKjE;AAED,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,aAAa,GAAG,OAAO,CAKzE;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,aAAa,GAAG,OAAO,CAKtE"}
1
+ {"version":3,"file":"model-introspection-utils.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/model/model-introspection-utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,wBAAgB,eAAe,CAAC,SAAS,EAAE,aAAa,GAAG,OAAO,CAKjE;AAED,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,aAAa,GAAG,OAAO,CAKzE;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,aAAa,GAAG,OAAO,CAItE;AAED,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,aAAa,GAAG,OAAO,CAM3E"}
@@ -0,0 +1,164 @@
1
+ import { ResponseCacheConfig } from '../../types/service-response-store';
2
+
3
+ /**
4
+ * ServiceResponseStore manages keyed storage of service responses with flexible retention policies.
5
+ *
6
+ * Responses are stored by `{method}:{path}` key (e.g., 'GET:/api/ingredients')
7
+ * and can be configured with different retention policies to control caching behavior.
8
+ *
9
+ * @example
10
+ * const store = new ServiceResponseStore();
11
+ *
12
+ * // Store with TTL (replaces on each request)
13
+ * store.set('GET:/api/status', statusData, {
14
+ * retention: ResponseRetention.TTL,
15
+ * ttl: 5 * 60 * 1000
16
+ * });
17
+ *
18
+ * // Store with TTL extension (keeps existing data, extends TTL)
19
+ * const stored = store.set('GET:/api/expensive', expensiveData, {
20
+ * retention: ResponseRetention.TTL,
21
+ * ttl: 5 * 60 * 1000,
22
+ * extendOnRefresh: true
23
+ * });
24
+ * // stored === false if cache was extended, true if new data stored
25
+ *
26
+ * // Retrieve
27
+ * const status = store.get('GET:/api/status');
28
+ */
29
+ export declare class ServiceResponseStore {
30
+ private responses;
31
+ private retentionPolicies;
32
+ private cleanupTimers;
33
+ /**
34
+ * Store a response with retention policy
35
+ *
36
+ * @param key - Storage key (typically `{method}:{path}`)
37
+ * @param response - Response data to cache
38
+ * @param config - Caching configuration (defaults to SINGLE retention)
39
+ * @param requestedAt - When the request was sent (for temporal tracking)
40
+ * @param receivedAt - When the response was received (for temporal tracking)
41
+ * @returns true if response was stored, false if refresh extended existing TTL
42
+ */
43
+ set<T>(key: string, response: T, config?: ResponseCacheConfig, requestedAt?: number, receivedAt?: number): boolean;
44
+ /**
45
+ * Get response if not expired
46
+ *
47
+ * @param key - Storage key
48
+ * @returns Response data or undefined if not found/expired
49
+ */
50
+ get<T = any>(key: string): T | undefined;
51
+ /**
52
+ * Get response by path and method
53
+ *
54
+ * @param path - API path
55
+ * @param method - HTTP method (defaults to 'get')
56
+ * @returns Response data or undefined if not found/expired
57
+ */
58
+ getByPath<T = any>(path: string, method?: string): T | undefined;
59
+ /**
60
+ * Check if response exists and is not expired
61
+ *
62
+ * @param key - Storage key
63
+ * @returns true if valid response exists
64
+ */
65
+ has(key: string): boolean;
66
+ /**
67
+ * Manually delete a response
68
+ *
69
+ * @param key - Storage key
70
+ */
71
+ delete(key: string): void;
72
+ /**
73
+ * Clear all responses for a path (all methods)
74
+ *
75
+ * @param path - API path to clear
76
+ */
77
+ clearPath(path: string): void;
78
+ /**
79
+ * Clear all responses
80
+ */
81
+ clear(): void;
82
+ /**
83
+ * Get count of cached responses
84
+ */
85
+ get size(): number;
86
+ /**
87
+ * Check if a response should be cleaned up after handler completes
88
+ *
89
+ * @param key - Storage key
90
+ * @returns true if response has IMMEDIATE retention policy
91
+ */
92
+ shouldCleanupAfterHandler(key: string): boolean;
93
+ /**
94
+ * Zone 2: Evaluates if TTL should be extended instead of replacing data
95
+ */
96
+ private shouldExtendTTL;
97
+ /**
98
+ * Extend TTL for existing cached response
99
+ */
100
+ private extendExistingTTL;
101
+ /**
102
+ * Zone 3: Reset cleanup timer for a cached response
103
+ */
104
+ private resetCleanupTimer;
105
+ /**
106
+ * Clear cleanup timer if it exists
107
+ */
108
+ private clearTimerIfExists;
109
+ /**
110
+ * Create cached response object with metadata
111
+ */
112
+ private createCachedResponse;
113
+ /**
114
+ * Calculate expiration timestamp based on config
115
+ */
116
+ private calculateExpiresAt;
117
+ /**
118
+ * Store response with retention policy
119
+ */
120
+ private storeResponse;
121
+ /**
122
+ * Zone 2: Configures retention policy for a stored response
123
+ */
124
+ private applyRetentionPolicy;
125
+ /**
126
+ * Make storage key from path and method
127
+ */
128
+ private makeKey;
129
+ /**
130
+ * Extract path from storage key
131
+ */
132
+ private extractPath;
133
+ /**
134
+ * Extract method from storage key
135
+ */
136
+ private extractMethod;
137
+ /**
138
+ * Get temporal metadata for a cached response
139
+ * Used for baseline-delta race condition handling
140
+ *
141
+ * @param key - Storage key
142
+ * @returns Temporal metadata or undefined if not found
143
+ */
144
+ getTemporalMetadata(key: string): {
145
+ requestedAt: number;
146
+ receivedAt: number;
147
+ } | undefined;
148
+ /**
149
+ * Get temporal metadata by path and method
150
+ *
151
+ * @param path - API path
152
+ * @param method - HTTP method (defaults to 'get')
153
+ * @returns Temporal metadata or undefined if not found
154
+ */
155
+ getTemporalMetadataByPath(path: string, method?: string): {
156
+ requestedAt: number;
157
+ receivedAt: number;
158
+ } | undefined;
159
+ /**
160
+ * Cleanup expired responses (called periodically if needed)
161
+ */
162
+ cleanup(): void;
163
+ }
164
+ //# sourceMappingURL=service-response-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-response-store.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/model/service-response-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,mBAAmB,EAEpB,MAAM,oCAAoC,CAAC;AAmD5C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,SAAS,CAAqC;IACtD,OAAO,CAAC,iBAAiB,CAA0C;IACnE,OAAO,CAAC,aAAa,CAAqC;IAE1D;;;;;;;;;OASG;IACH,GAAG,CAAC,CAAC,EACH,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,CAAC,EACX,MAAM,GAAE,mBAA6D,EACrE,WAAW,SAAa,EACxB,UAAU,SAAa,GACtB,OAAO;IAiBV;;;;;OAKG;IACH,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAcxC;;;;;;OAMG;IACH,SAAS,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,SAAQ,GAAG,CAAC,GAAG,SAAS;IAI/D;;;;;OAKG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIzB;;;;OAIG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAWzB;;;;OAIG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAQ7B;;OAEG;IACH,KAAK,IAAI,IAAI;IAOb;;OAEG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;;;;OAKG;IACH,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAK/C;;OAEG;IACH,OAAO,CAAC,eAAe;IAevB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAMzB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAKzB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAQ1B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAkB5B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAM1B;;OAEG;IACH,OAAO,CAAC,aAAa;IAUrB;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAiC5B;;OAEG;IACH,OAAO,CAAC,OAAO;IAIf;;OAEG;IACH,OAAO,CAAC,WAAW;IAInB;;OAEG;IACH,OAAO,CAAC,aAAa;IAIrB;;;;;;OAMG;IACH,mBAAmB,CACjB,GAAG,EAAE,MAAM,GACV;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS;IAU1D;;;;;;OAMG;IACH,yBAAyB,CACvB,IAAI,EAAE,MAAM,EACZ,MAAM,SAAQ,GACb;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS;IAI1D;;OAEG;IACH,OAAO,IAAI,IAAI;CAQhB"}
@@ -1,4 +1,5 @@
1
1
  export * from './model';
2
2
  export * from './utils/kos-fetch';
3
3
  export * from './kos-dependency';
4
+ export * from './service-response-store';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,152 @@
1
+ /**
2
+ * Response retention policies for ServiceResponseStore
3
+ * Controls how long service responses are cached and when they're cleaned up
4
+ */
5
+ export declare enum ResponseRetention {
6
+ /**
7
+ * Clear immediately after handler completes
8
+ * Use for one-time operations with no caching needs
9
+ *
10
+ * Note: Response remains available during handler execution (including async handlers).
11
+ * Cleanup happens AFTER the handler returns/resolves via ServiceRequestManager.
12
+ */
13
+ IMMEDIATE = "immediate",
14
+ /**
15
+ * Keep until next response for same path
16
+ * Default behavior - previous response replaced on new request
17
+ */
18
+ SINGLE = "single",
19
+ /**
20
+ * Keep for specified duration (ms)
21
+ * Automatic cleanup after TTL expires
22
+ */
23
+ TTL = "ttl",
24
+ /**
25
+ * Keep until model is destroyed
26
+ * Use for data needed throughout model lifetime
27
+ */
28
+ PERMANENT = "permanent",
29
+ /**
30
+ * Keep until explicitly cleared
31
+ * Manual cleanup required via clearServiceResponse()
32
+ */
33
+ MANUAL = "manual"
34
+ }
35
+ /**
36
+ * Configuration for response caching behavior
37
+ */
38
+ export interface ResponseCacheConfig {
39
+ /**
40
+ * Retention policy determining when response is cleaned up
41
+ */
42
+ retention: ResponseRetention;
43
+ /**
44
+ * Time-to-live in milliseconds (required for TTL retention)
45
+ */
46
+ ttl?: number;
47
+ /**
48
+ * For TTL retention: extend TTL instead of replacing data on new request
49
+ *
50
+ * When false (default): New request clears old data and stores new data with fresh TTL
51
+ * When true: If cached data exists and hasn't expired, extend TTL without replacing data
52
+ *
53
+ * Use extendOnRefresh=true to avoid re-running expensive operations when cached data is still valid.
54
+ *
55
+ * @default false
56
+ *
57
+ * @example
58
+ * // Replace on each request (default)
59
+ * cache: { retention: ResponseRetention.TTL, ttl: 5 * 60 * 1000 }
60
+ *
61
+ * @example
62
+ * // Extend TTL on refresh - avoid re-fetching if cache valid
63
+ * cache: { retention: ResponseRetention.TTL, ttl: 5 * 60 * 1000, extendOnRefresh: true }
64
+ */
65
+ extendOnRefresh?: boolean;
66
+ /**
67
+ * Maximum number of responses to cache per path (future use)
68
+ */
69
+ maxSize?: number;
70
+ }
71
+ /**
72
+ * Replay strategy for baseline-delta race condition handling
73
+ * Determines which queued events to replay after baseline loads
74
+ */
75
+ export declare enum ReplayStrategy {
76
+ /**
77
+ * Replay all queued events
78
+ * Use for: State machines, audit trails requiring complete event history
79
+ */
80
+ ALL = "all",
81
+ /**
82
+ * Replay events received at or after baseline request was sent
83
+ * Use for: High-frequency idempotent updates (quantities, sensor readings, status)
84
+ */
85
+ AFTER_REQUEST = "after-request",
86
+ /**
87
+ * Replay events received at or after baseline response was received
88
+ * Use for: Low-frequency config where baseline likely includes recent changes
89
+ */
90
+ AFTER_RESPONSE = "after-response",
91
+ /**
92
+ * Discard all queued events
93
+ * Use for: Baseline is always complete source of truth
94
+ */
95
+ NONE = "none"
96
+ }
97
+ /**
98
+ * Baseline dependency configuration for topic handlers
99
+ */
100
+ export interface BaselineDependency {
101
+ /**
102
+ * API path of the baseline request this handler depends on
103
+ */
104
+ path: string;
105
+ /**
106
+ * HTTP method of the baseline request
107
+ * @default 'get'
108
+ */
109
+ method?: string;
110
+ /**
111
+ * Strategy for replaying queued events after baseline loads
112
+ * @default ReplayStrategy.AFTER_REQUEST
113
+ */
114
+ replayStrategy?: ReplayStrategy;
115
+ }
116
+ /**
117
+ * Cached response with metadata
118
+ */
119
+ export interface CachedResponse<T = unknown> {
120
+ /**
121
+ * The response data
122
+ */
123
+ data: T;
124
+ /**
125
+ * When the response was cached (timestamp)
126
+ * @deprecated Use requestedAt or receivedAt for temporal comparisons
127
+ */
128
+ timestamp: number;
129
+ /**
130
+ * When the HTTP request was sent (timestamp)
131
+ * Used for baseline-delta temporal filtering
132
+ */
133
+ requestedAt: number;
134
+ /**
135
+ * When the HTTP response was received (timestamp)
136
+ * Used for baseline-delta temporal filtering
137
+ */
138
+ receivedAt: number;
139
+ /**
140
+ * The API path this response came from
141
+ */
142
+ path: string;
143
+ /**
144
+ * The HTTP method used
145
+ */
146
+ method: string;
147
+ /**
148
+ * When this response expires (for TTL retention)
149
+ */
150
+ expiresAt?: number;
151
+ }
152
+ //# sourceMappingURL=service-response-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-response-store.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/types/service-response-store.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,iBAAiB;IAC3B;;;;;;OAMG;IACH,SAAS,cAAc;IAEvB;;;OAGG;IACH,MAAM,WAAW;IAEjB;;;OAGG;IACH,GAAG,QAAQ;IAEX;;;OAGG;IACH,SAAS,cAAc;IAEvB;;;OAGG;IACH,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,SAAS,EAAE,iBAAiB,CAAC;IAE7B;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;;;;;;;;;;;;;;OAiBG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,oBAAY,cAAc;IACxB;;;OAGG;IACH,GAAG,QAAQ;IAEX;;;OAGG;IACH,aAAa,kBAAkB;IAE/B;;;OAGG;IACH,cAAc,mBAAmB;IAEjC;;;OAGG;IACH,IAAI,SAAS;CACd;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC,GAAG,OAAO;IACzC;;OAEG;IACH,IAAI,EAAE,CAAC,CAAC;IAER;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -26,6 +26,7 @@ export * from './paired-client-heartbeat';
26
26
  export * from './pipe';
27
27
  export * from './retry-with-exponential-backoff';
28
28
  export * from './service-factory';
29
+ export * from './service-response';
29
30
  export * from './session-utils';
30
31
  export * from './wait-for-request';
31
32
  export * from './when-ready';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,OAAO,KAAK,WAAW,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,QAAQ,CAAC;AACvB,cAAc,kCAAkC,CAAC;AACjD,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,OAAO,KAAK,WAAW,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,QAAQ,CAAC;AACvB,cAAc,kCAAkC,CAAC;AACjD,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC"}
@@ -49,6 +49,14 @@ export type ClientResponse<Paths extends Record<string, any>, K extends keyof Pa
49
49
  };
50
50
  };
51
51
  } ? R[keyof R] : unknown;
52
+ export type ClientParams<Paths extends Record<string, any>, K extends keyof Paths, M extends AvailableMethods<Paths[K]> | string> = Paths[K][M] extends {
53
+ parameters: infer P;
54
+ } ? P : never;
55
+ export type ClientBody<Paths extends Record<string, any>, K extends keyof Paths, M extends AvailableMethods<Paths[K]> | string> = Paths[K][M] extends {
56
+ requestBody: {
57
+ content: infer B;
58
+ };
59
+ } ? B[keyof B] : never;
52
60
  export type ServiceResponse<T> = [string, null] | [null, T];
53
61
  export type DeepRequired<T> = {
54
62
  [K in keyof T]-?: T[K] extends object ? DeepRequired<T[K]> : T[K];
@@ -1 +1 @@
1
- {"version":3,"file":"kos-service-request.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/kos-service-request.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGhD;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;CAI1B,CAAC;AAIF,KAAK,YAAY,CAAC,CAAC,IAAI;KACpB,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,CAAC;CAC7D,CAAC,MAAM,CAAC,CAAC,CAAC;AAEX,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,OAAO,CACvC,YAAY,CAAC,CAAC,CAAC,EACf,YAAY,GAAG,aAAa,CAC7B,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI;KAC5B,MAAM,IAAI,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG;SAC5C,CAAC,IAAI,MAAM,CAAC,GAAG,MAAM,SAAS,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK;KAClE,CAAC,MAAM,CAA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