@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,29 @@
|
|
|
1
|
+
import { HarnessOptions } from "../../../composition/types/harness.mjs";
|
|
2
|
+
import { HarnessContext } from "../../../builders/cli/harnessContext.mjs";
|
|
3
|
+
import { BaseCommand } from "../baseCommand.mjs";
|
|
4
|
+
import { HarnessTelemetry } from "@agimon-ai/doompi-core/runtime-log-sink-telemetry";
|
|
5
|
+
//#region src/cli/commands/launch/index.d.ts
|
|
6
|
+
export interface VibeLintInvocation {
|
|
7
|
+
prompt: string;
|
|
8
|
+
systemPrompt: string;
|
|
9
|
+
maxTokens?: number;
|
|
10
|
+
screenshotPaths?: string[];
|
|
11
|
+
}
|
|
12
|
+
export declare function parseVibeLintInvocation(input: string): VibeLintInvocation;
|
|
13
|
+
export declare function buildVibeLintPiArgs(piArgs: string[], invocation: VibeLintInvocation): string[];
|
|
14
|
+
export declare function formatVibeLintResponse(content: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Spawns Pi with the resolved extensions, environment, and theme.
|
|
17
|
+
*
|
|
18
|
+
* This is the default command: it matches whenever no diagnostic flag claimed
|
|
19
|
+
* the run.
|
|
20
|
+
*/
|
|
21
|
+
export declare function runLaunch(context: HarnessContext, telemetry: HarnessTelemetry): Promise<number>;
|
|
22
|
+
/** Compatibility API. Executables call the command function directly. */
|
|
23
|
+
export declare class LaunchCommand extends BaseCommand {
|
|
24
|
+
readonly name = "launch";
|
|
25
|
+
matches(_options: HarnessOptions): boolean;
|
|
26
|
+
execute(context: HarnessContext, telemetry: HarnessTelemetry): Promise<number>;
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../src/cli/commands/launch/index.ts"],"mappings":";;;;;iBAsBiB;EACf;EACA;EACA;EACA;;wBAGc,wBAAwB,gBAAgB;wBA6BxC,oBAAoB,kBAAkB,YAAY;wBAclD,uBAAuB;;;;;;;wBAkBjB,UAAU,SAAS,gBAAgB,WAAW,mBAAmB;;qBAoE1E,sBAAsB;WACxB;EAET,QAAQ,UAAU;EAIZ,QAAQ,SAAS,gBAAgB,WAAW,mBAAmB"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { BaseCommand } from "../baseCommand.mjs";
|
|
2
|
+
import { forwardSignals, waitForExit } from "../compat/providers/process.mjs";
|
|
3
|
+
import { hasProjectTrustOption } from "../../../composition/projectTrust/index.mjs";
|
|
4
|
+
import { LAUNCHER_COMPOSITION_REQUEST_ENV } from "../../../builders/cli/constants.mjs";
|
|
5
|
+
import { resolveLaunchPlan } from "../../../builders/cli/launchPlan/index.mjs";
|
|
6
|
+
import { HARNESS_EVENT } from "@agimon-ai/doompi-core/runtime-log-sink-telemetry";
|
|
7
|
+
import { isRecord } from "@agimon-ai/doompi-core/runtime-json";
|
|
8
|
+
import spawn from "cross-spawn";
|
|
9
|
+
import { piCliPath } from "@agimon-ai/doompi-core/module-resolution";
|
|
10
|
+
//#region src/cli/commands/launch/index.ts
|
|
11
|
+
const VIBE_LINT_FORMAT = "vibe-lint";
|
|
12
|
+
const PRINT_OPTION = "--print";
|
|
13
|
+
const APPROVE_OPTION = "--approve";
|
|
14
|
+
const NO_SESSION_OPTION = "--no-session";
|
|
15
|
+
const SYSTEM_PROMPT_OPTION = "--system-prompt";
|
|
16
|
+
const IGNORE_STDIO = "ignore";
|
|
17
|
+
const PIPE_STDIO = "pipe";
|
|
18
|
+
const INHERIT_STDIO = "inherit";
|
|
19
|
+
function parseVibeLintInvocation(input) {
|
|
20
|
+
let parsed;
|
|
21
|
+
try {
|
|
22
|
+
parsed = JSON.parse(input);
|
|
23
|
+
} catch (error) {
|
|
24
|
+
throw new Error("Expected a JSON vibe-lint invocation on stdin", { cause: error });
|
|
25
|
+
}
|
|
26
|
+
if (!isRecord(parsed) || typeof parsed.prompt !== "string" || typeof parsed.systemPrompt !== "string") throw new Error("A vibe-lint invocation requires string prompt and systemPrompt fields");
|
|
27
|
+
if (parsed.maxTokens !== void 0 && typeof parsed.maxTokens !== "number") throw new Error("A vibe-lint invocation maxTokens field must be a number");
|
|
28
|
+
if (parsed.screenshotPaths !== void 0 && (!Array.isArray(parsed.screenshotPaths) || !parsed.screenshotPaths.every((value) => typeof value === "string"))) throw new Error("A vibe-lint invocation screenshotPaths field must be an array of strings");
|
|
29
|
+
return {
|
|
30
|
+
prompt: parsed.prompt,
|
|
31
|
+
systemPrompt: parsed.systemPrompt,
|
|
32
|
+
maxTokens: parsed.maxTokens,
|
|
33
|
+
screenshotPaths: parsed.screenshotPaths
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function buildVibeLintPiArgs(piArgs, invocation) {
|
|
37
|
+
return [
|
|
38
|
+
...piArgs,
|
|
39
|
+
PRINT_OPTION,
|
|
40
|
+
...!hasProjectTrustOption(piArgs) ? [APPROVE_OPTION] : [],
|
|
41
|
+
NO_SESSION_OPTION,
|
|
42
|
+
SYSTEM_PROMPT_OPTION,
|
|
43
|
+
invocation.systemPrompt,
|
|
44
|
+
...(invocation.screenshotPaths ?? []).map((screenshotPath) => `@${screenshotPath}`),
|
|
45
|
+
invocation.prompt
|
|
46
|
+
];
|
|
47
|
+
}
|
|
48
|
+
function formatVibeLintResponse(content) {
|
|
49
|
+
return `${JSON.stringify({ content: content.trim() })}\n`;
|
|
50
|
+
}
|
|
51
|
+
async function readStdin() {
|
|
52
|
+
const chunks = [];
|
|
53
|
+
for await (const chunk of process.stdin) chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(String(chunk)));
|
|
54
|
+
return Buffer.concat(chunks).toString("utf-8");
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Spawns Pi with the resolved extensions, environment, and theme.
|
|
58
|
+
*
|
|
59
|
+
* This is the default command: it matches whenever no diagnostic flag claimed
|
|
60
|
+
* the run.
|
|
61
|
+
*/
|
|
62
|
+
async function runLaunch(context, telemetry) {
|
|
63
|
+
const { options } = context;
|
|
64
|
+
const compositionRecordPath = context.environment[LAUNCHER_COMPOSITION_REQUEST_ENV]?.trim();
|
|
65
|
+
const plan = await resolveLaunchPlan(context, telemetry, compositionRecordPath ? { compositionRecordPath } : {});
|
|
66
|
+
const environment = plan.environment;
|
|
67
|
+
let piArgs = plan.piArgs;
|
|
68
|
+
const launchExtensions = plan.extensions;
|
|
69
|
+
if (options.outputFormat === VIBE_LINT_FORMAT) {
|
|
70
|
+
const invocation = parseVibeLintInvocation(await readStdin());
|
|
71
|
+
piArgs = buildVibeLintPiArgs(piArgs, invocation);
|
|
72
|
+
}
|
|
73
|
+
const startedAt = Date.now();
|
|
74
|
+
const child = spawn(process.execPath, [piCliPath(), ...piArgs], {
|
|
75
|
+
cwd: options.cwd,
|
|
76
|
+
env: environment,
|
|
77
|
+
stdio: options.outputFormat === VIBE_LINT_FORMAT ? [
|
|
78
|
+
IGNORE_STDIO,
|
|
79
|
+
PIPE_STDIO,
|
|
80
|
+
PIPE_STDIO
|
|
81
|
+
] : INHERIT_STDIO
|
|
82
|
+
});
|
|
83
|
+
let stdout = "";
|
|
84
|
+
if (options.outputFormat === VIBE_LINT_FORMAT) {
|
|
85
|
+
if (!child.stdout || !child.stderr) throw new Error("Failed to open Pi output streams");
|
|
86
|
+
child.stdout.on("data", (chunk) => {
|
|
87
|
+
stdout += chunk.toString();
|
|
88
|
+
});
|
|
89
|
+
child.stderr.on("data", (chunk) => {
|
|
90
|
+
process.stderr.write(chunk);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
const stopForwarding = forwardSignals(child);
|
|
94
|
+
const result = await telemetry.runInSpan("doom_pi.pi_session", {
|
|
95
|
+
"harness.extension.count": launchExtensions.length,
|
|
96
|
+
"harness.mode": options.outputFormat
|
|
97
|
+
}, () => waitForExit(child)).catch(async (error) => {
|
|
98
|
+
await telemetry.recordError(HARNESS_EVENT.launchFailed, error, { "harness.duration_ms": Date.now() - startedAt });
|
|
99
|
+
throw error;
|
|
100
|
+
}).finally(stopForwarding);
|
|
101
|
+
telemetry.recordEvent(HARNESS_EVENT.launchCompleted, {
|
|
102
|
+
"harness.exit_code": result,
|
|
103
|
+
"harness.duration_ms": Date.now() - startedAt,
|
|
104
|
+
"harness.mode": options.outputFormat ?? "default"
|
|
105
|
+
});
|
|
106
|
+
if (options.outputFormat === VIBE_LINT_FORMAT && result === 0) process.stdout.write(formatVibeLintResponse(stdout));
|
|
107
|
+
return result;
|
|
108
|
+
}
|
|
109
|
+
/** Compatibility API. Executables call the command function directly. */
|
|
110
|
+
var LaunchCommand = class extends BaseCommand {
|
|
111
|
+
name = "launch";
|
|
112
|
+
matches(_options) {
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
115
|
+
async execute(context, telemetry) {
|
|
116
|
+
return runLaunch(context, telemetry);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
//#endregion
|
|
120
|
+
export { LaunchCommand, buildVibeLintPiArgs, formatVibeLintResponse, parseVibeLintInvocation, runLaunch };
|
|
121
|
+
|
|
122
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/cli/commands/launch/index.ts"],"sourcesContent":["import { piCliPath } from '@agimon-ai/doompi-core/module-resolution';\nimport { isRecord } from '@agimon-ai/doompi-core/runtime-json';\nimport { HARNESS_EVENT, type HarnessTelemetry } from '@agimon-ai/doompi-core/runtime-log-sink-telemetry';\nimport spawn from 'cross-spawn';\n\nimport { LAUNCHER_COMPOSITION_REQUEST_ENV } from '../../../builders/cli/constants';\nimport type { HarnessContext } from '../../../builders/cli/harnessContext';\nimport { resolveLaunchPlan } from '../../../builders/cli/launchPlan';\nimport { hasProjectTrustOption } from '../../../composition/projectTrust';\nimport type { HarnessOptions } from '../../../composition/types/harness';\nimport { BaseCommand } from '../baseCommand';\nimport { forwardSignals, waitForExit } from '../compat/providers/process';\n\nconst VIBE_LINT_FORMAT = 'vibe-lint';\nconst PRINT_OPTION = '--print';\nconst APPROVE_OPTION = '--approve';\nconst NO_SESSION_OPTION = '--no-session';\nconst SYSTEM_PROMPT_OPTION = '--system-prompt';\nconst IGNORE_STDIO = 'ignore';\nconst PIPE_STDIO = 'pipe';\nconst INHERIT_STDIO = 'inherit';\n\nexport interface VibeLintInvocation {\n prompt: string;\n systemPrompt: string;\n maxTokens?: number;\n screenshotPaths?: string[];\n}\n\nexport function parseVibeLintInvocation(input: string): VibeLintInvocation {\n let parsed: unknown;\n try {\n parsed = JSON.parse(input);\n } catch (error) {\n throw new Error('Expected a JSON vibe-lint invocation on stdin', { cause: error });\n }\n\n if (!isRecord(parsed) || typeof parsed.prompt !== 'string' || typeof parsed.systemPrompt !== 'string') {\n throw new Error('A vibe-lint invocation requires string prompt and systemPrompt fields');\n }\n if (parsed.maxTokens !== undefined && typeof parsed.maxTokens !== 'number') {\n throw new Error('A vibe-lint invocation maxTokens field must be a number');\n }\n if (\n parsed.screenshotPaths !== undefined &&\n (!Array.isArray(parsed.screenshotPaths) || !parsed.screenshotPaths.every((value) => typeof value === 'string'))\n ) {\n throw new Error('A vibe-lint invocation screenshotPaths field must be an array of strings');\n }\n\n return {\n prompt: parsed.prompt,\n systemPrompt: parsed.systemPrompt,\n maxTokens: parsed.maxTokens,\n screenshotPaths: parsed.screenshotPaths as string[] | undefined,\n };\n}\n\nexport function buildVibeLintPiArgs(piArgs: string[], invocation: VibeLintInvocation): string[] {\n return [\n ...piArgs,\n PRINT_OPTION,\n ...(!hasProjectTrustOption(piArgs) ? [APPROVE_OPTION] : []),\n // Reviews are disposable and must not appear in Pi's resume history.\n NO_SESSION_OPTION,\n SYSTEM_PROMPT_OPTION,\n invocation.systemPrompt,\n ...(invocation.screenshotPaths ?? []).map((screenshotPath) => `@${screenshotPath}`),\n invocation.prompt,\n ];\n}\n\nexport function formatVibeLintResponse(content: string): string {\n return `${JSON.stringify({ content: content.trim() })}\\n`;\n}\n\nasync function readStdin(): Promise<string> {\n const chunks: Buffer[] = [];\n for await (const chunk of process.stdin) {\n chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(String(chunk)));\n }\n return Buffer.concat(chunks).toString('utf-8');\n}\n\n/**\n * Spawns Pi with the resolved extensions, environment, and theme.\n *\n * This is the default command: it matches whenever no diagnostic flag claimed\n * the run.\n */\nexport async function runLaunch(context: HarnessContext, telemetry: HarnessTelemetry): Promise<number> {\n const { options } = context;\n // A caller that owns this process's lifetime, such as doompi-server, asks\n // for a composition record so a mode switch reloads in place instead of\n // needing a new process. Absent, the session composes as it always has.\n const compositionRecordPath = context.environment[LAUNCHER_COMPOSITION_REQUEST_ENV]?.trim();\n const plan = await resolveLaunchPlan(context, telemetry, compositionRecordPath ? { compositionRecordPath } : {});\n const environment = plan.environment;\n let piArgs = plan.piArgs;\n const launchExtensions = plan.extensions;\n\n if (options.outputFormat === VIBE_LINT_FORMAT) {\n const invocation = parseVibeLintInvocation(await readStdin());\n piArgs = buildVibeLintPiArgs(piArgs, invocation);\n }\n\n const startedAt = Date.now();\n const child = spawn(process.execPath, [piCliPath(), ...piArgs], {\n cwd: options.cwd,\n env: environment,\n stdio: options.outputFormat === VIBE_LINT_FORMAT ? [IGNORE_STDIO, PIPE_STDIO, PIPE_STDIO] : INHERIT_STDIO,\n });\n let stdout = '';\n if (options.outputFormat === VIBE_LINT_FORMAT) {\n if (!child.stdout || !child.stderr) throw new Error('Failed to open Pi output streams');\n child.stdout.on('data', (chunk: string | Buffer) => {\n stdout += chunk.toString();\n });\n child.stderr.on('data', (chunk: string | Buffer) => {\n process.stderr.write(chunk);\n });\n }\n\n // Shared with the compatibility providers, so a second Ctrl-C still reaches\n // the child and SIGHUP and SIGQUIT are forwarded too.\n const stopForwarding = forwardSignals(child);\n const result = await telemetry\n .runInSpan(\n 'doom_pi.pi_session',\n {\n 'harness.extension.count': launchExtensions.length,\n 'harness.mode': options.outputFormat,\n },\n () => waitForExit(child),\n )\n .catch(async (error: unknown) => {\n // A spawn error means Pi never started, which is invisible to the\n // session telemetry the child would otherwise have reported.\n await telemetry.recordError(HARNESS_EVENT.launchFailed, error, {\n 'harness.duration_ms': Date.now() - startedAt,\n });\n throw error;\n })\n .finally(stopForwarding);\n\n void telemetry.recordEvent(HARNESS_EVENT.launchCompleted, {\n 'harness.exit_code': result,\n 'harness.duration_ms': Date.now() - startedAt,\n 'harness.mode': options.outputFormat ?? 'default',\n });\n\n if (options.outputFormat === VIBE_LINT_FORMAT && result === 0) {\n process.stdout.write(formatVibeLintResponse(stdout));\n }\n return result;\n}\n\n/** Compatibility API. Executables call the command function directly. */\nexport class LaunchCommand extends BaseCommand {\n readonly name = 'launch';\n\n matches(_options: HarnessOptions): boolean {\n return true;\n }\n\n async execute(context: HarnessContext, telemetry: HarnessTelemetry): Promise<number> {\n return runLaunch(context, telemetry);\n }\n}\n"],"mappings":";;;;;;;;;;AAaA,MAAM,mBAAmB;AACzB,MAAM,eAAe;AACrB,MAAM,iBAAiB;AACvB,MAAM,oBAAoB;AAC1B,MAAM,uBAAuB;AAC7B,MAAM,eAAe;AACrB,MAAM,aAAa;AACnB,MAAM,gBAAgB;AAStB,SAAgB,wBAAwB,OAAmC;CACzE,IAAI;CACJ,IAAI;EACF,SAAS,KAAK,MAAM,KAAK;CAC3B,SAAS,OAAO;EACd,MAAM,IAAI,MAAM,iDAAiD,EAAE,OAAO,MAAM,CAAC;CACnF;CAEA,IAAI,CAAC,SAAS,MAAM,KAAK,OAAO,OAAO,WAAW,YAAY,OAAO,OAAO,iBAAiB,UAC3F,MAAM,IAAI,MAAM,uEAAuE;CAEzF,IAAI,OAAO,cAAc,KAAA,KAAa,OAAO,OAAO,cAAc,UAChE,MAAM,IAAI,MAAM,yDAAyD;CAE3E,IACE,OAAO,oBAAoB,KAAA,MAC1B,CAAC,MAAM,QAAQ,OAAO,eAAe,KAAK,CAAC,OAAO,gBAAgB,OAAO,UAAU,OAAO,UAAU,QAAQ,IAE7G,MAAM,IAAI,MAAM,0EAA0E;CAG5F,OAAO;EACL,QAAQ,OAAO;EACf,cAAc,OAAO;EACrB,WAAW,OAAO;EAClB,iBAAiB,OAAO;CAC1B;AACF;AAEA,SAAgB,oBAAoB,QAAkB,YAA0C;CAC9F,OAAO;EACL,GAAG;EACH;EACA,GAAI,CAAC,sBAAsB,MAAM,IAAI,CAAC,cAAc,IAAI,CAAC;EAEzD;EACA;EACA,WAAW;EACX,IAAI,WAAW,mBAAmB,CAAC,EAAA,CAAG,KAAK,mBAAmB,IAAI,gBAAgB;EAClF,WAAW;CACb;AACF;AAEA,SAAgB,uBAAuB,SAAyB;CAC9D,OAAO,GAAG,KAAK,UAAU,EAAE,SAAS,QAAQ,KAAK,EAAE,CAAC,EAAE;AACxD;AAEA,eAAe,YAA6B;CAC1C,MAAM,SAAmB,CAAC;CAC1B,WAAW,MAAM,SAAS,QAAQ,OAChC,OAAO,KAAK,OAAO,SAAS,KAAK,IAAI,QAAQ,OAAO,KAAK,OAAO,KAAK,CAAC,CAAC;CAEzE,OAAO,OAAO,OAAO,MAAM,CAAC,CAAC,SAAS,OAAO;AAC/C;;;;;;;AAQA,eAAsB,UAAU,SAAyB,WAA8C;CACrG,MAAM,EAAE,YAAY;CAIpB,MAAM,wBAAwB,QAAQ,YAAY,iCAAiC,EAAE,KAAK;CAC1F,MAAM,OAAO,MAAM,kBAAkB,SAAS,WAAW,wBAAwB,EAAE,sBAAsB,IAAI,CAAC,CAAC;CAC/G,MAAM,cAAc,KAAK;CACzB,IAAI,SAAS,KAAK;CAClB,MAAM,mBAAmB,KAAK;CAE9B,IAAI,QAAQ,iBAAiB,kBAAkB;EAC7C,MAAM,aAAa,wBAAwB,MAAM,UAAU,CAAC;EAC5D,SAAS,oBAAoB,QAAQ,UAAU;CACjD;CAEA,MAAM,YAAY,KAAK,IAAI;CAC3B,MAAM,QAAQ,MAAM,QAAQ,UAAU,CAAC,UAAU,GAAG,GAAG,MAAM,GAAG;EAC9D,KAAK,QAAQ;EACb,KAAK;EACL,OAAO,QAAQ,iBAAiB,mBAAmB;GAAC;GAAc;GAAY;EAAU,IAAI;CAC9F,CAAC;CACD,IAAI,SAAS;CACb,IAAI,QAAQ,iBAAiB,kBAAkB;EAC7C,IAAI,CAAC,MAAM,UAAU,CAAC,MAAM,QAAQ,MAAM,IAAI,MAAM,kCAAkC;EACtF,MAAM,OAAO,GAAG,SAAS,UAA2B;GAClD,UAAU,MAAM,SAAS;EAC3B,CAAC;EACD,MAAM,OAAO,GAAG,SAAS,UAA2B;GAClD,QAAQ,OAAO,MAAM,KAAK;EAC5B,CAAC;CACH;CAIA,MAAM,iBAAiB,eAAe,KAAK;CAC3C,MAAM,SAAS,MAAM,UAClB,UACC,sBACA;EACE,2BAA2B,iBAAiB;EAC5C,gBAAgB,QAAQ;CAC1B,SACM,YAAY,KAAK,CACzB,CAAC,CACA,MAAM,OAAO,UAAmB;EAG/B,MAAM,UAAU,YAAY,cAAc,cAAc,OAAO,EAC7D,uBAAuB,KAAK,IAAI,IAAI,UACtC,CAAC;EACD,MAAM;CACR,CAAC,CAAC,CACD,QAAQ,cAAc;CAEzB,UAAe,YAAY,cAAc,iBAAiB;EACxD,qBAAqB;EACrB,uBAAuB,KAAK,IAAI,IAAI;EACpC,gBAAgB,QAAQ,gBAAgB;CAC1C,CAAC;CAED,IAAI,QAAQ,iBAAiB,oBAAoB,WAAW,GAC1D,QAAQ,OAAO,MAAM,uBAAuB,MAAM,CAAC;CAErD,OAAO;AACT;;AAGA,IAAa,gBAAb,cAAmC,YAAY;CAC7C,OAAgB;CAEhB,QAAQ,UAAmC;EACzC,OAAO;CACT;CAEA,MAAM,QAAQ,SAAyB,WAA8C;EACnF,OAAO,UAAU,SAAS,SAAS;CACrC;AACF"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const require_matrixOptions = require("../../matrixOptions.cjs");
|
|
2
|
+
//#region src/cli/commands/sandbox/args.ts
|
|
3
|
+
const NO_DOMAINS_OPTION = "--no-domains";
|
|
4
|
+
const PLUGIN_DIRECTORY_OPTION = "--plugin-dir";
|
|
5
|
+
const PRESET_OPTION = "--preset";
|
|
6
|
+
const CWD_OPTION = "--cwd";
|
|
7
|
+
const OUTPUT_FORMAT_OPTION = "--output-format";
|
|
8
|
+
const VIBE_LINT_FORMAT = "vibe-lint";
|
|
9
|
+
const AUTOMATION_OPTION = "--automation";
|
|
10
|
+
const MUTE_OPTION = "--mute";
|
|
11
|
+
const AUTO_STOP_OPTION = "--auto-stop";
|
|
12
|
+
const ALLOW_PROTECTED_WRITES_OPTION = "--allow-protected-writes";
|
|
13
|
+
const NO_HOOKS_OPTION = "--no-hooks";
|
|
14
|
+
const NO_MCP_OPTION = "--no-mcp";
|
|
15
|
+
const NO_AGENTS_OPTION = "--no-agents";
|
|
16
|
+
/**
|
|
17
|
+
* Projects resolved harness options back into replayable harness arguments.
|
|
18
|
+
*
|
|
19
|
+
* The sandbox provider hands these to the launcher inside the sandbox, which
|
|
20
|
+
* re-parses them exactly like a host launch. The projection never contains
|
|
21
|
+
* --sandbox: a sandboxed launch must not provision another sandbox.
|
|
22
|
+
*/
|
|
23
|
+
function buildSandboxForwardArgs(options) {
|
|
24
|
+
const args = [
|
|
25
|
+
require_matrixOptions.MAJOR_MODE_OPTION,
|
|
26
|
+
options.majorMode,
|
|
27
|
+
PRESET_OPTION,
|
|
28
|
+
options.preset,
|
|
29
|
+
CWD_OPTION,
|
|
30
|
+
options.cwd
|
|
31
|
+
];
|
|
32
|
+
if (options.profile) args.push(require_matrixOptions.PROFILE_OPTION, options.profile);
|
|
33
|
+
if (options.domains.length > 0) args.push(require_matrixOptions.DOMAINS_OPTION, options.domains.join(","));
|
|
34
|
+
else if (options.pluginDirectories.length === 0) args.push(NO_DOMAINS_OPTION);
|
|
35
|
+
for (const directory of options.pluginDirectories) args.push(PLUGIN_DIRECTORY_OPTION, directory);
|
|
36
|
+
for (const directory of options.additionalDirectories) args.push(require_matrixOptions.ADD_DIRECTORY_OPTION, directory);
|
|
37
|
+
if (options.outputFormat === VIBE_LINT_FORMAT) args.push(OUTPUT_FORMAT_OPTION, VIBE_LINT_FORMAT);
|
|
38
|
+
if (options.automation) args.push(AUTOMATION_OPTION);
|
|
39
|
+
if (options.mute) args.push(MUTE_OPTION);
|
|
40
|
+
if (options.autoStop) args.push(AUTO_STOP_OPTION);
|
|
41
|
+
if (options.allowProtectedWrites) args.push(ALLOW_PROTECTED_WRITES_OPTION);
|
|
42
|
+
if (!options.hooks) args.push(NO_HOOKS_OPTION);
|
|
43
|
+
if (!options.mcp) args.push(NO_MCP_OPTION);
|
|
44
|
+
if (!options.agents) args.push(NO_AGENTS_OPTION);
|
|
45
|
+
return [...args, ...options.piArgs];
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
exports.buildSandboxForwardArgs = buildSandboxForwardArgs;
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=args.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"args.cjs","names":["MAJOR_MODE_OPTION","PROFILE_OPTION","DOMAINS_OPTION","ADD_DIRECTORY_OPTION"],"sources":["../../../../src/cli/commands/sandbox/args.ts"],"sourcesContent":["import type { HarnessOptions } from '../../../composition/types/harness';\nimport { ADD_DIRECTORY_OPTION, DOMAINS_OPTION, MAJOR_MODE_OPTION, PROFILE_OPTION } from '../../matrixOptions';\n\nconst NO_DOMAINS_OPTION = '--no-domains';\nconst PLUGIN_DIRECTORY_OPTION = '--plugin-dir';\nconst PRESET_OPTION = '--preset';\nconst CWD_OPTION = '--cwd';\nconst OUTPUT_FORMAT_OPTION = '--output-format';\nconst VIBE_LINT_FORMAT = 'vibe-lint';\nconst AUTOMATION_OPTION = '--automation';\nconst MUTE_OPTION = '--mute';\nconst AUTO_STOP_OPTION = '--auto-stop';\nconst ALLOW_PROTECTED_WRITES_OPTION = '--allow-protected-writes';\nconst NO_HOOKS_OPTION = '--no-hooks';\nconst NO_MCP_OPTION = '--no-mcp';\nconst NO_AGENTS_OPTION = '--no-agents';\n\n/**\n * Projects resolved harness options back into replayable harness arguments.\n *\n * The sandbox provider hands these to the launcher inside the sandbox, which\n * re-parses them exactly like a host launch. The projection never contains\n * --sandbox: a sandboxed launch must not provision another sandbox.\n */\nexport function buildSandboxForwardArgs(options: HarnessOptions): string[] {\n const args: string[] = [MAJOR_MODE_OPTION, options.majorMode, PRESET_OPTION, options.preset, CWD_OPTION, options.cwd];\n if (options.profile) args.push(PROFILE_OPTION, options.profile);\n if (options.domains.length > 0) args.push(DOMAINS_OPTION, options.domains.join(','));\n // With no domains and no plugin directories, silence would re-trigger the\n // major mode's default domains inside the sandbox.\n else if (options.pluginDirectories.length === 0) args.push(NO_DOMAINS_OPTION);\n for (const directory of options.pluginDirectories) args.push(PLUGIN_DIRECTORY_OPTION, directory);\n for (const directory of options.additionalDirectories) args.push(ADD_DIRECTORY_OPTION, directory);\n if (options.outputFormat === VIBE_LINT_FORMAT) args.push(OUTPUT_FORMAT_OPTION, VIBE_LINT_FORMAT);\n if (options.automation) args.push(AUTOMATION_OPTION);\n if (options.mute) args.push(MUTE_OPTION);\n if (options.autoStop) args.push(AUTO_STOP_OPTION);\n if (options.allowProtectedWrites) args.push(ALLOW_PROTECTED_WRITES_OPTION);\n if (!options.hooks) args.push(NO_HOOKS_OPTION);\n if (!options.mcp) args.push(NO_MCP_OPTION);\n if (!options.agents) args.push(NO_AGENTS_OPTION);\n return [...args, ...options.piArgs];\n}\n"],"mappings":";;AAGA,MAAM,oBAAoB;AAC1B,MAAM,0BAA0B;AAChC,MAAM,gBAAgB;AACtB,MAAM,aAAa;AACnB,MAAM,uBAAuB;AAC7B,MAAM,mBAAmB;AACzB,MAAM,oBAAoB;AAC1B,MAAM,cAAc;AACpB,MAAM,mBAAmB;AACzB,MAAM,gCAAgC;AACtC,MAAM,kBAAkB;AACxB,MAAM,gBAAgB;AACtB,MAAM,mBAAmB;;;;;;;;AASzB,SAAgB,wBAAwB,SAAmC;CACzE,MAAM,OAAiB;EAACA,sBAAAA;EAAmB,QAAQ;EAAW;EAAe,QAAQ;EAAQ;EAAY,QAAQ;CAAG;CACpH,IAAI,QAAQ,SAAS,KAAK,KAAKC,sBAAAA,gBAAgB,QAAQ,OAAO;CAC9D,IAAI,QAAQ,QAAQ,SAAS,GAAG,KAAK,KAAKC,sBAAAA,gBAAgB,QAAQ,QAAQ,KAAK,GAAG,CAAC;MAG9E,IAAI,QAAQ,kBAAkB,WAAW,GAAG,KAAK,KAAK,iBAAiB;CAC5E,KAAK,MAAM,aAAa,QAAQ,mBAAmB,KAAK,KAAK,yBAAyB,SAAS;CAC/F,KAAK,MAAM,aAAa,QAAQ,uBAAuB,KAAK,KAAKC,sBAAAA,sBAAsB,SAAS;CAChG,IAAI,QAAQ,iBAAiB,kBAAkB,KAAK,KAAK,sBAAsB,gBAAgB;CAC/F,IAAI,QAAQ,YAAY,KAAK,KAAK,iBAAiB;CACnD,IAAI,QAAQ,MAAM,KAAK,KAAK,WAAW;CACvC,IAAI,QAAQ,UAAU,KAAK,KAAK,gBAAgB;CAChD,IAAI,QAAQ,sBAAsB,KAAK,KAAK,6BAA6B;CACzE,IAAI,CAAC,QAAQ,OAAO,KAAK,KAAK,eAAe;CAC7C,IAAI,CAAC,QAAQ,KAAK,KAAK,KAAK,aAAa;CACzC,IAAI,CAAC,QAAQ,QAAQ,KAAK,KAAK,gBAAgB;CAC/C,OAAO,CAAC,GAAG,MAAM,GAAG,QAAQ,MAAM;AACpC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ADD_DIRECTORY_OPTION, DOMAINS_OPTION, MAJOR_MODE_OPTION, PROFILE_OPTION } from "../../matrixOptions.mjs";
|
|
2
|
+
//#region src/cli/commands/sandbox/args.ts
|
|
3
|
+
const NO_DOMAINS_OPTION = "--no-domains";
|
|
4
|
+
const PLUGIN_DIRECTORY_OPTION = "--plugin-dir";
|
|
5
|
+
const PRESET_OPTION = "--preset";
|
|
6
|
+
const CWD_OPTION = "--cwd";
|
|
7
|
+
const OUTPUT_FORMAT_OPTION = "--output-format";
|
|
8
|
+
const VIBE_LINT_FORMAT = "vibe-lint";
|
|
9
|
+
const AUTOMATION_OPTION = "--automation";
|
|
10
|
+
const MUTE_OPTION = "--mute";
|
|
11
|
+
const AUTO_STOP_OPTION = "--auto-stop";
|
|
12
|
+
const ALLOW_PROTECTED_WRITES_OPTION = "--allow-protected-writes";
|
|
13
|
+
const NO_HOOKS_OPTION = "--no-hooks";
|
|
14
|
+
const NO_MCP_OPTION = "--no-mcp";
|
|
15
|
+
const NO_AGENTS_OPTION = "--no-agents";
|
|
16
|
+
/**
|
|
17
|
+
* Projects resolved harness options back into replayable harness arguments.
|
|
18
|
+
*
|
|
19
|
+
* The sandbox provider hands these to the launcher inside the sandbox, which
|
|
20
|
+
* re-parses them exactly like a host launch. The projection never contains
|
|
21
|
+
* --sandbox: a sandboxed launch must not provision another sandbox.
|
|
22
|
+
*/
|
|
23
|
+
function buildSandboxForwardArgs(options) {
|
|
24
|
+
const args = [
|
|
25
|
+
MAJOR_MODE_OPTION,
|
|
26
|
+
options.majorMode,
|
|
27
|
+
PRESET_OPTION,
|
|
28
|
+
options.preset,
|
|
29
|
+
CWD_OPTION,
|
|
30
|
+
options.cwd
|
|
31
|
+
];
|
|
32
|
+
if (options.profile) args.push(PROFILE_OPTION, options.profile);
|
|
33
|
+
if (options.domains.length > 0) args.push(DOMAINS_OPTION, options.domains.join(","));
|
|
34
|
+
else if (options.pluginDirectories.length === 0) args.push(NO_DOMAINS_OPTION);
|
|
35
|
+
for (const directory of options.pluginDirectories) args.push(PLUGIN_DIRECTORY_OPTION, directory);
|
|
36
|
+
for (const directory of options.additionalDirectories) args.push(ADD_DIRECTORY_OPTION, directory);
|
|
37
|
+
if (options.outputFormat === VIBE_LINT_FORMAT) args.push(OUTPUT_FORMAT_OPTION, VIBE_LINT_FORMAT);
|
|
38
|
+
if (options.automation) args.push(AUTOMATION_OPTION);
|
|
39
|
+
if (options.mute) args.push(MUTE_OPTION);
|
|
40
|
+
if (options.autoStop) args.push(AUTO_STOP_OPTION);
|
|
41
|
+
if (options.allowProtectedWrites) args.push(ALLOW_PROTECTED_WRITES_OPTION);
|
|
42
|
+
if (!options.hooks) args.push(NO_HOOKS_OPTION);
|
|
43
|
+
if (!options.mcp) args.push(NO_MCP_OPTION);
|
|
44
|
+
if (!options.agents) args.push(NO_AGENTS_OPTION);
|
|
45
|
+
return [...args, ...options.piArgs];
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { buildSandboxForwardArgs };
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=args.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"args.mjs","names":[],"sources":["../../../../src/cli/commands/sandbox/args.ts"],"sourcesContent":["import type { HarnessOptions } from '../../../composition/types/harness';\nimport { ADD_DIRECTORY_OPTION, DOMAINS_OPTION, MAJOR_MODE_OPTION, PROFILE_OPTION } from '../../matrixOptions';\n\nconst NO_DOMAINS_OPTION = '--no-domains';\nconst PLUGIN_DIRECTORY_OPTION = '--plugin-dir';\nconst PRESET_OPTION = '--preset';\nconst CWD_OPTION = '--cwd';\nconst OUTPUT_FORMAT_OPTION = '--output-format';\nconst VIBE_LINT_FORMAT = 'vibe-lint';\nconst AUTOMATION_OPTION = '--automation';\nconst MUTE_OPTION = '--mute';\nconst AUTO_STOP_OPTION = '--auto-stop';\nconst ALLOW_PROTECTED_WRITES_OPTION = '--allow-protected-writes';\nconst NO_HOOKS_OPTION = '--no-hooks';\nconst NO_MCP_OPTION = '--no-mcp';\nconst NO_AGENTS_OPTION = '--no-agents';\n\n/**\n * Projects resolved harness options back into replayable harness arguments.\n *\n * The sandbox provider hands these to the launcher inside the sandbox, which\n * re-parses them exactly like a host launch. The projection never contains\n * --sandbox: a sandboxed launch must not provision another sandbox.\n */\nexport function buildSandboxForwardArgs(options: HarnessOptions): string[] {\n const args: string[] = [MAJOR_MODE_OPTION, options.majorMode, PRESET_OPTION, options.preset, CWD_OPTION, options.cwd];\n if (options.profile) args.push(PROFILE_OPTION, options.profile);\n if (options.domains.length > 0) args.push(DOMAINS_OPTION, options.domains.join(','));\n // With no domains and no plugin directories, silence would re-trigger the\n // major mode's default domains inside the sandbox.\n else if (options.pluginDirectories.length === 0) args.push(NO_DOMAINS_OPTION);\n for (const directory of options.pluginDirectories) args.push(PLUGIN_DIRECTORY_OPTION, directory);\n for (const directory of options.additionalDirectories) args.push(ADD_DIRECTORY_OPTION, directory);\n if (options.outputFormat === VIBE_LINT_FORMAT) args.push(OUTPUT_FORMAT_OPTION, VIBE_LINT_FORMAT);\n if (options.automation) args.push(AUTOMATION_OPTION);\n if (options.mute) args.push(MUTE_OPTION);\n if (options.autoStop) args.push(AUTO_STOP_OPTION);\n if (options.allowProtectedWrites) args.push(ALLOW_PROTECTED_WRITES_OPTION);\n if (!options.hooks) args.push(NO_HOOKS_OPTION);\n if (!options.mcp) args.push(NO_MCP_OPTION);\n if (!options.agents) args.push(NO_AGENTS_OPTION);\n return [...args, ...options.piArgs];\n}\n"],"mappings":";;AAGA,MAAM,oBAAoB;AAC1B,MAAM,0BAA0B;AAChC,MAAM,gBAAgB;AACtB,MAAM,aAAa;AACnB,MAAM,uBAAuB;AAC7B,MAAM,mBAAmB;AACzB,MAAM,oBAAoB;AAC1B,MAAM,cAAc;AACpB,MAAM,mBAAmB;AACzB,MAAM,gCAAgC;AACtC,MAAM,kBAAkB;AACxB,MAAM,gBAAgB;AACtB,MAAM,mBAAmB;;;;;;;;AASzB,SAAgB,wBAAwB,SAAmC;CACzE,MAAM,OAAiB;EAAC;EAAmB,QAAQ;EAAW;EAAe,QAAQ;EAAQ;EAAY,QAAQ;CAAG;CACpH,IAAI,QAAQ,SAAS,KAAK,KAAK,gBAAgB,QAAQ,OAAO;CAC9D,IAAI,QAAQ,QAAQ,SAAS,GAAG,KAAK,KAAK,gBAAgB,QAAQ,QAAQ,KAAK,GAAG,CAAC;MAG9E,IAAI,QAAQ,kBAAkB,WAAW,GAAG,KAAK,KAAK,iBAAiB;CAC5E,KAAK,MAAM,aAAa,QAAQ,mBAAmB,KAAK,KAAK,yBAAyB,SAAS;CAC/F,KAAK,MAAM,aAAa,QAAQ,uBAAuB,KAAK,KAAK,sBAAsB,SAAS;CAChG,IAAI,QAAQ,iBAAiB,kBAAkB,KAAK,KAAK,sBAAsB,gBAAgB;CAC/F,IAAI,QAAQ,YAAY,KAAK,KAAK,iBAAiB;CACnD,IAAI,QAAQ,MAAM,KAAK,KAAK,WAAW;CACvC,IAAI,QAAQ,UAAU,KAAK,KAAK,gBAAgB;CAChD,IAAI,QAAQ,sBAAsB,KAAK,KAAK,6BAA6B;CACzE,IAAI,CAAC,QAAQ,OAAO,KAAK,KAAK,eAAe;CAC7C,IAAI,CAAC,QAAQ,KAAK,KAAK,KAAK,aAAa;CACzC,IAAI,CAAC,QAAQ,QAAQ,KAAK,KAAK,gBAAgB;CAC/C,OAAO,CAAC,GAAG,MAAM,GAAG,QAAQ,MAAM;AACpC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
let node_url = require("node:url");
|
|
2
|
+
let _agimon_ai_doompi_config_majorModes = require("@agimon-ai/doompi-config/majorModes");
|
|
3
|
+
let _agimon_ai_doompi_core_module_resolution = require("@agimon-ai/doompi-core/module-resolution");
|
|
4
|
+
let _agimon_ai_doompi_core_sandbox_harness = require("@agimon-ai/doompi-core/sandbox-harness");
|
|
5
|
+
//#region src/cli/commands/sandbox/harness.ts
|
|
6
|
+
function configuredPackages(config, layers) {
|
|
7
|
+
const definitions = [...config.default ? [config.default] : [], ...layers.map((layerName) => {
|
|
8
|
+
const layer = config.layers[layerName];
|
|
9
|
+
if (!layer) throw new Error(`Unknown layer: ${layerName}`);
|
|
10
|
+
return layer;
|
|
11
|
+
})];
|
|
12
|
+
const packages = [];
|
|
13
|
+
for (const definition of definitions) for (const configured of definition.packages ?? []) {
|
|
14
|
+
const specifier = typeof configured === "string" ? configured : configured.name;
|
|
15
|
+
const candidate = {
|
|
16
|
+
specifier,
|
|
17
|
+
baseDirectory: definition.baseDirectory
|
|
18
|
+
};
|
|
19
|
+
if (!packages.some((entry) => entry.specifier === specifier && entry.baseDirectory === candidate.baseDirectory)) packages.push(candidate);
|
|
20
|
+
}
|
|
21
|
+
return packages;
|
|
22
|
+
}
|
|
23
|
+
function sandboxEntryFor(configured, repoRoot) {
|
|
24
|
+
if ((0, _agimon_ai_doompi_config_majorModes.isLocalPackageSpecifier)(configured.specifier)) return (0, _agimon_ai_doompi_core_module_resolution.localPackageExport)(configured.specifier, configured.baseDirectory, _agimon_ai_doompi_core_sandbox_harness.SANDBOX_HARNESS_EXPORT_SUBPATH);
|
|
25
|
+
const { name } = (0, _agimon_ai_doompi_core_module_resolution.splitPackageSpecifier)(configured.specifier);
|
|
26
|
+
return (0, _agimon_ai_doompi_core_module_resolution.consumerPackageEntry)(`${name}${_agimon_ai_doompi_core_sandbox_harness.SANDBOX_HARNESS_EXPORT_SUBPATH.slice(1)}`, repoRoot);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Finds the single sandbox harness the selected composition provides.
|
|
30
|
+
*
|
|
31
|
+
* Exactly one package may answer: two sandbox providers cannot both own the
|
|
32
|
+
* launch, and which one wins would otherwise depend on declaration order.
|
|
33
|
+
*/
|
|
34
|
+
function resolveSandboxHarnessEntry(config, layers, repoRoot) {
|
|
35
|
+
const resolutions = [];
|
|
36
|
+
for (const configured of configuredPackages(config, layers)) {
|
|
37
|
+
const entry = sandboxEntryFor(configured, repoRoot);
|
|
38
|
+
if (entry && !resolutions.some((resolution) => resolution.entry === entry)) resolutions.push({
|
|
39
|
+
specifier: configured.specifier,
|
|
40
|
+
entry
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
if (resolutions.length > 1) {
|
|
44
|
+
const names = resolutions.map((resolution) => resolution.specifier).join(", ");
|
|
45
|
+
throw new Error(`Multiple sandbox harnesses in the selected composition: ${names}. Keep exactly one sandbox layer in the major mode.`);
|
|
46
|
+
}
|
|
47
|
+
return resolutions[0];
|
|
48
|
+
}
|
|
49
|
+
/** Imports and validates a sandbox harness entry file. */
|
|
50
|
+
async function loadSandboxHarness(entry) {
|
|
51
|
+
const imported = await import((0, node_url.pathToFileURL)(entry).href);
|
|
52
|
+
if ((0, _agimon_ai_doompi_core_sandbox_harness.isSandboxHarnessModule)(imported)) return imported;
|
|
53
|
+
const fallback = imported?.default;
|
|
54
|
+
if ((0, _agimon_ai_doompi_core_sandbox_harness.isSandboxHarnessModule)(fallback)) return fallback;
|
|
55
|
+
throw new Error(`Sandbox harness at ${entry} does not export launchSandbox().`);
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
exports.loadSandboxHarness = loadSandboxHarness;
|
|
59
|
+
exports.resolveSandboxHarnessEntry = resolveSandboxHarnessEntry;
|
|
60
|
+
|
|
61
|
+
//# sourceMappingURL=harness.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harness.cjs","names":["isLocalPackageSpecifier","localPackageExport","SANDBOX_HARNESS_EXPORT_SUBPATH","splitPackageSpecifier","consumerPackageEntry","pathToFileURL","isSandboxHarnessModule"],"sources":["../../../../src/cli/commands/sandbox/harness.ts"],"sourcesContent":["import { pathToFileURL } from 'node:url';\n\nimport { isLocalPackageSpecifier, type MajorModesConfig } from '@agimon-ai/doompi-config/majorModes';\nimport {\n consumerPackageEntry,\n localPackageExport,\n splitPackageSpecifier,\n} from '@agimon-ai/doompi-core/module-resolution';\nimport {\n isSandboxHarnessModule,\n SANDBOX_HARNESS_EXPORT_SUBPATH,\n type SandboxHarnessModule,\n} from '@agimon-ai/doompi-core/sandbox-harness';\n\nexport interface SandboxHarnessResolution {\n /** Configured package specifier that answered for the sandbox subpath. */\n specifier: string;\n /** Absolute path of the module the harness imports. */\n entry: string;\n}\n\ninterface ConfiguredPackage {\n specifier: string;\n /** Root the specifier resolves against when it is a local path. */\n baseDirectory: string;\n}\n\nfunction configuredPackages(config: MajorModesConfig, layers: readonly string[]): ConfiguredPackage[] {\n const definitions = [\n ...(config.default ? [config.default] : []),\n ...layers.map((layerName) => {\n const layer = config.layers[layerName];\n if (!layer) throw new Error(`Unknown layer: ${layerName}`);\n return layer;\n }),\n ];\n const packages: ConfiguredPackage[] = [];\n for (const definition of definitions) {\n for (const configured of definition.packages ?? []) {\n const specifier = typeof configured === 'string' ? configured : configured.name;\n const candidate = { specifier, baseDirectory: definition.baseDirectory };\n if (!packages.some((entry) => entry.specifier === specifier && entry.baseDirectory === candidate.baseDirectory)) {\n packages.push(candidate);\n }\n }\n }\n return packages;\n}\n\nfunction sandboxEntryFor(configured: ConfiguredPackage, repoRoot: string): string | undefined {\n if (isLocalPackageSpecifier(configured.specifier)) {\n return localPackageExport(configured.specifier, configured.baseDirectory, SANDBOX_HARNESS_EXPORT_SUBPATH);\n }\n const { name } = splitPackageSpecifier(configured.specifier);\n return consumerPackageEntry(`${name}${SANDBOX_HARNESS_EXPORT_SUBPATH.slice(1)}`, repoRoot);\n}\n\n/**\n * Finds the single sandbox harness the selected composition provides.\n *\n * Exactly one package may answer: two sandbox providers cannot both own the\n * launch, and which one wins would otherwise depend on declaration order.\n */\nexport function resolveSandboxHarnessEntry(\n config: MajorModesConfig,\n layers: readonly string[],\n repoRoot: string,\n): SandboxHarnessResolution | undefined {\n const resolutions: SandboxHarnessResolution[] = [];\n for (const configured of configuredPackages(config, layers)) {\n const entry = sandboxEntryFor(configured, repoRoot);\n if (entry && !resolutions.some((resolution) => resolution.entry === entry)) {\n resolutions.push({ specifier: configured.specifier, entry });\n }\n }\n if (resolutions.length > 1) {\n const names = resolutions.map((resolution) => resolution.specifier).join(', ');\n throw new Error(\n `Multiple sandbox harnesses in the selected composition: ${names}. Keep exactly one sandbox layer in the major mode.`,\n );\n }\n return resolutions[0];\n}\n\n/** Imports and validates a sandbox harness entry file. */\nexport async function loadSandboxHarness(entry: string): Promise<SandboxHarnessModule> {\n const imported: unknown = await import(pathToFileURL(entry).href);\n if (isSandboxHarnessModule(imported)) return imported;\n const fallback = (imported as { default?: unknown } | null)?.default;\n if (isSandboxHarnessModule(fallback)) return fallback;\n throw new Error(`Sandbox harness at ${entry} does not export launchSandbox().`);\n}\n"],"mappings":";;;;;AA2BA,SAAS,mBAAmB,QAA0B,QAAgD;CACpG,MAAM,cAAc,CAClB,GAAI,OAAO,UAAU,CAAC,OAAO,OAAO,IAAI,CAAC,GACzC,GAAG,OAAO,KAAK,cAAc;EAC3B,MAAM,QAAQ,OAAO,OAAO;EAC5B,IAAI,CAAC,OAAO,MAAM,IAAI,MAAM,kBAAkB,WAAW;EACzD,OAAO;CACT,CAAC,CACH;CACA,MAAM,WAAgC,CAAC;CACvC,KAAK,MAAM,cAAc,aACvB,KAAK,MAAM,cAAc,WAAW,YAAY,CAAC,GAAG;EAClD,MAAM,YAAY,OAAO,eAAe,WAAW,aAAa,WAAW;EAC3E,MAAM,YAAY;GAAE;GAAW,eAAe,WAAW;EAAc;EACvE,IAAI,CAAC,SAAS,MAAM,UAAU,MAAM,cAAc,aAAa,MAAM,kBAAkB,UAAU,aAAa,GAC5G,SAAS,KAAK,SAAS;CAE3B;CAEF,OAAO;AACT;AAEA,SAAS,gBAAgB,YAA+B,UAAsC;CAC5F,KAAA,GAAIA,oCAAAA,wBAAAA,CAAwB,WAAW,SAAS,GAC9C,QAAA,GAAOC,yCAAAA,mBAAAA,CAAmB,WAAW,WAAW,WAAW,eAAeC,uCAAAA,8BAA8B;CAE1G,MAAM,EAAE,UAAA,GAASC,yCAAAA,sBAAAA,CAAsB,WAAW,SAAS;CAC3D,QAAA,GAAOC,yCAAAA,qBAAAA,CAAqB,GAAG,OAAOF,uCAAAA,+BAA+B,MAAM,CAAC,KAAK,QAAQ;AAC3F;;;;;;;AAQA,SAAgB,2BACd,QACA,QACA,UACsC;CACtC,MAAM,cAA0C,CAAC;CACjD,KAAK,MAAM,cAAc,mBAAmB,QAAQ,MAAM,GAAG;EAC3D,MAAM,QAAQ,gBAAgB,YAAY,QAAQ;EAClD,IAAI,SAAS,CAAC,YAAY,MAAM,eAAe,WAAW,UAAU,KAAK,GACvE,YAAY,KAAK;GAAE,WAAW,WAAW;GAAW;EAAM,CAAC;CAE/D;CACA,IAAI,YAAY,SAAS,GAAG;EAC1B,MAAM,QAAQ,YAAY,KAAK,eAAe,WAAW,SAAS,CAAC,CAAC,KAAK,IAAI;EAC7E,MAAM,IAAI,MACR,2DAA2D,MAAM,oDACnE;CACF;CACA,OAAO,YAAY;AACrB;;AAGA,eAAsB,mBAAmB,OAA8C;CACrF,MAAM,WAAoB,MAAM,QAAA,GAAOG,SAAAA,cAAAA,CAAc,KAAK,CAAC,CAAC;CAC5D,KAAA,GAAIC,uCAAAA,uBAAAA,CAAuB,QAAQ,GAAG,OAAO;CAC7C,MAAM,WAAY,UAA2C;CAC7D,KAAA,GAAIA,uCAAAA,uBAAAA,CAAuB,QAAQ,GAAG,OAAO;CAC7C,MAAM,IAAI,MAAM,sBAAsB,MAAM,kCAAkC;AAChF"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { pathToFileURL } from "node:url";
|
|
2
|
+
import { isLocalPackageSpecifier } from "@agimon-ai/doompi-config/majorModes";
|
|
3
|
+
import { consumerPackageEntry, localPackageExport, splitPackageSpecifier } from "@agimon-ai/doompi-core/module-resolution";
|
|
4
|
+
import { SANDBOX_HARNESS_EXPORT_SUBPATH, isSandboxHarnessModule } from "@agimon-ai/doompi-core/sandbox-harness";
|
|
5
|
+
//#region src/cli/commands/sandbox/harness.ts
|
|
6
|
+
function configuredPackages(config, layers) {
|
|
7
|
+
const definitions = [...config.default ? [config.default] : [], ...layers.map((layerName) => {
|
|
8
|
+
const layer = config.layers[layerName];
|
|
9
|
+
if (!layer) throw new Error(`Unknown layer: ${layerName}`);
|
|
10
|
+
return layer;
|
|
11
|
+
})];
|
|
12
|
+
const packages = [];
|
|
13
|
+
for (const definition of definitions) for (const configured of definition.packages ?? []) {
|
|
14
|
+
const specifier = typeof configured === "string" ? configured : configured.name;
|
|
15
|
+
const candidate = {
|
|
16
|
+
specifier,
|
|
17
|
+
baseDirectory: definition.baseDirectory
|
|
18
|
+
};
|
|
19
|
+
if (!packages.some((entry) => entry.specifier === specifier && entry.baseDirectory === candidate.baseDirectory)) packages.push(candidate);
|
|
20
|
+
}
|
|
21
|
+
return packages;
|
|
22
|
+
}
|
|
23
|
+
function sandboxEntryFor(configured, repoRoot) {
|
|
24
|
+
if (isLocalPackageSpecifier(configured.specifier)) return localPackageExport(configured.specifier, configured.baseDirectory, SANDBOX_HARNESS_EXPORT_SUBPATH);
|
|
25
|
+
const { name } = splitPackageSpecifier(configured.specifier);
|
|
26
|
+
return consumerPackageEntry(`${name}${SANDBOX_HARNESS_EXPORT_SUBPATH.slice(1)}`, repoRoot);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Finds the single sandbox harness the selected composition provides.
|
|
30
|
+
*
|
|
31
|
+
* Exactly one package may answer: two sandbox providers cannot both own the
|
|
32
|
+
* launch, and which one wins would otherwise depend on declaration order.
|
|
33
|
+
*/
|
|
34
|
+
function resolveSandboxHarnessEntry(config, layers, repoRoot) {
|
|
35
|
+
const resolutions = [];
|
|
36
|
+
for (const configured of configuredPackages(config, layers)) {
|
|
37
|
+
const entry = sandboxEntryFor(configured, repoRoot);
|
|
38
|
+
if (entry && !resolutions.some((resolution) => resolution.entry === entry)) resolutions.push({
|
|
39
|
+
specifier: configured.specifier,
|
|
40
|
+
entry
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
if (resolutions.length > 1) {
|
|
44
|
+
const names = resolutions.map((resolution) => resolution.specifier).join(", ");
|
|
45
|
+
throw new Error(`Multiple sandbox harnesses in the selected composition: ${names}. Keep exactly one sandbox layer in the major mode.`);
|
|
46
|
+
}
|
|
47
|
+
return resolutions[0];
|
|
48
|
+
}
|
|
49
|
+
/** Imports and validates a sandbox harness entry file. */
|
|
50
|
+
async function loadSandboxHarness(entry) {
|
|
51
|
+
const imported = await import(pathToFileURL(entry).href);
|
|
52
|
+
if (isSandboxHarnessModule(imported)) return imported;
|
|
53
|
+
const fallback = imported?.default;
|
|
54
|
+
if (isSandboxHarnessModule(fallback)) return fallback;
|
|
55
|
+
throw new Error(`Sandbox harness at ${entry} does not export launchSandbox().`);
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { loadSandboxHarness, resolveSandboxHarnessEntry };
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=harness.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harness.mjs","names":[],"sources":["../../../../src/cli/commands/sandbox/harness.ts"],"sourcesContent":["import { pathToFileURL } from 'node:url';\n\nimport { isLocalPackageSpecifier, type MajorModesConfig } from '@agimon-ai/doompi-config/majorModes';\nimport {\n consumerPackageEntry,\n localPackageExport,\n splitPackageSpecifier,\n} from '@agimon-ai/doompi-core/module-resolution';\nimport {\n isSandboxHarnessModule,\n SANDBOX_HARNESS_EXPORT_SUBPATH,\n type SandboxHarnessModule,\n} from '@agimon-ai/doompi-core/sandbox-harness';\n\nexport interface SandboxHarnessResolution {\n /** Configured package specifier that answered for the sandbox subpath. */\n specifier: string;\n /** Absolute path of the module the harness imports. */\n entry: string;\n}\n\ninterface ConfiguredPackage {\n specifier: string;\n /** Root the specifier resolves against when it is a local path. */\n baseDirectory: string;\n}\n\nfunction configuredPackages(config: MajorModesConfig, layers: readonly string[]): ConfiguredPackage[] {\n const definitions = [\n ...(config.default ? [config.default] : []),\n ...layers.map((layerName) => {\n const layer = config.layers[layerName];\n if (!layer) throw new Error(`Unknown layer: ${layerName}`);\n return layer;\n }),\n ];\n const packages: ConfiguredPackage[] = [];\n for (const definition of definitions) {\n for (const configured of definition.packages ?? []) {\n const specifier = typeof configured === 'string' ? configured : configured.name;\n const candidate = { specifier, baseDirectory: definition.baseDirectory };\n if (!packages.some((entry) => entry.specifier === specifier && entry.baseDirectory === candidate.baseDirectory)) {\n packages.push(candidate);\n }\n }\n }\n return packages;\n}\n\nfunction sandboxEntryFor(configured: ConfiguredPackage, repoRoot: string): string | undefined {\n if (isLocalPackageSpecifier(configured.specifier)) {\n return localPackageExport(configured.specifier, configured.baseDirectory, SANDBOX_HARNESS_EXPORT_SUBPATH);\n }\n const { name } = splitPackageSpecifier(configured.specifier);\n return consumerPackageEntry(`${name}${SANDBOX_HARNESS_EXPORT_SUBPATH.slice(1)}`, repoRoot);\n}\n\n/**\n * Finds the single sandbox harness the selected composition provides.\n *\n * Exactly one package may answer: two sandbox providers cannot both own the\n * launch, and which one wins would otherwise depend on declaration order.\n */\nexport function resolveSandboxHarnessEntry(\n config: MajorModesConfig,\n layers: readonly string[],\n repoRoot: string,\n): SandboxHarnessResolution | undefined {\n const resolutions: SandboxHarnessResolution[] = [];\n for (const configured of configuredPackages(config, layers)) {\n const entry = sandboxEntryFor(configured, repoRoot);\n if (entry && !resolutions.some((resolution) => resolution.entry === entry)) {\n resolutions.push({ specifier: configured.specifier, entry });\n }\n }\n if (resolutions.length > 1) {\n const names = resolutions.map((resolution) => resolution.specifier).join(', ');\n throw new Error(\n `Multiple sandbox harnesses in the selected composition: ${names}. Keep exactly one sandbox layer in the major mode.`,\n );\n }\n return resolutions[0];\n}\n\n/** Imports and validates a sandbox harness entry file. */\nexport async function loadSandboxHarness(entry: string): Promise<SandboxHarnessModule> {\n const imported: unknown = await import(pathToFileURL(entry).href);\n if (isSandboxHarnessModule(imported)) return imported;\n const fallback = (imported as { default?: unknown } | null)?.default;\n if (isSandboxHarnessModule(fallback)) return fallback;\n throw new Error(`Sandbox harness at ${entry} does not export launchSandbox().`);\n}\n"],"mappings":";;;;;AA2BA,SAAS,mBAAmB,QAA0B,QAAgD;CACpG,MAAM,cAAc,CAClB,GAAI,OAAO,UAAU,CAAC,OAAO,OAAO,IAAI,CAAC,GACzC,GAAG,OAAO,KAAK,cAAc;EAC3B,MAAM,QAAQ,OAAO,OAAO;EAC5B,IAAI,CAAC,OAAO,MAAM,IAAI,MAAM,kBAAkB,WAAW;EACzD,OAAO;CACT,CAAC,CACH;CACA,MAAM,WAAgC,CAAC;CACvC,KAAK,MAAM,cAAc,aACvB,KAAK,MAAM,cAAc,WAAW,YAAY,CAAC,GAAG;EAClD,MAAM,YAAY,OAAO,eAAe,WAAW,aAAa,WAAW;EAC3E,MAAM,YAAY;GAAE;GAAW,eAAe,WAAW;EAAc;EACvE,IAAI,CAAC,SAAS,MAAM,UAAU,MAAM,cAAc,aAAa,MAAM,kBAAkB,UAAU,aAAa,GAC5G,SAAS,KAAK,SAAS;CAE3B;CAEF,OAAO;AACT;AAEA,SAAS,gBAAgB,YAA+B,UAAsC;CAC5F,IAAI,wBAAwB,WAAW,SAAS,GAC9C,OAAO,mBAAmB,WAAW,WAAW,WAAW,eAAe,8BAA8B;CAE1G,MAAM,EAAE,SAAS,sBAAsB,WAAW,SAAS;CAC3D,OAAO,qBAAqB,GAAG,OAAO,+BAA+B,MAAM,CAAC,KAAK,QAAQ;AAC3F;;;;;;;AAQA,SAAgB,2BACd,QACA,QACA,UACsC;CACtC,MAAM,cAA0C,CAAC;CACjD,KAAK,MAAM,cAAc,mBAAmB,QAAQ,MAAM,GAAG;EAC3D,MAAM,QAAQ,gBAAgB,YAAY,QAAQ;EAClD,IAAI,SAAS,CAAC,YAAY,MAAM,eAAe,WAAW,UAAU,KAAK,GACvE,YAAY,KAAK;GAAE,WAAW,WAAW;GAAW;EAAM,CAAC;CAE/D;CACA,IAAI,YAAY,SAAS,GAAG;EAC1B,MAAM,QAAQ,YAAY,KAAK,eAAe,WAAW,SAAS,CAAC,CAAC,KAAK,IAAI;EAC7E,MAAM,IAAI,MACR,2DAA2D,MAAM,oDACnE;CACF;CACA,OAAO,YAAY;AACrB;;AAGA,eAAsB,mBAAmB,OAA8C;CACrF,MAAM,WAAoB,MAAM,OAAO,cAAc,KAAK,CAAC,CAAC;CAC5D,IAAI,uBAAuB,QAAQ,GAAG,OAAO;CAC7C,MAAM,WAAY,UAA2C;CAC7D,IAAI,uBAAuB,QAAQ,GAAG,OAAO;CAC7C,MAAM,IAAI,MAAM,sBAAsB,MAAM,kCAAkC;AAChF"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const require_baseCommand = require("../baseCommand.cjs");
|
|
2
|
+
let _agimon_ai_doompi_core_runtime_log_sink_telemetry = require("@agimon-ai/doompi-core/runtime-log-sink-telemetry");
|
|
3
|
+
let _agimon_ai_doompi_core_sandbox_harness = require("@agimon-ai/doompi-core/sandbox-harness");
|
|
4
|
+
//#region src/cli/commands/sandbox/index.ts
|
|
5
|
+
const SANDBOX_MODE = "sandbox";
|
|
6
|
+
/**
|
|
7
|
+
* Delegates a --sandbox launch to the harness a selected layer provides.
|
|
8
|
+
*
|
|
9
|
+
* Core stays sandbox-agnostic: it resolves the module the composition
|
|
10
|
+
* declares, hands over the replayable arguments, and reports the exit code.
|
|
11
|
+
*/
|
|
12
|
+
async function runSandbox(context, telemetry) {
|
|
13
|
+
const { options, environment } = context;
|
|
14
|
+
if ((0, _agimon_ai_doompi_core_sandbox_harness.insideSandbox)(environment)) throw new Error("This session already runs inside a DoomPi sandbox; nested --sandbox is not supported.");
|
|
15
|
+
const [{ loadSandboxHarness, resolveSandboxHarnessEntry }, { buildSandboxForwardArgs }] = await Promise.all([Promise.resolve().then(() => require("./harness.cjs")), Promise.resolve().then(() => require("./args.cjs"))]);
|
|
16
|
+
const resolution = resolveSandboxHarnessEntry(context.majorModesConfig, context.selectedLayers, options.repoRoot);
|
|
17
|
+
if (!resolution) throw new Error(`--sandbox needs a layer package exporting ${_agimon_ai_doompi_core_sandbox_harness.SANDBOX_HARNESS_EXPORT_SUBPATH} in the selected major mode; add a sandbox layer to "${options.majorMode}" in .doom/modes.yaml.`);
|
|
18
|
+
const harness = await loadSandboxHarness(resolution.entry);
|
|
19
|
+
const startedAt = Date.now();
|
|
20
|
+
const result = await telemetry.runInSpan("doom_pi.sandbox_session", {
|
|
21
|
+
"harness.mode": SANDBOX_MODE,
|
|
22
|
+
"harness.sandbox.provider": resolution.specifier
|
|
23
|
+
}, () => harness.launchSandbox({
|
|
24
|
+
repoRoot: options.repoRoot,
|
|
25
|
+
cwd: options.cwd,
|
|
26
|
+
forwardArgs: buildSandboxForwardArgs(options),
|
|
27
|
+
environment,
|
|
28
|
+
onProgress: (message) => process.stderr.write(`[doompi] sandbox: ${message}\n`)
|
|
29
|
+
})).catch(async (error) => {
|
|
30
|
+
await telemetry.recordError(_agimon_ai_doompi_core_runtime_log_sink_telemetry.HARNESS_EVENT.launchFailed, error, {
|
|
31
|
+
"harness.mode": SANDBOX_MODE,
|
|
32
|
+
"harness.duration_ms": Date.now() - startedAt
|
|
33
|
+
});
|
|
34
|
+
throw error;
|
|
35
|
+
});
|
|
36
|
+
telemetry.recordEvent(_agimon_ai_doompi_core_runtime_log_sink_telemetry.HARNESS_EVENT.launchCompleted, {
|
|
37
|
+
"harness.exit_code": result,
|
|
38
|
+
"harness.duration_ms": Date.now() - startedAt,
|
|
39
|
+
"harness.mode": SANDBOX_MODE
|
|
40
|
+
});
|
|
41
|
+
return result;
|
|
42
|
+
}
|
|
43
|
+
/** Compatibility API. Executables call the command function directly. */
|
|
44
|
+
var SandboxLaunchCommand = class extends require_baseCommand.BaseCommand {
|
|
45
|
+
name = "sandbox-launch";
|
|
46
|
+
matches(options) {
|
|
47
|
+
return options.sandbox;
|
|
48
|
+
}
|
|
49
|
+
async execute(context, telemetry) {
|
|
50
|
+
return runSandbox(context, telemetry);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
//#endregion
|
|
54
|
+
exports.SandboxLaunchCommand = SandboxLaunchCommand;
|
|
55
|
+
exports.runSandbox = runSandbox;
|
|
56
|
+
|
|
57
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["insideSandbox","SANDBOX_HARNESS_EXPORT_SUBPATH","HARNESS_EVENT","BaseCommand"],"sources":["../../../../src/cli/commands/sandbox/index.ts"],"sourcesContent":["import { HARNESS_EVENT, type HarnessTelemetry } from '@agimon-ai/doompi-core/runtime-log-sink-telemetry';\nimport { insideSandbox, SANDBOX_HARNESS_EXPORT_SUBPATH } from '@agimon-ai/doompi-core/sandbox-harness';\n\nimport type { HarnessContext } from '../../../builders/cli/harnessContext';\nimport type { HarnessOptions } from '../../../composition/types/harness';\nimport { BaseCommand } from '../baseCommand';\n\nconst SANDBOX_MODE = 'sandbox';\n\n/**\n * Delegates a --sandbox launch to the harness a selected layer provides.\n *\n * Core stays sandbox-agnostic: it resolves the module the composition\n * declares, hands over the replayable arguments, and reports the exit code.\n */\nexport async function runSandbox(context: HarnessContext, telemetry: HarnessTelemetry): Promise<number> {\n const { options, environment } = context;\n if (insideSandbox(environment)) {\n throw new Error('This session already runs inside a DoomPi sandbox; nested --sandbox is not supported.');\n }\n\n const [{ loadSandboxHarness, resolveSandboxHarnessEntry }, { buildSandboxForwardArgs }] = await Promise.all([\n import('./harness'),\n import('./args'),\n ]);\n const resolution = resolveSandboxHarnessEntry(context.majorModesConfig, context.selectedLayers, options.repoRoot);\n if (!resolution) {\n throw new Error(\n `--sandbox needs a layer package exporting ${SANDBOX_HARNESS_EXPORT_SUBPATH} in the selected major mode; ` +\n `add a sandbox layer to \"${options.majorMode}\" in .doom/modes.yaml.`,\n );\n }\n\n const harness = await loadSandboxHarness(resolution.entry);\n const startedAt = Date.now();\n const result = await telemetry\n .runInSpan(\n 'doom_pi.sandbox_session',\n { 'harness.mode': SANDBOX_MODE, 'harness.sandbox.provider': resolution.specifier },\n () =>\n harness.launchSandbox({\n repoRoot: options.repoRoot,\n cwd: options.cwd,\n forwardArgs: buildSandboxForwardArgs(options),\n environment,\n onProgress: (message) => process.stderr.write(`[doompi] sandbox: ${message}\\n`),\n }),\n )\n .catch(async (error: unknown) => {\n await telemetry.recordError(HARNESS_EVENT.launchFailed, error, {\n 'harness.mode': SANDBOX_MODE,\n 'harness.duration_ms': Date.now() - startedAt,\n });\n throw error;\n });\n\n void telemetry.recordEvent(HARNESS_EVENT.launchCompleted, {\n 'harness.exit_code': result,\n 'harness.duration_ms': Date.now() - startedAt,\n 'harness.mode': SANDBOX_MODE,\n });\n return result;\n}\n\n/** Compatibility API. Executables call the command function directly. */\nexport class SandboxLaunchCommand extends BaseCommand {\n readonly name = 'sandbox-launch';\n\n matches(options: HarnessOptions): boolean {\n return options.sandbox;\n }\n\n async execute(context: HarnessContext, telemetry: HarnessTelemetry): Promise<number> {\n return runSandbox(context, telemetry);\n }\n}\n"],"mappings":";;;;AAOA,MAAM,eAAe;;;;;;;AAQrB,eAAsB,WAAW,SAAyB,WAA8C;CACtG,MAAM,EAAE,SAAS,gBAAgB;CACjC,KAAA,GAAIA,uCAAAA,cAAAA,CAAc,WAAW,GAC3B,MAAM,IAAI,MAAM,uFAAuF;CAGzG,MAAM,CAAC,EAAE,oBAAoB,8BAA8B,EAAE,6BAA6B,MAAM,QAAQ,IAAI,CAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAC1G,eAAA,CAAA,GAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QACA,YAAA,CAAA,CACF,CAAC;CACD,MAAM,aAAa,2BAA2B,QAAQ,kBAAkB,QAAQ,gBAAgB,QAAQ,QAAQ;CAChH,IAAI,CAAC,YACH,MAAM,IAAI,MACR,6CAA6CC,uCAAAA,+BAA+B,uDAC/C,QAAQ,UAAU,uBACjD;CAGF,MAAM,UAAU,MAAM,mBAAmB,WAAW,KAAK;CACzD,MAAM,YAAY,KAAK,IAAI;CAC3B,MAAM,SAAS,MAAM,UAClB,UACC,2BACA;EAAE,gBAAgB;EAAc,4BAA4B,WAAW;CAAU,SAE/E,QAAQ,cAAc;EACpB,UAAU,QAAQ;EAClB,KAAK,QAAQ;EACb,aAAa,wBAAwB,OAAO;EAC5C;EACA,aAAa,YAAY,QAAQ,OAAO,MAAM,qBAAqB,QAAQ,GAAG;CAChF,CAAC,CACL,CAAC,CACA,MAAM,OAAO,UAAmB;EAC/B,MAAM,UAAU,YAAYC,kDAAAA,cAAc,cAAc,OAAO;GAC7D,gBAAgB;GAChB,uBAAuB,KAAK,IAAI,IAAI;EACtC,CAAC;EACD,MAAM;CACR,CAAC;CAEH,UAAe,YAAYA,kDAAAA,cAAc,iBAAiB;EACxD,qBAAqB;EACrB,uBAAuB,KAAK,IAAI,IAAI;EACpC,gBAAgB;CAClB,CAAC;CACD,OAAO;AACT;;AAGA,IAAa,uBAAb,cAA0CC,oBAAAA,YAAY;CACpD,OAAgB;CAEhB,QAAQ,SAAkC;EACxC,OAAO,QAAQ;CACjB;CAEA,MAAM,QAAQ,SAAyB,WAA8C;EACnF,OAAO,WAAW,SAAS,SAAS;CACtC;AACF"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { BaseCommand } from "../baseCommand.mjs";
|
|
2
|
+
import { HARNESS_EVENT } from "@agimon-ai/doompi-core/runtime-log-sink-telemetry";
|
|
3
|
+
import { SANDBOX_HARNESS_EXPORT_SUBPATH, insideSandbox } from "@agimon-ai/doompi-core/sandbox-harness";
|
|
4
|
+
//#region src/cli/commands/sandbox/index.ts
|
|
5
|
+
const SANDBOX_MODE = "sandbox";
|
|
6
|
+
/**
|
|
7
|
+
* Delegates a --sandbox launch to the harness a selected layer provides.
|
|
8
|
+
*
|
|
9
|
+
* Core stays sandbox-agnostic: it resolves the module the composition
|
|
10
|
+
* declares, hands over the replayable arguments, and reports the exit code.
|
|
11
|
+
*/
|
|
12
|
+
async function runSandbox(context, telemetry) {
|
|
13
|
+
const { options, environment } = context;
|
|
14
|
+
if (insideSandbox(environment)) throw new Error("This session already runs inside a DoomPi sandbox; nested --sandbox is not supported.");
|
|
15
|
+
const [{ loadSandboxHarness, resolveSandboxHarnessEntry }, { buildSandboxForwardArgs }] = await Promise.all([import("./harness.mjs"), import("./args.mjs")]);
|
|
16
|
+
const resolution = resolveSandboxHarnessEntry(context.majorModesConfig, context.selectedLayers, options.repoRoot);
|
|
17
|
+
if (!resolution) throw new Error(`--sandbox needs a layer package exporting ${SANDBOX_HARNESS_EXPORT_SUBPATH} in the selected major mode; add a sandbox layer to "${options.majorMode}" in .doom/modes.yaml.`);
|
|
18
|
+
const harness = await loadSandboxHarness(resolution.entry);
|
|
19
|
+
const startedAt = Date.now();
|
|
20
|
+
const result = await telemetry.runInSpan("doom_pi.sandbox_session", {
|
|
21
|
+
"harness.mode": SANDBOX_MODE,
|
|
22
|
+
"harness.sandbox.provider": resolution.specifier
|
|
23
|
+
}, () => harness.launchSandbox({
|
|
24
|
+
repoRoot: options.repoRoot,
|
|
25
|
+
cwd: options.cwd,
|
|
26
|
+
forwardArgs: buildSandboxForwardArgs(options),
|
|
27
|
+
environment,
|
|
28
|
+
onProgress: (message) => process.stderr.write(`[doompi] sandbox: ${message}\n`)
|
|
29
|
+
})).catch(async (error) => {
|
|
30
|
+
await telemetry.recordError(HARNESS_EVENT.launchFailed, error, {
|
|
31
|
+
"harness.mode": SANDBOX_MODE,
|
|
32
|
+
"harness.duration_ms": Date.now() - startedAt
|
|
33
|
+
});
|
|
34
|
+
throw error;
|
|
35
|
+
});
|
|
36
|
+
telemetry.recordEvent(HARNESS_EVENT.launchCompleted, {
|
|
37
|
+
"harness.exit_code": result,
|
|
38
|
+
"harness.duration_ms": Date.now() - startedAt,
|
|
39
|
+
"harness.mode": SANDBOX_MODE
|
|
40
|
+
});
|
|
41
|
+
return result;
|
|
42
|
+
}
|
|
43
|
+
/** Compatibility API. Executables call the command function directly. */
|
|
44
|
+
var SandboxLaunchCommand = class extends BaseCommand {
|
|
45
|
+
name = "sandbox-launch";
|
|
46
|
+
matches(options) {
|
|
47
|
+
return options.sandbox;
|
|
48
|
+
}
|
|
49
|
+
async execute(context, telemetry) {
|
|
50
|
+
return runSandbox(context, telemetry);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
//#endregion
|
|
54
|
+
export { SandboxLaunchCommand, runSandbox };
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/cli/commands/sandbox/index.ts"],"sourcesContent":["import { HARNESS_EVENT, type HarnessTelemetry } from '@agimon-ai/doompi-core/runtime-log-sink-telemetry';\nimport { insideSandbox, SANDBOX_HARNESS_EXPORT_SUBPATH } from '@agimon-ai/doompi-core/sandbox-harness';\n\nimport type { HarnessContext } from '../../../builders/cli/harnessContext';\nimport type { HarnessOptions } from '../../../composition/types/harness';\nimport { BaseCommand } from '../baseCommand';\n\nconst SANDBOX_MODE = 'sandbox';\n\n/**\n * Delegates a --sandbox launch to the harness a selected layer provides.\n *\n * Core stays sandbox-agnostic: it resolves the module the composition\n * declares, hands over the replayable arguments, and reports the exit code.\n */\nexport async function runSandbox(context: HarnessContext, telemetry: HarnessTelemetry): Promise<number> {\n const { options, environment } = context;\n if (insideSandbox(environment)) {\n throw new Error('This session already runs inside a DoomPi sandbox; nested --sandbox is not supported.');\n }\n\n const [{ loadSandboxHarness, resolveSandboxHarnessEntry }, { buildSandboxForwardArgs }] = await Promise.all([\n import('./harness'),\n import('./args'),\n ]);\n const resolution = resolveSandboxHarnessEntry(context.majorModesConfig, context.selectedLayers, options.repoRoot);\n if (!resolution) {\n throw new Error(\n `--sandbox needs a layer package exporting ${SANDBOX_HARNESS_EXPORT_SUBPATH} in the selected major mode; ` +\n `add a sandbox layer to \"${options.majorMode}\" in .doom/modes.yaml.`,\n );\n }\n\n const harness = await loadSandboxHarness(resolution.entry);\n const startedAt = Date.now();\n const result = await telemetry\n .runInSpan(\n 'doom_pi.sandbox_session',\n { 'harness.mode': SANDBOX_MODE, 'harness.sandbox.provider': resolution.specifier },\n () =>\n harness.launchSandbox({\n repoRoot: options.repoRoot,\n cwd: options.cwd,\n forwardArgs: buildSandboxForwardArgs(options),\n environment,\n onProgress: (message) => process.stderr.write(`[doompi] sandbox: ${message}\\n`),\n }),\n )\n .catch(async (error: unknown) => {\n await telemetry.recordError(HARNESS_EVENT.launchFailed, error, {\n 'harness.mode': SANDBOX_MODE,\n 'harness.duration_ms': Date.now() - startedAt,\n });\n throw error;\n });\n\n void telemetry.recordEvent(HARNESS_EVENT.launchCompleted, {\n 'harness.exit_code': result,\n 'harness.duration_ms': Date.now() - startedAt,\n 'harness.mode': SANDBOX_MODE,\n });\n return result;\n}\n\n/** Compatibility API. Executables call the command function directly. */\nexport class SandboxLaunchCommand extends BaseCommand {\n readonly name = 'sandbox-launch';\n\n matches(options: HarnessOptions): boolean {\n return options.sandbox;\n }\n\n async execute(context: HarnessContext, telemetry: HarnessTelemetry): Promise<number> {\n return runSandbox(context, telemetry);\n }\n}\n"],"mappings":";;;;AAOA,MAAM,eAAe;;;;;;;AAQrB,eAAsB,WAAW,SAAyB,WAA8C;CACtG,MAAM,EAAE,SAAS,gBAAgB;CACjC,IAAI,cAAc,WAAW,GAC3B,MAAM,IAAI,MAAM,uFAAuF;CAGzG,MAAM,CAAC,EAAE,oBAAoB,8BAA8B,EAAE,6BAA6B,MAAM,QAAQ,IAAI,CAC1G,OAAO,kBACP,OAAO,aACT,CAAC;CACD,MAAM,aAAa,2BAA2B,QAAQ,kBAAkB,QAAQ,gBAAgB,QAAQ,QAAQ;CAChH,IAAI,CAAC,YACH,MAAM,IAAI,MACR,6CAA6C,+BAA+B,uDAC/C,QAAQ,UAAU,uBACjD;CAGF,MAAM,UAAU,MAAM,mBAAmB,WAAW,KAAK;CACzD,MAAM,YAAY,KAAK,IAAI;CAC3B,MAAM,SAAS,MAAM,UAClB,UACC,2BACA;EAAE,gBAAgB;EAAc,4BAA4B,WAAW;CAAU,SAE/E,QAAQ,cAAc;EACpB,UAAU,QAAQ;EAClB,KAAK,QAAQ;EACb,aAAa,wBAAwB,OAAO;EAC5C;EACA,aAAa,YAAY,QAAQ,OAAO,MAAM,qBAAqB,QAAQ,GAAG;CAChF,CAAC,CACL,CAAC,CACA,MAAM,OAAO,UAAmB;EAC/B,MAAM,UAAU,YAAY,cAAc,cAAc,OAAO;GAC7D,gBAAgB;GAChB,uBAAuB,KAAK,IAAI,IAAI;EACtC,CAAC;EACD,MAAM;CACR,CAAC;CAEH,UAAe,YAAY,cAAc,iBAAiB;EACxD,qBAAqB;EACrB,uBAAuB,KAAK,IAAI,IAAI;EACpC,gBAAgB;CAClB,CAAC;CACD,OAAO;AACT;;AAGA,IAAa,uBAAb,cAA0C,YAAY;CACpD,OAAgB;CAEhB,QAAQ,SAAkC;EACxC,OAAO,QAAQ;CACjB;CAEA,MAAM,QAAQ,SAAyB,WAA8C;EACnF,OAAO,WAAW,SAAS,SAAS;CACtC;AACF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//#region src/cli/commands/sync/help.ts
|
|
2
|
+
const SYNC_MATRIX_OPTIONS = `Matrix options:
|
|
3
|
+
--major-mode <name> Named major mode from .doom/modes.yaml
|
|
4
|
+
--profile <name> Persona and env from .doom/profiles.yaml
|
|
5
|
+
--domains <names> Comma-separated content domains
|
|
6
|
+
--no-domains Select no domains
|
|
7
|
+
`;
|
|
8
|
+
function syncHelp() {
|
|
9
|
+
return `Usage: doompi sync [matrix options] [--check] [--force] [--global]
|
|
10
|
+
|
|
11
|
+
Installs required packages, builds, resolves the composition, and publishes
|
|
12
|
+
synchronized state under ~/.pi/.doom/sync. A repository sync uses the workspace
|
|
13
|
+
package cache. With --global, the current workspace's required published packages
|
|
14
|
+
are promoted to ~/.pi/.doom/.pi/npm without changing personal configuration.
|
|
15
|
+
|
|
16
|
+
Unsupported keys in .doom/config.yaml and .doom/modes.yaml are reported and
|
|
17
|
+
ignored rather than treated as errors, so a config written for a different
|
|
18
|
+
version cannot break a build. Run doompi doctor for the strict check.
|
|
19
|
+
|
|
20
|
+
Options:
|
|
21
|
+
--check Report drift and exit non-zero without writing
|
|
22
|
+
--force Publish a new generation even without drift
|
|
23
|
+
--global Promote workspace packages to the global cache
|
|
24
|
+
-h, --help Show this help
|
|
25
|
+
|
|
26
|
+
${SYNC_MATRIX_OPTIONS}`;
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
exports.syncHelp = syncHelp;
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=help.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help.cjs","names":[],"sources":["../../../../src/cli/commands/sync/help.ts"],"sourcesContent":["const SYNC_MATRIX_OPTIONS = `Matrix options:\n --major-mode <name> Named major mode from .doom/modes.yaml\n --profile <name> Persona and env from .doom/profiles.yaml\n --domains <names> Comma-separated content domains\n --no-domains Select no domains\n`;\n\nexport function syncHelp(): string {\n return `Usage: doompi sync [matrix options] [--check] [--force] [--global]\n\nInstalls required packages, builds, resolves the composition, and publishes\nsynchronized state under ~/.pi/.doom/sync. A repository sync uses the workspace\npackage cache. With --global, the current workspace's required published packages\nare promoted to ~/.pi/.doom/.pi/npm without changing personal configuration.\n\nUnsupported keys in .doom/config.yaml and .doom/modes.yaml are reported and\nignored rather than treated as errors, so a config written for a different\nversion cannot break a build. Run doompi doctor for the strict check.\n\nOptions:\n --check Report drift and exit non-zero without writing\n --force Publish a new generation even without drift\n --global Promote workspace packages to the global cache\n -h, --help Show this help\n\n${SYNC_MATRIX_OPTIONS}`;\n}\n"],"mappings":";AAAA,MAAM,sBAAsB;;;;;;AAO5B,SAAgB,WAAmB;CACjC,OAAO;;;;;;;;;;;;;;;;;EAiBP;AACF"}
|