@devtrack-solution/codesdd 1.2.2 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.sdd/skills/curated/api-clean-flask-langgraph/SKILL.md +17 -17
- package/.sdd/skills/curated/devtrack-api/SKILL.md +160 -28
- package/.sdd/skills/curated/devtrack-api/agents/openai.yaml +1 -1
- package/.sdd/skills/curated/devtrack-api/references/architecture-governance.md +8 -7
- package/.sdd/skills/curated/devtrack-api/references/consumer-sync-policy.md +93 -0
- package/.sdd/skills/curated/devtrack-api/references/contract-pack.yaml +317 -0
- package/.sdd/skills/curated/devtrack-api/references/field-validation-protocol.md +95 -0
- package/.sdd/skills/curated/devtrack-api/references/foundation-layout.md +295 -0
- package/.sdd/skills/curated/devtrack-api/references/implementation-checklist.md +4 -4
- package/.sdd/skills/curated/devtrack-api/references/imports-lint.md +4 -0
- package/.sdd/skills/curated/devtrack-api/references/testing-validation.md +2 -2
- package/LICENSE +1 -1
- package/README.md +243 -51
- package/bin/codesdd.js +3 -2
- package/dist/cli/index.d.ts +2 -2
- package/dist/cli/index.js +11 -558
- package/dist/cli/program.d.ts +14 -0
- package/dist/cli/program.js +645 -0
- package/dist/commands/change.js +5 -5
- package/dist/commands/completion.d.ts +1 -1
- package/dist/commands/completion.js +9 -2
- package/dist/commands/config.js +159 -20
- package/dist/commands/feedback.js +1 -1
- package/dist/commands/schema.d.ts +63 -0
- package/dist/commands/schema.js +12 -12
- package/dist/commands/sdd/backlog.d.ts +3 -0
- package/dist/commands/sdd/backlog.js +54 -0
- package/dist/commands/sdd/execution.js +147 -16
- package/dist/commands/sdd/plugin.d.ts +3 -0
- package/dist/commands/sdd/plugin.js +153 -0
- package/dist/commands/sdd/shared.js +2 -23
- package/dist/commands/sdd/skills.js +7 -0
- package/dist/commands/sdd.js +69 -12
- package/dist/commands/spec.js +9 -9
- package/dist/commands/validate.js +6 -6
- package/dist/commands/workflow/instructions.js +6 -6
- package/dist/commands/workflow/new-change.js +3 -3
- package/dist/commands/workflow/shared.d.ts +1 -1
- package/dist/commands/workflow/shared.js +4 -4
- package/dist/core/archive.js +15 -5
- package/dist/core/artifact-graph/instruction-loader.d.ts +1 -1
- package/dist/core/artifact-graph/instruction-loader.js +3 -3
- package/dist/core/artifact-graph/resolver.d.ts +4 -4
- package/dist/core/artifact-graph/resolver.js +6 -6
- package/dist/core/branding.js +3 -3
- package/dist/core/cli/command-matrix.js +10 -1
- package/dist/core/cli-command-quality.d.ts +27 -0
- package/dist/core/cli-command-quality.js +171 -0
- package/dist/core/command-generation/adapters/costrict.d.ts +1 -1
- package/dist/core/command-generation/adapters/costrict.js +2 -2
- package/dist/core/command-generation/types.d.ts +1 -1
- package/dist/core/completions/command-registry.d.ts +1 -1
- package/dist/core/completions/command-registry.js +155 -12
- package/dist/core/completions/completion-provider.d.ts +14 -1
- package/dist/core/completions/completion-provider.js +29 -1
- package/dist/core/completions/generators/bash-generator.d.ts +1 -1
- package/dist/core/completions/generators/bash-generator.js +20 -12
- package/dist/core/completions/generators/fish-generator.d.ts +9 -1
- package/dist/core/completions/generators/fish-generator.js +39 -25
- package/dist/core/completions/generators/powershell-generator.d.ts +1 -1
- package/dist/core/completions/generators/powershell-generator.js +21 -11
- package/dist/core/completions/generators/zsh-generator.d.ts +3 -6
- package/dist/core/completions/generators/zsh-generator.js +21 -42
- package/dist/core/completions/installers/bash-installer.js +6 -6
- package/dist/core/completions/installers/fish-installer.js +1 -1
- package/dist/core/completions/installers/powershell-installer.js +14 -14
- package/dist/core/completions/installers/zsh-installer.d.ts +7 -1
- package/dist/core/completions/installers/zsh-installer.js +36 -8
- package/dist/core/completions/templates/bash-templates.d.ts +1 -1
- package/dist/core/completions/templates/bash-templates.js +12 -6
- package/dist/core/completions/templates/fish-templates.d.ts +2 -2
- package/dist/core/completions/templates/fish-templates.js +20 -9
- package/dist/core/completions/templates/powershell-templates.d.ts +1 -1
- package/dist/core/completions/templates/powershell-templates.js +13 -4
- package/dist/core/completions/templates/zsh-templates.d.ts +1 -1
- package/dist/core/completions/templates/zsh-templates.js +18 -9
- package/dist/core/config-schema.d.ts +3 -1
- package/dist/core/config-schema.js +26 -1
- package/dist/core/config.d.ts +3 -3
- package/dist/core/config.js +4 -4
- package/dist/core/global-config.d.ts +41 -12
- package/dist/core/global-config.js +344 -27
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +2 -2
- package/dist/core/init.d.ts +6 -1
- package/dist/core/init.js +99 -77
- package/dist/core/legacy-cleanup.d.ts +17 -17
- package/dist/core/legacy-cleanup.js +96 -79
- package/dist/core/list.js +18 -4
- package/dist/core/migration.d.ts +3 -1
- package/dist/core/migration.js +7 -8
- package/dist/core/parsers/change-parser.js +1 -1
- package/dist/core/parsers/markdown-parser.js +2 -2
- package/dist/core/profile-sync-drift.d.ts +1 -1
- package/dist/core/profile-sync-drift.js +13 -13
- package/dist/core/project-config.d.ts +4 -4
- package/dist/core/project-config.js +11 -11
- package/dist/core/schemas/change.schema.d.ts +1 -1
- package/dist/core/schemas/change.schema.js +1 -1
- package/dist/core/schemas/spec.schema.d.ts +1 -1
- package/dist/core/schemas/spec.schema.js +1 -1
- package/dist/core/sdd/adr.js +23 -1
- package/dist/core/sdd/agent-binding.d.ts +346 -0
- package/dist/core/sdd/agent-binding.js +343 -0
- package/dist/core/sdd/backlog-cli.d.ts +16 -0
- package/dist/core/sdd/backlog-cli.js +146 -0
- package/dist/core/sdd/backlog-conflict-policy.d.ts +58 -0
- package/dist/core/sdd/backlog-conflict-policy.js +230 -0
- package/dist/core/sdd/backlog-projection.d.ts +8 -0
- package/dist/core/sdd/backlog-projection.js +89 -0
- package/dist/core/sdd/backlog-provider-contract.d.ts +252 -0
- package/dist/core/sdd/backlog-provider-contract.js +158 -0
- package/dist/core/sdd/bootstrap.js +2 -2
- package/dist/core/sdd/check.d.ts +42 -0
- package/dist/core/sdd/check.js +22 -22
- package/dist/core/sdd/contract.d.ts +13 -0
- package/dist/core/sdd/contract.js +36 -0
- package/dist/core/sdd/coordination/coordination-adapters.d.ts +38 -0
- package/dist/core/sdd/coordination/coordination-adapters.js +139 -1
- package/dist/core/sdd/deepagent-contracts.d.ts +276 -0
- package/dist/core/sdd/deepagent-contracts.js +173 -0
- package/dist/core/sdd/deepagents/adr-governor.d.ts +2 -0
- package/dist/core/sdd/deepagents/adr-governor.js +30 -0
- package/dist/core/sdd/deepagents/backend.d.ts +63 -0
- package/dist/core/sdd/deepagents/backend.js +174 -0
- package/dist/core/sdd/deepagents/codesdd-tools.d.ts +39 -0
- package/dist/core/sdd/deepagents/codesdd-tools.js +83 -0
- package/dist/core/sdd/deepagents/evidence-mapper.d.ts +86 -0
- package/dist/core/sdd/deepagents/evidence-mapper.js +178 -0
- package/dist/core/sdd/deepagents/model-provider.d.ts +53 -0
- package/dist/core/sdd/deepagents/model-provider.js +379 -0
- package/dist/core/sdd/deepagents/policy-enforcement.d.ts +30 -0
- package/dist/core/sdd/deepagents/policy-enforcement.js +90 -0
- package/dist/core/sdd/deepagents/policy.d.ts +75 -0
- package/dist/core/sdd/deepagents/policy.js +358 -0
- package/dist/core/sdd/deepagents/quality-witness.d.ts +3 -0
- package/dist/core/sdd/deepagents/quality-witness.js +77 -0
- package/dist/core/sdd/deepagents/reversa-subagents.d.ts +75 -0
- package/dist/core/sdd/deepagents/reversa-subagents.js +182 -0
- package/dist/core/sdd/deepagents/runtime-factory.d.ts +90 -0
- package/dist/core/sdd/deepagents/runtime-factory.js +231 -0
- package/dist/core/sdd/deepagents/runtime-loader.d.ts +16 -0
- package/dist/core/sdd/deepagents/runtime-loader.js +65 -0
- package/dist/core/sdd/default-bootstrap-files.d.ts +2 -2
- package/dist/core/sdd/default-bootstrap-files.js +36 -2
- package/dist/core/sdd/default-skills.d.ts +30 -0
- package/dist/core/sdd/default-skills.js +181 -5
- package/dist/core/sdd/devtrack-api-appliance.d.ts +84 -0
- package/dist/core/sdd/devtrack-api-appliance.js +257 -0
- package/dist/core/sdd/devtrack-api-architecture.d.ts +31 -0
- package/dist/core/sdd/devtrack-api-architecture.js +608 -0
- package/dist/core/sdd/devtrack-api-import-boundary.d.ts +19 -0
- package/dist/core/sdd/devtrack-api-import-boundary.js +32 -0
- package/dist/core/sdd/diagnose.d.ts +59 -0
- package/dist/core/sdd/diagnose.js +37 -37
- package/dist/core/sdd/docs-sync.js +33 -5
- package/dist/core/sdd/domain/post-active-validation.d.ts +7 -0
- package/dist/core/sdd/domain/post-active-validation.js +61 -0
- package/dist/core/sdd/domain/transition-engine.js +1 -0
- package/dist/core/sdd/entity-reference.d.ts +5 -0
- package/dist/core/sdd/entity-reference.js +22 -0
- package/dist/core/sdd/governance-backfill.d.ts +31 -0
- package/dist/core/sdd/governance-backfill.js +359 -0
- package/dist/core/sdd/governance-parser.d.ts +21 -0
- package/dist/core/sdd/governance-parser.js +91 -0
- package/dist/core/sdd/governance-schemas.d.ts +245 -0
- package/dist/core/sdd/governance-schemas.js +143 -0
- package/dist/core/sdd/{import-openspec.d.ts → import-legacy-spec.d.ts} +7 -7
- package/dist/core/sdd/{import-openspec.js → import-legacy-spec.js} +21 -29
- package/dist/core/sdd/init.d.ts +3 -0
- package/dist/core/sdd/init.js +6 -3
- package/dist/core/sdd/json-schema.js +100 -6
- package/dist/core/sdd/knowledge-graph.d.ts +45 -0
- package/dist/core/sdd/knowledge-graph.js +288 -0
- package/dist/core/sdd/legacy-operations.js +431 -43
- package/dist/core/sdd/lenses.d.ts +1 -0
- package/dist/core/sdd/lenses.js +29 -1
- package/dist/core/sdd/migrate-workspace.js +56 -2
- package/dist/core/sdd/migrate.d.ts +1 -1
- package/dist/core/sdd/migrate.js +36 -2
- package/dist/core/sdd/package-structure-gate.d.ts +83 -0
- package/dist/core/sdd/package-structure-gate.js +362 -0
- package/dist/core/sdd/parallel-feat-automation.d.ts +152 -0
- package/dist/core/sdd/parallel-feat-automation.js +212 -0
- package/dist/core/sdd/plugin-broker.d.ts +558 -0
- package/dist/core/sdd/plugin-broker.js +482 -0
- package/dist/core/sdd/plugin-certification.d.ts +79 -0
- package/dist/core/sdd/plugin-certification.js +453 -0
- package/dist/core/sdd/plugin-cli.d.ts +109 -0
- package/dist/core/sdd/plugin-cli.js +198 -0
- package/dist/core/sdd/plugin-evidence.d.ts +275 -0
- package/dist/core/sdd/plugin-evidence.js +307 -0
- package/dist/core/sdd/plugin-manifest.d.ts +164 -0
- package/dist/core/sdd/plugin-manifest.js +215 -0
- package/dist/core/sdd/plugin-policy-pack.d.ts +88 -0
- package/dist/core/sdd/plugin-policy-pack.js +236 -0
- package/dist/core/sdd/plugin-policy.d.ts +68 -0
- package/dist/core/sdd/plugin-policy.js +212 -0
- package/dist/core/sdd/plugin-registry.d.ts +311 -0
- package/dist/core/sdd/plugin-registry.js +138 -0
- package/dist/core/sdd/plugin-skill-binding.d.ts +151 -0
- package/dist/core/sdd/plugin-skill-binding.js +339 -0
- package/dist/core/sdd/quality-artifact-manifest-validator.d.ts +28 -0
- package/dist/core/sdd/quality-artifact-manifest-validator.js +167 -0
- package/dist/core/sdd/quality-evidence-renderer.d.ts +65 -0
- package/dist/core/sdd/quality-evidence-renderer.js +218 -0
- package/dist/core/sdd/quality-scenario-runner.d.ts +42 -0
- package/dist/core/sdd/quality-scenario-runner.js +613 -0
- package/dist/core/sdd/quality-validation.d.ts +547 -0
- package/dist/core/sdd/quality-validation.js +239 -0
- package/dist/core/sdd/resolve-project-root.d.ts +2 -2
- package/dist/core/sdd/resolve-project-root.js +11 -5
- package/dist/core/sdd/sanitize.d.ts +30 -1
- package/dist/core/sdd/sanitize.js +23 -23
- package/dist/core/sdd/services/agent-run.service.d.ts +65 -0
- package/dist/core/sdd/services/agent-run.service.js +189 -0
- package/dist/core/sdd/services/breakdown.service.js +2 -1
- package/dist/core/sdd/services/context.service.js +18 -16
- package/dist/core/sdd/services/debate.service.js +15 -2
- package/dist/core/sdd/services/feature-lint.service.d.ts +22 -0
- package/dist/core/sdd/services/feature-lint.service.js +105 -5
- package/dist/core/sdd/services/finalize.service.d.ts +80 -0
- package/dist/core/sdd/services/finalize.service.js +323 -24
- package/dist/core/sdd/services/frontend-gap.service.js +22 -7
- package/dist/core/sdd/services/governance-control-plane-runtime-adapters.d.ts +17 -0
- package/dist/core/sdd/services/governance-control-plane-runtime-adapters.js +38 -0
- package/dist/core/sdd/services/governance-control-plane.service.d.ts +66 -0
- package/dist/core/sdd/services/governance-control-plane.service.js +134 -0
- package/dist/core/sdd/services/ingest-deposito.service.js +1 -1
- package/dist/core/sdd/services/legacy-capability.service.d.ts +10 -7
- package/dist/core/sdd/services/legacy-capability.service.js +38 -21
- package/dist/core/sdd/services/mcp-runtime.service.d.ts +123 -8
- package/dist/core/sdd/services/mcp-runtime.service.js +1085 -33
- package/dist/core/sdd/services/onboard.service.js +2 -1
- package/dist/core/sdd/services/rebuild.service.js +6 -1
- package/dist/core/sdd/services/skills-sync.service.d.ts +17 -5
- package/dist/core/sdd/services/skills-sync.service.js +55 -2
- package/dist/core/sdd/services/start.service.js +6 -4
- package/dist/core/sdd/skill-bundles-curation-schema.d.ts +66 -0
- package/dist/core/sdd/skill-bundles-curation-schema.js +52 -0
- package/dist/core/sdd/skill-evidence.d.ts +19 -0
- package/dist/core/sdd/skill-evidence.js +38 -0
- package/dist/core/sdd/skill-policy-pool.d.ts +46 -0
- package/dist/core/sdd/skill-policy-pool.js +185 -0
- package/dist/core/sdd/state.d.ts +22 -0
- package/dist/core/sdd/state.js +66 -41
- package/dist/core/sdd/structural-health.d.ts +42 -42
- package/dist/core/sdd/types.d.ts +33 -7
- package/dist/core/sdd/types.js +17 -0
- package/dist/core/sdd/upgrade-to-codesdd.d.ts +45 -0
- package/dist/core/sdd/upgrade-to-codesdd.js +179 -0
- package/dist/core/sdd/workspace-schemas.d.ts +285 -14
- package/dist/core/sdd/workspace-schemas.js +148 -0
- package/dist/core/sdd/write-manifest.js +22 -4
- package/dist/core/shared/skill-generation.d.ts +1 -1
- package/dist/core/shared/skill-generation.js +15 -15
- package/dist/core/shared/tool-detection.d.ts +3 -3
- package/dist/core/shared/tool-detection.js +14 -14
- package/dist/core/specs-apply.js +6 -6
- package/dist/core/templates/index.d.ts +1 -1
- package/dist/core/templates/index.js +1 -1
- package/dist/core/templates/workflows/apply-change.js +14 -14
- package/dist/core/templates/workflows/archive-change.js +32 -32
- package/dist/core/templates/workflows/bulk-archive-change.js +25 -25
- package/dist/core/templates/workflows/continue-change.js +12 -12
- package/dist/core/templates/workflows/explore.js +29 -29
- package/dist/core/templates/workflows/feedback.js +6 -6
- package/dist/core/templates/workflows/ff-change.js +24 -24
- package/dist/core/templates/workflows/new-change.js +20 -20
- package/dist/core/templates/workflows/onboard.js +33 -33
- package/dist/core/templates/workflows/propose.js +23 -23
- package/dist/core/templates/workflows/sdd.js +8 -8
- package/dist/core/templates/workflows/sync-specs.js +19 -19
- package/dist/core/templates/workflows/verify-change.js +17 -17
- package/dist/core/update.d.ts +2 -2
- package/dist/core/update.js +16 -15
- package/dist/core/validation/constants.d.ts +1 -1
- package/dist/core/validation/constants.js +1 -1
- package/dist/core/view.js +11 -11
- package/dist/telemetry/config.d.ts +2 -1
- package/dist/telemetry/config.js +17 -8
- package/dist/telemetry/index.d.ts +10 -2
- package/dist/telemetry/index.js +40 -7
- package/dist/ui/ascii-patterns.d.ts +2 -2
- package/dist/ui/ascii-patterns.js +2 -2
- package/dist/ui/welcome-screen.js +2 -2
- package/dist/utils/change-metadata.d.ts +4 -4
- package/dist/utils/change-metadata.js +6 -6
- package/dist/utils/change-utils.d.ts +3 -3
- package/dist/utils/change-utils.js +5 -5
- package/dist/utils/file-system.js +1 -1
- package/dist/utils/interactive.js +1 -1
- package/dist/utils/item-discovery.js +4 -4
- package/dist/utils/legacy-spec-compat.d.ts +2 -0
- package/dist/utils/legacy-spec-compat.js +2 -0
- package/dist/utils/shell-detection.d.ts +1 -0
- package/dist/utils/shell-detection.js +16 -0
- package/package.json +27 -17
- package/schemas/sdd/1-spec.schema.json +1 -1
- package/schemas/sdd/2-plan.schema.json +73 -1
- package/schemas/sdd/3-tasks.schema.json +73 -1
- package/schemas/sdd/4-changelog.schema.json +1 -1
- package/schemas/sdd/5-quality.schema.json +442 -2
- package/schemas/sdd/adr.schema.json +148 -0
- package/schemas/sdd/agent-binding-adapter.schema.json +210 -0
- package/schemas/sdd/agent-binding-resolution.schema.json +338 -0
- package/schemas/sdd/backlog-projection-plan.schema.json +180 -0
- package/schemas/sdd/backlog-provider-contract.schema.json +260 -0
- package/schemas/sdd/codesdd-plugin.schema.json +474 -0
- package/schemas/sdd/debate.schema.json +244 -0
- package/schemas/sdd/deepagent-decision-evidence.schema.json +58 -0
- package/schemas/sdd/deepagent-env-contract.schema.json +143 -0
- package/schemas/sdd/deepagent-quality-evidence.schema.json +108 -0
- package/schemas/sdd/deepagent-run-evidence.schema.json +192 -0
- package/schemas/sdd/deepagent-run-plan.schema.json +197 -0
- package/schemas/sdd/deepagent-run-request.schema.json +321 -0
- package/schemas/sdd/deepagent-subagent-evidence.schema.json +110 -0
- package/schemas/sdd/deepagent-tool-call-evidence.schema.json +78 -0
- package/schemas/sdd/discarded.schema.json +127 -0
- package/schemas/sdd/epic.schema.json +147 -0
- package/schemas/sdd/insight.schema.json +136 -0
- package/schemas/sdd/parallel-feat-automation-plan.schema.json +215 -0
- package/schemas/sdd/parallel-feat-automation-request.schema.json +109 -0
- package/schemas/sdd/plugin-artifact-manifest.schema.json +150 -0
- package/schemas/sdd/plugin-compliance-index.schema.json +136 -0
- package/schemas/sdd/plugin-dry-run-plan.schema.json +260 -0
- package/schemas/sdd/plugin-evidence-manifest.schema.json +569 -0
- package/schemas/sdd/plugin-policy-evaluation.schema.json +92 -0
- package/schemas/sdd/plugin-policy-pack-evaluation.schema.json +94 -0
- package/schemas/sdd/plugin-policy-pack.schema.json +196 -0
- package/schemas/sdd/plugin-registry.schema.json +558 -0
- package/schemas/sdd/plugin-rollback-manifest.schema.json +87 -0
- package/schemas/sdd/plugin-runtime-invocation-plan.schema.json +845 -0
- package/schemas/sdd/plugin-skill-binding-resolution.schema.json +305 -0
- package/schemas/sdd/plugin-skill-binding.schema.json +88 -0
- package/schemas/sdd/plugin-validation-manifest.schema.json +123 -0
- package/schemas/sdd/quality-architecture-schema.schema.json +216 -0
- package/schemas/sdd/quality-evidence-bundle.schema.json +1228 -0
- package/schemas/sdd/quality-run.schema.json +197 -0
- package/schemas/sdd/quality-scenario.schema.json +252 -0
- package/schemas/sdd/workspace-catalog.schema.json +9841 -22
- package/schemas/spec-driven/schema.yaml +4 -4
- package/schemas/spec-driven/templates/proposal.md +1 -1
- package/dist/utils/openspec-compat.d.ts +0 -2
- package/dist/utils/openspec-compat.js +0 -2
|
@@ -1,48 +1,310 @@
|
|
|
1
1
|
import * as fs from 'node:fs';
|
|
2
2
|
import * as path from 'node:path';
|
|
3
3
|
import * as os from 'node:os';
|
|
4
|
+
import { createHash } from 'node:crypto';
|
|
4
5
|
// Constants
|
|
5
|
-
export const GLOBAL_CONFIG_DIR_NAME = '
|
|
6
|
-
export const GLOBAL_CONFIG_FILE_NAME = 'config.
|
|
7
|
-
export const GLOBAL_DATA_DIR_NAME = '
|
|
6
|
+
export const GLOBAL_CONFIG_DIR_NAME = '.codesdd';
|
|
7
|
+
export const GLOBAL_CONFIG_FILE_NAME = 'config.toml';
|
|
8
|
+
export const GLOBAL_DATA_DIR_NAME = 'codesdd';
|
|
9
|
+
export const GLOBAL_CACHE_DIR_NAME = 'cache';
|
|
10
|
+
export const GLOBAL_CACHE_TIERS = ['providers', 'projects', 'schemas', 'deepagents', 'plugins'];
|
|
11
|
+
export const LEGACY_GLOBAL_CONFIG_DIR_NAME = 'codesdd';
|
|
12
|
+
export const LEGACY_GLOBAL_CONFIG_FILE_NAME = 'config.json';
|
|
8
13
|
const DEFAULT_CONFIG = {
|
|
9
14
|
featureFlags: {},
|
|
10
15
|
profile: 'core',
|
|
11
16
|
delivery: 'both',
|
|
12
17
|
};
|
|
18
|
+
function resolveHomeDir() {
|
|
19
|
+
return process.env.HOME || process.env.USERPROFILE || os.homedir();
|
|
20
|
+
}
|
|
21
|
+
function isTomlObject(value) {
|
|
22
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
23
|
+
}
|
|
24
|
+
function stripInlineComment(input) {
|
|
25
|
+
let inSingle = false;
|
|
26
|
+
let inDouble = false;
|
|
27
|
+
let escaped = false;
|
|
28
|
+
for (let i = 0; i < input.length; i++) {
|
|
29
|
+
const ch = input[i];
|
|
30
|
+
if (escaped) {
|
|
31
|
+
escaped = false;
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
if (ch === '\\' && inDouble) {
|
|
35
|
+
escaped = true;
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
if (ch === '\'' && !inDouble) {
|
|
39
|
+
inSingle = !inSingle;
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
if (ch === '"' && !inSingle) {
|
|
43
|
+
inDouble = !inDouble;
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
if (ch === '#' && !inSingle && !inDouble) {
|
|
47
|
+
return input.slice(0, i).trimEnd();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return input.trimEnd();
|
|
51
|
+
}
|
|
52
|
+
function parseTomlKeyPath(raw) {
|
|
53
|
+
const parts = [];
|
|
54
|
+
const trimmed = raw.trim();
|
|
55
|
+
if (trimmed.length === 0) {
|
|
56
|
+
throw new SyntaxError('Invalid TOML key: empty key');
|
|
57
|
+
}
|
|
58
|
+
let token = '';
|
|
59
|
+
let inSingle = false;
|
|
60
|
+
let inDouble = false;
|
|
61
|
+
let escaped = false;
|
|
62
|
+
for (let i = 0; i < trimmed.length; i++) {
|
|
63
|
+
const ch = trimmed[i];
|
|
64
|
+
if (escaped) {
|
|
65
|
+
token += ch;
|
|
66
|
+
escaped = false;
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
if (ch === '\\' && inDouble) {
|
|
70
|
+
token += ch;
|
|
71
|
+
escaped = true;
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
if (ch === '\'' && !inDouble) {
|
|
75
|
+
inSingle = !inSingle;
|
|
76
|
+
token += ch;
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
if (ch === '"' && !inSingle) {
|
|
80
|
+
inDouble = !inDouble;
|
|
81
|
+
token += ch;
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
if (ch === '.' && !inSingle && !inDouble) {
|
|
85
|
+
const piece = token.trim();
|
|
86
|
+
if (piece.length === 0) {
|
|
87
|
+
throw new SyntaxError(`Invalid TOML key: "${raw}"`);
|
|
88
|
+
}
|
|
89
|
+
parts.push(unquoteTomlKey(piece));
|
|
90
|
+
token = '';
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
token += ch;
|
|
94
|
+
}
|
|
95
|
+
if (inSingle || inDouble) {
|
|
96
|
+
throw new SyntaxError(`Invalid TOML key: unclosed quote in "${raw}"`);
|
|
97
|
+
}
|
|
98
|
+
const tail = token.trim();
|
|
99
|
+
if (tail.length === 0) {
|
|
100
|
+
throw new SyntaxError(`Invalid TOML key: "${raw}"`);
|
|
101
|
+
}
|
|
102
|
+
parts.push(unquoteTomlKey(tail));
|
|
103
|
+
return parts;
|
|
104
|
+
}
|
|
105
|
+
function unquoteTomlKey(raw) {
|
|
106
|
+
const trimmed = raw.trim();
|
|
107
|
+
if ((trimmed.startsWith('"') && trimmed.endsWith('"')) || (trimmed.startsWith('\'') && trimmed.endsWith('\''))) {
|
|
108
|
+
return trimmed.slice(1, -1);
|
|
109
|
+
}
|
|
110
|
+
return trimmed;
|
|
111
|
+
}
|
|
112
|
+
function setObjectPath(target, pathParts, value) {
|
|
113
|
+
let cursor = target;
|
|
114
|
+
for (let i = 0; i < pathParts.length - 1; i++) {
|
|
115
|
+
const key = pathParts[i];
|
|
116
|
+
const current = cursor[key];
|
|
117
|
+
if (!isTomlObject(current)) {
|
|
118
|
+
cursor[key] = {};
|
|
119
|
+
}
|
|
120
|
+
cursor = cursor[key];
|
|
121
|
+
}
|
|
122
|
+
cursor[pathParts[pathParts.length - 1]] = value;
|
|
123
|
+
}
|
|
124
|
+
function getObjectPath(target, pathParts) {
|
|
125
|
+
let cursor = target;
|
|
126
|
+
for (const part of pathParts) {
|
|
127
|
+
const value = cursor[part];
|
|
128
|
+
if (!isTomlObject(value)) {
|
|
129
|
+
cursor[part] = {};
|
|
130
|
+
}
|
|
131
|
+
cursor = cursor[part];
|
|
132
|
+
}
|
|
133
|
+
return cursor;
|
|
134
|
+
}
|
|
135
|
+
function parseTomlPrimitive(raw) {
|
|
136
|
+
const value = raw.trim();
|
|
137
|
+
if (value === 'true')
|
|
138
|
+
return true;
|
|
139
|
+
if (value === 'false')
|
|
140
|
+
return false;
|
|
141
|
+
if ((value.startsWith('"') && value.endsWith('"')) || (value.startsWith('\'') && value.endsWith('\''))) {
|
|
142
|
+
if (value.startsWith('"')) {
|
|
143
|
+
return JSON.parse(value);
|
|
144
|
+
}
|
|
145
|
+
return value.slice(1, -1);
|
|
146
|
+
}
|
|
147
|
+
if (value.startsWith('[') && value.endsWith(']')) {
|
|
148
|
+
const inner = value.slice(1, -1).trim();
|
|
149
|
+
if (!inner)
|
|
150
|
+
return [];
|
|
151
|
+
const tokens = [];
|
|
152
|
+
let token = '';
|
|
153
|
+
let inSingle = false;
|
|
154
|
+
let inDouble = false;
|
|
155
|
+
let escaped = false;
|
|
156
|
+
let depth = 0;
|
|
157
|
+
for (let i = 0; i < inner.length; i++) {
|
|
158
|
+
const ch = inner[i];
|
|
159
|
+
if (escaped) {
|
|
160
|
+
token += ch;
|
|
161
|
+
escaped = false;
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
if (ch === '\\' && inDouble) {
|
|
165
|
+
token += ch;
|
|
166
|
+
escaped = true;
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
169
|
+
if (ch === '\'' && !inDouble) {
|
|
170
|
+
inSingle = !inSingle;
|
|
171
|
+
token += ch;
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
if (ch === '"' && !inSingle) {
|
|
175
|
+
inDouble = !inDouble;
|
|
176
|
+
token += ch;
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
if (!inSingle && !inDouble) {
|
|
180
|
+
if (ch === '[')
|
|
181
|
+
depth++;
|
|
182
|
+
if (ch === ']')
|
|
183
|
+
depth--;
|
|
184
|
+
}
|
|
185
|
+
if (ch === ',' && !inSingle && !inDouble && depth === 0) {
|
|
186
|
+
tokens.push(token.trim());
|
|
187
|
+
token = '';
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
190
|
+
token += ch;
|
|
191
|
+
}
|
|
192
|
+
if (token.trim().length > 0) {
|
|
193
|
+
tokens.push(token.trim());
|
|
194
|
+
}
|
|
195
|
+
return tokens.map((entry) => parseTomlPrimitive(entry));
|
|
196
|
+
}
|
|
197
|
+
if (/^[+-]?\d+$/.test(value)) {
|
|
198
|
+
return Number.parseInt(value, 10);
|
|
199
|
+
}
|
|
200
|
+
if (/^[+-]?\d+\.\d+$/.test(value)) {
|
|
201
|
+
return Number.parseFloat(value);
|
|
202
|
+
}
|
|
203
|
+
throw new SyntaxError(`Invalid TOML value: ${value}`);
|
|
204
|
+
}
|
|
205
|
+
function formatTomlKey(key) {
|
|
206
|
+
if (/^[A-Za-z0-9_-]+$/.test(key)) {
|
|
207
|
+
return key;
|
|
208
|
+
}
|
|
209
|
+
return JSON.stringify(key);
|
|
210
|
+
}
|
|
211
|
+
function formatTomlValue(value) {
|
|
212
|
+
if (typeof value === 'string') {
|
|
213
|
+
return JSON.stringify(value);
|
|
214
|
+
}
|
|
215
|
+
if (typeof value === 'boolean' || typeof value === 'number') {
|
|
216
|
+
return String(value);
|
|
217
|
+
}
|
|
218
|
+
if (Array.isArray(value)) {
|
|
219
|
+
return `[${value.map((item) => formatTomlValue(item)).join(', ')}]`;
|
|
220
|
+
}
|
|
221
|
+
throw new TypeError('Unsupported TOML value type');
|
|
222
|
+
}
|
|
223
|
+
function appendTomlTable(lines, tablePath, tableValue) {
|
|
224
|
+
if (tablePath.length > 0) {
|
|
225
|
+
lines.push(`[${tablePath.map((part) => formatTomlKey(part)).join('.')}]`);
|
|
226
|
+
}
|
|
227
|
+
const childTables = [];
|
|
228
|
+
for (const [key, value] of Object.entries(tableValue)) {
|
|
229
|
+
if (value === undefined || value === null) {
|
|
230
|
+
continue;
|
|
231
|
+
}
|
|
232
|
+
if (typeof value === 'object' && !Array.isArray(value)) {
|
|
233
|
+
childTables.push({ path: [...tablePath, key], value: value });
|
|
234
|
+
continue;
|
|
235
|
+
}
|
|
236
|
+
lines.push(`${formatTomlKey(key)} = ${formatTomlValue(value)}`);
|
|
237
|
+
}
|
|
238
|
+
for (const child of childTables) {
|
|
239
|
+
lines.push('');
|
|
240
|
+
appendTomlTable(lines, child.path, child.value);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
export function parseTomlContent(content) {
|
|
244
|
+
const result = {};
|
|
245
|
+
let activeTable = result;
|
|
246
|
+
const lines = content.split(/\r?\n/u);
|
|
247
|
+
for (const rawLine of lines) {
|
|
248
|
+
const line = stripInlineComment(rawLine).trim();
|
|
249
|
+
if (!line)
|
|
250
|
+
continue;
|
|
251
|
+
if (line.startsWith('[') && line.endsWith(']')) {
|
|
252
|
+
const tableName = line.slice(1, -1).trim();
|
|
253
|
+
if (!tableName) {
|
|
254
|
+
throw new SyntaxError('Invalid TOML table header: empty name');
|
|
255
|
+
}
|
|
256
|
+
activeTable = getObjectPath(result, parseTomlKeyPath(tableName));
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
259
|
+
const equalsIndex = line.indexOf('=');
|
|
260
|
+
if (equalsIndex <= 0) {
|
|
261
|
+
throw new SyntaxError(`Invalid TOML assignment: "${line}"`);
|
|
262
|
+
}
|
|
263
|
+
const keyRaw = line.slice(0, equalsIndex).trim();
|
|
264
|
+
const valueRaw = line.slice(equalsIndex + 1).trim();
|
|
265
|
+
const keyParts = parseTomlKeyPath(keyRaw);
|
|
266
|
+
setObjectPath(activeTable, keyParts, parseTomlPrimitive(valueRaw));
|
|
267
|
+
}
|
|
268
|
+
return result;
|
|
269
|
+
}
|
|
270
|
+
export function stringifyTomlContent(value) {
|
|
271
|
+
const lines = [];
|
|
272
|
+
appendTomlTable(lines, [], value);
|
|
273
|
+
return `${lines.join('\n').trim()}\n`;
|
|
274
|
+
}
|
|
13
275
|
/**
|
|
14
|
-
* Gets the global configuration directory
|
|
15
|
-
*
|
|
16
|
-
* - All platforms: $XDG_CONFIG_HOME/openspec/ if XDG_CONFIG_HOME is set
|
|
17
|
-
* - Unix/macOS fallback: ~/.config/openspec/
|
|
18
|
-
* - Windows fallback: %APPDATA%/openspec/
|
|
276
|
+
* Gets the canonical global runtime/configuration directory.
|
|
277
|
+
* This repository standardizes global runtime state under ~/.codesdd.
|
|
19
278
|
*/
|
|
20
279
|
export function getGlobalConfigDir() {
|
|
21
|
-
|
|
280
|
+
return path.join(resolveHomeDir(), GLOBAL_CONFIG_DIR_NAME);
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Gets the legacy XDG-compatible JSON config directory.
|
|
284
|
+
* This path is kept only for read compatibility with pre-~/.codesdd installs.
|
|
285
|
+
*/
|
|
286
|
+
export function getLegacyGlobalConfigDir() {
|
|
22
287
|
const xdgConfigHome = process.env.XDG_CONFIG_HOME;
|
|
23
288
|
if (xdgConfigHome) {
|
|
24
|
-
return path.join(xdgConfigHome,
|
|
289
|
+
return path.join(xdgConfigHome, LEGACY_GLOBAL_CONFIG_DIR_NAME);
|
|
25
290
|
}
|
|
26
291
|
const platform = os.platform();
|
|
27
292
|
if (platform === 'win32') {
|
|
28
|
-
// Windows: use %APPDATA%
|
|
29
293
|
const appData = process.env.APPDATA;
|
|
30
294
|
if (appData) {
|
|
31
|
-
return path.join(appData,
|
|
295
|
+
return path.join(appData, LEGACY_GLOBAL_CONFIG_DIR_NAME);
|
|
32
296
|
}
|
|
33
|
-
|
|
34
|
-
return path.join(os.homedir(), 'AppData', 'Roaming', GLOBAL_CONFIG_DIR_NAME);
|
|
297
|
+
return path.join(resolveHomeDir(), 'AppData', 'Roaming', LEGACY_GLOBAL_CONFIG_DIR_NAME);
|
|
35
298
|
}
|
|
36
|
-
|
|
37
|
-
return path.join(os.homedir(), '.config', GLOBAL_CONFIG_DIR_NAME);
|
|
299
|
+
return path.join(resolveHomeDir(), '.config', LEGACY_GLOBAL_CONFIG_DIR_NAME);
|
|
38
300
|
}
|
|
39
301
|
/**
|
|
40
302
|
* Gets the global data directory path following XDG Base Directory Specification.
|
|
41
303
|
* Used for user data like schema overrides.
|
|
42
304
|
*
|
|
43
|
-
* - All platforms: $XDG_DATA_HOME/
|
|
44
|
-
* - Unix/macOS fallback: ~/.local/share/
|
|
45
|
-
* - Windows fallback: %LOCALAPPDATA%/
|
|
305
|
+
* - All platforms: $XDG_DATA_HOME/legacy-spec/ if XDG_DATA_HOME is set
|
|
306
|
+
* - Unix/macOS fallback: ~/.local/share/legacy-spec/
|
|
307
|
+
* - Windows fallback: %LOCALAPPDATA%/legacy-spec/
|
|
46
308
|
*/
|
|
47
309
|
export function getGlobalDataDir() {
|
|
48
310
|
// XDG_DATA_HOME takes precedence on all platforms when explicitly set
|
|
@@ -58,17 +320,73 @@ export function getGlobalDataDir() {
|
|
|
58
320
|
return path.join(localAppData, GLOBAL_DATA_DIR_NAME);
|
|
59
321
|
}
|
|
60
322
|
// Fallback for Windows if LOCALAPPDATA is not set
|
|
61
|
-
return path.join(
|
|
323
|
+
return path.join(resolveHomeDir(), 'AppData', 'Local', GLOBAL_DATA_DIR_NAME);
|
|
62
324
|
}
|
|
63
325
|
// Unix/macOS fallback: ~/.local/share
|
|
64
|
-
return path.join(
|
|
326
|
+
return path.join(resolveHomeDir(), '.local', 'share', GLOBAL_DATA_DIR_NAME);
|
|
65
327
|
}
|
|
66
328
|
/**
|
|
67
|
-
* Gets the path to the global config file.
|
|
329
|
+
* Gets the path to the canonical global config TOML file.
|
|
68
330
|
*/
|
|
69
331
|
export function getGlobalConfigPath() {
|
|
70
332
|
return path.join(getGlobalConfigDir(), GLOBAL_CONFIG_FILE_NAME);
|
|
71
333
|
}
|
|
334
|
+
/**
|
|
335
|
+
* Gets the global cache directory path under ~/.codesdd/cache.
|
|
336
|
+
*/
|
|
337
|
+
export function getGlobalCacheDir() {
|
|
338
|
+
return path.join(getGlobalConfigDir(), GLOBAL_CACHE_DIR_NAME);
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Gets all tier directory paths for the global cache layout.
|
|
342
|
+
*/
|
|
343
|
+
export function getGlobalCacheTierDirs() {
|
|
344
|
+
return GLOBAL_CACHE_TIERS.reduce((acc, tier) => {
|
|
345
|
+
acc[tier] = path.join(getGlobalCacheDir(), tier);
|
|
346
|
+
return acc;
|
|
347
|
+
}, {});
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Ensures ~/.codesdd/cache and all known tier directories exist.
|
|
351
|
+
*/
|
|
352
|
+
export function ensureGlobalCacheLayout() {
|
|
353
|
+
const cacheRoot = getGlobalCacheDir();
|
|
354
|
+
if (!fs.existsSync(cacheRoot)) {
|
|
355
|
+
fs.mkdirSync(cacheRoot, { recursive: true });
|
|
356
|
+
}
|
|
357
|
+
const tiers = getGlobalCacheTierDirs();
|
|
358
|
+
for (const tierPath of Object.values(tiers)) {
|
|
359
|
+
if (!fs.existsSync(tierPath)) {
|
|
360
|
+
fs.mkdirSync(tierPath, { recursive: true });
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
return tiers;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Creates a stable project fingerprint for cache partitioning.
|
|
367
|
+
*/
|
|
368
|
+
export function createProjectFingerprint(projectRoot) {
|
|
369
|
+
const normalizedRoot = path.resolve(projectRoot);
|
|
370
|
+
return createHash('sha256').update(normalizedRoot).digest('hex').slice(0, 16);
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Gets the path to the legacy global config JSON file.
|
|
374
|
+
*/
|
|
375
|
+
export function getLegacyGlobalConfigPath() {
|
|
376
|
+
return path.join(getLegacyGlobalConfigDir(), LEGACY_GLOBAL_CONFIG_FILE_NAME);
|
|
377
|
+
}
|
|
378
|
+
export function readGlobalConfigRaw() {
|
|
379
|
+
const primaryConfigPath = getGlobalConfigPath();
|
|
380
|
+
if (fs.existsSync(primaryConfigPath)) {
|
|
381
|
+
const content = fs.readFileSync(primaryConfigPath, 'utf-8');
|
|
382
|
+
return parseTomlContent(content);
|
|
383
|
+
}
|
|
384
|
+
const legacyConfigPath = getLegacyGlobalConfigPath();
|
|
385
|
+
if (fs.existsSync(legacyConfigPath)) {
|
|
386
|
+
return JSON.parse(fs.readFileSync(legacyConfigPath, 'utf-8'));
|
|
387
|
+
}
|
|
388
|
+
return {};
|
|
389
|
+
}
|
|
72
390
|
/**
|
|
73
391
|
* Loads the global configuration from disk.
|
|
74
392
|
* Returns default configuration if file doesn't exist or is invalid.
|
|
@@ -77,11 +395,10 @@ export function getGlobalConfigPath() {
|
|
|
77
395
|
export function getGlobalConfig() {
|
|
78
396
|
const configPath = getGlobalConfigPath();
|
|
79
397
|
try {
|
|
80
|
-
|
|
398
|
+
const parsed = readGlobalConfigRaw();
|
|
399
|
+
if (Object.keys(parsed).length === 0 && !fs.existsSync(configPath) && !fs.existsSync(getLegacyGlobalConfigPath())) {
|
|
81
400
|
return { ...DEFAULT_CONFIG };
|
|
82
401
|
}
|
|
83
|
-
const content = fs.readFileSync(configPath, 'utf-8');
|
|
84
|
-
const parsed = JSON.parse(content);
|
|
85
402
|
// Merge with defaults (loaded values take precedence)
|
|
86
403
|
const merged = {
|
|
87
404
|
...DEFAULT_CONFIG,
|
|
@@ -104,7 +421,7 @@ export function getGlobalConfig() {
|
|
|
104
421
|
catch (error) {
|
|
105
422
|
// Log warning for parse errors, but not for missing files
|
|
106
423
|
if (error instanceof SyntaxError) {
|
|
107
|
-
console.error(`Warning: Invalid
|
|
424
|
+
console.error(`Warning: Invalid config in ${configPath}, using defaults`);
|
|
108
425
|
}
|
|
109
426
|
return { ...DEFAULT_CONFIG };
|
|
110
427
|
}
|
|
@@ -120,6 +437,6 @@ export function saveGlobalConfig(config) {
|
|
|
120
437
|
if (!fs.existsSync(configDir)) {
|
|
121
438
|
fs.mkdirSync(configDir, { recursive: true });
|
|
122
439
|
}
|
|
123
|
-
fs.writeFileSync(configPath,
|
|
440
|
+
fs.writeFileSync(configPath, stringifyTomlContent(config), 'utf-8');
|
|
124
441
|
}
|
|
125
442
|
//# sourceMappingURL=global-config.js.map
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { GLOBAL_CONFIG_DIR_NAME, GLOBAL_CONFIG_FILE_NAME, GLOBAL_DATA_DIR_NAME, type GlobalConfig, getGlobalConfigDir, getGlobalConfigPath, getGlobalConfig, saveGlobalConfig, getGlobalDataDir } from './global-config.js';
|
|
1
|
+
export { GLOBAL_CONFIG_DIR_NAME, GLOBAL_CONFIG_FILE_NAME, GLOBAL_DATA_DIR_NAME, GLOBAL_CACHE_DIR_NAME, GLOBAL_CACHE_TIERS, LEGACY_GLOBAL_CONFIG_DIR_NAME, LEGACY_GLOBAL_CONFIG_FILE_NAME, type GlobalConfig, getGlobalConfigDir, getGlobalCacheDir, getGlobalCacheTierDirs, ensureGlobalCacheLayout, createProjectFingerprint, getLegacyGlobalConfigDir, getGlobalConfigPath, getLegacyGlobalConfigPath, getGlobalConfig, readGlobalConfigRaw, parseTomlContent, stringifyTomlContent, saveGlobalConfig, getGlobalDataDir } from './global-config.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/core/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
// Core
|
|
2
|
-
export { GLOBAL_CONFIG_DIR_NAME, GLOBAL_CONFIG_FILE_NAME, GLOBAL_DATA_DIR_NAME, getGlobalConfigDir, getGlobalConfigPath, getGlobalConfig, saveGlobalConfig, getGlobalDataDir } from './global-config.js';
|
|
1
|
+
// Core CodeSDD logic will be implemented here
|
|
2
|
+
export { GLOBAL_CONFIG_DIR_NAME, GLOBAL_CONFIG_FILE_NAME, GLOBAL_DATA_DIR_NAME, GLOBAL_CACHE_DIR_NAME, GLOBAL_CACHE_TIERS, LEGACY_GLOBAL_CONFIG_DIR_NAME, LEGACY_GLOBAL_CONFIG_FILE_NAME, getGlobalConfigDir, getGlobalCacheDir, getGlobalCacheTierDirs, ensureGlobalCacheLayout, createProjectFingerprint, getLegacyGlobalConfigDir, getGlobalConfigPath, getLegacyGlobalConfigPath, getGlobalConfig, readGlobalConfigRaw, parseTomlContent, stringifyTomlContent, saveGlobalConfig, getGlobalDataDir } from './global-config.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/core/init.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Init Command
|
|
3
3
|
*
|
|
4
|
-
* Sets up
|
|
4
|
+
* Sets up CodeSDD with Agent Skills and /opsx:* slash commands.
|
|
5
5
|
* This is the unified setup command that replaces both the old init and experimental commands.
|
|
6
6
|
*/
|
|
7
7
|
type InitCommandOptions = {
|
|
@@ -9,16 +9,21 @@ type InitCommandOptions = {
|
|
|
9
9
|
force?: boolean;
|
|
10
10
|
interactive?: boolean;
|
|
11
11
|
profile?: string;
|
|
12
|
+
allowNoToolsFallback?: boolean;
|
|
13
|
+
silent?: boolean;
|
|
12
14
|
};
|
|
13
15
|
export declare class InitCommand {
|
|
14
16
|
private readonly toolsArg?;
|
|
15
17
|
private readonly force;
|
|
16
18
|
private readonly interactiveOption?;
|
|
17
19
|
private readonly profileOverride?;
|
|
20
|
+
private readonly allowNoToolsFallback;
|
|
21
|
+
private readonly silent;
|
|
18
22
|
constructor(options?: InitCommandOptions);
|
|
19
23
|
execute(targetPath: string): Promise<void>;
|
|
20
24
|
private validate;
|
|
21
25
|
private canPromptInteractively;
|
|
26
|
+
private log;
|
|
22
27
|
private resolveProfileOverride;
|
|
23
28
|
private handleLegacyCleanup;
|
|
24
29
|
private performLegacyCleanup;
|