@ggui-ai/registry-server 0.4.0-rc.0 → 0.5.0-rc.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.
@@ -1 +1 @@
1
- {"version":3,"file":"filesystem-registry-storage.d.ts","sourceRoot":"","sources":["../src/filesystem-registry-storage.ts"],"names":[],"mappings":"AA+DA,OAAO,KAAK,EAMV,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAKhC,MAAM,WAAW,gCAAgC;IAC/C,iFAAiF;IACjF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,gCAAgC,GACxC,eAAe,CAuLjB"}
1
+ {"version":3,"file":"filesystem-registry-storage.d.ts","sourceRoot":"","sources":["../src/filesystem-registry-storage.ts"],"names":[],"mappings":"AAiEA,OAAO,KAAK,EAMV,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAKhC,MAAM,WAAW,gCAAgC;IAC/C,iFAAiF;IACjF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,gCAAgC,GACxC,eAAe,CAkMjB"}
@@ -32,12 +32,14 @@
32
32
  * ## Scan semantics
33
33
  *
34
34
  * {@link scanArtifacts} reads every metadata file, applies the same
35
- * AND-composition filter the memory impl does, and slices the result
36
- * to `[offset, offset+limit)`. Cursor is an integer offset encoded as
37
- * a base-10 string — opaque to consumers, identical to memory's
38
- * encoding. For typical OSS deployments (< 10k artifacts) the full
39
- * scan is sub-millisecond; large deployments should migrate to the
40
- * cloud DDB adapter.
35
+ * AND-composition filter the memory impl does, orders the full result
36
+ * set when `order: 'recent'` is requested (publishedAt DESC — globally
37
+ * correct across the cursor chain because ordering precedes slicing),
38
+ * and slices the result to `[offset, offset+limit)`. Cursor is an
39
+ * integer offset encoded as a base-10 string — opaque to consumers,
40
+ * identical to memory's encoding. For typical OSS deployments
41
+ * (< 10k artifacts) the full scan is sub-millisecond; large
42
+ * deployments should migrate to a database-backed adapter.
41
43
  *
42
44
  * ## Protocol & Contract Bar
43
45
  *
@@ -97,6 +99,14 @@ export function createFilesystemRegistryStorage(options) {
97
99
  async scanArtifacts(filter) {
98
100
  const rows = await readAllMetadata(pluginsDir);
99
101
  const filtered = rows.filter((row) => rowMatchesFilter(row, filter));
102
+ if (filter.order === 'recent') {
103
+ // Newest first, globally correct across the offset-cursor chain
104
+ // because the FULL result set is ordered before slicing.
105
+ // ISO-8601 strings compare lexicographically === chronologically;
106
+ // artifactId tie-break keeps the cursor chain deterministic.
107
+ filtered.sort((a, b) => b.publishedAt.localeCompare(a.publishedAt) ||
108
+ a.artifactId.localeCompare(b.artifactId));
109
+ }
100
110
  const limit = clampLimit(filter.limit);
101
111
  const offset = parseCursor(filter.cursor);
102
112
  const page = filtered.slice(offset, offset + limit);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ggui-ai/registry-server",
3
- "version": "0.4.0-rc.0",
3
+ "version": "0.5.0-rc.0",
4
4
  "description": "Self-hostable HTTP server for the ggui marketplace registry. Wraps @ggui-ai/registry-core with hono, filesystem storage, and bearer-token auth. Run via npx for local dev, CI, and on-prem deployments.",
5
5
  "keywords": [
6
6
  "ggui",
@@ -31,9 +31,9 @@
31
31
  "dependencies": {
32
32
  "@hono/node-server": "^2.0.12",
33
33
  "hono": "^4.12.8",
34
- "@ggui-ai/artifact-manifest": "0.4.0-rc.0",
35
- "@ggui-ai/registry-core": "0.4.0-rc.0",
36
- "@ggui-ai/gadget-signing": "0.4.0-rc.0"
34
+ "@ggui-ai/artifact-manifest": "0.5.0-rc.0",
35
+ "@ggui-ai/gadget-signing": "0.5.0-rc.0",
36
+ "@ggui-ai/registry-core": "0.5.0-rc.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "^24.0.0",