@nexart/codemode-sdk 1.7.0 → 1.8.1
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/CHANGELOG.md +99 -0
- package/COMMERCIAL.md +41 -0
- package/README.md +223 -608
- package/dist/core-index.d.ts +1 -1
- package/dist/core-index.js +1 -1
- package/dist/entry/browser.d.ts +8 -2
- package/dist/entry/browser.d.ts.map +1 -1
- package/dist/entry/browser.js +10 -2
- package/dist/entry/node.d.ts +3 -1
- package/dist/entry/node.d.ts.map +1 -1
- package/dist/entry/node.js +3 -1
- package/dist/runtime.d.ts +52 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +219 -0
- package/examples/basic.ts +61 -0
- package/examples/preflight-test.ts +275 -0
- package/examples/verify.ts +151 -0
- package/package.json +20 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,105 @@ All notable changes to @nexart/codemode-sdk will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## [1.8.1] — 2026-01-24
|
|
8
|
+
|
|
9
|
+
### Changed — Documentation & Licensing Clarity
|
|
10
|
+
|
|
11
|
+
**Non-Breaking, Metadata-Only Release**
|
|
12
|
+
|
|
13
|
+
This release addresses external review feedback about documentation framing and licensing clarity. No runtime, API, or behavior changes.
|
|
14
|
+
|
|
15
|
+
#### Documentation Reframed
|
|
16
|
+
- **Removed app-specific framing** — SDK no longer positioned as "for Frontierra" or "for ByX"
|
|
17
|
+
- **Genre-based language** — Now describes use cases (generative art, games, simulations, research)
|
|
18
|
+
- **"Who this is for / Who this is not for"** section added for clarity
|
|
19
|
+
- **"Where this fits"** section explains architectural boundary
|
|
20
|
+
- **"Why not roll your own?"** section honestly addresses when to skip this SDK
|
|
21
|
+
- **"Used by"** section lists NexArt, ByX, Frontierra as examples (not defining use cases)
|
|
22
|
+
- **Removed "This SDK IS the protocol" language** — Now describes as "reference implementation"
|
|
23
|
+
|
|
24
|
+
#### Licensing Clarified
|
|
25
|
+
- **COMMERCIAL.md added** — Plain language licensing terms
|
|
26
|
+
- **Free for**: personal, experiments, research, open-source
|
|
27
|
+
- **Commercial production**: requires license
|
|
28
|
+
- **Contact**: licensing@nexart.xyz
|
|
29
|
+
- **No phase language, no future enforcement language**
|
|
30
|
+
|
|
31
|
+
#### Package Updates
|
|
32
|
+
- **Version**: 1.8.1
|
|
33
|
+
- **files**: Added COMMERCIAL.md
|
|
34
|
+
- **homepage**: Added to package.json
|
|
35
|
+
|
|
36
|
+
### Unchanged
|
|
37
|
+
|
|
38
|
+
- No changes to runtime behavior
|
|
39
|
+
- No changes to APIs or exports
|
|
40
|
+
- No changes to protocol version (remains v1.2.0)
|
|
41
|
+
- No changes to determinism guarantees
|
|
42
|
+
- Full backward compatibility with v1.8.0
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## [1.8.0] — 2026-01-24
|
|
47
|
+
|
|
48
|
+
### Added — Agent-First Runtime Authority Layer
|
|
49
|
+
|
|
50
|
+
**Additive, Non-Breaking Release**
|
|
51
|
+
|
|
52
|
+
This release introduces `createRuntime()` — an agent-first API designed for AI coding assistants (Replit, Lovable, Claude Code) to reliably execute deterministic code without rolling their own PRNG/noise implementations.
|
|
53
|
+
|
|
54
|
+
#### New Runtime API (`createRuntime`)
|
|
55
|
+
- **`createRuntime(options)`** — Create a deterministic runtime instance
|
|
56
|
+
- `seed: string | number` — Seed for deterministic randomness
|
|
57
|
+
- `vars?: number[]` — VAR array (0-100 inputs), defaults to zeros
|
|
58
|
+
- `strict?: boolean` — Enable strict mode (default: false)
|
|
59
|
+
- `mode?: 'static' | 'loop'` — Execution mode (default: 'static')
|
|
60
|
+
- `metadata?: Record<string, any>` — Optional user metadata for digest
|
|
61
|
+
|
|
62
|
+
#### Runtime Methods
|
|
63
|
+
- **`random(): number`** — Deterministic random [0, 1) using Mulberry32
|
|
64
|
+
- **`randomInt(min, max): number`** — Deterministic integer in range
|
|
65
|
+
- **`randomRange(min, max): number`** — Deterministic float in range
|
|
66
|
+
- **`noise(x, y?, z?): number`** — Deterministic Perlin noise
|
|
67
|
+
- **`run(fn): T`** — Execute code with optional strict enforcement
|
|
68
|
+
- **`digest(): string`** — Stable hash for verification (FNV-1a)
|
|
69
|
+
- **`getState(): RuntimeState`** — Canonical state snapshot for replay
|
|
70
|
+
|
|
71
|
+
#### Strict Mode Enforcement
|
|
72
|
+
When `strict: true`, the runtime intercepts non-deterministic APIs during `run()`:
|
|
73
|
+
- `Math.random` → Throws with actionable error message
|
|
74
|
+
- `Date.now` → Throws with actionable error message
|
|
75
|
+
- `performance.now` → Throws with actionable error message
|
|
76
|
+
|
|
77
|
+
Error format: `NEXART_STRICT: Non-deterministic API used: {api}. {guidance}`
|
|
78
|
+
|
|
79
|
+
#### Documentation Updates
|
|
80
|
+
- Added "For AI Coding Agents" section at top of README
|
|
81
|
+
- Added "Determinism Contract" with ✅/❌ checklist
|
|
82
|
+
- Added "Why Not Just Use a PRNG?" comparison table
|
|
83
|
+
- Added "Environment Imports" matrix
|
|
84
|
+
- Simplified license section for clarity
|
|
85
|
+
|
|
86
|
+
#### Examples
|
|
87
|
+
- `examples/basic.ts` — Basic usage demonstration
|
|
88
|
+
- `examples/verify.ts` — Determinism verification tests
|
|
89
|
+
- `npm run example:basic` — Run basic example
|
|
90
|
+
- `npm run example:verify` — Run verification tests
|
|
91
|
+
|
|
92
|
+
#### Package Updates
|
|
93
|
+
- Added keywords: deterministic, reproducible, verifiable, replay, canonical, simulation, procedural, seed, prng, ai-agent, strict-mode
|
|
94
|
+
- Updated description for agent discoverability
|
|
95
|
+
|
|
96
|
+
### Unchanged
|
|
97
|
+
|
|
98
|
+
- No changes to protocol behavior or determinism
|
|
99
|
+
- No changes to protocol version (remains v1.2.0)
|
|
100
|
+
- No changes to existing APIs (executeCodeMode, createEngine, etc.)
|
|
101
|
+
- Default import remains browser-safe
|
|
102
|
+
- Full backward compatibility with v1.7.x
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
7
106
|
## [1.7.0] — 2026-01-21
|
|
8
107
|
|
|
9
108
|
### Added — Browser-Safe Entrypoint + Conditional Exports
|
package/COMMERCIAL.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Commercial Licensing
|
|
2
|
+
|
|
3
|
+
## @nexart/codemode-sdk
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Free Use
|
|
8
|
+
|
|
9
|
+
You may use this SDK at no cost for:
|
|
10
|
+
|
|
11
|
+
- **Personal projects** — Learning, hobby work, portfolio pieces
|
|
12
|
+
- **Experiments and prototypes** — Proof of concepts, demos, hackathons
|
|
13
|
+
- **Research and education** — Academic work, teaching, scientific research
|
|
14
|
+
- **Open-source projects** — Projects with source code publicly available under an OSI-approved license
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Commercial Use
|
|
19
|
+
|
|
20
|
+
Commercial production deployments require a license.
|
|
21
|
+
|
|
22
|
+
**Commercial use includes:**
|
|
23
|
+
- Products or services that generate revenue
|
|
24
|
+
- Internal tools used in commercial operations
|
|
25
|
+
- SaaS applications
|
|
26
|
+
- Games or simulations sold or monetized
|
|
27
|
+
- Enterprise deployments
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Get a License
|
|
32
|
+
|
|
33
|
+
Contact: **licensing@artnames.io**
|
|
34
|
+
|
|
35
|
+
We offer flexible licensing options for teams and enterprises.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Questions?
|
|
40
|
+
|
|
41
|
+
If you're unsure whether your use case requires a license, reach out to licensing@artnames.io. We're happy to help.
|