@cloudpftc/opencode-orchestrator 3.5.15 → 3.6.0

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,6 +1,6 @@
1
1
  /**
2
2
  * Helpers Generator
3
- * Creates utility scripts in .claude/helpers/
3
+ * Creates utility scripts in .opencode/helpers/
4
4
  */
5
5
  import type { InitOptions } from './types.js';
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Helpers Generator
3
- * Creates utility scripts in .claude/helpers/
3
+ * Creates utility scripts in .opencode/helpers/
4
4
  */
5
5
  import { generateStatuslineScript, generateStatuslineHook } from './statusline-generator.js';
6
6
  /**
@@ -70,7 +70,7 @@ export function generateSessionManager() {
70
70
  const fs = require('fs');
71
71
  const path = require('path');
72
72
 
73
- const SESSION_DIR = path.join(process.cwd(), '.claude-flow', 'sessions');
73
+ const SESSION_DIR = path.join(process.cwd(), '.opencode', 'sessions');
74
74
  const SESSION_FILE = path.join(SESSION_DIR, 'current.json');
75
75
 
76
76
  const commands = {
@@ -275,7 +275,7 @@ export function generateMemoryHelper() {
275
275
  const fs = require('fs');
276
276
  const path = require('path');
277
277
 
278
- const MEMORY_DIR = path.join(process.cwd(), '.claude-flow', 'data');
278
+ const MEMORY_DIR = path.join(process.cwd(), '.opencode', 'data');
279
279
  const MEMORY_FILE = path.join(MEMORY_DIR, 'memory.json');
280
280
 
281
281
  function loadMemory() {
@@ -604,11 +604,11 @@ export function generateIntelligenceStub() {
604
604
  "const path = require('path');",
605
605
  "const os = require('os');",
606
606
  '',
607
- "const DATA_DIR = path.join(process.cwd(), '.claude-flow', 'data');",
607
+ "const DATA_DIR = path.join(process.cwd(), '.opencode', 'data');",
608
608
  "const STORE_PATH = path.join(DATA_DIR, 'auto-memory-store.json');",
609
609
  "const RANKED_PATH = path.join(DATA_DIR, 'ranked-context.json');",
610
610
  "const PENDING_PATH = path.join(DATA_DIR, 'pending-insights.jsonl');",
611
- "const SESSION_DIR = path.join(process.cwd(), '.claude-flow', 'sessions');",
611
+ "const SESSION_DIR = path.join(process.cwd(), '.opencode', 'sessions');",
612
612
  "const SESSION_FILE = path.join(SESSION_DIR, 'current.json');",
613
613
  '',
614
614
  'function ensureDir(dir) {',
@@ -651,8 +651,8 @@ export function generateIntelligenceStub() {
651
651
  'function bootstrapFromMemoryFiles() {',
652
652
  ' var entries = [];',
653
653
  ' var candidates = [',
654
- ' path.join(os.homedir(), ".claude", "projects"),',
655
- ' path.join(process.cwd(), ".claude-flow", "memory"),',
654
+ ' path.join(os.homedir(), ".opencode", "projects"),',
655
+ ' path.join(process.cwd(), ".opencode", "memory"),',
656
656
  ' path.join(process.cwd(), ".claude", "memory"),',
657
657
  ' ];',
658
658
  ' for (var i = 0; i < candidates.length; i++) {',
@@ -816,7 +816,7 @@ import { fileURLToPath } from 'url';
816
816
  const __filename = fileURLToPath(import.meta.url);
817
817
  const __dirname = dirname(__filename);
818
818
  const PROJECT_ROOT = join(__dirname, '../..');
819
- const DATA_DIR = join(PROJECT_ROOT, '.claude-flow', 'data');
819
+ const DATA_DIR = join(PROJECT_ROOT, '.opencode', 'data');
820
820
  const STORE_PATH = join(DATA_DIR, 'auto-memory-store.json');
821
821
 
822
822
  const DIM = '\\x1b[2m';
@@ -908,7 +908,7 @@ try {
908
908
  * Generate Windows PowerShell daemon manager
909
909
  */
