agent_permissions, agent_term and subagent_term take their wire contracts from swarm-wire
This commit is contained in:
parent
c06b1325e7
commit
839efd1642
27 changed files with 661 additions and 607 deletions
|
|
@ -4,7 +4,7 @@
|
|||
//! the swarm is the record, this file is the hive's last read of it.
|
||||
//!
|
||||
//! Format: agent name → the stored
|
||||
//! [`swarm_queue_client::agent_permissions::AgentPermissions`]. An agent with
|
||||
//! [`swarm_wire::agent_permissions::AgentPermissions`]. An agent with
|
||||
//! no entry, or an entry with `permissions` unset, holds
|
||||
//! [`Permission::DEFAULT`]; `"permissions": []` holds none.
|
||||
//!
|
||||
|
|
@ -18,7 +18,8 @@ use std::collections::BTreeMap;
|
|||
use std::path::{Path, PathBuf};
|
||||
|
||||
use hive_types::Permission;
|
||||
use swarm_queue_client::agent_permissions::{AgentPermissions, HIVE_COPY_FILE, HiveCopy};
|
||||
use swarm_queue_client::agent_permissions::{HIVE_COPY_FILE, HiveCopy};
|
||||
use swarm_wire::agent_permissions::AgentPermissions;
|
||||
|
||||
const FILE: &str = "swarm-agent-permissions.json";
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ use std::path::{Path, PathBuf};
|
|||
|
||||
use anyhow::{Context, Result};
|
||||
use hive_types::Permission;
|
||||
use swarm_queue_client::agent_permissions::{
|
||||
use swarm_wire::agent_permissions::{
|
||||
self, AgentPermissions, IMPORT_REPLY_DEADLINE, Import, ImportReply,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@ use std::time::Duration;
|
|||
|
||||
use anyhow::{Context, Result};
|
||||
use hive_types::Permission;
|
||||
use swarm_queue_client::agent_permissions::{self, AgentPermissions, Read};
|
||||
use swarm_queue_client::agent_permissions::{self, Read};
|
||||
use swarm_wire::agent_permissions::AgentPermissions;
|
||||
|
||||
use crate::coordinator::Coordinator;
|
||||
use crate::permissions::{self, Stored};
|
||||
|
|
@ -182,7 +183,7 @@ mod tests {
|
|||
use std::path::Path;
|
||||
|
||||
use super::{Read, sync_with};
|
||||
use swarm_queue_client::agent_permissions::AgentPermissions;
|
||||
use swarm_wire::agent_permissions::AgentPermissions;
|
||||
|
||||
fn record(json: &str) -> AgentPermissions {
|
||||
serde_json::from_str(json).expect("decodes")
|
||||
|
|
|
|||
Loading…
Reference in a new issue