Skip to content

Commit f031914

Browse files
authored
Publish Roo Code types to NPM (#3563)
1 parent 7a8613c commit f031914

File tree

8 files changed

+7150
-0
lines changed

8 files changed

+7150
-0
lines changed

roo-code-types/.gitignore

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Dependency directories
2+
node_modules/
3+
npm-debug.log
4+
yarn-debug.log
5+
yarn-error.log
6+
7+
# Build output
8+
dist/
9+
build/
10+
11+
# Environment variables
12+
.env
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
# Editor directories and files
19+
.idea/
20+
.vscode/
21+
*.suo
22+
*.ntvs*
23+
*.njsproj
24+
*.sln
25+
*.sw?
26+
27+
# OS generated files
28+
.DS_Store
29+
.DS_Store?
30+
._*
31+
.Spotlight-V100
32+
.Trashes
33+
ehthumbs.db
34+
Thumbs.db

roo-code-types/.releaserc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"branches": ["main"]
3+
}

roo-code-types/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Roo Code Inc
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.

roo-code-types/README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Roo Code Types
2+
3+
TypeScript type definitions for Roo Code.
4+
5+
## Installation
6+
7+
```bash
8+
npm install roo-code-types
9+
```
10+
11+
or
12+
13+
```bash
14+
yarn add roo-code-types
15+
```
16+
17+
## Usage
18+
19+
Import the types in your TypeScript files:
20+
21+
```typescript
22+
import {
23+
RooCodeAPI,
24+
RooCodeSettings,
25+
GlobalSettings,
26+
ProviderSettings,
27+
ClineMessage,
28+
TokenUsage,
29+
RooCodeEventName,
30+
RooCodeEvents,
31+
} from "roo-code-types"
32+
33+
// Use the types in your code
34+
const settings: RooCodeSettings = {
35+
// Your settings here
36+
}
37+
38+
// Example: Type an event handler
39+
function handleMessage(event: RooCodeEvents["message"][0]) {
40+
console.log(event.message.text)
41+
}
42+
```
43+
44+
## Available Types
45+
46+
- `GlobalSettings`: Global configuration settings for Roo Code
47+
- `ProviderSettings`: Provider-specific settings
48+
- `ProviderSettingsEntry`: Entry for a provider configuration
49+
- `ClineMessage`: Message structure for Cline interactions
50+
- `TokenUsage`: Structure for token usage information
51+
- `RooCodeEvents`: Event types for the Roo Code API
52+
- `RooCodeEventName`: Enum of event names
53+
- `RooCodeSettings`: Combined global and provider settings
54+
- `RooCodeAPI`: Interface for the Roo Code API
55+
56+
## License
57+
58+
MIT

0 commit comments

Comments
 (0)