omnicell-router 0.1.0 → 0.2.0

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 (212) hide show
  1. package/RELEASING.md +238 -238
  2. package/RELEASING.zh-CN.md +230 -230
  3. package/backend/dist/capture/recorder.js +2 -1
  4. package/backend/dist/cli/clients/base.js +8 -16
  5. package/backend/dist/cli/clients/dsh.js +8 -16
  6. package/backend/dist/cli/clients/pi.js +16 -9
  7. package/backend/dist/cli/types.d.ts +5 -0
  8. package/backend/dist/config/env.js +2 -1
  9. package/backend/dist/config/index.js +2 -0
  10. package/backend/dist/config/types.d.ts +23 -0
  11. package/backend/dist/harness/adapters/amp.d.ts +2 -0
  12. package/backend/dist/harness/adapters/amp.js +7 -0
  13. package/backend/dist/harness/adapters/claude.d.ts +2 -0
  14. package/backend/dist/harness/adapters/claude.js +7 -0
  15. package/backend/dist/harness/adapters/cline.d.ts +2 -0
  16. package/backend/dist/harness/adapters/cline.js +6 -0
  17. package/backend/dist/harness/adapters/codex.d.ts +2 -0
  18. package/backend/dist/harness/adapters/codex.js +6 -0
  19. package/backend/dist/harness/adapters/cursor.d.ts +5 -0
  20. package/backend/dist/harness/adapters/cursor.js +10 -0
  21. package/backend/dist/harness/adapters/declarative.d.ts +62 -0
  22. package/backend/dist/harness/adapters/declarative.js +202 -0
  23. package/backend/dist/harness/adapters/dsh.d.ts +5 -0
  24. package/backend/dist/harness/adapters/dsh.js +6 -0
  25. package/backend/dist/harness/adapters/gemini-cli.d.ts +2 -0
  26. package/backend/dist/harness/adapters/gemini-cli.js +7 -0
  27. package/backend/dist/harness/adapters/github-copilot.d.ts +5 -0
  28. package/backend/dist/harness/adapters/github-copilot.js +10 -0
  29. package/backend/dist/harness/adapters/index.d.ts +44 -0
  30. package/backend/dist/harness/adapters/index.js +99 -0
  31. package/backend/dist/harness/adapters/opencode.d.ts +2 -0
  32. package/backend/dist/harness/adapters/opencode.js +55 -0
  33. package/backend/dist/harness/adapters/pi.d.ts +1 -0
  34. package/backend/dist/harness/adapters/pi.js +22 -0
  35. package/backend/dist/harness/adapters/skills-paths.d.ts +15 -0
  36. package/backend/dist/harness/adapters/skills-paths.js +17 -0
  37. package/backend/dist/harness/adapters/types.d.ts +174 -0
  38. package/backend/dist/harness/adapters/types.js +12 -0
  39. package/backend/dist/harness/adapters/universal.d.ts +6 -0
  40. package/backend/dist/harness/adapters/universal.js +10 -0
  41. package/backend/dist/harness/adapters/windsurf.d.ts +2 -0
  42. package/backend/dist/harness/adapters/windsurf.js +10 -0
  43. package/backend/dist/harness/adapters/zed.d.ts +2 -0
  44. package/backend/dist/harness/adapters/zed.js +6 -0
  45. package/backend/dist/harness/awesome-opencode.d.ts +40 -0
  46. package/backend/dist/harness/awesome-opencode.js +75 -0
  47. package/backend/dist/harness/browse.d.ts +202 -0
  48. package/backend/dist/harness/browse.js +1214 -0
  49. package/backend/dist/harness/catalog-npm.d.ts +59 -0
  50. package/backend/dist/harness/catalog-npm.js +145 -0
  51. package/backend/dist/harness/clawhub.d.ts +212 -0
  52. package/backend/dist/harness/clawhub.js +426 -0
  53. package/backend/dist/harness/config-file.d.ts +29 -0
  54. package/backend/dist/harness/config-file.js +35 -0
  55. package/backend/dist/harness/detail.d.ts +74 -0
  56. package/backend/dist/harness/detail.js +330 -0
  57. package/backend/dist/harness/discover.d.ts +118 -0
  58. package/backend/dist/harness/discover.js +507 -0
  59. package/backend/dist/harness/drift.d.ts +21 -0
  60. package/backend/dist/harness/drift.js +25 -0
  61. package/backend/dist/harness/hash.d.ts +10 -0
  62. package/backend/dist/harness/hash.js +63 -0
  63. package/backend/dist/harness/hosts.d.ts +18 -0
  64. package/backend/dist/harness/hosts.js +15 -0
  65. package/backend/dist/harness/install.d.ts +88 -0
  66. package/backend/dist/harness/install.js +301 -0
  67. package/backend/dist/harness/inventory.d.ts +10 -0
  68. package/backend/dist/harness/inventory.js +198 -0
  69. package/backend/dist/harness/ledger.d.ts +39 -0
  70. package/backend/dist/harness/ledger.js +83 -0
  71. package/backend/dist/harness/maintenance.d.ts +115 -0
  72. package/backend/dist/harness/maintenance.js +603 -0
  73. package/backend/dist/harness/manifest.d.ts +31 -0
  74. package/backend/dist/harness/manifest.js +234 -0
  75. package/backend/dist/harness/net.d.ts +86 -0
  76. package/backend/dist/harness/net.js +113 -0
  77. package/backend/dist/harness/opencode-cafe.d.ts +40 -0
  78. package/backend/dist/harness/opencode-cafe.js +85 -0
  79. package/backend/dist/harness/opencode-ecosystem.d.ts +34 -0
  80. package/backend/dist/harness/opencode-ecosystem.js +246 -0
  81. package/backend/dist/harness/pi-dev.d.ts +81 -0
  82. package/backend/dist/harness/pi-dev.js +187 -0
  83. package/backend/dist/harness/probe.d.ts +33 -0
  84. package/backend/dist/harness/probe.js +85 -0
  85. package/backend/dist/harness/registry.d.ts +2 -0
  86. package/backend/dist/harness/registry.js +26 -0
  87. package/backend/dist/harness/scopes.d.ts +21 -0
  88. package/backend/dist/harness/scopes.js +22 -0
  89. package/backend/dist/harness/skill-md.d.ts +18 -0
  90. package/backend/dist/harness/skill-md.js +71 -0
  91. package/backend/dist/harness/skills-sh.d.ts +109 -0
  92. package/backend/dist/harness/skills-sh.js +178 -0
  93. package/backend/dist/harness/smithery.d.ts +64 -0
  94. package/backend/dist/harness/smithery.js +146 -0
  95. package/backend/dist/harness/sources/awesome-opencode.d.ts +11 -0
  96. package/backend/dist/harness/sources/awesome-opencode.js +39 -0
  97. package/backend/dist/harness/sources/clawhub.d.ts +2 -0
  98. package/backend/dist/harness/sources/clawhub.js +83 -0
  99. package/backend/dist/harness/sources/github.d.ts +9 -0
  100. package/backend/dist/harness/sources/github.js +202 -0
  101. package/backend/dist/harness/sources/mcp-official.d.ts +2 -0
  102. package/backend/dist/harness/sources/mcp-official.js +110 -0
  103. package/backend/dist/harness/sources/npm.d.ts +2 -0
  104. package/backend/dist/harness/sources/npm.js +152 -0
  105. package/backend/dist/harness/sources/opencode-cafe.d.ts +11 -0
  106. package/backend/dist/harness/sources/opencode-cafe.js +41 -0
  107. package/backend/dist/harness/sources/smithery.d.ts +2 -0
  108. package/backend/dist/harness/sources/smithery.js +81 -0
  109. package/backend/dist/harness/spi.d.ts +98 -0
  110. package/backend/dist/harness/spi.js +8 -0
  111. package/backend/dist/harness/stars.d.ts +70 -0
  112. package/backend/dist/harness/stars.js +202 -0
  113. package/backend/dist/harness/translation.d.ts +142 -0
  114. package/backend/dist/harness/translation.js +567 -0
  115. package/backend/dist/harness/tree.d.ts +13 -0
  116. package/backend/dist/harness/tree.js +19 -0
  117. package/backend/dist/harness/types.d.ts +286 -0
  118. package/backend/dist/harness/types.js +8 -0
  119. package/backend/dist/harness/writers/extension.d.ts +116 -0
  120. package/backend/dist/harness/writers/extension.js +219 -0
  121. package/backend/dist/harness/writers/mcp.d.ts +72 -0
  122. package/backend/dist/harness/writers/mcp.js +195 -0
  123. package/backend/dist/harness/writers/skill.d.ts +60 -0
  124. package/backend/dist/harness/writers/skill.js +146 -0
  125. package/backend/dist/opencode/agents.d.ts +5 -0
  126. package/backend/dist/opencode/agents.js +10 -1
  127. package/backend/dist/opencode/catalog/cache.js +2 -1
  128. package/backend/dist/opencode/catalog/logos.js +2 -1
  129. package/backend/dist/opencode/catalog/ocr-store.js +2 -1
  130. package/backend/dist/opencode/catalog/overrides-store.js +2 -1
  131. package/backend/dist/opencode/credentials/factory.js +10 -27
  132. package/backend/dist/opencode/credentials/ocr-store.js +2 -1
  133. package/backend/dist/opencode/provider-defs.js +2 -1
  134. package/backend/dist/opencode/user-config.js +8 -16
  135. package/backend/dist/providers/registry.d.ts +15 -4
  136. package/backend/dist/providers/registry.js +29 -5
  137. package/backend/dist/providers/virtual-meta.d.ts +13 -0
  138. package/backend/dist/providers/virtual-meta.js +18 -0
  139. package/backend/dist/quota/store.js +2 -1
  140. package/backend/dist/resilience/breaker-state.js +2 -1
  141. package/backend/dist/resilience/credential-state.js +2 -1
  142. package/backend/dist/routes/console.js +137 -15
  143. package/backend/dist/routes/harness.d.ts +2 -0
  144. package/backend/dist/routes/harness.js +622 -0
  145. package/backend/dist/server.js +4 -0
  146. package/backend/dist/session/session-manager.js +2 -1
  147. package/backend/dist/surfaces/systemone-probe.d.ts +25 -0
  148. package/backend/dist/surfaces/systemone-probe.js +74 -0
  149. package/backend/dist/utils/atomic-write.d.ts +12 -0
  150. package/backend/dist/utils/atomic-write.js +29 -0
  151. package/bin/ocr.js +2 -2
  152. package/frontend/dist/assets/{index-DEo2iAT7.css → index-1o7qI-KJ.css} +1 -1
  153. package/frontend/dist/assets/index-DvXKvNxl.js +962 -0
  154. package/frontend/dist/index.html +2 -2
  155. package/package.json +87 -87
  156. package/backend/dist/budget/budget-manager.d.ts +0 -25
  157. package/backend/dist/budget/budget-manager.js +0 -54
  158. package/backend/dist/config/governance-limits.d.ts +0 -68
  159. package/backend/dist/config/governance-limits.js +0 -261
  160. package/backend/dist/flywheel/collector.d.ts +0 -74
  161. package/backend/dist/flywheel/collector.js +0 -235
  162. package/backend/dist/flywheel/dataset.d.ts +0 -130
  163. package/backend/dist/flywheel/dataset.js +0 -638
  164. package/backend/dist/flywheel/decision-capture.d.ts +0 -68
  165. package/backend/dist/flywheel/decision-capture.js +0 -85
  166. package/backend/dist/flywheel/prune.d.ts +0 -133
  167. package/backend/dist/flywheel/prune.js +0 -495
  168. package/backend/dist/flywheel/schema.d.ts +0 -108
  169. package/backend/dist/flywheel/schema.js +0 -117
  170. package/backend/dist/flywheel/trainer.d.ts +0 -84
  171. package/backend/dist/flywheel/trainer.js +0 -198
  172. package/backend/dist/opencode/catalog/custom-store.d.ts +0 -50
  173. package/backend/dist/opencode/catalog/custom-store.js +0 -144
  174. package/backend/dist/opencode/credentials/push.d.ts +0 -38
  175. package/backend/dist/opencode/credentials/push.js +0 -116
  176. package/backend/dist/opencode/credentials/reconcile.d.ts +0 -49
  177. package/backend/dist/opencode/credentials/reconcile.js +0 -216
  178. package/backend/dist/opencode/sync.d.ts +0 -29
  179. package/backend/dist/opencode/sync.js +0 -186
  180. package/backend/dist/pipeline/account-selection.d.ts +0 -101
  181. package/backend/dist/pipeline/account-selection.js +0 -112
  182. package/backend/dist/providers/systemone.d.ts +0 -29
  183. package/backend/dist/providers/systemone.js +0 -170
  184. package/backend/dist/ratelimit/duration.d.ts +0 -24
  185. package/backend/dist/ratelimit/duration.js +0 -43
  186. package/backend/dist/ratelimit/governance-runtime.d.ts +0 -121
  187. package/backend/dist/ratelimit/governance-runtime.js +0 -183
  188. package/backend/dist/ratelimit/index.d.ts +0 -4
  189. package/backend/dist/ratelimit/index.js +0 -4
  190. package/backend/dist/ratelimit/limiter.d.ts +0 -157
  191. package/backend/dist/ratelimit/limiter.js +0 -244
  192. package/backend/dist/ratelimit/sliding-window-counter.d.ts +0 -63
  193. package/backend/dist/ratelimit/sliding-window-counter.js +0 -103
  194. package/backend/dist/ratelimit/subject.d.ts +0 -26
  195. package/backend/dist/ratelimit/subject.js +0 -28
  196. package/backend/dist/resilience/account-state.d.ts +0 -84
  197. package/backend/dist/resilience/account-state.js +0 -228
  198. package/backend/dist/router/layer1-classifier.d.ts +0 -111
  199. package/backend/dist/router/layer1-classifier.js +0 -467
  200. package/backend/dist/router/layer2-judge.d.ts +0 -111
  201. package/backend/dist/router/layer2-judge.js +0 -373
  202. package/backend/dist/router/retry-escalation.d.ts +0 -89
  203. package/backend/dist/router/retry-escalation.js +0 -99
  204. package/backend/dist/routes/flywheel.d.ts +0 -3
  205. package/backend/dist/routes/flywheel.js +0 -268
  206. package/backend/dist/routes/systemone.d.ts +0 -3
  207. package/backend/dist/routes/systemone.js +0 -90
  208. package/backend/dist/surfaces/governance-envelope.d.ts +0 -34
  209. package/backend/dist/surfaces/governance-envelope.js +0 -47
  210. package/backend/dist/utils/token-estimator.d.ts +0 -7
  211. package/backend/dist/utils/token-estimator.js +0 -20
  212. package/frontend/dist/assets/index-nwgWkmU1.js +0 -840
