@doist/twist-cli 1.11.0 → 2.1.0

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.
Files changed (38) hide show
  1. package/README.md +3 -2
  2. package/dist/__tests__/conversation.test.d.ts +2 -0
  3. package/dist/__tests__/conversation.test.d.ts.map +1 -0
  4. package/dist/__tests__/conversation.test.js +55 -0
  5. package/dist/__tests__/conversation.test.js.map +1 -0
  6. package/dist/__tests__/lib/refs.test.js +39 -1
  7. package/dist/__tests__/lib/refs.test.js.map +1 -1
  8. package/dist/__tests__/msg.test.js +2 -10
  9. package/dist/__tests__/msg.test.js.map +1 -1
  10. package/dist/__tests__/view.test.d.ts +2 -0
  11. package/dist/__tests__/view.test.d.ts.map +1 -0
  12. package/dist/__tests__/view.test.js +68 -0
  13. package/dist/__tests__/view.test.js.map +1 -0
  14. package/dist/commands/conversation.d.ts +3 -0
  15. package/dist/commands/conversation.d.ts.map +1 -0
  16. package/dist/commands/conversation.js +200 -0
  17. package/dist/commands/conversation.js.map +1 -0
  18. package/dist/commands/msg.d.ts.map +1 -1
  19. package/dist/commands/msg.js +48 -149
  20. package/dist/commands/msg.js.map +1 -1
  21. package/dist/commands/view.d.ts +3 -0
  22. package/dist/commands/view.d.ts.map +1 -0
  23. package/dist/commands/view.js +63 -0
  24. package/dist/commands/view.js.map +1 -0
  25. package/dist/index.js +24 -4
  26. package/dist/index.js.map +1 -1
  27. package/dist/lib/api.d.ts.map +1 -1
  28. package/dist/lib/api.js +1 -0
  29. package/dist/lib/api.js.map +1 -1
  30. package/dist/lib/refs.d.ts +5 -0
  31. package/dist/lib/refs.d.ts.map +1 -1
  32. package/dist/lib/refs.js +14 -0
  33. package/dist/lib/refs.js.map +1 -1
  34. package/dist/lib/skills/content.d.ts +2 -2
  35. package/dist/lib/skills/content.d.ts.map +1 -1
  36. package/dist/lib/skills/content.js +43 -8
  37. package/dist/lib/skills/content.js.map +1 -1
  38. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  export declare const SKILL_NAME = "twist-cli";
2
2
  export declare const SKILL_DESCRIPTION = "Twist messaging CLI for team communication";
