Bind Modeling tools and output authority
This commit is contained in:
parent
f33bd2422e
commit
ecfff489fe
6 changed files with 87 additions and 4 deletions
|
|
@ -681,6 +681,45 @@ pub fn epiphany_role_launch_output_schema(role_id: EpiphanyRoleResultRoleId) ->
|
|||
},
|
||||
"required": ["evidenceIds", "repoModelPatch"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"not": {
|
||||
"anyOf": [
|
||||
{"required": ["repoFrontierModelingRequestId"]},
|
||||
{"required": ["proposalModelingRequestId"]},
|
||||
{"required": ["claimRepairRequestId"]}
|
||||
]
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"repoModelPatch": {
|
||||
"properties": {
|
||||
"purpose": {
|
||||
"type": "object",
|
||||
"required": ["kind"],
|
||||
"properties": {"kind": {"const": "evolution"}},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"operations": {
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{"type": "object", "required": ["operation", "node"], "properties": {"operation": {"const": "upsert_node"}, "node": repo_model_node_output_schema()}},
|
||||
{"type": "object", "required": ["operation", "node"], "properties": {"operation": {"const": "revise_node"}, "node": repo_model_node_output_schema()}},
|
||||
{"type": "object", "required": ["operation", "node_id"], "properties": {"operation": {"const": "retire_node"}, "node_id": {"type": "string", "minLength": 1}}},
|
||||
{"type": "object", "required": ["operation", "edge"], "properties": {"operation": {"const": "upsert_edge"}, "edge": repo_model_edge_output_schema()}},
|
||||
{"type": "object", "required": ["operation", "edge"], "properties": {"operation": {"const": "revise_edge"}, "edge": repo_model_edge_output_schema()}},
|
||||
{"type": "object", "required": ["operation", "edge_id"], "properties": {"operation": {"const": "retire_edge"}, "edge_id": {"type": "string", "minLength": 1}}}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["purpose", "operations"]
|
||||
}
|
||||
},
|
||||
"required": ["repoModelPatch"]
|
||||
}
|
||||
}
|
||||
]);
|
||||
}
|
||||
|
|
@ -1609,6 +1648,16 @@ mod tests {
|
|||
["maxContains"],
|
||||
1
|
||||
);
|
||||
let ordinary_operations = schema["allOf"][3]["then"]["properties"]["repoModelPatch"]
|
||||
["properties"]["operations"]["items"]["anyOf"]
|
||||
.as_array()
|
||||
.expect("ordinary Modeling operations");
|
||||
assert_eq!(ordinary_operations.len(), 6);
|
||||
assert!(ordinary_operations.iter().all(|operation| {
|
||||
!operation["properties"]["operation"]["const"]
|
||||
.as_str()
|
||||
.is_some_and(|kind| kind.contains("frontier"))
|
||||
}));
|
||||
let operations =
|
||||
schema["properties"]["repoModelPatch"]["properties"]["operations"]["items"]["anyOf"]
|
||||
.as_array()
|
||||
|
|
|
|||
|
|
@ -535,7 +535,6 @@ pub fn coordinator_argv(
|
|||
policy.max_steps.to_string(),
|
||||
"--max-runtime-seconds".into(),
|
||||
policy.turn_timeout_seconds.to_string(),
|
||||
"--no-auto-tools".into(),
|
||||
];
|
||||
let ResidentSelfWake::Explicit { objective } = wake;
|
||||
argv.extend(["--objective".into(), objective.clone()]);
|
||||
|
|
@ -1987,6 +1986,10 @@ mod tests {
|
|||
let prepared = prepare_resident_self_launch(&store, &policy, 4)?.expect("prepared launch");
|
||||
assert_eq!(prepared.grant.grant_id, grant.grant_id);
|
||||
assert!(!prepared.argv.iter().any(|arg| arg == "--objective"));
|
||||
assert!(
|
||||
!prepared.argv.iter().any(|arg| arg == "--no-auto-tools"),
|
||||
"role-scoped tool policy, not resident argv, owns Modeling inspection authority"
|
||||
);
|
||||
assert!(prepared.argv.windows(2).any(|pair| pair
|
||||
== [
|
||||
"--admitted-model-direction-consideration-request-id",
|
||||
|
|
|
|||
Reference in a new issue