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
package/dist/services/setup.js
CHANGED
|
@@ -3,14 +3,14 @@ import path from 'node:path';
|
|
|
3
3
|
import { packageVersion } from '../core/version.js';
|
|
4
4
|
import { findWorkspaceRoot, loadProject, wsPaths } from '../core/workspace.js';
|
|
5
5
|
import { detectContractDrift } from '../discovery/commands.js';
|
|
6
|
+
import { validateFeatureMap } from '../features/validate.js';
|
|
6
7
|
import { inspectAll } from '../integrations/index.js';
|
|
7
8
|
import { pathExists } from '../utils/fs.js';
|
|
8
|
-
import { analyzeWorkspace } from './analysis.js';
|
|
9
|
+
import { analyzeWorkspace, runDiscovery } from './analysis.js';
|
|
9
10
|
import { managerEnv } from './common.js';
|
|
10
11
|
import { runDoctor } from './doctor.js';
|
|
11
12
|
import { loadFeatures } from './features.js';
|
|
12
13
|
import { initWorkspace } from './init.js';
|
|
13
|
-
import { validateFeatureMap } from '../features/validate.js';
|
|
14
14
|
export function detectCliProvenance() {
|
|
15
15
|
const cliPath = process.argv[1] ? path.resolve(process.argv[1]) : 'unknown';
|
|
16
16
|
const norm = cliPath.replace(/\\/g, '/');
|
|
@@ -19,7 +19,7 @@ export function detectCliProvenance() {
|
|
|
19
19
|
mode = 'npx-cache';
|
|
20
20
|
}
|
|
21
21
|
else if (norm.includes('/node_modules/')) {
|
|
22
|
-
mode = 'installed-package';
|
|
22
|
+
mode = 'installed-package';
|
|
23
23
|
}
|
|
24
24
|
else if (norm.includes('/devworkspace/dist/') || norm.endsWith('/dist/cli/main.js') || norm.endsWith('/src/cli/main.ts')) {
|
|
25
25
|
mode = 'source-checkout';
|
|
@@ -27,10 +27,9 @@ export function detectCliProvenance() {
|
|
|
27
27
|
return { version: packageVersion(), path: cliPath, mode };
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
* Single-command setup workflow.
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* observes optional integrations, and runs safe diagnostics.
|
|
30
|
+
* Single-command core setup workflow (non-destructive).
|
|
31
|
+
* Initializes or safely updates .devworkspace/, discovers packages & commands,
|
|
32
|
+
* checks contract drift, validates feature map if present, inspects integrations, and runs doctor.
|
|
34
33
|
*/
|
|
35
34
|
export async function setupProject(o) {
|
|
36
35
|
const startDir = o.cwd ? path.resolve(o.cwd) : process.cwd();
|
|
@@ -38,14 +37,16 @@ export async function setupProject(o) {
|
|
|
38
37
|
const root = existingRoot ?? startDir;
|
|
39
38
|
const isFirstRun = !existingRoot;
|
|
40
39
|
const cli = detectCliProvenance();
|
|
41
|
-
// 1. Initialize workspace non-destructively
|
|
40
|
+
// 1. Initialize workspace non-destructively (honors o.dryRun)
|
|
42
41
|
await initWorkspace({ ...o, cwd: root, root });
|
|
43
42
|
// 2. Discover packages, commands, frameworks, entrypoints, and derive detector facts
|
|
44
43
|
const ws = wsPaths(root);
|
|
45
|
-
const
|
|
44
|
+
const discoveryReport = o.dryRun && !(await pathExists(ws.projectJson))
|
|
45
|
+
? (await runDiscovery(ws, path.basename(root), undefined, { writeCache: false })).discovery
|
|
46
|
+
: (await analyzeWorkspace(ws, { ...o, cwd: root })).discovery;
|
|
46
47
|
// 3. Inspect configured verification commands and detect contract drift
|
|
47
|
-
const driftReport = await detectContractDrift(ws.root,
|
|
48
|
-
const availableChecks =
|
|
48
|
+
const driftReport = await detectContractDrift(ws.root, discoveryReport.commands);
|
|
49
|
+
const availableChecks = discoveryReport.commands.filter((c) => c.available);
|
|
49
50
|
// 4. Validate feature map if present
|
|
50
51
|
let featuresSummary = null;
|
|
51
52
|
if (await pathExists(ws.features)) {
|
|
@@ -63,7 +64,7 @@ export async function setupProject(o) {
|
|
|
63
64
|
featuresSummary = { present: true, total: 0, verified: 0, unknown: 0 };
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
|
-
// 5. Shallowly observe optional integrations (
|
|
67
|
+
// 5. Shallowly observe optional integrations (never installs external tools)
|
|
67
68
|
const integrationsReports = await inspectAll(ws, managerEnv(o, root), { deep: false });
|
|
68
69
|
const integrations = integrationsReports.map((r) => ({
|
|
69
70
|
id: r.id,
|
|
@@ -71,37 +72,49 @@ export async function setupProject(o) {
|
|
|
71
72
|
status: r.status,
|
|
72
73
|
required: r.required,
|
|
73
74
|
}));
|
|
74
|
-
// 6. Run doctor diagnostics
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
// 6. Run doctor diagnostics (in dryRun on uninitialized dir, avoid reading non-existent project.json)
|
|
76
|
+
let doctorResult;
|
|
77
|
+
if (o.dryRun && !(await pathExists(ws.projectJson))) {
|
|
78
|
+
doctorResult = {
|
|
79
|
+
root,
|
|
80
|
+
healthy: true,
|
|
81
|
+
ready: false,
|
|
82
|
+
fixed: [],
|
|
83
|
+
counts: { pass: 1, warn: 0, fail: 0, info: 0 },
|
|
84
|
+
checks: [{ id: 'dry-run', status: 'pass', message: 'Preview only (no files written).' }],
|
|
85
|
+
integrations: [],
|
|
86
|
+
integrationSummary: { complete: false, required: 0, verified: 0 },
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
doctorResult = await runDoctor({ ...o, cwd: root });
|
|
91
|
+
}
|
|
77
92
|
const nextSteps = [];
|
|
78
93
|
if (driftReport.hasDrift) {
|
|
79
94
|
nextSteps.push('Review verification contract drift: run "devworkspace refresh" or edit .devworkspace/context/commands.json.');
|
|
80
95
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
nextSteps.push(`Optional integrations: run "devworkspace setup --integrations --yes" to install ${missingRequired.map((m) => m.name).join(', ')}.`);
|
|
84
|
-
}
|
|
85
|
-
nextSteps.push('Connect an AI coding agent via MCP: run "devworkspace setup --agent claude-code" (or codex, antigravity, all).');
|
|
96
|
+
nextSteps.push('Connect a coding agent (optional): run "devworkspace setup --preset recommended --agent claude-code" (or codex, cursor, copilot, antigravity).');
|
|
97
|
+
nextSteps.push('Review settings any time: run "devworkspace settings".');
|
|
86
98
|
nextSteps.push('Check overall workspace health: run "devworkspace status".');
|
|
87
|
-
|
|
88
|
-
|
|
99
|
+
const projectName = (await pathExists(ws.projectJson))
|
|
100
|
+
? (await loadProject(ws)).name
|
|
101
|
+
: path.basename(root);
|
|
89
102
|
return {
|
|
90
103
|
root,
|
|
91
104
|
os: `${os.type()} ${os.release()} (${process.platform})`,
|
|
92
105
|
nodeVersion: process.versions.node,
|
|
93
106
|
cli,
|
|
94
|
-
initialized:
|
|
107
|
+
initialized: !o.dryRun || !isFirstRun,
|
|
95
108
|
isFirstRun,
|
|
96
|
-
projectName
|
|
97
|
-
packages:
|
|
109
|
+
projectName,
|
|
110
|
+
packages: discoveryReport.monorepo.packages.map((p) => ({
|
|
98
111
|
path: p.path,
|
|
99
112
|
ecosystem: p.ecosystem,
|
|
100
113
|
packageManager: p.packageManager,
|
|
101
114
|
})),
|
|
102
|
-
frameworks:
|
|
115
|
+
frameworks: discoveryReport.frameworks.map((f) => f.name),
|
|
103
116
|
verification: {
|
|
104
|
-
total:
|
|
117
|
+
total: discoveryReport.commands.length,
|
|
105
118
|
available: availableChecks.length,
|
|
106
119
|
checks: [...new Set(availableChecks.map((c) => c.id))],
|
|
107
120
|
drift: driftReport.issues,
|
|
@@ -117,4 +130,3 @@ export async function setupProject(o) {
|
|
|
117
130
|
nextSteps,
|
|
118
131
|
};
|
|
119
132
|
}
|
|
120
|
-
//# sourceMappingURL=setup.js.map
|
|
@@ -8,10 +8,12 @@ import { TEMPLATES } from '../standards/templates/index.js';
|
|
|
8
8
|
import { ingestStandardFromFile } from '../standards/acquisition/ingest.js';
|
|
9
9
|
import { validateStandard } from '../standards/schema/validate.js';
|
|
10
10
|
import { DevWorkspaceError } from '../errors/index.js';
|
|
11
|
+
import { assertModuleEnabled } from '../config/feature-gate.js';
|
|
11
12
|
import { loadProjectStandardsConfig, saveProjectStandardsConfig, } from '../standards/config/config.js';
|
|
12
13
|
export async function listStandardsService(opts, filter) {
|
|
13
14
|
const engine = new StandardsEngine();
|
|
14
15
|
const workspaceRoot = opts.cwd ? path.resolve(opts.cwd) : process.cwd();
|
|
16
|
+
await assertModuleEnabled(workspaceRoot, 'workflow.standards', 'List engineering standards');
|
|
15
17
|
try {
|
|
16
18
|
await engine.registry.loadProjectStandards(workspaceRoot);
|
|
17
19
|
}
|
|
@@ -39,6 +41,7 @@ export async function listStandardsService(opts, filter) {
|
|
|
39
41
|
export async function getStandardService(opts, id) {
|
|
40
42
|
const engine = new StandardsEngine();
|
|
41
43
|
const workspaceRoot = opts.cwd ? path.resolve(opts.cwd) : process.cwd();
|
|
44
|
+
await assertModuleEnabled(workspaceRoot, 'workflow.standards', `Show engineering standard "${id}"`);
|
|
42
45
|
await engine.registry.loadProjectStandards(workspaceRoot);
|
|
43
46
|
const found = engine.registry.get(id);
|
|
44
47
|
if (!found) {
|
|
@@ -50,11 +53,13 @@ export async function getStandardService(opts, id) {
|
|
|
50
53
|
}
|
|
51
54
|
export async function auditStandardsService(opts, filterStandardId) {
|
|
52
55
|
const ws = await requireWorkspace(opts.cwd);
|
|
56
|
+
await assertModuleEnabled(ws.root, 'workflow.standards', 'Audit engineering standards');
|
|
53
57
|
const engine = new StandardsEngine();
|
|
54
58
|
return engine.auditProject(ws.root, filterStandardId);
|
|
55
59
|
}
|
|
56
60
|
export async function applyStandardService(opts, id, flags) {
|
|
57
61
|
const ws = await requireWorkspace(opts.cwd);
|
|
62
|
+
await assertModuleEnabled(ws.root, 'workflow.standards', `Apply engineering standard "${id}"`);
|
|
58
63
|
const engine = new StandardsEngine();
|
|
59
64
|
await engine.registry.loadProjectStandards(ws.root);
|
|
60
65
|
const standard = engine.registry.get(id);
|
|
@@ -91,10 +96,12 @@ export async function applyStandardService(opts, id, flags) {
|
|
|
91
96
|
}
|
|
92
97
|
export async function addStandardService(opts, filePath, overrides) {
|
|
93
98
|
const ws = await requireWorkspace(opts.cwd);
|
|
99
|
+
await assertModuleEnabled(ws.root, 'workflow.standards', 'Add engineering standard');
|
|
94
100
|
return ingestStandardFromFile(ws.root, filePath, overrides);
|
|
95
101
|
}
|
|
96
102
|
export async function approveStandardService(opts, id) {
|
|
97
103
|
const ws = await requireWorkspace(opts.cwd);
|
|
104
|
+
await assertModuleEnabled(ws.root, 'workflow.standards', `Approve engineering standard "${id}"`);
|
|
98
105
|
const customPath = path.join(ws.root, '.devworkspace', 'standards', 'custom', `${id}.json`);
|
|
99
106
|
const globalPath = path.join(process.env.DEVWORKSPACE_HOME ?? os.homedir(), '.devworkspace', 'standards', `${id}.json`);
|
|
100
107
|
let targetPath = null;
|
|
@@ -144,6 +151,7 @@ export async function approveStandardService(opts, id) {
|
|
|
144
151
|
export async function updateStandardsService(opts) {
|
|
145
152
|
const engine = new StandardsEngine();
|
|
146
153
|
const workspaceRoot = opts.cwd ? path.resolve(opts.cwd) : process.cwd();
|
|
154
|
+
await assertModuleEnabled(workspaceRoot, 'workflow.standards', 'Update engineering standards');
|
|
147
155
|
const projectCount = await engine.registry.loadProjectStandards(workspaceRoot);
|
|
148
156
|
const total = engine.registry.list().length;
|
|
149
157
|
return {
|
|
@@ -157,6 +165,7 @@ export function validateStandardsRegistryService() {
|
|
|
157
165
|
}
|
|
158
166
|
export async function generateStandardsReportService(opts, outPath) {
|
|
159
167
|
const ws = await requireWorkspace(opts.cwd);
|
|
168
|
+
await assertModuleEnabled(ws.root, 'workflow.standards', 'Generate engineering standards report');
|
|
160
169
|
const engine = new StandardsEngine();
|
|
161
170
|
const report = await engine.auditProject(ws.root);
|
|
162
171
|
if (outPath) {
|
|
@@ -169,6 +178,7 @@ export async function generateStandardsReportService(opts, outPath) {
|
|
|
169
178
|
}
|
|
170
179
|
export async function runStandards(opts) {
|
|
171
180
|
const serviceOpts = { cwd: opts.workspaceDir ?? process.cwd() };
|
|
181
|
+
await assertModuleEnabled(serviceOpts.cwd, 'workflow.standards', `Run standards action "${opts.action}"`);
|
|
172
182
|
switch (opts.action) {
|
|
173
183
|
case 'list': {
|
|
174
184
|
const res = await listStandardsService(serviceOpts, {
|
|
@@ -227,4 +237,3 @@ export async function runStandards(opts) {
|
|
|
227
237
|
throw new DevWorkspaceError('USAGE', `Unknown standards action: ${opts.action}`);
|
|
228
238
|
}
|
|
229
239
|
}
|
|
230
|
-
//# sourceMappingURL=standards.js.map
|
package/dist/services/status.js
CHANGED
package/dist/services/tasks.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DevWorkspaceError } from '../errors/index.js';
|
|
2
|
+
import { assertModuleEnabled } from '../config/feature-gate.js';
|
|
2
3
|
import { loadProject, requireWorkspace } from '../core/workspace.js';
|
|
3
4
|
import { captureScope } from '../verification/scope.js';
|
|
4
5
|
import { gateContext, loadContract } from './verify.js';
|
|
@@ -6,6 +7,7 @@ import { classifyRequest, WORKFLOWS } from '../tasks/routing.js';
|
|
|
6
7
|
import { assertNoSecrets, createTaskObject, evaluateGate, nextRequiredStep, listTasks, loadTask, requiredChecksFor, saveTask, transitionTask, TASK_STATUSES, TASK_TYPES, VERIFY_STATUSES, } from '../tasks/task.js';
|
|
7
8
|
import { isoNow, mutate } from './common.js';
|
|
8
9
|
export async function createTask(o, input) {
|
|
10
|
+
await assertModuleEnabled(o.cwd, 'workflow.tasks', 'Create task');
|
|
9
11
|
return mutate(o, async (ws) => {
|
|
10
12
|
const project = await loadProject(ws);
|
|
11
13
|
const classification = classifyRequest(input.text);
|
|
@@ -40,15 +42,18 @@ export async function createTask(o, input) {
|
|
|
40
42
|
}
|
|
41
43
|
export async function showTask(o, id) {
|
|
42
44
|
const ws = await requireWorkspace(o.cwd);
|
|
45
|
+
await assertModuleEnabled(ws.root, 'workflow.tasks', 'Inspect task');
|
|
43
46
|
const task = await loadTask(ws, id);
|
|
44
47
|
const ctx = await gateContext(ws, task);
|
|
45
48
|
return { task, gate: evaluateGate(task, ctx), next: nextRequiredStep(task, ctx) };
|
|
46
49
|
}
|
|
47
50
|
export async function listTasksService(o, includeCompleted = false) {
|
|
48
51
|
const ws = await requireWorkspace(o.cwd);
|
|
52
|
+
await assertModuleEnabled(ws.root, 'workflow.tasks', 'List tasks');
|
|
49
53
|
return listTasks(ws, { includeCompleted });
|
|
50
54
|
}
|
|
51
55
|
export async function updateTask(o, id, patch) {
|
|
56
|
+
await assertModuleEnabled(o.cwd, 'workflow.tasks', 'Update task');
|
|
52
57
|
return mutate(o, async (ws) => {
|
|
53
58
|
const task = await loadTask(ws, id);
|
|
54
59
|
if (patch.title)
|
|
@@ -76,6 +81,7 @@ export async function updateTask(o, id, patch) {
|
|
|
76
81
|
});
|
|
77
82
|
}
|
|
78
83
|
export async function setTaskStatus(o, id, status, note) {
|
|
84
|
+
await assertModuleEnabled(o.cwd, 'workflow.tasks', 'Change task status');
|
|
79
85
|
const up = status.toUpperCase();
|
|
80
86
|
if (!TASK_STATUSES.includes(up)) {
|
|
81
87
|
throw new DevWorkspaceError('USAGE', `Unknown task status "${status}".`, { hint: `Use one of: ${TASK_STATUSES.join(', ')}.` });
|
|
@@ -90,6 +96,7 @@ export async function setTaskStatus(o, id, status, note) {
|
|
|
90
96
|
});
|
|
91
97
|
}
|
|
92
98
|
export async function recordVerification(o, id, check, result, extra = {}) {
|
|
99
|
+
await assertModuleEnabled(o.cwd, 'workflow.tasks', 'Record task verification');
|
|
93
100
|
const status = result.toUpperCase();
|
|
94
101
|
const normalized = status === 'SKIP' ? 'SKIPPED' : status;
|
|
95
102
|
if (!VERIFY_STATUSES.includes(normalized)) {
|
|
@@ -126,6 +133,7 @@ export async function recordVerification(o, id, check, result, extra = {}) {
|
|
|
126
133
|
});
|
|
127
134
|
}
|
|
128
135
|
export async function recordTests(o, id, phase, passed, failed) {
|
|
136
|
+
await assertModuleEnabled(o.cwd, 'workflow.tasks', 'Record test counts');
|
|
129
137
|
if (!Number.isInteger(passed) || !Number.isInteger(failed) || passed < 0 || failed < 0) {
|
|
130
138
|
throw new DevWorkspaceError('USAGE', '--passed and --failed must be non-negative integers.');
|
|
131
139
|
}
|
|
@@ -138,6 +146,7 @@ export async function recordTests(o, id, phase, passed, failed) {
|
|
|
138
146
|
});
|
|
139
147
|
}
|
|
140
148
|
export async function attestTask(o, id, flags) {
|
|
149
|
+
await assertModuleEnabled(o.cwd, 'workflow.tasks', 'Attest task');
|
|
141
150
|
return mutate(o, async (ws) => {
|
|
142
151
|
const task = await loadTask(ws, id);
|
|
143
152
|
task.attestations = { ...task.attestations, ...Object.fromEntries(Object.entries(flags).filter(([, v]) => v !== undefined)) };
|
|
@@ -146,4 +155,3 @@ export async function attestTask(o, id, flags) {
|
|
|
146
155
|
return task;
|
|
147
156
|
});
|
|
148
157
|
}
|
|
149
|
-
//# sourceMappingURL=tasks.js.map
|
package/dist/services/verify.js
CHANGED
|
@@ -3,6 +3,7 @@ import { SCHEMA_VERSION, validateCommands } from '../config/schemas.js';
|
|
|
3
3
|
import { requireWorkspace } from '../core/workspace.js';
|
|
4
4
|
import { readVersioned } from '../core/versioned.js';
|
|
5
5
|
import { DevWorkspaceError } from '../errors/index.js';
|
|
6
|
+
import { assertModuleEnabled } from '../config/feature-gate.js';
|
|
6
7
|
import { createRunner } from '../integrations/exec.js';
|
|
7
8
|
import { scrub } from '../integrations/manager.js';
|
|
8
9
|
import { loadTask, saveTask, assertNoSecrets } from '../tasks/task.js';
|
|
@@ -105,6 +106,7 @@ export async function resolveExecutable(found, name, platform, exists) {
|
|
|
105
106
|
*/
|
|
106
107
|
export async function runTaskCheck(o, id, check, opts = {}) {
|
|
107
108
|
const ws = await requireWorkspace(o.cwd);
|
|
109
|
+
await assertModuleEnabled(ws.root, 'workflow.tasks', `Run task check "${check}"`);
|
|
108
110
|
const task = await loadTask(ws, id);
|
|
109
111
|
const contract = await loadContract(ws);
|
|
110
112
|
const wanted = opts.package ? (opts.package === '.' || opts.package === '' ? '.' : opts.package.replace(/\/+$/, '')) : undefined;
|
|
@@ -204,6 +206,7 @@ function summarize(item, runs) {
|
|
|
204
206
|
}
|
|
205
207
|
// ---------- declared test environments ----------
|
|
206
208
|
export async function declareTestEnv(o, input) {
|
|
209
|
+
await assertModuleEnabled(o.cwd, 'workflow.tasks', 'Declare test environment');
|
|
207
210
|
if (!input.yes) {
|
|
208
211
|
throw new DevWorkspaceError('USAGE', 'Declaring a test environment is a statement that running these checks there is safe; confirm with --yes.', {
|
|
209
212
|
hint: 'DevWorkspace cannot verify a database target (it never reads connection settings). This records your assertion, locally, and nothing else.',
|
|
@@ -226,9 +229,11 @@ export async function declareTestEnv(o, input) {
|
|
|
226
229
|
return decl;
|
|
227
230
|
}
|
|
228
231
|
export async function listTestEnv(o) {
|
|
229
|
-
|
|
232
|
+
const ws = await requireWorkspace(o.cwd);
|
|
233
|
+
await assertModuleEnabled(ws.root, 'workflow.tasks', 'List test environments');
|
|
234
|
+
return loadTestEnv(ws);
|
|
230
235
|
}
|
|
231
236
|
export async function revokeTestEnv(o, pkg) {
|
|
237
|
+
await assertModuleEnabled(o.cwd, 'workflow.tasks', 'Revoke test environment');
|
|
232
238
|
return mutate(o, async (w) => removeDeclaration(w, pkg === '' ? '.' : pkg.replace(/\/+$/, '')));
|
|
233
239
|
}
|
|
234
|
-
//# sourceMappingURL=verify.js.map
|
package/dist/sessions/session.js
CHANGED
|
@@ -107,4 +107,3 @@ export class StandardsConfigManager {
|
|
|
107
107
|
export const loadProjectStandardsConfig = StandardsConfigManager.loadConfig.bind(StandardsConfigManager);
|
|
108
108
|
export const saveProjectStandardsConfig = StandardsConfigManager.saveConfig.bind(StandardsConfigManager);
|
|
109
109
|
export const isRuleExempted = StandardsConfigManager.hasException.bind(StandardsConfigManager);
|
|
110
|
-
//# sourceMappingURL=config.js.map
|
package/dist/standards/index.js
CHANGED
package/dist/tasks/routing.js
CHANGED
package/dist/tasks/task.js
CHANGED
package/dist/utils/cleanup.js
CHANGED
package/dist/utils/fs.js
CHANGED