kobako 0.30.0-aarch64-linux → 0.31.0-aarch64-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 (94) hide show
  1. checksums.yaml +4 -4
  2. data/.release-please-manifest.json +1 -1
  3. data/CHANGELOG.md +335 -0
  4. data/README.md +43 -3
  5. data/ROADMAP.md +1 -1
  6. data/crates/kobako-runtime/CHANGELOG.md +219 -0
  7. data/crates/kobako-runtime/README.md +7 -4
  8. data/crates/kobako-transport/CHANGELOG.md +31 -0
  9. data/crates/kobako-transport/README.md +3 -4
  10. data/crates/kobako-wasmtime/CHANGELOG.md +161 -0
  11. data/crates/kobako-wasmtime/README.md +3 -2
  12. data/crates/kobako-wasmtime/wit/deps/cli.wit +233 -0
  13. data/crates/kobako-wasmtime/wit/deps/clocks.wit +162 -0
  14. data/crates/kobako-wasmtime/wit/deps/filesystem.wit +589 -0
  15. data/crates/kobako-wasmtime/wit/deps/http.wit +733 -0
  16. data/crates/kobako-wasmtime/wit/deps/io.wit +299 -0
  17. data/crates/kobako-wasmtime/wit/deps/random.wit +92 -0
  18. data/crates/kobako-wasmtime/wit/deps/sockets.wit +949 -0
  19. data/data/kobako.wasm +0 -0
  20. data/lib/kobako/3.3/kobako.so +0 -0
  21. data/lib/kobako/3.4/kobako.so +0 -0
  22. data/lib/kobako/4.0/kobako.so +0 -0
  23. data/lib/kobako/catalog/extensions.rb +14 -2
  24. data/lib/kobako/catalog/flags.rb +3 -5
  25. data/lib/kobako/catalog/grants.rb +5 -4
  26. data/lib/kobako/catalog/handles.rb +5 -27
  27. data/lib/kobako/catalog/mount.rb +11 -3
  28. data/lib/kobako/catalog/network.rb +35 -0
  29. data/lib/kobako/catalog/replacements.rb +28 -0
  30. data/lib/kobako/catalog/services.rb +5 -19
  31. data/lib/kobako/catalog/snippets.rb +3 -18
  32. data/lib/kobako/catalog.rb +3 -0
  33. data/lib/kobako/codec/{utils.rb → boundary.rb} +4 -2
  34. data/lib/kobako/codec/decoder.rb +4 -4
  35. data/lib/kobako/codec/ext_types.rb +3 -3
  36. data/lib/kobako/codec/handle_walk.rb +3 -43
  37. data/lib/kobako/codec/value_budget.rb +132 -40
  38. data/lib/kobako/codec.rb +1 -1
  39. data/lib/kobako/context.rb +24 -11
  40. data/lib/kobako/errors.rb +15 -12
  41. data/lib/kobako/extension.rb +3 -2
  42. data/lib/kobako/filesystem.rb +9 -2
  43. data/lib/kobako/handle.rb +2 -2
  44. data/lib/kobako/names.rb +28 -0
  45. data/lib/kobako/network.rb +210 -0
  46. data/lib/kobako/outcome.rb +7 -7
  47. data/lib/kobako/pool.rb +45 -23
  48. data/lib/kobako/runtime.rb +3 -2
  49. data/lib/kobako/sandbox.rb +92 -35
  50. data/lib/kobako/sandbox_options.rb +41 -106
  51. data/lib/kobako/transport/argument_wrap.rb +64 -0
  52. data/lib/kobako/transport/block_failure.rb +1 -1
  53. data/lib/kobako/transport/dispatcher.rb +6 -6
  54. data/lib/kobako/transport/exposure.rb +26 -15
  55. data/lib/kobako/transport/reflection.rb +21 -4
  56. data/lib/kobako/transport/run.rb +8 -23
  57. data/lib/kobako/transport/yielder.rb +2 -9
  58. data/lib/kobako/transport.rb +1 -0
  59. data/lib/kobako/version.rb +1 -1
  60. data/lib/kobako.rb +6 -2
  61. data/release-please-config.json +15 -0
  62. data/sig/core/thread.rbs +6 -0
  63. data/sig/kobako/catalog/extensions.rbs +2 -0
  64. data/sig/kobako/catalog/grants.rbs +7 -4
  65. data/sig/kobako/catalog/handles.rbs +0 -2
  66. data/sig/kobako/catalog/mount.rbs +3 -1
  67. data/sig/kobako/catalog/network.rbs +20 -0
  68. data/sig/kobako/catalog/replacements.rbs +14 -0
  69. data/sig/kobako/catalog/services.rbs +0 -4
  70. data/sig/kobako/catalog/snippets.rbs +0 -2
  71. data/sig/kobako/codec/{utils.rbs → boundary.rbs} +2 -2
  72. data/sig/kobako/codec/handle_walk.rbs +0 -6
  73. data/sig/kobako/codec/value_budget.rbs +47 -4
  74. data/sig/kobako/context.rbs +3 -1
  75. data/sig/kobako/errors.rbs +4 -4
  76. data/sig/kobako/filesystem.rbs +21 -3
  77. data/sig/kobako/network.rbs +115 -0
  78. data/sig/kobako/outcome.rbs +1 -1
  79. data/sig/kobako/pool.rbs +7 -3
  80. data/sig/kobako/runtime.rbs +32 -3
  81. data/sig/kobako/sandbox.rbs +19 -2
  82. data/sig/kobako/sandbox_options.rbs +29 -38
  83. data/sig/kobako/transport/argument_wrap.rbs +15 -0
  84. data/sig/kobako/transport/error.rbs +1 -1
  85. data/sig/kobako/transport/exposure.rbs +2 -4
  86. data/sig/kobako/transport/reflection.rbs +10 -0
  87. data/sig/kobako/transport/run.rbs +0 -2
  88. data/sig/kobako/transport/yielder.rbs +0 -3
  89. data/sig/kobako/transport.rbs +1 -1
  90. data/sig/kobako.rbs +13 -0
  91. metadata +23 -9
  92. data/crates/kobako-runtime/tests/linux_baseline/linux-baseline-expected.txt +0 -16
  93. data/lib/kobako/constant_name.rb +0 -8
  94. data/sig/kobako/constant_name.rbs +0 -3
