kobako 0.20.0 → 0.21.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.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/.release-please-manifest.json +1 -1
  3. data/CHANGELOG.md +122 -0
  4. data/Cargo.lock +119 -309
  5. data/README.md +97 -45
  6. data/ROADMAP.md +1 -1
  7. data/crates/kobako-runtime/CHANGELOG.md +44 -0
  8. data/crates/kobako-runtime/Cargo.toml +8 -1
  9. data/crates/kobako-runtime/README.md +1 -1
  10. data/crates/kobako-runtime/src/dispatch.rs +17 -11
  11. data/crates/kobako-runtime/src/error.rs +38 -6
  12. data/crates/kobako-runtime/src/lib.rs +13 -2
  13. data/crates/kobako-runtime/src/profile.rs +8 -0
  14. data/crates/kobako-runtime/src/runtime.rs +7 -2
  15. data/crates/kobako-runtime/src/snapshot.rs +13 -4
  16. data/crates/kobako-runtime/src/yielder.rs +4 -4
  17. data/crates/kobako-transport/CHANGELOG.md +38 -0
  18. data/crates/kobako-transport/Cargo.toml +27 -0
  19. data/crates/kobako-transport/README.md +43 -0
  20. data/crates/kobako-transport/src/abi.rs +89 -0
  21. data/crates/kobako-transport/src/envelope/bytes.rs +234 -0
  22. data/crates/kobako-transport/src/envelope/call.rs +222 -0
  23. data/crates/kobako-transport/src/envelope/error_record.rs +101 -0
  24. data/crates/kobako-transport/src/envelope/fault.rs +171 -0
  25. data/crates/kobako-transport/src/envelope/invocation_frames.rs +232 -0
  26. data/crates/kobako-transport/src/envelope/outcome.rs +261 -0
  27. data/crates/kobako-transport/src/envelope/reply.rs +240 -0
  28. data/crates/kobako-transport/src/envelope/run.rs +85 -0
  29. data/crates/kobako-transport/src/envelope.rs +73 -0
  30. data/crates/kobako-transport/src/lib.rs +21 -0
  31. data/crates/kobako-wasmtime/CHANGELOG.md +35 -0
  32. data/crates/kobako-wasmtime/Cargo.toml +7 -4
  33. data/crates/kobako-wasmtime/README.md +1 -1
  34. data/crates/kobako-wasmtime/src/abi.rs +70 -0
  35. data/crates/kobako-wasmtime/src/config.rs +19 -12
  36. data/crates/kobako-wasmtime/src/dispatch.rs +15 -8
  37. data/crates/kobako-wasmtime/src/driver.rs +19 -80
  38. data/crates/kobako-wasmtime/src/frames.rs +11 -9
  39. data/crates/kobako-wasmtime/src/guest_mem.rs +7 -15
  40. data/crates/kobako-wasmtime/src/instance_pre.rs +13 -8
  41. data/crates/kobako-wasmtime/src/invocation.rs +1 -1
  42. data/crates/kobako-wasmtime/src/lib.rs +4 -1
  43. data/crates/kobako-wasmtime/src/trap.rs +6 -5
  44. data/data/kobako.wasm +0 -0
  45. data/ext/kobako/Cargo.toml +2 -1
  46. data/ext/kobako/src/runtime/bridge.rs +78 -21
  47. data/ext/kobako/src/runtime/errors.rs +13 -5
  48. data/ext/kobako/src/runtime.rs +114 -35
  49. data/lib/kobako/catalog/services.rb +13 -21
  50. data/lib/kobako/catalog/snippets.rb +16 -34
  51. data/lib/kobako/codec/decoder.rb +10 -13
  52. data/lib/kobako/codec/encoder.rb +7 -7
  53. data/lib/kobako/codec/error.rb +6 -6
  54. data/lib/kobako/codec/ext_types.rb +12 -72
  55. data/lib/kobako/codec/handle_walk.rb +6 -6
  56. data/lib/kobako/codec/state.rb +4 -56
  57. data/lib/kobako/codec/utils.rb +4 -4
  58. data/lib/kobako/codec.rb +11 -21
  59. data/lib/kobako/context.rb +23 -17
  60. data/lib/kobako/errors.rb +32 -11
  61. data/lib/kobako/outcome.rb +71 -128
  62. data/lib/kobako/payload/arguments.rb +59 -0
  63. data/lib/kobako/payload.rb +19 -0
  64. data/lib/kobako/sandbox.rb +12 -13
  65. data/lib/kobako/sandbox_options.rb +1 -1
  66. data/lib/kobako/snippet/binary.rb +3 -4
  67. data/lib/kobako/snippet/source.rb +5 -6
  68. data/lib/kobako/snippet.rb +2 -2
  69. data/lib/kobako/transport/call.rb +21 -0
  70. data/lib/kobako/transport/dispatcher.rb +86 -135
  71. data/lib/kobako/transport/error.rb +21 -5
  72. data/lib/kobako/transport/reflection.rb +82 -0
  73. data/lib/kobako/transport/run.rb +25 -33
  74. data/lib/kobako/transport/yielder.rb +27 -36
  75. data/lib/kobako/transport.rb +11 -8
  76. data/lib/kobako/usage.rb +1 -1
  77. data/lib/kobako/version.rb +1 -1
  78. data/release-please-config.json +47 -2
  79. data/sig/kobako/catalog/services.rbs +1 -1
  80. data/sig/kobako/catalog/snippets.rbs +4 -4
  81. data/sig/kobako/codec/error.rbs +4 -4
  82. data/sig/kobako/codec/ext_types.rbs +0 -7
  83. data/sig/kobako/codec/state.rbs +0 -4
  84. data/sig/kobako/codec.rbs +4 -5
  85. data/sig/kobako/context.rbs +4 -4
  86. data/sig/kobako/errors.rbs +15 -3
  87. data/sig/kobako/outcome.rbs +12 -13
  88. data/sig/kobako/payload/arguments.rbs +26 -0
  89. data/sig/kobako/payload.rbs +4 -0
  90. data/sig/kobako/pool.rbs +0 -2
  91. data/sig/kobako/runtime.rbs +15 -13
  92. data/sig/kobako/snippet/binary.rbs +1 -1
  93. data/sig/kobako/snippet/source.rbs +1 -1
  94. data/sig/kobako/transport/call.rbs +21 -0
  95. data/sig/kobako/transport/dispatcher.rbs +8 -10
  96. data/sig/kobako/transport/error.rbs +11 -0
  97. data/sig/kobako/transport/reflection.rbs +15 -0
  98. data/sig/kobako/transport/run.rbs +1 -1
  99. data/sig/kobako/transport/yielder.rbs +2 -2
  100. data/sig/kobako/transport.rbs +8 -2
  101. metadata +24 -11
  102. data/lib/kobako/fault.rb +0 -38
  103. data/lib/kobako/outcome/panic.rb +0 -42
  104. data/lib/kobako/transport/request.rb +0 -76
  105. data/lib/kobako/transport/response.rb +0 -83
  106. data/lib/kobako/transport/yield.rb +0 -94
  107. data/sig/kobako/fault.rbs +0 -19
  108. data/sig/kobako/outcome/panic.rbs +0 -34
  109. data/sig/kobako/transport/request.rbs +0 -29
  110. data/sig/kobako/transport/response.rbs +0 -33
  111. data/sig/kobako/transport/yield.rbs +0 -34
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c3d1c75e0967f01b1284848372d66adda8cc65566b828bb1634f1624b1b4938
4
- data.tar.gz: 223e0cc856970daf5c702775c1a3df2851d96beb72db1793e24c776747205a0c
3
+ metadata.gz: ff585432220deec2b7a21f062f070e6b13c2d95529b8e636c70452bb377f24f1
4
+ data.tar.gz: 63401be88c3d166e3ebca35106e5c4b8ca005490da41c4625a42cbeda0c04ae5
5
5
  SHA512:
