@brainervirus/workit-cursor 7.7.0 → 8.0.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/.cursor-plugin/plugin.json +1 -1
- package/dist/cursor-session-start.js +46 -46
- package/dist/mcp-server.js +63 -63
- package/dist/workit-hook.js +47 -47
- package/package.json +3 -3
- package/skills/workit-ship/SKILL.md +2 -2
|
@@ -7622,7 +7622,7 @@ var init_zod = __esm(() => {
|
|
|
7622
7622
|
init_external();
|
|
7623
7623
|
});
|
|
7624
7624
|
|
|
7625
|
-
// packages/workit-core/src/core/task-contract.ts
|
|
7625
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-contract.ts
|
|
7626
7626
|
import { createHash, randomUUID } from "node:crypto";
|
|
7627
7627
|
function parseOperation(family, input) {
|
|
7628
7628
|
if (typeof input === "object" && input !== null && "schemaVersion" in input && input.schemaVersion !== SCHEMA_VERSION)
|
|
@@ -8460,7 +8460,7 @@ var init_task_contract = __esm(() => {
|
|
|
8460
8460
|
compiledOperationSchemas = Object.fromEntries(OPERATION_FAMILIES.map((family) => [family, compile(operationSchemas[family])]));
|
|
8461
8461
|
});
|
|
8462
8462
|
|
|
8463
|
-
// packages/workit-core/src/git/rev.ts
|
|
8463
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/git/rev.ts
|
|
8464
8464
|
import { spawnSync } from "node:child_process";
|
|
8465
8465
|
import { createHash as createHash2 } from "node:crypto";
|
|
8466
8466
|
import fs from "node:fs";
|
|
@@ -8610,7 +8610,7 @@ var init_rev = __esm(() => {
|
|
|
8610
8610
|
MAX_UNTRACKED_BYTES = 5 * 1024 * 1024;
|
|
8611
8611
|
});
|
|
8612
8612
|
|
|
8613
|
-
// packages/workit-core/src/store/paths.ts
|
|
8613
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/paths.ts
|
|
8614
8614
|
import { spawnSync as spawnSync2 } from "node:child_process";
|
|
8615
8615
|
import { createHash as createHash3 } from "node:crypto";
|
|
8616
8616
|
import fs2 from "node:fs";
|
|
@@ -8886,7 +8886,7 @@ var init_paths = __esm(() => {
|
|
|
8886
8886
|
];
|
|
8887
8887
|
});
|
|
8888
8888
|
|
|
8889
|
-
// packages/workit-core/src/ledger.ts
|
|
8889
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/ledger.ts
|
|
8890
8890
|
import { spawnSync as spawnSync3 } from "node:child_process";
|
|
8891
8891
|
import { createHash as createHash4, randomBytes } from "node:crypto";
|
|
8892
8892
|
import fs3 from "node:fs";
|
|
@@ -9232,7 +9232,7 @@ var init_ledger = __esm(() => {
|
|
|
9232
9232
|
OBSERVED_ONLY = new Set(["check", ...PR_ROW_TYPES]);
|
|
9233
9233
|
});
|
|
9234
9234
|
|
|
9235
|
-
// packages/workit-core/src/core/policy/derive.ts
|
|
9235
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/policy/derive.ts
|
|
9236
9236
|
import { existsSync } from "node:fs";
|
|
9237
9237
|
import path4 from "node:path";
|
|
9238
9238
|
function deriveRequirements(judgment, scope, constraints, verification = "self") {
|
|
@@ -9431,7 +9431,7 @@ var init_derive = __esm(() => {
|
|
|
9431
9431
|
};
|
|
9432
9432
|
});
|
|
9433
9433
|
|
|
9434
|
-
// packages/workit-core/src/core/policy-resolver.ts
|
|
9434
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/policy-resolver.ts
|
|
9435
9435
|
function resolvePolicy(input) {
|
|
9436
9436
|
const ids = input.constraints.map((constraint) => constraint.id);
|
|
9437
9437
|
if (new Set(ids).size !== ids.length)
|
|
@@ -9491,7 +9491,7 @@ var init_policy_resolver = __esm(() => {
|
|
|
9491
9491
|
init_derive();
|
|
9492
9492
|
});
|
|
9493
9493
|
|
|
9494
|
-
// packages/workit-core/src/core/operation-input.ts
|
|
9494
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/operation-input.ts
|
|
9495
9495
|
function normalizeOperationInput(family, input, host) {
|
|
9496
9496
|
if (!isObject2(input))
|
|
9497
9497
|
return input;
|
|
@@ -9828,7 +9828,7 @@ var init_operation_input = __esm(() => {
|
|
|
9828
9828
|
]);
|
|
9829
9829
|
});
|
|
9830
9830
|
|
|
9831
|
-
// packages/workit-core/src/core/policy/judgment.ts
|
|
9831
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/policy/judgment.ts
|
|
9832
9832
|
function normalizeJudgment(raw, previous) {
|
|
9833
9833
|
const input = isObject3(raw) ? raw : {};
|
|
9834
9834
|
const legacy = Object.keys(input).some((key) => LEGACY_KEYS.has(key));
|
|
@@ -9953,7 +9953,7 @@ var init_judgment = __esm(() => {
|
|
|
9953
9953
|
};
|
|
9954
9954
|
});
|
|
9955
9955
|
|
|
9956
|
-
// packages/workit-core/src/core/boundary.ts
|
|
9956
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/boundary.ts
|
|
9957
9957
|
var EVENT, errorDetail = (err) => {
|
|
9958
9958
|
if (err instanceof Error) {
|
|
9959
9959
|
return { error_name: err.name, error: err.message };
|
|
@@ -9976,7 +9976,7 @@ var init_boundary = __esm(() => {
|
|
|
9976
9976
|
};
|
|
9977
9977
|
});
|
|
9978
9978
|
|
|
9979
|
-
// packages/workit-core/src/core/config.ts
|
|
9979
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/config.ts
|
|
9980
9980
|
import {
|
|
9981
9981
|
copyFileSync,
|
|
9982
9982
|
cpSync,
|
|
@@ -10138,10 +10138,10 @@ var init_config = __esm(() => {
|
|
|
10138
10138
|
];
|
|
10139
10139
|
});
|
|
10140
10140
|
|
|
10141
|
-
// packages/workit-core/src/core/safe-write.ts
|
|
10141
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/safe-write.ts
|
|
10142
10142
|
var init_safe_write = () => {};
|
|
10143
10143
|
|
|
10144
|
-
// packages/workit-core/src/core/workspaces.ts
|
|
10144
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/workspaces.ts
|
|
10145
10145
|
import { createHash as createHash5 } from "node:crypto";
|
|
10146
10146
|
import { readFileSync as readFileSync2, realpathSync } from "node:fs";
|
|
10147
10147
|
import path6 from "node:path";
|
|
@@ -10529,7 +10529,7 @@ var init_workspaces = __esm(() => {
|
|
|
10529
10529
|
}).passthrough();
|
|
10530
10530
|
});
|
|
10531
10531
|
|
|
10532
|
-
// packages/workit-core/src/autonomy.ts
|
|
10532
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/autonomy.ts
|
|
10533
10533
|
import os3 from "node:os";
|
|
10534
10534
|
import path7 from "node:path";
|
|
10535
10535
|
function endpointOf(entry) {
|
|
@@ -11286,7 +11286,7 @@ var init_file_lock = __esm(() => {
|
|
|
11286
11286
|
init_file_lock_sync();
|
|
11287
11287
|
});
|
|
11288
11288
|
|
|
11289
|
-
// packages/workit-core/src/core/package-root.ts
|
|
11289
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/package-root.ts
|
|
11290
11290
|
import { existsSync as existsSync3 } from "node:fs";
|
|
11291
11291
|
import path10 from "node:path";
|
|
11292
11292
|
import { fileURLToPath } from "node:url";
|
|
@@ -11301,7 +11301,7 @@ var packageRoot = () => {
|
|
|
11301
11301
|
};
|
|
11302
11302
|
var init_package_root = () => {};
|
|
11303
11303
|
|
|
11304
|
-
// packages/workit-core/src/core/store-lock.ts
|
|
11304
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/store-lock.ts
|
|
11305
11305
|
import { spawnSync as spawnSync4 } from "node:child_process";
|
|
11306
11306
|
import fs7 from "node:fs";
|
|
11307
11307
|
import { hostname } from "node:os";
|
|
@@ -11426,7 +11426,7 @@ var init_store_lock = __esm(() => {
|
|
|
11426
11426
|
FOREIGN_LOCK_TTL_MS = 10 * 60000;
|
|
11427
11427
|
});
|
|
11428
11428
|
|
|
11429
|
-
// packages/workit-core/src/store/event-log.ts
|
|
11429
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/event-log.ts
|
|
11430
11430
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
11431
11431
|
import fs8 from "node:fs";
|
|
11432
11432
|
import path11 from "node:path";
|
|
@@ -11581,7 +11581,7 @@ var init_event_log = __esm(() => {
|
|
|
11581
11581
|
TRANSIENT_WINDOWS_CODES = new Set(["EPERM", "EACCES", "EBUSY"]);
|
|
11582
11582
|
});
|
|
11583
11583
|
|
|
11584
|
-
// packages/workit-core/src/store/patch.ts
|
|
11584
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/patch.ts
|
|
11585
11585
|
function diff(before, after, path = []) {
|
|
11586
11586
|
if (equal(before, after))
|
|
11587
11587
|
return [];
|
|
@@ -11687,7 +11687,7 @@ var isPlainObject2 = (value) => typeof value === "object" && value !== null && !
|
|
|
11687
11687
|
return false;
|
|
11688
11688
|
});
|
|
11689
11689
|
|
|
11690
|
-
// packages/workit-core/src/store/reduce.ts
|
|
11690
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/reduce.ts
|
|
11691
11691
|
import { createHash as createHash6 } from "node:crypto";
|
|
11692
11692
|
function reduce(state, event, blobs) {
|
|
11693
11693
|
const data = event.data;
|
|
@@ -11813,7 +11813,7 @@ var init_reduce = __esm(() => {
|
|
|
11813
11813
|
]);
|
|
11814
11814
|
});
|
|
11815
11815
|
|
|
11816
|
-
// packages/workit-core/src/store/notes.ts
|
|
11816
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/notes.ts
|
|
11817
11817
|
var SLOT, reportMigration = (report) => {
|
|
11818
11818
|
try {
|
|
11819
11819
|
const reporter = globalThis[SLOT];
|
|
@@ -11825,7 +11825,7 @@ var init_notes = __esm(() => {
|
|
|
11825
11825
|
SLOT = Symbol.for("workit.migrationReporter");
|
|
11826
11826
|
});
|
|
11827
11827
|
|
|
11828
|
-
// packages/workit-core/src/core/task-store.ts
|
|
11828
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-store.ts
|
|
11829
11829
|
import { createHash as createHash7, randomUUID as randomUUID3 } from "node:crypto";
|
|
11830
11830
|
import * as fs9 from "node:fs";
|
|
11831
11831
|
import path12 from "node:path";
|
|
@@ -13452,13 +13452,13 @@ var init_task_store = __esm(() => {
|
|
|
13452
13452
|
heldInProcess = new Map;
|
|
13453
13453
|
});
|
|
13454
13454
|
|
|
13455
|
-
// packages/workit-core/src/core/workers.ts
|
|
13455
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/workers.ts
|
|
13456
13456
|
var UNCERTAIN_WORKER_STATES, isUncertainWorker = (state) => UNCERTAIN_WORKER_STATES.includes(state), workerBlocksTransition = (transition, state) => transition === "pause" ? false : isUncertainWorker(state);
|
|
13457
13457
|
var init_workers = __esm(() => {
|
|
13458
13458
|
UNCERTAIN_WORKER_STATES = ["dispatching", "running", "cancelling", "unknown"];
|
|
13459
13459
|
});
|
|
13460
13460
|
|
|
13461
|
-
// packages/workit-core/src/check-config.ts
|
|
13461
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/check-config.ts
|
|
13462
13462
|
import { spawnSync as spawnSync5 } from "node:child_process";
|
|
13463
13463
|
import fs10 from "node:fs";
|
|
13464
13464
|
import path13 from "node:path";
|
|
@@ -13659,7 +13659,7 @@ var init_check_config = __esm(() => {
|
|
|
13659
13659
|
GATES = ["testing", "verification"];
|
|
13660
13660
|
});
|
|
13661
13661
|
|
|
13662
|
-
// packages/workit-core/src/core/task-evaluation.ts
|
|
13662
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-evaluation.ts
|
|
13663
13663
|
import { createHash as createHash8 } from "node:crypto";
|
|
13664
13664
|
import * as fs11 from "node:fs";
|
|
13665
13665
|
import { spawnSync as spawnSync6 } from "node:child_process";
|
|
@@ -14307,7 +14307,7 @@ var init_task_evaluation = __esm(() => {
|
|
|
14307
14307
|
scopeCovers2 = scopeCovers;
|
|
14308
14308
|
});
|
|
14309
14309
|
|
|
14310
|
-
// packages/workit-core/src/core/methods.ts
|
|
14310
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/methods.ts
|
|
14311
14311
|
function selectMethods(policy, capabilities) {
|
|
14312
14312
|
return Object.entries(METHODS).flatMap(([id, definition]) => {
|
|
14313
14313
|
const requirements = policy.requirements.filter((requirement) => methodMatches(definition, requirement));
|
|
@@ -14415,7 +14415,7 @@ var init_methods = __esm(() => {
|
|
|
14415
14415
|
};
|
|
14416
14416
|
});
|
|
14417
14417
|
|
|
14418
|
-
// packages/workit-core/src/core/task-context.ts
|
|
14418
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-context.ts
|
|
14419
14419
|
function reconcileResume(view, observations = []) {
|
|
14420
14420
|
if (observations.length > 0)
|
|
14421
14421
|
return failure2("permission_denied", "worker observations require native host verification");
|
|
@@ -14528,7 +14528,7 @@ var init_task_context = __esm(() => {
|
|
|
14528
14528
|
privateKey = /-----BEGIN [^-]*PRIVATE KEY-----[\s\S]*?-----END [^-]*PRIVATE KEY-----/gi;
|
|
14529
14529
|
});
|
|
14530
14530
|
|
|
14531
|
-
// packages/workit-core/src/core/task-engine.ts
|
|
14531
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-engine.ts
|
|
14532
14532
|
import { realpathSync as realpathSync4 } from "node:fs";
|
|
14533
14533
|
|
|
14534
14534
|
class WorkitCore {
|
|
@@ -16110,10 +16110,10 @@ var init_task_engine = __esm(() => {
|
|
|
16110
16110
|
retryPause = new Int32Array(new SharedArrayBuffer(4));
|
|
16111
16111
|
});
|
|
16112
16112
|
|
|
16113
|
-
// packages/workit-core/src/hooks/protocol.ts
|
|
16113
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/protocol.ts
|
|
16114
16114
|
var init_protocol = () => {};
|
|
16115
16115
|
|
|
16116
|
-
// packages/workit-core/src/hooks/descriptor.ts
|
|
16116
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/descriptor.ts
|
|
16117
16117
|
var support = (descriptor, axis) => {
|
|
16118
16118
|
if (axis.startsWith("event:"))
|
|
16119
16119
|
return descriptor.events[axis.slice("event:".length)].support;
|
|
@@ -16136,7 +16136,7 @@ var support = (descriptor, axis) => {
|
|
|
16136
16136
|
};
|
|
16137
16137
|
});
|
|
16138
16138
|
|
|
16139
|
-
// packages/workit-core/src/hooks/context.ts
|
|
16139
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/context.ts
|
|
16140
16140
|
import path15 from "node:path";
|
|
16141
16141
|
function sessionCompactContext(store, session, context, selection = "session-bound") {
|
|
16142
16142
|
const listed = store.listTaskIndex();
|
|
@@ -16277,13 +16277,13 @@ var init_context = __esm(() => {
|
|
|
16277
16277
|
cache = new Map;
|
|
16278
16278
|
});
|
|
16279
16279
|
|
|
16280
|
-
// packages/workit-core/src/core/commit-flavors.ts
|
|
16280
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/commit-flavors.ts
|
|
16281
16281
|
var init_commit_flavors = () => {};
|
|
16282
16282
|
|
|
16283
|
-
// packages/workit-core/src/core/git.ts
|
|
16283
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/git.ts
|
|
16284
16284
|
var init_git = () => {};
|
|
16285
16285
|
|
|
16286
|
-
// packages/workit-core/src/core/release-tracks.ts
|
|
16286
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/release-tracks.ts
|
|
16287
16287
|
function readReleaseTracks(raw) {
|
|
16288
16288
|
const out = { tracks: [], issues: [], error: null, protectedBranches: [] };
|
|
16289
16289
|
if (raw === undefined || raw === null)
|
|
@@ -16422,14 +16422,14 @@ var init_release_tracks = __esm(() => {
|
|
|
16422
16422
|
memo3 = new Map;
|
|
16423
16423
|
});
|
|
16424
16424
|
|
|
16425
|
-
// packages/workit-core/src/core/vcs-config.ts
|
|
16425
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/vcs-config.ts
|
|
16426
16426
|
var init_vcs_config = __esm(() => {
|
|
16427
16427
|
init_config();
|
|
16428
16428
|
init_workspaces();
|
|
16429
16429
|
init_release_tracks();
|
|
16430
16430
|
});
|
|
16431
16431
|
|
|
16432
|
-
// packages/workit-core/src/core/branch.ts
|
|
16432
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/branch.ts
|
|
16433
16433
|
import { createHash as createHash9 } from "node:crypto";
|
|
16434
16434
|
function effectiveWorkspacePolicy(workspaceRoot, kind, profileName) {
|
|
16435
16435
|
const selected = resolveRuntimeWorkspacePolicy(workspaceRoot, kind, profileName?.trim() || process.env.WORKFLOW_PROFILE?.trim() || undefined);
|
|
@@ -16528,7 +16528,7 @@ var init_branch = __esm(() => {
|
|
|
16528
16528
|
init_release_tracks();
|
|
16529
16529
|
});
|
|
16530
16530
|
|
|
16531
|
-
// packages/workit-core/src/core/route-intent.ts
|
|
16531
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/route-intent.ts
|
|
16532
16532
|
var shellBranchTarget = (command) => {
|
|
16533
16533
|
if (!command.trim() || /[\r\n;&|<>`'"$()\\*?{}~!#]/u.test(command) || command.includes("[") || command.includes("]"))
|
|
16534
16534
|
return null;
|
|
@@ -16546,7 +16546,7 @@ var init_route_intent = __esm(() => {
|
|
|
16546
16546
|
init_branch();
|
|
16547
16547
|
});
|
|
16548
16548
|
|
|
16549
|
-
// packages/workit-core/src/hooks/policy.ts
|
|
16549
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/policy.ts
|
|
16550
16550
|
var shellPolicy = (cwd, command) => {
|
|
16551
16551
|
const policy = shellBranchPolicyViolation(cwd, command);
|
|
16552
16552
|
return policy && !policy.ok ? { kind: "deny", reason: `branch_policy_denied: ${policy.error}`, unblock: null } : { kind: "none" };
|
|
@@ -16555,7 +16555,7 @@ var init_policy = __esm(() => {
|
|
|
16555
16555
|
init_route_intent();
|
|
16556
16556
|
});
|
|
16557
16557
|
|
|
16558
|
-
// packages/workit-core/src/hooks/write-gate.ts
|
|
16558
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/write-gate.ts
|
|
16559
16559
|
import { realpathSync as realpathSync5 } from "node:fs";
|
|
16560
16560
|
import path16 from "node:path";
|
|
16561
16561
|
function writeGate(cwd, paths) {
|
|
@@ -16816,7 +16816,7 @@ var init_write_gate = __esm(() => {
|
|
|
16816
16816
|
cache2 = new Map;
|
|
16817
16817
|
});
|
|
16818
16818
|
|
|
16819
|
-
// packages/workit-core/src/hooks/hosts/fields.ts
|
|
16819
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/fields.ts
|
|
16820
16820
|
import { existsSync as existsSync6, realpathSync as realpathSync6, statSync as statSync2 } from "node:fs";
|
|
16821
16821
|
import path17 from "node:path";
|
|
16822
16822
|
var isRecord4 = (value) => value !== null && typeof value === "object" && !Array.isArray(value), nonEmpty2 = (value) => typeof value === "string" && value.trim() !== "", optionalText = (value) => typeof value === "string" ? value : null, existingDirectory = (value) => {
|
|
@@ -16880,7 +16880,7 @@ var init_fields = __esm(() => {
|
|
|
16880
16880
|
PATH_KEYS = ["file_path", "filePath", "notebook_path", "path", "target_file", "file"];
|
|
16881
16881
|
});
|
|
16882
16882
|
|
|
16883
|
-
// packages/workit-core/src/hooks/handle.ts
|
|
16883
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/handle.ts
|
|
16884
16884
|
function handleHook(input, deps) {
|
|
16885
16885
|
const { descriptor } = deps;
|
|
16886
16886
|
const event = input.event;
|
|
@@ -16977,7 +16977,7 @@ var init_handle = __esm(() => {
|
|
|
16977
16977
|
CLAUDE_JUDGES = new Set(["workit:verifier", "workit:reviewer"]);
|
|
16978
16978
|
});
|
|
16979
16979
|
|
|
16980
|
-
// packages/workit-core/src/hooks/hosts/claude-code.ts
|
|
16980
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/claude-code.ts
|
|
16981
16981
|
var CLAUDE_CODE_DESCRIPTOR, EVENTS, SOURCES, SHELL_TOOLS, toolCommand = (value) => isRecord4(value.tool_input) ? commandText(value.tool_input.command) : null, eventOf = (name, value) => {
|
|
16982
16982
|
const toolUseId = optionalText(value.tool_use_id);
|
|
16983
16983
|
switch (name) {
|
|
@@ -17221,7 +17221,7 @@ var init_claude_code = __esm(() => {
|
|
|
17221
17221
|
};
|
|
17222
17222
|
});
|
|
17223
17223
|
|
|
17224
|
-
// packages/workit-core/src/hooks/hosts/codex.ts
|
|
17224
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/codex.ts
|
|
17225
17225
|
function detectCodexSurface(env) {
|
|
17226
17226
|
return env.CODEX_INTERNAL_ORIGINATOR_OVERRIDE === "Codex Desktop" || Boolean(env.CODEX_ELECTRON_RESOURCES_PATH) ? "codex_desktop" : "codex_cli";
|
|
17227
17227
|
}
|
|
@@ -17448,7 +17448,7 @@ var init_codex = __esm(() => {
|
|
|
17448
17448
|
};
|
|
17449
17449
|
});
|
|
17450
17450
|
|
|
17451
|
-
// packages/workit-core/src/hooks/hosts/cursor.ts
|
|
17451
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/cursor.ts
|
|
17452
17452
|
import path18 from "node:path";
|
|
17453
17453
|
var undocumented2, none, CURSOR_DESCRIPTOR, EVENTS3, parseCursorHookInput = (value) => {
|
|
17454
17454
|
if (!isRecord4(value) || !Object.hasOwn(EVENTS3, String(value.hook_event_name)))
|
|
@@ -17689,7 +17689,7 @@ var init_cursor = __esm(() => {
|
|
|
17689
17689
|
};
|
|
17690
17690
|
});
|
|
17691
17691
|
|
|
17692
|
-
// packages/workit-core/src/hooks/run.ts
|
|
17692
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/run.ts
|
|
17693
17693
|
async function runHookProcess(host, stdin, stdout, stderr = process.stderr, env = process.env) {
|
|
17694
17694
|
const adapter = typeof host === "string" ? HOOK_ADAPTERS[host] : host;
|
|
17695
17695
|
let text = "";
|
|
@@ -17724,13 +17724,13 @@ var init_run = __esm(async () => {
|
|
|
17724
17724
|
if (false) {}
|
|
17725
17725
|
});
|
|
17726
17726
|
|
|
17727
|
-
// packages/workit-core/src/hooks/hosts/opencode.ts
|
|
17727
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/opencode.ts
|
|
17728
17728
|
var init_opencode = () => {};
|
|
17729
17729
|
|
|
17730
|
-
// packages/workit-core/src/hooks/hosts/pi.ts
|
|
17730
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/pi.ts
|
|
17731
17731
|
var init_pi = () => {};
|
|
17732
17732
|
|
|
17733
|
-
// packages/workit-core/src/hooks/index.ts
|
|
17733
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/index.ts
|
|
17734
17734
|
var init_hooks = __esm(async () => {
|
|
17735
17735
|
init_context();
|
|
17736
17736
|
init_policy();
|
package/dist/mcp-server.js
CHANGED
|
@@ -6620,11 +6620,11 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
6620
6620
|
exports.default = formatsPlugin;
|
|
6621
6621
|
});
|
|
6622
6622
|
|
|
6623
|
-
// packages/workit-mcp/src/index.ts
|
|
6623
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-mcp/src/index.ts
|
|
6624
6624
|
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
6625
6625
|
import path21 from "node:path";
|
|
6626
6626
|
|
|
6627
|
-
// packages/workit-mcp/src/server.ts
|
|
6627
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-mcp/src/server.ts
|
|
6628
6628
|
import { existsSync as existsSync8, readFileSync as readFileSync6, realpathSync as realpathSync6 } from "node:fs";
|
|
6629
6629
|
import path20 from "node:path";
|
|
6630
6630
|
|
|
@@ -16572,15 +16572,15 @@ class StdioServerTransport {
|
|
|
16572
16572
|
}
|
|
16573
16573
|
}
|
|
16574
16574
|
|
|
16575
|
-
// packages/workit-mcp/src/server.ts
|
|
16575
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-mcp/src/server.ts
|
|
16576
16576
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
16577
16577
|
|
|
16578
|
-
// packages/workit-core/src/core.ts
|
|
16578
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core.ts
|
|
16579
16579
|
import { spawnSync as spawnSync12 } from "node:child_process";
|
|
16580
16580
|
import { existsSync as existsSync7, realpathSync as realpathSync5 } from "node:fs";
|
|
16581
16581
|
import path19 from "node:path";
|
|
16582
16582
|
|
|
16583
|
-
// packages/workit-core/src/core/task-contract.ts
|
|
16583
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-contract.ts
|
|
16584
16584
|
import { createHash, randomUUID } from "node:crypto";
|
|
16585
16585
|
var SCHEMA_VERSION = 1;
|
|
16586
16586
|
var POLICY_VERSION = "1.0.0";
|
|
@@ -17436,7 +17436,7 @@ function requirementId(input) {
|
|
|
17436
17436
|
}
|
|
17437
17437
|
});
|
|
17438
17438
|
}
|
|
17439
|
-
// packages/workit-core/src/core/operation-input.ts
|
|
17439
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/operation-input.ts
|
|
17440
17440
|
var str = (d, values) => ({
|
|
17441
17441
|
type: "string",
|
|
17442
17442
|
...values ? { enum: values } : {},
|
|
@@ -17832,7 +17832,7 @@ function parseAdvertisedOperation(family, input, host) {
|
|
|
17832
17832
|
}))
|
|
17833
17833
|
});
|
|
17834
17834
|
}
|
|
17835
|
-
// packages/workit-core/src/core/task-store.ts
|
|
17835
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-store.ts
|
|
17836
17836
|
import { createHash as createHash4, randomUUID as randomUUID3 } from "node:crypto";
|
|
17837
17837
|
import * as fs7 from "node:fs";
|
|
17838
17838
|
import path6 from "node:path";
|
|
@@ -18438,7 +18438,7 @@ function acquireFileLockSync(targetPath, options) {
|
|
|
18438
18438
|
}
|
|
18439
18439
|
}
|
|
18440
18440
|
}
|
|
18441
|
-
// packages/workit-core/src/core/package-root.ts
|
|
18441
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/package-root.ts
|
|
18442
18442
|
import { existsSync } from "node:fs";
|
|
18443
18443
|
import path3 from "node:path";
|
|
18444
18444
|
import { fileURLToPath } from "node:url";
|
|
@@ -18457,12 +18457,12 @@ var assetRoot = () => {
|
|
|
18457
18457
|
return existsSync(assets) ? assets : root;
|
|
18458
18458
|
};
|
|
18459
18459
|
|
|
18460
|
-
// packages/workit-core/src/core/store-lock.ts
|
|
18460
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/store-lock.ts
|
|
18461
18461
|
import { spawnSync as spawnSync2 } from "node:child_process";
|
|
18462
18462
|
import fs5 from "node:fs";
|
|
18463
18463
|
import { hostname } from "node:os";
|
|
18464
18464
|
|
|
18465
|
-
// packages/workit-core/src/store/paths.ts
|
|
18465
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/paths.ts
|
|
18466
18466
|
import { spawnSync } from "node:child_process";
|
|
18467
18467
|
import { createHash as createHash2 } from "node:crypto";
|
|
18468
18468
|
import fs4 from "node:fs";
|
|
@@ -18742,7 +18742,7 @@ var checkoutSlug = (root) => {
|
|
|
18742
18742
|
return `${base}-${shortHash(canonical)}`;
|
|
18743
18743
|
};
|
|
18744
18744
|
|
|
18745
|
-
// packages/workit-core/src/core/store-lock.ts
|
|
18745
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/store-lock.ts
|
|
18746
18746
|
var metadataLockSchema = object2({
|
|
18747
18747
|
pid: number2().int().nonnegative().safe(),
|
|
18748
18748
|
processStart: string2().nullable(),
|
|
@@ -18873,7 +18873,7 @@ var clearAbandonedReclaimGuard = (lockPath, nowMs = Date.now()) => {
|
|
|
18873
18873
|
}
|
|
18874
18874
|
};
|
|
18875
18875
|
|
|
18876
|
-
// packages/workit-core/src/store/event-log.ts
|
|
18876
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/event-log.ts
|
|
18877
18877
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
18878
18878
|
import fs6 from "node:fs";
|
|
18879
18879
|
import path5 from "node:path";
|
|
@@ -19033,7 +19033,7 @@ var retryTransient = (run) => {
|
|
|
19033
19033
|
};
|
|
19034
19034
|
var renameWithRetry = (from, to) => retryTransient(() => fs6.renameSync(from, to));
|
|
19035
19035
|
|
|
19036
|
-
// packages/workit-core/src/store/patch.ts
|
|
19036
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/patch.ts
|
|
19037
19037
|
var isPlainObject3 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
19038
19038
|
var equal = (left, right) => {
|
|
19039
19039
|
if (left === right)
|
|
@@ -19143,7 +19143,7 @@ var isPatch = (value) => Array.isArray(value) && value.every((op) => {
|
|
|
19143
19143
|
return false;
|
|
19144
19144
|
});
|
|
19145
19145
|
|
|
19146
|
-
// packages/workit-core/src/store/reduce.ts
|
|
19146
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/reduce.ts
|
|
19147
19147
|
import { createHash as createHash3 } from "node:crypto";
|
|
19148
19148
|
var OPENING_TYPES = new Set([
|
|
19149
19149
|
"task.opened",
|
|
@@ -19274,7 +19274,7 @@ function eventType(before, after) {
|
|
|
19274
19274
|
return "task.updated";
|
|
19275
19275
|
}
|
|
19276
19276
|
|
|
19277
|
-
// packages/workit-core/src/store/notes.ts
|
|
19277
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/notes.ts
|
|
19278
19278
|
var SLOT = Symbol.for("workit.migrationReporter");
|
|
19279
19279
|
var reportMigration = (report) => {
|
|
19280
19280
|
try {
|
|
@@ -19285,7 +19285,7 @@ var reportMigration = (report) => {
|
|
|
19285
19285
|
};
|
|
19286
19286
|
var migrationReporterInstalled = () => typeof globalThis[SLOT] === "function";
|
|
19287
19287
|
|
|
19288
|
-
// packages/workit-core/src/core/task-store.ts
|
|
19288
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-store.ts
|
|
19289
19289
|
var MIGRATION_PENDING = "workit migration pending";
|
|
19290
19290
|
var STORE_FORMAT = 3;
|
|
19291
19291
|
var STORE_MIN_RUNTIME = "3.0.0";
|
|
@@ -20921,18 +20921,18 @@ class TaskStore {
|
|
|
20921
20921
|
return failure2(recovery ? "recovery_required" : "storage_error", `lock operation failed: ${String(error)}`, { path: lockPath });
|
|
20922
20922
|
}
|
|
20923
20923
|
}
|
|
20924
|
-
// packages/workit-core/src/core/workers.ts
|
|
20924
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/workers.ts
|
|
20925
20925
|
var UNCERTAIN_WORKER_STATES = ["dispatching", "running", "cancelling", "unknown"];
|
|
20926
20926
|
var isUncertainWorker = (state) => UNCERTAIN_WORKER_STATES.includes(state);
|
|
20927
20927
|
var workerBlocksTransition = (transition, state) => transition === "pause" ? false : isUncertainWorker(state);
|
|
20928
20928
|
|
|
20929
|
-
// packages/workit-core/src/core/task-evaluation.ts
|
|
20929
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-evaluation.ts
|
|
20930
20930
|
import { createHash as createHash7 } from "node:crypto";
|
|
20931
20931
|
import * as fs11 from "node:fs";
|
|
20932
20932
|
import { spawnSync as spawnSync6 } from "node:child_process";
|
|
20933
20933
|
import path11 from "node:path";
|
|
20934
20934
|
|
|
20935
|
-
// packages/workit-core/src/check-config.ts
|
|
20935
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/check-config.ts
|
|
20936
20936
|
import { spawnSync as spawnSync3 } from "node:child_process";
|
|
20937
20937
|
import fs8 from "node:fs";
|
|
20938
20938
|
import path7 from "node:path";
|
|
@@ -21137,7 +21137,7 @@ function checkCommand(args, version, onPath = workitAvailable()) {
|
|
|
21137
21137
|
return onPath ? `workit check ${args}` : `npx -y @brainervirus/workit-cli@${version} check ${args}`;
|
|
21138
21138
|
}
|
|
21139
21139
|
|
|
21140
|
-
// packages/workit-core/src/git/rev.ts
|
|
21140
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/git/rev.ts
|
|
21141
21141
|
import { spawnSync as spawnSync4 } from "node:child_process";
|
|
21142
21142
|
import { createHash as createHash5 } from "node:crypto";
|
|
21143
21143
|
import fs9 from "node:fs";
|
|
@@ -21318,11 +21318,11 @@ function pushRemoteName(cwd, branch) {
|
|
|
21318
21318
|
return remotes.length === 1 ? remotes[0] : null;
|
|
21319
21319
|
}
|
|
21320
21320
|
|
|
21321
|
-
// packages/workit-core/src/core/policy/derive.ts
|
|
21321
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/policy/derive.ts
|
|
21322
21322
|
import { existsSync as existsSync3 } from "node:fs";
|
|
21323
21323
|
import path10 from "node:path";
|
|
21324
21324
|
|
|
21325
|
-
// packages/workit-core/src/ledger.ts
|
|
21325
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/ledger.ts
|
|
21326
21326
|
import { spawnSync as spawnSync5 } from "node:child_process";
|
|
21327
21327
|
import { createHash as createHash6, randomBytes as randomBytes2 } from "node:crypto";
|
|
21328
21328
|
import fs10 from "node:fs";
|
|
@@ -21673,7 +21673,7 @@ function checkVerdicts(cwd, branch, rows) {
|
|
|
21673
21673
|
}
|
|
21674
21674
|
var OBSERVED_ONLY = new Set(["check", ...PR_ROW_TYPES]);
|
|
21675
21675
|
|
|
21676
|
-
// packages/workit-core/src/core/policy/derive.ts
|
|
21676
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/policy/derive.ts
|
|
21677
21677
|
var RULES = {
|
|
21678
21678
|
test: "check:test",
|
|
21679
21679
|
self: "verdict:self",
|
|
@@ -21861,7 +21861,7 @@ function derivedRuleStatus(task, requirement, root, ledger) {
|
|
|
21861
21861
|
}
|
|
21862
21862
|
}
|
|
21863
21863
|
|
|
21864
|
-
// packages/workit-core/src/core/task-evaluation.ts
|
|
21864
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-evaluation.ts
|
|
21865
21865
|
var digestBytes = (value) => createHash7("sha256").update(value).digest("hex");
|
|
21866
21866
|
var inside = (root, candidate) => candidate === root || candidate.startsWith(`${root}${path11.sep}`);
|
|
21867
21867
|
var relative = (root, candidate) => path11.relative(root, candidate).split(path11.sep).join("/") || ".";
|
|
@@ -22527,7 +22527,7 @@ function evaluateClosure(requestedOutcome, view) {
|
|
|
22527
22527
|
});
|
|
22528
22528
|
}
|
|
22529
22529
|
|
|
22530
|
-
// packages/workit-core/src/core/methods.ts
|
|
22530
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/methods.ts
|
|
22531
22531
|
var METHODS = {
|
|
22532
22532
|
"workit-shape": { dimensions: ["challenge", "decisions", "artifacts", "continuity"] },
|
|
22533
22533
|
"workit-bdd": { dimensions: ["testing"] },
|
|
@@ -22573,7 +22573,7 @@ function selectMethods(policy, capabilities) {
|
|
|
22573
22573
|
});
|
|
22574
22574
|
}
|
|
22575
22575
|
|
|
22576
|
-
// packages/workit-core/src/core/task-context.ts
|
|
22576
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-context.ts
|
|
22577
22577
|
function reconcileResume(view, observations = []) {
|
|
22578
22578
|
if (observations.length > 0)
|
|
22579
22579
|
return failure2("permission_denied", "worker observations require native host verification");
|
|
@@ -22687,7 +22687,7 @@ var exportDigest = (bundle) => sha256({
|
|
|
22687
22687
|
sourceWorkspaceId: bundle.sourceWorkspaceId,
|
|
22688
22688
|
task: bundle.task
|
|
22689
22689
|
});
|
|
22690
|
-
// packages/workit-core/src/core/git.ts
|
|
22690
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/git.ts
|
|
22691
22691
|
import { execFileSync } from "node:child_process";
|
|
22692
22692
|
var run = (cwd, args) => {
|
|
22693
22693
|
try {
|
|
@@ -22755,7 +22755,7 @@ var gitContext = (workspaceRoot, paths = []) => {
|
|
|
22755
22755
|
};
|
|
22756
22756
|
};
|
|
22757
22757
|
|
|
22758
|
-
// packages/workit-core/src/core/config.ts
|
|
22758
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/config.ts
|
|
22759
22759
|
import {
|
|
22760
22760
|
copyFileSync as copyFileSync2,
|
|
22761
22761
|
cpSync as cpSync2,
|
|
@@ -22768,7 +22768,7 @@ import {
|
|
|
22768
22768
|
import os2 from "node:os";
|
|
22769
22769
|
import path12 from "node:path";
|
|
22770
22770
|
|
|
22771
|
-
// packages/workit-core/src/core/boundary.ts
|
|
22771
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/boundary.ts
|
|
22772
22772
|
import { statSync as statSync2 } from "node:fs";
|
|
22773
22773
|
var EVENT = {
|
|
22774
22774
|
initialization: "initialization",
|
|
@@ -22804,7 +22804,7 @@ var changedSourcesSinceLoad = (marker) => {
|
|
|
22804
22804
|
return changed;
|
|
22805
22805
|
};
|
|
22806
22806
|
|
|
22807
|
-
// packages/workit-core/src/core/config.ts
|
|
22807
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/config.ts
|
|
22808
22808
|
var diagnosticLogger;
|
|
22809
22809
|
var PRESETS = {
|
|
22810
22810
|
gitflow: {
|
|
@@ -22957,7 +22957,7 @@ var COMMIT_PRESETS = [
|
|
|
22957
22957
|
"auto"
|
|
22958
22958
|
];
|
|
22959
22959
|
|
|
22960
|
-
// packages/workit-core/src/core/workspaces.ts
|
|
22960
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/workspaces.ts
|
|
22961
22961
|
import { createHash as createHash8 } from "node:crypto";
|
|
22962
22962
|
import { readFileSync as readFileSync4, realpathSync as realpathSync3 } from "node:fs";
|
|
22963
22963
|
import path13 from "node:path";
|
|
@@ -23366,12 +23366,12 @@ function workspaceDefaultTarget(cwd, globalDefault) {
|
|
|
23366
23366
|
return String(ws?.vcs?.defaultTargetBranch ?? (hasWorkspacePolicy ? policyDefault : globalDefault ?? policyDefault) ?? "develop");
|
|
23367
23367
|
}
|
|
23368
23368
|
|
|
23369
|
-
// packages/workit-core/src/core/vcs-config.ts
|
|
23369
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/vcs-config.ts
|
|
23370
23370
|
import fs12 from "node:fs";
|
|
23371
23371
|
import path14 from "node:path";
|
|
23372
23372
|
import { spawnSync as spawnSync8 } from "node:child_process";
|
|
23373
23373
|
|
|
23374
|
-
// packages/workit-core/src/core/release-tracks.ts
|
|
23374
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/release-tracks.ts
|
|
23375
23375
|
import { createHash as createHash9 } from "node:crypto";
|
|
23376
23376
|
import { spawnSync as spawnSync7 } from "node:child_process";
|
|
23377
23377
|
var KNOWN_FIELDS = new Set([
|
|
@@ -23756,7 +23756,7 @@ function resolveTrackFor(cwd, options) {
|
|
|
23756
23756
|
return resolution;
|
|
23757
23757
|
}
|
|
23758
23758
|
|
|
23759
|
-
// packages/workit-core/src/core/vcs-config.ts
|
|
23759
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/vcs-config.ts
|
|
23760
23760
|
var workspacesPath = () => path14.join(configDir(), "workspaces.json");
|
|
23761
23761
|
var vcsCwd = (cwd) => cwd ?? process.env.WORKFLOW_WORKSPACE_ROOT ?? process.cwd();
|
|
23762
23762
|
var remoteProvider = (cwd) => {
|
|
@@ -24037,10 +24037,10 @@ function mergedPrStyle(limit = 6, cwd) {
|
|
|
24037
24037
|
examples
|
|
24038
24038
|
};
|
|
24039
24039
|
}
|
|
24040
|
-
// packages/workit-core/src/core/task-engine.ts
|
|
24040
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-engine.ts
|
|
24041
24041
|
import { realpathSync as realpathSync4 } from "node:fs";
|
|
24042
24042
|
|
|
24043
|
-
// packages/workit-core/src/core/policy-resolver.ts
|
|
24043
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/policy-resolver.ts
|
|
24044
24044
|
function resolvePolicy(input) {
|
|
24045
24045
|
const ids = input.constraints.map((constraint) => constraint.id);
|
|
24046
24046
|
if (new Set(ids).size !== ids.length)
|
|
@@ -24096,7 +24096,7 @@ function diffPolicy(previous, next, reason, now) {
|
|
|
24096
24096
|
return parsed.data;
|
|
24097
24097
|
}
|
|
24098
24098
|
|
|
24099
|
-
// packages/workit-core/src/core/policy/judgment.ts
|
|
24099
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/policy/judgment.ts
|
|
24100
24100
|
var isObject6 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
24101
24101
|
var squash = (key) => key.toLowerCase().replace(/[_-]/g, "");
|
|
24102
24102
|
var ALIASES = {
|
|
@@ -24220,7 +24220,7 @@ function normalizeJudgment(raw, previous) {
|
|
|
24220
24220
|
return success(null, null, { judgment: parsed.data, ignored, legacy });
|
|
24221
24221
|
}
|
|
24222
24222
|
|
|
24223
|
-
// packages/workit-core/src/autonomy.ts
|
|
24223
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/autonomy.ts
|
|
24224
24224
|
import os3 from "node:os";
|
|
24225
24225
|
import path15 from "node:path";
|
|
24226
24226
|
var accountHome = () => {
|
|
@@ -24357,7 +24357,7 @@ function resolveAutonomy(cwd) {
|
|
|
24357
24357
|
var suggested = (kind) => kind === "merge" ? "verified" : "true";
|
|
24358
24358
|
var grantHint = (workspace, kind) => `ask the user to run, in their own terminal: workit grant set ${workspace ?? "<workspace>"} ${kind}=${suggested(kind)}`;
|
|
24359
24359
|
|
|
24360
|
-
// packages/workit-core/src/core/task-engine.ts
|
|
24360
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-engine.ts
|
|
24361
24361
|
var workspaceVerification = (root) => {
|
|
24362
24362
|
try {
|
|
24363
24363
|
return resolveAutonomy(root).verification;
|
|
@@ -25942,7 +25942,7 @@ class WorkitCore {
|
|
|
25942
25942
|
return this.summary(changed.data.task);
|
|
25943
25943
|
}
|
|
25944
25944
|
}
|
|
25945
|
-
// packages/workit-core/src/core/repo-context.ts
|
|
25945
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/repo-context.ts
|
|
25946
25946
|
import { spawnSync as spawnSync9 } from "node:child_process";
|
|
25947
25947
|
import { existsSync as existsSync6, readFileSync as readFileSync5, readdirSync as readdirSync4 } from "node:fs";
|
|
25948
25948
|
import path16 from "node:path";
|
|
@@ -26412,20 +26412,20 @@ function releaseNotesContext(root, rangeOrTag) {
|
|
|
26412
26412
|
return { stdout, stderr: "", exitCode: 0, cwd };
|
|
26413
26413
|
}
|
|
26414
26414
|
|
|
26415
|
-
// packages/workit-core/src/core/tracker-issues.ts
|
|
26415
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/tracker-issues.ts
|
|
26416
26416
|
import { spawnSync as spawnSync11 } from "node:child_process";
|
|
26417
26417
|
|
|
26418
|
-
// packages/workit-core/src/core/pr-create.ts
|
|
26418
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/pr-create.ts
|
|
26419
26419
|
import fs13 from "node:fs";
|
|
26420
26420
|
import path17 from "node:path";
|
|
26421
26421
|
import { spawnSync as spawnSync10 } from "node:child_process";
|
|
26422
|
-
// packages/workit-core/src/forge/pr-body.ts
|
|
26422
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/forge/pr-body.ts
|
|
26423
26423
|
function parseGhIssue(value) {
|
|
26424
26424
|
const m = /issues\/(\d+)/.exec(value);
|
|
26425
26425
|
return m ? m[1] : String(value).trim().replace(/^#/, "");
|
|
26426
26426
|
}
|
|
26427
26427
|
|
|
26428
|
-
// packages/workit-core/src/core/pr-create.ts
|
|
26428
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/pr-create.ts
|
|
26429
26429
|
function whichOnPath(tool) {
|
|
26430
26430
|
const names = process.platform === "win32" ? [tool, `${tool}.exe`, `${tool}.cmd`] : [tool];
|
|
26431
26431
|
for (const dir of (process.env.PATH ?? "").split(path17.delimiter)) {
|
|
@@ -26453,7 +26453,7 @@ var pushRemote = (cwd) => {
|
|
|
26453
26453
|
return urls.length === 1 ? urls[0] : null;
|
|
26454
26454
|
};
|
|
26455
26455
|
|
|
26456
|
-
// packages/workit-core/src/core/tracker-issues.ts
|
|
26456
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/tracker-issues.ts
|
|
26457
26457
|
var repoPathFromRemote = (remote) => {
|
|
26458
26458
|
let rest = (remote || "").trim().replace(/\/+$/, "");
|
|
26459
26459
|
if (!rest)
|
|
@@ -26551,19 +26551,19 @@ var fetchGitLabIssueBody = async (ref, root, deps = {}) => {
|
|
|
26551
26551
|
return tryCliTriple(deps.cli ?? defaultCli("glab", hostingCliAvailable("gitlab")), "glab", ["issue", "view", id, "-R", repoArg, "-F", "json"], root, id, ["iid"], ["description"]);
|
|
26552
26552
|
};
|
|
26553
26553
|
|
|
26554
|
-
// packages/workit-core/src/core/youtrack.ts
|
|
26554
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/youtrack.ts
|
|
26555
26555
|
import fs14 from "node:fs";
|
|
26556
26556
|
import path18 from "node:path";
|
|
26557
26557
|
|
|
26558
|
-
// packages/workit-core/src/core/templates.ts
|
|
26558
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/templates.ts
|
|
26559
26559
|
var repoRoot2 = assetRoot();
|
|
26560
26560
|
|
|
26561
|
-
// packages/workit-core/src/core/scripts.ts
|
|
26561
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/scripts.ts
|
|
26562
26562
|
var PLUGIN_ROOT = packageRoot();
|
|
26563
26563
|
var ASSET_ROOT = assetRoot();
|
|
26564
26564
|
var resolveWorkspaceRoot = (explicit) => explicit || process.cwd();
|
|
26565
26565
|
|
|
26566
|
-
// packages/workit-core/src/core/youtrack.ts
|
|
26566
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/youtrack.ts
|
|
26567
26567
|
var ISSUE_RE = /^[A-Z]+-\d+$/;
|
|
26568
26568
|
var TOKEN_PLACEHOLDER = "YOUR_TOKEN_HERE";
|
|
26569
26569
|
var youTrackConfigPath = () => process.env.WORKFLOW_YOUTRACK_CONFIG ?? path18.join(configDir(), "youtrack.json");
|
|
@@ -26854,7 +26854,7 @@ var fetchYouTrackIssueBody = async (issue, creds = youTrackToken, request = youT
|
|
|
26854
26854
|
}
|
|
26855
26855
|
};
|
|
26856
26856
|
|
|
26857
|
-
// packages/workit-core/src/core/context-read.ts
|
|
26857
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/context-read.ts
|
|
26858
26858
|
var contextReadSchema = object2({
|
|
26859
26859
|
kind: _enum([
|
|
26860
26860
|
"git",
|
|
@@ -26949,7 +26949,7 @@ var readExternalContext = async (root, payload) => {
|
|
|
26949
26949
|
}
|
|
26950
26950
|
}
|
|
26951
26951
|
};
|
|
26952
|
-
// packages/workit-core/src/core.ts
|
|
26952
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core.ts
|
|
26953
26953
|
var revision2 = /^[A-Za-z0-9@][A-Za-z0-9@._/~^{}-]*$/;
|
|
26954
26954
|
function gitRevisionParts(value) {
|
|
26955
26955
|
if (!value || value.startsWith("-") || /[\s\\'"`$;|&<>]/.test(value)) {
|
|
@@ -27005,7 +27005,7 @@ function run2(root, executable, args, env = {}) {
|
|
|
27005
27005
|
};
|
|
27006
27006
|
}
|
|
27007
27007
|
|
|
27008
|
-
// packages/workit-core/src/core/logger.ts
|
|
27008
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/logger.ts
|
|
27009
27009
|
import os4 from "node:os";
|
|
27010
27010
|
var REDACTED = "[REDACTED]";
|
|
27011
27011
|
var SECRET_VALUE = /\b(?:Bearer|Basic|Digest|Token)\s+\S+/gi;
|
|
@@ -27062,7 +27062,7 @@ var applyPatterns = (value) => {
|
|
|
27062
27062
|
};
|
|
27063
27063
|
var redactSecrets = (value) => applyPatterns(value);
|
|
27064
27064
|
|
|
27065
|
-
// packages/workit-mcp/src/server.ts
|
|
27065
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-mcp/src/server.ts
|
|
27066
27066
|
class McpCapabilityUnavailableError extends Error {
|
|
27067
27067
|
capability;
|
|
27068
27068
|
constructor(capability) {
|
|
@@ -27358,7 +27358,7 @@ async function runStdioServer(host, contextProvider = defaultContextProvider(hos
|
|
|
27358
27358
|
return server;
|
|
27359
27359
|
}
|
|
27360
27360
|
|
|
27361
|
-
// packages/workit-mcp/src/index.ts
|
|
27361
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-mcp/src/index.ts
|
|
27362
27362
|
var main = async () => {
|
|
27363
27363
|
const args = process.argv.slice(2);
|
|
27364
27364
|
const hostIndex = args.indexOf("--host");
|
|
@@ -27375,7 +27375,7 @@ var main = async () => {
|
|
|
27375
27375
|
var entryPath = process.argv[1] ? path21.resolve(process.argv[1]) : "";
|
|
27376
27376
|
if (entryPath === path21.resolve(fileURLToPath3(import.meta.url)))
|
|
27377
27377
|
await main();
|
|
27378
|
-
// packages/workit-core/src/hooks/descriptor.ts
|
|
27378
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/descriptor.ts
|
|
27379
27379
|
var support = (descriptor, axis) => {
|
|
27380
27380
|
if (axis.startsWith("event:"))
|
|
27381
27381
|
return descriptor.events[axis.slice("event:".length)].support;
|
|
@@ -27399,14 +27399,14 @@ var capabilitiesFor = (descriptor, observed = {}) => descriptor.capabilities.map
|
|
|
27399
27399
|
refs: rule.refs.map((handle) => ({ kind: "host", host: descriptor.host, handle }))
|
|
27400
27400
|
};
|
|
27401
27401
|
});
|
|
27402
|
-
// packages/workit-core/src/hooks/context.ts
|
|
27402
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/context.ts
|
|
27403
27403
|
var signals = new Map;
|
|
27404
27404
|
var cache = new Map;
|
|
27405
|
-
// packages/workit-core/src/hooks/write-gate.ts
|
|
27405
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/write-gate.ts
|
|
27406
27406
|
var CASE_INSENSITIVE = process.platform === "darwin" || process.platform === "win32";
|
|
27407
27407
|
var PREFIXES = new Set(["sudo", "command", "env", "nohup", "time", "exec", "xargs"]);
|
|
27408
27408
|
var cache2 = new Map;
|
|
27409
|
-
// packages/workit-core/src/hooks/hosts/fields.ts
|
|
27409
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/fields.ts
|
|
27410
27410
|
var SHELLS = new Set(["sh", "bash", "zsh", "dash", "pwsh", "powershell", "cmd"]);
|
|
27411
27411
|
var WRITE_TOOLS = new Set([
|
|
27412
27412
|
"write",
|
|
@@ -27427,19 +27427,19 @@ var WRITE_TOOLS = new Set([
|
|
|
27427
27427
|
"editfile",
|
|
27428
27428
|
"writefile"
|
|
27429
27429
|
]);
|
|
27430
|
-
// packages/workit-core/src/hooks/handle.ts
|
|
27430
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/handle.ts
|
|
27431
27431
|
var offered = new Set;
|
|
27432
27432
|
var CLAUDE_JUDGES = new Set(["workit:verifier", "workit:reviewer"]);
|
|
27433
|
-
// packages/workit-core/src/hooks/hosts/claude-code.ts
|
|
27433
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/claude-code.ts
|
|
27434
27434
|
var SOURCES = new Set(["startup", "resume", "clear", "compact", "fork"]);
|
|
27435
27435
|
var SHELL_TOOLS = new Set(["Bash", "PowerShell"]);
|
|
27436
27436
|
var CONTEXT_EVENTS = new Set(["SessionStart", "UserPromptSubmit", "SubagentStart"]);
|
|
27437
27437
|
|
|
27438
|
-
// packages/workit-core/src/hooks/hosts/codex.ts
|
|
27438
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/codex.ts
|
|
27439
27439
|
var SHELL_TOOLS2 = new Set(["bash", "unified-exec"]);
|
|
27440
27440
|
var SOURCES2 = new Set(["startup", "resume", "clear", "compact"]);
|
|
27441
27441
|
|
|
27442
|
-
// packages/workit-core/src/hooks/hosts/cursor.ts
|
|
27442
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/cursor.ts
|
|
27443
27443
|
var undocumented = { support: "undocumented", native: null };
|
|
27444
27444
|
var none = { support: "none", native: null };
|
|
27445
27445
|
var CURSOR_DESCRIPTOR = {
|
|
@@ -27544,7 +27544,7 @@ var CURSOR_DESCRIPTOR = {
|
|
|
27544
27544
|
};
|
|
27545
27545
|
var BLOCKING = new Set(["preToolUse", "beforeShellExecution", "subagentStart"]);
|
|
27546
27546
|
|
|
27547
|
-
// packages/workit-core/src/hooks/run.ts
|
|
27547
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/run.ts
|
|
27548
27548
|
if (false) {}
|
|
27549
27549
|
// packages/workit-cursor/hooks/workit-hook.ts
|
|
27550
27550
|
var cursorCapabilities = (availability = {}) => capabilitiesFor(CURSOR_DESCRIPTOR, {
|
package/dist/workit-hook.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
4
4
|
|
|
5
|
-
// packages/workit-core/src/core/task-contract.ts
|
|
5
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-contract.ts
|
|
6
6
|
import { createHash, randomUUID } from "node:crypto";
|
|
7
7
|
|
|
8
8
|
// node_modules/zod/v4/core/util.js
|
|
@@ -7516,7 +7516,7 @@ function refine(fn, _params = {}) {
|
|
|
7516
7516
|
function superRefine(fn, params) {
|
|
7517
7517
|
return _superRefine(fn, params);
|
|
7518
7518
|
}
|
|
7519
|
-
// packages/workit-core/src/core/task-contract.ts
|
|
7519
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-contract.ts
|
|
7520
7520
|
var SCHEMA_VERSION = 1;
|
|
7521
7521
|
var POLICY_VERSION = "1.0.0";
|
|
7522
7522
|
var OPERATION_FAMILIES = [
|
|
@@ -8372,14 +8372,14 @@ function requirementId(input) {
|
|
|
8372
8372
|
});
|
|
8373
8373
|
}
|
|
8374
8374
|
|
|
8375
|
-
// packages/workit-core/src/core/task-engine.ts
|
|
8375
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-engine.ts
|
|
8376
8376
|
import { realpathSync as realpathSync4 } from "node:fs";
|
|
8377
8377
|
|
|
8378
|
-
// packages/workit-core/src/core/policy/derive.ts
|
|
8378
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/policy/derive.ts
|
|
8379
8379
|
import { existsSync } from "node:fs";
|
|
8380
8380
|
import path4 from "node:path";
|
|
8381
8381
|
|
|
8382
|
-
// packages/workit-core/src/git/rev.ts
|
|
8382
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/git/rev.ts
|
|
8383
8383
|
import { spawnSync } from "node:child_process";
|
|
8384
8384
|
import { createHash as createHash2 } from "node:crypto";
|
|
8385
8385
|
import fs from "node:fs";
|
|
@@ -8531,13 +8531,13 @@ function currentBranch(cwd) {
|
|
|
8531
8531
|
return line(git(cwd, ["symbolic-ref", "--short", "-q", "HEAD"]));
|
|
8532
8532
|
}
|
|
8533
8533
|
|
|
8534
|
-
// packages/workit-core/src/ledger.ts
|
|
8534
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/ledger.ts
|
|
8535
8535
|
import { spawnSync as spawnSync3 } from "node:child_process";
|
|
8536
8536
|
import { createHash as createHash4, randomBytes } from "node:crypto";
|
|
8537
8537
|
import fs3 from "node:fs";
|
|
8538
8538
|
import path3 from "node:path";
|
|
8539
8539
|
|
|
8540
|
-
// packages/workit-core/src/store/paths.ts
|
|
8540
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/paths.ts
|
|
8541
8541
|
import { spawnSync as spawnSync2 } from "node:child_process";
|
|
8542
8542
|
import { createHash as createHash3 } from "node:crypto";
|
|
8543
8543
|
import fs2 from "node:fs";
|
|
@@ -8817,7 +8817,7 @@ var checkoutSlug = (root) => {
|
|
|
8817
8817
|
return `${base}-${shortHash(canonical)}`;
|
|
8818
8818
|
};
|
|
8819
8819
|
|
|
8820
|
-
// packages/workit-core/src/ledger.ts
|
|
8820
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/ledger.ts
|
|
8821
8821
|
var LEDGER_VERSION = 1;
|
|
8822
8822
|
var PASSING = new Set(["verified", "tests-verified", "type-check-only"]);
|
|
8823
8823
|
var FAILING = new Set(["failed", "blocked"]);
|
|
@@ -9164,7 +9164,7 @@ function checkVerdicts(cwd, branch, rows) {
|
|
|
9164
9164
|
}
|
|
9165
9165
|
var OBSERVED_ONLY = new Set(["check", ...PR_ROW_TYPES]);
|
|
9166
9166
|
|
|
9167
|
-
// packages/workit-core/src/core/policy/derive.ts
|
|
9167
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/policy/derive.ts
|
|
9168
9168
|
var RULES = {
|
|
9169
9169
|
test: "check:test",
|
|
9170
9170
|
self: "verdict:self",
|
|
@@ -9363,7 +9363,7 @@ function writeBlockers(task, root) {
|
|
|
9363
9363
|
});
|
|
9364
9364
|
}
|
|
9365
9365
|
|
|
9366
|
-
// packages/workit-core/src/core/policy-resolver.ts
|
|
9366
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/policy-resolver.ts
|
|
9367
9367
|
function resolvePolicy(input) {
|
|
9368
9368
|
const ids = input.constraints.map((constraint) => constraint.id);
|
|
9369
9369
|
if (new Set(ids).size !== ids.length)
|
|
@@ -9419,7 +9419,7 @@ function diffPolicy(previous, next, reason, now) {
|
|
|
9419
9419
|
return parsed.data;
|
|
9420
9420
|
}
|
|
9421
9421
|
|
|
9422
|
-
// packages/workit-core/src/core/operation-input.ts
|
|
9422
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/operation-input.ts
|
|
9423
9423
|
var str2 = (d, values) => ({
|
|
9424
9424
|
type: "string",
|
|
9425
9425
|
...values ? { enum: values } : {},
|
|
@@ -9765,7 +9765,7 @@ function normalizeOperationInput(family, input, host) {
|
|
|
9765
9765
|
return request;
|
|
9766
9766
|
}
|
|
9767
9767
|
|
|
9768
|
-
// packages/workit-core/src/core/policy/judgment.ts
|
|
9768
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/policy/judgment.ts
|
|
9769
9769
|
var isObject3 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
9770
9770
|
var squash = (key) => key.toLowerCase().replace(/[_-]/g, "");
|
|
9771
9771
|
var ALIASES = {
|
|
@@ -9889,11 +9889,11 @@ function normalizeJudgment(raw, previous) {
|
|
|
9889
9889
|
return success(null, null, { judgment: parsed.data, ignored, legacy });
|
|
9890
9890
|
}
|
|
9891
9891
|
|
|
9892
|
-
// packages/workit-core/src/autonomy.ts
|
|
9892
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/autonomy.ts
|
|
9893
9893
|
import os3 from "node:os";
|
|
9894
9894
|
import path7 from "node:path";
|
|
9895
9895
|
|
|
9896
|
-
// packages/workit-core/src/core/config.ts
|
|
9896
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/config.ts
|
|
9897
9897
|
import {
|
|
9898
9898
|
copyFileSync,
|
|
9899
9899
|
cpSync,
|
|
@@ -9906,7 +9906,7 @@ import {
|
|
|
9906
9906
|
import os2 from "node:os";
|
|
9907
9907
|
import path5 from "node:path";
|
|
9908
9908
|
|
|
9909
|
-
// packages/workit-core/src/core/boundary.ts
|
|
9909
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/boundary.ts
|
|
9910
9910
|
var EVENT = {
|
|
9911
9911
|
initialization: "initialization",
|
|
9912
9912
|
provenance: "provenance",
|
|
@@ -9927,7 +9927,7 @@ var errorDetail = (err) => {
|
|
|
9927
9927
|
return { error_name: "unknown", error: String(err) };
|
|
9928
9928
|
};
|
|
9929
9929
|
|
|
9930
|
-
// packages/workit-core/src/core/config.ts
|
|
9930
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/config.ts
|
|
9931
9931
|
var diagnosticLogger;
|
|
9932
9932
|
var PRESETS = {
|
|
9933
9933
|
gitflow: {
|
|
@@ -10089,7 +10089,7 @@ var resolveCommitPolicy = (config, workspace) => {
|
|
|
10089
10089
|
return config.commitPolicy ?? { preset: "conventional" };
|
|
10090
10090
|
};
|
|
10091
10091
|
|
|
10092
|
-
// packages/workit-core/src/core/workspaces.ts
|
|
10092
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/workspaces.ts
|
|
10093
10093
|
import { createHash as createHash5 } from "node:crypto";
|
|
10094
10094
|
import { readFileSync as readFileSync2, realpathSync } from "node:fs";
|
|
10095
10095
|
import path6 from "node:path";
|
|
@@ -10489,7 +10489,7 @@ var resolveRuntimeWorkspacePolicy = (cwd, kind, requestedProfile) => {
|
|
|
10489
10489
|
};
|
|
10490
10490
|
};
|
|
10491
10491
|
|
|
10492
|
-
// packages/workit-core/src/autonomy.ts
|
|
10492
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/autonomy.ts
|
|
10493
10493
|
var accountHome = () => {
|
|
10494
10494
|
try {
|
|
10495
10495
|
return os3.userInfo().homedir;
|
|
@@ -10624,7 +10624,7 @@ function resolveAutonomy(cwd) {
|
|
|
10624
10624
|
var suggested = (kind) => kind === "merge" ? "verified" : "true";
|
|
10625
10625
|
var grantHint = (workspace, kind) => `ask the user to run, in their own terminal: workit grant set ${workspace ?? "<workspace>"} ${kind}=${suggested(kind)}`;
|
|
10626
10626
|
|
|
10627
|
-
// packages/workit-core/src/core/task-store.ts
|
|
10627
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-store.ts
|
|
10628
10628
|
import { createHash as createHash7, randomUUID as randomUUID3 } from "node:crypto";
|
|
10629
10629
|
import * as fs9 from "node:fs";
|
|
10630
10630
|
import path12 from "node:path";
|
|
@@ -11230,7 +11230,7 @@ function acquireFileLockSync(targetPath, options) {
|
|
|
11230
11230
|
}
|
|
11231
11231
|
}
|
|
11232
11232
|
}
|
|
11233
|
-
// packages/workit-core/src/core/package-root.ts
|
|
11233
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/package-root.ts
|
|
11234
11234
|
import { existsSync as existsSync3 } from "node:fs";
|
|
11235
11235
|
import path10 from "node:path";
|
|
11236
11236
|
import { fileURLToPath } from "node:url";
|
|
@@ -11244,7 +11244,7 @@ var packageRoot = () => {
|
|
|
11244
11244
|
}
|
|
11245
11245
|
};
|
|
11246
11246
|
|
|
11247
|
-
// packages/workit-core/src/core/store-lock.ts
|
|
11247
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/store-lock.ts
|
|
11248
11248
|
import { spawnSync as spawnSync4 } from "node:child_process";
|
|
11249
11249
|
import fs7 from "node:fs";
|
|
11250
11250
|
import { hostname } from "node:os";
|
|
@@ -11378,7 +11378,7 @@ var clearAbandonedReclaimGuard = (lockPath, nowMs = Date.now()) => {
|
|
|
11378
11378
|
}
|
|
11379
11379
|
};
|
|
11380
11380
|
|
|
11381
|
-
// packages/workit-core/src/store/event-log.ts
|
|
11381
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/event-log.ts
|
|
11382
11382
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
11383
11383
|
import fs8 from "node:fs";
|
|
11384
11384
|
import path11 from "node:path";
|
|
@@ -11538,7 +11538,7 @@ var retryTransient = (run) => {
|
|
|
11538
11538
|
};
|
|
11539
11539
|
var renameWithRetry = (from, to) => retryTransient(() => fs8.renameSync(from, to));
|
|
11540
11540
|
|
|
11541
|
-
// packages/workit-core/src/store/patch.ts
|
|
11541
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/patch.ts
|
|
11542
11542
|
var isPlainObject2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
11543
11543
|
var equal = (left, right) => {
|
|
11544
11544
|
if (left === right)
|
|
@@ -11648,7 +11648,7 @@ var isPatch = (value) => Array.isArray(value) && value.every((op) => {
|
|
|
11648
11648
|
return false;
|
|
11649
11649
|
});
|
|
11650
11650
|
|
|
11651
|
-
// packages/workit-core/src/store/reduce.ts
|
|
11651
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/reduce.ts
|
|
11652
11652
|
import { createHash as createHash6 } from "node:crypto";
|
|
11653
11653
|
var OPENING_TYPES = new Set([
|
|
11654
11654
|
"task.opened",
|
|
@@ -11779,7 +11779,7 @@ function eventType(before, after) {
|
|
|
11779
11779
|
return "task.updated";
|
|
11780
11780
|
}
|
|
11781
11781
|
|
|
11782
|
-
// packages/workit-core/src/store/notes.ts
|
|
11782
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/notes.ts
|
|
11783
11783
|
var SLOT = Symbol.for("workit.migrationReporter");
|
|
11784
11784
|
var reportMigration = (report) => {
|
|
11785
11785
|
try {
|
|
@@ -11790,7 +11790,7 @@ var reportMigration = (report) => {
|
|
|
11790
11790
|
};
|
|
11791
11791
|
var migrationReporterInstalled = () => typeof globalThis[SLOT] === "function";
|
|
11792
11792
|
|
|
11793
|
-
// packages/workit-core/src/core/task-store.ts
|
|
11793
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-store.ts
|
|
11794
11794
|
var MIGRATION_PENDING = "workit migration pending";
|
|
11795
11795
|
var STORE_FORMAT = 3;
|
|
11796
11796
|
var STORE_MIN_RUNTIME = "3.0.0";
|
|
@@ -13427,18 +13427,18 @@ class TaskStore {
|
|
|
13427
13427
|
}
|
|
13428
13428
|
}
|
|
13429
13429
|
|
|
13430
|
-
// packages/workit-core/src/core/workers.ts
|
|
13430
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/workers.ts
|
|
13431
13431
|
var UNCERTAIN_WORKER_STATES = ["dispatching", "running", "cancelling", "unknown"];
|
|
13432
13432
|
var isUncertainWorker = (state) => UNCERTAIN_WORKER_STATES.includes(state);
|
|
13433
13433
|
var workerBlocksTransition = (transition, state) => transition === "pause" ? false : isUncertainWorker(state);
|
|
13434
13434
|
|
|
13435
|
-
// packages/workit-core/src/core/task-evaluation.ts
|
|
13435
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-evaluation.ts
|
|
13436
13436
|
import { createHash as createHash8 } from "node:crypto";
|
|
13437
13437
|
import * as fs11 from "node:fs";
|
|
13438
13438
|
import { spawnSync as spawnSync6 } from "node:child_process";
|
|
13439
13439
|
import path14 from "node:path";
|
|
13440
13440
|
|
|
13441
|
-
// packages/workit-core/src/check-config.ts
|
|
13441
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/check-config.ts
|
|
13442
13442
|
import { spawnSync as spawnSync5 } from "node:child_process";
|
|
13443
13443
|
import fs10 from "node:fs";
|
|
13444
13444
|
import path13 from "node:path";
|
|
@@ -13643,7 +13643,7 @@ function checkCommand(args, version, onPath = workitAvailable()) {
|
|
|
13643
13643
|
return onPath ? `workit check ${args}` : `npx -y @brainervirus/workit-cli@${version} check ${args}`;
|
|
13644
13644
|
}
|
|
13645
13645
|
|
|
13646
|
-
// packages/workit-core/src/core/task-evaluation.ts
|
|
13646
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-evaluation.ts
|
|
13647
13647
|
var digestBytes = (value) => createHash8("sha256").update(value).digest("hex");
|
|
13648
13648
|
var inside = (root, candidate) => candidate === root || candidate.startsWith(`${root}${path14.sep}`);
|
|
13649
13649
|
var relative = (root, candidate) => path14.relative(root, candidate).split(path14.sep).join("/") || ".";
|
|
@@ -14309,7 +14309,7 @@ function evaluateClosure(requestedOutcome, view) {
|
|
|
14309
14309
|
});
|
|
14310
14310
|
}
|
|
14311
14311
|
|
|
14312
|
-
// packages/workit-core/src/core/methods.ts
|
|
14312
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/methods.ts
|
|
14313
14313
|
var METHODS = {
|
|
14314
14314
|
"workit-shape": { dimensions: ["challenge", "decisions", "artifacts", "continuity"] },
|
|
14315
14315
|
"workit-bdd": { dimensions: ["testing"] },
|
|
@@ -14417,7 +14417,7 @@ Skills: load the skill, never act from memory of it (slash aliases /wk-<name>).
|
|
|
14417
14417
|
- architecture, deepen modules (user-invoked; offer it): workit-architecture
|
|
14418
14418
|
`.trim();
|
|
14419
14419
|
|
|
14420
|
-
// packages/workit-core/src/core/task-context.ts
|
|
14420
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-context.ts
|
|
14421
14421
|
function reconcileResume(view, observations = []) {
|
|
14422
14422
|
if (observations.length > 0)
|
|
14423
14423
|
return failure2("permission_denied", "worker observations require native host verification");
|
|
@@ -14532,7 +14532,7 @@ var exportDigest = (bundle) => sha256({
|
|
|
14532
14532
|
task: bundle.task
|
|
14533
14533
|
});
|
|
14534
14534
|
|
|
14535
|
-
// packages/workit-core/src/core/task-engine.ts
|
|
14535
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-engine.ts
|
|
14536
14536
|
var workspaceVerification = (root) => {
|
|
14537
14537
|
try {
|
|
14538
14538
|
return resolveAutonomy(root).verification;
|
|
@@ -16117,7 +16117,7 @@ class WorkitCore {
|
|
|
16117
16117
|
return this.summary(changed.data.task);
|
|
16118
16118
|
}
|
|
16119
16119
|
}
|
|
16120
|
-
// packages/workit-core/src/hooks/descriptor.ts
|
|
16120
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/descriptor.ts
|
|
16121
16121
|
var support = (descriptor, axis) => {
|
|
16122
16122
|
if (axis.startsWith("event:"))
|
|
16123
16123
|
return descriptor.events[axis.slice("event:".length)].support;
|
|
@@ -16141,7 +16141,7 @@ var capabilitiesFor = (descriptor, observed = {}) => descriptor.capabilities.map
|
|
|
16141
16141
|
refs: rule.refs.map((handle) => ({ kind: "host", host: descriptor.host, handle }))
|
|
16142
16142
|
};
|
|
16143
16143
|
});
|
|
16144
|
-
// packages/workit-core/src/hooks/context.ts
|
|
16144
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/context.ts
|
|
16145
16145
|
import path15 from "node:path";
|
|
16146
16146
|
var MIGRATION_PENDING_NOTE = "workit migration pending — run `workit task status`";
|
|
16147
16147
|
var migrationPending = (result) => !result.ok && result.code === "needs_input" && (result.error ?? "").startsWith(MIGRATION_PENDING);
|
|
@@ -16289,10 +16289,10 @@ var turnContextText = (input, descriptor) => {
|
|
|
16289
16289
|
return null;
|
|
16290
16290
|
}
|
|
16291
16291
|
};
|
|
16292
|
-
// packages/workit-core/src/core/branch.ts
|
|
16292
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/branch.ts
|
|
16293
16293
|
import { createHash as createHash9 } from "node:crypto";
|
|
16294
16294
|
|
|
16295
|
-
// packages/workit-core/src/core/release-tracks.ts
|
|
16295
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/release-tracks.ts
|
|
16296
16296
|
class ReleaseTrackError extends Error {
|
|
16297
16297
|
}
|
|
16298
16298
|
var KNOWN_FIELDS = new Set([
|
|
@@ -16431,7 +16431,7 @@ function workspaceReleaseTracks(cwd) {
|
|
|
16431
16431
|
}
|
|
16432
16432
|
var memo3 = new Map;
|
|
16433
16433
|
|
|
16434
|
-
// packages/workit-core/src/core/branch.ts
|
|
16434
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/branch.ts
|
|
16435
16435
|
var withReleaseTracks = (workspaceRoot, policy) => {
|
|
16436
16436
|
const read = workspaceReleaseTracks(workspaceRoot);
|
|
16437
16437
|
if (read.error)
|
|
@@ -16524,7 +16524,7 @@ var validateBranchNameFor = (workspaceRoot, name) => {
|
|
|
16524
16524
|
}
|
|
16525
16525
|
};
|
|
16526
16526
|
|
|
16527
|
-
// packages/workit-core/src/core/route-intent.ts
|
|
16527
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/route-intent.ts
|
|
16528
16528
|
var shellBranchTarget = (command) => {
|
|
16529
16529
|
if (!command.trim() || /[\r\n;&|<>`'"$()\\*?{}~!#]/u.test(command) || command.includes("[") || command.includes("]"))
|
|
16530
16530
|
return null;
|
|
@@ -16540,12 +16540,12 @@ var shellBranchPolicyViolation = (root, command) => {
|
|
|
16540
16540
|
return target === null ? null : validateBranchNameFor(root, target);
|
|
16541
16541
|
};
|
|
16542
16542
|
|
|
16543
|
-
// packages/workit-core/src/hooks/policy.ts
|
|
16543
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/policy.ts
|
|
16544
16544
|
var shellPolicy = (cwd, command) => {
|
|
16545
16545
|
const policy = shellBranchPolicyViolation(cwd, command);
|
|
16546
16546
|
return policy && !policy.ok ? { kind: "deny", reason: `branch_policy_denied: ${policy.error}`, unblock: null } : { kind: "none" };
|
|
16547
16547
|
};
|
|
16548
|
-
// packages/workit-core/src/hooks/write-gate.ts
|
|
16548
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/write-gate.ts
|
|
16549
16549
|
import { realpathSync as realpathSync5 } from "node:fs";
|
|
16550
16550
|
import path16 from "node:path";
|
|
16551
16551
|
var NONE2 = { kind: "none" };
|
|
@@ -16806,7 +16806,7 @@ function writeGate(cwd, paths) {
|
|
|
16806
16806
|
return NONE2;
|
|
16807
16807
|
}
|
|
16808
16808
|
}
|
|
16809
|
-
// packages/workit-core/src/hooks/hosts/fields.ts
|
|
16809
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/fields.ts
|
|
16810
16810
|
import { existsSync as existsSync6, realpathSync as realpathSync6, statSync as statSync2 } from "node:fs";
|
|
16811
16811
|
import path17 from "node:path";
|
|
16812
16812
|
var isRecord4 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
@@ -16874,7 +16874,7 @@ var writePaths = (input) => {
|
|
|
16874
16874
|
paths.push(match[1].trim());
|
|
16875
16875
|
return [...new Set(paths)];
|
|
16876
16876
|
};
|
|
16877
|
-
// packages/workit-core/src/hooks/handle.ts
|
|
16877
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/handle.ts
|
|
16878
16878
|
var usable2 = (value) => value === "native" || value === "partial";
|
|
16879
16879
|
var NONE3 = { kind: "none" };
|
|
16880
16880
|
var offered = new Set;
|
|
@@ -16970,7 +16970,7 @@ var dispatchHook = (adapter, raw, env = process.env) => {
|
|
|
16970
16970
|
};
|
|
16971
16971
|
}
|
|
16972
16972
|
};
|
|
16973
|
-
// packages/workit-core/src/hooks/hosts/claude-code.ts
|
|
16973
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/claude-code.ts
|
|
16974
16974
|
var CLAUDE_CODE_DESCRIPTOR = {
|
|
16975
16975
|
host: "claude_code",
|
|
16976
16976
|
label: "Claude Code",
|
|
@@ -17213,7 +17213,7 @@ var claudeCodeAdapter = {
|
|
|
17213
17213
|
render
|
|
17214
17214
|
};
|
|
17215
17215
|
|
|
17216
|
-
// packages/workit-core/src/hooks/hosts/codex.ts
|
|
17216
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/codex.ts
|
|
17217
17217
|
function detectCodexSurface(env) {
|
|
17218
17218
|
return env.CODEX_INTERNAL_ORIGINATOR_OVERRIDE === "Codex Desktop" || Boolean(env.CODEX_ELECTRON_RESOURCES_PATH) ? "codex_desktop" : "codex_cli";
|
|
17219
17219
|
}
|
|
@@ -17441,7 +17441,7 @@ var codexAdapter = {
|
|
|
17441
17441
|
addendum: (input) => `<workit-codex-mutations>Codex MCP is read-only: unattested callers cannot mutate. Run workit verbs with the workit CLI on the shell (node_modules/.bin/workit, or npx -y @brainervirus/workit-cli): check, git branch|commit|push, pr, ci, stack, ledger, handoff; task-family mutations take --json${input.session.id ? ` --actor ${input.session.id}` : ""}. A verifier or reviewer records workit ledger verdict under a session the lead assigns (WORKIT_SESSION_ID=<lead>-v<n>), never the author's. Merge and release need a workspace grant (workit grant show); a question answer is not host permission.</workit-codex-mutations>`
|
|
17442
17442
|
};
|
|
17443
17443
|
|
|
17444
|
-
// packages/workit-core/src/hooks/hosts/cursor.ts
|
|
17444
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/cursor.ts
|
|
17445
17445
|
import path18 from "node:path";
|
|
17446
17446
|
var undocumented2 = { support: "undocumented", native: null };
|
|
17447
17447
|
var none = { support: "none", native: null };
|
|
@@ -17685,7 +17685,7 @@ var cursorAdapter = {
|
|
|
17685
17685
|
render: render3
|
|
17686
17686
|
};
|
|
17687
17687
|
|
|
17688
|
-
// packages/workit-core/src/hooks/run.ts
|
|
17688
|
+
// packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/run.ts
|
|
17689
17689
|
var HOOK_ADAPTERS = {
|
|
17690
17690
|
claude_code: claudeCodeAdapter,
|
|
17691
17691
|
codex_cli: codexAdapter,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brainervirus/workit-cursor",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Workit Cursor plugin — shared MCP transport, native hooks, and sixteen method skills",
|
|
6
6
|
"keywords": [
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"build": "bun scripts/build.ts"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@brainervirus/workit-core": "^
|
|
48
|
-
"@brainervirus/workit-mcp": "^
|
|
47
|
+
"@brainervirus/workit-core": "^8.0.0",
|
|
48
|
+
"@brainervirus/workit-mcp": "^8.0.0"
|
|
49
49
|
},
|
|
50
50
|
"engines": {
|
|
51
51
|
"node": ">=24"
|
|
@@ -51,8 +51,8 @@ the base keeps moving, or after 3 failed fix attempts on the same check.
|
|
|
51
51
|
flake|infra` per head. Real: reproduce with `workit check`, fix the root
|
|
52
52
|
cause, batch fixes into one push.
|
|
53
53
|
6. **Verified.** After the last push a non-author records a verdict
|
|
54
|
-
(read the `workit-review` skill's SKILL.md and follow it). Land only when granted: `workit stack land` (
|
|
55
|
-
|
|
54
|
+
(read the `workit-review` skill's SKILL.md and follow it). Land only when granted: `workit stack land` (verified run
|
|
55
|
+
from the root) or `workit pr merge`; `--unverified --reason` only if user-asked.
|
|
56
56
|
7. **Observe it landed:** `workit verify-delivery pr` or `merge`. After a failed
|
|
57
57
|
verdict or a check red 3+ times, at any endpoint: offer `/wk-retro` in one
|
|
58
58
|
line of the final or stop report; never pause the babysit loop for it.
|