@codemieai/code 0.0.38 → 0.0.41

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.
Files changed (105) hide show
  1. package/README.md +2 -3
  2. package/bin/codemie-opencode.js +8 -1
  3. package/dist/agents/codemie-code/skills/index.d.ts +4 -0
  4. package/dist/agents/codemie-code/skills/index.d.ts.map +1 -1
  5. package/dist/agents/codemie-code/skills/index.js +4 -0
  6. package/dist/agents/codemie-code/skills/index.js.map +1 -1
  7. package/dist/agents/codemie-code/skills/sync/SkillSync.d.ts +52 -0
  8. package/dist/agents/codemie-code/skills/sync/SkillSync.d.ts.map +1 -0
  9. package/dist/agents/codemie-code/skills/sync/SkillSync.js +165 -0
  10. package/dist/agents/codemie-code/skills/sync/SkillSync.js.map +1 -0
  11. package/dist/agents/core/AgentCLI.d.ts.map +1 -1
  12. package/dist/agents/core/AgentCLI.js +25 -14
  13. package/dist/agents/core/AgentCLI.js.map +1 -1
  14. package/dist/agents/core/BaseAgentAdapter.d.ts +25 -2
  15. package/dist/agents/core/BaseAgentAdapter.d.ts.map +1 -1
  16. package/dist/agents/core/BaseAgentAdapter.js +183 -6
  17. package/dist/agents/core/BaseAgentAdapter.js.map +1 -1
  18. package/dist/agents/core/types.d.ts +44 -0
  19. package/dist/agents/core/types.d.ts.map +1 -1
  20. package/dist/agents/plugins/claude/claude.plugin.d.ts +5 -5
  21. package/dist/agents/plugins/claude/claude.plugin.d.ts.map +1 -1
  22. package/dist/agents/plugins/claude/claude.plugin.js +136 -93
  23. package/dist/agents/plugins/claude/claude.plugin.js.map +1 -1
  24. package/dist/agents/plugins/claude/plugin/.claude-plugin/local-install.json +1 -0
  25. package/dist/agents/plugins/claude/plugin/.claude-plugin/plugin.json +1 -1
  26. package/dist/agents/plugins/claude/plugin/README.md +96 -0
  27. package/dist/agents/plugins/claude/plugin/codemie-statusline.mjs +42 -0
  28. package/dist/agents/plugins/claude/plugin/hooks/hooks.json +16 -0
  29. package/dist/agents/plugins/claude/plugin/sounds/play-random-sound.ps1 +112 -0
  30. package/dist/agents/plugins/claude/plugin/sounds/play-random-sound.sh +58 -0
  31. package/dist/agents/plugins/claude/sounds-installer.d.ts +19 -0
  32. package/dist/agents/plugins/claude/sounds-installer.d.ts.map +1 -0
  33. package/dist/agents/plugins/claude/sounds-installer.js +164 -0
  34. package/dist/agents/plugins/claude/sounds-installer.js.map +1 -0
  35. package/dist/agents/plugins/codemie-code-binary.d.ts +17 -0
  36. package/dist/agents/plugins/codemie-code-binary.d.ts.map +1 -0
  37. package/dist/agents/plugins/codemie-code-binary.js +94 -0
  38. package/dist/agents/plugins/codemie-code-binary.js.map +1 -0
  39. package/dist/agents/plugins/codemie-code.plugin.d.ts +53 -12
  40. package/dist/agents/plugins/codemie-code.plugin.d.ts.map +1 -1
  41. package/dist/agents/plugins/codemie-code.plugin.js +359 -147
  42. package/dist/agents/plugins/codemie-code.plugin.js.map +1 -1
  43. package/dist/agents/plugins/gemini/gemini.plugin.d.ts +8 -0
  44. package/dist/agents/plugins/gemini/gemini.plugin.d.ts.map +1 -1
  45. package/dist/agents/plugins/gemini/gemini.plugin.js +44 -0
  46. package/dist/agents/plugins/gemini/gemini.plugin.js.map +1 -1
  47. package/dist/agents/plugins/opencode/opencode-model-configs.d.ts +12 -2
  48. package/dist/agents/plugins/opencode/opencode-model-configs.d.ts.map +1 -1
  49. package/dist/agents/plugins/opencode/opencode-model-configs.js +240 -24
  50. package/dist/agents/plugins/opencode/opencode-model-configs.js.map +1 -1
  51. package/dist/agents/plugins/opencode/opencode.plugin.d.ts.map +1 -1
  52. package/dist/agents/plugins/opencode/opencode.plugin.js +62 -24
  53. package/dist/agents/plugins/opencode/opencode.plugin.js.map +1 -1
  54. package/dist/agents/registry.d.ts.map +1 -1
  55. package/dist/agents/registry.js +8 -7
  56. package/dist/agents/registry.js.map +1 -1
  57. package/dist/cli/commands/doctor/checks/AgentsCheck.d.ts.map +1 -1
  58. package/dist/cli/commands/doctor/checks/AgentsCheck.js +5 -2
  59. package/dist/cli/commands/doctor/checks/AgentsCheck.js.map +1 -1
  60. package/dist/cli/commands/doctor/checks/FrameworksCheck.d.ts.map +1 -1
  61. package/dist/cli/commands/doctor/checks/FrameworksCheck.js +5 -2
  62. package/dist/cli/commands/doctor/checks/FrameworksCheck.js.map +1 -1
  63. package/dist/cli/commands/doctor/index.d.ts.map +1 -1
  64. package/dist/cli/commands/doctor/index.js +87 -91
  65. package/dist/cli/commands/doctor/index.js.map +1 -1
  66. package/dist/cli/commands/hook.d.ts.map +1 -1
  67. package/dist/cli/commands/hook.js +23 -0
  68. package/dist/cli/commands/hook.js.map +1 -1
  69. package/dist/cli/commands/install.d.ts.map +1 -1
  70. package/dist/cli/commands/install.js +13 -0
  71. package/dist/cli/commands/install.js.map +1 -1
  72. package/dist/cli/commands/log/formatter.d.ts +1 -0
  73. package/dist/cli/commands/log/formatter.d.ts.map +1 -1
  74. package/dist/cli/commands/log/formatter.js +4 -13
  75. package/dist/cli/commands/log/formatter.js.map +1 -1
  76. package/dist/cli/commands/setup.js +155 -0
  77. package/dist/cli/commands/setup.js.map +1 -1
  78. package/dist/cli/commands/skill.d.ts.map +1 -1
  79. package/dist/cli/commands/skill.js +80 -1
  80. package/dist/cli/commands/skill.js.map +1 -1
  81. package/dist/cli/index.js +7 -13
  82. package/dist/cli/index.js.map +1 -1
  83. package/dist/env/types.d.ts +3 -0
  84. package/dist/env/types.d.ts.map +1 -1
  85. package/dist/env/types.js.map +1 -1
  86. package/dist/hooks/types.d.ts +2 -0
  87. package/dist/hooks/types.d.ts.map +1 -1
  88. package/dist/providers/plugins/bedrock/bedrock.template.d.ts.map +1 -1
  89. package/dist/providers/plugins/bedrock/bedrock.template.js +12 -0
  90. package/dist/providers/plugins/bedrock/bedrock.template.js.map +1 -1
  91. package/dist/providers/plugins/sso/sso.auth.d.ts +3 -1
  92. package/dist/providers/plugins/sso/sso.auth.d.ts.map +1 -1
  93. package/dist/providers/plugins/sso/sso.auth.js +70 -12
  94. package/dist/providers/plugins/sso/sso.auth.js.map +1 -1
  95. package/dist/utils/config.d.ts.map +1 -1
  96. package/dist/utils/config.js +6 -0
  97. package/dist/utils/config.js.map +1 -1
  98. package/dist/utils/logger.d.ts +1 -0
  99. package/dist/utils/logger.d.ts.map +1 -1
  100. package/dist/utils/logger.js +16 -1
  101. package/dist/utils/logger.js.map +1 -1
  102. package/dist/utils/native-installer.d.ts.map +1 -1
  103. package/dist/utils/native-installer.js +35 -0
  104. package/dist/utils/native-installer.js.map +1 -1
  105. package/package.json +2 -1
