@cg3/equip 0.2.20 → 0.2.22

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 (2) hide show
  1. package/demo/setup.js +25 -14
  2. package/package.json +1 -1
package/demo/setup.js CHANGED
@@ -51,7 +51,7 @@ const platformOverride = args.includes("--platform")
51
51
  // This is the core configuration. Replace these values with
52
52
  // your actual MCP server details.
53
53
 
54
- const TOOL_NAME = "my-tool"; // Name in MCP config files
54
+ const TOOL_NAME = "acme-docs"; // Name in MCP config files
55
55
  const SERVER_URL = "https://api.example.com/mcp"; // Your MCP endpoint
56
56
  const RULES_VERSION = "0.1.0"; // Bump when rules content changes
57
57
 
@@ -65,14 +65,14 @@ const RULES_VERSION = "0.1.0"; // Bump when rules content changes
65
65
  // <!-- /marker -->
66
66
 
67
67
  const RULES_CONTENT = `<!-- ${TOOL_NAME}:v${RULES_VERSION} -->
68
- ## My Tool — Agent Instructions
68
+ ## Acme Docs — Agent Instructions
69
69
 
70
- When you encounter an error you haven't seen before:
71
- 1. Search my-tool for existing solutions before debugging from scratch
72
- 2. If you find a match, try it and give feedback (useful/not_useful/irrelevant)
73
- 3. If you solve something novel, contribute the solution
70
+ When working with Acme APIs or libraries:
71
+ 1. Use the acme-docs tool to look up current API signatures before guessing
72
+ 2. Check for deprecation notices Acme ships breaking changes quarterly
73
+ 3. Prefer the code examples from acme-docs over generic web search results
74
74
 
75
- Keep searches focused on the error message, not the goal.
75
+ The tool returns versioned docs matching your project's dependency version.
76
76
  <!-- /${TOOL_NAME} -->`;
77
77
 
78
78
  // ─── 4. Create the Equip instance ───────────────────────────
@@ -105,15 +105,18 @@ const equip = new Equip({
105
105
  // events in supported platforms (currently Claude Code only).
106
106
  // hooks: [
107
107
  // {
108
- // event: "PostToolUseFailure",
109
- // matcher: "Bash",
110
- // name: "search-on-error",
108
+ // event: "PostToolUse",
109
+ // matcher: "Write|Edit",
110
+ // name: "check-api-version",
111
111
  // script: `
112
- // // This runs after a Bash tool call fails.
112
+ // // This runs after a Write or Edit tool call completes.
113
113
  // // Hook scripts receive context via stdin (JSON).
114
114
  // const input = require("fs").readFileSync("/dev/stdin", "utf-8");
115
- // const { tool_input, tool_output } = JSON.parse(input);
116
- // console.log("Consider searching my-tool for:", tool_output?.stderr);
115
+ // const { tool_input } = JSON.parse(input);
116
+ // // Remind the agent to verify API versions after editing code
117
+ // if (tool_input?.file_path?.endsWith(".ts") || tool_input?.file_path?.endsWith(".js")) {
118
+ // console.log("Reminder: verify API versions with acme-docs after code changes.");
119
+ // }
117
120
  // `,
118
121
  // },
119
122
  // ],
@@ -281,7 +284,15 @@ async function runInstall() {
281
284
  cli.ok(`${platformName(p.platform)} → rules updated`);
282
285
  break;
283
286
  case "skipped":
284
- cli.info(`${platformName(p.platform)} already current`);
287
+ // "skipped" can mean two things:
288
+ // 1. Rules already at this version (rulesPath exists, marker version matches)
289
+ // 2. Platform has no writable rules path (rulesPath is null)
290
+ // Distinguish them so the output isn't misleading.
291
+ if (p.rulesPath) {
292
+ cli.info(`${platformName(p.platform)} → already current`);
293
+ } else {
294
+ cli.info(`${platformName(p.platform)} → no rules path (MCP-only platform)`);
295
+ }
285
296
  break;
286
297
  case "clipboard":
287
298
  cli.info(`${platformName(p.platform)} → copied to clipboard (paste into settings)`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cg3/equip",
3
- "version": "0.2.20",
3
+ "version": "0.2.22",
4
4
  "description": "Universal MCP + behavioral rules installer for AI coding agents",
5
5
  "main": "index.js",
6
6
  "bin": {