@@ -4,14 +4,21 @@ module Kobako
4
4
 
5
5
  type access = :read | :read_write
6
6
 
7
+ def self.validate_mount: (untyped at, untyped access, untyped filesystem) -> nil
8
+
7
9
  # What a Filesystem written in Ruby answers to be mounted. One that
8
10
  # also answers _Listable lists its directories, and one answering
9
11
  # _Writable takes changes too; each method it lacks is refused alone.
12
+ # One answering _Exclusive vouches only the guest changes it.
10
13
  interface _Readable
11
14
  def open: (String path, Integer flags) -> _File
12
15
  def stat: (String path) -> _Stat
13
16
  end
14
17
 
18
+ interface _Exclusive
19
+ def exclusive?: () -> boolish
20
+ end
21
+
15
22
  interface _Listable
16
23
  def children: (String path) -> Array[String]
17
24
  end
@@ -58,8 +65,9 @@ module Kobako
58
65
 
59
66
  # What a Filesystem written in Ruby's +stat+ answers, as +File::Stat+
60
67
  # does; an +ino+ of zero names no identity. One that also answers
61
- # _StatDevice names the device its +ino+ belongs to, and _StatKind says
62
- # a special file is one.
68
+ # _StatDevice names the device its +ino+ belongs to, _StatKind says a
69
+ # special file is one, _StatTimes gives its times, and _StatLinks its
70
+ # count of names.
63
71
  interface _Stat
64
72
  def directory?: () -> boolish
65
73
  def size: () -> Integer
@@ -74,6 +82,16 @@ module Kobako
74
82
  def ftype: () -> String
75
83
  end
76
84
 
85
+ interface _StatTimes
86
+ def atime: () -> Time
87
+ def mtime: () -> Time
88
+ def ctime: () -> Time
89
+ end
90
+
91
+ interface _StatLinks
92
+ def nlink: () -> Integer
93
+ end
94
+
77
95
  class Tmpfs
78
96
  # A bare <tt>"path" => contents</tt> arrives as keywords, which RBS
79
97
  # cannot key by String; a Symbol keyword past +size+ and +nr_inodes+
@@ -82,7 +100,7 @@ module Kobako
82
100
  end
83
101
 
84
102
  class Bind
85
- def initialize: (String path) -> void
103
+ def initialize: (String path, ?exclusive: bool) -> void
86
104
  end
87
105
 
88
106
  class Overlay
