disunday 1.0.10 โ†’ 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
@@ -10,6 +10,8 @@
10
10
 
11
11
  Disunday is a Discord bot that lets you control [OpenCode](https://opencode.ai) coding sessions from Discord. Send a message in a Discord channel โ†’ an AI agent edits code on your machine.
12
12
 
13
+ > **Using Claude Code?** Check out [sleep-code](https://github.com/cheeselemon/sleep-code) - a sibling project that brings the same Discord-controlled coding experience to Claude Code.
14
+
13
15
  > **Fun fact:** This project is being developed using Disunday itself - lying on a couch, controlling OpenCode through Discord on a phone.
14
16
 
15
17
  ## Quick Start
@@ -343,7 +345,7 @@ When a hub channel is configured, session completions send notifications:
343
345
  ๐Ÿงต thread-name (link)
344
346
  ```
345
347
 
346
- ### Reaction Commands (Beta)
348
+ ### Reaction Commands
347
349
 
348
350
  Add emoji reactions to messages in threads to trigger quick actions:
349
351
 
@@ -355,7 +357,7 @@ Add emoji reactions to messages in threads to trigger quick actions:
355
357
 
356
358
  To use: manually add the emoji reaction to any message in the thread. The bot detects the reaction and performs the action. Reactions are automatically removed after the action is triggered.
357
359
 
358
- ### Context Menu Commands (Beta)
360
+ ### Context Menu Commands
359
361
 
360
362
  Right-click (or long-press on mobile) on any message in a session thread, then select **Apps** to access:
361
363
 
@@ -384,7 +386,7 @@ On startup, the bot checks npm for newer versions. If an update is available, yo
384
386
  Run: npx disunday@latest
385
387
  ```
386
388
 
387
- ### Progress Indicator (Beta)
389
+ ### Progress Indicator
388
390
 
389
391
  During long sessions, periodic updates show elapsed time:
390
392
 
@@ -446,23 +448,21 @@ Just send a message in any channel linked to a project. Disunday handles the res
446
448
 
447
449
  ### CLI Commands
448
450
 
449
- All commands run from the `discord` directory:
450
-
451
451
  ```bash
452
452
  # Start the bot (interactive setup on first run)
453
- pnpm dev
453
+ npx disunday@latest
454
454
 
455
455
  # Upload files to a Discord thread
456
- pnpm tsx src/cli.ts upload-to-discord --session <session-id> <file1> [file2...]
456
+ npx disunday upload-to-discord --session <session-id> <file1> [file2...]
457
457
 
458
458
  # Start a session programmatically (useful for CI/automation)
459
- pnpm tsx src/cli.ts send --channel <channel-id> --prompt "your prompt"
459
+ npx disunday send --channel <channel-id> --prompt "your prompt"
460
460
 
461
461
  # Send notification without starting AI session (reply to start session later)
462
- 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
463
463
 
464
464
  # Create Discord channels for a project directory (without starting a session)
465
- pnpm tsx src/cli.ts add-project [directory]
465
+ npx disunday add-project [directory]
466
466
  ```
467
467
 
468
468
  ## Add Project Channels
@@ -471,16 +471,16 @@ Create Discord channels for a project directory without starting a session. Usef
471
471
 
472
472
  ```bash
473
473
  # Add current directory as a project
474
- pnpm tsx src/cli.ts add-project
474
+ npx disunday add-project
475
475
 
476
476
  # Add a specific directory
477
- pnpm tsx src/cli.ts add-project /path/to/project
477
+ npx disunday add-project /path/to/project
478
478
 
479
479
  # Specify guild when bot is in multiple servers
480
- pnpm tsx src/cli.ts add-project ./myproject --guild 123456789
480
+ npx disunday add-project ./myproject --guild 123456789
481
481
 
482
482
  # In CI with env var for bot token
483
- 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
484
484
  ```
485
485
 
486
486
  ### Options
@@ -504,7 +504,7 @@ You can start Disunday sessions from CI pipelines, cron jobs, or any automation.
504
504
  ### CLI Options
505
505
 
506
506
  ```bash
507
- pnpm tsx src/cli.ts send \
507
+ npx disunday send \
508
508
  --channel <channel-id> # Required: Discord channel ID
509
509
  --prompt <prompt> # Required: Message content
510
510
  --name <name> # Optional: Thread name (defaults to prompt preview)
@@ -528,15 +528,11 @@ jobs:
528
528
  investigate:
529
529
  runs-on: ubuntu-latest
530
530
  steps:
531
- - name: Clone Disunday
532
- run: git clone https://github.com/code-xhyun/disunday.git
533
- - name: Install dependencies
534
- run: cd disunday && pnpm install
535
531
  - name: Start Disunday Session
536
532
  env:
537
533
  DISUNDAY_BOT_TOKEN: ${{ secrets.DISUNDAY_BOT_TOKEN }}
538
534
  run: |
539
- cd disunday/discord && pnpm tsx src/cli.ts send \
535
+ npx disunday send \
540
536
  --channel "1234567890123456789" \
541
537
  --prompt "Investigate issue ${{ github.event.issue.html_url }} using gh cli. Try fixing it in a new worktree ./${{ github.event.issue.number }}" \
542
538
  --name "Issue #${{ github.event.issue.number }}"
@@ -575,7 +571,7 @@ Use `--notify-only` for notifications that don't need immediate AI response (e.g
575
571
 
576
572
  **Graceful Restart** - Send `SIGUSR2` to restart the bot with new code without losing connections.
577
573
 
578
- ## Model & Agent Configuration
574
+ ## Model Configuration
579
575
 
580
576
  Set the AI model in your project's `opencode.json`:
581
577
 
@@ -594,13 +590,44 @@ Format: `provider/model-name`
594
590
  - `openai/gpt-4o` - GPT-4o
595
591
  - `google/gemini-2.5-pro` - Gemini 2.5 Pro
596
592
 
597
- Or use these Discord commands to change settings per channel/session:
593
+ Or use `/model` in Discord to change the model per channel or session.
594
+
595
+ ## oh-my-opencode Integration
596
+
597
+ Disunday officially supports and endorses [oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode) - a powerful agent framework that extends OpenCode with specialized agents like Prometheus (planning), Oracle (architecture), Hephaestus (implementation), and more.
598
+
599
+ ### Agent Commands
600
+
601
+ | Command | Description |
602
+ | ------- | ----------- |
603
+ | `/agent` | Select an agent from dropdown menu |
604
+ | `/prometheus-agent` | Switch to Prometheus (planning agent) |
605
+ | `/oracle-agent` | Switch to Oracle (architecture consultant) |
606
+ | `/hephaestus-agent` | Switch to Hephaestus (implementation) |
607
+ | `/<agent-name>-agent` | Quick switch to any configured agent |
608
+
609
+ Quick agent commands are auto-generated from your project's agent configuration. Only agents with `mode: "primary"` or `mode: "all"` appear as commands.
610
+
611
+ ### Agent Features
612
+
613
+ **Agent persistence** - Set a default agent per channel with `/agent`. All new sessions in that channel use that agent. Override per-session by running `/agent` inside a thread.
614
+
615
+ **Agent tag in thread name** - When you switch agents in a session, the thread name updates with a tag:
616
+ ```
617
+ Fix login bug โ†’ Fix login bug [hephaestus]
618
+ ```
619
+
620
+ **Automatic model selection** - Each agent can have its own model configured. Priority order:
621
+ 1. Session model (set via `/model` in thread)
622
+ 2. Agent model (from agent config)
623
+ 3. Channel model (set via `/model` in channel)
624
+ 4. Project default
625
+
626
+ ### Setting Up Agents
598
627
 
599
- - `/model` - Select a different AI model
600
- - `/agent` - Select a different agent (if you have multiple agents configured in your project)
601
- - `/login` - Authenticate with providers via OAuth or API key
628
+ Agents are configured in your OpenCode project. See the [oh-my-opencode documentation](https://github.com/code-yeongyu/oh-my-opencode) for setup instructions.
602
629
 
603
- When you switch agents in a session thread, the thread name is updated with the agent tag (e.g., `Fix login bug [hephaestus]`) so you can easily see which agent is active.
630
+ Once configured, restart Disunday to register the quick agent commands (`/prometheus-agent`, etc.).
604
631
 
605
632
  ---
606
633
 
@@ -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.10",
4
+ "version": "1.0.12",
5
5
  "description": "Discord bot for controlling OpenCode coding sessions",
6
6
  "author": "code-xhyun",
7
7
  "license": "MIT",