@@ -0,0 +1,58 @@
1
+ #!/bin/bash
2
+
3
+ # play-random-sound.sh
4
+ # Plays a random WAV file from the specified directory
5
+ # Usage: ./play-random-sound.sh <directory>
6
+
7
+ set -e
8
+
9
+ # Check if directory argument is provided
10
+ if [ $# -eq 0 ]; then
11
+ echo "Usage: $0 <directory>" >&2
12
+ echo "Example: $0 ~/.codemie/claude-plugin/sounds/acolyte" >&2
13
+ exit 0
14
+ fi
15
+
16
+ # Expand tilde in the directory path
17
+ SOUND_DIR="${1/#\~/$HOME}"
18
+
19
+ # Check if directory exists - exit silently if not found
20
+ if [ ! -d "$SOUND_DIR" ]; then
21
+ exit 0
22
+ fi
23
+
24
+ # Find all audio files and store in array (compatible way)
25
+ WAV_FILES=()
26
+ while IFS= read -r -d '' file; do
27
+ WAV_FILES+=("$file")
28
+ done < <(find "$SOUND_DIR" -maxdepth 1 -type f \( -iname "*.wav" -o -iname "*.mp3" \) -print0 2>/dev/null)
29
+
30
+ # Check if any audio files were found
31
+ if [ ${#WAV_FILES[@]} -eq 0 ]; then
32
+ echo "Error: No WAV or MP3 files found in $SOUND_DIR" >&2
33
+ exit 0
34
+ fi
35
+
36
+ # Select a random file
37
+ RANDOM_INDEX=$((RANDOM % ${#WAV_FILES[@]}))
38
+ SELECTED_FILE="${WAV_FILES[$RANDOM_INDEX]}"
39
+
40
+ # Detect platform and use appropriate audio player
41
+ if command -v afplay &> /dev/null; then
42
+ # macOS
43
+ afplay "$SELECTED_FILE" &
44
+ elif command -v aplay &> /dev/null; then
45
+ # Linux with ALSA
46
+ aplay -q "$SELECTED_FILE" &
47
+ elif command -v paplay &> /dev/null; then
48
+ # Linux with PulseAudio
49
+ paplay "$SELECTED_FILE" &
50
+ elif command -v mpg123 &> /dev/null; then
51
+ # Cross-platform mpg123
52
+ mpg123 -q "$SELECTED_FILE" &
53
+ else
54
+ echo "Error: No audio player found. Install afplay (macOS), aplay, paplay, or mpg123" >&2
55
+ exit 0
56
+ fi
57
+
58
+ exit 0
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Sounds Installer
3
+ *
4
+ * Automated installation of the sound hooks system for Claude Code.
5
+ * Creates hook directories, installs play-random-sound.sh script, and configures hooks.
6
+ */
7
+ /**
8
+ * Install fun sounds system
9
+ * Creates directories, installs script, and saves hooks configuration to ~/.claude/settings.json
10
+ *
11
+ * @returns Hooks configuration object if successful, null if installation failed
12
+ */
13
+ export declare function installSounds(): Promise<string | null>;
14
+ /**
15
+ * Check if sounds are already installed
16
+ * @returns true if exist sounds directory
17
+ */
18
+ export declare function isSoundsInstalled(): boolean;
19
+ //# sourceMappingURL=sounds-installer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sounds-installer.d.ts","sourceRoot":"","sources":["../../../../src/agents/plugins/claude/sounds-installer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA2GH;;;;;GAKG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAqD5D;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAI3C"}
@@ -0,0 +1,164 @@
1
+ /**
2
+ * Sounds Installer
3
+ *
4
+ * Automated installation of the sound hooks system for Claude Code.
5
+ * Creates hook directories, installs play-random-sound.sh script, and configures hooks.
6
+ */
7
+ import chalk from 'chalk';
8
+ import ora from 'ora';
9
+ import { exec } from '../../../utils/exec.js';
10
+ import { getCodemiePath } from '../../../utils/paths.js';
11
+ import { existsSync } from 'fs';
12
+ import { mkdir } from 'fs/promises';
13
+ import { join } from 'path';
14
+ import { logger } from '../../../utils/logger.js';
15
+ import { createErrorContext } from '../../../utils/errors.js';
16
+ /**
17
+ * Check if required audio player is available
18
+ * @returns Audio player command name if found, null otherwise
19
+ */
20
+ async function checkAudioPlayer() {
21
+ const players = ['afplay', 'aplay', 'paplay', 'mpg123'];
22
+ for (const player of players) {
23
+ try {
24
+ await exec('command', ['-v', player]);
25
+ logger.debug('Audio player found', { player, feature: 'sounds' });
26
+ return player;
27
+ }
28
+ catch (error) {
29
+ // Log the specific error for debugging
30
+ logger.debug('Audio player not available', {
31
+ player,
32
+ feature: 'sounds',
33
+ error: error instanceof Error ? error.message : String(error)
34
+ });
35
+ }
36
+ }
37
+ logger.debug('No audio players found', {
38
+ checkedPlayers: players,
39
+ feature: 'sounds',
40
+ note: 'User needs to install an audio player for sounds to work'
41
+ });
42
+ return null;
43
+ }
44
+ /**
45
+ * Create hook directories for sound files
46
+ */
47
+ async function createSoundDirectories() {
48
+ const soundsDir = getCodemiePath('sounds');
49
+ const directories = ['SessionStart', 'UserPromptSubmit', 'PermissionRequest', 'Stop'];
50
+ // Create directories in parallel for better performance
51
+ await Promise.all(directories.map(dir => mkdir(join(soundsDir, dir), { recursive: true })));
52
+ }
53
+ /**
54
+ * Display post-installation instructions
55
+ *
56
+ * NOTE: This function violates typical utils layer pattern by handling UI directly.
57
+ * This is an intentional exception because:
58
+ * 1. The instructions are tightly coupled to the installation implementation details
59
+ * 2. The installation function is only called from CLI contexts (setup command)
60
+ * 3. Extracting to CLI layer would require passing extensive path information
61
+ *
62
+ * Future refactor: Consider returning an InstallationResult data structure
63
+ * and moving display logic to CLI layer if this utility needs reuse in non-CLI contexts.
64
+ */
65
+ function displayPostInstallInstructions() {
66
+ const soundsDir = getCodemiePath('sounds');
67
+ console.log();
68
+ console.log(chalk.bold.green('🎉 Sounds installed successfully!'));
69
+ console.log();
70
+ console.log(chalk.cyan('📂 Next Steps:'));
71
+ console.log();
72
+ console.log(chalk.white('1. Download your favorite sound effects (WAV or MP3 format)'));
73
+ console.log(chalk.white('2. Add them to these directories:'));
74
+ console.log(chalk.dim(` ${join(soundsDir, 'SessionStart')}/`), chalk.white('(plays when starting)'));
75
+ console.log(chalk.dim(` ${join(soundsDir, 'UserPromptSubmit')}/`), chalk.white('(plays when you send a message)'));
76
+ console.log(chalk.dim(` ${join(soundsDir, 'PermissionRequest')}/`), chalk.white('(plays when you claude asks for clarification or permission)'));
77
+ console.log(chalk.dim(` ${join(soundsDir, 'Stop')}/`), chalk.white('(plays when Claude completes)'));
78
+ console.log();
79
+ console.log(chalk.white('💡 Suggestions:'));
80
+ console.log(chalk.dim(' • SessionStart:'), chalk.white('Welcome sounds, greetings'));
81
+ console.log(chalk.dim(' • UserPromptSubmit:'), chalk.white('Acknowledgment sounds (e.g., "Roger")'));
82
+ console.log(chalk.dim(' • PermissionRequest:'), chalk.white('Question sounds (e.g., "Proceed?")'));
83
+ console.log(chalk.dim(' • Stop:'), chalk.white('Completion sounds (e.g., "Done")'));
84
+ console.log();
85
+ console.log(chalk.white('🎮 Example sound packs:'));
86
+ console.log(chalk.dim(' • Warcraft peon sounds (classic "Work work", "Yes milord")'));
87
+ console.log(chalk.dim(' • StarCraft unit acknowledgments'));
88
+ console.log(chalk.dim(' • Portal 2 GLaDOS quotes'));
89
+ console.log();
90
+ console.log(chalk.white('💾 Where to download sounds:'));
91
+ console.log(chalk.blueBright(' https://x.com/delba_oliveira/status/2020515010985005255'));
92
+ console.log();
93
+ console.log(chalk.dim(`⚙️ Hooks configuration saved in: ${getCodemiePath('claude-plugin/hooks/hooks.json')}`));
94
+ console.log(chalk.dim(`📜 Script location: ${join(soundsDir, 'play-random-sound.sh')}`));
95
+ console.log(chalk.dim(' Script would appear after codemie-claude first run'));
96
+ console.log(chalk.white('💡 If script did not appear, remove ~/.codemie/claude-plugin directory and restart codemie-claude'));
97
+ console.log();
98
+ console.log(chalk.bold.yellow('⚠️ WINDOWS USERS:'));
99
+ console.log(chalk.yellow(' After codemie-claude first run, edit ~/.codemie/claude-plugin/hooks/hooks.json'));
100
+ console.log(chalk.yellow(' Change all instances of "play-random-sound.sh" to "play-random-sound.ps1"'));
101
+ console.log();
102
+ }
103
+ /**
104
+ * Install fun sounds system
105
+ * Creates directories, installs script, and saves hooks configuration to ~/.claude/settings.json
106
+ *
107
+ * @returns Hooks configuration object if successful, null if installation failed
108
+ */
109
+ export async function installSounds() {
110
+ try {
111
+ // 1. Pre-flight: Check audio player
112
+ const spinner = ora('Checking audio player...').start();
113
+ const audioPlayer = await checkAudioPlayer();
114
+ if (!audioPlayer) {
115
+ spinner.fail(chalk.red('No audio player found'));
116
+ logger.warn('Sounds installation skipped - no audio player available', {
117
+ operation: 'installSounds',
118
+ feature: 'sounds',
119
+ checkedPlayers: ['afplay', 'aplay', 'paplay', 'mpg123']
120
+ });
121
+ console.log();
122
+ console.log(chalk.yellow('⚠️ Sounds require an audio player to work.'));
123
+ console.log(chalk.white('Checked for: afplay, aplay, paplay, mpg123'));
124
+ console.log();
125
+ console.log(chalk.white('Install instructions:'));
126
+ console.log(chalk.white(' macOS:'), chalk.dim('afplay (built-in)'));
127
+ console.log(chalk.white(' Linux:'), chalk.dim('sudo apt install alsa-utils (aplay)'));
128
+ console.log(chalk.white(' '), chalk.dim('or sudo apt install pulseaudio-utils (paplay)'));
129
+ console.log(chalk.white(' Windows:'), chalk.dim('Install mpg123 via Chocolatey: choco install mpg123'));
130
+ console.log(chalk.white(' Alternative:'), chalk.dim('brew install mpg123 (macOS), sudo apt install mpg123 (Linux)'));
131
+ console.log();
132
+ return null;
133
+ }
134
+ spinner.succeed(chalk.green(`Audio player found: ${audioPlayer}`));
135
+ // 2. Create hook directories
136
+ const dirSpinner = ora('Creating sound directories...').start();
137
+ await createSoundDirectories();
138
+ dirSpinner.succeed(chalk.green('Sound directories created'));
139
+ // 3. Display post-install instructions
140
+ displayPostInstallInstructions();
141
+ return "success";
142
+ }
143
+ catch (error) {
144
+ const errorContext = createErrorContext(error);
145
+ logger.error('Sounds installation failed', {
146
+ ...errorContext,
147
+ operation: 'installSounds'
148
+ });
149
+ console.log();
150
+ console.log(chalk.red('❌ Sounds installation failed'));
151
+ console.log(chalk.yellow('You can try again later by running: codemie install claude --sounds'));
152
+ console.log();
153
+ return null;
154
+ }
155
+ }
156
+ /**
157
+ * Check if sounds are already installed
158
+ * @returns true if exist sounds directory
159
+ */
160
+ export function isSoundsInstalled() {
161
+ const soundsDir = getCodemiePath('sounds');
162
+ return existsSync(soundsDir);
163
+ }
164
+ //# sourceMappingURL=sounds-installer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sounds-installer.js","sourceRoot":"","sources":["../../../../src/agents/plugins/claude/sounds-installer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAC,IAAI,EAAC,MAAM,wBAAwB,CAAC;AAC5C,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAC,UAAU,EAAC,MAAM,IAAI,CAAC;AAC9B,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAC;AAClC,OAAO,EAAC,IAAI,EAAC,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAC,kBAAkB,EAAC,MAAM,0BAA0B,CAAC;AAE5D;;;GAGG;AACH,KAAK,UAAU,gBAAgB;IAC3B,MAAM,OAAO,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAExD,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC3B,IAAI,CAAC;YACD,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;Y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EAAE;YACvC,GAAG,YAAY;YACf,SAAS,EAAE,eAAe;SAC7B,CAAC,CAAC;QACH,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC,CAAC;QACvD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,qEAAqE,CAAC,CAAC,CAAC;QACjG,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,IAAI,CAAC;IAChB,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB;IAC7B,MAAM,SAAS,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;IAE3C,OAAO,UAAU,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Platform-specific package name mapping for @codemieai/codemie-opencode.
3
+ * The wrapper package lists these as optionalDependencies; npm only downloads
4
+ * the one matching the current platform.
5
+ */
6
+ export declare function getPlatformPackage(): string | null;
7
+ /**
8
+ * Resolve the bundled @codemieai/codemie-opencode binary from node_modules.
9
+ *
10
+ * Resolution order:
11
+ * 1. CODEMIE_OPENCODE_WL_BIN env var override (escape hatch)
12
+ * 2. Platform-specific binary from node_modules/@codemieai/codemie-opencode-{platform}-{arch}/bin/codemie
13
+ * 3. Wrapper package binary from node_modules/@codemieai/codemie-opencode/bin/codemie
14
+ * 4. Fallback: null (binary not found)
15
+ */
16
+ export declare function resolveCodemieOpenCodeBinary(): string | null;
17
+ //# sourceMappingURL=codemie-code-binary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codemie-code-binary.d.ts","sourceRoot":"","sources":["../../../src/agents/plugins/codemie-code-binary.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,GAAG,IAAI,CAoBlD;AAuBD;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,IAAI,MAAM,GAAG,IAAI,CAyC5D"}
@@ -0,0 +1,94 @@
1
+ import { existsSync } from 'fs';
2
+ import { join, dirname } from 'path';
3
+ import { fileURLToPath } from 'url';
4
+ import { logger } from '../../utils/logger.js';
5
+ /**
6
+ * Platform-specific package name mapping for @codemieai/codemie-opencode.
7
+ * The wrapper package lists these as optionalDependencies; npm only downloads
8
+ * the one matching the current platform.
9
+ */
10
+ export function getPlatformPackage() {
11
+ const platform = process.platform;
12
+ const arch = process.arch;
13
+ const platformMap = {
14
+ darwin: {
15
+ x64: '@codemieai/codemie-opencode-darwin-x64',
16
+ arm64: '@codemieai/codemie-opencode-darwin-arm64',
17
+ },
18
+ linux: {
19
+ x64: '@codemieai/codemie-opencode-linux-x64',
20
+ arm64: '@codemieai/codemie-opencode-linux-arm64',
21
+ },
22
+ win32: {
23
+ x64: '@codemieai/codemie-opencode-windows-x64',
24
+ arm64: '@codemieai/codemie-opencode-windows-arm64',
25
+ },
26
+ };
27
+ return platformMap[platform]?.[arch] ?? null;
28
+ }
29
+ /**
30
+ * Walk up from a starting directory looking for a node_modules directory
31
+ * that contains the given package.
32
+ */
33
+ function findPackageInNodeModules(startDir, packageName) {
34
+ let current = startDir;
35
+ while (true) {
36
+ const candidate = join(current, 'node_modules', packageName);
37
+ if (existsSync(candidate)) {
38
+ return candidate;
39
+ }
40
+ const parent = dirname(current);
41
+ if (parent === current)
42
+ break; // reached filesystem root
43
+ current = parent;
44
+ }
45
+ return null;
46
+ }
47
+ /**
48
+ * Resolve the bundled @codemieai/codemie-opencode binary from node_modules.
49
+ *
50
+ * Resolution order:
51
+ * 1. CODEMIE_OPENCODE_WL_BIN env var override (escape hatch)
52
+ * 2. Platform-specific binary from node_modules/@codemieai/codemie-opencode-{platform}-{arch}/bin/codemie
53
+ * 3. Wrapper package binary from node_modules/@codemieai/codemie-opencode/bin/codemie
54
+ * 4. Fallback: null (binary not found)
55
+ */
56
+ export function resolveCodemieOpenCodeBinary() {
57
+ // 1. Environment variable override
58
+ const envBin = process.env.CODEMIE_OPENCODE_WL_BIN;
59
+ if (envBin) {
60
+ if (existsSync(envBin)) {
61
+ logger.debug(`[codemie-code] Using binary from CODEMIE_OPENCODE_WL_BIN: ${envBin}`);
62
+ return envBin;
63
+ }
64
+ logger.warn(`[codemie-code] CODEMIE_OPENCODE_WL_BIN set but binary not found: ${envBin}`);
65
+ }
66
+ // Start searching from this module's directory
67
+ const moduleDir = dirname(fileURLToPath(import.meta.url));
68
+ const binName = process.platform === 'win32' ? 'codemie.exe' : 'codemie';
69
+ // 2. Try platform-specific package first (direct binary, no wrapper)
70
+ const platformPkg = getPlatformPackage();
71
+ if (platformPkg) {
72
+ const platformDir = findPackageInNodeModules(moduleDir, platformPkg);
73
+ if (platformDir) {
74
+ const platformBin = join(platformDir, 'bin', binName);
75
+ if (existsSync(platformBin)) {
76
+ logger.debug(`[codemie-code] Resolved platform binary: ${platformBin}`);
77
+ return platformBin;
78
+ }
79
+ }
80
+ }
81
+ // 3. Fall back to wrapper package binary
82
+ const wrapperDir = findPackageInNodeModules(moduleDir, '@codemieai/codemie-opencode');
83
+ if (wrapperDir) {
84
+ const wrapperBin = join(wrapperDir, 'bin', binName);
85
+ if (existsSync(wrapperBin)) {
86
+ logger.debug(`[codemie-code] Resolved wrapper binary: ${wrapperBin}`);
87
+ return wrapperBin;
88
+ }
89
+ }
90
+ // 4. Not found
91
+ logger.debug('[codemie-code] Binary not found in node_modules');
92
+ return null;
93
+ }
94
+ //# sourceMappingURL=codemie-code-binary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codemie-code-binary.js","sourceRoot":"","sources":["../../../src/agents/plugins/codemie-code-binary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,uBAA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C"}
@@ -1,25 +1,66 @@
1
- import { AgentMetadata, AgentAdapter } from '../core/types.js';
1
+ import type { AgentMetadata } from '../core/types.js';
2
+ import { BaseAgentAdapter } from '../core/BaseAgentAdapter.js';
3
+ import type { SessionAdapter } from '../core/session/BaseSessionAdapter.js';
4
+ import type { BaseExtensionInstaller } from '../core/extension/BaseExtensionInstaller.js';
2
5
  /**
3
6
  * Built-in agent name constant - single source of truth
4
7
  */
5
8
  export declare const BUILTIN_AGENT_NAME = "codemie-code";
6
9
  /**
7
- * CodeMie-Code Plugin Metadata
10
+ * Environment variable contract between the umbrella CLI and whitelabel binary.
11
+ *
12
+ * The umbrella CLI orchestrates everything (proxy, auth, metrics, session sync)
13
+ * and spawns the whitelabel binary as a child process. The whitelabel knows
14
+ * nothing about SSO, cookies, or metrics — it just sees an OpenAI-compatible
15
+ * endpoint at localhost.
16
+ *
17
+ * Flow: BaseAgentAdapter.run() → setupProxy() → beforeRun hook → spawn(binary)
18
+ *
19
+ * | Env Var | Set By | Consumed By | Purpose |
20
+ * |--------------------------|----------------------|----------------------|------------------------------------------------|
21
+ * | OPENCODE_CONFIG_CONTENT | beforeRun hook | Whitelabel config.ts | Full provider config JSON (proxy URL, models) |
22
+ * | OPENCODE_CONFIG | beforeRun (fallback) | Whitelabel config.ts | Temp file path when JSON exceeds env var limit |
23
+ * | OPENCODE_DISABLE_SHARE | beforeRun hook | Whitelabel | Disables share functionality |
24
+ * | CODEMIE_SESSION_ID | BaseAgentAdapter | onSessionEnd hook | Session ID for metrics correlation |
25
+ * | CODEMIE_AGENT | BaseAgentAdapter | Lifecycle helpers | Agent name ('codemie-code') |
26
+ * | CODEMIE_PROVIDER | Config loader | setupProxy() | Provider name (e.g., 'ai-run-sso') |
27
+ * | CODEMIE_BASE_URL | setupProxy() | beforeRun hook | Proxy URL (http://localhost:{port}) |
28
+ * | CODEMIE_MODEL | Config/CLI | beforeRun hook | Selected model ID |
29
+ * | CODEMIE_PROJECT | SSO exportEnvVars | Session metadata | CodeMie project name |
8
30
  */
9
31
  export declare const CodeMieCodePluginMetadata: AgentMetadata;
10
32
  /**
11
- * CodeMie-Code Adapter
12
- * Custom implementation for built-in agent
33
+ * CodeMie Code Plugin
34
+ * Wraps the @codemieai/codemie-opencode binary as the built-in agent
13
35
  */
14
- export declare class CodeMieCodePlugin implements AgentAdapter {
15
- name: string;
16
- displayName: string;
17
- description: string;
36
+ export declare class CodeMieCodePlugin extends BaseAgentAdapter {
37
+ private sessionAdapter;
38
+ constructor();
39
+ /**
40
+ * Check if the whitelabel binary is available.
41
+ * Uses existsSync on the resolved binary path instead of PATH lookup.
42
+ */
43
+ isInstalled(): Promise<boolean>;
44
+ /**
45
+ * Install the whitelabel package globally.
46
+ */
18
47
  install(): Promise<void>;
48
+ /**
49
+ * Uninstall the whitelabel package and its platform-specific binary.
50
+ *
51
+ * npm hoists the platform-specific binary package (e.g.
52
+ * @codemieai/codemie-opencode-darwin-arm64) to the top-level global
53
+ * node_modules. `npm uninstall -g @codemieai/codemie-opencode` only removes
54
+ * the wrapper, leaving the binary as an orphan. We explicitly remove both.
55
+ */
19
56
  uninstall(): Promise<void>;
20
- isInstalled(): Promise<boolean>;
21
- run(args: string[], envOverrides?: Record<string, string>): Promise<void>;
22
- getVersion(): Promise<string | null>;
23
- getMetricsConfig(): import('../core/types.js').AgentMetricsConfig | undefined;
57
+ /**
58
+ * Return session adapter for analytics.
59
+ */
60
+ getSessionAdapter(): SessionAdapter;
61
+ /**
62
+ * No extension installer needed.
63
+ */
64
+ getExtensionInstaller(): BaseExtensionInstaller | undefined;
24
65
  }
25
66
  //# sourceMappingURL=codemie-code.plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"codemie-code.plugin.d.ts","sourceRoot":"","sources":["../../../src/agents/plugins/codemie-code.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAW/D;;GAEG;AACH,eAAO,MAAM,kBAAkB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