@@ -0,0 +1,115 @@
1
+ module Kobako
2
+ module Network
3
+ type protocol = :http | :tcp | :udp
4
+
5
+ UNWRITTEN: Object
6
+
7
+ def self.normalize_endpoint: (untyped host, untyped port, Hash[Symbol, untyped] written) ->
8
+ [String, Integer, protocol, Array[Symbol | String | IPAddr], Array[HttpRule]]
9
+
10
+ def self.normalize_rule: (bool allow, untyped method, untyped path) -> [bool, String?, String]
11
+
12
+ def self.normalize_credential: (Symbol | String placement, untyped placeholder) -> String
13
+
14
+ def self.validate_name: (String name) -> nil
15
+
16
+ class Mock
17
+ def initialize: (?local_addresses: Array[String]?) -> void
18
+
19
+ def resolve: (String name, to: String | Array[String]) -> nil
20
+
21
+ def route: (String address, Integer port, to: [String, Integer], ?protocol: :tcp | :udp) -> nil
22
+
23
+ def refuse: (String address, Integer port, singleton(SystemCallError) errno, ?protocol: :tcp | :udp) -> nil
24
+
25
+ def hold: [T] (String name) { () -> T } -> T
26
+
27
+ def lookups: () -> Array[String]
28
+
29
+ def dialed_addresses: () -> Array[[String, Integer]]
30
+ end
31
+
32
+ class Endpoint < Data
33
+ attr_reader host: String
34
+ attr_reader port: Integer
35
+ attr_reader protocol: protocol
36
+ attr_reader addresses: Array[Symbol | String | IPAddr]
37
+ attr_reader rules: Array[HttpRule]
38
+
39
+ def self.new: (host: untyped, port: untyped, ?protocol: untyped, ?addresses: untyped, ?rules: untyped) -> Endpoint
40
+
41
+ def initialize: (host: untyped, port: untyped, ?protocol: untyped, ?addresses: untyped, ?rules: untyped) -> void
42
+ end
43
+
44
+ class Connection < Data
45
+ attr_reader host: String
46
+ attr_reader port: Integer
47
+ attr_reader protocol: protocol
48
+
49
+ def self.new: (host: String, port: Integer, protocol: protocol) -> Connection
50
+ end
51
+
52
+ class HttpRule
53
+ @allow: bool
54
+
55
+ def allow?: () -> bool
56
+ attr_reader method: String?
57
+ attr_reader path: String
58
+
59
+ def initialize: (allow: boolish, method: untyped, path: untyped) -> void
60
+ end
61
+
62
+ class Rules
63
+ @rules: Array[HttpRule]
64
+
65
+ def initialize: () -> void
66
+
67
+ def allow: (untyped method, untyped path) -> self
68
+
69
+ def deny: (untyped method, untyped path) -> self
70
+
71
+ def to_a: () -> Array[HttpRule]
72
+ end
73
+
74
+ class Credential
75
+ @source: ^(Request) -> String?
76
+
77
+ attr_reader placement: Symbol | String
78
+ attr_reader placeholder: String
79
+
80
+ def initialize: (Symbol | String placement, placeholder: untyped) ?{ (Request) -> String? } -> void
81
+
82
+ def value: (Request request) -> String?
83
+ end
84
+
85
+ class Request
86
+ attr_reader host: String
87
+ attr_reader port: Integer
88
+ attr_reader method: String
89
+ attr_reader scheme: String
90
+ attr_reader path: String
91
+ attr_reader header_names: Array[String]
92
+
93
+ def initialize: ([String, Integer] authority, String method, String scheme, String path, Array[String] header_names) -> void
94
+ end
95
+
96
+ class Builder
97
+ HOOKS: Array[Symbol]
98
+
99
+ @entry: untyped
100
+ @endpoints: Array[Endpoint]
101
+ @policies: Hash[Symbol, Array[^(untyped) -> boolish]]
102
+ @credentials: Array[Credential]
103
+
104
+ def initialize: (?untyped entry) -> void
105
+
106
+ def credential: (Symbol | String placement, placeholder: untyped) ?{ (Request) -> String? } -> self
107
+
108
+ def endpoint: (untyped host, port: untyped, ?protocol: untyped, ?addresses: untyped) ?{ (Rules) -> void } -> self
109
+
110
+ def policy: (Symbol hook) ?{ (untyped) -> boolish } -> self
111
+
112
+ def to_native: () -> [untyped, Array[Endpoint], Array[Credential], Hash[Symbol, Array[^(untyped) -> boolish]]]
113
+ end
114
+ end
115
+ end
@@ -12,7 +12,7 @@ module Kobako
12
12
 
