@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.
- package/dist/agents/skills/orkestrel-publish/scripts/swap.js +111 -5
- package/dist/agents/templates/brief.md +1 -0
- package/dist/bin/main.js +87 -30
- package/dist/bin/main.js.map +1 -1
- package/dist/host/agents/platforms/windows.md +1 -0
- package/dist/host/agents/skills/orkestrel-publish/references/release.md +1 -0
- package/dist/host/agents/skills/orkestrel-publish/scripts/swap.ts +133 -6
- package/dist/host/agents/templates/brief.md +1 -0
- package/dist/host/claude/agents/orkestrel.md +52 -52
- package/dist/host/claude/rules/documentation.md +1 -0
- package/dist/host/claude/rules/quality.md +1 -0
- package/dist/host/claude/rules/tests.md +1 -0
- package/dist/host/claude/rules/workspace.md +14 -13
- package/dist/host/dotfiles/oxlintrc.json +1 -1
- package/dist/host/guides/browser.md +1 -1
- package/dist/host/guides/codec.md +29 -12
- package/dist/host/guides/contract.md +58 -57
- package/dist/host/guides/scaffold.md +63 -43
- package/dist/host/guides/server.md +1 -1
- package/dist/host/manifest.json +18 -18
- package/dist/host/scripts/browsers.sh +0 -0
- package/dist/host/scripts/codex.sh +0 -0
- package/dist/host/scripts/cursor.sh +0 -0
- package/dist/host/scripts/deps.sh +0 -0
- package/dist/host/scripts/npm.sh +0 -0
- package/dist/host/scripts/ollama.sh +0 -0
- package/dist/host/tests/config.test.ts +5 -0
- package/dist/host/tests/setupPolicy.ts +1 -0
- package/dist/src/core/index.cjs +64 -24
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +17 -2
- package/dist/src/core/index.d.ts +17 -2
- package/dist/src/core/index.js +64 -25
- package/dist/src/core/index.js.map +1 -1
- 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
|
|
12
|
-
`TextDecoder`, no `node:*`.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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. `
|
|
488
|
-
`
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
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
|
|
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
|