dsh-plugin-shop 0.7.1 → 0.7.2-beta.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/lib/index.js CHANGED
@@ -405,7 +405,13 @@ const dataSchema = z.object({
405
405
  name: z.string(),
406
406
  detail: z.string(),
407
407
  replacement: z.string().optional()
408
- })).default([])
408
+ })).default([]),
409
+ /** Names the client's shop-like NAME filter must NOT hide: entries whose
410
+ * name reads like a competing plugin market but which are not one
411
+ * (registry/not-a-shop.yml). Defaulted, so a catalog built before this key
412
+ * existed still parses — the data file is non-strict for the same reason
413
+ * the pointer is. */
414
+ notAShop: z.array(z.string()).default([])
409
415
  });
410
416
  /** The tarball URL must be the entry's own GitHub release — path segments
411
417
  * `/<owner>/<repo>/releases/...` matching the entry's `repo` (case-
@@ -515,6 +521,7 @@ async function loadCatalog(options) {
515
521
  builtAt: pointer.builtAt,
516
522
  entries: data.plugins,
517
523
  denied: data.denied,
524
+ notAShop: data.notAShop,
518
525
  stars
519
526
  };
520
527
  };
@@ -582,6 +589,7 @@ async function loadCatalog(options) {
582
589
  builtAt: pointer.builtAt,
583
590
  entries: data.plugins,
584
591
  denied: data.denied,
592
+ notAShop: data.notAShop,
585
593
  stars
586
594
  };
587
595
  fsImpl.write(indexPath, JSON.stringify(pointer));
@@ -2175,6 +2183,7 @@ let ShopGateway = (() => {
2175
2183
  stale,
2176
2184
  plugins: snapshot.entries,
2177
2185
  denied: snapshot.denied,
2186
+ notAShop: snapshot.notAShop ?? [],
2178
2187
  stars: snapshot.stars,
2179
2188
  incompatible
2180
2189
  };
@@ -49,6 +49,7 @@ const dsh_plugin_shop_shop_catalog_result$schema = z.object({
49
49
  'detail': z.string(),
50
50
  'replacement': z.union([z.undefined(), z.string()]).optional(),
51
51
  })),
52
+ 'notAShop': z.union([z.undefined(), z.array(z.string())]).optional(),
52
53
  'stars': z.record(z.string(), z.number()),
53
54
  'incompatible': z.record(z.string(), z.array(z.string())),
54
55
  })
@@ -154,7 +155,7 @@ export const TYPERT = {
154
155
  typeSymbol: 'dsh-plugin-shop/types#ShopCatalogResult',
155
156
  schema: dsh_plugin_shop_shop_catalog_result$schema,
156
157
  },
157
- sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":574,"column":9},
158
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":577,"column":9},
158
159
  },
159
160
  {
160
161
  id: 'dsh-plugin-shop#shop/installed',
@@ -169,7 +170,7 @@ export const TYPERT = {
169
170
  typeSymbol: 'dsh-plugin-shop#shop/installed:result',
170
171
  schema: dsh_plugin_shop_shop_installed_result$schema,
171
172
  },
172
- sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":759,"column":9},
173
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":763,"column":9},
173
174
  },
174
175
  {
175
176
  id: 'dsh-plugin-shop#shop/installStart',
@@ -195,7 +196,7 @@ export const TYPERT = {
195
196
  typeSymbol: 'dsh-plugin-shop/types#ShopInstallResult',
196
197
  schema: dsh_plugin_shop_shop_installStart_result$schema,
197
198
  },
198
- sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":624,"column":9},
199
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":628,"column":9},
199
200
  },
200
201
  {
201
202
  id: 'dsh-plugin-shop#shop/installStatus',
@@ -220,7 +221,7 @@ export const TYPERT = {
220
221
  typeSymbol: 'dsh-plugin-shop/types#ShopInstallStatusResult',
221
222
  schema: dsh_plugin_shop_shop_installStatus_result$schema,
222
223
  },
223
- sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":748,"column":3},
224
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":752,"column":3},
224
225
  },
225
226
  {
226
227
  id: 'dsh-plugin-shop#shop/restart',
@@ -235,7 +236,7 @@ export const TYPERT = {
235
236
  typeSymbol: 'dsh-plugin-shop/types#ShopRestartResult',
236
237
  schema: dsh_plugin_shop_shop_restart_result$schema,
237
238
  },
238
- sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":909,"column":9},
239
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":913,"column":9},
239
240
  },
240
241
  {
241
242
  id: 'dsh-plugin-shop#shop/setEnabled',
@@ -260,7 +261,7 @@ export const TYPERT = {
260
261
  typeSymbol: 'dsh-plugin-shop/types#ShopSetEnabledResult',
261
262
  schema: dsh_plugin_shop_shop_setEnabled_result$schema,
262
263
  },
263
- sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":466,"column":9},
264
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":469,"column":9},
264
265
  },
265
266
  {
266
267
  id: 'dsh-plugin-shop#shop/uninstallStart',
@@ -286,7 +287,7 @@ export const TYPERT = {
286
287
  typeSymbol: 'dsh-plugin-shop/types#ShopUninstallResult',
287
288
  schema: dsh_plugin_shop_shop_uninstallStart_result$schema,
288
289
  },
289
- sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":851,"column":9},
290
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":855,"column":9},
290
291
  },
291
292
  {
292
293
  id: 'dsh-plugin-shop#shop/updateStart',
@@ -311,7 +312,7 @@ export const TYPERT = {
311
312
  typeSymbol: 'dsh-plugin-shop/types#ShopUpdateResult',
312
313
  schema: dsh_plugin_shop_shop_updateStart_result$schema,
313
314
  },
314
- sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":977,"column":9},
315
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":981,"column":9},
315
316
  },
316
317
  {
317
318
  id: 'dsh-plugin-shop#shop/version',
@@ -326,7 +327,7 @@ export const TYPERT = {
326
327
  typeSymbol: 'dsh-plugin-shop/types#ShopVersionResult',
327
328
  schema: dsh_plugin_shop_shop_version_result$schema,
328
329
  },
329
- sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":960,"column":9},
330
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":964,"column":9},
330
331
  },
331
332
  ],
332
333
  model: {
@@ -452,7 +453,7 @@ export const TYPERT = {
452
453
  },
453
454
  {
454
455
  "name": "ShopCatalogResult",
455
- "declaration": "export interface ShopCatalogResult {\n schemaVersion: number;\n builtAt: string;\n stale: boolean;\n plugins: CatalogEntry[];\n denied: DeniedEntry[];\n stars: Record<string, number>;\n incompatible: Record<string, string[]>;\n}"
456
+ "declaration": "export interface ShopCatalogResult {\n schemaVersion: number;\n builtAt: string;\n stale: boolean;\n plugins: CatalogEntry[];\n denied: DeniedEntry[];\n notAShop?: string[];\n stars: Record<string, number>;\n incompatible: Record<string, string[]>;\n}"
456
457
  },
457
458
  {
458
459
  "name": "ShopInstalledEntry",
@@ -49,6 +49,7 @@ const dsh_plugin_shop_shop_catalog_result$schema = z.object({
49
49
  'detail': z.string(),
50
50
  'replacement': z.union([z.undefined(), z.string()]).optional(),
51
51
  })),
52
+ 'notAShop': z.union([z.undefined(), z.array(z.string())]).optional(),
52
53
  'stars': z.record(z.string(), z.number()),
53
54
  'incompatible': z.record(z.string(), z.array(z.string())),
54
55
  })
@@ -151,7 +152,7 @@ export const TYPERT_REMOTE = {
151
152
  typeSymbol: 'dsh-plugin-shop/types#ShopCatalogResult',
152
153
  schema: dsh_plugin_shop_shop_catalog_result$schema,
153
154
  },
154
- sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":574,"column":9},
155
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":577,"column":9},
155
156
  },
156
157
  {
157
158
  id: 'dsh-plugin-shop#shop/installed',
@@ -166,7 +167,7 @@ export const TYPERT_REMOTE = {
166
167
  typeSymbol: 'dsh-plugin-shop#shop/installed:result',
167
168
  schema: dsh_plugin_shop_shop_installed_result$schema,
168
169
  },
169
- sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":759,"column":9},
170
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":763,"column":9},
170
171
  },
171
172
  {
172
173
  id: 'dsh-plugin-shop#shop/installStart',
@@ -192,7 +193,7 @@ export const TYPERT_REMOTE = {
192
193
  typeSymbol: 'dsh-plugin-shop/types#ShopInstallResult',
193
194
  schema: dsh_plugin_shop_shop_installStart_result$schema,
194
195
  },
195
- sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":624,"column":9},
196
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":628,"column":9},
196
197
  },
197
198
  {
198
199
  id: 'dsh-plugin-shop#shop/installStatus',
@@ -217,7 +218,7 @@ export const TYPERT_REMOTE = {
217
218
  typeSymbol: 'dsh-plugin-shop/types#ShopInstallStatusResult',
218
219
  schema: dsh_plugin_shop_shop_installStatus_result$schema,
219
220
  },
220
- sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":748,"column":3},
221
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":752,"column":3},
221
222
  },
222
223
  {
223
224
  id: 'dsh-plugin-shop#shop/restart',
@@ -232,7 +233,7 @@ export const TYPERT_REMOTE = {
232
233
  typeSymbol: 'dsh-plugin-shop/types#ShopRestartResult',
233
234
  schema: dsh_plugin_shop_shop_restart_result$schema,
234
235
  },
235
- sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":909,"column":9},
236
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":913,"column":9},
236
237
  },
237
238
  {
238
239
  id: 'dsh-plugin-shop#shop/setEnabled',
@@ -257,7 +258,7 @@ export const TYPERT_REMOTE = {
257
258
  typeSymbol: 'dsh-plugin-shop/types#ShopSetEnabledResult',
258
259
  schema: dsh_plugin_shop_shop_setEnabled_result$schema,
259
260
  },
260
- sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":466,"column":9},
261
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":469,"column":9},
261
262
  },
262
263
  {
263
264
  id: 'dsh-plugin-shop#shop/uninstallStart',
@@ -283,7 +284,7 @@ export const TYPERT_REMOTE = {
283
284
  typeSymbol: 'dsh-plugin-shop/types#ShopUninstallResult',
284
285
  schema: dsh_plugin_shop_shop_uninstallStart_result$schema,
285
286
  },
286
- sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":851,"column":9},
287
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":855,"column":9},
287
288
  },
288
289
  {
289
290
  id: 'dsh-plugin-shop#shop/updateStart',
@@ -308,7 +309,7 @@ export const TYPERT_REMOTE = {
308
309
  typeSymbol: 'dsh-plugin-shop/types#ShopUpdateResult',
309
310
  schema: dsh_plugin_shop_shop_updateStart_result$schema,
310
311
  },
311
- sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":977,"column":9},
312
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":981,"column":9},
312
313
  },
313
314
  {
314
315
  id: 'dsh-plugin-shop#shop/version',
@@ -323,7 +324,7 @@ export const TYPERT_REMOTE = {
323
324
  typeSymbol: 'dsh-plugin-shop/types#ShopVersionResult',
324
325
  schema: dsh_plugin_shop_shop_version_result$schema,
325
326
  },
326
- sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":960,"column":9},
327
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":964,"column":9},
327
328
  },
328
329
  ],
329
330
  }
@@ -43,6 +43,8 @@ export declare const zh: {
43
43
  installFailed: string;
44
44
  installTransportFailed: string;
45
45
  refresh: string;
46
+ refreshing: string;
47
+ refreshFailed: string;
46
48
  staleLabel: string;
47
49
  showing: string;
48
50
  repository: string;
@@ -81,6 +83,7 @@ export declare const zh: {
81
83
  updateFailed: string;
82
84
  updateTransportFailed: string;
83
85
  checkUpdate: string;
86
+ checkUpdateTitle: string;
84
87
  upToDate: string;
85
88
  github: string;
86
89
  enabledSwitch: string;
@@ -133,6 +136,8 @@ export declare const en: {
133
136
  installFailed: string;
134
137
  installTransportFailed: string;
135
138
  refresh: string;
139
+ refreshing: string;
140
+ refreshFailed: string;
136
141
  staleLabel: string;
137
142
  showing: string;
138
143
  repository: string;
@@ -171,6 +176,7 @@ export declare const en: {
171
176
  updateFailed: string;
172
177
  updateTransportFailed: string;
173
178
  checkUpdate: string;
179
+ checkUpdateTitle: string;
174
180
  upToDate: string;
175
181
  github: string;
176
182
  enabledSwitch: string;
@@ -1,6 +1,7 @@
1
1
  /** Pure presentation core for the shop tab (§5.1 Client half). No React, no
2
2
  * timers, no I/O: every function here maps a value to a value, so fixtures
3
3
  * drive all of it. */
