@skillsmith/core 0.11.5 → 0.11.6

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.
Files changed (94) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/README.md +2 -2
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/src/api/client.d.ts.map +1 -1
  5. package/dist/src/api/client.js +5 -0
  6. package/dist/src/api/client.js.map +1 -1
  7. package/dist/src/api/client.test.js +39 -0
  8. package/dist/src/api/client.test.js.map +1 -1
  9. package/dist/src/compatibility/slugs.d.ts +7 -3
  10. package/dist/src/compatibility/slugs.d.ts.map +1 -1
  11. package/dist/src/compatibility/slugs.js +11 -4
  12. package/dist/src/compatibility/slugs.js.map +1 -1
  13. package/dist/src/db/drivers/sqljsDriver.d.ts +8 -0
  14. package/dist/src/db/drivers/sqljsDriver.d.ts.map +1 -1
  15. package/dist/src/db/drivers/sqljsDriver.js +24 -2
  16. package/dist/src/db/drivers/sqljsDriver.js.map +1 -1
  17. package/dist/src/db/migration-runner.d.ts.map +1 -1
  18. package/dist/src/db/migration-runner.js +23 -2
  19. package/dist/src/db/migration-runner.js.map +1 -1
  20. package/dist/src/db/schema.d.ts.map +1 -1
  21. package/dist/src/db/schema.js +29 -3
  22. package/dist/src/db/schema.js.map +1 -1
  23. package/dist/src/exports/services.d.ts +1 -0
  24. package/dist/src/exports/services.d.ts.map +1 -1
  25. package/dist/src/exports/services.js +5 -0
  26. package/dist/src/exports/services.js.map +1 -1
  27. package/dist/src/index.d.ts +1 -1
  28. package/dist/src/index.js +1 -1
  29. package/dist/src/install/index.d.ts +2 -2
  30. package/dist/src/install/index.d.ts.map +1 -1
  31. package/dist/src/install/index.js +1 -1
  32. package/dist/src/install/index.js.map +1 -1
  33. package/dist/src/install/paths.d.ts +155 -1
  34. package/dist/src/install/paths.d.ts.map +1 -1
  35. package/dist/src/install/paths.js +235 -1
  36. package/dist/src/install/paths.js.map +1 -1
  37. package/dist/src/install/paths.test.js +174 -2
  38. package/dist/src/install/paths.test.js.map +1 -1
  39. package/dist/src/services/context-words.d.ts +40 -0
  40. package/dist/src/services/context-words.d.ts.map +1 -0
  41. package/dist/src/services/context-words.js +178 -0
  42. package/dist/src/services/context-words.js.map +1 -0
  43. package/dist/src/services/context-words.test.d.ts +2 -0
  44. package/dist/src/services/context-words.test.d.ts.map +1 -0
  45. package/dist/src/services/context-words.test.js +94 -0
  46. package/dist/src/services/context-words.test.js.map +1 -0
  47. package/dist/src/services/skill-installation.content.d.ts +8 -0
  48. package/dist/src/services/skill-installation.content.d.ts.map +1 -1
  49. package/dist/src/services/skill-installation.content.js +2 -2
  50. package/dist/src/services/skill-installation.content.js.map +1 -1
  51. package/dist/src/services/skill-installation.helpers.d.ts.map +1 -1
  52. package/dist/src/services/skill-installation.helpers.js +24 -2
  53. package/dist/src/services/skill-installation.helpers.js.map +1 -1
  54. package/dist/src/services/skill-installation.helpers.test.js +76 -2
  55. package/dist/src/services/skill-installation.helpers.test.js.map +1 -1
  56. package/dist/src/services/skill-installation.io.d.ts +22 -1
  57. package/dist/src/services/skill-installation.io.d.ts.map +1 -1
  58. package/dist/src/services/skill-installation.io.js +36 -5
  59. package/dist/src/services/skill-installation.io.js.map +1 -1
  60. package/dist/src/services/skill-installation.service.d.ts +2 -0
  61. package/dist/src/services/skill-installation.service.d.ts.map +1 -1
  62. package/dist/src/services/skill-installation.service.js +4 -1
  63. package/dist/src/services/skill-installation.service.js.map +1 -1
  64. package/dist/src/services/skill-manifest.d.ts +21 -0
  65. package/dist/src/services/skill-manifest.d.ts.map +1 -1
  66. package/dist/src/services/skill-manifest.js +51 -6
  67. package/dist/src/services/skill-manifest.js.map +1 -1
  68. package/dist/src/services/skill-manifest.test.d.ts +2 -0
  69. package/dist/src/services/skill-manifest.test.d.ts.map +1 -0
  70. package/dist/src/services/skill-manifest.test.js +202 -0
  71. package/dist/src/services/skill-manifest.test.js.map +1 -0
  72. package/dist/src/types/skill.d.ts +10 -0
  73. package/dist/src/types/skill.d.ts.map +1 -1
  74. package/dist/src/types.d.ts +9 -5
  75. package/dist/src/types.d.ts.map +1 -1
  76. package/dist/tests/db/migration-runner-race.test.d.ts +2 -0
  77. package/dist/tests/db/migration-runner-race.test.d.ts.map +1 -0
  78. package/dist/tests/db/migration-runner-race.test.js +75 -0
  79. package/dist/tests/db/migration-runner-race.test.js.map +1 -0
  80. package/dist/tests/db/schema-async.test.js +37 -1
  81. package/dist/tests/db/schema-async.test.js.map +1 -1
  82. package/dist/tests/db/sqljsDriver.test.js +63 -1
  83. package/dist/tests/db/sqljsDriver.test.js.map +1 -1
  84. package/dist/tests/schema.test.js +43 -1
  85. package/dist/tests/schema.test.js.map +1 -1
  86. package/dist/tests/unit/services/skill-installation.io.client-agent-path.test.d.ts +34 -0
  87. package/dist/tests/unit/services/skill-installation.io.client-agent-path.test.d.ts.map +1 -0
  88. package/dist/tests/unit/services/skill-installation.io.client-agent-path.test.js +246 -0
  89. package/dist/tests/unit/services/skill-installation.io.client-agent-path.test.js.map +1 -0
  90. package/dist/tests/unit/services/skill-installation.service.companion-basedir.test.d.ts +17 -0
  91. package/dist/tests/unit/services/skill-installation.service.companion-basedir.test.d.ts.map +1 -0
  92. package/dist/tests/unit/services/skill-installation.service.companion-basedir.test.js +112 -0
  93. package/dist/tests/unit/services/skill-installation.service.companion-basedir.test.js.map +1 -0
  94. package/package.json +1 -1
