@agents-inc/cli 0.82.2 → 0.82.4
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 +18 -0
- package/dist/{chunk-R5LEXRV3.js → chunk-35ESNSF5.js} +2 -2
- package/dist/{chunk-3BM5F4IX.js → chunk-3PB7KSF7.js} +3 -3
- package/dist/{chunk-6EMIA36T.js → chunk-5AHKXBNC.js} +2 -2
- package/dist/{chunk-VO6JKRLT.js → chunk-63E7LOLB.js} +2 -2
- package/dist/{chunk-SXGCCUTH.js → chunk-AAW3PYXA.js} +10 -2
- package/dist/chunk-AAW3PYXA.js.map +1 -0
- package/dist/{chunk-57HHZMWR.js → chunk-FBLRTXEA.js} +3 -3
- package/dist/{chunk-YXOZJWP3.js → chunk-FIXWR56O.js} +2 -2
- package/dist/{chunk-ZKQ4XQNO.js → chunk-JQDOUNHF.js} +20 -12
- package/dist/chunk-JQDOUNHF.js.map +1 -0
- package/dist/{chunk-HRMPQ4DV.js → chunk-K76AXQ7A.js} +2 -2
- package/dist/{chunk-L4JYOUGS.js → chunk-KB6LCTCD.js} +14 -6
- package/dist/chunk-KB6LCTCD.js.map +1 -0
- package/dist/{chunk-ZAYTTG3M.js → chunk-KEW246HB.js} +2 -2
- package/dist/{chunk-RX6HPZ7A.js → chunk-KZLGBHDZ.js} +2 -2
- package/dist/{chunk-4DXSCGVI.js → chunk-LOB3OU2D.js} +4 -4
- package/dist/chunk-LOB3OU2D.js.map +1 -0
- package/dist/{chunk-TY5BOAAA.js → chunk-LQ3EJBUN.js} +5 -2
- package/dist/chunk-LQ3EJBUN.js.map +1 -0
- package/dist/{chunk-GMR4PQX3.js → chunk-M2CS5EOK.js} +3 -3
- package/dist/{chunk-ABBXUIMQ.js → chunk-RTXJLZ7A.js} +2 -2
- package/dist/commands/build/plugins.js +2 -2
- package/dist/commands/build/stack.js +2 -2
- package/dist/commands/compile.js +2 -2
- package/dist/commands/config/index.js +2 -2
- package/dist/commands/config/path.js +1 -1
- package/dist/commands/config/show.js +2 -2
- package/dist/commands/diff.js +1 -1
- package/dist/commands/doctor.js +1 -1
- package/dist/commands/edit.js +62 -14
- package/dist/commands/edit.js.map +1 -1
- package/dist/commands/eject.js +1 -1
- package/dist/commands/import/skill.js +1 -1
- package/dist/commands/info.js +1 -1
- package/dist/commands/init.js +13 -13
- package/dist/commands/list.js +1 -1
- package/dist/commands/new/agent.js +2 -2
- package/dist/commands/new/marketplace.js +2 -2
- package/dist/commands/new/skill.js +2 -2
- package/dist/commands/outdated.js +1 -1
- package/dist/commands/search.js +1 -1
- package/dist/commands/uninstall.js +1 -1
- package/dist/commands/update.js +2 -2
- package/dist/commands/validate.js +1 -1
- package/dist/components/wizard/category-grid.test.js +2 -2
- package/dist/components/wizard/domain-selection.js +3 -3
- package/dist/components/wizard/help-modal.js +8 -1
- package/dist/components/wizard/source-grid.test.js +2 -2
- package/dist/components/wizard/stack-selection.js +3 -3
- package/dist/components/wizard/step-agents.js +3 -3
- package/dist/components/wizard/step-agents.test.js +3 -3
- package/dist/components/wizard/step-build.js +3 -3
- package/dist/components/wizard/step-build.test.js +3 -3
- package/dist/components/wizard/step-confirm.test.js +2 -2
- package/dist/components/wizard/step-settings.js +2 -2
- package/dist/components/wizard/step-settings.test.js +5 -5
- package/dist/components/wizard/step-sources.js +3 -3
- package/dist/components/wizard/step-sources.test.js +3 -3
- package/dist/components/wizard/step-stack.js +4 -4
- package/dist/components/wizard/step-stack.test.js +4 -4
- package/dist/components/wizard/wizard-layout.js +4 -4
- package/dist/components/wizard/wizard.js +12 -12
- package/dist/hooks/init.js +13 -13
- package/dist/{source-loader-C2QCBXOB.js → source-loader-FMDHHYDQ.js} +2 -2
- package/dist/{source-manager-DLEHJUZL.js → source-manager-YMJ4Z5UG.js} +2 -2
- package/dist/stores/wizard-store.js +2 -2
- package/dist/stores/wizard-store.test.js +26 -2
- package/dist/stores/wizard-store.test.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-4DXSCGVI.js.map +0 -1
- package/dist/chunk-L4JYOUGS.js.map +0 -1
- package/dist/chunk-SXGCCUTH.js.map +0 -1
- package/dist/chunk-TY5BOAAA.js.map +0 -1
- package/dist/chunk-ZKQ4XQNO.js.map +0 -1
- /package/dist/{chunk-R5LEXRV3.js.map → chunk-35ESNSF5.js.map} +0 -0
- /package/dist/{chunk-3BM5F4IX.js.map → chunk-3PB7KSF7.js.map} +0 -0
- /package/dist/{chunk-6EMIA36T.js.map → chunk-5AHKXBNC.js.map} +0 -0
- /package/dist/{chunk-VO6JKRLT.js.map → chunk-63E7LOLB.js.map} +0 -0
- /package/dist/{chunk-57HHZMWR.js.map → chunk-FBLRTXEA.js.map} +0 -0
- /package/dist/{chunk-YXOZJWP3.js.map → chunk-FIXWR56O.js.map} +0 -0
- /package/dist/{chunk-HRMPQ4DV.js.map → chunk-K76AXQ7A.js.map} +0 -0
- /package/dist/{chunk-ZAYTTG3M.js.map → chunk-KEW246HB.js.map} +0 -0
- /package/dist/{chunk-RX6HPZ7A.js.map → chunk-KZLGBHDZ.js.map} +0 -0
- /package/dist/{chunk-GMR4PQX3.js.map → chunk-M2CS5EOK.js.map} +0 -0
- /package/dist/{chunk-ABBXUIMQ.js.map → chunk-RTXJLZ7A.js.map} +0 -0
- /package/dist/{source-loader-C2QCBXOB.js.map → source-loader-FMDHHYDQ.js.map} +0 -0
- /package/dist/{source-manager-DLEHJUZL.js.map → source-manager-YMJ4Z5UG.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli/commands/edit.tsx"],"sourcesContent":["import os from \"os\";\nimport path from \"path\";\n\nimport { Flags } from \"@oclif/core\";\nimport { render } from \"ink\";\n\nimport { BaseCommand } from \"../base-command.js\";\nimport { Wizard, type WizardResultV2 } from \"../components/wizard/wizard.js\";\nimport {\n CLAUDE_DIR,\n CLAUDE_SRC_DIR,\n CLI_BIN_NAME,\n GLOBAL_INSTALL_ROOT,\n PROJECT_ROOT,\n SOURCE_DISPLAY_NAMES,\n STANDARD_FILES,\n} from \"../consts.js\";\nimport { getAgentDefinitions, recompileAgents } from \"../lib/agents/index.js\";\nimport { loadProjectConfig } from \"../lib/configuration/index.js\";\nimport { ensureBlankGlobalConfig } from \"../lib/configuration/config-writer.js\";\nimport { EXIT_CODES } from \"../lib/exit-codes.js\";\nimport {\n detectInstallation,\n buildAndMergeConfig,\n writeScopedConfigs,\n detectMigrations,\n executeMigration,\n deriveInstallMode,\n} from \"../lib/installation/index.js\";\nimport { loadAllAgents, loadSkillsMatrixFromSource } from \"../lib/loading/index.js\";\nimport { matrix, getSkillById } from \"../lib/matrix/matrix-provider\";\nimport { discoverAllPluginSkills } from \"../lib/plugins/index.js\";\nimport { deleteLocalSkill, migrateLocalSkillScope } from \"../lib/skills/index.js\";\nimport type { AgentDefinition, AgentName, SkillId } from \"../types/index.js\";\nimport { getErrorMessage } from \"../utils/errors.js\";\nimport { remove } from \"../utils/fs.js\";\nimport {\n claudePluginInstall,\n claudePluginUninstall,\n claudePluginMarketplaceExists,\n claudePluginMarketplaceAdd,\n} from \"../utils/exec.js\";\nimport {\n enableBuffering,\n drainBuffer,\n disableBuffering,\n pushBufferMessage,\n type StartupMessage,\n} from \"../utils/logger.js\";\nimport { ERROR_MESSAGES, INFO_MESSAGES, STATUS_MESSAGES } from \"../utils/messages.js\";\n\nfunction formatSourceDisplayName(sourceName: string): string {\n return SOURCE_DISPLAY_NAMES[sourceName] ?? sourceName;\n}\n\nexport default class Edit extends BaseCommand {\n static summary = \"Edit skills in the plugin\";\n static description = \"Modify the currently installed skills via interactive wizard\";\n\n static examples = [\n {\n description: \"Open the edit wizard\",\n command: \"<%= config.bin %> <%= command.id %>\",\n },\n {\n description: \"Edit with a custom source\",\n command: \"<%= config.bin %> <%= command.id %> --source github:org/marketplace\",\n },\n {\n description: \"Force refresh skills from remote\",\n command: \"<%= config.bin %> <%= command.id %> --refresh\",\n },\n ];\n\n static flags = {\n ...BaseCommand.baseFlags,\n refresh: Flags.boolean({\n description: \"Force refresh from remote sources\",\n default: false,\n }),\n \"agent-source\": Flags.string({\n description: \"Remote agent partials source (default: local CLI)\",\n }),\n };\n\n async run(): Promise<void> {\n const { flags } = await this.parse(Edit);\n const cwd = process.cwd();\n\n const installation = await detectInstallation();\n\n if (!installation) {\n this.error(ERROR_MESSAGES.NO_INSTALLATION, {\n exit: EXIT_CODES.ERROR,\n });\n }\n\n // Use installation.projectDir for reads (loading config, discovering installed skills).\n // Use cwd for writes (config saves, plugin installs, scope migrations, recompilation output)\n // and for the locked-items check (determining whether global items are read-only).\n const projectDir = installation.projectDir;\n\n enableBuffering();\n\n let sourceResult;\n let startupMessages: StartupMessage[] = [];\n try {\n sourceResult = await loadSkillsMatrixFromSource({\n sourceFlag: flags.source,\n projectDir,\n forceRefresh: flags.refresh,\n });\n\n const sourceInfo = sourceResult.isLocal ? \"local\" : sourceResult.sourceConfig.sourceOrigin;\n pushBufferMessage(\n \"info\",\n `Loaded ${Object.keys(matrix.skills).length} skills (${sourceInfo})`,\n );\n } catch (error) {\n disableBuffering();\n this.handleError(error);\n }\n\n const projectConfig = await loadProjectConfig(projectDir);\n\n let currentSkillIds: SkillId[];\n try {\n const discoveredSkills = await discoverAllPluginSkills(projectDir);\n // Boundary cast: discoverAllPluginSkills keys are skill IDs from frontmatter\n const pluginSkillIds = Object.keys(discoveredSkills) as SkillId[];\n\n // Merge plugin-discovered skills with config skills (catches local skills and\n // global-scoped plugins that discoverAllPluginSkills doesn't find).\n const configSkillIds = projectConfig?.config?.skills?.map((s) => s.id) ?? [];\n const mergedIds = new Set<SkillId>([...pluginSkillIds, ...configSkillIds]);\n currentSkillIds = [...mergedIds];\n\n pushBufferMessage(\"info\", `Found ${currentSkillIds.length} installed skills`);\n } catch (error) {\n disableBuffering();\n this.handleError(error);\n }\n\n startupMessages = drainBuffer();\n disableBuffering();\n\n let wizardResult: WizardResultV2 | null = null;\n\n // D9: In project context, existing global items are read-only (locked).\n // When editing from ~/ (global context), nothing is locked.\n // Uses cwd (not projectDir) so that global items are correctly locked\n // even when detectInstallation() fell back to the global installation.\n const isGlobalDir = cwd === GLOBAL_INSTALL_ROOT;\n const lockedSkillIds = isGlobalDir\n ? undefined\n : projectConfig?.config?.skills?.filter((s) => s.scope === \"global\").map((s) => s.id);\n const lockedAgentNames = isGlobalDir\n ? undefined\n : projectConfig?.config?.agents?.filter((a) => a.scope === \"global\").map((a) => a.name);\n\n const { waitUntilExit } = render(\n <Wizard\n version={this.config.version}\n initialStep=\"build\"\n initialDomains={projectConfig?.config?.domains}\n initialAgents={projectConfig?.config?.selectedAgents}\n installedSkillIds={currentSkillIds}\n installedSkillConfigs={projectConfig?.config?.skills}\n lockedSkillIds={lockedSkillIds}\n installedAgentConfigs={projectConfig?.config?.agents}\n lockedAgentNames={lockedAgentNames}\n projectDir={projectDir}\n startupMessages={startupMessages}\n onComplete={(result) => {\n wizardResult = result;\n }}\n onCancel={() => {\n this.log(\"\\nEdit cancelled\");\n }}\n />,\n );\n\n await waitUntilExit();\n\n // TypeScript can't track that onComplete callback mutates wizardResult before waitUntilExit resolves\n const result = wizardResult as WizardResultV2 | null;\n\n if (!result || result.cancelled) {\n this.error(\"Cancelled\", { exit: EXIT_CODES.CANCELLED });\n }\n\n if (result.validation.errors.length > 0) {\n for (const err of result.validation.errors) {\n this.warn(err.message);\n }\n }\n\n const newSkillIds = result.skills.map((s) => s.id);\n const addedSkills = newSkillIds.filter((id) => !currentSkillIds.includes(id));\n const removedSkills = currentSkillIds.filter((id) => !newSkillIds.includes(id));\n\n const sourceChanges = new Map<SkillId, { from: string; to: string }>();\n const scopeChanges = new Map<\n SkillId,\n { from: \"project\" | \"global\"; to: \"project\" | \"global\" }\n >();\n if (projectConfig?.config?.skills) {\n for (const newSkill of result.skills) {\n const oldSkill = projectConfig.config.skills.find((s) => s.id === newSkill.id);\n if (oldSkill && oldSkill.source !== newSkill.source) {\n sourceChanges.set(newSkill.id, {\n from: oldSkill.source,\n to: newSkill.source,\n });\n }\n if (oldSkill && oldSkill.scope !== newSkill.scope) {\n scopeChanges.set(newSkill.id, {\n from: oldSkill.scope,\n to: newSkill.scope,\n });\n }\n }\n }\n\n const agentScopeChanges = new Map<\n AgentName,\n { from: \"project\" | \"global\"; to: \"project\" | \"global\" }\n >();\n if (projectConfig?.config?.agents) {\n for (const newAgent of result.agentConfigs) {\n const oldAgent = projectConfig.config.agents.find((a) => a.name === newAgent.name);\n if (oldAgent && oldAgent.scope !== newAgent.scope) {\n agentScopeChanges.set(newAgent.name, {\n from: oldAgent.scope,\n to: newAgent.scope,\n });\n }\n }\n }\n\n const hasSourceChanges = sourceChanges.size > 0;\n const hasScopeChanges = scopeChanges.size > 0;\n const hasAgentScopeChanges = agentScopeChanges.size > 0;\n const hasSkillChanges = addedSkills.length > 0 || removedSkills.length > 0;\n\n if (!hasSkillChanges && !hasSourceChanges && !hasScopeChanges && !hasAgentScopeChanges) {\n this.log(INFO_MESSAGES.NO_CHANGES_MADE);\n this.log(\"Plugin unchanged\\n\");\n return;\n }\n\n this.log(\"\\nChanges:\");\n for (const skillId of addedSkills) {\n this.log(` + ${getSkillById(skillId).displayName}`);\n }\n for (const skillId of removedSkills) {\n const skill = matrix.skills[skillId];\n this.log(` - ${skill?.displayName ?? skillId}`);\n }\n for (const [skillId, change] of sourceChanges) {\n const fromLabel = formatSourceDisplayName(change.from);\n const toLabel = formatSourceDisplayName(change.to);\n this.log(` ~ ${skillId} (${fromLabel} \\u2192 ${toLabel})`);\n }\n for (const [skillId, change] of scopeChanges) {\n const fromLabel = change.from === \"global\" ? \"[G]\" : \"[P]\";\n const toLabel = change.to === \"global\" ? \"[G]\" : \"[P]\";\n this.log(` ~ ${skillId} (${fromLabel} \\u2192 ${toLabel})`);\n }\n for (const [agentName, change] of agentScopeChanges) {\n const fromLabel = change.from === \"global\" ? \"[G]\" : \"[P]\";\n const toLabel = change.to === \"global\" ? \"[G]\" : \"[P]\";\n this.log(` ~ ${agentName} (${fromLabel} \\u2192 ${toLabel})`);\n }\n this.log(\"\");\n\n // Handle per-skill mode migrations (local <-> plugin)\n const oldSkills = projectConfig?.config?.skills ?? [];\n const migrationPlan = detectMigrations(oldSkills, result.skills);\n const hasMigrations = migrationPlan.toLocal.length > 0 || migrationPlan.toPlugin.length > 0;\n\n if (hasMigrations) {\n if (migrationPlan.toLocal.length > 0) {\n this.log(`Switching ${migrationPlan.toLocal.length} skill(s) to local:`);\n for (const migration of migrationPlan.toLocal) {\n this.log(` - ${migration.id}`);\n }\n }\n if (migrationPlan.toPlugin.length > 0) {\n this.log(`Switching ${migrationPlan.toPlugin.length} skill(s) to plugin:`);\n for (const migration of migrationPlan.toPlugin) {\n this.log(` - ${migration.id}`);\n }\n }\n\n const migrationResult = await executeMigration(migrationPlan, cwd, sourceResult);\n\n for (const warning of migrationResult.warnings) {\n this.warn(warning);\n }\n }\n\n const migratedSkillIds = new Set([\n ...migrationPlan.toLocal.map((m) => m.id),\n ...migrationPlan.toPlugin.map((m) => m.id),\n ]);\n\n // Handle scope migrations (P→G or G→P) for local-mode skills\n for (const [skillId, change] of scopeChanges) {\n const skillConfig = result.skills.find((s) => s.id === skillId);\n if (skillConfig?.source === \"local\") {\n await migrateLocalSkillScope(skillId, change.from, cwd);\n } else if (sourceResult.marketplace && skillConfig) {\n // Plugin-mode scope change: uninstall from old scope, install to new scope\n const oldPluginScope = change.from === \"global\" ? \"user\" : \"project\";\n const newPluginScope = change.to === \"global\" ? \"user\" : \"project\";\n try {\n await claudePluginUninstall(skillId, oldPluginScope, cwd);\n const pluginRef = `${skillId}@${sourceResult.marketplace}`;\n await claudePluginInstall(pluginRef, newPluginScope, cwd);\n } catch (error) {\n this.warn(`Failed to migrate plugin scope for ${skillId}: ${getErrorMessage(error)}`);\n }\n }\n }\n\n // Handle remaining non-migration source changes (e.g., marketplace A -> marketplace B)\n for (const [skillId, change] of sourceChanges) {\n // Skip skills already handled by mode migration\n if (migratedSkillIds.has(skillId)) {\n continue;\n }\n if (change.from === \"local\") {\n const oldSkill = projectConfig?.config?.skills?.find((s) => s.id === skillId);\n const deleteDir = oldSkill?.scope === \"global\" ? os.homedir() : cwd;\n await deleteLocalSkill(deleteDir, skillId);\n }\n }\n\n if (sourceResult.marketplace) {\n const marketplaceExists = await claudePluginMarketplaceExists(sourceResult.marketplace);\n if (!marketplaceExists) {\n this.log(`Registering marketplace \"${sourceResult.marketplace}\"...`);\n const marketplaceSource = sourceResult.sourceConfig.source.replace(/^github:/, \"\");\n await claudePluginMarketplaceAdd(marketplaceSource);\n this.log(`Registered marketplace: ${sourceResult.marketplace}`);\n }\n\n for (const skillId of addedSkills) {\n // Find the skill config to get its scope\n const skillConfig = result.skills.find((s) => s.id === skillId);\n if (!skillConfig || skillConfig.source === \"local\") continue;\n\n const pluginRef = `${skillId}@${sourceResult.marketplace}`;\n const pluginScope = skillConfig.scope === \"global\" ? \"user\" : \"project\";\n this.log(`Installing plugin: ${pluginRef}...`);\n try {\n await claudePluginInstall(pluginRef, pluginScope, cwd);\n } catch (error) {\n this.warn(`Failed to install plugin ${pluginRef}: ${getErrorMessage(error)}`);\n }\n }\n for (const skillId of removedSkills) {\n // For removed skills, use old config to determine scope\n const oldSkill = projectConfig?.config?.skills?.find((s) => s.id === skillId);\n const pluginScope = oldSkill?.scope === \"global\" ? \"user\" : \"project\";\n this.log(`Uninstalling plugin: ${skillId}...`);\n try {\n await claudePluginUninstall(skillId, pluginScope, cwd);\n } catch (error) {\n this.warn(`Failed to uninstall plugin ${skillId}: ${getErrorMessage(error)}`);\n }\n }\n }\n\n // Load agent definitions first — needed for both config-types.ts and recompilation\n let sourcePath: string;\n this.log(\n flags[\"agent-source\"]\n ? STATUS_MESSAGES.FETCHING_AGENT_PARTIALS\n : STATUS_MESSAGES.LOADING_AGENT_PARTIALS,\n );\n try {\n const agentDefs = await getAgentDefinitions(flags[\"agent-source\"], {\n forceRefresh: flags.refresh,\n });\n sourcePath = agentDefs.sourcePath;\n this.log(flags[\"agent-source\"] ? \"✓ Agent partials fetched\\n\" : \"✓ Agent partials loaded\\n\");\n } catch (error) {\n this.handleError(error);\n }\n\n // Persist wizard result to config.ts and config-types.ts (split by scope when in project context)\n try {\n const mergeResult = await buildAndMergeConfig(result, sourceResult, cwd, flags.source);\n\n // Load full agent definitions for config-types.ts generation\n const cliAgents = await loadAllAgents(PROJECT_ROOT);\n const sourceAgents = await loadAllAgents(sourcePath);\n const agents: Record<AgentName, AgentDefinition> = { ...cliAgents, ...sourceAgents };\n\n // Ensure global config exists before writing project config (so the\n // `import globalConfig from \"~/.claude-src/config\"` doesn't throw)\n if (cwd !== os.homedir()) {\n await ensureBlankGlobalConfig();\n }\n\n // Recompute configPath from cwd — when detectInstallation() fell back to\n // global, installation.configPath points to ~/.claude-src/config.ts, but\n // writeScopedConfigs uses it as the project config path.\n const configPath = path.join(cwd, CLAUDE_SRC_DIR, STANDARD_FILES.CONFIG_TS);\n\n // Determine whether a project installation already exists:\n // If detectInstallation() found a project config, projectDir differs from homedir.\n // If it fell back to global, projectDir === homedir (no project installation).\n const projectInstallationExists =\n path.resolve(installation.projectDir) !== path.resolve(os.homedir());\n\n await writeScopedConfigs(\n mergeResult.config,\n sourceResult.matrix,\n agents,\n cwd,\n configPath,\n projectInstallationExists,\n );\n } catch (error) {\n this.warn(`Could not update config: ${getErrorMessage(error)}`);\n }\n\n this.log(STATUS_MESSAGES.RECOMPILING_AGENTS);\n try {\n const recompileSkills = await discoverAllPluginSkills(cwd);\n\n // Build scope map so recompileAgents routes agents to the correct directory:\n // global agents -> ~/.claude/agents/, project agents -> <cwd>/.claude/agents/\n const agentScopeMap = new Map(result.agentConfigs.map((a) => [a.name, a.scope] as const));\n const outputDir = path.join(cwd, CLAUDE_DIR, \"agents\");\n\n const recompileResult = await recompileAgents({\n pluginDir: cwd,\n sourcePath,\n skills: recompileSkills,\n projectDir: cwd,\n outputDir,\n installMode: deriveInstallMode(result.skills),\n agentScopeMap,\n });\n\n if (recompileResult.failed.length > 0) {\n this.log(\n `✓ Recompiled ${recompileResult.compiled.length} agents (${recompileResult.failed.length} failed)\\n`,\n );\n for (const warning of recompileResult.warnings) {\n this.warn(warning);\n }\n } else if (recompileResult.compiled.length > 0) {\n this.log(`✓ Recompiled ${recompileResult.compiled.length} agents\\n`);\n } else {\n this.log(\"✓ No agents to recompile\\n\");\n }\n } catch (error) {\n this.warn(`Agent recompilation failed: ${getErrorMessage(error)}`);\n this.log(`You can manually recompile with '${CLI_BIN_NAME} compile'.\\n`);\n }\n\n // Clean up old agent .md files after scope changes.\n // Recompilation wrote the new file to the correct scope directory;\n // now delete the stale copy from the old scope directory.\n for (const [agentName, change] of agentScopeChanges) {\n const oldBaseDir = change.from === \"global\" ? os.homedir() : cwd;\n const oldAgentPath = path.join(oldBaseDir, CLAUDE_DIR, \"agents\", `${agentName}.md`);\n try {\n await remove(oldAgentPath);\n } catch (error) {\n this.warn(`Could not remove old agent file ${oldAgentPath}: ${getErrorMessage(error)}`);\n }\n }\n\n const summaryParts = [`${addedSkills.length} added`, `${removedSkills.length} removed`];\n if (hasSourceChanges) {\n summaryParts.push(`${sourceChanges.size} source${sourceChanges.size > 1 ? \"s\" : \"\"} changed`);\n }\n if (hasScopeChanges || hasAgentScopeChanges) {\n const totalScopeChanges = scopeChanges.size + agentScopeChanges.size;\n summaryParts.push(`${totalScopeChanges} scope${totalScopeChanges > 1 ? \"s\" : \"\"} changed`);\n }\n this.log(`\\n\\u2713 Plugin updated! (${summaryParts.join(\", \")})\\n`);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AAEjB,SAAS,aAAa;AACtB,SAAS,cAAc;AA6JjB;AA9GN,SAAS,wBAAwB,YAA4B;AAC3D,SAAO,qBAAqB,UAAU,KAAK;AAC7C;AAEA,IAAqB,OAArB,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C,EAAE;AAAA,MACxF;AAAA,IACF;AAEA,UAAM,eAAe,CAAC,GAAG,YAAY,MAAM,UAAU,GAAG,cAAc,MAAM,UAAU;AACtF,QAAI,kBAAkB;AACpB,mBAAa,KAAK,GAAG,cAAc,IAAI,UAAU,cAAc,OAAO,IAAI,MAAM,EAAE,UAAU;AAAA,IAC9F;AACA,QAAI,mBAAmB,sBAAsB;AAC3C,YAAM,oBAAoB,aAAa,OAAO,kBAAkB;AAChE,mBAAa,KAAK,GAAG,iBAAiB,SAAS,oBAAoB,IAAI,MAAM,EAAE,UAAU;AAAA,IAC3F;AACA,SAAK,IAAI;AAAA,0BAA6B,aAAa,KAAK,IAAI,CAAC;AAAA,CAAK;AAAA,EACpE;AACF;","names":["result"]}
|
|
1
|
+
{"version":3,"sources":["../../src/cli/commands/edit.tsx"],"sourcesContent":["import os from \"os\";\nimport path from \"path\";\n\nimport { Flags } from \"@oclif/core\";\nimport { render } from \"ink\";\n\nimport { BaseCommand } from \"../base-command.js\";\nimport { Wizard, type WizardResultV2 } from \"../components/wizard/wizard.js\";\nimport {\n CLAUDE_DIR,\n CLAUDE_SRC_DIR,\n CLI_BIN_NAME,\n GLOBAL_INSTALL_ROOT,\n PROJECT_ROOT,\n SOURCE_DISPLAY_NAMES,\n STANDARD_FILES,\n} from \"../consts.js\";\nimport { getAgentDefinitions, recompileAgents } from \"../lib/agents/index.js\";\nimport { loadProjectConfig } from \"../lib/configuration/index.js\";\nimport { ensureBlankGlobalConfig } from \"../lib/configuration/config-writer.js\";\nimport { EXIT_CODES } from \"../lib/exit-codes.js\";\nimport {\n detectInstallation,\n buildAndMergeConfig,\n writeScopedConfigs,\n detectMigrations,\n executeMigration,\n deriveInstallMode,\n resolveInstallPaths,\n} from \"../lib/installation/index.js\";\nimport { loadAllAgents, loadSkillsMatrixFromSource } from \"../lib/loading/index.js\";\nimport { matrix, getSkillById } from \"../lib/matrix/matrix-provider\";\nimport { discoverAllPluginSkills } from \"../lib/plugins/index.js\";\nimport {\n deleteLocalSkill,\n migrateLocalSkillScope,\n copySkillsToLocalFlattened,\n} from \"../lib/skills/index.js\";\nimport type { AgentDefinition, AgentName, SkillId } from \"../types/index.js\";\nimport { getErrorMessage } from \"../utils/errors.js\";\nimport { ensureDir, remove } from \"../utils/fs.js\";\nimport {\n claudePluginInstall,\n claudePluginUninstall,\n claudePluginMarketplaceExists,\n claudePluginMarketplaceAdd,\n} from \"../utils/exec.js\";\nimport {\n enableBuffering,\n drainBuffer,\n disableBuffering,\n pushBufferMessage,\n type StartupMessage,\n} from \"../utils/logger.js\";\nimport { ERROR_MESSAGES, INFO_MESSAGES, STATUS_MESSAGES } from \"../utils/messages.js\";\n\nfunction formatSourceDisplayName(sourceName: string): string {\n return SOURCE_DISPLAY_NAMES[sourceName] ?? sourceName;\n}\n\nexport default class Edit extends BaseCommand {\n static summary = \"Edit skills in the plugin\";\n static description = \"Modify the currently installed skills via interactive wizard\";\n\n static examples = [\n {\n description: \"Open the edit wizard\",\n command: \"<%= config.bin %> <%= command.id %>\",\n },\n {\n description: \"Edit with a custom source\",\n command: \"<%= config.bin %> <%= command.id %> --source github:org/marketplace\",\n },\n {\n description: \"Force refresh skills from remote\",\n command: \"<%= config.bin %> <%= command.id %> --refresh\",\n },\n ];\n\n static flags = {\n ...BaseCommand.baseFlags,\n refresh: Flags.boolean({\n description: \"Force refresh from remote sources\",\n default: false,\n }),\n \"agent-source\": Flags.string({\n description: \"Remote agent partials source (default: local CLI)\",\n }),\n };\n\n async run(): Promise<void> {\n const { flags } = await this.parse(Edit);\n const cwd = process.cwd();\n\n const installation = await detectInstallation();\n\n if (!installation) {\n this.error(ERROR_MESSAGES.NO_INSTALLATION, {\n exit: EXIT_CODES.ERROR,\n });\n }\n\n // Use installation.projectDir for reads (loading config, discovering installed skills).\n // Use cwd for writes (config saves, plugin installs, scope migrations, recompilation output)\n // and for the locked-items check (determining whether global items are read-only).\n const projectDir = installation.projectDir;\n\n enableBuffering();\n\n let sourceResult;\n let startupMessages: StartupMessage[] = [];\n try {\n sourceResult = await loadSkillsMatrixFromSource({\n sourceFlag: flags.source,\n projectDir,\n forceRefresh: flags.refresh,\n });\n\n const sourceInfo = sourceResult.isLocal ? \"local\" : sourceResult.sourceConfig.sourceOrigin;\n pushBufferMessage(\n \"info\",\n `Loaded ${Object.keys(matrix.skills).length} skills (${sourceInfo})`,\n );\n } catch (error) {\n disableBuffering();\n this.handleError(error);\n }\n\n const projectConfig = await loadProjectConfig(projectDir);\n\n let currentSkillIds: SkillId[];\n try {\n const discoveredSkills = await discoverAllPluginSkills(projectDir);\n // Boundary cast: discoverAllPluginSkills keys are skill IDs from frontmatter\n const pluginSkillIds = Object.keys(discoveredSkills) as SkillId[];\n\n // Merge plugin-discovered skills with config skills (catches local skills and\n // global-scoped plugins that discoverAllPluginSkills doesn't find).\n const configSkillIds = projectConfig?.config?.skills?.map((s) => s.id) ?? [];\n const mergedIds = new Set<SkillId>([...pluginSkillIds, ...configSkillIds]);\n currentSkillIds = [...mergedIds];\n\n pushBufferMessage(\"info\", `Found ${currentSkillIds.length} installed skills`);\n } catch (error) {\n disableBuffering();\n this.handleError(error);\n }\n\n startupMessages = drainBuffer();\n disableBuffering();\n\n let wizardResult: WizardResultV2 | null = null;\n\n // D9: In project context, existing global items are read-only (locked).\n // When editing from ~/ (global context), nothing is locked.\n // Uses cwd (not projectDir) so that global items are correctly locked\n // even when detectInstallation() fell back to the global installation.\n const isGlobalDir = cwd === GLOBAL_INSTALL_ROOT;\n const lockedSkillIds = isGlobalDir\n ? undefined\n : projectConfig?.config?.skills?.filter((s) => s.scope === \"global\").map((s) => s.id);\n const lockedAgentNames = isGlobalDir\n ? undefined\n : projectConfig?.config?.agents?.filter((a) => a.scope === \"global\").map((a) => a.name);\n\n const { waitUntilExit } = render(\n <Wizard\n version={this.config.version}\n initialStep=\"build\"\n initialDomains={projectConfig?.config?.domains}\n initialAgents={projectConfig?.config?.selectedAgents}\n installedSkillIds={currentSkillIds}\n installedSkillConfigs={projectConfig?.config?.skills}\n lockedSkillIds={lockedSkillIds}\n installedAgentConfigs={projectConfig?.config?.agents}\n lockedAgentNames={lockedAgentNames}\n isEditingFromGlobalScope={isGlobalDir}\n projectDir={projectDir}\n startupMessages={startupMessages}\n onComplete={(result) => {\n wizardResult = result;\n }}\n onCancel={() => {\n this.log(\"\\nEdit cancelled\");\n }}\n />,\n );\n\n await waitUntilExit();\n\n // TypeScript can't track that onComplete callback mutates wizardResult before waitUntilExit resolves\n const result = wizardResult as WizardResultV2 | null;\n\n if (!result || result.cancelled) {\n this.error(\"Cancelled\", { exit: EXIT_CODES.CANCELLED });\n }\n\n if (result.validation.errors.length > 0) {\n for (const err of result.validation.errors) {\n this.warn(err.message);\n }\n }\n\n const newSkillIds = result.skills.map((s) => s.id);\n const addedSkills = newSkillIds.filter((id) => !currentSkillIds.includes(id));\n const removedSkills = currentSkillIds.filter((id) => !newSkillIds.includes(id));\n\n const oldAgentNames = projectConfig?.config?.agents?.map((a) => a.name) ?? [];\n const newAgentNames = result.agentConfigs.map((a) => a.name);\n const addedAgents = newAgentNames.filter((name) => !oldAgentNames.includes(name));\n const removedAgents = oldAgentNames.filter((name) => !newAgentNames.includes(name));\n\n const sourceChanges = new Map<SkillId, { from: string; to: string }>();\n const scopeChanges = new Map<\n SkillId,\n { from: \"project\" | \"global\"; to: \"project\" | \"global\" }\n >();\n if (projectConfig?.config?.skills) {\n for (const newSkill of result.skills) {\n const oldSkill = projectConfig.config.skills.find((s) => s.id === newSkill.id);\n if (oldSkill && oldSkill.source !== newSkill.source) {\n sourceChanges.set(newSkill.id, {\n from: oldSkill.source,\n to: newSkill.source,\n });\n }\n if (oldSkill && oldSkill.scope !== newSkill.scope) {\n scopeChanges.set(newSkill.id, {\n from: oldSkill.scope,\n to: newSkill.scope,\n });\n }\n }\n }\n\n const agentScopeChanges = new Map<\n AgentName,\n { from: \"project\" | \"global\"; to: \"project\" | \"global\" }\n >();\n if (projectConfig?.config?.agents) {\n for (const newAgent of result.agentConfigs) {\n const oldAgent = projectConfig.config.agents.find((a) => a.name === newAgent.name);\n if (oldAgent && oldAgent.scope !== newAgent.scope) {\n agentScopeChanges.set(newAgent.name, {\n from: oldAgent.scope,\n to: newAgent.scope,\n });\n }\n }\n }\n\n const hasSourceChanges = sourceChanges.size > 0;\n const hasScopeChanges = scopeChanges.size > 0;\n const hasAgentScopeChanges = agentScopeChanges.size > 0;\n const hasSkillChanges = addedSkills.length > 0 || removedSkills.length > 0;\n const hasAgentChanges = addedAgents.length > 0 || removedAgents.length > 0;\n\n if (\n !hasSkillChanges &&\n !hasAgentChanges &&\n !hasSourceChanges &&\n !hasScopeChanges &&\n !hasAgentScopeChanges\n ) {\n this.log(INFO_MESSAGES.NO_CHANGES_MADE);\n this.log(\"Plugin unchanged\\n\");\n return;\n }\n\n this.log(\"\\nChanges:\");\n for (const skillId of addedSkills) {\n this.log(` + ${getSkillById(skillId).displayName}`);\n }\n for (const skillId of removedSkills) {\n const skill = matrix.skills[skillId];\n this.log(` - ${skill?.displayName ?? skillId}`);\n }\n for (const agentName of addedAgents) {\n this.log(` + ${agentName} (agent)`);\n }\n for (const agentName of removedAgents) {\n this.log(` - ${agentName} (agent)`);\n }\n for (const [skillId, change] of sourceChanges) {\n const fromLabel = formatSourceDisplayName(change.from);\n const toLabel = formatSourceDisplayName(change.to);\n this.log(` ~ ${skillId} (${fromLabel} \\u2192 ${toLabel})`);\n }\n for (const [skillId, change] of scopeChanges) {\n const fromLabel = change.from === \"global\" ? \"[G]\" : \"[P]\";\n const toLabel = change.to === \"global\" ? \"[G]\" : \"[P]\";\n this.log(` ~ ${skillId} (${fromLabel} \\u2192 ${toLabel})`);\n }\n for (const [agentName, change] of agentScopeChanges) {\n const fromLabel = change.from === \"global\" ? \"[G]\" : \"[P]\";\n const toLabel = change.to === \"global\" ? \"[G]\" : \"[P]\";\n this.log(` ~ ${agentName} (${fromLabel} \\u2192 ${toLabel})`);\n }\n this.log(\"\");\n\n // Handle per-skill mode migrations (local <-> plugin)\n const oldSkills = projectConfig?.config?.skills ?? [];\n const migrationPlan = detectMigrations(oldSkills, result.skills);\n const hasMigrations = migrationPlan.toLocal.length > 0 || migrationPlan.toPlugin.length > 0;\n\n if (hasMigrations) {\n if (migrationPlan.toLocal.length > 0) {\n this.log(`Switching ${migrationPlan.toLocal.length} skill(s) to local:`);\n for (const migration of migrationPlan.toLocal) {\n this.log(` - ${migration.id}`);\n }\n }\n if (migrationPlan.toPlugin.length > 0) {\n this.log(`Switching ${migrationPlan.toPlugin.length} skill(s) to plugin:`);\n for (const migration of migrationPlan.toPlugin) {\n this.log(` - ${migration.id}`);\n }\n }\n\n const migrationResult = await executeMigration(migrationPlan, cwd, sourceResult);\n\n for (const warning of migrationResult.warnings) {\n this.warn(warning);\n }\n }\n\n const migratedSkillIds = new Set([\n ...migrationPlan.toLocal.map((m) => m.id),\n ...migrationPlan.toPlugin.map((m) => m.id),\n ]);\n\n // Handle scope migrations (P→G or G→P) for local-mode skills\n for (const [skillId, change] of scopeChanges) {\n const skillConfig = result.skills.find((s) => s.id === skillId);\n if (skillConfig?.source === \"local\") {\n await migrateLocalSkillScope(skillId, change.from, cwd);\n } else if (sourceResult.marketplace && skillConfig) {\n // Plugin-mode scope change: uninstall from old scope, install to new scope\n const oldPluginScope = change.from === \"global\" ? \"user\" : \"project\";\n const newPluginScope = change.to === \"global\" ? \"user\" : \"project\";\n try {\n await claudePluginUninstall(skillId, oldPluginScope, cwd);\n const pluginRef = `${skillId}@${sourceResult.marketplace}`;\n await claudePluginInstall(pluginRef, newPluginScope, cwd);\n } catch (error) {\n this.warn(`Failed to migrate plugin scope for ${skillId}: ${getErrorMessage(error)}`);\n }\n }\n }\n\n // Handle remaining non-migration source changes (e.g., marketplace A -> marketplace B)\n for (const [skillId, change] of sourceChanges) {\n // Skip skills already handled by mode migration\n if (migratedSkillIds.has(skillId)) {\n continue;\n }\n if (change.from === \"local\") {\n const oldSkill = projectConfig?.config?.skills?.find((s) => s.id === skillId);\n const deleteDir = oldSkill?.scope === \"global\" ? os.homedir() : cwd;\n await deleteLocalSkill(deleteDir, skillId);\n }\n }\n\n if (sourceResult.marketplace) {\n const marketplaceExists = await claudePluginMarketplaceExists(sourceResult.marketplace);\n if (!marketplaceExists) {\n this.log(`Registering marketplace \"${sourceResult.marketplace}\"...`);\n const marketplaceSource = sourceResult.sourceConfig.source.replace(/^github:/, \"\");\n await claudePluginMarketplaceAdd(marketplaceSource);\n this.log(`Registered marketplace: ${sourceResult.marketplace}`);\n }\n\n for (const skillId of addedSkills) {\n // Find the skill config to get its scope\n const skillConfig = result.skills.find((s) => s.id === skillId);\n if (!skillConfig || skillConfig.source === \"local\") continue;\n\n const pluginRef = `${skillId}@${sourceResult.marketplace}`;\n const pluginScope = skillConfig.scope === \"global\" ? \"user\" : \"project\";\n this.log(`Installing plugin: ${pluginRef}...`);\n try {\n await claudePluginInstall(pluginRef, pluginScope, cwd);\n } catch (error) {\n this.warn(`Failed to install plugin ${pluginRef}: ${getErrorMessage(error)}`);\n }\n }\n for (const skillId of removedSkills) {\n // For removed skills, use old config to determine scope\n const oldSkill = projectConfig?.config?.skills?.find((s) => s.id === skillId);\n const pluginScope = oldSkill?.scope === \"global\" ? \"user\" : \"project\";\n this.log(`Uninstalling plugin: ${skillId}...`);\n try {\n await claudePluginUninstall(skillId, pluginScope, cwd);\n } catch (error) {\n this.warn(`Failed to uninstall plugin ${skillId}: ${getErrorMessage(error)}`);\n }\n }\n }\n\n // Copy newly added local-source skills to .claude/skills/ (split by scope)\n const addedLocalSkills = result.skills.filter(\n (s) => addedSkills.includes(s.id) && s.source === \"local\",\n );\n\n if (addedLocalSkills.length > 0) {\n const projectLocalSkills = addedLocalSkills.filter((s) => s.scope !== \"global\");\n const globalLocalSkills = addedLocalSkills.filter((s) => s.scope === \"global\");\n\n const projectPaths = resolveInstallPaths(cwd, \"project\");\n const globalPaths = resolveInstallPaths(cwd, \"global\");\n\n if (projectLocalSkills.length > 0) {\n await ensureDir(projectPaths.skillsDir);\n await copySkillsToLocalFlattened(\n projectLocalSkills.map((s) => s.id),\n projectPaths.skillsDir,\n sourceResult.matrix,\n sourceResult,\n );\n }\n\n if (globalLocalSkills.length > 0) {\n await ensureDir(globalPaths.skillsDir);\n await copySkillsToLocalFlattened(\n globalLocalSkills.map((s) => s.id),\n globalPaths.skillsDir,\n sourceResult.matrix,\n sourceResult,\n );\n }\n\n this.log(`Copied ${addedLocalSkills.length} local skill(s) to .claude/skills/`);\n }\n\n // Load agent definitions first — needed for both config-types.ts and recompilation\n let sourcePath: string;\n this.log(\n flags[\"agent-source\"]\n ? STATUS_MESSAGES.FETCHING_AGENT_PARTIALS\n : STATUS_MESSAGES.LOADING_AGENT_PARTIALS,\n );\n try {\n const agentDefs = await getAgentDefinitions(flags[\"agent-source\"], {\n forceRefresh: flags.refresh,\n });\n sourcePath = agentDefs.sourcePath;\n this.log(flags[\"agent-source\"] ? \"✓ Agent partials fetched\\n\" : \"✓ Agent partials loaded\\n\");\n } catch (error) {\n this.handleError(error);\n }\n\n // Persist wizard result to config.ts and config-types.ts (split by scope when in project context)\n try {\n const mergeResult = await buildAndMergeConfig(result, sourceResult, cwd, flags.source);\n\n // Load full agent definitions for config-types.ts generation\n const cliAgents = await loadAllAgents(PROJECT_ROOT);\n const sourceAgents = await loadAllAgents(sourcePath);\n const agents: Record<AgentName, AgentDefinition> = { ...cliAgents, ...sourceAgents };\n\n // Ensure global config exists before writing project config (so the\n // `import globalConfig from \"~/.claude-src/config\"` doesn't throw)\n if (cwd !== os.homedir()) {\n await ensureBlankGlobalConfig();\n }\n\n // Recompute configPath from cwd — when detectInstallation() fell back to\n // global, installation.configPath points to ~/.claude-src/config.ts, but\n // writeScopedConfigs uses it as the project config path.\n const configPath = path.join(cwd, CLAUDE_SRC_DIR, STANDARD_FILES.CONFIG_TS);\n\n // Determine whether a project installation already exists:\n // If detectInstallation() found a project config, projectDir differs from homedir.\n // If it fell back to global, projectDir === homedir (no project installation).\n const projectInstallationExists =\n path.resolve(installation.projectDir) !== path.resolve(os.homedir());\n\n await writeScopedConfigs(\n mergeResult.config,\n sourceResult.matrix,\n agents,\n cwd,\n configPath,\n projectInstallationExists,\n );\n } catch (error) {\n this.warn(`Could not update config: ${getErrorMessage(error)}`);\n }\n\n this.log(STATUS_MESSAGES.RECOMPILING_AGENTS);\n try {\n const recompileSkills = await discoverAllPluginSkills(cwd);\n\n // Build scope map so recompileAgents routes agents to the correct directory:\n // global agents -> ~/.claude/agents/, project agents -> <cwd>/.claude/agents/\n const agentScopeMap = new Map(result.agentConfigs.map((a) => [a.name, a.scope] as const));\n const outputDir = path.join(cwd, CLAUDE_DIR, \"agents\");\n\n const recompileResult = await recompileAgents({\n pluginDir: cwd,\n sourcePath,\n skills: recompileSkills,\n projectDir: cwd,\n outputDir,\n installMode: deriveInstallMode(result.skills),\n agentScopeMap,\n });\n\n if (recompileResult.failed.length > 0) {\n this.log(\n `✓ Recompiled ${recompileResult.compiled.length} agents (${recompileResult.failed.length} failed)\\n`,\n );\n for (const warning of recompileResult.warnings) {\n this.warn(warning);\n }\n } else if (recompileResult.compiled.length > 0) {\n this.log(`✓ Recompiled ${recompileResult.compiled.length} agents\\n`);\n } else {\n this.log(\"✓ No agents to recompile\\n\");\n }\n } catch (error) {\n this.warn(`Agent recompilation failed: ${getErrorMessage(error)}`);\n this.log(`You can manually recompile with '${CLI_BIN_NAME} compile'.\\n`);\n }\n\n // Clean up old agent .md files after scope changes.\n // Recompilation wrote the new file to the correct scope directory;\n // now delete the stale copy from the old scope directory.\n for (const [agentName, change] of agentScopeChanges) {\n const oldBaseDir = change.from === \"global\" ? os.homedir() : cwd;\n const oldAgentPath = path.join(oldBaseDir, CLAUDE_DIR, \"agents\", `${agentName}.md`);\n try {\n await remove(oldAgentPath);\n } catch (error) {\n this.warn(`Could not remove old agent file ${oldAgentPath}: ${getErrorMessage(error)}`);\n }\n }\n\n const summaryParts = [`${addedSkills.length} added`, `${removedSkills.length} removed`];\n if (hasAgentChanges) {\n summaryParts.push(\n `${addedAgents.length} agent${addedAgents.length !== 1 ? \"s\" : \"\"} added, ${removedAgents.length} agent${removedAgents.length !== 1 ? \"s\" : \"\"} removed`,\n );\n }\n if (hasSourceChanges) {\n summaryParts.push(`${sourceChanges.size} source${sourceChanges.size > 1 ? \"s\" : \"\"} changed`);\n }\n if (hasScopeChanges || hasAgentScopeChanges) {\n const totalScopeChanges = scopeChanges.size + agentScopeChanges.size;\n summaryParts.push(`${totalScopeChanges} scope${totalScopeChanges > 1 ? \"s\" : \"\"} changed`);\n }\n this.log(`\\n\\u2713 Plugin updated! (${summaryParts.join(\", \")})\\n`);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AAEjB,SAAS,aAAa;AACtB,SAAS,cAAc;AAkKjB;AA9GN,SAAS,wBAAwB,YAA4B;AAC3D,SAAO,qBAAqB,UAAU,KAAK;AAC7C;AAEA,IAAqB,OAArB,MAAqB,cAAa,YAAY;AAAA,EAC5C,OAAO,UAAU;AAAA,EACjB,OAAO,cAAc;AAAA,EAErB,OAAO,WAAW;AAAA,IAChB;AAAA,MACE,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,IACA;AAAA,MACE,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,IACA;AAAA,MACE,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EAEA,OAAO,QAAQ;AAAA,IACb,GAAG,YAAY;AAAA,IACf,SAAS,MAAM,QAAQ;AAAA,MACrB,aAAa;AAAA,MACb,SAAS;AAAA,IACX,CAAC;AAAA,IACD,gBAAgB,MAAM,OAAO;AAAA,MAC3B,aAAa;AAAA,IACf,CAAC;AAAA,EACH;AAAA,EAEA,MAAM,MAAqB;AACzB,UAAM,EAAE,MAAM,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AAO,kBAAkB;AAChE,mBAAa,KAAK,GAAG,iBAAiB,SAAS,oBAAoB,IAAI,MAAM,EAAE,UAAU;AAAA,IAC3F;AACA,SAAK,IAAI;AAAA,0BAA6B,aAAa,KAAK,IAAI,CAAC;AAAA,CAAK;AAAA,EACpE;AACF;","names":["result"]}
|
package/dist/commands/eject.js
CHANGED
package/dist/commands/info.js
CHANGED
package/dist/commands/init.js
CHANGED
|
@@ -4,17 +4,17 @@ import {
|
|
|
4
4
|
formatDashboardText,
|
|
5
5
|
getDashboardData,
|
|
6
6
|
showDashboard
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-FBLRTXEA.js";
|
|
8
|
+
import "../chunk-JQDOUNHF.js";
|
|
9
|
+
import "../chunk-LOB3OU2D.js";
|
|
10
10
|
import "../chunk-YVFGISUO.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-5AHKXBNC.js";
|
|
12
|
+
import "../chunk-3PB7KSF7.js";
|
|
13
13
|
import "../chunk-V36FRPAU.js";
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-63E7LOLB.js";
|
|
15
|
+
import "../chunk-K76AXQ7A.js";
|
|
16
|
+
import "../chunk-35ESNSF5.js";
|
|
17
|
+
import "../chunk-M2CS5EOK.js";
|
|
18
18
|
import "../chunk-FQTYF3OU.js";
|
|
19
19
|
import "../chunk-K77I4XGL.js";
|
|
20
20
|
import "../chunk-C4I4Q33M.js";
|
|
@@ -24,20 +24,20 @@ import "../chunk-7SOPVGDV.js";
|
|
|
24
24
|
import "../chunk-SB2R5KHJ.js";
|
|
25
25
|
import "../chunk-GEU62YD2.js";
|
|
26
26
|
import "../chunk-P2FHS5IS.js";
|
|
27
|
-
import "../chunk-
|
|
27
|
+
import "../chunk-RTXJLZ7A.js";
|
|
28
28
|
import "../chunk-FS4YWW36.js";
|
|
29
29
|
import "../chunk-HSKKGAOW.js";
|
|
30
30
|
import "../chunk-4QA5TIBU.js";
|
|
31
31
|
import "../chunk-WJXWYSBT.js";
|
|
32
|
-
import "../chunk-
|
|
32
|
+
import "../chunk-AAW3PYXA.js";
|
|
33
33
|
import "../chunk-XO6X5QE5.js";
|
|
34
34
|
import "../chunk-KUV24B5M.js";
|
|
35
|
-
import "../chunk-
|
|
35
|
+
import "../chunk-LQ3EJBUN.js";
|
|
36
36
|
import "../chunk-HEQVUIHQ.js";
|
|
37
37
|
import "../chunk-U3IGFMCY.js";
|
|
38
38
|
import "../chunk-HK53FRMU.js";
|
|
39
39
|
import "../chunk-B7KZLXHV.js";
|
|
40
|
-
import "../chunk-
|
|
40
|
+
import "../chunk-KB6LCTCD.js";
|
|
41
41
|
import "../chunk-XTVWVOLD.js";
|
|
42
42
|
import "../chunk-3MXMYHO3.js";
|
|
43
43
|
import "../chunk-X2HE3W74.js";
|
package/dist/commands/list.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
getAgentDefinitions
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-KZLGBHDZ.js";
|
|
5
5
|
import {
|
|
6
6
|
isClaudeCLIAvailable,
|
|
7
7
|
loadConfigTypesDataInBackground,
|
|
8
8
|
regenerateConfigTypes,
|
|
9
9
|
resolveSource
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-KB6LCTCD.js";
|
|
11
11
|
import "../../chunk-XTVWVOLD.js";
|
|
12
12
|
import "../../chunk-3MXMYHO3.js";
|
|
13
13
|
import {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
generateSkillCategoriesTs,
|
|
4
4
|
generateSkillRulesTs
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-KEW246HB.js";
|
|
6
6
|
import {
|
|
7
7
|
generateMarketplace,
|
|
8
8
|
writeMarketplace
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
generateConfigSource,
|
|
14
14
|
loadConfigTypesDataInBackground,
|
|
15
15
|
regenerateConfigTypes
|
|
16
|
-
} from "../../chunk-
|
|
16
|
+
} from "../../chunk-KB6LCTCD.js";
|
|
17
17
|
import "../../chunk-XTVWVOLD.js";
|
|
18
18
|
import "../../chunk-3MXMYHO3.js";
|
|
19
19
|
import {
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
generateSkillRulesTs,
|
|
8
8
|
toTitleCase,
|
|
9
9
|
validateSkillName
|
|
10
|
-
} from "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
10
|
+
} from "../../chunk-KEW246HB.js";
|
|
11
|
+
import "../../chunk-KB6LCTCD.js";
|
|
12
12
|
import "../../chunk-XTVWVOLD.js";
|
|
13
13
|
import "../../chunk-3MXMYHO3.js";
|
|
14
14
|
import "../../chunk-X2HE3W74.js";
|
package/dist/commands/search.js
CHANGED
package/dist/commands/update.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "../chunk-N6S7ZRIL.js";
|
|
5
5
|
import {
|
|
6
6
|
recompileAgents
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-KZLGBHDZ.js";
|
|
8
8
|
import {
|
|
9
9
|
ERROR_MESSAGES,
|
|
10
10
|
INFO_MESSAGES,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
compareLocalSkillsWithSource,
|
|
16
16
|
injectForkedFromMetadata,
|
|
17
17
|
loadSkillsMatrixFromSource
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-KB6LCTCD.js";
|
|
19
19
|
import "../chunk-XTVWVOLD.js";
|
|
20
20
|
import {
|
|
21
21
|
matrix
|
|
@@ -30,9 +30,9 @@ import {
|
|
|
30
30
|
} from "../../chunk-GEU62YD2.js";
|
|
31
31
|
import "../../chunk-P2FHS5IS.js";
|
|
32
32
|
import "../../chunk-WJXWYSBT.js";
|
|
33
|
-
import "../../chunk-
|
|
33
|
+
import "../../chunk-LQ3EJBUN.js";
|
|
34
34
|
import "../../chunk-HK53FRMU.js";
|
|
35
|
-
import "../../chunk-
|
|
35
|
+
import "../../chunk-KB6LCTCD.js";
|
|
36
36
|
import "../../chunk-XTVWVOLD.js";
|
|
37
37
|
import {
|
|
38
38
|
BUILT_IN_MATRIX,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
DomainSelection
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-RTXJLZ7A.js";
|
|
5
5
|
import "../../chunk-FS4YWW36.js";
|
|
6
6
|
import "../../chunk-HSKKGAOW.js";
|
|
7
7
|
import "../../chunk-4QA5TIBU.js";
|
|
8
8
|
import "../../chunk-WJXWYSBT.js";
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-LQ3EJBUN.js";
|
|
10
|
+
import "../../chunk-KB6LCTCD.js";
|
|
11
11
|
import "../../chunk-XTVWVOLD.js";
|
|
12
12
|
import "../../chunk-3MXMYHO3.js";
|
|
13
13
|
import "../../chunk-32HQMUEJ.js";
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
HelpModal
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-AAW3PYXA.js";
|
|
5
|
+
import "../../chunk-LQ3EJBUN.js";
|
|
5
6
|
import "../../chunk-HK53FRMU.js";
|
|
7
|
+
import "../../chunk-KB6LCTCD.js";
|
|
8
|
+
import "../../chunk-XTVWVOLD.js";
|
|
9
|
+
import "../../chunk-3MXMYHO3.js";
|
|
10
|
+
import "../../chunk-32HQMUEJ.js";
|
|
11
|
+
import "../../chunk-WYHFSJ7O.js";
|
|
6
12
|
import "../../chunk-6PGL2XMY.js";
|
|
13
|
+
import "../../chunk-IMP35ETG.js";
|
|
7
14
|
import "../../chunk-DHET7RCE.js";
|
|
8
15
|
export {
|
|
9
16
|
HelpModal
|
|
@@ -39,9 +39,9 @@ import "../../chunk-P2FHS5IS.js";
|
|
|
39
39
|
import "../../chunk-WJXWYSBT.js";
|
|
40
40
|
import "../../chunk-XO6X5QE5.js";
|
|
41
41
|
import "../../chunk-KUV24B5M.js";
|
|
42
|
-
import "../../chunk-
|
|
42
|
+
import "../../chunk-LQ3EJBUN.js";
|
|
43
43
|
import "../../chunk-HK53FRMU.js";
|
|
44
|
-
import "../../chunk-
|
|
44
|
+
import "../../chunk-KB6LCTCD.js";
|
|
45
45
|
import "../../chunk-XTVWVOLD.js";
|
|
46
46
|
import {
|
|
47
47
|
BUILT_IN_MATRIX,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
StackSelection
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-K76AXQ7A.js";
|
|
5
5
|
import "../../chunk-K77I4XGL.js";
|
|
6
6
|
import "../../chunk-4QA5TIBU.js";
|
|
7
7
|
import "../../chunk-WJXWYSBT.js";
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-LQ3EJBUN.js";
|
|
9
|
+
import "../../chunk-KB6LCTCD.js";
|
|
10
10
|
import "../../chunk-XTVWVOLD.js";
|
|
11
11
|
import "../../chunk-3MXMYHO3.js";
|
|
12
12
|
import "../../chunk-32HQMUEJ.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
StepAgents
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-35ESNSF5.js";
|
|
5
5
|
import "../../chunk-K77I4XGL.js";
|
|
6
6
|
import "../../chunk-FS4YWW36.js";
|
|
7
7
|
import "../../chunk-4QA5TIBU.js";
|
|
8
8
|
import "../../chunk-WJXWYSBT.js";
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-LQ3EJBUN.js";
|
|
10
|
+
import "../../chunk-KB6LCTCD.js";
|
|
11
11
|
import "../../chunk-XTVWVOLD.js";
|
|
12
12
|
import "../../chunk-3MXMYHO3.js";
|
|
13
13
|
import "../../chunk-32HQMUEJ.js";
|
|
@@ -25,15 +25,15 @@ import {
|
|
|
25
25
|
} from "../../chunk-XY3XDVMI.js";
|
|
26
26
|
import {
|
|
27
27
|
StepAgents
|
|
28
|
-
} from "../../chunk-
|
|
28
|
+
} from "../../chunk-35ESNSF5.js";
|
|
29
29
|
import "../../chunk-K77I4XGL.js";
|
|
30
30
|
import "../../chunk-FS4YWW36.js";
|
|
31
31
|
import "../../chunk-4QA5TIBU.js";
|
|
32
32
|
import "../../chunk-WJXWYSBT.js";
|
|
33
33
|
import {
|
|
34
34
|
useWizardStore
|
|
35
|
-
} from "../../chunk-
|
|
36
|
-
import "../../chunk-
|
|
35
|
+
} from "../../chunk-LQ3EJBUN.js";
|
|
36
|
+
import "../../chunk-KB6LCTCD.js";
|
|
37
37
|
import "../../chunk-XTVWVOLD.js";
|
|
38
38
|
import {
|
|
39
39
|
initializeMatrix
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
StepBuild
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-M2CS5EOK.js";
|
|
5
5
|
import "../../chunk-FQTYF3OU.js";
|
|
6
6
|
import "../../chunk-K77I4XGL.js";
|
|
7
7
|
import "../../chunk-GEU62YD2.js";
|
|
8
8
|
import "../../chunk-P2FHS5IS.js";
|
|
9
9
|
import "../../chunk-WJXWYSBT.js";
|
|
10
|
-
import "../../chunk-
|
|
10
|
+
import "../../chunk-LQ3EJBUN.js";
|
|
11
11
|
import "../../chunk-HK53FRMU.js";
|
|
12
|
-
import "../../chunk-
|
|
12
|
+
import "../../chunk-KB6LCTCD.js";
|
|
13
13
|
import "../../chunk-XTVWVOLD.js";
|
|
14
14
|
import "../../chunk-3MXMYHO3.js";
|
|
15
15
|
import "../../chunk-32HQMUEJ.js";
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
import {
|
|
34
34
|
StepBuild,
|
|
35
35
|
validateBuildStep
|
|
36
|
-
} from "../../chunk-
|
|
36
|
+
} from "../../chunk-M2CS5EOK.js";
|
|
37
37
|
import "../../chunk-FQTYF3OU.js";
|
|
38
38
|
import "../../chunk-K77I4XGL.js";
|
|
39
39
|
import "../../chunk-GEU62YD2.js";
|
|
@@ -42,9 +42,9 @@ import {
|
|
|
42
42
|
orderDomains
|
|
43
43
|
} from "../../chunk-FS4YWW36.js";
|
|
44
44
|
import "../../chunk-WJXWYSBT.js";
|
|
45
|
-
import "../../chunk-
|
|
45
|
+
import "../../chunk-LQ3EJBUN.js";
|
|
46
46
|
import "../../chunk-HK53FRMU.js";
|
|
47
|
-
import "../../chunk-
|
|
47
|
+
import "../../chunk-KB6LCTCD.js";
|
|
48
48
|
import "../../chunk-XTVWVOLD.js";
|
|
49
49
|
import {
|
|
50
50
|
initializeMatrix
|
|
@@ -22,8 +22,8 @@ import {
|
|
|
22
22
|
StepConfirm
|
|
23
23
|
} from "../../chunk-C4I4Q33M.js";
|
|
24
24
|
import "../../chunk-FS4YWW36.js";
|
|
25
|
-
import "../../chunk-
|
|
26
|
-
import "../../chunk-
|
|
25
|
+
import "../../chunk-LQ3EJBUN.js";
|
|
26
|
+
import "../../chunk-KB6LCTCD.js";
|
|
27
27
|
import "../../chunk-XTVWVOLD.js";
|
|
28
28
|
import "../../chunk-3MXMYHO3.js";
|
|
29
29
|
import "../../chunk-32HQMUEJ.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
StepSettings
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-5AHKXBNC.js";
|
|
5
5
|
import "../../chunk-7SOPVGDV.js";
|
|
6
6
|
import "../../chunk-4QA5TIBU.js";
|
|
7
7
|
import "../../chunk-WJXWYSBT.js";
|
|
8
8
|
import "../../chunk-KUV24B5M.js";
|
|
9
9
|
import "../../chunk-U3IGFMCY.js";
|
|
10
10
|
import "../../chunk-HK53FRMU.js";
|
|
11
|
-
import "../../chunk-
|
|
11
|
+
import "../../chunk-KB6LCTCD.js";
|
|
12
12
|
import "../../chunk-XTVWVOLD.js";
|
|
13
13
|
import "../../chunk-3MXMYHO3.js";
|
|
14
14
|
import "../../chunk-32HQMUEJ.js";
|
|
@@ -19,14 +19,14 @@ import {
|
|
|
19
19
|
} from "../../chunk-XY3XDVMI.js";
|
|
20
20
|
import {
|
|
21
21
|
StepSettings
|
|
22
|
-
} from "../../chunk-
|
|
22
|
+
} from "../../chunk-5AHKXBNC.js";
|
|
23
23
|
import "../../chunk-7SOPVGDV.js";
|
|
24
24
|
import "../../chunk-4QA5TIBU.js";
|
|
25
25
|
import "../../chunk-WJXWYSBT.js";
|
|
26
26
|
import "../../chunk-KUV24B5M.js";
|
|
27
27
|
import "../../chunk-U3IGFMCY.js";
|
|
28
28
|
import "../../chunk-HK53FRMU.js";
|
|
29
|
-
import "../../chunk-
|
|
29
|
+
import "../../chunk-KB6LCTCD.js";
|
|
30
30
|
import "../../chunk-XTVWVOLD.js";
|
|
31
31
|
import "../../chunk-3MXMYHO3.js";
|
|
32
32
|
import "../../chunk-32HQMUEJ.js";
|
|
@@ -62,7 +62,7 @@ describe("StepSettings component", () => {
|
|
|
62
62
|
let cleanup;
|
|
63
63
|
beforeEach(async () => {
|
|
64
64
|
vi.resetAllMocks();
|
|
65
|
-
const { getSourceSummary } = await import("../../source-manager-
|
|
65
|
+
const { getSourceSummary } = await import("../../source-manager-YMJ4Z5UG.js");
|
|
66
66
|
vi.mocked(getSourceSummary).mockResolvedValue({
|
|
67
67
|
sources: [
|
|
68
68
|
{ name: "public", url: "github:agents-inc/skills", enabled: true },
|
|
@@ -223,7 +223,7 @@ describe("StepSettings component", () => {
|
|
|
223
223
|
});
|
|
224
224
|
describe("edge cases", () => {
|
|
225
225
|
it("should handle empty sources list gracefully", async () => {
|
|
226
|
-
const { getSourceSummary } = await import("../../source-manager-
|
|
226
|
+
const { getSourceSummary } = await import("../../source-manager-YMJ4Z5UG.js");
|
|
227
227
|
vi.mocked(getSourceSummary).mockResolvedValue({
|
|
228
228
|
sources: [{ name: "public", url: "github:agents-inc/skills", enabled: true }],
|
|
229
229
|
localSkillCount: 0,
|
|
@@ -237,7 +237,7 @@ describe("StepSettings component", () => {
|
|
|
237
237
|
globalExpect(output).toContain("0");
|
|
238
238
|
});
|
|
239
239
|
it("should handle getSourceSummary failure gracefully", async () => {
|
|
240
|
-
const { getSourceSummary } = await import("../../source-manager-
|
|
240
|
+
const { getSourceSummary } = await import("../../source-manager-YMJ4Z5UG.js");
|
|
241
241
|
vi.mocked(getSourceSummary).mockRejectedValue(new Error("Config read failed"));
|
|
242
242
|
const { lastFrame, unmount } = renderStepSettings();
|
|
243
243
|
cleanup = unmount;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
StepSources
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-3PB7KSF7.js";
|
|
5
5
|
import "../../chunk-V36FRPAU.js";
|
|
6
6
|
import "../../chunk-K77I4XGL.js";
|
|
7
7
|
import "../../chunk-6XEZLWG5.js";
|
|
@@ -12,9 +12,9 @@ import "../../chunk-P2FHS5IS.js";
|
|
|
12
12
|
import "../../chunk-WJXWYSBT.js";
|
|
13
13
|
import "../../chunk-XO6X5QE5.js";
|
|
14
14
|
import "../../chunk-KUV24B5M.js";
|
|
15
|
-
import "../../chunk-
|
|
15
|
+
import "../../chunk-LQ3EJBUN.js";
|
|
16
16
|
import "../../chunk-HK53FRMU.js";
|
|
17
|
-
import "../../chunk-
|
|
17
|
+
import "../../chunk-KB6LCTCD.js";
|
|
18
18
|
import "../../chunk-XTVWVOLD.js";
|
|
19
19
|
import "../../chunk-3MXMYHO3.js";
|
|
20
20
|
import "../../chunk-32HQMUEJ.js";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "../../chunk-XY3XDVMI.js";
|
|
25
25
|
import {
|
|
26
26
|
StepSources
|
|
27
|
-
} from "../../chunk-
|
|
27
|
+
} from "../../chunk-3PB7KSF7.js";
|
|
28
28
|
import "../../chunk-V36FRPAU.js";
|
|
29
29
|
import "../../chunk-K77I4XGL.js";
|
|
30
30
|
import "../../chunk-6XEZLWG5.js";
|
|
@@ -37,9 +37,9 @@ import "../../chunk-XO6X5QE5.js";
|
|
|
37
37
|
import "../../chunk-KUV24B5M.js";
|
|
38
38
|
import {
|
|
39
39
|
useWizardStore
|
|
40
|
-
} from "../../chunk-
|
|
40
|
+
} from "../../chunk-LQ3EJBUN.js";
|
|
41
41
|
import "../../chunk-HK53FRMU.js";
|
|
42
|
-
import "../../chunk-
|
|
42
|
+
import "../../chunk-KB6LCTCD.js";
|
|
43
43
|
import "../../chunk-XTVWVOLD.js";
|
|
44
44
|
import {
|
|
45
45
|
initializeMatrix
|