@brainervirus/workit-mcp 8.0.0 → 8.0.1
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/index.js +66 -60
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -16573,12 +16573,12 @@ class StdioServerTransport {
|
|
|
16573
16573
|
// packages/workit-mcp/src/server.ts
|
|
16574
16574
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
16575
16575
|
|
|
16576
|
-
// packages/workit-
|
|
16576
|
+
// packages/workit-core/src/core.ts
|
|
16577
16577
|
import { spawnSync as spawnSync12 } from "node:child_process";
|
|
16578
16578
|
import { existsSync as existsSync7, realpathSync as realpathSync5 } from "node:fs";
|
|
16579
16579
|
import path19 from "node:path";
|
|
16580
16580
|
|
|
16581
|
-
// packages/workit-
|
|
16581
|
+
// packages/workit-core/src/core/task-contract.ts
|
|
16582
16582
|
import { createHash, randomUUID } from "node:crypto";
|
|
16583
16583
|
var SCHEMA_VERSION = 1;
|
|
16584
16584
|
var POLICY_VERSION = "1.0.0";
|
|
@@ -17434,7 +17434,7 @@ function requirementId(input) {
|
|
|
17434
17434
|
}
|
|
17435
17435
|
});
|
|
17436
17436
|
}
|
|
17437
|
-
// packages/workit-
|
|
17437
|
+
// packages/workit-core/src/core/operation-input.ts
|
|
17438
17438
|
var str = (d, values) => ({
|
|
17439
17439
|
type: "string",
|
|
17440
17440
|
...values ? { enum: values } : {},
|
|
@@ -17830,7 +17830,7 @@ function parseAdvertisedOperation(family, input, host) {
|
|
|
17830
17830
|
}))
|
|
17831
17831
|
});
|
|
17832
17832
|
}
|
|
17833
|
-
// packages/workit-
|
|
17833
|
+
// packages/workit-core/src/core/task-store.ts
|
|
17834
17834
|
import { createHash as createHash4, randomUUID as randomUUID3 } from "node:crypto";
|
|
17835
17835
|
import * as fs7 from "node:fs";
|
|
17836
17836
|
import path6 from "node:path";
|
|
@@ -18436,7 +18436,7 @@ function acquireFileLockSync(targetPath, options) {
|
|
|
18436
18436
|
}
|
|
18437
18437
|
}
|
|
18438
18438
|
}
|
|
18439
|
-
// packages/workit-
|
|
18439
|
+
// packages/workit-core/src/core/package-root.ts
|
|
18440
18440
|
import { existsSync } from "node:fs";
|
|
18441
18441
|
import path3 from "node:path";
|
|
18442
18442
|
import { fileURLToPath } from "node:url";
|
|
@@ -18455,12 +18455,12 @@ var assetRoot = () => {
|
|
|
18455
18455
|
return existsSync(assets) ? assets : root;
|
|
18456
18456
|
};
|
|
18457
18457
|
|
|
18458
|
-
// packages/workit-
|
|
18458
|
+
// packages/workit-core/src/core/store-lock.ts
|
|
18459
18459
|
import { spawnSync as spawnSync2 } from "node:child_process";
|
|
18460
18460
|
import fs5 from "node:fs";
|
|
18461
18461
|
import { hostname } from "node:os";
|
|
18462
18462
|
|
|
18463
|
-
// packages/workit-
|
|
18463
|
+
// packages/workit-core/src/store/paths.ts
|
|
18464
18464
|
import { spawnSync } from "node:child_process";
|
|
18465
18465
|
import { createHash as createHash2 } from "node:crypto";
|
|
18466
18466
|
import fs4 from "node:fs";
|
|
@@ -18740,7 +18740,7 @@ var checkoutSlug = (root) => {
|
|
|
18740
18740
|
return `${base}-${shortHash(canonical)}`;
|
|
18741
18741
|
};
|
|
18742
18742
|
|
|
18743
|
-
// packages/workit-
|
|
18743
|
+
// packages/workit-core/src/core/store-lock.ts
|
|
18744
18744
|
var metadataLockSchema = object2({
|
|
18745
18745
|
pid: number2().int().nonnegative().safe(),
|
|
18746
18746
|
processStart: string2().nullable(),
|
|
@@ -18871,7 +18871,7 @@ var clearAbandonedReclaimGuard = (lockPath, nowMs = Date.now()) => {
|
|
|
18871
18871
|
}
|
|
18872
18872
|
};
|
|
18873
18873
|
|
|
18874
|
-
// packages/workit-
|
|
18874
|
+
// packages/workit-core/src/store/event-log.ts
|
|
18875
18875
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
18876
18876
|
import fs6 from "node:fs";
|
|
18877
18877
|
import path5 from "node:path";
|
|
@@ -19031,7 +19031,7 @@ var retryTransient = (run) => {
|
|
|
19031
19031
|
};
|
|
19032
19032
|
var renameWithRetry = (from, to) => retryTransient(() => fs6.renameSync(from, to));
|
|
19033
19033
|
|
|
19034
|
-
// packages/workit-
|
|
19034
|
+
// packages/workit-core/src/store/patch.ts
|
|
19035
19035
|
var isPlainObject3 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
19036
19036
|
var equal = (left, right) => {
|
|
19037
19037
|
if (left === right)
|
|
@@ -19141,7 +19141,7 @@ var isPatch = (value) => Array.isArray(value) && value.every((op) => {
|
|
|
19141
19141
|
return false;
|
|
19142
19142
|
});
|
|
19143
19143
|
|
|
19144
|
-
// packages/workit-
|
|
19144
|
+
// packages/workit-core/src/store/reduce.ts
|
|
19145
19145
|
import { createHash as createHash3 } from "node:crypto";
|
|
19146
19146
|
var OPENING_TYPES = new Set([
|
|
19147
19147
|
"task.opened",
|
|
@@ -19272,7 +19272,7 @@ function eventType(before, after) {
|
|
|
19272
19272
|
return "task.updated";
|
|
19273
19273
|
}
|
|
19274
19274
|
|
|
19275
|
-
// packages/workit-
|
|
19275
|
+
// packages/workit-core/src/store/notes.ts
|
|
19276
19276
|
var SLOT = Symbol.for("workit.migrationReporter");
|
|
19277
19277
|
var reportMigration = (report) => {
|
|
19278
19278
|
try {
|
|
@@ -19283,7 +19283,7 @@ var reportMigration = (report) => {
|
|
|
19283
19283
|
};
|
|
19284
19284
|
var migrationReporterInstalled = () => typeof globalThis[SLOT] === "function";
|
|
19285
19285
|
|
|
19286
|
-
// packages/workit-
|
|
19286
|
+
// packages/workit-core/src/core/task-store.ts
|
|
19287
19287
|
var MIGRATION_PENDING = "workit migration pending";
|
|
19288
19288
|
var STORE_FORMAT = 3;
|
|
19289
19289
|
var STORE_MIN_RUNTIME = "3.0.0";
|
|
@@ -20919,18 +20919,18 @@ class TaskStore {
|
|
|
20919
20919
|
return failure2(recovery ? "recovery_required" : "storage_error", `lock operation failed: ${String(error)}`, { path: lockPath });
|
|
20920
20920
|
}
|
|
20921
20921
|
}
|
|
20922
|
-
// packages/workit-
|
|
20922
|
+
// packages/workit-core/src/core/workers.ts
|
|
20923
20923
|
var UNCERTAIN_WORKER_STATES = ["dispatching", "running", "cancelling", "unknown"];
|
|
20924
20924
|
var isUncertainWorker = (state) => UNCERTAIN_WORKER_STATES.includes(state);
|
|
20925
20925
|
var workerBlocksTransition = (transition, state) => transition === "pause" ? false : isUncertainWorker(state);
|
|
20926
20926
|
|
|
20927
|
-
// packages/workit-
|
|
20927
|
+
// packages/workit-core/src/core/task-evaluation.ts
|
|
20928
20928
|
import { createHash as createHash7 } from "node:crypto";
|
|
20929
20929
|
import * as fs11 from "node:fs";
|
|
20930
20930
|
import { spawnSync as spawnSync6 } from "node:child_process";
|
|
20931
20931
|
import path11 from "node:path";
|
|
20932
20932
|
|
|
20933
|
-
// packages/workit-
|
|
20933
|
+
// packages/workit-core/src/check-config.ts
|
|
20934
20934
|
import { spawnSync as spawnSync3 } from "node:child_process";
|
|
20935
20935
|
import fs8 from "node:fs";
|
|
20936
20936
|
import path7 from "node:path";
|
|
@@ -21135,7 +21135,7 @@ function checkCommand(args, version, onPath = workitAvailable()) {
|
|
|
21135
21135
|
return onPath ? `workit check ${args}` : `npx -y @brainervirus/workit-cli@${version} check ${args}`;
|
|
21136
21136
|
}
|
|
21137
21137
|
|
|
21138
|
-
// packages/workit-
|
|
21138
|
+
// packages/workit-core/src/git/rev.ts
|
|
21139
21139
|
import { spawnSync as spawnSync4 } from "node:child_process";
|
|
21140
21140
|
import { createHash as createHash5 } from "node:crypto";
|
|
21141
21141
|
import fs9 from "node:fs";
|
|
@@ -21316,11 +21316,11 @@ function pushRemoteName(cwd, branch) {
|
|
|
21316
21316
|
return remotes.length === 1 ? remotes[0] : null;
|
|
21317
21317
|
}
|
|
21318
21318
|
|
|
21319
|
-
// packages/workit-
|
|
21319
|
+
// packages/workit-core/src/core/policy/derive.ts
|
|
21320
21320
|
import { existsSync as existsSync3 } from "node:fs";
|
|
21321
21321
|
import path10 from "node:path";
|
|
21322
21322
|
|
|
21323
|
-
// packages/workit-
|
|
21323
|
+
// packages/workit-core/src/ledger.ts
|
|
21324
21324
|
import { spawnSync as spawnSync5 } from "node:child_process";
|
|
21325
21325
|
import { createHash as createHash6, randomBytes as randomBytes2 } from "node:crypto";
|
|
21326
21326
|
import fs10 from "node:fs";
|
|
@@ -21562,7 +21562,7 @@ var independenceReasons = (row, authors) => {
|
|
|
21562
21562
|
reasons.push("self");
|
|
21563
21563
|
return reasons;
|
|
21564
21564
|
};
|
|
21565
|
-
function effectiveOf(rows, authors) {
|
|
21565
|
+
function effectiveOf(rows, authors, sameCode) {
|
|
21566
21566
|
let effective = null;
|
|
21567
21567
|
for (const row of rows) {
|
|
21568
21568
|
if (!effective) {
|
|
@@ -21573,7 +21573,7 @@ function effectiveOf(rows, authors) {
|
|
|
21573
21573
|
const effIndependent = independenceReasons(effective, authors).length === 0;
|
|
21574
21574
|
if (effIndependent && !rowIndependent)
|
|
21575
21575
|
continue;
|
|
21576
|
-
if (effIndependent && FAILING.has(String(effective.result)) && row.actor.session === effective.actor.session)
|
|
21576
|
+
if (effIndependent && FAILING.has(String(effective.result)) && row.actor.session === effective.actor.session && sameCode(effective, row))
|
|
21577
21577
|
continue;
|
|
21578
21578
|
effective = row;
|
|
21579
21579
|
}
|
|
@@ -21604,16 +21604,22 @@ function checkVerdicts(cwd, branch, rows) {
|
|
|
21604
21604
|
const head = branchHead(cwd, branch);
|
|
21605
21605
|
const fallbackBase = defaultBase(cwd);
|
|
21606
21606
|
const keyCache = new Map;
|
|
21607
|
-
const
|
|
21608
|
-
if (!base || !
|
|
21607
|
+
const keysAt = (base, at) => {
|
|
21608
|
+
if (!base || !at)
|
|
21609
21609
|
return { patchId: null, diffHash: null };
|
|
21610
|
-
|
|
21610
|
+
const cacheKey = `${base}\x00${at}`;
|
|
21611
|
+
let key = keyCache.get(cacheKey);
|
|
21611
21612
|
if (!key) {
|
|
21612
|
-
key = { patchId: patchId(cwd, base,
|
|
21613
|
-
keyCache.set(
|
|
21613
|
+
key = { patchId: patchId(cwd, base, at), diffHash: diffHash(cwd, base, at) };
|
|
21614
|
+
keyCache.set(cacheKey, key);
|
|
21614
21615
|
}
|
|
21615
21616
|
return key;
|
|
21616
21617
|
};
|
|
21618
|
+
const keyFor = (base) => keysAt(base, head);
|
|
21619
|
+
const sameCode = (failed, row) => verdictBasis(failed, {
|
|
21620
|
+
head: row.head,
|
|
21621
|
+
...keysAt(failed.base ?? fallbackBase, row.head)
|
|
21622
|
+
}) !== "stale" || restackCarries(rows, branch, failed.head, row.head);
|
|
21617
21623
|
const authors = authorSessions(cwd, rows, branch, { base: fallbackBase, head });
|
|
21618
21624
|
const byKind = new Map;
|
|
21619
21625
|
for (const row of rows)
|
|
@@ -21623,7 +21629,7 @@ function checkVerdicts(cwd, branch, rows) {
|
|
|
21623
21629
|
}
|
|
21624
21630
|
const verdicts = [];
|
|
21625
21631
|
for (const [kind, list] of byKind) {
|
|
21626
|
-
const row = effectiveOf(list, authors);
|
|
21632
|
+
const row = effectiveOf(list, authors, sameCode);
|
|
21627
21633
|
if (!row)
|
|
21628
21634
|
continue;
|
|
21629
21635
|
let basis = verdictBasis(row, { head, ...keyFor(row.base ?? fallbackBase) });
|
|
@@ -21649,11 +21655,11 @@ function checkVerdicts(cwd, branch, rows) {
|
|
|
21649
21655
|
verdicts.sort((a, b) => a.verdict.seq - b.verdict.seq);
|
|
21650
21656
|
const newestCurrent = verdicts.findLast((entry) => entry.current) ?? verdicts.at(-1) ?? null;
|
|
21651
21657
|
const failing = verdicts.find((entry) => entry.current && entry.independent && FAILING.has(String(entry.verdict.result)));
|
|
21652
|
-
const newestAccepted = verdicts.findLast((entry) => entry.accepted) ?? null;
|
|
21658
|
+
const newestAccepted = verdicts.findLast((entry) => entry.accepted && STRONG_RESULTS.has(String(entry.verdict.result))) ?? null;
|
|
21653
21659
|
const accepted = newestAccepted && !failing ? { accepted: true, verdict: newestAccepted.verdict, reasons: [] } : {
|
|
21654
21660
|
accepted: false,
|
|
21655
21661
|
verdict: failing?.verdict ?? null,
|
|
21656
|
-
reasons: failing ? ["failing_verdict"] : newestCurrent
|
|
21662
|
+
reasons: failing ? ["failing_verdict"] : !newestCurrent ? ["no_verdict"] : newestCurrent.reasons.length ? newestCurrent.reasons : ["type_check_only"]
|
|
21657
21663
|
};
|
|
21658
21664
|
const selfEntry = failing ? undefined : verdicts.findLast((entry) => entry.current && !entry.independent && STRONG_RESULTS.has(String(entry.verdict.result)));
|
|
21659
21665
|
return {
|
|
@@ -21669,9 +21675,9 @@ function checkVerdicts(cwd, branch, rows) {
|
|
|
21669
21675
|
authors: [...authors].toSorted()
|
|
21670
21676
|
};
|
|
21671
21677
|
}
|
|
21672
|
-
var OBSERVED_ONLY = new Set(["check", ...PR_ROW_TYPES]);
|
|
21678
|
+
var OBSERVED_ONLY = new Set(["check", "merge.unverified", ...PR_ROW_TYPES]);
|
|
21673
21679
|
|
|
21674
|
-
// packages/workit-
|
|
21680
|
+
// packages/workit-core/src/core/policy/derive.ts
|
|
21675
21681
|
var RULES = {
|
|
21676
21682
|
test: "check:test",
|
|
21677
21683
|
self: "verdict:self",
|
|
@@ -21859,7 +21865,7 @@ function derivedRuleStatus(task, requirement, root, ledger) {
|
|
|
21859
21865
|
}
|
|
21860
21866
|
}
|
|
21861
21867
|
|
|
21862
|
-
// packages/workit-
|
|
21868
|
+
// packages/workit-core/src/core/task-evaluation.ts
|
|
21863
21869
|
var digestBytes = (value) => createHash7("sha256").update(value).digest("hex");
|
|
21864
21870
|
var inside = (root, candidate) => candidate === root || candidate.startsWith(`${root}${path11.sep}`);
|
|
21865
21871
|
var relative = (root, candidate) => path11.relative(root, candidate).split(path11.sep).join("/") || ".";
|
|
@@ -22525,7 +22531,7 @@ function evaluateClosure(requestedOutcome, view) {
|
|
|
22525
22531
|
});
|
|
22526
22532
|
}
|
|
22527
22533
|
|
|
22528
|
-
// packages/workit-
|
|
22534
|
+
// packages/workit-core/src/core/methods.ts
|
|
22529
22535
|
var METHODS = {
|
|
22530
22536
|
"workit-shape": { dimensions: ["challenge", "decisions", "artifacts", "continuity"] },
|
|
22531
22537
|
"workit-bdd": { dimensions: ["testing"] },
|
|
@@ -22571,7 +22577,7 @@ function selectMethods(policy, capabilities) {
|
|
|
22571
22577
|
});
|
|
22572
22578
|
}
|
|
22573
22579
|
|
|
22574
|
-
// packages/workit-
|
|
22580
|
+
// packages/workit-core/src/core/task-context.ts
|
|
22575
22581
|
function reconcileResume(view, observations = []) {
|
|
22576
22582
|
if (observations.length > 0)
|
|
22577
22583
|
return failure2("permission_denied", "worker observations require native host verification");
|
|
@@ -22685,7 +22691,7 @@ var exportDigest = (bundle) => sha256({
|
|
|
22685
22691
|
sourceWorkspaceId: bundle.sourceWorkspaceId,
|
|
22686
22692
|
task: bundle.task
|
|
22687
22693
|
});
|
|
22688
|
-
// packages/workit-
|
|
22694
|
+
// packages/workit-core/src/core/git.ts
|
|
22689
22695
|
import { execFileSync } from "node:child_process";
|
|
22690
22696
|
var run = (cwd, args) => {
|
|
22691
22697
|
try {
|
|
@@ -22753,7 +22759,7 @@ var gitContext = (workspaceRoot, paths = []) => {
|
|
|
22753
22759
|
};
|
|
22754
22760
|
};
|
|
22755
22761
|
|
|
22756
|
-
// packages/workit-
|
|
22762
|
+
// packages/workit-core/src/core/config.ts
|
|
22757
22763
|
import {
|
|
22758
22764
|
copyFileSync as copyFileSync2,
|
|
22759
22765
|
cpSync as cpSync2,
|
|
@@ -22766,7 +22772,7 @@ import {
|
|
|
22766
22772
|
import os2 from "node:os";
|
|
22767
22773
|
import path12 from "node:path";
|
|
22768
22774
|
|
|
22769
|
-
// packages/workit-
|
|
22775
|
+
// packages/workit-core/src/core/boundary.ts
|
|
22770
22776
|
import { statSync as statSync2 } from "node:fs";
|
|
22771
22777
|
var EVENT = {
|
|
22772
22778
|
initialization: "initialization",
|
|
@@ -22802,7 +22808,7 @@ var changedSourcesSinceLoad = (marker) => {
|
|
|
22802
22808
|
return changed;
|
|
22803
22809
|
};
|
|
22804
22810
|
|
|
22805
|
-
// packages/workit-
|
|
22811
|
+
// packages/workit-core/src/core/config.ts
|
|
22806
22812
|
var diagnosticLogger;
|
|
22807
22813
|
var PRESETS = {
|
|
22808
22814
|
gitflow: {
|
|
@@ -22955,7 +22961,7 @@ var COMMIT_PRESETS = [
|
|
|
22955
22961
|
"auto"
|
|
22956
22962
|
];
|
|
22957
22963
|
|
|
22958
|
-
// packages/workit-
|
|
22964
|
+
// packages/workit-core/src/core/workspaces.ts
|
|
22959
22965
|
import { createHash as createHash8 } from "node:crypto";
|
|
22960
22966
|
import { readFileSync as readFileSync4, realpathSync as realpathSync3 } from "node:fs";
|
|
22961
22967
|
import path13 from "node:path";
|
|
@@ -23364,12 +23370,12 @@ function workspaceDefaultTarget(cwd, globalDefault) {
|
|
|
23364
23370
|
return String(ws?.vcs?.defaultTargetBranch ?? (hasWorkspacePolicy ? policyDefault : globalDefault ?? policyDefault) ?? "develop");
|
|
23365
23371
|
}
|
|
23366
23372
|
|
|
23367
|
-
// packages/workit-
|
|
23373
|
+
// packages/workit-core/src/core/vcs-config.ts
|
|
23368
23374
|
import fs12 from "node:fs";
|
|
23369
23375
|
import path14 from "node:path";
|
|
23370
23376
|
import { spawnSync as spawnSync8 } from "node:child_process";
|
|
23371
23377
|
|
|
23372
|
-
// packages/workit-
|
|
23378
|
+
// packages/workit-core/src/core/release-tracks.ts
|
|
23373
23379
|
import { createHash as createHash9 } from "node:crypto";
|
|
23374
23380
|
import { spawnSync as spawnSync7 } from "node:child_process";
|
|
23375
23381
|
var KNOWN_FIELDS = new Set([
|
|
@@ -23754,7 +23760,7 @@ function resolveTrackFor(cwd, options) {
|
|
|
23754
23760
|
return resolution;
|
|
23755
23761
|
}
|
|
23756
23762
|
|
|
23757
|
-
// packages/workit-
|
|
23763
|
+
// packages/workit-core/src/core/vcs-config.ts
|
|
23758
23764
|
var workspacesPath = () => path14.join(configDir(), "workspaces.json");
|
|
23759
23765
|
var vcsCwd = (cwd) => cwd ?? process.env.WORKFLOW_WORKSPACE_ROOT ?? process.cwd();
|
|
23760
23766
|
var remoteProvider = (cwd) => {
|
|
@@ -24035,10 +24041,10 @@ function mergedPrStyle(limit = 6, cwd) {
|
|
|
24035
24041
|
examples
|
|
24036
24042
|
};
|
|
24037
24043
|
}
|
|
24038
|
-
// packages/workit-
|
|
24044
|
+
// packages/workit-core/src/core/task-engine.ts
|
|
24039
24045
|
import { realpathSync as realpathSync4 } from "node:fs";
|
|
24040
24046
|
|
|
24041
|
-
// packages/workit-
|
|
24047
|
+
// packages/workit-core/src/core/policy-resolver.ts
|
|
24042
24048
|
function resolvePolicy(input) {
|
|
24043
24049
|
const ids = input.constraints.map((constraint) => constraint.id);
|
|
24044
24050
|
if (new Set(ids).size !== ids.length)
|
|
@@ -24094,7 +24100,7 @@ function diffPolicy(previous, next, reason, now) {
|
|
|
24094
24100
|
return parsed.data;
|
|
24095
24101
|
}
|
|
24096
24102
|
|
|
24097
|
-
// packages/workit-
|
|
24103
|
+
// packages/workit-core/src/core/policy/judgment.ts
|
|
24098
24104
|
var isObject6 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
24099
24105
|
var squash = (key) => key.toLowerCase().replace(/[_-]/g, "");
|
|
24100
24106
|
var ALIASES = {
|
|
@@ -24218,7 +24224,7 @@ function normalizeJudgment(raw, previous) {
|
|
|
24218
24224
|
return success(null, null, { judgment: parsed.data, ignored, legacy });
|
|
24219
24225
|
}
|
|
24220
24226
|
|
|
24221
|
-
// packages/workit-
|
|
24227
|
+
// packages/workit-core/src/autonomy.ts
|
|
24222
24228
|
import os3 from "node:os";
|
|
24223
24229
|
import path15 from "node:path";
|
|
24224
24230
|
var accountHome = () => {
|
|
@@ -24355,7 +24361,7 @@ function resolveAutonomy(cwd) {
|
|
|
24355
24361
|
var suggested = (kind) => kind === "merge" ? "verified" : "true";
|
|
24356
24362
|
var grantHint = (workspace, kind) => `ask the user to run, in their own terminal: workit grant set ${workspace ?? "<workspace>"} ${kind}=${suggested(kind)}`;
|
|
24357
24363
|
|
|
24358
|
-
// packages/workit-
|
|
24364
|
+
// packages/workit-core/src/core/task-engine.ts
|
|
24359
24365
|
var workspaceVerification = (root) => {
|
|
24360
24366
|
try {
|
|
24361
24367
|
return resolveAutonomy(root).verification;
|
|
@@ -25940,7 +25946,7 @@ class WorkitCore {
|
|
|
25940
25946
|
return this.summary(changed.data.task);
|
|
25941
25947
|
}
|
|
25942
25948
|
}
|
|
25943
|
-
// packages/workit-
|
|
25949
|
+
// packages/workit-core/src/core/repo-context.ts
|
|
25944
25950
|
import { spawnSync as spawnSync9 } from "node:child_process";
|
|
25945
25951
|
import { existsSync as existsSync6, readFileSync as readFileSync5, readdirSync as readdirSync4 } from "node:fs";
|
|
25946
25952
|
import path16 from "node:path";
|
|
@@ -26410,20 +26416,20 @@ function releaseNotesContext(root, rangeOrTag) {
|
|
|
26410
26416
|
return { stdout, stderr: "", exitCode: 0, cwd };
|
|
26411
26417
|
}
|
|
26412
26418
|
|
|
26413
|
-
// packages/workit-
|
|
26419
|
+
// packages/workit-core/src/core/tracker-issues.ts
|
|
26414
26420
|
import { spawnSync as spawnSync11 } from "node:child_process";
|
|
26415
26421
|
|
|
26416
|
-
// packages/workit-
|
|
26422
|
+
// packages/workit-core/src/core/pr-create.ts
|
|
26417
26423
|
import fs13 from "node:fs";
|
|
26418
26424
|
import path17 from "node:path";
|
|
26419
26425
|
import { spawnSync as spawnSync10 } from "node:child_process";
|
|
26420
|
-
// packages/workit-
|
|
26426
|
+
// packages/workit-core/src/forge/pr-body.ts
|
|
26421
26427
|
function parseGhIssue(value) {
|
|
26422
26428
|
const m = /issues\/(\d+)/.exec(value);
|
|
26423
26429
|
return m ? m[1] : String(value).trim().replace(/^#/, "");
|
|
26424
26430
|
}
|
|
26425
26431
|
|
|
26426
|
-
// packages/workit-
|
|
26432
|
+
// packages/workit-core/src/core/pr-create.ts
|
|
26427
26433
|
function whichOnPath(tool) {
|
|
26428
26434
|
const names = process.platform === "win32" ? [tool, `${tool}.exe`, `${tool}.cmd`] : [tool];
|
|
26429
26435
|
for (const dir of (process.env.PATH ?? "").split(path17.delimiter)) {
|
|
@@ -26451,7 +26457,7 @@ var pushRemote = (cwd) => {
|
|
|
26451
26457
|
return urls.length === 1 ? urls[0] : null;
|
|
26452
26458
|
};
|
|
26453
26459
|
|
|
26454
|
-
// packages/workit-
|
|
26460
|
+
// packages/workit-core/src/core/tracker-issues.ts
|
|
26455
26461
|
var repoPathFromRemote = (remote) => {
|
|
26456
26462
|
let rest = (remote || "").trim().replace(/\/+$/, "");
|
|
26457
26463
|
if (!rest)
|
|
@@ -26549,19 +26555,19 @@ var fetchGitLabIssueBody = async (ref, root, deps = {}) => {
|
|
|
26549
26555
|
return tryCliTriple(deps.cli ?? defaultCli("glab", hostingCliAvailable("gitlab")), "glab", ["issue", "view", id, "-R", repoArg, "-F", "json"], root, id, ["iid"], ["description"]);
|
|
26550
26556
|
};
|
|
26551
26557
|
|
|
26552
|
-
// packages/workit-
|
|
26558
|
+
// packages/workit-core/src/core/youtrack.ts
|
|
26553
26559
|
import fs14 from "node:fs";
|
|
26554
26560
|
import path18 from "node:path";
|
|
26555
26561
|
|
|
26556
|
-
// packages/workit-
|
|
26562
|
+
// packages/workit-core/src/core/templates.ts
|
|
26557
26563
|
var repoRoot2 = assetRoot();
|
|
26558
26564
|
|
|
26559
|
-
// packages/workit-
|
|
26565
|
+
// packages/workit-core/src/core/scripts.ts
|
|
26560
26566
|
var PLUGIN_ROOT = packageRoot();
|
|
26561
26567
|
var ASSET_ROOT = assetRoot();
|
|
26562
26568
|
var resolveWorkspaceRoot = (explicit) => explicit || process.cwd();
|
|
26563
26569
|
|
|
26564
|
-
// packages/workit-
|
|
26570
|
+
// packages/workit-core/src/core/youtrack.ts
|
|
26565
26571
|
var ISSUE_RE = /^[A-Z]+-\d+$/;
|
|
26566
26572
|
var TOKEN_PLACEHOLDER = "YOUR_TOKEN_HERE";
|
|
26567
26573
|
var youTrackConfigPath = () => process.env.WORKFLOW_YOUTRACK_CONFIG ?? path18.join(configDir(), "youtrack.json");
|
|
@@ -26852,7 +26858,7 @@ var fetchYouTrackIssueBody = async (issue, creds = youTrackToken, request = youT
|
|
|
26852
26858
|
}
|
|
26853
26859
|
};
|
|
26854
26860
|
|
|
26855
|
-
// packages/workit-
|
|
26861
|
+
// packages/workit-core/src/core/context-read.ts
|
|
26856
26862
|
var contextReadSchema = object2({
|
|
26857
26863
|
kind: _enum([
|
|
26858
26864
|
"git",
|
|
@@ -26947,7 +26953,7 @@ var readExternalContext = async (root, payload) => {
|
|
|
26947
26953
|
}
|
|
26948
26954
|
}
|
|
26949
26955
|
};
|
|
26950
|
-
// packages/workit-
|
|
26956
|
+
// packages/workit-core/src/core.ts
|
|
26951
26957
|
var revision2 = /^[A-Za-z0-9@][A-Za-z0-9@._/~^{}-]*$/;
|
|
26952
26958
|
function gitRevisionParts(value) {
|
|
26953
26959
|
if (!value || value.startsWith("-") || /[\s\\'"`$;|&<>]/.test(value)) {
|
|
@@ -27003,7 +27009,7 @@ function run2(root, executable, args, env = {}) {
|
|
|
27003
27009
|
};
|
|
27004
27010
|
}
|
|
27005
27011
|
|
|
27006
|
-
// packages/workit-
|
|
27012
|
+
// packages/workit-core/src/core/logger.ts
|
|
27007
27013
|
import os4 from "node:os";
|
|
27008
27014
|
var REDACTED = "[REDACTED]";
|
|
27009
27015
|
var SECRET_VALUE = /\b(?:Bearer|Basic|Digest|Token)\s+\S+/gi;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brainervirus/workit-mcp",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Workit shared MCP transport for the eight task and policy operation families",
|
|
6
6
|
"keywords": [
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"build": "bun scripts/build.ts"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@brainervirus/workit-core": "^8.0.
|
|
45
|
+
"@brainervirus/workit-core": "^8.0.1",
|
|
46
46
|
"@modelcontextprotocol/sdk": "1.32.0",
|
|
47
47
|
"zod": "4.6.5"
|
|
48
48
|
},
|