kobako 0.29.0-aarch64-linux → 0.30.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 (74) hide show
  1. checksums.yaml +4 -4
  2. data/.release-please-manifest.json +1 -1
  3. data/CHANGELOG.md +217 -10
  4. data/README.md +96 -574
  5. data/ROADMAP.md +2 -1
  6. data/crates/kobako-runtime/CHANGELOG.md +269 -1
  7. data/crates/kobako-runtime/README.md +7 -3
  8. data/crates/kobako-runtime/tests/linux_baseline/linux-baseline-expected.txt +16 -0
  9. data/crates/kobako-transport/CHANGELOG.md +8 -2
  10. data/crates/kobako-transport/README.md +6 -5
  11. data/crates/kobako-wasmtime/CHANGELOG.md +154 -8
  12. data/crates/kobako-wasmtime/README.md +9 -5
  13. data/crates/kobako-wasmtime/src/preview1/testsuite-expected.txt +6 -0
  14. data/crates/kobako-wasmtime/witx/typenames.witx +750 -0
  15. data/crates/kobako-wasmtime/witx/wasi_snapshot_preview1.witx +441 -0
  16. data/data/kobako.wasm +0 -0
  17. data/lib/kobako/3.3/kobako.so +0 -0
  18. data/lib/kobako/3.4/kobako.so +0 -0
  19. data/lib/kobako/4.0/kobako.so +0 -0
  20. data/lib/kobako/catalog/extensions.rb +5 -5
  21. data/lib/kobako/catalog/flags.rb +2 -2
  22. data/lib/kobako/catalog/handles.rb +6 -6
  23. data/lib/kobako/catalog/mount.rb +2 -10
  24. data/lib/kobako/catalog/services.rb +2 -2
  25. data/lib/kobako/catalog/snippets.rb +7 -7
  26. data/lib/kobako/catalog.rb +1 -1
  27. data/lib/kobako/codec/decoder.rb +10 -10
  28. data/lib/kobako/codec/ext_types.rb +3 -5
  29. data/lib/kobako/codec/handle_walk.rb +4 -6
  30. data/lib/kobako/codec/nesting.rb +7 -7
  31. data/lib/kobako/codec/utils.rb +1 -1
  32. data/lib/kobako/codec/value_budget.rb +3 -3
  33. data/lib/kobako/context.rb +5 -5
  34. data/lib/kobako/filesystem.rb +44 -13
  35. data/lib/kobako/payload/arguments.rb +2 -2
  36. data/lib/kobako/pool.rb +4 -4
  37. data/lib/kobako/sandbox.rb +28 -28
  38. data/lib/kobako/sandbox_options.rb +2 -3
  39. data/lib/kobako/snippet/bytecode.rb +1 -1
  40. data/lib/kobako/snippet/source.rb +1 -1
  41. data/lib/kobako/transport/dispatcher.rb +5 -5
  42. data/lib/kobako/transport/exposure.rb +2 -2
  43. data/lib/kobako/transport/reflection.rb +7 -7
  44. data/lib/kobako/transport/run.rb +5 -5
  45. data/lib/kobako/transport/yielder.rb +1 -1
  46. data/lib/kobako/version.rb +1 -1
  47. data/lib/kobako.rb +34 -0
  48. data/release-please-config.json +1 -0
  49. data/sig/kobako/catalog/extensions.rbs +3 -3
  50. data/sig/kobako/catalog/handles.rbs +3 -3
  51. data/sig/kobako/catalog/mount.rbs +0 -4
  52. data/sig/kobako/catalog/services.rbs +1 -1
  53. data/sig/kobako/catalog/snippets.rbs +3 -3
  54. data/sig/kobako/catalog.rbs +1 -1
  55. data/sig/kobako/codec/decoder.rbs +1 -1
  56. data/sig/kobako/codec/handle_walk.rbs +1 -1
  57. data/sig/kobako/codec/nesting.rbs +2 -2
  58. data/sig/kobako/codec/utils.rbs +1 -1
  59. data/sig/kobako/codec/value_budget.rbs +1 -1
  60. data/sig/kobako/codec.rbs +1 -2
  61. data/sig/kobako/context.rbs +1 -1
  62. data/sig/kobako/filesystem.rbs +19 -14
  63. data/sig/kobako/guest_yielder.rbs +1 -1
  64. data/sig/kobako/payload/arguments.rbs +1 -1
  65. data/sig/kobako/pool.rbs +2 -2
  66. data/sig/kobako/runtime.rbs +1 -1
  67. data/sig/kobako/sandbox.rbs +3 -5
  68. data/sig/kobako/sandbox_options.rbs +1 -1
  69. data/sig/kobako/transport/dispatcher.rbs +2 -2
  70. data/sig/kobako/transport/exposure.rbs +1 -1
  71. data/sig/kobako/transport/reflection.rbs +2 -2
  72. data/sig/kobako/transport/run.rbs +3 -3
  73. data/sig/kobako/transport.rbs +1 -1
  74. metadata +6 -2
