Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
a86cd4a
chore(deps): update tinyinference submodule
senamakel Sep 23, 2026
c423c70
fix(media): restore missing Display impl for media types
senamakel Sep 23, 2026
d1834d6
feat(media): add image tool for harness
senamakel Sep 23, 2026
4344959
fix(media): restore video tool after accidental removal
senamakel Sep 23, 2026
97c0dda
fix(media): handle missing media directory gracefully
senamakel Sep 23, 2026
fbfe37c
chore(media): add test for media module
senamakel Sep 23, 2026
a3e491a
feat(harness): add media feature for image and video tools
senamakel Sep 23, 2026
3eb9ade
chore: files changed crates/tinyagents-harness/src/error.rs,crates/ti…
senamakel Sep 23, 2026
dbb9ee7
refactor(media): use struct literal syntax for VideoRequest construction
senamakel Sep 23, 2026
c8bc8c9
docs(harness): document media module
senamakel Sep 23, 2026
3274d45
docs(harness): add media generation docs to indexes
senamakel Sep 23, 2026
c3bf43f
feat(media): make image and video tool permission and category config…
senamakel Sep 23, 2026
7ea2f4b
chore(deps): update vendor/tinyinference subproject commit
senamakel Sep 24, 2026
75d9bd6
chore(vendor): bump tinyinference to media generation crates
senamakel Sep 24, 2026
47daf87
Merge remote-tracking branch 'origin/main' into media-openrouter
senamakel Sep 24, 2026
b1e5b64
chore(deps): update tinytools subproject commit
senamakel Sep 24, 2026
c8337b9
fix(media): handle missing optional fields in media type deserialization
senamakel Sep 24, 2026
7d0feb9
fix(media): handle missing optional fields in media type deserialization
senamakel Sep 24, 2026
27b1a9b
fix(media): handle missing optional fields in media type deserialization
senamakel Sep 24, 2026
734bd8f
fix(media): handle missing image file with clear error message
senamakel Sep 24, 2026
71b53f6
fix(media): handle missing image file path in tool output
senamakel Sep 24, 2026
e04e02f
fix(media): handle missing video tool file in harness
senamakel Sep 24, 2026
1fcdcb2
chore(media): update tinyinference vendor submodule
senamakel Sep 24, 2026
5f2d805
feat(harness): add media test module for tinyagents-harness
senamakel Sep 24, 2026
a00a4d8
chore(deps): add vendor dependency for tinyinference
senamakel Sep 24, 2026
9a9187f
fix(docs): correct media module documentation for harness
senamakel Sep 24, 2026
abde659
chore(media): reformat test closure and update vendor submodule
senamakel Sep 24, 2026
47abdc6
chore(deps): update vendor/tinyinference subproject commit
senamakel Sep 24, 2026
9c8d7ff
chore(deps): update vendor/tinyinference subproject commit
senamakel Sep 24, 2026
5b76acd
fix(media): handle missing optional fields in media type deserialization
senamakel Sep 24, 2026
91c58e3
chore(deps): update tinylinference subproject commit
senamakel Sep 24, 2026
87b9448
chore: files changed crates/tinyagents-harness/src/media/test.rs
senamakel Sep 24, 2026
4c6a5dc
feat(media): add test module for media handling
senamakel Sep 24, 2026
f7224ab
chore(deps): update vendor/tinyinference subproject commit
senamakel Sep 24, 2026
993710f
chore(media): update test module for harness
senamakel Sep 24, 2026
5f3f0a2
fix(media): simplify assertion formatting in host reference policy test
senamakel Sep 24, 2026
8b85258
chore(deps): update tinyinference subproject commit
senamakel Sep 24, 2026
f99d9f2
chore(deps): update vendor/tinyinference subproject commit
senamakel Sep 24, 2026
dfccaf7
chore(deps): update tinylinference subproject commit
senamakel Sep 24, 2026
a855e85
chore(deps): update vendor/tinyinference subproject commit
senamakel Sep 24, 2026
2c475ca
chore(deps): update vendor/tinyinference subproject commit
senamakel Sep 24, 2026
d1c3359
chore(deps): update vendor/tinyinference subproject commit
senamakel Sep 24, 2026
5690218
fix(media): correct audio sample type from i16 to f32
senamakel Sep 24, 2026
8196cdb
fix(media): flatten chained method call in path canonicalization
senamakel Sep 24, 2026
697cf36
chore(deps): update tinyinference subproject commit
senamakel Sep 24, 2026
e6640b0
chore(deps): update tinyinference subproject commit
senamakel Sep 24, 2026
5ef8817
chore(deps): update tinyinference subproject commit
senamakel Sep 24, 2026
56f6a7a
chore(deps): update vendor/tinyinference subproject commit
senamakel Sep 24, 2026
9afdfcf
chore(deps): update vendor/tinyinference subproject commit
senamakel Sep 24, 2026
89e0af7
chore(deps): update vendor/tinyinference subproject commit
senamakel Sep 24, 2026
e5c93b5
chore(deps): update tinylinference subproject commit
senamakel Sep 24, 2026
c610970
chore(deps): update vendor/tinyinference subproject commit
senamakel Sep 24, 2026
fb99b7c
fix(media): handle missing test media file gracefully
senamakel Sep 24, 2026
543ec8a
fix(media): handle missing test file gracefully
senamakel Sep 24, 2026
9733f91
fix(media): handle missing test file gracefully
senamakel Sep 24, 2026
b2bad50
fix(media): reformat test code for readability
senamakel Sep 24, 2026
97796a9
feat(media): add image tool for handling image inputs in harness
senamakel Sep 24, 2026
fa76430
fix(media): handle missing video file in video tool
senamakel Sep 24, 2026
0bb6b97
chore(deps): update tinyinference subproject commit
senamakel Sep 24, 2026
00de77e
chore(deps): update vendor/tinyinference subproject commit
senamakel Sep 24, 2026
38d0f4e
feat(media): reject malformed option values instead of silently using…
senamakel Sep 24, 2026
7a0043a
chore(vendor): bump tinyinference to latest reviewed media crates
senamakel Sep 24, 2026
fd69969
chore(vendor): bump tinyinference to d0d329c (review fixes)
senamakel Sep 24, 2026
9a62be3
fix(media): split integer validation into unsigned and signed checks
senamakel Sep 24, 2026
e8a510e
fix(test): correct assertion for integer validation message
senamakel Sep 24, 2026
3f5af64
Merge remote-tracking branch 'refs/remotes/upstream/main' into pr/208
senamakel Sep 24, 2026
9c4b2b7
feat(media): validate output directory and media types before generation
senamakel Sep 24, 2026
016908e
feat(media): tighten workspace confinement and reject invalid output …
senamakel Sep 24, 2026
7f0cac8
test(media): add EmptyVideoGenerator to guard billed-safety for empty…
senamakel Sep 24, 2026
bc57d93
Merge remote-tracking branch 'upstream/main' into pr/208
senamakel Sep 24, 2026
1ff76e7
fix(media): reject symlinked artifact directories and use O_NOFOLLOW …
senamakel Sep 24, 2026
fcf7e88
chore(deps): update vendor submodules
senamakel Sep 24, 2026
9431527
feat(media): use openat for safe artifact writes
senamakel Sep 24, 2026
a9c35c5
feat(media): preserve delivered media file extension in video tool
senamakel Sep 24, 2026
1afde3e
refactor(harness): replace raw libc calls with rustix for file operat…
senamakel Sep 24, 2026
991cf28
chore(deps): update vendored submodules
senamakel Sep 24, 2026
0a8a55d
fix(media): wrap non-unix file operations in a block
senamakel Sep 24, 2026
ca08008
feat(media): validate tool arguments and enforce model requirement fo…
senamakel Sep 24, 2026
9d52307
fix(media): validate artifact and request inputs
senamakel Sep 24, 2026
2df8633
fix(media): align video tool timeout with wait policy and fix test as…
senamakel Sep 24, 2026
f840510
Merge upstream main into media-openrouter
senamakel Sep 24, 2026
c497df7
fix(media): make video tool timeout unbounded to preserve resumable j…
senamakel Sep 24, 2026
6ac4ff2
test(media): use explicit ContentBlock in text_response helper
senamakel Sep 24, 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
44 changes: 41 additions & 3 deletions Cargo.lock

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