13
13
  def self.panic_error: (panic_fields panic, Symbol? entrypoint) -> (SandboxError | ServiceError)
14
14
 
15
- def self.error_class: (String origin, String klass) -> (singleton(SandboxError) | singleton(ServiceError))
15
+ def self.error_class: (String origin, String class_name) -> (singleton(SandboxError) | singleton(ServiceError))
16
16
 
17
17
  def self.decode_value: (String payload) -> Kobako::Codec::wire_value
18
18
 
data/sig/kobako/pool.rbs CHANGED
@@ -2,7 +2,9 @@ module Kobako
2
2
  class Pool
3
3
  DEFAULT_CHECKOUT_TIMEOUT_SECONDS: Float
4
4
 
5
- @slots: Integer
5
+ DEPRECATION: String
6
+
7
+ @size: Integer
6
8
  @checkout_timeout: Float?
7
9
  @sandbox_options: Hash[Symbol, untyped]
8
10
  @setup: ^(Kobako::Sandbox) -> void | nil
@@ -12,7 +14,7 @@ module Kobako
12
14
  @slot_freed: Thread::ConditionVariable
13
15
 
14
16
  def initialize: (
15
- slots: Integer,
17
+ size: Integer,
16
18
  ?checkout_timeout: (Float | Integer)?,
17
19
  **untyped sandbox_options
18
20
  ) ?{ (Kobako::Sandbox) -> void } -> void
@@ -29,13 +31,15 @@ module Kobako
29
31
 
30
32
  def construct_slot: () -> Kobako::Sandbox
31
33
 
34
+ def build_slot: () -> Kobako::Sandbox
35
+
32
36
  def checkin: (Kobako::Sandbox sandbox) -> void
33
37
 
34
38
  def release_capacity: () -> void
35
39
 
36
40
  def monotonic_now: () -> Float
37
41
 
38
- def validate_slots: (untyped slots) -> void
42
+ def validate_size: (untyped size) -> void
39
43
 
40
44
  def normalize_checkout_timeout: ((Float | Integer)? checkout_timeout) -> Float?
41
45
  end
@@ -2,7 +2,32 @@ module Kobako
2
2
  class Runtime
3
3
  def self.default_path: () -> String
4
4
 
5
- def self.validate_mount: (untyped at, untyped access, untyped filesystem) -> nil
5
+ def self.default_options: () -> {
6
+ timeout: Float?,
7
+ setup_timeout: Float?,
8
+ memory_limit: Integer?,
9
+ stdout_limit: Integer?,
10
+ stderr_limit: Integer?,
11
+ open_file_limit: Integer?,
12
+ open_connection_limit: Integer?,
13
+ connection_limit: Integer?,
14
+ profile: Symbol,
15
+ gvl: Symbol,
16
+ network: nil
17
+ }
18
+
19
+ def self.normalize_caps: (Hash[Symbol, untyped] caps) -> {
20
+ timeout: Float?,
21
+ setup_timeout: Float?,
22
+ memory_limit: Integer?,
23
+ stdout_limit: Integer?,
24
+ stderr_limit: Integer?,
25
+ open_file_limit: Integer?,
26
+ open_connection_limit: Integer?,
27
+ connection_limit: Integer?
28
+ }
29
+
30
+ def self.value_budget_of: (Integer? memory_limit) -> Integer?
6
31
 
7
32
  def self.from_path: (
8
33
  String path,
@@ -12,15 +37,19 @@ module Kobako
12
37
  stdout_limit: Integer?,
13
38
  stderr_limit: Integer?,
14
39
  open_file_limit: Integer?,
40
+ open_connection_limit: Integer?,
41
+ connection_limit: Integer?,
15
42
  profile: Symbol,
16
- gvl: Symbol
43
+ gvl: Symbol,
44
+ network: Network::Mock?
17
45
  ) -> Runtime
18
46
 
19
47
  type setup = [
20
48
  Array[String],
21
49
  Array[Kobako::Catalog::Snippets::tuple],
22
50
  Array[Kobako::Catalog::Flags::tuple],
23
- Array[Kobako::Catalog::Mount::tuple]
51
+ Array[Kobako::Catalog::Mount::tuple],
52
+ Array[Kobako::Catalog::Network::tuple]
24
53
  ]
25
54
 
26
55
  def eval: (Kobako::Transport::dispatch_proc dispatch, setup setup, String source) -> Kobako::Snapshot
