Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
aaaa8fd
feat: add host computer trace sink
senamakel Oct 19, 2026
8ab256e
fix: bind trace sink to trusted host callback
senamakel Oct 19, 2026
54f6527
test: reject expired queued trace events
senamakel Oct 19, 2026
3864b03
chore: use merged agent-desktop trace sink
senamakel Oct 19, 2026
a8326cd
Merge remote-tracking branch 'origin/main' into epic-7419-5-computer-…
senamakel Oct 19, 2026
b62b0a6
test: verify compiled trace sink callback
senamakel Oct 19, 2026
3b60c24
Merge remote-tracking branch 'refs/remotes/origin/main' into pr/113
senamakel Oct 21, 2026
485879b
Fix desktop adapter for current engine APIs
senamakel Oct 21, 2026
325ac51
Update vulnerable transitive dependencies
senamakel Oct 21, 2026
318c770
Harden trace sink contract and configuration
senamakel Oct 21, 2026
2a74aa0
Lock trace sink base64 dependency
senamakel Oct 21, 2026
055337f
Cover trace callbacks and update advisory fixes
senamakel Oct 21, 2026
4a5ca91
Join trace worker and preserve report error envelope
senamakel Oct 21, 2026
24c0994
Release trace guard before callback acknowledgment
senamakel Oct 21, 2026
542fd92
docs(trace-sink): document host-owned trace persistence
senamakel Oct 21, 2026
ac7ae30
fix(examples): annotate call_confidential return type
senamakel Oct 21, 2026
ce7abf0
refactor(trace_sink): extract engine adapter into its own module
senamakel Oct 21, 2026
ea82ed8
feat(trace_sink): add engine adapter for trace sink
senamakel Oct 21, 2026
977b7be
refactor(trace_sink): move shared helpers into engine adapter
senamakel Oct 21, 2026
e769643
refactor(trace_sink): narrow engine adapter re-exports
senamakel Oct 21, 2026
0cb8577
refactor(trace_sink): narrow engine adapter imports
senamakel Oct 21, 2026
d7d4fde
refactor(tinycomputer): narrow test-only trace sink imports
senamakel Oct 21, 2026
60f9025
Merge remote-tracking branch 'origin/main' into pr/113
senamakel Oct 21, 2026
9259b39
test(persistence): assert browser profile in exported snapshot
senamakel Oct 21, 2026
6770cf4
refactor(desktop): move trace configuration into a trace module
senamakel Oct 21, 2026
17b23e8
test(trace_sink): split trace sink tests into focused modules
senamakel Oct 21, 2026
2baf0c8
test(trace_sink): add explicit paths for test submodules
senamakel Oct 21, 2026
6e58d2d
test(trace_sink): derive Clone on BlockingRecordingHost
senamakel Oct 21, 2026
36a20ec
docs(tinycomputer-bus): correct TraceSinkHost contract version to 2.25
senamakel Oct 21, 2026
d7df7db
test(desktop): cover surface name wire spelling in replies
senamakel Oct 21, 2026
b46a87d
fix(desktop): normalize surface names to contract spelling in replies
senamakel Oct 21, 2026
51f3b14
docs(desktop): format snake_case in reply doc comment
senamakel Oct 21, 2026
35f2238
docs(tinycomputer-bus): document trace sink callbacks and contract ve…
senamakel Oct 21, 2026
3257f91
docs(tinybus_module): add trace sink README
senamakel Oct 21, 2026
c6958b8
test(trace_sink): move module doc comment to top of test file
senamakel Oct 21, 2026
0468577
docs(tinycomputer-bus): correct version numbers in compatibility example
senamakel Oct 21, 2026
c1bf82b
docs(trace_sink): format TinyBus as code in test module docs
senamakel Oct 21, 2026
ea53ffc
Merge remote-tracking branch 'origin/main' into pr/113
senamakel Oct 21, 2026
52f6c6b
docs(tinycomputer-bus): clarify minor version compatibility example
senamakel Oct 21, 2026
4ccbcc5
Merge remote-tracking branch 'origin/main' into pr/113
senamakel Oct 21, 2026
fcd0f86
test(trace_sink): make lifecycle timing assertions deterministic
senamakel Oct 21, 2026
2aade72
test(trace_sink): use checked_sub for past deadline
senamakel Oct 21, 2026
e96bb90
test(trace_sink): avoid panic when subtracting from instant
senamakel Oct 21, 2026
6c51548
test(trace-sink): cover confidential report routing and full wire shape
senamakel Oct 21, 2026
22858bf
test(trace_sink): adapt callback test to updated bus and task id apis
senamakel Oct 21, 2026
ee85867
test(trace_sink): wrap callback call args in json arrays
senamakel Oct 21, 2026
bb980f9
Merge remote-tracking branch 'origin/main' into pr/113
senamakel Oct 21, 2026
c4c6646
docs(versioning): correct BrowserEgressHost introduction version
senamakel Oct 21, 2026
e836ed6
docs: correct BrowserEgressHost introduction to 2.25
senamakel Oct 21, 2026
376957f
docs(desktop-module-contract): update minimum module version to 2.24
senamakel Oct 21, 2026
e40cf2f
test(trace_sink): add module doc comment to trace sink tests
senamakel Oct 21, 2026
42a1265
docs(tinycomputer-bus): correct BrowserEgressHost version in versioni…
senamakel Oct 21, 2026
3018ebf
test(scripts): serialize cargo tests on windows
senamakel Oct 21, 2026
2a4d78e
docs(tinycomputer-bus): correct BrowserEgressHost version in versioni…
senamakel Oct 21, 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
69 changes: 49 additions & 20 deletions Cargo.lock

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

