@tdk-landscape/tdk-cli-core 1.3.44 → 1.3.48
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/.github/workflows/release-binaries.yml +54 -0
- package/.pre-commit-config.yaml +57 -0
- package/Makefile +92 -0
- package/bun.lock +538 -0
- package/cli/AGENTS.md +390 -0
- package/cli/DESIGN.md +735 -0
- package/cli/biome.json +44 -0
- package/cli/dependency-graph.svg +1135 -0
- package/cli/knip.json +6 -0
- package/cli/package.json +77 -0
- package/cli/pnpm-lock.yaml +2305 -0
- package/cli/pnpm-workspace.yaml +2 -0
- package/cli/shared-platform-engineering/docker-templates/bun-hoisted-symlink-fix.sh +23 -0
- package/cli/shared-platform-engineering/docker-templates/infisical-entrypoint.sh +464 -0
- package/cli/shared-platform-engineering/docker-templates/install-deps.sh +152 -0
- package/cli/shared-platform-engineering/docker-templates/prisma-bun-client-link-fix.sh +12 -0
- package/cli/shared-platform-engineering/docker-templates/prisma-normalize-client.sh +56 -0
- package/{dist/cli.js → cli/src/cli.ts} +21 -13
- package/cli/src/commands/__tests__/always-enabled-infra.test.ts +115 -0
- package/cli/src/commands/__tests__/config.test.ts +146 -0
- package/cli/src/commands/__tests__/doctor.test.ts +557 -0
- package/cli/src/commands/__tests__/error-handling.test.ts +78 -0
- package/cli/src/commands/__tests__/phases-model.test.ts +163 -0
- package/cli/src/commands/__tests__/project-resource-features-e2e.test.ts +207 -0
- package/cli/src/commands/__tests__/project.test.ts +68 -0
- package/cli/src/commands/__tests__/resource.test.ts +226 -0
- package/cli/src/commands/__tests__/saas-starter-integration.test.ts +196 -0
- package/cli/src/commands/__tests__/stack-features-e2e.test.ts +129 -0
- package/cli/src/commands/__tests__/upgrade.test.ts +101 -0
- package/{dist/commands/completion.js → cli/src/commands/completion.ts} +78 -72
- package/cli/src/commands/config.ts +299 -0
- package/cli/src/commands/doctor.ts +790 -0
- package/cli/src/commands/down.ts +37 -0
- package/cli/src/commands/help.ts +150 -0
- package/cli/src/commands/networks-design.md +80 -0
- package/cli/src/commands/networks.ts +332 -0
- package/cli/src/commands/project.ts +439 -0
- package/cli/src/commands/projects.ts +82 -0
- package/cli/src/commands/resource.ts +652 -0
- package/cli/src/commands/resources.ts +95 -0
- package/cli/src/commands/stack.ts +128 -0
- package/cli/src/commands/stacks.ts +52 -0
- package/cli/src/commands/status.ts +88 -0
- package/cli/src/commands/ui.tsx +843 -0
- package/cli/src/commands/up.ts +150 -0
- package/cli/src/commands/upgrade.ts +570 -0
- package/{dist/commands/version.js → cli/src/commands/version.ts} +5 -5
- package/cli/src/components/Accessible.tsx +21 -0
- package/cli/src/components/BaseTooltip.tsx +66 -0
- package/cli/src/components/DetailPanel.tsx +146 -0
- package/cli/src/components/FileTree.tsx +89 -0
- package/cli/src/components/ResourceSelectInput.tsx +30 -0
- package/cli/src/components/ResourceTable.tsx +78 -0
- package/cli/src/components/TabBar.tsx +53 -0
- package/cli/src/components/Tooltip.tsx +11 -0
- package/{dist/components/index.js → cli/src/components/index.ts} +0 -1
- package/cli/src/config/platform-standards.test.ts +11 -0
- package/cli/src/config/platform-standards.ts +196 -0
- package/cli/src/generator/__tests__/extension-fetch.test.ts +220 -0
- package/cli/src/generator/__tests__/template-engine.test.ts +70 -0
- package/cli/src/generator/extension-fetch.ts +279 -0
- package/cli/src/generator/template-engine.ts +754 -0
- package/cli/src/index.ts +86 -0
- package/cli/src/templates.d.ts +4 -0
- package/cli/src/types/index.ts +351 -0
- package/cli/src/utils/__tests__/cache.test.ts +98 -0
- package/cli/src/utils/__tests__/formatting.test.ts +170 -0
- package/cli/src/utils/__tests__/paths.test.ts +180 -0
- package/cli/src/utils/__tests__/port-assignment.test.ts +121 -0
- package/cli/src/utils/__tests__/service-urls.test.ts +174 -0
- package/cli/src/utils/__tests__/services.test.ts +531 -0
- package/cli/src/utils/__tests__/tilt.test.ts +143 -0
- package/cli/src/utils/__tests__/validation.test.ts +148 -0
- package/cli/src/utils/cache.ts +76 -0
- package/cli/src/utils/command-helpers.ts +54 -0
- package/cli/src/utils/constants.ts +126 -0
- package/cli/src/utils/discovery-context.ts +49 -0
- package/cli/src/utils/docker.ts +20 -0
- package/cli/src/utils/doctor-runtime.ts +604 -0
- package/cli/src/utils/env-validator.ts +139 -0
- package/cli/src/utils/errors.ts +168 -0
- package/cli/src/utils/file-helpers.ts +62 -0
- package/cli/src/utils/formatting.ts +215 -0
- package/cli/src/utils/paths.ts +53 -0
- package/cli/src/utils/port-assignment.ts +106 -0
- package/cli/src/utils/project-features.ts +118 -0
- package/cli/src/utils/project-templates.ts +28 -0
- package/cli/src/utils/prompt.ts +123 -0
- package/cli/src/utils/resource-features.ts +209 -0
- package/cli/src/utils/service-urls.ts +124 -0
- package/cli/src/utils/services.ts +363 -0
- package/cli/src/utils/stack-features.ts +30 -0
- package/cli/src/utils/tar.ts +24 -0
- package/cli/src/utils/tilt.ts +113 -0
- package/cli/src/utils/validation.ts +67 -0
- package/{templates → cli/templates}/Tiltfile.hbs +1 -1
- package/cli/tsconfig.json +25 -0
- package/cli/tsconfig.typecheck.json +8 -0
- package/docs/FEATURES.md +279 -0
- package/engine/topologies/platform/docker/dockerfile/dockerfile.star +3 -3
- package/engine/topologies/platform/docker/generators/golden_docker_generator_v2.star +1 -1
- package/engine/topologies/platform/docker/layers/l2_dependency_layers.star +0 -3
- package/engine/topologies/platform/docker/layers/l3_builder_layers.star +1 -1
- package/engine/topologies/platform/docker/layers/l4_runtime_layers.star +1 -1
- package/engine/topologies/platform/docker/secrets/infisical.star +19 -47
- package/engine/topologies/tilt/resources/orchestrator/apply_migrator_orchestration.star +1 -1
- package/install.sh +242 -0
- package/knip.json +10 -0
- package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/.openspec.yaml +2 -0
- package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/design.md +102 -0
- package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/proposal.md +31 -0
- package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/specs/vscode-tdk-notifications/spec.md +48 -0
- package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/specs/vscode-tdk-orchestration/spec.md +63 -0
- package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/specs/vscode-tdk-troubleshooting/spec.md +56 -0
- package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/tasks.md +61 -0
- package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/.openspec.yaml +2 -0
- package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/design.md +114 -0
- package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/proposal.md +32 -0
- package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/specs/manifest-field-migration/spec.md +20 -0
- package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/specs/resource-terminology-standard/spec.md +20 -0
- package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/specs/stack-terminology-standard/spec.md +20 -0
- package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/tasks.md +194 -0
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/.openspec.yaml +2 -0
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/design.md +111 -0
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/proposal.md +33 -0
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/function-naming-alignment/spec.md +12 -0
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/optional-parameter-patterns/spec.md +18 -0
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/parameter-documentation/spec.md +16 -0
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/parameter-naming-consistency/spec.md +12 -0
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/parameter-ordering-standard/spec.md +12 -0
- package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/tasks.md +194 -0
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/.openspec.yaml +2 -0
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/codebase-audit-report.md +62 -0
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/design.md +84 -0
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/proposal.md +31 -0
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/specs/codebase-audit/spec.md +27 -0
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/specs/dead-code-cleanup/spec.md +27 -0
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/specs/test-gap-fill/spec.md +23 -0
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/specs/todo-resolution/spec.md +27 -0
- package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/tasks.md +39 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/.openspec.yaml +5 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/design.md +94 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/proposal.md +46 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/ai-slop-cleanup/CLEANUP_REPORT_8.md +174 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/ai-slop-cleanup/CRITICAL_ASSESSMENT_8.md +160 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/circular-deps/CRITICAL_ASSESSMENT_4.md +381 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/dead-code/CRITICAL_ASSESSMENT_3.md +316 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/deduplication/CRITICAL_ASSESSMENT_1.md +290 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/deduplication/IMPLEMENTATION_SUMMARY_1.md +233 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/defensive-cleanup/CRITICAL_ASSESSMENT_6.md +835 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/legacy-cleanup/CRITICAL_ASSESSMENT_7.md +254 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/legacy-cleanup/IMPLEMENTATION_SUMMARY_7.md +187 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/strong-typing/CRITICAL_ASSESSMENT_5.md +269 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/type-consolidation/CRITICAL_ASSESSMENT_2.md +312 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/type-consolidation/IMPLEMENTATION_SUMMARY.md +170 -0
- package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/tasks.md +137 -0
- package/openspec/changes/archive/2026-06-25-landscape-consolidation/.openspec.yaml +2 -0
- package/openspec/changes/archive/2026-06-25-landscape-consolidation/design.md +80 -0
- package/openspec/changes/archive/2026-06-25-landscape-consolidation/proposal.md +40 -0
- package/openspec/changes/archive/2026-06-25-landscape-consolidation/spec.md +52 -0
- package/openspec/changes/archive/2026-06-25-landscape-consolidation/tasks.md +51 -0
- package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/.openspec.yaml +2 -0
- package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/design.md +43 -0
- package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/proposal.md +29 -0
- package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/specs/self-contained-generated-projects/spec.md +67 -0
- package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/tasks.md +27 -0
- package/openspec/specs/manifest-field-migration/spec.md +24 -0
- package/openspec/specs/resource-terminology-standard/spec.md +24 -0
- package/openspec/specs/self-contained-generated-projects/spec.md +67 -0
- package/openspec/specs/stack-terminology-standard/spec.md +24 -0
- package/package.json +27 -64
- package/platform/services/platform/proxy/service.yaml +14 -0
- package/scripts/audit-codebase.sh +213 -0
- package/scripts/install-git-hooks.sh +14 -0
- package/scripts/release-binaries.sh +94 -0
- package/scripts/setup-pre-commit.sh +33 -0
- package/scripts/stage-npm-engine.sh +36 -0
- package/shared-platform-engineering/docker-templates/bun-hoisted-symlink-fix.sh +23 -0
- package/shared-platform-engineering/docker-templates/infisical-entrypoint.sh +464 -0
- package/shared-platform-engineering/docker-templates/install-deps.sh +152 -0
- package/shared-platform-engineering/docker-templates/prisma-bun-client-link-fix.sh +12 -0
- package/shared-platform-engineering/docker-templates/prisma-normalize-client.sh +56 -0
- package/tests/tilt-engine/__init__.py +5 -0
- package/tests/tilt-engine/conftest.py +182 -0
- package/tests/tilt-engine/fixtures/appointment-frontend-service.json +11 -0
- package/tests/tilt-engine/fixtures/identity-backend-service.json +12 -0
- package/tests/tilt-engine/fixtures/invalid-service.json +4 -0
- package/tests/tilt-engine/test_agents_md_generator.py +341 -0
- package/tests/tilt-engine/test_agents_md_integration.py +378 -0
- package/tests/tilt-engine/test_cache_operations.py +181 -0
- package/tests/tilt-engine/test_cache_persistence.py +142 -0
- package/tests/tilt-engine/test_code_executor.py +152 -0
- package/tests/tilt-engine/test_code_viewer.py +127 -0
- package/tests/tilt-engine/test_compose_port_anchors.py +310 -0
- package/tests/tilt-engine/test_config_inspector.py +162 -0
- package/tests/tilt-engine/test_daemon_focus_mode.py +89 -0
- package/tests/tilt-engine/test_daemon_polling.py +122 -0
- package/tests/tilt-engine/test_daemon_registration.py +115 -0
- package/tests/tilt-engine/test_daemon_validation.py +107 -0
- package/tests/tilt-engine/test_docker_generator_bugs.py +493 -0
- package/tests/tilt-engine/test_docker_prune.py +119 -0
- package/tests/tilt-engine/test_dockerignore_path_bug.py +82 -0
- package/tests/tilt-engine/test_file_browser.py +193 -0
- package/tests/tilt-engine/test_frontend_basepath_manifest.py +27 -0
- package/tests/tilt-engine/test_health_dependencies.py +130 -0
- package/tests/tilt-engine/test_health_endpoints.py +118 -0
- package/tests/tilt-engine/test_health_tilt_ui.py +85 -0
- package/tests/tilt-engine/test_safety_aliases.py +84 -0
- package/tests/tilt-engine/test_snapshot_diff.py +136 -0
- package/tests/tilt-engine/test_snapshot_persistence.py +163 -0
- package/tests/tilt-engine/test_snapshot_scanning.py +123 -0
- package/tests/tilt-engine/test_standalone_project_boot.py +61 -0
- package/tests/tilt-engine/test_standalone_traefik.py +108 -0
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/commands/completion.d.ts +0 -3
- package/dist/commands/completion.d.ts.map +0 -1
- package/dist/commands/completion.js.map +0 -1
- package/dist/commands/config.d.ts +0 -3
- package/dist/commands/config.d.ts.map +0 -1
- package/dist/commands/config.js +0 -231
- package/dist/commands/config.js.map +0 -1
- package/dist/commands/doctor.d.ts +0 -7
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js +0 -597
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/down.d.ts +0 -3
- package/dist/commands/down.d.ts.map +0 -1
- package/dist/commands/down.js +0 -32
- package/dist/commands/down.js.map +0 -1
- package/dist/commands/help.d.ts +0 -2
- package/dist/commands/help.d.ts.map +0 -1
- package/dist/commands/help.js +0 -130
- package/dist/commands/help.js.map +0 -1
- package/dist/commands/networks.d.ts +0 -3
- package/dist/commands/networks.d.ts.map +0 -1
- package/dist/commands/networks.js +0 -260
- package/dist/commands/networks.js.map +0 -1
- package/dist/commands/project.d.ts +0 -3
- package/dist/commands/project.d.ts.map +0 -1
- package/dist/commands/project.js +0 -373
- package/dist/commands/project.js.map +0 -1
- package/dist/commands/projects.d.ts +0 -3
- package/dist/commands/projects.d.ts.map +0 -1
- package/dist/commands/projects.js +0 -71
- package/dist/commands/projects.js.map +0 -1
- package/dist/commands/resource.d.ts +0 -69
- package/dist/commands/resource.d.ts.map +0 -1
- package/dist/commands/resource.js +0 -579
- package/dist/commands/resource.js.map +0 -1
- package/dist/commands/resources.d.ts +0 -3
- package/dist/commands/resources.d.ts.map +0 -1
- package/dist/commands/resources.js +0 -73
- package/dist/commands/resources.js.map +0 -1
- package/dist/commands/stack.d.ts +0 -3
- package/dist/commands/stack.d.ts.map +0 -1
- package/dist/commands/stack.js +0 -97
- package/dist/commands/stack.js.map +0 -1
- package/dist/commands/stacks.d.ts +0 -3
- package/dist/commands/stacks.d.ts.map +0 -1
- package/dist/commands/stacks.js +0 -43
- package/dist/commands/stacks.js.map +0 -1
- package/dist/commands/status.d.ts +0 -3
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js +0 -71
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/ui.d.ts +0 -3
- package/dist/commands/ui.d.ts.map +0 -1
- package/dist/commands/ui.js +0 -445
- package/dist/commands/ui.js.map +0 -1
- package/dist/commands/up.d.ts +0 -3
- package/dist/commands/up.d.ts.map +0 -1
- package/dist/commands/up.js +0 -110
- package/dist/commands/up.js.map +0 -1
- package/dist/commands/upgrade.d.ts +0 -11
- package/dist/commands/upgrade.d.ts.map +0 -1
- package/dist/commands/upgrade.js +0 -496
- package/dist/commands/upgrade.js.map +0 -1
- package/dist/commands/version.d.ts +0 -3
- package/dist/commands/version.d.ts.map +0 -1
- package/dist/commands/version.js.map +0 -1
- package/dist/components/Accessible.d.ts +0 -8
- package/dist/components/Accessible.d.ts.map +0 -1
- package/dist/components/Accessible.js +0 -10
- package/dist/components/Accessible.js.map +0 -1
- package/dist/components/BaseTooltip.d.ts +0 -4
- package/dist/components/BaseTooltip.d.ts.map +0 -1
- package/dist/components/BaseTooltip.js +0 -28
- package/dist/components/BaseTooltip.js.map +0 -1
- package/dist/components/DetailPanel.d.ts +0 -4
- package/dist/components/DetailPanel.d.ts.map +0 -1
- package/dist/components/DetailPanel.js +0 -18
- package/dist/components/DetailPanel.js.map +0 -1
- package/dist/components/FileTree.d.ts +0 -4
- package/dist/components/FileTree.d.ts.map +0 -1
- package/dist/components/FileTree.js +0 -47
- package/dist/components/FileTree.js.map +0 -1
- package/dist/components/ResourceSelectInput.d.ts +0 -4
- package/dist/components/ResourceSelectInput.d.ts.map +0 -1
- package/dist/components/ResourceSelectInput.js +0 -7
- package/dist/components/ResourceSelectInput.js.map +0 -1
- package/dist/components/ResourceTable.d.ts +0 -4
- package/dist/components/ResourceTable.d.ts.map +0 -1
- package/dist/components/ResourceTable.js +0 -18
- package/dist/components/ResourceTable.js.map +0 -1
- package/dist/components/TabBar.d.ts +0 -4
- package/dist/components/TabBar.d.ts.map +0 -1
- package/dist/components/TabBar.js +0 -17
- package/dist/components/TabBar.js.map +0 -1
- package/dist/components/Tooltip.d.ts +0 -12
- package/dist/components/Tooltip.d.ts.map +0 -1
- package/dist/components/Tooltip.js +0 -12
- package/dist/components/Tooltip.js.map +0 -1
- package/dist/components/index.d.ts +0 -8
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/config/platform-standards.d.ts +0 -159
- package/dist/config/platform-standards.d.ts.map +0 -1
- package/dist/config/platform-standards.js +0 -181
- package/dist/config/platform-standards.js.map +0 -1
- package/dist/generator/extension-fetch.d.ts +0 -25
- package/dist/generator/extension-fetch.d.ts.map +0 -1
- package/dist/generator/extension-fetch.js +0 -252
- package/dist/generator/extension-fetch.js.map +0 -1
- package/dist/generator/template-engine.d.ts +0 -61
- package/dist/generator/template-engine.d.ts.map +0 -1
- package/dist/generator/template-engine.js +0 -557
- package/dist/generator/template-engine.js.map +0 -1
- package/dist/index.d.ts +0 -11
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -11
- package/dist/index.js.map +0 -1
- package/dist/types/index.d.ts +0 -255
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -17
- package/dist/types/index.js.map +0 -1
- package/dist/utils/cache.d.ts +0 -19
- package/dist/utils/cache.d.ts.map +0 -1
- package/dist/utils/cache.js +0 -64
- package/dist/utils/cache.js.map +0 -1
- package/dist/utils/command-helpers.d.ts +0 -17
- package/dist/utils/command-helpers.d.ts.map +0 -1
- package/dist/utils/command-helpers.js +0 -41
- package/dist/utils/command-helpers.js.map +0 -1
- package/dist/utils/constants.d.ts +0 -52
- package/dist/utils/constants.d.ts.map +0 -1
- package/dist/utils/constants.js +0 -112
- package/dist/utils/constants.js.map +0 -1
- package/dist/utils/discovery-context.d.ts +0 -4
- package/dist/utils/discovery-context.d.ts.map +0 -1
- package/dist/utils/discovery-context.js +0 -39
- package/dist/utils/discovery-context.js.map +0 -1
- package/dist/utils/docker.d.ts +0 -4
- package/dist/utils/docker.d.ts.map +0 -1
- package/dist/utils/docker.js +0 -19
- package/dist/utils/docker.js.map +0 -1
- package/dist/utils/doctor-runtime.d.ts +0 -66
- package/dist/utils/doctor-runtime.d.ts.map +0 -1
- package/dist/utils/doctor-runtime.js +0 -469
- package/dist/utils/doctor-runtime.js.map +0 -1
- package/dist/utils/env-validator.d.ts +0 -15
- package/dist/utils/env-validator.d.ts.map +0 -1
- package/dist/utils/env-validator.js +0 -109
- package/dist/utils/env-validator.js.map +0 -1
- package/dist/utils/errors.d.ts +0 -31
- package/dist/utils/errors.d.ts.map +0 -1
- package/dist/utils/errors.js +0 -140
- package/dist/utils/errors.js.map +0 -1
- package/dist/utils/file-helpers.d.ts +0 -14
- package/dist/utils/file-helpers.d.ts.map +0 -1
- package/dist/utils/file-helpers.js +0 -45
- package/dist/utils/file-helpers.js.map +0 -1
- package/dist/utils/formatting.d.ts +0 -30
- package/dist/utils/formatting.d.ts.map +0 -1
- package/dist/utils/formatting.js +0 -164
- package/dist/utils/formatting.js.map +0 -1
- package/dist/utils/paths.d.ts +0 -3
- package/dist/utils/paths.d.ts.map +0 -1
- package/dist/utils/paths.js +0 -41
- package/dist/utils/paths.js.map +0 -1
- package/dist/utils/port-assignment.d.ts +0 -6
- package/dist/utils/port-assignment.d.ts.map +0 -1
- package/dist/utils/port-assignment.js +0 -81
- package/dist/utils/port-assignment.js.map +0 -1
- package/dist/utils/project-features.d.ts +0 -23
- package/dist/utils/project-features.d.ts.map +0 -1
- package/dist/utils/project-features.js +0 -98
- package/dist/utils/project-features.js.map +0 -1
- package/dist/utils/project-templates.d.ts +0 -7
- package/dist/utils/project-templates.d.ts.map +0 -1
- package/dist/utils/project-templates.js +0 -24
- package/dist/utils/project-templates.js.map +0 -1
- package/dist/utils/prompt.d.ts +0 -28
- package/dist/utils/prompt.d.ts.map +0 -1
- package/dist/utils/prompt.js +0 -79
- package/dist/utils/prompt.js.map +0 -1
- package/dist/utils/resource-features.d.ts +0 -29
- package/dist/utils/resource-features.d.ts.map +0 -1
- package/dist/utils/resource-features.js +0 -171
- package/dist/utils/resource-features.js.map +0 -1
- package/dist/utils/service-urls.d.ts +0 -30
- package/dist/utils/service-urls.d.ts.map +0 -1
- package/dist/utils/service-urls.js +0 -93
- package/dist/utils/service-urls.js.map +0 -1
- package/dist/utils/services.d.ts +0 -18
- package/dist/utils/services.d.ts.map +0 -1
- package/dist/utils/services.js +0 -291
- package/dist/utils/services.js.map +0 -1
- package/dist/utils/stack-features.d.ts +0 -22
- package/dist/utils/stack-features.d.ts.map +0 -1
- package/dist/utils/stack-features.js +0 -13
- package/dist/utils/stack-features.js.map +0 -1
- package/dist/utils/tar.d.ts +0 -7
- package/dist/utils/tar.d.ts.map +0 -1
- package/dist/utils/tar.js +0 -21
- package/dist/utils/tar.js.map +0 -1
- package/dist/utils/tilt.d.ts +0 -19
- package/dist/utils/tilt.d.ts.map +0 -1
- package/dist/utils/tilt.js +0 -78
- package/dist/utils/tilt.js.map +0 -1
- package/dist/utils/validation.d.ts +0 -16
- package/dist/utils/validation.d.ts.map +0 -1
- package/dist/utils/validation.js +0 -58
- package/dist/utils/validation.js.map +0 -1
- /package/{README.md → cli/README.md} +0 -0
- /package/{bin → cli/bin}/tdk.js +0 -0
- /package/{templates → cli/templates}/.tiltignore.hbs +0 -0
- /package/{templates → cli/templates}/TILT_RESOURCE_DEFAULTS.star.hbs +0 -0
- /package/{templates → cli/templates}/TILT_TECH_STACK.star.hbs +0 -0
- /package/{templates → cli/templates}/spec.master.hbs +0 -0
package/install.sh
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# TDK CLI Install Script
|
|
3
|
+
# Install the Tilt Development Kit CLI
|
|
4
|
+
# Usage: curl -fsSL https://raw.githubusercontent.com/tdk-landscape/tdk-cli-core/main/install.sh | bash
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
# Colors
|
|
9
|
+
RED='\033[0;31m'
|
|
10
|
+
GREEN='\033[0;32m'
|
|
11
|
+
YELLOW='\033[1;33m'
|
|
12
|
+
BLUE='\033[0;34m'
|
|
13
|
+
NC='\033[0m' # No Color
|
|
14
|
+
|
|
15
|
+
# Configuration
|
|
16
|
+
REPO_URL="https://github.com/tdk-landscape/tdk-cli-core.git"
|
|
17
|
+
INSTALL_DIR="${HOME}/.tdk"
|
|
18
|
+
BIN_DIR="${HOME}/.bun/bin"
|
|
19
|
+
|
|
20
|
+
# Print functions
|
|
21
|
+
print_info() {
|
|
22
|
+
echo -e "${BLUE}ℹ️ $1${NC}"
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
print_success() {
|
|
26
|
+
echo -e "${GREEN}✅ $1${NC}"
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
print_warning() {
|
|
30
|
+
echo -e "${YELLOW}⚠️ $1${NC}"
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
print_error() {
|
|
34
|
+
echo -e "${RED}❌ $1${NC}"
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
# Check if command exists
|
|
38
|
+
command_exists() {
|
|
39
|
+
command -v "$1" >/dev/null 2>&1
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
# Detect OS
|
|
43
|
+
detect_os() {
|
|
44
|
+
case "$(uname -s)" in
|
|
45
|
+
Linux*) echo "linux";;
|
|
46
|
+
Darwin*) echo "macos";;
|
|
47
|
+
CYGWIN*) echo "windows";;
|
|
48
|
+
MINGW*) echo "windows";;
|
|
49
|
+
MSYS*) echo "windows";;
|
|
50
|
+
*) echo "unknown";;
|
|
51
|
+
esac
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
# Check prerequisites
|
|
55
|
+
check_prerequisites() {
|
|
56
|
+
print_info "Checking prerequisites..."
|
|
57
|
+
|
|
58
|
+
OS=$(detect_os)
|
|
59
|
+
print_info "Detected OS: $OS"
|
|
60
|
+
|
|
61
|
+
# Check for git
|
|
62
|
+
if ! command_exists git; then
|
|
63
|
+
print_error "git is required but not installed."
|
|
64
|
+
echo "Please install git first:"
|
|
65
|
+
echo " macOS: brew install git"
|
|
66
|
+
echo " Linux: sudo apt-get install git (or your package manager)"
|
|
67
|
+
exit 1
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
# Check for a JavaScript runtime (bun or node)
|
|
71
|
+
if command_exists bun; then
|
|
72
|
+
RUNTIME="bun"
|
|
73
|
+
print_success "Found bun runtime"
|
|
74
|
+
elif command_exists node; then
|
|
75
|
+
RUNTIME="node"
|
|
76
|
+
print_success "Found node runtime"
|
|
77
|
+
|
|
78
|
+
# Check for npm
|
|
79
|
+
if ! command_exists npm; then
|
|
80
|
+
print_error "npm is required with node but not found"
|
|
81
|
+
exit 1
|
|
82
|
+
fi
|
|
83
|
+
else
|
|
84
|
+
print_warning "No JavaScript runtime found (bun or node)"
|
|
85
|
+
echo ""
|
|
86
|
+
echo "Would you like to install Bun? (Recommended - much faster)"
|
|
87
|
+
echo " curl -fsSL https://bun.sh/install | bash"
|
|
88
|
+
echo ""
|
|
89
|
+
read -p "Install Bun now? [Y/n] " -n 1 -r
|
|
90
|
+
echo
|
|
91
|
+
if [[ $REPLY =~ ^[Yy]$ ]] || [[ -z $REPLY ]]; then
|
|
92
|
+
print_info "Installing Bun..."
|
|
93
|
+
curl -fsSL https://bun.sh/install | bash
|
|
94
|
+
|
|
95
|
+
# Source bun setup
|
|
96
|
+
if [ -f "${HOME}/.bashrc" ]; then
|
|
97
|
+
export BUN_INSTALL="${HOME}/.bun"
|
|
98
|
+
export PATH="${BUN_INSTALL}/bin:$PATH"
|
|
99
|
+
fi
|
|
100
|
+
|
|
101
|
+
if command_exists bun; then
|
|
102
|
+
RUNTIME="bun"
|
|
103
|
+
print_success "Bun installed successfully"
|
|
104
|
+
else
|
|
105
|
+
print_error "Bun installation failed or not in PATH"
|
|
106
|
+
print_info "Please restart your terminal and run this script again"
|
|
107
|
+
exit 1
|
|
108
|
+
fi
|
|
109
|
+
else
|
|
110
|
+
print_error "Bun or Node.js is required to install TDK"
|
|
111
|
+
exit 1
|
|
112
|
+
fi
|
|
113
|
+
fi
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
# Setup directories
|
|
117
|
+
setup_directories() {
|
|
118
|
+
print_info "Setting up directories..."
|
|
119
|
+
|
|
120
|
+
mkdir -p "$INSTALL_DIR"
|
|
121
|
+
mkdir -p "$BIN_DIR"
|
|
122
|
+
|
|
123
|
+
print_success "Directories created"
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
# Clone or update repository
|
|
127
|
+
clone_repository() {
|
|
128
|
+
print_info "Cloning TDK CLI repository..."
|
|
129
|
+
|
|
130
|
+
if [ -d "${INSTALL_DIR}/tdk-cli" ]; then
|
|
131
|
+
print_warning "Existing installation found, updating..."
|
|
132
|
+
cd "${INSTALL_DIR}/tdk-cli"
|
|
133
|
+
git fetch origin
|
|
134
|
+
git reset --hard origin/main
|
|
135
|
+
else
|
|
136
|
+
git clone --depth 1 "$REPO_URL" "${INSTALL_DIR}/tdk-cli"
|
|
137
|
+
cd "${INSTALL_DIR}/tdk-cli"
|
|
138
|
+
fi
|
|
139
|
+
|
|
140
|
+
print_success "Repository cloned/updated"
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
# Install dependencies and link
|
|
144
|
+
install_and_link() {
|
|
145
|
+
print_info "Installing dependencies..."
|
|
146
|
+
|
|
147
|
+
cd "${INSTALL_DIR}/tdk-cli/cli"
|
|
148
|
+
|
|
149
|
+
if [ "$RUNTIME" = "bun" ]; then
|
|
150
|
+
bun install
|
|
151
|
+
print_success "Dependencies installed with bun"
|
|
152
|
+
|
|
153
|
+
print_info "Linking TDK CLI..."
|
|
154
|
+
bun link --force
|
|
155
|
+
print_success "TDK CLI linked globally"
|
|
156
|
+
else
|
|
157
|
+
npm install
|
|
158
|
+
print_success "Dependencies installed with npm"
|
|
159
|
+
|
|
160
|
+
print_info "Linking TDK CLI..."
|
|
161
|
+
npm link --force
|
|
162
|
+
print_success "TDK CLI linked globally"
|
|
163
|
+
fi
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
# Setup PATH
|
|
167
|
+
setup_path() {
|
|
168
|
+
print_info "Setting up PATH..."
|
|
169
|
+
|
|
170
|
+
SHELL_CONFIG=""
|
|
171
|
+
if [ -f "${HOME}/.zshrc" ]; then
|
|
172
|
+
SHELL_CONFIG="${HOME}/.zshrc"
|
|
173
|
+
elif [ -f "${HOME}/.bashrc" ]; then
|
|
174
|
+
SHELL_CONFIG="${HOME}/.bashrc"
|
|
175
|
+
elif [ -f "${HOME}/.bash_profile" ]; then
|
|
176
|
+
SHELL_CONFIG="${HOME}/.bash_profile"
|
|
177
|
+
fi
|
|
178
|
+
|
|
179
|
+
if [ -n "$SHELL_CONFIG" ]; then
|
|
180
|
+
if ! grep -q "\.bun/bin" "$SHELL_CONFIG" 2>/dev/null; then
|
|
181
|
+
echo "" >> "$SHELL_CONFIG"
|
|
182
|
+
echo "# TDK CLI (installed via install.sh)" >> "$SHELL_CONFIG"
|
|
183
|
+
echo 'export PATH="${HOME}/.bun/bin:${PATH}"' >> "$SHELL_CONFIG"
|
|
184
|
+
print_success "Added ~/.bun/bin to PATH in $(basename "$SHELL_CONFIG")"
|
|
185
|
+
print_warning "Please restart your terminal or run: source $SHELL_CONFIG"
|
|
186
|
+
else
|
|
187
|
+
print_info "PATH already configured in $(basename "$SHELL_CONFIG")"
|
|
188
|
+
fi
|
|
189
|
+
else
|
|
190
|
+
print_warning "Could not detect shell config file"
|
|
191
|
+
print_info "Please manually add to your shell config:"
|
|
192
|
+
echo 'export PATH="${HOME}/.bun/bin:${PATH}"'
|
|
193
|
+
fi
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
# Verify installation
|
|
197
|
+
verify_installation() {
|
|
198
|
+
print_info "Verifying installation..."
|
|
199
|
+
|
|
200
|
+
export PATH="${BIN_DIR}:${PATH}"
|
|
201
|
+
|
|
202
|
+
if command_exists tdk; then
|
|
203
|
+
VERSION=$(tdk -v 2>/dev/null || echo "unknown")
|
|
204
|
+
print_success "TDK CLI installed successfully!"
|
|
205
|
+
echo ""
|
|
206
|
+
echo "Version: $VERSION"
|
|
207
|
+
echo "Location: $(which tdk)"
|
|
208
|
+
echo ""
|
|
209
|
+
echo "Quick start:"
|
|
210
|
+
echo " tdk --help # Show all commands"
|
|
211
|
+
echo " tdk project # Initialize a new project"
|
|
212
|
+
echo " tdk resource api # Create a new resource"
|
|
213
|
+
echo ""
|
|
214
|
+
print_info "Happy coding! 🚀"
|
|
215
|
+
else
|
|
216
|
+
print_error "Installation verification failed"
|
|
217
|
+
print_info "tdk command not found in PATH"
|
|
218
|
+
print_info "You may need to restart your terminal or run:"
|
|
219
|
+
echo " export PATH=\"${HOME}/.bun/bin:\${PATH}\""
|
|
220
|
+
exit 1
|
|
221
|
+
fi
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
# Main installation flow
|
|
225
|
+
main() {
|
|
226
|
+
echo ""
|
|
227
|
+
echo "╔════════════════════════════════════════════════════════════╗"
|
|
228
|
+
echo "║ 🚀 TDK CLI Installer ║"
|
|
229
|
+
echo "║ Tilt Development Kit - Install Script ║"
|
|
230
|
+
echo "╚════════════════════════════════════════════════════════════╝"
|
|
231
|
+
echo ""
|
|
232
|
+
|
|
233
|
+
check_prerequisites
|
|
234
|
+
setup_directories
|
|
235
|
+
clone_repository
|
|
236
|
+
install_and_link
|
|
237
|
+
setup_path
|
|
238
|
+
verify_installation
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
# Run main function
|
|
242
|
+
main "$@"
|
package/knip.json
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
## Context
|
|
2
|
+
|
|
3
|
+
TDK CLI manages local microservice development through project, stack, resource, doctor, status, and Tilt-oriented commands. The current developer workflow is terminal-heavy: developers run commands manually, inspect logs across tools, and infer root causes from mixed CLI, Docker, Bun, Tilt, port, and config output.
|
|
4
|
+
|
|
5
|
+
The MVP introduces a VS Code-only extension in a new repository/package at `/private/var/www/2025/ollamar1/tdk-vscode-extension` that treats the TDK CLI as the operational backend. The extension should not fork orchestration logic from the CLI. It should call the CLI, parse structured output where available, preserve raw output for debugging, and present a focused editor-native workflow for orchestration and troubleshooting.
|
|
6
|
+
|
|
7
|
+
Stakeholders are TDK CLI maintainers, developers using TDK-managed repositories, and maintainers who need failure reports with enough context to debug quickly.
|
|
8
|
+
|
|
9
|
+
## Goals / Non-Goals
|
|
10
|
+
|
|
11
|
+
**Goals:**
|
|
12
|
+
|
|
13
|
+
- Provide a VS Code extension MVP that can be developed and versioned separately from the CLI.
|
|
14
|
+
- Deliver a runnable one-shot implementation with scaffold, source code, tests, documentation, and a verification record.
|
|
15
|
+
- Detect TDK projects and expose project, stack, resource, doctor, status, and lifecycle actions from VS Code.
|
|
16
|
+
- Provide a real troubleshooting flow that classifies failures, shows likely causes, links evidence, and offers safe next actions.
|
|
17
|
+
- Manage notifications so background monitoring is useful without becoming noisy.
|
|
18
|
+
- Document CLI JSON/status output gaps as follow-up work without changing the TDK CLI during this MVP.
|
|
19
|
+
- Include a spec critique and final requirement trace before implementation is considered complete.
|
|
20
|
+
|
|
21
|
+
**Non-Goals:**
|
|
22
|
+
|
|
23
|
+
- Support JetBrains, Vim, browser IDEs, or a standalone Electron IDE in the MVP.
|
|
24
|
+
- Replace the Tilt UI or reimplement Tilt orchestration.
|
|
25
|
+
- Automatically run destructive or state-changing repairs without explicit user confirmation.
|
|
26
|
+
- Build a full AI assistant or free-form chat interface in the first release.
|
|
27
|
+
- Add remote/team dashboard features, cloud sync, or marketplace publishing automation in the MVP.
|
|
28
|
+
- Modify the TDK CLI command contract in the MVP.
|
|
29
|
+
|
|
30
|
+
## Decisions
|
|
31
|
+
|
|
32
|
+
1. Create a new extension repo/package at `/private/var/www/2025/ollamar1/tdk-vscode-extension`.
|
|
33
|
+
|
|
34
|
+
Rationale: VS Code extension packaging, activation lifecycle, tests, and release cadence differ from the CLI. A separate package keeps the CLI focused and allows extension-specific dependencies such as `@types/vscode`, `vsce`, and VS Code test harnesses.
|
|
35
|
+
|
|
36
|
+
Alternative considered: place the extension under `tdk-cli-core/ext`. That is quicker initially, but it risks coupling extension release mechanics to CLI internals and makes it harder to ship independently. For one-shot implementation, the location is fixed to avoid blocking on repository placement.
|
|
37
|
+
|
|
38
|
+
2. Use the TDK CLI as the source of truth.
|
|
39
|
+
|
|
40
|
+
Rationale: The extension should orchestrate and troubleshoot through commands such as `tdk doctor`, `tdk status`, `tdk stacks`, `tdk resources`, `tdk up`, and `tdk down`. This avoids two implementations of project discovery, stack/resource state, and health logic.
|
|
41
|
+
|
|
42
|
+
Alternative considered: read config files and Tilt state directly from the extension. That may be needed for display hints, but it must not become the primary orchestration model.
|
|
43
|
+
|
|
44
|
+
One-shot constraint: do not modify the CLI during the MVP. If structured output is incomplete, implement resilient adapters that keep raw output available and document the missing CLI contract in `docs/cli-contract-gaps.md`.
|
|
45
|
+
|
|
46
|
+
3. Introduce a command runner boundary.
|
|
47
|
+
|
|
48
|
+
Rationale: A typed command runner can capture command, cwd, stdout, stderr, exit code, duration, cancellation, and parsed JSON payloads. This gives orchestration, troubleshooting, tests, and notifications a shared event model.
|
|
49
|
+
|
|
50
|
+
Alternative considered: run commands ad hoc from each UI command. That would make troubleshooting weaker because failures would lack consistent metadata.
|
|
51
|
+
|
|
52
|
+
4. Build troubleshooting as deterministic rules first.
|
|
53
|
+
|
|
54
|
+
Rationale: The MVP needs reliable, reviewable classification for common failures: missing TDK CLI, unsupported CLI version, non-TDK workspace, Docker daemon unavailable, Tilt unavailable, Bun unavailable, occupied ports, invalid or missing master config, invalid service manifest, failed health endpoint, duplicate daemon, and Tilt startup failures.
|
|
55
|
+
|
|
56
|
+
Alternative considered: use an LLM-based troubleshooter first. That would be flashy but harder to test and risky for repair suggestions. LLM assistance can be considered later once deterministic evidence capture is solid.
|
|
57
|
+
|
|
58
|
+
5. Use quiet-by-default notification policy.
|
|
59
|
+
|
|
60
|
+
Rationale: Background status checks can easily become spam. The extension should deduplicate repeated failures, escalate only when state changes or user action is required, and let users tune categories such as doctor failures, stack failures, and repair completion.
|
|
61
|
+
|
|
62
|
+
Alternative considered: notify on every failed poll. That is easier, but it teaches users to ignore the extension.
|
|
63
|
+
|
|
64
|
+
6. Keep repair actions explicit and safe.
|
|
65
|
+
|
|
66
|
+
Rationale: Troubleshooting can recommend actions such as opening logs, rerunning doctor, starting Docker docs, freeing a port guide, regenerating configs, or running a specific TDK command. Any command that changes project files, starts/stops services, prunes Docker, or modifies config must require explicit confirmation and show the exact command.
|
|
67
|
+
|
|
68
|
+
Alternative considered: one-click auto-fix for every known issue. That is too risky for an MVP in developer workspaces.
|
|
69
|
+
|
|
70
|
+
7. Ship three concrete VS Code surfaces.
|
|
71
|
+
|
|
72
|
+
Rationale: A one-shot MVP needs enough UI to prove value without becoming a full IDE. The required surfaces are a TDK Explorer tree, a Troubleshooter view, and a TDK output channel. Commands can be exposed through command palette and tree actions.
|
|
73
|
+
|
|
74
|
+
Alternative considered: command palette only. That is faster, but too weak to satisfy the orchestration and notification requirements.
|
|
75
|
+
|
|
76
|
+
## Risks / Trade-offs
|
|
77
|
+
|
|
78
|
+
- CLI output is not structured enough for robust parsing -> Use conservative parsing and mocked adapters for tests, preserve raw output, and document gaps for a later CLI change.
|
|
79
|
+
- Extension becomes a thin command palette wrapper -> Require project tree views, status surfaces, troubleshooter evidence, and notification policy as MVP acceptance criteria.
|
|
80
|
+
- Troubleshooter over-promises root cause accuracy -> Display confidence, evidence, and next safe step rather than pretending every issue has a single guaranteed cause.
|
|
81
|
+
- Notifications become noisy -> Deduplicate by issue fingerprint, workspace, resource, severity, and state transition.
|
|
82
|
+
- New repo setup slows the first implementation -> Generate a minimal VS Code TypeScript extension scaffold with focused tests before expanding UI.
|
|
83
|
+
- Repair actions could damage local state -> Require confirmation for all state-changing actions and block destructive commands from automatic execution.
|
|
84
|
+
|
|
85
|
+
## Migration Plan
|
|
86
|
+
|
|
87
|
+
1. Scaffold `/private/var/www/2025/ollamar1/tdk-vscode-extension` with TypeScript, VS Code engine constraints, test harness, linting, and basic activation.
|
|
88
|
+
2. Implement the command runner and workspace detector against the installed or workspace-local TDK CLI.
|
|
89
|
+
3. Add orchestration commands and tree/status views for projects, stacks, and resources.
|
|
90
|
+
4. Add deterministic diagnostic rules and the troubleshooter webview/tree/detail UI.
|
|
91
|
+
5. Add notification policy, deduplication, and user settings.
|
|
92
|
+
6. Document missing CLI structured-output gaps without changing the CLI.
|
|
93
|
+
7. Run spec critique, implementation review, automated tests, and manual VS Code smoke tests.
|
|
94
|
+
|
|
95
|
+
Rollback is simple for the MVP: disable or uninstall the VS Code extension. Follow-up CLI structured-output improvements, if implemented after this MVP, must be additive and preserve existing command behavior.
|
|
96
|
+
|
|
97
|
+
## Fixed MVP Answers
|
|
98
|
+
|
|
99
|
+
- Repository path: `/private/var/www/2025/ollamar1/tdk-vscode-extension`.
|
|
100
|
+
- Minimum CLI version: detect and display the installed CLI version when available; do not enforce a minimum version in the MVP unless the CLI command is missing.
|
|
101
|
+
- Repair actions: support command suggestions and confirmed command execution for safe, explicit commands only.
|
|
102
|
+
- Notification history: use VS Code native notifications plus the Troubleshooter view as the persistent issue history.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
## Why
|
|
2
|
+
|
|
3
|
+
TDK CLI already provides project, stack, resource, health, and Tilt orchestration commands, but developers still have to leave the editor to understand what is running, why something failed, and what to do next. A VS Code-only plugin can turn the CLI into an operational cockpit with guided troubleshooting, clearer failure notifications, and one-click orchestration for the common local development loop.
|
|
4
|
+
|
|
5
|
+
## What Changes
|
|
6
|
+
|
|
7
|
+
- Create a new VS Code extension repository/package at `/private/var/www/2025/ollamar1/tdk-vscode-extension` for a TDK IDE plugin instead of embedding extension code in the CLI package.
|
|
8
|
+
- Add VS Code commands and panels for TDK project detection, stack/resource orchestration, status inspection, logs, and doctor checks.
|
|
9
|
+
- Add a real troubleshooter that classifies common TDK/Tilt/Docker/Bun/port/config failures, explains likely causes, and offers safe, explicit repair actions.
|
|
10
|
+
- Add notification management so normal background polling remains quiet, while actionable failures surface with deduplicated severity, context, and next steps.
|
|
11
|
+
- Add an implementation review workflow that validates the shipped extension against every requirement and records critique findings before the one-shot MVP is considered done.
|
|
12
|
+
|
|
13
|
+
## Capabilities
|
|
14
|
+
|
|
15
|
+
### New Capabilities
|
|
16
|
+
|
|
17
|
+
- `vscode-tdk-orchestration`: VS Code extension behavior for detecting TDK projects and orchestrating project, stack, and resource actions through the TDK CLI.
|
|
18
|
+
- `vscode-tdk-troubleshooting`: Diagnostic and remediation behavior for identifying common local development failures and presenting safe recovery actions.
|
|
19
|
+
- `vscode-tdk-notifications`: Notification policy behavior for quiet background monitoring, actionable alerts, deduplication, and user-controlled notification preferences.
|
|
20
|
+
|
|
21
|
+
### Modified Capabilities
|
|
22
|
+
|
|
23
|
+
- None.
|
|
24
|
+
|
|
25
|
+
## Impact
|
|
26
|
+
|
|
27
|
+
- Adds a new VS Code extension repo/package at `/private/var/www/2025/ollamar1/tdk-vscode-extension`.
|
|
28
|
+
- Uses the existing TDK CLI as the source of truth for project status, orchestration, health checks, and remediation commands.
|
|
29
|
+
- The one-shot MVP MUST NOT require changing the TDK CLI. If structured CLI output is missing, the extension must use mocked adapters in tests and conservative raw-output parsing at runtime, then document follow-up CLI improvements.
|
|
30
|
+
- Adds extension tests, command-runner tests, diagnostic classifier tests, and manual VS Code extension smoke testing.
|
|
31
|
+
- Does not change the CLI command contract for existing users in the MVP.
|
package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/specs/vscode-tdk-notifications/spec.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
## ADDED Requirements
|
|
2
|
+
|
|
3
|
+
### Requirement: Notifications are quiet by default
|
|
4
|
+
The extension SHALL avoid user-visible notifications for successful background polling and unchanged non-actionable states.
|
|
5
|
+
|
|
6
|
+
#### Scenario: Background poll succeeds
|
|
7
|
+
- **WHEN** a background status or health poll succeeds
|
|
8
|
+
- **THEN** the extension updates internal state without showing a user-visible notification
|
|
9
|
+
|
|
10
|
+
#### Scenario: Existing issue remains unchanged
|
|
11
|
+
- **WHEN** a background poll observes an already-reported issue with the same fingerprint and severity
|
|
12
|
+
- **THEN** the extension suppresses duplicate user-visible notifications
|
|
13
|
+
|
|
14
|
+
### Requirement: Actionable failures notify the user
|
|
15
|
+
The extension SHALL notify the user when a new or escalated issue requires attention.
|
|
16
|
+
|
|
17
|
+
#### Scenario: New critical issue
|
|
18
|
+
- **WHEN** a new critical TDK, Tilt, Docker, Bun, port, or configuration issue is detected
|
|
19
|
+
- **THEN** the extension shows a notification with a concise summary and an action to open troubleshooting details
|
|
20
|
+
|
|
21
|
+
#### Scenario: Issue severity escalates
|
|
22
|
+
- **WHEN** a known issue changes to a higher severity
|
|
23
|
+
- **THEN** the extension shows a new notification for the escalation
|
|
24
|
+
|
|
25
|
+
### Requirement: Notifications are user configurable
|
|
26
|
+
The extension SHALL provide settings that allow users to control notification categories and quiet behavior.
|
|
27
|
+
|
|
28
|
+
#### Scenario: User disables stack failure notifications
|
|
29
|
+
- **WHEN** stack failure notifications are disabled in settings
|
|
30
|
+
- **THEN** the extension records stack failures in the troubleshooting view without showing user-visible stack failure notifications
|
|
31
|
+
|
|
32
|
+
#### Scenario: User keeps critical notifications enabled
|
|
33
|
+
- **WHEN** critical notifications are enabled
|
|
34
|
+
- **THEN** the extension continues to notify for critical new or escalated issues
|
|
35
|
+
|
|
36
|
+
### Requirement: Notification actions route to context
|
|
37
|
+
The extension SHALL route notification actions to the relevant stack, resource, command output, or troubleshooting issue.
|
|
38
|
+
|
|
39
|
+
#### Scenario: User opens issue from notification
|
|
40
|
+
- **WHEN** the user selects the notification action to inspect an issue
|
|
41
|
+
- **THEN** the extension opens the troubleshooting detail for the issue that triggered the notification
|
|
42
|
+
|
|
43
|
+
### Requirement: Troubleshooter acts as notification history
|
|
44
|
+
The extension SHALL retain actionable notification issues in the Troubleshooter view so users can revisit them after dismissing native VS Code notifications.
|
|
45
|
+
|
|
46
|
+
#### Scenario: User dismisses notification
|
|
47
|
+
- **WHEN** the user dismisses a native VS Code notification for an actionable issue
|
|
48
|
+
- **THEN** the issue remains available in the Troubleshooter view until resolved or superseded
|
package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/specs/vscode-tdk-orchestration/spec.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
## ADDED Requirements
|
|
2
|
+
|
|
3
|
+
### Requirement: VS Code extension detects TDK workspaces
|
|
4
|
+
The extension SHALL detect whether the active VS Code workspace contains a TDK project before enabling orchestration actions.
|
|
5
|
+
|
|
6
|
+
#### Scenario: TDK project detected
|
|
7
|
+
- **WHEN** a workspace contains TDK project configuration or a valid TDK CLI project root
|
|
8
|
+
- **THEN** the extension enables TDK views and commands for that workspace
|
|
9
|
+
|
|
10
|
+
#### Scenario: Non-TDK workspace
|
|
11
|
+
- **WHEN** a workspace does not contain a TDK project
|
|
12
|
+
- **THEN** the extension shows a non-blocking empty state and keeps orchestration actions disabled
|
|
13
|
+
|
|
14
|
+
### Requirement: Extension is delivered as a new package
|
|
15
|
+
The extension SHALL be implemented as a new VS Code extension package at `/private/var/www/2025/ollamar1/tdk-vscode-extension`.
|
|
16
|
+
|
|
17
|
+
#### Scenario: One-shot implementation starts
|
|
18
|
+
- **WHEN** implementation begins
|
|
19
|
+
- **THEN** the extension package is scaffolded outside `tdk-cli-core` at `/private/var/www/2025/ollamar1/tdk-vscode-extension`
|
|
20
|
+
|
|
21
|
+
#### Scenario: Extension package is verified
|
|
22
|
+
- **WHEN** the MVP is complete
|
|
23
|
+
- **THEN** the package contains source code, package metadata, tests, documentation, and verification notes
|
|
24
|
+
|
|
25
|
+
### Requirement: Extension runs orchestration through TDK CLI
|
|
26
|
+
The extension SHALL execute project, stack, resource, doctor, status, up, and down actions through the TDK CLI instead of duplicating orchestration logic.
|
|
27
|
+
|
|
28
|
+
#### Scenario: User starts a stack
|
|
29
|
+
- **WHEN** the user starts a stack from VS Code
|
|
30
|
+
- **THEN** the extension runs the corresponding TDK CLI stack lifecycle command in the workspace root and captures the command result
|
|
31
|
+
|
|
32
|
+
#### Scenario: CLI command fails
|
|
33
|
+
- **WHEN** a TDK CLI orchestration command exits with a non-zero status
|
|
34
|
+
- **THEN** the extension preserves stdout, stderr, exit code, command, workspace, and duration for troubleshooting
|
|
35
|
+
|
|
36
|
+
### Requirement: Extension exposes project, stack, and resource status
|
|
37
|
+
The extension SHALL show project, stack, and resource status inside VS Code using TDK CLI status data.
|
|
38
|
+
|
|
39
|
+
#### Scenario: Status refresh succeeds
|
|
40
|
+
- **WHEN** the user refreshes TDK status
|
|
41
|
+
- **THEN** the extension updates the visible project, stack, and resource state from the latest CLI result
|
|
42
|
+
|
|
43
|
+
#### Scenario: Status refresh is cancelled
|
|
44
|
+
- **WHEN** the user cancels an in-progress status refresh
|
|
45
|
+
- **THEN** the extension stops the command and leaves the previous known status visible with a cancellation indication
|
|
46
|
+
|
|
47
|
+
### Requirement: Extension provides required MVP surfaces
|
|
48
|
+
The extension SHALL provide a TDK Explorer view, a Troubleshooter view, and a TDK output channel.
|
|
49
|
+
|
|
50
|
+
#### Scenario: Extension activates in a TDK workspace
|
|
51
|
+
- **WHEN** the extension activates in a detected TDK workspace
|
|
52
|
+
- **THEN** the TDK Explorer, Troubleshooter view, and TDK output channel are available
|
|
53
|
+
|
|
54
|
+
#### Scenario: Command output is produced
|
|
55
|
+
- **WHEN** a TDK command runs through the extension
|
|
56
|
+
- **THEN** the raw command output is appended to the TDK output channel
|
|
57
|
+
|
|
58
|
+
### Requirement: MVP is VS Code only
|
|
59
|
+
The IDE plugin SHALL support VS Code only for the MVP.
|
|
60
|
+
|
|
61
|
+
#### Scenario: Non-VS Code IDE support requested
|
|
62
|
+
- **WHEN** implementation scope is reviewed for the MVP
|
|
63
|
+
- **THEN** JetBrains, Vim, browser IDE, and standalone Electron support are excluded from required delivery
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
## ADDED Requirements
|
|
2
|
+
|
|
3
|
+
### Requirement: Troubleshooter classifies common TDK failures
|
|
4
|
+
The extension SHALL classify common local development failures using deterministic diagnostic rules based on CLI results, environment checks, and captured command evidence.
|
|
5
|
+
|
|
6
|
+
#### Scenario: Missing prerequisite
|
|
7
|
+
- **WHEN** Docker, Tilt, Bun, or the TDK CLI is missing or unavailable
|
|
8
|
+
- **THEN** the troubleshooter identifies the missing prerequisite and presents the evidence that caused the classification
|
|
9
|
+
|
|
10
|
+
#### Scenario: Port conflict
|
|
11
|
+
- **WHEN** a TDK command or doctor result indicates that a required port is occupied
|
|
12
|
+
- **THEN** the troubleshooter identifies the affected port and resource when that information is available
|
|
13
|
+
|
|
14
|
+
#### Scenario: Invalid project configuration
|
|
15
|
+
- **WHEN** TDK project defaults, tech stack config, Tiltfile, or service manifests are missing or invalid
|
|
16
|
+
- **THEN** the troubleshooter identifies the invalid configuration area and links to the relevant file or command output when available
|
|
17
|
+
|
|
18
|
+
#### Scenario: Tilt startup failure
|
|
19
|
+
- **WHEN** a TDK lifecycle command reports a Tilt startup failure
|
|
20
|
+
- **THEN** the troubleshooter identifies the failure as Tilt-related and preserves the relevant command output as evidence
|
|
21
|
+
|
|
22
|
+
### Requirement: Troubleshooter presents likely cause and next action
|
|
23
|
+
The extension SHALL show likely cause, confidence, evidence, and recommended next action for each classified issue.
|
|
24
|
+
|
|
25
|
+
#### Scenario: Classified issue displayed
|
|
26
|
+
- **WHEN** the troubleshooter opens a classified issue
|
|
27
|
+
- **THEN** the issue detail includes severity, likely cause, confidence, evidence, and at least one next action
|
|
28
|
+
|
|
29
|
+
#### Scenario: Unknown issue displayed
|
|
30
|
+
- **WHEN** the troubleshooter cannot classify a failure
|
|
31
|
+
- **THEN** the issue detail shows the raw command evidence and recommends a safe next diagnostic step
|
|
32
|
+
|
|
33
|
+
### Requirement: Repair actions require explicit confirmation
|
|
34
|
+
The extension SHALL require explicit user confirmation before running any repair action that changes files, starts or stops services, prunes resources, or modifies local environment state.
|
|
35
|
+
|
|
36
|
+
#### Scenario: User selects state-changing repair
|
|
37
|
+
- **WHEN** the user selects a repair action that changes local state
|
|
38
|
+
- **THEN** the extension displays the exact command or operation and waits for confirmation before execution
|
|
39
|
+
|
|
40
|
+
#### Scenario: User declines repair
|
|
41
|
+
- **WHEN** the user declines a repair confirmation
|
|
42
|
+
- **THEN** the extension does not run the repair and keeps the troubleshooting issue available
|
|
43
|
+
|
|
44
|
+
### Requirement: Troubleshooter preserves diagnostic context
|
|
45
|
+
The extension SHALL retain recent diagnostic context for failed commands so users can review evidence without rerunning the command immediately.
|
|
46
|
+
|
|
47
|
+
#### Scenario: Failed orchestration command
|
|
48
|
+
- **WHEN** an orchestration command fails
|
|
49
|
+
- **THEN** the troubleshooter records the command metadata, raw output, parsed issue fingerprints, and timestamp
|
|
50
|
+
|
|
51
|
+
### Requirement: CLI contract gaps are documented
|
|
52
|
+
The extension SHALL document any missing or unstable TDK CLI output contract encountered during implementation instead of requiring CLI changes for the MVP.
|
|
53
|
+
|
|
54
|
+
#### Scenario: CLI output cannot be parsed robustly
|
|
55
|
+
- **WHEN** an adapter cannot reliably parse a TDK CLI command output
|
|
56
|
+
- **THEN** the extension keeps raw output available and records the missing structured-output need in CLI contract gap documentation
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
## 1. Scope Review and Repository Setup
|
|
2
|
+
|
|
3
|
+
- [x] 1.1 Create `/private/var/www/2025/ollamar1/tdk-vscode-extension` as the new VS Code-only extension package location.
|
|
4
|
+
- [x] 1.2 Add `docs/spec-critique.md` documenting MVP creep risks, unsafe repair risks, missing CLI contract risks, and how this implementation constrains each one.
|
|
5
|
+
- [x] 1.3 Scaffold a TypeScript VS Code extension package with activation, command registration, test harness, lint/typecheck scripts, packaging metadata, and README.
|
|
6
|
+
- [x] 1.4 Add extension configuration settings for TDK CLI path, polling behavior, notification categories, and safe repair confirmation behavior.
|
|
7
|
+
- [x] 1.5 Add a verification checklist document that maps each spec requirement to implementation and test evidence.
|
|
8
|
+
|
|
9
|
+
## 2. TDK CLI Integration Layer
|
|
10
|
+
|
|
11
|
+
- [x] 2.1 Implement a command runner that captures command, cwd, stdout, stderr, exit code, duration, cancellation, and timestamp.
|
|
12
|
+
- [x] 2.2 Implement TDK CLI discovery with support for configured binary path, workspace-local binary, and PATH fallback.
|
|
13
|
+
- [x] 2.3 Implement workspace detection for TDK project roots and disabled empty-state behavior for non-TDK workspaces.
|
|
14
|
+
- [x] 2.4 Implement typed adapters for `tdk doctor`, `tdk status`, `tdk stacks`, `tdk resources`, `tdk up`, and `tdk down`.
|
|
15
|
+
- [x] 2.5 Add conservative raw-output parsing for adapters where structured JSON is unavailable.
|
|
16
|
+
- [x] 2.6 Document missing structured-output needs in `docs/cli-contract-gaps.md` without modifying the TDK CLI.
|
|
17
|
+
|
|
18
|
+
## 3. VS Code Orchestration UI
|
|
19
|
+
|
|
20
|
+
- [x] 3.1 Add a TDK Explorer tree view for detected project, stacks, resources, and last known status.
|
|
21
|
+
- [x] 3.2 Add commands for refresh status, run doctor, start stack/resource, stop stack/resource, and stop all services.
|
|
22
|
+
- [x] 3.3 Add cancellation support for long-running refresh/doctor/orchestration commands.
|
|
23
|
+
- [x] 3.4 Add a TDK output channel and append every executed command plus raw stdout/stderr.
|
|
24
|
+
- [x] 3.5 Preserve raw command output and surface it from the relevant project, stack, resource, or command result.
|
|
25
|
+
|
|
26
|
+
## 4. Troubleshooter
|
|
27
|
+
|
|
28
|
+
- [x] 4.1 Define diagnostic issue types, severity levels, confidence levels, fingerprints, evidence records, and recommended next-action models.
|
|
29
|
+
- [x] 4.2 Implement deterministic classifiers for missing TDK CLI, unsupported CLI version, non-TDK workspace, Docker unavailable, Tilt unavailable, Bun unavailable, occupied ports, missing/invalid master config, invalid service manifest, failed health endpoint, duplicate daemon, and Tilt startup failure.
|
|
30
|
+
- [x] 4.3 Add a Troubleshooter view that shows issue list, severity, likely cause, confidence, evidence, raw output, and next actions.
|
|
31
|
+
- [x] 4.4 Implement safe repair actions with explicit confirmation and exact command/operation preview for any state-changing action.
|
|
32
|
+
- [x] 4.5 Ensure unknown failures retain raw command evidence and recommend a safe diagnostic next step.
|
|
33
|
+
- [x] 4.6 Keep actionable issues available in the Troubleshooter view after native VS Code notifications are dismissed.
|
|
34
|
+
|
|
35
|
+
## 5. Notification Management
|
|
36
|
+
|
|
37
|
+
- [x] 5.1 Implement quiet-by-default background polling with no notifications for successful checks or unchanged non-actionable states.
|
|
38
|
+
- [x] 5.2 Implement notification deduplication by issue fingerprint, workspace, resource, severity, and state transition.
|
|
39
|
+
- [x] 5.3 Implement notifications for new critical issues, escalations, and completed user-triggered repair actions.
|
|
40
|
+
- [x] 5.4 Route notification actions to the relevant troubleshooting detail, command output, stack, or resource.
|
|
41
|
+
- [x] 5.5 Honor user settings for notification categories and quiet behavior.
|
|
42
|
+
- [x] 5.6 Add tests proving dismissed native notifications do not remove issues from Troubleshooter history.
|
|
43
|
+
|
|
44
|
+
## 6. Tests and Manual Validation
|
|
45
|
+
|
|
46
|
+
- [x] 6.1 Add unit tests for command runner success, failure, cancellation, and output capture.
|
|
47
|
+
- [x] 6.2 Add unit tests for TDK workspace detection and CLI discovery fallbacks.
|
|
48
|
+
- [x] 6.3 Add unit tests for every deterministic diagnostic classifier and unknown-failure fallback.
|
|
49
|
+
- [x] 6.4 Add tests for notification deduplication, escalation, and category suppression.
|
|
50
|
+
- [x] 6.5 Add VS Code extension integration tests for activation, command registration, disabled non-TDK workspace state, and at least one orchestration command using a mocked CLI.
|
|
51
|
+
- [x] 6.6 Add mocked CLI fixtures for success, failure, missing prerequisites, port conflict, invalid config, Tilt startup failure, and unknown failure.
|
|
52
|
+
- [x] 6.7 Run lint, typecheck, unit tests, and VS Code extension tests.
|
|
53
|
+
- [x] 6.8 Package or dry-run package the extension to prove the MVP can be installed locally.
|
|
54
|
+
|
|
55
|
+
## 7. Documentation and Final Review
|
|
56
|
+
|
|
57
|
+
- [x] 7.1 Document MVP usage, settings, supported commands, troubleshooting behavior, notification policy, and safe repair guarantees.
|
|
58
|
+
- [x] 7.2 Document known limitations and follow-up candidates such as richer Tilt links, marketplace publishing, and optional AI-assisted troubleshooting.
|
|
59
|
+
- [x] 7.3 Complete the verification checklist mapping every scenario in the three spec files to source code and test evidence.
|
|
60
|
+
- [x] 7.4 Perform a final critical review of the specs and implementation for overreach, missed failure modes, notification noise, unsafe repair actions, and any gap that blocks one-shot MVP acceptance.
|
|
61
|
+
- [x] 7.5 Record final commands run and results in the verification notes.
|