diff --git a/epiphany-core/src/runtime_spine.rs b/epiphany-core/src/runtime_spine.rs index e32661ed..770a2fbf 100644 --- a/epiphany-core/src/runtime_spine.rs +++ b/epiphany-core/src/runtime_spine.rs @@ -108,7 +108,6 @@ use epiphany_openai_adapter::EpiphanyOpenAiModelReceipt; use epiphany_openai_adapter::EpiphanyOpenAiModelRequest; use epiphany_openai_adapter::EpiphanyOpenAiStreamEvent; use epiphany_openai_adapter::EpiphanyOpenAiStreamPayload; -use epiphany_tool_adapter::EpiphanyToolCapability; use epiphany_tool_adapter::EpiphanyToolInvocationIntent; use epiphany_tool_adapter::EpiphanyToolInvocationReceipt; use epiphany_tool_adapter::TOOL_ADAPTER_INVOCATION_INTENT_SCHEMA_ID; @@ -151,7 +150,6 @@ pub const MODEL_ADAPTER_STATUS_TYPE: &str = "epiphany.model_adapter_status.v0"; pub const MODEL_REQUEST_TYPE: &str = "epiphany.model_request.v0"; pub const MODEL_STREAM_EVENT_TYPE: &str = "epiphany.model_stream_event.v0"; pub const MODEL_RECEIPT_TYPE: &str = "epiphany.model_receipt.v0"; -pub const TOOL_CAPABILITY_TYPE: &str = "epiphany.tool_capability.v0"; pub const TOOL_INVOCATION_INTENT_TYPE: &str = "epiphany.tool_invocation_intent.v0"; pub const TOOL_INVOCATION_RECEIPT_TYPE: &str = "epiphany.tool_invocation_receipt.v0"; pub const RUNTIME_IDENTITY_KEY: &str = "self"; @@ -183,7 +181,6 @@ pub const MODEL_ADAPTER_STATUS_SCHEMA_VERSION: &str = "epiphany.model_adapter_st pub const MODEL_REQUEST_SCHEMA_VERSION: &str = "epiphany.model_request.v0"; pub const MODEL_STREAM_EVENT_SCHEMA_VERSION: &str = "epiphany.model_stream_event.v0"; pub const MODEL_RECEIPT_SCHEMA_VERSION: &str = "epiphany.model_receipt.v0"; -pub const TOOL_CAPABILITY_SCHEMA_VERSION: &str = "epiphany.tool_capability.v0"; pub const TOOL_INVOCATION_INTENT_SCHEMA_VERSION: &str = "epiphany.tool_invocation_intent.v0"; pub const TOOL_INVOCATION_RECEIPT_SCHEMA_VERSION: &str = "epiphany.tool_invocation_receipt.v0"; pub const CULTNET_SCHEMA_INDEX_RELATIVE: &str = "schemas/cultnet/index.json"; @@ -1154,7 +1151,6 @@ pub fn runtime_spine_cache(store_path: impl AsRef) -> Result { cache.register_entry_type::()?; cache.register_entry_type::()?; cache.register_entry_type::()?; - cache.register_entry_type::()?; cache.register_entry_type::()?; cache.register_entry_type::()?; cache.add_generic_backing_store(backing_store); @@ -13780,17 +13776,6 @@ fn epiphany_mutation_contracts() -> Vec { "Terminal model receipts carry provider response id, usage, and transport evidence.", ], ), - mutation_contract( - TOOL_CAPABILITY_TYPE, - TOOL_CAPABILITY_SCHEMA_VERSION, - vec![CultNetDocumentOperation::Snapshot], - CultNetMutationAuthority::ReadOnly, - vec![], - vec![], - vec![ - "Tool capability documents describe adapter-discovered tools without making raw MCP discovery JSON authoritative.", - ], - ), mutation_contract( TOOL_INVOCATION_INTENT_TYPE, TOOL_INVOCATION_INTENT_SCHEMA_VERSION, diff --git a/epiphany-tool-adapter/src/lib.rs b/epiphany-tool-adapter/src/lib.rs index 4a444dd4..7dcdbf4d 100644 --- a/epiphany-tool-adapter/src/lib.rs +++ b/epiphany-tool-adapter/src/lib.rs @@ -1,6 +1,5 @@ use cultcache_rs::DatabaseEntry; -pub const TOOL_ADAPTER_CAPABILITY_SCHEMA_ID: &str = "epiphany.tool_capability.v0"; pub const TOOL_ADAPTER_INVOCATION_INTENT_SCHEMA_ID: &str = "epiphany.tool_invocation_intent.v0"; pub const TOOL_ADAPTER_INVOCATION_RECEIPT_SCHEMA_ID: &str = "epiphany.tool_invocation_receipt.v0"; pub const EPIPHANY_TOOL_RUNTIME_ADAPTER_ID: &str = "epiphany-tools"; @@ -34,47 +33,6 @@ pub fn receipt_output_for_model( .to_string() } -#[derive(Debug, Clone, PartialEq, Eq, DatabaseEntry)] -#[cultcache( - type = "epiphany.tool_capability.v0", - schema = "EpiphanyToolCapability" -)] -pub struct EpiphanyToolCapability { - #[cultcache(key = 0)] - pub schema_id: String, - #[cultcache(key = 1)] - pub capability_id: String, - #[cultcache(key = 2)] - pub adapter: String, - #[cultcache(key = 3)] - pub server: String, - #[cultcache(key = 4)] - pub tool_name: String, - #[cultcache(key = 5, default)] - pub description: Option, - #[cultcache(key = 6, default)] - pub input_schema_json: Option, -} - -impl EpiphanyToolCapability { - pub fn new( - capability_id: impl Into, - adapter: impl Into, - server: impl Into, - tool_name: impl Into, - ) -> Self { - Self { - schema_id: TOOL_ADAPTER_CAPABILITY_SCHEMA_ID.to_string(), - capability_id: capability_id.into(), - adapter: adapter.into(), - server: server.into(), - tool_name: tool_name.into(), - description: None, - input_schema_json: None, - } - } -} - #[derive(Debug, Clone, PartialEq, Eq, DatabaseEntry)] #[cultcache( type = "epiphany.tool_invocation_intent.v0", diff --git a/epiphany-tool-mcp-runtime/src/main.rs b/epiphany-tool-mcp-runtime/src/main.rs index bab86af2..e1622a2f 100644 --- a/epiphany-tool-mcp-runtime/src/main.rs +++ b/epiphany-tool-mcp-runtime/src/main.rs @@ -1,8 +1,8 @@ use anyhow::{Context, Result, anyhow}; use epiphany_tool_adapter::{ EPIPHANY_TOOL_RUNTIME_ADAPTER_ID, EpiphanyToolInvocationIntent, EpiphanyToolInvocationReceipt, - TOOL_ADAPTER_CAPABILITY_SCHEMA_ID, TOOL_ADAPTER_INVOCATION_INTENT_SCHEMA_ID, - TOOL_ADAPTER_INVOCATION_RECEIPT_SCHEMA_ID, tool_invocation_intent_key, + TOOL_ADAPTER_INVOCATION_INTENT_SCHEMA_ID, TOOL_ADAPTER_INVOCATION_RECEIPT_SCHEMA_ID, + tool_invocation_intent_key, }; use epiphany_tool_mcp_runtime::{ McpRuntimeConfig, current_utc_timestamp, execute_epiphany_public, execute_epiphany_source, @@ -236,10 +236,6 @@ fn smoke() -> SmokeSummary { } fn schemas() -> BTreeMap { BTreeMap::from([ - ( - "capability".into(), - TOOL_ADAPTER_CAPABILITY_SCHEMA_ID.into(), - ), ( "intent".into(), TOOL_ADAPTER_INVOCATION_INTENT_SCHEMA_ID.into(), @@ -406,12 +402,7 @@ mod tests { private_state_exposed: false, }, )?; - let grant = epiphany_core::heartbeat_issue_resident_self_grant( - &resident_store, - "schedule-state-tool", - "action-state-tool", - 2, - )? + let grant = epiphany_core::issue_resident_self_grant(&resident_store, 2)? .expect("grant"); let intent = EpiphanyToolInvocationIntent::new( "native-state-read", diff --git a/schemas/cultnet/epiphany.tool-capability.schema.json b/schemas/cultnet/epiphany.tool-capability.schema.json deleted file mode 100644 index 4b8e8461..00000000 --- a/schemas/cultnet/epiphany.tool-capability.schema.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://gamecult.dev/epiphany/cultnet/epiphany.tool-capability.schema.json", - "title": "Epiphany Tool Capability", - "description": "Typed capability advertised by an Epiphany tool adapter. MCP discovery JSON may be the source, but this document is the inspectable Epiphany-facing capability record.", - "type": "object", - "required": ["schema_id", "capability_id", "adapter", "server", "tool_name"], - "properties": { - "schema_id": { "const": "epiphany.tool_capability.v0" }, - "capability_id": { "type": "string" }, - "adapter": { "type": "string" }, - "server": { "type": "string" }, - "tool_name": { "type": "string" }, - "description": { "type": ["string", "null"] }, - "input_schema_json": { "type": ["string", "null"] } - }, - "additionalProperties": false -} diff --git a/schemas/cultnet/index.json b/schemas/cultnet/index.json index 842276b9..1402d915 100644 --- a/schemas/cultnet/index.json +++ b/schemas/cultnet/index.json @@ -144,17 +144,6 @@ "title": "Epiphany Model Receipt", "path": "epiphany.model-receipt.schema.json" }, - { - "schemaId": "https://gamecult.dev/epiphany/cultnet/epiphany.tool-capability.schema.json", - "kind": "document_payload", - "wireContracts": [ - "cultnet.schema.v0" - ], - "schemaVersion": "epiphany.tool_capability.v0", - "documentType": "epiphany.tool_capability.v0", - "title": "Epiphany Tool Capability", - "path": "epiphany.tool-capability.schema.json" - }, { "schemaId": "https://gamecult.dev/epiphany/cultnet/epiphany.tool-invocation-intent.schema.json", "kind": "document_payload",