@@ -9,7 +9,7 @@
9
9
  *
10
10
  * @module @skillsmith/core/install
11
11
  */
12
- export { CANONICAL_CLIENT, CLIENT_DISPLAY_LABELS, CLIENT_IDS, CLIENT_NATIVE_PATHS, assertClientId, enumerateHarnessPresence, getCanonicalInstallPath, getInstallPath, resolveClientId, resolveClientPath, } from './paths.js';
12
+ export { CANONICAL_CLIENT, CLIENT_DISPLAY_LABELS, CLIENT_IDS, CLIENT_NATIVE_PATHS, COMPANION_AGENT_TARGETS, assertClientId, enumerateHarnessPresence, getCanonicalInstallPath, getCompanionAgentTarget, getInstallPath, resolveClientId, resolveClientPath, resolveCompanionAgentDir, resolveCompanionAgentPath, } from './paths.js';
13
13
  export { addLink, getDefaultFromClient, getLinkManifestPath, listLinks, loadManifest, removeLinks, saveManifest, } from './fan-out.js';
14
14
  // SMI-5456 Wave 1 Step 5: `sklx agent install` / `uninstall` core.
15
15
  export { installAgentPack, loadAgentManifest } from './agent-pack-installer.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/install/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,UAAU,EACV,mBAAmB,EACnB,cAAc,EACd,wBAAwB,EACxB,uBAAuB,EACvB,cAAc,EACd,eAAe,EACf,iBAAiB,GAClB,MAAM,YAAY,CAAA;AAGnB,OAAO,EACL,OAAO,EACP,oBAAoB,EACpB,mBAAmB,EACnB,SAAS,EACT,YAAY,EACZ,WAAW,EACX,YAAY,GACb,MAAM,cAAc,CAAA;AASrB,mEAAmE;AACnE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,EACzB,6BAA6B,GAI9B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,oBAAoB,GAOrB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,GAMvB,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,gCAAgC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/install/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,UAAU,EACV,mBAAmB,EACnB,uBAAuB,EACvB,cAAc,EACd,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,YAAY,CAAA;AAGnB,OAAO,EACL,OAAO,EACP,oBAAoB,EACpB,mBAAmB,EACnB,SAAS,EACT,YAAY,EACZ,WAAW,EACX,YAAY,GACb,MAAM,cAAc,CAAA;AASrB,mEAAmE;AACnE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,EACzB,6BAA6B,GAI9B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,oBAAoB,GAOrB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,GAMvB,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,gCAAgC,CAAA"}
@@ -1,4 +1,4 @@
1
- export type ClientId = 'claude-code' | 'cursor' | 'copilot' | 'windsurf' | 'agents' | 'opencode' | 'hermes' | 'grok';
1
+ export type ClientId = 'claude-code' | 'cursor' | 'copilot' | 'windsurf' | 'agents' | 'opencode' | 'hermes' | 'grok' | 'antigravity';
2
2
  export declare const CLIENT_NATIVE_PATHS: Record<ClientId, string>;
3
3
  export declare const CANONICAL_CLIENT: ClientId;
