diff --git a/Cargo.lock b/Cargo.lock index 35152d51..b600b2e9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2835,7 +2835,7 @@ dependencies = [ "didbot-attest", "vibescrobble-hook", "vibescrobble-hookd", - "vibescrobble-lexicon", + "didbot-lexicon", "vibescrobble-mcp", "vibescrobble-pds", "vibescrobble-repo", @@ -2856,7 +2856,7 @@ dependencies = [ "subtle", "thiserror", "time", - "vibescrobble-lexicon", + "didbot-lexicon", ] [[package]] @@ -2900,11 +2900,11 @@ dependencies = [ "tower-http", "tracing", "tracing-subscriber", - "vibescrobble-lexicon", + "didbot-lexicon", ] [[package]] -name = "vibescrobble-lexicon" +name = "didbot-lexicon" version = "0.1.0" dependencies = [ "serde", @@ -2930,7 +2930,7 @@ dependencies = [ "unicode-segmentation", "unicode-width 0.2.2", "vibescrobble-hook", - "vibescrobble-lexicon", + "didbot-lexicon", "vibescrobble-pds", ] @@ -2952,7 +2952,7 @@ dependencies = [ "tracing-subscriber", "unicode-segmentation", "didbot-attest", - "vibescrobble-lexicon", + "didbot-lexicon", "vibescrobble-repo", ] @@ -3052,7 +3052,7 @@ dependencies = [ "tracing", "tracing-subscriber", "didbot-attest", - "vibescrobble-lexicon", + "didbot-lexicon", "vibescrobble-pds", ] diff --git a/Cargo.toml b/Cargo.toml index 49a7e09e..c2c1e9d2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ vibescrobble-swarm = { version = "0.1.0", path = "crates/vibescrobble-swarm" } vibescrobble-hook = { version = "0.1.0", path = "crates/vibescrobble-hook" } didbot-identity = { version = "0.1.0", path = "crates/didbot-identity" } didbot-key = { version = "0.1.0", path = "crates/didbot-key" } -vibescrobble-lexicon = { version = "0.1.0", path = "crates/vibescrobble-lexicon" } +didbot-lexicon = { version = "0.1.0", path = "crates/didbot-lexicon" } didbot-data = { version = "0.1.0", path = "crates/didbot-data" } vibescrobble-repo = { version = "0.1.0", path = "crates/vibescrobble-repo" } vibescrobble-stack = { version = "0.1.0", path = "crates/vibescrobble-stack" } diff --git a/crates/didbot-attest/Cargo.toml b/crates/didbot-attest/Cargo.toml index 03859967..57b05785 100644 --- a/crates/didbot-attest/Cargo.toml +++ b/crates/didbot-attest/Cargo.toml @@ -10,7 +10,7 @@ publish.workspace = true [dependencies] didbot-key.workspace = true -vibescrobble-lexicon.workspace = true +didbot-lexicon.workspace = true hex.workspace = true hmac.workspace = true serde.workspace = true diff --git a/crates/vibescrobble-lexicon/Cargo.toml b/crates/didbot-lexicon/Cargo.toml similarity index 92% rename from crates/vibescrobble-lexicon/Cargo.toml rename to crates/didbot-lexicon/Cargo.toml index 72ca3cdc..bffb3507 100644 --- a/crates/vibescrobble-lexicon/Cargo.toml +++ b/crates/didbot-lexicon/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "vibescrobble-lexicon" +name = "didbot-lexicon" description = "Lexicon documents and the namespace they live under." version.workspace = true edition.workspace = true diff --git a/crates/vibescrobble-lexicon/src/lexicon.rs b/crates/didbot-lexicon/src/lexicon.rs similarity index 98% rename from crates/vibescrobble-lexicon/src/lexicon.rs rename to crates/didbot-lexicon/src/lexicon.rs index 59451ba4..9a922c06 100644 --- a/crates/vibescrobble-lexicon/src/lexicon.rs +++ b/crates/didbot-lexicon/src/lexicon.rs @@ -95,7 +95,7 @@ embed! { /// Parses every embedded document. /// /// ``` -/// let docs = vibescrobble_lexicon::lexicon::load_all().expect("embedded lexicons parse"); +/// let docs = didbot_lexicon::lexicon::load_all().expect("embedded lexicons parse"); /// assert_eq!(docs.len(), 4); /// ``` pub fn load_all() -> Result, LexiconError> { diff --git a/crates/vibescrobble-lexicon/src/lib.rs b/crates/didbot-lexicon/src/lib.rs similarity index 100% rename from crates/vibescrobble-lexicon/src/lib.rs rename to crates/didbot-lexicon/src/lib.rs diff --git a/crates/vibescrobble-lexicon/src/nsid.rs b/crates/didbot-lexicon/src/nsid.rs similarity index 98% rename from crates/vibescrobble-lexicon/src/nsid.rs rename to crates/didbot-lexicon/src/nsid.rs index c20a7022..5308d6e0 100644 --- a/crates/vibescrobble-lexicon/src/nsid.rs +++ b/crates/didbot-lexicon/src/nsid.rs @@ -18,7 +18,7 @@ pub const AUTHORITY: &str = "zone.quernstone"; /// Builds an NSID under [`AUTHORITY`]. /// /// ``` -/// use vibescrobble_lexicon::nsid; +/// use didbot_lexicon::nsid; /// assert_eq!(nsid::under("scrobble"), "zone.quernstone.scrobble"); /// assert_eq!(nsid::under("agent.vouch"), "zone.quernstone.agent.vouch"); /// ``` diff --git a/crates/vibescrobble-lexicon/src/nsid_syntax.rs b/crates/didbot-lexicon/src/nsid_syntax.rs similarity index 99% rename from crates/vibescrobble-lexicon/src/nsid_syntax.rs rename to crates/didbot-lexicon/src/nsid_syntax.rs index 5e8d8a25..49f72390 100644 --- a/crates/vibescrobble-lexicon/src/nsid_syntax.rs +++ b/crates/didbot-lexicon/src/nsid_syntax.rs @@ -64,7 +64,7 @@ pub enum NsidError { /// Checks a string against the NSID syntax rules. /// /// ``` -/// use vibescrobble_lexicon::nsid_syntax::validate; +/// use didbot_lexicon::nsid_syntax::validate; /// assert!(validate("com.example.fooBar").is_ok()); /// assert!(validate("com.example").is_err()); // no name segment /// assert!(validate("1.0.0.127.record").is_err()); // numeric top-level domain diff --git a/crates/vibescrobble-index/Cargo.toml b/crates/vibescrobble-index/Cargo.toml index 41ebf20b..eca8535f 100644 --- a/crates/vibescrobble-index/Cargo.toml +++ b/crates/vibescrobble-index/Cargo.toml @@ -32,7 +32,7 @@ didbot-identity.workspace = true # Only for `nsid::copies_agree_with_the_definitions`. The indexer reads records # over the wire and names the collections itself; this holds the two in step # while both live in one workspace. -vibescrobble-lexicon.workspace = true +didbot-lexicon.workspace = true [lints] workspace = true diff --git a/crates/vibescrobble-index/src/nsid.rs b/crates/vibescrobble-index/src/nsid.rs index ac32e541..ae17fa56 100644 --- a/crates/vibescrobble-index/src/nsid.rs +++ b/crates/vibescrobble-index/src/nsid.rs @@ -33,7 +33,7 @@ mod tests { /// show up as an indexer that silently reads nothing. #[test] fn copies_agree_with_the_definitions() { - use vibescrobble_lexicon::nsid as defined; + use didbot_lexicon::nsid as defined; assert_eq!(SCROBBLE, defined::SCROBBLE); assert_eq!(AGENT_VOUCH, defined::AGENT_VOUCH); diff --git a/crates/vibescrobble-mcp/Cargo.toml b/crates/vibescrobble-mcp/Cargo.toml index 108a402f..a17c2619 100644 --- a/crates/vibescrobble-mcp/Cargo.toml +++ b/crates/vibescrobble-mcp/Cargo.toml @@ -25,7 +25,7 @@ tracing-subscriber.workspace = true # The identity stamp key is shared with the hook that writes it. Duplicating # the string here would let the two halves drift apart silently. vibescrobble-hook.workspace = true -vibescrobble-lexicon.workspace = true +didbot-lexicon.workspace = true [dev-dependencies] # The personal data server validates every record against its lexicon, so the diff --git a/crates/vibescrobble-mcp/src/lib.rs b/crates/vibescrobble-mcp/src/lib.rs index 46bd9462..cf639c16 100644 --- a/crates/vibescrobble-mcp/src/lib.rs +++ b/crates/vibescrobble-mcp/src/lib.rs @@ -52,6 +52,7 @@ use std::{ }; use axum::Router; +use didbot_lexicon::nsid; use rmcp::{ model::{ CacheScope, CallToolRequestParams, CallToolResponse, CallToolResult, ContentBlock, @@ -70,7 +71,6 @@ use unicode_width::UnicodeWidthStr; use vibescrobble_hook::{ AGENT_TYPE_KEY, EFFORT_KEY, MODEL_KEY, PARENT_KEY, SCROBBLE_INSTRUCTIONS, STAMP_KEY, TURN_KEY, }; -use vibescrobble_lexicon::nsid; /// The name of the only tool this server exposes. /// @@ -1749,7 +1749,7 @@ mod tests { // A value this crate accepts but the schema forbids is a record the // repository will refuse, which costs the agent the sentence it was // actually trying to say. - let embedded = vibescrobble_lexicon::lexicon::EMBEDDED + let embedded = didbot_lexicon::lexicon::EMBEDDED .iter() .find(|e| e.path.ends_with("zone/quernstone/scrobble.json")) .expect("the scrobble lexicon is embedded"); @@ -2243,7 +2243,7 @@ mod tests { // The number in the tool description and the number in the schema // document are the same number, or a model obeys one limit while the // record is validated against another. - let embedded = vibescrobble_lexicon::lexicon::EMBEDDED + let embedded = didbot_lexicon::lexicon::EMBEDDED .iter() .find(|e| e.path.ends_with("zone/quernstone/scrobble.json")) .expect("the scrobble lexicon is embedded"); @@ -2275,7 +2275,7 @@ mod tests { #[test] fn the_lexicon_requires_the_emoji_and_describes_it() { - let embedded = vibescrobble_lexicon::lexicon::EMBEDDED + let embedded = didbot_lexicon::lexicon::EMBEDDED .iter() .find(|e| e.path.ends_with("zone/quernstone/scrobble.json")) .expect("the scrobble lexicon is embedded"); diff --git a/crates/vibescrobble-mcp/tests/create_record.rs b/crates/vibescrobble-mcp/tests/create_record.rs index f383a6c8..966504d2 100644 --- a/crates/vibescrobble-mcp/tests/create_record.rs +++ b/crates/vibescrobble-mcp/tests/create_record.rs @@ -7,11 +7,11 @@ use std::sync::{Arc, Mutex}; +use didbot_lexicon::nsid; use tokio::io::{AsyncReadExt, AsyncWriteExt}; use tokio::net::TcpListener; use unicode_segmentation::UnicodeSegmentation; use vibescrobble_hook::{STAMP_KEY, TURN_KEY}; -use vibescrobble_lexicon::nsid; use vibescrobble_mcp::{parse_arguments, PdsClient, PdsError, ScrobbleServer}; /// What the stub saw: the request line, the whole header block, and the body diff --git a/crates/vibescrobble-pds/Cargo.toml b/crates/vibescrobble-pds/Cargo.toml index e8f5c39e..c47e3644 100644 --- a/crates/vibescrobble-pds/Cargo.toml +++ b/crates/vibescrobble-pds/Cargo.toml @@ -23,7 +23,7 @@ didbot-name.workspace = true didbot-key.workspace = true didbot-data.workspace = true vibescrobble-repo.workspace = true -vibescrobble-lexicon.workspace = true +didbot-lexicon.workspace = true [dev-dependencies] tracing-subscriber.workspace = true diff --git a/crates/vibescrobble-pds/src/aturi.rs b/crates/vibescrobble-pds/src/aturi.rs index 2afe6d64..b015d0f2 100644 --- a/crates/vibescrobble-pds/src/aturi.rs +++ b/crates/vibescrobble-pds/src/aturi.rs @@ -10,7 +10,7 @@ //! | Part | Owner | //! | --- | --- | //! | authority — a DID or a handle | [`didbot_identity`] | -//! | collection — an NSID | [`vibescrobble_lexicon::nsid_syntax`] | +//! | collection — an NSID | [`didbot_lexicon::nsid_syntax`] | //! | record key | [`crate::records::validate_record_key`] | //! //! # Only the restricted form @@ -24,7 +24,7 @@ //! changes it wants its own type, not a looser version of this one. use didbot_identity::{validate_did, validate_handle}; -use vibescrobble_lexicon::nsid_syntax; +use didbot_lexicon::nsid_syntax; use crate::records::{validate_record_key, RecordKeyError}; diff --git a/crates/vibescrobble-pds/src/bsky.rs b/crates/vibescrobble-pds/src/bsky.rs index f34a761d..2e67b1a3 100644 --- a/crates/vibescrobble-pds/src/bsky.rs +++ b/crates/vibescrobble-pds/src/bsky.rs @@ -48,7 +48,7 @@ use time::format_description::well_known::Rfc3339; /// /// A lexicon this project did not author and does not hold, so records under /// it are stored unvalidated, as any foreign collection is. The constant is -/// here rather than in [`vibescrobble_lexicon::nsid`], which is the list of +/// here rather than in [`didbot_lexicon::nsid`], which is the list of /// the NSIDs this project defines. pub const ACTOR_PROFILE: &str = "app.bsky.actor.profile"; diff --git a/crates/vibescrobble-pds/src/format/mod.rs b/crates/vibescrobble-pds/src/format/mod.rs index f9435371..77220b9c 100644 --- a/crates/vibescrobble-pds/src/format/mod.rs +++ b/crates/vibescrobble-pds/src/format/mod.rs @@ -125,7 +125,7 @@ pub fn check(format: StringFormat, value: &str) -> Result<(), String> { didbot_identity::validate_handle(value) .map_err(|handle| format!("not a did ({did}); not a handle ({handle})")) }), - StringFormat::Nsid => vibescrobble_lexicon::nsid_syntax::validate(value).map_err(stringly), + StringFormat::Nsid => didbot_lexicon::nsid_syntax::validate(value).map_err(stringly), StringFormat::Cid => cid::validate(value).map_err(stringly), StringFormat::Datetime => datetime::validate(value).map_err(stringly), StringFormat::Language => language::validate(value).map_err(stringly), diff --git a/crates/vibescrobble-pds/src/provision.rs b/crates/vibescrobble-pds/src/provision.rs index 9df08a48..ea847b8c 100644 --- a/crates/vibescrobble-pds/src/provision.rs +++ b/crates/vibescrobble-pds/src/provision.rs @@ -2162,7 +2162,7 @@ where // about the account and the store knows only about repositories. Only // the scrobble collection is gated: the switch is about what an agent // narrates, not about whether it has a repository. - if collection == vibescrobble_lexicon::nsid::SCROBBLE && !account.scrobbling { + if collection == didbot_lexicon::nsid::SCROBBLE && !account.scrobbling { tracing::info!("scrobble refused: scrobbling is off for this account"); return Err(ProvisionError::ScrobblingDisabled { did: account.did.as_str().to_owned(), diff --git a/crates/vibescrobble-pds/src/records.rs b/crates/vibescrobble-pds/src/records.rs index 97c7237d..5a048f74 100644 --- a/crates/vibescrobble-pds/src/records.rs +++ b/crates/vibescrobble-pds/src/records.rs @@ -138,7 +138,7 @@ pub enum RecordError { collection: String, /// Which of the NSID syntax rules it broke. #[source] - source: vibescrobble_lexicon::nsid_syntax::NsidError, + source: didbot_lexicon::nsid_syntax::NsidError, }, /// The caller demanded explicit validation and this server holds no /// lexicon for the collection. @@ -240,7 +240,7 @@ pub enum RecordError { /// implement. /// /// Unreachable for the documents this binary embeds — a unit test in - /// `vibescrobble-lexicon` asserts every one of them uses a strategy that + /// `didbot-lexicon` asserts every one of them uses a strategy that /// is recognised, and [`resolve_key`] implements every strategy that test /// admits. It exists so that adding a lexicon with `key: "nsid"` fails /// loudly at the first write instead of silently minting a TID, which is @@ -575,7 +575,7 @@ pub trait RecordStore: Send + Sync { /// assert!(validate_collection("post").is_err()); /// ``` pub fn validate_collection(collection: &str) -> Result<(), RecordError> { - vibescrobble_lexicon::nsid_syntax::validate(collection).map_err(|source| { + didbot_lexicon::nsid_syntax::validate(collection).map_err(|source| { RecordError::MalformedCollection { collection: collection.to_owned(), source, @@ -655,7 +655,7 @@ pub fn validation_status(collection: &str, stance: Stance) -> &'static str { /// the shape of the record, it is this deployment's rule about its own /// repositories. Putting it in the document would be publishing a claim about /// somebody else's server. -pub const SERVER_AUTHORED: &[&str] = &[vibescrobble_lexicon::nsid::ACTOR_REGISTRATION]; +pub const SERVER_AUTHORED: &[&str] = &[didbot_lexicon::nsid::ACTOR_REGISTRATION]; /// Whether a collection is one only this server writes. /// @@ -1029,7 +1029,7 @@ pub enum ResolvedKey { /// /// ``` /// use vibescrobble_pds::records::{resolve_key, ResolvedKey}; -/// use vibescrobble_lexicon::nsid; +/// use didbot_lexicon::nsid; /// /// // A singleton lands at `self` whether or not the caller says so. /// assert_eq!( diff --git a/crates/vibescrobble-pds/src/registration.rs b/crates/vibescrobble-pds/src/registration.rs index 8d48e7d5..7ced68c9 100644 --- a/crates/vibescrobble-pds/src/registration.rs +++ b/crates/vibescrobble-pds/src/registration.rs @@ -65,7 +65,7 @@ use crate::account::AgentAccount; use crate::ledger::{AgentLedger, LedgerEvent}; /// The collection this module writes. -pub const COLLECTION: &str = vibescrobble_lexicon::nsid::ACTOR_REGISTRATION; +pub const COLLECTION: &str = didbot_lexicon::nsid::ACTOR_REGISTRATION; /// The union member this server composes today. /// diff --git a/crates/vibescrobble-pds/src/schema/check.rs b/crates/vibescrobble-pds/src/schema/check.rs index b78c4985..08451686 100644 --- a/crates/vibescrobble-pds/src/schema/check.rs +++ b/crates/vibescrobble-pds/src/schema/check.rs @@ -652,7 +652,7 @@ mod tests { use serde_json::json; fn catalog(document: Value) -> Catalog { - let doc: vibescrobble_lexicon::lexicon::LexiconDoc = + let doc: didbot_lexicon::lexicon::LexiconDoc = serde_json::from_value(document).expect("the test document parses"); Catalog::from_documents(std::iter::once(&doc)).expect("the test document is a schema") } diff --git a/crates/vibescrobble-pds/src/schema/mod.rs b/crates/vibescrobble-pds/src/schema/mod.rs index 929570b3..fad5dbff 100644 --- a/crates/vibescrobble-pds/src/schema/mod.rs +++ b/crates/vibescrobble-pds/src/schema/mod.rs @@ -1,6 +1,6 @@ //! Lexicon schemas, as a typed tree a record can be checked against. //! -//! `vibescrobble-lexicon` embeds the documents and checks that they are well +//! `didbot-lexicon` embeds the documents and checks that they are well //! formed; it deliberately stops there, because validating a *record* needs //! the identifier validators — DIDs, handles, TIDs, record keys, `at://` URIs //! — and those live at or below this crate. So the schema model lives here, @@ -252,10 +252,7 @@ impl Catalog { } /// Adds one parsed lexicon document. - pub fn insert( - &mut self, - doc: &vibescrobble_lexicon::lexicon::LexiconDoc, - ) -> Result<(), SchemaError> { + pub fn insert(&mut self, doc: &didbot_lexicon::lexicon::LexiconDoc) -> Result<(), SchemaError> { let mut defs = BTreeMap::new(); for (name, body) in &doc.defs { defs.insert( @@ -269,7 +266,7 @@ impl Catalog { /// Builds a catalog from parsed documents. pub fn from_documents<'a>( - docs: impl IntoIterator, + docs: impl IntoIterator, ) -> Result { let mut catalog = Self::new(); for doc in docs { @@ -283,11 +280,11 @@ impl Catalog { /// Built once and shared. Failure is a defect in a document this binary /// was compiled from, so it is reported as an empty catalog rather than /// panicking at an arbitrary first write; the unit tests in this module - /// and in `vibescrobble-lexicon` are what actually catch it. + /// and in `didbot-lexicon` are what actually catch it. pub fn embedded() -> &'static Self { static EMBEDDED: std::sync::OnceLock = std::sync::OnceLock::new(); EMBEDDED.get_or_init(|| { - let docs = match vibescrobble_lexicon::lexicon::load_all() { + let docs = match didbot_lexicon::lexicon::load_all() { Ok(docs) => docs, Err(error) => { tracing::error!(%error, "embedded lexicons did not parse"); @@ -761,11 +758,11 @@ mod tests { #[test] fn every_embedded_lexicon_becomes_a_schema() { - let docs = vibescrobble_lexicon::lexicon::load_all().expect("embedded lexicons parse"); + let docs = didbot_lexicon::lexicon::load_all().expect("embedded lexicons parse"); let catalog = Catalog::from_documents(&docs).expect("embedded lexicons are valid schemas"); let mut collections = catalog.record_collections(); collections.sort_unstable(); - let mut known = vibescrobble_lexicon::nsid::ALL.to_vec(); + let mut known = didbot_lexicon::nsid::ALL.to_vec(); known.sort_unstable(); assert_eq!(collections, known); } @@ -774,18 +771,18 @@ mod tests { fn the_shared_catalog_is_not_empty() { // `embedded` degrades to an empty catalog rather than panicking, so // the assertion that it built is worth making once. - assert!(Catalog::embedded().defines_record(vibescrobble_lexicon::nsid::SCROBBLE)); + assert!(Catalog::embedded().defines_record(didbot_lexicon::nsid::SCROBBLE)); } #[test] fn a_collections_key_strategy_comes_off_its_record_definition() { let catalog = Catalog::embedded(); assert_eq!( - catalog.record_key(vibescrobble_lexicon::nsid::SCROBBLE), + catalog.record_key(didbot_lexicon::nsid::SCROBBLE), Some("tid") ); assert_eq!( - catalog.record_key(vibescrobble_lexicon::nsid::ACTOR_REGISTRATION), + catalog.record_key(didbot_lexicon::nsid::ACTOR_REGISTRATION), Some("literal:self") ); assert_eq!(catalog.record_key("com.example.nothing"), None); @@ -793,16 +790,15 @@ mod tests { #[test] fn refs_resolve_in_all_three_written_forms() { - let doc: vibescrobble_lexicon::lexicon::LexiconDoc = - serde_json::from_value(serde_json::json!({ - "lexicon": 1, - "id": "com.example.thing", - "defs": { - "main": {"type": "record", "key": "tid", "record": {"type": "object"}}, - "side": {"type": "object"} - } - })) - .expect("a hand-written document parses"); + let doc: didbot_lexicon::lexicon::LexiconDoc = serde_json::from_value(serde_json::json!({ + "lexicon": 1, + "id": "com.example.thing", + "defs": { + "main": {"type": "record", "key": "tid", "record": {"type": "object"}}, + "side": {"type": "object"} + } + })) + .expect("a hand-written document parses"); let catalog = Catalog::from_documents(std::iter::once(&doc)).expect("valid"); assert!(catalog.resolve("com.example.thing", "#side").is_some()); diff --git a/crates/vibescrobble-pds/tests/actor_registration.rs b/crates/vibescrobble-pds/tests/actor_registration.rs index 12e59406..5c6c9e07 100644 --- a/crates/vibescrobble-pds/tests/actor_registration.rs +++ b/crates/vibescrobble-pds/tests/actor_registration.rs @@ -10,8 +10,8 @@ //! host without its identifier are each refused, and each refusal names the //! field. +use didbot_lexicon::nsid; use serde_json::{json, Value}; -use vibescrobble_lexicon::nsid; use vibescrobble_pds::records::validate_shape; /// The fields every kind carries, with `actor` left to the caller. diff --git a/crates/vibescrobble-pds/tests/authored.rs b/crates/vibescrobble-pds/tests/authored.rs index 2166e1fd..81edd3a1 100644 --- a/crates/vibescrobble-pds/tests/authored.rs +++ b/crates/vibescrobble-pds/tests/authored.rs @@ -14,7 +14,7 @@ use didbot_identity::Zone; use serde_json::{json, Value}; use time::{Duration, OffsetDateTime}; use didbot_attest::{AttestationClaim, SharedSecretBackend}; -use vibescrobble_lexicon::nsid; +use didbot_lexicon::nsid; use vibescrobble_pds::records::{ guard_server_authored, server_authored, validate_removal, SERVER_AUTHORED, }; diff --git a/crates/vibescrobble-pds/tests/born.rs b/crates/vibescrobble-pds/tests/born.rs index 001398e8..377eec6b 100644 --- a/crates/vibescrobble-pds/tests/born.rs +++ b/crates/vibescrobble-pds/tests/born.rs @@ -17,7 +17,7 @@ use didbot_identity::Zone; use serde_json::Value; use time::OffsetDateTime; use didbot_attest::{AttestationClaim, SharedSecretBackend}; -use vibescrobble_lexicon::nsid; +use didbot_lexicon::nsid; use vibescrobble_pds::{ bsky, ListParams, MemoryAccountStore, Naming, ProvisionRequest, Provisioner, RecordingCommitSink, RegistrationFacts, Registry, diff --git a/crates/vibescrobble-pds/tests/records.rs b/crates/vibescrobble-pds/tests/records.rs index fd7d9e81..d9e28196 100644 --- a/crates/vibescrobble-pds/tests/records.rs +++ b/crates/vibescrobble-pds/tests/records.rs @@ -10,7 +10,7 @@ use didbot_identity::Zone; use serde_json::json; use time::OffsetDateTime; use didbot_attest::{AttestationClaim, SharedSecretBackend}; -use vibescrobble_lexicon::nsid; +use didbot_lexicon::nsid; use vibescrobble_pds::{ LifecycleEvent, ListParams, MemoryAccountStore, MemoryRecordStore, Precondition, ProvisionError, ProvisionRequest, Provisioner, RecordError, RecordStore, RecordingCommitSink, diff --git a/crates/vibescrobble-pds/tests/registration.rs b/crates/vibescrobble-pds/tests/registration.rs index 081c4d8b..c0c6f7cf 100644 --- a/crates/vibescrobble-pds/tests/registration.rs +++ b/crates/vibescrobble-pds/tests/registration.rs @@ -13,7 +13,7 @@ use didbot_name::{NameError as NamerError, Namer, Seed}; use serde_json::Value; use time::{Duration, OffsetDateTime}; use didbot_attest::{AttestationClaim, SharedSecretBackend}; -use vibescrobble_lexicon::nsid; +use didbot_lexicon::nsid; use vibescrobble_pds::{ registration, Durable, FileAccountStore, LedgerStore, ListParams, MemoryAccountStore, MemoryLedger, Naming, ProvisionRequest, Provisioner, Registry, diff --git a/crates/vibescrobble-serve/src/routes.rs b/crates/vibescrobble-serve/src/routes.rs index 0f38003c..7d2c89e6 100644 --- a/crates/vibescrobble-serve/src/routes.rs +++ b/crates/vibescrobble-serve/src/routes.rs @@ -900,7 +900,7 @@ fn unnameable_record(subject: &str, error: &vibescrobble_pds::RecordError) -> Ap /// # What `collections` now means /// /// It was always derived from what the repository holds rather than from -/// `vibescrobble_lexicon::nsid::ALL`, so nothing here changed when the +/// `didbot_lexicon::nsid::ALL`, so nothing here changed when the /// collection set opened — but what a reader may conclude from it did. /// The list is a report of what this account has written and never a menu of /// what it may write, because there is no longer any such menu. A collection diff --git a/crates/vibescrobble-swarm/Cargo.toml b/crates/vibescrobble-swarm/Cargo.toml index 1673d121..9b18da69 100644 --- a/crates/vibescrobble-swarm/Cargo.toml +++ b/crates/vibescrobble-swarm/Cargo.toml @@ -22,7 +22,7 @@ tracing-subscriber.workspace = true # Provisioning is attested like anything else, so the swarm signs its own # claims rather than reaching past the check it is meant to be exercising. didbot-attest.workspace = true -vibescrobble-lexicon.workspace = true +didbot-lexicon.workspace = true [dev-dependencies] # The personal data server validates every record against its lexicon, so the diff --git a/crates/vibescrobble-swarm/src/lib.rs b/crates/vibescrobble-swarm/src/lib.rs index 0df1f6b3..9d88c7fd 100644 --- a/crates/vibescrobble-swarm/src/lib.rs +++ b/crates/vibescrobble-swarm/src/lib.rs @@ -21,11 +21,11 @@ use std::sync::atomic::{AtomicU64, Ordering}; use std::sync::Arc; use didbot_attest::SharedSecretBackend; +use didbot_lexicon::nsid; use rand::rngs::StdRng; use rand::{Rng, SeedableRng}; use serde::Deserialize; use time::OffsetDateTime; -use vibescrobble_lexicon::nsid; use vocabulary::{Phase, Project, EFFORTS, NAMES, PHASES, PROJECTS}; diff --git a/crates/vibescrobble/Cargo.toml b/crates/vibescrobble/Cargo.toml index f57564a4..fc3df914 100644 --- a/crates/vibescrobble/Cargo.toml +++ b/crates/vibescrobble/Cargo.toml @@ -17,7 +17,7 @@ didbot-identity.workspace = true didbot-key.workspace = true vibescrobble-pds.workspace = true vibescrobble-serve.workspace = true -vibescrobble-lexicon.workspace = true +didbot-lexicon.workspace = true [dev-dependencies] axum.workspace = true diff --git a/crates/vibescrobble/src/lib.rs b/crates/vibescrobble/src/lib.rs index b6d2dbac..09000c56 100644 --- a/crates/vibescrobble/src/lib.rs +++ b/crates/vibescrobble/src/lib.rs @@ -7,7 +7,7 @@ pub use didbot_identity as identity; pub use didbot_key as key; pub use didbot_attest as attest; pub use vibescrobble_hook as hook; -pub use vibescrobble_lexicon::{lexicon, nsid, nsid_syntax}; +pub use didbot_lexicon::{lexicon, nsid, nsid_syntax}; pub use vibescrobble_pds as pds; pub use vibescrobble_serve as serve; diff --git a/crates/vibescrobble/tests/conformance/records.rs b/crates/vibescrobble/tests/conformance/records.rs index a3c050f8..9085aefe 100644 --- a/crates/vibescrobble/tests/conformance/records.rs +++ b/crates/vibescrobble/tests/conformance/records.rs @@ -12,9 +12,9 @@ use std::path::PathBuf; +use didbot_lexicon::lexicon::LexiconDoc; use serde::Deserialize; use vibescrobble::pds::Catalog; -use vibescrobble_lexicon::lexicon::LexiconDoc; use super::vectors::vendor_dir; diff --git a/plan/account-types.md b/plan/account-types.md index b666d7c0..4feb83f9 100644 --- a/plan/account-types.md +++ b/plan/account-types.md @@ -2,7 +2,7 @@ id: account-types title: Not every account is a session status: open -crates: [vibescrobble-pds, vibescrobble-lexicon, didbot-name, vibescrobble-serve, vibescrobble-hookd] +crates: [vibescrobble-pds, didbot-lexicon, didbot-name, vibescrobble-serve, vibescrobble-hookd] dependsOn: [agent-accounts, provenance] exitCriterion: > A service account provisioned from a CI run keeps its DID and its name across diff --git a/plan/agent-sites.md b/plan/agent-sites.md index 6c3ecf36..28925d4a 100644 --- a/plan/agent-sites.md +++ b/plan/agent-sites.md @@ -2,7 +2,7 @@ id: agent-sites title: An agent publishes a page of its own, at a name the zone already serves status: open -crates: [vibescrobble-pds, vibescrobble-serve, didbot-dns, vibescrobble-lexicon, vibescrobble-index] +crates: [vibescrobble-pds, vibescrobble-serve, didbot-dns, didbot-lexicon, vibescrobble-index] dependsOn: [agent-accounts, pds-writes] exitCriterion: > An agent writes a page, a stranger opens it over HTTPS at a hostname that is diff --git a/plan/labels.md b/plan/labels.md index a56ac8b6..710162be 100644 --- a/plan/labels.md +++ b/plan/labels.md @@ -2,7 +2,7 @@ id: labels title: What is true about an agent arrives as a label an app already draws status: open -crates: [vibescrobble-pds, didbot-identity, vibescrobble-serve, vibescrobble-lexicon] +crates: [vibescrobble-pds, didbot-identity, vibescrobble-serve, didbot-lexicon] dependsOn: [pds-writes, ownership] exitCriterion: > The operator subscribes to this server in a client, and that client draws, on diff --git a/plan/memory.md b/plan/memory.md index c1dbccbd..d3768165 100644 --- a/plan/memory.md +++ b/plan/memory.md @@ -2,7 +2,7 @@ id: memory title: An agent remembers something past the end of its session status: blocked -crates: [vibescrobble-lexicon, vibescrobble-pds, vibescrobble-mcp] +crates: [didbot-lexicon, vibescrobble-pds, vibescrobble-mcp] dependsOn: [pds-writes, write-policy] exitCriterion: > An agent writes a memory, a later agent under the same owner reads it back, diff --git a/plan/mentions.md b/plan/mentions.md index 20203da0..921ab4d7 100644 --- a/plan/mentions.md +++ b/plan/mentions.md @@ -2,7 +2,7 @@ id: mentions title: One agent addresses another, and the other finds out status: blocked -crates: [vibescrobble-lexicon, vibescrobble-pds, vibescrobble-index] +crates: [didbot-lexicon, vibescrobble-pds, vibescrobble-index] dependsOn: [pds-writes, index] exitCriterion: > An agent mentions another, and the mentioned agent's session can list what diff --git a/plan/ownership.md b/plan/ownership.md index ecf1a5bd..6e57995c 100644 --- a/plan/ownership.md +++ b/plan/ownership.md @@ -2,7 +2,7 @@ id: ownership title: The human names the agents and the agents name the human status: open -crates: [vibescrobble-pds, vibescrobble-index, vibescrobble-lexicon] +crates: [vibescrobble-pds, vibescrobble-index, didbot-lexicon] dependsOn: [pds-writes] exitCriterion: > A verifier that trusts neither side confirms an agent and its owner claim diff --git a/plan/policy-store.md b/plan/policy-store.md index 5f37e426..a1aed537 100644 --- a/plan/policy-store.md +++ b/plan/policy-store.md @@ -2,7 +2,7 @@ id: policy-store title: Policy is the owner's record, in the owner's repository status: open -crates: [vibescrobble-pds, vibescrobble-lexicon, vibescrobble-serve] +crates: [vibescrobble-pds, didbot-lexicon, vibescrobble-serve] dependsOn: [ownership] exitCriterion: > The server refuses a request because of a policy record it read out of the diff --git a/plan/provenance.md b/plan/provenance.md index fd3ef13c..17b9f372 100644 --- a/plan/provenance.md +++ b/plan/provenance.md @@ -2,7 +2,7 @@ id: provenance title: A record says which agent, which model, and what spawned it status: open -crates: [didbot-avatar, vibescrobble-hook, vibescrobble-hookd, vibescrobble-lexicon, vibescrobble-pds, vibescrobble-serve, vibescrobble-index] +crates: [didbot-avatar, vibescrobble-hook, vibescrobble-hookd, didbot-lexicon, vibescrobble-pds, vibescrobble-serve, vibescrobble-index] dependsOn: [] exitCriterion: > A reader looking at one record can say which agent wrote it, what model wrote diff --git a/plan/scrobble.md b/plan/scrobble.md index 23937efa..cea37199 100644 --- a/plan/scrobble.md +++ b/plan/scrobble.md @@ -2,7 +2,7 @@ id: scrobble title: An agent says what it is working on, and the statement is its own record status: open -crates: [vibescrobble-mcp, vibescrobble-hookd, vibescrobble-lexicon] +crates: [vibescrobble-mcp, vibescrobble-hookd, didbot-lexicon] dependsOn: [pds-writes] exitCriterion: > A scrobble called in an ordinary session is written to a real personal data diff --git a/prek.toml b/prek.toml index d077be8f..10dcc6a9 100644 --- a/prek.toml +++ b/prek.toml @@ -62,7 +62,7 @@ hooks = [ # a relative link between pages whose target no longer exists. { id = "doc-lint", name = "doc lint", entry = "scripts/doc-lint.sh", language = "system", types = ["file"], files = '^(docs/.*\.md|scripts/doc-lint\.sh)$', pass_filenames = false, stages = ["pre-commit"] }, # The lexicon JSON is the protocol's source of truth and is compiled into - # vibescrobble-lexicon, where the tests assert that every document parses, + # didbot-lexicon, where the tests assert that every document parses, # that its id matches its path, and that the set agrees with the namespace # constants. Running them on a lexicon change catches a rename that touched # the file but not the constant. @@ -88,7 +88,7 @@ hooks = [ { id = "check-plan", name = "check plan", entry = "scripts/check-plan.py", language = "system", files = '^(plan/.*|scripts/check-plan\.py)$', pass_filenames = false, stages = ["pre-commit"] }, { id = "plan-register", name = "plan register", entry = "scripts/gen-plan-readme.py --check", language = "system", files = '^(plan/.*|scripts/(check-plan|gen-plan-readme)\.py)$', pass_filenames = false, stages = ["pre-commit"] }, { id = "shell-parse", name = "shell parse", entry = "bash -c 'for f in \"$@\"; do bash -n \"$f\" || exit 1; done' _", language = "system", files = '^scripts/.*\.sh$', stages = ["pre-commit"] }, - { id = "lexicon-tests", name = "lexicon tests", entry = "cargo test -p vibescrobble-lexicon --all-features", language = "system", types = ["file"], files = '^lexicons/.*\.json$', pass_filenames = false, stages = ["pre-commit"] }, + { id = "lexicon-tests", name = "lexicon tests", entry = "cargo test -p didbot-lexicon --all-features", language = "system", types = ["file"], files = '^lexicons/.*\.json$', pass_filenames = false, stages = ["pre-commit"] }, ] # Conventional Commits, checked as the message is written. It matters more than