@playcraft/cli 0.1.47-beta → 0.1.49-beta

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.
Files changed (28) hide show
  1. package/dist/commands/tools-batch.js +12 -2
  2. package/dist/workspace-runtime/batch/control.js +6 -0
  3. package/dist/workspace-runtime/batch/deliver.js +105 -87
  4. package/dist/workspace-runtime/batch/generate.js +26 -3
  5. package/dist/workspace-runtime/batch/prepare.js +169 -56
  6. package/dist/workspace-runtime/batch/source-capture.js +7 -20
  7. package/dist/workspace-runtime/batch/source-publish.js +2 -4
  8. package/dist/workspace-runtime/codex/app-server.js +29 -4
  9. package/dist/workspace-runtime/codex/delivery-tools.js +144 -0
  10. package/dist/workspace-runtime/codex/tool-response.js +10 -0
  11. package/dist/workspace-runtime/codex/ui-tools.js +22 -5
  12. package/dist/workspace-runtime/previews/diagnostics.js +44 -0
  13. package/dist/workspace-runtime/previews/publish.js +16 -4
  14. package/dist/workspace-runtime/serve.js +60 -0
  15. package/dist/workspace-runtime/server/accept-operation.js +61 -0
  16. package/dist/workspace-runtime/server/dispatch.js +47 -2
  17. package/dist/workspace-runtime/server/http.js +163 -130
  18. package/dist/workspace-runtime/server/operation-record.js +33 -0
  19. package/dist/workspace-runtime/server/submit-operation.js +41 -0
  20. package/dist/workspace-runtime/workspaces/append-only-log.js +62 -0
  21. package/dist/workspace-runtime/workspaces/delivery-build.js +331 -0
  22. package/dist/workspace-runtime/workspaces/delivery-store.js +168 -0
  23. package/dist/workspace-runtime/workspaces/delivery.js +64 -0
  24. package/dist/workspace-runtime/workspaces/dependencies.js +15 -0
  25. package/dist/workspace-runtime/workspaces/developer-command.js +35 -1
  26. package/dist/workspace-runtime/workspaces/directories.js +9 -4
  27. package/dist/workspace-runtime/workspaces/operation-log.js +23 -0
  28. package/package.json +3 -3
@@ -0,0 +1,23 @@
1
+ import { join } from 'node:path';
2
+ import { AppendOnlyLog } from './append-only-log.js';
3
+ export const OPERATION_LOG_MAX_BYTES = 2 * 1024 * 1024;
4
+ const TRUNCATED = '[playcraft] log truncated; showing the tail\n';
5
+ const OPERATION_ID = /^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$/i;
6
+ /** Full build output for one operation, kept outside the checkout and capped at 2 MiB. */
7
+ export class OperationLogStore {
8
+ stateDir;
9
+ constructor(stateDir) {
10
+ this.stateDir = stateDir;
11
+ }
12
+ log(operationId) {
13
+ if (!OPERATION_ID.test(operationId))
14
+ throw new Error('invalid_operation_id');
15
+ return new AppendOnlyLog(join(this.stateDir, 'operation-logs', `${operationId}.log`), OPERATION_LOG_MAX_BYTES, TRUNCATED);
16
+ }
17
+ async append(operationId, text) {
18
+ await this.log(operationId).append(text);
19
+ }
20
+ async read(operationId, offset = 0) {
21
+ return this.log(operationId).read(offset);
22
+ }
23
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playcraft/cli",
3
- "version": "0.1.47-beta",
3
+ "version": "0.1.49-beta",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "engines": {
@@ -51,8 +51,8 @@
51
51
  "@gltf-transform/core": "^4.3.0",
52
52
  "@gltf-transform/extensions": "^4.3.0",
53
53
  "@gltf-transform/functions": "^4.3.0",
54
- "@playcraft/build": "0.1.47-beta",
55
- "@playcraft/common": "0.1.47-beta",
54
+ "@playcraft/build": "0.1.49-beta",
55
+ "@playcraft/common": "0.1.49-beta",
56
56
  "better-sqlite3-pinned": "npm:better-sqlite3@13.0.3",
57
57
  "chokidar": "^4.0.3",
58
58
  "commander": "^13.1.0",