opencastle 1.1.1 → 1.2.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/README.md +22 -5
- package/bin/cli.mjs +6 -0
- package/dist/cli/adapters/single-file-base.d.ts.map +1 -1
- package/dist/cli/adapters/single-file-base.js +24 -2
- package/dist/cli/adapters/single-file-base.js.map +1 -1
- package/dist/cli/agent-plugin.d.ts +119 -0
- package/dist/cli/agent-plugin.d.ts.map +1 -0
- package/dist/cli/agent-plugin.js +449 -0
- package/dist/cli/agent-plugin.js.map +1 -0
- package/dist/cli/agent-plugin.test.d.ts +2 -0
- package/dist/cli/agent-plugin.test.d.ts.map +1 -0
- package/dist/cli/agent-plugin.test.js +227 -0
- package/dist/cli/agent-plugin.test.js.map +1 -0
- package/dist/cli/baseline.d.ts.map +1 -1
- package/dist/cli/baseline.js +99 -26
- package/dist/cli/baseline.js.map +1 -1
- package/dist/cli/convoy/gates.d.ts +2 -20
- package/dist/cli/convoy/gates.d.ts.map +1 -1
- package/dist/cli/convoy/gates.js +3 -111
- package/dist/cli/convoy/gates.js.map +1 -1
- package/dist/cli/copy.d.ts +0 -8
- package/dist/cli/copy.d.ts.map +1 -1
- package/dist/cli/copy.js +0 -21
- package/dist/cli/copy.js.map +1 -1
- package/dist/cli/dispatcher.test.js +2 -2
- package/dist/cli/dispatcher.test.js.map +1 -1
- package/dist/cli/docs-accuracy.test.js +2 -0
- package/dist/cli/docs-accuracy.test.js.map +1 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +2 -0
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/init.test.js +36 -24
- package/dist/cli/init.test.js.map +1 -1
- package/dist/cli/layers.d.ts +8 -0
- package/dist/cli/layers.d.ts.map +1 -1
- package/dist/cli/layers.js +130 -13
- package/dist/cli/layers.js.map +1 -1
- package/dist/cli/layers.test.js +2 -2
- package/dist/cli/layers.test.js.map +1 -1
- package/dist/cli/legacy-install.test.js +8 -1
- package/dist/cli/legacy-install.test.js.map +1 -1
- package/dist/cli/lesson-command.test.d.ts +2 -0
- package/dist/cli/lesson-command.test.d.ts.map +1 -0
- package/dist/cli/lesson-command.test.js +100 -0
- package/dist/cli/lesson-command.test.js.map +1 -0
- package/dist/cli/lesson.d.ts +0 -9
- package/dist/cli/lesson.d.ts.map +1 -1
- package/dist/cli/lesson.js +212 -276
- package/dist/cli/lesson.js.map +1 -1
- package/dist/cli/lessons.d.ts +134 -0
- package/dist/cli/lessons.d.ts.map +1 -0
- package/dist/cli/lessons.js +493 -0
- package/dist/cli/lessons.js.map +1 -0
- package/dist/cli/lessons.test.d.ts +2 -0
- package/dist/cli/lessons.test.d.ts.map +1 -0
- package/dist/cli/lessons.test.js +214 -0
- package/dist/cli/lessons.test.js.map +1 -0
- package/dist/cli/pack-plugins.d.ts +8 -0
- package/dist/cli/pack-plugins.d.ts.map +1 -0
- package/dist/cli/pack-plugins.js +70 -0
- package/dist/cli/pack-plugins.js.map +1 -0
- package/dist/cli/plugin-command.test.d.ts +2 -0
- package/dist/cli/plugin-command.test.d.ts.map +1 -0
- package/dist/cli/plugin-command.test.js +114 -0
- package/dist/cli/plugin-command.test.js.map +1 -0
- package/dist/cli/plugin.d.ts +30 -0
- package/dist/cli/plugin.d.ts.map +1 -0
- package/dist/cli/plugin.js +291 -0
- package/dist/cli/plugin.js.map +1 -0
- package/dist/cli/promote-command.test.d.ts +2 -0
- package/dist/cli/promote-command.test.d.ts.map +1 -0
- package/dist/cli/promote-command.test.js +151 -0
- package/dist/cli/promote-command.test.js.map +1 -0
- package/dist/cli/promote.d.ts +12 -0
- package/dist/cli/promote.d.ts.map +1 -0
- package/dist/cli/promote.js +364 -0
- package/dist/cli/promote.js.map +1 -0
- package/dist/cli/secret-scan.d.ts +21 -0
- package/dist/cli/secret-scan.d.ts.map +1 -0
- package/dist/cli/secret-scan.js +114 -0
- package/dist/cli/secret-scan.js.map +1 -0
- package/dist/cli/sync-check.d.ts.map +1 -1
- package/dist/cli/sync-check.js +9 -0
- package/dist/cli/sync-check.js.map +1 -1
- package/dist/cli/team-commands.test.js +2 -2
- package/dist/cli/team-commands.test.js.map +1 -1
- package/dist/cli/update.d.ts.map +1 -1
- package/dist/cli/update.js +18 -0
- package/dist/cli/update.js.map +1 -1
- package/dist/orchestrator/plugins/agent-plugins.test.d.ts +2 -0
- package/dist/orchestrator/plugins/agent-plugins.test.d.ts.map +1 -0
- package/dist/orchestrator/plugins/agent-plugins.test.js +32 -0
- package/dist/orchestrator/plugins/agent-plugins.test.js.map +1 -0
- package/package.json +2 -1
- package/src/cli/adapters/single-file-base.ts +23 -2
- package/src/cli/agent-plugin.test.ts +267 -0
- package/src/cli/agent-plugin.ts +469 -0
- package/src/cli/baseline.ts +99 -26
- package/src/cli/convoy/gates.ts +9 -142
- package/src/cli/copy.ts +0 -25
- package/src/cli/dispatcher.test.ts +2 -2
- package/src/cli/docs-accuracy.test.ts +2 -0
- package/src/cli/doctor.ts +2 -0
- package/src/cli/fixtures/lessons-template-1.0.md +70 -0
- package/src/cli/init.test.ts +37 -24
- package/src/cli/layers.test.ts +2 -2
- package/src/cli/layers.ts +144 -14
- package/src/cli/legacy-install.test.ts +11 -1
- package/src/cli/lesson-command.test.ts +117 -0
- package/src/cli/lesson.ts +215 -266
- package/src/cli/lessons.test.ts +254 -0
- package/src/cli/lessons.ts +540 -0
- package/src/cli/pack-plugins.ts +70 -0
- package/src/cli/plugin-command.test.ts +125 -0
- package/src/cli/plugin.ts +309 -0
- package/src/cli/promote-command.test.ts +170 -0
- package/src/cli/promote.ts +371 -0
- package/src/cli/secret-scan.ts +154 -0
- package/src/cli/sync-check.ts +9 -0
- package/src/cli/team-commands.test.ts +2 -2
- package/src/cli/update.ts +20 -0
- package/src/dashboard/node_modules/.vite/deps/_metadata.json +6 -6
- package/src/orchestrator/agents/researcher.agent.md +1 -1
- package/src/orchestrator/customizations/LESSONS-LEARNED.md +10 -66
- package/src/orchestrator/customizations/README.md +2 -1
- package/src/orchestrator/customizations/logs/README.md +1 -1
- package/src/orchestrator/plugins/agent-plugins.test.ts +34 -0
- package/src/orchestrator/plugins/astro/mcp.json +9 -0
- package/src/orchestrator/plugins/astro/plugin.json +21 -0
- package/src/orchestrator/plugins/chrome-devtools/mcp.json +13 -0
- package/src/orchestrator/plugins/chrome-devtools/plugin.json +21 -0
- package/src/orchestrator/plugins/cloudflare/mcp.json +9 -0
- package/src/orchestrator/plugins/cloudflare/plugin.json +21 -0
- package/src/orchestrator/plugins/contentful/mcp.json +13 -0
- package/src/orchestrator/plugins/contentful/plugin.json +21 -0
- package/src/orchestrator/plugins/convex/mcp.json +15 -0
- package/src/orchestrator/plugins/convex/plugin.json +21 -0
- package/src/orchestrator/plugins/coolify/mcp.json +13 -0
- package/src/orchestrator/plugins/coolify/plugin.json +25 -0
- package/src/orchestrator/plugins/cypress/plugin.json +21 -0
- package/src/orchestrator/plugins/drizzle/plugin.json +21 -0
- package/src/orchestrator/plugins/expo/mcp.json +9 -0
- package/src/orchestrator/plugins/expo/plugin.json +21 -0
- package/src/orchestrator/plugins/figma/mcp.json +9 -0
- package/src/orchestrator/plugins/figma/plugin.json +21 -0
- package/src/orchestrator/plugins/hetzner/plugin.json +24 -0
- package/src/orchestrator/plugins/jira/mcp.json +9 -0
- package/src/orchestrator/plugins/jira/plugin.json +21 -0
- package/src/orchestrator/plugins/linear/mcp.json +9 -0
- package/src/orchestrator/plugins/linear/plugin.json +21 -0
- package/src/orchestrator/plugins/netlify/mcp.json +13 -0
- package/src/orchestrator/plugins/netlify/plugin.json +21 -0
- package/src/orchestrator/plugins/nextjs/mcp.json +13 -0
- package/src/orchestrator/plugins/nextjs/plugin.json +21 -0
- package/src/orchestrator/plugins/notion/mcp.json +9 -0
- package/src/orchestrator/plugins/notion/plugin.json +21 -0
- package/src/orchestrator/plugins/nx/mcp.json +14 -0
- package/src/orchestrator/plugins/nx/plugin.json +21 -0
- package/src/orchestrator/plugins/playwright/mcp.json +13 -0
- package/src/orchestrator/plugins/playwright/plugin.json +21 -0
- package/src/orchestrator/plugins/prisma/mcp.json +14 -0
- package/src/orchestrator/plugins/prisma/plugin.json +21 -0
- package/src/orchestrator/plugins/resend/mcp.json +13 -0
- package/src/orchestrator/plugins/resend/plugin.json +24 -0
- package/src/orchestrator/plugins/sanity/mcp.json +9 -0
- package/src/orchestrator/plugins/sanity/plugin.json +21 -0
- package/src/orchestrator/plugins/sentry/mcp.json +12 -0
- package/src/orchestrator/plugins/sentry/plugin.json +24 -0
- package/src/orchestrator/plugins/slack/mcp.json +13 -0
- package/src/orchestrator/plugins/slack/plugin.json +24 -0
- package/src/orchestrator/plugins/strapi/mcp.json +13 -0
- package/src/orchestrator/plugins/strapi/plugin.json +21 -0
- package/src/orchestrator/plugins/stripe/mcp.json +9 -0
- package/src/orchestrator/plugins/stripe/plugin.json +21 -0
- package/src/orchestrator/plugins/supabase/mcp.json +9 -0
- package/src/orchestrator/plugins/supabase/plugin.json +21 -0
- package/src/orchestrator/plugins/teams/plugin.json +24 -0
- package/src/orchestrator/plugins/trello/mcp.json +13 -0
- package/src/orchestrator/plugins/trello/plugin.json +25 -0
- package/src/orchestrator/plugins/turborepo/plugin.json +21 -0
- package/src/orchestrator/plugins/vercel/mcp.json +9 -0
- package/src/orchestrator/plugins/vercel/plugin.json +21 -0
- package/src/orchestrator/plugins/vitest/plugin.json +21 -0
- package/src/orchestrator/skill-config-links.test.ts +2 -1
- package/src/orchestrator/skills/agent-hooks/HOOKS-REFERENCE.md +1 -1
- package/src/orchestrator/skills/agent-hooks/SKILL.md +1 -1
- package/src/orchestrator/skills/decomposition/SKILL.md +1 -1
- package/src/orchestrator/skills/memory-merger/SKILL.md +17 -21
- package/src/orchestrator/skills/self-improvement/LESSON-CATEGORIES.md +44 -23
- package/src/orchestrator/skills/self-improvement/SKILL.md +30 -15
- /package/src/orchestrator/plugins/astro/{SKILL.md → skills/astro-framework/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/chrome-devtools/{SKILL.md → skills/browser-testing/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/cloudflare/{SKILL.md → skills/cloudflare-platform/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/contentful/{SKILL.md → skills/contentful-cms/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/convex/{SKILL.md → skills/convex-database/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/coolify/{SKILL.md → skills/coolify-deployment/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/cypress/{SKILL.md → skills/cypress-testing/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/drizzle/{SKILL.md → skills/drizzle-orm/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/expo/{SKILL.md → skills/expo-development/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/figma/{SKILL.md → skills/figma-design/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/hetzner/{SKILL.md → skills/hetzner-cloud/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/jira/{SKILL.md → skills/jira-management/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/linear/{SKILL.md → skills/linear-task-management/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/netlify/{SKILL.md → skills/netlify-deployment/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/nextjs/{SKILL.md → skills/nextjs-framework/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/notion/{SKILL.md → skills/notion-knowledge-management/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/nx/{SKILL.md → skills/nx-workspace/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/playwright/{SKILL.md → skills/playwright-testing/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/prisma/{SKILL.md → skills/prisma-database/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/resend/{SKILL.md → skills/resend-email/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/sanity/{SKILL.md → skills/sanity-cms/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/sentry/{SKILL.md → skills/sentry-monitoring/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/slack/{SKILL.md → skills/slack-notifications/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/strapi/{SKILL.md → skills/strapi-cms/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/stripe/{SKILL.md → skills/stripe-payments/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/supabase/{SKILL.md → skills/supabase-database/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/teams/{SKILL.md → skills/teams-notifications/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/trello/{SKILL.md → skills/trello-task-management/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/turborepo/{SKILL.md → skills/turborepo-monorepo/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/vercel/{SKILL.md → skills/vercel-deployment/SKILL.md} +0 -0
- /package/src/orchestrator/plugins/vitest/{SKILL.md → skills/vitest-testing/SKILL.md} +0 -0
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
import { existsSync, readFileSync, readdirSync, realpathSync, statSync } from 'node:fs';
|
|
2
|
+
import { basename, join, relative, sep } from 'node:path';
|
|
3
|
+
import { parse as parseYaml } from 'yaml';
|
|
4
|
+
/**
|
|
5
|
+
* Agent Plugins: the portable package format for agent extensions.
|
|
6
|
+
*
|
|
7
|
+
* Agent Plugins 1.0 (agent-plugins.org, under the Agentic AI Foundation) is a
|
|
8
|
+
* directory with a closed `plugin.json` manifest at its root, Agent Skills in
|
|
9
|
+
* `skills/<name>/SKILL.md`, and MCP servers in `mcp.json`. GitHub Copilot, VS
|
|
10
|
+
* Code, Cursor, Codex and Kiro load it as it is. Anything a client adds lives
|
|
11
|
+
* under a reverse-domain namespace — OpenCastle's is `dev.opencastle`, a
|
|
12
|
+
* directory beside `skills/` holding what the standard does not cover yet:
|
|
13
|
+
* instructions, agents, prompts, workflows and the team's policy.
|
|
14
|
+
*
|
|
15
|
+
* That makes an OpenCastle baseline and an Agent Plugin the same thing. A team
|
|
16
|
+
* publishes one package; assistants that read Agent Plugins install it
|
|
17
|
+
* natively, and OpenCastle compiles all of it — the parts the standard covers
|
|
18
|
+
* and the parts it does not — into every assistant, including the ones that do
|
|
19
|
+
* not read Agent Plugins at all.
|
|
20
|
+
*
|
|
21
|
+
* This module reads and checks one, against the published 1.0.0 text; the
|
|
22
|
+
* schemas are the spec's, written as code because a client must not fetch a
|
|
23
|
+
* schema while loading a plugin.
|
|
24
|
+
*/
|
|
25
|
+
export const AGENT_PLUGINS_VERSION = '1.0.0';
|
|
26
|
+
/** Versions whose rules this reads. 1.1.0 is a working draft that changes nothing but the number. */
|
|
27
|
+
const KNOWN_VERSIONS = ['1.0.0', '1.1.0'];
|
|
28
|
+
export const pluginSchemaUrl = (v = AGENT_PLUGINS_VERSION) => `https://agent-plugins.org/schemas/${v}/plugin.schema.json`;
|
|
29
|
+
export const mcpSchemaUrl = (v = AGENT_PLUGINS_VERSION) => `https://agent-plugins.org/schemas/${v}/mcp.schema.json`;
|
|
30
|
+
/** OpenCastle's extension namespace: the `extensions` key and the directory. */
|
|
31
|
+
export const EXTENSION_NAMESPACE = 'dev.opencastle';
|
|
32
|
+
const MANIFEST_FIELDS = ['$schema', 'name', 'version', 'description', 'author', 'homepage', 'repository', 'license', 'keywords', 'extensions'];
|
|
33
|
+
export const PLUGIN_NAME = /^(?!.*(?:--|\.\.))[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$/;
|
|
34
|
+
function isObject(v) {
|
|
35
|
+
return Boolean(v) && typeof v === 'object' && !Array.isArray(v);
|
|
36
|
+
}
|
|
37
|
+
function isStringMap(v) {
|
|
38
|
+
return isObject(v) && Object.values(v).every((x) => typeof x === 'string');
|
|
39
|
+
}
|
|
40
|
+
/** The version a `$schema` names, or null when it is not one this reads. */
|
|
41
|
+
function versionOf(schema, kind) {
|
|
42
|
+
if (typeof schema !== 'string')
|
|
43
|
+
return null;
|
|
44
|
+
const m = new RegExp(`^https://agent-plugins\\.org/schemas/(\\d+\\.\\d+\\.\\d+)/${kind}\\.schema\\.json$`).exec(schema);
|
|
45
|
+
return m && KNOWN_VERSIONS.includes(m[1]) ? m[1] : null;
|
|
46
|
+
}
|
|
47
|
+
function readJson(path) {
|
|
48
|
+
try {
|
|
49
|
+
return { value: JSON.parse(readFileSync(path, 'utf8')) };
|
|
50
|
+
}
|
|
51
|
+
catch (err) {
|
|
52
|
+
return { error: err.message };
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/** Whether `abs`, links followed, is inside `root`. */
|
|
56
|
+
function inside(root, abs) {
|
|
57
|
+
try {
|
|
58
|
+
const rel = relative(realpathSync(root), realpathSync(abs));
|
|
59
|
+
return rel === '' || (!rel.startsWith('..') && !rel.startsWith(sep) && !/^[A-Za-z]:/.test(rel));
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/** True when `dir` holds a `plugin.json` that declares an Agent Plugins version this reads. */
|
|
66
|
+
export function isAgentPlugin(dir) {
|
|
67
|
+
const file = join(dir, 'plugin.json');
|
|
68
|
+
if (!existsSync(file))
|
|
69
|
+
return false;
|
|
70
|
+
const { value } = readJson(file);
|
|
71
|
+
return isObject(value) && versionOf(value.$schema, 'plugin') !== null;
|
|
72
|
+
}
|
|
73
|
+
// ── Agent Skills ─────────────────────────────────────────────
|
|
74
|
+
const SKILL_FIELDS = new Set(['name', 'description', 'license', 'compatibility', 'metadata', 'allowed-tools']);
|
|
75
|
+
/** Fields assistants add that the spec does not define — said once, not as a fault. */
|
|
76
|
+
const CLIENT_SKILL_FIELDS = new Set([
|
|
77
|
+
'argument-hint',
|
|
78
|
+
'user-invocable',
|
|
79
|
+
'disable-model-invocation',
|
|
80
|
+
'model',
|
|
81
|
+
'context',
|
|
82
|
+
'agent',
|
|
83
|
+
'hooks',
|
|
84
|
+
'version',
|
|
85
|
+
]);
|
|
86
|
+
export const SKILL_NAME = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
87
|
+
/**
|
|
88
|
+
* One skill directory against the Agent Skills specification
|
|
89
|
+
* (agentskills.io/specification). A client that follows it skips a skill
|
|
90
|
+
* whose name does not match its directory, so that is an error, not style.
|
|
91
|
+
*/
|
|
92
|
+
export function checkSkill(dir) {
|
|
93
|
+
const where = `skills/${basename(dir)}/SKILL.md`;
|
|
94
|
+
const errors = [];
|
|
95
|
+
const warnings = [];
|
|
96
|
+
let text;
|
|
97
|
+
try {
|
|
98
|
+
text = readFileSync(join(dir, 'SKILL.md'), 'utf8').replace(/^\uFEFF/, '');
|
|
99
|
+
}
|
|
100
|
+
catch (err) {
|
|
101
|
+
return { errors: [`${where}: cannot be read — ${err.message}`], warnings };
|
|
102
|
+
}
|
|
103
|
+
const m = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)([\s\S]*)$/.exec(text);
|
|
104
|
+
if (!m)
|
|
105
|
+
return { errors: [`${where}: has no YAML frontmatter, so it has no name or description`], warnings };
|
|
106
|
+
let meta;
|
|
107
|
+
try {
|
|
108
|
+
meta = (parseYaml(m[1]) ?? {});
|
|
109
|
+
}
|
|
110
|
+
catch (err) {
|
|
111
|
+
return { errors: [`${where}: its frontmatter is not valid YAML — ${err.message}`], warnings };
|
|
112
|
+
}
|
|
113
|
+
const name = meta.name;
|
|
114
|
+
if (typeof name !== 'string' || name.length === 0) {
|
|
115
|
+
errors.push(`${where}: has no name`);
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
if (name.length > 64 || !SKILL_NAME.test(name)) {
|
|
119
|
+
errors.push(`${where}: name "${name}" must be 1–64 lowercase letters, digits and single hyphens, not starting or ending with one`);
|
|
120
|
+
}
|
|
121
|
+
if (name !== basename(dir)) {
|
|
122
|
+
errors.push(`${where}: name "${name}" must match its directory, ${basename(dir)}/ — assistants that follow the spec skip it otherwise`);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
const description = meta.description;
|
|
126
|
+
if (typeof description !== 'string' || description.trim().length === 0) {
|
|
127
|
+
errors.push(`${where}: has no description, so no assistant can tell when to load it`);
|
|
128
|
+
}
|
|
129
|
+
else if (description.length > 1024) {
|
|
130
|
+
errors.push(`${where}: description is ${description.length} characters; the limit is 1024`);
|
|
131
|
+
}
|
|
132
|
+
if (meta.compatibility !== undefined && (typeof meta.compatibility !== 'string' || meta.compatibility.length > 500)) {
|
|
133
|
+
errors.push(`${where}: compatibility must be a string of at most 500 characters`);
|
|
134
|
+
}
|
|
135
|
+
if (meta.metadata !== undefined && !isStringMap(meta.metadata)) {
|
|
136
|
+
errors.push(`${where}: metadata must map strings to strings`);
|
|
137
|
+
}
|
|
138
|
+
const unknown = Object.keys(meta).filter((k) => !SKILL_FIELDS.has(k) && !CLIENT_SKILL_FIELDS.has(k));
|
|
139
|
+
if (unknown.length > 0) {
|
|
140
|
+
warnings.push(`${where}: ${unknown.join(', ')} ${unknown.length === 1 ? 'is not an Agent Skills field' : 'are not Agent Skills fields'}; other assistants ignore ${unknown.length === 1 ? 'it' : 'them'}`);
|
|
141
|
+
}
|
|
142
|
+
const lines = m[2].split('\n').length;
|
|
143
|
+
if (lines > 500)
|
|
144
|
+
warnings.push(`${where}: ${lines} lines; the spec recommends under 500, with detail in files the skill links to`);
|
|
145
|
+
return { name: typeof name === 'string' ? name : undefined, errors, warnings };
|
|
146
|
+
}
|
|
147
|
+
// ── MCP servers ──────────────────────────────────────────────
|
|
148
|
+
const LOOPBACK = /^(localhost|127(?:\.\d{1,3}){3}|\[::1\])$/i;
|
|
149
|
+
/** Why one `mcp.json` server entry is invalid, or null. */
|
|
150
|
+
export function serverProblem(key, raw) {
|
|
151
|
+
if (!isObject(raw))
|
|
152
|
+
return `server "${key}" is not an object`;
|
|
153
|
+
const allowed = (fields) => {
|
|
154
|
+
const extra = Object.keys(raw).filter((k) => !fields.includes(k));
|
|
155
|
+
return extra.length > 0 ? `server "${key}" has ${extra.join(', ')}, which a ${String(raw.type)} server cannot have` : null;
|
|
156
|
+
};
|
|
157
|
+
if (raw.type === 'stdio') {
|
|
158
|
+
const bad = allowed(['type', 'command', 'args', 'env', 'cwd']);
|
|
159
|
+
if (bad)
|
|
160
|
+
return bad;
|
|
161
|
+
if (typeof raw.command !== 'string' || raw.command.length === 0)
|
|
162
|
+
return `server "${key}" has no command`;
|
|
163
|
+
if (/\s/.test(raw.command))
|
|
164
|
+
return `server "${key}": command must be one executable, with its arguments in "args" — not "${raw.command}"`;
|
|
165
|
+
if (raw.command.includes('${'))
|
|
166
|
+
return `server "${key}": command is not expanded, so it cannot use \${PLUGIN_ROOT}; write ./path/inside/the/plugin`;
|
|
167
|
+
if ((raw.command.includes('/') || raw.command.includes('\\')) && !raw.command.startsWith('./')) {
|
|
168
|
+
return `server "${key}": a command inside the plugin must start with ./, and one on PATH must be a bare name`;
|
|
169
|
+
}
|
|
170
|
+
if (raw.command.startsWith('./') && raw.command.split('/').includes('..'))
|
|
171
|
+
return `server "${key}": command leaves the plugin`;
|
|
172
|
+
if (raw.args !== undefined && !(Array.isArray(raw.args) && raw.args.every((a) => typeof a === 'string'))) {
|
|
173
|
+
return `server "${key}": args must be a list of strings`;
|
|
174
|
+
}
|
|
175
|
+
if (raw.env !== undefined) {
|
|
176
|
+
if (!isStringMap(raw.env))
|
|
177
|
+
return `server "${key}": env must map names to strings`;
|
|
178
|
+
const reserved = Object.keys(raw.env).find((n) => n === 'PLUGIN_ROOT' || n === 'PLUGIN_DATA');
|
|
179
|
+
if (reserved)
|
|
180
|
+
return `server "${key}": env cannot set ${reserved}; the client provides it`;
|
|
181
|
+
}
|
|
182
|
+
if (raw.cwd !== undefined) {
|
|
183
|
+
if (typeof raw.cwd !== 'string' || !/^(?:\.\/|\$\{PLUGIN_ROOT\}(?:\/|$)|\$\{PLUGIN_DATA\}(?:\/|$))/.test(raw.cwd)) {
|
|
184
|
+
return `server "${key}": cwd must start with ./, \${PLUGIN_ROOT} or \${PLUGIN_DATA}`;
|
|
185
|
+
}
|
|
186
|
+
if (raw.cwd.split('/').includes('..'))
|
|
187
|
+
return `server "${key}": cwd leaves the plugin`;
|
|
188
|
+
}
|
|
189
|
+
return null;
|
|
190
|
+
}
|
|
191
|
+
if (raw.type === 'streamable-http' || raw.type === 'sse') {
|
|
192
|
+
const bad = allowed(['type', 'url', 'headers']);
|
|
193
|
+
if (bad)
|
|
194
|
+
return bad;
|
|
195
|
+
if (typeof raw.url !== 'string')
|
|
196
|
+
return `server "${key}" has no url`;
|
|
197
|
+
let url;
|
|
198
|
+
try {
|
|
199
|
+
url = new URL(raw.url);
|
|
200
|
+
}
|
|
201
|
+
catch {
|
|
202
|
+
return `server "${key}": url ${raw.url} is not an absolute URL`;
|
|
203
|
+
}
|
|
204
|
+
if (url.protocol !== 'https:' && url.protocol !== 'http:')
|
|
205
|
+
return `server "${key}": url must be http or https`;
|
|
206
|
+
if (url.username || url.password)
|
|
207
|
+
return `server "${key}": url must not carry a user or password`;
|
|
208
|
+
if (url.hash)
|
|
209
|
+
return `server "${key}": url must not have a fragment`;
|
|
210
|
+
if (url.protocol === 'http:' && !LOOPBACK.test(url.hostname))
|
|
211
|
+
return `server "${key}": only a loopback server may use http; ${url.hostname} needs https`;
|
|
212
|
+
if (raw.headers !== undefined) {
|
|
213
|
+
if (!isStringMap(raw.headers))
|
|
214
|
+
return `server "${key}": headers must map names to strings`;
|
|
215
|
+
const seen = new Set();
|
|
216
|
+
for (const h of Object.keys(raw.headers)) {
|
|
217
|
+
if (seen.has(h.toLowerCase()))
|
|
218
|
+
return `server "${key}": header ${h} is given twice`;
|
|
219
|
+
seen.add(h.toLowerCase());
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
return null;
|
|
223
|
+
}
|
|
224
|
+
return `server "${key}": type must be "stdio", "streamable-http" or "sse"`;
|
|
225
|
+
}
|
|
226
|
+
// ── A whole plugin ───────────────────────────────────────────
|
|
227
|
+
/**
|
|
228
|
+
* Read and check a plugin directory the way a conformant client loads it,
|
|
229
|
+
* reporting what such a client would refuse, skip and ignore.
|
|
230
|
+
*/
|
|
231
|
+
export function readAgentPlugin(root) {
|
|
232
|
+
const report = { root, skills: [], servers: {}, errors: [], warnings: [] };
|
|
233
|
+
const manifestFile = join(root, 'plugin.json');
|
|
234
|
+
if (!existsSync(manifestFile)) {
|
|
235
|
+
report.errors.push('plugin.json: missing — every Agent Plugin has one at its root');
|
|
236
|
+
return report;
|
|
237
|
+
}
|
|
238
|
+
if (!inside(root, manifestFile)) {
|
|
239
|
+
report.errors.push('plugin.json: resolves outside the plugin');
|
|
240
|
+
return report;
|
|
241
|
+
}
|
|
242
|
+
const { value, error } = readJson(manifestFile);
|
|
243
|
+
if (error !== undefined || !isObject(value)) {
|
|
244
|
+
report.errors.push(`plugin.json: ${error ? `is not valid JSON — ${error}` : 'must be a JSON object'}`);
|
|
245
|
+
return report;
|
|
246
|
+
}
|
|
247
|
+
const version = versionOf(value.$schema, 'plugin');
|
|
248
|
+
if (!version) {
|
|
249
|
+
report.errors.push(`plugin.json: "$schema" must be ${pluginSchemaUrl()}`);
|
|
250
|
+
return report;
|
|
251
|
+
}
|
|
252
|
+
report.version = version;
|
|
253
|
+
const fatal = [];
|
|
254
|
+
if (typeof value.name !== 'string' || value.name.length < 1 || value.name.length > 64 || !PLUGIN_NAME.test(value.name)) {
|
|
255
|
+
fatal.push('"name" must be 1–64 lowercase letters, digits, hyphens and periods, starting and ending with a letter or digit, with no "--" or ".."');
|
|
256
|
+
}
|
|
257
|
+
for (const k of ['version', 'description', 'homepage', 'repository', 'license']) {
|
|
258
|
+
if (value[k] !== undefined && typeof value[k] !== 'string')
|
|
259
|
+
fatal.push(`"${k}" must be a string`);
|
|
260
|
+
}
|
|
261
|
+
if (value.keywords !== undefined && !(Array.isArray(value.keywords) && value.keywords.every((k) => typeof k === 'string'))) {
|
|
262
|
+
fatal.push('"keywords" must be a list of strings');
|
|
263
|
+
}
|
|
264
|
+
if (value.author !== undefined) {
|
|
265
|
+
if (!isObject(value.author) || Object.keys(value.author).some((k) => !['name', 'email', 'url'].includes(k)) || !isStringMap(value.author)) {
|
|
266
|
+
fatal.push('"author" may hold only name, email and url, each a string');
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
if (fatal.length > 0) {
|
|
270
|
+
report.errors.push(...fatal.map((f) => `plugin.json: ${f}`));
|
|
271
|
+
return report;
|
|
272
|
+
}
|
|
273
|
+
for (const k of Object.keys(value)) {
|
|
274
|
+
if (!MANIFEST_FIELDS.includes(k)) {
|
|
275
|
+
report.warnings.push(`plugin.json: "${k}" is not an Agent Plugins field; clients ignore it — client data belongs under "extensions"`);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
if (value.extensions !== undefined && (!isObject(value.extensions) || !Object.values(value.extensions).every(isObject))) {
|
|
279
|
+
report.warnings.push('plugin.json: "extensions" must map namespaces to objects; clients ignore it as written');
|
|
280
|
+
}
|
|
281
|
+
if (typeof value.version === 'string' && !/^\d+\.\d+\.\d+(?:[-+].*)?$/.test(value.version)) {
|
|
282
|
+
report.warnings.push(`plugin.json: version "${value.version}" is not semantic versioning, which clients use to offer updates`);
|
|
283
|
+
}
|
|
284
|
+
report.manifest = value;
|
|
285
|
+
// Skills: each immediate child of skills/ holding a SKILL.md.
|
|
286
|
+
const skillsDir = join(root, 'skills');
|
|
287
|
+
if (existsSync(skillsDir)) {
|
|
288
|
+
if (!statSync(skillsDir).isDirectory() || !inside(root, skillsDir)) {
|
|
289
|
+
report.errors.push('skills: is not a directory inside the plugin, so no skill loads');
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
for (const entry of readdirSync(skillsDir).sort()) {
|
|
293
|
+
const dir = join(skillsDir, entry);
|
|
294
|
+
if (!existsSync(join(dir, 'SKILL.md')))
|
|
295
|
+
continue;
|
|
296
|
+
if (!inside(root, join(dir, 'SKILL.md'))) {
|
|
297
|
+
report.errors.push(`skills/${entry}/SKILL.md: resolves outside the plugin, so it is skipped`);
|
|
298
|
+
continue;
|
|
299
|
+
}
|
|
300
|
+
const skill = checkSkill(dir);
|
|
301
|
+
report.errors.push(...skill.errors);
|
|
302
|
+
report.warnings.push(...skill.warnings);
|
|
303
|
+
if (skill.errors.length === 0 && skill.name)
|
|
304
|
+
report.skills.push(skill.name);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
// MCP servers: mcp.json, all or nothing at the file, one by one below it.
|
|
309
|
+
const mcpFile = join(root, 'mcp.json');
|
|
310
|
+
if (existsSync(mcpFile)) {
|
|
311
|
+
const mcp = readJson(mcpFile);
|
|
312
|
+
const mcpVersion = isObject(mcp.value) ? versionOf(mcp.value.$schema, 'mcp') : null;
|
|
313
|
+
if (mcp.error !== undefined || !isObject(mcp.value)) {
|
|
314
|
+
report.errors.push(`mcp.json: ${mcp.error ? `is not valid JSON — ${mcp.error}` : 'must be a JSON object'}, so no server loads`);
|
|
315
|
+
}
|
|
316
|
+
else if (!mcpVersion) {
|
|
317
|
+
report.errors.push(`mcp.json: "$schema" must be ${mcpSchemaUrl(version)}, so no server loads`);
|
|
318
|
+
}
|
|
319
|
+
else if (mcpVersion !== version) {
|
|
320
|
+
report.errors.push(`mcp.json: targets Agent Plugins ${mcpVersion} while plugin.json targets ${version}, so no server loads`);
|
|
321
|
+
}
|
|
322
|
+
else if (!isObject(mcp.value.mcpServers) || Object.keys(mcp.value).some((k) => k !== '$schema' && k !== 'mcpServers')) {
|
|
323
|
+
report.errors.push('mcp.json: must hold "$schema" and an "mcpServers" object and nothing else, so no server loads');
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
for (const [key, raw] of Object.entries(mcp.value.mcpServers)) {
|
|
327
|
+
const problem = serverProblem(key, raw);
|
|
328
|
+
if (problem) {
|
|
329
|
+
report.errors.push(`mcp.json: ${problem}, so it is skipped`);
|
|
330
|
+
continue;
|
|
331
|
+
}
|
|
332
|
+
report.servers[key] = raw;
|
|
333
|
+
const secretish = Object.entries({ ...(raw.env ?? {}), ...(raw.headers ?? {}) });
|
|
334
|
+
for (const [field, val] of secretish) {
|
|
335
|
+
if (typeof val === 'string' && /(?:^|\s)(?:Bearer\s+)?[A-Za-z0-9_\-.]{32,}$/.test(val) && !/^\$\{/.test(val)) {
|
|
336
|
+
report.warnings.push(`mcp.json: server "${key}" sets ${field} to what looks like a credential — mcp.json is published with the plugin`);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
// Claude Code's manifest, when one is kept beside the portable one.
|
|
343
|
+
const claude = join(root, '.claude-plugin', 'plugin.json');
|
|
344
|
+
if (existsSync(claude)) {
|
|
345
|
+
const c = readJson(claude);
|
|
346
|
+
if (isObject(c.value) && c.value.name !== value.name) {
|
|
347
|
+
report.warnings.push(`.claude-plugin/plugin.json: names the plugin "${String(c.value.name)}" and plugin.json "${String(value.name)}" — Claude Code users and everyone else would install two different names`);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
if (/^(claude|anthropic|anthropics|cc-plugin)(-|$)/.test(String(value.name))) {
|
|
351
|
+
report.warnings.push(`plugin.json: Claude Code reserves names like "${String(value.name)}" for Anthropic's own plugins`);
|
|
352
|
+
}
|
|
353
|
+
return report;
|
|
354
|
+
}
|
|
355
|
+
// ── Claude Code, which reads its own manifest ────────────────
|
|
356
|
+
/** `${PLUGIN_ROOT}` and `${PLUGIN_DATA}`, in Claude Code's spelling. */
|
|
357
|
+
function claudeVars(s) {
|
|
358
|
+
return s.split('${PLUGIN_ROOT}').join('${CLAUDE_PLUGIN_ROOT}').split('${PLUGIN_DATA}').join('${CLAUDE_PLUGIN_DATA}');
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* The `.claude-plugin/plugin.json` Claude Code reads, from the portable
|
|
362
|
+
* manifest. Claude Code does not read a root `plugin.json`; without this a
|
|
363
|
+
* Claude Code user installing the plugin gets it under whatever name the
|
|
364
|
+
* marketplace entry gives it, and no version.
|
|
365
|
+
*/
|
|
366
|
+
export function claudeManifestFor(m) {
|
|
367
|
+
return {
|
|
368
|
+
name: m.name,
|
|
369
|
+
...(m.version && { version: m.version }),
|
|
370
|
+
...(m.description && { description: m.description }),
|
|
371
|
+
// Claude Code requires a name in an author.
|
|
372
|
+
...(m.author?.name && { author: m.author }),
|
|
373
|
+
...(m.homepage && { homepage: m.homepage }),
|
|
374
|
+
...(m.repository && { repository: m.repository }),
|
|
375
|
+
...(m.license && { license: m.license }),
|
|
376
|
+
...(m.keywords && m.keywords.length > 0 && { keywords: m.keywords }),
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* The `.mcp.json` Claude Code reads from a plugin, from the portable
|
|
381
|
+
* `mcp.json`: its own type names, and `${CLAUDE_PLUGIN_ROOT}` where the
|
|
382
|
+
* portable format resolves `./` against the plugin.
|
|
383
|
+
*/
|
|
384
|
+
export function claudeMcpFor(servers) {
|
|
385
|
+
const out = {};
|
|
386
|
+
for (const [key, s] of Object.entries(servers)) {
|
|
387
|
+
if (s.type === 'stdio') {
|
|
388
|
+
out[key] = {
|
|
389
|
+
command: s.command.startsWith('./') ? `\${CLAUDE_PLUGIN_ROOT}/${s.command.slice(2)}` : s.command,
|
|
390
|
+
...(s.args && { args: s.args.map(claudeVars) }),
|
|
391
|
+
...(s.env && { env: Object.fromEntries(Object.entries(s.env).map(([k, v]) => [k, claudeVars(v)])) }),
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
else {
|
|
395
|
+
out[key] = { type: s.type === 'sse' ? 'sse' : 'http', url: s.url, ...(s.headers && { headers: s.headers }) };
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
return { mcpServers: out };
|
|
399
|
+
}
|
|
400
|
+
// ── A plugin as a team's layer ───────────────────────────────
|
|
401
|
+
/**
|
|
402
|
+
* One portable server as a team server, for a plugin a project extends.
|
|
403
|
+
*
|
|
404
|
+
* `./` and `${PLUGIN_ROOT}` mean the plugin's directory; compiled into a
|
|
405
|
+
* project's config they become its path from the project root, where every
|
|
406
|
+
* assistant starts a project's servers. `${PLUGIN_DATA}` is a directory only an
|
|
407
|
+
* assistant that installs the plugin itself provides, and legacy SSE is a
|
|
408
|
+
* transport the generated configs do not carry — those servers are left out,
|
|
409
|
+
* with the reason.
|
|
410
|
+
*/
|
|
411
|
+
export function teamServerFor(server, pluginPath) {
|
|
412
|
+
const at = pluginPath === '' || pluginPath === '.' ? '.' : pluginPath.startsWith('.') ? pluginPath : `./${pluginPath}`;
|
|
413
|
+
if (server.type !== 'stdio') {
|
|
414
|
+
if (server.type === 'sse')
|
|
415
|
+
return { skipped: 'uses the legacy SSE transport, which OpenCastle does not compile; install the plugin in an assistant that reads it' };
|
|
416
|
+
return { server: { type: 'http', url: server.url, ...(server.headers && { headers: server.headers }) } };
|
|
417
|
+
}
|
|
418
|
+
const all = [server.command, ...(server.args ?? []), ...Object.values(server.env ?? {}), server.cwd ?? ''];
|
|
419
|
+
if (all.some((v) => v.includes('${PLUGIN_DATA}'))) {
|
|
420
|
+
return { skipped: 'uses ${PLUGIN_DATA}, a directory only an assistant that installs the plugin itself provides' };
|
|
421
|
+
}
|
|
422
|
+
if (server.cwd && !/^(?:\.\/?|\$\{PLUGIN_ROOT\}\/?)$/.test(server.cwd)) {
|
|
423
|
+
return { skipped: `runs in ${server.cwd}, and the assistants OpenCastle compiles for start servers in the project directory` };
|
|
424
|
+
}
|
|
425
|
+
const expand = (v) => v.split('${PLUGIN_ROOT}').join(at);
|
|
426
|
+
return {
|
|
427
|
+
server: {
|
|
428
|
+
type: 'stdio',
|
|
429
|
+
command: server.command.startsWith('./') ? `${at}/${server.command.slice(2)}` : server.command,
|
|
430
|
+
...(server.args && { args: server.args.map(expand) }),
|
|
431
|
+
...(server.env && { env: Object.fromEntries(Object.entries(server.env).map(([k, v]) => [k, expand(v)])) }),
|
|
432
|
+
},
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
/** A plugin name from a package name: `@acme/ai-standard` → `acme.ai-standard`. */
|
|
436
|
+
export function pluginNameFrom(packageName) {
|
|
437
|
+
const name = packageName
|
|
438
|
+
.toLowerCase()
|
|
439
|
+
.replace(/^@/, '')
|
|
440
|
+
.replace(/\//g, '.')
|
|
441
|
+
.replace(/[^a-z0-9.-]+/g, '-')
|
|
442
|
+
.replace(/-{2,}/g, '-')
|
|
443
|
+
.replace(/\.{2,}/g, '.')
|
|
444
|
+
.replace(/^[.-]+|[.-]+$/g, '')
|
|
445
|
+
.slice(0, 64)
|
|
446
|
+
.replace(/[.-]+$/, '');
|
|
447
|
+
return name || 'plugin';
|
|
448
|
+
}
|
|
449
|
+
//# sourceMappingURL=agent-plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-plugin.js","sourceRoot":"","sources":["../../src/cli/agent-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AACvF,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AACzD,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAA;AAGzC;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,OAAO,CAAA;AAC5C,qGAAqG;AACrG,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;AACzC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,GAAG,qBAAqB,EAAU,EAAE,CAAC,qCAAqC,CAAC,qBAAqB,CAAA;AACjI,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,GAAG,qBAAqB,EAAU,EAAE,CAAC,qCAAqC,CAAC,kBAAkB,CAAA;AAE3H,gFAAgF;AAChF,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAgB,CAAA;AAgCnD,MAAM,eAAe,GAAG,CAAC,SAAS,E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