@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.
- package/README.md +31 -21
- package/dist/antigravity-hook.js +278 -190
- package/dist/antigravity-statusline.js +30 -24
- package/dist/antigravity-stop-hook.js +271 -169
- package/dist/claude-hook.js +278 -190
- package/dist/claude-sessionstart-hook.js +301 -212
- package/dist/claude-stop-hook.js +271 -169
- package/dist/cline.js +258 -214
- package/dist/codebuddy-hook.js +278 -190
- package/dist/codebuddy-sessionstart-hook.js +301 -212
- package/dist/codebuddy-stop-hook.js +271 -169
- package/dist/codex-hook.js +278 -190
- package/dist/codex-sessionstart-hook.js +301 -212
- package/dist/codex-stop-hook.js +271 -169
- package/dist/copilot-hook.js +278 -190
- package/dist/copilot-sessionstart-hook.js +301 -212
- package/dist/copilot-stop-hook.js +271 -169
- package/dist/cursor-hook.js +278 -190
- package/dist/cursor-sessionstart-hook.js +301 -212
- package/dist/cursor-stop-hook.js +271 -169
- package/dist/daemon-start.js +20 -16
- package/dist/dcode-hook.js +278 -190
- package/dist/dcode-sessionstart-hook.js +301 -212
- package/dist/dcode-stop-hook.js +271 -169
- package/dist/deepen.js +98 -83
- package/dist/devin-hook.js +278 -190
- package/dist/devin-sessionstart-hook.js +301 -212
- package/dist/devin-stop-hook.js +271 -169
- package/dist/droid-hook.js +278 -190
- package/dist/droid-sessionstart-hook.js +301 -212
- package/dist/droid-stop-hook.js +271 -169
- package/dist/dsh.js +309 -251
- package/dist/grok-hook.js +278 -190
- package/dist/grok-sessionstart-hook.js +301 -212
- package/dist/grok-stop-hook.js +271 -169
- package/dist/hindsight-seed.js +35 -26
- package/dist/index.js +310 -252
- package/dist/installer.js +172 -68
- package/dist/kilo.js +310 -252
- package/dist/kimi-hook.js +278 -190
- package/dist/kimi-sessionstart-hook.js +301 -212
- package/dist/kimi-stop-hook.js +271 -169
- package/dist/mcp-server.js +165 -148
- package/dist/opencode2.js +310 -252
- package/dist/pi.js +309 -251
- package/dist/prime-agent.js +309 -251
- package/dist/qwen-hook.js +278 -190
- package/dist/qwen-sessionstart-hook.js +301 -212
- package/dist/qwen-stop-hook.js +271 -169
- package/dist/status.js +134 -117
- package/dist/traecode-hook.js +278 -190
- package/dist/traecode-sessionstart-hook.js +301 -212
- package/dist/traecode-stop-hook.js +271 -169
- package/dist/workbuddy-hook.js +278 -190
- package/dist/workbuddy-sessionstart-hook.js +301 -212
- package/dist/workbuddy-stop-hook.js +271 -169
- package/dist/zcode-hook.js +278 -190
- package/dist/zcode-sessionstart-hook.js +301 -212
- package/dist/zcode-stop-hook.js +271 -169
- package/package.json +2 -1
- package/plugin.json +1 -1
- package/skill/SKILL.md +31 -26
package/dist/daemon-start.js
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
331
|
+
import { dirname as dirname2, join as join3 } from "path";
|
|
326
332
|
function logsDir() {
|
|
327
|
-
return
|
|
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 (
|
|
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 ||
|
|
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 ||
|
|
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
|
|
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.
|
|
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
|
|
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;
|