@ggui-ai/registry-core 0.7.0 → 0.9.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 (45) hide show
  1. package/dist/impls/memory-bundle-storage.d.ts.map +1 -1
  2. package/dist/impls/memory-bundle-storage.js +25 -22
  3. package/dist/impls/memory-registry-storage.d.ts.map +1 -1
  4. package/dist/impls/memory-registry-storage.js +10 -0
  5. package/dist/index.d.ts +4 -2
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +4 -1
  8. package/dist/interfaces/bundle-storage.d.ts +55 -31
  9. package/dist/interfaces/bundle-storage.d.ts.map +1 -1
  10. package/dist/interfaces/registry-storage.d.ts +24 -2
  11. package/dist/interfaces/registry-storage.d.ts.map +1 -1
  12. package/dist/mcp-tool-filters.d.ts +23 -0
  13. package/dist/mcp-tool-filters.d.ts.map +1 -0
  14. package/dist/mcp-tool-filters.js +14 -0
  15. package/dist/ops/compile.d.ts.map +1 -1
  16. package/dist/ops/compile.js +19 -1
  17. package/dist/ops/conformance.d.ts +8 -5
  18. package/dist/ops/conformance.d.ts.map +1 -1
  19. package/dist/ops/conformance.js +35 -7
  20. package/dist/ops/list-versions.d.ts +19 -10
  21. package/dist/ops/list-versions.d.ts.map +1 -1
  22. package/dist/ops/list-versions.js +43 -8
  23. package/dist/ops/private-read-authz.d.ts +88 -0
  24. package/dist/ops/private-read-authz.d.ts.map +1 -0
  25. package/dist/ops/private-read-authz.js +58 -0
  26. package/dist/ops/publish.d.ts +30 -0
  27. package/dist/ops/publish.d.ts.map +1 -1
  28. package/dist/ops/publish.js +163 -29
  29. package/dist/ops/read.d.ts +28 -6
  30. package/dist/ops/read.d.ts.map +1 -1
  31. package/dist/ops/read.js +47 -7
  32. package/dist/ops/search.d.ts +18 -3
  33. package/dist/ops/search.d.ts.map +1 -1
  34. package/dist/ops/search.js +54 -2
  35. package/dist/testing/bundle-storage-contract.d.ts.map +1 -1
  36. package/dist/testing/bundle-storage-contract.js +61 -27
  37. package/dist/testing/registry-storage-contract.d.ts.map +1 -1
  38. package/dist/testing/registry-storage-contract.js +148 -1
  39. package/dist/types.d.ts +115 -16
  40. package/dist/types.d.ts.map +1 -1
  41. package/dist/types.js +30 -14
  42. package/dist/utils/lazy-import.d.ts +17 -0
  43. package/dist/utils/lazy-import.d.ts.map +1 -0
  44. package/dist/utils/lazy-import.js +27 -0
  45. package/package.json +11 -5
@@ -17,7 +17,7 @@
17
17
  */
18
18
  import { describe, expect, it } from 'vitest';
19
19
  import { AuthorKeyAlreadyExistsError, } from '../interfaces/registry-storage.js';
