feat(runtime): v0.0.25 — AgentIdentity pallet wired runtime composition Index 9

Phase 2.7 AGENT IDENTITY pallet wired canonical en frame_support::runtime macro
como Index 9 (post-Fees Index 8). 9 → 10 pallets composed canonical. Config trait
RuntimeEvent association wired canonical (pattern Provenance + Fees mirror).

## Changes

- crates/origin-chain-runtime/src/lib.rs:298 — Index 9 pub type AgentIdentity = origin_chain_agent_identity::Pallet<Runtime>
- crates/origin-chain-runtime/src/configs.rs:362 — impl origin_chain_agent_identity::Config for Runtime { type RuntimeEvent = RuntimeEvent }
- crates/origin-chain-runtime/Cargo.toml — origin-chain-agent-identity workspace dep + std feature
- crates/origin-chain-node/src/main.rs — 9 → 10 pallets listed + AgentIdentity Index 9 highlighted [Phase 2.7 scaffold v0.0.25]
- crates/origin-chain-agent-identity/src/lib.rs — Config constraint AccountId = origin_chain_types::AccountId REMOVED (usa T::AccountId generic compatible runtime ChainAccountId AccountId32) + storage updated + events updated

## Verification

- cargo build -p origin-chain-runtime 5.26s clean
- cargo test --workspace — 149 tests passing, 0 failures
- cargo build --release -p origin-chain-node 3.96s clean
- origin-chain-node info muestra 10 pallets canonical

🔌 Phase 2.7 wired canonical. Real impl v0.0.26 next.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
davidherranandClaude Opus 4.7 committed 2026-05-25 06:40:29 -05:00
1 parent 37ccf1e95a
commit 46a0188a1d
7 files changed
+91 -14

No files matched your search

+11 -11
View File
@@ -116,7 +116,7 @@ pub mod pallet {
/// - Custom origin canonical para Hybrid agent registration (governance)
/// - Pallet weights canonical desde benchmarking real
#[pallet::config]
pub trait Config: frame_system::Config<AccountId = origin_chain_types::AccountId> {
pub trait Config: frame_system::Config {
/// Runtime event type canonical wired into `RuntimeEvent` aggregate.
type RuntimeEvent: From<Event<Self>>
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;
@@ -136,16 +136,16 @@ pub mod pallet {
#[pallet::storage]
#[pallet::getter(fn identity_of)]
pub type Identities<T: Config> =
StorageMap<_, Blake2_128Concat, origin_chain_types::AccountId, AgentIdentity, OptionQuery>;
StorageMap<_, Blake2_128Concat, T::AccountId, AgentIdentity, OptionQuery>;
/// Reverse lookup canonical: `DidToAccount<StorageMap<Did, AccountId>>`.
/// Reverse lookup canonical: `DidToAccount<StorageMap<Did, T::AccountId>>`.
///
/// O(1) lookup canonical desde DID → AccountId canonical para cross-pillar
/// O(1) lookup canonical desde DID → T::AccountId canonical para cross-pillar
/// consumers (Codex .odoc author resolution, Trinity asset co-author lookup).
#[pallet::storage]
#[pallet::getter(fn account_of_did)]
pub type DidToAccount<T: Config> =
StorageMap<_, Blake2_128Concat, Did, origin_chain_types::AccountId, OptionQuery>;
StorageMap<_, Blake2_128Concat, Did, T::AccountId, OptionQuery>;
/// Events emisión canonical (CHN-7 + Inmutable #41).
#[pallet::event]
@@ -155,8 +155,8 @@ pub mod pallet {
///
/// Materializa Inmutable #41 Cross-Species Co-authorship compile-detect.
AgentRegistered {
/// AccountId canonical del agent registered.
account: origin_chain_types::AccountId,
/// T::AccountId del agent registered canonical.
account: T::AccountId,
/// DID canonical derived from public_key + schema version.
did: Did,
/// AgentKind canonical (Human + AGI + Hybrid).
@@ -167,8 +167,8 @@ pub mod pallet {
/// Inmutable #41 cross-species explicit canonical — emitted SOLO cuando
/// `agent_chain` canonical non-empty (Hybrid o collaborative registration).
AgentBound {
/// AccountId canonical del agent.
account: origin_chain_types::AccountId,
/// T::AccountId del agent canonical.
account: T::AccountId,
/// Number canonical de co-authors en agent_chain.
co_author_count: u32,
},
@@ -177,8 +177,8 @@ pub mod pallet {
/// Phase 2.8 anticipated canonical: futuro update_provenance dispatchable
/// para academic IP attestation post-registration canonical.
AgentUpdated {
/// AccountId canonical del agent.
account: origin_chain_types::AccountId,
/// T::AccountId del agent canonical.
account: T::AccountId,
},
}