llm-relay 0.68.5 → 0.68.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "llm-relay",
3
- "version": "0.68.5",
3
+ "version": "0.68.6",
4
4
  "description": "Loopback bidirectional Anthropic/OpenAI API proxy with tool-call validation and multi-provider routing.",
5
5
  "type": "module",
6
6
  "engines": {
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * Install/refresh the llm-relay skill for Claude Code, Codex and OpenCode from the same
4
- * shipped source (skills/llm-relay/SKILL.md), and provision Codex's global provider plus the
5
- * host-independent MCP dispatch entry point.
3
+ * Install/refresh the llm-relay skill bundle for Claude Code, Codex and OpenCode from the same
4
+ * shipped source directory, and provision Codex's global provider plus the host-independent MCP
5
+ * dispatch entry point.
6
6
  *
7
7
  * Runs from npm `postinstall`, but only acts on GLOBAL installs (`npm i -g llm-relay`)
8
8
  * so that a repo-local `npm install` (dev checkout, CI) never touches the developer's
@@ -152,8 +152,17 @@ try {
152
152
  process.exit(0); // local/dev install — leave the user's host skill directories alone
153
153
  }
154
154
 
155
- const src = join(here, "..", "skills", "llm-relay", "SKILL.md");
156
- if (!existsSync(src)) skipAll(`this package does not contain ${src}`);
155
+ const skillSourceDir = join(here, "..", "skills", "llm-relay");
156
+ const skillFiles = [
157
+ "SKILL.md",
158
+ join("references", "direct-routing.md"),
159
+ join("references", "dispatch-lanes.md"),
160
+ join("references", "operations.md"),
161
+ ];
162
+ for (const relativePath of skillFiles) {
163
+ const sourcePath = join(skillSourceDir, relativePath);
164
+ if (!existsSync(sourcePath)) skipAll(`this package does not contain ${sourcePath}`);
165
+ }
157
166
 
158
167
  const home = homedir();
159
168
  // OpenCode keeps its configuration under the XDG config dir, unlike Claude Code and Codex which
@@ -163,18 +172,22 @@ try {
163
172
  const xdgConfig = process.env.XDG_CONFIG_HOME;
164
173
  const configHome = xdgConfig && xdgConfig.trim() !== "" ? xdgConfig : join(home, ".config");
165
174
  const targets = [
166
- { host: "Claude Code", dest: join(home, ".claude", "skills", "llm-relay", "SKILL.md") },
167
- { host: "Codex", dest: join(home, ".codex", "skills", "llm-relay", "SKILL.md") },
168
- { host: "OpenCode", dest: join(configHome, "opencode", "skills", "llm-relay", "SKILL.md") },
175
+ { host: "Claude Code", destDir: join(home, ".claude", "skills", "llm-relay") },
176
+ { host: "Codex", destDir: join(home, ".codex", "skills", "llm-relay") },
177
+ { host: "OpenCode", destDir: join(configHome, "opencode", "skills", "llm-relay") },
169
178
  ];
170
179
 
171
- // Keep host failures independent: a broken ~/.claude must not prevent Codex from receiving
172
- // the same canonical description, or vice versa.
173
- for (const { host, dest } of targets) {
180
+ // Keep host failures independent: broken ~/.claude must not prevent Codex from receiving the
181
+ // same canonical bundle, or vice versa. Copy every reference before reporting that host installed;
182
+ // a SKILL.md whose routed references are absent is not a usable installation.
183
+ for (const { host, destDir } of targets) {
174
184
  try {
175
- mkdirSync(dirname(dest), { recursive: true });
176
- copyFileSync(src, dest);
177
- process.stderr.write(`llm-relay: installed ${host} skill at ${dest}\n`);
185
+ for (const relativePath of skillFiles) {
186
+ const dest = join(destDir, relativePath);
187
+ mkdirSync(dirname(dest), { recursive: true });
188
+ copyFileSync(join(skillSourceDir, relativePath), dest);
189
+ }
190
+ process.stderr.write(`llm-relay: installed ${host} skill bundle at ${destDir}\n`);
178
191
  } catch (e) {
179
192
  process.stderr.write(`llm-relay: ${host} skill not installed — ${e?.message ?? e}\n`);
180
193
  }