compound-engineering-pi 0.2.3
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 +124 -0
- package/bin/compound-engineering-pi +12 -0
- package/bin/compound-plugin +12 -0
- package/compound-engineering-pi +12 -0
- package/compound-plugin +5 -0
- package/docs/pi.md +152 -0
- package/extensions/compound-engineering-compat.ts +452 -0
- package/package.json +84 -0
- package/pi-resources/compound-engineering/mcporter.json +7 -0
- package/plugins/coding-tutor/.claude-plugin/plugin.json +9 -0
- package/plugins/coding-tutor/README.md +37 -0
- package/plugins/coding-tutor/commands/quiz-me.md +1 -0
- package/plugins/coding-tutor/commands/sync-tutorials.md +25 -0
- package/plugins/coding-tutor/commands/teach-me.md +1 -0
- package/plugins/coding-tutor/skills/coding-tutor/SKILL.md +214 -0
- package/plugins/coding-tutor/skills/coding-tutor/scripts/create_tutorial.py +207 -0
- package/plugins/coding-tutor/skills/coding-tutor/scripts/index_tutorials.py +193 -0
- package/plugins/coding-tutor/skills/coding-tutor/scripts/quiz_priority.py +190 -0
- package/plugins/coding-tutor/skills/coding-tutor/scripts/setup_tutorials.py +118 -0
- package/plugins/compound-engineering/.claude-plugin/plugin.json +33 -0
- package/plugins/compound-engineering/CHANGELOG.md +457 -0
- package/plugins/compound-engineering/CLAUDE.md +89 -0
- package/plugins/compound-engineering/LICENSE +21 -0
- package/plugins/compound-engineering/README.md +232 -0
- package/plugins/compound-engineering/agents/design/design-implementation-reviewer.md +109 -0
- package/plugins/compound-engineering/agents/design/design-iterator.md +224 -0
- package/plugins/compound-engineering/agents/design/figma-design-sync.md +190 -0
- package/plugins/compound-engineering/agents/docs/ankane-readme-writer.md +65 -0
- package/plugins/compound-engineering/agents/research/best-practices-researcher.md +126 -0
- package/plugins/compound-engineering/agents/research/framework-docs-researcher.md +106 -0
- package/plugins/compound-engineering/agents/research/git-history-analyzer.md +59 -0
- package/plugins/compound-engineering/agents/research/learnings-researcher.md +264 -0
- package/plugins/compound-engineering/agents/research/repo-research-analyst.md +135 -0
- package/plugins/compound-engineering/agents/review/agent-native-reviewer.md +261 -0
- package/plugins/compound-engineering/agents/review/architecture-strategist.md +67 -0
- package/plugins/compound-engineering/agents/review/code-simplicity-reviewer.md +101 -0
- package/plugins/compound-engineering/agents/review/data-integrity-guardian.md +85 -0
- package/plugins/compound-engineering/agents/review/data-migration-expert.md +112 -0
- package/plugins/compound-engineering/agents/review/deployment-verification-agent.md +174 -0
- package/plugins/compound-engineering/agents/review/dhh-rails-reviewer.md +66 -0
- package/plugins/compound-engineering/agents/review/julik-frontend-races-reviewer.md +221 -0
- package/plugins/compound-engineering/agents/review/kieran-python-reviewer.md +133 -0
- package/plugins/compound-engineering/agents/review/kieran-rails-reviewer.md +115 -0
- package/plugins/compound-engineering/agents/review/kieran-typescript-reviewer.md +124 -0
- package/plugins/compound-engineering/agents/review/pattern-recognition-specialist.md +72 -0
- package/plugins/compound-engineering/agents/review/performance-oracle.md +137 -0
- package/plugins/compound-engineering/agents/review/schema-drift-detector.md +154 -0
- package/plugins/compound-engineering/agents/review/security-sentinel.md +114 -0
- package/plugins/compound-engineering/agents/workflow/bug-reproduction-validator.md +82 -0
- package/plugins/compound-engineering/agents/workflow/every-style-editor.md +64 -0
- package/plugins/compound-engineering/agents/workflow/lint.md +16 -0
- package/plugins/compound-engineering/agents/workflow/pr-comment-resolver.md +84 -0
- package/plugins/compound-engineering/agents/workflow/spec-flow-analyzer.md +134 -0
- package/plugins/compound-engineering/commands/agent-native-audit.md +278 -0
- package/plugins/compound-engineering/commands/changelog.md +138 -0
- package/plugins/compound-engineering/commands/create-agent-skill.md +9 -0
- package/plugins/compound-engineering/commands/deepen-plan.md +546 -0
- package/plugins/compound-engineering/commands/deploy-docs.md +113 -0
- package/plugins/compound-engineering/commands/feature-video.md +342 -0
- package/plugins/compound-engineering/commands/generate_command.md +163 -0
- package/plugins/compound-engineering/commands/heal-skill.md +143 -0
- package/plugins/compound-engineering/commands/lfg.md +20 -0
- package/plugins/compound-engineering/commands/release-docs.md +212 -0
- package/plugins/compound-engineering/commands/report-bug.md +151 -0
- package/plugins/compound-engineering/commands/reproduce-bug.md +100 -0
- package/plugins/compound-engineering/commands/resolve_parallel.md +35 -0
- package/plugins/compound-engineering/commands/resolve_todo_parallel.md +37 -0
- package/plugins/compound-engineering/commands/slfg.md +32 -0
- package/plugins/compound-engineering/commands/technical_review.md +8 -0
- package/plugins/compound-engineering/commands/test-browser.md +339 -0
- package/plugins/compound-engineering/commands/test-xcode.md +332 -0
- package/plugins/compound-engineering/commands/triage.md +311 -0
- package/plugins/compound-engineering/commands/workflows/brainstorm.md +124 -0
- package/plugins/compound-engineering/commands/workflows/compound.md +239 -0
- package/plugins/compound-engineering/commands/workflows/plan.md +551 -0
- package/plugins/compound-engineering/commands/workflows/review.md +526 -0
- package/plugins/compound-engineering/commands/workflows/work.md +433 -0
- package/plugins/compound-engineering/skills/agent-browser/SKILL.md +223 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/SKILL.md +435 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/action-parity-discipline.md +409 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/agent-execution-patterns.md +467 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/agent-native-testing.md +582 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/architecture-patterns.md +478 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/dynamic-context-injection.md +338 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/files-universal-interface.md +301 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/from-primitives-to-domain-tools.md +359 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/mcp-tool-design.md +506 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/mobile-patterns.md +871 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/product-implications.md +443 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/refactoring-to-prompt-native.md +317 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/self-modification.md +269 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/shared-workspace-architecture.md +680 -0
- package/plugins/compound-engineering/skills/agent-native-architecture/references/system-prompt-design.md +250 -0
- package/plugins/compound-engineering/skills/andrew-kane-gem-writer/SKILL.md +184 -0
- package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/database-adapters.md +231 -0
- package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/module-organization.md +121 -0
- package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/rails-integration.md +183 -0
- package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/resources.md +119 -0
- package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/testing-patterns.md +261 -0
- package/plugins/compound-engineering/skills/brainstorming/SKILL.md +190 -0
- package/plugins/compound-engineering/skills/compound-docs/SKILL.md +511 -0
- package/plugins/compound-engineering/skills/compound-docs/assets/critical-pattern-template.md +34 -0
- package/plugins/compound-engineering/skills/compound-docs/assets/resolution-template.md +93 -0
- package/plugins/compound-engineering/skills/compound-docs/references/yaml-schema.md +65 -0
- package/plugins/compound-engineering/skills/compound-docs/schema.yaml +176 -0
- package/plugins/compound-engineering/skills/create-agent-skills/SKILL.md +275 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/api-security.md +226 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/be-clear-and-direct.md +531 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/best-practices.md +404 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/common-patterns.md +595 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/core-principles.md +437 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/executable-code.md +175 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/iteration-and-testing.md +474 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/official-spec.md +134 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/recommended-structure.md +168 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/skill-structure.md +152 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/using-scripts.md +113 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/using-templates.md +112 -0
- package/plugins/compound-engineering/skills/create-agent-skills/references/workflows-and-validation.md +510 -0
- package/plugins/compound-engineering/skills/create-agent-skills/templates/router-skill.md +73 -0
- package/plugins/compound-engineering/skills/create-agent-skills/templates/simple-skill.md +33 -0
- package/plugins/compound-engineering/skills/create-agent-skills/workflows/add-reference.md +96 -0
- package/plugins/compound-engineering/skills/create-agent-skills/workflows/add-script.md +93 -0
- package/plugins/compound-engineering/skills/create-agent-skills/workflows/add-template.md +74 -0
- package/plugins/compound-engineering/skills/create-agent-skills/workflows/add-workflow.md +120 -0
- package/plugins/compound-engineering/skills/create-agent-skills/workflows/audit-skill.md +138 -0
- package/plugins/compound-engineering/skills/create-agent-skills/workflows/create-domain-expertise-skill.md +605 -0
- package/plugins/compound-engineering/skills/create-agent-skills/workflows/create-new-skill.md +191 -0
- package/plugins/compound-engineering/skills/create-agent-skills/workflows/get-guidance.md +121 -0
- package/plugins/compound-engineering/skills/create-agent-skills/workflows/upgrade-to-router.md +161 -0
- package/plugins/compound-engineering/skills/create-agent-skills/workflows/verify-skill.md +204 -0
- package/plugins/compound-engineering/skills/dhh-rails-style/SKILL.md +185 -0
- package/plugins/compound-engineering/skills/dhh-rails-style/references/architecture.md +653 -0
- package/plugins/compound-engineering/skills/dhh-rails-style/references/controllers.md +303 -0
- package/plugins/compound-engineering/skills/dhh-rails-style/references/frontend.md +510 -0
- package/plugins/compound-engineering/skills/dhh-rails-style/references/gems.md +266 -0
- package/plugins/compound-engineering/skills/dhh-rails-style/references/models.md +359 -0
- package/plugins/compound-engineering/skills/dhh-rails-style/references/testing.md +338 -0
- package/plugins/compound-engineering/skills/document-review/SKILL.md +87 -0
- package/plugins/compound-engineering/skills/dspy-ruby/SKILL.md +737 -0
- package/plugins/compound-engineering/skills/dspy-ruby/assets/config-template.rb +187 -0
- package/plugins/compound-engineering/skills/dspy-ruby/assets/module-template.rb +300 -0
- package/plugins/compound-engineering/skills/dspy-ruby/assets/signature-template.rb +221 -0
- package/plugins/compound-engineering/skills/dspy-ruby/references/core-concepts.md +674 -0
- package/plugins/compound-engineering/skills/dspy-ruby/references/observability.md +366 -0
- package/plugins/compound-engineering/skills/dspy-ruby/references/optimization.md +603 -0
- package/plugins/compound-engineering/skills/dspy-ruby/references/providers.md +418 -0
- package/plugins/compound-engineering/skills/dspy-ruby/references/toolsets.md +502 -0
- package/plugins/compound-engineering/skills/every-style-editor/SKILL.md +134 -0
- package/plugins/compound-engineering/skills/every-style-editor/references/EVERY_WRITE_STYLE.md +529 -0
- package/plugins/compound-engineering/skills/file-todos/SKILL.md +252 -0
- package/plugins/compound-engineering/skills/file-todos/assets/todo-template.md +155 -0
- package/plugins/compound-engineering/skills/frontend-design/SKILL.md +42 -0
- package/plugins/compound-engineering/skills/gemini-imagegen/SKILL.md +237 -0
- package/plugins/compound-engineering/skills/gemini-imagegen/requirements.txt +2 -0
- package/plugins/compound-engineering/skills/gemini-imagegen/scripts/compose_images.py +157 -0
- package/plugins/compound-engineering/skills/gemini-imagegen/scripts/edit_image.py +144 -0
- package/plugins/compound-engineering/skills/gemini-imagegen/scripts/gemini_images.py +263 -0
- package/plugins/compound-engineering/skills/gemini-imagegen/scripts/generate_image.py +133 -0
- package/plugins/compound-engineering/skills/gemini-imagegen/scripts/multi_turn_chat.py +216 -0
- package/plugins/compound-engineering/skills/git-worktree/SKILL.md +302 -0
- package/plugins/compound-engineering/skills/git-worktree/scripts/worktree-manager.sh +337 -0
- package/plugins/compound-engineering/skills/orchestrating-swarms/SKILL.md +1718 -0
- package/plugins/compound-engineering/skills/rclone/SKILL.md +150 -0
- package/plugins/compound-engineering/skills/rclone/scripts/check_setup.sh +60 -0
- package/plugins/compound-engineering/skills/resolve-pr-parallel/SKILL.md +89 -0
- package/plugins/compound-engineering/skills/resolve-pr-parallel/scripts/get-pr-comments +68 -0
- package/plugins/compound-engineering/skills/resolve-pr-parallel/scripts/resolve-pr-thread +23 -0
- package/plugins/compound-engineering/skills/skill-creator/SKILL.md +210 -0
- package/plugins/compound-engineering/skills/skill-creator/scripts/init_skill.py +303 -0
- package/plugins/compound-engineering/skills/skill-creator/scripts/package_skill.py +110 -0
- package/plugins/compound-engineering/skills/skill-creator/scripts/quick_validate.py +65 -0
- package/prompts/deepen-plan.md +549 -0
- package/prompts/feature-video.md +341 -0
- package/prompts/resolve_todo_parallel.md +36 -0
- package/prompts/test-browser.md +342 -0
- package/prompts/workflows-brainstorm.md +123 -0
- package/prompts/workflows-compound.md +238 -0
- package/prompts/workflows-plan.md +550 -0
- package/prompts/workflows-review.md +529 -0
- package/prompts/workflows-work.md +432 -0
- package/skills/agent-browser/SKILL.md +223 -0
- package/skills/agent-native-architecture/SKILL.md +435 -0
- package/skills/agent-native-architecture/references/action-parity-discipline.md +409 -0
- package/skills/agent-native-architecture/references/agent-execution-patterns.md +467 -0
- package/skills/agent-native-architecture/references/agent-native-testing.md +582 -0
- package/skills/agent-native-architecture/references/architecture-patterns.md +478 -0
- package/skills/agent-native-architecture/references/dynamic-context-injection.md +338 -0
- package/skills/agent-native-architecture/references/files-universal-interface.md +301 -0
- package/skills/agent-native-architecture/references/from-primitives-to-domain-tools.md +359 -0
- package/skills/agent-native-architecture/references/mcp-tool-design.md +506 -0
- package/skills/agent-native-architecture/references/mobile-patterns.md +871 -0
- package/skills/agent-native-architecture/references/product-implications.md +443 -0
- package/skills/agent-native-architecture/references/refactoring-to-prompt-native.md +317 -0
- package/skills/agent-native-architecture/references/self-modification.md +269 -0
- package/skills/agent-native-architecture/references/shared-workspace-architecture.md +680 -0
- package/skills/agent-native-architecture/references/system-prompt-design.md +250 -0
- package/skills/agent-native-reviewer/SKILL.md +260 -0
- package/skills/andrew-kane-gem-writer/SKILL.md +184 -0
- package/skills/andrew-kane-gem-writer/references/database-adapters.md +231 -0
- package/skills/andrew-kane-gem-writer/references/module-organization.md +121 -0
- package/skills/andrew-kane-gem-writer/references/rails-integration.md +183 -0
- package/skills/andrew-kane-gem-writer/references/resources.md +119 -0
- package/skills/andrew-kane-gem-writer/references/testing-patterns.md +261 -0
- package/skills/ankane-readme-writer/SKILL.md +63 -0
- package/skills/architecture-strategist/SKILL.md +66 -0
- package/skills/best-practices-researcher/SKILL.md +125 -0
- package/skills/brainstorming/SKILL.md +190 -0
- package/skills/bug-reproduction-validator/SKILL.md +81 -0
- package/skills/code-simplicity-reviewer/SKILL.md +100 -0
- package/skills/compound-docs/SKILL.md +511 -0
- package/skills/compound-docs/assets/critical-pattern-template.md +34 -0
- package/skills/compound-docs/assets/resolution-template.md +93 -0
- package/skills/compound-docs/references/yaml-schema.md +65 -0
- package/skills/compound-docs/schema.yaml +176 -0
- package/skills/create-agent-skills/SKILL.md +275 -0
- package/skills/create-agent-skills/references/api-security.md +226 -0
- package/skills/create-agent-skills/references/be-clear-and-direct.md +531 -0
- package/skills/create-agent-skills/references/best-practices.md +404 -0
- package/skills/create-agent-skills/references/common-patterns.md +595 -0
- package/skills/create-agent-skills/references/core-principles.md +437 -0
- package/skills/create-agent-skills/references/executable-code.md +175 -0
- package/skills/create-agent-skills/references/iteration-and-testing.md +474 -0
- package/skills/create-agent-skills/references/official-spec.md +134 -0
- package/skills/create-agent-skills/references/recommended-structure.md +168 -0
- package/skills/create-agent-skills/references/skill-structure.md +152 -0
- package/skills/create-agent-skills/references/using-scripts.md +113 -0
- package/skills/create-agent-skills/references/using-templates.md +112 -0
- package/skills/create-agent-skills/references/workflows-and-validation.md +510 -0
- package/skills/create-agent-skills/templates/router-skill.md +73 -0
- package/skills/create-agent-skills/templates/simple-skill.md +33 -0
- package/skills/create-agent-skills/workflows/add-reference.md +96 -0
- package/skills/create-agent-skills/workflows/add-script.md +93 -0
- package/skills/create-agent-skills/workflows/add-template.md +74 -0
- package/skills/create-agent-skills/workflows/add-workflow.md +120 -0
- package/skills/create-agent-skills/workflows/audit-skill.md +138 -0
- package/skills/create-agent-skills/workflows/create-domain-expertise-skill.md +605 -0
- package/skills/create-agent-skills/workflows/create-new-skill.md +191 -0
- package/skills/create-agent-skills/workflows/get-guidance.md +121 -0
- package/skills/create-agent-skills/workflows/upgrade-to-router.md +161 -0
- package/skills/create-agent-skills/workflows/verify-skill.md +204 -0
- package/skills/data-integrity-guardian/SKILL.md +84 -0
- package/skills/data-migration-expert/SKILL.md +111 -0
- package/skills/deployment-verification-agent/SKILL.md +173 -0
- package/skills/design-implementation-reviewer/SKILL.md +107 -0
- package/skills/design-iterator/SKILL.md +222 -0
- package/skills/dhh-rails-reviewer/SKILL.md +65 -0
- package/skills/dhh-rails-style/SKILL.md +185 -0
- package/skills/dhh-rails-style/references/architecture.md +653 -0
- package/skills/dhh-rails-style/references/controllers.md +303 -0
- package/skills/dhh-rails-style/references/frontend.md +510 -0
- package/skills/dhh-rails-style/references/gems.md +266 -0
- package/skills/dhh-rails-style/references/models.md +359 -0
- package/skills/dhh-rails-style/references/testing.md +338 -0
- package/skills/document-review/SKILL.md +87 -0
- package/skills/dspy-ruby/SKILL.md +737 -0
- package/skills/dspy-ruby/assets/config-template.rb +187 -0
- package/skills/dspy-ruby/assets/module-template.rb +300 -0
- package/skills/dspy-ruby/assets/signature-template.rb +221 -0
- package/skills/dspy-ruby/references/core-concepts.md +674 -0
- package/skills/dspy-ruby/references/observability.md +366 -0
- package/skills/dspy-ruby/references/optimization.md +603 -0
- package/skills/dspy-ruby/references/providers.md +418 -0
- package/skills/dspy-ruby/references/toolsets.md +502 -0
- package/skills/every-style-editor/SKILL.md +134 -0
- package/skills/every-style-editor/references/EVERY_WRITE_STYLE.md +529 -0
- package/skills/every-style-editor-2/SKILL.md +62 -0
- package/skills/figma-design-sync/SKILL.md +188 -0
- package/skills/file-todos/SKILL.md +252 -0
- package/skills/file-todos/assets/todo-template.md +155 -0
- package/skills/framework-docs-researcher/SKILL.md +105 -0
- package/skills/frontend-design/SKILL.md +42 -0
- package/skills/gemini-imagegen/SKILL.md +237 -0
- package/skills/gemini-imagegen/requirements.txt +2 -0
- package/skills/gemini-imagegen/scripts/compose_images.py +157 -0
- package/skills/gemini-imagegen/scripts/edit_image.py +144 -0
- package/skills/gemini-imagegen/scripts/gemini_images.py +263 -0
- package/skills/gemini-imagegen/scripts/generate_image.py +133 -0
- package/skills/gemini-imagegen/scripts/multi_turn_chat.py +216 -0
- package/skills/git-history-analyzer/SKILL.md +58 -0
- package/skills/git-worktree/SKILL.md +302 -0
- package/skills/git-worktree/scripts/worktree-manager.sh +337 -0
- package/skills/julik-frontend-races-reviewer/SKILL.md +220 -0
- package/skills/kieran-python-reviewer/SKILL.md +132 -0
- package/skills/kieran-rails-reviewer/SKILL.md +114 -0
- package/skills/kieran-typescript-reviewer/SKILL.md +123 -0
- package/skills/learnings-researcher/SKILL.md +263 -0
- package/skills/lint/SKILL.md +14 -0
- package/skills/orchestrating-swarms/SKILL.md +1718 -0
- package/skills/pattern-recognition-specialist/SKILL.md +71 -0
- package/skills/performance-oracle/SKILL.md +136 -0
- package/skills/pr-comment-resolver/SKILL.md +82 -0
- package/skills/rclone/SKILL.md +150 -0
- package/skills/rclone/scripts/check_setup.sh +60 -0
- package/skills/repo-research-analyst/SKILL.md +134 -0
- package/skills/resolve_pr_parallel/SKILL.md +89 -0
- package/skills/resolve_pr_parallel/scripts/get-pr-comments +68 -0
- package/skills/resolve_pr_parallel/scripts/resolve-pr-thread +23 -0
- package/skills/schema-drift-detector/SKILL.md +153 -0
- package/skills/security-sentinel/SKILL.md +113 -0
- package/skills/skill-creator/SKILL.md +210 -0
- package/skills/skill-creator/scripts/init_skill.py +303 -0
- package/skills/skill-creator/scripts/package_skill.py +110 -0
- package/skills/skill-creator/scripts/quick_validate.py +65 -0
- package/skills/spec-flow-analyzer/SKILL.md +133 -0
- package/src/commands/convert.ts +183 -0
- package/src/commands/install.ts +273 -0
- package/src/commands/list.ts +37 -0
- package/src/commands/sync.ts +89 -0
- package/src/converters/claude-to-codex.ts +182 -0
- package/src/converters/claude-to-opencode.ts +395 -0
- package/src/converters/claude-to-pi.ts +205 -0
- package/src/index.ts +22 -0
- package/src/parsers/claude-home.ts +65 -0
- package/src/parsers/claude.ts +252 -0
- package/src/sync/codex.ts +92 -0
- package/src/sync/opencode.ts +75 -0
- package/src/sync/pi.ts +88 -0
- package/src/targets/codex.ts +96 -0
- package/src/targets/index.ts +38 -0
- package/src/targets/opencode.ts +57 -0
- package/src/targets/pi.ts +131 -0
- package/src/templates/pi/compat-extension.ts +452 -0
- package/src/types/claude.ts +90 -0
- package/src/types/codex.ts +23 -0
- package/src/types/opencode.ts +54 -0
- package/src/types/pi.ts +40 -0
- package/src/utils/codex-agents.ts +64 -0
- package/src/utils/files.ts +77 -0
- package/src/utils/frontmatter.ts +65 -0
- package/src/utils/symlink.ts +43 -0
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
export const PI_COMPAT_EXTENSION_SOURCE = `import fs from "node:fs"
|
|
2
|
+
import os from "node:os"
|
|
3
|
+
import path from "node:path"
|
|
4
|
+
import { fileURLToPath } from "node:url"
|
|
5
|
+
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent"
|
|
6
|
+
import { Type } from "@sinclair/typebox"
|
|
7
|
+
|
|
8
|
+
const MAX_BYTES = 50 * 1024
|
|
9
|
+
const DEFAULT_SUBAGENT_TIMEOUT_MS = 10 * 60 * 1000
|
|
10
|
+
const MAX_PARALLEL_SUBAGENTS = 8
|
|
11
|
+
|
|
12
|
+
type SubagentTask = {
|
|
13
|
+
agent: string
|
|
14
|
+
task: string
|
|
15
|
+
cwd?: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
type SubagentResult = {
|
|
19
|
+
agent: string
|
|
20
|
+
task: string
|
|
21
|
+
cwd: string
|
|
22
|
+
exitCode: number
|
|
23
|
+
output: string
|
|
24
|
+
stderr: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function truncate(value: string): string {
|
|
28
|
+
const input = value ?? ""
|
|
29
|
+
if (Buffer.byteLength(input, "utf8") <= MAX_BYTES) return input
|
|
30
|
+
const head = input.slice(0, MAX_BYTES)
|
|
31
|
+
return head + "\\n\\n[Output truncated to 50KB]"
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function shellEscape(value: string): string {
|
|
35
|
+
return "'" + value.replace(/'/g, "'\\"'\\"'") + "'"
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function normalizeName(value: string): string {
|
|
39
|
+
return String(value || "")
|
|
40
|
+
.trim()
|
|
41
|
+
.toLowerCase()
|
|
42
|
+
.replace(/[^a-z0-9_-]+/g, "-")
|
|
43
|
+
.replace(/-+/g, "-")
|
|
44
|
+
.replace(/^-+|-+$/g, "")
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function resolveBundledMcporterConfigPath(): string | undefined {
|
|
48
|
+
try {
|
|
49
|
+
const extensionDir = path.dirname(fileURLToPath(import.meta.url))
|
|
50
|
+
const candidates = [
|
|
51
|
+
path.join(extensionDir, "..", "pi-resources", "compound-engineering", "mcporter.json"),
|
|
52
|
+
path.join(extensionDir, "..", "compound-engineering", "mcporter.json"),
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
for (const candidate of candidates) {
|
|
56
|
+
if (fs.existsSync(candidate)) return candidate
|
|
57
|
+
}
|
|
58
|
+
} catch {
|
|
59
|
+
// noop: bundled path is best-effort fallback
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return undefined
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function resolveMcporterConfigPath(cwd: string, explicit?: string): string | undefined {
|
|
66
|
+
if (explicit && explicit.trim()) {
|
|
67
|
+
return path.resolve(explicit)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const projectPath = path.join(cwd, ".pi", "compound-engineering", "mcporter.json")
|
|
71
|
+
if (fs.existsSync(projectPath)) return projectPath
|
|
72
|
+
|
|
73
|
+
const globalPath = path.join(os.homedir(), ".pi", "agent", "compound-engineering", "mcporter.json")
|
|
74
|
+
if (fs.existsSync(globalPath)) return globalPath
|
|
75
|
+
|
|
76
|
+
return resolveBundledMcporterConfigPath()
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function resolveTaskCwd(baseCwd: string, taskCwd?: string): string {
|
|
80
|
+
if (!taskCwd || !taskCwd.trim()) return baseCwd
|
|
81
|
+
const expanded = taskCwd === "~"
|
|
82
|
+
? os.homedir()
|
|
83
|
+
: taskCwd.startsWith("~" + path.sep)
|
|
84
|
+
? path.join(os.homedir(), taskCwd.slice(2))
|
|
85
|
+
: taskCwd
|
|
86
|
+
return path.resolve(baseCwd, expanded)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
async function runSingleSubagent(
|
|
90
|
+
pi: ExtensionAPI,
|
|
91
|
+
baseCwd: string,
|
|
92
|
+
task: SubagentTask,
|
|
93
|
+
signal?: AbortSignal,
|
|
94
|
+
timeoutMs = DEFAULT_SUBAGENT_TIMEOUT_MS,
|
|
95
|
+
): Promise<SubagentResult> {
|
|
96
|
+
const agent = normalizeName(task.agent)
|
|
97
|
+
if (!agent) {
|
|
98
|
+
throw new Error("Subagent task is missing a valid agent name")
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const taskText = String(task.task ?? "").trim()
|
|
102
|
+
if (!taskText) {
|
|
103
|
+
throw new Error("Subagent task for " + agent + " is empty")
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const cwd = resolveTaskCwd(baseCwd, task.cwd)
|
|
107
|
+
const prompt = "/skill:" + agent + " " + taskText
|
|
108
|
+
const script = "cd " + shellEscape(cwd) + " && pi --no-session -p " + shellEscape(prompt)
|
|
109
|
+
const result = await pi.exec("bash", ["-lc", script], { signal, timeout: timeoutMs })
|
|
110
|
+
|
|
111
|
+
return {
|
|
112
|
+
agent,
|
|
113
|
+
task: taskText,
|
|
114
|
+
cwd,
|
|
115
|
+
exitCode: result.code,
|
|
116
|
+
output: truncate(result.stdout || ""),
|
|
117
|
+
stderr: truncate(result.stderr || ""),
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
async function runParallelSubagents(
|
|
122
|
+
pi: ExtensionAPI,
|
|
123
|
+
baseCwd: string,
|
|
124
|
+
tasks: SubagentTask[],
|
|
125
|
+
signal?: AbortSignal,
|
|
126
|
+
timeoutMs = DEFAULT_SUBAGENT_TIMEOUT_MS,
|
|
127
|
+
maxConcurrency = 4,
|
|
128
|
+
onProgress?: (completed: number, total: number) => void,
|
|
129
|
+
): Promise<SubagentResult[]> {
|
|
130
|
+
const safeConcurrency = Math.max(1, Math.min(maxConcurrency, MAX_PARALLEL_SUBAGENTS, tasks.length))
|
|
131
|
+
const results: SubagentResult[] = new Array(tasks.length)
|
|
132
|
+
|
|
133
|
+
let nextIndex = 0
|
|
134
|
+
let completed = 0
|
|
135
|
+
|
|
136
|
+
const workers = Array.from({ length: safeConcurrency }, async () => {
|
|
137
|
+
while (true) {
|
|
138
|
+
const current = nextIndex
|
|
139
|
+
nextIndex += 1
|
|
140
|
+
if (current >= tasks.length) return
|
|
141
|
+
|
|
142
|
+
results[current] = await runSingleSubagent(pi, baseCwd, tasks[current], signal, timeoutMs)
|
|
143
|
+
completed += 1
|
|
144
|
+
onProgress?.(completed, tasks.length)
|
|
145
|
+
}
|
|
146
|
+
})
|
|
147
|
+
|
|
148
|
+
await Promise.all(workers)
|
|
149
|
+
return results
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function formatSubagentSummary(results: SubagentResult[]): string {
|
|
153
|
+
if (results.length === 0) return "No subagent work was executed."
|
|
154
|
+
|
|
155
|
+
const success = results.filter((result) => result.exitCode === 0).length
|
|
156
|
+
const failed = results.length - success
|
|
157
|
+
const header = failed === 0
|
|
158
|
+
? "Subagent run completed: " + success + "/" + results.length + " succeeded."
|
|
159
|
+
: "Subagent run completed: " + success + "/" + results.length + " succeeded, " + failed + " failed."
|
|
160
|
+
|
|
161
|
+
const lines = results.map((result) => {
|
|
162
|
+
const status = result.exitCode === 0 ? "ok" : "error"
|
|
163
|
+
const body = result.output || result.stderr || "(no output)"
|
|
164
|
+
const preview = body.split("\\n").slice(0, 6).join("\\n")
|
|
165
|
+
return "\\n[" + status + "] " + result.agent + "\\n" + preview
|
|
166
|
+
})
|
|
167
|
+
|
|
168
|
+
return header + lines.join("\\n")
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export default function (pi: ExtensionAPI) {
|
|
172
|
+
pi.registerTool({
|
|
173
|
+
name: "ask_user_question",
|
|
174
|
+
label: "Ask User Question",
|
|
175
|
+
description: "Ask the user a question with optional choices.",
|
|
176
|
+
parameters: Type.Object({
|
|
177
|
+
question: Type.String({ description: "Question shown to the user" }),
|
|
178
|
+
options: Type.Optional(Type.Array(Type.String(), { description: "Selectable options" })),
|
|
179
|
+
allowCustom: Type.Optional(Type.Boolean({ default: true })),
|
|
180
|
+
}),
|
|
181
|
+
async execute(_toolCallId, params, _signal, _onUpdate, ctx) {
|
|
182
|
+
if (!ctx.hasUI) {
|
|
183
|
+
return {
|
|
184
|
+
isError: true,
|
|
185
|
+
content: [{ type: "text", text: "UI is unavailable in this mode." }],
|
|
186
|
+
details: {},
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
const options = params.options ?? []
|
|
191
|
+
const allowCustom = params.allowCustom ?? true
|
|
192
|
+
|
|
193
|
+
if (options.length === 0) {
|
|
194
|
+
const answer = await ctx.ui.input(params.question)
|
|
195
|
+
if (!answer) {
|
|
196
|
+
return {
|
|
197
|
+
content: [{ type: "text", text: "User cancelled." }],
|
|
198
|
+
details: { answer: null },
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
return {
|
|
203
|
+
content: [{ type: "text", text: "User answered: " + answer }],
|
|
204
|
+
details: { answer, mode: "input" },
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
const customLabel = "Other (type custom answer)"
|
|
209
|
+
const selectable = allowCustom ? [...options, customLabel] : options
|
|
210
|
+
const selected = await ctx.ui.select(params.question, selectable)
|
|
211
|
+
|
|
212
|
+
if (!selected) {
|
|
213
|
+
return {
|
|
214
|
+
content: [{ type: "text", text: "User cancelled." }],
|
|
215
|
+
details: { answer: null },
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
if (selected === customLabel) {
|
|
220
|
+
const custom = await ctx.ui.input("Your answer")
|
|
221
|
+
if (!custom) {
|
|
222
|
+
return {
|
|
223
|
+
content: [{ type: "text", text: "User cancelled." }],
|
|
224
|
+
details: { answer: null },
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
return {
|
|
229
|
+
content: [{ type: "text", text: "User answered: " + custom }],
|
|
230
|
+
details: { answer: custom, mode: "custom" },
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
return {
|
|
235
|
+
content: [{ type: "text", text: "User selected: " + selected }],
|
|
236
|
+
details: { answer: selected, mode: "select" },
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
})
|
|
240
|
+
|
|
241
|
+
const subagentTaskSchema = Type.Object({
|
|
242
|
+
agent: Type.String({ description: "Skill/agent name to invoke" }),
|
|
243
|
+
task: Type.String({ description: "Task instructions for that skill" }),
|
|
244
|
+
cwd: Type.Optional(Type.String({ description: "Optional working directory for this task" })),
|
|
245
|
+
})
|
|
246
|
+
|
|
247
|
+
pi.registerTool({
|
|
248
|
+
name: "subagent",
|
|
249
|
+
label: "Subagent",
|
|
250
|
+
description: "Run one or more skill-based subagent tasks. Supports single, parallel, and chained execution.",
|
|
251
|
+
parameters: Type.Object({
|
|
252
|
+
agent: Type.Optional(Type.String({ description: "Single subagent name" })),
|
|
253
|
+
task: Type.Optional(Type.String({ description: "Single subagent task" })),
|
|
254
|
+
cwd: Type.Optional(Type.String({ description: "Working directory for single mode" })),
|
|
255
|
+
tasks: Type.Optional(Type.Array(subagentTaskSchema, { description: "Parallel subagent tasks" })),
|
|
256
|
+
chain: Type.Optional(Type.Array(subagentTaskSchema, { description: "Sequential tasks; supports {previous} placeholder" })),
|
|
257
|
+
maxConcurrency: Type.Optional(Type.Number({ default: 4 })),
|
|
258
|
+
timeoutMs: Type.Optional(Type.Number({ default: DEFAULT_SUBAGENT_TIMEOUT_MS })),
|
|
259
|
+
}),
|
|
260
|
+
async execute(_toolCallId, params, signal, onUpdate, ctx) {
|
|
261
|
+
const hasSingle = Boolean(params.agent && params.task)
|
|
262
|
+
const hasTasks = Boolean(params.tasks && params.tasks.length > 0)
|
|
263
|
+
const hasChain = Boolean(params.chain && params.chain.length > 0)
|
|
264
|
+
const modeCount = Number(hasSingle) + Number(hasTasks) + Number(hasChain)
|
|
265
|
+
|
|
266
|
+
if (modeCount !== 1) {
|
|
267
|
+
return {
|
|
268
|
+
isError: true,
|
|
269
|
+
content: [{ type: "text", text: "Provide exactly one mode: single (agent+task), tasks, or chain." }],
|
|
270
|
+
details: {},
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
const timeoutMs = Number(params.timeoutMs || DEFAULT_SUBAGENT_TIMEOUT_MS)
|
|
275
|
+
|
|
276
|
+
try {
|
|
277
|
+
if (hasSingle) {
|
|
278
|
+
const result = await runSingleSubagent(
|
|
279
|
+
pi,
|
|
280
|
+
ctx.cwd,
|
|
281
|
+
{ agent: params.agent!, task: params.task!, cwd: params.cwd },
|
|
282
|
+
signal,
|
|
283
|
+
timeoutMs,
|
|
284
|
+
)
|
|
285
|
+
|
|
286
|
+
const body = formatSubagentSummary([result])
|
|
287
|
+
return {
|
|
288
|
+
isError: result.exitCode !== 0,
|
|
289
|
+
content: [{ type: "text", text: body }],
|
|
290
|
+
details: { mode: "single", results: [result] },
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
if (hasTasks) {
|
|
295
|
+
const tasks = params.tasks as SubagentTask[]
|
|
296
|
+
const maxConcurrency = Number(params.maxConcurrency || 4)
|
|
297
|
+
|
|
298
|
+
const results = await runParallelSubagents(
|
|
299
|
+
pi,
|
|
300
|
+
ctx.cwd,
|
|
301
|
+
tasks,
|
|
302
|
+
signal,
|
|
303
|
+
timeoutMs,
|
|
304
|
+
maxConcurrency,
|
|
305
|
+
(completed, total) => {
|
|
306
|
+
onUpdate?.({
|
|
307
|
+
content: [{ type: "text", text: "Subagent progress: " + completed + "/" + total }],
|
|
308
|
+
details: { mode: "parallel", completed, total },
|
|
309
|
+
})
|
|
310
|
+
},
|
|
311
|
+
)
|
|
312
|
+
|
|
313
|
+
const body = formatSubagentSummary(results)
|
|
314
|
+
const hasFailure = results.some((result) => result.exitCode !== 0)
|
|
315
|
+
|
|
316
|
+
return {
|
|
317
|
+
isError: hasFailure,
|
|
318
|
+
content: [{ type: "text", text: body }],
|
|
319
|
+
details: { mode: "parallel", results },
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
const chain = params.chain as SubagentTask[]
|
|
324
|
+
const results: SubagentResult[] = []
|
|
325
|
+
let previous = ""
|
|
326
|
+
|
|
327
|
+
for (const step of chain) {
|
|
328
|
+
const resolvedTask = step.task.replace(/\\{previous\\}/g, previous)
|
|
329
|
+
const result = await runSingleSubagent(
|
|
330
|
+
pi,
|
|
331
|
+
ctx.cwd,
|
|
332
|
+
{ agent: step.agent, task: resolvedTask, cwd: step.cwd },
|
|
333
|
+
signal,
|
|
334
|
+
timeoutMs,
|
|
335
|
+
)
|
|
336
|
+
results.push(result)
|
|
337
|
+
previous = result.output || result.stderr
|
|
338
|
+
|
|
339
|
+
onUpdate?.({
|
|
340
|
+
content: [{ type: "text", text: "Subagent chain progress: " + results.length + "/" + chain.length }],
|
|
341
|
+
details: { mode: "chain", completed: results.length, total: chain.length },
|
|
342
|
+
})
|
|
343
|
+
|
|
344
|
+
if (result.exitCode !== 0) break
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
const body = formatSubagentSummary(results)
|
|
348
|
+
const hasFailure = results.some((result) => result.exitCode !== 0)
|
|
349
|
+
|
|
350
|
+
return {
|
|
351
|
+
isError: hasFailure,
|
|
352
|
+
content: [{ type: "text", text: body }],
|
|
353
|
+
details: { mode: "chain", results },
|
|
354
|
+
}
|
|
355
|
+
} catch (error) {
|
|
356
|
+
return {
|
|
357
|
+
isError: true,
|
|
358
|
+
content: [{ type: "text", text: error instanceof Error ? error.message : String(error) }],
|
|
359
|
+
details: {},
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
})
|
|
364
|
+
|
|
365
|
+
pi.registerTool({
|
|
366
|
+
name: "mcporter_list",
|
|
367
|
+
label: "MCPorter List",
|
|
368
|
+
description: "List tools on an MCP server through MCPorter.",
|
|
369
|
+
parameters: Type.Object({
|
|
370
|
+
server: Type.String({ description: "Configured MCP server name" }),
|
|
371
|
+
allParameters: Type.Optional(Type.Boolean({ default: false })),
|
|
372
|
+
json: Type.Optional(Type.Boolean({ default: true })),
|
|
373
|
+
configPath: Type.Optional(Type.String({ description: "Optional mcporter config path" })),
|
|
374
|
+
}),
|
|
375
|
+
async execute(_toolCallId, params, signal, _onUpdate, ctx) {
|
|
376
|
+
const args = ["list", params.server]
|
|
377
|
+
if (params.allParameters) args.push("--all-parameters")
|
|
378
|
+
if (params.json ?? true) args.push("--json")
|
|
379
|
+
|
|
380
|
+
const configPath = resolveMcporterConfigPath(ctx.cwd, params.configPath)
|
|
381
|
+
if (configPath) {
|
|
382
|
+
args.push("--config", configPath)
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
const result = await pi.exec("mcporter", args, { signal })
|
|
386
|
+
const output = truncate(result.stdout || result.stderr || "")
|
|
387
|
+
|
|
388
|
+
return {
|
|
389
|
+
isError: result.code !== 0,
|
|
390
|
+
content: [{ type: "text", text: output || "(no output)" }],
|
|
391
|
+
details: {
|
|
392
|
+
exitCode: result.code,
|
|
393
|
+
command: "mcporter " + args.join(" "),
|
|
394
|
+
configPath,
|
|
395
|
+
},
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
})
|
|
399
|
+
|
|
400
|
+
pi.registerTool({
|
|
401
|
+
name: "mcporter_call",
|
|
402
|
+
label: "MCPorter Call",
|
|
403
|
+
description: "Call a specific MCP tool through MCPorter.",
|
|
404
|
+
parameters: Type.Object({
|
|
405
|
+
call: Type.Optional(Type.String({ description: "Function-style call, e.g. linear.list_issues(limit: 5)" })),
|
|
406
|
+
server: Type.Optional(Type.String({ description: "Server name (if call is omitted)" })),
|
|
407
|
+
tool: Type.Optional(Type.String({ description: "Tool name (if call is omitted)" })),
|
|
408
|
+
args: Type.Optional(Type.Record(Type.String(), Type.Any(), { description: "JSON arguments object" })),
|
|
409
|
+
configPath: Type.Optional(Type.String({ description: "Optional mcporter config path" })),
|
|
410
|
+
}),
|
|
411
|
+
async execute(_toolCallId, params, signal, _onUpdate, ctx) {
|
|
412
|
+
const args = ["call"]
|
|
413
|
+
|
|
414
|
+
if (params.call && params.call.trim()) {
|
|
415
|
+
args.push(params.call.trim())
|
|
416
|
+
} else {
|
|
417
|
+
if (!params.server || !params.tool) {
|
|
418
|
+
return {
|
|
419
|
+
isError: true,
|
|
420
|
+
content: [{ type: "text", text: "Provide either call, or server + tool." }],
|
|
421
|
+
details: {},
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
args.push(params.server + "." + params.tool)
|
|
425
|
+
if (params.args) {
|
|
426
|
+
args.push("--args", JSON.stringify(params.args))
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
args.push("--output", "json")
|
|
431
|
+
|
|
432
|
+
const configPath = resolveMcporterConfigPath(ctx.cwd, params.configPath)
|
|
433
|
+
if (configPath) {
|
|
434
|
+
args.push("--config", configPath)
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
const result = await pi.exec("mcporter", args, { signal })
|
|
438
|
+
const output = truncate(result.stdout || result.stderr || "")
|
|
439
|
+
|
|
440
|
+
return {
|
|
441
|
+
isError: result.code !== 0,
|
|
442
|
+
content: [{ type: "text", text: output || "(no output)" }],
|
|
443
|
+
details: {
|
|
444
|
+
exitCode: result.code,
|
|
445
|
+
command: "mcporter " + args.join(" "),
|
|
446
|
+
configPath,
|
|
447
|
+
},
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
})
|
|
451
|
+
}
|
|
452
|
+
`
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
export type ClaudeMcpServer = {
|
|
2
|
+
type?: string
|
|
3
|
+
command?: string
|
|
4
|
+
args?: string[]
|
|
5
|
+
url?: string
|
|
6
|
+
env?: Record<string, string>
|
|
7
|
+
headers?: Record<string, string>
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type ClaudeManifest = {
|
|
11
|
+
name: string
|
|
12
|
+
version: string
|
|
13
|
+
description?: string
|
|
14
|
+
author?: {
|
|
15
|
+
name?: string
|
|
16
|
+
email?: string
|
|
17
|
+
url?: string
|
|
18
|
+
}
|
|
19
|
+
keywords?: string[]
|
|
20
|
+
agents?: string | string[]
|
|
21
|
+
commands?: string | string[]
|
|
22
|
+
skills?: string | string[]
|
|
23
|
+
hooks?: string | string[] | ClaudeHooks
|
|
24
|
+
mcpServers?: Record<string, ClaudeMcpServer> | string | string[]
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type ClaudeAgent = {
|
|
28
|
+
name: string
|
|
29
|
+
description?: string
|
|
30
|
+
capabilities?: string[]
|
|
31
|
+
model?: string
|
|
32
|
+
body: string
|
|
33
|
+
sourcePath: string
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type ClaudeCommand = {
|
|
37
|
+
name: string
|
|
38
|
+
description?: string
|
|
39
|
+
argumentHint?: string
|
|
40
|
+
model?: string
|
|
41
|
+
allowedTools?: string[]
|
|
42
|
+
disableModelInvocation?: boolean
|
|
43
|
+
body: string
|
|
44
|
+
sourcePath: string
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type ClaudeSkill = {
|
|
48
|
+
name: string
|
|
49
|
+
description?: string
|
|
50
|
+
disableModelInvocation?: boolean
|
|
51
|
+
sourceDir: string
|
|
52
|
+
skillPath: string
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export type ClaudePlugin = {
|
|
56
|
+
root: string
|
|
57
|
+
manifest: ClaudeManifest
|
|
58
|
+
agents: ClaudeAgent[]
|
|
59
|
+
commands: ClaudeCommand[]
|
|
60
|
+
skills: ClaudeSkill[]
|
|
61
|
+
hooks?: ClaudeHooks
|
|
62
|
+
mcpServers?: Record<string, ClaudeMcpServer>
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export type ClaudeHookCommand = {
|
|
66
|
+
type: "command"
|
|
67
|
+
command: string
|
|
68
|
+
timeout?: number
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export type ClaudeHookPrompt = {
|
|
72
|
+
type: "prompt"
|
|
73
|
+
prompt: string
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export type ClaudeHookAgent = {
|
|
77
|
+
type: "agent"
|
|
78
|
+
agent: string
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export type ClaudeHookEntry = ClaudeHookCommand | ClaudeHookPrompt | ClaudeHookAgent
|
|
82
|
+
|
|
83
|
+
export type ClaudeHookMatcher = {
|
|
84
|
+
matcher?: string
|
|
85
|
+
hooks: ClaudeHookEntry[]
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export type ClaudeHooks = {
|
|
89
|
+
hooks: Record<string, ClaudeHookMatcher[]>
|
|
90
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ClaudeMcpServer } from "./claude"
|
|
2
|
+
|
|
3
|
+
export type CodexPrompt = {
|
|
4
|
+
name: string
|
|
5
|
+
content: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export type CodexSkillDir = {
|
|
9
|
+
name: string
|
|
10
|
+
sourceDir: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type CodexGeneratedSkill = {
|
|
14
|
+
name: string
|
|
15
|
+
content: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type CodexBundle = {
|
|
19
|
+
prompts: CodexPrompt[]
|
|
20
|
+
skillDirs: CodexSkillDir[]
|
|
21
|
+
generatedSkills: CodexGeneratedSkill[]
|
|
22
|
+
mcpServers?: Record<string, ClaudeMcpServer>
|
|
23
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export type OpenCodePermission = "allow" | "ask" | "deny"
|
|
2
|
+
|
|
3
|
+
export type OpenCodeConfig = {
|
|
4
|
+
$schema?: string
|
|
5
|
+
model?: string
|
|
6
|
+
default_agent?: string
|
|
7
|
+
tools?: Record<string, boolean>
|
|
8
|
+
permission?: Record<string, OpenCodePermission | Record<string, OpenCodePermission>>
|
|
9
|
+
agent?: Record<string, OpenCodeAgentConfig>
|
|
10
|
+
command?: Record<string, OpenCodeCommandConfig>
|
|
11
|
+
mcp?: Record<string, OpenCodeMcpServer>
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type OpenCodeAgentConfig = {
|
|
15
|
+
description?: string
|
|
16
|
+
mode?: "primary" | "subagent"
|
|
17
|
+
model?: string
|
|
18
|
+
temperature?: number
|
|
19
|
+
tools?: Record<string, boolean>
|
|
20
|
+
permission?: Record<string, OpenCodePermission>
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type OpenCodeCommandConfig = {
|
|
24
|
+
description?: string
|
|
25
|
+
model?: string
|
|
26
|
+
agent?: string
|
|
27
|
+
template: string
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type OpenCodeMcpServer = {
|
|
31
|
+
type: "local" | "remote"
|
|
32
|
+
command?: string[]
|
|
33
|
+
url?: string
|
|
34
|
+
environment?: Record<string, string>
|
|
35
|
+
headers?: Record<string, string>
|
|
36
|
+
enabled?: boolean
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type OpenCodeAgentFile = {
|
|
40
|
+
name: string
|
|
41
|
+
content: string
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type OpenCodePluginFile = {
|
|
45
|
+
name: string
|
|
46
|
+
content: string
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type OpenCodeBundle = {
|
|
50
|
+
config: OpenCodeConfig
|
|
51
|
+
agents: OpenCodeAgentFile[]
|
|
52
|
+
plugins: OpenCodePluginFile[]
|
|
53
|
+
skillDirs: { sourceDir: string; name: string }[]
|
|
54
|
+
}
|
package/src/types/pi.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export type PiPrompt = {
|
|
2
|
+
name: string
|
|
3
|
+
content: string
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export type PiSkillDir = {
|
|
7
|
+
name: string
|
|
8
|
+
sourceDir: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type PiGeneratedSkill = {
|
|
12
|
+
name: string
|
|
13
|
+
content: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type PiExtensionFile = {
|
|
17
|
+
name: string
|
|
18
|
+
content: string
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type PiMcporterServer = {
|
|
22
|
+
description?: string
|
|
23
|
+
baseUrl?: string
|
|
24
|
+
command?: string
|
|
25
|
+
args?: string[]
|
|
26
|
+
env?: Record<string, string>
|
|
27
|
+
headers?: Record<string, string>
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type PiMcporterConfig = {
|
|
31
|
+
mcpServers: Record<string, PiMcporterServer>
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type PiBundle = {
|
|
35
|
+
prompts: PiPrompt[]
|
|
36
|
+
skillDirs: PiSkillDir[]
|
|
37
|
+
generatedSkills: PiGeneratedSkill[]
|
|
38
|
+
extensions: PiExtensionFile[]
|
|
39
|
+
mcporterConfig?: PiMcporterConfig
|
|
40
|
+
}
|