opencode-discord-presence 0.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.
- package/LICENSE +21 -0
- package/README.ko.md +183 -0
- package/README.md +171 -0
- package/dist/config.d.ts +45 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/i18n/index.d.ts +10 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/locales/en.d.ts +3 -0
- package/dist/i18n/locales/en.d.ts.map +1 -0
- package/dist/i18n/locales/ja.d.ts +3 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -0
- package/dist/i18n/locales/ko.d.ts +14 -0
- package/dist/i18n/locales/ko.d.ts.map +1 -0
- package/dist/i18n/locales/zh.d.ts +3 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +30350 -0
- package/dist/plugin.d.ts +38 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/services/discord-rpc.d.ts +83 -0
- package/dist/services/discord-rpc.d.ts.map +1 -0
- package/dist/types/index.d.ts +68 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils/format.d.ts +45 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/particle.d.ts +34 -0
- package/dist/utils/particle.d.ts.map +1 -0
- package/dist/utils/project.d.ts +32 -0
- package/dist/utils/project.d.ts.map +1 -0
- package/package.json +71 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 opencode-discord-presence contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.ko.md
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# opencode-discord-presence
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/opencode-discord-presence)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+
OpenCode 세션 상태를 Discord Rich Presence로 표시합니다. 현재 사용 중인 AI 에이전트, 모델, 세션 시간 등을 Discord에서 확인할 수 있습니다.
|
|
7
|
+
|
|
8
|
+
## 기능
|
|
9
|
+
|
|
10
|
+
- **실시간 에이전트 표시** - 현재 사용 중인 AI 에이전트 (Claude, Prometheus 등) 표시
|
|
11
|
+
- **모델 정보** - 활성 모델 표시 (Claude Sonnet, GPT-4 등)
|
|
12
|
+
- **세션 시간 추적** - 코딩 시간 표시
|
|
13
|
+
- **토큰 사용량** - 세션에서 사용한 입출력 토큰 추적
|
|
14
|
+
- **프로젝트 이름** - Git 또는 디렉토리에서 현재 프로젝트 이름 표시
|
|
15
|
+
- **다국어 지원** - 한국어, 영어, 일본어, 중국어 지원
|
|
16
|
+
- **유휴 감지** - 휴식 중일 때 자동으로 상태 변경
|
|
17
|
+
|
|
18
|
+
## 설치
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# bun 사용
|
|
22
|
+
bun add opencode-discord-presence
|
|
23
|
+
|
|
24
|
+
# npm 사용
|
|
25
|
+
npm install opencode-discord-presence
|
|
26
|
+
|
|
27
|
+
# pnpm 사용
|
|
28
|
+
pnpm add opencode-discord-presence
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## 빠른 시작
|
|
32
|
+
|
|
33
|
+
`opencode.json`에 플러그인을 추가하세요:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"plugins": ["opencode-discord-presence"]
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
끝! 플러그인이 자동으로 Discord에 연결되어 세션 상태를 표시합니다.
|
|
42
|
+
|
|
43
|
+
## 설정
|
|
44
|
+
|
|
45
|
+
`opencode.json`에서 플러그인 동작을 커스터마이즈할 수 있습니다:
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"plugins": ["opencode-discord-presence"],
|
|
50
|
+
"discordPresence": {
|
|
51
|
+
"enabled": true,
|
|
52
|
+
"applicationId": "YOUR_DISCORD_APP_ID",
|
|
53
|
+
"showSessionTime": true,
|
|
54
|
+
"showTokenUsage": true,
|
|
55
|
+
"showProjectName": true,
|
|
56
|
+
"language": "ko"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### 설정 옵션
|
|
62
|
+
|
|
63
|
+
| 옵션 | 타입 | 기본값 | 설명 |
|
|
64
|
+
|------|------|--------|------|
|
|
65
|
+
| `enabled` | `boolean` | `true` | 플러그인 활성화/비활성화 |
|
|
66
|
+
| `applicationId` | `string` | (내장) | 커스텀 브랜딩을 위한 Discord Application ID |
|
|
67
|
+
| `showSessionTime` | `boolean` | `true` | 세션 시작 이후 경과 시간 표시 |
|
|
68
|
+
| `showTokenUsage` | `boolean` | `true` | 토큰 사용량 표시 (예: "12.5k 토큰") |
|
|
69
|
+
| `showProjectName` | `boolean` | `true` | Git/디렉토리에서 현재 프로젝트 이름 표시 |
|
|
70
|
+
| `language` | `string` | `"auto"` | 언어 설정 (`"auto"`, `"ko"`, `"en"`, `"ja"`, `"zh"`) |
|
|
71
|
+
|
|
72
|
+
## 커스텀 Discord Application
|
|
73
|
+
|
|
74
|
+
커스텀 브랜딩 (자신만의 이미지와 앱 이름)을 원한다면:
|
|
75
|
+
|
|
76
|
+
1. [Discord Developer Portal](https://discord.com/developers/applications)에 접속
|
|
77
|
+
2. "New Application" 클릭 후 이름 입력
|
|
78
|
+
3. "Rich Presence" → "Art Assets" 이동
|
|
79
|
+
4. 이미지 업로드 (최소 하나는 `opencode-logo`로 이름 지정)
|
|
80
|
+
5. "General Information"에서 Application ID 복사
|
|
81
|
+
6. 설정에 추가:
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"discordPresence": {
|
|
86
|
+
"applicationId": "YOUR_APPLICATION_ID"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## 작동 방식
|
|
92
|
+
|
|
93
|
+
플러그인은 OpenCode의 이벤트 시스템에 연결됩니다:
|
|
94
|
+
|
|
95
|
+
- **chat.message** - 메시지 송수신 시 현재 에이전트와 모델을 추적하여 presence 업데이트
|
|
96
|
+
- **event** - 세션 상태 변경 (유휴, 활성) 및 토큰 사용량 업데이트 감지
|
|
97
|
+
|
|
98
|
+
### Presence 상태
|
|
99
|
+
|
|
100
|
+
| 상태 | 표시 | 설명 |
|
|
101
|
+
|------|------|------|
|
|
102
|
+
| 활성 | "Prometheus를 갈구는중" | 에이전트로 활발히 코딩 중 |
|
|
103
|
+
| 유휴 | "Prometheus는 휴식중" | 세션이 유휴 상태 |
|
|
104
|
+
|
|
105
|
+
### 지원 언어
|
|
106
|
+
|
|
107
|
+
| 언어 | 코드 | 활성 상태 예시 |
|
|
108
|
+
|------|------|---------------|
|
|
109
|
+
| 한국어 | `ko` | "Prometheus를 갈구는중" |
|
|
110
|
+
| English | `en` | "Working with Prometheus" |
|
|
111
|
+
| 日本語 | `ja` | "Prometheusで作業中" |
|
|
112
|
+
| 中文 | `zh` | "正在使用 Prometheus" |
|
|
113
|
+
|
|
114
|
+
## 개발
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# 의존성 설치
|
|
118
|
+
bun install
|
|
119
|
+
|
|
120
|
+
# 테스트 실행
|
|
121
|
+
bun test
|
|
122
|
+
|
|
123
|
+
# 테스트 watch 모드
|
|
124
|
+
bun test --watch
|
|
125
|
+
|
|
126
|
+
# 타입 체크
|
|
127
|
+
bun run typecheck
|
|
128
|
+
|
|
129
|
+
# 린트
|
|
130
|
+
bun run lint
|
|
131
|
+
|
|
132
|
+
# 포맷
|
|
133
|
+
bun run format
|
|
134
|
+
|
|
135
|
+
# 빌드
|
|
136
|
+
bun run build
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## 아키텍처
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
src/
|
|
143
|
+
├── index.ts # 메인 진입점 & exports
|
|
144
|
+
├── plugin.ts # 핵심 플러그인 구현
|
|
145
|
+
├── config.ts # 설정 관리
|
|
146
|
+
├── types/
|
|
147
|
+
│ └── index.ts # TypeScript 타입 정의
|
|
148
|
+
├── i18n/
|
|
149
|
+
│ ├── index.ts # 다국어 지원
|
|
150
|
+
│ └── locales/ # 언어별 번역 파일
|
|
151
|
+
├── services/
|
|
152
|
+
│ └── discord-rpc.ts # Discord RPC 서비스 (싱글톤)
|
|
153
|
+
└── utils/
|
|
154
|
+
├── format.ts # 토큰 & 모델명 포맷팅
|
|
155
|
+
├── particle.ts # 한국어 조사 처리
|
|
156
|
+
└── project.ts # 프로젝트 이름 감지
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## 기여하기
|
|
160
|
+
|
|
161
|
+
기여를 환영합니다! 자세한 내용은 [Contributing Guide](CONTRIBUTING.md)를 참조하세요.
|
|
162
|
+
|
|
163
|
+
### 빠른 기여 가이드
|
|
164
|
+
|
|
165
|
+
1. 저장소 Fork
|
|
166
|
+
2. 기능 브랜치 생성 (`git checkout -b feature/amazing-feature`)
|
|
167
|
+
3. 테스트 실행 (`bun test`)
|
|
168
|
+
4. 변경사항 커밋 (`git commit -m 'feat: add amazing feature'`)
|
|
169
|
+
5. 브랜치에 푸시 (`git push origin feature/amazing-feature`)
|
|
170
|
+
6. Pull Request 열기
|
|
171
|
+
|
|
172
|
+
## 라이선스
|
|
173
|
+
|
|
174
|
+
MIT License - 자세한 내용은 [LICENSE](LICENSE)를 참조하세요.
|
|
175
|
+
|
|
176
|
+
## 관련 프로젝트
|
|
177
|
+
|
|
178
|
+
- [OpenCode](https://github.com/opencode-ai/opencode) - 이 플러그인이 확장하는 AI 코딩 어시스턴트
|
|
179
|
+
- [@xhayper/discord-rpc](https://github.com/xhayper/discord-rpc) - 이 플러그인에서 사용하는 Discord RPC 라이브러리
|
|
180
|
+
|
|
181
|
+
## 변경 이력
|
|
182
|
+
|
|
183
|
+
[CHANGELOG.md](CHANGELOG.md)에서 릴리스 이력을 확인하세요.
|
package/README.md
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# opencode-discord-presence
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/opencode-discord-presence)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+
[한국어](README.ko.md) | English
|
|
7
|
+
|
|
8
|
+
Display your current OpenCode session status in Discord Rich Presence. Show which AI agent you're using, the current model, session time, and more.
|
|
9
|
+
|
|
10
|
+
## Features
|
|
11
|
+
|
|
12
|
+
- **Real-time agent display** - Shows which AI agent (Claude, Prometheus, etc.) you're currently using
|
|
13
|
+
- **Model information** - Displays the active model (Claude Sonnet, GPT-4, etc.)
|
|
14
|
+
- **Session time tracking** - Shows how long you've been coding
|
|
15
|
+
- **Token usage** - Track input/output tokens consumed in your session
|
|
16
|
+
- **Project name** - Display your current project from Git or directory
|
|
17
|
+
- **Korean language support** - Proper Korean particle handling (을/를, 은/는)
|
|
18
|
+
- **Idle detection** - Automatically shows when you're taking a break
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Using bun
|
|
24
|
+
bun add opencode-discord-presence
|
|
25
|
+
|
|
26
|
+
# Using npm
|
|
27
|
+
npm install opencode-discord-presence
|
|
28
|
+
|
|
29
|
+
# Using pnpm
|
|
30
|
+
pnpm add opencode-discord-presence
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Quick Start
|
|
34
|
+
|
|
35
|
+
Add the plugin to your `opencode.json`:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"plugins": ["opencode-discord-presence"]
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
That's it! The plugin will automatically connect to Discord and display your session status.
|
|
44
|
+
|
|
45
|
+
## Configuration
|
|
46
|
+
|
|
47
|
+
Customize the plugin behavior in your `opencode.json`:
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"plugins": ["opencode-discord-presence"],
|
|
52
|
+
"discordPresence": {
|
|
53
|
+
"enabled": true,
|
|
54
|
+
"applicationId": "YOUR_DISCORD_APP_ID",
|
|
55
|
+
"showSessionTime": true,
|
|
56
|
+
"showTokenUsage": true,
|
|
57
|
+
"showProjectName": true
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Configuration Options
|
|
63
|
+
|
|
64
|
+
| Option | Type | Default | Description |
|
|
65
|
+
|--------|------|---------|-------------|
|
|
66
|
+
| `enabled` | `boolean` | `true` | Enable or disable the plugin |
|
|
67
|
+
| `applicationId` | `string` | (built-in) | Custom Discord Application ID for your own branding |
|
|
68
|
+
| `showSessionTime` | `boolean` | `true` | Show elapsed time since session start |
|
|
69
|
+
| `showTokenUsage` | `boolean` | `true` | Display token usage (e.g., "12.5k tokens") |
|
|
70
|
+
| `showProjectName` | `boolean` | `true` | Show current project name from Git/directory |
|
|
71
|
+
|
|
72
|
+
## Custom Discord Application
|
|
73
|
+
|
|
74
|
+
For custom branding (your own images and app name):
|
|
75
|
+
|
|
76
|
+
1. Go to [Discord Developer Portal](https://discord.com/developers/applications)
|
|
77
|
+
2. Click "New Application" and give it a name
|
|
78
|
+
3. Go to "Rich Presence" → "Art Assets"
|
|
79
|
+
4. Upload your images (at least one named `opencode-logo`)
|
|
80
|
+
5. Copy the Application ID from "General Information"
|
|
81
|
+
6. Add it to your config:
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"discordPresence": {
|
|
86
|
+
"applicationId": "YOUR_APPLICATION_ID"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## How It Works
|
|
92
|
+
|
|
93
|
+
The plugin hooks into OpenCode's event system:
|
|
94
|
+
|
|
95
|
+
- **chat.message** - Updates presence when you send/receive messages, tracking the current agent and model
|
|
96
|
+
- **event** - Listens for session state changes (idle, active) and token usage updates
|
|
97
|
+
|
|
98
|
+
### Presence States
|
|
99
|
+
|
|
100
|
+
| State | Display | Description |
|
|
101
|
+
|-------|---------|-------------|
|
|
102
|
+
| Active | "Prometheus를 갈구는중" | You're actively coding with an agent |
|
|
103
|
+
| Idle | "Prometheus는 휴식중" | Session is idle |
|
|
104
|
+
|
|
105
|
+
## Development
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# Install dependencies
|
|
109
|
+
bun install
|
|
110
|
+
|
|
111
|
+
# Run tests
|
|
112
|
+
bun test
|
|
113
|
+
|
|
114
|
+
# Run tests in watch mode
|
|
115
|
+
bun test --watch
|
|
116
|
+
|
|
117
|
+
# Type check
|
|
118
|
+
bun run typecheck
|
|
119
|
+
|
|
120
|
+
# Lint
|
|
121
|
+
bun run lint
|
|
122
|
+
|
|
123
|
+
# Format
|
|
124
|
+
bun run format
|
|
125
|
+
|
|
126
|
+
# Build
|
|
127
|
+
bun run build
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Architecture
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
src/
|
|
134
|
+
├── index.ts # Main entry point & exports
|
|
135
|
+
├── plugin.ts # Core plugin implementation
|
|
136
|
+
├── config.ts # Configuration management
|
|
137
|
+
├── types/
|
|
138
|
+
│ └── index.ts # TypeScript type definitions
|
|
139
|
+
├── services/
|
|
140
|
+
│ └── discord-rpc.ts # Discord RPC service (singleton)
|
|
141
|
+
└── utils/
|
|
142
|
+
├── format.ts # Token & model name formatting
|
|
143
|
+
├── particle.ts # Korean particle detection
|
|
144
|
+
└── project.ts # Project name detection
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Contributing
|
|
148
|
+
|
|
149
|
+
Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) for details.
|
|
150
|
+
|
|
151
|
+
### Quick Contribution Guide
|
|
152
|
+
|
|
153
|
+
1. Fork the repository
|
|
154
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
155
|
+
3. Run tests (`bun test`)
|
|
156
|
+
4. Commit your changes (`git commit -m 'feat: add amazing feature'`)
|
|
157
|
+
5. Push to the branch (`git push origin feature/amazing-feature`)
|
|
158
|
+
6. Open a Pull Request
|
|
159
|
+
|
|
160
|
+
## License
|
|
161
|
+
|
|
162
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
163
|
+
|
|
164
|
+
## Related Projects
|
|
165
|
+
|
|
166
|
+
- [OpenCode](https://github.com/opencode-ai/opencode) - The AI coding assistant this plugin extends
|
|
167
|
+
- [@xhayper/discord-rpc](https://github.com/xhayper/discord-rpc) - Discord RPC library used by this plugin
|
|
168
|
+
|
|
169
|
+
## Changelog
|
|
170
|
+
|
|
171
|
+
See [CHANGELOG.md](CHANGELOG.md) for release history.
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Configuration management for Discord Presence plugin
|
|
3
|
+
* @module opencode-discord-presence/config
|
|
4
|
+
*
|
|
5
|
+
* Handles plugin configuration with sensible defaults and user overrides.
|
|
6
|
+
* Configuration is typically passed from opencode.json.
|
|
7
|
+
*/
|
|
8
|
+
import type { DiscordPresenceConfig } from "./types";
|
|
9
|
+
/**
|
|
10
|
+
* Default Discord Application ID
|
|
11
|
+
* Users can override this with their own Application ID if needed.
|
|
12
|
+
* This ID should be replaced with the actual shared Application ID
|
|
13
|
+
* created in Discord Developer Portal.
|
|
14
|
+
*/
|
|
15
|
+
export declare const DEFAULT_APPLICATION_ID = "1466770544748662819";
|
|
16
|
+
/**
|
|
17
|
+
* Default configuration for the Discord Presence plugin
|
|
18
|
+
*
|
|
19
|
+
* All options are enabled by default for the best out-of-box experience.
|
|
20
|
+
*/
|
|
21
|
+
export declare const defaultConfig: DiscordPresenceConfig;
|
|
22
|
+
/**
|
|
23
|
+
* Merge user configuration with defaults
|
|
24
|
+
*
|
|
25
|
+
* @param userConfig - Partial user configuration from opencode.json
|
|
26
|
+
* @returns Complete configuration with defaults applied
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```typescript
|
|
30
|
+
* // User wants to disable token usage display
|
|
31
|
+
* const config = getConfig({ showTokenUsage: false })
|
|
32
|
+
* // config.enabled === true (default)
|
|
33
|
+
* // config.showTokenUsage === false (user override)
|
|
34
|
+
* // config.showSessionTime === true (default)
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare function getConfig(userConfig: Partial<DiscordPresenceConfig>): DiscordPresenceConfig;
|
|
38
|
+
/**
|
|
39
|
+
* Validate configuration and return warnings for invalid values
|
|
40
|
+
*
|
|
41
|
+
* @param config - Configuration to validate
|
|
42
|
+
* @returns Array of warning messages
|
|
43
|
+
*/
|
|
44
|
+
export declare function validateConfig(config: DiscordPresenceConfig): string[];
|
|
45
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,wBAAwB,CAAA;AAE3D;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,qBAO3B,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,qBAAqB,CAAC,GAAG,qBAAqB,CAK3F;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,EAAE,CActE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Locale } from "./locales/ko";
|
|
2
|
+
export type SupportedLanguage = "ko" | "en" | "ja" | "zh" | "auto";
|
|
3
|
+
export declare const supportedLanguages: Exclude<SupportedLanguage, "auto">[];
|
|
4
|
+
export declare function getLocale(language?: SupportedLanguage): Locale;
|
|
5
|
+
export declare function getAvailableLanguages(): Array<{
|
|
6
|
+
code: string;
|
|
7
|
+
name: string;
|
|
8
|
+
}>;
|
|
9
|
+
export type { Locale } from "./locales/ko";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAM,KAAK,MAAM,EAAE,MAAM,cAAc,CAAA;AAG9C,MAAM,MAAM,iBAAiB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAA;AASlE,eAAO,MAAM,kBAAkB,EAA2B,OAAO,CAAC,iBAAiB,EAAE,MAAM,CAAC,EAAE,CAAA;AAa9F,wBAAgB,SAAS,CAAC,QAAQ,GAAE,iBAA0B,GAAG,MAAM,CAMtE;AAED,wBAAgB,qBAAqB,IAAI,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAK7E;AAED,YAAY,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../src/i18n/locales/en.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAElC,eAAO,MAAM,EAAE,EAAE,MAahB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ja.d.ts","sourceRoot":"","sources":["../../../src/i18n/locales/ja.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAElC,eAAO,MAAM,EAAE,EAAE,MAahB,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface Locale {
|
|
2
|
+
code: string;
|
|
3
|
+
name: string;
|
|
4
|
+
presence: {
|
|
5
|
+
active: (agent: string) => string;
|
|
6
|
+
idle: (agent: string) => string;
|
|
7
|
+
};
|
|
8
|
+
status: {
|
|
9
|
+
opencode: string;
|
|
10
|
+
tokens: (count: string) => string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export declare const ko: Locale;
|
|
14
|
+
//# sourceMappingURL=ko.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ko.d.ts","sourceRoot":"","sources":["../../../src/i18n/locales/ko.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE;QACR,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;QACjC,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;KAChC,CAAA;IACD,MAAM,EAAE;QACN,QAAQ,EAAE,MAAM,CAAA;QAChB,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;KAClC,CAAA;CACF;AAED,eAAO,MAAM,EAAE,EAAE,MAahB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zh.d.ts","sourceRoot":"","sources":["../../../src/i18n/locales/zh.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAElC,eAAO,MAAM,EAAE,EAAE,MAahB,CAAA"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview OpenCode Discord Presence Plugin
|
|
3
|
+
* @module opencode-discord-presence
|
|
4
|
+
*
|
|
5
|
+
* This plugin displays your current OpenCode session status in Discord Rich Presence.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Shows current AI agent (Prometheus, Sisyphus, etc.)
|
|
9
|
+
* - Shows current model (Claude Sonnet 4, GPT-4o, etc.)
|
|
10
|
+
* - Status messages in Korean with proper particles
|
|
11
|
+
* - Configurable display options
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```json
|
|
15
|
+
* // opencode.json
|
|
16
|
+
* {
|
|
17
|
+
* "plugins": ["opencode-discord-presence"],
|
|
18
|
+
* "discordPresence": {
|
|
19
|
+
* "enabled": true,
|
|
20
|
+
* "showSessionTime": true,
|
|
21
|
+
* "showTokenUsage": true,
|
|
22
|
+
* "showProjectName": true
|
|
23
|
+
* }
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export { getAvailableLanguages, getLocale, supportedLanguages } from "./i18n";
|
|
28
|
+
export { OpenCodeDiscordPresence } from "./plugin";
|
|
29
|
+
export type { DiscordPresenceConfig, ModelInfo, PresenceState, SupportedLanguage, TokenCount, } from "./types";
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,qBAAqB,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAA;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAClD,YAAY,EACV,qBAAqB,EACrB,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,UAAU,GACX,MAAM,SAAS,CAAA"}
|