@osva-ai/cli 1.1.1 → 1.1.2

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 (181) hide show
  1. package/README.md +36 -0
  2. package/dist/bin/osva.js +26 -0
  3. package/dist/bin/osva.js.map +1 -1
  4. package/dist/commands/index.js +6 -0
  5. package/dist/commands/index.js.map +1 -1
  6. package/dist/doctor/redact.d.ts.map +1 -1
  7. package/dist/doctor/redact.js +3 -1
  8. package/dist/doctor/redact.js.map +1 -1
  9. package/dist/doctor/run-doctor.d.ts +2 -1
  10. package/dist/doctor/run-doctor.d.ts.map +1 -1
  11. package/dist/doctor/run-doctor.js +1 -1
  12. package/dist/doctor/run-doctor.js.map +1 -1
  13. package/dist/doctor/streaming-redact.d.ts +11 -0
  14. package/dist/doctor/streaming-redact.d.ts.map +1 -0
  15. package/dist/doctor/streaming-redact.js +29 -0
  16. package/dist/doctor/streaming-redact.js.map +1 -0
  17. package/dist/platform/compose-inspect.d.ts +9 -0
  18. package/dist/platform/compose-inspect.d.ts.map +1 -0
  19. package/dist/platform/compose-inspect.js +114 -0
  20. package/dist/platform/compose-inspect.js.map +1 -0
  21. package/dist/platform/doctor.d.ts +10 -0
  22. package/dist/platform/doctor.d.ts.map +1 -0
  23. package/dist/platform/doctor.js +154 -0
  24. package/dist/platform/doctor.js.map +1 -0
  25. package/dist/platform/format.d.ts +10 -0
  26. package/dist/platform/format.d.ts.map +1 -0
  27. package/dist/platform/format.js +73 -0
  28. package/dist/platform/format.js.map +1 -0
  29. package/dist/platform/index.d.ts +9 -0
  30. package/dist/platform/index.d.ts.map +1 -0
  31. package/dist/platform/index.js +143 -0
  32. package/dist/platform/index.js.map +1 -0
  33. package/dist/platform/lifecycle.d.ts +20 -0
  34. package/dist/platform/lifecycle.d.ts.map +1 -0
  35. package/dist/platform/lifecycle.js +136 -0
  36. package/dist/platform/lifecycle.js.map +1 -0
  37. package/dist/platform/logs.d.ts +12 -0
  38. package/dist/platform/logs.d.ts.map +1 -0
  39. package/dist/platform/logs.js +81 -0
  40. package/dist/platform/logs.js.map +1 -0
  41. package/dist/platform/readiness.d.ts +9 -0
  42. package/dist/platform/readiness.d.ts.map +1 -0
  43. package/dist/platform/readiness.js +58 -0
  44. package/dist/platform/readiness.js.map +1 -0
  45. package/dist/platform/resolve-installation.d.ts +5 -0
  46. package/dist/platform/resolve-installation.d.ts.map +1 -0
  47. package/dist/platform/resolve-installation.js +115 -0
  48. package/dist/platform/resolve-installation.js.map +1 -0
  49. package/dist/platform/services.d.ts +7 -0
  50. package/dist/platform/services.d.ts.map +1 -0
  51. package/dist/platform/services.js +21 -0
  52. package/dist/platform/services.js.map +1 -0
  53. package/dist/platform/status.d.ts +7 -0
  54. package/dist/platform/status.d.ts.map +1 -0
  55. package/dist/platform/status.js +60 -0
  56. package/dist/platform/status.js.map +1 -0
  57. package/dist/platform/types.d.ts +37 -0
  58. package/dist/platform/types.d.ts.map +1 -0
  59. package/dist/platform/types.js +8 -0
  60. package/dist/platform/types.js.map +1 -0
  61. package/dist/platform/upgrade/backup-policy.d.ts +4 -0
  62. package/dist/platform/upgrade/backup-policy.d.ts.map +1 -0
  63. package/dist/platform/upgrade/backup-policy.js +20 -0
  64. package/dist/platform/upgrade/backup-policy.js.map +1 -0
  65. package/dist/platform/upgrade/catalog.d.ts +26 -0
  66. package/dist/platform/upgrade/catalog.d.ts.map +1 -0
  67. package/dist/platform/upgrade/catalog.js +56 -0
  68. package/dist/platform/upgrade/catalog.js.map +1 -0
  69. package/dist/platform/upgrade/options.d.ts +8 -0
  70. package/dist/platform/upgrade/options.d.ts.map +1 -0
  71. package/dist/platform/upgrade/options.js +17 -0
  72. package/dist/platform/upgrade/options.js.map +1 -0
  73. package/dist/platform/upgrade/preflight.d.ts +25 -0
  74. package/dist/platform/upgrade/preflight.d.ts.map +1 -0
  75. package/dist/platform/upgrade/preflight.js +91 -0
  76. package/dist/platform/upgrade/preflight.js.map +1 -0
  77. package/dist/platform/upgrade/run-upgrade.d.ts +22 -0
  78. package/dist/platform/upgrade/run-upgrade.d.ts.map +1 -0
  79. package/dist/platform/upgrade/run-upgrade.js +253 -0
  80. package/dist/platform/upgrade/run-upgrade.js.map +1 -0
  81. package/dist/platform/upgrade/state.d.ts +31 -0
  82. package/dist/platform/upgrade/state.d.ts.map +1 -0
  83. package/dist/platform/upgrade/state.js +129 -0
  84. package/dist/platform/upgrade/state.js.map +1 -0
  85. package/dist/platform/upgrade/version.d.ts +11 -0
  86. package/dist/platform/upgrade/version.d.ts.map +1 -0
  87. package/dist/platform/upgrade/version.js +70 -0
  88. package/dist/platform/upgrade/version.js.map +1 -0
  89. package/dist/platform/upgrade-guard.d.ts +2 -0
  90. package/dist/platform/upgrade-guard.d.ts.map +1 -0
  91. package/dist/platform/upgrade-guard.js +12 -0
  92. package/dist/platform/upgrade-guard.js.map +1 -0
  93. package/dist/setup/acceptance-install.d.ts +15 -0
  94. package/dist/setup/acceptance-install.d.ts.map +1 -0
  95. package/dist/setup/acceptance-install.js +44 -0
  96. package/dist/setup/acceptance-install.js.map +1 -0
  97. package/dist/setup/atomic-write.d.ts +4 -0
  98. package/dist/setup/atomic-write.d.ts.map +1 -0
  99. package/dist/setup/atomic-write.js +19 -0
  100. package/dist/setup/atomic-write.js.map +1 -0
  101. package/dist/setup/bootstrap-capture.d.ts +9 -0
  102. package/dist/setup/bootstrap-capture.d.ts.map +1 -0
  103. package/dist/setup/bootstrap-capture.js +64 -0
  104. package/dist/setup/bootstrap-capture.js.map +1 -0
  105. package/dist/setup/compose-exec.d.ts +21 -0
  106. package/dist/setup/compose-exec.d.ts.map +1 -0
  107. package/dist/setup/compose-exec.js +55 -0
  108. package/dist/setup/compose-exec.js.map +1 -0
  109. package/dist/setup/compose-project.d.ts +3 -0
  110. package/dist/setup/compose-project.d.ts.map +1 -0
  111. package/dist/setup/compose-project.js +12 -0
  112. package/dist/setup/compose-project.js.map +1 -0
  113. package/dist/setup/compose-template-root.d.ts +3 -0
  114. package/dist/setup/compose-template-root.d.ts.map +1 -0
  115. package/dist/setup/compose-template-root.js +8 -0
  116. package/dist/setup/compose-template-root.js.map +1 -0
  117. package/dist/setup/distribution.d.ts +13 -0
  118. package/dist/setup/distribution.d.ts.map +1 -0
  119. package/dist/setup/distribution.js +55 -0
  120. package/dist/setup/distribution.js.map +1 -0
  121. package/dist/setup/env-file.d.ts +23 -0
  122. package/dist/setup/env-file.d.ts.map +1 -0
  123. package/dist/setup/env-file.js +141 -0
  124. package/dist/setup/env-file.js.map +1 -0
  125. package/dist/setup/format.d.ts +4 -0
  126. package/dist/setup/format.d.ts.map +1 -0
  127. package/dist/setup/format.js +58 -0
  128. package/dist/setup/format.js.map +1 -0
  129. package/dist/setup/index.d.ts +17 -0
  130. package/dist/setup/index.d.ts.map +1 -0
  131. package/dist/setup/index.js +45 -0
  132. package/dist/setup/index.js.map +1 -0
  133. package/dist/setup/install-path.d.ts +3 -0
  134. package/dist/setup/install-path.d.ts.map +1 -0
  135. package/dist/setup/install-path.js +26 -0
  136. package/dist/setup/install-path.js.map +1 -0
  137. package/dist/setup/installation-state.d.ts +29 -0
  138. package/dist/setup/installation-state.d.ts.map +1 -0
  139. package/dist/setup/installation-state.js +83 -0
  140. package/dist/setup/installation-state.js.map +1 -0
  141. package/dist/setup/installation-status.d.ts +14 -0
  142. package/dist/setup/installation-status.d.ts.map +1 -0
  143. package/dist/setup/installation-status.js +36 -0
  144. package/dist/setup/installation-status.js.map +1 -0
  145. package/dist/setup/materialize-install.d.ts +24 -0
  146. package/dist/setup/materialize-install.d.ts.map +1 -0
  147. package/dist/setup/materialize-install.js +108 -0
  148. package/dist/setup/materialize-install.js.map +1 -0
  149. package/dist/setup/probe-spawn.d.ts +16 -0
  150. package/dist/setup/probe-spawn.d.ts.map +1 -0
  151. package/dist/setup/probe-spawn.js +87 -0
  152. package/dist/setup/probe-spawn.js.map +1 -0
  153. package/dist/setup/read-options.d.ts +15 -0
  154. package/dist/setup/read-options.d.ts.map +1 -0
  155. package/dist/setup/read-options.js +69 -0
  156. package/dist/setup/read-options.js.map +1 -0
  157. package/dist/setup/run-onboarding.d.ts +22 -0
  158. package/dist/setup/run-onboarding.d.ts.map +1 -0
  159. package/dist/setup/run-onboarding.js +273 -0
  160. package/dist/setup/run-onboarding.js.map +1 -0
  161. package/dist/setup/run-provision.d.ts +17 -0
  162. package/dist/setup/run-provision.d.ts.map +1 -0
  163. package/dist/setup/run-provision.js +224 -0
  164. package/dist/setup/run-provision.js.map +1 -0
  165. package/dist/setup/run-setup.d.ts +26 -0
  166. package/dist/setup/run-setup.d.ts.map +1 -0
  167. package/dist/setup/run-setup.js +227 -0
  168. package/dist/setup/run-setup.js.map +1 -0
  169. package/dist/setup/secrets.d.ts +2 -0
  170. package/dist/setup/secrets.d.ts.map +1 -0
  171. package/dist/setup/secrets.js +8 -0
  172. package/dist/setup/secrets.js.map +1 -0
  173. package/dist/setup/setup-report.d.ts +19 -0
  174. package/dist/setup/setup-report.d.ts.map +1 -0
  175. package/dist/setup/setup-report.js +35 -0
  176. package/dist/setup/setup-report.js.map +1 -0
  177. package/dist/tsconfig.tsbuildinfo +1 -1
  178. package/package.json +3 -3
  179. package/templates/compose-install/compose.yml +307 -0
  180. package/templates/compose-install/distribution.json +5 -0
  181. package/templates/compose-install/upgrade-catalog.json +39 -0
