@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
@@ -7,31 +7,37 @@ import { join as join7 } from "path";
7
7
 
8
8
  // src/core/seed.ts
9
9
  import { spawn as realSpawn } from "child_process";
10
- import { dirname, join } from "path";
10
+ import { dirname, join as join2 } from "path";
11
11
  import { fileURLToPath } from "url";
12
+
13
+ // src/core/util.ts
14
+ import { accessSync, constants, statSync } from "fs";
15
+ import { delimiter, extname, isAbsolute, join, resolve } from "path";
16
+
17
+ // src/core/seed.ts
12
18
  var DEFAULT_SEED_LIMIT = 300;
13
19
 
14
20
  // src/core/bank.ts
15
21
  import { existsSync } from "fs";
16
22
  import { homedir as homedir2 } from "os";
17
- import { basename, dirname as dirname4, join as join5, normalize, sep } from "path";
23
+ import { basename, dirname as dirname4, join as join6, normalize, sep } from "path";
18
24
 
19
25
  // src/core/diag.ts
20
26
  import { readFileSync } from "fs";
21
- import { join as join3 } from "path";
27
+ import { join as join4 } from "path";
22
28
 
23
29
  // src/core/log.ts
24
- import { appendFileSync, mkdirSync, renameSync, statSync } from "fs";
30
+ import { appendFileSync, mkdirSync, renameSync, statSync as statSync2 } from "fs";
25
31
  import { homedir } from "os";
26
- import { dirname as dirname2, join as join2 } from "path";
32
+ import { dirname as dirname2, join as join3 } from "path";
27
33
  function logsDir() {
28
- return join2(homedir(), ".hindsight", "coding-agents-logs");
34
+ return join3(homedir(), ".hindsight", "coding-agents-logs");
29
35
  }
30
36
  var LOG_MAX_BYTES = 10 * 1024 * 1024;
