@claudemini/shit-cli 1.8.1 → 1.8.2

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/lib/log.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Reads stdin, parses event, delegates to session/extract/report modules.
6
6
  */
7
7
 
8
- import { appendFileSync, existsSync, mkdirSync, writeFileSync } from 'fs';
8
+ import { appendFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
9
9
  import { join } from 'path';
10
10
  import { getProjectRoot, getLogDir } from './config.js';
11
11
  import { loadState, saveState, processEvent, updateIndex } from './session.js';
@@ -67,7 +67,6 @@ export default async function log(args) {
67
67
 
68
68
  // Dispatch webhook for session end — must await before exit
69
69
  try {
70
- const { readFileSync } = await import('fs');
71
70
  const summaryPath = join(sessionDir, 'summary.json');
72
71
  const summary = JSON.parse(readFileSync(summaryPath, 'utf-8'));
73
72
  await dispatchWebhook(projectRoot, 'session.ended', summary);
package/lib/review.js CHANGED
@@ -710,7 +710,7 @@ export default async function review(args) {
710
710
  const report = buildReport(selectedSessions, options);
711
711
 
712
712
  // Dispatch webhook for review completion
713
- dispatchWebhook(projectRoot, 'review.completed', report).catch(() => {});
713
+ await dispatchWebhook(projectRoot, 'review.completed', report);
714
714
 
715
715
  if (options.format === 'json') {
716
716
  console.log(JSON.stringify(report, null, 2));
package/lib/webhook.js CHANGED
@@ -28,7 +28,11 @@ export function loadWebhookConfig(projectRoot) {
28
28
  }
29
29
 
30
30
  // Resolve: process.env > config.json env > config.json webhooks field
31
- const env = (key) => process.env[key] || configEnv[key] || '';
31
+ const env = (key) => {
32
+ if (key in process.env) return process.env[key];
33
+ if (key in configEnv) return configEnv[key];
34
+ return '';
35
+ };
32
36
 
33
37
  const url = env('SHIT_WEBHOOK_URL') || fileConfig.url;
34
38
  if (!url) return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claudemini/shit-cli",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "description": "Session-based Hook Intelligence Tracker - Zero-dependency memory system for human-AI coding sessions",
5
5
  "type": "module",
6
6
  "bin": {