@appchy/jarvis 0.1.45 → 0.1.47
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 +33 -10
- package/dist/bin.js.map +1 -1
- package/dist/data/backends.mjs +10 -8
- package/dist/data/{chunk-LYW75USL.mjs → chunk-YBCQMMVE.mjs} +24 -2
- package/dist/data/embedders.mjs +1 -1
- package/dist/data/index.mjs +1 -1
- package/dist/data/labelers.mjs +1 -1
- package/dist/data/linkers.mjs +1 -1
- package/dist/data/mcp.mjs +1 -1
- package/dist/data/stores.mjs +1 -1
- package/dist/hooks/pre-tool-use.js +6 -4
- package/dist/hooks/pre-tool-use.js.map +1 -1
- package/dist/hooks/session-start.js +5 -4
- package/dist/hooks/session-start.js.map +1 -1
- package/dist/hooks/stop.js +5 -6
- package/dist/hooks/stop.js.map +1 -1
- package/harness/harness/gate.py +85 -16
- package/harness/harness/git.py +28 -37
- package/harness/test_work.py +115 -10
- package/package.json +7 -7
package/dist/bin.js
CHANGED
|
@@ -4606,22 +4606,23 @@ function harness2() {
|
|
|
4606
4606
|
return script && python ? [python, script] : INSTALLED;
|
|
4607
4607
|
}
|
|
4608
4608
|
function sessionContext(repo) {
|
|
4609
|
-
return say(["context"
|
|
4609
|
+
return say(repo, ["context"]);
|
|
4610
4610
|
}
|
|
4611
4611
|
function sessionMethod(repo) {
|
|
4612
|
-
return say(["method"
|
|
4612
|
+
return say(repo, ["method"]);
|
|
4613
4613
|
}
|
|
4614
4614
|
function wrapBrief(repo) {
|
|
4615
|
-
return say(["wrap"
|
|
4615
|
+
return say(repo, ["wrap"]);
|
|
4616
4616
|
}
|
|
4617
4617
|
var PATIENCE = 1e4;
|
|
4618
|
-
function say(args, timeout = PATIENCE) {
|
|
4618
|
+
function say(repo, args, timeout = PATIENCE) {
|
|
4619
4619
|
try {
|
|
4620
4620
|
const [command, ...prefix] = harness2();
|
|
4621
|
-
const
|
|
4621
|
+
const { WORK_DIR: _inherited, ...ambient } = process.env;
|
|
4622
|
+
const ran = spawnSync(command, [...prefix, ...args, "--project", repo], {
|
|
4622
4623
|
encoding: "utf-8",
|
|
4623
4624
|
timeout,
|
|
4624
|
-
env: { ...
|
|
4625
|
+
env: { ...ambient, CLAUDE_PROJECT_DIR: repo, PYTHONDONTWRITEBYTECODE: "1" }
|
|
4625
4626
|
});
|
|
4626
4627
|
if (ran.status !== 0) return null;
|
|
4627
4628
|
return ran.stdout.trim() ? ran.stdout.trimEnd() : null;
|
|
@@ -5818,6 +5819,17 @@ function validateConfig(value, path22) {
|
|
|
5818
5819
|
}
|
|
5819
5820
|
|
|
5820
5821
|
// ../../packages/data/src/embeddings.ts
|
|
5822
|
+
var CACHE_FORMAT = 2;
|
|
5823
|
+
function encodeVector(vector) {
|
|
5824
|
+
const floats = Float32Array.from(vector);
|
|
5825
|
+
return Buffer.from(floats.buffer, floats.byteOffset, floats.byteLength).toString("base64");
|
|
5826
|
+
}
|
|
5827
|
+
function decodeVector(encoded) {
|
|
5828
|
+
const buf = Buffer.from(encoded, "base64");
|
|
5829
|
+
const floats = new Float32Array(buf.byteLength / 4);
|
|
5830
|
+
Buffer.from(floats.buffer).set(buf);
|
|
5831
|
+
return Array.from(floats);
|
|
5832
|
+
}
|
|
5821
5833
|
async function buildEmbeddings(config2, graph2) {
|
|
5822
5834
|
const cfg = config2.search;
|
|
5823
5835
|
if (!cfg) return void 0;
|
|
@@ -5950,7 +5962,13 @@ async function loadCache(config2, ctx, model) {
|
|
|
5950
5962
|
const raw = await config2.persistence.load(ctx, "embeddings");
|
|
5951
5963
|
if (raw) {
|
|
5952
5964
|
const parsed = JSON.parse(raw);
|
|
5953
|
-
if (parsed.model === model && parsed.entries)
|
|
5965
|
+
if (parsed.model === model && parsed.format === CACHE_FORMAT && parsed.entries) {
|
|
5966
|
+
const entries = {};
|
|
5967
|
+
for (const [id, entry] of Object.entries(parsed.entries)) {
|
|
5968
|
+
entries[id] = { hash: entry.hash, vector: decodeVector(entry.vector) };
|
|
5969
|
+
}
|
|
5970
|
+
return { model: parsed.model, entries };
|
|
5971
|
+
}
|
|
5954
5972
|
}
|
|
5955
5973
|
} catch {
|
|
5956
5974
|
}
|
|
@@ -5958,7 +5976,12 @@ async function loadCache(config2, ctx, model) {
|
|
|
5958
5976
|
}
|
|
5959
5977
|
async function writeCache(config2, ctx, cache2) {
|
|
5960
5978
|
parsedCache.set(cacheKey(ctx, cache2.model), cache2);
|
|
5961
|
-
|
|
5979
|
+
const entries = {};
|
|
5980
|
+
for (const [id, entry] of Object.entries(cache2.entries)) {
|
|
5981
|
+
entries[id] = { hash: entry.hash, vector: encodeVector(entry.vector) };
|
|
5982
|
+
}
|
|
5983
|
+
const onDisk = { model: cache2.model, format: CACHE_FORMAT, entries };
|
|
5984
|
+
await config2.persistence.save(ctx, "embeddings", `${JSON.stringify(onDisk)}
|
|
5962
5985
|
`);
|
|
5963
5986
|
}
|
|
5964
5987
|
function hashText(text) {
|
|
@@ -9622,8 +9645,8 @@ import { createRequire as createRequire2 } from "module";
|
|
|
9622
9645
|
var _require = createRequire2(import.meta.url);
|
|
9623
9646
|
var VERSION2 = _require("../package.json").version ?? "0.0.0";
|
|
9624
9647
|
var IS_DEV = String(_require("../package.json").name ?? "").endsWith("-dev");
|
|
9625
|
-
var SHA = "
|
|
9626
|
-
var BUILT = "2026-09-
|
|
9648
|
+
var SHA = "ddc5877";
|
|
9649
|
+
var BUILT = "2026-09-08";
|
|
9627
9650
|
var BUILD = SHA ?? "source";
|
|
9628
9651
|
var BUILD_LABEL = `${SHA ? `${VERSION2} (${SHA}${BUILT ? ` ${BUILT}` : ""})` : `${VERSION2} (source)`}${IS_DEV ? " \u2014 development build" : ""}`;
|
|
9629
9652
|
|