Skip to content

Commit ae4d6e1

Browse files
authored
feat: upgrade to @doist/comms-sdk@0.2.0 (#2)
1 parent b30c0a9 commit ae4d6e1

57 files changed

Lines changed: 1053 additions & 1752 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,18 @@ export COMMS_API_TOKEN="your-token"
9090

9191
`COMMS_API_TOKEN` always takes priority over the stored token.
9292

93+
### Staging / alternate hosts
94+
95+
Point the CLI at a non-production Comms instance with `COMMS_BASE_URL`:
96+
97+
```bash
98+
export COMMS_BASE_URL=https://comms.staging.todoist.com
99+
export COMMS_API_TOKEN=<staging-token>
100+
tdc user
101+
```
102+
103+
The base URL is threaded through both the SDK and the search endpoint. You need a token issued by that environment — production tokens are rejected.
104+
93105
### Auth commands
94106

95107
```bash

package-lock.json

Lines changed: 46 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
],
5252
"dependencies": {
5353
"@doist/cli-core": "0.16.1",
54-
"@doist/comms-sdk": "file:../comms-sdk-typescript",
54+
"@doist/comms-sdk": "0.2.0",
5555
"@pnpm/tabtab": "0.5.4",
5656
"chalk": "5.6.2",
5757
"commander": "14.0.3",

skills/comms-cli/SKILL.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -242,16 +242,6 @@ If a channel is not found in `tdc channels`, widen with broader listings such as
242242

243243
`tdc channel threads` returns every thread in the channel; pagination filters (`--limit`, `--cursor`, `--since`, `--until`, `--unread`) are applied client-side after fetch. `--archive-filter` is applied server-side. Results are sorted newest-first by last activity. In `--json` / `--ndjson`, the response includes a `nextCursor` string (opaque) you can pass via `--cursor` to fetch the next page; NDJSON emits the cursor as a final `{ "_meta": true, "nextCursor": "..." }` line.
244244

245-
## Away Status
246-
247-
```bash
248-
tdc away # Show current away status
249-
tdc away set <type> [until] # Set away (type: vacation, parental, sickleave, other)
250-
tdc away set vacation 2026-03-20 # Away until March 20
251-
tdc away set vacation 2026-03-20 --from 2026-03-15 # Custom start date
252-
tdc away clear # Clear away status
253-
```
254-
255245
## Reactions
256246

257247
```bash

src/commands/auth/auth.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,8 @@ function createProgram() {
9898

9999
const TEST_USER: User = {
100100
id: 1,
101-
name: 'Test User',
101+
fullName: 'Test User',
102102
shortName: 'test',
103-
bot: false,
104103
timezone: 'UTC',
105104
removed: false,
106105
email: 'test@example.com',
@@ -423,7 +422,7 @@ describe('auth command', () => {
423422
// which reaches it because no token resolves in the test environment.
424423
const SNAPSHOT_ACCOUNT: CommsAccount = {
425424
id: String(TEST_USER.id),
426-
label: TEST_USER.name,
425+
label: TEST_USER.fullName,
427426
authMode: 'read-write',
428427
authScope: 'user:read threads:read',
429428
}

src/commands/auth/status.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function buildStatusText({ user, metadata }: StatusData): readonly string[] {
5252
return [
5353
`${chalk.green('✓')} Authenticated`,
5454
` Email: ${user.email}`,
55-
` Name: `,
55+
` Name: ${user.fullName}`,
5656
` Mode: ${modeLabel}`,
5757
]
5858
}

src/commands/away/away.test.ts

Lines changed: 0 additions & 176 deletions
This file was deleted.

src/commands/away/clear.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)