@fluidgrids/cli 2026.1108.1 → 2026.1110.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.
Files changed (238) hide show
  1. package/README.md +1 -1
  2. package/dist/cli.js +9708 -33
  3. package/package.json +37 -33
  4. package/dist/auth/device-login.d.ts +0 -31
  5. package/dist/auth/device-login.d.ts.map +0 -1
  6. package/dist/auth/device-login.js +0 -75
  7. package/dist/auth/device-login.js.map +0 -1
  8. package/dist/auth/token-auth.d.ts +0 -49
  9. package/dist/auth/token-auth.d.ts.map +0 -1
  10. package/dist/auth/token-auth.js +0 -279
  11. package/dist/auth/token-auth.js.map +0 -1
  12. package/dist/cli.d.ts +0 -10
  13. package/dist/cli.d.ts.map +0 -1
  14. package/dist/cli.js.map +0 -1
  15. package/dist/code-first/api.d.ts +0 -607
  16. package/dist/code-first/api.d.ts.map +0 -1
  17. package/dist/code-first/api.js +0 -438
  18. package/dist/code-first/api.js.map +0 -1
  19. package/dist/code-first/code-upload.d.ts +0 -68
  20. package/dist/code-first/code-upload.d.ts.map +0 -1
  21. package/dist/code-first/code-upload.js +0 -223
  22. package/dist/code-first/code-upload.js.map +0 -1
  23. package/dist/code-first/commands/codegen.d.ts +0 -20
  24. package/dist/code-first/commands/codegen.d.ts.map +0 -1
  25. package/dist/code-first/commands/codegen.js +0 -50
  26. package/dist/code-first/commands/codegen.js.map +0 -1
  27. package/dist/code-first/commands/diff.d.ts +0 -28
  28. package/dist/code-first/commands/diff.d.ts.map +0 -1
  29. package/dist/code-first/commands/diff.js +0 -73
  30. package/dist/code-first/commands/diff.js.map +0 -1
  31. package/dist/code-first/commands/hotfix.d.ts +0 -55
  32. package/dist/code-first/commands/hotfix.d.ts.map +0 -1
  33. package/dist/code-first/commands/hotfix.js +0 -231
  34. package/dist/code-first/commands/hotfix.js.map +0 -1
  35. package/dist/code-first/commands/import.d.ts +0 -40
  36. package/dist/code-first/commands/import.d.ts.map +0 -1
  37. package/dist/code-first/commands/import.js +0 -235
  38. package/dist/code-first/commands/import.js.map +0 -1
  39. package/dist/code-first/commands/init.d.ts +0 -33
  40. package/dist/code-first/commands/init.d.ts.map +0 -1
  41. package/dist/code-first/commands/init.js +0 -177
  42. package/dist/code-first/commands/init.js.map +0 -1
  43. package/dist/code-first/commands/interface.d.ts +0 -12
  44. package/dist/code-first/commands/interface.d.ts.map +0 -1
  45. package/dist/code-first/commands/interface.js +0 -21
  46. package/dist/code-first/commands/interface.js.map +0 -1
  47. package/dist/code-first/commands/pull.d.ts +0 -63
  48. package/dist/code-first/commands/pull.d.ts.map +0 -1
  49. package/dist/code-first/commands/pull.js +0 -266
  50. package/dist/code-first/commands/pull.js.map +0 -1
  51. package/dist/code-first/commands/push.d.ts +0 -104
  52. package/dist/code-first/commands/push.d.ts.map +0 -1
  53. package/dist/code-first/commands/push.js +0 -320
  54. package/dist/code-first/commands/push.js.map +0 -1
  55. package/dist/code-first/commands/replay.d.ts +0 -44
  56. package/dist/code-first/commands/replay.d.ts.map +0 -1
  57. package/dist/code-first/commands/replay.js +0 -271
  58. package/dist/code-first/commands/replay.js.map +0 -1
  59. package/dist/code-first/commands/runs.d.ts +0 -168
  60. package/dist/code-first/commands/runs.d.ts.map +0 -1
  61. package/dist/code-first/commands/runs.js +0 -598
  62. package/dist/code-first/commands/runs.js.map +0 -1
  63. package/dist/code-first/commands/suite.d.ts +0 -57
  64. package/dist/code-first/commands/suite.d.ts.map +0 -1
  65. package/dist/code-first/commands/suite.js +0 -197
  66. package/dist/code-first/commands/suite.js.map +0 -1
  67. package/dist/code-first/commands/validate.d.ts +0 -38
  68. package/dist/code-first/commands/validate.d.ts.map +0 -1
  69. package/dist/code-first/commands/validate.js +0 -140
  70. package/dist/code-first/commands/validate.js.map +0 -1
  71. package/dist/code-first/commands/versions.d.ts +0 -63
  72. package/dist/code-first/commands/versions.d.ts.map +0 -1
  73. package/dist/code-first/commands/versions.js +0 -204
  74. package/dist/code-first/commands/versions.js.map +0 -1
  75. package/dist/code-first/connections.d.ts +0 -55
  76. package/dist/code-first/connections.d.ts.map +0 -1
  77. package/dist/code-first/connections.js +0 -180
  78. package/dist/code-first/connections.js.map +0 -1
  79. package/dist/code-first/durable-operations.d.ts +0 -41
  80. package/dist/code-first/durable-operations.d.ts.map +0 -1
  81. package/dist/code-first/durable-operations.js +0 -135
  82. package/dist/code-first/durable-operations.js.map +0 -1
  83. package/dist/code-first/history.d.ts +0 -30
  84. package/dist/code-first/history.d.ts.map +0 -1
  85. package/dist/code-first/history.js +0 -139
  86. package/dist/code-first/history.js.map +0 -1
  87. package/dist/code-first/imports.d.ts +0 -22
  88. package/dist/code-first/imports.d.ts.map +0 -1
  89. package/dist/code-first/imports.js +0 -67
  90. package/dist/code-first/imports.js.map +0 -1
  91. package/dist/code-first/index.d.ts +0 -18
  92. package/dist/code-first/index.d.ts.map +0 -1
  93. package/dist/code-first/index.js +0 -36
  94. package/dist/code-first/index.js.map +0 -1
  95. package/dist/code-first/junit.d.ts +0 -24
  96. package/dist/code-first/junit.d.ts.map +0 -1
  97. package/dist/code-first/junit.js +0 -163
  98. package/dist/code-first/junit.js.map +0 -1
  99. package/dist/code-first/lowering.d.ts +0 -104
  100. package/dist/code-first/lowering.d.ts.map +0 -1
  101. package/dist/code-first/lowering.js +0 -254
  102. package/dist/code-first/lowering.js.map +0 -1
  103. package/dist/code-first/operations.d.ts +0 -55
  104. package/dist/code-first/operations.d.ts.map +0 -1
  105. package/dist/code-first/operations.js +0 -165
  106. package/dist/code-first/operations.js.map +0 -1
  107. package/dist/code-first/parity-operations.d.ts +0 -44
  108. package/dist/code-first/parity-operations.d.ts.map +0 -1
  109. package/dist/code-first/parity-operations.js +0 -211
  110. package/dist/code-first/parity-operations.js.map +0 -1
  111. package/dist/code-first/parity.d.ts +0 -83
  112. package/dist/code-first/parity.d.ts.map +0 -1
  113. package/dist/code-first/parity.js +0 -301
  114. package/dist/code-first/parity.js.map +0 -1
  115. package/dist/code-first/presigned.d.ts +0 -21
  116. package/dist/code-first/presigned.d.ts.map +0 -1
  117. package/dist/code-first/presigned.js +0 -85
  118. package/dist/code-first/presigned.js.map +0 -1
  119. package/dist/code-first/project.d.ts +0 -130
  120. package/dist/code-first/project.d.ts.map +0 -1
  121. package/dist/code-first/project.js +0 -308
  122. package/dist/code-first/project.js.map +0 -1
  123. package/dist/code-first/python-build.d.ts +0 -78
  124. package/dist/code-first/python-build.d.ts.map +0 -1
  125. package/dist/code-first/python-build.js +0 -268
  126. package/dist/code-first/python-build.js.map +0 -1
  127. package/dist/code-first/python.d.ts +0 -103
  128. package/dist/code-first/python.d.ts.map +0 -1
  129. package/dist/code-first/python.js +0 -260
  130. package/dist/code-first/python.js.map +0 -1
  131. package/dist/code-first/redact.d.ts +0 -31
  132. package/dist/code-first/redact.d.ts.map +0 -1
  133. package/dist/code-first/redact.js +0 -159
  134. package/dist/code-first/redact.js.map +0 -1
  135. package/dist/code-first/register.d.ts +0 -35
  136. package/dist/code-first/register.d.ts.map +0 -1
  137. package/dist/code-first/register.js +0 -420
  138. package/dist/code-first/register.js.map +0 -1
  139. package/dist/code-first/remote.d.ts +0 -58
  140. package/dist/code-first/remote.d.ts.map +0 -1
  141. package/dist/code-first/remote.js +0 -126
  142. package/dist/code-first/remote.js.map +0 -1
  143. package/dist/code-first/replay.d.ts +0 -36
  144. package/dist/code-first/replay.d.ts.map +0 -1
  145. package/dist/code-first/replay.js +0 -52
  146. package/dist/code-first/replay.js.map +0 -1
  147. package/dist/code-first/shared.d.ts +0 -53
  148. package/dist/code-first/shared.d.ts.map +0 -1
  149. package/dist/code-first/shared.js +0 -94
  150. package/dist/code-first/shared.js.map +0 -1
  151. package/dist/code-first/test-suite-operations.d.ts +0 -16
  152. package/dist/code-first/test-suite-operations.d.ts.map +0 -1
  153. package/dist/code-first/test-suite-operations.js +0 -44
  154. package/dist/code-first/test-suite-operations.js.map +0 -1
  155. package/dist/config/apply.d.ts +0 -51
  156. package/dist/config/apply.d.ts.map +0 -1
  157. package/dist/config/apply.js +0 -121
  158. package/dist/config/apply.js.map +0 -1
  159. package/dist/config/commands.d.ts +0 -58
  160. package/dist/config/commands.d.ts.map +0 -1
  161. package/dist/config/commands.js +0 -252
  162. package/dist/config/commands.js.map +0 -1
  163. package/dist/config/profiles.d.ts +0 -108
  164. package/dist/config/profiles.d.ts.map +0 -1
  165. package/dist/config/profiles.js +0 -339
  166. package/dist/config/profiles.js.map +0 -1
  167. package/dist/flag-hint.d.ts +0 -46
  168. package/dist/flag-hint.d.ts.map +0 -1
  169. package/dist/flag-hint.js +0 -114
  170. package/dist/flag-hint.js.map +0 -1
  171. package/dist/modules.d.ts +0 -17
  172. package/dist/modules.d.ts.map +0 -1
  173. package/dist/modules.js +0 -65
  174. package/dist/modules.js.map +0 -1
  175. package/dist/phase-c/api.d.ts +0 -433
  176. package/dist/phase-c/api.d.ts.map +0 -1
  177. package/dist/phase-c/api.js +0 -334
  178. package/dist/phase-c/api.js.map +0 -1
  179. package/dist/phase-c/commands/activities.d.ts +0 -119
  180. package/dist/phase-c/commands/activities.d.ts.map +0 -1
  181. package/dist/phase-c/commands/activities.js +0 -287
  182. package/dist/phase-c/commands/activities.js.map +0 -1
  183. package/dist/phase-c/commands/batch.d.ts +0 -90
  184. package/dist/phase-c/commands/batch.d.ts.map +0 -1
  185. package/dist/phase-c/commands/batch.js +0 -296
  186. package/dist/phase-c/commands/batch.js.map +0 -1
  187. package/dist/phase-c/commands/queues.d.ts +0 -67
  188. package/dist/phase-c/commands/queues.d.ts.map +0 -1
  189. package/dist/phase-c/commands/queues.js +0 -183
  190. package/dist/phase-c/commands/queues.js.map +0 -1
  191. package/dist/phase-c/commands/run-control.d.ts +0 -76
  192. package/dist/phase-c/commands/run-control.d.ts.map +0 -1
  193. package/dist/phase-c/commands/run-control.js +0 -245
  194. package/dist/phase-c/commands/run-control.js.map +0 -1
  195. package/dist/phase-c/commands/schedules.d.ts +0 -63
  196. package/dist/phase-c/commands/schedules.d.ts.map +0 -1
  197. package/dist/phase-c/commands/schedules.js +0 -198
  198. package/dist/phase-c/commands/schedules.js.map +0 -1
  199. package/dist/phase-c/commands/search-attributes.d.ts +0 -30
  200. package/dist/phase-c/commands/search-attributes.d.ts.map +0 -1
  201. package/dist/phase-c/commands/search-attributes.js +0 -70
  202. package/dist/phase-c/commands/search-attributes.js.map +0 -1
  203. package/dist/phase-c/commands/signal-tokens.d.ts +0 -27
  204. package/dist/phase-c/commands/signal-tokens.d.ts.map +0 -1
  205. package/dist/phase-c/commands/signal-tokens.js +0 -68
  206. package/dist/phase-c/commands/signal-tokens.js.map +0 -1
  207. package/dist/phase-c/commands/worker-run.d.ts +0 -109
  208. package/dist/phase-c/commands/worker-run.d.ts.map +0 -1
  209. package/dist/phase-c/commands/worker-run.js +0 -484
  210. package/dist/phase-c/commands/worker-run.js.map +0 -1
  211. package/dist/phase-c/commands/workers.d.ts +0 -46
  212. package/dist/phase-c/commands/workers.d.ts.map +0 -1
  213. package/dist/phase-c/commands/workers.js +0 -140
  214. package/dist/phase-c/commands/workers.js.map +0 -1
  215. package/dist/phase-c/index.d.ts +0 -16
  216. package/dist/phase-c/index.d.ts.map +0 -1
  217. package/dist/phase-c/index.js +0 -25
  218. package/dist/phase-c/index.js.map +0 -1
  219. package/dist/phase-c/operations.d.ts +0 -67
  220. package/dist/phase-c/operations.d.ts.map +0 -1
  221. package/dist/phase-c/operations.js +0 -559
  222. package/dist/phase-c/operations.js.map +0 -1
  223. package/dist/phase-c/register.d.ts +0 -39
  224. package/dist/phase-c/register.d.ts.map +0 -1
  225. package/dist/phase-c/register.js +0 -678
  226. package/dist/phase-c/register.js.map +0 -1
  227. package/dist/phase-c/shared.d.ts +0 -44
  228. package/dist/phase-c/shared.d.ts.map +0 -1
  229. package/dist/phase-c/shared.js +0 -146
  230. package/dist/phase-c/shared.js.map +0 -1
  231. package/dist/product-defaults.d.ts +0 -11
  232. package/dist/product-defaults.d.ts.map +0 -1
  233. package/dist/product-defaults.js +0 -25
  234. package/dist/product-defaults.js.map +0 -1
  235. package/dist/program.d.ts +0 -25
  236. package/dist/program.d.ts.map +0 -1
  237. package/dist/program.js +0 -60
  238. package/dist/program.js.map +0 -1