20
- import { ARTIFACTS_METADATA_SK } from '../types.js';
20
+ import { ARTIFACTS_METADATA_SK, SAN_ALLOWLIST_INVALID } from '../types.js';
21
21
  function makeMetadata(overrides = {}) {
22
22
  return {
23
23
  artifactId: '@test/foo',
@@ -161,6 +161,32 @@ export function registryStorageContract(makeStorage) {
161
161
  const ids = page.rows.map((r) => r.artifactId).sort();
162
162
  expect(ids).toEqual(['@a/1', '@b/2']);
163
163
  });
164
+ // #474 — visibility gating is ruled to live INSIDE every
165
+ // scanArtifacts impl (the search op's post-filter stays as
166
+ // defense-in-depth, but must never be the ONLY gate — otherwise
167
+ // private rows consume page slots on self-host impls, an
168
+ // observable underfill).
169
+ it('excludes private rows from scanArtifacts results (#474)', async () => {
170
+ const storage = makeStorage();
171
+ await storage.putArtifactMetadata(makeMetadata({ artifactId: '@a/secret', visibility: 'private' }));
172
+ await storage.putArtifactMetadata(makeMetadata({ artifactId: '@a/public', visibility: 'public' }));
173
+ const page = await storage.scanArtifacts({});
174
+ expect(page.rows.map((r) => r.artifactId)).toEqual(['@a/public']);
175
+ });
176
+ it('private rows never consume a page slot — a `limit` is satisfied entirely from public rows (#474)', async () => {
177
+ const storage = makeStorage();
178
+ // Private rows interleaved with public ones. If private rows
179
+ // consumed limit slots (visibility filtered only at the op
180
+ // layer, after pagination), a limit=2 request could return
181
+ // fewer than 2 public rows.
182
+ await storage.putArtifactMetadata(makeMetadata({ artifactId: '@a/priv1', visibility: 'private' }));
183
+ await storage.putArtifactMetadata(makeMetadata({ artifactId: '@a/pub1', visibility: 'public' }));
184
+ await storage.putArtifactMetadata(makeMetadata({ artifactId: '@a/priv2', visibility: 'private' }));
185
+ await storage.putArtifactMetadata(makeMetadata({ artifactId: '@a/pub2', visibility: 'public' }));
186
+ await storage.putArtifactMetadata(makeMetadata({ artifactId: '@a/priv3', visibility: 'private' }));
187
+ const page = await storage.scanArtifacts({ limit: 2 });
188
+ expect(page.rows.map((r) => r.artifactId).sort()).toEqual(['@a/pub1', '@a/pub2']);
189
+ });
164
190
  it('filters by kind', async () => {
165
191
  const storage = makeStorage();
166
192
  await storage.putArtifactMetadata(makeMetadata({ artifactId: '@a/g', kind: 'gadget' }));
@@ -265,6 +291,68 @@ export function registryStorageContract(makeStorage) {
265
291
  const byTag = await storage.scanArtifacts({ q: 'geo' });
266
292
  expect(byTag.rows.map((r) => r.artifactId)).toEqual(['@a/leaflet']);
267
293
  });
294
+ // #259 delta-2 — MCP tool-binding filters share `matchesMcpToolFilters`
295
+ // semantics with the search op; every impl must honor them identically
296
+ // (the byMcpTool GSI path in the DDB adapter is the load-bearing case).
297
+ it('filters by tool (matches any entry with that tool name, with or without a server)', async () => {
298
+ const storage = makeStorage();
299
+ await storage.putArtifactMetadata(makeMetadata({
300
+ artifactId: '@a/stripe-ui',
301
+ mcpTools: [{ server: 'stripe-mcp', tool: 'create_payment' }],
302
+ mcpToolsSource: 'declared',
303
+ }));
304
+ await storage.putArtifactMetadata(makeMetadata({
305
+ artifactId: '@a/bare-ui',
306
+ mcpTools: [{ tool: 'refund_payment' }],
307
+ mcpToolsSource: 'derived',
308
+ }));
309
+ await storage.putArtifactMetadata(makeMetadata({ artifactId: '@a/unbound', mcpTools: undefined }));
310
+ const byServerBound = await storage.scanArtifacts({ tool: 'create_payment' });
311
+ expect(byServerBound.rows.map((r) => r.artifactId)).toEqual(['@a/stripe-ui']);
312
+ const byBare = await storage.scanArtifacts({ tool: 'refund_payment' });
313
+ expect(byBare.rows.map((r) => r.artifactId)).toEqual(['@a/bare-ui']);
314
+ const byMiss = await storage.scanArtifacts({ tool: 'unknown_tool' });
315
+ expect(byMiss.rows).toEqual([]);
316
+ });
317
+ it('filters by server; bare-tool entries never match', async () => {
318
+ const storage = makeStorage();
319
+ await storage.putArtifactMetadata(makeMetadata({
320
+ artifactId: '@a/bound',
321
+ mcpTools: [{ server: 'stripe-mcp', tool: 'create_payment' }],
322
+ mcpToolsSource: 'declared',
323
+ }));
324
+ await storage.putArtifactMetadata(makeMetadata({
325
+ artifactId: '@a/bare',
326
+ mcpTools: [{ tool: 'create_payment' }],
327
+ mcpToolsSource: 'derived',
328
+ }));
329
+ const page = await storage.scanArtifacts({ server: 'stripe-mcp' });
330
+ expect(page.rows.map((r) => r.artifactId)).toEqual(['@a/bound']);
331
+ });
332
+ it('tool + server composes into the exact-pair filter — cross-product is not enough', async () => {
333
+ const storage = makeStorage();
334
+ // A single artifact declaring TWO bindings — `stripe-mcp` and
335
+ // `refund_payment` each independently exist on this row, but
336
+ // never paired on the same binding entry.
337
+ await storage.putArtifactMetadata(makeMetadata({
338
+ artifactId: '@a/multi-bound',
339
+ mcpTools: [
340
+ { server: 'stripe-mcp', tool: 'create_payment' },
341
+ { server: 'other-mcp', tool: 'refund_payment' },
342
+ ],
343
+ mcpToolsSource: 'declared',
344
+ }));
345
+ const exactPair = await storage.scanArtifacts({
346
+ server: 'stripe-mcp',
347
+ tool: 'create_payment',
348
+ });
349
+ expect(exactPair.rows.map((r) => r.artifactId)).toEqual(['@a/multi-bound']);
350
+ const crossProduct = await storage.scanArtifacts({
351
+ server: 'stripe-mcp',
352
+ tool: 'refund_payment',
353
+ });
354
+ expect(crossProduct.rows).toEqual([]);
355
+ });
268
356
  });
