@vectorize-io/hindsight-coding-agents 0.8.6 → 0.8.8

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 (62) hide show
  1. package/README.md +31 -21
  2. package/dist/antigravity-hook.js +278 -190
  3. package/dist/antigravity-statusline.js +30 -24
  4. package/dist/antigravity-stop-hook.js +271 -169
  5. package/dist/claude-hook.js +278 -190
  6. package/dist/claude-sessionstart-hook.js +301 -212
  7. package/dist/claude-stop-hook.js +271 -169
  8. package/dist/cline.js +258 -214
  9. package/dist/codebuddy-hook.js +278 -190
  10. package/dist/codebuddy-sessionstart-hook.js +301 -212
  11. package/dist/codebuddy-stop-hook.js +271 -169
  12. package/dist/codex-hook.js +278 -190
  13. package/dist/codex-sessionstart-hook.js +301 -212
  14. package/dist/codex-stop-hook.js +271 -169
  15. package/dist/copilot-hook.js +278 -190
  16. package/dist/copilot-sessionstart-hook.js +301 -212
  17. package/dist/copilot-stop-hook.js +271 -169
  18. package/dist/cursor-hook.js +278 -190
  19. package/dist/cursor-sessionstart-hook.js +301 -212
  20. package/dist/cursor-stop-hook.js +271 -169
  21. package/dist/daemon-start.js +20 -16
  22. package/dist/dcode-hook.js +278 -190
  23. package/dist/dcode-sessionstart-hook.js +301 -212
  24. package/dist/dcode-stop-hook.js +271 -169
  25. package/dist/deepen.js +98 -83
  26. package/dist/devin-hook.js +278 -190
  27. package/dist/devin-sessionstart-hook.js +301 -212
  28. package/dist/devin-stop-hook.js +271 -169
  29. package/dist/droid-hook.js +278 -190
  30. package/dist/droid-sessionstart-hook.js +301 -212
  31. package/dist/droid-stop-hook.js +271 -169
  32. package/dist/dsh.js +309 -251
  33. package/dist/grok-hook.js +278 -190
  34. package/dist/grok-sessionstart-hook.js +301 -212
  35. package/dist/grok-stop-hook.js +271 -169
  36. package/dist/hindsight-seed.js +35 -26
  37. package/dist/index.js +310 -252
  38. package/dist/installer.js +172 -68
  39. package/dist/kilo.js +310 -252
  40. package/dist/kimi-hook.js +278 -190
  41. package/dist/kimi-sessionstart-hook.js +301 -212
  42. package/dist/kimi-stop-hook.js +271 -169
  43. package/dist/mcp-server.js +165 -148
  44. package/dist/opencode2.js +310 -252
  45. package/dist/pi.js +309 -251
  46. package/dist/prime-agent.js +309 -251
  47. package/dist/qwen-hook.js +278 -190
  48. package/dist/qwen-sessionstart-hook.js +301 -212
  49. package/dist/qwen-stop-hook.js +271 -169
  50. package/dist/status.js +134 -117
  51. package/dist/traecode-hook.js +278 -190
  52. package/dist/traecode-sessionstart-hook.js +301 -212
  53. package/dist/traecode-stop-hook.js +271 -169
  54. package/dist/workbuddy-hook.js +278 -190
  55. package/dist/workbuddy-sessionstart-hook.js +301 -212
  56. package/dist/workbuddy-stop-hook.js +271 -169
  57. package/dist/zcode-hook.js +278 -190
  58. package/dist/zcode-sessionstart-hook.js +301 -212
  59. package/dist/zcode-stop-hook.js +271 -169
  60. package/package.json +2 -1
  61. package/plugin.json +1 -1
  62. package/skill/SKILL.md +31 -26
@@ -306,31 +306,37 @@ import { join as join7 } from "path";
306
306
 
307
307
  // src/core/seed.ts
308
308
  import { spawn as realSpawn } from "child_process";
309
- import { dirname, join } from "path";
309
+ import { dirname, join as join2 } from "path";
310
310
  import { fileURLToPath } from "url";
311
+
312
+ // src/core/util.ts
313
+ import { accessSync, constants, statSync } from "fs";
314
+ import { delimiter, extname, isAbsolute, join, resolve } from "path";
315
+
316
+ // src/core/seed.ts
311
317
  var DEFAULT_SEED_LIMIT = 300;
312
318
 
313
319
  // src/core/bank.ts
314
320
  import { existsSync } from "fs";
315
321
  import { homedir as homedir2 } from "os";
316
- import { basename, dirname as dirname4, join as join5, normalize, sep } from "path";
322
+ import { basename, dirname as dirname4, join as join6, normalize, sep } from "path";
317
323
 