@@ -12,11 +12,14 @@ module Kobako
12
12
  def stdout_limit: () -> Integer?
13
13
  def stderr_limit: () -> Integer?
14
14
  def open_file_limit: () -> Integer?
15
+ def open_connection_limit: () -> Integer?
16
+ def connection_limit: () -> Integer?
15
17
  def profile: () -> Symbol
16
18
  def gvl: () -> Symbol
17
19
 
18
- # Every keyword beyond wasm_path forwards verbatim to
19
- # SandboxOptions.new (the caps + the profile floor).
20
+ # Every keyword beyond wasm_path lands on the runtime's defaults for
21
+ # SandboxOptions.new; the runtime judges the profile, the mode, and the
22
+ # floor.
20
23
  def initialize: (
21
24
  ?wasm_path: String?,
22
25
  **untyped options
@@ -28,6 +31,8 @@ module Kobako
28
31
 
29
32
  def mount: (String at, Kobako::Filesystem::mountable filesystem, ?access: Kobako::Filesystem::access) ?{ (String path, Kobako::Filesystem::access access) -> boolish } -> Kobako::Sandbox
30
33
 
34
+ def network: (Symbol | String name, ?untyped entry) ?{ (Kobako::Network::Builder) -> void } -> Kobako::Sandbox
35
+
31
36
  def preload: (code: String, name: Symbol | String) -> Kobako::Sandbox
32
37
  | (binary: String) -> Kobako::Sandbox
33
38
 
@@ -45,6 +50,18 @@ module Kobako
45
50
 
46
51
  def refuse_once_invoked: (String verb) -> void
47
52
 
53
+ def seal: (String reason) -> String
54
+
48
55
  def begin_invocation: () -> Kobako::Context
56
+
57
+ def warn_release_on_main_thread: () -> void
58
+
59
+ module MainThreadRelease
60
+ MESSAGE: String
61
+
62
+ self.@warned: bool
63
+
64
+ def self.warn_once: () -> void
65
+ end
49
66
  end
50
67
  end
@@ -1,45 +1,43 @@
1
1
  module Kobako
2
2
  class SandboxOptions < Data
3
- DEFAULT_TIMEOUT_SECONDS: Float
4
- DEFAULT_SETUP_TIMEOUT_SECONDS: Float
5
- DEFAULT_MEMORY_LIMIT: Integer
6
- DEFAULT_OUTPUT_LIMIT: Integer
7
- DEFAULT_OPEN_FILE_LIMIT: Integer
8
- DEFAULT_PROFILE: Symbol
9
- PROFILES: Array[Symbol]
10
- GVL_MODES: Array[Symbol]
11
- DEFAULT_GVL: Symbol
12
- VALUE_BYTES: Integer
13
-
14
3
  attr_reader timeout: Float?
15
4
  attr_reader setup_timeout: Float?
16
5
  attr_reader memory_limit: Integer?
17
6
  attr_reader stdout_limit: Integer?
18
7
  attr_reader stderr_limit: Integer?
19
8
  attr_reader open_file_limit: Integer?
9
+ attr_reader open_connection_limit: Integer?
10
+ attr_reader connection_limit: Integer?
20
11
  attr_reader profile: Symbol
21
12
  attr_reader gvl: Symbol
13
+ attr_reader network: Network::Mock?
22
14
 
23
15
  def self.new: (
24
- ?timeout: (Float | Integer)?,
25
- ?setup_timeout: (Float | Integer)?,
26
- ?memory_limit: Integer?,
27
- ?stdout_limit: Integer?,
28
- ?stderr_limit: Integer?,
29
- ?open_file_limit: Integer?,
30
- ?profile: Symbol,
31
- ?gvl: Symbol
16
+ timeout: (Float | Integer)?,
17
+ setup_timeout: (Float | Integer)?,
18
+ memory_limit: Integer?,
19
+ stdout_limit: Integer?,
20
+ stderr_limit: Integer?,
21
+ open_file_limit: Integer?,
22
+ open_connection_limit: Integer?,
23
+ connection_limit: Integer?,
24
+ profile: Symbol,
25
+ gvl: Symbol,
26
+ network: Network::Mock?
32
27
  ) -> SandboxOptions
33
28
 
34
29
  def initialize: (
35
- ?timeout: (Float | Integer)?,
36
- ?setup_timeout: (Float | Integer)?,
37
- ?memory_limit: Integer?,
38
- ?stdout_limit: Integer?,
39
- ?stderr_limit: Integer?,
40
- ?open_file_limit: Integer?,
41
- ?profile: Symbol,
42
- ?gvl: Symbol
30
+ timeout: (Float | Integer)?,
31
+ setup_timeout: (Float | Integer)?,
32
+ memory_limit: Integer?,
33
+ stdout_limit: Integer?,
34
+ stderr_limit: Integer?,
35
+ open_file_limit: Integer?,
36
+ open_connection_limit: Integer?,
37
+ connection_limit: Integer?,
38
+ profile: Symbol,
39
+ gvl: Symbol,
40
+ network: Network::Mock?
43
41
  ) -> void
44
42
 
45
43
  def to_h: () -> {
@@ -49,20 +47,13 @@ module Kobako
49
47
  stdout_limit: Integer?,
50
48
  stderr_limit: Integer?,
51
49
  open_file_limit: Integer?,
50
+ open_connection_limit: Integer?,
51
+ connection_limit: Integer?,
52
52
  profile: Symbol,
53
- gvl: Symbol
53
+ gvl: Symbol,
54
+ network: Network::Mock?
54
55
  }
55
56
 
56
57
  def value_budget: () -> Integer?
57
-
58
- def enforce_floor: (Symbol declared) -> void
59
-
60
- private
61
-
62
- def normalize_timeout: ((Float | Integer)? timeout, String name) -> Float?
63
-
64
- def normalize_limit: (Integer? limit, String name) -> Integer?
65
-
66
- def normalize_choice: (untyped value, Array[Symbol] choices, String name) -> Symbol
67
58
  end
68
59
  end
@@ -0,0 +1,15 @@
1
+ module Kobako
2
+ module Transport
3
+ module ArgumentWrap
4
+ def self.wrap: (untyped value, Kobako::Codec::_HandleTable handles, ?Integer depth) -> untyped
5
+
6
+ private
7
+
8
+ def self.refuse_past_nesting: (Integer depth) -> void
9
+
10
+ def self.wrap_leaf: (untyped value, Kobako::Codec::_HandleTable handles) -> untyped
11
+
12
+ def self.wrap_hash: (Hash[untyped, untyped] hash, Kobako::Codec::_HandleTable handles, Integer depth) -> Hash[untyped, untyped]
13
+ end
14
+ end
15
+ end
@@ -7,7 +7,7 @@ module Kobako
7
7
  String message,
8
8
  ?diagnostic: String?,
9
9
  ?origin: String?,
10
- ?klass: String?,
10
+ ?class_name: String?,
11
11
  ?backtrace_lines: Array[String]?
12
12
  ) -> void
