agent-theatre 1.2.0 → 1.2.2
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/cli.js +12 -0
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/web/assets/browserAll-DpEOVFXE.js +2 -0
- package/web/assets/{browserAll-MBabRn1_.js.map → browserAll-DpEOVFXE.js.map} +1 -1
- package/web/assets/{index-DUimS_fe.css → index-DLvIe75m.css} +1 -1
- package/web/assets/{index-K7cJxdMz.js → index-vIjrCnHW.js} +76 -74
- package/web/assets/index-vIjrCnHW.js.map +1 -0
- package/web/assets/webworkerAll-BIhfsOqG.js +2 -0
- package/web/assets/{webworkerAll-tVQIHJQB.js.map → webworkerAll-BIhfsOqG.js.map} +1 -1
- package/web/index.html +2 -2
- package/web/assets/browserAll-MBabRn1_.js +0 -2
- package/web/assets/index-K7cJxdMz.js.map +0 -1
- package/web/assets/webworkerAll-tVQIHJQB.js +0 -2
package/README.md
CHANGED
package/dist/cli.js
CHANGED
|
@@ -1281,7 +1281,15 @@ var Theatre = class {
|
|
|
1281
1281
|
this.broadcast({ type: "beats", beats: out, events });
|
|
1282
1282
|
return out;
|
|
1283
1283
|
}
|
|
1284
|
+
/** In-process subscribers (the VS Code extension relays these to its webview). */
|
|
1285
|
+
listeners = /* @__PURE__ */ new Set();
|
|
1284
1286
|
broadcast(msg) {
|
|
1287
|
+
for (const l of this.listeners) {
|
|
1288
|
+
try {
|
|
1289
|
+
l(msg);
|
|
1290
|
+
} catch {
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1285
1293
|
const data = JSON.stringify(msg);
|
|
1286
1294
|
for (const ws of this.wss?.clients ?? []) if (ws.readyState === 1) ws.send(data);
|
|
1287
1295
|
}
|
|
@@ -1324,6 +1332,10 @@ var Theatre = class {
|
|
|
1324
1332
|
this.wss?.close();
|
|
1325
1333
|
await new Promise((res) => this.server ? this.server.close(() => res()) : res());
|
|
1326
1334
|
}
|
|
1335
|
+
/** The live scene as /api/scene returns it. */
|
|
1336
|
+
scene() {
|
|
1337
|
+
return { mode: "live", repoId: this.opts.repoId, world: this.live.world, events: this.live.events, beats: this.live.beats, signal: this.signal };
|
|
1338
|
+
}
|
|
1327
1339
|
get url() {
|
|
1328
1340
|
return `http://127.0.0.1:${this.port}/`;
|
|
1329
1341
|
}
|