@tanagram/cli 0.5.52 → 0.5.54
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.54_darwin_amd64.tar.gz +0 -0
- package/dist/npm/tanagram_0.5.54_darwin_arm64.tar.gz +0 -0
- package/dist/npm/tanagram_0.5.54_linux_amd64.tar.gz +0 -0
- package/dist/npm/tanagram_0.5.54_linux_arm64.tar.gz +0 -0
- package/dist/npm/tanagram_0.5.54_windows_amd64.zip +0 -0
- package/dist/npm/win32-x64/tanagram.exe +0 -0
- package/install.js +27 -22
- 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,17 +171,17 @@ function installClaudeSkill() {
|
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
function
|
|
174
|
+
function installStopHook() {
|
|
175
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).');
|
|
176
|
+
console.error('Skipping Tanagram Stop hook installation (TANAGRAM_SKIP_HOOK set).');
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
179
|
if (isCIEnvironment()) {
|
|
180
|
-
console.error('Skipping Tanagram hook installation (CI environment).');
|
|
180
|
+
console.error('Skipping Tanagram Stop hook installation (CI environment).');
|
|
181
181
|
return;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
console.error('Installing Tanagram hook for Claude Code...');
|
|
184
|
+
console.error('Installing Tanagram Stop hook for Claude Code...');
|
|
185
185
|
|
|
186
186
|
try {
|
|
187
187
|
const settingsPath = path.join(os.homedir(), '.claude', 'settings.json');
|
|
@@ -192,35 +192,38 @@ function installClaudeHook() {
|
|
|
192
192
|
settings = JSON.parse(raw);
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
+
// Ensure hooks.Stop array exists
|
|
195
196
|
if (!settings.hooks) settings.hooks = {};
|
|
196
|
-
if (!Array.isArray(settings.hooks.
|
|
197
|
+
if (!Array.isArray(settings.hooks.Stop)) settings.hooks.Stop = [];
|
|
197
198
|
|
|
198
|
-
|
|
199
|
-
|
|
199
|
+
// Check if tanagram stop-hook is already configured
|
|
200
|
+
const alreadyInstalled = settings.hooks.Stop.some(entry =>
|
|
201
|
+
Array.isArray(entry.hooks) && entry.hooks.some(h => h.command === 'tanagram stop-hook')
|
|
200
202
|
);
|
|
201
203
|
|
|
202
|
-
if (
|
|
203
|
-
console.error('✓ Tanagram hook already
|
|
204
|
-
track('cli.hook.install.success', { already_installed: true });
|
|
204
|
+
if (alreadyInstalled) {
|
|
205
|
+
console.error('✓ Tanagram Stop hook already configured');
|
|
205
206
|
return;
|
|
206
207
|
}
|
|
207
208
|
|
|
208
|
-
settings.hooks.
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
209
|
+
settings.hooks.Stop.push({
|
|
210
|
+
hooks: [
|
|
211
|
+
{
|
|
212
|
+
type: 'command',
|
|
213
|
+
command: 'tanagram stop-hook',
|
|
214
|
+
timeout: 120
|
|
215
|
+
}
|
|
216
|
+
]
|
|
214
217
|
});
|
|
215
218
|
|
|
216
219
|
fs.mkdirSync(path.dirname(settingsPath), { recursive: true });
|
|
217
220
|
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n');
|
|
218
221
|
|
|
219
|
-
console.error(`✓ Tanagram hook installed to ${settingsPath}`);
|
|
220
|
-
track('cli.
|
|
222
|
+
console.error(`✓ Tanagram Stop hook installed to ${settingsPath}`);
|
|
223
|
+
track('cli.stop_hook.install.success');
|
|
221
224
|
} catch (err) {
|
|
222
|
-
console.error('Warning: Failed to install
|
|
223
|
-
track('cli.
|
|
225
|
+
console.error('Warning: Failed to install Stop hook:', err.message);
|
|
226
|
+
track('cli.stop_hook.install.failure', { error: err.message });
|
|
224
227
|
}
|
|
225
228
|
}
|
|
226
229
|
|
|
@@ -267,9 +270,11 @@ function ensureOpenCode() {
|
|
|
267
270
|
const prebuiltPath = findPrebuiltBinary();
|
|
268
271
|
installPrebuiltBinary(prebuiltPath);
|
|
269
272
|
|
|
270
|
-
// Install Claude
|
|
273
|
+
// Install Claude skill
|
|
271
274
|
installClaudeSkill();
|
|
272
|
-
|
|
275
|
+
|
|
276
|
+
// Install Stop hook for Claude Code
|
|
277
|
+
installStopHook();
|
|
273
278
|
|
|
274
279
|
// Install OpenCode (LLM agent for eval)
|
|
275
280
|
ensureOpenCode();
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|