4
4
  /**
@@ -39,4 +39,158 @@ export declare function enumerateHarnessPresence(): Array<{
39
39
  present: boolean;
40
40
  path: string;
41
41
  }>;
42
+ /**
43
+ * SMI-5980 (Wave 3): where a per-skill companion-subagent file is written for
44
+ * a given `ClientId`.
45
+ *
46
+ * **Deliberately NOT derived from `AGENT_SHIM_TARGETS`** (agent-harness-targets.ts).
47
+ * That table encodes complete, singular shim-file targets (fixed filenames like
48
+ * `skillsmith-agent.md`, `null` entries for some tools) for a *different*
49
+ * command (`sklx agent install`'s one-time named-agent shim), keyed by the
50
+ * narrower `HarnessId` enum (5 members) rather than `ClientId` (8 members).
51
+ * This is a new, purpose-built map for the per-skill companion-subagent file
52
+ * that `SkillInstallationService.install()` / `sklx author subagent` can
53
+ * generate for ANY installed skill, one file per skill, not a single fixed
54
+ * shim.
55
+ *
56
+ * `fileMode` has two values:
57
+ * - `'flat'` — one file directly inside `dir`, named by substituting `{name}`
58
+ * in `filenamePattern`. Used by every client except Antigravity.
59
+ * - `'directory-package'` (SMI-5982 Wave 6, Antigravity) — a per-skill
60
+ * subdirectory `<dir>/<name>/` containing a fixed-name file
61
+ * (`filenamePattern`, always `'agent.md'` for this mode — no `{name}`
62
+ * substitution, the name lives in the directory segment instead). See
63
+ * {@link resolveCompanionAgentPath} for the resolution logic per mode.
64
+ */
65
+ export interface CompanionAgentTarget {
66
+ dir: string;
67
+ fileMode: 'flat' | 'directory-package';
68
+ filenamePattern: string;
69
+ }
70
+ /**
71
+ * Populated conservatively per the SMI-5980 plan review, to fix the
72
+ * hardcoding/architecture bug (making this resolvable per client at all)
73
+ * WITHOUT inventing new, unverified per-client directory values:
74
+ *
75
+ * - `claude-code`: today's actual confirmed hardcoded value
76
+ * (`~/.claude/agents/<skillName>-specialist.md`) — this must exactly match
77
+ * pre-Wave-3 behavior (`skill-installation.io.ts`'s prior
78
+ * `path.join(os.homedir(), '.claude', 'agents')` literal and
79
+ * `author/utils.ts`'s prior `ensureAgentsDirectory()` default).
80
+ * - `copilot`: `AGENT_SHIM_TARGETS.copilot` (agent-harness-targets.ts) has a
81
+ * real, non-null entry for the SAME underlying tool —
82
+ * `~/.copilot/agents/skillsmith-agent.agent.md`. Both its DIRECTORY
83
+ * (`~/.copilot/agents/`) AND its `.agent.md` EXTENSION are cited here as
84
+ * independent evidence (corroborated by shims.ts's own doc comment:
85
+ * "Copilot `.agent.md` (Copilot cloud-agent + CLI surfaces, which do not
86
+ * read `.claude/agents`)") — PR-review finding (BLOCKING): a plain
87
+ * `-specialist.md` suffix here previously risked writing a companion file
88
+ * Copilot's own surfaces don't discover at all. Per-skill naming is
89
+ * `<name>.agent.md`, not `<name>-specialist.md`.
90
+ * - `opencode`: `AGENT_SHIM_TARGETS.opencode` likewise has a real, non-null
91
+ * entry — `~/.config/opencode/agents/skillsmith-agent.md` (plural
92
+ * `agents/`, Step-6 verified against opencode.ai/docs/agents/ per that
93
+ * table's own header comment). Its DIRECTORY
94
+ * (`~/.config/opencode/agents/`) is cited here as independent evidence of
95
+ * OpenCode's own agents-dir convention, filename likewise not reused.
96
+ * - `cursor`: `AGENT_SHIM_TARGETS.cursor` is `null` — NOT a directory value,
97
+ * just documentation that Cursor 2.4+ reads `.claude/agents/` natively
98
+ * (per that table's own comment). That happens to coincide with the
99
+ * default below, but it is not being "cited as evidence" for a distinct
100
+ * value — cursor defaults like any client with no independent evidence.
101
+ * - `windsurf`, `agents`, `hermes`, `grok`: none of these are even members
102
+ * of the narrower `HarnessId` enum `AGENT_SHIM_TARGETS` is keyed on, so
103
+ * there is no table entry to consult either way. Every one of these
104
+ * defaults to today's actual behavior — the same `~/.claude/agents/`
105
+ * value every client gets today.
106
+ * - `antigravity` (SMI-5982 Wave 6): NOT a `HarnessId` member either, but
107
+ * unlike the clients above, it does NOT default to the shared
108
+ * `~/.claude/agents/` value — Antigravity has its own independently
109
+ * web-verified convention (live search against
110
+ * antigravity.google/docs/cli/commands/agents, 2026-08-11), and it is a
111
+ * directory-package, not a flat file. No existing global-vs-project
112
+ * install-mode distinction exists anywhere in this CLI (grepped
113
+ * `--global`/`--project`/`isGlobal`/`globalScope`, zero hits) — this
114
+ * entry therefore defaults to PROJECT-scoped (`.agents/agents/<name>/agent.md`,
115
+ * relative to the invocation directory, i.e. `dir` here is a RELATIVE
116
+ * path, unlike every other entry's `homedir()`-anchored absolute path).
117
+ * Global scope (`~/.gemini/config/agents/<name>/agent.md`) is an explicit
118
+ * fast-follow, not implemented here — see the SMI-5982 Linear comment.
119
+ */
120
+ export declare const COMPANION_AGENT_TARGETS: Record<ClientId, CompanionAgentTarget>;
121
+ /** Resolve the companion-agent target descriptor for `client` (default: canonical). */
122
+ export declare function getCompanionAgentTarget(client?: ClientId): CompanionAgentTarget;
123
+ /**
124
+ * Resolve just the companion-agent output directory for `client` (default:
125
+ * canonical). For `fileMode: 'directory-package'` clients (Antigravity), this
126
+ * is the SHARED PARENT of every skill's own `<name>/` package, not the final
127
+ * per-skill directory — use {@link resolveCompanionAgentPath} (and its
128
+ * `path.dirname()`) to get the actual per-skill directory a file lands in.
129
+ */
130
+ export declare function resolveCompanionAgentDir(client?: ClientId): string;
131
+ /**
132
+ * Resolve the full on-disk companion-subagent file path for `client` +
133
+ * `skillName` (default client: canonical / `claude-code`).
134
+ *
135
+ * Two `fileMode`s (SMI-5982 Wave 6):
136
+ * - `'flat'`: `<dir>/<filenamePattern with {name} substituted>` — one file
137
+ * directly inside the shared client agents dir (all clients but Antigravity).
138
+ * - `'directory-package'`: `<dir>/<skillName>/<filenamePattern>` — a
139
+ * per-skill subdirectory containing a fixed-name file (Antigravity only
140
+ * today; `filenamePattern` carries no `{name}` token in this mode, since
141
+ * the skill name is the directory segment instead).
142
+ *
143
+ * SMI-5982 code-review fix #1 (BLOCKING, cwd-dependent resolution): Antigravity's
144
+ * `dir` is the only RELATIVE entry in `COMPANION_AGENT_TARGETS` — every other
145
+ * client's `dir` is `homedir()`-anchored absolute. A relative `dir` used to be
146
+ * resolved IMPLICITLY by whichever `fs` call eventually consumed the returned
147
+ * path, against that call's `process.cwd()` at THAT moment. For a short-lived
148
+ * CLI process cwd is genuinely the user's invocation directory, but for the
149
+ * long-running MCP server cwd is fixed at server launch and generally does
150
+ * NOT track the calling editor/agent's actual project — silently writing into
151
+ * an unrelated directory. `baseDir` makes the resolution root an explicit,
152
+ * caller-controlled parameter instead: every caller now decides what "cwd"
153
+ * means for its own lifecycle, rather than the process's ambient cwd deciding
154
+ * for it. Applied unconditionally via `isAbsolute()` (not gated to
155
+ * `directory-package` mode) so the function stays correct if a future client
156
+ * ever adds a relative `flat`-mode `dir` too — today's flat-mode clients are
157
+ * all absolute already, so this is a no-op for them.
158
+ *
159
+ * SMI-5982 code-review fix #2 (BLOCKING, path traversal): in `directory-package`
160
+ * mode, `skillName` becomes ITS OWN path segment (`<dir>/<skillName>/...`), so
161
+ * an unsanitized `skillName === '..'` would `path.join`-normalize to
162
+ * `<parent-of-dir>/agent.md` — escaping the intended companion-agent
163
+ * namespace entirely. `flat` mode never had this exact exposure (`skillName`
164
+ * there is embedded INSIDE a suffixed filename via `.replace()`, a literal
165
+ * filename component, not a traversal directive). Every current caller of
166
+ * `writeInstallFiles()` already sanitizes `skillName` upstream, but this is a
167
+ * general, exported, reusable function with no validation of its own — per
168
+ * this codebase's own stated principle (see `skillNameFromSkillId()`'s doc
169
+ * comment, skill-installation.content.ts): the actual disk-write boundary is
170
+ * the last line of defense regardless of what any upstream caller does, since
171
+ * a future caller could bypass upstream sanitization entirely.
172
+ *
173
+ * PR-review fix (BLOCKING, SMI-5982 follow-up): the previous `baseDir: string =
174
+ * process.cwd()` default only closed the bug for callers that happened to run in
175
+ * a short-lived process whose cwd IS the caller's real project — the MCP
176
+ * `install_skill` tool fix (this same PR) proved that out. It did nothing for
177
+ * every OTHER production call site, including the long-running MCP server's
178
+ * `private_registry_manage(action:"install")` path, which never threaded a
179
+ * `companionBaseDir` through and would silently keep resolving against the
180
+ * server process's ambient `process.cwd()`. `baseDir` is now **required**
181
+ * (`string | undefined`, no default) whenever `target.fileMode ===
182
+ * 'directory-package'` — every current `directory-package` client
183
+ * (Antigravity, today the only one) has a relative `dir`, so this throws
184
+ * unless a caller explicitly opts in with a real base directory. Gated on
185
+ * `fileMode` alone (not also `isAbsolute(target.dir)`) so the requirement is
186
+ * structural for the whole mode, not conditional on today's particular
187
+ * client happening to have a relative `dir` — a future `directory-package`
188
+ * client added with an absolute `dir` still must not silently accept a
189
+ * missing `baseDir`. This closes the class of bug BY CONSTRUCTION for every
190
+ * current and future caller, instead of requiring every call site to be
191
+ * individually audited (the exact mistake the first fix commit made).
192
+ * `flat`-mode clients are entirely unaffected: the guard below can never
193
+ * fire for them regardless of whether `baseDir` is passed.
194
+ */
195
+ export declare function resolveCompanionAgentPath(skillName: string, client?: ClientId, baseDir?: string): string;
42
196
  //# sourceMappingURL=paths.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../../src/install/paths.ts"],"names":[],"mappings":"AA0CA,MAAM,MAAM,QAAQ,GAChB,aAAa,GACb,QAAQ,GACR,SAAS,GACT,UAAU,GACV,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,MAAM,CAAA;AAEV,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CASxD,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,QAAwB,CAAA;AAEvD;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAS1D,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,aAAa,CAAC,QAAQ,CAS7C,CAAA;AAEF,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAED,wBAAgB,cAAc,CAAC,MAAM,GAAE,QAA2B,GAAG,MAAM,CAE1E;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,KAAK,IAAI,QAAQ,CAOxE;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,CAIjE;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAGvE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,IAAI,KAAK,CAAC;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,QAAQ,EAAE,MAAM,GAAG,mBAAmB,CAAA;IACtC,eAAe,EAAE,MAAM,CAAA;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,QAAQ,EAAE,oBAAoB,CAgF1E,CAAA;AAED,uFAAuF;AACvF,wBAAgB,uBAAuB,CAAC,MAAM,GAAE,QAA2B,GAAG,oBAAoB,CAEjG;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,GAAE,QAA2B,GAAG,MAAM,CAEpF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,EACjB,MAAM,GAAE,QAA2B,EACnC,OAAO,CAAC,EAAE,MAAM,GACf,MAAM,CA2BR"}
