Skip to content

Commit cc40ecb

Browse files
committed
fix: enforce non-zero policy parse errors and remove sdk path pin
1 parent 4b91c3c commit cc40ecb

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ authors = ["Agentra Labs <contact@agentralabs.tech>"]
1919

2020
[workspace.dependencies]
2121
# SDK (shared sister traits)
22-
agentic-sdk = { version = "0.2.0", path = "../agentic-sdk" }
22+
agentic-sdk = { version = "0.2.0" }
2323

2424
# Core
2525
chrono = { version = "0.4", features = ["serde"] }

crates/agentic-contract-cli/src/commands/policy.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ pub fn run(args: PolicyArgs, acon_path: &str) {
5555
"session" => agentic_contract::PolicyScope::Session,
5656
"agent" => agentic_contract::PolicyScope::Agent,
5757
other => {
58-
eprintln!("Unknown scope: {}", other);
59-
return;
58+
crate::fail(&format!("Unknown scope: {}", other));
6059
}
6160
};
6261
let action = match action.as_str() {
@@ -65,8 +64,7 @@ pub fn run(args: PolicyArgs, acon_path: &str) {
6564
"require_approval" => agentic_contract::PolicyAction::RequireApproval,
6665
"audit_only" => agentic_contract::PolicyAction::AuditOnly,
6766
other => {
68-
eprintln!("Unknown action: {}", other);
69-
return;
67+
crate::fail(&format!("Unknown action: {}", other));
7068
}
7169
};
7270

@@ -84,8 +82,7 @@ pub fn run(args: PolicyArgs, acon_path: &str) {
8482
"session" => agentic_contract::PolicyScope::Session,
8583
"agent" => agentic_contract::PolicyScope::Agent,
8684
other => {
87-
eprintln!("Unknown scope: {}", other);
88-
return;
85+
crate::fail(&format!("Unknown scope: {}", other));
8986
}
9087
};
9188
let result = engine.check_policy(&action_type, scope);

0 commit comments

Comments
 (0)