suzi-cli 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,13 +21,18 @@ description: >
21
21
 
22
22
  | User asks about... | Run this command |
23
23
  |---------------------|-----------------|
24
- | Available protocols / actions | \`suzi list-tools --verbose\` |
25
- | Actions for a specific protocol | \`suzi list-tools --protocol <name>\` |
24
+ | Available protocols / actions | \`suzi list-actions --verbose\` |
25
+ | Actions for a specific protocol | \`suzi list-actions --protocol <name>\` |
26
+ | Action schema (parameters + response) | \`suzi list-actions --protocol <name> --schema <action>\` |
26
27
  | Available triggers | \`suzi list-triggers\` |
27
28
  | Triggers for a specific protocol | \`suzi list-triggers --protocol <name>\` |
28
29
  | Their agents | \`suzi agents\` |
29
30
  | Agent details / triggers / config | \`suzi agents view <id>\` |
30
31
  | Agent logs | \`suzi agents logs <id>\` |
32
+ | Debugging agent issues | \`suzi debug logs <id>\` |
33
+ | Agent execution history | \`suzi debug runs <id>\` |
34
+ | Failed action details | \`suzi debug executions <id> --status failed\` |
35
+ | Database-level agent logs | \`suzi debug db-logs <id>\` |
31
36
  | Wallet addresses | \`suzi accounts show\` |
32
37
  | Balances | \`suzi portfolio\` |
33
38
  | Portfolio | \`suzi portfolio\` |
@@ -131,6 +136,33 @@ suzi deploy --activate # Activate immediately after deployment
131
136
  suzi deploy --update <agentId> # Update existing agent's code
132
137
  \`\`\`
133
138
 
139
+ ### Debugging
140
+
141
+ \`\`\`bash
142
+ suzi debug logs <agentId> # View Datadog logs for an agent (last 1h)
143
+ suzi debug logs <agentId> --status error # Filter by log level: error, warn, info, debug
144
+ suzi debug logs <agentId> --time-range now-1d # Lookback: now-15m, now-1h, now-1d
145
+ suzi debug logs <agentId> --limit 100 # Max results (default: 25, max: 1000)
146
+ suzi debug logs <agentId> --query "@http.status_code:500" # Append raw Datadog query
147
+
148
+ suzi debug aggregate <agentId> # Aggregate Datadog logs (counts)
149
+ suzi debug aggregate <agentId> --group-by status # Group by: status, host, service
150
+ suzi debug aggregate <agentId> --time-range now-1d
151
+
152
+ suzi debug db-logs <agentId> # View agent logs from database
153
+ suzi debug db-logs <agentId> --level error # Filter: info, warn, error, debug
154
+ suzi debug db-logs <agentId> --run-id <id> # Filter by specific run
155
+ suzi debug db-logs <agentId> --limit 50 # Page size (default: 50)
156
+ suzi debug db-logs <agentId> --cursor <c> # Pagination cursor from previous response
157
+
158
+ suzi debug executions <agentId> # View action executions from database
159
+ suzi debug executions <agentId> --status failed # Filter: running, completed, failed
160
+ suzi debug executions <agentId> --run-id <id>
161
+
162
+ suzi debug runs <agentId> # View agent runs from database
163
+ suzi debug runs <agentId> --status failed # Filter: running, completed, failed
164
+ \`\`\`
165
+
134
166
  ### Sharing & Import
135
167
 
136
168
  \`\`\`bash
@@ -157,17 +189,33 @@ suzi tx-confirm <agentId> [executionId] # Show execution details and parsed inpu
157
189
  ### Tools & Triggers
158
190
 
159
191
  \`\`\`bash
160
- suzi list-tools # List all protocols (alias: suzi tools)
161
- suzi list-tools --verbose # Show all actions per protocol
162
- suzi list-tools --protocol <name> # Show actions for one protocol
163
- suzi list-tools --protocol <name> --schema <action> # Print action schema JSON
164
- suzi list-tools reload # Force-refresh actions cache from API
192
+ suzi list-actions # List all protocols (alias: suzi actions)
193
+ suzi list-actions --verbose # Show all actions per protocol
194
+ suzi list-actions --protocol <name> # Show actions for one protocol
195
+ suzi list-actions --protocol <name> --schema <action> # Print action schema JSON
196
+ suzi list-actions reload # Force-refresh actions cache from API
165
197
  suzi list-triggers # List all available triggers (alias: suzi triggers)
166
198
  suzi list-triggers --verbose # Show trigger config fields and examples
167
199
  suzi list-triggers --protocol <name> # Show triggers for one protocol
168
200
  suzi list-triggers --protocol <name> --schema <trigger> # Print trigger schema JSON
169
201
  \`\`\`
170
202
 
203
+ ### Action Parameter & Response Schemas
204
+
205
+ Every action has a typed **parameters** schema (what you pass in) and a **response** schema (what the action returns). Both are available as JSON Schema via the CLI.
206
+
207
+ **Before writing any action call in agent code, always run the CLI to get the current schemas:**
208
+
209
+ \`\`\`bash
210
+ # See all actions in a protocol
211
+ suzi list-actions --protocol polymarket --verbose
212
+
213
+ # Get the full JSON schema (parameters + response) for a specific action
214
+ suzi list-actions --protocol polymarket --schema place_order
215
+ \`\`\`
216
+
217
+ **Do NOT guess action parameters or response fields.** Run the CLI to see the exact schemas, then use those fields in your agent code. This skill's field listings can be stale — the CLI is always up to date.
218
+
171
219
  ### Environment Variables
172
220
 
173
221
  \`\`\`bash
@@ -389,9 +437,15 @@ ctx.actions.<protocol>.<action>() // Call any protocol action
389
437
  ctx.config // Access config values
390
438
  \`\`\`
391
439
 
392
- **To see what protocols and actions are available, run \`suzi list-tools --verbose\`.**
440
+ **To see what protocols and actions are available, run \`suzi list-actions --verbose\`.**
393
441
  Actions are called as \`ctx.actions.<protocol>.<action_name>({ ...params })\`.
394
442
 
443
+ **Before writing any action call, always fetch its schema first:**
444
+ \`\`\`bash
445
+ suzi list-actions --protocol <name> --schema <action>
446
+ \`\`\`
447
+ This returns both the **parameters** (what to pass) and the **response** (what comes back). Use the response schema to know what fields are available on the result object. Never guess parameter names or response fields — always check the schema.
448
+
395
449
  ### Validation Rules
396
450
 
397
451
  - Agent **must** default-export via \`defineAgent({})\`
@@ -430,6 +484,22 @@ Actions are called as \`ctx.actions.<protocol>.<action_name>({ ...params })\`.
430
484
  | \`0 */4 * * *\` | Every 4 hours |
431
485
  | \`0 0 * * *\` | Daily at midnight |
432
486
 
487
+ ### Trigger Event Output Schemas
488
+
489
+ Every trigger passes a typed \`event\` object to the handler. The \`event\` contains specific fields depending on the trigger type (e.g., price, size, side, timestamp, etc.).
490
+
491
+ **Before writing a trigger handler, always run the CLI to get the current output schema:**
492
+
493
+ \`\`\`bash
494
+ # See output fields for all triggers in a protocol
495
+ suzi list-triggers --protocol polymarket --verbose
496
+
497
+ # Get the full JSON schema (configSchema + outputSchema) for a specific trigger
498
+ suzi list-triggers --protocol polymarket --schema price_change
499
+ \`\`\`
500
+
501
+ **Do NOT guess event field names.** Run the CLI to see the exact output schema, then use those fields in your handler. This skill's field listings can be stale — the CLI is always up to date.
502
+
433
503
  ---
434
504
 
435
505
  ## Common Workflows
@@ -446,12 +516,15 @@ suzi deploy ./agent.ts --activate
446
516
  suzi deploy ./agent.ts --update <agent-id>
447
517
  \`\`\`
448
518
 
449
- ### Monitor Agent
519
+ ### Monitor & Debug Agent
450
520
 
451
521
  \`\`\`bash
452
- suzi agents logs <id> # View recent logs
453
- suzi agents logs <id> --level error # Check for errors
454
- suzi txns --agent <id> # View transactions
522
+ suzi agents logs <id> # Quick log check
523
+ suzi debug logs <id> --status error # Datadog error logs
524
+ suzi debug runs <id> --status failed # Failed runs
525
+ suzi debug executions <id> --status failed # Failed action executions
526
+ suzi debug db-logs <id> --level error # Database error logs
527
+ suzi txns --agent <id> # View transactions
455
528
  \`\`\`
456
529
 
457
530
  ### Typical Development Loop
@@ -460,27 +533,30 @@ suzi txns --agent <id> # View transactions
460
533
  # 1. Create template
461
534
  suzi subagents init --dir ./my-agent
462
535
 
463
- # 2. Edit agent.ts write your logic
536
+ # 2. Look up schemas for the actions you plan to use
537
+ suzi list-actions --protocol <name> --schema <action>
538
+
539
+ # 3. Edit agent.ts — write your logic using the exact parameter/response fields
464
540
 
465
- # 3. Validate before deploying (checks triggers + actions)
541
+ # 4. Validate before deploying (checks triggers + actions)
466
542
  suzi validate ./my-agent/agent.ts
467
543
 
468
- # 4. Deploy as draft
544
+ # 5. Deploy as draft
469
545
  suzi deploy ./my-agent/agent.ts
470
546
 
471
- # 5. Review
547
+ # 6. Review
472
548
  suzi agents view <id>
473
549
 
474
- # 6. Activate
550
+ # 7. Activate
475
551
  suzi agents activate <id>
476
552
 
477
- # 7. Test manually
553
+ # 8. Test manually
478
554
  suzi agents execute <id>
479
555
 
480
- # 8. Check results
556
+ # 9. Check results
481
557
  suzi agents logs <id>
482
558
 
483
- # 9. Iterate — update code
559
+ # 10. Iterate — update code
484
560
  suzi deploy ./my-agent/agent.ts --update <id>
485
561
  \`\`\`
486
562
 
@@ -499,46 +575,75 @@ suzi deploy ./my-agent/agent.ts --update <id>
499
575
 
500
576
  ---
501
577
 
578
+ ## Feedback
579
+
580
+ Users can send feedback (bug reports, feature requests, general comments) directly to the Suzi team from the CLI. **Proactively suggest this** when a user hits a bug, has a frustrating experience, or mentions something they wish worked differently.
581
+
582
+ \`\`\`bash
583
+ suzi feedback # Interactive — pick category, type message
584
+ suzi feedback -c bug -m "description" # Non-interactive (categories: bug, feature, general)
585
+ \`\`\`
586
+
587
+ The feedback command automatically attaches CLI version, platform info, and recent command history for context. The user just needs to describe the issue.
588
+
589
+ ---
590
+
502
591
  ## Suzi Memory System
503
592
 
504
- Suzi CLI auto-captures learnings and activity logs to \`~/.suzi/memory/\`. This creates a compound learning effect each session builds on the last.
593
+ Suzi has a persistent memory system that captures learnings from CLI usage and injects them into AI context on each session. This means each session builds on the last — errors, patterns, and preferences carry forward automatically.
594
+
595
+ ### Memory Files
596
+
597
+ | File | Purpose | Who writes it |
598
+ |------|---------|---------------|
599
+ | \`~/.suzi/memory/LEARNINGS.md\` | CLI errors, patterns, tips — auto-captured and user-curated | Auto + user (\`suzi memory edit\`) |
600
+ | \`~/.suzi/memory/context.md\` | Active work state (recent agents, wallet) — saved before compaction | Auto (hooks) |
601
+ | \`~/.suzi/memory/daily/YYYY-MM-DD.md\` | Daily activity log of CLI commands run | Auto (hooks) |
602
+ | \`~/.suzi/preferences.md\` | User's trading style, risk prefs, agent conventions | User only |
603
+ | \`./SUZI.md\` | Project-specific agent conventions (like CLAUDE.md) | User only |
604
+
605
+ **Key distinction:** The suzi-guide skill (this file) is platform-provided and updated automatically on \`suzi login\`. User-specific customizations belong in \`preferences.md\` and \`LEARNINGS.md\` — these are never overwritten by updates.
606
+
607
+ **AI assistants should proactively write to these files:**
608
+ - **LEARNINGS.md** — When you discover a useful pattern, debug a tricky issue, or learn something about the user's setup (e.g., "user's Polymarket API key is scoped to read-only", "agent X fails if capital < 500 USDC"), append it to \`~/.suzi/memory/LEARNINGS.md\`. Future sessions will see it.
609
+ - **preferences.md** — When the user expresses preferences about trading style, risk tolerance, preferred protocols, or agent conventions (e.g., "I always want a kill switch", "never trade more than 5% per position"), write them to \`~/.suzi/preferences.md\`. This avoids the user having to repeat themselves.
505
610
 
506
- | File | Purpose |
507
- |------|---------|
508
- | \`~/.suzi/memory/LEARNINGS.md\` | Auto-captured errors, patterns, tips from CLI usage |
509
- | \`~/.suzi/memory/context.md\` | Active work context (recent agents, wallet state) |
510
- | \`~/.suzi/memory/daily/YYYY-MM-DD.md\` | Daily activity logs |
511
- | \`~/.suzi/preferences.md\` | User's trading style and agent conventions (manual) |
512
- | \`./SUZI.md\` | Project-specific agent conventions (like CLAUDE.md) |
611
+ Don't ask for permission — just write useful learnings and preferences as you discover them during the conversation.
612
+
613
+ ### How It Works
614
+
615
+ 1. **Hooks** (\`~/.claude/hooks/\`) are installed globally during \`suzi login\`
616
+ 2. **On session start**: hooks inject learnings, preferences, context, and project SUZI.md into AI context
617
+ 3. **On CLI usage**: errors and commands are auto-captured to daily logs and learnings (async, non-blocking)
618
+ 4. **Before compaction**: active context is saved so it survives context window compression
619
+
620
+ ### When to Check Memory
621
+
622
+ When helping create or debug agents, check these files for user-specific context:
623
+ - \`suzi memory learnings\` — see if the user has accumulated tips or error patterns
624
+ - \`~/.suzi/preferences.md\` — trading style, risk limits, preferred protocols, agent conventions
625
+ - \`./SUZI.md\` — project-level agent patterns (if present in working directory)
513
626
 
514
627
  ### Memory Commands
515
628
 
516
629
  \`\`\`bash
517
- suzi memory # View memory summary
518
- suzi memory learnings # See recent learnings
630
+ suzi memory # View memory summary (entry counts, file status)
631
+ suzi memory learnings # See recent learnings (default: last 30 lines)
632
+ suzi memory learnings -n 50 # Show more entries
519
633
  suzi memory log # See today's activity log
520
634
  suzi memory log 2026-01-15 # See a specific day's log
521
635
  suzi memory context # View active context
522
- suzi memory clear # Clear learnings
523
- suzi memory edit # Edit learnings in $EDITOR
636
+ suzi memory clear # Clear learnings (with confirmation, -f to skip)
637
+ suzi memory edit # Edit/curate learnings in $EDITOR
524
638
  suzi memory export # Export all memory to stdout
525
639
  \`\`\`
526
640
 
527
- ### Project Setup
641
+ ### Setup
528
642
 
529
643
  \`\`\`bash
530
- suzi init # Generate SUZI.md for current project
531
644
  suzi install-hooks # Install global Claude Code hooks (~/.claude/hooks/)
532
- suzi install-hooks --preferences # Also create a starter preferences file
645
+ suzi install-hooks --preferences # Also create a starter ~/.suzi/preferences.md
646
+ suzi init # Generate SUZI.md for current project
533
647
  \`\`\`
534
-
535
- ### How It Works
536
-
537
- When you use the Suzi CLI, errors and activity are automatically captured. If Claude Code hooks are installed (\`suzi install-hooks\`), learnings and preferences are automatically injected into Claude's context at session start. Hooks are installed globally to \`~/.claude/hooks/\` so they work in any project without per-project setup. This means Claude gets smarter about your Suzi usage over time — without you having to repeat context.
538
-
539
- When helping create or debug agents, check for:
540
- - \`~/.suzi/memory/LEARNINGS.md\` — accumulated tips and error patterns
541
- - \`~/.suzi/preferences.md\` — user's trading style and conventions
542
- - \`./SUZI.md\` — project-specific agent conventions
543
648
  `;
