@memberjunction/server 6.1.0-edge.2 → 6.1.0-edge.3

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 (162) hide show
  1. package/LICENSE +180 -4
  2. package/dist/auth/AuthProviderCatalogRouter.d.ts +31 -0
  3. package/dist/auth/AuthProviderCatalogRouter.d.ts.map +1 -0
  4. package/dist/auth/AuthProviderCatalogRouter.js +69 -0
  5. package/dist/auth/AuthProviderCatalogRouter.js.map +1 -0
  6. package/dist/auth/AuthProviderEngine.d.ts +96 -0
  7. package/dist/auth/AuthProviderEngine.d.ts.map +1 -0
  8. package/dist/auth/AuthProviderEngine.js +245 -0
  9. package/dist/auth/AuthProviderEngine.js.map +1 -0
  10. package/dist/auth/index.d.ts +11 -0
  11. package/dist/auth/index.d.ts.map +1 -1
  12. package/dist/auth/index.js +56 -13
  13. package/dist/auth/index.js.map +1 -1
  14. package/dist/auth/initializeProviders.d.ts +64 -1
  15. package/dist/auth/initializeProviders.d.ts.map +1 -1
  16. package/dist/auth/initializeProviders.js +117 -5
  17. package/dist/auth/initializeProviders.js.map +1 -1
  18. package/dist/config.d.ts +89 -0
  19. package/dist/config.d.ts.map +1 -1
  20. package/dist/config.js +52 -35
  21. package/dist/config.js.map +1 -1
  22. package/dist/generated/generated.d.ts +501 -1597
  23. package/dist/generated/generated.d.ts.map +1 -1
  24. package/dist/generated/generated.js +2711 -17021
  25. package/dist/generated/generated.js.map +1 -1
  26. package/dist/generic/ResolverBase.d.ts +1 -1
  27. package/dist/generic/ResolverBase.d.ts.map +1 -1
  28. package/dist/generic/ResolverBase.js +7 -4
  29. package/dist/generic/ResolverBase.js.map +1 -1
  30. package/dist/generic/RunViewResolver.d.ts +4 -0
  31. package/dist/generic/RunViewResolver.d.ts.map +1 -1
  32. package/dist/generic/RunViewResolver.js +31 -0
  33. package/dist/generic/RunViewResolver.js.map +1 -1
  34. package/dist/index.d.ts +2 -0
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +99 -14
  37. package/dist/index.js.map +1 -1
  38. package/dist/integration/RSUProgressBridge.d.ts +83 -0
  39. package/dist/integration/RSUProgressBridge.d.ts.map +1 -0
  40. package/dist/integration/RSUProgressBridge.js +230 -0
  41. package/dist/integration/RSUProgressBridge.js.map +1 -0
  42. package/dist/integration/SchemaRefreshLaunch.d.ts +52 -0
  43. package/dist/integration/SchemaRefreshLaunch.d.ts.map +1 -0
  44. package/dist/integration/SchemaRefreshLaunch.js +50 -0
  45. package/dist/integration/SchemaRefreshLaunch.js.map +1 -0
  46. package/dist/providerConfigUnits.d.ts +20 -0
  47. package/dist/providerConfigUnits.d.ts.map +1 -0
  48. package/dist/providerConfigUnits.js +22 -0
  49. package/dist/providerConfigUnits.js.map +1 -0
  50. package/dist/resolvers/FileResolver.d.ts +34 -4
  51. package/dist/resolvers/FileResolver.d.ts.map +1 -1
  52. package/dist/resolvers/FileResolver.js +218 -28
  53. package/dist/resolvers/FileResolver.js.map +1 -1
  54. package/dist/resolvers/IntegrationDiscoveryResolver.d.ts +76 -3
  55. package/dist/resolvers/IntegrationDiscoveryResolver.d.ts.map +1 -1
  56. package/dist/resolvers/IntegrationDiscoveryResolver.js +299 -81
  57. package/dist/resolvers/IntegrationDiscoveryResolver.js.map +1 -1
  58. package/dist/resolvers/QueryResolver.d.ts +5 -4
  59. package/dist/resolvers/QueryResolver.d.ts.map +1 -1
  60. package/dist/resolvers/QueryResolver.js +29 -14
  61. package/dist/resolvers/QueryResolver.js.map +1 -1
  62. package/dist/resolvers/QuerySystemUserResolver.d.ts +12 -3
  63. package/dist/resolvers/QuerySystemUserResolver.d.ts.map +1 -1
  64. package/dist/resolvers/QuerySystemUserResolver.js +33 -14
  65. package/dist/resolvers/QuerySystemUserResolver.js.map +1 -1
  66. package/dist/resolvers/RunAIAgentResolver.d.ts +3 -1
  67. package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
  68. package/dist/resolvers/RunAIAgentResolver.js +20 -7
  69. package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
  70. package/dist/resolvers/TaskGraphFrameResolver.d.ts +18 -0
  71. package/dist/resolvers/TaskGraphFrameResolver.d.ts.map +1 -1
  72. package/dist/resolvers/TaskGraphFrameResolver.js +75 -0
  73. package/dist/resolvers/TaskGraphFrameResolver.js.map +1 -1
  74. package/dist/resolvers/UserResolver.d.ts +19 -17
  75. package/dist/resolvers/UserResolver.d.ts.map +1 -1
  76. package/dist/resolvers/UserResolver.js +66 -67
  77. package/dist/resolvers/UserResolver.js.map +1 -1
  78. package/dist/resolvers/currentUserRoles.d.ts +19 -0
  79. package/dist/resolvers/currentUserRoles.d.ts.map +1 -0
  80. package/dist/resolvers/currentUserRoles.js +36 -0
  81. package/dist/resolvers/currentUserRoles.js.map +1 -0
  82. package/dist/rest/MediaAccessKeys.d.ts +17 -0
  83. package/dist/rest/MediaAccessKeys.d.ts.map +1 -1
  84. package/dist/rest/MediaAccessKeys.js +42 -1
  85. package/dist/rest/MediaAccessKeys.js.map +1 -1
  86. package/dist/rest/MediaStreamHandler.d.ts +3 -2
  87. package/dist/rest/MediaStreamHandler.d.ts.map +1 -1
  88. package/dist/rest/MediaStreamHandler.js +83 -2
  89. package/dist/rest/MediaStreamHandler.js.map +1 -1
  90. package/dist/rest/OAuthCallbackHandler.d.ts +49 -1
  91. package/dist/rest/OAuthCallbackHandler.d.ts.map +1 -1
  92. package/dist/rest/OAuthCallbackHandler.js +129 -43
  93. package/dist/rest/OAuthCallbackHandler.js.map +1 -1
  94. package/dist/rest/UploadTokenManager.d.ts +90 -0
  95. package/dist/rest/UploadTokenManager.d.ts.map +1 -0
  96. package/dist/rest/UploadTokenManager.js +156 -0
  97. package/dist/rest/UploadTokenManager.js.map +1 -0
  98. package/dist/services/IntegrationSyncWorkerService.d.ts +48 -0
  99. package/dist/services/IntegrationSyncWorkerService.d.ts.map +1 -0
  100. package/dist/services/IntegrationSyncWorkerService.js +132 -0
  101. package/dist/services/IntegrationSyncWorkerService.js.map +1 -0
  102. package/dist/services/StartTaskGraphDispatcher.d.ts +0 -10
  103. package/dist/services/StartTaskGraphDispatcher.d.ts.map +1 -1
  104. package/dist/services/StartTaskGraphDispatcher.js +21 -1
  105. package/dist/services/StartTaskGraphDispatcher.js.map +1 -1
  106. package/dist/services/TaskGraphAgentRunner.d.ts +7 -0
  107. package/dist/services/TaskGraphAgentRunner.d.ts.map +1 -1
  108. package/dist/services/TaskGraphAgentRunner.js +23 -0
  109. package/dist/services/TaskGraphAgentRunner.js.map +1 -1
  110. package/dist/services/TaskGraphContinuationDeliverer.d.ts.map +1 -1
  111. package/dist/services/TaskGraphContinuationDeliverer.js +12 -1
  112. package/dist/services/TaskGraphContinuationDeliverer.js.map +1 -1
  113. package/dist/types.d.ts +6 -0
  114. package/dist/types.d.ts.map +1 -1
  115. package/dist/types.js.map +1 -1
  116. package/package.json +91 -91
  117. package/src/__tests__/APIKeyScopeAuth.test.ts +475 -0
  118. package/src/__tests__/AuthProviderEngine.test.ts +278 -0
  119. package/src/__tests__/EntityCRUDHandler.test.ts +378 -0
  120. package/src/__tests__/IntegrationSyncWorkerService.test.ts +275 -0
  121. package/src/__tests__/OAuthCallbackHandler.openRedirect.test.ts +117 -0
  122. package/src/__tests__/OAuthCallbackHandler.xss.test.ts +4 -1
  123. package/src/__tests__/RESTEndpointHandler.test.ts +672 -0
  124. package/src/__tests__/RSUProgressBridge.test.ts +250 -0
  125. package/src/__tests__/RealtimeBridgeResolver.test.ts +10 -2
  126. package/src/__tests__/SchemaRefreshLaunch.test.ts +114 -0
  127. package/src/__tests__/UserResolver.currentUser.test.ts +87 -0
  128. package/src/__tests__/ViewOperationsHandler.test.ts +277 -0
  129. package/src/__tests__/config-units.test.ts +74 -0
  130. package/src/__tests__/initializeProviders.refresh.test.ts +146 -0
  131. package/src/__tests__/mjapi-bootstrap.test.ts +0 -6
  132. package/src/__tests__/newUsers.test.ts +726 -0
  133. package/src/__tests__/uploadTokenManager.test.ts +159 -0
  134. package/src/auth/AuthProviderCatalogRouter.ts +76 -0
  135. package/src/auth/AuthProviderEngine.ts +253 -0
  136. package/src/auth/index.ts +59 -15
  137. package/src/auth/initializeProviders.ts +128 -7
  138. package/src/config.ts +55 -36
  139. package/src/generated/generated.ts +1911 -10551
  140. package/src/generic/ResolverBase.ts +11 -4
  141. package/src/generic/RunViewResolver.ts +31 -0
  142. package/src/index.ts +108 -15
  143. package/src/integration/RSUProgressBridge.ts +248 -0
  144. package/src/integration/SchemaRefreshLaunch.ts +77 -0
  145. package/src/providerConfigUnits.ts +21 -0
  146. package/src/resolvers/FileResolver.ts +200 -40
  147. package/src/resolvers/IntegrationDiscoveryResolver.ts +316 -68
  148. package/src/resolvers/QueryResolver.ts +25 -11
  149. package/src/resolvers/QuerySystemUserResolver.ts +28 -13
  150. package/src/resolvers/RunAIAgentResolver.ts +21 -6
  151. package/src/resolvers/TaskGraphFrameResolver.ts +67 -0
  152. package/src/resolvers/UserResolver.ts +99 -60
  153. package/src/resolvers/currentUserRoles.ts +47 -0
  154. package/src/rest/MediaAccessKeys.ts +47 -1
  155. package/src/rest/MediaStreamHandler.ts +98 -3
  156. package/src/rest/OAuthCallbackHandler.ts +149 -41
  157. package/src/rest/UploadTokenManager.ts +211 -0
  158. package/src/services/IntegrationSyncWorkerService.ts +141 -0
  159. package/src/services/StartTaskGraphDispatcher.ts +21 -1
  160. package/src/services/TaskGraphAgentRunner.ts +23 -0
  161. package/src/services/TaskGraphContinuationDeliverer.ts +11 -1
  162. package/src/types.ts +6 -0
