Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
7bfaaf4
feat(harness): add turn runner types
senamakel Oct 18, 2026
9ae7813
feat(turn_runner): add cancel grace window and restore steer metadata
senamakel Oct 18, 2026
b264ceb
test(turn_runner): cover recovered steer dispatch and cancel grace
senamakel Oct 18, 2026
9671bbb
test(turn_runner): use default config in test fixtures
senamakel Oct 18, 2026
0425745
docs(turn_runner): document requeue and cancel grace behaviour
senamakel Oct 18, 2026
b3ccaca
feat(turn_runner): add turn runner types and module
senamakel Oct 18, 2026
2e14cc0
test(turn_runner): cover live turn snapshots and scoped cancellation
senamakel Oct 18, 2026
fc19983
Merge pull request #50 from senamakel/epic-7964-135-runner-queue
senamakel Oct 18, 2026
a2a16d2
feat(progress): add SubagentUsage::cost accessor
senamakel Oct 18, 2026
6c0db9c
test(harness): add progress test module
senamakel Oct 18, 2026
047144d
test(progress): pin SubagentUsage unknown-cost wire behaviour
senamakel Oct 18, 2026
6b9d3d3
Merge pull request #52 from senamakel/epic-7964-135-subagent-usage
senamakel Oct 18, 2026
1896ee9
refactor(turn_runner): introduce work tracker for idle detection
senamakel Oct 19, 2026
27009a1
test(work_tracker): reformat assertions to satisfy line width
senamakel Oct 19, 2026
4ac5a5a
test(work-tracker): cover parent work closing on model call completion
senamakel Oct 19, 2026
479f6f5
Merge pull request #98 from senamakel/epic-7964-135-work-tracker
senamakel Oct 19, 2026
5622d75
test(session): cover host metadata preservation for voice notes
senamakel Oct 19, 2026
75cb5e8
feat(transcript): expose extra_metadata on display items
senamakel Oct 19, 2026
5f35bc1
test(transcript): reformat voice note metadata test
senamakel Oct 19, 2026
055b636
chore(vendor): bump tinyinference and tinytools submodules
senamakel Oct 19, 2026
5044f29
chore(deps): bump tinystoragedrivers to v1.0.0
senamakel Oct 19, 2026
5e0ba12
chore(vendor): bump tinyinference and tinytools submodules
senamakel Oct 19, 2026
66fdb0c
chore(deps): downgrade tinystoragedrivers to v0.11.0
senamakel Oct 19, 2026
fc87d86
Merge pull request #120 from senamakel/epic-7964-134-metadata-clean
senamakel Oct 19, 2026
16e066e
feat(session): support atomic imported history adoption
senamakel Oct 19, 2026
47a18be
Merge pull request #125 from senamakel/epic-7964-136-relay-adoption
senamakel Oct 19, 2026
971c380
fix(session): initialize imported transcript prefixes
senamakel Oct 19, 2026
2427277
Merge pull request #127 from senamakel/epic-7964-136-initial-prefix
senamakel Oct 19, 2026
27ad102
feat(session): add reset_history to start a fresh resumable context
senamakel Oct 20, 2026
10e3c1b
fix(session): persist empty successor on history reset
senamakel Oct 20, 2026
a46da23
fix(session): persist reset prefix state
senamakel Oct 20, 2026
ca2fe7b
fix(session): refresh live sessions after reset
senamakel Oct 20, 2026
13cf699
Merge pull request #133 from senamakel/epic-7964-136-session-reset
senamakel Oct 20, 2026
bd7d5df
feat(session): derive UI wire schemas
senamakel Oct 20, 2026
6fad811
Merge pull request #134 from senamakel/epic-7964-138-wire-projection
senamakel Oct 20, 2026
74cd53c
fix(session): export serialized turn state schema
senamakel Oct 20, 2026
bcfdf99
Merge pull request #135 from senamakel/epic-7964-138-wire-projection
senamakel Oct 20, 2026
ccf1efb
feat(session): merge message metadata atomically
senamakel Oct 20, 2026
54980b2
Merge pull request #136 from senamakel/epic-7964-138-message-metadata…
senamakel Oct 20, 2026
56e9eab
refactor(threads): introduce is_idempotent_message_id for append retries
senamakel Oct 20, 2026
aa6b500
test(threads): clarify user append idempotency
senamakel Oct 20, 2026
e85cbc6
Merge pull request #137 from senamakel/epic-7964-138-user-append-idem…
senamakel Oct 20, 2026
8a4826d
chore(vendor): update tinytools subproject commit
senamakel Oct 20, 2026
3695e4f
chore(vendor): update tinytools subproject commit
senamakel Oct 20, 2026
29b1922
Merge commit '6fa6ff7688018ccf3fd35fe31aebf0dda7e92c2f' into epic-796…
senamakel Oct 20, 2026
b52fbeb
chore(deps): update tinystoragedrivers-core versions
senamakel Oct 20, 2026
26309a9
test(schema): add merge_extra_metadata to conversation read test
senamakel Oct 20, 2026
204972f
test(transcript): update turn lock test locators
senamakel Oct 20, 2026
574acd3
Merge pull request #139 from senamakel/epic-7964-136-storage-prereq
senamakel Oct 20, 2026
f6fa08a
chore(deps): update dependencies and subproject commit
senamakel Oct 20, 2026
06ac777
Merge pull request #140 from senamakel/epic-7964-136-storage-v1-pin
senamakel Oct 20, 2026
318d0dd
fix(driver): add concurrent retry check for message append
senamakel Oct 20, 2026
481951b
Merge pull request #142 from senamakel/epic-7964-138-user-append-idem…
senamakel Oct 20, 2026
e3f52b7
refactor(turn_runner): introduce structured failure classification
senamakel Oct 20, 2026
81bfe3f
refactor(turn_runner): update failure classification logic
senamakel Oct 20, 2026
79edf09
chore: files changed crates/tinyagents-harness/src/turn_runner/mod_te…
senamakel Oct 20, 2026
80c5f7d
Merge pull request #144 from senamakel/epic-7964-136-failure-envelope
senamakel Oct 20, 2026
bafab14
feat(deps): add json-schema support
senamakel Oct 20, 2026
915fc1f
test(all): add json schema validation tests
senamakel Oct 20, 2026
b0e280c
chore(deps): update dependencies
senamakel Oct 20, 2026
4baa365
test(schema): update schema generation in tests
senamakel Oct 20, 2026
0b15f13
test(tests): update schema validation assertions
senamakel Oct 20, 2026
584c422
test(tests): update schema validation for enums
senamakel Oct 20, 2026
714a7ce
test(tests): update schema validation assertions in goal and todo tests
senamakel Oct 20, 2026
9ea1934
refactor(tests): introduce schema_string_values helper
senamakel Oct 20, 2026
b20bd4a
test(tests): clean up test code formatting
senamakel Oct 20, 2026
3d13aed
test(all): update schema_string_values function signatures in tests
senamakel Oct 20, 2026
c98d8ef
refactor(tests): add lifetime annotations to schema_string_values
senamakel Oct 20, 2026
09344e1
Merge pull request #145 from senamakel/epic-7964-138-schema-next
senamakel Oct 20, 2026
6638e79
feat(orchestration): record run progress in ledger
senamakel Oct 20, 2026
138f972
Merge pull request #149 from senamakel/epic-7964-135-web-chat-thin
senamakel Oct 20, 2026
bba042e
refactor(orchestration): fold progress events into run ledger
senamakel Oct 20, 2026
0a0e354
Merge pull request #151 from senamakel/epic-7964-135-progress-ledger
senamakel Oct 20, 2026
5919f8e
chore(vendor): bump tinyinference and tinytools submodules
senamakel Oct 23, 2026
86d9dcd
Merge remote-tracking branch 'origin/main' into 7964-137-active
senamakel Oct 23, 2026
d1cbeef
test(tinyagents-harness-tools): add wait tool tests
senamakel Oct 23, 2026
5de5f88
test(wait): cover timeout policy for requested wait
senamakel Oct 23, 2026
b8acaa2
feat(tinyagents-harness-tools): add wait tool
senamakel Oct 23, 2026
acae9d1
feat(tinyagents-harness-tools): add wait tools and json-schema feature
senamakel Oct 23, 2026
a274a75
chore: remove duplicate wait_tests module declaration
senamakel Oct 23, 2026
61580d7
docs(tinyagents-harness-tools): document the json-schema feature
senamakel Oct 23, 2026
30a0439
test(session): update tests for new storage and prefix fields
senamakel Oct 23, 2026
7705257
Merge remote-tracking branch 'origin/main' into 7964-upstream-merge-1024
senamakel Oct 24, 2026
4a7318e
Merge pull request #183 from senamakel/7964-upstream-merge-1024
senamakel Oct 24, 2026
e5f0353
chore(orchestration): expose run_progress_ledger module
senamakel Oct 24, 2026
05e3bbf
Merge pull request #184 from senamakel/7964-restore-epic-api
senamakel Oct 24, 2026
348fb7d
feat(turn_runner): add cancel_grace config for cancelled runs
senamakel Oct 24, 2026
ec31e4c
test(turn_runner): cover cancellation grace during run unwinding
senamakel Oct 24, 2026
7ca372d
test(turn_runner): use default config fields in cancellation test
senamakel Oct 24, 2026
3020f2e
Merge pull request #185 from senamakel/7964-restore-cancel-grace
senamakel Oct 24, 2026
5765c5f
test(goals): update expected schema fields
senamakel Oct 25, 2026
ce0cfd5
chore(run-ledger-mongodb): add schemars and its transitive deps to lo…
senamakel Oct 25, 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
82 changes: 74 additions & 8 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions crates/tinyagents-harness-tools/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ reqwest = { workspace = true, features = ["stream", "multipart"], optional = tru
sha2 = { version = "0.11", optional = true }
serde = { workspace = true }
serde_json = { workspace = true }
schemars = { version = "1", features = ["derive"], optional = true }
tinyagents-harness = { path = "../tinyagents-harness", version = "3.0.0", default-features = false }
tinyagents-tasks = { path = "../tinyagents-tasks", version = "3.0.0", default-features = false, optional = true }
tinyinference-llm = { path = "../../vendor/tinyinference/crates/tinyinference-llm", version = "0.5.0", optional = true }
Expand All @@ -47,6 +48,7 @@ goals = []
skills = []
state-block = ["goals", "todos", "dep:tinyinference-llm"]
subagents = ["dep:tinyagents-orchestration", "dep:tinyagents-tasks", "dep:tinyinference-llm"]
json-schema = ["dep:schemars"]
fs = ["dep:base64", "dep:fs2", "dep:glob", "dep:libc", "dep:log", "dep:regex", "dep:walkdir", "tokio/fs", "tokio/io-util"]
net = ["dep:futures-util", "dep:log", "dep:reqwest", "dep:sha2", "tokio/fs", "tokio/io-util"]
exec = ["dep:rustix", "tokio/fs", "tokio/io-util", "tokio/process"]
Expand Down
7 changes: 6 additions & 1 deletion crates/tinyagents-harness-tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ feature enables the generic job and message tools and brings in
`tinyagents-orchestration` and its task registry dependencies. Time,
clarification, plan-exit, per-call binding, and thread-lock support are
available without optional features. The `state-block` feature enables the
run-state middleware and its required `goals` and `todos` modules.
run-state middleware and its required `goals` and `todos` modules. The
`json-schema` feature enables schema derives on tool-owned data types.

The opt-in `fs`, `net`, and `exec` features expose the standard tool families
under `tinyagents_harness_tools::{fs,net,exec}`. The `media` feature exposes
Expand Down Expand Up @@ -50,6 +51,10 @@ default set.
`AskClarificationTool`, `PlanExitTool`, `WaitTool`, `WaitLoopTool`, and the
`per_call` binding adapter.

`WaitTool` and `WaitLoopTool` provide bounded delayed callback ticks for
orchestrator-controlled polling. They return the caller's callback message
without owning scheduling state.

Subagent registry policy stays in `tinyagents-orchestration`; this crate owns
the reusable tool declarations. The harness owns tool registration,
admission, schema preparation, discovery, and dispatch infrastructure.
Expand Down
78 changes: 78 additions & 0 deletions crates/tinyagents-harness-tools/src/goals/mod_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,40 @@
use super::prompt::*;
use super::types::*;

#[cfg(feature = "json-schema")]
fn schema_string_values<'a>(
root: &'a serde_json::Value,
mut schema: &'a serde_json::Value,
) -> Vec<String> {
while let Some(reference) = schema.get("$ref").and_then(serde_json::Value::as_str) {
let pointer = reference.strip_prefix('#').expect("local schema reference");
schema = root.pointer(pointer).expect("schema reference resolves");
}

let mut values: Vec<String> =
if let Some(values) = schema.get("enum").and_then(serde_json::Value::as_array) {
values
.iter()
.map(|value| value.as_str().expect("string enum value").to_owned())
.collect()
} else {
schema
.get("oneOf")
.and_then(serde_json::Value::as_array)
.expect("string enum or oneOf schema")
.iter()
.map(|variant| {
variant["const"]
.as_str()
.expect("string oneOf const")
.to_owned()
})
.collect()
};
values.sort();
values
}