6 changes: 6 additions & 0 deletions MODULE.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ is optional:

- `session_id` and `trace_path` (strings), `trace_strict` and `headed`
(booleans) for the desktop engine;
- `trace_sink`: an object containing only the unique callback destination
prepared for this module by `ModuleHost::prepare_host_callbacks`. It opts
into confidential host persistence for desktop traces, bounded artifacts,
and requested task reports. Sink mode replaces local trace/session storage
and does not fall back to `trace_path`; event errors follow `trace_strict`,
and report write errors return a recoverable `TRACE_SINK_FAILED` response;
- `jev`: the decision model and its API key, needed by the Jev-driven and
task members. `provider` picks it: Jev through `type_safe` (the default),
`open_router`, or `tiny_humans_open_router`; `open_jev` (OpenJEV's
Expand Down
2 changes: 2 additions & 0 deletions crates/tinycomputer-bus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ publish = false
thiserror = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
# Base64 keeps binary trace artifacts compact enough for the TinyBus frame cap.
base64 = { workspace = true }
Comment thread
senamakel marked this conversation as resolved.
Resolved

[lints]
workspace = true
26 changes: 25 additions & 1 deletion crates/tinycomputer-bus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ payload vocabulary has to be published as an ordinary library. This is it.
| `agent` | the task members' requests (including opaque host-held secret handles), views, reports, and `Capabilities` |
| `flow` | the flow grammar `RunFlow` and `StartTask` carry |
| `browser` | the `Browser…` members' payloads, names, and error codes |
| `trace_sink` | the optional `TraceSinkHost` callback names and payloads |
| `version` | `CONTRACT_VERSION` and the bind rule a host applies to it |

Three dependencies, all pure Rust: `thiserror`, `serde`, and `serde_json`.
Four dependencies, all pure Rust: `thiserror`, `serde`, `serde_json`, and
`base64` for compact binary artifact payloads.

## This crate sits underneath `tinycomputer`

Expand Down Expand Up @@ -166,3 +168,25 @@ The joined shutdown barrier must succeed before unloading the native artifact.
See the [Globe contract](src/accessibility/README.md).

Reliable Globe callers require a released 2.12-compatible artifact with a verified digest.

Contract 2.25 adds the optional `BrowserEgressHost` callbacks, and 2.26 adds the
confidential `TraceSinkHost` callback. A host
prepares one exact callback binding per loaded module and supplies its unique
destination as `trace_sink.destination`. TinyComputer sends sanitized desktop trace events,
trace artifacts, and requested task reports to `Append`, `StoreArtifact`, and
`WriteReport`. Event delivery is ordered and acknowledged; strict trace mode
propagates sink failures, best-effort mode keeps the existing warning behavior,
and a selected sink never falls back to local trace files. Task report writes
are acknowledged before the report returns. Artifact bytes use standard padded
base64 and are capped at 8 MiB decoded to keep callbacks within the TinyBus
frame limit. Artifact writes carry the existing engine limits and return an
opaque host reference; the host enforces byte and count limits atomically and
must reject storage it cannot provide. The
confidential module caller is the sole scope authority: hosts derive the user
and storage scope from that trusted identity and ignore payload fields when
choosing a scope. Sink callbacks must not call back into TinyComputer. The
module refuses overlapping sink callbacks as bounded backpressure; it cannot
distinguish causal re-entry from unrelated concurrent work. Event
and artifact acknowledgements are bounded by the engine's operation deadline;
report calls have a ten-second transport timeout. A host that does not opt in
keeps the existing desktop file/session trace behavior.
23 changes: 12 additions & 11 deletions crates/tinycomputer-bus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,17 @@
//! That is also a structural necessity, not only a preference: `tinybus` is
//! vendored as a submodule whose manifest inherits fields from its own nested
//! `[workspace.package]`. A crate that every workspace member can depend on has
//! to stay transport-free, and staying transport-free is what keeps this crate
//! down to three pure-Rust dependencies: `thiserror`, `serde`, and
//! `serde_json`.
//!
//! **No session, trace, or skills members.** The engine also offers session
//! lifecycle, trace read and export, and a bundled documentation loader. They
//! are process-lifecycle concerns of a CLI rather than of a loaded module: a
//! module is configured once, at load, and its session identity comes from that
//! configuration instead of from a member a caller has to remember to invoke.
//! They are candidates for a later minor version of this contract, which is
//! why the bind rule in [`version`] treats an added member as compatible.
//! to stay transport-free. Its four pure-Rust dependencies are `thiserror`,
//! `serde`, `serde_json`, and `base64`; the last encodes binary trace artifacts
//! in the `TraceSinkHost` callback payloads.
//!
//! **No session, trace read/export, or skills members.** The contract includes
//! `TraceSinkHost` callbacks so a module can send trace events, artifacts, and
//! requested reports to host-owned storage. It does not expose members to read
//! or export traces from the engine. Session lifecycle and the bundled
//! documentation loader are also absent: they are process-lifecycle concerns
//! of a CLI rather than of a loaded module, whose session identity comes from
//! its load configuration.
//!
//! # This crate sits underneath the implementation, not beside it
//!
Expand Down Expand Up @@ -132,6 +132,7 @@ pub mod notifications;
pub mod observation;
pub mod site_memory;
pub mod system;
pub mod trace_sink;
pub mod version;
pub mod vocabulary;
pub mod waiting;
Expand Down
Loading
Loading