@@ -0,0 +1,83 @@
1
+ import type { EmitterOptions } from '@memberjunction/integration-progress-artifacts';
2
+ import type { RSUObserverEvent } from '@memberjunction/schema-engine';
3
+ import { BaseSingleton } from '@memberjunction/global';
4
+ /**
5
+ * Owns one emitter per RSU pipeline run and translates observer events into progress events.
6
+ *
7
+ * A {@link BaseSingleton} because the state here is inherently process-wide AND has to be readable
8
+ * from elsewhere. `RuntimeSchemaManager` is itself a singleton and serializes its runs behind the
9
+ * pipeline lock, so at most one RSU run is ever in flight and one current-emitter slot is sufficient
10
+ * — but the reason for the singleton is {@link CurrentRunID}: a resolver that has just triggered an
11
+ * RSU needs to hand its client a run to tail, and it can only do that if it can reach this instance.
12
+ * Constructing the bridge and keeping the only reference inside the observer closure made that
13
+ * accessor unreachable from any caller.
14
+ *
15
+ * NOT a `BaseEngine`: there is no metadata to load and nothing to `Config()`. The distinction is
16
+ * "single shared instance" (this) versus "cached metadata with a load lifecycle" (that).
17
+ */
18
+ export declare class RSUProgressBridge extends BaseSingleton<RSUProgressBridge> {
19
+ private emitter;
20
+ private currentRunID;
21
+ /** Liveness timer for the step currently in flight — see {@link HEARTBEAT_INTERVAL_MS}. */
22
+ private heartbeat;
23
+ private emitterOptions;
24
+ /** The one bridge for this process. */
25
+ static get Instance(): RSUProgressBridge;
26
+ /**
27
+ * Options passed through to each run's emitter. Set once, before the first run.
28
+ *
29
+ * The only field that matters in practice is `rootDir` — left unset in production so RSU runs
30
+ * land in the same `logs/integration-runs/` tree as every other run kind and
31
+ * `IntegrationTailRunEvents` finds them without configuration. Tests point it at a temp dir.
32
+ *
33
+ * A settable property rather than a constructor argument because `BaseSingleton.getInstance`
34
+ * requires a zero-argument constructor.
35
+ */
36
+ Configure(emitterOptions: EmitterOptions): void;
37
+ /**
38
+ * The run ID of the in-flight RSU run, or null when idle. Lets a caller that triggered an RSU
39
+ * hand a client something to tail via `IntegrationTailRunEvents` / the `RSU` subscription
40
+ * channel.
41
+ */
42
+ get CurrentRunID(): string | null;
43
+ /**
44
+ * Abandons any in-flight run state and stops its heartbeat, without emitting a terminal event.
45
+ *
46
+ * Needed because singleton state outlives a single caller: a test (or a server tearing down)
47
+ * must be able to return the bridge to idle without the next run inheriting a stale emitter or
48
+ * leaking an interval that keeps the process alive.
49
+ */
50
+ Reset(): void;
51
+ /** The observer to hand to {@link RuntimeSchemaManager.PipelineObserver}. */
52
+ readonly Observe: (event: RSUObserverEvent) => void;
53
+ private onRunStart;
54
+ private onStepStart;
55
+ private onStepEnd;
56
+ private onRunEnd;
57
+ /**
58
+ * Starts reporting liveness for the step that just opened. Any previous timer is cleared first,
59
+ * so a missed `step.end` can never leave two timers running.
60
+ */
61
+ private startHeartbeat;
62
+ /** Stops the liveness timer. Safe to call when none is running. */
63
+ private stopHeartbeat;
64
+ /** Closes an orphaned emitter so a leaked run does not stay in-flight forever. */
65
+ private closeCurrent;
66
+ /**
67
+ * "step 4 of 12" — omitted entirely when the determinate counter isn't armed.
68
+ *
69
+ * Explicit null/undefined checks rather than truthiness: a 0 index is falsy, and silently
70
+ * dropping the label for the first step of a 0-based counter would be a bug that only appears
71
+ * if the pipeline's numbering ever changes.
72
+ */
73
+ private positionLabel;
74
+ }
75
+ /**
76
+ * Attaches a fresh {@link RSUProgressBridge} to the RuntimeSchemaManager singleton. Call once at
77
+ * server startup, after the progress publish hook is registered so the very first RSU event also
78
+ * reaches live subscribers.
79
+ *
80
+ * @returns the bridge, so callers can read {@link RSUProgressBridge.CurrentRunID}.
81
+ */
82
+ export declare function RegisterRSUProgressBridge(emitterOptions?: EmitterOptions): RSUProgressBridge;
83
+ //# sourceMappingURL=RSUProgressBridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RSUProgressBridge.d.ts","sourceRoot":"","sources":["../../src/integration/RSUProgressBridge.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAErF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAevD;;;;;;;;;;;;;GAaG;AACH,qBAAa,iBAAkB,SAAQ,aAAa,CAAC,iBAAiB,CAAC;IACnE,OAAO,CAAC,OAAO,CAA2C;IAC1D,OAAO,CAAC,YAAY,CAAuB;IAC3C,2FAA2F;IAC3F,OAAO,CAAC,SAAS,CAA+C;IAChE,OAAO,CAAC,cAAc,CAAsB;IAE5C,uCAAuC;IACvC,WAAkB,QAAQ,IAAI,iBAAiB,CAE9C;IAED;;;;;;;;;OASG;IACI,SAAS,CAAC,cAAc,EAAE,cAAc,GAAG,IAAI;IAItD;;;;OAIG;IACH,IAAW,YAAY,IAAI,MAAM,GAAG,IAAI,CAEvC;IAED;;;;;;OAMG;IACI,KAAK,IAAI,IAAI;IAMpB,6EAA6E;IAC7E,SAAgB,OAAO,GAAI,OAAO,gBAAgB,KAAG,IAAI,CAWvD;IAEF,OAAO,CAAC,UAAU;IA4BlB,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,SAAS;IAgBjB,OAAO,CAAC,QAAQ;IA4BhB;;;OAGG;IACH,OAAO,CAAC,cAAc;IAWtB,mEAAmE;IACnE,OAAO,CAAC,aAAa;IAMrB,kFAAkF;IAClF,OAAO,CAAC,YAAY;IASpB;;;;;;OAMG;IACH,OAAO,CAAC,aAAa;CAIxB;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,cAAc,GAAE,cAAmB,GAAG,iBAAiB,CAKhG"}
@@ -0,0 +1,230 @@
1
+ /**
2
+ * @fileoverview Bridges RSU pipeline lifecycle events onto the integration progress artifact
3
+ * stream, so a Runtime Schema Update is observable the same way a sync or a connector build is.
4
+ *
5
+ * The gap this closes: `IntegrationRunKind` has always included `'RSU'` and
6
+ * `RUN_KIND_TO_TOPIC` has always mapped it to an `'RSU'` subscription channel — but nothing in
7
+ * production ever constructed an emitter with that kind, so the channel carried no traffic and
8
+ * `IntegrationTailRunEvents` had no RSU runs to tail. The only live signal was polling
9
+ * `RuntimeSchemaUpdateStatus`, which reports the CURRENT step and nothing else: no history, no
10
+ * durable record, and nothing at all to read after a mid-run API restart — which the RSU pipeline
11
+ * does to itself, by design, as one of its own steps.
12
+ *
13
+ * Layering: `@memberjunction/schema-engine` must not depend on the progress artifacts package, so
14
+ * it publishes plain {@link RSUObserverEvent}s and this module — one layer up, where both are
15
+ * already dependencies — owns the emitter lifecycle.
16
+ */
17
+ import { IntegrationProgressEmitter } from '@memberjunction/integration-progress-artifacts';
18
+ import { RuntimeSchemaManager } from '@memberjunction/schema-engine';
19
+ import { LogError } from '@memberjunction/core';
20
+ import { BaseSingleton } from '@memberjunction/global';
21
+ /** The emitter stage name used for run-level (non-step) events. */
22
+ const RUN_STAGE = 'RSUPipeline';
23
+ /**
24
+ * How often an in-flight step reports that it is still alive.
25
+ *
26
+ * RSU's expensive steps — CodeGen, TypeScript compile, npm install — run for minutes with no
27
+ * intermediate observer event, so without this the stream goes silent for the entire step and a
28
+ * watcher cannot tell "compiling" from "hung". 30s matches the interval the agent notification
29
+ * conventions ask for on long phases.
30
+ */
31
+ const HEARTBEAT_INTERVAL_MS = 30_000;
32
+ /**
33
+ * Owns one emitter per RSU pipeline run and translates observer events into progress events.
34
+ *
35
+ * A {@link BaseSingleton} because the state here is inherently process-wide AND has to be readable
36
+ * from elsewhere. `RuntimeSchemaManager` is itself a singleton and serializes its runs behind the
37
+ * pipeline lock, so at most one RSU run is ever in flight and one current-emitter slot is sufficient
38
+ * — but the reason for the singleton is {@link CurrentRunID}: a resolver that has just triggered an
39
+ * RSU needs to hand its client a run to tail, and it can only do that if it can reach this instance.
40
+ * Constructing the bridge and keeping the only reference inside the observer closure made that
41
+ * accessor unreachable from any caller.
42
+ *
43
+ * NOT a `BaseEngine`: there is no metadata to load and nothing to `Config()`. The distinction is
44
+ * "single shared instance" (this) versus "cached metadata with a load lifecycle" (that).
45
+ */
46
+ export class RSUProgressBridge extends BaseSingleton {
47
+ constructor() {
48
+ super(...arguments);
49
+ this.emitter = null;
50
+ this.currentRunID = null;
51
+ /** Liveness timer for the step currently in flight — see {@link HEARTBEAT_INTERVAL_MS}. */
52
+ this.heartbeat = null;
53
+ this.emitterOptions = {};
54
+ /** The observer to hand to {@link RuntimeSchemaManager.PipelineObserver}. */
55
+ this.Observe = (event) => {
56
+ switch (event.Kind) {
57
+ case 'run.start':
58
+ return this.onRunStart(event);
59
+ case 'step.start':
60
+ return this.onStepStart(event);
61
+ case 'step.end':
62
+ return this.onStepEnd(event);
63
+ case 'run.end':
64
+ return this.onRunEnd(event);
65
+ }
66
+ };
67
+ }
68
+ /** The one bridge for this process. */
69
+ static get Instance() {
70
+ return super.getInstance();
71
+ }
72
+ /**
73
+ * Options passed through to each run's emitter. Set once, before the first run.
74
+ *
75
+ * The only field that matters in practice is `rootDir` — left unset in production so RSU runs
76
+ * land in the same `logs/integration-runs/` tree as every other run kind and
77
+ * `IntegrationTailRunEvents` finds them without configuration. Tests point it at a temp dir.
78
+ *
79
+ * A settable property rather than a constructor argument because `BaseSingleton.getInstance`
80
+ * requires a zero-argument constructor.
81
+ */
82
+ Configure(emitterOptions) {
83
+ this.emitterOptions = emitterOptions;
84
+ }
85
+ /**
86
+ * The run ID of the in-flight RSU run, or null when idle. Lets a caller that triggered an RSU
87
+ * hand a client something to tail via `IntegrationTailRunEvents` / the `RSU` subscription
88
+ * channel.
89
+ */
90
+ get CurrentRunID() {
91
+ return this.currentRunID;
92
+ }
93
+ /**
94
+ * Abandons any in-flight run state and stops its heartbeat, without emitting a terminal event.
95
+ *
96
+ * Needed because singleton state outlives a single caller: a test (or a server tearing down)
97
+ * must be able to return the bridge to idle without the next run inheriting a stale emitter or
98
+ * leaking an interval that keeps the process alive.
99
+ */
100
+ Reset() {
101
+ this.stopHeartbeat();
102
+ this.emitter = null;
103
+ this.currentRunID = null;
104
+ }
105
+ onRunStart(event) {
106
+ // A retry re-enters RunPipelineBatch, so it legitimately starts a NEW run. If a previous
107
+ // emitter is still open (a throw escaped before run.end), close it rather than leak it.
108
+ if (this.emitter)
109
+ this.closeCurrent('Superseded by a new RSU run');
110
+ const runID = IntegrationProgressEmitter.newRunID('rsu');
111
+ this.currentRunID = runID;
112
+ this.emitter = new IntegrationProgressEmitter({
113
+ runID,
114
+ runKind: 'RSU',
115
+ triggerType: 'Pipeline',
116
+ startedAt: new Date().toISOString(),
117
+ context: {
118
+ itemCount: event.ItemCount,
119
+ descriptions: event.Descriptions,
120
+ affectedTables: event.AffectedTables,
121
+ stepTotal: event.StepTotal,
122
+ },
123
+ }, this.emitterOptions);
124
+ this.emitter.runStart(`RSU pipeline started — ${event.ItemCount} migration(s), ${event.StepTotal} expected step(s): ` +
125
+ event.Descriptions.join('; '));
126
+ }
127
+ onStepStart(event) {
128
+ if (!this.emitter)
129
+ return;
130
+ this.emitter.stageStart(event.Name, this.positionLabel(event.StepIndex, event.StepTotal));
131
+ this.startHeartbeat(event.Name);
132
+ }
133
+ onStepEnd(event) {
134
+ this.stopHeartbeat();
135
+ if (!this.emitter)
136
+ return;
137
+ // A failed step is a stage error, not a stage completion — the run may still continue (a
138
+ // per-item migration failure does not abort the batch), so this is deliberately not fatal.
139
+ if (event.Status === 'failed') {
140
+ this.emitter.stageError(event.Name, event.Message, { durationMs: event.DurationMs, code: 'RSU_STEP_FAILED' });
141
+ return;
142
+ }
143
+ // Deliberately no `counts` here. Counts roll up into the run aggregate, and the countable
144
+ // unit of an RSU run is MIGRATIONS, not steps — reporting "processed: 12" for a 12-step
145
+ // single-migration run would read as 12 migrations. The run-level quartet is emitted once,
146
+ // in onRunEnd. Step position lives in the stage name + the step.start message.
147
+ this.emitter.stageComplete(event.Name);
148
+ }
149
+ onRunEnd(event) {
150
+ this.stopHeartbeat();
151
+ const emitter = this.emitter;
152
+ if (!emitter)
153
+ return;
154
+ this.emitter = null;
155
+ this.currentRunID = null;
156
+ const summary = `${event.SuccessCount}/${event.TotalCount} migration(s) succeeded`;
157
+ // The one authoritative applied quartet for the run, in migrations — this is what feeds
158
+ // the reader's aggregateCounts.
159
+ emitter.stageComplete(RUN_STAGE, {
160
+ processed: event.TotalCount,
161
+ succeeded: event.SuccessCount,
162
+ failed: event.FailureCount,
163
+ totalKnown: event.TotalCount,
164
+ });
165
+ // Terminal writes are async (they flush the JSONL + write result.json). The observer
166
+ // contract is synchronous, so this is intentionally fire-and-forget with a logged catch —
167
+ // a progress-artifact write must never surface as a pipeline failure.
168
+ const terminal = event.Success
169
+ ? emitter.complete(`RSU pipeline complete — ${summary}`)
170
+ : emitter.fail(`RSU pipeline failed at '${event.ErrorStep ?? 'unknown step'}' — ${summary}: ` +
171
+ `${event.ErrorMessage ?? 'no error message'}`, 'rsu-pipeline-failed');
172
+ void terminal.catch(err => LogError(`RSUProgressBridge: terminal write failed — ${err}`));
173
+ }
174
+ /**
175
+ * Starts reporting liveness for the step that just opened. Any previous timer is cleared first,
176
+ * so a missed `step.end` can never leave two timers running.
177
+ */
178
+ startHeartbeat(stage) {
179
+ this.stopHeartbeat();
180
+ const startedAt = Date.now();
181
+ this.heartbeat = setInterval(() => {
182
+ const elapsedSec = Math.round((Date.now() - startedAt) / 1000);
183
+ this.emitter?.heartbeat(stage, `${stage} still running — ${elapsedSec}s elapsed`);
184
+ }, HEARTBEAT_INTERVAL_MS);
185
+ // Never hold the process open on a progress timer.
186
+ this.heartbeat.unref?.();
187
+ }
188
+ /** Stops the liveness timer. Safe to call when none is running. */
189
+ stopHeartbeat() {
190
+ if (!this.heartbeat)
191
+ return;
192
+ clearInterval(this.heartbeat);
193
+ this.heartbeat = null;
194
+ }
195
+ /** Closes an orphaned emitter so a leaked run does not stay in-flight forever. */
196
+ closeCurrent(reason) {
197
+ this.stopHeartbeat();
198
+ const emitter = this.emitter;
199
+ this.emitter = null;
200
+ this.currentRunID = null;
201
+ void emitter?.fail(reason, 'rsu-run-abandoned')
202
+ .catch(err => LogError(`RSUProgressBridge: abandon write failed — ${err}`));
203
+ }
204
+ /**
205
+ * "step 4 of 12" — omitted entirely when the determinate counter isn't armed.
206
+ *
207
+ * Explicit null/undefined checks rather than truthiness: a 0 index is falsy, and silently
208
+ * dropping the label for the first step of a 0-based counter would be a bug that only appears
209
+ * if the pipeline's numbering ever changes.
210
+ */
211
+ positionLabel(stepIndex, stepTotal) {
212
+ if (stepIndex == null || stepTotal == null)
213
+ return undefined;
214
+ return `step ${stepIndex} of ${stepTotal}`;
215
+ }
216
+ }
217
+ /**
218
+ * Attaches a fresh {@link RSUProgressBridge} to the RuntimeSchemaManager singleton. Call once at
219
+ * server startup, after the progress publish hook is registered so the very first RSU event also
220
+ * reaches live subscribers.
221
+ *
222
+ * @returns the bridge, so callers can read {@link RSUProgressBridge.CurrentRunID}.
223
+ */
224
+ export function RegisterRSUProgressBridge(emitterOptions = {}) {
225
+ const bridge = RSUProgressBridge.Instance;
226
+ bridge.Configure(emitterOptions);
227
+ RuntimeSchemaManager.Instance.PipelineObserver = bridge.Observe;
228
+ return bridge;
229
+ }
230
+ //# sourceMappingURL=RSUProgressBridge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RSUProgressBridge.js","sourceRoot":"","sources":["../../src/integration/RSUProgressBridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,0BAA0B,EAAE,MAAM,gDAAgD,CAAC;AAE5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,mEAAmE;AACnE,MAAM,SAAS,GAAG,aAAa,CAAC;AAEhC;;;;;;;GAOG;AACH,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAErC;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,iBAAkB,SAAQ,aAAgC;IAAvE;;QACY,YAAO,GAAsC,IAAI,CAAC;QAClD,iBAAY,GAAkB,IAAI,CAAC;QAC3C,2FAA2F;QACnF,cAAS,GAA0C,IAAI,CAAC;QACxD,mBAAc,GAAmB,EAAE,CAAC;QA2C5C,6EAA6E;QAC7D,YAAO,GAAG,CAAC,KAAuB,EAAQ,EAAE;YACxD,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;gBACjB,KAAK,WAAW;oBACZ,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;gBAClC,KAAK,YAAY;oBACb,O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 * @fileoverview Pure reporting helpers for the connector schema-refresh pipeline launch.
3
+ *
4
+ * The refresh is a live vendor introspect and can run for minutes on a large catalog, so
5
+ * IntegrationCreateConnection / IntegrationUpdateConnection can launch it *detached* and hand the
6
+ * caller a tailable run ID instead of blocking. That split creates one easy-to-get-wrong reporting
7
+ * case: a detached summary's counts are placeholder zeros, and describing them as results ("0
8
+ * created, 0 updated") reads to an operator as "the refresh found nothing" — the opposite of "the
9
+ * refresh has not finished yet". This module owns that decision so it can be pinned by a test
10
+ * without standing up a resolver.
11
+ */
12
+ /**
13
+ * The subset of the pipeline summary that message construction reads. Structural so both the
14
+ * GraphQL `@ObjectType` and a test fixture satisfy it without either depending on the other.
15
+ */
16
+ export interface SchemaRefreshSummaryLike {
17
+ /** Tailable run ID — the only meaningful field while `InProgress` is true. */
18
+ RunID: string;
19
+ /** True ⇒ launched detached and still running; every count below is a placeholder zero. */
20
+ InProgress: boolean;
21
+ /**
22
+ * Whether the pipeline itself succeeded. A pipeline that fails at ConnectionTest RETURNS rather
23
+ * than throwing, with every count at zero — so counts alone read identically to a clean
24
+ * no-op refresh. Reporting that as "0 created, 0 updated" tells an operator the vendor had
25
+ * nothing new when in fact the credentials were never accepted.
26
+ */
27
+ Succeeded: boolean;
28
+ /** The pipeline's own failure reason, when `Succeeded` is false. */
29
+ FailureMessage?: string;
30
+ ObjectsCreated: number;
31
+ ObjectsUpdated: number;
32
+ UnresolvedObjects: string[];
33
+ }
34
+ /**
35
+ * Builds the human-facing `Message` for IntegrationCreateConnection.
36
+ *
37
+ * @param testConnection whether the caller asked for (and got) a live connection test
38
+ * @param summary the refresh summary, or undefined when no refresh was requested
39
+ */
40
+ export declare function BuildCreateConnectionMessage(testConnection: boolean, summary: SchemaRefreshSummaryLike | undefined): string;
41
+ /**
42
+ * Builds the human-facing `Message` for IntegrationUpdateConnection's blocking-refresh path.
43
+ * Shares {@link describeFinishedRefresh} with create so a failed refresh can never be reported as
44
+ * a clean zero-count run on one path and honestly on the other.
45
+ */
46
+ export declare function BuildUpdateConnectionMessage(summary: SchemaRefreshSummaryLike): string;
47
+ /**
48
+ * Builds the human-facing `Message` for IntegrationUpdateConnection's detached-refresh path.
49
+ * Separate from {@link BuildCreateConnectionMessage} because update has no connection-test clause.
50
+ */
51
+ export declare function BuildDetachedRefreshMessage(runID: string): string;
52
+ //# sourceMappingURL=SchemaRefreshLaunch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaRefreshLaunch.d.ts","sourceRoot":"","sources":["../../src/integration/SchemaRefreshLaunch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACrC,8EAA8E;IAC9E,KAAK,EAAE,MAAM,CAAC;IACd,2FAA2F;IAC3F,UAAU,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB,oEAAoE;IACpE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC/B;AAWD;;;;;GAKG;AACH,wBAAgB,4BAA4B,CACxC,cAAc,EAAE,OAAO,EACvB,OAAO,EAAE,wBAAwB,GAAG,SAAS,GAC9C,MAAM,CAMR;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,wBAAwB,GAAG,MAAM,CAEtF;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjE"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * @fileoverview Pure reporting helpers for the connector schema-refresh pipeline launch.
3
+ *
4
+ * The refresh is a live vendor introspect and can run for minutes on a large catalog, so
5
+ * IntegrationCreateConnection / IntegrationUpdateConnection can launch it *detached* and hand the
6
+ * caller a tailable run ID instead of blocking. That split creates one easy-to-get-wrong reporting
7
+ * case: a detached summary's counts are placeholder zeros, and describing them as results ("0
8
+ * created, 0 updated") reads to an operator as "the refresh found nothing" — the opposite of "the
9
+ * refresh has not finished yet". This module owns that decision so it can be pinned by a test
10
+ * without standing up a resolver.
11
+ */
12
+ /** The counts clause, or an explicit failure clause when the pipeline did not succeed. */
13
+ function describeFinishedRefresh(summary) {
14
+ if (!summary.Succeeded) {
15
+ return `schema refresh FAILED (${summary.FailureMessage ?? 'no reason reported'}) — see run ${summary.RunID}`;
16
+ }
17
+ return `schema refresh: ${summary.ObjectsCreated} created, ` +
18
+ `${summary.ObjectsUpdated} updated, ${summary.UnresolvedObjects.length} PK-unresolved`;
19
+ }
20
+ /**
21
+ * Builds the human-facing `Message` for IntegrationCreateConnection.
22
+ *
23
+ * @param testConnection whether the caller asked for (and got) a live connection test
24
+ * @param summary the refresh summary, or undefined when no refresh was requested
25
+ */
26
+ export function BuildCreateConnectionMessage(testConnection, summary) {
27
+ if (!summary)
28
+ return 'Connection created and test passed';
29
+ const created = `Connection created${testConnection ? ', test passed' : ''}`;
30
+ // Never report a detached run's placeholder counts as findings — point at the run stream instead.
31
+ if (summary.InProgress)
32
+ return `${created}, schema refresh running — tail run ${summary.RunID}`;
33
+ return `${created}, ${describeFinishedRefresh(summary)}`;
34
+ }
35
+ /**
36
+ * Builds the human-facing `Message` for IntegrationUpdateConnection's blocking-refresh path.
37
+ * Shares {@link describeFinishedRefresh} with create so a failed refresh can never be reported as
38
+ * a clean zero-count run on one path and honestly on the other.
39
+ */
40
+ export function BuildUpdateConnectionMessage(summary) {
41
+ return `Updated, ${describeFinishedRefresh(summary)}`;
42
+ }
43
+ /**
44
+ * Builds the human-facing `Message` for IntegrationUpdateConnection's detached-refresh path.
45
+ * Separate from {@link BuildCreateConnectionMessage} because update has no connection-test clause.
46
+ */
47
+ export function BuildDetachedRefreshMessage(runID) {
48
+ return `Updated, schema refresh running — tail run ${runID}`;
49
+ }
50
+ //# sourceMappingURL=SchemaRefreshLaunch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaRefreshLaunch.js","sourceRoot":"","sources":["../../src/integration/SchemaRefreshLaunch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAyBH,0FAA0F;AAC1F,SAAS,uBAAuB,CAAC,OAAiC;IAC9D,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;QACrB,OAAO,0BAA0B,OAAO,CAAC,cAAc,IAAI,oBAAoB,eAAe,OAAO,CAAC,KAAK,EAAE,CAAC;IAClH,CAAC;IACD,OAAO,mBAAmB,OAAO,CAAC,cAAc,YAAY;QACxD,GAAG,OAAO,CAAC,cAAc,aAAa,OAAO,CAAC,iBAAiB,CAAC,MAAM,gBAAgB,CAAC;AAC/F,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,4BAA4B,CACxC,cAAuB,EACvB,OAA6C;IAE7C,IAAI,CAAC,OAAO;QAAE,OAAO,oCAAoC,CAAC;IAC1D,MAAM,OAAO,GAAG,qBAAqB,cAAc,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAC7E,kGAAkG;IAClG,IAAI,OAAO,CAAC,UAAU;QAAE,OAAO,GAAG,OAAO,uCAAuC,OAAO,CAAC,KAAK,EAAE,CAAC;IAChG,OAAO,GAAG,OAAO,KAAK,uBAAuB,CAAC,OAAO,CAAC,EAAE,CAAC;AAC7D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,4BAA4B,CAAC,OAAiC;IAC1E,OAAO,YAAY,uBAAuB,CAAC,OAAO,CAAC,EAAE,CAAC;AAC1D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CAAC,KAAa;IACrD,OAAO,8CAA8C,KAAK,EAAE,CAAC;AACjE,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Unit-conversion seam between MJServer's configuration and SQLServerDataProvider.
3
+ *
4
+ * MJServer configures `databaseSettings.metadataCacheRefreshInterval` in **milliseconds**
5
+ * (default 180000 = 3 minutes, overridable via the METADATA_CACHE_REFRESH_INTERVAL env var).
6
+ * `SQLServerProviderConfigData`'s third constructor parameter is `checkRefreshIntervalSeconds`
7
+ * — declared in **seconds**.
8
+ *
9
+ * Commit 645c5a5e8 fixed a bug where the raw millisecond value was handed straight to the
10
+ * provider, so the "3 minute" default became a 180000-second (~50 hour) metadata cache
11
+ * refresh cadence. This function is the single place that conversion happens; both provider
12
+ * bootstrap call sites in `index.ts` (the main pool and the CodeGen-credentialed pool) go
13
+ * through it, and `config-units.test.ts` pins the contract so the units can never silently
14
+ * regress again.
15
+ *
16
+ * @param metadataCacheRefreshIntervalMs - the configured refresh interval, in milliseconds
17
+ * @returns the same interval expressed in seconds, the unit `checkRefreshIntervalSeconds` declares
18
+ */
19
+ export declare function MetadataCacheRefreshIntervalSeconds(metadataCacheRefreshIntervalMs: number): number;
20
+ //# sourceMappingURL=providerConfigUnits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"providerConfigUnits.d.ts","sourceRoot":"","sources":["../src/providerConfigUnits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mCAAmC,CAAC,8BAA8B,EAAE,MAAM,GAAG,MAAM,CAElG"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Unit-conversion seam between MJServer's configuration and SQLServerDataProvider.
3
+ *
4
+ * MJServer configures `databaseSettings.metadataCacheRefreshInterval` in **milliseconds**
5
+ * (default 180000 = 3 minutes, overridable via the METADATA_CACHE_REFRESH_INTERVAL env var).
6
+ * `SQLServerProviderConfigData`'s third constructor parameter is `checkRefreshIntervalSeconds`
7
+ * — declared in **seconds**.
8
+ *
9
+ * Commit 645c5a5e8 fixed a bug where the raw millisecond value was handed straight to the
10
+ * provider, so the "3 minute" default became a 180000-second (~50 hour) metadata cache
11
+ * refresh cadence. This function is the single place that conversion happens; both provider
12
+ * bootstrap call sites in `index.ts` (the main pool and the CodeGen-credentialed pool) go
13
+ * through it, and `config-units.test.ts` pins the contract so the units can never silently
14
+ * regress again.
15
+ *
16
+ * @param metadataCacheRefreshIntervalMs - the configured refresh interval, in milliseconds
17
+ * @returns the same interval expressed in seconds, the unit `checkRefreshIntervalSeconds` declares
18
+ */
19
+ export function MetadataCacheRefreshIntervalSeconds(metadataCacheRefreshIntervalMs) {
20
+ return metadataCacheRefreshIntervalMs / 1000;
21
+ }
22
+ //# sourceMappingURL=providerConfigUnits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"providerConfigUnits.js","sourceRoot":"","sources":["../src/providerConfigUnits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,mCAAmC,CAAC,8BAAsC;IACtF,OAAO,8BAA8B,GAAG,IAAI,CAAC;AACjD,CAAC"}
@@ -3,6 +3,28 @@ import { CreateMJFileInput, MJFileResolver as FileResolverBase, MJFile_, UpdateM
3
3
  export declare class CreateUploadURLInput {
4
4
  FileID: string;
5
5
  }
6
+ export declare class UploadStorageFileInput {
7
+ FileName?: string;
8
+ Base64Data?: string;
9
+ UploadToken?: string;
10
+ MimeType?: string;
11
+ AccountID?: string;
12
+ CategoryID?: string;
13
+ Description?: string;
14
+ PathPrefix?: string;
15
+ }
16
+ export declare class UploadStorageFilePayload {
17
+ Success: boolean;
18
+ FileID?: string;
19
+ File?: MJFile_;
20
+ ErrorMessage?: string;
21
+ }
22
+ export declare class CreateUploadStageTokenPayload {
23
+ Success: boolean;
24
+ Token?: string;
25
+ Url?: string;
26
+ ErrorMessage?: string;
27
+ }
6
28
  export declare class CreateFilePayload {
7
29
  File: MJFile_;
8
30
  UploadUrl: string;
@@ -214,6 +236,12 @@ export declare class FileResolver extends FileResolverBase {
214
236
  UploadUrl: string;
215
237
  NameExists: boolean;
216
238
  }>;
239
+ /**
240
+ * Direct server-side file upload using MJ Storage subsystem.
241
+ * Uploads file contents directly via the configured storage driver (Box, Azure, S3, Google Drive, Dropbox, etc.)
242
+ * and creates/persists the MJ: Files database record.
243
+ */
244
+ UploadStorageFile(input: UploadStorageFileInput, context: AppContext): Promise<UploadStorageFilePayload>;
217
245
  DownloadUrl(file: MJFile_, context: AppContext): Promise<string>;
218
246
  /**
219
247
  * Returns an `MJ: Files` record's bytes as base64, read server-side through authenticated MJStorage
@@ -256,10 +284,12 @@ export declare class FileResolver extends FileResolverBase {
256
284
  *
257
285
  * @see CreateFile for the legacy path that also creates a File entity record.
258
286
  */
259
- CreatePreAuthUploadUrl(input: CreatePreAuthUploadUrlInput, context: AppContext): Promise<{
260
- UploadUrl: string;
261
- ProviderKey: string;
262
- }>;
287
+ CreatePreAuthUploadUrl(input: CreatePreAuthUploadUrlInput, context: AppContext): Promise<CreatePreAuthUploadUrlPayload>;
288
+ /**
289
+ * Mints a cryptographically signed, short-lived media-upload token for staging raw binary files.
290
+ * Checks user permissions on `MJ: Files` before issuing.
291
+ */
292
+ CreateUploadStageToken(context: AppContext): Promise<CreateUploadStageTokenPayload>;
263
293
  DeleteStorageObject(input: DeleteStorageObjectInput, context: AppContext): Promise<boolean>;
264
294
  MoveStorageObject(input: MoveStorageObjectInput, context: AppContext): Promise<boolean>;
265
295
  CopyStorageObject(input: CopyStorageObjectInput, context: AppContext): Promise<boolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"FileResolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/FileResolver.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,UAAU,EAGV,kBAAkB,EASlB,YAAY,EAIb,MAAM,wBAAwB,CAAC;AAiBhC,OAAO,EAAE,iBAAiB,EAAE,cAAc,IAAI,gBAAgB,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAO9H,qBACa,oBAAoB;IAE/B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,qBACa,iBAAiB;IAE5B,IAAI,EAAE,OAAO,CAAC;IAEd,SAAS,EAAE,MAAM,CAAC;IAElB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED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