@rbbtsn0w/adg 0.1.0 → 0.1.1

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.
@@ -4,16 +4,28 @@ import { isExposed } from "../components.js";
4
4
  /**
5
5
  * Generate a Codex (.codex-plugin/plugin.json) manifest from an ADG manifest.
6
6
  *
7
- * Codex's minimal manifest requires name, version, description and skills. The
8
- * skills field is emitted as an explicit array of skill identifiers. An optional
9
- * `selection` narrows the exposed skills (Codex only consumes skills).
7
+ * Codex's minimal manifest requires name, version, description and skills.
8
+ * In the default strict case a declared skills *root* string (e.g. `"./skills/"`)
9
+ * is passed through — Codex consumes the directory form natively, so it
10
+ * discovers new skills without the manifest enumerating them. Every other case
11
+ * (an explicit `skills` array, a partial install `selection`, or `strict: false`)
12
+ * emits the bare skill-id array Codex expects: `manifest.skills` arrays are
13
+ * declared as *paths* (`./skills/foo`), so they are resolved to identifiers
14
+ * rather than passed through. Codex only consumes skills.
10
15
  */
11
16
  export function toCodexManifest(pluginDir, manifest, selection) {
12
- const skills = !selection
13
- ? resolveSkills(pluginDir, manifest)
14
- : isExposed(selection, "skills")
17
+ let skills;
18
+ if (selection) {
19
+ skills = isExposed(selection, "skills")
15
20
  ? selection.skills ?? resolveSkills(pluginDir, manifest)
16
21
  : [];
22
+ }
23
+ else {
24
+ const strict = manifest.strict !== false;
25
+ skills = strict && typeof manifest.skills === "string"
26
+ ? manifest.skills
27
+ : resolveSkills(pluginDir, manifest);
28
+ }
17
29
  const out = {
18
30
  name: manifest.name,
19
31
  version: manifest.version,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbbtsn0w/adg",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Agent Directory Group (ADG) toolkit — two domains: plugins and skills.",
5
5
  "type": "module",
6
6
  "license": "MIT",