opencode-pilot 0.24.1 → 0.24.3

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/.releaserc.cjs CHANGED
@@ -22,7 +22,15 @@ module.exports = {
22
22
  // Publish to npm with provenance
23
23
  ['@semantic-release/npm', { provenance: true }],
24
24
 
25
- // Create GitHub release (creates the tag/tarball)
25
+ // Commit version bump to package.json + package-lock.json back to repo
26
+ // Runs in 'prepare' phase AFTER npm bumps package.json, BEFORE GitHub creates the tag
27
+ // This ensures the GitHub tarball includes the correct version
28
+ ['@semantic-release/git', {
29
+ assets: ['package.json', 'package-lock.json'],
30
+ message: 'chore(release): ${nextRelease.version} [skip ci]'
31
+ }],
32
+
33
+ // Create GitHub release (creates the tag/tarball from the version-bumped commit)
26
34
  '@semantic-release/github',
27
35
 
28
36
  // Update Homebrew formula with new version and SHA (runs after release is created)
package/CONTRIBUTING.md CHANGED
@@ -87,5 +87,6 @@ Releases are automated via [semantic-release](https://github.com/semantic-releas
87
87
  1. Run tests
88
88
  2. Determine the next version from commit messages
89
89
  3. Publish to npm
90
- 4. Create a GitHub release
91
- 5. Update the Homebrew formula
90
+ 4. Commit version bump (`package.json`, `package-lock.json`) back to the repo
91
+ 5. Create a GitHub release
92
+ 6. 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.23.1.tar.gz"
5
- sha256 "106172281e27a0847f1c457837c503aa64058908ab4ac5df6fb7326db4c07079"
4
+ url "https://github.com/athal7/opencode-pilot/archive/refs/tags/v0.24.2.tar.gz"
5
+ sha256 "ffdb6ca6cf6b4d0656df859c91fd287c8a466137e86accfcb2b6d1a056782562"
6
6
  license "MIT"
7
7
 
8
8
  depends_on "node"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-pilot",
3
- "version": "0.24.1",
3
+ "version": "0.24.3",
4
4
  "type": "module",
5
5
  "main": "plugin/index.js",
6
6
  "description": "Automation daemon for OpenCode - polls for work and spawns sessions",
@@ -31,6 +31,7 @@
31
31
  },
32
32
  "devDependencies": {
33
33
  "@semantic-release/exec": "^7.1.0",
34
+ "@semantic-release/git": "^10.0.1",
34
35
  "@semantic-release/github": "^9.2.6",
35
36
  "@semantic-release/npm": "^13.1.0",
36
37
  "semantic-release": "^25.0.2"
@@ -18,7 +18,7 @@ _provider:
18
18
 
19
19
  # Presets
20
20
  my-issues:
21
- name: my-issues
21
+ name: github-my-issues
22
22
  tool:
23
23
  command: ["gh", "search", "issues", "--assignee=@me", "--state=open", "--json", "number,title,url,repository,state,body,updatedAt"]
24
24
  item:
@@ -13,7 +13,7 @@ _provider:
13
13
 
14
14
  # Presets
15
15
  my-issues:
16
- name: my-issues
16
+ name: linear-my-issues
17
17
  tool:
18
18
  mcp: linear
19
19
  name: list_issues
@@ -656,7 +656,7 @@ sources:
656
656
  const sources = getSources();
657
657
 
658
658
  assert.strictEqual(sources.length, 1);
659
- assert.strictEqual(sources[0].name, 'my-issues');
659
+ assert.strictEqual(sources[0].name, 'github-my-issues');
660
660
  // GitHub presets now use gh CLI instead of MCP
661
661
  assert.ok(Array.isArray(sources[0].tool.command), 'tool.command should be an array');
662
662
  assert.ok(sources[0].tool.command.includes('gh'), 'command should use gh CLI');
@@ -714,7 +714,7 @@ sources:
714
714
  loadRepoConfig(configPath);
715
715
  const sources = getSources();
716
716
 
717
- assert.strictEqual(sources[0].name, 'my-issues');
717
+ assert.strictEqual(sources[0].name, 'linear-my-issues');
718
718
  assert.deepStrictEqual(sources[0].tool, { mcp: 'linear', name: 'list_issues' });
719
719
  assert.strictEqual(sources[0].args.teamId, 'team-uuid-123');
720
720
  assert.strictEqual(sources[0].args.assigneeId, 'user-uuid-456');
@@ -913,6 +913,43 @@ sources:
913
913
  assert.strictEqual(sources[0].worktree_name, '{number}', 'linear preset should use {number} (identifier)');
914
914
  });
915
915
 
916
+ test('all preset names are globally unique (no cross-provider collisions)', async () => {
917
+ const { listPresets, expandPreset } = await import('../../service/presets/index.js');
918
+ const presets = listPresets();
919
+
920
+ const nameToPreset = new Map();
921
+ for (const presetKey of presets) {
922
+ const expanded = expandPreset(presetKey, {});
923
+ const name = expanded.name;
924
+
925
+ assert.ok(!nameToPreset.has(name),
926
+ `Duplicate source name "${name}" from presets "${nameToPreset.get(name)}" and "${presetKey}". ` +
927
+ `Source names must be unique to prevent cross-source pollution in poll state tracking.`);
928
+ nameToPreset.set(name, presetKey);
929
+ }
930
+ });
931
+
932
+ test('github and linear my-issues presets have distinct names when used together', async () => {
933
+ writeFileSync(configPath, `
934
+ sources:
935
+ - preset: linear/my-issues
936
+ args:
937
+ teamId: "team-uuid"
938
+ assigneeId: "user-uuid"
939
+ - preset: github/my-issues
940
+ `);
941
+
942
+ const { loadRepoConfig, getSources } = await import('../../service/repo-config.js');
943
+ loadRepoConfig(configPath);
944
+ const sources = getSources();
945
+
946
+ assert.strictEqual(sources.length, 2);
947
+ assert.notStrictEqual(sources[0].name, sources[1].name,
948
+ 'Linear and GitHub my-issues presets must have different names');
949
+ assert.strictEqual(sources[0].name, 'linear-my-issues');
950
+ assert.strictEqual(sources[1].name, 'github-my-issues');
951
+ });
952
+
916
953
  });
917
954
 
918
955
  describe('shorthand syntax', () => {