kobako 0.26.0-x86_64-linux → 0.28.0-x86_64-linux

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 (81) hide show
  1. checksums.yaml +4 -4
  2. data/.release-please-manifest.json +1 -1
  3. data/CHANGELOG.md +103 -0
  4. data/README.md +156 -118
  5. data/ROADMAP.md +23 -22
  6. data/SECURITY.md +1 -1
  7. data/crates/kobako-runtime/CHANGELOG.md +38 -0
  8. data/crates/kobako-runtime/README.md +10 -12
  9. data/crates/kobako-transport/CHANGELOG.md +35 -0
  10. data/crates/kobako-transport/README.md +43 -27
  11. data/crates/kobako-wasmtime/CHANGELOG.md +51 -0
  12. data/crates/kobako-wasmtime/README.md +8 -10
  13. data/data/kobako.wasm +0 -0
  14. data/lib/kobako/3.3/kobako.so +0 -0
  15. data/lib/kobako/3.4/kobako.so +0 -0
  16. data/lib/kobako/4.0/kobako.so +0 -0
  17. data/lib/kobako/capture.rb +1 -4
  18. data/lib/kobako/catalog/extensions.rb +21 -59
  19. data/lib/kobako/catalog/flags.rb +41 -0
  20. data/lib/kobako/catalog/handles.rb +7 -54
  21. data/lib/kobako/catalog/services.rb +7 -61
  22. data/lib/kobako/catalog/snippets.rb +42 -66
  23. data/lib/kobako/catalog.rb +2 -10
  24. data/lib/kobako/codec/decoder.rb +9 -28
  25. data/lib/kobako/codec/encoder.rb +3 -22
  26. data/lib/kobako/codec/error.rb +6 -27
  27. data/lib/kobako/codec/ext_types.rb +72 -94
  28. data/lib/kobako/codec/handle_walk.rb +65 -130
  29. data/lib/kobako/codec/nesting.rb +3 -8
  30. data/lib/kobako/codec/state.rb +4 -10
  31. data/lib/kobako/codec/utils.rb +6 -34
  32. data/lib/kobako/codec.rb +3 -22
  33. data/lib/kobako/constant_name.rb +8 -0
  34. data/lib/kobako/context.rb +51 -112
  35. data/lib/kobako/errors.rb +51 -127
  36. data/lib/kobako/execution.rb +16 -21
  37. data/lib/kobako/extension.rb +23 -40
  38. data/lib/kobako/handle.rb +7 -12
  39. data/lib/kobako/outcome.rb +51 -80
  40. data/lib/kobako/payload/arguments.rb +1 -16
  41. data/lib/kobako/payload.rb +4 -12
  42. data/lib/kobako/pool.rb +23 -53
  43. data/lib/kobako/runtime.rb +7 -21
  44. data/lib/kobako/sandbox.rb +96 -133
  45. data/lib/kobako/sandbox_options.rb +38 -84
  46. data/lib/kobako/snippet/binary.rb +1 -16
  47. data/lib/kobako/snippet/source.rb +1 -16
  48. data/lib/kobako/snippet.rb +1 -9
  49. data/lib/kobako/transport/call.rb +1 -14
  50. data/lib/kobako/transport/dispatcher.rb +112 -195
  51. data/lib/kobako/transport/error.rb +6 -20
  52. data/lib/kobako/transport/exposure.rb +5 -10
  53. data/lib/kobako/transport/reflection.rb +39 -50
  54. data/lib/kobako/transport/run.rb +17 -71
  55. data/lib/kobako/transport/yielder.rb +21 -73
  56. data/lib/kobako/transport.rb +3 -15
  57. data/lib/kobako/unresolved.rb +4 -11
  58. data/lib/kobako/usage.rb +2 -6
  59. data/lib/kobako/version.rb +1 -1
  60. data/sig/kobako/catalog/extensions.rbs +2 -2
  61. data/sig/kobako/catalog/flags.rbs +17 -0
  62. data/sig/kobako/catalog/services.rbs +0 -6
  63. data/sig/kobako/catalog/snippets.rbs +4 -4
  64. data/sig/kobako/codec/ext_types.rbs +10 -8
  65. data/sig/kobako/codec/handle_walk.rbs +9 -7
  66. data/sig/kobako/codec/utils.rbs +2 -2
  67. data/sig/kobako/codec.rbs +2 -2
  68. data/sig/kobako/constant_name.rbs +3 -0
  69. data/sig/kobako/context.rbs +2 -3
  70. data/sig/kobako/errors.rbs +6 -0
  71. data/sig/kobako/outcome.rbs +6 -8
  72. data/sig/kobako/runtime.rbs +12 -8
  73. data/sig/kobako/sandbox.rbs +4 -0
  74. data/sig/kobako/sandbox_options.rbs +2 -6
  75. data/sig/kobako/transport/dispatcher.rbs +14 -18
  76. data/sig/kobako/transport/reflection.rbs +5 -3
  77. data/sig/kobako/transport/run.rbs +1 -3
  78. data/sig/kobako/transport/yielder.rbs +3 -3
  79. data/sig/kobako/transport.rbs +7 -6
  80. metadata +6 -3
  81. data/rust-toolchain.toml +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5143bba0e669115e7878824fbe297b6b28183ef35acfb9c4379b0bddde0a5874
