mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-06-22 04:21:02 +02:00
support Extra Tags in NIP89
This commit is contained in:
parent
cf2c701670
commit
b9cef9cd23
@ -137,6 +137,7 @@ class DVMTaskInterface:
|
|||||||
nip89.PK = self.PRIVATE_KEY
|
nip89.PK = self.PRIVATE_KEY
|
||||||
nip89.DTAG = nip89config.DTAG
|
nip89.DTAG = nip89config.DTAG
|
||||||
nip89.CONTENT = nip89config.CONTENT
|
nip89.CONTENT = nip89config.CONTENT
|
||||||
|
nip89.EXTRA_TAGS = nip89config.EXTRA_TAGS
|
||||||
return nip89
|
return nip89
|
||||||
|
|
||||||
async def is_input_supported(self, tags, client=None, dvm_config=None) -> bool:
|
async def is_input_supported(self, tags, client=None, dvm_config=None) -> bool:
|
||||||
|
@ -34,7 +34,7 @@ async def nip89_announce_tasks(dvm_config, client):
|
|||||||
keys = Keys.parse(dvm_config.NIP89.PK)
|
keys = Keys.parse(dvm_config.NIP89.PK)
|
||||||
content = dvm_config.NIP89.CONTENT
|
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)
|
event = EventBuilder(EventDefinitions.KIND_ANNOUNCEMENT, content).tags(tags).sign_with_keys(keys)
|
||||||
|
|
||||||
|
@ -90,8 +90,8 @@ async def nostr_client():
|
|||||||
await client.subscribe(mcp_filter, None)
|
await client.subscribe(mcp_filter, None)
|
||||||
|
|
||||||
#await nostr_client_test_mcp_get_tools()
|
#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="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="echo_tool", tool_parameters={"message": "Hello"})
|
||||||
|
|
||||||
|
|
||||||
class NotificationHandler(HandleNotification):
|
class NotificationHandler(HandleNotification):
|
||||||
|
@ -7,7 +7,18 @@
|
|||||||
"mcp-crypto-price": {
|
"mcp-crypto-price": {
|
||||||
"command": "node",
|
"command": "node",
|
||||||
"args": [
|
"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"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,4 +102,4 @@ if __name__ == '__main__':
|
|||||||
else:
|
else:
|
||||||
raise FileNotFoundError(f'.env file not found at {env_path} ')
|
raise FileNotFoundError(f'.env file not found at {env_path} ')
|
||||||
|
|
||||||
playground(announce=False)
|
playground(announce=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user