4
+ export { isShopLike } from '../shared/shop-like.ts';
4
5
  import type { ShopLocaleKey } from './locales.ts';
5
6
  import type { CatalogEntry, HotRestartReason, InstallRejectionCode } from '../host/index.ts';
6
7
  /** Hot-mount reason code → locale key, so the notice reads in the language
@@ -103,18 +104,6 @@ export declare function nextVisibleCount(visible: number, total: number, batch:
103
104
  * view is tracking — a status for an install it never started (idle) is an
104
105
  * unrelated event and a no-op, like any other event it does not recognize. */
105
106
  export declare function reduceInstall(state: InstallView, event: InstallEvent): InstallView;
106
- /**
107
- * Whether a package name reads as a plugin shop (a marketplace for dsh
108
- * plugins, e.g. `dsh-plugin-shop`, `dsh-store`, `pluginstore`). The shop
109
- * tab hides these so the market does not list competing markets.
110
- *
111
- * Precision over recall: a name merely CONTAINING a keyword segment without
112
- * a plugin qualifier or a keyword ending (`market-data-provider`,
113
- * `marketplace-hub`) is NOT a shop plugin, and `dsh-restore` must never
114
- * match on the substring "store". The keyword list keeps "store" on purpose:
115
- * it matches other people's package names, not ours.
116
- */
117
- export declare function isShopLike(name: string): boolean;
118
107
  declare const CATEGORY_KEYS: {
119
108
  readonly tool: "categoryTool";
120
109
  readonly provider: "categoryProvider";
@@ -222,4 +211,3 @@ export declare function starsOf(entry: CatalogEntry, stars: Record<string, numbe
222
211
  export declare function sortByStars(entries: CatalogEntry[], stars: Record<string, number>): CatalogEntry[];
223
212
  /** 999 → "999"; 1000 → "1k"; 1234 → "1.2k"; 1500 → "1.5k"; 99999 → "100k". */
224
213
  export declare function formatStars(n: number): string;
225
- export {};
@@ -14,6 +14,11 @@ export interface CatalogSnapshot {
14
14
  builtAt: string;
15
15
  entries: CatalogEntry[];
16
16
  denied: DeniedEntry[];
17
+ /** Names the shop-like NAME filter must not hide (registry/not-a-shop.yml).
18
+ * Absent for a catalog built before the key existed, which is why it is
19
+ * optional rather than defaulted here: the parse defaults it, a snapshot
20
+ * assembled by hand need not carry it. */
21
+ notAShop?: string[];
17
22
  /** GitHub star counts by package name; {} when the pointer names no
18
23
  * sidecar or the sidecar could not be fetched/verified (spec §5). */
19
24
  stars: Record<string, number>;
@@ -186,6 +186,9 @@ export interface ShopCatalogResult {
186
186
  stale: boolean;
187
187
  plugins: CatalogEntry[];
188
188
  denied: DeniedEntry[];
189
+ /** Names whose shop-like NAME must not hide them from the shelf
190
+ * (registry/not-a-shop.yml). Absent for a catalog built before the key. */
191
+ notAShop?: string[];
189
192
  /** GitHub star counts by package name; {} when the pointer names no sidecar
190
193
  * or the sidecar could not be fetched/verified (§5). */
191
194
  stars: Record<string, number>;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Whether a package name reads as a competing plugin marketplace.
3
+ *
4
+ * Shared on purpose. The registry needs it to pick which newly harvested names
5
+ * to send for a market verdict, and the client needs it to hide the ones no
6
+ * verdict has reached yet. When each had a copy they drifted — that is exactly
7
+ * how the shelf came to disagree with its own count — so there is one.
8
+ *
9
+ * It lives under the published package rather than beside the registry because
10
+ * the dependency can only point this way: the package's tsconfig pins
11
+ * `rootDir: "src"`, so nothing outside it can be imported, while the registry
12
+ * scripts are internal and may reach in.
13
+ *
14
+ * This is a NAME heuristic and nothing more. It cannot tell a plugin that
15
+ * stores tea from one that sells plugins — on the live catalog it caught 73
16
+ * names of which 20 were innocent — so `registry/markets.yml` carries the
17
+ * verdict per name and overrides it either way.
18
+ *
19
+ * @module shared/shop-like
20
+ */
21
+ /**
22
+ * Whether a package name reads as a plugin shop (a marketplace for dsh
23
+ * plugins, e.g. `dsh-plugin-shop`, `dsh-store`, `pluginstore`). The shop
24
+ * tab hides these so the market does not list competing markets.
25
+ *
26
+ * Precision over recall: a name merely CONTAINING a keyword segment without
27
+ * a plugin qualifier or a keyword ending (`market-data-provider`,
28
+ * `marketplace-hub`) is NOT a shop plugin, and `dsh-restore` must never
29
+ * match on the substring "store". The keyword list keeps "store" on purpose:
30
+ * it matches other people's package names, not ours.
31
+ */
32
+ export declare function isShopLike(name: string): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-shop",
3
- "version": "0.7.1",
3
+ "version": "0.7.2-beta.1",
4
4
  "description": "The DeepSeek Harness plugin shop: browse, install, enable, and update dsh plugins from a git-auditable catalog.",
5
5
  "repository": {
6
6
  "type": "git",