Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
56982a1
fix(gateway): wire configured providers and headless HTTPS transport
fffonion Nov 8, 2026
58e18be
fix(agent): preserve native tool schemas in provider requests
fffonion Nov 9, 2026
6257c95
fix(telegram): deliver buffered final assistant replies
fffonion Nov 9, 2026
0703a6a
fix(llm): accept tool-call messages without content
fffonion Nov 9, 2026
0380e5a
fix(agent): continue conversation after denied tool actions
fffonion Nov 9, 2026
8721ceb
fix(gateway): preserve native tool names in completion events
fffonion Nov 9, 2026
e32bde9
test(agent): verify managed business feedback after Guardian denial
fffonion Nov 9, 2026
fb6a15b
feat(telegram): stream private drafts and edit grouped progress
fffonion Nov 9, 2026
260268a
fix(guardian): raise review output budget to 1024
fffonion Nov 10, 2026
b263d18
fix(llm): serialize empty chat tool map results
fffonion Nov 10, 2026
45459ae
fix(events): preserve tool timestamps across durable replay
fffonion Nov 10, 2026
d09b2bf
feat(telegram): add bound approval picker and recover preview failures
fffonion Nov 11, 2026
1f4a55e
test(telegram): select Guardian for workspace approval fixture
fffonion Nov 11, 2026
9277a1a
fix(prompt): prefer dedicated file inspection tools
fffonion Nov 11, 2026
e18917c
fix(telegram): render final Markdown and readable approval cards
fffonion Nov 11, 2026
7760e47
feat(approvals): add Guardian-first automatic review handoff
fffonion Nov 12, 2026
c019cea
fix(auth): support non-expiring API keys and metadata-only expiry CAS
fffonion Nov 12, 2026
fd6f735
fix(provider): preserve bounded streaming failure diagnostics
fffonion Nov 13, 2026
1e53e77
fix(auth): bound provider request bodies separately from credential f…
fffonion Nov 13, 2026
027547d
fix(guardian): bound auto-approval to sandboxed, allowlisted actions
fffonion Nov 14, 2026
9fb2dd5
test(guardian): align approval fixtures with sandbox auto-approval
fffonion Nov 14, 2026
7dad933
fix(auth): classify native start-phase transport failures
fffonion Nov 14, 2026
ceb8400
fix(auth): report response-head transport failures as their own category
fffonion Nov 14, 2026
cfb96de
chore(core): pin pd-vm to fc8b0c81 for the Unit/Option/Result contracts
fffonion Nov 14, 2026
82787ae
refactor(rss): migrate guest corpus to the strict Unit/Option/Result …
fffonion Nov 15, 2026
2f6b8ca
refactor(host): publish auth, config and oauth returns as typed Optio…
fffonion Nov 15, 2026
6b6098f
refactor(host): type the oauth transport family and restore guardian …
fffonion Nov 15, 2026
5352224
refactor(rss): model every nullable guest value as Option
fffonion Nov 16, 2026
9fc54d3
fix(auth): accept logical option carriers in entry results
fffonion Nov 16, 2026
637ab3c
fix(auth): read an empty selector as an absent transport field
fffonion Nov 16, 2026
22f8f5f
fix(auth): keep the exchange slots readable for token metadata
fffonion Nov 16, 2026
b177cb4
fix(plugins): treat agent::json_text as a pure host call
fffonion Nov 16, 2026
3bcae24
refactor(storage): move the context snapshot selector check to the host
fffonion Nov 16, 2026
557ef7c
fix(storage): accept option carriers on the snapshot wire
fffonion Nov 16, 2026
de5796d
fix(storage): unwrap option carriers in row cells
fffonion Nov 16, 2026
b98e0bb
test(service): open the sqlite fixture with typed option carriers
fffonion Nov 16, 2026
9544326
fix(workspace): read and publish the open result as plain values
fffonion Nov 16, 2026
1ad4298
fix(workspace): fall back to managed source root
fffonion Nov 16, 2026
13276e7
fix(storage): remove dynamic map JSON in admission
fffonion Nov 16, 2026
8d232a7
fix(storage): read optional payload selectors through typed structs
fffonion Nov 16, 2026
865d02a
fix(runtime): accept a pinned call whose arguments arrive as text
fffonion Nov 16, 2026
986b054
fix(runtime): project pinned refusal into canonical tool result
fffonion Nov 16, 2026
089f1a9
fix(storage): read the terminal message ordinal from the command
fffonion Nov 16, 2026
30f6d40
test(runtime): encode approval fixture payload as JSON text
fffonion Nov 16, 2026
5ca5b11
fix(tools): read the execution token once before committing
fffonion Nov 16, 2026
fba9059
fix(runtime): return the declared clock envelope
fffonion Nov 16, 2026
d42fff3
fix(effects): retain an unknown process-control commit
fffonion Nov 16, 2026
4ac9fb3
test(runtime): read a producer handle out of canonical result text
fffonion Nov 16, 2026
a078748
test(runtime): collect producer handles from canonical result text
fffonion Nov 16, 2026
732e7b3
fix(process): read the terminal signal and exit code as concrete numbers
fffonion Nov 16, 2026
b9b786b
test(service): send replay metadata as the declared JSON text
fffonion Nov 16, 2026
f156647
test(service): drop null result slots from the plugin fixtures
fffonion Nov 17, 2026
7a2edec
test(service): serialize managed protocol fixture payloads
fffonion Nov 17, 2026
4fb60b5
test(service): serialize managed effect fixture payloads
fffonion Nov 17, 2026
3fe4a80
test(service): split the child prelude and send the approved prepare …
fffonion Nov 17, 2026
9693525
test(service): bind the child payload before building the result
fffonion Nov 17, 2026
1454567
Revert "fix(runtime): project pinned refusal into canonical tool result"
fffonion Nov 17, 2026
ced86c9
Revert "test(runtime): encode approval fixture payload as JSON text"
fffonion Nov 17, 2026
db1c7ea
Revert "test(service): serialize managed effect fixture payloads"
fffonion Nov 17, 2026
4b8c428
Revert "test(service): serialize managed protocol fixture payloads"
fffonion Nov 17, 2026
b8528c1
test(service): migrate managed RSS fixtures to strict host dialect
fffonion Nov 17, 2026
9cd5b95
fix(storage): budget the admission probe row for the restore payload
fffonion Nov 17, 2026
c162024
fix(managed): preserve typed replay result and original authority clocks
fffonion Nov 17, 2026
fe4a22a
test(managed): prove cross-workspace commit ordering against held bat…
fffonion Nov 17, 2026
2d45953
fix(runtime): type stream and deferred test host results
fffonion Nov 17, 2026
a0c7fbe
fix(plugins): migrate policy fixture sources to typed dialect
fffonion Nov 17, 2026
f7b544f
fix(admission): correct selector replay and migrated fixtures
fffonion Nov 17, 2026
0fd8372
test(config): match the guest row snapshot idiom and drop null handles
fffonion Nov 17, 2026
2714939
test(runtime): assert typed text-only provider refusal and native aut…
fffonion Nov 17, 2026
61b2222
test(gateway): derive restore pin census from current RSS binding
fffonion Nov 17, 2026
c048349
test(broker): send approval attestations across the text boundary
fffonion Nov 17, 2026
c2e7c0f
test(broker): give sibling process receipts scheduling headroom
fffonion Nov 18, 2026
fd880fb
test(service): keep guard refusal clocks live through admission
fffonion Nov 18, 2026
0522d0d
test(protocol): reserve setup time before replay and child expiry
fffonion Nov 18, 2026
2902ef6
test(linearization): observe batch and CAS order across worker jitter
fffonion Nov 18, 2026
e795cda
test(broker): separate restore source deadlines from latch safety nets
fffonion Nov 18, 2026
ddc344d
test(linearization): require the checkpoint refusal to wait out its c…
fffonion Nov 18, 2026
ceec3bd
test(signed_leaf): budget the delayed entry above fixture setup
fffonion Nov 18, 2026
61aa64d
style: rustfmt the repin branch
fffonion Nov 18, 2026
4f16b88
chore(lints): clear the repin branch's clippy and rustfmt drift
fffonion Nov 18, 2026
d092985
fix(config): publish typed resource-backed fixture snapshot and polic…
fffonion Nov 18, 2026
552fbc1
fix(auth): align fixture corpus calls and concrete envelope shells
fffonion Nov 18, 2026
be7cf15
merge: bring the deployed telegram/guardian line into the repin branch
fffonion Nov 18, 2026
b76513c
fix(cli): match the bundled run context in signal-driver fixtures
fffonion Nov 18, 2026
7d780e3
fix(provider): decode sanitized Chat errors with a typed wire schema
fffonion Nov 18, 2026
b0117ac
fix(guardian): normalize absolute paths by typed components
fffonion Nov 18, 2026
401ea24
fix(provider): decode opaque Chat replies through typed wire records
fffonion Nov 18, 2026
edafc8c
fix(codec): serialize public Chat tool results through the host
fffonion Nov 18, 2026
4449cd7
fix(guardian): include typed provider body in the budget fixture
fffonion Nov 18, 2026
bb504fb
fix(telegram): synchronize gateway and lag fixture startup
fffonion Nov 18, 2026
a75e641
fix(effects): separate fixture watchdogs from authority deadlines
fffonion Nov 18, 2026
263d87d
test(telegram): hold restart and stop fixtures at their intended boun…
fffonion Nov 18, 2026
b97e1b2
test(telegram): budget restored follow-up admission separately
fffonion Nov 18, 2026
a6c3523
test(auth): isolate deadline and HTTPS fixture setup
fffonion Nov 18, 2026
b3ef362
test(guardian): start review clock after fixture compilation
fffonion Nov 18, 2026
3075a6b
test(effects): give owned processes separate fixture watchdogs
fffonion Nov 18, 2026
021fdf0
test(checkpoint): separate fixture lifetime from authority clocks
fffonion Nov 18, 2026
db9c75e
merge: adopt master's rebased copy of the telegram/guardian line
fffonion Nov 18, 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
420 changes: 387 additions & 33 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ hyper = { version = "1", features = ["client", "http1"] }
hyper-util = { version = "0.1", features = ["client-legacy", "http1", "tokio"] }
parking_lot = "0.12"
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12"] }
rustscript-vm = { package = "pd-vm", git = "https://github.com/rustscript-lang/rustscript.git", rev = "b5066dd92fcd7c07df57e3ec2c29dbcf8c19c390", default-features = false, features = ["runtime", "http-client", "sqlite"] }
pd-host-function = { git = "https://github.com/rustscript-lang/rustscript.git", rev = "b5066dd92fcd7c07df57e3ec2c29dbcf8c19c390" }
rustscript-vm = { package = "pd-vm", git = "https://github.com/rustscript-lang/rustscript.git", rev = "2f433edab3f1907e8cb060e901357d7e2af016ce", default-features = false, features = ["runtime", "http-client", "sqlite", "cranelift-jit"] }
pd-host-function = { git = "https://github.com/rustscript-lang/rustscript.git", rev = "2f433edab3f1907e8cb060e901357d7e2af016ce" }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yaml = "0.9"
Expand Down
6 changes: 3 additions & 3 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ treated as available.
## 1. Delivery constraint: the core dependency is not released

