@numa-tech/numa 1.14.28 → 1.14.30

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 (94) hide show
  1. package/README.md +35 -201
  2. package/dist/application-onboarding/client.d.ts +3 -17
  3. package/dist/application-onboarding/client.js +1 -14
  4. package/dist/application-onboarding/client.js.map +1 -1
  5. package/dist/application-onboarding/commands.d.ts +0 -2
  6. package/dist/application-onboarding/commands.js +5 -76
  7. package/dist/application-onboarding/commands.js.map +1 -1
  8. package/dist/application-onboarding/schemas.d.ts +28 -301
  9. package/dist/application-onboarding/schemas.js +13 -91
  10. package/dist/application-onboarding/schemas.js.map +1 -1
  11. package/dist/cli.js +0 -2
  12. package/dist/cli.js.map +1 -1
  13. package/dist/command-catalog.js +6 -336
  14. package/dist/command-catalog.js.map +1 -1
  15. package/dist/gitops/client.d.ts +0 -38
  16. package/dist/gitops/client.js +1 -9
  17. package/dist/gitops/client.js.map +1 -1
  18. package/dist/gitops/commands.js +1 -20
  19. package/dist/gitops/commands.js.map +1 -1
  20. package/dist/gitops/schemas.d.ts +0 -112
  21. package/dist/gitops/schemas.js +0 -38
  22. package/dist/gitops/schemas.js.map +1 -1
  23. package/dist/jenkins/commands.d.ts +0 -4
  24. package/dist/jenkins/commands.js +0 -10
  25. package/dist/jenkins/commands.js.map +1 -1
  26. package/dist/jenkins-jobs/commands.d.ts +0 -2
  27. package/dist/jenkins-jobs/commands.js +0 -2
  28. package/dist/jenkins-jobs/commands.js.map +1 -1
  29. package/dist/pipeline/commands.js +0 -2
  30. package/dist/pipeline/commands.js.map +1 -1
  31. package/dist/platform-profile.d.ts +2 -0
  32. package/dist/platform-profile.js +2 -1
  33. package/dist/platform-profile.js.map +1 -1
  34. package/package.json +4 -4
  35. package/skills/numa-create-application/SKILL.md +30 -163
  36. package/skills/numa-create-application/agents/openai.yaml +2 -2
  37. package/skills/numa-create-application/evals/evals.json +9 -150
  38. package/skills/numa-create-application/references/checklist.md +22 -139
  39. package/skills/numa-create-application/references/numa-cli.md +27 -257
  40. package/skills/numa-create-application/references/promote-workflows.md +22 -188
  41. package/skills/numa-create-application/scripts/inspect-project.mjs +1 -1
  42. package/skills/numa-jenkins-deployment/SKILL.md +21 -132
  43. package/skills/numa-jenkins-deployment/agents/openai.yaml +2 -2
  44. package/skills/numa-jenkins-deployment/evals/evals.json +9 -59
  45. package/skills/numa-jenkins-deployment/references/cli-contract.md +22 -101
  46. package/skills/numa-jenkins-deployment/references/diagnostics.md +2 -2
  47. package/skills/numa-jenkins-deployment/references/release-policy.md +19 -85
  48. package/skills/numa-local-flux-deploy/SKILL.md +1 -1
  49. package/skills/numa-local-flux-deploy/references/local-flux-release.md +1 -1
  50. package/dist/integration-bootstrap/client.d.ts +0 -61
  51. package/dist/integration-bootstrap/client.js +0 -293
  52. package/dist/integration-bootstrap/client.js.map +0 -1
  53. package/dist/integration-bootstrap/commands.d.ts +0 -86
  54. package/dist/integration-bootstrap/commands.js +0 -615
  55. package/dist/integration-bootstrap/commands.js.map +0 -1
  56. package/dist/integration-bootstrap/schemas.d.ts +0 -831
  57. package/dist/integration-bootstrap/schemas.js +0 -565
  58. package/dist/integration-bootstrap/schemas.js.map +0 -1
  59. package/dist/jenkins-gitops-rollouts/client.d.ts +0 -197
  60. package/dist/jenkins-gitops-rollouts/client.js +0 -126
  61. package/dist/jenkins-gitops-rollouts/client.js.map +0 -1
  62. package/dist/jenkins-gitops-rollouts/commands.d.ts +0 -50
  63. package/dist/jenkins-gitops-rollouts/commands.js +0 -358
  64. package/dist/jenkins-gitops-rollouts/commands.js.map +0 -1
  65. package/dist/jenkins-gitops-rollouts/schemas.d.ts +0 -217
  66. package/dist/jenkins-gitops-rollouts/schemas.js +0 -131
  67. package/dist/jenkins-gitops-rollouts/schemas.js.map +0 -1
  68. package/dist/platform-build-job-replans/client.d.ts +0 -291
  69. package/dist/platform-build-job-replans/client.js +0 -148
  70. package/dist/platform-build-job-replans/client.js.map +0 -1
  71. package/dist/platform-build-job-replans/commands.d.ts +0 -6
  72. package/dist/platform-build-job-replans/commands.js +0 -373
  73. package/dist/platform-build-job-replans/commands.js.map +0 -1
  74. package/dist/platform-build-job-replans/schemas.d.ts +0 -147
  75. package/dist/platform-build-job-replans/schemas.js +0 -151
  76. package/dist/platform-build-job-replans/schemas.js.map +0 -1
  77. package/dist/platform-build-rollouts/client.d.ts +0 -346
  78. package/dist/platform-build-rollouts/client.js +0 -153
  79. package/dist/platform-build-rollouts/client.js.map +0 -1
  80. package/dist/platform-build-rollouts/commands.d.ts +0 -98
  81. package/dist/platform-build-rollouts/commands.js +0 -465
  82. package/dist/platform-build-rollouts/commands.js.map +0 -1
  83. package/dist/platform-build-rollouts/schemas.d.ts +0 -348
  84. package/dist/platform-build-rollouts/schemas.js +0 -257
  85. package/dist/platform-build-rollouts/schemas.js.map +0 -1
  86. package/dist/platform-builds/client.d.ts +0 -147
  87. package/dist/platform-builds/client.js +0 -115
  88. package/dist/platform-builds/client.js.map +0 -1
  89. package/dist/platform-builds/commands.d.ts +0 -7
  90. package/dist/platform-builds/commands.js +0 -226
  91. package/dist/platform-builds/commands.js.map +0 -1
  92. package/dist/platform-builds/schemas.d.ts +0 -127
  93. package/dist/platform-builds/schemas.js +0 -66
  94. package/dist/platform-builds/schemas.js.map +0 -1
