devworkspace 0.5.1 → 0.5.2
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/CHANGELOG.md +30 -2
- package/README.md +57 -509
- package/dist/agents/claude/adapter.js +0 -1
- package/dist/agents/claude/content.js +0 -1
- package/dist/agents/codex/adapter.js +0 -1
- package/dist/agents/copilot/adapter.js +0 -1
- package/dist/agents/cursor/adapter.js +0 -1
- package/dist/agents/index.js +0 -1
- package/dist/agents/shared.js +0 -1
- package/dist/agents/types.js +0 -1
- package/dist/cli/args.d.ts +16 -0
- package/dist/cli/args.js +5 -1
- package/dist/cli/help.js +59 -17
- package/dist/cli/main.js +0 -1
- package/dist/cli/prompt.d.ts +15 -0
- package/dist/cli/prompt.js +113 -0
- package/dist/cli/render.d.ts +10 -0
- package/dist/cli/render.js +174 -4
- package/dist/cli/run.d.ts +3 -0
- package/dist/cli/run.js +366 -17
- package/dist/config/feature-gate.d.ts +15 -0
- package/dist/config/feature-gate.js +77 -0
- package/dist/config/feature-registry.d.ts +49 -0
- package/dist/config/feature-registry.js +451 -0
- package/dist/config/schemas.js +0 -1
- package/dist/config/settings.d.ts +54 -0
- package/dist/config/settings.js +293 -0
- package/dist/config/validate.js +0 -1
- package/dist/core/artifacts.js +0 -1
- package/dist/core/contracts.js +0 -1
- package/dist/core/migrations.js +0 -1
- package/dist/core/version.js +0 -1
- package/dist/core/versioned.js +0 -1
- package/dist/core/workspace.d.ts +1 -0
- package/dist/core/workspace.js +1 -1
- package/dist/decisions/decision.js +0 -1
- package/dist/discovery/cache.js +0 -1
- package/dist/discovery/commands.js +0 -1
- package/dist/discovery/detect.js +0 -1
- package/dist/discovery/docs.js +0 -1
- package/dist/discovery/entrypoints.js +0 -1
- package/dist/discovery/ignore.js +0 -1
- package/dist/discovery/scan.js +0 -1
- package/dist/discovery/types.js +0 -1
- package/dist/dx/dashboard.js +2 -1
- package/dist/dx/guidance.js +0 -1
- package/dist/dx/guided-setup.d.ts +102 -0
- package/dist/dx/guided-setup.js +508 -0
- package/dist/dx/index.js +0 -1
- package/dist/dx/onboarding.js +0 -1
- package/dist/dx/types.js +0 -1
- package/dist/errors/index.js +0 -1
- package/dist/features/schema.js +0 -1
- package/dist/features/types.js +0 -1
- package/dist/features/validate.js +0 -1
- package/dist/git/git.js +0 -1
- package/dist/index.d.ts +15 -5
- package/dist/index.js +10 -2
- package/dist/integrations/adapters/agent-skills.js +0 -1
- package/dist/integrations/adapters/claudePlugin.js +0 -1
- package/dist/integrations/adapters/graphify.js +0 -1
- package/dist/integrations/adapters/omniroute.js +0 -1
- package/dist/integrations/adapters/pluginSkill.js +0 -1
- package/dist/integrations/adapters/ponytail.js +0 -1
- package/dist/integrations/exec.js +0 -1
- package/dist/integrations/index.js +0 -1
- package/dist/integrations/manager.d.ts +2 -1
- package/dist/integrations/manager.js +22 -3
- package/dist/integrations/notices.js +0 -1
- package/dist/integrations/persistentPath.js +0 -1
- package/dist/integrations/protect.js +0 -1
- package/dist/integrations/state.js +0 -1
- package/dist/integrations/types.d.ts +1 -1
- package/dist/integrations/types.js +1 -1
- package/dist/intelligence/agents/profiles.js +0 -1
- package/dist/intelligence/agents/registry.js +0 -1
- package/dist/intelligence/agents/types.js +0 -1
- package/dist/intelligence/observability/tracer.js +0 -1
- package/dist/intelligence/observability/types.js +0 -1
- package/dist/intelligence/orchestration/engine.d.ts +13 -4
- package/dist/intelligence/orchestration/engine.js +332 -54
- package/dist/intelligence/orchestration/lock-manager.js +0 -1
- package/dist/intelligence/orchestration/store.js +0 -1
- package/dist/intelligence/orchestration/types.d.ts +28 -1
- package/dist/intelligence/orchestration/types.js +0 -1
- package/dist/intelligence/routing/matcher.js +0 -1
- package/dist/intelligence/routing/router.js +0 -1
- package/dist/intelligence/routing/types.js +0 -1
- package/dist/intelligence/runtime/adk/adapter.js +1 -2
- package/dist/intelligence/runtime/adk/detector.js +0 -1
- package/dist/intelligence/runtime/auth-provider.d.ts +63 -0
- package/dist/intelligence/runtime/auth-provider.js +201 -0
- package/dist/intelligence/runtime/boundary.d.ts +118 -6
- package/dist/intelligence/runtime/boundary.js +720 -38
- package/dist/intelligence/runtime/changes.d.ts +59 -0
- package/dist/intelligence/runtime/changes.js +362 -0
- package/dist/intelligence/runtime/external.d.ts +1 -0
- package/dist/intelligence/runtime/external.js +9 -6
- package/dist/intelligence/runtime/native.js +0 -1
- package/dist/intelligence/runtime/types.d.ts +64 -2
- package/dist/intelligence/runtime/types.js +0 -1
- package/dist/intelligence/security/audit.js +8 -2
- package/dist/intelligence/security/policy.js +0 -1
- package/dist/intelligence/security/types.d.ts +8 -0
- package/dist/intelligence/security/types.js +0 -1
- package/dist/intelligence/skills/builtins.js +0 -1
- package/dist/intelligence/skills/loader.js +0 -1
- package/dist/intelligence/skills/registry.js +0 -1
- package/dist/intelligence/skills/types.js +0 -1
- package/dist/intelligence/verification/engine.d.ts +10 -2
- package/dist/intelligence/verification/engine.js +53 -9
- package/dist/intelligence/verification/reviewer.d.ts +18 -2
- package/dist/intelligence/verification/reviewer.js +356 -4
- package/dist/intelligence/verification/types.d.ts +60 -0
- package/dist/intelligence/verification/types.js +0 -1
- package/dist/knowledge/facts.js +0 -1
- package/dist/mcp/protocol.js +0 -1
- package/dist/mcp/server.js +38 -2
- package/dist/mcp/setup.js +5 -2
- package/dist/mcp/tools.js +0 -1
- package/dist/mcp/types.js +0 -1
- package/dist/mcp/verify.js +0 -1
- package/dist/portability/bundle.js +0 -1
- package/dist/prompts/onboarding.js +0 -1
- package/dist/prompts/refresh.js +0 -1
- package/dist/prompts/requirements.js +0 -1
- package/dist/security/files.js +0 -1
- package/dist/security/redact.js +0 -1
- package/dist/services/agent.js +2 -1
- package/dist/services/analysis.js +0 -1
- package/dist/services/common.js +0 -1
- package/dist/services/doctor.js +13 -2
- package/dist/services/drift.js +0 -1
- package/dist/services/features.js +5 -1
- package/dist/services/graph.js +4 -1
- package/dist/services/init.js +0 -1
- package/dist/services/integrations.d.ts +2 -1
- package/dist/services/integrations.js +29 -6
- package/dist/services/intelligence.d.ts +2 -2
- package/dist/services/intelligence.js +38 -36
- package/dist/services/knowledge.js +0 -1
- package/dist/services/migrate.js +0 -1
- package/dist/services/modules.d.ts +85 -0
- package/dist/services/modules.js +313 -0
- package/dist/services/portability.js +0 -1
- package/dist/services/records.js +5 -1
- package/dist/services/refresh.js +0 -1
- package/dist/services/reset.js +0 -1
- package/dist/services/settings.d.ts +36 -0
- package/dist/services/settings.js +102 -0
- package/dist/services/setup.d.ts +4 -5
- package/dist/services/setup.js +40 -28
- package/dist/services/standards.js +10 -1
- package/dist/services/status.js +0 -1
- package/dist/services/taskContext.js +0 -1
- package/dist/services/tasks.js +9 -1
- package/dist/services/verify.js +7 -2
- package/dist/sessions/session.js +0 -1
- package/dist/standards/acquisition/ingest.js +0 -1
- package/dist/standards/applicability/engine.js +0 -1
- package/dist/standards/builtin/code-quality.js +0 -1
- package/dist/standards/builtin/database-safety.js +0 -1
- package/dist/standards/builtin/index.js +0 -1
- package/dist/standards/builtin/security-baseline.js +0 -1
- package/dist/standards/builtin/testing-contracts.js +0 -1
- package/dist/standards/builtin/undo-kit.js +0 -1
- package/dist/standards/config/config.js +0 -1
- package/dist/standards/distribution/cache.js +0 -1
- package/dist/standards/distribution/index.js +0 -1
- package/dist/standards/distribution/keys.js +0 -1
- package/dist/standards/distribution/package.js +0 -1
- package/dist/standards/distribution/server.js +0 -1
- package/dist/standards/distribution/sync.js +0 -1
- package/dist/standards/distribution/types.js +0 -1
- package/dist/standards/engine/compliance.js +0 -1
- package/dist/standards/engine/engine.js +0 -1
- package/dist/standards/engine/reporter.js +0 -1
- package/dist/standards/index.js +0 -1
- package/dist/standards/registry/registry.js +0 -1
- package/dist/standards/schema/types.js +0 -1
- package/dist/standards/schema/validate.js +0 -1
- package/dist/standards/templates/index.js +0 -1
- package/dist/standards/validators/database.js +0 -1
- package/dist/standards/validators/quality.js +0 -1
- package/dist/standards/validators/registry.js +0 -1
- package/dist/standards/validators/security.js +0 -1
- package/dist/standards/validators/testing.js +0 -1
- package/dist/standards/validators/types.js +0 -1
- package/dist/standards/validators/undo-kit.js +0 -1
- package/dist/tasks/routing.js +0 -1
- package/dist/tasks/task.js +0 -1
- package/dist/utils/cleanup.js +0 -1
- package/dist/utils/fs.js +0 -1
- package/dist/utils/lock.js +92 -49
- package/dist/utils/logger.js +0 -1
- package/dist/utils/paths.js +0 -1
- package/dist/utils/proc.d.ts +8 -0
- package/dist/utils/proc.js +54 -46
- package/dist/verification/safety.js +0 -1
- package/dist/verification/scope.js +0 -1
- package/docs/architecture/global-standards-architecture.md +287 -0
- package/docs/archive/global-standards/GLOBAL_STANDARDS_AUDIT.md +99 -0
- package/docs/archive/global-standards/GLOBAL_STANDARDS_FINAL_STATUS.md +138 -0
- package/docs/archive/global-standards/GLOBAL_STANDARDS_IMPLEMENTATION_PLAN.md +100 -0
- package/docs/archive/global-standards/GLOBAL_STANDARDS_INDEPENDENT_AUDIT.md +219 -0
- package/docs/archive/global-standards/GLOBAL_STANDARDS_SECURITY_REPORT.md +184 -0
- package/docs/configuration.md +67 -0
- package/docs/contributing.md +15 -4
- package/docs/development/EXECUTION_STATE.md +50 -0
- package/docs/features.md +80 -0
- package/docs/getting-started.md +69 -111
- package/docs/guides/global-standards-migration.md +100 -0
- package/docs/integrations.md +7 -0
- package/docs/security/THIRD_PARTY_LICENSES.md +41 -0
- package/docs/testing/FINAL_CORRECTION_AND_CLEANUP_REPORT.md +92 -0
- package/docs/testing/global-standards-real-project-tests.md +218 -0
- package/docs/testing/global-standards-test-report.md +89 -0
- package/docs/testing/global-standards-verification-matrix.md +174 -0
- package/docs/troubleshooting.md +3 -0
- package/package.json +1 -1
- package/dist/agents/claude/adapter.js.map +0 -1
- package/dist/agents/claude/content.js.map +0 -1
- package/dist/agents/codex/adapter.js.map +0 -1
- package/dist/agents/copilot/adapter.js.map +0 -1
- package/dist/agents/cursor/adapter.js.map +0 -1
- package/dist/agents/index.js.map +0 -1
- package/dist/agents/shared.js.map +0 -1
- package/dist/agents/types.js.map +0 -1
- package/dist/cli/args.js.map +0 -1
- package/dist/cli/help.js.map +0 -1
- package/dist/cli/main.js.map +0 -1
- package/dist/cli/render.js.map +0 -1
- package/dist/cli/run.js.map +0 -1
- package/dist/config/schemas.js.map +0 -1
- package/dist/config/validate.js.map +0 -1
- package/dist/core/artifacts.js.map +0 -1
- package/dist/core/contracts.js.map +0 -1
- package/dist/core/migrations.js.map +0 -1
- package/dist/core/version.js.map +0 -1
- package/dist/core/versioned.js.map +0 -1
- package/dist/core/workspace.js.map +0 -1
- package/dist/decisions/decision.js.map +0 -1
- package/dist/discovery/cache.js.map +0 -1
- package/dist/discovery/commands.js.map +0 -1
- package/dist/discovery/detect.js.map +0 -1
- package/dist/discovery/docs.js.map +0 -1
- package/dist/discovery/entrypoints.js.map +0 -1
- package/dist/discovery/ignore.js.map +0 -1
- package/dist/discovery/scan.js.map +0 -1
- package/dist/discovery/types.js.map +0 -1
- package/dist/dx/dashboard.js.map +0 -1
- package/dist/dx/guidance.js.map +0 -1
- package/dist/dx/index.js.map +0 -1
- package/dist/dx/onboarding.js.map +0 -1
- package/dist/dx/types.js.map +0 -1
- package/dist/errors/index.js.map +0 -1
- package/dist/features/schema.js.map +0 -1
- package/dist/features/types.js.map +0 -1
- package/dist/features/validate.js.map +0 -1
- package/dist/git/git.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/integrations/adapters/agent-skills.js.map +0 -1
- package/dist/integrations/adapters/claudePlugin.js.map +0 -1
- package/dist/integrations/adapters/graphify.js.map +0 -1
- package/dist/integrations/adapters/omniroute.js.map +0 -1
- package/dist/integrations/adapters/pluginSkill.js.map +0 -1
- package/dist/integrations/adapters/ponytail.js.map +0 -1
- package/dist/integrations/exec.js.map +0 -1
- package/dist/integrations/index.js.map +0 -1
- package/dist/integrations/manager.js.map +0 -1
- package/dist/integrations/notices.js.map +0 -1
- package/dist/integrations/persistentPath.js.map +0 -1
- package/dist/integrations/protect.js.map +0 -1
- package/dist/integrations/state.js.map +0 -1
- package/dist/integrations/types.js.map +0 -1
- package/dist/intelligence/agents/profiles.js.map +0 -1
- package/dist/intelligence/agents/registry.js.map +0 -1
- package/dist/intelligence/agents/types.js.map +0 -1
- package/dist/intelligence/observability/tracer.js.map +0 -1
- package/dist/intelligence/observability/types.js.map +0 -1
- package/dist/intelligence/orchestration/engine.js.map +0 -1
- package/dist/intelligence/orchestration/lock-manager.js.map +0 -1
- package/dist/intelligence/orchestration/store.js.map +0 -1
- package/dist/intelligence/orchestration/types.js.map +0 -1
- package/dist/intelligence/routing/matcher.js.map +0 -1
- package/dist/intelligence/routing/router.js.map +0 -1
- package/dist/intelligence/routing/types.js.map +0 -1
- package/dist/intelligence/runtime/adk/adapter.js.map +0 -1
- package/dist/intelligence/runtime/adk/detector.js.map +0 -1
- package/dist/intelligence/runtime/boundary.js.map +0 -1
- package/dist/intelligence/runtime/external.js.map +0 -1
- package/dist/intelligence/runtime/native.js.map +0 -1
- package/dist/intelligence/runtime/types.js.map +0 -1
- package/dist/intelligence/security/audit.js.map +0 -1
- package/dist/intelligence/security/policy.js.map +0 -1
- package/dist/intelligence/security/types.js.map +0 -1
- package/dist/intelligence/skills/builtins.js.map +0 -1
- package/dist/intelligence/skills/loader.js.map +0 -1
- package/dist/intelligence/skills/registry.js.map +0 -1
- package/dist/intelligence/skills/types.js.map +0 -1
- package/dist/intelligence/verification/engine.js.map +0 -1
- package/dist/intelligence/verification/reviewer.js.map +0 -1
- package/dist/intelligence/verification/types.js.map +0 -1
- package/dist/knowledge/facts.js.map +0 -1
- package/dist/mcp/protocol.js.map +0 -1
- package/dist/mcp/server.js.map +0 -1
- package/dist/mcp/setup.js.map +0 -1
- package/dist/mcp/tools.js.map +0 -1
- package/dist/mcp/types.js.map +0 -1
- package/dist/mcp/verify.js.map +0 -1
- package/dist/portability/bundle.js.map +0 -1
- package/dist/prompts/onboarding.js.map +0 -1
- package/dist/prompts/refresh.js.map +0 -1
- package/dist/prompts/requirements.js.map +0 -1
- package/dist/security/files.js.map +0 -1
- package/dist/security/redact.js.map +0 -1
- package/dist/services/agent.js.map +0 -1
- package/dist/services/analysis.js.map +0 -1
- package/dist/services/common.js.map +0 -1
- package/dist/services/doctor.js.map +0 -1
- package/dist/services/drift.js.map +0 -1
- package/dist/services/features.js.map +0 -1
- package/dist/services/graph.js.map +0 -1
- package/dist/services/init.js.map +0 -1
- package/dist/services/integrations.js.map +0 -1
- package/dist/services/intelligence.js.map +0 -1
- package/dist/services/knowledge.js.map +0 -1
- package/dist/services/migrate.js.map +0 -1
- package/dist/services/portability.js.map +0 -1
- package/dist/services/records.js.map +0 -1
- package/dist/services/refresh.js.map +0 -1
- package/dist/services/reset.js.map +0 -1
- package/dist/services/setup.js.map +0 -1
- package/dist/services/standards.js.map +0 -1
- package/dist/services/status.js.map +0 -1
- package/dist/services/taskContext.js.map +0 -1
- package/dist/services/tasks.js.map +0 -1
- package/dist/services/verify.js.map +0 -1
- package/dist/sessions/session.js.map +0 -1
- package/dist/standards/acquisition/ingest.js.map +0 -1
- package/dist/standards/applicability/engine.js.map +0 -1
- package/dist/standards/builtin/code-quality.js.map +0 -1
- package/dist/standards/builtin/database-safety.js.map +0 -1
- package/dist/standards/builtin/index.js.map +0 -1
- package/dist/standards/builtin/security-baseline.js.map +0 -1
- package/dist/standards/builtin/testing-contracts.js.map +0 -1
- package/dist/standards/builtin/undo-kit.js.map +0 -1
- package/dist/standards/config/config.js.map +0 -1
- package/dist/standards/distribution/cache.js.map +0 -1
- package/dist/standards/distribution/index.js.map +0 -1
- package/dist/standards/distribution/keys.js.map +0 -1
- package/dist/standards/distribution/package.js.map +0 -1
- package/dist/standards/distribution/server.js.map +0 -1
- package/dist/standards/distribution/sync.js.map +0 -1
- package/dist/standards/distribution/types.js.map +0 -1
- package/dist/standards/engine/compliance.js.map +0 -1
- package/dist/standards/engine/engine.js.map +0 -1
- package/dist/standards/engine/reporter.js.map +0 -1
- package/dist/standards/index.js.map +0 -1
- package/dist/standards/registry/registry.js.map +0 -1
- package/dist/standards/schema/types.js.map +0 -1
- package/dist/standards/schema/validate.js.map +0 -1
- package/dist/standards/templates/index.js.map +0 -1
- package/dist/standards/validators/database.js.map +0 -1
- package/dist/standards/validators/quality.js.map +0 -1
- package/dist/standards/validators/registry.js.map +0 -1
- package/dist/standards/validators/security.js.map +0 -1
- package/dist/standards/validators/testing.js.map +0 -1
- package/dist/standards/validators/types.js.map +0 -1
- package/dist/standards/validators/undo-kit.js.map +0 -1
- package/dist/tasks/routing.js.map +0 -1
- package/dist/tasks/task.js.map +0 -1
- package/dist/utils/cleanup.js.map +0 -1
- package/dist/utils/fs.js.map +0 -1
- package/dist/utils/lock.js.map +0 -1
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/paths.js.map +0 -1
- package/dist/utils/proc.js.map +0 -1
- package/dist/verification/safety.js.map +0 -1
- package/dist/verification/scope.js.map +0 -1
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { DevWorkspaceError } from '../errors/index.js';
|
|
3
|
+
import { migrateData, MIGRATIONS } from '../core/migrations.js';
|
|
4
|
+
import { backupIfVersionChanges } from '../core/workspace.js';
|
|
5
|
+
import { atomicWriteJson, pathExists, readJsonFile } from '../utils/fs.js';
|
|
6
|
+
import { FEATURE_REGISTRY, SETUP_PRESETS, getFeatureDefinition, presetFeaturesFromRegistry, resolveFeatureSelectionGraph, } from './feature-registry.js';
|
|
7
|
+
export { SETUP_PRESETS };
|
|
8
|
+
export const SETTINGS_SCHEMA_VERSION = 1;
|
|
9
|
+
export const SETUP_AGENT_CHOICES = [
|
|
10
|
+
'auto',
|
|
11
|
+
'claude-code',
|
|
12
|
+
'codex',
|
|
13
|
+
'cursor',
|
|
14
|
+
'copilot',
|
|
15
|
+
'antigravity',
|
|
16
|
+
'all',
|
|
17
|
+
'none',
|
|
18
|
+
];
|
|
19
|
+
export const CORE_FEATURE_IDS = ['core.workspace', 'core.discovery', 'core.security'];
|
|
20
|
+
export const PRESET_DESCRIPTIONS = {
|
|
21
|
+
minimal: {
|
|
22
|
+
title: 'Minimal',
|
|
23
|
+
summary: 'Project context, test discovery, and safety basics only (no agent or extra tool installs).',
|
|
24
|
+
},
|
|
25
|
+
recommended: {
|
|
26
|
+
title: 'Recommended',
|
|
27
|
+
summary: 'Minimal + task/decision workflows + connect one coding agent.',
|
|
28
|
+
},
|
|
29
|
+
full: {
|
|
30
|
+
title: 'Full',
|
|
31
|
+
summary: 'Recommended + all built-in capabilities (standards, feature maps, graph, dashboard, orchestration); external tools still ask consent.',
|
|
32
|
+
},
|
|
33
|
+
custom: {
|
|
34
|
+
title: 'Custom',
|
|
35
|
+
summary: 'Choose individual capabilities and integrations.',
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
export const PRESET_DEFAULT_FEATURES = {
|
|
39
|
+
minimal: [...CORE_FEATURE_IDS],
|
|
40
|
+
recommended: [...CORE_FEATURE_IDS, 'workflow.tasks', 'workflow.decisions'],
|
|
41
|
+
full: [
|
|
42
|
+
...CORE_FEATURE_IDS,
|
|
43
|
+
'workflow.tasks',
|
|
44
|
+
'workflow.decisions',
|
|
45
|
+
'workflow.standards',
|
|
46
|
+
'intelligence.features',
|
|
47
|
+
'intelligence.graph',
|
|
48
|
+
'intelligence.orchestration',
|
|
49
|
+
'dx.dashboard',
|
|
50
|
+
],
|
|
51
|
+
};
|
|
52
|
+
const FORBIDDEN_SECRET_KEY_RE = /(secret|token|password|passwd|api.?key|credential|private.?key)/i;
|
|
53
|
+
function assertSafeFeatureConfig(featureConfig) {
|
|
54
|
+
for (const [featureId, entries] of Object.entries(featureConfig)) {
|
|
55
|
+
if (typeof entries !== 'object' || entries === null || Array.isArray(entries)) {
|
|
56
|
+
throw new DevWorkspaceError('SCHEMA', `Invalid settings.json: featureConfig.${featureId} must be an object.`);
|
|
57
|
+
}
|
|
58
|
+
for (const [k, v] of Object.entries(entries)) {
|
|
59
|
+
if (FORBIDDEN_SECRET_KEY_RE.test(k)) {
|
|
60
|
+
throw new DevWorkspaceError('SECURITY', `Secrets cannot be stored in settings.json (rejected key "${k}").`);
|
|
61
|
+
}
|
|
62
|
+
if (typeof v !== 'string' && typeof v !== 'number' && typeof v !== 'boolean') {
|
|
63
|
+
throw new DevWorkspaceError('SCHEMA', `Invalid settings.json: featureConfig.${featureId}.${k} must be primitive.`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export function validateWorkspaceSettings(v, file = 'settings.json') {
|
|
69
|
+
if (typeof v !== 'object' || v === null || Array.isArray(v)) {
|
|
70
|
+
throw new DevWorkspaceError('SCHEMA', `Invalid ${file}: expected a JSON object.`);
|
|
71
|
+
}
|
|
72
|
+
const o = v;
|
|
73
|
+
if (typeof o.schemaVersion !== 'number' || !Number.isInteger(o.schemaVersion) || o.schemaVersion < 1) {
|
|
74
|
+
throw new DevWorkspaceError('SCHEMA', `Invalid ${file}: schemaVersion must be an integer >= 1.`);
|
|
75
|
+
}
|
|
76
|
+
if (typeof o.preset !== 'string' || !SETUP_PRESETS.includes(o.preset)) {
|
|
77
|
+
throw new DevWorkspaceError('SCHEMA', `Invalid ${file}: preset must be one of ${SETUP_PRESETS.join(', ')}.`);
|
|
78
|
+
}
|
|
79
|
+
if (typeof o.agent !== 'object' || o.agent === null || Array.isArray(o.agent)) {
|
|
80
|
+
throw new DevWorkspaceError('SCHEMA', `Invalid ${file}: agent must be an object.`);
|
|
81
|
+
}
|
|
82
|
+
const ag = o.agent;
|
|
83
|
+
if (ag.selected !== null && typeof ag.selected !== 'string') {
|
|
84
|
+
throw new DevWorkspaceError('SCHEMA', `Invalid ${file}: agent.selected must be a string or null.`);
|
|
85
|
+
}
|
|
86
|
+
if (!['mcp', 'instructions', 'both', 'none'].includes(String(ag.method))) {
|
|
87
|
+
throw new DevWorkspaceError('SCHEMA', `Invalid ${file}: agent.method is invalid.`);
|
|
88
|
+
}
|
|
89
|
+
if (!['project', 'user'].includes(String(ag.scope))) {
|
|
90
|
+
throw new DevWorkspaceError('SCHEMA', `Invalid ${file}: agent.scope must be project or user.`);
|
|
91
|
+
}
|
|
92
|
+
if (!Array.isArray(o.enabledFeatures) || !o.enabledFeatures.every((x) => typeof x === 'string')) {
|
|
93
|
+
throw new DevWorkspaceError('SCHEMA', `Invalid ${file}: enabledFeatures must be a string array.`);
|
|
94
|
+
}
|
|
95
|
+
if (!Array.isArray(o.disabledFeatures) || !o.disabledFeatures.every((x) => typeof x === 'string')) {
|
|
96
|
+
throw new DevWorkspaceError('SCHEMA', `Invalid ${file}: disabledFeatures must be a string array.`);
|
|
97
|
+
}
|
|
98
|
+
if (!Array.isArray(o.integrationsConsented) || !o.integrationsConsented.every((x) => typeof x === 'string')) {
|
|
99
|
+
throw new DevWorkspaceError('SCHEMA', `Invalid ${file}: integrationsConsented must be a string array.`);
|
|
100
|
+
}
|
|
101
|
+
const fc = (o.featureConfig ?? {});
|
|
102
|
+
assertSafeFeatureConfig(fc);
|
|
103
|
+
for (const configNamespace of Object.keys(fc)) {
|
|
104
|
+
if (configNamespace !== 'dx' && !getFeatureDefinition(configNamespace)) {
|
|
105
|
+
throw new DevWorkspaceError('SCHEMA', `Invalid ${file}: unknown module "${configNamespace}" in featureConfig.`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (typeof o.updatedAt !== 'string' || !Number.isFinite(Date.parse(o.updatedAt))) {
|
|
109
|
+
throw new DevWorkspaceError('SCHEMA', `Invalid ${file}: updatedAt must be an ISO timestamp.`);
|
|
110
|
+
}
|
|
111
|
+
if (!['wizard', 'cli', 'migration', 'default'].includes(String(o.source))) {
|
|
112
|
+
throw new DevWorkspaceError('SCHEMA', `Invalid ${file}: source is invalid.`);
|
|
113
|
+
}
|
|
114
|
+
validateSettingsFeatureCoherence(o.enabledFeatures, o.disabledFeatures, o.integrationsConsented, file);
|
|
115
|
+
return o;
|
|
116
|
+
}
|
|
117
|
+
function validateSettingsFeatureCoherence(enabledFeatures, disabledFeatures, integrationsConsented, file) {
|
|
118
|
+
const enabledSet = new Set(enabledFeatures);
|
|
119
|
+
const disabledSet = new Set(disabledFeatures);
|
|
120
|
+
for (const id of enabledFeatures) {
|
|
121
|
+
if (!getFeatureDefinition(id)) {
|
|
122
|
+
throw new DevWorkspaceError('SCHEMA', `Invalid ${file}: unknown module "${id}" in enabledFeatures.`);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
for (const id of disabledFeatures) {
|
|
126
|
+
const def = getFeatureDefinition(id);
|
|
127
|
+
if (!def) {
|
|
128
|
+
throw new DevWorkspaceError('SCHEMA', `Invalid ${file}: unknown module "${id}" in disabledFeatures.`);
|
|
129
|
+
}
|
|
130
|
+
if (!def.canDisable) {
|
|
131
|
+
throw new DevWorkspaceError('SECURITY', `Invalid ${file}: mandatory core module "${id}" (${def.name}) cannot be disabled.`);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
for (const rawId of integrationsConsented) {
|
|
135
|
+
const mapped = rawId.startsWith('integration.') ? rawId : `integration.${rawId}`;
|
|
136
|
+
const def = getFeatureDefinition(rawId) ?? getFeatureDefinition(mapped);
|
|
137
|
+
if (!def || def.category !== 'integration') {
|
|
138
|
+
throw new DevWorkspaceError('SCHEMA', `Invalid ${file}: unknown integration "${rawId}" in integrationsConsented.`);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
for (const def of FEATURE_REGISTRY) {
|
|
142
|
+
if (!def.canDisable && !enabledSet.has(def.id)) {
|
|
143
|
+
throw new DevWorkspaceError('SECURITY', `Invalid ${file}: mandatory core module "${def.id}" (${def.name}) must be included in enabledFeatures.`);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
for (const id of enabledSet) {
|
|
147
|
+
if (disabledSet.has(id)) {
|
|
148
|
+
throw new DevWorkspaceError('SCHEMA', `Invalid ${file}: module "${id}" cannot be listed in both enabledFeatures and disabledFeatures.`);
|
|
149
|
+
}
|
|
150
|
+
const def = getFeatureDefinition(id);
|
|
151
|
+
for (const depId of def.requires) {
|
|
152
|
+
if (disabledSet.has(depId)) {
|
|
153
|
+
throw new DevWorkspaceError('SCHEMA', `Invalid ${file}: enabled module "${id}" requires "${depId}", which is disabled.`, { hint: `Enable "${depId}" or run: devworkspace modules enable ${id}` });
|
|
154
|
+
}
|
|
155
|
+
if (!enabledSet.has(depId)) {
|
|
156
|
+
throw new DevWorkspaceError('SCHEMA', `Invalid ${file}: enabled module "${id}" requires missing dependency "${depId}".`, { hint: `Add "${depId}" to enabledFeatures or run: devworkspace modules enable ${id}` });
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
for (const conflictId of def.conflicts ?? []) {
|
|
160
|
+
if (enabledSet.has(conflictId)) {
|
|
161
|
+
throw new DevWorkspaceError('SCHEMA', `Invalid ${file}: enabled modules "${id}" and "${conflictId}" conflict and cannot both be active.`);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
export function defaultSettingsForPreset(preset, opts = {}) {
|
|
167
|
+
const baseRequested = preset === 'custom'
|
|
168
|
+
? [...(opts.customFeatures ?? [])]
|
|
169
|
+
: [...presetFeaturesFromRegistry(preset)];
|
|
170
|
+
if (opts.agentSelected && opts.agentMethod !== 'none') {
|
|
171
|
+
if (opts.agentMethod === 'mcp' || opts.agentMethod === 'both')
|
|
172
|
+
baseRequested.push('agent.mcp');
|
|
173
|
+
if (opts.agentMethod === 'instructions' || opts.agentMethod === 'both')
|
|
174
|
+
baseRequested.push('agent.instructions');
|
|
175
|
+
}
|
|
176
|
+
for (const intId of opts.integrationsConsented ?? []) {
|
|
177
|
+
const mapped = intId.startsWith('integration.') ? intId : `integration.${intId}`;
|
|
178
|
+
if (FEATURE_REGISTRY.some((f) => f.id === mapped)) {
|
|
179
|
+
baseRequested.push(mapped);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
const resolved = resolveFeatureSelectionGraph({ requestedEnable: baseRequested });
|
|
183
|
+
return {
|
|
184
|
+
schemaVersion: SETTINGS_SCHEMA_VERSION,
|
|
185
|
+
preset,
|
|
186
|
+
agent: {
|
|
187
|
+
selected: opts.agentSelected ?? null,
|
|
188
|
+
method: opts.agentSelected ? (opts.agentMethod ?? 'mcp') : 'none',
|
|
189
|
+
scope: opts.scope ?? 'project',
|
|
190
|
+
},
|
|
191
|
+
enabledFeatures: resolved.enabled,
|
|
192
|
+
disabledFeatures: resolved.disabled,
|
|
193
|
+
integrationsConsented: [...new Set(opts.integrationsConsented ?? [])],
|
|
194
|
+
featureConfig: {},
|
|
195
|
+
updatedAt: opts.updatedAt ?? new Date().toISOString(),
|
|
196
|
+
source: opts.source ?? 'default',
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
/** Infer non-destructive defaults for an existing workspace created before settings.json existed. */
|
|
200
|
+
export async function inferLegacyWorkspaceSettings(ws) {
|
|
201
|
+
const hasMcpJson = await pathExists(`${ws.root}/.mcp.json`);
|
|
202
|
+
const hasCodex = await pathExists(`${ws.root}/.codex/config.toml`);
|
|
203
|
+
const hasCursor = await pathExists(`${ws.root}/.cursor/rules/devworkspace.mdc`);
|
|
204
|
+
const hasCopilot = await pathExists(`${ws.root}/.github/copilot-instructions.md`);
|
|
205
|
+
let selected = null;
|
|
206
|
+
let method = 'none';
|
|
207
|
+
if (hasMcpJson) {
|
|
208
|
+
selected = 'claude-code';
|
|
209
|
+
method = 'mcp';
|
|
210
|
+
}
|
|
211
|
+
else if (hasCodex) {
|
|
212
|
+
selected = 'codex';
|
|
213
|
+
method = 'mcp';
|
|
214
|
+
}
|
|
215
|
+
else if (hasCursor) {
|
|
216
|
+
selected = 'cursor';
|
|
217
|
+
method = 'instructions';
|
|
218
|
+
}
|
|
219
|
+
else if (hasCopilot) {
|
|
220
|
+
selected = 'copilot';
|
|
221
|
+
method = 'instructions';
|
|
222
|
+
}
|
|
223
|
+
const settings = defaultSettingsForPreset('recommended', {
|
|
224
|
+
agentSelected: selected,
|
|
225
|
+
agentMethod: method,
|
|
226
|
+
source: 'migration',
|
|
227
|
+
});
|
|
228
|
+
const dxPath = path.join(ws.root, '.devworkspace', 'state', 'dx-preferences.json');
|
|
229
|
+
if (await pathExists(dxPath)) {
|
|
230
|
+
try {
|
|
231
|
+
const dx = await readJsonFile(dxPath);
|
|
232
|
+
if (dx && typeof dx.experienceLevel === 'string' && typeof dx.privacyMode === 'string') {
|
|
233
|
+
settings.featureConfig.dx = {
|
|
234
|
+
experienceLevel: dx.experienceLevel,
|
|
235
|
+
privacyMode: dx.privacyMode,
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
catch {
|
|
240
|
+
// Ignore unreadable legacy DX preferences file without failing migration
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
return settings;
|
|
244
|
+
}
|
|
245
|
+
/** Strictly load and validate .devworkspace/settings.json, failing closed if persisted settings are invalid. */
|
|
246
|
+
export async function loadWorkspaceSettingsStrict(ws) {
|
|
247
|
+
if (!(await pathExists(ws.settings))) {
|
|
248
|
+
const inferred = await inferLegacyWorkspaceSettings(ws);
|
|
249
|
+
return {
|
|
250
|
+
settings: inferred,
|
|
251
|
+
persisted: false,
|
|
252
|
+
migratedFromLegacy: await pathExists(ws.projectJson),
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
const raw = await readJsonFile(ws.settings);
|
|
256
|
+
const { data } = migrateData(raw, SETTINGS_SCHEMA_VERSION, MIGRATIONS.settings ?? [], 'settings.json');
|
|
257
|
+
return {
|
|
258
|
+
settings: validateWorkspaceSettings(data),
|
|
259
|
+
persisted: true,
|
|
260
|
+
migratedFromLegacy: false,
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
/** Load .devworkspace/settings.json safely for inspection without overwriting malformed user data. */
|
|
264
|
+
export async function loadWorkspaceSettingsSafe(ws) {
|
|
265
|
+
if (!(await pathExists(ws.settings))) {
|
|
266
|
+
const inferred = await inferLegacyWorkspaceSettings(ws);
|
|
267
|
+
return {
|
|
268
|
+
settings: inferred,
|
|
269
|
+
persisted: false,
|
|
270
|
+
migratedFromLegacy: await pathExists(ws.projectJson),
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
try {
|
|
274
|
+
return await loadWorkspaceSettingsStrict(ws);
|
|
275
|
+
}
|
|
276
|
+
catch (err) {
|
|
277
|
+
if (err instanceof DevWorkspaceError && err.code === 'SCHEMA_TOO_NEW') {
|
|
278
|
+
throw err;
|
|
279
|
+
}
|
|
280
|
+
const fallback = await inferLegacyWorkspaceSettings(ws);
|
|
281
|
+
return {
|
|
282
|
+
settings: fallback,
|
|
283
|
+
persisted: false,
|
|
284
|
+
migratedFromLegacy: false,
|
|
285
|
+
recoveryWarning: `Existing .devworkspace/settings.json is invalid or malformed (${err.message}); using safe defaults without overwriting it.`,
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
export async function saveWorkspaceSettings(ws, next) {
|
|
290
|
+
const validated = validateWorkspaceSettings(next);
|
|
291
|
+
await backupIfVersionChanges(ws, ws.settings, validated.schemaVersion);
|
|
292
|
+
await atomicWriteJson(ws.settings, validated);
|
|
293
|
+
}
|
package/dist/config/validate.js
CHANGED
package/dist/core/artifacts.js
CHANGED
package/dist/core/contracts.js
CHANGED
package/dist/core/migrations.js
CHANGED
package/dist/core/version.js
CHANGED
package/dist/core/versioned.js
CHANGED
package/dist/core/workspace.d.ts
CHANGED
package/dist/core/workspace.js
CHANGED
|
@@ -12,6 +12,7 @@ export function wsPaths(root) {
|
|
|
12
12
|
root,
|
|
13
13
|
dir,
|
|
14
14
|
projectJson: j('project.json'),
|
|
15
|
+
settings: j('settings.json'),
|
|
15
16
|
contextDir: j('context'),
|
|
16
17
|
facts: j('context', 'facts.json'),
|
|
17
18
|
commands: j('context', 'commands.json'),
|
|
@@ -92,4 +93,3 @@ export const LOCAL_GITIGNORE = [
|
|
|
92
93
|
'*.tmp',
|
|
93
94
|
'',
|
|
94
95
|
].join('\n');
|
|
95
|
-
//# sourceMappingURL=workspace.js.map
|
package/dist/discovery/cache.js
CHANGED
package/dist/discovery/detect.js
CHANGED
package/dist/discovery/docs.js
CHANGED
|
@@ -49,4 +49,3 @@ export function detectDocs(files, packageDirs) {
|
|
|
49
49
|
const all = [...found].sort((a, b) => priority(a) - priority(b) || a.localeCompare(b));
|
|
50
50
|
return { docs: all.slice(0, MAX_DOCS).sort(), omitted: Math.max(0, all.length - MAX_DOCS) };
|
|
51
51
|
}
|
|
52
|
-
//# sourceMappingURL=docs.js.map
|
|
@@ -64,4 +64,3 @@ export function discoverEntryPoints(packages, files) {
|
|
|
64
64
|
const order = { server: 0, worker: 1, main: 2, cli: 3 };
|
|
65
65
|
return [...found.values()].sort((a, b) => a.cwd.localeCompare(b.cwd) || order[a.kind] - order[b.kind] || a.path.localeCompare(b.path)).slice(0, 60);
|
|
66
66
|
}
|
|
67
|
-
//# sourceMappingURL=entrypoints.js.map
|
package/dist/discovery/ignore.js
CHANGED
package/dist/discovery/scan.js
CHANGED
package/dist/discovery/types.js
CHANGED
package/dist/dx/dashboard.js
CHANGED
|
@@ -4,6 +4,7 @@ import { runDoctor } from '../services/doctor.js';
|
|
|
4
4
|
import { getStatus } from '../services/status.js';
|
|
5
5
|
import { StandardsEngine } from '../standards/engine/engine.js';
|
|
6
6
|
import { findWorkspaceRoot } from '../core/workspace.js';
|
|
7
|
+
import { assertModuleEnabled } from '../config/feature-gate.js';
|
|
7
8
|
import { ensureDir } from '../utils/fs.js';
|
|
8
9
|
import { resolveInside } from '../utils/paths.js';
|
|
9
10
|
import { buildGuidanceReport } from './onboarding.js';
|
|
@@ -262,6 +263,7 @@ export function renderLocalDashboardHtml(model) {
|
|
|
262
263
|
export async function writeLocalDashboardFile(cwd, outPath, opts) {
|
|
263
264
|
const resolvedCwd = path.resolve(cwd);
|
|
264
265
|
const root = (await findWorkspaceRoot(resolvedCwd)) ?? resolvedCwd;
|
|
266
|
+
await assertModuleEnabled(root, 'dx.dashboard', 'Generate local HTML dashboard');
|
|
265
267
|
const target = outPath
|
|
266
268
|
? resolveInside(root, outPath)
|
|
267
269
|
: path.join(root, '.devworkspace', 'local', 'dashboard.html');
|
|
@@ -271,4 +273,3 @@ export async function writeLocalDashboardFile(cwd, outPath, opts) {
|
|
|
271
273
|
await fs.writeFile(target, html, 'utf8');
|
|
272
274
|
return { filePath: target, model, bytes: Buffer.byteLength(html, 'utf8') };
|
|
273
275
|
}
|
|
274
|
-
//# sourceMappingURL=dashboard.js.map
|
package/dist/dx/guidance.js
CHANGED
|
@@ -263,4 +263,3 @@ export function buildSummaryForLevel(level, projectHealth, stage, nextStep) {
|
|
|
263
263
|
}
|
|
264
264
|
return `Your workspace is currently in the ${stage.toLowerCase().replace(/_/g, ' ')} stage (${projectHealth}). Follow the step below using your existing coding agent or terminal—no new IDE is required.`;
|
|
265
265
|
}
|
|
266
|
-
//# sourceMappingURL=guidance.js.map
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { type SetupPreset, type WorkspaceSettings } from '../config/settings.js';
|
|
2
|
+
import { type SetupResult } from '../integrations/index.js';
|
|
3
|
+
import { type McpLauncher, type McpSetupResult } from '../mcp/setup.js';
|
|
4
|
+
import { type AgentInstallResult } from '../services/agent.js';
|
|
5
|
+
import { type ServiceOptions } from '../services/common.js';
|
|
6
|
+
import { type DoctorResult } from '../services/doctor.js';
|
|
7
|
+
export interface SetupAgentCandidate {
|
|
8
|
+
id: 'claude-code' | 'codex' | 'cursor' | 'copilot' | 'antigravity';
|
|
9
|
+
label: string;
|
|
10
|
+
connectionMethod: 'mcp' | 'instructions';
|
|
11
|
+
scope: 'project' | 'user';
|
|
12
|
+
detected: boolean;
|
|
13
|
+
reason: string;
|
|
14
|
+
}
|
|
15
|
+
/** Detect coding agents configured or present in the workspace cleanly without network calls. */
|
|
16
|
+
export declare function detectSetupAgents(cwd: string, homeDir?: string): Promise<SetupAgentCandidate[]>;
|
|
17
|
+
export type GuidedSetupStage = 'init' | 'analysis' | 'settings' | 'agent' | 'integrations' | 'doctor';
|
|
18
|
+
export interface GuidedSetupStepStatus {
|
|
19
|
+
step: GuidedSetupStage;
|
|
20
|
+
status: 'succeeded' | 'failed' | 'skipped' | 'rolled-back';
|
|
21
|
+
detail?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface SetupRecoveryState {
|
|
24
|
+
status: 'PARTIAL';
|
|
25
|
+
preset: SetupPreset;
|
|
26
|
+
agent: string | null;
|
|
27
|
+
scope: 'project' | 'user';
|
|
28
|
+
failedStep: GuidedSetupStage;
|
|
29
|
+
error: string;
|
|
30
|
+
steps: GuidedSetupStepStatus[];
|
|
31
|
+
rolledBackFiles: string[];
|
|
32
|
+
irreversibleExternalNotes: string[];
|
|
33
|
+
failedAt: string;
|
|
34
|
+
}
|
|
35
|
+
export declare function readSetupRecoveryState(cwd: string): Promise<SetupRecoveryState | null>;
|
|
36
|
+
export interface GuidedSetupOptions extends ServiceOptions {
|
|
37
|
+
preset?: SetupPreset;
|
|
38
|
+
agent?: string;
|
|
39
|
+
features?: string[];
|
|
40
|
+
onlyIntegrations?: string[];
|
|
41
|
+
consentExternalInstalls?: boolean;
|
|
42
|
+
scope?: 'project' | 'user';
|
|
43
|
+
user?: boolean;
|
|
44
|
+
noVerify?: boolean;
|
|
45
|
+
launcher?: McpLauncher;
|
|
46
|
+
packageVersion?: string;
|
|
47
|
+
edit?: boolean;
|
|
48
|
+
source?: WorkspaceSettings['source'];
|
|
49
|
+
onStage?: (stage: GuidedSetupStage) => void | Promise<void>;
|
|
50
|
+
}
|
|
51
|
+
export interface GuidedSetupPreview {
|
|
52
|
+
root: string;
|
|
53
|
+
alreadyInitialized: boolean;
|
|
54
|
+
preset: SetupPreset;
|
|
55
|
+
agent: string | null;
|
|
56
|
+
agentMethod: WorkspaceSettings['agent']['method'];
|
|
57
|
+
scope: 'project' | 'user';
|
|
58
|
+
enabledFeatures: string[];
|
|
59
|
+
disabledFeatures: string[];
|
|
60
|
+
plannedFiles: Array<{
|
|
61
|
+
path: string;
|
|
62
|
+
kind: 'create' | 'update' | 'preserve' | 'unchanged' | 'conflict' | 'external';
|
|
63
|
+
note: string;
|
|
64
|
+
}>;
|
|
65
|
+
externalInstalls: Array<{
|
|
66
|
+
id: string;
|
|
67
|
+
name: string;
|
|
68
|
+
scope: 'project' | 'user';
|
|
69
|
+
description: string;
|
|
70
|
+
}>;
|
|
71
|
+
userLevelChanges: string[];
|
|
72
|
+
warnings: string[];
|
|
73
|
+
untouchedNotice: string;
|
|
74
|
+
}
|
|
75
|
+
export interface GuidedSetupResult {
|
|
76
|
+
root: string;
|
|
77
|
+
initialized: boolean;
|
|
78
|
+
dryRun: boolean;
|
|
79
|
+
cancelled: boolean;
|
|
80
|
+
applied: boolean;
|
|
81
|
+
preset: SetupPreset;
|
|
82
|
+
agent: string | null;
|
|
83
|
+
agentMethod: WorkspaceSettings['agent']['method'];
|
|
84
|
+
scope: 'project' | 'user';
|
|
85
|
+
settings: WorkspaceSettings;
|
|
86
|
+
preview: GuidedSetupPreview;
|
|
87
|
+
steps: GuidedSetupStepStatus[];
|
|
88
|
+
mcpResult?: McpSetupResult;
|
|
89
|
+
agentInstallResult?: AgentInstallResult;
|
|
90
|
+
integrationsResult?: SetupResult;
|
|
91
|
+
doctor?: DoctorResult;
|
|
92
|
+
restartRequired: boolean;
|
|
93
|
+
nextStep: string;
|
|
94
|
+
}
|
|
95
|
+
/** Pure read-only preview of all workspace, discovery, settings, agent, external tool, and user-level actions. */
|
|
96
|
+
export declare function planGuidedSetup(o: GuidedSetupOptions): Promise<GuidedSetupPreview>;
|
|
97
|
+
/**
|
|
98
|
+
* Execute guided setup with staged execution, pre-run file snapshots, reversible
|
|
99
|
+
* rollback for local managed files, and explicit partial-setup recovery tracking.
|
|
100
|
+
* Honors `dryRun` cleanly and never auto-uninstalls third-party external tools.
|
|
101
|
+
*/
|
|
102
|
+
export declare function applyGuidedSetup(o: GuidedSetupOptions): Promise<GuidedSetupResult>;
|