agent-first-data 0.13.2 → 0.14.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 CHANGED
@@ -41,7 +41,7 @@ initJson({ secretNames: ["authorization"] });
41
41
 
42
42
  ## Reference
43
43
 
44
- - Full convention and API groups: [../docs/overview.md](../docs/overview.md)
45
- - Formal cross-language contract: [../spec/agent-first-data.md](../spec/agent-first-data.md)
46
- - Conformance fixtures: [../spec/fixtures](../spec/fixtures)
47
- - Agent skill: [../skills/agent-first-data.md](../skills/agent-first-data.md)
44
+ - Full convention and API groups: [docs/overview.md](https://github.com/agentfirstkit/agent-first-data/blob/main/docs/overview.md)
45
+ - Formal cross-language contract: [spec/agent-first-data.md](https://github.com/agentfirstkit/agent-first-data/blob/main/spec/agent-first-data.md)
46
+ - Conformance fixtures: [spec/fixtures](https://github.com/agentfirstkit/agent-first-data/tree/main/spec/fixtures)
47
+ - Agent skill: [skills/agent-first-data.md](https://github.com/agentfirstkit/agent-first-data/blob/main/skills/agent-first-data.md)
package/dist/skill.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * A spore that embeds its `SKILL.md` describes itself with a {@link SkillSpec} and calls
5
5
  * {@link runSkillAdmin} to install, uninstall, or report status of that skill across
6
- * supported coding agents (Codex, Claude Code, opencode).
6
+ * supported coding agents (Codex, Claude Code, opencode, Hermes).
7
7
  *
8
8
  * The function performs the filesystem work and returns the protocol value (rendered by
9
9
  * the caller with `cliOutput`) or throws a {@link SkillError}. It never writes to
@@ -26,11 +26,11 @@ export interface SkillSpec {
26
26
  /** The skill action to perform. */
27
27
  export type SkillAction = "status" | "install" | "uninstall";
28
28
  /** Where to install the skill. */
29
- export type SkillScope = "personal" | "project";
29
+ export type SkillScope = "personal" | "workspace";
30
30
  /** Which agent target(s) to manage. */
31
- export type SkillAgentSelection = "all" | "codex" | "claude-code" | "opencode";
31
+ export type SkillAgentSelection = "all" | "codex" | "claude-code" | "opencode" | "hermes";
32
32
  /** A concrete agent a skill is installed for (no `all`). */
33
- export type SkillAgent = "codex" | "claude-code" | "opencode";
33
+ export type SkillAgent = "codex" | "claude-code" | "opencode" | "hermes";
34
34
  /** Options shared by every skill action. */
35
35
  export interface SkillOptions {
36
36
  agent: SkillAgentSelection;
package/dist/skill.js CHANGED
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * A spore that embeds its `SKILL.md` describes itself with a {@link SkillSpec} and calls
5
5
  * {@link runSkillAdmin} to install, uninstall, or report status of that skill across
6
- * supported coding agents (Codex, Claude Code, opencode).
6
+ * supported coding agents (Codex, Claude Code, opencode, Hermes).
7
7
  *
8
8
  * The function performs the filesystem work and returns the protocol value (rendered by
9
9
  * the caller with `cliOutput`) or throws a {@link SkillError}. It never writes to
@@ -128,20 +128,19 @@ function resolveTargets(spec, options) {
128
128
  resolveTarget(spec, "codex", "personal", undefined),
129
129
  resolveTarget(spec, "claude-code", "personal", undefined),
130
130
  resolveTarget(spec, "opencode", "personal", undefined),
131
+ resolveTarget(spec, "hermes", "personal", undefined),
131
132
  ];
132
133
  }
133
- // Codex has no project scope, so --agent all --scope project skips it.
134
- if (agent === "all" && scope === "project") {
134
+ if (agent === "all" && scope === "workspace") {
135
135
  return [
136
- resolveTarget(spec, "claude-code", "project", undefined),
137
- resolveTarget(spec, "opencode", "project", undefined),
136
+ resolveTarget(spec, "codex", "workspace", undefined),
137
+ resolveTarget(spec, "claude-code", "workspace", undefined),
138
+ resolveTarget(spec, "opencode", "workspace", undefined),
139
+ resolveTarget(spec, "hermes", "workspace", undefined),
138
140
  ];
139
141
  }
140
- if (agent === "codex" && scope === "project") {
141
- throw new SkillError("Codex project skill scope is not supported", "use personal scope for Codex, or --agent claude-code/opencode --scope project");
142
- }
143
142
  if (agent === "codex") {
144
- return [resolveTarget(spec, "codex", "personal", options.skillsDir)];
143
+ return [resolveTarget(spec, "codex", scope, options.skillsDir)];
145
144
  }
146
145
  if (agent === "claude-code") {
147
146
  return [resolveTarget(spec, "claude-code", scope, options.skillsDir)];
@@ -149,6 +148,9 @@ function resolveTargets(spec, options) {
149
148
  if (agent === "opencode") {
150
149
  return [resolveTarget(spec, "opencode", scope, options.skillsDir)];
151
150
  }
151
+ if (agent === "hermes") {
152
+ return [resolveTarget(spec, "hermes", scope, options.skillsDir)];
153
+ }
152
154
  throw new SkillError(`invalid --agent '${agent}'`);
153
155
  }
154
156
  function resolveTarget(spec, agent, scope, skillsDir) {
@@ -164,8 +166,8 @@ function resolveTarget(spec, agent, scope, skillsDir) {
164
166
  }
165
167
  function defaultSkillsDir(agent, scope) {
166
168
  if (agent === "codex") {
167
- if (scope === "project") {
168
- throw new SkillError("Codex project skill scope is not supported");
169
+ if (scope !== "personal") {
170
+ return join(process.cwd(), ".codex", "skills");
169
171
  }
170
172
  const codexHome = process.env["CODEX_HOME"];
171
173
  if (codexHome !== undefined) {
@@ -174,20 +176,30 @@ function defaultSkillsDir(agent, scope) {
174
176
  return join(homeDir(), ".codex", "skills");
175
177
  }
176
178
  if (agent === "claude-code") {
177
- if (scope === "project") {
179
+ if (scope !== "personal") {
178
180
  return join(process.cwd(), ".claude", "skills");
179
181
  }
180
182
  return join(homeDir(), ".claude", "skills");
181
183
  }
182
- // opencode
183
- if (scope === "project") {
184
- return join(process.cwd(), ".opencode", "skills");
184
+ if (agent === "opencode") {
185
+ if (scope !== "personal") {
186
+ return join(process.cwd(), ".opencode", "skills");
187
+ }
188
+ const xdg = process.env["XDG_CONFIG_HOME"];
189
+ if (xdg !== undefined) {
190
+ return join(xdg, "opencode", "skills");
191
+ }
192
+ return join(homeDir(), ".config", "opencode", "skills");
193
+ }
194
+ // hermes
195
+ if (scope !== "personal") {
196
+ return join(process.cwd(), ".hermes", "skills");
185
197
  }
186
- const xdg = process.env["XDG_CONFIG_HOME"];
187
- if (xdg !== undefined) {
188
- return join(xdg, "opencode", "skills");
198
+ const hermesHome = process.env["HERMES_HOME"];
199
+ if (hermesHome !== undefined) {
200
+ return join(hermesHome, "skills");
189
201
  }
190
- return join(homeDir(), ".config", "opencode", "skills");
202
+ return join(homeDir(), ".hermes", "skills");
191
203
  }
192
204
  function targetStatus(spec, target) {
193
205
  const st = lstatOrNull(target.skillPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-first-data",
3
- "version": "0.13.2",
3
+ "version": "0.14.0",
4
4
  "description": "A naming convention that lets AI agents understand your data without being told what it means.",
5
5
  "license": "MIT",
6
6
  "repository": {