@agimon-ai/doompi 0.0.1-alpha.0
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/LICENSE +21 -0
- package/README.md +546 -0
- package/dist/_virtual/_rolldown/runtime.cjs +1 -0
- package/dist/bin/cli.cjs +3 -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 +3 -0
- package/dist/bin/cli.mjs.map +1 -0
- package/dist/bin/doomRunner.cjs +3 -0
- package/dist/bin/doomRunner.cjs.map +1 -0
- package/dist/bin/doomRunner.d.cts +1 -0
- package/dist/bin/doomRunner.d.mts +1 -0
- package/dist/bin/doomRunner.mjs +3 -0
- package/dist/bin/doomRunner.mjs.map +1 -0
- package/dist/cli/cliApp.cjs +2 -0
- package/dist/cli/cliApp.cjs.map +1 -0
- package/dist/cli/cliApp.d.cts +50 -0
- package/dist/cli/cliApp.d.cts.map +1 -0
- package/dist/cli/cliApp.d.mts +50 -0
- package/dist/cli/cliApp.d.mts.map +1 -0
- package/dist/cli/cliApp.mjs +2 -0
- package/dist/cli/cliApp.mjs.map +1 -0
- package/dist/cli/compatibilityOptions.cjs +2 -0
- package/dist/cli/compatibilityOptions.cjs.map +1 -0
- package/dist/cli/compatibilityOptions.d.cts +15 -0
- package/dist/cli/compatibilityOptions.d.cts.map +1 -0
- package/dist/cli/compatibilityOptions.d.mts +15 -0
- package/dist/cli/compatibilityOptions.d.mts.map +1 -0
- package/dist/cli/compatibilityOptions.mjs +2 -0
- package/dist/cli/compatibilityOptions.mjs.map +1 -0
- package/dist/cli/help.cjs +61 -0
- package/dist/cli/help.cjs.map +1 -0
- package/dist/cli/help.d.cts +6 -0
- package/dist/cli/help.d.cts.map +1 -0
- package/dist/cli/help.d.mts +6 -0
- package/dist/cli/help.d.mts.map +1 -0
- package/dist/cli/help.mjs +61 -0
- package/dist/cli/help.mjs.map +1 -0
- package/dist/cli/index.cjs +1 -0
- package/dist/cli/index.d.cts +5 -0
- package/dist/cli/index.d.mts +5 -0
- package/dist/cli/index.mjs +1 -0
- package/dist/cli/matrixOptions.cjs +2 -0
- package/dist/cli/matrixOptions.cjs.map +1 -0
- package/dist/cli/matrixOptions.d.cts +99 -0
- package/dist/cli/matrixOptions.d.cts.map +1 -0
- package/dist/cli/matrixOptions.d.mts +99 -0
- package/dist/cli/matrixOptions.d.mts.map +1 -0
- package/dist/cli/matrixOptions.mjs +2 -0
- package/dist/cli/matrixOptions.mjs.map +1 -0
- package/dist/cli/options.cjs +2 -0
- package/dist/cli/options.cjs.map +1 -0
- package/dist/cli/options.d.cts +7 -0
- package/dist/cli/options.d.cts.map +1 -0
- package/dist/cli/options.d.mts +7 -0
- package/dist/cli/options.d.mts.map +1 -0
- package/dist/cli/options.mjs +2 -0
- package/dist/cli/options.mjs.map +1 -0
- package/dist/commands/baseCommand.cjs +2 -0
- package/dist/commands/baseCommand.cjs.map +1 -0
- package/dist/commands/baseCommand.d.cts +36 -0
- package/dist/commands/baseCommand.d.cts.map +1 -0
- package/dist/commands/baseCommand.d.mts +36 -0
- package/dist/commands/baseCommand.d.mts.map +1 -0
- package/dist/commands/baseCommand.mjs +2 -0
- package/dist/commands/baseCommand.mjs.map +1 -0
- package/dist/commands/compatibilityCommand.cjs +2 -0
- package/dist/commands/compatibilityCommand.cjs.map +1 -0
- package/dist/commands/compatibilityCommand.d.cts +14 -0
- package/dist/commands/compatibilityCommand.d.cts.map +1 -0
- package/dist/commands/compatibilityCommand.d.mts +14 -0
- package/dist/commands/compatibilityCommand.d.mts.map +1 -0
- package/dist/commands/compatibilityCommand.mjs +2 -0
- package/dist/commands/compatibilityCommand.mjs.map +1 -0
- package/dist/commands/emitMcpCommand.cjs +2 -0
- package/dist/commands/emitMcpCommand.cjs.map +1 -0
- package/dist/commands/emitMcpCommand.d.cts +19 -0
- package/dist/commands/emitMcpCommand.d.cts.map +1 -0
- package/dist/commands/emitMcpCommand.d.mts +19 -0
- package/dist/commands/emitMcpCommand.d.mts.map +1 -0
- package/dist/commands/emitMcpCommand.mjs +2 -0
- package/dist/commands/emitMcpCommand.mjs.map +1 -0
- package/dist/commands/explainCommand.cjs +21 -0
- package/dist/commands/explainCommand.cjs.map +1 -0
- package/dist/commands/explainCommand.d.cts +63 -0
- package/dist/commands/explainCommand.d.cts.map +1 -0
- package/dist/commands/explainCommand.d.mts +63 -0
- package/dist/commands/explainCommand.d.mts.map +1 -0
- package/dist/commands/explainCommand.mjs +21 -0
- package/dist/commands/explainCommand.mjs.map +1 -0
- package/dist/commands/index.cjs +1 -0
- package/dist/commands/index.d.cts +8 -0
- package/dist/commands/index.d.mts +8 -0
- package/dist/commands/index.mjs +1 -0
- package/dist/commands/initCommand.cjs +3 -0
- package/dist/commands/initCommand.cjs.map +1 -0
- package/dist/commands/initCommand.d.cts +11 -0
- package/dist/commands/initCommand.d.cts.map +1 -0
- package/dist/commands/initCommand.d.mts +11 -0
- package/dist/commands/initCommand.d.mts.map +1 -0
- package/dist/commands/initCommand.mjs +3 -0
- package/dist/commands/initCommand.mjs.map +1 -0
- package/dist/commands/launchCommand.cjs +2 -0
- package/dist/commands/launchCommand.cjs.map +1 -0
- package/dist/commands/launchCommand.d.cts +31 -0
- package/dist/commands/launchCommand.d.cts.map +1 -0
- package/dist/commands/launchCommand.d.mts +31 -0
- package/dist/commands/launchCommand.d.mts.map +1 -0
- package/dist/commands/launchCommand.mjs +2 -0
- package/dist/commands/launchCommand.mjs.map +1 -0
- package/dist/commands/syncCommand.cjs +6 -0
- package/dist/commands/syncCommand.cjs.map +1 -0
- package/dist/commands/syncCommand.d.cts +37 -0
- package/dist/commands/syncCommand.d.cts.map +1 -0
- package/dist/commands/syncCommand.d.mts +37 -0
- package/dist/commands/syncCommand.d.mts.map +1 -0
- package/dist/commands/syncCommand.mjs +6 -0
- package/dist/commands/syncCommand.mjs.map +1 -0
- package/dist/config/harnessState.cjs +2 -0
- package/dist/config/harnessState.cjs.map +1 -0
- package/dist/config/harnessState.d.cts +24 -0
- package/dist/config/harnessState.d.cts.map +1 -0
- package/dist/config/harnessState.d.mts +24 -0
- package/dist/config/harnessState.d.mts.map +1 -0
- package/dist/config/harnessState.mjs +2 -0
- package/dist/config/harnessState.mjs.map +1 -0
- package/dist/config/index.cjs +1 -0
- package/dist/config/index.d.cts +7 -0
- package/dist/config/index.d.mts +7 -0
- package/dist/config/index.mjs +1 -0
- package/dist/config/projectTrust.cjs +2 -0
- package/dist/config/projectTrust.cjs.map +1 -0
- package/dist/config/projectTrust.d.cts +14 -0
- package/dist/config/projectTrust.d.cts.map +1 -0
- package/dist/config/projectTrust.d.mts +14 -0
- package/dist/config/projectTrust.d.mts.map +1 -0
- package/dist/config/projectTrust.mjs +2 -0
- package/dist/config/projectTrust.mjs.map +1 -0
- package/dist/entries/autoStop.cjs +2 -0
- package/dist/entries/autoStop.cjs.map +1 -0
- package/dist/entries/autoStop.d.cts +6 -0
- package/dist/entries/autoStop.d.cts.map +1 -0
- package/dist/entries/autoStop.d.mts +7 -0
- package/dist/entries/autoStop.d.mts.map +1 -0
- package/dist/entries/autoStop.mjs +2 -0
- package/dist/entries/autoStop.mjs.map +1 -0
- package/dist/entries/components/matrixPicker.cjs +2 -0
- package/dist/entries/components/matrixPicker.cjs.map +1 -0
- package/dist/entries/components/matrixPicker.d.cts +55 -0
- package/dist/entries/components/matrixPicker.d.cts.map +1 -0
- package/dist/entries/components/matrixPicker.d.mts +55 -0
- package/dist/entries/components/matrixPicker.d.mts.map +1 -0
- package/dist/entries/components/matrixPicker.mjs +2 -0
- package/dist/entries/components/matrixPicker.mjs.map +1 -0
- package/dist/entries/components/skillsOverlay.cjs +4 -0
- package/dist/entries/components/skillsOverlay.cjs.map +1 -0
- package/dist/entries/components/skillsOverlay.d.cts +58 -0
- package/dist/entries/components/skillsOverlay.d.cts.map +1 -0
- package/dist/entries/components/skillsOverlay.d.mts +58 -0
- package/dist/entries/components/skillsOverlay.d.mts.map +1 -0
- package/dist/entries/components/skillsOverlay.mjs +4 -0
- package/dist/entries/components/skillsOverlay.mjs.map +1 -0
- package/dist/entries/domains.cjs +2 -0
- package/dist/entries/domains.cjs.map +1 -0
- package/dist/entries/domains.d.cts +10 -0
- package/dist/entries/domains.d.cts.map +1 -0
- package/dist/entries/domains.d.mts +10 -0
- package/dist/entries/domains.d.mts.map +1 -0
- package/dist/entries/domains.mjs +2 -0
- package/dist/entries/domains.mjs.map +1 -0
- package/dist/entries/doom.cjs +2 -0
- package/dist/entries/doom.cjs.map +1 -0
- package/dist/entries/doom.d.cts +13 -0
- package/dist/entries/doom.d.cts.map +1 -0
- package/dist/entries/doom.d.mts +14 -0
- package/dist/entries/doom.d.mts.map +1 -0
- package/dist/entries/doom.mjs +2 -0
- package/dist/entries/doom.mjs.map +1 -0
- package/dist/entries/effort.cjs +2 -0
- package/dist/entries/effort.cjs.map +1 -0
- package/dist/entries/effort.d.cts +10 -0
- package/dist/entries/effort.d.cts.map +1 -0
- package/dist/entries/effort.d.mts +10 -0
- package/dist/entries/effort.d.mts.map +1 -0
- package/dist/entries/effort.mjs +2 -0
- package/dist/entries/effort.mjs.map +1 -0
- package/dist/entries/majorMode.cjs +6 -0
- package/dist/entries/majorMode.cjs.map +1 -0
- package/dist/entries/majorMode.d.cts +29 -0
- package/dist/entries/majorMode.d.cts.map +1 -0
- package/dist/entries/majorMode.d.mts +29 -0
- package/dist/entries/majorMode.d.mts.map +1 -0
- package/dist/entries/majorMode.mjs +6 -0
- package/dist/entries/majorMode.mjs.map +1 -0
- package/dist/entries/notifications.cjs +2 -0
- package/dist/entries/notifications.cjs.map +1 -0
- package/dist/entries/notifications.d.cts +13 -0
- package/dist/entries/notifications.d.cts.map +1 -0
- package/dist/entries/notifications.d.mts +13 -0
- package/dist/entries/notifications.d.mts.map +1 -0
- package/dist/entries/notifications.mjs +2 -0
- package/dist/entries/notifications.mjs.map +1 -0
- package/dist/entries/ollamaProvider.cjs +2 -0
- package/dist/entries/ollamaProvider.cjs.map +1 -0
- package/dist/entries/ollamaProvider.d.cts +6 -0
- package/dist/entries/ollamaProvider.d.cts.map +1 -0
- package/dist/entries/ollamaProvider.d.mts +7 -0
- package/dist/entries/ollamaProvider.d.mts.map +1 -0
- package/dist/entries/ollamaProvider.mjs +2 -0
- package/dist/entries/ollamaProvider.mjs.map +1 -0
- package/dist/entries/persona.cjs +2 -0
- package/dist/entries/persona.cjs.map +1 -0
- package/dist/entries/persona.d.cts +14 -0
- package/dist/entries/persona.d.cts.map +1 -0
- package/dist/entries/persona.d.mts +15 -0
- package/dist/entries/persona.d.mts.map +1 -0
- package/dist/entries/persona.mjs +2 -0
- package/dist/entries/persona.mjs.map +1 -0
- package/dist/entries/profile.cjs +3 -0
- package/dist/entries/profile.cjs.map +1 -0
- package/dist/entries/profile.d.cts +16 -0
- package/dist/entries/profile.d.cts.map +1 -0
- package/dist/entries/profile.d.mts +16 -0
- package/dist/entries/profile.d.mts.map +1 -0
- package/dist/entries/profile.mjs +3 -0
- package/dist/entries/profile.mjs.map +1 -0
- package/dist/entries/repositoryHooks.cjs +9 -0
- package/dist/entries/repositoryHooks.cjs.map +1 -0
- package/dist/entries/repositoryHooks.d.cts +7 -0
- package/dist/entries/repositoryHooks.d.cts.map +1 -0
- package/dist/entries/repositoryHooks.d.mts +8 -0
- package/dist/entries/repositoryHooks.d.mts.map +1 -0
- package/dist/entries/repositoryHooks.mjs +9 -0
- package/dist/entries/repositoryHooks.mjs.map +1 -0
- package/dist/entries/skills.cjs +2 -0
- package/dist/entries/skills.cjs.map +1 -0
- package/dist/entries/skills.d.cts +34 -0
- package/dist/entries/skills.d.cts.map +1 -0
- package/dist/entries/skills.d.mts +34 -0
- package/dist/entries/skills.d.mts.map +1 -0
- package/dist/entries/skills.mjs +2 -0
- package/dist/entries/skills.mjs.map +1 -0
- package/dist/entries/styleSystem.cjs +4 -0
- package/dist/entries/styleSystem.cjs.map +1 -0
- package/dist/entries/styleSystem.d.cts +32 -0
- package/dist/entries/styleSystem.d.cts.map +1 -0
- package/dist/entries/styleSystem.d.mts +32 -0
- package/dist/entries/styleSystem.d.mts.map +1 -0
- package/dist/entries/styleSystem.mjs +4 -0
- package/dist/entries/styleSystem.mjs.map +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +34 -0
- package/dist/index.d.mts +34 -0
- package/dist/index.mjs +1 -0
- package/dist/interfaces/compatibility.d.cts +23 -0
- package/dist/interfaces/compatibility.d.cts.map +1 -0
- package/dist/interfaces/compatibility.d.mts +23 -0
- package/dist/interfaces/compatibility.d.mts.map +1 -0
- package/dist/interfaces/harness.d.cts +83 -0
- package/dist/interfaces/harness.d.cts.map +1 -0
- package/dist/interfaces/harness.d.mts +83 -0
- package/dist/interfaces/harness.d.mts.map +1 -0
- package/dist/logSinkTelemetry.cjs +2 -0
- package/dist/logSinkTelemetry.cjs.map +1 -0
- package/dist/logSinkTelemetry.d.cts +49 -0
- package/dist/logSinkTelemetry.d.cts.map +1 -0
- package/dist/logSinkTelemetry.d.mts +49 -0
- package/dist/logSinkTelemetry.d.mts.map +1 -0
- package/dist/logSinkTelemetry.mjs +2 -0
- package/dist/logSinkTelemetry.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@juicesharp_rpiv-ask-user-question@2.2.0_@earendil-works_pi-coding-agent@0.84.1_support_6ba1249e24a50b62791c1c91c9f324c6/node_modules/@juicesharp/rpiv-ask-user-question/events.cjs +2 -0
- package/dist/node_modules/.pnpm/@juicesharp_rpiv-ask-user-question@2.2.0_@earendil-works_pi-coding-agent@0.84.1_support_6ba1249e24a50b62791c1c91c9f324c6/node_modules/@juicesharp/rpiv-ask-user-question/events.cjs.map +1 -0
- package/dist/node_modules/.pnpm/@juicesharp_rpiv-ask-user-question@2.2.0_@earendil-works_pi-coding-agent@0.84.1_support_6ba1249e24a50b62791c1c91c9f324c6/node_modules/@juicesharp/rpiv-ask-user-question/events.mjs +2 -0
- package/dist/node_modules/.pnpm/@juicesharp_rpiv-ask-user-question@2.2.0_@earendil-works_pi-coding-agent@0.84.1_support_6ba1249e24a50b62791c1c91c9f324c6/node_modules/@juicesharp/rpiv-ask-user-question/events.mjs.map +1 -0
- package/dist/services/compatibility/antigravity.cjs +2 -0
- package/dist/services/compatibility/antigravity.cjs.map +1 -0
- package/dist/services/compatibility/antigravity.d.cts +11 -0
- package/dist/services/compatibility/antigravity.d.cts.map +1 -0
- package/dist/services/compatibility/antigravity.d.mts +11 -0
- package/dist/services/compatibility/antigravity.d.mts.map +1 -0
- package/dist/services/compatibility/antigravity.mjs +2 -0
- package/dist/services/compatibility/antigravity.mjs.map +1 -0
- package/dist/services/compatibility/codex.cjs +2 -0
- package/dist/services/compatibility/codex.cjs.map +1 -0
- package/dist/services/compatibility/codex.d.cts +19 -0
- package/dist/services/compatibility/codex.d.cts.map +1 -0
- package/dist/services/compatibility/codex.d.mts +19 -0
- package/dist/services/compatibility/codex.d.mts.map +1 -0
- package/dist/services/compatibility/codex.mjs +2 -0
- package/dist/services/compatibility/codex.mjs.map +1 -0
- package/dist/services/compatibility/index.cjs +2 -0
- package/dist/services/compatibility/index.cjs.map +1 -0
- package/dist/services/compatibility/index.d.cts +16 -0
- package/dist/services/compatibility/index.d.cts.map +1 -0
- package/dist/services/compatibility/index.d.mts +16 -0
- package/dist/services/compatibility/index.d.mts.map +1 -0
- package/dist/services/compatibility/index.mjs +2 -0
- package/dist/services/compatibility/index.mjs.map +1 -0
- package/dist/services/compatibility/process.cjs +2 -0
- package/dist/services/compatibility/process.cjs.map +1 -0
- package/dist/services/compatibility/process.d.cts +35 -0
- package/dist/services/compatibility/process.d.cts.map +1 -0
- package/dist/services/compatibility/process.d.mts +35 -0
- package/dist/services/compatibility/process.d.mts.map +1 -0
- package/dist/services/compatibility/process.mjs +2 -0
- package/dist/services/compatibility/process.mjs.map +1 -0
- package/dist/services/compatibility/shared.cjs +2 -0
- package/dist/services/compatibility/shared.cjs.map +1 -0
- package/dist/services/compatibility/shared.d.cts +33 -0
- package/dist/services/compatibility/shared.d.cts.map +1 -0
- package/dist/services/compatibility/shared.d.mts +33 -0
- package/dist/services/compatibility/shared.d.mts.map +1 -0
- package/dist/services/compatibility/shared.mjs +2 -0
- package/dist/services/compatibility/shared.mjs.map +1 -0
- package/dist/services/compatibilityContext.cjs +2 -0
- package/dist/services/compatibilityContext.cjs.map +1 -0
- package/dist/services/compatibilityContext.d.cts +23 -0
- package/dist/services/compatibilityContext.d.cts.map +1 -0
- package/dist/services/compatibilityContext.d.mts +23 -0
- package/dist/services/compatibilityContext.d.mts.map +1 -0
- package/dist/services/compatibilityContext.mjs +2 -0
- package/dist/services/compatibilityContext.mjs.map +1 -0
- package/dist/services/composer.cjs +2 -0
- package/dist/services/composer.cjs.map +1 -0
- package/dist/services/composer.d.cts +133 -0
- package/dist/services/composer.d.cts.map +1 -0
- package/dist/services/composer.d.mts +133 -0
- package/dist/services/composer.d.mts.map +1 -0
- package/dist/services/composer.mjs +2 -0
- package/dist/services/composer.mjs.map +1 -0
- package/dist/services/extensionAssembler.cjs +2 -0
- package/dist/services/extensionAssembler.cjs.map +1 -0
- package/dist/services/extensionAssembler.d.cts +72 -0
- package/dist/services/extensionAssembler.d.cts.map +1 -0
- package/dist/services/extensionAssembler.d.mts +72 -0
- package/dist/services/extensionAssembler.d.mts.map +1 -0
- package/dist/services/extensionAssembler.mjs +2 -0
- package/dist/services/extensionAssembler.mjs.map +1 -0
- package/dist/services/extensionCompiler.cjs +2 -0
- package/dist/services/extensionCompiler.cjs.map +1 -0
- package/dist/services/extensionCompiler.mjs +2 -0
- package/dist/services/extensionCompiler.mjs.map +1 -0
- package/dist/services/harnessContext.cjs +2 -0
- package/dist/services/harnessContext.cjs.map +1 -0
- package/dist/services/harnessContext.d.cts +61 -0
- package/dist/services/harnessContext.d.cts.map +1 -0
- package/dist/services/harnessContext.d.mts +61 -0
- package/dist/services/harnessContext.d.mts.map +1 -0
- package/dist/services/harnessContext.mjs +2 -0
- package/dist/services/harnessContext.mjs.map +1 -0
- package/dist/services/index.cjs +1 -0
- package/dist/services/index.d.cts +14 -0
- package/dist/services/index.d.mts +14 -0
- package/dist/services/index.mjs +1 -0
- package/dist/services/matrixSwitcher.cjs +2 -0
- package/dist/services/matrixSwitcher.cjs.map +1 -0
- package/dist/services/matrixSwitcher.d.cts +46 -0
- package/dist/services/matrixSwitcher.d.cts.map +1 -0
- package/dist/services/matrixSwitcher.d.mts +46 -0
- package/dist/services/matrixSwitcher.d.mts.map +1 -0
- package/dist/services/matrixSwitcher.mjs +2 -0
- package/dist/services/matrixSwitcher.mjs.map +1 -0
- package/dist/services/mcpFilter.cjs +3 -0
- package/dist/services/mcpFilter.cjs.map +1 -0
- package/dist/services/mcpFilter.d.cts +40 -0
- package/dist/services/mcpFilter.d.cts.map +1 -0
- package/dist/services/mcpFilter.d.mts +40 -0
- package/dist/services/mcpFilter.d.mts.map +1 -0
- package/dist/services/mcpFilter.mjs +3 -0
- package/dist/services/mcpFilter.mjs.map +1 -0
- package/dist/services/piSettings.cjs +2 -0
- package/dist/services/piSettings.cjs.map +1 -0
- package/dist/services/piSettings.d.cts +24 -0
- package/dist/services/piSettings.d.cts.map +1 -0
- package/dist/services/piSettings.d.mts +24 -0
- package/dist/services/piSettings.d.mts.map +1 -0
- package/dist/services/piSettings.mjs +2 -0
- package/dist/services/piSettings.mjs.map +1 -0
- package/dist/services/resourceCollector.cjs +3 -0
- package/dist/services/resourceCollector.cjs.map +1 -0
- package/dist/services/resourceCollector.d.cts +16 -0
- package/dist/services/resourceCollector.d.cts.map +1 -0
- package/dist/services/resourceCollector.d.mts +16 -0
- package/dist/services/resourceCollector.d.mts.map +1 -0
- package/dist/services/resourceCollector.mjs +3 -0
- package/dist/services/resourceCollector.mjs.map +1 -0
- package/dist/services/skillCatalog.cjs +2 -0
- package/dist/services/skillCatalog.cjs.map +1 -0
- package/dist/services/skillCatalog.d.cts +56 -0
- package/dist/services/skillCatalog.d.cts.map +1 -0
- package/dist/services/skillCatalog.d.mts +56 -0
- package/dist/services/skillCatalog.d.mts.map +1 -0
- package/dist/services/skillCatalog.mjs +2 -0
- package/dist/services/skillCatalog.mjs.map +1 -0
- package/dist/services/skillSources.cjs +2 -0
- package/dist/services/skillSources.cjs.map +1 -0
- package/dist/services/skillSources.d.cts +24 -0
- package/dist/services/skillSources.d.cts.map +1 -0
- package/dist/services/skillSources.d.mts +24 -0
- package/dist/services/skillSources.d.mts.map +1 -0
- package/dist/services/skillSources.mjs +2 -0
- package/dist/services/skillSources.mjs.map +1 -0
- package/dist/services/syncState.cjs +2 -0
- package/dist/services/syncState.cjs.map +1 -0
- package/dist/services/syncState.d.cts +130 -0
- package/dist/services/syncState.d.cts.map +1 -0
- package/dist/services/syncState.d.mts +130 -0
- package/dist/services/syncState.d.mts.map +1 -0
- package/dist/services/syncState.mjs +2 -0
- package/dist/services/syncState.mjs.map +1 -0
- package/dist/utils/index.cjs +1 -0
- package/dist/utils/index.d.cts +5 -0
- package/dist/utils/index.d.mts +5 -0
- package/dist/utils/index.mjs +1 -0
- package/dist/utils/json.cjs +2 -0
- package/dist/utils/json.cjs.map +1 -0
- package/dist/utils/json.d.cts +23 -0
- package/dist/utils/json.d.cts.map +1 -0
- package/dist/utils/json.d.mts +23 -0
- package/dist/utils/json.d.mts.map +1 -0
- package/dist/utils/json.mjs +2 -0
- package/dist/utils/json.mjs.map +1 -0
- package/dist/utils/moduleResolution.cjs +2 -0
- package/dist/utils/moduleResolution.cjs.map +1 -0
- package/dist/utils/moduleResolution.d.cts +56 -0
- package/dist/utils/moduleResolution.d.cts.map +1 -0
- package/dist/utils/moduleResolution.d.mts +56 -0
- package/dist/utils/moduleResolution.d.mts.map +1 -0
- package/dist/utils/moduleResolution.mjs +2 -0
- package/dist/utils/moduleResolution.mjs.map +1 -0
- package/dist/utils/repository.cjs +2 -0
- package/dist/utils/repository.cjs.map +1 -0
- package/dist/utils/repository.d.cts +21 -0
- package/dist/utils/repository.d.cts.map +1 -0
- package/dist/utils/repository.d.mts +21 -0
- package/dist/utils/repository.d.mts.map +1 -0
- package/dist/utils/repository.mjs +2 -0
- package/dist/utils/repository.mjs.map +1 -0
- package/dist/utils/toolNames.cjs +2 -0
- package/dist/utils/toolNames.cjs.map +1 -0
- package/dist/utils/toolNames.d.cts +25 -0
- package/dist/utils/toolNames.d.cts.map +1 -0
- package/dist/utils/toolNames.d.mts +25 -0
- package/dist/utils/toolNames.d.mts.map +1 -0
- package/dist/utils/toolNames.mjs +2 -0
- package/dist/utils/toolNames.mjs.map +1 -0
- package/package.json +369 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
//#region src/utils/moduleResolution.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Resolves the on-disk entry point of an installed package.
|
|
4
|
+
*
|
|
5
|
+
* Pi loads extensions by absolute path, so anything contributed as an
|
|
6
|
+
* extension has to be resolved to a file before it can be passed along.
|
|
7
|
+
*/
|
|
8
|
+
declare function packageEntry(name: string): string;
|
|
9
|
+
/** Same as packageEntry, but returns undefined when the package is absent. */
|
|
10
|
+
declare function optionalPackageEntry(name: string): string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Splits `@scope/name/sub/path` into the package name and its export subpath.
|
|
13
|
+
*
|
|
14
|
+
* A scoped name owns two segments, an unscoped name one. Everything after that
|
|
15
|
+
* is the subpath the package's own `exports` map has to answer for.
|
|
16
|
+
*/
|
|
17
|
+
declare function splitPackageSpecifier(specifier: string): {
|
|
18
|
+
name: string;
|
|
19
|
+
subpath: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Resolves a specifier against the consumer repository's own dependency tree.
|
|
23
|
+
*
|
|
24
|
+
* The meta-package cannot resolve what the repository declares: under an
|
|
25
|
+
* isolated node_modules layout Doom Pi only sees its own dependencies. Anchoring
|
|
26
|
+
* a require at the consumer's manifest is what lets a repository-declared layer
|
|
27
|
+
* package resolve from the repository that declared it.
|
|
28
|
+
*
|
|
29
|
+
* The `node_modules` chain is walked directly rather than handed to
|
|
30
|
+
* `require.resolve`, which would answer with the CJS build that Pi cannot load
|
|
31
|
+
* as an extension. The package's own `exports` map then supplies the
|
|
32
|
+
* import-side target.
|
|
33
|
+
*/
|
|
34
|
+
declare function consumerPackageEntry(specifier: string, consumerRoot: string): string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Resolves a path-style layer package against the config that declared it.
|
|
37
|
+
*
|
|
38
|
+
* A file is taken as the extension entry as written. A directory is read as a
|
|
39
|
+
* package: its import-side `exports` target first, then module/main. This is
|
|
40
|
+
* what lets an extension that was never published to npm live in the
|
|
41
|
+
* repository, or beside the global config in `~/.pi/.doom`, and still load.
|
|
42
|
+
*/
|
|
43
|
+
declare function localEntry(specifier: string, baseDirectory: string): string | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Resolves one of this package's own extensions in src/entries.
|
|
46
|
+
*
|
|
47
|
+
* The file extension differs between running from source (.ts, how the shell
|
|
48
|
+
* launchers invoke this) and running the build output (.mjs), so it is derived
|
|
49
|
+
* from this module's own URL rather than assumed.
|
|
50
|
+
*/
|
|
51
|
+
declare function ownEntry(name: string): string;
|
|
52
|
+
/** Path to Pi's own CLI, which the launch command spawns. */
|
|
53
|
+
declare function piCliPath(): string;
|
|
54
|
+
//#endregion
|
|
55
|
+
export { consumerPackageEntry, localEntry, optionalPackageEntry, ownEntry, packageEntry, piCliPath, splitPackageSpecifier };
|
|
56
|
+
//# sourceMappingURL=moduleResolution.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moduleResolution.d.cts","names":[],"sources":["../../src/utils/moduleResolution.ts"],"mappings":";;AAgBA;;;;;iBAAgB,YAAA,CAAa,IAAA;;iBAKb,oBAAA,CAAqB,IAAA;;;AAcrC;;;;iBAAgB,qBAAA,CAAsB,SAAA;EAAsB,IAAA;EAAc,OAAA;AAAA;;AA4D1E;;;;;AA6CA;;;;;AA4CA;;iBAzFgB,oBAAA,CAAqB,SAAA,UAAmB,YAAA;;;AAiGxD;;;;;;iBApDgB,UAAA,CAAW,SAAA,UAAmB,aAAA;;;;;;;;iBA4C9B,QAAA,CAAS,IAAA;;iBAQT,SAAA,CAAA"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
//#region src/utils/moduleResolution.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Resolves the on-disk entry point of an installed package.
|
|
4
|
+
*
|
|
5
|
+
* Pi loads extensions by absolute path, so anything contributed as an
|
|
6
|
+
* extension has to be resolved to a file before it can be passed along.
|
|
7
|
+
*/
|
|
8
|
+
declare function packageEntry(name: string): string;
|
|
9
|
+
/** Same as packageEntry, but returns undefined when the package is absent. */
|
|
10
|
+
declare function optionalPackageEntry(name: string): string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Splits `@scope/name/sub/path` into the package name and its export subpath.
|
|
13
|
+
*
|
|
14
|
+
* A scoped name owns two segments, an unscoped name one. Everything after that
|
|
15
|
+
* is the subpath the package's own `exports` map has to answer for.
|
|
16
|
+
*/
|
|
17
|
+
declare function splitPackageSpecifier(specifier: string): {
|
|
18
|
+
name: string;
|
|
19
|
+
subpath: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Resolves a specifier against the consumer repository's own dependency tree.
|
|
23
|
+
*
|
|
24
|
+
* The meta-package cannot resolve what the repository declares: under an
|
|
25
|
+
* isolated node_modules layout Doom Pi only sees its own dependencies. Anchoring
|
|
26
|
+
* a require at the consumer's manifest is what lets a repository-declared layer
|
|
27
|
+
* package resolve from the repository that declared it.
|
|
28
|
+
*
|
|
29
|
+
* The `node_modules` chain is walked directly rather than handed to
|
|
30
|
+
* `require.resolve`, which would answer with the CJS build that Pi cannot load
|
|
31
|
+
* as an extension. The package's own `exports` map then supplies the
|
|
32
|
+
* import-side target.
|
|
33
|
+
*/
|
|
34
|
+
declare function consumerPackageEntry(specifier: string, consumerRoot: string): string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Resolves a path-style layer package against the config that declared it.
|
|
37
|
+
*
|
|
38
|
+
* A file is taken as the extension entry as written. A directory is read as a
|
|
39
|
+
* package: its import-side `exports` target first, then module/main. This is
|
|
40
|
+
* what lets an extension that was never published to npm live in the
|
|
41
|
+
* repository, or beside the global config in `~/.pi/.doom`, and still load.
|
|
42
|
+
*/
|
|
43
|
+
declare function localEntry(specifier: string, baseDirectory: string): string | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Resolves one of this package's own extensions in src/entries.
|
|
46
|
+
*
|
|
47
|
+
* The file extension differs between running from source (.ts, how the shell
|
|
48
|
+
* launchers invoke this) and running the build output (.mjs), so it is derived
|
|
49
|
+
* from this module's own URL rather than assumed.
|
|
50
|
+
*/
|
|
51
|
+
declare function ownEntry(name: string): string;
|
|
52
|
+
/** Path to Pi's own CLI, which the launch command spawns. */
|
|
53
|
+
declare function piCliPath(): string;
|
|
54
|
+
//#endregion
|
|
55
|
+
export { consumerPackageEntry, localEntry, optionalPackageEntry, ownEntry, packageEntry, piCliPath, splitPackageSpecifier };
|
|
56
|
+
//# sourceMappingURL=moduleResolution.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moduleResolution.d.mts","names":[],"sources":["../../src/utils/moduleResolution.ts"],"mappings":";;AAgBA;;;;;iBAAgB,YAAA,CAAa,IAAA;;iBAKb,oBAAA,CAAqB,IAAA;;;AAcrC;;;;iBAAgB,qBAAA,CAAsB,SAAA;EAAsB,IAAA;EAAc,OAAA;AAAA;;AA4D1E;;;;;AA6CA;;;;;AA4CA;;iBAzFgB,oBAAA,CAAqB,SAAA,UAAmB,YAAA;;;AAiGxD;;;;;;iBApDgB,UAAA,CAAW,SAAA,UAAmB,aAAA;;;;;;;;iBA4C9B,QAAA,CAAS,IAAA;;iBAQT,SAAA,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import e from"node:path";import t from"node:fs";import{fileURLToPath as n}from"node:url";const r=`package.json`,i=[`import`,`module`,`node`,`default`];function a(e){return n(import.meta.resolve(e))}function o(e){try{return a(e)}catch{return}}function s(e){let t=e.split(`/`),n=e.startsWith(`@`)?2:1,r=t.slice(0,n).join(`/`),i=t.slice(n).join(`/`);return{name:r,subpath:i?`./${i}`:`.`}}function c(e){if(typeof e==`string`)return e;if(Array.isArray(e)){for(let t of e){let e=c(t);if(e)return e}return}if(typeof e!=`object`||!e)return;let t=e;for(let e of i)if(e in t){let n=c(t[e]);if(n)return n}}function l(n,i){let a=e.resolve(i);for(;;){let i=e.join(a,`node_modules`,n);if(t.existsSync(e.join(i,r)))return i;let o=e.dirname(a);if(o===a)return;a=o}}function u(n,i){let{name:a,subpath:o}=s(n),u=l(a,i);if(!u)return;let d=e.join(u,r),f=e.join(u,o),p;try{p=JSON.parse(t.readFileSync(d,`utf8`))}catch{return t.existsSync(f)?f:void 0}let m=p.exports;if(m!=null){let n=c(typeof m==`object`&&!Array.isArray(m)?m[o]:o===`.`?m:void 0);if(n){let r=e.join(u,n);if(t.existsSync(r))return r}}return o===`.`?void 0:t.existsSync(f)?f:void 0}const d=[`module`,`main`];function f(n,i){let a=e.resolve(i,n),o;try{let e=t.statSync(a);if(e.isFile())return a;o=e.isDirectory()}catch{return}if(!o)return;let s;try{s=JSON.parse(t.readFileSync(e.join(a,r),`utf8`))}catch{return}let l=s.exports,u=[c(typeof l==`object`&&l&&!Array.isArray(l)?l[`.`]:l)];for(let e of d)typeof s[e]==`string`&&u.push(s[e]);for(let n of u){if(!n)continue;let r=e.join(a,n);if(t.existsSync(r))return r}}function p(t){let r=import.meta.url.endsWith(`.ts`)?`ts`:`mjs`,i=e.dirname(e.dirname(n(import.meta.url)));return e.join(i,`entries`,`${t}.${r}`)}function m(){return e.join(e.dirname(a(`@earendil-works/pi-coding-agent`)),`cli.js`)}export{u as consumerPackageEntry,f as localEntry,o as optionalPackageEntry,p as ownEntry,a as packageEntry,m as piCliPath,s as splitPackageSpecifier};
|
|
2
|
+
//# sourceMappingURL=moduleResolution.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moduleResolution.mjs","names":[],"sources":["../../src/utils/moduleResolution.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nconst PACKAGE_MANIFEST = 'package.json';\nconst NODE_MODULES = 'node_modules';\nconst CURRENT_DIRECTORY_PREFIX = './';\n/** Import-side conditions, in the order Node prefers them for an ESM consumer. */\nconst IMPORT_CONDITIONS = ['import', 'module', 'node', 'default'] as const;\n\n/**\n * Resolves the on-disk entry point of an installed package.\n *\n * Pi loads extensions by absolute path, so anything contributed as an\n * extension has to be resolved to a file before it can be passed along.\n */\nexport function packageEntry(name: string): string {\n return fileURLToPath(import.meta.resolve(name));\n}\n\n/** Same as packageEntry, but returns undefined when the package is absent. */\nexport function optionalPackageEntry(name: string): string | undefined {\n try {\n return packageEntry(name);\n } catch {\n return undefined;\n }\n}\n\n/**\n * Splits `@scope/name/sub/path` into the package name and its export subpath.\n *\n * A scoped name owns two segments, an unscoped name one. Everything after that\n * is the subpath the package's own `exports` map has to answer for.\n */\nexport function splitPackageSpecifier(specifier: string): { name: string; subpath: string } {\n const segments = specifier.split('/');\n const nameSegments = specifier.startsWith('@') ? 2 : 1;\n const name = segments.slice(0, nameSegments).join('/');\n const rest = segments.slice(nameSegments).join('/');\n return { name, subpath: rest ? `${CURRENT_DIRECTORY_PREFIX}${rest}` : '.' };\n}\n\n/** Picks the import-side target out of one `exports` entry. */\nfunction selectImportTarget(value: unknown): string | undefined {\n if (typeof value === 'string') return value;\n if (Array.isArray(value)) {\n for (const candidate of value) {\n const target = selectImportTarget(candidate);\n if (target) return target;\n }\n return undefined;\n }\n if (typeof value !== 'object' || value === null) return undefined;\n const conditions = value as Record<string, unknown>;\n for (const condition of IMPORT_CONDITIONS) {\n if (condition in conditions) {\n const target = selectImportTarget(conditions[condition]);\n if (target) return target;\n }\n }\n return undefined;\n}\n\n/**\n * Finds an installed package directory by walking the consumer's module chain.\n *\n * Node's own lookup order, so a workspace link in the repository root is found\n * exactly where the repository installed it, and nothing outside that chain can\n * answer for a specifier the repository declared.\n */\nfunction findInstalledPackage(name: string, consumerRoot: string): string | undefined {\n let directory = path.resolve(consumerRoot);\n while (true) {\n const candidate = path.join(directory, NODE_MODULES, name);\n if (fs.existsSync(path.join(candidate, PACKAGE_MANIFEST))) return candidate;\n const parent = path.dirname(directory);\n if (parent === directory) return undefined;\n directory = parent;\n }\n}\n\n/**\n * Resolves a specifier against the consumer repository's own dependency tree.\n *\n * The meta-package cannot resolve what the repository declares: under an\n * isolated node_modules layout Doom Pi only sees its own dependencies. Anchoring\n * a require at the consumer's manifest is what lets a repository-declared layer\n * package resolve from the repository that declared it.\n *\n * The `node_modules` chain is walked directly rather than handed to\n * `require.resolve`, which would answer with the CJS build that Pi cannot load\n * as an extension. The package's own `exports` map then supplies the\n * import-side target.\n */\nexport function consumerPackageEntry(specifier: string, consumerRoot: string): string | undefined {\n const { name, subpath } = splitPackageSpecifier(specifier);\n const packageRoot = findInstalledPackage(name, consumerRoot);\n if (!packageRoot) return undefined;\n\n const manifestPath = path.join(packageRoot, PACKAGE_MANIFEST);\n // A relative subpath that the package does not export is still loadable by\n // path, which is how layers point at a file inside a package (`.../index.ts`).\n const directTarget = path.join(packageRoot, subpath);\n let manifest: { exports?: unknown };\n try {\n manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8')) as { exports?: unknown };\n } catch {\n return fs.existsSync(directTarget) ? directTarget : undefined;\n }\n\n const exports = manifest.exports;\n if (exports !== undefined && exports !== null) {\n const entry =\n typeof exports === 'object' && !Array.isArray(exports)\n ? (exports as Record<string, unknown>)[subpath]\n : subpath === '.'\n ? exports\n : undefined;\n const target = selectImportTarget(entry);\n if (target) {\n const resolved = path.join(packageRoot, target);\n if (fs.existsSync(resolved)) return resolved;\n }\n }\n\n return subpath === '.' ? undefined : fs.existsSync(directTarget) ? directTarget : undefined;\n}\n\n/** Manifest fields consulted when a local package declares no `exports`. */\nconst MAIN_FIELDS = ['module', 'main'] as const;\n\n/**\n * Resolves a path-style layer package against the config that declared it.\n *\n * A file is taken as the extension entry as written. A directory is read as a\n * package: its import-side `exports` target first, then module/main. This is\n * what lets an extension that was never published to npm live in the\n * repository, or beside the global config in `~/.pi/.doom`, and still load.\n */\nexport function localEntry(specifier: string, baseDirectory: string): string | undefined {\n const target = path.resolve(baseDirectory, specifier);\n let isDirectory: boolean;\n try {\n const stats = fs.statSync(target);\n if (stats.isFile()) return target;\n isDirectory = stats.isDirectory();\n } catch {\n return undefined;\n }\n if (!isDirectory) return undefined;\n\n let manifest: { exports?: unknown; module?: unknown; main?: unknown };\n try {\n manifest = JSON.parse(fs.readFileSync(path.join(target, PACKAGE_MANIFEST), 'utf8')) as typeof manifest;\n } catch {\n return undefined;\n }\n\n const exports = manifest.exports;\n const rootExport =\n typeof exports === 'object' && exports !== null && !Array.isArray(exports)\n ? (exports as Record<string, unknown>)['.']\n : exports;\n const candidates = [selectImportTarget(rootExport)];\n for (const field of MAIN_FIELDS) {\n if (typeof manifest[field] === 'string') candidates.push(manifest[field]);\n }\n\n for (const candidate of candidates) {\n if (!candidate) continue;\n const resolved = path.join(target, candidate);\n if (fs.existsSync(resolved)) return resolved;\n }\n return undefined;\n}\n\n/**\n * Resolves one of this package's own extensions in src/entries.\n *\n * The file extension differs between running from source (.ts, how the shell\n * launchers invoke this) and running the build output (.mjs), so it is derived\n * from this module's own URL rather than assumed.\n */\nexport function ownEntry(name: string): string {\n const extension = import.meta.url.endsWith('.ts') ? 'ts' : 'mjs';\n // This file sits in src/utils, so entries is one directory up.\n const sourceRoot = path.dirname(path.dirname(fileURLToPath(import.meta.url)));\n return path.join(sourceRoot, 'entries', `${name}.${extension}`);\n}\n\n/** Path to Pi's own CLI, which the launch command spawns. */\nexport function piCliPath(): string {\n return path.join(path.dirname(packageEntry('@earendil-works/pi-coding-agent')), 'cli.js');\n}\n"],"mappings":"yFAIA,MAAM,EAAmB,eAInB,EAAoB,CAAC,SAAU,SAAU,OAAQ,UAAU,CAQjE,SAAgB,EAAa,EAAsB,CACjD,OAAO,EAAc,OAAO,KAAK,QAAQ,EAAK,CAAC,CAIjD,SAAgB,EAAqB,EAAkC,CACrE,GAAI,CACF,OAAO,EAAa,EAAK,MACnB,CACN,QAUJ,SAAgB,EAAsB,EAAsD,CAC1F,IAAM,EAAW,EAAU,MAAM,IAAI,CAC/B,EAAe,EAAU,WAAW,IAAI,CAAG,EAAI,EAC/C,EAAO,EAAS,MAAM,EAAG,EAAa,CAAC,KAAK,IAAI,CAChD,EAAO,EAAS,MAAM,EAAa,CAAC,KAAK,IAAI,CACnD,MAAO,CAAE,OAAM,QAAS,EAAO,KAA8B,IAAS,IAAK,CAI7E,SAAS,EAAmB,EAAoC,CAC9D,GAAI,OAAO,GAAU,SAAU,OAAO,EACtC,GAAI,MAAM,QAAQ,EAAM,CAAE,CACxB,IAAK,IAAM,KAAa,EAAO,CAC7B,IAAM,EAAS,EAAmB,EAAU,CAC5C,GAAI,EAAQ,OAAO,EAErB,OAEF,GAAI,OAAO,GAAU,WAAY,EAAgB,OACjD,IAAM,EAAa,EACnB,IAAK,IAAM,KAAa,EACtB,GAAI,KAAa,EAAY,CAC3B,IAAM,EAAS,EAAmB,EAAW,GAAW,CACxD,GAAI,EAAQ,OAAO,GAazB,SAAS,EAAqB,EAAc,EAA0C,CACpF,IAAI,EAAY,EAAK,QAAQ,EAAa,CAC1C,OAAa,CACX,IAAM,EAAY,EAAK,KAAK,EAAW,eAAc,EAAK,CAC1D,GAAI,EAAG,WAAW,EAAK,KAAK,EAAW,EAAiB,CAAC,CAAE,OAAO,EAClE,IAAM,EAAS,EAAK,QAAQ,EAAU,CACtC,GAAI,IAAW,EAAW,OAC1B,EAAY,GAiBhB,SAAgB,EAAqB,EAAmB,EAA0C,CAChG,GAAM,CAAE,OAAM,WAAY,EAAsB,EAAU,CACpD,EAAc,EAAqB,EAAM,EAAa,CAC5D,GAAI,CAAC,EAAa,OAElB,IAAM,EAAe,EAAK,KAAK,EAAa,EAAiB,CAGvD,EAAe,EAAK,KAAK,EAAa,EAAQ,CAChD,EACJ,GAAI,CACF,EAAW,KAAK,MAAM,EAAG,aAAa,EAAc,OAAO,CAAC,MACtD,CACN,OAAO,EAAG,WAAW,EAAa,CAAG,EAAe,IAAA,GAGtD,IAAM,EAAU,EAAS,QACzB,GAAI,GAAqC,KAAM,CAO7C,IAAM,EAAS,EALb,OAAO,GAAY,UAAY,CAAC,MAAM,QAAQ,EAAQ,CACjD,EAAoC,GACrC,IAAY,IACV,EACA,IAAA,GACgC,CACxC,GAAI,EAAQ,CACV,IAAM,EAAW,EAAK,KAAK,EAAa,EAAO,CAC/C,GAAI,EAAG,WAAW,EAAS,CAAE,OAAO,GAIxC,OAAO,IAAY,IAAM,IAAA,GAAY,EAAG,WAAW,EAAa,CAAG,EAAe,IAAA,GAIpF,MAAM,EAAc,CAAC,SAAU,OAAO,CAUtC,SAAgB,EAAW,EAAmB,EAA2C,CACvF,IAAM,EAAS,EAAK,QAAQ,EAAe,EAAU,CACjD,EACJ,GAAI,CACF,IAAM,EAAQ,EAAG,SAAS,EAAO,CACjC,GAAI,EAAM,QAAQ,CAAE,OAAO,EAC3B,EAAc,EAAM,aAAa,MAC3B,CACN,OAEF,GAAI,CAAC,EAAa,OAElB,IAAI,EACJ,GAAI,CACF,EAAW,KAAK,MAAM,EAAG,aAAa,EAAK,KAAK,EAAQ,EAAiB,CAAE,OAAO,CAAC,MAC7E,CACN,OAGF,IAAM,EAAU,EAAS,QAKnB,EAAa,CAAC,EAHlB,OAAO,GAAY,UAAY,GAAoB,CAAC,MAAM,QAAQ,EAAQ,CACrE,EAAoC,KACrC,EAC4C,CAAC,CACnD,IAAK,IAAM,KAAS,EACd,OAAO,EAAS,IAAW,UAAU,EAAW,KAAK,EAAS,GAAO,CAG3E,IAAK,IAAM,KAAa,EAAY,CAClC,GAAI,CAAC,EAAW,SAChB,IAAM,EAAW,EAAK,KAAK,EAAQ,EAAU,CAC7C,GAAI,EAAG,WAAW,EAAS,CAAE,OAAO,GAYxC,SAAgB,EAAS,EAAsB,CAC7C,IAAM,EAAY,OAAO,KAAK,IAAI,SAAS,MAAM,CAAG,KAAO,MAErD,EAAa,EAAK,QAAQ,EAAK,QAAQ,EAAc,OAAO,KAAK,IAAI,CAAC,CAAC,CAC7E,OAAO,EAAK,KAAK,EAAY,UAAW,GAAG,EAAK,GAAG,IAAY,CAIjE,SAAgB,GAAoB,CAClC,OAAO,EAAK,KAAK,EAAK,QAAQ,EAAa,kCAAkC,CAAC,CAAE,SAAS"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/_rolldown/runtime.cjs`);let t=require(`node:path`);t=e.__toESM(t,1);let n=require(`node:fs`);n=e.__toESM(n,1);const r=t.default.join(`.pi`,`settings.json`);function i(e){try{return n.default.statSync(e).isDirectory()}catch{return!1}}function a(e){try{return n.default.statSync(e).isFile()}catch{return!1}}function o(e){return i(t.default.join(e,`.doom`))||a(t.default.join(e,r))}function s(e){let n=t.default.resolve(e);for(;;){if(o(n))return n;let r=t.default.dirname(n);if(r===n)throw Error(`Could not find repository root from ${e}`);n=r}}exports.findRepositoryRoot=s,exports.isRepositoryRoot=o;
|
|
2
|
+
//# sourceMappingURL=repository.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repository.cjs","names":["path","fs"],"sources":["../../src/utils/repository.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\n\n/** Doom's own repository configuration directory. */\nconst DOOM_DIRECTORY = '.doom';\n/** A Pi project that has been configured, rather than any stray `.pi` folder. */\nconst PI_SETTINGS = path.join('.pi', 'settings.json');\n\nfunction isDirectory(target: string): boolean {\n try {\n return fs.statSync(target).isDirectory();\n } catch {\n return false;\n }\n}\n\nfunction isFile(target: string): boolean {\n try {\n return fs.statSync(target).isFile();\n } catch {\n return false;\n }\n}\n\n/**\n * True when a directory carries a marker Doom Pi is willing to treat as a root.\n *\n * Only Doom's own directory or an existing Pi settings file count. Build tooling\n * markers are deliberately not consulted: a consumer repository has no Nx, pnpm\n * workspace, or plugins profile to offer, and trusting arbitrary project config\n * would let an unapproved directory decide what gets loaded.\n */\nexport function isRepositoryRoot(directory: string): boolean {\n return isDirectory(path.join(directory, DOOM_DIRECTORY)) || isFile(path.join(directory, PI_SETTINGS));\n}\n\n/**\n * Walks up from `start` looking for the repository root.\n *\n * The nearest marked ancestor wins, so a session started in a subdirectory\n * resolves to the repository that configured Doom rather than to a parent\n * checkout that happens to sit above it.\n */\nexport function findRepositoryRoot(start: string): string {\n let directory = path.resolve(start);\n while (true) {\n if (isRepositoryRoot(directory)) return directory;\n const parent = path.dirname(directory);\n if (parent === directory) throw new Error(`Could not find repository root from ${start}`);\n directory = parent;\n }\n}\n"],"mappings":"8MAIA,MAEM,EAAcA,EAAAA,QAAK,KAAK,MAAO,gBAAgB,CAErD,SAAS,EAAY,EAAyB,CAC5C,GAAI,CACF,OAAOC,EAAAA,QAAG,SAAS,EAAO,CAAC,aAAa,MAClC,CACN,MAAO,IAIX,SAAS,EAAO,EAAyB,CACvC,GAAI,CACF,OAAOA,EAAAA,QAAG,SAAS,EAAO,CAAC,QAAQ,MAC7B,CACN,MAAO,IAYX,SAAgB,EAAiB,EAA4B,CAC3D,OAAO,EAAYD,EAAAA,QAAK,KAAK,EAAW,QAAe,CAAC,EAAI,EAAOA,EAAAA,QAAK,KAAK,EAAW,EAAY,CAAC,CAUvG,SAAgB,EAAmB,EAAuB,CACxD,IAAI,EAAYA,EAAAA,QAAK,QAAQ,EAAM,CACnC,OAAa,CACX,GAAI,EAAiB,EAAU,CAAE,OAAO,EACxC,IAAM,EAASA,EAAAA,QAAK,QAAQ,EAAU,CACtC,GAAI,IAAW,EAAW,MAAU,MAAM,uCAAuC,IAAQ,CACzF,EAAY"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region src/utils/repository.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* True when a directory carries a marker Doom Pi is willing to treat as a root.
|
|
4
|
+
*
|
|
5
|
+
* Only Doom's own directory or an existing Pi settings file count. Build tooling
|
|
6
|
+
* markers are deliberately not consulted: a consumer repository has no Nx, pnpm
|
|
7
|
+
* workspace, or plugins profile to offer, and trusting arbitrary project config
|
|
8
|
+
* would let an unapproved directory decide what gets loaded.
|
|
9
|
+
*/
|
|
10
|
+
declare function isRepositoryRoot(directory: string): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Walks up from `start` looking for the repository root.
|
|
13
|
+
*
|
|
14
|
+
* The nearest marked ancestor wins, so a session started in a subdirectory
|
|
15
|
+
* resolves to the repository that configured Doom rather than to a parent
|
|
16
|
+
* checkout that happens to sit above it.
|
|
17
|
+
*/
|
|
18
|
+
declare function findRepositoryRoot(start: string): string;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { findRepositoryRoot, isRepositoryRoot };
|
|
21
|
+
//# sourceMappingURL=repository.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repository.d.cts","names":[],"sources":["../../src/utils/repository.ts"],"mappings":";;AAgCA;;;;;AAWA;;iBAXgB,gBAAA,CAAiB,SAAA;;;;;;;;iBAWjB,kBAAA,CAAmB,KAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region src/utils/repository.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* True when a directory carries a marker Doom Pi is willing to treat as a root.
|
|
4
|
+
*
|
|
5
|
+
* Only Doom's own directory or an existing Pi settings file count. Build tooling
|
|
6
|
+
* markers are deliberately not consulted: a consumer repository has no Nx, pnpm
|
|
7
|
+
* workspace, or plugins profile to offer, and trusting arbitrary project config
|
|
8
|
+
* would let an unapproved directory decide what gets loaded.
|
|
9
|
+
*/
|
|
10
|
+
declare function isRepositoryRoot(directory: string): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Walks up from `start` looking for the repository root.
|
|
13
|
+
*
|
|
14
|
+
* The nearest marked ancestor wins, so a session started in a subdirectory
|
|
15
|
+
* resolves to the repository that configured Doom rather than to a parent
|
|
16
|
+
* checkout that happens to sit above it.
|
|
17
|
+
*/
|
|
18
|
+
declare function findRepositoryRoot(start: string): string;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { findRepositoryRoot, isRepositoryRoot };
|
|
21
|
+
//# sourceMappingURL=repository.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repository.d.mts","names":[],"sources":["../../src/utils/repository.ts"],"mappings":";;AAgCA;;;;;AAWA;;iBAXgB,gBAAA,CAAiB,SAAA;;;;;;;;iBAWjB,kBAAA,CAAmB,KAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import e from"node:path";import t from"node:fs";const n=e.join(`.pi`,`settings.json`);function r(e){try{return t.statSync(e).isDirectory()}catch{return!1}}function i(e){try{return t.statSync(e).isFile()}catch{return!1}}function a(t){return r(e.join(t,`.doom`))||i(e.join(t,n))}function o(t){let n=e.resolve(t);for(;;){if(a(n))return n;let r=e.dirname(n);if(r===n)throw Error(`Could not find repository root from ${t}`);n=r}}export{o as findRepositoryRoot,a as isRepositoryRoot};
|
|
2
|
+
//# sourceMappingURL=repository.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repository.mjs","names":[],"sources":["../../src/utils/repository.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\n\n/** Doom's own repository configuration directory. */\nconst DOOM_DIRECTORY = '.doom';\n/** A Pi project that has been configured, rather than any stray `.pi` folder. */\nconst PI_SETTINGS = path.join('.pi', 'settings.json');\n\nfunction isDirectory(target: string): boolean {\n try {\n return fs.statSync(target).isDirectory();\n } catch {\n return false;\n }\n}\n\nfunction isFile(target: string): boolean {\n try {\n return fs.statSync(target).isFile();\n } catch {\n return false;\n }\n}\n\n/**\n * True when a directory carries a marker Doom Pi is willing to treat as a root.\n *\n * Only Doom's own directory or an existing Pi settings file count. Build tooling\n * markers are deliberately not consulted: a consumer repository has no Nx, pnpm\n * workspace, or plugins profile to offer, and trusting arbitrary project config\n * would let an unapproved directory decide what gets loaded.\n */\nexport function isRepositoryRoot(directory: string): boolean {\n return isDirectory(path.join(directory, DOOM_DIRECTORY)) || isFile(path.join(directory, PI_SETTINGS));\n}\n\n/**\n * Walks up from `start` looking for the repository root.\n *\n * The nearest marked ancestor wins, so a session started in a subdirectory\n * resolves to the repository that configured Doom rather than to a parent\n * checkout that happens to sit above it.\n */\nexport function findRepositoryRoot(start: string): string {\n let directory = path.resolve(start);\n while (true) {\n if (isRepositoryRoot(directory)) return directory;\n const parent = path.dirname(directory);\n if (parent === directory) throw new Error(`Could not find repository root from ${start}`);\n directory = parent;\n }\n}\n"],"mappings":"gDAIA,MAEM,EAAc,EAAK,KAAK,MAAO,gBAAgB,CAErD,SAAS,EAAY,EAAyB,CAC5C,GAAI,CACF,OAAO,EAAG,SAAS,EAAO,CAAC,aAAa,MAClC,CACN,MAAO,IAIX,SAAS,EAAO,EAAyB,CACvC,GAAI,CACF,OAAO,EAAG,SAAS,EAAO,CAAC,QAAQ,MAC7B,CACN,MAAO,IAYX,SAAgB,EAAiB,EAA4B,CAC3D,OAAO,EAAY,EAAK,KAAK,EAAW,QAAe,CAAC,EAAI,EAAO,EAAK,KAAK,EAAW,EAAY,CAAC,CAUvG,SAAgB,EAAmB,EAAuB,CACxD,IAAI,EAAY,EAAK,QAAQ,EAAM,CACnC,OAAa,CACX,GAAI,EAAiB,EAAU,CAAE,OAAO,EACxC,IAAM,EAAS,EAAK,QAAQ,EAAU,CACtC,GAAI,IAAW,EAAW,MAAU,MAAM,uCAAuC,IAAQ,CACzF,EAAY"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=new Map([[`Read`,`read`],[`Edit`,`edit`],[`Write`,`write`],[`Bash`,`bash`],[`Glob`,`find`],[`Grep`,`grep`],[`Agent`,`subagent`]]),t=new Map([...e].map(([e,t])=>[t,e])),n=new Set([`WebFetch`,`WebSearch`]);function r(r){if(r===`Skill`)return;if(n.has(r)||r.startsWith(`mcp__`))return`mcp`;let i=e.get(r);if(i)return i;if(r===`mcp`||t.has(r))return r;throw Error(`Unsupported agent tool: ${r}`)}function i(e){return t.get(e)??e}exports.toClaudeToolName=i,exports.toPiToolName=r;
|
|
2
|
+
//# sourceMappingURL=toolNames.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolNames.cjs","names":[],"sources":["../../src/utils/toolNames.ts"],"sourcesContent":["/**\n * Translation between Claude and Pi tool names.\n *\n * Both directions are needed: agent definitions are authored with Claude names\n * and have to be rewritten for Pi, while repository hook matchers are written\n * against Claude names and are tested against the Pi name of the tool that\n * fired. Deriving the reverse map from the forward one is what stops the two\n * drifting, which they previously could because each direction had its own\n * hand-maintained table.\n */\n\nconst CLAUDE_TO_PI = new Map([\n ['Read', 'read'],\n ['Edit', 'edit'],\n ['Write', 'write'],\n ['Bash', 'bash'],\n ['Glob', 'find'],\n ['Grep', 'grep'],\n ['Agent', 'subagent'],\n]);\n\nconst PI_TO_CLAUDE = new Map([...CLAUDE_TO_PI].map(([claudeName, piName]) => [piName, claudeName]));\n\nconst MCP_TOOL = 'mcp';\nconst SKILL_TOOL = 'Skill';\nconst MCP_TOOL_PREFIX = 'mcp__';\nconst WEB_TOOLS = new Set(['WebFetch', 'WebSearch']);\n\n/**\n * Pi's name for a tool named in an agent definition.\n *\n * Returns undefined for Skill, which Pi discovers rather than declares. Web and\n * MCP tools all collapse onto Pi's single `mcp` tool. Definitions already\n * written against Pi pass through unchanged, and an unrecognised name throws\n * rather than reaching Pi as a tool it will silently ignore.\n */\nexport function toPiToolName(tool: string): string | undefined {\n if (tool === SKILL_TOOL) return undefined;\n if (WEB_TOOLS.has(tool) || tool.startsWith(MCP_TOOL_PREFIX)) return MCP_TOOL;\n const mapped = CLAUDE_TO_PI.get(tool);\n if (mapped) return mapped;\n if (tool === MCP_TOOL || PI_TO_CLAUDE.has(tool)) return tool;\n throw new Error(`Unsupported agent tool: ${tool}`);\n}\n\n/** The Claude name a hook matcher expects for a tool Pi just ran. */\nexport function toClaudeToolName(tool: string): string {\n return PI_TO_CLAUDE.get(tool) ?? tool;\n}\n"],"mappings":"mEAWA,MAAM,EAAe,IAAI,IAAI,CAC3B,CAAC,OAAQ,OAAO,CAChB,CAAC,OAAQ,OAAO,CAChB,CAAC,QAAS,QAAQ,CAClB,CAAC,OAAQ,OAAO,CAChB,CAAC,OAAQ,OAAO,CAChB,CAAC,OAAQ,OAAO,CAChB,CAAC,QAAS,WAAW,CACtB,CAAC,CAEI,EAAe,IAAI,IAAI,CAAC,GAAG,EAAa,CAAC,KAAK,CAAC,EAAY,KAAY,CAAC,EAAQ,EAAW,CAAC,CAAC,CAK7F,EAAY,IAAI,IAAI,CAAC,WAAY,YAAY,CAAC,CAUpD,SAAgB,EAAa,EAAkC,CAC7D,GAAI,IAAS,QAAY,OACzB,GAAI,EAAU,IAAI,EAAK,EAAI,EAAK,WAAW,QAAgB,CAAE,MAAO,MACpE,IAAM,EAAS,EAAa,IAAI,EAAK,CACrC,GAAI,EAAQ,OAAO,EACnB,GAAI,IAAS,OAAY,EAAa,IAAI,EAAK,CAAE,OAAO,EACxD,MAAU,MAAM,2BAA2B,IAAO,CAIpD,SAAgB,EAAiB,EAAsB,CACrD,OAAO,EAAa,IAAI,EAAK,EAAI"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/utils/toolNames.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Translation between Claude and Pi tool names.
|
|
4
|
+
*
|
|
5
|
+
* Both directions are needed: agent definitions are authored with Claude names
|
|
6
|
+
* and have to be rewritten for Pi, while repository hook matchers are written
|
|
7
|
+
* against Claude names and are tested against the Pi name of the tool that
|
|
8
|
+
* fired. Deriving the reverse map from the forward one is what stops the two
|
|
9
|
+
* drifting, which they previously could because each direction had its own
|
|
10
|
+
* hand-maintained table.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Pi's name for a tool named in an agent definition.
|
|
14
|
+
*
|
|
15
|
+
* Returns undefined for Skill, which Pi discovers rather than declares. Web and
|
|
16
|
+
* MCP tools all collapse onto Pi's single `mcp` tool. Definitions already
|
|
17
|
+
* written against Pi pass through unchanged, and an unrecognised name throws
|
|
18
|
+
* rather than reaching Pi as a tool it will silently ignore.
|
|
19
|
+
*/
|
|
20
|
+
declare function toPiToolName(tool: string): string | undefined;
|
|
21
|
+
/** The Claude name a hook matcher expects for a tool Pi just ran. */
|
|
22
|
+
declare function toClaudeToolName(tool: string): string;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { toClaudeToolName, toPiToolName };
|
|
25
|
+
//# sourceMappingURL=toolNames.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolNames.d.cts","names":[],"sources":["../../src/utils/toolNames.ts"],"mappings":";;AAoCA;;;;;AAUA;;;;;;;;;;;;iBAVgB,YAAA,CAAa,IAAA;;iBAUb,gBAAA,CAAiB,IAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/utils/toolNames.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Translation between Claude and Pi tool names.
|
|
4
|
+
*
|
|
5
|
+
* Both directions are needed: agent definitions are authored with Claude names
|
|
6
|
+
* and have to be rewritten for Pi, while repository hook matchers are written
|
|
7
|
+
* against Claude names and are tested against the Pi name of the tool that
|
|
8
|
+
* fired. Deriving the reverse map from the forward one is what stops the two
|
|
9
|
+
* drifting, which they previously could because each direction had its own
|
|
10
|
+
* hand-maintained table.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Pi's name for a tool named in an agent definition.
|
|
14
|
+
*
|
|
15
|
+
* Returns undefined for Skill, which Pi discovers rather than declares. Web and
|
|
16
|
+
* MCP tools all collapse onto Pi's single `mcp` tool. Definitions already
|
|
17
|
+
* written against Pi pass through unchanged, and an unrecognised name throws
|
|
18
|
+
* rather than reaching Pi as a tool it will silently ignore.
|
|
19
|
+
*/
|
|
20
|
+
declare function toPiToolName(tool: string): string | undefined;
|
|
21
|
+
/** The Claude name a hook matcher expects for a tool Pi just ran. */
|
|
22
|
+
declare function toClaudeToolName(tool: string): string;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { toClaudeToolName, toPiToolName };
|
|
25
|
+
//# sourceMappingURL=toolNames.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolNames.d.mts","names":[],"sources":["../../src/utils/toolNames.ts"],"mappings":";;AAoCA;;;;;AAUA;;;;;;;;;;;;iBAVgB,YAAA,CAAa,IAAA;;iBAUb,gBAAA,CAAiB,IAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=new Map([[`Read`,`read`],[`Edit`,`edit`],[`Write`,`write`],[`Bash`,`bash`],[`Glob`,`find`],[`Grep`,`grep`],[`Agent`,`subagent`]]),t=new Map([...e].map(([e,t])=>[t,e])),n=new Set([`WebFetch`,`WebSearch`]);function r(r){if(r===`Skill`)return;if(n.has(r)||r.startsWith(`mcp__`))return`mcp`;let i=e.get(r);if(i)return i;if(r===`mcp`||t.has(r))return r;throw Error(`Unsupported agent tool: ${r}`)}function i(e){return t.get(e)??e}export{i as toClaudeToolName,r as toPiToolName};
|
|
2
|
+
//# sourceMappingURL=toolNames.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolNames.mjs","names":[],"sources":["../../src/utils/toolNames.ts"],"sourcesContent":["/**\n * Translation between Claude and Pi tool names.\n *\n * Both directions are needed: agent definitions are authored with Claude names\n * and have to be rewritten for Pi, while repository hook matchers are written\n * against Claude names and are tested against the Pi name of the tool that\n * fired. Deriving the reverse map from the forward one is what stops the two\n * drifting, which they previously could because each direction had its own\n * hand-maintained table.\n */\n\nconst CLAUDE_TO_PI = new Map([\n ['Read', 'read'],\n ['Edit', 'edit'],\n ['Write', 'write'],\n ['Bash', 'bash'],\n ['Glob', 'find'],\n ['Grep', 'grep'],\n ['Agent', 'subagent'],\n]);\n\nconst PI_TO_CLAUDE = new Map([...CLAUDE_TO_PI].map(([claudeName, piName]) => [piName, claudeName]));\n\nconst MCP_TOOL = 'mcp';\nconst SKILL_TOOL = 'Skill';\nconst MCP_TOOL_PREFIX = 'mcp__';\nconst WEB_TOOLS = new Set(['WebFetch', 'WebSearch']);\n\n/**\n * Pi's name for a tool named in an agent definition.\n *\n * Returns undefined for Skill, which Pi discovers rather than declares. Web and\n * MCP tools all collapse onto Pi's single `mcp` tool. Definitions already\n * written against Pi pass through unchanged, and an unrecognised name throws\n * rather than reaching Pi as a tool it will silently ignore.\n */\nexport function toPiToolName(tool: string): string | undefined {\n if (tool === SKILL_TOOL) return undefined;\n if (WEB_TOOLS.has(tool) || tool.startsWith(MCP_TOOL_PREFIX)) return MCP_TOOL;\n const mapped = CLAUDE_TO_PI.get(tool);\n if (mapped) return mapped;\n if (tool === MCP_TOOL || PI_TO_CLAUDE.has(tool)) return tool;\n throw new Error(`Unsupported agent tool: ${tool}`);\n}\n\n/** The Claude name a hook matcher expects for a tool Pi just ran. */\nexport function toClaudeToolName(tool: string): string {\n return PI_TO_CLAUDE.get(tool) ?? tool;\n}\n"],"mappings":"AAWA,MAAM,EAAe,IAAI,IAAI,CAC3B,CAAC,OAAQ,OAAO,CAChB,CAAC,OAAQ,OAAO,CAChB,CAAC,QAAS,QAAQ,CAClB,CAAC,OAAQ,OAAO,CAChB,CAAC,OAAQ,OAAO,CAChB,CAAC,OAAQ,OAAO,CAChB,CAAC,QAAS,WAAW,CACtB,CAAC,CAEI,EAAe,IAAI,IAAI,CAAC,GAAG,EAAa,CAAC,KAAK,CAAC,EAAY,KAAY,CAAC,EAAQ,EAAW,CAAC,CAAC,CAK7F,EAAY,IAAI,IAAI,CAAC,WAAY,YAAY,CAAC,CAUpD,SAAgB,EAAa,EAAkC,CAC7D,GAAI,IAAS,QAAY,OACzB,GAAI,EAAU,IAAI,EAAK,EAAI,EAAK,WAAW,QAAgB,CAAE,MAAO,MACpE,IAAM,EAAS,EAAa,IAAI,EAAK,CACrC,GAAI,EAAQ,OAAO,EACnB,GAAI,IAAS,OAAY,EAAa,IAAI,EAAK,CAAE,OAAO,EACxD,MAAU,MAAM,2BAA2B,IAAO,CAIpD,SAAgB,EAAiB,EAAsB,CACrD,OAAO,EAAa,IAAI,EAAK,EAAI"}
|