4
- data.tar.gz: c74e7787d59c7ed50ece4ccea497c30de89d0413fb048aca019211e3b18b938a
3
+ metadata.gz: 30a1c449ac267b0a89258b6784001a0d0c72f7484bb2027d921f705ce8d74586
4
+ data.tar.gz: c4ee6d633295d44040544068406fc150c7911eb4692a01dd28e1260bd82f4333
5
5
  SHA512:
6
- metadata.gz: 8b08c16f5bb182e718ea8d0350156da643a10823c9fd9a36f204d5a2d04fe654a4400832ec4a45fb173c56cd8078663d528b37ab12736edcb6efc105cb3bbaba
7
- data.tar.gz: 731a99941f2b2a425007738029df5709a58441941a26e14b13dfdf3c3cc488e05d8970ed8e1bfc7023d10075f0a743eda7dda8f1fbcbe3af879f86ed95138a0c
6
+ metadata.gz: 44a96423a76ba5fd7fbb8c8e1f51bd9e17c1ee8bea07421d9166c5f46d58dacf492561be894e7341b2120eed6d7e81e4efa02bc1743e1b3d60ea58755d863138
7
+ data.tar.gz: 3cdee2c000d47a0f0617090440d95ca57a83d96cb5b55f570cf8245a4d1b63b40c37e6c6cfb244a47bc76e5123bf0133d643cffcf08574b887e2ab50552f892f
@@ -1 +1 @@
1
- {".":"0.26.0","wasm/kobako-core":"0.16.0","wasm/kobako-mruby":"0.16.0","wasm/kobako-io":"0.16.0","wasm/kobako-json":"0.16.0","wasm/kobako-regexp":"0.16.0","wasm/kobako-baker":"0.16.0","crates/kobako-transport":"0.16.0","crates/kobako-codec":"0.16.0","crates/kobako-runtime":"0.16.0","crates/kobako-wasmtime":"0.16.0","crates/kobako":"0.16.0"}
1
+ {".":"0.28.0","wasm/kobako-core":"0.18.0","wasm/kobako-mruby":"0.18.0","wasm/kobako-io":"0.18.0","wasm/kobako-json":"0.18.0","wasm/kobako-regexp":"0.18.0","wasm/kobako-baker":"0.18.0","crates/kobako-transport":"0.18.0","crates/kobako-codec":"0.18.0","crates/kobako-runtime":"0.18.0","crates/kobako-wasmtime":"0.18.0","crates/kobako":"0.18.0"}
data/CHANGELOG.md CHANGED
@@ -1,5 +1,108 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.28.0](https://github.com/elct9620/kobako/compare/v0.27.0...v0.28.0) (2026-10-13)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * Sandbox#preload(code:) and Sandbox#flag raise ArgumentError for text whose bytes are not UTF-8, where they accepted it and each invocation then raised EncodingError.
9
+ * **guest:** the kobako guest crates name beni 0.23's types, so a shell or codec built on them moves to beni 0.23 with them.
10
+ * **guest:** preloaded bytecode whose top level raises ScriptError itself now fails as a SandboxError carrying ScriptError, not as
11
+ * **transport:** the stdin layout a Guest Binary reads changed within ABI 4. kobako_transport::envelope::Frames is replaced by Preamble, which is #[non_exhaustive] and built from Default; Bindings and Snippets no longer have their own decode and encode. Guest::eval and Guest::run, MrbGuest::eval and MrbGuest::run, and Runtime::invoke take a Preamble in place of Frames. kobako_core re-exports Preamble and Flag in place of Frames.
12
+ * **mruby:** CodecError::Unsupported is renamed to CodecError::Unserved; a codec of one's own that refuses a position returns the new name.
13
+ * **transport:** the ABI version is 4, so a Guest Binary built for ABI 3 is refused at Sandbox construction. kobako_core::export_guest! emits __kobako_downcall in place of __kobako_eval, __kobako_run, __kobako_yield_to_block and __kobako_take_outcome, and the host import is __kobako_upcall. kobako_core::abi::{take_outcome, write_outcome, write_reply, decode_run} are replaced by serve and answer, and the frames module is no longer public. Reply, YieldReply and Outcome gain an Unsupported arm and take their tags from the shared registry, and kobako_core::DispatchError and kobako::YieldError gain an Unsupported arm. A yield to a guest without block support raises Kobako::UnsupportedError at the Service's yield instead of failing the invocation as a trap.
14
+ * **runtime:** Runtime::invoke takes &kobako_transport::envelope::Frames in place of kobako_runtime::Frames, whose byte fields are gone. Guest::eval and Guest::run (and their MrbGuest flows) receive the decoded Frames, eval also its source; kobako_core::frames::read_frame is replaced by read_eval_frames and read_frames.
15
+ * **runtime:** kobako_runtime::snapshot::Completion::Outcome holds a decoded kobako_transport::envelope::Outcome instead of Vec<u8>; an engine decodes the result itself and reports an unframed one as
16
+ * **guest:** kobako_core::Guest::eval and ::run return Outcome, ::run takes a Run instead of the envelope bytes, and ::yield_to_block returns a YieldReply instead of a packed pointer; kobako_mruby::MrbGuest mirrors these signatures. kobako_core::abi::write_outcome takes an Outcome, write_panic is removed, and decode_run and write_reply are new.
17
+ * **runtime:** kobako_runtime::runtime::Entry::Run holds { entrypoint: &str, payload: Vec<u8> } instead of { envelope: &[u8] }; a frontend passes the fields, and an engine encodes the Run envelope itself.
18
+ * **runtime:** kobako_runtime::yielder::Yielder::yield_to_block returns Result<YieldReply, Trap> instead of the encoded bytes; an engine implementing it decodes the reply itself.
19
+ * **guest:** the kobako guest crates name beni 0.22's types, so a shell or codec built on them moves to beni 0.22 with them.
20
+ * **guest:** the kobako-mruby harness names beni 0.21's types — the keyword Hash in `Arguments` and `PayloadCodec::encode_call_arguments` is `beni::RHash` — so a shell or codec built on these crates moves to beni 0.21 with them.
21
+ * a memory budget or deadline reached during a Service answer or a yielded block now raises Kobako::MemoryLimitError or
22
+ * **pool:** a Pool no longer replaces a Sandbox after its holder raises Kobako::TrapError; the next checkout receives the same Sandbox and the setup block does not run again.
23
+ * **sdk:** give Options::default() the caps the Ruby frontend defaults to
24
+
25
+ ### Features
26
+
27
+ * compile a Sandbox's preloaded source once and replay its bytecode ([4d6d438](https://github.com/elct9620/kobako/commit/4d6d43813a469a7e3bdd075aba29c9700459825c)), closes [#75](https://github.com/elct9620/kobako/issues/75)
28
+ * compile the Rust SDK's preloaded source once at the seal ([cebe7a9](https://github.com/elct9620/kobako/commit/cebe7a918aebe6a6cf3ba4b57356a3a5db2ccf33)), closes [#75](https://github.com/elct9620/kobako/issues/75)
29
+ * **guest:** compile a Preamble's source snippets without running them ([1c649b8](https://github.com/elct9620/kobako/commit/1c649b809c6d72c52f437cd19a89c1972201a5f0)), closes [#75](https://github.com/elct9620/kobako/issues/75)
30
+ * **guest:** raise Kobako::UnsupportedError when a host does not serve a call ([db003af](https://github.com/elct9620/kobako/commit/db003af75cf2d11b5f644986aa77c0408f5f59ba)), closes [#73](https://github.com/elct9620/kobako/issues/73)
31
+ * **guest:** rebuild the guest crates on beni 0.21 ([8ec00ff](https://github.com/elct9620/kobako/commit/8ec00ff94ec21b6bbfe8b88e0a4e75f4489dd692))
32
+ * let a Host App set the flags a Guest Binary may switch on ([9bee4cc](https://github.com/elct9620/kobako/commit/9bee4cc899623c3b4112db5719adbae5df93b2f9))
33
+ * **runtime:** compile a Preamble's snippets on an instance of their own ([303432d](https://github.com/elct9620/kobako/commit/303432dd90ed62dc378391515e68e784e1b473a4)), closes [#75](https://github.com/elct9620/kobako/issues/75)
34
+ * **transport:** carry a compile request and its answer ([f30958e](https://github.com/elct9620/kobako/commit/f30958e7d61c95667c32cfee7d9b2d2f74550a8e)), closes [#75](https://github.com/elct9620/kobako/issues/75)
35
+ * **transport:** carry each operation as a tag on one channel per direction ([c7d574b](https://github.com/elct9620/kobako/commit/c7d574b59a42e58632f2bdc46cc9a8e4c7ac6121)), closes [#73](https://github.com/elct9620/kobako/issues/73)
36
+ * **transport:** keep an unknown request's body, and refuse tag 0x00 ([edb64df](https://github.com/elct9620/kobako/commit/edb64df8f87694d17c5b6fd71ac63329023306ec)), closes [#73](https://github.com/elct9620/kobako/issues/73)
37
+ * **transport:** name the Frames a Sandbox is set up with ([52b25aa](https://github.com/elct9620/kobako/commit/52b25aa48d321ce8ea7dc9532cfade062118c64f)), closes [#73](https://github.com/elct9620/kobako/issues/73)
38
+ * **transport:** set an invocation up from a Preamble of tagged records ([84d4498](https://github.com/elct9620/kobako/commit/84d4498464f94d7312f26931ddd4ec43894a6654))
39
+
40
+
41
+ ### Bug Fixes
42
+
43
+ * end the invocation as the trap a host callback into the guest hits ([b8f47d3](https://github.com/elct9620/kobako/commit/b8f47d3699a19adcfd5596af93136401a286c761))
44
+ * **guest:** tell an unreadable bytecode snippet from one that raised ([fc5156d](https://github.com/elct9620/kobako/commit/fc5156d783d5ab21164df533bc97ec4afcf0ca09))
45
+ * keep a compile's bytecode only when the Preamble still fits it ([765db08](https://github.com/elct9620/kobako/commit/765db08ad31c8f5163794c7e144355f3237af93b))
46
+ * name the operation a Guest Binary answers as unsupported ([1027884](https://github.com/elct9620/kobako/commit/1027884ace67519dc37736bd4e87952c17222f5d)), closes [#73](https://github.com/elct9620/kobako/issues/73)
47
+ * **pool:** keep a Sandbox whose holder met a trap ([27730b9](https://github.com/elct9620/kobako/commit/27730b9e4f05985d07bc5c801501333735266d05))
48
+ * refuse a constant name longer than the guest can intern ([2a3237f](https://github.com/elct9620/kobako/commit/2a3237fa7bb7b7fdbbde05487ba0d5c4a8fdc33b))
49
+ * refuse snippet source and a flag that are not UTF-8 when registered ([b7d9653](https://github.com/elct9620/kobako/commit/b7d9653bb4e659708c2b996620fc3751d1918c29))
50
+ * **sdk:** give Options::default() the caps the Ruby frontend defaults to ([af36434](https://github.com/elct9620/kobako/commit/af364348345e8e6dfe9c383facea388f3e12f8c0))
51
+ * stop telling callers to discard a Sandbox over an unframeable outcome ([f7938e9](https://github.com/elct9620/kobako/commit/f7938e9887b9cdccf611b56be28dc3385a6cef00))
52
+ * **transport:** answer an unrescued UnsupportedError in kobako's own words ([13f3b45](https://github.com/elct9620/kobako/commit/13f3b45c180226175b948e20aaa740a17bc6fc77)), closes [#73](https://github.com/elct9620/kobako/issues/73)
53
+ * **transport:** read only an unassigned tag as an unknown request ([fcb81b5](https://github.com/elct9620/kobako/commit/fcb81b5c38d001b729a10287443c5012281b76b6)), closes [#73](https://github.com/elct9620/kobako/issues/73)
54
+ * **wasmtime:** keep a compile answer only when it covers every source snippet ([93e9ddd](https://github.com/elct9620/kobako/commit/93e9ddd79f714446ae713a3145c59d3d2f4145dc))
55
+ * **wasmtime:** tell every frontend how to recover, not only the gem ([cab805a](https://github.com/elct9620/kobako/commit/cab805ab62441a0ca2c78775b7a0d7ce9cc05c43))
56
+ * **wasmtime:** word a missing or mistyped export one way ([8ab0aee](https://github.com/elct9620/kobako/commit/8ab0aeec8bda2960b6cab0502ef51860ea9093b8))
57
+
58
+
59
+ ### Code Refactoring
60
+
61
+ * **guest:** let export_guest! frame what a guest answers ([1ec566f](https://github.com/elct9620/kobako/commit/1ec566f9f5c6b29c07f9293df344ce7e13fb7182)), closes [#73](https://github.com/elct9620/kobako/issues/73)
62
+ * **mruby:** name a codec's refused position Unserved ([91979f9](https://github.com/elct9620/kobako/commit/91979f9546a3fa2d2dec8c136ed6affc521ba6fb)), closes [#73](https://github.com/elct9620/kobako/issues/73)
63
+ * **runtime:** hand a frontend the decoded Outcome ([0da6aac](https://github.com/elct9620/kobako/commit/0da6aac0f7943d694a5a4ab9439b2d6c527ae1b0)), closes [#73](https://github.com/elct9620/kobako/issues/73)
64
+ * **runtime:** hand a frontend the decoded Yield Reply ([e80ab54](https://github.com/elct9620/kobako/commit/e80ab54e36c2a80b0f746c675f85bd1238fd4331)), closes [#73](https://github.com/elct9620/kobako/issues/73)
65
+ * **runtime:** let the ABI endpoints frame and read the Frames ([dea069a](https://github.com/elct9620/kobako/commit/dea069ac49a59c12a6f7102ed3cf2925f316cbff)), closes [#73](https://github.com/elct9620/kobako/issues/73)
66
+ * **runtime:** let the engine frame a run's entrypoint and payload ([62f9c94](https://github.com/elct9620/kobako/commit/62f9c9407ff3ce690723625bea075fa49d2dda47)), closes [#73](https://github.com/elct9620/kobako/issues/73)
67
+
68
+
69
+ ### Build System
70
+
71
+ * **guest:** rebuild the guest crates on beni 0.22 ([fd6aeb9](https://github.com/elct9620/kobako/commit/fd6aeb92705fa53c52e2cd75b4918a58baa6637e))
72
+ * **guest:** rebuild the guest crates on beni 0.23 ([a6782da](https://github.com/elct9620/kobako/commit/a6782dad4c2c68a25573f82a8a16588c09856d23))
73
+
74
+ ## [0.27.0](https://github.com/elct9620/kobako/compare/v0.26.0...v0.27.0) (2026-09-20)
75
+
76
+
77
+ ### ⚠ BREAKING CHANGES
78
+
79
+ * **guest:** a pattern's allocator is undefined from the moment the capability installs rather than from its first wrap, so allocating one is refused for the missing allocator throughout an invocation, where before the first statement could still reach an uninitialized carrier.
80
+ * **mruby:** `kobako_mruby::dispatch` takes `Option<Proc>` where it took a `Value` that could be nil. A gem passes the block its method read off its own frame; `None` says there is none.
81
+ * **json:** a JSON failure whose error class the guest replaced reaches the Host App as a guest exception rather than as a trap.
82
+ * **json:** JSON.parse refuses a second positional argument. Options passed as a positional Hash, the shape MRI also refuses, must be written as keywords.
83
+ * **mruby:** an object bearing a capability reference's class name without being one is refused as a value the wire cannot carry, where it previously crossed as a reference to whatever identifier it held.
84
+ * **mruby:** an object whose class carries a list's or a map's name without being one is refused rather than read as that container, both as the invocation's own answer and as a dispatch argument.
85
+ * **guest:** `Kobako::raise_transport_error`, `raise_service_error` and `reraise` are gone. A flow of its own builds `Kobako::transport_error` or `service_error` and hands the result back as `Err`, which beni raises at the guest call site.
86
+
87
+ ### Features
88
+
89
+ * **gate:** hold a crate README's install snippet to its manifest ([31f6926](https://github.com/elct9620/kobako/commit/31f692602de6e1a2d9e5f84872164e83c4008e50))
90
+ * **guest:** rebuild the guest crates on beni 0.17 ([b397701](https://github.com/elct9620/kobako/commit/b397701231c7d8718503d24f73b175676d0d1be3))
91
+ * **guest:** rebuild the guest crates on beni 0.18 ([ae232eb](https://github.com/elct9620/kobako/commit/ae232ebbf708419ff0672172fbf8627363fb02da))
92
+
93
+
94
+ ### Bug Fixes
95
+
96
+ * **json:** read a parse's options from the keywords it declares ([6f0c83c](https://github.com/elct9620/kobako/commit/6f0c83cc0b6ae0fe0f327ad0b514d46a6f3432c0))
97
+ * **json:** report a replaced error class instead of ending the invocation ([5a75e42](https://github.com/elct9620/kobako/commit/5a75e42ba7990eb31d8487dd3979cca3c4a3d29b))
98
+ * **mruby:** prove a container's layout by its tag, not its class name ([5ee8c59](https://github.com/elct9620/kobako/commit/5ee8c59db90cee27f356028ff466860afe89e06e))
99
+ * **mruby:** read a reference's identity from the class the bridge registered ([0f24102](https://github.com/elct9620/kobako/commit/0f24102b75f771548cbc39256690e59d6df1f9e4))
100
+
101
+
102
+ ### Code Refactoring
103
+
104
+ * **mruby:** carry a dispatch's block as the block it is ([01d8831](https://github.com/elct9620/kobako/commit/01d8831dff173e80c10d965af8615acb4de2498b))
105
+
3
106
  ## [0.26.0](https://github.com/elct9620/kobako/compare/v0.25.0...v0.26.0) (2026-09-15)
4
107
 
5
108