opencode-pilot 0.23.0 → 0.23.1
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.
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"ghcr.io/devcontainers/features/git:1": {},
|
|
6
6
|
"ghcr.io/devcontainers/features/github-cli:1": {}
|
|
7
7
|
},
|
|
8
|
-
"postCreateCommand": "sudo apt-get update && sudo apt-get install -y
|
|
8
|
+
"postCreateCommand": "sudo apt-get update && sudo apt-get install -y ripgrep && npm install -g opencode-ai@latest",
|
|
9
9
|
"customizations": {
|
|
10
10
|
"vscode": {
|
|
11
11
|
"extensions": [
|
package/.github/workflows/ci.yml
CHANGED
package/CONTRIBUTING.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Contributing to opencode-
|
|
1
|
+
# Contributing to opencode-pilot
|
|
2
2
|
|
|
3
3
|
Thanks for your interest in contributing!
|
|
4
4
|
|
|
@@ -6,84 +6,75 @@ Thanks for your interest in contributing!
|
|
|
6
6
|
|
|
7
7
|
1. Clone the repository:
|
|
8
8
|
```bash
|
|
9
|
-
git clone https://github.com/athal7/opencode-
|
|
10
|
-
cd opencode-
|
|
9
|
+
git clone https://github.com/athal7/opencode-pilot.git
|
|
10
|
+
cd opencode-pilot
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
2. Install
|
|
13
|
+
2. Install dependencies:
|
|
14
14
|
```bash
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
3. Set required environment variables:
|
|
19
|
-
```bash
|
|
20
|
-
export NTFY_TOPIC=your-test-topic
|
|
15
|
+
npm install
|
|
21
16
|
```
|
|
22
17
|
|
|
23
18
|
## Running Tests
|
|
24
19
|
|
|
25
|
-
Run the full test suite:
|
|
26
20
|
```bash
|
|
27
|
-
|
|
21
|
+
npm test # Unit tests
|
|
22
|
+
npm run test:integration # Integration tests
|
|
23
|
+
npm run test:all # All tests
|
|
28
24
|
```
|
|
29
25
|
|
|
30
|
-
|
|
31
|
-
- **File structure tests** - Verify all plugin files exist
|
|
32
|
-
- **Syntax validation** - Run `node --check` on all JS files
|
|
33
|
-
- **Export structure tests** - Verify expected functions are exported
|
|
34
|
-
- **Integration tests** - Test plugin loads in OpenCode without hanging (requires opencode CLI)
|
|
26
|
+
Tests use the Node.js built-in test runner (`node:test`) with `node:assert`.
|
|
35
27
|
|
|
36
28
|
## Writing Tests
|
|
37
29
|
|
|
38
|
-
Tests live in `test/`
|
|
30
|
+
Tests live in `test/unit/` and `test/integration/`. Each test file follows this pattern:
|
|
39
31
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
# Use assertions from test_helper.bash
|
|
44
|
-
assert_file_exists "$PLUGIN_DIR/myfile.js"
|
|
45
|
-
assert_contains "$output" "expected string"
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
# Register and run
|
|
49
|
-
run_test "my_feature" "test_my_feature"
|
|
50
|
-
```
|
|
32
|
+
```js
|
|
33
|
+
import { test, describe } from 'node:test';
|
|
34
|
+
import assert from 'node:assert';
|
|
51
35
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
if (myFunction() !== 'expected') throw new Error('Failed');
|
|
58
|
-
console.log('PASS');
|
|
59
|
-
" || return 1
|
|
60
|
-
}
|
|
36
|
+
describe('myModule', () => {
|
|
37
|
+
test('does the thing', () => {
|
|
38
|
+
assert.strictEqual(actual, expected);
|
|
39
|
+
});
|
|
40
|
+
});
|
|
61
41
|
```
|
|
62
42
|
|
|
63
43
|
## Code Style
|
|
64
44
|
|
|
65
45
|
- Use ES modules (`import`/`export`)
|
|
66
46
|
- Use `async`/`await` for async operations
|
|
67
|
-
- Log with `[opencode-
|
|
47
|
+
- Log with `[opencode-pilot]` prefix
|
|
68
48
|
- Handle errors gracefully (log, don't crash OpenCode)
|
|
69
|
-
- No external dependencies
|
|
49
|
+
- No external dependencies beyond what's in `package.json`
|
|
70
50
|
|
|
71
|
-
##
|
|
51
|
+
## Project Architecture
|
|
72
52
|
|
|
73
53
|
```
|
|
74
54
|
plugin/
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
├──
|
|
78
|
-
├──
|
|
79
|
-
|
|
55
|
+
└── index.js # OpenCode plugin entry point (auto-starts daemon)
|
|
56
|
+
service/
|
|
57
|
+
├── server.js # HTTP server and polling orchestration
|
|
58
|
+
├── poll-service.js # Polling lifecycle management
|
|
59
|
+
├── poller.js # MCP tool polling
|
|
60
|
+
├── actions.js # Session creation and template expansion
|
|
61
|
+
├── readiness.js # Evaluate item readiness (labels, deps, priority)
|
|
62
|
+
├── worktree.js # Git worktree management
|
|
63
|
+
├── repo-config.js # Repository discovery and config
|
|
64
|
+
├── logger.js # Debug logging
|
|
65
|
+
├── utils.js # Shared utilities
|
|
66
|
+
├── version.js # Package version detection
|
|
67
|
+
└── presets/
|
|
68
|
+
├── index.js # Preset loader
|
|
69
|
+
├── github.yaml # GitHub source presets
|
|
70
|
+
└── linear.yaml # Linear source presets
|
|
80
71
|
```
|
|
81
72
|
|
|
82
73
|
## Submitting Changes
|
|
83
74
|
|
|
84
75
|
1. Create a feature branch: `git checkout -b my-feature`
|
|
85
76
|
2. Make your changes
|
|
86
|
-
3. Run tests:
|
|
77
|
+
3. Run tests: `npm test`
|
|
87
78
|
4. Commit with a clear message following conventional commits:
|
|
88
79
|
- `feat(#1): add idle notifications`
|
|
89
80
|
- `fix(#3): handle network timeout`
|
|
@@ -91,12 +82,10 @@ plugin/
|
|
|
91
82
|
|
|
92
83
|
## Releasing
|
|
93
84
|
|
|
94
|
-
Releases are automated via
|
|
95
|
-
|
|
96
|
-
1. Tag the commit: `git tag v1.0.0`
|
|
97
|
-
2. Push the tag: `git push origin v1.0.0`
|
|
85
|
+
Releases are automated via [semantic-release](https://github.com/semantic-release/semantic-release) on merge to `main`. The CI pipeline will:
|
|
98
86
|
|
|
99
|
-
The release workflow will:
|
|
100
87
|
1. Run tests
|
|
101
|
-
2.
|
|
102
|
-
3.
|
|
88
|
+
2. Determine the next version from commit messages
|
|
89
|
+
3. Publish to npm
|
|
90
|
+
4. Create a GitHub release
|
|
91
|
+
5. Update the Homebrew formula
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
class OpencodePilot < Formula
|
|
2
2
|
desc "Automation daemon for OpenCode - polls GitHub/Linear issues and spawns sessions"
|
|
3
3
|
homepage "https://github.com/athal7/opencode-pilot"
|
|
4
|
-
url "https://github.com/athal7/opencode-pilot/archive/refs/tags/v0.
|
|
5
|
-
sha256 "
|
|
4
|
+
url "https://github.com/athal7/opencode-pilot/archive/refs/tags/v0.23.0.tar.gz"
|
|
5
|
+
sha256 "1d245b1ea0ec5db353b5558fe2dbb59de727983775464ea61d807cdbd8061087"
|
|
6
6
|
license "MIT"
|
|
7
7
|
|
|
8
8
|
depends_on "node"
|