@wildo-ai/wildo-cli 1.1.12 → 1.1.13
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.
- package/dist/src/commands/config/sync.command.d.ts.map +1 -1
- package/dist/src/commands/config/sync.command.js +1 -0
- package/dist/src/commands/config/sync.command.js.map +1 -1
- package/dist/src/commands/context/journey.command.d.ts.map +1 -1
- package/dist/src/commands/context/journey.command.js +8 -0
- package/dist/src/commands/context/journey.command.js.map +1 -1
- package/dist/src/commands/creation/drive.command.d.ts.map +1 -1
- package/dist/src/commands/creation/drive.command.js +2 -0
- package/dist/src/commands/creation/drive.command.js.map +1 -1
- package/dist/src/commands/fwk/publish-all.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/publish-all.command.js +8 -0
- package/dist/src/commands/fwk/publish-all.command.js.map +1 -1
- package/dist/src/commands/local/dev.command.d.ts +68 -0
- package/dist/src/commands/local/dev.command.d.ts.map +1 -1
- package/dist/src/commands/local/dev.command.js +216 -8
- package/dist/src/commands/local/dev.command.js.map +1 -1
- package/dist/src/commands/local/doctor.command.d.ts +22 -9
- package/dist/src/commands/local/doctor.command.d.ts.map +1 -1
- package/dist/src/commands/local/doctor.command.js +45 -42
- package/dist/src/commands/local/doctor.command.js.map +1 -1
- package/dist/src/commands/providers/connect.command.d.ts.map +1 -1
- package/dist/src/commands/providers/connect.command.js +11 -1
- package/dist/src/commands/providers/connect.command.js.map +1 -1
- package/dist/src/commands/seal/currency.command.d.ts +13 -0
- package/dist/src/commands/seal/currency.command.d.ts.map +1 -0
- package/dist/src/commands/seal/currency.command.js +52 -0
- package/dist/src/commands/seal/currency.command.js.map +1 -0
- package/dist/src/commands/seal/seal-admin-door.utils.d.ts.map +1 -1
- package/dist/src/commands/seal/seal-admin-door.utils.js +2 -0
- package/dist/src/commands/seal/seal-admin-door.utils.js.map +1 -1
- package/dist/src/commands/seal/verify.command.d.ts +5 -0
- package/dist/src/commands/seal/verify.command.d.ts.map +1 -1
- package/dist/src/commands/seal/verify.command.js +26 -2
- package/dist/src/commands/seal/verify.command.js.map +1 -1
- package/dist/src/services/application/content-guardrail-classifier.service.d.ts +19 -0
- package/dist/src/services/application/content-guardrail-classifier.service.d.ts.map +1 -1
- package/dist/src/services/application/content-guardrail-classifier.service.js +75 -11
- package/dist/src/services/application/content-guardrail-classifier.service.js.map +1 -1
- package/dist/src/services/application/local-provider-doubles.service.d.ts +98 -0
- package/dist/src/services/application/local-provider-doubles.service.d.ts.map +1 -0
- package/dist/src/services/application/local-provider-doubles.service.js +214 -0
- package/dist/src/services/application/local-provider-doubles.service.js.map +1 -0
- package/dist/src/services/application/system-of-record-simulators.service.d.ts +21 -2
- package/dist/src/services/application/system-of-record-simulators.service.d.ts.map +1 -1
- package/dist/src/services/application/system-of-record-simulators.service.js +21 -12
- package/dist/src/services/application/system-of-record-simulators.service.js.map +1 -1
- package/dist/src/services/companion/creation-drive.service.d.ts +32 -2
- package/dist/src/services/companion/creation-drive.service.d.ts.map +1 -1
- package/dist/src/services/companion/creation-drive.service.js +61 -4
- package/dist/src/services/companion/creation-drive.service.js.map +1 -1
- package/dist/src/services/credentials/credentials.schemas.d.ts +6 -0
- package/dist/src/services/credentials/credentials.schemas.d.ts.map +1 -1
- package/dist/src/services/credentials/credentials.schemas.js +7 -1
- package/dist/src/services/credentials/credentials.schemas.js.map +1 -1
- package/dist/src/services/credentials/provider-env-vars.utils.d.ts.map +1 -1
- package/dist/src/services/credentials/provider-env-vars.utils.js +11 -3
- package/dist/src/services/credentials/provider-env-vars.utils.js.map +1 -1
- package/dist/src/services/data-services/data-services.schemas.d.ts +9 -0
- package/dist/src/services/data-services/data-services.schemas.d.ts.map +1 -1
- package/dist/src/services/data-services/data-services.schemas.js +9 -0
- package/dist/src/services/data-services/data-services.schemas.js.map +1 -1
- package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts.map +1 -1
- package/dist/src/services/deployment/docker/docker-compose-generator.service.js +7 -2
- package/dist/src/services/deployment/docker/docker-compose-generator.service.js.map +1 -1
- package/dist/src/services/deployment/local-dev-session-lease.service.d.ts.map +1 -1
- package/dist/src/services/deployment/local-dev-session-lease.service.js +22 -1
- package/dist/src/services/deployment/local-dev-session-lease.service.js.map +1 -1
- package/dist/src/services/environment/authored-infra-config.utils.d.ts.map +1 -1
- package/dist/src/services/environment/authored-infra-config.utils.js +1 -0
- package/dist/src/services/environment/authored-infra-config.utils.js.map +1 -1
- package/dist/src/services/environment/authored-infra-member-authority.d.ts.map +1 -1
- package/dist/src/services/environment/authored-infra-member-authority.js +5 -0
- package/dist/src/services/environment/authored-infra-member-authority.js.map +1 -1
- package/dist/src/services/environment/env-configuration-generator.service.d.ts.map +1 -1
- package/dist/src/services/environment/env-configuration-generator.service.js +6 -3
- package/dist/src/services/environment/env-configuration-generator.service.js.map +1 -1
- package/dist/src/services/environment/env-vars-builder.service.d.ts +6 -0
- package/dist/src/services/environment/env-vars-builder.service.d.ts.map +1 -1
- package/dist/src/services/environment/env-vars-builder.service.js +24 -1
- package/dist/src/services/environment/env-vars-builder.service.js.map +1 -1
- package/dist/src/services/environment/environment-hydration.utils.d.ts.map +1 -1
- package/dist/src/services/environment/environment-hydration.utils.js +1 -0
- package/dist/src/services/environment/environment-hydration.utils.js.map +1 -1
- package/dist/src/services/environment/environment.schemas.d.ts +7 -1
- package/dist/src/services/environment/environment.schemas.d.ts.map +1 -1
- package/dist/src/services/environment/environment.schemas.js.map +1 -1
- package/dist/src/services/environment/runtime-bootstrap.service.d.ts +2 -0
- package/dist/src/services/environment/runtime-bootstrap.service.d.ts.map +1 -1
- package/dist/src/services/environment/runtime-bootstrap.service.js +4 -0
- package/dist/src/services/environment/runtime-bootstrap.service.js.map +1 -1
- package/dist/src/services/framework/framework-docker-publish.service.d.ts +13 -0
- package/dist/src/services/framework/framework-docker-publish.service.d.ts.map +1 -1
- package/dist/src/services/framework/framework-docker-publish.service.js +24 -7
- package/dist/src/services/framework/framework-docker-publish.service.js.map +1 -1
- package/dist/src/services/registry/provider-connect.service.d.ts +57 -1
- package/dist/src/services/registry/provider-connect.service.d.ts.map +1 -1
- package/dist/src/services/registry/provider-connect.service.js +63 -2
- package/dist/src/services/registry/provider-connect.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +18 -18
- package/scripts/app-dependency-alignment/propagated-engine-overrides.json +1 -1
- package/wildo-framework.info.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drive.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/creation/drive.command.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAc1F,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,sDAAsD,CAAC;AAM9D;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,WAAW;IAC3D,QAAQ,CAAC,IAAI,EAAE,WAAW,CAcxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"drive.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/creation/drive.command.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAc1F,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,sDAAsD,CAAC;AAM9D;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,WAAW;IAC3D,QAAQ,CAAC,IAAI,EAAE,WAAW,CAcxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAqDvD;AAED,mGAAmG;AACnG,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,mBAAmB,GAAG,MAAM,EAAE,CASjF"}
|
|
@@ -63,6 +63,8 @@ export default class CreationDriveCommand extends BaseCommand {
|
|
|
63
63
|
result = await runCreationDrive({
|
|
64
64
|
readFeed: () => CreationConsoleClient.readFeed(options),
|
|
65
65
|
readStatus: () => CompanionClient.get('/api/companion/creation/drive/status', options),
|
|
66
|
+
// Derives the maturity reading (the landing probe, the follow-ups), so it gets the console's write deadline (#3701).
|
|
67
|
+
readRequirementsStanding: () => CompanionClient.get('/api/companion/creation/requirements/standing', { ...options, timeoutMs: CONSOLE_WRITE_TIMEOUT_MS }),
|
|
66
68
|
readSpentUsd: async () => (await CreationConsoleClient.report(options)).spend.total.cost['USD'],
|
|
67
69
|
runLoop: (request) => CreationConsoleClient.loop(loopOptions, request),
|
|
68
70
|
// The accept waits for the worktree lock (up to about ten minutes), so it gets the console's write deadline.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drive.command.js","sourceRoot":"","sources":["../../../../src/commands/creation/drive.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAG/D,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,4BAA4B,EAC5B,wBAAwB,EACxB,mCAAmC,GACpC,MAAM,wDAAwD,CAAC;AAChE,OAAO,EAAE,wCAAwC,EAAE,MAAM,8DAA8D,CAAC;AACxH,OAAO,EAAE,qBAAqB,EAAE,MAAM,wDAAwD,CAAC;AAC/F,OAAO,EAAE,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vE,CAAC;QACD,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI;YAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;;YAClD,KAAK,MAAM,IAAI,IAAI,2BAA2B,CAAC,MAAM,CAAC;gBAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;CACF;AAED,mGAAmG;AACnG,MAAM,UAAU,2BAA2B,CAAC,MAA2B;IACrE,OAAO;QACL,sBAAsB,MAAM,CAAC,SAAS,GAAG;QACzC,kBAAkB,MAAM,CAAC,UAAU,EAAE;QACrC,KAAK,MAAM,CAAC,KAAK,aAAa,MAAM,CAAC,MAAM,cAAc,MAAM,CAAC,QAAQ,8BAA8B,MAAM,CAAC,iBAAiB,8BAA8B;cACxJ,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,OAAO,MAAM,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,GAAG;QACzI,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,mFAAmF,CAAC,CAAC;QACtH,sFAAsF;KACvF,CAAC;AACJ,CAAC","sourcesContent":["import { WorkspaceScope } from '@wildo-ai/platform-config-lib';\nimport type { CreationConsole_Feed, CreationDrive_AcceptOutcome, CreationDrive_Status } from '@wildo-ai/platform-core-shared';\n\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandContext, CommandMeta, CommandResult } from '~wildo-cli/kernel/types';\nimport { ensureSaasAppScope } from '~wildo-cli/kernel/command-scope-utils';\nimport { writeJsonDocument } from '~wildo-cli/kernel/json-document-output';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport {\n CompanionClient,\n CompanionRefusalError,\n CompanionRequestTimeoutError,\n companionFailureExitCode,\n readCompanionProviderAccountRefusal,\n} from '~wildo-cli/services/companion/companion-client.service';\nimport { resolveCompanionClientOptionsFromContext } from '~wildo-cli/services/companion/companion-client-options.utils';\nimport { CreationConsoleClient } from '~wildo-cli/services/companion/creation-console.service';\nimport { CONSOLE_READ_TIMEOUT_MS, CONSOLE_WRITE_TIMEOUT_MS } from '~wildo-cli/services/companion/console-verb.utils';\nimport {\n CreationDriveStopRule,\n CreationDriveUntil,\n runCreationDrive,\n type CreationDriveResult,\n} from '~wildo-cli/services/companion/creation-drive.service';\nimport { SKIP_PREFLIGHT_FLAG, admitCreationRunAfterPreflight } from '~wildo-cli/services/application/creation-preflight.service';\n\n/** The longest one loop request is waited on. A loop may run a build lane for hours; past this the drive reads the state again. */\nconst CREATION_DRIVE_LOOP_REQUEST_TIMEOUT_MS = 6 * 60 * 60 * 1000;\n\n/**\n * `wildo creation drive --goal \"<goal>\" --until stuck --max-hours <h> --max-usd <n>` — run a creation unattended until a\n * stop rule fires (#2233): loops of rounds and the build they choose, accepted under the autonomy posture, through\n * companion restarts, usage-limit pauses and network losses, stopping on the first thing that needs the creator and\n * naming it. See `creation-drive.service.ts` for the rules.\n *\n * Both ceilings are REQUIRED and the person's, as `loop`'s iteration ceiling is: an unattended drive over the\n * application's source stops where the person said, never where this command guessed.\n */\nexport default class CreationDriveCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'creation drive',\n description: 'Drive the creation unattended until a stop rule fires: rounds, the build, acceptance, restarts.',\n category: CommandCategory.Local,\n minimumScope: WorkspaceScope.SAAS_APP,\n flags: {\n goal: { type: 'string', description: 'What the creation should achieve, in a sentence' },\n until: { type: 'string', description: 'When to stop: `stuck` (the first stop rule that fires)', default: CreationDriveUntil.STUCK },\n 'max-hours': { type: 'string', description: 'The wall-clock ceiling, in hours (required)' },\n 'max-usd': { type: 'string', description: 'The spend ceiling, in US dollars of measured spend (required)' },\n 'fan-out': { type: 'string', description: 'The most playbooks one round may run at once, 1 to 5' },\n json: { type: 'boolean', description: 'Emit the drive\\'s result document.', default: false },\n [SKIP_PREFLIGHT_FLAG]: { type: 'boolean', description: 'Start even when `wildo creation preflight` reports a FAIL.', default: false },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const goal = typeof ctx.flags.goal === 'string' ? ctx.flags.goal.trim() : '';\n const until = String(ctx.flags.until ?? CreationDriveUntil.STUCK);\n const maximumHours = Number(ctx.flags['max-hours']);\n const maximumUsd = Number(ctx.flags['max-usd']);\n const fanOut = ctx.flags['fan-out'] === undefined ? undefined : Number(ctx.flags['fan-out']);\n if (goal.length === 0 || !(Object.values(CreationDriveUntil) as string[]).includes(until)\n || !(maximumHours > 0) || !(maximumUsd > 0) || (fanOut !== undefined && !(Number.isSafeInteger(fanOut) && fanOut >= 1 && fanOut <= 5))) {\n ctx.log.error('Usage: wildo creation drive --goal \"<what the creation should achieve>\" --until stuck --max-hours <h> --max-usd <n> [--fan-out <1-5>]');\n return { success: false };\n }\n if (!ensureSaasAppScope(ctx)) return { success: false };\n // Once, before the first round (#2229); every loop request is checked again by the companion.\n if (!await admitCreationRunAfterPreflight(ctx, 'wildo creation drive')) {\n if (ctx.flags.json === true) writeJsonDocument({ stoppedBy: CreationDriveStopRule.PREFLIGHT_FAILED, waitingFor: 'wildo creation preflight' });\n return { success: false };\n }\n const options = await resolveCompanionClientOptionsFromContext(ctx, CONSOLE_READ_TIMEOUT_MS);\n const loopOptions = { ...options, timeoutMs: CREATION_DRIVE_LOOP_REQUEST_TIMEOUT_MS };\n let result: CreationDriveResult;\n try {\n result = await runCreationDrive({\n readFeed: () => CreationConsoleClient.readFeed(options) as Promise<CreationConsole_Feed>,\n readStatus: () => CompanionClient.get<CreationDrive_Status>('/api/companion/creation/drive/status', options),\n readSpentUsd: async () => (await CreationConsoleClient.report(options)).spend.total.cost['USD'],\n runLoop: (request) => CreationConsoleClient.loop(loopOptions, request),\n // The accept waits for the worktree lock (up to about ten minutes), so it gets the console's write deadline.\n accept: () => CompanionClient.post<CreationDrive_AcceptOutcome>('/api/companion/creation/drive/accept', {}, { ...options, timeoutMs: CONSOLE_WRITE_TIMEOUT_MS }),\n isCompanionUnreachable: (error) => companionFailureExitCode(error) === 2,\n isClientTimeout: (error) => error instanceof CompanionRequestTimeoutError,\n isNotReadyYet: (error) => error instanceof CompanionRefusalError && error.status === 503,\n isAlreadyRunning: (error) => error instanceof CompanionRefusalError && error.status === 409,\n readProviderAccountRefusal: readCompanionProviderAccountRefusal,\n now: () => Date.now(),\n sleep: (ms) => new Promise((resolve) => setTimeout(resolve, ms)),\n progress: (line) => { if (ctx.flags.json !== true) ctx.log.info(line); },\n }, {\n goal,\n maximumMs: maximumHours * 3_600_000,\n maximumUsd,\n ...(fanOut !== undefined ? { fanOut } : {}),\n ...(ctx.flags[SKIP_PREFLIGHT_FLAG] === true ? { skipPreflight: true } : {}),\n });\n } catch (error) {\n ctx.log.error(`The creation drive stopped on an error: ${ErrorUtils.extractErrorMessage(error)}`);\n return { success: false, exitCode: companionFailureExitCode(error) };\n }\n if (ctx.flags.json === true) writeJsonDocument(result);\n else for (const line of describeCreationDriveResult(result)) ctx.log.info(line);\n return { success: true };\n }\n}\n\n/** The drive's end, for a person: the rule that stopped it, what it waits for, and what it did. */\nexport function describeCreationDriveResult(result: CreationDriveResult): string[] {\n return [\n `The drive stopped: ${result.stoppedBy}.`,\n ` Waiting for: ${result.waitingFor}`,\n ` ${result.loops} loop(s), ${result.rounds} round(s), ${result.accepted} playbook run(s) accepted, ${result.companionRestarts} companion restart(s) seen, `\n + `${Math.round(result.elapsedMs / 60_000)} min${result.spentUsd === undefined ? '' : `, USD ${result.spentUsd.toFixed(2)} measured`}.`,\n ...(result.spendMeasured ? [] : [' The spend ceiling was not applied: the run report stated no measured USD spend.']),\n ' What a person did along the way, and the independence score: wildo creation report',\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C,KAAK,MAAM,CAAC,KAAK,aAAa,MAAM,CAAC,MAAM,cAAc,MAAM,CAAC,QAAQ,8BAA8B,MAAM,CAAC,iBAAiB,8BAA8B;cACxJ,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,OAAO,MAAM,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,GAAG;QACzI,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,mFAAmF,CAAC,CAAC;QACtH,sFAAsF;KACvF,CAAC;AACJ,CAAC","sourcesContent":["import { WorkspaceScope } from '@wildo-ai/platform-config-lib';\nimport type { CreationConsole_Feed, CreationDrive_AcceptOutcome, CreationDrive_RequirementsStanding, CreationDrive_Status } from '@wildo-ai/platform-core-shared';\n\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandContext, CommandMeta, CommandResult } from '~wildo-cli/kernel/types';\nimport { ensureSaasAppScope } from '~wildo-cli/kernel/command-scope-utils';\nimport { writeJsonDocument } from '~wildo-cli/kernel/json-document-output';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport {\n CompanionClient,\n CompanionRefusalError,\n CompanionRequestTimeoutError,\n companionFailureExitCode,\n readCompanionProviderAccountRefusal,\n} from '~wildo-cli/services/companion/companion-client.service';\nimport { resolveCompanionClientOptionsFromContext } from '~wildo-cli/services/companion/companion-client-options.utils';\nimport { CreationConsoleClient } from '~wildo-cli/services/companion/creation-console.service';\nimport { CONSOLE_READ_TIMEOUT_MS, CONSOLE_WRITE_TIMEOUT_MS } from '~wildo-cli/services/companion/console-verb.utils';\nimport {\n CreationDriveStopRule,\n CreationDriveUntil,\n runCreationDrive,\n type CreationDriveResult,\n} from '~wildo-cli/services/companion/creation-drive.service';\nimport { SKIP_PREFLIGHT_FLAG, admitCreationRunAfterPreflight } from '~wildo-cli/services/application/creation-preflight.service';\n\n/** The longest one loop request is waited on. A loop may run a build lane for hours; past this the drive reads the state again. */\nconst CREATION_DRIVE_LOOP_REQUEST_TIMEOUT_MS = 6 * 60 * 60 * 1000;\n\n/**\n * `wildo creation drive --goal \"<goal>\" --until stuck --max-hours <h> --max-usd <n>` — run a creation unattended until a\n * stop rule fires (#2233): loops of rounds and the build they choose, accepted under the autonomy posture, through\n * companion restarts, usage-limit pauses and network losses, stopping on the first thing that needs the creator and\n * naming it. See `creation-drive.service.ts` for the rules.\n *\n * Both ceilings are REQUIRED and the person's, as `loop`'s iteration ceiling is: an unattended drive over the\n * application's source stops where the person said, never where this command guessed.\n */\nexport default class CreationDriveCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'creation drive',\n description: 'Drive the creation unattended until a stop rule fires: rounds, the build, acceptance, restarts.',\n category: CommandCategory.Local,\n minimumScope: WorkspaceScope.SAAS_APP,\n flags: {\n goal: { type: 'string', description: 'What the creation should achieve, in a sentence' },\n until: { type: 'string', description: 'When to stop: `stuck` (the first stop rule that fires)', default: CreationDriveUntil.STUCK },\n 'max-hours': { type: 'string', description: 'The wall-clock ceiling, in hours (required)' },\n 'max-usd': { type: 'string', description: 'The spend ceiling, in US dollars of measured spend (required)' },\n 'fan-out': { type: 'string', description: 'The most playbooks one round may run at once, 1 to 5' },\n json: { type: 'boolean', description: 'Emit the drive\\'s result document.', default: false },\n [SKIP_PREFLIGHT_FLAG]: { type: 'boolean', description: 'Start even when `wildo creation preflight` reports a FAIL.', default: false },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const goal = typeof ctx.flags.goal === 'string' ? ctx.flags.goal.trim() : '';\n const until = String(ctx.flags.until ?? CreationDriveUntil.STUCK);\n const maximumHours = Number(ctx.flags['max-hours']);\n const maximumUsd = Number(ctx.flags['max-usd']);\n const fanOut = ctx.flags['fan-out'] === undefined ? undefined : Number(ctx.flags['fan-out']);\n if (goal.length === 0 || !(Object.values(CreationDriveUntil) as string[]).includes(until)\n || !(maximumHours > 0) || !(maximumUsd > 0) || (fanOut !== undefined && !(Number.isSafeInteger(fanOut) && fanOut >= 1 && fanOut <= 5))) {\n ctx.log.error('Usage: wildo creation drive --goal \"<what the creation should achieve>\" --until stuck --max-hours <h> --max-usd <n> [--fan-out <1-5>]');\n return { success: false };\n }\n if (!ensureSaasAppScope(ctx)) return { success: false };\n // Once, before the first round (#2229); every loop request is checked again by the companion.\n if (!await admitCreationRunAfterPreflight(ctx, 'wildo creation drive')) {\n if (ctx.flags.json === true) writeJsonDocument({ stoppedBy: CreationDriveStopRule.PREFLIGHT_FAILED, waitingFor: 'wildo creation preflight' });\n return { success: false };\n }\n const options = await resolveCompanionClientOptionsFromContext(ctx, CONSOLE_READ_TIMEOUT_MS);\n const loopOptions = { ...options, timeoutMs: CREATION_DRIVE_LOOP_REQUEST_TIMEOUT_MS };\n let result: CreationDriveResult;\n try {\n result = await runCreationDrive({\n readFeed: () => CreationConsoleClient.readFeed(options) as Promise<CreationConsole_Feed>,\n readStatus: () => CompanionClient.get<CreationDrive_Status>('/api/companion/creation/drive/status', options),\n // Derives the maturity reading (the landing probe, the follow-ups), so it gets the console's write deadline (#3701).\n readRequirementsStanding: () => CompanionClient.get<CreationDrive_RequirementsStanding>('/api/companion/creation/requirements/standing', { ...options, timeoutMs: CONSOLE_WRITE_TIMEOUT_MS }),\n readSpentUsd: async () => (await CreationConsoleClient.report(options)).spend.total.cost['USD'],\n runLoop: (request) => CreationConsoleClient.loop(loopOptions, request),\n // The accept waits for the worktree lock (up to about ten minutes), so it gets the console's write deadline.\n accept: () => CompanionClient.post<CreationDrive_AcceptOutcome>('/api/companion/creation/drive/accept', {}, { ...options, timeoutMs: CONSOLE_WRITE_TIMEOUT_MS }),\n isCompanionUnreachable: (error) => companionFailureExitCode(error) === 2,\n isClientTimeout: (error) => error instanceof CompanionRequestTimeoutError,\n isNotReadyYet: (error) => error instanceof CompanionRefusalError && error.status === 503,\n isAlreadyRunning: (error) => error instanceof CompanionRefusalError && error.status === 409,\n readProviderAccountRefusal: readCompanionProviderAccountRefusal,\n now: () => Date.now(),\n sleep: (ms) => new Promise((resolve) => setTimeout(resolve, ms)),\n progress: (line) => { if (ctx.flags.json !== true) ctx.log.info(line); },\n }, {\n goal,\n maximumMs: maximumHours * 3_600_000,\n maximumUsd,\n ...(fanOut !== undefined ? { fanOut } : {}),\n ...(ctx.flags[SKIP_PREFLIGHT_FLAG] === true ? { skipPreflight: true } : {}),\n });\n } catch (error) {\n ctx.log.error(`The creation drive stopped on an error: ${ErrorUtils.extractErrorMessage(error)}`);\n return { success: false, exitCode: companionFailureExitCode(error) };\n }\n if (ctx.flags.json === true) writeJsonDocument(result);\n else for (const line of describeCreationDriveResult(result)) ctx.log.info(line);\n return { success: true };\n }\n}\n\n/** The drive's end, for a person: the rule that stopped it, what it waits for, and what it did. */\nexport function describeCreationDriveResult(result: CreationDriveResult): string[] {\n return [\n `The drive stopped: ${result.stoppedBy}.`,\n ` Waiting for: ${result.waitingFor}`,\n ` ${result.loops} loop(s), ${result.rounds} round(s), ${result.accepted} playbook run(s) accepted, ${result.companionRestarts} companion restart(s) seen, `\n + `${Math.round(result.elapsedMs / 60_000)} min${result.spentUsd === undefined ? '' : `, USD ${result.spentUsd.toFixed(2)} measured`}.`,\n ...(result.spendMeasured ? [] : [' The spend ceiling was not applied: the run report stated no measured USD spend.']),\n ' What a person did along the way, and the independence score: wildo creation report',\n ];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-all.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/fwk/publish-all.command.ts"],"names":[],"mappings":"AAyFA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAG7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM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UAAU;IAwBlB,+FAA+F;YACjF,cAAc;YAQd,uBAAuB;IAIrC,yGAAyG;YAC3F,qBAAqB;IAKnC;;;;;;;;OAQG;IACH,OAAO,CAAC,qBAAqB;IA6B7B,2GAA2G;YAC7F,aAAa;IAe3B;;;;;OAKG;YACW,QAAQ;CAYvB"}
|
|
@@ -770,6 +770,14 @@ export default class FwkPublishAllCommand extends BaseCommand {
|
|
|
770
770
|
}
|
|
771
771
|
/** Point every configured image's `latest` alias at `version` — an alias-only step, nothing is rebuilt. */
|
|
772
772
|
async repointLatest(ctx, frameworkRoot, version) {
|
|
773
|
+
// Its own login: a resume (`--skipDocker`) never ran the push that used to log in (#3063, run 43278280537).
|
|
774
|
+
try {
|
|
775
|
+
await FrameworkDockerPublishService.loginToRegistry(frameworkRoot);
|
|
776
|
+
}
|
|
777
|
+
catch (error) {
|
|
778
|
+
ctx.log.error(` Docker login before moving the latest alias failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
779
|
+
return false;
|
|
780
|
+
}
|
|
773
781
|
for (const reference of await this.platformImageReferences(frameworkRoot, version)) {
|
|
774
782
|
const alias = reference.replace(/:[^:/]+$/, `:${DEFAULT_NPM_DIST_TAG}`);
|
|
775
783
|
if (!this.step(ctx, `Docker ${alias} → ${version}`, 'docker', ['buildx', 'imagetools', 'create', '-t', alias, reference], frameworkRoot))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-all.command.js","sourceRoot":"","sources":["../../../../src/commands/fwk/publish-all.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkFG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,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,OAAO,CAAC,MAAM,CAAC;QACtC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,MAAM,IAAI,EAAE,EAAE,CAAC;YACzC,MAAM,SAAS,GAAG,GAAG,MAAM,EAAE,YAAY,IAAI,MAAM,EAAE,SAAS,IAAI,KAAK,CAAC,SAAS,IAAI,OAAO,EAAE,CAAC;YAC/F,MAAM,SAAS,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;YAC5G,MAAM,SAAS,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,yBAAyB,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;YACjJ,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;gBAAE,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,aAAa,SAAS,KAAK,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,gBAAgB,GAAG,CAAC,CAAC;;gBAC/G,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,+BAA+B,SAAS,GAAG,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;CACF","sourcesContent":["/**\n * `wildo fwk publish all` — release the framework in ONE command: everything an application creator\n * installs, from a framework checkout, in the order that keeps every published artifact installable.\n *\n * wildo fwk publish all # release (bumping the patch first if this version is already out)\n * wildo fwk publish all --bump minor # bump minor first\n * wildo fwk publish all --distTag next # publish under `next`; leaves `latest`, the Docker `latest` alias, the site and the provider modules alone\n * wildo fwk publish all --dryRun # compile, bundle, npm + Docker + site dry runs — nothing published\n *\n * ## The order, and why each step sits where it does\n *\n * 0. A COMMIT (#3059). A real release refuses uncommitted edits to tracked files (`--allowDirty` is the loud escape\n * hatch): what is published must be what a commit holds, or no artifact can say what it was built from. The\n * shared checkout rarely qualifies, which is what `wildo fwk release` is for: it runs this command in a fresh\n * worktree of the branch as GitHub has it (#3064).\n * 1. VERSION. A fresh release needs a version npm has never seen: if the checkout's version is already\n * published it is bumped (`--bump`, default patch) — so repeated releases need no hand edit. A RESUME\n * (`--skipDocker`) never bumps: it finishes the checkout's version, whichever step stopped it, and is\n * also how a version first tried under `next` is made `latest`.\n * \"Could not ask npm\" refuses the release: read as \"not published\" it would skip the bump and push\n * a Docker tag over an image that was already released.\n * 1b. TAG FIRST (#3059). The bump is committed (\"Framework <version>: the version the release lane set …\"), tagged\n * `v<version>` (annotated) and pushed with the tag, atomically, BEFORE anything is built or published. Every\n * artifact then names a commit on GitHub that declares its version: npm's `gitHead` and the image's revision\n * label, never `-dirty`. A push GitHub refuses (the branch moved) stops the release with nothing published.\n * A resume (`--skipDocker`) requires the tag, and publishes from it.\n * 2. `fwk generate-docs`. The compiled framework knowledge is not produced by any package build, and\n * the npm lane refuses knowledge compiled for another version (#1573).\n * 3. BUNDLE the workbench (`vite build`, its `bundle` script). It is one of the two published packages no\n * dev watcher builds, and it is deliberately not a `build` script: turbo's `build` runs on every cold CI\n * VM, where a ~55 s bundle nothing there uses would be pure cost. Built with every `VITE_*` variable\n * removed from the environment, because Vite inlines them into what every app creator downloads.\n * Then BUILD the provider simulators (#3047), the other one: they keep their own lockfile outside the\n * root workspace, so neither a watcher nor `pnpm --filter` reaches them, and the step installs from that\n * lockfile before running their `build` in their own directory.\n * 4. `fwk publish npm --dryRun`. Every npm gate (stale build, stale knowledge, licensing, closure) runs\n * HERE, before anything leaves the machine: npm and Docker publication cannot be taken back.\n * 5. `fwk publish docker`. BEFORE npm, because the published CLI names `wildo-platform:<its version>`:\n * a CLI that reached npm first would send every application creator's `local up` after an image\n * that does not exist yet. The image is built from this checkout's build output, not from npm.\n * It pushes the version tag only; the `latest` alias moves in step 8.\n * 6. `fwk publish npm`. Internally in dependency order, the CLI last. A `latest` release is published\n * under the `release-staging` dist-tag, so nothing a bare `npm install` or `wildo update` resolves\n * moves while the packages go up one at a time.\n * 7. `fwk publish promote`. Waits until npm SERVES every package at the new version (npm takes minutes\n * to make a publish readable everywhere), then, for a `latest` release, points `latest` at it. The\n * staging tag stays (npm refuses its removal with this token; the next release moves it). A package npm\n * holds as a STAGED publish awaiting 2FA approval is named with its stage id while the wait goes on, so an\n * approval given then lets the release finish (#3048). Before this, `latest` was moved package by package as each was published,\n * so `wildo-cli@latest` could name dependency versions npm could not serve yet. A side-channel\n * release (`--distTag next`) only waits.\n * 7b. CLEAN INSTALLS (#3060), between \"npm serves it\" and \"it is the default\": the checkout's own `install.sh\n * --cli-version=<version>` runs in fresh `node:<supported major>` containers, one with only what the installer\n * documents and one with a JDK, and `wildo --version` must answer the version. 1.1.11 became `latest` while a\n * machine without a JDK could not install it (#3055); a failure here stops before `latest` moves.\n * `--skipInstallCheck` is the escape hatch, and says so.\n * 8. The Docker `latest` alias and the installers site (`get.wildo.ai`), `latest` releases only, once\n * npm `latest` has moved. Without the site's deploy config (`marketing/tooling/.env`) the site is\n * skipped with a WARNING and the release still succeeds: npm and Docker hold the release, and the\n * installers install whatever npm's `latest` is.\n * 9. `fwk publish providers --registry public` (#2024), `latest` releases only: the provider modules of\n * `providers-registry/` to the public module registry, under the `wildo` domain. The registry is named,\n * because left to its resolver a framework developer's shell (`WILDO_FRAMEWORK_DEVELOPER=1`) answers with the\n * LOCAL registry, and a release has one destination. AFTER npm: an installed module's `@wildo-ai/*` imports\n * resolve from npm, so the engine the modules were checked against is published before they are. Not on a\n * side channel: a stable module version moves the registry's `latest`, so the module would reach applications\n * on npm `latest` having been checked only against a `next` engine.\n * Unlike a failed site deploy, a failure here only WARNS and the release still succeeds: the registry holds versions npm does not\n * depend on, each module is published once per version, and the step is re-run alone with\n * `wildo fwk publish providers --registry public`. The dry run runs it as a dry run.\n *\n * 10. THE RECEIPT (#3061): a GitHub Release `v<version>` holding `release.json` (the commit, every npm package's\n * integrity, every image's digest, the installers' sha256), the installers themselves and `SHA256SUMS`. A\n * missing or failing `gh` only warns and prints the command: npm and Docker already hold the release.\n *\n * Each step runs as a child `wildo` invocation of the command that owns it, so every gate and log line\n * is exactly the one that command already has; this file only sequences them and stops at the first\n * failure. Every failure after the image is pushed prints the resume (`--skipDocker`, never bumps); it\n * re-publishes nothing npm has (the lane skips published packages) and promotion is idempotent.\n *\n * Not included on purpose: a full `pnpm build`. The dev watchers own every package's `dist/`, and the\n * npm lane's freshness gate names any package they left stale — run `pnpm build` then and retry.\n */\nimport { spawnSync } from 'child_process';\nimport { createHash } from 'crypto';\nimport { existsSync, mkdtempSync, readFileSync, realpathSync, writeFileSync } from 'fs';\nimport { tmpdir } from 'os';\nimport { basename, dirname, join } from 'path';\nimport { confirm } from '@inquirer/prompts';\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { forwardedGlobalFlags } from '~wildo-cli/kernel/command-runner';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { FrameworkReleaseService } from '~wildo-cli/services/framework/framework-release.service';\nimport {\n FrameworkVersionService,\n parseSemverBumpKind,\n SEMVER_BUMP_KINDS,\n SemverBumpKind,\n} from '~wildo-cli/services/framework/framework-version.service';\nimport {\n npmRegistryClient,\n PackageManagerCommand,\n RegistryVersionStatus,\n spawnPackageManager,\n WILDO_CLI_PACKAGE_NAME,\n WORKBENCH_PACKAGE_NAME,\n} from '~wildo-cli/services/framework/framework-update.service';\nimport {\n FRAMEWORK_IMAGE_CREATED_LABEL,\n FRAMEWORK_IMAGE_REVISION_LABEL,\n FrameworkDockerPublishService,\n} from '~wildo-cli/services/framework/framework-docker-publish.service';\nimport { FrameworkNpmDistTag } from '~wildo-cli/services/framework/framework-npm-dist-tag.service';\nimport { PROVIDER_SIMULATORS_RELATIVE_PATH } from '~wildo-cli/services/application/system-of-record-simulators.service';\nimport { SUPPORTED_NODE_MAJOR_VERSION } from '~wildo-cli/services/deployment/host-toolchain-readiness.service';\nimport { describeCliOutsideFrameworkCheckout } from '~wildo-cli/services/framework/framework-publish-cli-origin';\nimport { ASSURANCE_CYCLE_PACKAGE } from '~wildo-cli/services/assurance/assurance-cycle-location.service';\n\n/** The dist-tag an unqualified `npm install` resolves — the only tag that moves Docker `latest` and the site. */\nconst DEFAULT_NPM_DIST_TAG = FrameworkNpmDistTag.LATEST;\n\n/** The workbench script that produces its published `dist/` (see step 3 for why it is not `build`). */\nconst WORKBENCH_BUNDLE_SCRIPT = 'bundle';\n\n/** The installers a release ships (`get.wildo.ai` serves them), relative to the framework root. */\nconst INSTALLER_SCRIPTS_RELATIVE = [join('platform', 'factory', 'scripts', 'install.sh'), join('platform', 'factory', 'scripts', 'install.ps1')];\n\n/** The git tag of a release: annotated, pushed with the bump commit before anything is published (#3059). */\nexport function releaseTagName(version: string): string {\n return `v${version}`;\n}\n\n/**\n * The machines a release must install on before it becomes `latest` (#3060): fresh `node:<supported major>`\n * containers with `apt` packages on top. `minimal` is what the installer documents (curl to fetch it, nothing else);\n * the JDK profile is a machine where SAML's XSD validator compiles (#3055).\n */\nexport const CLEAN_INSTALL_PROFILES: ReadonlyArray<{ name: string; aptPackages: string[] }> = [\n { name: 'minimal', aptPackages: ['curl', 'ca-certificates'] },\n { name: 'with a JDK', aptPackages: ['curl', 'ca-certificates', 'default-jdk-headless'] },\n];\n\n/** The installers site's own CLI, relative to the framework root, and the config it deploys with. */\nconst MARKETING_TOOLING_RELATIVE = join('marketing', 'tooling');\n\n/**\n * Exit codes of `wildo-marketing installers --check-live` (`CHECK_LIVE_EXIT` in\n * `marketing/tooling/src/commands/installers.ts`, a standalone project this package cannot import —\n * a test holds the two equal). Anything that is neither CURRENT nor DIFFERENT means \"could not ask\".\n */\nexport enum LiveInstallersCheckExit {\n /** get.wildo.ai serves this checkout's installers byte for byte: redeploying would change nothing users run. */\n CURRENT = 0,\n /** A script differs or is missing on the site: users only get it through a redeploy. */\n DIFFERENT = 10,\n /** The site could not be asked; nothing is known about what it serves. */\n UNREACHABLE = 11,\n}\n\n/**\n * The directory a child `wildo` step must be LAUNCHED from: the CLI's own package directory, found from the\n * entry that started this process (the directory holding the `@wildo-ai/wildo-cli` manifest above it).\n *\n * Run from source (`wildo-dev`), the CLI is started by `tsx`, which reads the `tsconfig.json` of the directory\n * it is LAUNCHED in — the CLI package's, where the `~wildo-cli/*` alias is declared — and only then does\n * `bin/wildo.ts` move into `WILDO_INVOKE_CWD`. A step launched with `cwd: frameworkRoot` got the repository\n * root's tsconfig instead, which declares no such alias, so every step died before running:\n * `Cannot find package '~wildo-cli'`. The compiled CLI resolves nothing from its working directory, which is\n * why only `wildo-dev fwk publish all` failed. Launching every step from here and naming the framework root\n * through `WILDO_INVOKE_CWD` is the same contract `wildo-dev` itself follows, and it holds in both modes.\n *\n * Falls back to this process's working directory when no such manifest is found above the entry.\n */\nexport function resolveCliLaunchDirectory(entryPath: string): string {\n let directory = dirname(realpathSync(entryPath));\n for (;;) {\n const manifestPath = join(directory, 'package.json');\n if (existsSync(manifestPath)) {\n try {\n if ((JSON.parse(readFileSync(manifestPath, 'utf8')) as { name?: string }).name === WILDO_CLI_PACKAGE_NAME) return directory;\n } catch {\n // An unreadable manifest is not the CLI's; keep walking up.\n }\n }\n const parent = dirname(directory);\n if (parent === directory) return process.cwd();\n directory = parent;\n }\n}\n\nexport default class FwkPublishAllCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'fwk publish all',\n description: 'Release the framework in one command: version, knowledge, workbench bundle, provider simulators build, Docker image, npm packages, installers site, provider modules',\n category: CommandCategory.Fwk,\n flags: {\n dryRun: { type: 'boolean', description: 'Plan only: compile knowledge, bundle the workbench, build the provider simulators, run the npm, Docker and site dry runs; publish nothing', default: false },\n bump: { type: 'string', description: `Bump kind when the current version is already published: ${SEMVER_BUMP_KINDS.join(', ')} (default ${SemverBumpKind.PATCH})`, default: undefined },\n distTag: { type: 'string', description: `npm dist-tag to publish under (default ${DEFAULT_NPM_DIST_TAG}); any other tag leaves Docker latest and the site alone`, default: undefined },\n skipSite: { type: 'boolean', description: 'Do not redeploy the installers site (get.wildo.ai), even when its installers are out of date', default: false },\n site: {\n type: 'boolean',\n description: 'Redeploy the installers site even when it already serves this checkout\\'s installers (it is otherwise left alone)',\n default: false,\n },\n skipDocker: {\n type: 'boolean',\n description: 'Resume a release whose platform image for this version is already pushed: skip the Docker step (refused if the image is absent)',\n default: false,\n },\n force: { type: 'boolean', description: 'Skip the confirmation before publishing', default: false },\n allowDirty: {\n type: 'boolean',\n description: 'Release although tracked files hold uncommitted edits (they ship, and every artifact says -dirty). Prefer `wildo fwk release`',\n default: false,\n },\n releaseBranch: {\n type: 'string',\n description: 'The branch the version commit and its tag are pushed to (default: the current branch; required from a detached HEAD)',\n default: undefined,\n },\n skipInstallCheck: {\n type: 'boolean',\n description: 'Make the release latest without installing it in clean containers first (says so loudly)',\n default: false,\n },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n // A publish, or a dry-run verdict, is only about this checkout when this checkout's own CLI runs it (#2518 review).\n // The root this command publishes from, read where its services read it.\n const cliOutsideCheckout = describeCliOutsideFrameworkCheckout(FrameworkReleaseService.getFrameworkRoot());\n if (cliOutsideCheckout) {\n ctx.log.error(cliOutsideCheckout);\n return { success: false };\n }\n const dryRun = ctx.flags.dryRun === true;\n const distTag = typeof ctx.flags.distTag === 'string' && ctx.flags.distTag.length > 0 ? ctx.flags.distTag : DEFAULT_NPM_DIST_TAG;\n const moveLatest = distTag === DEFAULT_NPM_DIST_TAG;\n const requestedBump = ctx.flags.bump === undefined ? null : parseSemverBumpKind(ctx.flags.bump);\n if (ctx.flags.bump !== undefined && requestedBump === null) {\n ctx.log.error(`--bump ${String(ctx.flags.bump)} is not one of ${SEMVER_BUMP_KINDS.join(', ')}.`);\n return { success: false };\n }\n const frameworkRoot = FrameworkReleaseService.getFrameworkRoot();\n\n try {\n // ── 1. version ──\n const current = (await FrameworkVersionService.loadFrameworkVersionState(frameworkRoot)).config.frameworkVersion;\n const currentStatus = npmRegistryClient.versionStatus(WILDO_CLI_PACKAGE_NAME, current);\n if (currentStatus === RegistryVersionStatus.UNKNOWN) {\n ctx.log.error(`Could not ask npm whether ${current} is already released (is the registry reachable?). Nothing was changed.`);\n return { success: false };\n }\n // A RESUME (`--skipDocker`) finishes the checkout's version and never bumps: whatever step stopped the release —\n // npm publish, the wait, the promotion, the Docker alias, the site — the run that finishes it must target the\n // SAME version. Whether that version is \"done\" cannot be read off npm: wildo-cli's channel tag moves before the\n // release's last steps (the side channel publishes under it; promotion moves it mid-way), so a gate reading it\n // bumped after exactly the failures it was meant to resume. The operator says it instead, and every remedy this\n // command prints carries the flag. A FRESH run bumps whenever the version is already on npm, so it never\n // re-pushes an image tag a published CLI already names.\n const resume = ctx.flags.skipDocker === true;\n if (resume && requestedBump !== null) {\n ctx.log.error('--skipDocker resumes the checkout\\'s version; it cannot be combined with --bump. Nothing was changed.');\n return { success: false };\n }\n const bumpKind = resume ? null : requestedBump ?? (currentStatus === RegistryVersionStatus.PUBLISHED ? SemverBumpKind.PATCH : null);\n const version = bumpKind ? FrameworkVersionService.bumpSemver(current, bumpKind) : current;\n if (bumpKind && npmRegistryClient.versionStatus(WILDO_CLI_PACKAGE_NAME, version) !== RegistryVersionStatus.NOT_PUBLISHED) {\n ctx.log.error(`${version} is already released, or npm could not say. Pass a larger --bump. Nothing was changed.`);\n return { success: false };\n }\n // Promotion moves `latest` by tag, which the npm lane's own prerelease guard (no dist-tag ⇒ `latest`) no longer\n // sees once the publish carries the staging tag; so the refusal is made here, before anything is published.\n if (moveLatest && version.includes('-')) {\n ctx.log.error(`${version} is a prerelease: it cannot become \"${DEFAULT_NPM_DIST_TAG}\". Pass a channel, for example --distTag next.`);\n return { success: false };\n }\n const bumpNote = bumpKind\n ? ` (${bumpKind} bump from ${current}${currentStatus === RegistryVersionStatus.PUBLISHED ? ', which is already published' : ''})`\n : resume\n ? ` (resuming ${current}: --skipDocker never bumps)`\n : '';\n ctx.log.info(` Release ${version} under npm dist-tag \"${distTag}\"${bumpNote}.`);\n if (dryRun && bumpKind) {\n // A dry run changes nothing, so it validates the checkout AS IT IS; the real run bumps first.\n ctx.log.info(` Dry run: the version stays ${current}, so the steps below validate ${current}; the real run applies the bump first.`);\n }\n\n // ── 0. a commit: what is published is what a commit holds (#3059) ──\n const allowDirty = ctx.flags.allowDirty === true;\n const editsBefore = this.uncommittedTrackedFiles(frameworkRoot);\n if (!dryRun && editsBefore.length > 0) {\n const listed = editsBefore.slice(0, 12).map((file) => ` ${file}`).join('\\n');\n const more = editsBefore.length > 12 ? `\\n … and ${editsBefore.length - 12} more` : '';\n if (!allowDirty) {\n ctx.log.error(` ${editsBefore.length} tracked file(s) hold uncommitted edits, and a release must be what a commit holds:\\n${listed}${more}`);\n ctx.log.error(' Release from the branch as GitHub has it, in a fresh worktree: wildo fwk release');\n ctx.log.error(' (--allowDirty releases these edits anyway, and every artifact will say -dirty.) Nothing was changed.');\n return { success: false };\n }\n ctx.log.warn(` --allowDirty: ${editsBefore.length} uncommitted edit(s) will ship, and the image will say -dirty:\\n${listed}${more}`);\n }\n const releaseBranch = typeof ctx.flags.releaseBranch === 'string' && ctx.flags.releaseBranch.length > 0\n ? ctx.flags.releaseBranch\n : this.git(frameworkRoot, ['branch', '--show-current']).stdout.trim();\n const tag = releaseTagName(version);\n if (!releaseBranch) {\n ctx.log.error(' HEAD is detached: pass --releaseBranch <branch>, the branch the version commit and its tag go to. Nothing was changed.');\n return { success: false };\n }\n if (resume && !dryRun && this.git(frameworkRoot, ['rev-parse', '-q', '--verify', `refs/tags/${tag}`]).status !== 0) {\n ctx.log.error(` --skipDocker resumes a release that was tagged ${tag} when it started, and there is no such tag here. Nothing was changed.`);\n return { success: false };\n }\n if (dryRun) ctx.log.info(` The real run commits the version, tags ${tag} and pushes both to origin/${releaseBranch} before publishing anything.`);\n\n if (!dryRun && !(await this.confirmRelease(ctx, version))) return { success: false };\n if (bumpKind && !dryRun) {\n await FrameworkVersionService.applyFrameworkVersion(version, frameworkRoot);\n ctx.log.success(` Version set to ${version} across the framework manifests.`);\n }\n // ── 1b. tag first: commit, tag and push before anything is built or published ──\n if (!resume && !dryRun && !this.tagRelease(ctx, frameworkRoot, version, releaseBranch, editsBefore)) return { success: false };\n\n // Launched from the CLI's own package directory and told the framework root through WILDO_INVOKE_CWD —\n // see `resolveCliLaunchDirectory` for why the step cannot simply run with `cwd: frameworkRoot`.\n const cliLaunchDirectory = resolveCliLaunchDirectory(process.argv[1]);\n const wildo = (label: string, args: string[]): boolean =>\n this.step(ctx, label, process.execPath, [...process.execArgv, process.argv[1], ...forwardedGlobalFlags({ ...ctx.globalFlags, nonInteractive: true }), ...args], cliLaunchDirectory,\n { ...process.env, WILDO_INVOKE_CWD: frameworkRoot });\n\n // ── 2–4. inputs, then every npm gate before anything leaves the machine ──\n // A dry run builds its inputs too — both are local and reversible, and the gates it runs would\n // otherwise judge whatever knowledge and workbench bundle happened to be lying around.\n if (!wildo('compile framework knowledge', ['fwk', 'generate-docs'])) return { success: false };\n if (!this.bundleWorkbench(ctx, frameworkRoot)) return { success: false };\n if (!this.bundleAssuranceCycle(ctx, frameworkRoot)) return { success: false };\n if (!this.buildProviderSimulators(ctx, frameworkRoot)) return { success: false };\n // A `latest` release is PUBLISHED under the staging tag and promoted once npm serves every package (step 7).\n const publishTag = moveLatest ? FrameworkNpmDistTag.RELEASE_STAGING : distTag;\n if (!wildo('npm gates (dry run)', ['fwk', 'publish', 'npm', '--dryRun', '--distTag', publishTag])) return { success: false };\n if (dryRun) {\n if (!wildo('Docker plan (dry run)', ['fwk', 'publish', 'docker', '--dryRun', ...(moveLatest ? ['--tagLatest'] : [])])) return { success: false };\n // A site config the dry run cannot even plan with is one the real run would fail on.\n if (moveLatest && ctx.flags.skipSite !== true && this.deploySite(ctx, frameworkRoot, true, ctx.flags.site === true) === false) return { success: false };\n if (moveLatest && !wildo('provider modules (dry run)', ['fwk', 'publish', 'providers', '--dryRun', '--registry', 'public'])) {\n ctx.log.warn(' The provider modules would not all publish (see above); the release does not depend on them.');\n }\n ctx.log.success(` Planned release ${version}. Nothing was published.`);\n return { success: true };\n }\n\n // ── 5. Docker BEFORE npm: the published CLI names wildo-platform:<version> ──\n if (resume) {\n // Resuming: the image must really be there, or the published CLI would name one that is not.\n const missing = await this.missingPlatformImages(frameworkRoot, version);\n if (missing.length > 0) {\n ctx.log.error(`--skipDocker, but ${missing.join(', ')} is not on the registry: the published CLI would name it. Run without --skipDocker.`);\n return { success: false };\n }\n ctx.log.info(`\\n ── Docker image ── already pushed for ${version}; skipped (--skipDocker).`);\n this.reportImageProvenance(ctx, frameworkRoot, await this.platformImages(frameworkRoot, version));\n } else if (!wildo('Docker image', ['fwk', 'publish', 'docker', '--force'])) {\n // The version tag only: the `latest` alias moves in step 8, once npm `latest` has.\n return { success: false };\n }\n // ── 6. npm ──\n if (!wildo('npm packages', ['fwk', 'publish', 'npm', '--force', '--distTag', publishTag])) {\n // The image is pushed and immutable for this version; a retry must not rebuild it for ten minutes.\n ctx.log.info(` The platform image for ${version} is already pushed. Once the cause is fixed, resume with:`);\n ctx.log.info(` wildo fwk publish all --skipDocker${moveLatest ? '' : ` --distTag ${distTag}`}`);\n return { success: false };\n }\n // ── 7. wait until npm serves every package, install it clean, then make a `latest` release the default ──\n const resumeHint = ` wildo fwk publish all --skipDocker${moveLatest ? '' : ` --distTag ${distTag}`}`;\n if (!wildo(`npm: wait until ${version} is readable`, ['fwk', 'publish', 'promote', '--version', version, '--waitOnly'])) {\n // Everything is published; a resume re-publishes nothing (the npm lane skips what is there) and promotes.\n ctx.log.info(` ${version} is published${moveLatest ? ` under \"${FrameworkNpmDistTag.RELEASE_STAGING}\"` : ''}. Once npm serves it, finish with:`);\n ctx.log.info(resumeHint);\n return { success: false };\n }\n if (!this.verifyCleanInstalls(ctx, frameworkRoot, version, ctx.flags.skipInstallCheck === true)) {\n ctx.log.info(` ${version} is published${moveLatest ? ` under \"${FrameworkNpmDistTag.RELEASE_STAGING}\" and is NOT the default` : ''}. Once a fix is released, or to retry:`);\n ctx.log.info(resumeHint);\n return { success: false };\n }\n if (moveLatest && !wildo(`npm: make ${version} the default`, ['fwk', 'publish', 'promote', '--version', version, '--force'])) {\n ctx.log.info(` ${version} is published under \"${FrameworkNpmDistTag.RELEASE_STAGING}\" and installs clean. Finish with:`);\n ctx.log.info(resumeHint);\n return { success: false };\n }\n // ── 8. Docker `latest` alias and installers site, after npm `latest` ──\n if (moveLatest && !(await this.repointLatest(ctx, frameworkRoot, version))) {\n ctx.log.info(` npm \"${DEFAULT_NPM_DIST_TAG}\" is at ${version}; the Docker alias and the site are not. Once the cause is fixed, finish with:`);\n ctx.log.info(' wildo fwk publish all --skipDocker');\n return { success: false };\n }\n const siteDeployed = moveLatest && ctx.flags.skipSite !== true ? this.deploySite(ctx, frameworkRoot, false, ctx.flags.site === true) : null;\n if (siteDeployed === false) {\n ctx.log.info(` ${version} is released on npm and Docker; the installers site is not. Once the cause is fixed, finish with:`);\n ctx.log.info(' wildo fwk publish all --skipDocker');\n return { success: false };\n }\n // ── 9. provider modules, after npm `latest` (an installed module's engine imports resolve from npm) ──\n if (!moveLatest) {\n ctx.log.info(' Provider modules are published only with a release npm installs by default; this side channel leaves them alone.');\n } else if (!wildo('provider modules', ['fwk', 'publish', 'providers', '--registry', 'public'])) {\n ctx.log.warn(' Not every provider module was published (see above). npm and Docker hold the release; once the cause is fixed:');\n ctx.log.warn(' wildo fwk publish providers --registry public');\n }\n\n await this.readBack(ctx, frameworkRoot, version);\n await this.publishReceipt(ctx, frameworkRoot, version, distTag, moveLatest);\n ctx.log.success(` Released ${version}.`);\n ctx.log.info(` Application creators move to it with: wildo update${moveLatest ? '' : ` --tag ${distTag}`}`);\n return { success: true };\n } catch (error) {\n ctx.log.error(`Release failed: ${ErrorUtils.extractErrorMessage(error)}`);\n return { success: false };\n }\n }\n\n private git(cwd: string, args: string[]): { status: number | null; stdout: string; stderr: string } {\n const result = spawnSync('git', args, { cwd, encoding: 'utf8' });\n return { status: result.status, stdout: result.stdout ?? '', stderr: result.stderr ?? '' };\n }\n\n /** Tracked files whose working-tree or staged content differs from HEAD (untracked files never ship from git). */\n private uncommittedTrackedFiles(frameworkRoot: string): string[] {\n return this.git(frameworkRoot, ['status', '--porcelain', '--untracked-files=no'])\n .stdout.split('\\n').filter((line) => line.trim().length > 0).map((line) => line.slice(3));\n }\n\n /**\n * Commit the version, tag it and push both, before anything is built or published (#3059).\n *\n * The commit holds the files the bump changed: everything uncommitted now that was not before the bump. From a\n * clean tree that is the whole bump; with `--allowDirty`, a file that already held an edit is left out (its edit is\n * not the release's to commit) and said. A version set by hand, and not bumped here, tags HEAD as it is.\n * An existing tag is reused only when it already names HEAD: a rerun after a refused push, never another commit.\n * The push is `--atomic`, so GitHub holds both the commit and the tag, or neither.\n */\n private tagRelease(ctx: CommandContext, frameworkRoot: string, version: string, branch: string, editsBefore: string[]): boolean {\n ctx.log.info(`\\n ── commit, tag and push ${releaseTagName(version)} ──`);\n const tag = releaseTagName(version);\n const before = new Set(editsBefore);\n const bumped = this.uncommittedTrackedFiles(frameworkRoot).filter((file) => !before.has(file));\n if (bumped.length > 0) {\n const add = this.git(frameworkRoot, ['add', '--', ...bumped]);\n const commit = add.status === 0\n ? this.git(frameworkRoot, ['commit', '-m', `Framework ${version}: the version the release lane set across the framework manifests`,\n '-m', `Committed and tagged ${tag} before anything was built or published (#3059).`, '--', ...bumped])\n : add;\n if (commit.status !== 0) {\n ctx.log.error(` Could not commit the version: ${commit.stderr.trim()}. Nothing was published.`);\n return false;\n }\n if (editsBefore.length > 0) ctx.log.warn(` Committed the ${bumped.length} file(s) the bump changed; ${editsBefore.length} earlier edit(s) stay uncommitted.`);\n }\n const head = this.git(frameworkRoot, ['rev-parse', 'HEAD']).stdout.trim();\n const existing = this.git(frameworkRoot, ['rev-parse', '-q', '--verify', `refs/tags/${tag}^{commit}`]);\n if (existing.status === 0 && existing.stdout.trim() !== head) {\n ctx.log.error(` ${tag} already exists and names ${existing.stdout.trim().slice(0, 9)}, not HEAD. Nothing was published.`);\n return false;\n }\n if (existing.status !== 0) {\n const tagged = this.git(frameworkRoot, ['tag', '-a', tag, '-m', `Wildo.ai framework ${version}`]);\n if (tagged.status !== 0) {\n ctx.log.error(` Could not tag ${tag}: ${tagged.stderr.trim()}. Nothing was published.`);\n return false;\n }\n }\n const pushed = this.git(frameworkRoot, ['push', '--atomic', 'origin', `HEAD:refs/heads/${branch}`, `refs/tags/${tag}`]);\n if (pushed.status !== 0) {\n ctx.log.error(` GitHub refused the version commit and ${tag} on ${branch}: ${pushed.stderr.trim()}`);\n ctx.log.error(` Nothing was published. If ${branch} moved on GitHub: git pull --rebase, git tag -f ${tag}, then rerun.`);\n return false;\n }\n ctx.log.success(` ${tag} names ${head.slice(0, 9)}, on GitHub (${branch}); every artifact of this release is built from it.`);\n return true;\n }\n\n /**\n * Install the release on fresh machines before it becomes `latest` (#3060). Each profile is a `node:<supported major>`\n * container given only its `apt` packages, running the checkout's own `install.sh --yes --cli-version=<version>`\n * (the script `get.wildo.ai` serves once this release deploys it), then `wildo --version`, which must answer the\n * version. The installer's log is printed on a failure; nothing is kept.\n */\n private verifyCleanInstalls(ctx: CommandContext, frameworkRoot: string, version: string, skip: boolean): boolean {\n if (skip) {\n ctx.log.warn(`\\n ── clean installs ── SKIPPED (--skipInstallCheck): nothing proved that a clean machine installs ${version}.`);\n return true;\n }\n const script = join(frameworkRoot, INSTALLER_SCRIPTS_RELATIVE[0]!);\n const image = `node:${SUPPORTED_NODE_MAJOR_VERSION}-bookworm-slim`;\n for (const profile of CLEAN_INSTALL_PROFILES) {\n ctx.log.info(`\\n ── clean install: ${profile.name} (${image} + ${profile.aptPackages.join(', ')}) ──`);\n const run = [\n 'export DEBIAN_FRONTEND=noninteractive',\n `(apt-get update -qq && apt-get install -y -qq --no-install-recommends ${profile.aptPackages.join(' ')}) >/dev/null 2>&1`,\n `{ sh /tmp/install.sh --yes --cli-version=${version} >/tmp/install.log 2>&1 || { tail -40 /tmp/install.log; exit 1; }; }`,\n '\"$HOME/.local/bin/wildo\" --version',\n ].join(' && ');\n const result = spawnSync('docker', ['run', '--rm', '-v', `${script}:/tmp/install.sh:ro`, image, 'sh', '-c', run], {\n cwd: frameworkRoot,\n encoding: 'utf8',\n timeout: 20 * 60_000,\n });\n const answered = (result.stdout ?? '').trim().split('\\n').at(-1)?.trim() ?? '';\n if (result.status !== 0 || answered !== version) {\n ctx.log.error(` ${version} does not install on a clean machine (${profile.name}): ${result.status === 0 ? `wildo --version answered \"${answered}\"` : `exit ${result.status ?? 'signal'}`}.`);\n const output = `${result.stdout ?? ''}${result.stderr ?? ''}`.trim();\n if (output) ctx.log.error(output.split('\\n').slice(-25).map((line) => ` ${line}`).join('\\n'));\n return false;\n }\n ctx.log.success(` Installed ${version} (${profile.name}).`);\n }\n return true;\n }\n\n /**\n * The public receipt (#3061): a GitHub Release on the tag, holding what the registries now serve. `release.json`\n * names the commit, every npm package's integrity and every image's digest, read back from npm and Docker Hub;\n * the installers ship as assets; `SHA256SUMS` covers every asset. Never fails the release: npm and Docker hold it,\n * and a missing `gh` only costs the receipt, so the command to make it is printed instead.\n */\n private async publishReceipt(ctx: CommandContext, frameworkRoot: string, version: string, distTag: string, moveLatest: boolean): Promise<void> {\n ctx.log.info('\\n ── receipt: GitHub Release ──');\n const tag = releaseTagName(version);\n try {\n const config = await FrameworkReleaseService.loadFrameworkConfig(frameworkRoot);\n const directory = mkdtempSync(join(tmpdir(), `wildo-release-${version}-`));\n const sha256 = (content: Buffer | string): string => createHash('sha256').update(content).digest('hex');\n const installers = INSTALLER_SCRIPTS_RELATIVE.filter((file) => existsSync(join(frameworkRoot, file))).map((file) => {\n const content = readFileSync(join(frameworkRoot, file));\n writeFileSync(join(directory, basename(file)), content);\n return { file: basename(file), sha256: sha256(content) };\n });\n const npm = (config?.publish.npm.packages ?? []).map((name) => {\n const dist = npmRegistryClient.view(`${name}@${version}`, 'dist') as { integrity?: string; shasum?: string } | null;\n return { name, version, integrity: dist?.integrity ?? null, shasum: dist?.shasum ?? null };\n });\n const docker = (await this.platformImages(frameworkRoot, version)).map(({ reference }) => {\n const inspected = spawnSync('docker', ['buildx', 'imagetools', 'inspect', reference, '--format', '{{json .Manifest}}'], { encoding: 'utf8' });\n let digest: string | null = null;\n try {\n digest = (JSON.parse(inspected.stdout ?? '') as { digest?: string }).digest ?? null;\n } catch {\n digest = null;\n }\n return { reference, digest };\n });\n const commit = this.git(frameworkRoot, ['rev-parse', `refs/tags/${tag}^{commit}`]).stdout.trim() || this.git(frameworkRoot, ['rev-parse', 'HEAD']).stdout.trim();\n const receipt = {\n name: 'Wildo.ai framework',\n version,\n tag,\n commit,\n repository: config?.publish.npm.repositoryUrl ?? null,\n npmDistTag: moveLatest ? FrameworkNpmDistTag.LATEST : distTag,\n releasedAt: new Date().toISOString(),\n npm,\n docker,\n installers,\n };\n writeFileSync(join(directory, 'release.json'), `${JSON.stringify(receipt, null, 2)}\\n`);\n const assets = ['release.json', ...installers.map((i) => i.file)];\n writeFileSync(join(directory, 'SHA256SUMS'), assets.map((file) => `${sha256(readFileSync(join(directory, file)))} ${file}`).join('\\n') + '\\n');\n const missingIntegrity = npm.filter((p) => !p.integrity).map((p) => p.name);\n const notes = [\n `Wildo.ai framework ${version}, built from ${commit.slice(0, 9)} (tag ${tag}).`,\n '',\n `- npm: ${npm.length} \\`@wildo-ai/*\\` packages at ${version}${moveLatest ? ' (`latest`)' : ` (\\`${distTag}\\`)`}`,\n ...docker.map((d) => `- Docker: \\`${d.reference}\\`${d.digest ? ` (\\`${d.digest}\\`)` : ''}`),\n `- Installed clean before it became the default: ${CLEAN_INSTALL_PROFILES.map((p) => p.name).join(', ')}`,\n '',\n `Install: \\`curl -fsSL https://get.wildo.ai/install.sh | sh -s -- --cli-version=${version}\\``,\n '',\n '`release.json` holds every package\\'s integrity and every image\\'s digest; `SHA256SUMS` covers the assets.',\n ].join('\\n');\n writeFileSync(join(directory, 'NOTES.md'), `${notes}\\n`);\n if (missingIntegrity.length > 0) ctx.log.warn(` npm gave no integrity for ${missingIntegrity.join(', ')}; release.json records null for them.`);\n const args = ['release', 'create', tag, '--verify-tag', '--title', `Wildo.ai framework ${version}`, '--notes-file', join(directory, 'NOTES.md'),\n ...(moveLatest ? ['--latest'] : ['--prerelease', '--latest=false']),\n ...[...assets, 'SHA256SUMS'].map((file) => join(directory, file))];\n const created = spawnSync('gh', args, { cwd: frameworkRoot, encoding: 'utf8' });\n if (created.status === 0) {\n ctx.log.success(` GitHub Release ${tag}: ${(created.stdout ?? '').trim() || 'created'}`);\n } else {\n ctx.log.warn(` No GitHub Release (${(created.stderr ?? '').trim().split('\\n')[0] || `gh exit ${created.status ?? 'signal'}`}). The release stands; make the receipt with:`);\n ctx.log.warn(` gh ${args.map((a) => (/\\s/.test(a) ? `\"${a}\"` : a)).join(' ')}`);\n }\n } catch (error) {\n ctx.log.warn(` No GitHub Release: ${ErrorUtils.extractErrorMessage(error)}. The release stands on npm and Docker Hub.`);\n }\n }\n\n private async confirmRelease(ctx: CommandContext, version: string): Promise<boolean> {\n if (ctx.flags.force === true) return true;\n if (ctx.globalFlags.nonInteractive) {\n ctx.log.error('A real release in non-interactive mode requires --force.');\n return false;\n }\n const proceed = await confirm({ message: `Publish ${version} to npm and Docker Hub? Neither can be taken back.`, default: false });\n if (!proceed) ctx.log.info('Cancelled.');\n return proceed;\n }\n\n private step(ctx: CommandContext, label: string, command: string, args: string[], cwd: string, env: NodeJS.ProcessEnv = process.env): boolean {\n ctx.log.info(`\\n ── ${label} ──`);\n const result = spawnSync(command, args, { cwd, env, stdio: 'inherit' });\n if (result.status !== 0) {\n ctx.log.error(` ${label} failed (exit ${result.status ?? 'signal'}); the release stopped here.`);\n return false;\n }\n return true;\n }\n\n /**\n * Bundle the workbench with no `VITE_*` variable in the environment. Vite inlines every `VITE_*` it\n * sees into the bundle — the workbench reads `VITE_COMPANION_URL` and spreads `import.meta.env` over\n * its runtime environment — so a variable set in the publisher's shell would ship in every app\n * creator's workbench. The published bundle must fall back to its own origin, where\n * `wildo-workbench-serve` answers.\n */\n private bundleWorkbench(ctx: CommandContext, frameworkRoot: string): boolean {\n ctx.log.info('\\n ── bundle the workbench ──');\n const env = Object.fromEntries(Object.entries(process.env).filter(([name]) => !name.startsWith('VITE_')));\n const result = spawnPackageManager(PackageManagerCommand.PNPM, ['--filter', WORKBENCH_PACKAGE_NAME, 'run', WORKBENCH_BUNDLE_SCRIPT], {\n cwd: frameworkRoot,\n stdio: 'inherit',\n env,\n });\n if (result.status !== 0) {\n ctx.log.error(` Workbench bundle failed (exit ${result.status ?? 'signal'}); the release stopped here.`);\n return false;\n }\n return true;\n }\n\n /**\n * Stage `@wildo-ai/assurance-cycle`'s published `dist/` (#2302): the checkout's `scripts/assurance/` and the helpers\n * they import, plus the engine evidence manifest measured for THIS release — the engine facts an application outside\n * the checkout reads, including the outcome of every engine-owned test, which is why this step takes minutes. The npm\n * lane refuses the package when its manifest names another release (`findMismatchedEngineEvidenceManifest`).\n */\n private bundleAssuranceCycle(ctx: CommandContext, frameworkRoot: string): boolean {\n ctx.log.info('\\n ── stage the assurance cycle and measure its engine evidence ──');\n const result = spawnPackageManager(PackageManagerCommand.PNPM, ['--filter', ASSURANCE_CYCLE_PACKAGE, 'run', 'bundle'], { cwd: frameworkRoot, stdio: 'inherit' });\n if (result.status !== 0) {\n ctx.log.error(` Assurance cycle staging failed (exit ${result.status ?? 'signal'}); the release stopped here.`);\n return false;\n }\n return true;\n }\n\n /**\n * Build the provider simulators' published `dist/` (#3047). They are a published OPT-IN package that keeps its own\n * lockfile outside the root workspace (the isolation `pnpm-workspace.yaml` records), so no dev watcher compiles them\n * and `pnpm --filter` from the root cannot name them. The step therefore runs in their own directory: a frozen install\n * from their own lockfile (which is what puts their compiler there), then their `build`. Skipping it would not ship a\n * stale package silently: the npm lane refuses a `dist/` older than its `src/`. This makes the release produce it.\n */\n private buildProviderSimulators(ctx: CommandContext, frameworkRoot: string): boolean {\n ctx.log.info('\\n ── build the provider simulators ──');\n const cwd = join(frameworkRoot, PROVIDER_SIMULATORS_RELATIVE_PATH);\n for (const [label, args] of [\n ['install from their own lockfile', ['install', '--frozen-lockfile']],\n ['build', ['run', 'build']],\n ] as const) {\n const result = spawnPackageManager(PackageManagerCommand.PNPM, [...args], { cwd, stdio: 'inherit' });\n if (result.status !== 0) {\n ctx.log.error(` Provider simulators ${label} failed (exit ${result.status ?? 'signal'}); the release stopped here.`);\n return false;\n }\n }\n return true;\n }\n\n /**\n * Redeploy `get.wildo.ai` only when a release changes what it serves.\n *\n * The installers are not a separate host: the marketing website's image carries them under `/get/`,\n * so the only way to ship them is `wildo-marketing deploy`, which copies `website/`, `contact-api/`\n * and the staged installers from THIS checkout, rebuilds the images on the VM and restarts the whole\n * stack. Doing that on every release (several a day) restarted the marketing site for nothing — the\n * scripts install npm's `latest`, so a new CLI needs no new script — and shipped any uncommitted\n * website edit a parallel session had in the shared checkout.\n *\n * So the release first asks `installers --check-live` whether the live scripts differ from this\n * checkout's, byte for byte, and deploys only on DIFFERENT, or when the site could not be asked (a\n * deploy is how stale installers get fixed, so not knowing leans toward it). `--site` forces a deploy;\n * `--skipSite` (checked by the caller) never deploys. The landing page's version number does not need\n * a redeploy: it reads npm's `latest` at view time (`website/src/scripts/install-version.ts`).\n *\n * This makes shipping someone else's unfinished website edit rarer, not impossible: a deploy that\n * does happen still copies the working tree. The deploy lists every uncommitted change in the trees\n * it ships before it runs (`uncommittedDeployedChanges` in the tooling), even under `--yes`.\n *\n * The deploy itself: `--yes` because the release confirmation already covered it, `--dry-run` in a dry\n * run. Its credentials live in `marketing/tooling/.env`; without that file the site is skipped with a\n * warning, louder when the installers are known to be out of date.\n *\n * @returns `null` when skipped, otherwise whether the deploy succeeded.\n */\n private deploySite(ctx: CommandContext, frameworkRoot: string, dryRun: boolean, forced: boolean): boolean | null {\n const toolingRoot = join(frameworkRoot, MARKETING_TOOLING_RELATIVE);\n let knownOutOfDate = false;\n if (!forced) {\n ctx.log.info('\\n ── installers site: compare with get.wildo.ai ──');\n const check = spawnSync(process.execPath, ['src/cli.ts', 'installers', '--check-live'], { cwd: toolingRoot, stdio: 'inherit' });\n if (check.status === LiveInstallersCheckExit.CURRENT) {\n ctx.log.info(' Installers site left alone: it already serves these installers, and they install npm latest. --site redeploys it anyway.');\n return null;\n }\n knownOutOfDate = check.status === LiveInstallersCheckExit.DIFFERENT;\n if (!knownOutOfDate) {\n ctx.log.warn(' Could not compare the installers with the live site; redeploying so they are current.');\n }\n }\n if (!existsSync(join(toolingRoot, '.env'))) {\n const config = join(MARKETING_TOOLING_RELATIVE, '.env');\n if (knownOutOfDate) ctx.log.warn(` get.wildo.ai serves OUT-OF-DATE installers, and ${config} (the site's deploy config) is missing, so it was not redeployed.`);\n else ctx.log.warn(` Installers site skipped: ${config} (the site's deploy config) is missing.`);\n return null;\n }\n return this.step(ctx, `installers site (get.wildo.ai)${dryRun ? ' (dry run)' : ''}`, process.execPath, ['src/cli.ts', 'deploy', dryRun ? '--dry-run' : '--yes'], toolingRoot);\n }\n\n /** Every configured platform image at `version`: its name, and its full registry reference. */\n private async platformImages(frameworkRoot: string, version: string): Promise<Array<{ imageName: string; reference: string }>> {\n const docker = (await FrameworkReleaseService.loadFrameworkConfig(frameworkRoot))?.publish.docker;\n return (docker?.images ?? []).map((image) => ({\n imageName: image.imageName,\n reference: `${docker?.registryHost}/${docker?.namespace}/${image.imageName}:${version}`,\n }));\n }\n\n private async platformImageReferences(frameworkRoot: string, version: string): Promise<string[]> {\n return (await this.platformImages(frameworkRoot, version)).map((image) => image.reference);\n }\n\n /** The configured platform images NOT present on the registry at `version` (inspected, never pulled). */\n private async missingPlatformImages(frameworkRoot: string, version: string): Promise<string[]> {\n return (await this.platformImageReferences(frameworkRoot, version))\n .filter((reference) => spawnSync('docker', ['buildx', 'imagetools', 'inspect', reference], { encoding: 'utf8' }).status !== 0);\n }\n\n /**\n * Say what a resumed image was built from. `--skipDocker` proves the tag exists, not that it holds the\n * source now being published — a resume hours later ships a CLI naming an image built before other\n * sessions' platform changes. So the operator sees the image's build instant, its source revision\n * (`-dirty` when its inputs held uncommitted edits) and how many commits touched ITS INPUTS since — the\n * paths its own `.dockerignore` sends (`FrameworkDockerPublishService.imageSourcePathspecs`), not the\n * whole shared tree. Informative, not a refusal: a release whose image inputs did not move must be able\n * to resume without a rebuild.\n */\n private reportImageProvenance(ctx: CommandContext, frameworkRoot: string, images: Array<{ imageName: string; reference: string }>): void {\n for (const { imageName, reference } of images) {\n const inspected = spawnSync('docker', ['buildx', 'imagetools', 'inspect', reference, '--format', '{{json .Image}}'], { encoding: 'utf8' });\n let config: { created?: string; config?: { Labels?: Record<string, string> } } | undefined;\n try {\n const parsed = JSON.parse(inspected.stdout ?? '') as Record<string, unknown>;\n // A multi-platform image answers one config per platform; they share one build.\n config = ('config' in parsed ? parsed : Object.values(parsed)[0]) as typeof config;\n } catch {\n config = undefined;\n }\n const revision = config?.config?.Labels?.[FRAMEWORK_IMAGE_REVISION_LABEL];\n const built = config?.config?.Labels?.[FRAMEWORK_IMAGE_CREATED_LABEL] ?? config?.created ?? 'unknown';\n if (!revision) {\n ctx.log.warn(` ${reference}: built ${built}; it carries no source revision, so nothing can say whether it matches this checkout.`);\n continue;\n }\n const cleanRevision = revision.replace(/-dirty$/, '');\n const pathspecs = FrameworkDockerPublishService.imageSourcePathspecs(frameworkRoot, imageName) ?? ['.'];\n const since = spawnSync('git', ['rev-list', '--count', `${cleanRevision}..HEAD`, '--', ...pathspecs], { cwd: frameworkRoot, encoding: 'utf8' });\n const commits = since.status === 0 ? Number(since.stdout.trim()) : Number.NaN;\n const detail = `${reference}: built ${built} from ${revision}`;\n if (revision.endsWith('-dirty')) ctx.log.warn(` ${detail} — its inputs held uncommitted edits, so it may not match this checkout.`);\n else if (commits > 0) ctx.log.warn(` ${detail} — ${commits} commit(s) since touched its inputs; run without --skipDocker to rebuild it.`);\n else if (commits === 0) ctx.log.success(` ${detail} — no commit since has touched its inputs.`);\n else ctx.log.warn(` ${detail} — that revision is not in this checkout's history.`);\n }\n }\n\n /** Point every configured image's `latest` alias at `version` — an alias-only step, nothing is rebuilt. */\n private async repointLatest(ctx: CommandContext, frameworkRoot: string, version: string): Promise<boolean> {\n for (const reference of await this.platformImageReferences(frameworkRoot, version)) {\n const alias = reference.replace(/:[^:/]+$/, `:${DEFAULT_NPM_DIST_TAG}`);\n if (!this.step(ctx, `Docker ${alias} → ${version}`, 'docker', ['buildx', 'imagetools', 'create', '-t', alias, reference], frameworkRoot)) return false;\n }\n return true;\n }\n\n /**\n * Read the Docker release back from the registry, over the CONFIGURED images. Reported, not enforced: the push\n * already succeeded. npm needs no read-back here: step 7 does not return until npm serves every package at the\n * version, read past the local cache. (A one-shot check after the last publish used to sit here and warned\n * \"not visible yet\" on nearly every release, because npm takes minutes to make a publish readable everywhere.)\n */\n private async readBack(ctx: CommandContext, frameworkRoot: string, version: string): Promise<void> {\n const config = await FrameworkReleaseService.loadFrameworkConfig(frameworkRoot);\n ctx.log.info('\\n ── read back ──');\n const docker = config?.publish.docker;\n for (const image of docker?.images ?? []) {\n const reference = `${docker?.registryHost}/${docker?.namespace}/${image.imageName}:${version}`;\n const inspected = spawnSync('docker', ['buildx', 'imagetools', 'inspect', reference], { encoding: 'utf8' });\n const platforms = [...new Set((inspected.stdout ?? '').match(/Platform:\\s+linux\\/\\w+/g)?.map((line) => line.replace(/Platform:\\s+/, '')) ?? [])];\n if (inspected.status === 0) ctx.log.success(` Docker: ${reference} (${platforms.join(', ') || 'manifest found'})`);\n else ctx.log.warn(` Docker: could not inspect ${reference}.`);\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"publish-all.command.js","sourceRoot":"","sources":["../../../../src/commands/fwk/publish-all.command.ts"],"names":[],"mappings":"AAA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C,CAAC;YACjJ,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;gBAAE,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,aAAa,SAAS,KAAK,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,gBAAgB,GAAG,CAAC,CAAC;;gBAC/G,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,+BAA+B,SAAS,GAAG,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;CACF","sourcesContent":["/**\n * `wildo fwk publish all` — release the framework in ONE command: everything an application creator\n * installs, from a framework checkout, in the order that keeps every published artifact installable.\n *\n * wildo fwk publish all # release (bumping the patch first if this version is already out)\n * wildo fwk publish all --bump minor # bump minor first\n * wildo fwk publish all --distTag next # publish under `next`; leaves `latest`, the Docker `latest` alias, the site and the provider modules alone\n * wildo fwk publish all --dryRun # compile, bundle, npm + Docker + site dry runs — nothing published\n *\n * ## The order, and why each step sits where it does\n *\n * 0. A COMMIT (#3059). A real release refuses uncommitted edits to tracked files (`--allowDirty` is the loud escape\n * hatch): what is published must be what a commit holds, or no artifact can say what it was built from. The\n * shared checkout rarely qualifies, which is what `wildo fwk release` is for: it runs this command in a fresh\n * worktree of the branch as GitHub has it (#3064).\n * 1. VERSION. A fresh release needs a version npm has never seen: if the checkout's version is already\n * published it is bumped (`--bump`, default patch) — so repeated releases need no hand edit. A RESUME\n * (`--skipDocker`) never bumps: it finishes the checkout's version, whichever step stopped it, and is\n * also how a version first tried under `next` is made `latest`.\n * \"Could not ask npm\" refuses the release: read as \"not published\" it would skip the bump and push\n * a Docker tag over an image that was already released.\n * 1b. TAG FIRST (#3059). The bump is committed (\"Framework <version>: the version the release lane set …\"), tagged\n * `v<version>` (annotated) and pushed with the tag, atomically, BEFORE anything is built or published. Every\n * artifact then names a commit on GitHub that declares its version: npm's `gitHead` and the image's revision\n * label, never `-dirty`. A push GitHub refuses (the branch moved) stops the release with nothing published.\n * A resume (`--skipDocker`) requires the tag, and publishes from it.\n * 2. `fwk generate-docs`. The compiled framework knowledge is not produced by any package build, and\n * the npm lane refuses knowledge compiled for another version (#1573).\n * 3. BUNDLE the workbench (`vite build`, its `bundle` script). It is one of the two published packages no\n * dev watcher builds, and it is deliberately not a `build` script: turbo's `build` runs on every cold CI\n * VM, where a ~55 s bundle nothing there uses would be pure cost. Built with every `VITE_*` variable\n * removed from the environment, because Vite inlines them into what every app creator downloads.\n * Then BUILD the provider simulators (#3047), the other one: they keep their own lockfile outside the\n * root workspace, so neither a watcher nor `pnpm --filter` reaches them, and the step installs from that\n * lockfile before running their `build` in their own directory.\n * 4. `fwk publish npm --dryRun`. Every npm gate (stale build, stale knowledge, licensing, closure) runs\n * HERE, before anything leaves the machine: npm and Docker publication cannot be taken back.\n * 5. `fwk publish docker`. BEFORE npm, because the published CLI names `wildo-platform:<its version>`:\n * a CLI that reached npm first would send every application creator's `local up` after an image\n * that does not exist yet. The image is built from this checkout's build output, not from npm.\n * It pushes the version tag only; the `latest` alias moves in step 8.\n * 6. `fwk publish npm`. Internally in dependency order, the CLI last. A `latest` release is published\n * under the `release-staging` dist-tag, so nothing a bare `npm install` or `wildo update` resolves\n * moves while the packages go up one at a time.\n * 7. `fwk publish promote`. Waits until npm SERVES every package at the new version (npm takes minutes\n * to make a publish readable everywhere), then, for a `latest` release, points `latest` at it. The\n * staging tag stays (npm refuses its removal with this token; the next release moves it). A package npm\n * holds as a STAGED publish awaiting 2FA approval is named with its stage id while the wait goes on, so an\n * approval given then lets the release finish (#3048). Before this, `latest` was moved package by package as each was published,\n * so `wildo-cli@latest` could name dependency versions npm could not serve yet. A side-channel\n * release (`--distTag next`) only waits.\n * 7b. CLEAN INSTALLS (#3060), between \"npm serves it\" and \"it is the default\": the checkout's own `install.sh\n * --cli-version=<version>` runs in fresh `node:<supported major>` containers, one with only what the installer\n * documents and one with a JDK, and `wildo --version` must answer the version. 1.1.11 became `latest` while a\n * machine without a JDK could not install it (#3055); a failure here stops before `latest` moves.\n * `--skipInstallCheck` is the escape hatch, and says so.\n * 8. The Docker `latest` alias and the installers site (`get.wildo.ai`), `latest` releases only, once\n * npm `latest` has moved. Without the site's deploy config (`marketing/tooling/.env`) the site is\n * skipped with a WARNING and the release still succeeds: npm and Docker hold the release, and the\n * installers install whatever npm's `latest` is.\n * 9. `fwk publish providers --registry public` (#2024), `latest` releases only: the provider modules of\n * `providers-registry/` to the public module registry, under the `wildo` domain. The registry is named,\n * because left to its resolver a framework developer's shell (`WILDO_FRAMEWORK_DEVELOPER=1`) answers with the\n * LOCAL registry, and a release has one destination. AFTER npm: an installed module's `@wildo-ai/*` imports\n * resolve from npm, so the engine the modules were checked against is published before they are. Not on a\n * side channel: a stable module version moves the registry's `latest`, so the module would reach applications\n * on npm `latest` having been checked only against a `next` engine.\n * Unlike a failed site deploy, a failure here only WARNS and the release still succeeds: the registry holds versions npm does not\n * depend on, each module is published once per version, and the step is re-run alone with\n * `wildo fwk publish providers --registry public`. The dry run runs it as a dry run.\n *\n * 10. THE RECEIPT (#3061): a GitHub Release `v<version>` holding `release.json` (the commit, every npm package's\n * integrity, every image's digest, the installers' sha256), the installers themselves and `SHA256SUMS`. A\n * missing or failing `gh` only warns and prints the command: npm and Docker already hold the release.\n *\n * Each step runs as a child `wildo` invocation of the command that owns it, so every gate and log line\n * is exactly the one that command already has; this file only sequences them and stops at the first\n * failure. Every failure after the image is pushed prints the resume (`--skipDocker`, never bumps); it\n * re-publishes nothing npm has (the lane skips published packages) and promotion is idempotent.\n *\n * Not included on purpose: a full `pnpm build`. The dev watchers own every package's `dist/`, and the\n * npm lane's freshness gate names any package they left stale — run `pnpm build` then and retry.\n */\nimport { spawnSync } from 'child_process';\nimport { createHash } from 'crypto';\nimport { existsSync, mkdtempSync, readFileSync, realpathSync, writeFileSync } from 'fs';\nimport { tmpdir } from 'os';\nimport { basename, dirname, join } from 'path';\nimport { confirm } from '@inquirer/prompts';\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { forwardedGlobalFlags } from '~wildo-cli/kernel/command-runner';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { FrameworkReleaseService } from '~wildo-cli/services/framework/framework-release.service';\nimport {\n FrameworkVersionService,\n parseSemverBumpKind,\n SEMVER_BUMP_KINDS,\n SemverBumpKind,\n} from '~wildo-cli/services/framework/framework-version.service';\nimport {\n npmRegistryClient,\n PackageManagerCommand,\n RegistryVersionStatus,\n spawnPackageManager,\n WILDO_CLI_PACKAGE_NAME,\n WORKBENCH_PACKAGE_NAME,\n} from '~wildo-cli/services/framework/framework-update.service';\nimport {\n FRAMEWORK_IMAGE_CREATED_LABEL,\n FRAMEWORK_IMAGE_REVISION_LABEL,\n FrameworkDockerPublishService,\n} from '~wildo-cli/services/framework/framework-docker-publish.service';\nimport { FrameworkNpmDistTag } from '~wildo-cli/services/framework/framework-npm-dist-tag.service';\nimport { PROVIDER_SIMULATORS_RELATIVE_PATH } from '~wildo-cli/services/application/system-of-record-simulators.service';\nimport { SUPPORTED_NODE_MAJOR_VERSION } from '~wildo-cli/services/deployment/host-toolchain-readiness.service';\nimport { describeCliOutsideFrameworkCheckout } from '~wildo-cli/services/framework/framework-publish-cli-origin';\nimport { ASSURANCE_CYCLE_PACKAGE } from '~wildo-cli/services/assurance/assurance-cycle-location.service';\n\n/** The dist-tag an unqualified `npm install` resolves — the only tag that moves Docker `latest` and the site. */\nconst DEFAULT_NPM_DIST_TAG = FrameworkNpmDistTag.LATEST;\n\n/** The workbench script that produces its published `dist/` (see step 3 for why it is not `build`). */\nconst WORKBENCH_BUNDLE_SCRIPT = 'bundle';\n\n/** The installers a release ships (`get.wildo.ai` serves them), relative to the framework root. */\nconst INSTALLER_SCRIPTS_RELATIVE = [join('platform', 'factory', 'scripts', 'install.sh'), join('platform', 'factory', 'scripts', 'install.ps1')];\n\n/** The git tag of a release: annotated, pushed with the bump commit before anything is published (#3059). */\nexport function releaseTagName(version: string): string {\n return `v${version}`;\n}\n\n/**\n * The machines a release must install on before it becomes `latest` (#3060): fresh `node:<supported major>`\n * containers with `apt` packages on top. `minimal` is what the installer documents (curl to fetch it, nothing else);\n * the JDK profile is a machine where SAML's XSD validator compiles (#3055).\n */\nexport const CLEAN_INSTALL_PROFILES: ReadonlyArray<{ name: string; aptPackages: string[] }> = [\n { name: 'minimal', aptPackages: ['curl', 'ca-certificates'] },\n { name: 'with a JDK', aptPackages: ['curl', 'ca-certificates', 'default-jdk-headless'] },\n];\n\n/** The installers site's own CLI, relative to the framework root, and the config it deploys with. */\nconst MARKETING_TOOLING_RELATIVE = join('marketing', 'tooling');\n\n/**\n * Exit codes of `wildo-marketing installers --check-live` (`CHECK_LIVE_EXIT` in\n * `marketing/tooling/src/commands/installers.ts`, a standalone project this package cannot import —\n * a test holds the two equal). Anything that is neither CURRENT nor DIFFERENT means \"could not ask\".\n */\nexport enum LiveInstallersCheckExit {\n /** get.wildo.ai serves this checkout's installers byte for byte: redeploying would change nothing users run. */\n CURRENT = 0,\n /** A script differs or is missing on the site: users only get it through a redeploy. */\n DIFFERENT = 10,\n /** The site could not be asked; nothing is known about what it serves. */\n UNREACHABLE = 11,\n}\n\n/**\n * The directory a child `wildo` step must be LAUNCHED from: the CLI's own package directory, found from the\n * entry that started this process (the directory holding the `@wildo-ai/wildo-cli` manifest above it).\n *\n * Run from source (`wildo-dev`), the CLI is started by `tsx`, which reads the `tsconfig.json` of the directory\n * it is LAUNCHED in — the CLI package's, where the `~wildo-cli/*` alias is declared — and only then does\n * `bin/wildo.ts` move into `WILDO_INVOKE_CWD`. A step launched with `cwd: frameworkRoot` got the repository\n * root's tsconfig instead, which declares no such alias, so every step died before running:\n * `Cannot find package '~wildo-cli'`. The compiled CLI resolves nothing from its working directory, which is\n * why only `wildo-dev fwk publish all` failed. Launching every step from here and naming the framework root\n * through `WILDO_INVOKE_CWD` is the same contract `wildo-dev` itself follows, and it holds in both modes.\n *\n * Falls back to this process's working directory when no such manifest is found above the entry.\n */\nexport function resolveCliLaunchDirectory(entryPath: string): string {\n let directory = dirname(realpathSync(entryPath));\n for (;;) {\n const manifestPath = join(directory, 'package.json');\n if (existsSync(manifestPath)) {\n try {\n if ((JSON.parse(readFileSync(manifestPath, 'utf8')) as { name?: string }).name === WILDO_CLI_PACKAGE_NAME) return directory;\n } catch {\n // An unreadable manifest is not the CLI's; keep walking up.\n }\n }\n const parent = dirname(directory);\n if (parent === directory) return process.cwd();\n directory = parent;\n }\n}\n\nexport default class FwkPublishAllCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'fwk publish all',\n description: 'Release the framework in one command: version, knowledge, workbench bundle, provider simulators build, Docker image, npm packages, installers site, provider modules',\n category: CommandCategory.Fwk,\n flags: {\n dryRun: { type: 'boolean', description: 'Plan only: compile knowledge, bundle the workbench, build the provider simulators, run the npm, Docker and site dry runs; publish nothing', default: false },\n bump: { type: 'string', description: `Bump kind when the current version is already published: ${SEMVER_BUMP_KINDS.join(', ')} (default ${SemverBumpKind.PATCH})`, default: undefined },\n distTag: { type: 'string', description: `npm dist-tag to publish under (default ${DEFAULT_NPM_DIST_TAG}); any other tag leaves Docker latest and the site alone`, default: undefined },\n skipSite: { type: 'boolean', description: 'Do not redeploy the installers site (get.wildo.ai), even when its installers are out of date', default: false },\n site: {\n type: 'boolean',\n description: 'Redeploy the installers site even when it already serves this checkout\\'s installers (it is otherwise left alone)',\n default: false,\n },\n skipDocker: {\n type: 'boolean',\n description: 'Resume a release whose platform image for this version is already pushed: skip the Docker step (refused if the image is absent)',\n default: false,\n },\n force: { type: 'boolean', description: 'Skip the confirmation before publishing', default: false },\n allowDirty: {\n type: 'boolean',\n description: 'Release although tracked files hold uncommitted edits (they ship, and every artifact says -dirty). Prefer `wildo fwk release`',\n default: false,\n },\n releaseBranch: {\n type: 'string',\n description: 'The branch the version commit and its tag are pushed to (default: the current branch; required from a detached HEAD)',\n default: undefined,\n },\n skipInstallCheck: {\n type: 'boolean',\n description: 'Make the release latest without installing it in clean containers first (says so loudly)',\n default: false,\n },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n // A publish, or a dry-run verdict, is only about this checkout when this checkout's own CLI runs it (#2518 review).\n // The root this command publishes from, read where its services read it.\n const cliOutsideCheckout = describeCliOutsideFrameworkCheckout(FrameworkReleaseService.getFrameworkRoot());\n if (cliOutsideCheckout) {\n ctx.log.error(cliOutsideCheckout);\n return { success: false };\n }\n const dryRun = ctx.flags.dryRun === true;\n const distTag = typeof ctx.flags.distTag === 'string' && ctx.flags.distTag.length > 0 ? ctx.flags.distTag : DEFAULT_NPM_DIST_TAG;\n const moveLatest = distTag === DEFAULT_NPM_DIST_TAG;\n const requestedBump = ctx.flags.bump === undefined ? null : parseSemverBumpKind(ctx.flags.bump);\n if (ctx.flags.bump !== undefined && requestedBump === null) {\n ctx.log.error(`--bump ${String(ctx.flags.bump)} is not one of ${SEMVER_BUMP_KINDS.join(', ')}.`);\n return { success: false };\n }\n const frameworkRoot = FrameworkReleaseService.getFrameworkRoot();\n\n try {\n // ── 1. version ──\n const current = (await FrameworkVersionService.loadFrameworkVersionState(frameworkRoot)).config.frameworkVersion;\n const currentStatus = npmRegistryClient.versionStatus(WILDO_CLI_PACKAGE_NAME, current);\n if (currentStatus === RegistryVersionStatus.UNKNOWN) {\n ctx.log.error(`Could not ask npm whether ${current} is already released (is the registry reachable?). Nothing was changed.`);\n return { success: false };\n }\n // A RESUME (`--skipDocker`) finishes the checkout's version and never bumps: whatever step stopped the release —\n // npm publish, the wait, the promotion, the Docker alias, the site — the run that finishes it must target the\n // SAME version. Whether that version is \"done\" cannot be read off npm: wildo-cli's channel tag moves before the\n // release's last steps (the side channel publishes under it; promotion moves it mid-way), so a gate reading it\n // bumped after exactly the failures it was meant to resume. The operator says it instead, and every remedy this\n // command prints carries the flag. A FRESH run bumps whenever the version is already on npm, so it never\n // re-pushes an image tag a published CLI already names.\n const resume = ctx.flags.skipDocker === true;\n if (resume && requestedBump !== null) {\n ctx.log.error('--skipDocker resumes the checkout\\'s version; it cannot be combined with --bump. Nothing was changed.');\n return { success: false };\n }\n const bumpKind = resume ? null : requestedBump ?? (currentStatus === RegistryVersionStatus.PUBLISHED ? SemverBumpKind.PATCH : null);\n const version = bumpKind ? FrameworkVersionService.bumpSemver(current, bumpKind) : current;\n if (bumpKind && npmRegistryClient.versionStatus(WILDO_CLI_PACKAGE_NAME, version) !== RegistryVersionStatus.NOT_PUBLISHED) {\n ctx.log.error(`${version} is already released, or npm could not say. Pass a larger --bump. Nothing was changed.`);\n return { success: false };\n }\n // Promotion moves `latest` by tag, which the npm lane's own prerelease guard (no dist-tag ⇒ `latest`) no longer\n // sees once the publish carries the staging tag; so the refusal is made here, before anything is published.\n if (moveLatest && version.includes('-')) {\n ctx.log.error(`${version} is a prerelease: it cannot become \"${DEFAULT_NPM_DIST_TAG}\". Pass a channel, for example --distTag next.`);\n return { success: false };\n }\n const bumpNote = bumpKind\n ? ` (${bumpKind} bump from ${current}${currentStatus === RegistryVersionStatus.PUBLISHED ? ', which is already published' : ''})`\n : resume\n ? ` (resuming ${current}: --skipDocker never bumps)`\n : '';\n ctx.log.info(` Release ${version} under npm dist-tag \"${distTag}\"${bumpNote}.`);\n if (dryRun && bumpKind) {\n // A dry run changes nothing, so it validates the checkout AS IT IS; the real run bumps first.\n ctx.log.info(` Dry run: the version stays ${current}, so the steps below validate ${current}; the real run applies the bump first.`);\n }\n\n // ── 0. a commit: what is published is what a commit holds (#3059) ──\n const allowDirty = ctx.flags.allowDirty === true;\n const editsBefore = this.uncommittedTrackedFiles(frameworkRoot);\n if (!dryRun && editsBefore.length > 0) {\n const listed = editsBefore.slice(0, 12).map((file) => ` ${file}`).join('\\n');\n const more = editsBefore.length > 12 ? `\\n … and ${editsBefore.length - 12} more` : '';\n if (!allowDirty) {\n ctx.log.error(` ${editsBefore.length} tracked file(s) hold uncommitted edits, and a release must be what a commit holds:\\n${listed}${more}`);\n ctx.log.error(' Release from the branch as GitHub has it, in a fresh worktree: wildo fwk release');\n ctx.log.error(' (--allowDirty releases these edits anyway, and every artifact will say -dirty.) Nothing was changed.');\n return { success: false };\n }\n ctx.log.warn(` --allowDirty: ${editsBefore.length} uncommitted edit(s) will ship, and the image will say -dirty:\\n${listed}${more}`);\n }\n const releaseBranch = typeof ctx.flags.releaseBranch === 'string' && ctx.flags.releaseBranch.length > 0\n ? ctx.flags.releaseBranch\n : this.git(frameworkRoot, ['branch', '--show-current']).stdout.trim();\n const tag = releaseTagName(version);\n if (!releaseBranch) {\n ctx.log.error(' HEAD is detached: pass --releaseBranch <branch>, the branch the version commit and its tag go to. Nothing was changed.');\n return { success: false };\n }\n if (resume && !dryRun && this.git(frameworkRoot, ['rev-parse', '-q', '--verify', `refs/tags/${tag}`]).status !== 0) {\n ctx.log.error(` --skipDocker resumes a release that was tagged ${tag} when it started, and there is no such tag here. Nothing was changed.`);\n return { success: false };\n }\n if (dryRun) ctx.log.info(` The real run commits the version, tags ${tag} and pushes both to origin/${releaseBranch} before publishing anything.`);\n\n if (!dryRun && !(await this.confirmRelease(ctx, version))) return { success: false };\n if (bumpKind && !dryRun) {\n await FrameworkVersionService.applyFrameworkVersion(version, frameworkRoot);\n ctx.log.success(` Version set to ${version} across the framework manifests.`);\n }\n // ── 1b. tag first: commit, tag and push before anything is built or published ──\n if (!resume && !dryRun && !this.tagRelease(ctx, frameworkRoot, version, releaseBranch, editsBefore)) return { success: false };\n\n // Launched from the CLI's own package directory and told the framework root through WILDO_INVOKE_CWD —\n // see `resolveCliLaunchDirectory` for why the step cannot simply run with `cwd: frameworkRoot`.\n const cliLaunchDirectory = resolveCliLaunchDirectory(process.argv[1]);\n const wildo = (label: string, args: string[]): boolean =>\n this.step(ctx, label, process.execPath, [...process.execArgv, process.argv[1], ...forwardedGlobalFlags({ ...ctx.globalFlags, nonInteractive: true }), ...args], cliLaunchDirectory,\n { ...process.env, WILDO_INVOKE_CWD: frameworkRoot });\n\n // ── 2–4. inputs, then every npm gate before anything leaves the machine ──\n // A dry run builds its inputs too — both are local and reversible, and the gates it runs would\n // otherwise judge whatever knowledge and workbench bundle happened to be lying around.\n if (!wildo('compile framework knowledge', ['fwk', 'generate-docs'])) return { success: false };\n if (!this.bundleWorkbench(ctx, frameworkRoot)) return { success: false };\n if (!this.bundleAssuranceCycle(ctx, frameworkRoot)) return { success: false };\n if (!this.buildProviderSimulators(ctx, frameworkRoot)) return { success: false };\n // A `latest` release is PUBLISHED under the staging tag and promoted once npm serves every package (step 7).\n const publishTag = moveLatest ? FrameworkNpmDistTag.RELEASE_STAGING : distTag;\n if (!wildo('npm gates (dry run)', ['fwk', 'publish', 'npm', '--dryRun', '--distTag', publishTag])) return { success: false };\n if (dryRun) {\n if (!wildo('Docker plan (dry run)', ['fwk', 'publish', 'docker', '--dryRun', ...(moveLatest ? ['--tagLatest'] : [])])) return { success: false };\n // A site config the dry run cannot even plan with is one the real run would fail on.\n if (moveLatest && ctx.flags.skipSite !== true && this.deploySite(ctx, frameworkRoot, true, ctx.flags.site === true) === false) return { success: false };\n if (moveLatest && !wildo('provider modules (dry run)', ['fwk', 'publish', 'providers', '--dryRun', '--registry', 'public'])) {\n ctx.log.warn(' The provider modules would not all publish (see above); the release does not depend on them.');\n }\n ctx.log.success(` Planned release ${version}. Nothing was published.`);\n return { success: true };\n }\n\n // ── 5. Docker BEFORE npm: the published CLI names wildo-platform:<version> ──\n if (resume) {\n // Resuming: the image must really be there, or the published CLI would name one that is not.\n const missing = await this.missingPlatformImages(frameworkRoot, version);\n if (missing.length > 0) {\n ctx.log.error(`--skipDocker, but ${missing.join(', ')} is not on the registry: the published CLI would name it. Run without --skipDocker.`);\n return { success: false };\n }\n ctx.log.info(`\\n ── Docker image ── already pushed for ${version}; skipped (--skipDocker).`);\n this.reportImageProvenance(ctx, frameworkRoot, await this.platformImages(frameworkRoot, version));\n } else if (!wildo('Docker image', ['fwk', 'publish', 'docker', '--force'])) {\n // The version tag only: the `latest` alias moves in step 8, once npm `latest` has.\n return { success: false };\n }\n // ── 6. npm ──\n if (!wildo('npm packages', ['fwk', 'publish', 'npm', '--force', '--distTag', publishTag])) {\n // The image is pushed and immutable for this version; a retry must not rebuild it for ten minutes.\n ctx.log.info(` The platform image for ${version} is already pushed. Once the cause is fixed, resume with:`);\n ctx.log.info(` wildo fwk publish all --skipDocker${moveLatest ? '' : ` --distTag ${distTag}`}`);\n return { success: false };\n }\n // ── 7. wait until npm serves every package, install it clean, then make a `latest` release the default ──\n const resumeHint = ` wildo fwk publish all --skipDocker${moveLatest ? '' : ` --distTag ${distTag}`}`;\n if (!wildo(`npm: wait until ${version} is readable`, ['fwk', 'publish', 'promote', '--version', version, '--waitOnly'])) {\n // Everything is published; a resume re-publishes nothing (the npm lane skips what is there) and promotes.\n ctx.log.info(` ${version} is published${moveLatest ? ` under \"${FrameworkNpmDistTag.RELEASE_STAGING}\"` : ''}. Once npm serves it, finish with:`);\n ctx.log.info(resumeHint);\n return { success: false };\n }\n if (!this.verifyCleanInstalls(ctx, frameworkRoot, version, ctx.flags.skipInstallCheck === true)) {\n ctx.log.info(` ${version} is published${moveLatest ? ` under \"${FrameworkNpmDistTag.RELEASE_STAGING}\" and is NOT the default` : ''}. Once a fix is released, or to retry:`);\n ctx.log.info(resumeHint);\n return { success: false };\n }\n if (moveLatest && !wildo(`npm: make ${version} the default`, ['fwk', 'publish', 'promote', '--version', version, '--force'])) {\n ctx.log.info(` ${version} is published under \"${FrameworkNpmDistTag.RELEASE_STAGING}\" and installs clean. Finish with:`);\n ctx.log.info(resumeHint);\n return { success: false };\n }\n // ── 8. Docker `latest` alias and installers site, after npm `latest` ──\n if (moveLatest && !(await this.repointLatest(ctx, frameworkRoot, version))) {\n ctx.log.info(` npm \"${DEFAULT_NPM_DIST_TAG}\" is at ${version}; the Docker alias and the site are not. Once the cause is fixed, finish with:`);\n ctx.log.info(' wildo fwk publish all --skipDocker');\n return { success: false };\n }\n const siteDeployed = moveLatest && ctx.flags.skipSite !== true ? this.deploySite(ctx, frameworkRoot, false, ctx.flags.site === true) : null;\n if (siteDeployed === false) {\n ctx.log.info(` ${version} is released on npm and Docker; the installers site is not. Once the cause is fixed, finish with:`);\n ctx.log.info(' wildo fwk publish all --skipDocker');\n return { success: false };\n }\n // ── 9. provider modules, after npm `latest` (an installed module's engine imports resolve from npm) ──\n if (!moveLatest) {\n ctx.log.info(' Provider modules are published only with a release npm installs by default; this side channel leaves them alone.');\n } else if (!wildo('provider modules', ['fwk', 'publish', 'providers', '--registry', 'public'])) {\n ctx.log.warn(' Not every provider module was published (see above). npm and Docker hold the release; once the cause is fixed:');\n ctx.log.warn(' wildo fwk publish providers --registry public');\n }\n\n await this.readBack(ctx, frameworkRoot, version);\n await this.publishReceipt(ctx, frameworkRoot, version, distTag, moveLatest);\n ctx.log.success(` Released ${version}.`);\n ctx.log.info(` Application creators move to it with: wildo update${moveLatest ? '' : ` --tag ${distTag}`}`);\n return { success: true };\n } catch (error) {\n ctx.log.error(`Release failed: ${ErrorUtils.extractErrorMessage(error)}`);\n return { success: false };\n }\n }\n\n private git(cwd: string, args: string[]): { status: number | null; stdout: string; stderr: string } {\n const result = spawnSync('git', args, { cwd, encoding: 'utf8' });\n return { status: result.status, stdout: result.stdout ?? '', stderr: result.stderr ?? '' };\n }\n\n /** Tracked files whose working-tree or staged content differs from HEAD (untracked files never ship from git). */\n private uncommittedTrackedFiles(frameworkRoot: string): string[] {\n return this.git(frameworkRoot, ['status', '--porcelain', '--untracked-files=no'])\n .stdout.split('\\n').filter((line) => line.trim().length > 0).map((line) => line.slice(3));\n }\n\n /**\n * Commit the version, tag it and push both, before anything is built or published (#3059).\n *\n * The commit holds the files the bump changed: everything uncommitted now that was not before the bump. From a\n * clean tree that is the whole bump; with `--allowDirty`, a file that already held an edit is left out (its edit is\n * not the release's to commit) and said. A version set by hand, and not bumped here, tags HEAD as it is.\n * An existing tag is reused only when it already names HEAD: a rerun after a refused push, never another commit.\n * The push is `--atomic`, so GitHub holds both the commit and the tag, or neither.\n */\n private tagRelease(ctx: CommandContext, frameworkRoot: string, version: string, branch: string, editsBefore: string[]): boolean {\n ctx.log.info(`\\n ── commit, tag and push ${releaseTagName(version)} ──`);\n const tag = releaseTagName(version);\n const before = new Set(editsBefore);\n const bumped = this.uncommittedTrackedFiles(frameworkRoot).filter((file) => !before.has(file));\n if (bumped.length > 0) {\n const add = this.git(frameworkRoot, ['add', '--', ...bumped]);\n const commit = add.status === 0\n ? this.git(frameworkRoot, ['commit', '-m', `Framework ${version}: the version the release lane set across the framework manifests`,\n '-m', `Committed and tagged ${tag} before anything was built or published (#3059).`, '--', ...bumped])\n : add;\n if (commit.status !== 0) {\n ctx.log.error(` Could not commit the version: ${commit.stderr.trim()}. Nothing was published.`);\n return false;\n }\n if (editsBefore.length > 0) ctx.log.warn(` Committed the ${bumped.length} file(s) the bump changed; ${editsBefore.length} earlier edit(s) stay uncommitted.`);\n }\n const head = this.git(frameworkRoot, ['rev-parse', 'HEAD']).stdout.trim();\n const existing = this.git(frameworkRoot, ['rev-parse', '-q', '--verify', `refs/tags/${tag}^{commit}`]);\n if (existing.status === 0 && existing.stdout.trim() !== head) {\n ctx.log.error(` ${tag} already exists and names ${existing.stdout.trim().slice(0, 9)}, not HEAD. Nothing was published.`);\n return false;\n }\n if (existing.status !== 0) {\n const tagged = this.git(frameworkRoot, ['tag', '-a', tag, '-m', `Wildo.ai framework ${version}`]);\n if (tagged.status !== 0) {\n ctx.log.error(` Could not tag ${tag}: ${tagged.stderr.trim()}. Nothing was published.`);\n return false;\n }\n }\n const pushed = this.git(frameworkRoot, ['push', '--atomic', 'origin', `HEAD:refs/heads/${branch}`, `refs/tags/${tag}`]);\n if (pushed.status !== 0) {\n ctx.log.error(` GitHub refused the version commit and ${tag} on ${branch}: ${pushed.stderr.trim()}`);\n ctx.log.error(` Nothing was published. If ${branch} moved on GitHub: git pull --rebase, git tag -f ${tag}, then rerun.`);\n return false;\n }\n ctx.log.success(` ${tag} names ${head.slice(0, 9)}, on GitHub (${branch}); every artifact of this release is built from it.`);\n return true;\n }\n\n /**\n * Install the release on fresh machines before it becomes `latest` (#3060). Each profile is a `node:<supported major>`\n * container given only its `apt` packages, running the checkout's own `install.sh --yes --cli-version=<version>`\n * (the script `get.wildo.ai` serves once this release deploys it), then `wildo --version`, which must answer the\n * version. The installer's log is printed on a failure; nothing is kept.\n */\n private verifyCleanInstalls(ctx: CommandContext, frameworkRoot: string, version: string, skip: boolean): boolean {\n if (skip) {\n ctx.log.warn(`\\n ── clean installs ── SKIPPED (--skipInstallCheck): nothing proved that a clean machine installs ${version}.`);\n return true;\n }\n const script = join(frameworkRoot, INSTALLER_SCRIPTS_RELATIVE[0]!);\n const image = `node:${SUPPORTED_NODE_MAJOR_VERSION}-bookworm-slim`;\n for (const profile of CLEAN_INSTALL_PROFILES) {\n ctx.log.info(`\\n ── clean install: ${profile.name} (${image} + ${profile.aptPackages.join(', ')}) ──`);\n const run = [\n 'export DEBIAN_FRONTEND=noninteractive',\n `(apt-get update -qq && apt-get install -y -qq --no-install-recommends ${profile.aptPackages.join(' ')}) >/dev/null 2>&1`,\n `{ sh /tmp/install.sh --yes --cli-version=${version} >/tmp/install.log 2>&1 || { tail -40 /tmp/install.log; exit 1; }; }`,\n '\"$HOME/.local/bin/wildo\" --version',\n ].join(' && ');\n const result = spawnSync('docker', ['run', '--rm', '-v', `${script}:/tmp/install.sh:ro`, image, 'sh', '-c', run], {\n cwd: frameworkRoot,\n encoding: 'utf8',\n timeout: 20 * 60_000,\n });\n const answered = (result.stdout ?? '').trim().split('\\n').at(-1)?.trim() ?? '';\n if (result.status !== 0 || answered !== version) {\n ctx.log.error(` ${version} does not install on a clean machine (${profile.name}): ${result.status === 0 ? `wildo --version answered \"${answered}\"` : `exit ${result.status ?? 'signal'}`}.`);\n const output = `${result.stdout ?? ''}${result.stderr ?? ''}`.trim();\n if (output) ctx.log.error(output.split('\\n').slice(-25).map((line) => ` ${line}`).join('\\n'));\n return false;\n }\n ctx.log.success(` Installed ${version} (${profile.name}).`);\n }\n return true;\n }\n\n /**\n * The public receipt (#3061): a GitHub Release on the tag, holding what the registries now serve. `release.json`\n * names the commit, every npm package's integrity and every image's digest, read back from npm and Docker Hub;\n * the installers ship as assets; `SHA256SUMS` covers every asset. Never fails the release: npm and Docker hold it,\n * and a missing `gh` only costs the receipt, so the command to make it is printed instead.\n */\n private async publishReceipt(ctx: CommandContext, frameworkRoot: string, version: string, distTag: string, moveLatest: boolean): Promise<void> {\n ctx.log.info('\\n ── receipt: GitHub Release ──');\n const tag = releaseTagName(version);\n try {\n const config = await FrameworkReleaseService.loadFrameworkConfig(frameworkRoot);\n const directory = mkdtempSync(join(tmpdir(), `wildo-release-${version}-`));\n const sha256 = (content: Buffer | string): string => createHash('sha256').update(content).digest('hex');\n const installers = INSTALLER_SCRIPTS_RELATIVE.filter((file) => existsSync(join(frameworkRoot, file))).map((file) => {\n const content = readFileSync(join(frameworkRoot, file));\n writeFileSync(join(directory, basename(file)), content);\n return { file: basename(file), sha256: sha256(content) };\n });\n const npm = (config?.publish.npm.packages ?? []).map((name) => {\n const dist = npmRegistryClient.view(`${name}@${version}`, 'dist') as { integrity?: string; shasum?: string } | null;\n return { name, version, integrity: dist?.integrity ?? null, shasum: dist?.shasum ?? null };\n });\n const docker = (await this.platformImages(frameworkRoot, version)).map(({ reference }) => {\n const inspected = spawnSync('docker', ['buildx', 'imagetools', 'inspect', reference, '--format', '{{json .Manifest}}'], { encoding: 'utf8' });\n let digest: string | null = null;\n try {\n digest = (JSON.parse(inspected.stdout ?? '') as { digest?: string }).digest ?? null;\n } catch {\n digest = null;\n }\n return { reference, digest };\n });\n const commit = this.git(frameworkRoot, ['rev-parse', `refs/tags/${tag}^{commit}`]).stdout.trim() || this.git(frameworkRoot, ['rev-parse', 'HEAD']).stdout.trim();\n const receipt = {\n name: 'Wildo.ai framework',\n version,\n tag,\n commit,\n repository: config?.publish.npm.repositoryUrl ?? null,\n npmDistTag: moveLatest ? FrameworkNpmDistTag.LATEST : distTag,\n releasedAt: new Date().toISOString(),\n npm,\n docker,\n installers,\n };\n writeFileSync(join(directory, 'release.json'), `${JSON.stringify(receipt, null, 2)}\\n`);\n const assets = ['release.json', ...installers.map((i) => i.file)];\n writeFileSync(join(directory, 'SHA256SUMS'), assets.map((file) => `${sha256(readFileSync(join(directory, file)))} ${file}`).join('\\n') + '\\n');\n const missingIntegrity = npm.filter((p) => !p.integrity).map((p) => p.name);\n const notes = [\n `Wildo.ai framework ${version}, built from ${commit.slice(0, 9)} (tag ${tag}).`,\n '',\n `- npm: ${npm.length} \\`@wildo-ai/*\\` packages at ${version}${moveLatest ? ' (`latest`)' : ` (\\`${distTag}\\`)`}`,\n ...docker.map((d) => `- Docker: \\`${d.reference}\\`${d.digest ? ` (\\`${d.digest}\\`)` : ''}`),\n `- Installed clean before it became the default: ${CLEAN_INSTALL_PROFILES.map((p) => p.name).join(', ')}`,\n '',\n `Install: \\`curl -fsSL https://get.wildo.ai/install.sh | sh -s -- --cli-version=${version}\\``,\n '',\n '`release.json` holds every package\\'s integrity and every image\\'s digest; `SHA256SUMS` covers the assets.',\n ].join('\\n');\n writeFileSync(join(directory, 'NOTES.md'), `${notes}\\n`);\n if (missingIntegrity.length > 0) ctx.log.warn(` npm gave no integrity for ${missingIntegrity.join(', ')}; release.json records null for them.`);\n const args = ['release', 'create', tag, '--verify-tag', '--title', `Wildo.ai framework ${version}`, '--notes-file', join(directory, 'NOTES.md'),\n ...(moveLatest ? ['--latest'] : ['--prerelease', '--latest=false']),\n ...[...assets, 'SHA256SUMS'].map((file) => join(directory, file))];\n const created = spawnSync('gh', args, { cwd: frameworkRoot, encoding: 'utf8' });\n if (created.status === 0) {\n ctx.log.success(` GitHub Release ${tag}: ${(created.stdout ?? '').trim() || 'created'}`);\n } else {\n ctx.log.warn(` No GitHub Release (${(created.stderr ?? '').trim().split('\\n')[0] || `gh exit ${created.status ?? 'signal'}`}). The release stands; make the receipt with:`);\n ctx.log.warn(` gh ${args.map((a) => (/\\s/.test(a) ? `\"${a}\"` : a)).join(' ')}`);\n }\n } catch (error) {\n ctx.log.warn(` No GitHub Release: ${ErrorUtils.extractErrorMessage(error)}. The release stands on npm and Docker Hub.`);\n }\n }\n\n private async confirmRelease(ctx: CommandContext, version: string): Promise<boolean> {\n if (ctx.flags.force === true) return true;\n if (ctx.globalFlags.nonInteractive) {\n ctx.log.error('A real release in non-interactive mode requires --force.');\n return false;\n }\n const proceed = await confirm({ message: `Publish ${version} to npm and Docker Hub? Neither can be taken back.`, default: false });\n if (!proceed) ctx.log.info('Cancelled.');\n return proceed;\n }\n\n private step(ctx: CommandContext, label: string, command: string, args: string[], cwd: string, env: NodeJS.ProcessEnv = process.env): boolean {\n ctx.log.info(`\\n ── ${label} ──`);\n const result = spawnSync(command, args, { cwd, env, stdio: 'inherit' });\n if (result.status !== 0) {\n ctx.log.error(` ${label} failed (exit ${result.status ?? 'signal'}); the release stopped here.`);\n return false;\n }\n return true;\n }\n\n /**\n * Bundle the workbench with no `VITE_*` variable in the environment. Vite inlines every `VITE_*` it\n * sees into the bundle — the workbench reads `VITE_COMPANION_URL` and spreads `import.meta.env` over\n * its runtime environment — so a variable set in the publisher's shell would ship in every app\n * creator's workbench. The published bundle must fall back to its own origin, where\n * `wildo-workbench-serve` answers.\n */\n private bundleWorkbench(ctx: CommandContext, frameworkRoot: string): boolean {\n ctx.log.info('\\n ── bundle the workbench ──');\n const env = Object.fromEntries(Object.entries(process.env).filter(([name]) => !name.startsWith('VITE_')));\n const result = spawnPackageManager(PackageManagerCommand.PNPM, ['--filter', WORKBENCH_PACKAGE_NAME, 'run', WORKBENCH_BUNDLE_SCRIPT], {\n cwd: frameworkRoot,\n stdio: 'inherit',\n env,\n });\n if (result.status !== 0) {\n ctx.log.error(` Workbench bundle failed (exit ${result.status ?? 'signal'}); the release stopped here.`);\n return false;\n }\n return true;\n }\n\n /**\n * Stage `@wildo-ai/assurance-cycle`'s published `dist/` (#2302): the checkout's `scripts/assurance/` and the helpers\n * they import, plus the engine evidence manifest measured for THIS release — the engine facts an application outside\n * the checkout reads, including the outcome of every engine-owned test, which is why this step takes minutes. The npm\n * lane refuses the package when its manifest names another release (`findMismatchedEngineEvidenceManifest`).\n */\n private bundleAssuranceCycle(ctx: CommandContext, frameworkRoot: string): boolean {\n ctx.log.info('\\n ── stage the assurance cycle and measure its engine evidence ──');\n const result = spawnPackageManager(PackageManagerCommand.PNPM, ['--filter', ASSURANCE_CYCLE_PACKAGE, 'run', 'bundle'], { cwd: frameworkRoot, stdio: 'inherit' });\n if (result.status !== 0) {\n ctx.log.error(` Assurance cycle staging failed (exit ${result.status ?? 'signal'}); the release stopped here.`);\n return false;\n }\n return true;\n }\n\n /**\n * Build the provider simulators' published `dist/` (#3047). They are a published OPT-IN package that keeps its own\n * lockfile outside the root workspace (the isolation `pnpm-workspace.yaml` records), so no dev watcher compiles them\n * and `pnpm --filter` from the root cannot name them. The step therefore runs in their own directory: a frozen install\n * from their own lockfile (which is what puts their compiler there), then their `build`. Skipping it would not ship a\n * stale package silently: the npm lane refuses a `dist/` older than its `src/`. This makes the release produce it.\n */\n private buildProviderSimulators(ctx: CommandContext, frameworkRoot: string): boolean {\n ctx.log.info('\\n ── build the provider simulators ──');\n const cwd = join(frameworkRoot, PROVIDER_SIMULATORS_RELATIVE_PATH);\n for (const [label, args] of [\n ['install from their own lockfile', ['install', '--frozen-lockfile']],\n ['build', ['run', 'build']],\n ] as const) {\n const result = spawnPackageManager(PackageManagerCommand.PNPM, [...args], { cwd, stdio: 'inherit' });\n if (result.status !== 0) {\n ctx.log.error(` Provider simulators ${label} failed (exit ${result.status ?? 'signal'}); the release stopped here.`);\n return false;\n }\n }\n return true;\n }\n\n /**\n * Redeploy `get.wildo.ai` only when a release changes what it serves.\n *\n * The installers are not a separate host: the marketing website's image carries them under `/get/`,\n * so the only way to ship them is `wildo-marketing deploy`, which copies `website/`, `contact-api/`\n * and the staged installers from THIS checkout, rebuilds the images on the VM and restarts the whole\n * stack. Doing that on every release (several a day) restarted the marketing site for nothing — the\n * scripts install npm's `latest`, so a new CLI needs no new script — and shipped any uncommitted\n * website edit a parallel session had in the shared checkout.\n *\n * So the release first asks `installers --check-live` whether the live scripts differ from this\n * checkout's, byte for byte, and deploys only on DIFFERENT, or when the site could not be asked (a\n * deploy is how stale installers get fixed, so not knowing leans toward it). `--site` forces a deploy;\n * `--skipSite` (checked by the caller) never deploys. The landing page's version number does not need\n * a redeploy: it reads npm's `latest` at view time (`website/src/scripts/install-version.ts`).\n *\n * This makes shipping someone else's unfinished website edit rarer, not impossible: a deploy that\n * does happen still copies the working tree. The deploy lists every uncommitted change in the trees\n * it ships before it runs (`uncommittedDeployedChanges` in the tooling), even under `--yes`.\n *\n * The deploy itself: `--yes` because the release confirmation already covered it, `--dry-run` in a dry\n * run. Its credentials live in `marketing/tooling/.env`; without that file the site is skipped with a\n * warning, louder when the installers are known to be out of date.\n *\n * @returns `null` when skipped, otherwise whether the deploy succeeded.\n */\n private deploySite(ctx: CommandContext, frameworkRoot: string, dryRun: boolean, forced: boolean): boolean | null {\n const toolingRoot = join(frameworkRoot, MARKETING_TOOLING_RELATIVE);\n let knownOutOfDate = false;\n if (!forced) {\n ctx.log.info('\\n ── installers site: compare with get.wildo.ai ──');\n const check = spawnSync(process.execPath, ['src/cli.ts', 'installers', '--check-live'], { cwd: toolingRoot, stdio: 'inherit' });\n if (check.status === LiveInstallersCheckExit.CURRENT) {\n ctx.log.info(' Installers site left alone: it already serves these installers, and they install npm latest. --site redeploys it anyway.');\n return null;\n }\n knownOutOfDate = check.status === LiveInstallersCheckExit.DIFFERENT;\n if (!knownOutOfDate) {\n ctx.log.warn(' Could not compare the installers with the live site; redeploying so they are current.');\n }\n }\n if (!existsSync(join(toolingRoot, '.env'))) {\n const config = join(MARKETING_TOOLING_RELATIVE, '.env');\n if (knownOutOfDate) ctx.log.warn(` get.wildo.ai serves OUT-OF-DATE installers, and ${config} (the site's deploy config) is missing, so it was not redeployed.`);\n else ctx.log.warn(` Installers site skipped: ${config} (the site's deploy config) is missing.`);\n return null;\n }\n return this.step(ctx, `installers site (get.wildo.ai)${dryRun ? ' (dry run)' : ''}`, process.execPath, ['src/cli.ts', 'deploy', dryRun ? '--dry-run' : '--yes'], toolingRoot);\n }\n\n /** Every configured platform image at `version`: its name, and its full registry reference. */\n private async platformImages(frameworkRoot: string, version: string): Promise<Array<{ imageName: string; reference: string }>> {\n const docker = (await FrameworkReleaseService.loadFrameworkConfig(frameworkRoot))?.publish.docker;\n return (docker?.images ?? []).map((image) => ({\n imageName: image.imageName,\n reference: `${docker?.registryHost}/${docker?.namespace}/${image.imageName}:${version}`,\n }));\n }\n\n private async platformImageReferences(frameworkRoot: string, version: string): Promise<string[]> {\n return (await this.platformImages(frameworkRoot, version)).map((image) => image.reference);\n }\n\n /** The configured platform images NOT present on the registry at `version` (inspected, never pulled). */\n private async missingPlatformImages(frameworkRoot: string, version: string): Promise<string[]> {\n return (await this.platformImageReferences(frameworkRoot, version))\n .filter((reference) => spawnSync('docker', ['buildx', 'imagetools', 'inspect', reference], { encoding: 'utf8' }).status !== 0);\n }\n\n /**\n * Say what a resumed image was built from. `--skipDocker` proves the tag exists, not that it holds the\n * source now being published — a resume hours later ships a CLI naming an image built before other\n * sessions' platform changes. So the operator sees the image's build instant, its source revision\n * (`-dirty` when its inputs held uncommitted edits) and how many commits touched ITS INPUTS since — the\n * paths its own `.dockerignore` sends (`FrameworkDockerPublishService.imageSourcePathspecs`), not the\n * whole shared tree. Informative, not a refusal: a release whose image inputs did not move must be able\n * to resume without a rebuild.\n */\n private reportImageProvenance(ctx: CommandContext, frameworkRoot: string, images: Array<{ imageName: string; reference: string }>): void {\n for (const { imageName, reference } of images) {\n const inspected = spawnSync('docker', ['buildx', 'imagetools', 'inspect', reference, '--format', '{{json .Image}}'], { encoding: 'utf8' });\n let config: { created?: string; config?: { Labels?: Record<string, string> } } | undefined;\n try {\n const parsed = JSON.parse(inspected.stdout ?? '') as Record<string, unknown>;\n // A multi-platform image answers one config per platform; they share one build.\n config = ('config' in parsed ? parsed : Object.values(parsed)[0]) as typeof config;\n } catch {\n config = undefined;\n }\n const revision = config?.config?.Labels?.[FRAMEWORK_IMAGE_REVISION_LABEL];\n const built = config?.config?.Labels?.[FRAMEWORK_IMAGE_CREATED_LABEL] ?? config?.created ?? 'unknown';\n if (!revision) {\n ctx.log.warn(` ${reference}: built ${built}; it carries no source revision, so nothing can say whether it matches this checkout.`);\n continue;\n }\n const cleanRevision = revision.replace(/-dirty$/, '');\n const pathspecs = FrameworkDockerPublishService.imageSourcePathspecs(frameworkRoot, imageName) ?? ['.'];\n const since = spawnSync('git', ['rev-list', '--count', `${cleanRevision}..HEAD`, '--', ...pathspecs], { cwd: frameworkRoot, encoding: 'utf8' });\n const commits = since.status === 0 ? Number(since.stdout.trim()) : Number.NaN;\n const detail = `${reference}: built ${built} from ${revision}`;\n if (revision.endsWith('-dirty')) ctx.log.warn(` ${detail} — its inputs held uncommitted edits, so it may not match this checkout.`);\n else if (commits > 0) ctx.log.warn(` ${detail} — ${commits} commit(s) since touched its inputs; run without --skipDocker to rebuild it.`);\n else if (commits === 0) ctx.log.success(` ${detail} — no commit since has touched its inputs.`);\n else ctx.log.warn(` ${detail} — that revision is not in this checkout's history.`);\n }\n }\n\n /** Point every configured image's `latest` alias at `version` — an alias-only step, nothing is rebuilt. */\n private async repointLatest(ctx: CommandContext, frameworkRoot: string, version: string): Promise<boolean> {\n // Its own login: a resume (`--skipDocker`) never ran the push that used to log in (#3063, run 43278280537).\n try {\n await FrameworkDockerPublishService.loginToRegistry(frameworkRoot);\n } catch (error) {\n ctx.log.error(` Docker login before moving the latest alias failed: ${error instanceof Error ? error.message : String(error)}`);\n return false;\n }\n for (const reference of await this.platformImageReferences(frameworkRoot, version)) {\n const alias = reference.replace(/:[^:/]+$/, `:${DEFAULT_NPM_DIST_TAG}`);\n if (!this.step(ctx, `Docker ${alias} → ${version}`, 'docker', ['buildx', 'imagetools', 'create', '-t', alias, reference], frameworkRoot)) return false;\n }\n return true;\n }\n\n /**\n * Read the Docker release back from the registry, over the CONFIGURED images. Reported, not enforced: the push\n * already succeeded. npm needs no read-back here: step 7 does not return until npm serves every package at the\n * version, read past the local cache. (A one-shot check after the last publish used to sit here and warned\n * \"not visible yet\" on nearly every release, because npm takes minutes to make a publish readable everywhere.)\n */\n private async readBack(ctx: CommandContext, frameworkRoot: string, version: string): Promise<void> {\n const config = await FrameworkReleaseService.loadFrameworkConfig(frameworkRoot);\n ctx.log.info('\\n ── read back ──');\n const docker = config?.publish.docker;\n for (const image of docker?.images ?? []) {\n const reference = `${docker?.registryHost}/${docker?.namespace}/${image.imageName}:${version}`;\n const inspected = spawnSync('docker', ['buildx', 'imagetools', 'inspect', reference], { encoding: 'utf8' });\n const platforms = [...new Set((inspected.stdout ?? '').match(/Platform:\\s+linux\\/\\w+/g)?.map((line) => line.replace(/Platform:\\s+/, '')) ?? [])];\n if (inspected.status === 0) ctx.log.success(` Docker: ${reference} (${platforms.join(', ') || 'manifest found'})`);\n else ctx.log.warn(` Docker: could not inspect ${reference}.`);\n }\n }\n}\n"]}
|