@orkestrel/scaffold 0.0.143 → 0.0.145

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/agents/skills/orkestrel-publish/scripts/swap.js +111 -5
  2. package/dist/agents/templates/brief.md +1 -0
  3. package/dist/bin/main.js +87 -30
  4. package/dist/bin/main.js.map +1 -1
  5. package/dist/host/agents/platforms/windows.md +1 -0
  6. package/dist/host/agents/skills/orkestrel-publish/references/release.md +1 -0
  7. package/dist/host/agents/skills/orkestrel-publish/scripts/swap.ts +133 -6
  8. package/dist/host/agents/templates/brief.md +1 -0
  9. package/dist/host/claude/agents/orkestrel.md +52 -52
  10. package/dist/host/claude/rules/documentation.md +1 -0
  11. package/dist/host/claude/rules/quality.md +1 -0
  12. package/dist/host/claude/rules/tests.md +1 -0
  13. package/dist/host/claude/rules/workspace.md +14 -13
  14. package/dist/host/dotfiles/oxlintrc.json +1 -1
  15. package/dist/host/guides/browser.md +1 -1
  16. package/dist/host/guides/codec.md +29 -12
  17. package/dist/host/guides/contract.md +58 -57
  18. package/dist/host/guides/scaffold.md +63 -43
  19. package/dist/host/guides/server.md +1 -1
  20. package/dist/host/manifest.json +18 -18
  21. package/dist/host/scripts/browsers.sh +0 -0
  22. package/dist/host/scripts/codex.sh +0 -0
  23. package/dist/host/scripts/cursor.sh +0 -0
  24. package/dist/host/scripts/deps.sh +0 -0
  25. package/dist/host/scripts/npm.sh +0 -0
  26. package/dist/host/scripts/ollama.sh +0 -0
  27. package/dist/host/tests/config.test.ts +5 -0
  28. package/dist/host/tests/setupPolicy.ts +1 -0
  29. package/dist/src/core/index.cjs +64 -24
  30. package/dist/src/core/index.cjs.map +1 -1
  31. package/dist/src/core/index.d.cts +17 -2
  32. package/dist/src/core/index.d.ts +17 -2
  33. package/dist/src/core/index.js +64 -25
  34. package/dist/src/core/index.js.map +1 -1
  35. package/package.json +13 -13
@@ -8,11 +8,12 @@
8
8
  A coding is a spec-named, stateless mapping with one canonical spelling per input, written as an
9
9
  `encode*` that produces only the canonical form, a `decode*` that accepts exactly that form and
10
10
  answers `undefined` for everything else, and an `is*` guard that names the exact set the partial
11
- direction accepts. Every function is pure ES: no `atob` / `btoa`, no `Buffer`, no `TextEncoder` /
12
- `TextDecoder`, no `node:*`. Runtime type tests come from `@orkestrel/contract`. Totality is
13
- implemented rather than caught: codec ships no error type, no options bag, no class, and no type of
14
- its own. It is not a formats package — it does not compress, frame a stream, escape a document, map
15
- values into a store, or read JSON. Source: [`src/core`](../src/core), published through
11
+ direction accepts. Every function but `decodeUTF8` is pure ES: no `atob` / `btoa`, no `Buffer`, no
12
+ `TextEncoder` / `TextDecoder`, no `node:*`. `decodeUTF8` hands its bytes to the host's fatal
13
+ `TextDecoder`. Runtime type tests come from `@orkestrel/contract`. Totality is implemented rather
14
+ than caught: codec ships no error type, no options bag, no class, and no type of its own. It is
15
+ not a formats package — it does not compress, frame a stream, escape a document, map values into a
16
+ store, or read JSON. Source: [`src/core`](../src/core), published through
16
17
  `@orkestrel/codec` with a runtime dependency on `@orkestrel/contract`.
17
18
 
18
19
  ## The families
@@ -484,19 +485,35 @@ measureUTF8('\ud800') // undefined — ill-formed text has no UTF-8 spelling
484
485
  both its decoder and its guard.
485
486
 
486
487
  The platform's own codings run as oracles over the populations they agree on, each one probed
487
- before a sweep was written to it. `decodeUTF8` and `decodeUTF16LE` are held against a fatal
488
- `TextDecoder` carrying `ignoreBOM` over the whole two-byte space, `encodeUTF8` against
489
- `TextEncoder` over the well-formed texts, and `decodeWindows1252` against the WHATWG index over
490
- the bytes that index and this coding both define. `decodeLatin1` is held against
491
- `String.fromCharCode` rather than against the `latin1` label, and an assertion pins the label's
492
- disagreement to the 0x80-0x9F band so a later reader cannot quietly adopt it as the oracle.
488
+ before a sweep was written to it. `decodeUTF16LE` is held against a fatal `TextDecoder` carrying
489
+ `ignoreBOM` over the whole two-byte space, `encodeUTF8` against `TextEncoder` over the well-formed
490
+ texts, and `decodeWindows1252` against the WHATWG index over the bytes that index and this coding
491
+ both define. `decodeLatin1` is held against `String.fromCharCode` rather than against the `latin1`
492
+ label, and an assertion pins the label's disagreement to the 0x80-0x9F band so a later reader
493
+ cannot quietly adopt it as the oracle.
493
494
 
494
495
  Further sweeps reach the multi-byte defects a two-byte space cannot present. The embedded
495
496
  sweep wraps every byte pair as `41 b1 b2 41`, which moves each pair into the middle of a buffer
496
497
  the decoder has already started walking. The mutation sweep takes the canonical encoding of each
497
498
  boundary code point and substitutes every byte position through all 256 values, which reaches the
498
499
  overlong spellings of a four-byte code point and the encoded surrogates that sit one lead byte
499
- from a canonical U+D7FF. Each runs against the same fatal `TextDecoder`.
500
+ from a canonical U+D7FF. Each runs against the same oracle.
501
+
502
+ `decodeUTF8` delegates to the host's decoder, so its oracle is the walk it shipped in codec
503
+ 0.0.12, which reads no platform table: the two-byte, embedded, and boundary-mutation sweeps hold
504
+ it against that walk, and so does a seeded differential over random byte buffers and over
505
+ mutations of seeded well-formed text, with zero differences allowed. Two controls run beside the
506
+ differential, a fatal decoder that strips a leading BOM and a decoder that replaces instead of
507
+ refusing, and each must disagree with the walk somewhere in the population. Named cases pin the
508
+ BOM leading and mid-stream, U+0000, U+FFFE, and U+FFFF, each refusal edge beside its admitted
509
+ neighbour, truncation at every width, a subarray at a nonzero offset, a refused call followed by
510
+ an accepted one, and the copy a view over a `SharedArrayBuffer` or a resizable `ArrayBuffer`
511
+ takes before it reaches the host.
512
+
513
+ `measureUTF8`, `measureHex`, `measureBase64`, and `encodeHex` are each held against the walk it
514
+ shipped in codec 0.0.12, over the populations the law sweeps read plus the rows a code-unit walk
515
+ could miscount: astral pairs, lone and reversed surrogates, odd-length hex, and uppercase hex. A
516
+ view whose own iterator is replaced encodes the hex of its indexed bytes.
500
517
 
501
518
  The Windows-1252 high table carries another reading that is not a platform decoder at all. The
502
519
  WHATWG index defines all 256 slots, so it is silent on exactly the omissions that make this code