shark-ai 0.3.15 → 0.3.16

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/bin/shark.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  t,
10
10
  tokenStorage,
11
11
  tui
12
- } from "../chunk-HV5LNPQB.js";
12
+ } from "../chunk-WVBOO6LE.js";
13
13
 
14
14
  // src/core/error/crash-handler.ts
15
15
  import fs from "fs";
@@ -2304,37 +2304,41 @@ ${previewDiff}
2304
2304
 
2305
2305
  `;
2306
2306
  if (filePath.endsWith("tech-spec.md")) specUpdated = true;
2307
- const ext = path7.extname(filePath);
2308
- if ([".ts", ".tsx"].includes(ext)) {
2309
- tui.log.info("\u{1F50D} Validating TypeScript...");
2310
- const validation = await validateTypeScript(filePath);
2311
- if (!validation.valid) {
2312
- tui.log.error("\u274C TypeScript validation failed");
2313
- executionResults += `
2307
+ const config = ConfigManager.getInstance().getConfig();
2308
+ const validationEnabled = config.validation?.enablePostSaveValidation ?? true;
2309
+ if (validationEnabled) {
2310
+ const ext = path7.extname(filePath);
2311
+ if ([".ts", ".tsx"].includes(ext)) {
2312
+ tui.log.info("\u{1F50D} Validating TypeScript...");
2313
+ const validation = await validateTypeScript(filePath);
2314
+ if (!validation.valid) {
2315
+ tui.log.error("\u274C TypeScript validation failed");
2316
+ executionResults += `
2314
2317
  [TYPESCRIPT VALIDATION FAILED]:
2315
2318
  ${validation.error}
2316
2319
 
2317
2320
  `;
2318
- executionResults += `CRITICAL: The file has been saved but contains errors. Read the file again to verify line numbers before attempting to fix. Do not guess line numbers.
2321
+ executionResults += `CRITICAL: The file has been saved but contains errors. Read the file again to verify line numbers before attempting to fix. Do not guess line numbers.
2319
2322
  `;
2320
- } else {
2321
- tui.log.success("\u2705 TypeScript OK");
2323
+ } else {
2324
+ tui.log.success("\u2705 TypeScript OK");
2325
+ }
2322
2326
  }
2323
- }
2324
- if (ext === ".html") {
2325
- tui.log.info("\u{1F50D} Validating HTML...");
2326
- const validation = validateHtmlTagBalance(filePath);
2327
- if (!validation.valid) {
2328
- tui.log.error("\u274C HTML validation failed");
2329
- executionResults += `
2327
+ if (ext === ".html") {
2328
+ tui.log.info("\u{1F50D} Validating HTML...");
2329
+ const validation = validateHtmlTagBalance(filePath);
2330
+ if (!validation.valid) {
2331
+ tui.log.error("\u274C HTML validation failed");
2332
+ executionResults += `
2330
2333
  [HTML VALIDATION FAILED]:
2331
2334
  ${validation.error}
2332
2335
 
2333
2336
  `;
2334
- executionResults += `CRITICAL: Fix these errors before proceeding to next task.
2337
+ executionResults += `CRITICAL: Fix these errors before proceeding to next task.
2335
2338
  `;
2336
- } else {
2337
- tui.log.success("\u2705 HTML OK");
2339
+ } else {
2340
+ tui.log.success("\u2705 HTML OK");
2341
+ }
2338
2342
  }
2339
2343
  }
2340
2344
  } else {
@@ -2356,37 +2360,41 @@ ${validation.error}
2356
2360
 
2357
2361
  `;
2358
2362
  if (filePath.endsWith("tech-spec.md")) specUpdated = true;
2359
- const ext = path7.extname(filePath);
2360
- if ([".ts", ".tsx"].includes(ext)) {
2361
- tui.log.info("\u{1F50D} Validating TypeScript...");
2362
- const validation = await validateTypeScript(filePath);
2363
- if (!validation.valid) {
2364
- tui.log.error("\u274C TypeScript validation failed");
2365
- executionResults += `
2363
+ const config = ConfigManager.getInstance().getConfig();
2364
+ const validationEnabled = config.validation?.enablePostSaveValidation ?? true;
2365
+ if (validationEnabled) {
2366
+ const ext = path7.extname(filePath);
2367
+ if ([".ts", ".tsx"].includes(ext)) {
2368
+ tui.log.info("\u{1F50D} Validating TypeScript...");
2369
+ const validation = await validateTypeScript(filePath);
2370
+ if (!validation.valid) {
2371
+ tui.log.error("\u274C TypeScript validation failed");
2372
+ executionResults += `
2366
2373
  [TYPESCRIPT VALIDATION FAILED]:
2367
2374
  ${validation.error}
2368
2375
 
2369
2376
  `;
2370
- executionResults += `CRITICAL: Fix these errors before proceeding to next task.
2377
+ executionResults += `CRITICAL: Fix these errors before proceeding to next task.
2371
2378
  `;
2372
- } else {
2373
- tui.log.success("\u2705 TypeScript OK");
2379
+ } else {
2380
+ tui.log.success("\u2705 TypeScript OK");
2381
+ }
2374
2382
  }
2375
- }
2376
- if (ext === ".html") {
2377
- tui.log.info("\u{1F50D} Validating HTML...");
2378
- const validation = validateHtmlTagBalance(filePath);
2379
- if (!validation.valid) {
2380
- tui.log.error("\u274C HTML validation failed");
2381
- executionResults += `
2383
+ if (ext === ".html") {
2384
+ tui.log.info("\u{1F50D} Validating HTML...");
2385
+ const validation = validateHtmlTagBalance(filePath);
2386
+ if (!validation.valid) {
2387
+ tui.log.error("\u274C HTML validation failed");
2388
+ executionResults += `
2382
2389
  [HTML VALIDATION FAILED]:
2383
2390
  ${validation.error}
2384
2391
 
2385
2392
  `;
2386
- executionResults += `CRITICAL: Fix these errors before proceeding to next task.
2393
+ executionResults += `CRITICAL: Fix these errors before proceeding to next task.
2387
2394
  `;
2388
- } else {
2389
- tui.log.success("\u2705 HTML OK");
2395
+ } else {
2396
+ tui.log.success("\u2705 HTML OK");
2397
+ }
2390
2398
  }
2391
2399
  }
2392
2400
  } else if (!action.line_range && !action.target_content) {