data/lib/kobako.rb CHANGED
@@ -1,5 +1,39 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Inside +lib/+, the code sits in tiers: a tier may use the tiers below it
4
+ # and never one above.
5
+ #
6
+ # Orchestration Sandbox, Pool, Runtime (+ ext), Context
7
+ # |
8
+ # Catalog setup-time registries + the per-invocation Handle table
9
+ # |
10
+ # Transport --+ call value objects + dispatch
11
+ # Outcome ----+ guest-result attribution
12
+ # | |
13
+ # Payload <---+ the [args, kwargs] shape a Call or Run carries
14
+ # | |
15
+ # Codec <-----+ byte-level payload wire
16
+ # |
17
+ # Root dependency-free value objects and error classes
18
+ #
19
+ # The Envelope has no tier here, because the native side frames and
20
+ # decodes it.
21
+ #
22
+ # These rules keep the tiers acyclic:
23
+ #
24
+ # [A type sits at the lowest tier that needs it]
25
+ # Kobako::Handle sits at the root, for Codec.
26
+ # [A native-defined handle that needs nothing in +lib/+ sits at the root]
27
+ # Kobako::Filesystem sits at the root, for the Catalog.
28
+ # [Outcome may require <tt>transport/error.rb</tt>]
29
+ # The gem contract fixes the class name.
30
+ # [<tt>Codec.track_handles</tt> wraps only the decode call]
31
+ # Wrapping more leaks its flag into re-entry.
32
+ #
33
+ # Namespace follows dependency direction, not which tier reads a type most.
34
+ # Kobako::Transport::Error stays in Transport despite the lateral edge from
35
+ # Outcome, because its file depends only on the root <tt>errors.rb</tt>.
36
+
3
37
  require_relative "kobako/version"
4
38
 
5
39
  begin
@@ -2,6 +2,7 @@
2
2
  "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3
3
  "release-type": "ruby",
4
4
  "bump-minor-pre-major": true,
5
+ "commit-search-depth": 1000,
5
6
  "last-release-sha": "98509af508988f708bf0d7a76a718bb0428a177e",