@@ -1,293 +0,0 @@
1
- import { createHash } from "node:crypto";
2
- import { resolveBackendUrl } from "../backend.js";
3
- import { ensureAccessToken, fetchWithKeycloakIdentity } from "../oauth.js";
4
- import { PipelineError } from "../pipeline/errors.js";
5
- import { IntegrationBootstrapActionStartSchema, IntegrationBootstrapActionViewSchema, IntegrationBootstrapApplyStartSchema, IntegrationBootstrapRunViewSchema, IntegrationBootstrapSessionSchema, IntegrationBootstrapStartSchema, IntegrationBootstrapTrustAnchorClientSchema } from "./schemas.js";
6
- export const INTEGRATION_BOOTSTRAP_V2_ROOT = "/api/v1/admin/integration-bootstrap/jenkins-gitops-writer/v2";
7
- export const INTEGRATION_BOOTSTRAP_PLAN_SESSION_ROOT = `${INTEGRATION_BOOTSTRAP_V2_ROOT}/plan-sessions`;
8
- export const INTEGRATION_BOOTSTRAP_RUN_ROOT = `${INTEGRATION_BOOTSTRAP_V2_ROOT}/runs`;
9
- export const INTEGRATION_BOOTSTRAP_TRUST_ANCHOR_CONFIGURATION = "/public/v1/keycloak-bootstrap/client-configuration";
10
- export const INTEGRATION_BOOTSTRAP_TRUST_ANCHOR_CALLBACK = "/public/v1/keycloak-bootstrap/callback";
11
- const STABLE_KEY = /^[A-Za-z0-9][A-Za-z0-9._:-]{7,199}$/u;
12
- const PLAN_SESSION_NO = /^ibp2_[0-9a-f]{32}$/u;
13
- const RUN_NO = /^ibar_[0-9a-f]{32}$/u;
14
- const ACTION_NO = /^ibaa_[0-9a-f]{32}$/u;
15
- const DIGEST = /^[0-9a-f]{64}$/u;
16
- const MAX_RESPONSE_BYTES = 1_048_576;
17
- function stableKey(value, label) {
18
- if (!STABLE_KEY.test(value)) {
19
- throw new PipelineError(`${label} must be 8-200 characters, start with a letter or number, and use only letters, numbers, . _ : or -.`, "INTEGRATION_BOOTSTRAP_INPUT_INVALID");
20
- }
21
- return value;
22
- }
23
- export function integrationBootstrapIdempotencyKey(value) {
24
- try {
25
- return stableKey(value, "idempotency-key");
26
- }
27
- catch (error) {
28
- if (error instanceof PipelineError) {
29
- throw new PipelineError(error.message, "INTEGRATION_BOOTSTRAP_IDEMPOTENCY_INVALID");
30
- }
31
- throw error;
32
- }
33
- }
34
- export function integrationBootstrapClientRequestId(value) {
35
- return stableKey(value, "client-request-id");
36
- }
37
- function stableIdentifier(value, pattern, label) {
38
- if (!pattern.test(value)) {
39
- throw new PipelineError(`${label} is invalid.`, "INTEGRATION_BOOTSTRAP_INPUT_INVALID");
40
- }
41
- return value;
42
- }
43
- function planSessionNo(value) {
44
- return stableIdentifier(value, PLAN_SESSION_NO, "Integration bootstrap plan session number");
45
- }
46
- export function integrationBootstrapRunNo(value) {
47
- return stableIdentifier(value, RUN_NO, "Integration bootstrap run number");
48
- }
49
- function actionNo(value) {
50
- return stableIdentifier(value, ACTION_NO, "Integration bootstrap action number");
51
- }
52
- function planDigest(value) {
53
- return stableIdentifier(value, DIGEST, "Integration bootstrap plan digest");
54
- }
55
- function expectedRunVersion(value) {
56
- if (!Number.isSafeInteger(value) || value < 0 || value > 2_147_483_647) {
57
- throw new PipelineError("expected-run-version must be a non-negative 32-bit integer.", "INTEGRATION_BOOTSTRAP_INPUT_INVALID");
58
- }
59
- return value;
60
- }
61
- function query(path, name, value) {
62
- const search = new URLSearchParams({ [name]: value });
63
- return `${path}?${search.toString()}`;
64
- }
65
- function safeRequestId(response) {
66
- const value = response.headers.get("x-request-id");
67
- return value != null && value.length <= 256 && !/[\u0000-\u001f\u007f]/u.test(value)
68
- ? value
69
- : undefined;
70
- }
71
- async function successfulBody(response) {
72
- const length = response.headers.get("content-length");
73
- if (length != null && Number(length) > MAX_RESPONSE_BYTES) {
74
- throw new PipelineError("Integration bootstrap API response exceeded the safe CLI size limit.", "INTEGRATION_BOOTSTRAP_INVALID_RESPONSE", response.status, safeRequestId(response));
75
- }
76
- const text = await response.text();
77
- if (Buffer.byteLength(text, "utf8") > MAX_RESPONSE_BYTES) {
78
- throw new PipelineError("Integration bootstrap API response exceeded the safe CLI size limit.", "INTEGRATION_BOOTSTRAP_INVALID_RESPONSE", response.status, safeRequestId(response));
79
- }
80
- try {
81
- return JSON.parse(text);
82
- }
83
- catch {
84
- throw new PipelineError("Integration bootstrap API returned non-JSON data.", "INTEGRATION_BOOTSTRAP_INVALID_RESPONSE", response.status, safeRequestId(response));
85
- }
86
- }
87
- function startResultUnknown(status, requestId) {
88
- return new PipelineError("Integration bootstrap action result is unknown. Do not choose a new key or replay automatically; resolve with the original client-request-id.", "INTEGRATION_BOOTSTRAP_START_RESULT_UNKNOWN", status, requestId);
89
- }
90
- function identityInvalid(message) {
91
- return new PipelineError(message, "INTEGRATION_BOOTSTRAP_INVALID_RESPONSE");
92
- }
93
- export class IntegrationBootstrapClient {
94
- config;
95
- fetchImpl;
96
- tokenProvider;
97
- constructor(config, dependencies = {}) {
98
- this.config = config;
99
- this.fetchImpl = dependencies.fetch ?? fetch;
100
- this.tokenProvider = dependencies.tokenProvider ?? ensureAccessToken;
101
- }
102
- async authenticatedFetch(path, init = {}) {
103
- const method = String(init.method ?? "GET").toUpperCase();
104
- const url = resolveBackendUrl(this.config, { method, path });
105
- const headers = new Headers(init.headers);
106
- headers.set("Accept", "application/json");
107
- if (init.body != null)
108
- headers.set("Content-Type", "application/json");
109
- return fetchWithKeycloakIdentity(this.config, url, () => ({ ...init, headers }), { fetch: this.fetchImpl, tokenProvider: this.tokenProvider });
110
- }
111
- async json(path, schema, init = {}, expectedStatuses = [200], operation = "read") {
112
- let response;
113
- try {
114
- response = await this.authenticatedFetch(path, init);
115
- }
116
- catch (error) {
117
- if (error instanceof TypeError) {
118
- if (operation === "start")
119
- throw startResultUnknown();
120
- throw new PipelineError("Integration bootstrap durable state could not be read. No external mutation was requested by this GET.", "INTEGRATION_BOOTSTRAP_READ_UNAVAILABLE");
121
- }
122
- throw error;
123
- }
124
- if (!response.ok) {
125
- if (operation === "start" && response.status >= 500) {
126
- throw startResultUnknown(response.status, safeRequestId(response));
127
- }
128
- const code = response.status === 401
129
- ? "INTEGRATION_BOOTSTRAP_AUTHENTICATION_REQUIRED"
130
- : response.status === 403
131
- ? "INTEGRATION_BOOTSTRAP_FORBIDDEN"
132
- : response.status === 404
133
- ? "INTEGRATION_BOOTSTRAP_NOT_FOUND"
134
- : response.status === 409
135
- ? "INTEGRATION_BOOTSTRAP_CONFLICT"
136
- : response.status === 501
137
- ? "INTEGRATION_BOOTSTRAP_UNAVAILABLE"
138
- : "INTEGRATION_BOOTSTRAP_API_ERROR";
139
- throw new PipelineError(`Integration bootstrap API HTTP ${response.status}: request failed without exposing the upstream response body.`, code, response.status, safeRequestId(response));
140
- }
141
- if (!expectedStatuses.includes(response.status)) {
142
- if (operation === "start")
143
- throw startResultUnknown(response.status, safeRequestId(response));
144
- throw new PipelineError(`Integration bootstrap API returned HTTP ${response.status}; expected ${expectedStatuses.join(" or ")}.`, "INTEGRATION_BOOTSTRAP_INVALID_RESPONSE", response.status, safeRequestId(response));
145
- }
146
- let body;
147
- try {
148
- body = await successfulBody(response);
149
- }
150
- catch (error) {
151
- if (operation === "start" && error instanceof PipelineError) {
152
- throw startResultUnknown(response.status, safeRequestId(response));
153
- }
154
- throw error;
155
- }
156
- const parsed = schema.safeParse(body);
157
- if (!parsed.success) {
158
- if (operation === "start")
159
- throw startResultUnknown(response.status, safeRequestId(response));
160
- throw new PipelineError("Integration bootstrap API response does not match the strict secret-free v2 contract.", "INTEGRATION_BOOTSTRAP_INVALID_RESPONSE", response.status, safeRequestId(response));
161
- }
162
- return parsed.data;
163
- }
164
- async getTrustAnchorConfiguration() {
165
- const sourceUrl = resolveBackendUrl(this.config, {
166
- method: "GET",
167
- path: INTEGRATION_BOOTSTRAP_TRUST_ANCHOR_CONFIGURATION
168
- });
169
- const expectedCallback = resolveBackendUrl(this.config, {
170
- method: "GET",
171
- path: INTEGRATION_BOOTSTRAP_TRUST_ANCHOR_CALLBACK
172
- });
173
- let response;
174
- try {
175
- response = await this.fetchImpl(sourceUrl, {
176
- method: "GET",
177
- headers: { Accept: "application/json" },
178
- redirect: "error"
179
- });
180
- }
181
- catch {
182
- throw new PipelineError("Integration bootstrap trust-anchor configuration is unavailable.", "INTEGRATION_BOOTSTRAP_TRUST_ANCHOR_UNAVAILABLE");
183
- }
184
- if (!response.ok || response.status !== 200) {
185
- throw new PipelineError(`Integration bootstrap trust-anchor API returned HTTP ${response.status}; expected 200.`, "INTEGRATION_BOOTSTRAP_TRUST_ANCHOR_UNAVAILABLE", response.status, safeRequestId(response));
186
- }
187
- if (response.headers.get("x-keycloak-import-realm") !== "master") {
188
- throw new PipelineError("Integration bootstrap trust-anchor response did not identify the exact master realm.", "INTEGRATION_BOOTSTRAP_TRUST_ANCHOR_INVALID", response.status, safeRequestId(response));
189
- }
190
- const parsed = IntegrationBootstrapTrustAnchorClientSchema.safeParse(await successfulBody(response));
191
- if (!parsed.success || parsed.data.redirectUris[0] !== expectedCallback) {
192
- throw new PipelineError("Integration bootstrap trust-anchor response does not match the fixed public PKCE contract.", "INTEGRATION_BOOTSTRAP_TRUST_ANCHOR_INVALID", response.status, safeRequestId(response));
193
- }
194
- return {
195
- realm: "master",
196
- clientId: parsed.data.clientId,
197
- configurationDigest: createHash("sha256")
198
- .update(`${JSON.stringify(parsed.data, null, 2)}\n`)
199
- .digest("hex"),
200
- sourceUrl,
201
- configuration: parsed.data
202
- };
203
- }
204
- async startPlanSession(clientRequestIdValue, keyValue) {
205
- const request = integrationBootstrapClientRequestId(clientRequestIdValue);
206
- const key = integrationBootstrapIdempotencyKey(keyValue);
207
- const started = await this.json(INTEGRATION_BOOTSTRAP_PLAN_SESSION_ROOT, IntegrationBootstrapStartSchema, { method: "POST", headers: { "Idempotency-Key": key }, body: JSON.stringify({ clientRequestId: request }) }, [200, 201], "start");
208
- if (started.clientRequestId !== request)
209
- throw startResultUnknown();
210
- return started;
211
- }
212
- async resolvePlanSession(clientRequestIdValue) {
213
- const request = integrationBootstrapClientRequestId(clientRequestIdValue);
214
- const session = await this.json(query(INTEGRATION_BOOTSTRAP_PLAN_SESSION_ROOT + "/resolve", "clientRequestId", request), IntegrationBootstrapSessionSchema);
215
- if (session.clientRequestId !== request) {
216
- throw identityInvalid("Integration bootstrap plan resolve returned another client-request-id.");
217
- }
218
- return session;
219
- }
220
- async getPlanSession(value) {
221
- const expected = planSessionNo(value);
222
- const session = await this.json(`${INTEGRATION_BOOTSTRAP_PLAN_SESSION_ROOT}/${encodeURIComponent(expected)}`, IntegrationBootstrapSessionSchema);
223
- if (session.sessionNo !== expected) {
224
- throw identityInvalid("Integration bootstrap plan GET returned another session.");
225
- }
226
- return session;
227
- }
228
- async startApply(input, keyValue) {
229
- const body = {
230
- planSessionNo: planSessionNo(input.planSessionNo),
231
- planDigest: planDigest(input.planDigest),
232
- clientRequestId: integrationBootstrapClientRequestId(input.clientRequestId)
233
- };
234
- const started = await this.json(INTEGRATION_BOOTSTRAP_RUN_ROOT, IntegrationBootstrapApplyStartSchema, {
235
- method: "POST",
236
- headers: { "Idempotency-Key": integrationBootstrapIdempotencyKey(keyValue) },
237
- body: JSON.stringify(body)
238
- }, [200, 201], "start");
239
- if (started.planSessionNo !== body.planSessionNo || started.planDigest !== body.planDigest
240
- || started.clientRequestId !== body.clientRequestId)
241
- throw startResultUnknown();
242
- return started;
243
- }
244
- async resolveRun(clientRequestIdValue) {
245
- const request = integrationBootstrapClientRequestId(clientRequestIdValue);
246
- const run = await this.json(query(INTEGRATION_BOOTSTRAP_RUN_ROOT + "/resolve", "clientRequestId", request), IntegrationBootstrapRunViewSchema);
247
- if (run.clientRequestId !== request) {
248
- throw identityInvalid("Integration bootstrap run resolve returned another client-request-id.");
249
- }
250
- return run;
251
- }
252
- async getRun(value) {
253
- const expected = integrationBootstrapRunNo(value);
254
- const run = await this.json(`${INTEGRATION_BOOTSTRAP_RUN_ROOT}/${encodeURIComponent(expected)}`, IntegrationBootstrapRunViewSchema);
255
- if (run.runNo !== expected)
256
- throw identityInvalid("Integration bootstrap run GET returned another run.");
257
- return run;
258
- }
259
- async startAction(runNoValue, kind, input, keyValue) {
260
- const action = kind.toLowerCase();
261
- const expectedRun = integrationBootstrapRunNo(runNoValue);
262
- const body = {
263
- expectedRunVersion: expectedRunVersion(input.expectedRunVersion),
264
- clientRequestId: integrationBootstrapClientRequestId(input.clientRequestId)
265
- };
266
- const started = await this.json(`${INTEGRATION_BOOTSTRAP_RUN_ROOT}/${encodeURIComponent(expectedRun)}/actions/${action}`, IntegrationBootstrapActionStartSchema, {
267
- method: "POST",
268
- headers: { "Idempotency-Key": integrationBootstrapIdempotencyKey(keyValue) },
269
- body: JSON.stringify(body)
270
- }, [200, 201], "start");
271
- if (started.runNo !== expectedRun || started.kind !== kind
272
- || started.clientRequestId !== body.clientRequestId)
273
- throw startResultUnknown();
274
- return started;
275
- }
276
- async resolveAction(clientRequestIdValue) {
277
- const request = integrationBootstrapClientRequestId(clientRequestIdValue);
278
- const action = await this.json(query(`${INTEGRATION_BOOTSTRAP_V2_ROOT}/actions/resolve`, "clientRequestId", request), IntegrationBootstrapActionViewSchema);
279
- if (action.clientRequestId !== request) {
280
- throw identityInvalid("Integration bootstrap action resolve returned another client-request-id.");
281
- }
282
- return action;
283
- }
284
- async getAction(value) {
285
- const expected = actionNo(value);
286
- const action = await this.json(`${INTEGRATION_BOOTSTRAP_V2_ROOT}/actions/${encodeURIComponent(expected)}`, IntegrationBootstrapActionViewSchema);
287
- if (action.actionNo !== expected) {
288
- throw identityInvalid("Integration bootstrap action GET returned another action.");
289
- }
290
- return action;
291
- }
292
- }
293
- //# sourceMappingURL=client.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/integration-bootstrap/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAA8B,MAAM,aAAa,CAAC;AACvG,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EACL,qCAAqC,EACrC,oCAAoC,EACpC,oCAAoC,EACpC,iCAAiC,EACjC,iCAAiC,EACjC,+BAA+B,EAC/B,2CAA2C,EAS5C,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,6BAA6B,GACxC,8DAA8D,CAAC;AACjE,MAAM,CAAC,MAAM,uCAAuC,GAClD,GAAG,6BAA6B,gBAAgB,CAAC;AACnD,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,6BAA6B,OAAO,CAAC;AACtF,MAAM,CAAC,MAAM,gDAAgD,GAC3D,oDAAoD,CAAC;AACvD,MAAM,CAAC,MAAM,2CAA2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EACD,CAAC,GAAG,EAAE,GAAG,CAAC,EACV,OAAO,CACR,CAAC;QACF,IAAI,OAAO,CAAC,KAAK,KAAK,WAAW,IAAI,OAAO,CAAC,IAAI,KAAK,IAAI;eACnD,OAAO,CAAC,eAAe,KAAK,IAAI,CAAC,eAAe;YAAE,MAAM,kBAAkB,EAAE,CAAC;QACpF,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,oBAA4B;QAC9C,MAAM,OAAO,GAAG,mCAAmC,CAAC,oBAAoB,CAAC,CAAC;QAC1E,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAC5B,KAAK,CAAC,GAAG,6BAA6B,kBAAkB,EAAE,iBAAiB,EAAE,OAAO,CAAC,EACrF,oCAAoC,CACrC,CAAC;QACF,IAAI,MAAM,CAAC,eAAe,KAAK,OAAO,EAAE,CAAC;YACvC,MAAM,eAAe,CAAC,0EAA0E,CAAC,CAAC;QACpG,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,KAAa;QAC3B,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QACjC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAC5B,GAAG,6BAA6B,YAAY,kBAAkB,CAAC,QAAQ,CAAC,EAAE,EAC1E,oCAAoC,CACrC,CAAC;QACF,IAAI,MAAM,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;YACjC,MAAM,eAAe,CAAC,2DAA2D,CAAC,CAAC;QACrF,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
@@ -1,86 +0,0 @@
1
- import type { Command } from "commander";
2
- import { type AuthorizationApi } from "../authorization/client.js";
3
- import { type IntegrationBootstrapTrustAnchorDocument, type IntegrationBootstrapApi } from "./client.js";
4
- import type { IntegrationBootstrapActionKind, IntegrationBootstrapActionStart, IntegrationBootstrapActionView, IntegrationBootstrapApplyStart, IntegrationBootstrapPlan, IntegrationBootstrapRunView, IntegrationBootstrapSession, IntegrationBootstrapStart } from "./schemas.js";
5
- export interface IntegrationBootstrapCommandDependencies {
6
- clientFactory?: () => IntegrationBootstrapApi;
7
- privilegedClientFactory?: () => Pick<AuthorizationApi, "startPrivilegedOperation" | "getPrivilegedOperationRun">;
8
- openBrowser?: (url: string) => Promise<void>;
9
- sleep?: (milliseconds: number) => Promise<void>;
10
- confirmApply?: (plan: IntegrationBootstrapPlan) => Promise<boolean>;
11
- }
12
- interface BrowserOptions {
13
- noOpen?: boolean;
14
- open?: boolean;
15
- }
16
- interface PlanOptions extends BrowserOptions {
17
- clientRequestId: string;
18
- idempotencyKey: string;
19
- }
20
- interface ApplyOptions extends PlanOptions {
21
- sessionNo: string;
22
- planDigest: string;
23
- yes?: boolean;
24
- }
25
- interface InitOptions extends BrowserOptions {
26
- operationKey: string;
27
- expectedPlanDigest?: string;
28
- yes?: boolean;
29
- }
30
- interface ActionOptions extends BrowserOptions {
31
- expectedRunVersion: string;
32
- clientRequestId: string;
33
- idempotencyKey: string;
34
- yes?: boolean;
35
- }
36
- interface TrustAnchorExportOptions {
37
- output: string;
38
- force?: boolean;
39
- }
40
- export declare function executeIntegrationBootstrapTrustAnchorExport(api: Pick<IntegrationBootstrapApi, "getTrustAnchorConfiguration">, options: TrustAnchorExportOptions): Promise<IntegrationBootstrapTrustAnchorDocument & {
41
- outputPath: string;
42
- }>;
43
- export declare function stableIntegrationBootstrapOutput(value: unknown): unknown;
44
- export interface IntegrationBootstrapInitKeys {
45
- planClientRequestId: string;
46
- planIdempotencyKey: string;
47
- applyClientRequestId: string;
48
- applyIdempotencyKey: string;
49
- }
50
- export declare function integrationBootstrapInitKeys(operationKey: string): IntegrationBootstrapInitKeys;
51
- export declare function executeIntegrationBootstrapPlan(api: IntegrationBootstrapApi, options: PlanOptions, openBrowser: (url: string) => Promise<void>, sleep: (milliseconds: number) => Promise<void>, notify?: (message: string) => void): Promise<{
52
- started?: IntegrationBootstrapStart;
53
- session?: IntegrationBootstrapSession;
54
- }>;
55
- export interface IntegrationBootstrapInitResult {
56
- keys: IntegrationBootstrapInitKeys;
57
- plan: {
58
- started?: IntegrationBootstrapStart;
59
- session?: IntegrationBootstrapSession;
60
- };
61
- confirmed: boolean;
62
- apply?: {
63
- started?: IntegrationBootstrapApplyStart;
64
- action?: IntegrationBootstrapActionView;
65
- run?: IntegrationBootstrapRunView;
66
- };
67
- continuations: Array<{
68
- kind: Exclude<IntegrationBootstrapActionKind, "APPLY">;
69
- started?: IntegrationBootstrapActionStart;
70
- action?: IntegrationBootstrapActionView;
71
- run: IntegrationBootstrapRunView;
72
- }>;
73
- }
74
- export declare function executeIntegrationBootstrapInit(api: IntegrationBootstrapApi, options: InitOptions, openBrowser: (url: string) => Promise<void>, sleep: (milliseconds: number) => Promise<void>, confirmApply?: (plan: IntegrationBootstrapPlan) => Promise<boolean>, notify?: (message: string) => void): Promise<IntegrationBootstrapInitResult>;
75
- export declare function executeIntegrationBootstrapApply(api: IntegrationBootstrapApi, options: ApplyOptions, openBrowser: (url: string) => Promise<void>, sleep: (milliseconds: number) => Promise<void>, notify?: (message: string) => void): Promise<{
76
- started?: IntegrationBootstrapApplyStart;
77
- action?: IntegrationBootstrapActionView;
78
- run?: IntegrationBootstrapRunView;
79
- }>;
80
- export declare function executeIntegrationBootstrapAction(api: IntegrationBootstrapApi, runNo: string, kind: Exclude<IntegrationBootstrapActionKind, "APPLY">, options: ActionOptions, openBrowser: (url: string) => Promise<void>, sleep: (milliseconds: number) => Promise<void>, notify?: (message: string) => void): Promise<{
81
- started?: IntegrationBootstrapActionStart;
82
- action?: IntegrationBootstrapActionView;
83
- run: IntegrationBootstrapRunView;
84
- }>;
85
- export declare function registerIntegrationBootstrapCommands(program: Command, dependencies?: IntegrationBootstrapCommandDependencies): void;
86
- export {};