@jamesmurdza/opencode-daytona 0.1.16 → 0.1.18
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 +22 -15
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -12,11 +12,11 @@ This is an OpenCode plugin that automatically runs all your OpenCode sessions in
|
|
|
12
12
|
|
|
13
13
|
### Installation
|
|
14
14
|
|
|
15
|
-
You can install this
|
|
15
|
+
You can install this plugin globally or within a specific project.
|
|
16
16
|
|
|
17
17
|
To install it globally, edit `~/.config/opencode/opencode.json`. To install for a specific project, add it to `opencode.json` in the project's root directory.
|
|
18
18
|
|
|
19
|
-
Adding this
|
|
19
|
+
Adding this plugin to the plugins field will install it automatically when OpenCode starts:
|
|
20
20
|
|
|
21
21
|
```json
|
|
22
22
|
{
|
|
@@ -27,7 +27,7 @@ Adding this extension to the plugins field will install it automatically when Op
|
|
|
27
27
|
|
|
28
28
|
### Environment Configuration
|
|
29
29
|
|
|
30
|
-
This
|
|
30
|
+
This plugin requires a [Daytona account](https://www.daytona.io/) and [Daytona API key](https://app.daytona.io/dashboard/keys) to create sandboxes.
|
|
31
31
|
|
|
32
32
|
Set your Daytona API key and URL as environment variables:
|
|
33
33
|
|
|
@@ -125,21 +125,21 @@ yarn install
|
|
|
125
125
|
|
|
126
126
|
### Development and Testing
|
|
127
127
|
|
|
128
|
-
To modify the
|
|
128
|
+
To modify the plugin, edit the source code files in `libs/opencode-plugin/.opencode`.
|
|
129
129
|
|
|
130
|
-
To test the OpenCode
|
|
130
|
+
To test the OpenCode plugin, create a test project to run OpenCode in:
|
|
131
131
|
|
|
132
132
|
```bash
|
|
133
133
|
mkdir ~/myproject
|
|
134
134
|
```
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
Add a symlink from the project directory to the plugin source code:
|
|
137
137
|
|
|
138
138
|
```
|
|
139
139
|
ln -s libs/opencode-plugin/.opencode ~/myproject
|
|
140
140
|
```
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
Start OpenCode in the project directory:
|
|
143
143
|
|
|
144
144
|
```bash
|
|
145
145
|
cd ~/myproject && opencode
|
|
@@ -148,26 +148,30 @@ cd ~/myproject && opencode
|
|
|
148
148
|
Use the instructions from [Running OpenCode](#running-opencode) above to check that the plugin is running and view live logs for debugging.
|
|
149
149
|
|
|
150
150
|
> [!NOTE]
|
|
151
|
-
>
|
|
151
|
+
> When developing locally with a symlink, OpenCode loads the TypeScript source directly, so no build step is required.
|
|
152
152
|
|
|
153
|
-
###
|
|
153
|
+
### Building
|
|
154
154
|
|
|
155
|
-
|
|
155
|
+
Build the plugin:
|
|
156
156
|
|
|
157
157
|
```bash
|
|
158
|
-
npx nx run opencode-plugin:
|
|
158
|
+
npx nx run opencode-plugin:build
|
|
159
159
|
```
|
|
160
160
|
|
|
161
|
+
This compiles the TypeScript source files in `.opencode/` to JavaScript in `dist/.opencode/`.
|
|
162
|
+
|
|
163
|
+
### Publishing
|
|
164
|
+
|
|
161
165
|
Log into npm:
|
|
162
166
|
|
|
163
167
|
```bash
|
|
164
168
|
npm login
|
|
165
169
|
```
|
|
166
170
|
|
|
167
|
-
Publish the
|
|
171
|
+
Publish the compiled JavaScript package to npm:
|
|
168
172
|
|
|
169
173
|
```bash
|
|
170
|
-
npx nx
|
|
174
|
+
npx nx run opencode-plugin:publish
|
|
171
175
|
```
|
|
172
176
|
|
|
173
177
|
This will publish to npm with public access and use the version number from `package.json`.
|
|
@@ -176,14 +180,17 @@ This will publish to npm with public access and use the version number from `pac
|
|
|
176
180
|
|
|
177
181
|
```
|
|
178
182
|
libs/opencode-plugin/
|
|
179
|
-
├── .opencode/
|
|
183
|
+
├── .opencode/ # Source TypeScript files
|
|
180
184
|
│ ├── plugin/
|
|
181
185
|
│ │ ├── daytona/ # Main Daytona integration
|
|
182
186
|
│ │ │ └── ...
|
|
183
187
|
│ │ └── index.ts # Plugin entry point
|
|
184
|
-
├──
|
|
188
|
+
├── dist/ # Build output
|
|
189
|
+
│ └── .opencode/ # Compiled JavaScript files
|
|
190
|
+
├── package.json # Package metadata (includes main/types)
|
|
185
191
|
├── project.json # Nx build configuration
|
|
186
192
|
├── tsconfig.json # TypeScript config
|
|
193
|
+
├── tsconfig.build.json # TypeScript config
|
|
187
194
|
└── README.md
|
|
188
195
|
```
|
|
189
196
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jamesmurdza/opencode-daytona",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"description": "OpenCode plugin that automatically runs all sessions in Daytona sandboxes for isolated, reproducible development environments",
|
|
5
|
+
"main": "./.opencode/plugin/index.js",
|
|
6
|
+
"types": "./.opencode/plugin/index.d.ts",
|
|
5
7
|
"files": [
|
|
6
8
|
".opencode"
|
|
7
9
|
],
|