fn goal(status: ThreadGoalStatus, token_budget: Option<u64>, tokens_used: u64) -> ThreadGoal {
ThreadGoal {
thread_id: "t".into(),
Expand All @@ -26,6 +60,50 @@ fn status_strings_match_serialized() {
assert_eq!(ThreadGoalStatus::Complete.as_str(), "complete");
}

#[cfg(feature = "json-schema")]
#[test]
fn public_goal_schema_uses_the_serialized_camel_case_record() {
let schema = serde_json::to_value(
schemars::generate::SchemaSettings::draft2020_12()
.for_serialize()
.into_generator()
.into_root_schema_for::<ThreadGoal>(),
)
.unwrap();
let properties = &schema["properties"];
for field in [
"threadId",
"goalId",
"objective",
"status",
"tokenBudget",
"tokensUsed",
"timeUsedSeconds",
"timeUsedSubsecNanos",
"createdAtMs",
"updatedAtMs",
] {
assert!(properties.get(field).is_some(), "missing {field}: {schema}");
}
let status_values = schema_string_values(&schema, &properties["status"]);
let mut expected_status_values = vec![
"active".to_owned(),
"paused".to_owned(),
"budget_limited".to_owned(),
"complete".to_owned(),
];
expected_status_values.sort();
assert_eq!(status_values, expected_status_values);
for (status, serialized) in [
(ThreadGoalStatus::Active, "active"),
(ThreadGoalStatus::Paused, "paused"),
(ThreadGoalStatus::BudgetLimited, "budget_limited"),
(ThreadGoalStatus::Complete, "complete"),
] {
assert_eq!(serde_json::to_value(status).unwrap(), serialized);
}
}

#[test]
fn active_and_terminal_predicates() {
assert!(ThreadGoalStatus::Active.is_active());
Expand Down
2 changes: 2 additions & 0 deletions crates/tinyagents-harness-tools/src/goals/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use serde::{Deserialize, Serialize};
/// system (host control and accounting respectively), and clearing deletes the
/// row entirely rather than being a status.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
#[serde(rename_all = "snake_case")]
pub enum ThreadGoalStatus {
/// The graph may make progress and (when driven) auto-continue.
Expand Down Expand Up @@ -61,6 +62,7 @@ impl ThreadGoalStatus {

/// A single thread-scoped goal.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[cfg_attr(feature = "json-schema", derive(schemars::JsonSchema))]
#[serde(rename_all = "camelCase")]
pub struct ThreadGoal {
/// The thread this goal belongs to (one goal per thread).
Expand Down
Loading
Loading