gamesteel 0.3.3 → 0.4.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.
- package/README.md +2 -0
- package/dist/gamesteel.js +2308 -981
- package/dist/pkgs/studio/dist/server/playtest-worker.js +65 -3
- package/package.json +22 -23
|
@@ -67964,6 +67964,41 @@ function playtestSceneAt(session, viewport, art = {}) {
|
|
|
67964
67964
|
return sceneShown({ prev: session.state, curr: session.state, prevCam: placed, currCam: placed, alpha: 1, droppedTicks: 0 }, session.facing, viewport, { view, camera, art: { game: session.shown.art, book: art.book ?? /* @__PURE__ */ new Map() } });
|
|
67965
67965
|
}
|
|
67966
67966
|
|
|
67967
|
+
// ../core/dist/playtest/witness.js
|
|
67968
|
+
init_limits();
|
|
67969
|
+
var sixteenth = (value) => Math.round(value * 16) / 16;
|
|
67970
|
+
function checkpointOf(session, ticks) {
|
|
67971
|
+
const { state } = session;
|
|
67972
|
+
const kinds = {};
|
|
67973
|
+
for (const entity of state.entities)
|
|
67974
|
+
if (entity.alive)
|
|
67975
|
+
kinds[entity.kind] = (kinds[entity.kind] ?? 0) + 1;
|
|
67976
|
+
const first = state.entities.filter((entity) => entity.alive && (entity.props.get("player") ?? 0) >= 1).sort((a, b) => a.id - b.id)[0];
|
|
67977
|
+
const seen2 = first === void 0 ? void 0 : inspect(session, [`#${String(first.id)}`])[0];
|
|
67978
|
+
return {
|
|
67979
|
+
at: Math.round(ticks / TICKS_PER_SECOND * 10) / 10,
|
|
67980
|
+
status: state.status,
|
|
67981
|
+
player: seen2 === void 0 ? null : { x: sixteenth(seen2.x), y: sixteenth(seen2.y) },
|
|
67982
|
+
kinds
|
|
67983
|
+
};
|
|
67984
|
+
}
|
|
67985
|
+
function witnessRun(session, track) {
|
|
67986
|
+
const inputs = decodeTrack(track);
|
|
67987
|
+
const checkpoints = [];
|
|
67988
|
+
let now = session;
|
|
67989
|
+
let ticks = 0;
|
|
67990
|
+
for (let from = 0; from < inputs.length; from += TICKS_PER_SECOND) {
|
|
67991
|
+
const piece = inputs.slice(from, from + TICKS_PER_SECOND);
|
|
67992
|
+
const result = play(now, piece);
|
|
67993
|
+
now = result.session;
|
|
67994
|
+
ticks += result.ticks;
|
|
67995
|
+
checkpoints.push(checkpointOf(now, ticks));
|
|
67996
|
+
if (now.state.status !== "playing")
|
|
67997
|
+
break;
|
|
67998
|
+
}
|
|
67999
|
+
return { status: now.state.status, checkpoints };
|
|
68000
|
+
}
|
|
68001
|
+
|
|
67967
68002
|
// ../core/dist/render/pixel-font.js
|
|
67968
68003
|
var PIXEL_FONT = {
|
|
67969
68004
|
"A": [".###.", "#...#", "#...#", "#####", "#...#", "#...#", "#...#"],
|
|
@@ -76511,7 +76546,7 @@ var START = [
|
|
|
76511
76546
|
"- edit: ids, the edit operations, and write_code against edit.",
|
|
76512
76547
|
"- art: art paint, pictures painted once against the 2D canvas.",
|
|
76513
76548
|
"- model: art model, 3D art Blender builds from a short script, when the person asks for 3D.",
|
|
76514
|
-
"- team: working beside the person's teammates and their agents on the same game.",
|
|
76549
|
+
"- team: working beside the person's teammates and their agents on the same game, and a game's move to a newer engine.",
|
|
76515
76550
|
"",
|
|
76516
76551
|
"## Others may be working on this game",
|
|
76517
76552
|
"",
|
|
@@ -76915,7 +76950,18 @@ var TEAM = [
|
|
|
76915
76950
|
" task. Leave it to them; if your person asked you to change it, send the same change again and it goes through.",
|
|
76916
76951
|
"- Nobody is blocked for good: a claim lapses when its holder has been quiet for 30 minutes, and their task can",
|
|
76917
76952
|
" then be taken over.",
|
|
76918
|
-
"- Your edits carry the title of the task you took as their note, so the team sees why each change was made."
|
|
76953
|
+
"- Your edits carry the title of the task you took as their note, so the team sees why each change was made.",
|
|
76954
|
+
"",
|
|
76955
|
+
"## Engine moves",
|
|
76956
|
+
"",
|
|
76957
|
+
"- When Gamesteel moves to a newer engine, the first call that names a game checked against an older one says what",
|
|
76958
|
+
' changed for it. When a change touches the game, or its recorded play differs, a task "Engine A \u2192 B: n of m changes',
|
|
76959
|
+
' touch this game" is put on its board.',
|
|
76960
|
+
"- Take it like any task. games open shows the whole report while it is open: each change with the places it touches",
|
|
76961
|
+
" and how to fix it, and where each recorded win first plays differently on the new engine.",
|
|
76962
|
+
"- Fix the game with the usual tools, playtest each level to a win, then mark the task done: the game is then checked",
|
|
76963
|
+
" against the new engine.",
|
|
76964
|
+
"- A playtest that wins is kept as its level's recorded win: the evidence the next move compares against."
|
|
76919
76965
|
];
|
|
76920
76966
|
var FILM = [
|
|
76921
76967
|
"# Films",
|
|
@@ -90077,9 +90123,22 @@ ${done.text}`,
|
|
|
90077
90123
|
track: encodeTrack(done.session.inputs),
|
|
90078
90124
|
step: state.step,
|
|
90079
90125
|
status: state.status,
|
|
90080
|
-
version: entry.version
|
|
90126
|
+
version: entry.version,
|
|
90127
|
+
run: { seed: entry.seed, language: entry.language }
|
|
90081
90128
|
};
|
|
90082
90129
|
}
|
|
90130
|
+
async witness(source, run2) {
|
|
90131
|
+
if (source.scripts !== null)
|
|
90132
|
+
await initScripting();
|
|
90133
|
+
const session = createPlaytest(source.text, source.level, {
|
|
90134
|
+
...source.scripts === null ? {} : { scripts: source.scripts },
|
|
90135
|
+
seed: run2.seed,
|
|
90136
|
+
...source.audio === void 0 ? {} : { audio: source.audio },
|
|
90137
|
+
...source.fonts === void 0 ? {} : { fonts: source.fonts },
|
|
90138
|
+
...run2.language === null ? {} : { language: run2.language }
|
|
90139
|
+
});
|
|
90140
|
+
return witnessRun(session, run2.track);
|
|
90141
|
+
}
|
|
90083
90142
|
async act(entry, source, action, raw) {
|
|
90084
90143
|
const session = entry.session;
|
|
90085
90144
|
switch (action) {
|
|
@@ -90339,6 +90398,9 @@ port.on("message", (message) => {
|
|
|
90339
90398
|
case "size":
|
|
90340
90399
|
ok2 = await service.size();
|
|
90341
90400
|
break;
|
|
90401
|
+
case "witness":
|
|
90402
|
+
ok2 = await service.witness(...message.args);
|
|
90403
|
+
break;
|
|
90342
90404
|
}
|
|
90343
90405
|
port.postMessage({ id: message.id, ok: ok2 });
|
|
90344
90406
|
} catch (error2) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gamesteel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "The Gamesteel program your AI agent starts, and the command that sets it up in Claude Code, Codex, Gemini CLI, Cursor, VS Code and 26 more. The work runs on your machine; the website keeps your games.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"gamesteel",
|
|
@@ -26,13 +26,6 @@
|
|
|
26
26
|
"engines": {
|
|
27
27
|
"node": ">=20"
|
|
28
28
|
},
|
|
29
|
-
"scripts": {
|
|
30
|
-
"pretest": "pnpm --filter \"gamesteel^...\" --filter \"!@gamesteel/studio\" build && pnpm --filter @gamesteel/studio exec tsc -p tsconfig.json && pnpm build",
|
|
31
|
-
"build": "tsc --noEmit -p tsconfig.json && node build.mjs",
|
|
32
|
-
"prepublishOnly": "pnpm run build",
|
|
33
|
-
"test": "vitest run",
|
|
34
|
-
"typecheck": "tsc --noEmit && tsc -p tsconfig.test.json"
|
|
35
|
-
},
|
|
36
29
|
"dependencies": {
|
|
37
30
|
"@jitl/quickjs-singlefile-mjs-release-sync": "0.32.0",
|
|
38
31
|
"@napi-rs/canvas": "^1.0.10",
|
|
@@ -42,20 +35,26 @@
|
|
|
42
35
|
"yaml": "^2.9.1"
|
|
43
36
|
},
|
|
44
37
|
"devDependencies": {
|
|
45
|
-
"@gamesteel/accounts": "workspace:*",
|
|
46
|
-
"@gamesteel/agent": "workspace:*",
|
|
47
|
-
"@gamesteel/billing": "workspace:*",
|
|
48
|
-
"@gamesteel/builder": "workspace:*",
|
|
49
|
-
"@gamesteel/cloud": "workspace:*",
|
|
50
|
-
"@gamesteel/connect": "workspace:*",
|
|
51
|
-
"@gamesteel/core": "workspace:*",
|
|
52
|
-
"@gamesteel/design": "workspace:*",
|
|
53
|
-
"@gamesteel/edit": "workspace:*",
|
|
54
|
-
"@gamesteel/model": "workspace:*",
|
|
55
|
-
"@gamesteel/service": "workspace:*",
|
|
56
|
-
"@gamesteel/store": "workspace:*",
|
|
57
|
-
"@gamesteel/studio": "workspace:*",
|
|
58
38
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
59
|
-
"esbuild": "0.28.2"
|
|
39
|
+
"esbuild": "0.28.2",
|
|
40
|
+
"@gamesteel/builder": "0.1.0",
|
|
41
|
+
"@gamesteel/accounts": "0.1.0",
|
|
42
|
+
"@gamesteel/design": "0.1.0",
|
|
43
|
+
"@gamesteel/cloud": "0.1.0",
|
|
44
|
+
"@gamesteel/edit": "0.1.0",
|
|
45
|
+
"@gamesteel/core": "0.1.0",
|
|
46
|
+
"@gamesteel/store": "0.1.0",
|
|
47
|
+
"@gamesteel/billing": "0.1.0",
|
|
48
|
+
"@gamesteel/connect": "0.1.0",
|
|
49
|
+
"@gamesteel/service": "0.1.0",
|
|
50
|
+
"@gamesteel/studio": "0.1.0",
|
|
51
|
+
"@gamesteel/agent": "0.1.0",
|
|
52
|
+
"@gamesteel/model": "0.1.0"
|
|
53
|
+
},
|
|
54
|
+
"scripts": {
|
|
55
|
+
"pretest": "pnpm --filter \"gamesteel^...\" --filter \"!@gamesteel/studio\" build && pnpm --filter @gamesteel/studio exec tsc -p tsconfig.json && pnpm build",
|
|
56
|
+
"build": "tsc --noEmit -p tsconfig.json && node build.mjs",
|
|
57
|
+
"test": "vitest run",
|
|
58
|
+
"typecheck": "tsc --noEmit && tsc -p tsconfig.test.json"
|
|
60
59
|
}
|
|
61
|
-
}
|
|
60
|
+
}
|