269
357
  describe('plugin versions', () => {
270
358
  it('returns null for missing version', async () => {
@@ -582,6 +670,65 @@ export function registryStorageContract(makeStorage) {
582
670
  await storage.claimScope(makeScopeOwner({ ownerSubject: 'winner' }));
583
671
  expect((await storage.getScopeOwner('@test'))?.ownerSubject).toBe('winner');
584
672
  });
673
+ // F4 — `sanAllowlist` is the per-scope publisher-identity
674
+ // allowlist the publish gate enforces on sigstore-signed
675
+ // publishes. It's an OPTIONAL array column: a row without it
676
+ // falls back to the deployment's default identity rule, so a
677
+ // storage impl that silently drops (or fabricates) the field
678
+ // would flip a scope's identity policy without any write.
679
+ it('claimScope round-trips a sanAllowlist (F4 identity binding)', async () => {
680
+ const storage = makeStorage();
681
+ const row = makeScopeOwner({
682
+ sanAllowlist: [
683
+ 'ci@test.example',
684
+ 'https://ci.example.com/workflows/publish.yml@refs/heads/main',
685
+ ],
686
+ });
687
+ await storage.claimScope(row);
688
+ expect(await storage.getScopeOwner(row.scope)).toEqual(row);
689
+ });
690
+ it('updateScopeOwner sets a sanAllowlist on an existing row (operator path)', async () => {
691
+ const storage = makeStorage();
692
+ await storage.claimScope(makeScopeOwner());
693
+ const withAllowlist = makeScopeOwner({ sanAllowlist: ['ops@test.example'] });
694
+ const result = await storage.updateScopeOwner(withAllowlist, {
695
+ ownerSubject: 'user-1',
696
+ verification: 'unverified',
697
+ });
698
+ expect(result).toEqual({ ok: true });
699
+ expect(await storage.getScopeOwner('@test')).toEqual(withAllowlist);
700
+ });
701
+ it('the SAN_ALLOWLIST_INVALID marker round-trips as invalid — corruption never launders into a valid policy', async () => {
702
+ // Fail-closed obligation: an adapter that reads malformed
703
+ // allowlist data projects SAN_ALLOWLIST_INVALID (see
704
+ // ScopeOwnerRow.sanAllowlist). Writing the marker itself back
705
+ // (e.g. a verification flip preserving a corrupt column) MUST
706
+ // read back as invalid in every impl — the marker is a bare
707
+ // string, itself a malformed column value, so the round-trip
708
+ // cannot turn corruption into "no allowlist" or a real list.
709
+ const storage = makeStorage();
710
+ const row = makeScopeOwner({ sanAllowlist: SAN_ALLOWLIST_INVALID });
711
+ await storage.claimScope(row);
712
+ expect((await storage.getScopeOwner('@test'))?.sanAllowlist).toBe(SAN_ALLOWLIST_INVALID);
713
+ });
714
+ it('updateScopeOwner clears a sanAllowlist — the field is ABSENT after, not empty', async () => {
715
+ // Absent vs empty is load-bearing: the publish gate treats a
716
+ // missing allowlist as "no per-scope rule" (default identity
717
+ // rule applies). A cleared row that came back `[]` instead of
718
+ // absent would be indistinguishable in JS truthiness tests but
719
+ // MUST round-trip as absent so every impl agrees on the shape.
720
+ const storage = makeStorage();
721
+ await storage.claimScope(makeScopeOwner({ sanAllowlist: ['ops@test.example'] }));
722
+ const cleared = makeScopeOwner();
723
+ const result = await storage.updateScopeOwner(cleared, {
724
+ ownerSubject: 'user-1',
725
+ verification: 'unverified',
726
+ });
727
+ expect(result).toEqual({ ok: true });
728
+ const fetched = await storage.getScopeOwner('@test');
729
+ expect(fetched).toEqual(cleared);
730
+ expect(fetched?.sanAllowlist).toBeUndefined();
731
+ });
585
732
  });
586
733
  describe('author keys', () => {
587
734
  it('returns null on miss', async () => {
package/dist/types.d.ts CHANGED
@@ -14,7 +14,7 @@
14
14
  * 'blueprint'` as the discriminator. The field name `artifactId`
15
15
  * matches what the field actually contains.
16
16
  */
17
- import type { ArtifactManifest } from '@ggui-ai/artifact-manifest';
17
+ import type { ArtifactManifest, McpToolBinding, McpToolBindingSource } from '@ggui-ai/artifact-manifest';
18
18
  import type { GadgetSignature } from '@ggui-ai/gadget-signing';
19
19
  import type { ConformanceFailureCode } from './ops/conformance.js';
20
20
  /**
@@ -54,6 +54,15 @@ export interface ArtifactsMetadataRow {
54
54
  readonly tags?: readonly string[];
55
55
  readonly visibility: Visibility;
56
56
  readonly hook?: string;
57
+ /**
58
+ * Denormalized MCP tool bindings of the latest version — stamped at
59
+ * publish from the manifest's declared `mcpTools`, or derived from a
60
+ * blueprint contract's tool names, so registry search can filter by
61
+ * tool without reading version rows.
62
+ */
63
+ readonly mcpTools?: ReadonlyArray<McpToolBinding>;
64
+ /** How the denormalized bindings were produced: declared on the manifest, or derived from the contract. */
65
+ readonly mcpToolsSource?: McpToolBindingSource;
57
66
  readonly authorName?: string;
58
67
  readonly publishedAt: string;
59
68
  readonly publishedBy: string;
@@ -239,7 +248,55 @@ export interface ScopeOwnerRow {
239
248
  readonly verifiedDomain?: string;
240
249
  /** ISO timestamp of the verification, present when `verification: 'verified'`. */
241
250
  readonly verifiedAt?: string;
251
+ /**
252
+ * F4 identity binding — per-scope allowlist of sigstore certificate
253
+ * identities (the Fulcio cert's SubjectAlternativeName) permitted to
254
+ * publish under this scope. Entries are EXACT literal identity
255
+ * strings — an email (`release@acme.com`) or a CI workflow identity
256
+ * URI (`https://github.com/acme/app/.github/workflows/publish.yml@refs/heads/main`).
257
+ * Regex/glob patterns are deliberately NOT stored server-side: an
258
+ * allowlist is a finite set of named signers, and pattern semantics
259
+ * would make the authorization decision unauditable.
260
+ *
261
+ * Case rule: ONE rule for every identity comparison — the publish
262
+ * gate matches entries against certificate SANs CASE-INSENSITIVELY
263
+ * (mirroring the verified-email rule), and the operator tooling
264
+ * lowercase-normalizes entries at write time.
265
+ *
266
+ * Enforcement (publish gate, sigstore-signed publishes only): when
267
+ * present and non-empty, one of the bundle certificate's SANs MUST
268
+ * match one of these entries. When absent, the deployment's default
269
+ * identity rule applies — a SAN must equal the publishing account's
270
+ * verified email where the deployment provides a resolver;
271
+ * deployments without one enforce identity only through this
272
+ * allowlist.
273
+ *
274
+ * Fail-closed corruption handling: a storage adapter that finds a
275
+ * MALFORMED value in this column (anything but an array of strings)
276
+ * MUST project it as {@link SAN_ALLOWLIST_INVALID}, never as absent
277
+ * — projecting corrupt policy data as "no allowlist" would silently
278
+ * downgrade the scope to the weaker default rule. The publish gate
279
+ * rejects sigstore publishes into such a scope with a
280
+ * storage-inconsistency error until an operator rewrites the column
281
+ * (set or clear). Writers MUST only ever write string arrays.
282
+ *
283
+ * Managed by the registry operator (never by publish); a first-
284
+ * publish claim always lands without one, and an ownership transfer
285
+ * drops it (the previous owner's signer identities must not survive
286
+ * into the new owner's scope).
287
+ */
288
+ readonly sanAllowlist?: readonly string[] | SanAllowlistInvalid;
242
289
  }
290
+ /**
291
+ * Fail-closed marker a storage adapter projects when the
292
+ * {@link ScopeOwnerRow.sanAllowlist} column holds malformed data (see
293
+ * that field's docstring). Chosen as a bare string precisely because a
294
+ * string is itself a malformed value for the column — the marker
295
+ * round-trips as invalid through every storage impl, so corruption can
296
+ * never launder itself back into a valid policy.
297
+ */
298
+ export declare const SAN_ALLOWLIST_INVALID: "invalid";
299
+ export type SanAllowlistInvalid = typeof SAN_ALLOWLIST_INVALID;
243
300
  /**
244
301
  * `GET /pkg/{scope}/{name}/{version}` body.
245
302
  *
@@ -266,6 +323,14 @@ export interface ReadPkgResponse {
266
323
  readonly authorPublicKey?: string;
267
324
  readonly publishedAt: string;
268
325
  readonly publishedBy: string;
326
+ /**
327
+ * Verification state of the package's scope. Present only when the
328
+ * scope-ownership row was read; ABSENT when the scope state is
329
+ * unknown — absence is not `'unverified'`.
330
+ */
331
+ readonly scopeVerification?: ScopeVerification;
332
+ /** Domain whose control was proven — present only when `scopeVerification: 'verified'`. */
333
+ readonly verifiedDomain?: string;
269
334
  }
270
335
  /**
271
336
  * One row of `GET /search?…` results — a lightweight per-artifactId
@@ -279,6 +344,19 @@ export interface SearchResultEntry {
279
344
  readonly description?: string;
280
345
  readonly tags?: readonly string[];
281
346
  readonly publishedAt: string;
347
+ /** MCP tool bindings of the latest version, when the artifact declares or derives any. */
348
+ readonly mcpTools?: ReadonlyArray<McpToolBinding>;
349
+ /** How the bindings were produced: declared on the manifest, or derived from a blueprint contract. */
350
+ readonly mcpToolsSource?: McpToolBindingSource;
351
+ /**
352
+ * Verification state of the artifact's scope. Present only when the
353
+ * scope-ownership row was read; ABSENT when the scope state is
354
+ * unknown (unclaimed scope or a failed lookup) — absence is not
355
+ * `'unverified'`.
356
+ */
357
+ readonly scopeVerification?: ScopeVerification;
358
+ /** Domain whose control was proven — present only when `scopeVerification: 'verified'`. */
359
+ readonly verifiedDomain?: string;
282
360
  }
283
361
  /**
284
362
  * `GET /search?…` body. `nextCursor` is opaque (impl-defined: a
@@ -290,8 +368,8 @@ export interface SearchResponse {
290
368
  readonly nextCursor?: string;
291
369
  }
292
370
  /**
293
- * `GET /search` sort options. Supports a registry-web "Recent" view
294
- * that needs `publishedAt`-DESC ordering.
371
+ * `GET /search` sort options. Supports registry browse UIs that need
372
+ * a "Recent" view with `publishedAt`-DESC ordering.
295
373
  *
296
374
  * - `recent` — order by {@link ArtifactsMetadataRow.publishedAt} DESC.
297
375
  *
@@ -382,7 +460,7 @@ export interface PublishResponseBody {
382
460
  * propagates to both the wire and the runtime membership check used
383
461
  * by downstream guards.
384
462
  */
385
- export declare const PUBLISH_ERROR_CODES: readonly ["unauthorized", "manifest_invalid", "bundle_required", "bundle_too_large", "conformance_failed", "bundle_hash_mismatch", "visibility_algorithm_mismatch", "scope_forbidden", "unknown_key", "signature_invalid", "version_exists", "internal"];
463
+ export declare const PUBLISH_ERROR_CODES: readonly ["unauthorized", "manifest_invalid", "bundle_required", "bundle_too_large", "conformance_failed", "bundle_hash_mismatch", "visibility_algorithm_mismatch", "scope_forbidden", "identity_mismatch", "unknown_key", "signature_invalid", "version_exists", "internal"];
386
464
  export type PublishErrorCode = (typeof PUBLISH_ERROR_CODES)[number];
387
465
  /**
388
466
  * Closed enum for `GET /pkg/:scope/:name[/version]` read responses.
@@ -390,16 +468,21 @@ export type PublishErrorCode = (typeof PUBLISH_ERROR_CODES)[number];
390
468
  * `yanked` is the 410-Gone path — the version exists in metadata but
391
469
  * the publisher revoked it. Clients SHOULD treat this as a hard
392
470
  * failure (don't fall back to a different version automatically).
471
+ *
472
+ * There is deliberately NO `forbidden` code: an unauthorized read of
473
+ * a private row answers with the SAME `not_found` shape as a true
474
+ * miss, so the wire never confirms a private artifact exists.
393
475
  */
394
- export declare const READ_ERROR_CODES: readonly ["not_found", "forbidden", "invalid_request", "yanked", "server_error"];
476
+ export declare const READ_ERROR_CODES: readonly ["not_found", "invalid_request", "yanked", "server_error"];
395
477
  export type ReadErrorCode = (typeof READ_ERROR_CODES)[number];
396
478
  /**
397
- * Closed enum for `GET /search` responses. Same posture as
398
- * {@link ReadErrorCode} minus the `yanked` path (search filters
399
- * yanked rows out of the result set; it never surfaces as a top-level
400
- * error).
479
+ * Closed enum for `GET /search` responses. Search serves only public
480
+ * metadata rows and takes no caller identity, so the surface has no
481
+ * authorization failure at all — just request validation and adapter
482
+ * faults. (`yanked` likewise never surfaces: search filters yanked
483
+ * rows out of the result set.)
401
484
  */
402
- export declare const SEARCH_ERROR_CODES: readonly ["forbidden", "invalid_request", "server_error"];
485
+ export declare const SEARCH_ERROR_CODES: readonly ["invalid_request", "server_error"];
403
486
  export type SearchErrorCode = (typeof SEARCH_ERROR_CODES)[number];
404
487
  /**
405
488
  * Closed enum for `POST /author-keys` register responses. An operator
@@ -595,6 +678,19 @@ export interface ArtifactScanFilter {
595
678
  readonly hook?: string;
596
679
  readonly tag?: string;
597
680
  readonly author?: string;
681
+ /**
682
+ * Exact MCP tool-name filter. Matches rows whose binding list has an
683
+ * entry with this tool name — with or without a server. Case-sensitive.
684
+ * Shared semantics: `matchesMcpToolFilters` in this package.
685
+ */
686
+ readonly tool?: string;
687
+ /**
688
+ * Exact MCP server-name filter. Matches rows whose binding list has an
689
+ * entry declaring this server; bare (server-less) entries never match.
690
+ * Combined with `tool`, requires a single entry carrying exactly that
691
+ * (server, tool) pair. Case-sensitive.
692
+ */
693
+ readonly server?: string;
598
694
  readonly limit?: number;
599
695
  readonly cursor?: string;
600
696
  /**
@@ -611,12 +707,15 @@ export interface ArtifactScanFilter {
611
707
  * Closed enum for `GET /pkg/{scope}/{name}` list-versions responses.
612
708
  *
613
709
  * - `invalid_request` — missing or malformed `artifactId`.
614
- * - `not_found` — no metadata row for `artifactId`. Distinct
615
- * from "metadata present but every version is
616
- * private + caller unauthed" (that path returns
617
- * 200 with `versions: []` — exposing 404 vs
618
- * empty would leak private-row existence).
619
- * - `server_error` — unexpected adapter failure.
710
+ * - `not_found` — no metadata row for `artifactId`, OR no
711
+ * version of it is visible to the caller.
712
+ * The two are DELIBERATELY indistinguishable:
713
+ * any difference between "does not exist" and
714
+ * "exists but you may not see it" is an
715
+ * existence oracle for private artifacts.
716
+ * - `server_error` — unexpected adapter failure. The message is
717
+ * generic by contract — raw storage error text
718
+ * never reaches the wire.
620
719
  */
621
720
  export declare const LIST_VERSIONS_ERROR_CODES: readonly ["invalid_request", "not_found", "server_error"];
622
721
  export type ListVersionsErrorCode = (typeof LIST_VERSIONS_ERROR_CODES)[number];
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAEnE;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,EAAG,WAAoB,CAAC;AAE1D;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,WAAW,CAAC;AAElD;;;;;;;;GAQG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,EAAE,OAAO,qBAAqB,CAAC;IAC1C,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,IA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;;;;GAaG;AACH,eAAO,MAAM,yBAAyB,2DAI5B,CAAC;AACX,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/E;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,KAAK,EAAE,qBAAqB,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC3B"}
package/dist/types.js CHANGED
@@ -18,8 +18,17 @@ export const ARTIFACTS_METADATA_SK = 'metadata#';
18
18
  */
19
19
  export const SCOPE_VERIFICATIONS = ['unverified', 'verified'];
20
20
  /**
21
- * `GET /search` sort options. Supports a registry-web "Recent" view
22
- * that needs `publishedAt`-DESC ordering.
21
+ * Fail-closed marker a storage adapter projects when the
22
+ * {@link ScopeOwnerRow.sanAllowlist} column holds malformed data (see
23
+ * that field's docstring). Chosen as a bare string precisely because a
24
+ * string is itself a malformed value for the column — the marker
25
+ * round-trips as invalid through every storage impl, so corruption can
26
+ * never launder itself back into a valid policy.
27
+ */
28
+ export const SAN_ALLOWLIST_INVALID = 'invalid';
29
+ /**
30
+ * `GET /search` sort options. Supports registry browse UIs that need
31
+ * a "Recent" view with `publishedAt`-DESC ordering.
23
32
  *
24
33
  * - `recent` — order by {@link ArtifactsMetadataRow.publishedAt} DESC.
25
34
  *
@@ -52,6 +61,7 @@ export const PUBLISH_ERROR_CODES = [
52
61
  'bundle_hash_mismatch',
53
62
  'visibility_algorithm_mismatch',
54
63
  'scope_forbidden',
64
+ 'identity_mismatch',
55
65
  'unknown_key',
56
66
  'signature_invalid',
57
67
  'version_exists',
@@ -63,22 +73,25 @@ export const PUBLISH_ERROR_CODES = [
63
73
  * `yanked` is the 410-Gone path — the version exists in metadata but
64
74
  * the publisher revoked it. Clients SHOULD treat this as a hard
65
75
  * failure (don't fall back to a different version automatically).
76
+ *
77
+ * There is deliberately NO `forbidden` code: an unauthorized read of
78
+ * a private row answers with the SAME `not_found` shape as a true
79
+ * miss, so the wire never confirms a private artifact exists.
66
80
  */
67
81
  export const READ_ERROR_CODES = [
68
82
  'not_found',
69
- 'forbidden',
70
83
  'invalid_request',
71
84
  'yanked',
72
85
  'server_error',
73
86
  ];
74
87
  /**
75
- * Closed enum for `GET /search` responses. Same posture as
76
- * {@link ReadErrorCode} minus the `yanked` path (search filters
77
- * yanked rows out of the result set; it never surfaces as a top-level
78
- * error).
88
+ * Closed enum for `GET /search` responses. Search serves only public
89
+ * metadata rows and takes no caller identity, so the surface has no
90
+ * authorization failure at all — just request validation and adapter
91
+ * faults. (`yanked` likewise never surfaces: search filters yanked
92
+ * rows out of the result set.)
79
93
  */
80
94
  export const SEARCH_ERROR_CODES = [
81
- 'forbidden',
82
95
  'invalid_request',
83
96
  'server_error',
84
97
  ];
@@ -143,12 +156,15 @@ export function unauthorizedErrorBody() {
143
156
  * Closed enum for `GET /pkg/{scope}/{name}` list-versions responses.
144
157
  *
145
158
  * - `invalid_request` — missing or malformed `artifactId`.
146
- * - `not_found` — no metadata row for `artifactId`. Distinct
147
- * from "metadata present but every version is
148
- * private + caller unauthed" (that path returns
149
- * 200 with `versions: []` — exposing 404 vs
150
- * empty would leak private-row existence).
151
- * - `server_error` — unexpected adapter failure.
159
+ * - `not_found` — no metadata row for `artifactId`, OR no
160
+ * version of it is visible to the caller.
161
+ * The two are DELIBERATELY indistinguishable:
162
+ * any difference between "does not exist" and
163
+ * "exists but you may not see it" is an
164
+ * existence oracle for private artifacts.
165
+ * - `server_error` — unexpected adapter failure. The message is
166
+ * generic by contract — raw storage error text
167
+ * never reaches the wire.
152
168
  */
153
169
  export const LIST_VERSIONS_ERROR_CODES = [
154
170
  'invalid_request',
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Memoizing wrapper around a lazy async load. Caches the in-flight (or
3
+ * already-resolved) promise so concurrent and later callers share one
4
+ * load — but clears the cache on rejection, so a failed attempt
5
+ * doesn't poison every later call for the rest of the process.
6
+ *
7
+ * A rejected promise is still a defined value, so a bare
8
+ * `cached ??= loader()` would cache the failure permanently: every
9
+ * later call would re-throw the same stale rejection even once
10
+ * whatever caused it (a transient resolution failure, a missing
11
+ * optional dependency on first use, …) is no longer true. This
12
+ * wrapper resets the cache to `undefined` on rejection so the next
13
+ * call starts a fresh attempt, while still deduping callers that
14
+ * arrive while an attempt is in flight.
15
+ */
16
+ export declare function memoizedRetryingImport<T>(loader: () => Promise<T>): () => Promise<T>;
17
+ //# sourceMappingURL=lazy-import.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lazy-import.d.ts","sourceRoot":"","sources":["../../src/utils/lazy-import.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,OAAO,CAAC,CAAC,CAAC,CAWpF"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Memoizing wrapper around a lazy async load. Caches the in-flight (or
3
+ * already-resolved) promise so concurrent and later callers share one
4
+ * load — but clears the cache on rejection, so a failed attempt
5
+ * doesn't poison every later call for the rest of the process.
6
+ *
7
+ * A rejected promise is still a defined value, so a bare
8
+ * `cached ??= loader()` would cache the failure permanently: every
9
+ * later call would re-throw the same stale rejection even once
10
+ * whatever caused it (a transient resolution failure, a missing
11
+ * optional dependency on first use, …) is no longer true. This
12
+ * wrapper resets the cache to `undefined` on rejection so the next
13
+ * call starts a fresh attempt, while still deduping callers that
14
+ * arrive while an attempt is in flight.
15
+ */
16
+ export function memoizedRetryingImport(loader) {
17
+ let cached;
18
+ return () => {
19
+ if (cached === undefined) {
20
+ cached = loader().catch((err) => {
21
+ cached = undefined;
22
+ throw err;
23
+ });
24
+ }
25
+ return cached;
26
+ };
27
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ggui-ai/registry-core",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "Pure-TypeScript registry operations and storage interfaces for the ggui marketplace. No I/O, no HTTP — operations take typed inputs plus a storage deps bag and return discriminated-union results.",
5
5
  "keywords": [
6
6
  "ggui",
@@ -43,15 +43,20 @@
43
43
  "types": "./dist/interfaces/registry-storage.d.ts",
44
44
  "import": "./dist/interfaces/registry-storage.js",
45
45
  "default": "./dist/interfaces/registry-storage.js"
46
+ },
47
+ "./ops/private-read-authz": {
48
+ "types": "./dist/ops/private-read-authz.d.ts",
49
+ "import": "./dist/ops/private-read-authz.js",
50
+ "default": "./dist/ops/private-read-authz.js"
46
51
  }
47
52
  },
48
53
  "dependencies": {
49
54
  "esbuild": "0.25.12",
50
55
  "oxc-parser": "^0.131.0",
51
56
  "zod": "^4.3.6",
52
- "@ggui-ai/artifact-manifest": "0.7.0",
53
- "@ggui-ai/gadget-signing": "0.7.0",
54
- "@ggui-ai/protocol": "0.7.0"
57
+ "@ggui-ai/protocol": "0.9.0",
58
+ "@ggui-ai/artifact-manifest": "0.9.0",
59
+ "@ggui-ai/gadget-signing": "0.9.0"
55
60
  },
56
61
  "peerDependenciesMeta": {
57
62
  "vitest": {
@@ -65,7 +70,8 @@
65
70
  "@types/node": "^24.0.0",
66
71
  "nock": "^13.5.6",
67
72
  "typescript": "^5.0.0",
68
- "vitest": "^3.2.6"
73
+ "vitest": "^3.2.6",
74
+ "@ggui-ai/protocol-conformance": "0.9.0"
69
75
  },
70
76
  "repository": {
71
77
  "type": "git",