@izagood/avcs 0.17.0 → 0.19.0
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/api/repo.d.ts +78 -0
- package/dist/api/repo.d.ts.map +1 -1
- package/dist/api/repo.js +221 -5
- package/dist/api/repo.js.map +1 -1
- package/dist/cli.js +42 -0
- package/dist/cli.js.map +1 -1
- package/dist/hub/hubServer.d.ts +9 -2
- package/dist/hub/hubServer.d.ts.map +1 -1
- package/dist/hub/hubServer.js +106 -4
- package/dist/hub/hubServer.js.map +1 -1
- package/dist/hub/syncWatch.d.ts +56 -0
- package/dist/hub/syncWatch.d.ts.map +1 -0
- package/dist/hub/syncWatch.js +186 -0
- package/dist/hub/syncWatch.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp/guide.d.ts +5 -0
- package/dist/mcp/guide.d.ts.map +1 -0
- package/dist/mcp/guide.js +67 -0
- package/dist/mcp/guide.js.map +1 -0
- package/dist/mcp/respond.d.ts +32 -0
- package/dist/mcp/respond.d.ts.map +1 -0
- package/dist/mcp/respond.js +74 -0
- package/dist/mcp/respond.js.map +1 -0
- package/dist/mcp/server.d.ts +19 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +200 -37
- package/dist/mcp/server.js.map +1 -1
- package/dist/merge/merge3.d.ts +13 -0
- package/dist/merge/merge3.d.ts.map +1 -1
- package/dist/merge/merge3.js +1 -1
- package/dist/merge/merge3.js.map +1 -1
- package/dist/query/diff.d.ts +13 -0
- package/dist/query/diff.d.ts.map +1 -1
- package/dist/query/diff.js +61 -0
- package/dist/query/diff.js.map +1 -1
- package/dist/store/lock.d.ts +8 -0
- package/dist/store/lock.d.ts.map +1 -1
- package/dist/store/lock.js +33 -0
- package/dist/store/lock.js.map +1 -1
- package/package.json +1 -1
package/dist/query/diff.d.ts
CHANGED
|
@@ -5,6 +5,19 @@ export interface TreeDiff {
|
|
|
5
5
|
modified: string[];
|
|
6
6
|
}
|
|
7
7
|
export declare function diffTrees(a: ReductionResult, b: ReductionResult): TreeDiff;
|
|
8
|
+
/**
|
|
9
|
+
* Unified diff of two texts (Phase 16 M1.2, docs/18 §1.2).
|
|
10
|
+
*
|
|
11
|
+
* Built on merge3's LCS hunk core rather than a second diff implementation: a patch an
|
|
12
|
+
* agent reads must describe the same line changes the reducer would merge, and two
|
|
13
|
+
* independent algorithms would eventually disagree about which lines moved.
|
|
14
|
+
*
|
|
15
|
+
* `context` lines surround each hunk; adjacent hunks whose context would overlap are
|
|
16
|
+
* emitted as one, the way `diff -u` does.
|
|
17
|
+
*/
|
|
18
|
+
export declare function unifiedDiff(a: string, b: string, opts?: {
|
|
19
|
+
context?: number;
|
|
20
|
+
}): string;
|
|
8
21
|
export interface OpSetDiff {
|
|
9
22
|
/** Accepted in b but not a. */
|
|
10
23
|
added: string[];
|
package/dist/query/diff.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../src/query/diff.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../src/query/diff.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC,EAAE,eAAe,GAAG,QAAQ,CAU1E;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,MAAM,CAsCzF;AAED,MAAM,WAAW,SAAS;IACxB,+BAA+B;IAC/B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,+BAA+B;IAC/B,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,6EAA6E;AAC7E,wBAAgB,eAAe,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC,EAAE,eAAe,GAAG,SAAS,CASjF"}
|
package/dist/query/diff.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// content-derived), so a path whose oid is unchanged is unchanged — diffing is just
|
|
5
5
|
// a map comparison. The AVCS-only axis is a *policy diff*: reduce the same ops under
|
|
6
6
|
// two policies and diff the trees to see what the policy change alone did.
|
|
7
|
+
import { diffHunks } from "../merge/merge3.js";
|
|
7
8
|
export function diffTrees(a, b) {
|
|
8
9
|
const added = [];
|
|
9
10
|
const removed = [];
|
|
@@ -19,6 +20,66 @@ export function diffTrees(a, b) {
|
|
|
19
20
|
removed.push(path);
|
|
20
21
|
return { added: added.sort(), removed: removed.sort(), modified: modified.sort() };
|
|
21
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Unified diff of two texts (Phase 16 M1.2, docs/18 §1.2).
|
|
25
|
+
*
|
|
26
|
+
* Built on merge3's LCS hunk core rather than a second diff implementation: a patch an
|
|
27
|
+
* agent reads must describe the same line changes the reducer would merge, and two
|
|
28
|
+
* independent algorithms would eventually disagree about which lines moved.
|
|
29
|
+
*
|
|
30
|
+
* `context` lines surround each hunk; adjacent hunks whose context would overlap are
|
|
31
|
+
* emitted as one, the way `diff -u` does.
|
|
32
|
+
*/
|
|
33
|
+
export function unifiedDiff(a, b, opts = {}) {
|
|
34
|
+
const ctx = opts.context ?? 3;
|
|
35
|
+
const split = (s) => (s === "" ? [] : s.split("\n").slice(0, s.endsWith("\n") ? -1 : undefined));
|
|
36
|
+
const al = split(a);
|
|
37
|
+
const bl = split(b);
|
|
38
|
+
const hunks = diffHunks(al, bl);
|
|
39
|
+
if (!hunks.length)
|
|
40
|
+
return "";
|
|
41
|
+
// Group hunks whose context windows touch, so the output reads like diff -u.
|
|
42
|
+
const groups = [];
|
|
43
|
+
for (const h of hunks) {
|
|
44
|
+
const last = groups[groups.length - 1];
|
|
45
|
+
const prev = last?.[last.length - 1];
|
|
46
|
+
if (prev && h.start - prev.end <= ctx * 2)
|
|
47
|
+
last.push(h);
|
|
48
|
+
else
|
|
49
|
+
groups.push([h]);
|
|
50
|
+
}
|
|
51
|
+
const out = [];
|
|
52
|
+
for (const group of groups) {
|
|
53
|
+
const first = group[0];
|
|
54
|
+
const last = group[group.length - 1];
|
|
55
|
+
const from = Math.max(0, first.start - ctx);
|
|
56
|
+
const to = Math.min(al.length, last.end + ctx);
|
|
57
|
+
// Count the b-side span: leading context + each hunk's replacement + the gaps between.
|
|
58
|
+
let bCount = 0;
|
|
59
|
+
let cur = from;
|
|
60
|
+
const body = [];
|
|
61
|
+
for (const h of group) {
|
|
62
|
+
for (let i = cur; i < h.start; i++) {
|
|
63
|
+
body.push(` ${al[i]}`);
|
|
64
|
+
bCount++;
|
|
65
|
+
}
|
|
66
|
+
for (let i = h.start; i < h.end; i++)
|
|
67
|
+
body.push(`-${al[i]}`);
|
|
68
|
+
for (const l of h.lines) {
|
|
69
|
+
body.push(`+${l}`);
|
|
70
|
+
bCount++;
|
|
71
|
+
}
|
|
72
|
+
cur = h.end;
|
|
73
|
+
}
|
|
74
|
+
for (let i = cur; i < to; i++) {
|
|
75
|
+
body.push(` ${al[i]}`);
|
|
76
|
+
bCount++;
|
|
77
|
+
}
|
|
78
|
+
const aCount = to - from;
|
|
79
|
+
out.push(`@@ -${from + 1},${aCount} +${from + 1},${bCount} @@`, ...body);
|
|
80
|
+
}
|
|
81
|
+
return out.join("\n") + "\n";
|
|
82
|
+
}
|
|
22
83
|
/** Symmetric difference of the accepted operation sets of two reductions. */
|
|
23
84
|
export function diffAcceptedOps(a, b) {
|
|
24
85
|
const accepted = (r) => new Set([...r.statuses].filter(([, s]) => s === "accepted").map(([oid]) => oid));
|
package/dist/query/diff.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff.js","sourceRoot":"","sources":["../../src/query/diff.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,EAAE;AACF,iFAAiF;AACjF,oFAAoF;AACpF,qFAAqF;AACrF,2EAA2E;
|
|
1
|
+
{"version":3,"file":"diff.js","sourceRoot":"","sources":["../../src/query/diff.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,EAAE;AACF,iFAAiF;AACjF,oFAAoF;AACpF,qFAAqF;AACrF,2EAA2E;AAE3E,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAS/C,MAAM,UAAU,SAAS,CAAC,CAAkB,EAAE,CAAkB;IAC9D,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,KAAK,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;QACjC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACnC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,GAAG;YAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzD,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE;QAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5E,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE,EA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C,IAAI,EAAE;KAClD,CAAC;AACJ,CAAC"}
|
package/dist/store/lock.d.ts
CHANGED
|
@@ -3,6 +3,14 @@ export interface LockOptions {
|
|
|
3
3
|
maxWaitMs?: number;
|
|
4
4
|
/** Treat a held lock older than this as abandoned and reclaim it. */
|
|
5
5
|
staleMs?: number;
|
|
6
|
+
/**
|
|
7
|
+
* Re-stamp the owner file on this interval while the lock is held (Phase 15.2).
|
|
8
|
+
* A long-lived holder (the sync-watch daemon) would otherwise exceed any waiter's
|
|
9
|
+
* `staleMs` and get its LIVE lock reclaimed. With a heartbeat the stamp stays fresh
|
|
10
|
+
* while the holder is alive, and a crashed holder stops stamping — so the normal
|
|
11
|
+
* stale-reclaim path still frees the lock. Omit for ordinary short critical sections.
|
|
12
|
+
*/
|
|
13
|
+
heartbeatMs?: number;
|
|
6
14
|
}
|
|
7
15
|
/**
|
|
8
16
|
* Run `fn` while holding the named lock under `locksDir`. Serializes concurrent
|
package/dist/store/lock.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../src/store/lock.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,WAAW;IAC1B,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../src/store/lock.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,WAAW;IAC1B,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAsB,QAAQ,CAAC,CAAC,EAC9B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,IAAI,GAAE,WAAgB,GACrB,OAAO,CAAC,CAAC,CAAC,CAmFZ"}
|
package/dist/store/lock.js
CHANGED
|
@@ -63,10 +63,43 @@ export async function withLock(locksDir, name, fn, opts = {}) {
|
|
|
63
63
|
await sleep(5 + Math.floor(Math.random() * 15)); // jittered backoff
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
+
// Keep the owner stamp fresh while `fn` runs (write-then-rename, same torn-read
|
|
67
|
+
// discipline as acquisition). Errors are swallowed: if the lock dir vanished the
|
|
68
|
+
// holder is about to find out via its own release, and a failed heartbeat must
|
|
69
|
+
// never crash the critical section it protects.
|
|
70
|
+
let heartbeat = null;
|
|
71
|
+
// Chain the stamp writes rather than firing each into the void. Two reasons, both
|
|
72
|
+
// about a write OUTLIVING the thing it belongs to:
|
|
73
|
+
// - release: clearInterval stops future ticks but not one already in flight. If its
|
|
74
|
+
// rename lands between the release rm's readdir and its rmdir, `owner` is
|
|
75
|
+
// resurrected and rmdir fails ENOTEMPTY — thrown from a `finally`, so it REPLACES
|
|
76
|
+
// fn()'s successful result, and leaves a freshly-stamped lock dir that blocks every
|
|
77
|
+
// waiter for a full staleMs. So release awaits this chain before removing anything.
|
|
78
|
+
// - overlap: a stamp write slower than the interval would otherwise interleave with
|
|
79
|
+
// the next tick; chaining serializes them.
|
|
80
|
+
let stampWrites = Promise.resolve();
|
|
81
|
+
if (opts.heartbeatMs !== undefined && opts.heartbeatMs > 0) {
|
|
82
|
+
heartbeat = setInterval(() => {
|
|
83
|
+
stampWrites = stampWrites.then(async () => {
|
|
84
|
+
try {
|
|
85
|
+
const tmp = join(lockPath, `owner.${process.pid}.hb.tmp`);
|
|
86
|
+
await writeFile(tmp, `${process.pid}:${Date.now()}`, "utf8");
|
|
87
|
+
await rename(tmp, ownerFile);
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
/* lock released/reclaimed underneath — nothing useful to do here */
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}, opts.heartbeatMs);
|
|
94
|
+
heartbeat.unref?.();
|
|
95
|
+
}
|
|
66
96
|
try {
|
|
67
97
|
return await fn();
|
|
68
98
|
}
|
|
69
99
|
finally {
|
|
100
|
+
if (heartbeat)
|
|
101
|
+
clearInterval(heartbeat);
|
|
102
|
+
await stampWrites; // no stamp write may survive into (or past) the removal below
|
|
70
103
|
await rm(lockPath, { recursive: true, force: true });
|
|
71
104
|
}
|
|
72
105
|
}
|
package/dist/store/lock.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock.js","sourceRoot":"","sources":["../../src/store/lock.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,iFAAiF;AACjF,kFAAkF;AAClF,EAAE;AACF,qFAAqF;AACrF,mFAAmF;AACnF,2DAA2D;AAE3D,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAC/C,CAAC;
|
|
1
|
+
{"version":3,"file":"lock.js","sourceRoot":"","sources":["../../src/store/lock.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,iFAAiF;AACjF,kFAAkF;AAClF,EAAE;AACF,qFAAqF;AACrF,mFAAmF;AACnF,2DAA2D;AAE3D,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,C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C;IACnD,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC,EAAE,CAAC;QAC3D,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE;YAC3B,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE;gBACxC,IAAI,CAAC;oBACH,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,EAAE,SAAS,OAAO,CAAC,GAAG,SAAS,CAAC,CAAC;oBAC1D,MAAM,SAAS,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC;oBAC7D,MAAM,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;gBAC/B,CAAC;gBAAC,MAAM,CAAC;oBACP,oEAAoE;gBACtE,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QACrB,SAAS,CAAC,KAAK,EAAE,EAAE,CAAC;IACtB,CAAC;IAED,IAAI,CAAC;QACH,OAAO,MAAM,EAAE,EAAE,CAAC;IACpB,CAAC;YAAS,CAAC;QACT,IAAI,SAAS;YAAE,aAAa,CAAC,SAAS,CAAC,CAAC;QACxC,MAAM,WAAW,CAAC,CAAC,8DAA8D;QACjF,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACvD,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@izagood/avcs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Agentic Version Control System — an AI-native VCS where intent, session, operation, evidence and decision are first-class objects and code is a materialized projection of an operation graph.",
|
|
6
6
|
"license": "Apache-2.0",
|