13
13
 
@@ -2,10 +2,6 @@ module Kobako
2
2
  module Transport
3
3
  class Exposure < Data
4
4
  PREDICATE: Symbol
5
- CLASS_OF: UnboundMethod
6
- SINGLETON_CLASS_OF: UnboundMethod
7
- SINGLETON_METHODS: UnboundMethod
8
- PRIVATE_METHODS: UnboundMethod
9
5
  CALLABLE: Set[Symbol]
10
6
  NOTHING: Set[Symbol]
11
7
 
@@ -17,6 +13,8 @@ module Kobako
17
13
 
18
14
  def self.of: (untyped object, ?Hash[Module, Set[Symbol]] surfaces) -> Exposure
19
15
 
16
+ def self.refused_class_of: (untyped object) -> Module?
17
+
20
18
  def initialize: (object: untyped, names: Set[Symbol]?) -> void
21
19
 
22
20
  def with: (?object: untyped, ?names: Set[Symbol]?) -> Exposure
@@ -3,6 +3,14 @@ module Kobako
3
3
  module Reflection
4
4
  GADGET_OWNERS: Array[Module]
5
5
  CALLABLE_ALLOW: Array[Symbol]
6
+ CLASS_OF: UnboundMethod
7
+ IS_A: UnboundMethod
8
+ SINGLETON_CLASS_OF: UnboundMethod
9
+ SINGLETON_METHODS: UnboundMethod
10
+ PRIVATE_METHODS: UnboundMethod
11
+ RESPOND_TO: UnboundMethod
12
+ PUBLIC_SEND: UnboundMethod
13
+ SEND: UnboundMethod
6
14
 
7
15
  def self.refusal: (Kobako::Transport::Exposure exposure, Symbol name) -> String?
