opencode-pilot 0.24.1 → 0.24.2
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.
|
@@ -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.24.1.tar.gz"
|
|
5
|
+
sha256 "ea5cb01e8893bdebc24b7868659355c1762e6672bfc50b2cec775f0431381adb"
|
|
6
6
|
license "MIT"
|
|
7
7
|
|
|
8
8
|
depends_on "node"
|
package/package.json
CHANGED
|
@@ -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', () => {
|