`rustscript-agent` depends on the RustScript VM through a **pinned Git
dependency**: `rustscript-vm = { package = "pd-vm", git = "https://github.com/rustscript-lang/rustscript.git", rev = "b5066dd92fcd7c07df57e3ec2c29dbcf8c19c390", ... }` in `Cargo.toml`.
dependency**: `rustscript-vm = { package = "pd-vm", git = "https://github.com/rustscript-lang/rustscript.git", rev = "fc8b0c8179640a8ffe460a64b3690e35c2f7eb73", ... }` in `Cargo.toml`.
Consequences, stated plainly:

- A build fetches the exact pinned core revision from the canonical HTTPS
Expand All @@ -18,7 +18,7 @@ Consequences, stated plainly:
- `cargo build/test --locked` resolves the core source from `Cargo.lock`,
which records the canonical git source for both `pd-vm` and
`pd-host-function`:
`git+https://github.com/rustscript-lang/rustscript.git?rev=b5066dd92fcd7c07df57e3ec2c29dbcf8c19c390#b5066dd92fcd7c07df57e3ec2c29dbcf8c19c390`.
`git+https://github.com/rustscript-lang/rustscript.git?rev=fc8b0c8179640a8ffe460a64b3690e35c2f7eb73#fc8b0c8179640a8ffe460a64b3690e35c2f7eb73`.
A build therefore needs network access to github.com (or a pre-warmed
Cargo git cache); it never reads the state of a local core checkout.
- **There is no crates.io release of this crate, and none can be made until
Expand Down Expand Up @@ -46,7 +46,7 @@ before deploying:
```bash
# The lockfile records the exact git source for pd-vm and pd-host-function:
grep -A3 'name = "pd-vm"' Cargo.lock
# source = "git+https://github.com/rustscript-lang/rustscript.git?rev=b5066dd…#b5066dd…"
# source = "git+https://github.com/rustscript-lang/rustscript.git?rev=fc8b0c8…#fc8b0c8…"
# The resolved dependency graph shows the same source:
cargo tree --locked -p rustscript-vm
```
Expand Down
430 changes: 244 additions & 186 deletions rss/agent/guardian.rss

Large diffs are not rendered by default.

294 changes: 207 additions & 87 deletions rss/agent/main.rss

Large diffs are not rendered by default.

138 changes: 138 additions & 0 deletions rss/agent/provider_body.rss
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
// Provider bodies cross the host boundary as serialized JSON text, so each
// consumer decodes the text into a declared shape and normalizes it back to the
// plain map the rest of the agent already understands.
//
// Only the fields the agent reads are declared. The decoder ignores every other
// provider field, so provider-specific additions never break the boundary, and
// a tool call's open `arguments` object is carried as `arguments_json` text by
// the host adapter.
use json;

struct ProviderFailure {
status: Option<int>,
type: Option<string>,
code: Option<string>,
message: Option<string>,
param: Option<string>,
request_id: Option<string>,
retryable: Option<bool>
}

struct ProviderToolCall {
id: Option<string>,
name: Option<string>,
arguments_json: Option<string>
}

struct ProviderResponse {
text: Option<string>,
tool_calls: Option<array<ProviderToolCall>>
}

fn text_present(value: Option<string>) -> bool {
match value {
Some(inner) => true,
None => false,
}
}

fn text_value(value: Option<string>) -> string {
match value {
Some(inner) => inner,
None => "",
}
}

fn int_present(value: Option<int>) -> bool {
match value {
Some(inner) => true,
None => false,
}
}

