devworkspace 0.4.4 → 0.5.0
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 +83 -0
- package/README.md +14 -6
- package/dist/cli/args.d.ts +37 -0
- package/dist/cli/args.js +12 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/help.js +141 -1
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/render.d.ts +8 -1
- package/dist/cli/render.js +124 -0
- package/dist/cli/render.js.map +1 -1
- package/dist/cli/run.js +364 -4
- 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/adapters/pluginSkill.js +15 -1
- package/dist/integrations/adapters/pluginSkill.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 +42 -0
- package/dist/intelligence/orchestration/engine.js +418 -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 +100 -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 +60 -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/external.d.ts +9 -0
- package/dist/intelligence/runtime/external.js +102 -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 +99 -0
- package/dist/intelligence/runtime/native.js.map +1 -0
- package/dist/intelligence/runtime/types.d.ts +49 -0
- package/dist/intelligence/runtime/types.js +2 -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 +23 -0
- package/dist/intelligence/verification/engine.js +66 -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 +32 -0
- package/dist/intelligence/verification/types.js +2 -0
- package/dist/intelligence/verification/types.js.map +1 -0
- package/dist/mcp/setup.d.ts +23 -4
- package/dist/mcp/setup.js +107 -22
- 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 +45 -10
- 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/graph.d.ts +21 -0
- package/dist/services/graph.js +222 -3
- package/dist/services/graph.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 +57 -0
- package/dist/standards/distribution/cache.js +411 -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 +248 -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 +51 -0
- package/dist/standards/distribution/sync.js +212 -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.js +21 -3
- package/dist/utils/proc.js.map +1 -1
- package/docs/contributing.md +9 -0
- package/docs/getting-started.md +7 -0
- package/docs/integrations.md +2 -2
- package/docs/mcp.md +8 -3
- package/docs/security/HOME_SERVER_THREAT_MODEL.md +72 -0
- package/docs/security/THREAT_MODEL.md +101 -0
- package/docs/standards.md +143 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pluginSkill.js","sourceRoot":"","sources":["../../../src/integrations/adapters/pluginSkill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,aAAa,EAAa,MAAM,YAAY,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,qBAAqB,EAAE,eAAe,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAmB,MAAM,mBAAmB,CAAC;AAC1J,OAAO,EAAE,qBAAqB,EAAqB,MAAM,eAAe,CAAC;AAEzE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAuB/C,MAAM,UAAU,GAAG,QAAQ,CAAC;AAE5B,KAAK,UAAU,SAAS,CAAC,IAAY;IACnC,IAAI,CAAC;QACH,OAAO,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC7I,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,C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AC;gBAClI,CAAC;aACF,CAAC,CAAC;YACH,KAAK,CAAC,IAAI,CAAC;gBACT,EAAE,EAAE,GAAG,GAAG,CAAC,EAAE,SAAS;gBACtB,WAAW,EAAE,gFAAgF;gBAC7F,KAAK,EAAE,SAAS;gBAChB,KAAK,CAAC,GAAG;oBACP,MAAM,qBAAqB,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;oBAClD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;gBACtB,CAAC;aACF,CAAC,CAAC;YACH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;QAClD,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { promises as fs } from 'node:fs';\nimport path from 'node:path';\nimport { compareVersions, findClaudeCli, type Tool } from '../exec.js';\nimport { findPlugin, listPlugins, marketplaceRegistered, MIN_PLUGIN_JSON, nativeSteps, pluginId, readDeclared, type NativeSpec } from './claudePlugin.js';\nimport { writeThirdPartyNotice, type NoticeSource } from '../notices.js';\nimport type { AdapterContext, Check, IntegrationAdapter, IntegrationId, IntegrationReport, PlanResult, PlanStep, StepOutcome } from '../types.js';\nimport { pathExists } from '../../utils/fs.js';\n\nexport interface PluginSkillConfig {\n id: IntegrationId;\n name: string;\n usage: string;\n docsUrl: string;\n native: NativeSpec;\n /** `owner/repo` for the portable `npx skills add` path. */\n skillsRepo: string;\n /** Skill directories whose presence means the portable skills are installed. */\n coreSkills: string[];\n notice: NoticeSource;\n /** Capabilities the native plugin provides that portable skills cannot. */\n nativeOnly: string[];\n /** True only when the plugin's own manifest registers lifecycle hooks (verified from its plugin.json). */\n nativeHooks: boolean;\n /** Extra check for the native plugin (e.g. hooks need node). */\n extraNativeChecks?(ctx: AdapterContext): Promise<{ checks: Check[]; warnings: string[]; degraded: boolean }>;\n /** Shared supplementary directory expected beside skills (agent-skills ships references/). */\n referencesDir?: string;\n}\n\nconst SKILLS_CLI = 'skills';\n\nasync function skillDirs(base: string): Promise<string[]> {\n try {\n return (await fs.readdir(path.join(base, '.claude', 'skills'), { withFileTypes: true })).filter((e) => e.isDirectory()).map((e) => e.name);\n } catch {\n return [];\n }\n}\n\nasync function fileExists(p: string): Promise<boolean> {\n return pathExists(p);\n}\n\nexport function createPluginSkillAdapter(cfg: PluginSkillConfig): IntegrationAdapter {\n const id = pluginId(cfg.native);\n\n async function observe(ctx: AdapterContext, deep: boolean): Promise<{\n claude: Tool | null;\n nativeInstalled: boolean;\n nativeScope: 'project' | 'user' | null;\n nativeError: string | null;\n registered: boolean;\n version: string | null;\n listError: string | null;\n portablePresent: string[];\n portableScope: 'project' | 'user' | null;\n refs: boolean;\n }> {\n const declared = await readDeclared(ctx, cfg.native);\n let claude: Tool | null = null;\n let nativeInstalled = declared.enabled !== null;\n let nativeScope = declared.enabled;\n let nativeError: string | null = null;\n let registered = declared.marketplace;\n let version: string | null = null;\n let listError: string | null = null;\n if (deep) {\n claude = await findClaudeCli(ctx.runner, ctx.home, ctx.signal);\n if (claude && compareVersions(claude.version, MIN_PLUGIN_JSON) >= 0) {\n const l = await listPlugins(ctx, claude);\n if (l.ok) {\n const p = findPlugin(l.plugins, id, ctx.root);\n nativeInstalled = !!p && p.enabled;\n nativeScope = p ? (p.scope === 'user' ? 'user' : 'project') : null;\n version = p?.version ?? null;\n if (p && (p.errors?.length ?? 0) > 0) nativeError = p.errors!.join('; ').slice(0, 300);\n if (p && !p.enabled) nativeError = 'the plugin is installed but disabled';\n if (!p) {\n const reg = await marketplaceRegistered(ctx, claude, cfg.native.marketplaceName);\n registered = reg ?? registered;\n } else registered = true;\n } else listError = l.error ?? 'could not list plugins';\n }\n }\n const projectSkills = await skillDirs(ctx.root);\n const userSkills = await skillDirs(ctx.home);\n const inProject = cfg.coreSkills.filter((s) => projectSkills.includes(s));\n const inUser = cfg.coreSkills.filter((s) => userSkills.includes(s));\n const portablePresent = inProject.length >= inUser.length ? inProject : inUser;\n const portableScope = portablePresent.length === 0 ? null : inProject.length >= inUser.length ? 'project' : 'user';\n let refs = true;\n if (cfg.referencesDir && portablePresent.length > 0) {\n const base = portableScope === 'user' ? ctx.home : ctx.root;\n refs = (await fileExists(path.join(base, '.claude', 'skills', cfg.referencesDir))) || (await fileExists(path.join(base, '.claude', cfg.referencesDir))) || (await fileExists(path.join(base, cfg.referencesDir)));\n }\n return { claude, nativeInstalled, nativeScope, nativeError, registered, version, listError, portablePresent, portableScope, refs };\n }\n\n return {\n id: cfg.id,\n name: cfg.name,\n required: true,\n usage: cfg.usage,\n docsUrl: cfg.docsUrl,\n\n async inspect(ctx, deep): Promise<IntegrationReport> {\n const o = await observe(ctx, deep);\n const checks: Check[] = [];\n const warnings: string[] = [];\n const nextSteps: string[] = [];\n const caps: Record<string, boolean> = { skills: false, commands: false, hooks: false };\n const base = { id: cfg.id, name: cfg.name, required: true, deep } as const;\n if (deep) checks.push({ name: 'Claude Code CLI', ok: !!o.claude, detail: o.claude ? `v${o.claude.version}` : 'not found (PATH or VS Code extension)' });\n if (o.listError) warnings.push(`Could not read the plugin list: ${o.listError}`);\n\n if (o.nativeInstalled) {\n checks.push({ name: 'native plugin', ok: !o.nativeError, detail: o.nativeError ?? `${id}${o.nativeScope ? ` (${o.nativeScope} scope)` : ''}` });\n caps.skills = true;\n caps.commands = true;\n let degraded = !!o.nativeError;\n if (o.nativeError) {\n warnings.push(`${cfg.name} plugin problem: ${o.nativeError}`);\n nextSteps.push(`claude plugin list (inspect errors), then: claude plugin enable ${id}`);\n }\n const extra = cfg.extraNativeChecks ? await cfg.extraNativeChecks(ctx) : { checks: [], warnings: [], degraded: false };\n checks.push(...extra.checks);\n warnings.push(...extra.warnings);\n caps.hooks = cfg.nativeHooks && !extra.degraded;\n degraded = degraded || extra.degraded;\n if (!deep) warnings.push('Not yet verified against `claude plugin list`; run `devworkspace doctor` or `devworkspace integrations status`.');\n return { ...base, status: degraded ? 'DEGRADED' : deep ? 'VERIFIED' : 'INSTALLED', variant: 'native plugin', scope: o.nativeScope, version: o.version, checks, capabilities: caps, warnings, nextSteps };\n }\n\n if (o.portablePresent.length > 0) {\n const complete = o.portablePresent.length === cfg.coreSkills.length;\n caps.skills = complete;\n checks.push({ name: 'portable skills', ok: complete, detail: `${o.portablePresent.length}/${cfg.coreSkills.length} core skills found (${o.portableScope} scope)` });\n if (cfg.referencesDir) checks.push({ name: 'supplementary references', ok: o.refs, detail: o.refs ? 'found' : `${cfg.referencesDir}/ not installed` });\n if (!complete) {\n const missing = cfg.coreSkills.filter((s) => !o.portablePresent.includes(s));\n warnings.push(`Partial installation: missing skills ${missing.join(', ')}.`);\n nextSteps.push('devworkspace integrations repair --yes');\n }\n if (!o.refs) warnings.push(`The shared ${cfg.referencesDir}/ checklists are not installed (known limitation of the skills CLI), so skills that point to them have broken references.`);\n warnings.push(`Portable skills only: ${cfg.nativeOnly.join(', ')} from the native plugin are not available.`);\n nextSteps.push(`For the full plugin: claude plugin marketplace add ${cfg.native.marketplaceUrl} --scope project, then claude plugin install ${id} --scope project`);\n return { ...base, status: 'DEGRADED', variant: 'portable skills', scope: o.portableScope, version: null, checks, capabilities: caps, warnings, nextSteps };\n }\n\n checks.push({ name: 'marketplace', ok: o.registered, detail: o.registered ? `${cfg.native.marketplaceName} is registered but the plugin is not installed` : 'not registered' });\n nextSteps.push('devworkspace setup --integrations --yes');\n return { ...base, status: 'NOT_INSTALLED', variant: null, scope: null, version: null, checks, capabilities: caps, warnings, nextSteps };\n },\n\n async plan(ctx, report): Promise<PlanResult> {\n const o = await observe(ctx, true);\n const blockers: string[] = [];\n const notes: string[] = [];\n const protectPaths = ['.claude/settings.json', '.claude/settings.local.json', 'CLAUDE.md', '.claude/CLAUDE.md', 'AGENTS.md'];\n const steps: PlanStep[] = [];\n const scope = ctx.setup.scope;\n\n if (report.status === 'VERIFIED' && !ctx.setup.repair) return { steps, blockers, protectPaths, notes: ['already verified'] };\n if (o.nativeInstalled && !o.nativeError) return { steps, blockers, protectPaths, notes: ['native plugin already installed'] };\n\n // If the plugin list cannot be read we do not know what is installed: installing anything now could duplicate or overwrite it.\n if (o.claude && compareVersions(o.claude.version, MIN_PLUGIN_JSON) >= 0 && o.listError) {\n blockers.push(`Could not read the installed plugin list (${o.listError}), so nothing was installed. Run \"claude plugin list --json\" yourself to see what is installed, then re-run setup.`);\n return { steps, blockers, protectPaths, notes };\n }\n if (o.claude && compareVersions(o.claude.version, MIN_PLUGIN_JSON) >= 0 && !o.listError) {\n // marketplace registered but plugin missing -> only the install step\n steps.push(...nativeSteps(ctx, o.claude, cfg.native, scope, { registered: o.registered }));\n if (o.nativeError && o.nativeScope) {\n notes.push(`The plugin is present but unhealthy (${o.nativeError}); re-running install to repair.`);\n }\n return { steps, blockers, protectPaths, notes };\n }\n if (o.claude) notes.push(`Claude Code ${o.claude.version} is older than ${MIN_PLUGIN_JSON}, which the plugin commands' --json output needs; using portable skills.`);\n else notes.push('The Claude Code CLI was not found on PATH or in the VS Code extension; using portable skills instead of the native plugin.');\n if (o.listError) notes.push(`\\`claude plugin list\\` failed (${o.listError}); using portable skills.`);\n\n // ---- portable skills via the documented Skills CLI ----\n if (o.portablePresent.length === cfg.coreSkills.length && o.refs) return { steps, blockers, protectPaths, notes: [...notes, 'portable skills already installed'] };\n const managed = new Set(ctx.prior?.managedPaths ?? []);\n const baseDir = scope === 'user' ? ctx.home : ctx.root;\n const existing = await skillDirs(baseDir);\n const conflicts = cfg.coreSkills.filter((s) => existing.includes(s) && !managed.has(`.claude/skills/${s}`));\n if (conflicts.length > 0 && o.portablePresent.length < cfg.coreSkills.length) {\n blockers.push(\n `Skill folder(s) ${conflicts.join(', ')} already exist in .claude/skills and were not installed by DevWorkspace, so they are treated as yours and will not be overwritten. Rename or remove them, or install the native plugin instead.`,\n );\n return { steps, blockers, protectPaths, notes };\n }\n const args = ['--yes', SKILLS_CLI, 'add', cfg.skillsRepo, '--agent', 'claude-code', '--skill', '*', '--copy', '-y', '--json', ...(scope === 'user' ? ['-g'] : [])];\n steps.push({\n id: `${cfg.id}:skills-cli`,\n description: `Install ${cfg.name} skills from ${cfg.skillsRepo} with the Skills CLI (${scope} scope, copied files, telemetry disabled)`,\n command: `npx ${args.join(' ')}`,\n level: 'third-party-code',\n async run(): Promise<StepOutcome> {\n const before = new Set(await skillDirs(baseDir));\n const r = await ctx.runner.runNpx(args, { cwd: ctx.root, timeoutMs: 300_000, signal: ctx.signal, env: { DISABLE_TELEMETRY: '1', DO_NOT_TRACK: '1' } });\n if (r.aborted) return { ok: false, detail: 'cancelled' };\n if (r.timedOut) return { ok: false, detail: 'timed out after 300 s (network?)' };\n if (!r.ok) {\n const tail = `${r.stderr}\\n${r.stdout}`.split(/\\r?\\n/).map((l) => l.trim()).filter(Boolean).slice(-3).join(' ');\n return { ok: false, detail: (tail || r.error || `exit ${r.code}`).slice(0, 400) };\n }\n const after = await skillDirs(baseDir);\n const created = after.filter((s) => !before.has(s));\n ctx.report({ id: cfg.id, step: `${cfg.id}:skills-cli`, state: 'info', detail: `${created.length} skill folder(s) added` });\n return { ok: true, detail: `${created.length} skill folder(s) added`, managedPaths: created.map((s) => `.claude/skills/${s}`) };\n },\n });\n steps.push({\n id: `${cfg.id}:notice`,\n description: 'Record third-party license/attribution in .devworkspace/THIRD_PARTY_NOTICES.md',\n level: 'project',\n async run(): Promise<StepOutcome> {\n await writeThirdPartyNotice(ctx.root, cfg.notice);\n return { ok: true };\n },\n });\n return { steps, blockers, protectPaths, notes };\n },\n };\n}\n\n"]}
|
|
1
|
+
{"version":3,"file":"pluginSkill.js","sourceRoot":"","sources":["../../../src/integrations/adapters/pluginSkill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,aAAa,EAAa,MAAM,YAAY,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,qBAAqB,EAAE,e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,CAAC;oBACvC,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;oBACpD,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,IAAI,EAAE,GAAG,GAAG,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,wBAAwB,EAAE,CAAC,CAAC;oBAC3H,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,wBAAwB,EAAE,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,EAAE,CAAC,EAAE,CAAC;gBAClI,CAAC;aACF,CAAC,CAAC;YACH,KAAK,CAAC,IAAI,CAAC;gBACT,EAAE,EAAE,GAAG,GAAG,CAAC,EAAE,SAAS;gBACtB,WAAW,EAAE,gFAAgF;gBAC7F,KAAK,EAAE,SAAS;gBAChB,KAAK,CAAC,GAAG;oBACP,MAAM,qBAAqB,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;oBAClD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;gBACtB,CAAC;aACF,CAAC,CAAC;YACH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;QAClD,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { promises as fs } from 'node:fs';\nimport path from 'node:path';\nimport { compareVersions, findClaudeCli, type Tool } from '../exec.js';\nimport { findPlugin, listPlugins, marketplaceRegistered, MIN_PLUGIN_JSON, nativeSteps, pluginId, readDeclared, type NativeSpec } from './claudePlugin.js';\nimport { writeThirdPartyNotice, type NoticeSource } from '../notices.js';\nimport type { AdapterContext, Check, IntegrationAdapter, IntegrationId, IntegrationReport, PlanResult, PlanStep, StepOutcome } from '../types.js';\nimport { pathExists } from '../../utils/fs.js';\n\nexport interface PluginSkillConfig {\n id: IntegrationId;\n name: string;\n usage: string;\n docsUrl: string;\n native: NativeSpec;\n /** `owner/repo` for the portable `npx skills add` path. */\n skillsRepo: string;\n /** Skill directories whose presence means the portable skills are installed. */\n coreSkills: string[];\n notice: NoticeSource;\n /** Capabilities the native plugin provides that portable skills cannot. */\n nativeOnly: string[];\n /** True only when the plugin's own manifest registers lifecycle hooks (verified from its plugin.json). */\n nativeHooks: boolean;\n /** Extra check for the native plugin (e.g. hooks need node). */\n extraNativeChecks?(ctx: AdapterContext): Promise<{ checks: Check[]; warnings: string[]; degraded: boolean }>;\n /** Shared supplementary directory expected beside skills (agent-skills ships references/). */\n referencesDir?: string;\n}\n\nconst SKILLS_CLI = 'skills';\n\nasync function skillDirs(base: string): Promise<string[]> {\n try {\n return (await fs.readdir(path.join(base, '.claude', 'skills'), { withFileTypes: true })).filter((e) => e.isDirectory()).map((e) => e.name);\n } catch {\n return [];\n }\n}\n\nasync function fileExists(p: string): Promise<boolean> {\n return pathExists(p);\n}\n\nexport function createPluginSkillAdapter(cfg: PluginSkillConfig): IntegrationAdapter {\n const id = pluginId(cfg.native);\n\n async function observe(ctx: AdapterContext, deep: boolean): Promise<{\n claude: Tool | null;\n nativePresent: boolean;\n nativeInstalled: boolean;\n nativeScope: 'project' | 'user' | null;\n nativeError: string | null;\n registered: boolean;\n version: string | null;\n listError: string | null;\n portablePresent: string[];\n portableScope: 'project' | 'user' | null;\n refs: boolean;\n }> {\n const declared = await readDeclared(ctx, cfg.native);\n let claude: Tool | null = null;\n let nativePresent = declared.enabled !== null;\n let nativeInstalled = declared.enabled !== null;\n let nativeScope = declared.enabled;\n let nativeError: string | null = null;\n let registered = declared.marketplace;\n let version: string | null = null;\n let listError: string | null = null;\n if (deep) {\n claude = await findClaudeCli(ctx.runner, ctx.home, ctx.signal);\n if (claude && compareVersions(claude.version, MIN_PLUGIN_JSON) >= 0) {\n const l = await listPlugins(ctx, claude);\n if (l.ok) {\n const p = findPlugin(l.plugins, id, ctx.root);\n nativePresent = !!p;\n nativeInstalled = !!p && p.enabled;\n nativeScope = p ? (p.scope === 'user' ? 'user' : 'project') : null;\n version = p?.version ?? null;\n if (p && (p.errors?.length ?? 0) > 0) nativeError = p.errors!.join('; ').slice(0, 300);\n if (p && !p.enabled) nativeError = 'the plugin is installed but disabled';\n if (!p) {\n const reg = await marketplaceRegistered(ctx, claude, cfg.native.marketplaceName);\n registered = reg ?? registered;\n } else registered = true;\n } else listError = l.error ?? 'could not list plugins';\n }\n }\n const projectSkills = await skillDirs(ctx.root);\n const userSkills = await skillDirs(ctx.home);\n const inProject = cfg.coreSkills.filter((s) => projectSkills.includes(s));\n const inUser = cfg.coreSkills.filter((s) => userSkills.includes(s));\n const portablePresent = inProject.length >= inUser.length ? inProject : inUser;\n const portableScope = portablePresent.length === 0 ? null : inProject.length >= inUser.length ? 'project' : 'user';\n let refs = true;\n if (cfg.referencesDir && portablePresent.length > 0) {\n const base = portableScope === 'user' ? ctx.home : ctx.root;\n refs = (await fileExists(path.join(base, '.claude', 'skills', cfg.referencesDir))) || (await fileExists(path.join(base, '.claude', cfg.referencesDir))) || (await fileExists(path.join(base, cfg.referencesDir)));\n }\n return { claude, nativePresent, nativeInstalled, nativeScope, nativeError, registered, version, listError, portablePresent, portableScope, refs };\n }\n\n return {\n id: cfg.id,\n name: cfg.name,\n required: true,\n usage: cfg.usage,\n docsUrl: cfg.docsUrl,\n\n async inspect(ctx, deep): Promise<IntegrationReport> {\n const o = await observe(ctx, deep);\n const checks: Check[] = [];\n const warnings: string[] = [];\n const nextSteps: string[] = [];\n const caps: Record<string, boolean> = { skills: false, commands: false, hooks: false };\n const base = { id: cfg.id, name: cfg.name, required: true, deep } as const;\n if (deep) checks.push({ name: 'Claude Code CLI', ok: !!o.claude, detail: o.claude ? `v${o.claude.version}` : 'not found (PATH or VS Code extension)' });\n if (o.listError) warnings.push(`Could not read the plugin list: ${o.listError}`);\n\n if (o.nativeInstalled) {\n checks.push({ name: 'native plugin', ok: !o.nativeError, detail: o.nativeError ?? `${id}${o.nativeScope ? ` (${o.nativeScope} scope)` : ''}` });\n caps.skills = true;\n caps.commands = true;\n let degraded = !!o.nativeError;\n if (o.nativeError) {\n warnings.push(`${cfg.name} plugin problem: ${o.nativeError}`);\n nextSteps.push(`claude plugin list (inspect errors), then: claude plugin enable ${id}`);\n }\n const extra = cfg.extraNativeChecks ? await cfg.extraNativeChecks(ctx) : { checks: [], warnings: [], degraded: false };\n checks.push(...extra.checks);\n warnings.push(...extra.warnings);\n caps.hooks = cfg.nativeHooks && !extra.degraded;\n degraded = degraded || extra.degraded;\n if (!deep) warnings.push('Not yet verified against `claude plugin list`; run `devworkspace doctor` or `devworkspace integrations status`.');\n return { ...base, status: degraded ? 'DEGRADED' : deep ? 'VERIFIED' : 'INSTALLED', variant: 'native plugin', scope: o.nativeScope, version: o.version, checks, capabilities: caps, warnings, nextSteps };\n }\n\n if (o.nativePresent && !o.nativeInstalled) {\n checks.push({ name: 'native plugin', ok: false, detail: `${id} is installed but disabled${o.nativeScope ? ` (${o.nativeScope} scope)` : ''}` });\n caps.skills = true;\n caps.commands = true;\n warnings.push(`${cfg.name} plugin is installed but disabled.`);\n nextSteps.push(`claude plugin enable ${id}`);\n return { ...base, status: 'DEGRADED', variant: 'native plugin', scope: o.nativeScope, version: o.version, checks, capabilities: caps, warnings, nextSteps };\n }\n\n if (o.portablePresent.length > 0) {\n const complete = o.portablePresent.length === cfg.coreSkills.length;\n caps.skills = complete;\n checks.push({ name: 'portable skills', ok: complete, detail: `${o.portablePresent.length}/${cfg.coreSkills.length} core skills found (${o.portableScope} scope)` });\n if (cfg.referencesDir) checks.push({ name: 'supplementary references', ok: o.refs, detail: o.refs ? 'found' : `${cfg.referencesDir}/ not installed` });\n if (!complete) {\n const missing = cfg.coreSkills.filter((s) => !o.portablePresent.includes(s));\n warnings.push(`Partial installation: missing skills ${missing.join(', ')}.`);\n nextSteps.push('devworkspace integrations repair --yes');\n }\n if (!o.refs) warnings.push(`The shared ${cfg.referencesDir}/ checklists are not installed (known limitation of the skills CLI), so skills that point to them have broken references.`);\n warnings.push(`Portable skills only: ${cfg.nativeOnly.join(', ')} from the native plugin are not available.`);\n nextSteps.push(`For the full plugin: claude plugin marketplace add ${cfg.native.marketplaceUrl} --scope project, then claude plugin install ${id} --scope project`);\n return { ...base, status: 'DEGRADED', variant: 'portable skills', scope: o.portableScope, version: null, checks, capabilities: caps, warnings, nextSteps };\n }\n\n checks.push({ name: 'marketplace', ok: o.registered, detail: o.registered ? `${cfg.native.marketplaceName} is registered but the plugin is not installed` : 'not registered' });\n if (!o.registered) {\n warnings.push(`Marketplace ${cfg.native.marketplaceName} is not registered.`);\n nextSteps.push(`claude plugin marketplace add ${cfg.native.marketplaceUrl} --scope project`);\n }\n nextSteps.push('devworkspace setup --integrations --yes');\n return { ...base, status: 'NOT_INSTALLED', variant: null, scope: null, version: null, checks, capabilities: caps, warnings, nextSteps };\n },\n\n async plan(ctx, report): Promise<PlanResult> {\n const o = await observe(ctx, true);\n const blockers: string[] = [];\n const notes: string[] = [];\n const protectPaths = ['.claude/settings.json', '.claude/settings.local.json', 'CLAUDE.md', '.claude/CLAUDE.md', 'AGENTS.md'];\n const steps: PlanStep[] = [];\n const scope = ctx.setup.scope;\n\n if (report.status === 'VERIFIED' && !ctx.setup.repair) return { steps, blockers, protectPaths, notes: ['already verified'] };\n if (o.nativeInstalled && !o.nativeError) return { steps, blockers, protectPaths, notes: ['native plugin already installed'] };\n\n // If the plugin list cannot be read we do not know what is installed: installing anything now could duplicate or overwrite it.\n if (o.claude && compareVersions(o.claude.version, MIN_PLUGIN_JSON) >= 0 && o.listError) {\n blockers.push(`Could not read the installed plugin list (${o.listError}), so nothing was installed. Run \"claude plugin list --json\" yourself to see what is installed, then re-run setup.`);\n return { steps, blockers, protectPaths, notes };\n }\n if (o.claude && compareVersions(o.claude.version, MIN_PLUGIN_JSON) >= 0 && !o.listError) {\n // marketplace registered but plugin missing -> only the install step\n steps.push(...nativeSteps(ctx, o.claude, cfg.native, scope, { registered: o.registered }));\n if (o.nativeError && o.nativeScope) {\n notes.push(`The plugin is present but unhealthy (${o.nativeError}); re-running install to repair.`);\n }\n return { steps, blockers, protectPaths, notes };\n }\n if (o.claude) notes.push(`Claude Code ${o.claude.version} is older than ${MIN_PLUGIN_JSON}, which the plugin commands' --json output needs; using portable skills.`);\n else notes.push('The Claude Code CLI was not found on PATH or in the VS Code extension; using portable skills instead of the native plugin.');\n if (o.listError) notes.push(`\\`claude plugin list\\` failed (${o.listError}); using portable skills.`);\n\n // ---- portable skills via the documented Skills CLI ----\n if (o.portablePresent.length === cfg.coreSkills.length && o.refs) return { steps, blockers, protectPaths, notes: [...notes, 'portable skills already installed'] };\n const managed = new Set(ctx.prior?.managedPaths ?? []);\n const baseDir = scope === 'user' ? ctx.home : ctx.root;\n const existing = await skillDirs(baseDir);\n const conflicts = cfg.coreSkills.filter((s) => existing.includes(s) && !managed.has(`.claude/skills/${s}`));\n if (conflicts.length > 0 && o.portablePresent.length < cfg.coreSkills.length) {\n blockers.push(\n `Skill folder(s) ${conflicts.join(', ')} already exist in .claude/skills and were not installed by DevWorkspace, so they are treated as yours and will not be overwritten. Rename or remove them, or install the native plugin instead.`,\n );\n return { steps, blockers, protectPaths, notes };\n }\n const args = ['--yes', SKILLS_CLI, 'add', cfg.skillsRepo, '--agent', 'claude-code', '--skill', '*', '--copy', '-y', '--json', ...(scope === 'user' ? ['-g'] : [])];\n steps.push({\n id: `${cfg.id}:skills-cli`,\n description: `Install ${cfg.name} skills from ${cfg.skillsRepo} with the Skills CLI (${scope} scope, copied files, telemetry disabled)`,\n command: `npx ${args.join(' ')}`,\n level: 'third-party-code',\n async run(): Promise<StepOutcome> {\n const before = new Set(await skillDirs(baseDir));\n const r = await ctx.runner.runNpx(args, { cwd: ctx.root, timeoutMs: 300_000, signal: ctx.signal, env: { DISABLE_TELEMETRY: '1', DO_NOT_TRACK: '1' } });\n if (r.aborted) return { ok: false, detail: 'cancelled' };\n if (r.timedOut) return { ok: false, detail: 'timed out after 300 s (network?)' };\n if (!r.ok) {\n const tail = `${r.stderr}\\n${r.stdout}`.split(/\\r?\\n/).map((l) => l.trim()).filter(Boolean).slice(-3).join(' ');\n return { ok: false, detail: (tail || r.error || `exit ${r.code}`).slice(0, 400) };\n }\n const after = await skillDirs(baseDir);\n const created = after.filter((s) => !before.has(s));\n ctx.report({ id: cfg.id, step: `${cfg.id}:skills-cli`, state: 'info', detail: `${created.length} skill folder(s) added` });\n return { ok: true, detail: `${created.length} skill folder(s) added`, managedPaths: created.map((s) => `.claude/skills/${s}`) };\n },\n });\n steps.push({\n id: `${cfg.id}:notice`,\n description: 'Record third-party license/attribution in .devworkspace/THIRD_PARTY_NOTICES.md',\n level: 'project',\n async run(): Promise<StepOutcome> {\n await writeThirdPartyNotice(ctx.root, cfg.notice);\n return { ok: true };\n },\n });\n return { steps, blockers, protectPaths, notes };\n },\n };\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/persistentPath.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAK7B,MAAM,QAAQ,GAAG,mBAAmB,CAAC;AACrC,MAAM,WAAW,GAAG,wEAAwE,CAAC;AAE7F,yEAAyE;AACzE,MAAM,UAAU,YAAY,CAAC,MAAc;IACzC,MAAM,CAAC,GAAG,6CAA6C,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACrE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/C,CAAC;AAED,0GAA0G;AAC1G,MAAM,UAAU,iBAAiB,CAAC,KAAa,EAAE,GAAsB;IACrE,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACvF,OAAO,KAAK,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,KAAK,EAAE,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,IAAI,KAAK,CAAC,CAAC;AACtG,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CA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AAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC3B,CAAC;AAED,2DAA2D;AAC3D,MAAM,UAAU,iBAAiB,CAAC,EAAkB,EAAE,GAAW;IAC/D,MAAM,IAAI,GAAG,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"]}
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
export const BUILTIN_AGENT_PROFILES = {
|
|
2
|
+
planner: {
|
|
3
|
+
id: 'planner',
|
|
4
|
+
name: 'Planner Agent',
|
|
5
|
+
description: 'Decomposes complex requests into structured, verified dependency graphs and milestone plans.',
|
|
6
|
+
role: 'PLANNER',
|
|
7
|
+
capabilities: ['requirements-analysis', 'task-decomposition', 'milestone-planning', 'dependency-graphing'],
|
|
8
|
+
supportedTaskTypes: ['FEATURE', 'REFACTOR', 'MAINTENANCE', 'ARCHITECTURE'],
|
|
9
|
+
requiredSkills: ['architecture-analysis'],
|
|
10
|
+
supportedProviders: ['native', 'claude-code', 'codex', 'antigravity', 'google-adk'],
|
|
11
|
+
modelPreferences: { preferredTier: 'reasoning' },
|
|
12
|
+
toolPermissions: [
|
|
13
|
+
{ name: 'get_project_overview', allowed: true },
|
|
14
|
+
{ name: 'get_task_context', allowed: true },
|
|
15
|
+
{ name: 'trace_symbol_dependencies', allowed: true },
|
|
16
|
+
],
|
|
17
|
+
filePermissions: {
|
|
18
|
+
readPatterns: ['**/*'],
|
|
19
|
+
writePatterns: ['.devworkspace/orchestration/plans/**'],
|
|
20
|
+
deniedPatterns: ['.env*', '**/*.key', '**/*.pem'],
|
|
21
|
+
},
|
|
22
|
+
riskClassification: 'LOW',
|
|
23
|
+
maxExecutionTimeSeconds: 120,
|
|
24
|
+
maxTokenBudget: 50_000,
|
|
25
|
+
maxRetryCount: 2,
|
|
26
|
+
isBuiltin: true,
|
|
27
|
+
version: '1.0.0',
|
|
28
|
+
},
|
|
29
|
+
architect: {
|
|
30
|
+
id: 'architect',
|
|
31
|
+
name: 'Architect Agent',
|
|
32
|
+
description: 'Evaluates architectural integrity, designs module boundaries, and formulates Architecture Decision Records (ADRs).',
|
|
33
|
+
role: 'ARCHITECT',
|
|
34
|
+
capabilities: ['system-design', 'adr-authoring', 'boundary-enforcement', 'technology-selection'],
|
|
35
|
+
supportedTaskTypes: ['ARCHITECTURE', 'FEATURE', 'REFACTOR'],
|
|
36
|
+
requiredSkills: ['architecture-analysis', 'database-design'],
|
|
37
|
+
supportedProviders: ['native', 'claude-code', 'codex', 'antigravity', 'google-adk'],
|
|
38
|
+
modelPreferences: { preferredTier: 'reasoning' },
|
|
39
|
+
toolPermissions: [
|
|
40
|
+
{ name: 'get_project_overview', allowed: true },
|
|
41
|
+
{ name: 'get_file_context', allowed: true },
|
|
42
|
+
{ name: 'trace_symbol_dependencies', allowed: true },
|
|
43
|
+
],
|
|
44
|
+
filePermissions: {
|
|
45
|
+
readPatterns: ['**/*'],
|
|
46
|
+
writePatterns: ['.devworkspace/decisions/**', 'docs/architecture*'],
|
|
47
|
+
deniedPatterns: ['.env*', '**/*.key', '**/*.pem'],
|
|
48
|
+
},
|
|
49
|
+
riskClassification: 'LOW',
|
|
50
|
+
maxExecutionTimeSeconds: 180,
|
|
51
|
+
maxTokenBudget: 60_000,
|
|
52
|
+
maxRetryCount: 2,
|
|
53
|
+
isBuiltin: true,
|
|
54
|
+
version: '1.0.0',
|
|
55
|
+
},
|
|
56
|
+
research: {
|
|
57
|
+
id: 'research',
|
|
58
|
+
name: 'Research Agent',
|
|
59
|
+
description: 'Explores repositories, traces AST call hierarchies, and verifies existing facts without modifying files.',
|
|
60
|
+
role: 'RESEARCH',
|
|
61
|
+
capabilities: ['symbol-tracing', 'code-exploration', 'fact-discovery', 'reference-mapping'],
|
|
62
|
+
supportedTaskTypes: ['QUESTION', 'BUG', 'FEATURE', 'REFACTOR', 'MAINTENANCE'],
|
|
63
|
+
requiredSkills: ['architecture-analysis', 'debugging'],
|
|
64
|
+
supportedProviders: ['native', 'claude-code', 'codex', 'antigravity', 'google-adk'],
|
|
65
|
+
modelPreferences: { preferredTier: 'fast' },
|
|
66
|
+
toolPermissions: [
|
|
67
|
+
{ name: 'get_project_overview', allowed: true },
|
|
68
|
+
{ name: 'get_file_context', allowed: true },
|
|
69
|
+
{ name: 'get_task_context', allowed: true },
|
|
70
|
+
{ name: 'trace_symbol_dependencies', allowed: true },
|
|
71
|
+
],
|
|
72
|
+
filePermissions: {
|
|
73
|
+
readPatterns: ['**/*'],
|
|
74
|
+
writePatterns: [],
|
|
75
|
+
deniedPatterns: ['.env*', '**/*.key', '**/*.pem'],
|
|
76
|
+
},
|
|
77
|
+
riskClassification: 'LOW',
|
|
78
|
+
maxExecutionTimeSeconds: 120,
|
|
79
|
+
maxTokenBudget: 40_000,
|
|
80
|
+
maxRetryCount: 2,
|
|
81
|
+
isBuiltin: true,
|
|
82
|
+
version: '1.0.0',
|
|
83
|
+
},
|
|
84
|
+
developer: {
|
|
85
|
+
id: 'developer',
|
|
86
|
+
name: 'Developer Agent',
|
|
87
|
+
description: 'Authoritative single-writer code implementation specialist for features, enhancements, and refactoring.',
|
|
88
|
+
role: 'DEVELOPER',
|
|
89
|
+
capabilities: ['code-implementation', 'refactoring', 'api-implementation', 'library-integration'],
|
|
90
|
+
supportedTaskTypes: ['FEATURE', 'BUG', 'REFACTOR', 'MAINTENANCE'],
|
|
91
|
+
requiredSkills: ['api-development', 'refactoring', 'test-driven-development'],
|
|
92
|
+
supportedProviders: ['native', 'claude-code', 'codex', 'antigravity', 'google-adk'],
|
|
93
|
+
modelPreferences: { preferredTier: 'coding' },
|
|
94
|
+
toolPermissions: [
|
|
95
|
+
{ name: 'get_project_overview', allowed: true },
|
|
96
|
+
{ name: 'get_file_context', allowed: true },
|
|
97
|
+
{ name: 'get_task_context', allowed: true },
|
|
98
|
+
{ name: 'execute_check', allowed: true },
|
|
99
|
+
],
|
|
100
|
+
filePermissions: {
|
|
101
|
+
readPatterns: ['**/*'],
|
|
102
|
+
writePatterns: ['src/**', 'lib/**', 'tests/**', 'package.json'],
|
|
103
|
+
deniedPatterns: ['.env*', '**/*.key', '**/*.pem', '.git/**'],
|
|
104
|
+
},
|
|
105
|
+
riskClassification: 'MEDIUM',
|
|
106
|
+
maxExecutionTimeSeconds: 300,
|
|
107
|
+
maxTokenBudget: 100_000,
|
|
108
|
+
maxRetryCount: 3,
|
|
109
|
+
isBuiltin: true,
|
|
110
|
+
version: '1.0.0',
|
|
111
|
+
},
|
|
112
|
+
debugger: {
|
|
113
|
+
id: 'debugger',
|
|
114
|
+
name: 'Debugger Agent',
|
|
115
|
+
description: 'Reproduces faults, writes failing regression tests, and identifies root causes.',
|
|
116
|
+
role: 'DEBUGGER',
|
|
117
|
+
capabilities: ['fault-reproduction', 'root-cause-analysis', 'regression-testing', 'stack-trace-analysis'],
|
|
118
|
+
supportedTaskTypes: ['BUG', 'TESTING'],
|
|
119
|
+
requiredSkills: ['debugging', 'test-driven-development'],
|
|
120
|
+
supportedProviders: ['native', 'claude-code', 'codex', 'antigravity', 'google-adk'],
|
|
121
|
+
modelPreferences: { preferredTier: 'reasoning' },
|
|
122
|
+
toolPermissions: [
|
|
123
|
+
{ name: 'get_project_overview', allowed: true },
|
|
124
|
+
{ name: 'get_file_context', allowed: true },
|
|
125
|
+
{ name: 'execute_check', allowed: true },
|
|
126
|
+
],
|
|
127
|
+
filePermissions: {
|
|
128
|
+
readPatterns: ['**/*'],
|
|
129
|
+
writePatterns: ['tests/**', 'src/**'],
|
|
130
|
+
deniedPatterns: ['.env*', '**/*.key', '**/*.pem'],
|
|
131
|
+
},
|
|
132
|
+
riskClassification: 'MEDIUM',
|
|
133
|
+
maxExecutionTimeSeconds: 240,
|
|
134
|
+
maxTokenBudget: 80_000,
|
|
135
|
+
maxRetryCount: 3,
|
|
136
|
+
isBuiltin: true,
|
|
137
|
+
version: '1.0.0',
|
|
138
|
+
},
|
|
139
|
+
testing: {
|
|
140
|
+
id: 'testing',
|
|
141
|
+
name: 'Testing Agent',
|
|
142
|
+
description: 'Authors and executes unit, integration, and end-to-end tests to guarantee contract adherence.',
|
|
143
|
+
role: 'TESTING',
|
|
144
|
+
capabilities: ['unit-testing', 'integration-testing', 'e2e-testing', 'mocking', 'coverage-analysis'],
|
|
145
|
+
supportedTaskTypes: ['TESTING', 'FEATURE', 'BUG', 'REFACTOR'],
|
|
146
|
+
requiredSkills: ['test-driven-development'],
|
|
147
|
+
supportedProviders: ['native', 'claude-code', 'codex', 'antigravity', 'google-adk'],
|
|
148
|
+
modelPreferences: { preferredTier: 'coding' },
|
|
149
|
+
toolPermissions: [
|
|
150
|
+
{ name: 'get_project_overview', allowed: true },
|
|
151
|
+
{ name: 'get_file_context', allowed: true },
|
|
152
|
+
{ name: 'execute_check', allowed: true },
|
|
153
|
+
],
|
|
154
|
+
filePermissions: {
|
|
155
|
+
readPatterns: ['**/*'],
|
|
156
|
+
writePatterns: ['tests/**', 'test/**', '__tests__/**'],
|
|
157
|
+
deniedPatterns: ['.env*', '**/*.key', '**/*.pem'],
|
|
158
|
+
},
|
|
159
|
+
riskClassification: 'LOW',
|
|
160
|
+
maxExecutionTimeSeconds: 240,
|
|
161
|
+
maxTokenBudget: 60_000,
|
|
162
|
+
maxRetryCount: 2,
|
|
163
|
+
isBuiltin: true,
|
|
164
|
+
version: '1.0.0',
|
|
165
|
+
},
|
|
166
|
+
'security-auditor': {
|
|
167
|
+
id: 'security-auditor',
|
|
168
|
+
name: 'Security Auditor',
|
|
169
|
+
description: 'Performs static application security testing, credential detection, and permission boundary validation.',
|
|
170
|
+
role: 'SECURITY_AUDITOR',
|
|
171
|
+
capabilities: ['vulnerability-scanning', 'secret-detection', 'owasp-audit', 'permission-enforcement'],
|
|
172
|
+
supportedTaskTypes: ['SECURITY', 'FEATURE', 'RELEASE'],
|
|
173
|
+
requiredSkills: ['security-audit'],
|
|
174
|
+
supportedProviders: ['native', 'claude-code', 'codex', 'antigravity', 'google-adk'],
|
|
175
|
+
modelPreferences: { preferredTier: 'reasoning' },
|
|
176
|
+
toolPermissions: [
|
|
177
|
+
{ name: 'get_project_overview', allowed: true },
|
|
178
|
+
{ name: 'get_file_context', allowed: true },
|
|
179
|
+
{ name: 'execute_check', allowed: true },
|
|
180
|
+
],
|
|
181
|
+
filePermissions: {
|
|
182
|
+
readPatterns: ['**/*'],
|
|
183
|
+
writePatterns: ['docs/security*'],
|
|
184
|
+
deniedPatterns: ['.env*', '**/*.key', '**/*.pem'],
|
|
185
|
+
},
|
|
186
|
+
riskClassification: 'LOW',
|
|
187
|
+
maxExecutionTimeSeconds: 180,
|
|
188
|
+
maxTokenBudget: 60_000,
|
|
189
|
+
maxRetryCount: 2,
|
|
190
|
+
isBuiltin: true,
|
|
191
|
+
version: '1.0.0',
|
|
192
|
+
},
|
|
193
|
+
'performance-engineer': {
|
|
194
|
+
id: 'performance-engineer',
|
|
195
|
+
name: 'Performance Engineer',
|
|
196
|
+
description: 'Profiles latency, identifies algorithmic bottlenecks, and optimizes resource throughput.',
|
|
197
|
+
role: 'PERFORMANCE_ENGINEER',
|
|
198
|
+
capabilities: ['profiling', 'query-optimization', 'concurrency-tuning', 'memory-leak-detection'],
|
|
199
|
+
supportedTaskTypes: ['PERFORMANCE', 'FEATURE', 'REFACTOR'],
|
|
200
|
+
requiredSkills: ['performance-optimization', 'database-optimization'],
|
|
201
|
+
supportedProviders: ['native', 'claude-code', 'codex', 'antigravity', 'google-adk'],
|
|
202
|
+
modelPreferences: { preferredTier: 'reasoning' },
|
|
203
|
+
toolPermissions: [
|
|
204
|
+
{ name: 'get_project_overview', allowed: true },
|
|
205
|
+
{ name: 'get_file_context', allowed: true },
|
|
206
|
+
{ name: 'execute_check', allowed: true },
|
|
207
|
+
],
|
|
208
|
+
filePermissions: {
|
|
209
|
+
readPatterns: ['**/*'],
|
|
210
|
+
writePatterns: ['src/**', 'benchmarks/**'],
|
|
211
|
+
deniedPatterns: ['.env*', '**/*.key', '**/*.pem'],
|
|
212
|
+
},
|
|
213
|
+
riskClassification: 'MEDIUM',
|
|
214
|
+
maxExecutionTimeSeconds: 240,
|
|
215
|
+
maxTokenBudget: 70_000,
|
|
216
|
+
maxRetryCount: 2,
|
|
217
|
+
isBuiltin: true,
|
|
218
|
+
version: '1.0.0',
|
|
219
|
+
},
|
|
220
|
+
'code-reviewer': {
|
|
221
|
+
id: 'code-reviewer',
|
|
222
|
+
name: 'Code Reviewer',
|
|
223
|
+
description: 'Independent verification agent conducting invariant compliance, readability, and regression reviews.',
|
|
224
|
+
role: 'CODE_REVIEWER',
|
|
225
|
+
capabilities: ['diff-review', 'clean-code-audit', 'convention-enforcement', 'smell-detection'],
|
|
226
|
+
supportedTaskTypes: ['FEATURE', 'BUG', 'REFACTOR', 'SECURITY'],
|
|
227
|
+
requiredSkills: ['code-review'],
|
|
228
|
+
supportedProviders: ['native', 'claude-code', 'codex', 'antigravity', 'google-adk'],
|
|
229
|
+
modelPreferences: { preferredTier: 'reasoning' },
|
|
230
|
+
toolPermissions: [
|
|
231
|
+
{ name: 'get_project_overview', allowed: true },
|
|
232
|
+
{ name: 'get_file_context', allowed: true },
|
|
233
|
+
],
|
|
234
|
+
filePermissions: {
|
|
235
|
+
readPatterns: ['**/*'],
|
|
236
|
+
writePatterns: ['.devworkspace/orchestration/reviews/**'],
|
|
237
|
+
deniedPatterns: ['.env*', '**/*.key', '**/*.pem'],
|
|
238
|
+
},
|
|
239
|
+
riskClassification: 'LOW',
|
|
240
|
+
maxExecutionTimeSeconds: 120,
|
|
241
|
+
maxTokenBudget: 50_000,
|
|
242
|
+
maxRetryCount: 2,
|
|
243
|
+
isBuiltin: true,
|
|
244
|
+
version: '1.0.0',
|
|
245
|
+
},
|
|
246
|
+
documentation: {
|
|
247
|
+
id: 'documentation',
|
|
248
|
+
name: 'Documentation Agent',
|
|
249
|
+
description: 'Maintains API docs, onboarding prompts, architecture summaries, and guides.',
|
|
250
|
+
role: 'DOCUMENTATION',
|
|
251
|
+
capabilities: ['technical-writing', 'api-docs', 'changelog-maintenance', 'onboarding-guides'],
|
|
252
|
+
supportedTaskTypes: ['DOCUMENTATION', 'FEATURE', 'RELEASE'],
|
|
253
|
+
requiredSkills: ['documentation'],
|
|
254
|
+
supportedProviders: ['native', 'claude-code', 'codex', 'antigravity', 'google-adk'],
|
|
255
|
+
modelPreferences: { preferredTier: 'fast' },
|
|
256
|
+
toolPermissions: [
|
|
257
|
+
{ name: 'get_project_overview', allowed: true },
|
|
258
|
+
{ name: 'get_file_context', allowed: true },
|
|
259
|
+
],
|
|
260
|
+
filePermissions: {
|
|
261
|
+
readPatterns: ['**/*'],
|
|
262
|
+
writePatterns: ['docs/**', 'README.md', 'CHANGELOG.md'],
|
|
263
|
+
deniedPatterns: ['.env*', '**/*.key', '**/*.pem'],
|
|
264
|
+
},
|
|
265
|
+
riskClassification: 'LOW',
|
|
266
|
+
maxExecutionTimeSeconds: 120,
|
|
267
|
+
maxTokenBudget: 40_000,
|
|
268
|
+
maxRetryCount: 2,
|
|
269
|
+
isBuiltin: true,
|
|
270
|
+
version: '1.0.0',
|
|
271
|
+
},
|
|
272
|
+
'database-specialist': {
|
|
273
|
+
id: 'database-specialist',
|
|
274
|
+
name: 'Database Specialist',
|
|
275
|
+
description: 'Designs relational/document schemas, crafts migrations, and guarantees migration reversibility.',
|
|
276
|
+
role: 'DATABASE_SPECIALIST',
|
|
277
|
+
capabilities: ['schema-design', 'migration-authoring', 'sql-optimization', 'orm-modeling'],
|
|
278
|
+
supportedTaskTypes: ['FEATURE', 'PERFORMANCE', 'MAINTENANCE'],
|
|
279
|
+
requiredSkills: ['database-design', 'database-optimization'],
|
|
280
|
+
supportedProviders: ['native', 'claude-code', 'codex', 'antigravity', 'google-adk'],
|
|
281
|
+
modelPreferences: { preferredTier: 'reasoning' },
|
|
282
|
+
toolPermissions: [
|
|
283
|
+
{ name: 'get_project_overview', allowed: true },
|
|
284
|
+
{ name: 'get_file_context', allowed: true },
|
|
285
|
+
{ name: 'execute_check', allowed: true },
|
|
286
|
+
],
|
|
287
|
+
filePermissions: {
|
|
288
|
+
readPatterns: ['**/*'],
|
|
289
|
+
writePatterns: ['src/db/**', 'migrations/**', 'prisma/**', 'drizzle/**'],
|
|
290
|
+
deniedPatterns: ['.env*', '**/*.key', '**/*.pem'],
|
|
291
|
+
},
|
|
292
|
+
riskClassification: 'HIGH',
|
|
293
|
+
maxExecutionTimeSeconds: 240,
|
|
294
|
+
maxTokenBudget: 75_000,
|
|
295
|
+
maxRetryCount: 2,
|
|
296
|
+
isBuiltin: true,
|
|
297
|
+
version: '1.0.0',
|
|
298
|
+
},
|
|
299
|
+
'release-manager': {
|
|
300
|
+
id: 'release-manager',
|
|
301
|
+
name: 'Release Manager',
|
|
302
|
+
description: 'Enforces release gates, semver bumping, smoke validation, and artifact packaging.',
|
|
303
|
+
role: 'RELEASE_MANAGER',
|
|
304
|
+
capabilities: ['release-gating', 'semver-validation', 'smoke-testing', 'artifact-packaging'],
|
|
305
|
+
supportedTaskTypes: ['RELEASE', 'MAINTENANCE'],
|
|
306
|
+
requiredSkills: ['ci-cd', 'dependency-management'],
|
|
307
|
+
supportedProviders: ['native', 'claude-code', 'codex', 'antigravity', 'google-adk'],
|
|
308
|
+
modelPreferences: { preferredTier: 'reasoning' },
|
|
309
|
+
toolPermissions: [
|
|
310
|
+
{ name: 'get_project_overview', allowed: true },
|
|
311
|
+
{ name: 'execute_check', allowed: true },
|
|
312
|
+
],
|
|
313
|
+
filePermissions: {
|
|
314
|
+
readPatterns: ['**/*'],
|
|
315
|
+
writePatterns: ['package.json', 'CHANGELOG.md'],
|
|
316
|
+
deniedPatterns: ['.env*', '**/*.key', '**/*.pem'],
|
|
317
|
+
},
|
|
318
|
+
riskClassification: 'HIGH',
|
|
319
|
+
maxExecutionTimeSeconds: 300,
|
|
320
|
+
maxTokenBudget: 60_000,
|
|
321
|
+
maxRetryCount: 2,
|
|
322
|
+
isBuiltin: true,
|
|
323
|
+
version: '1.0.0',
|
|
324
|
+
},
|
|
325
|
+
};
|
|
326
|
+
//# sourceMappingURL=profiles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../../src/intelligence/agents/profiles.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,sBAAsB,GAAiC;IAClE,OAAO,EAAE;QACP,EAAE,EAAE,SAAS;QACb,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,8FAA8F;QAC3G,IAAI,EAAE,SAAS;QACf,YAAY,EAAE,CAAC,uBAAuB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,qBAAqB,CAAC;QAC1G,kBAAkB,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,CAAC;QAC1E,cAAc,EAAE,CAAC,uBAAuB,CAAC;QACzC,kBAAkB,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,CAAC;QACnF,gBAAgB,EAAE,EAAE,aAAa,EA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f,YAAY,EAAE,CAAC,MAAM,CAAC;YACtB,aAAa,EAAE,CAAC,cAAc,EAAE,cAAc,CAAC;YAC/C,cAAc,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC;SAClD;QACD,kBAAkB,EAAE,MAAM;QAC1B,uBAAuB,EAAE,GAAG;QAC5B,cAAc,EAAE,MAAM;QACtB,aAAa,EAAE,CAAC;QAChB,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,OAAO;KACjB;CACF,CAAC","sourcesContent":["import type { AgentProfile } from './types.js';\n\nexport const BUILTIN_AGENT_PROFILES: Record<string, AgentProfile> = {\n planner: {\n id: 'planner',\n name: 'Planner Agent',\n description: 'Decomposes complex requests into structured, verified dependency graphs and milestone plans.',\n role: 'PLANNER',\n capabilities: ['requirements-analysis', 'task-decomposition', 'milestone-planning', 'dependency-graphing'],\n supportedTaskTypes: ['FEATURE', 'REFACTOR', 'MAINTENANCE', 'ARCHITECTURE'],\n requiredSkills: ['architecture-analysis'],\n supportedProviders: ['native', 'claude-code', 'codex', 'antigravity', 'google-adk'],\n modelPreferences: { preferredTier: 'reasoning' },\n toolPermissions: [\n { name: 'get_project_overview', allowed: true },\n { name: 'get_task_context', allowed: true },\n { name: 'trace_symbol_dependencies', allowed: true },\n ],\n filePermissions: {\n readPatterns: ['**/*'],\n writePatterns: ['.devworkspace/orchestration/plans/**'],\n deniedPatterns: ['.env*', '**/*.key', '**/*.pem'],\n },\n riskClassification: 'LOW',\n maxExecutionTimeSeconds: 120,\n maxTokenBudget: 50_000,\n maxRetryCount: 2,\n isBuiltin: true,\n version: '1.0.0',\n },\n\n architect: {\n id: 'architect',\n name: 'Architect Agent',\n description: 'Evaluates architectural integrity, designs module boundaries, and formulates Architecture Decision Records (ADRs).',\n role: 'ARCHITECT',\n capabilities: ['system-design', 'adr-authoring', 'boundary-enforcement', 'technology-selection'],\n supportedTaskTypes: ['ARCHITECTURE', 'FEATURE', 'REFACTOR'],\n requiredSkills: ['architecture-analysis', 'database-design'],\n supportedProviders: ['native', 'claude-code', 'codex', 'antigravity', 'google-adk'],\n modelPreferences: { preferredTier: 'reasoning' },\n toolPermissions: [\n { name: 'get_project_overview', allowed: true },\n { name: 'get_file_context', allowed: true },\n { name: 'trace_symbol_dependencies', allowed: true },\n ],\n filePermissions: {\n readPatterns: ['**/*'],\n writePatterns: ['.devworkspace/decisions/**', 'docs/architecture*'],\n deniedPatterns: ['.env*', '**/*.key', '**/*.pem'],\n },\n riskClassification: 'LOW',\n maxExecutionTimeSeconds: 180,\n maxTokenBudget: 60_000,\n maxRetryCount: 2,\n isBuiltin: true,\n version: '1.0.0',\n },\n\n research: {\n id: 'research',\n name: 'Research Agent',\n description: 'Explores repositories, traces AST call hierarchies, and verifies existing facts without modifying files.',\n role: 'RESEARCH',\n capabilities: ['symbol-tracing', 'code-exploration', 'fact-discovery', 'reference-mapping'],\n supportedTaskTypes: ['QUESTION', 'BUG', 'FEATURE', 'REFACTOR', 'MAINTENANCE'],\n requiredSkills: ['architecture-analysis', 'debugging'],\n supportedProviders: ['native', 'claude-code', 'codex', 'antigravity', 'google-adk'],\n modelPreferences: { preferredTier: 'fast' },\n toolPermissions: [\n { name: 'get_project_overview', allowed: true },\n { name: 'get_file_context', allowed: true },\n { name: 'get_task_context', allowed: true },\n { name: 'trace_symbol_dependencies', allowed: true },\n ],\n filePermissions: {\n readPatterns: ['**/*'],\n writePatterns: [],\n deniedPatterns: ['.env*', '**/*.key', '**/*.pem'],\n },\n riskClassification: 'LOW',\n maxExecutionTimeSeconds: 120,\n maxTokenBudget: 40_000,\n maxRetryCount: 2,\n isBuiltin: true,\n version: '1.0.0',\n },\n\n developer: {\n id: 'developer',\n name: 'Developer Agent',\n description: 'Authoritative single-writer code implementation specialist for features, enhancements, and refactoring.',\n role: 'DEVELOPER',\n capabilities: ['code-implementation', 'refactoring', 'api-implementation', 'library-integration'],\n supportedTaskTypes: ['FEATURE', 'BUG', 'REFACTOR', 'MAINTENANCE'],\n requiredSkills: ['api-development', 'refactoring', 'test-driven-development'],\n supportedProviders: ['native', 'claude-code', 'codex', 'antigravity', 'google-adk'],\n modelPreferences: { preferredTier: 'coding' },\n toolPermissions: [\n { name: 'get_project_overview', allowed: true },\n { name: 'get_file_context', allowed: true },\n { name: 'get_task_context', allowed: true },\n { name: 'execute_check', allowed: true },\n ],\n filePermissions: {\n readPatterns: ['**/*'],\n writePatterns: ['src/**', 'lib/**', 'tests/**', 'package.json'],\n deniedPatterns: ['.env*', '**/*.key', '**/*.pem', '.git/**'],\n },\n riskClassification: 'MEDIUM',\n maxExecutionTimeSeconds: 300,\n maxTokenBudget: 100_000,\n maxRetryCount: 3,\n isBuiltin: true,\n version: '1.0.0',\n },\n\n debugger: {\n id: 'debugger',\n name: 'Debugger Agent',\n description: 'Reproduces faults, writes failing regression tests, and identifies root causes.',\n role: 'DEBUGGER',\n capabilities: ['fault-reproduction', 'root-cause-analysis', 'regression-testing', 'stack-trace-analysis'],\n supportedTaskTypes: ['BUG', 'TESTING'],\n requiredSkills: ['debugging', 'test-driven-development'],\n supportedProviders: ['native', 'claude-code', 'codex', 'antigravity', 'google-adk'],\n modelPreferences: { preferredTier: 'reasoning' },\n toolPermissions: [\n { name: 'get_project_overview', allowed: true },\n { name: 'get_file_context', allowed: true },\n { name: 'execute_check', allowed: true },\n ],\n filePermissions: {\n readPatterns: ['**/*'],\n writePatterns: ['tests/**', 'src/**'],\n deniedPatterns: ['.env*', '**/*.key', '**/*.pem'],\n },\n riskClassification: 'MEDIUM',\n maxExecutionTimeSeconds: 240,\n maxTokenBudget: 80_000,\n maxRetryCount: 3,\n isBuiltin: true,\n version: '1.0.0',\n },\n\n testing: {\n id: 'testing',\n name: 'Testing Agent',\n description: 'Authors and executes unit, integration, and end-to-end tests to guarantee contract adherence.',\n role: 'TESTING',\n capabilities: ['unit-testing', 'integration-testing', 'e2e-testing', 'mocking', 'coverage-analysis'],\n supportedTaskTypes: ['TESTING', 'FEATURE', 'BUG', 'REFACTOR'],\n requiredSkills: ['test-driven-development'],\n supportedProviders: ['native', 'claude-code', 'codex', 'antigravity', 'google-adk'],\n modelPreferences: { preferredTier: 'coding' },\n toolPermissions: [\n { name: 'get_project_overview', allowed: true },\n { name: 'get_file_context', allowed: true },\n { name: 'execute_check', allowed: true },\n ],\n filePermissions: {\n readPatterns: ['**/*'],\n writePatterns: ['tests/**', 'test/**', '__tests__/**'],\n deniedPatterns: ['.env*', '**/*.key', '**/*.pem'],\n },\n riskClassification: 'LOW',\n maxExecutionTimeSeconds: 240,\n maxTokenBudget: 60_000,\n maxRetryCount: 2,\n isBuiltin: true,\n version: '1.0.0',\n },\n\n 'security-auditor': {\n id: 'security-auditor',\n name: 'Security Auditor',\n description: 'Performs static application security testing, credential detection, and permission boundary validation.',\n role: 'SECURITY_AUDITOR',\n capabilities: ['vulnerability-scanning', 'secret-detection', 'owasp-audit', 'permission-enforcement'],\n supportedTaskTypes: ['SECURITY', 'FEATURE', 'RELEASE'],\n requiredSkills: ['security-audit'],\n supportedProviders: ['native', 'claude-code', 'codex', 'antigravity', 'google-adk'],\n modelPreferences: { preferredTier: 'reasoning' },\n toolPermissions: [\n { name: 'get_project_overview', allowed: true },\n { name: 'get_file_context', allowed: true },\n { name: 'execute_check', allowed: true },\n ],\n filePermissions: {\n readPatterns: ['**/*'],\n writePatterns: ['docs/security*'],\n deniedPatterns: ['.env*', '**/*.key', '**/*.pem'],\n },\n riskClassification: 'LOW',\n maxExecutionTimeSeconds: 180,\n maxTokenBudget: 60_000,\n maxRetryCount: 2,\n isBuiltin: true,\n version: '1.0.0',\n },\n\n 'performance-engineer': {\n id: 'performance-engineer',\n name: 'Performance Engineer',\n description: 'Profiles latency, identifies algorithmic bottlenecks, and optimizes resource throughput.',\n role: 'PERFORMANCE_ENGINEER',\n capabilities: ['profiling', 'query-optimization', 'concurrency-tuning', 'memory-leak-detection'],\n supportedTaskTypes: ['PERFORMANCE', 'FEATURE', 'REFACTOR'],\n requiredSkills: ['performance-optimization', 'database-optimization'],\n supportedProviders: ['native', 'claude-code', 'codex', 'antigravity', 'google-adk'],\n modelPreferences: { preferredTier: 'reasoning' },\n toolPermissions: [\n { name: 'get_project_overview', allowed: true },\n { name: 'get_file_context', allowed: true },\n { name: 'execute_check', allowed: true },\n ],\n filePermissions: {\n readPatterns: ['**/*'],\n writePatterns: ['src/**', 'benchmarks/**'],\n deniedPatterns: ['.env*', '**/*.key', '**/*.pem'],\n },\n riskClassification: 'MEDIUM',\n maxExecutionTimeSeconds: 240,\n maxTokenBudget: 70_000,\n maxRetryCount: 2,\n isBuiltin: true,\n version: '1.0.0',\n },\n\n 'code-reviewer': {\n id: 'code-reviewer',\n name: 'Code Reviewer',\n description: 'Independent verification agent conducting invariant compliance, readability, and regression reviews.',\n role: 'CODE_REVIEWER',\n capabilities: ['diff-review', 'clean-code-audit', 'convention-enforcement', 'smell-detection'],\n supportedTaskTypes: ['FEATURE', 'BUG', 'REFACTOR', 'SECURITY'],\n requiredSkills: ['code-review'],\n supportedProviders: ['native', 'claude-code', 'codex', 'antigravity', 'google-adk'],\n modelPreferences: { preferredTier: 'reasoning' },\n toolPermissions: [\n { name: 'get_project_overview', allowed: true },\n { name: 'get_file_context', allowed: true },\n ],\n filePermissions: {\n readPatterns: ['**/*'],\n writePatterns: ['.devworkspace/orchestration/reviews/**'],\n deniedPatterns: ['.env*', '**/*.key', '**/*.pem'],\n },\n riskClassification: 'LOW',\n maxExecutionTimeSeconds: 120,\n maxTokenBudget: 50_000,\n maxRetryCount: 2,\n isBuiltin: true,\n version: '1.0.0',\n },\n\n documentation: {\n id: 'documentation',\n name: 'Documentation Agent',\n description: 'Maintains API docs, onboarding prompts, architecture summaries, and guides.',\n role: 'DOCUMENTATION',\n capabilities: ['technical-writing', 'api-docs', 'changelog-maintenance', 'onboarding-guides'],\n supportedTaskTypes: ['DOCUMENTATION', 'FEATURE', 'RELEASE'],\n requiredSkills: ['documentation'],\n supportedProviders: ['native', 'claude-code', 'codex', 'antigravity', 'google-adk'],\n modelPreferences: { preferredTier: 'fast' },\n toolPermissions: [\n { name: 'get_project_overview', allowed: true },\n { name: 'get_file_context', allowed: true },\n ],\n filePermissions: {\n readPatterns: ['**/*'],\n writePatterns: ['docs/**', 'README.md', 'CHANGELOG.md'],\n deniedPatterns: ['.env*', '**/*.key', '**/*.pem'],\n },\n riskClassification: 'LOW',\n maxExecutionTimeSeconds: 120,\n maxTokenBudget: 40_000,\n maxRetryCount: 2,\n isBuiltin: true,\n version: '1.0.0',\n },\n\n 'database-specialist': {\n id: 'database-specialist',\n name: 'Database Specialist',\n description: 'Designs relational/document schemas, crafts migrations, and guarantees migration reversibility.',\n role: 'DATABASE_SPECIALIST',\n capabilities: ['schema-design', 'migration-authoring', 'sql-optimization', 'orm-modeling'],\n supportedTaskTypes: ['FEATURE', 'PERFORMANCE', 'MAINTENANCE'],\n requiredSkills: ['database-design', 'database-optimization'],\n supportedProviders: ['native', 'claude-code', 'codex', 'antigravity', 'google-adk'],\n modelPreferences: { preferredTier: 'reasoning' },\n toolPermissions: [\n { name: 'get_project_overview', allowed: true },\n { name: 'get_file_context', allowed: true },\n { name: 'execute_check', allowed: true },\n ],\n filePermissions: {\n readPatterns: ['**/*'],\n writePatterns: ['src/db/**', 'migrations/**', 'prisma/**', 'drizzle/**'],\n deniedPatterns: ['.env*', '**/*.key', '**/*.pem'],\n },\n riskClassification: 'HIGH',\n maxExecutionTimeSeconds: 240,\n maxTokenBudget: 75_000,\n maxRetryCount: 2,\n isBuiltin: true,\n version: '1.0.0',\n },\n\n 'release-manager': {\n id: 'release-manager',\n name: 'Release Manager',\n description: 'Enforces release gates, semver bumping, smoke validation, and artifact packaging.',\n role: 'RELEASE_MANAGER',\n capabilities: ['release-gating', 'semver-validation', 'smoke-testing', 'artifact-packaging'],\n supportedTaskTypes: ['RELEASE', 'MAINTENANCE'],\n requiredSkills: ['ci-cd', 'dependency-management'],\n supportedProviders: ['native', 'claude-code', 'codex', 'antigravity', 'google-adk'],\n modelPreferences: { preferredTier: 'reasoning' },\n toolPermissions: [\n { name: 'get_project_overview', allowed: true },\n { name: 'execute_check', allowed: true },\n ],\n filePermissions: {\n readPatterns: ['**/*'],\n writePatterns: ['package.json', 'CHANGELOG.md'],\n deniedPatterns: ['.env*', '**/*.key', '**/*.pem'],\n },\n riskClassification: 'HIGH',\n maxExecutionTimeSeconds: 300,\n maxTokenBudget: 60_000,\n maxRetryCount: 2,\n isBuiltin: true,\n version: '1.0.0',\n },\n};\n"]}
|