@doist/twist-cli 2.22.1 → 2.23.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.
- package/CHANGELOG.md +6 -0
- package/dist/commands/auth/helpers.d.ts +3 -0
- package/dist/commands/auth/helpers.d.ts.map +1 -0
- package/dist/commands/auth/helpers.js +12 -0
- package/dist/commands/auth/helpers.js.map +1 -0
- package/dist/commands/{auth.d.ts → auth/index.d.ts} +1 -1
- package/dist/commands/auth/index.d.ts.map +1 -0
- package/dist/commands/auth/index.js +20 -0
- package/dist/commands/auth/index.js.map +1 -0
- package/dist/commands/auth/login.d.ts +4 -0
- package/dist/commands/auth/login.d.ts.map +1 -0
- package/dist/commands/auth/login.js +62 -0
- package/dist/commands/auth/login.js.map +1 -0
- package/dist/commands/auth/logout.d.ts +2 -0
- package/dist/commands/auth/logout.d.ts.map +1 -0
- package/dist/commands/auth/logout.js +9 -0
- package/dist/commands/auth/logout.js.map +1 -0
- package/dist/commands/auth/status.d.ts +4 -0
- package/dist/commands/auth/status.d.ts.map +1 -0
- package/dist/commands/auth/status.js +33 -0
- package/dist/commands/auth/status.js.map +1 -0
- package/dist/commands/auth/token.d.ts +2 -0
- package/dist/commands/auth/token.d.ts.map +1 -0
- package/dist/commands/auth/token.js +38 -0
- package/dist/commands/auth/token.js.map +1 -0
- package/dist/commands/away/clear.d.ts +3 -0
- package/dist/commands/away/clear.d.ts.map +1 -0
- package/dist/commands/away/clear.js +22 -0
- package/dist/commands/away/clear.js.map +1 -0
- package/dist/commands/away/helpers.d.ts +7 -0
- package/dist/commands/away/helpers.d.ts.map +1 -0
- package/dist/commands/away/helpers.js +37 -0
- package/dist/commands/away/helpers.js.map +1 -0
- package/dist/commands/{away.d.ts → away/index.d.ts} +1 -1
- package/dist/commands/away/index.d.ts.map +1 -0
- package/dist/commands/away/index.js +26 -0
- package/dist/commands/away/index.js.map +1 -0
- package/dist/commands/away/set.d.ts +7 -0
- package/dist/commands/away/set.d.ts.map +1 -0
- package/dist/commands/away/set.js +31 -0
- package/dist/commands/away/set.js.map +1 -0
- package/dist/commands/away/status.d.ts +3 -0
- package/dist/commands/away/status.d.ts.map +1 -0
- package/dist/commands/away/status.js +20 -0
- package/dist/commands/away/status.js.map +1 -0
- package/dist/commands/comment/delete.d.ts +5 -0
- package/dist/commands/comment/delete.d.ts.map +1 -0
- package/dist/commands/comment/delete.js +18 -0
- package/dist/commands/comment/delete.js.map +1 -0
- package/dist/commands/{comment.d.ts → comment/index.d.ts} +1 -1
- package/dist/commands/comment/index.d.ts.map +1 -0
- package/dist/commands/comment/index.js +35 -0
- package/dist/commands/comment/index.js.map +1 -0
- package/dist/commands/comment/update.d.ts +5 -0
- package/dist/commands/comment/update.d.ts.map +1 -0
- package/dist/commands/comment/update.js +35 -0
- package/dist/commands/comment/update.js.map +1 -0
- package/dist/commands/comment/view.d.ts +3 -0
- package/dist/commands/comment/view.d.ts.map +1 -0
- package/dist/commands/comment/view.js +23 -0
- package/dist/commands/comment/view.js.map +1 -0
- package/dist/commands/completion/helpers.d.ts +14 -0
- package/dist/commands/completion/helpers.d.ts.map +1 -0
- package/dist/commands/completion/helpers.js +37 -0
- package/dist/commands/completion/helpers.js.map +1 -0
- package/dist/commands/{completion.d.ts → completion/index.d.ts} +1 -1
- package/dist/commands/completion/index.d.ts.map +1 -0
- package/dist/commands/completion/index.js +22 -0
- package/dist/commands/completion/index.js.map +1 -0
- package/dist/commands/completion/install.d.ts +2 -0
- package/dist/commands/completion/install.d.ts.map +1 -0
- package/dist/commands/completion/install.js +20 -0
- package/dist/commands/completion/install.js.map +1 -0
- package/dist/commands/completion/server.d.ts +3 -0
- package/dist/commands/completion/server.d.ts.map +1 -0
- package/dist/commands/completion/server.js +35 -0
- package/dist/commands/completion/server.js.map +1 -0
- package/dist/commands/completion/uninstall.d.ts +2 -0
- package/dist/commands/completion/uninstall.d.ts.map +1 -0
- package/dist/commands/completion/uninstall.js +19 -0
- package/dist/commands/completion/uninstall.js.map +1 -0
- package/dist/commands/conversation/done.d.ts +3 -0
- package/dist/commands/conversation/done.d.ts.map +1 -0
- package/dist/commands/conversation/done.js +18 -0
- package/dist/commands/conversation/done.js.map +1 -0
- package/dist/commands/conversation/helpers.d.ts +35 -0
- package/dist/commands/conversation/helpers.d.ts.map +1 -0
- package/dist/commands/conversation/helpers.js +144 -0
- package/dist/commands/conversation/helpers.js.map +1 -0
- package/dist/commands/{conversation.d.ts → conversation/index.d.ts} +1 -1
- package/dist/commands/conversation/index.d.ts.map +1 -0
- package/dist/commands/conversation/index.js +77 -0
- package/dist/commands/conversation/index.js.map +1 -0
- package/dist/commands/conversation/mute.d.ts +3 -0
- package/dist/commands/conversation/mute.d.ts.map +1 -0
- package/dist/commands/conversation/mute.js +25 -0
- package/dist/commands/conversation/mute.js.map +1 -0
- package/dist/commands/conversation/reply.d.ts +3 -0
- package/dist/commands/conversation/reply.d.ts.map +1 -0
- package/dist/commands/conversation/reply.js +35 -0
- package/dist/commands/conversation/reply.js.map +1 -0
- package/dist/commands/conversation/unmute.d.ts +3 -0
- package/dist/commands/conversation/unmute.d.ts.map +1 -0
- package/dist/commands/conversation/unmute.js +23 -0
- package/dist/commands/conversation/unmute.js.map +1 -0
- package/dist/commands/conversation/unread.d.ts +3 -0
- package/dist/commands/conversation/unread.d.ts.map +1 -0
- package/dist/commands/conversation/unread.js +63 -0
- package/dist/commands/conversation/unread.js.map +1 -0
- package/dist/commands/conversation/view.d.ts +3 -0
- package/dist/commands/conversation/view.d.ts.map +1 -0
- package/dist/commands/conversation/view.js +65 -0
- package/dist/commands/conversation/view.js.map +1 -0
- package/dist/commands/conversation/with.d.ts +3 -0
- package/dist/commands/conversation/with.d.ts.map +1 -0
- package/dist/commands/conversation/with.js +49 -0
- package/dist/commands/conversation/with.js.map +1 -0
- package/dist/commands/msg/delete.d.ts +5 -0
- package/dist/commands/msg/delete.d.ts.map +1 -0
- package/dist/commands/msg/delete.js +18 -0
- package/dist/commands/msg/delete.js.map +1 -0
- package/dist/commands/{msg.d.ts → msg/index.d.ts} +1 -1
- package/dist/commands/msg/index.d.ts.map +1 -0
- package/dist/commands/msg/index.js +34 -0
- package/dist/commands/msg/index.js.map +1 -0
- package/dist/commands/msg/update.d.ts +5 -0
- package/dist/commands/msg/update.d.ts.map +1 -0
- package/dist/commands/msg/update.js +35 -0
- package/dist/commands/msg/update.js.map +1 -0
- package/dist/commands/msg/view.d.ts +3 -0
- package/dist/commands/msg/view.d.ts.map +1 -0
- package/dist/commands/msg/view.js +28 -0
- package/dist/commands/msg/view.js.map +1 -0
- package/dist/commands/{skill.d.ts → skill/index.d.ts} +1 -1
- package/dist/commands/skill/index.d.ts.map +1 -0
- package/dist/commands/skill/index.js +29 -0
- package/dist/commands/skill/index.js.map +1 -0
- package/dist/commands/skill/install.d.ts +3 -0
- package/dist/commands/skill/install.d.ts.map +1 -0
- package/dist/commands/skill/install.js +21 -0
- package/dist/commands/skill/install.js.map +1 -0
- package/dist/commands/skill/list.d.ts +6 -0
- package/dist/commands/skill/list.d.ts.map +1 -0
- package/dist/commands/skill/list.js +22 -0
- package/dist/commands/skill/list.js.map +1 -0
- package/dist/commands/skill/uninstall.d.ts +3 -0
- package/dist/commands/skill/uninstall.d.ts.map +1 -0
- package/dist/commands/skill/uninstall.js +19 -0
- package/dist/commands/skill/uninstall.js.map +1 -0
- package/dist/commands/skill/update.d.ts +3 -0
- package/dist/commands/skill/update.d.ts.map +1 -0
- package/dist/commands/skill/update.js +42 -0
- package/dist/commands/skill/update.js.map +1 -0
- package/dist/commands/thread/delete.d.ts +7 -0
- package/dist/commands/thread/delete.d.ts.map +1 -0
- package/dist/commands/thread/delete.js +38 -0
- package/dist/commands/thread/delete.js.map +1 -0
- package/dist/commands/{thread.d.ts → thread/index.d.ts} +1 -1
- package/dist/commands/thread/index.d.ts.map +1 -0
- package/dist/commands/{thread.js → thread/index.js} +15 -7
- package/dist/commands/thread/index.js.map +1 -0
- package/dist/commands/update/action.d.ts +1 -0
- package/dist/commands/update/action.d.ts.map +1 -1
- package/dist/commands/update/action.js +16 -0
- package/dist/commands/update/action.js.map +1 -1
- package/dist/commands/update/index.d.ts.map +1 -1
- package/dist/commands/update/index.js +1 -2
- package/dist/commands/update/index.js.map +1 -1
- package/dist/commands/view.d.ts.map +1 -1
- package/dist/commands/view.js +4 -4
- package/dist/commands/view.js.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/lib/api.d.ts.map +1 -1
- package/dist/lib/api.js +1 -0
- package/dist/lib/api.js.map +1 -1
- package/dist/lib/skills/content.d.ts +1 -1
- package/dist/lib/skills/content.d.ts.map +1 -1
- package/dist/lib/skills/content.js +4 -1
- package/dist/lib/skills/content.js.map +1 -1
- package/package.json +2 -2
- package/dist/commands/auth.d.ts.map +0 -1
- package/dist/commands/auth.js +0 -154
- package/dist/commands/auth.js.map +0 -1
- package/dist/commands/away.d.ts.map +0 -1
- package/dist/commands/away.js +0 -120
- package/dist/commands/away.js.map +0 -1
- package/dist/commands/comment.d.ts.map +0 -1
- package/dist/commands/comment.js +0 -99
- package/dist/commands/comment.js.map +0 -1
- package/dist/commands/completion.d.ts.map +0 -1
- package/dist/commands/completion.js +0 -121
- package/dist/commands/completion.js.map +0 -1
- package/dist/commands/conversation.d.ts.map +0 -1
- package/dist/commands/conversation.js +0 -458
- package/dist/commands/conversation.js.map +0 -1
- package/dist/commands/msg.d.ts.map +0 -1
- package/dist/commands/msg.js +0 -103
- package/dist/commands/msg.js.map +0 -1
- package/dist/commands/skill.d.ts.map +0 -1
- package/dist/commands/skill.js +0 -119
- package/dist/commands/skill.js.map +0 -1
- package/dist/commands/thread.d.ts.map +0 -1
- package/dist/commands/thread.js.map +0 -1
- package/dist/commands/update/channel.d.ts +0 -2
- package/dist/commands/update/channel.d.ts.map +0 -1
- package/dist/commands/update/channel.js +0 -13
- package/dist/commands/update/channel.js.map +0 -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 (tw)\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, read-write)\ntw auth login --read-only # OAuth login with read-only scope\ntw auth token # Save API token manually (prompts securely; scope unknown, assumed write-capable)\ntw auth status # Verify authentication + show mode\ntw auth status --json # JSON output: { id, email, name }\ntw auth logout # Remove saved token and auth metadata\ntw workspaces # List available workspaces\ntw workspace use <ref> # Set current workspace\ntw completion install # Install shell completions\ntw update # Update CLI to latest version\ntw changelog # Show recent changelog entries\n```\n\nStored auth uses the system credential manager when available. If secure storage is unavailable, `tw` warns and falls back to `~/.config/twist-cli/config.json`. `TWIST_API_TOKEN` always takes priority over the stored token, and legacy plaintext config tokens are migrated automatically when secure storage is available.\n\nIn read-only mode (`tw auth login --read-only`), commands that modify Twist data (reply, archive, react, delete, etc.) are blocked by the CLI. Externally provided tokens (`TWIST_API_TOKEN` or `tw auth token`) are treated as unknown scope and assumed write-capable.\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 create <channel-ref> \"Title\" \"content\" # Create a new thread\ntw thread create <channel-ref> \"Title\" \"content\" --json # Create and return as JSON\ntw thread create <channel-ref> \"Title\" \"content\" --json --full # Include all thread fields\ntw thread create <channel-ref> \"Title\" \"content\" --notify 123,456 # Notify specific users\ntw thread create <channel-ref> \"Title\" \"content\" --dry-run # Preview without posting\ntw thread reply <ref> \"content\" # Post a comment (notifies EVERYONE_IN_THREAD by default)\ntw thread reply <ref> \"content\" --notify EVERYONE # Notify all workspace members\ntw thread reply <ref> \"content\" --notify 123,id:456 # Notify specific user IDs\ntw thread reply <ref> \"content\" --json # Post and return comment as JSON\ntw thread reply <ref> \"content\" --json --full # Include all comment fields\ntw thread reply <ref> \"content\" --close # Reply and close the thread\ntw thread reply <ref> \"content\" --reopen # Reply and reopen a closed thread\ntw thread done <ref> # Archive thread (mark done)\ntw thread done <ref> --json # Archive and return status as JSON\ntw thread mute <ref> # Mute thread for 60 minutes (default)\ntw thread mute <ref> --minutes 480 # Mute for custom duration\ntw thread mute <ref> --json # Mute and return { id, mutedUntil } as JSON\ntw thread mute <ref> --json --full # Mute and return full thread as JSON\ntw thread unmute <ref> # Unmute a muted thread\ntw thread unmute <ref> --json # Unmute and return { id, mutedUntil } as JSON\n```\n\nDefault `--notify` for reply is EVERYONE_IN_THREAD, which may notify more people than intended. Before posting, confirm with the user whether specific people should be notified instead (via `--notify <user-ids>`). Options: EVERYONE, EVERYONE_IN_THREAD, or comma-separated user ID refs.\n\n## Thread Comments\n\n```bash\ntw comment <comment-ref> # View a comment (shorthand for view)\ntw comment view <comment-ref> # View a single thread comment\ntw comment view <comment-ref> --raw # Show raw markdown\ntw comment view <comment-ref> --json # Output as JSON\ntw comment view <comment-ref> --json --full # Include all fields in JSON output\ntw comment update <comment-ref> \"new content\" # Update a thread comment\ntw comment update <comment-ref> \"content\" --json # Update and return updated comment as JSON\ntw comment update <comment-ref> \"content\" --json --full # Include all comment fields\ntw comment delete <comment-ref> # Delete a thread comment\ntw comment delete <comment-ref> --json # Delete and return status as JSON\n```\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 with <user-ref> # Find your 1:1 DM with a user\ntw conversation with <user-ref> --snippet # Include the latest message preview\ntw conversation with <user-ref> --include-groups # List any conversations with that user\ntw conversation reply <ref> \"content\" # Send a message\ntw conversation reply <ref> \"content\" --json # Send and return message as JSON\ntw conversation reply <ref> \"content\" --json --full # Include all message fields\ntw conversation done <ref> # Archive conversation\ntw conversation done <ref> --json # Archive and return status as JSON\ntw conversation mute <ref> # Mute conversation for 60 minutes (default)\ntw conversation mute <ref> --minutes 480 # Mute for custom duration\ntw conversation mute <ref> --json # Mute and return { id, mutedUntil } as JSON\ntw conversation mute <ref> --json --full # Mute and return full conversation as JSON\ntw conversation unmute <ref> # Unmute a muted conversation\ntw conversation unmute <ref> --json # Unmute and return { id, mutedUntil } as JSON\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 update <ref> \"content\" --json # Edit and return updated message as JSON\ntw msg update <ref> \"content\" --json --full # Include all message fields\ntw msg delete <ref> # Delete a conversation message\ntw msg delete <ref> --json # Delete and return status as JSON\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 <refs> # Limit to conversations (comma-separated refs)\ntw search \"query\" --since <date> # Content from date\ntw search \"query\" --until <date> # Content until date\ntw search \"query\" --channel <refs> # Filter by channel refs (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## Away Status\n\n```bash\ntw away # Show current away status\ntw away set <type> [until] # Set away (type: vacation, parental, sickleave, other)\ntw away set vacation 2026-03-20 # Away until March 20\ntw away set vacation 2026-03-20 --from 2026-03-15 # Custom start date\ntw away clear # Clear away status\n```\n\n## Reactions\n\n```bash\ntw react thread <ref> \uD83D\uDC4D # Add reaction to thread\ntw react comment <ref> +1 # Add reaction (shortcode)\ntw react message <ref> heart # Add reaction to DM message\ntw unreact thread <ref> \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## Shell Completions\n\n```bash\ntw completion install # Install tab completions (prompts for shell)\ntw completion install bash # Install for specific shell\ntw completion install zsh\ntw completion install fish\ntw completion uninstall # Remove completions\n```\n\n### Update\n\n```bash\ntw update # Update CLI to latest version\ntw update --check # Check for updates without installing, show channel\ntw update channel # Show current update channel\ntw update switch --stable # Switch to stable release channel\ntw update switch --pre-release # Switch to pre-release (next) channel\n```\n\n### Changelog\n```bash\ntw changelog # Show last 5 versions\ntw changelog -n 3 # Show last 3 versions\ntw changelog --count 10 # Show last 10 versions\n```\n\n## Global Options\n\n```bash\n--no-spinner # Disable loading animations\n--progress-jsonl # Machine-readable progress events (JSONL to stderr)\n--accessible # Add text labels to color-coded output (also: TW_ACCESSIBLE=1)\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## Piping Content\n\nCommands that accept content (`thread create`, `thread reply`, `comment update`, `conversation reply`, `msg update`) auto-detect piped stdin:\n\n```bash\ncat notes.md | tw thread reply <ref>\ntw thread create <channel-ref> \"Title\" < body.md\necho \"Quick reply\" | tw conversation reply <ref>\n```\n\nIf no content argument is provided and no stdin is piped, the CLI opens `$EDITOR` for interactive input.\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 with \"Alice Example\"\ntw conversation reply <id> \"Got it, thanks!\"\n```\n";
|
|
3
|
+
export declare const SKILL_CONTENT = "# Twist CLI (tw)\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, read-write)\ntw auth login --read-only # OAuth login with read-only scope\ntw auth token # Save API token manually (prompts securely; scope unknown, assumed write-capable)\ntw auth status # Verify authentication + show mode\ntw auth status --json # JSON output: { id, email, name }\ntw auth logout # Remove saved token and auth metadata\ntw workspaces # List available workspaces\ntw workspace use <ref> # Set current workspace\ntw completion install # Install shell completions\ntw update # Update CLI to latest version\ntw changelog # Show recent changelog entries\n```\n\nStored auth uses the system credential manager when available. If secure storage is unavailable, `tw` warns and falls back to `~/.config/twist-cli/config.json`. `TWIST_API_TOKEN` always takes priority over the stored token, and legacy plaintext config tokens are migrated automatically when secure storage is available.\n\nIn read-only mode (`tw auth login --read-only`), commands that modify Twist data (reply, archive, react, delete, etc.) are blocked by the CLI. Externally provided tokens (`TWIST_API_TOKEN` or `tw auth token`) are treated as unknown scope and assumed write-capable.\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 create <channel-ref> \"Title\" \"content\" # Create a new thread\ntw thread create <channel-ref> \"Title\" \"content\" --json # Create and return as JSON\ntw thread create <channel-ref> \"Title\" \"content\" --json --full # Include all thread fields\ntw thread create <channel-ref> \"Title\" \"content\" --notify 123,456 # Notify specific users\ntw thread create <channel-ref> \"Title\" \"content\" --dry-run # Preview without posting\ntw thread reply <ref> \"content\" # Post a comment (notifies EVERYONE_IN_THREAD by default)\ntw thread reply <ref> \"content\" --notify EVERYONE # Notify all workspace members\ntw thread reply <ref> \"content\" --notify 123,id:456 # Notify specific user IDs\ntw thread reply <ref> \"content\" --json # Post and return comment as JSON\ntw thread reply <ref> \"content\" --json --full # Include all comment fields\ntw thread reply <ref> \"content\" --close # Reply and close the thread\ntw thread reply <ref> \"content\" --reopen # Reply and reopen a closed thread\ntw thread done <ref> # Archive thread (mark done)\ntw thread done <ref> --json # Archive and return status as JSON\ntw thread mute <ref> # Mute thread for 60 minutes (default)\ntw thread mute <ref> --minutes 480 # Mute for custom duration\ntw thread mute <ref> --json # Mute and return { id, mutedUntil } as JSON\ntw thread mute <ref> --json --full # Mute and return full thread as JSON\ntw thread unmute <ref> # Unmute a muted thread\ntw thread unmute <ref> --json # Unmute and return { id, mutedUntil } as JSON\ntw thread delete <ref> # Preview thread deletion (requires --yes to execute)\ntw thread delete <ref> --yes # Permanently delete a thread\ntw thread delete <ref> --yes --json # Delete and return status as JSON\n```\n\nDefault `--notify` for reply is EVERYONE_IN_THREAD, which may notify more people than intended. Before posting, confirm with the user whether specific people should be notified instead (via `--notify <user-ids>`). Options: EVERYONE, EVERYONE_IN_THREAD, or comma-separated user ID refs.\n\n## Thread Comments\n\n```bash\ntw comment <comment-ref> # View a comment (shorthand for view)\ntw comment view <comment-ref> # View a single thread comment\ntw comment view <comment-ref> --raw # Show raw markdown\ntw comment view <comment-ref> --json # Output as JSON\ntw comment view <comment-ref> --json --full # Include all fields in JSON output\ntw comment update <comment-ref> \"new content\" # Update a thread comment\ntw comment update <comment-ref> \"content\" --json # Update and return updated comment as JSON\ntw comment update <comment-ref> \"content\" --json --full # Include all comment fields\ntw comment delete <comment-ref> # Delete a thread comment\ntw comment delete <comment-ref> --json # Delete and return status as JSON\n```\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 with <user-ref> # Find your 1:1 DM with a user\ntw conversation with <user-ref> --snippet # Include the latest message preview\ntw conversation with <user-ref> --include-groups # List any conversations with that user\ntw conversation reply <ref> \"content\" # Send a message\ntw conversation reply <ref> \"content\" --json # Send and return message as JSON\ntw conversation reply <ref> \"content\" --json --full # Include all message fields\ntw conversation done <ref> # Archive conversation\ntw conversation done <ref> --json # Archive and return status as JSON\ntw conversation mute <ref> # Mute conversation for 60 minutes (default)\ntw conversation mute <ref> --minutes 480 # Mute for custom duration\ntw conversation mute <ref> --json # Mute and return { id, mutedUntil } as JSON\ntw conversation mute <ref> --json --full # Mute and return full conversation as JSON\ntw conversation unmute <ref> # Unmute a muted conversation\ntw conversation unmute <ref> --json # Unmute and return { id, mutedUntil } as JSON\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 update <ref> \"content\" --json # Edit and return updated message as JSON\ntw msg update <ref> \"content\" --json --full # Include all message fields\ntw msg delete <ref> # Delete a conversation message\ntw msg delete <ref> --json # Delete and return status as JSON\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 <refs> # Limit to conversations (comma-separated refs)\ntw search \"query\" --since <date> # Content from date\ntw search \"query\" --until <date> # Content until date\ntw search \"query\" --channel <refs> # Filter by channel refs (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## Away Status\n\n```bash\ntw away # Show current away status\ntw away set <type> [until] # Set away (type: vacation, parental, sickleave, other)\ntw away set vacation 2026-03-20 # Away until March 20\ntw away set vacation 2026-03-20 --from 2026-03-15 # Custom start date\ntw away clear # Clear away status\n```\n\n## Reactions\n\n```bash\ntw react thread <ref> \uD83D\uDC4D # Add reaction to thread\ntw react comment <ref> +1 # Add reaction (shortcode)\ntw react message <ref> heart # Add reaction to DM message\ntw unreact thread <ref> \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## Shell Completions\n\n```bash\ntw completion install # Install tab completions (prompts for shell)\ntw completion install bash # Install for specific shell\ntw completion install zsh\ntw completion install fish\ntw completion uninstall # Remove completions\n```\n\n### Update\n\n```bash\ntw update # Update CLI to latest version\ntw update --check # Check for updates without installing, show channel\ntw update --channel # Show current update channel\ntw update switch --stable # Switch to stable release channel\ntw update switch --pre-release # Switch to pre-release (next) channel\n```\n\n### Changelog\n```bash\ntw changelog # Show last 5 versions\ntw changelog -n 3 # Show last 3 versions\ntw changelog --count 10 # Show last 10 versions\n```\n\n## Global Options\n\n```bash\n--no-spinner # Disable loading animations\n--progress-jsonl # Machine-readable progress events (JSONL to stderr)\n--accessible # Add text labels to color-coded output (also: TW_ACCESSIBLE=1)\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## Piping Content\n\nCommands that accept content (`thread create`, `thread reply`, `comment update`, `conversation reply`, `msg update`) auto-detect piped stdin:\n\n```bash\ncat notes.md | tw thread reply <ref>\ntw thread create <channel-ref> \"Title\" < body.md\necho \"Quick reply\" | tw conversation reply <ref>\n```\n\nIf no content argument is provided and no stdin is piped, the CLI opens `$EDITOR` for interactive input.\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 with \"Alice Example\"\ntw conversation reply <id> \"Got it, thanks!\"\n```\n";
|
|
4
4
|
export declare const SKILL_FILE_CONTENT: string;
|
|
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,
|
|
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,07YA0RzB,CAAA;AAED,eAAO,MAAM,kBAAkB,QAKd,CAAA"}
|
|
@@ -80,6 +80,9 @@ tw thread mute <ref> --json # Mute and return { id, mutedUntil } as JSON
|
|
|
80
80
|
tw thread mute <ref> --json --full # Mute and return full thread as JSON
|
|
81
81
|
tw thread unmute <ref> # Unmute a muted thread
|
|
82
82
|
tw thread unmute <ref> --json # Unmute and return { id, mutedUntil } as JSON
|
|
83
|
+
tw thread delete <ref> # Preview thread deletion (requires --yes to execute)
|
|
84
|
+
tw thread delete <ref> --yes # Permanently delete a thread
|
|
85
|
+
tw thread delete <ref> --yes --json # Delete and return status as JSON
|
|
83
86
|
\`\`\`
|
|
84
87
|
|
|
85
88
|
Default \`--notify\` for reply is EVERYONE_IN_THREAD, which may notify more people than intended. Before posting, confirm with the user whether specific people should be notified instead (via \`--notify <user-ids>\`). Options: EVERYONE, EVERYONE_IN_THREAD, or comma-separated user ID refs.
|
|
@@ -199,7 +202,7 @@ tw completion uninstall # Remove completions
|
|
|
199
202
|
\`\`\`bash
|
|
200
203
|
tw update # Update CLI to latest version
|
|
201
204
|
tw update --check # Check for updates without installing, show channel
|
|
202
|
-
tw update channel
|
|
205
|
+
tw update --channel # Show current update channel
|
|
203
206
|
tw update switch --stable # Switch to stable release channel
|
|
204
207
|
tw update switch --pre-release # Switch to pre-release (next) channel
|
|
205
208
|
\`\`\`
|
|
@@ -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
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0R5B,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG;QAC1B,UAAU;eACH,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC;;;EAG9C,aAAa,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doist/twist-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.23.0",
|
|
4
4
|
"description": "TypeScript CLI for Twist",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@semantic-release/exec": "7.1.0",
|
|
67
67
|
"@semantic-release/git": "10.0.1",
|
|
68
68
|
"@types/node": "25.5.0",
|
|
69
|
-
"conventional-changelog-conventionalcommits": "9.3.
|
|
69
|
+
"conventional-changelog-conventionalcommits": "9.3.1",
|
|
70
70
|
"lefthook": "2.1.4",
|
|
71
71
|
"semantic-release": "25.0.3",
|
|
72
72
|
"typescript": "6.0.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AA0KnC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAkB1D"}
|
package/dist/commands/auth.js
DELETED
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import { createInterface } from 'node:readline';
|
|
2
|
-
import chalk from 'chalk';
|
|
3
|
-
import open from 'open';
|
|
4
|
-
import { getSessionUser } from '../lib/api.js';
|
|
5
|
-
import { clearApiToken, getAuthMetadata, saveApiToken, } from '../lib/auth.js';
|
|
6
|
-
import { startCallbackServer } from '../lib/oauth-server.js';
|
|
7
|
-
import { buildAuthorizationUrl, exchangeCodeForToken, READ_ONLY_SCOPES, READ_WRITE_SCOPES, registerDynamicClient, } from '../lib/oauth.js';
|
|
8
|
-
import { generateCodeChallenge, generateCodeVerifier, generateState } from '../lib/pkce.js';
|
|
9
|
-
async function loginWithOAuth(options) {
|
|
10
|
-
const modeLabel = options.readOnly ? 'read-only' : 'read-write';
|
|
11
|
-
console.log(chalk.blue(`Starting OAuth authentication (${modeLabel})...`));
|
|
12
|
-
try {
|
|
13
|
-
// Register dynamic client
|
|
14
|
-
console.log(chalk.dim('Registering OAuth client...'));
|
|
15
|
-
const client = await registerDynamicClient();
|
|
16
|
-
// Generate PKCE parameters
|
|
17
|
-
const codeVerifier = generateCodeVerifier();
|
|
18
|
-
const codeChallenge = generateCodeChallenge(codeVerifier);
|
|
19
|
-
const state = generateState();
|
|
20
|
-
// Start callback server
|
|
21
|
-
console.log(chalk.dim('Starting local callback server...'));
|
|
22
|
-
let cleanup;
|
|
23
|
-
try {
|
|
24
|
-
// Open browser in background after a delay
|
|
25
|
-
setTimeout(async () => {
|
|
26
|
-
try {
|
|
27
|
-
const authUrl = buildAuthorizationUrl(client.client_id, codeChallenge, state, {
|
|
28
|
-
readOnly: options.readOnly,
|
|
29
|
-
});
|
|
30
|
-
console.log(chalk.dim('Opening browser for authorization...'));
|
|
31
|
-
console.log(chalk.dim(`If the browser doesn't open, visit: ${authUrl}`));
|
|
32
|
-
await open(authUrl);
|
|
33
|
-
}
|
|
34
|
-
catch {
|
|
35
|
-
// Browser opening failure is not critical - user can use the URL manually
|
|
36
|
-
}
|
|
37
|
-
}, 1000);
|
|
38
|
-
// Wait for callback - this gives us both code and cleanup
|
|
39
|
-
const result = await startCallbackServer(state);
|
|
40
|
-
cleanup = result.cleanup;
|
|
41
|
-
console.log(chalk.dim('Exchanging authorization code for token...'));
|
|
42
|
-
const accessToken = await exchangeCodeForToken(result.code, codeVerifier, client);
|
|
43
|
-
const saveResult = await saveApiToken(accessToken, {
|
|
44
|
-
authMode: options.readOnly ? 'read-only' : 'read-write',
|
|
45
|
-
authScope: options.readOnly ? READ_ONLY_SCOPES : READ_WRITE_SCOPES,
|
|
46
|
-
});
|
|
47
|
-
console.log(chalk.green('✓'), 'OAuth authentication successful!');
|
|
48
|
-
logTokenStorageResult(saveResult, 'Token stored securely in the system credential manager');
|
|
49
|
-
}
|
|
50
|
-
finally {
|
|
51
|
-
// Always cleanup the server
|
|
52
|
-
if (cleanup) {
|
|
53
|
-
cleanup();
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
catch (error) {
|
|
58
|
-
console.log(chalk.red('✗'), 'OAuth authentication failed');
|
|
59
|
-
console.log(chalk.dim(error instanceof Error ? error.message : 'Unknown error'));
|
|
60
|
-
console.log(chalk.dim('You can try manual authentication with `tw auth token <token>`'));
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
function promptHiddenInput(prompt) {
|
|
64
|
-
return new Promise((resolve) => {
|
|
65
|
-
const rl = createInterface({
|
|
66
|
-
input: process.stdin,
|
|
67
|
-
output: process.stdout,
|
|
68
|
-
});
|
|
69
|
-
const origWrite = rl._writeToOutput;
|
|
70
|
-
rl._writeToOutput = (str) => {
|
|
71
|
-
if (str.includes(prompt)) {
|
|
72
|
-
origWrite.call(rl, prompt);
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
rl.question(prompt, (answer) => {
|
|
76
|
-
rl.close();
|
|
77
|
-
process.stdout.write('\n');
|
|
78
|
-
resolve(answer);
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
async function loginWithToken(token) {
|
|
83
|
-
if (!token) {
|
|
84
|
-
token = await promptHiddenInput('API token: ');
|
|
85
|
-
if (!token.trim()) {
|
|
86
|
-
console.error(chalk.red('Error:'), 'No token provided');
|
|
87
|
-
process.exitCode = 1;
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
const saveResult = await saveApiToken(token.trim(), { authMode: 'unknown' });
|
|
92
|
-
console.log(chalk.green('✓'), 'API token saved successfully!');
|
|
93
|
-
logTokenStorageResult(saveResult, 'Token stored securely in the system credential manager');
|
|
94
|
-
}
|
|
95
|
-
async function showStatus(options) {
|
|
96
|
-
try {
|
|
97
|
-
// Try to get session user to verify the token works
|
|
98
|
-
const user = await getSessionUser();
|
|
99
|
-
if (options.json) {
|
|
100
|
-
console.log(JSON.stringify({ id: user.id, email: user.email, name: user.name }, null, 2));
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
const metadata = await getAuthMetadata();
|
|
104
|
-
const modeLabel = metadata.authMode === 'read-only'
|
|
105
|
-
? `read-only (scope: ${metadata.authScope ?? 'unknown'})`
|
|
106
|
-
: metadata.authMode === 'read-write'
|
|
107
|
-
? 'read-write'
|
|
108
|
-
: 'unknown (manual token or env var; assuming write access)';
|
|
109
|
-
console.log(chalk.green('✓'), 'Authenticated');
|
|
110
|
-
console.log(` Email: ${user.email}`);
|
|
111
|
-
console.log(` Name: ${user.name}`);
|
|
112
|
-
console.log(` Mode: ${modeLabel}`);
|
|
113
|
-
}
|
|
114
|
-
catch {
|
|
115
|
-
if (options.json) {
|
|
116
|
-
console.log(JSON.stringify({ error: 'Not authenticated' }, null, 2));
|
|
117
|
-
process.exitCode = 1;
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
console.log(chalk.yellow('Not authenticated'));
|
|
121
|
-
console.log(chalk.dim('Run `tw auth login` for OAuth or `tw auth token <token>` for manual authentication'));
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
async function logout() {
|
|
125
|
-
const clearResult = await clearApiToken();
|
|
126
|
-
console.log(chalk.green('✓'), 'Logged out');
|
|
127
|
-
logTokenStorageResult(clearResult, 'Stored token removed from the system credential manager');
|
|
128
|
-
}
|
|
129
|
-
function logTokenStorageResult(result, secureStoreMessage) {
|
|
130
|
-
if (result.storage === 'secure-store') {
|
|
131
|
-
console.log(chalk.dim(secureStoreMessage));
|
|
132
|
-
if (result.warning) {
|
|
133
|
-
console.error(chalk.yellow('Warning:'), result.warning);
|
|
134
|
-
}
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
console.error(chalk.yellow('Warning:'), result.warning);
|
|
138
|
-
}
|
|
139
|
-
export function registerAuthCommand(program) {
|
|
140
|
-
const auth = program.command('auth').description('Manage authentication');
|
|
141
|
-
auth.command('login')
|
|
142
|
-
.description('Authenticate using OAuth (opens browser)')
|
|
143
|
-
.option('--read-only', 'Authenticate with read-only scope (no write operations)')
|
|
144
|
-
.action(loginWithOAuth);
|
|
145
|
-
auth.command('token [token]')
|
|
146
|
-
.description('Save API token for CLI authentication')
|
|
147
|
-
.action(loginWithToken);
|
|
148
|
-
auth.command('status')
|
|
149
|
-
.description('Show current authentication status')
|
|
150
|
-
.option('--json', 'Output as JSON')
|
|
151
|
-
.action(showStatus);
|
|
152
|
-
auth.command('logout').description('Remove saved authentication token').action(logout);
|
|
153
|
-
}
|
|
154
|
-
//# sourceMappingURL=auth.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EACH,aAAa,EACb,eAAe,EACf,YAAY,GAEf,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,EACH,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,GACxB,MAAM,iBAA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CAAC;SAChB,WAAW,CAAC,0CAA0C,CAAC;SACvD,MAAM,CAAC,aAAa,EAAE,yDAAyD,CAAC;SAChF,MAAM,CAAC,cAAc,CAAC,CAAA;IAE3B,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC;SACxB,WAAW,CAAC,uCAAuC,CAAC;SACpD,MAAM,CAAC,cAAc,CAAC,CAAA;IAE3B,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,oCAAoC,CAAC;SACjD,MAAM,CAAC,QAAQ,EAAE,gBAAgB,CAAC;SAClC,MAAM,CAAC,UAAU,CAAC,CAAA;IAEvB,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,mCAAmC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;AAC1F,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"away.d.ts","sourceRoot":"","sources":["../../src/commands/away.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAkInC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAyB1D"}
|
package/dist/commands/away.js
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { AWAY_MODE_TYPES, TwistRequestError } from '@doist/twist-sdk';
|
|
2
|
-
import chalk from 'chalk';
|
|
3
|
-
import { getSessionUser, getTwistClient } from '../lib/api.js';
|
|
4
|
-
import { colors, formatJson } from '../lib/output.js';
|
|
5
|
-
function formatLocalDate(d) {
|
|
6
|
-
return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`;
|
|
7
|
-
}
|
|
8
|
-
function todayStr() {
|
|
9
|
-
return formatLocalDate(new Date());
|
|
10
|
-
}
|
|
11
|
-
function tomorrowStr() {
|
|
12
|
-
const d = new Date();
|
|
13
|
-
d.setDate(d.getDate() + 1);
|
|
14
|
-
return formatLocalDate(d);
|
|
15
|
-
}
|
|
16
|
-
function formatAwayType(type) {
|
|
17
|
-
const labels = {
|
|
18
|
-
vacation: 'Vacation',
|
|
19
|
-
parental: 'Parental leave',
|
|
20
|
-
sickleave: 'Sick leave',
|
|
21
|
-
other: 'Away',
|
|
22
|
-
};
|
|
23
|
-
return labels[type] ?? type;
|
|
24
|
-
}
|
|
25
|
-
async function showAwayStatus(options) {
|
|
26
|
-
const user = await getSessionUser();
|
|
27
|
-
if (options.json) {
|
|
28
|
-
console.log(formatJson(user, 'user', options.full));
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
if (!user.awayMode) {
|
|
32
|
-
console.log('Not away.');
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
const { type, dateFrom, dateTo } = user.awayMode;
|
|
36
|
-
console.log(chalk.bold(formatAwayType(type)));
|
|
37
|
-
console.log(`From: ${colors.timestamp(dateFrom)}`);
|
|
38
|
-
console.log(`Until: ${colors.timestamp(dateTo)}`);
|
|
39
|
-
}
|
|
40
|
-
async function setAway(type, until, options) {
|
|
41
|
-
if (!AWAY_MODE_TYPES.includes(type)) {
|
|
42
|
-
console.error(`Invalid away type: ${type}. Use: ${AWAY_MODE_TYPES.join(', ')}`);
|
|
43
|
-
process.exit(1);
|
|
44
|
-
}
|
|
45
|
-
const dateFrom = options.from ?? todayStr();
|
|
46
|
-
const dateTo = until ?? tomorrowStr();
|
|
47
|
-
if (options.dryRun) {
|
|
48
|
-
console.log(`Dry run: would set away to ${formatAwayType(type)} from ${dateFrom} until ${dateTo}`);
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
const client = await getTwistClient();
|
|
52
|
-
try {
|
|
53
|
-
const user = await client.users.update({
|
|
54
|
-
awayMode: { type: type, dateFrom, dateTo },
|
|
55
|
-
});
|
|
56
|
-
if (options.json) {
|
|
57
|
-
console.log(formatJson(user, 'user', options.full));
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
console.log(`Set away: ${formatAwayType(type)} from ${dateFrom} until ${dateTo}`);
|
|
61
|
-
}
|
|
62
|
-
catch (error) {
|
|
63
|
-
handleAwayError(error);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
async function clearAway(options) {
|
|
67
|
-
if (options.dryRun) {
|
|
68
|
-
console.log('Dry run: would clear away status');
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
const client = await getTwistClient();
|
|
72
|
-
try {
|
|
73
|
-
const user = await client.users.update({ awayMode: '' });
|
|
74
|
-
if (options.json) {
|
|
75
|
-
console.log(formatJson(user, 'user', options.full));
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
console.log('Away status cleared.');
|
|
79
|
-
}
|
|
80
|
-
catch (error) {
|
|
81
|
-
handleAwayError(error);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
function isInsufficientScope(error) {
|
|
85
|
-
if (!(error instanceof TwistRequestError))
|
|
86
|
-
return false;
|
|
87
|
-
const data = error.responseData;
|
|
88
|
-
return (error.httpStatusCode === 403 && data?.error_string?.includes('Insufficient scope') === true);
|
|
89
|
-
}
|
|
90
|
-
function handleAwayError(error) {
|
|
91
|
-
if (isInsufficientScope(error)) {
|
|
92
|
-
console.error(chalk.red('Permission denied.'), 'The away status feature requires additional permissions.');
|
|
93
|
-
console.error(`Run ${chalk.cyan('tw auth login')} to re-authenticate with the required scopes.`);
|
|
94
|
-
process.exit(1);
|
|
95
|
-
}
|
|
96
|
-
throw error;
|
|
97
|
-
}
|
|
98
|
-
export function registerAwayCommand(program) {
|
|
99
|
-
const away = program
|
|
100
|
-
.command('away')
|
|
101
|
-
.description('Manage away status')
|
|
102
|
-
.option('--json', 'Output as JSON')
|
|
103
|
-
.option('--full', 'Include all fields in JSON output')
|
|
104
|
-
.action((options) => showAwayStatus(options));
|
|
105
|
-
away.command('set <type> [until]')
|
|
106
|
-
.usage('<type> [until] [options]')
|
|
107
|
-
.description('Set away status (type: vacation, parental, sickleave, other)')
|
|
108
|
-
.option('--from <date>', 'Start date (YYYY-MM-DD, defaults to today)')
|
|
109
|
-
.option('--dry-run', 'Show what would happen without executing')
|
|
110
|
-
.option('--json', 'Output as JSON')
|
|
111
|
-
.option('--full', 'Include all fields in JSON output')
|
|
112
|
-
.action((type, until, options) => setAway(type, until, options));
|
|
113
|
-
away.command('clear')
|
|
114
|
-
.description('Clear away status')
|
|
115
|
-
.option('--dry-run', 'Show what would happen without executing')
|
|
116
|
-
.option('--json', 'Output as JSON')
|
|
117
|
-
.option('--full', 'Include all fields in JSON output')
|
|
118
|
-
.action((options) => clearAway(options));
|
|
119
|
-
}
|
|
120
|
-
//# sourceMappingURL=away.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"away.js","sourceRoot":"","sources":["../../src/commands/away.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAqB,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACxF,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE9D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAIrD,SAAS,eAAe,CAAC,CAAO;IAC5B,OAAO,GAAG,CAAC,CAAC,WAAW,EAAE,IAAI,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAA;AACpH,CAAC;AAED,SAAS,QAAQ;IACb,OAAO,eAAe,CAAC,IAAI,IAAI,EAAE,CAAC,CAAA;AACtC,CAAC;AAED,SAAS,WAAW;IAChB,MAAM,CAAC,GAAG,IAAI,IAAI,EAAE,CAAA;IACpB,CAAC,CAAC,OAAO,CAAC,CAA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SACjC,MAAM,CAAC,QAAQ,EAAE,gBAAgB,CAAC;SAClC,MAAM,CAAC,QAAQ,EAAE,mCAAmC,CAAC;SACrD,MAAM,CAAC,CAAC,OAAoB,EAAE,EAAE,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAA;IAE9D,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC;SAC7B,KAAK,CAAC,0BAA0B,CAAC;SACjC,WAAW,CAAC,8DAA8D,CAAC;SAC3E,MAAM,CAAC,eAAe,EAAE,4CAA4C,CAAC;SACrE,MAAM,CAAC,WAAW,EAAE,0CAA0C,CAAC;SAC/D,MAAM,CAAC,QAAQ,EAAE,gBAAgB,CAAC;SAClC,MAAM,CAAC,QAAQ,EAAE,mCAAmC,CAAC;SACrD,MAAM,CAAC,CAAC,IAAY,EAAE,KAAyB,EAAE,OAAuB,EAAE,EAAE,CACzE,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAChC,CAAA;IAEL,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,mBAAmB,CAAC;SAChC,MAAM,CAAC,WAAW,EAAE,0CAA0C,CAAC;SAC/D,MAAM,CAAC,QAAQ,EAAE,gBAAgB,CAAC;SAClC,MAAM,CAAC,QAAQ,EAAE,mCAAmC,CAAC;SACrD,MAAM,CAAC,CAAC,OAAsC,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;AAC/E,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../src/commands/comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAgGnC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAiC7D"}
|
package/dist/commands/comment.js
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { getTwistClient } from '../lib/api.js';
|
|
2
|
-
import { formatRelativeDate } from '../lib/dates.js';
|
|
3
|
-
import { openEditor, readStdin } from '../lib/input.js';
|
|
4
|
-
import { renderMarkdown } from '../lib/markdown.js';
|
|
5
|
-
import { colors, formatJson } from '../lib/output.js';
|
|
6
|
-
import { resolveCommentId } from '../lib/refs.js';
|
|
7
|
-
async function viewComment(ref, options) {
|
|
8
|
-
const commentId = resolveCommentId(ref);
|
|
9
|
-
const client = await getTwistClient();
|
|
10
|
-
const comment = await client.comments.getComment(commentId);
|
|
11
|
-
const userResponse = await client.workspaceUsers.getUserById({ workspaceId: comment.workspaceId, userId: comment.creator }, { batch: false });
|
|
12
|
-
const creatorName = userResponse.name;
|
|
13
|
-
if (options.json) {
|
|
14
|
-
const output = { ...comment, creatorName };
|
|
15
|
-
console.log(formatJson(output, options.full ? undefined : 'comment', options.full));
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
const author = colors.author(creatorName);
|
|
19
|
-
const time = colors.timestamp(formatRelativeDate(comment.posted));
|
|
20
|
-
console.log(`${author} ${time} ${colors.timestamp(`id:${comment.id}`)}`);
|
|
21
|
-
console.log(options.raw ? comment.content : renderMarkdown(comment.content));
|
|
22
|
-
console.log('');
|
|
23
|
-
}
|
|
24
|
-
async function updateComment(ref, content, options) {
|
|
25
|
-
const commentId = resolveCommentId(ref);
|
|
26
|
-
let newContent = await readStdin();
|
|
27
|
-
if (!newContent && content) {
|
|
28
|
-
newContent = content;
|
|
29
|
-
}
|
|
30
|
-
if (!newContent) {
|
|
31
|
-
newContent = await openEditor();
|
|
32
|
-
}
|
|
33
|
-
if (!newContent || newContent.trim() === '') {
|
|
34
|
-
console.error('No content provided.');
|
|
35
|
-
process.exit(1);
|
|
36
|
-
}
|
|
37
|
-
if (options.dryRun) {
|
|
38
|
-
console.log(`Dry run: would update comment ${commentId}`);
|
|
39
|
-
console.log('');
|
|
40
|
-
console.log(newContent);
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
const client = await getTwistClient();
|
|
44
|
-
const comment = await client.comments.updateComment({
|
|
45
|
-
id: commentId,
|
|
46
|
-
content: newContent,
|
|
47
|
-
});
|
|
48
|
-
if (options.json) {
|
|
49
|
-
console.log(formatJson(comment, 'comment', options.full));
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
console.log(`Comment updated: ${comment.url}`);
|
|
53
|
-
}
|
|
54
|
-
async function deleteComment(ref, options) {
|
|
55
|
-
const commentId = resolveCommentId(ref);
|
|
56
|
-
if (options.dryRun) {
|
|
57
|
-
console.log(`Dry run: would delete comment ${commentId}`);
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
const client = await getTwistClient();
|
|
61
|
-
await client.comments.deleteComment(commentId);
|
|
62
|
-
if (options.json) {
|
|
63
|
-
console.log(formatJson({ id: commentId, deleted: true }));
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
console.log(`Comment ${commentId} deleted.`);
|
|
67
|
-
}
|
|
68
|
-
export function registerCommentCommand(program) {
|
|
69
|
-
const comment = program
|
|
70
|
-
.command('comment')
|
|
71
|
-
.description('Thread comment operations (view, update, delete)');
|
|
72
|
-
comment
|
|
73
|
-
.command('view [comment-ref]', { isDefault: true })
|
|
74
|
-
.description('View a single thread comment')
|
|
75
|
-
.option('--raw', 'Show raw markdown instead of rendered')
|
|
76
|
-
.option('--json', 'Output as JSON')
|
|
77
|
-
.option('--full', 'Include all fields in JSON output')
|
|
78
|
-
.action((ref, options) => {
|
|
79
|
-
if (!ref) {
|
|
80
|
-
comment.help();
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
return viewComment(ref, options);
|
|
84
|
-
});
|
|
85
|
-
comment
|
|
86
|
-
.command('update <comment-ref> [content]')
|
|
87
|
-
.description('Update a thread comment')
|
|
88
|
-
.option('--dry-run', 'Show what would be updated without updating')
|
|
89
|
-
.option('--json', 'Output updated comment as JSON')
|
|
90
|
-
.option('--full', 'Include all fields in JSON output')
|
|
91
|
-
.action(updateComment);
|
|
92
|
-
comment
|
|
93
|
-
.command('delete <comment-ref>')
|
|
94
|
-
.description('Delete a thread comment')
|
|
95
|
-
.option('--dry-run', 'Show what would happen without executing')
|
|
96
|
-
.option('--json', 'Output result as JSON')
|
|
97
|
-
.action(deleteComment);
|
|
98
|
-
}
|
|
99
|
-
//# sourceMappingURL=comment.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"comment.js","sourceRoot":"","sources":["../../src/commands/comment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAEnD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAMjD,KAAK,UAAU,WAAW,CAAC,GAAW,EAAE,OAAoB;IACxD,MAAM,SAAS,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAA;IACvC,MAAM,MAAM,GAAG,MAAM,cAAc,EAAE,CAAA;IACrC,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAA;IAE3D,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,WAAW,CACxD,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,OAAO,EAAE,EAC7D,EAAE,KAAK,EAAE,KAAK,EAAE,CACnB,CAAA;IACD,MAAM,WAAW,GAAG,YAAY,CAAC,IAAI,CAAA;IAErC,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;QACf,MAAM,MAAM,GAAG,EAAE,GAAG,OAAO,EAAE,WAAW,EAAE,CAA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