@tanagram/cli 0.5.52 → 0.5.53
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/npm/darwin-arm64/tanagram +0 -0
- package/dist/npm/darwin-x64/tanagram +0 -0
- package/dist/npm/linux-arm64/tanagram +0 -0
- package/dist/npm/linux-x64/tanagram +0 -0
- package/dist/npm/tanagram_0.5.53_darwin_amd64.tar.gz +0 -0
- package/dist/npm/tanagram_0.5.53_darwin_arm64.tar.gz +0 -0
- package/dist/npm/tanagram_0.5.53_linux_amd64.tar.gz +0 -0
- package/dist/npm/tanagram_0.5.53_linux_arm64.tar.gz +0 -0
- package/dist/npm/tanagram_0.5.53_windows_amd64.zip +0 -0
- package/dist/npm/win32-x64/tanagram.exe +0 -0
- package/install.js +1 -55
- package/package.json +1 -1
- package/dist/npm/tanagram_0.5.52_darwin_amd64.tar.gz +0 -0
- package/dist/npm/tanagram_0.5.52_darwin_arm64.tar.gz +0 -0
- package/dist/npm/tanagram_0.5.52_linux_amd64.tar.gz +0 -0
- package/dist/npm/tanagram_0.5.52_linux_arm64.tar.gz +0 -0
- package/dist/npm/tanagram_0.5.52_windows_amd64.zip +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/install.js
CHANGED
|
@@ -171,59 +171,6 @@ function installClaudeSkill() {
|
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
function installClaudeHook() {
|
|
175
|
-
if (process.env.TANAGRAM_SKIP_HOOK === '1' || process.env.TANAGRAM_SKIP_HOOK === 'true') {
|
|
176
|
-
console.error('Skipping Tanagram hook installation (TANAGRAM_SKIP_HOOK set).');
|
|
177
|
-
return;
|
|
178
|
-
}
|
|
179
|
-
if (isCIEnvironment()) {
|
|
180
|
-
console.error('Skipping Tanagram hook installation (CI environment).');
|
|
181
|
-
return;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
console.error('Installing Tanagram hook for Claude Code...');
|
|
185
|
-
|
|
186
|
-
try {
|
|
187
|
-
const settingsPath = path.join(os.homedir(), '.claude', 'settings.json');
|
|
188
|
-
let settings = {};
|
|
189
|
-
|
|
190
|
-
if (fs.existsSync(settingsPath)) {
|
|
191
|
-
const raw = fs.readFileSync(settingsPath, 'utf8');
|
|
192
|
-
settings = JSON.parse(raw);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
if (!settings.hooks) settings.hooks = {};
|
|
196
|
-
if (!Array.isArray(settings.hooks.PreToolUse)) settings.hooks.PreToolUse = [];
|
|
197
|
-
|
|
198
|
-
const hasTanagramHook = settings.hooks.PreToolUse.some(entry =>
|
|
199
|
-
entry.hooks && entry.hooks.some(h => h.command && h.command.includes('tanagram eval'))
|
|
200
|
-
);
|
|
201
|
-
|
|
202
|
-
if (hasTanagramHook) {
|
|
203
|
-
console.error('✓ Tanagram hook already installed');
|
|
204
|
-
track('cli.hook.install.success', { already_installed: true });
|
|
205
|
-
return;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
settings.hooks.PreToolUse.push({
|
|
209
|
-
matcher: 'Write|Edit|NotebookEdit',
|
|
210
|
-
hooks: [{
|
|
211
|
-
type: 'command',
|
|
212
|
-
command: 'tanagram eval',
|
|
213
|
-
}],
|
|
214
|
-
});
|
|
215
|
-
|
|
216
|
-
fs.mkdirSync(path.dirname(settingsPath), { recursive: true });
|
|
217
|
-
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n');
|
|
218
|
-
|
|
219
|
-
console.error(`✓ Tanagram hook installed to ${settingsPath}`);
|
|
220
|
-
track('cli.hook.install.success', { first_time: true });
|
|
221
|
-
} catch (err) {
|
|
222
|
-
console.error('Warning: Failed to install Claude hook:', err.message);
|
|
223
|
-
track('cli.hook.install.failure', { error: err.message });
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
174
|
function ensureOpenCode() {
|
|
228
175
|
if (isCIEnvironment()) {
|
|
229
176
|
return;
|
|
@@ -267,9 +214,8 @@ function ensureOpenCode() {
|
|
|
267
214
|
const prebuiltPath = findPrebuiltBinary();
|
|
268
215
|
installPrebuiltBinary(prebuiltPath);
|
|
269
216
|
|
|
270
|
-
// Install Claude
|
|
217
|
+
// Install Claude skill
|
|
271
218
|
installClaudeSkill();
|
|
272
|
-
installClaudeHook();
|
|
273
219
|
|
|
274
220
|
// Install OpenCode (LLM agent for eval)
|
|
275
221
|
ensureOpenCode();
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|