@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,116 @@
|
|
|
1
|
+
const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_help = require("./help.cjs");
|
|
3
|
+
const require_options = require("../../options.cjs");
|
|
4
|
+
const require_index = require("../../../composition/repository/index.cjs");
|
|
5
|
+
const require_router = require("../../router.cjs");
|
|
6
|
+
const require_builders_cli_extensionAssembler_index = require("../../../builders/cli/extensionAssembler/index.cjs");
|
|
7
|
+
const require_index$1 = require("../../../composition/layerPackageInstaller/index.cjs");
|
|
8
|
+
const require_index$2 = require("../../../composition/projectTrust/index.cjs");
|
|
9
|
+
const require_index$3 = require("../../../composition/syncState/index.cjs");
|
|
10
|
+
const require_index$4 = require("../sync/index.cjs");
|
|
11
|
+
let node_path = require("node:path");
|
|
12
|
+
node_path = require_runtime.__toESM(node_path, 1);
|
|
13
|
+
let _agimon_ai_doompi_config_domains = require("@agimon-ai/doompi-config/domains");
|
|
14
|
+
let node_os = require("node:os");
|
|
15
|
+
node_os = require_runtime.__toESM(node_os, 1);
|
|
16
|
+
let _agimon_ai_doompi_config_majorModes = require("@agimon-ai/doompi-config/majorModes");
|
|
17
|
+
//#region src/cli/commands/doctor/index.ts
|
|
18
|
+
const DOCTOR_COMMAND = "doctor";
|
|
19
|
+
const HARNESS_ROOT_ENV = "DOOMPI_ROOT";
|
|
20
|
+
const LABEL_WIDTH = 14;
|
|
21
|
+
function formatSection(section) {
|
|
22
|
+
const label = section.label.padEnd(LABEL_WIDTH);
|
|
23
|
+
if (section.problems.length === 0) return `${label}ok\n`;
|
|
24
|
+
return `${label}${section.problems.length === 1 ? "FAILED" : `${String(section.problems.length)} problem(s)`}\n${section.problems.map((problem) => ` ${problem}\n`).join("")}`;
|
|
25
|
+
}
|
|
26
|
+
function messageOf(error) {
|
|
27
|
+
return error instanceof Error ? error.message : String(error);
|
|
28
|
+
}
|
|
29
|
+
/** Runs one check, turning the throw a strict parser uses into a reported problem. */
|
|
30
|
+
function check(run) {
|
|
31
|
+
try {
|
|
32
|
+
run();
|
|
33
|
+
return [];
|
|
34
|
+
} catch (error) {
|
|
35
|
+
return [messageOf(error)];
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Reports what is wrong with a DoomPi installation without changing anything.
|
|
40
|
+
*
|
|
41
|
+
* The strict counterpart to `doompi sync`, which tolerates unknown config keys
|
|
42
|
+
* so a build cannot break over one. Everything `sync --check` reports is
|
|
43
|
+
* reported here too, so this is the one command to run when something is off.
|
|
44
|
+
*/
|
|
45
|
+
function runDoctor(args, environment = process.env, currentDirectory = process.cwd(), output = process.stdout) {
|
|
46
|
+
if (require_router.wantsHelp(args.slice(1))) {
|
|
47
|
+
output.write(require_help.doctorHelp());
|
|
48
|
+
return 0;
|
|
49
|
+
}
|
|
50
|
+
const homeDirectory = environment.HOME ?? node_os.default.homedir();
|
|
51
|
+
const inheritedRoot = environment[HARNESS_ROOT_ENV];
|
|
52
|
+
const repoRoot = inheritedRoot ? node_path.default.resolve(inheritedRoot) : require_index.resolveDoomConfigurationRoot(currentDirectory, homeDirectory);
|
|
53
|
+
const sections = [{
|
|
54
|
+
label: "config.yaml",
|
|
55
|
+
problems: check(() => require_index$2.loadDoomConfig(repoRoot))
|
|
56
|
+
}, {
|
|
57
|
+
label: "modes.yaml",
|
|
58
|
+
problems: check(() => (0, _agimon_ai_doompi_config_majorModes.loadMajorModesConfig)(repoRoot, homeDirectory))
|
|
59
|
+
}];
|
|
60
|
+
if (sections.every((section) => section.problems.length === 0)) sections.push(...installationSectionsDoctor(repoRoot, homeDirectory, environment, currentDirectory));
|
|
61
|
+
for (const section of sections) output.write(formatSection(section));
|
|
62
|
+
const problems = sections.reduce((total, section) => total + section.problems.length, 0);
|
|
63
|
+
if (problems === 0) {
|
|
64
|
+
output.write("\nno problems found\n");
|
|
65
|
+
return 0;
|
|
66
|
+
}
|
|
67
|
+
output.write(`\n${String(problems)} problem(s) found\n`);
|
|
68
|
+
return 1;
|
|
69
|
+
}
|
|
70
|
+
function installationSectionsDoctor(repoRoot, homeDirectory, environment, currentDirectory) {
|
|
71
|
+
const majorModesConfig = (0, _agimon_ai_doompi_config_majorModes.loadMajorModesConfig)(repoRoot, homeDirectory);
|
|
72
|
+
const packages = require_index$1.missingLayerPackageSpecifiers(majorModesConfig, Object.keys(majorModesConfig.layers), require_builders_cli_extensionAssembler_index.createLayerResolvers(repoRoot)).map((specifier) => `configured package is not installed: ${specifier}`);
|
|
73
|
+
let state;
|
|
74
|
+
try {
|
|
75
|
+
state = require_index$3.readLocatedSyncState(repoRoot, homeDirectory);
|
|
76
|
+
} catch (error) {
|
|
77
|
+
return [{
|
|
78
|
+
label: "packages",
|
|
79
|
+
problems: packages
|
|
80
|
+
}, {
|
|
81
|
+
label: "sync state",
|
|
82
|
+
problems: [messageOf(error)]
|
|
83
|
+
}];
|
|
84
|
+
}
|
|
85
|
+
const parsed = require_options.parseHarnessArgs([], require_index$4.selectionEnvironment(repoRoot, environment), currentDirectory, majorModesConfig.defaultMajorMode, (0, _agimon_ai_doompi_config_domains.loadDomains)(repoRoot, homeDirectory).defaultDomains);
|
|
86
|
+
const drift = require_index$4.collectDrift(repoRoot, require_index$4.toSelection(parsed.options), state?.state, environment, "persisted", require_index$4.selectionCompositionFingerprint(repoRoot, parsed.options, homeDirectory));
|
|
87
|
+
return [
|
|
88
|
+
{
|
|
89
|
+
label: "packages",
|
|
90
|
+
problems: packages
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
label: "sync state",
|
|
94
|
+
problems: []
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
label: "drift",
|
|
98
|
+
problems: drift
|
|
99
|
+
}
|
|
100
|
+
];
|
|
101
|
+
}
|
|
102
|
+
/** Compatibility API. Executables call the command function directly. */
|
|
103
|
+
var DoctorCommand = class {
|
|
104
|
+
name = DOCTOR_COMMAND;
|
|
105
|
+
matches(args) {
|
|
106
|
+
return args[0] === this.name;
|
|
107
|
+
}
|
|
108
|
+
execute(args, environment = process.env, currentDirectory = process.cwd(), output = process.stdout) {
|
|
109
|
+
return runDoctor(args, environment, currentDirectory, output);
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
//#endregion
|
|
113
|
+
exports.DoctorCommand = DoctorCommand;
|
|
114
|
+
exports.runDoctor = runDoctor;
|
|
115
|
+
|
|
116
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["wantsHelp","doctorHelp","os","path","resolveDoomConfigurationRoot","loadDoomConfig","loadMajorModesConfig","missingLayerPackageSpecifiers","createLayerResolvers","readLocatedSyncState","parseHarnessArgs","selectionEnvironment","loadDomains","collectDrift","toSelection","selectionCompositionFingerprint"],"sources":["../../../../src/cli/commands/doctor/index.ts"],"sourcesContent":["import os from 'node:os';\nimport path from 'node:path';\n\nimport { loadDomains } from '@agimon-ai/doompi-config/domains';\nimport { loadMajorModesConfig } from '@agimon-ai/doompi-config/majorModes';\n\nimport { createLayerResolvers } from '../../../builders/cli/extensionAssembler';\nimport { missingLayerPackageSpecifiers } from '../../../composition/layerPackageInstaller';\nimport { loadDoomConfig } from '../../../composition/projectTrust';\nimport { resolveDoomConfigurationRoot } from '../../../composition/repository';\nimport { readLocatedSyncState } from '../../../composition/syncState';\nimport { parseHarnessArgs } from '../../options';\nimport { wantsHelp } from '../../router';\nimport { collectDrift, selectionCompositionFingerprint, selectionEnvironment, toSelection } from '../sync';\nimport { doctorHelp } from './help';\n\nconst DOCTOR_COMMAND = 'doctor';\nconst HARNESS_ROOT_ENV = 'DOOMPI_ROOT';\nconst LABEL_WIDTH = 14;\n\nexport interface DoctorOutput {\n write(chunk: string): void;\n}\n\n/** One checked area and what it found. Empty problems means the section passed. */\ninterface Section {\n label: string;\n problems: string[];\n}\n\nfunction formatSection(section: Section): string {\n const label = section.label.padEnd(LABEL_WIDTH);\n if (section.problems.length === 0) return `${label}ok\\n`;\n return `${label}${section.problems.length === 1 ? 'FAILED' : `${String(section.problems.length)} problem(s)`}\\n${section.problems\n .map((problem) => ` ${problem}\\n`)\n .join('')}`;\n}\n\nfunction messageOf(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n\n/** Runs one check, turning the throw a strict parser uses into a reported problem. */\nfunction check(run: () => void): string[] {\n try {\n run();\n return [];\n } catch (error) {\n return [messageOf(error)];\n }\n}\n\n/**\n * Reports what is wrong with a DoomPi installation without changing anything.\n *\n * The strict counterpart to `doompi sync`, which tolerates unknown config keys\n * so a build cannot break over one. Everything `sync --check` reports is\n * reported here too, so this is the one command to run when something is off.\n */\nexport function runDoctor(\n args: string[],\n environment: NodeJS.ProcessEnv = process.env,\n currentDirectory = process.cwd(),\n output: DoctorOutput = process.stdout,\n): number {\n if (wantsHelp(args.slice(1))) {\n output.write(doctorHelp());\n return 0;\n }\n const homeDirectory = environment.HOME ?? os.homedir();\n const inheritedRoot = environment[HARNESS_ROOT_ENV];\n const repoRoot = inheritedRoot\n ? path.resolve(inheritedRoot)\n : resolveDoomConfigurationRoot(currentDirectory, homeDirectory);\n\n const sections: Section[] = [\n { label: 'config.yaml', problems: check(() => loadDoomConfig(repoRoot)) },\n { label: 'modes.yaml', problems: check(() => loadMajorModesConfig(repoRoot, homeDirectory)) },\n ];\n // Everything below reads the resolved composition, which cannot be trusted\n // while either file is still unreadable.\n const configurationIsSound = sections.every((section) => section.problems.length === 0);\n if (configurationIsSound)\n sections.push(...installationSectionsDoctor(repoRoot, homeDirectory, environment, currentDirectory));\n\n for (const section of sections) output.write(formatSection(section));\n const problems = sections.reduce((total, section) => total + section.problems.length, 0);\n if (problems === 0) {\n output.write('\\nno problems found\\n');\n return 0;\n }\n output.write(`\\n${String(problems)} problem(s) found\\n`);\n return 1;\n}\n\nfunction installationSectionsDoctor(\n repoRoot: string,\n homeDirectory: string,\n environment: NodeJS.ProcessEnv,\n currentDirectory: string,\n): Section[] {\n const majorModesConfig = loadMajorModesConfig(repoRoot, homeDirectory);\n const packages = missingLayerPackageSpecifiers(\n majorModesConfig,\n Object.keys(majorModesConfig.layers),\n createLayerResolvers(repoRoot),\n ).map((specifier) => `configured package is not installed: ${specifier}`);\n\n let state: Awaited<ReturnType<typeof readLocatedSyncState>>;\n try {\n state = readLocatedSyncState(repoRoot, homeDirectory);\n } catch (error) {\n return [\n { label: 'packages', problems: packages },\n { label: 'sync state', problems: [messageOf(error)] },\n ];\n }\n\n const parsed = parseHarnessArgs(\n [],\n selectionEnvironment(repoRoot, environment),\n currentDirectory,\n majorModesConfig.defaultMajorMode,\n loadDomains(repoRoot, homeDirectory).defaultDomains,\n );\n const drift = collectDrift(\n repoRoot,\n toSelection(parsed.options),\n state?.state,\n environment,\n 'persisted',\n selectionCompositionFingerprint(repoRoot, parsed.options, homeDirectory),\n );\n return [\n { label: 'packages', problems: packages },\n { label: 'sync state', problems: [] },\n { label: 'drift', problems: drift },\n ];\n}\n\n/** Compatibility API. Executables call the command function directly. */\nexport class DoctorCommand {\n readonly name = DOCTOR_COMMAND;\n\n matches(args: string[]): boolean {\n return args[0] === this.name;\n }\n\n execute(\n args: string[],\n environment: NodeJS.ProcessEnv = process.env,\n currentDirectory = process.cwd(),\n output: DoctorOutput = process.stdout,\n ): number {\n return runDoctor(args, environment, currentDirectory, output);\n }\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/cli/commands/doctor/index.d.ts
|
|
2
|
+
export interface DoctorOutput {
|
|
3
|
+
write(chunk: string): void;
|
|
4
|
+
}
|
|
5
|
+
/** Compatibility API. Executables call the command function directly. */
|
|
6
|
+
export declare class DoctorCommand {
|
|
7
|
+
readonly name = "doctor";
|
|
8
|
+
matches(args: string[]): boolean;
|
|
9
|
+
execute(args: string[], environment?: NodeJS.ProcessEnv, currentDirectory?: string, output?: DoctorOutput): number;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../../src/cli/commands/doctor/index.ts"],"mappings":";iBAoBiB;EACf,MAAM;;;qBAwHK;WACF;EAET,QAAQ;EAIR,QACE,gBACA,cAAa,OAAO,YACpB,2BACA,SAAQ"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/cli/commands/doctor/index.d.ts
|
|
2
|
+
export interface DoctorOutput {
|
|
3
|
+
write(chunk: string): void;
|
|
4
|
+
}
|
|
5
|
+
/** Compatibility API. Executables call the command function directly. */
|
|
6
|
+
export declare class DoctorCommand {
|
|
7
|
+
readonly name = "doctor";
|
|
8
|
+
matches(args: string[]): boolean;
|
|
9
|
+
execute(args: string[], environment?: NodeJS.ProcessEnv, currentDirectory?: string, output?: DoctorOutput): number;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../src/cli/commands/doctor/index.ts"],"mappings":";iBAoBiB;EACf,MAAM;;;qBAwHK;WACF;EAET,QAAQ;EAIR,QACE,gBACA,cAAa,OAAO,YACpB,2BACA,SAAQ"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { doctorHelp } from "./help.mjs";
|
|
2
|
+
import { parseHarnessArgs } from "../../options.mjs";
|
|
3
|
+
import { resolveDoomConfigurationRoot } from "../../../composition/repository/index.mjs";
|
|
4
|
+
import { wantsHelp } from "../../router.mjs";
|
|
5
|
+
import { createLayerResolvers } from "../../../builders/cli/extensionAssembler/index.mjs";
|
|
6
|
+
import { missingLayerPackageSpecifiers } from "../../../composition/layerPackageInstaller/index.mjs";
|
|
7
|
+
import { loadDoomConfig } from "../../../composition/projectTrust/index.mjs";
|
|
8
|
+
import { readLocatedSyncState } from "../../../composition/syncState/index.mjs";
|
|
9
|
+
import { collectDrift, selectionCompositionFingerprint, selectionEnvironment, toSelection } from "../sync/index.mjs";
|
|
10
|
+
import path from "node:path";
|
|
11
|
+
import { loadDomains } from "@agimon-ai/doompi-config/domains";
|
|
12
|
+
import os from "node:os";
|
|
13
|
+
import { loadMajorModesConfig } from "@agimon-ai/doompi-config/majorModes";
|
|
14
|
+
//#region src/cli/commands/doctor/index.ts
|
|
15
|
+
const DOCTOR_COMMAND = "doctor";
|
|
16
|
+
const HARNESS_ROOT_ENV = "DOOMPI_ROOT";
|
|
17
|
+
const LABEL_WIDTH = 14;
|
|
18
|
+
function formatSection(section) {
|
|
19
|
+
const label = section.label.padEnd(LABEL_WIDTH);
|
|
20
|
+
if (section.problems.length === 0) return `${label}ok\n`;
|
|
21
|
+
return `${label}${section.problems.length === 1 ? "FAILED" : `${String(section.problems.length)} problem(s)`}\n${section.problems.map((problem) => ` ${problem}\n`).join("")}`;
|
|
22
|
+
}
|
|
23
|
+
function messageOf(error) {
|
|
24
|
+
return error instanceof Error ? error.message : String(error);
|
|
25
|
+
}
|
|
26
|
+
/** Runs one check, turning the throw a strict parser uses into a reported problem. */
|
|
27
|
+
function check(run) {
|
|
28
|
+
try {
|
|
29
|
+
run();
|
|
30
|
+
return [];
|
|
31
|
+
} catch (error) {
|
|
32
|
+
return [messageOf(error)];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Reports what is wrong with a DoomPi installation without changing anything.
|
|
37
|
+
*
|
|
38
|
+
* The strict counterpart to `doompi sync`, which tolerates unknown config keys
|
|
39
|
+
* so a build cannot break over one. Everything `sync --check` reports is
|
|
40
|
+
* reported here too, so this is the one command to run when something is off.
|
|
41
|
+
*/
|
|
42
|
+
function runDoctor(args, environment = process.env, currentDirectory = process.cwd(), output = process.stdout) {
|
|
43
|
+
if (wantsHelp(args.slice(1))) {
|
|
44
|
+
output.write(doctorHelp());
|
|
45
|
+
return 0;
|
|
46
|
+
}
|
|
47
|
+
const homeDirectory = environment.HOME ?? os.homedir();
|
|
48
|
+
const inheritedRoot = environment[HARNESS_ROOT_ENV];
|
|
49
|
+
const repoRoot = inheritedRoot ? path.resolve(inheritedRoot) : resolveDoomConfigurationRoot(currentDirectory, homeDirectory);
|
|
50
|
+
const sections = [{
|
|
51
|
+
label: "config.yaml",
|
|
52
|
+
problems: check(() => loadDoomConfig(repoRoot))
|
|
53
|
+
}, {
|
|
54
|
+
label: "modes.yaml",
|
|
55
|
+
problems: check(() => loadMajorModesConfig(repoRoot, homeDirectory))
|
|
56
|
+
}];
|
|
57
|
+
if (sections.every((section) => section.problems.length === 0)) sections.push(...installationSectionsDoctor(repoRoot, homeDirectory, environment, currentDirectory));
|
|
58
|
+
for (const section of sections) output.write(formatSection(section));
|
|
59
|
+
const problems = sections.reduce((total, section) => total + section.problems.length, 0);
|
|
60
|
+
if (problems === 0) {
|
|
61
|
+
output.write("\nno problems found\n");
|
|
62
|
+
return 0;
|
|
63
|
+
}
|
|
64
|
+
output.write(`\n${String(problems)} problem(s) found\n`);
|
|
65
|
+
return 1;
|
|
66
|
+
}
|
|
67
|
+
function installationSectionsDoctor(repoRoot, homeDirectory, environment, currentDirectory) {
|
|
68
|
+
const majorModesConfig = loadMajorModesConfig(repoRoot, homeDirectory);
|
|
69
|
+
const packages = missingLayerPackageSpecifiers(majorModesConfig, Object.keys(majorModesConfig.layers), createLayerResolvers(repoRoot)).map((specifier) => `configured package is not installed: ${specifier}`);
|
|
70
|
+
let state;
|
|
71
|
+
try {
|
|
72
|
+
state = readLocatedSyncState(repoRoot, homeDirectory);
|
|
73
|
+
} catch (error) {
|
|
74
|
+
return [{
|
|
75
|
+
label: "packages",
|
|
76
|
+
problems: packages
|
|
77
|
+
}, {
|
|
78
|
+
label: "sync state",
|
|
79
|
+
problems: [messageOf(error)]
|
|
80
|
+
}];
|
|
81
|
+
}
|
|
82
|
+
const parsed = parseHarnessArgs([], selectionEnvironment(repoRoot, environment), currentDirectory, majorModesConfig.defaultMajorMode, loadDomains(repoRoot, homeDirectory).defaultDomains);
|
|
83
|
+
const drift = collectDrift(repoRoot, toSelection(parsed.options), state?.state, environment, "persisted", selectionCompositionFingerprint(repoRoot, parsed.options, homeDirectory));
|
|
84
|
+
return [
|
|
85
|
+
{
|
|
86
|
+
label: "packages",
|
|
87
|
+
problems: packages
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
label: "sync state",
|
|
91
|
+
problems: []
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
label: "drift",
|
|
95
|
+
problems: drift
|
|
96
|
+
}
|
|
97
|
+
];
|
|
98
|
+
}
|
|
99
|
+
/** Compatibility API. Executables call the command function directly. */
|
|
100
|
+
var DoctorCommand = class {
|
|
101
|
+
name = DOCTOR_COMMAND;
|
|
102
|
+
matches(args) {
|
|
103
|
+
return args[0] === this.name;
|
|
104
|
+
}
|
|
105
|
+
execute(args, environment = process.env, currentDirectory = process.cwd(), output = process.stdout) {
|
|
106
|
+
return runDoctor(args, environment, currentDirectory, output);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
//#endregion
|
|
110
|
+
export { DoctorCommand, runDoctor };
|
|
111
|
+
|
|
112
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/cli/commands/doctor/index.ts"],"sourcesContent":["import os from 'node:os';\nimport path from 'node:path';\n\nimport { loadDomains } from '@agimon-ai/doompi-config/domains';\nimport { loadMajorModesConfig } from '@agimon-ai/doompi-config/majorModes';\n\nimport { createLayerResolvers } from '../../../builders/cli/extensionAssembler';\nimport { missingLayerPackageSpecifiers } from '../../../composition/layerPackageInstaller';\nimport { loadDoomConfig } from '../../../composition/projectTrust';\nimport { resolveDoomConfigurationRoot } from '../../../composition/repository';\nimport { readLocatedSyncState } from '../../../composition/syncState';\nimport { parseHarnessArgs } from '../../options';\nimport { wantsHelp } from '../../router';\nimport { collectDrift, selectionCompositionFingerprint, selectionEnvironment, toSelection } from '../sync';\nimport { doctorHelp } from './help';\n\nconst DOCTOR_COMMAND = 'doctor';\nconst HARNESS_ROOT_ENV = 'DOOMPI_ROOT';\nconst LABEL_WIDTH = 14;\n\nexport interface DoctorOutput {\n write(chunk: string): void;\n}\n\n/** One checked area and what it found. Empty problems means the section passed. */\ninterface Section {\n label: string;\n problems: string[];\n}\n\nfunction formatSection(section: Section): string {\n const label = section.label.padEnd(LABEL_WIDTH);\n if (section.problems.length === 0) return `${label}ok\\n`;\n return `${label}${section.problems.length === 1 ? 'FAILED' : `${String(section.problems.length)} problem(s)`}\\n${section.problems\n .map((problem) => ` ${problem}\\n`)\n .join('')}`;\n}\n\nfunction messageOf(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n\n/** Runs one check, turning the throw a strict parser uses into a reported problem. */\nfunction check(run: () => void): string[] {\n try {\n run();\n return [];\n } catch (error) {\n return [messageOf(error)];\n }\n}\n\n/**\n * Reports what is wrong with a DoomPi installation without changing anything.\n *\n * The strict counterpart to `doompi sync`, which tolerates unknown config keys\n * so a build cannot break over one. Everything `sync --check` reports is\n * reported here too, so this is the one command to run when something is off.\n */\nexport function runDoctor(\n args: string[],\n environment: NodeJS.ProcessEnv = process.env,\n currentDirectory = process.cwd(),\n output: DoctorOutput = process.stdout,\n): number {\n if (wantsHelp(args.slice(1))) {\n output.write(doctorHelp());\n return 0;\n }\n const homeDirectory = environment.HOME ?? os.homedir();\n const inheritedRoot = environment[HARNESS_ROOT_ENV];\n const repoRoot = inheritedRoot\n ? path.resolve(inheritedRoot)\n : resolveDoomConfigurationRoot(currentDirectory, homeDirectory);\n\n const sections: Section[] = [\n { label: 'config.yaml', problems: check(() => loadDoomConfig(repoRoot)) },\n { label: 'modes.yaml', problems: check(() => loadMajorModesConfig(repoRoot, homeDirectory)) },\n ];\n // Everything below reads the resolved composition, which cannot be trusted\n // while either file is still unreadable.\n const configurationIsSound = sections.every((section) => section.problems.length === 0);\n if (configurationIsSound)\n sections.push(...installationSectionsDoctor(repoRoot, homeDirectory, environment, currentDirectory));\n\n for (const section of sections) output.write(formatSection(section));\n const problems = sections.reduce((total, section) => total + section.problems.length, 0);\n if (problems === 0) {\n output.write('\\nno problems found\\n');\n return 0;\n }\n output.write(`\\n${String(problems)} problem(s) found\\n`);\n return 1;\n}\n\nfunction installationSectionsDoctor(\n repoRoot: string,\n homeDirectory: string,\n environment: NodeJS.ProcessEnv,\n currentDirectory: string,\n): Section[] {\n const majorModesConfig = loadMajorModesConfig(repoRoot, homeDirectory);\n const packages = missingLayerPackageSpecifiers(\n majorModesConfig,\n Object.keys(majorModesConfig.layers),\n createLayerResolvers(repoRoot),\n ).map((specifier) => `configured package is not installed: ${specifier}`);\n\n let state: Awaited<ReturnType<typeof readLocatedSyncState>>;\n try {\n state = readLocatedSyncState(repoRoot, homeDirectory);\n } catch (error) {\n return [\n { label: 'packages', problems: packages },\n { label: 'sync state', problems: [messageOf(error)] },\n ];\n }\n\n const parsed = parseHarnessArgs(\n [],\n selectionEnvironment(repoRoot, environment),\n currentDirectory,\n majorModesConfig.defaultMajorMode,\n loadDomains(repoRoot, homeDirectory).defaultDomains,\n );\n const drift = collectDrift(\n repoRoot,\n toSelection(parsed.options),\n state?.state,\n environment,\n 'persisted',\n selectionCompositionFingerprint(repoRoot, parsed.options, homeDirectory),\n );\n return [\n { label: 'packages', problems: packages },\n { label: 'sync state', problems: [] },\n { label: 'drift', problems: drift },\n ];\n}\n\n/** Compatibility API. Executables call the command function directly. */\nexport class DoctorCommand {\n readonly name = DOCTOR_COMMAND;\n\n matches(args: string[]): boolean {\n return args[0] === this.name;\n }\n\n execute(\n args: string[],\n environment: NodeJS.ProcessEnv = process.env,\n currentDirectory = process.cwd(),\n output: DoctorOutput = process.stdout,\n ): number {\n return runDoctor(args, environment, currentDirectory, output);\n }\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const require_baseCommand = require("../baseCommand.cjs");
|
|
2
|
+
let _agimon_ai_doompi_domain_mcp = require("@agimon-ai/doompi-domain/mcp");
|
|
3
|
+
//#region src/cli/commands/emit-mcp/index.ts
|
|
4
|
+
/**
|
|
5
|
+
* Writes the resolved MCP config to a directory and exits.
|
|
6
|
+
*
|
|
7
|
+
* Lets claude.sh and codex.sh reuse the same domain-scoped MCP surface instead
|
|
8
|
+
* of reimplementing the filter in shell.
|
|
9
|
+
*/
|
|
10
|
+
async function runEmitMcp(context) {
|
|
11
|
+
const { options, resources } = context;
|
|
12
|
+
if (!options.emitMcp) throw new Error("--emit-mcp requires a target directory");
|
|
13
|
+
if (!resources.mcpConfigPath) throw new Error("--emit-mcp requires MCP to be enabled");
|
|
14
|
+
const emitted = await (0, _agimon_ai_doompi_domain_mcp.persistMcpConfig)(resources.mcpConfigPath, resources.temporaryDirectory, options.emitMcp);
|
|
15
|
+
process.stdout.write(`${emitted}\n`);
|
|
16
|
+
return 0;
|
|
17
|
+
}
|
|
18
|
+
/** Compatibility API. Executables call the command function directly. */
|
|
19
|
+
var EmitMcpCommand = class extends require_baseCommand.BaseCommand {
|
|
20
|
+
name = "emit-mcp";
|
|
21
|
+
matches(options) {
|
|
22
|
+
return Boolean(options.emitMcp);
|
|
23
|
+
}
|
|
24
|
+
async execute(context) {
|
|
25
|
+
return runEmitMcp(context);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
exports.EmitMcpCommand = EmitMcpCommand;
|
|
30
|
+
exports.runEmitMcp = runEmitMcp;
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["persistMcpConfig","BaseCommand"],"sources":["../../../../src/cli/commands/emit-mcp/index.ts"],"sourcesContent":["import { persistMcpConfig } from '@agimon-ai/doompi-domain/mcp';\n\nimport type { HarnessContext } from '../../../builders/cli/harnessContext';\nimport type { HarnessOptions } from '../../../composition/types/harness';\nimport { BaseCommand } from '../baseCommand';\n\n/**\n * Writes the resolved MCP config to a directory and exits.\n *\n * Lets claude.sh and codex.sh reuse the same domain-scoped MCP surface instead\n * of reimplementing the filter in shell.\n */\nexport async function runEmitMcp(context: HarnessContext): Promise<number> {\n const { options, resources } = context;\n if (!options.emitMcp) throw new Error('--emit-mcp requires a target directory');\n if (!resources.mcpConfigPath) throw new Error('--emit-mcp requires MCP to be enabled');\n\n const emitted = await persistMcpConfig(resources.mcpConfigPath, resources.temporaryDirectory, options.emitMcp);\n process.stdout.write(`${emitted}\\n`);\n return 0;\n}\n\n/** Compatibility API. Executables call the command function directly. */\nexport class EmitMcpCommand extends BaseCommand {\n readonly name = 'emit-mcp';\n\n matches(options: HarnessOptions): boolean {\n return Boolean(options.emitMcp);\n }\n\n async execute(context: HarnessContext): Promise<number> {\n return runEmitMcp(context);\n }\n}\n"],"mappings":";;;;;;;;;AAYA,eAAsB,WAAW,SAA0C;CACzE,MAAM,EAAE,SAAS,cAAc;CAC/B,IAAI,CAAC,QAAQ,SAAS,MAAM,IAAI,MAAM,wCAAwC;CAC9E,IAAI,CAAC,UAAU,eAAe,MAAM,IAAI,MAAM,uCAAuC;CAErF,MAAM,UAAU,OAAA,GAAMA,6BAAAA,iBAAAA,CAAiB,UAAU,eAAe,UAAU,oBAAoB,QAAQ,OAAO;CAC7G,QAAQ,OAAO,MAAM,GAAG,QAAQ,GAAG;CACnC,OAAO;AACT;;AAGA,IAAa,iBAAb,cAAoCC,oBAAAA,YAAY;CAC9C,OAAgB;CAEhB,QAAQ,SAAkC;EACxC,OAAO,QAAQ,QAAQ,OAAO;CAChC;CAEA,MAAM,QAAQ,SAA0C;EACtD,OAAO,WAAW,OAAO;CAC3B;AACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { HarnessOptions } from "../../../composition/types/harness.cjs";
|
|
2
|
+
import { HarnessContext } from "../../../builders/cli/harnessContext.cjs";
|
|
3
|
+
import { BaseCommand } from "../baseCommand.cjs";
|
|
4
|
+
//#region src/cli/commands/emit-mcp/index.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Writes the resolved MCP config to a directory and exits.
|
|
7
|
+
*
|
|
8
|
+
* Lets claude.sh and codex.sh reuse the same domain-scoped MCP surface instead
|
|
9
|
+
* of reimplementing the filter in shell.
|
|
10
|
+
*/
|
|
11
|
+
export declare function runEmitMcp(context: HarnessContext): Promise<number>;
|
|
12
|
+
/** Compatibility API. Executables call the command function directly. */
|
|
13
|
+
export declare class EmitMcpCommand extends BaseCommand {
|
|
14
|
+
readonly name = "emit-mcp";
|
|
15
|
+
matches(options: HarnessOptions): boolean;
|
|
16
|
+
execute(context: HarnessContext): Promise<number>;
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../../src/cli/commands/emit-mcp/index.ts"],"mappings":";;;;;;;;;;wBAYsB,WAAW,SAAS,iBAAiB;;qBAW9C,uBAAuB;WACzB;EAET,QAAQ,SAAS;EAIX,QAAQ,SAAS,iBAAiB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { HarnessOptions } from "../../../composition/types/harness.mjs";
|
|
2
|
+
import { HarnessContext } from "../../../builders/cli/harnessContext.mjs";
|
|
3
|
+
import { BaseCommand } from "../baseCommand.mjs";
|
|
4
|
+
//#region src/cli/commands/emit-mcp/index.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Writes the resolved MCP config to a directory and exits.
|
|
7
|
+
*
|
|
8
|
+
* Lets claude.sh and codex.sh reuse the same domain-scoped MCP surface instead
|
|
9
|
+
* of reimplementing the filter in shell.
|
|
10
|
+
*/
|
|
11
|
+
export declare function runEmitMcp(context: HarnessContext): Promise<number>;
|
|
12
|
+
/** Compatibility API. Executables call the command function directly. */
|
|
13
|
+
export declare class EmitMcpCommand extends BaseCommand {
|
|
14
|
+
readonly name = "emit-mcp";
|
|
15
|
+
matches(options: HarnessOptions): boolean;
|
|
16
|
+
execute(context: HarnessContext): Promise<number>;
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../src/cli/commands/emit-mcp/index.ts"],"mappings":";;;;;;;;;;wBAYsB,WAAW,SAAS,iBAAiB;;qBAW9C,uBAAuB;WACzB;EAET,QAAQ,SAAS;EAIX,QAAQ,SAAS,iBAAiB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BaseCommand } from "../baseCommand.mjs";
|
|
2
|
+
import { persistMcpConfig } from "@agimon-ai/doompi-domain/mcp";
|
|
3
|
+
//#region src/cli/commands/emit-mcp/index.ts
|
|
4
|
+
/**
|
|
5
|
+
* Writes the resolved MCP config to a directory and exits.
|
|
6
|
+
*
|
|
7
|
+
* Lets claude.sh and codex.sh reuse the same domain-scoped MCP surface instead
|
|
8
|
+
* of reimplementing the filter in shell.
|
|
9
|
+
*/
|
|
10
|
+
async function runEmitMcp(context) {
|
|
11
|
+
const { options, resources } = context;
|
|
12
|
+
if (!options.emitMcp) throw new Error("--emit-mcp requires a target directory");
|
|
13
|
+
if (!resources.mcpConfigPath) throw new Error("--emit-mcp requires MCP to be enabled");
|
|
14
|
+
const emitted = await persistMcpConfig(resources.mcpConfigPath, resources.temporaryDirectory, options.emitMcp);
|
|
15
|
+
process.stdout.write(`${emitted}\n`);
|
|
16
|
+
return 0;
|
|
17
|
+
}
|
|
18
|
+
/** Compatibility API. Executables call the command function directly. */
|
|
19
|
+
var EmitMcpCommand = class extends BaseCommand {
|
|
20
|
+
name = "emit-mcp";
|
|
21
|
+
matches(options) {
|
|
22
|
+
return Boolean(options.emitMcp);
|
|
23
|
+
}
|
|
24
|
+
async execute(context) {
|
|
25
|
+
return runEmitMcp(context);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { EmitMcpCommand, runEmitMcp };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/cli/commands/emit-mcp/index.ts"],"sourcesContent":["import { persistMcpConfig } from '@agimon-ai/doompi-domain/mcp';\n\nimport type { HarnessContext } from '../../../builders/cli/harnessContext';\nimport type { HarnessOptions } from '../../../composition/types/harness';\nimport { BaseCommand } from '../baseCommand';\n\n/**\n * Writes the resolved MCP config to a directory and exits.\n *\n * Lets claude.sh and codex.sh reuse the same domain-scoped MCP surface instead\n * of reimplementing the filter in shell.\n */\nexport async function runEmitMcp(context: HarnessContext): Promise<number> {\n const { options, resources } = context;\n if (!options.emitMcp) throw new Error('--emit-mcp requires a target directory');\n if (!resources.mcpConfigPath) throw new Error('--emit-mcp requires MCP to be enabled');\n\n const emitted = await persistMcpConfig(resources.mcpConfigPath, resources.temporaryDirectory, options.emitMcp);\n process.stdout.write(`${emitted}\\n`);\n return 0;\n}\n\n/** Compatibility API. Executables call the command function directly. */\nexport class EmitMcpCommand extends BaseCommand {\n readonly name = 'emit-mcp';\n\n matches(options: HarnessOptions): boolean {\n return Boolean(options.emitMcp);\n }\n\n async execute(context: HarnessContext): Promise<number> {\n return runEmitMcp(context);\n }\n}\n"],"mappings":";;;;;;;;;AAYA,eAAsB,WAAW,SAA0C;CACzE,MAAM,EAAE,SAAS,cAAc;CAC/B,IAAI,CAAC,QAAQ,SAAS,MAAM,IAAI,MAAM,wCAAwC;CAC9E,IAAI,CAAC,UAAU,eAAe,MAAM,IAAI,MAAM,uCAAuC;CAErF,MAAM,UAAU,MAAM,iBAAiB,UAAU,eAAe,UAAU,oBAAoB,QAAQ,OAAO;CAC7G,QAAQ,OAAO,MAAM,GAAG,QAAQ,GAAG;CACnC,OAAO;AACT;;AAGA,IAAa,iBAAb,cAAoC,YAAY;CAC9C,OAAgB;CAEhB,QAAQ,SAAkC;EACxC,OAAO,QAAQ,QAAQ,OAAO;CAChC;CAEA,MAAM,QAAQ,SAA0C;EACtD,OAAO,WAAW,OAAO;CAC3B;AACF"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_baseCommand = require("../baseCommand.cjs");
|
|
3
|
+
let node_fs = require("node:fs");
|
|
4
|
+
node_fs = require_runtime.__toESM(node_fs, 1);
|
|
5
|
+
let node_path = require("node:path");
|
|
6
|
+
node_path = require_runtime.__toESM(node_path, 1);
|
|
7
|
+
let _agimon_ai_doompi_skill_catalog = require("@agimon-ai/doompi-skill/catalog");
|
|
8
|
+
let _agimon_ai_doompi_config = require("@agimon-ai/doompi-config");
|
|
9
|
+
let _agimon_ai_doompi_core_mcp_schema_cost = require("@agimon-ai/doompi-core/mcp-schema-cost");
|
|
10
|
+
//#region src/cli/commands/explain/index.ts
|
|
11
|
+
function readMcpServers(configPath) {
|
|
12
|
+
return JSON.parse(node_fs.default.readFileSync(configPath, "utf8")).mcpServers ?? {};
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Renders the resolved matrix for --explain. Composition spans three config
|
|
16
|
+
* files, so this answers "why is that loaded" in one command instead of a
|
|
17
|
+
* manual trace through domains, major modes, and plugin subsets.
|
|
18
|
+
*/
|
|
19
|
+
function explainMatrix(explanation) {
|
|
20
|
+
const section = (label, values, empty = "(none)") => `${label}:\n${values.length === 0 ? ` ${empty}` : values.map((value) => ` ${value}`).join("\n")}\n`;
|
|
21
|
+
return [
|
|
22
|
+
`doompi resolved matrix\n\n`,
|
|
23
|
+
`major mode: ${explanation.majorMode}\n\n`,
|
|
24
|
+
section("profile", explanation.profile ? [explanation.profile] : [], "(none)"),
|
|
25
|
+
"\n",
|
|
26
|
+
section("persona", explanation.persona ? [explanation.persona] : [], "(none)"),
|
|
27
|
+
"\n",
|
|
28
|
+
section("domains (content)", explanation.domains),
|
|
29
|
+
"\n",
|
|
30
|
+
section("layers (behavior, from the major mode)", explanation.layers, "core only"),
|
|
31
|
+
"\n",
|
|
32
|
+
section("hook groups from layers", explanation.hookGroups, explanation.hooksEnabled ? "(core groups only)" : "(hooks disabled)"),
|
|
33
|
+
"\n",
|
|
34
|
+
section("plugins", explanation.plugins.map((directory) => node_path.default.basename(directory))),
|
|
35
|
+
"\n",
|
|
36
|
+
section("skill paths", explanation.skillDirectories.map((directory) => node_path.default.relative(process.cwd(), directory))),
|
|
37
|
+
"\n",
|
|
38
|
+
section(explanation.mcpFiltered ? "mcp servers (filtered by domain allowlist)" : "mcp servers (unfiltered)", explanation.mcpServers, "(mcp disabled)"),
|
|
39
|
+
"\n",
|
|
40
|
+
explanation.mcpProxyUpstreams ? section("mcp proxy upstreams (filtered)", explanation.mcpProxyUpstreams) : "mcp proxy upstreams:\n (unfiltered, every upstream in mcp-config.yaml)\n",
|
|
41
|
+
"\n",
|
|
42
|
+
`skills: ${explanation.skillCount} (from ${explanation.skillDirectories.length} paths)\n`,
|
|
43
|
+
`agents: ${explanation.agentCount}\n`,
|
|
44
|
+
`mcp config: ${explanation.mcpConfigPath ?? "(disabled)"}\n`,
|
|
45
|
+
explanation.cost ? renderCost(explanation.cost) : ""
|
|
46
|
+
].join("");
|
|
47
|
+
}
|
|
48
|
+
const TOKEN_COLUMN = 9;
|
|
49
|
+
function tokenLine(label, tokens, note = "") {
|
|
50
|
+
const row = ` ${label.padEnd(16)}${tokens.toLocaleString("en-US").padStart(TOKEN_COLUMN)}`;
|
|
51
|
+
return `${note ? `${row} ${note}` : row}\n`;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The bill, rendered last so the sections above keep their order.
|
|
55
|
+
*
|
|
56
|
+
* Skill and persona figures are derived from files on disk and MCP figures
|
|
57
|
+
* from a cached handshake, so two runs of the same selection print the same
|
|
58
|
+
* numbers and a reader can reproduce them without trusting this output.
|
|
59
|
+
*/
|
|
60
|
+
function renderCost(cost) {
|
|
61
|
+
const startup = cost.skillPromptTokens + cost.personaTokens + cost.mcpToolTokens;
|
|
62
|
+
const unpriced = cost.mcpServers.filter((server) => server.unavailable);
|
|
63
|
+
return [
|
|
64
|
+
"\ncontext cost (tokens)\n",
|
|
65
|
+
tokenLine("skills prompt", cost.skillPromptTokens, "always on"),
|
|
66
|
+
tokenLine("persona", cost.personaTokens, "always on"),
|
|
67
|
+
tokenLine("mcp tools", cost.mcpToolTokens, mcpNote(cost.mcpServers)),
|
|
68
|
+
tokenLine("startup total", startup),
|
|
69
|
+
tokenLine("skill bodies", cost.skillBodyTokens, "read on demand"),
|
|
70
|
+
...cost.mcpServers.filter((server) => !server.unavailable).map(serverLine),
|
|
71
|
+
unpriced.length > 0 ? `\n Not priced: ${unpriced.map((server) => `${server.name} (${server.unavailable})`).join(", ")}\n` : "",
|
|
72
|
+
"\n Excludes skills contributed by extensions, which register after startup.\n"
|
|
73
|
+
].join("");
|
|
74
|
+
}
|
|
75
|
+
function mcpNote(servers) {
|
|
76
|
+
const priced = servers.filter((server) => !server.unavailable);
|
|
77
|
+
if (priced.length === 0) return "always on";
|
|
78
|
+
return `always on, ${priced.reduce((total, server) => total + server.toolCount, 0)} tools from ${priced.length} server${priced.length === 1 ? "" : "s"}`;
|
|
79
|
+
}
|
|
80
|
+
function serverLine(server) {
|
|
81
|
+
return tokenLine(` ${server.name}`, server.tokens, server.cached ? "cached" : "measured now");
|
|
82
|
+
}
|
|
83
|
+
/** Prints the fully resolved matrix instead of launching Pi. */
|
|
84
|
+
async function costExplain(context) {
|
|
85
|
+
const { options, resources } = context;
|
|
86
|
+
try {
|
|
87
|
+
const [catalog, countTokens] = await Promise.all([(0, _agimon_ai_doompi_skill_catalog.buildSkillCatalog)({
|
|
88
|
+
repoRoot: options.repoRoot,
|
|
89
|
+
activeSkillDirectories: resources.skillDirectories,
|
|
90
|
+
extensionSources: []
|
|
91
|
+
}), (0, _agimon_ai_doompi_skill_catalog.counter)()]);
|
|
92
|
+
const persona = context.personaDirectory ? (0, _agimon_ai_doompi_config.buildPersonaPrompt)(context.personaRoot ?? options.repoRoot, context.personaDirectory) : void 0;
|
|
93
|
+
const mcp = resources.mcpConfigPath ? await (0, _agimon_ai_doompi_core_mcp_schema_cost.priceMcpToolSchemas)({
|
|
94
|
+
configPath: resources.mcpConfigPath,
|
|
95
|
+
homeDoomDirectory: (0, _agimon_ai_doompi_config.globalDoomConfigDirectory)(),
|
|
96
|
+
cwd: options.repoRoot,
|
|
97
|
+
environment: context.environment,
|
|
98
|
+
countTokens
|
|
99
|
+
}) : {
|
|
100
|
+
servers: [],
|
|
101
|
+
totalTokens: 0
|
|
102
|
+
};
|
|
103
|
+
return {
|
|
104
|
+
skillPromptTokens: catalog.promptTokens,
|
|
105
|
+
skillBodyTokens: catalog.bodyTokens,
|
|
106
|
+
personaTokens: persona ? countTokens(persona) : 0,
|
|
107
|
+
mcpServers: mcp.servers,
|
|
108
|
+
mcpToolTokens: mcp.totalTokens
|
|
109
|
+
};
|
|
110
|
+
} catch (error) {
|
|
111
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
112
|
+
process.stderr.write(`[doompi] explain: could not price the selection: ${detail}\n`);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
async function runExplain(context) {
|
|
117
|
+
const { options, resources, plugins, mcpAllowlist } = context;
|
|
118
|
+
const cost = await costExplain(context);
|
|
119
|
+
process.stdout.write(explainMatrix({
|
|
120
|
+
cost,
|
|
121
|
+
majorMode: options.majorMode,
|
|
122
|
+
profile: context.profile,
|
|
123
|
+
persona: context.personaDirectory,
|
|
124
|
+
domains: options.domains,
|
|
125
|
+
plugins: plugins.map((entry) => entry.directory),
|
|
126
|
+
layers: context.selectedLayers,
|
|
127
|
+
hookGroups: context.hookGroups,
|
|
128
|
+
hooksEnabled: options.hooks,
|
|
129
|
+
skillDirectories: resources.skillDirectories,
|
|
130
|
+
skillCount: resources.skillCount,
|
|
131
|
+
agentCount: resources.agentCount,
|
|
132
|
+
agentDirectories: resources.agentDirectories,
|
|
133
|
+
mcpConfigPath: resources.mcpConfigPath,
|
|
134
|
+
mcpServers: resources.mcpConfigPath ? Object.keys(readMcpServers(resources.mcpConfigPath)) : [],
|
|
135
|
+
mcpProxyUpstreams: mcpAllowlist?.proxy,
|
|
136
|
+
mcpFiltered: Boolean(mcpAllowlist)
|
|
137
|
+
}));
|
|
138
|
+
return 0;
|
|
139
|
+
}
|
|
140
|
+
/** Compatibility API. Executables call the command function directly. */
|
|
141
|
+
var ExplainCommand = class extends require_baseCommand.BaseCommand {
|
|
142
|
+
name = "explain";
|
|
143
|
+
matches(options) {
|
|
144
|
+
return options.explain;
|
|
145
|
+
}
|
|
146
|
+
async execute(context) {
|
|
147
|
+
return runExplain(context);
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
//#endregion
|
|
151
|
+
exports.ExplainCommand = ExplainCommand;
|
|
152
|
+
exports.explainMatrix = explainMatrix;
|
|
153
|
+
exports.runExplain = runExplain;
|
|
154
|
+
|
|
155
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["fs","path","buildSkillCatalog","counter","buildPersonaPrompt","priceMcpToolSchemas","globalDoomConfigDirectory","BaseCommand"],"sources":["../../../../src/cli/commands/explain/index.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { buildPersonaPrompt, globalDoomConfigDirectory } from '@agimon-ai/doompi-config';\nimport { type McpServerCost, priceMcpToolSchemas } from '@agimon-ai/doompi-core/mcp-schema-cost';\nimport { buildSkillCatalog, counter } from '@agimon-ai/doompi-skill/catalog';\n\nimport type { HarnessContext } from '../../../builders/cli/harnessContext';\nimport type { HarnessOptions } from '../../../composition/types/harness';\nimport { BaseCommand } from '../baseCommand';\n\n/**\n * What the selection costs before the first prompt, in tokens.\n *\n * Every figure is an estimate of what the provider will be sent, not a billed\n * total: skills are counted from files on disk and MCP tools from the schemas\n * their servers advertise, both with the same tokenizer.\n */\nexport interface MatrixCost {\n /** The always-on skill block Pi puts in the system prompt. */\n skillPromptTokens: number;\n /** Skill bodies on disk, read only when a skill is invoked. */\n skillBodyTokens: number;\n /** The persona prompt, when a profile selected one. */\n personaTokens: number;\n /** Always-on tool schemas, per configured MCP server. */\n mcpServers: McpServerCost[];\n mcpToolTokens: number;\n}\n\nexport interface MatrixExplanation {\n majorMode: string;\n profile?: string;\n persona?: string;\n domains: string[];\n plugins: string[];\n layers: string[];\n hookGroups: string[];\n hooksEnabled: boolean;\n skillDirectories: string[];\n skillCount: number;\n agentCount: number;\n agentDirectories: string[];\n mcpConfigPath?: string;\n mcpServers: string[];\n mcpProxyUpstreams?: string[];\n mcpFiltered: boolean;\n cost?: MatrixCost;\n}\n\nfunction readMcpServers(configPath: string): Record<string, unknown> {\n const config = JSON.parse(fs.readFileSync(configPath, 'utf8')) as { mcpServers?: Record<string, unknown> };\n return config.mcpServers ?? {};\n}\n\n/**\n * Renders the resolved matrix for --explain. Composition spans three config\n * files, so this answers \"why is that loaded\" in one command instead of a\n * manual trace through domains, major modes, and plugin subsets.\n */\nexport function explainMatrix(explanation: MatrixExplanation): string {\n const section = (label: string, values: string[], empty = '(none)'): string =>\n `${label}:\\n${values.length === 0 ? ` ${empty}` : values.map((value) => ` ${value}`).join('\\n')}\\n`;\n\n return [\n `doompi resolved matrix\\n\\n`,\n `major mode: ${explanation.majorMode}\\n\\n`,\n section('profile', explanation.profile ? [explanation.profile] : [], '(none)'),\n '\\n',\n section('persona', explanation.persona ? [explanation.persona] : [], '(none)'),\n '\\n',\n section('domains (content)', explanation.domains),\n '\\n',\n section('layers (behavior, from the major mode)', explanation.layers, 'core only'),\n '\\n',\n section(\n 'hook groups from layers',\n explanation.hookGroups,\n explanation.hooksEnabled ? '(core groups only)' : '(hooks disabled)',\n ),\n '\\n',\n section(\n 'plugins',\n explanation.plugins.map((directory) => path.basename(directory)),\n ),\n '\\n',\n section(\n 'skill paths',\n explanation.skillDirectories.map((directory) => path.relative(process.cwd(), directory)),\n ),\n '\\n',\n section(\n explanation.mcpFiltered ? 'mcp servers (filtered by domain allowlist)' : 'mcp servers (unfiltered)',\n explanation.mcpServers,\n '(mcp disabled)',\n ),\n '\\n',\n explanation.mcpProxyUpstreams\n ? section('mcp proxy upstreams (filtered)', explanation.mcpProxyUpstreams)\n : 'mcp proxy upstreams:\\n (unfiltered, every upstream in mcp-config.yaml)\\n',\n '\\n',\n `skills: ${explanation.skillCount} (from ${explanation.skillDirectories.length} paths)\\n`,\n `agents: ${explanation.agentCount}\\n`,\n `mcp config: ${explanation.mcpConfigPath ?? '(disabled)'}\\n`,\n explanation.cost ? renderCost(explanation.cost) : '',\n ].join('');\n}\n\nconst TOKEN_COLUMN = 9;\n\nfunction tokenLine(label: string, tokens: number, note = ''): string {\n const row = ` ${label.padEnd(16)}${tokens.toLocaleString('en-US').padStart(TOKEN_COLUMN)}`;\n return `${note ? `${row} ${note}` : row}\\n`;\n}\n\n/**\n * The bill, rendered last so the sections above keep their order.\n *\n * Skill and persona figures are derived from files on disk and MCP figures\n * from a cached handshake, so two runs of the same selection print the same\n * numbers and a reader can reproduce them without trusting this output.\n */\nfunction renderCost(cost: MatrixCost): string {\n const startup = cost.skillPromptTokens + cost.personaTokens + cost.mcpToolTokens;\n const unpriced = cost.mcpServers.filter((server) => server.unavailable);\n return [\n '\\ncontext cost (tokens)\\n',\n tokenLine('skills prompt', cost.skillPromptTokens, 'always on'),\n tokenLine('persona', cost.personaTokens, 'always on'),\n tokenLine('mcp tools', cost.mcpToolTokens, mcpNote(cost.mcpServers)),\n tokenLine('startup total', startup),\n tokenLine('skill bodies', cost.skillBodyTokens, 'read on demand'),\n ...cost.mcpServers.filter((server) => !server.unavailable).map(serverLine),\n unpriced.length > 0\n ? `\\n Not priced: ${unpriced.map((server) => `${server.name} (${server.unavailable})`).join(', ')}\\n`\n : '',\n '\\n Excludes skills contributed by extensions, which register after startup.\\n',\n ].join('');\n}\n\nfunction mcpNote(servers: McpServerCost[]): string {\n const priced = servers.filter((server) => !server.unavailable);\n if (priced.length === 0) return 'always on';\n const tools = priced.reduce((total, server) => total + server.toolCount, 0);\n return `always on, ${tools} tools from ${priced.length} server${priced.length === 1 ? '' : 's'}`;\n}\n\nfunction serverLine(server: McpServerCost): string {\n return tokenLine(` ${server.name}`, server.tokens, server.cached ? 'cached' : 'measured now');\n}\n\n/** Prints the fully resolved matrix instead of launching Pi. */\nasync function costExplain(context: HarnessContext): Promise<MatrixCost | undefined> {\n const { options, resources } = context;\n try {\n const [catalog, countTokens] = await Promise.all([\n buildSkillCatalog({\n repoRoot: options.repoRoot,\n activeSkillDirectories: resources.skillDirectories,\n extensionSources: [],\n }),\n counter(),\n ]);\n const persona = context.personaDirectory\n ? buildPersonaPrompt(context.personaRoot ?? options.repoRoot, context.personaDirectory)\n : undefined;\n const mcp = resources.mcpConfigPath\n ? await priceMcpToolSchemas({\n configPath: resources.mcpConfigPath,\n homeDoomDirectory: globalDoomConfigDirectory(),\n cwd: options.repoRoot,\n environment: context.environment,\n countTokens,\n })\n : { servers: [], totalTokens: 0 };\n return {\n skillPromptTokens: catalog.promptTokens,\n skillBodyTokens: catalog.bodyTokens,\n personaTokens: persona ? countTokens(persona) : 0,\n mcpServers: mcp.servers,\n mcpToolTokens: mcp.totalTokens,\n };\n } catch (error) {\n // Pricing reads the skill files, so an unreadable one must not take the\n // whole explanation down: the resolved matrix is the point, the bill is\n // the extra. Reported rather than swallowed.\n const detail = error instanceof Error ? error.message : String(error);\n process.stderr.write(`[doompi] ${'explain'}: could not price the selection: ${detail}\\n`);\n return undefined;\n }\n}\n\nexport async function runExplain(context: HarnessContext): Promise<number> {\n const { options, resources, plugins, mcpAllowlist } = context;\n const cost = await costExplain(context);\n\n process.stdout.write(\n explainMatrix({\n cost,\n majorMode: options.majorMode,\n profile: context.profile,\n persona: context.personaDirectory,\n domains: options.domains,\n plugins: plugins.map((entry) => entry.directory),\n layers: context.selectedLayers,\n hookGroups: context.hookGroups,\n hooksEnabled: options.hooks,\n skillDirectories: resources.skillDirectories,\n skillCount: resources.skillCount,\n agentCount: resources.agentCount,\n agentDirectories: resources.agentDirectories,\n mcpConfigPath: resources.mcpConfigPath,\n // Read back from the generated config so this reports what Pi will\n // actually load, not what the allowlist intended.\n mcpServers: resources.mcpConfigPath ? Object.keys(readMcpServers(resources.mcpConfigPath)) : [],\n mcpProxyUpstreams: mcpAllowlist?.proxy,\n mcpFiltered: Boolean(mcpAllowlist),\n }),\n );\n return 0;\n}\n\n/** Compatibility API. Executables call the command function directly. */\nexport class ExplainCommand extends BaseCommand {\n readonly name = 'explain';\n\n matches(options: HarnessOptions): boolean {\n return options.explain;\n }\n\n async execute(context: HarnessContext): Promise<number> {\n return runExplain(context);\n }\n}\n"],"mappings":"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"}
|