3
- export declare const SKILL_CONTENT = "# Twist CLI Skill\n\nAccess Twist messaging via the `tw` CLI. Use when the user asks about their Twist workspaces, threads, messages, or wants to interact with Twist in any way.\n\n## Setup\n\n```bash\ntw auth login # OAuth login (opens browser)\ntw auth token <your-api-token> # Save API token manually\ntw auth status # Verify authentication\ntw auth logout # Remove saved token\ntw workspaces # List available workspaces\ntw workspace use <ref> # Set current workspace\n```\n\n## Inbox\n\n```bash\ntw inbox # Show inbox threads\ntw inbox --unread # Only unread threads\ntw inbox --channel <filter> # Filter by channel name (fuzzy)\ntw inbox --since <date> # Filter by date (ISO format)\ntw inbox --limit <n> # Max items (default: 50)\n```\n\n## Threads\n\n```bash\ntw thread <thread-ref> # View thread (shorthand for view)\ntw thread view <thread-ref> # View thread with comments\ntw thread view <ref> --comment <id> # View a specific comment\ntw thread view <url-with-/c/id> # Comment ID extracted from URL\ntw thread view <ref> --unread # Show only unread comments\ntw thread view <ref> --context 3 # Include 3 read comments before unread\ntw thread view <ref> --limit 20 # Limit number of comments\ntw thread view <ref> --since <date> # Comments newer than date\ntw thread view <ref> --raw # Show raw markdown\ntw thread reply <ref> \"content\" # Post a comment\ntw thread reply <ref> \"content\" --notify EVERYONE # Notify all workspace members\ntw thread reply <ref> \"content\" --notify 123,456 # Notify specific user IDs\ntw thread done <ref> # Archive thread (mark done)\n```\n\nDefault `--notify` is EVERYONE_IN_THREAD. Options: EVERYONE, EVERYONE_IN_THREAD, or comma-separated user IDs.\n\n## Conversations (DMs/Groups)\n\n```bash\ntw msg unread # List unread conversations\ntw msg <conversation-ref> # View conversation (shorthand for view)\ntw msg view <conversation-ref> # View conversation messages\ntw msg reply <ref> \"content\" # Send a message\ntw msg done <ref> # Archive conversation\n```\n\n## Search\n\n```bash\ntw search \"query\" # Search content\ntw search \"query\" --type threads # Filter: threads, messages, or all\ntw search \"query\" --author <ref> # Filter by author\ntw search \"query\" --to <ref> # Messages sent to user\ntw search \"query\" --title-only # Search thread titles only\ntw search \"query\" --mention-me # Results mentioning current user\ntw search \"query\" --conversation <ids> # Limit to conversations (comma-separated)\ntw search \"query\" --since <date> # Content from date\ntw search \"query\" --until <date> # Content until date\ntw search \"query\" --channel <id> # Filter by channel IDs (comma-separated)\ntw search \"query\" --limit <n> # Max results (default: 50)\ntw search \"query\" --cursor <cur> # Pagination cursor\n```\n\n## Users & Channels\n\n```bash\ntw user # Show current user info\ntw users # List workspace users\ntw users --search <text> # Filter by name/email\ntw channels # List workspace channels\n```\n\n## Reactions\n\n```bash\ntw react thread <id> \uD83D\uDC4D # Add reaction to thread\ntw react comment <id> +1 # Add reaction (shortcode)\ntw react message <id> heart # Add reaction to DM message\ntw unreact thread <id> \uD83D\uDC4D # Remove reaction\n```\n\nSupported shortcodes: +1, -1, heart, tada, smile, laughing, thinking, fire, check, x, eyes, pray, clap, rocket, wave\n\n## Global Options\n\n```bash\n--no-spinner # Disable loading animations\n--progress-jsonl # Machine-readable progress events (JSONL to stderr)\n```\n\n## Output Formats\n\nAll list/view commands support:\n\n```bash\n--json # Output as JSON\n--ndjson # Output as newline-delimited JSON (for streaming)\n--full # Include all fields (default shows essential fields only)\n```\n\n## Reference System\n\nCommands accept flexible references:\n- **Numeric IDs**: `123` or `id:123`\n- **Twist URLs**: Full `https://twist.com/...` URLs (parsed automatically)\n- **Fuzzy names**: For workspaces/users - `\"My Workspace\"` or partial matches\n\n## Common Workflows\n\n**Check inbox and respond:**\n```bash\ntw inbox --unread --json\ntw thread view <id> --unread\ntw thread reply <id> \"Thanks, I'll look into this.\"\ntw thread done <id>\n```\n\n**Search and review:**\n```bash\ntw search \"deployment\" --type threads --json\ntw thread view <thread-id>\n```\n\n**Check DMs:**\n```bash\ntw msg unread --json\ntw msg view <conversation-id>\ntw msg reply <id> \"Got it, thanks!\"\n```\n";
4
- export declare const SKILL_FILE_CONTENT = "---\nname: twist-cli\ndescription: Twist messaging CLI for team communication\n---\n\n# Twist CLI Skill\n\nAccess Twist messaging via the `tw` CLI. Use when the user asks about their Twist workspaces, threads, messages, or wants to interact with Twist in any way.\n\n## Setup\n\n```bash\ntw auth login # OAuth login (opens browser)\ntw auth token <your-api-token> # Save API token manually\ntw auth status # Verify authentication\ntw auth logout # Remove saved token\ntw workspaces # List available workspaces\ntw workspace use <ref> # Set current workspace\n```\n\n## Inbox\n\n```bash\ntw inbox # Show inbox threads\ntw inbox --unread # Only unread threads\ntw inbox --channel <filter> # Filter by channel name (fuzzy)\ntw inbox --since <date> # Filter by date (ISO format)\ntw inbox --limit <n> # Max items (default: 50)\n```\n\n## Threads\n\n```bash\ntw thread <thread-ref> # View thread (shorthand for view)\ntw thread view <thread-ref> # View thread with comments\ntw thread view <ref> --comment <id> # View a specific comment\ntw thread view <url-with-/c/id> # Comment ID extracted from URL\ntw thread view <ref> --unread # Show only unread comments\ntw thread view <ref> --context 3 # Include 3 read comments before unread\ntw thread view <ref> --limit 20 # Limit number of comments\ntw thread view <ref> --since <date> # Comments newer than date\ntw thread view <ref> --raw # Show raw markdown\ntw thread reply <ref> \"content\" # Post a comment\ntw thread reply <ref> \"content\" --notify EVERYONE # Notify all workspace members\ntw thread reply <ref> \"content\" --notify 123,456 # Notify specific user IDs\ntw thread done <ref> # Archive thread (mark done)\n```\n\nDefault `--notify` is EVERYONE_IN_THREAD. Options: EVERYONE, EVERYONE_IN_THREAD, or comma-separated user IDs.\n\n## Conversations (DMs/Groups)\n\n```bash\ntw msg unread # List unread conversations\ntw msg <conversation-ref> # View conversation (shorthand for view)\ntw msg view <conversation-ref> # View conversation messages\ntw msg reply <ref> \"content\" # Send a message\ntw msg done <ref> # Archive conversation\n```\n\n## Search\n\n```bash\ntw search \"query\" # Search content\ntw search \"query\" --type threads # Filter: threads, messages, or all\ntw search \"query\" --author <ref> # Filter by author\ntw search \"query\" --to <ref> # Messages sent to user\ntw search \"query\" --title-only # Search thread titles only\ntw search \"query\" --mention-me # Results mentioning current user\ntw search \"query\" --conversation <ids> # Limit to conversations (comma-separated)\ntw search \"query\" --since <date> # Content from date\ntw search \"query\" --until <date> # Content until date\ntw search \"query\" --channel <id> # Filter by channel IDs (comma-separated)\ntw search \"query\" --limit <n> # Max results (default: 50)\ntw search \"query\" --cursor <cur> # Pagination cursor\n```\n\n## Users & Channels\n\n```bash\ntw user # Show current user info\ntw users # List workspace users\ntw users --search <text> # Filter by name/email\ntw channels # List workspace channels\n```\n\n## Reactions\n\n```bash\ntw react thread <id> \uD83D\uDC4D # Add reaction to thread\ntw react comment <id> +1 # Add reaction (shortcode)\ntw react message <id> heart # Add reaction to DM message\ntw unreact thread <id> \uD83D\uDC4D # Remove reaction\n```\n\nSupported shortcodes: +1, -1, heart, tada, smile, laughing, thinking, fire, check, x, eyes, pray, clap, rocket, wave\n\n## Global Options\n\n```bash\n--no-spinner # Disable loading animations\n--progress-jsonl # Machine-readable progress events (JSONL to stderr)\n```\n\n## Output Formats\n\nAll list/view commands support:\n\n```bash\n--json # Output as JSON\n--ndjson # Output as newline-delimited JSON (for streaming)\n--full # Include all fields (default shows essential fields only)\n```\n\n## Reference System\n\nCommands accept flexible references:\n- **Numeric IDs**: `123` or `id:123`\n- **Twist URLs**: Full `https://twist.com/...` URLs (parsed automatically)\n- **Fuzzy names**: For workspaces/users - `\"My Workspace\"` or partial matches\n\n## Common Workflows\n\n**Check inbox and respond:**\n```bash\ntw inbox --unread --json\ntw thread view <id> --unread\ntw thread reply <id> \"Thanks, I'll look into this.\"\ntw thread done <id>\n```\n\n**Search and review:**\n```bash\ntw search \"deployment\" --type threads --json\ntw thread view <thread-id>\n```\n\n**Check DMs:**\n```bash\ntw msg unread --json\ntw msg view <conversation-id>\ntw msg reply <id> \"Got it, thanks!\"\n```\n";
3
+ export declare const SKILL_CONTENT = "# Twist CLI Skill\n\nAccess Twist messaging via the `tw` CLI. Use when the user asks about their Twist workspaces, threads, messages, or wants to interact with Twist in any way.\n\n## Setup\n\n```bash\ntw auth login # OAuth login (opens browser)\ntw auth token <your-api-token> # Save API token manually\ntw auth status # Verify authentication\ntw auth logout # Remove saved token\ntw workspaces # List available workspaces\ntw workspace use <ref> # Set current workspace\n```\n\n## View by URL\n\n```bash\ntw view <url> # View any Twist entity by URL\n```\n\nRoutes automatically based on URL structure:\n- Message URL \u2192 `tw msg view`\n- Conversation URL \u2192 `tw conversation view`\n- Thread+comment URL \u2192 `tw thread view` (comment ID extracted from URL)\n- Thread URL \u2192 `tw thread view`\n\nAll target command flags pass through (e.g. `--json`, `--raw`, `--full`).\n\n## Inbox\n\n```bash\ntw inbox # Show inbox threads\ntw inbox --unread # Only unread threads\ntw inbox --channel <filter> # Filter by channel name (fuzzy)\ntw inbox --since <date> # Filter by date (ISO format)\ntw inbox --limit <n> # Max items (default: 50)\n```\n\n## Threads\n\n```bash\ntw thread <thread-ref> # View thread (shorthand for view)\ntw thread view <thread-ref> # View thread with comments\ntw thread view <ref> --comment <id> # View a specific comment\ntw thread view <url-with-/c/id> # Comment ID extracted from URL\ntw thread view <ref> --unread # Show only unread comments\ntw thread view <ref> --context 3 # Include 3 read comments before unread\ntw thread view <ref> --limit 20 # Limit number of comments\ntw thread view <ref> --since <date> # Comments newer than date\ntw thread view <ref> --raw # Show raw markdown\ntw thread reply <ref> \"content\" # Post a comment\ntw thread reply <ref> \"content\" --notify EVERYONE # Notify all workspace members\ntw thread reply <ref> \"content\" --notify 123,456 # Notify specific user IDs\ntw thread done <ref> # Archive thread (mark done)\n```\n\nDefault `--notify` is EVERYONE_IN_THREAD. Options: EVERYONE, EVERYONE_IN_THREAD, or comma-separated user IDs.\n\n## Conversations (DMs/Groups)\n\n```bash\ntw conversation unread # List unread conversations\ntw conversation <conversation-ref> # View conversation (shorthand for view)\ntw conversation view <conversation-ref> # View conversation messages\ntw conversation reply <ref> \"content\" # Send a message\ntw conversation done <ref> # Archive conversation\n```\n\nAlias: `tw convo` works the same as `tw conversation`.\n\n## Conversation Messages\n\n```bash\ntw msg <message-ref> # View a message (shorthand for view)\ntw msg view <message-ref> # View a single conversation message\ntw msg update <ref> \"content\" # Edit a conversation message\ntw msg delete <ref> # Delete a conversation message\n```\n\nAlias: `tw message` works the same as `tw msg`.\n\n## Search\n\n```bash\ntw search \"query\" # Search content\ntw search \"query\" --type threads # Filter: threads, messages, or all\ntw search \"query\" --author <ref> # Filter by author\ntw search \"query\" --to <ref> # Messages sent to user\ntw search \"query\" --title-only # Search thread titles only\ntw search \"query\" --mention-me # Results mentioning current user\ntw search \"query\" --conversation <ids> # Limit to conversations (comma-separated)\ntw search \"query\" --since <date> # Content from date\ntw search \"query\" --until <date> # Content until date\ntw search \"query\" --channel <id> # Filter by channel IDs (comma-separated)\ntw search \"query\" --limit <n> # Max results (default: 50)\ntw search \"query\" --cursor <cur> # Pagination cursor\n```\n\n## Users & Channels\n\n```bash\ntw user # Show current user info\ntw users # List workspace users\ntw users --search <text> # Filter by name/email\ntw channels # List workspace channels\n```\n\n## Reactions\n\n```bash\ntw react thread <id> \uD83D\uDC4D # Add reaction to thread\ntw react comment <id> +1 # Add reaction (shortcode)\ntw react message <id> heart # Add reaction to DM message\ntw unreact thread <id> \uD83D\uDC4D # Remove reaction\n```\n\nSupported shortcodes: +1, -1, heart, tada, smile, laughing, thinking, fire, check, x, eyes, pray, clap, rocket, wave\n\n## Global Options\n\n```bash\n--no-spinner # Disable loading animations\n--progress-jsonl # Machine-readable progress events (JSONL to stderr)\n```\n\n## Output Formats\n\nAll list/view commands support:\n\n```bash\n--json # Output as JSON\n--ndjson # Output as newline-delimited JSON (for streaming)\n--full # Include all fields (default shows essential fields only)\n```\n\n## Reference System\n\nCommands accept flexible references:\n- **Numeric IDs**: `123` or `id:123`\n- **Twist URLs**: Full `https://twist.com/...` URLs (parsed automatically)\n- **Fuzzy names**: For workspaces/users - `\"My Workspace\"` or partial matches\n\n## Common Workflows\n\n**View by URL (auto-routes to the right command):**\n```bash\ntw view https://twist.com/a/1585/ch/100/t/200 # View thread\ntw view https://twist.com/a/1585/ch/100/t/200/c/300 # View comment\ntw view https://twist.com/a/1585/msg/400 # View conversation\ntw view https://twist.com/a/1585/msg/400/m/500 --json # View message as JSON\n```\n\n**Check inbox and respond:**\n```bash\ntw inbox --unread --json\ntw thread view <id> --unread\ntw thread reply <id> \"Thanks, I'll look into this.\"\ntw thread done <id>\n```\n\n**Search and review:**\n```bash\ntw search \"deployment\" --type threads --json\ntw thread view <thread-id>\n```\n\n**Check DMs:**\n```bash\ntw conversation unread --json\ntw conversation view <conversation-id>\ntw conversation reply <id> \"Got it, thanks!\"\n```\n";
4
+ export declare const SKILL_FILE_CONTENT = "---\nname: twist-cli\ndescription: Twist messaging CLI for team communication\n---\n\n# Twist CLI Skill\n\nAccess Twist messaging via the `tw` CLI. Use when the user asks about their Twist workspaces, threads, messages, or wants to interact with Twist in any way.\n\n## Setup\n\n```bash\ntw auth login # OAuth login (opens browser)\ntw auth token <your-api-token> # Save API token manually\ntw auth status # Verify authentication\ntw auth logout # Remove saved token\ntw workspaces # List available workspaces\ntw workspace use <ref> # Set current workspace\n```\n\n## View by URL\n\n```bash\ntw view <url> # View any Twist entity by URL\n```\n\nRoutes automatically based on URL structure:\n- Message URL \u2192 `tw msg view`\n- Conversation URL \u2192 `tw conversation view`\n- Thread+comment URL \u2192 `tw thread view` (comment ID extracted from URL)\n- Thread URL \u2192 `tw thread view`\n\nAll target command flags pass through (e.g. `--json`, `--raw`, `--full`).\n\n## Inbox\n\n```bash\ntw inbox # Show inbox threads\ntw inbox --unread # Only unread threads\ntw inbox --channel <filter> # Filter by channel name (fuzzy)\ntw inbox --since <date> # Filter by date (ISO format)\ntw inbox --limit <n> # Max items (default: 50)\n```\n\n## Threads\n\n```bash\ntw thread <thread-ref> # View thread (shorthand for view)\ntw thread view <thread-ref> # View thread with comments\ntw thread view <ref> --comment <id> # View a specific comment\ntw thread view <url-with-/c/id> # Comment ID extracted from URL\ntw thread view <ref> --unread # Show only unread comments\ntw thread view <ref> --context 3 # Include 3 read comments before unread\ntw thread view <ref> --limit 20 # Limit number of comments\ntw thread view <ref> --since <date> # Comments newer than date\ntw thread view <ref> --raw # Show raw markdown\ntw thread reply <ref> \"content\" # Post a comment\ntw thread reply <ref> \"content\" --notify EVERYONE # Notify all workspace members\ntw thread reply <ref> \"content\" --notify 123,456 # Notify specific user IDs\ntw thread done <ref> # Archive thread (mark done)\n```\n\nDefault `--notify` is EVERYONE_IN_THREAD. Options: EVERYONE, EVERYONE_IN_THREAD, or comma-separated user IDs.\n\n## Conversations (DMs/Groups)\n\n```bash\ntw conversation unread # List unread conversations\ntw conversation <conversation-ref> # View conversation (shorthand for view)\ntw conversation view <conversation-ref> # View conversation messages\ntw conversation reply <ref> \"content\" # Send a message\ntw conversation done <ref> # Archive conversation\n```\n\nAlias: `tw convo` works the same as `tw conversation`.\n\n## Conversation Messages\n\n```bash\ntw msg <message-ref> # View a message (shorthand for view)\ntw msg view <message-ref> # View a single conversation message\ntw msg update <ref> \"content\" # Edit a conversation message\ntw msg delete <ref> # Delete a conversation message\n```\n\nAlias: `tw message` works the same as `tw msg`.\n\n## Search\n\n```bash\ntw search \"query\" # Search content\ntw search \"query\" --type threads # Filter: threads, messages, or all\ntw search \"query\" --author <ref> # Filter by author\ntw search \"query\" --to <ref> # Messages sent to user\ntw search \"query\" --title-only # Search thread titles only\ntw search \"query\" --mention-me # Results mentioning current user\ntw search \"query\" --conversation <ids> # Limit to conversations (comma-separated)\ntw search \"query\" --since <date> # Content from date\ntw search \"query\" --until <date> # Content until date\ntw search \"query\" --channel <id> # Filter by channel IDs (comma-separated)\ntw search \"query\" --limit <n> # Max results (default: 50)\ntw search \"query\" --cursor <cur> # Pagination cursor\n```\n\n## Users & Channels\n\n```bash\ntw user # Show current user info\ntw users # List workspace users\ntw users --search <text> # Filter by name/email\ntw channels # List workspace channels\n```\n\n## Reactions\n\n```bash\ntw react thread <id> \uD83D\uDC4D # Add reaction to thread\ntw react comment <id> +1 # Add reaction (shortcode)\ntw react message <id> heart # Add reaction to DM message\ntw unreact thread <id> \uD83D\uDC4D # Remove reaction\n```\n\nSupported shortcodes: +1, -1, heart, tada, smile, laughing, thinking, fire, check, x, eyes, pray, clap, rocket, wave\n\n## Global Options\n\n```bash\n--no-spinner # Disable loading animations\n--progress-jsonl # Machine-readable progress events (JSONL to stderr)\n```\n\n## Output Formats\n\nAll list/view commands support:\n\n```bash\n--json # Output as JSON\n--ndjson # Output as newline-delimited JSON (for streaming)\n--full # Include all fields (default shows essential fields only)\n```\n\n## Reference System\n\nCommands accept flexible references:\n- **Numeric IDs**: `123` or `id:123`\n- **Twist URLs**: Full `https://twist.com/...` URLs (parsed automatically)\n- **Fuzzy names**: For workspaces/users - `\"My Workspace\"` or partial matches\n\n## Common Workflows\n\n**View by URL (auto-routes to the right command):**\n```bash\ntw view https://twist.com/a/1585/ch/100/t/200 # View thread\ntw view https://twist.com/a/1585/ch/100/t/200/c/300 # View comment\ntw view https://twist.com/a/1585/msg/400 # View conversation\ntw view https://twist.com/a/1585/msg/400/m/500 --json # View message as JSON\n```\n\n**Check inbox and respond:**\n```bash\ntw inbox --unread --json\ntw thread view <id> --unread\ntw thread reply <id> \"Thanks, I'll look into this.\"\ntw thread done <id>\n```\n\n**Search and review:**\n```bash\ntw search \"deployment\" --type threads --json\ntw thread view <thread-id>\n```\n\n**Check DMs:**\n```bash\ntw conversation unread --json\ntw conversation view <conversation-id>\ntw conversation reply <id> \"Got it, thanks!\"\n```\n";
5
5
  //# sourceMappingURL=content.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/lib/skills/content.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,cAAc,CAAA;AAErC,eAAO,MAAM,iBAAiB,+CAA+C,CAAA;AAE7E,eAAO,MAAM,aAAa,0tJA0IzB,CAAA;AAED,eAAO,MAAM,kBAAkB,gzJAKd,CAAA"}
