disunday 1.0.11 → 1.0.12

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/README.md CHANGED
@@ -448,23 +448,21 @@ Just send a message in any channel linked to a project. Disunday handles the res
448
448
 
449
449
  ### CLI Commands
450
450
 
451
- All commands run from the `discord` directory:
452
-
453
451
  ```bash
454
452
  # Start the bot (interactive setup on first run)
455
- pnpm dev
453
+ npx disunday@latest
456
454
 
457
455
  # Upload files to a Discord thread
458
- pnpm tsx src/cli.ts upload-to-discord --session <session-id> <file1> [file2...]
456
+ npx disunday upload-to-discord --session <session-id> <file1> [file2...]
459
457
 
460
458
  # Start a session programmatically (useful for CI/automation)
461
- pnpm tsx src/cli.ts send --channel <channel-id> --prompt "your prompt"
459
+ npx disunday send --channel <channel-id> --prompt "your prompt"
462
460
 
463
461
  # Send notification without starting AI session (reply to start session later)
464
- pnpm tsx src/cli.ts send --channel <channel-id> --prompt "User cancelled subscription" --notify-only
462
+ npx disunday send --channel <channel-id> --prompt "User cancelled subscription" --notify-only
465
463
 
466
464
  # Create Discord channels for a project directory (without starting a session)
467
- pnpm tsx src/cli.ts add-project [directory]
465
+ npx disunday add-project [directory]
468
466
  ```
469
467
 
470
468
  ## Add Project Channels
@@ -473,16 +471,16 @@ Create Discord channels for a project directory without starting a session. Usef
473
471
 
474
472
  ```bash
475
473
  # Add current directory as a project
476
- pnpm tsx src/cli.ts add-project
474
+ npx disunday add-project
477
475
 
478
476
  # Add a specific directory
479
- pnpm tsx src/cli.ts add-project /path/to/project
477
+ npx disunday add-project /path/to/project
480
478
 
481
479
  # Specify guild when bot is in multiple servers
482
- pnpm tsx src/cli.ts add-project ./myproject --guild 123456789
480
+ npx disunday add-project ./myproject --guild 123456789
483
481
 
484
482
  # In CI with env var for bot token
485
- DISUNDAY_BOT_TOKEN=xxx pnpm tsx src/cli.ts add-project --app-id 987654321
483
+ DISUNDAY_BOT_TOKEN=xxx npx disunday add-project --app-id 987654321
486
484
  ```
487
485
 
488
486
  ### Options
@@ -506,7 +504,7 @@ You can start Disunday sessions from CI pipelines, cron jobs, or any automation.
506
504
  ### CLI Options
507
505
 
508
506
  ```bash
509
- pnpm tsx src/cli.ts send \
507
+ npx disunday send \
510
508
  --channel <channel-id> # Required: Discord channel ID
511
509
  --prompt <prompt> # Required: Message content
512
510
  --name <name> # Optional: Thread name (defaults to prompt preview)
@@ -530,15 +528,11 @@ jobs:
530
528
  investigate:
531
529
  runs-on: ubuntu-latest
532
530
  steps:
533
- - name: Clone Disunday
534
- run: git clone https://github.com/code-xhyun/disunday.git
535
- - name: Install dependencies
536
- run: cd disunday && pnpm install
537
531
  - name: Start Disunday Session
538
532
  env:
539
533
  DISUNDAY_BOT_TOKEN: ${{ secrets.DISUNDAY_BOT_TOKEN }}
540
534
  run: |
541
- cd disunday/discord && pnpm tsx src/cli.ts send \
535
+ npx disunday send \
542
536
  --channel "1234567890123456789" \
543
537
  --prompt "Investigate issue ${{ github.event.issue.html_url }} using gh cli. Try fixing it in a new worktree ./${{ github.event.issue.number }}" \
544
538
  --name "Issue #${{ github.event.issue.number }}"
@@ -16,7 +16,7 @@ export async function refreshSessionCache(projectDirectory) {
16
16
  }
17
17
  try {
18
18
  const response = await getClient().session.list({
19
- query: { directory: projectDirectory },
19
+ query: { directory: projectDirectory, limit: 1000 },
20
20
  });
21
21
  const sessions = (response.data || []).map((s) => ({
22
22
  id: s.id,
package/dist/markdown.js CHANGED
@@ -309,7 +309,7 @@ export function getCompactSessionContext({ client, sessionId, includeSystemPromp
309
309
  export function getLastSessionId({ client, excludeSessionId, }) {
310
310
  return errore.tryAsync({
311
311
  try: async () => {
312
- const sessionsResponse = await client.session.list();
312
+ const sessionsResponse = await client.session.list({ query: { limit: 1000 } });
313
313
  const sessions = sessionsResponse.data || [];
314
314
  // Sessions are sorted by time, get the most recent one that isn't the current
315
315
  const lastSession = sessions.find((s) => s.id !== excludeSessionId);
package/dist/tools.js CHANGED
@@ -157,7 +157,7 @@ export async function getTools({ onMessageCompleted, directory, }) {
157
157
  inputSchema: z.object({}),
158
158
  execute: async () => {
159
159
  toolsLogger.log(`Listing opencode sessions`);
160
- const sessions = await getClient().session.list();
160
+ const sessions = await getClient().session.list({ query: { limit: 1000 } });
161
161
  if (!sessions.data) {
162
162
  return { success: false, error: 'No sessions found' };
163
163
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "disunday",
3
3
  "type": "module",
4
- "version": "1.0.11",
4
+ "version": "1.0.12",
5
5
  "description": "Discord bot for controlling OpenCode coding sessions",
6
6
  "author": "code-xhyun",
7
7
  "license": "MIT",