@agimon-ai/doompi 0.0.1-alpha.76 → 0.0.1-alpha.78
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/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/antigravity.cjs +5 -0
- package/dist/antigravity.d.cts +2 -0
- package/dist/antigravity.d.mts +2 -0
- package/dist/antigravity.mjs +2 -0
- package/dist/api-contracts.cjs +11 -0
- package/dist/api-contracts.cjs.map +1 -0
- package/dist/api-contracts.d.cts +52 -0
- package/dist/api-contracts.d.cts.map +1 -0
- package/dist/api-contracts.d.mts +52 -0
- package/dist/api-contracts.d.mts.map +1 -0
- package/dist/api-contracts.mjs +7 -0
- package/dist/api-contracts.mjs.map +1 -0
- package/dist/base-command.cjs +3 -0
- package/dist/base-command.d.cts +2 -0
- package/dist/base-command.d.mts +2 -0
- package/dist/base-command.mjs +2 -0
- package/dist/bin/cli.cjs +29 -0
- package/dist/bin/cli.cjs.map +1 -0
- package/dist/bin/cli.d.cts +1 -0
- package/dist/bin/cli.d.mts +1 -0
- package/dist/bin/cli.mjs +30 -0
- package/dist/bin/cli.mjs.map +1 -0
- package/dist/bin/doomRunner.cjs +39 -0
- package/dist/bin/doomRunner.cjs.map +1 -0
- package/dist/bin/doomRunner.d.cts +12 -0
- package/dist/bin/doomRunner.d.cts.map +1 -0
- package/dist/bin/doomRunner.d.mts +12 -0
- package/dist/bin/doomRunner.d.mts.map +1 -0
- package/dist/bin/doomRunner.mjs +38 -0
- package/dist/bin/doomRunner.mjs.map +1 -0
- package/dist/bin/dpi.cjs +12 -0
- package/dist/bin/dpi.cjs.map +1 -0
- package/dist/bin/dpi.d.cts +1 -0
- package/dist/bin/dpi.d.mts +1 -0
- package/dist/bin/dpi.mjs +14 -0
- package/dist/bin/dpi.mjs.map +1 -0
- package/dist/bin/serve.cjs +11 -0
- package/dist/bin/serve.cjs.map +1 -0
- package/dist/bin/serve.d.cts +1 -0
- package/dist/bin/serve.d.mts +1 -0
- package/dist/bin/serve.mjs +13 -0
- package/dist/bin/serve.mjs.map +1 -0
- package/dist/builders/apiContractExport/index.cjs +81 -0
- package/dist/builders/apiContractExport/index.cjs.map +1 -0
- package/dist/builders/apiContractExport/index.mjs +77 -0
- package/dist/builders/apiContractExport/index.mjs.map +1 -0
- package/dist/builders/apiContracts/index.cjs +87 -0
- package/dist/builders/apiContracts/index.cjs.map +1 -0
- package/dist/builders/apiContracts/index.mjs +82 -0
- package/dist/builders/apiContracts/index.mjs.map +1 -0
- package/dist/builders/cli/bootstrapClaim.cjs +53 -0
- package/dist/builders/cli/bootstrapClaim.cjs.map +1 -0
- package/dist/builders/cli/bootstrapClaim.mjs +51 -0
- package/dist/builders/cli/bootstrapClaim.mjs.map +1 -0
- package/dist/builders/cli/bootstrapLocator/index.cjs +204 -0
- package/dist/builders/cli/bootstrapLocator/index.cjs.map +1 -0
- package/dist/builders/cli/bootstrapLocator/index.d.cts +5 -0
- package/dist/builders/cli/bootstrapLocator/index.d.cts.map +1 -0
- package/dist/builders/cli/bootstrapLocator/index.d.mts +5 -0
- package/dist/builders/cli/bootstrapLocator/index.d.mts.map +1 -0
- package/dist/builders/cli/bootstrapLocator/index.mjs +196 -0
- package/dist/builders/cli/bootstrapLocator/index.mjs.map +1 -0
- package/dist/builders/cli/composition.cjs +378 -0
- package/dist/builders/cli/composition.cjs.map +1 -0
- package/dist/builders/cli/composition.d.cts +119 -0
- package/dist/builders/cli/composition.d.cts.map +1 -0
- package/dist/builders/cli/composition.d.mts +119 -0
- package/dist/builders/cli/composition.d.mts.map +1 -0
- package/dist/builders/cli/composition.mjs +351 -0
- package/dist/builders/cli/composition.mjs.map +1 -0
- package/dist/builders/cli/compositionState.cjs +33 -0
- package/dist/builders/cli/compositionState.cjs.map +1 -0
- package/dist/builders/cli/compositionState.d.cts +9 -0
- package/dist/builders/cli/compositionState.d.cts.map +1 -0
- package/dist/builders/cli/compositionState.d.mts +9 -0
- package/dist/builders/cli/compositionState.d.mts.map +1 -0
- package/dist/builders/cli/compositionState.mjs +30 -0
- package/dist/builders/cli/compositionState.mjs.map +1 -0
- package/dist/builders/cli/constants.cjs +20 -0
- package/dist/builders/cli/constants.cjs.map +1 -0
- package/dist/builders/cli/constants.d.cts +17 -0
- package/dist/builders/cli/constants.d.cts.map +1 -0
- package/dist/builders/cli/constants.d.mts +17 -0
- package/dist/builders/cli/constants.d.mts.map +1 -0
- package/dist/builders/cli/constants.mjs +19 -0
- package/dist/builders/cli/constants.mjs.map +1 -0
- package/dist/builders/cli/contextCatalog.cjs +130 -0
- package/dist/builders/cli/contextCatalog.cjs.map +1 -0
- package/dist/builders/cli/contextCatalog.mjs +130 -0
- package/dist/builders/cli/contextCatalog.mjs.map +1 -0
- package/dist/builders/cli/dpiSettings.cjs +118 -0
- package/dist/builders/cli/dpiSettings.cjs.map +1 -0
- package/dist/builders/cli/dpiSettings.mjs +111 -0
- package/dist/builders/cli/dpiSettings.mjs.map +1 -0
- package/dist/builders/cli/entryResolution.cjs +23 -0
- package/dist/builders/cli/entryResolution.cjs.map +1 -0
- package/dist/builders/cli/entryResolution.d.cts +5 -0
- package/dist/builders/cli/entryResolution.d.cts.map +1 -0
- package/dist/builders/cli/entryResolution.d.mts +5 -0
- package/dist/builders/cli/entryResolution.d.mts.map +1 -0
- package/dist/builders/cli/entryResolution.mjs +20 -0
- package/dist/builders/cli/entryResolution.mjs.map +1 -0
- package/dist/builders/cli/extensionAssembler/index.cjs +386 -0
- package/dist/builders/cli/extensionAssembler/index.cjs.map +1 -0
- package/dist/builders/cli/extensionAssembler/index.d.cts +113 -0
- package/dist/builders/cli/extensionAssembler/index.d.cts.map +1 -0
- package/dist/builders/cli/extensionAssembler/index.d.mts +113 -0
- package/dist/builders/cli/extensionAssembler/index.d.mts.map +1 -0
- package/dist/builders/cli/extensionAssembler/index.mjs +376 -0
- package/dist/builders/cli/extensionAssembler/index.mjs.map +1 -0
- package/dist/builders/cli/harnessContext.cjs +186 -0
- package/dist/builders/cli/harnessContext.cjs.map +1 -0
- package/dist/builders/cli/harnessContext.d.cts +51 -0
- package/dist/builders/cli/harnessContext.d.cts.map +1 -0
- package/dist/builders/cli/harnessContext.d.mts +51 -0
- package/dist/builders/cli/harnessContext.d.mts.map +1 -0
- package/dist/builders/cli/harnessContext.mjs +179 -0
- package/dist/builders/cli/harnessContext.mjs.map +1 -0
- package/dist/builders/cli/index.cjs +151 -0
- package/dist/builders/cli/index.cjs.map +1 -0
- package/dist/builders/cli/index.d.cts +22 -0
- package/dist/builders/cli/index.d.cts.map +1 -0
- package/dist/builders/cli/index.d.mts +22 -0
- package/dist/builders/cli/index.d.mts.map +1 -0
- package/dist/builders/cli/index.mjs +147 -0
- package/dist/builders/cli/index.mjs.map +1 -0
- package/dist/builders/cli/launchPlan/index.cjs +102 -0
- package/dist/builders/cli/launchPlan/index.cjs.map +1 -0
- package/dist/builders/cli/launchPlan/index.d.cts +43 -0
- package/dist/builders/cli/launchPlan/index.d.cts.map +1 -0
- package/dist/builders/cli/launchPlan/index.d.mts +43 -0
- package/dist/builders/cli/launchPlan/index.d.mts.map +1 -0
- package/dist/builders/cli/launchPlan/index.mjs +100 -0
- package/dist/builders/cli/launchPlan/index.mjs.map +1 -0
- package/dist/builders/cli/launcherComposition/index.cjs +84 -0
- package/dist/builders/cli/launcherComposition/index.cjs.map +1 -0
- package/dist/builders/cli/launcherComposition/index.mjs +80 -0
- package/dist/builders/cli/launcherComposition/index.mjs.map +1 -0
- package/dist/builders/cli/piExtensionAlias/index.cjs +40 -0
- package/dist/builders/cli/piExtensionAlias/index.cjs.map +1 -0
- package/dist/builders/cli/piExtensionAlias/index.mjs +35 -0
- package/dist/builders/cli/piExtensionAlias/index.mjs.map +1 -0
- package/dist/builders/cli/piExtensionDispatcher/index.cjs +205 -0
- package/dist/builders/cli/piExtensionDispatcher/index.cjs.map +1 -0
- package/dist/builders/cli/piExtensionDispatcher/index.mjs +198 -0
- package/dist/builders/cli/piExtensionDispatcher/index.mjs.map +1 -0
- package/dist/builders/cli/prepare.cjs +64 -0
- package/dist/builders/cli/prepare.cjs.map +1 -0
- package/dist/builders/cli/prepare.mjs +62 -0
- package/dist/builders/cli/prepare.mjs.map +1 -0
- package/dist/builders/cli/projectSettings.cjs +155 -0
- package/dist/builders/cli/projectSettings.cjs.map +1 -0
- package/dist/builders/cli/projectSettings.d.cts +27 -0
- package/dist/builders/cli/projectSettings.d.cts.map +1 -0
- package/dist/builders/cli/projectSettings.d.mts +27 -0
- package/dist/builders/cli/projectSettings.d.mts.map +1 -0
- package/dist/builders/cli/projectSettings.mjs +144 -0
- package/dist/builders/cli/projectSettings.mjs.map +1 -0
- package/dist/builders/cli/runtimeBundle/index.cjs +130 -0
- package/dist/builders/cli/runtimeBundle/index.cjs.map +1 -0
- package/dist/builders/cli/runtimeBundle/index.d.cts +21 -0
- package/dist/builders/cli/runtimeBundle/index.d.cts.map +1 -0
- package/dist/builders/cli/runtimeBundle/index.d.mts +21 -0
- package/dist/builders/cli/runtimeBundle/index.d.mts.map +1 -0
- package/dist/builders/cli/runtimeBundle/index.mjs +126 -0
- package/dist/builders/cli/runtimeBundle/index.mjs.map +1 -0
- package/dist/builders/server/index.cjs +184 -0
- package/dist/builders/server/index.cjs.map +1 -0
- package/dist/builders/server/index.mjs +181 -0
- package/dist/builders/server/index.mjs.map +1 -0
- package/dist/builders/server/runtime.cjs +603 -0
- package/dist/builders/server/runtime.cjs.map +1 -0
- package/dist/builders/server/runtime.mjs +595 -0
- package/dist/builders/server/runtime.mjs.map +1 -0
- package/dist/builders/server/selectionStatus.cjs +12 -0
- package/dist/builders/server/selectionStatus.cjs.map +1 -0
- package/dist/builders/server/selectionStatus.mjs +12 -0
- package/dist/builders/server/selectionStatus.mjs.map +1 -0
- package/dist/builders/server/sessionArguments.cjs +22 -0
- package/dist/builders/server/sessionArguments.cjs.map +1 -0
- package/dist/builders/server/sessionArguments.mjs +22 -0
- package/dist/builders/server/sessionArguments.mjs.map +1 -0
- package/dist/builders/web/bundle.cjs +110 -0
- package/dist/builders/web/bundle.cjs.map +1 -0
- package/dist/builders/web/bundle.d.cts +29 -0
- package/dist/builders/web/bundle.d.cts.map +1 -0
- package/dist/builders/web/bundle.d.mts +29 -0
- package/dist/builders/web/bundle.d.mts.map +1 -0
- package/dist/builders/web/bundle.mjs +107 -0
- package/dist/builders/web/bundle.mjs.map +1 -0
- package/dist/builders/web/bundleAssetPolicy.cjs +96 -0
- package/dist/builders/web/bundleAssetPolicy.cjs.map +1 -0
- package/dist/builders/web/bundleAssetPolicy.d.cts +22 -0
- package/dist/builders/web/bundleAssetPolicy.d.cts.map +1 -0
- package/dist/builders/web/bundleAssetPolicy.d.mts +22 -0
- package/dist/builders/web/bundleAssetPolicy.d.mts.map +1 -0
- package/dist/builders/web/bundleAssetPolicy.mjs +95 -0
- package/dist/builders/web/bundleAssetPolicy.mjs.map +1 -0
- package/dist/builders/web/index.cjs +75 -0
- package/dist/builders/web/index.cjs.map +1 -0
- package/dist/builders/web/index.d.cts +29 -0
- package/dist/builders/web/index.d.cts.map +1 -0
- package/dist/builders/web/index.d.mts +29 -0
- package/dist/builders/web/index.d.mts.map +1 -0
- package/dist/builders/web/index.mjs +72 -0
- package/dist/builders/web/index.mjs.map +1 -0
- package/dist/builders/web/webDevRoots.cjs +27 -0
- package/dist/builders/web/webDevRoots.cjs.map +1 -0
- package/dist/builders/web/webDevRoots.d.cts +22 -0
- package/dist/builders/web/webDevRoots.d.cts.map +1 -0
- package/dist/builders/web/webDevRoots.d.mts +22 -0
- package/dist/builders/web/webDevRoots.d.mts.map +1 -0
- package/dist/builders/web/webDevRoots.mjs +25 -0
- package/dist/builders/web/webDevRoots.mjs.map +1 -0
- package/dist/builders/web/webPluginGenerate.cjs +113 -0
- package/dist/builders/web/webPluginGenerate.cjs.map +1 -0
- package/dist/builders/web/webPluginGenerate.d.cts +28 -0
- package/dist/builders/web/webPluginGenerate.d.cts.map +1 -0
- package/dist/builders/web/webPluginGenerate.d.mts +28 -0
- package/dist/builders/web/webPluginGenerate.d.mts.map +1 -0
- package/dist/builders/web/webPluginGenerate.mjs +106 -0
- package/dist/builders/web/webPluginGenerate.mjs.map +1 -0
- package/dist/builders/web/webPluginManifest.cjs +92 -0
- package/dist/builders/web/webPluginManifest.cjs.map +1 -0
- package/dist/builders/web/webPluginManifest.d.cts +44 -0
- package/dist/builders/web/webPluginManifest.d.cts.map +1 -0
- package/dist/builders/web/webPluginManifest.d.mts +44 -0
- package/dist/builders/web/webPluginManifest.d.mts.map +1 -0
- package/dist/builders/web/webPluginManifest.mjs +88 -0
- package/dist/builders/web/webPluginManifest.mjs.map +1 -0
- package/dist/builders/web/webPluginScan.cjs +53 -0
- package/dist/builders/web/webPluginScan.cjs.map +1 -0
- package/dist/builders/web/webPluginScan.d.cts +16 -0
- package/dist/builders/web/webPluginScan.d.cts.map +1 -0
- package/dist/builders/web/webPluginScan.d.mts +16 -0
- package/dist/builders/web/webPluginScan.d.mts.map +1 -0
- package/dist/builders/web/webPluginScan.mjs +50 -0
- package/dist/builders/web/webPluginScan.mjs.map +1 -0
- package/dist/builders/web/webPluginVite.cjs +124 -0
- package/dist/builders/web/webPluginVite.cjs.map +1 -0
- package/dist/builders/web/webPluginVite.d.cts +36 -0
- package/dist/builders/web/webPluginVite.d.cts.map +1 -0
- package/dist/builders/web/webPluginVite.d.mts +36 -0
- package/dist/builders/web/webPluginVite.d.mts.map +1 -0
- package/dist/builders/web/webPluginVite.mjs +116 -0
- package/dist/builders/web/webPluginVite.mjs.map +1 -0
- package/dist/builders/web.cjs +33 -0
- package/dist/builders/web.d.cts +9 -0
- package/dist/builders/web.d.mts +9 -0
- package/dist/builders/web.mjs +9 -0
- package/dist/cli/cliApp.cjs +177 -0
- package/dist/cli/cliApp.cjs.map +1 -0
- package/dist/cli/cliApp.d.cts +25 -0
- package/dist/cli/cliApp.d.cts.map +1 -0
- package/dist/cli/cliApp.d.mts +25 -0
- package/dist/cli/cliApp.d.mts.map +1 -0
- package/dist/cli/cliApp.mjs +175 -0
- package/dist/cli/cliApp.mjs.map +1 -0
- package/dist/cli/commands/api-export/index.cjs +65 -0
- package/dist/cli/commands/api-export/index.cjs.map +1 -0
- package/dist/cli/commands/api-export/index.mjs +61 -0
- package/dist/cli/commands/api-export/index.mjs.map +1 -0
- package/dist/cli/commands/baseCommand.cjs +16 -0
- package/dist/cli/commands/baseCommand.cjs.map +1 -0
- package/dist/cli/commands/baseCommand.d.cts +24 -0
- package/dist/cli/commands/baseCommand.d.cts.map +1 -0
- package/dist/cli/commands/baseCommand.d.mts +24 -0
- package/dist/cli/commands/baseCommand.d.mts.map +1 -0
- package/dist/cli/commands/baseCommand.mjs +16 -0
- package/dist/cli/commands/baseCommand.mjs.map +1 -0
- package/dist/cli/commands/compat/context.cjs +115 -0
- package/dist/cli/commands/compat/context.cjs.map +1 -0
- package/dist/cli/commands/compat/context.d.cts +22 -0
- package/dist/cli/commands/compat/context.d.cts.map +1 -0
- package/dist/cli/commands/compat/context.d.mts +22 -0
- package/dist/cli/commands/compat/context.d.mts.map +1 -0
- package/dist/cli/commands/compat/context.mjs +110 -0
- package/dist/cli/commands/compat/context.mjs.map +1 -0
- package/dist/cli/commands/compat/help.cjs +26 -0
- package/dist/cli/commands/compat/help.cjs.map +1 -0
- package/dist/cli/commands/compat/help.d.cts +4 -0
- package/dist/cli/commands/compat/help.d.cts.map +1 -0
- package/dist/cli/commands/compat/help.d.mts +4 -0
- package/dist/cli/commands/compat/help.d.mts.map +1 -0
- package/dist/cli/commands/compat/help.mjs +25 -0
- package/dist/cli/commands/compat/help.mjs.map +1 -0
- package/dist/cli/commands/compat/index.cjs +73 -0
- package/dist/cli/commands/compat/index.cjs.map +1 -0
- package/dist/cli/commands/compat/index.d.cts +14 -0
- package/dist/cli/commands/compat/index.d.cts.map +1 -0
- package/dist/cli/commands/compat/index.d.mts +14 -0
- package/dist/cli/commands/compat/index.d.mts.map +1 -0
- package/dist/cli/commands/compat/index.mjs +70 -0
- package/dist/cli/commands/compat/index.mjs.map +1 -0
- package/dist/cli/commands/compat/options.cjs +88 -0
- package/dist/cli/commands/compat/options.cjs.map +1 -0
- package/dist/cli/commands/compat/options.d.cts +15 -0
- package/dist/cli/commands/compat/options.d.cts.map +1 -0
- package/dist/cli/commands/compat/options.d.mts +15 -0
- package/dist/cli/commands/compat/options.d.mts.map +1 -0
- package/dist/cli/commands/compat/options.mjs +86 -0
- package/dist/cli/commands/compat/options.mjs.map +1 -0
- package/dist/cli/commands/compat/providers/antigravity.cjs +294 -0
- package/dist/cli/commands/compat/providers/antigravity.cjs.map +1 -0
- package/dist/cli/commands/compat/providers/antigravity.d.cts +9 -0
- package/dist/cli/commands/compat/providers/antigravity.d.cts.map +1 -0
- package/dist/cli/commands/compat/providers/antigravity.d.mts +9 -0
- package/dist/cli/commands/compat/providers/antigravity.d.mts.map +1 -0
- package/dist/cli/commands/compat/providers/antigravity.mjs +289 -0
- package/dist/cli/commands/compat/providers/antigravity.mjs.map +1 -0
- package/dist/cli/commands/compat/providers/codex.cjs +178 -0
- package/dist/cli/commands/compat/providers/codex.cjs.map +1 -0
- package/dist/cli/commands/compat/providers/codex.d.cts +17 -0
- package/dist/cli/commands/compat/providers/codex.d.cts.map +1 -0
- package/dist/cli/commands/compat/providers/codex.d.mts +17 -0
- package/dist/cli/commands/compat/providers/codex.d.mts.map +1 -0
- package/dist/cli/commands/compat/providers/codex.mjs +170 -0
- package/dist/cli/commands/compat/providers/codex.mjs.map +1 -0
- package/dist/cli/commands/compat/providers/index.cjs +65 -0
- package/dist/cli/commands/compat/providers/index.cjs.map +1 -0
- package/dist/cli/commands/compat/providers/index.d.cts +15 -0
- package/dist/cli/commands/compat/providers/index.d.cts.map +1 -0
- package/dist/cli/commands/compat/providers/index.d.mts +15 -0
- package/dist/cli/commands/compat/providers/index.d.mts.map +1 -0
- package/dist/cli/commands/compat/providers/index.mjs +45 -0
- package/dist/cli/commands/compat/providers/index.mjs.map +1 -0
- package/dist/cli/commands/compat/providers/process.cjs +172 -0
- package/dist/cli/commands/compat/providers/process.cjs.map +1 -0
- package/dist/cli/commands/compat/providers/process.d.cts +33 -0
- package/dist/cli/commands/compat/providers/process.d.cts.map +1 -0
- package/dist/cli/commands/compat/providers/process.d.mts +33 -0
- package/dist/cli/commands/compat/providers/process.d.mts.map +1 -0
- package/dist/cli/commands/compat/providers/process.mjs +159 -0
- package/dist/cli/commands/compat/providers/process.mjs.map +1 -0
- package/dist/cli/commands/compat/providers/shared.cjs +76 -0
- package/dist/cli/commands/compat/providers/shared.cjs.map +1 -0
- package/dist/cli/commands/compat/providers/shared.d.cts +40 -0
- package/dist/cli/commands/compat/providers/shared.d.cts.map +1 -0
- package/dist/cli/commands/compat/providers/shared.d.mts +40 -0
- package/dist/cli/commands/compat/providers/shared.d.mts.map +1 -0
- package/dist/cli/commands/compat/providers/shared.mjs +61 -0
- package/dist/cli/commands/compat/providers/shared.mjs.map +1 -0
- package/dist/cli/commands/compat/types.d.cts +31 -0
- package/dist/cli/commands/compat/types.d.cts.map +1 -0
- package/dist/cli/commands/compat/types.d.mts +31 -0
- package/dist/cli/commands/compat/types.d.mts.map +1 -0
- package/dist/cli/commands/doctor/help.cjs +19 -0
- package/dist/cli/commands/doctor/help.cjs.map +1 -0
- package/dist/cli/commands/doctor/help.d.cts +4 -0
- package/dist/cli/commands/doctor/help.d.cts.map +1 -0
- package/dist/cli/commands/doctor/help.d.mts +4 -0
- package/dist/cli/commands/doctor/help.d.mts.map +1 -0
- package/dist/cli/commands/doctor/help.mjs +19 -0
- package/dist/cli/commands/doctor/help.mjs.map +1 -0
- package/dist/cli/commands/doctor/index.cjs +116 -0
- package/dist/cli/commands/doctor/index.cjs.map +1 -0
- package/dist/cli/commands/doctor/index.d.cts +12 -0
- package/dist/cli/commands/doctor/index.d.cts.map +1 -0
- package/dist/cli/commands/doctor/index.d.mts +12 -0
- package/dist/cli/commands/doctor/index.d.mts.map +1 -0
- package/dist/cli/commands/doctor/index.mjs +112 -0
- package/dist/cli/commands/doctor/index.mjs.map +1 -0
- package/dist/cli/commands/emit-mcp/index.cjs +32 -0
- package/dist/cli/commands/emit-mcp/index.cjs.map +1 -0
- package/dist/cli/commands/emit-mcp/index.d.cts +19 -0
- package/dist/cli/commands/emit-mcp/index.d.cts.map +1 -0
- package/dist/cli/commands/emit-mcp/index.d.mts +19 -0
- package/dist/cli/commands/emit-mcp/index.d.mts.map +1 -0
- package/dist/cli/commands/emit-mcp/index.mjs +31 -0
- package/dist/cli/commands/emit-mcp/index.mjs.map +1 -0
- package/dist/cli/commands/explain/index.cjs +155 -0
- package/dist/cli/commands/explain/index.cjs.map +1 -0
- package/dist/cli/commands/explain/index.d.cts +57 -0
- package/dist/cli/commands/explain/index.d.cts.map +1 -0
- package/dist/cli/commands/explain/index.d.mts +57 -0
- package/dist/cli/commands/explain/index.d.mts.map +1 -0
- package/dist/cli/commands/explain/index.mjs +150 -0
- package/dist/cli/commands/explain/index.mjs.map +1 -0
- package/dist/cli/commands/history-export/help.cjs +18 -0
- package/dist/cli/commands/history-export/help.cjs.map +1 -0
- package/dist/cli/commands/history-export/help.d.cts +4 -0
- package/dist/cli/commands/history-export/help.d.cts.map +1 -0
- package/dist/cli/commands/history-export/help.d.mts +4 -0
- package/dist/cli/commands/history-export/help.d.mts.map +1 -0
- package/dist/cli/commands/history-export/help.mjs +18 -0
- package/dist/cli/commands/history-export/help.mjs.map +1 -0
- package/dist/cli/commands/history-export/index.cjs +76 -0
- package/dist/cli/commands/history-export/index.cjs.map +1 -0
- package/dist/cli/commands/history-export/index.mjs +74 -0
- package/dist/cli/commands/history-export/index.mjs.map +1 -0
- package/dist/cli/commands/history-import/help.cjs +20 -0
- package/dist/cli/commands/history-import/help.cjs.map +1 -0
- package/dist/cli/commands/history-import/help.d.cts +4 -0
- package/dist/cli/commands/history-import/help.d.cts.map +1 -0
- package/dist/cli/commands/history-import/help.d.mts +4 -0
- package/dist/cli/commands/history-import/help.d.mts.map +1 -0
- package/dist/cli/commands/history-import/help.mjs +20 -0
- package/dist/cli/commands/history-import/help.mjs.map +1 -0
- package/dist/cli/commands/history-import/index.cjs +78 -0
- package/dist/cli/commands/history-import/index.cjs.map +1 -0
- package/dist/cli/commands/history-import/index.mjs +75 -0
- package/dist/cli/commands/history-import/index.mjs.map +1 -0
- package/dist/cli/commands/init/constants.cjs +11 -0
- package/dist/cli/commands/init/constants.cjs.map +1 -0
- package/dist/cli/commands/init/constants.mjs +11 -0
- package/dist/cli/commands/init/constants.mjs.map +1 -0
- package/dist/cli/commands/init/help.cjs +17 -0
- package/dist/cli/commands/init/help.cjs.map +1 -0
- package/dist/cli/commands/init/help.d.cts +4 -0
- package/dist/cli/commands/init/help.d.cts.map +1 -0
- package/dist/cli/commands/init/help.d.mts +4 -0
- package/dist/cli/commands/init/help.d.mts.map +1 -0
- package/dist/cli/commands/init/help.mjs +17 -0
- package/dist/cli/commands/init/help.mjs.map +1 -0
- package/dist/cli/commands/init/index.cjs +87 -0
- package/dist/cli/commands/init/index.cjs.map +1 -0
- package/dist/cli/commands/init/index.d.cts +12 -0
- package/dist/cli/commands/init/index.d.cts.map +1 -0
- package/dist/cli/commands/init/index.d.mts +12 -0
- package/dist/cli/commands/init/index.d.mts.map +1 -0
- package/dist/cli/commands/init/index.mjs +83 -0
- package/dist/cli/commands/init/index.mjs.map +1 -0
- package/dist/cli/commands/init/presenter.cjs +170 -0
- package/dist/cli/commands/init/presenter.cjs.map +1 -0
- package/dist/cli/commands/init/presenter.d.cts +8 -0
- package/dist/cli/commands/init/presenter.d.cts.map +1 -0
- package/dist/cli/commands/init/presenter.d.mts +8 -0
- package/dist/cli/commands/init/presenter.d.mts.map +1 -0
- package/dist/cli/commands/init/presenter.mjs +170 -0
- package/dist/cli/commands/init/presenter.mjs.map +1 -0
- package/dist/cli/commands/launch/index.cjs +128 -0
- package/dist/cli/commands/launch/index.cjs.map +1 -0
- package/dist/cli/commands/launch/index.d.cts +29 -0
- package/dist/cli/commands/launch/index.d.cts.map +1 -0
- package/dist/cli/commands/launch/index.d.mts +29 -0
- package/dist/cli/commands/launch/index.d.mts.map +1 -0
- package/dist/cli/commands/launch/index.mjs +122 -0
- package/dist/cli/commands/launch/index.mjs.map +1 -0
- package/dist/cli/commands/sandbox/args.cjs +50 -0
- package/dist/cli/commands/sandbox/args.cjs.map +1 -0
- package/dist/cli/commands/sandbox/args.mjs +50 -0
- package/dist/cli/commands/sandbox/args.mjs.map +1 -0
- package/dist/cli/commands/sandbox/harness.cjs +61 -0
- package/dist/cli/commands/sandbox/harness.cjs.map +1 -0
- package/dist/cli/commands/sandbox/harness.mjs +60 -0
- package/dist/cli/commands/sandbox/harness.mjs.map +1 -0
- package/dist/cli/commands/sandbox/index.cjs +57 -0
- package/dist/cli/commands/sandbox/index.cjs.map +1 -0
- package/dist/cli/commands/sandbox/index.mjs +56 -0
- package/dist/cli/commands/sandbox/index.mjs.map +1 -0
- package/dist/cli/commands/sync/help.cjs +31 -0
- package/dist/cli/commands/sync/help.cjs.map +1 -0
- package/dist/cli/commands/sync/help.d.cts +4 -0
- package/dist/cli/commands/sync/help.d.cts.map +1 -0
- package/dist/cli/commands/sync/help.d.mts +4 -0
- package/dist/cli/commands/sync/help.d.mts.map +1 -0
- package/dist/cli/commands/sync/help.mjs +31 -0
- package/dist/cli/commands/sync/help.mjs.map +1 -0
- package/dist/cli/commands/sync/index.cjs +577 -0
- package/dist/cli/commands/sync/index.cjs.map +1 -0
- package/dist/cli/commands/sync/index.d.cts +65 -0
- package/dist/cli/commands/sync/index.d.cts.map +1 -0
- package/dist/cli/commands/sync/index.d.mts +65 -0
- package/dist/cli/commands/sync/index.d.mts.map +1 -0
- package/dist/cli/commands/sync/index.mjs +560 -0
- package/dist/cli/commands/sync/index.mjs.map +1 -0
- package/dist/cli/commands/sync/prepare.cjs +43 -0
- package/dist/cli/commands/sync/prepare.cjs.map +1 -0
- package/dist/cli/commands/sync/prepare.mjs +40 -0
- package/dist/cli/commands/sync/prepare.mjs.map +1 -0
- package/dist/cli/commands/sync/presenter.cjs +58 -0
- package/dist/cli/commands/sync/presenter.cjs.map +1 -0
- package/dist/cli/commands/sync/presenter.d.cts +16 -0
- package/dist/cli/commands/sync/presenter.d.cts.map +1 -0
- package/dist/cli/commands/sync/presenter.d.mts +16 -0
- package/dist/cli/commands/sync/presenter.d.mts.map +1 -0
- package/dist/cli/commands/sync/presenter.mjs +57 -0
- package/dist/cli/commands/sync/presenter.mjs.map +1 -0
- package/dist/cli/commands/sync/workflow.cjs +99 -0
- package/dist/cli/commands/sync/workflow.cjs.map +1 -0
- package/dist/cli/commands/sync/workflow.mjs +96 -0
- package/dist/cli/commands/sync/workflow.mjs.map +1 -0
- package/dist/cli/dpi.cjs +98 -0
- package/dist/cli/dpi.cjs.map +1 -0
- package/dist/cli/dpi.mjs +91 -0
- package/dist/cli/dpi.mjs.map +1 -0
- package/dist/cli/harnessOptions.cjs +60 -0
- package/dist/cli/harnessOptions.cjs.map +1 -0
- package/dist/cli/harnessOptions.d.cts +24 -0
- package/dist/cli/harnessOptions.d.cts.map +1 -0
- package/dist/cli/harnessOptions.d.mts +24 -0
- package/dist/cli/harnessOptions.d.mts.map +1 -0
- package/dist/cli/harnessOptions.mjs +57 -0
- package/dist/cli/harnessOptions.mjs.map +1 -0
- package/dist/cli/help.cjs +89 -0
- package/dist/cli/help.cjs.map +1 -0
- package/dist/cli/help.d.cts +12 -0
- package/dist/cli/help.d.cts.map +1 -0
- package/dist/cli/help.d.mts +12 -0
- package/dist/cli/help.d.mts.map +1 -0
- package/dist/cli/help.mjs +83 -0
- package/dist/cli/help.mjs.map +1 -0
- package/dist/cli/matrixOptions.cjs +178 -0
- package/dist/cli/matrixOptions.cjs.map +1 -0
- package/dist/cli/matrixOptions.d.cts +90 -0
- package/dist/cli/matrixOptions.d.cts.map +1 -0
- package/dist/cli/matrixOptions.d.mts +90 -0
- package/dist/cli/matrixOptions.d.mts.map +1 -0
- package/dist/cli/matrixOptions.mjs +151 -0
- package/dist/cli/matrixOptions.mjs.map +1 -0
- package/dist/cli/options.cjs +306 -0
- package/dist/cli/options.cjs.map +1 -0
- package/dist/cli/options.d.cts +5 -0
- package/dist/cli/options.d.cts.map +1 -0
- package/dist/cli/options.d.mts +5 -0
- package/dist/cli/options.d.mts.map +1 -0
- package/dist/cli/options.mjs +304 -0
- package/dist/cli/options.mjs.map +1 -0
- package/dist/cli/router.cjs +59 -0
- package/dist/cli/router.cjs.map +1 -0
- package/dist/cli/router.d.cts +32 -0
- package/dist/cli/router.d.cts.map +1 -0
- package/dist/cli/router.d.mts +32 -0
- package/dist/cli/router.d.mts.map +1 -0
- package/dist/cli/router.mjs +56 -0
- package/dist/cli/router.mjs.map +1 -0
- package/dist/cli/server/options.cjs +71 -0
- package/dist/cli/server/options.cjs.map +1 -0
- package/dist/cli/server/options.mjs +70 -0
- package/dist/cli/server/options.mjs.map +1 -0
- package/dist/cli/server/run.cjs +45 -0
- package/dist/cli/server/run.cjs.map +1 -0
- package/dist/cli/server/run.mjs +45 -0
- package/dist/cli/server/run.mjs.map +1 -0
- package/dist/cli-app.cjs +5 -0
- package/dist/cli-app.d.cts +2 -0
- package/dist/cli-app.d.mts +2 -0
- package/dist/cli-app.mjs +2 -0
- package/dist/cli.cjs +28 -0
- package/dist/cli.d.cts +11 -0
- package/dist/cli.d.mts +11 -0
- package/dist/cli.mjs +11 -0
- package/dist/codex.cjs +8 -0
- package/dist/codex.d.cts +2 -0
- package/dist/codex.d.mts +2 -0
- package/dist/codex.mjs +2 -0
- package/dist/commands.cjs +23 -0
- package/dist/commands.d.cts +9 -0
- package/dist/commands.d.mts +9 -0
- package/dist/commands.mjs +9 -0
- package/dist/compatibility-command.cjs +4 -0
- package/dist/compatibility-command.d.cts +2 -0
- package/dist/compatibility-command.d.mts +2 -0
- package/dist/compatibility-command.mjs +2 -0
- package/dist/compatibility-context.cjs +3 -0
- package/dist/compatibility-context.d.cts +2 -0
- package/dist/compatibility-context.d.mts +2 -0
- package/dist/compatibility-context.mjs +2 -0
- package/dist/compatibility-options.cjs +5 -0
- package/dist/compatibility-options.d.cts +2 -0
- package/dist/compatibility-options.d.mts +2 -0
- package/dist/compatibility-options.mjs +2 -0
- package/dist/compatibility.cjs +27 -0
- package/dist/compatibility.d.cts +6 -0
- package/dist/compatibility.d.mts +6 -0
- package/dist/compatibility.mjs +6 -0
- package/dist/compiler/cache.cjs +331 -0
- package/dist/compiler/cache.cjs.map +1 -0
- package/dist/compiler/cache.mjs +323 -0
- package/dist/compiler/cache.mjs.map +1 -0
- package/dist/compiler/index.cjs +996 -0
- package/dist/compiler/index.cjs.map +1 -0
- package/dist/compiler/index.mjs +988 -0
- package/dist/compiler/index.mjs.map +1 -0
- package/dist/compiler/inputs.cjs +83 -0
- package/dist/compiler/inputs.cjs.map +1 -0
- package/dist/compiler/inputs.mjs +78 -0
- package/dist/compiler/inputs.mjs.map +1 -0
- package/dist/composer.cjs +28 -0
- package/dist/composer.d.cts +4 -0
- package/dist/composer.d.mts +4 -0
- package/dist/composer.mjs +4 -0
- package/dist/composition/harnessState/index.cjs +48 -0
- package/dist/composition/harnessState/index.cjs.map +1 -0
- package/dist/composition/harnessState/index.d.cts +19 -0
- package/dist/composition/harnessState/index.d.cts.map +1 -0
- package/dist/composition/harnessState/index.d.mts +19 -0
- package/dist/composition/harnessState/index.d.mts.map +1 -0
- package/dist/composition/harnessState/index.mjs +34 -0
- package/dist/composition/harnessState/index.mjs.map +1 -0
- package/dist/composition/layerPackageInstaller/index.cjs +342 -0
- package/dist/composition/layerPackageInstaller/index.cjs.map +1 -0
- package/dist/composition/layerPackageInstaller/index.d.cts +45 -0
- package/dist/composition/layerPackageInstaller/index.d.cts.map +1 -0
- package/dist/composition/layerPackageInstaller/index.d.mts +45 -0
- package/dist/composition/layerPackageInstaller/index.d.mts.map +1 -0
- package/dist/composition/layerPackageInstaller/index.mjs +334 -0
- package/dist/composition/layerPackageInstaller/index.mjs.map +1 -0
- package/dist/composition/projectTrust/index.cjs +51 -0
- package/dist/composition/projectTrust/index.cjs.map +1 -0
- package/dist/composition/projectTrust/index.d.cts +22 -0
- package/dist/composition/projectTrust/index.d.cts.map +1 -0
- package/dist/composition/projectTrust/index.d.mts +22 -0
- package/dist/composition/projectTrust/index.d.mts.map +1 -0
- package/dist/composition/projectTrust/index.mjs +48 -0
- package/dist/composition/projectTrust/index.mjs.map +1 -0
- package/dist/composition/repository/index.cjs +69 -0
- package/dist/composition/repository/index.cjs.map +1 -0
- package/dist/composition/repository/index.d.cts +22 -0
- package/dist/composition/repository/index.d.cts.map +1 -0
- package/dist/composition/repository/index.d.mts +22 -0
- package/dist/composition/repository/index.d.mts.map +1 -0
- package/dist/composition/repository/index.mjs +64 -0
- package/dist/composition/repository/index.mjs.map +1 -0
- package/dist/composition/syncDrift/index.cjs +160 -0
- package/dist/composition/syncDrift/index.cjs.map +1 -0
- package/dist/composition/syncDrift/index.d.cts +41 -0
- package/dist/composition/syncDrift/index.d.cts.map +1 -0
- package/dist/composition/syncDrift/index.d.mts +41 -0
- package/dist/composition/syncDrift/index.d.mts.map +1 -0
- package/dist/composition/syncDrift/index.mjs +152 -0
- package/dist/composition/syncDrift/index.mjs.map +1 -0
- package/dist/composition/syncState/index.cjs +593 -0
- package/dist/composition/syncState/index.cjs.map +1 -0
- package/dist/composition/syncState/index.d.cts +188 -0
- package/dist/composition/syncState/index.d.cts.map +1 -0
- package/dist/composition/syncState/index.d.mts +188 -0
- package/dist/composition/syncState/index.d.mts.map +1 -0
- package/dist/composition/syncState/index.mjs +559 -0
- package/dist/composition/syncState/index.mjs.map +1 -0
- package/dist/composition/transitionLayers.cjs +17 -0
- package/dist/composition/transitionLayers.cjs.map +1 -0
- package/dist/composition/transitionLayers.d.cts +6 -0
- package/dist/composition/transitionLayers.d.cts.map +1 -0
- package/dist/composition/transitionLayers.d.mts +6 -0
- package/dist/composition/transitionLayers.d.mts.map +1 -0
- package/dist/composition/transitionLayers.mjs +16 -0
- package/dist/composition/transitionLayers.mjs.map +1 -0
- package/dist/composition/types/harness.d.cts +49 -0
- package/dist/composition/types/harness.d.cts.map +1 -0
- package/dist/composition/types/harness.d.mts +49 -0
- package/dist/composition/types/harness.d.mts.map +1 -0
- package/dist/config.cjs +163 -0
- package/dist/config.d.cts +7 -0
- package/dist/config.d.mts +7 -0
- package/dist/config.mjs +7 -0
- package/dist/emit-mcp-command.cjs +4 -0
- package/dist/emit-mcp-command.d.cts +2 -0
- package/dist/emit-mcp-command.d.mts +2 -0
- package/dist/emit-mcp-command.mjs +2 -0
- package/dist/explain-command.cjs +5 -0
- package/dist/explain-command.d.cts +2 -0
- package/dist/explain-command.d.mts +2 -0
- package/dist/explain-command.mjs +2 -0
- package/dist/extensions/agent-model.cjs +41 -0
- package/dist/extensions/agent-model.cjs.map +1 -0
- package/dist/extensions/agent-model.d.cts +22 -0
- package/dist/extensions/agent-model.d.cts.map +1 -0
- package/dist/extensions/agent-model.d.mts +22 -0
- package/dist/extensions/agent-model.d.mts.map +1 -0
- package/dist/extensions/agent-model.mjs +35 -0
- package/dist/extensions/agent-model.mjs.map +1 -0
- package/dist/extensions/composed-pi.cjs +46 -0
- package/dist/extensions/composed-pi.cjs.map +1 -0
- package/dist/extensions/composed-pi.d.cts +13 -0
- package/dist/extensions/composed-pi.d.cts.map +1 -0
- package/dist/extensions/composed-pi.d.mts +13 -0
- package/dist/extensions/composed-pi.d.mts.map +1 -0
- package/dist/extensions/composed-pi.mjs +41 -0
- package/dist/extensions/composed-pi.mjs.map +1 -0
- package/dist/extensions/context-catalog.cjs +96 -0
- package/dist/extensions/context-catalog.cjs.map +1 -0
- package/dist/extensions/context-catalog.d.cts +4 -0
- package/dist/extensions/context-catalog.d.cts.map +1 -0
- package/dist/extensions/context-catalog.d.mts +5 -0
- package/dist/extensions/context-catalog.d.mts.map +1 -0
- package/dist/extensions/context-catalog.mjs +96 -0
- package/dist/extensions/context-catalog.mjs.map +1 -0
- package/dist/extensions/cordis-finalizer.cjs +24 -0
- package/dist/extensions/cordis-finalizer.cjs.map +1 -0
- package/dist/extensions/cordis-finalizer.d.cts +7 -0
- package/dist/extensions/cordis-finalizer.d.cts.map +1 -0
- package/dist/extensions/cordis-finalizer.d.mts +7 -0
- package/dist/extensions/cordis-finalizer.d.mts.map +1 -0
- package/dist/extensions/cordis-finalizer.mjs +19 -0
- package/dist/extensions/cordis-finalizer.mjs.map +1 -0
- package/dist/extensions/cordis-host.cjs +19 -0
- package/dist/extensions/cordis-host.cjs.map +1 -0
- package/dist/extensions/cordis-host.d.cts +7 -0
- package/dist/extensions/cordis-host.d.cts.map +1 -0
- package/dist/extensions/cordis-host.d.mts +7 -0
- package/dist/extensions/cordis-host.d.mts.map +1 -0
- package/dist/extensions/cordis-host.mjs +14 -0
- package/dist/extensions/cordis-host.mjs.map +1 -0
- package/dist/extensions/effort.cjs +54 -0
- package/dist/extensions/effort.cjs.map +1 -0
- package/dist/extensions/effort.d.cts +8 -0
- package/dist/extensions/effort.d.cts.map +1 -0
- package/dist/extensions/effort.d.mts +8 -0
- package/dist/extensions/effort.d.mts.map +1 -0
- package/dist/extensions/effort.mjs +48 -0
- package/dist/extensions/effort.mjs.map +1 -0
- package/dist/extensions/launcher-bootstrap.cjs +38 -0
- package/dist/extensions/launcher-bootstrap.cjs.map +1 -0
- package/dist/extensions/launcher-bootstrap.d.cts +16 -0
- package/dist/extensions/launcher-bootstrap.d.cts.map +1 -0
- package/dist/extensions/launcher-bootstrap.d.mts +16 -0
- package/dist/extensions/launcher-bootstrap.d.mts.map +1 -0
- package/dist/extensions/launcher-bootstrap.mjs +33 -0
- package/dist/extensions/launcher-bootstrap.mjs.map +1 -0
- package/dist/extensions/ollama-provider.cjs +32 -0
- package/dist/extensions/ollama-provider.cjs.map +1 -0
- package/dist/extensions/ollama-provider.d.cts +5 -0
- package/dist/extensions/ollama-provider.d.cts.map +1 -0
- package/dist/extensions/ollama-provider.d.mts +5 -0
- package/dist/extensions/ollama-provider.d.mts.map +1 -0
- package/dist/extensions/ollama-provider.mjs +32 -0
- package/dist/extensions/ollama-provider.mjs.map +1 -0
- package/dist/extensions/pi.cjs +63 -0
- package/dist/extensions/pi.cjs.map +1 -0
- package/dist/extensions/pi.d.cts +7 -0
- package/dist/extensions/pi.d.cts.map +1 -0
- package/dist/extensions/pi.d.mts +7 -0
- package/dist/extensions/pi.d.mts.map +1 -0
- package/dist/extensions/pi.mjs +58 -0
- package/dist/extensions/pi.mjs.map +1 -0
- package/dist/extensions/server.cjs +20 -0
- package/dist/extensions/server.cjs.map +1 -0
- package/dist/extensions/server.d.cts +5 -0
- package/dist/extensions/server.d.cts.map +1 -0
- package/dist/extensions/server.d.mts +5 -0
- package/dist/extensions/server.d.mts.map +1 -0
- package/dist/extensions/server.mjs +15 -0
- package/dist/extensions/server.mjs.map +1 -0
- package/dist/extensions/style-system.cjs +234 -0
- package/dist/extensions/style-system.cjs.map +1 -0
- package/dist/extensions/style-system.d.cts +32 -0
- package/dist/extensions/style-system.d.cts.map +1 -0
- package/dist/extensions/style-system.d.mts +32 -0
- package/dist/extensions/style-system.d.mts.map +1 -0
- package/dist/extensions/style-system.mjs +219 -0
- package/dist/extensions/style-system.mjs.map +1 -0
- package/dist/extensions/terminal-child-session.cjs +76 -0
- package/dist/extensions/terminal-child-session.cjs.map +1 -0
- package/dist/extensions/terminal-child-session.d.cts +7 -0
- package/dist/extensions/terminal-child-session.d.cts.map +1 -0
- package/dist/extensions/terminal-child-session.d.mts +7 -0
- package/dist/extensions/terminal-child-session.d.mts.map +1 -0
- package/dist/extensions/terminal-child-session.mjs +69 -0
- package/dist/extensions/terminal-child-session.mjs.map +1 -0
- package/dist/extensions/transition-coordinator.cjs +154 -0
- package/dist/extensions/transition-coordinator.cjs.map +1 -0
- package/dist/extensions/transition-coordinator.d.cts +8 -0
- package/dist/extensions/transition-coordinator.d.cts.map +1 -0
- package/dist/extensions/transition-coordinator.d.mts +8 -0
- package/dist/extensions/transition-coordinator.d.mts.map +1 -0
- package/dist/extensions/transition-coordinator.mjs +146 -0
- package/dist/extensions/transition-coordinator.mjs.map +1 -0
- package/dist/harness-context.cjs +5 -0
- package/dist/harness-context.d.cts +2 -0
- package/dist/harness-context.d.mts +2 -0
- package/dist/harness-context.mjs +2 -0
- package/dist/harness-state.cjs +19 -0
- package/dist/harness-state.d.cts +2 -0
- package/dist/harness-state.d.mts +2 -0
- package/dist/harness-state.mjs +2 -0
- package/dist/help.cjs +16 -0
- package/dist/help.d.cts +8 -0
- package/dist/help.d.mts +8 -0
- package/dist/help.mjs +8 -0
- package/dist/index.cjs +368 -0
- package/dist/index.d.cts +49 -0
- package/dist/index.d.mts +49 -0
- package/dist/index.mjs +46 -0
- package/dist/init-command.cjs +4 -0
- package/dist/init-command.d.cts +2 -0
- package/dist/init-command.d.mts +2 -0
- package/dist/init-command.mjs +2 -0
- package/dist/launch-command.cjs +7 -0
- package/dist/launch-command.d.cts +2 -0
- package/dist/launch-command.d.mts +2 -0
- package/dist/launch-command.mjs +2 -0
- package/dist/matrix-options.cjs +28 -0
- package/dist/matrix-options.d.cts +2 -0
- package/dist/matrix-options.d.mts +2 -0
- package/dist/matrix-options.mjs +2 -0
- package/dist/matrix-switcher.cjs +11 -0
- package/dist/matrix-switcher.d.cts +3 -0
- package/dist/matrix-switcher.d.mts +3 -0
- package/dist/matrix-switcher.mjs +3 -0
- package/dist/mcp-filter.cjs +9 -0
- package/dist/mcp-filter.d.cts +1 -0
- package/dist/mcp-filter.d.mts +1 -0
- package/dist/mcp-filter.mjs +2 -0
- package/dist/options.cjs +3 -0
- package/dist/options.d.cts +2 -0
- package/dist/options.d.mts +2 -0
- package/dist/options.mjs +2 -0
- package/dist/process.cjs +12 -0
- package/dist/process.d.cts +2 -0
- package/dist/process.d.mts +2 -0
- package/dist/process.mjs +2 -0
- package/dist/project-trust.cjs +6 -0
- package/dist/project-trust.d.cts +2 -0
- package/dist/project-trust.d.mts +2 -0
- package/dist/project-trust.mjs +2 -0
- package/dist/repository.cjs +5 -0
- package/dist/repository.d.cts +2 -0
- package/dist/repository.d.mts +2 -0
- package/dist/repository.mjs +2 -0
- package/dist/resource-collector.cjs +9 -0
- package/dist/resource-collector.d.cts +1 -0
- package/dist/resource-collector.d.mts +1 -0
- package/dist/resource-collector.mjs +2 -0
- package/dist/services.cjs +154 -0
- package/dist/services.d.cts +21 -0
- package/dist/services.d.mts +21 -0
- package/dist/services.mjs +21 -0
- package/dist/shared.cjs +18 -0
- package/dist/shared.d.cts +2 -0
- package/dist/shared.d.mts +2 -0
- package/dist/shared.mjs +2 -0
- package/dist/sync-command.cjs +13 -0
- package/dist/sync-command.d.cts +2 -0
- package/dist/sync-command.d.mts +2 -0
- package/dist/sync-command.mjs +2 -0
- package/dist/sync-state.cjs +33 -0
- package/dist/sync-state.d.cts +2 -0
- package/dist/sync-state.d.mts +2 -0
- package/dist/sync-state.mjs +2 -0
- package/dist/utils.cjs +6 -0
- package/dist/utils.d.cts +3 -0
- package/dist/utils.d.mts +3 -0
- package/dist/utils.mjs +3 -0
- package/package.json +16 -16
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex.d.cts","names":[],"sources":["../../../../../src/cli/commands/compat/providers/codex.ts"],"mappings":";;qBAoBa;;;;;;;wBAuCG,4BAA4B;;wBAwD5B,uBAAuB,SAAS;wBAkBhC,uBACd,SAAS,sBACT,4BACA;wBAqBc,iBAAiB,SAAS,uBAAuB,OAAO;wBAclD,YAAY,SAAS,uBAAuB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CompatibilityContext } from "../context.mjs";
|
|
2
|
+
//#region src/cli/commands/compat/providers/codex.d.ts
|
|
3
|
+
export declare const CODEX_PROVIDER = "codex";
|
|
4
|
+
/**
|
|
5
|
+
* Whether the managed profile, persona, and proxy config apply to this run.
|
|
6
|
+
*
|
|
7
|
+
* Codex management subcommands reject session options, so injecting them would
|
|
8
|
+
* turn `codex login` into an error.
|
|
9
|
+
*/
|
|
10
|
+
export declare function supportsCodexManagedProfile(args: string[]): boolean;
|
|
11
|
+
/** Plugin directory names relative to `plugins/`, which is all Codex accepts. */
|
|
12
|
+
export declare function codexPluginDirectories(context: CompatibilityContext): string[];
|
|
13
|
+
export declare function codexCompatibilityArgs(context: CompatibilityContext, managedProfileName: string, managedProfileFlag: string): string[];
|
|
14
|
+
export declare function codexEnvironment(context: CompatibilityContext): NodeJS.ProcessEnv;
|
|
15
|
+
export declare function launchCodex(context: CompatibilityContext): Promise<number>;
|
|
16
|
+
//#endregion
|
|
17
|
+
//# sourceMappingURL=codex.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex.d.mts","names":[],"sources":["../../../../../src/cli/commands/compat/providers/codex.ts"],"mappings":";;qBAoBa;;;;;;;wBAuCG,4BAA4B;;wBAwD5B,uBAAuB,SAAS;wBAkBhC,uBACd,SAAS,sBACT,4BACA;wBAqBc,iBAAiB,SAAS,uBAAuB,OAAO;wBAclD,YAAY,SAAS,uBAAuB"}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { runCaptured, runChecked, runInteractive } from "./process.mjs";
|
|
2
|
+
import { ADD_DIRECTORY_OPTION, AGIFLOW_PROXY_SERVER_NAME, MCP_CONFIG_OPTION, MCP_PRESTART_OPTION, MCP_PROXY_PACKAGE, PLUGINS_DIRECTORY, additionalDirectoryArgs, mcpProxyArguments } from "./shared.mjs";
|
|
3
|
+
import fs from "node:fs";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { spawnSync } from "node:child_process";
|
|
6
|
+
//#region src/cli/commands/compat/providers/codex.ts
|
|
7
|
+
const CODEX_PROVIDER = "codex";
|
|
8
|
+
const PROFILE_FLAG = "--profile";
|
|
9
|
+
const PROFILE_V2_FLAG = "--profile-v2";
|
|
10
|
+
const PROFILE_CONFIG_NAME_PATTERN = /^[A-Za-z0-9_-]+$/;
|
|
11
|
+
const SYNC_SCRIPT_RELATIVE_PATH = [
|
|
12
|
+
"tools",
|
|
13
|
+
"harness",
|
|
14
|
+
"sync-codex-state.cjs"
|
|
15
|
+
];
|
|
16
|
+
/** Codex options that consume the following argument, so it is not a subcommand. */
|
|
17
|
+
function optionRequiresValue(argument) {
|
|
18
|
+
return (/* @__PURE__ */ new Set([
|
|
19
|
+
PROFILE_FLAG,
|
|
20
|
+
PROFILE_V2_FLAG,
|
|
21
|
+
"-c",
|
|
22
|
+
MCP_CONFIG_OPTION,
|
|
23
|
+
"--enable",
|
|
24
|
+
"--disable",
|
|
25
|
+
"--remote",
|
|
26
|
+
"--remote-auth-token-env",
|
|
27
|
+
"-i",
|
|
28
|
+
"--image",
|
|
29
|
+
"-m",
|
|
30
|
+
"--model",
|
|
31
|
+
"--local-provider",
|
|
32
|
+
"-s",
|
|
33
|
+
"--sandbox",
|
|
34
|
+
"-C",
|
|
35
|
+
"--cd",
|
|
36
|
+
ADD_DIRECTORY_OPTION,
|
|
37
|
+
"-a",
|
|
38
|
+
"--ask-for-approval"
|
|
39
|
+
])).has(argument);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Whether the managed profile, persona, and proxy config apply to this run.
|
|
43
|
+
*
|
|
44
|
+
* Codex management subcommands reject session options, so injecting them would
|
|
45
|
+
* turn `codex login` into an error.
|
|
46
|
+
*/
|
|
47
|
+
function supportsCodexManagedProfile(args) {
|
|
48
|
+
let previousRequiresValue = false;
|
|
49
|
+
let command = "";
|
|
50
|
+
let debugSubcommand = "";
|
|
51
|
+
for (const argument of args) {
|
|
52
|
+
if (previousRequiresValue) {
|
|
53
|
+
previousRequiresValue = false;
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
if (optionRequiresValue(argument)) {
|
|
57
|
+
previousRequiresValue = true;
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
if (argument.startsWith("-")) continue;
|
|
61
|
+
if (!command) {
|
|
62
|
+
command = argument;
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
if (command === "debug" && !debugSubcommand) debugSubcommand = argument;
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
if (!command || [
|
|
69
|
+
"exec",
|
|
70
|
+
"e",
|
|
71
|
+
"review",
|
|
72
|
+
"resume",
|
|
73
|
+
"fork"
|
|
74
|
+
].includes(command)) return true;
|
|
75
|
+
if (command === "debug") return debugSubcommand === "prompt-input";
|
|
76
|
+
if ([
|
|
77
|
+
"login",
|
|
78
|
+
"logout",
|
|
79
|
+
"mcp",
|
|
80
|
+
"plugin",
|
|
81
|
+
"mcp-server",
|
|
82
|
+
"app-server",
|
|
83
|
+
"remote-control",
|
|
84
|
+
"app",
|
|
85
|
+
"completion",
|
|
86
|
+
"update",
|
|
87
|
+
"doctor",
|
|
88
|
+
"sandbox",
|
|
89
|
+
"apply",
|
|
90
|
+
"a",
|
|
91
|
+
"cloud",
|
|
92
|
+
"exec-server",
|
|
93
|
+
"features",
|
|
94
|
+
"archive",
|
|
95
|
+
"delete",
|
|
96
|
+
"unarchive",
|
|
97
|
+
"help"
|
|
98
|
+
].includes(command)) return false;
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
/** Plugin directory names relative to `plugins/`, which is all Codex accepts. */
|
|
102
|
+
function codexPluginDirectories(context) {
|
|
103
|
+
const pluginsRoot = path.join(context.options.repoRoot, PLUGINS_DIRECTORY);
|
|
104
|
+
return context.plugins.map((plugin) => {
|
|
105
|
+
const relative = path.relative(pluginsRoot, plugin.directory);
|
|
106
|
+
if (!relative || relative === ".." || relative.startsWith(`..${path.sep}`) || relative.includes(path.sep)) throw new Error(`Codex compatibility requires a direct repository plugin: ${plugin.directory}`);
|
|
107
|
+
return relative;
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/** Codex's full-auto mode: no approval prompts and no sandbox. */
|
|
111
|
+
const YOLO_OPTION = "--yolo";
|
|
112
|
+
function codexProxyArguments(context) {
|
|
113
|
+
return mcpProxyArguments(MCP_PROXY_PACKAGE, context.proxyConfigPath, true, true);
|
|
114
|
+
}
|
|
115
|
+
function codexCompatibilityArgs(context, managedProfileName, managedProfileFlag) {
|
|
116
|
+
const args = [
|
|
117
|
+
...context.options.skipPermissions ? [YOLO_OPTION] : [],
|
|
118
|
+
"--enable",
|
|
119
|
+
"hooks",
|
|
120
|
+
...additionalDirectoryArgs(context)
|
|
121
|
+
];
|
|
122
|
+
if (supportsCodexManagedProfile(context.options.providerArgs)) {
|
|
123
|
+
args.push(managedProfileFlag, managedProfileName);
|
|
124
|
+
if (context.personaFile) {
|
|
125
|
+
const persona = fs.readFileSync(context.personaFile, "utf8");
|
|
126
|
+
args.push("-c", `developer_instructions=${JSON.stringify(persona)}`);
|
|
127
|
+
}
|
|
128
|
+
if (context.mcpAllowlist) args.push("-c", `mcp_servers.${AGIFLOW_PROXY_SERVER_NAME}.args=${JSON.stringify(codexProxyArguments(context))}`);
|
|
129
|
+
}
|
|
130
|
+
return [...args, ...context.options.providerArgs];
|
|
131
|
+
}
|
|
132
|
+
function codexEnvironment(context) {
|
|
133
|
+
const environment = { ...context.environment };
|
|
134
|
+
const originResult = spawnSync("git", [
|
|
135
|
+
"-C",
|
|
136
|
+
context.options.repoRoot,
|
|
137
|
+
"remote",
|
|
138
|
+
"get-url",
|
|
139
|
+
"origin"
|
|
140
|
+
], {
|
|
141
|
+
encoding: "utf8",
|
|
142
|
+
env: environment
|
|
143
|
+
});
|
|
144
|
+
environment.CODEX_REPO_ORIGIN = originResult.status === 0 ? originResult.stdout.trim() : "";
|
|
145
|
+
environment.CODEX_PROFILE_NAMES = context.options.domains.join(",");
|
|
146
|
+
environment.CODEX_PLUGIN_DIRS = codexPluginDirectories(context).join(",");
|
|
147
|
+
environment.CODEX_ENABLE_XCODE_MCP = spawnSync("xcrun", ["mcpbridge", "--help"], {
|
|
148
|
+
env: environment,
|
|
149
|
+
stdio: "ignore"
|
|
150
|
+
}).status === 0 ? "1" : "0";
|
|
151
|
+
return environment;
|
|
152
|
+
}
|
|
153
|
+
async function launchCodex(context) {
|
|
154
|
+
const environment = codexEnvironment(context);
|
|
155
|
+
const syncScript = path.join(context.options.repoRoot, ...SYNC_SCRIPT_RELATIVE_PATH);
|
|
156
|
+
const stateName = runCaptured(process.execPath, [syncScript, "owner-key"], context.options.repoRoot, environment);
|
|
157
|
+
const home = environment.HOME;
|
|
158
|
+
environment.CODEX_LEGACY_HOME = home ? path.join(home, ".codex", "agirepo") : void 0;
|
|
159
|
+
environment.CODEX_HOME = home ? path.join(home, ".codex", stateName) : path.join(context.options.repoRoot, ".codex-local", "state", stateName);
|
|
160
|
+
runChecked("npx", [...mcpProxyArguments(MCP_PROXY_PACKAGE, context.proxyConfigPath, true), MCP_PRESTART_OPTION], context.options.repoRoot, environment);
|
|
161
|
+
const syncOutput = runCaptured(process.execPath, [syncScript, "sync"], context.options.repoRoot, environment);
|
|
162
|
+
const syncResult = JSON.parse(syncOutput);
|
|
163
|
+
if (typeof syncResult.profileConfigName !== "string" || !PROFILE_CONFIG_NAME_PATTERN.test(syncResult.profileConfigName)) throw new Error("Codex sync returned an invalid profile config name");
|
|
164
|
+
const profileFlag = runCaptured("codex", ["--help"], context.options.repoRoot, environment).includes(PROFILE_V2_FLAG) ? PROFILE_V2_FLAG : PROFILE_FLAG;
|
|
165
|
+
return runInteractive(CODEX_PROVIDER, codexCompatibilityArgs(context, syncResult.profileConfigName, profileFlag), context.options.repoRoot, environment);
|
|
166
|
+
}
|
|
167
|
+
//#endregion
|
|
168
|
+
export { CODEX_PROVIDER, codexCompatibilityArgs, codexEnvironment, codexPluginDirectories, launchCodex, supportsCodexManagedProfile };
|
|
169
|
+
|
|
170
|
+
//# sourceMappingURL=codex.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex.mjs","names":[],"sources":["../../../../../src/cli/commands/compat/providers/codex.ts"],"sourcesContent":["import { spawnSync } from 'node:child_process';\nimport fs from 'node:fs';\nimport path from 'node:path';\n\nimport type { JsonObject } from '@agimon-ai/doompi-core/runtime-json';\n\nimport type { CompatibilityContext } from '../context';\nimport { runCaptured, runChecked, runInteractive } from './process';\nimport {\n ADD_DIRECTORY_OPTION,\n AGIFLOW_PROXY_SERVER_NAME,\n additionalDirectoryArgs,\n MCP_CONFIG_OPTION,\n MCP_PRESTART_OPTION,\n MCP_PROXY_PACKAGE,\n mcpProxyArguments,\n NPX_COMMAND,\n PLUGINS_DIRECTORY,\n} from './shared';\n\nexport const CODEX_PROVIDER = 'codex';\n\nconst PROFILE_FLAG = '--profile';\nconst PROFILE_V2_FLAG = '--profile-v2';\nconst PROFILE_CONFIG_NAME_PATTERN = /^[A-Za-z0-9_-]+$/;\nconst SYNC_SCRIPT_RELATIVE_PATH = ['tools', 'harness', 'sync-codex-state.cjs'];\n\n/** Codex options that consume the following argument, so it is not a subcommand. */\nfunction optionRequiresValue(argument: string): boolean {\n return new Set([\n PROFILE_FLAG,\n PROFILE_V2_FLAG,\n '-c',\n MCP_CONFIG_OPTION,\n '--enable',\n '--disable',\n '--remote',\n '--remote-auth-token-env',\n '-i',\n '--image',\n '-m',\n '--model',\n '--local-provider',\n '-s',\n '--sandbox',\n '-C',\n '--cd',\n ADD_DIRECTORY_OPTION,\n '-a',\n '--ask-for-approval',\n ]).has(argument);\n}\n\n/**\n * Whether the managed profile, persona, and proxy config apply to this run.\n *\n * Codex management subcommands reject session options, so injecting them would\n * turn `codex login` into an error.\n */\nexport function supportsCodexManagedProfile(args: string[]): boolean {\n let previousRequiresValue = false;\n let command = '';\n let debugSubcommand = '';\n\n for (const argument of args) {\n if (previousRequiresValue) {\n previousRequiresValue = false;\n continue;\n }\n if (optionRequiresValue(argument)) {\n previousRequiresValue = true;\n continue;\n }\n if (argument.startsWith('-')) continue;\n if (!command) {\n command = argument;\n continue;\n }\n if (command === 'debug' && !debugSubcommand) debugSubcommand = argument;\n break;\n }\n\n if (!command || ['exec', 'e', 'review', 'resume', 'fork'].includes(command)) return true;\n if (command === 'debug') return debugSubcommand === 'prompt-input';\n if (\n [\n 'login',\n 'logout',\n 'mcp',\n 'plugin',\n 'mcp-server',\n 'app-server',\n 'remote-control',\n 'app',\n 'completion',\n 'update',\n 'doctor',\n 'sandbox',\n 'apply',\n 'a',\n 'cloud',\n 'exec-server',\n 'features',\n 'archive',\n 'delete',\n 'unarchive',\n 'help',\n ].includes(command)\n ) {\n return false;\n }\n return true;\n}\n\n/** Plugin directory names relative to `plugins/`, which is all Codex accepts. */\nexport function codexPluginDirectories(context: CompatibilityContext): string[] {\n const pluginsRoot = path.join(context.options.repoRoot, PLUGINS_DIRECTORY);\n return context.plugins.map((plugin) => {\n const relative = path.relative(pluginsRoot, plugin.directory);\n if (!relative || relative === '..' || relative.startsWith(`..${path.sep}`) || relative.includes(path.sep)) {\n throw new Error(`Codex compatibility requires a direct repository plugin: ${plugin.directory}`);\n }\n return relative;\n });\n}\n\n/** Codex's full-auto mode: no approval prompts and no sandbox. */\nconst YOLO_OPTION = '--yolo';\n\nfunction codexProxyArguments(context: CompatibilityContext): string[] {\n return mcpProxyArguments(MCP_PROXY_PACKAGE, context.proxyConfigPath, true, true);\n}\n\nexport function codexCompatibilityArgs(\n context: CompatibilityContext,\n managedProfileName: string,\n managedProfileFlag: string,\n): string[] {\n const args = [\n ...(context.options.skipPermissions ? [YOLO_OPTION] : []),\n '--enable',\n 'hooks',\n ...additionalDirectoryArgs(context),\n ];\n if (supportsCodexManagedProfile(context.options.providerArgs)) {\n args.push(managedProfileFlag, managedProfileName);\n if (context.personaFile) {\n const persona = fs.readFileSync(context.personaFile, 'utf8');\n args.push('-c', `developer_instructions=${JSON.stringify(persona)}`);\n }\n if (context.mcpAllowlist) {\n args.push('-c', `mcp_servers.${AGIFLOW_PROXY_SERVER_NAME}.args=${JSON.stringify(codexProxyArguments(context))}`);\n }\n }\n return [...args, ...context.options.providerArgs];\n}\n\nexport function codexEnvironment(context: CompatibilityContext): NodeJS.ProcessEnv {\n const environment = { ...context.environment };\n const originResult = spawnSync('git', ['-C', context.options.repoRoot, 'remote', 'get-url', 'origin'], {\n encoding: 'utf8',\n env: environment,\n });\n environment.CODEX_REPO_ORIGIN = originResult.status === 0 ? originResult.stdout.trim() : '';\n environment.CODEX_PROFILE_NAMES = context.options.domains.join(',');\n environment.CODEX_PLUGIN_DIRS = codexPluginDirectories(context).join(',');\n environment.CODEX_ENABLE_XCODE_MCP =\n spawnSync('xcrun', ['mcpbridge', '--help'], { env: environment, stdio: 'ignore' }).status === 0 ? '1' : '0';\n return environment;\n}\n\nexport async function launchCodex(context: CompatibilityContext): Promise<number> {\n const environment = codexEnvironment(context);\n const syncScript = path.join(context.options.repoRoot, ...SYNC_SCRIPT_RELATIVE_PATH);\n const stateName = runCaptured(process.execPath, [syncScript, 'owner-key'], context.options.repoRoot, environment);\n const home = environment.HOME;\n environment.CODEX_LEGACY_HOME = home ? path.join(home, '.codex', 'agirepo') : undefined;\n environment.CODEX_HOME = home\n ? path.join(home, '.codex', stateName)\n : path.join(context.options.repoRoot, '.codex-local', 'state', stateName);\n\n runChecked(\n NPX_COMMAND,\n [...mcpProxyArguments(MCP_PROXY_PACKAGE, context.proxyConfigPath, true), MCP_PRESTART_OPTION],\n context.options.repoRoot,\n environment,\n );\n\n const syncOutput = runCaptured(process.execPath, [syncScript, 'sync'], context.options.repoRoot, environment);\n const syncResult = JSON.parse(syncOutput) as JsonObject;\n if (\n typeof syncResult.profileConfigName !== 'string' ||\n !PROFILE_CONFIG_NAME_PATTERN.test(syncResult.profileConfigName)\n ) {\n throw new Error('Codex sync returned an invalid profile config name');\n }\n // Older Codex builds only understand --profile, so the flag is probed rather\n // than assumed.\n const help = runCaptured(CODEX_PROVIDER, ['--help'], context.options.repoRoot, environment);\n const profileFlag = help.includes(PROFILE_V2_FLAG) ? PROFILE_V2_FLAG : PROFILE_FLAG;\n return runInteractive(\n CODEX_PROVIDER,\n codexCompatibilityArgs(context, syncResult.profileConfigName, profileFlag),\n context.options.repoRoot,\n environment,\n );\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
const require_process = require("./process.cjs");
|
|
2
|
+
const require_shared = require("./shared.cjs");
|
|
3
|
+
const require_antigravity = require("./antigravity.cjs");
|
|
4
|
+
const require_codex = require("./codex.cjs");
|
|
5
|
+
//#region src/cli/commands/compat/providers/index.ts
|
|
6
|
+
const CLAUDE_PROVIDER = "claude";
|
|
7
|
+
/** The DoomPi-side flag that asks for the bypass, quoted back in the warning. */
|
|
8
|
+
const SKIP_PERMISSIONS_REQUEST_OPTION = "--skip-permissions";
|
|
9
|
+
const PLUGIN_DIRECTORY_OPTION = "--plugin-dir";
|
|
10
|
+
const MCP_CONFIG_OPTION = "--mcp-config";
|
|
11
|
+
const STRICT_MCP_CONFIG_OPTION = "--strict-mcp-config";
|
|
12
|
+
const APPEND_SYSTEM_PROMPT_FILE_OPTION = "--append-system-prompt-file";
|
|
13
|
+
/**
|
|
14
|
+
* Claude needs no state sync: everything it reads is passed as an argument, so
|
|
15
|
+
* a run leaves nothing behind to revert.
|
|
16
|
+
*/
|
|
17
|
+
function claudeCompatibilityArgs(context) {
|
|
18
|
+
const args = context.options.skipPermissions ? [require_shared.SKIP_PERMISSIONS_OPTION] : [];
|
|
19
|
+
for (const plugin of context.plugins) args.push(PLUGIN_DIRECTORY_OPTION, plugin.directory);
|
|
20
|
+
if (context.mcpAllowlist) args.push(MCP_CONFIG_OPTION, context.mcpConfigPath, STRICT_MCP_CONFIG_OPTION);
|
|
21
|
+
if (context.personaFile) args.push(APPEND_SYSTEM_PROMPT_FILE_OPTION, context.personaFile);
|
|
22
|
+
args.push(...require_shared.additionalDirectoryArgs(context));
|
|
23
|
+
return [...args, ...context.options.providerArgs];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* One line on stderr, once per run, naming the frontend whose gate is off.
|
|
27
|
+
*
|
|
28
|
+
* The bypass is invisible in the child's own UI: the frontend simply stops
|
|
29
|
+
* asking. Announcing it here is the only point where the user learns that the
|
|
30
|
+
* absence of prompts was DoomPi's doing and not the frontend's default.
|
|
31
|
+
*/
|
|
32
|
+
function warnPermissionsBypassed(provider) {
|
|
33
|
+
process.stderr.write(`[doompi] ${SKIP_PERMISSIONS_REQUEST_OPTION}: approval prompts are disabled for this ${provider} run.\n`);
|
|
34
|
+
}
|
|
35
|
+
async function launchCompatibility(context) {
|
|
36
|
+
const provider = context.options.provider;
|
|
37
|
+
if (context.options.skipPermissions) warnPermissionsBypassed(provider);
|
|
38
|
+
if (provider === CLAUDE_PROVIDER) return require_process.runInteractive(CLAUDE_PROVIDER, claudeCompatibilityArgs(context), context.options.currentDirectory, context.environment);
|
|
39
|
+
if (provider === "codex") return require_codex.launchCodex(context);
|
|
40
|
+
return require_antigravity.launchAntigravity(context);
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
exports.acquireDirectoryLock = require_process.acquireDirectoryLock;
|
|
44
|
+
exports.adaptAntigravityMcpDefinition = require_antigravity.adaptAntigravityMcpDefinition;
|
|
45
|
+
exports.antigravityCompatibilityArgs = require_antigravity.antigravityCompatibilityArgs;
|
|
46
|
+
exports.claudeCompatibilityArgs = claudeCompatibilityArgs;
|
|
47
|
+
exports.codexCompatibilityArgs = require_codex.codexCompatibilityArgs;
|
|
48
|
+
exports.codexEnvironment = require_codex.codexEnvironment;
|
|
49
|
+
exports.codexPluginDirectories = require_codex.codexPluginDirectories;
|
|
50
|
+
exports.forwardSignals = require_process.forwardSignals;
|
|
51
|
+
exports.isFileSystemError = require_process.isFileSystemError;
|
|
52
|
+
exports.launchAntigravity = require_antigravity.launchAntigravity;
|
|
53
|
+
exports.launchCodex = require_codex.launchCodex;
|
|
54
|
+
exports.launchCompatibility = launchCompatibility;
|
|
55
|
+
exports.lockOwnerIsRunning = require_process.lockOwnerIsRunning;
|
|
56
|
+
exports.mcpProxyArguments = require_shared.mcpProxyArguments;
|
|
57
|
+
exports.pathInside = require_process.pathInside;
|
|
58
|
+
exports.runCaptured = require_process.runCaptured;
|
|
59
|
+
exports.runChecked = require_process.runChecked;
|
|
60
|
+
exports.runInteractive = require_process.runInteractive;
|
|
61
|
+
exports.signalExitCode = require_process.signalExitCode;
|
|
62
|
+
exports.supportsCodexManagedProfile = require_codex.supportsCodexManagedProfile;
|
|
63
|
+
exports.waitForExit = require_process.waitForExit;
|
|
64
|
+
|
|
65
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["SKIP_PERMISSIONS_OPTION","additionalDirectoryArgs","runInteractive","launchCodex","launchAntigravity"],"sources":["../../../../../src/cli/commands/compat/providers/index.ts"],"sourcesContent":["import type { CompatibilityContext } from '../context';\nimport type { CompatibilityProvider } from '../types';\nimport { launchAntigravity } from './antigravity';\nimport { CODEX_PROVIDER, launchCodex } from './codex';\nimport { runInteractive } from './process';\nimport { additionalDirectoryArgs, SKIP_PERMISSIONS_OPTION } from './shared';\n\nexport { adaptAntigravityMcpDefinition, antigravityCompatibilityArgs, launchAntigravity } from './antigravity';\nexport {\n codexCompatibilityArgs,\n codexEnvironment,\n codexPluginDirectories,\n launchCodex,\n supportsCodexManagedProfile,\n} from './codex';\nexport {\n acquireDirectoryLock,\n forwardSignals,\n isFileSystemError,\n lockOwnerIsRunning,\n pathInside,\n runCaptured,\n runChecked,\n runInteractive,\n signalExitCode,\n waitForExit,\n} from './process';\nexport { mcpProxyArguments } from './shared';\n\nconst CLAUDE_PROVIDER = 'claude';\n/** The DoomPi-side flag that asks for the bypass, quoted back in the warning. */\nconst SKIP_PERMISSIONS_REQUEST_OPTION = '--skip-permissions';\nconst PLUGIN_DIRECTORY_OPTION = '--plugin-dir';\nconst MCP_CONFIG_OPTION = '--mcp-config';\nconst STRICT_MCP_CONFIG_OPTION = '--strict-mcp-config';\nconst APPEND_SYSTEM_PROMPT_FILE_OPTION = '--append-system-prompt-file';\n\n/**\n * Claude needs no state sync: everything it reads is passed as an argument, so\n * a run leaves nothing behind to revert.\n */\nexport function claudeCompatibilityArgs(context: CompatibilityContext): string[] {\n const args = context.options.skipPermissions ? [SKIP_PERMISSIONS_OPTION] : [];\n for (const plugin of context.plugins) args.push(PLUGIN_DIRECTORY_OPTION, plugin.directory);\n if (context.mcpAllowlist) args.push(MCP_CONFIG_OPTION, context.mcpConfigPath, STRICT_MCP_CONFIG_OPTION);\n if (context.personaFile) args.push(APPEND_SYSTEM_PROMPT_FILE_OPTION, context.personaFile);\n args.push(...additionalDirectoryArgs(context));\n return [...args, ...context.options.providerArgs];\n}\n\n/**\n * One line on stderr, once per run, naming the frontend whose gate is off.\n *\n * The bypass is invisible in the child's own UI: the frontend simply stops\n * asking. Announcing it here is the only point where the user learns that the\n * absence of prompts was DoomPi's doing and not the frontend's default.\n */\nfunction warnPermissionsBypassed(provider: CompatibilityProvider): void {\n process.stderr.write(\n `[doompi] ${SKIP_PERMISSIONS_REQUEST_OPTION}: approval prompts are disabled for this ${provider} run.\\n`,\n );\n}\n\nexport async function launchCompatibility(context: CompatibilityContext): Promise<number> {\n const provider: CompatibilityProvider = context.options.provider;\n if (context.options.skipPermissions) warnPermissionsBypassed(provider);\n if (provider === CLAUDE_PROVIDER) {\n return runInteractive(\n CLAUDE_PROVIDER,\n claudeCompatibilityArgs(context),\n context.options.currentDirectory,\n context.environment,\n );\n }\n if (provider === CODEX_PROVIDER) return launchCodex(context);\n return launchAntigravity(context);\n}\n"],"mappings":";;;;;AA6BA,MAAM,kBAAkB;;AAExB,MAAM,kCAAkC;AACxC,MAAM,0BAA0B;AAChC,MAAM,oBAAoB;AAC1B,MAAM,2BAA2B;AACjC,MAAM,mCAAmC;;;;;AAMzC,SAAgB,wBAAwB,SAAyC;CAC/E,MAAM,OAAO,QAAQ,QAAQ,kBAAkB,CAACA,eAAAA,uBAAuB,IAAI,CAAC;CAC5E,KAAK,MAAM,UAAU,QAAQ,SAAS,KAAK,KAAK,yBAAyB,OAAO,SAAS;CACzF,IAAI,QAAQ,cAAc,KAAK,KAAK,mBAAmB,QAAQ,eAAe,wBAAwB;CACtG,IAAI,QAAQ,aAAa,KAAK,KAAK,kCAAkC,QAAQ,WAAW;CACxF,KAAK,KAAK,GAAGC,eAAAA,wBAAwB,OAAO,CAAC;CAC7C,OAAO,CAAC,GAAG,MAAM,GAAG,QAAQ,QAAQ,YAAY;AAClD;;;;;;;;AASA,SAAS,wBAAwB,UAAuC;CACtE,QAAQ,OAAO,MACb,YAAY,gCAAgC,2CAA2C,SAAS,QAClG;AACF;AAEA,eAAsB,oBAAoB,SAAgD;CACxF,MAAM,WAAkC,QAAQ,QAAQ;CACxD,IAAI,QAAQ,QAAQ,iBAAiB,wBAAwB,QAAQ;CACrE,IAAI,aAAa,iBACf,OAAOC,gBAAAA,eACL,iBACA,wBAAwB,OAAO,GAC/B,QAAQ,QAAQ,kBAChB,QAAQ,WACV;CAEF,IAAI,aAAA,SAA6B,OAAOC,cAAAA,YAAY,OAAO;CAC3D,OAAOC,oBAAAA,kBAAkB,OAAO;AAClC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CompatibilityContext } from "../context.cjs";
|
|
2
|
+
import { adaptAntigravityMcpDefinition, antigravityCompatibilityArgs, launchAntigravity } from "./antigravity.cjs";
|
|
3
|
+
import { codexCompatibilityArgs, codexEnvironment, codexPluginDirectories, launchCodex, supportsCodexManagedProfile } from "./codex.cjs";
|
|
4
|
+
import { acquireDirectoryLock, forwardSignals, isFileSystemError, lockOwnerIsRunning, pathInside, runCaptured, runChecked, runInteractive, signalExitCode, waitForExit } from "./process.cjs";
|
|
5
|
+
import { mcpProxyArguments } from "./shared.cjs";
|
|
6
|
+
//#region src/cli/commands/compat/providers/index.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Claude needs no state sync: everything it reads is passed as an argument, so
|
|
9
|
+
* a run leaves nothing behind to revert.
|
|
10
|
+
*/
|
|
11
|
+
export declare function claudeCompatibilityArgs(context: CompatibilityContext): string[];
|
|
12
|
+
export declare function launchCompatibility(context: CompatibilityContext): Promise<number>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { acquireDirectoryLock, adaptAntigravityMcpDefinition, antigravityCompatibilityArgs, codexCompatibilityArgs, codexEnvironment, codexPluginDirectories, forwardSignals, isFileSystemError, launchAntigravity, launchCodex, lockOwnerIsRunning, mcpProxyArguments, pathInside, runCaptured, runChecked, runInteractive, signalExitCode, supportsCodexManagedProfile, waitForExit };
|
|
15
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../../../src/cli/commands/compat/providers/index.ts"],"mappings":";;;;;;;;;;wBAyCgB,wBAAwB,SAAS;wBAsB3B,oBAAoB,SAAS,uBAAuB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CompatibilityContext } from "../context.mjs";
|
|
2
|
+
import { adaptAntigravityMcpDefinition, antigravityCompatibilityArgs, launchAntigravity } from "./antigravity.mjs";
|
|
3
|
+
import { codexCompatibilityArgs, codexEnvironment, codexPluginDirectories, launchCodex, supportsCodexManagedProfile } from "./codex.mjs";
|
|
4
|
+
import { acquireDirectoryLock, forwardSignals, isFileSystemError, lockOwnerIsRunning, pathInside, runCaptured, runChecked, runInteractive, signalExitCode, waitForExit } from "./process.mjs";
|
|
5
|
+
import { mcpProxyArguments } from "./shared.mjs";
|
|
6
|
+
//#region src/cli/commands/compat/providers/index.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Claude needs no state sync: everything it reads is passed as an argument, so
|
|
9
|
+
* a run leaves nothing behind to revert.
|
|
10
|
+
*/
|
|
11
|
+
export declare function claudeCompatibilityArgs(context: CompatibilityContext): string[];
|
|
12
|
+
export declare function launchCompatibility(context: CompatibilityContext): Promise<number>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { acquireDirectoryLock, adaptAntigravityMcpDefinition, antigravityCompatibilityArgs, codexCompatibilityArgs, codexEnvironment, codexPluginDirectories, forwardSignals, isFileSystemError, launchAntigravity, launchCodex, lockOwnerIsRunning, mcpProxyArguments, pathInside, runCaptured, runChecked, runInteractive, signalExitCode, supportsCodexManagedProfile, waitForExit };
|
|
15
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../../src/cli/commands/compat/providers/index.ts"],"mappings":";;;;;;;;;;wBAyCgB,wBAAwB,SAAS;wBAsB3B,oBAAoB,SAAS,uBAAuB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { acquireDirectoryLock, forwardSignals, isFileSystemError, lockOwnerIsRunning, pathInside, runCaptured, runChecked, runInteractive, signalExitCode, waitForExit } from "./process.mjs";
|
|
2
|
+
import { SKIP_PERMISSIONS_OPTION, additionalDirectoryArgs, mcpProxyArguments } from "./shared.mjs";
|
|
3
|
+
import { adaptAntigravityMcpDefinition, antigravityCompatibilityArgs, launchAntigravity } from "./antigravity.mjs";
|
|
4
|
+
import { codexCompatibilityArgs, codexEnvironment, codexPluginDirectories, launchCodex, supportsCodexManagedProfile } from "./codex.mjs";
|
|
5
|
+
//#region src/cli/commands/compat/providers/index.ts
|
|
6
|
+
const CLAUDE_PROVIDER = "claude";
|
|
7
|
+
/** The DoomPi-side flag that asks for the bypass, quoted back in the warning. */
|
|
8
|
+
const SKIP_PERMISSIONS_REQUEST_OPTION = "--skip-permissions";
|
|
9
|
+
const PLUGIN_DIRECTORY_OPTION = "--plugin-dir";
|
|
10
|
+
const MCP_CONFIG_OPTION = "--mcp-config";
|
|
11
|
+
const STRICT_MCP_CONFIG_OPTION = "--strict-mcp-config";
|
|
12
|
+
const APPEND_SYSTEM_PROMPT_FILE_OPTION = "--append-system-prompt-file";
|
|
13
|
+
/**
|
|
14
|
+
* Claude needs no state sync: everything it reads is passed as an argument, so
|
|
15
|
+
* a run leaves nothing behind to revert.
|
|
16
|
+
*/
|
|
17
|
+
function claudeCompatibilityArgs(context) {
|
|
18
|
+
const args = context.options.skipPermissions ? [SKIP_PERMISSIONS_OPTION] : [];
|
|
19
|
+
for (const plugin of context.plugins) args.push(PLUGIN_DIRECTORY_OPTION, plugin.directory);
|
|
20
|
+
if (context.mcpAllowlist) args.push(MCP_CONFIG_OPTION, context.mcpConfigPath, STRICT_MCP_CONFIG_OPTION);
|
|
21
|
+
if (context.personaFile) args.push(APPEND_SYSTEM_PROMPT_FILE_OPTION, context.personaFile);
|
|
22
|
+
args.push(...additionalDirectoryArgs(context));
|
|
23
|
+
return [...args, ...context.options.providerArgs];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* One line on stderr, once per run, naming the frontend whose gate is off.
|
|
27
|
+
*
|
|
28
|
+
* The bypass is invisible in the child's own UI: the frontend simply stops
|
|
29
|
+
* asking. Announcing it here is the only point where the user learns that the
|
|
30
|
+
* absence of prompts was DoomPi's doing and not the frontend's default.
|
|
31
|
+
*/
|
|
32
|
+
function warnPermissionsBypassed(provider) {
|
|
33
|
+
process.stderr.write(`[doompi] ${SKIP_PERMISSIONS_REQUEST_OPTION}: approval prompts are disabled for this ${provider} run.\n`);
|
|
34
|
+
}
|
|
35
|
+
async function launchCompatibility(context) {
|
|
36
|
+
const provider = context.options.provider;
|
|
37
|
+
if (context.options.skipPermissions) warnPermissionsBypassed(provider);
|
|
38
|
+
if (provider === CLAUDE_PROVIDER) return runInteractive(CLAUDE_PROVIDER, claudeCompatibilityArgs(context), context.options.currentDirectory, context.environment);
|
|
39
|
+
if (provider === "codex") return launchCodex(context);
|
|
40
|
+
return launchAntigravity(context);
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { acquireDirectoryLock, adaptAntigravityMcpDefinition, antigravityCompatibilityArgs, claudeCompatibilityArgs, codexCompatibilityArgs, codexEnvironment, codexPluginDirectories, forwardSignals, isFileSystemError, launchAntigravity, launchCodex, launchCompatibility, lockOwnerIsRunning, mcpProxyArguments, pathInside, runCaptured, runChecked, runInteractive, signalExitCode, supportsCodexManagedProfile, waitForExit };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../src/cli/commands/compat/providers/index.ts"],"sourcesContent":["import type { CompatibilityContext } from '../context';\nimport type { CompatibilityProvider } from '../types';\nimport { launchAntigravity } from './antigravity';\nimport { CODEX_PROVIDER, launchCodex } from './codex';\nimport { runInteractive } from './process';\nimport { additionalDirectoryArgs, SKIP_PERMISSIONS_OPTION } from './shared';\n\nexport { adaptAntigravityMcpDefinition, antigravityCompatibilityArgs, launchAntigravity } from './antigravity';\nexport {\n codexCompatibilityArgs,\n codexEnvironment,\n codexPluginDirectories,\n launchCodex,\n supportsCodexManagedProfile,\n} from './codex';\nexport {\n acquireDirectoryLock,\n forwardSignals,\n isFileSystemError,\n lockOwnerIsRunning,\n pathInside,\n runCaptured,\n runChecked,\n runInteractive,\n signalExitCode,\n waitForExit,\n} from './process';\nexport { mcpProxyArguments } from './shared';\n\nconst CLAUDE_PROVIDER = 'claude';\n/** The DoomPi-side flag that asks for the bypass, quoted back in the warning. */\nconst SKIP_PERMISSIONS_REQUEST_OPTION = '--skip-permissions';\nconst PLUGIN_DIRECTORY_OPTION = '--plugin-dir';\nconst MCP_CONFIG_OPTION = '--mcp-config';\nconst STRICT_MCP_CONFIG_OPTION = '--strict-mcp-config';\nconst APPEND_SYSTEM_PROMPT_FILE_OPTION = '--append-system-prompt-file';\n\n/**\n * Claude needs no state sync: everything it reads is passed as an argument, so\n * a run leaves nothing behind to revert.\n */\nexport function claudeCompatibilityArgs(context: CompatibilityContext): string[] {\n const args = context.options.skipPermissions ? [SKIP_PERMISSIONS_OPTION] : [];\n for (const plugin of context.plugins) args.push(PLUGIN_DIRECTORY_OPTION, plugin.directory);\n if (context.mcpAllowlist) args.push(MCP_CONFIG_OPTION, context.mcpConfigPath, STRICT_MCP_CONFIG_OPTION);\n if (context.personaFile) args.push(APPEND_SYSTEM_PROMPT_FILE_OPTION, context.personaFile);\n args.push(...additionalDirectoryArgs(context));\n return [...args, ...context.options.providerArgs];\n}\n\n/**\n * One line on stderr, once per run, naming the frontend whose gate is off.\n *\n * The bypass is invisible in the child's own UI: the frontend simply stops\n * asking. Announcing it here is the only point where the user learns that the\n * absence of prompts was DoomPi's doing and not the frontend's default.\n */\nfunction warnPermissionsBypassed(provider: CompatibilityProvider): void {\n process.stderr.write(\n `[doompi] ${SKIP_PERMISSIONS_REQUEST_OPTION}: approval prompts are disabled for this ${provider} run.\\n`,\n );\n}\n\nexport async function launchCompatibility(context: CompatibilityContext): Promise<number> {\n const provider: CompatibilityProvider = context.options.provider;\n if (context.options.skipPermissions) warnPermissionsBypassed(provider);\n if (provider === CLAUDE_PROVIDER) {\n return runInteractive(\n CLAUDE_PROVIDER,\n claudeCompatibilityArgs(context),\n context.options.currentDirectory,\n context.environment,\n );\n }\n if (provider === CODEX_PROVIDER) return launchCodex(context);\n return launchAntigravity(context);\n}\n"],"mappings":";;;;;AA6BA,MAAM,kBAAkB;;AAExB,MAAM,kCAAkC;AACxC,MAAM,0BAA0B;AAChC,MAAM,oBAAoB;AAC1B,MAAM,2BAA2B;AACjC,MAAM,mCAAmC;;;;;AAMzC,SAAgB,wBAAwB,SAAyC;CAC/E,MAAM,OAAO,QAAQ,QAAQ,kBAAkB,CAAC,uBAAuB,IAAI,CAAC;CAC5E,KAAK,MAAM,UAAU,QAAQ,SAAS,KAAK,KAAK,yBAAyB,OAAO,SAAS;CACzF,IAAI,QAAQ,cAAc,KAAK,KAAK,mBAAmB,QAAQ,eAAe,wBAAwB;CACtG,IAAI,QAAQ,aAAa,KAAK,KAAK,kCAAkC,QAAQ,WAAW;CACxF,KAAK,KAAK,GAAG,wBAAwB,OAAO,CAAC;CAC7C,OAAO,CAAC,GAAG,MAAM,GAAG,QAAQ,QAAQ,YAAY;AAClD;;;;;;;;AASA,SAAS,wBAAwB,UAAuC;CACtE,QAAQ,OAAO,MACb,YAAY,gCAAgC,2CAA2C,SAAS,QAClG;AACF;AAEA,eAAsB,oBAAoB,SAAgD;CACxF,MAAM,WAAkC,QAAQ,QAAQ;CACxD,IAAI,QAAQ,QAAQ,iBAAiB,wBAAwB,QAAQ;CACrE,IAAI,aAAa,iBACf,OAAO,eACL,iBACA,wBAAwB,OAAO,GAC/B,QAAQ,QAAQ,kBAChB,QAAQ,WACV;CAEF,IAAI,aAAA,SAA6B,OAAO,YAAY,OAAO;CAC3D,OAAO,kBAAkB,OAAO;AAClC"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
const require_runtime = require("../../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
let node_fs = require("node:fs");
|
|
3
|
+
node_fs = require_runtime.__toESM(node_fs, 1);
|
|
4
|
+
let node_path = require("node:path");
|
|
5
|
+
node_path = require_runtime.__toESM(node_path, 1);
|
|
6
|
+
let node_os = require("node:os");
|
|
7
|
+
let _agimon_ai_doompi_core_runtime_json = require("@agimon-ai/doompi-core/runtime-json");
|
|
8
|
+
let node_child_process = require("node:child_process");
|
|
9
|
+
let node_timers_promises = require("node:timers/promises");
|
|
10
|
+
let cross_spawn = require("cross-spawn");
|
|
11
|
+
cross_spawn = require_runtime.__toESM(cross_spawn, 1);
|
|
12
|
+
//#region src/cli/commands/compat/providers/process.ts
|
|
13
|
+
/**
|
|
14
|
+
* Child process and cross-repository locking primitives.
|
|
15
|
+
*
|
|
16
|
+
* Shared by every compatibility provider and by the Pi launch command, so that
|
|
17
|
+
* signal forwarding behaves the same however the harness starts a child.
|
|
18
|
+
*/
|
|
19
|
+
const FORWARDED_SIGNALS = [
|
|
20
|
+
"SIGINT",
|
|
21
|
+
"SIGTERM",
|
|
22
|
+
"SIGHUP",
|
|
23
|
+
"SIGQUIT"
|
|
24
|
+
];
|
|
25
|
+
const SIGNAL_EXIT_CODE_OFFSET = 128;
|
|
26
|
+
const UNKNOWN_SIGNAL_EXIT_CODE = 1;
|
|
27
|
+
const LOCK_RETRY_MS = 25;
|
|
28
|
+
const LOCK_STALE_MS = 1e4;
|
|
29
|
+
const LOCK_TIMEOUT_MS = 3e4;
|
|
30
|
+
const FILE_EXISTS_ERROR = "EEXIST";
|
|
31
|
+
const FILE_NOT_FOUND_ERROR = "ENOENT";
|
|
32
|
+
const PROCESS_NOT_FOUND_ERROR = "ESRCH";
|
|
33
|
+
const LOCK_OWNER_FILENAME = "owner.json";
|
|
34
|
+
/** Runs a command and returns its trimmed stdout, throwing on a non-zero exit. */
|
|
35
|
+
function runCaptured(command, args, cwd, environment) {
|
|
36
|
+
const result = (0, node_child_process.spawnSync)(command, args, {
|
|
37
|
+
cwd,
|
|
38
|
+
encoding: "utf8",
|
|
39
|
+
env: environment
|
|
40
|
+
});
|
|
41
|
+
if (result.error) throw result.error;
|
|
42
|
+
if (result.stderr) process.stderr.write(result.stderr);
|
|
43
|
+
if (result.status !== 0) throw new Error(`${command} exited with status ${result.status ?? 1}`);
|
|
44
|
+
return result.stdout.trim();
|
|
45
|
+
}
|
|
46
|
+
/** Runs a command with inherited stdio, throwing on a non-zero exit. */
|
|
47
|
+
function runChecked(command, args, cwd, environment) {
|
|
48
|
+
const result = (0, node_child_process.spawnSync)(command, args, {
|
|
49
|
+
cwd,
|
|
50
|
+
env: environment,
|
|
51
|
+
stdio: "inherit"
|
|
52
|
+
});
|
|
53
|
+
if (result.error) throw result.error;
|
|
54
|
+
if (result.status !== 0) throw new Error(`${command} exited with status ${result.status ?? 1}`);
|
|
55
|
+
}
|
|
56
|
+
/** The conventional 128+n exit code for a child killed by a signal. */
|
|
57
|
+
function signalExitCode(signal) {
|
|
58
|
+
if (!signal) return UNKNOWN_SIGNAL_EXIT_CODE;
|
|
59
|
+
const signalNumber = node_os.constants.signals[signal];
|
|
60
|
+
return signalNumber ? SIGNAL_EXIT_CODE_OFFSET + signalNumber : UNKNOWN_SIGNAL_EXIT_CODE;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Runs an interactive child, forwarding terminal signals for its lifetime.
|
|
64
|
+
*
|
|
65
|
+
* Listeners are registered with `on` rather than `once` so a second Ctrl-C still
|
|
66
|
+
* reaches the child, and removed in a finally so repeated launches in one
|
|
67
|
+
* process do not accumulate handlers.
|
|
68
|
+
*/
|
|
69
|
+
function forwardSignals(child) {
|
|
70
|
+
const forward = (signal) => {
|
|
71
|
+
if (child.exitCode === null && child.signalCode === null) child.kill(signal);
|
|
72
|
+
};
|
|
73
|
+
for (const signal of FORWARDED_SIGNALS) process.on(signal, forward);
|
|
74
|
+
return () => {
|
|
75
|
+
for (const signal of FORWARDED_SIGNALS) process.removeListener(signal, forward);
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
/** Resolves with the child's exit code, or the conventional code for its signal. */
|
|
79
|
+
function waitForExit(child) {
|
|
80
|
+
return new Promise((resolve, reject) => {
|
|
81
|
+
child.once("error", reject);
|
|
82
|
+
child.once("exit", (code, signal) => resolve(code ?? signalExitCode(signal)));
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
async function runInteractive(command, args, cwd, environment) {
|
|
86
|
+
const child = (0, cross_spawn.default)(command, args, {
|
|
87
|
+
cwd,
|
|
88
|
+
env: environment,
|
|
89
|
+
stdio: "inherit"
|
|
90
|
+
});
|
|
91
|
+
const stopForwarding = forwardSignals(child);
|
|
92
|
+
try {
|
|
93
|
+
return await waitForExit(child);
|
|
94
|
+
} finally {
|
|
95
|
+
stopForwarding();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function isFileSystemError(error) {
|
|
99
|
+
return error instanceof Error && typeof error.code === "string";
|
|
100
|
+
}
|
|
101
|
+
/** True when the recorded lock owner is still a live process. */
|
|
102
|
+
function lockOwnerIsRunning(lockPath) {
|
|
103
|
+
const owner = (0, _agimon_ai_doompi_core_runtime_json.readJson)(node_path.default.join(lockPath, LOCK_OWNER_FILENAME));
|
|
104
|
+
if (typeof owner.pid !== "number" || !Number.isSafeInteger(owner.pid) || owner.pid <= 0) return false;
|
|
105
|
+
try {
|
|
106
|
+
process.kill(owner.pid, 0);
|
|
107
|
+
return true;
|
|
108
|
+
} catch (error) {
|
|
109
|
+
return !isFileSystemError(error) || error.code !== PROCESS_NOT_FOUND_ERROR;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Takes an exclusive lock by creating a directory, which is atomic everywhere.
|
|
114
|
+
*
|
|
115
|
+
* A lock older than the stale window whose owner is gone is reclaimed, so a
|
|
116
|
+
* harness killed mid-sync cannot block every other repository forever.
|
|
117
|
+
*/
|
|
118
|
+
async function acquireDirectoryLock(lockPath) {
|
|
119
|
+
node_fs.default.mkdirSync(node_path.default.dirname(lockPath), { recursive: true });
|
|
120
|
+
const startedAt = Date.now();
|
|
121
|
+
while (true) try {
|
|
122
|
+
await node_fs.default.promises.mkdir(lockPath);
|
|
123
|
+
try {
|
|
124
|
+
(0, _agimon_ai_doompi_core_runtime_json.writeJson)(node_path.default.join(lockPath, LOCK_OWNER_FILENAME), { pid: process.pid });
|
|
125
|
+
} catch (error) {
|
|
126
|
+
await node_fs.default.promises.rm(lockPath, {
|
|
127
|
+
recursive: true,
|
|
128
|
+
force: true
|
|
129
|
+
});
|
|
130
|
+
throw error;
|
|
131
|
+
}
|
|
132
|
+
return () => node_fs.default.promises.rm(lockPath, {
|
|
133
|
+
recursive: true,
|
|
134
|
+
force: true
|
|
135
|
+
});
|
|
136
|
+
} catch (error) {
|
|
137
|
+
if (!isFileSystemError(error) || error.code !== FILE_EXISTS_ERROR) throw error;
|
|
138
|
+
try {
|
|
139
|
+
const stat = await node_fs.default.promises.stat(lockPath);
|
|
140
|
+
if (Date.now() - stat.mtimeMs >= LOCK_STALE_MS && !lockOwnerIsRunning(lockPath)) {
|
|
141
|
+
await node_fs.default.promises.rm(lockPath, {
|
|
142
|
+
recursive: true,
|
|
143
|
+
force: true
|
|
144
|
+
});
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
} catch (statError) {
|
|
148
|
+
if (isFileSystemError(statError) && statError.code === FILE_NOT_FOUND_ERROR) continue;
|
|
149
|
+
throw statError;
|
|
150
|
+
}
|
|
151
|
+
if (Date.now() - startedAt >= LOCK_TIMEOUT_MS) throw new Error(`Timed out waiting for Antigravity state lock: ${lockPath}`);
|
|
152
|
+
await (0, node_timers_promises.setTimeout)(LOCK_RETRY_MS);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
/** True when `candidate` is `root` itself or sits underneath it. */
|
|
156
|
+
function pathInside(root, candidate) {
|
|
157
|
+
const relative = node_path.default.relative(root, candidate);
|
|
158
|
+
return relative === "" || !relative.startsWith(`..${node_path.default.sep}`) && relative !== ".." && !node_path.default.isAbsolute(relative);
|
|
159
|
+
}
|
|
160
|
+
//#endregion
|
|
161
|
+
exports.acquireDirectoryLock = acquireDirectoryLock;
|
|
162
|
+
exports.forwardSignals = forwardSignals;
|
|
163
|
+
exports.isFileSystemError = isFileSystemError;
|
|
164
|
+
exports.lockOwnerIsRunning = lockOwnerIsRunning;
|
|
165
|
+
exports.pathInside = pathInside;
|
|
166
|
+
exports.runCaptured = runCaptured;
|
|
167
|
+
exports.runChecked = runChecked;
|
|
168
|
+
exports.runInteractive = runInteractive;
|
|
169
|
+
exports.signalExitCode = signalExitCode;
|
|
170
|
+
exports.waitForExit = waitForExit;
|
|
171
|
+
|
|
172
|
+
//# sourceMappingURL=process.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process.cjs","names":["spawnSync","osConstants","spawn","readJson","path","fs","delay"],"sources":["../../../../../src/cli/commands/compat/providers/process.ts"],"sourcesContent":["import { type ChildProcess, spawnSync } from 'node:child_process';\nimport fs from 'node:fs';\nimport { constants as osConstants } from 'node:os';\nimport path from 'node:path';\nimport { setTimeout as delay } from 'node:timers/promises';\n\nimport { readJson, writeJson } from '@agimon-ai/doompi-core/runtime-json';\nimport spawn from 'cross-spawn';\n\n/**\n * Child process and cross-repository locking primitives.\n *\n * Shared by every compatibility provider and by the Pi launch command, so that\n * signal forwarding behaves the same however the harness starts a child.\n */\n\nconst FORWARDED_SIGNALS: NodeJS.Signals[] = ['SIGINT', 'SIGTERM', 'SIGHUP', 'SIGQUIT'];\nconst SIGNAL_EXIT_CODE_OFFSET = 128;\nconst UNKNOWN_SIGNAL_EXIT_CODE = 1;\nconst LOCK_RETRY_MS = 25;\nconst LOCK_STALE_MS = 10_000;\nconst LOCK_TIMEOUT_MS = 30_000;\nconst FILE_EXISTS_ERROR = 'EEXIST';\nconst FILE_NOT_FOUND_ERROR = 'ENOENT';\nconst PROCESS_NOT_FOUND_ERROR = 'ESRCH';\nconst LOCK_OWNER_FILENAME = 'owner.json';\n\n/** Runs a command and returns its trimmed stdout, throwing on a non-zero exit. */\nexport function runCaptured(command: string, args: string[], cwd: string, environment: NodeJS.ProcessEnv): string {\n const result = spawnSync(command, args, { cwd, encoding: 'utf8', env: environment });\n if (result.error) throw result.error;\n if (result.stderr) process.stderr.write(result.stderr);\n if (result.status !== 0) {\n throw new Error(`${command} exited with status ${result.status ?? 1}`);\n }\n return result.stdout.trim();\n}\n\n/** Runs a command with inherited stdio, throwing on a non-zero exit. */\nexport function runChecked(command: string, args: string[], cwd: string, environment: NodeJS.ProcessEnv): void {\n const result = spawnSync(command, args, { cwd, env: environment, stdio: 'inherit' });\n if (result.error) throw result.error;\n if (result.status !== 0) throw new Error(`${command} exited with status ${result.status ?? 1}`);\n}\n\n/** The conventional 128+n exit code for a child killed by a signal. */\nexport function signalExitCode(signal: NodeJS.Signals | null): number {\n if (!signal) return UNKNOWN_SIGNAL_EXIT_CODE;\n const signalNumber = osConstants.signals[signal];\n return signalNumber ? SIGNAL_EXIT_CODE_OFFSET + signalNumber : UNKNOWN_SIGNAL_EXIT_CODE;\n}\n\n/**\n * Runs an interactive child, forwarding terminal signals for its lifetime.\n *\n * Listeners are registered with `on` rather than `once` so a second Ctrl-C still\n * reaches the child, and removed in a finally so repeated launches in one\n * process do not accumulate handlers.\n */\nexport function forwardSignals(child: ChildProcess): () => void {\n const forward = (signal: NodeJS.Signals): void => {\n if (child.exitCode === null && child.signalCode === null) child.kill(signal);\n };\n for (const signal of FORWARDED_SIGNALS) process.on(signal, forward);\n return () => {\n for (const signal of FORWARDED_SIGNALS) process.removeListener(signal, forward);\n };\n}\n\n/** Resolves with the child's exit code, or the conventional code for its signal. */\nexport function waitForExit(child: ChildProcess): Promise<number> {\n return new Promise<number>((resolve, reject) => {\n child.once('error', reject);\n child.once('exit', (code, signal) => resolve(code ?? signalExitCode(signal)));\n });\n}\n\nexport async function runInteractive(\n command: string,\n args: string[],\n cwd: string,\n environment: NodeJS.ProcessEnv,\n): Promise<number> {\n const child = spawn(command, args, { cwd, env: environment, stdio: 'inherit' });\n const stopForwarding = forwardSignals(child);\n try {\n return await waitForExit(child);\n } finally {\n stopForwarding();\n }\n}\n\nexport function isFileSystemError(error: unknown): error is NodeJS.ErrnoException {\n return error instanceof Error && typeof (error as NodeJS.ErrnoException).code === 'string';\n}\n\n/** True when the recorded lock owner is still a live process. */\nexport function lockOwnerIsRunning(lockPath: string): boolean {\n const owner = readJson(path.join(lockPath, LOCK_OWNER_FILENAME));\n if (typeof owner.pid !== 'number' || !Number.isSafeInteger(owner.pid) || owner.pid <= 0) return false;\n try {\n process.kill(owner.pid, 0);\n return true;\n } catch (error) {\n // Anything other than \"no such process\" means the pid exists but is not\n // ours to signal, so the lock is still held.\n return !isFileSystemError(error) || error.code !== PROCESS_NOT_FOUND_ERROR;\n }\n}\n\n/**\n * Takes an exclusive lock by creating a directory, which is atomic everywhere.\n *\n * A lock older than the stale window whose owner is gone is reclaimed, so a\n * harness killed mid-sync cannot block every other repository forever.\n */\nexport async function acquireDirectoryLock(lockPath: string): Promise<() => Promise<void>> {\n fs.mkdirSync(path.dirname(lockPath), { recursive: true });\n const startedAt = Date.now();\n\n while (true) {\n try {\n await fs.promises.mkdir(lockPath);\n try {\n writeJson(path.join(lockPath, LOCK_OWNER_FILENAME), { pid: process.pid });\n } catch (error) {\n await fs.promises.rm(lockPath, { recursive: true, force: true });\n throw error;\n }\n return () => fs.promises.rm(lockPath, { recursive: true, force: true });\n } catch (error) {\n if (!isFileSystemError(error) || error.code !== FILE_EXISTS_ERROR) throw error;\n try {\n const stat = await fs.promises.stat(lockPath);\n if (Date.now() - stat.mtimeMs >= LOCK_STALE_MS && !lockOwnerIsRunning(lockPath)) {\n await fs.promises.rm(lockPath, { recursive: true, force: true });\n continue;\n }\n } catch (statError) {\n // The holder released between the failed mkdir and this stat, so retry\n // immediately rather than waiting out the retry delay.\n if (isFileSystemError(statError) && statError.code === FILE_NOT_FOUND_ERROR) continue;\n throw statError;\n }\n if (Date.now() - startedAt >= LOCK_TIMEOUT_MS) {\n throw new Error(`Timed out waiting for Antigravity state lock: ${lockPath}`);\n }\n await delay(LOCK_RETRY_MS);\n }\n }\n}\n\n/** True when `candidate` is `root` itself or sits underneath it. */\nexport function pathInside(root: string, candidate: string): boolean {\n const relative = path.relative(root, candidate);\n return relative === '' || (!relative.startsWith(`..${path.sep}`) && relative !== '..' && !path.isAbsolute(relative));\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ChildProcess } from "node:child_process";
|
|
2
|
+
//#region src/cli/commands/compat/providers/process.d.ts
|
|
3
|
+
/** Runs a command and returns its trimmed stdout, throwing on a non-zero exit. */
|
|
4
|
+
export declare function runCaptured(command: string, args: string[], cwd: string, environment: NodeJS.ProcessEnv): string;
|
|
5
|
+
/** Runs a command with inherited stdio, throwing on a non-zero exit. */
|
|
6
|
+
export declare function runChecked(command: string, args: string[], cwd: string, environment: NodeJS.ProcessEnv): void;
|
|
7
|
+
/** The conventional 128+n exit code for a child killed by a signal. */
|
|
8
|
+
export declare function signalExitCode(signal: NodeJS.Signals | null): number;
|
|
9
|
+
/**
|
|
10
|
+
* Runs an interactive child, forwarding terminal signals for its lifetime.
|
|
11
|
+
*
|
|
12
|
+
* Listeners are registered with `on` rather than `once` so a second Ctrl-C still
|
|
13
|
+
* reaches the child, and removed in a finally so repeated launches in one
|
|
14
|
+
* process do not accumulate handlers.
|
|
15
|
+
*/
|
|
16
|
+
export declare function forwardSignals(child: ChildProcess): () => void;
|
|
17
|
+
/** Resolves with the child's exit code, or the conventional code for its signal. */
|
|
18
|
+
export declare function waitForExit(child: ChildProcess): Promise<number>;
|
|
19
|
+
export declare function runInteractive(command: string, args: string[], cwd: string, environment: NodeJS.ProcessEnv): Promise<number>;
|
|
20
|
+
export declare function isFileSystemError(error: unknown): error is NodeJS.ErrnoException;
|
|
21
|
+
/** True when the recorded lock owner is still a live process. */
|
|
22
|
+
export declare function lockOwnerIsRunning(lockPath: string): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Takes an exclusive lock by creating a directory, which is atomic everywhere.
|
|
25
|
+
*
|
|
26
|
+
* A lock older than the stale window whose owner is gone is reclaimed, so a
|
|
27
|
+
* harness killed mid-sync cannot block every other repository forever.
|
|
28
|
+
*/
|
|
29
|
+
export declare function acquireDirectoryLock(lockPath: string): Promise<() => Promise<void>>;
|
|
30
|
+
/** True when `candidate` is `root` itself or sits underneath it. */
|
|
31
|
+
export declare function pathInside(root: string, candidate: string): boolean;
|
|
32
|
+
//#endregion
|
|
33
|
+
//# sourceMappingURL=process.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process.d.cts","names":[],"sources":["../../../../../src/cli/commands/compat/providers/process.ts"],"mappings":";;;wBA4BgB,YAAY,iBAAiB,gBAAgB,aAAa,aAAa,OAAO;;wBAW9E,WAAW,iBAAiB,gBAAgB,aAAa,aAAa,OAAO;;wBAO7E,eAAe,QAAQ,OAAO;;;;;;;;wBAa9B,eAAe,OAAO;;wBAWtB,YAAY,OAAO,eAAe;wBAO5B,eACpB,iBACA,gBACA,aACA,aAAa,OAAO,aACnB;wBAUa,kBAAkB,iBAAiB,SAAS,OAAO;;wBAKnD,mBAAmB;;;;;;;wBAmBb,qBAAqB,mBAAmB,cAAc;;wBAqC5D,WAAW,cAAc"}
|