@brainervirus/workit-cursor 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/.cursor-plugin/plugin.json +1 -1
- package/dist/cursor-session-start.js +63 -57
- package/dist/mcp-server.js +80 -74
- package/dist/workit-hook.js +64 -58
- package/package.json +3 -3
|
@@ -7622,7 +7622,7 @@ var init_zod = __esm(() => {
|
|
|
7622
7622
|
init_external();
|
|
7623
7623
|
});
|
|
7624
7624
|
|
|
7625
|
-
// packages/workit-
|
|
7625
|
+
// packages/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-
|
|
8463
|
+
// packages/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-
|
|
8613
|
+
// packages/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-
|
|
8889
|
+
// packages/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";
|
|
@@ -9056,7 +9056,7 @@ function authorSessions(cwd, rows, branch, range = { base: null, head: null }) {
|
|
|
9056
9056
|
sessions.add(session);
|
|
9057
9057
|
return sessions;
|
|
9058
9058
|
}
|
|
9059
|
-
function effectiveOf(rows, authors) {
|
|
9059
|
+
function effectiveOf(rows, authors, sameCode) {
|
|
9060
9060
|
let effective = null;
|
|
9061
9061
|
for (const row of rows) {
|
|
9062
9062
|
if (!effective) {
|
|
@@ -9067,7 +9067,7 @@ function effectiveOf(rows, authors) {
|
|
|
9067
9067
|
const effIndependent = independenceReasons(effective, authors).length === 0;
|
|
9068
9068
|
if (effIndependent && !rowIndependent)
|
|
9069
9069
|
continue;
|
|
9070
|
-
if (effIndependent && FAILING.has(String(effective.result)) && row.actor.session === effective.actor.session)
|
|
9070
|
+
if (effIndependent && FAILING.has(String(effective.result)) && row.actor.session === effective.actor.session && sameCode(effective, row))
|
|
9071
9071
|
continue;
|
|
9072
9072
|
effective = row;
|
|
9073
9073
|
}
|
|
@@ -9098,16 +9098,22 @@ function checkVerdicts(cwd, branch, rows) {
|
|
|
9098
9098
|
const head = branchHead(cwd, branch);
|
|
9099
9099
|
const fallbackBase = defaultBase(cwd);
|
|
9100
9100
|
const keyCache = new Map;
|
|
9101
|
-
const
|
|
9102
|
-
if (!base || !
|
|
9101
|
+
const keysAt = (base, at) => {
|
|
9102
|
+
if (!base || !at)
|
|
9103
9103
|
return { patchId: null, diffHash: null };
|
|
9104
|
-
|
|
9104
|
+
const cacheKey = `${base}\x00${at}`;
|
|
9105
|
+
let key = keyCache.get(cacheKey);
|
|
9105
9106
|
if (!key) {
|
|
9106
|
-
key = { patchId: patchId(cwd, base,
|
|
9107
|
-
keyCache.set(
|
|
9107
|
+
key = { patchId: patchId(cwd, base, at), diffHash: diffHash(cwd, base, at) };
|
|
9108
|
+
keyCache.set(cacheKey, key);
|
|
9108
9109
|
}
|
|
9109
9110
|
return key;
|
|
9110
9111
|
};
|
|
9112
|
+
const keyFor = (base) => keysAt(base, head);
|
|
9113
|
+
const sameCode = (failed, row) => verdictBasis(failed, {
|
|
9114
|
+
head: row.head,
|
|
9115
|
+
...keysAt(failed.base ?? fallbackBase, row.head)
|
|
9116
|
+
}) !== "stale" || restackCarries(rows, branch, failed.head, row.head);
|
|
9111
9117
|
const authors = authorSessions(cwd, rows, branch, { base: fallbackBase, head });
|
|
9112
9118
|
const byKind = new Map;
|
|
9113
9119
|
for (const row of rows)
|
|
@@ -9117,7 +9123,7 @@ function checkVerdicts(cwd, branch, rows) {
|
|
|
9117
9123
|
}
|
|
9118
9124
|
const verdicts = [];
|
|
9119
9125
|
for (const [kind, list] of byKind) {
|
|
9120
|
-
const row = effectiveOf(list, authors);
|
|
9126
|
+
const row = effectiveOf(list, authors, sameCode);
|
|
9121
9127
|
if (!row)
|
|
9122
9128
|
continue;
|
|
9123
9129
|
let basis = verdictBasis(row, { head, ...keyFor(row.base ?? fallbackBase) });
|
|
@@ -9143,11 +9149,11 @@ function checkVerdicts(cwd, branch, rows) {
|
|
|
9143
9149
|
verdicts.sort((a, b) => a.verdict.seq - b.verdict.seq);
|
|
9144
9150
|
const newestCurrent = verdicts.findLast((entry) => entry.current) ?? verdicts.at(-1) ?? null;
|
|
9145
9151
|
const failing = verdicts.find((entry) => entry.current && entry.independent && FAILING.has(String(entry.verdict.result)));
|
|
9146
|
-
const newestAccepted = verdicts.findLast((entry) => entry.accepted) ?? null;
|
|
9152
|
+
const newestAccepted = verdicts.findLast((entry) => entry.accepted && STRONG_RESULTS.has(String(entry.verdict.result))) ?? null;
|
|
9147
9153
|
const accepted = newestAccepted && !failing ? { accepted: true, verdict: newestAccepted.verdict, reasons: [] } : {
|
|
9148
9154
|
accepted: false,
|
|
9149
9155
|
verdict: failing?.verdict ?? null,
|
|
9150
|
-
reasons: failing ? ["failing_verdict"] : newestCurrent
|
|
9156
|
+
reasons: failing ? ["failing_verdict"] : !newestCurrent ? ["no_verdict"] : newestCurrent.reasons.length ? newestCurrent.reasons : ["type_check_only"]
|
|
9151
9157
|
};
|
|
9152
9158
|
const selfEntry = failing ? undefined : verdicts.findLast((entry) => entry.current && !entry.independent && STRONG_RESULTS.has(String(entry.verdict.result)));
|
|
9153
9159
|
return {
|
|
@@ -9229,10 +9235,10 @@ var init_ledger = __esm(() => {
|
|
|
9229
9235
|
1196443219,
|
|
9230
9236
|
198183888
|
|
9231
9237
|
]);
|
|
9232
|
-
OBSERVED_ONLY = new Set(["check", ...PR_ROW_TYPES]);
|
|
9238
|
+
OBSERVED_ONLY = new Set(["check", "merge.unverified", ...PR_ROW_TYPES]);
|
|
9233
9239
|
});
|
|
9234
9240
|
|
|
9235
|
-
// packages/workit-
|
|
9241
|
+
// packages/workit-core/src/core/policy/derive.ts
|
|
9236
9242
|
import { existsSync } from "node:fs";
|
|
9237
9243
|
import path4 from "node:path";
|
|
9238
9244
|
function deriveRequirements(judgment, scope, constraints, verification = "self") {
|
|
@@ -9431,7 +9437,7 @@ var init_derive = __esm(() => {
|
|
|
9431
9437
|
};
|
|
9432
9438
|
});
|
|
9433
9439
|
|
|
9434
|
-
// packages/workit-
|
|
9440
|
+
// packages/workit-core/src/core/policy-resolver.ts
|
|
9435
9441
|
function resolvePolicy(input) {
|
|
9436
9442
|
const ids = input.constraints.map((constraint) => constraint.id);
|
|
9437
9443
|
if (new Set(ids).size !== ids.length)
|
|
@@ -9491,7 +9497,7 @@ var init_policy_resolver = __esm(() => {
|
|
|
9491
9497
|
init_derive();
|
|
9492
9498
|
});
|
|
9493
9499
|
|
|
9494
|
-
// packages/workit-
|
|
9500
|
+
// packages/workit-core/src/core/operation-input.ts
|
|
9495
9501
|
function normalizeOperationInput(family, input, host) {
|
|
9496
9502
|
if (!isObject2(input))
|
|
9497
9503
|
return input;
|
|
@@ -9828,7 +9834,7 @@ var init_operation_input = __esm(() => {
|
|
|
9828
9834
|
]);
|
|
9829
9835
|
});
|
|
9830
9836
|
|
|
9831
|
-
// packages/workit-
|
|
9837
|
+
// packages/workit-core/src/core/policy/judgment.ts
|
|
9832
9838
|
function normalizeJudgment(raw, previous) {
|
|
9833
9839
|
const input = isObject3(raw) ? raw : {};
|
|
9834
9840
|
const legacy = Object.keys(input).some((key) => LEGACY_KEYS.has(key));
|
|
@@ -9953,7 +9959,7 @@ var init_judgment = __esm(() => {
|
|
|
9953
9959
|
};
|
|
9954
9960
|
});
|
|
9955
9961
|
|
|
9956
|
-
// packages/workit-
|
|
9962
|
+
// packages/workit-core/src/core/boundary.ts
|
|
9957
9963
|
var EVENT, errorDetail = (err) => {
|
|
9958
9964
|
if (err instanceof Error) {
|
|
9959
9965
|
return { error_name: err.name, error: err.message };
|
|
@@ -9976,7 +9982,7 @@ var init_boundary = __esm(() => {
|
|
|
9976
9982
|
};
|
|
9977
9983
|
});
|
|
9978
9984
|
|
|
9979
|
-
// packages/workit-
|
|
9985
|
+
// packages/workit-core/src/core/config.ts
|
|
9980
9986
|
import {
|
|
9981
9987
|
copyFileSync,
|
|
9982
9988
|
cpSync,
|
|
@@ -10138,10 +10144,10 @@ var init_config = __esm(() => {
|
|
|
10138
10144
|
];
|
|
10139
10145
|
});
|
|
10140
10146
|
|
|
10141
|
-
// packages/workit-
|
|
10147
|
+
// packages/workit-core/src/core/safe-write.ts
|
|
10142
10148
|
var init_safe_write = () => {};
|
|
10143
10149
|
|
|
10144
|
-
// packages/workit-
|
|
10150
|
+
// packages/workit-core/src/core/workspaces.ts
|
|
10145
10151
|
import { createHash as createHash5 } from "node:crypto";
|
|
10146
10152
|
import { readFileSync as readFileSync2, realpathSync } from "node:fs";
|
|
10147
10153
|
import path6 from "node:path";
|
|
@@ -10529,7 +10535,7 @@ var init_workspaces = __esm(() => {
|
|
|
10529
10535
|
}).passthrough();
|
|
10530
10536
|
});
|
|
10531
10537
|
|
|
10532
|
-
// packages/workit-
|
|
10538
|
+
// packages/workit-core/src/autonomy.ts
|
|
10533
10539
|
import os3 from "node:os";
|
|
10534
10540
|
import path7 from "node:path";
|
|
10535
10541
|
function endpointOf(entry) {
|
|
@@ -11286,7 +11292,7 @@ var init_file_lock = __esm(() => {
|
|
|
11286
11292
|
init_file_lock_sync();
|
|
11287
11293
|
});
|
|
11288
11294
|
|
|
11289
|
-
// packages/workit-
|
|
11295
|
+
// packages/workit-core/src/core/package-root.ts
|
|
11290
11296
|
import { existsSync as existsSync3 } from "node:fs";
|
|
11291
11297
|
import path10 from "node:path";
|
|
11292
11298
|
import { fileURLToPath } from "node:url";
|
|
@@ -11301,7 +11307,7 @@ var packageRoot = () => {
|
|
|
11301
11307
|
};
|
|
11302
11308
|
var init_package_root = () => {};
|
|
11303
11309
|
|
|
11304
|
-
// packages/workit-
|
|
11310
|
+
// packages/workit-core/src/core/store-lock.ts
|
|
11305
11311
|
import { spawnSync as spawnSync4 } from "node:child_process";
|
|
11306
11312
|
import fs7 from "node:fs";
|
|
11307
11313
|
import { hostname } from "node:os";
|
|
@@ -11426,7 +11432,7 @@ var init_store_lock = __esm(() => {
|
|
|
11426
11432
|
FOREIGN_LOCK_TTL_MS = 10 * 60000;
|
|
11427
11433
|
});
|
|
11428
11434
|
|
|
11429
|
-
// packages/workit-
|
|
11435
|
+
// packages/workit-core/src/store/event-log.ts
|
|
11430
11436
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
11431
11437
|
import fs8 from "node:fs";
|
|
11432
11438
|
import path11 from "node:path";
|
|
@@ -11581,7 +11587,7 @@ var init_event_log = __esm(() => {
|
|
|
11581
11587
|
TRANSIENT_WINDOWS_CODES = new Set(["EPERM", "EACCES", "EBUSY"]);
|
|
11582
11588
|
});
|
|
11583
11589
|
|
|
11584
|
-
// packages/workit-
|
|
11590
|
+
// packages/workit-core/src/store/patch.ts
|
|
11585
11591
|
function diff(before, after, path = []) {
|
|
11586
11592
|
if (equal(before, after))
|
|
11587
11593
|
return [];
|
|
@@ -11687,7 +11693,7 @@ var isPlainObject2 = (value) => typeof value === "object" && value !== null && !
|
|
|
11687
11693
|
return false;
|
|
11688
11694
|
});
|
|
11689
11695
|
|
|
11690
|
-
// packages/workit-
|
|
11696
|
+
// packages/workit-core/src/store/reduce.ts
|
|
11691
11697
|
import { createHash as createHash6 } from "node:crypto";
|
|
11692
11698
|
function reduce(state, event, blobs) {
|
|
11693
11699
|
const data = event.data;
|
|
@@ -11813,7 +11819,7 @@ var init_reduce = __esm(() => {
|
|
|
11813
11819
|
]);
|
|
11814
11820
|
});
|
|
11815
11821
|
|
|
11816
|
-
// packages/workit-
|
|
11822
|
+
// packages/workit-core/src/store/notes.ts
|
|
11817
11823
|
var SLOT, reportMigration = (report) => {
|
|
11818
11824
|
try {
|
|
11819
11825
|
const reporter = globalThis[SLOT];
|
|
@@ -11825,7 +11831,7 @@ var init_notes = __esm(() => {
|
|
|
11825
11831
|
SLOT = Symbol.for("workit.migrationReporter");
|
|
11826
11832
|
});
|
|
11827
11833
|
|
|
11828
|
-
// packages/workit-
|
|
11834
|
+
// packages/workit-core/src/core/task-store.ts
|
|
11829
11835
|
import { createHash as createHash7, randomUUID as randomUUID3 } from "node:crypto";
|
|
11830
11836
|
import * as fs9 from "node:fs";
|
|
11831
11837
|
import path12 from "node:path";
|
|
@@ -13452,13 +13458,13 @@ var init_task_store = __esm(() => {
|
|
|
13452
13458
|
heldInProcess = new Map;
|
|
13453
13459
|
});
|
|
13454
13460
|
|
|
13455
|
-
// packages/workit-
|
|
13461
|
+
// packages/workit-core/src/core/workers.ts
|
|
13456
13462
|
var UNCERTAIN_WORKER_STATES, isUncertainWorker = (state) => UNCERTAIN_WORKER_STATES.includes(state), workerBlocksTransition = (transition, state) => transition === "pause" ? false : isUncertainWorker(state);
|
|
13457
13463
|
var init_workers = __esm(() => {
|
|
13458
13464
|
UNCERTAIN_WORKER_STATES = ["dispatching", "running", "cancelling", "unknown"];
|
|
13459
13465
|
});
|
|
13460
13466
|
|
|
13461
|
-
// packages/workit-
|
|
13467
|
+
// packages/workit-core/src/check-config.ts
|
|
13462
13468
|
import { spawnSync as spawnSync5 } from "node:child_process";
|
|
13463
13469
|
import fs10 from "node:fs";
|
|
13464
13470
|
import path13 from "node:path";
|
|
@@ -13659,7 +13665,7 @@ var init_check_config = __esm(() => {
|
|
|
13659
13665
|
GATES = ["testing", "verification"];
|
|
13660
13666
|
});
|
|
13661
13667
|
|
|
13662
|
-
// packages/workit-
|
|
13668
|
+
// packages/workit-core/src/core/task-evaluation.ts
|
|
13663
13669
|
import { createHash as createHash8 } from "node:crypto";
|
|
13664
13670
|
import * as fs11 from "node:fs";
|
|
13665
13671
|
import { spawnSync as spawnSync6 } from "node:child_process";
|
|
@@ -14307,7 +14313,7 @@ var init_task_evaluation = __esm(() => {
|
|
|
14307
14313
|
scopeCovers2 = scopeCovers;
|
|
14308
14314
|
});
|
|
14309
14315
|
|
|
14310
|
-
// packages/workit-
|
|
14316
|
+
// packages/workit-core/src/core/methods.ts
|
|
14311
14317
|
function selectMethods(policy, capabilities) {
|
|
14312
14318
|
return Object.entries(METHODS).flatMap(([id, definition]) => {
|
|
14313
14319
|
const requirements = policy.requirements.filter((requirement) => methodMatches(definition, requirement));
|
|
@@ -14415,7 +14421,7 @@ var init_methods = __esm(() => {
|
|
|
14415
14421
|
};
|
|
14416
14422
|
});
|
|
14417
14423
|
|
|
14418
|
-
// packages/workit-
|
|
14424
|
+
// packages/workit-core/src/core/task-context.ts
|
|
14419
14425
|
function reconcileResume(view, observations = []) {
|
|
14420
14426
|
if (observations.length > 0)
|
|
14421
14427
|
return failure2("permission_denied", "worker observations require native host verification");
|
|
@@ -14528,7 +14534,7 @@ var init_task_context = __esm(() => {
|
|
|
14528
14534
|
privateKey = /-----BEGIN [^-]*PRIVATE KEY-----[\s\S]*?-----END [^-]*PRIVATE KEY-----/gi;
|
|
14529
14535
|
});
|
|
14530
14536
|
|
|
14531
|
-
// packages/workit-
|
|
14537
|
+
// packages/workit-core/src/core/task-engine.ts
|
|
14532
14538
|
import { realpathSync as realpathSync4 } from "node:fs";
|
|
14533
14539
|
|
|
14534
14540
|
class WorkitCore {
|
|
@@ -16110,10 +16116,10 @@ var init_task_engine = __esm(() => {
|
|
|
16110
16116
|
retryPause = new Int32Array(new SharedArrayBuffer(4));
|
|
16111
16117
|
});
|
|
16112
16118
|
|
|
16113
|
-
// packages/workit-
|
|
16119
|
+
// packages/workit-core/src/hooks/protocol.ts
|
|
16114
16120
|
var init_protocol = () => {};
|
|
16115
16121
|
|
|
16116
|
-
// packages/workit-
|
|
16122
|
+
// packages/workit-core/src/hooks/descriptor.ts
|
|
16117
16123
|
var support = (descriptor, axis) => {
|
|
16118
16124
|
if (axis.startsWith("event:"))
|
|
16119
16125
|
return descriptor.events[axis.slice("event:".length)].support;
|
|
@@ -16136,7 +16142,7 @@ var support = (descriptor, axis) => {
|
|
|
16136
16142
|
};
|
|
16137
16143
|
});
|
|
16138
16144
|
|
|
16139
|
-
// packages/workit-
|
|
16145
|
+
// packages/workit-core/src/hooks/context.ts
|
|
16140
16146
|
import path15 from "node:path";
|
|
16141
16147
|
function sessionCompactContext(store, session, context, selection = "session-bound") {
|
|
16142
16148
|
const listed = store.listTaskIndex();
|
|
@@ -16277,13 +16283,13 @@ var init_context = __esm(() => {
|
|
|
16277
16283
|
cache = new Map;
|
|
16278
16284
|
});
|
|
16279
16285
|
|
|
16280
|
-
// packages/workit-
|
|
16286
|
+
// packages/workit-core/src/core/commit-flavors.ts
|
|
16281
16287
|
var init_commit_flavors = () => {};
|
|
16282
16288
|
|
|
16283
|
-
// packages/workit-
|
|
16289
|
+
// packages/workit-core/src/core/git.ts
|
|
16284
16290
|
var init_git = () => {};
|
|
16285
16291
|
|
|
16286
|
-
// packages/workit-
|
|
16292
|
+
// packages/workit-core/src/core/release-tracks.ts
|
|
16287
16293
|
function readReleaseTracks(raw) {
|
|
16288
16294
|
const out = { tracks: [], issues: [], error: null, protectedBranches: [] };
|
|
16289
16295
|
if (raw === undefined || raw === null)
|
|
@@ -16422,14 +16428,14 @@ var init_release_tracks = __esm(() => {
|
|
|
16422
16428
|
memo3 = new Map;
|
|
16423
16429
|
});
|
|
16424
16430
|
|
|
16425
|
-
// packages/workit-
|
|
16431
|
+
// packages/workit-core/src/core/vcs-config.ts
|
|
16426
16432
|
var init_vcs_config = __esm(() => {
|
|
16427
16433
|
init_config();
|
|
16428
16434
|
init_workspaces();
|
|
16429
16435
|
init_release_tracks();
|
|
16430
16436
|
});
|
|
16431
16437
|
|
|
16432
|
-
// packages/workit-
|
|
16438
|
+
// packages/workit-core/src/core/branch.ts
|
|
16433
16439
|
import { createHash as createHash9 } from "node:crypto";
|
|
16434
16440
|
function effectiveWorkspacePolicy(workspaceRoot, kind, profileName) {
|
|
16435
16441
|
const selected = resolveRuntimeWorkspacePolicy(workspaceRoot, kind, profileName?.trim() || process.env.WORKFLOW_PROFILE?.trim() || undefined);
|
|
@@ -16528,7 +16534,7 @@ var init_branch = __esm(() => {
|
|
|
16528
16534
|
init_release_tracks();
|
|
16529
16535
|
});
|
|
16530
16536
|
|
|
16531
|
-
// packages/workit-
|
|
16537
|
+
// packages/workit-core/src/core/route-intent.ts
|
|
16532
16538
|
var shellBranchTarget = (command) => {
|
|
16533
16539
|
if (!command.trim() || /[\r\n;&|<>`'"$()\\*?{}~!#]/u.test(command) || command.includes("[") || command.includes("]"))
|
|
16534
16540
|
return null;
|
|
@@ -16546,7 +16552,7 @@ var init_route_intent = __esm(() => {
|
|
|
16546
16552
|
init_branch();
|
|
16547
16553
|
});
|
|
16548
16554
|
|
|
16549
|
-
// packages/workit-
|
|
16555
|
+
// packages/workit-core/src/hooks/policy.ts
|
|
16550
16556
|
var shellPolicy = (cwd, command) => {
|
|
16551
16557
|
const policy = shellBranchPolicyViolation(cwd, command);
|
|
16552
16558
|
return policy && !policy.ok ? { kind: "deny", reason: `branch_policy_denied: ${policy.error}`, unblock: null } : { kind: "none" };
|
|
@@ -16555,7 +16561,7 @@ var init_policy = __esm(() => {
|
|
|
16555
16561
|
init_route_intent();
|
|
16556
16562
|
});
|
|
16557
16563
|
|
|
16558
|
-
// packages/workit-
|
|
16564
|
+
// packages/workit-core/src/hooks/write-gate.ts
|
|
16559
16565
|
import { realpathSync as realpathSync5 } from "node:fs";
|
|
16560
16566
|
import path16 from "node:path";
|
|
16561
16567
|
function writeGate(cwd, paths) {
|
|
@@ -16816,7 +16822,7 @@ var init_write_gate = __esm(() => {
|
|
|
16816
16822
|
cache2 = new Map;
|
|
16817
16823
|
});
|
|
16818
16824
|
|
|
16819
|
-
// packages/workit-
|
|
16825
|
+
// packages/workit-core/src/hooks/hosts/fields.ts
|
|
16820
16826
|
import { existsSync as existsSync6, realpathSync as realpathSync6, statSync as statSync2 } from "node:fs";
|
|
16821
16827
|
import path17 from "node:path";
|
|
16822
16828
|
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 +16886,7 @@ var init_fields = __esm(() => {
|
|
|
16880
16886
|
PATH_KEYS = ["file_path", "filePath", "notebook_path", "path", "target_file", "file"];
|
|
16881
16887
|
});
|
|
16882
16888
|
|
|
16883
|
-
// packages/workit-
|
|
16889
|
+
// packages/workit-core/src/hooks/handle.ts
|
|
16884
16890
|
function handleHook(input, deps) {
|
|
16885
16891
|
const { descriptor } = deps;
|
|
16886
16892
|
const event = input.event;
|
|
@@ -16977,7 +16983,7 @@ var init_handle = __esm(() => {
|
|
|
16977
16983
|
CLAUDE_JUDGES = new Set(["workit:verifier", "workit:reviewer"]);
|
|
16978
16984
|
});
|
|
16979
16985
|
|
|
16980
|
-
// packages/workit-
|
|
16986
|
+
// packages/workit-core/src/hooks/hosts/claude-code.ts
|
|
16981
16987
|
var CLAUDE_CODE_DESCRIPTOR, EVENTS, SOURCES, SHELL_TOOLS, toolCommand = (value) => isRecord4(value.tool_input) ? commandText(value.tool_input.command) : null, eventOf = (name, value) => {
|
|
16982
16988
|
const toolUseId = optionalText(value.tool_use_id);
|
|
16983
16989
|
switch (name) {
|
|
@@ -17221,7 +17227,7 @@ var init_claude_code = __esm(() => {
|
|
|
17221
17227
|
};
|
|
17222
17228
|
});
|
|
17223
17229
|
|
|
17224
|
-
// packages/workit-
|
|
17230
|
+
// packages/workit-core/src/hooks/hosts/codex.ts
|
|
17225
17231
|
function detectCodexSurface(env) {
|
|
17226
17232
|
return env.CODEX_INTERNAL_ORIGINATOR_OVERRIDE === "Codex Desktop" || Boolean(env.CODEX_ELECTRON_RESOURCES_PATH) ? "codex_desktop" : "codex_cli";
|
|
17227
17233
|
}
|
|
@@ -17448,7 +17454,7 @@ var init_codex = __esm(() => {
|
|
|
17448
17454
|
};
|
|
17449
17455
|
});
|
|
17450
17456
|
|
|
17451
|
-
// packages/workit-
|
|
17457
|
+
// packages/workit-core/src/hooks/hosts/cursor.ts
|
|
17452
17458
|
import path18 from "node:path";
|
|
17453
17459
|
var undocumented2, none, CURSOR_DESCRIPTOR, EVENTS3, parseCursorHookInput = (value) => {
|
|
17454
17460
|
if (!isRecord4(value) || !Object.hasOwn(EVENTS3, String(value.hook_event_name)))
|
|
@@ -17689,7 +17695,7 @@ var init_cursor = __esm(() => {
|
|
|
17689
17695
|
};
|
|
17690
17696
|
});
|
|
17691
17697
|
|
|
17692
|
-
// packages/workit-
|
|
17698
|
+
// packages/workit-core/src/hooks/run.ts
|
|
17693
17699
|
async function runHookProcess(host, stdin, stdout, stderr = process.stderr, env = process.env) {
|
|
17694
17700
|
const adapter = typeof host === "string" ? HOOK_ADAPTERS[host] : host;
|
|
17695
17701
|
let text = "";
|
|
@@ -17724,13 +17730,13 @@ var init_run = __esm(async () => {
|
|
|
17724
17730
|
if (false) {}
|
|
17725
17731
|
});
|
|
17726
17732
|
|
|
17727
|
-
// packages/workit-
|
|
17733
|
+
// packages/workit-core/src/hooks/hosts/opencode.ts
|
|
17728
17734
|
var init_opencode = () => {};
|
|
17729
17735
|
|
|
17730
|
-
// packages/workit-
|
|
17736
|
+
// packages/workit-core/src/hooks/hosts/pi.ts
|
|
17731
17737
|
var init_pi = () => {};
|
|
17732
17738
|
|
|
17733
|
-
// packages/workit-
|
|
17739
|
+
// packages/workit-core/src/hooks/index.ts
|
|
17734
17740
|
var init_hooks = __esm(async () => {
|
|
17735
17741
|
init_context();
|
|
17736
17742
|
init_policy();
|