@@ -0,0 +1,21 @@
1
+ import type { HarnessScope } from './types.js';
2
+ /**
3
+ * The scopes this build ACCEPTS — the single seam for project-level support (ADR-0015 §D2 "Scope",
4
+ * "Deferred").
5
+ *
6
+ * Project discovery and install are **deferred, not deleted**: every adapter still DECLARES its
7
+ * project landing (`SkillsSpec.project`, `configProject`, `looseDir.project`), the writers still take a
8
+ * `scope`, and the removal guard still recognises project roots — so re-enabling project support is
9
+ * this list plus the console's selector, not a re-spelling of thirteen adapters.
10
+ *
11
+ * Until then the PRODUCT boundary refuses `project`:
12
+ * · the install route answers `unsupported_scope` (the orchestrator keeps the parameter as the seam);
13
+ * · `scanInventory` never reads or scans a project root, so nothing project-local is discovered;
14
+ * · the console offers no scope choice and always sends `global`.
15
+ *
16
+ * Adding a scope here without the other three is a half-open door: installs would land where discovery
17
+ * cannot see them.
18
+ */
19
+ export declare const ENABLED_SCOPES: readonly HarnessScope[];
20
+ /** True when a wire value names a scope this build accepts. */
21
+ export declare function isEnabledScope(value: unknown): value is HarnessScope;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The scopes this build ACCEPTS — the single seam for project-level support (ADR-0015 §D2 "Scope",
3
+ * "Deferred").
4
+ *
5
+ * Project discovery and install are **deferred, not deleted**: every adapter still DECLARES its
6
+ * project landing (`SkillsSpec.project`, `configProject`, `looseDir.project`), the writers still take a
7
+ * `scope`, and the removal guard still recognises project roots — so re-enabling project support is
8
+ * this list plus the console's selector, not a re-spelling of thirteen adapters.
9
+ *
10
+ * Until then the PRODUCT boundary refuses `project`:
11
+ * · the install route answers `unsupported_scope` (the orchestrator keeps the parameter as the seam);
12
+ * · `scanInventory` never reads or scans a project root, so nothing project-local is discovered;
13
+ * · the console offers no scope choice and always sends `global`.
14
+ *
15
+ * Adding a scope here without the other three is a half-open door: installs would land where discovery
16
+ * cannot see them.
17
+ */
18
+ export const ENABLED_SCOPES = ['global'];
19
+ /** True when a wire value names a scope this build accepts. */
20
+ export function isEnabledScope(value) {
21
+ return typeof value === 'string' && ENABLED_SCOPES.includes(value);
22
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Minimal Agent-Skills frontmatter reader.
3
+ *
4
+ * A `SKILL.md` starts with a YAML frontmatter block holding at least `name` and `description` (the
5
+ * spec's requirement). We read only that block — a skill body may be megabytes — and we parse only
6
+ * the flat `key: value` scalars we display. Nested maps/lists are ignored, not guessed at.
7
+ *
8
+ * Deliberately NOT a YAML dependency: the fields shown in the console are flat strings, and a parser
9
+ * that silently mis-reads a nested structure would be worse than showing nothing.
10
+ */
11
+ export interface SkillMeta {
12
+ name?: string;
13
+ description?: string;
14
+ license?: string;
15
+ compatibility?: string;
16
+ }
17
+ /** Read the frontmatter of `<dir>/SKILL.md`; returns `{}` when absent or unreadable. */
18
+ export declare function readSkillMeta(dir: string): SkillMeta;
@@ -0,0 +1,71 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ const MAX_HEAD_BYTES = 8192;
4
+ function parseScalar(raw) {
5
+ let value = raw.trim();
6
+ if ((value.startsWith('"') && value.endsWith('"')) ||
7
+ (value.startsWith("'") && value.endsWith("'"))) {
8
+ value = value.slice(1, -1);
9
+ }
10
+ return value.replace(/\s+/g, ' ').trim();
11
+ }
12
+ /** Read the frontmatter of `<dir>/SKILL.md`; returns `{}` when absent or unreadable. */
13
+ export function readSkillMeta(dir) {
14
+ const file = path.join(dir, 'SKILL.md');
15
+ let head;
16
+ try {
17
+ const fd = fs.openSync(file, 'r');
18
+ try {
19
+ const buffer = Buffer.alloc(MAX_HEAD_BYTES);
20
+ const read = fs.readSync(fd, buffer, 0, MAX_HEAD_BYTES, 0);
21
+ head = buffer.subarray(0, read).toString('utf8');
22
+ }
23
+ finally {
24
+ fs.closeSync(fd);
25
+ }
26
+ }
27
+ catch {
28
+ return {};
29
+ }
30
+ const normalized = head.replace(/^\uFEFF/, '').replace(/\r\n/g, '\n');
31
+ const lines = normalized.split('\n');
32
+ if (lines[0]?.trim() !== '---')
33
+ return {};
34
+ const meta = {};
35
+ let currentKey = null;
36
+ /** Set when a key opened a block scalar (`description: |` / `>`); following indented lines fold in. */
37
+ let blockKey = null;
38
+ for (const line of lines.slice(1)) {
39
+ if (line.trim() === '---')
40
+ break;
41
+ const match = /^([A-Za-z0-9_-]+):\s*(.*)$/.exec(line);
42
+ if (match) {
43
+ currentKey = match[1];
44
+ blockKey = null;
45
+ const value = parseScalar(match[2]);
46
+ if (/^[|>][-+]?$/.test(value)) {
47
+ blockKey = currentKey;
48
+ continue;
49
+ }
50
+ if (value) {
51
+ if (currentKey === 'name')
52
+ meta.name = value;
53
+ else if (currentKey === 'description')
54
+ meta.description = value;
55
+ else if (currentKey === 'license')
56
+ meta.license = value;
57
+ else if (currentKey === 'compatibility')
58
+ meta.compatibility = value;
59
+ }
60
+ continue;
61
+ }
62
+ // Folded/continued scalar: only the description is displayed, so only it is collected.
63
+ const continuation = /^\s+(\S.*)$/.exec(line);
64
+ if (continuation && blockKey === 'description') {
65
+ const part = parseScalar(continuation[1]);
66
+ if (part)
67
+ meta.description = meta.description ? `${meta.description} ${part}` : part;
68
+ }
69
+ }
70
+ return meta;
71
+ }
@@ -0,0 +1,109 @@
1
+ /**
2
+ * skills.sh leaderboard reader.
3
+ *
4
+ * WHY A PAGE READER AND NOT THE API: `GET https://www.skills.sh/api/v1/skills` answers
5
+ * `401 {"error":"authentication_required"}` and its own body names the credential — "Pass a Vercel OIDC
6
+ * token (Authorization: Bearer <VERCEL_OIDC_TOKEN>)". That token is minted inside a Vercel deployment
7
+ * and expires within the hour, so no local gateway can hold one: it is not an operator secret, it is a
8
+ * workload identity. Everything below reads what the SITE's own browser reads.
9
+ *
10
+ * THE BOARD IS PAGED, and the console must page it the same way. Measured 2026-10-25 (anonymous, from
11
+ * this environment):
12
+ * `GET /api/skills/<view>/<page>` → 200, 0-BASED page, **200 rows** per answer, and the answer states
13
+ * its own size: `{skills: [{source, skillId, name, installs, …}], hasMore, total}`.
14
+ * Measured: `all-time` total **9 911** (pages 0…49, page 49 = 111 rows, `hasMore: false`),
15
+ * `trending` total **9 959**, `hot` total **6 765**.
16
+ * `/`, `/trending`, `/hot` → 200, server-rendered: the FIRST 600 rows (three site pages) sit
17
+ * in the Next.js RSC flight payload (`"initialSkills"`), together with `"totalSkills"` (the same
18
+ * 9 911) and `"allTimeTotal"` (1 504 860 — INSTALLS, not skills).
19
+ * That payload is only the first screen: the site's own leaderboard component keeps fetching
20
+ * `/api/skills/<view>/<n>` from page 3 onward as the operator scrolls (`pageSize: 200`).
21
+ * `?q=` → IGNORED: `/trending?q=pdf` answered byte-identical to
22
+ * `/trending`, so a board has no server-side search.
23
+ * transport → the CDN drops bursts from here (`000` connection resets on
24
+ * roughly one attempt in three), which is why every read goes through the shared retry policy.
25
+ *
26
+ * SEARCH is a different, capped read: the site's own search box calls
27
+ * `GET /api/search?q=<term>&limit=<n>` — the same undocumented sibling of the closed `/api/v1/*` API,
28
+ * and it answers **200 anonymously** because the BROWSER calls it, not a server function. Measured
29
+ * 2026-10-25: results are `{query, searchType:"fuzzy", searchVersion:"algolia", skills:[{id, source,
30
+ * skillId, name, installs}], count, duration_ms}`; `limit` caps at **200** (500 → 200 rows); `offset`,
31
+ * `page` and `cursor` are all IGNORED (identical first page), and `count` is the RETURNED row count,
32
+ * not a catalogue tally. A term shorter than 2 characters answers
33
+ * `400 {"error":"Query must be at least 2 characters"}`, so a short term is filtered over the board by
34
+ * the caller.
35
+ *
36
+ * Deliberately NOT carried: `installs`, `weeklyInstalls`, `installsYesterday`, `isOfficial`. The market
37
+ * row's popularity field is a GitHub star count (`harness/stars.ts` resolves it on demand), and printing
38
+ * an install count under it would relabel one number as another; `isOfficial` is the SITE's status, and
39
+ * this console's trust vocabulary belongs to a source, not a row. The board's own ORDER is preserved
40
+ * (it IS the ranking) and that is the whole ranking signal this source contributes.
41
+ *
42
+ * A board also lists rows that are NOT GitHub repositories — measured 2026-10-25, the all-time board's
43
+ * 31 `open.feishu.cn` skills (a vendor's own registry). Those have no `owner/repo` to install from, so
44
+ * they are dropped rather than given an invented identity, and the browse note counts what survives.
45
+ */
46
+ import { type FailureReason } from './net.js';
47
+ /** The three boards the site publishes, in the site's own tab order. */
48
+ export declare const SKILLS_SH_BOARDS: readonly ["all-time", "trending", "hot"];
49
+ export type SkillsShBoard = (typeof SKILLS_SH_BOARDS)[number];
50
+ /** Rows one BOARD answer carries — the site's own page size, not a console choice. */
51
+ export declare const SKILLS_SH_PAGE_SIZE = 200;
52
+ /**
53
+ * Rows one SEARCH answer can carry. The site's own search box asks for 100; the endpoint caps at 200
54
+ * (measured: `limit=500` answered 200), and it ignores every offset parameter, so 200 is the whole
55
+ * reach of one query.
56
+ */
57
+ export declare const SKILLS_SH_SEARCH_LIMIT = 200;
58
+ /** The search endpoint refuses anything shorter (`400 "Query must be at least 2 characters"`). */
59
+ export declare const SKILLS_SH_MIN_QUERY = 2;
60
+ export interface SkillsShEntry {
61
+ /** `owner/repo` — the repository the skill lives in, and the install identity's first half. */
62
+ source: string;
63
+ /** Skill directory inside that repository, and the install identity's `#detail` half. */
64
+ skillId: string;
65
+ /** Display name (the site's own `name`, falling back to `skillId`). */
66
+ name: string;
67
+ }
68
+ export type SkillsShRead = {
69
+ ok: true;
70
+ /**
71
+ * One slot per row the answer carried, in the source's own order — `null` where the row has no
72
+ * installable identity (a vendor registry's `open.feishu.cn` entry, or a skill id that is not a
73
+ * single path segment). Board reads keep the nulls so a caller can slice by UPSTREAM row index
74
+ * (the site's ranking) and only then drop them; search reads hand over a compacted list, because
75
+ * their answer has no stated size to stay aligned with.
76
+ */
77
+ slots: (SkillsShEntry | null)[];
78
+ /** Rows the answer carried, before the install-grammar filter — `slots.length`. */
79
+ rows: number;
80
+ /** Rows the source says the whole board holds, when the answer states one (board reads: 9 911
81
+ * on All-time). A SEARCH answer has no such figure — its `count` is the returned row count. */
82
+ total?: number;
83
+ /** Whether another page exists upstream — the site's own `hasMore`. */
84
+ hasMore?: boolean;
85
+ } | {
86
+ ok: false;
87
+ code: 'unavailable' | 'upstream';
88
+ reason: FailureReason;
89
+ reasonParams?: Record<string, string>;
90
+ message: string;
91
+ };
92
+ export declare function isSkillsShBoard(value: string): value is SkillsShBoard;
93
+ /**
94
+ * Read ONE board page (`GET /api/skills/<view>/<page>`, 0-based, 200 rows).
95
+ *
96
+ * This is the endpoint the site's own leaderboard component calls while the operator scrolls, so it is
97
+ * the only honest way for the console to reach row 601 and beyond — the server-rendered page carries
98
+ * just the first three answers.
99
+ */
100
+ export declare function fetchSkillsShPage(board: SkillsShBoard, page: number, fetchImpl?: typeof fetch): Promise<SkillsShRead>;
101
+ /**
102
+ * Read ONE search answer (`GET /api/search`). `query` must already satisfy the site's 2-character
103
+ * minimum — the caller decides that, because "too short to search" is a UI fact, not a fetch failure.
104
+ *
105
+ * The 200-row cap is the endpoint's own: it ignores `offset`/`page`/`cursor`, so asking for row 201 of
106
+ * a broad match is not a request this reader can make. The caller reports the cap instead of paging
107
+ * into a void.
108
+ */
109
+ export declare function searchSkillsSh(query: string, fetchImpl?: typeof fetch, limit?: number): Promise<SkillsShRead>;
@@ -0,0 +1,178 @@
1
+ /**
2
+ * skills.sh leaderboard reader.
3
+ *
4
+ * WHY A PAGE READER AND NOT THE API: `GET https://www.skills.sh/api/v1/skills` answers
5
+ * `401 {"error":"authentication_required"}` and its own body names the credential — "Pass a Vercel OIDC
6
+ * token (Authorization: Bearer <VERCEL_OIDC_TOKEN>)". That token is minted inside a Vercel deployment
7
+ * and expires within the hour, so no local gateway can hold one: it is not an operator secret, it is a
8
+ * workload identity. Everything below reads what the SITE's own browser reads.
9
+ *
10
+ * THE BOARD IS PAGED, and the console must page it the same way. Measured 2026-10-25 (anonymous, from
11
+ * this environment):
12
+ * `GET /api/skills/<view>/<page>` → 200, 0-BASED page, **200 rows** per answer, and the answer states
13
+ * its own size: `{skills: [{source, skillId, name, installs, …}], hasMore, total}`.
14
+ * Measured: `all-time` total **9 911** (pages 0…49, page 49 = 111 rows, `hasMore: false`),
15
+ * `trending` total **9 959**, `hot` total **6 765**.
16
+ * `/`, `/trending`, `/hot` → 200, server-rendered: the FIRST 600 rows (three site pages) sit
17
+ * in the Next.js RSC flight payload (`"initialSkills"`), together with `"totalSkills"` (the same
18
+ * 9 911) and `"allTimeTotal"` (1 504 860 — INSTALLS, not skills).
19
+ * That payload is only the first screen: the site's own leaderboard component keeps fetching
20
+ * `/api/skills/<view>/<n>` from page 3 onward as the operator scrolls (`pageSize: 200`).
21
+ * `?q=` → IGNORED: `/trending?q=pdf` answered byte-identical to
22
+ * `/trending`, so a board has no server-side search.
23
+ * transport → the CDN drops bursts from here (`000` connection resets on
24
+ * roughly one attempt in three), which is why every read goes through the shared retry policy.
25
+ *
26
+ * SEARCH is a different, capped read: the site's own search box calls
27
+ * `GET /api/search?q=<term>&limit=<n>` — the same undocumented sibling of the closed `/api/v1/*` API,
28
+ * and it answers **200 anonymously** because the BROWSER calls it, not a server function. Measured
29
+ * 2026-10-25: results are `{query, searchType:"fuzzy", searchVersion:"algolia", skills:[{id, source,
30
+ * skillId, name, installs}], count, duration_ms}`; `limit` caps at **200** (500 → 200 rows); `offset`,
31
+ * `page` and `cursor` are all IGNORED (identical first page), and `count` is the RETURNED row count,
32
+ * not a catalogue tally. A term shorter than 2 characters answers
33
+ * `400 {"error":"Query must be at least 2 characters"}`, so a short term is filtered over the board by
34
+ * the caller.
35
+ *
36
+ * Deliberately NOT carried: `installs`, `weeklyInstalls`, `installsYesterday`, `isOfficial`. The market
37
+ * row's popularity field is a GitHub star count (`harness/stars.ts` resolves it on demand), and printing
38
+ * an install count under it would relabel one number as another; `isOfficial` is the SITE's status, and
39
+ * this console's trust vocabulary belongs to a source, not a row. The board's own ORDER is preserved
40
+ * (it IS the ranking) and that is the whole ranking signal this source contributes.
41
+ *
42
+ * A board also lists rows that are NOT GitHub repositories — measured 2026-10-25, the all-time board's
43
+ * 31 `open.feishu.cn` skills (a vendor's own registry). Those have no `owner/repo` to install from, so
44
+ * they are dropped rather than given an invented identity, and the browse note counts what survives.
45
+ */
46
+ import { describeFetchFailure, fetchFailureReason, fetchWithRetry } from './net.js';
47
+ const SITE = 'https://www.skills.sh';
48
+ /** The three boards the site publishes, in the site's own tab order. */
49
+ export const SKILLS_SH_BOARDS = ['all-time', 'trending', 'hot'];
50
+ /** Rows one BOARD answer carries — the site's own page size, not a console choice. */
51
+ export const SKILLS_SH_PAGE_SIZE = 200;
52
+ /**
53
+ * Rows one SEARCH answer can carry. The site's own search box asks for 100; the endpoint caps at 200
54
+ * (measured: `limit=500` answered 200), and it ignores every offset parameter, so 200 is the whole
55
+ * reach of one query.
56
+ */
57
+ export const SKILLS_SH_SEARCH_LIMIT = 200;
58
+ /** The search endpoint refuses anything shorter (`400 "Query must be at least 2 characters"`). */
59
+ export const SKILLS_SH_MIN_QUERY = 2;
60
+ export function isSkillsShBoard(value) {
61
+ return SKILLS_SH_BOARDS.includes(value);
62
+ }
63
+ /** Same grammar the GitHub skill writer accepts: `owner/name`, and a single path-like directory. */
64
+ const OWNER_REPO = /^[\w.-]+\/[\w.-]+$/;
65
+ const SKILL_DIR = /^[\w.-]+$/;
66
+ /**
67
+ * Rows → slots, ONE PER ROW: the identity grammar decides what the market may offer, but the position
68
+ * is kept so a caller can slice the board by the SITE's own row index (its ranking) before dropping the
69
+ * un-installable ones. A dropped row must not shift every row after it.
70
+ *
71
+ * Shared by both reads: a board row and a search row carry the same `{source, skillId, name}`, and
72
+ * `owner/repo` + directory is exactly the install grammar (`github:owner/repo#dir`, see `install.ts`).
73
+ */
74
+ function toSlots(rows) {
75
+ const slots = [];
76
+ for (const row of rows) {
77
+ if (!row || typeof row !== 'object') {
78
+ slots.push(null);
79
+ continue;
80
+ }
81
+ const record = row;
82
+ const source = typeof record.source === 'string' ? record.source.trim() : '';
83
+ const skillId = typeof record.skillId === 'string' ? record.skillId.trim() : '';
84
+ const name = typeof record.name === 'string' && record.name.trim() ? record.name.trim() : skillId;
85
+ slots.push(OWNER_REPO.test(source) && SKILL_DIR.test(skillId) ? { source, skillId, name } : null);
86
+ }
87
+ return slots;
88
+ }
89
+ /** One JSON read of the site's own endpoints, with the shared retry policy and the failure vocabulary
90
+ * every other adapter answers with. */
91
+ async function readJson(url, label, fetchImpl) {
92
+ let res;
93
+ try {
94
+ res = await fetchWithRetry(url, { headers: { Accept: 'application/json', 'User-Agent': 'omnicellrouter-harness' } }, undefined, { fetchImpl });
95
+ }
96
+ catch (e) {
97
+ return { ok: false, code: 'upstream', reason: fetchFailureReason(e), message: describeFetchFailure(label, e) };
98
+ }
99
+ if (res.status === 429 || res.status >= 500) {
100
+ return {
101
+ ok: false,
102
+ code: 'unavailable',
103
+ reason: 'unavailable',
104
+ message: `${label} returned HTTP ${res.status} — try again later`,
105
+ };
106
+ }
107
+ if (!res.ok) {
108
+ return {
109
+ ok: false,
110
+ code: 'upstream',
111
+ reason: 'http',
112
+ reasonParams: { status: String(res.status) },
113
+ message: `${label} returned HTTP ${res.status}`,
114
+ };
115
+ }
116
+ try {
117
+ return { ok: true, body: JSON.parse(await res.text()) };
118
+ }
119
+ catch (e) {
120
+ return { ok: false, code: 'upstream', reason: 'badPayload', message: describeFetchFailure(label, e) };
121
+ }
122
+ }
123
+ /**
124
+ * Read ONE board page (`GET /api/skills/<view>/<page>`, 0-based, 200 rows).
125
+ *
126
+ * This is the endpoint the site's own leaderboard component calls while the operator scrolls, so it is
127
+ * the only honest way for the console to reach row 601 and beyond — the server-rendered page carries
128
+ * just the first three answers.
129
+ */
130
+ export async function fetchSkillsShPage(board, page, fetchImpl = fetch) {
131
+ const index = Math.max(0, Math.floor(page));
132
+ const read = await readJson(`${SITE}/api/skills/${board}/${index}`, 'skills.sh board', fetchImpl);
133
+ if (!read.ok)
134
+ return read;
135
+ const body = read.body;
136
+ const rows = body?.skills;
137
+ if (!Array.isArray(rows)) {
138
+ return {
139
+ ok: false,
140
+ code: 'upstream',
141
+ reason: 'markupChanged',
142
+ message: 'skills.sh board answered no `skills` array — the endpoint changed shape',
143
+ };
144
+ }
145
+ const total = typeof body?.total === 'number' && Number.isFinite(body.total) ? body.total : undefined;
146
+ const slots = toSlots(rows);
147
+ return {
148
+ ok: true,
149
+ slots,
150
+ rows: rows.length,
151
+ ...(total !== undefined ? { total } : {}),
152
+ hasMore: body?.hasMore === true,
153
+ };
154
+ }
155
+ /**
156
+ * Read ONE search answer (`GET /api/search`). `query` must already satisfy the site's 2-character
157
+ * minimum — the caller decides that, because "too short to search" is a UI fact, not a fetch failure.
158
+ *
159
+ * The 200-row cap is the endpoint's own: it ignores `offset`/`page`/`cursor`, so asking for row 201 of
160
+ * a broad match is not a request this reader can make. The caller reports the cap instead of paging
161
+ * into a void.
162
+ */
163
+ export async function searchSkillsSh(query, fetchImpl = fetch, limit = SKILLS_SH_SEARCH_LIMIT) {
164
+ const url = `${SITE}/api/search?q=${encodeURIComponent(query.trim())}&limit=${Math.min(Math.max(limit, 1), SKILLS_SH_SEARCH_LIMIT)}`;
165
+ const read = await readJson(url, 'skills.sh search', fetchImpl);
166
+ if (!read.ok)
167
+ return read;
168
+ const rows = read.body?.skills;
169
+ if (!Array.isArray(rows)) {
170
+ return {
171
+ ok: false,
172
+ code: 'upstream',
173
+ reason: 'markupChanged',
174
+ message: 'skills.sh search answered no `skills` array — the endpoint changed shape',
175
+ };
176
+ }
177
+ return { ok: true, slots: toSlots(rows), rows: rows.length };
178
+ }
@@ -0,0 +1,64 @@
1
+ import { type FailureReason } from './net.js';
2
+ /** One hosted connection: where it listens, and which config KEYS it needs (never values). */
3
+ export interface SmitheryConnection {
4
+ type?: string;
5
+ deploymentUrl?: string;
6
+ requiredKeys?: string[];
7
+ }
8
+ /** A listing row, narrowed to the fields this build reads. */
9
+ export interface SmitheryEntry {
10
+ qualifiedName?: string;
11
+ displayName?: string;
12
+ description?: string;
13
+ homepage?: string;
14
+ verified?: boolean;
15
+ useCount?: number;
16
+ remote?: boolean;
17
+ isDeployed?: boolean;
18
+ createdAt?: string;
19
+ }
20
+ export interface SmitheryPage {
21
+ servers: SmitheryEntry[];
22
+ page: number;
23
+ pageSize: number;
24
+ totalPages: number;
25
+ totalCount: number;
26
+ }
27
+ /** The per-server record's install-relevant half. */
28
+ export interface SmitheryDetail {
29
+ qualifiedName: string;
30
+ description?: string;
31
+ /** True when Smithery publishes a hosted deployment for this server. */
32
+ remote: boolean;
33
+ connections: SmitheryConnection[];
34
+ }
35
+ export type SmitheryRead<T> = ({
36
+ ok: true;
37
+ } & T) | {
38
+ ok: false;
39
+ code: 'unavailable' | 'upstream';
40
+ reason: FailureReason;
41
+ reasonParams?: Record<string, string>;
42
+ message: string;
43
+ };
44
+ /**
45
+ * One page of the listing. `pageSize`/`page` travel verbatim so the console's page numbers are the
46
+ * registry's own, and `q` is its full-text query (measured: `q=github` → 140 matches).
47
+ */
48
+ export declare function fetchSmitheryServers(opts?: {
49
+ q?: string;
50
+ page?: number;
51
+ pageSize?: number;
52
+ }, fetchImpl?: typeof fetch): Promise<SmitheryRead<{
53
+ page: SmitheryPage;
54
+ }>>;
55
+ /**
56
+ * One server's record: its hosted connections and the config KEYS they require.
57
+ *
58
+ * A connection with no `deploymentUrl` (a stdio-only server Smithery knows but does not host) yields a
59
+ * `remote: false` detail, which the adapter refuses — Smithery's local packages are its own npm
60
+ * distribution, not an MCP launch this writer can merge.
61
+ */
62
+ export declare function fetchSmitheryServer(qualifiedName: string, fetchImpl?: typeof fetch): Promise<SmitheryRead<{
63
+ detail: SmitheryDetail;
64
+ }>>;
@@ -0,0 +1,146 @@
1
+ import { describeFetchFailure, fetchFailureReason, fetchWithRetry } from './net.js';
2
+ /**
3
+ * Smithery MCP registry — a HOSTING aggregator (ADR-0015 §D6).
4
+ *
5
+ * Measured 2026-10-25, anonymous:
6
+ * - `GET /servers?page=&pageSize=&q=&verified=` → 200
7
+ * `{ servers: [...], pagination: { currentPage, pageSize, totalPages, totalCount } }`.
8
+ * - `GET /servers/<qualifiedName>` → 200 with `connections[]` (`type`, `deploymentUrl`,
9
+ * `configSchema`) plus `tools`/`prompts`/`resources` counts.
10
+ * - The listing serves at most **500 rows** however it is page-sliced (pageSize 20 → 25 pages,
11
+ * pageSize 2 → 250 pages, page 26 → empty) while `totalCount` reports ~20 765: the console must
12
+ * say which number it can reach instead of promising rows the API will never return.
13
+ *
14
+ * Smithery's deployments live on its OWN hosting (`<slug>.run.tools`, and the equivalent
15
+ * `server.smithery.ai/<qualifiedName>/mcp`): both were measured to answer an MCP `initialize` with
16
+ * `401 {"error":"invalid_token","error_description":"Missing Authorization header"}`. That is why this
17
+ * is the one aggregator whose launch spec is authoritative for itself — but arbitration with the
18
+ * official registry still prefers the official record when one exists (§D6).
19
+ *
20
+ * PRIVACY/SECRETS: only config KEY NAMES are read (`configSchema.required`); no value, no token and no
21
+ * owner identity is carried out of this module (gate 4).
22
+ */
23
+ const SERVERS = 'https://registry.smithery.ai/servers';
24
+ /** `pageSize` ceiling this adapter forwards (the market never asks more than 50). */
25
+ const PAGE_SIZE_MAX = 100;
26
+ const HEADERS = { Accept: 'application/json', 'User-Agent': 'omnicellrouter-harness' };
27
+ /** One GET under the shared market retry policy, with the status → failure mapping every reader uses. */
28
+ async function readJson(url, fetchImpl, subject) {
29
+ let res;
30
+ try {
31
+ res = await fetchWithRetry(url, { headers: HEADERS }, undefined, { fetchImpl });
32
+ }
33
+ catch (e) {
34
+ return { ok: false, code: 'upstream', reason: fetchFailureReason(e), message: describeFetchFailure(subject, e) };
35
+ }
36
+ if (res.status === 404) {
37
+ return { ok: false, code: 'upstream', reason: 'http', reasonParams: { status: '404' }, message: `${subject} has no such record` };
38
+ }
39
+ if (res.status === 429 || res.status >= 500) {
40
+ return { ok: false, code: 'unavailable', reason: 'unavailable', message: `${subject} returned HTTP ${res.status} — try again later` };
41
+ }
42
+ if (!res.ok) {
43
+ return {
44
+ ok: false,
45
+ code: 'upstream',
46
+ reason: 'http',
47
+ reasonParams: { status: String(res.status) },
48
+ message: `${subject} returned HTTP ${res.status}`,
49
+ };
50
+ }
51
+ try {
52
+ const body = (await res.json());
53
+ if (!body || typeof body !== 'object' || Array.isArray(body)) {
54
+ return { ok: false, code: 'upstream', reason: 'badPayload', message: `${subject} answered an unexpected payload shape` };
55
+ }
56
+ return { ok: true, body: body };
57
+ }
58
+ catch {
59
+ return { ok: false, code: 'upstream', reason: 'badPayload', message: `${subject} answered non-JSON content` };
60
+ }
61
+ }
62
+ const str = (v) => (typeof v === 'string' && v.trim() !== '' ? v : undefined);
63
+ const num = (v) => (typeof v === 'number' && Number.isFinite(v) ? v : undefined);
64
+ /** Copy a listing row onto the narrow shape — an explicit field pick, never a spread. */
65
+ function narrowEntry(row) {
66
+ return {
67
+ ...(str(row.qualifiedName) ? { qualifiedName: str(row.qualifiedName) } : {}),
68
+ ...(str(row.displayName) ? { displayName: str(row.displayName) } : {}),
69
+ ...(str(row.description) ? { description: str(row.description) } : {}),
70
+ ...(str(row.homepage) ? { homepage: str(row.homepage) } : {}),
71
+ ...(typeof row.verified === 'boolean' ? { verified: row.verified } : {}),
72
+ ...(num(row.useCount) !== undefined ? { useCount: num(row.useCount) } : {}),
73
+ ...(typeof row.remote === 'boolean' ? { remote: row.remote } : {}),
74
+ ...(typeof row.isDeployed === 'boolean' ? { isDeployed: row.isDeployed } : {}),
75
+ ...(str(row.createdAt) ? { createdAt: str(row.createdAt) } : {}),
76
+ };
77
+ }
78
+ /**
79
+ * One page of the listing. `pageSize`/`page` travel verbatim so the console's page numbers are the
80
+ * registry's own, and `q` is its full-text query (measured: `q=github` → 140 matches).
81
+ */
82
+ export async function fetchSmitheryServers(opts = {}, fetchImpl = fetch) {
83
+ const page = Math.max(opts.page ?? 1, 1);
84
+ const pageSize = Math.min(Math.max(opts.pageSize ?? 24, 1), PAGE_SIZE_MAX);
85
+ const url = new URL(SERVERS);
86
+ url.searchParams.set('page', String(page));
87
+ url.searchParams.set('pageSize', String(pageSize));
88
+ const q = opts.q?.trim();
89
+ if (q)
90
+ url.searchParams.set('q', q);
91
+ const read = await readJson(url.toString(), fetchImpl, 'Smithery');
92
+ if (!read.ok)
93
+ return read;
94
+ const rows = read.body.servers;
95
+ if (!Array.isArray(rows)) {
96
+ return { ok: false, code: 'upstream', reason: 'badPayload', message: 'Smithery answered no server list' };
97
+ }
98
+ const pagination = (read.body.pagination ?? {});
99
+ return {
100
+ ok: true,
101
+ page: {
102
+ servers: rows
103
+ .filter((row) => !!row && typeof row === 'object')
104
+ .map(narrowEntry)
105
+ .filter((entry) => entry.qualifiedName !== undefined),
106
+ page: num(pagination.currentPage) ?? page,
107
+ pageSize: num(pagination.pageSize) ?? pageSize,
108
+ totalPages: num(pagination.totalPages) ?? page,
109
+ totalCount: num(pagination.totalCount) ?? 0,
110
+ },
111
+ };
112
+ }
113
+ /**
114
+ * One server's record: its hosted connections and the config KEYS they require.
115
+ *
116
+ * A connection with no `deploymentUrl` (a stdio-only server Smithery knows but does not host) yields a
117
+ * `remote: false` detail, which the adapter refuses — Smithery's local packages are its own npm
118
+ * distribution, not an MCP launch this writer can merge.
119
+ */
120
+ export async function fetchSmitheryServer(qualifiedName, fetchImpl = fetch) {
121
+ const read = await readJson(`${SERVERS}/${encodeURIComponent(qualifiedName)}`, fetchImpl, 'Smithery');
122
+ if (!read.ok)
123
+ return read;
124
+ const connections = (Array.isArray(read.body.connections) ? read.body.connections : [])
125
+ .filter((c) => !!c && typeof c === 'object')
126
+ .map((c) => {
127
+ const schema = (c.configSchema ?? {});
128
+ const required = Array.isArray(schema.required)
129
+ ? schema.required.filter((k) => typeof k === 'string')
130
+ : [];
131
+ return {
132
+ ...(str(c.type) ? { type: str(c.type) } : {}),
133
+ ...(str(c.deploymentUrl) ? { deploymentUrl: str(c.deploymentUrl) } : {}),
134
+ ...(required.length > 0 ? { requiredKeys: [...new Set(required)].sort() } : {}),
135
+ };
136
+ });
137
+ return {
138
+ ok: true,
139
+ detail: {
140
+ qualifiedName: str(read.body.qualifiedName) ?? qualifiedName,
141
+ ...(str(read.body.description) ? { description: str(read.body.description) } : {}),
142
+ remote: read.body.remote === true || connections.some((c) => c.deploymentUrl !== undefined),
143
+ connections,
144
+ },
145
+ };
146
+ }
@@ -0,0 +1,11 @@
1
+ import type { SourceAdapter } from '../spi.js';
2
+ /**
3
+ * awesome-opencode install adapter (ADR-0015 §D6).
4
+ *
5
+ * The community registry names no npm package, so browsing is not enough to install: the entry has to
6
+ * be turned into a package spec at install time. The earning rules are shared with every other catalog
7
+ * (`catalog-npm.ts`); this adapter only reads the registry and guards the row's category — `themes`,
8
+ * `agents`, `projects` and `resources` are not extensions, and listing one in an extension market
9
+ * would be a category error.
10
+ */
11
+ export declare const awesomeAdapter: SourceAdapter;