@doist/comms-cli 3.0.0 → 3.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 (80) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +4 -3
  3. package/dist/commands/auth/index.d.ts.map +1 -1
  4. package/dist/commands/auth/index.js +8 -3
  5. package/dist/commands/auth/index.js.map +1 -1
  6. package/dist/commands/auth/login.d.ts +2 -3
  7. package/dist/commands/auth/login.d.ts.map +1 -1
  8. package/dist/commands/auth/login.js +13 -3
  9. package/dist/commands/auth/login.js.map +1 -1
  10. package/dist/commands/auth/token.d.ts +4 -1
  11. package/dist/commands/auth/token.d.ts.map +1 -1
  12. package/dist/commands/auth/token.js +3 -3
  13. package/dist/commands/auth/token.js.map +1 -1
  14. package/dist/commands/channel/index.d.ts.map +1 -1
  15. package/dist/commands/channel/index.js +3 -0
  16. package/dist/commands/channel/index.js.map +1 -1
  17. package/dist/commands/channel/list.d.ts.map +1 -1
  18. package/dist/commands/channel/list.js +10 -4
  19. package/dist/commands/channel/list.js.map +1 -1
  20. package/dist/commands/channel/members.d.ts.map +1 -1
  21. package/dist/commands/channel/members.js +12 -6
  22. package/dist/commands/channel/members.js.map +1 -1
  23. package/dist/commands/channel/threads.d.ts.map +1 -1
  24. package/dist/commands/channel/threads.js +24 -11
  25. package/dist/commands/channel/threads.js.map +1 -1
  26. package/dist/commands/conversation/helpers.d.ts +1 -0
  27. package/dist/commands/conversation/helpers.d.ts.map +1 -1
  28. package/dist/commands/conversation/helpers.js +11 -6
  29. package/dist/commands/conversation/helpers.js.map +1 -1
  30. package/dist/commands/conversation/index.d.ts.map +1 -1
  31. package/dist/commands/conversation/index.js +2 -0
  32. package/dist/commands/conversation/index.js.map +1 -1
  33. package/dist/commands/conversation/list.d.ts.map +1 -1
  34. package/dist/commands/conversation/list.js +4 -0
  35. package/dist/commands/conversation/list.js.map +1 -1
  36. package/dist/commands/conversation/unread.d.ts.map +1 -1
  37. package/dist/commands/conversation/unread.js +10 -4
  38. package/dist/commands/conversation/unread.js.map +1 -1
  39. package/dist/commands/conversation/with.d.ts.map +1 -1
  40. package/dist/commands/conversation/with.js +2 -0
  41. package/dist/commands/conversation/with.js.map +1 -1
  42. package/dist/commands/groups/index.d.ts.map +1 -1
  43. package/dist/commands/groups/index.js +1 -0
  44. package/dist/commands/groups/index.js.map +1 -1
  45. package/dist/commands/groups/list.d.ts.map +1 -1
  46. package/dist/commands/groups/list.js +10 -4
  47. package/dist/commands/groups/list.js.map +1 -1
  48. package/dist/commands/inbox.d.ts.map +1 -1
  49. package/dist/commands/inbox.js +18 -9
  50. package/dist/commands/inbox.js.map +1 -1
  51. package/dist/commands/user.d.ts.map +1 -1
  52. package/dist/commands/user.js +11 -4
  53. package/dist/commands/user.js.map +1 -1
  54. package/dist/commands/workspace.d.ts.map +1 -1
  55. package/dist/commands/workspace.js +11 -4
  56. package/dist/commands/workspace.js.map +1 -1
  57. package/dist/index.js +7 -2
  58. package/dist/index.js.map +1 -1
  59. package/dist/lib/auth-provider.d.ts +7 -2
  60. package/dist/lib/auth-provider.d.ts.map +1 -1
  61. package/dist/lib/auth-provider.js +15 -1
  62. package/dist/lib/auth-provider.js.map +1 -1
  63. package/dist/lib/errors.d.ts +1 -1
  64. package/dist/lib/errors.d.ts.map +1 -1
  65. package/dist/lib/errors.js.map +1 -1
  66. package/dist/lib/global-args.d.ts +4 -3
  67. package/dist/lib/global-args.d.ts.map +1 -1
  68. package/dist/lib/global-args.js +5 -2
  69. package/dist/lib/global-args.js.map +1 -1
  70. package/dist/lib/options.d.ts +2 -2
  71. package/dist/lib/options.d.ts.map +1 -1
  72. package/dist/lib/output.d.ts +0 -9
  73. package/dist/lib/output.d.ts.map +1 -1
  74. package/dist/lib/output.js +0 -10
  75. package/dist/lib/output.js.map +1 -1
  76. package/dist/lib/skills/content.d.ts +1 -1
  77. package/dist/lib/skills/content.d.ts.map +1 -1
  78. package/dist/lib/skills/content.js +15 -2
  79. package/dist/lib/skills/content.js.map +1 -1
  80. package/package.json +2 -2
