devworkspace 0.4.5 → 0.5.1
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 +73 -0
- package/README.md +7 -0
- package/dist/cli/args.d.ts +30 -0
- package/dist/cli/args.js +10 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/help.js +134 -0
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/render.d.ts +6 -0
- package/dist/cli/render.js +106 -0
- package/dist/cli/render.js.map +1 -1
- package/dist/cli/run.js +351 -1
- package/dist/cli/run.js.map +1 -1
- package/dist/core/contracts.d.ts +70 -0
- package/dist/core/contracts.js +88 -0
- package/dist/core/contracts.js.map +1 -0
- package/dist/discovery/commands.d.ts +1 -1
- package/dist/discovery/commands.js.map +1 -1
- package/dist/discovery/detect.d.ts +2 -70
- package/dist/discovery/detect.js.map +1 -1
- package/dist/discovery/entrypoints.d.ts +2 -11
- package/dist/discovery/entrypoints.js.map +1 -1
- package/dist/discovery/types.d.ts +79 -0
- package/dist/discovery/types.js +2 -0
- package/dist/discovery/types.js.map +1 -0
- package/dist/dx/dashboard.d.ts +21 -0
- package/dist/dx/dashboard.js +274 -0
- package/dist/dx/dashboard.js.map +1 -0
- package/dist/dx/guidance.d.ts +21 -0
- package/dist/dx/guidance.js +266 -0
- package/dist/dx/guidance.js.map +1 -0
- package/dist/dx/index.d.ts +4 -0
- package/dist/dx/index.js +5 -0
- package/dist/dx/index.js.map +1 -0
- package/dist/dx/onboarding.d.ts +23 -0
- package/dist/dx/onboarding.js +155 -0
- package/dist/dx/onboarding.js.map +1 -0
- package/dist/dx/types.d.ts +70 -0
- package/dist/dx/types.js +3 -0
- package/dist/dx/types.js.map +1 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -1
- package/dist/integrations/persistentPath.d.ts +2 -9
- package/dist/integrations/persistentPath.js.map +1 -1
- package/dist/integrations/types.d.ts +4 -1
- package/dist/integrations/types.js.map +1 -1
- package/dist/intelligence/agents/profiles.d.ts +2 -0
- package/dist/intelligence/agents/profiles.js +326 -0
- package/dist/intelligence/agents/profiles.js.map +1 -0
- package/dist/intelligence/agents/registry.d.ts +15 -0
- package/dist/intelligence/agents/registry.js +108 -0
- package/dist/intelligence/agents/registry.js.map +1 -0
- package/dist/intelligence/agents/types.d.ts +43 -0
- package/dist/intelligence/agents/types.js +2 -0
- package/dist/intelligence/agents/types.js.map +1 -0
- package/dist/intelligence/observability/tracer.d.ts +13 -0
- package/dist/intelligence/observability/tracer.js +129 -0
- package/dist/intelligence/observability/tracer.js.map +1 -0
- package/dist/intelligence/observability/types.d.ts +38 -0
- package/dist/intelligence/observability/types.js +2 -0
- package/dist/intelligence/observability/types.js.map +1 -0
- package/dist/intelligence/orchestration/engine.d.ts +51 -0
- package/dist/intelligence/orchestration/engine.js +578 -0
- package/dist/intelligence/orchestration/engine.js.map +1 -0
- package/dist/intelligence/orchestration/lock-manager.d.ts +21 -0
- package/dist/intelligence/orchestration/lock-manager.js +70 -0
- package/dist/intelligence/orchestration/lock-manager.js.map +1 -0
- package/dist/intelligence/orchestration/store.d.ts +11 -0
- package/dist/intelligence/orchestration/store.js +73 -0
- package/dist/intelligence/orchestration/store.js.map +1 -0
- package/dist/intelligence/orchestration/types.d.ts +111 -0
- package/dist/intelligence/orchestration/types.js +48 -0
- package/dist/intelligence/orchestration/types.js.map +1 -0
- package/dist/intelligence/routing/matcher.d.ts +7 -0
- package/dist/intelligence/routing/matcher.js +96 -0
- package/dist/intelligence/routing/matcher.js.map +1 -0
- package/dist/intelligence/routing/router.d.ts +9 -0
- package/dist/intelligence/routing/router.js +198 -0
- package/dist/intelligence/routing/router.js.map +1 -0
- package/dist/intelligence/routing/types.d.ts +64 -0
- package/dist/intelligence/routing/types.js +2 -0
- package/dist/intelligence/routing/types.js.map +1 -0
- package/dist/intelligence/runtime/adk/adapter.d.ts +7 -0
- package/dist/intelligence/runtime/adk/adapter.js +49 -0
- package/dist/intelligence/runtime/adk/adapter.js.map +1 -0
- package/dist/intelligence/runtime/adk/detector.d.ts +7 -0
- package/dist/intelligence/runtime/adk/detector.js +28 -0
- package/dist/intelligence/runtime/adk/detector.js.map +1 -0
- package/dist/intelligence/runtime/boundary.d.ts +30 -0
- package/dist/intelligence/runtime/boundary.js +163 -0
- package/dist/intelligence/runtime/boundary.js.map +1 -0
- package/dist/intelligence/runtime/external.d.ts +9 -0
- package/dist/intelligence/runtime/external.js +76 -0
- package/dist/intelligence/runtime/external.js.map +1 -0
- package/dist/intelligence/runtime/native.d.ts +19 -0
- package/dist/intelligence/runtime/native.js +67 -0
- package/dist/intelligence/runtime/native.js.map +1 -0
- package/dist/intelligence/runtime/types.d.ts +77 -0
- package/dist/intelligence/runtime/types.js +12 -0
- package/dist/intelligence/runtime/types.js.map +1 -0
- package/dist/intelligence/security/audit.d.ts +8 -0
- package/dist/intelligence/security/audit.js +43 -0
- package/dist/intelligence/security/audit.js.map +1 -0
- package/dist/intelligence/security/policy.d.ts +12 -0
- package/dist/intelligence/security/policy.js +153 -0
- package/dist/intelligence/security/policy.js.map +1 -0
- package/dist/intelligence/security/types.d.ts +25 -0
- package/dist/intelligence/security/types.js +2 -0
- package/dist/intelligence/security/types.js.map +1 -0
- package/dist/intelligence/skills/builtins.d.ts +2 -0
- package/dist/intelligence/skills/builtins.js +379 -0
- package/dist/intelligence/skills/builtins.js.map +1 -0
- package/dist/intelligence/skills/loader.d.ts +4 -0
- package/dist/intelligence/skills/loader.js +84 -0
- package/dist/intelligence/skills/loader.js.map +1 -0
- package/dist/intelligence/skills/registry.d.ts +15 -0
- package/dist/intelligence/skills/registry.js +134 -0
- package/dist/intelligence/skills/registry.js.map +1 -0
- package/dist/intelligence/skills/types.d.ts +35 -0
- package/dist/intelligence/skills/types.js +2 -0
- package/dist/intelligence/skills/types.js.map +1 -0
- package/dist/intelligence/verification/engine.d.ts +37 -0
- package/dist/intelligence/verification/engine.js +127 -0
- package/dist/intelligence/verification/engine.js.map +1 -0
- package/dist/intelligence/verification/reviewer.d.ts +8 -0
- package/dist/intelligence/verification/reviewer.js +55 -0
- package/dist/intelligence/verification/reviewer.js.map +1 -0
- package/dist/intelligence/verification/types.d.ts +43 -0
- package/dist/intelligence/verification/types.js +2 -0
- package/dist/intelligence/verification/types.js.map +1 -0
- package/dist/mcp/setup.d.ts +2 -4
- package/dist/mcp/setup.js.map +1 -1
- package/dist/mcp/tools.js +6 -6
- package/dist/mcp/tools.js.map +1 -1
- package/dist/mcp/types.d.ts +4 -0
- package/dist/mcp/types.js.map +1 -1
- package/dist/mcp/verify.d.ts +1 -1
- package/dist/mcp/verify.js.map +1 -1
- package/dist/security/redact.js +3 -2
- package/dist/security/redact.js.map +1 -1
- package/dist/services/doctor.js +4 -0
- package/dist/services/doctor.js.map +1 -1
- package/dist/services/intelligence.d.ts +44 -0
- package/dist/services/intelligence.js +119 -0
- package/dist/services/intelligence.js.map +1 -0
- package/dist/services/standards.d.ts +85 -0
- package/dist/services/standards.js +230 -0
- package/dist/services/standards.js.map +1 -0
- package/dist/services/taskContext.js +4 -0
- package/dist/services/taskContext.js.map +1 -1
- package/dist/standards/acquisition/ingest.d.ts +12 -0
- package/dist/standards/acquisition/ingest.js +98 -0
- package/dist/standards/acquisition/ingest.js.map +1 -0
- package/dist/standards/applicability/engine.d.ts +38 -0
- package/dist/standards/applicability/engine.js +250 -0
- package/dist/standards/applicability/engine.js.map +1 -0
- package/dist/standards/builtin/code-quality.d.ts +2 -0
- package/dist/standards/builtin/code-quality.js +53 -0
- package/dist/standards/builtin/code-quality.js.map +1 -0
- package/dist/standards/builtin/database-safety.d.ts +2 -0
- package/dist/standards/builtin/database-safety.js +56 -0
- package/dist/standards/builtin/database-safety.js.map +1 -0
- package/dist/standards/builtin/index.d.ts +8 -0
- package/dist/standards/builtin/index.js +14 -0
- package/dist/standards/builtin/index.js.map +1 -0
- package/dist/standards/builtin/security-baseline.d.ts +2 -0
- package/dist/standards/builtin/security-baseline.js +64 -0
- package/dist/standards/builtin/security-baseline.js.map +1 -0
- package/dist/standards/builtin/testing-contracts.d.ts +2 -0
- package/dist/standards/builtin/testing-contracts.js +54 -0
- package/dist/standards/builtin/testing-contracts.js.map +1 -0
- package/dist/standards/builtin/undo-kit.d.ts +8 -0
- package/dist/standards/builtin/undo-kit.js +106 -0
- package/dist/standards/builtin/undo-kit.js.map +1 -0
- package/dist/standards/config/config.d.ts +12 -0
- package/dist/standards/config/config.js +110 -0
- package/dist/standards/config/config.js.map +1 -0
- package/dist/standards/distribution/cache.d.ts +58 -0
- package/dist/standards/distribution/cache.js +425 -0
- package/dist/standards/distribution/cache.js.map +1 -0
- package/dist/standards/distribution/index.d.ts +6 -0
- package/dist/standards/distribution/index.js +7 -0
- package/dist/standards/distribution/index.js.map +1 -0
- package/dist/standards/distribution/keys.d.ts +53 -0
- package/dist/standards/distribution/keys.js +269 -0
- package/dist/standards/distribution/keys.js.map +1 -0
- package/dist/standards/distribution/package.d.ts +25 -0
- package/dist/standards/distribution/package.js +254 -0
- package/dist/standards/distribution/package.js.map +1 -0
- package/dist/standards/distribution/server.d.ts +38 -0
- package/dist/standards/distribution/server.js +204 -0
- package/dist/standards/distribution/server.js.map +1 -0
- package/dist/standards/distribution/sync.d.ts +56 -0
- package/dist/standards/distribution/sync.js +245 -0
- package/dist/standards/distribution/sync.js.map +1 -0
- package/dist/standards/distribution/types.d.ts +140 -0
- package/dist/standards/distribution/types.js +26 -0
- package/dist/standards/distribution/types.js.map +1 -0
- package/dist/standards/engine/compliance.d.ts +2 -0
- package/dist/standards/engine/compliance.js +45 -0
- package/dist/standards/engine/compliance.js.map +1 -0
- package/dist/standards/engine/engine.d.ts +14 -0
- package/dist/standards/engine/engine.js +114 -0
- package/dist/standards/engine/engine.js.map +1 -0
- package/dist/standards/engine/reporter.d.ts +2 -0
- package/dist/standards/engine/reporter.js +42 -0
- package/dist/standards/engine/reporter.js.map +1 -0
- package/dist/standards/index.d.ts +18 -0
- package/dist/standards/index.js +19 -0
- package/dist/standards/index.js.map +1 -0
- package/dist/standards/registry/registry.d.ts +29 -0
- package/dist/standards/registry/registry.js +210 -0
- package/dist/standards/registry/registry.js.map +1 -0
- package/dist/standards/schema/types.d.ts +133 -0
- package/dist/standards/schema/types.js +33 -0
- package/dist/standards/schema/types.js.map +1 -0
- package/dist/standards/schema/validate.d.ts +6 -0
- package/dist/standards/schema/validate.js +131 -0
- package/dist/standards/schema/validate.js.map +1 -0
- package/dist/standards/templates/index.d.ts +11 -0
- package/dist/standards/templates/index.js +176 -0
- package/dist/standards/templates/index.js.map +1 -0
- package/dist/standards/validators/database.d.ts +5 -0
- package/dist/standards/validators/database.js +122 -0
- package/dist/standards/validators/database.js.map +1 -0
- package/dist/standards/validators/quality.d.ts +6 -0
- package/dist/standards/validators/quality.js +91 -0
- package/dist/standards/validators/quality.js.map +1 -0
- package/dist/standards/validators/registry.d.ts +11 -0
- package/dist/standards/validators/registry.js +83 -0
- package/dist/standards/validators/registry.js.map +1 -0
- package/dist/standards/validators/security.d.ts +7 -0
- package/dist/standards/validators/security.js +182 -0
- package/dist/standards/validators/security.js.map +1 -0
- package/dist/standards/validators/testing.d.ts +6 -0
- package/dist/standards/validators/testing.js +142 -0
- package/dist/standards/validators/testing.js.map +1 -0
- package/dist/standards/validators/types.d.ts +11 -0
- package/dist/standards/validators/types.js +2 -0
- package/dist/standards/validators/types.js.map +1 -0
- package/dist/standards/validators/undo-kit.d.ts +7 -0
- package/dist/standards/validators/undo-kit.js +334 -0
- package/dist/standards/validators/undo-kit.js.map +1 -0
- package/dist/tasks/routing.js +5 -3
- package/dist/tasks/routing.js.map +1 -1
- package/dist/utils/fs.d.ts +1 -1
- package/dist/utils/fs.js.map +1 -1
- package/dist/utils/lock.js +11 -3
- package/dist/utils/lock.js.map +1 -1
- package/dist/utils/paths.js +29 -0
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/proc.d.ts +4 -0
- package/dist/utils/proc.js +60 -4
- package/dist/utils/proc.js.map +1 -1
- package/docs/agents.md +15 -0
- package/docs/contributing.md +13 -5
- package/docs/getting-started.md +7 -0
- package/docs/mcp.md +13 -0
- package/docs/security/HOME_SERVER_THREAT_MODEL.md +72 -0
- package/docs/security/THREAT_MODEL.md +101 -0
- package/docs/security.md +8 -2
- package/docs/standards.md +143 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guidance.js","sourceRoot":"","sources":["../../src/dx/guidance.ts"],"names":[],"mappings":"AAWA,MAAM,aAAa,GAA+C;IAChE,QAAQ,EAAE,CAAC;IACX,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IACT,GAAG,EAAE,CAAC;CACP,CAAC;AAEF,kFAAkF;AAClF,MAAM,UAAU,mBAAmB,CAAC,MAAoB,EAAE,MAA4B;IACpF,IAAI,CAAC,MAAM,CAAC,WAAW;QAAE,OAAO,eAAe,CAAC;IAChD,IAAI,MAAM,CAAC,SAAS,KAAK,YAAY,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;QACrE,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,IAAI,MAAM,CAAC,SAAS,CAAC,KAAK,KAAK,CAAC,EAAE,CAAC;QAC7D,OAAO,YAAY,CAAC;IACtB,CAAC;IACD,IAAI,MAAM,CAAC,SAAS,CAAC,KAAK,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC,EAAE,CAAC;QACrE,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IACD,IAAI,MAAM,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,OAAO,GAAG,CAAC,EAAE,CAAC;QAC5D,OAAO,oBAAoB,CAAC;IAC9B,CAAC;IACD,IAAI,MAAM,CAAC,YAAY,CAAC,IA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AACpC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,KAAsB,EACtB,aAAwC,EACxC,KAAqB,EACrB,QAA+B;IAE/B,IAAI,KAAK,KAAK,cAAc,EAAE,CAAC;QAC7B,OAAO,GAAG,aAAa,KAAK,KAAK,IAAI,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,WAAW,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAChG,CAAC;IACD,IAAI,KAAK,KAAK,QAAQ,EAAE,CAAC;QACvB,OAAO,gBAAgB,aAAa,CAAC,WAAW,EAAE,aAAa,KAAK,IAClE,QAAQ,CAAC,CAAC,CAAC,2BAA2B,QAAQ,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,EAC5D,EAAE,CAAC;IACL,CAAC;IACD,OAAO,sCAAsC,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,WAAW,aAAa,+FAA+F,CAAC;AAC7M,CAAC","sourcesContent":["import type { DoctorResult } from '../services/doctor.js';\nimport type { StatusResult } from '../services/status.js';\nimport type { StandardsAuditReport } from '../standards/schema/types.js';\nimport type {\n ComplexityTier,\n ExperienceLevel,\n GuidanceReport,\n LifecycleStage,\n Recommendation,\n} from './types.js';\n\nconst PRIORITY_RANK: Record<Recommendation['priority'], number> = {\n critical: 0,\n high: 1,\n medium: 2,\n low: 3,\n};\n\n/** Infers project lifecycle stage purely from observed status and diagnostics. */\nexport function inferLifecycleStage(status: StatusResult, doctor?: DoctorResult | null): LifecycleStage {\n if (!status.initialized) return 'UNINITIALIZED';\n if (status.workspace === 'Unreadable' || (doctor && !doctor.healthy)) {\n return 'NEEDS_ATTENTION';\n }\n if (!status.onboarding.ready || status.knowledge.facts === 0) {\n return 'ONBOARDING';\n }\n if (status.knowledge.stale > 0 || (doctor && doctor.counts.warn > 0)) {\n return 'NEEDS_ATTENTION';\n }\n if (status.activeTasks.length > 0 || status.git.changes > 0) {\n return 'ACTIVE_DEVELOPMENT';\n }\n if (status.verification.some((v) => v.available && v.required !== 'no')) {\n return 'PRE_RELEASE';\n }\n return 'INITIALIZED';\n}\n\n/** Infers repository complexity tier from task count, verification footprint, and workspace density. */\nexport function inferComplexityTier(status: StatusResult, packageCount = 1): ComplexityTier {\n const score =\n (packageCount > 1 ? 2 : 0) +\n (status.verification.filter((v) => v.available).length >= 3 ? 1 : 0) +\n (status.knowledge.facts >= 15 ? 1 : 0) +\n (status.activeTasks.length >= 3 ? 1 : 0);\n if (score >= 3) return 'complex';\n if (score >= 1) return 'standard';\n return 'simple';\n}\n\n/**\n * Generates strictly deduplicated, evidence-backed recommendations with source and confidence.\n * Never repeats advice or emits speculative recommendations lacking observed evidence.\n */\nexport function buildRecommendations(\n status: StatusResult,\n doctor?: DoctorResult | null,\n standardsAudit?: StandardsAuditReport | null,\n): Recommendation[] {\n const recs = new Map<string, Recommendation>();\n const add = (r: Recommendation): void => {\n if (!recs.has(r.id)) {\n recs.set(r.id, r);\n }\n };\n\n if (!status.initialized) {\n add({\n id: 'init.workspace',\n title: 'Initialize DevWorkspace in this repository',\n action: 'Create local workspace metadata and auto-detect repository stack and checks.',\n command: 'devworkspace setup',\n reason: 'No .devworkspace/ directory exists in the target repository.',\n verification: 'devworkspace status reports Workspace: Healthy.',\n evidence: ['Missing .devworkspace/project.json'],\n source: 'status',\n confidence: 'HIGH',\n priority: 'critical',\n });\n return Array.from(recs.values());\n }\n\n if (status.workspace === 'Unreadable') {\n add({\n id: 'repair.workspace',\n title: 'Inspect unreadable workspace metadata',\n action: 'Run diagnostics to locate malformed or corrupt workspace JSON.',\n command: 'devworkspace doctor',\n reason: status.workspaceProblem ?? 'Workspace metadata could not be parsed cleanly.',\n verification: 'devworkspace doctor reports healthy core workspace.',\n evidence: [status.workspaceProblem ?? '.devworkspace/project.json'],\n source: 'status',\n confidence: 'HIGH',\n priority: 'critical',\n });\n }\n\n if (doctor) {\n const failedChecks = doctor.checks.filter((c) => c.status === 'fail');\n for (const chk of failedChecks.slice(0, 3)) {\n add({\n id: `doctor.fail.${chk.id}`,\n title: `Resolve failing check: ${chk.id}`,\n action: chk.remediation ?? chk.message,\n command: 'devworkspace doctor --fix',\n reason: `Doctor check \"${chk.id}\" reported FAIL: ${chk.message}`,\n verification: 'devworkspace doctor exits 0 with 0 failed checks.',\n evidence: [`doctor:${chk.id}`],\n source: 'doctor',\n confidence: 'HIGH',\n priority: 'critical',\n });\n }\n }\n\n if (standardsAudit && standardsAudit.summary.failed > 0) {\n const firstFail = standardsAudit.results.find((r) => r.status === 'FAIL');\n add({\n id: 'standards.critical-failures',\n title: `Fix ${standardsAudit.summary.failed} failing engineering standard check(s)`,\n action: firstFail?.remediation ?? 'Review and remediate failing compliance checks.',\n command: 'devworkspace standards audit',\n reason: `Standards audit score is ${standardsAudit.summary.score}% (${standardsAudit.summary.failed} failed).`,\n verification: 'devworkspace standards audit exits 0 with 0 failures.',\n evidence: [firstFail ? `${firstFail.ruleId}: ${firstFail.message}` : 'standards:audit'],\n source: 'standards',\n confidence: 'HIGH',\n priority: 'high',\n });\n }\n\n if (!status.onboarding.instructionsInstalled) {\n add({\n id: 'onboarding.agent-setup',\n title: 'Wire your coding agent via MCP or instruction files',\n action: 'Configure your existing editor or CLI coding agent without changing IDEs.',\n command: 'devworkspace setup --agent auto',\n reason: 'No managed DevWorkspace agent instruction block detected.',\n verification: 'devworkspace status shows Onboarding instructions: installed.',\n evidence: ['CLAUDE.md / AGENTS.md / .cursor / copilot-instructions.md not configured'],\n source: 'status',\n confidence: 'HIGH',\n priority: 'high',\n });\n }\n\n if (status.knowledge.facts === 0 || !status.onboarding.knowledgeWritten) {\n add({\n id: 'onboarding.analyze',\n title: 'Build deterministic repository facts and verification contract',\n action: 'Analyze project manifests, entry points, and test scripts locally.',\n command: 'devworkspace analyze',\n reason:\n status.knowledge.facts === 0\n ? 'Knowledge base currently has 0 recorded facts.'\n : 'Architecture summary (.devworkspace/context/architecture.md) is incomplete.',\n verification: 'devworkspace status shows Knowledge: Current with detected facts.',\n evidence: [\n `facts=${status.knowledge.facts}`,\n `architectureWritten=${status.onboarding.knowledgeWritten}`,\n ],\n source: 'discovery',\n confidence: 'HIGH',\n priority: 'high',\n });\n }\n\n if (status.knowledge.stale > 0) {\n add({\n id: 'knowledge.refresh',\n title: `Refresh ${status.knowledge.stale} stale knowledge fact(s)`,\n action: 'Re-derive facts whose source files changed since the last analysis.',\n command: 'devworkspace refresh',\n reason: `${status.knowledge.stale} fact(s) cite modified or missing files.`,\n verification: 'devworkspace status shows 0 stale facts.',\n evidence: status.knowledge.staleItems.slice(0, 3).map((x) => `${x.key} (${x.reason})`),\n source: 'status',\n confidence: 'HIGH',\n priority: 'medium',\n });\n }\n\n if (status.activeTasks.length > 0) {\n const firstTask = status.activeTasks[0]!;\n add({\n id: `task.continue.${firstTask.id}`,\n title: `Continue active task ${firstTask.id}`,\n action: `Next required gate: ${firstTask.next}`,\n command: `devworkspace task show ${firstTask.id}`,\n reason: `Active task \"${firstTask.title}\" is currently in status ${firstTask.status}.`,\n verification: `Complete gate (${firstTask.next}) and transition ${firstTask.id} to COMPLETED.`,\n evidence: [`${firstTask.id}:${firstTask.status}`],\n source: 'tasks',\n confidence: 'HIGH',\n priority: 'medium',\n });\n }\n\n if (recs.size === 0) {\n add({\n id: 'workflow.start-task',\n title: 'Workspace is healthy and ready for engineering work',\n action: 'Use your coding agent normally or open a tracked task for verifiable changes.',\n command: 'devworkspace context --for \"<your task>\"',\n reason: 'Core workspace, knowledge base, and verification checks are healthy.',\n verification: 'Context output lists relevant facts and contract checks for your request.',\n evidence: [`facts=${status.knowledge.facts}`, `stale=${status.knowledge.stale}`],\n source: 'status',\n confidence: 'HIGH',\n priority: 'low',\n });\n }\n\n return Array.from(recs.values()).sort((a, b) => PRIORITY_RANK[a.priority] - PRIORITY_RANK[b.priority]);\n}\n\n/**\n * Adapts textual summary and guidance output to the user's experience level:\n * - professional: ultra-concise facts + commands, zero tutorial noise\n * - guided: balanced action + reason + verification\n * - beginner: welcoming, explanatory guidance detailing why and how to verify\n */\nexport function renderGuidanceText(report: GuidanceReport): string {\n const lines: string[] = [];\n\n if (report.experienceLevel === 'professional') {\n lines.push(\n `[${report.projectName ?? 'uninitialized'}] health=${report.projectHealth} stage=${report.lifecycleStage} tier=${report.complexityTier} privacy=${report.privacyMode}`,\n );\n lines.push(\n `facts=${report.diagnostics.staleFacts === 0 ? 'clean' : `${report.diagnostics.staleFacts}-stale`} tasks=${report.diagnostics.activeTasks} checks=${report.diagnostics.availableChecks} warn=${report.diagnostics.doctorWarnings} fail=${report.diagnostics.doctorFailures}`,\n );\n for (const r of report.recommendations) {\n lines.push(\n `[${r.priority.toUpperCase()}] ${r.command ?? r.action} — ${r.reason} (${r.confidence}|${r.source})`,\n );\n }\n return lines.join('\\n');\n }\n\n if (report.experienceLevel === 'guided') {\n lines.push(`DevWorkspace Guide — ${report.projectName ?? '(Not initialized)'}`);\n lines.push(`Health: ${report.projectHealth} | Lifecycle: ${report.lifecycleStage} | Privacy: ${report.privacyMode}`);\n lines.push(report.summary);\n lines.push('');\n lines.push('Recommended Actions:');\n for (let i = 0; i < report.recommendations.length; i++) {\n const r = report.recommendations[i]!;\n lines.push(`${i + 1}. [${r.priority.toUpperCase()}] ${r.title}`);\n if (r.command) lines.push(` Command: ${r.command}`);\n lines.push(` Why: ${r.reason} (Confidence: ${r.confidence}, Source: ${r.source})`);\n lines.push(` Verify with: ${r.verification}`);\n }\n if (report.essentialQuestions.length > 0 && !report.preferencesConfigured) {\n lines.push('');\n lines.push('Optional Preferences (set once):');\n for (const q of report.essentialQuestions) {\n lines.push(` - ${q.prompt} [${q.options.join(' | ')}] (default: ${q.defaultValue})`);\n }\n }\n return lines.join('\\n');\n }\n\n // Beginner mode: explanatory & educational without duplicating info\n lines.push(`Welcome to DevWorkspace — ${report.projectName ?? 'New Project Setup'}`);\n lines.push(`Current Status: ${report.projectHealth} (Stage: ${report.lifecycleStage})`);\n lines.push(`Privacy Guarantee: ${report.privacyMode} — all source code and knowledge stay strictly on your machine.`);\n lines.push('');\n lines.push(report.summary);\n lines.push('');\n lines.push('Step-by-Step Guidance:');\n for (let i = 0; i < report.recommendations.length; i++) {\n const r = report.recommendations[i]!;\n lines.push(`${i + 1}. ${r.title} [Priority: ${r.priority}]`);\n lines.push(` What to do: ${r.action}`);\n if (r.command) lines.push(` Run command: ${r.command}`);\n lines.push(` Why it helps: ${r.reason}`);\n lines.push(` Evidence: ${r.evidence.join('; ')} (${r.confidence} confidence via ${r.source})`);\n lines.push(` How to check: ${r.verification}`);\n lines.push('');\n }\n if (report.essentialQuestions.length > 0 && !report.preferencesConfigured) {\n lines.push('First-Run Setup Questions (optional — sensible defaults apply automatically):');\n for (const q of report.essentialQuestions) {\n lines.push(` • ${q.prompt}`);\n lines.push(` Options: ${q.options.join(', ')} (default: ${q.defaultValue}) — ${q.reason}`);\n }\n }\n return lines.join('\\n').trimEnd();\n}\n\nexport function buildSummaryForLevel(\n level: ExperienceLevel,\n projectHealth: StatusResult['workspace'],\n stage: LifecycleStage,\n nextStep: Recommendation | null,\n): string {\n if (level === 'professional') {\n return `${projectHealth} (${stage})${nextStep?.command ? `; next: ${nextStep.command}` : ''}`;\n }\n if (level === 'guided') {\n return `Workspace is ${projectHealth.toLowerCase()} in stage ${stage}.${\n nextStep ? ` Next recommended step: ${nextStep.title}.` : ''\n }`;\n }\n 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.`;\n}\n"]}
|
package/dist/dx/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dx/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './types.js';\nexport * from './guidance.js';\nexport * from './onboarding.js';\nexport * from './dashboard.js';\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ServiceOptions } from '../services/common.js';
|
|
2
|
+
import { type DxPreferences, type ExperienceLevel, type GuidanceReport, type OnboardingQuestion, type PrivacyMode } from './types.js';
|
|
3
|
+
export declare function estimateTokenCount(text: string): number;
|
|
4
|
+
export declare function getEssentialQuestions(): OnboardingQuestion[];
|
|
5
|
+
export declare function loadDxPreferencesSync(workspaceRoot: string | null): {
|
|
6
|
+
configured: boolean;
|
|
7
|
+
preferences: DxPreferences;
|
|
8
|
+
};
|
|
9
|
+
export declare function saveDxPreferences(workspaceRoot: string, input: {
|
|
10
|
+
experienceLevel?: ExperienceLevel;
|
|
11
|
+
privacyMode?: PrivacyMode;
|
|
12
|
+
}): Promise<DxPreferences>;
|
|
13
|
+
export interface BuildGuidanceOptions extends ServiceOptions {
|
|
14
|
+
experienceLevel?: ExperienceLevel;
|
|
15
|
+
privacyMode?: PrivacyMode;
|
|
16
|
+
includeDoctor?: boolean;
|
|
17
|
+
includeStandards?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Generates a read-only progressive guidance & onboarding report by composing core DevWorkspace APIs.
|
|
21
|
+
* Never writes files automatically and measures time-to-first-useful-result and token consumption.
|
|
22
|
+
*/
|
|
23
|
+
export declare function buildGuidanceReport(opts: BuildGuidanceOptions): Promise<GuidanceReport>;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { SCHEMA_VERSION } from '../config/schemas.js';
|
|
4
|
+
import { findWorkspaceRoot, requireWorkspace } from '../core/workspace.js';
|
|
5
|
+
import { runDoctor } from '../services/doctor.js';
|
|
6
|
+
import { getStatus } from '../services/status.js';
|
|
7
|
+
import { atomicWriteJson, ensureDir } from '../utils/fs.js';
|
|
8
|
+
import { StandardsEngine } from '../standards/engine/engine.js';
|
|
9
|
+
import { buildRecommendations, buildSummaryForLevel, inferComplexityTier, inferLifecycleStage, renderGuidanceText, } from './guidance.js';
|
|
10
|
+
import { EXPERIENCE_LEVELS, PRIVACY_MODES, } from './types.js';
|
|
11
|
+
const DX_PREFS_REL = '.devworkspace/state/dx-preferences.json';
|
|
12
|
+
export function estimateTokenCount(text) {
|
|
13
|
+
if (!text)
|
|
14
|
+
return 0;
|
|
15
|
+
return Math.ceil(text.length / 4);
|
|
16
|
+
}
|
|
17
|
+
export function getEssentialQuestions() {
|
|
18
|
+
return [
|
|
19
|
+
{
|
|
20
|
+
id: 'experienceLevel',
|
|
21
|
+
prompt: 'How much workflow guidance do you prefer?',
|
|
22
|
+
options: EXPERIENCE_LEVELS,
|
|
23
|
+
defaultValue: 'guided',
|
|
24
|
+
reason: 'Adapts explanation verbosity without changing underlying checks or gates.',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 'privacyMode',
|
|
28
|
+
prompt: 'Which knowledge privacy mode should this workspace use?',
|
|
29
|
+
options: PRIVACY_MODES,
|
|
30
|
+
defaultValue: 'strict-local',
|
|
31
|
+
reason: 'strict-local keeps all operations 100% offline; cached-sync allows generic signed package updates.',
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
}
|
|
35
|
+
export function loadDxPreferencesSync(workspaceRoot) {
|
|
36
|
+
if (workspaceRoot) {
|
|
37
|
+
const filePath = path.join(workspaceRoot, DX_PREFS_REL);
|
|
38
|
+
if (existsSync(filePath)) {
|
|
39
|
+
try {
|
|
40
|
+
const parsed = JSON.parse(readFileSync(filePath, 'utf8'));
|
|
41
|
+
if (parsed.experienceLevel &&
|
|
42
|
+
EXPERIENCE_LEVELS.includes(parsed.experienceLevel) &&
|
|
43
|
+
parsed.privacyMode &&
|
|
44
|
+
PRIVACY_MODES.includes(parsed.privacyMode)) {
|
|
45
|
+
return {
|
|
46
|
+
configured: true,
|
|
47
|
+
preferences: {
|
|
48
|
+
schemaVersion: SCHEMA_VERSION,
|
|
49
|
+
experienceLevel: parsed.experienceLevel,
|
|
50
|
+
privacyMode: parsed.privacyMode,
|
|
51
|
+
updatedAt: parsed.updatedAt ?? new Date().toISOString(),
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
// Fallback cleanly to defaults if preferences file is unreadable
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
configured: false,
|
|
63
|
+
preferences: {
|
|
64
|
+
schemaVersion: SCHEMA_VERSION,
|
|
65
|
+
experienceLevel: 'guided',
|
|
66
|
+
privacyMode: 'strict-local',
|
|
67
|
+
updatedAt: new Date().toISOString(),
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export async function saveDxPreferences(workspaceRoot, input) {
|
|
72
|
+
const ws = await requireWorkspace(workspaceRoot);
|
|
73
|
+
const current = loadDxPreferencesSync(ws.root).preferences;
|
|
74
|
+
const next = {
|
|
75
|
+
schemaVersion: SCHEMA_VERSION,
|
|
76
|
+
experienceLevel: input.experienceLevel ?? current.experienceLevel,
|
|
77
|
+
privacyMode: input.privacyMode ?? current.privacyMode,
|
|
78
|
+
updatedAt: new Date().toISOString(),
|
|
79
|
+
};
|
|
80
|
+
const target = path.join(ws.root, DX_PREFS_REL);
|
|
81
|
+
await ensureDir(path.dirname(target));
|
|
82
|
+
await atomicWriteJson(target, next);
|
|
83
|
+
return next;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Generates a read-only progressive guidance & onboarding report by composing core DevWorkspace APIs.
|
|
87
|
+
* Never writes files automatically and measures time-to-first-useful-result and token consumption.
|
|
88
|
+
*/
|
|
89
|
+
export async function buildGuidanceReport(opts) {
|
|
90
|
+
const startedAt = Date.now();
|
|
91
|
+
const resolvedCwd = opts.cwd ? path.resolve(opts.cwd) : process.cwd();
|
|
92
|
+
const root = await findWorkspaceRoot(resolvedCwd);
|
|
93
|
+
const loaded = loadDxPreferencesSync(root);
|
|
94
|
+
const experienceLevel = opts.experienceLevel ?? loaded.preferences.experienceLevel;
|
|
95
|
+
const privacyMode = opts.privacyMode ?? loaded.preferences.privacyMode;
|
|
96
|
+
const status = await getStatus({ ...opts, cwd: resolvedCwd });
|
|
97
|
+
let doctor = null;
|
|
98
|
+
if (status.initialized && opts.includeDoctor) {
|
|
99
|
+
try {
|
|
100
|
+
doctor = await runDoctor({ ...opts, cwd: root ?? resolvedCwd });
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
doctor = null;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
let standardsAudit = null;
|
|
107
|
+
if (status.initialized && opts.includeStandards && root) {
|
|
108
|
+
try {
|
|
109
|
+
const engine = new StandardsEngine();
|
|
110
|
+
standardsAudit = await engine.auditProject(root);
|
|
111
|
+
}
|
|
112
|
+
catch {
|
|
113
|
+
standardsAudit = null;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
const lifecycleStage = inferLifecycleStage(status, doctor);
|
|
117
|
+
const complexityTier = inferComplexityTier(status);
|
|
118
|
+
const recommendations = buildRecommendations(status, doctor, standardsAudit);
|
|
119
|
+
const nextStep = recommendations[0] ?? null;
|
|
120
|
+
const summary = buildSummaryForLevel(experienceLevel, status.workspace, lifecycleStage, nextStep);
|
|
121
|
+
const reportWithoutMetrics = {
|
|
122
|
+
initialized: status.initialized,
|
|
123
|
+
projectName: status.project?.name ?? null,
|
|
124
|
+
projectRoot: status.root,
|
|
125
|
+
experienceLevel,
|
|
126
|
+
privacyMode,
|
|
127
|
+
preferencesConfigured: loaded.configured,
|
|
128
|
+
projectHealth: status.workspace,
|
|
129
|
+
lifecycleStage,
|
|
130
|
+
complexityTier,
|
|
131
|
+
summary,
|
|
132
|
+
nextStep,
|
|
133
|
+
recommendations,
|
|
134
|
+
essentialQuestions: loaded.configured ? [] : getEssentialQuestions(),
|
|
135
|
+
diagnostics: {
|
|
136
|
+
staleFacts: status.knowledge.stale,
|
|
137
|
+
activeTasks: status.activeTasks.length,
|
|
138
|
+
availableChecks: status.verification.filter((v) => v.available).length,
|
|
139
|
+
doctorWarnings: doctor?.counts.warn ?? 0,
|
|
140
|
+
doctorFailures: doctor?.counts.fail ?? 0,
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
const rendered = renderGuidanceText({
|
|
144
|
+
...reportWithoutMetrics,
|
|
145
|
+
metrics: { timeToFirstResultMs: 0, estimatedTokens: 0 },
|
|
146
|
+
});
|
|
147
|
+
return {
|
|
148
|
+
...reportWithoutMetrics,
|
|
149
|
+
metrics: {
|
|
150
|
+
timeToFirstResultMs: Math.max(1, Date.now() - startedAt),
|
|
151
|
+
estimatedTokens: estimateTokenCount(rendered),
|
|
152
|
+
},
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=onboarding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onboarding.js","sourceRoot":"","sources":["../../src/dx/onboarding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE3E,OAAO,EAAE,SAAS,EAAqB,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,iBAAiB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E,eAAe,EAAE,CAAC,EAAE;KACxD,CAAC,CAAC;IAEH,OAAO;QACL,GAAG,oBAAoB;QACvB,OAAO,EAAE;YACP,mBAAmB,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;YACxD,eAAe,EAAE,kBAAkB,CAAC,QAAQ,CAAC;SAC9C;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { existsSync, readFileSync } from 'node:fs';\nimport path from 'node:path';\nimport { SCHEMA_VERSION } from '../config/schemas.js';\nimport { findWorkspaceRoot, requireWorkspace } from '../core/workspace.js';\nimport type { ServiceOptions } from '../services/common.js';\nimport { runDoctor, type DoctorResult } from '../services/doctor.js';\nimport { getStatus } from '../services/status.js';\nimport { atomicWriteJson, ensureDir } from '../utils/fs.js';\nimport type { StandardsAuditReport } from '../standards/schema/types.js';\nimport { StandardsEngine } from '../standards/engine/engine.js';\nimport {\n buildRecommendations,\n buildSummaryForLevel,\n inferComplexityTier,\n inferLifecycleStage,\n renderGuidanceText,\n} from './guidance.js';\nimport {\n EXPERIENCE_LEVELS,\n PRIVACY_MODES,\n type DxPreferences,\n type ExperienceLevel,\n type GuidanceReport,\n type OnboardingQuestion,\n type PrivacyMode,\n} from './types.js';\n\nconst DX_PREFS_REL = '.devworkspace/state/dx-preferences.json';\n\nexport function estimateTokenCount(text: string): number {\n if (!text) return 0;\n return Math.ceil(text.length / 4);\n}\n\nexport function getEssentialQuestions(): OnboardingQuestion[] {\n return [\n {\n id: 'experienceLevel',\n prompt: 'How much workflow guidance do you prefer?',\n options: EXPERIENCE_LEVELS,\n defaultValue: 'guided',\n reason: 'Adapts explanation verbosity without changing underlying checks or gates.',\n },\n {\n id: 'privacyMode',\n prompt: 'Which knowledge privacy mode should this workspace use?',\n options: PRIVACY_MODES,\n defaultValue: 'strict-local',\n reason: 'strict-local keeps all operations 100% offline; cached-sync allows generic signed package updates.',\n },\n ];\n}\n\nexport function loadDxPreferencesSync(workspaceRoot: string | null): {\n configured: boolean;\n preferences: DxPreferences;\n} {\n if (workspaceRoot) {\n const filePath = path.join(workspaceRoot, DX_PREFS_REL);\n if (existsSync(filePath)) {\n try {\n const parsed = JSON.parse(readFileSync(filePath, 'utf8')) as Partial<DxPreferences>;\n if (\n parsed.experienceLevel &&\n (EXPERIENCE_LEVELS as readonly string[]).includes(parsed.experienceLevel) &&\n parsed.privacyMode &&\n (PRIVACY_MODES as readonly string[]).includes(parsed.privacyMode)\n ) {\n return {\n configured: true,\n preferences: {\n schemaVersion: SCHEMA_VERSION,\n experienceLevel: parsed.experienceLevel,\n privacyMode: parsed.privacyMode,\n updatedAt: parsed.updatedAt ?? new Date().toISOString(),\n },\n };\n }\n } catch {\n // Fallback cleanly to defaults if preferences file is unreadable\n }\n }\n }\n\n return {\n configured: false,\n preferences: {\n schemaVersion: SCHEMA_VERSION,\n experienceLevel: 'guided',\n privacyMode: 'strict-local',\n updatedAt: new Date().toISOString(),\n },\n };\n}\n\nexport async function saveDxPreferences(\n workspaceRoot: string,\n input: { experienceLevel?: ExperienceLevel; privacyMode?: PrivacyMode },\n): Promise<DxPreferences> {\n const ws = await requireWorkspace(workspaceRoot);\n const current = loadDxPreferencesSync(ws.root).preferences;\n const next: DxPreferences = {\n schemaVersion: SCHEMA_VERSION,\n experienceLevel: input.experienceLevel ?? current.experienceLevel,\n privacyMode: input.privacyMode ?? current.privacyMode,\n updatedAt: new Date().toISOString(),\n };\n const target = path.join(ws.root, DX_PREFS_REL);\n await ensureDir(path.dirname(target));\n await atomicWriteJson(target, next);\n return next;\n}\n\nexport interface BuildGuidanceOptions extends ServiceOptions {\n experienceLevel?: ExperienceLevel;\n privacyMode?: PrivacyMode;\n includeDoctor?: boolean;\n includeStandards?: boolean;\n}\n\n/**\n * Generates a read-only progressive guidance & onboarding report by composing core DevWorkspace APIs.\n * Never writes files automatically and measures time-to-first-useful-result and token consumption.\n */\nexport async function buildGuidanceReport(opts: BuildGuidanceOptions): Promise<GuidanceReport> {\n const startedAt = Date.now();\n const resolvedCwd = opts.cwd ? path.resolve(opts.cwd) : process.cwd();\n const root = await findWorkspaceRoot(resolvedCwd);\n\n const loaded = loadDxPreferencesSync(root);\n const experienceLevel = opts.experienceLevel ?? loaded.preferences.experienceLevel;\n const privacyMode = opts.privacyMode ?? loaded.preferences.privacyMode;\n\n const status = await getStatus({ ...opts, cwd: resolvedCwd });\n\n let doctor: DoctorResult | null = null;\n if (status.initialized && opts.includeDoctor) {\n try {\n doctor = await runDoctor({ ...opts, cwd: root ?? resolvedCwd });\n } catch {\n doctor = null;\n }\n }\n\n let standardsAudit: StandardsAuditReport | null = null;\n if (status.initialized && opts.includeStandards && root) {\n try {\n const engine = new StandardsEngine();\n standardsAudit = await engine.auditProject(root);\n } catch {\n standardsAudit = null;\n }\n }\n\n const lifecycleStage = inferLifecycleStage(status, doctor);\n const complexityTier = inferComplexityTier(status);\n const recommendations = buildRecommendations(status, doctor, standardsAudit);\n const nextStep = recommendations[0] ?? null;\n const summary = buildSummaryForLevel(experienceLevel, status.workspace, lifecycleStage, nextStep);\n\n const reportWithoutMetrics: Omit<GuidanceReport, 'metrics'> = {\n initialized: status.initialized,\n projectName: status.project?.name ?? null,\n projectRoot: status.root,\n experienceLevel,\n privacyMode,\n preferencesConfigured: loaded.configured,\n projectHealth: status.workspace,\n lifecycleStage,\n complexityTier,\n summary,\n nextStep,\n recommendations,\n essentialQuestions: loaded.configured ? [] : getEssentialQuestions(),\n diagnostics: {\n staleFacts: status.knowledge.stale,\n activeTasks: status.activeTasks.length,\n availableChecks: status.verification.filter((v) => v.available).length,\n doctorWarnings: doctor?.counts.warn ?? 0,\n doctorFailures: doctor?.counts.fail ?? 0,\n },\n };\n\n const rendered = renderGuidanceText({\n ...reportWithoutMetrics,\n metrics: { timeToFirstResultMs: 0, estimatedTokens: 0 },\n });\n\n return {\n ...reportWithoutMetrics,\n metrics: {\n timeToFirstResultMs: Math.max(1, Date.now() - startedAt),\n estimatedTokens: estimateTokenCount(rendered),\n },\n };\n}\n"]}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { StatusResult } from '../services/status.js';
|
|
2
|
+
import type { DoctorResult } from '../services/doctor.js';
|
|
3
|
+
import type { StandardsAuditReport } from '../standards/schema/types.js';
|
|
4
|
+
export declare const EXPERIENCE_LEVELS: readonly ["beginner", "guided", "professional"];
|
|
5
|
+
export type ExperienceLevel = (typeof EXPERIENCE_LEVELS)[number];
|
|
6
|
+
export declare const PRIVACY_MODES: readonly ["strict-local", "cached-sync"];
|
|
7
|
+
export type PrivacyMode = (typeof PRIVACY_MODES)[number];
|
|
8
|
+
export type LifecycleStage = 'UNINITIALIZED' | 'INITIALIZED' | 'ONBOARDING' | 'ACTIVE_DEVELOPMENT' | 'PRE_RELEASE' | 'NEEDS_ATTENTION';
|
|
9
|
+
export type ComplexityTier = 'simple' | 'standard' | 'complex';
|
|
10
|
+
export interface DxPreferences {
|
|
11
|
+
schemaVersion: number;
|
|
12
|
+
experienceLevel: ExperienceLevel;
|
|
13
|
+
privacyMode: PrivacyMode;
|
|
14
|
+
updatedAt: string;
|
|
15
|
+
}
|
|
16
|
+
export interface OnboardingQuestion {
|
|
17
|
+
id: 'experienceLevel' | 'privacyMode';
|
|
18
|
+
prompt: string;
|
|
19
|
+
options: readonly string[];
|
|
20
|
+
defaultValue: string;
|
|
21
|
+
reason: string;
|
|
22
|
+
}
|
|
23
|
+
export interface Recommendation {
|
|
24
|
+
id: string;
|
|
25
|
+
title: string;
|
|
26
|
+
action: string;
|
|
27
|
+
command?: string;
|
|
28
|
+
reason: string;
|
|
29
|
+
verification: string;
|
|
30
|
+
evidence: string[];
|
|
31
|
+
source: 'discovery' | 'status' | 'doctor' | 'standards' | 'tasks' | 'git';
|
|
32
|
+
confidence: 'HIGH' | 'MEDIUM' | 'LOW';
|
|
33
|
+
priority: 'critical' | 'high' | 'medium' | 'low';
|
|
34
|
+
}
|
|
35
|
+
export interface DxMetrics {
|
|
36
|
+
timeToFirstResultMs: number;
|
|
37
|
+
estimatedTokens: number;
|
|
38
|
+
}
|
|
39
|
+
export interface GuidanceReport {
|
|
40
|
+
initialized: boolean;
|
|
41
|
+
projectName: string | null;
|
|
42
|
+
projectRoot: string | null;
|
|
43
|
+
experienceLevel: ExperienceLevel;
|
|
44
|
+
privacyMode: PrivacyMode;
|
|
45
|
+
preferencesConfigured: boolean;
|
|
46
|
+
projectHealth: StatusResult['workspace'];
|
|
47
|
+
lifecycleStage: LifecycleStage;
|
|
48
|
+
complexityTier: ComplexityTier;
|
|
49
|
+
summary: string;
|
|
50
|
+
nextStep: Recommendation | null;
|
|
51
|
+
recommendations: Recommendation[];
|
|
52
|
+
essentialQuestions: OnboardingQuestion[];
|
|
53
|
+
diagnostics: {
|
|
54
|
+
staleFacts: number;
|
|
55
|
+
activeTasks: number;
|
|
56
|
+
availableChecks: number;
|
|
57
|
+
doctorWarnings: number;
|
|
58
|
+
doctorFailures: number;
|
|
59
|
+
};
|
|
60
|
+
metrics: DxMetrics;
|
|
61
|
+
}
|
|
62
|
+
export interface DashboardViewModel {
|
|
63
|
+
generatedAt: string;
|
|
64
|
+
localOnly: true;
|
|
65
|
+
telemetryEnabled: false;
|
|
66
|
+
guidance: GuidanceReport;
|
|
67
|
+
status: StatusResult;
|
|
68
|
+
doctor: DoctorResult | null;
|
|
69
|
+
standardsAudit: StandardsAuditReport | null;
|
|
70
|
+
}
|
package/dist/dx/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/dx/types.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,UAAU,EAAE,QAAQ,EAAE,cAAc,CAAU,CAAC;AAGjF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,cAAc,EAAE,aAAa,CAAU,CAAC","sourcesContent":["import type { StatusResult } from '../services/status.js';\nimport type { DoctorResult } from '../services/doctor.js';\nimport type { StandardsAuditReport } from '../standards/schema/types.js';\n\nexport const EXPERIENCE_LEVELS = ['beginner', 'guided', 'professional'] as const;\nexport type ExperienceLevel = (typeof EXPERIENCE_LEVELS)[number];\n\nexport const PRIVACY_MODES = ['strict-local', 'cached-sync'] as const;\nexport type PrivacyMode = (typeof PRIVACY_MODES)[number];\n\nexport type LifecycleStage =\n | 'UNINITIALIZED'\n | 'INITIALIZED'\n | 'ONBOARDING'\n | 'ACTIVE_DEVELOPMENT'\n | 'PRE_RELEASE'\n | 'NEEDS_ATTENTION';\n\nexport type ComplexityTier = 'simple' | 'standard' | 'complex';\n\nexport interface DxPreferences {\n schemaVersion: number;\n experienceLevel: ExperienceLevel;\n privacyMode: PrivacyMode;\n updatedAt: string;\n}\n\nexport interface OnboardingQuestion {\n id: 'experienceLevel' | 'privacyMode';\n prompt: string;\n options: readonly string[];\n defaultValue: string;\n reason: string;\n}\n\nexport interface Recommendation {\n id: string;\n title: string;\n action: string;\n command?: string;\n reason: string;\n verification: string;\n evidence: string[];\n source: 'discovery' | 'status' | 'doctor' | 'standards' | 'tasks' | 'git';\n confidence: 'HIGH' | 'MEDIUM' | 'LOW';\n priority: 'critical' | 'high' | 'medium' | 'low';\n}\n\nexport interface DxMetrics {\n timeToFirstResultMs: number;\n estimatedTokens: number;\n}\n\nexport interface GuidanceReport {\n initialized: boolean;\n projectName: string | null;\n projectRoot: string | null;\n experienceLevel: ExperienceLevel;\n privacyMode: PrivacyMode;\n preferencesConfigured: boolean;\n projectHealth: StatusResult['workspace'];\n lifecycleStage: LifecycleStage;\n complexityTier: ComplexityTier;\n summary: string;\n nextStep: Recommendation | null;\n recommendations: Recommendation[];\n essentialQuestions: OnboardingQuestion[];\n diagnostics: {\n staleFacts: number;\n activeTasks: number;\n availableChecks: number;\n doctorWarnings: number;\n doctorFailures: number;\n };\n metrics: DxMetrics;\n}\n\nexport interface DashboardViewModel {\n generatedAt: string;\n localOnly: true;\n telemetryEnabled: false;\n guidance: GuidanceReport;\n status: StatusResult;\n doctor: DoctorResult | null;\n standardsAudit: StandardsAuditReport | null;\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { packageVersion } from './core/version.js';
|
|
2
2
|
export { DevWorkspaceError, EXIT } from './errors/index.js';
|
|
3
|
+
export { createSuccessResult, createWarningResult, createFailureResult, serializeError, isServiceResult, } from './core/contracts.js';
|
|
4
|
+
export type { ServiceResult, ResultStatus, ResultProvenance, SerializedError, } from './core/contracts.js';
|
|
3
5
|
export { initWorkspace } from './services/init.js';
|
|
4
6
|
export { setupProject, detectCliProvenance } from './services/setup.js';
|
|
5
7
|
export { analyzeWorkspace } from './services/analysis.js';
|
|
@@ -39,3 +41,36 @@ export { MCP_TOOLS, handleProjectOverview, handleTaskContext, handleFileContext,
|
|
|
39
41
|
export type { McpServerOptions } from './mcp/server.js';
|
|
40
42
|
export type { McpSetupOptions, McpSetupResult, McpPlannedFileChange } from './mcp/setup.js';
|
|
41
43
|
export type { McpToolDefinition, McpToolResult, McpContentItem } from './mcp/types.js';
|
|
44
|
+
export { createIntelligenceContext, listAgentsService as listSpecialistAgents, getAgentService as getSpecialistAgent, registerAgentService as registerSpecialistAgent, removeAgentService as removeSpecialistAgent, listSkillsService, searchSkillsService, getSkillService, installSkillService, removeSkillService, planOrchestrationService, runOrchestrationService, approveOrchestrationService, cancelOrchestrationService, getOrchestrationRunService, listOrchestrationHistoryService, getIntelligenceStatusService, } from './services/intelligence.js';
|
|
45
|
+
export type { IntelligenceContext } from './services/intelligence.js';
|
|
46
|
+
export { AgentRegistry } from './intelligence/agents/registry.js';
|
|
47
|
+
export { BUILTIN_AGENT_PROFILES } from './intelligence/agents/profiles.js';
|
|
48
|
+
export { SkillRegistry } from './intelligence/skills/registry.js';
|
|
49
|
+
export { BUILTIN_SKILLS } from './intelligence/skills/builtins.js';
|
|
50
|
+
export { validateSkillManifest, loadSkillFromFile } from './intelligence/skills/loader.js';
|
|
51
|
+
export { IntelligentRouter } from './intelligence/routing/router.js';
|
|
52
|
+
export { deriveRequiredCapabilities, estimateComplexity } from './intelligence/routing/matcher.js';
|
|
53
|
+
export { OrchestrationEngine, type DryRunPlanSummary } from './intelligence/orchestration/engine.js';
|
|
54
|
+
export { OrchestrationStore } from './intelligence/orchestration/store.js';
|
|
55
|
+
export { StageLockManager } from './intelligence/orchestration/lock-manager.js';
|
|
56
|
+
export { isValidStateTransition } from './intelligence/orchestration/types.js';
|
|
57
|
+
export { LocalTracer } from './intelligence/observability/tracer.js';
|
|
58
|
+
export { SecurityPolicyEvaluator } from './intelligence/security/policy.js';
|
|
59
|
+
export { SecurityAuditLogger } from './intelligence/security/audit.js';
|
|
60
|
+
export { IndependentVerificationEngine } from './intelligence/verification/engine.js';
|
|
61
|
+
export { IndependentReviewer } from './intelligence/verification/reviewer.js';
|
|
62
|
+
export { NativeRuntimeAdapter, PlaceholderRuntimeAdapter } from './intelligence/runtime/native.js';
|
|
63
|
+
export { ExternalAgentAdapter } from './intelligence/runtime/external.js';
|
|
64
|
+
export { GoogleAdkAdapter } from './intelligence/runtime/adk/adapter.js';
|
|
65
|
+
export { detectGoogleAdk } from './intelligence/runtime/adk/detector.js';
|
|
66
|
+
export type { AgentProfile, AgentRoleType, RiskClassification as AgentRiskTier, AgentHealthCheckResult, } from './intelligence/agents/types.js';
|
|
67
|
+
export type { SkillManifest, SkillPermissionRequirements, SkillValidationResult, SkillCategory, SkillProgressiveContent, } from './intelligence/skills/types.js';
|
|
68
|
+
export type { ComplexityTier, ExecutionStrategy, RoutingDecision, } from './intelligence/routing/types.js';
|
|
69
|
+
export type { OrchestrationRun, OrchestrationState, PlanOptions, RunOptions, ExecutionStage, StageStatus, ExecutionReceipt, } from './intelligence/orchestration/types.js';
|
|
70
|
+
export type { PerformanceMetrics, TraceSpan, ExecutionTrace, } from './intelligence/observability/types.js';
|
|
71
|
+
export type { SecurityPolicy, PermissionScope, SecurityAuditEntry, } from './intelligence/security/types.js';
|
|
72
|
+
export type { GateResult, ReviewFinding, VerificationEvaluationReport, GateCheckType, IndependentReviewReport, } from './intelligence/verification/types.js';
|
|
73
|
+
export type { AgentRuntimeAdapter, AgentExecutionRequest, AgentExecutionResponse, } from './intelligence/runtime/types.js';
|
|
74
|
+
export * from './standards/index.js';
|
|
75
|
+
export { listStandardsService, getStandardService, auditStandardsService, applyStandardService, addStandardService, updateStandardsService, validateStandardsRegistryService, generateStandardsReportService, } from './services/standards.js';
|
|
76
|
+
export * from './dx/index.js';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Programmatic API: the same engine that powers the CLI, for a future VS Code extension, dashboards and automation.
|
|
2
2
|
export { packageVersion } from './core/version.js';
|
|
3
3
|
export { DevWorkspaceError, EXIT } from './errors/index.js';
|
|
4
|
+
export { createSuccessResult, createWarningResult, createFailureResult, serializeError, isServiceResult, } from './core/contracts.js';
|
|
4
5
|
export { initWorkspace } from './services/init.js';
|
|
5
6
|
export { setupProject, detectCliProvenance } from './services/setup.js';
|
|
6
7
|
export { analyzeWorkspace } from './services/analysis.js';
|
|
@@ -27,4 +28,31 @@ export { ONBOARDING_REQUIREMENTS, REFRESH_REQUIREMENTS, validatePrompt } from '.
|
|
|
27
28
|
export { McpServer, startMcpServer } from './mcp/server.js';
|
|
28
29
|
export { setupMcpAgent, planMcpAgentChanges } from './mcp/setup.js';
|
|
29
30
|
export { MCP_TOOLS, handleProjectOverview, handleTaskContext, handleFileContext, handleCheckMcpHealth, handleExplainContext, handleTraceSymbolDependencies, } from './mcp/tools.js';
|
|
31
|
+
// Intelligence & Multi-Agent Orchestration APIs
|
|
32
|
+
export { createIntelligenceContext, listAgentsService as listSpecialistAgents, getAgentService as getSpecialistAgent, registerAgentService as registerSpecialistAgent, removeAgentService as removeSpecialistAgent, listSkillsService, searchSkillsService, getSkillService, installSkillService, removeSkillService, planOrchestrationService, runOrchestrationService, approveOrchestrationService, cancelOrchestrationService, getOrchestrationRunService, listOrchestrationHistoryService, getIntelligenceStatusService, } from './services/intelligence.js';
|
|
33
|
+
export { AgentRegistry } from './intelligence/agents/registry.js';
|
|
34
|
+
export { BUILTIN_AGENT_PROFILES } from './intelligence/agents/profiles.js';
|
|
35
|
+
export { SkillRegistry } from './intelligence/skills/registry.js';
|
|
36
|
+
export { BUILTIN_SKILLS } from './intelligence/skills/builtins.js';
|
|
37
|
+
export { validateSkillManifest, loadSkillFromFile } from './intelligence/skills/loader.js';
|
|
38
|
+
export { IntelligentRouter } from './intelligence/routing/router.js';
|
|
39
|
+
export { deriveRequiredCapabilities, estimateComplexity } from './intelligence/routing/matcher.js';
|
|
40
|
+
export { OrchestrationEngine } from './intelligence/orchestration/engine.js';
|
|
41
|
+
export { OrchestrationStore } from './intelligence/orchestration/store.js';
|
|
42
|
+
export { StageLockManager } from './intelligence/orchestration/lock-manager.js';
|
|
43
|
+
export { isValidStateTransition } from './intelligence/orchestration/types.js';
|
|
44
|
+
export { LocalTracer } from './intelligence/observability/tracer.js';
|
|
45
|
+
export { SecurityPolicyEvaluator } from './intelligence/security/policy.js';
|
|
46
|
+
export { SecurityAuditLogger } from './intelligence/security/audit.js';
|
|
47
|
+
export { IndependentVerificationEngine } from './intelligence/verification/engine.js';
|
|
48
|
+
export { IndependentReviewer } from './intelligence/verification/reviewer.js';
|
|
49
|
+
export { NativeRuntimeAdapter, PlaceholderRuntimeAdapter } from './intelligence/runtime/native.js';
|
|
50
|
+
export { ExternalAgentAdapter } from './intelligence/runtime/external.js';
|
|
51
|
+
export { GoogleAdkAdapter } from './intelligence/runtime/adk/adapter.js';
|
|
52
|
+
export { detectGoogleAdk } from './intelligence/runtime/adk/detector.js';
|
|
53
|
+
// Standards & Engineering Governance System
|
|
54
|
+
export * from './standards/index.js';
|
|
55
|
+
export { listStandardsService, getStandardService, auditStandardsService, applyStandardService, addStandardService, updateStandardsService, validateStandardsRegistryService, generateStandardsReportService, } from './services/standards.js';
|
|
56
|
+
// Developer Experience, Progressive Guidance & Optional Local Dashboard
|
|
57
|
+
export * from './dx/index.js';
|
|
30
58
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC/H,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,kBAAkB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACrJ,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACjG,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAChI,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAW1G,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EACL,SAAS,EACT,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,6BAA6B,GAC9B,MAAM,gBAAgB,CAAC","sourcesContent":["// Programmatic API: the same engine that powers the CLI, for a future VS Code extension, dashboards and automation.\nexport { packageVersion } from './core/version.js';\nexport { DevWorkspaceError, EXIT } from './errors/index.js';\nexport { initWorkspace } from './services/init.js';\nexport { setupProject, detectCliProvenance } from './services/setup.js';\nexport { analyzeWorkspace } from './services/analysis.js';\nexport { getStatus } from './services/status.js';\nexport { runDoctor } from './services/doctor.js';\nexport { refreshWorkspace } from './services/refresh.js';\nexport { getTaskContext } from './services/taskContext.js';\nexport { getContext, addFact, verifyFactByKey, removeFactByKey } from './services/knowledge.js';\nexport { listFeaturesService, getFeatureService, validateFeatureMapService, saveFeatureService } from './services/features.js';\nexport { detectContractDrift } from './discovery/commands.js';\nexport { createTask, listTasksService, showTask, setTaskStatus, updateTask, recordVerification, recordTests, attestTask } from './services/tasks.js';\nexport { recordDecision, getDecisions, recordSession, getSessions } from './services/records.js';\nexport { installAgent, listAgents, AGENTS, getAgentAdapter, listAgentAdapters, detectAllAgentFiles } from './services/agent.js';\nexport { exportWorkspace, importWorkspace } from './services/portability.js';\nexport { migrateWorkspace } from './services/migrate.js';\nexport { resetWorkspace } from './services/reset.js';\nexport { setupIntegrations, integrationsStatus } from './services/integrations.js';\nexport { classifyRequest, detectConstraints, WORKFLOWS } from './tasks/routing.js';\nexport { evaluateGate } from './tasks/task.js';\nexport { redact, findSecrets, containsSecret } from './security/redact.js';\nexport { isSensitiveFile } from './security/files.js';\nexport { buildOnboardingPrompt } from './prompts/onboarding.js';\nexport { ONBOARDING_REQUIREMENTS, REFRESH_REQUIREMENTS, validatePrompt } from './prompts/requirements.js';\nexport type { ServiceOptions } from './services/common.js';\nexport type { StatusResult } from './services/status.js';\nexport type { DoctorResult, DoctorCheck } from './services/doctor.js';\nexport type { Task, TaskStatus, TaskType } from './tasks/task.js';\nexport type { Fact, ProjectConfig, CommandEntry } from './config/schemas.js';\nexport type { FeatureItem, FeatureComponent, FeaturesFile, FeatureValidationReport } from './features/types.js';\nexport type { ProjectSetupResult, CliProvenance, CliExecutionMode } from './services/setup.js';\nexport type { IntegrationReport, StatusCode as IntegrationStatusCode } from './integrations/types.js';\nexport type { AgentAdapter, AgentCapabilities, PlannedChange } from './agents/types.js';\nexport type { AgentInfo, AgentInstallResult } from './services/agent.js';\nexport { McpServer, startMcpServer } from './mcp/server.js';\nexport { setupMcpAgent, planMcpAgentChanges } from './mcp/setup.js';\nexport {\n MCP_TOOLS,\n handleProjectOverview,\n handleTaskContext,\n handleFileContext,\n handleCheckMcpHealth,\n handleExplainContext,\n handleTraceSymbolDependencies,\n} from './mcp/tools.js';\nexport type { McpServerOptions } from './mcp/server.js';\nexport type { McpSetupOptions, McpSetupResult, McpPlannedFileChange } from './mcp/setup.js';\nexport type { McpToolDefinition, McpToolResult, McpContentItem } from './mcp/types.js';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAO7B,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC/H,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,kBAAkB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC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BAAgB,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAoDzE,4CAA4C;AAC5C,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EACtB,gCAAgC,EAChC,8BAA8B,GAC/B,MAAM,yBAAyB,CAAC;AAEjC,wEAAwE;AACxE,cAAc,eAAe,CAAC","sourcesContent":["// Programmatic API: the same engine that powers the CLI, for a future VS Code extension, dashboards and automation.\nexport { packageVersion } from './core/version.js';\nexport { DevWorkspaceError, EXIT } from './errors/index.js';\nexport {\n createSuccessResult,\n createWarningResult,\n createFailureResult,\n serializeError,\n isServiceResult,\n} from './core/contracts.js';\nexport type {\n ServiceResult,\n ResultStatus,\n ResultProvenance,\n SerializedError,\n} from './core/contracts.js';\nexport { initWorkspace } from './services/init.js';\nexport { setupProject, detectCliProvenance } from './services/setup.js';\nexport { analyzeWorkspace } from './services/analysis.js';\nexport { getStatus } from './services/status.js';\nexport { runDoctor } from './services/doctor.js';\nexport { refreshWorkspace } from './services/refresh.js';\nexport { getTaskContext } from './services/taskContext.js';\nexport { getContext, addFact, verifyFactByKey, removeFactByKey } from './services/knowledge.js';\nexport { listFeaturesService, getFeatureService, validateFeatureMapService, saveFeatureService } from './services/features.js';\nexport { detectContractDrift } from './discovery/commands.js';\nexport { createTask, listTasksService, showTask, setTaskStatus, updateTask, recordVerification, recordTests, attestTask } from './services/tasks.js';\nexport { recordDecision, getDecisions, recordSession, getSessions } from './services/records.js';\nexport { installAgent, listAgents, AGENTS, getAgentAdapter, listAgentAdapters, detectAllAgentFiles } from './services/agent.js';\nexport { exportWorkspace, importWorkspace } from './services/portability.js';\nexport { migrateWorkspace } from './services/migrate.js';\nexport { resetWorkspace } from './services/reset.js';\nexport { setupIntegrations, integrationsStatus } from './services/integrations.js';\nexport { classifyRequest, detectConstraints, WORKFLOWS } from './tasks/routing.js';\nexport { evaluateGate } from './tasks/task.js';\nexport { redact, findSecrets, containsSecret } from './security/redact.js';\nexport { isSensitiveFile } from './security/files.js';\nexport { buildOnboardingPrompt } from './prompts/onboarding.js';\nexport { ONBOARDING_REQUIREMENTS, REFRESH_REQUIREMENTS, validatePrompt } from './prompts/requirements.js';\nexport type { ServiceOptions } from './services/common.js';\nexport type { StatusResult } from './services/status.js';\nexport type { DoctorResult, DoctorCheck } from './services/doctor.js';\nexport type { Task, TaskStatus, TaskType } from './tasks/task.js';\nexport type { Fact, ProjectConfig, CommandEntry } from './config/schemas.js';\nexport type { FeatureItem, FeatureComponent, FeaturesFile, FeatureValidationReport } from './features/types.js';\nexport type { ProjectSetupResult, CliProvenance, CliExecutionMode } from './services/setup.js';\nexport type { IntegrationReport, StatusCode as IntegrationStatusCode } from './integrations/types.js';\nexport type { AgentAdapter, AgentCapabilities, PlannedChange } from './agents/types.js';\nexport type { AgentInfo, AgentInstallResult } from './services/agent.js';\nexport { McpServer, startMcpServer } from './mcp/server.js';\nexport { setupMcpAgent, planMcpAgentChanges } from './mcp/setup.js';\nexport {\n MCP_TOOLS,\n handleProjectOverview,\n handleTaskContext,\n handleFileContext,\n handleCheckMcpHealth,\n handleExplainContext,\n handleTraceSymbolDependencies,\n} from './mcp/tools.js';\nexport type { McpServerOptions } from './mcp/server.js';\nexport type { McpSetupOptions, McpSetupResult, McpPlannedFileChange } from './mcp/setup.js';\nexport type { McpToolDefinition, McpToolResult, McpContentItem } from './mcp/types.js';\n\n// Intelligence & Multi-Agent Orchestration APIs\nexport {\n createIntelligenceContext,\n listAgentsService as listSpecialistAgents,\n getAgentService as getSpecialistAgent,\n registerAgentService as registerSpecialistAgent,\n removeAgentService as removeSpecialistAgent,\n listSkillsService,\n searchSkillsService,\n getSkillService,\n installSkillService,\n removeSkillService,\n planOrchestrationService,\n runOrchestrationService,\n approveOrchestrationService,\n cancelOrchestrationService,\n getOrchestrationRunService,\n listOrchestrationHistoryService,\n getIntelligenceStatusService,\n} from './services/intelligence.js';\nexport type { IntelligenceContext } from './services/intelligence.js';\n\nexport { AgentRegistry } from './intelligence/agents/registry.js';\nexport { BUILTIN_AGENT_PROFILES } from './intelligence/agents/profiles.js';\nexport { SkillRegistry } from './intelligence/skills/registry.js';\nexport { BUILTIN_SKILLS } from './intelligence/skills/builtins.js';\nexport { validateSkillManifest, loadSkillFromFile } from './intelligence/skills/loader.js';\nexport { IntelligentRouter } from './intelligence/routing/router.js';\nexport { deriveRequiredCapabilities, estimateComplexity } from './intelligence/routing/matcher.js';\nexport { OrchestrationEngine, type DryRunPlanSummary } from './intelligence/orchestration/engine.js';\nexport { OrchestrationStore } from './intelligence/orchestration/store.js';\nexport { StageLockManager } from './intelligence/orchestration/lock-manager.js';\nexport { isValidStateTransition } from './intelligence/orchestration/types.js';\nexport { LocalTracer } from './intelligence/observability/tracer.js';\nexport { SecurityPolicyEvaluator } from './intelligence/security/policy.js';\nexport { SecurityAuditLogger } from './intelligence/security/audit.js';\nexport { IndependentVerificationEngine } from './intelligence/verification/engine.js';\nexport { IndependentReviewer } from './intelligence/verification/reviewer.js';\nexport { NativeRuntimeAdapter, PlaceholderRuntimeAdapter } from './intelligence/runtime/native.js';\nexport { ExternalAgentAdapter } from './intelligence/runtime/external.js';\nexport { GoogleAdkAdapter } from './intelligence/runtime/adk/adapter.js';\nexport { detectGoogleAdk } from './intelligence/runtime/adk/detector.js';\n\nexport type {\n AgentProfile,\n AgentRoleType,\n RiskClassification as AgentRiskTier,\n AgentHealthCheckResult,\n} from './intelligence/agents/types.js';\nexport type {\n SkillManifest,\n SkillPermissionRequirements,\n SkillValidationResult,\n SkillCategory,\n SkillProgressiveContent,\n} from './intelligence/skills/types.js';\nexport type {\n ComplexityTier,\n ExecutionStrategy,\n RoutingDecision,\n} from './intelligence/routing/types.js';\nexport type {\n OrchestrationRun,\n OrchestrationState,\n PlanOptions,\n RunOptions,\n ExecutionStage,\n StageStatus,\n ExecutionReceipt,\n} from './intelligence/orchestration/types.js';\nexport type {\n PerformanceMetrics,\n TraceSpan,\n ExecutionTrace,\n} from './intelligence/observability/types.js';\nexport type {\n SecurityPolicy,\n PermissionScope,\n SecurityAuditEntry,\n} from './intelligence/security/types.js';\nexport type {\n GateResult,\n ReviewFinding,\n VerificationEvaluationReport,\n GateCheckType,\n IndependentReviewReport,\n} from './intelligence/verification/types.js';\nexport type {\n AgentRuntimeAdapter,\n AgentExecutionRequest,\n AgentExecutionResponse,\n} from './intelligence/runtime/types.js';\n\n// Standards & Engineering Governance System\nexport * from './standards/index.js';\nexport {\n listStandardsService,\n getStandardService,\n auditStandardsService,\n applyStandardService,\n addStandardService,\n updateStandardsService,\n validateStandardsRegistryService,\n generateStandardsReportService,\n} from './services/standards.js';\n\n// Developer Experience, Progressive Guidance & Optional Local Dashboard\nexport * from './dx/index.js';\n\n\n"]}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import type { Runner } from './types.js';
|
|
2
|
-
|
|
3
|
-
* The PATH Windows will give to NEW processes, as stored in the registry. A running terminal or editor keeps the PATH
|
|
4
|
-
* it started with, so it can differ from this. Read-only: nothing here ever writes to the registry or the environment.
|
|
5
|
-
*/
|
|
6
|
-
export interface PersistentPath {
|
|
7
|
-
user: string[];
|
|
8
|
-
machine: string[];
|
|
9
|
-
}
|
|
1
|
+
import type { Runner, PersistentPath } from './types.js';
|
|
2
|
+
export type { PersistentPath };
|
|
10
3
|
/** Extract the value of `Path` from `reg query <key> /v Path` output. */
|
|
11
4
|
export declare function parseRegPath(output: string): string | null;
|
|
12
5
|
/** Expand %NAME% references the way Windows does (case-insensitive); unknown names are left untouched. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persistentPath.js","sourceRoot":"","sources":["../../src/integrations/persistentPath.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"persistentPath.js","sourceRoot":"","sources":["../../src/integrations/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,mBAAmB,CAAC,GAAG,CAAC,CAAC;IACtC,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;QAAE,OAAO,MAAM,CAAC;IACxE,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;QAAE,OAAO,SAAS,CAAC;IAC9E,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import path from 'node:path';\nimport type { Runner, PersistentPath } from './types.js';\n\nexport type { PersistentPath };\n\nconst USER_KEY = 'HKCU\\\\Environment';\nconst MACHINE_KEY = 'HKLM\\\\SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment';\n\n/** Extract the value of `Path` from `reg query <key> /v Path` output. */\nexport function parseRegPath(output: string): string | null {\n const m = /^\\s*Path\\s+REG_(?:EXPAND_)?SZ\\s+(.*?)\\s*$/im.exec(output);\n return m && m[1] !== undefined ? m[1] : null;\n}\n\n/** Expand %NAME% references the way Windows does (case-insensitive); unknown names are left untouched. */\nexport function expandWindowsVars(value: string, env: NodeJS.ProcessEnv): string {\n const lower = new Map(Object.entries(env).map(([k, v]) => [k.toLowerCase(), v ?? '']));\n return value.replace(/%([^%]+)%/g, (whole, name: string) => lower.get(name.toLowerCase()) ?? whole);\n}\n\nexport function splitPathList(value: string): string[] {\n return value.split(';').map((s) => s.trim().replace(/^\"(.*)\"$/, '$1')).filter(Boolean);\n}\n\n/** Windows paths are case-insensitive and tolerate trailing separators and `.`/`..` segments. */\nexport function normalizeWindowsDir(dir: string): string {\n return path.win32.normalize(dir).replace(/[\\\\/]+$/, '').toLowerCase();\n}\n\nasync function readKey(runner: Runner, key: string, env: NodeJS.ProcessEnv, signal?: AbortSignal): Promise<string[] | null> {\n const r = await runner.run({ command: 'reg', args: ['query', key, '/v', 'Path'], timeoutMs: 10_000, signal });\n if (!r.ok) return null;\n const raw = parseRegPath(r.stdout);\n return raw === null ? [] : splitPathList(expandWindowsVars(raw, env));\n}\n\n/** Windows only. Returns null on every other platform, or when the user PATH cannot be read (unknown, not \"absent\"). */\nexport async function readPersistentPath(runner: Runner, platform: NodeJS.Platform, env: NodeJS.ProcessEnv, signal?: AbortSignal): Promise<PersistentPath | null> {\n if (platform !== 'win32') return null;\n const user = await readKey(runner, USER_KEY, env, signal);\n if (user === null) return null;\n const machine = (await readKey(runner, MACHINE_KEY, env, signal)) ?? [];\n return { user, machine };\n}\n\n/** Which persistent PATH (if any) lists this directory. */\nexport function persistentPathHas(pp: PersistentPath, dir: string): 'user' | 'machine' | null {\n const want = normalizeWindowsDir(dir);\n if (pp.user.some((p) => normalizeWindowsDir(p) === want)) return 'user';\n if (pp.machine.some((p) => normalizeWindowsDir(p) === want)) return 'machine';\n return null;\n}\n"]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { RunResult } from '../utils/proc.js';
|
|
2
|
-
|
|
2
|
+
export interface PersistentPath {
|
|
3
|
+
user: string[];
|
|
4
|
+
machine: string[];
|
|
5
|
+
}
|
|
3
6
|
export declare const INTEGRATION_IDS: readonly ["graphify", "agent-skills", "ponytail", "omniroute"];
|
|
4
7
|
export type IntegrationId = (typeof INTEGRATION_IDS)[number];
|
|
5
8
|
/** Integrations that "full integration readiness" requires. OmniRoute is optional and never counted. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/integrations/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/integrations/types.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,CAAU,CAAC;AAG9F,wGAAwG;AACxG,MAAM,CAAC,MAAM,qBAAqB,GAAoB,CAAC,UAAU,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC;AAE/F,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,eAAe;IACf,uBAAuB;IACvB,YAAY;IACZ,WAAW;IACX,UAAU;IACV,UAAU;IACV,QAAQ;IACR,kBAAkB;CACV,CAAC","sourcesContent":["import type { RunResult } from '../utils/proc.js';\n\nexport interface PersistentPath {\n user: string[];\n machine: string[];\n}\n\nexport const INTEGRATION_IDS = ['graphify', 'agent-skills', 'ponytail', 'omniroute'] as const;\nexport type IntegrationId = (typeof INTEGRATION_IDS)[number];\n\n/** Integrations that \"full integration readiness\" requires. OmniRoute is optional and never counted. */\nexport const REQUIRED_INTEGRATIONS: IntegrationId[] = ['graphify', 'agent-skills', 'ponytail'];\n\nexport const STATUS_CODES = [\n 'NOT_INSTALLED',\n 'PREREQUISITES_MISSING',\n 'INSTALLING',\n 'INSTALLED',\n 'VERIFIED',\n 'DEGRADED',\n 'FAILED',\n 'RESTART_REQUIRED',\n] as const;\nexport type StatusCode = (typeof STATUS_CODES)[number];\n\nexport type InstallScope = 'project' | 'user';\n\nexport interface Check {\n name: string;\n ok: boolean;\n detail?: string;\n}\n\n/**\n * What was actually observed about an integration. `deep` reports come from running the tool and are the only\n * ones that can be VERIFIED; shallow reports only look at files and PATH and top out at INSTALLED.\n */\nexport interface IntegrationReport {\n id: IntegrationId;\n name: string;\n required: boolean;\n status: StatusCode;\n /** e.g. \"cli + project skill\", \"native plugin\", \"portable skills\" */\n variant: string | null;\n scope: InstallScope | null;\n version: string | null;\n checks: Check[];\n capabilities: Record<string, boolean>;\n warnings: string[];\n /** Exact commands or instructions that would move this integration forward. */\n nextSteps: string[];\n deep: boolean;\n}\n\n// ---------- process runner (mockable) ----------\n\nexport interface RunSpec {\n command: string;\n args: string[];\n cwd?: string;\n env?: Record<string, string | undefined>;\n timeoutMs?: number;\n signal?: AbortSignal;\n}\n\nexport interface Runner {\n run(spec: RunSpec): Promise<RunResult>;\n /** Run `npx <args>` without a shell (resolves npm's npx-cli.js next to the running Node). */\n runNpx(args: string[], spec?: Omit<RunSpec, 'command' | 'args'>): Promise<RunResult>;\n which(name: string): Promise<string | null>;\n}\n\n// ---------- setup ----------\n\nexport interface SetupOptions {\n scope: InstallScope;\n /** Consent for machine-level, user-config and third-party-code steps. Never implied. */\n yes: boolean;\n dryRun: boolean;\n /** Allow re-running install steps for DEGRADED/FAILED integrations. */\n repair: boolean;\n only?: IntegrationId[];\n}\n\n/**\n * project changes files inside the project only\n * machine installs a tool for the current user (uv/pipx/pip --user)\n * user-config changes the user's Claude Code configuration (user scope)\n * third-party-code runs a package from a registry (npx skills)\n */\nexport type StepLevel = 'project' | 'machine' | 'user-config' | 'third-party-code';\n\nexport interface StepOutcome {\n ok: boolean;\n detail?: string;\n /** The tool needs interactive approval we will not simulate. */\n requiresApproval?: boolean;\n restartRequired?: boolean;\n /** An actionable next step for the user when this step failed. */\n hint?: string;\n /** Project-relative paths this step created; recorded so repair can refresh them without touching user files. */\n managedPaths?: string[];\n}\n\nexport interface PlanStep {\n id: string;\n description: string;\n /** Human-readable command line (never executed from this string). */\n command?: string;\n level: StepLevel;\n run(): Promise<StepOutcome>;\n}\n\nexport interface PlanResult {\n steps: PlanStep[];\n /** Missing prerequisites with exact remediation; when non-empty and no steps exist, nothing can be done automatically. */\n blockers: string[];\n /** Files the steps may legitimately touch but must only extend, never overwrite. */\n protectPaths: string[];\n notes: string[];\n}\n\nexport interface ProgressEvent {\n id: IntegrationId | 'setup';\n step: string;\n state: 'start' | 'ok' | 'skip' | 'fail' | 'info';\n detail?: string;\n}\n\nexport interface AdapterContext {\n root: string;\n home: string;\n env: NodeJS.ProcessEnv;\n platform: NodeJS.Platform;\n runner: Runner;\n setup: SetupOptions;\n signal?: AbortSignal;\n /**\n * The PATH new processes will start with (Windows registry; read-only). Null where that concept does not apply\n * (macOS, Linux) or cannot be read. Adapters must treat null as \"unknown\", never as \"absent\".\n */\n persistentPath(): Promise<PersistentPath | null>;\n /** Persisted facts from earlier runs (only trusted as hints). */\n prior: PersistedIntegration | undefined;\n report(e: ProgressEvent): void;\n}\n\nexport interface IntegrationAdapter {\n id: IntegrationId;\n name: string;\n required: boolean;\n /** Text embedded in the generated agent skill. */\n usage: string;\n docsUrl: string;\n inspect(ctx: AdapterContext, deep: boolean): Promise<IntegrationReport>;\n plan(ctx: AdapterContext, report: IntegrationReport): Promise<PlanResult>;\n}\n\n// ---------- persisted state (.devworkspace/state/integrations.json) ----------\n\nexport interface PersistedIntegration {\n status: StatusCode;\n variant: string | null;\n scope: InstallScope | null;\n version: string | null;\n lastAttemptAt: string | null;\n lastVerifiedAt: string | null;\n lastError: string | null;\n /** Set when a step finished that needs a Claude Code restart/reload; cleared by acknowledging the restart. */\n restartRequiredAt: string | null;\n /** Project-relative paths this tool created, so repair may refresh them without touching user files. */\n managedPaths: string[];\n /** Set while a setup run is in progress. A leftover value means the run was interrupted. */\n installing: { pid: number; startedAt: string; step: string } | null;\n}\n\nexport interface IntegrationsStateFile {\n schemaVersion: number;\n updatedAt: string;\n integrations: Partial<Record<IntegrationId, PersistedIntegration>>;\n}\n"]}
|