operon-agents-core 0.1.0-alpha.11 → 0.1.0-alpha.12
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/dist/plugins/manifest.js +9 -3
- package/package.json +1 -1
package/dist/plugins/manifest.js
CHANGED
|
@@ -44,6 +44,8 @@ const RawManifestSchema = z.looseObject({
|
|
|
44
44
|
// without, so those stay errors.
|
|
45
45
|
const FATAL_FIELDS = new Set(["name"]);
|
|
46
46
|
const ERROR_FIELDS = new Set(["skills"]);
|
|
47
|
+
const DEFAULT_SKILLS_DIR = "skills";
|
|
48
|
+
const DEFAULT_MCP_CONFIG_FILE = ".mcp.json";
|
|
47
49
|
export async function parseManifest(environment, pluginRoot) {
|
|
48
50
|
const candidates = [PLUGIN_ROOT_MANIFEST, PLUGIN_DIR_MANIFEST, CODEX_DIR_MANIFEST];
|
|
49
51
|
let manifestPath;
|
|
@@ -76,8 +78,12 @@ export async function parseManifest(environment, pluginRoot) {
|
|
|
76
78
|
diagnostics.push({ severity: "error", message: `"name" must match ${PLUGIN_NAME_REGEX} (got "${name}")` });
|
|
77
79
|
return { manifestPath, diagnostics };
|
|
78
80
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
// Codex convention: a manifest that doesn't name its skills / MCP file still gets the plugin's
|
|
82
|
+
// `skills/` dir and root `.mcp.json` (most curated plugins rely on this — e.g. Vercel, Slack).
|
|
83
|
+
const skillsField = raw.skills ?? ((await isDir(environment, path.join(pluginRoot, DEFAULT_SKILLS_DIR))) ? `./${DEFAULT_SKILLS_DIR}` : undefined);
|
|
84
|
+
const mcpServersField = raw.mcpServers ?? ((await isFile(environment, path.join(pluginRoot, DEFAULT_MCP_CONFIG_FILE))) ? `./${DEFAULT_MCP_CONFIG_FILE}` : undefined);
|
|
85
|
+
let skills = await resolveSkillsField(environment, pluginRoot, skillsField, diagnostics);
|
|
86
|
+
if (skillsField === undefined && (await isFile(environment, path.join(pluginRoot, "SKILL.md")))) {
|
|
81
87
|
skills = [pluginRoot];
|
|
82
88
|
}
|
|
83
89
|
for (const field of UNSUPPORTED_RUNTIME_FIELDS) {
|
|
@@ -95,7 +101,7 @@ export async function parseManifest(environment, pluginRoot) {
|
|
|
95
101
|
author: raw.author,
|
|
96
102
|
skills,
|
|
97
103
|
sessionStart: raw.sessionStart === undefined ? undefined : { skill: raw.sessionStart.skill.trim() },
|
|
98
|
-
mcpServers: await readMcpServers(environment, pluginRoot,
|
|
104
|
+
mcpServers: await readMcpServers(environment, pluginRoot, mcpServersField, diagnostics),
|
|
99
105
|
...(hooks.length > 0 ? { hooks } : {}),
|
|
100
106
|
interface: raw.interface,
|
|
101
107
|
skillInstructions: raw.skillInstructions,
|