agents-inc 0.154.0 → 0.156.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 +55 -0
- package/dist/chunk-2H7UWE2G.js +246 -0
- package/dist/chunk-2H7UWE2G.js.map +1 -0
- package/dist/{chunk-LA3JPESW.js → chunk-4A4L3YIW.js} +5 -5
- package/dist/chunk-4G2YHZIM.js +132 -0
- package/dist/chunk-4G2YHZIM.js.map +1 -0
- package/dist/{chunk-BZ4CZBOM.js → chunk-5F2YR5XV.js} +3 -3
- package/dist/{chunk-CHNA5RVS.js → chunk-5OKLCVM4.js} +3 -3
- package/dist/{chunk-ZU6DAR4S.js → chunk-5QZAK6J7.js} +7 -7
- package/dist/{chunk-ZU6DAR4S.js.map → chunk-5QZAK6J7.js.map} +1 -1
- package/dist/{chunk-NFH6SA62.js → chunk-6RLV45HN.js} +10 -10
- package/dist/{chunk-NFH6SA62.js.map → chunk-6RLV45HN.js.map} +1 -1
- package/dist/{chunk-GUDGCFSF.js → chunk-CLFHC2DK.js} +15 -106
- package/dist/chunk-CLFHC2DK.js.map +1 -0
- package/dist/chunk-D2CAV7MG.js +61 -0
- package/dist/chunk-D2CAV7MG.js.map +1 -0
- package/dist/{chunk-UW44KSYL.js → chunk-F2AMBBIA.js} +6 -6
- package/dist/{chunk-UW44KSYL.js.map → chunk-F2AMBBIA.js.map} +1 -1
- package/dist/{chunk-QQTYMW7N.js → chunk-F5T6TV4Z.js} +206 -73
- package/dist/chunk-F5T6TV4Z.js.map +1 -0
- package/dist/{chunk-K3O3YQYG.js → chunk-G47TDUK3.js} +2 -2
- package/dist/{chunk-AURY6RT6.js → chunk-GS2NZ3GD.js} +8 -8
- package/dist/chunk-GS2NZ3GD.js.map +1 -0
- package/dist/{chunk-5MFJ24VM.js → chunk-H6UTKTLK.js} +104 -250
- package/dist/chunk-H6UTKTLK.js.map +1 -0
- package/dist/{chunk-MJFIO5SX.js → chunk-HG4JPXJT.js} +11 -11
- package/dist/chunk-HG4JPXJT.js.map +1 -0
- package/dist/{chunk-IXEDSKMH.js → chunk-HTYH7CKN.js} +3 -3
- package/dist/{chunk-JC7DBPRD.js → chunk-HXKOIWLU.js} +2 -2
- package/dist/chunk-HXKOIWLU.js.map +1 -0
- package/dist/{chunk-NSJ2S7R5.js → chunk-ILUVL7WM.js} +2 -2
- package/dist/{chunk-R54KIGN2.js → chunk-IO5YBKHV.js} +13 -2
- package/dist/chunk-IO5YBKHV.js.map +1 -0
- package/dist/chunk-IXRZAHZF.js +53 -0
- package/dist/chunk-IXRZAHZF.js.map +1 -0
- package/dist/chunk-JCPANDNR.js +35 -0
- package/dist/chunk-JCPANDNR.js.map +1 -0
- package/dist/{chunk-NKCY2ULI.js → chunk-LJCNUP6M.js} +2 -2
- package/dist/{chunk-PRJD5MMQ.js → chunk-MHRC3KRX.js} +5 -5
- package/dist/chunk-MHRC3KRX.js.map +1 -0
- package/dist/chunk-MO5FGLVS.js +142 -0
- package/dist/chunk-MO5FGLVS.js.map +1 -0
- package/dist/{chunk-Q5FLW4JG.js → chunk-OKH64JZE.js} +2 -2
- package/dist/{chunk-WRRP47PY.js → chunk-PCC4LBKB.js} +2 -2
- package/dist/chunk-PMUABBPG.js +258 -0
- package/dist/chunk-PMUABBPG.js.map +1 -0
- package/dist/{chunk-2IMYK4WN.js → chunk-PNMM5HNX.js} +5 -5
- package/dist/{chunk-AKQ5QISO.js → chunk-QWVXOCXO.js} +6 -6
- package/dist/{chunk-IPJOMAWC.js → chunk-RWOYPOMR.js} +12 -2
- package/dist/{chunk-IPJOMAWC.js.map → chunk-RWOYPOMR.js.map} +1 -1
- package/dist/{chunk-ONWEOS77.js → chunk-SY4X2LND.js} +4 -4
- package/dist/{chunk-XGMOXMS4.js → chunk-TBOVYLQJ.js} +2 -2
- package/dist/{chunk-R7JV22QK.js → chunk-TNGMF4UX.js} +20 -20
- package/dist/{chunk-R7JV22QK.js.map → chunk-TNGMF4UX.js.map} +1 -1
- package/dist/{chunk-7VZV4O6B.js → chunk-UMH2YZKG.js} +14 -5
- package/dist/chunk-UMH2YZKG.js.map +1 -0
- package/dist/{chunk-6CNRMCFM.js → chunk-VPASBA7P.js} +2 -2
- package/dist/{chunk-CBF4ZYV3.js → chunk-WCAUUBHO.js} +1376 -741
- package/dist/chunk-WCAUUBHO.js.map +1 -0
- package/dist/{chunk-V3ENMW7G.js → chunk-WFRTHH3A.js} +3 -3
- package/dist/{chunk-DRKSYJZ2.js → chunk-WTJ3AY33.js} +1 -1
- package/dist/{chunk-DRKSYJZ2.js.map → chunk-WTJ3AY33.js.map} +1 -1
- package/dist/{chunk-XMEIVWAS.js → chunk-WUQ3MTPF.js} +11 -5
- package/dist/{chunk-XMEIVWAS.js.map → chunk-WUQ3MTPF.js.map} +1 -1
- package/dist/{chunk-4VCWL2IG.js → chunk-XAXJWXI4.js} +92 -59
- package/dist/chunk-XAXJWXI4.js.map +1 -0
- package/dist/{chunk-B66SC72V.js → chunk-Y5Y7XHVU.js} +4 -4
- package/dist/{chunk-FMYHWKGG.js → chunk-YO2LTXB4.js} +66 -16
- package/dist/chunk-YO2LTXB4.js.map +1 -0
- package/dist/{chunk-TUQF577Z.js → chunk-ZUAZHDKP.js} +40 -41
- package/dist/chunk-ZUAZHDKP.js.map +1 -0
- package/dist/commands/build/marketplace.js +98 -121
- package/dist/commands/build/marketplace.js.map +1 -1
- package/dist/commands/build/plugins.js +8 -8
- package/dist/commands/compile.js +19 -24
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/doctor.js +220 -79
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/edit.js +549 -75
- package/dist/commands/edit.js.map +1 -1
- package/dist/commands/eject.js +26 -21
- package/dist/commands/eject.js.map +1 -1
- package/dist/commands/init.js +41 -39
- package/dist/commands/list.js +11 -11
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/new/marketplace.js +243 -0
- package/dist/commands/new/marketplace.js.map +1 -0
- package/dist/commands/search.js +16 -14
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/share.js +67 -0
- package/dist/commands/share.js.map +1 -0
- package/dist/commands/uninstall.js +61 -74
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.js +9 -9
- package/dist/commands/update.js.map +1 -1
- package/dist/components/common/prompt-confirm.js +1 -1
- package/dist/components/common/removal-plan-confirm.js +10 -0
- package/dist/components/common/select-list.js +2 -2
- package/dist/components/wizard/category-grid.js +5 -5
- package/dist/components/wizard/checkbox-grid.js +5 -5
- package/dist/components/wizard/domain-selection.js +11 -11
- package/dist/components/wizard/run-wizard-session.js +29 -28
- package/dist/components/wizard/scroll-affordance.js +2 -2
- package/dist/components/wizard/skill-agent-summary.js +6 -6
- package/dist/components/wizard/source-grid.js +6 -6
- package/dist/components/wizard/stack-selection.js +8 -8
- package/dist/components/wizard/step-agents.js +10 -11
- package/dist/components/wizard/step-build.js +9 -9
- package/dist/components/wizard/step-confirm.js +10 -10
- package/dist/components/wizard/step-sources.js +10 -10
- package/dist/components/wizard/step-stack.js +9 -9
- package/dist/components/wizard/summary-panel.js +9 -9
- package/dist/components/wizard/toast.js +2 -2
- package/dist/components/wizard/wizard-layout.js +14 -14
- package/dist/components/wizard/wizard-tabs.js +2 -2
- package/dist/components/wizard/wizard.js +27 -27
- package/dist/copy-local-skills-NSUTBVLJ.js +14 -0
- package/dist/hooks/init.js +42 -62
- package/dist/hooks/init.js.map +1 -1
- package/dist/load-agent-defs-X4E57I2U.js +15 -0
- package/dist/{loader-JIZDTR4G.js → loader-G6BFG2VA.js} +3 -3
- package/dist/recompile-project-agents-JE4MM72I.js +20 -0
- package/dist/{source-loader-OE6EJFPU.js → source-loader-3DL3NYUX.js} +7 -5
- package/dist/source-loader-3DL3NYUX.js.map +1 -0
- package/dist/src/agents/developer/ai-developer/critical-reminders.md +1 -1
- package/dist/src/agents/developer/ai-developer/critical-requirements.md +1 -1
- package/dist/src/agents/developer/ai-developer/identity.md +1 -1
- package/dist/src/agents/developer/ai-developer/playbook.md +1 -1
- package/dist/src/agents/developer/api-developer/identity.md +1 -1
- package/dist/src/agents/developer/cli-developer/identity.md +1 -1
- package/dist/src/agents/developer/web-developer/identity.md +1 -1
- package/dist/src/agents/meta/codex-keeper/identity.md +1 -1
- package/dist/src/agents/meta/convention-keeper/identity.md +1 -1
- package/dist/src/agents/meta/skill-summoner/identity.md +1 -1
- package/dist/src/agents/researcher/ai-researcher/identity.md +1 -1
- package/dist/src/agents/researcher/api-researcher/identity.md +1 -1
- package/dist/src/agents/researcher/cli-researcher/identity.md +1 -1
- package/dist/src/agents/researcher/web-researcher/identity.md +1 -1
- package/dist/src/agents/reviewer/reviewer/playbook.md +1 -1
- package/dist/src/agents/tester/ai-tester/identity.md +1 -1
- package/dist/src/agents/tester/api-tester/critical-reminders.md +1 -1
- package/dist/src/agents/tester/api-tester/critical-requirements.md +1 -1
- package/dist/src/agents/tester/api-tester/identity.md +2 -2
- package/dist/src/agents/tester/cli-tester/identity.md +1 -1
- package/dist/src/agents/tester/web-tester/identity.md +3 -3
- package/dist/stores/wizard-store.js +7 -5
- package/package.json +10 -7
- package/src/agents/developer/ai-developer/critical-reminders.md +1 -1
- package/src/agents/developer/ai-developer/critical-requirements.md +1 -1
- package/src/agents/developer/ai-developer/identity.md +1 -1
- package/src/agents/developer/ai-developer/playbook.md +1 -1
- package/src/agents/developer/api-developer/identity.md +1 -1
- package/src/agents/developer/cli-developer/identity.md +1 -1
- package/src/agents/developer/web-developer/identity.md +1 -1
- package/src/agents/meta/codex-keeper/identity.md +1 -1
- package/src/agents/meta/convention-keeper/identity.md +1 -1
- package/src/agents/meta/skill-summoner/identity.md +1 -1
- package/src/agents/researcher/ai-researcher/identity.md +1 -1
- package/src/agents/researcher/api-researcher/identity.md +1 -1
- package/src/agents/researcher/cli-researcher/identity.md +1 -1
- package/src/agents/researcher/web-researcher/identity.md +1 -1
- package/src/agents/reviewer/reviewer/playbook.md +1 -1
- package/src/agents/tester/ai-tester/identity.md +1 -1
- package/src/agents/tester/api-tester/critical-reminders.md +1 -1
- package/src/agents/tester/api-tester/critical-requirements.md +1 -1
- package/src/agents/tester/api-tester/identity.md +2 -2
- package/src/agents/tester/cli-tester/identity.md +1 -1
- package/src/agents/tester/web-tester/identity.md +3 -3
- package/src/schemas/custom-metadata.schema.json +3 -0
- package/src/schemas/metadata.schema.json +3 -0
- package/src/schemas/project-config.schema.json +4 -8
- package/src/schemas/project-source-config.schema.json +2 -2
- package/dist/chunk-4VCWL2IG.js.map +0 -1
- package/dist/chunk-5MFJ24VM.js.map +0 -1
- package/dist/chunk-7VZV4O6B.js.map +0 -1
- package/dist/chunk-AURY6RT6.js.map +0 -1
- package/dist/chunk-CBF4ZYV3.js.map +0 -1
- package/dist/chunk-FMYHWKGG.js.map +0 -1
- package/dist/chunk-GUDGCFSF.js.map +0 -1
- package/dist/chunk-JC7DBPRD.js.map +0 -1
- package/dist/chunk-MJFIO5SX.js.map +0 -1
- package/dist/chunk-OJJLYHM3.js +0 -34
- package/dist/chunk-OJJLYHM3.js.map +0 -1
- package/dist/chunk-PRJD5MMQ.js.map +0 -1
- package/dist/chunk-QQTYMW7N.js.map +0 -1
- package/dist/chunk-QUDQTO3O.js +0 -41
- package/dist/chunk-QUDQTO3O.js.map +0 -1
- package/dist/chunk-R54KIGN2.js.map +0 -1
- package/dist/chunk-TUQF577Z.js.map +0 -1
- package/dist/copy-local-skills-WVHJFRPK.js +0 -14
- package/dist/load-agent-defs-5OT54J5M.js +0 -15
- package/dist/recompile-project-agents-VREEPBDV.js +0 -20
- /package/dist/{chunk-LA3JPESW.js.map → chunk-4A4L3YIW.js.map} +0 -0
- /package/dist/{chunk-BZ4CZBOM.js.map → chunk-5F2YR5XV.js.map} +0 -0
- /package/dist/{chunk-CHNA5RVS.js.map → chunk-5OKLCVM4.js.map} +0 -0
- /package/dist/{chunk-K3O3YQYG.js.map → chunk-G47TDUK3.js.map} +0 -0
- /package/dist/{chunk-IXEDSKMH.js.map → chunk-HTYH7CKN.js.map} +0 -0
- /package/dist/{chunk-NSJ2S7R5.js.map → chunk-ILUVL7WM.js.map} +0 -0
- /package/dist/{chunk-NKCY2ULI.js.map → chunk-LJCNUP6M.js.map} +0 -0
- /package/dist/{chunk-Q5FLW4JG.js.map → chunk-OKH64JZE.js.map} +0 -0
- /package/dist/{chunk-WRRP47PY.js.map → chunk-PCC4LBKB.js.map} +0 -0
- /package/dist/{chunk-2IMYK4WN.js.map → chunk-PNMM5HNX.js.map} +0 -0
- /package/dist/{chunk-AKQ5QISO.js.map → chunk-QWVXOCXO.js.map} +0 -0
- /package/dist/{chunk-ONWEOS77.js.map → chunk-SY4X2LND.js.map} +0 -0
- /package/dist/{chunk-XGMOXMS4.js.map → chunk-TBOVYLQJ.js.map} +0 -0
- /package/dist/{chunk-6CNRMCFM.js.map → chunk-VPASBA7P.js.map} +0 -0
- /package/dist/{chunk-V3ENMW7G.js.map → chunk-WFRTHH3A.js.map} +0 -0
- /package/dist/{chunk-B66SC72V.js.map → chunk-Y5Y7XHVU.js.map} +0 -0
- /package/dist/{copy-local-skills-WVHJFRPK.js.map → components/common/removal-plan-confirm.js.map} +0 -0
- /package/dist/{load-agent-defs-5OT54J5M.js.map → copy-local-skills-NSUTBVLJ.js.map} +0 -0
- /package/dist/{loader-JIZDTR4G.js.map → load-agent-defs-X4E57I2U.js.map} +0 -0
- /package/dist/{recompile-project-agents-VREEPBDV.js.map → loader-G6BFG2VA.js.map} +0 -0
- /package/dist/{source-loader-OE6EJFPU.js.map → recompile-project-agents-JE4MM72I.js.map} +0 -0
package/dist/commands/search.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
loadSource
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-WUQ3MTPF.js";
|
|
5
|
+
import "../chunk-5QZAK6J7.js";
|
|
6
|
+
import "../chunk-MHRC3KRX.js";
|
|
7
|
+
import "../chunk-F2AMBBIA.js";
|
|
8
|
+
import "../chunk-ZUAZHDKP.js";
|
|
9
9
|
import {
|
|
10
10
|
BaseCommand
|
|
11
|
-
} from "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
11
|
+
} from "../chunk-YO2LTXB4.js";
|
|
12
|
+
import "../chunk-UMH2YZKG.js";
|
|
13
|
+
import "../chunk-G47TDUK3.js";
|
|
14
14
|
import {
|
|
15
15
|
STATUS_MESSAGES,
|
|
16
16
|
truncateText
|
|
17
|
-
} from "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
17
|
+
} from "../chunk-WCAUUBHO.js";
|
|
18
|
+
import "../chunk-XAXJWXI4.js";
|
|
19
|
+
import "../chunk-RWOYPOMR.js";
|
|
20
20
|
import {
|
|
21
21
|
typedValues
|
|
22
22
|
} from "../chunk-VASLW636.js";
|
|
23
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-IO5YBKHV.js";
|
|
24
24
|
import "../chunk-VZRO7RYT.js";
|
|
25
25
|
|
|
26
26
|
// src/cli/commands/search.ts
|
|
@@ -74,7 +74,7 @@ var Search = class _Search extends BaseCommand {
|
|
|
74
74
|
columns: [
|
|
75
75
|
{ key: "id", name: "ID" },
|
|
76
76
|
{ key: "name", name: "Name" },
|
|
77
|
-
{ key: "source", name: "
|
|
77
|
+
{ key: "source", name: "Origin" },
|
|
78
78
|
{ key: "category", name: "Category" },
|
|
79
79
|
{ key: "description", name: "Description" }
|
|
80
80
|
],
|
|
@@ -102,7 +102,9 @@ function toResultRow(skill) {
|
|
|
102
102
|
function activeSourceName(skill) {
|
|
103
103
|
const { activeSource } = skill;
|
|
104
104
|
if (!activeSource) {
|
|
105
|
-
throw new Error(
|
|
105
|
+
throw new Error(
|
|
106
|
+
`Skill "${skill.id}" was loaded with no origin, so where it comes from is unknown`
|
|
107
|
+
);
|
|
106
108
|
}
|
|
107
109
|
return activeSource.name;
|
|
108
110
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli/commands/search.ts"],"sourcesContent":["import { Args } from \"@oclif/core\";\nimport { printTable } from \"@oclif/table\";\nimport { sortBy } from \"remeda\";\n\nimport { BaseCommand } from \"../base-command.js\";\nimport { loadSource } from \"../lib/operations/index.js\";\nimport type { ResolvedSkill } from \"../types/index.js\";\nimport { STATUS_MESSAGES } from \"../utils/messages.js\";\nimport { truncateText } from \"../utils/string.js\";\nimport { typedValues } from \"../utils/typed-object.js\";\n\nconst MAX_DESCRIPTION_WIDTH = 50;\n\n/**\n * One row of the results table. `id` and `category` are the skill's own values; `name`, `source`\n * and `description` are rendered for the cell, so they are plain strings.\n */\ntype ResultRow = Pick<ResolvedSkill, \"id\" | \"category\"> & {\n name: string;\n source: string;\n description: string;\n};\n\nexport default class Search extends BaseCommand {\n static summary = \"Search the catalog of available skills\";\n static description =\n \"Read-only catalog browse. Searches the marketplace this installation reads from, \" +\n \"plus the local skills already on disk, by id, displayName, slug, description, or \" +\n \"category. Use `edit` to install what it finds.\";\n\n static examples = [\n {\n description: \"Search for React skills\",\n command: \"<%= config.bin %> search react\",\n },\n {\n description: \"Search by any keyword (matches id, name, description, category)\",\n command: \"<%= config.bin %> search state\",\n },\n ];\n\n static args = {\n query: Args.string({\n description: \"Search query (matches id, displayName, slug, description, category)\",\n required: true,\n }),\n };\n\n static flags = {};\n\n async run(): Promise<void> {\n const { args } = await this.parse(Search);\n await this.runSearch(args.query);\n }\n\n private async runSearch(query: string): Promise<void> {\n try {\n this.log(STATUS_MESSAGES.LOADING_SKILLS);\n\n const allSkills = await loadSearchableSkills();\n\n const results = sortBy(\n allSkills.filter((skill) => matchesQuery(skill, query)),\n (r) => r.displayName.toLowerCase(),\n );\n\n this.log(\"\");\n if (results.length === 0) {\n this.warn(`No skills found matching \"${query}\"`);\n return;\n }\n\n this.logInfo(\n `Found ${results.length} skill${results.length === 1 ? \"\" : \"s\"} matching \"${query}\"`,\n );\n this.log(\"\");\n\n printTable({\n data: results.map(toResultRow),\n columns: [\n { key: \"id\", name: \"ID\" },\n { key: \"name\", name: \"Name\" },\n { key: \"source\", name: \"
|
|
1
|
+
{"version":3,"sources":["../../src/cli/commands/search.ts"],"sourcesContent":["import { Args } from \"@oclif/core\";\nimport { printTable } from \"@oclif/table\";\nimport { sortBy } from \"remeda\";\n\nimport { BaseCommand } from \"../base-command.js\";\nimport { loadSource } from \"../lib/operations/index.js\";\nimport type { ResolvedSkill } from \"../types/index.js\";\nimport { STATUS_MESSAGES } from \"../utils/messages.js\";\nimport { truncateText } from \"../utils/string.js\";\nimport { typedValues } from \"../utils/typed-object.js\";\n\nconst MAX_DESCRIPTION_WIDTH = 50;\n\n/**\n * One row of the results table. `id` and `category` are the skill's own values; `name`, `source`\n * and `description` are rendered for the cell, so they are plain strings.\n */\ntype ResultRow = Pick<ResolvedSkill, \"id\" | \"category\"> & {\n name: string;\n source: string;\n description: string;\n};\n\nexport default class Search extends BaseCommand {\n static summary = \"Search the catalog of available skills\";\n static description =\n \"Read-only catalog browse. Searches the marketplace this installation reads from, \" +\n \"plus the local skills already on disk, by id, displayName, slug, description, or \" +\n \"category. Use `edit` to install what it finds.\";\n\n static examples = [\n {\n description: \"Search for React skills\",\n command: \"<%= config.bin %> search react\",\n },\n {\n description: \"Search by any keyword (matches id, name, description, category)\",\n command: \"<%= config.bin %> search state\",\n },\n ];\n\n static args = {\n query: Args.string({\n description: \"Search query (matches id, displayName, slug, description, category)\",\n required: true,\n }),\n };\n\n static flags = {};\n\n async run(): Promise<void> {\n const { args } = await this.parse(Search);\n await this.runSearch(args.query);\n }\n\n private async runSearch(query: string): Promise<void> {\n try {\n this.log(STATUS_MESSAGES.LOADING_SKILLS);\n\n const allSkills = await loadSearchableSkills();\n\n const results = sortBy(\n allSkills.filter((skill) => matchesQuery(skill, query)),\n (r) => r.displayName.toLowerCase(),\n );\n\n this.log(\"\");\n if (results.length === 0) {\n this.warn(`No skills found matching \"${query}\"`);\n return;\n }\n\n this.logInfo(\n `Found ${results.length} skill${results.length === 1 ? \"\" : \"s\"} matching \"${query}\"`,\n );\n this.log(\"\");\n\n printTable({\n data: results.map(toResultRow),\n columns: [\n { key: \"id\", name: \"ID\" },\n { key: \"name\", name: \"Name\" },\n { key: \"source\", name: \"Origin\" },\n { key: \"category\", name: \"Category\" },\n { key: \"description\", name: \"Description\" },\n ],\n headerOptions: { bold: true },\n });\n this.log(\"\");\n } catch (error) {\n this.handleError(error);\n }\n }\n}\n\n/**\n * Every skill the catalog can offer: the marketplace matrix, which `loadSource` has already\n * merged the on-disk local skills into. There is no second source to reach for — the\n * registered-extras array this used to fan out over was withdrawn with the marketplace axis\n * (CLI-450), so the read is one load and no network beyond it.\n */\nasync function loadSearchableSkills(): Promise<ResolvedSkill[]> {\n const { sourceResult } = await loadSource({ projectDir: process.cwd() });\n\n return typedValues(sourceResult.matrix.skills);\n}\n\n/**\n * The machine id and the display name are different answers and get a column each — `edit`\n * takes the id, a human reads the name.\n */\nfunction toResultRow(skill: ResolvedSkill): ResultRow {\n return {\n id: skill.id,\n name: skill.displayName,\n source: activeSourceName(skill),\n category: skill.category,\n description: truncateText(skill.description, MAX_DESCRIPTION_WIDTH),\n };\n}\n\n/**\n * Where this installation reads the skill from: the local copy when one is on disk, otherwise\n * the marketplace the load resolved. Both names are written by the tagging pass\n * (`loadSkillsFromAllSources`), which `loadSource` always runs — a skill that reached the table\n * untagged would have no origin to report, so say so rather than name one it might not have.\n */\nfunction activeSourceName(skill: ResolvedSkill): string {\n const { activeSource } = skill;\n if (!activeSource) {\n throw new Error(\n `Skill \"${skill.id}\" was loaded with no origin, so where it comes from is unknown`,\n );\n }\n return activeSource.name;\n}\n\nfunction matchesQuery(skill: ResolvedSkill, query: string): boolean {\n const lowerQuery = query.toLowerCase();\n return [skill.id, skill.displayName, skill.slug, skill.description, skill.category].some(\n (field) => field.toLowerCase().includes(lowerQuery),\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AASvB,IAAM,wBAAwB;AAY9B,IAAqB,SAArB,MAAqB,gBAAe,YAAY;AAAA,EAC9C,OAAO,UAAU;AAAA,EACjB,OAAO,cACL;AAAA,EAIF,OAAO,WAAW;AAAA,IAChB;AAAA,MACE,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,IACA;AAAA,MACE,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EAEA,OAAO,OAAO;AAAA,IACZ,OAAO,KAAK,OAAO;AAAA,MACjB,aAAa;AAAA,MACb,UAAU;AAAA,IACZ,CAAC;AAAA,EACH;AAAA,EAEA,OAAO,QAAQ,CAAC;AAAA,EAEhB,MAAM,MAAqB;AACzB,UAAM,EAAE,KAAK,IAAI,MAAM,KAAK,MAAM,OAAM;AACxC,UAAM,KAAK,UAAU,KAAK,KAAK;AAAA,EACjC;AAAA,EAEA,MAAc,UAAU,OAA8B;AACpD,QAAI;AACF,WAAK,IAAI,gBAAgB,cAAc;AAEvC,YAAM,YAAY,MAAM,qBAAqB;AAE7C,YAAM,UAAU;AAAA,QACd,UAAU,OAAO,CAAC,UAAU,aAAa,OAAO,KAAK,CAAC;AAAA,QACtD,CAAC,MAAM,EAAE,YAAY,YAAY;AAAA,MACnC;AAEA,WAAK,IAAI,EAAE;AACX,UAAI,QAAQ,WAAW,GAAG;AACxB,aAAK,KAAK,6BAA6B,KAAK,GAAG;AAC/C;AAAA,MACF;AAEA,WAAK;AAAA,QACH,SAAS,QAAQ,MAAM,SAAS,QAAQ,WAAW,IAAI,KAAK,GAAG,cAAc,KAAK;AAAA,MACpF;AACA,WAAK,IAAI,EAAE;AAEX,iBAAW;AAAA,QACT,MAAM,QAAQ,IAAI,WAAW;AAAA,QAC7B,SAAS;AAAA,UACP,EAAE,KAAK,MAAM,MAAM,KAAK;AAAA,UACxB,EAAE,KAAK,QAAQ,MAAM,OAAO;AAAA,UAC5B,EAAE,KAAK,UAAU,MAAM,SAAS;AAAA,UAChC,EAAE,KAAK,YAAY,MAAM,WAAW;AAAA,UACpC,EAAE,KAAK,eAAe,MAAM,cAAc;AAAA,QAC5C;AAAA,QACA,eAAe,EAAE,MAAM,KAAK;AAAA,MAC9B,CAAC;AACD,WAAK,IAAI,EAAE;AAAA,IACb,SAAS,OAAO;AACd,WAAK,YAAY,KAAK;AAAA,IACxB;AAAA,EACF;AACF;AAQA,eAAe,uBAAiD;AAC9D,QAAM,EAAE,aAAa,IAAI,MAAM,WAAW,EAAE,YAAY,QAAQ,IAAI,EAAE,CAAC;AAEvE,SAAO,YAAY,aAAa,OAAO,MAAM;AAC/C;AAMA,SAAS,YAAY,OAAiC;AACpD,SAAO;AAAA,IACL,IAAI,MAAM;AAAA,IACV,MAAM,MAAM;AAAA,IACZ,QAAQ,iBAAiB,KAAK;AAAA,IAC9B,UAAU,MAAM;AAAA,IAChB,aAAa,aAAa,MAAM,aAAa,qBAAqB;AAAA,EACpE;AACF;AAQA,SAAS,iBAAiB,OAA8B;AACtD,QAAM,EAAE,aAAa,IAAI;AACzB,MAAI,CAAC,cAAc;AACjB,UAAM,IAAI;AAAA,MACR,UAAU,MAAM,EAAE;AAAA,IACpB;AAAA,EACF;AACA,SAAO,aAAa;AACtB;AAEA,SAAS,aAAa,OAAsB,OAAwB;AAClE,QAAM,aAAa,MAAM,YAAY;AACrC,SAAO,CAAC,MAAM,IAAI,MAAM,aAAa,MAAM,MAAM,MAAM,aAAa,MAAM,QAAQ,EAAE;AAAA,IAClF,CAAC,UAAU,MAAM,YAAY,EAAE,SAAS,UAAU;AAAA,EACpD;AACF;","names":[]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
publishSeedConfig,
|
|
4
|
+
seedPayloadForInstallation
|
|
5
|
+
} from "../chunk-2H7UWE2G.js";
|
|
6
|
+
import "../chunk-PMUABBPG.js";
|
|
7
|
+
import {
|
|
8
|
+
BaseCommand,
|
|
9
|
+
EXIT_CODES
|
|
10
|
+
} from "../chunk-YO2LTXB4.js";
|
|
11
|
+
import "../chunk-UMH2YZKG.js";
|
|
12
|
+
import "../chunk-G47TDUK3.js";
|
|
13
|
+
import {
|
|
14
|
+
sharedConfigDestinations
|
|
15
|
+
} from "../chunk-WCAUUBHO.js";
|
|
16
|
+
import "../chunk-XAXJWXI4.js";
|
|
17
|
+
import "../chunk-RWOYPOMR.js";
|
|
18
|
+
import "../chunk-VASLW636.js";
|
|
19
|
+
import "../chunk-IO5YBKHV.js";
|
|
20
|
+
import "../chunk-VZRO7RYT.js";
|
|
21
|
+
|
|
22
|
+
// src/cli/commands/share.ts
|
|
23
|
+
var Share = class _Share extends BaseCommand {
|
|
24
|
+
static summary = "Share this installation as an id anyone can install";
|
|
25
|
+
static description = "Turns the skills, sub-agents and per-agent curation installed here into a configuration the agentsinc.sh store holds, and prints the id it was given. Install it elsewhere with 'init --from <id>', or open it in the editor. The id is the configuration's own hash, so sharing an unchanged installation returns the id it already had.";
|
|
26
|
+
static flags = {};
|
|
27
|
+
static examples = ["<%= config.bin %> <%= command.id %>"];
|
|
28
|
+
/**
|
|
29
|
+
* Read, map, refuse, publish.
|
|
30
|
+
*
|
|
31
|
+
* Everything that can fail locally fails before the POST. The store's free tier allows a
|
|
32
|
+
* thousand writes a day and reads a hundred times that, so a write is the scarce half — and one
|
|
33
|
+
* spent on a configuration that cannot be installed buys a dead link.
|
|
34
|
+
*
|
|
35
|
+
* The first three steps are `seedPayloadForInstallation`, shared with `edit --ui`: the two
|
|
36
|
+
* commands mint the same id from the same directory and differ only in what they do with it.
|
|
37
|
+
*/
|
|
38
|
+
async run() {
|
|
39
|
+
await this.parse(_Share);
|
|
40
|
+
const prepared = await seedPayloadForInstallation(process.cwd());
|
|
41
|
+
if (!prepared.ok) {
|
|
42
|
+
this.error(prepared.error, { exit: EXIT_CODES.ERROR });
|
|
43
|
+
}
|
|
44
|
+
this.log(`Sharing ${prepared.skills} skill(s) across ${prepared.agents} sub-agent(s)...`);
|
|
45
|
+
const published = await publishSeedConfig(prepared.payload);
|
|
46
|
+
if (!published.ok) {
|
|
47
|
+
this.error(published.error, { exit: EXIT_CODES.ERROR });
|
|
48
|
+
}
|
|
49
|
+
this.reportShared(published.id);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Both destinations, because an id nobody can act on is not a share and there are exactly two
|
|
53
|
+
* things that read one: this CLI, and the editor the configuration can be reopened in. The
|
|
54
|
+
* lines themselves are `sharedConfigDestinations`, shared with `edit --ui` for the same reason
|
|
55
|
+
* the mint above is.
|
|
56
|
+
*/
|
|
57
|
+
reportShared(id) {
|
|
58
|
+
this.logSuccess(`Shared as ${id}`);
|
|
59
|
+
for (const destination of sharedConfigDestinations(id)) {
|
|
60
|
+
this.log(destination);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
export {
|
|
65
|
+
Share as default
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=share.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/cli/commands/share.ts"],"sourcesContent":["import { BaseCommand } from \"../base-command.js\";\nimport { EXIT_CODES } from \"../lib/exit-codes.js\";\nimport { seedPayloadForInstallation } from \"../lib/seed/installation-payload.js\";\nimport { publishSeedConfig } from \"../lib/seed/publish-seed.js\";\nimport { sharedConfigDestinations } from \"../utils/messages.js\";\n\nexport default class Share extends BaseCommand {\n static summary = \"Share this installation as an id anyone can install\";\n\n static description =\n \"Turns the skills, sub-agents and per-agent curation installed here into a configuration the agentsinc.sh store holds, and prints the id it was given. Install it elsewhere with 'init --from <id>', or open it in the editor. The id is the configuration's own hash, so sharing an unchanged installation returns the id it already had.\";\n\n static flags = {};\n\n static examples = [\"<%= config.bin %> <%= command.id %>\"];\n\n /**\n * Read, map, refuse, publish.\n *\n * Everything that can fail locally fails before the POST. The store's free tier allows a\n * thousand writes a day and reads a hundred times that, so a write is the scarce half — and one\n * spent on a configuration that cannot be installed buys a dead link.\n *\n * The first three steps are `seedPayloadForInstallation`, shared with `edit --ui`: the two\n * commands mint the same id from the same directory and differ only in what they do with it.\n */\n async run(): Promise<void> {\n await this.parse(Share);\n\n const prepared = await seedPayloadForInstallation(process.cwd());\n if (!prepared.ok) {\n this.error(prepared.error, { exit: EXIT_CODES.ERROR });\n }\n\n this.log(`Sharing ${prepared.skills} skill(s) across ${prepared.agents} sub-agent(s)...`);\n\n const published = await publishSeedConfig(prepared.payload);\n if (!published.ok) {\n this.error(published.error, { exit: EXIT_CODES.ERROR });\n }\n\n this.reportShared(published.id);\n }\n\n /**\n * Both destinations, because an id nobody can act on is not a share and there are exactly two\n * things that read one: this CLI, and the editor the configuration can be reopened in. The\n * lines themselves are `sharedConfigDestinations`, shared with `edit --ui` for the same reason\n * the mint above is.\n */\n private reportShared(id: string): void {\n this.logSuccess(`Shared as ${id}`);\n for (const destination of sharedConfigDestinations(id)) {\n this.log(destination);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAMA,IAAqB,QAArB,MAAqB,eAAc,YAAY;AAAA,EAC7C,OAAO,UAAU;AAAA,EAEjB,OAAO,cACL;AAAA,EAEF,OAAO,QAAQ,CAAC;AAAA,EAEhB,OAAO,WAAW,CAAC,qCAAqC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYxD,MAAM,MAAqB;AACzB,UAAM,KAAK,MAAM,MAAK;AAEtB,UAAM,WAAW,MAAM,2BAA2B,QAAQ,IAAI,CAAC;AAC/D,QAAI,CAAC,SAAS,IAAI;AAChB,WAAK,MAAM,SAAS,OAAO,EAAE,MAAM,WAAW,MAAM,CAAC;AAAA,IACvD;AAEA,SAAK,IAAI,WAAW,SAAS,MAAM,oBAAoB,SAAS,MAAM,kBAAkB;AAExF,UAAM,YAAY,MAAM,kBAAkB,SAAS,OAAO;AAC1D,QAAI,CAAC,UAAU,IAAI;AACjB,WAAK,MAAM,UAAU,OAAO,EAAE,MAAM,WAAW,MAAM,CAAC;AAAA,IACxD;AAEA,SAAK,aAAa,UAAU,EAAE;AAAA,EAChC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQQ,aAAa,IAAkB;AACrC,SAAK,WAAW,aAAa,EAAE,EAAE;AACjC,eAAW,eAAe,yBAAyB,EAAE,GAAG;AACtD,WAAK,IAAI,WAAW;AAAA,IACtB;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "../chunk-
|
|
3
|
+
RemovalPlanConfirm
|
|
4
|
+
} from "../chunk-D2CAV7MG.js";
|
|
5
|
+
import "../chunk-OZXAJNLA.js";
|
|
5
6
|
import {
|
|
6
7
|
promptConfirm
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-UW44KSYL.js";
|
|
8
|
+
} from "../chunk-JCPANDNR.js";
|
|
9
|
+
import "../chunk-WUQ3MTPF.js";
|
|
10
|
+
import "../chunk-5QZAK6J7.js";
|
|
11
11
|
import {
|
|
12
12
|
loadAgentDefs
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-MHRC3KRX.js";
|
|
14
|
+
import "../chunk-F2AMBBIA.js";
|
|
14
15
|
import {
|
|
15
|
-
listAgentMdFiles
|
|
16
|
-
|
|
16
|
+
listAgentMdFiles,
|
|
17
|
+
splitAgentsByProvenance
|
|
18
|
+
} from "../chunk-ZUAZHDKP.js";
|
|
17
19
|
import "../chunk-JFLVEFFP.js";
|
|
18
20
|
import {
|
|
19
21
|
BaseCommand,
|
|
20
22
|
EXIT_CODES
|
|
21
|
-
} from "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
23
|
+
} from "../chunk-YO2LTXB4.js";
|
|
24
|
+
import "../chunk-UMH2YZKG.js";
|
|
25
|
+
import "../chunk-G47TDUK3.js";
|
|
24
26
|
import {
|
|
25
27
|
ConfigLoadError,
|
|
26
28
|
INFO_MESSAGES,
|
|
@@ -28,7 +30,6 @@ import {
|
|
|
28
30
|
UNINSTALL_PLAN,
|
|
29
31
|
buildMarketplacePluginRef,
|
|
30
32
|
claudePluginUninstallBestEffort,
|
|
31
|
-
compiledAgentsKept,
|
|
32
33
|
compiledAgentsRemoval,
|
|
33
34
|
getProjectPluginsDir,
|
|
34
35
|
isClaudeCLIAvailable,
|
|
@@ -46,8 +47,9 @@ import {
|
|
|
46
47
|
registeredProjectsUpdateFailed,
|
|
47
48
|
registeredProjectsUpdated,
|
|
48
49
|
resolveInstallPaths,
|
|
49
|
-
toClaudePluginScope
|
|
50
|
-
|
|
50
|
+
toClaudePluginScope,
|
|
51
|
+
unmarkedAgentsKept
|
|
52
|
+
} from "../chunk-WCAUUBHO.js";
|
|
51
53
|
import {
|
|
52
54
|
directoryExists,
|
|
53
55
|
fileExists,
|
|
@@ -55,17 +57,16 @@ import {
|
|
|
55
57
|
listDirectories,
|
|
56
58
|
remove,
|
|
57
59
|
removeDirIfEmpty
|
|
58
|
-
} from "../chunk-
|
|
59
|
-
import "../chunk-
|
|
60
|
+
} from "../chunk-XAXJWXI4.js";
|
|
61
|
+
import "../chunk-RWOYPOMR.js";
|
|
60
62
|
import "../chunk-VASLW636.js";
|
|
61
63
|
import {
|
|
62
64
|
CLAUDE_DIR,
|
|
63
65
|
CLAUDE_SRC_DIR,
|
|
64
|
-
CLI_COLORS,
|
|
65
66
|
DEFAULT_BRANDING,
|
|
66
67
|
EJECT_SOURCE,
|
|
67
68
|
STANDARD_FILES
|
|
68
|
-
} from "../chunk-
|
|
69
|
+
} from "../chunk-IO5YBKHV.js";
|
|
69
70
|
import "../chunk-VZRO7RYT.js";
|
|
70
71
|
|
|
71
72
|
// src/cli/commands/uninstall.tsx
|
|
@@ -73,8 +74,7 @@ import "react";
|
|
|
73
74
|
import { partition } from "remeda";
|
|
74
75
|
import path from "path";
|
|
75
76
|
import { Flags } from "@oclif/core";
|
|
76
|
-
import {
|
|
77
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
77
|
+
import { jsx } from "react/jsx-runtime";
|
|
78
78
|
function buildRemovalPlan(target) {
|
|
79
79
|
const agents = compiledAgentsEntry(target);
|
|
80
80
|
return {
|
|
@@ -100,8 +100,13 @@ function localSkillsEntry(target) {
|
|
|
100
100
|
}
|
|
101
101
|
function compiledAgentsEntry(target) {
|
|
102
102
|
if (!target.hasLocalAgents) return [];
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
const agentNames = identifiableAgents(target);
|
|
104
|
+
if (agentNames.length === 0) return [];
|
|
105
|
+
return [{ kind: "agents", agentsDir: target.agentsDir, agentNames }];
|
|
106
|
+
}
|
|
107
|
+
function identifiableAgents(target) {
|
|
108
|
+
if (target.configuredAgents.length > 0) return target.configuredAgents;
|
|
109
|
+
return target.markedAgents;
|
|
105
110
|
}
|
|
106
111
|
function configManifestEntry(target) {
|
|
107
112
|
const fileNames = [
|
|
@@ -112,9 +117,10 @@ function configManifestEntry(target) {
|
|
|
112
117
|
return [{ kind: "config", claudeSrcDir: target.claudeSrcDir, fileNames }];
|
|
113
118
|
}
|
|
114
119
|
function keptStatements(target, agentRemovals) {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
120
|
+
const removing = new Set(agentRemovals.flatMap((entry) => entry.agentNames));
|
|
121
|
+
const kept = target.unmarkedAgents.filter((name) => !removing.has(name));
|
|
122
|
+
if (kept.length === 0) return [];
|
|
123
|
+
return [unmarkedAgentsKept(target.agentsDir, kept.length)];
|
|
118
124
|
}
|
|
119
125
|
function planEntry(plan, kind) {
|
|
120
126
|
return plan.entries.find(
|
|
@@ -164,46 +170,10 @@ function sectionWithItems(label, items) {
|
|
|
164
170
|
if (items.length === 0) return [];
|
|
165
171
|
return [{ label, items }];
|
|
166
172
|
}
|
|
167
|
-
var
|
|
168
|
-
const { exit } = useApp();
|
|
169
|
-
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
|
|
170
|
-
/* @__PURE__ */ jsx(Text, { bold: true, children: UNINSTALL_PLAN.PREVIEW_HEADING }),
|
|
171
|
-
/* @__PURE__ */ jsx(Text, { children: " " }),
|
|
172
|
-
planSections(plan.entries).map((section) => /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
|
|
173
|
-
/* @__PURE__ */ jsxs(Text, { color: CLI_COLORS.ERROR, children: [
|
|
174
|
-
" ",
|
|
175
|
-
section.label
|
|
176
|
-
] }),
|
|
177
|
-
section.items.map((item) => /* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
|
|
178
|
-
" ",
|
|
179
|
-
item
|
|
180
|
-
] }, item))
|
|
181
|
-
] }, section.label)),
|
|
182
|
-
plan.kept.map((statement) => /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
|
|
183
|
-
/* @__PURE__ */ jsx(Text, { children: " " }),
|
|
184
|
-
/* @__PURE__ */ jsx(Text, { dimColor: true, children: statement })
|
|
185
|
-
] }, statement)),
|
|
186
|
-
/* @__PURE__ */ jsx(Text, { children: " " }),
|
|
187
|
-
/* @__PURE__ */ jsx(
|
|
188
|
-
Confirm,
|
|
189
|
-
{
|
|
190
|
-
message: "Are you sure you want to uninstall?",
|
|
191
|
-
onConfirm: () => {
|
|
192
|
-
onConfirm();
|
|
193
|
-
exit();
|
|
194
|
-
},
|
|
195
|
-
onCancel: () => {
|
|
196
|
-
onCancel();
|
|
197
|
-
exit();
|
|
198
|
-
},
|
|
199
|
-
defaultValue: false
|
|
200
|
-
}
|
|
201
|
-
)
|
|
202
|
-
] });
|
|
203
|
-
};
|
|
173
|
+
var UNINSTALL_CONFIRM_MESSAGE = "Are you sure you want to uninstall?";
|
|
204
174
|
var Uninstall = class _Uninstall extends BaseCommand {
|
|
205
175
|
static summary = `Remove ${DEFAULT_BRANDING.NAME} from this project`;
|
|
206
|
-
static description = `Uninstall ${DEFAULT_BRANDING.NAME} from this project. Removes CLI-managed skills (matched by
|
|
176
|
+
static description = `Uninstall ${DEFAULT_BRANDING.NAME} from this project. Removes CLI-managed skills (matched by marketplace), compiled agents, plugins, and the .claude-src/ config manifest (config.ts + config-types.ts). User-created content is preserved.`;
|
|
207
177
|
static examples = [
|
|
208
178
|
"<%= config.bin %> <%= command.id %>",
|
|
209
179
|
"<%= config.bin %> <%= command.id %> --yes"
|
|
@@ -268,7 +238,17 @@ var Uninstall = class _Uninstall extends BaseCommand {
|
|
|
268
238
|
return true;
|
|
269
239
|
}
|
|
270
240
|
async confirmRemoval(plan) {
|
|
271
|
-
const outcome = await promptConfirm(({ onConfirm, onCancel }) => /* @__PURE__ */ jsx(
|
|
241
|
+
const outcome = await promptConfirm(({ onConfirm, onCancel }) => /* @__PURE__ */ jsx(
|
|
242
|
+
RemovalPlanConfirm,
|
|
243
|
+
{
|
|
244
|
+
heading: UNINSTALL_PLAN.PREVIEW_HEADING,
|
|
245
|
+
sections: planSections(plan.entries),
|
|
246
|
+
statements: plan.kept,
|
|
247
|
+
message: UNINSTALL_CONFIRM_MESSAGE,
|
|
248
|
+
onConfirm,
|
|
249
|
+
onCancel
|
|
250
|
+
}
|
|
251
|
+
));
|
|
272
252
|
return outcome === "confirmed";
|
|
273
253
|
}
|
|
274
254
|
async executeUninstall(plan, target, projectDir) {
|
|
@@ -322,7 +302,7 @@ var Uninstall = class _Uninstall extends BaseCommand {
|
|
|
322
302
|
skipExtraSources: true,
|
|
323
303
|
matrixOnly: true
|
|
324
304
|
}),
|
|
325
|
-
loadAgentDefs(
|
|
305
|
+
loadAgentDefs()
|
|
326
306
|
]);
|
|
327
307
|
return { globalConfig, matrix: sourceResult.matrix, agents: agentDefs.agents };
|
|
328
308
|
} catch (error) {
|
|
@@ -368,6 +348,9 @@ var Uninstall = class _Uninstall extends BaseCommand {
|
|
|
368
348
|
async removeLocalFiles(plan, target) {
|
|
369
349
|
await this.removePlannedSkills(planEntry(plan, "skills"));
|
|
370
350
|
await this.removePlannedAgents(planEntry(plan, "agents"));
|
|
351
|
+
for (const statement of plan.kept) {
|
|
352
|
+
this.log(statement);
|
|
353
|
+
}
|
|
371
354
|
const cleanup = await cleanupEmptyDirs(target, planEntry(plan, "config"));
|
|
372
355
|
if (cleanup.claudeSrcDirRemoved) {
|
|
373
356
|
this.logSuccess(`Removed ${CLAUDE_SRC_DIR}/`);
|
|
@@ -430,14 +413,14 @@ function collectConfiguredAgents(config) {
|
|
|
430
413
|
}
|
|
431
414
|
function getCliInstalledPluginKeys(config) {
|
|
432
415
|
if (!config?.skills) return /* @__PURE__ */ new Set();
|
|
433
|
-
const {
|
|
416
|
+
const { marketplaceName } = config;
|
|
434
417
|
return new Set(
|
|
435
418
|
config.skills.flatMap((skill) => [
|
|
436
|
-
// Primary key: skill.id@skill.
|
|
437
|
-
buildMarketplacePluginRef(skill.id, skill.
|
|
419
|
+
// Primary key: skill.id@skill.origin
|
|
420
|
+
buildMarketplacePluginRef(skill.id, skill.origin),
|
|
438
421
|
// Marketplace variant for plugins installed via marketplace where
|
|
439
|
-
// skill.
|
|
440
|
-
...
|
|
422
|
+
// skill.origin may differ (e.g., "eject" vs the marketplace name)
|
|
423
|
+
...marketplaceName && skill.origin !== marketplaceName && skill.origin !== EJECT_SOURCE ? [buildMarketplacePluginRef(skill.id, marketplaceName)] : []
|
|
441
424
|
])
|
|
442
425
|
);
|
|
443
426
|
}
|
|
@@ -464,14 +447,16 @@ async function detectUninstallTarget(projectDir, onConfigLoadFailed) {
|
|
|
464
447
|
hasClaudeDir,
|
|
465
448
|
hasClaudeSrcConfig,
|
|
466
449
|
hasClaudeSrcConfigTypes,
|
|
467
|
-
config
|
|
450
|
+
config,
|
|
451
|
+
agentProvenance
|
|
468
452
|
] = await Promise.all([
|
|
469
453
|
directoryExists(skillsDir),
|
|
470
454
|
directoryExists(agentsDir),
|
|
471
455
|
directoryExists(claudeDir),
|
|
472
456
|
fileExists(claudeSrcConfigPath),
|
|
473
457
|
fileExists(claudeSrcConfigTypesPath),
|
|
474
|
-
loadUninstallConfig(projectDir, onConfigLoadFailed)
|
|
458
|
+
loadUninstallConfig(projectDir, onConfigLoadFailed),
|
|
459
|
+
splitAgentsByProvenance(agentsDir)
|
|
475
460
|
]);
|
|
476
461
|
let pluginNames = [];
|
|
477
462
|
try {
|
|
@@ -501,7 +486,9 @@ async function detectUninstallTarget(projectDir, onConfigLoadFailed) {
|
|
|
501
486
|
claudeDir,
|
|
502
487
|
claudeSrcDir,
|
|
503
488
|
config,
|
|
504
|
-
configuredAgents
|
|
489
|
+
configuredAgents,
|
|
490
|
+
markedAgents: agentProvenance.marked,
|
|
491
|
+
unmarkedAgents: agentProvenance.unmarked
|
|
505
492
|
};
|
|
506
493
|
}
|
|
507
494
|
function shouldRemoveSkill(forkedFrom) {
|