1
+ {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/lib/skills/content.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,cAAc,CAAA;AAErC,eAAO,MAAM,iBAAiB,+CAA+C,CAAA;AAE7E,eAAO,MAAM,aAAa,0+LA6KzB,CAAA;AAED,eAAO,MAAM,kBAAkB,gkMAKd,CAAA"}
@@ -15,6 +15,20 @@ tw workspaces # List available workspaces
15
15
  tw workspace use <ref> # Set current workspace
16
16
  \`\`\`
17
17
 
18
+ ## View by URL
19
+
20
+ \`\`\`bash
21
+ tw view <url> # View any Twist entity by URL
22
+ \`\`\`
23
+
24
+ Routes automatically based on URL structure:
25
+ - Message URL → \`tw msg view\`
26
+ - Conversation URL → \`tw conversation view\`
27
+ - Thread+comment URL → \`tw thread view\` (comment ID extracted from URL)
28
+ - Thread URL → \`tw thread view\`
29
+
30
+ All target command flags pass through (e.g. \`--json\`, \`--raw\`, \`--full\`).
31
+
18
32
  ## Inbox
19
33
 
20
34
  \`\`\`bash
@@ -48,13 +62,26 @@ Default \`--notify\` is EVERYONE_IN_THREAD. Options: EVERYONE, EVERYONE_IN_THREA
48
62
  ## Conversations (DMs/Groups)
49
63
 
50
64
  \`\`\`bash
51
- tw msg unread # List unread conversations
52
- tw msg <conversation-ref> # View conversation (shorthand for view)
53
- tw msg view <conversation-ref> # View conversation messages
54
- tw msg reply <ref> "content" # Send a message
55
- tw msg done <ref> # Archive conversation
65
+ tw conversation unread # List unread conversations
66
+ tw conversation <conversation-ref> # View conversation (shorthand for view)
67
+ tw conversation view <conversation-ref> # View conversation messages
68
+ tw conversation reply <ref> "content" # Send a message
69
+ tw conversation done <ref> # Archive conversation
56
70
  \`\`\`
57
71
 
72
+ Alias: \`tw convo\` works the same as \`tw conversation\`.
73
+
74
+ ## Conversation Messages
75
+
76
+ \`\`\`bash
77
+ tw msg <message-ref> # View a message (shorthand for view)
78
+ tw msg view <message-ref> # View a single conversation message
79
+ tw msg update <ref> "content" # Edit a conversation message
80
+ tw msg delete <ref> # Delete a conversation message
81
+ \`\`\`
82
+
83
+ Alias: \`tw message\` works the same as \`tw msg\`.
84
+
58
85
  ## Search
59
86
 
60
87
  \`\`\`bash
@@ -118,6 +145,14 @@ Commands accept flexible references:
118
145
 
119
146
  ## Common Workflows
120
147
 
148
+ **View by URL (auto-routes to the right command):**
149
+ \`\`\`bash
150
+ tw view https://twist.com/a/1585/ch/100/t/200 # View thread
151
+ tw view https://twist.com/a/1585/ch/100/t/200/c/300 # View comment
152
+ tw view https://twist.com/a/1585/msg/400 # View conversation
153
+ tw view https://twist.com/a/1585/msg/400/m/500 --json # View message as JSON
154
+ \`\`\`
155
+
121
156
  **Check inbox and respond:**
122
157
  \`\`\`bash
123
158
  tw inbox --unread --json
@@ -134,9 +169,9 @@ tw thread view <thread-id>
134
169
 
135
170
  **Check DMs:**
136
171
  \`\`\`bash
137
- tw msg unread --json
138
- tw msg view <conversation-id>
139
- tw msg reply <id> "Got it, thanks!"
172
+ tw conversation unread --json
173
+ tw conversation view <conversation-id>
174
+ tw conversation reply <id> "Got it, thanks!"
140
175
  \`\`\`
141
176
  `;
142
177
  export const SKILL_FILE_CONTENT = `---
@@ -1 +1 @@
1
- {"version":3,"file":"content.js","sourceRoot":"","sources":["../../../src/lib/skills/content.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAA;AAErC,MAAM,CAAC,MAAM,iBAAiB,GAAG,4CAA4C,CAAA;AAE7E,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0I5B,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG;QAC1B,UAAU;eACH,iBAAiB;;;EAG9B,aAAa,EAAE,CAAA"}
1
+ {"version":3,"file":"content.js","sourceRoot":"","sources":["../../../src/lib/skills/content.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAA;AAErC,MAAM,CAAC,MAAM,iBAAiB,GAAG,4CAA4C,CAAA;AAE7E,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6K5B,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG;QAC1B,UAAU;eACH,iBAAiB;;;EAG9B,aAAa,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doist/twist-cli",
3
- "version": "1.11.0",
3
+ "version": "2.1.0",
4
4
  "description": "TypeScript CLI for Twist",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",