5 changes: 5 additions & 0 deletions crates/tinyagents-harness/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ dirs = { version = "6", optional = true }
flate2 = { version = "1", optional = true }
futures = { workspace = true }
regex = "1"
rustix = { version = "1", features = ["fs"] }
reqwest = { workspace = true, features = ["stream", "http2"], optional = true }
rusqlite = { workspace = true, optional = true }
serde = { workspace = true }
Expand All @@ -31,6 +32,8 @@ tinyagents-definition = { path = "../tinyagents-definition", version = "2.1.2" }
tinytools-agent = { path = "../../vendor/tinytools/crates/tinytools-agent", version = "0.4.1", default-features = false }
tinyinference-llm = { path = "../../vendor/tinyinference/crates/tinyinference-llm", version = "0.3.0" }
tinyinference-embeddings = { path = "../../vendor/tinyinference/crates/tinyinference-embeddings", version = "0.3.0" }
tinyinference-image = { path = "../../vendor/tinyinference/crates/tinyinference-image", version = "0.3.0", optional = true }
tinyinference-video = { path = "../../vendor/tinyinference/crates/tinyinference-video", version = "0.3.0", optional = true }
tinytools = { path = "../../vendor/tinytools/crates/tinytools", version = "0.4.1" }
tokio = { workspace = true, features = ["sync", "time", "macros", "rt", "rt-multi-thread", "fs", "io-util", "process"] }
tempfile = { workspace = true }
Expand All @@ -45,6 +48,8 @@ sqlite = ["dep:rusqlite"]
tools = ["builtin-tools"]
builtin-tools = ["dep:chrono-tz"]
multimodal = ["dep:flate2", "dep:reqwest"]
# Image and video generation tools over tinyinference-image / -video.
media = ["dep:tinyinference-image", "dep:tinyinference-video"]
# Gates the Claude Code CLI and Claude Agent SDK provider adapters, which are
# the only consumers of `uuid`, `tempfile` beyond the artifact tests, `dirs`,
# and `wait-timeout` in this crate.
Expand Down
25 changes: 25 additions & 0 deletions crates/tinyagents-harness/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,31 @@ impl From<tinyinference_embeddings::Error> for TinyAgentsError {
}
}

