Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
ca314f0
feat(tinybox-bus): derive JsonSchema for LocalGrantConfig
senamakel Oct 26, 2026
862d7ed
test(tinybox-bus): assert json schema properties in local grant confi…
senamakel Oct 26, 2026
58f0d09
feat(tinybox-bus): add native shell client helper
senamakel Oct 26, 2026
ee3f274
fix(native-shell): capture timeout before shell is moved
senamakel Oct 26, 2026
0df5fe2
fix(tinybox-bus): report timeouts accurately and clean up on failure
senamakel Oct 26, 2026
e530279
refactor(tinybox-bus): make native shell client object-safe
senamakel Oct 26, 2026
4e97beb
test(tinybox-bus): run native shell test on futures-executor
senamakel Oct 26, 2026
357718f
fix(tinybox-bus): reject output batches that do not advance the cursor
senamakel Oct 26, 2026
4617d12
refactor(tinybox-bus): satisfy clippy lints in native shell
senamakel Oct 26, 2026
ac8496c
test(native-shell): cover cancellation and create failure cleanup
senamakel Oct 26, 2026
965629e
test(native-shell): reformat assertions to satisfy line width
senamakel Oct 26, 2026
880e4ac
fix(native-shell): report timed out executions as timeouts
senamakel Oct 26, 2026
9437a53
feat(native-shell): support yielding a running shell process
senamakel Oct 26, 2026
9799e8c
feat(native-shell): support yielding long-running shell executions
senamakel Oct 26, 2026
1591545
test(tinybox-bus): cover native shell timeout and yield outcomes
senamakel Oct 26, 2026
ca5d6b3
test(tinybox-bus): import ExecutionFailure in native shell tests
senamakel Oct 26, 2026
1d6a660
docs(tinybox-bus): format TinyBox as code in doc comment
senamakel Oct 26, 2026
9640ab3
refactor(tinybox-bus): replace mock client flags with behavior enum
senamakel Oct 26, 2026
e95c5a1
fix(native_shell): ignore yield_after when it exceeds the timeout
senamakel Oct 26, 2026
5888f2e
docs(tinybox-bus): expand crate summary to cover lifecycle orchestration
senamakel Oct 26, 2026
2f40d88
chore(tinybox-bus): drop stale clippy allow on run_native_shell
senamakel Oct 26, 2026
8bbb41b
refactor(native-shell): extract native shell execution into a state m…
senamakel Oct 26, 2026
5904804
fix(tinybox-bus): bind native shell process and fix cancellation muta…
senamakel Oct 26, 2026
0eacfd9
refactor(native-shell): extract terminal state handling into helper
senamakel Oct 26, 2026
8715dc0
test(tinybox-bus): cover native shell failure and cleanup paths
senamakel Oct 26, 2026
1b987df
test(native-shell): cover failed execution with close failure
senamakel Oct 26, 2026
b47b19c
test(native-shell): cover timeout cancellation and invalid cursor cle…
senamakel Oct 26, 2026
97c781c
test(tinybox-bus): cover running state for cancelled and timed out mocks
senamakel Oct 26, 2026
3217e09
test(native-shell): cover stderr accumulation when polling without yield
senamakel Oct 26, 2026
ee3c393
test(tinybox-bus): use wrapping add for mock read counter
senamakel Oct 26, 2026
6980ea7
test(tinybox-bus): use named cancel and chunk helpers in native shell…
senamakel Oct 26, 2026
8429981
test(native-shell): add never_cancel and cancel_now helpers
senamakel Oct 26, 2026
4b65c2a
test(native-shell): return results from failure-path tests
senamakel Oct 26, 2026
b1951c6
test(tinybox-bus): propagate assertion failures in native shell tests
senamakel Oct 26, 2026
7ca4bba
test(tinybox-bus): annotate closure return type in native shell test
senamakel Oct 26, 2026
0882241
test(tinybox-bus): relax native shell call ordering assertions
senamakel Oct 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 88 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions crates/tinybox-bus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ repository.workspace = true
[dependencies]
# The bus boundary contains data only; serialization is its sole dependency.
serde.workspace = true
# OpenHuman config operations share this contract type for schema generation.
schemars = "1"
# Runtime-neutral future combinators for the optional native-shell client helper.
futures-util = { version = "0.3", features = ["async-await"] }
# Runtime-neutral delay used between bounded output polls.
futures-timer = "3"
# Only the `storage` feature: pure collection and legacy-body vocabulary.
serde_json = { workspace = true, optional = true }
tinystoragedrivers-types = { workspace = true, optional = true }
Expand All @@ -22,6 +28,7 @@ storage = ["dep:serde_json", "dep:tinystoragedrivers-types"]

[dev-dependencies]
serde_json.workspace = true
futures-executor = "0.3"

[lints]
workspace = true
3 changes: 2 additions & 1 deletion crates/tinybox-bus/src/grants.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
//! Host-configured filesystem grant discovery and protected-path vocabulary.
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

/// Configuration used to discover toolchain and explicit filesystem grants.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
#[serde(default)]
pub struct LocalGrantConfig {
/// Include existing toolchain homes and git configuration.
Expand Down
9 changes: 8 additions & 1 deletion crates/tinybox-bus/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! Serialized requests and results for the `TinyBox` module.
//! Serialized requests and results for the `TinyBox` module, plus runtime-neutral
//! native-shell lifecycle orchestration over a caller-supplied client.
//!
//! This crate has no bus connection, executor, native backend, or policy.
//! A caller applies its own authorization before sending these requests.
Expand All @@ -18,6 +19,12 @@ use std::collections::BTreeMap;
mod grants;
pub use grants::{LocalGrantConfig, LocalGrants, ProtectedPaths, ResolveLocalGrantsRequest};

mod native_shell;
pub use native_shell::{
NativeShellClient, NativeShellError, NativeShellOutput, NativeShellRunOutcome,
NativeShellRunRequest, NativeShellRunning, run_native_shell,
};

mod jail;
pub use jail::{JailEnforcement, NativeJailConfig, NativeJailRequest, NativeJailResourceRequest};

Expand Down
8 changes: 8 additions & 0 deletions crates/tinybox-bus/src/lib_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ fn command_optional_fields_default_when_absent() -> Result<(), serde_json::Error
Ok(())
}

#[test]
fn local_grant_config_exposes_a_json_schema() -> Result<(), serde_json::Error> {
let schema = schemars::schema_for!(LocalGrantConfig);
let schema = serde_json::to_value(schema)?;
assert!(schema.get("properties").is_some());
Ok(())
}

#[test]
fn create_environment_defaults_and_workspace_round_trips() -> Result<(), serde_json::Error> {
let request: CreateRequest = serde_json::from_str(
Expand Down
Loading
Loading