544
649
  //# sourceMappingURL=suzi-guide.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"suzi-guide.js","sourceRoot":"","sources":["../../src/lib/suzi-guide.ts"],"names":[],"mappings":";AAAA,iEAAiE;;;AAEpD,QAAA,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "suzi-cli",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Suzi CLI by SendAI",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -1,3 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function registerListToolsCommand(program: Command): void;
3
- //# sourceMappingURL=list-tools.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-tools.d.ts","sourceRoot":"","sources":["../../src/commands/list-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA0GpC,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAqI/D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-tools.js","sourceRoot":"","sources":["../../src/commands/list-tools.ts"],"names":[],"mappings":";;;;;AA0GA,4DAqIC;AA9OD,kDAA0B;AAC1B,4CAAoB;AACpB,gDAAwB;AACxB,4CAAoB;AACpB,oCAA4F;AAC5F,oCAAiC;AAejC,MAAM,SAAS,GAAG,cAAI,CAAC,IAAI,CAAC,YAAE,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;AACnD,MAAM,UAAU,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AAC9D,MAAM,SAAS,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,SAAS;AAE3C,SAAS,SAAS;IAChB,IAAI,CAAC;QACH,IAAI,YAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YAC9B,MAAM,GAAG,GAAG,YAAE,CAAC,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;YACjD,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAiB,CAAC;QACzC,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,2BAA2B;IAC7B,CAAC;IACD,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