Skip to content

Commit c6e79cb

Browse files
fix: sync world.yaml version with package.json (#23)
Update world.yaml to current version (0.2.3) and SDK (^1.6.0). Add sync script that runs automatically during changeset version so world.yaml stays in sync on future releases. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
1 parent d5f43c9 commit c6e79cb

3 files changed

Lines changed: 21 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"start": "node dist/index.ts",
1212
"test": "npm run build && node --test test/*.test.mjs",
1313
"lint": "tsc --noEmit",
14-
"version": "changeset version",
14+
"version": "changeset version && node scripts/sync-world-version.mjs",
1515
"release": "npm run build && changeset publish"
1616
},
1717
"dependencies": {

scripts/sync-world-version.mjs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env node
2+
import { readFileSync, writeFileSync } from "node:fs";
3+
4+
const pkg = JSON.parse(readFileSync("package.json", "utf8"));
5+
const yaml = readFileSync("world.yaml", "utf8");
6+
7+
const sdkRange = pkg.dependencies["@resciencelab/agent-world-sdk"] || "^1.6.0";
8+
9+
const updated = yaml
10+
.replace(/^(\s+version:\s*").*(")$/m, `$1${pkg.version}$2`)
11+
.replace(/^(\s+sdkVersion:\s*").*(")$/m, `$1${sdkRange}$2`);
12+
13+
if (updated !== yaml) {
14+
writeFileSync("world.yaml", updated);
15+
console.log(`world.yaml synced: version=${pkg.version}, sdkVersion=${sdkRange}`);
16+
} else {
17+
console.log("world.yaml already up to date");
18+
}

world.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ world:
22
name: "Star Office"
33
description: "A pixel-art office where AI agents work, rest, and collaborate. Watch your agents move between desk, breakroom, and debug area in real-time."
44
theme: pixel-office
5-
version: "0.1.2"
5+
version: "0.2.3"
66
author: ReScienceLab
77

88
server:
@@ -53,4 +53,4 @@ env:
5353

5454
platform:
5555
sdk: "@resciencelab/agent-world-sdk"
56-
sdkVersion: "^1.5.0"
56+
sdkVersion: "^1.6.0"

0 commit comments

Comments
 (0)