@@ -10,7 +10,7 @@
10
10
  */
11
11
  import { existsSync } from 'node:fs';
12
12
  import { homedir } from 'node:os';
13
- import { join } from 'node:path';
13
+ import { isAbsolute, join, resolve } from 'node:path';
14
14
  export const CLIENT_NATIVE_PATHS = {
15
15
  'claude-code': join(homedir(), '.claude', 'skills'),
16
16
  cursor: join(homedir(), '.cursor', 'skills'),
@@ -20,6 +20,7 @@ export const CLIENT_NATIVE_PATHS = {
20
20
  opencode: join(homedir(), '.config', 'opencode', 'skills'),
21
21
  hermes: join(homedir(), '.hermes', 'skills'),
22
22
  grok: join(homedir(), '.grok', 'skills'),
23
+ antigravity: join(homedir(), '.gemini', 'config', 'skills'),
23
24
  };
24
25
  export const CANONICAL_CLIENT = 'claude-code';
25
26
  /**
@@ -40,6 +41,7 @@ export const CLIENT_DISPLAY_LABELS = {
40
41
  opencode: 'OpenCode',
41
42
  hermes: 'Hermes',
42
43
  grok: 'Grok Build',
44
+ antigravity: 'Antigravity',
43
45
  };
44
46
  export const CLIENT_IDS = Object.freeze([
45
47
  'claude-code',
@@ -50,6 +52,7 @@ export const CLIENT_IDS = Object.freeze([
50
52
  'opencode',
51
53
  'hermes',
52
54
  'grok',
55
+ 'antigravity',
53
56
  ]);
54
57
  export function getCanonicalInstallPath() {
55
58
  return CLIENT_NATIVE_PATHS[CANONICAL_CLIENT];
@@ -100,4 +103,235 @@ export function enumerateHarnessPresence() {
100
103
  };
101
104
  });
102
105
  }
106
+ /**
107
+ * Populated conservatively per the SMI-5980 plan review, to fix the
108
+ * hardcoding/architecture bug (making this resolvable per client at all)
109
+ * WITHOUT inventing new, unverified per-client directory values:
110
+ *
111
+ * - `claude-code`: today's actual confirmed hardcoded value
112
+ * (`~/.claude/agents/<skillName>-specialist.md`) — this must exactly match
113
+ * pre-Wave-3 behavior (`skill-installation.io.ts`'s prior
114
+ * `path.join(os.homedir(), '.claude', 'agents')` literal and
115
+ * `author/utils.ts`'s prior `ensureAgentsDirectory()` default).
116
+ * - `copilot`: `AGENT_SHIM_TARGETS.copilot` (agent-harness-targets.ts) has a
117
+ * real, non-null entry for the SAME underlying tool —
118
+ * `~/.copilot/agents/skillsmith-agent.agent.md`. Both its DIRECTORY
119
+ * (`~/.copilot/agents/`) AND its `.agent.md` EXTENSION are cited here as
120
+ * independent evidence (corroborated by shims.ts's own doc comment:
121
+ * "Copilot `.agent.md` (Copilot cloud-agent + CLI surfaces, which do not
122
+ * read `.claude/agents`)") — PR-review finding (BLOCKING): a plain
123
+ * `-specialist.md` suffix here previously risked writing a companion file
124
+ * Copilot's own surfaces don't discover at all. Per-skill naming is
125
+ * `<name>.agent.md`, not `<name>-specialist.md`.
126
+ * - `opencode`: `AGENT_SHIM_TARGETS.opencode` likewise has a real, non-null
127
+ * entry — `~/.config/opencode/agents/skillsmith-agent.md` (plural
128
+ * `agents/`, Step-6 verified against opencode.ai/docs/agents/ per that
129
+ * table's own header comment). Its DIRECTORY
130
+ * (`~/.config/opencode/agents/`) is cited here as independent evidence of
131
+ * OpenCode's own agents-dir convention, filename likewise not reused.
132
+ * - `cursor`: `AGENT_SHIM_TARGETS.cursor` is `null` — NOT a directory value,
133
+ * just documentation that Cursor 2.4+ reads `.claude/agents/` natively
134
+ * (per that table's own comment). That happens to coincide with the
135
+ * default below, but it is not being "cited as evidence" for a distinct
136
+ * value — cursor defaults like any client with no independent evidence.
137
+ * - `windsurf`, `agents`, `hermes`, `grok`: none of these are even members
138
+ * of the narrower `HarnessId` enum `AGENT_SHIM_TARGETS` is keyed on, so
139
+ * there is no table entry to consult either way. Every one of these
140
+ * defaults to today's actual behavior — the same `~/.claude/agents/`
141
+ * value every client gets today.
142
+ * - `antigravity` (SMI-5982 Wave 6): NOT a `HarnessId` member either, but
143
+ * unlike the clients above, it does NOT default to the shared
144
+ * `~/.claude/agents/` value — Antigravity has its own independently
145
+ * web-verified convention (live search against
146
+ * antigravity.google/docs/cli/commands/agents, 2026-08-11), and it is a
147
+ * directory-package, not a flat file. No existing global-vs-project
148
+ * install-mode distinction exists anywhere in this CLI (grepped
149
+ * `--global`/`--project`/`isGlobal`/`globalScope`, zero hits) — this
150
+ * entry therefore defaults to PROJECT-scoped (`.agents/agents/<name>/agent.md`,
151
+ * relative to the invocation directory, i.e. `dir` here is a RELATIVE
152
+ * path, unlike every other entry's `homedir()`-anchored absolute path).
153
+ * Global scope (`~/.gemini/config/agents/<name>/agent.md`) is an explicit
154
+ * fast-follow, not implemented here — see the SMI-5982 Linear comment.
155
+ */
156
+ export const COMPANION_AGENT_TARGETS = {
157
+ 'claude-code': {
158
+ dir: join(homedir(), '.claude', 'agents'),
159
+ fileMode: 'flat',
160
+ filenamePattern: '{name}-specialist.md',
161
+ },
162
+ cursor: {
163
+ // AGENT_SHIM_TARGETS.cursor is null (no distinct value) — defaults like
164
+ // every client with no independent evidence. See doc comment above.
165
+ dir: join(homedir(), '.claude', 'agents'),
166
+ fileMode: 'flat',
167
+ filenamePattern: '{name}-specialist.md',
168
+ },
169
+ copilot: {
170
+ // PR-review finding (BLOCKING): both dir AND filename are now cited
171
+ // from AGENT_SHIM_TARGETS.copilot (agent-harness-targets.ts:156,
172
+ // `skillsmith-agent.agent.md`) and shims.ts's own doc comment ("Copilot
173
+ // `.agent.md` (Copilot cloud-agent + CLI surfaces, which do not read
174
+ // `.claude/agents`)") -- this codebase already has independently
175
+ // verified evidence that Copilot's real companion-agent format is
176
+ // `<name>.agent.md`, not the generic `-specialist.md` suffix every
177
+ // other client here defaults to. Writing plain `.md` risked producing
178
+ // an undiscoverable companion file.
179
+ dir: join(homedir(), '.copilot', 'agents'),
180
+ fileMode: 'flat',
181
+ filenamePattern: '{name}.agent.md',
182
+ },
183
+ windsurf: {
184
+ // No AGENT_SHIM_TARGETS entry exists for windsurf (not a HarnessId
185
+ // member) — defaults to today's actual behavior.
186
+ dir: join(homedir(), '.claude', 'agents'),
187
+ fileMode: 'flat',
188
+ filenamePattern: '{name}-specialist.md',
189
+ },
190
+ agents: {
191
+ // No AGENT_SHIM_TARGETS entry exists for `agents` (not a HarnessId
192
+ // member) — defaults to today's actual behavior.
193
+ dir: join(homedir(), '.claude', 'agents'),
194
+ fileMode: 'flat',
195
+ filenamePattern: '{name}-specialist.md',
196
+ },
197
+ opencode: {
198
+ // Directory cited from AGENT_SHIM_TARGETS.opencode (agent-harness-targets.ts)
199
+ // as independent evidence of OpenCode's own agents-dir convention.
200
+ // Filename pattern is this map's own naming, not copied from that table.
201
+ dir: join(homedir(), '.config', 'opencode', 'agents'),
202
+ fileMode: 'flat',
203
+ filenamePattern: '{name}-specialist.md',
204
+ },
205
+ hermes: {
206
+ // No AGENT_SHIM_TARGETS entry exists for hermes (not a HarnessId
207
+ // member) — defaults to today's actual behavior.
208
+ dir: join(homedir(), '.claude', 'agents'),
209
+ fileMode: 'flat',
210
+ filenamePattern: '{name}-specialist.md',
211
+ },
212
+ grok: {
213
+ // No AGENT_SHIM_TARGETS entry exists for grok (not a HarnessId member)
214
+ // — defaults to today's actual behavior.
215
+ dir: join(homedir(), '.claude', 'agents'),
216
+ fileMode: 'flat',
217
+ filenamePattern: '{name}-specialist.md',
218
+ },
219
+ antigravity: {
220
+ // SMI-5982 (Wave 6): directory-package mode, not flat — confirmed via a
221
+ // live web search against antigravity.google/docs/cli/commands/agents
222
+ // (2026-08-11): each agent is a directory `<name>/` containing a single
223
+ // `agent.md` (YAML frontmatter: `name`, `description` only — no
224
+ // `subagent:` field or equivalent exists in the real schema, confirming
225
+ // the plan's decision NOT to emit one). `dir` is intentionally a
226
+ // RELATIVE path (`.agents/agents`, resolved against the process's
227
+ // invocation directory by Node's fs calls) — project-scoped, per Step 1
228
+ // of the SMI-5982 plan: this CLI has no existing global-vs-project
229
+ // install-mode distinction to hook into, so this defaults to
230
+ // project-scoped rather than inventing scope-detection logic. Global
231
+ // scope (`~/.gemini/config/agents/`) is an explicit fast-follow.
232
+ dir: join('.agents', 'agents'),
233
+ fileMode: 'directory-package',
234
+ filenamePattern: 'agent.md',
235
+ },
236
+ };
237
+ /** Resolve the companion-agent target descriptor for `client` (default: canonical). */
238
+ export function getCompanionAgentTarget(client = CANONICAL_CLIENT) {
239
+ return COMPANION_AGENT_TARGETS[client];
240
+ }
241
+ /**
242
+ * Resolve just the companion-agent output directory for `client` (default:
243
+ * canonical). For `fileMode: 'directory-package'` clients (Antigravity), this
244
+ * is the SHARED PARENT of every skill's own `<name>/` package, not the final
245
+ * per-skill directory — use {@link resolveCompanionAgentPath} (and its
246
+ * `path.dirname()`) to get the actual per-skill directory a file lands in.
247
+ */
248
+ export function resolveCompanionAgentDir(client = CANONICAL_CLIENT) {
249
+ return getCompanionAgentTarget(client).dir;
250
+ }
251
+ /**
252
+ * Resolve the full on-disk companion-subagent file path for `client` +
253
+ * `skillName` (default client: canonical / `claude-code`).
254
+ *
255
+ * Two `fileMode`s (SMI-5982 Wave 6):
256
+ * - `'flat'`: `<dir>/<filenamePattern with {name} substituted>` — one file
257
+ * directly inside the shared client agents dir (all clients but Antigravity).
258
+ * - `'directory-package'`: `<dir>/<skillName>/<filenamePattern>` — a
259
+ * per-skill subdirectory containing a fixed-name file (Antigravity only
260
+ * today; `filenamePattern` carries no `{name}` token in this mode, since
261
+ * the skill name is the directory segment instead).
262
+ *
263
+ * SMI-5982 code-review fix #1 (BLOCKING, cwd-dependent resolution): Antigravity's
264
+ * `dir` is the only RELATIVE entry in `COMPANION_AGENT_TARGETS` — every other
265
+ * client's `dir` is `homedir()`-anchored absolute. A relative `dir` used to be
266
+ * resolved IMPLICITLY by whichever `fs` call eventually consumed the returned
267
+ * path, against that call's `process.cwd()` at THAT moment. For a short-lived
268
+ * CLI process cwd is genuinely the user's invocation directory, but for the
269
+ * long-running MCP server cwd is fixed at server launch and generally does
270
+ * NOT track the calling editor/agent's actual project — silently writing into
271
+ * an unrelated directory. `baseDir` makes the resolution root an explicit,
272
+ * caller-controlled parameter instead: every caller now decides what "cwd"
273
+ * means for its own lifecycle, rather than the process's ambient cwd deciding
274
+ * for it. Applied unconditionally via `isAbsolute()` (not gated to
275
+ * `directory-package` mode) so the function stays correct if a future client
276
+ * ever adds a relative `flat`-mode `dir` too — today's flat-mode clients are
277
+ * all absolute already, so this is a no-op for them.
278
+ *
279
+ * SMI-5982 code-review fix #2 (BLOCKING, path traversal): in `directory-package`
280
+ * mode, `skillName` becomes ITS OWN path segment (`<dir>/<skillName>/...`), so
281
+ * an unsanitized `skillName === '..'` would `path.join`-normalize to
282
+ * `<parent-of-dir>/agent.md` — escaping the intended companion-agent
283
+ * namespace entirely. `flat` mode never had this exact exposure (`skillName`
284
+ * there is embedded INSIDE a suffixed filename via `.replace()`, a literal
285
+ * filename component, not a traversal directive). Every current caller of
286
+ * `writeInstallFiles()` already sanitizes `skillName` upstream, but this is a
287
+ * general, exported, reusable function with no validation of its own — per
288
+ * this codebase's own stated principle (see `skillNameFromSkillId()`'s doc
289
+ * comment, skill-installation.content.ts): the actual disk-write boundary is
290
+ * the last line of defense regardless of what any upstream caller does, since
291
+ * a future caller could bypass upstream sanitization entirely.
292
+ *
293
+ * PR-review fix (BLOCKING, SMI-5982 follow-up): the previous `baseDir: string =
294
+ * process.cwd()` default only closed the bug for callers that happened to run in
295
+ * a short-lived process whose cwd IS the caller's real project — the MCP
296
+ * `install_skill` tool fix (this same PR) proved that out. It did nothing for
297
+ * every OTHER production call site, including the long-running MCP server's
298
+ * `private_registry_manage(action:"install")` path, which never threaded a
299
+ * `companionBaseDir` through and would silently keep resolving against the
300
+ * server process's ambient `process.cwd()`. `baseDir` is now **required**
301
+ * (`string | undefined`, no default) whenever `target.fileMode ===
302
+ * 'directory-package'` — every current `directory-package` client
303
+ * (Antigravity, today the only one) has a relative `dir`, so this throws
304
+ * unless a caller explicitly opts in with a real base directory. Gated on
305
+ * `fileMode` alone (not also `isAbsolute(target.dir)`) so the requirement is
306
+ * structural for the whole mode, not conditional on today's particular
307
+ * client happening to have a relative `dir` — a future `directory-package`
308
+ * client added with an absolute `dir` still must not silently accept a
309
+ * missing `baseDir`. This closes the class of bug BY CONSTRUCTION for every
310
+ * current and future caller, instead of requiring every call site to be
311
+ * individually audited (the exact mistake the first fix commit made).
312
+ * `flat`-mode clients are entirely unaffected: the guard below can never
313
+ * fire for them regardless of whether `baseDir` is passed.
314
+ */
315
+ export function resolveCompanionAgentPath(skillName, client = CANONICAL_CLIENT, baseDir) {
316
+ const target = getCompanionAgentTarget(client);
317
+ if (target.fileMode === 'directory-package' && baseDir === undefined) {
318
+ throw new Error(`resolveCompanionAgentPath: client "${client}" uses directory-package mode with a ` +
319
+ `relative companion-agent directory, so an explicit baseDir is required — it cannot ` +
320
+ `safely default to process.cwd() (a long-running MCP server's cwd does not track the ` +
321
+ `calling client's real project; see SMI-5982 PR review).`);
322
+ }
323
+ const resolvedDir = isAbsolute(target.dir) ? target.dir : resolve(baseDir, target.dir);
324
+ if (target.fileMode === 'directory-package') {
325
+ if (skillName === '' ||
326
+ skillName === '.' ||
327
+ skillName === '..' ||
328
+ skillName.includes('/') ||
329
+ skillName.includes('\\')) {
330
+ throw new Error(`Unsafe skill name for directory-package companion path: ${JSON.stringify(skillName)}`);
331
+ }
332
+ return join(resolvedDir, skillName, target.filenamePattern);
333
+ }
334
+ const filename = target.filenamePattern.replace('{name}', skillName);
335
+ return join(resolvedDir, filename);
336
+ }
103
337
  //# sourceMappingURL=paths.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../../src/install/paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAwChC,MAAM,CAAC,MAAM,mBAAmB,GAA6B;IAC3D,aAAa,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,QAAQ,CAAC;IACnD,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,QAAQ,CAAC;IAC5C,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,QAAQ,CAAC;IAC9C,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,CAAC;IAC3D,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,QAAQ,CAAC;IAC5C,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,CAAC;IAC1D,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,QAAQ,CAAC;IAC5C,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,CAAC;CACzC,CAAA;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAa,aAAa,CAAA;AAEvD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAA6B;IAC7D,aAAa,EAAE,aAAa;IAC5B,MAAM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