6
7
  "packages": {
7
8
  ".": {
@@ -5,17 +5,17 @@ module Kobako
5
5
 
6
6
  def install: (untyped extension, snippets: Kobako::Catalog::Snippets, services: Kobako::Catalog::Services) -> self
7
7
 
8
- def assert_dependencies!: () -> self
8
+ def assert_dependencies: () -> self
9
9
 
10
10
  def resolve: () -> Hash[String, untyped]
11
11
 
12
12
  private
13
13
 
14
- def install_object: (untyped backend) -> untyped
14
+ def object_of: (untyped backend) -> untyped
15
15
 
16
16
  def resolve_backend: (untyped extension, Hash[String, untyped] resolved, Hash[untyped, untyped] by_provider) -> void
17
17
 
18
- def validate!: (untyped extension) -> void
18
+ def validate: (untyped extension) -> void
19
19
 
20
20
  def unmet_dependency: () -> [untyped, untyped]?
21
21
 
@@ -13,11 +13,11 @@ module Kobako
13
13
 
14
14
  private
15
15
 
16
- def reject_unwrappable!: (untyped object) -> void
16
+ def reject_unwrappable: (untyped object) -> void
17
17
 
18
- def ensure_capacity!: () -> void
18
+ def ensure_capacity: () -> void
19
19
 
20
- def require_bound!: (Integer id) -> void
20
+ def require_bound: (Integer id) -> void
21
21
  end
22
22
  end
23
23
  end
@@ -19,10 +19,6 @@ module Kobako
19
19
  def conflict: (Mount other) -> String?
20
20
 
21
21
  def to_native: () -> tuple
22
-
23
- private
24
-
25
- def nested?: (String other) -> bool
26
22
  end
27
23
  end
28
24
  end
@@ -15,7 +15,7 @@ module Kobako
15
15
 
16
16
  private
17
17
 
18
- def validate_path!: (Symbol | String path) -> String
18
+ def validate_path: (Symbol | String path) -> String
19
19
 
20
20
  def reserved?: (String path) -> bool
21
21
 
@@ -15,11 +15,11 @@ module Kobako
15
15
 
16
16
  private
17
17
 
18
- def register_source!: (String? code, (Symbol | String)? name) -> nil
18
+ def register_source: (String? code, (Symbol | String)? name) -> nil
19
19
 
20
- def ensure_source_args!: (String? code, (Symbol | String)? name) -> [String, Symbol | String]
20
+ def ensure_source_args: (String? code, (Symbol | String)? name) -> [String, Symbol | String]
21
21
 
22
- def register_binary!: (String bytes) -> nil
22
+ def register_binary: (String bytes) -> nil
23
23
 
24
24
  def entry_tuple: (entry) -> tuple
25
25
 
@@ -1,5 +1,5 @@
1
1
  module Kobako
2
2
  module Catalog
3
- def self.to_utf8!: (String text, String what) -> String
3
+ def self.to_utf8: (String text, String what) -> String
4
4
  end
5
5
  end
@@ -6,7 +6,7 @@ module Kobako
6
6
 
7
7
  private
8
8
 
9
- def self.validate_utf8!: (untyped value) -> void
9
+ def self.validate_utf8: (untyped value) -> void
10
10
  end
11
11
  end
12
12
  end
@@ -11,7 +11,7 @@ module Kobako
11
11
 
12
12
  private
13
13
 
14
- def self.guard_nesting!: (Integer depth) -> void
14
+ def self.guard_nesting: (Integer depth) -> void
15
15
 
16
16
  def self.deep_wrap_hash: (Hash[untyped, untyped] hash, Kobako::Codec::_HandleTable handles, Integer depth) -> Hash[untyped, untyped]
17
17
 
@@ -1,9 +1,9 @@
1
1
  module Kobako
2
2
  module Codec
3
3
  module Nesting
4
- def self.assert_within_bound!: (untyped value, ?Integer depth) -> void
4
+ def self.assert_within_bound: (untyped value, ?Integer depth) -> void
5
5
 
6
- def self.assert_members_within_bound!: (Array[untyped] members, Integer depth) -> void
6
+ def self.assert_members_within_bound: (Array[untyped] members, Integer depth) -> void
7
7
  end
8
8
  end
9
9
  end
@@ -1,7 +1,7 @@
1
1
  module Kobako
2
2
  module Codec
3
3
  module Utils
4
- def self.assert_utf8!: (String string, String label) -> void
4
+ def self.assert_utf8: (String string, String label) -> void
5
5
 
6
6
  def self.with_boundary: [T] () { () -> T } -> T
7
7
  end
@@ -9,7 +9,7 @@ module Kobako
9
9
 
10
10
  UINT: Hash[Integer, String]
11
11
 
12
- def self.assert_within!: (String bytes, Integer? budget) -> void
12
+ def self.assert_within: (String bytes, Integer? budget) -> void
13
13
 
14
14
  private
15
15
 
data/sig/kobako/codec.rbs CHANGED
@@ -2,8 +2,7 @@ module Kobako
2
2
  module Codec
3
3
  MAX_NESTING_DEPTH: Integer
4
4
 
5
- # A value in the closed wire type set (docs/wire/payload-msgpack.md
6
- # § Type Mapping): the scalar leaves, a Capability Handle, and Array / Hash
5
+ # A value in the closed wire type set: the scalar leaves, a Capability Handle, and Array / Hash
7
6
  # containers of the same. The by-value payloads that cross the wire —
8
7
  # dispatch arguments and success values — inhabit this type; a Fault is
9
8
  # an envelope shape, not a wire_value.
@@ -38,6 +38,6 @@ module Kobako
38
38
 
39
39
  def settle_outcome: (Kobako::Snapshot snapshot, Symbol verb, Symbol? entrypoint) -> Kobako::Execution
40
40
 
41
- def invoke!: (Symbol verb, ?entrypoint: Symbol?) { () -> Kobako::Snapshot } -> Kobako::Execution
41
+ def invoke: (Symbol verb, ?entrypoint: Symbol?) { () -> Kobako::Snapshot } -> Kobako::Execution
42
42
  end
43
43
  end
@@ -1,6 +1,6 @@
1
1
  module Kobako
2
2
  module Filesystem
3
- type mountable = Memory | Temporary | Directory | Overlay | _Readable
3
+ type mountable = Tmpfs | Bind | Overlay | _Readable
4
4
 
5
5
  type access = :read | :read_write
6
6
 
@@ -20,13 +20,14 @@ module Kobako
20
20
  def mkdir: (String path) -> void
21
21
  def rmdir: (String path) -> void
22
22
  def unlink: (String path) -> void
23
- def rename: (String from, String to, directory: bool?) -> void
23
+ def rename: (String from, String to) -> void
24
24
  end
25
25
 
26
26
  # A file a Filesystem written in Ruby opened; +::File+ answers it. One
27
27
  # that also answers _WritableFile takes writes too, one answering
28
28
  # _AppendableFile takes appends, and any file may answer _SyncableFile
29
- # to flush or _ClosableFile to close.
29
+ # to flush, _ClosableFile to close, or _StatableFile to report its times
30
+ # and count of names.
30
31
  interface _File
31
32
  def pread: (Integer length, Integer offset) -> String?
32
33
  def size: () -> Integer
@@ -51,9 +52,14 @@ module Kobako
51
52
  def close: () -> void
52
53
  end
53
54
 
55
+ interface _StatableFile
56
+ def stat: () -> _Stat
57
+ end
58
+
54
59
  # What a Filesystem written in Ruby's +stat+ answers, as +File::Stat+
55
60
  # does; an +ino+ of zero names no identity. One that also answers
56
- # _StatDevice names the device its +ino+ belongs to.
61
+ # _StatDevice names the device its +ino+ belongs to, and _StatKind says
62
+ # a special file is one.
57
63
  interface _Stat
58
64
  def directory?: () -> boolish
59
65
  def size: () -> Integer
@@ -64,24 +70,23 @@ module Kobako
64
70
  def dev: () -> Integer
65
71
  end
66
72
 
67
- class Memory
68
- # A bare <tt>"path" => contents</tt> arrives as keywords, which RBS
69
- # cannot key by String; a Symbol keyword past +limit+ and +inodes+
70
- # raises ArgumentError.
71
- def initialize: (?Hash[String, String] files, ?limit: Integer?, ?inodes: Integer?, **String) -> void
73
+ interface _StatKind
74
+ def ftype: () -> String
72
75
  end
73
76
 
74
- class Temporary
75
- def initialize: (?limit: Integer?, ?inodes: Integer?) -> void
77
+ class Tmpfs
78
+ # A bare <tt>"path" => contents</tt> arrives as keywords, which RBS
79
+ # cannot key by String; a Symbol keyword past +size+ and +nr_inodes+
80
+ # raises ArgumentError.
81
+ def initialize: (?Hash[String, String] files, ?size: Integer?, ?nr_inodes: Integer?, **String) -> void
76
82
  end
77
83
 
78
- class Directory
84
+ class Bind
79
85
  def initialize: (String path) -> void
80
86
  end
81
87
 
82
88
  class Overlay
83
- def initialize: () -> void
84
- def layer: (mountable filesystem, ?access: access) -> Overlay
89
+ def initialize: (lower: Array[mountable], ?upper: Tmpfs?) -> void
85
90
  end
86
91
 
87
92
  end
@@ -2,7 +2,7 @@ module Kobako
2
2
  # Frame-scoped guest re-entry handle the ext hands the dispatch Proc as
3
3
  # its last argument — the production conformer of
4
4
  # +Kobako::Transport::_GuestYielder+, answering the Yield Reply already
5
- # split off the core envelope.
5
+ # split off the Envelope.
6
6
  class GuestYielder
7
7
  def call: (String args_bytes) -> [Symbol, String, String?]
8
8
  end
@@ -20,7 +20,7 @@ module Kobako
20
20
 
21
21
  private
22
22
 
23
- def validate_kwargs!: (Hash[untyped, untyped] kwargs) -> void
23
+ def validate_kwargs: (Hash[untyped, untyped] kwargs) -> void
24
24
  end
25
25
  end
26
26
  end
data/sig/kobako/pool.rbs CHANGED
@@ -25,7 +25,7 @@ module Kobako
25
25
 
26
26
  def claim_or_wait: (Float? deadline) -> [Symbol, Kobako::Sandbox?]
27
27
 
28
- def await_slot!: (Float? deadline) -> void
28
+ def await_slot: (Float? deadline) -> void
29
29
 
30
30
  def construct_slot: () -> Kobako::Sandbox
31
31
 
@@ -35,7 +35,7 @@ module Kobako
35
35
 
36
36
  def monotonic_now: () -> Float
37
37
 
38
- def validate_slots!: (untyped slots) -> void
38
+ def validate_slots: (untyped slots) -> void
39
39
 
40
40
  def normalize_checkout_timeout: ((Float | Integer)? checkout_timeout) -> Float?
41
41
  end
@@ -2,7 +2,7 @@ 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.validate_mount: (untyped at, untyped access, untyped filesystem) -> nil
6
6
 
7
7
  def self.from_path: (
8
8
  String path,
@@ -39,14 +39,12 @@ module Kobako
39
39
 
40
40
  private
41
41
 
42
- def build_runtime!: () -> Kobako::Runtime
43
-
44
- def new_invocation: () -> Kobako::Context
42
+ def build_runtime: () -> Kobako::Runtime
45
43
 
46
44
  def preamble: (Array[Kobako::Catalog::Snippets::tuple] snippets) -> Kobako::Context::preamble
47
45
 
48
- def refuse_once_invoked!: (String verb) -> void
46
+ def refuse_once_invoked: (String verb) -> void
49
47
 
50
- def begin_invocation!: () -> void
48
+ def begin_invocation: () -> Kobako::Context
51
49
  end
52
50
  end
@@ -55,7 +55,7 @@ module Kobako
55
55
 
56
56
  def value_budget: () -> Integer?
57
57
 
58
- def enforce_floor!: (Symbol declared) -> void
58
+ def enforce_floor: (Symbol declared) -> void
59
59
 
60
60
  private
61
61
 
@@ -21,11 +21,11 @@ module Kobako
21
21
 
22
22
  def self.resolve_call_args: (Kobako::Payload::Arguments arguments, Kobako::Codec::_HandleTable handles, bool carried_handle) -> [Array[untyped], Hash[Symbol, untyped]]
23
23
 
24
- def self.caught_fault: (StandardError error, Kobako::Transport::BlockFailure failure) -> [String, String]
24
+ def self.fault_of: (StandardError error, Kobako::Transport::BlockFailure failure) -> [String, String]
25
25
 
26
26
  def self.invoke: (Kobako::Transport::Exposure exposure, String method, Array[untyped] args, Hash[Symbol, untyped] kwargs, Kobako::Transport::Yielder? yielder) -> untyped
27
27
 
28
- def self.reject_unreachable!: (Kobako::Transport::Exposure exposure, Symbol name) -> void
28
+ def self.reject_unreachable: (Kobako::Transport::Exposure exposure, Symbol name) -> void
29
29
 
30
30
  def self.resolve_arg: (untyped value, Kobako::Codec::_HandleTable handles) -> untyped
31
31
 
@@ -31,7 +31,7 @@ module Kobako
31
31
 
32
32
  def self.narrows_itself?: (untyped object, Module klass) -> bool
33
33
 
34
- def self.default_names: (untyped object, Module klass, Hash[Module, Set[Symbol]] surfaces) -> Set[Symbol]
34
+ def self.resolve_default_names: (untyped object, Module klass, Hash[Module, Set[Symbol]] surfaces) -> Set[Symbol]
35
35
 
36
36
  def self.class_names: (untyped object, Module klass) -> Set[Symbol]
37
37
 
@@ -14,11 +14,11 @@ module Kobako
14
14
 
15
15
  def self.ambient_refusal: (untyped target, Symbol name) -> String?
16
16
 
17
- def self.defined_refusal: (untyped target, Symbol name, Module klass) -> String?
17
+ def self.public_method_refusal: (untyped target, Symbol name, Module klass) -> String?
18
18
 
19
19
  def self.authored_for?: (untyped target, Symbol name, UnboundMethod method, Module klass) -> bool
20
20
 
21
- def self.refused: (Symbol name) -> String
21
+ def self.service_refusal: (Symbol name) -> String
22
22
 
23
23
  def self.owner_refusal: (untyped target, Symbol name, Module owner) -> String?
24
24
 
@@ -9,15 +9,15 @@ module Kobako
9
9
 
10
10
  def initialize: (entrypoint: Symbol | String, ?args: Array[untyped], ?kwargs: Hash[untyped, untyped]) -> void
11
11
 
12
- def payload: (Kobako::Codec::_HandleTable handles) -> String
12
+ def encode_payload: (Kobako::Codec::_HandleTable handles) -> String
13
13
 
14
14
  private
15
15
 
16
16
  def normalize_entrypoint: (Symbol | String target) -> Symbol
17
17
 
18
- def validate_args!: (Array[untyped] args) -> void
18
+ def validate_args: (Array[untyped] args) -> void
19
19
 
20
- def validate_kwargs!: (Hash[untyped, untyped] kwargs) -> void
20
+ def validate_kwargs: (Hash[untyped, untyped] kwargs) -> void
21
21
 
22
22
  def forged_handle_message: (String slot) -> String
23
23
  end
@@ -11,7 +11,7 @@ module Kobako
11
11
  end
12
12
 
13
13
  # The per-invocation dispatch Proc, taking the routing fields the native
14
- # side already decoded off the core envelope and answering the arm and
14
+ # side already decoded off the Envelope and answering the arm and
15
15
  # body it puts on the Reply. Named here so the producer (Context) and the
16
16
  # consumer (Runtime) cannot declare it differently.
17
17
  type dispatch_proc = ^(String | Integer, String, bool, String, _GuestYielder) -> [Symbol, String, String?]
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.29.0
4
+ version: 0.30.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-10-26 00:00:00.000000000 Z
11
+ date: 2026-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack
@@ -47,10 +47,14 @@ 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
50
51
  - crates/kobako-transport/CHANGELOG.md
51
52
  - crates/kobako-transport/README.md
52
53
  - crates/kobako-wasmtime/CHANGELOG.md
53
54
  - crates/kobako-wasmtime/README.md
55
+ - crates/kobako-wasmtime/src/preview1/testsuite-expected.txt
56
+ - crates/kobako-wasmtime/witx/typenames.witx
57
+ - crates/kobako-wasmtime/witx/wasi_snapshot_preview1.witx
54
58
  - data/kobako.wasm
55
59
  - lib/kobako.rb
56
60
  - lib/kobako/3.3/kobako.so