31
37
  function appendLogLine(file, text) {
32
38
  mkdirSync(dirname2(file), { recursive: true, mode: 448 });
33
39
  try {
34
- if (statSync(file).size >= LOG_MAX_BYTES) renameSync(file, `${file}.1`);
40
+ if (statSync2(file).size >= LOG_MAX_BYTES) renameSync(file, `${file}.1`);
35
41
  } catch {
36
42
  }
37
43
  appendFileSync(file, text, { mode: 384 });
@@ -41,7 +47,7 @@ var current = ["debug", "info", "warn", "error"].find(
41
47
  (l) => l === process.env.HINDSIGHT_LOG_LEVEL
42
48
  ) ?? "info";
43
49
  function logFilePath() {
44
- return process.env.HINDSIGHT_LOG_FILE || join2(logsDir(), "plugin.log");
50
+ return process.env.HINDSIGHT_LOG_FILE || join3(logsDir(), "plugin.log");
45
51
  }
46
52
  function write(level, scope, msg, extra) {
47
53
  if (WEIGHT[level] < WEIGHT[current]) return;
@@ -62,7 +68,7 @@ var log = {
62
68
 
63
69
  // src/core/diag.ts
64
70
  function diagFilePath() {
65
- return process.env.HINDSIGHT_DIAG_FILE || join3(logsDir(), "diag.jsonl");
71
+ return process.env.HINDSIGHT_DIAG_FILE || join4(logsDir(), "diag.jsonl");
66
72
  }
67
73
  function diag(harness, event, extra = {}) {
68
74
  log.debug(harness, `diag:${event}`, extra);
@@ -77,7 +83,7 @@ function diag(harness, event, extra = {}) {
77
83
 
78
84
  // src/core/git-layout.ts
79
85
  import { lstatSync, readFileSync as readFileSync2, realpathSync } from "fs";
80
- import { dirname as dirname3, isAbsolute, join as join4, resolve } from "path";
86
+ import { dirname as dirname3, isAbsolute as isAbsolute2, join as join5, resolve as resolve2 } from "path";
81
87
  var TRANSIENT = /* @__PURE__ */ new Set(["EAGAIN", "EMFILE", "ENFILE", "EBUSY", "EINTR", "EIO", "ETIMEDOUT"]);
82
88
  var ATTEMPTS = 3;
83
89
  var BACKOFF_MS = 20;
@@ -110,19 +116,19 @@ function gitDirFromPointer(text, holder) {
110
116
  const match = /^\s*gitdir:\s*(.+?)\s*$/m.exec(text);
111
117
  if (!match) return null;
112
118
  const target = match[1];
113
- return isAbsolute(target) ? target : resolve(holder, target);
119
+ return isAbsolute2(target) ? target : resolve2(holder, target);
114
120
  }
115
121
  function commonDirOf(gitDir) {
116
- const pointer = entryKind(join4(gitDir, "commondir")) === "file" ? readTextOrNull(join4(gitDir, "commondir"))?.trim() : null;
122
+ const pointer = entryKind(join5(gitDir, "commondir")) === "file" ? readTextOrNull(join5(gitDir, "commondir"))?.trim() : null;
117
123
  if (!pointer) return gitDir;
118
- return isAbsolute(pointer) ? pointer : resolve(gitDir, pointer);
124
+ return isAbsolute2(pointer) ? pointer : resolve2(gitDir, pointer);
119
125
  }
120
126
  function isBare(commonDir) {
121
- const config = readTextOrNull(join4(commonDir, "config"));
127
+ const config = readTextOrNull(join5(commonDir, "config"));
122
128
  return config !== null && /^\s*bare\s*=\s*true\s*$/im.test(config);
123
129
  }
124
130
  function looksLikeBareRepository(directory) {
125
- return entryKind(join4(directory, "HEAD")) === "file" && entryKind(join4(directory, "objects")) === "dir" && entryKind(join4(directory, "refs")) === "dir";
131
+ return entryKind(join5(directory, "HEAD")) === "file" && entryKind(join5(directory, "objects")) === "dir" && entryKind(join5(directory, "refs")) === "dir";
126
132
  }
127
133
  function canonical(path) {
128
134
  try {
@@ -137,9 +143,9 @@ function resolved(commonDir) {
137
143
  return { status: "resolved", commonDir: canonicalDir, bare: isBare(canonicalDir) };
138
144
  }
139
145
  function probeOnce(directory) {
140
- let current2 = resolve(directory);
146
+ let current2 = resolve2(directory);
141
147
  for (; ; ) {
142
- const dotGit = join4(current2, ".git");
148
+ const dotGit = join5(current2, ".git");
143
149
  const kind = entryKind(dotGit);
144
150
  if (kind === "dir") {
145
151
  const layout = resolved(commonDirOf(dotGit));
@@ -250,10 +256,14 @@ function gitProjectName(directory, resolveWorktrees, sessionRoot = "") {
250
256
  return dirName(sessionRoot || directory);
251
257
  }
252
258
  function configuredDir(dir) {
253
- const expanded = dir === "~" || dir.startsWith("~/") ? join5(homedir2(), dir.slice(1)) : dir;
259
+ const expanded = dir === "~" || dir.startsWith("~/") ? join6(homedir2(), dir.slice(1)) : dir;
254
260
  return normalize(expanded).replace(new RegExp(`\\${sep}+$`), "");
255
261
  }
256
- function isWithin(directory, configured) {
262
+ function isWithin(directory, configured, platform = process.platform) {
263
+ if (platform === "win32") {
264
+ directory = directory.toLowerCase();
265
+ configured = configured.toLowerCase();
266
+ }
257
267
  return directory === configured || directory.startsWith(configured + sep);
258
268
  }
259
269
  function mapLookup(map, directory) {
@@ -396,11 +406,7 @@ var PLUGIN_GOVERNED_BANK_FIELDS = [
396
406
  ];
397
407
 
398
408
  // package.json
399
- var version = "0.8.6";
400
-
401
- // src/core/util.ts
402
- import { accessSync, constants, statSync as statSync2 } from "fs";
403
- import { delimiter, extname, isAbsolute as isAbsolute2, join as join6, resolve as resolve2 } from "path";
409
+ var version = "0.8.8";
404
410
 
405
411
  // src/core/hindsight.ts
406
412
  var USER_AGENT = `hindsight-coding-agents/${version}`;