mirror of
https://github.com/shinyobjectz/raea.git
synced 2026-12-01 06:53:19 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b54136c4af | ||
|
|
450d873984 | ||
|
|
c188cf8bd7 | ||
|
|
e388258bff | ||
|
|
5cf62e80ee | ||
|
|
57f3ef8db3 | ||
|
|
a927fbb027 | ||
|
|
f4139a5a7a | ||
|
|
b4f6b6ab7a | ||
|
|
451afc7bbf | ||
|
|
61f6113845 | ||
|
|
1ff507df80 | ||
|
|
5cc53609a8 | ||
|
|
b4aede8ae6 | ||
|
|
3df38e170a | ||
|
|
b593ebb070 | ||
|
|
9a6cd12d5f | ||
|
|
0b8171cdae | ||
|
|
2c54a94c00 | ||
|
|
6ee015071d | ||
|
|
8d44a1e865 | ||
|
|
c93042ff7f | ||
|
|
3db55f345d | ||
|
|
43e35b2302 | ||
|
|
9c5ab64141 | ||
|
|
620cfe0744 | ||
|
|
de4d619270 | ||
|
|
e946a5a0d7 | ||
|
|
6c390a4a17 | ||
|
|
ab2a085a05 | ||
|
|
b7f796aa5e | ||
|
|
e8ce27fd62 | ||
|
|
9202d88e69 | ||
|
|
2a5bb19904 | ||
|
|
09c2df6e8c | ||
|
|
2a98bbcb03 | ||
|
|
8443ecf2e7 | ||
|
|
4a8c5c04ad | ||
|
|
57e0737edd | ||
|
|
75c6e74d6d | ||
|
|
4b1cb9ec9a | ||
|
|
db3cbfcaf5 | ||
|
|
25afb7cbf5 | ||
|
|
1046ee9a83 | ||
|
|
dc2e7a56bb | ||
|
|
977ec312aa | ||
|
|
9aee93e518 | ||
|
|
32dcec11b9 | ||
|
|
3a646fa4bb | ||
|
|
28f4c2289b | ||
|
|
80fbde3c58 | ||
|
|
c30bcfbbef | ||
|
|
3ad88f635a | ||
|
|
3cd7f72b4b | ||
|
|
2262e1cc7d | ||
|
|
4f354e97fc | ||
|
|
1afb2de58d | ||
|
|
b0cd52fd85 | ||
|
|
b5425278b3 | ||
|
|
373b47b964 | ||
|
|
2b9a95366a | ||
|
|
4a27753595 | ||
|
|
ab0fc62c4c | ||
|
|
0cf78fb053 | ||
|
|
6d8a15ac55 | ||
|
|
cdebceb9d9 | ||
|
|
523fd30929 | ||
|
|
688e99c971 | ||
|
|
71b354007f | ||
|
|
8883c30c53 | ||
|
|
9586aa9689 | ||
|
|
760aea017d | ||
|
|
1c004cc225 | ||
|
|
a0f85c9023 | ||
|
|
fc32762987 | ||
|
|
9365faa43b | ||
|
|
7c32e7cec9 | ||
|
|
e8ee46d96e | ||
|
|
4b1686f254 | ||
|
|
fbcc03fc38 | ||
|
|
14180f3dfe | ||
|
|
6665a2e5a8 | ||
|
|
80d3edb1de | ||
|
|
20290ff51c | ||
|
|
2a8ea0b81b | ||
|
|
f3bc3db45a | ||
|
|
3f37f7c2a2 | ||
|
|
fcd055cca3 | ||
|
|
ecef2fee13 | ||
|
|
10f0c61354 | ||
|
|
f2372ad82b | ||
|
|
b2f2f2af3d | ||
|
|
190ced1d1f | ||
|
|
3e391e2afa | ||
|
|
ca825d79ae | ||
|
|
68f70eb1e6 | ||
|
|
e67910028a | ||
|
|
6a2646b5a5 | ||
|
|
f1292b4db0 | ||
|
|
53b5da60b3 | ||
|
|
6ef6c573fd | ||
|
|
dbe00072b6 | ||
|
|
f2429a0b97 | ||
|
|
66f8c17a1d | ||
|
|
80d07fda07 | ||
|
|
47a93b740a | ||
|
|
24fadef05e | ||
|
|
05356f6b70 | ||
|
|
8f49748322 | ||
|
|
186098d162 | ||
|
|
ae905b9fd1 | ||
|
|
4edb80b80d | ||
|
|
840de67569 | ||
|
|
f7b1cdad92 | ||
|
|
eb43664245 | ||
|
|
5fc163ba9f | ||
|
|
2598a75942 | ||
|
|
8a333c02c4 | ||
|
|
0226bbb21b | ||
|
|
744c5a2a1f | ||
|
|
db9dcda0a8 | ||
|
|
090cfeff1a | ||
|
|
4d79a3f12f | ||
|
|
fef9a1bd38 | ||
|
|
371751d5ed | ||
|
|
33a803733b | ||
|
|
7d893bb612 | ||
|
|
34339ba0d9 | ||
|
|
41780e9784 | ||
|
|
f5f7b72912 | ||
|
|
af1a2c4199 | ||
|
|
4fc9d5251b | ||
|
|
9055f7273f | ||
|
|
e7f16a86bc | ||
|
|
1f02317e87 | ||
|
|
1d04a18d54 | ||
|
|
9dbb9b5400 | ||
|
|
ede2903d4a | ||
|
|
415391a9e1 | ||
|
|
fc3bba9b1a | ||
|
|
8df71aceba | ||
|
|
12f0eb09a0 | ||
|
|
dc4558dc7a | ||
|
|
5b52eb4aed | ||
|
|
e2b41e8df6 | ||
|
|
bfbfc91d40 | ||
|
|
7af167433d | ||
|
|
52ccddd1df | ||
|
|
fcd8105d93 | ||
|
|
4259cd9c01 | ||
|
|
d88d19e149 | ||
|
|
5c788473f7 | ||
|
|
8cfb2241c2 | ||
|
|
2f89374c47 | ||
|
|
04b06c500b | ||
|
|
7ef89d4c13 | ||
|
|
11931d4958 | ||
|
|
4110989ed4 | ||
|
|
878cfe1dac | ||
|
|
dc8038add1 | ||
|
|
f9b9aeff95 | ||
|
|
0076952a6b | ||
|
|
3525e74875 | ||
|
|
c3bc7d7bc7 | ||
|
|
984be1686a | ||
|
|
016ef5347e | ||
|
|
ccf6eda50b | ||
|
|
102352c44d | ||
|
|
face0fe8bc | ||
|
|
159fcbdb94 | ||
|
|
1b22805edc | ||
|
|
250b8fed84 | ||
|
|
19ff72740c | ||
|
|
712b1c73e9 | ||
|
|
406a1417fa | ||
|
|
ec33701acf | ||
|
|
67f33b2460 | ||
|
|
7551eb17b9 | ||
|
|
c735bd06a2 | ||
|
|
c0f1c3786c | ||
|
|
6d49104881 | ||
|
|
2ebe989c05 | ||
|
|
d2f6ec0831 | ||
|
|
d991b4e9d2 | ||
|
|
c53605cd51 | ||
|
|
e9b22ad3eb | ||
|
|
ef46cab89f | ||
|
|
1dee5992e5 | ||
|
|
3073fc5739 | ||
|
|
914fabd377 | ||
|
|
19c877037a | ||
|
|
f8dd70c80a | ||
|
|
bdb77110de | ||
|
|
4f589c5597 | ||
|
|
a57c2209d2 | ||
|
|
87aa6ac0a1 | ||
|
|
73af431001 | ||
|
|
4f6bfe82d6 | ||
|
|
3bbd1469ac | ||
|
|
228984a74c | ||
|
|
56c71ed264 | ||
|
|
af8eb9ffbd | ||
|
|
ee91bf13a8 | ||
|
|
4a339cf0e3 | ||
|
|
0722ce3ae4 | ||
|
|
2d9d1cfd93 | ||
|
|
1bf0c2075a | ||
|
|
a84aedca3d | ||
|
|
d77c46ab60 | ||
|
|
24b456ecd0 | ||
|
|
d13ab74d9a | ||
|
|
8e86f0a3ba | ||
|
|
104763b1e3 | ||
|
|
0f4c6626e8 | ||
|
|
9a236c1194 | ||
|
|
3f7945b7a6 | ||
|
|
937387c3db | ||
|
|
13886ff3c5 | ||
|
|
7ac71240db | ||
|
|
2686a55190 | ||
|
|
8caedfbaa1 | ||
|
|
31876c7d1c | ||
|
|
76a11076ea | ||
|
|
a904a86429 | ||
|
|
32587e0b9d | ||
|
|
d37f835bfd | ||
|
|
b305638248 | ||
|
|
2f5ad766d7 | ||
|
|
20ccabb8dd | ||
|
|
6df5edbde0 | ||
|
|
e80bde56c2 | ||
|
|
86cf4fe12e | ||
|
|
b24a4537c0 | ||
|
|
c5d3f83c79 | ||
|
|
ef747f9b24 | ||
|
|
578bc1d159 | ||
|
|
c135130ccb | ||
|
|
ffb56a8f09 | ||
|
|
761e6b98f9 | ||
|
|
4a0dacc29b | ||
|
|
38db0f2f23 | ||
|
|
03de032a28 | ||
|
|
e24d71b3b9 | ||
|
|
55a95b4d17 | ||
|
|
f3f7207001 | ||
|
|
ee8edf43b1 | ||
|
|
f085ac07da | ||
|
|
f715c40319 | ||
|
|
705504ddf1 | ||
|
|
604064e720 | ||
|
|
f6b3188d9f | ||
|
|
853183e2f4 | ||
|
|
a68b96cf89 | ||
|
|
613645ffc6 | ||
|
|
986fae3c62 | ||
|
|
e4add11c80 | ||
|
|
c4fa90de4c | ||
|
|
ad2e7e1cd4 | ||
|
|
d870159c46 | ||
|
|
4d7fa914cc | ||
|
|
a4bb6e5c1d | ||
|
|
5f65114ce5 | ||
|
|
87bfda4ed2 | ||
|
|
3b61818eb9 | ||
|
|
1680860ff4 | ||
|
|
74ce0ff737 | ||
|
|
90891cc86f | ||
|
|
bb7dc3b79f | ||
|
|
d6d7a520a7 | ||
|
|
c05dfc946e | ||
|
|
c3b2108412 | ||
|
|
2fe9f13908 | ||
|
|
1c93300361 | ||
|
|
ef5761d300 | ||
|
|
37652ae571 | ||
|
|
0ed836095e | ||
|
|
b1b47b7cfa | ||
|
|
c939b27aee | ||
|
|
0ef7287fde | ||
|
|
fce94e630b | ||
|
|
2a38cbc2df | ||
|
|
2ce68890b8 | ||
|
|
4c392f60d6 | ||
|
|
b4e8310f1f | ||
|
|
9cffd0bf0a | ||
|
|
d190585622 | ||
|
|
912c957c9f | ||
|
|
2b9f1ad862 | ||
|
|
b1bfc9ba41 | ||
|
|
d5b8b9ab35 | ||
|
|
a10d64ab75 | ||
|
|
1f3a058ba0 | ||
|
|
c4550ad6ba | ||
|
|
afe2150d19 | ||
|
|
a77d68ef93 | ||
|
|
fad2dbcbf4 | ||
|
|
f9129e758c | ||
|
|
b95a9fab63 | ||
|
|
af752e3a27 | ||
|
|
85d331898f | ||
|
|
8e5f1d449c | ||
|
|
daa81ca944 | ||
|
|
03e3b77578 | ||
|
|
c486a7fe16 | ||
|
|
78cb452725 | ||
|
|
29a3763ecf | ||
|
|
e4a0552663 | ||
|
|
08c70a8318 | ||
|
|
d3762acbf1 | ||
|
|
d0e99b0d46 | ||
|
|
494b395442 | ||
|
|
fa884594a6 | ||
|
|
5b93a70f70 | ||
|
|
a36df13992 | ||
|
|
1190ab6953 | ||
|
|
5ab9285ed3 | ||
|
|
3185fa5adb | ||
|
|
9f553d6ecc | ||
|
|
acb4aa404d | ||
|
|
26d094c341 | ||
|
|
773047de9e | ||
|
|
4a8ad49d60 | ||
|
|
a393b366ac | ||
|
|
dc148cd3f7 | ||
|
|
48c027313d | ||
|
|
b41c609a02 | ||
|
|
90975148a0 | ||
|
|
e658ea89ea | ||
|
|
3fc0c43af0 | ||
|
|
173e397113 | ||
|
|
17fa0e5f31 | ||
|
|
8df1c72a44 | ||
|
|
e3f4c6980e | ||
|
|
7ed8faa7a6 | ||
|
|
283b1ffb87 | ||
|
|
e060c09fe2 | ||
|
|
9a93709831 | ||
|
|
ca0a14e04c | ||
|
|
8fefa2922d | ||
|
|
96f7e64580 | ||
|
|
d79c0b8cef | ||
|
|
81cf2e0386 | ||
|
|
eed69c7bb2 | ||
|
|
271376b898 | ||
|
|
e31056b6ad | ||
|
|
0b7a4203b8 | ||
|
|
95725896a2 | ||
|
|
b476ebb82b | ||
|
|
fd3a75ce72 | ||
|
|
f14232a52e | ||
|
|
43cc233f99 | ||
|
|
31f7961287 | ||
|
|
1918b36f9e | ||
|
|
387f91017c | ||
|
|
d8b51396fa | ||
|
|
0a7c064b05 | ||
|
|
3620aa1def | ||
|
|
b938833097 | ||
|
|
75c3b18c22 | ||
|
|
01076723f4 | ||
|
|
bd670d9040 | ||
|
|
5c7dac41c2 | ||
|
|
f732061d9d | ||
|
|
d7e3d8b2b2 | ||
|
|
c4d3900d68 | ||
|
|
f130f35870 | ||
|
|
2b7574de39 | ||
|
|
bbd658263e | ||
|
|
91731fab14 | ||
|
|
f36ffb903f | ||
|
|
0173108f72 | ||
|
|
bb4402e45a | ||
|
|
661adee396 | ||
|
|
73c5c93e9b | ||
|
|
2427d7c9ee | ||
|
|
e3b048e2d9 | ||
|
|
08f6f621d2 | ||
|
|
7caf1bb596 | ||
|
|
43bfbad61f | ||
|
|
beb4ce1200 | ||
|
|
7bfa7f392c | ||
|
|
47cf338cd6 | ||
|
|
b2a52f6cc1 | ||
|
|
c78ded29e8 | ||
|
|
1c3cb953bd | ||
|
|
53a5cc9ca7 | ||
|
|
3b670e79a5 | ||
|
|
530ff8e3de | ||
|
|
f2d0e0335c | ||
|
|
b4fa9ae676 | ||
|
|
5aa6c4cd36 | ||
|
|
ad8187aefd | ||
|
|
1bfd0388b0 | ||
|
|
cbd7649e02 | ||
|
|
fc83cf7446 | ||
|
|
2bbf0179fc | ||
|
|
dcd1107a9f | ||
|
|
bf07a473ae | ||
|
|
f9b6f22ecf | ||
|
|
fcd6e12c03 | ||
|
|
d7a755c08b | ||
|
|
b776edd026 | ||
|
|
9a289e072c | ||
|
|
4bc503d81d | ||
|
|
4e252226a6 | ||
|
|
ca184a08c9 | ||
|
|
cceec65c38 | ||
|
|
fac78b331b | ||
|
|
ae49b9f3c9 | ||
|
|
edf25e43c0 | ||
|
|
4a563b9cf6 | ||
|
|
ea5e9015e7 | ||
|
|
d8c392b69a | ||
|
|
035783ae0c | ||
|
|
08a3904127 | ||
|
|
cae6d2201c | ||
|
|
b8d38aa2c0 | ||
|
|
d685762382 | ||
|
|
c96de52402 | ||
|
|
b4e6f54d55 | ||
|
|
d145985058 | ||
|
|
03685d6139 | ||
|
|
620c796095 | ||
|
|
37846080a7 | ||
|
|
e24034ee10 | ||
|
|
9f4990cd90 | ||
|
|
7026280df3 | ||
|
|
df9d1d11d5 | ||
|
|
e60a8bc5fe | ||
|
|
1496780fa4 | ||
|
|
2cb2136348 | ||
|
|
e368a5dbcb | ||
|
|
e3dfcb96d1 | ||
|
|
f845ef0add | ||
|
|
cb01f542c0 | ||
|
|
054738329d | ||
|
|
e85de83289 | ||
|
|
06090e06cd | ||
|
|
7729997d96 | ||
|
|
8818eaa2ec | ||
|
|
b715d70366 | ||
|
|
2c6132a460 |
No files matched your search
+108
-11
@@ -60,9 +60,17 @@ jobs:
|
||||
- os: ubuntu-24.04
|
||||
lib: libraea_bundle.so
|
||||
extra: raea-perceive
|
||||
runs-on: ${{ matrix.os }}
|
||||
# a faster runner when the repo names one: vars RELEASE_MAC_RUNNER, RELEASE_LINUX_RUNNER, RELEASE_WINDOWS_RUNNER hold
|
||||
# a JSON list of runs-on labels (Namespace's: a machine and a cache volume); else GitHub's
|
||||
# own, a 3-core M1 with 7 GB on the Mac, where a cold build took 3 hours
|
||||
runs-on: ${{ (matrix.os == 'macos-15' && vars.RELEASE_MAC_RUNNER && fromJSON(vars.RELEASE_MAC_RUNNER)) || (matrix.os == 'ubuntu-24.04' && vars.RELEASE_LINUX_RUNNER && fromJSON(vars.RELEASE_LINUX_RUNNER)) || matrix.os }}
|
||||
# a cold thin-LTO build of raea-cli with the plugin catalog is the long part; GitHub's own limit is 6 hours
|
||||
timeout-minutes: 340
|
||||
env:
|
||||
# the compile cache (the "Compile cache" step): an R2 bucket, read and written by every build
|
||||
RELEASE_CACHE_ENDPOINT: ${{ secrets.RELEASE_CACHE_ENDPOINT }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.RELEASE_CACHE_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.RELEASE_CACHE_SECRET }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -95,7 +103,7 @@ jobs:
|
||||
# rc3's build left 576 MB of macos-15's 320 GB free, and rc4's dSYMs (#88) ran it out linking raea-page-host
|
||||
# (ld: write() failed, errno=28): the image's other Xcodes and the Android and .NET SDKs go first
|
||||
- name: Room for the build
|
||||
if: runner.os == 'macOS' && env.RAEA_PROMOTED_FROM == ''
|
||||
if: runner.os == 'macOS' && env.RAEA_PROMOTED_FROM == '' && vars.RELEASE_MAC_RUNNER == ''
|
||||
run: |
|
||||
df -h . | tail -1
|
||||
keep=$(cd "$(xcode-select -p)/../.." && pwd -P)
|
||||
@@ -104,14 +112,48 @@ jobs:
|
||||
wait
|
||||
echo "kept $keep"
|
||||
df -h . | tail -1
|
||||
# The compile cache: sccache on an R2 bucket. GitHub's own cache can't carry a release build: a tag's run reads
|
||||
# only its own tag's caches and the default branch's (so rc3's never reached rc4), and the repo's 10 GB are CI's.
|
||||
# A bucket is read by every tag. A cold build fills it; a candidate after a small change compiles only the crates
|
||||
# that changed and the ones above them. Linking (thin LTO) and build scripts' runs aren't cached. With no secrets
|
||||
# (a fork) the build runs as before, uncached.
|
||||
# the build folder and cargo's downloads kept between runs on the runner's cache volume (a Namespace runner,
|
||||
# whose labels attach one), so a candidate rebuilds only what changed and links;
|
||||
# sccache below still serves the workspace's own crates, which a fresh checkout's file times mark as changed
|
||||
- name: The build folder, kept on the runner's cache volume
|
||||
if: env.RAEA_PROMOTED_FROM == '' && startsWith(runner.name, 'nsc-')
|
||||
uses: namespacelabs/nscloud-cache-action@v1
|
||||
with:
|
||||
path: |
|
||||
${{ github.workspace }}/target
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
- name: Compile cache (sccache)
|
||||
if: env.RAEA_PROMOTED_FROM == '' && env.AWS_ACCESS_KEY_ID != ''
|
||||
uses: mozilla-actions/[email protected]
|
||||
# the script from this workflow's own commit: a dispatched run (a dry run that fills the cache) builds an older
|
||||
# tag, whose tree may not have it
|
||||
- name: The compile cache's script
|
||||
if: env.RAEA_PROMOTED_FROM == '' && env.AWS_ACCESS_KEY_ID != ''
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.sha }}
|
||||
path: .workflow
|
||||
sparse-checkout: tools/release/compile-cache.sh
|
||||
sparse-checkout-cone-mode: false
|
||||
- name: Use the compile cache
|
||||
if: env.RAEA_PROMOTED_FROM == '' && env.AWS_ACCESS_KEY_ID != ''
|
||||
run: bash .workflow/tools/release/compile-cache.sh
|
||||
- name: Build
|
||||
if: env.RAEA_PROMOTED_FROM == ''
|
||||
run: |
|
||||
feat=$(bash tools/bevy-plugins.sh features sdk/raea/bench/bevy-plugins)
|
||||
cargo build --profile dist --locked -p raea-cli --bin raea --no-default-features --features "$feat"
|
||||
cargo build --profile dist --locked -p raea-rune-host
|
||||
cargo build --profile dist --locked -p raea-page-host --features window
|
||||
if [ -n "${{ matrix.extra }}" ]; then cargo build --profile dist --locked -p ${{ matrix.extra }}; fi
|
||||
t() { s=$SECONDS; "$@"; echo "::notice::${{ runner.os }} $(( (SECONDS - s) / 60 )) min: ${*:7}"; }
|
||||
t cargo build --profile dist --locked -p raea-cli --bin raea --no-default-features --features "$feat"
|
||||
t cargo build --profile dist --locked -p raea-rune-host
|
||||
t cargo build --profile dist --locked -p raea-page-host --features window
|
||||
if [ -n "${{ matrix.extra }}" ]; then t cargo build --profile dist --locked -p ${{ matrix.extra }}; fi
|
||||
if [ -n "${RUSTC_WRAPPER:-}" ]; then sccache --show-stats; fi
|
||||
mkdir ship
|
||||
cp target/dist/raea target/dist/${{ matrix.lib }} target/dist/raea-rune-host target/dist/raea-page-host ship/
|
||||
if [ -n "${{ matrix.extra }}" ]; then cp target/dist/${{ matrix.extra }} ship/; fi
|
||||
@@ -124,6 +166,8 @@ jobs:
|
||||
run: bash tools/release/promoted-bins.sh "$RAEA_PROMOTED_FROM" ship
|
||||
# the packing and its checks need only ship/, and macos-15's disk ran out packing rc1 with target/ kept
|
||||
- name: Free the build's disk
|
||||
# not the cache volume's build folder, which the next candidate starts from (a bind mount on Linux)
|
||||
if: ${{ !startsWith(runner.name, 'nsc-') }}
|
||||
run: |
|
||||
df -h . | tail -1
|
||||
rm -rf target
|
||||
@@ -177,8 +221,13 @@ jobs:
|
||||
# accept no licence and download no Microsoft files). The C runtime is the DLL one (the VC++ redistributable): ort's
|
||||
# prebuilt ONNX Runtime is built against it, so crt-static doesn't link (LNK2019 on __imp_ symbols, 10-29).
|
||||
windows:
|
||||
runs-on: windows-latest
|
||||
runs-on: ${{ (vars.RELEASE_WINDOWS_RUNNER && fromJSON(vars.RELEASE_WINDOWS_RUNNER)) || 'windows-latest' }}
|
||||
timeout-minutes: 350
|
||||
env:
|
||||
# the compile cache, as build's
|
||||
RELEASE_CACHE_ENDPOINT: ${{ secrets.RELEASE_CACHE_ENDPOINT }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.RELEASE_CACHE_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.RELEASE_CACHE_SECRET }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
@@ -195,6 +244,21 @@ jobs:
|
||||
- name: Toolchain (rust-toolchain.toml's pin)
|
||||
if: env.RAEA_PROMOTED_FROM == ''
|
||||
run: rustup show active-toolchain || rustup toolchain install
|
||||
# nasm, which rav1d's and openh264-sys2's build scripts run: GitHub's Windows image has 2.16, Namespace's has none
|
||||
# (rc3's dry run there stopped at "Unable to run nasm: program not found"). Always NASM's own 2.16.03 zip, never
|
||||
# Chocolatey's: rc4 took Chocolatey's newest, and raea.exe failed to link 135 of openh264's SIMD routines
|
||||
# (WelsSampleSad16x8_sse2 and the rest unresolved) though openh264's C++ was built to call them
|
||||
- name: nasm
|
||||
if: env.RAEA_PROMOTED_FROM == ''
|
||||
run: |
|
||||
v=2.16.03
|
||||
curl -fsSL --retry 3 -o "$RUNNER_TEMP/nasm.zip" "https://www.nasm.us/pub/nasm/releasebuilds/$v/win64/nasm-$v-win64.zip"
|
||||
unzip -q "$RUNNER_TEMP/nasm.zip" -d "$RUNNER_TEMP"
|
||||
# Git Bash on Windows has no /dev/stderr (rc5 stopped here): capture, print, then match
|
||||
out=$("$RUNNER_TEMP/nasm-$v/nasm.exe" -v)
|
||||
echo "$out"
|
||||
case $out in *"version $v"*) ;; *) echo "::error::expected NASM $v, got: $out"; exit 1 ;; esac
|
||||
echo "$RUNNER_TEMP/nasm-$v" >> "$GITHUB_PATH"
|
||||
# jq for Windows ends -r lines with CRLF, so tools/bevy-plugins.sh read "ahoy\r" and lost its Bevy 0.20 block
|
||||
# (feature `ahoy` not found, 11-04); -b writes LF
|
||||
- name: jq that writes LF
|
||||
@@ -219,14 +283,47 @@ jobs:
|
||||
done < <(tr -d '\r' < tools/release/models.tsv)
|
||||
# the app targets' hosts a cargo call each: with raea-cli's crates in one call taffy's features unify and
|
||||
# rune-taffy doesn't build; raea-perceive (`raea song`'s map, #43) a call of its own too
|
||||
- name: The build folder, kept on the runner's cache volume (as build's)
|
||||
if: env.RAEA_PROMOTED_FROM == '' && startsWith(runner.name, 'nsc-')
|
||||
uses: namespacelabs/nscloud-cache-action@v1
|
||||
with:
|
||||
path: |
|
||||
${{ github.workspace }}/target
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
- name: Compile cache (sccache, as build's)
|
||||
if: env.RAEA_PROMOTED_FROM == '' && env.AWS_ACCESS_KEY_ID != ''
|
||||
uses: mozilla-actions/[email protected]
|
||||
# the script from this workflow's own commit: a dispatched run (a dry run that fills the cache) builds an older
|
||||
# tag, whose tree may not have it
|
||||
- name: The compile cache's script
|
||||
if: env.RAEA_PROMOTED_FROM == '' && env.AWS_ACCESS_KEY_ID != ''
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.sha }}
|
||||
path: .workflow
|
||||
sparse-checkout: tools/release/compile-cache.sh
|
||||
sparse-checkout-cone-mode: false
|
||||
- name: Use the compile cache
|
||||
if: env.RAEA_PROMOTED_FROM == '' && env.AWS_ACCESS_KEY_ID != ''
|
||||
run: bash .workflow/tools/release/compile-cache.sh
|
||||
# openh264-sys2 is built here every time, never taken whole from the cache volume's target/: a build of it whose
|
||||
# assembly didn't make it into the rlib (0.1.3-rc4's Chocolatey nasm) stays fresh to cargo on a restored target/,
|
||||
# and every link after it fails on the same 135 SIMD routines (v0.1.4-rc1, 11-14: only raea-cli compiled, then
|
||||
# WaverageChromaFilter8_sse2 and the rest unresolved). Its C++ comes back from sccache; the assembly is seconds
|
||||
- name: openh264 built here, not restored
|
||||
if: env.RAEA_PROMOTED_FROM == ''
|
||||
run: rm -rf target/dist/build/openh264-sys2-* target/dist/deps/libopenh264_sys2-* target/dist/.fingerprint/openh264-sys2-*
|
||||
- name: Build
|
||||
if: env.RAEA_PROMOTED_FROM == ''
|
||||
run: |
|
||||
feat=$(bash tools/bevy-plugins.sh features sdk/raea/bench/bevy-plugins)
|
||||
cargo build --profile dist --locked -p raea-cli --bin raea --no-default-features --features "$feat"
|
||||
cargo build --profile dist --locked -p raea-rune-host
|
||||
cargo build --profile dist --locked -p raea-page-host --features window
|
||||
cargo build --profile dist --locked -p raea-perceive
|
||||
t() { s=$SECONDS; "$@"; echo "::notice::Windows $(( (SECONDS - s) / 60 )) min: ${*:7}"; }
|
||||
t cargo build --profile dist --locked -p raea-cli --bin raea --no-default-features --features "$feat"
|
||||
t cargo build --profile dist --locked -p raea-rune-host
|
||||
t cargo build --profile dist --locked -p raea-page-host --features window
|
||||
t cargo build --profile dist --locked -p raea-perceive
|
||||
if [ -n "${RUSTC_WRAPPER:-}" ]; then sccache --show-stats; fi
|
||||
- name: The candidate's binaries (tools/release/promoted-bins.sh)
|
||||
if: env.RAEA_PROMOTED_FROM != ''
|
||||
env:
|
||||
|
||||
Generated
+235
-2
@@ -11460,6 +11460,7 @@ version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "32b0446e98cf4a784cc7a0177715ff317eeaa8463841c616cfc78aa4f953c4ea"
|
||||
dependencies = [
|
||||
"block2 0.6.2",
|
||||
"objc2 0.6.5",
|
||||
"objc2-core-foundation",
|
||||
"objc2-core-graphics",
|
||||
@@ -11550,6 +11551,20 @@ dependencies = [
|
||||
"objc2-metal 0.3.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "objc2-photos"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d6ea9a706f18e32cf8a0723e99855af4f135282891e07259301bae9135ae3872"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"block2 0.6.2",
|
||||
"objc2 0.6.5",
|
||||
"objc2-app-kit 0.3.2",
|
||||
"objc2-core-foundation",
|
||||
"objc2-foundation 0.3.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "objc2-quartz-core"
|
||||
version = "0.2.2"
|
||||
@@ -11577,6 +11592,20 @@ dependencies = [
|
||||
"objc2-metal 0.3.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "objc2-quick-look-thumbnailing"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ac8e00da1ca87ffe3ea8d20981026f013df91072a140432f0f88da9a356d9b3c"
|
||||
dependencies = [
|
||||
"bitflags 2.13.2",
|
||||
"block2 0.6.2",
|
||||
"objc2 0.6.5",
|
||||
"objc2-core-foundation",
|
||||
"objc2-core-graphics",
|
||||
"objc2-foundation 0.3.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "objc2-symbols"
|
||||
version = "0.2.2"
|
||||
@@ -13716,6 +13745,7 @@ checksum = "019b4b213425016d7d84a153c4c73afb0946fbb4840e4eece7ba8848b9d6da22"
|
||||
name = "raea-app-capcut"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"image",
|
||||
"raea-core-scene",
|
||||
"raea-io-alpha",
|
||||
@@ -13730,10 +13760,13 @@ dependencies = [
|
||||
name = "raea-app-check"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"raea-app-check-flash",
|
||||
"raea-app-check-inbox",
|
||||
"raea-core-brief",
|
||||
"raea-core-facts",
|
||||
"raea-io-ffmpeg",
|
||||
"raea-io-home",
|
||||
"raea-io-trace",
|
||||
"raea-sys-measure",
|
||||
"serde_json",
|
||||
@@ -13743,6 +13776,14 @@ dependencies = [
|
||||
name = "raea-app-check-flash"
|
||||
version = "0.1.0"
|
||||
|
||||
[[package]]
|
||||
name = "raea-app-check-inbox"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"raea-io-home",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raea-app-ci"
|
||||
version = "0.1.0"
|
||||
@@ -13756,11 +13797,13 @@ dependencies = [
|
||||
name = "raea-app-direction"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"raea-app-check",
|
||||
"raea-app-notes",
|
||||
"raea-app-registry",
|
||||
"raea-core-brief",
|
||||
"raea-core-facts",
|
||||
"raea-io-home",
|
||||
"raea-io-trace",
|
||||
"raea-runtime-bundle",
|
||||
"raea-runtime-react",
|
||||
@@ -13788,8 +13831,10 @@ name = "raea-app-fingerprint"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"dunce",
|
||||
"fastrand",
|
||||
"raea-app-check",
|
||||
"raea-io-home",
|
||||
"raea-sys-columns",
|
||||
"raea-sys-fingerprint",
|
||||
"raea-sys-fingerprint-things",
|
||||
@@ -13803,6 +13848,7 @@ name = "raea-app-game"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"dunce",
|
||||
"raea-gpu-device",
|
||||
"raea-io-home",
|
||||
"raea-io-media",
|
||||
@@ -13821,6 +13867,7 @@ dependencies = [
|
||||
name = "raea-app-interchange"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"raea-core-scene",
|
||||
"raea-core-shape",
|
||||
"raea-runtime-bundle",
|
||||
@@ -13834,6 +13881,7 @@ name = "raea-app-judge"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"dunce",
|
||||
"image",
|
||||
"raea-core-facts",
|
||||
"raea-io-home",
|
||||
@@ -13861,6 +13909,7 @@ name = "raea-app-notes"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"raea-core-facts",
|
||||
"raea-io-home",
|
||||
"raea-io-trace",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -13889,8 +13938,10 @@ dependencies = [
|
||||
name = "raea-app-registry"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"oxc",
|
||||
"raea-core-facts",
|
||||
"raea-io-home",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
@@ -13898,6 +13949,7 @@ dependencies = [
|
||||
name = "raea-app-solid"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"raea-app-judge",
|
||||
"raea-core-facts",
|
||||
"raea-core-meshcheck",
|
||||
@@ -13911,6 +13963,7 @@ dependencies = [
|
||||
name = "raea-app-sound"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"raea-io-media",
|
||||
"raea-runtime-bundle",
|
||||
"raea-runtime-export",
|
||||
@@ -13922,6 +13975,7 @@ name = "raea-app-targets"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"dunce",
|
||||
"raea-io-home",
|
||||
"raea-runtime-bundle",
|
||||
"serde_json",
|
||||
@@ -13931,12 +13985,14 @@ dependencies = [
|
||||
name = "raea-app-tools"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"raea-io-assets",
|
||||
"raea-io-gen",
|
||||
"raea-io-home",
|
||||
"raea-io-media",
|
||||
"raea-runtime-bundle",
|
||||
"raea-runtime-export",
|
||||
"raea-sys-kimodo",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
@@ -13944,10 +14000,12 @@ dependencies = [
|
||||
name = "raea-app-workspace"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"raea-app-check",
|
||||
"raea-app-registry",
|
||||
"raea-core-brief",
|
||||
"raea-core-facts",
|
||||
"raea-io-home",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
@@ -14019,6 +14077,7 @@ dependencies = [
|
||||
"chacha20 0.10.2",
|
||||
"indexmap",
|
||||
"nonmax",
|
||||
"raea-io-home",
|
||||
"raea-sys-parity",
|
||||
"rand 0.10.3",
|
||||
]
|
||||
@@ -14102,6 +14161,7 @@ name = "raea-bridge-bench"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bevy",
|
||||
"dunce",
|
||||
"image",
|
||||
"raea-core-alloc",
|
||||
"raea-core-wire",
|
||||
@@ -14126,6 +14186,7 @@ name = "raea-bundle"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"dunce",
|
||||
"lightningcss",
|
||||
"oxc",
|
||||
"raea-io-home",
|
||||
@@ -14161,6 +14222,7 @@ name = "raea-cli"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bevy",
|
||||
"dunce",
|
||||
"raea-app-capcut",
|
||||
"raea-app-check",
|
||||
"raea-app-ci",
|
||||
@@ -14195,6 +14257,7 @@ dependencies = [
|
||||
"raea-runtime-plugins",
|
||||
"raea-runtime-react",
|
||||
"raea-runtime-sound",
|
||||
"raea-sys-index",
|
||||
"regex",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -14240,6 +14303,7 @@ version = "0.1.0"
|
||||
name = "raea-core-facts"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"raea-core-brief",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -14349,6 +14413,15 @@ dependencies = [
|
||||
"wgpu",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raea-hands-audit"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"glam 0.33.12",
|
||||
"raea-sys-body",
|
||||
"raea-sys-grab",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raea-io-alpha"
|
||||
version = "0.1.0"
|
||||
@@ -14408,6 +14481,7 @@ dependencies = [
|
||||
name = "raea-io-assets"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"image",
|
||||
"raea-io-home",
|
||||
"ruzstd",
|
||||
@@ -14430,6 +14504,7 @@ dependencies = [
|
||||
name = "raea-io-capcut"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"raea-io-home",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
@@ -14458,11 +14533,11 @@ dependencies = [
|
||||
name = "raea-io-gen"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"image",
|
||||
"raea-core-facts",
|
||||
"raea-core-meshcheck",
|
||||
"raea-io-gen-comfy",
|
||||
"raea-io-gen-core",
|
||||
"raea-io-gen-fit",
|
||||
"raea-io-home",
|
||||
"serde_json",
|
||||
]
|
||||
@@ -14484,10 +14559,21 @@ dependencies = [
|
||||
"sha2 0.10.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raea-io-gen-fit"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"raea-core-facts",
|
||||
"raea-core-meshcheck",
|
||||
"raea-io-gen-core",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raea-io-home"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"serde_json",
|
||||
"url",
|
||||
]
|
||||
@@ -14565,6 +14651,7 @@ dependencies = [
|
||||
name = "raea-io-shell"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"flate2",
|
||||
"htmd",
|
||||
"raea-core-calls",
|
||||
@@ -14605,6 +14692,7 @@ name = "raea-modules"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"deno_ast",
|
||||
"dunce",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -14612,10 +14700,12 @@ name = "raea-native"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"dunce",
|
||||
"flate2",
|
||||
"getrandom 0.3.4",
|
||||
"libc",
|
||||
"raea-core-calls",
|
||||
"raea-io-home",
|
||||
"raea-io-shell",
|
||||
"raea-modules",
|
||||
"raea-runtime-jsengine",
|
||||
@@ -14640,6 +14730,7 @@ dependencies = [
|
||||
"bevy",
|
||||
"blitz-dom",
|
||||
"blitz-html",
|
||||
"dunce",
|
||||
"image",
|
||||
"parley",
|
||||
"raea-core-wire",
|
||||
@@ -14673,10 +14764,12 @@ dependencies = [
|
||||
"blitz-traits",
|
||||
"image",
|
||||
"keyboard-types",
|
||||
"raea-io-home",
|
||||
"raea-io-media",
|
||||
"raea-io-net-calls",
|
||||
"raea-io-os",
|
||||
"raea-page",
|
||||
"raea-page-sound",
|
||||
"raea-page-stage",
|
||||
"raea-page-window",
|
||||
"raea-rune-slots",
|
||||
@@ -14693,6 +14786,16 @@ dependencies = [
|
||||
"tiny_http",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raea-page-sound"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bevy",
|
||||
"raea-runtime-js",
|
||||
"raea-sys-mix",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raea-page-stage"
|
||||
version = "0.1.0"
|
||||
@@ -14700,6 +14803,7 @@ dependencies = [
|
||||
"bevy",
|
||||
"blitz-dom",
|
||||
"raea-gpu-device",
|
||||
"raea-io-home",
|
||||
"raea-runtime-bake",
|
||||
"raea-runtime-dom",
|
||||
"raea-runtime-js",
|
||||
@@ -14747,6 +14851,7 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"bevy",
|
||||
"bytemuck",
|
||||
"dunce",
|
||||
"image",
|
||||
"raea-core-program",
|
||||
"raea-core-shape",
|
||||
@@ -14767,6 +14872,7 @@ dependencies = [
|
||||
"raea-sys-framepass",
|
||||
"raea-sys-grass",
|
||||
"raea-sys-grid",
|
||||
"raea-sys-hold",
|
||||
"raea-sys-look",
|
||||
"raea-sys-matchmove",
|
||||
"raea-sys-material",
|
||||
@@ -14776,6 +14882,7 @@ dependencies = [
|
||||
"raea-sys-phase",
|
||||
"raea-sys-post",
|
||||
"raea-sys-procmat",
|
||||
"raea-sys-rendermap",
|
||||
"raea-sys-rt",
|
||||
"raea-sys-sampler",
|
||||
"raea-sys-screen",
|
||||
@@ -14784,6 +14891,7 @@ dependencies = [
|
||||
"raea-sys-sprite",
|
||||
"raea-sys-text3d",
|
||||
"raea-sys-three-shader",
|
||||
"raea-sys-viewbox",
|
||||
"raea-sys-volume",
|
||||
"raea-sys-wear",
|
||||
"serde_json",
|
||||
@@ -14917,6 +15025,24 @@ dependencies = [
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raea-runtime-appscreen"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bevy",
|
||||
"blitz-traits",
|
||||
"keyboard-types",
|
||||
"raea-io-home",
|
||||
"raea-page",
|
||||
"raea-runtime-bundle",
|
||||
"raea-runtime-dom",
|
||||
"raea-runtime-js",
|
||||
"raea-runtime-jsengine",
|
||||
"raea-sys-fonts",
|
||||
"raea-sys-page",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raea-runtime-bake"
|
||||
version = "0.1.0"
|
||||
@@ -14952,6 +15078,7 @@ dependencies = [
|
||||
name = "raea-runtime-bundle-lib"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"libloading",
|
||||
"raea-io-home",
|
||||
"serde_json",
|
||||
@@ -14974,6 +15101,7 @@ dependencies = [
|
||||
"raea-native",
|
||||
"raea-runtime-plugins",
|
||||
"raea-sys-fonts",
|
||||
"raea-sys-grab",
|
||||
"raea-sys-mix",
|
||||
"raea-sys-ml",
|
||||
"raea-sys-speech",
|
||||
@@ -15070,6 +15198,7 @@ name = "raea-runtime-export"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bevy",
|
||||
"dunce",
|
||||
"image",
|
||||
"raea-core-facts",
|
||||
"raea-core-program",
|
||||
@@ -15139,6 +15268,7 @@ dependencies = [
|
||||
"base64 0.22.1",
|
||||
"bevy",
|
||||
"cpal 0.15.3",
|
||||
"dunce",
|
||||
"raea-bevy-world",
|
||||
"raea-core-wire",
|
||||
"raea-io-home",
|
||||
@@ -15157,6 +15287,7 @@ name = "raea-runtime-jsengine"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"objc2 0.6.5",
|
||||
"raea-io-home",
|
||||
"rquickjs",
|
||||
]
|
||||
|
||||
@@ -15166,6 +15297,7 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"bevy",
|
||||
"cpal 0.15.3",
|
||||
"dunce",
|
||||
"image",
|
||||
"raea-core-program",
|
||||
"raea-gpu-device",
|
||||
@@ -15178,6 +15310,7 @@ dependencies = [
|
||||
"raea-runtime-react",
|
||||
"raea-runtime-sound",
|
||||
"raea-sys-frame",
|
||||
"raea-sys-hold",
|
||||
"raea-sys-mix",
|
||||
"serde_json",
|
||||
"twox-hash",
|
||||
@@ -15210,6 +15343,7 @@ dependencies = [
|
||||
"raea-io-net",
|
||||
"raea-page",
|
||||
"raea-render",
|
||||
"raea-runtime-appscreen",
|
||||
"raea-runtime-input",
|
||||
"raea-runtime-react",
|
||||
"raea-runtime-twins",
|
||||
@@ -15369,6 +15503,7 @@ dependencies = [
|
||||
name = "raea-runtime-track"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"raea-io-assets",
|
||||
"raea-native",
|
||||
"raea-runtime-bundle",
|
||||
@@ -15422,6 +15557,7 @@ name = "raea-runtime-world"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bevy",
|
||||
"dunce",
|
||||
"image",
|
||||
"raea-core-facts",
|
||||
"raea-core-scene",
|
||||
@@ -15486,12 +15622,21 @@ name = "raea-sys-bake"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"image",
|
||||
"raea-io-home",
|
||||
"rapier3d",
|
||||
"serde_json",
|
||||
"sha2 0.10.9",
|
||||
"simba",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raea-sys-body"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"glam 0.33.12",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raea-sys-canvas"
|
||||
version = "0.1.0"
|
||||
@@ -15516,6 +15661,7 @@ dependencies = [
|
||||
"half",
|
||||
"image",
|
||||
"ort",
|
||||
"raea-io-home",
|
||||
"raea-io-media",
|
||||
"raea-sys-ml",
|
||||
"rustfft",
|
||||
@@ -15589,6 +15735,7 @@ name = "raea-sys-fingerprint"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"raea-io-home",
|
||||
"raea-sys-columns",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -15612,6 +15759,7 @@ name = "raea-sys-fingerprint-use"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"dunce",
|
||||
"fastrand",
|
||||
"image",
|
||||
"raea-sys-columns",
|
||||
@@ -15664,7 +15812,9 @@ dependencies = [
|
||||
name = "raea-sys-footage"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"image",
|
||||
"raea-io-home",
|
||||
"raea-io-media",
|
||||
"raea-sys-layout",
|
||||
"raea-sys-song",
|
||||
@@ -15699,6 +15849,15 @@ dependencies = [
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raea-sys-grab"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"glam 0.33.12",
|
||||
"raea-sys-body",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raea-sys-grass"
|
||||
version = "0.1.0"
|
||||
@@ -15719,6 +15878,14 @@ dependencies = [
|
||||
"raea-sys-frame",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raea-sys-hold"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bevy",
|
||||
"raea-sys-frame",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raea-sys-image"
|
||||
version = "0.1.0"
|
||||
@@ -15726,6 +15893,37 @@ dependencies = [
|
||||
"bevy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raea-sys-index"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"block2 0.6.2",
|
||||
"dunce",
|
||||
"half",
|
||||
"objc2 0.6.5",
|
||||
"objc2-app-kit 0.3.2",
|
||||
"objc2-av-foundation",
|
||||
"objc2-core-foundation",
|
||||
"objc2-core-graphics",
|
||||
"objc2-core-media",
|
||||
"objc2-core-ml",
|
||||
"objc2-core-video",
|
||||
"objc2-foundation 0.3.2",
|
||||
"objc2-image-io",
|
||||
"objc2-photos",
|
||||
"objc2-quick-look-thumbnailing",
|
||||
"ort",
|
||||
"raea-io-home",
|
||||
"raea-sys-ml",
|
||||
"rayon",
|
||||
"rusqlite",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tokenizers",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raea-sys-k"
|
||||
version = "0.1.0"
|
||||
@@ -15738,6 +15936,19 @@ dependencies = [
|
||||
"wgpu",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raea-sys-kimodo"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"mlx-rs",
|
||||
"raea-io-home",
|
||||
"raea-sys-ml",
|
||||
"raea-sys-mlx",
|
||||
"serde_json",
|
||||
"tokenizers",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raea-sys-layers"
|
||||
version = "0.1.0"
|
||||
@@ -15850,6 +16061,7 @@ name = "raea-sys-ml"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"dunce",
|
||||
"half",
|
||||
"ort",
|
||||
"raea-io-home",
|
||||
@@ -15896,6 +16108,7 @@ dependencies = [
|
||||
"bevy",
|
||||
"blitz-dom",
|
||||
"blitz-traits",
|
||||
"dunce",
|
||||
"percent-encoding",
|
||||
"raea-io-net",
|
||||
"raea-sys-image",
|
||||
@@ -15967,6 +16180,14 @@ dependencies = [
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raea-sys-rendermap"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bevy",
|
||||
"raea-sys-frame",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raea-sys-rt"
|
||||
version = "0.1.0"
|
||||
@@ -16038,6 +16259,7 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"ort",
|
||||
"raea-io-home",
|
||||
"raea-sys-ml",
|
||||
"serde_json",
|
||||
"tokenizers",
|
||||
@@ -16086,8 +16308,10 @@ dependencies = [
|
||||
"bevy",
|
||||
"image",
|
||||
"naga",
|
||||
"raea-sys-frame",
|
||||
"raea-sys-material",
|
||||
"raea-sys-sampler",
|
||||
"raea-sys-shader",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
@@ -16108,6 +16332,14 @@ dependencies = [
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raea-sys-viewbox"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bevy",
|
||||
"raea-sys-frame",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raea-sys-vision"
|
||||
version = "0.1.0"
|
||||
@@ -16120,6 +16352,7 @@ dependencies = [
|
||||
"objc2-core-video",
|
||||
"objc2-foundation 0.3.2",
|
||||
"objc2-vision",
|
||||
"raea-io-home",
|
||||
"raea-io-media",
|
||||
"raea-sys-layout",
|
||||
"serde",
|
||||
|
||||
+12
@@ -53,6 +53,7 @@ members = [
|
||||
"engine/rune/js",
|
||||
"engine/rune/layer",
|
||||
"engine/rune/slots",
|
||||
"engine/page/sound",
|
||||
"engine/page/stage",
|
||||
"engine/page/window",
|
||||
"io/trace",
|
||||
@@ -62,6 +63,7 @@ members = [
|
||||
"io/gen",
|
||||
"io/gen-comfy",
|
||||
"io/gen-core",
|
||||
"io/gen-fit",
|
||||
"io/home",
|
||||
"io/soft",
|
||||
"io/av1",
|
||||
@@ -79,10 +81,12 @@ members = [
|
||||
"systems/mix",
|
||||
"systems/ml",
|
||||
"systems/mlx",
|
||||
"systems/kimodo",
|
||||
"systems/speech",
|
||||
"systems/layout",
|
||||
"systems/vision",
|
||||
"systems/columns",
|
||||
"systems/index",
|
||||
"systems/fingerprint",
|
||||
"systems/fingerprint-use",
|
||||
"systems/fingerprint-things",
|
||||
@@ -103,6 +107,9 @@ members = [
|
||||
"systems/page-net",
|
||||
"systems/page-ops",
|
||||
"systems/frame",
|
||||
"systems/hold",
|
||||
"systems/body",
|
||||
"systems/grab",
|
||||
"systems/layers",
|
||||
"systems/splat",
|
||||
"systems/sprite",
|
||||
@@ -113,6 +120,8 @@ members = [
|
||||
"systems/screen",
|
||||
"systems/matchmove",
|
||||
"systems/grid",
|
||||
"systems/viewbox",
|
||||
"systems/rendermap",
|
||||
"systems/meshseq",
|
||||
"systems/environment",
|
||||
"systems/look",
|
||||
@@ -159,6 +168,7 @@ members = [
|
||||
"runtime/export",
|
||||
"runtime/live",
|
||||
"runtime/page",
|
||||
"runtime/appscreen",
|
||||
"runtime/sound",
|
||||
"runtime/look",
|
||||
"runtime/scene",
|
||||
@@ -166,6 +176,7 @@ members = [
|
||||
"runtime/shared",
|
||||
"apps/check",
|
||||
"apps/check/flash",
|
||||
"apps/check/inbox",
|
||||
"apps/direction",
|
||||
"apps/notes",
|
||||
"apps/fingerprint",
|
||||
@@ -184,6 +195,7 @@ members = [
|
||||
"apps/capcut",
|
||||
"apps/play",
|
||||
"tools/sdk-props",
|
||||
"tools/hands-audit",
|
||||
]
|
||||
exclude = [
|
||||
"engine/sandbox/rtools",
|
||||
|
||||
@@ -1,176 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
@@ -1,23 +0,0 @@
|
||||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without
|
||||
limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software
|
||||
is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions
|
||||
of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
@@ -175,7 +175,6 @@ LICENSES/<crate>-<version>/.
|
||||
deterministic-hash 1.0.2: MIT
|
||||
disjoint-sets 0.4.2: MIT/Apache-2.0
|
||||
dot_vox 5.2.0: MIT
|
||||
dyn-clone 1.0.20: MIT OR Apache-2.0
|
||||
dyn-eq 0.1.3: MPL-2.0
|
||||
dyn-hash 1.0.0: MIT OR Apache-2.0
|
||||
earcut 0.4.5: ISC
|
||||
|
||||
@@ -32,14 +32,42 @@
|
||||
|
||||
---
|
||||
|
||||
> **v0.1.1** is raea's first full release: the engine and, for the first time, the desktop app, on macOS (Apple
|
||||
> Silicon), Linux (x86_64) and, newest and least tested, Windows (x86_64). raea is young: expect rough edges and gaps
|
||||
> in the docs.
|
||||
> **0.1.6** (17 November 2026) is the latest release: the engine and the desktop app on macOS (Apple Silicon), Linux
|
||||
> (x86_64) and, newest and least tested, Windows 10 and 11 (x86_64). raea is young and moves fast, with a release most
|
||||
> days since 0.1.1 on 11 November: expect rough edges, and tell us what you hit in an
|
||||
> [issue](https://github.com/shinyobjectz/raea/issues), or from your agent with `raea bug`.
|
||||
|
||||
## The app
|
||||
|
||||
The raea app is where you make video and games with your AI. Download it from [raea.io](https://raea.io) for the Mac,
|
||||
Windows or Linux. It tells you when a new version is out; on the Mac it updates itself.
|
||||
The raea app is where you make video, 3D and games with your AI. You ask in a chat; your own AI (Claude, ChatGPT, Kimi
|
||||
or a local model) writes the raea code and renders it; what it makes lands in the project's feed, where you watch it,
|
||||
scrub it, mark it up and send it back with notes. Download it from [raea.io](https://raea.io) for the Mac, Windows or
|
||||
Linux. It tells you when a new version is out; on the Mac it updates itself.
|
||||
|
||||
<p align="center">
|
||||
<a href="https://media.raea.io/#goose-learns-raea"><img src="docs/readme/goose-learns-raea.jpg" width="720" alt="The raea app tutorial"></a>
|
||||
</p>
|
||||
|
||||
New to the app? **[Watch the tutorial](https://media.raea.io/#goose-learns-raea)** (5:50).
|
||||
|
||||
What the app does now:
|
||||
|
||||
- **The chat comes first** (0.1.5): your projects in a rail, the conversation in the middle, and `/goal` to keep an
|
||||
agent going until a condition you set holds.
|
||||
- **A timeline you edit by hand** (0.1.4): trim, split and move clips, speed curves, freeze frames and keys, the way
|
||||
CapCut works, under every film, sound and scene.
|
||||
- **Scenes you walk around in** (0.1.3): your agent posts a 3D scene and you walk through it, pin comments in it and
|
||||
move its parts by hand; every change is written into the scene's own code.
|
||||
- **Index** (0.1.5): your folders, drives and Apple Photos made searchable by what's in them, on your Mac. On an M5 Pro,
|
||||
10,000 pictures were searchable in under a minute.
|
||||
- **Review** (0.1.6): each project has a Review tab, every comment you leave reaches the agent, and export is one
|
||||
window.
|
||||
- **Lighter** (0.1.6): the window gives back memory it's finished with and rests when nothing changes, 34% less CPU
|
||||
at rest.
|
||||
|
||||
The app and the engine are free. Pro adds cloud storage, search across your computers and publishing; Team puts up to
|
||||
five people on one plan ([pricing](https://raea.io/pricing/)). Each release's notes are on the
|
||||
[releases page](https://github.com/shinyobjectz/raea/releases).
|
||||
|
||||
## Install
|
||||
|
||||
@@ -92,12 +120,19 @@ floor (`raea check hello.mp4`). `raea init` starts a project, and `raea --help`
|
||||
- **Games.** Input, physics, sound and 3D, played live with `raea play`, and exported as a program of their own
|
||||
(`raea export-game`).
|
||||
- **3D.** Scenes in TypeScript drawn by [Bevy](https://bevyengine.org) 0.20: cameras, lights, materials, glTF models,
|
||||
Gaussian splats, and Bevy plugins compiled into the engine.
|
||||
Gaussian splats, and Bevy plugins compiled into the engine. three.js work runs as it's written: a React Three Fiber
|
||||
scene inside `<R3F>`, or a three.js page's script inside `<Three program>`.
|
||||
- **Sound.** One mixer for live play and offline render, instruments and effects, and local models for foley and
|
||||
instrument notes (`raea sao`, `raea tokensynth`).
|
||||
- **Built for agents.** Everything it draws stays queryable as data, so an agent can render a frame, look at it, and
|
||||
fix what's wrong without a person in the loop.
|
||||
|
||||
## Made in raea
|
||||
|
||||
Films, music videos, a tutorial and a game made with raea are on [media.raea.io](https://media.raea.io). Six of them
|
||||
come with their source in [raea-films](https://github.com/shinyobjectz/raea-films): each project's code under
|
||||
Apache-2.0, to read, render and take apart, and its models, textures and sound for anyone with a free raea account.
|
||||
|
||||
## Use it from your agent
|
||||
|
||||
- **Agent skills.** They live in [raea-skills](https://github.com/shinyobjectz/raea-skills), pinned here as
|
||||
@@ -108,6 +143,9 @@ floor (`raea check hello.mp4`). `raea init` starts a project, and `raea --help`
|
||||
folder of raea-skills, and `/plugin marketplace add shinyobjectz/raea` installs the same one.
|
||||
- **Craft guides.** `raea guide` prints the floor every edit is held to and the guides for pitches, explainers, stories,
|
||||
games, motion, music and layout. `raea context PROJECT` says what to read before working on a project.
|
||||
- **Bug reports.** When an agent finds a bug in raea itself, `raea bug TITLE --text TEXT` sends it to raea's server
|
||||
with raea's version and the OS, no account needed. It sends words only: paths, emails and keys are taken out before
|
||||
it goes, and `--dry-run` prints what would go.
|
||||
|
||||
## Build from source
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ publish = false
|
||||
description = "`raea export capcut`: a composition as a CapCut draft ready in its timeline, its footage and sounds as clips of their files and what raea draws as transparent overlays (docs/capcut.feature)"
|
||||
|
||||
[dependencies]
|
||||
dunce = "1"
|
||||
raea-runtime-bundle = { path = "../../runtime/bundle" }
|
||||
raea-io-capcut = { path = "../../io/capcut" }
|
||||
raea-io-alpha = { path = "../../io/alpha" }
|
||||
|
||||
@@ -64,7 +64,7 @@ fn render(args: &[String], env: &[(&str, &str)]) -> R<()> {
|
||||
|
||||
fn export(args: &[String]) -> R<String> {
|
||||
let tsx = args.first().filter(|a| !a.starts_with('-')).ok_or(USAGE)?;
|
||||
let tsx = PathBuf::from(tsx).canonicalize().map_err(|e| format!("{tsx}: {e}"))?;
|
||||
let tsx = dunce::canonicalize(&PathBuf::from(tsx)).map_err(|e| format!("{tsx}: {e}"))?;
|
||||
let dir = tsx.parent().unwrap().to_path_buf();
|
||||
let codec = flag(args, "--alpha-codec").map_or(Ok(raea_io_alpha::Codec::default_here()), |c| raea_io_alpha::Codec::parse(&c))?;
|
||||
let (root, in_store) = match flag(args, "-o") {
|
||||
|
||||
@@ -178,5 +178,5 @@ pub fn lay(kind: Kind, name: &str, clips: Vec<Clip>) -> Vec<Track> {
|
||||
/// media/, then the project's media/ and assets/; else absolute; else relative to the composition's folder.
|
||||
pub fn resolve(dir: &Path, src: &str) -> PathBuf {
|
||||
let p = raea_core_scene::media_path(dir, src);
|
||||
p.canonicalize().unwrap_or(p)
|
||||
dunce::canonicalize(&p).unwrap_or(p)
|
||||
}
|
||||
@@ -77,7 +77,7 @@ fn a_static_file_is_found_in_the_edits_media_folder() {
|
||||
let dir = std::env::temp_dir().join(format!("raea-capcut-resolve-{}", std::process::id()));
|
||||
std::fs::create_dir_all(dir.join("media")).unwrap();
|
||||
std::fs::write(dir.join("media/a.mp4"), "").unwrap();
|
||||
let want = dir.join("media/a.mp4").canonicalize().unwrap();
|
||||
let want = dunce::canonicalize(&dir.join("media/a.mp4")).unwrap();
|
||||
assert_eq!(resolve(&dir, "/media/a.mp4"), want);
|
||||
assert_eq!(resolve(&dir, "media/a.mp4"), want);
|
||||
assert_eq!(resolve(&dir, want.to_str().unwrap()), want);
|
||||
|
||||
@@ -7,10 +7,12 @@ publish = false
|
||||
description = "`raea check`: the floor's measurable lines on an export, ranked P0-P3"
|
||||
|
||||
[dependencies]
|
||||
dunce = "1"
|
||||
# taste.ts rules, as the raea CLI evaluates them (docs/projects.feature PJ0)
|
||||
raea-core-brief = { path = "../../core/brief" }
|
||||
# a transcript's words, read as `raea world` reads them (docs/direction.feature DR1)
|
||||
raea-core-facts = { path = "../../core/facts" }
|
||||
raea-io-home = { path = "../../io/home" }
|
||||
# a check's record named by when it was (UTC, DR3)
|
||||
raea-io-trace = { path = "../../io/trace" }
|
||||
# ffmpeg's flag for every decoded frame, by its version
|
||||
@@ -19,4 +21,6 @@ raea-io-ffmpeg = { path = "../../io/ffmpeg" }
|
||||
raea-sys-measure = { path = "../../systems/measure" }
|
||||
# the flashing screen (WCAG 2.3.1), split out to keep this crate small
|
||||
raea-app-check-flash = { path = "flash" }
|
||||
# what the person sent from the raea app, handed to the agent (split out to keep this crate small)
|
||||
raea-app-check-inbox = { path = "inbox" }
|
||||
serde_json = "1"
|
||||
@@ -0,0 +1,12 @@
|
||||
[package]
|
||||
name = "raea-app-check-inbox"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
license = "FSL-1.1-ALv2"
|
||||
publish = false
|
||||
description = "`raea hook`'s hand-over: what the person sent from the raea app, read from the session's inbox once and handed to the agent at its next step"
|
||||
|
||||
[dependencies]
|
||||
serde_json = "1"
|
||||
# the inbox folder, under the home folder
|
||||
raea-io-home = { path = "../../../io/home" }
|
||||
@@ -0,0 +1,105 @@
|
||||
//! What the person sent from the raea app, handed to the session it's for at its next step (docs/agents.feature A3c;
|
||||
//! Shane 11-14: a reply in the feed "doesn't confirm, doesn't interrupt the agent", and the app forked a copy of the
|
||||
//! session so two agents ran). A session that posted with `raea show` has an inbox, ~/.raea/inbox/<inbox>.jsonl, and
|
||||
//! the app writes there what the person sends on its items or to it in the feed, even while its terminal is busy. This
|
||||
//! hook reads what was added since it last looked, after any tool call and when a turn is about to end, and hands it
|
||||
//! over: as the tool's context, or as the reason the turn goes on. How far it has read is kept beside the inbox
|
||||
//! (<inbox>.read, a byte offset), which the app reads to say the message was read.
|
||||
use serde_json::Value;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
/// The session's inbox, named as `raea show` names it (engine/cli/src/show.ts posterOf): the harness's name and the
|
||||
/// first eight of its session id.
|
||||
pub fn name(agent: &str, v: &Value) -> Option<String> {
|
||||
let session = v["session_id"].as_str().map(String::from).or_else(|| std::env::var("CLAUDE_CODE_SESSION_ID").ok()).filter(|s| !s.is_empty())?;
|
||||
let slug = match agent {
|
||||
"claude" => "claude-code",
|
||||
"codex" => "codex",
|
||||
"gemini" => "gemini",
|
||||
_ => return None,
|
||||
};
|
||||
// the id's word characters, dots and dashes, as posterOf's /[^\w.-]/ leaves them
|
||||
let id: String = session.chars().filter(|c| c.is_ascii_alphanumeric() || "_.-".contains(*c)).take(8).collect();
|
||||
Some(format!("{slug}-{id}"))
|
||||
}
|
||||
|
||||
/// $RAEA_INBOX_DIR, else ~/.raea/inbox
|
||||
pub fn dir() -> PathBuf {
|
||||
raea_io_home::env_path("RAEA_INBOX_DIR", ".raea/inbox")
|
||||
}
|
||||
|
||||
/// The lines added to the inbox since the last look, each read once: the cursor moves past them.
|
||||
pub fn unread(dir: &Path, inbox: &str) -> Vec<Value> {
|
||||
let file = dir.join(format!("{inbox}.jsonl"));
|
||||
let mark = dir.join(format!("{inbox}.read"));
|
||||
let Ok(all) = std::fs::read(&file) else { return vec![] };
|
||||
let from = std::fs::read_to_string(&mark).ok().and_then(|s| s.trim().parse::<usize>().ok()).unwrap_or(0).min(all.len());
|
||||
// only whole lines: one being written stays for the next look
|
||||
let Some(end) = all[from..].iter().rposition(|&b| b == b'\n').map(|i| from + i + 1) else { return vec![] };
|
||||
let lines = String::from_utf8_lossy(&all[from..end]).lines().filter_map(|l| serde_json::from_str(l).ok()).collect();
|
||||
let _ = std::fs::write(&mark, end.to_string());
|
||||
lines
|
||||
}
|
||||
|
||||
/// One line as the agent reads it: who it's on, what kind, the words.
|
||||
fn said(l: &Value) -> String {
|
||||
let s = |k: &str| l[k].as_str().unwrap_or("").trim().to_string();
|
||||
let on = if s("item").is_empty() { String::new() } else { format!(" on item {} \"{}\"", s("item"), s("title")) };
|
||||
let kind = s("kind");
|
||||
let text = s("text");
|
||||
let what = match kind.as_str() {
|
||||
"message" => format!("a message{}: {text}", if s("project").is_empty() { String::new() } else { format!(" (project {})", s("project")) }),
|
||||
"edits" => format!("edits{on}:\n{text}{}", if s("tasks").is_empty() { String::new() } else { format!("\n({})", s("tasks")) }),
|
||||
"note" => format!("a note{on}: {text}"),
|
||||
"answer" => format!("answers{on}: {text}"),
|
||||
"result" => format!("a result{on}: {text}"),
|
||||
"correction" => format!("a correction{on}: {text}"),
|
||||
"sign" => format!("a sign-off{on} (ask {})", l["ask"]),
|
||||
k => format!("{}{on}: {text}", if k.is_empty() { "something" } else { k }),
|
||||
};
|
||||
format!("- {what}")
|
||||
}
|
||||
|
||||
/// What the agent is told, or None when nothing's new.
|
||||
pub fn told(agent: &str, v: &Value) -> Option<String> {
|
||||
let inbox = name(agent, v)?;
|
||||
let lines = unread(&dir(), &inbox);
|
||||
if lines.is_empty() {
|
||||
return None;
|
||||
}
|
||||
let list = lines.iter().map(said).collect::<Vec<_>>().join("\n");
|
||||
Some(format!(
|
||||
"raea: the person just sent this from the raea app (your inbox, ~/.raea/inbox/{inbox}.jsonl; marked read, so the app shows it as read):\n{list}\nTake it up now, before going on: it may change what you're doing. What you say next shows under your session in their feed; answer an item with raea show --on ITEM --note LINE, or post the next version with raea show FILE --replaces ITEM."
|
||||
))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use serde_json::json;
|
||||
|
||||
#[test]
|
||||
fn each_line_is_handed_over_once_and_a_half_written_one_waits() {
|
||||
let d = std::env::temp_dir().join(format!("raea-inbox-{}", std::process::id()));
|
||||
let _ = std::fs::remove_dir_all(&d);
|
||||
std::fs::create_dir_all(&d).unwrap();
|
||||
let f = d.join("claude-code-abcd1234.jsonl");
|
||||
std::fs::write(&f, "{\"kind\":\"message\",\"text\":\"more epic\"}\n{\"kind\":\"no").unwrap();
|
||||
let first = unread(&d, "claude-code-abcd1234");
|
||||
assert_eq!(first.len(), 1);
|
||||
assert_eq!(said(&first[0]), "- a message: more epic");
|
||||
assert!(unread(&d, "claude-code-abcd1234").is_empty());
|
||||
std::fs::write(&f, "{\"kind\":\"message\",\"text\":\"more epic\"}\n{\"kind\":\"note\",\"item\":\"i-1\",\"title\":\"Board\",\"text\":\"hills taller\"}\n").unwrap();
|
||||
let next = unread(&d, "claude-code-abcd1234");
|
||||
assert_eq!(next.len(), 1);
|
||||
assert_eq!(said(&next[0]), "- a note on item i-1 \"Board\": hills taller");
|
||||
assert_eq!(std::fs::read_to_string(d.join("claude-code-abcd1234.read")).unwrap(), std::fs::metadata(&f).unwrap().len().to_string());
|
||||
let _ = std::fs::remove_dir_all(&d);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_inbox_is_named_as_raea_show_names_it() {
|
||||
assert_eq!(name("claude", &json!({"session_id": "15cd6bb0-8829-466f-a28a-bbca3d35be92"})).as_deref(), Some("claude-code-15cd6bb0"));
|
||||
assert_eq!(name("kimi", &json!({"session_id": "x"})), None);
|
||||
}
|
||||
}
|
||||
+15
-4
@@ -3,7 +3,8 @@
|
||||
//! --agent A` adds them, and they hold inside the raea app too, which leaves each agent its own shell). Before a shell
|
||||
//! command: media opened in the Mac's viewer or a browser is stopped once while the raea app is installed, the reason
|
||||
//! naming `raea show`; the same command tried again goes through, so an agent that means it says so twice. After a
|
||||
//! file is saved: the quick check on a composition. A stop is exit 2 with the reason on stderr, which every harness
|
||||
//! file is saved: the quick check on a composition. After any tool, and as a turn ends: what the person sent from the raea
|
||||
//! app (inbox.rs). A stop is exit 2 with the reason on stderr, which every harness
|
||||
//! hands its agent; the quick check's findings go back in the shape each one reads.
|
||||
use serde_json::{Value, json};
|
||||
use std::path::{Path, PathBuf};
|
||||
@@ -144,8 +145,16 @@ pub fn hook(args: &[String]) -> R<String> {
|
||||
std::io::Read::read_to_string(&mut std::io::stdin(), &mut input).map_err(|e| e.to_string())?;
|
||||
let v: Value = serde_json::from_str(&input).unwrap_or_default();
|
||||
let agent = named.unwrap_or_else(|| agent_of(&v));
|
||||
if let Some(cmd) = shell_command(&v) {
|
||||
let home = std::env::var("HOME").unwrap_or_default();
|
||||
let event = v["hook_event_name"].as_str().unwrap_or("");
|
||||
// what the person sent from the raea app since the last look (inbox.rs): handed over after any tool, and a turn about
|
||||
// to end goes on to take it up
|
||||
let sent = if matches!(event, "PostToolUse" | "AfterTool" | "Stop") { crate::inbox::told(agent, &v) } else { None };
|
||||
if event == "Stop" {
|
||||
return Ok(sent.map(|s| json!({"decision": "block", "reason": s}).to_string()).unwrap_or_default());
|
||||
}
|
||||
let after_tool = matches!(event, "PostToolUse" | "AfterTool");
|
||||
if let Some(cmd) = shell_command(&v).filter(|_| !after_tool) {
|
||||
let home = raea_io_home::user_home().unwrap_or_default().display().to_string();
|
||||
let files = opened_media(cmd);
|
||||
let key = format!("{}\n{}\n{cmd}", v["session_id"].as_str().unwrap_or(""), v["cwd"].as_str().unwrap_or(""));
|
||||
if !files.is_empty() && app_installed(&home) && !tried_before(&PathBuf::from(&home).join(".raea/hooks/again"), &key) {
|
||||
@@ -159,7 +168,9 @@ pub fn hook(args: &[String]) -> R<String> {
|
||||
let (report, _) = crate::quick::quick(std::slice::from_ref(path), Vec::new())?;
|
||||
found.extend(report.lines().skip(1).filter(|l| !l.starts_with("ok ")).map(String::from));
|
||||
}
|
||||
Ok(if found.is_empty() { String::new() } else { after(agent, &format!("raea check --quick after this save:\n{}", found.join("\n"))) })
|
||||
let quick = (!found.is_empty()).then(|| format!("raea check --quick after this save:\n{}", found.join("\n")));
|
||||
let text = [sent, quick].into_iter().flatten().collect::<Vec<_>>().join("\n\n");
|
||||
Ok(if text.is_empty() { String::new() } else { after(agent, &text) })
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -26,6 +26,7 @@ mod text;
|
||||
use text::*;
|
||||
pub mod quick;
|
||||
pub mod hook;
|
||||
pub use raea_app_check_inbox as inbox;
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ pub(crate) struct Run {
|
||||
pub(crate) fn brand_kit(near: &[&str], issues: &mut Vec<Issue>, passed: &mut Vec<String>) {
|
||||
let mut seen = std::collections::HashSet::new();
|
||||
for start in near.iter().filter(|p| !p.is_empty()) {
|
||||
let abs = std::path::Path::new(start).canonicalize().unwrap_or_else(|_| std::path::PathBuf::from(start));
|
||||
let abs = dunce::canonicalize(&std::path::Path::new(start)).unwrap_or_else(|_| std::path::PathBuf::from(start));
|
||||
let mut d = abs.parent();
|
||||
for _ in 0..5 {
|
||||
let Some(here) = d else { break };
|
||||
|
||||
@@ -7,6 +7,8 @@ publish = false
|
||||
description = "How raea takes direction (docs/direction.feature): `raea world`, a composition's frame as one world of facts, queried across media"
|
||||
|
||||
[dependencies]
|
||||
dunce = "1"
|
||||
raea-io-home = { path = "../../io/home" }
|
||||
raea-runtime-world = { path = "../../runtime/world" }
|
||||
raea-runtime-bundle = { path = "../../runtime/bundle" }
|
||||
raea-core-facts = { path = "../../core/facts" }
|
||||
|
||||
@@ -32,7 +32,7 @@ pub struct Host {
|
||||
|
||||
/// The person's taste folder: RAEA_TASTE, else ~/.raea/taste.
|
||||
pub fn taste_dir() -> Option<PathBuf> {
|
||||
std::env::var_os("RAEA_TASTE").map(PathBuf::from).or_else(|| std::env::var_os("HOME").map(|h| PathBuf::from(h).join(".raea/taste")))
|
||||
std::env::var_os("RAEA_TASTE").map(PathBuf::from).or_else(|| raea_io_home::user_home().map(|h| h.join(".raea/taste")))
|
||||
}
|
||||
|
||||
/// The .ts files `--taste` names: the file, or every .ts in the folder. A file named under the person's taste folder
|
||||
@@ -133,12 +133,12 @@ fn held(project: &Path, given: Vec<PathBuf>, host: &Host) -> (Vec<Rule>, Vec<Fin
|
||||
/// The compositions `target` names: each (its file, its id when the file registers several).
|
||||
fn compositions(target: &Path, args: &[String]) -> R<Vec<(PathBuf, Option<String>)>> {
|
||||
let one = flag(args, "--composition");
|
||||
let (dir, file) = if target.is_dir() { (target.to_path_buf(), None) } else { (target.parent().unwrap_or(Path::new(".")).to_path_buf(), Some(target.canonicalize().map_err(|e| format!("{}: {e}", target.display()))?)) };
|
||||
let (dir, file) = if target.is_dir() { (target.to_path_buf(), None) } else { (target.parent().unwrap_or(Path::new(".")).to_path_buf(), Some(dunce::canonicalize(&target).map_err(|e| format!("{}: {e}", target.display()))?)) };
|
||||
let reg = raea_app_registry::scan(&dir, &[]);
|
||||
let mut out: Vec<(PathBuf, Option<String>)> = Vec::new();
|
||||
for c in ®.compositions {
|
||||
let path = reg.dir.join(&c.file);
|
||||
let path = path.canonicalize().unwrap_or(path);
|
||||
let path = dunce::canonicalize(&path).unwrap_or(path);
|
||||
let id = (c.how == raea_app_registry::How::Registered).then(|| c.id.clone());
|
||||
if file.as_ref().is_none_or(|f| *f == path) && one.as_ref().is_none_or(|o| Some(o) == id.as_ref()) {
|
||||
out.push((path, id));
|
||||
@@ -325,7 +325,7 @@ pub fn check(args: &[String], host: &Host) -> R<(String, bool)> {
|
||||
let target = raea_app_check::words(args, &TAKES).first().map_or_else(|| PathBuf::from("."), PathBuf::from);
|
||||
// the folder it is in, made whole (`lyric.tsx`'s is the empty path): a rule's check is a path from it
|
||||
let here = if target.is_dir() { target.clone() } else { target.parent().filter(|p| !p.as_os_str().is_empty()).map_or_else(|| PathBuf::from("."), Path::to_path_buf) };
|
||||
let here = here.canonicalize().map_err(|e| format!("{}: {e}", here.display()))?;
|
||||
let here = dunce::canonicalize(&here).map_err(|e| format!("{}: {e}", here.display()))?;
|
||||
let project = record::up(&here, ".raea/project").unwrap_or(here);
|
||||
let (mut rules, unread, notes) = rules(&project, taste_files(args), host);
|
||||
if let Some(only) = flag(args, "--only") {
|
||||
|
||||
@@ -84,7 +84,7 @@ pub fn cli(args: &[String]) -> Result<String, String> {
|
||||
}
|
||||
let target = args.get(1).filter(|a| !a.starts_with("--")).map_or_else(|| PathBuf::from("."), PathBuf::from);
|
||||
// made absolute first: a bare name's parent is "", which names no folder
|
||||
let from = if target.is_file() { target.canonicalize().unwrap_or_else(|_| target.clone()).parent().map_or_else(|| PathBuf::from("."), Path::to_path_buf) } else { target.clone() };
|
||||
let from = if target.is_file() { dunce::canonicalize(&target).unwrap_or_else(|_| target.clone()).parent().map_or_else(|| PathBuf::from("."), Path::to_path_buf) } else { target.clone() };
|
||||
let project = record::up(&from, ".raea/project").ok_or_else(|| format!("raea findings: {} isn't in a raea project (no .raea/project at or above it), so nothing is recorded\n{USAGE}", target.display()))?;
|
||||
let (about, check, since) = (flag(args, "--about"), flag(args, "--check"), flag(args, "--since"));
|
||||
let keep = |f: &Finding| about.as_deref().is_none_or(|n| f.about.iter().any(|a| a.name == n || a.key.as_deref() == Some(n))) && check.as_deref().is_none_or(|c| f.check == c);
|
||||
|
||||
@@ -69,7 +69,7 @@ pub fn run(files: &[PathBuf], plan: &[Planned], worlds: &[Facts], host: &Host) -
|
||||
std::fs::create_dir_all(&work).map_err(|e| e.to_string())?;
|
||||
let data = work.join("worlds.json");
|
||||
std::fs::write(&data, serde_json::to_string(worlds).map_err(|e| e.to_string())?).map_err(|e| e.to_string())?;
|
||||
let imports: String = files.iter().enumerate().map(|(i, f)| format!("import c{i} from {:?};\n", f.canonicalize().unwrap_or_else(|_| f.clone()).display().to_string())).collect();
|
||||
let imports: String = files.iter().enumerate().map(|(i, f)| format!("import c{i} from {:?};\n", dunce::canonicalize(&f).unwrap_or_else(|_| f.clone()).display().to_string())).collect();
|
||||
let checks = (0..files.len()).map(|i| format!("c{i}")).collect::<Vec<_>>().join(", ");
|
||||
let planned: Vec<Value> = plan.iter().map(|p| json!({"check": p.check, "frames": p.frames, "values": p.values, "level": p.level, "by": p.by})).collect();
|
||||
let entry = format!(
|
||||
|
||||
@@ -47,7 +47,7 @@ pub(crate) fn spec(p: &Path) -> String {
|
||||
}
|
||||
|
||||
pub fn run(args: &[String]) -> R<String> {
|
||||
let ts = PathBuf::from(&args[2]).canonicalize().map_err(|e| format!("{}: {e}", args[2]))?;
|
||||
let ts = dunce::canonicalize(&PathBuf::from(&args[2])).map_err(|e| format!("{}: {e}", args[2]))?;
|
||||
let file = args.get(3).filter(|a| a.ends_with(".blend")).map(PathBuf::from);
|
||||
// ARGS for Blender's sys.argv, without raea's own --timeout SECS
|
||||
let mut rest = args[if file.is_some() { 4 } else { 3 }..].to_vec();
|
||||
|
||||
@@ -197,7 +197,7 @@ pub fn setup(args: &[String]) -> R<String> {
|
||||
/// The project folder: DIR, else the current folder; it needs its project.godot.
|
||||
fn project(arg: Option<&String>) -> R<PathBuf> {
|
||||
let dir = arg.map(PathBuf::from).unwrap_or_else(|| PathBuf::from("."));
|
||||
let dir = dir.canonicalize().map_err(|e| format!("{}: {e}", dir.display()))?;
|
||||
let dir = dunce::canonicalize(&dir).map_err(|e| format!("{}: {e}", dir.display()))?;
|
||||
if !dir.join("project.godot").is_file() {
|
||||
return Err(format!("{} has no project.godot", dir.display()));
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ fn opts(args: &[String]) -> R<Opts> {
|
||||
let script = args.get(2).ok_or("raea godot run SCRIPT.ts [--project DIR] [--window] [--movie FILE [--fps N] [--frames N]] [--scene res://X.tscn] [--size WxH] [--timeout S] [ARGS...]")?;
|
||||
// no script, only flags: the project's --scene plays with nothing of yours added (sdk/godot/src/host/none.ts)
|
||||
let bare = script.starts_with("--");
|
||||
let script = if bare { raea_io_home::home().join("sdk/godot/src/host/none.ts") } else { PathBuf::from(script).canonicalize().map_err(|e| format!("{script}: {e}"))? };
|
||||
let script = if bare { raea_io_home::home().join("sdk/godot/src/host/none.ts") } else { dunce::canonicalize(&PathBuf::from(script)).map_err(|e| format!("{script}: {e}"))? };
|
||||
let mut o = Opts { script, project: None, window: false, timeout: 3600.0, movie: None, fps: 30, size: None, frames: None, scene: None, rest: Vec::new() };
|
||||
let mut it = args[if bare { 2 } else { 3 }..].iter();
|
||||
while let Some(a) = it.next() {
|
||||
@@ -176,7 +176,7 @@ pub fn run(args: &[String]) -> R<String> {
|
||||
}
|
||||
// the project: --project, the nearest project.godot above the script, else an empty one for this run
|
||||
let found = match &o.project {
|
||||
Some(p) => Some(p.canonicalize().map_err(|e| format!("{}: {e}", p.display()))?),
|
||||
Some(p) => Some(dunce::canonicalize(&p).map_err(|e| format!("{}: {e}", p.display()))?),
|
||||
None => nearest_project(o.script.parent().unwrap_or(Path::new("."))),
|
||||
};
|
||||
let temp = std::env::temp_dir().join(format!("raea-godot-{}", std::process::id()));
|
||||
|
||||
@@ -69,7 +69,7 @@ pub fn godot_export(args: &[String]) -> R<String> {
|
||||
}
|
||||
|
||||
pub fn godot_back(args: &[String]) -> R<String> {
|
||||
let dir = PathBuf::from(args.get(2).ok_or(USAGE)?).canonicalize().map_err(|e| format!("{}: {e}", args[2]))?;
|
||||
let dir = dunce::canonicalize(&PathBuf::from(args.get(2).ok_or(USAGE)?)).map_err(|e| format!("{}: {e}", args[2]))?;
|
||||
let media = media_of(&dir)?;
|
||||
let now = dir.join(".raea-now.json");
|
||||
let script = raea_io_home::home().join("sdk/godot/src/host/back.ts");
|
||||
@@ -129,7 +129,7 @@ pub fn blender_open(args: &[String]) -> R<String> {
|
||||
}
|
||||
|
||||
pub fn blender_back(args: &[String]) -> R<String> {
|
||||
let blend = PathBuf::from(args.get(2).filter(|a| a.ends_with(".blend")).ok_or(USAGE)?).canonicalize().map_err(|e| format!("{}: {e}", args[2]))?;
|
||||
let blend = dunce::canonicalize(&PathBuf::from(args.get(2).filter(|a| a.ends_with(".blend")).ok_or(USAGE)?)).map_err(|e| format!("{}: {e}", args[2]))?;
|
||||
let dir = blend.parent().ok_or("the .blend's folder")?.to_path_buf();
|
||||
if !dir.join("scene.json").is_file() {
|
||||
return Err(format!("{} has no scene.json beside it: raea blender back reads a .blend raea blender open made", blend.display()));
|
||||
|
||||
@@ -113,7 +113,7 @@ pub fn blender(args: &[String]) -> R<String> {
|
||||
let entry = if is_blend {
|
||||
format!("{shoot}Promise.resolve().then(() => shoot({opts})){}\n", blender_ts::CLOSE)
|
||||
} else {
|
||||
let ts = src.canonicalize().map_err(|e| format!("{}: {e}", s.src))?;
|
||||
let ts = dunce::canonicalize(&src).map_err(|e| format!("{}: {e}", s.src))?;
|
||||
format!("import * as M from {};\n{shoot}{}.then(() => shoot({opts})){}\n", blender_ts::spec(&ts), blender_ts::DEFAULT, blender_ts::CLOSE)
|
||||
};
|
||||
let mut rest = s.rest.clone();
|
||||
|
||||
@@ -7,6 +7,8 @@ publish = false
|
||||
description = "`raea fingerprint` (docs/fingerprint.feature FP3a): new, bootstrap, teach, score and report, run by a resident service on localhost that keeps the encoders loaded"
|
||||
|
||||
[dependencies]
|
||||
dunce = "1"
|
||||
raea-io-home = { path = "../../io/home" }
|
||||
# the taxonomy, evidence and heads
|
||||
raea-sys-fingerprint = { path = "../../systems/fingerprint" }
|
||||
# scoring and the sheet, which one judges a piece, diff and profiles
|
||||
|
||||
@@ -65,6 +65,7 @@ pub(crate) fn approve(enc: &mut Encoders, dir: &Folder, fp: &Fingerprint, args:
|
||||
words: None,
|
||||
at: 0,
|
||||
pin: None,
|
||||
band: None,
|
||||
};
|
||||
l.push(row, &features(&c, *a, *b));
|
||||
}
|
||||
|
||||
@@ -156,6 +156,7 @@ pub fn rows(enc: &mut Encoders, who: &str, files: &[PathBuf], per: usize, l: &mu
|
||||
words: None,
|
||||
at: 0,
|
||||
pin: None,
|
||||
band: None,
|
||||
};
|
||||
l.push(r, &features(c, 0.0, WIN));
|
||||
};
|
||||
|
||||
@@ -65,7 +65,7 @@ mod tests {
|
||||
use super::*;
|
||||
|
||||
fn row(axis: &str, source: &str) -> Row {
|
||||
Row { media: "m".into(), a: 0.0, b: 2.0, axis: axis.into(), bad: true, weight: 1.0, who: "me".into(), source: source.into(), project: "p".into(), kind: None, region: None, words: None, at: 0, pin: None }
|
||||
Row { media: "m".into(), a: 0.0, b: 2.0, axis: axis.into(), bad: true, weight: 1.0, who: "me".into(), source: source.into(), project: "p".into(), kind: None, region: None, words: None, at: 0, pin: None, band: None }
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -12,49 +12,18 @@
|
||||
use crate::{flag, has, words};
|
||||
use raea_sys_fingerprint::folder::Folder;
|
||||
use raea_sys_fingerprint::taxonomy::Fingerprint;
|
||||
use serde::{Deserialize, Serialize};
|
||||
pub use raea_sys_fingerprint_use::reading::{Reading, agreement, earned};
|
||||
use raea_sys_fingerprint_use::reading::span;
|
||||
use serde_json::{Value, json};
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
/// FP5b's bar, out of every 50 checked
|
||||
pub const KIND_BAR: f64 = 45.0 / 50.0;
|
||||
pub const AXIS_BAR: f64 = 40.0 / 50.0;
|
||||
pub const INBOX: &str = "fingerprint";
|
||||
|
||||
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
|
||||
pub struct Reading {
|
||||
pub note: String,
|
||||
pub text: String,
|
||||
pub who: String,
|
||||
pub media: PathBuf,
|
||||
pub t: f64,
|
||||
pub project: String,
|
||||
/// defect, direction, praise or both
|
||||
pub kind: String,
|
||||
pub axis: Option<String>,
|
||||
/// how it was read: kimi or claude
|
||||
pub by: String,
|
||||
/// the person's check: Some(true) agreed, Some(false) not; None until asked
|
||||
#[serde(default)]
|
||||
pub kind_ok: Option<bool>,
|
||||
#[serde(default)]
|
||||
pub axis_ok: Option<bool>,
|
||||
/// a span pin's end: the label covers t..to (FP11b)
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub to: Option<f64>,
|
||||
/// where in the frame the note's marks say the thing is, x0,y0,x1,y1 in 0-1 (FP11b)
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub region: Option<[f32; 4]>,
|
||||
/// the layers under the pin's x,y in the layer pass, on a render with one (FP5a)
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
pub layers: Vec<String>,
|
||||
}
|
||||
|
||||
|
||||
/// A post's video on this machine: the renders library, else the project's own folder
|
||||
fn media(project: &Path, m: &Value) -> Option<PathBuf> {
|
||||
let p = m["path"].as_str()?;
|
||||
let home = PathBuf::from(std::env::var("HOME").unwrap_or_default());
|
||||
let home = raea_io_home::user_home().unwrap_or_default();
|
||||
[home.join(".raea/feed/media").join(p), project.join(p)].into_iter().find(|f| f.is_file())
|
||||
}
|
||||
|
||||
@@ -88,7 +57,7 @@ pub fn pinned(project: &Path) -> Vec<Reading> {
|
||||
let to = n["pin"]["to"].as_f64().filter(|&to| to > t);
|
||||
let at = n["pin"]["x"].as_f64().zip(n["pin"]["y"].as_f64()).map(|(x, y)| [x - 0.01, y - 0.01, x + 0.01, y + 0.01].map(|v| v.clamp(0.0, 1.0)));
|
||||
let layers = at.map(|b| raea_sys_fingerprint_things::located::layers(&video, t, b)).unwrap_or_default();
|
||||
out.push(Reading { note: n["id"].as_str().unwrap_or("").into(), text: text.into(), who: n["author"]["name"].as_str().unwrap_or("me").into(), media: video.clone(), t, project: name.clone(), to, region: raea_sys_fingerprint_use::grow::marked(&n["pin"]), layers, ..Default::default() });
|
||||
out.push(Reading { note: n["id"].as_str().unwrap_or("").into(), text: text.into(), who: n["author"]["name"].as_str().unwrap_or("me").into(), media: video.clone(), t, project: name.clone(), to, region: raea_sys_fingerprint_use::grow::marked(&n["pin"]), layers, band: raea_sys_fingerprint_use::grow::sound_band(&n["pin"]), ..Default::default() });
|
||||
}
|
||||
}
|
||||
out
|
||||
@@ -201,18 +170,6 @@ pub(crate) fn read_here(args: &[String], cwd: &Path) -> i32 {
|
||||
}
|
||||
}
|
||||
|
||||
/// The share of checked readings the person agreed with, for kind and for axis, and how many were checked
|
||||
pub fn agreement(r: &[Reading]) -> (Option<f64>, Option<f64>, usize) {
|
||||
let share = |v: Vec<bool>| (!v.is_empty()).then(|| v.iter().filter(|x| **x).count() as f64 / v.len() as f64);
|
||||
let checked = r.iter().filter(|x| x.kind_ok.is_some()).count();
|
||||
(share(r.iter().filter_map(|x| x.kind_ok).collect()), share(r.iter().filter_map(|x| x.axis_ok).collect()), checked)
|
||||
}
|
||||
|
||||
/// Whether the readings have earned training (FP5b): 50 checked, the kind right 45 times and the axis 40
|
||||
pub fn earned(r: &[Reading]) -> bool {
|
||||
matches!(agreement(r), (Some(k), Some(a), n) if n >= 50 && k >= KIND_BAR && a >= AXIS_BAR)
|
||||
}
|
||||
|
||||
/// The choices a reading is checked with, and what each says about kind and axis
|
||||
pub const CHOICES: [(&str, bool, bool); 4] = [("Right", true, true), ("Right kind, wrong axis", true, false), ("Wrong kind", false, false), ("Right axis, wrong kind", false, true)];
|
||||
|
||||
@@ -251,7 +208,7 @@ pub(crate) fn readings_here(args: &[String], cwd: &Path) -> i32 {
|
||||
}
|
||||
if has(args, "--tally") {
|
||||
let asked: serde_json::Map<String, Value> = std::fs::read(dir.dir.join("asked.json")).ok().and_then(|b| serde_json::from_slice(&b).ok()).unwrap_or_default();
|
||||
let inbox = PathBuf::from(std::env::var("HOME").unwrap_or_default()).join(format!(".raea/inbox/{INBOX}.jsonl"));
|
||||
let inbox = raea_io_home::user_home().unwrap_or_default().join(format!(".raea/inbox/{INBOX}.jsonl"));
|
||||
for line in std::fs::read_to_string(inbox).unwrap_or_default().lines() {
|
||||
let Ok(v) = serde_json::from_str::<Value>(line) else { continue };
|
||||
let Some(batch) = v["item"].as_str().and_then(|i| asked.get(i)).and_then(Value::as_array) else { continue };
|
||||
@@ -296,8 +253,9 @@ pub(crate) fn learn(enc: &mut raea_sys_columns::Encoders, dir: &Folder, l: &mut
|
||||
(None, true) => continue,
|
||||
};
|
||||
let c = enc.columns(&x.media)?;
|
||||
// a span is the label's time; a moment, 1.5 s before the pin to 0.5 s after (FP11b)
|
||||
let (a, b) = x.to.map_or(((x.t - 1.5).max(0.0), (x.t + 0.5).min(c.dur)), |to| (x.t.max(0.0), to.min(c.dur)));
|
||||
// a span is the label's time (a scene's, a box's on the sound: FP11c), half a second at least; a moment, 1.5 s
|
||||
// before the pin to 0.5 s after (FP11b)
|
||||
let (a, b) = x.to.map_or(((x.t - 1.5).max(0.0), (x.t + 0.5).min(c.dur)), |to| span(x.t, to, c.dur));
|
||||
if b - a < 0.5 {
|
||||
continue;
|
||||
}
|
||||
@@ -307,7 +265,9 @@ pub(crate) fn learn(enc: &mut raea_sys_columns::Encoders, dir: &Folder, l: &mut
|
||||
let shot = seed.and_then(|s| raea_sys_fingerprint_use::grow::through(&x.media, x.t, c.dur, s, 2.0).ok().flatten()).filter(|w| !w.is_empty());
|
||||
for (a, b, region) in shot.map_or_else(|| vec![(a, b, seed)], |w| w.into_iter().map(|(a, b, r)| (a, b, Some(r))).collect()) {
|
||||
let (media, axis, who, project, kind, words) = (c.media.clone(), axis.clone(), x.who.clone(), x.project.clone(), Some(x.note.clone()), Some(x.text.clone()));
|
||||
let row = raea_sys_fingerprint::evidence::Row { media, a, b, axis, bad, weight: 1.0, who, source: "note".into(), project, kind, region, words, at: 0, pin: None };
|
||||
// a defect's box on the sound keeps its pitch band (FP11c)
|
||||
let band = x.band.filter(|_| bad);
|
||||
let row = raea_sys_fingerprint::evidence::Row { media, a, b, axis, bad, weight: 1.0, who, source: "note".into(), project, kind, region, words, at: 0, pin: None, band };
|
||||
l.push(row, &raea_sys_fingerprint::evidence::features(&c, a, b));
|
||||
}
|
||||
made += 1;
|
||||
@@ -334,13 +294,15 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn notes_train_only_once_the_person_agrees_enough() {
|
||||
let r = |k: bool, a: bool| Reading { kind_ok: Some(k), axis_ok: Some(a), ..Default::default() };
|
||||
let mut v: Vec<Reading> = (0..45).map(|_| r(true, true)).collect();
|
||||
v.extend((0..5).map(|_| r(false, false)));
|
||||
assert!(earned(&v), "45 and 45 of 50");
|
||||
v[0] = r(false, true);
|
||||
assert!(!earned(&v), "44 kinds of 50 is under the bar");
|
||||
assert!(!earned(&v[..40]), "fewer than 50 checked");
|
||||
fn a_box_on_the_sound_is_a_reading_s_span_and_band_not_a_region() {
|
||||
let dir = std::env::temp_dir().join(format!("fp11c-{}", std::process::id()));
|
||||
std::fs::create_dir_all(dir.join(".raea/feed")).unwrap();
|
||||
std::fs::write(dir.join("a.mp4"), b"").unwrap();
|
||||
let note = json!({"id": "n1", "text": "that hiss", "author": {"kind": "person", "name": "me"}, "pin": {"kind": "time", "t": 2.0, "to": 4.0, "marks": [{"kind": "box", "on": "sound", "points": [[0.2, 0.9], [0.4, 0.6]]}]}});
|
||||
std::fs::write(dir.join(".raea/feed/p.json"), json!({"media": [{"kind": "video", "path": "a.mp4"}], "notes": [note]}).to_string()).unwrap();
|
||||
let r = pinned(&dir);
|
||||
std::fs::remove_dir_all(&dir).ok();
|
||||
assert_eq!(r.len(), 1);
|
||||
assert_eq!((r[0].t, r[0].to, r[0].band, r[0].region), (2.0, Some(4.0), Some([0.6, 0.9]), None));
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ use raea_sys_fingerprint::pairs::difference;
|
||||
use std::path::Path;
|
||||
|
||||
fn row(media: &str, a: f64, b: f64, axis: &str, weight: f32, who: &str, project: String, words: Option<String>) -> Row {
|
||||
Row { media: media.into(), a, b, axis: axis.into(), bad: true, weight, who: who.into(), source: "pair".into(), project, kind: None, region: None, words, at: 0, pin: None }
|
||||
Row { media: media.into(), a, b, axis: axis.into(), bad: true, weight, who: who.into(), source: "pair".into(), project, kind: None, region: None, words, at: 0, pin: None, band: None }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ use raea_sys_fingerprint::evidence::{Row, features};
|
||||
use raea_sys_fingerprint::retrain;
|
||||
use raea_sys_fingerprint_use::postmortem::{self as pm, MOST};
|
||||
use raea_sys_fingerprint_use::score::{Scored, score};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::path::Path;
|
||||
|
||||
pub(crate) fn run(enc: &mut Encoders, args: &[String], cwd: &Path, eval: Eval) -> Result<(String, i32)> {
|
||||
let project = crate::pick::piece_in(args, cwd).parent().map(Path::to_path_buf).unwrap_or_else(|| cwd.to_path_buf());
|
||||
@@ -18,7 +18,7 @@ pub(crate) fn run(enc: &mut Encoders, args: &[String], cwd: &Path, eval: Eval) -
|
||||
let (dir, fp, w) = crate::verbs::open(enc, args, eval, Some(&crate::pick::piece_in(args, cwd)))?;
|
||||
let before = dir.trained()?.map(|t| t.0).ok_or_else(|| anyhow!("{} has no trained heads yet: `raea fingerprint bootstrap` or teach it first", fp.name))?;
|
||||
if has(args, "--tally") {
|
||||
let inbox = std::fs::read_to_string(PathBuf::from(std::env::var("HOME").unwrap_or_default()).join(format!(".raea/inbox/{}.jsonl", pm::INBOX))).unwrap_or_default();
|
||||
let inbox = std::fs::read_to_string(raea_io_home::user_home().unwrap_or_default().join(format!(".raea/inbox/{}.jsonl", pm::INBOX))).unwrap_or_default();
|
||||
let answers = pm::answered(&dir.dir, &inbox);
|
||||
let mut l = dir.ledger()?;
|
||||
// every tally adds every answer again, so tallying twice is safe
|
||||
@@ -30,7 +30,7 @@ pub(crate) fn run(enc: &mut Encoders, args: &[String], cwd: &Path, eval: Eval) -
|
||||
continue;
|
||||
}
|
||||
let who = fp.who.clone().unwrap_or_else(|| "me".into());
|
||||
let row = Row { media: c.media.clone(), a, b, axis: x.axis.clone(), bad: *yes, weight: 1.0, who, source: "postmortem".into(), project: name.clone(), kind: None, region: None, words: Some(x.words.clone()), at: 0, pin: None };
|
||||
let row = Row { media: c.media.clone(), a, b, axis: x.axis.clone(), bad: *yes, weight: 1.0, who, source: "postmortem".into(), project: name.clone(), kind: None, region: None, words: Some(x.words.clone()), at: 0, pin: None, band: None };
|
||||
l.push(row, &features(&c, a, b));
|
||||
}
|
||||
dir.write_ledger(&l)?;
|
||||
|
||||
@@ -12,10 +12,10 @@ use std::path::{Path, PathBuf};
|
||||
pub(crate) fn run(enc: &mut Encoders, args: &[String], cwd: &Path) -> Result<(String, i32)> {
|
||||
let file = cwd.join(args.first().filter(|a| !a.starts_with("--")).ok_or_else(|| anyhow::anyhow!("things FILE"))?);
|
||||
let project = flag(args, "--project").map_or_else(|| cwd.to_path_buf(), |p| cwd.join(p));
|
||||
let me = file.canonicalize().ok();
|
||||
let me = dunce::canonicalize(&file).ok();
|
||||
let marks: Vec<Mark> = crate::notes::pinned(&project)
|
||||
.into_iter()
|
||||
.filter(|r| r.media.canonicalize().ok() == me)
|
||||
.filter(|r| dunce::canonicalize(&r.media).ok() == me)
|
||||
.filter_map(|r| Some(Mark { name: r.text.chars().take(40).collect(), t: r.t, a: (r.t - 1.0).max(0.0), b: r.to.unwrap_or(r.t + 1.0), region: r.region? }))
|
||||
.collect();
|
||||
let t = things(enc, &file, &marks)?;
|
||||
|
||||
@@ -252,6 +252,7 @@ fn teach(enc: &mut Encoders, args: &[String], cwd: &Path, eval: Eval) -> Result<
|
||||
words: flag(args, "--words").map(str::to_string),
|
||||
at: 0,
|
||||
pin: None,
|
||||
band: None,
|
||||
};
|
||||
let mut l = dir.ledger()?;
|
||||
l.push(row, &features(&c, a, b));
|
||||
|
||||
@@ -19,6 +19,7 @@ player = []
|
||||
surfaces = ["raea-runtime-react/surfaces"]
|
||||
|
||||
[dependencies]
|
||||
dunce = "1"
|
||||
raea-runtime-react = { path = "../../runtime/react", default-features = false }
|
||||
raea-runtime-page = { path = "../../runtime/page" }
|
||||
raea-runtime-export = { path = "../../runtime/export" }
|
||||
|
||||
+7
-13
@@ -14,7 +14,7 @@ pub(crate) fn keep_dsym(player: &Path) {
|
||||
let Ok(o) = std::process::Command::new("dwarfdump").arg("--uuid").arg(&dsym).output() else { return };
|
||||
let text = String::from_utf8_lossy(&o.stdout);
|
||||
let Some(uuid) = text.split_whitespace().nth(1).filter(|u| u.len() == 36) else { return };
|
||||
let Some(home) = std::env::var_os("HOME") else { return };
|
||||
let Some(home) = raea_io_home::user_home() else { return };
|
||||
let to = Path::new(&home).join("Library/Caches/raea/dsym").join(uuid).join("raea-game.dSYM");
|
||||
if to.exists() {
|
||||
return;
|
||||
@@ -34,7 +34,7 @@ pub const USAGE: &str = "raea export-game EDIT.tsx -o OUT [--target mac-app|mac-
|
||||
pub fn export(args: &[String]) -> R<String> {
|
||||
let usage = USAGE;
|
||||
let tsx = PathBuf::from(args.get(1).filter(|a| !a.starts_with("--")).ok_or(usage)?);
|
||||
let tsx = tsx.canonicalize().map_err(|e| format!("{}: {e}", tsx.display()))?;
|
||||
let tsx = dunce::canonicalize(&tsx).map_err(|e| format!("{}: {e}", tsx.display()))?;
|
||||
let dir = tsx.parent().unwrap().to_path_buf();
|
||||
let out = PathBuf::from(flag(args, "-o").ok_or(usage)?);
|
||||
let target = flag(args, "--target").unwrap_or_else(|| if out.extension().is_some_and(|x| x == "app") { "mac-app".into() } else { "mac-cli".into() });
|
||||
@@ -88,7 +88,10 @@ pub fn export(args: &[String]) -> R<String> {
|
||||
opts.push(p.display().to_string());
|
||||
}
|
||||
}
|
||||
opts.push("--lite".into());
|
||||
// on live play's runtime, or React for an edit drawing R3F (raea_runtime_live::needs_react)
|
||||
if !raea_runtime_live::needs_react(&dir) {
|
||||
opts.push("--lite".into());
|
||||
}
|
||||
let js = game.join("bundle.js");
|
||||
raea_runtime_react::scene::bundle_composition(&tsx, &js, &raea_runtime_react::scene::comp_opts(&opts)?, Some(&game))?;
|
||||
|
||||
@@ -98,10 +101,7 @@ pub fn export(args: &[String]) -> R<String> {
|
||||
gather(&mut bundle, &dir, &game, &mut got)?;
|
||||
std::fs::write(&js, &bundle).map_err(|e| e.to_string())?;
|
||||
|
||||
// an app screen needs a player with the surface runtime (the `surfaces` feature), which the size-built one leaves out
|
||||
if got.files.iter().any(|(rel, _)| rel.ends_with(raea_runtime_page::screen::BUNDLED)) && !player_has_surfaces(&player)? {
|
||||
return Err(format!("this game has an app screen (<Screen app>), and the player {} can't run one: build it with them (cargo build --profile game -p raea-app-game --bin raea-game --features player,surfaces) and export again", player.display()));
|
||||
}
|
||||
// an app screen (<Screen app>) draws on the player's own Blitz page (raea-runtime-appscreen): every player has one
|
||||
|
||||
// 3. what play works out at open, worked out now from the package itself (so the package is known to load)
|
||||
let src = std::fs::read_to_string(&tsx).unwrap_or_default();
|
||||
@@ -252,12 +252,6 @@ pub(crate) fn imported(dir: &Path, file: &Path) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
/// Whether the player at `bin` was built with the surface runtime (app screens): its shim's text is in it.
|
||||
pub(crate) fn player_has_surfaces(bin: &Path) -> R<bool> {
|
||||
let bytes = std::fs::read(bin).map_err(|e| format!("{}: {e}", bin.display()))?;
|
||||
Ok(bytes.windows(14).any(|w| w == b"__surfaceFrame"))
|
||||
}
|
||||
|
||||
pub(crate) fn default_name(tsx: &Path) -> String {
|
||||
let stem = tsx.file_stem().map(|s| s.to_string_lossy().to_string()).unwrap_or_default();
|
||||
let base = if stem == "edit" { tsx.parent().and_then(|p| p.file_name()).map(|s| s.to_string_lossy().to_string()).unwrap_or(stem) } else { stem };
|
||||
|
||||
+15
-7
@@ -85,7 +85,7 @@ pub(crate) fn gather(bundle: &mut String, dir: &Path, game: &Path, got: &mut Gat
|
||||
}
|
||||
}
|
||||
}
|
||||
let inside = |p: &Path| -> Option<String> { p.canonicalize().ok().and_then(|c| c.strip_prefix(dir.canonicalize().ok()?).ok().map(|r| r.to_string_lossy().to_string())) };
|
||||
let inside = |p: &Path| -> Option<String> { dunce::canonicalize(&p).ok().and_then(|c| c.strip_prefix(dunce::canonicalize(&dir).ok()?).ok().map(|r| r.to_string_lossy().to_string())) };
|
||||
let mut rewrites: Vec<(String, String)> = Vec::new();
|
||||
for s in &lits {
|
||||
if s.contains("://") || s.starts_with("data:") || s.len() < 2 || s.contains('\u{0}') {
|
||||
@@ -105,13 +105,21 @@ pub(crate) fn gather(bundle: &mut String, dir: &Path, game: &Path, got: &mut Gat
|
||||
let ext = file.extension().and_then(|x| x.to_str()).unwrap_or("").to_ascii_lowercase();
|
||||
if SOURCE_EXTS.contains(&ext.as_str()) || file.file_name().is_some_and(|n| n == MANIFEST) {
|
||||
// an app screen's module (`<Screen app="chat.tsx">`, a component on react-dom): bundled now with its npm
|
||||
// packages beside where it was, as `chat.tsx.surface.js`, which the player opens (it bundles nothing)
|
||||
// packages beside where it was, as `chat.tsx.surface.js` and its CSS `chat.tsx.surface.css`, which the
|
||||
// player opens (it bundles nothing; raea-runtime-appscreen code_of)
|
||||
if matches!(ext.as_str(), "tsx" | "jsx") && std::fs::read_to_string(&file).is_ok_and(|t| t.contains("export default") && !t.contains("registerRoot(")) && !imported(dir, &file) {
|
||||
if let Some(rel) = inside(&file) {
|
||||
let rel = format!("{rel}{}", raea_runtime_page::screen::BUNDLED);
|
||||
if !got.has(&rel) {
|
||||
raea_runtime_react::scene::bundle_surface(&file, &game.join(&rel))?;
|
||||
got.files.push((rel, file.clone()));
|
||||
let (js_rel, css_rel) = (format!("{rel}{}", raea_runtime_page::screen::BUNDLED), format!("{rel}{}", raea_runtime_page::screen::BUNDLED_CSS));
|
||||
if !got.has(&js_rel) {
|
||||
let (js, css) = raea_runtime_page::screen::build_app(&file)?;
|
||||
for (r, text) in [(&js_rel, js), (&css_rel, css)] {
|
||||
let out = game.join(r);
|
||||
if let Some(d) = out.parent() {
|
||||
std::fs::create_dir_all(d).map_err(|e| format!("{}: {e}", d.display()))?;
|
||||
}
|
||||
std::fs::write(&out, text).map_err(|e| format!("{}: {e}", out.display()))?;
|
||||
got.files.push((r.clone(), file.clone()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -126,7 +134,7 @@ pub(crate) fn gather(bundle: &mut String, dir: &Path, game: &Path, got: &mut Gat
|
||||
}
|
||||
}
|
||||
None => {
|
||||
let canon = file.canonicalize().unwrap_or(file.clone());
|
||||
let canon = dunce::canonicalize(&file).unwrap_or(file.clone());
|
||||
let h = twox_hash::XxHash3_64::oneshot(canon.to_string_lossy().as_bytes());
|
||||
let rel = format!("media/_ext/{:08x}-{}", h as u32, file.file_name().unwrap().to_string_lossy());
|
||||
put(&file, &rel, game, got)?;
|
||||
|
||||
@@ -50,11 +50,11 @@ pub(crate) fn find_game(args: &[String]) -> R<PathBuf> {
|
||||
return Ok(PathBuf::from(d));
|
||||
}
|
||||
let exe = std::env::current_exe().map_err(|e| e.to_string())?;
|
||||
let exe = exe.canonicalize().unwrap_or(exe);
|
||||
let exe = dunce::canonicalize(&exe).unwrap_or(exe);
|
||||
let here = exe.parent().unwrap_or(Path::new("."));
|
||||
for c in [here.join("../Resources/game"), here.join("game")] {
|
||||
if c.join(MANIFEST).exists() {
|
||||
return Ok(c.canonicalize().unwrap_or(c));
|
||||
return Ok(dunce::canonicalize(&c).unwrap_or(c));
|
||||
}
|
||||
}
|
||||
Err(format!("no game beside {} (an exported game's player looks in ../Resources/game or game/; --game DIR names one)", exe.display()))
|
||||
@@ -300,7 +300,7 @@ pub(crate) fn selftest(game: &Game, secs: f64, args: &[String]) -> R<String> {
|
||||
"has_3d": game.has_3d,
|
||||
"snapshots": snapped,
|
||||
"panics": panics,
|
||||
"env": {"home": std::env::var("HOME").unwrap_or_default(), "raea_vars_given": std::env::vars().filter(|(k, _)| k.starts_with("RAEA_") && k != "RAEA_AUDIO_MUTE" && k != "RAEA_AUDIO_TAP").count()},
|
||||
"env": {"home": raea_io_home::user_home().unwrap_or_default().display().to_string(), "raea_vars_given": std::env::vars().filter(|(k, _)| k.starts_with("RAEA_") && k != "RAEA_AUDIO_MUTE" && k != "RAEA_AUDIO_TAP").count()},
|
||||
});
|
||||
if let Some(p) = flag(args, "--json") {
|
||||
std::fs::write(&p, serde_json::to_string_pretty(&report).unwrap()).map_err(|e| format!("{p}: {e}"))?;
|
||||
|
||||
@@ -7,6 +7,7 @@ publish = false
|
||||
description = "A composition's 3D as data another tool builds (`raea scene export`: scene.json, its meshes and models), a Godot project written from it, and what changed in Blender or Godot read back as edits to the TSX (docs/blender.feature BL37-BL39, docs/godot.feature GD12-GD13)"
|
||||
|
||||
[dependencies]
|
||||
dunce = "1"
|
||||
# the composition bundled and stepped to its frames' 3D (raea-runtime-export's scene_frames), walked into parts
|
||||
raea-runtime-bundle = { path = "../../runtime/bundle" }
|
||||
raea-runtime-export = { path = "../../runtime/export" }
|
||||
|
||||
@@ -237,7 +237,7 @@ pub fn scene(all: &[Vec<Item>], frames: &[i64], dir: &Path, out: &Path) -> R<Val
|
||||
/// `raea scene export ...`: scene.json written, and its value.
|
||||
pub fn export(args: &[String]) -> R<(PathBuf, Value)> {
|
||||
let edit = args.get(2).ok_or(USAGE)?;
|
||||
let tsx = PathBuf::from(edit).canonicalize().map_err(|e| format!("{edit}: {e}"))?;
|
||||
let tsx = dunce::canonicalize(&PathBuf::from(edit)).map_err(|e| format!("{edit}: {e}"))?;
|
||||
let dir = tsx.parent().ok_or("the edit's folder")?.to_path_buf();
|
||||
let out = args.iter().position(|a| a == "-o").and_then(|i| args.get(i + 1)).ok_or(USAGE)?;
|
||||
let out = std::path::absolute(out).map_err(|e| e.to_string())?;
|
||||
|
||||
@@ -7,6 +7,7 @@ publish = false
|
||||
description = "raea judge: a review's sheets judged by clef-omni on a frozen rubric, the pass decided in code, calibrated against the person's eye before it gates"
|
||||
|
||||
[dependencies]
|
||||
dunce = "1"
|
||||
raea-io-home = { path = "../../io/home" }
|
||||
# what a judge saw, as raea's one Finding (docs/direction.feature DR3)
|
||||
raea-core-facts = { path = "../../core/facts" }
|
||||
|
||||
@@ -84,7 +84,7 @@ pub fn read(v: &Value) -> (Map<String, Value>, Vec<Value>, Value) {
|
||||
/// said on stderr as it comes, so a watcher sees it working through a judgement that can take minutes.
|
||||
pub fn ask(by: &str, dir: &Path, brief: &Value, target: Option<&Path>) -> Result<Value, String> {
|
||||
use std::io::BufRead as _;
|
||||
let dir = dir.canonicalize().map_err(|e| format!("judge: {}: {e}", dir.display()))?;
|
||||
let dir = dunce::canonicalize(&dir).map_err(|e| format!("judge: {}: {e}", dir.display()))?;
|
||||
let p = prompt(&dir, brief, target);
|
||||
let mut cmd = match by {
|
||||
"kimi" => {
|
||||
|
||||
@@ -9,6 +9,7 @@ description = "A person's notes on a project as files the work is held to (docs/
|
||||
[dependencies]
|
||||
# Note and Ask, the project found by its .raea/project, and the world a note is an entity in
|
||||
raea-core-facts = { path = "../../core/facts" }
|
||||
raea-io-home = { path = "../../io/home" }
|
||||
# when a run of an ask's check was (UTC), as raea check stamps its record
|
||||
raea-io-trace = { path = "../../io/trace" }
|
||||
# what each ask has been through, kept as JSON (state.rs)
|
||||
|
||||
@@ -27,7 +27,7 @@ pub(crate) struct New {
|
||||
fn inbox_dir() -> PathBuf {
|
||||
match std::env::var_os("RAEA_INBOX_DIR") {
|
||||
Some(dir) => dir.into(),
|
||||
None => Path::new(&std::env::var_os("HOME").unwrap_or_default()).join(".raea/inbox"),
|
||||
None => raea_io_home::user_home().unwrap_or_default().join(".raea/inbox"),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -237,6 +237,10 @@ pub(crate) fn offscreen(mut run: Run, json: Option<String>, flat_out: bool, snap
|
||||
if let Some((x, y, down)) = run.pointer {
|
||||
e["pointer"] = serde_json::json!({"x": x, "y": y, "down": down});
|
||||
}
|
||||
// what reached its app screens (the keys they took aren't the page's above), given them again in a render
|
||||
if let Some(apps) = live.app_input() {
|
||||
e["apps"] = apps;
|
||||
}
|
||||
// the session's seed and start with its first frame: a render of the log draws the same Math.random and Date
|
||||
if logged.is_empty() {
|
||||
e["session"] = live.session();
|
||||
|
||||
@@ -7,6 +7,7 @@ publish = false
|
||||
description = "raea solid info and raea solid view: a solid file run, its parts measured (raea-core-solidinfo), and its review sheets in colour and clay"
|
||||
|
||||
[dependencies]
|
||||
dunce = "1"
|
||||
raea-core-solidinfo = { path = "../../core/solidinfo" }
|
||||
# what solid info finds, as raea's one Finding (docs/direction.feature DR3)
|
||||
raea-core-facts = { path = "../../core/facts" }
|
||||
|
||||
@@ -102,7 +102,7 @@ pub fn verb(args: &[String]) -> Option<Result<String, String>> {
|
||||
|
||||
pub fn cli(args: &[String]) -> Result<String, String> {
|
||||
let (Some(verb @ ("info" | "view" | "export")), Some(file)) = (args.get(1).map(String::as_str), args.get(2)) else { return Err(USAGE.into()) };
|
||||
let file = PathBuf::from(file).canonicalize().map_err(|e| format!("{file}: {e}"))?;
|
||||
let file = dunce::canonicalize(&PathBuf::from(file)).map_err(|e| format!("{file}: {e}"))?;
|
||||
let json_out = args.iter().any(|a| a == "--json");
|
||||
let set = flag(args, "--set").map(|s| parse_set(&s)).transpose()?.unwrap_or_default();
|
||||
let expect_path = flag(args, "--expect").map(PathBuf::from).or_else(|| {
|
||||
|
||||
@@ -7,6 +7,7 @@ publish = false
|
||||
description = "A render's sound alone (`raea render EDIT.tsx -o OUT.wav`, no frames drawn) and a video's sound written beside it from the same pass (`--audio OUT.wav`)"
|
||||
|
||||
[dependencies]
|
||||
dunce = "1"
|
||||
raea-runtime-export = { path = "../../runtime/export" }
|
||||
raea-runtime-bundle = { path = "../../runtime/bundle" }
|
||||
raea-sys-mix = { path = "../../systems/mix" }
|
||||
|
||||
@@ -42,7 +42,7 @@ pub fn render(args: &[String]) -> Option<R<String>> {
|
||||
/// mastered by its <Mix>, written as 48 kHz WAV, with what it measures.
|
||||
fn sound(args: &[String], out: &Path) -> R<String> {
|
||||
let edit = args.get(1).filter(|a| !a.starts_with('-')).ok_or("raea render EDIT.tsx -o OUT.wav")?;
|
||||
let tsx = PathBuf::from(edit).canonicalize().map_err(|e| format!("{edit}: {e}"))?;
|
||||
let tsx = dunce::canonicalize(&PathBuf::from(edit)).map_err(|e| format!("{edit}: {e}"))?;
|
||||
let dir = tsx.parent().ok_or("the edit has no folder")?.to_path_buf();
|
||||
let js = std::env::temp_dir().join(format!("raea-sound-{}.js", std::process::id()));
|
||||
raea_runtime_bundle::bundle_composition(&tsx, &js, &raea_runtime_bundle::comp_opts(args)?, None)?;
|
||||
|
||||
@@ -6,6 +6,7 @@ license = "FSL-1.1-ALv2"
|
||||
description = "An app's target, web (Blitz on Bevy) or native (Rune), read from its file, and raea app run|check|bundle on either (docs/targets.feature)"
|
||||
|
||||
[dependencies]
|
||||
dunce = "1"
|
||||
serde_json = "1"
|
||||
# the page host's frames over BRP
|
||||
base64 = "0.22"
|
||||
|
||||
+59
-10
@@ -1,6 +1,7 @@
|
||||
//! `raea app bundle` on the web target: a Mac app that opens the page in raea-page-host's window. App.app/Contents has
|
||||
//! the page host, the app's script and stylesheet in Resources/, and a launcher in MacOS/ that starts the host on them
|
||||
//! at the app's title and size, signed by the developer (sign.rs, T1d).
|
||||
//! at the app's title and size, signed by the developer (sign.rs, T1d). The launcher runs the host as its child and
|
||||
//! waits for it: a launcher that execs it leaves the app without a pid in AppKit (#163, `launcher`).
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
@@ -37,6 +38,20 @@ fn sh(s: &str) -> String {
|
||||
format!("'{}'", s.replace('\'', "'\\''"))
|
||||
}
|
||||
|
||||
/// The app's executable (Contents/MacOS/NAME): the page host in Resources, on the app's script and stylesheet, in a
|
||||
/// window at the app's title and size. The host is this script's child, never exec'd in its place: when the process
|
||||
/// macOS launched execs another program, AppKit keeps the app's bundle id but loses its pid (NSRunningApplication's
|
||||
/// processIdentifier -1), so window managers that find an app's windows by its pid never see the window (#163). The
|
||||
/// host still checks in as the app, from inside it; a signal to the launcher is passed on to it.
|
||||
fn launcher(name: &str, size: (u32, u32)) -> String {
|
||||
format!(
|
||||
"#!/bin/sh\n# made by raea app bundle: the page in raea-page-host's window, the host this script's child (an exec loses the app's pid)\nR=\"$(cd \"$(dirname \"$0\")/../Resources\" && pwd)\"\n\"$R/raea-page-host\" \"$R/app.js\" --css \"$R/app.css\" --window --title {} --size {}x{} &\nhost=$!\ntrap 'kill -TERM \"$host\" 2>/dev/null' TERM INT HUP\nwait \"$host\"\n",
|
||||
sh(name),
|
||||
size.0,
|
||||
size.1
|
||||
)
|
||||
}
|
||||
|
||||
/// The bundle id from the title: ascii letters and digits, under app.raea.local
|
||||
fn bundle_id(title: &str) -> String {
|
||||
let id: String = title.chars().filter(|c| c.is_ascii_alphanumeric()).collect::<String>().to_lowercase();
|
||||
@@ -58,20 +73,54 @@ pub fn web(a: &Ask) -> Result<String, String> {
|
||||
std::fs::copy(&host, res.join("raea-page-host")).map_err(|e| format!("{}: {e}", host.display()))?;
|
||||
let name = &a.title;
|
||||
std::fs::write(contents.join("Info.plist"), plist(name, &bundle_id(name))).map_err(|e| e.to_string())?;
|
||||
let launcher = macos.join(name);
|
||||
let script = format!(
|
||||
"#!/bin/sh\n# made by raea app bundle: the page in raea-page-host's window\nR=\"$(cd \"$(dirname \"$0\")/../Resources\" && pwd)\"\nexec \"$R/raea-page-host\" \"$R/app.js\" --css \"$R/app.css\" --window --title {} --size {}x{}\n",
|
||||
sh(name),
|
||||
a.size.0,
|
||||
a.size.1
|
||||
);
|
||||
std::fs::write(&launcher, script).map_err(|e| e.to_string())?;
|
||||
let exe = macos.join(name);
|
||||
std::fs::write(&exe, launcher(name, a.size)).map_err(|e| e.to_string())?;
|
||||
#[cfg(unix)]
|
||||
{
|
||||
use std::os::unix::fs::PermissionsExt;
|
||||
std::fs::set_permissions(&launcher, std::fs::Permissions::from_mode(0o755)).map_err(|e| e.to_string())?;
|
||||
std::fs::set_permissions(&exe, std::fs::Permissions::from_mode(0o755)).map_err(|e| e.to_string())?;
|
||||
}
|
||||
let mut said = crate::sign::sign(&out, &a.sign)?;
|
||||
said.push(format!("{} (web)", out.display()));
|
||||
Ok(said.join("\n"))
|
||||
}
|
||||
|
||||
#[cfg(all(test, unix))]
|
||||
mod tests {
|
||||
use std::os::unix::fs::PermissionsExt;
|
||||
use std::process::Command;
|
||||
|
||||
/// The launcher run as macOS runs an app's executable, with a page host that writes down its own pid, its parent's
|
||||
/// and its arguments, and exits 3: the host must be the launcher's child (an exec ran it in the launcher's
|
||||
/// process, the pid macOS launched, and AppKit lost the app's pid: #163), on the app's files, and the launcher must
|
||||
/// end with the host's status.
|
||||
#[test]
|
||||
fn the_host_runs_as_the_launchers_child() {
|
||||
// canonical, so the launcher's own `pwd` names Resources as this test does (macOS's temp folder is a link)
|
||||
let dir = dunce::canonicalize(&std::env::temp_dir()).unwrap().join(format!("raea-macapp-launcher-{}", std::process::id()));
|
||||
let _ = std::fs::remove_dir_all(&dir);
|
||||
let (macos, res) = (dir.join("T.app/Contents/MacOS"), dir.join("T.app/Contents/Resources"));
|
||||
std::fs::create_dir_all(&macos).unwrap();
|
||||
std::fs::create_dir_all(&res).unwrap();
|
||||
let ran = res.join("ran");
|
||||
let host = res.join("raea-page-host");
|
||||
std::fs::write(&host, format!("#!/bin/sh\necho \"$$ $PPID $*\" > '{}'\nexit 3\n", ran.display())).unwrap();
|
||||
let exe = macos.join("T");
|
||||
std::fs::write(&exe, super::launcher("My App", (800, 600))).unwrap();
|
||||
for f in [&host, &exe] {
|
||||
std::fs::set_permissions(f, std::fs::Permissions::from_mode(0o755)).unwrap();
|
||||
}
|
||||
let mut child = Command::new(&exe).spawn().unwrap();
|
||||
let launched = child.id().to_string();
|
||||
let status = child.wait().unwrap();
|
||||
let said = std::fs::read_to_string(&ran).unwrap();
|
||||
let mut words = said.split_whitespace();
|
||||
let (pid, parent) = (words.next().unwrap(), words.next().unwrap());
|
||||
assert_ne!(pid, launched, "the host ran in the launcher's own process (exec'd): {said}");
|
||||
assert_eq!(parent, launched, "the host isn't the launcher's child: {said}");
|
||||
let args = format!("{0}/app.js --css {0}/app.css --window --title My App --size 800x600", res.display());
|
||||
assert_eq!(said.trim_end().splitn(3, ' ').nth(2), Some(args.as_str()));
|
||||
assert_eq!(status.code(), Some(3), "the launcher didn't end with the host's status");
|
||||
let _ = std::fs::remove_dir_all(&dir);
|
||||
}
|
||||
}
|
||||
@@ -64,14 +64,14 @@ pub fn host(args: &[String]) -> Result<String, String> {
|
||||
let p = Path::new(a);
|
||||
if p.extension().is_some_and(|x| x == "tsx" || x == "ts" || x == "jsx") && p.is_file() {
|
||||
std::fs::create_dir_all(&work).map_err(|e| format!("{}: {e}", work.display()))?;
|
||||
let (js, css) = raea_runtime_bundle::inproc::app::bundle(p, &raea_io_home::home())?;
|
||||
let (js, css) = raea_runtime_bundle::inproc::app::bundle(p, &raea_io_home::home(), raea_runtime_bundle::inproc::app::WINDOW)?;
|
||||
let script = work.join(format!("{}.js", p.file_stem().unwrap_or_default().to_string_lossy()));
|
||||
std::fs::write(&script, js).map_err(|e| format!("{}: {e}", script.display()))?;
|
||||
handed.push(script.display().to_string());
|
||||
// the app's folder (relative media and fonts) and the CSS it imported (its @font-face rules), T3d
|
||||
let sheet = script.with_extension("css");
|
||||
std::fs::write(&sheet, css).map_err(|e| format!("{}: {e}", sheet.display()))?;
|
||||
let dir = p.canonicalize().ok().map(raea_io_home::plain).and_then(|c| c.parent().map(Path::to_path_buf)).unwrap_or_default();
|
||||
let dir = dunce::canonicalize(&p).ok().map(raea_io_home::plain).and_then(|c| c.parent().map(Path::to_path_buf)).unwrap_or_default();
|
||||
extra.extend(["--base".to_string(), dir.display().to_string(), "--css".to_string(), sheet.display().to_string()]);
|
||||
} else {
|
||||
handed.push(a.clone());
|
||||
|
||||
@@ -141,7 +141,7 @@ pub fn find(name: &str, built: &[PathBuf]) -> Result<PathBuf, String> {
|
||||
s.push(std::env::consts::EXE_SUFFIX);
|
||||
PathBuf::from(s)
|
||||
};
|
||||
let beside = std::env::current_exe().ok().map(|e| e.canonicalize().unwrap_or(e)).and_then(|e| e.parent().map(|d| d.join(name)));
|
||||
let beside = std::env::current_exe().ok().map(|e| dunce::canonicalize(&e).unwrap_or(e)).and_then(|e| e.parent().map(|d| d.join(name)));
|
||||
let on_path = std::env::var_os("PATH").map(|p| std::env::split_paths(&p).map(|d| d.join(name)).collect::<Vec<_>>()).unwrap_or_default();
|
||||
beside.into_iter().chain(on_path).chain(built.iter().cloned()).map(exe).find(|p| p.is_file()).ok_or(format!("no {name}: put it beside raea or on PATH (in a checkout, build it)"))
|
||||
}
|
||||
@@ -22,9 +22,9 @@ pub struct Built {
|
||||
/// `app` bundled into `dir` (made if missing): app.js and app.css (Tailwind's, for the classes the app's folder uses, after
|
||||
/// any CSS the app imports)
|
||||
pub fn build(app: &Path, dir: &Path) -> Result<Built, String> {
|
||||
let app = raea_io_home::plain(app.canonicalize().map_err(|e| format!("{}: {e}", app.display()))?);
|
||||
let app = raea_io_home::plain(dunce::canonicalize(&app).map_err(|e| format!("{}: {e}", app.display()))?);
|
||||
std::fs::create_dir_all(dir).map_err(|e| format!("{}: {e}", dir.display()))?;
|
||||
let (js, imported) = raea_runtime_bundle::inproc::app::bundle(&app, &raea_io_home::home())?;
|
||||
let (js, imported) = raea_runtime_bundle::inproc::app::bundle(&app, &raea_io_home::home(), raea_runtime_bundle::inproc::app::WINDOW)?;
|
||||
let folder = app.parent().unwrap_or(Path::new("."));
|
||||
let tw = raea_runtime_bundle::styles::tailwind(folder)?;
|
||||
let built = Built { js: dir.join("app.js"), css: dir.join("app.css") };
|
||||
|
||||
@@ -7,6 +7,7 @@ publish = false
|
||||
description = "The `raea` verbs that run raea's model tools: sao, tokensynth, setup-audio, sounds, splat, song and gen"
|
||||
|
||||
[dependencies]
|
||||
dunce = "1"
|
||||
raea-io-assets = { path = "../../io/assets" }
|
||||
# generation flows: made.app, fal, Replicate, OpenRouter, Modal, ComfyUI (`raea gen`)
|
||||
raea-io-gen = { path = "../../io/gen" }
|
||||
@@ -16,3 +17,7 @@ serde_json = "1"
|
||||
# the verbs' flags read as a render reads its own
|
||||
raea-runtime-bundle = { path = "../../runtime/bundle" }
|
||||
raea-runtime-export = { path = "../../runtime/export" }
|
||||
|
||||
# `raea motion`: Kimodo on MLX, Apple silicon's
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
raea-sys-kimodo = { path = "../../systems/kimodo" }
|
||||
@@ -0,0 +1,148 @@
|
||||
//! Grok Bot (xAI's desktop agent, made by Anysphere: /Applications/Grok Bot.app, bundle com.anysphere.sand) as a
|
||||
//! `raea skills install --agent grokbot` target (docs/skills.feature SK13). Read from its app.asar, 1.1.0 (11-14):
|
||||
//! Grok Bot keeps nothing on this Mac that raea could write. Its agent runs on a computer of its own in the cloud (its
|
||||
//! "box"), its skills are held there, and its MCP servers belong to the person's account (Settings → Integrations →
|
||||
//! Add a custom connector), a server's command running on that computer, not here. It has no hooks, no CLI and no ACP.
|
||||
//! What does reach this Mac is its Execution on this computer: the Bot runs a command here, through its local daemon.
|
||||
//! So raea stages its skill in a folder of its own, stamped and with a preface saying where raea runs, and gives the
|
||||
//! grokbot:// links that finish it in Grok Bot: the Execution setting, and a message to the Bot, filled in but not
|
||||
//! sent, asking it to make the skill from the staged file ("Ask your Bot to create one", as Grok Bot itself says).
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
type R<T> = Result<T, String>;
|
||||
|
||||
/// The folder raea stages Grok Bot's copy in: $RAEA_GROKBOT_HOME, else grokbot in raea's own folder in the home.
|
||||
pub fn home() -> R<PathBuf> {
|
||||
match std::env::var_os("RAEA_GROKBOT_HOME").filter(|v| !v.is_empty()) {
|
||||
Some(d) => Ok(PathBuf::from(d)),
|
||||
None => Ok(crate::agent_mcp::user_home()?.join(".raea").join("grokbot")),
|
||||
}
|
||||
}
|
||||
|
||||
/// Where the staged skills go, one folder per skill holding SKILL.md, as for every agent.
|
||||
pub fn skills_dir() -> R<PathBuf> {
|
||||
Ok(home()?.join("skills"))
|
||||
}
|
||||
|
||||
/// The app, where macOS keeps it (/Applications, or ~/Applications).
|
||||
pub fn app() -> Option<PathBuf> {
|
||||
let home = crate::agent_mcp::user_home().ok();
|
||||
[Some(PathBuf::from("/Applications")), home.map(|h| h.join("Applications"))].into_iter().flatten().map(|d| d.join("Grok Bot.app")).find(|a| a.join("Contents/Info.plist").is_file())
|
||||
}
|
||||
|
||||
/// The largest SKILL.md Grok Bot's Skills → Add new skill → Upload file takes, in bytes (256 KB).
|
||||
pub const MAX_SKILL: usize = 256_000;
|
||||
|
||||
/// After `raea skills install --agent grokbot` has copied raea's skills into `dir` (`said`, what it said doing so): the
|
||||
/// preface in raea's SKILL.md, and the links that finish it. A linked folder is the person's, left as it is. Grok Bot
|
||||
/// gets no hooks (it has none) and no MCP server (its command would run on the Bot's own computer, not this Mac).
|
||||
pub fn stage(dir: &Path, said: String) -> R<String> {
|
||||
let md = dir.join("raea/SKILL.md");
|
||||
if !dir.join("raea").is_symlink() && let Ok(text) = std::fs::read_to_string(&md) {
|
||||
let text = with_preface(&text, dir);
|
||||
if text.len() >= MAX_SKILL {
|
||||
return Err(format!("{}: {} KB, more than the 256 KB Grok Bot's Add new skill takes", md.display(), text.len() / 1000));
|
||||
}
|
||||
std::fs::write(&md, text).map_err(|e| format!("{}: {e}", md.display()))?;
|
||||
}
|
||||
Ok(format!("{said}{}", finish(dir)))
|
||||
}
|
||||
|
||||
/// SKILL.md with the preface after its front matter (or first, when it has none): raea runs on the person's Mac, not on
|
||||
/// the Bot's computer. A copy that has one keeps only one.
|
||||
pub fn with_preface(text: &str, dir: &Path) -> String {
|
||||
if text.contains("> **On Grok Bot.**") {
|
||||
return text.to_string();
|
||||
}
|
||||
let p = format!(
|
||||
"> **On Grok Bot.** raea runs on the person's Mac, not on your computer. Run every `raea` command there, and read\n> every file this skill links (3d.md, reference/cli.md and the rest) from its copy there, in {}, both\n> with Run a command on your local computer (the person turns on Settings → Computer → Execution on this computer).\n> No raea MCP server or hook is set up for you: after saving a composition run `raea check EDIT.tsx --quick` yourself,\n> and `raea show FILE` puts media in front of the person.\n",
|
||||
dir.join("raea").display()
|
||||
);
|
||||
let Some(rest) = text.strip_prefix("---\n") else { return format!("{p}\n{text}") };
|
||||
let Some(end) = rest.find("\n---\n") else { return format!("{p}\n{text}") };
|
||||
let (front, body) = (&rest[..end], rest[end + 5..].trim_start_matches('\n'));
|
||||
format!("---\n{front}\n---\n\n{p}\n{body}")
|
||||
}
|
||||
|
||||
/// A query value as Grok Bot builds its own links (encodeURIComponent): every byte but A-Z a-z 0-9 - _ . ! ~ * ' ( ).
|
||||
fn encode(v: &str) -> String {
|
||||
v.bytes().map(|b| if b.is_ascii_alphanumeric() || b"-_.!~*'()".contains(&b) { (b as char).to_string() } else { format!("%{b:02X}") }).collect()
|
||||
}
|
||||
|
||||
/// One of Grok Bot's deep links (its route table: grokbot://app/v1/ROUTE?KEY=VALUE).
|
||||
pub fn link(route: &str, key: &str, value: &str) -> String {
|
||||
format!("grokbot://app/v1/{route}?{key}={}", encode(value))
|
||||
}
|
||||
|
||||
/// The message to the Bot that makes the skill from the copy staged in `dir`: at most 1000 characters, as its prompt
|
||||
/// link takes.
|
||||
fn ask(dir: &Path) -> String {
|
||||
let md = dir.join("raea/SKILL.md");
|
||||
format!("Please make a private skill named raea from the file {} on my Mac: read it with Run a command on your local computer and keep its text as it is. raea runs on my Mac, so run every raea command there.", md.display())
|
||||
}
|
||||
|
||||
/// What `raea skills install --agent grokbot` says once the copy is staged: where it is, and the links that finish it.
|
||||
pub fn finish(dir: &Path) -> String {
|
||||
let md = dir.join("raea/SKILL.md");
|
||||
let here = match app() {
|
||||
Some(a) => format!("Grok Bot is at {}.", a.display()),
|
||||
None => "Grok Bot isn't installed on this Mac (cursor.com/download/bot); the copy is ready for when it is.".into(),
|
||||
};
|
||||
format!(
|
||||
"{here} It keeps its skills on its own computer and its MCP servers on your account, so the copy waits here: {}. No hooks, and no MCP server: Grok Bot runs a server's command on its computer, where the blender server can't reach this Mac's Blender.\nTo finish, in Grok Bot, signed in:\n 1. turn on Execution on this computer: {}\n 2. send the message this fills in, and the Bot makes the skill from the copy: {}\n or by hand: Skills → Add new skill → Upload file → {}\n`open LINK` opens a link in Grok Bot",
|
||||
dir.display(),
|
||||
link("settings", "id", "local-execution"),
|
||||
link("prompt", "text", &ask(dir)),
|
||||
md.display()
|
||||
)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn the_preface_goes_after_the_front_matter_once() {
|
||||
let d = Path::new("/h/.raea/grokbot/skills");
|
||||
let md = "---\nname: raea\ndescription: d\nversion: 1\n---\n\n# raea\n";
|
||||
let out = with_preface(md, d);
|
||||
assert!(out.starts_with("---\nname: raea\ndescription: d\nversion: 1\n---\n\n> **On Grok Bot.** raea runs on the person's Mac"), "{out}");
|
||||
assert!(out.contains("in /h/.raea/grokbot/skills/raea, both") && out.ends_with("\n\n# raea\n"), "{out}");
|
||||
assert_eq!(with_preface(&out, d), out);
|
||||
assert!(with_preface("# no front matter\n", d).starts_with("> **On Grok Bot.**"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn links_are_built_as_grok_bot_builds_its_own() {
|
||||
assert_eq!(link("settings", "id", "local-execution"), "grokbot://app/v1/settings?id=local-execution");
|
||||
assert_eq!(link("prompt", "text", "a b/ü&+=?#'()"), "grokbot://app/v1/prompt?text=a%20b%2F%C3%BC%26%2B%3D%3F%23'()");
|
||||
// its prompt route takes at most 1000 characters of text in a link of at most 2048, with no format characters
|
||||
let a = ask(Path::new("/h/a-home-folder-with-a-rather-long-name/.raea/grokbot/skills"));
|
||||
assert!(a.chars().count() <= 1000 && link("prompt", "text", &a).len() <= 2048, "{a}");
|
||||
assert!(a.chars().all(|c| !c.is_control() && !('\u{200B}'..='\u{200F}').contains(&c) && !('\u{202A}'..='\u{202E}').contains(&c)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn stage_prefaces_the_copy_once_and_refuses_one_too_big_to_upload() {
|
||||
let d = std::env::temp_dir().join(format!("raea-grokbot-stage-{}", std::process::id()));
|
||||
let _ = std::fs::remove_dir_all(&d);
|
||||
std::fs::create_dir_all(d.join("raea")).unwrap();
|
||||
std::fs::write(d.join("raea/SKILL.md"), "---\nname: raea\nversion: 1\n---\n\n# raea\n").unwrap();
|
||||
let out = stage(&d, "copied\n".into()).unwrap();
|
||||
assert!(out.starts_with("copied\n") && out.contains("grokbot://app/v1/prompt?text="), "{out}");
|
||||
stage(&d, String::new()).unwrap();
|
||||
let md = std::fs::read_to_string(d.join("raea/SKILL.md")).unwrap();
|
||||
assert_eq!(md.matches("> **On Grok Bot.**").count(), 1, "{md}");
|
||||
std::fs::write(d.join("raea/SKILL.md"), "x".repeat(MAX_SKILL)).unwrap();
|
||||
assert!(stage(&d, String::new()).unwrap_err().contains("256 KB"));
|
||||
let _ = std::fs::remove_dir_all(&d);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn finish_says_where_the_copy_is_and_both_links() {
|
||||
let f = finish(Path::new("/h/.raea/grokbot/skills"));
|
||||
assert!(f.contains("the copy waits here: /h/.raea/grokbot/skills."), "{f}");
|
||||
assert!(f.contains("grokbot://app/v1/settings?id=local-execution") && f.contains("grokbot://app/v1/prompt?text=Please%20make%20a%20private%20skill"), "{f}");
|
||||
assert!(f.contains("Upload file → /h/.raea/grokbot/skills/raea/SKILL.md"), "{f}");
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
//! The hooks `raea skills install` adds an agent (docs/agents.feature A5d, A5e; docs/skills.feature SK10), the same two
|
||||
//! for every harness, each written where and how that harness reads hooks: before a shell command, `raea hook AGENT`
|
||||
//! steers media opened in the Mac's viewer to `raea show`; after a file is saved, it runs the quick check on a
|
||||
//! composition. An event that already has a `raea hook` entry is left as it is.
|
||||
//! composition. Claude Code's run after every tool and as a turn ends too, to hand the session what the person sent from
|
||||
//! the raea app (apps/check/src/inbox.rs). An event that already has a `raea hook` entry keeps it, its matcher widened
|
||||
//! to this raea's when an older raea wrote a narrower one.
|
||||
use crate::agent_mcp::user_home;
|
||||
use serde_json::{Value, json};
|
||||
use std::path::{Path, PathBuf};
|
||||
@@ -15,14 +17,14 @@ struct Hook {
|
||||
secs: u64,
|
||||
}
|
||||
|
||||
/// Each harness's two hooks, by its own event and tool names.
|
||||
fn hooks(agent: &str) -> R<[Hook; 2]> {
|
||||
/// Each harness's hooks, by its own event and tool names.
|
||||
fn hooks(agent: &str) -> R<Vec<Hook>> {
|
||||
let h = |event, matcher, secs| Hook { event, matcher, secs };
|
||||
Ok(match agent {
|
||||
"claude" => [h("PreToolUse", "Bash", 30), h("PostToolUse", "Write|Edit|MultiEdit", 60)],
|
||||
"codex" => [h("PreToolUse", "^(Bash|shell|shell_command|exec_command)$", 30), h("PostToolUse", "^(apply_patch|Edit|Write)$", 60)],
|
||||
"gemini" => [h("BeforeTool", "run_shell_command", 30), h("AfterTool", "write_file|replace", 60)],
|
||||
"kimi" => [h("PreToolUse", "Bash|Shell", 30), h("PostToolUse", "Write|Edit|WriteFile|StrReplaceFile", 60)],
|
||||
"claude" => vec![h("PreToolUse", "Bash", 30), h("PostToolUse", "*", 60), h("Stop", "", 10)],
|
||||
"codex" => vec![h("PreToolUse", "^(Bash|shell|shell_command|exec_command)$", 30), h("PostToolUse", "^(apply_patch|Edit|Write)$", 60)],
|
||||
"gemini" => vec![h("BeforeTool", "run_shell_command", 30), h("AfterTool", "write_file|replace", 60)],
|
||||
"kimi" => vec![h("PreToolUse", "Bash|Shell", 30), h("PostToolUse", "Write|Edit|WriteFile|StrReplaceFile", 60)],
|
||||
a => return Err(format!("no agent {a:?}: claude, codex, kimi or gemini")),
|
||||
})
|
||||
}
|
||||
@@ -54,7 +56,14 @@ fn add_json(path: &Path, agent: &str, h: &Hook) -> R<bool> {
|
||||
let hooks = doc.as_object_mut().ok_or(format!("{at} isn't a JSON object"))?.entry("hooks").or_insert_with(|| json!({}));
|
||||
let list = hooks.as_object_mut().ok_or(format!("{at}: hooks isn't an object"))?.entry(h.event).or_insert_with(|| json!([]));
|
||||
let list = list.as_array_mut().ok_or(format!("{at}: hooks.{} isn't a list", h.event))?;
|
||||
if list.iter().any(|m| m["hooks"].as_array().into_iter().flatten().any(|x| x["command"].as_str().unwrap_or("").starts_with("raea hook"))) {
|
||||
let ours = |m: &Value| m["hooks"].as_array().into_iter().flatten().any(|x| x["command"].as_str().unwrap_or("").starts_with("raea hook"));
|
||||
if let Some(m) = list.iter_mut().find(|m| ours(m)) {
|
||||
// an older raea's narrower matcher (Claude's after-save hook, now after every tool) is widened, the rest kept
|
||||
if h.matcher == "*" && m["matcher"].as_str() != Some("*") {
|
||||
m["matcher"] = h.matcher.into();
|
||||
write(path, &(serde_json::to_string_pretty(&doc).unwrap_or_default() + "\n"))?;
|
||||
return Ok(true);
|
||||
}
|
||||
return Ok(false);
|
||||
}
|
||||
// Gemini CLI counts milliseconds and names each hook
|
||||
@@ -115,21 +124,24 @@ mod tests {
|
||||
let c = d.join("claude/settings.json");
|
||||
std::fs::create_dir_all(c.parent().unwrap()).unwrap();
|
||||
std::fs::write(&c, r#"{"model":"x","hooks":{"PostToolUse":[{"matcher":"Bash","hooks":[{"type":"command","command":"other"}]},{"matcher":"Write","hooks":[{"type":"command","command":"raea hook claude"}]}]}}"#).unwrap();
|
||||
let [pre, post] = hooks("claude").unwrap();
|
||||
let [pre, post, stop] = <[Hook; 3]>::try_from(hooks("claude").unwrap()).ok().unwrap();
|
||||
assert!(add_json(&c, "claude", &pre).unwrap() && !add_json(&c, "claude", &pre).unwrap());
|
||||
assert!(!add_json(&c, "claude", &post).unwrap(), "an older raea's after-save hook stands");
|
||||
assert!(add_json(&c, "claude", &post).unwrap() && !add_json(&c, "claude", &post).unwrap(), "an older raea's after-save hook is widened to every tool, once");
|
||||
assert!(add_json(&c, "claude", &stop).unwrap() && !add_json(&c, "claude", &stop).unwrap());
|
||||
let v: Value = serde_json::from_str(&std::fs::read_to_string(&c).unwrap()).unwrap();
|
||||
assert_eq!((v["model"].as_str(), v["hooks"]["PostToolUse"].as_array().unwrap().len()), (Some("x"), 2));
|
||||
assert_eq!((v["hooks"]["PostToolUse"][0]["matcher"].as_str(), v["hooks"]["PostToolUse"][1]["matcher"].as_str()), (Some("Bash"), Some("*")));
|
||||
assert_eq!(v["hooks"]["PreToolUse"][0]["hooks"][0]["command"], "raea hook claude");
|
||||
assert_eq!(v["hooks"]["Stop"][0]["hooks"][0]["command"], "raea hook claude");
|
||||
let g = d.join("gemini/settings.json");
|
||||
let [before, _] = hooks("gemini").unwrap();
|
||||
let [before, _] = <[Hook; 2]>::try_from(hooks("gemini").unwrap()).ok().unwrap();
|
||||
assert!(add_json(&g, "gemini", &before).unwrap());
|
||||
let v: Value = serde_json::from_str(&std::fs::read_to_string(&g).unwrap()).unwrap();
|
||||
assert_eq!(v["hooks"]["BeforeTool"][0], json!({"matcher": "run_shell_command", "hooks": [{"name": "raea", "type": "command", "command": "raea hook gemini", "timeout": 30000}]}));
|
||||
let k = d.join("kimi/config.toml");
|
||||
std::fs::create_dir_all(k.parent().unwrap()).unwrap();
|
||||
std::fs::write(&k, "default_model = \"k\"\n\n[[hooks]]\nevent = \"PreToolUse\"\nmatcher = \"Bash\"\ncommand = \"mine\"\n").unwrap();
|
||||
let [pre, post] = hooks("kimi").unwrap();
|
||||
let [pre, post] = <[Hook; 2]>::try_from(hooks("kimi").unwrap()).ok().unwrap();
|
||||
assert!(add_toml(&k, &pre).unwrap() && !add_toml(&k, &pre).unwrap() && add_toml(&k, &post).unwrap() && !add_toml(&k, &post).unwrap());
|
||||
let t = std::fs::read_to_string(&k).unwrap();
|
||||
assert!(t.starts_with("default_model = \"k\"\n\n[[hooks]]\nevent = \"PreToolUse\"\nmatcher = \"Bash\"\ncommand = \"mine\"\n\n[[hooks]]\nevent = \"PreToolUse\"\nmatcher = \"Bash|Shell\"\ncommand = \"raea hook kimi\"\ntimeout = 30\n"), "{t}");
|
||||
|
||||
@@ -14,7 +14,7 @@ type R<T> = Result<T, String>;
|
||||
|
||||
/// The person's home folder (HOME, or USERPROFILE on Windows).
|
||||
pub fn user_home() -> R<PathBuf> {
|
||||
std::env::var_os("HOME").or_else(|| std::env::var_os("USERPROFILE")).map(PathBuf::from).ok_or_else(|| "no home folder (HOME)".into())
|
||||
raea_io_home::user_home().ok_or_else(|| "no home folder (HOME)".into())
|
||||
}
|
||||
|
||||
/// The JSON file holding `mcpServers` for agents configured that way (Kimi Code, Gemini CLI, Claude Code's own file).
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
//! Where each agent `raea skills install` knows reads a person's skills, one folder per skill holding SKILL.md. Checked
|
||||
//! by hand on 11-05: claude: ~/.claude/skills (Claude Code's docs); codex: ~/.agents/skills
|
||||
//! (developers.openai.com/codex/skills, the user scope; older builds read ~/.codex/skills); kimi: $KIMI_CODE_HOME/skills,
|
||||
//! else ~/.kimi-code/skills (kimi 2.3.3's own binary; it also reads ~/.agents/skills and ~/.claude/skills); gemini:
|
||||
//! ~/.gemini/skills (geminicli.com/docs/cli/skills). grokbot (11-14): Grok Bot reads no folder here, so its copy is
|
||||
//! staged in raea's own (agent_grokbot.rs).
|
||||
use std::path::PathBuf;
|
||||
|
||||
/// The agents, in the order `raea doctor` and the usage name them.
|
||||
pub const AGENTS: [&str; 5] = ["claude", "codex", "kimi", "gemini", "grokbot"];
|
||||
|
||||
/// The folder `agent` reads skills from.
|
||||
pub fn folder(agent: &str) -> Result<PathBuf, String> {
|
||||
let home = crate::agent_mcp::user_home()?;
|
||||
Ok(match agent {
|
||||
"claude" => home.join(".claude/skills"),
|
||||
"codex" => home.join(".agents/skills"),
|
||||
"kimi" => std::env::var_os("KIMI_CODE_HOME").filter(|v| !v.is_empty()).map(PathBuf::from).unwrap_or_else(|| home.join(".kimi-code")).join("skills"),
|
||||
"gemini" => home.join(".gemini/skills"),
|
||||
"grokbot" => crate::agent_grokbot::skills_dir()?,
|
||||
a => return Err(format!("no agent {a:?}: claude, codex, kimi, gemini or grokbot")),
|
||||
})
|
||||
}
|
||||
|
||||
/// Each agent and the folder it reads skills from, for `raea doctor` (an agent with no folder is skipped).
|
||||
pub fn agents() -> Vec<(&'static str, PathBuf)> {
|
||||
AGENTS.into_iter().filter_map(|a| folder(a).ok().map(|t| (a, t))).collect()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn each_agent_has_its_folder() {
|
||||
assert!(folder("claude").unwrap().ends_with(".claude/skills"));
|
||||
assert!(folder("codex").unwrap().ends_with(".agents/skills"));
|
||||
assert!(folder("gemini").unwrap().ends_with(".gemini/skills"));
|
||||
assert_eq!(folder("grokbot").unwrap(), crate::agent_grokbot::skills_dir().unwrap());
|
||||
assert!(folder("cursor").is_err());
|
||||
assert_eq!(agents().len(), AGENTS.len());
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,8 @@
|
||||
//! made.app, fal, Replicate, OpenRouter, Modal and ComfyUI, with sao as the local model: apps/tools/src/generate.rs).
|
||||
|
||||
pub mod generate;
|
||||
/// `raea motion`: body motion made on this Mac by Kimodo on MLX (raea-sys-kimodo)
|
||||
pub mod motion;
|
||||
pub mod song;
|
||||
pub mod sound;
|
||||
pub mod splat;
|
||||
@@ -11,5 +13,9 @@ pub mod splat;
|
||||
/// the MCP servers `raea skills install` offers an agent (blender, for a running Blender)
|
||||
pub mod agent_mcp;
|
||||
pub mod agent_hooks;
|
||||
/// Grok Bot as a `raea skills install` target: its copy staged on this Mac, and the links that finish it in Grok Bot
|
||||
pub mod agent_grokbot;
|
||||
/// where each agent reads a person's skills
|
||||
pub mod agent_skills;
|
||||
/// `raea setup blender` and `raea blender run`
|
||||
pub mod blender;
|
||||
@@ -0,0 +1,117 @@
|
||||
//! `raea motion "LINE" [--keys KEYS.json] ...`: body motion made on this Mac by Kimodo (raea-sys-kimodo, on MLX): a
|
||||
//! SOMA clip from a line of words and, with --keys, Kimodo constraints (full-body keyframes, hand or foot targets, a
|
||||
//! root path: what sdk/body/tools/between.ts writes). The clip is the file sdk/body/tools/fromkimodo.ts reads, the
|
||||
//! same one the cloud runner wrote (docs/character.feature CH15b, CH15c).
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
use raea_runtime_bundle::flag;
|
||||
|
||||
type R<T> = Result<T, String>;
|
||||
|
||||
pub const USAGE: &str = "raea motion \"LINE\" [--keys KEYS.json] [--seconds 5 | --frames N] [--seed 1] [--steps 100] [-o CLIP.json]";
|
||||
pub const ABOUT: &str = "body motion made on this Mac by Kimodo (NVIDIA, on MLX): a SOMA clip from a line of words and, with --keys, Kimodo constraints (full-body keyframes, hand or foot targets, a root path, as sdk/body/tools/between.ts writes them), as the clip sdk/body/tools/fromkimodo.ts reads; the first use fetches the motion model (1.1 GB) into raea's models folder, and the first new line its text encoder (8.8 GB: Llama 3 8B in 8 bits with LLM2Vec's adapters); a line's words are read once and kept. Licences: Kimodo's weights NVIDIA's Open Model License, Meta Llama 3 the Meta Llama 3 Community License, LLM2Vec's adapters MIT";
|
||||
|
||||
fn number(args: &[String], name: &str, default: f64) -> R<f64> {
|
||||
match flag(args, name) {
|
||||
None => Ok(default),
|
||||
Some(v) => v.parse::<f64>().ok().filter(|n| n.is_finite() && *n >= 0.0).ok_or(format!("{name} takes a number, got `{v}`")),
|
||||
}
|
||||
}
|
||||
|
||||
fn line(args: &[String]) -> String {
|
||||
const WITH_VALUE: [&str; 6] = ["--keys", "--seconds", "--frames", "--seed", "--steps", "-o"];
|
||||
let mut out = Vec::new();
|
||||
let mut i = 1;
|
||||
while i < args.len() {
|
||||
if WITH_VALUE.contains(&args[i].as_str()) {
|
||||
i += 2;
|
||||
continue;
|
||||
}
|
||||
if !args[i].starts_with("--") {
|
||||
out.push(args[i].as_str());
|
||||
}
|
||||
i += 1;
|
||||
}
|
||||
out.join(" ")
|
||||
}
|
||||
|
||||
/// what a call asks for, read from its words and flags
|
||||
struct Ask {
|
||||
words: String,
|
||||
keys: Option<String>,
|
||||
constraints: Option<serde_json::Value>,
|
||||
frames: usize,
|
||||
seed: u64,
|
||||
steps: usize,
|
||||
out: Option<String>,
|
||||
}
|
||||
|
||||
pub fn motion(args: &[String]) -> R<String> {
|
||||
let words = line(args);
|
||||
let keys = flag(args, "--keys");
|
||||
if words.trim().is_empty() && keys.is_none() {
|
||||
return Err(format!("{USAGE}\n ({ABOUT})"));
|
||||
}
|
||||
let frames = match flag(args, "--frames") {
|
||||
Some(_) => number(args, "--frames", 150.0)? as usize,
|
||||
None => (number(args, "--seconds", 5.0)? * 30.0).round() as usize,
|
||||
};
|
||||
if !(2..=600).contains(&frames) {
|
||||
return Err(format!("a clip is 2 to 600 frames (20 s at 30 a second), asked {frames}"));
|
||||
}
|
||||
let constraints = match &keys {
|
||||
Some(p) => Some(serde_json::from_str::<serde_json::Value>(&std::fs::read_to_string(p).map_err(|e| format!("{p}: {e}"))?).map_err(|e| format!("{p}: {e}"))?),
|
||||
None => None,
|
||||
};
|
||||
let (seed, steps) = (number(args, "--seed", 1.0)? as u64, (number(args, "--steps", 100.0)? as usize).max(2));
|
||||
make(Ask { words, keys, constraints, frames, seed, steps, out: flag(args, "-o") })
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
fn make(ask: Ask) -> R<String> {
|
||||
Err(format!("raea motion runs Kimodo on MLX, on Apple silicon's GPU: {:?} can be made on a Mac", ask.words))
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
fn make(ask: Ask) -> R<String> {
|
||||
// float32 as checked against PyTorch: MLX's TF32 matmuls off, before the first one
|
||||
if std::env::var_os("MLX_ENABLE_TF32").is_none() {
|
||||
unsafe { std::env::set_var("MLX_ENABLE_TF32", "0") };
|
||||
}
|
||||
let t0 = std::time::Instant::now();
|
||||
// a line every 512 MB of each file fetched
|
||||
let mut shown = std::collections::HashMap::<String, u64>::new();
|
||||
let mut progress = |file: &str, n: u64| {
|
||||
if shown.insert(file.to_string(), n >> 29) != Some(n >> 29) {
|
||||
eprintln!("raea motion: fetching {file}: {} MB", n >> 20);
|
||||
}
|
||||
};
|
||||
let mut k = raea_sys_kimodo::Kimodo::fetch(&mut progress).map_err(|e| format!("raea motion: {e}"))?;
|
||||
let (clean, emb) = k.encode(&ask.words).map_err(|e| format!("raea motion: {e}"))?;
|
||||
let load_s = t0.elapsed().as_secs_f64();
|
||||
let made_from = raea_sys_kimodo::Ask { line: &ask.words, frames: ask.frames, seed: ask.seed, steps: ask.steps, constraints: ask.constraints.as_ref(), cfg: (2.0, 2.0) };
|
||||
let t1 = std::time::Instant::now();
|
||||
let made = k.make(&made_from, emb.as_deref(), None).map_err(|e| format!("raea motion: {e}"))?;
|
||||
let gen_s = t1.elapsed().as_secs_f64();
|
||||
let clip = raea_sys_kimodo::decode::clip_json(&made.motion, &k.skeleton, ask.seed, ask.steps, &clean, ask.constraints.is_some());
|
||||
// without -o, the line's words name the file
|
||||
let out = PathBuf::from(ask.out.unwrap_or_else(|| {
|
||||
let slug = clean.split(|c: char| !c.is_ascii_alphanumeric()).filter(|w| !w.is_empty()).map(str::to_lowercase).collect::<Vec<_>>().join("-");
|
||||
format!("{}.clip.json", if slug.is_empty() { "keys".to_string() } else { slug.chars().take(60).collect() })
|
||||
}));
|
||||
std::fs::write(&out, serde_json::to_string(&clip).unwrap_or_default()).map_err(|e| format!("{}: {e}", out.display()))?;
|
||||
let r = &made.motion.root;
|
||||
let (a, b) = (r[0], r[r.len() - 1]);
|
||||
let travel = ((b[0] - a[0]).powi(2) + (b[2] - a[2]).powi(2)).sqrt();
|
||||
Ok(format!(
|
||||
"APPLIED motion {:?}{}, {} frames ({:.1} s), seed {}, {} steps -> {} (made on this Mac in {gen_s:.1} s after {load_s:.1} s loading and reading the line; the hips end {travel:.2} m from where they start)",
|
||||
clean,
|
||||
if ask.keys.is_some() { " with keys" } else { "" },
|
||||
ask.frames,
|
||||
ask.frames as f64 / 30.0,
|
||||
ask.seed,
|
||||
ask.steps,
|
||||
out.display()
|
||||
))
|
||||
}
|
||||
@@ -187,7 +187,7 @@ pub(crate) fn sounds_get(args: &[String]) -> R<String> {
|
||||
let base = PathBuf::from(flag(args, "--dir").unwrap_or_else(|| ".".into()));
|
||||
let out = flag(args, "-o").map(PathBuf::from).unwrap_or_else(|| base.join("media/sounds").join(format!("{pid}-{iid}")));
|
||||
std::fs::create_dir_all(&out).map_err(|e| format!("{}: {e}", out.display()))?;
|
||||
let cache = PathBuf::from(std::env::var("HOME").unwrap_or_default()).join(".cache/raea-sounds").join(pid).join(iid);
|
||||
let cache = raea_io_home::user_home().unwrap_or_default().join(".cache/raea-sounds").join(pid).join(iid);
|
||||
let template = pack["url"].as_str().unwrap_or_default();
|
||||
let mut bytes = 0u64;
|
||||
for (file, name, _) in &chosen {
|
||||
|
||||
@@ -71,7 +71,7 @@ pub fn splat(args: &[String]) -> R<String> {
|
||||
|
||||
fn train(args: &[String]) -> R<String> {
|
||||
let (input, params) = parse(args)?;
|
||||
let input = input.canonicalize().map_err(|e| format!("{}: {e}", input.display()))?;
|
||||
let input = dunce::canonicalize(&input).map_err(|e| format!("{}: {e}", input.display()))?;
|
||||
let out = PathBuf::from(flag(args, "-o").or_else(|| flag(args, "--o")).ok_or(format!("-o OUT.ply is required\n{USAGE}"))?);
|
||||
if out.extension().and_then(|e| e.to_str()) != Some("ply") {
|
||||
return Err(format!("-o names a .ply, got {}", out.display()));
|
||||
|
||||
@@ -7,8 +7,10 @@ publish = false
|
||||
description = "`raea workspace`, `raea project` and `raea controller`: a workspace's folders, projects and controllers, each change a commit"
|
||||
|
||||
[dependencies]
|
||||
dunce = "1"
|
||||
# the controller schema (core/brief controller.rs): a controller file is checked and normalized against it
|
||||
raea-core-brief = { path = "../../core/brief" }
|
||||
raea-io-home = { path = "../../io/home" }
|
||||
serde_json = "1"
|
||||
# a project's compositions, components and controllers read from their source (docs/projects.feature PJ8)
|
||||
raea-app-registry = { path = "registry" }
|
||||
|
||||
@@ -7,8 +7,10 @@ publish = false
|
||||
description = "A raea project's compositions, components and controllers, read from their source without running it, and lint for what isn't connected (docs/projects.feature PJ8)"
|
||||
|
||||
[dependencies]
|
||||
dunce = "1"
|
||||
# the version engine/bundle parses TSX with
|
||||
oxc = { version = "=0.152.0", features = ["ast_visit"] }
|
||||
raea-io-home = { path = "../../../io/home" }
|
||||
serde_json = "1"
|
||||
# what the scan finds, as raea's one Finding (docs/direction.feature DR3)
|
||||
raea-core-facts = { path = "../../../core/facts" }
|
||||
@@ -157,7 +157,7 @@ pub(crate) fn resolve(from: &Path, spec: &str) -> Option<PathBuf> {
|
||||
}
|
||||
tries.extend([base.join("index.tsx"), base.join("index.ts")]);
|
||||
let found = tries.into_iter().find(|p| p.is_file())?;
|
||||
Some(std::fs::canonicalize(&found).unwrap_or(found))
|
||||
Some(dunce::canonicalize(&found).unwrap_or(found))
|
||||
}
|
||||
|
||||
/// An import of a file (not a package): relative, absolute, or the workspace's shared/ (@shared/...).
|
||||
@@ -183,7 +183,7 @@ fn manifest(path: &Path) -> Option<Value> {
|
||||
/// The folder's registry. `overridden`: the controller ids the project's overrides name, each checked against the
|
||||
/// controllers there (the folder's and its workspace's controllers/).
|
||||
pub fn scan(dir: &Path, overridden: &[String]) -> Registry {
|
||||
let dir = std::fs::canonicalize(dir).unwrap_or_else(|_| dir.to_path_buf());
|
||||
let dir = dunce::canonicalize(dir).unwrap_or_else(|_| dir.to_path_buf());
|
||||
let project = up(&dir, ".raea/project").is_some();
|
||||
let mut found = Vec::new();
|
||||
sources(&dir, "", 0, &mut found);
|
||||
@@ -192,7 +192,7 @@ pub fn scan(dir: &Path, overridden: &[String]) -> Registry {
|
||||
.map(|(path, rel)| {
|
||||
let src = std::fs::read_to_string(&path).unwrap_or_default();
|
||||
let facts = read::read(&src, rel.ends_with(".tsx"));
|
||||
File { path: std::fs::canonicalize(&path).unwrap_or(path), rel, facts }
|
||||
File { path: dunce::canonicalize(&path).unwrap_or(path), rel, facts }
|
||||
})
|
||||
.collect();
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ impl Lint {
|
||||
|
||||
/// A path with the home folder as ~, as a person reads it.
|
||||
fn tilde(p: &Path) -> String {
|
||||
match std::env::var_os("HOME").map(PathBuf::from) {
|
||||
match raea_io_home::user_home() {
|
||||
Some(h) if p.starts_with(&h) => format!("~/{}", p.strip_prefix(&h).unwrap_or(p).display()),
|
||||
_ => p.display().to_string(),
|
||||
}
|
||||
@@ -74,7 +74,10 @@ pub(super) fn lint(reg: &Registry, files: &[File], used_by: &BTreeMap<String, BT
|
||||
let comp_files: BTreeSet<&str> = reg.compositions.iter().map(|c| c.file.as_str()).collect();
|
||||
let controller_files: BTreeSet<&str> = reg.controllers.iter().map(|c| c.file.as_str()).collect();
|
||||
// the workspace's shared/, which a project reaches as @shared/
|
||||
let shared = super::up(®.dir, ".raea/workspace").map(|w| w.join("shared")).map(|s| s.canonicalize().unwrap_or(s));
|
||||
let shared = super::up(®.dir, ".raea/workspace").map(|w| {
|
||||
let s = w.join("shared");
|
||||
dunce::canonicalize(&s).unwrap_or(s)
|
||||
});
|
||||
|
||||
for f in files {
|
||||
if let Some(why) = &f.facts.broken {
|
||||
@@ -102,7 +105,7 @@ pub(super) fn lint(reg: &Registry, files: &[File], used_by: &BTreeMap<String, BT
|
||||
"outside",
|
||||
format!("imports {} from outside the project", tilde(&to)),
|
||||
&match in_shared {
|
||||
Some(r) => format!("import it by the workspace's name for it: \"@shared/{}\"", r.with_extension("").display()),
|
||||
Some(r) => format!("import it by the workspace's name for it: \"@shared/{}\"", r.with_extension("").to_string_lossy().replace(std::path::MAIN_SEPARATOR, "/")),
|
||||
None => "move it to the workspace's shared/ and import it as @shared/<kind>/<name>, or copy it into the project (raea component add, for raea's sets)".into(),
|
||||
},
|
||||
))
|
||||
|
||||
@@ -35,7 +35,7 @@ mod tempdir {
|
||||
static N: std::sync::atomic::AtomicUsize = std::sync::atomic::AtomicUsize::new(0);
|
||||
let d = std::env::temp_dir().join(format!("raea-registry-{}-{}", std::process::id(), N.fetch_add(1, std::sync::atomic::Ordering::Relaxed)));
|
||||
std::fs::create_dir_all(&d).unwrap();
|
||||
Dir(std::fs::canonicalize(&d).unwrap())
|
||||
Dir(dunce::canonicalize(&d).unwrap())
|
||||
}
|
||||
}
|
||||
impl Drop for Dir {
|
||||
|
||||
@@ -49,6 +49,11 @@ fn old_briefs(dir: &Path, depth: usize, out: &mut Vec<Finding>) {
|
||||
|
||||
/// A committed git-config file's keys this version writes, and its include from the repo's config.
|
||||
fn format(repo: &Path, file: &Path, keys: &[(&str, String)], out: &mut Vec<Finding>) {
|
||||
// first, so its fix runs before the others: with it there, every git command in the repo fails (#169)
|
||||
if crate::repair::has_verbatim_include(repo) {
|
||||
let says = format!("{}: its git config includes a \\\\?\\ path Git for Windows can't open (written by raea 0.1.5 or 0.1.6 on Windows), so every git command in it fails; --fix replaces it", repo.display());
|
||||
out.push(Finding { says, fix: Fix::Include(repo.to_path_buf(), file.to_path_buf()) });
|
||||
}
|
||||
for (k, v) in keys {
|
||||
if get(file, k).is_none() {
|
||||
out.push(Finding { says: format!("{}: no {k} (an older format); --fix sets it to {v}", file.display()), fix: Fix::Set(file.to_path_buf(), k.to_string(), v.clone()) });
|
||||
@@ -56,7 +61,7 @@ fn format(repo: &Path, file: &Path, keys: &[(&str, String)], out: &mut Vec<Findi
|
||||
}
|
||||
// only a folder that is its own repo includes its file (a workspace, a split project); an inline project shares
|
||||
// the workspace's repo, whose config must not take one project's keys
|
||||
let own = git(repo, &["rev-parse", "--show-toplevel"]).ok().and_then(|t| Path::new(&t).canonicalize().ok()) == repo.canonicalize().ok();
|
||||
let own = git(repo, &["rev-parse", "--show-toplevel"]).ok().and_then(|t| dunce::canonicalize(Path::new(&t)).ok()) == dunce::canonicalize(repo).ok();
|
||||
let first = keys.first().map(|(k, _)| *k).unwrap_or_default();
|
||||
let read = git(repo, &["config", first]).ok().filter(|v| !v.is_empty());
|
||||
if own && read.is_none() && get(file, first).is_some() {
|
||||
@@ -107,7 +112,7 @@ pub fn registry_dir(from: &Path) -> Option<PathBuf> {
|
||||
if let Some(p) = up(from, ".raea/project") {
|
||||
return Some(p);
|
||||
}
|
||||
let from = from.canonicalize().unwrap_or_else(|_| from.to_path_buf());
|
||||
let from = dunce::canonicalize(from).unwrap_or_else(|_| from.to_path_buf());
|
||||
(up(&from, ".raea/workspace").as_deref() != Some(from.as_path())).then_some(from)
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ use serde_json::json;
|
||||
mod controllers;
|
||||
pub mod doctor;
|
||||
mod literal;
|
||||
mod repair;
|
||||
pub mod next;
|
||||
pub mod registry;
|
||||
mod storage;
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
//! Workspaces raea 0.1.5 and 0.1.6 broke on Windows (#169): their include.path is a relative climb glued to a `\\?\`
|
||||
//! path (`../../../../\\?\C:/\/Users/...`), which Git for Windows can't open, so every git command in the repo failed
|
||||
//! with "Invalid argument", `git rev-parse` too. A repair can't ask git, then: it reads the repo's config file itself
|
||||
//! and drops those lines, and the include is added again the right way (workspace::include, run by `raea workspace
|
||||
//! init` inside it, `raea workspace adopt` and `raea doctor --fix`).
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
/// The repo's own config file, found without git: `.git/config`, or the config in the folder a `.git` file names (a
|
||||
/// submodule's, under the workspace's .git/modules).
|
||||
fn config_file(repo: &Path) -> Option<PathBuf> {
|
||||
let dot = repo.join(".git");
|
||||
if dot.is_dir() {
|
||||
return Some(dot.join("config"));
|
||||
}
|
||||
let text = std::fs::read_to_string(&dot).ok()?;
|
||||
let dir = PathBuf::from(text.lines().find_map(|l| l.strip_prefix("gitdir:"))?.trim());
|
||||
Some(if dir.is_absolute() { dir } else { repo.join(dir) }.join("config"))
|
||||
}
|
||||
|
||||
/// The config's text without the `path = ...\\?\...` lines of its [include] sections, and whether there were any.
|
||||
/// [includeIf] sections and every other line are kept as they are.
|
||||
pub(crate) fn without_verbatim(text: &str) -> (String, bool) {
|
||||
let mut section = String::new();
|
||||
let mut dropped = false;
|
||||
let eol = if text.contains("\r\n") { "\r\n" } else { "\n" };
|
||||
let kept: Vec<&str> = text
|
||||
.lines()
|
||||
.filter(|l| {
|
||||
let t = l.trim();
|
||||
if t.starts_with('[') {
|
||||
section = t.trim_start_matches('[').split(']').next().unwrap_or_default().trim().to_ascii_lowercase();
|
||||
return true;
|
||||
}
|
||||
let key = t.split('=').next().unwrap_or_default().trim();
|
||||
let bad = section == "include" && key.eq_ignore_ascii_case("path") && t.contains("?\\");
|
||||
dropped |= bad;
|
||||
!bad
|
||||
})
|
||||
.collect();
|
||||
(kept.join(eol) + eol, dropped)
|
||||
}
|
||||
|
||||
/// Whether the repo's config holds an include git can't open on Windows (what `raea doctor` reports).
|
||||
pub fn has_verbatim_include(repo: &Path) -> bool {
|
||||
config_file(repo).and_then(|c| std::fs::read_to_string(c).ok()).is_some_and(|t| without_verbatim(&t).1)
|
||||
}
|
||||
|
||||
/// Drops those includes from the repo's config. Ok(true) when there were some.
|
||||
pub(crate) fn drop_verbatim_includes(repo: &Path) -> Result<bool, String> {
|
||||
let Some(cfg) = config_file(repo) else { return Ok(false) };
|
||||
let Ok(text) = std::fs::read_to_string(&cfg) else { return Ok(false) };
|
||||
let (fixed, dropped) = without_verbatim(&text);
|
||||
if dropped {
|
||||
std::fs::write(&cfg, fixed).map_err(|e| format!("{}: {e}", cfg.display()))?;
|
||||
}
|
||||
Ok(dropped)
|
||||
}
|
||||
@@ -22,7 +22,7 @@ fn a_spec_module_is_tidy_typescript() {
|
||||
|
||||
#[test]
|
||||
fn up_finds_the_nearest_marker() {
|
||||
let root = std::env::temp_dir().canonicalize().unwrap().join(format!("raea-ws-up-{}", std::process::id()));
|
||||
let root = dunce::canonicalize(std::env::temp_dir()).unwrap().join(format!("raea-ws-up-{}", std::process::id()));
|
||||
let deep = root.join("projects/launch/media");
|
||||
std::fs::create_dir_all(&deep).unwrap();
|
||||
std::fs::create_dir_all(root.join(".raea")).unwrap();
|
||||
@@ -129,18 +129,53 @@ fn doctor_finds_old_briefs_and_old_skills() {
|
||||
fn the_root_with_none_set() {
|
||||
let home = scratch("home-root");
|
||||
assert_eq!(default_root(&home), home.join("Documents/raea"));
|
||||
// an empty ~/Studio isn't one; one with a workspace stays the root
|
||||
std::fs::create_dir_all(home.join("Studio/notes")).unwrap();
|
||||
assert_eq!(default_root(&home), home.join("Documents/raea"));
|
||||
// never ~/Studio, even with a workspace in it (Shane 11-14: "no internal no studio"; raea.root says otherwise)
|
||||
std::fs::create_dir_all(home.join("Studio/acme/.raea")).unwrap();
|
||||
std::fs::write(home.join("Studio/acme/.raea/workspace"), "").unwrap();
|
||||
assert_eq!(default_root(&home), home.join("Studio"));
|
||||
assert_eq!(default_root(&home), home.join("Documents/raea"));
|
||||
// iCloud keeping Documents: ~/raea
|
||||
let synced = scratch("home-icloud");
|
||||
std::fs::create_dir_all(synced.join("Library/Mobile Documents/com~apple~CloudDocs/Documents")).unwrap();
|
||||
assert_eq!(default_root(&synced), synced.join("raea"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_workspace_reads_back_through_git() {
|
||||
// Windows: canonicalize() gives \\?\C:\..., a path Git for Windows can neither read nor lock, and one that shares no
|
||||
// prefix with the C:/... git prints, so the include climbed to the root (../../../../\\?\C:/...) and every git
|
||||
// command in the workspace failed; ids were never written and nothing read back (0.1.5, 0.1.6)
|
||||
let ws = scratch("plain");
|
||||
let made = crate::workspace::workspace(&["adopt".into(), ws.display().to_string(), "--name".into(), "Plain".into()]);
|
||||
assert!(made.is_ok(), "{made:?}");
|
||||
let git = |dir: &Path, a: &[&str]| {
|
||||
let o = std::process::Command::new("git").arg("-C").arg(dir).args(a).output().unwrap();
|
||||
(o.status.success(), String::from_utf8_lossy(&o.stdout).trim().to_string(), String::from_utf8_lossy(&o.stderr).trim().to_string())
|
||||
};
|
||||
let (ok, inc, err) = git(&ws, &["config", "--get-all", "include.path"]);
|
||||
assert!(ok && inc == "../.raea/workspace", "include.path {inc:?} {err}");
|
||||
let (ok, id, err) = git(&ws, &["config", "workspace.id"]);
|
||||
assert!(ok && id.starts_with("ws_"), "workspace.id {id:?} {err}");
|
||||
let found = up(&ws.join("projects"), ".raea/workspace").expect("up finds the workspace");
|
||||
assert!(!found.to_string_lossy().starts_with(r"\\?\"), "{}", found.display());
|
||||
crate::workspace::new_project_in(&found, "Desk", None).unwrap();
|
||||
let (ok, pid, err) = git(&ws.join("projects/desk"), &["config", "-f", ".raea/project", "project.id"]);
|
||||
assert!(ok && pid.starts_with("pj_"), "project.id {pid:?} {err}");
|
||||
let _ = std::fs::remove_dir_all(&ws);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn an_include_path_is_relative_with_slashes() {
|
||||
use crate::workspace::relative;
|
||||
assert_eq!(relative(Path::new("/w/.git"), Path::new("/w/.raea/workspace")), "../.raea/workspace");
|
||||
assert_eq!(relative(Path::new("/w/.git/modules/projects/p"), Path::new("/w/projects/p/.raea/project")), "../../../../projects/p/.raea/project");
|
||||
#[cfg(windows)]
|
||||
{
|
||||
// git's C:/... and a plain C:\... are one root; another drive is named whole, not climbed to
|
||||
assert_eq!(relative(Path::new("C:/w/.git"), Path::new(r"C:\w\.raea\workspace")), "../.raea/workspace");
|
||||
assert_eq!(relative(Path::new(r"C:\w\.git"), Path::new(r"D:\o\.raea\workspace")), "D:/o/.raea/workspace");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_new_workspace_and_project_have_the_layout() {
|
||||
// docs/layout.feature LY1: a folder per kind in the project and in the workspace's shared/, no media/ brand/ parts/
|
||||
@@ -168,3 +203,39 @@ fn a_new_workspace_and_project_have_the_layout() {
|
||||
assert!(tracked.contains("projects/desk-test/components/.gitkeep") && tracked.contains("shared/assets/.gitkeep"), "{tracked}");
|
||||
let _ = std::fs::remove_dir_all(&ws);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_verbatim_include_is_dropped_and_nothing_else() {
|
||||
// .git/config as raea 0.1.6 left it on Windows (#169, read off the test PC), with an [includeIf] and a good include
|
||||
let text = "[core]\n\trepositoryformatversion = 0\n[include]\n\tpath = ../../../../../../../../\\\\\\\\?\\\\C:/\\\\/Users/you/Documents/raea/acme/.raea/workspace\n[includeIf \"gitdir:~/x/\"]\n\tpath = ../keep?\\\\x\n[include]\n\tpath = ../.raea/workspace\n";
|
||||
let (fixed, dropped) = crate::repair::without_verbatim(text);
|
||||
assert!(dropped);
|
||||
assert_eq!(fixed, "[core]\n\trepositoryformatversion = 0\n[include]\n[includeIf \"gitdir:~/x/\"]\n\tpath = ../keep?\\\\x\n[include]\n\tpath = ../.raea/workspace\n");
|
||||
assert_eq!(crate::repair::without_verbatim(&fixed).0, fixed);
|
||||
assert!(!crate::repair::without_verbatim("[include]\r\n\tpath = ../.raea/workspace\r\n").1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_workspace_0_1_6_broke_is_repaired() {
|
||||
// updated from 0.1.6: its include names a \\?\ path; doctor says so, and adopt (as init inside it) puts it right
|
||||
let ws = scratch("repair");
|
||||
crate::workspace::workspace(&["adopt".into(), ws.display().to_string(), "--name".into(), "Repair".into()]).unwrap();
|
||||
let cfg = ws.join(".git/config");
|
||||
let bad = "\tpath = ../../../../\\\\\\\\?\\\\C:/\\\\/Users/you/Documents/raea/repair/.raea/workspace\n";
|
||||
let text = std::fs::read_to_string(&cfg).unwrap().replace("\tpath = ../.raea/workspace\n", bad);
|
||||
std::fs::write(&cfg, text).unwrap();
|
||||
// on Windows this is #169 itself: Git for Windows refuses the include, so every git command in the repo fails
|
||||
let status = || std::process::Command::new("git").arg("-C").arg(&ws).args(["status", "--short"]).output().unwrap();
|
||||
if cfg!(windows) {
|
||||
assert!(!status().status.success(), "git ran in a repo whose include names a \\\\?\\ path");
|
||||
}
|
||||
assert!(crate::repair::has_verbatim_include(&ws));
|
||||
let said: Vec<String> = crate::doctor::findings(&ws, &[], "test").into_iter().filter(|f| f.fixable()).map(|f| f.says).collect();
|
||||
assert!(said.iter().any(|s| s.contains("Git for Windows can't open")), "{said:?}");
|
||||
crate::workspace::workspace(&["adopt".into(), ws.display().to_string()]).unwrap();
|
||||
assert!(!crate::repair::has_verbatim_include(&ws));
|
||||
let o = std::process::Command::new("git").arg("-C").arg(&ws).args(["config", "--get-all", "include.path"]).output().unwrap();
|
||||
assert_eq!(String::from_utf8_lossy(&o.stdout).trim(), "../.raea/workspace");
|
||||
assert!(status().status.success(), "git status after the repair: {}", String::from_utf8_lossy(&status().stderr));
|
||||
let _ = std::fs::remove_dir_all(&ws);
|
||||
}
|
||||
@@ -92,7 +92,9 @@ pub(crate) fn new_id(prefix: &str) -> String {
|
||||
/// Where workspaces live on this machine: `git config --global raea.root`, else default_root.
|
||||
pub fn root() -> PathBuf {
|
||||
let set = config(None, &["--global", "raea.root"]).ok().filter(|s| !s.is_empty());
|
||||
let home = std::env::var_os("HOME").map(PathBuf::from).unwrap_or_default();
|
||||
// HOME, else USERPROFILE: Windows sets no HOME for an app opened from the Start menu, which made the root
|
||||
// Documents/raea under whatever folder raea ran in. git's global config is found the same way.
|
||||
let home = raea_io_home::user_home().unwrap_or_default();
|
||||
match set {
|
||||
Some(s) if s.starts_with("~/") => home.join(&s[2..]),
|
||||
Some(s) => PathBuf::from(s),
|
||||
@@ -100,36 +102,30 @@ pub fn root() -> PathBuf {
|
||||
}
|
||||
}
|
||||
|
||||
/// Where workspaces go with no raea.root set: ~/Studio where workspaces are already (the root before 11-10), else
|
||||
/// ~/Documents/raea, or ~/raea when iCloud keeps the Documents folder (a workspace's git history and footage don't
|
||||
/// belong in a synced folder). The feed's host says the same (raea-feed host/workspace.ts defaultRoot).
|
||||
/// Where a workspace someone names goes with no raea.root set: ~/Documents/raea, or ~/raea when iCloud keeps the
|
||||
/// Documents folder (a workspace's git history and footage don't belong in a synced folder). Nothing is made there
|
||||
/// until the person or an agent sets a workspace up (`raea workspace init NAME`); ~/Studio, the root on raea's own Mac
|
||||
/// before 11-10, is no one else's (Shane 11-14: "no internal no studio"). The feed's host says the same (raea-feed
|
||||
/// host/workspace.ts defaultRoot).
|
||||
pub fn default_root(home: &Path) -> PathBuf {
|
||||
let studio = home.join("Studio");
|
||||
if holds_workspace(&studio) {
|
||||
studio
|
||||
} else if home.join("Library/Mobile Documents/com~apple~CloudDocs/Documents").is_dir() {
|
||||
if home.join("Library/Mobile Documents/com~apple~CloudDocs/Documents").is_dir() {
|
||||
home.join("raea")
|
||||
} else {
|
||||
home.join("Documents/raea")
|
||||
}
|
||||
}
|
||||
|
||||
/// Whether a folder in `dir` is a workspace (it has .raea/workspace).
|
||||
fn holds_workspace(dir: &Path) -> bool {
|
||||
let Ok(entries) = std::fs::read_dir(dir) else { return false };
|
||||
for e in entries.flatten() {
|
||||
if e.path().join(".raea/workspace").exists() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
/// The include in a repo's own config that makes `git config` read a committed file. Idempotent; the path is relative
|
||||
/// to the config file, which for a submodule lives under the workspace's .git/modules.
|
||||
pub(crate) fn include(repo: &Path, file: &Path) -> R<()> {
|
||||
// both ends the same way, plain (dunce): on Windows git prints C:/... and canonicalize() alone gave \\?\C:\..., which
|
||||
// share no root, so the include climbed to the drive and named the file by its \\?\ path, and every git command in
|
||||
// the workspace failed ("Invalid argument") from its first commit (0.1.5, 0.1.6). Such an include goes first: with
|
||||
// it there, the rev-parse below fails too.
|
||||
crate::repair::drop_verbatim_includes(repo)?;
|
||||
let cfg = PathBuf::from(git(repo, &["rev-parse", "--path-format=absolute", "--git-path", "config"])?);
|
||||
let file = file.canonicalize().map_err(|e| format!("{}: {e}", file.display()))?;
|
||||
let cfg = dunce::canonicalize(&cfg).unwrap_or(cfg);
|
||||
let file = dunce::canonicalize(file).map_err(|e| format!("{}: {e}", file.display()))?;
|
||||
let rel = relative(cfg.parent().unwrap_or(Path::new("/")), &file);
|
||||
let have = config(Some(&cfg), &["--get-all", "include.path"]).unwrap_or_default();
|
||||
if have.lines().any(|l| l.trim() == rel) {
|
||||
@@ -138,9 +134,14 @@ pub(crate) fn include(repo: &Path, file: &Path) -> R<()> {
|
||||
config(Some(&cfg), &["--add", "include.path", &rel]).map(drop)
|
||||
}
|
||||
|
||||
fn relative(from: &Path, to: &Path) -> String {
|
||||
/// `to` from the folder `from`, '/' between its parts as git reads an include.path; `to` itself (with '/') when the two
|
||||
/// share no root, as two drives don't.
|
||||
pub(crate) fn relative(from: &Path, to: &Path) -> String {
|
||||
let (a, b): (Vec<_>, Vec<_>) = (from.components().collect(), to.components().collect());
|
||||
let same = a.iter().zip(&b).take_while(|(x, y)| x == y).count();
|
||||
if same == 0 {
|
||||
return to.to_string_lossy().replace(std::path::MAIN_SEPARATOR, "/");
|
||||
}
|
||||
let mut out: Vec<String> = std::iter::repeat_n("..".to_string(), a.len() - same).collect();
|
||||
out.extend(b[same..].iter().map(|c| c.as_os_str().to_string_lossy().into_owned()));
|
||||
out.join("/")
|
||||
@@ -225,7 +226,7 @@ fn init(name: Option<&str>, layout: Option<&str>) -> R<String> {
|
||||
/// An existing folder made a workspace in place: git when it isn't a repo, .raea/workspace, and each folder in it
|
||||
/// holding a brief.ts registered as an inline project. Nothing is moved or deleted.
|
||||
fn adopt(dir: &Path, name: Option<&str>, layout: Option<&str>) -> R<String> {
|
||||
let dir = dir.canonicalize().map_err(|e| format!("{}: {e}", dir.display()))?;
|
||||
let dir = dunce::canonicalize(dir).map_err(|e| format!("{}: {e}", dir.display()))?;
|
||||
let name = name.map(String::from).unwrap_or_else(|| dir.file_name().map(|n| n.to_string_lossy().into_owned()).unwrap_or_default());
|
||||
make_workspace(&dir, &name, layout_of(layout)?)?;
|
||||
let mut found = vec![];
|
||||
@@ -256,7 +257,7 @@ pub(crate) fn make_workspace(dir: &Path, name: &str, layout: &str) -> R<()> {
|
||||
let parent = dir.parent().unwrap_or(Path::new("/"));
|
||||
if !dir.join(".git").exists() && parent.exists() {
|
||||
let top = git(parent, &["rev-parse", "--show-toplevel"]).ok().map(PathBuf::from);
|
||||
if top.is_some_and(|t| t.canonicalize().ok() == parent.canonicalize().ok()) {
|
||||
if top.is_some_and(|t| dunce::canonicalize(t).ok() == dunce::canonicalize(parent).ok()) {
|
||||
return Err(format!("{} would be a folder of the git repo {}: set where workspaces go, `git config --global raea.root ~/Documents/raea`", dir.display(), parent.display()));
|
||||
}
|
||||
}
|
||||
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
# #159: --aov and RAEA_PASS on a multisampled 3D camera write every frame. Both read the camera's prepasses as
|
||||
# single-sampled textures, so they turn its multisampling off; the camera row's post-processing turned it back on: in
|
||||
# a render, on the first frame whose post changed (ramp.tsx's bloom ramps); in a game, on every frame its rows set
|
||||
# (game.tsx). Frame 2 was then refused ("Texture binding 0 expects multisampled = false, but given a view with
|
||||
# samples = 4"), with frames 0 and 1 written. Here frames 0 to 5 of each are rendered: --aov must write each frame's
|
||||
# depth and motion at the frame's size (320 x 180 floats: 4 and 8 bytes a pixel), the depth not all zero (something
|
||||
# drawn), and RAEA_PASS=depth all six pictures. Exits 1 on a failure.
|
||||
# bench/aov-msaa/check.sh (RAEA_BIN: the raea to run, default target/release/raea)
|
||||
cd "$(dirname "$0")/../.." || exit 2
|
||||
BIN=${RAEA_BIN:-$PWD/target/release/raea}
|
||||
AT=0,1,2,3,4,5
|
||||
export RAEA_SIGN=0 RAEA_MARK=0 RAEA_EXPORT_CACHE=0 RAEA_AUDIO_MUTE=1
|
||||
OUT=$(mktemp -d "${TMPDIR:-/tmp}/raea-aov-msaa.XXXXXX")
|
||||
trap 'rm -rf "$OUT"' EXIT
|
||||
refused() { grep -m1 REFUSED "$1" || tail -3 "$1"; }
|
||||
for c in ramp game; do
|
||||
"$BIN" render "bench/aov-msaa/$c.tsx" --at "$AT" --aov -o "$OUT/$c" > "$OUT/$c.log" 2>&1 || { echo "FAIL: $c --aov: the render failed"; refused "$OUT/$c.log"; exit 1; }
|
||||
for i in 0 1 2 3 4 5; do
|
||||
n=$(printf '%05d' "$i")
|
||||
[ "$(wc -c < "$OUT/$c/depth/frame-$n.f32" 2>/dev/null | tr -d ' ')" = 230400 ] || { echo "FAIL: $c --aov: frame $i's depth is missing or not 320 x 180"; exit 1; }
|
||||
[ "$(wc -c < "$OUT/$c/motion/frame-$n.f32" 2>/dev/null | tr -d ' ')" = 460800 ] || { echo "FAIL: $c --aov: frame $i's motion is missing or not 320 x 180"; exit 1; }
|
||||
[ "$(LC_ALL=C tr -d '\0' < "$OUT/$c/depth/frame-$n.f32" | head -c 1 | wc -c | tr -d ' ')" = 1 ] || { echo "FAIL: $c --aov: frame $i's depth is all zero"; exit 1; }
|
||||
done
|
||||
echo "PASS: $c --aov: frames 0 to 5, each with its depth and motion"
|
||||
done
|
||||
RAEA_PASS=depth RAEA_READBACK=rgba "$BIN" render bench/aov-msaa/ramp.tsx --at "$AT" -o "$OUT/pass" > "$OUT/pass.log" 2>&1 || { echo "FAIL: ramp RAEA_PASS=depth: the render failed"; refused "$OUT/pass.log"; exit 1; }
|
||||
[ "$(ls "$OUT/pass"/frame-*.png 2>/dev/null | wc -l | tr -d ' ')" = 6 ] || { echo "FAIL: ramp RAEA_PASS=depth: not six frames"; exit 1; }
|
||||
echo "PASS: ramp RAEA_PASS=depth: frames 0 to 5"
|
||||
@@ -0,0 +1,31 @@
|
||||
// #159: a game's 3D (its rows set on the live engine each frame, so raea-sys-post's msaa_for_3d sees them): a
|
||||
// multisampled camera, a still bloom and a box that moves, rendered with --aov (check.sh).
|
||||
import { AbsoluteFill, registerRoot, Composition, useGameState } from "raea";
|
||||
import { Bloom, Canvas3D, ToneMapping, manifold } from "raea/3d";
|
||||
import { Camera3d } from "raea/camera";
|
||||
import { AmbientLight, DirectionalLight } from "raea/light";
|
||||
import { Mesh3d } from "raea/mesh";
|
||||
import { StandardMaterial } from "raea/pbr";
|
||||
import { Transform } from "raea/transform";
|
||||
|
||||
const GROUND = manifold.box(20, 1, 20).move(0, -0.5, 0);
|
||||
const BOX = manifold.box(1.5, 1.5, 1.5);
|
||||
|
||||
function Game() {
|
||||
const t = useGameState({ t: 0 }, (s) => ({ t: s.t + 1 })).t;
|
||||
return (
|
||||
<AbsoluteFill style={{ background: "#202830" }}>
|
||||
<Canvas3D>
|
||||
<Camera3d transform={Transform.fromXyz(6, 3, 8).lookingAt([0, 0.8, 0], [0, 1, 0])} projection={{ Perspective: { fov: 0.8, near: 0.1, far: 100 } }} />
|
||||
<DirectionalLight name="sun" transform={Transform.fromXyz(10, 20, 5).lookingAt([0, 0, 0], [0, 1, 0])} illuminance={20000} shadow_maps_enabled />
|
||||
<AmbientLight brightness={200} />
|
||||
<Mesh3d name="ground" shape={GROUND}><StandardMaterial base_color="#6a7a50" perceptual_roughness={0.9} /></Mesh3d>
|
||||
<Mesh3d name="box" shape={BOX} transform={Transform.fromXyz(-1.5 + t * 0.2, 0.75, 0)}><StandardMaterial base_color="#d03020" emissive="#ffe0a0" emissive_intensity={4} /></Mesh3d>
|
||||
<ToneMapping mode="agx" />
|
||||
<Bloom intensity={0.3} threshold={0.8} />
|
||||
</Canvas3D>
|
||||
</AbsoluteFill>
|
||||
);
|
||||
}
|
||||
|
||||
registerRoot(() => <Composition id="game" component={Game} width={320} height={180} fps={30} durationInFrames={10} />);
|
||||
@@ -0,0 +1,31 @@
|
||||
// #159: a multisampled 3D camera (no AO or <AntiAliasing>) whose post-processing changes on every frame (a bloom ramp),
|
||||
// rendered with --aov and with RAEA_PASS (check.sh). Its frames read the camera's rows through raea-sys-post's sync.
|
||||
import { AbsoluteFill, interpolate, registerRoot, Composition, useCurrentFrame } from "raea";
|
||||
import { Bloom, Canvas3D, ToneMapping, manifold } from "raea/3d";
|
||||
import { Camera3d } from "raea/camera";
|
||||
import { AmbientLight, DirectionalLight } from "raea/light";
|
||||
import { Mesh3d } from "raea/mesh";
|
||||
import { StandardMaterial } from "raea/pbr";
|
||||
import { Transform } from "raea/transform";
|
||||
|
||||
const GROUND = manifold.box(20, 1, 20).move(0, -0.5, 0);
|
||||
const BOX = manifold.box(1.5, 1.5, 1.5);
|
||||
|
||||
function Ramp() {
|
||||
const f = useCurrentFrame();
|
||||
return (
|
||||
<AbsoluteFill style={{ background: "#202830" }}>
|
||||
<Canvas3D>
|
||||
<Camera3d transform={Transform.fromXyz(6, 3, 8).lookingAt([0, 0.8, 0], [0, 1, 0])} projection={{ Perspective: { fov: 0.8, near: 0.1, far: 100 } }} />
|
||||
<DirectionalLight name="sun" transform={Transform.fromXyz(10, 20, 5).lookingAt([0, 0, 0], [0, 1, 0])} illuminance={20000} shadow_maps_enabled />
|
||||
<AmbientLight brightness={200} />
|
||||
<Mesh3d name="ground" shape={GROUND}><StandardMaterial base_color="#6a7a50" perceptual_roughness={0.9} /></Mesh3d>
|
||||
<Mesh3d name="box" shape={BOX} transform={Transform.fromXyz(-1.5 + f * 0.2, 0.75, 0)}><StandardMaterial base_color="#d03020" emissive="#ffe0a0" emissive_intensity={4} /></Mesh3d>
|
||||
<ToneMapping mode="agx" />
|
||||
<Bloom intensity={interpolate(f, [0, 9], [0.1, 0.6])} threshold={0.8} />
|
||||
</Canvas3D>
|
||||
</AbsoluteFill>
|
||||
);
|
||||
}
|
||||
|
||||
registerRoot(() => <Composition id="ramp" component={Ramp} width={320} height={180} fps={30} durationInFrames={10} />);
|
||||
Executable
+46
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
# #162: every still of a batch (--at A,B,C in one run) shows its own frame's time, as it does alone and as a scene
|
||||
# stepped through every frame before it does. Since #77 a still of a scene no plugin carries state for isn't stepped to,
|
||||
# and the plugins' clock then never moved: every still sampled globals.time 0, and a batch's later frames drew its
|
||||
# first frame's <Material> uniforms (they land as keyed rows). time.tsx's face shows globals.time on its left half and
|
||||
# a uniform the frame gives its time on its right, so the halves match only when Time is the frame's. Its "time"
|
||||
# composition is drawn at 90, 30, 60 in one run (the clock forwards and back) and at 90 alone, and must step no frame
|
||||
# to reach them; "stepped" (the same face with an animation player, so its stills are stepped to, as 0.1.0 drew every
|
||||
# still) at the same three. Each frame's halves must match within 1 level, each "time" frame must match the "stepped"
|
||||
# one and 90 alone the batch's 90 (within 1 level), and 90 must be brighter than 60 and 60 than 30. Exits 1 on a failure.
|
||||
# bench/at-time/check.sh (RAEA_BIN: the raea to run, default target/release/raea)
|
||||
cd "$(dirname "$0")/../.." || exit 2
|
||||
BIN=${RAEA_BIN:-$PWD/target/release/raea}
|
||||
export RAEA_SIGN=0 RAEA_MARK=0 RAEA_EXPORT_CACHE=0
|
||||
OUT=$(mktemp -d "${TMPDIR:-/tmp}/raea-at-time.XXXXXX")
|
||||
trap 'rm -rf "$OUT"' EXIT
|
||||
draw() { # NAME COMPOSITION AT: the frames in $OUT/NAME, the plugin clock's trace in $OUT/NAME.log
|
||||
RAEA_PLUGIN_TRACE=1 "$BIN" render bench/at-time/time.tsx --composition "$2" --at "$3" -o "$OUT/$1" > "$OUT/$1.log" 2>&1 && [ -f "$OUT/$1/frame-00000.png" ] || { echo "FAIL $1: the render failed"; grep -v "^plugin clock" "$OUT/$1.log" | tail -4 | sed 's/^/ /'; exit 1; }
|
||||
}
|
||||
draw batch time 90,30,60
|
||||
draw lone time 90
|
||||
draw stepped stepped 90,30,60
|
||||
status=0
|
||||
fail() { echo "FAIL $*"; status=1; }
|
||||
steps() { grep -c "^plugin clock: .* step$" "$OUT/$1.log"; }
|
||||
(( $(steps batch) == 0 && $(steps lone) == 0 )) || fail "the time stills stepped $(steps batch) and $(steps lone) frames, wanted none (it has nothing a plugin carries)"
|
||||
(( $(steps stepped) > 0 )) || fail "the stepped stills stepped no frame, so they show nothing of the stepped clock"
|
||||
half() { magick "$1" -crop "24x48+$2+8" +repage -format "%[fx:int(255*mean.r+0.5)]" info:; } # FILE X: a half's grey
|
||||
apart() { magick "$1" "$2" -compose difference -composite -format "%[fx:int(255*maxima+0.5)]" info:; }
|
||||
k=0
|
||||
for at in 90 30 60; do
|
||||
f=$(printf 'frame-%05d.png' $k)
|
||||
for run in batch stepped; do
|
||||
t=$(half "$OUT/$run/$f" 4) u=$(half "$OUT/$run/$f" 36)
|
||||
(( t - u <= 1 && u - t <= 1 )) && echo "ok $run frame $at: globals.time's half $t, the uniform's $u" || fail "$run frame $at: globals.time's half is $t and the uniform's $u: Time isn't the frame's"
|
||||
done
|
||||
d=$(apart "$OUT/batch/$f" "$OUT/stepped/$f")
|
||||
(( d <= 1 )) || fail "frame $at differs from the stepped scene's by up to $d levels"
|
||||
eval "grey_$at=$(half "$OUT/batch/$f" 4)"
|
||||
k=$((k + 1))
|
||||
done
|
||||
d=$(apart "$OUT/lone/frame-00000.png" "$OUT/batch/frame-00000.png")
|
||||
(( d <= 1 )) && echo "ok frame 90 alone matches the batch's frame 90" || fail "frame 90 alone differs from the batch's frame 90 by up to $d levels"
|
||||
(( grey_90 > grey_60 && grey_60 > grey_30 )) || fail "the batch's frames 30, 60 and 90 are $grey_30, $grey_60 and $grey_90: frozen, not moving on"
|
||||
[ $status = 0 ] && echo "PASS every still of a batch shows its own frame's time, as alone and as stepped to"
|
||||
exit $status
|
||||
@@ -0,0 +1,35 @@
|
||||
// #162's composition, which bench/at-time/check.sh draws: one face, its left half grey by Bevy's globals.time and its
|
||||
// right half by a <Material> uniform the frame gives its time in seconds (each at a quarter of it), so the halves match
|
||||
// only when Time is the frame drawn's. "time" holds nothing a plugin carries, so a still draws only its own frame
|
||||
// (#77); "stepped" is the same face with an animation player on it (it plays nothing), which Bevy carries from frame
|
||||
// to frame, so a still is stepped to through every frame before it.
|
||||
import { Composition, registerRoot, useCurrentFrame } from "raea";
|
||||
import { Transform } from "raea/transform";
|
||||
import { Camera3d } from "raea/camera";
|
||||
import { Cuboid, Mesh3d } from "raea/mesh";
|
||||
import { BevyComponent } from "raea/3d";
|
||||
import { Material } from "@raea/render/bevy3d";
|
||||
|
||||
function Shot({ stepped }: { stepped: boolean }) {
|
||||
const f = useCurrentFrame();
|
||||
return (
|
||||
<>
|
||||
<Mesh3d transform={Transform.fromXyz(0, 0, 0)}>
|
||||
<Cuboid half_size={[2, 2, 0.01]} />
|
||||
<Material fragment="time.wesl" uniforms={{ seconds: f / 30 }} />
|
||||
{stepped ? <BevyComponent type="bevy_animation::AnimationPlayer" value={{ active_animations: {} }} /> : null}
|
||||
</Mesh3d>
|
||||
<Camera3d transform={Transform.fromXyz(0, 0, 3).lookingAt([0, 0, 0])} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
const Pure = () => <Shot stepped={false} />;
|
||||
const Stepped = () => <Shot stepped />;
|
||||
|
||||
registerRoot(() => (
|
||||
<>
|
||||
<Composition id="time" component={Pure} width={64} height={64} fps={30} durationInFrames={120} />
|
||||
<Composition id="stepped" component={Stepped} width={64} height={64} fps={30} durationInFrames={120} />
|
||||
</>
|
||||
));
|
||||
@@ -0,0 +1,13 @@
|
||||
// The left half grey by Bevy's globals.time, the right by the uniform the frame gives: each a quarter of its seconds.
|
||||
import bevy_pbr::render::{
|
||||
mesh_view_bindings::globals,
|
||||
forward_io::VertexOutput,
|
||||
};
|
||||
|
||||
@group(constants::MATERIAL_BIND_GROUP) @binding(0) var<uniform> seconds: f32;
|
||||
|
||||
@fragment
|
||||
fn fragment(in: VertexOutput) -> @location(0) vec4<f32> {
|
||||
let t = select(seconds, globals.time, in.uv.x < 0.5) / 4.0;
|
||||
return vec4<f32>(t, t, t, 1.0);
|
||||
}
|
||||
@@ -30,3 +30,6 @@ ignored = ["argh", "accesskit", "rand", "chacha20", "bytemuck", "indexmap", "non
|
||||
[features]
|
||||
default = ["default_font"]
|
||||
default_font = []
|
||||
|
||||
[build-dependencies]
|
||||
raea-io-home = { path = "../../io/home" }
|
||||
@@ -9,7 +9,7 @@ fn main() {
|
||||
let here = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap());
|
||||
let src = std::env::var("BEVY_SRC")
|
||||
.map(PathBuf::from)
|
||||
.unwrap_or_else(|_| PathBuf::from(std::env::var("HOME").unwrap()).join(".cache/raea-vendor/bevy-0.20.0"));
|
||||
.unwrap_or_else(|_| raea_io_home::user_home().unwrap().join(".cache/raea-vendor/bevy-0.20.0"));
|
||||
let out = PathBuf::from(std::env::var("OUT_DIR").unwrap());
|
||||
println!("cargo:rerun-if-changed=examples.list");
|
||||
println!("cargo:rerun-if-env-changed=BEVY_SRC");
|
||||
|
||||
@@ -7,6 +7,7 @@ publish = false
|
||||
description = "The Blitz-Bevy bridge's bench (run.sh): its examples, each a Bevy program that checks one of the bridge's claims (B3 H1-H11)"
|
||||
|
||||
[dev-dependencies]
|
||||
dunce = "1"
|
||||
raea-io-home = { path = "../../io/home" }
|
||||
raea-runtime-react = { path = "../../runtime/react" }
|
||||
raea-runtime-page = { path = "../../runtime/page" }
|
||||
|
||||
@@ -29,7 +29,7 @@ fn main() {
|
||||
std::process::exit(2);
|
||||
};
|
||||
let out = args.next();
|
||||
let js = PathBuf::from(js).canonicalize().expect("the bundle");
|
||||
let js = dunce::canonicalize(&PathBuf::from(js)).expect("the bundle");
|
||||
let mut app = App::new();
|
||||
app.add_plugins(
|
||||
DefaultPlugins
|
||||
|
||||
@@ -21,7 +21,7 @@ fn main() {
|
||||
eprintln!("usage: entity_ref ENTITY.js");
|
||||
std::process::exit(2);
|
||||
};
|
||||
let js = PathBuf::from(js).canonicalize().expect("the bundle");
|
||||
let js = dunce::canonicalize(&PathBuf::from(js)).expect("the bundle");
|
||||
let (w, h) = (320, 240);
|
||||
let mut app = App::new();
|
||||
app.add_plugins(
|
||||
|
||||
@@ -35,7 +35,7 @@ fn main() {
|
||||
eprintln!("usage: host_query HOSTQUERY.js");
|
||||
std::process::exit(2);
|
||||
};
|
||||
let js = PathBuf::from(js).canonicalize().expect("the bundle");
|
||||
let js = dunce::canonicalize(&PathBuf::from(js)).expect("the bundle");
|
||||
let mut app = App::new();
|
||||
app.add_plugins(
|
||||
DefaultPlugins
|
||||
|
||||
@@ -38,7 +38,7 @@ fn main() {
|
||||
std::process::exit(2);
|
||||
};
|
||||
let n = |i: usize, d: u32| args.get(i).and_then(|a| a.parse().ok()).unwrap_or(d);
|
||||
let a = Args { js: PathBuf::from(js).canonicalize().expect("the bundle"), out: out.clone(), size: (n(2, 640), n(3, 360)), frame: n(4, 30) as i64, fps: n(5, 30) as f64, scene_only };
|
||||
let a = Args { js: dunce::canonicalize(&PathBuf::from(js)).expect("the bundle"), out: out.clone(), size: (n(2, 640), n(3, 360)), frame: n(4, 30) as i64, fps: n(5, 30) as f64, scene_only };
|
||||
if window {
|
||||
std::process::exit(in_window(a));
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ fn main() {
|
||||
eprintln!("usage: shared_state SHARED.js");
|
||||
std::process::exit(2);
|
||||
};
|
||||
let js = PathBuf::from(js).canonicalize().expect("the bundle");
|
||||
let js = dunce::canonicalize(&PathBuf::from(js)).expect("the bundle");
|
||||
let mut app = App::new();
|
||||
app.add_plugins(
|
||||
DefaultPlugins
|
||||
|
||||
@@ -30,7 +30,7 @@ fn main() {
|
||||
std::process::exit(2);
|
||||
};
|
||||
let out = args.next();
|
||||
let js = PathBuf::from(js).canonicalize().expect("the bundle");
|
||||
let js = dunce::canonicalize(&PathBuf::from(js)).expect("the bundle");
|
||||
let mut app = App::new();
|
||||
app.add_plugins(
|
||||
DefaultPlugins
|
||||
|
||||
Executable
+38
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
# text-overflow: ellipsis cuts only text that doesn't fit. A label shrink-wrapped by its box (a grid of picker cells,
|
||||
# each name centred under a dot) drew "Fr…" and "Mou…" for words that fit: the ellipsis was measured against the box's
|
||||
# rounded width, up to a pixel narrower than the text it wraps (each edge rounds on its own), and blitz-paint now
|
||||
# measures against the unrounded width the text was laid out in. Checked, each page rendered twice, once with
|
||||
# `text-overflow: ellipsis` and once with `clip`:
|
||||
# fit shrink-wrapped labels at many x offsets: the two renders are byte-identical (no ellipsis drawn)
|
||||
# over a word wider than its 40 px box: the two renders differ (the ellipsis is drawn)
|
||||
# Exits 1 on a failure.
|
||||
# bench/ellipsis-fit/check.sh (RAEA_BIN: the raea to run, default target/release/raea)
|
||||
cd "$(dirname "$0")/../.." || exit 2
|
||||
BIN=${RAEA_BIN:-$PWD/target/release/raea}
|
||||
export RAEA_SIGN=0 RAEA_MARK=0 RAEA_EXPORT_CACHE=0
|
||||
OUT=$(mktemp -d "${TMPDIR:-/tmp}/raea-ellipsis-fit.XXXXXX")
|
||||
trap 'rm -rf "$OUT"' EXIT
|
||||
status=0
|
||||
page() { # NAME OVERFLOW BODY
|
||||
cat > "$OUT/$1-$2.html" <<HTML
|
||||
<!doctype html><html><head><meta charset="utf-8"><style>
|
||||
html,body{margin:0;width:640px;height:200px;background:#0a0a0a;font:11px/16px system-ui,sans-serif;color:#aaa}
|
||||
.grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;width:617px;padding:9px 11.5px}
|
||||
.cell{display:flex;min-width:0;flex-direction:column;align-items:center;gap:4px;padding:8px 4px 6px}
|
||||
.dot{width:30px;height:30px;border-radius:15px;background:#6c6}
|
||||
.t{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:$2}
|
||||
.narrow{width:40px;margin:20px}
|
||||
</style></head><body><div id="root" data-composition-id="main" data-start="0" data-width="640" data-height="200" data-duration="1">$3</div></body></html>
|
||||
HTML
|
||||
"$BIN" render "$OUT/$1-$2.html" -o "$OUT/$1-$2.png" > "$OUT/$1-$2.log" 2>&1 || { echo "FAIL $1 ($2) didn't render"; cat "$OUT/$1-$2.log"; status=1; }
|
||||
}
|
||||
cells=""
|
||||
for w in Owl Frog Dog Mouse Bunny Bear Fox Cat Tabby Snow Rose Sky Mint Slate; do cells+="<div class=\"cell\"><span class=\"dot\"></span><span class=\"t\">$w</span></div>"; done
|
||||
for ov in ellipsis clip; do
|
||||
page fit "$ov" "<div class=\"grid\">$cells</div>"
|
||||
page over "$ov" "<div class=\"narrow t\">Mousetrap</div>"
|
||||
done
|
||||
cmp -s "$OUT/fit-ellipsis.png" "$OUT/fit-clip.png" && echo "PASS fit: shrink-wrapped labels draw no ellipsis" || { echo "FAIL fit: an ellipsis was drawn on a label that fits"; status=1; }
|
||||
cmp -s "$OUT/over-ellipsis.png" "$OUT/over-clip.png" && { echo "FAIL over: a word wider than its box drew no ellipsis"; status=1; } || echo "PASS over: a word wider than its box ends in an ellipsis"
|
||||
exit $status
|
||||
Executable
+127
@@ -0,0 +1,127 @@
|
||||
#!/bin/bash
|
||||
# IX14 (docs/index.feature): the Index's fast pass, measured on a fixed public set. Prints pictures a second (as the
|
||||
# indexer counts them and from the command's start to its last row searchable), the seconds until the first pictures
|
||||
# are searchable, peak memory, warm search time, and precision@5 for a fixed list of words.
|
||||
#
|
||||
# bench/index/run.sh [RAEA_BINARY] [N] (default: raea on PATH, 10000 pictures)
|
||||
#
|
||||
# The set: the first N of Open Images V4's 41,620 validation pictures by id (CC BY 2.0, served at 1024 px on their long
|
||||
# side from the dataset's public bucket), downloaded once into RAEA_BENCH_CACHE (default ~/.cache/raea-bench/index,
|
||||
# about 300 KB a picture). Precision@5 asks "a photo of a <label>" for each label in LABELS with at least 10 pictures in
|
||||
# the set, and counts a hit right when Open Images' human-verified labels (CC BY 4.0) give the picture that label.
|
||||
# The labels aren't exhaustive (a dog nobody labelled counts as a miss), so the figure is a floor, for comparing runs.
|
||||
# Each run indexes into a new home; nothing touches ~/.raea/library/fast.
|
||||
set -uo pipefail
|
||||
RAEA=${1:-raea}
|
||||
N=${2:-10000}
|
||||
C=${RAEA_BENCH_CACHE:-$HOME/.cache/raea-bench/index}
|
||||
OI=https://storage.googleapis.com/openimages
|
||||
LABELS="Dog Cat Car Bird Flower Tree Building Boat Horse Bicycle Airplane Food Guitar Train Bus Pizza Clock Chair Book
|
||||
Sunglasses Skyscraper Beer Cake Butterfly Fish Motorcycle Truck Tower Castle Wine Coffee Hat Drum Piano Cattle Sheep
|
||||
Elephant Lighthouse Fountain Tent Umbrella Laptop Table Bed Window Sculpture"
|
||||
command -v jq >/dev/null || { echo "bench/index: needs jq" >&2; exit 2; }
|
||||
now() { perl -MTime::HiRes=time -e 'printf "%.3f", time'; }
|
||||
mkdir -p "$C/pictures" || exit 2
|
||||
cd "$C" || exit 2
|
||||
for f in 2018_04/validation/validation-images-with-rotation.csv v5/validation-annotations-human-imagelabels-boxable.csv v5/class-descriptions-boxable.csv; do
|
||||
[ -s "${f##*/}" ] || curl -sfL -o "${f##*/}" "$OI/$f" || { echo "bench/index: couldn't fetch $OI/$f" >&2; exit 2; }
|
||||
done
|
||||
tail -n +2 validation-images-with-rotation.csv | cut -d, -f1 | LC_ALL=C sort | head -n "$N" > ids.txt
|
||||
[ "$(wc -l < ids.txt)" -eq "$N" ] || { echo "bench/index: the set has fewer than $N pictures" >&2; exit 2; }
|
||||
# the pictures not here yet, 16 at a time
|
||||
missing=$(while read -r id; do [ -s "pictures/$id.jpg" ] || echo "$id"; done < ids.txt)
|
||||
if [ -n "$missing" ]; then
|
||||
echo "bench/index: downloading $(wc -l <<< "$missing" | tr -d ' ') pictures into $C/pictures"
|
||||
rm -f pictures/*.part
|
||||
xargs -P 16 -I{} sh -c 'curl -sf -o "pictures/{}.part" "https://s3.amazonaws.com/open-images-dataset/validation/{}.jpg" && mv "pictures/{}.part" "pictures/{}.jpg" && echo {}' <<< "$missing" \
|
||||
| awk 'NR % 500 == 0 { print " " NR " downloaded"; fflush() }'
|
||||
fi
|
||||
lost=$(while read -r id; do [ -s "pictures/$id.jpg" ] || echo "$id"; done < ids.txt | wc -l | tr -d ' ')
|
||||
[ "$lost" -le $((N / 100)) ] || { echo "bench/index: $lost of $N pictures couldn't be downloaded" >&2; exit 2; }
|
||||
# the run's own folder of the set (links, so the cache's folder can hold more than N)
|
||||
W=$(mktemp -d "${TMPDIR:-/tmp}/ixbench.XXXX")
|
||||
trap 'rm -rf "${W:?}"' EXIT
|
||||
mkdir "$W/set"
|
||||
sed 's/$/.jpg/' ids.txt | (cd pictures && xargs -J % ln % "$W/set/" 2>/dev/null)
|
||||
have=$(ls "$W/set" | wc -l | tr -d ' ')
|
||||
|
||||
# the fast pass, from a cold start: the command's own time, its peak memory, and its progress lines
|
||||
t0=$(now)
|
||||
/usr/bin/time -l "$RAEA" index add "$W/set" --json --home "$W/home" > "$W/add.jsonl" 2> "$W/add.err"
|
||||
code=$?
|
||||
t1=$(now)
|
||||
[ $code -eq 0 ] || { echo "bench/index: raea index add exited $code" >&2; tail -5 "$W/add.err" >&2; exit 1; }
|
||||
last=$(grep '"stage":"done"' "$W/add.jsonl" | tail -1)
|
||||
[ -n "$last" ] || { echo "bench/index: the fast pass never said done" >&2; tail -3 "$W/add.jsonl" >&2; exit 1; }
|
||||
done_n=$(jq -r .done <<< "$last"); failed=$(jq -r .failed <<< "$last"); rate=$(jq -r .per_sec <<< "$last"); secs=$(jq -r .seconds <<< "$last")
|
||||
first=$(jq -r 'select(.done > 0) | .seconds' "$W/add.jsonl" | head -1)
|
||||
peak=$(awk '/maximum resident set size/ {print $1}' "$W/add.err")
|
||||
wall=$(perl -e "printf '%.1f', $t1 - $t0")
|
||||
|
||||
# precision@5 and warm search time, through serve (the text tower loaded once, as the app keeps it)
|
||||
tr -d '\r' < class-descriptions-boxable.csv > "$W/classes.csv"
|
||||
awk -F, 'NR > 1 && $4 == 1 {print $1, $3}' validation-annotations-human-imagelabels-boxable.csv | tr -d '\r' | LC_ALL=C sort -u > "$W/pos.txt"
|
||||
LC_ALL=C sort ids.txt > "$W/ids.sorted"
|
||||
asks="$W/asks.jsonl"; : > "$asks"; : > "$W/asked.txt"
|
||||
echo '{"id":"warm","op":"warm"}' >> "$asks"
|
||||
for l in $LABELS; do
|
||||
m=$(awk -F, -v n="$l" '$2 == n {print $1}' "$W/classes.csv")
|
||||
[ -n "$m" ] || { echo "bench/index: no class $l" >&2; continue; }
|
||||
n=$(awk -v m="$m" '$2 == m {print $1}' "$W/pos.txt" | LC_ALL=C join - "$W/ids.sorted" | wc -l | tr -d ' ')
|
||||
[ "$n" -ge 10 ] || continue
|
||||
q="a photo of a $(tr '[:upper:]' '[:lower:]' <<< "$l")"
|
||||
jq -nc --arg id "$l" --arg q "$q" '{id: $id, op: "search", q: $q, k: 5}' >> "$asks"
|
||||
echo "$l $m $n" >> "$W/asked.txt"
|
||||
done
|
||||
"$RAEA" index serve --home "$W/home" < "$asks" > "$W/answers.jsonl" 2> "$W/serve.err"
|
||||
right=0; asked=0; : > "$W/ms.txt"
|
||||
while read -r l m n; do
|
||||
a=$(jq -c --arg id "$l" 'select(.id == $id)' "$W/answers.jsonl")
|
||||
[ -n "$a" ] || { echo "bench/index: no answer for $l" >&2; continue; }
|
||||
hits=$(jq -r '.hits[].name | sub("\\.jpg$"; "")' <<< "$a")
|
||||
r=$(for h in $hits; do grep -qx "$h $m" "$W/pos.txt" && echo 1; done | wc -l | tr -d ' ')
|
||||
right=$((right + r)); asked=$((asked + 1))
|
||||
jq -r '.ms.words + .ms.search' <<< "$a" >> "$W/ms.txt"
|
||||
[ -n "${IXBENCH_VERBOSE:-}" ] && echo " $l ($n in the set): $r of 5"
|
||||
done < "$W/asked.txt"
|
||||
p5=$(perl -e "printf '%.3f', $right / (5 * ($asked || 1))")
|
||||
ms=$(sort -n "$W/ms.txt" | awk '{a[NR] = $1} END {printf "%.1f", a[int((NR + 1) / 2)]}')
|
||||
|
||||
# videos: two Blender open films (Elephants Dream, CC BY 2.5; Tears of Steel, CC BY 3.0; 720p H.264) cut once into
|
||||
# 30 s clips without re-encoding, as a library of short clips is; the fast pass reads each clip's poster and a frame
|
||||
# every 4 s (IX2). IXBENCH_NO_VIDEO=1 skips them
|
||||
vids=0; vmin=0; vwall=0
|
||||
if [ -z "${IXBENCH_NO_VIDEO:-}" ]; then
|
||||
command -v ffmpeg >/dev/null || { echo "bench/index: the videos need ffmpeg (or IXBENCH_NO_VIDEO=1)" >&2; exit 2; }
|
||||
mkdir -p clips
|
||||
if [ -z "$(ls clips 2>/dev/null)" ]; then
|
||||
for f in ED/elephantsdream-720-h264-st-aac.mov demo/movies/ToS/tears_of_steel_720p.mov; do
|
||||
src="$W/${f##*/}"
|
||||
echo "bench/index: fetching https://download.blender.org/$f"
|
||||
curl -sfL -o "$src" "https://download.blender.org/$f" || { echo "bench/index: couldn't fetch $f" >&2; exit 2; }
|
||||
ffmpeg -v error -i "$src" -map 0:v:0 -map 0:a:0? -c copy -f segment -segment_time 30 -reset_timestamps 1 "clips/${f##*/}-%03d.mov" || exit 2
|
||||
rm -f "$src"
|
||||
done
|
||||
fi
|
||||
vids=$(ls clips | wc -l | tr -d ' ')
|
||||
vmin=$(for c in clips/*.mov; do ffprobe -v error -show_entries format=duration -of csv=p=0 "$c"; done | awk '{s += $1} END {printf "%.1f", s / 60}')
|
||||
mkdir "$W/clips" && ln clips/*.mov "$W/clips/"
|
||||
t0=$(now)
|
||||
"$RAEA" index add "$W/clips" --json --home "$W/vhome" > "$W/vadd.jsonl" 2> "$W/vadd.err" || { echo "bench/index: raea index add (videos) failed" >&2; tail -5 "$W/vadd.err" >&2; exit 1; }
|
||||
t1=$(now)
|
||||
vdone=$(grep '"stage":"done"' "$W/vadd.jsonl" | tail -1 | jq -r .done)
|
||||
[ "$vdone" = "$vids" ] || echo "bench/index: only ${vdone:-0} of $vids clips searchable" >&2
|
||||
vwall=$(perl -e "printf '%.1f', $t1 - $t0")
|
||||
fi
|
||||
|
||||
echo "bench/index: $have pictures (Open Images V4 validation, first $N by id), $RAEA ($("$RAEA" --version 2>/dev/null | head -1))"
|
||||
echo " fast pass $done_n searchable, $failed failed: $(printf '%.0f' "$rate") pictures a second as the indexer counts ($(printf '%.1f' "$secs") s)"
|
||||
echo " from cold start $wall s for the command, $(perl -e "printf '%.0f', $done_n / $wall") pictures a second; the first searchable at $(printf '%.2f' "${first:-0}") s"
|
||||
echo " peak memory $(perl -e "printf '%.0f', ${peak:-0} / 1048576") MB"
|
||||
echo " search $ms ms warm (median of $asked; words embedded and every row scored)"
|
||||
echo " precision@5 $p5 over $asked labels (a floor: Open Images' labels aren't exhaustive)"
|
||||
[ "$vids" -gt 0 ] && echo " videos $vids clips ($vmin min) in $vwall s from cold start: $(perl -e "printf '%.1f', $vmin / $vwall") video minutes a second, $(perl -e "printf '%.1f', $vids / $vwall") clips a second"
|
||||
jq -nc --argjson n "$have" --argjson done "$done_n" --argjson rate "$rate" --argjson wall "$wall" --argjson first "${first:-0}" \
|
||||
--argjson peak "${peak:-0}" --argjson ms "$ms" --argjson p5 "$p5" --argjson asked "$asked" \
|
||||
--argjson vids "$vids" --argjson vmin "$vmin" --argjson vwall "$vwall" \
|
||||
'{pictures: $n, searchable: $done, per_sec: $rate, wall_s: $wall, first_s: $first, peak_bytes: $peak, search_ms: $ms, p5: $p5, labels: $asked, clips: $vids, clip_minutes: $vmin, clips_wall_s: $vwall}'
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"0": ["Pointer:480:60"],
|
||||
"6": ["Pointer:480:260"],
|
||||
"10": ["Pointer:480:260:down"],
|
||||
"12": ["Pointer:480:260"],
|
||||
"21": ["Pointer:480:60"]
|
||||
}
|
||||
@@ -8,7 +8,8 @@
|
||||
# React on the page with 3D in the world, picking and input replay are all here: the games (pong and platformer on
|
||||
# the page, arena3d's 3D drawn live), bevy-ts' live cases (keys, the pointer, a gamepad, the window and the World's
|
||||
# components through useQuery), the bridge's Engine reads (engine3d: a cube the World moves, React's marker reading it)
|
||||
# and pick3d (on* on 3D parts: hover, press, leave)
|
||||
# and pick3d (on* on 3D parts: hover, press, leave); an <R3F>'s own pointer events and <OrbitControls> (r3f live/pointer);
|
||||
# an app screen's button clicked through the 3D, its own timer on the frame's clock (appscreen: blitz-bevy H12)
|
||||
sdk/react/bench/games/pong/edit.tsx keys:ArrowUp,ArrowDown,,ArrowUp 0.25 0.75 1.25 1.75
|
||||
sdk/react/bench/games/platformer/edit.tsx keys:ArrowRight,ArrowRight+ArrowUp,ArrowRight, 0.25 0.75 1.25 1.75
|
||||
sdk/react/bench/games/arena3d/edit.tsx keys:ArrowRight,ArrowUp,ArrowLeft+ArrowUp,ArrowDown, 0.25 0.75 1.25 1.75
|
||||
@@ -21,3 +22,5 @@ sdk/raea/bench/bevy-ts/cases/live-window.tsx script:sdk/raea/bench/bevy-ts/cases
|
||||
sdk/raea/bench/bevy-ts/cases/text3d-readback.tsx script:sdk/raea/bench/bevy-ts/cases/live-world.json 0.3 0.6
|
||||
bench/bridge/engine3d.tsx - 0.3 0.9 1.25
|
||||
sdk/raea/bench/bevy/pick3d/edit.tsx script:bench/render-play/pick3d.json 0.1 0.2 0.3 0.4 0.6 0.9
|
||||
sdk/r3f/test/live/pointer.tsx script:sdk/r3f/test/live/pointer.json 0.2 0.4 0.6 0.9
|
||||
sdk/raea/bench/bevy/appscreen/edit.tsx script:bench/render-play/appscreen.json 0.2 0.4 0.6 0.9
|
||||
|
Can't render this file because it contains an unexpected character in line 5 and column 29.
|
@@ -7,6 +7,7 @@ publish = false
|
||||
description = "A project as one world of facts in raea/ecs's form: its layers, text, parts, shots, clips and cues as entities with components, for any kind of piece"
|
||||
|
||||
[dependencies]
|
||||
dunce = "1"
|
||||
# a rule's taste form and controller field (rule.rs)
|
||||
raea-core-brief = { path = "../brief" }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
|
||||
@@ -44,15 +44,17 @@ pub struct Entry {
|
||||
pub despite: Vec<Despite>,
|
||||
}
|
||||
|
||||
/// The nearest folder at or above `from` that holds `marker` (.raea/workspace, .raea/project).
|
||||
/// The nearest folder at or above `from` that holds `marker` (.raea/workspace, .raea/project). Plain on Windows
|
||||
/// (C:\..., through dunce): canonicalize() alone gives \\?\C:\..., a path Git for Windows can neither read nor lock, so
|
||||
/// every id raea kept in git config read back empty and was never written (0.1.5, 0.1.6).
|
||||
pub fn up(from: &Path, marker: &str) -> Option<PathBuf> {
|
||||
let from = from.canonicalize().ok()?;
|
||||
let from = dunce::canonicalize(from).ok()?;
|
||||
from.ancestors().find(|d| d.join(marker).is_file()).map(Path::to_path_buf)
|
||||
}
|
||||
|
||||
/// A path made absolute through its nearest folder that exists (an output may not be written yet).
|
||||
fn real(p: &Path) -> PathBuf {
|
||||
if let Ok(c) = p.canonicalize() {
|
||||
if let Ok(c) = dunce::canonicalize(p) {
|
||||
return c;
|
||||
}
|
||||
match (p.parent().filter(|d| !d.as_os_str().is_empty()), p.file_name()) {
|
||||
@@ -61,10 +63,11 @@ fn real(p: &Path) -> PathBuf {
|
||||
}
|
||||
}
|
||||
|
||||
/// A path as the record names it: relative to the project when it's in it.
|
||||
/// A path as the record names it: relative to the project when it's in it, with '/' between its parts on Windows too (a
|
||||
/// project's record moves between machines, and `raea next` quotes it in commands).
|
||||
pub fn rel(project: &Path, p: &Path) -> String {
|
||||
let full = real(p);
|
||||
full.strip_prefix(project).map(|r| r.display().to_string()).unwrap_or_else(|_| full.display().to_string())
|
||||
full.strip_prefix(project).map(|r| r.to_string_lossy().replace(std::path::MAIN_SEPARATOR, "/")).unwrap_or_else(|_| full.display().to_string())
|
||||
}
|
||||
|
||||
/// The project's commit, with "+" when `of` (a path from the project; "." for all of it) differs from it.
|
||||
|
||||
@@ -52,6 +52,8 @@ pub fn base_ident(it: &Item) -> &str {
|
||||
"mesh" => it.shape.as_deref().unwrap_or_default(),
|
||||
"model" | "panel" | "plate" | "splat" | "meshseq" => it.props.get("src").and_then(Value::as_str).unwrap_or(""),
|
||||
"text" => it.props.get("text").and_then(Value::as_str).unwrap_or(""),
|
||||
// a camera drawing into an image (R3F23a): by the image, so two passes into one image a frame are #0 and #1
|
||||
"rendercam" => it.props.get("target").and_then(Value::as_str).unwrap_or(""),
|
||||
_ => "",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,925 @@
|
||||
Feature: The character SDK as one system: SOMA bodies, Kimodo motion, generated heads, creatures
|
||||
Set by the user 2026-11-15, after deciding that people's bodies standardize on SOMA (docs/hands.feature, the
|
||||
rule of that date): one session syncs the body, the motion system, the head work and the creature work, which
|
||||
three sessions had been building apart. In the user's words, the job is to standardize the body on SOMA, Kimodo,
|
||||
the head work and how creatures are managed and rigged in the character SDK; to make a whole system for
|
||||
locomotion, motion matching, staging and AI controllers for NPCs if Kimodo is the standard; and, once that is
|
||||
settled, a generative or procedural clothing system, perhaps with the mannequin as the base input and an image
|
||||
model on top, layered.
|
||||
|
||||
The user, 11-16: the character SDK ships as raea 0.1.7, and 0.1.6 is a patch for the app. What of it is on main
|
||||
before then ships in 0.1.6's binary unannounced, as 0.1.5's did.
|
||||
|
||||
This file is the map. The detail stays where it is: docs/hands.feature (arms and hands, the SOMA rule),
|
||||
docs/creatures.feature (four legs), docs/drawn-characters.feature (a drawing as a character),
|
||||
docs/character.md (the five layers and eleven principles of the rebuilt SDK, which still hold except principle
|
||||
8's skeleton), docs/skeleton.feature (the game_engine rig: replaced by CH1). A scenario here that another file
|
||||
already plans names it and does not repeat it.
|
||||
|
||||
The system on one page, as it stands 11-15 (each part names the scenarios that hold its detail):
|
||||
|
||||
Body. Every person is SOMA (NVlabs SOMA-X, Apache-2.0): one skeleton of 78 joints and 32 twist helpers the
|
||||
engine sets, one body folder for a person or a creature (skeleton.json, body.glb, parts; CH2), builds from
|
||||
SOMA's shape model. The bodies on the old game_engine rig only play until they are retired (CH1, CH1a).
|
||||
|
||||
Motion. At run time a body only plays clips, chosen by motion matching from a library on SOMA's skeleton, on the
|
||||
user's own machine, so a render and live play give the same frames (CH10, CH14a). Clips come from captures first
|
||||
(ACCAD and Quaternius, moved onto SOMA once) and from Kimodo where no capture exists, made when a project is
|
||||
built, in the cloud: between two poses with no text today (CH15a: "turn and sit", "rise and walk off"), from a
|
||||
line of text once its encoder's licence is granted (CH11). A generated clip is judged by the checks that judge
|
||||
captures before it is kept (CH13). Locomotion is that matcher following a path, its stops landing on their marks.
|
||||
|
||||
Staging and NPCs. A performance is a list of acts: go, wait, look, face, sit, take (and put, throw, hand over and
|
||||
use, which are takes with another spec) and do (a line of text). A script, a behaviour tree and a language model
|
||||
all return those acts to `direct`, which asks a character's controller only when its acts run out, and the
|
||||
matcher carries them out (CH16a). An act no clip plays is stood through and written down as a clip to make, and
|
||||
the build turns that list into Kimodo clips (CH17a, CH15). Hands, eyes and contacts are laid over the matched
|
||||
pose by the Rust takes and the look solver, each saying how far it moved the pose (CH18a).
|
||||
|
||||
Heads. The face session's head (GNM Head, Apache-2.0) is a Character part skinned to SOMA's neck, head and eye
|
||||
joints with about fifty named expressions, ending on the collar ring of a body built without its head; hair is
|
||||
cards skinned to Head with a stray distance per vertex; hats and glasses are rigid parts on Head (CH20a, CH21a).
|
||||
|
||||
Creatures. The raccoon session's flow (docs/creatures.feature): a creature is its own skeleton set down by measure
|
||||
first, its model generated on a grey mannequin of that skeleton and weighted there, moved by a gait solver that
|
||||
owns contact, carriage and the order of the legs, with anymove's generated clips for timing where it has them
|
||||
(CH30 to CH32). The same body folder and the same clip format as a person; Kimodo is for people only.
|
||||
|
||||
Clothes. Pictures of the dressed mannequin measured onto SOMA's skin (CH40 to CH46) were built and rejected by
|
||||
the user on the body. Garments are now sewing patterns cut to SOMA's measurements and draped by a cloth of our
|
||||
own on the GPU (CH47a, CH48a), with a model trained on that data proposed (CH48). CH47 and CH48 are the user's
|
||||
to decide.
|
||||
|
||||
Who holds what: this plan's session the body, motion, staging and clothes, and the syncing; the face session
|
||||
heads and hair; the raccoon session creatures. A change to a joint name, a unit, an axis or a file's layout is
|
||||
made here first (CH0).
|
||||
|
||||
Rule: The standard, and who builds to it
|
||||
|
||||
Scenario: CH0. One plan, four parts, one place they meet
|
||||
# The parts and the sessions that hold them on 11-15: the body, motion and clothing (this plan's session);
|
||||
# heads and hair (the face session: a fitted head model with expressions, from close-up photographs); the
|
||||
# creature solver and its test animal (the raccoon session); anymove on that animal (this plan's session,
|
||||
# validated by the raccoon session). Agreements between sessions are written here as scenarios, so a
|
||||
# session that starts cold reads them.
|
||||
Then every part delivers a folder a `<Character>` loads, in the format of CH2
|
||||
And a change to a joint name, a unit, an axis or a file's layout is made here first, then built
|
||||
|
||||
Scenario: CH1. People are on SOMA's skeleton
|
||||
# NVlabs/SOMA-X, Apache-2.0. 78 named joints (Root, Hips, Spine1-2, Chest, Neck1-2, Head, Jaw, two eyes,
|
||||
# shoulders, arms, hands with five fingers, legs, toes) and 32 twist joints the engine sets (four along
|
||||
# each upper arm, forearm, thigh and shin). SOMA's files are in centimetres; raea's are in metres, Y up,
|
||||
# facing +Z. Replaces docs/skeleton.feature's game_engine rig and docs/character.md's principle 8.
|
||||
Then no new work on people names a game_engine joint
|
||||
And the readers of the old names (sdk/character, sdk/body, systems/body, systems/grab, their tools and
|
||||
tests) are moved to SOMA's names as one refactor, not through an alias layer (as SK0b did before)
|
||||
And the people built on the old rig are retired once a SOMA person renders in each scene that used one
|
||||
|
||||
@done
|
||||
Scenario: CH1a. The old SDK names SOMA's joints
|
||||
# 11-15. sdk/character's bones.ts `B` (the one place the SDK takes joint names from) gives SOMA's names:
|
||||
# Hips, Spine1, Spine2, Chest, Neck1, Head, LeftShoulder, LeftArm, LeftForeArm, LeftHand, LeftLeg,
|
||||
# LeftShin, LeftFoot, LeftToeBase, and a finger's phalanges 1 to 3 as SOMA's 2 to 4 (its 1 is the bone in
|
||||
# the palm; the thumb's are 1 to 3). A body made on the old rig (turbo, teal, the PSX people) still loads:
|
||||
# `joint` finds a SOMA name on it by its old one, the name helpers (side, mirror, finger) read both, and
|
||||
# a BVH map keyed by old names still maps. That fallback is the only place the old names stay, and it goes
|
||||
# with the last old body (CH1's last line). systems/body's `Skeleton::joint` reads a SOMA name on an old
|
||||
# body the same way. A body named as CMU or Mixamo name theirs (LeftUpLeg, with LeftLeg the shin, which is
|
||||
# SOMA's thigh) is refused with a message rather than read wrong; the gitignored local "kid" example is
|
||||
# one. The conformance tests' stick body is on SOMA's names; 27 of the character test's 29 pass, the 2
|
||||
# that fail failing the same way on the code before the change (a buckle on a planted knee, a dropped box).
|
||||
Then the SDK names SOMA's joints, and the bodies on the old rig still play until they are retired
|
||||
|
||||
Scenario: CH2. A body folder is the same for a person and a creature
|
||||
Given a folder with skeleton.json (name, rig, height, joints by name with parent and rest place, landmarks,
|
||||
skin samples per joint), body.glb (skinned to those joints: one skin, or several closed pieces each
|
||||
weighted to its own joints, as the raccoon's trunk and legs are), and optional head.glb, clothes and clips
|
||||
Then `rig` says which skeleton the joints are: "soma" for people, the creature's own name for an animal
|
||||
And helper joints (twist joints, a belly, ears, eye joints) are listed as helpers: the engine or a part's
|
||||
own layer sets them, and no pose, clip or call has to name them
|
||||
|
||||
@done
|
||||
Scenario: CH2a. Bodies, heads and creatures are read as one form and checked
|
||||
# 11-15. sdk/body/src/folder.ts (private repo 47ddc16) reads a folder's skeleton.json, or a creature's
|
||||
# <name>.rig.json (docs/creatures.feature CR1's form) as the same skeleton: `rig` the creature's name, each
|
||||
# bone's tail its `ends` entry, the height its highest joint or mark, the eyes between its eye marks, and
|
||||
# skin samples taken from its skinned mesh (samples.ts) since a rig carries none. Helpers not listed are
|
||||
# found by name (SOMA's 32 twist joints, its eyes and jaw; a creature's ears, lids, belly and jaw).
|
||||
# `bun sdk/body/src/folder.ts BODY [HEAD]` lists a folder's problems against CH2, CH20 and CH21. Run on
|
||||
# the work as it stands: SOMA's headless body with the generated head, its four hair styles, glasses, cap
|
||||
# and beanie has none (the head's collar ring lies exactly on the body's 80 ring vertices; hair and hats
|
||||
# ride Head alone; each hair mesh carries a stray distance per vertex). The raccoon has none: its rig reads
|
||||
# as the same skeleton, its 58 joints all skinned, 1,392 skin samples with the lowest on the ground.
|
||||
# Left to the owners, as notes rather than faults: the head carries 20 expressions where CH20 asks about
|
||||
# fifty; head.json names its body by an absolute path on one machine; the raccoon's body is raccoon.glb,
|
||||
# not body.glb; SOMA's skeleton.json doesn't list its helpers (found by name).
|
||||
Then a person's folder and a creature's are read by one reader, and a folder that breaks the form says how
|
||||
|
||||
Rule: Motion: one clip format, two ways to get clips, one way to play them
|
||||
|
||||
# The position this plan takes, confirmed by the user 11-15 ("clips at run time"): motion at run time is always chosen from clips on
|
||||
# disk by motion matching, on the user's own machine, the same frame for a render and for live play. A model
|
||||
# that generates motion (Kimodo for people, anymove for creatures) is a way to MAKE clips, run when a project
|
||||
# is authored or built, in the cloud or on an NVIDIA card: Kimodo does not run on a Mac. So a game or a film
|
||||
# never waits on a model, and a project keeps working with no network. The alternative, a model called
|
||||
# while a scene plays, is not planned.
|
||||
|
||||
Scenario: CH10. One clip format, on the body's own skeleton
|
||||
# The clip file the SDK already reads is the base (sdk/body/src/clip.ts `ClipFile`: the skeleton's name,
|
||||
# the joints' names, and per clip its frame rate, the root's place as 32-bit floats and each joint's turn
|
||||
# relative to its parent as 16-bit parts). It gains the rig's name, and per clip the contacts, tags and
|
||||
# source below.
|
||||
Then a clip is each joint's turn and the root's place per frame, at its own frame rate, with its contacts
|
||||
(a list by joint name, each planted or not and where, so four legs or six fit as two do; hands and a
|
||||
seat the same way), its situation tags, and where it came from (a capture and its licence; a model, its
|
||||
prompt, seed and constraints; a procedure)
|
||||
And a capture, a generated motion and a baked procedure are the same file, so the library, the matcher and
|
||||
the checks read one thing
|
||||
|
||||
Scenario: CH11. Kimodo is a generation flow that writes clips
|
||||
# Kimodo: code Apache-2.0, weights under NVIDIA's Open Model License (commercial use allowed, outputs not
|
||||
# claimed). It needs an NVIDIA card and a gated text encoder, so it runs as a cloud step (docs/gen.feature)
|
||||
# or on a user's own card. Its inputs, from the examples it ships: one line of text; several lines with
|
||||
# durations; full-body keyframes; hand or foot targets; a path for the root; waypoints. Its output is 30
|
||||
# joints' turns and places at 30 frames a second (which Kimodo widens to SOMA's 77 by name).
|
||||
# Measured 11-15, with no text (constraints only; an empty prompt zeroes the text features, so a stand-in
|
||||
# encoder of zeros is exact), Kimodo-SOMA-RP-v1 on its own SOMA examples, 100 denoising steps, on a Modal
|
||||
# L40S or A10G: 4.3 s of GPU a 5 s clip, 7.2 s for 10 s, the model loading in 40 s; about 12 cents for the
|
||||
# whole test with the image build. Misses at the constrained frames, raw and after Kimodo's own
|
||||
# post-processing: full-body keyframes 3.2 cm mean (8.2 worst) and 0.5 (6.0); feet 1.0-1.5 and 0; hands
|
||||
# 2.8-3.3 and 2.4-3.0 (6 worst); a root path 12 cm mean (26 worst) raw and 3.1 (4.0, its margin) after;
|
||||
# foot slide on planted frames 0.06-0.26 cm a frame. So post-processing is always on. Text is not
|
||||
# measured: the encoder's base (meta-llama/Meta-Llama-3-8B-Instruct) is gated behind a form that asks for
|
||||
# the account holder's name, birth date, country and affiliation, which only Shane can fill in.
|
||||
# Runner: ~/.cache/raea-kimodo/ours/kimodo_constraints.py (and kimodo_modal.py for text).
|
||||
Given a line of text and any of: a start pose, an end pose, keyframes, a root path, hand or foot targets
|
||||
Then `raea gen` returns a clip in CH10's format, with its provenance, checked by CH13 before it is kept
|
||||
And the cost of a clip and the time it took are logged with it
|
||||
|
||||
Scenario: CH12. The library: captures first, generated where there is none
|
||||
# docs/character.md's layer 2 and its 29 situations stand. Principle 1 stands too: a capture is the
|
||||
# ceiling, so a situation that has a good capture keeps it (retargeted to SOMA once, offline).
|
||||
Then each situation lists its clips, and a situation with no capture (the ones character.md asks for: turn
|
||||
and sit, sit back, rise and walk off, pick from the floor, carry, set down) is filled by Kimodo
|
||||
And all people share one library, since they share one skeleton; a body of other proportions plays it at
|
||||
the same Froude number
|
||||
|
||||
Scenario: CH13. A generated clip earns its place
|
||||
Then a clip enters the library only after the detectors that judge captures have judged it: joint limits,
|
||||
self overlap, foot slide against its own contacts, pops, and its style vector beside the situation's
|
||||
captures
|
||||
And what fails is kept out and counted, so the pass rate of each source is a number
|
||||
|
||||
@done
|
||||
Scenario: CH14a. The rebuilt body SDK, its library and its matcher run on SOMA
|
||||
# 11-15. sdk/body (the rebuilt SDK of docs/character.md) names SOMA's joints: its roles keep the keys of
|
||||
# its tables, its limits are re-measured over the library on SOMA (8,848 frames), and the elbow's fold
|
||||
# axis is read from the captures, SOMA's rest elbow being nearly straight. The library's 60 clips (ACCAD,
|
||||
# Quaternius) were moved from the old rig joint for joint (sdk/body/tools/resoma.ts: a joint's world turn
|
||||
# after the turn that lays SOMA's rest bone on the source's, hands by their knuckles, the wrist's turn
|
||||
# about the forearm given to the forearm, contacts carried). On it the matcher follows a path (stand,
|
||||
# walk, turn, stand, walk back, stop): 449 frames over 10 clips with 20 switches, planted feet sliding
|
||||
# 17 mm at worst (8 mm on the old rig's own suite), no joint past a limit, drawn on SOMA's body with the
|
||||
# twist joints set (raea/character `withTwists`). 23 of the SDK's 27 tests pass; the four that don't are
|
||||
# the hand layer (the cup grasp, hands in the lap, finger IK), which needs SOMA's fingers and a shell.
|
||||
# Not moved yet: the old SDK (sdk/character: its matcher, items, ragdoll), the arms and hands in Rust
|
||||
# (systems/grab's takes name the old joints), and the turbo suite's cases as checks.
|
||||
Then a body on SOMA walks where a path says from the library's captures
|
||||
|
||||
Scenario: CH14. Locomotion is motion matching over that library
|
||||
# Built on the old rig: sdk/body/src/loco (the chooser, the feature database, the matcher, inertialized
|
||||
# switches, feet held by their contacts, the head steadied). This scenario is that code on SOMA.
|
||||
# 11-15: the turbo suite's script (tools/motion-check.ts) is in no history, so its eight cases are rebuilt
|
||||
# from docs/locomotion.md as sdk/body/tools/suite.ts, scoring what it scored with bars taken from the
|
||||
# captures where it can (jolts against the captures' 99th percentile, a pop as hips' acceleration over
|
||||
# their 99.9th, head roll against the captures' own at that gait; slide by feet.ts footSlide, the old
|
||||
# suite's measure). First run on SOMA, 0 of 8 strictly: walking is good (slide 0.2 to 0.9 cm, arrive
|
||||
# within 18 cm, follow within 25), the failures are hip pops at switches in jogs and runs (31 of 36 pops
|
||||
# sit at a switch; the run curve also jolts 23 degrees against 22), slide in the jog curve, the turn of
|
||||
# 180 and errands (4 to 9 cm), and the head rolling 18 to 20 degrees on curves against 13 to 16 in the
|
||||
# captures. Moving the body at a switch onto the new clip's planted foot (align) is not the pops' cause:
|
||||
# off, it takes away a few and the walk curve slides 15 cm. The cause: a switch blended the pose's turns
|
||||
# and the hips' height but not the hips' speed over the floor, so a run handing to a run turn at another
|
||||
# pace jumped it in a frame. Carried into the decaying offset (perform's carry, on unless no foot is down
|
||||
# in both clips, where carrying it slid a run turn's foot 22 cm): pops 36 to 21, at switches 31 to 12,
|
||||
# every other number unchanged.
|
||||
Then a body goes where a path says, by the situations the chooser allows, with every switch inertialized
|
||||
and every planted foot held
|
||||
And the turbo suite's cases pass on a SOMA person at least as well as they do today
|
||||
|
||||
@done
|
||||
Scenario: CH14b. The suite's eight cases pass on SOMA, and paths drawn at random are run beside them
|
||||
# 11-15, sdk/body (the private repository, 58fed86 and 4b1781f): 8 of 8, from 0. What each failure was:
|
||||
# Hip pops: tuning the matcher only moved the same few jumps from one path to another (the adjustment
|
||||
# toward the path comes on as a foot lifts, a turn goes about another ankle, a switch changes pace), so
|
||||
# the hips' path is evened afterwards to the captures' own largest change of speed in a frame, before the
|
||||
# feet are held (perform.ts evenHips, hipLimit): no pop in any case, the path moved by millimetres.
|
||||
# The run's curve: a straight run could not turn, so a curve of 7 m was two turn captures handed back and
|
||||
# forth every 17 frames. A curve gentler than 0.2 radians a metre is now a straight clip steered about its
|
||||
# planted ankle, and the matcher is asked for the path with that bend taken out.
|
||||
# A run's corner: the guide went through a corner of 90 degrees at 3.6 m/s and the body ran half a metre
|
||||
# past it. The guide now comes into a corner at the pace the turn captures take one (guide.ts cornerSpeed:
|
||||
# 45 degrees at 3 m/s, 90 at 1.9), and a run slowing for it may come down through run to walk.
|
||||
# The head on curves: a walk came to rest in the sway capture, filed as a way of standing, its head 19
|
||||
# degrees over. Sway is its own situation.
|
||||
# Slides: a foot in the air rode down with the hips when they came down for the other leg, and a stop's
|
||||
# closing step came in 1 cm over the floor for 20 cm. It is lifted over where the lowered hips leave it,
|
||||
# and its lift eased over as many frames as a hold (let down in three, the shin jolted 16 degrees).
|
||||
# The suite itself: jolt bars per gait (the run captures' own foot strikes failed a bar set mostly by
|
||||
# walks, in 8 to 10 per cent of their frames), slide measured on the performance's own floor.
|
||||
# Beside the eight, `SWEEP=40 bun sdk/body/tools/suite.ts` draws 40 paths at random (one to three legs, a
|
||||
# walk, a jog or a run, some with a wait): 45 of 48 pass, from 33 before the slide's cause was found. Left:
|
||||
# three paths 34 to 39 cm off their line at a sharp turn (the bar is 30).
|
||||
# Tried and taken back: the adjustment on a spring (20 to 30 cm wider at a run's corner), contacts taken
|
||||
# from the playing captures, a sole's speed read with the adjustment's carrying taken off (both held feet
|
||||
# the blend was still moving: slides of metres), a standing body held to the start captures (one path
|
||||
# ended 4 m past its mark).
|
||||
Then `bun sdk/body/tools/suite.ts` prints 8 of 8 on SOMA
|
||||
And with SWEEP=40 at least 45 of the 48 paths pass
|
||||
|
||||
@done
|
||||
Scenario: CH15a. Two situations the captures lack, made by Kimodo from two of their poses
|
||||
# 11-15. sdk/body/tools/between.ts writes Kimodo's full-body keyframes from two library frames (the first at
|
||||
# the origin facing +z, the second where and how the body must end); src/kimodo.ts crosses a pose both ways
|
||||
# by its turns (a joint's world turn from bind is Kimodo's turn from the T-pose after the body's `tpose`;
|
||||
# a library pose goes out and back with no measurable change). Kimodo runs with no text (the stand-in
|
||||
# encoder, CH11). tools/fromkimodo.ts brings each motion onto the body, puts it back on the captures'
|
||||
# elbow and knee hinges with the hands and feet where Kimodo put them (src/fix.ts `ontoRig`: Kimodo's elbows
|
||||
# fold about an axis 25 degrees off the captures', which hold to within 3 to 7), and judges it against the
|
||||
# captures it joins, measured on the same body by the same checks: no joint further past a limit and the
|
||||
# body no deeper into itself. Of several seeds the best that passes is kept, with where it came from.
|
||||
# "turn and sit" (stand, then seated on a chair 1.2 m ahead, turned round): 4 of 5 passed.
|
||||
# "rise and walk off" (from the seat to a walking stride 1.6 m on): 2 of 5 passed, the others' hands
|
||||
# 5 to 9 cm into the thigh as they push up (the walking captures it joins: 4.4 cm). 4 s of GPU a clip,
|
||||
# about a cent. Both are in the library under src/library.ts's situations of those names, and play one
|
||||
# after the other on SOMA's body (sheet3d compositions/soma_between.tsx, feed item i-acp-mwi1xhlw-59).
|
||||
# Found on the way: contacts and capsules on a SOMA body were never read (the SOMA index was carried over
|
||||
# from the old rig); a SOMA limb's skin is weighted to its twist joints, now counted as the limb's.
|
||||
Then a situation without a capture gets a clip made from the captures' own poses, judged before it is kept
|
||||
|
||||
Scenario: CH15. Between two poses
|
||||
Given where a body is and how it stands, and where it must be and how, with no clip that does it
|
||||
Then at build a clip is asked of Kimodo with both poses as keyframes and the path between, checked (CH13),
|
||||
and stored in the project, so the next build asks for nothing
|
||||
And while a scene plays live and there is no such clip, the matcher's nearest is played and the gap is
|
||||
written down as a clip to make, never papered over
|
||||
|
||||
@done
|
||||
Scenario: CH15b. A line of text made into a clip between two standing poses
|
||||
# 11-15, the first run of Kimodo's text path (the account's access to the gated Llama 3 model was granted that
|
||||
# morning). Two standing poses from the captures as keyframes, in place, 4 s, and the line "A person waves at
|
||||
# the camera with their right hand", three seeds: in each the right wrist is above its shoulder for 48 to 59 of
|
||||
# 120 frames, reaching the head's height, while the left never leaves the hip, and the hips stay within 3 cm.
|
||||
# All three pass the bar of the 19 captures that end standing (sdk/body/tools/fromkimodo.ts with a "do:"
|
||||
# name); the kept one is written to the project's made clips (made.json, read by stage.ts `madeClips`). On
|
||||
# Modal: 1.6 s a clip on the GPU after 130 s loading the model, and 26 minutes queued behind the workspace's
|
||||
# other GPU jobs. Kimodo's code has nothing tied to NVIDIA (no custom kernels; its text encoder takes Apple's
|
||||
# `mps` device), so the earlier line that it does not run on a Mac is untested, not true.
|
||||
Then a stage `do` line gets a clip made from its words, checked, and kept in the project
|
||||
|
||||
Scenario: CH15c. Kimodo on the user's own machine, in MLX
|
||||
# The user, 11-15: "lets plan that if kimodo works well we port it mlx weights or go find some". Gated on
|
||||
# an eval first: about ten lines (wave, point, shrug, clap, nod, bow, look at a watch, cross the arms,
|
||||
# scratch the head, stretch), each with a check of its own (which hand rises, where the head turns) and a look
|
||||
# by the user. If they hold, Kimodo moves to MLX, the general backend on Apple silicon already in raea
|
||||
# (raea-sys-mlx), in two halves. The text encoder (LLM2Vec: Llama 3 8B made bidirectional, with its
|
||||
# trained adapters): MLX copies of Llama 3 8B Instruct exist (mlx-community, 4-bit about 4.5 GB), so the
|
||||
# work is LLM2Vec's bidirectional mask and adapters merged onto them, checked against PyTorch's features
|
||||
# for the same lines; a line's features are kept once made, so the encoder runs once a line. The motion
|
||||
# model (a small diffusion transformer): its weights converted and run in MLX, checked against the PyTorch
|
||||
# motion for the same line, constraints, seed and noise. Before anything ships to users: the licences of
|
||||
# converted weights (NVIDIA's Open Model License for Kimodo, Meta's Llama 3 licence for the encoder).
|
||||
# 11-16. Done in Rust, no Python: raea-sys-kimodo runs Kimodo-SOMA-RP-v1's denoiser and LLM2Vec on MLX from
|
||||
# the checkpoints' own files (nothing converted: mlx-community's 8-bit Llama 3 8B Instruct, McGill-NLP's two
|
||||
# adapters run beside it unmerged), and `raea motion "LINE" [--keys KEYS.json]` writes the clip fromkimodo.ts
|
||||
# reads. Against PyTorch: the denoiser within 2e-3; a whole 100-step generation from the same noise and text
|
||||
# within 0.002 cm on every joint; constraints become the same conditions. The stated tolerance is the 8-bit
|
||||
# encoder's: cosine 0.99993 to float32, which moves the joints 0.01 to 0.74 cm on average and 1.44 cm at
|
||||
# worst over eight lines (4-bit moved them 8 cm and is not used). A seed's noise is not torch's, so a seed is
|
||||
# not the cloud's motion for that seed; measured by what it does, the local wave falls in the cloud's three
|
||||
# (a hand above the shoulder 54 to 67 of 120 frames against 48 to 59, the hips within 3 cm). Cost: the
|
||||
# motion model 1.1 GB and the encoder 8.8 GB once, then 5 s to load and read a new line (a line's numbers
|
||||
# are kept, so a line is read once) and about 8 s a 4 s clip on an M5 Pro, against the cloud's 130 s
|
||||
# loading. The eval (sdk/body tools/doeval.ts, each line's check measured on the joints; clips by
|
||||
# tools/makedo.ts, three seeds a line between standing keys): every clip passes the bar of the captures that
|
||||
# end standing; the seed kept is the one whose upper body moves most (a do line fails by standing through
|
||||
# it: one seed of three stood still through "scratch the head"), and the kept ten all do what they say
|
||||
# (seed 1 alone 7 of 10, seed 2 8, seed 3 7). Film: sheet3d out/do-eval-v1.mp4, posted for the user's look
|
||||
# (i-show-mwj21c0d-1). The user's look, 11-16: "All ten read right". Open: the user's word on shipping the
|
||||
# downloads (i-show-mwj24i8o-2: Kimodo under NVIDIA's
|
||||
# Open Model License; Meta Llama 3 under its Community License, fetched from mlx-community's ungated 8-bit
|
||||
# copy; the adapters MIT); Kimodo's own post-processing (its C++ foot-skate clean-up) is not ported.
|
||||
Given the eval's lines pass
|
||||
Then a do line's clip is made on a Mac with no GPU in the cloud, matching the cloud's within a stated
|
||||
tolerance
|
||||
And its cost is a one-off download and seconds a line
|
||||
|
||||
Scenario: CH16. Staging: a performance is a list of steps
|
||||
# Built on the old rig: matching.ts `perform(lib, {at, facing, steps})` with walk, face, wait; course.ts;
|
||||
# the take (docs/hands.feature). This is the one vocabulary for all of them.
|
||||
Then a step is one of: go (a route, a gait, a style), face, wait, take, put, throw, hand over, sit, rise,
|
||||
use (a thing's own path), look at, and do (a line of text: a gesture or an act with no step of its own)
|
||||
And `do` is made into a clip by CH11 when the project is built, and from then on is a clip like any other
|
||||
And the whole performance is a function of its steps: any frame can be asked for, and a render and live
|
||||
play agree
|
||||
|
||||
Scenario: CH17. NPC controllers speak in the same steps
|
||||
Then a controller is a function from what a character knows (where things and others are, what it holds,
|
||||
what it wants) to its next steps, asked a few times a second, never per frame
|
||||
And a scripted controller, a behaviour tree and a language model all return CH16's steps, so the motion
|
||||
under them is the same and a controller can be swapped without touching motion
|
||||
And a controller may ask for a step the library cannot play; the character does the nearest it can, and the
|
||||
ask is logged for CH15
|
||||
|
||||
@done
|
||||
Scenario: CH17a. An act no clip plays is done as near as can be and written down as a clip to make
|
||||
# 11-15. sdk/body's stage gained `do` (a line of text). With a clip made for the line (`direct`'s `made`,
|
||||
# keyed by the line in lower case with single spaces) it plays as the sitting captures do, carried on from
|
||||
# where the body stands; without one the character stands for the act's seconds and the line goes on its
|
||||
# `asks`; `toMake` gathers a cast's asks, once each, most asked first: the build step's list for Kimodo
|
||||
# (CH11, CH15). A language model's act outside the vocabulary ({"wave": "ben"}, a bare "shrug") becomes a do
|
||||
# line instead of being dropped, so what a controller wanted and could not get is counted; a known act with
|
||||
# wrong values ({"wait": -1}) is still dropped. Tested with two characters asking for one line spelled two
|
||||
# ways (listed once, asked twice) and with the library's sitting down standing in for a made clip (played,
|
||||
# no frame jump past 6 cm); the body SDK's suite is 37 of 39, the 2 failing being the hand layer's cup grasp
|
||||
# as before (private repo ee61dd1). The made clips themselves wait on Kimodo's text encoder: the user has
|
||||
# sent Meta's licence form; the account still reads 403 while it is reviewed.
|
||||
Then a controller can ask for anything, the character does the nearest it can, and the ask becomes a clip to
|
||||
make
|
||||
|
||||
@done
|
||||
Scenario: CH16a. Acts, and controllers that return them, carried out by the matcher on SOMA
|
||||
# 11-15. sdk/body's stage module: an act is go (to a point or through several, at a gait), wait, or look
|
||||
# (at a point, a named character, or nothing). `direct` plays a cast for some seconds: each character's
|
||||
# controller is asked when its acts run out (and at the start), told where it and every other character
|
||||
# is and the time; go and wait become the matcher's steps, look is laid on the pose by the look solver.
|
||||
# Controllers so far: `script` (a fixed list), `keepNear` (stay within a reach of another character,
|
||||
# looking at it), and `actsFrom`, which reads acts from outside data (a language model's JSON) and keeps
|
||||
# only those in the vocabulary. Shown with two SOMA bodies: one follows a script, the other's controller
|
||||
# was asked 16 times in 26 seconds and kept him near her. The same cast and seconds give the same frames.
|
||||
# Added the same day: face (a step toward a point or a character) and sit (the library's captures of
|
||||
# sitting down, sitting and rising, played from where the body stands and eased at each join; the scene
|
||||
# is told where to put the seat). Found while adding sit: the matcher set the body back inside its
|
||||
# guide's reach at once, and a stop that overshot on SOMA moved the hips 19 cm in one frame; the return
|
||||
# is now limited a frame, and the worst hip step in the scene is a walking pace's (4.8 cm). 31 of the
|
||||
# body SDK's 35 tests pass, the four left being the hand layer.
|
||||
# Then take: the act reserves a stretch of standing and says which frame it starts at; the scene applies
|
||||
# the engine's take (raea/character `take`: reach, grab, carry, put down or throw, a hand-over, a thing's
|
||||
# own path) over the staged pose, so put, throw, hand over and use are the same act with another spec.
|
||||
# Shown: a controller walks a character to a table and, once she stands there, has her move a cup along
|
||||
# it; she walks off after. Faults seen: she stops 25 cm past her mark, into the table's edge (the stop's
|
||||
# overshoot again); and the other character stood with raised arms, which was two turning captures
|
||||
# whose actor holds his hands up throughout: dropped from locomotion.
|
||||
# The stop's overshoot was then measured and dealt with in the matcher: over six paths a walk came to
|
||||
# rest 20 to 37 cm past its mark along its way (26 on average), whatever the path. Nothing may drag a
|
||||
# standing body back, so the walk is played again (up to four times) with each stop's mark set back by
|
||||
# what the last playing overran, and the playing whose worst stop is nearest its mark is kept: 6 cm on
|
||||
# average, 14 at worst, the planted feet's slide unchanged (7 mm). She now stands at her mark by the
|
||||
# table. The cost: a staged character is performed several times over, seconds for a scene.
|
||||
# Not in the vocabulary yet: do (a line of text made into a clip, which waits on CH11). A controller's unmet ask is not logged
|
||||
# yet (CH15).
|
||||
Then a script and a controller give acts in one vocabulary and the matcher carries them out
|
||||
|
||||
@done
|
||||
Scenario: CH18a. The takes run on a SOMA body
|
||||
# 11-15. The Rust arms and hands (docs/hands.feature) find a joint by its role on either rig, so reach,
|
||||
# grab, carry and throw run on SOMA with no second copy. The audit's six takes on SOMA's skin: holds
|
||||
# within 2 to 8 mm and no body skin in a carried thing, as on the old rig; the fingers are not tuned to
|
||||
# SOMA's hand (hand skin 22 mm into a box, no pads on a cup, 41 to 47 mm into the table as a hand leaves).
|
||||
# The joint limits have a SOMA table (the body SDK's, measured over the library on SOMA). The fingers'
|
||||
# rest curl is close to the old rig's (the thumb's first bone lies 31 degrees off the hand against 69),
|
||||
# so the misses were not a matter of rest pose. Found: the finger curl placed a knuckle from its parent
|
||||
# joint, which on the old rig is the wrist and on SOMA is a bone in the palm, so each finger was worked
|
||||
# out 8 cm from where it is. Placed from the hand's joint: finger pads on a cup go from none to 6, hand
|
||||
# skin in a box from 22 to 17 mm (the old rig's own numbers unchanged). Six takes are drawn on SOMA's
|
||||
# body (a box thrown, a cup moved, a mug drunk from, a cup passed between hands, a box at 14 kg). Left:
|
||||
# the middle finger and thumb tip 15 to 17 mm into a box, and hands 41 to 47 mm into the table as they
|
||||
# leave.
|
||||
Then a take runs on SOMA, its fingers still to be fitted to SOMA's hand
|
||||
|
||||
Scenario: CH18. What a clip cannot know is added on top, and measured
|
||||
# docs/hands.feature (reach, grab, carry, throw, look), feet and seat contacts (character.md layer 4).
|
||||
Then hands, eyes and contacts are laid over the matched pose by IK, each reporting how far it moved the pose
|
||||
And a large correction is reported as a missing clip (principle 2), which CH15 can then make
|
||||
|
||||
Rule: Heads
|
||||
|
||||
Scenario: CH20. The generated head joins the body at the collar
|
||||
# Agreed between the body and face sessions 11-15, reported to the user by the face session. The face
|
||||
# side fits a head model (Apache-2.0) to close-up photographs: identity, expressions, eyes, skin texture.
|
||||
Given head.glb skinned to SOMA's Neck1, Neck2 and Head, with SOMA's eye joints, and its expressions as
|
||||
about fifty named morph targets, and head.json (its collar ring, eye centres, morph names, neck colour,
|
||||
and the size it was fitted at, so the body's build scales the head to the body)
|
||||
Then the body's own head is cut away from the collar up when the body is built, and the neck is one mesh
|
||||
And the body's motion drives the neck and head; the face layer adds expression and the eyes on top; the
|
||||
eyes take a look target in the world and cover what the head has not turned
|
||||
And the face's skin colour is carried onto the body's skin at the seam
|
||||
And `<Character>` passes the face's weights to the head's morph targets by name (its `morphs` prop does this
|
||||
for a body's own morphs today) and takes a look target
|
||||
|
||||
@done
|
||||
Scenario: CH20a. The first generated head rides SOMA's body
|
||||
# 11-15. The body is built without its head (cut level through mid-neck at 1.515 m; its open edge written
|
||||
# as a ring of its own 80 vertices with their normals and weights); the face session's head ends on that
|
||||
# ring with those weights, so the neck is closed with no weld at run time. A Character part may name the
|
||||
# body's joints it has (`joints`), since the engine refuses a part that lacks a joint it is handed. The
|
||||
# head rides the matcher's walk, its expressions driven by name, glasses on as a one-joint part. Left: the
|
||||
# body is one flat colour against the head's baked skin (a step shows at the seam), the eyes' look target,
|
||||
# and the head's ears, which the face session is rebuilding.
|
||||
Then a generated head is drawn on SOMA's body as a part, joined at the collar
|
||||
|
||||
@done
|
||||
Scenario: CH20b. The body's skin is graded to the head at the collar
|
||||
# 11-15. Measured first (sheet3d compositions/seam_check.tsx: the headless body at rest with the head as a
|
||||
# part, lit evenly, seen close from the front, both sides and the back, the collar on the middle row): the
|
||||
# body, built in the head's neck colour, stood 8 levels of 255 lighter than the head's skin across the
|
||||
# collar at the front, 1 to 3 at the sides and back, and the line showed. `raea clothes wear ... --head
|
||||
# HEAD_DIR` (engine/cli/src/grade.ts) now writes the join into the body it dresses: the skin takes the
|
||||
# head's neck colour, and each vertex under the collar takes the colour the head's own skin has above it
|
||||
# (head.json's ring colours, evened over five round the ring: one texel a vertex drew streaks), easing into
|
||||
# the neck colour 8 cm down, as vertex colours on body.glb. The step at the front is under 1 level, 1 to 4
|
||||
# round the rest. Left: the head's own strip above the collar repeats one texel a column (its ring takes
|
||||
# its nearest rim vertex's place in the picture), the neck's outline stops flaring for 2 cm above the
|
||||
# collar, and the body's skin has none of the head's fine detail.
|
||||
Given a headless body and the head joined to its collar
|
||||
Then the body dressed with that head named has its skin in the head's neck colour, graded to the head's
|
||||
own skin at the collar, and no step of colour shows across the join
|
||||
|
||||
@done
|
||||
Scenario: CH20c. The eyes take a look target
|
||||
# 11-15. `<Character gaze={[x, y, z]}>` (sdk/character/src/character/eyes.ts): each eye joint is turned to
|
||||
# the point on top of the pose, in its head's frame, so the eyes cover what the head has not turned; no
|
||||
# further than an eye goes (35 degrees to a side, 25 down, 17 up: the head's upper lid has no morph that
|
||||
# lifts it, and at 25 up the iris went under it). A part that has the eye joints has its upper lids ride
|
||||
# the eyes down (its blink morphs raised to 0.45 at the lowest): without that the white showed over the
|
||||
# iris. Seen on the first head, straight, to each side, up and down (sheet3d compositions/gaze_check.tsx).
|
||||
# Not yet: lids that lift, and a stage act's `look` sending the eyes as well as the head.
|
||||
Given a body whose head has eye joints, and a point in the scene
|
||||
Then the eyes turn to it within their range, whatever the neck and head are doing
|
||||
And the upper lids come down with them
|
||||
|
||||
Scenario: CH21. Hair
|
||||
# Agreed with the face session 11-15. sdk/body/src/cloth.ts already moves hair and clothes that follow
|
||||
# skin. Hair cards are the face session's working choice, pending its tests; strand hair stays a reference
|
||||
# for offline renders. Open: whether spring chains under Head (helper joints) drive the cards instead.
|
||||
Then hair is a card mesh delivered with the head, attached to SOMA's Head, each vertex carrying how far it
|
||||
may stray (0 at the scalp), moved by the same follower as clothes
|
||||
And hats and glasses are rigid pieces on Head, delivered with the head
|
||||
|
||||
@done
|
||||
Scenario: CH21a. Hair cards ride the head, and a whole person stands on the standard
|
||||
# 11-15. The face session's hair (cards grown from its strand grooms, one mesh skinned to Head, a stray
|
||||
# distance per vertex in a custom attribute, four styles) is drawn as a Character part beside the head
|
||||
# and the glasses. With it a whole person is on the standard for the first time: SOMA's body, the
|
||||
# generated head joined at the neck, hair and glasses, generated clothes in two layers, walking by motion
|
||||
# matching. Not yet: the hair moving (the follower does not read the stray attribute from a part), and
|
||||
# raea's own hair shading on it (that shader wants tangents the cards do not carry, so it is drawn with
|
||||
# its own material). Both since: CH21b.
|
||||
Then a person is a body folder and parts, each made by its own flow
|
||||
|
||||
@done
|
||||
Scenario: CH21b. Generated hair moves on the follower
|
||||
# 11-15. `bun sdk/body/tools/hair.ts SKELETON.json HAIR.glb POSES.json OUT.bind.rseq SKIN.glb...` reads a
|
||||
# head's hair cards as cloth (each vertex free by its stray attribute), carries them through a
|
||||
# performance on the cloth follower, kept outside the skin as drawn (the head, the body, what it wears),
|
||||
# and writes the frames in the hair's own bind pose; a Character part draws them with
|
||||
# `cloth: { src, frame }`, so the hair keeps its cut-out and raea's hair shader (the cards carry tangents
|
||||
# now). Measured on the first head's loose hair (33,191 particles, three quarters free) over SOMA's 449
|
||||
# frame locomotion clip, as free particles more than 3 mm inside the skin, the worst of every tenth
|
||||
# frame: 3,874 carried by the head alone, 223 on the follower; the hair leaves its skinned place by 13 mm
|
||||
# on average. Three causes found on the way. The hair is generated for the head alone and hung straight
|
||||
# through the upper back (4,982 particles in the skin at rest): it is laid over the body at rest first.
|
||||
# Brought out one particle at a time, each lock was kinked at every vertex and drew as zigzags over the
|
||||
# shoulders: what the fit moves is evened along each lock. And the follower starts as the skin has it,
|
||||
# in the shoulders of the first pose: the first pose is held for 20 frames first. Left: a few locks
|
||||
# stretch down an arm (a particle strays 15 cm at most, its limit 6), the bake runs at 0.36 s a frame, and
|
||||
# the frames are baked for one performance, not followed live in play.
|
||||
Given a head's hair cards, a body with what it wears, and a performance
|
||||
Then the hair is carried by the follower through it, outside the head, the body and the clothes
|
||||
And it is drawn as a part of the character with raea's hair shader
|
||||
|
||||
Rule: Creatures
|
||||
|
||||
# The creature flow is the raccoon session's, end to end, in docs/creatures.feature (its sandbox is the
|
||||
# trashpanda project; done when it works on the raccoon and a second, more complex creature). These three
|
||||
# scenarios say only where it meets the rest. Kimodo is no part of it: its models are for human skeletons
|
||||
# only (SOMA, a humanoid robot, SMPL-X).
|
||||
|
||||
Scenario: CH30. A creature is its own skeleton, set down first
|
||||
# A creature's joints are placed by measure before its model is made, and its folder is CH2's with its
|
||||
# own rig name. Its model may be built, or generated the way the raccoon's now is: a grey mannequin of
|
||||
# the skeleton, an image model drawing the animal on it with the pose and view kept, that image made 3D,
|
||||
# and the mesh laid back on the skeleton and weighted there.
|
||||
Then a creature's rig is read from its joints (CR1), and its helper joints are named as helpers
|
||||
|
||||
Scenario: CH31. A creature moves by its solver, and by clips where it has them
|
||||
# The solver (gait by speed, planted feet, one rigging for every move: CR2 to CR9) needs no clips. Clips
|
||||
# for a creature come from anymove (patch-gg/anymove, Apache-2.0): a generated two-camera video of the
|
||||
# rigged creature, read by a joint reader trained on that creature, fitted to its rig. Like Kimodo it is a
|
||||
# cloud step that writes clips, and it films a creature on a flat floor only.
|
||||
Then a creature's clip is CH10's format on its own joints, checked as CH13 checks a person's
|
||||
And where a creature has clips for a situation the matcher plays them, and the solver holds its feet; where
|
||||
it has none, the solver makes the move
|
||||
|
||||
Scenario: CH32. anymove tried on the raccoon
|
||||
# 11-15, run end to end; not yet a pass. The raccoon's skin (no fur shells) and 36 bones on its own joints
|
||||
# were set up as an anymove creature in Blender on a Mac (its renderer made to use Metal there); the pose
|
||||
# dataset (2,200) and the joint reader were made on a cloud card in 35 minutes (held-out error 6.9 px
|
||||
# front, 4.8 side, anymove's wolf being 6.9 and 3.8); two five-second walk clips from the video model
|
||||
# both kept the split screen and the limb colours; each was read and fitted in 5.5 minutes and exported
|
||||
# as a GLB. By anymove's own measure, how well the paws' heights agree between the two views, the clips
|
||||
# score 0.23 and 0.56: under 0.5 is a reroll, 0.8 is a keep, so none of 2 passes and one is worth a look
|
||||
# (anymove reports about 7 clips for a usable move). Cost so far about 2.10 dollars: 0.52 for the clips,
|
||||
# the rest cloud time estimated from minutes. Measured against the raccoon traced from real footage (the
|
||||
# raccoon session's check, nine measures): the first two clips were smooth with good foot timing but
|
||||
# were a generic four-legged walk, the head and tail level with the back and the legs in diagonal pairs.
|
||||
# Two more clips, the prompt naming a low head, an arched back, a hanging tail and a pacing walk (0.77
|
||||
# dollars more with their captures): the carriage came into a raccoon's range (top of the head 0.74 of
|
||||
# the back's height, nose 0.32, withers 0.82) and the better clip has 7 of 9 measures in range; still
|
||||
# off in all four are the order of the legs (a fore foot 0.36 of a stride after its side's hind, a
|
||||
# raccoon's being 0.14) and the tail's tip (0.27 against 0.18). The views' agreement stayed under the
|
||||
# keep line (0.42 and 0.53), the far hind paw the weak one in all four clips. So far: a prompt sets
|
||||
# carriage, not the order of the legs; clips give timing and smoothness; CH31's split (clips for motion,
|
||||
# the solver for contact and carriage) stands. The solver's own order was wrong too, found the same day: it
|
||||
# read each leg's offset with the wrong sign, so a fore foot came down 0.26 of a stride BEFORE its hind.
|
||||
# Fixed in the creature solver (private sdk/body, d89244e, with a footfall test that fails on the old sign),
|
||||
# a fore foot lands 0.10 after its hind and the hinds 0.50 apart, as a raccoon's do; the same change keeps
|
||||
# every planted foot inside its leg's reach (setting off after standing had left one 59 mm short on the
|
||||
# raccoon, 81 on a dragon). So on the order of the legs the solver now beats anymove's clips. To come: the generated raccoon's skin and refitted joints
|
||||
# in place of the built one, and why the fore paws carry no agreement score.
|
||||
Then the raccoon has a walk from anymove, and the numbers say whether it beats the solver's walk
|
||||
|
||||
Rule: Clothes: first drawn on the mannequin by an image model (rejected), now sewing patterns (proposed)
|
||||
|
||||
# Superseded the same day: the user saw these garments on the body and rejected them ("on the body it looks
|
||||
# terrible"; the views "are not consistent at all"). CH47a and CH48a below are the direction now; CH40-CH46
|
||||
# stay as the record of what the picture method could and could not do.
|
||||
# The user's direction, 11-15: generative or procedural; perhaps the mannequin as the base input, an image
|
||||
# model on top of it, and layers from there. Tried that day on SOMA's body, and it works; what follows is
|
||||
# the standard those tests point to. The idea in one line: a garment is not a mesh of its own, it is data
|
||||
# on the body's own vertices (which are covered, how far the cloth stands off, its colour, how freely it
|
||||
# may swing), so it carries the body's skinning, twist joints included, and fits every SOMA person without
|
||||
# being refitted; only cloth that hangs free of the body (a skirt, a coat's tails, a hood) is its own mesh.
|
||||
|
||||
@done
|
||||
Scenario: CH40a. A picture of the dressed mannequin lies on the mannequin pixel for pixel, one view at a time
|
||||
# 11-15, with an image model that edits a given picture (flux_2_pro through `raea gen image --image`, 5
|
||||
# cents a picture). The mannequin: SOMA's body at rest, flat dark grey on mid grey, no perspective, 2 m
|
||||
# of height in a square frame, from the front, the back and each side (tools/soma_mannequin.py in the
|
||||
# test project writes the pictures and their cameras). Measured by laying each result over its mannequin:
|
||||
# one view, asked to change only the surface where clothing covers it: every limb, the head, the hands
|
||||
# and the feet stay where they were, front, back and both sides alike, and the clothes sit outside the
|
||||
# body's outline. Four views on one sheet in one call: the model lays the sheet out again (two fronts,
|
||||
# one side), so nothing can be laid back. A view given a second picture as the outfit to copy: it draws
|
||||
# a front again, smaller. A layer added to a dressed view ("add exactly one garment and keep everything
|
||||
# else": a jacket over the t-shirt): pose and place hold and the rest is kept. Between views drawn apart
|
||||
# the cut and the kind of garment agree from the words alone; the colour drifts (the jeans' wash).
|
||||
Then each view of a garment is drawn on its own mannequin, a layer at a time, and views agree by their words
|
||||
|
||||
@done
|
||||
Scenario: CH40b. Those pictures become an outfit on SOMA's own vertices, worn through a walk
|
||||
# 11-15, first cut (tools/soma_clothes.py in the test project). Each vertex of the body's skin is looked
|
||||
# up in the views that face it and see it (a ray to the camera meets nothing of the body): where the
|
||||
# picture shows cloth and not the mannequin's grey it is clothed and takes the cloth's colour; the mask
|
||||
# is tidied on the mesh (a bare vertex ringed by cloth is cloth, a small island is not); the clothed
|
||||
# skin, pushed 4 mm out, is the outfit, with the body's own weights. A t-shirt, jeans and shoes made
|
||||
# this way are worn by SOMA's body through the matcher's walk as a Character part (6,519 of 19,830
|
||||
# vertices). What the first cut lacks: the cloth is skin-tight (no silhouette is measured yet), the tops
|
||||
# of the shoulders and the soles are seen by no view, the colour is per vertex (soft), hems are jagged
|
||||
# along the body's own edges, toes show through shoes, and the views' colours are not matched.
|
||||
Then a drawn outfit is worn by a SOMA body in motion with no rigging step
|
||||
|
||||
@done
|
||||
Scenario: CH41a. The cloth's stand-off read at the outlines
|
||||
# 11-15. Where a view sees a clothed vertex on the body's outline (its normal across the view), the
|
||||
# picture is walked outward along the normal until the cloth ends and the backdrop begins: that distance
|
||||
# is how far the cloth stands off there. Read at 3,585 outline vertices of the t-shirt, jeans and shoes
|
||||
# (2 mm at the tenth of them, 4 at the middle, 16 at three quarters, 35 at nine tenths), spread over each
|
||||
# garment through the mesh, never under 4 mm nor over 8 cm. The jeans now hang as trousers and the shirt
|
||||
# stands off the trunk. Wrong still: the shoes are lumpy (the toes' own shape reads as outline), the tops
|
||||
# of the shoulders are bare, and a reading is one distance per vertex, so a fold is not a fold.
|
||||
Then a garment's looseness comes from its picture
|
||||
|
||||
Scenario: CH41. A garment's shape is measured, not assumed
|
||||
Given each layer's views and the views of the layer under it
|
||||
Then how far the cloth stands off the skin is read where the two outlines differ in each view (a sleeve's
|
||||
width against the arm's, a trouser leg's against the leg's), and spread round each limb between the
|
||||
views that see it, so a loose fit is loose
|
||||
And a view from above and one from below are drawn too, so shoulders and soles are covered
|
||||
And a garment's edge (a hem, a cuff, a collar) is cut where the picture puts it, not along the body's faces
|
||||
|
||||
@done
|
||||
Scenario: CH42a. A garment file on SOMA's template vertices, worn with the skin under it left out
|
||||
# 11-15 (tools/soma_clothes.py in the test project: `measure` and `wear`). A garment is a JSON file: its
|
||||
# name and layer, the template vertices it covers (by SOMA's own numbering of its 18,056, found from
|
||||
# the body's vertices by their rest places), each one's stand-off, colour and how far it may stray, and
|
||||
# the pictures it came from. `wear` builds each garment's mesh from the file on a body (the covered skin
|
||||
# pushed out by the stand-off, the body's own weights) and writes the body with the skin that is wholly
|
||||
# under cloth left out (13,368 of 26,116 faces under a t-shirt, jeans, shoes and a jacket). Not yet: a
|
||||
# texture in the body's UVs (colour is per vertex), and a second SOMA shape to prove the fit carries.
|
||||
Then a garment is a file of numbers on SOMA's vertices, and a dressed body draws no skin under its clothes
|
||||
|
||||
@done
|
||||
Scenario: CH43a. A second layer over the first
|
||||
# 11-15. A bomber jacket drawn over the t-shirt view by view ("add exactly one garment and keep
|
||||
# everything else"). It is the vertices where its picture differs from the picture of the layer under
|
||||
# it, and it stands off at least that layer's distance plus 3 mm (measured: 20 mm at the tenth of its
|
||||
# vertices, 42 at the middle, 73 at nine tenths), so the layers do not cross. Learnt: an added layer on
|
||||
# the back view came out as the garment's front (a zip and an open front) until the words said what is
|
||||
# seen from behind; and a dark garment over the dark mannequin needs a small difference to count.
|
||||
Then a jacket is worn over a shirt, each its own garment file
|
||||
|
||||
@done
|
||||
Scenario: CH42b. The same garment files on a body of another build
|
||||
# 11-15. The body's build takes SOMA's own shape model (SOMA_neutral.npz: a component by so many of its
|
||||
# standard deviations); a second body moved along three components (up to 11 cm at a vertex, slimmer and
|
||||
# longer in the neck) wears the t-shirt, jeans, shoes and jacket measured on the template body, from the
|
||||
# same files, with nothing refitted, through the same matched walk beside the first. A shaped body's
|
||||
# vertices are matched to the template's numbers through its template-shaped twin (same export, same
|
||||
# order). Not done: the joints stay where the template has them (SOMA's own layer moves them with the
|
||||
# shape), so only small changes of build are right; and this is HG17's start, not its end.
|
||||
Then a garment made once dresses SOMA bodies of different builds
|
||||
|
||||
@done
|
||||
Scenario: CH42c. A garment's colour is a picture in the body's own UVs
|
||||
# 11-15. `wear` bakes each garment's colour as a 2048 px picture in the body's first UV set (spread to
|
||||
# fill it): every texel of a covered triangle is a point of the body, looked up in the view that faces
|
||||
# its triangle most among the views that see all three corners. The jeans now show their fly, pockets
|
||||
# and wash and the jacket its zip and ribbing, where a colour per vertex gave a blur. Also: a small bare
|
||||
# patch walled in by cloth is counted as cloth, which closed the t-shirt's shoulder tops (the jacket's
|
||||
# still gape: their gap runs into the collar). Seen now that the detail is there: the views' colours
|
||||
# differ (the back of the jeans is paler than the front), so a seam shows where one view hands over to
|
||||
# the next; matching them garment by garment is not done.
|
||||
# Looked into after: the skin still seen at the shoulders is not a hole in the jacket. Both garment files
|
||||
# cover the shoulder tops; what shows is the slope between neck and shoulder, which the t-shirt's
|
||||
# neckline leaves bare (read too wide: that skin faces up, and the level views see it at a glance).
|
||||
# An upward-facing vertex among mostly covered skin is now counted as covered, which did not reach it.
|
||||
# Tried and taken back: matching the views' colours by the front's main colours (pale denim on the back
|
||||
# was taken for the shirt's white), and counting any changed pixel of a layer as its cloth (the jacket
|
||||
# then covered the hands).
|
||||
Then a garment carries its own picture, and its detail is the drawing's
|
||||
|
||||
Scenario: CH42. A garment is kept as data on SOMA's topology
|
||||
Then a garment file holds, per body vertex it covers: that it is covered, its stand-off, and how far it
|
||||
may stray (for the cloth follower); and a texture in the body's own UVs, baked from the views with the
|
||||
views' colours matched to the front's garment by garment
|
||||
And the same file dresses every SOMA person (the shape model moves the vertices, the garment rides them)
|
||||
And a body's skin under a garment is not drawn, so nothing pokes through
|
||||
|
||||
Scenario: CH43. Layers
|
||||
# The raccoon session's finding holds here too: an image edit keeps the outline it is given, so a layer
|
||||
# can be added and never taken away. Outfits are built up from the bare body.
|
||||
Then an outfit is an ordered list of garments, each drawn over the ones under it, each one's stand-off at
|
||||
least the one under it plus its own thickness, so layers never cross
|
||||
And a garment drawn alone on the bare mannequin can be worn under or over others by re-measuring its
|
||||
stand-off against what is under it
|
||||
|
||||
@done
|
||||
Scenario: CH44a. A skirt hangs from the waist and moves through a walk
|
||||
# 11-15, first cut (sdk/body/tools/skirt.ts). The skirt is made for the body by measure: a tube of 56 by
|
||||
# 22 particles from an ellipse round the waist's skin samples down to a hem, wider as it falls, its top
|
||||
# two rings pinned to the hips and each ring below free to stray further. The cloth follower already
|
||||
# built carries it through the matched walk with the legs as capsules sized from the body's own skin
|
||||
# samples, and it is drawn as a mesh sequence over the walking body. Measured: edges stretched 19 per
|
||||
# cent at the 99th percentile. Two faults mended the same day: the seat came through the back (each ring
|
||||
# is now at least as wide as the body at its height down to the crotch, and the pelvis has a collider),
|
||||
# and it rode up and shortened by the end of the walk (less room to stray: 27 cm at most, was 39). Wrong
|
||||
# still: the thighs show through the front at the longest stride (sizing the rings to the thighs and
|
||||
# more room to stray were tried and taken back: the cloth bunched), and it sits on the hips, not the waist. Not yet: grown from a garment's edge or drawn from a picture's
|
||||
# outline (it is a plain tube), a hood or a coat's tails, and its colour from a garment file.
|
||||
Then cloth hangs free of the body and moves with it
|
||||
|
||||
Scenario: CH44. Cloth that hangs free
|
||||
Then a skirt, a coat's tails, a hood, a scarf are meshes of their own, grown from the garment's edge on the
|
||||
body down to the outline the views show, weighted from the body at the edge and free below it
|
||||
And they move by the cloth follower already built (sdk/body/src/cloth.ts: each vertex strays from its
|
||||
skinned place by its own distance, with no collision shapes)
|
||||
|
||||
@done
|
||||
Scenario: CH45a. One command from words to a garment
|
||||
# 11-15 (tools/wardrobe.sh NAME "what it is" [UNDER] in the test project). It writes each view's prompt
|
||||
# (what is seen from that side, what to keep), asks for the four pictures at once, says what they cost,
|
||||
# and measures the garment; with UNDER it adds a layer over a garment already made. Run once on a new
|
||||
# outfit (a red hoodie, black joggers, black shoes): 20 cents and 36 seconds to the garment file, then
|
||||
# worn through the walk. Learnt: black cloth reads as the mannequin unless the mannequin's grey is told
|
||||
# apart from black; the hood was drawn up though asked down. It is a script in the test project, not
|
||||
# yet a `raea` verb, and it makes no garment by hand or by procedure.
|
||||
Then a line of words becomes a garment file with its cost said
|
||||
|
||||
@done
|
||||
Scenario: CH45b. `raea clothes`: garments from words, by procedure, and worn
|
||||
# 11-15. A shell verb (engine/cli/src/clothes.ts reads the words, wardrobe.ts does the work on the native raea;
|
||||
# the Blender scripts are tools/clothes, shipped with a release). The first use fetches SOMA-X's two body files
|
||||
# at a fixed commit, checked by SHA-256, into raea's models folder (soma/, with the Apache-2.0 licence), and makes
|
||||
# SOMA's body folder and the mannequin's four views there once (18 s on this Mac). `make NAME "words" [--over
|
||||
# A,B]` draws the four views at once (flux_2_pro, one picture a view) and measures them onto SOMA's template
|
||||
# vertices: assets/clothes/NAME.json, its pictures kept in assets/clothes/NAME/views as its source. Over a
|
||||
# garment made by procedure, or several at once, the mannequin is first drawn wearing them, and the layers beneath
|
||||
# are taken as one for the stand-off. `cover NAME --parts chest,torso,waist,upperArm:0.45 --colour #e8e4da` makes
|
||||
# one by procedure in the same file with no picture: the skin of the parts named (a limb as far along as its
|
||||
# share), with a one-ring hem allowance so garments on neighbouring parts overlap. `wear OUT_DIR A B C [--body
|
||||
# DIR]` writes a body folder (each garment's glb and picture, the body without the skin wholly under cloth, its
|
||||
# skeleton, joint stand-in and collar) and prints the composition's lines. `remeasure NAME` measures a garment
|
||||
# again from its kept pictures, for nothing. Run on an outfit: a t-shirt and shorts by procedure, a flannel
|
||||
# overshirt drawn over them for 20 cents in 35 seconds, all three worn on the headless body with the generated
|
||||
# head through the matched walk (sheet3d compositions/soma_wardrobe.tsx). Mended in the measuring on the way: each
|
||||
# garment's open edge is evened (it ran in a stair along the body's triangles; the body's own UV seams are left
|
||||
# where they are); a garment stands off each part no further than that part allows (a loose sleeve drawn hanging
|
||||
# below the arm had made a balloon of it); the top of a shoulder, and the slope by an open collar, is cloth when
|
||||
# there is cloth in front of it and behind it; a texel that the chosen view shows as backdrop or bare mannequin
|
||||
# takes the garment's measured colour (grey cuffs). Wrong still: the overshirt hangs to the hips in every
|
||||
# picture but wraps the hips when worn (a skin-offset garment can't hang free: CH44), the views disagree on
|
||||
# sleeve length (the back drew it to the elbow), and a sliver by the collar is still open. The verb makes one
|
||||
# garment a call; an outfit is several calls, innermost first.
|
||||
Then a garment is made by one command from words or by procedure, and an outfit is worn by one more
|
||||
|
||||
@done
|
||||
Scenario: CH45c. `raea clothes make` sews; the picture-measured garments are gone
|
||||
# 11-15 night. `raea clothes make NAME ["WORDS"] [--plain] [--set PATH=VALUE,...] [--colour #RRGGBB]` makes a
|
||||
# sewn garment (CH47a's patterns, CH48c's model) in the project: assets/clothes/NAME.json (kind "sewn") and
|
||||
# assets/clothes/NAME/ (the glb, the design, the flat pattern, four pictures). The design is the garment
|
||||
# model's from the words, or GarmentCode's plain base with --plain or no words; each --set changes one of its
|
||||
# 122 settings by path, checked against its options or range (a wrong one says what is allowed);
|
||||
# `raea clothes settings` lists them. The first use sets up raea's models folder (garments/): GarmentCode
|
||||
# cloned at a fixed commit and checked by it, a Python 3.11 environment made by uv from a pinned list, SOMA's
|
||||
# body as a distance grid. `wear` takes sewn garments beside ones laid on the skin: each sewn glb is copied
|
||||
# and the skin under it left out (tools/garments/hide_under.py). Measured before building: the model alone
|
||||
# is not enough ("a short-sleeved t-shirt" came out an open flared tunic with ruffled cuffs, "straight
|
||||
# trousers" knee-length culottes, colours by chance), so the settings are the control and the words a first
|
||||
# guess. A tee and trousers by settings, 18 and 28 seconds, $0, worn with the generated head and walked
|
||||
# (sheet3d compositions/soma_sewn.tsx): they read as clothes, with a cut, a hem and folds. Taken out: `make`
|
||||
# by four drawn pictures measured onto the skin, `remeasure`, the mannequin's views (wardrobe.ts's drawing,
|
||||
# tools/clothes/garment.py's measure, mannequin.py); a garment measured that way is refused by `wear` with
|
||||
# what to do instead. `cover` stays for what is skin-tight. Wrong still: an outer garment is draped on the
|
||||
# bare body (the trousers' waistband shows through the tee's hem); trousers at length 0.9 drag on the
|
||||
# floor; a sewn garment is skinned in motion, not simulated (CH44); the words model is not fetched by a
|
||||
# release yet (only this machine's models folder has one).
|
||||
Then a garment is sewn by one command from words or from settings, for nothing, and worn by one more
|
||||
And no garment is measured from pictures any more
|
||||
|
||||
Scenario: CH45. From words to a wardrobe
|
||||
Then `raea` takes a description of an outfit, draws its layers and views, builds the garments, and writes
|
||||
them beside the body, saying what each picture cost; the pictures are kept with the garment as its source
|
||||
And a garment can also be made by hand or by procedure in the same file format, with no picture at all
|
||||
|
||||
@done
|
||||
Scenario: CH46a. A dressed body measured through a walk
|
||||
# 11-15, first cut (tools/clothes_check.py in the test project; skins the body and each garment as the
|
||||
# engine does, twist joints included, every 15th frame of a performance). Per garment: how deep its cloth
|
||||
# goes under the skin, how deep under the layer beneath, and how far its edges stretch from rest, with
|
||||
# the joints that carry the stretched edges. On the two-layer outfit through the matched walk: the
|
||||
# t-shirt, jeans and shoes 17 mm under the skin at worst, 1.7 per cent of edges over 1.5 of their rest
|
||||
# length (at the armpits, the crotch and the feet); the jacket 40 mm under the skin and 29 mm under the
|
||||
# shirt at worst, 6 per cent of edges over 1.5 (the chest, the forearms, the armpits). The depth is read
|
||||
# against the nearest vertex of the surface beneath, which at an armpit or the crotch can be another
|
||||
# limb's, so those two numbers overstate; the stretch is exact. Nothing is fixed by it yet: a garment's
|
||||
# mesh bridges arm and trunk where the body's does, and the rest pose's spread arms close in a walk.
|
||||
Then a garment's faults in motion are numbers, by joint
|
||||
|
||||
Scenario: CH46. Checked like motion is
|
||||
Then a dressed body is run through the library's captures and measured: skin showing through cloth, cloth
|
||||
through cloth, and edges stretched past a limit, per garment
|
||||
|
||||
@done
|
||||
Scenario: CH47a. Garments from sewing patterns, cut to SOMA's measurements and draped by a cloth of our own
|
||||
# 11-15, after the user saw `raea clothes make` on the body ("on the body it looks terrible"; "the 4 panels
|
||||
# are not consistent at all") and asked whether clothes are thought of wrong. They were: a garment painted
|
||||
# onto a shell of the skin can't show a cut, a hem or a fold, and four pictures drawn apart never agree.
|
||||
# Clothes are flat pieces cut to a pattern and sewn, their shape from the cut, gravity and the body.
|
||||
# GarmentCode (ETH Zurich, pygarment, MIT) writes patterns as programs of modular components (bodices,
|
||||
# sleeves, collars with a hood, a turtle neck or a lapel, cuffs, waistbands, trousers, seven skirts)
|
||||
# joined by seams, sized from 26 body measurements. Its simulator is NOT used: it is a fork of an old
|
||||
# NVIDIA Warp under a non-commercial licence (mainline Warp is Apache-2.0 since 1.6.2), and its sample
|
||||
# SMPL bodies are research-only; SOMA replaces them. Blender's own cloth with sewing springs failed four
|
||||
# ways (crumpled, slid off the shoulders). What worked, in the test project's scratch tools: SOMA measured
|
||||
# in GarmentCode's terms (bust 81, waist 73, hips 93 cm: slimmer than its average body); a design is
|
||||
# settings by path (sleeve.length=0.95 collar.component.style=Hood2Panels), which is what a sentence has
|
||||
# to become; the cut written as flat pieces, their place round the body and the seams as vertex pairs;
|
||||
# then a position-based cloth (every edge held to its length in the flat cut, each seam's pairs pulled to
|
||||
# one point, the cloth pushed out of the skin by the nearest point, gravity let in once the seams close)
|
||||
# on the CPU. A T-shirt (6,042 vertices) closes its seams by frame 30 (0.5 mm at the middle) and hangs
|
||||
# from the shoulders with 20 per cent stretch at the 95th percentile, in 2 minutes; trousers (15,368) in
|
||||
# 4.4, a hoodie with its hood and cuffs over them (12,541) in 3.4, no cloth inside the skin in any. Each is
|
||||
# weighted from SOMA's skin by nearest face and worn as a Character part through the matched walk, with
|
||||
# the skin wholly under it left out of the body (sheet3d compositions/soma_patterns.tsx). The flat cut is
|
||||
# each garment's UVs, so a fabric is one tiling picture with no seams between views. Faults: the hood is
|
||||
# drafted up and holds the hoodie high (above the waist); wide trouser legs, skinned from the nearest skin
|
||||
# and not simulated as they walk, stretch a sheet between the legs at a full stride (CH44's follower is
|
||||
# the fix); GarmentCode places pieces for its own body, so SOMA needs them lifted 7 cm while they are
|
||||
# sewn; no open-front shirt or pocket component exists yet.
|
||||
Then a garment is a pattern cut to the body and draped, and it walks with the body
|
||||
|
||||
Scenario: CH47. Clothes are sewing patterns (proposed: the user decides)
|
||||
# Proposed 11-15 from CH47a. It would replace CH40-CH42's picture measuring as the way a garment's shape
|
||||
# is made; the image model would draw only fabric (one tiling swatch) and prints placed on a piece.
|
||||
Then a garment is a pattern program's settings, cut to the body's measurements, draped once per body
|
||||
shape at build, and kept as a skinned mesh with its flat cut as its UVs
|
||||
And words become settings (a language model picks components and values), never pictures of the body
|
||||
And layers drape in order, each over the one beneath, and creatures get their own pattern blocks
|
||||
|
||||
Scenario: CH48. A garment model that dresses SOMA in anything (proposed)
|
||||
# The user's answer to CH47, 11-15: "clothing or what you wear could realistically be anything. I wonder
|
||||
# what we could do if we trained a small model like kimodo did or idol did, build off some existing
|
||||
# weights we ship and create something that builds more intelligently". Patterns make only what is cut
|
||||
# and sewn; armour, shoes, hats, a backpack or a costume are not patterns. Kimodo is good because it
|
||||
# learned in one fixed frame (SOMA's skeleton), so what it makes plays on our body unchanged: the garment
|
||||
# model would make garments in SOMA's rest pose and frame, so fit, skinning and layers come free. The data
|
||||
# comes from CH47a's tools run as an engine (GarmentCode's design sampler across SOMA's shapes, draped by
|
||||
# our cloth on the GPU, rendered from the mannequin's cameras, each example labelled exactly: its design,
|
||||
# its pattern, its 3D on the body, its pictures), plus hard-surface things drawn and made 3D by Idol and
|
||||
# cut from the body. GarmentCodeData itself is not used (draped on SMPL bodies, its licence unconfirmed).
|
||||
# The base weights would be Idol's (Apache-2.0, shipped): one picture of the mannequin dressed in anything
|
||||
# in, the garment alone out, in 3D on SOMA. Idol ships no training code, so its fine-tune is ours to write.
|
||||
Then a garment is made by a model from words or a picture, on SOMA's body, as a layer
|
||||
And the training data is ours, made by our own tools on SOMA, with where each example came from
|
||||
And its cost is said before any training is paid for
|
||||
|
||||
@done
|
||||
Scenario: CH48a. The garment data engine: random designs cut to SOMA, draped on the GPU, pictured, labelled
|
||||
# 11-15, CH48's data half (tools/garments/engine.sh OUT N SEED). GarmentCode's sampler draws a design and
|
||||
# its own checks refuse about 60 per cent; each kept one is cut to SOMA and draped by CH47a's cloth on the
|
||||
# GPU (MLX): the body as a 7 mm signed distance grid signed by winding number (the nearest face's normal
|
||||
# put patches of "inside" in the air above the shoulders), every link solved at once, compiled. The
|
||||
# T-shirt that took 125 s on the CPU takes 7 s with the same seams (0.83 mm median) and stretch. Three
|
||||
# things threw garments off, each found from snapshots of the drape: the cloth was too soft under gravity
|
||||
# (+18 per cent stretch at the 95th percentile with 10 solver passes a substep: armholes opened over the
|
||||
# shoulders; 60 passes give +5); SOMA's bust had been read at the chest's most forward level (81 cm), not
|
||||
# the fullest girth under the arms (89.9), so fitted tops were cut too small; and GarmentCode's own drapes
|
||||
# pin labelled edges to planes (a waistband's top at the waist, a neckline inside the neck's sides, a
|
||||
# strapless top's edge at the armpit), without which gathered waistbands (up to 1.9 times the waist) and
|
||||
# strapless tops fall. Ours are one-sided planes kept on, as elastic, boning or the neck holds them, a
|
||||
# low-rise band pinned between waist and hips by its rise. Then 24 designs from 61 draws all hang right,
|
||||
# 4 to 33 s each (about 7,000 a day on this Mac, $0). Rendered properly, the cloth first looked pebbled:
|
||||
# the bake left it flat-shaded, so its glb had three vertices for every triangle (198,881 for 66,305) and
|
||||
# shaded as facets everywhere it was drawn; smooth, it is one surface. The fabric is also stiffer than
|
||||
# CH47a's (bending 0.3, squash 0.6 against 0.05 and 0.25), which buckled at the mesh's own scale; folds
|
||||
# stay and stretch is +6 per cent at the 95th percentile. An example is its design's settings (the labels), a
|
||||
# caption, the pattern, the flat pieces with seams and edge labels, the draped mesh, a skinned glb, four
|
||||
# pictures on the mannequin and the drape's numbers. Faults: GarmentCode's space is mostly dresses and
|
||||
# skirts (no open-front shirts, jackets, pockets, shoes or hats); one body shape so far; no collision
|
||||
# between the layers of one design; the captions are written from the settings, not seen.
|
||||
Then one command makes N random garments, each worn on SOMA and labelled with its design
|
||||
And a garment that slides off is caught by the drape's own check, not by eye
|
||||
|
||||
Scenario: CH48b. The training data at scale, with periods, genres and things that are not sewn (proposed)
|
||||
# The user's choice, 11-15: scale the data and train now, before writing the missing pattern pieces. And,
|
||||
# in his words: "use examples of time periods, futurism, armor/suits/helmets/hats/etc". The engine's lean
|
||||
# mode (LEAN=1) keeps what training needs, about 0.4 MB a design: the design, its caption, the drape's
|
||||
# numbers and the draped mesh; pictures and glbs are made again from those for the examples that need
|
||||
# them. A caption from the settings alone ("fitted sleeveless top, trousers") can't name a period or a
|
||||
# genre, so captions also come from a picture of the garment on the mannequin, written by an image-reading
|
||||
# model asked what the garment is and what it evokes (Edwardian, 1970s, workwear, futurist, uniform), with
|
||||
# its price per caption said first. What can't be sewn comes from CH49.
|
||||
Then the training set holds sewn garments captioned by their settings and by what they look like
|
||||
And worn hard pieces from CH49, each with its words, its picture and its 3D on SOMA
|
||||
|
||||
Scenario: CH48c. Words to a sewn garment through SigLIP 2, trained with no captions (first form of CH48)
|
||||
# 11-15. The base weights are SigLIP 2 (siglip2-base-p16-256, already in raea's models, Apache-2.0), whose
|
||||
# pictures and words share one space. Each lean design is pictured on the mannequin from four sides
|
||||
# (bake_batch.py PICTURES=1, 0.3 s a design) and embedded on the CPU (garment_embed.py; Core ML's GPU computes
|
||||
# SigLIP 2 wrong on this Mac); a small network (two layers of 512, garment_model.py) learns the design's 122
|
||||
# settings as 196 slots (garment_params.py: numbers by their place in range, choices one-hot, the options
|
||||
# being every value seen, since GarmentCode's own defaults fall outside its ranges) from the picture
|
||||
# embeddings, centred on the pictures' mean, with noise added; asked in words, it is given the text
|
||||
# embedding centred on a bank of garment lines' mean (the two kinds sit apart by a near-constant offset).
|
||||
# So no caption is needed to train, and a line nobody wrote a caption for still lands near its pictures.
|
||||
# First run, 86 designs: held-out pictures give the top's kind 0.66 (most common 0.44) and the bottom's
|
||||
# 0.59 (0.31); the numbers are no better than their mean yet. Twelve lines of words with a check each
|
||||
# ("trousers", "a pencil skirt", "a top with a hood", "a strapless top" ...): 11 of 12, as many as taking
|
||||
# the nearest training picture's design, where a random design passes one or two; nonsense ("a bowl of
|
||||
# soup") falls back to a fitted top and trousers. words.sh makes each line a design, cuts it to SOMA and
|
||||
# drapes it, about 20 s and $0: seven of seven were valid patterns and hung right, six read as asked.
|
||||
# Faults: the long-sleeved shirt's sleeve was long but its cuff, a tube about 18 cm round reaching from wrist
|
||||
# to elbow, is narrower than SOMA's forearm and slid off to hang open (one pair 8 cm apart); the drape's
|
||||
# check looked only at the 95th percentile of seam gaps and passed it. A drape now fails with any seam open
|
||||
# over 2 cm ("closed"), which 23 of the first 139 lean drapes do, mostly at sleeve-to-cuff corners, and the
|
||||
# model trains only on drapes that pass. Drawing a gathered edge in to its partner's length (a gathering
|
||||
# thread) was tried and changed none of the eight worst. Also: a turtleneck's collar collapses in the drape,
|
||||
# unasked parts come along (trousers with a turtleneck), and "a long dress" is not known as a top joined to
|
||||
# a skirt.
|
||||
Then a line of words becomes a sewing pattern cut to SOMA and draped, with no caption written to train it
|
||||
And its eval says how it compares with the nearest picture and with chance, on held-out designs and lines
|
||||
|
||||
Scenario: CH49. Worn hard pieces: helmets, hats, armour, visors (proposed)
|
||||
# Patterns make only what is cut and sewn. A helmet, a hat, a breastplate or a visor is made the way the
|
||||
# user first proposed for clothes and the creature flow makes animals: a picture of SOMA's mannequin
|
||||
# (one view, its camera written down) is dressed by an image model, keeping the pose and the view; Idol
|
||||
# (Apache-2.0, run on this Mac) makes the dressed figure 3D; it is laid on SOMA by its camera and size; the
|
||||
# body is cut away (everything within a few millimetres of the skin, by the body's distance grid); what is
|
||||
# left is split by the bone it lies nearest, and each piece rides that bone rigidly, as the head's cap and
|
||||
# glasses ride Head (CH21). It differs from the rejected picture-measured clothes: those painted cloth onto
|
||||
# the skin from four separate pictures that never agreed; here one picture is made 3D whole, and only rigid
|
||||
# things are kept, so nothing has to fold.
|
||||
# 11-15, built as tools/garments/wear.sh (README "Worn hard pieces"): a knight's plate armour (full: the
|
||||
# dressed surface kept whole, set 4 mm off the skin) and four keyed pieces across periods and genres, a
|
||||
# futuristic motorcycle helmet, a Victorian top hat, a Roman legionary's helmet and sci-fi armour, about 5
|
||||
# cents and 5 minutes each. Keyed: the mannequin is drawn magenta and the colour decides what is body, not the
|
||||
# distance (a helmet's crown sits within the cut of the skull and was being cut through); a separate piece
|
||||
# that hugs the skin all over (the soles, which the drawing never shows) is dropped; each piece rides one bone
|
||||
# whole, the one nearest its centre, never a neck bone, and a midline bone when it crosses the middle (so the
|
||||
# breastplate rides the chest, not the arm under its shoulder plates, and a belt with thigh plates the hips).
|
||||
# Open: the back is Idol's guess from one front three-quarter view (the sci-fi armour's back comes out dark),
|
||||
# so a back view drawn to match is next; the surface is lumpy at Idol's 4 mm; a full suit's hands and feet
|
||||
# copy SOMA's bare shape.
|
||||
Then words make a helmet, a hat or armour that SOMA wears and moves with
|
||||
And each piece is its own part on the bone it covers, so pieces mix with sewn garments as layers
|
||||
@@ -0,0 +1,216 @@
|
||||
Feature: Creatures: a four-legged body in the character SDK
|
||||
Set by the user 2026-11-14, with the trashpanda project (a stylized raccoon that walks, sneaks, crawls, stands and
|
||||
walks on two legs, climbs a tree, dangles from a wire, vaults, kicks off a wall, holds things, and goes limp): "if
|
||||
you feel that a four legged creature has merit in the character sdk then also make your PRs alongside the other
|
||||
work to include them and what you find".
|
||||
|
||||
It has merit. The character SDK is one skeleton (MakeHuman's game_engine: 22 body joints and 30 finger joints) and
|
||||
one way of moving it (captures retargeted joint by joint, a motion matcher that picks frames, IK only to hold a
|
||||
contact). None of that reaches an animal: there is no capture library for a raccoon, a dog or a cat on our rigs,
|
||||
and retargeting a person's clip to four legs is not a thing. An earlier game's dog and cat were posed by a solver
|
||||
written inside that project, and called stiff. So an animal needs the other half of what docs/hands.feature
|
||||
began: motion made from what the body is doing, with no capture of it. This file is that for the whole body.
|
||||
|
||||
What was found, building the raccoon:
|
||||
- Skeleton first holds for a built model as it does for a drawn one. The joints are set down by measure; the body
|
||||
is then laid round them as solids, so every limb is where its bone is and the weights have something true to
|
||||
start from.
|
||||
- Where a limb joins the trunk decides whether the skin tears, more than the weights do. With the knee and elbow
|
||||
touching the belly at rest, a voxel union fuses skin across them, and no weighting saves an edge whose ends ride
|
||||
on joints that move 10 cm apart: 0.4% of edges torn at a walk. Moving the knees and elbows clear, so a leg joins
|
||||
the trunk only at its hip or shoulder, took the walk to 0.05% with the same weights. Smoothing weights harder
|
||||
made it worse (0.2% to 0.4%): it spreads a far-moving joint's pull into the trunk.
|
||||
- What ended the tearing at the hip and shoulder was to stop joining them: each leg its own closed piece of
|
||||
skin set into the trunk, the join hidden by the fur. A furred animal does not need one watertight skin.
|
||||
- Bone heat gives the belly to the elbows and knees (they sit just inside it, the spine far above). The trunk's
|
||||
skin has to be given to the spine outright: each point to the two spine joints it lies between.
|
||||
- Feet kept in the world, not in the gait's cycle, are what stop sliding: a planted foot is a point that does not
|
||||
move until its leg's turn comes. Measured slide is 0 mm in every move, turning and stopping included. A cycle
|
||||
played under a moving body (that earlier solver) slides whenever speed or heading changes.
|
||||
- One rigging (the hips' and shoulders' frames, four limb ends, the head's turn, the tail) is enough to pose every
|
||||
move, and blending riggings rather than poses lets one move ease into the next with the limbs still solved.
|
||||
- A small animal's legs are short for its stride: at standing height a foreleg reaches 8 to 11 cm ahead of its
|
||||
shoulder. Strides have to come from the leg's length (a walk's stance travels about one leg length), or the
|
||||
elbow locks every step.
|
||||
- Fur as shells (16 copies of the skin pushed out along its normals, each cut by one height map at its own height)
|
||||
draws on a skinned model in the raster renderer at no visible cost: 232k triangles, 11 ms a frame at 1280x720.
|
||||
- A limp body made of points must not gain speed from being pushed out of a solid: the point's last place moves
|
||||
with the push. Without that, a body that flops half over a box leaves at 16 m/s.
|
||||
|
||||
Rule: Built
|
||||
|
||||
@done
|
||||
Scenario: CR0. Where it lives
|
||||
# sdk/body/src/creature, engine-free TypeScript beside the person's body layer, exported as
|
||||
# `creature` from raea/body. The moves that need a world (CR7 on) are in the trashpanda project until they
|
||||
# have settled (its game/ folder).
|
||||
Then the plan:
|
||||
| crate | file | lines | job |
|
||||
| sdk | sdk/body/src/creature/q.ts | 40 | the body layer's maths under short names; a bend from places; a turn from axes |
|
||||
| sdk | sdk/body/src/creature/body.ts | 45 | a rig's measures: sockets, bone lengths, where each foot belongs, reach |
|
||||
| sdk | sdk/body/src/creature/loco.ts | 185 | the gait by speed and posture; feet planted in the world and stepped |
|
||||
| sdk | sdk/body/src/creature/pose.ts | 225 | the rigging, the solver, the blend between riggings, the tail on springs |
|
||||
| sdk | sdk/body/test/creature.test.ts | 60 | slide, gait, every joint posed, feet squared up on a stop |
|
||||
|
||||
@done
|
||||
Scenario: CR1. A creature's rig is read from its joints
|
||||
# A rig is joints by name with a parent and a place at rest, every joint resting unturned (the engine places
|
||||
# each by its own transform), and `marks` for the points that end a bone and carry no skin (nose, tail's tip,
|
||||
# toes). Names: root, spine1..3, chest, neck1, neck2, head, jaw, ear_l/r, lid_l/r, tail1..N; fore legs fl/fr
|
||||
# _scap, _upper, _lower, _wrist, _hand, digits _d1a/_d1b.._d5a/_d5b; hind legs hl/hr _upper, _lower, _hock, _paw.
|
||||
Given a rig.json with those joints
|
||||
When bodyOf reads it
|
||||
Then it has each leg's socket, bone lengths, reach and where its foot belongs under the body
|
||||
|
||||
@done
|
||||
Scenario: CR2. A planted foot does not move
|
||||
# Each foot is a point in the world. It stays until its leg's turn in the gait, then swings to where the body
|
||||
# will need it half a stance after it lands, aimed again every frame of the swing (a turn mid-step still
|
||||
# lands right). A foot left more than 15 cm (fore) or 19 cm (hind) from its place goes at once.
|
||||
Given a body walking, trotting, galloping, sneaking, crawling and walking on two legs, turning all the while
|
||||
Then no planted foot moves between two frames
|
||||
# measured 2026-11-14: 0.0 mm in all six (sdk/body/test/creature.test.ts; tools/locotest.ts in the project)
|
||||
|
||||
@done
|
||||
Scenario: CR3. The gait is the speed's
|
||||
# Stride, the share of a stride each foot stands, each leg's place in the stride and the lift are blended by
|
||||
# speed: a walk (lateral sequence, 0.66 standing) to 0.8 m/s, a trot (diagonal pairs, 0.5) to 2.1, a bounding
|
||||
# gallop (hind feet together, 0.36) above. Lowered, steps shorten and stand longer; on two legs the hind feet
|
||||
# alternate.
|
||||
Then stride grows and standing share falls from walk to trot to gallop
|
||||
|
||||
@done
|
||||
Scenario: CR4. One rigging poses every move
|
||||
# The solver takes the hips' and shoulders' frames, four limb ends (a place, a turn, how far the wrist or heel
|
||||
# is rolled over it, how far the fingers are closed, where the elbow or knee points), the head's turn and the
|
||||
# tail's joints, and gives every joint's place and turn: the back laid link by link between the two frames,
|
||||
# the shoulder blade sliding with its leg, elbow and knee bent in a plane, the neck sharing the head's turn.
|
||||
Given the body on the ground, lowered, and up on its hind legs
|
||||
Then every joint is a number in every frame, and at a walk and a trot every leg reaches its foot
|
||||
|
||||
@done
|
||||
Scenario: CR5. Standing still, it squares up
|
||||
Given a body that galloped and stopped
|
||||
Then within three seconds each foot is within 3 cm of where it belongs, brought there one at a time
|
||||
|
||||
@done
|
||||
Scenario: CR6. The tail is late
|
||||
# Its joints are points pulled toward where a stiff tail would be, stiffest at the root, kept their lengths and
|
||||
# off the ground; how it is carried (up at a gallop, low sneaking, down behind on two legs) is the posture's.
|
||||
Then the tail follows the hips' turns after them and never passes through the ground
|
||||
|
||||
Rule: Built in the project, to come into the SDK
|
||||
|
||||
Scenario: CR7. Moves off the ground share the rigging
|
||||
# In the project (game/player.ts): in the air (nose along its path, hands reaching for the ground coming down),
|
||||
# a vault (hands down on the thing's top, hind legs tucked through), a pull-up onto a ledge (hands on top, hind
|
||||
# feet scrabbling on the face), a kick off a wall, climbing a trunk (diagonal pairs, hands that stay where
|
||||
# they grip), hanging from a wire by the hands (a pendulum the player pumps, hand over hand along it), and
|
||||
# gone limp. Each builds a rigging; a move eases into the next over 6 to 34 frames by blending riggings.
|
||||
# A tour of all of them runs headless with every frame posed (tools/playtest.ts in the project).
|
||||
# To do here: the world they ask of (ground height, what is ahead, a ledge, a trunk, a wire) as an interface.
|
||||
Given a level that answers those questions
|
||||
Then a creature jumps, vaults, pulls up, kicks off, climbs, hangs and lands on it
|
||||
|
||||
Scenario: CR8. Gone limp, and up again
|
||||
# In the project: nine points on springs (hips and shoulders left and right, the head, four feet), each foot
|
||||
# kept within its leg's reach of its socket; pushed out of solids without gaining speed; when it lies still
|
||||
# the body gets up by blending from the limp rigging to the standing one.
|
||||
Then a fall from 2 m tumbles, comes to rest in under 2 s and stands up where it lies
|
||||
|
||||
Scenario: CR9. It takes things
|
||||
# In the project: on four legs a thing is taken in the mouth; up on its hind legs both hands close on it and
|
||||
# turn it over; thrown from either. To do: docs/hands.feature's holds and finger curl on a creature's hand
|
||||
# (five digits of two joints), so the fingers lie on the thing rather than at a fixed curl.
|
||||
Then a thing held is in the mouth or between the hands in every frame, and the fingers touch it
|
||||
|
||||
Rule: To do
|
||||
|
||||
Scenario: CR10. The skin holds in every move
|
||||
# Measured by tools/rigcheck.ts in the project: edges past 0.4x or 1.6x their length by more than 8 mm, as a
|
||||
# share of all edges. With one skin over the whole body (11-15 early) 9 of 13 moves passed, and the gallop
|
||||
# (0.76%), the crawl (0.48%) and two legs (0.9%) tore at the hip and shoulder, whatever the weights.
|
||||
# 11-15: each leg is now its own closed piece of skin, set into the trunk under the fur, and follows only its
|
||||
# own bones; the trunk follows none of a leg's. No skin bridges a leg and the trunk, so none tears there: 10 of
|
||||
# 13 pass (crawl 0.007%), and the fur hides the join. Left: gallop 0.11% (the back's flexing), two legs 0.22%
|
||||
# and 0.20% (the neck's fold and the tail's root).
|
||||
Then no move tears more than 0.1% of the skin's edges
|
||||
|
||||
Scenario: CR11. A gallop with a back
|
||||
# 11-15: every leg now reaches its foot at a gallop (a stance of 0.29 of the stride, the body 14 to 16% lower
|
||||
# at speed; it was 87 of 1,200 leg-frames short). Still rough: the back's arch following the legs, the hind
|
||||
# legs' reach past the fore, and a real moment with all four feet off the ground.
|
||||
Then at a gallop every leg reaches its foot and the back's arch follows the legs
|
||||
|
||||
Scenario: CR12. Other animals on the same solver
|
||||
# 11-15: done on a dragon (four legs, two wings, four neck joints, eight tail joints, horns, scales): the same
|
||||
# solver, sized by the legs' reach beside a raccoon's (k: every stride, speed and length in the solver is a
|
||||
# raccoon's times k; 1.74 for the dragon). Feet slide 0 mm in every move; the skin holds in 13 of 13. What it
|
||||
# needed that a raccoon did not: any number of neck joints sharing the head's turn, optional ears, lids, digits
|
||||
# and belly, wings (CR17), a body on nearly straight legs carried a little lower so it has slack to step with,
|
||||
# and how it carries itself as four numbers in its rig (head low, heel down, tail's hang, wings' fold).
|
||||
# 11-15 later: a dog and a cat made by another project (the monk game's animals, on the same names) walk, trot
|
||||
# and gallop on it too (sdk/body test/creature.test.ts, private repo 3de8813). They needed two things the
|
||||
# raccoon and the dragon hid: a fore leg may end in a paw instead of a hand (the body names each leg's planted
|
||||
# joint), and a body whose legs have less room behind their feet than a raccoon's (straighter legs: measured
|
||||
# from the rest pose at the height it is carried) steps at a smaller size, so shorter, quicker steps at the
|
||||
# same speed. Before that, setting off left a hind foot planted up to 31 mm out of its leg's reach while the
|
||||
# other three swung. The raccoon's steps are unchanged; the dragon's are 9% shorter.
|
||||
Given a dragon's rig
|
||||
Then it passes CR2 to CR5 and CR10 on the raccoon's solver with no line of the solver naming it
|
||||
|
||||
Scenario: CR15. A creature is a spec, and one flow makes it
|
||||
# In the project (blender/creatures.py, tools/creature.sh). A creature is data: its joints by measure on the
|
||||
# names' convention (root, spine1..N, chest, neck1..N, head, jaw, ear_/lid_, tail1..N, fl/fr/hl/hr legs, wl/wr
|
||||
# wings, belly), the marks that end a bone, how thick its flesh is round each joint, its webs and horns, what
|
||||
# its skin is, the words it is drawn from, and its carriage. The flow:
|
||||
# mannequin the skeleton clothed in grey flesh (tubes by the radii, sheets for webs, cones for horns)
|
||||
# art the image model draws the animal on the mannequin, same pose and view (flux_2_pro, 3 cents)
|
||||
# idol the drawing made 3D on this Mac (Idol, about 3.5 minutes), carved to one closed mesh
|
||||
# build the mesh laid on the skeleton by its feet and nose (its long axis found), thinned, painted from
|
||||
# its own colour; the joints refitted to it (back, a standing neck by the middle of its flesh, legs,
|
||||
# the tail along its own line, ear and horn tips, wing tips and wrists); weights by bone heat on a
|
||||
# stand-in, the trunk given to the back by place; each leg and wing cut into its own closed piece
|
||||
# check the reel posed by the solver and the skin measured (CR10)
|
||||
Given a spec for a raccoon, the same skeleton as a vinyl toy, and a dragon
|
||||
Then each command makes each of the three, and all three pass CR10 with no change between them
|
||||
|
||||
Scenario: CR16. The coat is the spec's
|
||||
# fur: the generated surface is the coat's outside; the skin is set in by the fur's length for each part and 16
|
||||
# shells grow back out to it (CR0's finding). scales, plain: the surface as it is, no shells, the picture opaque.
|
||||
# A second style is a second spec with other words and another skin: the toy raccoon passed on its first run.
|
||||
# Not done: a fur length read from the drawing (clipping the coat in the drawing keeps the outline, so the gap
|
||||
# measures nothing), lids that close over painted eyes, a mouth with an inside.
|
||||
Then a creature's skin is fur shells or the bare surface by its spec, and a restyle changes no code
|
||||
|
||||
Scenario: CR17. Wings
|
||||
# A wing is a limb (wl/wr: shoulder, elbow, wrist, the tip a mark) and its own piece of skin. Its membrane is
|
||||
# too thin for the 3D model to keep (Idol gave the arm and fingers and dropped the sheet), so the build makes it:
|
||||
# a sheet between the refitted joints, each point following the joints at its corners. The solver raises a wing
|
||||
# about the body's line and folds it in its own plane joint by joint (which way round each joint folds is read
|
||||
# from the rest pose). Rough: the membrane is one flat colour and does not follow the finger bones; no flight.
|
||||
Then a winged creature folds its wings as it walks, opens and beats them as it runs, and no web point is unbound
|
||||
|
||||
Scenario: CR18. Mouths and eyelids
|
||||
# 11-15, in the project's build, the same on all three creatures. The mouth: the drawn mouth is paint on a closed
|
||||
# head, so a turning jaw only stretched the lips. The head is cut along the lips' line (a plane through the
|
||||
# muzzle's front a third of the way up it, rising a little toward the corners), what is under the cut follows the
|
||||
# jaw, what is over it the head, and a dark inside (a roof on the head, a floor on the jaw, meeting at the hinge)
|
||||
# fills what opens. The skin still holds in 13 of 13 moves. No teeth or tongue.
|
||||
# The lids: each is a small cap of its own, resting under the brow, that turns about an axis lying along the head
|
||||
# (the rig's lid_axis; a turn about the head's side-to-side axis does nothing for an eye that faces sideways) and
|
||||
# takes the colour of the skin round the eye. Where the eye is comes from its pixel in the drawing (eye_px in the
|
||||
# spec). The model was made from the drawing, so seen from the drawing's side it is the drawing: that side is
|
||||
# searched for (view, size and shift, scored by how much of the model lies inside the drawing's outline, since a
|
||||
# drawn wing's membrane is not on the model), the pixel is cast along it onto the raw model, and the point it
|
||||
# meets is the same point on the model once laid on the skeleton. A strongly coloured eye is then moved onto
|
||||
# the few points nearby whose colour leans toward the pixel's. Casting from the mannequin's camera instead was
|
||||
# centimetres off (the model is not laid exactly where the mannequin stood).
|
||||
# Rough: the lid shuts over the eye on the toy raccoon and about on it on the raccoon; on the dragon it lands
|
||||
# about an eye and a half away (outlines agree 0.77 against 0.84 and 0.92, and its eye is a handful of points).
|
||||
Then a creature's jaw opens a mouth with an inside, and its lids shut over its eyes
|
||||
|
||||
Scenario: CR13. In the engine
|
||||
# As docs/hands.feature moved the hands to Rust (raea-sys-body), a creature's solver belongs beside it once
|
||||
# the TypeScript has settled, with <Creature> in raea/character drawing a rig from a rigging.
|
||||
Then <Creature rig pose /> draws a four-legged body, and character.creature answers a rigging's pose
|
||||
@@ -201,3 +201,11 @@ Feature: raea's plugin ecosystem: extending the engine and the app, made, shared
|
||||
And may an extension restyle the app itself (a theme), or only draw inside its own frames?
|
||||
And packages install per person, in every project (Shane 11-09: answered)
|
||||
And will packages ever be sold through raea, or stay free with raea taking no part?
|
||||
|
||||
Scenario: EC13. A package that imports raea shares the composition's SDK (#151)
|
||||
Given a package in the project's node_modules (or the person's plugins) that imports "raea", "raea/<module>" or
|
||||
"@raea/<package>", its entry .tsx or plain ESM .js
|
||||
Then the import is the SDK copy the composition's own files import (engine/bundle edit.rs sdk_copy): one SDK, so
|
||||
its hooks read the Clock the engine drives, exactly as the same file imported by a relative path does
|
||||
And never an outside global the bundle leaves unresolved ("Can't find variable: raea" before the first frame)
|
||||
And engine/bundle/tests/bundle.rs a_package_importing_the_sdk_gets_the_work_folders_copy holds it
|
||||
@@ -0,0 +1,157 @@
|
||||
@spec
|
||||
Feature: Feed tasks: the graph view's layering, the to-do list, and sessions started outside the app
|
||||
Shane, 2026-11-13: "note to ship with this next batch for release is that in the react graph view when i zoom in it
|
||||
ends up obstructing other buttons and gui outside of the stage and across the app, so we need to make sure layering
|
||||
works there and remove the agents button in the top right of feed and inbox for a checkbox and this is a editable
|
||||
todolist built to look minimal, skimmable and easy to read with the ability to click into a task to see more
|
||||
details. the other note to add is in the timeline if an agent is currently running even if i have initiated the
|
||||
session myself in terminal or an app and it is still claimed or working on it without being terminated, meaning its
|
||||
still open or the session is active, we should see it in the feed and see updates from it. this should help tie
|
||||
into the todolist stuff too."
|
||||
|
||||
Three parts. Each is done when it works in raea's window (not only in Chrome) and has its tests.
|
||||
|
||||
Background:
|
||||
Given the app's code is apps/app (raea-feed); its branch for parts 2 and 3 is feed-tasks, part 1 is on its main
|
||||
And a window check is a headless raea window of the session's own: `node blitz/pw-run.mjs SPEC` on the BLITZ_E2E
|
||||
bundle, RAEA_PAGE_HOST_BIN a copy of the page host, a fresh raea.root each run
|
||||
|
||||
Rule: FT1. The graph view stays in its own box
|
||||
# Status 11-13: built, in 0.1.3. Engine 37846080a (vendor/blitz-dom/src/node/node.rs, sdk/ui/src/dom/input.ts, a unit test
|
||||
# in sdk/ui/test/dom.test.tsx); app raea-feed #11 (AskCanvas clipped at its box, e2e/canvas-layer.spec.ts).
|
||||
# Cause: Chrome never showed it. In raea's window the canvas was DRAWN clipped, but neither hit test honoured an
|
||||
# overflow clip: blitz-dom's hit_inner tested a clipping box's children wherever they overflowed to, and sdk/ui's
|
||||
# hit dropped the inherited clip at a child with its own z-index and replaced it at a child that clips (a card is
|
||||
# overflow-hidden). Both halves are needed: with only sdk/ui fixed, elementFromPoint is right and a real press
|
||||
# still lands on the canvas (the host's target wins). Checked: the spec in Chrome and in the window; the app's
|
||||
# whole window smoke 28 passed, 49 failed, 4 skipped of 81 before and after, the same tests; sdk/ui 60 tests.
|
||||
# Not read by the hit tests: a transform on a box between a z-indexed child and its stacking-context root (the
|
||||
# painter's clips don't read it either); in sdk/ui, an absolute box whose containing block is above the clipper.
|
||||
|
||||
@done
|
||||
Scenario: FT1a. A press outside the canvas never reaches it, at any zoom
|
||||
Given an ask with four pictures open on its canvas (React Flow), zoomed all the way in (scale 2)
|
||||
Then no point outside the canvas's box finds a piece of the canvas (document.elementFromPoint)
|
||||
And a press on the sidebar, the workspace picker or the header goes to what is drawn there
|
||||
And the canvas clips what it draws at its own box
|
||||
|
||||
@done
|
||||
Scenario: FT1b. A box that clips takes no pointer for what it cuts away, anywhere in the window
|
||||
Given a box with overflow other than visible, and a child that overflows it, with or without its own z-index
|
||||
Then a point outside the box's padding box never hits the child or anything in it
|
||||
But a fixed box, and a box whose containing blocks are above the clipping box, are not cut by it
|
||||
|
||||
Rule: FT2. The agents button is a checkbox that opens the to-do list
|
||||
# Status 11-13: built, in 0.1.3: raea-feed #12, merged ab68f0d (3b2353b, a2dc439). src/feed/todo.ts (the rows),
|
||||
# src/feed/TodoPanel.tsx, brief/format.ts removeTask and moveTask. The Agents panel and its menu surface are gone.
|
||||
# Checked: e2e/todo.spec.ts 4 of 4 in Chrome and 4 of 4 in the window; vitest (todo.test.ts, format.test.ts).
|
||||
# Decisions made here, each open to Shane's word:
|
||||
# - It is the tasks the app already has, not a second list: the project's brief's tasks (## Tasks in brief.md:
|
||||
# what the composer, the Board and agents write) and the edits sent on its items (comment tasks). Nothing is
|
||||
# kept by the list.
|
||||
# - Words are changed in a task's details (one click away, in the same column), not in the list's line: a click
|
||||
# on a line opens it, so the line itself stays a single target.
|
||||
# - A task's comments: an edit's replies; a brief task's are its linked item's open comments. A brief's task has
|
||||
# nowhere of its own to keep a comment yet.
|
||||
# - In the Inbox a new task goes to the project picked beside the line (the first, until picked).
|
||||
# - Reorder is within a project's brief tasks; an edit keeps its place by when it was sent.
|
||||
# Left: no keyboard shortcut opens the list; the Board's card sheet still edits a task's agents, due date and tags.
|
||||
|
||||
@done
|
||||
Scenario: FT2a. Where the agents button was, in a feed and in the Inbox
|
||||
Then a feed's header has no agents button; a checkbox there opens the to-do list in a column on the right
|
||||
And in a project's feed it is the project's list; in the Inbox the workspace's, each project's tasks under its name
|
||||
And its tooltip says what it is; the column closes from its own button and is as it was left next time
|
||||
|
||||
@done
|
||||
Scenario: FT2b. Minimal, skimmable
|
||||
Then a task is one line: a checkbox, its words, and who has it when someone does
|
||||
And its handle and Remove show only on the line pointed at or focused
|
||||
And done tasks are folded away under a count ("2 done"), opened by a click
|
||||
|
||||
@done
|
||||
Scenario: FT2c. Edited where it is read, written at once, with Undo
|
||||
When I type a line and press Enter, check a task off, change its words, drag it by its handle (or Alt+Up/Down),
|
||||
or remove it
|
||||
Then the change is written at once to where the task lives (the brief; a linked item's status; the comment)
|
||||
And Undo at the column's foot, or Cmd+Z, takes the last change back
|
||||
But a brief's change is undone only while the brief is still as that change left it
|
||||
|
||||
@done
|
||||
Scenario: FT2d. A click opens a task's details; Esc goes back
|
||||
Then the details show its words, who is on it and what they last did, the feed item it is linked to, its comments
|
||||
And an agent at work on it in one of the app's own sessions can be stopped there, with its subagents listed
|
||||
And Esc goes back to the list, not out of the feed
|
||||
|
||||
Rule: FT3. A session started outside the app is in the feed while it is open
|
||||
# Status 11-13: built, in 0.1.3: raea-feed #12, merged ab68f0d (7e90a7c, a2dc439). host/outside.ts (POST
|
||||
# /host/outside), src/feed/outside.ts, OutsideKeeper.tsx, OutsideBubble.tsx. No feed tool was added or changed.
|
||||
# Checked: e2e/outside.spec.ts 2 of 2 in Chrome and in the window (the host's list given by the spec);
|
||||
# host/outside.test.ts on files written as Claude Code writes them; the reader run against this Mac's six real
|
||||
# sessions. Not checked: a real session ending while the app's own window is watched by a person.
|
||||
# The signal, the smallest honest one: what the harness already keeps. Nothing new is asked of any session.
|
||||
# - Claude Code keeps ~/.claude/sessions/<pid>.json for each open session ({pid, sessionId, cwd, name, status})
|
||||
# and its transcript, <sessionId>.jsonl in its projects folder.
|
||||
# - active: its file is there, its process is alive, and a person runs it (kind "interactive"). Holding a claim
|
||||
# alone is not active: a task a session has that has ended still names it, without a live mark.
|
||||
# - working: the file says "busy"; otherwise it is open and waiting at its prompt.
|
||||
# - an update: its last words, the tool call at hand, its plan (the last TodoWrite), read from the transcript's
|
||||
# end; an item it posts and a task it marks are already in the feed and on the task.
|
||||
# - ended: the host no longer lists it.
|
||||
# Left: Codex, Gemini, Kimi and the rest keep no file that says a session is open, so they are in the feed only
|
||||
# by what they post; a session working in a folder that is no project's and that has posted nothing is in no
|
||||
# feed (Shane's own lanes in ~/raea are this case until they `raea show` something); rask claims and the lanes
|
||||
# board are not read.
|
||||
|
||||
@done
|
||||
Scenario: FT3a. One bubble a session, in the projects it is in
|
||||
Given a Claude Code session open on this Mac
|
||||
Then it has one bubble in the feed of each project whose folder it works in or that it has posted to
|
||||
(its posts carry its inbox, claude-code-<the first 8 of its id>, as `raea show` names it), and in the Inbox
|
||||
And a session that is in no project's folder and has posted nothing is in no feed
|
||||
|
||||
@done
|
||||
Scenario: FT3b. It reads as the app's own sessions do, without a Stop
|
||||
Then the bubble says its name and harness, that it is working (and for how long) or waiting at its prompt,
|
||||
the step at hand, its last words, and its plan
|
||||
And there is no Stop: a mark beside its status says where it runs and that it is stopped there
|
||||
|
||||
@done
|
||||
Scenario: FT3c. Its updates come as it goes, and it ends when the session does
|
||||
When it says something new or starts another step
|
||||
Then the same bubble shows it within a few seconds, written only when what it shows has changed
|
||||
When the session is no longer open
|
||||
Then the bubble ends, its last words kept; a session that comes back opens it again
|
||||
|
||||
@done
|
||||
Scenario: FT3d. It ties to the to-do list
|
||||
Then a brief's task that @names the session, and an edit on an item it posted, are its tasks
|
||||
And the bubble names them, and the to-do list shows the session on them with what it last did
|
||||
|
||||
# Status 11-13 (FT3e, FT3f): built for 0.1.4 in raea-feed #25, stacked on #24; neither merged, both wait for Shane.
|
||||
# Shane 11-13, on the cards: "even if i started the chat or session out of raea app i can open up the chat in a
|
||||
# raea chat ui ... show what agent is working on what or any subagents and feel more like i can click to see more
|
||||
# and less rows of info". Checked: e2e/outside.spec.ts 3 of 3 in Chrome, with the host's answers given by the
|
||||
# spec; host/outside-chat.test.ts and host/outside.test.ts on files written as Claude Code writes them;
|
||||
# bridge-resume.test.ts on a test agent that offers fork. Not checked: a fork through the real claude-agent-acp.
|
||||
# Left: other harnesses' transcripts (only Claude Code's is read), and an image a prompt carried.
|
||||
Scenario: FT3e. Open chat opens it as a chat in raea
|
||||
When I press Open chat on its bubble
|
||||
Then its conversation so far opens as one of the workspace's chats: my prompts, its replies and thinking, its
|
||||
tool calls with their results and diffs, and its plan, read from its transcript (the newest 6 MB, saying so
|
||||
when older messages were left out)
|
||||
And a line at the top says where it was started and what writing there does
|
||||
And while it is still open where it runs, what it says next shows in the chat as it says it
|
||||
And opening it starts no agent
|
||||
When I write in that chat
|
||||
Then the agent carries it on in the folder it ran in: a copy of it (forked) while it is still open there, so the
|
||||
one there goes on by itself, or the session itself (resumed) when it has ended
|
||||
And from then on it is raea's chat, and following stops
|
||||
|
||||
Scenario: FT3f. Its bubble says who is on what, folded until I open it
|
||||
Then folded, the bubble says what the session is on (its own title, or the name it was given), what it is
|
||||
doing now, and the subagents it has running
|
||||
When I click the bubble or More, which names what more there is
|
||||
Then it opens to its last message, its plan, its subagents (the running ones with the call each is on, then
|
||||
the latest done, with how many more are done) and the notes of mine it has
|
||||
And Less, or another click, folds it again
|
||||
Loaded 100 of 719 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user