8
16
 
@@ -24,6 +32,8 @@ module Kobako
24
32
 
25
33
  def self.lookup_class: (untyped target) -> Module
26
34
 
35
+ def self.module?: (untyped target) -> bool
36
+
27
37
  def self.ambient_owner?: (Module owner, untyped target) -> bool
28
38
  end
29
39
  end
@@ -13,8 +13,6 @@ module Kobako
13
13
 
14
14
  private
15
15
 
16
- def normalize_entrypoint: (Symbol | String target) -> Symbol
17
-
18
16
  def validate_args: (Array[untyped] args) -> void
19
17
 
20
18
  def validate_kwargs: (Hash[untyped, untyped] kwargs) -> void
@@ -5,7 +5,6 @@ module Kobako
5
5
  @break_tag: Symbol
6
6
  @handles: Kobako::Codec::_HandleTable
7
7
  @failure: Kobako::Transport::BlockFailure
8
- @active: bool
9
8
 
10
9
  def initialize: (Kobako::Transport::_GuestYielder guest_yielder, Symbol break_tag, Kobako::Codec::_HandleTable handles, Kobako::Transport::BlockFailure failure) -> void
11
10
 
@@ -13,8 +12,6 @@ module Kobako
13
12
 
14
13
  def to_proc: () -> Proc
15
14
 
16
- def invalidate: () -> void
17
-
18
15
  private
19
16
 
20
17
  def encode_args: (Array[untyped] args) -> String
@@ -2,7 +2,7 @@ module Kobako
2
2
  module Transport
3
3
  # The guest re-entry callable a dispatch hands to a Yielder: invoked
4
4
  # with the encoded yield args, it returns the decoded Yield Reply as an
5
- # +[arm, body, klass]+ triple.
5
+ # +[arm, body, class_name]+ triple.
6
6
  # The ext's Kobako::GuestYielder is the production conformer;
7
7
  # modelled structurally so the Transport layer needs no upward
8
8
  # dependency on Runtime.
data/sig/kobako.rbs CHANGED
@@ -1,2 +1,15 @@
1
1
  module Kobako
2
+ def self.to_name: (untyped name, String what) -> String
3
+
4
+ def self.to_constant_name: (untyped name, String what) -> Symbol
5
+
6
+ def self.constant_name?: (String name) -> bool
7
+
8
+ def self.constant_path?: (String path) -> bool
9
+
10
+ def self.reserved_path?: (String path) -> bool
11
+
12
+ def self.paths_collide?: (String path, String bound) -> bool
13
+
14
+ def self.max_handle_id: () -> Integer
2
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kobako
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.30.0
4
+ version: 0.31.0
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Aotokitsuruya
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-11-07 00:00:00.000000000 Z
11
+ date: 2026-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 1.8.2
19
+ version: 1.8.6
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '2'
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 1.8.2
29
+ version: 1.8.6
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '2'
@@ -47,12 +47,18 @@ files:
47
47
  - SECURITY.md
48
48
  - crates/kobako-runtime/CHANGELOG.md
49
49
  - crates/kobako-runtime/README.md
50
- - crates/kobako-runtime/tests/linux_baseline/linux-baseline-expected.txt
51
50
  - crates/kobako-transport/CHANGELOG.md
52
51
  - crates/kobako-transport/README.md
53
52
  - crates/kobako-wasmtime/CHANGELOG.md
54
53
  - crates/kobako-wasmtime/README.md
55
54
  - crates/kobako-wasmtime/src/preview1/testsuite-expected.txt
55
+ - crates/kobako-wasmtime/wit/deps/cli.wit
56
+ - crates/kobako-wasmtime/wit/deps/clocks.wit
57
+ - crates/kobako-wasmtime/wit/deps/filesystem.wit
58
+ - crates/kobako-wasmtime/wit/deps/http.wit
59
+ - crates/kobako-wasmtime/wit/deps/io.wit
60
+ - crates/kobako-wasmtime/wit/deps/random.wit
61
+ - crates/kobako-wasmtime/wit/deps/sockets.wit
56
62
  - crates/kobako-wasmtime/witx/typenames.witx
57
63
  - crates/kobako-wasmtime/witx/wasi_snapshot_preview1.witx
58
64
  - data/kobako.wasm
@@ -67,9 +73,12 @@ files:
67
73
  - lib/kobako/catalog/grants.rb
68
74
  - lib/kobako/catalog/handles.rb
69
75
  - lib/kobako/catalog/mount.rb