6
- metadata.gz: 4b6050756d4ed75616ea4aa82fe56febc11cc97c8b1cba165c607e70b6921dfad322c1594746b3e105338653fce93f5e208b4f2516c39f2f3cb4d9b85647b79b
7
- data.tar.gz: 8c50704f755219097efdd41c5e47ba304fa98fe8843e5f39ee49df4c22cac7d7916cd8a96be472ffae3535d4f285422e0cca81917c722584b44165f262611212
6
+ metadata.gz: 4bf8515bd5840ab2e8288e7a7f5942f50c402724f670efa570719f9be3181c7052044d2ab51f3fd42fffc4b61f7f269abaad7afa866b20f0a7b7f57d53a12bd9
7
+ data.tar.gz: 52fe4c1ddedd100757b0fcdb952c662585d30e21003df98b5cc97bea22eb20545c530accd87d7f2d684aac9eb64339e4b147537719df89355b890daa346081b5
@@ -1 +1 @@
1
- {".":"0.20.0","wasm/kobako-core":"0.12.0","wasm/kobako-mruby":"0.12.0","wasm/kobako-io":"0.12.0","wasm/kobako-json":"0.12.0","wasm/kobako-regexp":"0.12.0","wasm/kobako-baker":"0.12.0","crates/kobako-codec":"0.12.0","crates/kobako-runtime":"0.12.0","crates/kobako-wasmtime":"0.12.0","crates/kobako":"0.12.0"}
1
+ {".":"0.21.1","wasm/kobako-core":"0.13.1","wasm/kobako-mruby":"0.13.1","wasm/kobako-io":"0.13.1","wasm/kobako-json":"0.13.1","wasm/kobako-regexp":"0.13.1","wasm/kobako-baker":"0.13.1","crates/kobako-transport":"0.13.1","crates/kobako-codec":"0.13.1","crates/kobako-runtime":"0.13.1","crates/kobako-wasmtime":"0.13.1","crates/kobako":"0.13.1"}
data/CHANGELOG.md CHANGED
@@ -1,5 +1,127 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.21.1](https://github.com/elct9620/kobako/compare/v0.21.0...v0.21.1) (2026-07-30)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **bench:** let a re-run stamp its own capture, not the round before it ([3a9793e](https://github.com/elct9620/kobako/commit/3a9793e16c21162ae89c61c4e709cd602fc7ab9f))
9
+ * **bench:** move the anchor onto the round the envelope's new tier produced ([ddcfcc1](https://github.com/elct9620/kobako/commit/ddcfcc162b786868807afdf80a284db5b40dc3cd))
10
+
11
+
12
+ ### Performance Improvements
13
+
14
+ * **host:** ask an artifact its ABI version once, not once per Sandbox ([693b94f](https://github.com/elct9620/kobako/commit/693b94f878e56815fe3faeae94e5c4d0cd9c8bb6))
15
+ * **mruby:** record the boot constant set once, not on every #run ([a7f6bb9](https://github.com/elct9620/kobako/commit/a7f6bb91d20e29aa5cd91c5568274c367a04c8f7))
16
+ * **mruby:** resolve a bind path's namespace once per namespace ([55cd1f3](https://github.com/elct9620/kobako/commit/55cd1f30313b70993aae8c973361ef636ce5d454))
17
+
18
+ ## [0.21.0](https://github.com/elct9620/kobako/compare/v0.20.0...v0.21.0) (2026-07-29)
19
+
20
+
21
+ ### ⚠ BREAKING CHANGES
22
+
23
+ * **spec:** speak one word for the arm every envelope answers success on
24
+ * **transport:** let every envelope spell its success arm the same way
25
+ * **spec:** separate what a name promises from what the wire promises
26
+ * **sdk:** keep the root to what every build of this crate has
27
+ * **sdk:** make the wasm engine something a host can actually take out
28
+ * **mruby:** name each codec method after the position it serves
29
+ * **wasmtime:** put every cap in one struct, named the way the field is read
30
+ * **runtime:** give the engine contract names an implementer can write
31
+ * **transport:** name the core envelope's types after what they carry
32
+ * **guest:** make a parked block and its wire bit one statement
33
+ * **sdk:** reach a result's host object without a schema
34
+ * **guest:** let the shell ask for the codec instead of inheriting it
35
+ * **customization:** the harness carries no codec until a shell asks
36
+ * **sdk:** make the payload codec an optional dependency
37
+ * **wire:** carry a Reply's fault arm on the envelope
38
+ * **wire:** move the Reply's fault arm onto the envelope
39
+ * **transport:** split the invocation module along the line its doc draws
40
+ * **wire:** route every tier through the one envelope
41
+ * **gem:** follow Ruby's own convention for what an error is called
42
+ * **guest:** name the payload seam for what it is — a codec
43
+ * **wire:** keep a Fault to what its author can bound
44
+ * **wire:** give the fault concept one name on both sides of the boundary
45
+ * **guest:** let the shell name the schema its guest speaks
46
+ * **guest:** route a dispatch through kobako-core without reading its payload
47
+ * **outcome:** raise an unresolved entrypoint as its own error carrying the names it could have been
48
+ * **outcome:** keep a Panic's attribution when its diagnostics are unreadable
49
+ * **wire:** carry the Outcome over the core envelope
50
+ * **wire:** carry the Yield Reply over the core envelope
51
+ * **wire:** carry the Run envelope over the core envelope
52
+ * **wire:** carry the invocation frames over the core envelope
53
+ * **codec:** make the MessagePack adapter an optional feature
54
+ * **wire:** carry dispatch over the core envelope with an opaque payload
55
+
56
+ ### Features
57
+
58
+ * **bench:** measure the host's per-invocation cost against a null guest ([c60abdf](https://github.com/elct9620/kobako/commit/c60abdfc98a38b03a4a598913df9a1120ed6302b))
59
+ * **bench:** move the two host-side benchmarks into the gated set ([31a6f7e](https://github.com/elct9620/kobako/commit/31a6f7ebb40c038b39c38ee2441216a412be48d0))
60
+ * **codec:** make the MessagePack adapter an optional feature ([effff27](https://github.com/elct9620/kobako/commit/effff278fd220a4d3c8d4e857828d610fe01f48e))
61
+ * **guest:** let the shell name the schema its guest speaks ([5ad2e0d](https://github.com/elct9620/kobako/commit/5ad2e0db4c645ab56153a81d1623e37e8cd8f5c6))
62
+ * **guest:** open the block seam to a capability gem ([c6d6e49](https://github.com/elct9620/kobako/commit/c6d6e49013bd0f850dd4f2c17273103f166294c2))
63
+ * **outcome:** keep a Panic's attribution when its diagnostics are unreadable ([8accd40](https://github.com/elct9620/kobako/commit/8accd404c9d9155f19fa0458d7e0650b5d587eb1))
64
+ * **outcome:** raise an unresolved entrypoint as its own error carrying the names it could have been ([05b4125](https://github.com/elct9620/kobako/commit/05b41257ca8d4bcb90d6759c6cc7b20582af0661))
65
+ * **sdk:** let a host bring its own wasm engine ([70c2475](https://github.com/elct9620/kobako/commit/70c24759ef4cd5785bd1418a6f8d199620f59e2b))
66
+ * **sdk:** make the payload codec an optional dependency ([0c7da71](https://github.com/elct9620/kobako/commit/0c7da71bfc0b138a316c9612b23b2944684d652e))
67
+ * **sdk:** make the wasm engine something a host can actually take out ([c9f8de6](https://github.com/elct9620/kobako/commit/c9f8de662e6dcd31c8444d9424b1a87ca144f1a6))
68
+ * **sdk:** reach a result's host object without a schema ([a0a2c56](https://github.com/elct9620/kobako/commit/a0a2c56ca5efe8daded876cdcfb8cf0ec8dd4e77))
69
+ * **spec:** anchor what a guest does at a position its codec does not serve ([3a084ea](https://github.com/elct9620/kobako/commit/3a084ea3c60c193038b6dd06d191b14d2ccde4f1))
70
+ * **tasks:** gate signatures against declarations the code dropped ([8b1b834](https://github.com/elct9620/kobako/commit/8b1b834664a51ed6330ba77e9cc3fb7cc4490faf))
71
+ * **tasks:** gate the benchmark probes on still running ([31c3455](https://github.com/elct9620/kobako/commit/31c345534c36f49670075fbfdecff645314d6d24))
72
+ * **wire:** carry a Reply's fault arm on the envelope ([0bce850](https://github.com/elct9620/kobako/commit/0bce850b3416696e92ae6ee12c353c4c21c8e583))
73
+ * **wire:** carry dispatch over the core envelope with an opaque payload ([556104b](https://github.com/elct9620/kobako/commit/556104bf86fdf481b5368b70af83eb0add4b2708))
74
+ * **wire:** carry the invocation frames over the core envelope ([b6f266a](https://github.com/elct9620/kobako/commit/b6f266a310ff723a1868cff745763d91c0603a5e))
75
+ * **wire:** carry the Outcome over the core envelope ([3fa338e](https://github.com/elct9620/kobako/commit/3fa338e4e03b16c4f25f903f1d45f672ab1d015d))
76
+ * **wire:** carry the Run envelope over the core envelope ([d7c46ab](https://github.com/elct9620/kobako/commit/d7c46ab64e382f5226c780b39c8bb66ee12213ac))
77
+ * **wire:** carry the Yield Reply over the core envelope ([0db7261](https://github.com/elct9620/kobako/commit/0db726189adbc369e32b569cd191861dbba17302))
78
+
79
+
80
+ ### Bug Fixes
81
+
82
+ * **bench:** bound and surface the band the archive widens ([cc2ddd2](https://github.com/elct9620/kobako/commit/cc2ddd213d8f9382c9b7ff20581abd2b171fe486))
83
+ * **bench:** let probe discovery reach any depth ([2a164ca](https://github.com/elct9620/kobako/commit/2a164cab782a51e9d15b522f8a2c340b5f234b9a))
84
+ * **bench:** name only the rows the archive actually sets the bar for ([68e167f](https://github.com/elct9620/kobako/commit/68e167f56c801ad4b9caf7f290824d28f216aec9))
85
+ * **bench:** sample the cold-start row's guest budget instead of observing it once ([95bdadd](https://github.com/elct9620/kobako/commit/95bdadde1f81fb169293c89cbccd460fb0c6e502))
86
+ * **bench:** widen the gate's noise band by what the archive shows ([183407c](https://github.com/elct9620/kobako/commit/183407cfc3854c1179f7c5b7da338d2295526bfc))
87
+ * **build:** rebuild the guest when the fixed tier changes ([037cc2e](https://github.com/elct9620/kobako/commit/037cc2e9451fbf34bd2138abfbc8b9b59fd613cc))
88
+ * **ext:** name the Panic attribution tuple and drop two lint carries ([ab24625](https://github.com/elct9620/kobako/commit/ab24625233c3559c9b3c737182d6614a4e03926b))
89
+ * **guest:** make a parked block and its wire bit one statement ([dba5625](https://github.com/elct9620/kobako/commit/dba5625c541c9b54caa89f5937419ec416ec05a8))
90
+ * **guest:** read a String's bytes instead of rendering it ([de8c238](https://github.com/elct9620/kobako/commit/de8c238e900830f72d374f83d8c8e5b63cef4384))
91
+ * **guest:** refuse text the capability gems cannot read as text ([539045a](https://github.com/elct9620/kobako/commit/539045a80192cc28c23a4bcbebc311c55eb138fb))
92
+ * **payload:** stop claiming a zero-copy decode the args position cannot have ([c56cb9c](https://github.com/elct9620/kobako/commit/c56cb9c30dc727d9ad0510e3f1572c1ab53463d9))
93
+ * **release:** drop the version from a dev-dependency nothing rewrites ([524e536](https://github.com/elct9620/kobako/commit/524e5365448fedb101571a11de546dddebbfbcb6))
94
+ * **sig:** declare the dispatch seam the shape the ext actually calls ([f0de465](https://github.com/elct9620/kobako/commit/f0de46500eda366d3edd7869edcc39d843f4b687))
95
+ * **sig:** drop the Pool method the signature outlived ([35a5b4f](https://github.com/elct9620/kobako/commit/35a5b4ff3e834b157d695819272c2b445f0bb5bf))
96
+ * **tasks:** let a retired anchor hold the ceiling it was assigned ([a9cd51d](https://github.com/elct9620/kobako/commit/a9cd51d2bd454698833024c89c3693b0d73ef505))
97
+ * **wire:** keep the ABI at 3, which no release has shipped ([2b301b7](https://github.com/elct9620/kobako/commit/2b301b777384c0edf79426805cfb1cc08688aa95))
98
+
99
+
100
+ ### Documentation
101
+
102
+ * **customization:** the harness carries no codec until a shell asks ([a9bf10c](https://github.com/elct9620/kobako/commit/a9bf10c20f27f52183932dd149768626d70f31bf))
103
+ * **spec:** separate what a name promises from what the wire promises ([545bfbd](https://github.com/elct9620/kobako/commit/545bfbd59834bab6d564850d9adafa892cbae005))
104
+ * **spec:** speak one word for the arm every envelope answers success on ([f4ef5f5](https://github.com/elct9620/kobako/commit/f4ef5f5c096cb2c5b0153f7a28f7feaf15a405d0))
105
+ * **wire:** move the Reply's fault arm onto the envelope ([3a56e89](https://github.com/elct9620/kobako/commit/3a56e892caea5b2024baeeeff0bcb8b0169e9b16))
106
+
107
+
108
+ ### Code Refactoring
109
+
110
+ * **gem:** follow Ruby's own convention for what an error is called ([b1ce1fe](https://github.com/elct9620/kobako/commit/b1ce1fe994e5123a950ba9b9f64810387822bb46))
111
+ * **guest:** let the shell ask for the codec instead of inheriting it ([abc24d3](https://github.com/elct9620/kobako/commit/abc24d3321c614f36f8c01c932169083796a0915))
112
+ * **guest:** name the payload seam for what it is — a codec ([b5d90e2](https://github.com/elct9620/kobako/commit/b5d90e26cdea1e0048cb44e48c6543a6bad4a592))
113
+ * **guest:** route a dispatch through kobako-core without reading its payload ([62c5791](https://github.com/elct9620/kobako/commit/62c5791eb88b9021b3d60c8a3dd45d5907011214))
114
+ * **mruby:** name each codec method after the position it serves ([e2d4b53](https://github.com/elct9620/kobako/commit/e2d4b53dd2d165d4f6312c8e87a5dd936d2f7a2f))
115
+ * **runtime:** give the engine contract names an implementer can write ([0a41491](https://github.com/elct9620/kobako/commit/0a41491360cf17def8245c0758679e92572b990f))
116
+ * **sdk:** keep the root to what every build of this crate has ([7f93096](https://github.com/elct9620/kobako/commit/7f93096d4371e7e7f70f3b31301fad3a3198184a))
117
+ * **transport:** let every envelope spell its success arm the same way ([df595e0](https://github.com/elct9620/kobako/commit/df595e08097af9e3e0a0c5ed52a4a6f854eb21dc))
118
+ * **transport:** name the core envelope's types after what they carry ([b44de65](https://github.com/elct9620/kobako/commit/b44de6502953826c567d4ef8a594561479f50c1d))
119
+ * **transport:** split the invocation module along the line its doc draws ([4d3a2d3](https://github.com/elct9620/kobako/commit/4d3a2d3060167d71a807e203688186740fd1485b))
120
+ * **wasmtime:** put every cap in one struct, named the way the field is read ([3f57860](https://github.com/elct9620/kobako/commit/3f578608b044d1ade0ae35231266cf3c9e517c02))
121
+ * **wire:** give the fault concept one name on both sides of the boundary ([564798a](https://github.com/elct9620/kobako/commit/564798a9662f547f665530a75d99c73051a79d86))
122
+ * **wire:** keep a Fault to what its author can bound ([141209d](https://github.com/elct9620/kobako/commit/141209df0f5525853462fddcfaf3584ea530038b))
123
+ * **wire:** route every tier through the one envelope ([c5cd33a](https://github.com/elct9620/kobako/commit/c5cd33a5346f49857fa6e1f45c9cf9b9bea0ff77))
124
+
3
125
  ## [0.20.0](https://github.com/elct9620/kobako/compare/v0.19.0...v0.20.0) (2026-07-24)
4
126
 
5
127