@@ -14,10 +14,13 @@ Access Comms messaging via the \`tdc\` CLI. Use when the user asks about their C
14
14
  tdc auth login # OAuth login (standard write scopes)
15
15
  tdc auth login --read-only # OAuth login with read-only scope
16
16
  tdc auth login --full-access # OAuth login with delete/admin scopes
17
+ tdc auth login --credential-store system # Require the system credential manager
18
+ tdc auth login --credential-store plaintext # Explicitly allow plaintext config storage
17
19
  tdc auth login --callback-port <n># Override the local OAuth callback port (default 8766)
18
20
  tdc auth login --json # Emit a JSON envelope for scripted / agent use
19
21
  tdc auth login --ndjson # Emit an NDJSON envelope for scripted / agent use
20
22
  tdc auth token # Save API token manually (prompts securely; scope unknown, assumed write-capable)
23
+ tdc auth token --credential-store system # Require the system credential manager
21
24
  tdc auth status # Verify authentication + show mode
22
25
  tdc auth status --json # Full status payload as JSON (--ndjson also supported)
23
26
  tdc auth status --user <ref> # Target a specific stored account (id, id:<n>, or display name)
@@ -33,6 +36,7 @@ tdc account [list|current|use <ref>|remove <ref>] # Manage stored accounts; all
33
36
  # current's payload is {id, label, authMode, authScope, source:"config"} | {source:"env"} | {source:"token-only"}
34
37
  tdc auth login # Re-running auth login with a different OAuth grant adds a NEW account; default stays pinned unless none was set
35
38
  tdc workspaces # List available workspaces
39
+ tdc workspaces --ids-only # Output only workspace IDs
36
40
  tdc workspace use <ref> # Set current workspace
37
41
  tdc completion install # Install shell completions
38
42
  tdc config view # Show the current CLI configuration file (token masked)
@@ -43,7 +47,7 @@ tdc changelog # Show recent changelog entries
43
47
  tdc migrate urls <urls> # Translate old twist.com URLs to Comms URLs (needs a Twist token)
44
48
  \`\`\`
45
49
 
46
- OAuth login uses Todoist OAuth for Comms access. The default grant can read Comms data and create/update content or messages. It does not include delete, channel management, or user/workspace write scopes; use \`tdc auth login --full-access\` only when needed (all \`tdc groups\` writes require it). Stored auth uses the system credential manager when available. If secure storage is unavailable, \`tdc\` warns and falls back to \`~/.config/comms-cli/config.json\`. \`COMMS_API_TOKEN\` always takes priority over the stored token.
50
+ OAuth login uses Todoist OAuth for Comms access. The default grant can read Comms data and create/update content or messages. It does not include delete, channel management, or user/workspace write scopes; use \`tdc auth login --full-access\` only when needed (all \`tdc groups\` writes require it). Credential storage defaults to \`fallback\`: use the system credential manager when available, otherwise warn and save to \`~/.config/comms-cli/config.json\`. Pass \`--credential-store system\` to fail instead of writing plaintext, or \`--credential-store plaintext\` to choose config-file storage explicitly. \`COMMS_API_TOKEN\` always takes priority over the stored token.
47
51
 
48
52
  In read-only mode (\`tdc auth login --read-only\`), commands that modify Comms data (reply, archive, react, delete, etc.) are blocked by the CLI. Externally provided tokens (\`COMMS_API_TOKEN\` or \`tdc auth token\`) are treated as unknown scope and assumed write-capable.
49
53
 
@@ -73,6 +77,7 @@ tdc inbox --archive-filter archived # Show only done threads
73
77
  tdc inbox --channel <filter> # Filter by channel name (fuzzy)
74
78
  tdc inbox --since <date> # Filter by date (ISO format)
75
79
  tdc inbox --limit <n> # Max items (default: 50)
80
+ tdc inbox --ids-only # Output only thread IDs, one per line
76
81
  \`\`\`
77
82
 
78
83
  ## Threads
@@ -162,6 +167,8 @@ tdc conversation list --name "release" # Filter by title substring (case-ins
162
167
  tdc conversation list --state archived # Archived conversations only (active|all|archived; default active)
163
168
  tdc conversation list --snippet # Include the latest message snippet
164
169
  tdc conversation list --limit 20 --json # Cap rows and output as JSON
170
+ tdc conversation list --ids-only # Output only conversation IDs
171
+ tdc conversation unread --ids-only # Output only unread conversation IDs
165
172
  tdc conversation <conversation-ref> # View conversation (shorthand for view)
166
173
  tdc conversation view <conversation-ref> # View conversation messages
167
174
  tdc conversation with <user-ref> # Find your 1:1 DM with a user
@@ -229,10 +236,12 @@ tdc user --json --full # Include all fields in JSON output
229
236
  tdc users # List active workspace users
230
237
  tdc users --search <text> # Filter by name/email
231
238
  tdc users --include-removed # Include users removed from the workspace
239
+ tdc users --ids-only # Output only user IDs
232
240
  tdc channels # List active joined workspace channels (alias of: tdc channel list)
233
241
  tdc channels --state all # Include archived joined channels too
234
242
  tdc channels --scope discoverable # Active public channels you can see but have not joined
235
243
  tdc channels --scope public --state all --json # All visible public channels, with joined status
244
+ tdc channels --ids-only # Output only channel IDs
236
245
  tdc channel create "Engineering" # Create a channel in the current workspace
237
246
  tdc channel create "Leadership Team" --private --users id:10,id:20 # Create private channel with initial members
238
247
  tdc channel create "Product" --workspace "Doist" --description "Product discussions" --json # Create and return channel as JSON
@@ -253,8 +262,10 @@ tdc channel threads <ref> --since 2026-01-01 # Filter by last-updated date (ISO)
253
262
  tdc channel threads <ref> --limit 20 # Max threads per page (default: 50)
254
263
  tdc channel threads <ref> --limit 20 --cursor <cursor-from-prev> # Paginate
255
264
  tdc channel threads <ref> --json # { results, nextCursor } with isUnread + url
265
+ tdc channel threads <ref> --ids-only # Output only thread IDs; pagination notice goes to stderr
256
266
  tdc channel members <channel-ref> # List a channel's members + groups fully in the channel
257
267
  tdc channel members <ref> --json # JSON with id, name, workspaceId, members
268
+ tdc channel members <ref> --ids-only # Output only member user IDs
258
269
  tdc channel members add <ref> alice group:Design # Add users and/or expand group:<ref> members
259
270
  tdc channel members add <ref> a@d.com id:789 --json # Add refs, output result as JSON
260
271
  tdc channel members remove <ref> alice group:Frontend # Remove users and/or group members
@@ -263,6 +274,7 @@ tdc channel members set <ref> alice bob # Dry-run by default; refuses to remove
263
274
  tdc groups # List workspace groups
264
275
  tdc groups --search "frontend" # Filter groups by name (case-insensitive)
265
276
  tdc groups --json # JSON output
277
+ tdc groups --ids-only # Output only group IDs
266
278
  tdc groups --json --full # Include all fields in JSON output
267
279
  tdc groups view <group-ref> # Show group with member details
268
280
  tdc groups view <ref> --json # JSON output with id, name, workspaceId, members
@@ -387,11 +399,12 @@ Output is one line per URL in input order: \`old -> new\` on success, \`old ✗
387
399
 
388
400
  ## Output Formats
389
401
 
390
- All list/view commands support:
402
+ List and view commands commonly support \`--json\`, \`--ndjson\`, and \`--full\`. List commands with one clear entity ID also support \`--ids-only\`; check command help for the exact surface.
391
403
 
392
404
  \`\`\`bash
393
405
  --json # Output as JSON
394
406
  --ndjson # Output as newline-delimited JSON (for streaming)
407
+ --ids-only # Output one stable ID per line; mutually exclusive with JSON/NDJSON
395
408
  --full # Include all fields (default shows essential fields only)
396
409
  \`\`\`
397
410
 
@@ -1 +1 @@
1
- {"version":3,"file":"content.js","sourceRoot":"","sources":["../../../src/lib/skills/content.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,uBAAuB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAA;AAErE,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAA;AAErC,MAAM,CAAC,MAAM,iBAAiB,GAC1B,wTAAwT,CAAA;AAE5T,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAA;AAEnC,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAA;AAElC,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC,OAAO,CAAA;AAEhD,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6c5B,CAAA;AAED,MAAM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kBAAkB,GAAG;QAC1B,UAAU;eACH,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC;WACrC,aAAa;;YAEZ,YAAY;aACX,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC;;;EAGxC,aAAa,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doist/comms-cli",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "TypeScript CLI for Comms",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -51,7 +51,7 @@
51
51
  "CHANGELOG.md"
52
52
  ],
53
53
  "dependencies": {
54
- "@doist/cli-core": "0.26.2",
54
+ "@doist/cli-core": "1.4.0",
55
55
  "@doist/comms-sdk": "3.0.0",
56
56
  "@pnpm/tabtab": "0.5.4",
57
57
  "chalk": "5.6.2",