rtistree 0.5.0 → 0.6.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.
Files changed (56) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/CONTRIBUTING.md +47 -0
  3. package/README.md +38 -22
  4. package/SECURITY.md +20 -0
  5. package/THIRD_PARTY_NOTICES.md +1 -1
  6. package/dist/art-direction.js +1 -1
  7. package/dist/cli.js +55 -32
  8. package/dist/cli.js.map +1 -1
  9. package/dist/commands.d.ts +12 -0
  10. package/dist/index.d.ts +1 -0
  11. package/dist/index.js +1 -0
  12. package/dist/index.js.map +1 -1
  13. package/dist/mcp.js +18 -2
  14. package/dist/mcp.js.map +1 -1
  15. package/dist/print-scene.d.ts +6 -0
  16. package/dist/program.js +3 -1
  17. package/dist/program.js.map +1 -1
  18. package/dist/project-config.js +2 -1
  19. package/dist/project-config.js.map +1 -1
  20. package/dist/render.js +21 -1
  21. package/dist/render.js.map +1 -1
  22. package/dist/schema.d.ts +46 -0
  23. package/dist/schema.js +107 -0
  24. package/dist/schema.js.map +1 -1
  25. package/dist/sprites.d.ts +31 -0
  26. package/dist/sprites.js +142 -0
  27. package/dist/sprites.js.map +1 -0
  28. package/dist/starter.d.ts +7 -0
  29. package/dist/starter.js +38 -0
  30. package/dist/starter.js.map +1 -0
  31. package/dist/studio-reference.js +1 -1
  32. package/dist/studio-reference.js.map +1 -1
  33. package/docs/agent-art-workflow.md +12 -2
  34. package/docs/agent-setup.md +12 -7
  35. package/docs/atelier.md +15 -4
  36. package/docs/cli-reference.md +89 -26
  37. package/docs/core-concepts.md +95 -0
  38. package/docs/decisions/004-print-production-and-projects.md +1 -1
  39. package/docs/decisions/005-programmable-digital-art.md +1 -1
  40. package/docs/engine-overview.md +121 -165
  41. package/docs/evolution.md +12 -9
  42. package/docs/getting-started.md +84 -53
  43. package/docs/next-milestone.md +9 -9
  44. package/docs/production.md +22 -16
  45. package/docs/releasing.md +99 -43
  46. package/docs/scene-format.md +45 -8
  47. package/docs/sprites.md +166 -0
  48. package/docs/studio.md +27 -12
  49. package/examples/hello/README.md +24 -8
  50. package/examples/hello/render.mjs +2 -1
  51. package/package.json +10 -5
  52. package/schemas/authoring.schema.json +359 -229
  53. package/schemas/command.schema.json +462 -332
  54. package/schemas/patch.schema.json +462 -332
  55. package/schemas/scene.schema.json +347 -217
  56. package/schemas/sprites.schema.json +41 -0
@@ -1,14 +1,30 @@
1
- # First image
1
+ # Your first Rtistree project
2
2
 
3
- From a directory with `rtistree` installed, copy these three files into your project.
3
+ Run these commands inside a project created by `npx rtistree@latest init my-art`.
4
+ If you are reading this in the repository’s `examples/hello` directory, create a project
5
+ first: these are template files, and `init` supplies the package.json and npm scripts.
4
6
 
5
7
  ```sh
6
- npx graphics render scene.json -o hello.png
7
- npx graphics apply scene.json refine.json
8
- npx graphics render scene.json -o brighter.png
9
- npx graphics undo scene.json
10
- npx graphics render scene.json -o restored.png
8
+ npm install
9
+ npm run render
10
+ ```
11
+
12
+ Open `hello.png`. `scene.json` defines the disc and title; `refine.json` is a sample local edit.
13
+
14
+ ## Refine and undo
15
+
16
+ ```sh
17
+ npx rtistree apply scene.json refine.json
18
+ npx rtistree render scene.json -o brighter.png
19
+ npx rtistree undo scene.json
20
+ npx rtistree render scene.json -o restored.png
11
21
  ```
12
22
 
13
23
  `restored.png` should match `hello.png` byte for byte on the same runtime and platform.
14
- `render.mjs` demonstrates the SDK; run it with `node render.mjs`.
24
+ The edit journal lives in `history/`; keep it with the scene to retain your current edits.
25
+
26
+ ## SDK
27
+
28
+ Run `npm run render:sdk` to execute `render.mjs` and create `sdk-output.png`.
29
+
30
+ [Getting started](https://rtistree.dev/docs/getting-started/) · [Agent setup](https://rtistree.dev/docs/agent-setup/)
@@ -1,7 +1,8 @@
1
1
  import { Project, rtistreeAgentInstructions, artDirectionGuide } from 'rtistree';
2
+ import { fileURLToPath } from 'node:url';
2
3
  import { writeFile } from 'node:fs/promises';
3
4
 
4
- const project = await Project.open(new URL('./scene.json', import.meta.url).pathname);
5
+ const project = await Project.open(fileURLToPath(new URL('./scene.json', import.meta.url)));
5
6
  const result = await project.render();
6
7
  await writeFile(new URL('./sdk-output.png', import.meta.url), result.png);
7
8
  console.log({ width: result.width, height: result.height, guide: artDirectionGuide.version });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rtistree",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Deterministic, agent-operable raster graphics engine",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {
@@ -11,11 +11,13 @@
11
11
  "graphics": "node --import tsx src/cli.ts",
12
12
  "demo": "node --import tsx scripts/demo.ts",
13
13
  "schema": "node --import tsx scripts/schema.ts",
14
- "format": "prettier --write src tests scripts docs examples schemas README.md package.json tsconfig.json .github .prettierrc.json",
15
- "format:check": "prettier --check src tests scripts docs examples schemas README.md package.json tsconfig.json .github .prettierrc.json",
14
+ "format": "prettier --write src tests scripts docs examples schemas README.md package.json tsconfig.json .github .prettierrc.json release-please-config.json .release-please-manifest.json CONTRIBUTING.md",
15
+ "format:check": "prettier --check src tests scripts docs examples schemas README.md package.json tsconfig.json .github .prettierrc.json release-please-config.json .release-please-manifest.json CONTRIBUTING.md",
16
16
  "performance": "node --import tsx scripts/performance.ts",
17
17
  "prepack": "npm run build",
18
- "package:check": "node scripts/package-smoke.mjs"
18
+ "package:check": "node scripts/package-smoke.mjs",
19
+ "rtistree": "node --import tsx src/cli.ts",
20
+ "docs:check": "npm run build && node scripts/docs-smoke.mjs"
19
21
  },
20
22
  "keywords": [
21
23
  "graphics",
@@ -52,6 +54,7 @@
52
54
  ".": "./dist/index.js"
53
55
  },
54
56
  "bin": {
57
+ "rtistree": "./dist/cli.js",
55
58
  "graphics": "./dist/cli.js"
56
59
  },
57
60
  "engines": {
@@ -66,7 +69,9 @@
66
69
  "CHANGELOG.md",
67
70
  "THIRD_PARTY_NOTICES.md",
68
71
  "licenses",
69
- "examples/hello"
72
+ "examples/hello",
73
+ "SECURITY.md",
74
+ "CONTRIBUTING.md"
70
75
  ],
71
76
  "license": "MIT",
72
77
  "author": "Colum Ferry",