agents-inc 0.159.0 → 0.161.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 +23 -0
- package/README.md +1 -1
- package/dist/{chunk-PEHYVSJG.js → chunk-264XDRU7.js} +2 -2
- package/dist/{chunk-WVKGO3Y5.js → chunk-2MPXMJ2O.js} +7 -7
- package/dist/{chunk-IO2DPRDS.js → chunk-3H42U56X.js} +2 -2
- package/dist/{chunk-FBRLHNUT.js → chunk-3M75HVIM.js} +3 -3
- package/dist/{chunk-YKRPWZ3G.js → chunk-3TM4FHTG.js} +2 -2
- package/dist/{chunk-5YOSLSQJ.js → chunk-5DWDT6GM.js} +115 -96
- package/dist/chunk-5DWDT6GM.js.map +1 -0
- package/dist/{chunk-4APXK7ZY.js → chunk-5MML3K36.js} +2 -2
- package/dist/{chunk-F35G42TF.js → chunk-6PVWDTEM.js} +12 -12
- package/dist/{chunk-VCUXNKOY.js → chunk-A2NA377T.js} +6 -6
- package/dist/{chunk-4RYWFQK7.js → chunk-ADDYIMWN.js} +3 -3
- package/dist/{chunk-V625APR6.js → chunk-AMZO4YJK.js} +10789 -18786
- package/dist/chunk-AMZO4YJK.js.map +1 -0
- package/dist/{chunk-4VMLCWLD.js → chunk-AO6DXJUK.js} +3 -3
- package/dist/{chunk-G7TYOPON.js → chunk-B3YSTZZC.js} +3 -3
- package/dist/{chunk-THLQS2AW.js → chunk-B7YTQVAF.js} +4 -4
- package/dist/{chunk-7Z4N4JWQ.js → chunk-BLGETWYI.js} +6 -113
- package/dist/chunk-BLGETWYI.js.map +1 -0
- package/dist/{chunk-ITEJARWI.js → chunk-BRHU6J3C.js} +3 -3
- package/dist/{chunk-AU5FS3QK.js → chunk-DGXW2ZFY.js} +3 -3
- package/dist/{chunk-LSSGS2QS.js → chunk-DHRW3MDM.js} +3 -3
- package/dist/{chunk-OJIQOVWB.js → chunk-DTCUZL7S.js} +2 -2
- package/dist/{chunk-SKDTGHCD.js → chunk-EEFTUZHZ.js} +5 -5
- package/dist/{chunk-BQJVHD6Y.js → chunk-EERGAAGE.js} +5 -10
- package/dist/chunk-EERGAAGE.js.map +1 -0
- package/dist/{chunk-Z6G24ROK.js → chunk-EQSMVZGS.js} +10 -10
- package/dist/{chunk-2Q65K6E3.js → chunk-EY7Z34Y4.js} +15 -15
- package/dist/{chunk-BNHD2GIB.js → chunk-F6LS2BQD.js} +11 -11
- package/dist/{chunk-SITF5EZM.js → chunk-HB3YIAFD.js} +2 -2
- package/dist/{chunk-GPZQCLZJ.js → chunk-LZPRLHUE.js} +9 -9
- package/dist/{chunk-YAHTF4NO.js → chunk-MED6GNV3.js} +288 -203
- package/dist/chunk-MED6GNV3.js.map +1 -0
- package/dist/chunk-N6CILY5A.js +35 -0
- package/dist/chunk-N6CILY5A.js.map +1 -0
- package/dist/{chunk-42PQKBVU.js → chunk-ODUACQLV.js} +6 -6
- package/dist/{chunk-VZRO7RYT.js → chunk-OI2H6M5I.js} +1 -103
- package/dist/chunk-OI2H6M5I.js.map +1 -0
- package/dist/{chunk-MPLWPWL4.js → chunk-QKMT6OOP.js} +2 -2
- package/dist/{chunk-WVBJRFFM.js → chunk-SX57ZIGM.js} +4 -4
- package/dist/{chunk-62XKTOUI.js → chunk-T4RVCFWN.js} +5 -15
- package/dist/chunk-T4RVCFWN.js.map +1 -0
- package/dist/{chunk-4VVKVOOP.js → chunk-UMYEY6BA.js} +2 -2
- package/dist/{chunk-X5PLVOJS.js → chunk-W2RXRWDB.js} +2 -2
- package/dist/{chunk-JV4P7BL4.js → chunk-WVCF7KFV.js} +5 -5
- package/dist/chunk-XA4SWA2Z.js +591 -0
- package/dist/chunk-XA4SWA2Z.js.map +1 -0
- package/dist/{chunk-LVA6XJGR.js → chunk-YOVUXONB.js} +9 -43
- package/dist/chunk-YOVUXONB.js.map +1 -0
- package/dist/chunk-YSQ76LWG.js +8734 -0
- package/dist/chunk-YSQ76LWG.js.map +1 -0
- package/dist/{chunk-Z6KROWH4.js → chunk-ZQZHDYHQ.js} +7 -7
- package/dist/commands/build/marketplace.js +8 -8
- package/dist/commands/build/plugins.js +8 -8
- package/dist/commands/compile.js +14 -14
- package/dist/commands/doctor.js +13 -13
- package/dist/commands/edit.js +45 -45
- package/dist/commands/eject.js +11 -11
- package/dist/commands/init.js +37 -37
- package/dist/commands/list.js +9 -9
- package/dist/commands/new/marketplace.js +8 -9
- package/dist/commands/new/marketplace.js.map +1 -1
- package/dist/commands/search.js +11 -11
- package/dist/commands/share.js +11 -10
- package/dist/commands/share.js.map +1 -1
- package/dist/commands/uninstall.js +12 -12
- package/dist/commands/update.js +7 -7
- package/dist/components/common/removal-plan-confirm.js +2 -2
- package/dist/components/common/select-list.js +2 -2
- package/dist/components/wizard/category-grid.js +4 -4
- package/dist/components/wizard/checkbox-grid.js +4 -4
- package/dist/components/wizard/domain-selection.js +10 -10
- package/dist/components/wizard/run-wizard-session.js +27 -27
- 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 +5 -5
- package/dist/components/wizard/stack-selection.js +8 -8
- package/dist/components/wizard/step-agents.js +9 -9
- package/dist/components/wizard/step-build.js +8 -8
- package/dist/components/wizard/step-confirm.js +10 -10
- package/dist/components/wizard/step-sources.js +9 -9
- 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 +13 -13
- package/dist/components/wizard/wizard-tabs.js +2 -2
- package/dist/components/wizard/wizard.js +26 -26
- package/dist/config-exports.js +1 -1
- package/dist/hooks/init.js +37 -37
- package/dist/load-agent-defs-LDSND43G.js +13 -0
- package/dist/recompile-project-agents-GQLODH24.js +17 -0
- package/dist/{source-loader-CC6ZWKTI.js → source-loader-TSF5VS6V.js} +5 -5
- package/dist/src/agents/_templates/methodologies/anti-over-engineering.liquid +14 -0
- package/dist/src/agents/_templates/methodologies/context-management.liquid +7 -154
- package/dist/src/agents/_templates/methodologies/investigation-requirements.liquid +12 -0
- package/dist/src/agents/_templates/methodologies/success-criteria.liquid +10 -0
- package/dist/stores/wizard-store.js +5 -5
- package/package.json +9 -4
- package/src/agents/_templates/methodologies/anti-over-engineering.liquid +14 -0
- package/src/agents/_templates/methodologies/context-management.liquid +7 -154
- package/src/agents/_templates/methodologies/investigation-requirements.liquid +12 -0
- package/src/agents/_templates/methodologies/success-criteria.liquid +10 -0
- package/dist/chunk-5KB4I5J7.js +0 -262
- package/dist/chunk-5KB4I5J7.js.map +0 -1
- package/dist/chunk-5YOSLSQJ.js.map +0 -1
- package/dist/chunk-62XKTOUI.js.map +0 -1
- package/dist/chunk-7Z4N4JWQ.js.map +0 -1
- package/dist/chunk-BQJVHD6Y.js.map +0 -1
- package/dist/chunk-LVA6XJGR.js.map +0 -1
- package/dist/chunk-NS5COBTT.js +0 -254
- package/dist/chunk-NS5COBTT.js.map +0 -1
- package/dist/chunk-V625APR6.js.map +0 -1
- package/dist/chunk-VZRO7RYT.js.map +0 -1
- package/dist/chunk-YAHTF4NO.js.map +0 -1
- package/dist/chunk-YVQSDBTK.js +0 -169
- package/dist/chunk-YVQSDBTK.js.map +0 -1
- package/dist/load-agent-defs-2H42B2OO.js +0 -13
- package/dist/recompile-project-agents-QIAMBCM4.js +0 -17
- /package/dist/{chunk-PEHYVSJG.js.map → chunk-264XDRU7.js.map} +0 -0
- /package/dist/{chunk-WVKGO3Y5.js.map → chunk-2MPXMJ2O.js.map} +0 -0
- /package/dist/{chunk-IO2DPRDS.js.map → chunk-3H42U56X.js.map} +0 -0
- /package/dist/{chunk-FBRLHNUT.js.map → chunk-3M75HVIM.js.map} +0 -0
- /package/dist/{chunk-YKRPWZ3G.js.map → chunk-3TM4FHTG.js.map} +0 -0
- /package/dist/{chunk-4APXK7ZY.js.map → chunk-5MML3K36.js.map} +0 -0
- /package/dist/{chunk-F35G42TF.js.map → chunk-6PVWDTEM.js.map} +0 -0
- /package/dist/{chunk-VCUXNKOY.js.map → chunk-A2NA377T.js.map} +0 -0
- /package/dist/{chunk-4RYWFQK7.js.map → chunk-ADDYIMWN.js.map} +0 -0
- /package/dist/{chunk-4VMLCWLD.js.map → chunk-AO6DXJUK.js.map} +0 -0
- /package/dist/{chunk-G7TYOPON.js.map → chunk-B3YSTZZC.js.map} +0 -0
- /package/dist/{chunk-THLQS2AW.js.map → chunk-B7YTQVAF.js.map} +0 -0
- /package/dist/{chunk-ITEJARWI.js.map → chunk-BRHU6J3C.js.map} +0 -0
- /package/dist/{chunk-AU5FS3QK.js.map → chunk-DGXW2ZFY.js.map} +0 -0
- /package/dist/{chunk-LSSGS2QS.js.map → chunk-DHRW3MDM.js.map} +0 -0
- /package/dist/{chunk-OJIQOVWB.js.map → chunk-DTCUZL7S.js.map} +0 -0
- /package/dist/{chunk-SKDTGHCD.js.map → chunk-EEFTUZHZ.js.map} +0 -0
- /package/dist/{chunk-Z6G24ROK.js.map → chunk-EQSMVZGS.js.map} +0 -0
- /package/dist/{chunk-2Q65K6E3.js.map → chunk-EY7Z34Y4.js.map} +0 -0
- /package/dist/{chunk-BNHD2GIB.js.map → chunk-F6LS2BQD.js.map} +0 -0
- /package/dist/{chunk-SITF5EZM.js.map → chunk-HB3YIAFD.js.map} +0 -0
- /package/dist/{chunk-GPZQCLZJ.js.map → chunk-LZPRLHUE.js.map} +0 -0
- /package/dist/{chunk-42PQKBVU.js.map → chunk-ODUACQLV.js.map} +0 -0
- /package/dist/{chunk-MPLWPWL4.js.map → chunk-QKMT6OOP.js.map} +0 -0
- /package/dist/{chunk-WVBJRFFM.js.map → chunk-SX57ZIGM.js.map} +0 -0
- /package/dist/{chunk-4VVKVOOP.js.map → chunk-UMYEY6BA.js.map} +0 -0
- /package/dist/{chunk-X5PLVOJS.js.map → chunk-W2RXRWDB.js.map} +0 -0
- /package/dist/{chunk-JV4P7BL4.js.map → chunk-WVCF7KFV.js.map} +0 -0
- /package/dist/{chunk-Z6KROWH4.js.map → chunk-ZQZHDYHQ.js.map} +0 -0
- /package/dist/{load-agent-defs-2H42B2OO.js.map → load-agent-defs-LDSND43G.js.map} +0 -0
- /package/dist/{recompile-project-agents-QIAMBCM4.js.map → recompile-project-agents-GQLODH24.js.map} +0 -0
- /package/dist/{source-loader-CC6ZWKTI.js.map → source-loader-TSF5VS6V.js.map} +0 -0
package/dist/chunk-NS5COBTT.js
DELETED
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
claimSlug,
|
|
4
|
-
computeFileHash,
|
|
5
|
-
glob,
|
|
6
|
-
injectForkedFromMetadata,
|
|
7
|
-
readFile,
|
|
8
|
-
readLocalSkillMetadata,
|
|
9
|
-
readSkillMetadata,
|
|
10
|
-
resolveInstallPaths,
|
|
11
|
-
seedExternalSkillSchema,
|
|
12
|
-
seedPayloadSchema,
|
|
13
|
-
validateSkillPath,
|
|
14
|
-
writeFile,
|
|
15
|
-
writeMetadataYaml
|
|
16
|
-
} from "./chunk-V625APR6.js";
|
|
17
|
-
import {
|
|
18
|
-
getCategoryDomain,
|
|
19
|
-
typedEntries
|
|
20
|
-
} from "./chunk-7Z4N4JWQ.js";
|
|
21
|
-
import {
|
|
22
|
-
GITHUB_SOURCE,
|
|
23
|
-
LOCAL_SKILLS_PATH,
|
|
24
|
-
STANDARD_FILES
|
|
25
|
-
} from "./chunk-5KB4I5J7.js";
|
|
26
|
-
|
|
27
|
-
// src/cli/lib/seed/external-skills.ts
|
|
28
|
-
import path from "path";
|
|
29
|
-
function pluginInstallError(ids) {
|
|
30
|
-
return [
|
|
31
|
-
"This configuration cannot be installed: these skills travel inside it, so no marketplace serves them and they cannot be installed as plugins:",
|
|
32
|
-
...ids.map((id) => ` ${id}`),
|
|
33
|
-
"Re-share it with each skill above set to eject, which is the only way a carried skill installs."
|
|
34
|
-
].join("\n");
|
|
35
|
-
}
|
|
36
|
-
function selectedExternals(payload) {
|
|
37
|
-
return typedEntries(payload.external ?? {}).flatMap(([id, skill]) => {
|
|
38
|
-
const entry = payload.skills[id];
|
|
39
|
-
return entry ? [{ id, skill, entry }] : [];
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
function askedForAsPlugin(externals) {
|
|
43
|
-
return externals.filter(({ entry }) => entry.install !== "eject").map(({ id }) => id);
|
|
44
|
-
}
|
|
45
|
-
function externalSlug(id) {
|
|
46
|
-
return id;
|
|
47
|
-
}
|
|
48
|
-
function skillAuthor(repo) {
|
|
49
|
-
const [owner = repo] = repo.split("/");
|
|
50
|
-
return `@${owner}`;
|
|
51
|
-
}
|
|
52
|
-
function repoRef(repo) {
|
|
53
|
-
return `${GITHUB_SOURCE.GITHUB_PREFIX}${repo}`;
|
|
54
|
-
}
|
|
55
|
-
function externalSkillDir(id, scope, projectDir) {
|
|
56
|
-
return path.join(resolveInstallPaths(projectDir, scope).skillsDir, id);
|
|
57
|
-
}
|
|
58
|
-
function externalCatalogueEntry(install) {
|
|
59
|
-
return {
|
|
60
|
-
id: install.id,
|
|
61
|
-
slug: externalSlug(install.id),
|
|
62
|
-
displayName: install.skill.displayName,
|
|
63
|
-
description: install.skill.description,
|
|
64
|
-
// Boundary cast held by the guard above it: the category was confirmed against the catalogue
|
|
65
|
-
// the payload names, and this one has just been shown to declare it too.
|
|
66
|
-
category: install.skill.categoryId,
|
|
67
|
-
author: skillAuthor(install.skill.repo),
|
|
68
|
-
path: `${LOCAL_SKILLS_PATH}/${install.id}/`,
|
|
69
|
-
conflictsWith: [],
|
|
70
|
-
requires: [],
|
|
71
|
-
alternatives: [],
|
|
72
|
-
discourages: [],
|
|
73
|
-
// Local and custom for the same reason: the bytes are on this machine and nowhere else, and
|
|
74
|
-
// the skill was authored outside the vocabulary this catalogue ships.
|
|
75
|
-
local: true,
|
|
76
|
-
custom: true,
|
|
77
|
-
localPath: install.skillDir
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
function seatExternalSkill({ id, skill, entry }, matrix, projectDir) {
|
|
81
|
-
const domain = getCategoryDomain(skill.categoryId);
|
|
82
|
-
if (domain === void 0) return [];
|
|
83
|
-
const install = {
|
|
84
|
-
id,
|
|
85
|
-
skill,
|
|
86
|
-
domain,
|
|
87
|
-
scope: entry.scope,
|
|
88
|
-
skillDir: externalSkillDir(id, entry.scope, projectDir)
|
|
89
|
-
};
|
|
90
|
-
matrix.skills[id] = externalCatalogueEntry(install);
|
|
91
|
-
claimSlug(matrix.slugMap, externalSlug(id), id);
|
|
92
|
-
return [install];
|
|
93
|
-
}
|
|
94
|
-
function registerExternalSkills(payload, matrix, projectDir) {
|
|
95
|
-
const externals = selectedExternals(payload);
|
|
96
|
-
const asPlugin = askedForAsPlugin(externals);
|
|
97
|
-
if (asPlugin.length > 0) throw new Error(pluginInstallError(asPlugin));
|
|
98
|
-
return externals.flatMap((external) => seatExternalSkill(external, matrix, projectDir));
|
|
99
|
-
}
|
|
100
|
-
async function writeExternalSkills(installs) {
|
|
101
|
-
for (const install of installs) {
|
|
102
|
-
await writeSkillTree(install);
|
|
103
|
-
await writeSkillManifest(install);
|
|
104
|
-
await registerSkillOnDisk(install);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
async function writeSkillTree(install) {
|
|
108
|
-
for (const [relativePath, contents] of Object.entries(install.skill.files)) {
|
|
109
|
-
const filePath = path.join(install.skillDir, relativePath);
|
|
110
|
-
validateSkillPath(filePath, install.skillDir, relativePath);
|
|
111
|
-
await writeFile(filePath, contents);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
var FRONTMATTER_BLOCK = /^---\r?\n([\s\S]*?)\r?\n---/;
|
|
115
|
-
var NAME_FIELD = /^name:.*$/m;
|
|
116
|
-
function withInstalledName(manifest, install) {
|
|
117
|
-
const named = `name: ${install.id}`;
|
|
118
|
-
const block = FRONTMATTER_BLOCK.exec(manifest);
|
|
119
|
-
if (!block) {
|
|
120
|
-
return `---
|
|
121
|
-
${named}
|
|
122
|
-
description: ${install.skill.description}
|
|
123
|
-
---
|
|
124
|
-
|
|
125
|
-
${manifest}`;
|
|
126
|
-
}
|
|
127
|
-
const [whole, fields = ""] = block;
|
|
128
|
-
const renamed = NAME_FIELD.test(fields) ? fields.replace(NAME_FIELD, named) : `${named}
|
|
129
|
-
${fields}`;
|
|
130
|
-
return `---
|
|
131
|
-
${renamed}
|
|
132
|
-
---${manifest.slice(whole.length)}`;
|
|
133
|
-
}
|
|
134
|
-
async function writeSkillManifest(install) {
|
|
135
|
-
const manifestPath = path.join(install.skillDir, STANDARD_FILES.SKILL_MD);
|
|
136
|
-
await writeFile(manifestPath, withInstalledName(await readFile(manifestPath), install));
|
|
137
|
-
}
|
|
138
|
-
function externalSkillMetadata(install, shipped) {
|
|
139
|
-
return {
|
|
140
|
-
author: skillAuthor(install.skill.repo),
|
|
141
|
-
usageGuidance: `Use when working with ${install.skill.displayName}`,
|
|
142
|
-
...shipped,
|
|
143
|
-
displayName: install.skill.displayName,
|
|
144
|
-
slug: install.id,
|
|
145
|
-
category: install.skill.categoryId,
|
|
146
|
-
domain: install.domain,
|
|
147
|
-
cliDescription: install.skill.description,
|
|
148
|
-
custom: true
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
async function registerSkillOnDisk(install) {
|
|
152
|
-
const metadataPath = path.join(install.skillDir, STANDARD_FILES.METADATA_YAML);
|
|
153
|
-
const shipped = await readLocalSkillMetadata(install.skillDir);
|
|
154
|
-
await writeMetadataYaml(metadataPath, externalSkillMetadata(install, shipped));
|
|
155
|
-
await injectForkedFromMetadata(
|
|
156
|
-
install.skillDir,
|
|
157
|
-
install.id,
|
|
158
|
-
await computeFileHash(path.join(install.skillDir, STANDARD_FILES.SKILL_MD)),
|
|
159
|
-
{ source: repoRef(install.skill.repo), path: install.skill.path }
|
|
160
|
-
);
|
|
161
|
-
}
|
|
162
|
-
function unnameableRepoMessage(id) {
|
|
163
|
-
return `${id} travels inside a shared configuration, and this installation does not record the repository its content came from`;
|
|
164
|
-
}
|
|
165
|
-
function uncarryableContentMessage(id, reason) {
|
|
166
|
-
return `${id} travels inside a shared configuration, and ${reason}`;
|
|
167
|
-
}
|
|
168
|
-
function repoFromRef(ref) {
|
|
169
|
-
if (ref === void 0 || !ref.startsWith(GITHUB_SOURCE.GITHUB_PREFIX)) return void 0;
|
|
170
|
-
return ref.slice(GITHUB_SOURCE.GITHUB_PREFIX.length);
|
|
171
|
-
}
|
|
172
|
-
async function readSkillTree(skillDir) {
|
|
173
|
-
const files = await glob("**/*", skillDir, { dot: true });
|
|
174
|
-
const entries = await Promise.all(
|
|
175
|
-
files.map(async (file) => [file, await readFile(path.join(skillDir, file))])
|
|
176
|
-
);
|
|
177
|
-
return Object.fromEntries(entries);
|
|
178
|
-
}
|
|
179
|
-
async function readCarriedSkill({ id, skillDir, provenance }) {
|
|
180
|
-
if (provenance.path === void 0) return { carries: "nothing" };
|
|
181
|
-
const repo = repoFromRef(provenance.source);
|
|
182
|
-
if (repo === void 0) return { carries: "unshareable", line: unnameableRepoMessage(id) };
|
|
183
|
-
const described = await readSkillMetadata(path.join(skillDir, STANDARD_FILES.METADATA_YAML));
|
|
184
|
-
if (!described.usable) {
|
|
185
|
-
return { carries: "unshareable", line: uncarryableContentMessage(id, described.reason) };
|
|
186
|
-
}
|
|
187
|
-
const parsed = seedExternalSkillSchema.safeParse({
|
|
188
|
-
displayName: described.metadata.displayName,
|
|
189
|
-
description: described.metadata.cliDescription,
|
|
190
|
-
categoryId: described.metadata.category,
|
|
191
|
-
repo,
|
|
192
|
-
path: provenance.path,
|
|
193
|
-
files: await readSkillTree(skillDir)
|
|
194
|
-
});
|
|
195
|
-
if (!parsed.success) {
|
|
196
|
-
const reason = parsed.error.issues.map((issue) => issue.message).join("; ");
|
|
197
|
-
return { carries: "unshareable", line: uncarryableContentMessage(id, reason) };
|
|
198
|
-
}
|
|
199
|
-
return { carries: "content", id, skill: parsed.data };
|
|
200
|
-
}
|
|
201
|
-
async function readCarriedSkills(owned) {
|
|
202
|
-
const reads = await Promise.all(owned.map(readCarriedSkill));
|
|
203
|
-
return {
|
|
204
|
-
external: Object.fromEntries(
|
|
205
|
-
reads.flatMap((read) => read.carries === "content" ? [[read.id, read.skill]] : [])
|
|
206
|
-
),
|
|
207
|
-
uncarryable: reads.flatMap((read) => read.carries === "unshareable" ? [read.line] : [])
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
// src/cli/lib/seed/fetch-seed.ts
|
|
212
|
-
var SEED_API_URL = process.env.AGENTS_INC_API_URL ?? "https://api.agentsinc.sh";
|
|
213
|
-
var SEED_USER_AGENT = "agents-inc-cli";
|
|
214
|
-
async function fetchSeedConfig(id) {
|
|
215
|
-
const url = `${SEED_API_URL}/configs/${encodeURIComponent(id)}`;
|
|
216
|
-
let response;
|
|
217
|
-
try {
|
|
218
|
-
response = await fetch(url, {
|
|
219
|
-
headers: { accept: "application/json", "user-agent": SEED_USER_AGENT }
|
|
220
|
-
});
|
|
221
|
-
} catch {
|
|
222
|
-
return { ok: false, error: `Could not reach ${SEED_API_URL} \u2014 check your connection.` };
|
|
223
|
-
}
|
|
224
|
-
if (response.status === 404) {
|
|
225
|
-
return { ok: false, error: `No configuration found for id '${id}'.` };
|
|
226
|
-
}
|
|
227
|
-
if (!response.ok) {
|
|
228
|
-
return { ok: false, error: `Fetching configuration failed (HTTP ${response.status}).` };
|
|
229
|
-
}
|
|
230
|
-
let body;
|
|
231
|
-
try {
|
|
232
|
-
body = await response.json();
|
|
233
|
-
} catch {
|
|
234
|
-
return { ok: false, error: "The configuration store returned something that is not JSON." };
|
|
235
|
-
}
|
|
236
|
-
const parsed = seedPayloadSchema.safeParse(body);
|
|
237
|
-
if (!parsed.success) {
|
|
238
|
-
return {
|
|
239
|
-
ok: false,
|
|
240
|
-
error: `Configuration '${id}' is not in a format this version of the CLI can install. Shared ids are never migrated \u2014 re-share the configuration to mint a current one, or update the CLI if that id came from a newer version.`
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
return { ok: true, payload: parsed.data };
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
export {
|
|
247
|
-
registerExternalSkills,
|
|
248
|
-
writeExternalSkills,
|
|
249
|
-
readCarriedSkills,
|
|
250
|
-
SEED_API_URL,
|
|
251
|
-
SEED_USER_AGENT,
|
|
252
|
-
fetchSeedConfig
|
|
253
|
-
};
|
|
254
|
-
//# sourceMappingURL=chunk-NS5COBTT.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/cli/lib/seed/external-skills.ts","../src/cli/lib/seed/fetch-seed.ts"],"sourcesContent":["import path from \"path\";\n\nimport { seedExternalSkillSchema } from \"@workspace/matrix/seed\";\n\nimport { GITHUB_SOURCE, LOCAL_SKILLS_PATH, STANDARD_FILES } from \"../../consts.js\";\nimport { resolveInstallPaths } from \"../installation/install-base-dir.js\";\nimport { readSkillMetadata } from \"../loading/loader.js\";\nimport { getCategoryDomain } from \"../matrix/matrix-provider.js\";\nimport { claimSlug } from \"../matrix/skill-resolution.js\";\nimport { validateSkillPath } from \"../skills/skill-copier.js\";\nimport {\n injectForkedFromMetadata,\n readLocalSkillMetadata,\n writeMetadataYaml,\n} from \"../skills/skill-metadata.js\";\nimport { computeFileHash } from \"../versioning.js\";\nimport { glob, readFile, writeFile } from \"../../utils/fs.js\";\nimport { typedEntries } from \"../../utils/typed-object.js\";\n\nimport type { SkillScope } from \"../../types/config.js\";\nimport type { Domain, MergedSkillsMatrix, ResolvedSkill } from \"../../types/matrix.js\";\nimport type { CategoryPath, SkillId, SkillSlug } from \"../../types/skills.js\";\nimport type { ForkedFromMetadata, LocalSkillMetadata } from \"../skills/skill-metadata.js\";\nimport type {\n SeedExternalSkill,\n SeedPayload,\n SeedSkill,\n SeedSkillTree,\n} from \"@workspace/matrix/seed\";\n\n/**\n * One skill the payload carries rather than names, seated and ready to be written.\n *\n * `skillDir` and `domain` are resolved once, where the checks that make them safe already are:\n * the directory has to be the one the catalogue entry points at, because that is what tells the\n * copy step this skill is already where it belongs, and the domain is what the category guard has\n * just proved this catalogue declares.\n */\nexport type ExternalSkillInstall = {\n id: SkillId;\n scope: SkillScope;\n skill: SeedExternalSkill;\n domain: Domain;\n skillDir: string;\n};\n\n/** One external entry with the skill row that selected it — what the payload says about it. */\ntype SelectedExternal = { id: SkillId; skill: SeedExternalSkill; entry: SeedSkill };\n\n/**\n * Names every carried skill a payload asks to install as a plugin, not just the first.\n *\n * There is nothing to install them FROM: the payload is the source, so no marketplace serves\n * these ids. Coercing them to eject would install something the payload did not ask for, under a\n * mode the sharer's own screen still shows as plugin — so the ids are named and the run stops.\n */\nfunction pluginInstallError(ids: SkillId[]): string {\n return [\n \"This configuration cannot be installed: these skills travel inside it, so no marketplace \" +\n \"serves them and they cannot be installed as plugins:\",\n ...ids.map((id) => ` ${id}`),\n \"Re-share it with each skill above set to eject, which is the only way a carried skill installs.\",\n ].join(\"\\n\");\n}\n\n/**\n * The external entries this selection actually names.\n *\n * Presence in `skills` is selection and `external` is only where the bytes are, so content nobody\n * picked installs nothing — seating it would put a skill in the catalogue no part of the\n * configuration asked for.\n */\nfunction selectedExternals(payload: SeedPayload): SelectedExternal[] {\n return typedEntries<SkillId, SeedExternalSkill>(payload.external ?? {}).flatMap(([id, skill]) => {\n const entry = payload.skills[id];\n return entry ? [{ id, skill, entry }] : [];\n });\n}\n\nfunction askedForAsPlugin(externals: SelectedExternal[]): SkillId[] {\n return externals.filter(({ entry }) => entry.install !== \"eject\").map(({ id }) => id);\n}\n\n/**\n * Boundary cast: a carried skill's id is minted at intake and belongs to no generated union,\n * which is exactly what makes it external. It is its own slug too — a skill outside every\n * catalogue has no shorter name anything else would recognise, and the sending side says the same.\n */\nfunction externalSlug(id: SkillId): SkillSlug {\n return id as SkillSlug;\n}\n\n/** The repository's owner as a handle, which is all the authorship a carried skill records. */\nfunction skillAuthor(repo: string): string {\n const [owner = repo] = repo.split(\"/\");\n return `@${owner}`;\n}\n\n/** The repository ref a carried skill's provenance records, in the form every other ref wears. */\nfunction repoRef(repo: string): string {\n return `${GITHUB_SOURCE.GITHUB_PREFIX}${repo}`;\n}\n\n/** Where a carried skill's directory goes: under the skills directory of the scope it names. */\nfunction externalSkillDir(id: SkillId, scope: SkillScope, projectDir: string): string {\n return path.join(resolveInstallPaths(projectDir, scope).skillsDir, id);\n}\n\n/**\n * The catalogue entry a carried skill becomes on arrival.\n *\n * It declares no relationships and is named by none, which is honest: nothing outside the\n * catalogue can say what this skill conflicts with, and nothing inside it knows the skill exists.\n */\nfunction externalCatalogueEntry(install: ExternalSkillInstall): ResolvedSkill {\n return {\n id: install.id,\n slug: externalSlug(install.id),\n displayName: install.skill.displayName,\n description: install.skill.description,\n // Boundary cast held by the guard above it: the category was confirmed against the catalogue\n // the payload names, and this one has just been shown to declare it too.\n category: install.skill.categoryId as CategoryPath,\n author: skillAuthor(install.skill.repo),\n path: `${LOCAL_SKILLS_PATH}/${install.id}/`,\n conflictsWith: [],\n requires: [],\n alternatives: [],\n discourages: [],\n // Local and custom for the same reason: the bytes are on this machine and nowhere else, and\n // the skill was authored outside the vocabulary this catalogue ships.\n local: true,\n custom: true,\n localPath: install.skillDir,\n };\n}\n\n/**\n * Seats one carried skill in the catalogue, or leaves it unseated.\n *\n * A skill is PLACED in the taxonomy and never extends it, so a category this catalogue has no\n * definition for belongs to no domain, renders in no tab and reaches no sub-agent. Left unseated,\n * the id falls to the decode's own skip, which reports it by name.\n */\nfunction seatExternalSkill(\n { id, skill, entry }: SelectedExternal,\n matrix: MergedSkillsMatrix,\n projectDir: string,\n): ExternalSkillInstall[] {\n const domain = getCategoryDomain(skill.categoryId);\n if (domain === undefined) return [];\n\n const install: ExternalSkillInstall = {\n id,\n skill,\n domain,\n scope: entry.scope,\n skillDir: externalSkillDir(id, entry.scope, projectDir),\n };\n\n matrix.skills[id] = externalCatalogueEntry(install);\n // Completes the map over the matrix: an entry the slug map does not carry is invisible to\n // anything that addresses a skill by slug.\n claimSlug(matrix.slugMap, externalSlug(id), id);\n\n return [install];\n}\n\n/**\n * Seats the catalogue entries a payload carries, and says where each one's bytes go.\n *\n * Every other id in a payload is resolved against a catalogue the receiver already has, so one it\n * does not know is skipped and reported. A carried skill answers to no catalogue at all — which is\n * why its whole directory travels — so it has to BECOME a catalogue entry before the decode reads\n * the selection, or it is skipped like any other unknown id and the configuration installs\n * quietly smaller than it was shared.\n *\n * The entries are written into `matrix` in place, exactly as the local-skill merge writes the\n * skills it discovers on disk. That matrix is the object `initializeMatrix` seated, which is what\n * {@link getCategoryDomain} reads — every caller passes the loaded source's own.\n *\n * @throws {Error} If any carried skill asks to be installed as a plugin — see\n * {@link pluginInstallError}.\n */\nexport function registerExternalSkills(\n payload: SeedPayload,\n matrix: MergedSkillsMatrix,\n projectDir: string,\n): ExternalSkillInstall[] {\n const externals = selectedExternals(payload);\n const asPlugin = askedForAsPlugin(externals);\n\n if (asPlugin.length > 0) throw new Error(pluginInstallError(asPlugin));\n\n return externals.flatMap((external) => seatExternalSkill(external, matrix, projectDir));\n}\n\n/**\n * Writes each carried skill's directory where its own entry said, and registers it on disk.\n *\n * Three things have to be true afterwards, and each is a separate act: the files are there, the\n * skill answers to the id the configuration recorded, and a metadata.yaml describes it well\n * enough for the next `edit`, `compile` or `list` to find it again. The seat above lasts one run;\n * this is what makes the install survive.\n */\nexport async function writeExternalSkills(installs: ExternalSkillInstall[]): Promise<void> {\n for (const install of installs) {\n await writeSkillTree(install);\n await writeSkillManifest(install);\n await registerSkillOnDisk(install);\n }\n}\n\n/**\n * The directory as the payload holds it, keys and all.\n *\n * The keys came off the wire, so a payload may ask for any path it likes — including one that\n * climbs out of the skill's own directory. They answer to the same guard a marketplace's own\n * paths do.\n */\nasync function writeSkillTree(install: ExternalSkillInstall): Promise<void> {\n for (const [relativePath, contents] of Object.entries(install.skill.files)) {\n const filePath = path.join(install.skillDir, relativePath);\n validateSkillPath(filePath, install.skillDir, relativePath);\n await writeFile(filePath, contents);\n }\n}\n\n/** The frontmatter block at the head of a SKILL.md, and the `name` field inside it. */\nconst FRONTMATTER_BLOCK = /^---\\r?\\n([\\s\\S]*?)\\r?\\n---/;\nconst NAME_FIELD = /^name:.*$/m;\n\n/**\n * Names the skill by the id it installs under.\n *\n * Every loader reads a skill's id off this one field, and a compiled sub-agent references the id\n * the configuration recorded — the one minted at intake, which is also this directory's name. The\n * repository the skill came from knew about neither, so left as it was written the two never\n * meet: the sub-agent names a skill Claude Code knows as something else, and the next load\n * registers an id no configuration carries.\n *\n * Only the name. Everything else in the block is the author's and travels untouched.\n */\nfunction withInstalledName(manifest: string, install: ExternalSkillInstall): string {\n const named = `name: ${install.id}`;\n const block = FRONTMATTER_BLOCK.exec(manifest);\n\n // A manifest with no frontmatter at all describes no skill to Claude Code either. The payload\n // carries both fields one needs, so it is given one rather than installed unreadable.\n if (!block) {\n return `---\\n${named}\\ndescription: ${install.skill.description}\\n---\\n\\n${manifest}`;\n }\n\n const [whole, fields = \"\"] = block;\n const renamed = NAME_FIELD.test(fields)\n ? fields.replace(NAME_FIELD, named)\n : `${named}\\n${fields}`;\n\n // The block is anchored at the head of the file, so what follows it is the rest verbatim.\n return `---\\n${renamed}\\n---${manifest.slice(whole.length)}`;\n}\n\nasync function writeSkillManifest(install: ExternalSkillInstall): Promise<void> {\n const manifestPath = path.join(install.skillDir, STANDARD_FILES.SKILL_MD);\n await writeFile(manifestPath, withInstalledName(await readFile(manifestPath), install));\n}\n\n/**\n * What the payload confirmed, over what the repository shipped, over what neither says.\n *\n * The order is the whole of it. The taxonomy is the placement the user chose against the\n * catalogue this configuration names, and the repository's own idea of where its skill belongs\n * answers to a taxonomy nobody here shares — so that is written over the file. Everything else\n * the repository wrote is kept, because its author knows more about their skill than a default\n * does.\n *\n * The defaults underneath exist because `doctor` validates every installed metadata.yaml, and a\n * file this command writes that that command reports as an error is the CLI disagreeing with\n * itself — in a file the user cannot fix, since the skill is somebody else's repository. Neither\n * is invented: the authorship is the repository's owner, and the usage line is the same words the\n * stack loader already writes for every skill reference it has nothing more specific for.\n */\nfunction externalSkillMetadata(\n install: ExternalSkillInstall,\n shipped: LocalSkillMetadata | null,\n): LocalSkillMetadata {\n return {\n author: skillAuthor(install.skill.repo),\n usageGuidance: `Use when working with ${install.skill.displayName}`,\n ...shipped,\n displayName: install.skill.displayName,\n slug: install.id,\n category: install.skill.categoryId,\n domain: install.domain,\n cliDescription: install.skill.description,\n custom: true,\n };\n}\n\n/**\n * Registers the skill on disk, where the next command will look for it.\n *\n * `forkedFrom` is stamped through the one writer that stamps it, because it is the package's\n * single answer to \"did the CLI put this directory here?\" — `uninstall` reads it to decide what it\n * may delete, and the producer reads it to decide what the round trip owns. A carried skill IS the\n * round trip's; a skill the user wrote by hand is not, and carries nothing.\n *\n * The repository AND the directory inside it, because this is the only record of where these bytes\n * came from. Sharing this installation has to rebuild the entry the payload carried, and a\n * repository alone cannot say which of its directories travelled — see {@link readCarriedSkills}.\n */\nasync function registerSkillOnDisk(install: ExternalSkillInstall): Promise<void> {\n const metadataPath = path.join(install.skillDir, STANDARD_FILES.METADATA_YAML);\n const shipped = await readLocalSkillMetadata(install.skillDir);\n\n await writeMetadataYaml(metadataPath, externalSkillMetadata(install, shipped));\n await injectForkedFromMetadata(\n install.skillDir,\n install.id,\n await computeFileHash(path.join(install.skillDir, STANDARD_FILES.SKILL_MD)),\n { source: repoRef(install.skill.repo), path: install.skill.path },\n );\n}\n\n/**\n * One installed skill directory the round trip owns, and what its install recorded about it.\n *\n * Read by the caller rather than here: whether a directory is the CLI's copy or the user's own\n * work is a question about ownership, which `installation-payload.ts` already asks of every entry\n * before anything else. This module answers only the next one — whether the bytes have to travel.\n */\nexport type OwnedSkillDir = { id: string; skillDir: string; provenance: ForkedFromMetadata };\n\n/**\n * What one installation carries rather than names.\n *\n * The same shape the mapper's other readings wear: what can travel, and the lines naming what\n * cannot. Both halves matter — a payload quietly missing content it could not read still mints an\n * id, and that id installs a configuration nobody chose.\n */\nexport type ContentReading = {\n /** Skill id -> the entry a receiver seats it from. Keyed exactly as the wire keys `external`. */\n external: Record<string, SeedExternalSkill>;\n /** One line per skill whose content this installation cannot carry, for the refusal. */\n uncarryable: string[];\n};\n\n/** What one owned directory turns out to carry: content, a reason it cannot, or nothing. */\ntype CarriedRead =\n | { carries: \"content\"; id: string; skill: SeedExternalSkill }\n | { carries: \"nothing\" }\n | { carries: \"unshareable\"; line: string };\n\nfunction unnameableRepoMessage(id: string): string {\n return `${id} travels inside a shared configuration, and this installation does not record the repository its content came from`;\n}\n\nfunction uncarryableContentMessage(id: string, reason: string): string {\n return `${id} travels inside a shared configuration, and ${reason}`;\n}\n\n/**\n * The inverse of {@link repoRef}: the repository a ref names, or nothing when it names none this\n * contract can state.\n *\n * Provenance is written as a ref because that is the form every other source in a configuration\n * wears; the wire wants GitHub's own `owner/name`. Any other ref is a repository this contract has\n * no word for, which is a refusal rather than something to guess at.\n */\nfunction repoFromRef(ref: string | undefined): string | undefined {\n if (ref === undefined || !ref.startsWith(GITHUB_SOURCE.GITHUB_PREFIX)) return undefined;\n return ref.slice(GITHUB_SOURCE.GITHUB_PREFIX.length);\n}\n\n/** Every file under the skill, keyed by its path relative to it — dotfiles and nesting included. */\nasync function readSkillTree(skillDir: string): Promise<SeedSkillTree> {\n const files = await glob(\"**/*\", skillDir, { dot: true });\n const entries = await Promise.all(\n files.map(async (file) => [file, await readFile(path.join(skillDir, file))] as const),\n );\n return Object.fromEntries(entries);\n}\n\n/**\n * Rebuilds the entry a carried skill arrived as, from the directory the install wrote.\n *\n * The bytes as they stand rather than as they arrived: the manifest was renamed to the id this\n * install recorded, and a user may have edited the skill since. Both are what is installed here,\n * and what is installed here is what a share carries.\n *\n * Validated against the contract's own schema rather than by rules restated here — that is what\n * makes the weight limit, the manifest requirement and every field's shape one definition rather\n * than two that can drift.\n */\nasync function readCarriedSkill({ id, skillDir, provenance }: OwnedSkillDir): Promise<CarriedRead> {\n // The directory is what marks a skill as one no catalogue can resolve. Without it there is a\n // catalogue behind this id, so the receiver installs it from there and the bytes stay home.\n if (provenance.path === undefined) return { carries: \"nothing\" };\n\n const repo = repoFromRef(provenance.source);\n if (repo === undefined) return { carries: \"unshareable\", line: unnameableRepoMessage(id) };\n\n const described = await readSkillMetadata(path.join(skillDir, STANDARD_FILES.METADATA_YAML));\n if (!described.usable) {\n return { carries: \"unshareable\", line: uncarryableContentMessage(id, described.reason) };\n }\n\n const parsed = seedExternalSkillSchema.safeParse({\n displayName: described.metadata.displayName,\n description: described.metadata.cliDescription,\n categoryId: described.metadata.category,\n repo,\n path: provenance.path,\n files: await readSkillTree(skillDir),\n });\n if (!parsed.success) {\n const reason = parsed.error.issues.map((issue) => issue.message).join(\"; \");\n return { carries: \"unshareable\", line: uncarryableContentMessage(id, reason) };\n }\n\n return { carries: \"content\", id, skill: parsed.data };\n}\n\n/**\n * What a set of owned skill directories carries, and what it cannot.\n *\n * The mirror of {@link registerExternalSkills}: that seats an entry a payload carried and writes\n * its bytes, this reads those bytes back into the entry a payload carries. Every other id in a\n * configuration is resolved by the receiver against a catalogue it already has, so its content has\n * nothing to add; an added skill answers to no catalogue in either direction, and a share that\n * named it without carrying it would mint an id that installs a configuration missing it.\n */\nexport async function readCarriedSkills(owned: OwnedSkillDir[]): Promise<ContentReading> {\n const reads = await Promise.all(owned.map(readCarriedSkill));\n\n return {\n external: Object.fromEntries(\n reads.flatMap((read) => (read.carries === \"content\" ? [[read.id, read.skill]] : [])),\n ),\n uncarryable: reads.flatMap((read) => (read.carries === \"unshareable\" ? [read.line] : [])),\n };\n}\n","import { seedPayloadSchema, type SeedPayload } from \"@workspace/matrix/seed\";\n\n/** The config store behind agentsinc.sh. Overridable so tests never touch the network. */\nexport const SEED_API_URL = process.env.AGENTS_INC_API_URL ?? \"https://api.agentsinc.sh\";\n\n/**\n * Identifies this fetch as the CLI rather than a browser.\n *\n * `GET /configs/:id` is the only place either side can observe a config being *installed* rather\n * than merely built, and the worker can only separate that from someone opening a share link if\n * we say so. Without this the conversion signal does not exist.\n */\nexport const SEED_USER_AGENT = \"agents-inc-cli\";\n\nexport type FetchSeedResult = { ok: true; payload: SeedPayload } | { ok: false; error: string };\n\n/**\n * Fetches and validates a shared configuration.\n *\n * Every failure is a message rather than a throw: this runs before anything has been written, so\n * there is nothing to roll back and the caller's job is to explain rather than recover.\n */\nexport async function fetchSeedConfig(id: string): Promise<FetchSeedResult> {\n const url = `${SEED_API_URL}/configs/${encodeURIComponent(id)}`;\n\n let response: Response;\n try {\n response = await fetch(url, {\n headers: { accept: \"application/json\", \"user-agent\": SEED_USER_AGENT },\n });\n } catch {\n return { ok: false, error: `Could not reach ${SEED_API_URL} — check your connection.` };\n }\n\n if (response.status === 404) {\n return { ok: false, error: `No configuration found for id '${id}'.` };\n }\n if (!response.ok) {\n return { ok: false, error: `Fetching configuration failed (HTTP ${response.status}).` };\n }\n\n let body: unknown;\n try {\n body = await response.json();\n } catch {\n return { ok: false, error: \"The configuration store returned something that is not JSON.\" };\n }\n\n const parsed = seedPayloadSchema.safeParse(body);\n if (!parsed.success) {\n // Names the remedy rather than a cause it cannot observe. The payload was validated by the\n // store on the way IN, so a stored payload that no longer parses means the contract moved\n // underneath it — and every way that happens lands in this one `safeParse`: an id minted\n // before a version bump, an id minted after one, and a body that is simply broken. The CLI\n // cannot tell them apart, and the one thing true of all three is that re-sharing fixes it,\n // because the store content-addresses an id and a fresh share mints one under this version.\n return {\n ok: false,\n error: `Configuration '${id}' is not in a format this version of the CLI can install. Shared ids are never migrated — re-share the configuration to mint a current one, or update the CLI if that id came from a newer version.`,\n };\n }\n\n return { ok: true, payload: parsed.data };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,UAAU;AAwDjB,SAAS,mBAAmB,KAAwB;AAClD,SAAO;AAAA,IACL;AAAA,IAEA,GAAG,IAAI,IAAI,CAAC,OAAO,KAAK,EAAE,EAAE;AAAA,IAC5B;AAAA,EACF,EAAE,KAAK,IAAI;AACb;AASA,SAAS,kBAAkB,SAA0C;AACnE,SA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