#[cfg(feature = "media")]
Comment thread
senamakel marked this conversation as resolved.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

priority high security confident

Gate these conversions on the exposed media feature

The harness exposes multimodal, not media, as its media-related Cargo feature. This condition is therefore never enabled for media builds, so these From implementations are omitted and conversions from tinyinference_image::Error and tinyinference_video::Error fail when the media support is compiled. The identical gate before the video conversion, as well as the corresponding module and re-export gates in lib.rs, must use the package's actual exposed feature.

[RULE] invalid-feature-gate ·

impl From<tinyinference_image::Error> for TinyAgentsError {
fn from(error: tinyinference_image::Error) -> Self {
match error {
tinyinference_image::Error::Serialization(error) => Self::Serialization(error),
error @ (tinyinference_image::Error::Validation(_)
| tinyinference_image::Error::Unsupported { .. }) => {
Self::Validation(error.to_string())
}
other => Self::Model(other.to_string()),
}
}
}

#[cfg(feature = "media")]
impl From<tinyinference_video::Error> for TinyAgentsError {
fn from(error: tinyinference_video::Error) -> Self {
match error {
tinyinference_video::Error::Media(error) => error.into(),
error @ tinyinference_video::Error::Timeout { .. } => Self::Timeout(error.to_string()),
other => Self::Model(other.to_string()),
}
}
}

impl TinyAgentsError {
/// Builds the right error for a structured provider failure, promoting a
/// recognised context overflow to [`TinyAgentsError::ContextOverflow`].
Expand Down
6 changes: 6 additions & 0 deletions crates/tinyagents-harness/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ pub mod handoff;
pub mod host;
pub mod ids;
pub mod limits;
#[cfg(feature = "media")]
pub mod media;
pub mod middleware;
pub mod model_registry;
#[cfg(feature = "multimodal")]
Expand All @@ -98,6 +100,8 @@ pub mod tool;
pub mod tools;
pub mod workspace;

#[cfg(feature = "media")]
pub use tinyinference_image;
/// Re-exported vendor crates. Downstream consumers should reach these
/// dependencies' types through these re-exports (e.g.
/// `tinyagents_harness::tinyinference_llm::ChatMessage`) rather than adding
Expand All @@ -106,6 +110,8 @@ pub mod workspace;
/// independent dependency would produce a duplicate, incompatible copy of
/// the same types.
pub use tinyinference_llm;
#[cfg(feature = "media")]
pub use tinyinference_video;
pub use tinytools;
pub use tinytools_agent;

Expand Down
Loading
Loading