318
324
  // src/core/diag.ts
319
325
  import { readFileSync } from "fs";
320
- import { join as join3 } from "path";
326
+ import { join as join4 } from "path";
321
327
 
322
328
  // src/core/log.ts
323
- import { appendFileSync, mkdirSync, renameSync, statSync } from "fs";
329
+ import { appendFileSync, mkdirSync, renameSync, statSync as statSync2 } from "fs";
324
330
  import { homedir } from "os";
325
- import { dirname as dirname2, join as join2 } from "path";
331
+ import { dirname as dirname2, join as join3 } from "path";
326
332
  function logsDir() {
327
- return join2(homedir(), ".hindsight", "coding-agents-logs");
333
+ return join3(homedir(), ".hindsight", "coding-agents-logs");
328
334
  }
329
335
  var LOG_MAX_BYTES = 10 * 1024 * 1024;
330
336
  function appendLogLine(file, text) {
331
337
  mkdirSync(dirname2(file), { recursive: true, mode: 448 });
332
338
  try {
333
- if (statSync(file).size >= LOG_MAX_BYTES) renameSync(file, `${file}.1`);
339
+ if (statSync2(file).size >= LOG_MAX_BYTES) renameSync(file, `${file}.1`);
334
340
  } catch {
335
341
  }
336
342
  appendFileSync(file, text, { mode: 384 });
@@ -343,7 +349,7 @@ function setLogLevel(level) {
343
349
  if (!process.env.HINDSIGHT_LOG_LEVEL) current = level;
344
350
  }
345
351
  function logFilePath() {
346
- return process.env.HINDSIGHT_LOG_FILE || join2(logsDir(), "plugin.log");
352
+ return process.env.HINDSIGHT_LOG_FILE || join3(logsDir(), "plugin.log");
347
353
  }
348
354
  function write(level, scope, msg, extra) {
349
355
  if (WEIGHT[level] < WEIGHT[current]) return;
@@ -364,7 +370,7 @@ var log = {
364
370
 
365
371
  // src/core/diag.ts
366
372
  function diagFilePath() {
367
- return process.env.HINDSIGHT_DIAG_FILE || join3(logsDir(), "diag.jsonl");
373
+ return process.env.HINDSIGHT_DIAG_FILE || join4(logsDir(), "diag.jsonl");
368
374
  }
369
375
  function diag(harness, event, extra = {}) {
370
376
  log.debug(harness, `diag:${event}`, extra);
@@ -379,7 +385,7 @@ function diag(harness, event, extra = {}) {
379
385
 
380
386
  // src/core/git-layout.ts
381
387
  import { lstatSync, readFileSync as readFileSync2, realpathSync } from "fs";
382
- import { dirname as dirname3, isAbsolute, join as join4, resolve } from "path";
388
+ import { dirname as dirname3, isAbsolute as isAbsolute2, join as join5, resolve as resolve2 } from "path";
383
389
 
384
390
  // src/core/missions.ts
385
391
  import { createHash } from "crypto";
@@ -451,11 +457,7 @@ var PLUGIN_GOVERNED_BANK_FIELDS = [
451
457
  ];
452
458
 
453
459
  // package.json
454
- var version = "0.8.6";
455
-
456
- // src/core/util.ts
457
- import { accessSync, constants, statSync as statSync2 } from "fs";
458
- import { delimiter, extname, isAbsolute as isAbsolute2, join as join6, resolve as resolve2 } from "path";
460
+ var version = "0.8.8";
459
461
 
460
462
  // src/core/hindsight.ts
461
463
  var USER_AGENT = `hindsight-coding-agents/${version}`;
@@ -892,6 +894,7 @@ function daemonEnv(cfg, env = process.env) {
892
894
  }
893
895
  return out;
894
896
  }
897
+ var DAEMON_CONFIG_ENV = "HINDSIGHT_CODING_AGENTS_DAEMON_CONFIG";
895
898
  function preflightDaemon(cfg, harness) {
896
899
  if (!hasUvx()) {
897
900
  diag(harness, "daemon_uvx_missing", { apiUrl: cfg.apiUrl });
@@ -924,7 +927,8 @@ function arg(name) {
924
927
  }
925
928
  async function main() {
926
929
  const harness = arg("harness") ?? "coding-agent";
927
- const cfg = loadConfig({ harness });
930
+ const passed = process.env[DAEMON_CONFIG_ENV];
931
+ const cfg = passed ? JSON.parse(passed) : loadConfig({ harness });
928
932
  setLogLevel(cfg.logLevel);
929
933
  if (cfg.serverMode !== "daemon") return;
930
934
  if (await isServerHealthy(cfg.apiUrl)) return;