Skip to content

Commit 6994233

Browse files
fix: include endpoints in /worlds response and list_worlds discovery (#153)
The gateway `/worlds` endpoint omitted `endpoints`, causing the plugin's `list_worlds` tool to report 'no endpoint' for all gateway-discovered worlds. ## Changes - **gateway/server.mjs**: Add `endpoints` field to `/worlds` response objects - **src/index.ts**: Parse `endpoints` from gateway response and store them in `registryWorlds` and `discoveredPeers` --------- Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
1 parent 29ce8c3 commit 6994233

13 files changed

Lines changed: 790 additions & 466 deletions

.changeset/gateway-auto-openapi.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@resciencelab/agent-world-network": patch
3+
---
4+
5+
Auto-generate OpenAPI spec from route schemas using @fastify/swagger, serve Swagger UI at /docs
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@resciencelab/agent-world-network": patch
3+
---
4+
5+
Include endpoints in /worlds gateway response and list_worlds discovery

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030

3131
- run: npm ci
3232
- run: npm --prefix packages/agent-world-sdk install
33+
- run: npm --prefix gateway install
3334
- run: npm run build
3435
- run: npm --prefix packages/agent-world-sdk run build
3536
- run: node --test test/*.test.mjs

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
run: npm ci
2626
- if: "!startsWith(github.head_ref, 'changeset-release/')"
2727
run: npm --prefix packages/agent-world-sdk install
28+
- if: "!startsWith(github.head_ref, 'changeset-release/')"
29+
run: npm --prefix gateway install
2830
- if: "!startsWith(github.head_ref, 'changeset-release/')"
2931
run: npm run build
3032
- if: "!startsWith(github.head_ref, 'changeset-release/')"

gateway/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ COPY gateway/package*.json ./
1515
# Pre-built SDK at the path file:../packages/agent-world-sdk resolves to
1616
COPY --from=sdk-builder /app/packages/agent-world-sdk /app/packages/agent-world-sdk
1717
RUN npm install --production
18-
COPY gateway/server.mjs ./
18+
COPY gateway/server.mjs gateway/schemas.mjs ./
1919
RUN mkdir -p /data
2020

2121
ENV HTTP_PORT=8100

0 commit comments

Comments
 (0)