Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c1bf0b2956 | ||
|
|
d13044d267 | ||
|
|
8bb90a31a5 | ||
|
|
b6ca2bf3bf | ||
|
|
73c368e4e5 | ||
|
|
2a091aabf7 | ||
|
|
c877ca646e | ||
|
|
b5b479e9a8 | ||
|
|
52f1cd3b30 | ||
|
|
09d45febdd | ||
|
|
b9e90f0b21 | ||
|
|
59bd2603e2 | ||
|
|
5e6610823f | ||
|
|
112fe8e5ef | ||
|
|
ed852f16df | ||
|
|
97868b7ed2 | ||
|
|
99e211c94a | ||
|
|
294d1d7c70 | ||
|
|
0fc8af96e4 |
@@ -54,11 +54,11 @@ Skills compose by adoption-list order (`10123`) and trigger tags carry runtime e
|
||||
|
||||
Didactyl will support local inference, which is very privacy preserving. Remote inference does however have it's advantages, and in those cases Didactyl supports using Bitcoin Lightning and eCash inference providers.
|
||||
|
||||
## Current Status — v0.2.31
|
||||
## Current Status — v0.2.49
|
||||
|
||||
**Active build — this project is barely working. Experiment at your own risk.**
|
||||
|
||||
> Last release update: v0.2.31 — Added kind 10050 to genesis.jsonc
|
||||
> Last release update: v0.2.49 — Add startup-failure DM de-dup with marker, relay-state/needed-event diagnostics, and clear-on-READY rearm
|
||||
|
||||
- Connects to configured relays with auto-reconnect and relay state transition logging
|
||||
- Publishes configured startup events per relay as each relay becomes connected
|
||||
|
||||
1
context.logs/20260428T071923_req0001.json
Normal file
1
context.logs/20260428T071923_req0001.json
Normal file
File diff suppressed because one or more lines are too long
15
context.logs/20260428T071923_res0001.json
Normal file
15
context.logs/20260428T071923_res0001.json
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375164-jltZoEFnh01JRUoyFbYw","object":"chat.completion","created":1777375164,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"stop","native_finish_reason":"end_turn","message":{"role":"assistant","content":"Hello! I'm a test agent built with Didactyl. I don't have a specific personal name configured, but I'm here to help you with various tasks using the tools available to me.\n\nI can help you with things like:\n- **Nostr interactions** - posting, querying events, managing profiles, sending DMs, etc.\n- **File operations** - reading and writing local files\n- **Shell commands** - executing commands in the system\n- **Skills management** - creating, editing, and running skills\n- **HTTP requests** - fetching web resources\n- **Wallet operations** - managing Cashu ecash wallets\n- **File hosting** - uploading/downloading files via Blossom\n- And more!\n\nIs there anything specific you'd like me to help you with?","refusal":null,"reasoning":null}}],"usage":{"prompt_tokens":9369,"completion_tokens":178,"total_tokens":9547,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":9366,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0126005,"upstream_inference_prompt_cost":0.0117105,"upstream_inference_completions_cost":0.00089},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T071928_req0002.json
Normal file
1
context.logs/20260428T071928_req0002.json
Normal file
File diff suppressed because one or more lines are too long
31
context.logs/20260428T071928_res0002.json
Normal file
31
context.logs/20260428T071928_res0002.json
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375169-LOcgKM5Oya3Y7QIaAKTG","object":"chat.completion","created":1777375169,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"stop","native_finish_reason":"end_turn","message":{"role":"assistant","content":"I'm **Didactyl**, a Nostr-based AI agent. Here's a brief overview of what I am:\n\n**Core Identity:**\n- An autonomous agent running on the Nostr protocol\n- Equipped with a comprehensive toolkit for interacting with Nostr, managing tasks, handling encrypted communications, and more\n- Designed to be extensible through skills and configurable through various settings\n\n**Key Capabilities:**\n- **Nostr Integration**: Post notes, send encrypted DMs (NIP-04 and NIP-17), manage block lists, handle relays, and query events\n- **Skill System**: Create, adopt, and execute skills that extend my functionality with custom behaviors and triggers\n- **Task Management**: Maintain short-term task memory on Nostr for tracking and managing work\n- **Encrypted Memory**: Store and recall encrypted agent memory and configuration\n- **LLM Configuration**: Flexible model selection and parameter tuning\n- **Ecash/Cashu**: Wallet support for privacy-preserving payments\n- **File Management**: Read/write local files and upload/download via Blossom servers\n- **HTTP Requests**: Fetch external resources\n- **Shell Execution**: Run local commands when needed\n\n**Design Philosophy:**\nI'm built to be a helpful, privacy-conscious assistant that respects decentralized principles. I can operate autonomously or collaboratively, respond to various triggers (DMs, cron jobs, webhooks, subscriptions), and maintain context across conversations through encrypted storage.\n\nIs there something specific you'd like me to help you with?","refusal":null,"reasoning":null}}],"usage":{"prompt_tokens":9373,"completion_tokens":348,"total_tokens":9721,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9032,"cache_write_tokens":338,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0030687,"upstream_inference_prompt_cost":0.0013287,"upstream_inference_completions_cost":0.00174},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T072036_req0003.json
Normal file
1
context.logs/20260428T072036_req0003.json
Normal file
File diff suppressed because one or more lines are too long
17
context.logs/20260428T072036_res0003.json
Normal file
17
context.logs/20260428T072036_res0003.json
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375237-UNuX3x5bOLRo3Yf2fhGV","object":"chat.completion","created":1777375237,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"stop","native_finish_reason":"end_turn","message":{"role":"assistant","content":"I'm ready to help! I'm a test agent running on the Didactyl platform. I have access to a comprehensive set of tools for:\n\n- **Nostr operations**: posting, querying, reactions, DMs, profiles, relays, encryption\n- **File management**: reading and writing local files\n- **Skills**: creating, managing, and executing skills\n- **LLM configuration**: managing model settings and parameters\n- **Wallet**: Cashu ecash wallet operations\n- **Storage**: Blossom file uploads/downloads\n- **Utilities**: shell execution, HTTP requests, version info\n\nFeel free to ask me to:\n- Post to Nostr\n- Query events or profiles\n- Manage skills and tasks\n- Read/write files\n- Execute shell commands\n- Work with encrypted storage\n- Or anything else you'd like to test!\n\nWhat would you like me to do?","refusal":null,"reasoning":null}}],"usage":{"prompt_tokens":9354,"completion_tokens":199,"total_tokens":9553,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":9351,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.01268675,"upstream_inference_prompt_cost":0.01169175,"upstream_inference_completions_cost":0.000995},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T072050_req0001.json
Normal file
1
context.logs/20260428T072050_req0001.json
Normal file
File diff suppressed because one or more lines are too long
13
context.logs/20260428T072050_res0001.json
Normal file
13
context.logs/20260428T072050_res0001.json
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375250-jFanwsCICZFqoelE44Pq","object":"chat.completion","created":1777375250,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"stop","native_finish_reason":"end_turn","message":{"role":"assistant","content":"I see you've sent a very long string of \"A\" characters. \n\nIs there something specific I can help you with? I'm a test agent with access to various tools for working with Nostr, file operations, HTTP requests, skills, wallets, and more.\n\nFeel free to ask me a question or request something, and I'll do my best to assist you!","refusal":null,"reasoning":null}}],"usage":{"prompt_tokens":16024,"completion_tokens":83,"total_tokens":16107,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9032,"cache_write_tokens":6992,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0100582,"upstream_inference_prompt_cost":0.0096432,"upstream_inference_completions_cost":0.000415},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T072113_req0001.json
Normal file
1
context.logs/20260428T072113_req0001.json
Normal file
File diff suppressed because one or more lines are too long
11
context.logs/20260428T072113_res0001.json
Normal file
11
context.logs/20260428T072113_res0001.json
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375274-zsPFOGPaSztcq1eWkJwI","object":"chat.completion","created":1777375274,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"stop","native_finish_reason":"end_turn","message":{"role":"assistant","content":"I understand! After the system restarts, I should say hello. \n\nHowever, I should note that I'm currently running and ready to help you. If you're planning to restart the system or agent, just let me know when it comes back up, and I'll greet you with a hello!\n\nIs there anything else you'd like me to help you with in the meantime?","refusal":null,"reasoning":null}}],"usage":{"prompt_tokens":9367,"completion_tokens":84,"total_tokens":9451,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9032,"cache_write_tokens":332,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0017412,"upstream_inference_prompt_cost":0.0013212,"upstream_inference_completions_cost":0.00042},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T072117_req0002.json
Normal file
1
context.logs/20260428T072117_req0002.json
Normal file
File diff suppressed because one or more lines are too long
9
context.logs/20260428T072117_res0002.json
Normal file
9
context.logs/20260428T072117_res0002.json
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375278-hK1kwZuer9Lsw5MLxeTY","object":"chat.completion","created":1777375278,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"stop","native_finish_reason":"end_turn","message":{"role":"assistant","content":"Hello! I'm a test agent ready to help you with whatever you need.","refusal":null,"reasoning":null}}],"usage":{"prompt_tokens":9367,"completion_tokens":19,"total_tokens":9386,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9032,"cache_write_tokens":332,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0014162,"upstream_inference_prompt_cost":0.0013212,"upstream_inference_completions_cost":0.000095},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T072221_req0003.json
Normal file
1
context.logs/20260428T072221_req0003.json
Normal file
File diff suppressed because one or more lines are too long
13
context.logs/20260428T072221_res0003.json
Normal file
13
context.logs/20260428T072221_res0003.json
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375342-uCRzfhu0bf1KkFyxOXma","object":"chat.completion","created":1777375342,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"tool_calls","native_finish_reason":"tool_use","message":{"role":"assistant","content":"I'll list your Blossom blobs. First, I need to get your pubkey, then I'll need to know which Blossom server to query. Let me start by getting your pubkey:","refusal":null,"reasoning":null,"tool_calls":[{"type":"function","index":0,"id":"toolu_bdrk_01EuoCso6xsH4hg6MtqtEbwB","function":{"name":"nostr_pubkey","arguments":"{}"}}]}}],"usage":{"prompt_tokens":9369,"completion_tokens":84,"total_tokens":9453,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9032,"cache_write_tokens":334,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0017437,"upstream_inference_prompt_cost":0.0013237,"upstream_inference_completions_cost":0.00042},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T072235_req0001.json
Normal file
1
context.logs/20260428T072235_req0001.json
Normal file
File diff suppressed because one or more lines are too long
9
context.logs/20260428T072235_res0001.json
Normal file
9
context.logs/20260428T072235_res0001.json
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375355-ZuuW9IXNHn2xcCnAxE0y","object":"chat.completion","created":1777375355,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"tool_calls","native_finish_reason":"tool_use","message":{"role":"assistant","content":"I'll check your Cashu wallet balance for you.","refusal":null,"reasoning":null,"tool_calls":[{"type":"function","index":0,"id":"toolu_bdrk_01AjyEY1765A49f2DE6Uh3GG","function":{"name":"cashu_wallet_balance","arguments":"{}"}}]}}],"usage":{"prompt_tokens":9368,"completion_tokens":52,"total_tokens":9420,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9032,"cache_write_tokens":332,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0015822,"upstream_inference_prompt_cost":0.0013222,"upstream_inference_completions_cost":0.00026},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T072238_req0002.json
Normal file
1
context.logs/20260428T072238_req0002.json
Normal file
File diff suppressed because one or more lines are too long
13
context.logs/20260428T072238_res0002.json
Normal file
13
context.logs/20260428T072238_res0002.json
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375359-KpRY8FHWdC5j7tFYnf99","object":"chat.completion","created":1777375359,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"stop","native_finish_reason":"end_turn","message":{"role":"assistant","content":"Your Cashu wallet is currently **empty** with a balance of **0**. \n\nThe wallet appears to not be loaded yet. This could mean:\n- No mints have been configured\n- No ecash tokens have been received or minted yet\n- The wallet needs to be initialized\n\nWould you like me to help you:\n1. Check wallet mint configuration?\n2. Request a mint quote to add funds?\n3. Configure a mint for your wallet?","refusal":null,"reasoning":null}}],"usage":{"prompt_tokens":9450,"completion_tokens":103,"total_tokens":9553,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9364,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0015374,"upstream_inference_prompt_cost":0.0010224,"upstream_inference_completions_cost":0.000515},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T072342_req0003.json
Normal file
1
context.logs/20260428T072342_req0003.json
Normal file
File diff suppressed because one or more lines are too long
7
context.logs/20260428T072342_res0003.json
Normal file
7
context.logs/20260428T072342_res0003.json
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375423-T6U7hn04dTKnjjFxe19S","object":"chat.completion","created":1777375423,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"tool_calls","native_finish_reason":"tool_use","message":{"role":"assistant","content":null,"refusal":null,"reasoning":null,"tool_calls":[{"type":"function","index":0,"id":"toolu_bdrk_01RaaLJ4ePRXjbbfg3o6LV73","function":{"name":"nostr_pubkey","arguments":"{}"}}]}}],"usage":{"prompt_tokens":9371,"completion_tokens":39,"total_tokens":9410,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9032,"cache_write_tokens":336,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0015212,"upstream_inference_prompt_cost":0.0013262,"upstream_inference_completions_cost":0.000195},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T072356_req0001.json
Normal file
1
context.logs/20260428T072356_req0001.json
Normal file
File diff suppressed because one or more lines are too long
9
context.logs/20260428T072356_res0001.json
Normal file
9
context.logs/20260428T072356_res0001.json
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375436-giGLkkFTP46gGTSS9xMv","object":"chat.completion","created":1777375436,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"tool_calls","native_finish_reason":"tool_use","message":{"role":"assistant","content":null,"refusal":null,"reasoning":null,"tool_calls":[{"type":"function","index":0,"id":"toolu_bdrk_01Y23Q4voefWXQYThdYWU2cL","function":{"name":"my_npub","arguments":"{}"}}]}}],"usage":{"prompt_tokens":9367,"completion_tokens":38,"total_tokens":9405,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9032,"cache_write_tokens":332,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0015112,"upstream_inference_prompt_cost":0.0013212,"upstream_inference_completions_cost":0.00019},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T072358_req0002.json
Normal file
1
context.logs/20260428T072358_req0002.json
Normal file
File diff suppressed because one or more lines are too long
9
context.logs/20260428T072358_res0002.json
Normal file
9
context.logs/20260428T072358_res0002.json
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375439-LiTUe0VdwVXCM9os7FiY","object":"chat.completion","created":1777375439,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"stop","native_finish_reason":"end_turn","message":{"role":"assistant","content":"My npub is: **npub1r6chzymdhvd6d9dj79pfdt073zsls82zyrx86xrtpcfehr8qek7q3rkewf**\n\nThis is my Nostr public key encoded in bech32 format. You can use this to find me on the Nostr network!","refusal":null,"reasoning":null}}],"usage":{"prompt_tokens":9513,"completion_tokens":83,"total_tokens":9596,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9364,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0015004,"upstream_inference_prompt_cost":0.0010854,"upstream_inference_completions_cost":0.000415},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T072501_req0003.json
Normal file
1
context.logs/20260428T072501_req0003.json
Normal file
File diff suppressed because one or more lines are too long
9
context.logs/20260428T072501_res0003.json
Normal file
9
context.logs/20260428T072501_res0003.json
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375502-52pu2oVKedn2eurqBVit","object":"chat.completion","created":1777375502,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"tool_calls","native_finish_reason":"tool_use","message":{"role":"assistant","content":"I'll retrieve my identity information for you.","refusal":null,"reasoning":null,"tool_calls":[{"type":"function","index":0,"id":"toolu_bdrk_01SEn9gQoVzuKX74JfWfVckc","function":{"name":"agent_identity","arguments":"{}"}},{"type":"function","index":1,"id":"toolu_bdrk_018BxAiMzYUvQbWzDQygahVA","function":{"name":"nostr_agent_profile","arguments":"{}"}}]}}],"usage":{"prompt_tokens":9367,"completion_tokens":68,"total_tokens":9435,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9032,"cache_write_tokens":330,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0016607,"upstream_inference_prompt_cost":0.0013207,"upstream_inference_completions_cost":0.00034},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T072515_req0001.json
Normal file
1
context.logs/20260428T072515_req0001.json
Normal file
File diff suppressed because one or more lines are too long
9
context.logs/20260428T072515_res0001.json
Normal file
9
context.logs/20260428T072515_res0001.json
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375516-xBn93xlI322fzADQ3nPP","object":"chat.completion","created":1777375516,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"tool_calls","native_finish_reason":"tool_use","message":{"role":"assistant","content":"I'll check the agent version for you.","refusal":null,"reasoning":null,"tool_calls":[{"type":"function","index":0,"id":"toolu_bdrk_013wKmxmgG5JTUiyGbohVjAN","function":{"name":"agent_version","arguments":"{}"}}]}}],"usage":{"prompt_tokens":9365,"completion_tokens":46,"total_tokens":9411,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9032,"cache_write_tokens":330,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0015487,"upstream_inference_prompt_cost":0.0013187,"upstream_inference_completions_cost":0.00023},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T072518_req0002.json
Normal file
1
context.logs/20260428T072518_req0002.json
Normal file
File diff suppressed because one or more lines are too long
9
context.logs/20260428T072518_res0002.json
Normal file
9
context.logs/20260428T072518_res0002.json
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375519-JJvmXyq4ll76c2D49pEi","object":"chat.completion","created":1777375519,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"stop","native_finish_reason":"end_turn","message":{"role":"assistant","content":"I'm **Didactyl v0.2.48**, a sovereign AI agent daemon running on Nostr. \n\nHere are the details:\n- **Name:** Didactyl\n- **Version:** v0.2.48 (Major: 0, Minor: 2, Patch: 48)\n- **Description:** A sovereign AI agent daemon on Nostr\n- **Repository:** https://git.laantungir.net/laantungir/didactyl.git\n\nIs there anything else you'd like to know?","refusal":null,"reasoning":null}}],"usage":{"prompt_tokens":9497,"completion_tokens":124,"total_tokens":9621,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9362,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0016912,"upstream_inference_prompt_cost":0.0010712,"upstream_inference_completions_cost":0.00062},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T072621_req0003.json
Normal file
1
context.logs/20260428T072621_req0003.json
Normal file
File diff suppressed because one or more lines are too long
9
context.logs/20260428T072621_res0003.json
Normal file
9
context.logs/20260428T072621_res0003.json
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375582-HLkTRcL7ciicnO3WG706","object":"chat.completion","created":1777375582,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"tool_calls","native_finish_reason":"tool_use","message":{"role":"assistant","content":"I'll fetch information about my administrator for you.","refusal":null,"reasoning":null,"tool_calls":[{"type":"function","index":0,"id":"toolu_bdrk_018YfVsvGA6DtB9CBZH3WFbw","function":{"name":"admin_identity","arguments":"{}"}},{"type":"function","index":1,"id":"toolu_bdrk_01Q35faB3GUEqVgeXcYagANX","function":{"name":"nostr_admin_profile","arguments":"{}"}}]}}],"usage":{"prompt_tokens":9365,"completion_tokens":69,"total_tokens":9434,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9032,"cache_write_tokens":330,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0016637,"upstream_inference_prompt_cost":0.0013187,"upstream_inference_completions_cost":0.000345},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T072636_req0001.json
Normal file
1
context.logs/20260428T072636_req0001.json
Normal file
File diff suppressed because one or more lines are too long
13
context.logs/20260428T072636_res0001.json
Normal file
13
context.logs/20260428T072636_res0001.json
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375596-rVYt4DZZqybR0cri83ok","object":"chat.completion","created":1777375596,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"tool_calls","native_finish_reason":"tool_use","message":{"role":"assistant","content":"I'll fetch your current task list for you.","refusal":null,"reasoning":null,"tool_calls":[{"type":"function","index":0,"id":"toolu_bdrk_01SkQiJkNcACnKfxoaL8QUHT","function":{"name":"task_list","arguments":"{}"}}]}}],"usage":{"prompt_tokens":9367,"completion_tokens":47,"total_tokens":9414,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9032,"cache_write_tokens":332,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0015562,"upstream_inference_prompt_cost":0.0013212,"upstream_inference_completions_cost":0.000235},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T072640_req0002.json
Normal file
1
context.logs/20260428T072640_req0002.json
Normal file
File diff suppressed because one or more lines are too long
9
context.logs/20260428T072640_res0002.json
Normal file
9
context.logs/20260428T072640_res0002.json
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375600-1i2NzbywIG7vr1pbbB7L","object":"chat.completion","created":1777375600,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"stop","native_finish_reason":"end_turn","message":{"role":"assistant","content":"Your current task list is empty! You don't have any active tasks yet.\n\nWould you like me to help you:\n- **Add a task** - I can create a new task for you\n- **View completed tasks** - Check what you've already done\n- **Set up a task** - Help you organize something you're working on\n\nJust let me know what you'd like to do, or provide the task details and I can add them for you.","refusal":null,"reasoning":null}}],"usage":{"prompt_tokens":9480,"completion_tokens":100,"total_tokens":9580,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9364,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0015524,"upstream_inference_prompt_cost":0.0010524,"upstream_inference_completions_cost":0.0005},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T072743_req0003.json
Normal file
1
context.logs/20260428T072743_req0003.json
Normal file
File diff suppressed because one or more lines are too long
7
context.logs/20260428T072743_res0003.json
Normal file
7
context.logs/20260428T072743_res0003.json
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375663-e99PoJts5k6BizMUmNhQ","object":"chat.completion","created":1777375663,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"tool_calls","native_finish_reason":"tool_use","message":{"role":"assistant","content":"I'll add a task and then remove it for you.","refusal":null,"reasoning":null,"tool_calls":[{"type":"function","index":0,"id":"toolu_bdrk_017Lhypkwt8Wx9eo9yQS3vmF","function":{"name":"task_manage","arguments":"{\"action\": \"add\", \"text\": \"test harness probe task\", \"status\": \"pending\"}"}}]}}],"usage":{"prompt_tokens":9377,"completion_tokens":104,"total_tokens":9481,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9032,"cache_write_tokens":342,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0018537,"upstream_inference_prompt_cost":0.0013337,"upstream_inference_completions_cost":0.00052},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T072756_req0001.json
Normal file
1
context.logs/20260428T072756_req0001.json
Normal file
File diff suppressed because one or more lines are too long
9
context.logs/20260428T072756_res0001.json
Normal file
9
context.logs/20260428T072756_res0001.json
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375677-0RglWxj5Ki0dNNPe4Do4","object":"chat.completion","created":1777375677,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"tool_calls","native_finish_reason":"tool_use","message":{"role":"assistant","content":"I'll save a test harness probe to memory and then recall it.","refusal":null,"reasoning":null,"tool_calls":[{"type":"function","index":0,"id":"toolu_bdrk_01GBGt8MaQjzZj4i23ij5caL","function":{"name":"memory_save","arguments":"{\"content\": \"Test harness probe - system verification checkpoint. Agent memory subsystem operational. Timestamp: current session. This entry confirms memory_save and memory_recall functions are working correctly.\"}"}}]}}],"usage":{"prompt_tokens":9380,"completion_tokens":103,"total_tokens":9483,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9032,"cache_write_tokens":344,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0018522,"upstream_inference_prompt_cost":0.0013372,"upstream_inference_completions_cost":0.000515},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T072759_req0002.json
Normal file
1
context.logs/20260428T072759_req0002.json
Normal file
File diff suppressed because one or more lines are too long
7
context.logs/20260428T072759_res0002.json
Normal file
7
context.logs/20260428T072759_res0002.json
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375680-CxwbupX8iy37rE7N441O","object":"chat.completion","created":1777375680,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"tool_calls","native_finish_reason":"tool_use","message":{"role":"assistant","content":"Great! Now let me recall the memory:","refusal":null,"reasoning":null,"tool_calls":[{"type":"function","index":0,"id":"toolu_bdrk_01QgBARiRY5FTx8TJH3GhzU6","function":{"name":"memory_recall","arguments":"{}"}}]}}],"usage":{"prompt_tokens":9569,"completion_tokens":46,"total_tokens":9615,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9376,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0013606,"upstream_inference_prompt_cost":0.0011306,"upstream_inference_completions_cost":0.00023},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T072815_req0003.json
Normal file
1
context.logs/20260428T072815_req0003.json
Normal file
File diff suppressed because one or more lines are too long
11
context.logs/20260428T072815_res0003.json
Normal file
11
context.logs/20260428T072815_res0003.json
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375696-JOdX4gcv02mKizye0xyb","object":"chat.completion","created":1777375696,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"stop","native_finish_reason":"end_turn","message":{"role":"assistant","content":"Perfect! ✅ **Test harness probe successful:**\n\n**Saved to memory:**\n- Content: \"Test harness probe - system verification checkpoint. Agent memory subsystem operational. Timestamp: current session. This entry confirms memory_save and memory_recall functions are working correctly.\"\n- Event ID: `6311c65cf9b52fe1fe9bce8052a09f594d6b3dc1f83f8030f45106b8b3a108e2`\n- Kind: 30078 (encrypted agent config)\n- D-tag: \"memory\"\n\n**Recalled from memory:**\n- Successfully retrieved the exact content that was saved\n- Content length: 199 bytes\n- No truncation occurred\n\nThe memory subsystem is operational and both save/recall functions are working correctly! 🎯","refusal":null,"reasoning":null}}],"usage":{"prompt_tokens":9676,"completion_tokens":188,"total_tokens":9864,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9376,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0021776,"upstream_inference_prompt_cost":0.0012376,"upstream_inference_completions_cost":0.00094},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T072855_req0001.json
Normal file
1
context.logs/20260428T072855_req0001.json
Normal file
File diff suppressed because one or more lines are too long
15
context.logs/20260428T072855_res0001.json
Normal file
15
context.logs/20260428T072855_res0001.json
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375736-lYPEXYI3bEyeSmVzv9zh","object":"chat.completion","created":1777375736,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"stop","native_finish_reason":"end_turn","message":{"role":"assistant","content":"Hello! I'm a Didactyl Agent - a test agent designed to help you with various tasks. I can assist with things like:\n\n- **Nostr protocol operations** (posting, querying events, managing profiles, etc.)\n- **File operations** (reading and writing local files)\n- **Shell commands** (executing system commands)\n- **HTTP requests** (fetching web resources)\n- **Skills management** (creating, running, and managing reusable skills)\n- **Task management** (tracking and managing tasks)\n- **Wallet operations** (Cashu ecash and Lightning)\n- **File storage** (Blossom server uploads/downloads)\n- And more!\n\nI don't have a specific personal name beyond being your Didactyl Agent, but I'm here to help you with whatever you need. What can I assist you with today?","refusal":null,"reasoning":null}}],"usage":{"prompt_tokens":9369,"completion_tokens":194,"total_tokens":9563,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9032,"cache_write_tokens":334,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0022937,"upstream_inference_prompt_cost":0.0013237,"upstream_inference_completions_cost":0.00097},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T072900_req0002.json
Normal file
1
context.logs/20260428T072900_req0002.json
Normal file
File diff suppressed because one or more lines are too long
21
context.logs/20260428T072900_res0002.json
Normal file
21
context.logs/20260428T072900_res0002.json
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375740-7wwdu6DnbPK2uHfm9Dhh","object":"chat.completion","created":1777375740,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"stop","native_finish_reason":"end_turn","message":{"role":"assistant","content":"I'm **Didactyl**, a Nostr-native AI agent. Here's what I do:\n\n**Core Identity:**\n- I'm an autonomous agent running on the Nostr protocol, designed to interact with decentralized networks and handle both on-chain and off-chain tasks\n- I can publish posts, send encrypted messages, manage lists, and interact with the Nostr ecosystem\n\n**Key Capabilities:**\n- **Nostr Operations**: Post notes, send DMs, manage contacts, verify identities, and query events from relays\n- **Skills System**: I can create, adopt, and run modular skills that extend my functionality\n- **Memory & Tasks**: I maintain encrypted memory and task lists stored on Nostr for persistence\n- **Financial**: I can handle Cashu ecash wallets and payments\n- **File Management**: I can read/write local files and interact with Blossom file servers\n- **LLM Integration**: I'm powered by configurable language models and can execute complex workflows\n- **Automation**: I support triggered skills via webhooks, cron schedules, DMs, and Nostr subscriptions\n\n**How I Work:**\nI'm a test agent in this instance, ready to help you explore what I can do. I combine Nostr's decentralized messaging with AI reasoning to create a flexible, privacy-respecting automation platform.\n\nWhat would you like to do? I can help with Nostr interactions, skill management, file operations, or just about anything else you need!","refusal":null,"reasoning":null}}],"usage":{"prompt_tokens":9373,"completion_tokens":333,"total_tokens":9706,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9032,"cache_write_tokens":338,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0029937,"upstream_inference_prompt_cost":0.0013287,"upstream_inference_completions_cost":0.001665},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T072935_req0003.json
Normal file
1
context.logs/20260428T072935_req0003.json
Normal file
File diff suppressed because one or more lines are too long
21
context.logs/20260428T072935_res0003.json
Normal file
21
context.logs/20260428T072935_res0003.json
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375776-aZoApJ1ae9UcNjTPlooQ","object":"chat.completion","created":1777375776,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"stop","native_finish_reason":"end_turn","message":{"role":"assistant","content":"# Didactyl Agent\n\nHello! I'm a test agent ready to assist you. I have access to a comprehensive set of tools including:\n\n- **Nostr Protocol**: Publishing events, querying data, managing profiles, DMs, encryption, and more\n- **File Operations**: Reading and writing local files\n- **Shell Execution**: Running commands in the working directory\n- **Skills Management**: Creating, listing, adopting, and running skills\n- **HTTP Requests**: Fetching web resources\n- **LLM Configuration**: Managing model settings\n- **Task & Memory Management**: Storing and recalling agent state\n- **Cashu Wallet**: Managing ecash tokens and mints\n- **Blossom**: File upload/download to Blossom servers\n\nI'm ready to help with any requests. What would you like me to do?","refusal":null,"reasoning":null}}],"usage":{"prompt_tokens":9354,"completion_tokens":188,"total_tokens":9542,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":9351,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.01263175,"upstream_inference_prompt_cost":0.01169175,"upstream_inference_completions_cost":0.00094},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T072949_req0001.json
Normal file
1
context.logs/20260428T072949_req0001.json
Normal file
File diff suppressed because one or more lines are too long
17
context.logs/20260428T072949_res0001.json
Normal file
17
context.logs/20260428T072949_res0001.json
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375790-hGgvQ0etnXavfdB3WnzF","object":"chat.completion","created":1777375790,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"stop","native_finish_reason":"end_turn","message":{"role":"assistant","content":"I see you've sent a very long string of the letter \"A\". \n\nI'm here to help! Could you please let me know what you'd actually like me to do? For example, I can:\n\n- Answer questions\n- Help with Nostr-related tasks (posting, querying events, managing profiles, etc.)\n- Execute shell commands\n- Read or write files\n- Manage skills and tasks\n- Work with cryptocurrency wallets (Cashu)\n- Upload/download files (Blossom)\n- And much more\n\nWhat would you like assistance with?","refusal":null,"reasoning":null}}],"usage":{"prompt_tokens":16024,"completion_tokens":128,"total_tokens":16152,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9032,"cache_write_tokens":6992,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0102832,"upstream_inference_prompt_cost":0.0096432,"upstream_inference_completions_cost":0.00064},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T073009_req0001.json
Normal file
1
context.logs/20260428T073009_req0001.json
Normal file
File diff suppressed because one or more lines are too long
9
context.logs/20260428T073009_res0001.json
Normal file
9
context.logs/20260428T073009_res0001.json
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375810-NHr1i5tqdEPozD3NpLCF","object":"chat.completion","created":1777375810,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"stop","native_finish_reason":"end_turn","message":{"role":"assistant","content":"Hello! I'm a test agent powered by Didactyl. I don't have a specific personal name, but you can think of me as your Didactyl assistant. I'm here to help you with various tasks using the tools and capabilities available to me, including Nostr integration, file management, skill management, and more.\n\nIs there anything I can help you with today?","refusal":null,"reasoning":null}}],"usage":{"prompt_tokens":9369,"completion_tokens":84,"total_tokens":9453,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9366,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0013596,"upstream_inference_prompt_cost":0.0009396,"upstream_inference_completions_cost":0.00042},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T073013_req0002.json
Normal file
1
context.logs/20260428T073013_req0002.json
Normal file
File diff suppressed because one or more lines are too long
23
context.logs/20260428T073013_res0002.json
Normal file
23
context.logs/20260428T073013_res0002.json
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375813-DRu7RouOiJlA3MKNwdc3","object":"chat.completion","created":1777375813,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"stop","native_finish_reason":"end_turn","message":{"role":"assistant","content":"I'm **Didactyl**, a Nostr-based AI agent. Here's a brief description of what I am:\n\n## Core Identity\n- A decentralized autonomous agent that operates on the Nostr protocol\n- I can publish, query, and interact with Nostr events across multiple relays\n- I have my own pubkey and can act independently or on behalf of an admin user\n\n## Key Capabilities\n- **Nostr Integration**: Publish notes, long-form posts, reactions, and encrypted DMs\n- **Skill System**: I can create, adopt, and execute specialized skills (reusable AI workflows)\n- **Task Management**: Track and manage tasks stored on Nostr\n- **Memory**: I maintain encrypted agent memory for continuity across conversations\n- **LLM Integration**: I'm powered by configurable language models (currently using an OpenAI-compatible backend)\n- **Wallet & Payments**: I can manage Cashu ecash wallets and handle Lightning payments\n- **File Operations**: I can read/write files and interact with Blossom file storage servers\n- **Web Integration**: I can fetch HTTP resources and execute shell commands\n\n## How I Work\nI respond to requests and use tools when needed. I can be triggered by:\n- Direct messages (DMs)\n- Scheduled tasks (cron jobs)\n- Nostr subscriptions\n- Webhooks\n- Skill chains\n\nI'm designed to be privacy-respecting, leveraging Nostr's encryption where appropriate, and can operate autonomously or collaboratively with an admin user.\n\nWhat would you like to know more about, or how can I help you?","refusal":null,"reasoning":null}}],"usage":{"prompt_tokens":9373,"completion_tokens":365,"total_tokens":9738,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9370,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.002765,"upstream_inference_prompt_cost":0.00094,"upstream_inference_completions_cost":0.001825},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T073119_req0003.json
Normal file
1
context.logs/20260428T073119_req0003.json
Normal file
File diff suppressed because one or more lines are too long
17
context.logs/20260428T073119_res0003.json
Normal file
17
context.logs/20260428T073119_res0003.json
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375880-ECGT0ZdA9f6YOQOw8lM9","object":"chat.completion","created":1777375880,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"stop","native_finish_reason":"end_turn","message":{"role":"assistant","content":"I'm ready to help! I'm a Didactyl agent designed to assist you with various tasks using the available tools.\n\nI can help you with:\n\n- **Nostr Operations**: Post notes, query events, manage profiles, send DMs, handle encryption, manage lists and block lists\n- **Skill Management**: Create, edit, list, search, and run skills\n- **Local Operations**: Read/write files, execute shell commands, fetch HTTP resources\n- **Agent Configuration**: Manage LLM settings, model selection, and runtime configuration\n- **Memory & Tasks**: Store and recall agent memory, manage task lists\n- **Wallet Operations**: Check balances, mint/melt ecash, send/receive tokens\n- **File Storage**: Upload/download files via Blossom servers\n- **Relay Management**: Check relay status, fetch relay info, manage subscriptions\n\nWhat would you like me to help you with?","refusal":null,"reasoning":null}}],"usage":{"prompt_tokens":9354,"completion_tokens":203,"total_tokens":9557,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9351,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0019531,"upstream_inference_prompt_cost":0.0009381,"upstream_inference_completions_cost":0.001015},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T073133_req0001.json
Normal file
1
context.logs/20260428T073133_req0001.json
Normal file
File diff suppressed because one or more lines are too long
11
context.logs/20260428T073133_res0001.json
Normal file
11
context.logs/20260428T073133_res0001.json
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777375894-scuuv4LZNWVF29yV05L7","object":"chat.completion","created":1777375894,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"stop","native_finish_reason":"end_turn","message":{"role":"assistant","content":"I see you've sent a very long string of the letter \"A\". \n\nI'm a test agent here to help you with requests and use tools when needed. Is there something specific I can help you with? Feel free to ask me a question or let me know what you'd like to do, and I'll do my best to assist using the available tools.","refusal":null,"reasoning":null}}],"usage":{"prompt_tokens":16024,"completion_tokens":78,"total_tokens":16102,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":16024,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0019924,"upstream_inference_prompt_cost":0.0016024,"upstream_inference_completions_cost":0.00039},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T073347_req0001.json
Normal file
1
context.logs/20260428T073347_req0001.json
Normal file
File diff suppressed because one or more lines are too long
19
context.logs/20260428T073347_res0001.json
Normal file
19
context.logs/20260428T073347_res0001.json
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777376029-xUzuqdFfKe7nM3xi1ooh","object":"chat.completion","created":1777376029,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"stop","native_finish_reason":"end_turn","message":{"role":"assistant","content":"Hello! 👋 I'm the Didactyl test agent, and I'm ready to help. I received your message: \"Hello from smoke test\"\n\nI have access to a wide range of tools including:\n\n- **Nostr Protocol Tools** - posting, querying, DMs, profiles, relays, etc.\n- **File Operations** - reading and writing local files\n- **Shell Commands** - executing commands\n- **Skills Management** - creating, editing, and running skills\n- **HTTP Requests** - fetching web resources\n- **Cashu Wallet** - ecash operations\n- **Blossom** - file storage/retrieval\n- **Configuration & Memory** - storing and recalling agent state\n\nWhat would you like me to help you with? Feel free to ask me to:\n- Post to Nostr\n- Query events or profiles\n- Manage files\n- Run commands\n- Create or manage skills\n- Handle any other tasks you need","refusal":null,"reasoning":null}}],"usage":{"prompt_tokens":9364,"completion_tokens":216,"total_tokens":9580,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9032,"cache_write_tokens":328,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0023972,"upstream_inference_prompt_cost":0.0013172,"upstream_inference_completions_cost":0.00108},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
1
context.logs/20260428T073359_req0001.json
Normal file
1
context.logs/20260428T073359_req0001.json
Normal file
File diff suppressed because one or more lines are too long
5
context.logs/20260428T073359_res0001.json
Normal file
5
context.logs/20260428T073359_res0001.json
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
|
||||
|
||||
|
||||
{"id":"gen-1777376040-qkXhEUESTodU6M3rpqhw","object":"chat.completion","created":1777376040,"model":"anthropic/claude-4.5-haiku-20251001","provider":"Amazon Bedrock","system_fingerprint":null,"choices":[{"index":0,"logprobs":null,"finish_reason":"stop","native_finish_reason":"end_turn","message":{"role":"assistant","content":"Hello! I'm ready to help you with any requests you might have.","refusal":null,"reasoning":null}}],"usage":{"prompt_tokens":9367,"completion_tokens":18,"total_tokens":9385,"cost":0,"is_byok":true,"prompt_tokens_details":{"cached_tokens":9032,"cache_write_tokens":332,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0014112,"upstream_inference_prompt_cost":0.0013212,"upstream_inference_completions_cost":0.00009},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
|
||||
@@ -14,17 +14,13 @@
|
||||
"pubkey": "npub1REPLACE_WITH_ADMIN_PUBKEY"
|
||||
},
|
||||
|
||||
// ─── DM Protocol ───────────────────────────────────────────────────
|
||||
// Supported values: "nip04", "nip17", or "both".
|
||||
"dm_protocol": "nip04",
|
||||
|
||||
// ─── Encrypted Startup Config Events ───────────────────────────────
|
||||
// These are published as NIP-44 encrypted kind 30078 self-events on first run.
|
||||
"encrypted_events": [
|
||||
{
|
||||
"kind": 30078,
|
||||
"d_tag": "user-settings",
|
||||
"content": "{\"v\":2,\"updatedAt\":0,\"global_llm\":{\"provider\":\"openai\",\"api_key\":\"sk-REPLACE_WITH_API_KEY\",\"model\":\"gpt-4o-mini\",\"base_url\":\"https://api.openai.com/v1\",\"max_tokens\":512,\"temperature\":0.7},\"didactyl\":{\"admin_pubkey\":\"npub1REPLACE_WITH_ADMIN_PUBKEY\",\"dm_protocol\":\"nip04\",\"max_turns\":40}}"
|
||||
"content": "{\"v\":2,\"updatedAt\":0,\"global_llm\":{\"provider\":\"openai\",\"api_key\":\"sk-REPLACE_WITH_API_KEY\",\"model\":\"gpt-4o-mini\",\"base_url\":\"https://api.openai.com/v1\",\"max_tokens\":512,\"temperature\":0.7},\"didactyl\":{\"admin_pubkey\":\"npub1REPLACE_WITH_ADMIN_PUBKEY\",\"dm_protocol\":\"both\",\"max_turns\":40}}"
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
"pubkey": "npub1rmz9gu6de0m0u4ysrn39crrud099ahvfgs6pvasl4hpjr5ud7yus54xv06"
|
||||
},
|
||||
|
||||
// ─── DM Protocol ──────────────────────────────────────────────────
|
||||
// Supported values: "nip04", "nip17", or "both".
|
||||
"dm_protocol": "nip04",
|
||||
|
||||
// ─── HTTP Admin API ───────────────────────────────────────────────
|
||||
// Local API for model/context inspection and runtime controls.
|
||||
"api": {
|
||||
@@ -29,7 +25,7 @@
|
||||
{
|
||||
"kind": 30078,
|
||||
"d_tag": "user-settings",
|
||||
"content": "{\"v\":2,\"updatedAt\":0,\"global_llm\":{\"provider\":\"ppq\",\"api_key\":\"sk-LshAWvFC0KOFgrUYiP6NmT\",\"model\":\"claude-opus-4.6\",\"base_url\":\"https://api.ppq.ai\",\"max_tokens\":200000,\"temperature\":0.7},\"didactyl\":{\"admin_pubkey\":\"npub1rmz9gu6de0m0u4ysrn39crrud099ahvfgs6pvasl4hpjr5ud7yus54xv06\",\"dm_protocol\":\"nip04\",\"max_turns\":40}}"
|
||||
"content": "{\"v\":2,\"updatedAt\":0,\"global_llm\":{\"provider\":\"ppq\",\"api_key\":\"sk-LshAWvFC0KOFgrUYiP6NmT\",\"model\":\"claude-opus-4.6\",\"base_url\":\"https://api.ppq.ai\",\"max_tokens\":200000,\"temperature\":0.7},\"didactyl\":{\"admin_pubkey\":\"npub1rmz9gu6de0m0u4ysrn39crrud099ahvfgs6pvasl4hpjr5ud7yus54xv06\",\"dm_protocol\":\"both\",\"max_turns\":40}}"
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
@@ -9,9 +9,6 @@
|
||||
"admin": {
|
||||
"pubkey": "npub1rmz9gu6de0m0u4ysrn39crrud099ahvfgs6pvasl4hpjr5ud7yus54xv06"
|
||||
},
|
||||
// ─── DM Protocol ──────────────────────────────────────────────────
|
||||
// Supported values: "nip04", "nip17", or "both".
|
||||
"dm_protocol": "nip04",
|
||||
// ─── HTTP Admin API ───────────────────────────────────────────────
|
||||
// Local API for model/context inspection and runtime controls.
|
||||
"api": {
|
||||
@@ -25,7 +22,7 @@
|
||||
{
|
||||
"kind": 30078,
|
||||
"d_tag": "user-settings",
|
||||
"content": "{\"v\":2,\"updatedAt\":0,\"global_llm\":{\"provider\":\"ppq\",\"api_key\":\"sk-L9kd0LkZaoeaua0qqosnHy\",\"model\":\"claude-haiku-4.5\",\"base_url\":\"https://api.ppq.ai\",\"max_tokens\":512,\"temperature\":0.7},\"didactyl\":{\"admin_pubkey\":\"npub1rmz9gu6de0m0u4ysrn39crrud099ahvfgs6pvasl4hpjr5ud7yus54xv06\",\"dm_protocol\":\"nip04\",\"max_turns\":40}}"
|
||||
"content": "{\"v\":2,\"updatedAt\":0,\"global_llm\":{\"provider\":\"ppq\",\"api_key\":\"sk-L9kd0LkZaoeaua0qqosnHy\",\"model\":\"claude-haiku-4.5\",\"base_url\":\"https://api.ppq.ai\",\"max_tokens\":512,\"temperature\":0.7},\"didactyl\":{\"admin_pubkey\":\"npub1rmz9gu6de0m0u4ysrn39crrud099ahvfgs6pvasl4hpjr5ud7yus54xv06\",\"dm_protocol\":\"both\",\"max_turns\":40}}"
|
||||
}
|
||||
],
|
||||
// ─── Startup Events ───────────────────────────────────────────────
|
||||
|
||||
247
plans/cron_trigger_robustness.md
Normal file
247
plans/cron_trigger_robustness.md
Normal file
@@ -0,0 +1,247 @@
|
||||
# Cron Trigger Pipeline: How It Works and How to Make It Robust
|
||||
|
||||
## Current Architecture: Skill Events → Trigger Registration
|
||||
|
||||
The pipeline has **two paths** for getting a cron trigger loaded, plus a **polling loop** that actually fires them.
|
||||
|
||||
### Path 1: Bulk load at startup (EOSE-driven)
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant Main as main.c startup
|
||||
participant NH as nostr_handler
|
||||
participant Relays as Nostr Relays
|
||||
participant TM as trigger_manager
|
||||
|
||||
Main->>TM: trigger_manager_init - capacity=16, last_poll_at=0
|
||||
Main->>TM: trigger_manager_load_from_startup_events
|
||||
Note over TM: Loads triggers from genesis startup_events<br/>only dm triggers typically here
|
||||
Main->>NH: nostr_handler_set_self_skill_eose_callback<br/>registers on_self_skill_eose_load_triggers
|
||||
Main->>NH: nostr_handler_subscribe_self_skills
|
||||
NH->>Relays: REQ kinds 31123, 31124, 10123<br/>authors = agent pubkey
|
||||
Relays-->>NH: EVENT skill events arrive one by one
|
||||
NH->>NH: on_self_skill_event for each<br/>caches in g_self_skill_events<br/>calls register_trigger_from_self_skill_event
|
||||
Relays-->>NH: EOSE
|
||||
NH->>NH: on_self_skill_eose sets g_self_skill_eose_received=1
|
||||
NH->>Main: calls on_self_skill_eose_load_triggers callback
|
||||
Main->>TM: trigger_manager_load_from_skills<br/>reads ALL cached skills via<br/>nostr_handler_get_self_events_by_kind_json
|
||||
Note over TM: For each skill with trigger+filter tags:<br/>calls trigger_manager_add
|
||||
Main->>Main: nostr_handler_wait_for_self_skill_eose returns 0
|
||||
Main->>Main: Startup step 14 passes
|
||||
Main->>Main: Enter main poll loop
|
||||
```
|
||||
|
||||
### Path 2: Live skill event (post-startup)
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant Relays as Nostr Relays
|
||||
participant NH as nostr_handler
|
||||
participant TM as trigger_manager
|
||||
|
||||
Note over NH: Subscription stays open after EOSE
|
||||
Relays-->>NH: New/updated skill EVENT arrives
|
||||
NH->>NH: on_self_skill_event
|
||||
NH->>NH: register_trigger_from_self_skill_event
|
||||
Note over NH: Checks: kind 31123/31124?<br/>Has trigger+filter tags?<br/>Is adopted via kind 10123?
|
||||
NH->>TM: trigger_manager_add or update
|
||||
NH->>NH: self_skill_cache_upsert_event_locked
|
||||
```
|
||||
|
||||
### Path 3: Cron polling in main loop
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant Main as main loop
|
||||
participant TM as trigger_manager
|
||||
participant Agent as agent.c
|
||||
|
||||
loop Every iteration
|
||||
Main->>TM: trigger_manager_poll
|
||||
Note over TM: Throttled to once per 30 seconds
|
||||
TM->>TM: For each trigger where type==CRON:<br/>1. Validate cron_expr<br/>2. Check cron_matches_now<br/>3. Check last_cron_fire dedup - 50s guard
|
||||
TM->>Agent: execute_llm_action with synthetic cron event
|
||||
end
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## The Six Failure Points
|
||||
|
||||
I have identified six places where a cron trigger can silently fail to load or fire. They are ordered from most likely to least likely given the logs from laantungir.net.
|
||||
|
||||
### 1. EOSE timeout kills startup entirely
|
||||
|
||||
**Where:** [`main.c:1494–1515`](src/main.c:1494)
|
||||
|
||||
The agent waits 15 seconds for self-skill EOSE. If relays are slow or the connection is flaky, this times out and **the entire agent process exits**:
|
||||
|
||||
```c
|
||||
const int self_skill_eose_timeout_ms = 15000;
|
||||
if (nostr_handler_wait_for_self_skill_eose(self_skill_eose_timeout_ms) != 0) {
|
||||
// ... prints error, cleans up, return 1
|
||||
}
|
||||
```
|
||||
|
||||
From [`debug.log`](debug.log) line 670:
|
||||
```
|
||||
[2026-04-06 16:16:49] [ERROR] startup checklist [14] Subscribe self-skill cache: failed
|
||||
(self-skill EOSE not received within timeout)
|
||||
```
|
||||
|
||||
**Impact:** If the agent crashes at startup, no triggers load at all. If systemd restarts it and it crashes again, you get a restart loop with zero cron execution.
|
||||
|
||||
### 2. Adoption check gates live trigger registration
|
||||
|
||||
**Where:** [`nostr_handler.c:1462`](src/nostr_handler.c:1462)
|
||||
|
||||
When a skill event arrives live via [`on_self_skill_event()`](src/nostr_handler.c:2428), it calls [`register_trigger_from_self_skill_event()`](src/nostr_handler.c:1418) which checks:
|
||||
|
||||
```c
|
||||
if (!self_skill_is_adopted_local(kind_val, pubkey->valuestring, d_tag)) {
|
||||
DEBUG_INFO("live self-skill trigger ignored (not adopted) d_tag=%s", d_tag);
|
||||
return;
|
||||
}
|
||||
```
|
||||
|
||||
[`self_skill_is_adopted_local()`](src/nostr_handler.c:1366) scans `g_self_skill_events` for a kind 10123 event with an `["a", "31123:<pubkey>:<d_tag>"]` tag. If the adoption event hasn't arrived yet (race condition — skill event arrives before adoption event), the trigger is silently skipped.
|
||||
|
||||
**Critically:** The bulk load path in [`trigger_manager_load_from_skills()`](src/trigger_manager.c:818) does **NOT** check adoption at all — it loads every skill with trigger+filter tags. So the adoption gate only affects the live path.
|
||||
|
||||
### 3. Bulk load is one-shot with `loaded_once` guard
|
||||
|
||||
**Where:** [`main.c:42`](src/main.c:42)
|
||||
|
||||
```c
|
||||
if (ctx->loaded_once) {
|
||||
DEBUG_TRACE("deferred trigger load skipped (already loaded once)");
|
||||
return;
|
||||
}
|
||||
```
|
||||
|
||||
The EOSE callback fires once, calls [`trigger_manager_load_from_skills()`](src/trigger_manager.c:818), sets `loaded_once = 1`, and never runs again. If a skill event arrives **after** EOSE but **before** the live path processes it, it falls into a gap:
|
||||
- The bulk load already ran and won't run again
|
||||
- The live [`register_trigger_from_self_skill_event()`](src/nostr_handler.c:1418) may reject it due to the adoption check
|
||||
|
||||
### 4. Cron expression validation rejects silently at add time
|
||||
|
||||
**Where:** [`trigger_manager.c:1106–1112`](src/trigger_manager.c:1106)
|
||||
|
||||
```c
|
||||
if (t->trigger_type == TRIGGER_TYPE_CRON) {
|
||||
if (!cron_expr_is_valid(filter_json, normalized_cron, sizeof(normalized_cron))) {
|
||||
DEBUG_WARN("trigger add rejected: invalid cron expression d_tag=%s expr=%s", ...);
|
||||
memset(t, 0, sizeof(*t));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This does log a warning, but the caller in [`trigger_manager_load_from_skills()`](src/trigger_manager.c:896) just silently skips to the next skill. The `considered` count increments but `loaded` does not — the only evidence is in the log line `trigger manager loaded X trigger(s) from self skills (considered=Y)` where X < Y.
|
||||
|
||||
The existing plan in [`fix_cron_triggers_not_firing.md`](plans/fix_cron_triggers_not_firing.md) documents that a bare `*` was being used instead of `* * * * *`, and that shorthand expansion was added. This has been fixed.
|
||||
|
||||
### 5. Poll throttle delays first evaluation by up to 30 seconds
|
||||
|
||||
**Where:** [`trigger_manager.c:1395`](src/trigger_manager.c:1395)
|
||||
|
||||
```c
|
||||
if (mgr->last_poll_at > 0 && (now - mgr->last_poll_at) < 30) {
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
After init, `last_poll_at` starts at 0 (fixed from the original bug where it was `time(NULL)`), so the first poll runs immediately. But subsequent polls are throttled to every 30 seconds. For a daily cron this is fine, but it means the cron match window is checked at most twice per minute.
|
||||
|
||||
### 6. Cron dedup guard can skip legitimate fires
|
||||
|
||||
**Where:** [`trigger_manager.c:1422`](src/trigger_manager.c:1422)
|
||||
|
||||
```c
|
||||
if (t->last_cron_fire > 0 && (now - t->last_cron_fire) < 50) {
|
||||
continue;
|
||||
}
|
||||
```
|
||||
|
||||
With a 30-second poll interval and a 50-second dedup window, a cron that matches at minute X will fire once and then be suppressed for the next poll. This is correct behavior for preventing double-fires within the same minute. But if the system clock jumps or NTP adjusts, this could cause unexpected skips.
|
||||
|
||||
---
|
||||
|
||||
## Robustness Suggestions
|
||||
|
||||
### A. Retry EOSE with backoff instead of hard abort
|
||||
|
||||
**Current:** EOSE timeout → process exit.
|
||||
**Proposed:** Retry 2–3 times with increasing timeout (15s, 30s, 60s). If all retries fail, start the agent in degraded mode with only startup-config triggers active, and schedule a background re-attempt.
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
SUB[Subscribe self-skills] --> WAIT{Wait for EOSE}
|
||||
WAIT -->|Received| LOAD[Load triggers from skills]
|
||||
WAIT -->|Timeout 15s| RETRY1{Retry 1 - 30s timeout}
|
||||
RETRY1 -->|Received| LOAD
|
||||
RETRY1 -->|Timeout| RETRY2{Retry 2 - 60s timeout}
|
||||
RETRY2 -->|Received| LOAD
|
||||
RETRY2 -->|Timeout| DEGRADED[Start in degraded mode<br/>startup triggers only<br/>schedule background retry]
|
||||
LOAD --> READY[Agent READY]
|
||||
DEGRADED --> READY
|
||||
```
|
||||
|
||||
### B. Remove adoption gate from live trigger registration
|
||||
|
||||
The bulk load path doesn't check adoption. The live path does. This inconsistency means a skill created via `skill_create` with `auto_adopt=true` might not register its trigger if the adoption event arrives on a different relay or with different timing.
|
||||
|
||||
**Proposed:** Either:
|
||||
1. Remove the adoption check from [`register_trigger_from_self_skill_event()`](src/nostr_handler.c:1462) to match the bulk path, OR
|
||||
2. Add the adoption check to the bulk path too for consistency, but with a fallback: if adoption events haven't loaded yet, defer the check.
|
||||
|
||||
Option 1 is simpler and more robust. The agent already only subscribes to its own pubkey's events, so all skills in the cache are self-authored.
|
||||
|
||||
### C. Allow re-running bulk trigger load
|
||||
|
||||
Remove the `loaded_once` guard or replace it with a debounced re-load. When new skill events arrive after EOSE, schedule a re-scan of all cached skills after a short delay (e.g., 5 seconds). This closes the gap between EOSE and late-arriving events.
|
||||
|
||||
### D. Add a periodic trigger reconciliation
|
||||
|
||||
Every N minutes (e.g., 5), compare the set of cached skills that have trigger+filter tags against the active trigger list. Register any missing triggers. This is a safety net that catches any trigger that was missed during startup.
|
||||
|
||||
```c
|
||||
// In trigger_manager_poll, after cron evaluation:
|
||||
if (now - mgr->last_reconcile_at > 300) {
|
||||
trigger_manager_load_from_skills(mgr); // idempotent via update path
|
||||
mgr->last_reconcile_at = now;
|
||||
}
|
||||
```
|
||||
|
||||
### E. Log trigger registration summary at startup
|
||||
|
||||
After the deferred trigger load, log not just the count but also which trigger types were loaded:
|
||||
|
||||
```
|
||||
trigger manager loaded 3 trigger(s): dm=2 cron=1 webhook=0 chain=0 nostr-sub=0
|
||||
```
|
||||
|
||||
This makes it immediately obvious from the log whether a cron trigger was picked up.
|
||||
|
||||
### F. Add an HTTP API endpoint for trigger status
|
||||
|
||||
Expose `/api/triggers` that returns the same JSON as the `trigger_list` tool. This allows external monitoring (e.g., a health check script) to verify that expected cron triggers are loaded without going through the LLM.
|
||||
|
||||
---
|
||||
|
||||
## Summary of What Happened on laantungir.net
|
||||
|
||||
Based on the logs:
|
||||
|
||||
1. The agent started successfully multiple times (startup step 14 passed with `skills=3 adoptions=1` or similar).
|
||||
2. The deferred trigger load status shows **only dm-type triggers** were loaded — no cron triggers appear in any log entry.
|
||||
3. On 2026-04-06, the agent failed at startup step 14 with EOSE timeout, meaning it never even got to trigger loading.
|
||||
4. There is **zero** evidence of `cron trigger matched` or `cron trigger skipped` in any log file, confirming the cron trigger was never in the active trigger set.
|
||||
|
||||
The most likely explanation: the cron skill event exists on relays but either:
|
||||
- It was missing the `["trigger", "cron"]` and/or `["filter", "<expr>"]` tags when it was published
|
||||
- It was not adopted (no kind 10123 event referencing it) and arrived via the live path where adoption is checked
|
||||
- The cron expression was invalid and was silently rejected at add time
|
||||
- The EOSE timeout prevented the agent from ever reaching the trigger loading phase
|
||||
|
||||
Running `trigger_list` on the live server will definitively answer which of these is the case.
|
||||
127
plans/nip17_gift_wrap_investigation.md
Normal file
127
plans/nip17_gift_wrap_investigation.md
Normal file
@@ -0,0 +1,127 @@
|
||||
# NIP-17 Gift Wrap Send Failure — Investigation
|
||||
|
||||
## Status: Resolved — Fixed in code (2026-04-11)
|
||||
|
||||
## Date Discovered: 2026-04-11
|
||||
|
||||
## Symptom
|
||||
|
||||
Every outbound NIP-17 DM send from the Anvil agent fails with:
|
||||
```
|
||||
NIP-17 send aborted: gift_wrap creation failed for 1ec454734dcbf6fe...
|
||||
auto DM fallback to NIP-04 for 1ec454734dcbf6fe... after NIP-17 send failure
|
||||
```
|
||||
|
||||
The agent successfully falls back to NIP-04 (kind 4), so DMs are still delivered. However, NIP-17 outbound is completely broken.
|
||||
|
||||
**Inbound NIP-17 works fine** — the agent successfully receives and decrypts kind 1059 gift wraps from the admin.
|
||||
|
||||
## Affected Code Path
|
||||
|
||||
### Send path (broken):
|
||||
1. `nostr_handler_send_dm_auto_with_role()` in `src/nostr_handler.c:3193` — routes to NIP-17 when `dm_protocol` is `nip17` or `both`
|
||||
2. `nostr_handler_send_dm_nip17_with_role()` in `src/nostr_handler.c:4050` — creates chat event, calls `nostr_nip17_send_dm()`
|
||||
3. `nostr_nip17_send_dm()` in `nostr_core_lib/nostr_core/nip017.c:260` — iterates recipients, creates seal + gift wrap
|
||||
4. `nostr_nip59_create_seal()` in `nostr_core_lib/nostr_core/nip059.c:150` — **encrypts rumor JSON with NIP-44**
|
||||
5. `nostr_nip59_create_gift_wrap()` in `nostr_core_lib/nostr_core/nip059.c:226` — wraps seal with random key
|
||||
|
||||
### Receive path (working):
|
||||
1. `on_event()` receives kind 1059
|
||||
2. `nostr_nip17_receive_dm()` in `nostr_core_lib/nostr_core/nip017.c:326` — unwraps gift, unseals rumor
|
||||
3. Successfully extracts kind 14 content
|
||||
|
||||
## Probable Root Cause: Fixed Buffer Overflow in Seal Encryption
|
||||
|
||||
In `nostr_core_lib/nostr_core/nip059.c:163-165`:
|
||||
|
||||
```c
|
||||
char encrypted_content[4096]; // Should be large enough for most events
|
||||
int encrypt_result = nostr_nip44_encrypt(sender_private_key, recipient_public_key,
|
||||
rumor_json, encrypted_content, sizeof(encrypted_content));
|
||||
```
|
||||
|
||||
The seal creation uses a **fixed 4096-byte stack buffer** for the NIP-44 encrypted output. The rumor JSON includes the full DM message content. When the agent sends long responses (the FIPS mesh conversation had multi-KB markdown tables), the rumor JSON easily exceeds 4096 bytes after NIP-44 encryption overhead (base64 encoding roughly 4/3x expansion + padding + nonce).
|
||||
|
||||
**Evidence:**
|
||||
- The agent's DM responses in the log were 2-5KB of markdown content
|
||||
- After JSON serialization of the kind 14 rumor (adding pubkey, tags, created_at, kind fields), the total is larger
|
||||
- NIP-44 encryption adds: 32-byte nonce + padding + base64 encoding → roughly 1.5-2x expansion
|
||||
- A 3KB message → ~4.5KB rumor JSON → ~6-9KB encrypted → overflows 4096 buffer
|
||||
- `nostr_nip44_encrypt()` returns error, `nostr_nip59_create_seal()` returns NULL
|
||||
- `nostr_nip17_send_dm()` skips the recipient, returns 0 wraps
|
||||
- `nostr_handler_send_dm_nip17_with_role()` logs "gift_wrap creation failed"
|
||||
|
||||
**Why receive works:** The receive path uses `nostr_nip44_decrypt()` which likely allocates dynamically or has a larger buffer.
|
||||
|
||||
## Secondary Suspect: NIP-44 Encryption Implementation
|
||||
|
||||
The NIP-44 encrypt function itself may have issues with large payloads. Need to check:
|
||||
- `nostr_nip44_encrypt()` in `nostr_core_lib/nostr_core/nip044.c`
|
||||
- Whether it handles the output buffer size parameter correctly
|
||||
- Whether it returns an error code that distinguishes "buffer too small" from other failures
|
||||
|
||||
## Anvil Config Context
|
||||
|
||||
The Anvil agent's genesis config (`/home/user/anvil/genesis.jsonc`) has:
|
||||
```json
|
||||
"dm_protocol": "nip04"
|
||||
```
|
||||
|
||||
But the encrypted user-settings on Nostr (kind 30078) may have overridden this to `"both"` at runtime, which is why NIP-17 send is being attempted.
|
||||
|
||||
## Recommended Fix
|
||||
|
||||
### Option A: Dynamic allocation (preferred)
|
||||
Replace the fixed 4096-byte buffer in `nostr_nip59_create_seal()` with dynamic allocation:
|
||||
```c
|
||||
size_t rumor_len = strlen(rumor_json);
|
||||
size_t encrypted_buf_size = rumor_len * 2 + 256; // generous overhead for NIP-44
|
||||
char* encrypted_content = malloc(encrypted_buf_size);
|
||||
```
|
||||
|
||||
### Option B: Larger fixed buffer (quick fix)
|
||||
Increase the buffer to 64KB or 128KB:
|
||||
```c
|
||||
char encrypted_content[131072]; // 128KB should handle any reasonable DM
|
||||
```
|
||||
Note: This is a stack allocation, so very large buffers could cause stack overflow.
|
||||
|
||||
### Also check `nostr_nip59_create_gift_wrap()`
|
||||
The gift wrap function at `nip059.c:226` may have a similar fixed-buffer issue for encrypting the seal JSON.
|
||||
|
||||
## Log Evidence
|
||||
|
||||
From `/home/user/anvil/debug.log` (2026-04-11):
|
||||
|
||||
```
|
||||
[2026-04-11 09:45:14] [WARN ] NIP-17 send aborted: gift_wrap creation failed for 1ec454734dcbf6fe...
|
||||
[2026-04-11 09:45:14] [WARN ] auto DM fallback to NIP-04 for 1ec454734dcbf6fe... after NIP-17 send failure
|
||||
[2026-04-11 09:50:16] [WARN ] NIP-17 send aborted: gift_wrap creation failed for 1ec454734dcbf6fe...
|
||||
[2026-04-11 09:50:16] [WARN ] auto DM fallback to NIP-04 for 1ec454734dcbf6fe... after NIP-17 send failure
|
||||
[2026-04-11 09:53:42] [WARN ] NIP-17 send aborted: gift_wrap creation failed for 1ec454734dcbf6fe...
|
||||
[2026-04-11 09:53:42] [WARN ] auto DM fallback to NIP-04 for 1ec454734dcbf6fe... after NIP-17 send failure
|
||||
```
|
||||
|
||||
This pattern is 100% consistent — every outbound NIP-17 attempt fails, every time.
|
||||
|
||||
## Related Files
|
||||
|
||||
- `nostr_core_lib/nostr_core/nip059.c` — Gift wrap / seal creation (probable bug location)
|
||||
- `nostr_core_lib/nostr_core/nip044.c` — NIP-44 encryption (check buffer handling)
|
||||
- `nostr_core_lib/nostr_core/nip017.c` — NIP-17 DM send/receive orchestration
|
||||
- `src/nostr_handler.c:4050` — Agent-level NIP-17 send function
|
||||
- `plans/nip17_messaging.md` — Original NIP-17 implementation plan
|
||||
|
||||
## Related Existing Plan
|
||||
|
||||
The `plans/nip17_messaging.md` document covers the original NIP-17 implementation. This investigation is specifically about the send-side gift wrap failure that emerged in production.
|
||||
|
||||
## Resolution Summary
|
||||
|
||||
Implemented in `nostr_core_lib/nostr_core/nip059.c`:
|
||||
|
||||
- Replaced fixed encryption buffers in `nostr_nip59_create_seal()` and `nostr_nip59_create_gift_wrap()` with dynamically sized heap buffers calculated from NIP-44 padding/base64 overhead.
|
||||
- Replaced fixed decrypt buffers in `nostr_nip59_unwrap_gift()` and `nostr_nip59_unseal_rumor()` with dynamic buffers sized from ciphertext length.
|
||||
- Added missing cleanup path in `nostr_nip59_create_seal()` for failure after encryption allocation.
|
||||
|
||||
Expected outcome: outbound NIP-17 gift wrap creation no longer fails for multi-KB DM payloads due to fixed buffer limits.
|
||||
58
plans/remove_dead_dm_history_helpers.md
Normal file
58
plans/remove_dead_dm_history_helpers.md
Normal file
@@ -0,0 +1,58 @@
|
||||
# Remove Dead DM-History Helper Functions in `agent.c`
|
||||
|
||||
## Background
|
||||
|
||||
While investigating how Didactyl maintains continuity across a DM "chat session", two functions in [`src/agent.c`](../src/agent.c) were found to be compiled-but-unreferenced, marked with `__attribute__((unused))` to suppress compiler warnings:
|
||||
|
||||
- [`append_recent_admin_dm_history`](../src/agent.c:1065)
|
||||
- [`build_recent_admin_dm_history_messages`](../src/agent.c:1800) (wraps the above)
|
||||
|
||||
These were part of an older design where the agent automatically injected the last N admin DM turns into every LLM call. The current architecture is **skill-driven**: DM history only reaches the LLM when an adopted, triggered skill explicitly pulls it in via the `{{dm_history}}` / `{{nostr_dm_history(...)}}` template variables or the `nostr_dm_history` tool (see [`tool_agent.c`](../src/tools/tool_agent.c:284) and [`tools_schema.c`](../src/tools/tools_schema.c:1606)). The dead functions are now a source of confusion for anyone reading the code to understand chat-session behavior.
|
||||
|
||||
## Goal
|
||||
|
||||
Remove the dead functions and any symbols used exclusively by them, without changing runtime behavior.
|
||||
|
||||
## Scope Analysis (verified before planning)
|
||||
|
||||
A repo-wide search for each symbol confirmed the following:
|
||||
|
||||
| Symbol | Only callers | Disposition |
|
||||
|---|---|---|
|
||||
| [`append_recent_admin_dm_history`](../src/agent.c:1065) | called by `build_recent_admin_dm_history_messages` (also dead) | **delete** |
|
||||
| [`build_recent_admin_dm_history_messages`](../src/agent.c:1800) | no callers | **delete** |
|
||||
| [`AGENT_HISTORY_TURNS`](../src/agent.c:38) | referenced only inside the dead `append_recent_admin_dm_history` | **delete** |
|
||||
| [`AGENT_HISTORY_QUERY_LIMIT`](../src/agent.c:39) | defined but zero references repo-wide | **delete** |
|
||||
| [`append_simple_message`](../src/agent.c:187) | many live callers throughout `agent.c` | **keep** |
|
||||
| [`nostr_handler_get_dm_history_json`](../src/nostr_handler.c:4384) | live via [`tool_agent.c`](../src/tools/tool_agent.c:318) | **keep** |
|
||||
|
||||
No non-source references (Makefile, tests, docs) depend on these symbols.
|
||||
|
||||
## Risks
|
||||
|
||||
Very low. Both functions carry `__attribute__((unused))` so they are not linked into any runtime path. The only failure modes are accidental deletion of something still live, which the scope analysis above rules out.
|
||||
|
||||
## Verification Strategy
|
||||
|
||||
1. Clean build with `make` — must succeed with no new warnings.
|
||||
2. Existing tests under [`tests/`](../tests/) pass (`python tests/run_tests.py` or the project's usual invocation).
|
||||
3. Manual sanity check: start an agent, send a DM, confirm normal reply — no regression, since the deleted code was never on the hot path.
|
||||
|
||||
## Mermaid: before/after
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph Before
|
||||
A1[agent.c dead funcs] -. unused attr .- B1[compiler silences warning]
|
||||
A1 --> C1[reader assumes auto DM history replay]
|
||||
C1 --> D1[confusion about session behavior]
|
||||
end
|
||||
subgraph After
|
||||
A2[agent.c clean] --> E2[skill-driven history only]
|
||||
E2 --> F2[intent matches code]
|
||||
end
|
||||
```
|
||||
|
||||
## Follow-on (out of scope for this change)
|
||||
|
||||
The documentation in [`docs/CONTEXT.md`](../docs/CONTEXT.md) already describes the skill-driven assembly model correctly, but neither that file nor [`docs/SKILLS.md`](../docs/SKILLS.md) explicitly states "DM history is not automatic — it only appears when a skill references it." A brief clarifying paragraph could be added in a separate change.
|
||||
285
plans/startup_failure_admin_dm.md
Normal file
285
plans/startup_failure_admin_dm.md
Normal file
@@ -0,0 +1,285 @@
|
||||
# Startup Failure Admin DM Notification
|
||||
|
||||
> **STATUS UPDATE (follow-up phase):** The base feature (send a failure DM) is
|
||||
> implemented and verified on VM410. However, because the failure happens inside the
|
||||
> systemd `Restart=on-failure` loop (`RestartSec=10`), the admin now receives a *new*
|
||||
> failure DM roughly every ~25 seconds, indefinitely (observed in the live message box).
|
||||
> This follow-up adds **throttling/de-duplication** so the failure DM is sent **once per
|
||||
> failure type until the next successful startup**, and makes the message **more
|
||||
> descriptive** (per-relay connect state + the event kinds that were needed).
|
||||
> See the "Follow-up: Throttling + Descriptive Failure DM" section at the end.
|
||||
|
||||
# Startup Failure Admin DM Notification (original plan)
|
||||
|
||||
## Goal
|
||||
|
||||
When the agent fails to start, send a best-effort encrypted DM to the administrator
|
||||
describing which startup step failed and why, so the operator learns about the failure
|
||||
without having to SSH in and read `journalctl`.
|
||||
|
||||
This directly addresses the real-world incident on VM410 where both `didactyl.service`
|
||||
and `simon.service` were stuck restart-looping at startup step 14
|
||||
(`Subscribe self-skill cache: failed (no skill events found after EOSE)`) and silently
|
||||
stopped answering DMs.
|
||||
|
||||
## Background / Code References
|
||||
|
||||
- Startup is a linear checklist in [`main()`](src/main.c:1012). Each step uses helpers:
|
||||
- [`startup_step_begin()`](src/main.c:303)
|
||||
- [`startup_step_ok()`](src/main.c:309)
|
||||
- [`startup_step_fail()`](src/main.c:320)
|
||||
- On any fatal failure, the current pattern is:
|
||||
`startup_step_fail(...)` -> `fprintf(stderr, ...)` -> cleanup calls -> `return 1;`
|
||||
(e.g. the step-14 self-skill abort at [`src/main.c:1520`](src/main.c:1520)).
|
||||
- The success path already sends an admin "started up" DM at
|
||||
[`src/main.c:1663`](src/main.c:1663) via
|
||||
[`nostr_handler_send_dm_auto()`](src/nostr_handler.c:3264).
|
||||
- DM delivery requires (see [`nostr_handler_send_dm_with_role()`](src/nostr_handler.c:3133)):
|
||||
- `g_cfg` and `g_pool` set (relay pool initialized),
|
||||
- at least one **connected** relay (otherwise the kind-4 event is dropped:
|
||||
"kind 4 event not queued: no connected relays" at [`src/nostr_handler.c:3203`](src/nostr_handler.c:3203)),
|
||||
- a valid `cfg.admin.pubkey` (validated at step 4, [`src/main.c:1310`](src/main.c:1310)),
|
||||
- the private key derived (always done before the checklist).
|
||||
|
||||
### Delivery-window reality
|
||||
|
||||
A failure DM is only *deliverable* from roughly step 11 onward (relay pool created +
|
||||
relays connected + admin known). The step-14 failure we actually hit is inside that
|
||||
window, so it will be delivered. Earlier failures (bad nsec, missing admin, LLM config,
|
||||
no relay connection) have no working channel; per decision, those are **logged only**
|
||||
(best-effort, no blocking retries).
|
||||
|
||||
## Design Decision (confirmed)
|
||||
|
||||
**Best-effort only.** Attempt the failure DM whenever relays + admin are available; if
|
||||
the relay pool isn't connected or admin pubkey is unknown, skip the DM and rely on
|
||||
existing stderr/journal logging. No blocking retry loop, no self-healing of the
|
||||
underlying failure (that can be a separate plan).
|
||||
|
||||
## Approach
|
||||
|
||||
Add a single helper that builds and sends the failure DM, then call it from every fatal
|
||||
startup-abort site (the points that currently do `startup_step_fail(...) ... return 1;`).
|
||||
|
||||
### 1. New helper in [`src/main.c`](src/main.c)
|
||||
|
||||
Add a static function near the other startup helpers (after
|
||||
[`startup_step_fail()`](src/main.c:320)):
|
||||
|
||||
```c
|
||||
static void notify_admin_startup_failure(const didactyl_config_t* cfg,
|
||||
int step,
|
||||
const char* label,
|
||||
const char* detail);
|
||||
```
|
||||
|
||||
Behavior:
|
||||
- Guard clauses (skip + DEBUG_WARN if any precondition is missing):
|
||||
- `cfg == NULL` or `cfg->admin.pubkey[0] == '\0'` -> log "admin unknown; cannot notify".
|
||||
- `nostr_handler_connected_relay_count() <= 0` -> log "no connected relay; cannot notify".
|
||||
- Build a concise human-readable message, e.g.:
|
||||
```
|
||||
<DisplayName> FAILED to start at <YYYY-MM-DD HH:MM:SS>.
|
||||
Startup step [14] Subscribe self-skill cache failed: no skill events found after EOSE.
|
||||
Version <X>. Connected relays: <n>/<m>. The agent is NOT online and will not answer DMs until fixed.
|
||||
```
|
||||
- Reuse `nostr_handler_get_startup_display_name()` and `DIDACTYL_VERSION` exactly like
|
||||
the success DM at [`src/main.c:1645`](src/main.c:1645) for naming/version consistency.
|
||||
- Include `step`, `label`, and `detail` so each failure site is self-describing.
|
||||
- Send via `nostr_handler_send_dm_auto(cfg->admin.pubkey, msg)`; if it returns non-zero,
|
||||
`DEBUG_WARN` that the failure DM could not be delivered (do not change the exit code).
|
||||
- Pump the poll loop briefly after sending so the async publish can flush before process
|
||||
exit: call `nostr_handler_poll(...)` a few times (e.g. ~300--500 ms total) so the
|
||||
queued kind-4 event is actually written to the relay sockets before cleanup/`return 1`.
|
||||
(Without this, async publish may be discarded on immediate exit.)
|
||||
|
||||
### 2. Wire the helper into fatal abort sites
|
||||
|
||||
For each fatal `startup_step_fail(...)` that ends in `return 1;`, insert a call to
|
||||
`notify_admin_startup_failure(&cfg, <step>, "<label>", "<detail>")` immediately after the
|
||||
`startup_step_fail(...)` line and before the cleanup/`return 1`.
|
||||
|
||||
Priority sites (inside the deliverable window — relay pool up + admin known):
|
||||
- Step 11 — discover self relay list failures
|
||||
([`src/main.c:1420`](src/main.c:1420), [`src/main.c:1437`](src/main.c:1437)).
|
||||
- Step 14 — self-skill cache failures (the incident we hit):
|
||||
- subscribe failed ([`src/main.c:1481`](src/main.c:1481)),
|
||||
- EOSE timeout ([`src/main.c:1496`](src/main.c:1496)),
|
||||
- no skill events after EOSE ([`src/main.c:1521`](src/main.c:1521)).
|
||||
- Step 15 — Subscribe DMs failed ([`src/main.c:1552`](src/main.c:1552)).
|
||||
|
||||
Earlier-window sites (relay/admin may not be ready — helper will self-skip and just log,
|
||||
but we still call it uniformly for completeness):
|
||||
- Step 1/3/4/5/6/7/8/9 fatal aborts. The helper's guard clauses make these safe no-ops
|
||||
when delivery isn't possible.
|
||||
|
||||
Keep the existing `fprintf(stderr, ...)` and cleanup unchanged; the DM is purely additive
|
||||
and must never alter the exit code or cleanup ordering.
|
||||
|
||||
### 3. Message size / safety
|
||||
|
||||
- Use a fixed stack buffer (e.g. `char msg[768];`) like the success DM at
|
||||
[`src/main.c:1644`](src/main.c:1644).
|
||||
- `snprintf` with truncation is acceptable; `detail` strings are short and controlled.
|
||||
|
||||
## Out of Scope
|
||||
|
||||
- No blocking retry / wait-for-relay loop (explicitly declined).
|
||||
- No auto-remediation of the step-14 self-skill cause (e.g. auto-publishing the default
|
||||
skill). Tracked separately if desired.
|
||||
- No change to `deploy_lt.sh` post-deploy health checks (could be a follow-up: have the
|
||||
deploy script verify each service reaches `READY` after restart).
|
||||
|
||||
## Verification
|
||||
|
||||
1. Build the static binary (`build_static.sh`) and confirm no warnings.
|
||||
2. Local reproduction of step-14 failure: run an `--nsec`-only agent for an identity that
|
||||
has connected relays but **no** published skill events, confirm:
|
||||
- startup still aborts with exit code 1 (unchanged behavior),
|
||||
- the admin receives a DM naming step 14 and the "no skill events found after EOSE"
|
||||
detail.
|
||||
3. Negative case: kill relay connectivity (or use an unreachable relay) and confirm the
|
||||
helper logs "no connected relay; cannot notify" and does not crash or hang.
|
||||
4. Confirm the success-path startup DM at [`src/main.c:1663`](src/main.c:1663) is
|
||||
unaffected.
|
||||
5. Deploy to VM410, restart `didactyl.service` / `simon.service`, and confirm the admin
|
||||
npub receives the failure DM while the skill events are still missing; then publish a
|
||||
skill and confirm normal `READY` + startup DM resumes.
|
||||
|
||||
---
|
||||
|
||||
# Follow-up: Throttling + Descriptive Failure DM
|
||||
|
||||
## Problems observed in production
|
||||
|
||||
1. **DM flood.** With `Restart=on-failure` / `RestartSec=10`, the step-14 failure recurs
|
||||
on every restart and the agent reaches the deliverable window each time, so the admin
|
||||
gets a fresh failure DM every ~25s indefinitely (confirmed in the live message box).
|
||||
2. **Insufficient detail.** The current message names the step + detail, but not which
|
||||
relays were attempted, whether each connected, nor which event kinds were required.
|
||||
|
||||
## Decisions (confirmed with user)
|
||||
|
||||
- **Throttle semantics:** send exactly once per failure type (keyed by step) until the
|
||||
agent next starts successfully. The marker is cleared on `READY`. No periodic
|
||||
reminders. A different failing step is a different "type" and notifies once.
|
||||
- **Descriptive content:** include the attempted relay list with per-relay connect state,
|
||||
and the event kinds that step 14 needs (31123 / 31124 skill events; 10123 adoption list).
|
||||
|
||||
## Part A -- Throttle / de-duplicate via on-disk marker
|
||||
|
||||
### Marker file location (systemd-sandbox safe)
|
||||
|
||||
- The unit runs with `WorkingDirectory=/home/<user>` and (hardened variant)
|
||||
`ReadWritePaths=/home/<user>`, so only the agent home is writable.
|
||||
- `cfg.tools.shell.working_directory` defaults to `"."` (see
|
||||
[`config.c`](src/config.c:1459)), which resolves to the home dir at runtime.
|
||||
- Use a hidden marker in the working directory: `./.didactyl_startup_failure`.
|
||||
- For `didactyl` -> `/home/didactyl/.didactyl_startup_failure`
|
||||
- For `simon` -> `/home/simon/.didactyl_startup_failure`
|
||||
- Both inside the writable `ReadWritePaths`, so writes succeed under the sandbox.
|
||||
- Resolve the directory the same way the local-file tools do: prefer
|
||||
`cfg->tools.shell.working_directory` when non-empty, else `"."`
|
||||
(mirror [`tool_local.c`](src/tools/tool_local.c:49)).
|
||||
|
||||
### Marker contents
|
||||
|
||||
Plain text, one record, easy to parse and inspect manually:
|
||||
|
||||
- `step=14`
|
||||
- `label=Subscribe self-skill cache`
|
||||
- `detail=no skill events found after EOSE`
|
||||
- `last_sent_epoch=1781314692`
|
||||
|
||||
(Only `step` is strictly needed for the de-dup key; the rest aids debugging.)
|
||||
|
||||
### New helpers in [`src/main.c`](src/main.c)
|
||||
|
||||
Add small static helpers near
|
||||
[`notify_admin_startup_failure()`](src/main.c:331):
|
||||
|
||||
- `startup_failure_marker_path(cfg, out, out_size)` -- builds
|
||||
`<workdir>/.didactyl_startup_failure`.
|
||||
- `startup_failure_already_notified(cfg, step)` -- returns 1 if the marker exists AND its
|
||||
`step=` matches the current `step` (suppress); 0 otherwise (allow). Missing/unreadable
|
||||
marker -> 0 (allow).
|
||||
- `startup_failure_marker_write(cfg, step, label, detail)` -- writes/overwrites the marker
|
||||
after an attempted send.
|
||||
- `startup_failure_marker_clear(cfg)` -- `remove()` the marker; ignore ENOENT.
|
||||
|
||||
### Wiring
|
||||
|
||||
- In [`notify_admin_startup_failure()`](src/main.c:331): after the existing guard
|
||||
clauses (config/admin/relay), check `startup_failure_already_notified(cfg, step)`.
|
||||
If it returns 1, log a DEBUG_INFO suppression line and return without sending.
|
||||
- On a successful send, call `startup_failure_marker_write(cfg, step, label, detail)`.
|
||||
- If the same step keeps failing, only the first restart in the episode sends a DM;
|
||||
subsequent restarts find the matching marker and stay silent.
|
||||
- If a different step fails later, the `step=` mismatch allows exactly one new DM and
|
||||
rewrites the marker with the new step.
|
||||
- On the success path, clear the marker so the next failure episode notifies again. Add
|
||||
`startup_failure_marker_clear(&cfg);` next to the READY success DM at
|
||||
[`src/main.c:1663`](src/main.c:1663).
|
||||
|
||||
### Edge cases
|
||||
|
||||
- Marker write failure (e.g. read-only FS): log DEBUG_WARN and continue. Worst case we
|
||||
fall back to current behavior (may re-send on next restart) -- acceptable, never fatal.
|
||||
- Two services share the binary but use different home dirs, so markers never collide.
|
||||
|
||||
## Part B -- Descriptive failure message
|
||||
|
||||
Enhance the message built in
|
||||
[`notify_admin_startup_failure()`](src/main.c:331) to append:
|
||||
|
||||
1. **Attempted relays + per-relay state.** Add a compact accessor to the nostr handler:
|
||||
- New `nostr_handler_relay_state_summary(void)` in
|
||||
[`nostr_handler.c`](src/nostr_handler.c) / [`nostr_handler.h`](src/nostr_handler.h)
|
||||
returning a caller-freed compact string like
|
||||
`relay.laantungir.net=connected; relay.damus.io=connected; relay.primal.net=connecting`.
|
||||
- Implement by reusing the existing loop over `g_cfg->relays[]` +
|
||||
`nostr_relay_pool_get_relay_status()` + `relay_status_str()` (patterns at
|
||||
[`src/nostr_handler.c:3183`](src/nostr_handler.c:3183) and
|
||||
[`src/nostr_handler.c:419`](src/nostr_handler.c:419)).
|
||||
- Preferred over embedding raw JSON from
|
||||
[`nostr_handler_relay_status_json()`](src/nostr_handler.c:3971) to keep the DM short.
|
||||
2. **Needed event kinds (step-specific).** For step 14 append a fixed clause naming the
|
||||
required events: kind 31123/31124 (skills) and kind 10123 (adoption list). Implement as
|
||||
a small `startup_step_needed_events(step)` lookup in [`src/main.c`](src/main.c) that
|
||||
returns a clause for known steps (14, 11, ...) and empty for others.
|
||||
|
||||
### Resulting message shape (example)
|
||||
|
||||
- `Didactyl FAILED to start at 2026-06-13 10:38:13.`
|
||||
- `Startup step [14] Subscribe self-skill cache failed: no skill events found after EOSE.`
|
||||
- `Version v0.2.48. Connected relays: 3/3.`
|
||||
- `Relays: relay.laantungir.net=connected; relay.damus.io=connected; relay.primal.net=connected.`
|
||||
- `Needed events: kind 31123/31124 (skills) and kind 10123 (adoption list) for this agent's pubkey.`
|
||||
- `The agent is NOT online and will not answer DMs until fixed.`
|
||||
|
||||
Keep within the existing `failure_dm` buffer (bump to ~1536 if needed); `snprintf`
|
||||
truncation remains safe.
|
||||
|
||||
## Implementation order
|
||||
|
||||
1. Add `nostr_handler_relay_state_summary()` to handler `.c`/`.h`.
|
||||
2. Add marker helpers + `startup_step_needed_events()` to [`src/main.c`](src/main.c).
|
||||
3. Update [`notify_admin_startup_failure()`](src/main.c:331): de-dup check, richer
|
||||
message, marker write on send.
|
||||
4. Add `startup_failure_marker_clear(&cfg)` on the READY success path
|
||||
([`src/main.c:1663`](src/main.c:1663)).
|
||||
5. Build (`make`), then `build_static.sh`, deploy, verify.
|
||||
|
||||
## Verification (follow-up)
|
||||
|
||||
1. **Throttle:** reproduce step-14 failure; confirm exactly one DM on the first failing
|
||||
restart and no further DMs across subsequent restart-loop iterations (journal shows a
|
||||
suppression line).
|
||||
2. **Clear-on-success:** publish a skill so startup reaches `READY`; confirm marker is
|
||||
removed and the normal startup DM is sent.
|
||||
3. **Re-arm:** break startup again and confirm a single new DM is delivered.
|
||||
4. **Descriptive content:** confirm the DM includes the per-relay state line and the
|
||||
needed-events clause.
|
||||
5. **Sandbox write:** on VM410 confirm the marker is created at
|
||||
`/home/didactyl/.didactyl_startup_failure` (and `/home/simon/...`) without permission
|
||||
errors under the systemd sandbox.
|
||||
183
src/agent.c
183
src/agent.c
@@ -35,8 +35,6 @@ static pthread_mutex_t g_context_part_names_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
#define AGENT_DEBOUNCE_WINDOW_SECONDS 5
|
||||
#define AGENT_DEBOUNCE_CACHE_SIZE 256
|
||||
#define AGENT_HISTORY_TURNS 12
|
||||
#define AGENT_HISTORY_QUERY_LIMIT 200
|
||||
#define AGENT_ADOPTED_SKILLS_CACHE_TTL_SECONDS 300
|
||||
#define AGENT_ADOPTED_SKILLS_MAX 24
|
||||
#define AGENT_ADOPTED_SKILL_CONTENT_MAX_CHARS 1800
|
||||
@@ -681,7 +679,21 @@ static char* build_slash_help_all_json(void) {
|
||||
|
||||
int adopted_count = 0;
|
||||
if (adoption_events && cJSON_IsArray(adoption_events) && cJSON_GetArraySize(adoption_events) > 0) {
|
||||
cJSON* ev0 = cJSON_GetArrayItem(adoption_events, 0);
|
||||
cJSON* ev0 = NULL;
|
||||
double best_created = -1.0;
|
||||
int an = cJSON_GetArraySize(adoption_events);
|
||||
for (int ai = 0; ai < an; ai++) {
|
||||
cJSON* ev = cJSON_GetArrayItem(adoption_events, ai);
|
||||
if (!ev || !cJSON_IsObject(ev)) {
|
||||
continue;
|
||||
}
|
||||
cJSON* created_at = cJSON_GetObjectItemCaseSensitive(ev, "created_at");
|
||||
double created = (created_at && cJSON_IsNumber(created_at)) ? created_at->valuedouble : 0.0;
|
||||
if (!ev0 || created > best_created) {
|
||||
ev0 = ev;
|
||||
best_created = created;
|
||||
}
|
||||
}
|
||||
cJSON* tags = ev0 ? cJSON_GetObjectItemCaseSensitive(ev0, "tags") : NULL;
|
||||
if (tags && cJSON_IsArray(tags)) {
|
||||
int tn = cJSON_GetArraySize(tags);
|
||||
@@ -1048,73 +1060,6 @@ static __attribute__((unused)) char* build_sender_verification_text(didactyl_sen
|
||||
}
|
||||
|
||||
|
||||
static __attribute__((unused)) int append_recent_admin_dm_history(cJSON* messages, const char* current_message) {
|
||||
if (!messages || !g_cfg) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
char* history_json = nostr_handler_get_dm_history_json(g_cfg->admin.pubkey, AGENT_HISTORY_TURNS);
|
||||
if (!history_json) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
cJSON* items = cJSON_Parse(history_json);
|
||||
free(history_json);
|
||||
if (!items || !cJSON_IsArray(items)) {
|
||||
cJSON_Delete(items);
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char* last_appended_role = NULL;
|
||||
const char* last_appended_content = NULL;
|
||||
|
||||
int n = cJSON_GetArraySize(items);
|
||||
for (int i = 0; i < n; i++) {
|
||||
cJSON* item = cJSON_GetArrayItem(items, i);
|
||||
cJSON* role = item ? cJSON_GetObjectItemCaseSensitive(item, "role") : NULL;
|
||||
cJSON* content = item ? cJSON_GetObjectItemCaseSensitive(item, "content") : NULL;
|
||||
cJSON* created_at = item ? cJSON_GetObjectItemCaseSensitive(item, "created_at") : NULL;
|
||||
|
||||
if (!role || !content || !cJSON_IsString(role) || !cJSON_IsString(content) ||
|
||||
!role->valuestring || !content->valuestring) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const char* role_s = role->valuestring;
|
||||
const char* content_s = content->valuestring;
|
||||
int role_is_user = (strcmp(role_s, "user") == 0);
|
||||
if (!role_is_user && strcmp(role_s, "assistant") != 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (i == n - 1 && role_is_user && current_message && strcmp(content_s, current_message) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (last_appended_role && last_appended_content &&
|
||||
strcmp(last_appended_role, role_s) == 0 &&
|
||||
strcmp(last_appended_content, content_s) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (append_simple_message(messages, role_s, content_s) != 0) {
|
||||
cJSON_Delete(items);
|
||||
return -1;
|
||||
}
|
||||
|
||||
cJSON* appended = cJSON_GetArrayItem(messages, cJSON_GetArraySize(messages) - 1);
|
||||
if (appended && cJSON_IsObject(appended) && created_at && cJSON_IsNumber(created_at)) {
|
||||
cJSON_AddNumberToObject(appended, "_ts", created_at->valuedouble);
|
||||
}
|
||||
|
||||
last_appended_role = role_s;
|
||||
last_appended_content = content_s;
|
||||
}
|
||||
|
||||
cJSON_Delete(items);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static cJSON* find_tag_value_string_local(cJSON* tags, const char* key) {
|
||||
if (!tags || !key || !cJSON_IsArray(tags)) {
|
||||
return NULL;
|
||||
@@ -1449,7 +1394,29 @@ static int refresh_adopted_skills_cache_if_needed(void) {
|
||||
free(adoption_json);
|
||||
|
||||
if (adoption_events && cJSON_IsArray(adoption_events) && cJSON_GetArraySize(adoption_events) > 0) {
|
||||
cJSON* list_event = cJSON_GetArrayItem(adoption_events, 0);
|
||||
cJSON* list_event = NULL;
|
||||
double list_event_created_at = -1.0;
|
||||
int adoption_n = cJSON_GetArraySize(adoption_events);
|
||||
for (int ai = 0; ai < adoption_n; ai++) {
|
||||
cJSON* ev = cJSON_GetArrayItem(adoption_events, ai);
|
||||
if (!ev || !cJSON_IsObject(ev)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
cJSON* ev_pubkey = cJSON_GetObjectItemCaseSensitive(ev, "pubkey");
|
||||
if (!ev_pubkey || !cJSON_IsString(ev_pubkey) || !ev_pubkey->valuestring ||
|
||||
strcmp(ev_pubkey->valuestring, g_cfg->keys.public_key_hex) != 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
cJSON* created_at = cJSON_GetObjectItemCaseSensitive(ev, "created_at");
|
||||
double created = (created_at && cJSON_IsNumber(created_at)) ? created_at->valuedouble : 0.0;
|
||||
if (!list_event || created > list_event_created_at) {
|
||||
list_event = ev;
|
||||
list_event_created_at = created;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON* list_tags = list_event ? cJSON_GetObjectItemCaseSensitive(list_event, "tags") : NULL;
|
||||
|
||||
if (list_tags && cJSON_IsArray(list_tags)) {
|
||||
@@ -1761,18 +1728,6 @@ static __attribute__((unused)) int append_adopted_skills_context(cJSON* messages
|
||||
return rc;
|
||||
}
|
||||
|
||||
static __attribute__((unused)) cJSON* build_recent_admin_dm_history_messages(const char* current_message) {
|
||||
cJSON* messages = cJSON_CreateArray();
|
||||
if (!messages) {
|
||||
return NULL;
|
||||
}
|
||||
if (append_recent_admin_dm_history(messages, current_message) != 0) {
|
||||
cJSON_Delete(messages);
|
||||
return NULL;
|
||||
}
|
||||
return messages;
|
||||
}
|
||||
|
||||
int agent_init(didactyl_config_t* config) {
|
||||
if (!config) {
|
||||
return -1;
|
||||
@@ -2182,9 +2137,11 @@ void agent_on_message(const char* sender_pubkey_hex,
|
||||
|
||||
int max_turns = g_cfg->tools.max_turns > 0 ? g_cfg->tools.max_turns : 40;
|
||||
int stall_repeat_threshold = g_cfg->tools.stall_repeat_threshold > 1 ? g_cfg->tools.stall_repeat_threshold : 3;
|
||||
int max_context_bytes = g_cfg->tools.max_context_bytes >= 4096 ? g_cfg->tools.max_context_bytes : (128 * 1024);
|
||||
uint64_t last_tool_fp = 0;
|
||||
int repeated_tool_turns = 0;
|
||||
int exited_on_stall = 0;
|
||||
int exited_on_context_limit = 0;
|
||||
int stall_due_to_length = 0;
|
||||
char* final_answer_owned = NULL;
|
||||
int turns_run = 0;
|
||||
@@ -2196,6 +2153,17 @@ void agent_on_message(const char* sender_pubkey_hex,
|
||||
break;
|
||||
}
|
||||
|
||||
size_t messages_json_len = strlen(messages_json);
|
||||
if ((int)messages_json_len > max_context_bytes) {
|
||||
DEBUG_WARN("[didactyl] DM tool loop context limit exceeded: bytes=%zu max_context_bytes=%d turn=%d",
|
||||
messages_json_len,
|
||||
max_context_bytes,
|
||||
turns_run);
|
||||
exited_on_context_limit = 1;
|
||||
free(messages_json);
|
||||
break;
|
||||
}
|
||||
|
||||
llm_response_t resp;
|
||||
int rc = llm_chat_with_tools_messages(messages_json, tools_json, "auto", &resp);
|
||||
free(messages_json);
|
||||
@@ -2275,28 +2243,35 @@ void agent_on_message(const char* sender_pubkey_hex,
|
||||
llm_response_free(&resp);
|
||||
}
|
||||
|
||||
if (!final_answer_owned) {
|
||||
if (!final_answer_owned && !exited_on_context_limit) {
|
||||
char* messages_json = cJSON_PrintUnformatted(messages);
|
||||
if (messages_json) {
|
||||
llm_response_t final_resp;
|
||||
int final_rc = llm_chat_with_tools_messages(messages_json, tools_json, "none", &final_resp);
|
||||
free(messages_json);
|
||||
if (final_rc == 0) {
|
||||
const char* forced_answer = final_resp.content ? final_resp.content : "";
|
||||
if (forced_answer[0] != '\0') {
|
||||
final_answer_owned = strdup(forced_answer);
|
||||
size_t messages_json_len = strlen(messages_json);
|
||||
if ((int)messages_json_len <= max_context_bytes) {
|
||||
llm_response_t final_resp;
|
||||
int final_rc = llm_chat_with_tools_messages(messages_json, tools_json, "none", &final_resp);
|
||||
if (final_rc == 0) {
|
||||
const char* forced_answer = final_resp.content ? final_resp.content : "";
|
||||
if (forced_answer[0] != '\0') {
|
||||
final_answer_owned = strdup(forced_answer);
|
||||
}
|
||||
llm_response_free(&final_resp);
|
||||
}
|
||||
llm_response_free(&final_resp);
|
||||
} else {
|
||||
exited_on_context_limit = 1;
|
||||
}
|
||||
free(messages_json);
|
||||
}
|
||||
}
|
||||
|
||||
int exhausted_on_max_turns = (!final_answer_owned && !exited_on_stall && turns_run >= max_turns);
|
||||
int exhausted_on_max_turns = (!final_answer_owned && !exited_on_stall && !exited_on_context_limit && turns_run >= max_turns);
|
||||
|
||||
if (!final_answer_owned) {
|
||||
final_answer_owned = strdup(exited_on_stall
|
||||
? "I stopped repeated tool calls after detecting a loop and could not produce a final summary."
|
||||
: "I reached the tool-turn limit before getting a final response from the model.");
|
||||
final_answer_owned = strdup(exited_on_context_limit
|
||||
? "I paused because the working context became too large while using tools. Please narrow the scope and ask me to continue from a smaller context."
|
||||
: (exited_on_stall
|
||||
? "I stopped repeated tool calls after detecting a loop and could not produce a final summary."
|
||||
: "I reached the tool-turn limit before getting a final response from the model."));
|
||||
}
|
||||
|
||||
if (exhausted_on_max_turns) {
|
||||
@@ -2313,17 +2288,25 @@ void agent_on_message(const char* sender_pubkey_hex,
|
||||
|
||||
const char* final_answer = final_answer_owned ? final_answer_owned : "I reached the tool-turn limit before getting a final response from the model.";
|
||||
|
||||
if (exited_on_stall || exhausted_on_max_turns) {
|
||||
if (exited_on_stall || exhausted_on_max_turns || exited_on_context_limit) {
|
||||
notify_admin_limit_diagnostic("dm_agent_loop",
|
||||
exited_on_stall ? "stall_repetition_detected" : "max_turns_exhausted",
|
||||
exited_on_context_limit
|
||||
? "max_context_bytes_exceeded"
|
||||
: (exited_on_stall ? "stall_repetition_detected" : "max_turns_exhausted"),
|
||||
sender_pubkey_hex,
|
||||
max_turns,
|
||||
turns_run,
|
||||
stall_repeat_threshold,
|
||||
repeated_tool_turns,
|
||||
g_cfg->llm.max_tokens,
|
||||
(exited_on_stall && stall_due_to_length) ? "max_tokens_truncation" : NULL,
|
||||
(exited_on_stall && stall_due_to_length) ? "Increase max_tokens (example: /model_set {\"max_tokens\": 4096})" : NULL,
|
||||
exited_on_context_limit
|
||||
? "tool_context_growth"
|
||||
: ((exited_on_stall && stall_due_to_length) ? "max_tokens_truncation" : NULL),
|
||||
exited_on_context_limit
|
||||
? "Reduce tool-loop breadth or lower max_turns; context exceeded max_context_bytes."
|
||||
: ((exited_on_stall && stall_due_to_length)
|
||||
? "Increase max_tokens (example: /model_set {\"max_tokens\": 4096})"
|
||||
: NULL),
|
||||
final_answer);
|
||||
}
|
||||
fprintf(stdout, "[didactyl] final response: %.240s%s\n",
|
||||
|
||||
@@ -226,6 +226,7 @@ static int parse_tools_config(cJSON* root, didactyl_config_t* config) {
|
||||
cJSON* api_default_max_turns = cJSON_GetObjectItemCaseSensitive(tools, "api_default_max_turns");
|
||||
cJSON* api_max_turns_ceiling = cJSON_GetObjectItemCaseSensitive(tools, "api_max_turns_ceiling");
|
||||
cJSON* stall_repeat_threshold = cJSON_GetObjectItemCaseSensitive(tools, "stall_repeat_threshold");
|
||||
cJSON* max_context_bytes = cJSON_GetObjectItemCaseSensitive(tools, "max_context_bytes");
|
||||
cJSON* local_http_fetch_default_timeout_seconds =
|
||||
cJSON_GetObjectItemCaseSensitive(tools, "local_http_fetch_default_timeout_seconds");
|
||||
cJSON* local_http_fetch_max_timeout_seconds =
|
||||
@@ -252,6 +253,9 @@ static int parse_tools_config(cJSON* root, didactyl_config_t* config) {
|
||||
if (stall_repeat_threshold && cJSON_IsNumber(stall_repeat_threshold)) {
|
||||
config->tools.stall_repeat_threshold = (int)stall_repeat_threshold->valuedouble;
|
||||
}
|
||||
if (max_context_bytes && cJSON_IsNumber(max_context_bytes)) {
|
||||
config->tools.max_context_bytes = (int)max_context_bytes->valuedouble;
|
||||
}
|
||||
if (local_http_fetch_default_timeout_seconds && cJSON_IsNumber(local_http_fetch_default_timeout_seconds)) {
|
||||
config->tools.local_http_fetch_default_timeout_seconds =
|
||||
(int)local_http_fetch_default_timeout_seconds->valuedouble;
|
||||
@@ -311,6 +315,9 @@ static int parse_tools_config(cJSON* root, didactyl_config_t* config) {
|
||||
if (config->tools.stall_repeat_threshold < 2) {
|
||||
config->tools.stall_repeat_threshold = 3;
|
||||
}
|
||||
if (config->tools.max_context_bytes < 4096) {
|
||||
config->tools.max_context_bytes = 128 * 1024;
|
||||
}
|
||||
if (config->tools.local_http_fetch_default_timeout_seconds < 1) {
|
||||
config->tools.local_http_fetch_default_timeout_seconds = 20;
|
||||
}
|
||||
@@ -1441,6 +1448,7 @@ int config_load(const char* path, didactyl_config_t* config) {
|
||||
config->tools.api_default_max_turns = 8;
|
||||
config->tools.api_max_turns_ceiling = 32;
|
||||
config->tools.stall_repeat_threshold = 3;
|
||||
config->tools.max_context_bytes = 128 * 1024;
|
||||
config->tools.local_http_fetch_default_timeout_seconds = 20;
|
||||
config->tools.local_http_fetch_max_timeout_seconds = 120;
|
||||
config->tools.blossom_max_upload_bytes = 16 * 1024 * 1024;
|
||||
|
||||
@@ -51,6 +51,7 @@ typedef struct {
|
||||
int api_default_max_turns;
|
||||
int api_max_turns_ceiling;
|
||||
int stall_repeat_threshold;
|
||||
int max_context_bytes;
|
||||
int local_http_fetch_default_timeout_seconds;
|
||||
int local_http_fetch_max_timeout_seconds;
|
||||
shell_tools_config_t shell;
|
||||
|
||||
@@ -815,7 +815,21 @@ static char* build_slash_help_all_json_local(void) {
|
||||
|
||||
int adopted_count = 0;
|
||||
if (adoption_events && cJSON_IsArray(adoption_events) && cJSON_GetArraySize(adoption_events) > 0) {
|
||||
cJSON* ev0 = cJSON_GetArrayItem(adoption_events, 0);
|
||||
cJSON* ev0 = NULL;
|
||||
double best_created = -1.0;
|
||||
int an = cJSON_GetArraySize(adoption_events);
|
||||
for (int ai = 0; ai < an; ai++) {
|
||||
cJSON* ev = cJSON_GetArrayItem(adoption_events, ai);
|
||||
if (!ev || !cJSON_IsObject(ev)) {
|
||||
continue;
|
||||
}
|
||||
cJSON* created_at = cJSON_GetObjectItemCaseSensitive(ev, "created_at");
|
||||
double created = (created_at && cJSON_IsNumber(created_at)) ? created_at->valuedouble : 0.0;
|
||||
if (!ev0 || created > best_created) {
|
||||
ev0 = ev;
|
||||
best_created = created;
|
||||
}
|
||||
}
|
||||
cJSON* tags = ev0 ? cJSON_GetObjectItemCaseSensitive(ev0, "tags") : NULL;
|
||||
if (tags && cJSON_IsArray(tags)) {
|
||||
int tn = cJSON_GetArraySize(tags);
|
||||
|
||||
336
src/main.c
336
src/main.c
@@ -6,6 +6,9 @@
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
|
||||
#include "../nostr_core_lib/nostr_core/nostr_core.h"
|
||||
#include "main.h"
|
||||
@@ -68,6 +71,59 @@ static void signal_handler(int signum) {
|
||||
g_running = 0;
|
||||
}
|
||||
|
||||
static int systemd_notify_send(const char* state) {
|
||||
if (!state || state[0] == '\0') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char* notify_socket = getenv("NOTIFY_SOCKET");
|
||||
if (!notify_socket || notify_socket[0] == '\0') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (notify_socket[0] != '/' && notify_socket[0] != '@') {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int fd = socket(AF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC, 0);
|
||||
if (fd < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
struct sockaddr_un addr;
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
addr.sun_family = AF_UNIX;
|
||||
|
||||
size_t path_len = strlen(notify_socket);
|
||||
if (path_len >= sizeof(addr.sun_path)) {
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
memcpy(addr.sun_path, notify_socket, path_len + 1);
|
||||
socklen_t addr_len = (socklen_t)(sizeof(sa_family_t) + path_len + 1U);
|
||||
if (notify_socket[0] == '@') {
|
||||
addr.sun_path[0] = '\0';
|
||||
addr_len = (socklen_t)(sizeof(sa_family_t) + path_len);
|
||||
}
|
||||
|
||||
ssize_t sent = sendto(fd,
|
||||
state,
|
||||
strlen(state),
|
||||
MSG_NOSIGNAL,
|
||||
(const struct sockaddr*)&addr,
|
||||
addr_len);
|
||||
int saved_errno = errno;
|
||||
close(fd);
|
||||
errno = saved_errno;
|
||||
|
||||
if (sent < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void configure_mongoose_log_level_from_debug(void) {
|
||||
if (g_debug_level >= DEBUG_LEVEL_TRACE) {
|
||||
mg_log_set(MG_LL_INFO);
|
||||
@@ -272,6 +328,174 @@ static void startup_step_fail(int step, const char* label, const char* detail) {
|
||||
fflush(stderr);
|
||||
}
|
||||
|
||||
static void startup_failure_marker_path(const didactyl_config_t* cfg, char* out, size_t out_size) {
|
||||
if (!out || out_size == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const char* cwd = ".";
|
||||
if (cfg && cfg->tools.shell.working_directory[0] != '\0') {
|
||||
cwd = cfg->tools.shell.working_directory;
|
||||
}
|
||||
|
||||
size_t cwd_len = strlen(cwd);
|
||||
if (cwd_len > 0 && cwd[cwd_len - 1] == '/') {
|
||||
snprintf(out, out_size, "%s.didactyl_startup_failure", cwd);
|
||||
} else {
|
||||
snprintf(out, out_size, "%s/.didactyl_startup_failure", cwd);
|
||||
}
|
||||
}
|
||||
|
||||
static int startup_failure_already_notified(const didactyl_config_t* cfg, int step) {
|
||||
char marker_path[512] = {0};
|
||||
startup_failure_marker_path(cfg, marker_path, sizeof(marker_path));
|
||||
|
||||
FILE* fp = fopen(marker_path, "rb");
|
||||
if (!fp) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int marker_step = -1;
|
||||
char line[512];
|
||||
while (fgets(line, sizeof(line), fp)) {
|
||||
if (sscanf(line, "step=%d", &marker_step) == 1) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
|
||||
return marker_step == step ? 1 : 0;
|
||||
}
|
||||
|
||||
static void startup_failure_marker_write(const didactyl_config_t* cfg,
|
||||
int step,
|
||||
const char* label,
|
||||
const char* detail) {
|
||||
char marker_path[512] = {0};
|
||||
startup_failure_marker_path(cfg, marker_path, sizeof(marker_path));
|
||||
|
||||
FILE* fp = fopen(marker_path, "wb");
|
||||
if (!fp) {
|
||||
DEBUG_WARN("[didactyl] startup failure marker write failed: path=%s errno=%d", marker_path, errno);
|
||||
return;
|
||||
}
|
||||
|
||||
const char* effective_label = (label && label[0] != '\0') ? label : "Unknown startup step";
|
||||
const char* effective_detail = (detail && detail[0] != '\0') ? detail : "no detail provided";
|
||||
time_t now = time(NULL);
|
||||
|
||||
fprintf(fp, "step=%d\n", step);
|
||||
fprintf(fp, "label=%s\n", effective_label);
|
||||
fprintf(fp, "detail=%s\n", effective_detail);
|
||||
fprintf(fp, "last_sent_epoch=%ld\n", (long)now);
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
static void startup_failure_marker_clear(const didactyl_config_t* cfg) {
|
||||
char marker_path[512] = {0};
|
||||
startup_failure_marker_path(cfg, marker_path, sizeof(marker_path));
|
||||
if (remove(marker_path) != 0 && errno != ENOENT) {
|
||||
DEBUG_WARN("[didactyl] startup failure marker clear failed: path=%s errno=%d", marker_path, errno);
|
||||
}
|
||||
}
|
||||
|
||||
static const char* startup_step_needed_events(int step) {
|
||||
if (step == 14) {
|
||||
return "kind 31123/31124 (skills) and kind 10123 (adoption list) for this agent pubkey";
|
||||
}
|
||||
if (step == 11) {
|
||||
return "kind 10002 relay list for this agent pubkey";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void notify_admin_startup_failure(const didactyl_config_t* cfg,
|
||||
int step,
|
||||
const char* label,
|
||||
const char* detail) {
|
||||
if (!cfg) {
|
||||
DEBUG_WARN("[didactyl] startup failure DM skipped: config unavailable (step=%d)", step);
|
||||
return;
|
||||
}
|
||||
|
||||
if (cfg->admin.pubkey[0] == '\0') {
|
||||
DEBUG_WARN("[didactyl] startup failure DM skipped: admin pubkey unavailable (step=%d)", step);
|
||||
return;
|
||||
}
|
||||
|
||||
int connected_relays = nostr_handler_connected_relay_count();
|
||||
if (connected_relays <= 0) {
|
||||
DEBUG_WARN("[didactyl] startup failure DM skipped: no connected relays (step=%d)", step);
|
||||
return;
|
||||
}
|
||||
|
||||
if (startup_failure_already_notified(cfg, step)) {
|
||||
DEBUG_INFO("[didactyl] startup failure DM suppressed (already notified for step %d)", step);
|
||||
return;
|
||||
}
|
||||
|
||||
const char* effective_label = (label && label[0] != '\0') ? label : "Unknown startup step";
|
||||
const char* effective_detail = (detail && detail[0] != '\0') ? detail : "no detail provided";
|
||||
const char* startup_name = nostr_handler_get_startup_display_name();
|
||||
const char* needed_events = startup_step_needed_events(step);
|
||||
char* relay_summary = nostr_handler_relay_state_summary();
|
||||
|
||||
time_t now = time(NULL);
|
||||
struct tm tm_now;
|
||||
char time_str[32] = {0};
|
||||
if (localtime_r(&now, &tm_now)) {
|
||||
(void)strftime(time_str, sizeof(time_str), "%Y-%m-%d %H:%M:%S", &tm_now);
|
||||
} else {
|
||||
snprintf(time_str, sizeof(time_str), "%ld", (long)now);
|
||||
}
|
||||
|
||||
char failure_dm[1536];
|
||||
if (needed_events && needed_events[0] != '\0') {
|
||||
snprintf(failure_dm,
|
||||
sizeof(failure_dm),
|
||||
"%s FAILED to start at %s. Startup step [%02d] %s failed: %s. Version %s. Connected relays: %d/%d. Relays: %s. Needed events: %s. The agent is NOT online and will not answer DMs until fixed.",
|
||||
(startup_name && startup_name[0] != '\0') ? startup_name : "Didactyl",
|
||||
time_str,
|
||||
step,
|
||||
effective_label,
|
||||
effective_detail,
|
||||
DIDACTYL_VERSION,
|
||||
connected_relays,
|
||||
cfg->relay_count,
|
||||
relay_summary ? relay_summary : "unavailable",
|
||||
needed_events);
|
||||
} else {
|
||||
snprintf(failure_dm,
|
||||
sizeof(failure_dm),
|
||||
"%s FAILED to start at %s. Startup step [%02d] %s failed: %s. Version %s. Connected relays: %d/%d. Relays: %s. The agent is NOT online and will not answer DMs until fixed.",
|
||||
(startup_name && startup_name[0] != '\0') ? startup_name : "Didactyl",
|
||||
time_str,
|
||||
step,
|
||||
effective_label,
|
||||
effective_detail,
|
||||
DIDACTYL_VERSION,
|
||||
connected_relays,
|
||||
cfg->relay_count,
|
||||
relay_summary ? relay_summary : "unavailable");
|
||||
}
|
||||
|
||||
if (nostr_handler_send_dm_auto(cfg->admin.pubkey, failure_dm) != 0) {
|
||||
DEBUG_WARN("[didactyl] startup failure DM send failed (step=%d)", step);
|
||||
free(relay_summary);
|
||||
return;
|
||||
}
|
||||
|
||||
startup_failure_marker_write(cfg, step, effective_label, effective_detail);
|
||||
|
||||
DEBUG_INFO("[didactyl] startup failure DM sent to admin for step %d", step);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
(void)nostr_handler_poll(100);
|
||||
}
|
||||
|
||||
free(relay_summary);
|
||||
}
|
||||
|
||||
static int relay_list_contains(char** relays, int relay_count, const char* relay_url) {
|
||||
if (!relays || relay_count <= 0 || !relay_url || relay_url[0] == '\0') {
|
||||
return 0;
|
||||
@@ -741,8 +965,13 @@ static int fetch_self_config_plaintext(const didactyl_config_t* cfg, const char*
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int apply_recalled_user_settings(didactyl_config_t* cfg, const char* plaintext) {
|
||||
static int apply_recalled_user_settings(didactyl_config_t* cfg,
|
||||
const char* plaintext,
|
||||
int* out_backfill_needed) {
|
||||
if (!cfg || !plaintext) return -1;
|
||||
if (out_backfill_needed) {
|
||||
*out_backfill_needed = 0;
|
||||
}
|
||||
|
||||
cJSON* root = cJSON_Parse(plaintext);
|
||||
if (!root || !cJSON_IsObject(root)) {
|
||||
@@ -752,7 +981,7 @@ static int apply_recalled_user_settings(didactyl_config_t* cfg, const char* plai
|
||||
|
||||
cJSON* global_llm = cJSON_GetObjectItemCaseSensitive(root, "global_llm");
|
||||
cJSON* didactyl = cJSON_GetObjectItemCaseSensitive(root, "didactyl");
|
||||
if (!global_llm || !cJSON_IsObject(global_llm) || !didactyl || !cJSON_IsObject(didactyl)) {
|
||||
if (!global_llm || !cJSON_IsObject(global_llm)) {
|
||||
cJSON_Delete(root);
|
||||
return -1;
|
||||
}
|
||||
@@ -764,15 +993,20 @@ static int apply_recalled_user_settings(didactyl_config_t* cfg, const char* plai
|
||||
cJSON* max_tokens = cJSON_GetObjectItemCaseSensitive(global_llm, "max_tokens");
|
||||
cJSON* temperature = cJSON_GetObjectItemCaseSensitive(global_llm, "temperature");
|
||||
|
||||
cJSON* admin_pubkey = cJSON_GetObjectItemCaseSensitive(didactyl, "admin_pubkey");
|
||||
cJSON* dm_protocol = cJSON_GetObjectItemCaseSensitive(didactyl, "dm_protocol");
|
||||
cJSON* max_turns = cJSON_GetObjectItemCaseSensitive(didactyl, "max_turns");
|
||||
cJSON* admin_pubkey = NULL;
|
||||
cJSON* dm_protocol = NULL;
|
||||
cJSON* max_turns = NULL;
|
||||
if (didactyl && cJSON_IsObject(didactyl)) {
|
||||
admin_pubkey = cJSON_GetObjectItemCaseSensitive(didactyl, "admin_pubkey");
|
||||
dm_protocol = cJSON_GetObjectItemCaseSensitive(didactyl, "dm_protocol");
|
||||
max_turns = cJSON_GetObjectItemCaseSensitive(didactyl, "max_turns");
|
||||
} else if (out_backfill_needed) {
|
||||
*out_backfill_needed = 1;
|
||||
}
|
||||
|
||||
if (!api_key || !cJSON_IsString(api_key) || !api_key->valuestring || api_key->valuestring[0] == '\0' ||
|
||||
!model || !cJSON_IsString(model) || !model->valuestring || model->valuestring[0] == '\0' ||
|
||||
!base_url || !cJSON_IsString(base_url) || !base_url->valuestring || base_url->valuestring[0] == '\0' ||
|
||||
!admin_pubkey || !cJSON_IsString(admin_pubkey) || !admin_pubkey->valuestring || admin_pubkey->valuestring[0] == '\0' ||
|
||||
!dm_protocol || !cJSON_IsString(dm_protocol) || !dm_protocol->valuestring || dm_protocol->valuestring[0] == '\0') {
|
||||
!base_url || !cJSON_IsString(base_url) || !base_url->valuestring || base_url->valuestring[0] == '\0') {
|
||||
cJSON_Delete(root);
|
||||
return -1;
|
||||
}
|
||||
@@ -793,16 +1027,22 @@ static int apply_recalled_user_settings(didactyl_config_t* cfg, const char* plai
|
||||
cfg->llm.temperature = temperature->valuedouble;
|
||||
}
|
||||
|
||||
{
|
||||
if (admin_pubkey && cJSON_IsString(admin_pubkey) && admin_pubkey->valuestring && admin_pubkey->valuestring[0] != '\0') {
|
||||
char decoded[65] = {0};
|
||||
if (decode_pubkey_hex_or_npub_local(admin_pubkey->valuestring, decoded) != 0) {
|
||||
cJSON_Delete(root);
|
||||
return -1;
|
||||
}
|
||||
snprintf(cfg->admin.pubkey, sizeof(cfg->admin.pubkey), "%s", decoded);
|
||||
} else if (out_backfill_needed) {
|
||||
*out_backfill_needed = 1;
|
||||
}
|
||||
|
||||
dm_protocol_from_string(dm_protocol->valuestring, cfg);
|
||||
if (dm_protocol && cJSON_IsString(dm_protocol) && dm_protocol->valuestring && dm_protocol->valuestring[0] != '\0') {
|
||||
dm_protocol_from_string(dm_protocol->valuestring, cfg);
|
||||
} else if (out_backfill_needed) {
|
||||
*out_backfill_needed = 1;
|
||||
}
|
||||
|
||||
if (max_turns && cJSON_IsNumber(max_turns)) {
|
||||
int parsed = (int)max_turns->valuedouble;
|
||||
@@ -903,10 +1143,13 @@ static int persist_runtime_config_to_nostr(const didactyl_config_t* cfg, int per
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int recover_missing_runtime_config_from_nostr(didactyl_config_t* cfg) {
|
||||
static int recover_missing_runtime_config_from_nostr(didactyl_config_t* cfg, int* out_backfill_needed) {
|
||||
if (!cfg) {
|
||||
return 0;
|
||||
}
|
||||
if (out_backfill_needed) {
|
||||
*out_backfill_needed = 0;
|
||||
}
|
||||
|
||||
char* settings_plaintext = NULL;
|
||||
if (fetch_self_config_plaintext(cfg, "user-settings", &settings_plaintext) != 0 || !settings_plaintext) {
|
||||
@@ -915,14 +1158,22 @@ static int recover_missing_runtime_config_from_nostr(didactyl_config_t* cfg) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (apply_recalled_user_settings(cfg, settings_plaintext) != 0) {
|
||||
int backfill_needed = 0;
|
||||
if (apply_recalled_user_settings(cfg, settings_plaintext, &backfill_needed) != 0) {
|
||||
DEBUG_WARN("[didactyl] startup phase: failed to parse/decrypt recalled user-settings");
|
||||
free(settings_plaintext);
|
||||
return 0;
|
||||
}
|
||||
|
||||
free(settings_plaintext);
|
||||
DEBUG_INFO("[didactyl] startup phase: recovered user-settings from Nostr");
|
||||
if (out_backfill_needed) {
|
||||
*out_backfill_needed = backfill_needed;
|
||||
}
|
||||
if (backfill_needed) {
|
||||
DEBUG_INFO("[didactyl] startup phase: recovered user-settings from Nostr (missing didactyl fields will be backfilled)");
|
||||
} else {
|
||||
DEBUG_INFO("[didactyl] startup phase: recovered user-settings from Nostr");
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1203,12 +1454,21 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
|
||||
startup_step_begin(2, "Recover runtime config from Nostr");
|
||||
int llm_recalled_from_nostr = recover_missing_runtime_config_from_nostr(&cfg);
|
||||
startup_step_ok(2, "Recover runtime config from Nostr", llm_recalled_from_nostr ? "user-settings recalled" : NULL);
|
||||
int user_settings_backfill_needed = 0;
|
||||
int llm_recalled_from_nostr = recover_missing_runtime_config_from_nostr(&cfg, &user_settings_backfill_needed);
|
||||
startup_step_ok(2,
|
||||
"Recover runtime config from Nostr",
|
||||
llm_recalled_from_nostr
|
||||
? (user_settings_backfill_needed ? "user-settings recalled (backfill required)" : "user-settings recalled")
|
||||
: NULL);
|
||||
|
||||
startup_step_begin(3, "Validate LLM config");
|
||||
if (!llm_config_is_complete(&cfg.llm)) {
|
||||
startup_step_fail(3, "Validate LLM config", "missing user-settings.global_llm (model/base_url/api_key)");
|
||||
notify_admin_startup_failure(&cfg,
|
||||
3,
|
||||
"Validate LLM config",
|
||||
"missing user-settings.global_llm (model/base_url/api_key)");
|
||||
fprintf(stderr,
|
||||
"Missing LLM config: provide genesis file values or store d=user-settings with global_llm\n");
|
||||
nostr_block_list_cleanup();
|
||||
@@ -1222,6 +1482,7 @@ int main(int argc, char** argv) {
|
||||
startup_step_begin(4, "Validate admin config");
|
||||
if (!admin_config_is_complete(&cfg)) {
|
||||
startup_step_fail(4, "Validate admin config", "missing admin pubkey");
|
||||
notify_admin_startup_failure(&cfg, 4, "Validate admin config", "missing admin pubkey");
|
||||
fprintf(stderr,
|
||||
"Missing admin config: provide admin.pubkey in genesis, pass --admin, or store d=user-settings with didactyl.admin_pubkey\n");
|
||||
nostr_block_list_cleanup();
|
||||
@@ -1235,6 +1496,7 @@ int main(int argc, char** argv) {
|
||||
startup_step_begin(5, "Initialize LLM client");
|
||||
if (llm_init(&cfg.llm) != 0) {
|
||||
startup_step_fail(5, "Initialize LLM client", "llm_init failed");
|
||||
notify_admin_startup_failure(&cfg, 5, "Initialize LLM client", "llm_init failed");
|
||||
fprintf(stderr, "Failed to initialize llm client\n");
|
||||
nostr_block_list_cleanup();
|
||||
nostr_handler_cleanup();
|
||||
@@ -1253,6 +1515,10 @@ int main(int argc, char** argv) {
|
||||
if (bootstrap_mode || first_run) {
|
||||
if (nostr_handler_reconcile_startup_events() != 0) {
|
||||
startup_step_fail(7, "Reconcile/persist startup state", "startup event reconciliation failed");
|
||||
notify_admin_startup_failure(&cfg,
|
||||
7,
|
||||
"Reconcile/persist startup state",
|
||||
"startup event reconciliation failed");
|
||||
fprintf(stderr, "Failed to publish startup events; aborting startup\n");
|
||||
nostr_block_list_cleanup();
|
||||
nostr_handler_cleanup();
|
||||
@@ -1265,8 +1531,9 @@ int main(int argc, char** argv) {
|
||||
DEBUG_INFO("[didactyl] startup phase: existing-agent mode; skipping startup-event reconcile on subsequent run");
|
||||
}
|
||||
|
||||
if (bootstrap_mode || first_run) {
|
||||
if (persist_runtime_config_to_nostr(&cfg, llm_recalled_from_nostr ? 0 : 1) != 0) {
|
||||
if (bootstrap_mode || first_run || user_settings_backfill_needed) {
|
||||
if (persist_runtime_config_to_nostr(&cfg,
|
||||
(llm_recalled_from_nostr && !user_settings_backfill_needed) ? 0 : 1) != 0) {
|
||||
DEBUG_WARN("[didactyl] startup phase: failed to persist encrypted runtime config to Nostr");
|
||||
} else {
|
||||
DEBUG_INFO("[didactyl] startup phase: persisted encrypted runtime config to Nostr");
|
||||
@@ -1280,6 +1547,7 @@ int main(int argc, char** argv) {
|
||||
startup_step_begin(8, "Initialize agent");
|
||||
if (agent_init(&cfg) != 0) {
|
||||
startup_step_fail(8, "Initialize agent", "agent_init failed");
|
||||
notify_admin_startup_failure(&cfg, 8, "Initialize agent", "agent_init failed");
|
||||
fprintf(stderr, "Failed to initialize agent\n");
|
||||
nostr_block_list_cleanup();
|
||||
nostr_handler_cleanup();
|
||||
@@ -1294,6 +1562,7 @@ int main(int argc, char** argv) {
|
||||
trigger_manager_t trigger_manager;
|
||||
if (trigger_manager_init(&trigger_manager, &cfg) != 0) {
|
||||
startup_step_fail(9, "Initialize trigger manager", "trigger_manager_init failed");
|
||||
notify_admin_startup_failure(&cfg, 9, "Initialize trigger manager", "trigger_manager_init failed");
|
||||
fprintf(stderr, "Failed to initialize trigger manager\n");
|
||||
agent_cleanup();
|
||||
nostr_block_list_cleanup();
|
||||
@@ -1329,6 +1598,10 @@ int main(int argc, char** argv) {
|
||||
int discovered_count = 0;
|
||||
if (wait_for_self_kind10002_relays(&cfg, kind10002_timeout_ms, 200, &discovered_relays, &discovered_count) <= 0) {
|
||||
startup_step_fail(11, "Discover self relay list via kind 10002", "required relay list not retrievable; aborting startup");
|
||||
notify_admin_startup_failure(&cfg,
|
||||
11,
|
||||
"Discover self relay list via kind 10002",
|
||||
"required relay list not retrievable; aborting startup");
|
||||
fprintf(stderr, "Startup aborted: could not retrieve valid self kind 10002 within %d ms\n", kind10002_timeout_ms);
|
||||
agent_cleanup();
|
||||
nostr_block_list_cleanup();
|
||||
@@ -1346,6 +1619,10 @@ int main(int argc, char** argv) {
|
||||
|
||||
if (added_relays < 0 || nostr_handler_sync_relays_from_config() != 0) {
|
||||
startup_step_fail(11, "Discover self relay list via kind 10002", "failed to apply discovered relay list to pool");
|
||||
notify_admin_startup_failure(&cfg,
|
||||
11,
|
||||
"Discover self relay list via kind 10002",
|
||||
"failed to apply discovered relay list to pool");
|
||||
agent_cleanup();
|
||||
nostr_block_list_cleanup();
|
||||
trigger_manager_cleanup(&trigger_manager);
|
||||
@@ -1390,6 +1667,10 @@ int main(int argc, char** argv) {
|
||||
DEBUG_INFO("[didactyl] startup phase: subscribe self skill cache begin");
|
||||
if (nostr_handler_subscribe_self_skills() != 0) {
|
||||
startup_step_fail(14, "Subscribe self-skill cache", "nostr_handler_subscribe_self_skills failed");
|
||||
notify_admin_startup_failure(&cfg,
|
||||
14,
|
||||
"Subscribe self-skill cache",
|
||||
"nostr_handler_subscribe_self_skills failed");
|
||||
DEBUG_ERROR("[didactyl] startup phase: subscribe self skill cache failed");
|
||||
fprintf(stderr, "Startup aborted: failed to subscribe self-skill cache\n");
|
||||
agent_cleanup();
|
||||
@@ -1407,6 +1688,10 @@ int main(int argc, char** argv) {
|
||||
startup_step_fail(14,
|
||||
"Subscribe self-skill cache",
|
||||
"self-skill EOSE not received within timeout");
|
||||
notify_admin_startup_failure(&cfg,
|
||||
14,
|
||||
"Subscribe self-skill cache",
|
||||
"self-skill EOSE not received within timeout");
|
||||
fprintf(stderr,
|
||||
"Startup aborted: self-skill EOSE not received within %d ms\n",
|
||||
self_skill_eose_timeout_ms);
|
||||
@@ -1432,6 +1717,10 @@ int main(int argc, char** argv) {
|
||||
startup_step_fail(14,
|
||||
"Subscribe self-skill cache",
|
||||
"no skill events found after EOSE");
|
||||
notify_admin_startup_failure(&cfg,
|
||||
14,
|
||||
"Subscribe self-skill cache",
|
||||
"no skill events found after EOSE");
|
||||
fprintf(stderr,
|
||||
"Startup aborted: no skill events (kind 31123/31124) found in self-skill cache\n");
|
||||
fprintf(stderr,
|
||||
@@ -1461,6 +1750,7 @@ int main(int argc, char** argv) {
|
||||
DEBUG_INFO("[didactyl] startup phase: subscribe DMs begin");
|
||||
if (nostr_handler_subscribe_dms(agent_on_message, NULL) != 0) {
|
||||
startup_step_fail(15, "Subscribe DMs", "nostr_handler_subscribe_dms failed");
|
||||
notify_admin_startup_failure(&cfg, 15, "Subscribe DMs", "nostr_handler_subscribe_dms failed");
|
||||
DEBUG_ERROR("[didactyl] startup phase: subscribe DMs failed");
|
||||
fprintf(stderr, "Failed to subscribe to DMs\n");
|
||||
agent_cleanup();
|
||||
@@ -1575,16 +1865,28 @@ int main(int argc, char** argv) {
|
||||
DEBUG_WARN("[didactyl] startup phase: failed to send startup status DM to admin");
|
||||
}
|
||||
|
||||
startup_failure_marker_clear(&cfg);
|
||||
|
||||
startup_step_ok(18, "READY", "agent online; entering main poll loop");
|
||||
DEBUG_INFO("[didactyl] entering main poll loop");
|
||||
DEBUG_INFO("[didactyl] running with pubkey %s", cfg.keys.public_key_hex);
|
||||
|
||||
(void)systemd_notify_send("READY=1");
|
||||
time_t last_watchdog_ping = 0;
|
||||
|
||||
while (g_running) {
|
||||
(void)nostr_handler_poll(100);
|
||||
(void)trigger_manager_poll(&trigger_manager);
|
||||
if (http_api_started) {
|
||||
(void)http_api_poll(0);
|
||||
}
|
||||
|
||||
time_t now = time(NULL);
|
||||
if (now != (time_t)-1 && (last_watchdog_ping == 0 || (now - last_watchdog_ping) >= 10)) {
|
||||
(void)systemd_notify_send("WATCHDOG=1");
|
||||
last_watchdog_ping = now;
|
||||
}
|
||||
|
||||
struct timespec ts = {0, 10 * 1000 * 1000};
|
||||
nanosleep(&ts, NULL);
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
// Using DIDACTYL_ prefix to avoid conflicts with nostr_core_lib VERSION macros
|
||||
#define DIDACTYL_VERSION_MAJOR 0
|
||||
#define DIDACTYL_VERSION_MINOR 2
|
||||
#define DIDACTYL_VERSION_PATCH 31
|
||||
#define DIDACTYL_VERSION "v0.2.31"
|
||||
#define DIDACTYL_VERSION_PATCH 49
|
||||
#define DIDACTYL_VERSION "v0.2.49"
|
||||
|
||||
// Agent metadata
|
||||
#define DIDACTYL_NAME "Didactyl"
|
||||
|
||||
@@ -1510,6 +1510,7 @@ static void register_trigger_from_self_skill_event(cJSON* event) {
|
||||
|
||||
static void self_skill_cache_upsert_event_locked(cJSON* event) {
|
||||
if (!event || !cJSON_IsObject(event)) {
|
||||
DEBUG_INFO("[didactyl] self-skill upsert rejected: event missing or not object");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1517,34 +1518,51 @@ static void self_skill_cache_upsert_event_locked(cJSON* event) {
|
||||
cJSON* pubkey = cJSON_GetObjectItemCaseSensitive(event, "pubkey");
|
||||
cJSON* tags = cJSON_GetObjectItemCaseSensitive(event, "tags");
|
||||
cJSON* created_at = cJSON_GetObjectItemCaseSensitive(event, "created_at");
|
||||
cJSON* ev_id = cJSON_GetObjectItemCaseSensitive(event, "id");
|
||||
|
||||
int kind_val = (kind && cJSON_IsNumber(kind)) ? (int)kind->valuedouble : -1;
|
||||
double created = (created_at && cJSON_IsNumber(created_at)) ? created_at->valuedouble : 0.0;
|
||||
|
||||
DEBUG_INFO("[didactyl] self-skill upsert candidate: kind=%d author=%.16s... id=%.16s... created_at=%.0f",
|
||||
kind_val,
|
||||
(pubkey && cJSON_IsString(pubkey) && pubkey->valuestring) ? pubkey->valuestring : "?",
|
||||
(ev_id && cJSON_IsString(ev_id) && ev_id->valuestring) ? ev_id->valuestring : "?",
|
||||
created);
|
||||
|
||||
if (!kind || !cJSON_IsNumber(kind) ||
|
||||
!pubkey || !cJSON_IsString(pubkey) || !pubkey->valuestring ||
|
||||
!tags || !cJSON_IsArray(tags)) {
|
||||
DEBUG_INFO("[didactyl] self-skill upsert rejected: missing required kind/pubkey/tags");
|
||||
return;
|
||||
}
|
||||
|
||||
int kind_val = (int)kind->valuedouble;
|
||||
if (kind_val != 31123 && kind_val != 31124 && kind_val != 10123) {
|
||||
DEBUG_INFO("[didactyl] self-skill upsert rejected: kind not in {31123,31124,10123}");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!g_cfg) {
|
||||
DEBUG_INFO("[didactyl] self-skill upsert rejected: config unavailable");
|
||||
return;
|
||||
}
|
||||
|
||||
int is_agent_author = (strcmp(pubkey->valuestring, g_cfg->keys.public_key_hex) == 0);
|
||||
int is_admin_author = (g_cfg->admin.pubkey[0] != '\0' && strcmp(pubkey->valuestring, g_cfg->admin.pubkey) == 0);
|
||||
if (!is_agent_author && !is_admin_author) {
|
||||
return;
|
||||
if (kind_val == 10123) {
|
||||
if (!is_agent_author) {
|
||||
DEBUG_INFO("[didactyl] self-skill upsert rejected: kind=10123 author is not self");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (is_admin_author && kind_val != 31123) {
|
||||
if (is_admin_author && kind_val == 31124) {
|
||||
DEBUG_INFO("[didactyl] self-skill upsert rejected: admin cannot own private skill (31124)");
|
||||
return;
|
||||
}
|
||||
|
||||
const char* d_tag = find_tag_value_local(tags, "d");
|
||||
if ((kind_val == 31123 || kind_val == 31124) && (!d_tag || d_tag[0] == '\0')) {
|
||||
DEBUG_INFO("[didactyl] self-skill upsert rejected: parameterized kind missing d-tag");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1552,12 +1570,11 @@ static void self_skill_cache_upsert_event_locked(cJSON* event) {
|
||||
cJSON_Delete(g_self_skill_events);
|
||||
g_self_skill_events = cJSON_CreateArray();
|
||||
if (!g_self_skill_events) {
|
||||
DEBUG_INFO("[didactyl] self-skill upsert rejected: failed to create cache array");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
double created = (created_at && cJSON_IsNumber(created_at)) ? created_at->valuedouble : 0.0;
|
||||
|
||||
int n = cJSON_GetArraySize(g_self_skill_events);
|
||||
for (int i = 0; i < n; i++) {
|
||||
cJSON* existing = cJSON_GetArrayItem(g_self_skill_events, i);
|
||||
@@ -1589,23 +1606,56 @@ static void self_skill_cache_upsert_event_locked(cJSON* event) {
|
||||
cJSON* ex_created_at = cJSON_GetObjectItemCaseSensitive(existing, "created_at");
|
||||
double ex_created = (ex_created_at && cJSON_IsNumber(ex_created_at)) ? ex_created_at->valuedouble : 0.0;
|
||||
if (created < ex_created) {
|
||||
DEBUG_INFO("[didactyl] self-skill upsert rejected: stale (existing created_at=%.0f >= new created_at=%.0f)",
|
||||
ex_created,
|
||||
created);
|
||||
return;
|
||||
}
|
||||
|
||||
cJSON* dup = cJSON_Duplicate(event, 1);
|
||||
if (!dup) {
|
||||
DEBUG_INFO("[didactyl] self-skill upsert rejected: failed to duplicate event");
|
||||
return;
|
||||
}
|
||||
|
||||
cJSON_ReplaceItemInArray(g_self_skill_events, i, dup);
|
||||
DEBUG_INFO("[didactyl] self-skill upsert accepted: replaced existing (old created_at=%.0f)", ex_created);
|
||||
if (kind_val == 10123) {
|
||||
int a_count = 0;
|
||||
cJSON* t;
|
||||
cJSON_ArrayForEach(t, tags) {
|
||||
if (cJSON_IsArray(t) && cJSON_GetArraySize(t) >= 2) {
|
||||
cJSON* t0 = cJSON_GetArrayItem(t, 0);
|
||||
if (t0 && cJSON_IsString(t0) && t0->valuestring && strcmp(t0->valuestring, "a") == 0) {
|
||||
a_count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
DEBUG_INFO("[didactyl] kind 10123 accepted with %d 'a' tags", a_count);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
cJSON* dup = cJSON_Duplicate(event, 1);
|
||||
if (!dup) {
|
||||
DEBUG_INFO("[didactyl] self-skill upsert rejected: failed to duplicate event");
|
||||
return;
|
||||
}
|
||||
cJSON_AddItemToArray(g_self_skill_events, dup);
|
||||
DEBUG_INFO("[didactyl] self-skill upsert accepted: new entry added");
|
||||
if (kind_val == 10123) {
|
||||
int a_count = 0;
|
||||
cJSON* t;
|
||||
cJSON_ArrayForEach(t, tags) {
|
||||
if (cJSON_IsArray(t) && cJSON_GetArraySize(t) >= 2) {
|
||||
cJSON* t0 = cJSON_GetArrayItem(t, 0);
|
||||
if (t0 && cJSON_IsString(t0) && t0->valuestring && strcmp(t0->valuestring, "a") == 0) {
|
||||
a_count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
DEBUG_INFO("[didactyl] kind 10123 accepted with %d 'a' tags", a_count);
|
||||
}
|
||||
}
|
||||
|
||||
static int hex_to_pubkey(const char* hex, unsigned char out_pubkey[32]) {
|
||||
@@ -2512,7 +2562,7 @@ int nostr_handler_init(didactyl_config_t* config) {
|
||||
nostr_pool_reconnect_config_t reconnect = *nostr_pool_reconnect_config_default();
|
||||
reconnect.enable_auto_reconnect = 1;
|
||||
reconnect.ping_interval_seconds = 20;
|
||||
reconnect.pong_timeout_seconds = 10;
|
||||
reconnect.pong_timeout_seconds = 30;
|
||||
|
||||
g_pool = nostr_relay_pool_create(&reconnect);
|
||||
if (!g_pool) {
|
||||
@@ -2773,6 +2823,10 @@ int nostr_handler_subscribe_self_skills(void) {
|
||||
cJSON_AddItemToObject(filter, "authors", authors);
|
||||
cJSON_AddNumberToObject(filter, "limit", 300);
|
||||
|
||||
char* filter_str = cJSON_PrintUnformatted(filter);
|
||||
DEBUG_INFO("[didactyl] self-skill subscription filter: %s", filter_str ? filter_str : "(null)");
|
||||
free(filter_str);
|
||||
|
||||
pthread_mutex_lock(&g_subscription_mutex);
|
||||
managed_subscriptions_init_defaults();
|
||||
if (managed_subscription_register_locked(MANAGED_SUB_SELF_SKILLS,
|
||||
@@ -2848,6 +2902,9 @@ int nostr_handler_subscribe_dms(dm_callback_t callback, void* user_data) {
|
||||
const int need_kind4 = (g_cfg->dm_protocol == DM_PROTOCOL_NIP04 || g_cfg->dm_protocol == DM_PROTOCOL_BOTH) ? 1 : 0;
|
||||
const int need_kind1059 = (g_cfg->dm_protocol == DM_PROTOCOL_NIP17 || g_cfg->dm_protocol == DM_PROTOCOL_BOTH) ? 1 : 0;
|
||||
|
||||
DEBUG_INFO("[didactyl] DM subscribe: dm_protocol=%d need_kind4=%d need_kind1059=%d g_start_time=%ld",
|
||||
(int)g_cfg->dm_protocol, need_kind4, need_kind1059, (long)g_start_time);
|
||||
|
||||
if (!need_kind4 && !need_kind1059) {
|
||||
DEBUG_WARN("[didactyl] DM subscription skipped: no protocol selected");
|
||||
return -1;
|
||||
@@ -2898,7 +2955,6 @@ int nostr_handler_subscribe_dms(dm_callback_t callback, void* user_data) {
|
||||
cJSON_AddItemToObject(filter1059, "kinds", kinds1059);
|
||||
cJSON_AddItemToArray(p_values1059, cJSON_CreateString(g_cfg->keys.public_key_hex));
|
||||
cJSON_AddItemToObject(filter1059, "#p", p_values1059);
|
||||
cJSON_AddNumberToObject(filter1059, "since", (double)g_start_time);
|
||||
cJSON_AddNumberToObject(filter1059, "limit", 400);
|
||||
}
|
||||
|
||||
@@ -3692,6 +3748,180 @@ char* nostr_handler_get_self_skill_events_json(void) {
|
||||
return json ? json : strdup("[]");
|
||||
}
|
||||
|
||||
int nostr_handler_refresh_self_skill_cache_from_relays(int timeout_ms) {
|
||||
if (!g_cfg || !g_pool) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int effective_timeout_ms = timeout_ms > 0 ? timeout_ms : 5000;
|
||||
|
||||
cJSON* filter = cJSON_CreateObject();
|
||||
cJSON* kinds = cJSON_CreateArray();
|
||||
cJSON* authors = cJSON_CreateArray();
|
||||
if (!filter || !kinds || !authors) {
|
||||
cJSON_Delete(filter);
|
||||
cJSON_Delete(kinds);
|
||||
cJSON_Delete(authors);
|
||||
return -1;
|
||||
}
|
||||
|
||||
cJSON_AddItemToArray(kinds, cJSON_CreateNumber(31123));
|
||||
cJSON_AddItemToArray(kinds, cJSON_CreateNumber(31124));
|
||||
cJSON_AddItemToArray(kinds, cJSON_CreateNumber(10123));
|
||||
cJSON_AddItemToObject(filter, "kinds", kinds);
|
||||
|
||||
cJSON_AddItemToArray(authors, cJSON_CreateString(g_cfg->keys.public_key_hex));
|
||||
cJSON_AddItemToObject(filter, "authors", authors);
|
||||
cJSON_AddNumberToObject(filter, "limit", 500);
|
||||
|
||||
char* events_json = nostr_handler_query_json(filter, effective_timeout_ms);
|
||||
cJSON_Delete(filter);
|
||||
if (!events_json) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
cJSON* events = cJSON_Parse(events_json);
|
||||
free(events_json);
|
||||
if (!events || !cJSON_IsArray(events)) {
|
||||
cJSON_Delete(events);
|
||||
return -1;
|
||||
}
|
||||
|
||||
cJSON* adopted_authors = cJSON_CreateObject();
|
||||
if (adopted_authors) {
|
||||
cJSON* latest_self_adoption = NULL;
|
||||
double latest_self_adoption_created = -1.0;
|
||||
int n0 = cJSON_GetArraySize(events);
|
||||
for (int i = 0; i < n0; i++) {
|
||||
cJSON* ev = cJSON_GetArrayItem(events, i);
|
||||
if (!ev || !cJSON_IsObject(ev)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
cJSON* kind = cJSON_GetObjectItemCaseSensitive(ev, "kind");
|
||||
cJSON* pubkey = cJSON_GetObjectItemCaseSensitive(ev, "pubkey");
|
||||
if (!kind || !cJSON_IsNumber(kind) || (int)kind->valuedouble != 10123 ||
|
||||
!pubkey || !cJSON_IsString(pubkey) || !pubkey->valuestring ||
|
||||
strcmp(pubkey->valuestring, g_cfg->keys.public_key_hex) != 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
cJSON* created_at = cJSON_GetObjectItemCaseSensitive(ev, "created_at");
|
||||
double created = (created_at && cJSON_IsNumber(created_at)) ? created_at->valuedouble : 0.0;
|
||||
if (!latest_self_adoption || created > latest_self_adoption_created) {
|
||||
latest_self_adoption = ev;
|
||||
latest_self_adoption_created = created;
|
||||
}
|
||||
}
|
||||
|
||||
if (latest_self_adoption) {
|
||||
cJSON* tags = cJSON_GetObjectItemCaseSensitive(latest_self_adoption, "tags");
|
||||
if (tags && cJSON_IsArray(tags)) {
|
||||
int tn = cJSON_GetArraySize(tags);
|
||||
for (int ti = 0; ti < tn; ti++) {
|
||||
cJSON* tag = cJSON_GetArrayItem(tags, ti);
|
||||
if (!tag || !cJSON_IsArray(tag) || cJSON_GetArraySize(tag) < 2) {
|
||||
continue;
|
||||
}
|
||||
cJSON* k = cJSON_GetArrayItem(tag, 0);
|
||||
cJSON* v = cJSON_GetArrayItem(tag, 1);
|
||||
if (!k || !v || !cJSON_IsString(k) || !k->valuestring ||
|
||||
!cJSON_IsString(v) || !v->valuestring || strcmp(k->valuestring, "a") != 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
int adopted_kind = 0;
|
||||
char adopted_pubkey[65] = {0};
|
||||
char adopted_d_tag[65] = {0};
|
||||
if (parse_skill_address_local(v->valuestring, &adopted_kind, adopted_pubkey, adopted_d_tag) != 0) {
|
||||
continue;
|
||||
}
|
||||
if (adopted_pubkey[0] == '\0') {
|
||||
continue;
|
||||
}
|
||||
if (!cJSON_GetObjectItemCaseSensitive(adopted_authors, adopted_pubkey)) {
|
||||
cJSON_AddBoolToObject(adopted_authors, adopted_pubkey, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int adopted_author_count = 0;
|
||||
cJSON* adopted_it = NULL;
|
||||
cJSON_ArrayForEach(adopted_it, adopted_authors) {
|
||||
adopted_author_count++;
|
||||
}
|
||||
|
||||
if (adopted_author_count > 0) {
|
||||
cJSON* adopted_filter = cJSON_CreateObject();
|
||||
cJSON* adopted_kinds = cJSON_CreateArray();
|
||||
cJSON* adopted_author_arr = cJSON_CreateArray();
|
||||
if (adopted_filter && adopted_kinds && adopted_author_arr) {
|
||||
cJSON_AddItemToArray(adopted_kinds, cJSON_CreateNumber(31123));
|
||||
cJSON_AddItemToArray(adopted_kinds, cJSON_CreateNumber(31124));
|
||||
cJSON_AddItemToObject(adopted_filter, "kinds", adopted_kinds);
|
||||
|
||||
cJSON_ArrayForEach(adopted_it, adopted_authors) {
|
||||
if (adopted_it->string && adopted_it->string[0] != '\0') {
|
||||
cJSON_AddItemToArray(adopted_author_arr, cJSON_CreateString(adopted_it->string));
|
||||
}
|
||||
}
|
||||
cJSON_AddItemToObject(adopted_filter, "authors", adopted_author_arr);
|
||||
cJSON_AddNumberToObject(adopted_filter, "limit", 1000);
|
||||
|
||||
char* adopted_json = nostr_handler_query_json(adopted_filter, effective_timeout_ms);
|
||||
if (adopted_json) {
|
||||
cJSON* adopted_events = cJSON_Parse(adopted_json);
|
||||
free(adopted_json);
|
||||
if (adopted_events && cJSON_IsArray(adopted_events)) {
|
||||
int an = cJSON_GetArraySize(adopted_events);
|
||||
for (int ai = 0; ai < an; ai++) {
|
||||
cJSON* ev = cJSON_GetArrayItem(adopted_events, ai);
|
||||
cJSON* dup = ev ? cJSON_Duplicate(ev, 1) : NULL;
|
||||
if (dup) {
|
||||
cJSON_AddItemToArray(events, dup);
|
||||
}
|
||||
}
|
||||
}
|
||||
cJSON_Delete(adopted_events);
|
||||
}
|
||||
} else {
|
||||
cJSON_Delete(adopted_filter);
|
||||
cJSON_Delete(adopted_kinds);
|
||||
cJSON_Delete(adopted_author_arr);
|
||||
}
|
||||
cJSON_Delete(adopted_filter);
|
||||
}
|
||||
}
|
||||
cJSON_Delete(adopted_authors);
|
||||
|
||||
int merged = 0;
|
||||
pthread_mutex_lock(&g_self_skill_mutex);
|
||||
int n = cJSON_GetArraySize(events);
|
||||
for (int i = 0; i < n; i++) {
|
||||
cJSON* ev = cJSON_GetArrayItem(events, i);
|
||||
if (!ev || !cJSON_IsObject(ev)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
cJSON* kind = cJSON_GetObjectItemCaseSensitive(ev, "kind");
|
||||
int kind_val = (kind && cJSON_IsNumber(kind)) ? (int)kind->valuedouble : -1;
|
||||
if (kind_val == 31124) {
|
||||
(void)normalize_private_skill_event_local(ev);
|
||||
}
|
||||
|
||||
self_skill_cache_upsert_event_locked(ev);
|
||||
merged++;
|
||||
}
|
||||
pthread_mutex_unlock(&g_self_skill_mutex);
|
||||
|
||||
cJSON_Delete(events);
|
||||
|
||||
agent_invalidate_adopted_skills_cache();
|
||||
DEBUG_INFO("[didactyl] skill_refresh relay reload merged %d self-skill/adoption events", merged);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int nostr_handler_is_event_in_self_cache(const char* event_id_hex) {
|
||||
if (!event_id_hex || strlen(event_id_hex) != 64U) {
|
||||
return 0;
|
||||
@@ -3738,6 +3968,50 @@ int nostr_handler_connected_relay_count(void) {
|
||||
return connected;
|
||||
}
|
||||
|
||||
char* nostr_handler_relay_state_summary(void) {
|
||||
if (!g_cfg || !g_pool || g_cfg->relay_count <= 0 || !g_cfg->relays) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
size_t total = 1;
|
||||
for (int i = 0; i < g_cfg->relay_count; i++) {
|
||||
const char* relay = (g_cfg->relays[i] && g_cfg->relays[i][0] != '\0') ? g_cfg->relays[i] : "<unknown>";
|
||||
const char* status = relay_status_str(nostr_relay_pool_get_relay_status(g_pool, relay));
|
||||
total += strlen(relay) + 1 + strlen(status) + 2;
|
||||
}
|
||||
|
||||
char* out = (char*)malloc(total);
|
||||
if (!out) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
out[0] = '\0';
|
||||
size_t used = 0;
|
||||
for (int i = 0; i < g_cfg->relay_count; i++) {
|
||||
const char* relay = (g_cfg->relays[i] && g_cfg->relays[i][0] != '\0') ? g_cfg->relays[i] : "<unknown>";
|
||||
const char* status = relay_status_str(nostr_relay_pool_get_relay_status(g_pool, relay));
|
||||
int n = snprintf(out + used,
|
||||
total - used,
|
||||
"%s%s=%s",
|
||||
(i == 0) ? "" : "; ",
|
||||
relay,
|
||||
status);
|
||||
if (n < 0) {
|
||||
free(out);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
size_t written = (size_t)n;
|
||||
if (written >= (total - used)) {
|
||||
used = total - 1;
|
||||
break;
|
||||
}
|
||||
used += written;
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
char* nostr_handler_relay_status_json(void) {
|
||||
if (!g_pool) {
|
||||
return NULL;
|
||||
|
||||
@@ -77,9 +77,11 @@ int nostr_handler_validate_self_skill_cache(int* out_skill_count, int* out_adopt
|
||||
void nostr_handler_refresh_relay_statuses(void);
|
||||
int nostr_handler_sync_relays_from_config(void);
|
||||
char* nostr_handler_get_self_skill_events_json(void);
|
||||
int nostr_handler_refresh_self_skill_cache_from_relays(int timeout_ms);
|
||||
int nostr_handler_is_event_in_self_cache(const char* event_id_hex);
|
||||
const char* nostr_handler_get_startup_display_name(void);
|
||||
int nostr_handler_connected_relay_count(void);
|
||||
char* nostr_handler_relay_state_summary(void);
|
||||
char* nostr_handler_get_admin_kind0_context(void);
|
||||
char* nostr_handler_get_admin_kind3_context(void);
|
||||
char* nostr_handler_get_admin_kind10002_context(void);
|
||||
|
||||
@@ -276,6 +276,7 @@ static void config_set_defaults(didactyl_config_t* cfg) {
|
||||
cfg->tools.api_default_max_turns = 8;
|
||||
cfg->tools.api_max_turns_ceiling = 32;
|
||||
cfg->tools.stall_repeat_threshold = 3;
|
||||
cfg->tools.max_context_bytes = 128 * 1024;
|
||||
cfg->tools.local_http_fetch_default_timeout_seconds = 20;
|
||||
cfg->tools.local_http_fetch_max_timeout_seconds = 120;
|
||||
cfg->tools.blossom_max_upload_bytes = 16 * 1024 * 1024;
|
||||
@@ -1019,7 +1020,7 @@ static int apply_recalled_user_settings_wizard(didactyl_config_t* cfg, const cha
|
||||
|
||||
cJSON* global_llm = cJSON_GetObjectItemCaseSensitive(root, "global_llm");
|
||||
cJSON* didactyl = cJSON_GetObjectItemCaseSensitive(root, "didactyl");
|
||||
if (!global_llm || !cJSON_IsObject(global_llm) || !didactyl || !cJSON_IsObject(didactyl)) {
|
||||
if (!global_llm || !cJSON_IsObject(global_llm)) {
|
||||
cJSON_Delete(root);
|
||||
return -1;
|
||||
}
|
||||
@@ -1031,15 +1032,18 @@ static int apply_recalled_user_settings_wizard(didactyl_config_t* cfg, const cha
|
||||
cJSON* max_tokens = cJSON_GetObjectItemCaseSensitive(global_llm, "max_tokens");
|
||||
cJSON* temperature = cJSON_GetObjectItemCaseSensitive(global_llm, "temperature");
|
||||
|
||||
cJSON* admin_pubkey = cJSON_GetObjectItemCaseSensitive(didactyl, "admin_pubkey");
|
||||
cJSON* dm_protocol = cJSON_GetObjectItemCaseSensitive(didactyl, "dm_protocol");
|
||||
cJSON* max_turns = cJSON_GetObjectItemCaseSensitive(didactyl, "max_turns");
|
||||
cJSON* admin_pubkey = NULL;
|
||||
cJSON* dm_protocol = NULL;
|
||||
cJSON* max_turns = NULL;
|
||||
if (didactyl && cJSON_IsObject(didactyl)) {
|
||||
admin_pubkey = cJSON_GetObjectItemCaseSensitive(didactyl, "admin_pubkey");
|
||||
dm_protocol = cJSON_GetObjectItemCaseSensitive(didactyl, "dm_protocol");
|
||||
max_turns = cJSON_GetObjectItemCaseSensitive(didactyl, "max_turns");
|
||||
}
|
||||
|
||||
if (!api_key || !cJSON_IsString(api_key) || !api_key->valuestring || api_key->valuestring[0] == '\0' ||
|
||||
!model || !cJSON_IsString(model) || !model->valuestring || model->valuestring[0] == '\0' ||
|
||||
!base_url || !cJSON_IsString(base_url) || !base_url->valuestring || base_url->valuestring[0] == '\0' ||
|
||||
!admin_pubkey || !cJSON_IsString(admin_pubkey) || !admin_pubkey->valuestring || admin_pubkey->valuestring[0] == '\0' ||
|
||||
!dm_protocol || !cJSON_IsString(dm_protocol) || !dm_protocol->valuestring || dm_protocol->valuestring[0] == '\0') {
|
||||
!base_url || !cJSON_IsString(base_url) || !base_url->valuestring || base_url->valuestring[0] == '\0') {
|
||||
cJSON_Delete(root);
|
||||
return -1;
|
||||
}
|
||||
@@ -1060,7 +1064,7 @@ static int apply_recalled_user_settings_wizard(didactyl_config_t* cfg, const cha
|
||||
cfg->llm.temperature = temperature->valuedouble;
|
||||
}
|
||||
|
||||
{
|
||||
if (admin_pubkey && cJSON_IsString(admin_pubkey) && admin_pubkey->valuestring && admin_pubkey->valuestring[0] != '\0') {
|
||||
char decoded[65] = {0};
|
||||
if (decode_pubkey_hex_or_npub_local(admin_pubkey->valuestring, decoded) != 0) {
|
||||
cJSON_Delete(root);
|
||||
@@ -1069,12 +1073,14 @@ static int apply_recalled_user_settings_wizard(didactyl_config_t* cfg, const cha
|
||||
snprintf(cfg->admin.pubkey, sizeof(cfg->admin.pubkey), "%s", decoded);
|
||||
}
|
||||
|
||||
if (strcmp(dm_protocol->valuestring, "nip17") == 0) {
|
||||
cfg->dm_protocol = DM_PROTOCOL_NIP17;
|
||||
} else if (strcmp(dm_protocol->valuestring, "both") == 0) {
|
||||
cfg->dm_protocol = DM_PROTOCOL_BOTH;
|
||||
} else {
|
||||
cfg->dm_protocol = DM_PROTOCOL_NIP04;
|
||||
if (dm_protocol && cJSON_IsString(dm_protocol) && dm_protocol->valuestring && dm_protocol->valuestring[0] != '\0') {
|
||||
if (strcmp(dm_protocol->valuestring, "nip17") == 0) {
|
||||
cfg->dm_protocol = DM_PROTOCOL_NIP17;
|
||||
} else if (strcmp(dm_protocol->valuestring, "both") == 0) {
|
||||
cfg->dm_protocol = DM_PROTOCOL_BOTH;
|
||||
} else {
|
||||
cfg->dm_protocol = DM_PROTOCOL_NIP04;
|
||||
}
|
||||
}
|
||||
|
||||
if (max_turns && cJSON_IsNumber(max_turns)) {
|
||||
@@ -2009,7 +2015,9 @@ static int install_system_service_with_dedicated_user(const didactyl_config_t* c
|
||||
"After=network-online.target\n"
|
||||
"Wants=network-online.target\n\n"
|
||||
"[Service]\n"
|
||||
"Type=simple\n"
|
||||
"Type=notify\n"
|
||||
"NotifyAccess=main\n"
|
||||
"WatchdogSec=120\n"
|
||||
"User=%s\n"
|
||||
"Group=%s\n"
|
||||
"WorkingDirectory=%s\n"
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#include "tools_internal.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -131,6 +133,52 @@ static cJSON* parse_args_local(const char* args_json) {
|
||||
return args;
|
||||
}
|
||||
|
||||
static int append_textf_skill_list_local(char** out, size_t* cap, size_t* used, const char* fmt, ...) {
|
||||
if (!out || !cap || !used || !fmt) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
va_list ap2;
|
||||
va_copy(ap2, ap);
|
||||
int needed = vsnprintf(NULL, 0, fmt, ap);
|
||||
va_end(ap);
|
||||
if (needed < 0) {
|
||||
va_end(ap2);
|
||||
return -1;
|
||||
}
|
||||
|
||||
size_t need = (size_t)needed;
|
||||
if (*used + need + 1U > *cap) {
|
||||
size_t new_cap = (*cap > 0U) ? *cap : 256U;
|
||||
while (*used + need + 1U > new_cap) {
|
||||
if (new_cap > (SIZE_MAX / 2U)) {
|
||||
va_end(ap2);
|
||||
return -1;
|
||||
}
|
||||
new_cap *= 2U;
|
||||
}
|
||||
|
||||
char* grown = (char*)realloc(*out, new_cap);
|
||||
if (!grown) {
|
||||
va_end(ap2);
|
||||
return -1;
|
||||
}
|
||||
*out = grown;
|
||||
*cap = new_cap;
|
||||
}
|
||||
|
||||
int wrote = vsnprintf((*out) + (*used), *cap - *used, fmt, ap2);
|
||||
va_end(ap2);
|
||||
if (wrote < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
*used += (size_t)wrote;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int is_hex_string_len_local(const char* s, size_t expected_len) {
|
||||
if (!s || strlen(s) != expected_len) return 0;
|
||||
for (size_t i = 0; i < expected_len; i++) {
|
||||
@@ -333,9 +381,31 @@ static int fetch_adoption_list_tags_local(tools_context_t* ctx, cJSON** out_tags
|
||||
free(events_json);
|
||||
|
||||
if (events && cJSON_IsArray(events) && cJSON_GetArraySize(events) > 0) {
|
||||
cJSON* ev0 = cJSON_GetArrayItem(events, 0);
|
||||
if (ev0 && cJSON_IsObject(ev0)) {
|
||||
cJSON* ev_content = cJSON_GetObjectItemCaseSensitive(ev0, "content");
|
||||
cJSON* best = NULL;
|
||||
double best_created = -1.0;
|
||||
int n = cJSON_GetArraySize(events);
|
||||
for (int i = 0; i < n; i++) {
|
||||
cJSON* ev = cJSON_GetArrayItem(events, i);
|
||||
if (!ev || !cJSON_IsObject(ev)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
cJSON* ev_pubkey = cJSON_GetObjectItemCaseSensitive(ev, "pubkey");
|
||||
if (!ev_pubkey || !cJSON_IsString(ev_pubkey) || !ev_pubkey->valuestring ||
|
||||
strcmp(ev_pubkey->valuestring, ctx->cfg->keys.public_key_hex) != 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
cJSON* created_at = cJSON_GetObjectItemCaseSensitive(ev, "created_at");
|
||||
double created = (created_at && cJSON_IsNumber(created_at)) ? created_at->valuedouble : 0.0;
|
||||
if (!best || created > best_created) {
|
||||
best = ev;
|
||||
best_created = created;
|
||||
}
|
||||
}
|
||||
|
||||
if (best && cJSON_IsObject(best)) {
|
||||
cJSON* ev_content = cJSON_GetObjectItemCaseSensitive(best, "content");
|
||||
if (ev_content && cJSON_IsString(ev_content) && ev_content->valuestring) {
|
||||
free(content);
|
||||
content = strdup(ev_content->valuestring);
|
||||
@@ -346,7 +416,7 @@ static int fetch_adoption_list_tags_local(tools_context_t* ctx, cJSON** out_tags
|
||||
}
|
||||
}
|
||||
|
||||
cJSON* ev_tags = cJSON_GetObjectItemCaseSensitive(ev0, "tags");
|
||||
cJSON* ev_tags = cJSON_GetObjectItemCaseSensitive(best, "tags");
|
||||
if (ev_tags && cJSON_IsArray(ev_tags)) {
|
||||
cJSON* dup = cJSON_Duplicate(ev_tags, 1);
|
||||
if (!dup) {
|
||||
@@ -606,6 +676,21 @@ static int maybe_append_loaded_skill_instructions_local(cJSON* messages,
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int is_tool_blocked_in_skill_run_local(const char* tool_name) {
|
||||
if (!tool_name || tool_name[0] == '\0') return 1;
|
||||
|
||||
static const char* blocked_tools[] = {
|
||||
"model_get", "model_set", "model_list",
|
||||
NULL
|
||||
};
|
||||
|
||||
for (int i = 0; blocked_tools[i] != NULL; i++) {
|
||||
if (strcmp(tool_name, blocked_tools[i]) == 0) return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int is_tool_sandbox_safe_local(const char* tool_name) {
|
||||
if (!tool_name || tool_name[0] == '\0') return 0;
|
||||
|
||||
@@ -1155,11 +1240,9 @@ char* execute_skill_list(tools_context_t* ctx, const char* args_json) {
|
||||
}
|
||||
|
||||
cJSON* out = cJSON_CreateObject();
|
||||
cJSON* summary_rows = cJSON_CreateArray();
|
||||
cJSON* skills = cJSON_CreateArray();
|
||||
if (!out || !summary_rows || !skills) {
|
||||
if (!out || !skills) {
|
||||
cJSON_Delete(out);
|
||||
cJSON_Delete(summary_rows);
|
||||
cJSON_Delete(skills);
|
||||
cJSON_Delete(events);
|
||||
cJSON_Delete(adoption_tags);
|
||||
@@ -1167,7 +1250,21 @@ char* execute_skill_list(tools_context_t* ctx, const char* args_json) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
size_t rendered_cap = 512U;
|
||||
size_t rendered_used = 0U;
|
||||
char* rendered_lines = (char*)malloc(rendered_cap);
|
||||
if (!rendered_lines) {
|
||||
cJSON_Delete(out);
|
||||
cJSON_Delete(skills);
|
||||
cJSON_Delete(events);
|
||||
cJSON_Delete(adoption_tags);
|
||||
free(adoption_content);
|
||||
return NULL;
|
||||
}
|
||||
rendered_lines[0] = '\0';
|
||||
|
||||
int adopted_count = 0;
|
||||
int skill_count = 0;
|
||||
int event_count = cJSON_GetArraySize(events);
|
||||
for (int i = 0; i < event_count; i++) {
|
||||
cJSON* ev = cJSON_GetArrayItem(events, i);
|
||||
@@ -1199,59 +1296,91 @@ char* execute_skill_list(tools_context_t* ctx, const char* args_json) {
|
||||
if (adopted_filter >= 0 && is_adopted != adopted_filter) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const char* owner = skill_owner_label_local(ctx->cfg, pubkey->valuestring);
|
||||
cJSON* scope_tag = find_tag_value_string_local(tags, "scope");
|
||||
cJSON* desc_tag = find_tag_value_string_local(tags, "description");
|
||||
const char* scope_out = (scope_tag && cJSON_IsString(scope_tag) && scope_tag->valuestring)
|
||||
? scope_tag->valuestring
|
||||
: ((kind_val == 31124) ? "private" : "public");
|
||||
const char* desc_out = (desc_tag && cJSON_IsString(desc_tag) && desc_tag->valuestring)
|
||||
? desc_tag->valuestring
|
||||
: "";
|
||||
|
||||
cJSON* row = cJSON_CreateObject();
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
cJSON_AddStringToObject(row, "d_tag", d->valuestring);
|
||||
cJSON_AddStringToObject(row, "owner", owner);
|
||||
cJSON_AddStringToObject(row, "scope", scope_out);
|
||||
cJSON_AddNumberToObject(row, "kind", kind_val);
|
||||
cJSON_AddBoolToObject(row, "adopted", is_adopted ? 1 : 0);
|
||||
if (desc_out[0] != '\0') {
|
||||
cJSON_AddStringToObject(row, "description", desc_out);
|
||||
}
|
||||
cJSON_AddItemToArray(skills, row);
|
||||
|
||||
if (is_adopted) {
|
||||
adopted_count++;
|
||||
}
|
||||
skill_count++;
|
||||
|
||||
const char* owner = skill_owner_label_local(ctx->cfg, pubkey->valuestring);
|
||||
|
||||
cJSON* detail = extract_skill_summary_local(ev);
|
||||
if (detail) {
|
||||
cJSON_AddStringToObject(detail, "owner", owner);
|
||||
cJSON_AddBoolToObject(detail, "adopted", is_adopted ? 1 : 0);
|
||||
cJSON_AddItemToArray(skills, detail);
|
||||
}
|
||||
|
||||
cJSON* row = cJSON_CreateObject();
|
||||
if (row) {
|
||||
cJSON_AddStringToObject(row, "d_tag", d->valuestring);
|
||||
cJSON_AddStringToObject(row, "owner", owner);
|
||||
cJSON_AddBoolToObject(row, "adopted", is_adopted ? 1 : 0);
|
||||
cJSON_AddItemToArray(summary_rows, row);
|
||||
if (append_textf_skill_list_local(&rendered_lines,
|
||||
&rendered_cap,
|
||||
&rendered_used,
|
||||
"- %s | owner=%s | scope=%s | adopted=%s%s%s\n",
|
||||
d->valuestring,
|
||||
owner,
|
||||
scope_out,
|
||||
is_adopted ? "yes" : "no",
|
||||
desc_out[0] ? " | description=" : "",
|
||||
desc_out) != 0) {
|
||||
free(rendered_lines);
|
||||
cJSON_Delete(out);
|
||||
cJSON_Delete(skills);
|
||||
cJSON_Delete(events);
|
||||
cJSON_Delete(adoption_tags);
|
||||
free(adoption_content);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON* skills_pretty = cJSON_CreateArray();
|
||||
if (!skills_pretty) {
|
||||
if (skill_count == 0) {
|
||||
if (append_textf_skill_list_local(&rendered_lines, &rendered_cap, &rendered_used, "- (none)\n") != 0) {
|
||||
free(rendered_lines);
|
||||
cJSON_Delete(out);
|
||||
cJSON_Delete(skills);
|
||||
cJSON_Delete(events);
|
||||
cJSON_Delete(adoption_tags);
|
||||
free(adoption_content);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
char header[128];
|
||||
snprintf(header, sizeof(header), "Skills: %d total (%d adopted)\n", skill_count, adopted_count);
|
||||
size_t header_len = strlen(header);
|
||||
char* rendered = (char*)malloc(header_len + rendered_used + 1U);
|
||||
if (!rendered) {
|
||||
free(rendered_lines);
|
||||
cJSON_Delete(out);
|
||||
cJSON_Delete(skills);
|
||||
cJSON_Delete(events);
|
||||
cJSON_Delete(adoption_tags);
|
||||
free(adoption_content);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int skill_count = cJSON_GetArraySize(skills);
|
||||
for (int i = 0; i < skill_count; i++) {
|
||||
cJSON* skill_item = cJSON_GetArrayItem(skills, i);
|
||||
if (!skill_item) continue;
|
||||
char* skill_json = cJSON_PrintUnformatted(skill_item);
|
||||
if (!skill_json) continue;
|
||||
|
||||
cJSON* block = cJSON_CreateString(skill_json);
|
||||
free(skill_json);
|
||||
if (block) {
|
||||
cJSON_AddItemToArray(skills_pretty, block);
|
||||
}
|
||||
}
|
||||
memcpy(rendered, header, header_len);
|
||||
memcpy(rendered + header_len, rendered_lines, rendered_used + 1U);
|
||||
free(rendered_lines);
|
||||
|
||||
cJSON_AddBoolToObject(out, "success", 1);
|
||||
cJSON_AddBoolToObject(out, "fallback_used", 0);
|
||||
cJSON_AddStringToObject(out, "skills_separator", "\n\n\n");
|
||||
cJSON_AddItemToObject(out, "summary", summary_rows);
|
||||
cJSON_AddItemToObject(out, "skills", skills);
|
||||
cJSON_AddItemToObject(out, "skills_pretty", skills_pretty);
|
||||
cJSON_AddNumberToObject(out, "count", cJSON_GetArraySize(skills));
|
||||
cJSON_AddNumberToObject(out, "count", skill_count);
|
||||
cJSON_AddNumberToObject(out, "adopted_count", adopted_count);
|
||||
cJSON_AddItemToObject(out, "skills", skills);
|
||||
cJSON_AddStringToObject(out, "rendered", rendered);
|
||||
free(rendered);
|
||||
|
||||
char* json = cJSON_PrintUnformatted(out);
|
||||
cJSON_Delete(out);
|
||||
@@ -2283,7 +2412,9 @@ char* execute_skill_run(tools_context_t* ctx, const char* args_json) {
|
||||
llm_tool_call_t* tc = &resp.tool_calls[i];
|
||||
char* tool_result = NULL;
|
||||
|
||||
if (sandbox_enabled && !is_tool_sandbox_safe_local(tc->name)) {
|
||||
if (is_tool_blocked_in_skill_run_local(tc->name)) {
|
||||
tool_result = strdup("{\"success\":false,\"error\":\"tool blocked by skill_run policy\"}");
|
||||
} else if (sandbox_enabled && !is_tool_sandbox_safe_local(tc->name)) {
|
||||
tool_result = strdup("{\"success\":false,\"error\":\"tool blocked by skill_run sandbox\"}");
|
||||
} else {
|
||||
tool_result = tools_execute(ctx, tc->name, tc->arguments_json);
|
||||
@@ -2441,12 +2572,17 @@ char* execute_skill_refresh(tools_context_t* ctx, const char* args_json) {
|
||||
(void)args_json;
|
||||
if (!ctx || !ctx->cfg) return json_error_local("tool context unavailable");
|
||||
|
||||
int rc = nostr_handler_refresh_self_skill_cache_from_relays(5000);
|
||||
if (rc != 0) {
|
||||
return json_error_local("skill_refresh failed to reload self-skill cache from relays");
|
||||
}
|
||||
|
||||
agent_invalidate_adopted_skills_cache();
|
||||
|
||||
cJSON* out = cJSON_CreateObject();
|
||||
if (!out) return NULL;
|
||||
cJSON_AddBoolToObject(out, "success", 1);
|
||||
cJSON_AddStringToObject(out, "message", "adopted skills cache invalidated; next context build will reload skills");
|
||||
cJSON_AddStringToObject(out, "message", "self-skill cache refreshed from relays; adopted skills cache invalidated; next context build will use latest relay data");
|
||||
char* json = cJSON_PrintUnformatted(out);
|
||||
cJSON_Delete(out);
|
||||
return json;
|
||||
|
||||
@@ -589,6 +589,126 @@ static void parse_trigger_runtime_tags(cJSON* tags,
|
||||
}
|
||||
}
|
||||
|
||||
static int trigger_manager_reconcile_from_relays(trigger_manager_t* mgr) {
|
||||
if (!mgr || !mgr->cfg) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
cJSON* filter = cJSON_CreateObject();
|
||||
cJSON* kinds = cJSON_CreateArray();
|
||||
cJSON* authors = cJSON_CreateArray();
|
||||
if (!filter || !kinds || !authors) {
|
||||
cJSON_Delete(filter);
|
||||
cJSON_Delete(kinds);
|
||||
cJSON_Delete(authors);
|
||||
return -1;
|
||||
}
|
||||
|
||||
cJSON_AddItemToArray(kinds, cJSON_CreateNumber(31123));
|
||||
cJSON_AddItemToArray(kinds, cJSON_CreateNumber(31124));
|
||||
cJSON_AddItemToObject(filter, "kinds", kinds);
|
||||
cJSON_AddItemToArray(authors, cJSON_CreateString(mgr->cfg->keys.public_key_hex));
|
||||
cJSON_AddItemToObject(filter, "authors", authors);
|
||||
cJSON_AddNumberToObject(filter, "limit", 300);
|
||||
|
||||
char* events_json = nostr_handler_query_json(filter, 8000);
|
||||
cJSON_Delete(filter);
|
||||
if (!events_json) {
|
||||
DEBUG_WARN("[didactyl] trigger reconcile skipped: relay query returned no data");
|
||||
return -1;
|
||||
}
|
||||
|
||||
cJSON* events = cJSON_Parse(events_json);
|
||||
free(events_json);
|
||||
if (!events || !cJSON_IsArray(events)) {
|
||||
cJSON_Delete(events);
|
||||
DEBUG_WARN("[didactyl] trigger reconcile skipped: invalid JSON from relay query");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int considered = 0;
|
||||
int loaded = 0;
|
||||
|
||||
int event_count = cJSON_GetArraySize(events);
|
||||
for (int i = 0; i < event_count; i++) {
|
||||
cJSON* skill_event = cJSON_GetArrayItem(events, i);
|
||||
cJSON* content = skill_event ? cJSON_GetObjectItemCaseSensitive(skill_event, "content") : NULL;
|
||||
cJSON* tags = skill_event ? cJSON_GetObjectItemCaseSensitive(skill_event, "tags") : NULL;
|
||||
if (!content || !cJSON_IsString(content) || !content->valuestring || !tags || !cJSON_IsArray(tags)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
cJSON* d = find_tag_value_string(tags, "d");
|
||||
cJSON* trigger = find_tag_value_string(tags, "trigger");
|
||||
cJSON* filter_j = find_tag_value_string(tags, "filter");
|
||||
cJSON* action = find_tag_value_string(tags, "action");
|
||||
|
||||
const char* d_tag = (d && cJSON_IsString(d) && d->valuestring) ? d->valuestring : NULL;
|
||||
const char* trigger_s = (trigger && cJSON_IsString(trigger) && trigger->valuestring) ? trigger->valuestring : NULL;
|
||||
const char* filter_s = (filter_j && cJSON_IsString(filter_j) && filter_j->valuestring) ? filter_j->valuestring : NULL;
|
||||
const char* action_s = (action && cJSON_IsString(action) && action->valuestring) ? action->valuestring : "llm";
|
||||
|
||||
considered++;
|
||||
if (!d_tag || d_tag[0] == '\0') {
|
||||
continue;
|
||||
}
|
||||
|
||||
int trigger_supported = trigger_s &&
|
||||
(strcmp(trigger_s, "nostr-subscription") == 0 ||
|
||||
strcmp(trigger_s, "webhook") == 0 ||
|
||||
strcmp(trigger_s, "cron") == 0 ||
|
||||
strcmp(trigger_s, "chain") == 0 ||
|
||||
strcmp(trigger_s, "dm") == 0);
|
||||
if (!trigger_supported || !filter_s || filter_s[0] == '\0') {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strcmp(action_s, "template") == 0) {
|
||||
DEBUG_WARN("[didactyl] trigger action template is deprecated; forcing llm for d_tag=%s", d_tag);
|
||||
}
|
||||
|
||||
const char* llm_s = NULL;
|
||||
const char* tools_s = NULL;
|
||||
int has_max_tokens = 0;
|
||||
int max_tokens = 0;
|
||||
int has_temperature = 0;
|
||||
double temperature = 0.0;
|
||||
int has_seed = 0;
|
||||
int seed = 0;
|
||||
parse_trigger_runtime_tags(tags,
|
||||
&llm_s,
|
||||
&tools_s,
|
||||
&has_max_tokens,
|
||||
&max_tokens,
|
||||
&has_temperature,
|
||||
&temperature,
|
||||
&has_seed,
|
||||
&seed);
|
||||
|
||||
if (trigger_manager_add(mgr,
|
||||
d_tag,
|
||||
content->valuestring,
|
||||
filter_s,
|
||||
TRIGGER_ACTION_LLM,
|
||||
trigger_s,
|
||||
1,
|
||||
llm_s,
|
||||
tools_s,
|
||||
has_max_tokens,
|
||||
max_tokens,
|
||||
has_temperature,
|
||||
temperature,
|
||||
has_seed,
|
||||
seed) == 0) {
|
||||
loaded++;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON_Delete(events);
|
||||
DEBUG_INFO("[didactyl] trigger reconcile complete: loaded=%d considered=%d", loaded, considered);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void apply_trigger_runtime_to_llm_config(const active_trigger_t* t, llm_config_t* cfg) {
|
||||
if (!t || !cfg) return;
|
||||
|
||||
@@ -810,6 +930,7 @@ int trigger_manager_init(trigger_manager_t* mgr, didactyl_config_t* cfg) {
|
||||
}
|
||||
|
||||
mgr->last_poll_at = 0;
|
||||
mgr->last_reconcile_at = 0;
|
||||
|
||||
DEBUG_INFO("[didactyl] trigger manager initialized (capacity=%d)", mgr->capacity);
|
||||
return 0;
|
||||
@@ -1447,6 +1568,17 @@ int trigger_manager_poll(trigger_manager_t* mgr) {
|
||||
}
|
||||
pthread_mutex_unlock(&mgr->mutex);
|
||||
|
||||
/*
|
||||
* Temporarily disable periodic relay-backed trigger reconciliation.
|
||||
* Keep code path in place for quick re-enable after adoption/cache fix validation.
|
||||
*/
|
||||
int enable_periodic_reconcile = 0;
|
||||
if (enable_periodic_reconcile &&
|
||||
(mgr->last_reconcile_at <= 0 || (now - mgr->last_reconcile_at) >= 900)) {
|
||||
mgr->last_reconcile_at = now;
|
||||
(void)trigger_manager_reconcile_from_relays(mgr);
|
||||
}
|
||||
|
||||
return fired;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ typedef struct trigger_manager {
|
||||
didactyl_config_t* cfg;
|
||||
pthread_mutex_t mutex;
|
||||
time_t last_poll_at;
|
||||
time_t last_reconcile_at;
|
||||
} trigger_manager_t;
|
||||
|
||||
int trigger_manager_init(trigger_manager_t* mgr, didactyl_config_t* cfg);
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"admin": {
|
||||
"pubkey": "npub1REPLACE_WITH_TEST_ADMIN_PUBKEY"
|
||||
},
|
||||
"dm_protocol": "nip04",
|
||||
"llm": {
|
||||
"provider": "https://api.ppq.ai",
|
||||
"api_key": "sk-SBI2Pga0J6n8jpPorHbRHC",
|
||||
@@ -21,6 +20,13 @@
|
||||
"port": 8485,
|
||||
"bind_address": "127.0.0.1"
|
||||
},
|
||||
"encrypted_events": [
|
||||
{
|
||||
"kind": 30078,
|
||||
"d_tag": "user-settings",
|
||||
"content": "{\"v\":2,\"updatedAt\":0,\"global_llm\":{\"provider\":\"https://api.ppq.ai\",\"api_key\":\"sk-SBI2Pga0J6n8jpPorHbRHC\",\"model\":\"claude-haiku-4.5\",\"base_url\":\"https://api.ppq.ai\",\"max_tokens\":10000,\"temperature\":0.7},\"didactyl\":{\"admin_pubkey\":\"npub1REPLACE_WITH_TEST_ADMIN_PUBKEY\",\"dm_protocol\":\"both\",\"max_turns\":40}}"
|
||||
}
|
||||
],
|
||||
"startup_events": [
|
||||
{
|
||||
"kind": 0,
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
"admin": {
|
||||
"pubkey": "npub1REPLACE_WITH_TEST_ADMIN_PUBKEY"
|
||||
},
|
||||
"dm_protocol": "nip04",
|
||||
"llm": {
|
||||
"provider": "openai",
|
||||
"api_key": "sk-REPLACE_WITH_API_KEY",
|
||||
@@ -22,6 +21,13 @@
|
||||
"port": 8485,
|
||||
"bind_address": "127.0.0.1"
|
||||
},
|
||||
"encrypted_events": [
|
||||
{
|
||||
"kind": 30078,
|
||||
"d_tag": "user-settings",
|
||||
"content": "{\"v\":2,\"updatedAt\":0,\"global_llm\":{\"provider\":\"openai\",\"api_key\":\"sk-REPLACE_WITH_API_KEY\",\"model\":\"claude-haiku-4.5\",\"base_url\":\"https://api.anthropic.com/v1\",\"max_tokens\":512,\"temperature\":0.3},\"didactyl\":{\"admin_pubkey\":\"npub1REPLACE_WITH_TEST_ADMIN_PUBKEY\",\"dm_protocol\":\"both\",\"max_turns\":40}}"
|
||||
}
|
||||
],
|
||||
"startup_events": [
|
||||
{
|
||||
"kind": 0,
|
||||
|
||||
1
tests/results/20260428T111750Z/agent_debug.log
Normal file
1
tests/results/20260428T111750Z/agent_debug.log
Normal file
@@ -0,0 +1 @@
|
||||
[2026-04-28 07:18:22] [INFO ] [main.c:1103] Didactyl v0.2.48 starting
|
||||
59
tests/results/20260428T111750Z/runtime_test_genesis.jsonc
Normal file
59
tests/results/20260428T111750Z/runtime_test_genesis.jsonc
Normal file
@@ -0,0 +1,59 @@
|
||||
{
|
||||
// TEST CONFIGURATION
|
||||
// Use disposable keys/accounts only.
|
||||
"key": {
|
||||
"nsec": "d3011e59954403fb84729ab0e9fb239ba0f0238b3f353dfb5c08a32f4b3d21a1"
|
||||
},
|
||||
"admin": {
|
||||
"pubkey": "254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"
|
||||
},
|
||||
"llm": {
|
||||
"provider": "https://api.ppq.ai",
|
||||
"api_key": "sk-SBI2Pga0J6n8jpPorHbRHC",
|
||||
"model": "claude-haiku-4.5",
|
||||
"base_url": "https://api.ppq.ai",
|
||||
"max_tokens": 10000,
|
||||
"temperature": 0.7
|
||||
},
|
||||
"api": {
|
||||
"enabled": true,
|
||||
"port": 8485,
|
||||
"bind_address": "127.0.0.1"
|
||||
},
|
||||
"encrypted_events": [
|
||||
{
|
||||
"kind": 30078,
|
||||
"d_tag": "user-settings",
|
||||
"content": "{\"v\":2,\"updatedAt\":0,\"global_llm\":{\"provider\":\"https://api.ppq.ai\",\"api_key\":\"sk-SBI2Pga0J6n8jpPorHbRHC\",\"model\":\"claude-haiku-4.5\",\"base_url\":\"https://api.ppq.ai\",\"max_tokens\":10000,\"temperature\":0.7},\"didactyl\":{\"admin_pubkey\":\"npub1REPLACE_WITH_TEST_ADMIN_PUBKEY\",\"dm_protocol\":\"both\",\"max_turns\":40}}"
|
||||
}
|
||||
],
|
||||
"startup_events": [
|
||||
{
|
||||
"kind": 0,
|
||||
"content_fields": {
|
||||
"name": "Didactyl Test Agent",
|
||||
"about": "Automated test instance"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
{
|
||||
"kind": 10002,
|
||||
"content": "",
|
||||
"tags": [
|
||||
["r", "wss://relay.damus.io"],
|
||||
["r", "wss://relay.primal.net"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": 31124,
|
||||
"content": "# Test Agent\n\nYou are a test agent. Respond to requests and use tools when needed.",
|
||||
"tags": [
|
||||
["d", "identity_and_rules"],
|
||||
["app", "didactyl"],
|
||||
["scope", "private"],
|
||||
["trigger", "dm"],
|
||||
["filter", "{\"from\":\"admin\"}"]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
1
tests/results/20260428T111840Z/agent_debug.log
Normal file
1
tests/results/20260428T111840Z/agent_debug.log
Normal file
@@ -0,0 +1 @@
|
||||
[2026-04-28 07:18:40] [INFO ] [main.c:1103] Didactyl v0.2.48 starting
|
||||
59
tests/results/20260428T111840Z/runtime_test_genesis.jsonc
Normal file
59
tests/results/20260428T111840Z/runtime_test_genesis.jsonc
Normal file
@@ -0,0 +1,59 @@
|
||||
{
|
||||
// TEST CONFIGURATION
|
||||
// Use disposable keys/accounts only.
|
||||
"key": {
|
||||
"nsec": "d3011e59954403fb84729ab0e9fb239ba0f0238b3f353dfb5c08a32f4b3d21a1"
|
||||
},
|
||||
"admin": {
|
||||
"pubkey": "254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"
|
||||
},
|
||||
"llm": {
|
||||
"provider": "https://api.ppq.ai",
|
||||
"api_key": "sk-SBI2Pga0J6n8jpPorHbRHC",
|
||||
"model": "claude-haiku-4.5",
|
||||
"base_url": "https://api.ppq.ai",
|
||||
"max_tokens": 10000,
|
||||
"temperature": 0.7
|
||||
},
|
||||
"api": {
|
||||
"enabled": true,
|
||||
"port": 8485,
|
||||
"bind_address": "127.0.0.1"
|
||||
},
|
||||
"encrypted_events": [
|
||||
{
|
||||
"kind": 30078,
|
||||
"d_tag": "user-settings",
|
||||
"content": "{\"v\":2,\"updatedAt\":0,\"global_llm\":{\"provider\":\"https://api.ppq.ai\",\"api_key\":\"sk-SBI2Pga0J6n8jpPorHbRHC\",\"model\":\"claude-haiku-4.5\",\"base_url\":\"https://api.ppq.ai\",\"max_tokens\":10000,\"temperature\":0.7},\"didactyl\":{\"admin_pubkey\":\"npub1REPLACE_WITH_TEST_ADMIN_PUBKEY\",\"dm_protocol\":\"both\",\"max_turns\":40}}"
|
||||
}
|
||||
],
|
||||
"startup_events": [
|
||||
{
|
||||
"kind": 0,
|
||||
"content_fields": {
|
||||
"name": "Didactyl Test Agent",
|
||||
"about": "Automated test instance"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
{
|
||||
"kind": 10002,
|
||||
"content": "",
|
||||
"tags": [
|
||||
["r", "wss://relay.damus.io"],
|
||||
["r", "wss://relay.primal.net"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": 31124,
|
||||
"content": "# Test Agent\n\nYou are a test agent. Respond to requests and use tools when needed.",
|
||||
"tags": [
|
||||
["d", "identity_and_rules"],
|
||||
["app", "didactyl"],
|
||||
["scope", "private"],
|
||||
["trigger", "dm"],
|
||||
["filter", "{\"from\":\"admin\"}"]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
434
tests/results/20260428T111920Z/agent_debug.log
Normal file
434
tests/results/20260428T111920Z/agent_debug.log
Normal file
@@ -0,0 +1,434 @@
|
||||
[2026-04-28 07:27:53] [INFO ] [main.c:1103] Didactyl v0.2.48 starting
|
||||
[2026-04-28 07:27:53] [INFO ] [nostr_handler.c:2558] [didactyl] initializing relay pool with 2 relays
|
||||
[2026-04-28 07:27:53] [INFO ] [nostr_handler.c:2582] [didactyl] added relay: wss://relay.damus.io
|
||||
[2026-04-28 07:27:53] [INFO ] [nostr_handler.c:2582] [didactyl] added relay: wss://relay.primal.net
|
||||
[2026-04-28 07:27:53] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_1_1777375673", {
|
||||
"kinds": [10000],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 1
|
||||
}]
|
||||
[2026-04-28 07:27:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_1_1777375673", {
|
||||
"kinds": [10000],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 1
|
||||
}]
|
||||
[2026-04-28 07:27:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_1_1777375673"]
|
||||
[2026-04-28 07:27:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_1_1777375673"]
|
||||
[2026-04-28 07:27:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_1_1777375673"]
|
||||
[2026-04-28 07:27:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_1_1777375673"]
|
||||
[2026-04-28 07:27:54] [INFO ] [main.c:304] [didactyl] startup checklist [01] Relay connectivity: begin
|
||||
[2026-04-28 07:27:54] [INFO ] [main.c:311] [didactyl] startup checklist [01] Relay connectivity: ok (connected relays: 2/2)
|
||||
[2026-04-28 07:27:54] [INFO ] [main.c:304] [didactyl] startup checklist [02] Recover runtime config from Nostr: begin
|
||||
[2026-04-28 07:27:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_2_1777375674", {
|
||||
"kinds": [30078],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"#d": ["user-settings"],
|
||||
"limit": 20
|
||||
}]
|
||||
[2026-04-28 07:27:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_2_1777375674", {
|
||||
"kinds": [30078],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"#d": ["user-settings"],
|
||||
"limit": 20
|
||||
}]
|
||||
[2026-04-28 07:27:54] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=1047>
|
||||
[2026-04-28 07:27:54] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=1045>
|
||||
[2026-04-28 07:27:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_2_1777375674"]
|
||||
[2026-04-28 07:27:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_2_1777375674"]
|
||||
[2026-04-28 07:27:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_2_1777375674"]
|
||||
[2026-04-28 07:27:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_2_1777375674"]
|
||||
[2026-04-28 07:27:54] [INFO ] [main.c:1007] [didactyl] startup phase: recovered user-settings from Nostr
|
||||
[2026-04-28 07:27:54] [INFO ] [main.c:311] [didactyl] startup checklist [02] Recover runtime config from Nostr: ok (user-settings recalled)
|
||||
[2026-04-28 07:27:54] [INFO ] [main.c:304] [didactyl] startup checklist [03] Validate LLM config: begin
|
||||
[2026-04-28 07:27:54] [INFO ] [main.c:314] [didactyl] startup checklist [03] Validate LLM config: ok
|
||||
[2026-04-28 07:27:54] [INFO ] [main.c:304] [didactyl] startup checklist [04] Validate admin config: begin
|
||||
[2026-04-28 07:27:54] [INFO ] [main.c:314] [didactyl] startup checklist [04] Validate admin config: ok
|
||||
[2026-04-28 07:27:54] [INFO ] [main.c:304] [didactyl] startup checklist [05] Initialize LLM client: begin
|
||||
[2026-04-28 07:27:54] [INFO ] [main.c:314] [didactyl] startup checklist [05] Initialize LLM client: ok
|
||||
[2026-04-28 07:27:54] [INFO ] [main.c:304] [didactyl] startup checklist [06] Detect first run via kind 10002: begin
|
||||
[2026-04-28 07:27:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_3_1777375674", {
|
||||
"kinds": [10002],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 1
|
||||
}]
|
||||
[2026-04-28 07:27:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_3_1777375674", {
|
||||
"kinds": [10002],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 1
|
||||
}]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=462>
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=460>
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_3_1777375674"]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_3_1777375674"]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_3_1777375674"]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_3_1777375674"]
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:1337] [didactyl] startup phase: first-run detection via kind 10002 => subsequent-run
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:311] [didactyl] startup checklist [06] Detect first run via kind 10002: ok (subsequent-run)
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:304] [didactyl] startup checklist [07] Reconcile/persist startup state: begin
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_4_1777375675", {
|
||||
"kinds": [1],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 1
|
||||
}]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_4_1777375675", {
|
||||
"kinds": [1],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 1
|
||||
}]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_4_1777375675"]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_4_1777375675"]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_4_1777375675"]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_4_1777375675"]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=480>
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:3323] [didactyl] kind 0 event published to wss://relay.damus.io (async, reason=startup_reconcile)
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=0 author=1eb171136dbb1ba6... id=a94194d5ba150931... created_at=1777375675
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:1540] [didactyl] self-skill upsert rejected: kind not in {31123,31124,10123}
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=474>
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:3323] [didactyl] kind 10002 event published to wss://relay.damus.io (async, reason=startup_reconcile)
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=10002 author=1eb171136dbb1ba6... id=e4d54d57a4d7180d... created_at=1777375675
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:1540] [didactyl] self-skill upsert rejected: kind not in {31123,31124,10123}
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=827>
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:3323] [didactyl] kind 31124 event published to wss://relay.damus.io (async, reason=startup_reconcile)
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=31124 author=1eb171136dbb1ba6... id=ecaba96e69d6b3ad... created_at=1777375675
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:1645] [didactyl] self-skill upsert accepted: new entry added
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=553>
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:3323] [didactyl] kind 10123 event published to wss://relay.damus.io (async, reason=startup_reconcile)
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=10123 author=1eb171136dbb1ba6... id=b1ad6f867a2f34f8... created_at=1777375675
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:1645] [didactyl] self-skill upsert accepted: new entry added
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:1657] [didactyl] kind 10123 accepted with 1 'a' tags
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=482>
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:3323] [didactyl] kind 0 event published to wss://relay.primal.net (async, reason=startup_reconcile)
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=0 author=1eb171136dbb1ba6... id=a94194d5ba150931... created_at=1777375675
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:1540] [didactyl] self-skill upsert rejected: kind not in {31123,31124,10123}
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=476>
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:3323] [didactyl] kind 10002 event published to wss://relay.primal.net (async, reason=startup_reconcile)
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=10002 author=1eb171136dbb1ba6... id=e4d54d57a4d7180d... created_at=1777375675
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:1540] [didactyl] self-skill upsert rejected: kind not in {31123,31124,10123}
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=829>
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:3323] [didactyl] kind 31124 event published to wss://relay.primal.net (async, reason=startup_reconcile)
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=31124 author=1eb171136dbb1ba6... id=5b96f07025aa928e... created_at=1777375675
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:1622] [didactyl] self-skill upsert accepted: replaced existing (old created_at=1777375675)
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=555>
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:3323] [didactyl] kind 10123 event published to wss://relay.primal.net (async, reason=startup_reconcile)
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=10123 author=1eb171136dbb1ba6... id=b1ad6f867a2f34f8... created_at=1777375675
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:1622] [didactyl] self-skill upsert accepted: replaced existing (old created_at=1777375675)
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:1634] [didactyl] kind 10123 accepted with 1 'a' tags
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:3664] [didactyl] startup publish detail: kind=0 (profile) -> wss://relay.damus.io, wss://relay.primal.net
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:3664] [didactyl] startup publish detail: kind=10002 (relay_list) -> wss://relay.damus.io, wss://relay.primal.net
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:3664] [didactyl] startup publish detail: kind=31124 (skill) -> wss://relay.damus.io, wss://relay.primal.net
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:3664] [didactyl] startup publish detail: kind=10123 (adoption_list) -> wss://relay.damus.io, wss://relay.primal.net
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:3676] [didactyl] startup publish summary: 4/4 event(s) published to at least one relay; relays used=2/2
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:937] [didactyl] startup phase: skipping user-settings publish because runtime config was recalled from Nostr
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:1361] [didactyl] startup phase: persisted encrypted runtime config to Nostr
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:314] [didactyl] startup checklist [07] Reconcile/persist startup state: ok
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:304] [didactyl] startup checklist [08] Initialize agent: begin
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_5_1777375675", {
|
||||
"kinds": [30078],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"#d": ["memory"],
|
||||
"limit": 1
|
||||
}]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_5_1777375675", {
|
||||
"kinds": [30078],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"#d": ["memory"],
|
||||
"limit": 1
|
||||
}]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["OK","a94194d5ba1509318a6b44eece02f47c20ada0a1bb2dd4fdfce7f23d48b9f81e",true,""]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["OK","a94194d5ba1509318a6b44eece02f47c20ada0a1bb2dd4fdfce7f23d48b9f81e",true,""]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["OK","e4d54d57a4d7180d8476a905e526e3b779a43f167493b67d066465b4eae1f7d9",true,""]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["OK","e4d54d57a4d7180d8476a905e526e3b779a43f167493b67d066465b4eae1f7d9",true,""]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_5_1777375675"]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_5_1777375675"]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["OK","5b96f07025aa928e3ca6221f74cfc5ea6292a382acbfac5cb6f4f3ec8786772e",true,""]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_5_1777375675"]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_5_1777375675"]
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:314] [didactyl] startup checklist [08] Initialize agent: ok
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:304] [didactyl] startup checklist [09] Initialize trigger manager: begin
|
||||
[2026-04-28 07:27:55] [INFO ] [trigger_manager.c:935] [didactyl] trigger manager initialized (capacity=16)
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:314] [didactyl] startup checklist [09] Initialize trigger manager: ok
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:1405] [didactyl] startup phase: deferred trigger load will run after self-skill EOSE
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:304] [didactyl] startup checklist [10] Load startup triggers: begin
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:1408] [didactyl] startup phase: startup-config trigger load begin
|
||||
[2026-04-28 07:27:55] [INFO ] [trigger_manager.c:1259] [didactyl] trigger added d_tag=identity_and_rules action=0 enabled=1
|
||||
[2026-04-28 07:27:55] [INFO ] [trigger_manager.c:1142] [didactyl] startup trigger registered d_tag=identity_and_rules action=llm enabled=1
|
||||
[2026-04-28 07:27:55] [INFO ] [trigger_manager.c:1150] [didactyl] trigger manager loaded 1 trigger(s) from startup config (considered=1)
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:1412] [didactyl] startup phase: startup-config trigger load end
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:314] [didactyl] startup checklist [10] Load startup triggers: ok
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:304] [didactyl] startup checklist [11] Discover self relay list via kind 10002: begin
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:383] [didactyl] kind10002 query begin: timeout_ms=5000 author=1eb171136dbb1ba6... relay_count=2
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:390] [didactyl] kind10002 query relay snapshot: {"relay_count":2,"connected_count":2,"relays":[{"url":"wss://relay.damus.io","status":"connected","events_received":0,"events_published":4,"events_published_ok":2,"events_published_failed":0,"ping_latency_current":0,"ping_latency_avg":0,"query_latency_avg":0,"publish_latency_avg":0,"connection_uptime_start":1777375673,"last_event_time":1777375675},{"url":"wss://relay.primal.net","status":"connected","events_received":2,"events_published":4,"events_published_ok":3,"events_published_failed":0,"ping_latency_current":0,"ping_latency_avg":0,"query_latency_avg":0,"publish_latency_avg":0,"connection_uptime_start":1777375673,"last_event_time":1777375675}]}
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_6_1777375675", {
|
||||
"kinds": [10002],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 16
|
||||
}]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_6_1777375675", {
|
||||
"kinds": [10002],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 16
|
||||
}]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["OK","b1ad6f867a2f34f881f5032b8e8ffe9c1472819822a4c32ba8f566cc2bcfaee6",true,""]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["OK","b1ad6f867a2f34f881f5032b8e8ffe9c1472819822a4c32ba8f566cc2bcfaee6",true,""]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["OK","ecaba96e69d6b3ad9bde94779fbdfdfcbbd112e6a3eb8dbf508859e9a9230b93",true,""]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=460>
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=462>
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_6_1777375675"]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_6_1777375675"]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_6_1777375675"]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_6_1777375675"]
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:410] [didactyl] kind10002 query received event_count=1
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:507] [didactyl] kind10002 query extracted relays=["wss://relay.damus.io","wss://relay.primal.net"]
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:612] [didactyl] kind10002 wait success: relay_count=2
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:614] [didactyl] kind10002 relay[0]=wss://relay.damus.io
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:614] [didactyl] kind10002 relay[1]=wss://relay.primal.net
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:618] [didactyl] kind10002 wait success relay snapshot: {"relay_count":2,"connected_count":2,"relays":[{"url":"wss://relay.damus.io","status":"connected","events_received":1,"events_published":4,"events_published_ok":4,"events_published_failed":0,"ping_latency_current":0,"ping_latency_avg":0,"query_latency_avg":0,"publish_latency_avg":0,"connection_uptime_start":1777375673,"last_event_time":1777375675},{"url":"wss://relay.primal.net","status":"connected","events_received":2,"events_published":4,"events_published_ok":4,"events_published_failed":0,"ping_latency_current":0,"ping_latency_avg":0,"query_latency_avg":0,"publish_latency_avg":0,"connection_uptime_start":1777375673,"last_event_time":1777375675}]}
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:311] [didactyl] startup checklist [11] Discover self relay list via kind 10002: ok (kind10002=2 added=0 connected=2/2)
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:304] [didactyl] startup checklist [12] Subscribe admin context: begin
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:1463] [didactyl] startup phase: subscribe admin context begin
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_7_1777375675", {
|
||||
"kinds": [0, 3, 10002],
|
||||
"authors": ["254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"],
|
||||
"limit": 32
|
||||
}]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_7_1777375675", {
|
||||
"kinds": [0, 3, 10002],
|
||||
"authors": ["254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"],
|
||||
"limit": 32
|
||||
}]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_8_1777375675", {
|
||||
"kinds": [1],
|
||||
"authors": ["254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"],
|
||||
"limit": 10
|
||||
}]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_8_1777375675", {
|
||||
"kinds": [1],
|
||||
"authors": ["254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"],
|
||||
"limit": 10
|
||||
}]
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:2703] [didactyl] admin context subscriptions active for admin 254d7a7f68b4443f...
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:1467] [didactyl] startup phase: subscribe admin context end
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:314] [didactyl] startup checklist [12] Subscribe admin context: ok
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:304] [didactyl] startup checklist [13] Subscribe agent self context: begin
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:1471] [didactyl] startup phase: subscribe agent self context begin
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_9_1777375675", {
|
||||
"kinds": [0, 3, 10002],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 64
|
||||
}]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_9_1777375675", {
|
||||
"kinds": [0, 3, 10002],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 64
|
||||
}]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_10_1777375675", {
|
||||
"kinds": [1],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 10
|
||||
}]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_10_1777375675", {
|
||||
"kinds": [1],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 10
|
||||
}]
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:2791] [didactyl] agent self-context subscriptions active for pubkey 1eb171136dbb1ba6...
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:1475] [didactyl] startup phase: subscribe agent self context end
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:314] [didactyl] startup checklist [13] Subscribe agent self context: ok
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:304] [didactyl] startup checklist [14] Subscribe self-skill cache: begin
|
||||
[2026-04-28 07:27:55] [INFO ] [main.c:1479] [didactyl] startup phase: subscribe self skill cache begin
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:2827] [didactyl] self-skill subscription filter: {"kinds":[31123,31124,10123],"authors":["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],"limit":300}
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_11_1777375675", {
|
||||
"kinds": [31123, 31124, 10123],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 300
|
||||
}]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_11_1777375675", {
|
||||
"kinds": [31123, 31124, 10123],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 300
|
||||
}]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_12_1777375675", {
|
||||
"kinds": [31123],
|
||||
"authors": ["254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"],
|
||||
"limit": 150
|
||||
}]
|
||||
[2026-04-28 07:27:55] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_12_1777375675", {
|
||||
"kinds": [31123],
|
||||
"authors": ["254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"],
|
||||
"limit": 150
|
||||
}]
|
||||
[2026-04-28 07:27:55] [INFO ] [nostr_handler.c:2887] [didactyl] self/admin skill subscriptions active (self=1eb171136dbb1ba6..., admin=254d7a7f68b4443f...)
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_7_1777375675"]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_7_1777375675"]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:2063] [didactyl] DEBUG on_eose called: event_count=0
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_8_1777375675"]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_8_1777375675"]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:2063] [didactyl] DEBUG on_eose called: event_count=0
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=462>
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=460>
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=471>
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=469>
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_9_1777375675"]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_9_1777375675"]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:2063] [didactyl] DEBUG on_eose called: event_count=0
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_10_1777375675"]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_10_1777375675"]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:2063] [didactyl] DEBUG on_eose called: event_count=0
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=540>
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:2500] [didactyl] self-skill cache received kind=10123 d_tag=- id=b1ad6f867a2f34f881f5032b8e8ffe9c1472819822a4c32ba8f566cc2bcfaee6 created_at=1777375675 via wss://relay.primal.net
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=10123 author=1eb171136dbb1ba6... id=b1ad6f867a2f34f8... created_at=1777375675
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:1622] [didactyl] self-skill upsert accepted: replaced existing (old created_at=1777375675)
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:1634] [didactyl] kind 10123 accepted with 1 'a' tags
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=816>
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:2500] [didactyl] self-skill cache received kind=31124 d_tag=identity_and_rules id=ecaba96e69d6b3ad9bde94779fbdfdfcbbd112e6a3eb8dbf508859e9a9230b93 created_at=1777375675 via wss://relay.damus.io
|
||||
[2026-04-28 07:27:56] [INFO ] [trigger_manager.c:1485] [didactyl] trigger updated d_tag=identity_and_rules action=0 enabled=1
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:1502] [didactyl] live self-skill trigger registered d_tag=identity_and_rules action=llm enabled=1
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=31124 author=1eb171136dbb1ba6... id=ecaba96e69d6b3ad... created_at=1777375675
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:1622] [didactyl] self-skill upsert accepted: replaced existing (old created_at=1777375675)
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=818>
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:2500] [didactyl] self-skill cache received kind=31124 d_tag=identity_and_rules id=5b96f07025aa928e3ca6221f74cfc5ea6292a382acbfac5cb6f4f3ec8786772e created_at=1777375675 via wss://relay.primal.net
|
||||
[2026-04-28 07:27:56] [INFO ] [trigger_manager.c:1485] [didactyl] trigger updated d_tag=identity_and_rules action=0 enabled=1
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:1502] [didactyl] live self-skill trigger registered d_tag=identity_and_rules action=llm enabled=1
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=31124 author=1eb171136dbb1ba6... id=5b96f07025aa928e... created_at=1777375675
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:1622] [didactyl] self-skill upsert accepted: replaced existing (old created_at=1777375675)
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=538>
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:2500] [didactyl] self-skill cache received kind=10123 d_tag=- id=b1ad6f867a2f34f881f5032b8e8ffe9c1472819822a4c32ba8f566cc2bcfaee6 created_at=1777375675 via wss://relay.damus.io
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=10123 author=1eb171136dbb1ba6... id=b1ad6f867a2f34f8... created_at=1777375675
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:1622] [didactyl] self-skill upsert accepted: replaced existing (old created_at=1777375675)
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:1634] [didactyl] kind 10123 accepted with 1 'a' tags
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_11_1777375675"]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_11_1777375675"]
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:2070] [didactyl] self-skill EOSE received: cached skill events=0
|
||||
[2026-04-28 07:27:56] [INFO ] [main.c:47] [didactyl] deferred trigger load begin after self-skill EOSE (event_count=0)
|
||||
[2026-04-28 07:27:56] [INFO ] [trigger_manager.c:1485] [didactyl] trigger updated d_tag=identity_and_rules action=0 enabled=1
|
||||
[2026-04-28 07:27:56] [INFO ] [trigger_manager.c:1039] [didactyl] trigger manager loaded 1 trigger(s) from self skills (considered=1)
|
||||
[2026-04-28 07:27:56] [INFO ] [main.c:57] [didactyl] deferred trigger load status: {"success":true,"count":1,"active":1,"triggers":[{"skill_d_tag":"identity_and_rules","filter_json":"{\"from\":\"admin\"}","type":"dm","action":"llm","enabled":true,"subscribed":false,"llm":"","tools":"","has_max_tokens":false,"has_temperature":false,"has_seed":false,"last_fired":0,"last_seen_created_at":0}]}
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_12_1777375675"]
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:3114] [didactyl] self-skill cache event: kind=31124 d_tag=identity_and_rules id=5b96f07025aa928e3ca6221f74cfc5ea6292a382acbfac5cb6f4f3ec8786772e created_at=1777375675
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:3114] [didactyl] self-skill cache event: kind=10123 d_tag=- id=b1ad6f867a2f34f881f5032b8e8ffe9c1472819822a4c32ba8f566cc2bcfaee6 created_at=1777375675
|
||||
[2026-04-28 07:27:56] [INFO ] [main.c:1546] [didactyl] startup phase: subscribe self skill cache end
|
||||
[2026-04-28 07:27:56] [INFO ] [main.c:311] [didactyl] startup checklist [14] Subscribe self-skill cache: ok (skills=1 adoptions=1)
|
||||
[2026-04-28 07:27:56] [INFO ] [main.c:304] [didactyl] startup checklist [15] Subscribe DMs: begin
|
||||
[2026-04-28 07:27:56] [INFO ] [main.c:1550] [didactyl] startup phase: subscribe DMs begin
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:2905] [didactyl] DM subscribe: dm_protocol=2 need_kind4=1 need_kind1059=1 g_start_time=1777375673
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_13_1777375676", {
|
||||
"kinds": [4],
|
||||
"#p": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"since": 1777375673,
|
||||
"limit": 100
|
||||
}]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_13_1777375676", {
|
||||
"kinds": [4],
|
||||
"#p": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"since": 1777375673,
|
||||
"limit": 100
|
||||
}]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_14_1777375676", {
|
||||
"kinds": [1059],
|
||||
"#p": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 400
|
||||
}]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_14_1777375676", {
|
||||
"kinds": [1059],
|
||||
"#p": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 400
|
||||
}]
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:3000] [didactyl] DM subscription active for pubkey 1eb171136dbb1ba6...
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:3001] [didactyl] DEBUG DM subscription g_start_time=1777375673 now=1777375676 delta=3 relay_count=2
|
||||
[2026-04-28 07:27:56] [INFO ] [main.c:1565] [didactyl] startup phase: subscribe DMs end
|
||||
[2026-04-28 07:27:56] [INFO ] [main.c:314] [didactyl] startup checklist [15] Subscribe DMs: ok
|
||||
[2026-04-28 07:27:56] [INFO ] [main.c:304] [didactyl] startup checklist [16] Subscribe wallet events: begin
|
||||
[2026-04-28 07:27:56] [INFO ] [main.c:1569] [didactyl] startup phase: subscribe wallet events begin
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_15_1777375676", {
|
||||
"kinds": [17375, 7375, 5],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"since": 1777375673,
|
||||
"limit": 500
|
||||
}]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_15_1777375676", {
|
||||
"kinds": [17375, 7375, 5],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"since": 1777375673,
|
||||
"limit": 500
|
||||
}]
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:3053] [didactyl] wallet event subscription active for pubkey 1eb171136dbb1ba6...
|
||||
[2026-04-28 07:27:56] [INFO ] [main.c:1573] [didactyl] startup phase: subscribe wallet events end
|
||||
[2026-04-28 07:27:56] [INFO ] [main.c:314] [didactyl] startup checklist [16] Subscribe wallet events: ok
|
||||
[2026-04-28 07:27:56] [INFO ] [main.c:304] [didactyl] startup checklist [17] Initialize cashu wallet: begin
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_16_1777375676", {
|
||||
"kinds": [17375, 7375],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"]
|
||||
}]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_16_1777375676", {
|
||||
"kinds": [17375, 7375],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"]
|
||||
}]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_12_1777375675"]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:2063] [didactyl] DEBUG on_eose called: event_count=0
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_13_1777375676"]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_13_1777375676"]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:2063] [didactyl] DEBUG on_eose called: event_count=0
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_14_1777375676"]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_14_1777375676"]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:2063] [didactyl] DEBUG on_eose called: event_count=0
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_15_1777375676"]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_15_1777375676"]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_16_1777375676"]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_16_1777375676"]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_16_1777375676"]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_16_1777375676"]
|
||||
[2026-04-28 07:27:56] [WARN ] [main.c:1589] [didactyl] startup phase: cashu wallet load/create deferred to first tool call
|
||||
[2026-04-28 07:27:56] [INFO ] [main.c:311] [didactyl] startup checklist [17] Initialize cashu wallet: ok (initialized; load/create deferred)
|
||||
[2026-04-28 07:27:56] [INFO ] [http_api.c:1662] [didactyl] http api listening on http://127.0.0.1:8485
|
||||
[2026-04-28 07:27:56] [INFO ] [main.c:1629] [didactyl] HTTP API listening at http://127.0.0.1:8485
|
||||
[2026-04-28 07:27:56] [INFO ] [main.c:1632] [didactyl] HTTP API endpoints: http://127.0.0.1:8485/api/context/current http://127.0.0.1:8485/api/context/parts
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:1844] [didactyl] sending plaintext DM content: Didactyl Test Agent has started up and is online at 2026-04-28 07:27:56 (version v0.2.48, connected relays: 2/2).
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:1836] [didactyl] sending encrypted DM event: {"pubkey":"1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc","created_at":1777375676,"kind":4,"tags":[["p","254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"]],"content":"4M2CHJPV80ujTCckvsFEbZXfDAoYlTt95OJ36vFCVNktDiLEcugD1i75WDGY+nH/kmYQY4E4GOYnBQ9cRPc9z5K4URJa4NomXGQaLpyjVWqKpVd557s6t2HA/9mT5UiohdkfLEcv1fhFWHLlQZdHV1AfEklYwP9D7ZuOdobShsU=?iv=bjxvVALQI+GlATrv3iurcw==","id":"2a1530bcf8fb2b5e63022e96cd369b88ad302187179ed892cc146e769c7ebd15","sig":"f63c084fd0bf131f952c934d0e8ced20a6bda170e4d43c5c40ee9111337ec8748caf65434fd0937bf2463d5681e2ada89514d80f97f0e688126cefae163628d6"}
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:920] [didactyl] publish DM target relays (2):
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:922] [didactyl] -> wss://relay.damus.io
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:922] [didactyl] -> wss://relay.primal.net
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=681>
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=683>
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:3200] [didactyl] kind 4 event published to wss://relay.damus.io (async)
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:3200] [didactyl] kind 4 event published to wss://relay.primal.net (async)
|
||||
[2026-04-28 07:27:56] [INFO ] [nostr_handler.c:3209] [didactyl] sent DM 2a1530bcf8fb2b5e... to 254d7a7f68b4443f... via 2 connected relay(s)
|
||||
[2026-04-28 07:27:56] [INFO ] [main.c:311] [didactyl] startup checklist [18] READY: ok (agent online; entering main poll loop)
|
||||
[2026-04-28 07:27:56] [INFO ] [main.c:1668] [didactyl] entering main poll loop
|
||||
[2026-04-28 07:27:56] [INFO ] [main.c:1669] [didactyl] running with pubkey 1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["OK","2a1530bcf8fb2b5e63022e96cd369b88ad302187179ed892cc146e769c7ebd15",true,""]
|
||||
[2026-04-28 07:27:56] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["OK","2a1530bcf8fb2b5e63022e96cd369b88ad302187179ed892cc146e769c7ebd15",true,""]
|
||||
[2026-04-28 07:27:56] [INFO ] [llm.c:125] [didactyl] llm request: method=POST url=https://api.ppq.ai/chat/completions body_bytes=30991 body_preview={"model":"claude-haiku-4.5","max_tokens":10000,"temperature":0.7,"messages":[{"role":"system","content":"# Didactyl Agent\n\n## Test Agent\n\nYou are a test agent. Respond to requests and use tools when needed."},{"role":"user","content":"Save test harness probe to memory, then recall your memory"},{"role":"user","content":"Save test harness probe to memory, then recall your memory","_ts":1777375676}],"tools":[{"type":"function","function":{"name":"nostr_post","description":"Publish a Nostr event to connected relays","parameters":{"type":"object","properties":{"kind":{"type":"integer","description":"Nostr event kind number (for example 1 for note, 7 for reaction, 30023 for longform)"},"content":{"type":"string","description":"Event content/body text to publish"},"tags":{"type":"array","description":"Optional Nostr tags array, e.g. [[\"d\",\"my-skill\"],[\"t\",\"nostr\"]]","items":{"type":"array","items":{"type":"string"}}}},"required":["kind","content"]}}},{"type":"function","function":{"name":"nostr_query","description":"Query events from relays using a Nostr filter","parameters":{"type":"object","properties":{"filter":{"type":"object","description":"Nostr filter object (authors, kinds, ids, since, until, limit, and tag filters)"},"timeout_ms":{"type":"integer","description":"Optional query timeout in milliseconds"}},"required":["filter"]}}},{"type":"function","function":{"name":"local_shell_exec","description":"Execute a shell command and return stdout/stderr","parameters":{"type":"object","properties":{"command":{"type":"string","description":"Shell command to execute in the configured working directory"}},"required":["command"]}}},{"type":"function","function":{"name":"local_file_read","description":"Read a local file as text from the configured working directory","parameters":{"type":"object","properties":{"path":{"type":"string","description":"Path to file to read (relative to configured working directory)"},"max_bytes":{"type":"integer","description":"Optional maximum bytes to return"}},"required":["path"]}}},{"type":"function","function":{"name":"local_file_write","description":"Write text content to a local file in the configured working directory","parameters":{"type":"object","properties":{"path":{"type":"string","description":"Path to file to write (relative to configured working directory)"},"content":{"type":"string","description":"Text content to write"},"append":{"type":"boolean","description":"When true, append to file instead of overwriting"}},"required":["path","content"]}}},{"type":"function","function":{"name":"nostr_post_readme","description":"Publish README.md as kind 30023 with deterministic d tag readme.md","parameters":{"type":"object","properties":{},"required":[]}}},{"type":"function","function":{"name":"nostr_delete","description":"Request deletion of one or more previously published events (NIP-09 kind 5)","parameters":{"type":"object","properties":{"event_ids":{"type":"array","description":"Event IDs to request deletion for","items":{"type":"string"}},"kinds":{"type":"array","description":"Optional kinds corresponding to event_ids entries","items":{"type":"integer"}},"reason":{"type":"string","description":"Optional human-readable reason"}},"required":["event_ids"]}}},{"type":"function","function":{"name":"nostr_react","description":"React to a Nostr event with like/dislike/emoji (NIP-25 kind 7)","parameters":{"type":"object","properties":{"event_id":{"type":"string","description":"Target event ID to react to"},"event_pubkey":{"type":"string","description":"Author pubkey of target event"},"event_kind":{"type":"integer","description":"Optional kind of target event"},"reaction":{"type":"string","description":"Reaction content such as +, -, ❤️, or emoji"}},"required":["event_id","event_pubkey"]}}},{"type":"function","function":{"name":"nostr_profile_get","description":"Look up a Nostr profile (kind 0 metadata) by pubkey","parameters":{"type":"object","properties":{"pubkey":{"type":"string","desc...
|
||||
[2026-04-28 07:27:59] [INFO ] [nostr_handler.c:920] [didactyl] publish kind event target relays (2):
|
||||
[2026-04-28 07:27:59] [INFO ] [nostr_handler.c:922] [didactyl] -> wss://relay.damus.io
|
||||
[2026-04-28 07:27:59] [INFO ] [nostr_handler.c:922] [didactyl] -> wss://relay.primal.net
|
||||
[2026-04-28 07:27:59] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=836>
|
||||
[2026-04-28 07:27:59] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=838>
|
||||
[2026-04-28 07:27:59] [INFO ] [nostr_handler.c:3323] [didactyl] kind 30078 event published to wss://relay.damus.io (async, reason=manual_publish)
|
||||
[2026-04-28 07:27:59] [INFO ] [nostr_handler.c:3323] [didactyl] kind 30078 event published to wss://relay.primal.net (async, reason=manual_publish)
|
||||
[2026-04-28 07:27:59] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=30078 author=1eb171136dbb1ba6... id=6311c65cf9b52fe1... created_at=1777375679
|
||||
[2026-04-28 07:27:59] [INFO ] [nostr_handler.c:1540] [didactyl] self-skill upsert rejected: kind not in {31123,31124,10123}
|
||||
[2026-04-28 07:27:59] [INFO ] [nostr_handler.c:3391] [didactyl] published kind 30078 event via 2 connected relay(s)
|
||||
[2026-04-28 07:27:59] [INFO ] [llm.c:125] [didactyl] llm request: method=POST url=https://api.ppq.ai/chat/completions body_bytes=31689 body_preview={"model":"claude-haiku-4.5","max_tokens":10000,"temperature":0.7,"messages":[{"role":"system","content":"# Didactyl Agent\n\n## Test Agent\n\nYou are a test agent. Respond to requests and use tools when needed."},{"role":"user","content":"Save test harness probe to memory, then recall your memory"},{"role":"user","content":"Save test harness probe to memory, then recall your memory","_ts":1777375676},{"role":"assistant","content":"I'll save a test harness probe to memory and then recall it.","tool_calls":[{"id":"toolu_bdrk_01GBGt8MaQjzZj4i23ij5caL","type":"function","function":{"name":"memory_save","arguments":"{\"content\": \"Test harness probe - system verification checkpoint. Agent memory subsystem operational. Timestamp: current session. This entry confirms memory_save and memory_recall functions are working correctly.\"}"}}]},{"role":"tool","tool_call_id":"toolu_bdrk_01GBGt8MaQjzZj4i23ij5caL","content":"{\"success\":true,\"d_tag\":\"memory\",\"kind\":30078,\"entry_length\":199,\"truncated\":false,\"event_id\":\"6311c65cf9b52fe1fe9bce8052a09f594d6b3dc1f83f8030f45106b8b3a108e2\"}"}],"tools":[{"type":"function","function":{"name":"nostr_post","description":"Publish a Nostr event to connected relays","parameters":{"type":"object","properties":{"kind":{"type":"integer","description":"Nostr event kind number (for example 1 for note, 7 for reaction, 30023 for longform)"},"content":{"type":"string","description":"Event content/body text to publish"},"tags":{"type":"array","description":"Optional Nostr tags array, e.g. [[\"d\",\"my-skill\"],[\"t\",\"nostr\"]]","items":{"type":"array","items":{"type":"string"}}}},"required":["kind","content"]}}},{"type":"function","function":{"name":"nostr_query","description":"Query events from relays using a Nostr filter","parameters":{"type":"object","properties":{"filter":{"type":"object","description":"Nostr filter object (authors, kinds, ids, since, until, limit, and tag filters)"},"timeout_ms":{"type":"integer","description":"Optional query timeout in milliseconds"}},"required":["filter"]}}},{"type":"function","function":{"name":"local_shell_exec","description":"Execute a shell command and return stdout/stderr","parameters":{"type":"object","properties":{"command":{"type":"string","description":"Shell command to execute in the configured working directory"}},"required":["command"]}}},{"type":"function","function":{"name":"local_file_read","description":"Read a local file as text from the configured working directory","parameters":{"type":"object","properties":{"path":{"type":"string","description":"Path to file to read (relative to configured working directory)"},"max_bytes":{"type":"integer","description":"Optional maximum bytes to return"}},"required":["path"]}}},{"type":"function","function":{"name":"local_file_write","description":"Write text content to a local file in the configured working directory","parameters":{"type":"object","properties":{"path":{"type":"string","description":"Path to file to write (relative to configured working directory)"},"content":{"type":"string","description":"Text content to write"},"append":{"type":"boolean","description":"When true, append to file instead of overwriting"}},"required":["path","content"]}}},{"type":"function","function":{"name":"nostr_post_readme","description":"Publish README.md as kind 30023 with deterministic d tag readme.md","parameters":{"type":"object","properties":{},"required":[]}}},{"type":"function","function":{"name":"nostr_delete","description":"Request deletion of one or more previously published events (NIP-09 kind 5)","parameters":{"type":"object","properties":{"event_ids":{"type":"array","description":"Event IDs to request deletion for","items":{"type":"string"}},"kinds":{"type":"array","description":"Optional kinds corresponding to event_ids entries","items":{"type":"integer"}},"reason":{"type":"string","description":"Optional human-readable reason"}},"required":["event_ids"]}}},{"type":"function","function":{"name":"nostr...
|
||||
[2026-04-28 07:28:02] [INFO ] [llm.c:125] [didactyl] llm request: method=POST url=https://api.ppq.ai/chat/completions body_bytes=32229 body_preview={"model":"claude-haiku-4.5","max_tokens":10000,"temperature":0.7,"messages":[{"role":"system","content":"# Didactyl Agent\n\n## Test Agent\n\nYou are a test agent. Respond to requests and use tools when needed."},{"role":"user","content":"Save test harness probe to memory, then recall your memory"},{"role":"user","content":"Save test harness probe to memory, then recall your memory","_ts":1777375676},{"role":"assistant","content":"I'll save a test harness probe to memory and then recall it.","tool_calls":[{"id":"toolu_bdrk_01GBGt8MaQjzZj4i23ij5caL","type":"function","function":{"name":"memory_save","arguments":"{\"content\": \"Test harness probe - system verification checkpoint. Agent memory subsystem operational. Timestamp: current session. This entry confirms memory_save and memory_recall functions are working correctly.\"}"}}]},{"role":"tool","tool_call_id":"toolu_bdrk_01GBGt8MaQjzZj4i23ij5caL","content":"{\"success\":true,\"d_tag\":\"memory\",\"kind\":30078,\"entry_length\":199,\"truncated\":false,\"event_id\":\"6311c65cf9b52fe1fe9bce8052a09f594d6b3dc1f83f8030f45106b8b3a108e2\"}"},{"role":"assistant","content":"Great! Now let me recall the memory:","tool_calls":[{"id":"toolu_bdrk_01QgBARiRY5FTx8TJH3GhzU6","type":"function","function":{"name":"memory_recall","arguments":"{}"}}]},{"role":"tool","tool_call_id":"toolu_bdrk_01QgBARiRY5FTx8TJH3GhzU6","content":"{\"success\":true,\"content\":\"Test harness probe - system verification checkpoint. Agent memory subsystem operational. Timestamp: current session. This entry confirms memory_save and memory_recall functions are working correctly.\",\"content_length\":199}"}],"tools":[{"type":"function","function":{"name":"nostr_post","description":"Publish a Nostr event to connected relays","parameters":{"type":"object","properties":{"kind":{"type":"integer","description":"Nostr event kind number (for example 1 for note, 7 for reaction, 30023 for longform)"},"content":{"type":"string","description":"Event content/body text to publish"},"tags":{"type":"array","description":"Optional Nostr tags array, e.g. [[\"d\",\"my-skill\"],[\"t\",\"nostr\"]]","items":{"type":"array","items":{"type":"string"}}}},"required":["kind","content"]}}},{"type":"function","function":{"name":"nostr_query","description":"Query events from relays using a Nostr filter","parameters":{"type":"object","properties":{"filter":{"type":"object","description":"Nostr filter object (authors, kinds, ids, since, until, limit, and tag filters)"},"timeout_ms":{"type":"integer","description":"Optional query timeout in milliseconds"}},"required":["filter"]}}},{"type":"function","function":{"name":"local_shell_exec","description":"Execute a shell command and return stdout/stderr","parameters":{"type":"object","properties":{"command":{"type":"string","description":"Shell command to execute in the configured working directory"}},"required":["command"]}}},{"type":"function","function":{"name":"local_file_read","description":"Read a local file as text from the configured working directory","parameters":{"type":"object","properties":{"path":{"type":"string","description":"Path to file to read (relative to configured working directory)"},"max_bytes":{"type":"integer","description":"Optional maximum bytes to return"}},"required":["path"]}}},{"type":"function","function":{"name":"local_file_write","description":"Write text content to a local file in the configured working directory","parameters":{"type":"object","properties":{"path":{"type":"string","description":"Path to file to write (relative to configured working directory)"},"content":{"type":"string","description":"Text content to write"},"append":{"type":"boolean","description":"When true, append to file instead of overwriting"}},"required":["path","content"]}}},{"type":"function","function":{"name":"nostr_post_readme","description":"Publish README.md as kind 30023 with deterministic d tag readme.md","parameters":{"type":"object","properties":{},"required":[]}}},{"type":"function",...
|
||||
[2026-04-28 07:28:19] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["OK","6311c65cf9b52fe1fe9bce8052a09f594d6b3dc1f83f8030f45106b8b3a108e2",false,"rate-limited: you are noting too much"]
|
||||
[2026-04-28 07:28:19] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["OK","6311c65cf9b52fe1fe9bce8052a09f594d6b3dc1f83f8030f45106b8b3a108e2",true,""]
|
||||
[2026-04-28 07:28:25] [INFO ] [main.c:1691] [didactyl] shutting down
|
||||
[2026-04-28 07:28:25] [INFO ] [trigger_manager.c:1734] [didactyl] trigger manager cleaned up
|
||||
[2026-04-28 07:28:25] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_7_1777375675"]
|
||||
[2026-04-28 07:28:25] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_7_1777375675"]
|
||||
[2026-04-28 07:28:25] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_8_1777375675"]
|
||||
[2026-04-28 07:28:25] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_8_1777375675"]
|
||||
[2026-04-28 07:28:25] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_9_1777375675"]
|
||||
[2026-04-28 07:28:25] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_9_1777375675"]
|
||||
[2026-04-28 07:28:25] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_10_1777375675"]
|
||||
[2026-04-28 07:28:25] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_10_1777375675"]
|
||||
[2026-04-28 07:28:25] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_11_1777375675"]
|
||||
[2026-04-28 07:28:25] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_11_1777375675"]
|
||||
[2026-04-28 07:28:25] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_12_1777375675"]
|
||||
[2026-04-28 07:28:25] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_12_1777375675"]
|
||||
[2026-04-28 07:28:25] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_13_1777375676"]
|
||||
[2026-04-28 07:28:25] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_13_1777375676"]
|
||||
[2026-04-28 07:28:25] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_14_1777375676"]
|
||||
[2026-04-28 07:28:25] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_14_1777375676"]
|
||||
[2026-04-28 07:28:25] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_15_1777375676"]
|
||||
[2026-04-28 07:28:25] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_15_1777375676"]
|
||||
59
tests/results/20260428T111920Z/runtime_test_genesis.jsonc
Normal file
59
tests/results/20260428T111920Z/runtime_test_genesis.jsonc
Normal file
@@ -0,0 +1,59 @@
|
||||
{
|
||||
// TEST CONFIGURATION
|
||||
// Use disposable keys/accounts only.
|
||||
"key": {
|
||||
"nsec": "d3011e59954403fb84729ab0e9fb239ba0f0238b3f353dfb5c08a32f4b3d21a1"
|
||||
},
|
||||
"admin": {
|
||||
"pubkey": "254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"
|
||||
},
|
||||
"llm": {
|
||||
"provider": "https://api.ppq.ai",
|
||||
"api_key": "sk-SBI2Pga0J6n8jpPorHbRHC",
|
||||
"model": "claude-haiku-4.5",
|
||||
"base_url": "https://api.ppq.ai",
|
||||
"max_tokens": 10000,
|
||||
"temperature": 0.7
|
||||
},
|
||||
"api": {
|
||||
"enabled": true,
|
||||
"port": 8485,
|
||||
"bind_address": "127.0.0.1"
|
||||
},
|
||||
"encrypted_events": [
|
||||
{
|
||||
"kind": 30078,
|
||||
"d_tag": "user-settings",
|
||||
"content": "{\"v\":2,\"updatedAt\":0,\"global_llm\":{\"provider\":\"https://api.ppq.ai\",\"api_key\":\"sk-SBI2Pga0J6n8jpPorHbRHC\",\"model\":\"claude-haiku-4.5\",\"base_url\":\"https://api.ppq.ai\",\"max_tokens\":10000,\"temperature\":0.7},\"didactyl\":{\"admin_pubkey\":\"254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac\",\"dm_protocol\":\"both\",\"max_turns\":40}}"
|
||||
}
|
||||
],
|
||||
"startup_events": [
|
||||
{
|
||||
"kind": 0,
|
||||
"content_fields": {
|
||||
"name": "Didactyl Test Agent",
|
||||
"about": "Automated test instance"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
{
|
||||
"kind": 10002,
|
||||
"content": "",
|
||||
"tags": [
|
||||
["r", "wss://relay.damus.io"],
|
||||
["r", "wss://relay.primal.net"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": 31124,
|
||||
"content": "# Test Agent\n\nYou are a test agent. Respond to requests and use tools when needed.",
|
||||
"tags": [
|
||||
["d", "identity_and_rules"],
|
||||
["app", "didactyl"],
|
||||
["scope", "private"],
|
||||
["trigger", "dm"],
|
||||
["filter", "{\"from\":\"admin\"}"]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
403
tests/results/20260428T112825Z/agent_debug.log
Normal file
403
tests/results/20260428T112825Z/agent_debug.log
Normal file
@@ -0,0 +1,403 @@
|
||||
[2026-04-28 07:28:25] [INFO ] [main.c:1103] Didactyl v0.2.48 starting
|
||||
[2026-04-28 07:28:25] [INFO ] [nostr_handler.c:2558] [didactyl] initializing relay pool with 2 relays
|
||||
[2026-04-28 07:28:25] [INFO ] [nostr_handler.c:2582] [didactyl] added relay: wss://relay.damus.io
|
||||
[2026-04-28 07:28:25] [INFO ] [nostr_handler.c:2582] [didactyl] added relay: wss://relay.primal.net
|
||||
[2026-04-28 07:28:26] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_1_1777375705", {
|
||||
"kinds": [10000],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 1
|
||||
}]
|
||||
[2026-04-28 07:28:26] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_1_1777375705"]
|
||||
[2026-04-28 07:28:26] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_1_1777375705"]
|
||||
[2026-04-28 07:28:26] [INFO ] [main.c:304] [didactyl] startup checklist [01] Relay connectivity: begin
|
||||
[2026-04-28 07:28:26] [INFO ] [main.c:311] [didactyl] startup checklist [01] Relay connectivity: ok (connected relays: 1/2)
|
||||
[2026-04-28 07:28:26] [INFO ] [main.c:304] [didactyl] startup checklist [02] Recover runtime config from Nostr: begin
|
||||
[2026-04-28 07:28:27] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_2_1777375706", {
|
||||
"kinds": [30078],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"#d": ["user-settings"],
|
||||
"limit": 20
|
||||
}]
|
||||
[2026-04-28 07:28:27] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=1047>
|
||||
[2026-04-28 07:28:27] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_2_1777375706"]
|
||||
[2026-04-28 07:28:27] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_2_1777375706"]
|
||||
[2026-04-28 07:28:27] [INFO ] [main.c:1007] [didactyl] startup phase: recovered user-settings from Nostr
|
||||
[2026-04-28 07:28:27] [INFO ] [main.c:311] [didactyl] startup checklist [02] Recover runtime config from Nostr: ok (user-settings recalled)
|
||||
[2026-04-28 07:28:27] [INFO ] [main.c:304] [didactyl] startup checklist [03] Validate LLM config: begin
|
||||
[2026-04-28 07:28:27] [INFO ] [main.c:314] [didactyl] startup checklist [03] Validate LLM config: ok
|
||||
[2026-04-28 07:28:27] [INFO ] [main.c:304] [didactyl] startup checklist [04] Validate admin config: begin
|
||||
[2026-04-28 07:28:27] [INFO ] [main.c:314] [didactyl] startup checklist [04] Validate admin config: ok
|
||||
[2026-04-28 07:28:27] [INFO ] [main.c:304] [didactyl] startup checklist [05] Initialize LLM client: begin
|
||||
[2026-04-28 07:28:27] [INFO ] [main.c:314] [didactyl] startup checklist [05] Initialize LLM client: ok
|
||||
[2026-04-28 07:28:27] [INFO ] [main.c:304] [didactyl] startup checklist [06] Detect first run via kind 10002: begin
|
||||
[2026-04-28 07:28:27] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_3_1777375707", {
|
||||
"kinds": [10002],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 1
|
||||
}]
|
||||
[2026-04-28 07:28:27] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_3_1777375707", {
|
||||
"kinds": [10002],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 1
|
||||
}]
|
||||
[2026-04-28 07:28:27] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=462>
|
||||
[2026-04-28 07:28:27] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=460>
|
||||
[2026-04-28 07:28:27] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_3_1777375707"]
|
||||
[2026-04-28 07:28:27] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_3_1777375707"]
|
||||
[2026-04-28 07:28:27] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_3_1777375707"]
|
||||
[2026-04-28 07:28:27] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_3_1777375707"]
|
||||
[2026-04-28 07:28:27] [INFO ] [main.c:1337] [didactyl] startup phase: first-run detection via kind 10002 => subsequent-run
|
||||
[2026-04-28 07:28:27] [INFO ] [main.c:311] [didactyl] startup checklist [06] Detect first run via kind 10002: ok (subsequent-run)
|
||||
[2026-04-28 07:28:27] [INFO ] [main.c:304] [didactyl] startup checklist [07] Reconcile/persist startup state: begin
|
||||
[2026-04-28 07:28:27] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_4_1777375707", {
|
||||
"kinds": [1],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 1
|
||||
}]
|
||||
[2026-04-28 07:28:27] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_4_1777375707", {
|
||||
"kinds": [1],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 1
|
||||
}]
|
||||
[2026-04-28 07:28:27] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_4_1777375707"]
|
||||
[2026-04-28 07:28:27] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_4_1777375707"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_4_1777375707"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_4_1777375707"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=480>
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:3323] [didactyl] kind 0 event published to wss://relay.damus.io (async, reason=startup_reconcile)
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=0 author=1eb171136dbb1ba6... id=d19395f4a4826b36... created_at=1777375708
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1540] [didactyl] self-skill upsert rejected: kind not in {31123,31124,10123}
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=474>
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:3323] [didactyl] kind 10002 event published to wss://relay.damus.io (async, reason=startup_reconcile)
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=10002 author=1eb171136dbb1ba6... id=1bdbec7b70533806... created_at=1777375708
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1540] [didactyl] self-skill upsert rejected: kind not in {31123,31124,10123}
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=827>
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:3323] [didactyl] kind 31124 event published to wss://relay.damus.io (async, reason=startup_reconcile)
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=31124 author=1eb171136dbb1ba6... id=7ddb16d25587f2d8... created_at=1777375708
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1645] [didactyl] self-skill upsert accepted: new entry added
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=553>
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:3323] [didactyl] kind 10123 event published to wss://relay.damus.io (async, reason=startup_reconcile)
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=10123 author=1eb171136dbb1ba6... id=3940625df170eddc... created_at=1777375708
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1645] [didactyl] self-skill upsert accepted: new entry added
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1657] [didactyl] kind 10123 accepted with 1 'a' tags
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=482>
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:3323] [didactyl] kind 0 event published to wss://relay.primal.net (async, reason=startup_reconcile)
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=0 author=1eb171136dbb1ba6... id=d19395f4a4826b36... created_at=1777375708
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1540] [didactyl] self-skill upsert rejected: kind not in {31123,31124,10123}
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=476>
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:3323] [didactyl] kind 10002 event published to wss://relay.primal.net (async, reason=startup_reconcile)
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=10002 author=1eb171136dbb1ba6... id=1bdbec7b70533806... created_at=1777375708
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1540] [didactyl] self-skill upsert rejected: kind not in {31123,31124,10123}
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=829>
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:3323] [didactyl] kind 31124 event published to wss://relay.primal.net (async, reason=startup_reconcile)
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=31124 author=1eb171136dbb1ba6... id=1ab607d36b07b8a7... created_at=1777375708
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1622] [didactyl] self-skill upsert accepted: replaced existing (old created_at=1777375708)
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=555>
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:3323] [didactyl] kind 10123 event published to wss://relay.primal.net (async, reason=startup_reconcile)
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=10123 author=1eb171136dbb1ba6... id=3940625df170eddc... created_at=1777375708
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1622] [didactyl] self-skill upsert accepted: replaced existing (old created_at=1777375708)
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1634] [didactyl] kind 10123 accepted with 1 'a' tags
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:3664] [didactyl] startup publish detail: kind=0 (profile) -> wss://relay.damus.io, wss://relay.primal.net
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:3664] [didactyl] startup publish detail: kind=10002 (relay_list) -> wss://relay.damus.io, wss://relay.primal.net
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:3664] [didactyl] startup publish detail: kind=31124 (skill) -> wss://relay.damus.io, wss://relay.primal.net
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:3664] [didactyl] startup publish detail: kind=10123 (adoption_list) -> wss://relay.damus.io, wss://relay.primal.net
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:3676] [didactyl] startup publish summary: 4/4 event(s) published to at least one relay; relays used=2/2
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:937] [didactyl] startup phase: skipping user-settings publish because runtime config was recalled from Nostr
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:1361] [didactyl] startup phase: persisted encrypted runtime config to Nostr
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:314] [didactyl] startup checklist [07] Reconcile/persist startup state: ok
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:304] [didactyl] startup checklist [08] Initialize agent: begin
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_5_1777375708", {
|
||||
"kinds": [30078],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"#d": ["memory"],
|
||||
"limit": 1
|
||||
}]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_5_1777375708", {
|
||||
"kinds": [30078],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"#d": ["memory"],
|
||||
"limit": 1
|
||||
}]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["OK","1bdbec7b70533806ccad4e1224cd17aca8dedbc200499dc70687716f08eb6009",true,""]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["OK","1bdbec7b70533806ccad4e1224cd17aca8dedbc200499dc70687716f08eb6009",true,""]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["OK","d19395f4a4826b36b58d3d2c71b993233615df0d613eea7cc6e6b958d8ea6c12",true,""]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["OK","d19395f4a4826b36b58d3d2c71b993233615df0d613eea7cc6e6b958d8ea6c12",true,""]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=824>
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_5_1777375708"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_5_1777375708"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_5_1777375708"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_5_1777375708"]
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:314] [didactyl] startup checklist [08] Initialize agent: ok
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:304] [didactyl] startup checklist [09] Initialize trigger manager: begin
|
||||
[2026-04-28 07:28:28] [INFO ] [trigger_manager.c:935] [didactyl] trigger manager initialized (capacity=16)
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:314] [didactyl] startup checklist [09] Initialize trigger manager: ok
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:1405] [didactyl] startup phase: deferred trigger load will run after self-skill EOSE
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:304] [didactyl] startup checklist [10] Load startup triggers: begin
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:1408] [didactyl] startup phase: startup-config trigger load begin
|
||||
[2026-04-28 07:28:28] [INFO ] [trigger_manager.c:1259] [didactyl] trigger added d_tag=identity_and_rules action=0 enabled=1
|
||||
[2026-04-28 07:28:28] [INFO ] [trigger_manager.c:1142] [didactyl] startup trigger registered d_tag=identity_and_rules action=llm enabled=1
|
||||
[2026-04-28 07:28:28] [INFO ] [trigger_manager.c:1150] [didactyl] trigger manager loaded 1 trigger(s) from startup config (considered=1)
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:1412] [didactyl] startup phase: startup-config trigger load end
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:314] [didactyl] startup checklist [10] Load startup triggers: ok
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:304] [didactyl] startup checklist [11] Discover self relay list via kind 10002: begin
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:383] [didactyl] kind10002 query begin: timeout_ms=5000 author=1eb171136dbb1ba6... relay_count=2
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:390] [didactyl] kind10002 query relay snapshot: {"relay_count":2,"connected_count":2,"relays":[{"url":"wss://relay.damus.io","status":"connected","events_received":0,"events_published":4,"events_published_ok":2,"events_published_failed":0,"ping_latency_current":0,"ping_latency_avg":0,"query_latency_avg":0,"publish_latency_avg":0,"connection_uptime_start":1777375705,"last_event_time":1777375708,"last_connection_error":"Failed to create WebSocket client for relay wss://relay.damus.io"},{"url":"wss://relay.primal.net","status":"connected","events_received":3,"events_published":4,"events_published_ok":2,"events_published_failed":0,"ping_latency_current":0,"ping_latency_avg":0,"query_latency_avg":0,"publish_latency_avg":0,"connection_uptime_start":1777375705,"last_event_time":1777375708}]}
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_6_1777375708", {
|
||||
"kinds": [10002],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 16
|
||||
}]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_6_1777375708", {
|
||||
"kinds": [10002],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 16
|
||||
}]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["OK","7ddb16d25587f2d80a59fd576141a8baec5a30b245969305fbe1628c42e73b2b",false,"rate-limited: you are noting too much"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["OK","1ab607d36b07b8a7f7afc54319e3426754f22f8676829b3c8b7a5e50b21d7222",true,""]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["OK","3940625df170eddc0770d0b334a1759e945d3261af94fa15c21f48fe0e6d5c90",false,"rate-limited: you are noting too much"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["OK","3940625df170eddc0770d0b334a1759e945d3261af94fa15c21f48fe0e6d5c90",true,""]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=462>
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=460>
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_6_1777375708"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_6_1777375708"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_6_1777375708"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_6_1777375708"]
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:410] [didactyl] kind10002 query received event_count=1
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:507] [didactyl] kind10002 query extracted relays=["wss://relay.damus.io","wss://relay.primal.net"]
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:612] [didactyl] kind10002 wait success: relay_count=2
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:614] [didactyl] kind10002 relay[0]=wss://relay.damus.io
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:614] [didactyl] kind10002 relay[1]=wss://relay.primal.net
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:618] [didactyl] kind10002 wait success relay snapshot: {"relay_count":2,"connected_count":2,"relays":[{"url":"wss://relay.damus.io","status":"connected","events_received":0,"events_published":4,"events_published_ok":2,"events_published_failed":2,"ping_latency_current":0,"ping_latency_avg":0,"query_latency_avg":0,"publish_latency_avg":0,"connection_uptime_start":1777375705,"last_event_time":1777375708,"last_publish_error":"rate-limited: you are noting too much","last_connection_error":"Failed to create WebSocket client for relay wss://relay.damus.io"},{"url":"wss://relay.primal.net","status":"connected","events_received":4,"events_published":4,"events_published_ok":4,"events_published_failed":0,"ping_latency_current":0,"ping_latency_avg":0,"query_latency_avg":0,"publish_latency_avg":0,"connection_uptime_start":1777375705,"last_event_time":1777375708}]}
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:311] [didactyl] startup checklist [11] Discover self relay list via kind 10002: ok (kind10002=2 added=0 connected=2/2)
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:304] [didactyl] startup checklist [12] Subscribe admin context: begin
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:1463] [didactyl] startup phase: subscribe admin context begin
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_7_1777375708", {
|
||||
"kinds": [0, 3, 10002],
|
||||
"authors": ["254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"],
|
||||
"limit": 32
|
||||
}]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_7_1777375708", {
|
||||
"kinds": [0, 3, 10002],
|
||||
"authors": ["254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"],
|
||||
"limit": 32
|
||||
}]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_8_1777375708", {
|
||||
"kinds": [1],
|
||||
"authors": ["254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"],
|
||||
"limit": 10
|
||||
}]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_8_1777375708", {
|
||||
"kinds": [1],
|
||||
"authors": ["254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"],
|
||||
"limit": 10
|
||||
}]
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:2703] [didactyl] admin context subscriptions active for admin 254d7a7f68b4443f...
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:1467] [didactyl] startup phase: subscribe admin context end
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:314] [didactyl] startup checklist [12] Subscribe admin context: ok
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:304] [didactyl] startup checklist [13] Subscribe agent self context: begin
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:1471] [didactyl] startup phase: subscribe agent self context begin
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_9_1777375708", {
|
||||
"kinds": [0, 3, 10002],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 64
|
||||
}]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_9_1777375708", {
|
||||
"kinds": [0, 3, 10002],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 64
|
||||
}]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_10_1777375708", {
|
||||
"kinds": [1],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 10
|
||||
}]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_10_1777375708", {
|
||||
"kinds": [1],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 10
|
||||
}]
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:2791] [didactyl] agent self-context subscriptions active for pubkey 1eb171136dbb1ba6...
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:1475] [didactyl] startup phase: subscribe agent self context end
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:314] [didactyl] startup checklist [13] Subscribe agent self context: ok
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:304] [didactyl] startup checklist [14] Subscribe self-skill cache: begin
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:1479] [didactyl] startup phase: subscribe self skill cache begin
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:2827] [didactyl] self-skill subscription filter: {"kinds":[31123,31124,10123],"authors":["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],"limit":300}
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_11_1777375708", {
|
||||
"kinds": [31123, 31124, 10123],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 300
|
||||
}]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_11_1777375708", {
|
||||
"kinds": [31123, 31124, 10123],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 300
|
||||
}]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_12_1777375708", {
|
||||
"kinds": [31123],
|
||||
"authors": ["254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"],
|
||||
"limit": 150
|
||||
}]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_12_1777375708", {
|
||||
"kinds": [31123],
|
||||
"authors": ["254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"],
|
||||
"limit": 150
|
||||
}]
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:2887] [didactyl] self/admin skill subscriptions active (self=1eb171136dbb1ba6..., admin=254d7a7f68b4443f...)
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_7_1777375708"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_7_1777375708"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:2063] [didactyl] DEBUG on_eose called: event_count=0
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_8_1777375708"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_8_1777375708"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:2063] [didactyl] DEBUG on_eose called: event_count=0
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=469>
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=471>
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=460>
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=462>
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_9_1777375708"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_9_1777375708"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:2063] [didactyl] DEBUG on_eose called: event_count=0
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_10_1777375708"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_10_1777375708"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:2063] [didactyl] DEBUG on_eose called: event_count=0
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=816>
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:2500] [didactyl] self-skill cache received kind=31124 d_tag=identity_and_rules id=ecaba96e69d6b3ad9bde94779fbdfdfcbbd112e6a3eb8dbf508859e9a9230b93 created_at=1777375675 via wss://relay.damus.io
|
||||
[2026-04-28 07:28:28] [INFO ] [trigger_manager.c:1485] [didactyl] trigger updated d_tag=identity_and_rules action=0 enabled=1
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1502] [didactyl] live self-skill trigger registered d_tag=identity_and_rules action=llm enabled=1
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=31124 author=1eb171136dbb1ba6... id=ecaba96e69d6b3ad... created_at=1777375675
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1609] [didactyl] self-skill upsert rejected: stale (existing created_at=1777375708 >= new created_at=1777375675)
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=540>
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:2500] [didactyl] self-skill cache received kind=10123 d_tag=- id=3940625df170eddc0770d0b334a1759e945d3261af94fa15c21f48fe0e6d5c90 created_at=1777375708 via wss://relay.primal.net
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=10123 author=1eb171136dbb1ba6... id=3940625df170eddc... created_at=1777375708
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1622] [didactyl] self-skill upsert accepted: replaced existing (old created_at=1777375708)
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1634] [didactyl] kind 10123 accepted with 1 'a' tags
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=538>
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:2500] [didactyl] self-skill cache received kind=10123 d_tag=- id=b1ad6f867a2f34f881f5032b8e8ffe9c1472819822a4c32ba8f566cc2bcfaee6 created_at=1777375675 via wss://relay.damus.io
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=10123 author=1eb171136dbb1ba6... id=b1ad6f867a2f34f8... created_at=1777375675
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1609] [didactyl] self-skill upsert rejected: stale (existing created_at=1777375708 >= new created_at=1777375675)
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=818>
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:2500] [didactyl] self-skill cache received kind=31124 d_tag=identity_and_rules id=1ab607d36b07b8a7f7afc54319e3426754f22f8676829b3c8b7a5e50b21d7222 created_at=1777375708 via wss://relay.primal.net
|
||||
[2026-04-28 07:28:28] [INFO ] [trigger_manager.c:1485] [didactyl] trigger updated d_tag=identity_and_rules action=0 enabled=1
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1502] [didactyl] live self-skill trigger registered d_tag=identity_and_rules action=llm enabled=1
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=31124 author=1eb171136dbb1ba6... id=1ab607d36b07b8a7... created_at=1777375708
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:1622] [didactyl] self-skill upsert accepted: replaced existing (old created_at=1777375708)
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_11_1777375708"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_11_1777375708"]
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:2070] [didactyl] self-skill EOSE received: cached skill events=0
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:47] [didactyl] deferred trigger load begin after self-skill EOSE (event_count=0)
|
||||
[2026-04-28 07:28:28] [INFO ] [trigger_manager.c:1485] [didactyl] trigger updated d_tag=identity_and_rules action=0 enabled=1
|
||||
[2026-04-28 07:28:28] [INFO ] [trigger_manager.c:1039] [didactyl] trigger manager loaded 1 trigger(s) from self skills (considered=1)
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:57] [didactyl] deferred trigger load status: {"success":true,"count":1,"active":1,"triggers":[{"skill_d_tag":"identity_and_rules","filter_json":"{\"from\":\"admin\"}","type":"dm","action":"llm","enabled":true,"subscribed":false,"llm":"","tools":"","has_max_tokens":false,"has_temperature":false,"has_seed":false,"last_fired":0,"last_seen_created_at":0}]}
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:3114] [didactyl] self-skill cache event: kind=31124 d_tag=identity_and_rules id=1ab607d36b07b8a7f7afc54319e3426754f22f8676829b3c8b7a5e50b21d7222 created_at=1777375708
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:3114] [didactyl] self-skill cache event: kind=10123 d_tag=- id=3940625df170eddc0770d0b334a1759e945d3261af94fa15c21f48fe0e6d5c90 created_at=1777375708
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:1546] [didactyl] startup phase: subscribe self skill cache end
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:311] [didactyl] startup checklist [14] Subscribe self-skill cache: ok (skills=1 adoptions=1)
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:304] [didactyl] startup checklist [15] Subscribe DMs: begin
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:1550] [didactyl] startup phase: subscribe DMs begin
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:2905] [didactyl] DM subscribe: dm_protocol=2 need_kind4=1 need_kind1059=1 g_start_time=1777375705
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_13_1777375708", {
|
||||
"kinds": [4],
|
||||
"#p": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"since": 1777375705,
|
||||
"limit": 100
|
||||
}]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_13_1777375708", {
|
||||
"kinds": [4],
|
||||
"#p": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"since": 1777375705,
|
||||
"limit": 100
|
||||
}]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_14_1777375708", {
|
||||
"kinds": [1059],
|
||||
"#p": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 400
|
||||
}]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_14_1777375708", {
|
||||
"kinds": [1059],
|
||||
"#p": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 400
|
||||
}]
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:3000] [didactyl] DM subscription active for pubkey 1eb171136dbb1ba6...
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:3001] [didactyl] DEBUG DM subscription g_start_time=1777375705 now=1777375708 delta=3 relay_count=2
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:1565] [didactyl] startup phase: subscribe DMs end
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:314] [didactyl] startup checklist [15] Subscribe DMs: ok
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:304] [didactyl] startup checklist [16] Subscribe wallet events: begin
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:1569] [didactyl] startup phase: subscribe wallet events begin
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_15_1777375708", {
|
||||
"kinds": [17375, 7375, 5],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"since": 1777375705,
|
||||
"limit": 500
|
||||
}]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_15_1777375708", {
|
||||
"kinds": [17375, 7375, 5],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"since": 1777375705,
|
||||
"limit": 500
|
||||
}]
|
||||
[2026-04-28 07:28:28] [INFO ] [nostr_handler.c:3053] [didactyl] wallet event subscription active for pubkey 1eb171136dbb1ba6...
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:1573] [didactyl] startup phase: subscribe wallet events end
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:314] [didactyl] startup checklist [16] Subscribe wallet events: ok
|
||||
[2026-04-28 07:28:28] [INFO ] [main.c:304] [didactyl] startup checklist [17] Initialize cashu wallet: begin
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_16_1777375708", {
|
||||
"kinds": [17375, 7375],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"]
|
||||
}]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_16_1777375708", {
|
||||
"kinds": [17375, 7375],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"]
|
||||
}]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_12_1777375708"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_12_1777375708"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:2063] [didactyl] DEBUG on_eose called: event_count=0
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_13_1777375708"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_13_1777375708"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:2063] [didactyl] DEBUG on_eose called: event_count=0
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_14_1777375708"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_14_1777375708"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:2063] [didactyl] DEBUG on_eose called: event_count=0
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_15_1777375708"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_15_1777375708"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_16_1777375708"]
|
||||
[2026-04-28 07:28:28] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_16_1777375708"]
|
||||
[2026-04-28 07:28:29] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_16_1777375708"]
|
||||
[2026-04-28 07:28:29] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_16_1777375708"]
|
||||
[2026-04-28 07:28:29] [WARN ] [main.c:1589] [didactyl] startup phase: cashu wallet load/create deferred to first tool call
|
||||
[2026-04-28 07:28:29] [INFO ] [main.c:311] [didactyl] startup checklist [17] Initialize cashu wallet: ok (initialized; load/create deferred)
|
||||
[2026-04-28 07:28:29] [INFO ] [http_api.c:1662] [didactyl] http api listening on http://127.0.0.1:8485
|
||||
[2026-04-28 07:28:29] [INFO ] [main.c:1629] [didactyl] HTTP API listening at http://127.0.0.1:8485
|
||||
[2026-04-28 07:28:29] [INFO ] [main.c:1632] [didactyl] HTTP API endpoints: http://127.0.0.1:8485/api/context/current http://127.0.0.1:8485/api/context/parts
|
||||
[2026-04-28 07:28:29] [TRACE] [nostr_handler.c:1844] [didactyl] sending plaintext DM content: Didactyl Test Agent has started up and is online at 2026-04-28 07:28:29 (version v0.2.48, connected relays: 2/2).
|
||||
[2026-04-28 07:28:29] [TRACE] [nostr_handler.c:1836] [didactyl] sending encrypted DM event: {"pubkey":"1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc","created_at":1777375709,"kind":4,"tags":[["p","254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"]],"content":"HQoPu71Z+V2fjBIgRpwDhDnJjzRc840nyhTNrgx3SpIqnEAueVKmRDeHzZMmaFSBbi9/Q774ZyLE80+XWqLI0OKjIReusdnzOQyZNi7939Fx+jZeTCuJHPKdLHw2gaghM23iPD9/5KdCwTzeXTfwX4jm8qpNGgkieacGigkdzjs=?iv=s3i0OGmiQdnmil6/6vtT4A==","id":"a0da6a4e741285abaec758df98b67b24cf87b4395ce4b13429276711809db95c","sig":"d8721548e9353ad3ca007becc37a8f84bf7426e8f6bfbcf9ba1d18598390af723c447f45f90e63cb6c8d1fac897c051a128293e589e60aad3a47035fa1e417b4"}
|
||||
[2026-04-28 07:28:29] [INFO ] [nostr_handler.c:920] [didactyl] publish DM target relays (2):
|
||||
[2026-04-28 07:28:29] [INFO ] [nostr_handler.c:922] [didactyl] -> wss://relay.damus.io
|
||||
[2026-04-28 07:28:29] [INFO ] [nostr_handler.c:922] [didactyl] -> wss://relay.primal.net
|
||||
[2026-04-28 07:28:29] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=681>
|
||||
[2026-04-28 07:28:29] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=683>
|
||||
[2026-04-28 07:28:29] [INFO ] [nostr_handler.c:3200] [didactyl] kind 4 event published to wss://relay.damus.io (async)
|
||||
[2026-04-28 07:28:29] [INFO ] [nostr_handler.c:3200] [didactyl] kind 4 event published to wss://relay.primal.net (async)
|
||||
[2026-04-28 07:28:29] [INFO ] [nostr_handler.c:3209] [didactyl] sent DM a0da6a4e741285ab... to 254d7a7f68b4443f... via 2 connected relay(s)
|
||||
[2026-04-28 07:28:29] [INFO ] [main.c:311] [didactyl] startup checklist [18] READY: ok (agent online; entering main poll loop)
|
||||
[2026-04-28 07:28:29] [INFO ] [main.c:1668] [didactyl] entering main poll loop
|
||||
[2026-04-28 07:28:29] [INFO ] [main.c:1669] [didactyl] running with pubkey 1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc
|
||||
[2026-04-28 07:28:29] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["OK","a0da6a4e741285abaec758df98b67b24cf87b4395ce4b13429276711809db95c",true,""]
|
||||
[2026-04-28 07:28:29] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["OK","a0da6a4e741285abaec758df98b67b24cf87b4395ce4b13429276711809db95c",false,"rate-limited: you are noting too much"]
|
||||
[2026-04-28 07:28:30] [INFO ] [main.c:1691] [didactyl] shutting down
|
||||
[2026-04-28 07:28:30] [INFO ] [trigger_manager.c:1734] [didactyl] trigger manager cleaned up
|
||||
[2026-04-28 07:28:30] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_7_1777375708"]
|
||||
[2026-04-28 07:28:30] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_7_1777375708"]
|
||||
[2026-04-28 07:28:30] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_8_1777375708"]
|
||||
[2026-04-28 07:28:30] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_8_1777375708"]
|
||||
[2026-04-28 07:28:30] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_9_1777375708"]
|
||||
[2026-04-28 07:28:30] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_9_1777375708"]
|
||||
[2026-04-28 07:28:30] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_10_1777375708"]
|
||||
[2026-04-28 07:28:30] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_10_1777375708"]
|
||||
[2026-04-28 07:28:30] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_11_1777375708"]
|
||||
[2026-04-28 07:28:30] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_11_1777375708"]
|
||||
[2026-04-28 07:28:30] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_12_1777375708"]
|
||||
[2026-04-28 07:28:30] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_12_1777375708"]
|
||||
[2026-04-28 07:28:30] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_13_1777375708"]
|
||||
[2026-04-28 07:28:30] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_13_1777375708"]
|
||||
[2026-04-28 07:28:30] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_14_1777375708"]
|
||||
[2026-04-28 07:28:30] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_14_1777375708"]
|
||||
[2026-04-28 07:28:30] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_15_1777375708"]
|
||||
[2026-04-28 07:28:30] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_15_1777375708"]
|
||||
67
tests/results/20260428T112825Z/results.json
Normal file
67
tests/results/20260428T112825Z/results.json
Normal file
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"run_meta": {
|
||||
"run_timestamp": "2026-04-28T11:28:30.755354+00:00",
|
||||
"base_url": "http://127.0.0.1:8485",
|
||||
"config": "tests/results/20260428T112825Z/runtime_test_genesis.jsonc",
|
||||
"binary": "didactyl",
|
||||
"test_count": 4
|
||||
},
|
||||
"results": [
|
||||
{
|
||||
"suite": "test_health",
|
||||
"name": "status_returns_200",
|
||||
"status": "pass",
|
||||
"message": "status success",
|
||||
"duration_seconds": 0.329037634015549,
|
||||
"agent_errors": [],
|
||||
"details": {
|
||||
"keys": [
|
||||
"success",
|
||||
"name",
|
||||
"version",
|
||||
"pubkey",
|
||||
"relay_count",
|
||||
"connected_relays",
|
||||
"active_triggers"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"suite": "test_health",
|
||||
"name": "status_has_fields",
|
||||
"status": "pass",
|
||||
"message": "required fields present",
|
||||
"duration_seconds": 0.3310440799978096,
|
||||
"agent_errors": [],
|
||||
"details": {}
|
||||
},
|
||||
{
|
||||
"suite": "test_health",
|
||||
"name": "context_current_returns_messages",
|
||||
"status": "pass",
|
||||
"message": "context current ok",
|
||||
"duration_seconds": 0.3324761890107766,
|
||||
"agent_errors": [],
|
||||
"details": {
|
||||
"message_count": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"suite": "test_health",
|
||||
"name": "context_parts_has_system_prompt",
|
||||
"status": "pass",
|
||||
"message": "context parts ok",
|
||||
"duration_seconds": 0.3313834259752184,
|
||||
"agent_errors": [],
|
||||
"details": {
|
||||
"parts": [
|
||||
"system_prompt",
|
||||
"dm_history"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"summary": {
|
||||
"pass": 4
|
||||
}
|
||||
}
|
||||
22
tests/results/20260428T112825Z/results.txt
Normal file
22
tests/results/20260428T112825Z/results.txt
Normal file
@@ -0,0 +1,22 @@
|
||||
== Didactyl Test Results ==
|
||||
Run: 2026-04-28T11:28:30.755354+00:00
|
||||
Agent base URL: http://127.0.0.1:8485
|
||||
|
||||
Pass: 4
|
||||
Fail: 0
|
||||
Error: 0
|
||||
Timeout: 0
|
||||
Skip: 0
|
||||
Total: 4
|
||||
|
||||
[PASS] test_health::status_returns_200 (0.33s)
|
||||
status success
|
||||
|
||||
[PASS] test_health::status_has_fields (0.33s)
|
||||
required fields present
|
||||
|
||||
[PASS] test_health::context_current_returns_messages (0.33s)
|
||||
context current ok
|
||||
|
||||
[PASS] test_health::context_parts_has_system_prompt (0.33s)
|
||||
context parts ok
|
||||
59
tests/results/20260428T112825Z/runtime_test_genesis.jsonc
Normal file
59
tests/results/20260428T112825Z/runtime_test_genesis.jsonc
Normal file
@@ -0,0 +1,59 @@
|
||||
{
|
||||
// TEST CONFIGURATION
|
||||
// Use disposable keys/accounts only.
|
||||
"key": {
|
||||
"nsec": "d3011e59954403fb84729ab0e9fb239ba0f0238b3f353dfb5c08a32f4b3d21a1"
|
||||
},
|
||||
"admin": {
|
||||
"pubkey": "254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"
|
||||
},
|
||||
"llm": {
|
||||
"provider": "https://api.ppq.ai",
|
||||
"api_key": "sk-SBI2Pga0J6n8jpPorHbRHC",
|
||||
"model": "claude-haiku-4.5",
|
||||
"base_url": "https://api.ppq.ai",
|
||||
"max_tokens": 10000,
|
||||
"temperature": 0.7
|
||||
},
|
||||
"api": {
|
||||
"enabled": true,
|
||||
"port": 8485,
|
||||
"bind_address": "127.0.0.1"
|
||||
},
|
||||
"encrypted_events": [
|
||||
{
|
||||
"kind": 30078,
|
||||
"d_tag": "user-settings",
|
||||
"content": "{\"v\":2,\"updatedAt\":0,\"global_llm\":{\"provider\":\"https://api.ppq.ai\",\"api_key\":\"sk-SBI2Pga0J6n8jpPorHbRHC\",\"model\":\"claude-haiku-4.5\",\"base_url\":\"https://api.ppq.ai\",\"max_tokens\":10000,\"temperature\":0.7},\"didactyl\":{\"admin_pubkey\":\"254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac\",\"dm_protocol\":\"both\",\"max_turns\":40}}"
|
||||
}
|
||||
],
|
||||
"startup_events": [
|
||||
{
|
||||
"kind": 0,
|
||||
"content_fields": {
|
||||
"name": "Didactyl Test Agent",
|
||||
"about": "Automated test instance"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
{
|
||||
"kind": 10002,
|
||||
"content": "",
|
||||
"tags": [
|
||||
["r", "wss://relay.damus.io"],
|
||||
["r", "wss://relay.primal.net"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": 31124,
|
||||
"content": "# Test Agent\n\nYou are a test agent. Respond to requests and use tools when needed.",
|
||||
"tags": [
|
||||
["d", "identity_and_rules"],
|
||||
["app", "didactyl"],
|
||||
["scope", "private"],
|
||||
["trigger", "dm"],
|
||||
["filter", "{\"from\":\"admin\"}"]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
421
tests/results/20260428T112851Z/agent_debug.log
Normal file
421
tests/results/20260428T112851Z/agent_debug.log
Normal file
@@ -0,0 +1,421 @@
|
||||
[2026-04-28 07:29:45] [INFO ] [main.c:1103] Didactyl v0.2.48 starting
|
||||
[2026-04-28 07:29:45] [INFO ] [nostr_handler.c:2558] [didactyl] initializing relay pool with 2 relays
|
||||
[2026-04-28 07:29:45] [INFO ] [nostr_handler.c:2582] [didactyl] added relay: wss://relay.damus.io
|
||||
[2026-04-28 07:29:45] [INFO ] [nostr_handler.c:2582] [didactyl] added relay: wss://relay.primal.net
|
||||
[2026-04-28 07:29:46] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_1_1777375785", {
|
||||
"kinds": [10000],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 1
|
||||
}]
|
||||
[2026-04-28 07:29:46] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_1_1777375785", {
|
||||
"kinds": [10000],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 1
|
||||
}]
|
||||
[2026-04-28 07:29:46] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_1_1777375785"]
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_1_1777375785"]
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_1_1777375785"]
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_1_1777375785"]
|
||||
[2026-04-28 07:29:47] [INFO ] [main.c:304] [didactyl] startup checklist [01] Relay connectivity: begin
|
||||
[2026-04-28 07:29:47] [INFO ] [main.c:311] [didactyl] startup checklist [01] Relay connectivity: ok (connected relays: 2/2)
|
||||
[2026-04-28 07:29:47] [INFO ] [main.c:304] [didactyl] startup checklist [02] Recover runtime config from Nostr: begin
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_2_1777375787", {
|
||||
"kinds": [30078],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"#d": ["user-settings"],
|
||||
"limit": 20
|
||||
}]
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_2_1777375787", {
|
||||
"kinds": [30078],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"#d": ["user-settings"],
|
||||
"limit": 20
|
||||
}]
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=1047>
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=1045>
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_2_1777375787"]
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_2_1777375787"]
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_2_1777375787"]
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_2_1777375787"]
|
||||
[2026-04-28 07:29:47] [INFO ] [main.c:1007] [didactyl] startup phase: recovered user-settings from Nostr
|
||||
[2026-04-28 07:29:47] [INFO ] [main.c:311] [didactyl] startup checklist [02] Recover runtime config from Nostr: ok (user-settings recalled)
|
||||
[2026-04-28 07:29:47] [INFO ] [main.c:304] [didactyl] startup checklist [03] Validate LLM config: begin
|
||||
[2026-04-28 07:29:47] [INFO ] [main.c:314] [didactyl] startup checklist [03] Validate LLM config: ok
|
||||
[2026-04-28 07:29:47] [INFO ] [main.c:304] [didactyl] startup checklist [04] Validate admin config: begin
|
||||
[2026-04-28 07:29:47] [INFO ] [main.c:314] [didactyl] startup checklist [04] Validate admin config: ok
|
||||
[2026-04-28 07:29:47] [INFO ] [main.c:304] [didactyl] startup checklist [05] Initialize LLM client: begin
|
||||
[2026-04-28 07:29:47] [INFO ] [main.c:314] [didactyl] startup checklist [05] Initialize LLM client: ok
|
||||
[2026-04-28 07:29:47] [INFO ] [main.c:304] [didactyl] startup checklist [06] Detect first run via kind 10002: begin
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_3_1777375787", {
|
||||
"kinds": [10002],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 1
|
||||
}]
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_3_1777375787", {
|
||||
"kinds": [10002],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 1
|
||||
}]
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=462>
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=460>
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_3_1777375787"]
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_3_1777375787"]
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_3_1777375787"]
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_3_1777375787"]
|
||||
[2026-04-28 07:29:47] [INFO ] [main.c:1337] [didactyl] startup phase: first-run detection via kind 10002 => subsequent-run
|
||||
[2026-04-28 07:29:47] [INFO ] [main.c:311] [didactyl] startup checklist [06] Detect first run via kind 10002: ok (subsequent-run)
|
||||
[2026-04-28 07:29:47] [INFO ] [main.c:304] [didactyl] startup checklist [07] Reconcile/persist startup state: begin
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_4_1777375787", {
|
||||
"kinds": [1],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 1
|
||||
}]
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_4_1777375787", {
|
||||
"kinds": [1],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 1
|
||||
}]
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_4_1777375787"]
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_4_1777375787"]
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_4_1777375787"]
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_4_1777375787"]
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=480>
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:3323] [didactyl] kind 0 event published to wss://relay.damus.io (async, reason=startup_reconcile)
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=0 author=1eb171136dbb1ba6... id=addbd253f977c8de... created_at=1777375787
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:1540] [didactyl] self-skill upsert rejected: kind not in {31123,31124,10123}
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=474>
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:3323] [didactyl] kind 10002 event published to wss://relay.damus.io (async, reason=startup_reconcile)
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=10002 author=1eb171136dbb1ba6... id=ff65d5864097fe6c... created_at=1777375787
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:1540] [didactyl] self-skill upsert rejected: kind not in {31123,31124,10123}
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=827>
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:3323] [didactyl] kind 31124 event published to wss://relay.damus.io (async, reason=startup_reconcile)
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=31124 author=1eb171136dbb1ba6... id=78b0aaddaf99b7dc... created_at=1777375787
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:1645] [didactyl] self-skill upsert accepted: new entry added
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=553>
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:3323] [didactyl] kind 10123 event published to wss://relay.damus.io (async, reason=startup_reconcile)
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=10123 author=1eb171136dbb1ba6... id=dc138a7c573943b8... created_at=1777375787
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:1645] [didactyl] self-skill upsert accepted: new entry added
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:1657] [didactyl] kind 10123 accepted with 1 'a' tags
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=482>
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:3323] [didactyl] kind 0 event published to wss://relay.primal.net (async, reason=startup_reconcile)
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=0 author=1eb171136dbb1ba6... id=addbd253f977c8de... created_at=1777375787
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:1540] [didactyl] self-skill upsert rejected: kind not in {31123,31124,10123}
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=476>
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:3323] [didactyl] kind 10002 event published to wss://relay.primal.net (async, reason=startup_reconcile)
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=10002 author=1eb171136dbb1ba6... id=ff65d5864097fe6c... created_at=1777375787
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:1540] [didactyl] self-skill upsert rejected: kind not in {31123,31124,10123}
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=829>
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:3323] [didactyl] kind 31124 event published to wss://relay.primal.net (async, reason=startup_reconcile)
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=31124 author=1eb171136dbb1ba6... id=63ffd51f9c14691d... created_at=1777375787
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:1622] [didactyl] self-skill upsert accepted: replaced existing (old created_at=1777375787)
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=555>
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:3323] [didactyl] kind 10123 event published to wss://relay.primal.net (async, reason=startup_reconcile)
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=10123 author=1eb171136dbb1ba6... id=dc138a7c573943b8... created_at=1777375787
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:1622] [didactyl] self-skill upsert accepted: replaced existing (old created_at=1777375787)
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:1634] [didactyl] kind 10123 accepted with 1 'a' tags
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:3664] [didactyl] startup publish detail: kind=0 (profile) -> wss://relay.damus.io, wss://relay.primal.net
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:3664] [didactyl] startup publish detail: kind=10002 (relay_list) -> wss://relay.damus.io, wss://relay.primal.net
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:3664] [didactyl] startup publish detail: kind=31124 (skill) -> wss://relay.damus.io, wss://relay.primal.net
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:3664] [didactyl] startup publish detail: kind=10123 (adoption_list) -> wss://relay.damus.io, wss://relay.primal.net
|
||||
[2026-04-28 07:29:47] [INFO ] [nostr_handler.c:3676] [didactyl] startup publish summary: 4/4 event(s) published to at least one relay; relays used=2/2
|
||||
[2026-04-28 07:29:47] [INFO ] [main.c:937] [didactyl] startup phase: skipping user-settings publish because runtime config was recalled from Nostr
|
||||
[2026-04-28 07:29:47] [INFO ] [main.c:1361] [didactyl] startup phase: persisted encrypted runtime config to Nostr
|
||||
[2026-04-28 07:29:47] [INFO ] [main.c:314] [didactyl] startup checklist [07] Reconcile/persist startup state: ok
|
||||
[2026-04-28 07:29:47] [INFO ] [main.c:304] [didactyl] startup checklist [08] Initialize agent: begin
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_5_1777375787", {
|
||||
"kinds": [30078],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"#d": ["memory"],
|
||||
"limit": 1
|
||||
}]
|
||||
[2026-04-28 07:29:47] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_5_1777375787", {
|
||||
"kinds": [30078],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"#d": ["memory"],
|
||||
"limit": 1
|
||||
}]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=824>
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["OK","addbd253f977c8de882830e3029a78eea0ffa736bbfbeaecae7c5ac65fb9a2ec",true,""]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_5_1777375787"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["OK","ff65d5864097fe6cbffd211784f62ce93e67bad0ff5a6032a1fc8488b227009a",true,""]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["OK","63ffd51f9c14691d8496ed68da75fdad71a6bd6f6a5669d023fd8dc0ad6771af",true,""]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_5_1777375787"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["OK","addbd253f977c8de882830e3029a78eea0ffa736bbfbeaecae7c5ac65fb9a2ec",true,""]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_5_1777375787"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_5_1777375787"]
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:314] [didactyl] startup checklist [08] Initialize agent: ok
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:304] [didactyl] startup checklist [09] Initialize trigger manager: begin
|
||||
[2026-04-28 07:29:48] [INFO ] [trigger_manager.c:935] [didactyl] trigger manager initialized (capacity=16)
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:314] [didactyl] startup checklist [09] Initialize trigger manager: ok
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:1405] [didactyl] startup phase: deferred trigger load will run after self-skill EOSE
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:304] [didactyl] startup checklist [10] Load startup triggers: begin
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:1408] [didactyl] startup phase: startup-config trigger load begin
|
||||
[2026-04-28 07:29:48] [INFO ] [trigger_manager.c:1259] [didactyl] trigger added d_tag=identity_and_rules action=0 enabled=1
|
||||
[2026-04-28 07:29:48] [INFO ] [trigger_manager.c:1142] [didactyl] startup trigger registered d_tag=identity_and_rules action=llm enabled=1
|
||||
[2026-04-28 07:29:48] [INFO ] [trigger_manager.c:1150] [didactyl] trigger manager loaded 1 trigger(s) from startup config (considered=1)
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:1412] [didactyl] startup phase: startup-config trigger load end
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:314] [didactyl] startup checklist [10] Load startup triggers: ok
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:304] [didactyl] startup checklist [11] Discover self relay list via kind 10002: begin
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:383] [didactyl] kind10002 query begin: timeout_ms=5000 author=1eb171136dbb1ba6... relay_count=2
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:390] [didactyl] kind10002 query relay snapshot: {"relay_count":2,"connected_count":2,"relays":[{"url":"wss://relay.damus.io","status":"connected","events_received":1,"events_published":4,"events_published_ok":2,"events_published_failed":0,"ping_latency_current":0,"ping_latency_avg":0,"query_latency_avg":0,"publish_latency_avg":0,"connection_uptime_start":1777375785,"last_event_time":1777375788},{"url":"wss://relay.primal.net","status":"connected","events_received":3,"events_published":4,"events_published_ok":2,"events_published_failed":0,"ping_latency_current":0,"ping_latency_avg":0,"query_latency_avg":0,"publish_latency_avg":0,"connection_uptime_start":1777375785,"last_event_time":1777375788}]}
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_6_1777375788", {
|
||||
"kinds": [10002],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 16
|
||||
}]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_6_1777375788", {
|
||||
"kinds": [10002],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 16
|
||||
}]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["OK","78b0aaddaf99b7dc66a8094c036551a416542ef87e7701ef53a4efbfe5f2d85d",true,""]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["OK","dc138a7c573943b81100e3d41471840a3bfa6bc662809fc30b47af87276aa54b",true,""]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["OK","dc138a7c573943b81100e3d41471840a3bfa6bc662809fc30b47af87276aa54b",true,""]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["OK","ff65d5864097fe6cbffd211784f62ce93e67bad0ff5a6032a1fc8488b227009a",true,""]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=462>
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=460>
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_6_1777375788"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_6_1777375788"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_6_1777375788"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_6_1777375788"]
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:410] [didactyl] kind10002 query received event_count=1
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:507] [didactyl] kind10002 query extracted relays=["wss://relay.damus.io","wss://relay.primal.net"]
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:612] [didactyl] kind10002 wait success: relay_count=2
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:614] [didactyl] kind10002 relay[0]=wss://relay.damus.io
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:614] [didactyl] kind10002 relay[1]=wss://relay.primal.net
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:618] [didactyl] kind10002 wait success relay snapshot: {"relay_count":2,"connected_count":2,"relays":[{"url":"wss://relay.damus.io","status":"connected","events_received":1,"events_published":4,"events_published_ok":4,"events_published_failed":0,"ping_latency_current":0,"ping_latency_avg":0,"query_latency_avg":0,"publish_latency_avg":0,"connection_uptime_start":1777375785,"last_event_time":1777375788},{"url":"wss://relay.primal.net","status":"connected","events_received":4,"events_published":4,"events_published_ok":4,"events_published_failed":0,"ping_latency_current":0,"ping_latency_avg":0,"query_latency_avg":0,"publish_latency_avg":0,"connection_uptime_start":1777375785,"last_event_time":1777375788}]}
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:311] [didactyl] startup checklist [11] Discover self relay list via kind 10002: ok (kind10002=2 added=0 connected=2/2)
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:304] [didactyl] startup checklist [12] Subscribe admin context: begin
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:1463] [didactyl] startup phase: subscribe admin context begin
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_7_1777375788", {
|
||||
"kinds": [0, 3, 10002],
|
||||
"authors": ["254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"],
|
||||
"limit": 32
|
||||
}]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_7_1777375788", {
|
||||
"kinds": [0, 3, 10002],
|
||||
"authors": ["254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"],
|
||||
"limit": 32
|
||||
}]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_8_1777375788", {
|
||||
"kinds": [1],
|
||||
"authors": ["254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"],
|
||||
"limit": 10
|
||||
}]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_8_1777375788", {
|
||||
"kinds": [1],
|
||||
"authors": ["254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"],
|
||||
"limit": 10
|
||||
}]
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:2703] [didactyl] admin context subscriptions active for admin 254d7a7f68b4443f...
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:1467] [didactyl] startup phase: subscribe admin context end
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:314] [didactyl] startup checklist [12] Subscribe admin context: ok
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:304] [didactyl] startup checklist [13] Subscribe agent self context: begin
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:1471] [didactyl] startup phase: subscribe agent self context begin
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_9_1777375788", {
|
||||
"kinds": [0, 3, 10002],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 64
|
||||
}]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_9_1777375788", {
|
||||
"kinds": [0, 3, 10002],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 64
|
||||
}]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_10_1777375788", {
|
||||
"kinds": [1],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 10
|
||||
}]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_10_1777375788", {
|
||||
"kinds": [1],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 10
|
||||
}]
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:2791] [didactyl] agent self-context subscriptions active for pubkey 1eb171136dbb1ba6...
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:1475] [didactyl] startup phase: subscribe agent self context end
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:314] [didactyl] startup checklist [13] Subscribe agent self context: ok
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:304] [didactyl] startup checklist [14] Subscribe self-skill cache: begin
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:1479] [didactyl] startup phase: subscribe self skill cache begin
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:2827] [didactyl] self-skill subscription filter: {"kinds":[31123,31124,10123],"authors":["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],"limit":300}
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_11_1777375788", {
|
||||
"kinds": [31123, 31124, 10123],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 300
|
||||
}]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_11_1777375788", {
|
||||
"kinds": [31123, 31124, 10123],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 300
|
||||
}]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_12_1777375788", {
|
||||
"kinds": [31123],
|
||||
"authors": ["254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"],
|
||||
"limit": 150
|
||||
}]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_12_1777375788", {
|
||||
"kinds": [31123],
|
||||
"authors": ["254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"],
|
||||
"limit": 150
|
||||
}]
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:2887] [didactyl] self/admin skill subscriptions active (self=1eb171136dbb1ba6..., admin=254d7a7f68b4443f...)
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_7_1777375788"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_7_1777375788"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:2063] [didactyl] DEBUG on_eose called: event_count=0
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_8_1777375788"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_8_1777375788"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:2063] [didactyl] DEBUG on_eose called: event_count=0
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=460>
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=462>
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=469>
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=471>
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_9_1777375788"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_9_1777375788"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:2063] [didactyl] DEBUG on_eose called: event_count=0
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_10_1777375788"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_10_1777375788"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:2063] [didactyl] DEBUG on_eose called: event_count=0
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=538>
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:2500] [didactyl] self-skill cache received kind=10123 d_tag=- id=dc138a7c573943b81100e3d41471840a3bfa6bc662809fc30b47af87276aa54b created_at=1777375787 via wss://relay.damus.io
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=10123 author=1eb171136dbb1ba6... id=dc138a7c573943b8... created_at=1777375787
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:1622] [didactyl] self-skill upsert accepted: replaced existing (old created_at=1777375787)
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:1634] [didactyl] kind 10123 accepted with 1 'a' tags
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=540>
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:2500] [didactyl] self-skill cache received kind=10123 d_tag=- id=dc138a7c573943b81100e3d41471840a3bfa6bc662809fc30b47af87276aa54b created_at=1777375787 via wss://relay.primal.net
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=10123 author=1eb171136dbb1ba6... id=dc138a7c573943b8... created_at=1777375787
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:1622] [didactyl] self-skill upsert accepted: replaced existing (old created_at=1777375787)
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:1634] [didactyl] kind 10123 accepted with 1 'a' tags
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=816>
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:2500] [didactyl] self-skill cache received kind=31124 d_tag=identity_and_rules id=78b0aaddaf99b7dc66a8094c036551a416542ef87e7701ef53a4efbfe5f2d85d created_at=1777375787 via wss://relay.damus.io
|
||||
[2026-04-28 07:29:48] [INFO ] [trigger_manager.c:1485] [didactyl] trigger updated d_tag=identity_and_rules action=0 enabled=1
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:1502] [didactyl] live self-skill trigger registered d_tag=identity_and_rules action=llm enabled=1
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=31124 author=1eb171136dbb1ba6... id=78b0aaddaf99b7dc... created_at=1777375787
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:1622] [didactyl] self-skill upsert accepted: replaced existing (old created_at=1777375787)
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] RECV <large EVENT frame suppressed, bytes=818>
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:2500] [didactyl] self-skill cache received kind=31124 d_tag=identity_and_rules id=63ffd51f9c14691d8496ed68da75fdad71a6bd6f6a5669d023fd8dc0ad6771af created_at=1777375787 via wss://relay.primal.net
|
||||
[2026-04-28 07:29:48] [INFO ] [trigger_manager.c:1485] [didactyl] trigger updated d_tag=identity_and_rules action=0 enabled=1
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:1502] [didactyl] live self-skill trigger registered d_tag=identity_and_rules action=llm enabled=1
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:1526] [didactyl] self-skill upsert candidate: kind=31124 author=1eb171136dbb1ba6... id=63ffd51f9c14691d... created_at=1777375787
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:1622] [didactyl] self-skill upsert accepted: replaced existing (old created_at=1777375787)
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_11_1777375788"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_11_1777375788"]
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:2070] [didactyl] self-skill EOSE received: cached skill events=0
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:47] [didactyl] deferred trigger load begin after self-skill EOSE (event_count=0)
|
||||
[2026-04-28 07:29:48] [INFO ] [trigger_manager.c:1485] [didactyl] trigger updated d_tag=identity_and_rules action=0 enabled=1
|
||||
[2026-04-28 07:29:48] [INFO ] [trigger_manager.c:1039] [didactyl] trigger manager loaded 1 trigger(s) from self skills (considered=1)
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:57] [didactyl] deferred trigger load status: {"success":true,"count":1,"active":1,"triggers":[{"skill_d_tag":"identity_and_rules","filter_json":"{\"from\":\"admin\"}","type":"dm","action":"llm","enabled":true,"subscribed":false,"llm":"","tools":"","has_max_tokens":false,"has_temperature":false,"has_seed":false,"last_fired":0,"last_seen_created_at":0}]}
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:3114] [didactyl] self-skill cache event: kind=31124 d_tag=identity_and_rules id=63ffd51f9c14691d8496ed68da75fdad71a6bd6f6a5669d023fd8dc0ad6771af created_at=1777375787
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:3114] [didactyl] self-skill cache event: kind=10123 d_tag=- id=dc138a7c573943b81100e3d41471840a3bfa6bc662809fc30b47af87276aa54b created_at=1777375787
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:1546] [didactyl] startup phase: subscribe self skill cache end
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:311] [didactyl] startup checklist [14] Subscribe self-skill cache: ok (skills=1 adoptions=1)
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:304] [didactyl] startup checklist [15] Subscribe DMs: begin
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:1550] [didactyl] startup phase: subscribe DMs begin
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:2905] [didactyl] DM subscribe: dm_protocol=2 need_kind4=1 need_kind1059=1 g_start_time=1777375785
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_13_1777375788", {
|
||||
"kinds": [4],
|
||||
"#p": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"since": 1777375785,
|
||||
"limit": 100
|
||||
}]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_13_1777375788", {
|
||||
"kinds": [4],
|
||||
"#p": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"since": 1777375785,
|
||||
"limit": 100
|
||||
}]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_14_1777375788", {
|
||||
"kinds": [1059],
|
||||
"#p": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 400
|
||||
}]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_14_1777375788", {
|
||||
"kinds": [1059],
|
||||
"#p": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"limit": 400
|
||||
}]
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:3000] [didactyl] DM subscription active for pubkey 1eb171136dbb1ba6...
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:3001] [didactyl] DEBUG DM subscription g_start_time=1777375785 now=1777375788 delta=3 relay_count=2
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:1565] [didactyl] startup phase: subscribe DMs end
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:314] [didactyl] startup checklist [15] Subscribe DMs: ok
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:304] [didactyl] startup checklist [16] Subscribe wallet events: begin
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:1569] [didactyl] startup phase: subscribe wallet events begin
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_15_1777375788", {
|
||||
"kinds": [17375, 7375, 5],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"since": 1777375785,
|
||||
"limit": 500
|
||||
}]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_15_1777375788", {
|
||||
"kinds": [17375, 7375, 5],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"],
|
||||
"since": 1777375785,
|
||||
"limit": 500
|
||||
}]
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:3053] [didactyl] wallet event subscription active for pubkey 1eb171136dbb1ba6...
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:1573] [didactyl] startup phase: subscribe wallet events end
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:314] [didactyl] startup checklist [16] Subscribe wallet events: ok
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:304] [didactyl] startup checklist [17] Initialize cashu wallet: begin
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["REQ", "pool_16_1777375788", {
|
||||
"kinds": [17375, 7375],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"]
|
||||
}]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["REQ", "pool_16_1777375788", {
|
||||
"kinds": [17375, 7375],
|
||||
"authors": ["1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc"]
|
||||
}]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_12_1777375788"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_12_1777375788"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:2063] [didactyl] DEBUG on_eose called: event_count=0
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_13_1777375788"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_13_1777375788"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:2063] [didactyl] DEBUG on_eose called: event_count=0
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_14_1777375788"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_14_1777375788"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:2063] [didactyl] DEBUG on_eose called: event_count=0
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_15_1777375788"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_15_1777375788"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["EOSE","pool_16_1777375788"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["EOSE","pool_16_1777375788"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_16_1777375788"]
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_16_1777375788"]
|
||||
[2026-04-28 07:29:48] [WARN ] [main.c:1589] [didactyl] startup phase: cashu wallet load/create deferred to first tool call
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:311] [didactyl] startup checklist [17] Initialize cashu wallet: ok (initialized; load/create deferred)
|
||||
[2026-04-28 07:29:48] [INFO ] [http_api.c:1662] [didactyl] http api listening on http://127.0.0.1:8491
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:1629] [didactyl] HTTP API listening at http://127.0.0.1:8491
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:1632] [didactyl] HTTP API endpoints: http://127.0.0.1:8491/api/context/current http://127.0.0.1:8491/api/context/parts
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:1844] [didactyl] sending plaintext DM content: Didactyl Test Agent has started up and is online at 2026-04-28 07:29:48 (version v0.2.48, connected relays: 2/2).
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:1836] [didactyl] sending encrypted DM event: {"pubkey":"1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc","created_at":1777375788,"kind":4,"tags":[["p","254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"]],"content":"LFGqdsk1HPY08BtLcfL6tfxlVqeG7laUblZvMP2ailVXIf8bOJPtjI+tZQnQTQp1uRhsxDDFfKZCaPaXB8KHwfjLMWiDdqU1TAFginaVtzmaR17KVPY3p3+id+gwjbNhdPVIHx+jBqAf54ER/H3wB8gyg35o1D4o3UH6fhPIvPM=?iv=69XXqTTdJgGC48Ivw3NUgw==","id":"4d4b2b6f443460a14310cf37d239f9c6ffb49499029fe5c32508278e5ce9367c","sig":"373445bfd668a547d25f59929f9dd1a624847ecdce579b430f4814926afb0d48ce42397a227cece59386bf6e5011132c2130c3aa397ce2cdb14b9614e6514c50"}
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:920] [didactyl] publish DM target relays (2):
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:922] [didactyl] -> wss://relay.damus.io
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:922] [didactyl] -> wss://relay.primal.net
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=681>
|
||||
[2026-04-28 07:29:48] [TRACE] [nostr_handler.c:176] [didactyl] [nostr:websocket] SEND <large EVENT frame suppressed, bytes=683>
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:3200] [didactyl] kind 4 event published to wss://relay.damus.io (async)
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:3200] [didactyl] kind 4 event published to wss://relay.primal.net (async)
|
||||
[2026-04-28 07:29:48] [INFO ] [nostr_handler.c:3209] [didactyl] sent DM 4d4b2b6f443460a1... to 254d7a7f68b4443f... via 2 connected relay(s)
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:311] [didactyl] startup checklist [18] READY: ok (agent online; entering main poll loop)
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:1668] [didactyl] entering main poll loop
|
||||
[2026-04-28 07:29:48] [INFO ] [main.c:1669] [didactyl] running with pubkey 1eb171136dbb1ba695b2f14296adfe88a1f81d4220cc7d186b0e139b8ce0cdbc
|
||||
[2026-04-28 07:29:49] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.primal.net:443: ["OK","4d4b2b6f443460a14310cf37d239f9c6ffb49499029fe5c32508278e5ce9367c",true,""]
|
||||
[2026-04-28 07:29:49] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] RECV relay.damus.io:443: ["OK","4d4b2b6f443460a14310cf37d239f9c6ffb49499029fe5c32508278e5ce9367c",false,"rate-limited: you are noting too much"]
|
||||
[2026-04-28 07:29:49] [INFO ] [llm.c:125] [didactyl] llm request: method=POST url=https://api.ppq.ai/chat/completions body_bytes=50875 body_preview={"model":"claude-haiku-4.5","max_tokens":10000,"temperature":0.7,"messages":[{"role":"system","content":"# Didactyl Agent\n\n## Test Agent\n\nYou are a test agent. Respond to requests and use tools when needed."},{"role":"user","content":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
|
||||
[2026-04-28 07:29:54] [INFO ] [main.c:1691] [didactyl] shutting down
|
||||
[2026-04-28 07:29:54] [INFO ] [trigger_manager.c:1734] [didactyl] trigger manager cleaned up
|
||||
[2026-04-28 07:29:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_7_1777375788"]
|
||||
[2026-04-28 07:29:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_7_1777375788"]
|
||||
[2026-04-28 07:29:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_8_1777375788"]
|
||||
[2026-04-28 07:29:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_8_1777375788"]
|
||||
[2026-04-28 07:29:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_9_1777375788"]
|
||||
[2026-04-28 07:29:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_9_1777375788"]
|
||||
[2026-04-28 07:29:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_10_1777375788"]
|
||||
[2026-04-28 07:29:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_10_1777375788"]
|
||||
[2026-04-28 07:29:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_11_1777375788"]
|
||||
[2026-04-28 07:29:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_11_1777375788"]
|
||||
[2026-04-28 07:29:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_12_1777375788"]
|
||||
[2026-04-28 07:29:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_12_1777375788"]
|
||||
[2026-04-28 07:29:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_13_1777375788"]
|
||||
[2026-04-28 07:29:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_13_1777375788"]
|
||||
[2026-04-28 07:29:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_14_1777375788"]
|
||||
[2026-04-28 07:29:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_14_1777375788"]
|
||||
[2026-04-28 07:29:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.damus.io:443: ["CLOSE", "pool_15_1777375788"]
|
||||
[2026-04-28 07:29:54] [TRACE] [nostr_handler.c:183] [didactyl] [nostr:websocket] SEND relay.primal.net:443: ["CLOSE", "pool_15_1777375788"]
|
||||
57
tests/results/20260428T112851Z/results.json
Normal file
57
tests/results/20260428T112851Z/results.json
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"run_meta": {
|
||||
"run_timestamp": "2026-04-28T11:29:54.142514+00:00",
|
||||
"base_url": "http://127.0.0.1:8491",
|
||||
"config": "tests/results/20260428T112851Z/runtime_test_genesis.jsonc",
|
||||
"binary": "didactyl",
|
||||
"test_count": 4
|
||||
},
|
||||
"results": [
|
||||
{
|
||||
"suite": "test_conversation",
|
||||
"name": "simple_greeting",
|
||||
"status": "pass",
|
||||
"message": "greeting response ok",
|
||||
"duration_seconds": 4.47363213999779,
|
||||
"agent_errors": [],
|
||||
"details": {
|
||||
"response": "Hello! I'm a Didactyl Agent - a test agent designed to help you with various tasks. I can assist with things like:\n\n- **Nostr protocol operations** (posting, querying events, managing profiles, etc.)\n"
|
||||
}
|
||||
},
|
||||
{
|
||||
"suite": "test_conversation",
|
||||
"name": "agent_responds_about_itself",
|
||||
"status": "pass",
|
||||
"message": "self description ok",
|
||||
"duration_seconds": 5.864955286990153,
|
||||
"agent_errors": [],
|
||||
"details": {
|
||||
"response": "i'm **didactyl**, a nostr-native ai agent. here's what i do:\n\n**core identity:**\n- i'm an autonomous agent running on the nostr protocol, designed to interact with decentralized networks and handle bo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"suite": "test_conversation",
|
||||
"name": "empty_message_handling",
|
||||
"status": "timeout",
|
||||
"message": "timed out",
|
||||
"duration_seconds": 43.47824207498343,
|
||||
"agent_errors": [],
|
||||
"details": {}
|
||||
},
|
||||
{
|
||||
"suite": "test_conversation",
|
||||
"name": "very_long_message",
|
||||
"status": "pass",
|
||||
"message": "long message handled",
|
||||
"duration_seconds": 4.959190360998036,
|
||||
"agent_errors": [],
|
||||
"details": {
|
||||
"success": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"summary": {
|
||||
"pass": 3,
|
||||
"timeout": 1
|
||||
}
|
||||
}
|
||||
22
tests/results/20260428T112851Z/results.txt
Normal file
22
tests/results/20260428T112851Z/results.txt
Normal file
@@ -0,0 +1,22 @@
|
||||
== Didactyl Test Results ==
|
||||
Run: 2026-04-28T11:29:54.142514+00:00
|
||||
Agent base URL: http://127.0.0.1:8491
|
||||
|
||||
Pass: 3
|
||||
Fail: 0
|
||||
Error: 0
|
||||
Timeout: 1
|
||||
Skip: 0
|
||||
Total: 4
|
||||
|
||||
[PASS] test_conversation::simple_greeting (4.47s)
|
||||
greeting response ok
|
||||
|
||||
[PASS] test_conversation::agent_responds_about_itself (5.86s)
|
||||
self description ok
|
||||
|
||||
[TIMEOUT] test_conversation::empty_message_handling (43.48s)
|
||||
timed out
|
||||
|
||||
[PASS] test_conversation::very_long_message (4.96s)
|
||||
long message handled
|
||||
59
tests/results/20260428T112851Z/runtime_test_genesis.jsonc
Normal file
59
tests/results/20260428T112851Z/runtime_test_genesis.jsonc
Normal file
@@ -0,0 +1,59 @@
|
||||
{
|
||||
// TEST CONFIGURATION
|
||||
// Use disposable keys/accounts only.
|
||||
"key": {
|
||||
"nsec": "d3011e59954403fb84729ab0e9fb239ba0f0238b3f353dfb5c08a32f4b3d21a1"
|
||||
},
|
||||
"admin": {
|
||||
"pubkey": "254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac"
|
||||
},
|
||||
"llm": {
|
||||
"provider": "https://api.ppq.ai",
|
||||
"api_key": "sk-SBI2Pga0J6n8jpPorHbRHC",
|
||||
"model": "claude-haiku-4.5",
|
||||
"base_url": "https://api.ppq.ai",
|
||||
"max_tokens": 10000,
|
||||
"temperature": 0.7
|
||||
},
|
||||
"api": {
|
||||
"enabled": true,
|
||||
"port": 8485,
|
||||
"bind_address": "127.0.0.1"
|
||||
},
|
||||
"encrypted_events": [
|
||||
{
|
||||
"kind": 30078,
|
||||
"d_tag": "user-settings",
|
||||
"content": "{\"v\":2,\"updatedAt\":0,\"global_llm\":{\"provider\":\"https://api.ppq.ai\",\"api_key\":\"sk-SBI2Pga0J6n8jpPorHbRHC\",\"model\":\"claude-haiku-4.5\",\"base_url\":\"https://api.ppq.ai\",\"max_tokens\":10000,\"temperature\":0.7},\"didactyl\":{\"admin_pubkey\":\"254d7a7f68b4443f5430564eb3a726f09aea57d27e75ab2b8ef57176f9ca3dac\",\"dm_protocol\":\"both\",\"max_turns\":40}}"
|
||||
}
|
||||
],
|
||||
"startup_events": [
|
||||
{
|
||||
"kind": 0,
|
||||
"content_fields": {
|
||||
"name": "Didactyl Test Agent",
|
||||
"about": "Automated test instance"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
{
|
||||
"kind": 10002,
|
||||
"content": "",
|
||||
"tags": [
|
||||
["r", "wss://relay.damus.io"],
|
||||
["r", "wss://relay.primal.net"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": 31124,
|
||||
"content": "# Test Agent\n\nYou are a test agent. Respond to requests and use tools when needed.",
|
||||
"tags": [
|
||||
["d", "identity_and_rules"],
|
||||
["app", "didactyl"],
|
||||
["scope", "private"],
|
||||
["trigger", "dm"],
|
||||
["filter", "{\"from\":\"admin\"}"]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user