moshcode 0.29.0 → 0.29.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.
package/README.md CHANGED
@@ -392,10 +392,16 @@ The equivalent by hand:
392
392
 
393
393
  ```sh
394
394
  claude plugin marketplace add moshcoder/moshcode
395
+ claude plugin marketplace update moshcode # `add` is a no-op if you already have it
395
396
  claude plugin install stocks@moshcode
396
397
  claude plugin install crypto@moshcode
397
398
  ```
398
399
 
400
+ The `update` line matters if you have ever installed from this marketplace
401
+ before: `add` declines to do anything for a marketplace already on disk, so
402
+ without a refresh the install reads a stale copy and fails with "not found in
403
+ any marketplace". `moshcode plugin install` runs both steps for you.
404
+
399
405
  ### Upgrading from `ticker@moshcode`
400
406
 
401
407
  `stocks` was called `ticker` before v0.29.0. Installing the new id does **not**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moshcode",
3
- "version": "0.29.0",
3
+ "version": "0.29.1",
4
4
  "type": "module",
5
5
  "description": "moshcode — a metal wrapper for coding engines and native UGig/CoinPay workflow CLIs, with OpenPRD and moshscript",
6
6
  "repository": {
@@ -27,6 +27,7 @@ Or straight from Claude Code:
27
27
 
28
28
  ```bash
29
29
  claude plugin marketplace add moshcoder/moshcode
30
+ claude plugin marketplace update moshcode # `add` is a no-op if you already have it
30
31
  claude plugin install crypto@moshcode
31
32
  ```
32
33
 
@@ -41,6 +41,7 @@ Or straight from Claude Code:
41
41
 
42
42
  ```bash
43
43
  claude plugin marketplace add moshcoder/moshcode
44
+ claude plugin marketplace update moshcode # `add` is a no-op if you already have it
44
45
  claude plugin install stocks@moshcode
45
46
  ```
46
47
 
package/src/plugins.mjs CHANGED
@@ -82,15 +82,29 @@ export function pluginId(name) {
82
82
  /**
83
83
  * The commands one engine needs to install a plugin.
84
84
  *
85
- * Adding the marketplace is idempotent and separate from installing, so it runs
86
- * every time: a machine that added the marketplace before this plugin existed
87
- * would otherwise fail the install with "not found in any marketplace".
85
+ * Both marketplace steps run every time, and they do different jobs:
86
+ *
87
+ * add — makes the marketplace exist. A no-op when it is already on disk,
88
+ * which is exactly why it is not sufficient on its own.
89
+ * update — re-fetches it. Without this, a machine that added the marketplace
90
+ * before a plugin existed installs from its stale local copy and
91
+ * fails with "not found in any marketplace" — the failure `add` was
92
+ * supposed to prevent and cannot, because it declines to do anything
93
+ * for a marketplace it already has.
94
+ *
95
+ * That gap is not theoretical: it broke `plugin install crypto` in v0.27.0 and
96
+ * `plugin install stocks` in v0.29.0, on every machine that had installed a
97
+ * plugin from this marketplace beforehand — which is all of them.
98
+ *
99
+ * `marketplace update` takes the marketplace *name*, not the source, and
100
+ * accepts no --scope.
88
101
  */
89
102
  export function pluginInstallActions(key, { plugin, source, scope }) {
90
103
  switch (key) {
91
104
  case "claude":
92
105
  return [
93
106
  { cmd: "claude", args: ["plugin", "marketplace", "add", source, ...(scope ? ["--scope", scope] : [])] },
107
+ { cmd: "claude", args: ["plugin", "marketplace", "update", MARKETPLACE_NAME] },
94
108
  { cmd: "claude", args: ["plugin", "install", pluginId(plugin.name), ...(scope ? ["--scope", scope] : [])] },
95
109
  ];
96
110
  default: