Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions src/harness/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,14 @@ pub fn build_agent(
// the `read_run_output` companion reads back, so a clipped preview
// is reachable within the turn. Orchestrator-only, like the tools.
deps.run_outputs.clone(),
// Issue #619: who is minting, and how wide they are. `add_agent`
// bounds the teammate it mints by this agent's own scope — #661
// clamped to the *company* grant, which still lets a narrowly
// scoped agent mint a teammate holding everything the company
// holds — and names this agent in the mint log.
manifest_agent.id.clone(),
manifest_agent.tools.clone(),
grants.to_vec(),
));
}

Expand Down
4 changes: 2 additions & 2 deletions src/harness/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2884,7 +2884,7 @@ description = "Builds the product."
async fn a_tool_added_teammate_colliding_with_a_manifest_id_still_joins_the_roster() {
use openhuman_core::openhuman::tools::Tool;

use crate::harness::orchestrator::AddAgentTool;
use crate::harness::orchestrator::unscoped_add_agent;

/// A `CompanyStore` that actually holds the record, unlike
/// `RecordingStore` — `add_agent` has to load what it saves.
Expand Down Expand Up @@ -2914,7 +2914,7 @@ description = "Builds the product."
let fx = fixture();
let company = CompanyId::new("acme");
let store = Arc::new(SeededStore(StdMutex::new(record())));
let tool = AddAgentTool::new(company.clone(), store.clone());
let tool = unscoped_add_agent(company.clone(), store.clone());

let result = tool
.execute(serde_json::json!({ "name": "Engineer", "role": "Platform" }))
Expand Down
Loading
Loading