@appchy/jarvis 0.1.108 → 0.1.109
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.js +16 -12
- package/dist/bin.js.map +1 -1
- package/package.json +2 -2
package/dist/bin.js
CHANGED
|
@@ -2233,7 +2233,7 @@ Open Claude Code in a repo that has a work/ tree to see them.`);
|
|
|
2233
2233
|
}
|
|
2234
2234
|
|
|
2235
2235
|
// src/graph/hook.ts
|
|
2236
|
-
import { existsSync as existsSync2, mkdirSync as mkdirSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2, chmodSync } from "fs";
|
|
2236
|
+
import { existsSync as existsSync2, mkdirSync as mkdirSync2, readFileSync as readFileSync2, statSync, writeFileSync as writeFileSync2, chmodSync } from "fs";
|
|
2237
2237
|
import path10 from "path";
|
|
2238
2238
|
var SIGNATURE = "# managed by jarvis";
|
|
2239
2239
|
var SCRIPT = `#!/bin/sh
|
|
@@ -2262,11 +2262,12 @@ function findRepoRoot(from) {
|
|
|
2262
2262
|
}
|
|
2263
2263
|
}
|
|
2264
2264
|
function installCommitHook(repoRoot) {
|
|
2265
|
-
const
|
|
2265
|
+
const git4 = path10.join(repoRoot, ".git");
|
|
2266
|
+
const dir = path10.join(git4, "hooks");
|
|
2266
2267
|
const file = path10.join(dir, "post-commit");
|
|
2267
|
-
if (!existsSync2(
|
|
2268
|
-
|
|
2269
|
-
}
|
|
2268
|
+
if (!existsSync2(git4)) return { installed: false, reason: "not-a-repo" };
|
|
2269
|
+
if (!statSync(git4).isDirectory()) return { installed: false, reason: "worktree" };
|
|
2270
|
+
if (!existsSync2(path10.join(git4, "HEAD"))) return { installed: false, reason: "not-a-repo" };
|
|
2270
2271
|
if (existsSync2(file)) {
|
|
2271
2272
|
try {
|
|
2272
2273
|
if (!readFileSync2(file, "utf8").includes(SIGNATURE))
|
|
@@ -2290,6 +2291,9 @@ function describeCommitHook(outcome, repoRoot) {
|
|
|
2290
2291
|
if (outcome.reason === "not-a-repo")
|
|
2291
2292
|
return ` not a git repo, so there is no commit to rebuild on.
|
|
2292
2293
|
Run this inside one, or rebuild by hand with 'jarvis build graph'.`;
|
|
2294
|
+
if (outcome.reason === "worktree")
|
|
2295
|
+
return ` this is a worktree or a submodule, and it shares the hooks of the checkout it
|
|
2296
|
+
was made from. Wire that one instead, or rebuild by hand with 'jarvis build graph'.`;
|
|
2293
2297
|
if (outcome.reason === "foreign-hook")
|
|
2294
2298
|
return ` a post-commit hook is already here and it is not ours \u2014 left untouched.
|
|
2295
2299
|
Add this line to it to keep the map current: jarvis build graph >/dev/null 2>&1 &`;
|
|
@@ -3033,7 +3037,7 @@ function loadEnvFile(path23) {
|
|
|
3033
3037
|
|
|
3034
3038
|
// ../../providers/anthropic/src/anthropic.agent.provider.ts
|
|
3035
3039
|
import { execFile as execFile2 } from "child_process";
|
|
3036
|
-
import { chmodSync as chmodSync2, existsSync as existsSync4, readFileSync as readFileSync3, readdirSync as readdirSync2, statSync } from "fs";
|
|
3040
|
+
import { chmodSync as chmodSync2, existsSync as existsSync4, readFileSync as readFileSync3, readdirSync as readdirSync2, statSync as statSync2 } from "fs";
|
|
3037
3041
|
import { createRequire } from "module";
|
|
3038
3042
|
import { randomUUID } from "crypto";
|
|
3039
3043
|
import { homedir as homedir3 } from "os";
|
|
@@ -3093,7 +3097,7 @@ function ensureSpawnHelperIsExecutable() {
|
|
|
3093
3097
|
"spawn-helper"
|
|
3094
3098
|
);
|
|
3095
3099
|
if (!existsSync4(helper)) return;
|
|
3096
|
-
const mode =
|
|
3100
|
+
const mode = statSync2(helper).mode;
|
|
3097
3101
|
if (mode & 73) return;
|
|
3098
3102
|
chmodSync2(helper, mode | 493);
|
|
3099
3103
|
} catch {
|
|
@@ -7596,7 +7600,7 @@ function leavesOf(ladder) {
|
|
|
7596
7600
|
}
|
|
7597
7601
|
|
|
7598
7602
|
// ../../packages/data/src/mcp/tools/cache.ts
|
|
7599
|
-
import { statSync as
|
|
7603
|
+
import { statSync as statSync3 } from "fs";
|
|
7600
7604
|
import { resolve as resolve6 } from "path";
|
|
7601
7605
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7602
7606
|
async function cachedEnforcerDiags(ctx, freshPaths) {
|
|
@@ -7617,7 +7621,7 @@ function isFresh(snapshot, repoRoot, freshPaths) {
|
|
|
7617
7621
|
for (const path23 of freshPaths) {
|
|
7618
7622
|
let mtimeMs;
|
|
7619
7623
|
try {
|
|
7620
|
-
mtimeMs =
|
|
7624
|
+
mtimeMs = statSync3(resolve6(repoRoot, path23)).mtimeMs;
|
|
7621
7625
|
} catch {
|
|
7622
7626
|
return false;
|
|
7623
7627
|
}
|
|
@@ -10287,7 +10291,7 @@ import { createRequire as createRequire2 } from "module";
|
|
|
10287
10291
|
var _require = createRequire2(import.meta.url);
|
|
10288
10292
|
var VERSION2 = _require("../package.json").version ?? "0.0.0";
|
|
10289
10293
|
var IS_DEV = String(_require("../package.json").name ?? "").endsWith("-dev");
|
|
10290
|
-
var SHA = "
|
|
10294
|
+
var SHA = "fd09a8d";
|
|
10291
10295
|
var BUILT = "2026-09-12";
|
|
10292
10296
|
var BUILD = SHA ?? "source";
|
|
10293
10297
|
var BUILD_LABEL = `${SHA ? `${VERSION2} (${SHA}${BUILT ? ` ${BUILT}` : ""})` : `${VERSION2} (source)`}${IS_DEV ? " \u2014 development build" : ""}`;
|
|
@@ -11316,7 +11320,7 @@ function register18(program) {
|
|
|
11316
11320
|
}
|
|
11317
11321
|
|
|
11318
11322
|
// src/graph/build.ts
|
|
11319
|
-
import { mkdirSync as mkdirSync3, readFileSync as readFileSync7, rmSync, statSync as
|
|
11323
|
+
import { mkdirSync as mkdirSync3, readFileSync as readFileSync7, rmSync, statSync as statSync4, writeFileSync as writeFileSync4 } from "fs";
|
|
11320
11324
|
import { dirname as dirname6, resolve as resolve8 } from "path";
|
|
11321
11325
|
|
|
11322
11326
|
// src/graph/ratchet.ts
|
|
@@ -11541,7 +11545,7 @@ function acquireBuildLock(repoRoot, options = {}) {
|
|
|
11541
11545
|
}
|
|
11542
11546
|
function isStale(lockPath, staleMs) {
|
|
11543
11547
|
try {
|
|
11544
|
-
return Math.max(0, Date.now() -
|
|
11548
|
+
return Math.max(0, Date.now() - statSync4(lockPath).mtimeMs) >= staleMs;
|
|
11545
11549
|
} catch {
|
|
11546
11550
|
return true;
|
|
11547
11551
|
}
|