support Extra Tags in NIP89

This commit is contained in:
dbth 2025-02-10 11:36:30 +01:00
parent cf2c701670
commit b9cef9cd23
5 changed files with 17 additions and 5 deletions

View File

@ -137,6 +137,7 @@ class DVMTaskInterface:
nip89.PK = self.PRIVATE_KEY
nip89.DTAG = nip89config.DTAG
nip89.CONTENT = nip89config.CONTENT
nip89.EXTRA_TAGS = nip89config.EXTRA_TAGS
return nip89
async def is_input_supported(self, tags, client=None, dvm_config=None) -> bool:

View File

@ -34,7 +34,7 @@ async def nip89_announce_tasks(dvm_config, client):
keys = Keys.parse(dvm_config.NIP89.PK)
content = dvm_config.NIP89.CONTENT
tags += dvm_config.EXTRA_TAGS
tags += dvm_config.NIP89.EXTRA_TAGS
event = EventBuilder(EventDefinitions.KIND_ANNOUNCEMENT, content).tags(tags).sign_with_keys(keys)

View File

@ -90,8 +90,8 @@ async def nostr_client():
await client.subscribe(mcp_filter, None)
#await nostr_client_test_mcp_get_tools()
#await nostr_client_test_mcp_execute_tool(tool_name="get-crypto-price", tool_parameters={"symbol": "BTC"})
await nostr_client_test_mcp_execute_tool(tool_name="echo_tool", tool_parameters={"message": "Hello"})
await nostr_client_test_mcp_execute_tool(tool_name="get-crypto-price", tool_parameters={"symbol": "BTC"})
#await nostr_client_test_mcp_execute_tool(tool_name="echo_tool", tool_parameters={"message": "Hello"})
class NotificationHandler(HandleNotification):

View File

@ -7,7 +7,18 @@
"mcp-crypto-price": {
"command": "node",
"args": [
"/Volumes/Home/~/Documents/mcp-crypto-price/build/index.js"
"../../mcp-crypto-price/build/index.js"
]
},
"Echo": {
"command": "uv",
"args": [
"run",
"--with",
"mcp[cli]",
"mcp",
"run",
"tests/mcp_server.py"
]
}
}

View File

@ -102,4 +102,4 @@ if __name__ == '__main__':
else:
raise FileNotFoundError(f'.env file not found at {env_path} ')
playground(announce=False)
playground(announce=True)