backstep 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.
Files changed (2) hide show
  1. package/dist/setup.js +8 -1
  2. package/package.json +1 -1
package/dist/setup.js CHANGED
@@ -89,7 +89,14 @@ export async function setup() {
89
89
  const cli = join(root, "dist", "cli.js");
90
90
  // Without `backstep` on the PATH, the commands printed below go through npx.
91
91
  const bs = onPath ? "backstep" : "npx -y backstep";
92
- const r = run("claude", ["plugin", "install", "backstep", "--marketplace", join(root, "mod"), "--config", `cli=${cli}`]);
92
+ const install = () => run("claude", ["plugin", "install", "backstep", "--marketplace", join(root, "mod"), "--config", `cli=${cli}`]);
93
+ let r = install();
94
+ // Installed before from another copy (the file a person was given, or ~/.backstep before npm worked):
95
+ // Claude Code keeps one source per name, so swap the old one for this.
96
+ if (!r.ok && /already added from a different source/i.test(r.out)) {
97
+ run("claude", ["plugin", "marketplace", "remove", "backstep"]);
98
+ r = install();
99
+ }
93
100
  if (!r.ok)
94
101
  throw new Error(`claude plugin install failed:\n${r.out}`);
95
102
  // Only a problem is worth a line here; the summary below says the rest.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backstep",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Undo for everything your agents touch: an MCP proxy that makes agent actions reversible.",
5
5
  "scripts": {
6
6
  "dev": "node src/cli.ts",