@@ -1,204 +0,0 @@
1
- /**
2
- * `fluidgrids versions list <key>`: every stored version of a workflow with
3
- * the code bundle it references (`workflowCodeBundle`), so the build each
4
- * version runs, the builds a hotfix kept compatible and when it was replaced
5
- * are visible.
6
- *
7
- * Durable-function parity (BOFF-9905 B19, spec code-first 11 §2.27; each
8
- * needs fluidgrids.durable-parity, which the service checks):
9
- *
10
- * | Command | Operation |
11
- * |---|---|
12
- * | `versions rollout <key>` | `workflowRollouts` |
13
- * | `versions rollout <key> --to <version> --percent <n>` | `setWorkflowRollout` |
14
- * | `versions rollout delete <key>` | `deleteWorkflowRollout` |
15
- * | `versions drainage <key> <version>` | `workflowVersionDrainage` |
16
- * | `versions override <runId> --pin <version> \| --auto-upgrade \| --clear` | `setWorkflowRunVersioningOverride` |
17
- */
18
- import { createInterface } from 'readline/promises';
19
- import { CliUserError } from '@burdenoff/cli-sdk/core';
20
- import { runRefOf } from '../parity.js';
21
- import { sortVersions } from '../remote.js';
22
- import { emit, parseChoice } from '../shared.js';
23
- export async function runVersionsList(env, workflowKey, options) {
24
- const versions = sortVersions(await env.api.workflowVersions(workflowKey));
25
- const rows = [];
26
- for (const version of versions) {
27
- rows.push({ ...version, bundle: await env.api.codeBundle(workflowKey, version.version) });
28
- }
29
- emit(env, options, rows, {
30
- headers: ['Version', 'Status', 'Active', 'Created', 'Build', 'SDK', 'Replaced'],
31
- rows: rows.map((row) => [
32
- row.version,
33
- row.status,
34
- row.isActive ? 'yes' : 'no',
35
- row.createdAt,
36
- row.bundle ? row.bundle.buildId : '-',
37
- row.bundle ? row.bundle.sdkVersion : '-',
38
- row.bundle?.replacedAt ?? '-',
39
- ]),
40
- });
41
- return rows;
42
- }
43
- const ENVIRONMENTS = ['PROD', 'STAGING', 'DEV'];
44
- function rolloutRows(rollouts) {
45
- return rollouts.map((rollout) => [
46
- rollout.environment,
47
- rollout.fromVersion,
48
- rollout.toVersion,
49
- `${rollout.percent}%`,
50
- `${rollout.verifiedPercent}%`,
51
- rollout.activationCheck
52
- ? `${rollout.activationCheck.kind ?? 'CHECK'} ${rollout.activationCheck.status}`
53
- : '-',
54
- ]);
55
- }
56
- function checkLine(check, what) {
57
- if (!check || check.status === 'REPLACED' || check.status === 'REJECTED')
58
- return [];
59
- return [
60
- `${what} waits for replay check ${check.id} (${check.kind ?? 'CHECK'} ${check.status}): the affected runs move only once they replay against the new bundle.`,
61
- ];
62
- }
63
- /** `0` to `100`. */
64
- function parsePercent(raw) {
65
- if (raw === undefined || !/^\d{1,3}$/.test(raw.trim()) || Number(raw) > 100) {
66
- throw new CliUserError(`Invalid value '${raw ?? ''}' for --percent: expected 0 to 100.`);
67
- }
68
- return Number(raw.trim());
69
- }
70
- /**
71
- * Without `--to`: the workflow's rollouts. With `--to` and `--percent`: create
72
- * or change the PROD rollout (`percent: 100` promotes the version through the
73
- * activation check and removes the rollout).
74
- */
75
- export async function runRollout(env, workflowKey, options) {
76
- const headers = ['Environment', 'From', 'To', 'Percent', 'Verified', 'Check'];
77
- if (options.to === undefined && options.percent === undefined) {
78
- const rollouts = await env.api.workflowRollouts(workflowKey);
79
- emit(env, options, rollouts, { headers, rows: rolloutRows(rollouts) }, rollouts.length === 0 ? [`${workflowKey} has no rollout.`] : []);
80
- return rollouts;
81
- }
82
- if (options.to === undefined || options.to.trim() === '') {
83
- throw new CliUserError('--percent needs --to <version>.');
84
- }
85
- const input = {
86
- toVersion: options.to,
87
- percent: parsePercent(options.percent),
88
- };
89
- if (options.from !== undefined)
90
- input.fromVersion = options.from;
91
- const environment = parseChoice(options.environment?.toUpperCase(), '--environment', ENVIRONMENTS);
92
- if (environment)
93
- input.environment = environment;
94
- const rollout = await env.api.setWorkflowRollout(workflowKey, input);
95
- const details = [
96
- rollout.promoted
97
- ? `${rollout.toVersion} is promoted: it becomes the ACTIVE version${rollout.activationCheck ? ' once its activation check passes' : ''}.`
98
- : `${rollout.percent}% of new automatic starts of ${workflowKey} run ${rollout.toVersion}.`,
99
- ...checkLine(rollout.activationCheck, 'The rollout'),
100
- ];
101
- emit(env, options, rollout, { headers, rows: rolloutRows([rollout]) }, details);
102
- return rollout;
103
- }
104
- /**
105
- * Merge what the parent `versions rollout` command parsed into the `delete` options. Options typed
106
- * before `delete` (`rollout --environment STAGING delete k`) land on the parent; the environment
107
- * is honoured when it does not contradict the subcommand's own, and the setter-only options are
108
- * refused so a delete never silently ignores them.
109
- */
110
- export function rolloutDeleteOptions(options, parent) {
111
- for (const flag of ['to', 'percent', 'from']) {
112
- if (parent[flag] !== undefined) {
113
- throw new CliUserError(`--${flag} does not apply to \`versions rollout delete\`.`);
114
- }
115
- }
116
- const inherited = parent['environment'];
117
- if (typeof inherited !== 'string')
118
- return options;
119
- if (options.environment !== undefined && options.environment !== inherited) {
120
- throw new CliUserError(`Conflicting --environment values '${inherited}' and '${options.environment}'.`);
121
- }
122
- return { ...options, environment: inherited };
123
- }
124
- async function confirm(question) {
125
- const rl = createInterface({ input: process.stdin, output: process.stderr });
126
- try {
127
- const answer = await rl.question(`${question} [y/N] `);
128
- return /^y(es)?$/i.test(answer.trim());
129
- }
130
- finally {
131
- rl.close();
132
- }
133
- }
134
- /** Remove a rollout: every automatic start runs the ACTIVE version again. */
135
- export async function runRolloutDelete(env, workflowKey, options) {
136
- const environment = parseChoice(options.environment?.toUpperCase(), '--environment', ENVIRONMENTS);
137
- if (!options.force) {
138
- if (!env.interactive()) {
139
- throw new CliUserError(`Removing the rollout of ${workflowKey} needs confirmation.`, {
140
- hint: 'Pass --force to remove it without a prompt.',
141
- });
142
- }
143
- if (!(await confirm(`Remove the rollout of ${workflowKey}? New starts run the ACTIVE version.`))) {
144
- throw new CliUserError('Aborted: nothing was changed.');
145
- }
146
- }
147
- const removed = await env.api.deleteWorkflowRollout(workflowKey, environment);
148
- emit(env, options, { workflowKey, removed }, { headers: ['Workflow', 'Removed'], rows: [[workflowKey, removed ? 'yes' : 'no']] }, [removed ? `The rollout of ${workflowKey} is removed.` : `${workflowKey} had no rollout.`]);
149
- return removed;
150
- }
151
- // ----------------------------------------------------------- versions drainage
152
- /** Whether a version's bundle still serves open runs. */
153
- export async function runDrainage(env, workflowKey, version, options) {
154
- const drainage = await env.api.versionDrainage(workflowKey, version);
155
- emit(env, options, drainage, {
156
- headers: ['Version', 'Status', 'Open runs', 'Last run', 'Rollout target'],
157
- rows: [
158
- [
159
- drainage.version,
160
- drainage.status,
161
- String(drainage.openRuns),
162
- drainage.lastRunStartedAt ?? '-',
163
- drainage.rolloutTarget ? 'yes' : 'no',
164
- ],
165
- ],
166
- });
167
- return drainage;
168
- }
169
- /**
170
- * Set or remove a run's versioning override. A change that moves the run to
171
- * another bundle is replay-checked by the service first (`pendingOverride`).
172
- */
173
- export async function runOverride(env, runId, options) {
174
- const chosen = [options.pin !== undefined, options.autoUpgrade === true, options.clear === true];
175
- if (chosen.filter(Boolean).length !== 1) {
176
- throw new CliUserError('Give exactly one of --pin <version>, --auto-upgrade or --clear.');
177
- }
178
- let override = null;
179
- if (options.pin !== undefined) {
180
- if (options.pin.trim() === '')
181
- throw new CliUserError('--pin needs a version.');
182
- override = { behavior: 'PINNED', version: options.pin };
183
- }
184
- else if (options.autoUpgrade) {
185
- override = { behavior: 'AUTO_UPGRADE' };
186
- }
187
- const ref = runRefOf(runId, options);
188
- const run = await env.api.setRunVersioningOverride(ref, override, options.reason);
189
- const versioning = run.versioning;
190
- const rows = [
191
- ['Run', run.id],
192
- ['Behavior', versioning?.behavior ?? '-'],
193
- [
194
- 'Override',
195
- versioning?.override
196
- ? `${versioning.override.behavior}${versioning.override.version ? ` ${versioning.override.version}` : ''}`
197
- : '-',
198
- ],
199
- ['Serving version', versioning?.servingVersion ?? run.version],
200
- ];
201
- emit(env, options, run, { headers: ['Field', 'Value'], rows }, checkLine(versioning?.pendingOverride, 'The override'));
202
- return run;
203
- }
204
- //# sour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C,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE;gBAC1G,CAAC,CAAC,GAAG;SACR;QACD,CAAC,iBAAiB,EAAE,UAAU,EAAE,cAAc,IAAI,GAAG,CAAC,OAAO,CAAC;KAC/D,CAAC;IACF,IAAI,CACF,GAAG,EACH,OAAO,EACP,GAAG,EACH,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,EACrC,SAAS,CAAC,UAAU,EAAE,eAAe,EAAE,cAAc,CAAC,CACvD,CAAC;IACF,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -1,55 +0,0 @@
1
- /**
2
- * Connection names in code (`connection: 'slack-ops'`) resolve to the
3
- * `{ connectionId, adapter }` references a node stores (spec 07 §3 rule 7, §6).
4
- *
5
- * The id comes from the workspace's connections, matched by name. The adapter
6
- * is the name of the node's connection slot, which a connection name alone does
7
- * not tell, so it is taken, in order, from:
8
- * 1. the adapter the remote versions of the pushed workflows already bind that
9
- * connection to (exact for every workflow that was pulled), then
10
- * 2. the one adapter in the node registry whose provider is the connection's
11
- * provider.
12
- * When neither gives exactly one answer the name is left unresolved and the CLI
13
- * says why; the code can then bind the connection by id with
14
- * `connections: [{ connectionId, adapter }]`.
15
- */
16
- import type { ConnectionRef, NodeManifest } from '@fluidgrids/workflows/ir';
17
- import type { WorkspaceConnection } from './api.js';
18
- export interface ConnectionIndex {
19
- /** Name → reference, for every name that resolves to exactly one reference. */
20
- refs: Record<string, ConnectionRef>;
21
- /** Name → why it does not resolve. */
22
- problems: Record<string, string>;
23
- /** connectionId → name, for lifting. */
24
- namesById: Record<string, string>;
25
- }
26
- /** connectionId → every adapter a definition binds it to. */
27
- export declare function adaptersInDefinitions(definitions: readonly unknown[]): Map<string, Set<string>>;
28
- /**
29
- * Provider key (lower case) → the adapter names the registry declares for it,
30
- * from `connectionAdapters` / `credentialAdapters` on manifests and operations,
31
- * the shapes the builder reads. The wildcard provider `*` is not indexed: it
32
- * accepts any connection, so it never identifies one adapter.
33
- */
34
- export declare function registryAdaptersByProvider(manifests: readonly NodeManifest[]): Map<string, Set<string>>;
35
- export declare function buildConnectionIndex(connections: readonly WorkspaceConnection[], options?: {
36
- remoteDefinitions?: readonly unknown[];
37
- registry?: readonly NodeManifest[];
38
- }): ConnectionIndex;
39
- /** One line per unresolved name, saying what to do. */
40
- export declare function explainUnresolved(names: readonly string[], index: ConnectionIndex): string[];
41
- /**
42
- * A resolver that accepts every name, for `validate --offline`: the reference
43
- * marks the name instead of pointing at a real connection.
44
- */
45
- export declare function placeholderRef(name: string): ConnectionRef;
46
- /**
47
- * The part of a connectionId → name map that lifting `definitions` needs: the
48
- * ids the definitions bind, plus every other id that shares one of their names,
49
- * so a name two connections have is still recognised as ambiguous. The service
50
- * caps the map it accepts (500 entries), and a workspace may hold more.
51
- */
52
- export declare function namesForDefinitions(namesById: Readonly<Record<string, string>>, definitions: readonly unknown[]): Record<string, string>;
53
- /** The subset of `refs` that `names` asks for: what a lowering actually resolved. */
54
- export declare function refsForNames(refs: Readonly<Record<string, ConnectionRef>>, names: Iterable<string>): Record<string, ConnectionRef>;
55
- //# sourceMappingURL=connections.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"connections.d.ts","sourceRoot":"","sources":["../../src/code-first/connections.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAG5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,MAAM,WAAW,eAAe;IAC9B,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACpC,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAA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: 'slack-ops'`) resolve to the
3
- * `{ connectionId, adapter }` references a node stores (spec 07 §3 rule 7, §6).
4
- *
5
- * The id comes from the workspace's connections, matched by name. The adapter
6
- * is the name of the node's connection slot, which a connection name alone does
7
- * not tell, so it is taken, in order, from:
8
- * 1. the adapter the remote versions of the pushed workflows already bind that
9
- * connection to (exact for every workflow that was pulled), then
10
- * 2. the one adapter in the node registry whose provider is the connection's
11
- * provider.
12
- * When neither gives exactly one answer the name is left unresolved and the CLI
13
- * says why; the code can then bind the connection by id with
14
- * `connections: [{ connectionId, adapter }]`.
15
- */
16
- import { operationsOf } from '@fluidgrids/workflows/ir';
17
- function isRecord(value) {
18
- return typeof value === 'object' && value !== null && !Array.isArray(value);
19
- }
20
- function setOwn(target, key, value) {
21
- Object.defineProperty(target, key, {
22
- value,
23
- enumerable: true,
24
- writable: true,
25
- configurable: true,
26
- });
27
- }
28
- function getOwn(record, key) {
29
- return Object.hasOwn(record, key) ? record[key] : undefined;
30
- }
31
- /** connectionId → every adapter a definition binds it to. */
32
- export function adaptersInDefinitions(definitions) {
33
- const out = new Map();
34
- for (const definition of definitions) {
35
- const data = isRecord(definition) && isRecord(definition['data']) ? definition['data'] : {};
36
- const nodes = Array.isArray(data['nodes']) ? data['nodes'] : [];
37
- for (const node of nodes) {
38
- const args = isRecord(node) && isRecord(node['args']) ? node['args'] : undefined;
39
- const refs = Array.isArray(args?.['connections']) ? args['connections'] : [];
40
- for (const ref of refs) {
41
- if (isRecord(ref) &&
42
- typeof ref['connectionId'] === 'string' &&
43
- typeof ref['adapter'] === 'string') {
44
- const set = out.get(ref['connectionId']) ?? new Set();
45
- set.add(ref['adapter']);
46
- out.set(ref['connectionId'], set);
47
- }
48
- }
49
- }
50
- }
51
- return out;
52
- }
53
- function adapterDeclarations(value) {
54
- if (!Array.isArray(value))
55
- return [];
56
- return value
57
- .filter(isRecord)
58
- .map((entry) => ({
59
- name: typeof entry['name'] === 'string' ? entry['name'].trim() : '',
60
- provider: typeof entry['provider'] === 'string' ? entry['provider'].trim() : '',
61
- }))
62
- .filter((entry) => entry.name !== '' && entry.provider !== '');
63
- }
64
- /**
65
- * Provider key (lower case) → the adapter names the registry declares for it,
66
- * from `connectionAdapters` / `credentialAdapters` on manifests and operations,
67
- * the shapes the builder reads. The wildcard provider `*` is not indexed: it
68
- * accepts any connection, so it never identifies one adapter.
69
- */
70
- export function registryAdaptersByProvider(manifests) {
71
- const out = new Map();
72
- const add = (declarations) => {
73
- for (const { name, provider } of declarations) {
74
- if (provider === '*')
75
- continue;
76
- const key = provider.toLowerCase();
77
- const set = out.get(key) ?? new Set();
78
- set.add(name);
79
- out.set(key, set);
80
- }
81
- };
82
- for (const manifest of manifests) {
83
- add(adapterDeclarations(manifest['connectionAdapters']));
84
- add(adapterDeclarations(manifest['credentialAdapters']));
85
- for (const operation of operationsOf(manifest)) {
86
- add(adapterDeclarations(operation['connectionAdapters']));
87
- add(adapterDeclarations(operation['credentialAdapters']));
88
- }
89
- }
90
- return out;
91
- }
92
- function only(set) {
93
- return set && set.size === 1 ? [...set][0] : undefined;
94
- }
95
- export function buildConnectionIndex(connections, options = {}) {
96
- const bound = adaptersInDefinitions(options.remoteDefinitions ?? []);
97
- const byProvider = registryAdaptersByProvider(options.registry ?? []);
98
- const byName = new Map();
99
- const namesById = {};
100
- for (const connection of connections) {
101
- byName.set(connection.name, [...(byName.get(connection.name) ?? []), connection]);
102
- setOwn(namesById, connection.id, connection.name);
103
- }
104
- const refs = {};
105
- const problems = {};
106
- for (const [name, matches] of [...byName].sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0))) {
107
- const [connection] = matches;
108
- if (matches.length > 1 || !connection) {
109
- setOwn(problems, name, `${matches.length} connections are named "${name}"; rename one, or bind by id with connections: [{ connectionId, adapter }]`);
110
- continue;
111
- }
112
- const used = bound.get(connection.id);
113
- if (used && used.size > 1) {
114
- setOwn(problems, name, `"${name}" is bound to several adapters (${[...used].sort().join(', ')}); bind it by id with connections: [{ connectionId, adapter }]`);
115
- continue;
116
- }
117
- const adapter = only(used) ??
118
- (connection.providerKey
119
- ? only(byProvider.get(connection.providerKey.toLowerCase()))
120
- : undefined);
121
- if (adapter === undefined) {
122
- const candidates = connection.providerKey
123
- ? [...(byProvider.get(connection.providerKey.toLowerCase()) ?? [])].sort()
124
- : [];
125
- setOwn(problems, name, candidates.length > 1
126
- ? `"${name}" (provider ${connection.providerKey}) fits several adapters (${candidates.join(', ')}); bind it by id with connections: [{ connectionId: '${connection.id}', adapter }]`
127
- : `no node declares an adapter for "${name}" (provider ${connection.providerKey ?? 'unknown'}); bind it by id with connections: [{ connectionId: '${connection.id}', adapter }]`);
128
- continue;
129
- }
130
- setOwn(refs, name, { connectionId: connection.id, adapter });
131
- }
132
- return { refs, problems, namesById };
133
- }
134
- /** One line per unresolved name, saying what to do. */
135
- export function explainUnresolved(names, index) {
136
- return [...names].sort().map((name) => {
137
- const problem = getOwn(index.problems, name);
138
- return problem
139
- ? `${name}: ${problem}`
140
- : `${name}: no connection with this name exists in the workspace; create it first`;
141
- });
142
- }
143
- /**
144
- * A resolver that accepts every name, for `validate --offline`: the reference
145
- * marks the name instead of pointing at a real connection.
146
- */
147
- export function placeholderRef(name) {
148
- return { connectionId: `unresolved:${name}`, adapter: 'unresolved' };
149
- }
150
- /**
151
- * The part of a connectionId → name map that lifting `definitions` needs: the
152
- * ids the definitions bind, plus every other id that shares one of their names,
153
- * so a name two connections have is still recognised as ambiguous. The service
154
- * caps the map it accepts (500 entries), and a workspace may hold more.
155
- */
156
- export function namesForDefinitions(namesById, definitions) {
157
- const used = new Set();
158
- for (const id of adaptersInDefinitions(definitions).keys()) {
159
- const name = getOwn(namesById, id);
160
- if (name !== undefined)
161
- used.add(name);
162
- }
163
- const out = {};
164
- for (const [id, name] of Object.entries(namesById)) {
165
- if (used.has(name))
166
- setOwn(out, id, name);
167
- }
168
- return out;
169
- }
170
- /** The subset of `refs` that `names` asks for: what a lowering actually resolved. */
171
- export function refsForNames(refs, names) {
172
- const out = {};
173
- for (const name of names) {
174
- const ref = getOwn(refs, name);
175
- if (ref !== undefined)
176
- setOwn(out, name, ref);
177
- }
178
- return out;
179
- }
180
- //# sourceMappingURL=connections.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"connections.js","sourceRoot":"","sources":["../../src/code-first/connections.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAaxD,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,MAAM,CAAI,MAAyB,EAAE,GAAW,EAAE,KAAQ;IACjE,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE;QACjC,KAAK;QACL,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,IAAI;QACd,YAAY,EAAE,IAAI;KACnB,CAAC,CAAC;AACL,CAAC;AAED,SAAS,MAAM,CAAI,MAAyB,EAAE,GAAW;IACvD,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC9D,CAAC;AAED,6DAA6D;AAC7D,MAAM,UAAU,qBAAqB,CAAC,WAA+B;IACnE,MAAM,GAAG,GAAG,IAAI,GAAG,EAAuB,CAAC;IAC3C,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;QACrC,MAAM,IAAI,GAAG,QAAQ,CAAC,UAAU,CAAC,IAAI,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5F,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC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IAC/B,KAAK,MAAM,EAAE,IAAI,qBAAqB,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;QAC3D,MAAM,IAAI,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QACnC,IAAI,IAAI,KAAK,SAAS;YAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IACD,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,KAAK,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;QACnD,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,MAAM,CAAC,GAAG,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;IAC5C,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,qFAAqF;AACrF,MAAM,UAAU,YAAY,CAC1B,IAA6C,EAC7C,KAAuB;IAEvB,MAAM,GAAG,GAAkC,EAAE,CAAC;IAC9C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC/B,IAAI,GAAG,KAAK,SAAS;YAAE,MAAM,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;IAChD,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -1,41 +0,0 @@
1
- /**
2
- * GraphQL documents for durable functions (managed tier-2 workflows, BOFF-9905
3
- * Phase B): code bundle upload and hotfix, durable run start, history, signal,
4
- * terminate and stack trace.
5
- *
6
- * Every document targets the WORKSPACE gateway (wspace-workflow-svc). The names
7
- * and shapes are the Phase B contract (PLAN-B §5 B8 and B9, spec 08 §4). They
8
- * are validated by `tests/code-first/durable-operations.test.ts` against the
9
- * vendored supergraph.
10
- *
11
- * The service gates every operation that starts new durable work
12
- * (`prepareWorkflowCodeUpload`, `replaceWorkflowVersionCode`, `startWorkflow`,
13
- * `signalWorkflowRun` on a DURABLE_FN run, and versions with a `codeBundle`) on
14
- * the `fluidgrids.durable-functions` feature flag, fail closed. A workspace
15
- * without the flag gets a GraphQL error that the CLI prints as it is; the CLI
16
- * never decides the flag itself.
17
- */
18
- /** A presigned bundle PUT (skipped when `alreadyStored`) and a presigned source PUT. */
19
- export declare const CF_PREPARE_WORKFLOW_CODE_UPLOAD = "\n mutation FluidgridsCodePrepareWorkflowCodeUpload($input: PrepareWorkflowCodeUploadInput!) {\n prepareWorkflowCodeUpload(input: $input) {\n uploadId\n bundle { url method headers expiresAt alreadyStored }\n source { url method headers expiresAt alreadyStored }\n }\n }\n";
20
- /** Hotfix: replace the bundle of an existing version; an asynchronous, replay-verified job. */
21
- export declare const CF_REPLACE_WORKFLOW_VERSION_CODE = "\n mutation FluidgridsCodeReplaceWorkflowVersionCode(\n $workflowKey: String!\n $version: String!\n $codeBundle: CodeBundleInput!\n $verifyReplay: Boolean\n ) {\n replaceWorkflowVersionCode(\n workflowKey: $workflowKey\n version: $version\n codeBundle: $codeBundle\n verifyReplay: $verifyReplay\n ) { \n id status buildId previousBuildId verifiedRuns\n violations { runId seq message }\n }\n }\n";
22
- /** Poll a hotfix job. */
23
- export declare const CF_WORKFLOW_CODE_REPLACE = "\n query FluidgridsCodeWorkflowCodeReplace($id: ID!) {\n workflowCodeReplace(id: $id) { \n id status buildId previousBuildId verifiedRuns\n violations { runId seq message }\n }\n }\n";
24
- /** The code bundle a version references, or null for a version without code. */
25
- export declare const CF_WORKFLOW_CODE_BUNDLE = "\n query FluidgridsCodeWorkflowCodeBundle($workflowKey: String!, $version: String!) {\n workflowCodeBundle(workflowKey: $workflowKey, version: $version) {\n id buildId language sdkVersion entry exports determinism\n bundleBytes sourceBytes compatibleBuildIds replacedAt createdAt\n }\n }\n";
26
- /** Start a root durable-function run (DB18). */
27
- export declare const CF_START_WORKFLOW = "\n mutation FluidgridsCodeStartWorkflow($input: StartWorkflowInput!) {\n startWorkflow(input: $input) {\n existing\n run { \n id workflowId workflowKey version status mode triggerNodeId\n executionKind workflowFn taskQueue buildId historyLength parentClosePolicy\n parentRunId rootRunId cancelRequestedAt\n createdAt startedAt completedAt errorMessage errorType\n determinism { failing cause attempts since lastFailureSeq message }\n }\n }\n }\n";
28
- /** One run with its durable fields. */
29
- export declare const CF_DESCRIBE_RUN = "\n query FluidgridsCodeDescribeRun($id: ID!) {\n workflowRun(id: $id) { \n id workflowId workflowKey version status mode triggerNodeId\n executionKind workflowFn taskQueue buildId historyLength parentClosePolicy\n parentRunId rootRunId cancelRequestedAt\n createdAt startedAt completedAt errorMessage errorType\n determinism { failing cause attempts since lastFailureSeq message }\n }\n }\n";
30
- /** One page of a run's event history. */
31
- export declare const CF_WORKFLOW_RUN_HISTORY = "\n query FluidgridsCodeWorkflowRunHistory($runId: ID!, $after: Int, $limit: Int) {\n workflowRunHistory(runId: $runId, after: $after, limit: $limit) {\n events { runId seq type taskId payload payloadUrl createdAt }\n nextAfter hasMore historyLength historyBytes\n }\n }\n";
32
- export declare const CF_SIGNAL_WORKFLOW_RUN = "\n mutation FluidgridsCodeSignalWorkflowRun(\n $runId: ID!\n $name: String!\n $payload: JSON\n $idempotencyKey: String\n ) {\n signalWorkflowRun(runId: $runId, name: $name, payload: $payload, idempotencyKey: $idempotencyKey) {\n accepted delivered buffered forwardedToRunId seq duplicate\n }\n }\n";
33
- /** Terminate a run of either kind; no code runs (durable) and no node runs (graph). */
34
- export declare const CF_TERMINATE_WORKFLOW_RUN = "\n mutation FluidgridsCodeTerminateWorkflowRun($runId: ID!, $reason: String) {\n terminateWorkflowRun(runId: $runId, reason: $reason) { id status completedAt errorMessage }\n }\n";
35
- /** The built-in `__stack_trace` / `__enhanced_stack_trace` query, replayed in the service. */
36
- export declare const CF_WORKFLOW_RUN_STACK_TRACE = "\n query FluidgridsCodeWorkflowRunStackTrace($runId: ID!, $enhanced: Boolean) {\n workflowRunStackTrace(runId: $runId, enhanced: $enhanced) { trace enhanced }\n }\n";
37
- /** Runs of one workflow key (newest first), for `push --hotfix --replay-sample`. */
38
- export declare const CF_LIST_RUNS = "\n query FluidgridsCodeListRuns($input: ListWorkflowRunsInput!) {\n workflowRuns(input: $input) {\n items { id workflowKey version status executionKind }\n hasMore\n }\n }\n";
39
- /** Trigger a stored version from one of its trigger nodes (`fluidgrids run`). */
40
- export declare const CF_TRIGGER_WORKFLOW = "\n mutation FluidgridsCodeTriggerWorkflow($input: TriggerWorkflowInput!) {\n triggerWorkflow(input: $input) { runId status workflowKey version triggerNodeId }\n }\n";
41
- //# sourceMappingURL=durable-operations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"durable-operations.d.ts","sourceRoot":"","sources":["../../src/code-first/durable-operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,wFAAwF;AACxF,eAAO,MAAM,+BAA+B,4SAQ3C,CAAC;AAOF,+FAA+F;AAC/F,eAAO,MAAM,gCAAgC,2bAc5C,CAAC;AAEF,yBAAyB;AACzB,eAAO,MAAM,wBAAwB,kMAIpC,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,uBAAuB,wTAOnC,CAAC;AAWF,gDAAgD;AAChD,eAAO,MAAM,iBAAiB,ydAO7B,CAAC;AAEF,uCAAuC;AACvC,eAAO,MAAM,eAAe,qZAI3B,CAAC;AAEF,yCAAyC;AACzC,eAAO,MAAM,uBAAuB,sSAOnC,CAAC;AAEF,eAAO,MAAM,sBAAsB,wUAWlC,CAAC;AAEF,uFAAuF;AACvF,eAAO,MAAM,yBAAyB,4LAIrC,CAAC;AAEF,8FAA8F;AAC9F,eAAO,MAAM,2BAA2B,8KAIvC,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,YAAY,oMAOxB,CAAC;AAEF,iFAAiF;AACjF,eAAO,MAAM,mBAAmB,8KAI/B,CAAC"}