Delete duplicate local Verse contract authority
This commit is contained in:
parent
4373e2d23f
commit
a4af47345e
9 changed files with 1 additions and 1005 deletions
|
|
@ -1,6 +1,4 @@
|
|||
use cultcache_rs::DatabaseEntry;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
pub const SUBSTRATE_GATE_REPO_ACCESS_REQUEST_TYPE: &str =
|
||||
"epiphany.substrate_gate.repo_access_request";
|
||||
|
|
@ -58,86 +56,6 @@ pub struct SubstrateGateRepoAccessGrantReceipt {
|
|||
pub contract: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct SubstrateGateCultNetContract {
|
||||
pub contract_id: String,
|
||||
pub verse_id: String,
|
||||
pub document_type: String,
|
||||
pub payload_schema_version: String,
|
||||
pub authority: String,
|
||||
pub operations: Vec<String>,
|
||||
pub intent_document_types: Vec<String>,
|
||||
pub receipt_document_types: Vec<String>,
|
||||
pub notes: Vec<String>,
|
||||
}
|
||||
|
||||
pub fn default_substrate_gate_cultnet_contracts() -> Vec<SubstrateGateCultNetContract> {
|
||||
vec![
|
||||
SubstrateGateCultNetContract {
|
||||
contract_id: "epiphany.substrate_gate.repo_access.review".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: SUBSTRATE_GATE_REPO_ACCESS_REQUEST_TYPE.to_string(),
|
||||
payload_schema_version: SUBSTRATE_GATE_REPO_ACCESS_REQUEST_SCHEMA_VERSION.to_string(),
|
||||
authority: "substrateGate".to_string(),
|
||||
operations: vec![
|
||||
"intentSubmit".to_string(),
|
||||
"receiptWatch".to_string(),
|
||||
"snapshot".to_string(),
|
||||
],
|
||||
intent_document_types: vec![SUBSTRATE_GATE_REPO_ACCESS_REQUEST_TYPE.to_string()],
|
||||
receipt_document_types: vec![
|
||||
SUBSTRATE_GATE_REPO_ACCESS_REVIEW_TYPE.to_string(),
|
||||
SUBSTRATE_GATE_REPO_ACCESS_GRANT_RECEIPT_TYPE.to_string(),
|
||||
SUBSTRATE_GATE_REPO_ACCESS_REFUSAL_RECEIPT_TYPE.to_string(),
|
||||
],
|
||||
notes: vec![
|
||||
"Substrate Gate is the repo access protocol: workers request repository reads, indexing, commands, edits, and bridge operations here.".to_string(),
|
||||
"Hands may mutate files only after Substrate Gate grants scoped access; Eyes may inspect only through scoped Substrate Gate read/index grants.".to_string(),
|
||||
],
|
||||
},
|
||||
SubstrateGateCultNetContract {
|
||||
contract_id: "epiphany.substrate_gate.repo_access.review_receipts".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: SUBSTRATE_GATE_REPO_ACCESS_REVIEW_TYPE.to_string(),
|
||||
payload_schema_version: SUBSTRATE_GATE_REPO_ACCESS_REVIEW_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"Substrate Gate reviews explain which repo paths, operations, commands, and bridge surfaces were granted or refused.".to_string(),
|
||||
],
|
||||
},
|
||||
SubstrateGateCultNetContract {
|
||||
contract_id: "epiphany.substrate_gate.repo_snapshot.receipts".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: SUBSTRATE_GATE_REPO_SNAPSHOT_RECEIPT_TYPE.to_string(),
|
||||
payload_schema_version: SUBSTRATE_GATE_REPO_SNAPSHOT_RECEIPT_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"Repo snapshots are evidence projections from Substrate Gate access; they do not grant future access by existing.".to_string(),
|
||||
],
|
||||
},
|
||||
SubstrateGateCultNetContract {
|
||||
contract_id: "epiphany.substrate_gate.repo_mutation.receipts".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: SUBSTRATE_GATE_REPO_MUTATION_RECEIPT_TYPE.to_string(),
|
||||
payload_schema_version: SUBSTRATE_GATE_REPO_MUTATION_RECEIPT_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"Repo mutation receipts prove Substrate Gate granted the scoped substrate touch before Hands changed files or ran repo-affecting commands.".to_string(),
|
||||
],
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
pub fn substrate_gate_repo_access_grant_for_worker(
|
||||
receipt_id: String,
|
||||
runtime_job_id: String,
|
||||
|
|
|
|||
Reference in a new issue