@ginkoai/cli 1.0.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 +230 -0
- package/dist/adapters/ai-adapter.d.ts +25 -0
- package/dist/adapters/ai-adapter.d.ts.map +1 -0
- package/dist/adapters/ai-adapter.js +21 -0
- package/dist/adapters/ai-adapter.js.map +1 -0
- package/dist/adapters/ai-completion.d.ts +35 -0
- package/dist/adapters/ai-completion.d.ts.map +1 -0
- package/dist/adapters/ai-completion.js +118 -0
- package/dist/adapters/ai-completion.js.map +1 -0
- package/dist/adapters/base.d.ts +64 -0
- package/dist/adapters/base.d.ts.map +1 -0
- package/dist/adapters/base.js +48 -0
- package/dist/adapters/base.js.map +1 -0
- package/dist/adapters/claude-adapter.d.ts +18 -0
- package/dist/adapters/claude-adapter.d.ts.map +1 -0
- package/dist/adapters/claude-adapter.js +73 -0
- package/dist/adapters/claude-adapter.js.map +1 -0
- package/dist/adapters/claude.d.ts +20 -0
- package/dist/adapters/claude.d.ts.map +1 -0
- package/dist/adapters/claude.js +91 -0
- package/dist/adapters/claude.js.map +1 -0
- package/dist/adapters/copilot-adapter.d.ts +16 -0
- package/dist/adapters/copilot-adapter.d.ts.map +1 -0
- package/dist/adapters/copilot-adapter.js +288 -0
- package/dist/adapters/copilot-adapter.js.map +1 -0
- package/dist/adapters/cursor-adapter.d.ts +22 -0
- package/dist/adapters/cursor-adapter.d.ts.map +1 -0
- package/dist/adapters/cursor-adapter.js +108 -0
- package/dist/adapters/cursor-adapter.js.map +1 -0
- package/dist/adapters/detector.d.ts +29 -0
- package/dist/adapters/detector.d.ts.map +1 -0
- package/dist/adapters/detector.js +132 -0
- package/dist/adapters/detector.js.map +1 -0
- package/dist/adapters/generic-adapter.d.ts +18 -0
- package/dist/adapters/generic-adapter.d.ts.map +1 -0
- package/dist/adapters/generic-adapter.js +37 -0
- package/dist/adapters/generic-adapter.js.map +1 -0
- package/dist/adapters/gpt4.d.ts +20 -0
- package/dist/adapters/gpt4.d.ts.map +1 -0
- package/dist/adapters/gpt4.js +114 -0
- package/dist/adapters/gpt4.js.map +1 -0
- package/dist/adapters/grok-adapter.d.ts +18 -0
- package/dist/adapters/grok-adapter.d.ts.map +1 -0
- package/dist/adapters/grok-adapter.js +94 -0
- package/dist/adapters/grok-adapter.js.map +1 -0
- package/dist/adapters/index.d.ts +18 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +71 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/openai-adapter.d.ts +18 -0
- package/dist/adapters/openai-adapter.d.ts.map +1 -0
- package/dist/adapters/openai-adapter.js +97 -0
- package/dist/adapters/openai-adapter.js.map +1 -0
- package/dist/adapters/universal.d.ts +20 -0
- package/dist/adapters/universal.d.ts.map +1 -0
- package/dist/adapters/universal.js +80 -0
- package/dist/adapters/universal.js.map +1 -0
- package/dist/analysis/deep-analyzer.d.ts +61 -0
- package/dist/analysis/deep-analyzer.d.ts.map +1 -0
- package/dist/analysis/deep-analyzer.js +349 -0
- package/dist/analysis/deep-analyzer.js.map +1 -0
- package/dist/analysis/project-analyzer.d.ts +25 -0
- package/dist/analysis/project-analyzer.d.ts.map +1 -0
- package/dist/analysis/project-analyzer.js +244 -0
- package/dist/analysis/project-analyzer.js.map +1 -0
- package/dist/commands/architecture/architecture-pipeline-enhanced.d.ts +82 -0
- package/dist/commands/architecture/architecture-pipeline-enhanced.d.ts.map +1 -0
- package/dist/commands/architecture/architecture-pipeline-enhanced.js +649 -0
- package/dist/commands/architecture/architecture-pipeline-enhanced.js.map +1 -0
- package/dist/commands/architecture/architecture-pipeline.d.ts +105 -0
- package/dist/commands/architecture/architecture-pipeline.d.ts.map +1 -0
- package/dist/commands/architecture/architecture-pipeline.js +510 -0
- package/dist/commands/architecture/architecture-pipeline.js.map +1 -0
- package/dist/commands/architecture/architecture-reflection.d.ts +67 -0
- package/dist/commands/architecture/architecture-reflection.d.ts.map +1 -0
- package/dist/commands/architecture/architecture-reflection.js +508 -0
- package/dist/commands/architecture/architecture-reflection.js.map +1 -0
- package/dist/commands/architecture/index.d.ts +21 -0
- package/dist/commands/architecture/index.d.ts.map +1 -0
- package/dist/commands/architecture/index.js +41 -0
- package/dist/commands/architecture/index.js.map +1 -0
- package/dist/commands/architecture.d.ts +20 -0
- package/dist/commands/architecture.d.ts.map +1 -0
- package/dist/commands/architecture.js +223 -0
- package/dist/commands/architecture.js.map +1 -0
- package/dist/commands/backlog/ai-enhanced.d.ts +83 -0
- package/dist/commands/backlog/ai-enhanced.d.ts.map +1 -0
- package/dist/commands/backlog/ai-enhanced.js +462 -0
- package/dist/commands/backlog/ai-enhanced.js.map +1 -0
- package/dist/commands/backlog/ai-prompt.d.ts +21 -0
- package/dist/commands/backlog/ai-prompt.d.ts.map +1 -0
- package/dist/commands/backlog/ai-prompt.js +373 -0
- package/dist/commands/backlog/ai-prompt.js.map +1 -0
- package/dist/commands/backlog/ai-template.d.ts +21 -0
- package/dist/commands/backlog/ai-template.d.ts.map +1 -0
- package/dist/commands/backlog/ai-template.js +374 -0
- package/dist/commands/backlog/ai-template.js.map +1 -0
- package/dist/commands/backlog/ai.d.ts +21 -0
- package/dist/commands/backlog/ai.d.ts.map +1 -0
- package/dist/commands/backlog/ai.js +76 -0
- package/dist/commands/backlog/ai.js.map +1 -0
- package/dist/commands/backlog/backlog-pipeline.d.ts +103 -0
- package/dist/commands/backlog/backlog-pipeline.d.ts.map +1 -0
- package/dist/commands/backlog/backlog-pipeline.js +538 -0
- package/dist/commands/backlog/backlog-pipeline.js.map +1 -0
- package/dist/commands/backlog/backlog-reflection.d.ts +48 -0
- package/dist/commands/backlog/backlog-reflection.d.ts.map +1 -0
- package/dist/commands/backlog/backlog-reflection.js +231 -0
- package/dist/commands/backlog/backlog-reflection.js.map +1 -0
- package/dist/commands/backlog/base.d.ts +95 -0
- package/dist/commands/backlog/base.d.ts.map +1 -0
- package/dist/commands/backlog/base.js +291 -0
- package/dist/commands/backlog/base.js.map +1 -0
- package/dist/commands/backlog/complete.d.ts +20 -0
- package/dist/commands/backlog/complete.d.ts.map +1 -0
- package/dist/commands/backlog/complete.js +83 -0
- package/dist/commands/backlog/complete.js.map +1 -0
- package/dist/commands/backlog/context-gatherer.d.ts +76 -0
- package/dist/commands/backlog/context-gatherer.d.ts.map +1 -0
- package/dist/commands/backlog/context-gatherer.js +216 -0
- package/dist/commands/backlog/context-gatherer.js.map +1 -0
- package/dist/commands/backlog/create.d.ts +25 -0
- package/dist/commands/backlog/create.d.ts.map +1 -0
- package/dist/commands/backlog/create.js +131 -0
- package/dist/commands/backlog/create.js.map +1 -0
- package/dist/commands/backlog/index.d.ts +17 -0
- package/dist/commands/backlog/index.d.ts.map +1 -0
- package/dist/commands/backlog/index.js +177 -0
- package/dist/commands/backlog/index.js.map +1 -0
- package/dist/commands/backlog/list.d.ts +25 -0
- package/dist/commands/backlog/list.d.ts.map +1 -0
- package/dist/commands/backlog/list.js +136 -0
- package/dist/commands/backlog/list.js.map +1 -0
- package/dist/commands/backlog/quick-query.d.ts +16 -0
- package/dist/commands/backlog/quick-query.d.ts.map +1 -0
- package/dist/commands/backlog/quick-query.js +126 -0
- package/dist/commands/backlog/quick-query.js.map +1 -0
- package/dist/commands/backlog/show.d.ts +20 -0
- package/dist/commands/backlog/show.d.ts.map +1 -0
- package/dist/commands/backlog/show.js +95 -0
- package/dist/commands/backlog/show.js.map +1 -0
- package/dist/commands/backlog/update.d.ts +25 -0
- package/dist/commands/backlog/update.d.ts.map +1 -0
- package/dist/commands/backlog/update.js +113 -0
- package/dist/commands/backlog/update.js.map +1 -0
- package/dist/commands/bug/bug-context-gatherer.d.ts +58 -0
- package/dist/commands/bug/bug-context-gatherer.d.ts.map +1 -0
- package/dist/commands/bug/bug-context-gatherer.js +228 -0
- package/dist/commands/bug/bug-context-gatherer.js.map +1 -0
- package/dist/commands/bug/bug-reflection.d.ts +70 -0
- package/dist/commands/bug/bug-reflection.d.ts.map +1 -0
- package/dist/commands/bug/bug-reflection.js +343 -0
- package/dist/commands/bug/bug-reflection.js.map +1 -0
- package/dist/commands/capture/capture-reflection.d.ts +139 -0
- package/dist/commands/capture/capture-reflection.d.ts.map +1 -0
- package/dist/commands/capture/capture-reflection.js +583 -0
- package/dist/commands/capture/capture-reflection.js.map +1 -0
- package/dist/commands/capture.d.ts +22 -0
- package/dist/commands/capture.d.ts.map +1 -0
- package/dist/commands/capture.js +301 -0
- package/dist/commands/capture.js.map +1 -0
- package/dist/commands/changelog/changelog-reflection.d.ts +65 -0
- package/dist/commands/changelog/changelog-reflection.d.ts.map +1 -0
- package/dist/commands/changelog/changelog-reflection.js +252 -0
- package/dist/commands/changelog/changelog-reflection.js.map +1 -0
- package/dist/commands/compact.d.ts +15 -0
- package/dist/commands/compact.d.ts.map +1 -0
- package/dist/commands/compact.js +113 -0
- package/dist/commands/compact.js.map +1 -0
- package/dist/commands/config.d.ts +10 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +85 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/context-new.d.ts +18 -0
- package/dist/commands/context-new.d.ts.map +1 -0
- package/dist/commands/context-new.js +265 -0
- package/dist/commands/context-new.js.map +1 -0
- package/dist/commands/context.d.ts +16 -0
- package/dist/commands/context.d.ts.map +1 -0
- package/dist/commands/context.js +82 -0
- package/dist/commands/context.js.map +1 -0
- package/dist/commands/documentation/documentation-pipeline.d.ts +130 -0
- package/dist/commands/documentation/documentation-pipeline.d.ts.map +1 -0
- package/dist/commands/documentation/documentation-pipeline.js +716 -0
- package/dist/commands/documentation/documentation-pipeline.js.map +1 -0
- package/dist/commands/documentation/documentation-reflection.d.ts +54 -0
- package/dist/commands/documentation/documentation-reflection.d.ts.map +1 -0
- package/dist/commands/documentation/documentation-reflection.js +338 -0
- package/dist/commands/documentation/documentation-reflection.js.map +1 -0
- package/dist/commands/explore/explore-reflection-pipeline.d.ts +117 -0
- package/dist/commands/explore/explore-reflection-pipeline.d.ts.map +1 -0
- package/dist/commands/explore/explore-reflection-pipeline.js +503 -0
- package/dist/commands/explore/explore-reflection-pipeline.js.map +1 -0
- package/dist/commands/explore/index.d.ts +29 -0
- package/dist/commands/explore/index.d.ts.map +1 -0
- package/dist/commands/explore/index.js +30 -0
- package/dist/commands/explore/index.js.map +1 -0
- package/dist/commands/explore.d.ts +20 -0
- package/dist/commands/explore.d.ts.map +1 -0
- package/dist/commands/explore.js +224 -0
- package/dist/commands/explore.js.map +1 -0
- package/dist/commands/git/git-context-gatherer.d.ts +101 -0
- package/dist/commands/git/git-context-gatherer.d.ts.map +1 -0
- package/dist/commands/git/git-context-gatherer.js +284 -0
- package/dist/commands/git/git-context-gatherer.js.map +1 -0
- package/dist/commands/git/git-pipeline.d.ts +75 -0
- package/dist/commands/git/git-pipeline.d.ts.map +1 -0
- package/dist/commands/git/git-pipeline.js +530 -0
- package/dist/commands/git/git-pipeline.js.map +1 -0
- package/dist/commands/git/git-reflection.d.ts +50 -0
- package/dist/commands/git/git-reflection.d.ts.map +1 -0
- package/dist/commands/git/git-reflection.js +193 -0
- package/dist/commands/git/git-reflection.js.map +1 -0
- package/dist/commands/handoff/handoff-reflection-pipeline.d.ts +106 -0
- package/dist/commands/handoff/handoff-reflection-pipeline.d.ts.map +1 -0
- package/dist/commands/handoff/handoff-reflection-pipeline.js +534 -0
- package/dist/commands/handoff/handoff-reflection-pipeline.js.map +1 -0
- package/dist/commands/handoff/handoff-save.d.ts +16 -0
- package/dist/commands/handoff/handoff-save.d.ts.map +1 -0
- package/dist/commands/handoff/handoff-save.js +72 -0
- package/dist/commands/handoff/handoff-save.js.map +1 -0
- package/dist/commands/handoff/index.d.ts +19 -0
- package/dist/commands/handoff/index.d.ts.map +1 -0
- package/dist/commands/handoff/index.js +55 -0
- package/dist/commands/handoff/index.js.map +1 -0
- package/dist/commands/handoff-ai-orig.d.ts +27 -0
- package/dist/commands/handoff-ai-orig.d.ts.map +1 -0
- package/dist/commands/handoff-ai-orig.js +405 -0
- package/dist/commands/handoff-ai-orig.js.map +1 -0
- package/dist/commands/handoff-ai.d.ts +27 -0
- package/dist/commands/handoff-ai.d.ts.map +1 -0
- package/dist/commands/handoff-ai.js +405 -0
- package/dist/commands/handoff-ai.js.map +1 -0
- package/dist/commands/handoff-enhanced-orig.d.ts +25 -0
- package/dist/commands/handoff-enhanced-orig.d.ts.map +1 -0
- package/dist/commands/handoff-enhanced-orig.js +349 -0
- package/dist/commands/handoff-enhanced-orig.js.map +1 -0
- package/dist/commands/handoff-enhanced.d.ts +25 -0
- package/dist/commands/handoff-enhanced.d.ts.map +1 -0
- package/dist/commands/handoff-enhanced.js +349 -0
- package/dist/commands/handoff-enhanced.js.map +1 -0
- package/dist/commands/handoff-orig.d.ts +10 -0
- package/dist/commands/handoff-orig.d.ts.map +1 -0
- package/dist/commands/handoff-orig.js +167 -0
- package/dist/commands/handoff-orig.js.map +1 -0
- package/dist/commands/handoff.d.ts +10 -0
- package/dist/commands/handoff.d.ts.map +1 -0
- package/dist/commands/handoff.js +167 -0
- package/dist/commands/handoff.js.map +1 -0
- package/dist/commands/init-copilot.d.ts +6 -0
- package/dist/commands/init-copilot.d.ts.map +1 -0
- package/dist/commands/init-copilot.js +151 -0
- package/dist/commands/init-copilot.js.map +1 -0
- package/dist/commands/init-cursor.d.ts +5 -0
- package/dist/commands/init-cursor.d.ts.map +1 -0
- package/dist/commands/init-cursor.js +95 -0
- package/dist/commands/init-cursor.js.map +1 -0
- package/dist/commands/init-enhanced.d.ts +20 -0
- package/dist/commands/init-enhanced.d.ts.map +1 -0
- package/dist/commands/init-enhanced.js +430 -0
- package/dist/commands/init-enhanced.js.map +1 -0
- package/dist/commands/init.d.ts +16 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +213 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/magic-prompt.d.ts +20 -0
- package/dist/commands/magic-prompt.d.ts.map +1 -0
- package/dist/commands/magic-prompt.js +166 -0
- package/dist/commands/magic-prompt.js.map +1 -0
- package/dist/commands/magic-simple.d.ts +20 -0
- package/dist/commands/magic-simple.d.ts.map +1 -0
- package/dist/commands/magic-simple.js +32 -0
- package/dist/commands/magic-simple.js.map +1 -0
- package/dist/commands/magic.d.ts +20 -0
- package/dist/commands/magic.d.ts.map +1 -0
- package/dist/commands/magic.js +144 -0
- package/dist/commands/magic.js.map +1 -0
- package/dist/commands/plan/plan-reflection-pipeline.d.ts +126 -0
- package/dist/commands/plan/plan-reflection-pipeline.d.ts.map +1 -0
- package/dist/commands/plan/plan-reflection-pipeline.js +554 -0
- package/dist/commands/plan/plan-reflection-pipeline.js.map +1 -0
- package/dist/commands/plan.d.ts +20 -0
- package/dist/commands/plan.d.ts.map +1 -0
- package/dist/commands/plan.js +253 -0
- package/dist/commands/plan.js.map +1 -0
- package/dist/commands/prd/index.d.ts +21 -0
- package/dist/commands/prd/index.d.ts.map +1 -0
- package/dist/commands/prd/index.js +41 -0
- package/dist/commands/prd/index.js.map +1 -0
- package/dist/commands/prd/prd-pipeline-enhanced.d.ts +82 -0
- package/dist/commands/prd/prd-pipeline-enhanced.d.ts.map +1 -0
- package/dist/commands/prd/prd-pipeline-enhanced.js +565 -0
- package/dist/commands/prd/prd-pipeline-enhanced.js.map +1 -0
- package/dist/commands/prd/prd-pipeline.d.ts +106 -0
- package/dist/commands/prd/prd-pipeline.d.ts.map +1 -0
- package/dist/commands/prd/prd-pipeline.js +491 -0
- package/dist/commands/prd/prd-pipeline.js.map +1 -0
- package/dist/commands/prd/prd-reflection-enhanced.d.ts +63 -0
- package/dist/commands/prd/prd-reflection-enhanced.d.ts.map +1 -0
- package/dist/commands/prd/prd-reflection-enhanced.js +310 -0
- package/dist/commands/prd/prd-reflection-enhanced.js.map +1 -0
- package/dist/commands/prd/prd-reflection.d.ts +59 -0
- package/dist/commands/prd/prd-reflection.d.ts.map +1 -0
- package/dist/commands/prd/prd-reflection.js +548 -0
- package/dist/commands/prd/prd-reflection.js.map +1 -0
- package/dist/commands/reflect.d.ts +24 -0
- package/dist/commands/reflect.d.ts.map +1 -0
- package/dist/commands/reflect.js +135 -0
- package/dist/commands/reflect.js.map +1 -0
- package/dist/commands/ship/ship-reflection.d.ts +164 -0
- package/dist/commands/ship/ship-reflection.d.ts.map +1 -0
- package/dist/commands/ship/ship-reflection.js +732 -0
- package/dist/commands/ship/ship-reflection.js.map +1 -0
- package/dist/commands/ship-ai.d.ts +28 -0
- package/dist/commands/ship-ai.d.ts.map +1 -0
- package/dist/commands/ship-ai.js +318 -0
- package/dist/commands/ship-ai.js.map +1 -0
- package/dist/commands/ship.d.ts +17 -0
- package/dist/commands/ship.d.ts.map +1 -0
- package/dist/commands/ship.js +175 -0
- package/dist/commands/ship.js.map +1 -0
- package/dist/commands/sprint/index.d.ts +21 -0
- package/dist/commands/sprint/index.d.ts.map +1 -0
- package/dist/commands/sprint/index.js +39 -0
- package/dist/commands/sprint/index.js.map +1 -0
- package/dist/commands/sprint/sprint-pipeline-enhanced.d.ts +142 -0
- package/dist/commands/sprint/sprint-pipeline-enhanced.d.ts.map +1 -0
- package/dist/commands/sprint/sprint-pipeline-enhanced.js +822 -0
- package/dist/commands/sprint/sprint-pipeline-enhanced.js.map +1 -0
- package/dist/commands/sprint/sprint-pipeline.d.ts +72 -0
- package/dist/commands/sprint/sprint-pipeline.d.ts.map +1 -0
- package/dist/commands/sprint/sprint-pipeline.js +363 -0
- package/dist/commands/sprint/sprint-pipeline.js.map +1 -0
- package/dist/commands/start/index.d.ts +19 -0
- package/dist/commands/start/index.d.ts.map +1 -0
- package/dist/commands/start/index.js +41 -0
- package/dist/commands/start/index.js.map +1 -0
- package/dist/commands/start/start-reflection-pipeline.d.ts +99 -0
- package/dist/commands/start/start-reflection-pipeline.d.ts.map +1 -0
- package/dist/commands/start/start-reflection-pipeline.js +458 -0
- package/dist/commands/start/start-reflection-pipeline.js.map +1 -0
- package/dist/commands/start/start-reflection.d.ts +89 -0
- package/dist/commands/start/start-reflection.d.ts.map +1 -0
- package/dist/commands/start/start-reflection.js +572 -0
- package/dist/commands/start/start-reflection.js.map +1 -0
- package/dist/commands/start/start-with-synthesis.d.ts +20 -0
- package/dist/commands/start/start-with-synthesis.d.ts.map +1 -0
- package/dist/commands/start/start-with-synthesis.js +134 -0
- package/dist/commands/start/start-with-synthesis.js.map +1 -0
- package/dist/commands/start-enhanced-orig.d.ts +19 -0
- package/dist/commands/start-enhanced-orig.d.ts.map +1 -0
- package/dist/commands/start-enhanced-orig.js +434 -0
- package/dist/commands/start-enhanced-orig.js.map +1 -0
- package/dist/commands/start-enhanced.d.ts +19 -0
- package/dist/commands/start-enhanced.d.ts.map +1 -0
- package/dist/commands/start-enhanced.js +434 -0
- package/dist/commands/start-enhanced.js.map +1 -0
- package/dist/commands/start-orig.d.ts +10 -0
- package/dist/commands/start-orig.d.ts.map +1 -0
- package/dist/commands/start-orig.js +119 -0
- package/dist/commands/start-orig.js.map +1 -0
- package/dist/commands/start.d.ts +10 -0
- package/dist/commands/start.d.ts.map +1 -0
- package/dist/commands/start.js +119 -0
- package/dist/commands/start.js.map +1 -0
- package/dist/commands/status.d.ts +11 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +119 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/testing/index.d.ts +21 -0
- package/dist/commands/testing/index.d.ts.map +1 -0
- package/dist/commands/testing/index.js +41 -0
- package/dist/commands/testing/index.js.map +1 -0
- package/dist/commands/testing/testing-pipeline-enhanced.d.ts +94 -0
- package/dist/commands/testing/testing-pipeline-enhanced.d.ts.map +1 -0
- package/dist/commands/testing/testing-pipeline-enhanced.js +760 -0
- package/dist/commands/testing/testing-pipeline-enhanced.js.map +1 -0
- package/dist/commands/testing/testing-pipeline.d.ts +77 -0
- package/dist/commands/testing/testing-pipeline.d.ts.map +1 -0
- package/dist/commands/testing/testing-pipeline.js +479 -0
- package/dist/commands/testing/testing-pipeline.js.map +1 -0
- package/dist/commands/uninstall-copilot.d.ts +5 -0
- package/dist/commands/uninstall-copilot.d.ts.map +1 -0
- package/dist/commands/uninstall-copilot.js +143 -0
- package/dist/commands/uninstall-copilot.js.map +1 -0
- package/dist/commands/uninstall-cursor.d.ts +6 -0
- package/dist/commands/uninstall-cursor.d.ts.map +1 -0
- package/dist/commands/uninstall-cursor.js +124 -0
- package/dist/commands/uninstall-cursor.js.map +1 -0
- package/dist/commands/vibecheck-ai.d.ts +25 -0
- package/dist/commands/vibecheck-ai.d.ts.map +1 -0
- package/dist/commands/vibecheck-ai.js +260 -0
- package/dist/commands/vibecheck-ai.js.map +1 -0
- package/dist/commands/vibecheck-aware.d.ts +19 -0
- package/dist/commands/vibecheck-aware.d.ts.map +1 -0
- package/dist/commands/vibecheck-aware.js +350 -0
- package/dist/commands/vibecheck-aware.js.map +1 -0
- package/dist/commands/vibecheck-final.d.ts +22 -0
- package/dist/commands/vibecheck-final.d.ts.map +1 -0
- package/dist/commands/vibecheck-final.js +132 -0
- package/dist/commands/vibecheck-final.js.map +1 -0
- package/dist/commands/vibecheck-natural.d.ts +18 -0
- package/dist/commands/vibecheck-natural.d.ts.map +1 -0
- package/dist/commands/vibecheck-natural.js +105 -0
- package/dist/commands/vibecheck-natural.js.map +1 -0
- package/dist/commands/vibecheck-simple.d.ts +20 -0
- package/dist/commands/vibecheck-simple.d.ts.map +1 -0
- package/dist/commands/vibecheck-simple.js +136 -0
- package/dist/commands/vibecheck-simple.js.map +1 -0
- package/dist/commands/vibecheck.d.ts +10 -0
- package/dist/commands/vibecheck.d.ts.map +1 -0
- package/dist/commands/vibecheck.js +95 -0
- package/dist/commands/vibecheck.js.map +1 -0
- package/dist/core/adapters/path-adapter.d.ts +144 -0
- package/dist/core/adapters/path-adapter.d.ts.map +1 -0
- package/dist/core/adapters/path-adapter.js +245 -0
- package/dist/core/adapters/path-adapter.js.map +1 -0
- package/dist/core/command-shortcuts.d.ts +62 -0
- package/dist/core/command-shortcuts.d.ts.map +1 -0
- package/dist/core/command-shortcuts.js +124 -0
- package/dist/core/command-shortcuts.js.map +1 -0
- package/dist/core/config/config-aware-reflection.d.ts +37 -0
- package/dist/core/config/config-aware-reflection.d.ts.map +1 -0
- package/dist/core/config/config-aware-reflection.js +97 -0
- package/dist/core/config/config-aware-reflection.js.map +1 -0
- package/dist/core/config/config-loader.d.ts +154 -0
- package/dist/core/config/config-loader.d.ts.map +1 -0
- package/dist/core/config/config-loader.js +424 -0
- package/dist/core/config/config-loader.js.map +1 -0
- package/dist/core/config/config-migrator.d.ts +150 -0
- package/dist/core/config/config-migrator.d.ts.map +1 -0
- package/dist/core/config/config-migrator.js +423 -0
- package/dist/core/config/config-migrator.js.map +1 -0
- package/dist/core/config/config-schema.d.ts +276 -0
- package/dist/core/config/config-schema.d.ts.map +1 -0
- package/dist/core/config/config-schema.js +277 -0
- package/dist/core/config/config-schema.js.map +1 -0
- package/dist/core/config/index.d.ts +260 -0
- package/dist/core/config/index.d.ts.map +1 -0
- package/dist/core/config/index.js +283 -0
- package/dist/core/config/index.js.map +1 -0
- package/dist/core/config/interactive-config.d.ts +76 -0
- package/dist/core/config/interactive-config.d.ts.map +1 -0
- package/dist/core/config/interactive-config.js +315 -0
- package/dist/core/config/interactive-config.js.map +1 -0
- package/dist/core/config/path-config.d.ts +121 -0
- package/dist/core/config/path-config.d.ts.map +1 -0
- package/dist/core/config/path-config.js +210 -0
- package/dist/core/config/path-config.js.map +1 -0
- package/dist/core/config/path-resolver.d.ts +151 -0
- package/dist/core/config/path-resolver.d.ts.map +1 -0
- package/dist/core/config/path-resolver.js +343 -0
- package/dist/core/config/path-resolver.js.map +1 -0
- package/dist/core/config/project-detector.d.ts +58 -0
- package/dist/core/config/project-detector.d.ts.map +1 -0
- package/dist/core/config/project-detector.js +310 -0
- package/dist/core/config/project-detector.js.map +1 -0
- package/dist/core/config-backup/config-aware-reflection.d.ts +37 -0
- package/dist/core/config-backup/config-aware-reflection.d.ts.map +1 -0
- package/dist/core/config-backup/config-aware-reflection.js +97 -0
- package/dist/core/config-backup/config-aware-reflection.js.map +1 -0
- package/dist/core/config-backup/config-loader.d.ts +71 -0
- package/dist/core/config-backup/config-loader.d.ts.map +1 -0
- package/dist/core/config-backup/config-loader.js +288 -0
- package/dist/core/config-backup/config-loader.js.map +1 -0
- package/dist/core/config-backup/interactive-config.d.ts +76 -0
- package/dist/core/config-backup/interactive-config.d.ts.map +1 -0
- package/dist/core/config-backup/interactive-config.js +315 -0
- package/dist/core/config-backup/interactive-config.js.map +1 -0
- package/dist/core/config-backup/path-config.d.ts +121 -0
- package/dist/core/config-backup/path-config.d.ts.map +1 -0
- package/dist/core/config-backup/path-config.js +210 -0
- package/dist/core/config-backup/path-config.js.map +1 -0
- package/dist/core/config-backup/project-detector.d.ts +58 -0
- package/dist/core/config-backup/project-detector.d.ts.map +1 -0
- package/dist/core/config-backup/project-detector.js +310 -0
- package/dist/core/config-backup/project-detector.js.map +1 -0
- package/dist/core/documents/document-manager.d.ts +97 -0
- package/dist/core/documents/document-manager.d.ts.map +1 -0
- package/dist/core/documents/document-manager.js +441 -0
- package/dist/core/documents/document-manager.js.map +1 -0
- package/dist/core/documents/document-migrator.d.ts +138 -0
- package/dist/core/documents/document-migrator.d.ts.map +1 -0
- package/dist/core/documents/document-migrator.js +349 -0
- package/dist/core/documents/document-migrator.js.map +1 -0
- package/dist/core/documents/document-namer.d.ts +111 -0
- package/dist/core/documents/document-namer.d.ts.map +1 -0
- package/dist/core/documents/document-namer.js +225 -0
- package/dist/core/documents/document-namer.js.map +1 -0
- package/dist/core/documents/examples.d.ts +74 -0
- package/dist/core/documents/examples.d.ts.map +1 -0
- package/dist/core/documents/examples.js +273 -0
- package/dist/core/documents/examples.js.map +1 -0
- package/dist/core/documents/file-system.d.ts +93 -0
- package/dist/core/documents/file-system.d.ts.map +1 -0
- package/dist/core/documents/file-system.js +432 -0
- package/dist/core/documents/file-system.js.map +1 -0
- package/dist/core/documents/index.d.ts +97 -0
- package/dist/core/documents/index.d.ts.map +1 -0
- package/dist/core/documents/index.js +119 -0
- package/dist/core/documents/index.js.map +1 -0
- package/dist/core/documents/markdown-processor.d.ts +84 -0
- package/dist/core/documents/markdown-processor.d.ts.map +1 -0
- package/dist/core/documents/markdown-processor.js +302 -0
- package/dist/core/documents/markdown-processor.js.map +1 -0
- package/dist/core/documents/sequence-manager.d.ts +107 -0
- package/dist/core/documents/sequence-manager.d.ts.map +1 -0
- package/dist/core/documents/sequence-manager.js +246 -0
- package/dist/core/documents/sequence-manager.js.map +1 -0
- package/dist/core/documents/template-engine.d.ts +101 -0
- package/dist/core/documents/template-engine.d.ts.map +1 -0
- package/dist/core/documents/template-engine.js +440 -0
- package/dist/core/documents/template-engine.js.map +1 -0
- package/dist/core/handoff-quality.d.ts +164 -0
- package/dist/core/handoff-quality.d.ts.map +1 -0
- package/dist/core/handoff-quality.js +590 -0
- package/dist/core/handoff-quality.js.map +1 -0
- package/dist/core/platform/hook-adapter.d.ts +109 -0
- package/dist/core/platform/hook-adapter.d.ts.map +1 -0
- package/dist/core/platform/hook-adapter.js +527 -0
- package/dist/core/platform/hook-adapter.js.map +1 -0
- package/dist/core/platform/hook-migration.d.ts +73 -0
- package/dist/core/platform/hook-migration.d.ts.map +1 -0
- package/dist/core/platform/hook-migration.js +339 -0
- package/dist/core/platform/hook-migration.js.map +1 -0
- package/dist/core/platform/hook-migrator.d.ts +49 -0
- package/dist/core/platform/hook-migrator.d.ts.map +1 -0
- package/dist/core/platform/hook-migrator.js +305 -0
- package/dist/core/platform/hook-migrator.js.map +1 -0
- package/dist/core/platform/hook-templates.d.ts +60 -0
- package/dist/core/platform/hook-templates.d.ts.map +1 -0
- package/dist/core/platform/hook-templates.js +352 -0
- package/dist/core/platform/hook-templates.js.map +1 -0
- package/dist/core/platform/index.d.ts +82 -0
- package/dist/core/platform/index.d.ts.map +1 -0
- package/dist/core/platform/index.js +173 -0
- package/dist/core/platform/index.js.map +1 -0
- package/dist/core/platform/path-normalizer.d.ts +117 -0
- package/dist/core/platform/path-normalizer.d.ts.map +1 -0
- package/dist/core/platform/path-normalizer.js +333 -0
- package/dist/core/platform/path-normalizer.js.map +1 -0
- package/dist/core/platform/path-resolver.d.ts +120 -0
- package/dist/core/platform/path-resolver.d.ts.map +1 -0
- package/dist/core/platform/path-resolver.js +339 -0
- package/dist/core/platform/path-resolver.js.map +1 -0
- package/dist/core/platform/platform-adapter.d.ts +101 -0
- package/dist/core/platform/platform-adapter.d.ts.map +1 -0
- package/dist/core/platform/platform-adapter.js +243 -0
- package/dist/core/platform/platform-adapter.js.map +1 -0
- package/dist/core/platform/platform-detector.d.ts +122 -0
- package/dist/core/platform/platform-detector.d.ts.map +1 -0
- package/dist/core/platform/platform-detector.js +318 -0
- package/dist/core/platform/platform-detector.js.map +1 -0
- package/dist/core/platform/platform-templates.d.ts +62 -0
- package/dist/core/platform/platform-templates.d.ts.map +1 -0
- package/dist/core/platform/platform-templates.js +364 -0
- package/dist/core/platform/platform-templates.js.map +1 -0
- package/dist/core/platform/types.d.ts +54 -0
- package/dist/core/platform/types.d.ts.map +1 -0
- package/dist/core/platform/types.js +12 -0
- package/dist/core/platform/types.js.map +1 -0
- package/dist/core/polyglot-example.d.ts +115 -0
- package/dist/core/polyglot-example.d.ts.map +1 -0
- package/dist/core/polyglot-example.js +341 -0
- package/dist/core/polyglot-example.js.map +1 -0
- package/dist/core/pressure-monitor.d.ts +76 -0
- package/dist/core/pressure-monitor.d.ts.map +1 -0
- package/dist/core/pressure-monitor.js +156 -0
- package/dist/core/pressure-monitor.js.map +1 -0
- package/dist/core/reflection-pattern.d.ts +99 -0
- package/dist/core/reflection-pattern.d.ts.map +1 -0
- package/dist/core/reflection-pattern.js +294 -0
- package/dist/core/reflection-pattern.js.map +1 -0
- package/dist/core/session-log-manager.d.ts +83 -0
- package/dist/core/session-log-manager.d.ts.map +1 -0
- package/dist/core/session-log-manager.js +288 -0
- package/dist/core/session-log-manager.js.map +1 -0
- package/dist/core/simple-pipeline-base.d.ts +130 -0
- package/dist/core/simple-pipeline-base.d.ts.map +1 -0
- package/dist/core/simple-pipeline-base.js +240 -0
- package/dist/core/simple-pipeline-base.js.map +1 -0
- package/dist/core/simple-pipeline.d.ts +70 -0
- package/dist/core/simple-pipeline.d.ts.map +1 -0
- package/dist/core/simple-pipeline.js +241 -0
- package/dist/core/simple-pipeline.js.map +1 -0
- package/dist/core/utils/paths.d.ts +50 -0
- package/dist/core/utils/paths.d.ts.map +1 -0
- package/dist/core/utils/paths.js +75 -0
- package/dist/core/utils/paths.js.map +1 -0
- package/dist/core/validators/command-argument-validator.d.ts +102 -0
- package/dist/core/validators/command-argument-validator.d.ts.map +1 -0
- package/dist/core/validators/command-argument-validator.js +377 -0
- package/dist/core/validators/command-argument-validator.js.map +1 -0
- package/dist/core/validators/config-validator.d.ts +111 -0
- package/dist/core/validators/config-validator.d.ts.map +1 -0
- package/dist/core/validators/config-validator.js +433 -0
- package/dist/core/validators/config-validator.js.map +1 -0
- package/dist/core/validators/environment-validator.d.ts +138 -0
- package/dist/core/validators/environment-validator.d.ts.map +1 -0
- package/dist/core/validators/environment-validator.js +516 -0
- package/dist/core/validators/environment-validator.js.map +1 -0
- package/dist/core/validators/git-validator.d.ts +100 -0
- package/dist/core/validators/git-validator.d.ts.map +1 -0
- package/dist/core/validators/git-validator.js +288 -0
- package/dist/core/validators/git-validator.js.map +1 -0
- package/dist/core/validators/git-validator.test.d.ts +12 -0
- package/dist/core/validators/git-validator.test.d.ts.map +1 -0
- package/dist/core/validators/git-validator.test.js +40 -0
- package/dist/core/validators/git-validator.test.js.map +1 -0
- package/dist/core/validators/index.d.ts +90 -0
- package/dist/core/validators/index.d.ts.map +1 -0
- package/dist/core/validators/index.js +166 -0
- package/dist/core/validators/index.js.map +1 -0
- package/dist/core/validators/input-validator.d.ts +117 -0
- package/dist/core/validators/input-validator.d.ts.map +1 -0
- package/dist/core/validators/input-validator.js +368 -0
- package/dist/core/validators/input-validator.js.map +1 -0
- package/dist/core/validators/temp_index.d.ts +56 -0
- package/dist/core/validators/temp_index.d.ts.map +1 -0
- package/dist/core/validators/temp_index.js +94 -0
- package/dist/core/validators/temp_index.js.map +1 -0
- package/dist/core/validators/validation-error-handler.d.ts +107 -0
- package/dist/core/validators/validation-error-handler.d.ts.map +1 -0
- package/dist/core/validators/validation-error-handler.js +379 -0
- package/dist/core/validators/validation-error-handler.js.map +1 -0
- package/dist/core/validators/validation-orchestrator.d.ts +128 -0
- package/dist/core/validators/validation-orchestrator.d.ts.map +1 -0
- package/dist/core/validators/validation-orchestrator.js +301 -0
- package/dist/core/validators/validation-orchestrator.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +316 -0
- package/dist/index.js.map +1 -0
- package/dist/services/active-context-manager.d.ts +118 -0
- package/dist/services/active-context-manager.d.ts.map +1 -0
- package/dist/services/active-context-manager.js +435 -0
- package/dist/services/active-context-manager.js.map +1 -0
- package/dist/services/ai-service.d.ts +71 -0
- package/dist/services/ai-service.d.ts.map +1 -0
- package/dist/services/ai-service.js +329 -0
- package/dist/services/ai-service.js.map +1 -0
- package/dist/services/context-search.d.ts +98 -0
- package/dist/services/context-search.d.ts.map +1 -0
- package/dist/services/context-search.js +289 -0
- package/dist/services/context-search.js.map +1 -0
- package/dist/services/insight-extractor.d.ts +69 -0
- package/dist/services/insight-extractor.d.ts.map +1 -0
- package/dist/services/insight-extractor.js +343 -0
- package/dist/services/insight-extractor.js.map +1 -0
- package/dist/services/insight-quality-controller.d.ts +167 -0
- package/dist/services/insight-quality-controller.d.ts.map +1 -0
- package/dist/services/insight-quality-controller.js +543 -0
- package/dist/services/insight-quality-controller.js.map +1 -0
- package/dist/services/module-generator.d.ts +108 -0
- package/dist/services/module-generator.d.ts.map +1 -0
- package/dist/services/module-generator.js +561 -0
- package/dist/services/module-generator.js.map +1 -0
- package/dist/services/statusline-tracker.d.ts +139 -0
- package/dist/services/statusline-tracker.d.ts.map +1 -0
- package/dist/services/statusline-tracker.js +360 -0
- package/dist/services/statusline-tracker.js.map +1 -0
- package/dist/templates/ai-instructions-template.d.ts +39 -0
- package/dist/templates/ai-instructions-template.d.ts.map +1 -0
- package/dist/templates/ai-instructions-template.js +222 -0
- package/dist/templates/ai-instructions-template.js.map +1 -0
- package/dist/types/config.d.ts +128 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +49 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/documents.d.ts +87 -0
- package/dist/types/documents.d.ts.map +1 -0
- package/dist/types/documents.js +12 -0
- package/dist/types/documents.js.map +1 -0
- package/dist/types/session-log.d.ts +83 -0
- package/dist/types/session-log.d.ts.map +1 -0
- package/dist/types/session-log.js +12 -0
- package/dist/types/session-log.js.map +1 -0
- package/dist/types/session.d.ts +257 -0
- package/dist/types/session.d.ts.map +1 -0
- package/dist/types/session.js +12 -0
- package/dist/types/session.js.map +1 -0
- package/dist/utils/ai-templates.d.ts +98 -0
- package/dist/utils/ai-templates.d.ts.map +1 -0
- package/dist/utils/ai-templates.js +179 -0
- package/dist/utils/ai-templates.js.map +1 -0
- package/dist/utils/ginko-root.d.ts +51 -0
- package/dist/utils/ginko-root.d.ts.map +1 -0
- package/dist/utils/ginko-root.js +96 -0
- package/dist/utils/ginko-root.js.map +1 -0
- package/dist/utils/helpers.d.ts +19 -0
- package/dist/utils/helpers.d.ts.map +1 -0
- package/dist/utils/helpers.js +107 -0
- package/dist/utils/helpers.js.map +1 -0
- package/dist/utils/progressive-learning.d.ts +42 -0
- package/dist/utils/progressive-learning.d.ts.map +1 -0
- package/dist/utils/progressive-learning.js +248 -0
- package/dist/utils/progressive-learning.js.map +1 -0
- package/dist/utils/session-collector.d.ts +81 -0
- package/dist/utils/session-collector.d.ts.map +1 -0
- package/dist/utils/session-collector.js +387 -0
- package/dist/utils/session-collector.js.map +1 -0
- package/dist/utils/session-logger.d.ts +125 -0
- package/dist/utils/session-logger.d.ts.map +1 -0
- package/dist/utils/session-logger.js +359 -0
- package/dist/utils/session-logger.js.map +1 -0
- package/dist/utils/session-synthesizer.d.ts +36 -0
- package/dist/utils/session-synthesizer.d.ts.map +1 -0
- package/dist/utils/session-synthesizer.js +239 -0
- package/dist/utils/session-synthesizer.js.map +1 -0
- package/package.json +76 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileType: utility
|
|
3
|
+
* @status: current
|
|
4
|
+
* @updated: 2025-09-19
|
|
5
|
+
* @tags: [paths, cross-platform, normalization, windows, unix]
|
|
6
|
+
* @related: [platform-detector.ts, hook-adapter.ts, index.ts]
|
|
7
|
+
* @priority: high
|
|
8
|
+
* @complexity: medium
|
|
9
|
+
* @dependencies: [path, os]
|
|
10
|
+
*/
|
|
11
|
+
import { Platform } from './platform-detector.js';
|
|
12
|
+
export interface PathConversionOptions {
|
|
13
|
+
preserveCase?: boolean;
|
|
14
|
+
expandVariables?: boolean;
|
|
15
|
+
useForwardSlashes?: boolean;
|
|
16
|
+
makeRelative?: boolean;
|
|
17
|
+
basePath?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface NormalizedPath {
|
|
20
|
+
original: string;
|
|
21
|
+
normalized: string;
|
|
22
|
+
platform: Platform;
|
|
23
|
+
isAbsolute: boolean;
|
|
24
|
+
segments: string[];
|
|
25
|
+
drive?: string;
|
|
26
|
+
root: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Handles cross-platform path normalization and conversion
|
|
30
|
+
* Resolves differences between Windows and Unix path formats
|
|
31
|
+
*/
|
|
32
|
+
export declare class PathNormalizer {
|
|
33
|
+
private readonly windowsDrivePattern;
|
|
34
|
+
private readonly windowsPathPattern;
|
|
35
|
+
private readonly unixAbsolutePattern;
|
|
36
|
+
/**
|
|
37
|
+
* Normalize a path for the current platform
|
|
38
|
+
*/
|
|
39
|
+
normalize(inputPath: string, targetPlatform?: Platform): string;
|
|
40
|
+
/**
|
|
41
|
+
* Convert a path from one platform to another
|
|
42
|
+
*/
|
|
43
|
+
convertPath(inputPath: string, fromPlatform: Platform, toPlatform: Platform): string;
|
|
44
|
+
/**
|
|
45
|
+
* Parse a path into components
|
|
46
|
+
*/
|
|
47
|
+
parse(inputPath: string, platform?: Platform): NormalizedPath;
|
|
48
|
+
/**
|
|
49
|
+
* Convert home directory references
|
|
50
|
+
*/
|
|
51
|
+
expandHomeDirectory(inputPath: string, platform?: Platform): string;
|
|
52
|
+
/**
|
|
53
|
+
* Get the appropriate Claude hooks path for any platform
|
|
54
|
+
*/
|
|
55
|
+
getClaudeHooksPath(platform?: Platform): string;
|
|
56
|
+
/**
|
|
57
|
+
* Get the appropriate ginko directory path for any platform
|
|
58
|
+
*/
|
|
59
|
+
getGinkoPath(platform?: Platform): string;
|
|
60
|
+
/**
|
|
61
|
+
* Join path segments using platform-specific separators
|
|
62
|
+
*/
|
|
63
|
+
joinPath(segments: string[], platform?: Platform): string;
|
|
64
|
+
/**
|
|
65
|
+
* Make a path relative to a base path
|
|
66
|
+
*/
|
|
67
|
+
makeRelative(inputPath: string, basePath: string, platform?: Platform): string;
|
|
68
|
+
/**
|
|
69
|
+
* Make a path absolute
|
|
70
|
+
*/
|
|
71
|
+
makeAbsolute(inputPath: string, basePath?: string, platform?: Platform): string;
|
|
72
|
+
/**
|
|
73
|
+
* Check if a path exists and normalize it
|
|
74
|
+
*/
|
|
75
|
+
normalizePath(inputPath: string, options?: PathConversionOptions): Promise<string>;
|
|
76
|
+
/**
|
|
77
|
+
* Basic path normalization
|
|
78
|
+
*/
|
|
79
|
+
private basicNormalize;
|
|
80
|
+
/**
|
|
81
|
+
* Convert Windows path to Unix
|
|
82
|
+
*/
|
|
83
|
+
private convertWindowsToUnix;
|
|
84
|
+
/**
|
|
85
|
+
* Convert Unix path to Windows
|
|
86
|
+
*/
|
|
87
|
+
private convertUnixToWindows;
|
|
88
|
+
/**
|
|
89
|
+
* Convert paths within text content (for scripts)
|
|
90
|
+
*/
|
|
91
|
+
private convertPathsInText;
|
|
92
|
+
/**
|
|
93
|
+
* Expand environment variables in path
|
|
94
|
+
*/
|
|
95
|
+
private expandEnvironmentVariables;
|
|
96
|
+
/**
|
|
97
|
+
* Get current platform
|
|
98
|
+
*/
|
|
99
|
+
private getCurrentPlatform;
|
|
100
|
+
/**
|
|
101
|
+
* Get home directory for platform
|
|
102
|
+
*/
|
|
103
|
+
private getHomeDirectory;
|
|
104
|
+
/**
|
|
105
|
+
* Extract drive letter from Windows path
|
|
106
|
+
*/
|
|
107
|
+
private extractDrive;
|
|
108
|
+
/**
|
|
109
|
+
* Check if string looks like a path
|
|
110
|
+
*/
|
|
111
|
+
private looksLikePath;
|
|
112
|
+
/**
|
|
113
|
+
* Check if string contains script content vs a single path
|
|
114
|
+
*/
|
|
115
|
+
private isScriptContent;
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=path-normalizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-normalizer.d.ts","sourceRoot":"","sources":["../../../src/core/platform/path-normalizer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,MAAM,WAAW,qBAAqB;IACpC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,mBAA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;IACH,OAAO,CAAC,kBAAkB;IAgC1B;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAwBlC;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAc1B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAQxB;;OAEG;IACH,OAAO,CAAC,YAAY;IAKpB;;OAEG;IACH,OAAO,CAAC,aAAa;IAkBrB;;OAEG;IACH,OAAO,CAAC,eAAe;CAIxB"}
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileType: utility
|
|
3
|
+
* @status: current
|
|
4
|
+
* @updated: 2025-09-19
|
|
5
|
+
* @tags: [paths, cross-platform, normalization, windows, unix]
|
|
6
|
+
* @related: [platform-detector.ts, hook-adapter.ts, index.ts]
|
|
7
|
+
* @priority: high
|
|
8
|
+
* @complexity: medium
|
|
9
|
+
* @dependencies: [path, os]
|
|
10
|
+
*/
|
|
11
|
+
import * as path from 'path';
|
|
12
|
+
import * as os from 'os';
|
|
13
|
+
/**
|
|
14
|
+
* Handles cross-platform path normalization and conversion
|
|
15
|
+
* Resolves differences between Windows and Unix path formats
|
|
16
|
+
*/
|
|
17
|
+
export class PathNormalizer {
|
|
18
|
+
windowsDrivePattern = /^[A-Za-z]:/;
|
|
19
|
+
windowsPathPattern = /^[A-Za-z]:[\\\/]/;
|
|
20
|
+
unixAbsolutePattern = /^\//;
|
|
21
|
+
/**
|
|
22
|
+
* Normalize a path for the current platform
|
|
23
|
+
*/
|
|
24
|
+
normalize(inputPath, targetPlatform) {
|
|
25
|
+
const platform = targetPlatform || this.getCurrentPlatform();
|
|
26
|
+
const normalizedPath = this.basicNormalize(inputPath, platform);
|
|
27
|
+
return this.expandEnvironmentVariables(normalizedPath, platform);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Convert a path from one platform to another
|
|
31
|
+
*/
|
|
32
|
+
convertPath(inputPath, fromPlatform, toPlatform) {
|
|
33
|
+
if (fromPlatform === toPlatform) {
|
|
34
|
+
return inputPath;
|
|
35
|
+
}
|
|
36
|
+
let converted = inputPath;
|
|
37
|
+
// Handle bulk string conversion (for script content)
|
|
38
|
+
if (this.isScriptContent(inputPath)) {
|
|
39
|
+
return this.convertPathsInText(inputPath, fromPlatform, toPlatform);
|
|
40
|
+
}
|
|
41
|
+
// Convert individual path
|
|
42
|
+
if (fromPlatform === 'windows' && (toPlatform === 'linux' || toPlatform === 'macos')) {
|
|
43
|
+
converted = this.convertWindowsToUnix(inputPath);
|
|
44
|
+
}
|
|
45
|
+
else if ((fromPlatform === 'linux' || fromPlatform === 'macos') && toPlatform === 'windows') {
|
|
46
|
+
converted = this.convertUnixToWindows(inputPath);
|
|
47
|
+
}
|
|
48
|
+
return this.normalize(converted, toPlatform);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Parse a path into components
|
|
52
|
+
*/
|
|
53
|
+
parse(inputPath, platform) {
|
|
54
|
+
const targetPlatform = platform || this.getCurrentPlatform();
|
|
55
|
+
const normalized = this.normalize(inputPath, targetPlatform);
|
|
56
|
+
const parsed = path.parse(normalized);
|
|
57
|
+
return {
|
|
58
|
+
original: inputPath,
|
|
59
|
+
normalized,
|
|
60
|
+
platform: targetPlatform,
|
|
61
|
+
isAbsolute: path.isAbsolute(normalized),
|
|
62
|
+
segments: normalized.split(path.sep).filter(segment => segment !== ''),
|
|
63
|
+
drive: this.extractDrive(normalized),
|
|
64
|
+
root: parsed.root
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Convert home directory references
|
|
69
|
+
*/
|
|
70
|
+
expandHomeDirectory(inputPath, platform) {
|
|
71
|
+
const targetPlatform = platform || this.getCurrentPlatform();
|
|
72
|
+
let expanded = inputPath;
|
|
73
|
+
// Unix-style home directory expansion
|
|
74
|
+
if (expanded.startsWith('~/')) {
|
|
75
|
+
const homeDir = this.getHomeDirectory(targetPlatform);
|
|
76
|
+
expanded = path.join(homeDir, expanded.slice(2));
|
|
77
|
+
}
|
|
78
|
+
// Windows-style home directory
|
|
79
|
+
if (expanded.includes('%USERPROFILE%')) {
|
|
80
|
+
const homeDir = this.getHomeDirectory(targetPlatform);
|
|
81
|
+
expanded = expanded.replace(/%USERPROFILE%/g, homeDir);
|
|
82
|
+
}
|
|
83
|
+
if (expanded.includes('%HOME%')) {
|
|
84
|
+
const homeDir = this.getHomeDirectory(targetPlatform);
|
|
85
|
+
expanded = expanded.replace(/%HOME%/g, homeDir);
|
|
86
|
+
}
|
|
87
|
+
return expanded;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Get the appropriate Claude hooks path for any platform
|
|
91
|
+
*/
|
|
92
|
+
getClaudeHooksPath(platform) {
|
|
93
|
+
const targetPlatform = platform || this.getCurrentPlatform();
|
|
94
|
+
const homeDir = this.getHomeDirectory(targetPlatform);
|
|
95
|
+
return this.joinPath([homeDir, '.claude', 'hooks'], targetPlatform);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Get the appropriate ginko directory path for any platform
|
|
99
|
+
*/
|
|
100
|
+
getGinkoPath(platform) {
|
|
101
|
+
const targetPlatform = platform || this.getCurrentPlatform();
|
|
102
|
+
const homeDir = this.getHomeDirectory(targetPlatform);
|
|
103
|
+
return this.joinPath([homeDir, '.ginko'], targetPlatform);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Join path segments using platform-specific separators
|
|
107
|
+
*/
|
|
108
|
+
joinPath(segments, platform) {
|
|
109
|
+
const targetPlatform = platform || this.getCurrentPlatform();
|
|
110
|
+
const separator = targetPlatform === 'windows' ? '\\' : '/';
|
|
111
|
+
return segments.join(separator);
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Make a path relative to a base path
|
|
115
|
+
*/
|
|
116
|
+
makeRelative(inputPath, basePath, platform) {
|
|
117
|
+
const targetPlatform = platform || this.getCurrentPlatform();
|
|
118
|
+
const normalizedInput = this.normalize(inputPath, targetPlatform);
|
|
119
|
+
const normalizedBase = this.normalize(basePath, targetPlatform);
|
|
120
|
+
return path.relative(normalizedBase, normalizedInput);
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Make a path absolute
|
|
124
|
+
*/
|
|
125
|
+
makeAbsolute(inputPath, basePath, platform) {
|
|
126
|
+
const targetPlatform = platform || this.getCurrentPlatform();
|
|
127
|
+
const base = basePath || process.cwd();
|
|
128
|
+
if (path.isAbsolute(inputPath)) {
|
|
129
|
+
return this.normalize(inputPath, targetPlatform);
|
|
130
|
+
}
|
|
131
|
+
return this.normalize(path.resolve(base, inputPath), targetPlatform);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Check if a path exists and normalize it
|
|
135
|
+
*/
|
|
136
|
+
async normalizePath(inputPath, options = {}) {
|
|
137
|
+
let normalized = inputPath;
|
|
138
|
+
// Expand home directory
|
|
139
|
+
normalized = this.expandHomeDirectory(normalized);
|
|
140
|
+
// Expand environment variables
|
|
141
|
+
if (options.expandVariables !== false) {
|
|
142
|
+
normalized = this.expandEnvironmentVariables(normalized);
|
|
143
|
+
}
|
|
144
|
+
// Make relative if requested
|
|
145
|
+
if (options.makeRelative && options.basePath) {
|
|
146
|
+
normalized = this.makeRelative(normalized, options.basePath);
|
|
147
|
+
}
|
|
148
|
+
// Use forward slashes if requested
|
|
149
|
+
if (options.useForwardSlashes) {
|
|
150
|
+
normalized = normalized.replace(/\\/g, '/');
|
|
151
|
+
}
|
|
152
|
+
return path.normalize(normalized);
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Basic path normalization
|
|
156
|
+
*/
|
|
157
|
+
basicNormalize(inputPath, platform) {
|
|
158
|
+
let normalized = inputPath;
|
|
159
|
+
// Handle empty or null paths
|
|
160
|
+
if (!normalized || normalized.trim() === '') {
|
|
161
|
+
return '';
|
|
162
|
+
}
|
|
163
|
+
// Expand home directory first
|
|
164
|
+
normalized = this.expandHomeDirectory(normalized, platform);
|
|
165
|
+
// Platform-specific normalization
|
|
166
|
+
if (platform === 'windows') {
|
|
167
|
+
// Convert forward slashes to backslashes
|
|
168
|
+
normalized = normalized.replace(/\//g, '\\');
|
|
169
|
+
// Handle UNC paths
|
|
170
|
+
if (normalized.startsWith('\\\\')) {
|
|
171
|
+
return normalized;
|
|
172
|
+
}
|
|
173
|
+
// Ensure drive letter format
|
|
174
|
+
if (this.windowsDrivePattern.test(normalized) && !normalized.includes('\\')) {
|
|
175
|
+
normalized = normalized.replace(':', ':\\');
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
// Unix-like systems: convert backslashes to forward slashes
|
|
180
|
+
normalized = normalized.replace(/\\/g, '/');
|
|
181
|
+
}
|
|
182
|
+
return path.normalize(normalized);
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Convert Windows path to Unix
|
|
186
|
+
*/
|
|
187
|
+
convertWindowsToUnix(windowsPath) {
|
|
188
|
+
let unixPath = windowsPath;
|
|
189
|
+
// Convert backslashes to forward slashes
|
|
190
|
+
unixPath = unixPath.replace(/\\/g, '/');
|
|
191
|
+
// Convert drive letters (C:\ -> /c/)
|
|
192
|
+
unixPath = unixPath.replace(/^([A-Za-z]):\//g, '/$1/');
|
|
193
|
+
// Handle common Windows paths
|
|
194
|
+
unixPath = unixPath.replace(/^\/Users\/([^\/]+)\//, '/home/$1/');
|
|
195
|
+
unixPath = unixPath.replace(/^\/c\/Users\/([^\/]+)\//, '/home/$1/');
|
|
196
|
+
// Remove duplicate slashes
|
|
197
|
+
unixPath = unixPath.replace(/\/+/g, '/');
|
|
198
|
+
return unixPath;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Convert Unix path to Windows
|
|
202
|
+
*/
|
|
203
|
+
convertUnixToWindows(unixPath) {
|
|
204
|
+
let windowsPath = unixPath;
|
|
205
|
+
// Convert forward slashes to backslashes
|
|
206
|
+
windowsPath = windowsPath.replace(/\//g, '\\');
|
|
207
|
+
// Convert mount points to drive letters (/c/ -> C:\)
|
|
208
|
+
windowsPath = windowsPath.replace(/^\\([a-zA-Z])\\/, '$1:\\');
|
|
209
|
+
// Handle common Unix paths
|
|
210
|
+
windowsPath = windowsPath.replace(/^\\home\\([^\\]+)\\/, 'C:\\Users\\$1\\');
|
|
211
|
+
windowsPath = windowsPath.replace(/^\/home\//, 'C:\\Users\\');
|
|
212
|
+
// Handle absolute paths that don't start with drive
|
|
213
|
+
if (windowsPath.startsWith('\\') && !windowsPath.startsWith('\\\\')) {
|
|
214
|
+
windowsPath = 'C:' + windowsPath;
|
|
215
|
+
}
|
|
216
|
+
return windowsPath;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Convert paths within text content (for scripts)
|
|
220
|
+
*/
|
|
221
|
+
convertPathsInText(content, fromPlatform, toPlatform) {
|
|
222
|
+
let converted = content;
|
|
223
|
+
// Common path patterns to convert
|
|
224
|
+
const pathPatterns = [
|
|
225
|
+
// Quoted paths
|
|
226
|
+
/"([A-Za-z]:[\\\/][^"]+)"/g,
|
|
227
|
+
/'([A-Za-z]:[\\\/][^']+)'/g,
|
|
228
|
+
/"(\/[^"]+)"/g,
|
|
229
|
+
/'(\/[^']+)'/g,
|
|
230
|
+
// Unquoted paths (more careful)
|
|
231
|
+
/\b([A-Za-z]:[\\\/]\S+)/g,
|
|
232
|
+
/\b(\/[a-zA-Z][^\s]*)/g,
|
|
233
|
+
// Environment variables with paths
|
|
234
|
+
/%([A-Z_]+)%/g,
|
|
235
|
+
/\$\{([A-Z_]+)\}/g,
|
|
236
|
+
/\$([A-Z_]+)/g
|
|
237
|
+
];
|
|
238
|
+
for (const pattern of pathPatterns) {
|
|
239
|
+
converted = converted.replace(pattern, (match, path) => {
|
|
240
|
+
if (this.looksLikePath(path)) {
|
|
241
|
+
const convertedPath = this.convertPath(path, fromPlatform, toPlatform);
|
|
242
|
+
return match.replace(path, convertedPath);
|
|
243
|
+
}
|
|
244
|
+
return match;
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
return converted;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Expand environment variables in path
|
|
251
|
+
*/
|
|
252
|
+
expandEnvironmentVariables(inputPath, platform) {
|
|
253
|
+
const targetPlatform = platform || this.getCurrentPlatform();
|
|
254
|
+
let expanded = inputPath;
|
|
255
|
+
// Windows environment variables (%VAR%)
|
|
256
|
+
expanded = expanded.replace(/%([A-Z_][A-Z0-9_]*)%/g, (match, varName) => {
|
|
257
|
+
const value = process.env[varName];
|
|
258
|
+
return value || match;
|
|
259
|
+
});
|
|
260
|
+
// Unix environment variables ($VAR or ${VAR})
|
|
261
|
+
expanded = expanded.replace(/\$\{([A-Z_][A-Z0-9_]*)\}/g, (match, varName) => {
|
|
262
|
+
const value = process.env[varName];
|
|
263
|
+
return value || match;
|
|
264
|
+
});
|
|
265
|
+
expanded = expanded.replace(/\$([A-Z_][A-Z0-9_]*)/g, (match, varName) => {
|
|
266
|
+
const value = process.env[varName];
|
|
267
|
+
return value || match;
|
|
268
|
+
});
|
|
269
|
+
return expanded;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Get current platform
|
|
273
|
+
*/
|
|
274
|
+
getCurrentPlatform() {
|
|
275
|
+
const platform = os.platform();
|
|
276
|
+
switch (platform) {
|
|
277
|
+
case 'win32':
|
|
278
|
+
return 'windows';
|
|
279
|
+
case 'darwin':
|
|
280
|
+
return 'macos';
|
|
281
|
+
case 'linux':
|
|
282
|
+
return 'linux';
|
|
283
|
+
default:
|
|
284
|
+
return 'linux';
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Get home directory for platform
|
|
289
|
+
*/
|
|
290
|
+
getHomeDirectory(platform) {
|
|
291
|
+
if (platform === 'windows') {
|
|
292
|
+
return process.env.USERPROFILE || process.env.HOME || 'C:\\Users\\Default';
|
|
293
|
+
}
|
|
294
|
+
else {
|
|
295
|
+
return process.env.HOME || '/home/user';
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Extract drive letter from Windows path
|
|
300
|
+
*/
|
|
301
|
+
extractDrive(inputPath) {
|
|
302
|
+
const match = inputPath.match(/^([A-Za-z]):/);
|
|
303
|
+
return match ? match[1].toUpperCase() + ':' : undefined;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Check if string looks like a path
|
|
307
|
+
*/
|
|
308
|
+
looksLikePath(str) {
|
|
309
|
+
if (!str || str.length < 2)
|
|
310
|
+
return false;
|
|
311
|
+
// Windows absolute path
|
|
312
|
+
if (this.windowsPathPattern.test(str))
|
|
313
|
+
return true;
|
|
314
|
+
// Unix absolute path
|
|
315
|
+
if (this.unixAbsolutePattern.test(str))
|
|
316
|
+
return true;
|
|
317
|
+
// Relative path with directory separators
|
|
318
|
+
if (str.includes('/') || str.includes('\\'))
|
|
319
|
+
return true;
|
|
320
|
+
// Home directory reference
|
|
321
|
+
if (str.startsWith('~/'))
|
|
322
|
+
return true;
|
|
323
|
+
return false;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Check if string contains script content vs a single path
|
|
327
|
+
*/
|
|
328
|
+
isScriptContent(str) {
|
|
329
|
+
// If it contains newlines or is very long, it's probably script content
|
|
330
|
+
return str.includes('\n') || str.length > 200;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
//# sourceMappingURL=path-normalizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-normalizer.js","sourceRoot":"","sources":["../../../src/core/platform/path-normalizer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAqBzB;;;GAGG;AACH,MAAM,OAAO,cAAc;IACR,mBAAmB,GAAG,YAAY,CAAC;IACnC,kBAAkB,GAAG,kBAAkB,CAAC;IACxC,mBAAmB,GAAG,KAAK,CAAC;IAE7C;;OAEG;IACH,S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AAkB,CAAC,IAAI,CAAC,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC;QAEnD,qBAAqB;QACrB,IAAI,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC;QAEpD,0CAA0C;QAC1C,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;QAEzD,2BAA2B;QAC3B,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;QAEtC,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;OAEG;IACK,eAAe,CAAC,GAAW;QACjC,wEAAwE;QACxE,OAAO,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC;IAChD,CAAC;CACF"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileType: utility
|
|
3
|
+
* @status: current
|
|
4
|
+
* @updated: 2025-09-20
|
|
5
|
+
* @tags: [path, resolution, cross-platform, windows, unix, config]
|
|
6
|
+
* @related: [platform-adapter.ts, config-loader.ts]
|
|
7
|
+
* @priority: high
|
|
8
|
+
* @complexity: medium
|
|
9
|
+
* @dependencies: [path, os, platform-adapter]
|
|
10
|
+
*/
|
|
11
|
+
import { Platform, PlatformAdapter } from './platform-adapter';
|
|
12
|
+
export interface PathConfig {
|
|
13
|
+
platform: Platform;
|
|
14
|
+
separators: {
|
|
15
|
+
path: string;
|
|
16
|
+
drive: string;
|
|
17
|
+
};
|
|
18
|
+
roots: {
|
|
19
|
+
home: string;
|
|
20
|
+
temp: string;
|
|
21
|
+
config: string;
|
|
22
|
+
};
|
|
23
|
+
patterns: {
|
|
24
|
+
absolute: RegExp;
|
|
25
|
+
relative: RegExp;
|
|
26
|
+
home: RegExp;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export interface ResolvedPath {
|
|
30
|
+
original: string;
|
|
31
|
+
resolved: string;
|
|
32
|
+
platform: Platform;
|
|
33
|
+
isAbsolute: boolean;
|
|
34
|
+
isHome: boolean;
|
|
35
|
+
components: string[];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* CrossPlatformPathResolver handles path resolution across different operating systems
|
|
39
|
+
*/
|
|
40
|
+
export declare class CrossPlatformPathResolver {
|
|
41
|
+
private platformAdapter;
|
|
42
|
+
private config;
|
|
43
|
+
constructor(platformAdapter?: PlatformAdapter);
|
|
44
|
+
/**
|
|
45
|
+
* Initialize platform-specific path configuration
|
|
46
|
+
*/
|
|
47
|
+
private initializeConfig;
|
|
48
|
+
/**
|
|
49
|
+
* Resolve a path for the current platform
|
|
50
|
+
*/
|
|
51
|
+
resolvePath(inputPath: string, basePath?: string): ResolvedPath;
|
|
52
|
+
/**
|
|
53
|
+
* Resolve home directory path
|
|
54
|
+
*/
|
|
55
|
+
private resolveHomePath;
|
|
56
|
+
/**
|
|
57
|
+
* Resolve absolute path
|
|
58
|
+
*/
|
|
59
|
+
private resolveAbsolutePath;
|
|
60
|
+
/**
|
|
61
|
+
* Resolve relative path
|
|
62
|
+
*/
|
|
63
|
+
private resolveRelativePath;
|
|
64
|
+
/**
|
|
65
|
+
* Normalize path separators for current platform
|
|
66
|
+
*/
|
|
67
|
+
normalizeSeparators(inputPath: string): string;
|
|
68
|
+
/**
|
|
69
|
+
* Normalize path for current platform
|
|
70
|
+
*/
|
|
71
|
+
normalizePath(inputPath: string): string;
|
|
72
|
+
/**
|
|
73
|
+
* Split path into components
|
|
74
|
+
*/
|
|
75
|
+
splitPath(inputPath: string): string[];
|
|
76
|
+
/**
|
|
77
|
+
* Join path components for current platform
|
|
78
|
+
*/
|
|
79
|
+
joinPath(...components: string[]): string;
|
|
80
|
+
/**
|
|
81
|
+
* Convert path to platform-specific format
|
|
82
|
+
*/
|
|
83
|
+
convertPathToPlatform(inputPath: string, targetPlatform: Platform): string;
|
|
84
|
+
/**
|
|
85
|
+
* Get platform-specific special directories
|
|
86
|
+
*/
|
|
87
|
+
getSpecialDirectory(type: 'home' | 'temp' | 'config' | 'desktop' | 'documents'): string;
|
|
88
|
+
/**
|
|
89
|
+
* Create portable path that works across platforms
|
|
90
|
+
*/
|
|
91
|
+
createPortablePath(inputPath: string): string;
|
|
92
|
+
/**
|
|
93
|
+
* Validate path for platform compatibility
|
|
94
|
+
*/
|
|
95
|
+
validatePath(inputPath: string, targetPlatform?: Platform): {
|
|
96
|
+
valid: boolean;
|
|
97
|
+
issues: string[];
|
|
98
|
+
suggestions: string[];
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Get relative path between two paths
|
|
102
|
+
*/
|
|
103
|
+
getRelativePath(from: string, to: string): string;
|
|
104
|
+
/**
|
|
105
|
+
* Check if path exists and is accessible
|
|
106
|
+
*/
|
|
107
|
+
checkPathAccess(inputPath: string): Promise<{
|
|
108
|
+
exists: boolean;
|
|
109
|
+
readable: boolean;
|
|
110
|
+
writable: boolean;
|
|
111
|
+
isDirectory: boolean;
|
|
112
|
+
isFile: boolean;
|
|
113
|
+
}>;
|
|
114
|
+
/**
|
|
115
|
+
* Get current platform configuration
|
|
116
|
+
*/
|
|
117
|
+
getConfig(): PathConfig;
|
|
118
|
+
}
|
|
119
|
+
export default CrossPlatformPathResolver;
|
|
120
|
+
//# sourceMappingURL=path-resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-resolver.d.ts","sourceRoot":"","sources":["../../../src/core/platform/path-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,QAAQ,CAAC;IACnB,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;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