@joystack/cli 0.1.49 → 0.1.50
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/CHANGELOG.md +7 -0
- package/lib/create.mjs +9 -7
- package/lib/dev.mjs +7 -1
- package/lib/setup-guide.md +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,13 @@ Versions: [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
14
14
|
|
|
15
15
|
## [Unreleased]
|
|
16
16
|
|
|
17
|
+
## [0.1.50] - 2026-10-11
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- `joystack setup` tells your agent that `create` makes an empty game, ready
|
|
22
|
+
to be built, rather than a working game to reshape.
|
|
23
|
+
|
|
17
24
|
## [0.1.49] - 2026-10-10
|
|
18
25
|
|
|
19
26
|
### Added
|
package/lib/create.mjs
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
// `joystack create <name>` — bootstrap a standalone Joystack game.
|
|
2
2
|
//
|
|
3
3
|
// The create-next-app gesture: one command → a complete folder that is its
|
|
4
|
-
// own repo, where `joystack dev` immediately serves
|
|
5
|
-
//
|
|
6
|
-
//
|
|
4
|
+
// own repo, where `joystack dev` immediately serves the game: an empty one, so
|
|
5
|
+
// the first game anyone sees in it is the one they asked for. It is
|
|
6
|
+
// multiplayer from line one (its world.js turns the room on, and `joystack
|
|
7
|
+
// dev` runs one from its first start). The folder name is the slug.
|
|
7
8
|
//
|
|
8
9
|
// ── Where the creator's files come from ─────────────────────────────────────
|
|
9
10
|
//
|
|
10
11
|
// EVERYTHING a creator receives comes from the versioned engine artifact: the
|
|
11
|
-
//
|
|
12
|
+
// skeleton every game starts as (`scaffold/`) and the agent surface (`agent-surface/` — skills
|
|
12
13
|
// plus the Layer-0 managed block). This npm package ships CODE ONLY.
|
|
13
14
|
//
|
|
14
15
|
// Shipping a second copy of the surface (a `template/` folder) inside this
|
|
@@ -39,7 +40,8 @@ import { ensureEngine } from './engine.mjs';
|
|
|
39
40
|
import { reconcileAgentSurface } from './agent-surface.mjs';
|
|
40
41
|
import { readEnv } from './legacy-names.mjs';
|
|
41
42
|
|
|
42
|
-
// The
|
|
43
|
+
// The skeleton every new game starts as, inside the installed engine artifact.
|
|
44
|
+
// The example games beside it (`examples/`) are read in place, never copied.
|
|
43
45
|
export const SCAFFOLD_DIR = 'scaffold';
|
|
44
46
|
|
|
45
47
|
const NAME_OK = /^[a-z0-9][a-z0-9-]{0,40}$/;
|
|
@@ -81,7 +83,7 @@ const PLAYWRIGHT_SPEC = '1.64.0';
|
|
|
81
83
|
// devDependency, exactly like playwright. `joystack test` also runs it.
|
|
82
84
|
const ESLINT_SPEC = '^10.7.0';
|
|
83
85
|
|
|
84
|
-
// Copy the
|
|
86
|
+
// Copy the skeleton out of the artifact. One rename: `gitignore` →
|
|
85
87
|
// `.gitignore` (npm pack silently strips .gitignore files from a package, so
|
|
86
88
|
// the artifact stores it dot-less).
|
|
87
89
|
function copyScaffold(engineDir, dir, name, version) {
|
|
@@ -140,7 +142,7 @@ async function scaffold({ dir, name, install, cliSpec, apiBase, log, ensure, rec
|
|
|
140
142
|
runNpm(['install', '--no-audit', '--no-fund'], { cwd: dir, stdio: 'pipe' });
|
|
141
143
|
}
|
|
142
144
|
|
|
143
|
-
// The engine — and with it the
|
|
145
|
+
// The engine — and with it the skeleton and the agent skills. Signs the
|
|
144
146
|
// creator in via the device flow if this machine has no token yet, and writes
|
|
145
147
|
// the `joystack.engine` pin.
|
|
146
148
|
const engine = await ensure(dir, { apiBase, log });
|
package/lib/dev.mjs
CHANGED
|
@@ -115,7 +115,12 @@ export async function dev(opts = {}) {
|
|
|
115
115
|
// alone and keeps everyone else off the dev tools' routes (the Joystack
|
|
116
116
|
// maker): a report sent through the link then counts as one from this
|
|
117
117
|
// machine, so it can wake the agent and read its reply.
|
|
118
|
-
|
|
118
|
+
//
|
|
119
|
+
// `pollMs` is how often, in milliseconds, the game's files are compared for
|
|
120
|
+
// changes the operating system's events miss (live-versions.mjs); left unset
|
|
121
|
+
// it is that module's default of one second. Tests pass a shorter one so a
|
|
122
|
+
// save is acted on sooner.
|
|
123
|
+
async function startDev({ cwd = process.cwd(), port, noMp = process.env.NO_MP === '1', watch = true, reload = true, share = false, openShare = openTunnel, log = console.log, agentSession = null, shareIsOwner = false, devLogPath = null, pollMs } = {}, onFailure) {
|
|
119
124
|
const project = findProject(cwd);
|
|
120
125
|
// Q4 revision: the engine is not an npm dependency — install/refresh it from
|
|
121
126
|
// the platform's login-gated registry (no-op when the pinned version is in).
|
|
@@ -545,6 +550,7 @@ async function startDev({ cwd = process.cwd(), port, noMp = process.env.NO_MP ==
|
|
|
545
550
|
versions = createLiveVersions({
|
|
546
551
|
first,
|
|
547
552
|
auto: reload,
|
|
553
|
+
...(pollMs ? { intervalMs: pollMs } : {}),
|
|
548
554
|
log,
|
|
549
555
|
snapshot: sourceFiles,
|
|
550
556
|
make: (o) => makeVersion(o),
|
package/lib/setup-guide.md
CHANGED
|
@@ -47,8 +47,9 @@ published URL slug, so it must be **lowercase letters, numbers and dashes**
|
|
|
47
47
|
npx -y joystack@latest create <name>
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
This scaffolds `<name>/` as its own git repo:
|
|
51
|
-
|
|
50
|
+
This scaffolds `<name>/` as its own git repo: an empty game that runs, ready
|
|
51
|
+
for the next session to build, plus all the agent instructions and the
|
|
52
|
+
`/build` workflow, inside the folder.
|
|
52
53
|
|
|
53
54
|
**This command will pause and ask the human to sign in.** That is expected — not
|
|
54
55
|
a hang, and nothing has gone wrong. Joystack's engine downloads with the game, and
|
package/package.json
CHANGED