@@ -0,0 +1,70 @@
1
+ export function parsePlatformVersion(raw) {
2
+ const trimmed = raw.trim();
3
+ const match = /^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/.exec(trimmed);
4
+ if (match === null) {
5
+ throw new Error(`Invalid platform version '${raw}'.`);
6
+ }
7
+ const major = Number(match[1]);
8
+ const minor = Number(match[2]);
9
+ const patch = Number(match[3]);
10
+ const prereleaseRaw = match[4];
11
+ const prerelease = prereleaseRaw === undefined || prereleaseRaw.length === 0
12
+ ? []
13
+ : prereleaseRaw.split(".");
14
+ return { major, minor, patch, prerelease, raw: trimmed };
15
+ }
16
+ /** Semantic ordering for OSVA platform versions (not lexical string compare). */
17
+ export function comparePlatformVersions(left, right) {
18
+ const a = parsePlatformVersion(left);
19
+ const b = parsePlatformVersion(right);
20
+ if (a.major !== b.major) {
21
+ return a.major < b.major ? -1 : 1;
22
+ }
23
+ if (a.minor !== b.minor) {
24
+ return a.minor < b.minor ? -1 : 1;
25
+ }
26
+ if (a.patch !== b.patch) {
27
+ return a.patch < b.patch ? -1 : 1;
28
+ }
29
+ const aPre = a.prerelease.length > 0;
30
+ const bPre = b.prerelease.length > 0;
31
+ if (!aPre && !bPre) {
32
+ return 0;
33
+ }
34
+ if (!aPre && bPre) {
35
+ return 1;
36
+ }
37
+ if (aPre && !bPre) {
38
+ return -1;
39
+ }
40
+ const len = Math.max(a.prerelease.length, b.prerelease.length);
41
+ for (let index = 0; index < len; index += 1) {
42
+ const aPart = a.prerelease[index];
43
+ const bPart = b.prerelease[index];
44
+ if (aPart === undefined) {
45
+ return -1;
46
+ }
47
+ if (bPart === undefined) {
48
+ return 1;
49
+ }
50
+ const aNum = /^\d+$/.test(aPart) ? Number(aPart) : undefined;
51
+ const bNum = /^\d+$/.test(bPart) ? Number(bPart) : undefined;
52
+ if (aNum !== undefined && bNum !== undefined) {
53
+ if (aNum !== bNum) {
54
+ return aNum < bNum ? -1 : 1;
55
+ }
56
+ continue;
57
+ }
58
+ if (aNum !== undefined) {
59
+ return -1;
60
+ }
61
+ if (bNum !== undefined) {
62
+ return 1;
63
+ }
64
+ if (aPart !== bPart) {
65
+ return aPart < bPart ? -1 : 1;
66
+ }
67
+ }
68
+ return 0;
69
+ }
70
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/platform/upgrade/version.ts"],"names":[],"mappings":"AAQA,MAAM,UAAU,oBAAoB,CAAC,GAAW;IAC9C,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IAC3B,MAAM,KAAK,GAAG,6CAA6C,CAAC,IAAI,C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,CAAC,CAAC,SAAS,CAAC;QAC7D,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC7D,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YAC7C,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;gBAClB,OAAO,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC9B,CAAC;YACD,SAAS;QACX,CAAC;QACD,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,OAAO,CAAC,CAAC,CAAC;QACZ,CAAC;QACD,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,OAAO,CAAC,CAAC;QACX,CAAC;QACD,IAAI,KAAK,KAAK,KAAK,EAAE,CAAC;YACpB,OAAO,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAChC,CAAC;IACH,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function assertPlatformLifecycleAllowed(installDir: string, action: string): Promise<void>;
2
+ //# sourceMappingURL=upgrade-guard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upgrade-guard.d.ts","sourceRoot":"","sources":["../../src/platform/upgrade-guard.ts"],"names":[],"mappings":"AAQA,wBAAsB,8BAA8B,CAClD,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CAcf"}
@@ -0,0 +1,12 @@
1
+ import { isIncompleteUpgrade, isUpgradeInProgress, readUpgradeState, recoveryGuidance, } from "./upgrade/state.js";
2
+ import { PlatformCommandError } from "./types.js";
3
+ export async function assertPlatformLifecycleAllowed(installDir, action) {
4
+ const state = await readUpgradeState(installDir);
5
+ if (isUpgradeInProgress(state)) {
6
+ throw new PlatformCommandError("installation_invalid", `Cannot ${action} while platform upgrade is in progress (phase ${state.phase}).`);
7
+ }
8
+ if (isIncompleteUpgrade(state) && state.phase !== "migration_failed") {
9
+ throw new PlatformCommandError("installation_invalid", `Cannot ${action} until the incomplete upgrade is resolved.\n${recoveryGuidance(state)}`);
10
+ }
11
+ }
12
+ //# sourceMappingURL=upgrade-guard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upgrade-guard.js","sourceRoot":"","sources":["../../src/platform/upgrade-guard.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,CAAC,KAAK,UAAU,8BAA8B,CAClD,UAAkB,EAClB,MAAc;IAEd,MAAM,KAAK,GAAG,MAAM,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACjD,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC;QAC/B,MAAM,IAAI,oBAAoB,CAC5B,sBAAsB,EACtB,UAAU,MAAM,iDAAiD,KAAM,CAAC,KAAK,IAAI,CAClF,CAAC;IACJ,CAAC;IACD,IAAI,mBAAmB,CAAC,KAAK,CAAC,IAAI,KAAM,CAAC,KAAK,KAAK,kBAAkB,EAAE,CAAC;QACtE,MAAM,IAAI,oBAAoB,CAC5B,sBAAsB,EACtB,UAAU,MAAM,+CAA+C,gBAAgB,CAAC,KAAM,CAAC,EAAE,CAC1F,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,15 @@
1
+ export declare function acceptanceInstallEnabled(env?: NodeJS.ProcessEnv): boolean;
2
+ export declare function resolveSetupImageRef(input: {
3
+ readonly distributionImageRef: string;
4
+ readonly processEnv: NodeJS.ProcessEnv;
5
+ }): string;
6
+ export declare function writeAcceptanceSetupTokenFile(input: {
7
+ readonly processEnv: NodeJS.ProcessEnv;
8
+ readonly token: string;
9
+ }): Promise<void>;
10
+ export declare function writeAcceptanceBootstrapKeyFile(input: {
11
+ readonly processEnv: NodeJS.ProcessEnv;
12
+ readonly apiKey: string;
13
+ }): Promise<void>;
14
+ export declare function wipeAcceptanceBootstrapKeyFile(env?: NodeJS.ProcessEnv): Promise<void>;
15
+ //# sourceMappingURL=acceptance-install.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acceptance-install.d.ts","sourceRoot":"","sources":["../../src/setup/acceptance-install.ts"],"names":[],"mappings":"AAIA,wBAAgB,wBAAwB,CACtC,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,OAAO,CAET;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE;IAC1C,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;CACxC,GAAG,MAAM,CAMT;AAED,wBAAsB,6BAA6B,CAAC,KAAK,EAAE;IACzD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;IACvC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB,GAAG,OAAO,CAAC,IAAI,CAAC,CAWhB;AAED,wBAAsB,+BAA+B,CAAC,KAAK,EAAE;IAC3D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,GAAG,OAAO,CAAC,IAAI,CAAC,CAWhB;AAED,wBAAsB,8BAA8B,CAClD,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,OAAO,CAAC,IAAI,CAAC,CAMf"}
@@ -0,0 +1,44 @@
1
+ import { writeFile } from "node:fs/promises";
2
+ import { writeFileAtomic } from "./atomic-write.js";
3
+ export function acceptanceInstallEnabled(env = process.env) {
4
+ return env.OSVA_ACCEPTANCE_INSTALL?.trim() === "1";
5
+ }
6
+ export function resolveSetupImageRef(input) {
7
+ const override = input.processEnv.OSVA_SETUP_LOCAL_IMAGE?.trim();
8
+ if (override !== undefined && override.length > 0) {
9
+ return override;
10
+ }
11
+ return input.distributionImageRef;
12
+ }
13
+ export async function writeAcceptanceSetupTokenFile(input) {
14
+ if (!acceptanceInstallEnabled(input.processEnv)) {
15
+ return;
16
+ }
17
+ const targetPath = input.processEnv.OSVA_SETUP_SETUP_TOKEN_FILE?.trim();
18
+ if (targetPath === undefined || targetPath.length === 0) {
19
+ return;
20
+ }
21
+ await writeFileAtomic(targetPath, `${input.token}\n`, {
22
+ restrictPermissions: true,
23
+ });
24
+ }
25
+ export async function writeAcceptanceBootstrapKeyFile(input) {
26
+ if (!acceptanceInstallEnabled(input.processEnv)) {
27
+ return;
28
+ }
29
+ const targetPath = input.processEnv.OSVA_SETUP_BOOTSTRAP_KEY_FILE?.trim();
30
+ if (targetPath === undefined || targetPath.length === 0) {
31
+ return;
32
+ }
33
+ await writeFileAtomic(targetPath, `${input.apiKey}\n`, {
34
+ restrictPermissions: true,
35
+ });
36
+ }
37
+ export async function wipeAcceptanceBootstrapKeyFile(env = process.env) {
38
+ const targetPath = env.OSVA_SETUP_BOOTSTRAP_KEY_FILE?.trim();
39
+ if (targetPath === undefined || targetPath.length === 0) {
40
+ return;
41
+ }
42
+ await writeFile(targetPath, "", { encoding: "utf8", mode: 0o600 });
43
+ }
44
+ //# sourceMappingURL=acceptance-install.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acceptance-install.js","sourceRoot":"","sources":["../../src/setup/acceptance-install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,UAAU,wBAAwB,CACtC,MAAyB,OAAO,CAAC,GAAG;IAEpC,OAAO,GAAG,CAAC,uBAAuB,EAAE,IAAI,EAAE,KAAK,GA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AU,8BAA8B,CAClD,MAAyB,OAAO,CAAC,GAAG;IAEpC,MAAM,UAAU,GAAG,GAAG,CAAC,6BAA6B,EAAE,IAAI,EAAE,CAAC;IAC7D,IAAI,UAAU,KAAK,SAAS,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxD,OAAO;IACT,CAAC;IACD,MAAM,SAAS,CAAC,UAAU,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;AACrE,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare function writeFileAtomic(targetPath: string, contents: string, options?: {
2
+ readonly restrictPermissions?: boolean;
3
+ }): Promise<void>;
4
+ //# sourceMappingURL=atomic-write.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atomic-write.d.ts","sourceRoot":"","sources":["../../src/setup/atomic-write.ts"],"names":[],"mappings":"AAGA,wBAAsB,eAAe,CACnC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAAE,GACnD,OAAO,CAAC,IAAI,CAAC,CAoBf"}
@@ -0,0 +1,19 @@
1
+ import { chmod, rename, writeFile } from "node:fs/promises";
2
+ import path from "node:path";
3
+ export async function writeFileAtomic(targetPath, contents, options) {
4
+ const directory = path.dirname(targetPath);
5
+ const baseName = path.basename(targetPath);
6
+ const tempPath = path.join(directory, `.${baseName}.${String(process.pid)}.tmp`);
7
+ await writeFile(tempPath, contents, { encoding: "utf8", flag: "wx" }).catch(async (error) => {
8
+ if (error.code === "EEXIST") {
9
+ await writeFile(tempPath, contents, { encoding: "utf8" });
10
+ return;
11
+ }
12
+ throw error;
13
+ });
14
+ await rename(tempPath, targetPath);
15
+ if (options?.restrictPermissions === true && process.platform !== "win32") {
16
+ await chmod(targetPath, 0o600);
17
+ }
18
+ }
19
+ //# sourceMappingURL=atomic-write.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atomic-write.js","sourceRoot":"","sources":["../../src/setup/atomic-write.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,UAAkB,EAClB,QAAgB,EAChB,OAAoD;IAEpD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC3C,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAC3C,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CACxB,SAAS,EACT,IAAI,QAAQ,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAC1C,CAAC;IACF,MAAM,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CACzE,KAAK,EAAE,KAA4B,EAAE,EAAE;QACrC,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC5B,MAAM,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;YAC1D,OAAO;QACT,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC,CACF,CAAC;IACF,MAAM,MAAM,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IACnC,IAAI,OAAO,EAAE,mBAAmB,KAAK,IAAI,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QAC1E,MAAM,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IACjC,CAAC;AACH,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare function parseBootstrapApiKey(stdout: string): string | undefined;
2
+ export declare function parseWorkspaceBootstrapOutput(stdout: string): {
3
+ readonly workspaceId?: string;
4
+ readonly alreadyCompleted: boolean;
5
+ readonly apiKey?: string;
6
+ };
7
+ export declare function parseIdentityBootstrapSetupToken(stdout: string): string | undefined;
8
+ export declare function redactBootstrapSubprocessOutput(text: string): string;
9
+ //# sourceMappingURL=bootstrap-capture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstrap-capture.d.ts","sourceRoot":"","sources":["../../src/setup/bootstrap-capture.ts"],"names":[],"mappings":"AAUA,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGvE;AAED,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,MAAM,GAAG;IAC7D,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B,CAWA;AAED,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,MAAM,GACb,MAAM,GAAG,SAAS,CAkBpB;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAapE"}
@@ -0,0 +1,64 @@
1
+ import { redactSecrets } from "../doctor/redact.js";
2
+ const WORKSPACE_ID_PATTERN = /Workspace ID:\s*([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/i;
3
+ const BOOTSTRAP_API_KEY_PATTERN = /(osva_ak_[0-9A-Za-z_-]+\.[0-9A-Za-z_-]+)/;
4
+ const SETUP_TOKEN_MARKER = "One-time password setup token (single use; do not log or share):";
5
+ export function parseBootstrapApiKey(stdout) {
6
+ const match = stdout.match(BOOTSTRAP_API_KEY_PATTERN);
7
+ return match?.[1];
8
+ }
9
+ export function parseWorkspaceBootstrapOutput(stdout) {
10
+ const alreadyCompleted = stdout.includes("Installation bootstrap has already completed");
11
+ const match = stdout.match(WORKSPACE_ID_PATTERN);
12
+ const apiKey = parseBootstrapApiKey(stdout);
13
+ return {
14
+ ...(match?.[1] === undefined ? {} : { workspaceId: match[1] }),
15
+ ...(apiKey === undefined ? {} : { apiKey }),
16
+ alreadyCompleted,
17
+ };
18
+ }
19
+ export function parseIdentityBootstrapSetupToken(stdout) {
20
+ const lines = stdout.split(/\r?\n/);
21
+ for (let index = 0; index < lines.length; index += 1) {
22
+ if (lines[index]?.trim() !== SETUP_TOKEN_MARKER) {
23
+ continue;
24
+ }
25
+ for (let next = index + 1; next < lines.length; next += 1) {
26
+ const candidate = lines[next]?.trim() ?? "";
27
+ if (candidate.length === 0) {
28
+ continue;
29
+ }
30
+ if (candidate.startsWith("Complete setup:")) {
31
+ return undefined;
32
+ }
33
+ return candidate;
34
+ }
35
+ }
36
+ return undefined;
37
+ }
38
+ export function redactBootstrapSubprocessOutput(text) {
39
+ let redacted = redactSecrets(text);
40
+ redacted = redactLineAfterMarker(redacted, SETUP_TOKEN_MARKER, "[setup-token-redacted]");
41
+ redacted = redactLineAfterMarker(redacted, "Copy the API key below now. It cannot be retrieved again:", "osva_ak_***");
42
+ return redacted;
43
+ }
44
+ function redactLineAfterMarker(text, marker, replacement) {
45
+ const lines = text.split(/\r?\n/);
46
+ const output = [];
47
+ for (let index = 0; index < lines.length; index += 1) {
48
+ output.push(lines[index] ?? "");
49
+ if (lines[index]?.trim() === marker) {
50
+ for (let next = index + 1; next < lines.length; next += 1) {
51
+ const candidate = lines[next]?.trim() ?? "";
52
+ if (candidate.length === 0) {
53
+ output.push(lines[next] ?? "");
54
+ continue;
55
+ }
56
+ output.push(replacement);
57
+ index = next;
58
+ break;
59
+ }
60
+ }
61
+ }
62
+ return output.join("\n");
63
+ }
64
+ //# sourceMappingURL=bootstrap-capture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstrap-capture.js","sourceRoot":"","sources":["../../src/setup/bootstrap-capture.ts"],"names":[],"m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K,CAAC,MAAM,EAAE,IAAI,IAAI,CAAC,EAAE,CAAC;gBAC1D,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;gBAC5C,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;oBAC3B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;oBAC/B,SAAS;gBACX,CAAC;gBACD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBACzB,KAAK,GAAG,IAAI,CAAC;gBACb,MAAM;YACR,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { type ProbeSpawnFn, type ProbeSpawnResult } from "./probe-spawn.js";
2
+ export interface ComposeExecContext {
3
+ readonly installDir: string;
4
+ readonly envFilePath: string;
5
+ readonly projectName: string;
6
+ }
7
+ export interface ComposeExecOptions {
8
+ readonly spawn?: ProbeSpawnFn;
9
+ readonly timeoutMs: number;
10
+ readonly processEnv?: NodeJS.ProcessEnv;
11
+ }
12
+ export declare function buildComposeSpawnEnv(ctx: ComposeExecContext, processEnv?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
13
+ export declare function composeBaseArgs(ctx: ComposeExecContext): string[];
14
+ export declare function runComposeCommand(ctx: ComposeExecContext, args: readonly string[], options: ComposeExecOptions): ProbeSpawnResult;
15
+ export declare function assertComposeSuccess(result: ProbeSpawnResult, action: string): void;
16
+ export declare function composeCommandIncludesDestructiveVolumeRemoval(args: readonly string[]): boolean;
17
+ export declare class ComposeExecError extends Error {
18
+ readonly code: "timeout" | "command_failed";
19
+ constructor(code: "timeout" | "command_failed", message: string);
20
+ }
21
+ //# sourceMappingURL=compose-exec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compose-exec.d.ts","sourceRoot":"","sources":["../../src/setup/compose-exec.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACzC;AAED,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,kBAAkB,EACvB,UAAU,GAAE,MAAM,CAAC,UAAwB,GAC1C,MAAM,CAAC,UAAU,CAKnB;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,EAAE,CAYjE;AAED,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,kBAAkB,EACvB,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,EAAE,kBAAkB,GAC1B,gBAAgB,CAMlB;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,MAAM,GACb,IAAI,CAgBN;AAED,wBAAgB,8CAA8C,CAC5D,IAAI,EAAE,SAAS,MAAM,EAAE,GACtB,OAAO,CAGT;AAWD,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,gBAAgB,CAAC;gBAEhC,IAAI,EAAE,SAAS,GAAG,gBAAgB,EAAE,OAAO,EAAE,MAAM;CAIhE"}
@@ -0,0 +1,55 @@
1
+ import path from "node:path";
2
+ import { redactSecrets } from "../doctor/redact.js";
3
+ import { defaultProbeSpawn, } from "./probe-spawn.js";
4
+ export function buildComposeSpawnEnv(ctx, processEnv = process.env) {
5
+ return {
6
+ ...processEnv,
7
+ COMPOSE_PROJECT_NAME: ctx.projectName,
8
+ };
9
+ }
10
+ export function composeBaseArgs(ctx) {
11
+ return [
12
+ "compose",
13
+ "--project-name",
14
+ ctx.projectName,
15
+ "--project-directory",
16
+ ctx.installDir,
17
+ "--env-file",
18
+ ctx.envFilePath,
19
+ "-f",
20
+ path.join(ctx.installDir, "compose.yml"),
21
+ ];
22
+ }
23
+ export function runComposeCommand(ctx, args, options) {
24
+ const spawn = options.spawn ?? defaultProbeSpawn;
25
+ const dockerArgs = [...composeBaseArgs(ctx), ...args];
26
+ const processEnv = options.processEnv ?? buildComposeSpawnEnv(ctx, process.env);
27
+ return spawn("docker", dockerArgs, options.timeoutMs, processEnv);
28
+ }
29
+ export function assertComposeSuccess(result, action) {
30
+ if (result.error?.code === "ETIMEDOUT") {
31
+ throw new ComposeExecError("timeout", `${action} timed out. Retry when Docker responds promptly.`);
32
+ }
33
+ if (result.status !== 0) {
34
+ const detail = redactSecrets(firstLine(result.stderr) || firstLine(result.stdout));
35
+ throw new ComposeExecError("command_failed", detail.length > 0 ? `${action} failed: ${detail}` : `${action} failed.`);
36
+ }
37
+ }
38
+ export function composeCommandIncludesDestructiveVolumeRemoval(args) {
39
+ const joined = args.join(" ");
40
+ return /\bdown\b/.test(joined) && /(?:^|\s)-v(?:\s|$)/.test(joined);
41
+ }
42
+ function firstLine(text) {
43
+ return (text
44
+ .split(/\r?\n/)
45
+ .map((line) => line.trim())
46
+ .find((line) => line.length > 0) ?? "");
47
+ }
48
+ export class ComposeExecError extends Error {
49
+ code;
50
+ constructor(code, message) {
51
+ super(message);
52
+ this.code = code;
53
+ }
54
+ }
55
+ //# sourceMappingURL=compose-exec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compose-exec.js","sourceRoot":"","sources":["../../src/setup/compose-exec.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAA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;QACxB,MAAM,MAAM,GAAG,aAAa,CAC1B,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CACrD,CAAC;QACF,MAAM,IAAI,gBAAgB,CACxB,gBAAgB,EAChB,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,YAAY,MAAM,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,UAAU,CACxE,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAM,UAAU,8CAA8C,CAC5D,IAAuB;IAEvB,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9B,OAAO,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACtE,CAAC;AAED,SAAS,SAAS,CAAC,IAAY;IAC7B,OAAO,CACL,IAAI;SACD,KAAK,CAAC,OAAO,CAAC;SACd,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;SAC1B,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,CACzC,CAAC;AACJ,CAAC;AAED,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IAChC,IAAI,CAA+B;IAE5C,YAAY,IAAkC,EAAE,OAAe;QAC7D,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF"}
@@ -0,0 +1,3 @@
1
+ /** Stable Compose project identity scoped to the installation directory path. */
2
+ export declare function deriveComposeProjectName(installDir: string): string;
3
+ //# sourceMappingURL=compose-project.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compose-project.d.ts","sourceRoot":"","sources":["../../src/setup/compose-project.ts"],"names":[],"mappings":"AAGA,iFAAiF;AACjF,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAOnE"}
@@ -0,0 +1,12 @@
1
+ import { createHash } from "node:crypto";
2
+ import path from "node:path";
3
+ /** Stable Compose project identity scoped to the installation directory path. */
4
+ export function deriveComposeProjectName(installDir) {
5
+ const normalized = path.resolve(installDir).replace(/\\/g, "/").toLowerCase();
6
+ const digest = createHash("sha256")
7
+ .update(normalized)
8
+ .digest("hex")
9
+ .slice(0, 12);
10
+ return `osva-${digest}`;
11
+ }
12
+ //# sourceMappingURL=compose-project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compose-project.js","sourceRoot":"","sources":["../../src/setup/compose-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,iFAAiF;AACjF,MAAM,UAAU,wBAAwB,CAAC,UAAkB;IACzD,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;IAC9E,MAAM,MAAM,GAAG,UAAU,CAAC,QAAQ,CAAC;SAChC,MAAM,CAAC,UAAU,CAAC;SAClB,MAAM,CAAC,KAAK,CAAC;SACb,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAChB,OAAO,QAAQ,MAAM,EAAE,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Bundled registry-only Compose distribution shipped with the CLI package. */
2
+ export declare function resolveComposeInstallTemplateRoot(): string;
3
+ //# sourceMappingURL=compose-template-root.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compose-template-root.d.ts","sourceRoot":"","sources":["../../src/setup/compose-template-root.ts"],"names":[],"mappings":"AAKA,+EAA+E;AAC/E,wBAAgB,iCAAiC,IAAI,MAAM,CAE1D"}
@@ -0,0 +1,8 @@
1
+ import path from "node:path";
2
+ import { fileURLToPath } from "node:url";
3
+ const setupModuleDir = path.dirname(fileURLToPath(import.meta.url));
4
+ /** Bundled registry-only Compose distribution shipped with the CLI package. */
5
+ export function resolveComposeInstallTemplateRoot() {
6
+ return path.resolve(setupModuleDir, "../../templates/compose-install");
7
+ }
8
+ //# sourceMappingURL=compose-template-root.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compose-template-root.js","sourceRoot":"","sources":["../../src/setup/compose-template-root.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAEpE,+EAA+E;AAC/E,MAAM,UAAU,iCAAiC;IAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,iCAAiC,CAAC,CAAC;AACzE,CAAC"}
@@ -0,0 +1,13 @@
1
+ export interface ComposeDistributionManifest {
2
+ readonly distributionSchemaVersion: number;
3
+ readonly platformVersion: string;
4
+ readonly imageRef: string;
5
+ }
6
+ export interface ComposeDistribution {
7
+ readonly manifest: ComposeDistributionManifest;
8
+ readonly composeYaml: string;
9
+ readonly templateRoot: string;
10
+ }
11
+ export declare function loadComposeDistribution(): Promise<ComposeDistribution>;
12
+ export declare function assertPinnedImageRef(imageRef: string): void;
13
+ //# sourceMappingURL=distribution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"distribution.d.ts","sourceRoot":"","sources":["../../src/setup/distribution.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,yBAAyB,EAAE,MAAM,CAAC;IAC3C,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,EAAE,2BAA2B,CAAC;IAC/C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAY5E;AAwBD,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAoB3D"}
@@ -0,0 +1,55 @@
1
+ import { readFile } from "node:fs/promises";
2
+ import path from "node:path";
3
+ import { resolveComposeInstallTemplateRoot } from "./compose-template-root.js";
4
+ export async function loadComposeDistribution() {
5
+ const templateRoot = resolveComposeInstallTemplateRoot();
6
+ const manifestPath = path.join(templateRoot, "distribution.json");
7
+ const composePath = path.join(templateRoot, "compose.yml");
8
+ const [manifestRaw, composeYaml] = await Promise.all([
9
+ readFile(manifestPath, "utf8"),
10
+ readFile(composePath, "utf8"),
11
+ ]);
12
+ const manifest = JSON.parse(manifestRaw);
13
+ assertDistributionManifest(manifest);
14
+ assertRegistryOnlyCompose(composeYaml);
15
+ return { manifest, composeYaml, templateRoot };
16
+ }
17
+ function assertDistributionManifest(manifest) {
18
+ if (manifest.distributionSchemaVersion !== 1) {
19
+ throw new Error(`Unsupported compose distribution schema version ${String(manifest.distributionSchemaVersion)}.`);
20
+ }
21
+ if (typeof manifest.platformVersion !== "string" ||
22
+ manifest.platformVersion.length === 0) {
23
+ throw new Error("Compose distribution manifest is missing platformVersion.");
24
+ }
25
+ if (typeof manifest.imageRef !== "string" || manifest.imageRef.length === 0) {
26
+ throw new Error("Compose distribution manifest is missing imageRef.");
27
+ }
28
+ assertPinnedImageRef(manifest.imageRef);
29
+ }
30
+ export function assertPinnedImageRef(imageRef) {
31
+ const trimmed = imageRef.trim();
32
+ if (trimmed.length === 0) {
33
+ throw new Error("OSVA image reference must not be empty.");
34
+ }
35
+ if (trimmed === "latest" || trimmed.endsWith(":latest")) {
36
+ throw new Error("Refusing unversioned OSVA image tag for installation.");
37
+ }
38
+ const lastSegment = trimmed.split("/").at(-1) ?? trimmed;
39
+ if (!lastSegment.includes(":")) {
40
+ throw new Error("Refusing OSVA image reference without an explicit version tag.");
41
+ }
42
+ const tag = lastSegment.split(":").at(-1) ?? "";
43
+ if (tag.length === 0) {
44
+ throw new Error("Refusing OSVA image reference without an explicit version tag.");
45
+ }
46
+ }
47
+ function assertRegistryOnlyCompose(composeYaml) {
48
+ if (/\n\s*build\s*:/.test(composeYaml)) {
49
+ throw new Error("Bundled installation compose must not contain image build contexts.");
50
+ }
51
+ if (!composeYaml.includes("OSVA_IMAGE:?OSVA_IMAGE is required")) {
52
+ throw new Error("Bundled installation compose must require an explicit OSVA_IMAGE.");
53
+ }
54
+ }
55
+ //# sourceMappingURL=distribution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"distribution.js","sourceRoot":"","sources":["../../src/setup/distribution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAc/E,MAAM,CAAC,KAAK,UAAU,uBAAuB;IAC3C,MAAM,YAAY,GAAG,iCAAiC,EAAE,CAAC;IACzD,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,mBAAmB,CAAC,CAAC;IAClE,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;IAC3D,MAAM,CAAC,WAAW,EAAE,WAAW,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACnD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;QAC9B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;KAC9B,CAAC,CAAC;IACH,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAA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AI,OAAO,CAAC;IACzD,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CACb,gEAAgE,CACjE,CAAC;IACJ,CAAC;IACD,MAAM,GAAG,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAChD,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CACb,gEAAgE,CACjE,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAS,yBAAyB,CAAC,WAAmB;IACpD,IAAI,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK,CACb,qEAAqE,CACtE,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,oCAAoC,CAAC,EAAE,CAAC;QAChE,MAAM,IAAI,KAAK,CACb,mEAAmE,CACpE,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,23 @@
1
+ /** Keys written to the installation `.env` and checked for host-shell conflicts. */
2
+ export declare const INSTALL_ENV_KEYS: readonly ["COMPOSE_PROJECT_NAME", "OSVA_IMAGE", "POSTGRES_PASSWORD", "OSVA_AUTH_SECRET", "OSVA_PUBLISH_WEB_PORT", "OSVA_PUBLISH_MCP_PORT", "OSVA_PUBLISH_CONSOLE_PORT", "OSVA_AUTH_BASE_URL", "OSVA_AUTH_TRUSTED_ORIGINS", "OSVA_VALKEY_URL"];
3
+ export type InstallEnvKey = (typeof INSTALL_ENV_KEYS)[number];
4
+ export type InstallEnvValues = Record<InstallEnvKey, string>;
5
+ export interface EnvConflict {
6
+ readonly key: InstallEnvKey;
7
+ readonly shellValue: string;
8
+ readonly fileValue: string;
9
+ }
10
+ export declare function parseDotEnv(contents: string): Map<string, string>;
11
+ export declare function readInstallEnvFile(envPath: string): Promise<Map<string, string> | undefined>;
12
+ export declare function detectShellEnvConflicts(fileValues: InstallEnvValues, shellEnv: NodeJS.ProcessEnv): readonly EnvConflict[];
13
+ export declare function renderInstallEnvFile(values: InstallEnvValues): string;
14
+ export declare function buildInstallEnvValues(input: {
15
+ readonly imageRef: string;
16
+ readonly composeProjectName: string;
17
+ readonly webPort: number;
18
+ readonly mcpPort: number;
19
+ readonly consolePort: number;
20
+ readonly existing?: Map<string, string>;
21
+ readonly generateSecret: () => string;
22
+ }): InstallEnvValues;
23
+ //# sourceMappingURL=env-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env-file.d.ts","sourceRoot":"","sources":["../../src/setup/env-file.ts"],"names":[],"mappings":"AAEA,oFAAoF;AACpF,eAAO,MAAM,gBAAgB,+OAWnB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9D,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;AAE7D,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,GAAG,EAAE,aAAa,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAyBjE;AAED,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC,CAc1C;AAED,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,gBAAgB,EAC5B,QAAQ,EAAE,MAAM,CAAC,UAAU,GAC1B,SAAS,WAAW,EAAE,CAgBxB;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CA0B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