910
910
  export function generateWindowsDaemonManager() {
911
- return `# RuFlo V3 Daemon Manager for Windows
911
+ return `# OpenCode Orchestrator Daemon Manager for Windows
912
912
  # PowerShell script for managing background processes
913
913
 
914
914
  param(
@@ -918,8 +918,8 @@ param(
918
918
  )
919
919
 
920
920
  $ErrorActionPreference = 'SilentlyContinue'
921
- $ClaudeFlowDir = Join-Path $PWD '.claude-flow'
922
- $PidDir = Join-Path $ClaudeFlowDir 'pids'
921
+ $OpenCodeDir = Join-Path $PWD '.opencode'
922
+ $PidDir = Join-Path $OpenCodeDir 'pids'
923
923
 
924
924
  # Ensure directories exist
925
925
  if (-not (Test-Path $PidDir)) {
@@ -951,7 +951,7 @@ function Start-SwarmMonitor {
951
951
  Write-Host "Starting swarm monitor..." -ForegroundColor Cyan
952
952
  $process = Start-Process -FilePath 'node' -ArgumentList @(
953
953
  '-e',
954
- 'setInterval(() => { require("fs").writeFileSync(".claude-flow/metrics/swarm-activity.json", JSON.stringify({swarm:{active:true,agent_count:0},timestamp:Date.now()})) }, 5000)'
954
+ 'setInterval(() => { require("fs").writeFileSync(".opencode/metrics/swarm-activity.json", JSON.stringify({swarm:{active:true,agent_count:0},timestamp:Date.now()})) }, 5000)'
955
955
  ) -PassThru -WindowStyle Hidden
956
956
 
957
957
  $process.Id | Out-File $pidFile
@@ -974,8 +974,8 @@ function Stop-SwarmMonitor {
974
974
 
975
975
  function Show-Status {
976
976
  Write-Host ""
977
- Write-Host "RuFlo V3 Daemon Status" -ForegroundColor Cyan
978
- Write-Host "=============================" -ForegroundColor Cyan
977
+ Write-Host "OpenCode Orchestrator V3 Daemon Status" -ForegroundColor Cyan
978
+ Write-Host "=========================================" -ForegroundColor Cyan
979
979
 
980
980
  $swarmPid = Join-Path $PidDir 'swarm-monitor.pid'
981
981
  $swarmStatus = Get-DaemonStatus -Name 'swarm-monitor' -PidFile $swarmPid
@@ -1014,7 +1014,7 @@ switch ($Action) {
1014
1014
  */
1015
1015
  export function generateWindowsBatchWrapper() {
1016
1016
  return `@echo off
1017
- REM RuFlo V3 - Windows Batch Wrapper
1017
+ REM OpenCode Orchestrator V3 - Windows Batch Wrapper
1018
1018
  REM Routes to PowerShell daemon manager
1019
1019
 
1020
1020
  PowerShell -ExecutionPolicy Bypass -File "%~dp0daemon-manager.ps1" %*
@@ -1026,7 +1026,7 @@ PowerShell -ExecutionPolicy Bypass -File "%~dp0daemon-manager.ps1" %*
1026
1026
  export function generateCrossPlatformSessionManager() {
1027
1027
  return `#!/usr/bin/env node
1028
1028
  /**
1029
- * Claude Flow Cross-Platform Session Manager
1029
+ * OpenCode Orchestrator Cross-Platform Session Manager
1030
1030
  * Works on Windows, macOS, and Linux
1031
1031
  */
1032
1032
 
@@ -1040,18 +1040,18 @@ const homeDir = os.homedir();
1040
1040
 
1041
1041
  // Get data directory based on platform
1042
1042
  function getDataDir() {
1043
- const localDir = path.join(process.cwd(), '.claude-flow', 'sessions');
1043
+ const localDir = path.join(process.cwd(), '.opencode', 'sessions');
1044
1044
  if (fs.existsSync(path.dirname(localDir))) {
1045
1045
  return localDir;
1046
1046
  }
1047
1047
 
1048
1048
  switch (platform) {
1049
1049
  case 'win32':
1050
- return path.join(process.env.APPDATA || homeDir, 'claude-flow', 'sessions');
1050
+ return path.join(process.env.APPDATA || homeDir, 'opencode', 'sessions');
1051
1051
  case 'darwin':
1052
- return path.join(homeDir, 'Library', 'Application Support', 'claude-flow', 'sessions');
1052
+ return path.join(homeDir, 'Library', 'Application Support', 'opencode', 'sessions');
1053
1053
  default:
1054
- return path.join(homeDir, '.claude-flow', 'sessions');
1054
+ return path.join(homeDir, '.opencode', 'sessions');
1055
1055
  }
1056
1056
  }
1057
1057
 
@@ -7,7 +7,7 @@ export { generateSettings, generateSettingsJson, } from './settings-generator.js
7
7
  export { generateMCPConfig, generateMCPJson, generateMCPCommands, } from './mcp-generator.js';
8
8
  export { generateStatuslineScript, generateStatuslineHook, } from './statusline-generator.js';
9
9
  export { generatePreCommitHook, generatePostCommitHook, generateSessionManager, generateAgentRouter, generateMemoryHelper, generateHelpers, generateWindowsDaemonManager, generateWindowsBatchWrapper, generateCrossPlatformSessionManager, } from './helpers-generator.js';
10
- export { generateClaudeMd, generateMinimalClaudeMd, CLAUDE_MD_TEMPLATES, } from './claudemd-generator.js';
10
+ export { generateSkillMd, generateMinimalSkillMd, SKILL_MD_TEMPLATES, } from './skillmd-generator.js';
11
11
  export { executeInit, executeUpgrade, executeUpgradeWithMissing, default } from './executor.js';
12
12
  export type { UpgradeResult } from './executor.js';
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -9,7 +9,7 @@ export { generateSettings, generateSettingsJson, } from './settings-generator.js
9
9
  export { generateMCPConfig, generateMCPJson, generateMCPCommands, } from './mcp-generator.js';
10
10
  export { generateStatuslineScript, generateStatuslineHook, } from './statusline-generator.js';
11
11
  export { generatePreCommitHook, generatePostCommitHook, generateSessionManager, generateAgentRouter, generateMemoryHelper, generateHelpers, generateWindowsDaemonManager, generateWindowsBatchWrapper, generateCrossPlatformSessionManager, } from './helpers-generator.js';
12
- export { generateClaudeMd, generateMinimalClaudeMd, CLAUDE_MD_TEMPLATES, } from './claudemd-generator.js';
12
+ export { generateSkillMd, generateMinimalSkillMd, SKILL_MD_TEMPLATES, } from './skillmd-generator.js';
13
13
  // Main executor
14
14
  export { executeInit, executeUpgrade, executeUpgradeWithMissing, default } from './executor.js';
15
15
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MCP Configuration Generator
3
- * Creates .mcp.json for Claude Code and OpenCode MCP server integration
3
+ * Creates opencode.json for OpenCode MCP server integration
4
4
  * Handles cross-platform compatibility (Windows requires cmd /c wrapper)
5
5
  */
6
6
  import type { InitOptions } from './types.js';
@@ -9,7 +9,7 @@ import type { InitOptions } from './types.js';
9
9
  */
10
10
  export declare function generateMCPConfig(options: InitOptions): object;
11
11
  /**
12
- * Generate .mcp.json as formatted string
12
+ * Generate opencode.json as formatted string
13
13
  */
14
14
  export declare function generateMCPJson(options: InitOptions): string;
15
15
  /**
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * MCP Configuration Generator
3
- * Creates .mcp.json for Claude Code and OpenCode MCP server integration
3
+ * Creates opencode.json for OpenCode MCP server integration
4
4
  * Handles cross-platform compatibility (Windows requires cmd /c wrapper)
5
5
  */
6
6
  /**
@@ -40,15 +40,15 @@ export function generateMCPConfig(options) {
40
40
  const npmEnv = {
41
41
  npm_config_update_notifier: 'false',
42
42
  };
43
- // Claude Flow MCP server (core)
43
+ // OpenCode Orchestrator MCP server (core)
44
44
  if (config.claudeFlow) {
45
- mcpServers['claude-flow'] = createMCPServerEntry(['@claude-flow/cli@latest', 'mcp', 'start'], {
45
+ mcpServers['opencode-orchestrator'] = createMCPServerEntry(['@cloudpftc/opencode-orchestrator@latest', 'mcp', 'start'], {
46
46
  ...npmEnv,
47
- CLAUDE_FLOW_MODE: 'v3',
48
- CLAUDE_FLOW_HOOKS_ENABLED: 'true',
49
- CLAUDE_FLOW_TOPOLOGY: options.runtime.topology,
50
- CLAUDE_FLOW_MAX_AGENTS: String(options.runtime.maxAgents),
51
- CLAUDE_FLOW_MEMORY_BACKEND: options.runtime.memoryBackend,
47
+ OPENCODE_MODE: 'v3',
48
+ OPENCODE_HOOKS_ENABLED: 'true',
49
+ OPENCODE_TOPOLOGY: options.runtime.topology,
50
+ OPENCODE_MAX_AGENTS: String(options.runtime.maxAgents),
51
+ OPENCODE_MEMORY_BACKEND: options.runtime.memoryBackend,
52
52
  }, { autoStart: config.autoStart });
53
53
  }
54
54
  // Ruv-Swarm MCP server (enhanced coordination)
@@ -62,7 +62,7 @@ export function generateMCPConfig(options) {
62
62
  return { mcpServers };
63
63
  }
64
64
  /**
65
- * Generate .mcp.json as formatted string
65
+ * Generate opencode.json as formatted string
66
66
  */
67
67
  export function generateMCPJson(options) {
68
68
  const config = generateMCPConfig(options);
@@ -76,24 +76,24 @@ export function generateMCPCommands(options) {
76
76
  const config = options.mcp;
77
77
  if (isWindows()) {
78
78
  if (config.claudeFlow) {
79
- commands.push('claude mcp add claude-flow -- cmd /c npx -y @claude-flow/cli@latest mcp start');
79
+ commands.push('opencode mcp add opencode-orchestrator -- cmd /c npx -y @cloudpftc/opencode-orchestrator@latest mcp start');
80
80
  }
81
81
  if (config.ruvSwarm) {
82
- commands.push('claude mcp add ruv-swarm -- cmd /c npx -y ruv-swarm mcp start');
82
+ commands.push('opencode mcp add ruv-swarm -- cmd /c npx -y ruv-swarm mcp start');
83
83
  }
84
84
  if (config.flowNexus) {
85
- commands.push('claude mcp add flow-nexus -- cmd /c npx -y flow-nexus@latest mcp start');
85
+ commands.push('opencode mcp add flow-nexus -- cmd /c npx -y flow-nexus@latest mcp start');
86
86
  }
87
87
  }
88
88
  else {
89
89
  if (config.claudeFlow) {
90
- commands.push("claude mcp add claude-flow -- npx -y @claude-flow/cli@latest mcp start");
90
+ commands.push("opencode mcp add opencode-orchestrator -- npx -y @cloudpftc/opencode-orchestrator@latest mcp start");
91
91
  }
92
92
  if (config.ruvSwarm) {
93
- commands.push("claude mcp add ruv-swarm -- npx -y ruv-swarm mcp start");
93
+ commands.push("opencode mcp add ruv-swarm -- npx -y ruv-swarm mcp start");
94
94
  }
95
95
  if (config.flowNexus) {
96
- commands.push("claude mcp add flow-nexus -- npx -y flow-nexus@latest mcp start");
96
+ commands.push("opencode mcp add flow-nexus -- npx -y flow-nexus@latest mcp start");
97
97
  }
98
98
  }
99
99
  return commands;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * OpenCode Configuration Generator
3
+ * Creates opencode.json for OpenCode integration
4
+ */
5
+ import type { InitOptions } from './types.js';
6
+ /**
7
+ * OpenCode configuration schema
8
+ */
9
+ export interface OpenCodeConfig {
10
+ $schema: string;
11
+ mcp: Record<string, MCPConfig>;
12
+ agent: Record<string, AgentConfig>;
13
+ permission: Record<string, string>;
14
+ }
15
+ export interface MCPConfig {
16
+ type: 'local' | 'remote';
17
+ command?: string[];
18
+ url?: string;
19
+ enabled: boolean;
20
+ }
21
+ export interface AgentConfig {
22
+ description: string;
23
+ model: string;
24
+ mode: 'primary' | 'specialist';
25
+ }
26
+ /**
27
+ * Generate OpenCode configuration
28
+ */
29
+ export declare function generateOpenCodeConfig(options: InitOptions): OpenCodeConfig;
30
+ /**
31
+ * Generate minimal OpenCode configuration
32
+ */
33
+ export declare function generateMinimalOpenCodeConfig(): OpenCodeConfig;
34
+ /**
35
+ * OpenCode configuration templates
36
+ */
37
+ export declare const OPENCODE_CONFIG_TEMPLATES: Array<{
38
+ name: string;
39
+ description: string;
40
+ }>;
41
+ export default generateOpenCodeConfig;
42
+ //# sourceMappingURL=opencode-generator.d.ts.map
@@ -0,0 +1,107 @@
1
+ /**
2
+ * OpenCode Configuration Generator
3
+ * Creates opencode.json for OpenCode integration
4
+ */
5
+ /**
6
+ * Generate OpenCode configuration
7
+ */
8
+ export function generateOpenCodeConfig(options) {
9
+ const config = {
10
+ $schema: 'https://opencode.ai/config.json',
11
+ mcp: {},
12
+ agent: {},
13
+ permission: getDefaultPermissions(),
14
+ };
15
+ // Add MCP servers if enabled
16
+ if (options.components.mcp) {
17
+ config.mcp = getMCPConfig(options);
18
+ }
19
+ // Add default agent configuration
20
+ config.agent.orchestrator = {
21
+ description: 'AI coding orchestrator that delegates tasks to specialist agents',
22
+ model: 'opencode-go/glm-5',
23
+ mode: 'primary',
24
+ };
25
+ return config;
26
+ }
27
+ /**
28
+ * Get MCP server configurations
29
+ */
30
+ function getMCPConfig(options) {
31
+ const mcpConfig = {};
32
+ // Claude Flow MCP server
33
+ mcpConfig['claude-flow'] = {
34
+ type: 'local',
35
+ command: ['npx', '-y', '@cloudpftc/opencode-orchestrator@latest', 'mcp', 'start'],
36
+ enabled: true,
37
+ };
38
+ // Optional: ruv-swarm MCP server
39
+ if (options.runtime.swarm) {
40
+ mcpConfig['ruv-swarm'] = {
41
+ type: 'local',
42
+ command: ['npx', '-y', 'ruv-swarm', 'mcp', 'start'],
43
+ enabled: true,
44
+ };
45
+ }
46
+ // Optional: flow-nexus MCP server
47
+ if (options.runtime.flowNexus) {
48
+ mcpConfig['flow-nexus'] = {
49
+ type: 'local',
50
+ command: ['npx', '-y', 'flow-nexus@latest', 'mcp', 'start'],
51
+ enabled: true,
52
+ };
53
+ }
54
+ return mcpConfig;
55
+ }
56
+ /**
57
+ * Get default permissions for OpenCode
58
+ */
59
+ function getDefaultPermissions() {
60
+ return {
61
+ edit: 'allow',
62
+ bash: 'allow',
63
+ webfetch: 'allow',
64
+ read: 'allow',
65
+ grep: 'allow',
66
+ glob: 'allow',
67
+ list: 'allow',
68
+ skill: 'allow',
69
+ todowrite: 'allow',
70
+ todoread: 'allow',
71
+ websearch: 'allow',
72
+ question: 'allow',
73
+ };
74
+ }
75
+ /**
76
+ * Generate minimal OpenCode configuration
77
+ */
78
+ export function generateMinimalOpenCodeConfig() {
79
+ return {
80
+ $schema: 'https://opencode.ai/config.json',
81
+ mcp: {
82
+ 'claude-flow': {
83
+ type: 'local',
84
+ command: ['npx', '-y', '@cloudpftc/opencode-orchestrator@latest', 'mcp', 'start'],
85
+ enabled: true,
86
+ },
87
+ },
88
+ agent: {
89
+ orchestrator: {
90
+ description: 'AI coding orchestrator',
91
+ model: 'opencode-go/glm-5',
92
+ mode: 'primary',
93
+ },
94
+ },
95
+ permission: getDefaultPermissions(),
96
+ };
97
+ }
98
+ /**
99
+ * OpenCode configuration templates
100
+ */
101
+ export const OPENCODE_CONFIG_TEMPLATES = [
102
+ { name: 'minimal', description: 'Minimal configuration with essential MCP servers' },
103
+ { name: 'standard', description: 'Standard configuration with all MCP servers and hooks' },
104
+ { name: 'full', description: 'Full configuration with all features enabled' },
105
+ ];
106
+ export default generateOpenCodeConfig;
107
+ //# sourceMappingURL=opencode-generator.js.map
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Settings.json Generator
3
- * Creates .claude/settings.json with V3-optimized hook configurations
3
+ * Creates opencode.json with V3-optimized hook configurations
4
4
  */
5
5
  import type { InitOptions } from './types.js';
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Settings.json Generator
3
- * Creates .claude/settings.json with V3-optimized hook configurations
3
+ * Creates opencode.json with V3-optimized hook configurations
4
4
  */
5
5
  import { detectPlatform } from './types.js';
6
6
  /**
@@ -29,26 +29,26 @@ export function generateSettings(options) {
29
29
  'Read(./.env.*)',
30
30
  ],
31
31
  };
32
- // Add claude-flow attribution for git commits and PRs
32
+ // Add opencode-orchestrator attribution for git commits and PRs
33
33
  settings.attribution = {
34
- commit: 'Co-Authored-By: claude-flow <ruv@ruv.net>',
35
- pr: '🤖 Generated with [claude-flow](https://github.com/ruvnet/claude-flow)',
34
+ commit: 'Co-Authored-By: opencode-orchestrator <noreply@cloudpftc.com>',
35
+ pr: '🤖 Generated with [opencode-orchestrator](https://github.com/pedrocosta95/opencode-orchestrator)',
36
36
  };
37
- // Note: Claude Code expects 'model' to be a string, not an object
38
- // Model preferences are stored in claudeFlow settings instead
37
+ // Note: OpenCode expects 'model' to be a string, not an object
38
+ // Model preferences are stored in opencode settings instead
39
39
  // settings.model = 'claude-sonnet-4-5-20250929'; // Uncomment if you want to set a default model
40
40
  // Add Agent Teams configuration (experimental feature)
41
41
  settings.env = {
42
- // Enable Claude Code Agent Teams for multi-agent coordination
43
- CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS: '1',
44
- // Claude Flow specific environment
45
- CLAUDE_FLOW_V3_ENABLED: 'true',
46
- CLAUDE_FLOW_HOOKS_ENABLED: 'true',
42
+ // Enable OpenCode Agent Teams for multi-agent coordination
43
+ OPENCODE_EXPERIMENTAL_AGENT_TEAMS: '1',
44
+ // OpenCode Orchestrator specific environment
45
+ OPENCODE_V3_ENABLED: 'true',
46
+ OPENCODE_HOOKS_ENABLED: 'true',
47
47
  };
48
48
  // Detect platform for platform-aware configuration
49
49
  const platform = detectPlatform();
50
50
  // Add V3-specific settings
51
- settings.claudeFlow = {
51
+ settings.opencode = {
52
52
  version: '3.0.0',
53
53
  enabled: true,
54
54
  platform: {
@@ -171,25 +171,25 @@ function hookCmdEsm(script, subcommand) {
171
171
  }
172
172
  /** Shorthand for CJS hook-handler commands */
173
173
  function hookHandlerCmd(subcommand) {
174
- return hookCmd('"$CLAUDE_PROJECT_DIR/.claude/helpers/hook-handler.cjs"', subcommand);
174
+ return hookCmd('"$OPENCODE_PROJECT_DIR/.opencode/helpers/hook-handler.cjs"', subcommand);
175
175
  }
176
176
  /** Shorthand for ESM auto-memory-hook commands */
177
177
  function autoMemoryCmd(subcommand) {
178
- return hookCmdEsm('"$CLAUDE_PROJECT_DIR/.claude/helpers/auto-memory-hook.mjs"', subcommand);
178
+ return hookCmdEsm('"$OPENCODE_PROJECT_DIR/.opencode/helpers/auto-memory-hook.mjs"', subcommand);
179
179
  }
180
180
  /**
181
- * Generate statusLine configuration for Claude Code
181
+ * Generate statusLine configuration for OpenCode
182
182
  * Uses local helper script for cross-platform compatibility (no npx cold-start)
183
183
  */
184
184
  function generateStatusLineConfig(_options) {
185
- // Claude Code pipes JSON session data to the script via stdin.
185
+ // OpenCode pipes JSON session data to the script via stdin.
186
186
  // Valid fields: type, command, padding (optional).
187
187
  // The script runs after each assistant message (debounced 300ms).
188
- // NOTE: statusline must NOT use `cmd /c` — Claude Code manages its stdin
188
+ // NOTE: statusline must NOT use `cmd /c` — OpenCode manages its stdin
189
189
  // directly for statusline commands, and `cmd /c` blocks stdin forwarding.
190
190
  return {
191
191
  type: 'command',
192
- command: `node "$CLAUDE_PROJECT_DIR/.claude/helpers/statusline.cjs"`,
192
+ command: `node "$OPENCODE_PROJECT_DIR/.opencode/helpers/statusline.cjs"`,
193
193
  };
194
194
  }
195
195
  /**
@@ -0,0 +1,25 @@
1
+ /**
2
+ * CLAUDE.md Generator
3
+ * Generates enforceable, analyzer-optimized Claude Code configuration
4
+ * with template variants for different usage patterns.
5
+ *
6
+ * Templates: minimal | standard | full | security | performance | solo
7
+ * All templates use bullet-format rules with imperative keywords for enforceability.
8
+ */
9
+ import type { InitOptions, SkillMdTemplate } from './types.js';
10
+ /**
11
+ * Generate CLAUDE.md content based on init options and template.
12
+ * Template is determined by: options.runtime.opencodeMdTemplate > explicit param > 'standard'
13
+ */
14
+ export declare function generateSkillMd(options: InitOptions, template?: SkillMdTemplate): string;
15
+ /**
16
+ * Generate minimal CLAUDE.md content (backward-compatible alias).
17
+ */
18
+ export declare function generateMinimalSkillMd(options: InitOptions): string;
19
+ /** Available template names for CLI wizard */
20
+ export declare const SKILL_MD_TEMPLATES: Array<{
21
+ name: SkillMdTemplate;
22
+ description: string;
23
+ }>;
24
+ export default generateSkillMd;
25
+ //# sourceMappingURL=skillmd-generator.d.ts.map