@holoscript/holo-runtime 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-2026 HoloScript Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,83 @@
1
+ # @holoscript/holo-runtime
2
+
3
+ Pure TypeScript CPU decoder seed for HoloRunner S0 checkpoints.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @holoscript/holo-runtime
9
+ ```
10
+
11
+ M1 scope:
12
+
13
+ - Loads the S0 PyTorch `state_dict` key shape used by `train_holorunner_s0.py`.
14
+ - Runs a decoder-only transformer on CPU with matmul, layernorm, exact-erf GELU, softmax, causal self-attention, KV cache, and sampler primitives.
15
+ - Imports the academy `holorunner-tokenizer-v0.mjs` module directly at runtime instead of copying tokenizer logic.
16
+ - Exposes `HOLO_RUNTIME_MODEL_FLEET_NODE_KIND` so the runtime is registered as a `@model_fleet` node kind, not a parallel system.
17
+
18
+ The loader accepts JSON-safe tensor records:
19
+
20
+ ```ts
21
+ import { readFile } from 'node:fs/promises';
22
+ import {
23
+ HoloRuntimeDecoder,
24
+ loadHoloRunnerS0StateDict,
25
+ type HoloRunnerS0StateDictInput,
26
+ } from '@holoscript/holo-runtime';
27
+
28
+ const checkpoint = JSON.parse(
29
+ await readFile('checkpoints/holorunner-s0.json', 'utf8'),
30
+ ) as HoloRunnerS0StateDictInput;
31
+ const loaded = loadHoloRunnerS0StateDict(checkpoint);
32
+
33
+ const decoder = new HoloRuntimeDecoder(loaded);
34
+ const logits = decoder.forward([1, 42, 7]).logits;
35
+ ```
36
+
37
+ Set `HOLOAI_ECOSYSTEM_ROOT` to point at the private academy repo if it is not at `~/.ai-ecosystem`.
38
+
39
+ ## Release Lane Decision
40
+
41
+ As of 2026-07-07, `@holoscript/holo-runtime` is parked outside the npm v1 release
42
+ manifest, package-consumption matrix, and fleet utility map. The decoder builds
43
+ and tests, but the default tokenizer bridge still resolves
44
+ `HOLOAI_ECOSYSTEM_ROOT` or `~/.ai-ecosystem`, so a clean npm consumer does not
45
+ yet have the tokenizer module by default.
46
+
47
+ Promote it only after the tokenizer bridge is public or fully parameterized,
48
+ `npm pack` plus cold-import checks pass, and a real laptop, Jetson, or Vast
49
+ model-fleet consumer needs the package as an operational utility.
50
+
51
+ ## Boundary
52
+
53
+ `@holoscript/holo-runtime` is not the browser scene runtime and not the bytecode
54
+ VM. Use `@holoscript/runtime` for compiled HoloScript scene execution and
55
+ `@holoscript/holo-vm` for HoloScript bytecode workloads. This package is the
56
+ experimental HoloRunner S0 model-checkpoint decoder.
57
+
58
+ Keep model weights, private training artifacts, and tokenizer source outside
59
+ the public package.
60
+
61
+ ## Validation
62
+
63
+ ```bash
64
+ corepack pnpm --filter @holoscript/holo-runtime run build
65
+ corepack pnpm --filter @holoscript/holo-runtime run test
66
+ ```
67
+
68
+ ## Package boundary & release posture
69
+
70
+ This is a **v0-preview** package for external and agent framework consumers who
71
+ want a pure-CPU decoder for HoloRunner S0 checkpoints. It **does not ship** any
72
+ model weights, training data, or founder-local tooling — you bring your own
73
+ checkpoint JSON, and if you need the tokenizer bridge, you supply your own
74
+ `HOLOAI_ECOSYSTEM_ROOT` path; nothing here assumes that repo is present by
75
+ default. The package boundary stops at the decoder and loader — training,
76
+ quantization, and the browser/bytecode runtimes stay in their own packages
77
+ (`@holoscript/runtime`, `@holoscript/holo-vm`).
78
+
79
+ **Known limitations:** the default tokenizer bridge still resolves
80
+ `HOLOAI_ECOSYSTEM_ROOT` or `~/.ai-ecosystem`, so a cold npm consumer does not
81
+ have the tokenizer module until they supply their own academy checkout; this
82
+ package is parked outside the v1 release manifest until that bridge is public
83
+ or fully parameterized. Interfaces may change before promotion.