@brainervirus/workit-cursor 8.34.0 → 8.35.2
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/.cursor-plugin/plugin.json +1 -1
- package/dist/cursor-session-start.js +74 -18
- package/dist/mcp-server.js +62 -15
- package/dist/workit-hook.js +74 -18
- package/package.json +3 -3
|
@@ -7856,9 +7856,16 @@ function workspaceDefaultTarget(cwd, globalDefault) {
|
|
|
7856
7856
|
}
|
|
7857
7857
|
var nonBlank, branchPreset, commitPreset, workspaceBranchPolicySchema, workspaceCommitPolicySchema, workspaceProfileSchema, versionSourceSchema, releaseTrackSchema, workspaceConfigSchema, workspacesFileSchema, workspacesRevision = (contents) => createHash4("sha256").update(contents ?? "<missing>").digest("hex"), validateWorkspacesDocument = (parsed, file) => {
|
|
7858
7858
|
if (!isConfigObject(parsed)) {
|
|
7859
|
-
return {
|
|
7859
|
+
return {
|
|
7860
|
+
status: "malformed",
|
|
7861
|
+
path: file,
|
|
7862
|
+
entries: [],
|
|
7863
|
+
error: `${file} is not a JSON object`
|
|
7864
|
+
};
|
|
7860
7865
|
}
|
|
7861
|
-
const validated = workspacesFileSchema.safeParse(parsed, {
|
|
7866
|
+
const validated = workspacesFileSchema.safeParse(parsed, {
|
|
7867
|
+
reportInput: true
|
|
7868
|
+
});
|
|
7862
7869
|
if (!validated.success) {
|
|
7863
7870
|
const detail = validated.error.issues.map((issue) => {
|
|
7864
7871
|
const field = String(issue.path[issue.path.length - 1] ?? "");
|
|
@@ -7897,7 +7904,12 @@ var nonBlank, branchPreset, commitPreset, workspaceBranchPolicySchema, workspace
|
|
|
7897
7904
|
raw = readFileSync2(file, "utf8");
|
|
7898
7905
|
} catch (error) {
|
|
7899
7906
|
if (error.code === "ENOENT")
|
|
7900
|
-
return {
|
|
7907
|
+
return {
|
|
7908
|
+
status: "missing",
|
|
7909
|
+
path: file,
|
|
7910
|
+
entries: [],
|
|
7911
|
+
revision: workspacesRevision(null)
|
|
7912
|
+
};
|
|
7901
7913
|
return {
|
|
7902
7914
|
status: "malformed",
|
|
7903
7915
|
path: file,
|
|
@@ -7917,7 +7929,10 @@ var nonBlank, branchPreset, commitPreset, workspaceBranchPolicySchema, workspace
|
|
|
7917
7929
|
error: `${file} is not valid JSON`
|
|
7918
7930
|
};
|
|
7919
7931
|
}
|
|
7920
|
-
return {
|
|
7932
|
+
return {
|
|
7933
|
+
...validateWorkspacesDocument(parsed, file),
|
|
7934
|
+
revision: workspacesRevision(raw)
|
|
7935
|
+
};
|
|
7921
7936
|
}, globToRegExp = (glob) => {
|
|
7922
7937
|
let out = "";
|
|
7923
7938
|
for (let i = 0;i < glob.length; i++) {
|
|
@@ -8103,7 +8118,10 @@ var nonBlank, branchPreset, commitPreset, workspaceBranchPolicySchema, workspace
|
|
|
8103
8118
|
return selected ? { file, selected, matches } : null;
|
|
8104
8119
|
}, resolveRuntimeReleaseTracks = (cwd) => {
|
|
8105
8120
|
const matched = matchRuntimeWorkspace(cwd);
|
|
8106
|
-
return matched ? {
|
|
8121
|
+
return matched ? {
|
|
8122
|
+
workspace: matched.selected.name,
|
|
8123
|
+
releaseTracks: matched.selected.releaseTracks
|
|
8124
|
+
} : null;
|
|
8107
8125
|
}, inheritedSetting = (cwd, dir, has) => {
|
|
8108
8126
|
let matched;
|
|
8109
8127
|
try {
|
|
@@ -8115,7 +8133,10 @@ var nonBlank, branchPreset, commitPreset, workspaceBranchPolicySchema, workspace
|
|
|
8115
8133
|
return null;
|
|
8116
8134
|
const { selected, matches } = matched;
|
|
8117
8135
|
const enclosing = matches.filter((entry) => entry !== selected).toSorted((a, b) => globSpecificity(b.glob) - globSpecificity(a.glob));
|
|
8118
|
-
return {
|
|
8136
|
+
return {
|
|
8137
|
+
workspace: selected.name,
|
|
8138
|
+
source: [selected, ...enclosing].find(has) ?? null
|
|
8139
|
+
};
|
|
8119
8140
|
}, workspaceTrailers = (cwd, dir) => {
|
|
8120
8141
|
const found = inheritedSetting(cwd, dir, (entry) => typeof entry.trailers === "boolean");
|
|
8121
8142
|
return {
|
|
@@ -8236,7 +8257,11 @@ var init_workspaces = __esm(() => {
|
|
|
8236
8257
|
["requiredChecks", track.requiredChecks ?? []]
|
|
8237
8258
|
]) {
|
|
8238
8259
|
if (new Set(values).size !== values.length) {
|
|
8239
|
-
context.addIssue({
|
|
8260
|
+
context.addIssue({
|
|
8261
|
+
code: "custom",
|
|
8262
|
+
path: [field],
|
|
8263
|
+
message: "entries must be unique"
|
|
8264
|
+
});
|
|
8240
8265
|
}
|
|
8241
8266
|
}
|
|
8242
8267
|
if (track.versionSource?.kind === "package-json" && (path4.posix.isAbsolute(track.versionSource.path.replaceAll("\\", "/")) || /^[A-Za-z]:\//u.test(track.versionSource.path.replaceAll("\\", "/")) || track.versionSource.path.replaceAll("\\", "/").split("/").includes(".."))) {
|
|
@@ -8269,7 +8294,10 @@ var init_workspaces = __esm(() => {
|
|
|
8269
8294
|
kind,
|
|
8270
8295
|
union([boolean2(), literal("verified")]).optional()
|
|
8271
8296
|
]))).passthrough().optional(),
|
|
8272
|
-
youtrack: object({
|
|
8297
|
+
youtrack: object({
|
|
8298
|
+
baseUrl: nonBlank.optional(),
|
|
8299
|
+
link_issues: boolean2().optional()
|
|
8300
|
+
}).passthrough().optional(),
|
|
8273
8301
|
issues: object({
|
|
8274
8302
|
provider: _enum(["github", "gitlab", "youtrack"]).optional(),
|
|
8275
8303
|
link: boolean2().optional(),
|
|
@@ -10420,7 +10448,12 @@ function readLedger(cwd, options = {}) {
|
|
|
10420
10448
|
});
|
|
10421
10449
|
return {
|
|
10422
10450
|
ok: true,
|
|
10423
|
-
value: {
|
|
10451
|
+
value: {
|
|
10452
|
+
path: file.value,
|
|
10453
|
+
rows,
|
|
10454
|
+
skipped,
|
|
10455
|
+
integrity: options.integrity ? integrity : null
|
|
10456
|
+
}
|
|
10424
10457
|
};
|
|
10425
10458
|
}
|
|
10426
10459
|
function ledgerTampering(cwd) {
|
|
@@ -10496,7 +10529,10 @@ function branchScope(cwd, branch) {
|
|
|
10496
10529
|
return at >= since && at <= until;
|
|
10497
10530
|
};
|
|
10498
10531
|
}
|
|
10499
|
-
function authorSessions(cwd, rows, branch, range = {
|
|
10532
|
+
function authorSessions(cwd, rows, branch, range = {
|
|
10533
|
+
base: null,
|
|
10534
|
+
head: null
|
|
10535
|
+
}, scope = branchScope(cwd, branch)) {
|
|
10500
10536
|
const sessions = new Set;
|
|
10501
10537
|
for (const row of rows) {
|
|
10502
10538
|
if (!scope(row) || row.type !== "commit.recorded" && row.type !== "task.opened")
|
|
@@ -10571,12 +10607,13 @@ function restackCarries(exactIn, rows, branch, from, to) {
|
|
|
10571
10607
|
const cwd = exactIn;
|
|
10572
10608
|
let known = restackExact.get(row);
|
|
10573
10609
|
if (known === undefined) {
|
|
10574
|
-
|
|
10610
|
+
const range = typeof row.fromBase === "string" && typeof row.toBase === "string" ? {
|
|
10575
10611
|
from: fromHead,
|
|
10576
10612
|
to: head,
|
|
10577
10613
|
fromBase: row.fromBase,
|
|
10578
10614
|
toBase: row.toBase
|
|
10579
|
-
}
|
|
10615
|
+
} : null;
|
|
10616
|
+
known = range !== null && (sameOwnChange(cwd, range) || cleanRebase(cwd, range));
|
|
10580
10617
|
restackExact.set(row, known);
|
|
10581
10618
|
}
|
|
10582
10619
|
return known;
|
|
@@ -10611,7 +10648,10 @@ function checkVerdicts(cwd, branch, ledgerRows) {
|
|
|
10611
10648
|
const cacheKey = `${base}\x00${at}`;
|
|
10612
10649
|
let key = keyCache.get(cacheKey);
|
|
10613
10650
|
if (!key) {
|
|
10614
|
-
key = {
|
|
10651
|
+
key = {
|
|
10652
|
+
patchId: patchId(cwd, base, at),
|
|
10653
|
+
diffHash: diffHash(cwd, base, at)
|
|
10654
|
+
};
|
|
10615
10655
|
keyCache.set(cacheKey, key);
|
|
10616
10656
|
}
|
|
10617
10657
|
return key;
|
|
@@ -10651,7 +10691,10 @@ function checkVerdicts(cwd, branch, ledgerRows) {
|
|
|
10651
10691
|
};
|
|
10652
10692
|
const exactCarry = (row) => FAILING.has(String(row.result)) || exactMatch(row) !== null;
|
|
10653
10693
|
const keyBasis = (row) => {
|
|
10654
|
-
const basis = verdictBasis(row, {
|
|
10694
|
+
const basis = verdictBasis(row, {
|
|
10695
|
+
head,
|
|
10696
|
+
...keyFor(row.base ?? fallbackBase)
|
|
10697
|
+
});
|
|
10655
10698
|
return basis === "carried" && !exactCarry(row) ? "stale" : basis;
|
|
10656
10699
|
};
|
|
10657
10700
|
const rebaseNote = (row) => row.head && head && row.head !== head && !FAILING.has(String(row.result)) && keyBasis(row) === "carried" && exactMatch(row) === "rebase" ? { rule: "rebase", since: row.head, files: [] } : null;
|
|
@@ -10756,7 +10799,11 @@ function checkVerdicts(cwd, branch, ledgerRows) {
|
|
|
10756
10799
|
const newestCurrent = verdicts.findLast((entry) => entry.current) ?? verdicts.at(-1) ?? null;
|
|
10757
10800
|
const failing = verdicts.find((entry) => entry.current && entry.independent && FAILING.has(String(entry.verdict.result)));
|
|
10758
10801
|
const newestAccepted = verdicts.findLast((entry) => entry.accepted && STRONG_RESULTS.has(String(entry.verdict.result))) ?? null;
|
|
10759
|
-
const accepted = tampered.length ? {
|
|
10802
|
+
const accepted = tampered.length ? {
|
|
10803
|
+
accepted: false,
|
|
10804
|
+
verdict: null,
|
|
10805
|
+
reasons: ["ledger_tampered"]
|
|
10806
|
+
} : newestAccepted && !failing ? { accepted: true, verdict: newestAccepted.verdict, reasons: [] } : {
|
|
10760
10807
|
accepted: false,
|
|
10761
10808
|
verdict: failing?.verdict ?? null,
|
|
10762
10809
|
reasons: failing ? ["failing_verdict"] : !newestCurrent ? ["no_verdict"] : newestCurrent.reasons.length ? newestCurrent.reasons : ["type_check_only"]
|
|
@@ -10774,7 +10821,10 @@ function checkVerdicts(cwd, branch, ledgerRows) {
|
|
|
10774
10821
|
selfVerdict: accepted.accepted ? null : selfEntry?.verdict ?? null,
|
|
10775
10822
|
base: newestCurrent?.verdict.base ?? fallbackBase,
|
|
10776
10823
|
patchId: keyFor(newestCurrent?.verdict.base ?? fallbackBase).patchId,
|
|
10777
|
-
current: {
|
|
10824
|
+
current: {
|
|
10825
|
+
basis: newestCurrent?.basis ?? "none",
|
|
10826
|
+
verdict: newestCurrent?.verdict ?? null
|
|
10827
|
+
},
|
|
10778
10828
|
carry: carryEntry?.carry ?? null,
|
|
10779
10829
|
reverify,
|
|
10780
10830
|
accepted,
|
|
@@ -17622,7 +17672,10 @@ function entryCompactContext(store, entry, session, context) {
|
|
|
17622
17672
|
const task = entry ? store.readTask(entry.id) : null;
|
|
17623
17673
|
if (task && !task.ok)
|
|
17624
17674
|
return null;
|
|
17625
|
-
const freshness = {
|
|
17675
|
+
const freshness = {
|
|
17676
|
+
mode: "signal",
|
|
17677
|
+
current: () => recentSignal(store.root)
|
|
17678
|
+
};
|
|
17626
17679
|
const observed = task?.data.evidence.some(isObservedCheck) ?? false;
|
|
17627
17680
|
const files = (task?.data.decisions ?? []).flatMap((decision) => decision.data.binding.contentRefs.flatMap((ref) => ref.kind === "file" ? [path20.resolve(store.root, ref.path)] : []));
|
|
17628
17681
|
const observedFiles = filesKey(files);
|
|
@@ -17719,7 +17772,10 @@ ${options.addendum}` : ""}
|
|
|
17719
17772
|
if (fs15.existsSync(dotGit)) {
|
|
17720
17773
|
const admin = fs15.statSync(dotGit).isFile() ? path20.resolve(dir, /^gitdir:\s*(.+)$/mu.exec(fs15.readFileSync(dotGit, "utf8"))?.[1]?.trim() ?? "") : dotGit;
|
|
17721
17774
|
const head = fs15.readFileSync(path20.join(admin, "HEAD"), "utf8").trim();
|
|
17722
|
-
return {
|
|
17775
|
+
return {
|
|
17776
|
+
root: dir,
|
|
17777
|
+
branch: /^ref: refs\/heads\/(.+)$/u.exec(head)?.[1] ?? null
|
|
17778
|
+
};
|
|
17723
17779
|
}
|
|
17724
17780
|
if (path20.dirname(dir) === dir)
|
|
17725
17781
|
return null;
|
package/dist/mcp-server.js
CHANGED
|
@@ -17307,7 +17307,11 @@ var releaseTrackSchema = object2({
|
|
|
17307
17307
|
["requiredChecks", track.requiredChecks ?? []]
|
|
17308
17308
|
]) {
|
|
17309
17309
|
if (new Set(values).size !== values.length) {
|
|
17310
|
-
context.addIssue({
|
|
17310
|
+
context.addIssue({
|
|
17311
|
+
code: "custom",
|
|
17312
|
+
path: [field],
|
|
17313
|
+
message: "entries must be unique"
|
|
17314
|
+
});
|
|
17311
17315
|
}
|
|
17312
17316
|
}
|
|
17313
17317
|
if (track.versionSource?.kind === "package-json" && (path4.posix.isAbsolute(track.versionSource.path.replaceAll("\\", "/")) || /^[A-Za-z]:\//u.test(track.versionSource.path.replaceAll("\\", "/")) || track.versionSource.path.replaceAll("\\", "/").split("/").includes(".."))) {
|
|
@@ -17340,7 +17344,10 @@ var workspaceConfigSchema = object2({
|
|
|
17340
17344
|
kind,
|
|
17341
17345
|
union([boolean2(), literal("verified")]).optional()
|
|
17342
17346
|
]))).passthrough().optional(),
|
|
17343
|
-
youtrack: object2({
|
|
17347
|
+
youtrack: object2({
|
|
17348
|
+
baseUrl: nonBlank.optional(),
|
|
17349
|
+
link_issues: boolean2().optional()
|
|
17350
|
+
}).passthrough().optional(),
|
|
17344
17351
|
issues: object2({
|
|
17345
17352
|
provider: _enum(["github", "gitlab", "youtrack"]).optional(),
|
|
17346
17353
|
link: boolean2().optional(),
|
|
@@ -17381,9 +17388,16 @@ var workspacesFileSchema = object2({
|
|
|
17381
17388
|
var workspacesRevision = (contents) => createHash2("sha256").update(contents ?? "<missing>").digest("hex");
|
|
17382
17389
|
var validateWorkspacesDocument = (parsed, file) => {
|
|
17383
17390
|
if (!isConfigObject(parsed)) {
|
|
17384
|
-
return {
|
|
17391
|
+
return {
|
|
17392
|
+
status: "malformed",
|
|
17393
|
+
path: file,
|
|
17394
|
+
entries: [],
|
|
17395
|
+
error: `${file} is not a JSON object`
|
|
17396
|
+
};
|
|
17385
17397
|
}
|
|
17386
|
-
const validated = workspacesFileSchema.safeParse(parsed, {
|
|
17398
|
+
const validated = workspacesFileSchema.safeParse(parsed, {
|
|
17399
|
+
reportInput: true
|
|
17400
|
+
});
|
|
17387
17401
|
if (!validated.success) {
|
|
17388
17402
|
const detail = validated.error.issues.map((issue) => {
|
|
17389
17403
|
const field = String(issue.path[issue.path.length - 1] ?? "");
|
|
@@ -17423,7 +17437,12 @@ var readWorkspacesResult = (dir = configDir()) => {
|
|
|
17423
17437
|
raw = readFileSync2(file, "utf8");
|
|
17424
17438
|
} catch (error) {
|
|
17425
17439
|
if (error.code === "ENOENT")
|
|
17426
|
-
return {
|
|
17440
|
+
return {
|
|
17441
|
+
status: "missing",
|
|
17442
|
+
path: file,
|
|
17443
|
+
entries: [],
|
|
17444
|
+
revision: workspacesRevision(null)
|
|
17445
|
+
};
|
|
17427
17446
|
return {
|
|
17428
17447
|
status: "malformed",
|
|
17429
17448
|
path: file,
|
|
@@ -17443,7 +17462,10 @@ var readWorkspacesResult = (dir = configDir()) => {
|
|
|
17443
17462
|
error: `${file} is not valid JSON`
|
|
17444
17463
|
};
|
|
17445
17464
|
}
|
|
17446
|
-
return {
|
|
17465
|
+
return {
|
|
17466
|
+
...validateWorkspacesDocument(parsed, file),
|
|
17467
|
+
revision: workspacesRevision(raw)
|
|
17468
|
+
};
|
|
17447
17469
|
};
|
|
17448
17470
|
var globToRegExp = (glob) => {
|
|
17449
17471
|
let out = "";
|
|
@@ -17654,7 +17676,10 @@ var matchRuntimeWorkspace = (cwd, dir = configDir()) => {
|
|
|
17654
17676
|
};
|
|
17655
17677
|
var resolveRuntimeReleaseTracks = (cwd) => {
|
|
17656
17678
|
const matched = matchRuntimeWorkspace(cwd);
|
|
17657
|
-
return matched ? {
|
|
17679
|
+
return matched ? {
|
|
17680
|
+
workspace: matched.selected.name,
|
|
17681
|
+
releaseTracks: matched.selected.releaseTracks
|
|
17682
|
+
} : null;
|
|
17658
17683
|
};
|
|
17659
17684
|
var TIER_KEYS = new Set(["mundane", "standard", "hard"]);
|
|
17660
17685
|
var TIER_HOSTS = new Set([
|
|
@@ -22997,7 +23022,12 @@ function readLedger(cwd, options = {}) {
|
|
|
22997
23022
|
});
|
|
22998
23023
|
return {
|
|
22999
23024
|
ok: true,
|
|
23000
|
-
value: {
|
|
23025
|
+
value: {
|
|
23026
|
+
path: file.value,
|
|
23027
|
+
rows,
|
|
23028
|
+
skipped,
|
|
23029
|
+
integrity: options.integrity ? integrity : null
|
|
23030
|
+
}
|
|
23001
23031
|
};
|
|
23002
23032
|
}
|
|
23003
23033
|
var TAMPER_REASONS = new Set(["hash_mismatch", "broken_link"]);
|
|
@@ -23090,7 +23120,10 @@ var renameAwareBranch = (scopeOf, branch) => {
|
|
|
23090
23120
|
return scopeOf(own)({ branch: theirs, at: target.at });
|
|
23091
23121
|
};
|
|
23092
23122
|
};
|
|
23093
|
-
function authorSessions(cwd, rows, branch, range = {
|
|
23123
|
+
function authorSessions(cwd, rows, branch, range = {
|
|
23124
|
+
base: null,
|
|
23125
|
+
head: null
|
|
23126
|
+
}, scope = branchScope(cwd, branch)) {
|
|
23094
23127
|
const sessions = new Set;
|
|
23095
23128
|
for (const row of rows) {
|
|
23096
23129
|
if (!scope(row) || row.type !== "commit.recorded" && row.type !== "task.opened")
|
|
@@ -23201,12 +23234,13 @@ function restackCarries(exactIn, rows, branch, from, to) {
|
|
|
23201
23234
|
const cwd = exactIn;
|
|
23202
23235
|
let known = restackExact.get(row);
|
|
23203
23236
|
if (known === undefined) {
|
|
23204
|
-
|
|
23237
|
+
const range = typeof row.fromBase === "string" && typeof row.toBase === "string" ? {
|
|
23205
23238
|
from: fromHead,
|
|
23206
23239
|
to: head,
|
|
23207
23240
|
fromBase: row.fromBase,
|
|
23208
23241
|
toBase: row.toBase
|
|
23209
|
-
}
|
|
23242
|
+
} : null;
|
|
23243
|
+
known = range !== null && (sameOwnChange(cwd, range) || cleanRebase(cwd, range));
|
|
23210
23244
|
restackExact.set(row, known);
|
|
23211
23245
|
}
|
|
23212
23246
|
return known;
|
|
@@ -23241,7 +23275,10 @@ function checkVerdicts(cwd, branch, ledgerRows) {
|
|
|
23241
23275
|
const cacheKey = `${base}\x00${at}`;
|
|
23242
23276
|
let key = keyCache.get(cacheKey);
|
|
23243
23277
|
if (!key) {
|
|
23244
|
-
key = {
|
|
23278
|
+
key = {
|
|
23279
|
+
patchId: patchId(cwd, base, at),
|
|
23280
|
+
diffHash: diffHash(cwd, base, at)
|
|
23281
|
+
};
|
|
23245
23282
|
keyCache.set(cacheKey, key);
|
|
23246
23283
|
}
|
|
23247
23284
|
return key;
|
|
@@ -23281,7 +23318,10 @@ function checkVerdicts(cwd, branch, ledgerRows) {
|
|
|
23281
23318
|
};
|
|
23282
23319
|
const exactCarry = (row) => FAILING.has(String(row.result)) || exactMatch(row) !== null;
|
|
23283
23320
|
const keyBasis = (row) => {
|
|
23284
|
-
const basis = verdictBasis(row, {
|
|
23321
|
+
const basis = verdictBasis(row, {
|
|
23322
|
+
head,
|
|
23323
|
+
...keyFor(row.base ?? fallbackBase)
|
|
23324
|
+
});
|
|
23285
23325
|
return basis === "carried" && !exactCarry(row) ? "stale" : basis;
|
|
23286
23326
|
};
|
|
23287
23327
|
const rebaseNote = (row) => row.head && head && row.head !== head && !FAILING.has(String(row.result)) && keyBasis(row) === "carried" && exactMatch(row) === "rebase" ? { rule: "rebase", since: row.head, files: [] } : null;
|
|
@@ -23386,7 +23426,11 @@ function checkVerdicts(cwd, branch, ledgerRows) {
|
|
|
23386
23426
|
const newestCurrent = verdicts.findLast((entry) => entry.current) ?? verdicts.at(-1) ?? null;
|
|
23387
23427
|
const failing = verdicts.find((entry) => entry.current && entry.independent && FAILING.has(String(entry.verdict.result)));
|
|
23388
23428
|
const newestAccepted = verdicts.findLast((entry) => entry.accepted && STRONG_RESULTS.has(String(entry.verdict.result))) ?? null;
|
|
23389
|
-
const accepted = tampered.length ? {
|
|
23429
|
+
const accepted = tampered.length ? {
|
|
23430
|
+
accepted: false,
|
|
23431
|
+
verdict: null,
|
|
23432
|
+
reasons: ["ledger_tampered"]
|
|
23433
|
+
} : newestAccepted && !failing ? { accepted: true, verdict: newestAccepted.verdict, reasons: [] } : {
|
|
23390
23434
|
accepted: false,
|
|
23391
23435
|
verdict: failing?.verdict ?? null,
|
|
23392
23436
|
reasons: failing ? ["failing_verdict"] : !newestCurrent ? ["no_verdict"] : newestCurrent.reasons.length ? newestCurrent.reasons : ["type_check_only"]
|
|
@@ -23404,7 +23448,10 @@ function checkVerdicts(cwd, branch, ledgerRows) {
|
|
|
23404
23448
|
selfVerdict: accepted.accepted ? null : selfEntry?.verdict ?? null,
|
|
23405
23449
|
base: newestCurrent?.verdict.base ?? fallbackBase,
|
|
23406
23450
|
patchId: keyFor(newestCurrent?.verdict.base ?? fallbackBase).patchId,
|
|
23407
|
-
current: {
|
|
23451
|
+
current: {
|
|
23452
|
+
basis: newestCurrent?.basis ?? "none",
|
|
23453
|
+
verdict: newestCurrent?.verdict ?? null
|
|
23454
|
+
},
|
|
23408
23455
|
carry: carryEntry?.carry ?? null,
|
|
23409
23456
|
reverify,
|
|
23410
23457
|
accepted,
|
package/dist/workit-hook.js
CHANGED
|
@@ -7836,7 +7836,11 @@ var releaseTrackSchema = object({
|
|
|
7836
7836
|
["requiredChecks", track.requiredChecks ?? []]
|
|
7837
7837
|
]) {
|
|
7838
7838
|
if (new Set(values).size !== values.length) {
|
|
7839
|
-
context.addIssue({
|
|
7839
|
+
context.addIssue({
|
|
7840
|
+
code: "custom",
|
|
7841
|
+
path: [field],
|
|
7842
|
+
message: "entries must be unique"
|
|
7843
|
+
});
|
|
7840
7844
|
}
|
|
7841
7845
|
}
|
|
7842
7846
|
if (track.versionSource?.kind === "package-json" && (path4.posix.isAbsolute(track.versionSource.path.replaceAll("\\", "/")) || /^[A-Za-z]:\//u.test(track.versionSource.path.replaceAll("\\", "/")) || track.versionSource.path.replaceAll("\\", "/").split("/").includes(".."))) {
|
|
@@ -7869,7 +7873,10 @@ var workspaceConfigSchema = object({
|
|
|
7869
7873
|
kind,
|
|
7870
7874
|
union([boolean2(), literal("verified")]).optional()
|
|
7871
7875
|
]))).passthrough().optional(),
|
|
7872
|
-
youtrack: object({
|
|
7876
|
+
youtrack: object({
|
|
7877
|
+
baseUrl: nonBlank.optional(),
|
|
7878
|
+
link_issues: boolean2().optional()
|
|
7879
|
+
}).passthrough().optional(),
|
|
7873
7880
|
issues: object({
|
|
7874
7881
|
provider: _enum(["github", "gitlab", "youtrack"]).optional(),
|
|
7875
7882
|
link: boolean2().optional(),
|
|
@@ -7910,9 +7917,16 @@ var workspacesFileSchema = object({
|
|
|
7910
7917
|
var workspacesRevision = (contents) => createHash4("sha256").update(contents ?? "<missing>").digest("hex");
|
|
7911
7918
|
var validateWorkspacesDocument = (parsed, file) => {
|
|
7912
7919
|
if (!isConfigObject(parsed)) {
|
|
7913
|
-
return {
|
|
7920
|
+
return {
|
|
7921
|
+
status: "malformed",
|
|
7922
|
+
path: file,
|
|
7923
|
+
entries: [],
|
|
7924
|
+
error: `${file} is not a JSON object`
|
|
7925
|
+
};
|
|
7914
7926
|
}
|
|
7915
|
-
const validated = workspacesFileSchema.safeParse(parsed, {
|
|
7927
|
+
const validated = workspacesFileSchema.safeParse(parsed, {
|
|
7928
|
+
reportInput: true
|
|
7929
|
+
});
|
|
7916
7930
|
if (!validated.success) {
|
|
7917
7931
|
const detail = validated.error.issues.map((issue) => {
|
|
7918
7932
|
const field = String(issue.path[issue.path.length - 1] ?? "");
|
|
@@ -7952,7 +7966,12 @@ var readWorkspacesResult = (dir = configDir()) => {
|
|
|
7952
7966
|
raw = readFileSync2(file, "utf8");
|
|
7953
7967
|
} catch (error) {
|
|
7954
7968
|
if (error.code === "ENOENT")
|
|
7955
|
-
return {
|
|
7969
|
+
return {
|
|
7970
|
+
status: "missing",
|
|
7971
|
+
path: file,
|
|
7972
|
+
entries: [],
|
|
7973
|
+
revision: workspacesRevision(null)
|
|
7974
|
+
};
|
|
7956
7975
|
return {
|
|
7957
7976
|
status: "malformed",
|
|
7958
7977
|
path: file,
|
|
@@ -7972,7 +7991,10 @@ var readWorkspacesResult = (dir = configDir()) => {
|
|
|
7972
7991
|
error: `${file} is not valid JSON`
|
|
7973
7992
|
};
|
|
7974
7993
|
}
|
|
7975
|
-
return {
|
|
7994
|
+
return {
|
|
7995
|
+
...validateWorkspacesDocument(parsed, file),
|
|
7996
|
+
revision: workspacesRevision(raw)
|
|
7997
|
+
};
|
|
7976
7998
|
};
|
|
7977
7999
|
var globToRegExp = (glob) => {
|
|
7978
8000
|
let out = "";
|
|
@@ -8183,7 +8205,10 @@ var matchRuntimeWorkspace = (cwd, dir = configDir()) => {
|
|
|
8183
8205
|
};
|
|
8184
8206
|
var resolveRuntimeReleaseTracks = (cwd) => {
|
|
8185
8207
|
const matched = matchRuntimeWorkspace(cwd);
|
|
8186
|
-
return matched ? {
|
|
8208
|
+
return matched ? {
|
|
8209
|
+
workspace: matched.selected.name,
|
|
8210
|
+
releaseTracks: matched.selected.releaseTracks
|
|
8211
|
+
} : null;
|
|
8187
8212
|
};
|
|
8188
8213
|
var inheritedSetting = (cwd, dir, has) => {
|
|
8189
8214
|
let matched;
|
|
@@ -8196,7 +8221,10 @@ var inheritedSetting = (cwd, dir, has) => {
|
|
|
8196
8221
|
return null;
|
|
8197
8222
|
const { selected, matches } = matched;
|
|
8198
8223
|
const enclosing = matches.filter((entry) => entry !== selected).toSorted((a, b) => globSpecificity(b.glob) - globSpecificity(a.glob));
|
|
8199
|
-
return {
|
|
8224
|
+
return {
|
|
8225
|
+
workspace: selected.name,
|
|
8226
|
+
source: [selected, ...enclosing].find(has) ?? null
|
|
8227
|
+
};
|
|
8200
8228
|
};
|
|
8201
8229
|
var workspaceTrailers = (cwd, dir) => {
|
|
8202
8230
|
const found = inheritedSetting(cwd, dir, (entry) => typeof entry.trailers === "boolean");
|
|
@@ -10581,7 +10609,12 @@ function readLedger(cwd, options = {}) {
|
|
|
10581
10609
|
});
|
|
10582
10610
|
return {
|
|
10583
10611
|
ok: true,
|
|
10584
|
-
value: {
|
|
10612
|
+
value: {
|
|
10613
|
+
path: file.value,
|
|
10614
|
+
rows,
|
|
10615
|
+
skipped,
|
|
10616
|
+
integrity: options.integrity ? integrity : null
|
|
10617
|
+
}
|
|
10585
10618
|
};
|
|
10586
10619
|
}
|
|
10587
10620
|
var TAMPER_REASONS = new Set(["hash_mismatch", "broken_link"]);
|
|
@@ -10674,7 +10707,10 @@ var renameAwareBranch = (scopeOf, branch) => {
|
|
|
10674
10707
|
return scopeOf(own)({ branch: theirs, at: target.at });
|
|
10675
10708
|
};
|
|
10676
10709
|
};
|
|
10677
|
-
function authorSessions(cwd, rows, branch, range = {
|
|
10710
|
+
function authorSessions(cwd, rows, branch, range = {
|
|
10711
|
+
base: null,
|
|
10712
|
+
head: null
|
|
10713
|
+
}, scope = branchScope(cwd, branch)) {
|
|
10678
10714
|
const sessions = new Set;
|
|
10679
10715
|
for (const row of rows) {
|
|
10680
10716
|
if (!scope(row) || row.type !== "commit.recorded" && row.type !== "task.opened")
|
|
@@ -10785,12 +10821,13 @@ function restackCarries(exactIn, rows, branch, from, to) {
|
|
|
10785
10821
|
const cwd = exactIn;
|
|
10786
10822
|
let known = restackExact.get(row);
|
|
10787
10823
|
if (known === undefined) {
|
|
10788
|
-
|
|
10824
|
+
const range = typeof row.fromBase === "string" && typeof row.toBase === "string" ? {
|
|
10789
10825
|
from: fromHead,
|
|
10790
10826
|
to: head,
|
|
10791
10827
|
fromBase: row.fromBase,
|
|
10792
10828
|
toBase: row.toBase
|
|
10793
|
-
}
|
|
10829
|
+
} : null;
|
|
10830
|
+
known = range !== null && (sameOwnChange(cwd, range) || cleanRebase(cwd, range));
|
|
10794
10831
|
restackExact.set(row, known);
|
|
10795
10832
|
}
|
|
10796
10833
|
return known;
|
|
@@ -10825,7 +10862,10 @@ function checkVerdicts(cwd, branch, ledgerRows) {
|
|
|
10825
10862
|
const cacheKey = `${base}\x00${at}`;
|
|
10826
10863
|
let key = keyCache.get(cacheKey);
|
|
10827
10864
|
if (!key) {
|
|
10828
|
-
key = {
|
|
10865
|
+
key = {
|
|
10866
|
+
patchId: patchId(cwd, base, at),
|
|
10867
|
+
diffHash: diffHash(cwd, base, at)
|
|
10868
|
+
};
|
|
10829
10869
|
keyCache.set(cacheKey, key);
|
|
10830
10870
|
}
|
|
10831
10871
|
return key;
|
|
@@ -10865,7 +10905,10 @@ function checkVerdicts(cwd, branch, ledgerRows) {
|
|
|
10865
10905
|
};
|
|
10866
10906
|
const exactCarry = (row) => FAILING.has(String(row.result)) || exactMatch(row) !== null;
|
|
10867
10907
|
const keyBasis = (row) => {
|
|
10868
|
-
const basis = verdictBasis(row, {
|
|
10908
|
+
const basis = verdictBasis(row, {
|
|
10909
|
+
head,
|
|
10910
|
+
...keyFor(row.base ?? fallbackBase)
|
|
10911
|
+
});
|
|
10869
10912
|
return basis === "carried" && !exactCarry(row) ? "stale" : basis;
|
|
10870
10913
|
};
|
|
10871
10914
|
const rebaseNote = (row) => row.head && head && row.head !== head && !FAILING.has(String(row.result)) && keyBasis(row) === "carried" && exactMatch(row) === "rebase" ? { rule: "rebase", since: row.head, files: [] } : null;
|
|
@@ -10970,7 +11013,11 @@ function checkVerdicts(cwd, branch, ledgerRows) {
|
|
|
10970
11013
|
const newestCurrent = verdicts.findLast((entry) => entry.current) ?? verdicts.at(-1) ?? null;
|
|
10971
11014
|
const failing = verdicts.find((entry) => entry.current && entry.independent && FAILING.has(String(entry.verdict.result)));
|
|
10972
11015
|
const newestAccepted = verdicts.findLast((entry) => entry.accepted && STRONG_RESULTS.has(String(entry.verdict.result))) ?? null;
|
|
10973
|
-
const accepted = tampered.length ? {
|
|
11016
|
+
const accepted = tampered.length ? {
|
|
11017
|
+
accepted: false,
|
|
11018
|
+
verdict: null,
|
|
11019
|
+
reasons: ["ledger_tampered"]
|
|
11020
|
+
} : newestAccepted && !failing ? { accepted: true, verdict: newestAccepted.verdict, reasons: [] } : {
|
|
10974
11021
|
accepted: false,
|
|
10975
11022
|
verdict: failing?.verdict ?? null,
|
|
10976
11023
|
reasons: failing ? ["failing_verdict"] : !newestCurrent ? ["no_verdict"] : newestCurrent.reasons.length ? newestCurrent.reasons : ["type_check_only"]
|
|
@@ -10988,7 +11035,10 @@ function checkVerdicts(cwd, branch, ledgerRows) {
|
|
|
10988
11035
|
selfVerdict: accepted.accepted ? null : selfEntry?.verdict ?? null,
|
|
10989
11036
|
base: newestCurrent?.verdict.base ?? fallbackBase,
|
|
10990
11037
|
patchId: keyFor(newestCurrent?.verdict.base ?? fallbackBase).patchId,
|
|
10991
|
-
current: {
|
|
11038
|
+
current: {
|
|
11039
|
+
basis: newestCurrent?.basis ?? "none",
|
|
11040
|
+
verdict: newestCurrent?.verdict ?? null
|
|
11041
|
+
},
|
|
10992
11042
|
carry: carryEntry?.carry ?? null,
|
|
10993
11043
|
reverify,
|
|
10994
11044
|
accepted,
|
|
@@ -17713,7 +17763,10 @@ function entryCompactContext(store, entry, session, context) {
|
|
|
17713
17763
|
const task = entry ? store.readTask(entry.id) : null;
|
|
17714
17764
|
if (task && !task.ok)
|
|
17715
17765
|
return null;
|
|
17716
|
-
const freshness = {
|
|
17766
|
+
const freshness = {
|
|
17767
|
+
mode: "signal",
|
|
17768
|
+
current: () => recentSignal(store.root)
|
|
17769
|
+
};
|
|
17717
17770
|
const observed = task?.data.evidence.some(isObservedCheck) ?? false;
|
|
17718
17771
|
const files = (task?.data.decisions ?? []).flatMap((decision) => decision.data.binding.contentRefs.flatMap((ref) => ref.kind === "file" ? [path20.resolve(store.root, ref.path)] : []));
|
|
17719
17772
|
const observedFiles = filesKey(files);
|
|
@@ -17779,7 +17832,10 @@ var checkoutAt = (cwd) => {
|
|
|
17779
17832
|
if (fs15.existsSync(dotGit)) {
|
|
17780
17833
|
const admin = fs15.statSync(dotGit).isFile() ? path20.resolve(dir, /^gitdir:\s*(.+)$/mu.exec(fs15.readFileSync(dotGit, "utf8"))?.[1]?.trim() ?? "") : dotGit;
|
|
17781
17834
|
const head = fs15.readFileSync(path20.join(admin, "HEAD"), "utf8").trim();
|
|
17782
|
-
return {
|
|
17835
|
+
return {
|
|
17836
|
+
root: dir,
|
|
17837
|
+
branch: /^ref: refs\/heads\/(.+)$/u.exec(head)?.[1] ?? null
|
|
17838
|
+
};
|
|
17783
17839
|
}
|
|
17784
17840
|
if (path20.dirname(dir) === dir)
|
|
17785
17841
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brainervirus/workit-cursor",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.35.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Workit Cursor plugin — shared MCP transport, native hooks, and sixteen method skills",
|
|
6
6
|
"keywords": [
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"build": "bun scripts/build.ts"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@brainervirus/workit-core": "^8.
|
|
50
|
-
"@brainervirus/workit-mcp": "^8.
|
|
49
|
+
"@brainervirus/workit-core": "^8.35.2",
|
|
50
|
+
"@brainervirus/workit-mcp": "^8.35.2"
|
|
51
51
|
},
|
|
52
52
|
"engines": {
|
|
53
53
|
"node": ">=24"
|