oh-my-claudecode-opencode 0.6.8 → 0.6.9

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/dist/index.js CHANGED
@@ -21846,6 +21846,22 @@ function createBackgroundManager(ctx, config2, modelService) {
21846
21846
  const tasks = new Map;
21847
21847
  const defaultConcurrency = config2?.defaultConcurrency ?? 5;
21848
21848
  const modelCache = new Map;
21849
+ const TASK_MAX_AGE_MS = 60 * 60 * 1000;
21850
+ const cleanupOldTasks = () => {
21851
+ const now = Date.now();
21852
+ for (const [id, task] of tasks) {
21853
+ if (task.status !== "running" && task.completedAt) {
21854
+ if (now - task.completedAt > TASK_MAX_AGE_MS) {
21855
+ tasks.delete(id);
21856
+ log(`Cleaned up old task`, { taskId: id });
21857
+ }
21858
+ }
21859
+ }
21860
+ };
21861
+ const cleanupInterval = setInterval(cleanupOldTasks, 10 * 60 * 1000);
21862
+ if (cleanupInterval.unref) {
21863
+ cleanupInterval.unref();
21864
+ }
21849
21865
  const getRunningCount = (parentSessionID) => {
21850
21866
  let count = 0;
21851
21867
  for (const task of tasks.values()) {
@@ -21982,7 +21998,9 @@ ${prompt}` : prompt;
21982
21998
  variant: "success",
21983
21999
  duration: 3000
21984
22000
  }
21985
- }).catch(() => {});
22001
+ }).catch((err) => {
22002
+ log(`Toast notification failed`, { taskId, error: String(err) });
22003
+ });
21986
22004
  } catch (err) {
21987
22005
  task.status = "failed";
21988
22006
  task.error = String(err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-claudecode-opencode",
3
- "version": "0.6.8",
3
+ "version": "0.6.9",
4
4
  "description": "OpenCode port of oh-my-claudecode - Multi-agent orchestration plugin (omco)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,11 +8,18 @@ PLUGIN_DIR="$HOME/.config/opencode/node_modules/oh-my-claudecode-opencode"
8
8
  echo "Building..."
9
9
  bun run build
10
10
 
11
- echo "Copying to $PLUGIN_DIR..."
12
- cp -r dist/ "$PLUGIN_DIR/dist/"
13
- cp -r assets/ "$PLUGIN_DIR/assets/"
14
- cp package.json "$PLUGIN_DIR/package.json"
11
+ # Check if package.json is a symlink (means using file: dependency with linked files)
12
+ if [ -L "$PLUGIN_DIR/package.json" ]; then
13
+ echo "Detected file: dependency installation - files are already symlinked."
14
+ echo "Build output is directly accessible via symlinks."
15
+ else
16
+ echo "Copying to $PLUGIN_DIR..."
17
+ cp -r dist/ "$PLUGIN_DIR/dist/"
18
+ cp -r assets/ "$PLUGIN_DIR/assets/"
19
+ cp package.json "$PLUGIN_DIR/package.json"
20
+ fi
15
21
 
22
+ echo ""
16
23
  echo "Verifying..."
17
24
  SKILL_COUNT=$(ls "$PLUGIN_DIR/assets/skills/" | wc -l)
18
25
  VERSION=$(grep '"version"' "$PLUGIN_DIR/package.json" | head -1 | sed 's/.*: "\(.*\)".*/\1/')
@@ -49,7 +49,7 @@ function ensureConfigDir() {
49
49
  const configDir = join(homedir(), '.config', 'opencode');
50
50
  if (!existsSync(configDir)) {
51
51
  mkdirSync(configDir, { recursive: true });
52
- console.log('[omco] Created config directory:', configDir);
52
+ console.error('[omco] Created config directory:', configDir);
53
53
  }
54
54
  }
55
55
 
@@ -73,13 +73,15 @@ function main() {
73
73
  config.provider = {};
74
74
  }
75
75
 
76
- // Check if github-copilot already exists
77
- if (config.provider['github-copilot']) {
78
- console.log('[omco] github-copilot provider already configured in opencode.json');
76
+ // Skip if user already has any providers configured (don't override user setup)
77
+ const existingProviders = Object.keys(config.provider || {});
78
+ if (existingProviders.length > 0) {
79
+ console.error('[omco] Skipping auto-config: providers already configured:', existingProviders.join(', '));
80
+ console.error('[omco] Run "npx omco-setup" to manually add github-copilot provider if needed.');
79
81
  return;
80
82
  }
81
-
82
- // Add github-copilot provider
83
+
84
+ // Only auto-configure for fresh installs with no providers
83
85
  config.provider['github-copilot'] = GITHUB_COPILOT_PROVIDER;
84
86
 
85
87
  // Add plugin if not present
@@ -94,13 +96,13 @@ function main() {
94
96
  writeFileSync(configPath, JSON.stringify(config, null, 2));
95
97
 
96
98
  if (configExists) {
97
- console.log('[omco] ✅ Added github-copilot provider to opencode.json');
99
+ console.error('[omco] ✅ Added github-copilot provider to opencode.json');
98
100
  } else {
99
- console.log('[omco] ✅ Created opencode.json with github-copilot provider');
101
+ console.error('[omco] ✅ Created opencode.json with github-copilot provider');
100
102
  }
101
103
 
102
- console.log('[omco] Config path:', configPath);
103
- console.log('[omco] Available models: claude-opus-4.5, claude-sonnet-4, claude-haiku-4');
104
+ console.error('[omco] Config path:', configPath);
105
+ console.error('[omco] Available models: claude-opus-4.5, claude-sonnet-4, claude-haiku-4');
104
106
 
105
107
  } catch (error) {
106
108
  // Don't fail install on config errors - just warn