kobako 0.22.0 → 0.23.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 771a65c05a0d065db98f2644a978e4f82ab0cedb453f3cb7f6e61aea936be707
4
- data.tar.gz: 330ab0d4762778e9608325be5b6fc737eeb82e0ff1b4d30eeac29ff8fac9902b
3
+ metadata.gz: 93d285d0be6ec4330857d521ca38c6d460b8a28c8692e4c4de6fdca256077f6e
4
+ data.tar.gz: d1b9a96885528582f9ba801c9ca7195c4df918bd98f8d3561f234f09300ff03d
5
5
  SHA512:
6
- metadata.gz: 6fd6084f9566a7f9466f8b58f308914dae445c2ee43ed4cd1ccd721db01d609b99257f404e0ff00ae6e5fb3bbac45e453afc933eb1d3b23210df709ca9914962
7
- data.tar.gz: c113d2ef16f413ad41c4d97cb3d5675d4f2ac151879257ffc9f3d918a27f471667d936c7fe13120d9a78e73ab6fee041700e3bed8f3315c9d680d742213014ac
6
+ metadata.gz: 9f7a2c4833866242cf761ea57b2dbe6537299d3508b80a5bc8a88e680e4513f34ab364726379e7e621e795b64eea5d5bdbeab8420ebbe6a8c7c1f5466a3d7b2f
7
+ data.tar.gz: 2749636ef9b977a8f6009eb2d487d37a55ca50259ec29a672b8438768a97a673a4d106637c727a97adcdd09f9d53e6ce80ad3ebb0995d173f4f58281667647ce
@@ -1 +1 @@
1
- {".":"0.22.0","wasm/kobako-core":"0.14.0","wasm/kobako-mruby":"0.14.0","wasm/kobako-io":"0.14.0","wasm/kobako-json":"0.14.0","wasm/kobako-regexp":"0.14.0","wasm/kobako-baker":"0.14.0","crates/kobako-transport":"0.14.0","crates/kobako-codec":"0.14.0","crates/kobako-runtime":"0.14.0","crates/kobako-wasmtime":"0.14.0","crates/kobako":"0.14.0"}
1
+ {".":"0.23.0","wasm/kobako-core":"0.14.0","wasm/kobako-mruby":"0.14.0","wasm/kobako-io":"0.14.0","wasm/kobako-json":"0.14.0","wasm/kobako-regexp":"0.14.0","wasm/kobako-baker":"0.14.0","crates/kobako-transport":"0.14.0","crates/kobako-codec":"0.14.0","crates/kobako-runtime":"0.14.0","crates/kobako-wasmtime":"0.14.0","crates/kobako":"0.14.0"}
data/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.23.0](https://github.com/elct9620/kobako/compare/v0.22.0...v0.23.0) (2026-08-28)
4
+
5
+
6
+ ### Features
7
+
8
+ * **spec:** declare the boot state two invocations share, and what a callback raise costs ([d94fffc](https://github.com/elct9620/kobako/commit/d94fffc59a3142cb28e0025a0dc8c792f7282074))
9
+ * **spec:** declare the dispatch boundary one observation at a time ([f11b280](https://github.com/elct9620/kobako/commit/f11b280ef503c20d5b75d7b1c4187d261f60ef27))
10
+ * **spec:** declare the guest's pattern surface one observation at a time ([a477818](https://github.com/elct9620/kobako/commit/a477818f8fa505fdcd8ea1fd1051a74c0ba08155))
11
+ * **spec:** declare the Pool's behavior where its tests can claim it ([5ec5e4b](https://github.com/elct9620/kobako/commit/5ec5e4b41f44db05520a251ff6979e71efd27866))
12
+ * **spec:** declare the two descriptors a guest may write to, and how ([c15d09a](https://github.com/elct9620/kobako/commit/c15d09ab563947ab02bbe31129e88686fcff5c24))
13
+ * **spec:** declare the value shapes and the generated concurrency programs ([a06ae5b](https://github.com/elct9620/kobako/commit/a06ae5b24b4615c22c2abaae08c7029218da08bd))
14
+ * **spec:** declare what a Sandbox is built with and what each run leaves behind ([8cc6ac8](https://github.com/elct9620/kobako/commit/8cc6ac81713da7fc6ba6c89bc24da75406579aec))
15
+ * **spec:** declare what installing an Extension composes and resolves ([3cce5a6](https://github.com/elct9620/kobako/commit/3cce5a6551ae8710df71d7520a689c13630ee111))
16
+ * **spec:** declare what the guest's JSON surface reads, writes and refuses ([7e9e3b3](https://github.com/elct9620/kobako/commit/7e9e3b3897ae5f5dc7d6caadeb650302841aa0a6))
17
+ * **spec:** declare what the host checks before a guest runs ([28d5d4b](https://github.com/elct9620/kobako/commit/28d5d4bac0efba2aced1b4449926bd868787bd75))
18
+ * **spec:** declare where a host object becomes a name the guest can reach ([5d88647](https://github.com/elct9620/kobako/commit/5d88647aa922e3a7bb6915864aec700423060358))
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * **gate:** keep the rendered specifications out of the anchor corpus ([1a24c7f](https://github.com/elct9620/kobako/commit/1a24c7ff1367228998b2f21beca885ab7096a893))
24
+ * **gate:** stop reading a sumi claim as an anchor citation ([b3c74d6](https://github.com/elct9620/kobako/commit/b3c74d6a296dfb7fa5e157ca9ba4678097bfab43))
25
+ * **spec:** let the dispatch feature reach the test that witnesses it ([430394f](https://github.com/elct9620/kobako/commit/430394fa906bf79b8d86d28de7b03e32748516a1))
26
+ * **transport:** keep a bound Class's class-level surface off the guest boundary ([dc00355](https://github.com/elct9620/kobako/commit/dc0035524f2a7b3eba3ec378f8f065c19a17660d))
27
+
3
28
  ## [0.22.0](https://github.com/elct9620/kobako/compare/v0.21.1...v0.22.0) (2026-08-06)
4
29
 
5
30
 
data/Cargo.lock CHANGED
@@ -858,7 +858,7 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
858
858
 
859
859
  [[package]]
860
860
  name = "kobako"
861
- version = "0.22.0"
861
+ version = "0.23.0"
862
862
  dependencies = [
863
863
  "kobako-runtime",
864
864
  "kobako-transport",
@@ -1152,18 +1152,18 @@ checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69"
1152
1152
 
1153
1153
  [[package]]
1154
1154
  name = "rb-sys"
1155
- version = "0.9.128"
1155
+ version = "0.9.130"
1156
1156
  source = "registry+https://github.com/rust-lang/crates.io-index"
1157
- checksum = "45ca28513560e56cfb79a62b1fce363c73af170a182024ce880c77ee9429920a"
1157
+ checksum = "02faf625bb10ba893e3ae620f19c9fb1b5f8fcae0fe4eb86bb3f2230fad75edb"
1158
1158
  dependencies = [
1159
1159
  "rb-sys-build",
1160
1160
  ]
1161
1161
 
1162
1162
  [[package]]
1163
1163
  name = "rb-sys-build"
1164
- version = "0.9.128"
1164
+ version = "0.9.130"
1165
1165
  source = "registry+https://github.com/rust-lang/crates.io-index"
1166
- checksum = "ce04b2c55eff3a21aaa623fcc655d94373238e72cac6b3e1a3641ff31649f99a"
1166
+ checksum = "05be6f9c86fe5482808162826f6c047d093b3670582296c770de1d94f8066694"
1167
1167
  dependencies = [
1168
1168
  "bindgen",
1169
1169
  "lazy_static",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "kobako"
3
- version = "0.22.0"
3
+ version = "0.23.0"
4
4
  edition = "2021"
5
5
  authors = ["Aotokitsuruya <contact@aotoki.me>"]
6
6
  license = "Apache-2.0"
@@ -73,15 +73,18 @@ module Kobako
73
73
 
74
74
  private
75
75
 
76
- # Refuse to mint a Capability Handle for a reflective gadget:
77
- # a +Binding+ / +Method+ / +UnboundMethod+ would hand the guest a
78
- # callable proxy onto host reflection (a returned +Binding+ reaches
79
- # +Binding#eval+). Raising here keeps the rule at the single mint
80
- # point, so it holds on both the Service-return and the +#run+
81
- # host→guest auto-wrap paths.
76
+ # Refuse to mint a Capability Handle for an object whose reachable
77
+ # surface is not Service behaviour: a +Binding+ / +Method+ /
78
+ # +UnboundMethod+ hands the guest a callable proxy onto host
79
+ # reflection (a returned +Binding+ reaches +Binding#eval+); a +Class+
80
+ # or +Module+ hands over its class-level API (+File.popen+ / +read+,
81
+ # +Kernel.system+), which the owner-based dispatch floor cannot see
82
+ # because a singleton-class owner matches no core-module list. Raising
83
+ # here keeps the rule at the single mint point, so it holds on both the
84
+ # Service-return and the +#run+ host→guest auto-wrap paths.
82
85
  def reject_unwrappable!(object)
83
86
  case object
84
- when Binding, Method, UnboundMethod
87
+ when Binding, Method, UnboundMethod, Module
85
88
  raise SandboxError, "a #{object.class} cannot cross as a Capability Handle"
86
89
  end
87
90
  end
@@ -47,17 +47,18 @@ module Kobako
47
47
  end
48
48
 
49
49
  # Guard against ambient reflection methods. A public method whose
50
- # owner is a META_OWNERS or GADGET_OWNERS module is rejected, except
51
- # CALLABLE_ALLOW on a gadget target (a bound lambda stays invocable).
52
- # A name with no concrete public method is allowed only when the
53
- # target opts into it via +respond_to?+ (dynamic +method_missing+
54
- # Services), since the dangerous methods are all concretely defined
55
- # and therefore never reach that branch.
50
+ # owner is a META_OWNERS or GADGET_OWNERS module or a singleton
51
+ # class, the owner of every class-level method (+File.popen+ /
52
+ # +Kernel.system+, unreachable via any fixed core-module list) is
53
+ # rejected, except CALLABLE_ALLOW on a gadget target (a bound lambda
54
+ # stays invocable). A name with no concrete public method is allowed
55
+ # only when the target opts into it via +respond_to?+ (dynamic
56
+ # +method_missing+ Services), since the dangerous methods are all
57
+ # concretely defined and therefore never reach that branch.
56
58
  def ambient_refusal(target, name)
57
59
  owner = target.public_method(name).owner
58
- gadget = GADGET_OWNERS.include?(owner)
59
- return nil unless META_OWNERS.include?(owner) || gadget
60
- return nil if gadget && CALLABLE_ALLOW.include?(name)
60
+ return nil unless ambient_owner?(owner, target)
61
+ return nil if GADGET_OWNERS.include?(owner) && CALLABLE_ALLOW.include?(name)
61
62
 
62
63
  "method #{name.inspect} is not a Service method"
63
64
  rescue NameError
@@ -66,6 +67,19 @@ module Kobako
66
67
  "no public method #{name.inspect} on target"
67
68
  end
68
69
 
70
+ # Whether +name+'s +owner+ is ambient surface rather than Service
71
+ # behaviour: a core meta module, a callable gadget type, or — when
72
+ # +target+ is itself a Class or Module bound as a Service — the
73
+ # singleton class that owns its class-level API (+File.popen+ /
74
+ # +Kernel.system+, unreachable via any fixed core-module list). A plain
75
+ # object's own singleton method (+def obj.x+) stays reachable, since
76
+ # +target+ is not a Module there.
77
+ def ambient_owner?(owner, target)
78
+ META_OWNERS.include?(owner) ||
79
+ GADGET_OWNERS.include?(owner) ||
80
+ (target.is_a?(Module) && owner.singleton_class?)
81
+ end
82
+
69
83
  # Consult the target's opt-in narrowing predicate. A bound object may
70
84
  # define a private +respond_to_guest?(name)+ to restrict which of its
71
85
  # methods the guest reaches; a falsy answer refuses the dispatch. It
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kobako
4
- VERSION = "0.22.0"
4
+ VERSION = "0.23.0"
5
5
  end
@@ -9,6 +9,8 @@ module Kobako
9
9
 
10
10
  def self?.ambient_refusal: (untyped target, Symbol name) -> String?
11
11
 
12
+ def self?.ambient_owner?: (Module owner, untyped target) -> bool
13
+
12
14
  def self?.narrowing_refusal: (untyped target, Symbol name) -> String?
13
15
  end
14
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kobako
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.0
4
+ version: 0.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aotokitsuruya