diff --git a/crates/ghostlight/src/patch.rs b/crates/ghostlight/src/patch.rs index ad54f2c..a54db80 100644 --- a/crates/ghostlight/src/patch.rs +++ b/crates/ghostlight/src/patch.rs @@ -2574,7 +2574,17 @@ pub(super) const ACTOR_ROLE: &str = "actor"; /// alphabet: world-declared, kernel-opaque, and safe to surface in a generated /// tool description. pub(crate) fn is_civic_name(value: &str) -> bool { - is_tool_name(value, 48) + is_tool_name(value, CIVIC_NAME_MAX) +} + +/// The longest civic name, in characters. The kernel check above and the +/// schema every civic-name field carries both read this one number. +const CIVIC_NAME_MAX: usize = 48; + +/// The tool-schema property for a value the kernel will hold to +/// [`is_civic_name`]: the model reads the rule where it fills the field. +fn civic_name_schema(description: &str) -> Value { + tool_schema::civic_name(description, CIVIC_NAME_MAX) } /// `[a-z][a-z0-9_]{0,max-1}`. Affordance kinds and roles become generated tool @@ -2701,7 +2711,7 @@ fn validate_affordance( mismatches: &mut Vec, ) { let site = || Site::Declaration(handle.clone()); - if !is_tool_name(&kind.0, 48) || roles.iter().any(|spec| !is_tool_name(&spec.role.0, 32)) { + if !is_tool_name(&kind.0, CIVIC_NAME_MAX) || roles.iter().any(|spec| !is_tool_name(&spec.role.0, 32)) { mismatches.push(Mismatch::InvalidAffordanceName { handle: handle.clone(), }); @@ -7095,15 +7105,12 @@ fn field_schema(kind: PatchFieldKind) -> Value { tool_schema::canonical_string("an exact evidence receipt retrieved for this answer") } PatchFieldKind::Flag => json!({"type": "boolean"}), - PatchFieldKind::Text(description) | PatchFieldKind::Name(description) => { - tool_schema::canonical_string(description) - } + PatchFieldKind::Text(description) => tool_schema::canonical_string(description), + PatchFieldKind::Name(description) => civic_name_schema(description), PatchFieldKind::TextList(description) => { tool_schema::list(tool_schema::canonical_string(description)) } - PatchFieldKind::NameSet(description) => { - tool_schema::list(tool_schema::canonical_string(description)) - } + PatchFieldKind::NameSet(description) => tool_schema::list(civic_name_schema(description)), PatchFieldKind::Choice(values) => tool_schema::name_enum(values), PatchFieldKind::Composite(shape) => composite_schema(shape), PatchFieldKind::CompositeList(shape) => tool_schema::list(composite_schema(shape)), @@ -7133,7 +7140,7 @@ fn composite_schema(shape: CompositeShape) -> Value { "restricted", vec![( "requires".to_owned(), - tool_schema::canonical_string("the authority kind that opens this route"), + civic_name_schema("the authority kind that opens this route"), )], ), ], @@ -7158,7 +7165,7 @@ fn composite_schema(shape: CompositeShape) -> Value { CompositeShape::AuthorityGrantRef => tool_schema::object(vec![ ( "kind".to_owned(), - tool_schema::canonical_string("the authority kind"), + civic_name_schema("the authority kind"), ), ( "over".to_owned(), @@ -7222,7 +7229,7 @@ fn composite_schema(shape: CompositeShape) -> Value { ("subject", Some(subject_ref_schema())), ( "trait", - Some(tool_schema::canonical_string("the trait's name")), + Some(civic_name_schema("the trait's name")), ), ], ), @@ -7357,7 +7364,7 @@ fn precondition_ref_schema() -> Value { ), ( "kind".to_owned(), - tool_schema::canonical_string("the authority kind"), + civic_name_schema("the authority kind"), ), ], ), @@ -7365,7 +7372,7 @@ fn precondition_ref_schema() -> Value { "has_standing", vec![( "grievance".to_owned(), - tool_schema::canonical_string("the grievance kind"), + civic_name_schema("the grievance kind"), )], ), ( @@ -7439,7 +7446,7 @@ fn precondition_schema() -> Value { ("over".to_owned(), role()), ( "kind".to_owned(), - tool_schema::canonical_string("the authority kind"), + civic_name_schema("the authority kind"), ), ], ), @@ -7447,7 +7454,7 @@ fn precondition_schema() -> Value { "has_standing", vec![( "grievance".to_owned(), - tool_schema::canonical_string("the grievance kind"), + civic_name_schema("the grievance kind"), )], ), ( @@ -7482,13 +7489,13 @@ fn component_op_kind_schema() -> Value { let authority_kind = || { vec![( "kind".to_owned(), - tool_schema::canonical_string("the authority kind"), + civic_name_schema("the authority kind"), )] }; let office = || { vec![( "office".to_owned(), - tool_schema::canonical_string("the office's name"), + civic_name_schema("the office's name"), )] }; tool_schema::variant( @@ -8276,6 +8283,133 @@ mod tests { CallerId, CommandBody, CommandId, KernelError, SubmitReceipt, WorldKernel, WorldPhase, }; + /// Every leaf string schema in `value`. + fn string_leaves<'a>(value: &'a Value, out: &mut Vec<&'a serde_json::Map>) { + match value { + Value::Object(fields) => { + if fields.get("type") == Some(&json!("string")) { + out.push(fields); + } + fields.values().for_each(|inner| string_leaves(inner, out)); + } + Value::Array(items) => items.iter().for_each(|inner| string_leaves(inner, out)), + _ => {} + } + } + + fn civic_rule_text() -> String { + format!("lowercase snake_case, starting with a letter, at most {CIVIC_NAME_MAX} characters") + } + + /// Owner: `is_civic_name` and `CIVIC_NAME_MAX`. The model reads the rule + /// where it fills the field; an unstated rule refused 17 of 17 patches in + /// the Zyphos atlas run. Each description below names a value that reaches + /// `is_civic_name` (affordance kind, grant and precondition kinds, offices, + /// delegated kinds, grievances, trait names). + #[test] + fn every_civic_field_carries_the_rule() { + let civic_phrases = [ + "the affordance's tool name", + "the authority kind", + "the grievance kind", + "the office's name", + "the trait's name", + "an authority kind the office lends", + ]; + let pattern = format!("^[a-z][a-z0-9_]{{0,{}}}$", CIVIC_NAME_MAX - 1); + let mut seen = std::collections::BTreeSet::new(); + for tool in patch_tools() { + let schema: Value = serde_json::from_str(&tool.parameters_json).unwrap(); + let mut leaves = Vec::new(); + string_leaves(&schema, &mut leaves); + for leaf in leaves { + let description = leaf + .get("description") + .and_then(Value::as_str) + .unwrap_or_default(); + let Some(phrase) = civic_phrases + .iter() + .find(|phrase| description.starts_with(**phrase)) + else { + continue; + }; + seen.insert(*phrase); + assert_eq!( + leaf.get("pattern"), + Some(&json!(pattern)), + "{}: {description}", + tool.name + ); + assert!( + description.contains(&civic_rule_text()), + "{}: {description}", + tool.name + ); + } + } + assert_eq!( + seen.len(), + civic_phrases.len(), + "the walk missed a civic field: {seen:?}" + ); + // Every Name and NameSet field resolves into a civic schema, whatever its words. + for entry in PATCH_TOOLS { + for field in entry.fields { + let leaf = match field.kind { + PatchFieldKind::Name(_) => field_schema(field.kind), + PatchFieldKind::NameSet(_) => field_schema(field.kind)["items"].clone(), + _ => continue, + }; + assert_eq!(leaf["pattern"], json!(pattern), "{}", entry.name); + assert!( + leaf["description"] + .as_str() + .unwrap() + .contains(&civic_rule_text()) + ); + } + } + } + + /// The exemplar the schema ships is itself a civic name, and the boundary + /// the text states is the boundary `is_civic_name` enforces. + #[test] + fn the_exemplar_and_the_stated_rule_agree_with_the_kernel() { + for kind in [PatchFieldKind::Name("x"), PatchFieldKind::NameSet("x")] { + let example = field_example(kind); + let names = match &example { + Value::Array(items) => items.clone(), + single => vec![single.clone()], + }; + for name in names { + assert!(is_civic_name(name.as_str().unwrap()), "{name}"); + } + } + assert!(is_civic_name("toll_command")); + assert!(is_civic_name(&"a".repeat(CIVIC_NAME_MAX))); + assert!(!is_civic_name(&"a".repeat(CIVIC_NAME_MAX + 1))); + for bad in ["", "Toll", "1toll", "_toll", "toll-command", "toll command", "t\u{f6}ll"] { + assert!(!is_civic_name(bad), "{bad:?}"); + } + } + + /// Free-text fields are untouched: no pattern, same words. + #[test] + fn text_fields_are_unchanged() { + assert_eq!( + field_schema(PatchFieldKind::Label), + json!({"type": "string", "description": "a display label"}) + ); + assert_eq!( + field_schema(PatchFieldKind::Statement), + json!({"type": "string", "description": "the committed world text this fact carries"}) + ); + assert_eq!( + field_schema(PatchFieldKind::Text("some prose")), + json!({"type": "string", "description": "some prose"}) + ); + } + /// Owner: `WorldPatch::sets_persona_of_existing_subject`. Consumer: /// `ghostlight-dungeon`'s play agent (PA.f61, parked at /// `parked/ghostlight-eve-surface`), which refuses a diff --git a/crates/ghostlight/src/tool_schema.rs b/crates/ghostlight/src/tool_schema.rs index 3f64ad8..0dcfe20 100644 --- a/crates/ghostlight/src/tool_schema.rs +++ b/crates/ghostlight/src/tool_schema.rs @@ -43,6 +43,20 @@ pub(super) fn canonical_string(description: &str) -> Value { json!({"type": "string", "description": description}) } +/// A string the kernel will hold to its civic-name rule, `[a-z][a-z0-9_]` up to +/// `max` characters. The rule is stated twice on purpose: as a `pattern` a +/// strict decoder can enforce, and in the description the model reads. `max` is +/// the kernel's own bound, passed in so the rule has one owner. +pub(super) fn civic_name(description: &str, max: usize) -> Value { + json!({ + "type": "string", + "pattern": format!("^[a-z][a-z0-9_]{{0,{}}}$", max - 1), + "description": format!( + "{description}: lowercase snake_case, starting with a letter, at most {max} characters (e.g. toll_command)" + ), + }) +} + pub(super) fn bounded_integer(min: u64, max: u64) -> Value { json!({"type": "integer", "minimum": min, "maximum": max}) } diff --git a/sidecar/claude-sdk/test/schemas.json b/sidecar/claude-sdk/test/schemas.json index 11b67f3..1e90b8e 100644 --- a/sidecar/claude-sdk/test/schemas.json +++ b/sidecar/claude-sdk/test/schemas.json @@ -37,11 +37,11 @@ }, { "name": "close_forum", - "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"grievance\":{\"description\":\"the grievance kind\",\"type\":\"string\"}},\"required\":[\"grievance\"],\"type\":\"object\"}" + "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"grievance\":{\"description\":\"the grievance kind: lowercase snake_case, starting with a letter, at most 48 characters (e.g. toll_command)\",\"pattern\":\"^[a-z][a-z0-9_]{0,47}$\",\"type\":\"string\"}},\"required\":[\"grievance\"],\"type\":\"object\"}" }, { "name": "close_office", - "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"institution\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"office\":{\"description\":\"the office's name\",\"type\":\"string\"}},\"required\":[\"institution\",\"office\"],\"type\":\"object\"}" + "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"institution\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"office\":{\"description\":\"the office's name: lowercase snake_case, starting with a letter, at most 48 characters (e.g. toll_command)\",\"pattern\":\"^[a-z][a-z0-9_]{0,47}$\",\"type\":\"string\"}},\"required\":[\"institution\",\"office\"],\"type\":\"object\"}" }, { "name": "close_route", @@ -57,15 +57,15 @@ }, { "name": "create_commitment", - "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"checks\":{\"items\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"at\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing place\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"precondition\":{\"const\":\"present\",\"type\":\"string\"}},\"required\":[\"precondition\",\"at\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"precondition\":{\"const\":\"reachable\",\"type\":\"string\"},\"to\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing place\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"within\":{\"maximum\":525600,\"minimum\":1,\"type\":\"integer\"}},\"required\":[\"precondition\",\"to\",\"within\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"at_least\":{\"maximum\":18446744073709551615,\"minimum\":1,\"type\":\"integer\"},\"precondition\":{\"const\":\"holds\",\"type\":\"string\"},\"resource\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing resource\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"precondition\",\"resource\",\"at_least\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"kind\":{\"description\":\"the authority kind\",\"type\":\"string\"},\"over\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"over\":{\"const\":\"subject\",\"type\":\"string\"},\"ref\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"over\",\"ref\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"over\":{\"const\":\"place_subtree\",\"type\":\"string\"},\"ref\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing place\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"over\",\"ref\"],\"type\":\"object\"}]},\"precondition\":{\"const\":\"authorized\",\"type\":\"string\"}},\"required\":[\"precondition\",\"over\",\"kind\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"grievance\":{\"description\":\"the grievance kind\",\"type\":\"string\"},\"precondition\":{\"const\":\"has_standing\",\"type\":\"string\"}},\"required\":[\"precondition\",\"grievance\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"at_least\":{\"enum\":[\"doubted\",\"believed\",\"certain\"],\"type\":\"string\"},\"fact\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing fact\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"precondition\":{\"const\":\"knows\",\"type\":\"string\"}},\"required\":[\"precondition\",\"fact\",\"at_least\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"precondition\":{\"const\":\"can_broadcast\",\"type\":\"string\"},\"via\":{\"anyOf\":[{\"const\":\"colocated\",\"type\":\"string\"},{\"additionalProperties\":false,\"properties\":{\"channel\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing channel\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"channel\"],\"type\":\"object\"}]}},\"required\":[\"precondition\",\"via\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"precondition\":{\"const\":\"can_reach\",\"type\":\"string\"},\"subject\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"via\":{\"anyOf\":[{\"const\":\"colocated\",\"type\":\"string\"},{\"additionalProperties\":false,\"properties\":{\"channel\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing channel\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"channel\"],\"type\":\"object\"}]}},\"required\":[\"precondition\",\"subject\",\"via\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"kind\":{\"enum\":[\"routine\",\"obligation\",\"goal\"],\"type\":\"string\"},\"precondition\":{\"const\":\"committed\",\"type\":\"string\"},\"to\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"precondition\",\"to\",\"kind\"],\"type\":\"object\"}]},\"type\":\"array\"},\"counterparty\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},{\"type\":\"null\"}]},\"due\":{\"description\":\"a reading of the world clock in fictional minutes; the prompt states the current reading, and a due must be later than it\",\"maximum\":18446744073709551615,\"minimum\":0,\"type\":\"integer\"},\"kind\":{\"enum\":[\"routine\",\"obligation\",\"goal\"],\"type\":\"string\"},\"period\":{\"anyOf\":[{\"maximum\":525600,\"minimum\":1,\"type\":\"integer\"},{\"type\":\"null\"}]},\"statement\":{\"description\":\"what is promised, as the promisor would say it in one sentence\",\"type\":\"string\"},\"subject\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"subject\",\"counterparty\",\"kind\",\"due\",\"period\",\"checks\",\"statement\"],\"type\":\"object\"}" + "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"checks\":{\"items\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"at\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing place\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"precondition\":{\"const\":\"present\",\"type\":\"string\"}},\"required\":[\"precondition\",\"at\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"precondition\":{\"const\":\"reachable\",\"type\":\"string\"},\"to\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing place\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"within\":{\"maximum\":525600,\"minimum\":1,\"type\":\"integer\"}},\"required\":[\"precondition\",\"to\",\"within\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"at_least\":{\"maximum\":18446744073709551615,\"minimum\":1,\"type\":\"integer\"},\"precondition\":{\"const\":\"holds\",\"type\":\"string\"},\"resource\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing resource\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"precondition\",\"resource\",\"at_least\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"kind\":{\"description\":\"the authority kind: lowercase snake_case, starting with a letter, at most 48 characters (e.g. toll_command)\",\"pattern\":\"^[a-z][a-z0-9_]{0,47}$\",\"type\":\"string\"},\"over\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"over\":{\"const\":\"subject\",\"type\":\"string\"},\"ref\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"over\",\"ref\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"over\":{\"const\":\"place_subtree\",\"type\":\"string\"},\"ref\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing place\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"over\",\"ref\"],\"type\":\"object\"}]},\"precondition\":{\"const\":\"authorized\",\"type\":\"string\"}},\"required\":[\"precondition\",\"over\",\"kind\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"grievance\":{\"description\":\"the grievance kind: lowercase snake_case, starting with a letter, at most 48 characters (e.g. toll_command)\",\"pattern\":\"^[a-z][a-z0-9_]{0,47}$\",\"type\":\"string\"},\"precondition\":{\"const\":\"has_standing\",\"type\":\"string\"}},\"required\":[\"precondition\",\"grievance\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"at_least\":{\"enum\":[\"doubted\",\"believed\",\"certain\"],\"type\":\"string\"},\"fact\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing fact\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"precondition\":{\"const\":\"knows\",\"type\":\"string\"}},\"required\":[\"precondition\",\"fact\",\"at_least\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"precondition\":{\"const\":\"can_broadcast\",\"type\":\"string\"},\"via\":{\"anyOf\":[{\"const\":\"colocated\",\"type\":\"string\"},{\"additionalProperties\":false,\"properties\":{\"channel\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing channel\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"channel\"],\"type\":\"object\"}]}},\"required\":[\"precondition\",\"via\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"precondition\":{\"const\":\"can_reach\",\"type\":\"string\"},\"subject\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"via\":{\"anyOf\":[{\"const\":\"colocated\",\"type\":\"string\"},{\"additionalProperties\":false,\"properties\":{\"channel\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing channel\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"channel\"],\"type\":\"object\"}]}},\"required\":[\"precondition\",\"subject\",\"via\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"kind\":{\"enum\":[\"routine\",\"obligation\",\"goal\"],\"type\":\"string\"},\"precondition\":{\"const\":\"committed\",\"type\":\"string\"},\"to\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"precondition\",\"to\",\"kind\"],\"type\":\"object\"}]},\"type\":\"array\"},\"counterparty\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},{\"type\":\"null\"}]},\"due\":{\"description\":\"a reading of the world clock in fictional minutes; the prompt states the current reading, and a due must be later than it\",\"maximum\":18446744073709551615,\"minimum\":0,\"type\":\"integer\"},\"kind\":{\"enum\":[\"routine\",\"obligation\",\"goal\"],\"type\":\"string\"},\"period\":{\"anyOf\":[{\"maximum\":525600,\"minimum\":1,\"type\":\"integer\"},{\"type\":\"null\"}]},\"statement\":{\"description\":\"what is promised, as the promisor would say it in one sentence\",\"type\":\"string\"},\"subject\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"subject\",\"counterparty\",\"kind\",\"due\",\"period\",\"checks\",\"statement\"],\"type\":\"object\"}" }, { "name": "declare_affordance", - "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"carries_speech\":{\"type\":\"boolean\"},\"effect_slots\":{\"items\":{\"additionalProperties\":false,\"properties\":{\"bounds\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"bound\":{\"const\":\"none\",\"type\":\"string\"}},\"required\":[\"bound\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"bound\":{\"const\":\"quantity\",\"type\":\"string\"},\"max\":{\"maximum\":18446744073709551615,\"minimum\":1,\"type\":\"integer\"}},\"required\":[\"bound\",\"max\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"bound\":{\"const\":\"cost\",\"type\":\"string\"},\"max\":{\"maximum\":525600,\"minimum\":1,\"type\":\"integer\"}},\"required\":[\"bound\",\"max\"],\"type\":\"object\"}]},\"op_kind\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"op\":{\"const\":\"relocate\",\"type\":\"string\"}},\"required\":[\"op\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"op\":{\"const\":\"open_route\",\"type\":\"string\"}},\"required\":[\"op\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"op\":{\"const\":\"close_route\",\"type\":\"string\"}},\"required\":[\"op\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"op\":{\"const\":\"alter_cost\",\"type\":\"string\"}},\"required\":[\"op\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"op\":{\"const\":\"transfer\",\"type\":\"string\"}},\"required\":[\"op\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"op\":{\"const\":\"transform\",\"type\":\"string\"}},\"required\":[\"op\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"op\":{\"const\":\"consume\",\"type\":\"string\"}},\"required\":[\"op\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"op\":{\"const\":\"bind\",\"type\":\"string\"}},\"required\":[\"op\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"op\":{\"const\":\"release\",\"type\":\"string\"}},\"required\":[\"op\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"kind\":{\"description\":\"the authority kind\",\"type\":\"string\"},\"op\":{\"const\":\"grant_authority\",\"type\":\"string\"}},\"required\":[\"op\",\"kind\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"kind\":{\"description\":\"the authority kind\",\"type\":\"string\"},\"op\":{\"const\":\"revoke_authority\",\"type\":\"string\"}},\"required\":[\"op\",\"kind\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"office\":{\"description\":\"the office's name\",\"type\":\"string\"},\"op\":{\"const\":\"install_incumbent\",\"type\":\"string\"}},\"required\":[\"op\",\"office\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"office\":{\"description\":\"the office's name\",\"type\":\"string\"},\"op\":{\"const\":\"vacate_office\",\"type\":\"string\"}},\"required\":[\"op\",\"office\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"confidence\":{\"enum\":[\"doubted\",\"believed\",\"certain\"],\"type\":\"string\"},\"op\":{\"const\":\"acquire_knowledge\",\"type\":\"string\"}},\"required\":[\"op\",\"confidence\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"op\":{\"const\":\"forget\",\"type\":\"string\"}},\"required\":[\"op\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"horizon\":{\"maximum\":525600,\"minimum\":1,\"type\":\"integer\"},\"kind\":{\"enum\":[\"routine\",\"obligation\",\"goal\"],\"type\":\"string\"},\"op\":{\"const\":\"create_commitment\",\"type\":\"string\"},\"period\":{\"anyOf\":[{\"maximum\":525600,\"minimum\":1,\"type\":\"integer\"},{\"type\":\"null\"}]}},\"required\":[\"op\",\"kind\",\"horizon\",\"period\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"by\":{\"maximum\":4294967295,\"minimum\":1,\"type\":\"integer\"},\"op\":{\"const\":\"advance_pressure\",\"type\":\"string\"}},\"required\":[\"op\",\"by\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"by\":{\"maximum\":4294967295,\"minimum\":1,\"type\":\"integer\"},\"op\":{\"const\":\"reduce_pressure\",\"type\":\"string\"}},\"required\":[\"op\",\"by\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"op\":{\"const\":\"resolve_pressure\",\"type\":\"string\"}},\"required\":[\"op\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"decay\":{\"anyOf\":[{\"maximum\":525600,\"minimum\":1,\"type\":\"integer\"},{\"type\":\"null\"}]},\"delta\":{\"maximum\":100,\"minimum\":-100,\"type\":\"integer\"},\"op\":{\"const\":\"adjust_attitude\",\"type\":\"string\"}},\"required\":[\"op\",\"delta\",\"decay\"],\"type\":\"object\"}]},\"roles\":{\"items\":{\"description\":\"a declared role name\",\"type\":\"string\"},\"type\":\"array\"}},\"required\":[\"op_kind\",\"roles\",\"bounds\"],\"type\":\"object\"},\"type\":\"array\"},\"handle\":{\"description\":\"a new draft handle, unique within this patch\",\"type\":\"string\"},\"kind\":{\"description\":\"the affordance's tool name\",\"type\":\"string\"},\"outcome_bands\":{\"items\":{\"additionalProperties\":false,\"properties\":{\"effects\":{\"items\":{\"maximum\":4294967295,\"minimum\":0,\"type\":\"integer\"},\"type\":\"array\"},\"weight\":{\"maximum\":4294967295,\"minimum\":1,\"type\":\"integer\"}},\"required\":[\"weight\",\"effects\"],\"type\":\"object\"},\"type\":\"array\"},\"preconditions\":{\"items\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"at\":{\"description\":\"a declared role name\",\"type\":\"string\"},\"precondition\":{\"const\":\"present\",\"type\":\"string\"}},\"required\":[\"precondition\",\"at\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"precondition\":{\"const\":\"reachable\",\"type\":\"string\"},\"to\":{\"description\":\"a declared role name\",\"type\":\"string\"},\"within\":{\"maximum\":525600,\"minimum\":1,\"type\":\"integer\"}},\"required\":[\"precondition\",\"to\",\"within\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"at_least\":{\"maximum\":18446744073709551615,\"minimum\":1,\"type\":\"integer\"},\"precondition\":{\"const\":\"holds\",\"type\":\"string\"},\"resource\":{\"description\":\"a declared role name\",\"type\":\"string\"}},\"required\":[\"precondition\",\"resource\",\"at_least\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"kind\":{\"description\":\"the authority kind\",\"type\":\"string\"},\"over\":{\"description\":\"a declared role name\",\"type\":\"string\"},\"precondition\":{\"const\":\"authorized\",\"type\":\"string\"}},\"required\":[\"precondition\",\"over\",\"kind\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"grievance\":{\"description\":\"the grievance kind\",\"type\":\"string\"},\"precondition\":{\"const\":\"has_standing\",\"type\":\"string\"}},\"required\":[\"precondition\",\"grievance\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"at_least\":{\"enum\":[\"doubted\",\"believed\",\"certain\"],\"type\":\"string\"},\"fact\":{\"description\":\"a declared role name\",\"type\":\"string\"},\"precondition\":{\"const\":\"knows\",\"type\":\"string\"}},\"required\":[\"precondition\",\"fact\",\"at_least\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"precondition\":{\"const\":\"can_broadcast\",\"type\":\"string\"},\"via\":{\"anyOf\":[{\"const\":\"colocated\",\"type\":\"string\"},{\"additionalProperties\":false,\"properties\":{\"channel\":{\"description\":\"a declared role name\",\"type\":\"string\"}},\"required\":[\"channel\"],\"type\":\"object\"}]}},\"required\":[\"precondition\",\"via\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"precondition\":{\"const\":\"can_reach\",\"type\":\"string\"},\"subject\":{\"description\":\"a declared role name\",\"type\":\"string\"},\"via\":{\"anyOf\":[{\"const\":\"colocated\",\"type\":\"string\"},{\"additionalProperties\":false,\"properties\":{\"channel\":{\"description\":\"a declared role name\",\"type\":\"string\"}},\"required\":[\"channel\"],\"type\":\"object\"}]}},\"required\":[\"precondition\",\"subject\",\"via\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"kind\":{\"enum\":[\"routine\",\"obligation\",\"goal\"],\"type\":\"string\"},\"precondition\":{\"const\":\"committed\",\"type\":\"string\"},\"to\":{\"description\":\"a declared role name\",\"type\":\"string\"}},\"required\":[\"precondition\",\"to\",\"kind\"],\"type\":\"object\"}]},\"type\":\"array\"},\"roles\":{\"items\":{\"additionalProperties\":false,\"properties\":{\"kind\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"kind\":{\"anyOf\":[{\"enum\":[\"person\",\"institution\",\"population\"],\"type\":\"string\"},{\"type\":\"null\"}]},\"namespace\":{\"const\":\"subject\",\"type\":\"string\"}},\"required\":[\"namespace\",\"kind\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"kind\":{\"enum\":[\"place\",\"resource\",\"fact\",\"channel\"],\"type\":\"string\"},\"namespace\":{\"const\":\"entity\",\"type\":\"string\"}},\"required\":[\"namespace\",\"kind\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"kind\":{\"enum\":[\"route\"],\"type\":\"string\"},\"namespace\":{\"const\":\"edge\",\"type\":\"string\"}},\"required\":[\"namespace\",\"kind\"],\"type\":\"object\"}]},\"role\":{\"description\":\"the slot's parameter name\",\"type\":\"string\"}},\"required\":[\"role\",\"kind\"],\"type\":\"object\"},\"type\":\"array\"}},\"required\":[\"handle\",\"kind\",\"roles\",\"preconditions\",\"effect_slots\",\"outcome_bands\",\"carries_speech\"],\"type\":\"object\"}" + "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"carries_speech\":{\"type\":\"boolean\"},\"effect_slots\":{\"items\":{\"additionalProperties\":false,\"properties\":{\"bounds\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"bound\":{\"const\":\"none\",\"type\":\"string\"}},\"required\":[\"bound\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"bound\":{\"const\":\"quantity\",\"type\":\"string\"},\"max\":{\"maximum\":18446744073709551615,\"minimum\":1,\"type\":\"integer\"}},\"required\":[\"bound\",\"max\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"bound\":{\"const\":\"cost\",\"type\":\"string\"},\"max\":{\"maximum\":525600,\"minimum\":1,\"type\":\"integer\"}},\"required\":[\"bound\",\"max\"],\"type\":\"object\"}]},\"op_kind\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"op\":{\"const\":\"relocate\",\"type\":\"string\"}},\"required\":[\"op\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"op\":{\"const\":\"open_route\",\"type\":\"string\"}},\"required\":[\"op\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"op\":{\"const\":\"close_route\",\"type\":\"string\"}},\"required\":[\"op\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"op\":{\"const\":\"alter_cost\",\"type\":\"string\"}},\"required\":[\"op\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"op\":{\"const\":\"transfer\",\"type\":\"string\"}},\"required\":[\"op\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"op\":{\"const\":\"transform\",\"type\":\"string\"}},\"required\":[\"op\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"op\":{\"const\":\"consume\",\"type\":\"string\"}},\"required\":[\"op\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"op\":{\"const\":\"bind\",\"type\":\"string\"}},\"required\":[\"op\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"op\":{\"const\":\"release\",\"type\":\"string\"}},\"required\":[\"op\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"kind\":{\"description\":\"the authority kind: lowercase snake_case, starting with a letter, at most 48 characters (e.g. toll_command)\",\"pattern\":\"^[a-z][a-z0-9_]{0,47}$\",\"type\":\"string\"},\"op\":{\"const\":\"grant_authority\",\"type\":\"string\"}},\"required\":[\"op\",\"kind\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"kind\":{\"description\":\"the authority kind: lowercase snake_case, starting with a letter, at most 48 characters (e.g. toll_command)\",\"pattern\":\"^[a-z][a-z0-9_]{0,47}$\",\"type\":\"string\"},\"op\":{\"const\":\"revoke_authority\",\"type\":\"string\"}},\"required\":[\"op\",\"kind\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"office\":{\"description\":\"the office's name: lowercase snake_case, starting with a letter, at most 48 characters (e.g. toll_command)\",\"pattern\":\"^[a-z][a-z0-9_]{0,47}$\",\"type\":\"string\"},\"op\":{\"const\":\"install_incumbent\",\"type\":\"string\"}},\"required\":[\"op\",\"office\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"office\":{\"description\":\"the office's name: lowercase snake_case, starting with a letter, at most 48 characters (e.g. toll_command)\",\"pattern\":\"^[a-z][a-z0-9_]{0,47}$\",\"type\":\"string\"},\"op\":{\"const\":\"vacate_office\",\"type\":\"string\"}},\"required\":[\"op\",\"office\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"confidence\":{\"enum\":[\"doubted\",\"believed\",\"certain\"],\"type\":\"string\"},\"op\":{\"const\":\"acquire_knowledge\",\"type\":\"string\"}},\"required\":[\"op\",\"confidence\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"op\":{\"const\":\"forget\",\"type\":\"string\"}},\"required\":[\"op\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"horizon\":{\"maximum\":525600,\"minimum\":1,\"type\":\"integer\"},\"kind\":{\"enum\":[\"routine\",\"obligation\",\"goal\"],\"type\":\"string\"},\"op\":{\"const\":\"create_commitment\",\"type\":\"string\"},\"period\":{\"anyOf\":[{\"maximum\":525600,\"minimum\":1,\"type\":\"integer\"},{\"type\":\"null\"}]}},\"required\":[\"op\",\"kind\",\"horizon\",\"period\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"by\":{\"maximum\":4294967295,\"minimum\":1,\"type\":\"integer\"},\"op\":{\"const\":\"advance_pressure\",\"type\":\"string\"}},\"required\":[\"op\",\"by\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"by\":{\"maximum\":4294967295,\"minimum\":1,\"type\":\"integer\"},\"op\":{\"const\":\"reduce_pressure\",\"type\":\"string\"}},\"required\":[\"op\",\"by\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"op\":{\"const\":\"resolve_pressure\",\"type\":\"string\"}},\"required\":[\"op\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"decay\":{\"anyOf\":[{\"maximum\":525600,\"minimum\":1,\"type\":\"integer\"},{\"type\":\"null\"}]},\"delta\":{\"maximum\":100,\"minimum\":-100,\"type\":\"integer\"},\"op\":{\"const\":\"adjust_attitude\",\"type\":\"string\"}},\"required\":[\"op\",\"delta\",\"decay\"],\"type\":\"object\"}]},\"roles\":{\"items\":{\"description\":\"a declared role name\",\"type\":\"string\"},\"type\":\"array\"}},\"required\":[\"op_kind\",\"roles\",\"bounds\"],\"type\":\"object\"},\"type\":\"array\"},\"handle\":{\"description\":\"a new draft handle, unique within this patch\",\"type\":\"string\"},\"kind\":{\"description\":\"the affordance's tool name: lowercase snake_case, starting with a letter, at most 48 characters (e.g. toll_command)\",\"pattern\":\"^[a-z][a-z0-9_]{0,47}$\",\"type\":\"string\"},\"outcome_bands\":{\"items\":{\"additionalProperties\":false,\"properties\":{\"effects\":{\"items\":{\"maximum\":4294967295,\"minimum\":0,\"type\":\"integer\"},\"type\":\"array\"},\"weight\":{\"maximum\":4294967295,\"minimum\":1,\"type\":\"integer\"}},\"required\":[\"weight\",\"effects\"],\"type\":\"object\"},\"type\":\"array\"},\"preconditions\":{\"items\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"at\":{\"description\":\"a declared role name\",\"type\":\"string\"},\"precondition\":{\"const\":\"present\",\"type\":\"string\"}},\"required\":[\"precondition\",\"at\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"precondition\":{\"const\":\"reachable\",\"type\":\"string\"},\"to\":{\"description\":\"a declared role name\",\"type\":\"string\"},\"within\":{\"maximum\":525600,\"minimum\":1,\"type\":\"integer\"}},\"required\":[\"precondition\",\"to\",\"within\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"at_least\":{\"maximum\":18446744073709551615,\"minimum\":1,\"type\":\"integer\"},\"precondition\":{\"const\":\"holds\",\"type\":\"string\"},\"resource\":{\"description\":\"a declared role name\",\"type\":\"string\"}},\"required\":[\"precondition\",\"resource\",\"at_least\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"kind\":{\"description\":\"the authority kind: lowercase snake_case, starting with a letter, at most 48 characters (e.g. toll_command)\",\"pattern\":\"^[a-z][a-z0-9_]{0,47}$\",\"type\":\"string\"},\"over\":{\"description\":\"a declared role name\",\"type\":\"string\"},\"precondition\":{\"const\":\"authorized\",\"type\":\"string\"}},\"required\":[\"precondition\",\"over\",\"kind\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"grievance\":{\"description\":\"the grievance kind: lowercase snake_case, starting with a letter, at most 48 characters (e.g. toll_command)\",\"pattern\":\"^[a-z][a-z0-9_]{0,47}$\",\"type\":\"string\"},\"precondition\":{\"const\":\"has_standing\",\"type\":\"string\"}},\"required\":[\"precondition\",\"grievance\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"at_least\":{\"enum\":[\"doubted\",\"believed\",\"certain\"],\"type\":\"string\"},\"fact\":{\"description\":\"a declared role name\",\"type\":\"string\"},\"precondition\":{\"const\":\"knows\",\"type\":\"string\"}},\"required\":[\"precondition\",\"fact\",\"at_least\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"precondition\":{\"const\":\"can_broadcast\",\"type\":\"string\"},\"via\":{\"anyOf\":[{\"const\":\"colocated\",\"type\":\"string\"},{\"additionalProperties\":false,\"properties\":{\"channel\":{\"description\":\"a declared role name\",\"type\":\"string\"}},\"required\":[\"channel\"],\"type\":\"object\"}]}},\"required\":[\"precondition\",\"via\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"precondition\":{\"const\":\"can_reach\",\"type\":\"string\"},\"subject\":{\"description\":\"a declared role name\",\"type\":\"string\"},\"via\":{\"anyOf\":[{\"const\":\"colocated\",\"type\":\"string\"},{\"additionalProperties\":false,\"properties\":{\"channel\":{\"description\":\"a declared role name\",\"type\":\"string\"}},\"required\":[\"channel\"],\"type\":\"object\"}]}},\"required\":[\"precondition\",\"subject\",\"via\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"kind\":{\"enum\":[\"routine\",\"obligation\",\"goal\"],\"type\":\"string\"},\"precondition\":{\"const\":\"committed\",\"type\":\"string\"},\"to\":{\"description\":\"a declared role name\",\"type\":\"string\"}},\"required\":[\"precondition\",\"to\",\"kind\"],\"type\":\"object\"}]},\"type\":\"array\"},\"roles\":{\"items\":{\"additionalProperties\":false,\"properties\":{\"kind\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"kind\":{\"anyOf\":[{\"enum\":[\"person\",\"institution\",\"population\"],\"type\":\"string\"},{\"type\":\"null\"}]},\"namespace\":{\"const\":\"subject\",\"type\":\"string\"}},\"required\":[\"namespace\",\"kind\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"kind\":{\"enum\":[\"place\",\"resource\",\"fact\",\"channel\"],\"type\":\"string\"},\"namespace\":{\"const\":\"entity\",\"type\":\"string\"}},\"required\":[\"namespace\",\"kind\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"kind\":{\"enum\":[\"route\"],\"type\":\"string\"},\"namespace\":{\"const\":\"edge\",\"type\":\"string\"}},\"required\":[\"namespace\",\"kind\"],\"type\":\"object\"}]},\"role\":{\"description\":\"the slot's parameter name\",\"type\":\"string\"}},\"required\":[\"role\",\"kind\"],\"type\":\"object\"},\"type\":\"array\"}},\"required\":[\"handle\",\"kind\",\"roles\",\"preconditions\",\"effect_slots\",\"outcome_bands\",\"carries_speech\"],\"type\":\"object\"}" }, { "name": "declare_attitude", - "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"basis\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"basis\":{\"const\":\"prejudice\",\"type\":\"string\"}},\"required\":[\"basis\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"basis\":{\"const\":\"rumour\",\"type\":\"string\"},\"fact\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing fact\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"basis\",\"fact\"],\"type\":\"object\"}]},\"decay\":{\"anyOf\":[{\"maximum\":525600,\"minimum\":1,\"type\":\"integer\"},{\"type\":\"null\"}]},\"delta\":{\"maximum\":100,\"minimum\":-100,\"type\":\"integer\"},\"holder\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"toward\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"of\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"toward\":{\"const\":\"subject\",\"type\":\"string\"}},\"required\":[\"toward\",\"of\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"of\":{\"description\":\"the trait's name\",\"type\":\"string\"},\"toward\":{\"const\":\"trait\",\"type\":\"string\"}},\"required\":[\"toward\",\"of\"],\"type\":\"object\"}]}},\"required\":[\"holder\",\"toward\",\"delta\",\"basis\",\"decay\"],\"type\":\"object\"}" + "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"basis\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"basis\":{\"const\":\"prejudice\",\"type\":\"string\"}},\"required\":[\"basis\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"basis\":{\"const\":\"rumour\",\"type\":\"string\"},\"fact\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing fact\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"basis\",\"fact\"],\"type\":\"object\"}]},\"decay\":{\"anyOf\":[{\"maximum\":525600,\"minimum\":1,\"type\":\"integer\"},{\"type\":\"null\"}]},\"delta\":{\"maximum\":100,\"minimum\":-100,\"type\":\"integer\"},\"holder\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"toward\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"of\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"toward\":{\"const\":\"subject\",\"type\":\"string\"}},\"required\":[\"toward\",\"of\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"of\":{\"description\":\"the trait's name: lowercase snake_case, starting with a letter, at most 48 characters (e.g. toll_command)\",\"pattern\":\"^[a-z][a-z0-9_]{0,47}$\",\"type\":\"string\"},\"toward\":{\"const\":\"trait\",\"type\":\"string\"}},\"required\":[\"toward\",\"of\"],\"type\":\"object\"}]}},\"required\":[\"holder\",\"toward\",\"delta\",\"basis\",\"decay\"],\"type\":\"object\"}" }, { "name": "declare_channel", @@ -85,7 +85,7 @@ }, { "name": "declare_route", - "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"access\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"access\":{\"const\":\"public\",\"type\":\"string\"}},\"required\":[\"access\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"access\":{\"const\":\"restricted\",\"type\":\"string\"},\"requires\":{\"description\":\"the authority kind that opens this route\",\"type\":\"string\"}},\"required\":[\"access\",\"requires\"],\"type\":\"object\"}]},\"cost\":{\"maximum\":525600,\"minimum\":1,\"type\":\"integer\"},\"from\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing place\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"handle\":{\"description\":\"a new draft handle, unique within this patch\",\"type\":\"string\"},\"label\":{\"description\":\"a display label\",\"type\":\"string\"},\"to\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing place\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"handle\",\"label\",\"from\",\"to\",\"access\",\"cost\"],\"type\":\"object\"}" + "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"access\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"access\":{\"const\":\"public\",\"type\":\"string\"}},\"required\":[\"access\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"access\":{\"const\":\"restricted\",\"type\":\"string\"},\"requires\":{\"description\":\"the authority kind that opens this route: lowercase snake_case, starting with a letter, at most 48 characters (e.g. toll_command)\",\"pattern\":\"^[a-z][a-z0-9_]{0,47}$\",\"type\":\"string\"}},\"required\":[\"access\",\"requires\"],\"type\":\"object\"}]},\"cost\":{\"maximum\":525600,\"minimum\":1,\"type\":\"integer\"},\"from\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing place\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"handle\":{\"description\":\"a new draft handle, unique within this patch\",\"type\":\"string\"},\"label\":{\"description\":\"a display label\",\"type\":\"string\"},\"to\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing place\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"handle\",\"label\",\"from\",\"to\",\"access\",\"cost\"],\"type\":\"object\"}" }, { "name": "declare_subject", @@ -93,7 +93,7 @@ }, { "name": "declare_trait", - "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"fact\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing fact\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"name\":{\"description\":\"the trait's name\",\"type\":\"string\"},\"subject\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"subject\",\"name\",\"fact\"],\"type\":\"object\"}" + "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"fact\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing fact\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"name\":{\"description\":\"the trait's name: lowercase snake_case, starting with a letter, at most 48 characters (e.g. toll_command)\",\"pattern\":\"^[a-z][a-z0-9_]{0,47}$\",\"type\":\"string\"},\"subject\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"subject\",\"name\",\"fact\"],\"type\":\"object\"}" }, { "name": "discharge_commitment", @@ -113,11 +113,11 @@ }, { "name": "grant_authority", - "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"grant\":{\"additionalProperties\":false,\"properties\":{\"kind\":{\"description\":\"the authority kind\",\"type\":\"string\"},\"over\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"over\":{\"const\":\"subject\",\"type\":\"string\"},\"ref\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"over\",\"ref\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"over\":{\"const\":\"place_subtree\",\"type\":\"string\"},\"ref\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing place\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"over\",\"ref\"],\"type\":\"object\"}]}},\"required\":[\"kind\",\"over\"],\"type\":\"object\"},\"holder\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"holder\",\"grant\"],\"type\":\"object\"}" + "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"grant\":{\"additionalProperties\":false,\"properties\":{\"kind\":{\"description\":\"the authority kind: lowercase snake_case, starting with a letter, at most 48 characters (e.g. toll_command)\",\"pattern\":\"^[a-z][a-z0-9_]{0,47}$\",\"type\":\"string\"},\"over\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"over\":{\"const\":\"subject\",\"type\":\"string\"},\"ref\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"over\",\"ref\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"over\":{\"const\":\"place_subtree\",\"type\":\"string\"},\"ref\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing place\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"over\",\"ref\"],\"type\":\"object\"}]}},\"required\":[\"kind\",\"over\"],\"type\":\"object\"},\"holder\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"holder\",\"grant\"],\"type\":\"object\"}" }, { "name": "install_incumbent", - "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"incumbent\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"institution\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"office\":{\"description\":\"the office's name\",\"type\":\"string\"}},\"required\":[\"institution\",\"office\",\"incumbent\"],\"type\":\"object\"}" + "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"incumbent\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"institution\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"office\":{\"description\":\"the office's name: lowercase snake_case, starting with a letter, at most 48 characters (e.g. toll_command)\",\"pattern\":\"^[a-z][a-z0-9_]{0,47}$\",\"type\":\"string\"}},\"required\":[\"institution\",\"office\",\"incumbent\"],\"type\":\"object\"}" }, { "name": "mint", @@ -125,11 +125,11 @@ }, { "name": "open_forum", - "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"forum\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"grievance\":{\"description\":\"the grievance kind\",\"type\":\"string\"},\"standing\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"over\":{\"const\":\"subject\",\"type\":\"string\"},\"ref\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"over\",\"ref\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"over\":{\"const\":\"place_subtree\",\"type\":\"string\"},\"ref\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing place\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"over\",\"ref\"],\"type\":\"object\"}]}},\"required\":[\"grievance\",\"forum\",\"standing\"],\"type\":\"object\"}" + "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"forum\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"grievance\":{\"description\":\"the grievance kind: lowercase snake_case, starting with a letter, at most 48 characters (e.g. toll_command)\",\"pattern\":\"^[a-z][a-z0-9_]{0,47}$\",\"type\":\"string\"},\"standing\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"over\":{\"const\":\"subject\",\"type\":\"string\"},\"ref\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"over\",\"ref\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"over\":{\"const\":\"place_subtree\",\"type\":\"string\"},\"ref\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing place\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"over\",\"ref\"],\"type\":\"object\"}]}},\"required\":[\"grievance\",\"forum\",\"standing\"],\"type\":\"object\"}" }, { "name": "open_office", - "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"delegated\":{\"items\":{\"description\":\"an authority kind the office lends\",\"type\":\"string\"},\"type\":\"array\"},\"institution\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"office\":{\"description\":\"the office's name\",\"type\":\"string\"}},\"required\":[\"institution\",\"office\",\"delegated\"],\"type\":\"object\"}" + "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"delegated\":{\"items\":{\"description\":\"an authority kind the office lends: lowercase snake_case, starting with a letter, at most 48 characters (e.g. toll_command)\",\"pattern\":\"^[a-z][a-z0-9_]{0,47}$\",\"type\":\"string\"},\"type\":\"array\"},\"institution\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"office\":{\"description\":\"the office's name: lowercase snake_case, starting with a letter, at most 48 characters (e.g. toll_command)\",\"pattern\":\"^[a-z][a-z0-9_]{0,47}$\",\"type\":\"string\"}},\"required\":[\"institution\",\"office\",\"delegated\"],\"type\":\"object\"}" }, { "name": "open_route", @@ -169,7 +169,7 @@ }, { "name": "revoke_authority", - "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"grant\":{\"additionalProperties\":false,\"properties\":{\"kind\":{\"description\":\"the authority kind\",\"type\":\"string\"},\"over\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"over\":{\"const\":\"subject\",\"type\":\"string\"},\"ref\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"over\",\"ref\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"over\":{\"const\":\"place_subtree\",\"type\":\"string\"},\"ref\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing place\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"over\",\"ref\"],\"type\":\"object\"}]}},\"required\":[\"kind\",\"over\"],\"type\":\"object\"},\"holder\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"holder\",\"grant\"],\"type\":\"object\"}" + "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"grant\":{\"additionalProperties\":false,\"properties\":{\"kind\":{\"description\":\"the authority kind: lowercase snake_case, starting with a letter, at most 48 characters (e.g. toll_command)\",\"pattern\":\"^[a-z][a-z0-9_]{0,47}$\",\"type\":\"string\"},\"over\":{\"anyOf\":[{\"additionalProperties\":false,\"properties\":{\"over\":{\"const\":\"subject\",\"type\":\"string\"},\"ref\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"over\",\"ref\"],\"type\":\"object\"},{\"additionalProperties\":false,\"properties\":{\"over\":{\"const\":\"place_subtree\",\"type\":\"string\"},\"ref\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing place\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"over\",\"ref\"],\"type\":\"object\"}]}},\"required\":[\"kind\",\"over\"],\"type\":\"object\"},\"holder\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"}},\"required\":[\"holder\",\"grant\"],\"type\":\"object\"}" }, { "name": "set_controller", @@ -201,7 +201,7 @@ }, { "name": "vacate_office", - "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"institution\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"office\":{\"description\":\"the office's name\",\"type\":\"string\"}},\"required\":[\"institution\",\"office\"],\"type\":\"object\"}" + "parameters_json": "{\"additionalProperties\":false,\"properties\":{\"institution\":{\"additionalProperties\":false,\"properties\":{\"ref\":{\"enum\":[\"draft\",\"existing\"],\"type\":\"string\"},\"value\":{\"description\":\"a draft handle declared in this same patch, or the canonical id of an existing subject\",\"type\":\"string\"}},\"required\":[\"ref\",\"value\"],\"type\":\"object\"},\"office\":{\"description\":\"the office's name: lowercase snake_case, starting with a letter, at most 48 characters (e.g. toll_command)\",\"pattern\":\"^[a-z][a-z0-9_]{0,47}$\",\"type\":\"string\"}},\"required\":[\"institution\",\"office\"],\"type\":\"object\"}" }, { "name": "witness",