fn bool_present(value: Option<bool>) -> bool {
match value {
Some(inner) => true,
None => false,
}
}

fn int_value(value: Option<int>, fallback: int) -> int {
match value {
Some(inner) => inner,
None => fallback,
}
}

fn bool_value(value: Option<bool>, fallback: bool) -> bool {
match value {
Some(inner) => inner,
None => fallback,
}
}

/// The provider error object as the retry policy already reads it. Every field
/// the host publishes is carried through — including `type`, `param` and
/// `request_id`, which the retry classifier and the terminal decision use.
/// Absent keys stay absent; `status`/`retryable` keep their documented
/// defaults at the call site, never here.
pub fn failure(body: string) -> map {
let mut result: map = {};
if body != "" {
let decoded: ProviderFailure = json::decode::<ProviderFailure>(body);
if text_present(decoded.type.copy()) {
result["type"] = text_value(decoded.type.copy());
}
if text_present(decoded.code.copy()) {
result["code"] = text_value(decoded.code.copy());
}
if text_present(decoded.message.copy()) {
result["message"] = text_value(decoded.message.copy());
}
if text_present(decoded.param.copy()) {
result["param"] = text_value(decoded.param.copy());
}
if text_present(decoded.request_id.copy()) {
result["request_id"] = text_value(decoded.request_id.copy());
}
if int_present(decoded.status.copy()) {
result["status"] = int_value(decoded.status.copy(), 0);
}
if bool_present(decoded.retryable.copy()) {
result["retryable"] = bool_value(decoded.retryable.copy(), false);
}
}
result
}

/// `{text, tool_calls}` where every tool call is `{id, name, arguments_json}`.
pub fn response(body: string) -> map {
let mut result: map = { text: "", tool_calls: [] };
if body != "" {
let decoded: ProviderResponse = json::decode::<ProviderResponse>(body);
result.text = text_value(decoded.text.copy());
let mut calls: array = [];
let list: array = match decoded.tool_calls {
Some(items) => items,
None => [],
};
let mut index: int = 0;
while index < list.length {
let call: ProviderToolCall = list[index].copy();
let mut entry: map = {};
if text_present(call.id.copy()) {
entry["id"] = text_value(call.id.copy());
}
if text_present(call.name.copy()) {
entry["name"] = text_value(call.name.copy());
}
if text_present(call.arguments_json.copy()) {
entry["arguments_json"] = text_value(call.arguments_json.copy());
}
calls[calls.length] = entry;
index += 1;
}
result.tool_calls = calls;
}
result
}
Loading
Loading