76
+ - lib/kobako/catalog/network.rb
77
+ - lib/kobako/catalog/replacements.rb
70
78
  - lib/kobako/catalog/services.rb
71
79
  - lib/kobako/catalog/snippets.rb
72
80
  - lib/kobako/codec.rb
81
+ - lib/kobako/codec/boundary.rb
73
82
  - lib/kobako/codec/decoder.rb
74
83
  - lib/kobako/codec/encoder.rb
75
84
  - lib/kobako/codec/error.rb
@@ -77,15 +86,15 @@ files:
77
86
  - lib/kobako/codec/handle_walk.rb
78
87
  - lib/kobako/codec/nesting.rb
79
88
  - lib/kobako/codec/state.rb
80
- - lib/kobako/codec/utils.rb
81
89
  - lib/kobako/codec/value_budget.rb
82
- - lib/kobako/constant_name.rb
83
90
  - lib/kobako/context.rb
84
91
  - lib/kobako/errors.rb
85
92
  - lib/kobako/execution.rb
86
93
  - lib/kobako/extension.rb
87
94
  - lib/kobako/filesystem.rb
88
95
  - lib/kobako/handle.rb
96
+ - lib/kobako/names.rb
97
+ - lib/kobako/network.rb
89
98
  - lib/kobako/outcome.rb
90
99
  - lib/kobako/payload.rb
91
100
  - lib/kobako/payload/arguments.rb
@@ -97,6 +106,7 @@ files:
97
106
  - lib/kobako/snippet/bytecode.rb
98
107
  - lib/kobako/snippet/source.rb
99
108
  - lib/kobako/transport.rb
109
+ - lib/kobako/transport/argument_wrap.rb
100
110
  - lib/kobako/transport/block_failure.rb
101
111
  - lib/kobako/transport/call.rb
102
112
  - lib/kobako/transport/dispatcher.rb
@@ -109,6 +119,7 @@ files:
109
119
  - lib/kobako/usage.rb
110
120
  - lib/kobako/version.rb
111
121
  - release-please-config.json
122
+ - sig/core/thread.rbs
112
123
  - sig/kobako.rbs
113
124
  - sig/kobako/capture.rbs
114
125
  - sig/kobako/catalog.rbs
@@ -117,9 +128,12 @@ files:
117
128
  - sig/kobako/catalog/grants.rbs
118
129
  - sig/kobako/catalog/handles.rbs
119
130
  - sig/kobako/catalog/mount.rbs
131
+ - sig/kobako/catalog/network.rbs
132
+ - sig/kobako/catalog/replacements.rbs
120
133
  - sig/kobako/catalog/services.rbs
121
134
  - sig/kobako/catalog/snippets.rbs
122
135
  - sig/kobako/codec.rbs
136
+ - sig/kobako/codec/boundary.rbs
123
137
  - sig/kobako/codec/decoder.rbs
124
138
  - sig/kobako/codec/encoder.rbs
125
139
  - sig/kobako/codec/error.rbs
@@ -127,9 +141,7 @@ files:
127
141
  - sig/kobako/codec/handle_walk.rbs
128
142
  - sig/kobako/codec/nesting.rbs
129
143
  - sig/kobako/codec/state.rbs
130
- - sig/kobako/codec/utils.rbs
131
144
  - sig/kobako/codec/value_budget.rbs
132
- - sig/kobako/constant_name.rbs
133
145
  - sig/kobako/context.rbs
134
146
  - sig/kobako/errors.rbs
135
147
  - sig/kobako/execution.rbs
@@ -137,6 +149,7 @@ files:
137
149
  - sig/kobako/filesystem.rbs
138
150
  - sig/kobako/guest_yielder.rbs
139
151
  - sig/kobako/handle.rbs
152
+ - sig/kobako/network.rbs
140
153
  - sig/kobako/outcome.rbs
141
154
  - sig/kobako/payload.rbs
142
155
  - sig/kobako/payload/arguments.rbs
@@ -149,6 +162,7 @@ files:
149
162
  - sig/kobako/snippet/bytecode.rbs
150
163
  - sig/kobako/snippet/source.rbs
151
164
  - sig/kobako/transport.rbs
165
+ - sig/kobako/transport/argument_wrap.rbs
152
166
  - sig/kobako/transport/block_failure.rbs
153
167
  - sig/kobako/transport/call.rbs
154
168
  - sig/kobako/transport/dispatcher.rbs