@brainervirus/workit-cursor 8.1.0 → 8.3.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 +865 -125
- package/dist/mcp-server.js +161 -53
- package/dist/workit-hook.js +869 -99
- package/package.json +3 -3
- package/skills/workit-ship/SKILL.md +14 -14
package/dist/mcp-server.js
CHANGED
|
@@ -16576,7 +16576,7 @@ class StdioServerTransport {
|
|
|
16576
16576
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
16577
16577
|
|
|
16578
16578
|
// packages/workit-core/src/core.ts
|
|
16579
|
-
import { spawnSync as
|
|
16579
|
+
import { spawnSync as spawnSync14 } 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
|
|
|
@@ -18438,6 +18438,35 @@ function acquireFileLockSync(targetPath, options) {
|
|
|
18438
18438
|
}
|
|
18439
18439
|
}
|
|
18440
18440
|
}
|
|
18441
|
+
// packages/workit-core/src/host-session.ts
|
|
18442
|
+
var HOST_SESSION_VARS = [
|
|
18443
|
+
["OPENCODE_SESSION_ID", () => "opencode"],
|
|
18444
|
+
["PI_SESSION_ID", () => "pi"],
|
|
18445
|
+
[
|
|
18446
|
+
"CODEX_THREAD_ID",
|
|
18447
|
+
(env) => env.CODEX_INTERNAL_ORIGINATOR_OVERRIDE === "Codex Desktop" || env.CODEX_ELECTRON_RESOURCES_PATH ? "codex_desktop" : "codex_cli"
|
|
18448
|
+
]
|
|
18449
|
+
];
|
|
18450
|
+
var family = (host) => host?.replace(/_(?:cli|desktop)$/, "") ?? null;
|
|
18451
|
+
function hostSessionFromEnv(env) {
|
|
18452
|
+
const value = (key) => env[key]?.trim() || null;
|
|
18453
|
+
let inner = null;
|
|
18454
|
+
for (const [key, host] of HOST_SESSION_VARS) {
|
|
18455
|
+
const session = value(key);
|
|
18456
|
+
if (session) {
|
|
18457
|
+
inner = { host: host(env), session };
|
|
18458
|
+
break;
|
|
18459
|
+
}
|
|
18460
|
+
}
|
|
18461
|
+
const declared = value("WORKIT_HOST");
|
|
18462
|
+
if (env.WORKIT_SESSION_ID !== undefined) {
|
|
18463
|
+
const inherited = inner !== null && declared !== null && family(declared) !== family(inner.host);
|
|
18464
|
+
if (!inherited)
|
|
18465
|
+
return { host: declared, session: value("WORKIT_SESSION_ID") };
|
|
18466
|
+
}
|
|
18467
|
+
return inner ? { host: inner.host, session: inner.session } : { host: declared, session: null };
|
|
18468
|
+
}
|
|
18469
|
+
|
|
18441
18470
|
// packages/workit-core/src/core/package-root.ts
|
|
18442
18471
|
import { existsSync } from "node:fs";
|
|
18443
18472
|
import path3 from "node:path";
|
|
@@ -19402,9 +19431,10 @@ var drop = (lock) => {
|
|
|
19402
19431
|
};
|
|
19403
19432
|
var envActor = () => {
|
|
19404
19433
|
const value = (key) => process.env[key]?.trim() || null;
|
|
19434
|
+
const acting = hostSessionFromEnv(process.env);
|
|
19405
19435
|
return {
|
|
19406
|
-
host:
|
|
19407
|
-
session:
|
|
19436
|
+
host: acting.host ?? "runtime",
|
|
19437
|
+
session: acting.session,
|
|
19408
19438
|
agentId: value("WORKIT_AGENT_ID")
|
|
19409
19439
|
};
|
|
19410
19440
|
};
|
|
@@ -23034,6 +23064,7 @@ var gitContext = (workspaceRoot, paths = []) => {
|
|
|
23034
23064
|
};
|
|
23035
23065
|
|
|
23036
23066
|
// packages/workit-core/src/core/workspaces.ts
|
|
23067
|
+
import { spawnSync as spawnSync8 } from "node:child_process";
|
|
23037
23068
|
import { createHash as createHash8 } from "node:crypto";
|
|
23038
23069
|
import { readFileSync as readFileSync4, realpathSync as realpathSync3 } from "node:fs";
|
|
23039
23070
|
import path13 from "node:path";
|
|
@@ -23278,6 +23309,53 @@ var validateWorkspaceGlob = (glob) => {
|
|
|
23278
23309
|
}
|
|
23279
23310
|
return { ok: true };
|
|
23280
23311
|
};
|
|
23312
|
+
|
|
23313
|
+
class WorkspaceConfigError extends Error {
|
|
23314
|
+
name = "WorkspaceConfigError";
|
|
23315
|
+
}
|
|
23316
|
+
var mainCheckouts = new Map;
|
|
23317
|
+
var mainCheckoutOf = (cwd) => {
|
|
23318
|
+
const cached = mainCheckouts.get(cwd);
|
|
23319
|
+
if (cached !== undefined)
|
|
23320
|
+
return cached;
|
|
23321
|
+
const env = { ...process.env };
|
|
23322
|
+
for (const name of ["GIT_DIR", "GIT_WORK_TREE", "GIT_COMMON_DIR", "GIT_INDEX_FILE"])
|
|
23323
|
+
delete env[name];
|
|
23324
|
+
const git = (args) => {
|
|
23325
|
+
const run = spawnSync8("git", args, {
|
|
23326
|
+
cwd,
|
|
23327
|
+
env,
|
|
23328
|
+
encoding: "utf8",
|
|
23329
|
+
timeout: 5000,
|
|
23330
|
+
windowsHide: true
|
|
23331
|
+
});
|
|
23332
|
+
return run.status === 0 ? run.stdout : null;
|
|
23333
|
+
};
|
|
23334
|
+
let main = null;
|
|
23335
|
+
const dirs = git(["rev-parse", "--path-format=absolute", "--git-dir", "--git-common-dir"]);
|
|
23336
|
+
const [gitDir, common] = (dirs ?? "").trim().split(/\r?\n/u);
|
|
23337
|
+
if (gitDir && common && path13.resolve(gitDir) !== path13.resolve(common)) {
|
|
23338
|
+
const listed = /^worktree (.+)$/mu.exec(git(["worktree", "list", "--porcelain"]) ?? "")?.[1];
|
|
23339
|
+
main = listed?.trim() || (path13.basename(common) === ".git" ? path13.dirname(common) : common);
|
|
23340
|
+
}
|
|
23341
|
+
mainCheckouts.set(cwd, main);
|
|
23342
|
+
return main;
|
|
23343
|
+
};
|
|
23344
|
+
var matchingEntries = (cwd, entries) => {
|
|
23345
|
+
const match = (where) => {
|
|
23346
|
+
const targets = [where, realpathOf(where)].map((value) => value.replaceAll("\\", "/"));
|
|
23347
|
+
return entries.filter((entry) => {
|
|
23348
|
+
const glob = entry.glob.replaceAll("\\", "/");
|
|
23349
|
+
const canonical = canonicalGlob(glob);
|
|
23350
|
+
return targets.some((target) => matchWorkspace(glob, target) || canonical !== glob && matchWorkspace(canonical, target));
|
|
23351
|
+
});
|
|
23352
|
+
};
|
|
23353
|
+
const direct = match(cwd);
|
|
23354
|
+
if (direct.length)
|
|
23355
|
+
return direct;
|
|
23356
|
+
const main = mainCheckoutOf(cwd);
|
|
23357
|
+
return main ? match(main) : direct;
|
|
23358
|
+
};
|
|
23281
23359
|
var realpathOf = (p) => {
|
|
23282
23360
|
const real = realpathSync3.native ?? realpathSync3;
|
|
23283
23361
|
try {
|
|
@@ -23302,43 +23380,29 @@ var selectWorkspaceMatch = (matches, cwd, workspaceName) => {
|
|
|
23302
23380
|
if (named.length === 1)
|
|
23303
23381
|
return named[0];
|
|
23304
23382
|
if (named.length > 1)
|
|
23305
|
-
throw new
|
|
23383
|
+
throw new WorkspaceConfigError(`ambiguous workspace ${JSON.stringify(workspaceName)} for ${cwd}`);
|
|
23306
23384
|
if (matches.length > 0) {
|
|
23307
|
-
throw new
|
|
23385
|
+
throw new WorkspaceConfigError(`workspace ${JSON.stringify(workspaceName)} does not match ${cwd}; matching choices: ${matches.map((entry) => entry.name).join(", ")}`);
|
|
23308
23386
|
}
|
|
23309
|
-
throw new
|
|
23387
|
+
throw new WorkspaceConfigError(`workspace ${JSON.stringify(workspaceName)} does not match ${cwd}`);
|
|
23310
23388
|
}
|
|
23311
23389
|
if (matches.length < 2)
|
|
23312
23390
|
return matches[0];
|
|
23313
23391
|
const highestSpecificity = Math.max(...matches.map((entry) => globSpecificity(entry.glob)));
|
|
23314
23392
|
const mostSpecific = matches.filter((entry) => globSpecificity(entry.glob) === highestSpecificity);
|
|
23315
23393
|
if (mostSpecific.length > 1) {
|
|
23316
|
-
throw new
|
|
23394
|
+
throw new WorkspaceConfigError(`ambiguous workspace for ${cwd}; choose one of: ${mostSpecific.map((entry) => entry.name).join(", ")}`);
|
|
23317
23395
|
}
|
|
23318
23396
|
return mostSpecific[0];
|
|
23319
23397
|
};
|
|
23320
23398
|
var resolveWorkspaceFromEntries = (cwd, entries, workspaceName) => {
|
|
23321
|
-
const
|
|
23322
|
-
const matches = [];
|
|
23323
|
-
for (const ws of entries) {
|
|
23324
|
-
const glob = ws.glob.replaceAll("\\", "/");
|
|
23325
|
-
const canonical = canonicalGlob(glob);
|
|
23326
|
-
let matched = false;
|
|
23327
|
-
for (const target of targets) {
|
|
23328
|
-
if (matchWorkspace(glob, target) || canonical !== glob && matchWorkspace(canonical, target)) {
|
|
23329
|
-
matched = true;
|
|
23330
|
-
break;
|
|
23331
|
-
}
|
|
23332
|
-
}
|
|
23333
|
-
if (matched)
|
|
23334
|
-
matches.push(ws);
|
|
23335
|
-
}
|
|
23399
|
+
const matches = matchingEntries(cwd, entries);
|
|
23336
23400
|
return selectWorkspaceMatch(matches, cwd, workspaceName) ?? null;
|
|
23337
23401
|
};
|
|
23338
23402
|
var resolveWorkspaceFrom = (cwd, dir, workspaceName) => {
|
|
23339
23403
|
const result = readWorkspacesResult(dir);
|
|
23340
23404
|
if (result.status === "malformed" || result.status === "invalid")
|
|
23341
|
-
throw new
|
|
23405
|
+
throw new WorkspaceConfigError(result.error);
|
|
23342
23406
|
return resolveWorkspaceFromEntries(cwd, result.entries, workspaceName);
|
|
23343
23407
|
};
|
|
23344
23408
|
var runtimeWorkspacePolicySchema = (kind) => {
|
|
@@ -23370,31 +23434,26 @@ var matchRuntimeWorkspace = (cwd) => {
|
|
|
23370
23434
|
} catch (error) {
|
|
23371
23435
|
if (error.code === "ENOENT")
|
|
23372
23436
|
return null;
|
|
23373
|
-
throw new
|
|
23437
|
+
throw new WorkspaceConfigError(`${file} could not be read: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
23374
23438
|
}
|
|
23375
23439
|
let parsed;
|
|
23376
23440
|
try {
|
|
23377
23441
|
parsed = JSON.parse(raw);
|
|
23378
23442
|
} catch {
|
|
23379
|
-
throw new
|
|
23443
|
+
throw new WorkspaceConfigError(`${file} is not valid JSON`);
|
|
23380
23444
|
}
|
|
23381
23445
|
const validated = runtimeWorkspaceIndexSchema.safeParse(parsed);
|
|
23382
23446
|
if (!validated.success) {
|
|
23383
23447
|
const detail = validated.error.issues.map((issue) => `${issue.path.map(String).join(".") || "workspaces"}: ${issue.message}`).join("; ");
|
|
23384
|
-
throw new
|
|
23448
|
+
throw new WorkspaceConfigError(`${file} has invalid workspace matching data: ${detail}`);
|
|
23385
23449
|
}
|
|
23386
23450
|
const entries = validated.data.workspaces;
|
|
23387
23451
|
for (const entry of entries ?? []) {
|
|
23388
23452
|
const glob = validateWorkspaceGlob(entry.glob);
|
|
23389
23453
|
if (!glob.ok)
|
|
23390
|
-
throw new
|
|
23454
|
+
throw new WorkspaceConfigError(`${file} workspace ${entry.name}: ${glob.error}`);
|
|
23391
23455
|
}
|
|
23392
|
-
const
|
|
23393
|
-
const matches = (entries ?? []).filter((entry) => {
|
|
23394
|
-
const glob = entry.glob.replaceAll("\\", "/");
|
|
23395
|
-
const canonical = canonicalGlob(glob);
|
|
23396
|
-
return targets.some((target) => matchWorkspace(glob, target) || canonical !== glob && matchWorkspace(canonical, target));
|
|
23397
|
-
});
|
|
23456
|
+
const matches = matchingEntries(cwd, entries ?? []);
|
|
23398
23457
|
const workspaceName = process.env.WORKFLOW_WORKSPACE_NAME?.trim() || undefined;
|
|
23399
23458
|
const selected = selectWorkspaceMatch(matches, cwd, workspaceName);
|
|
23400
23459
|
return selected ? { file, selected } : null;
|
|
@@ -23411,7 +23470,7 @@ var resolveRuntimeWorkspaceCandidate = (cwd, kind) => {
|
|
|
23411
23470
|
const policy = runtimeWorkspacePolicySchema(kind).safeParse(selected);
|
|
23412
23471
|
if (!policy.success) {
|
|
23413
23472
|
const detail = policy.error.issues.map((issue) => `${issue.path.map(String).join(".") || "workspace"}: ${issue.message}`).join("; ");
|
|
23414
|
-
throw new
|
|
23473
|
+
throw new WorkspaceConfigError(`${file} has invalid ${kind} policy configuration: ${detail}`);
|
|
23415
23474
|
}
|
|
23416
23475
|
return policy.data;
|
|
23417
23476
|
};
|
|
@@ -23422,10 +23481,10 @@ var resolveRuntimeWorkspacePolicy = (cwd, kind, requestedProfile) => {
|
|
|
23422
23481
|
const key = kind === "branch" ? "branchPolicy" : "commitPolicy";
|
|
23423
23482
|
const profileName = requestedProfile?.trim() || candidate.defaultProfile;
|
|
23424
23483
|
if (candidate.defaultProfile && !Object.hasOwn(candidate.profiles ?? {}, candidate.defaultProfile))
|
|
23425
|
-
throw new
|
|
23484
|
+
throw new WorkspaceConfigError(`workspace ${JSON.stringify(candidate.name)} has no profile ${JSON.stringify(candidate.defaultProfile)}`);
|
|
23426
23485
|
const profile = profileName ? candidate.profiles?.[profileName] : undefined;
|
|
23427
23486
|
if (profileName && !profile)
|
|
23428
|
-
throw new
|
|
23487
|
+
throw new WorkspaceConfigError(`workspace ${JSON.stringify(candidate.name)} has no profile ${JSON.stringify(profileName)}`);
|
|
23429
23488
|
const profilePolicy = profile?.[key];
|
|
23430
23489
|
const workspacePolicy = candidate[key];
|
|
23431
23490
|
return {
|
|
@@ -23445,11 +23504,11 @@ function workspaceDefaultTarget(cwd, globalDefault) {
|
|
|
23445
23504
|
// packages/workit-core/src/core/vcs-config.ts
|
|
23446
23505
|
import fs12 from "node:fs";
|
|
23447
23506
|
import path14 from "node:path";
|
|
23448
|
-
import { spawnSync as
|
|
23507
|
+
import { spawnSync as spawnSync10 } from "node:child_process";
|
|
23449
23508
|
|
|
23450
23509
|
// packages/workit-core/src/core/release-tracks.ts
|
|
23451
23510
|
import { createHash as createHash9 } from "node:crypto";
|
|
23452
|
-
import { spawnSync as
|
|
23511
|
+
import { spawnSync as spawnSync9 } from "node:child_process";
|
|
23453
23512
|
var KNOWN_FIELDS = new Set([
|
|
23454
23513
|
"strategy",
|
|
23455
23514
|
"productionBranch",
|
|
@@ -23721,7 +23780,7 @@ function resolveReleaseTrack(input) {
|
|
|
23721
23780
|
return fallback(`${branch} has the same or unrelated fork points with ${[...new Set(newest.map((fork) => `${fork.ref} (${fork.track.name === IMPLICIT ? "workspace default" : fork.track.name})`))].join(" and ")}`);
|
|
23722
23781
|
}
|
|
23723
23782
|
var git4 = (cwd, args) => {
|
|
23724
|
-
const run =
|
|
23783
|
+
const run = spawnSync9("git", args, {
|
|
23725
23784
|
cwd,
|
|
23726
23785
|
encoding: "utf8",
|
|
23727
23786
|
timeout: 20000,
|
|
@@ -23836,7 +23895,7 @@ function resolveTrackFor(cwd, options) {
|
|
|
23836
23895
|
var workspacesPath = () => path14.join(configDir(), "workspaces.json");
|
|
23837
23896
|
var vcsCwd = (cwd) => cwd ?? process.env.WORKFLOW_WORKSPACE_ROOT ?? process.cwd();
|
|
23838
23897
|
var remoteProvider = (cwd) => {
|
|
23839
|
-
const r =
|
|
23898
|
+
const r = spawnSync10("git", ["remote", "get-url", "origin"], { cwd, encoding: "utf8" });
|
|
23840
23899
|
if (r.status !== 0)
|
|
23841
23900
|
return null;
|
|
23842
23901
|
const url = (r.stdout ?? "").trim();
|
|
@@ -23873,7 +23932,7 @@ var remoteEndpoint = (remote) => {
|
|
|
23873
23932
|
var configuredSshEndpoint = (host) => {
|
|
23874
23933
|
if (host.startsWith("-"))
|
|
23875
23934
|
return null;
|
|
23876
|
-
const resolved =
|
|
23935
|
+
const resolved = spawnSync10("ssh", ["-G", host], {
|
|
23877
23936
|
encoding: "utf8",
|
|
23878
23937
|
timeout: 5000,
|
|
23879
23938
|
maxBuffer: 1024 * 1024,
|
|
@@ -24046,7 +24105,7 @@ function mergedPrStyle(limit = 6, cwd) {
|
|
|
24046
24105
|
`).filter((l) => l.startsWith("## ")).map((l) => l.trim()),
|
|
24047
24106
|
descriptionPreview: desc.slice(0, 600)
|
|
24048
24107
|
});
|
|
24049
|
-
const remoteResult =
|
|
24108
|
+
const remoteResult = spawnSync10("git", ["remote", "get-url", "--push", "--all", "origin"], {
|
|
24050
24109
|
cwd,
|
|
24051
24110
|
encoding: "utf8"
|
|
24052
24111
|
});
|
|
@@ -24062,7 +24121,7 @@ function mergedPrStyle(limit = 6, cwd) {
|
|
|
24062
24121
|
if (!hostingApiHostMatches(remote, host))
|
|
24063
24122
|
return { ok: false, error: "PR style target does not match the provider host" };
|
|
24064
24123
|
if (provider === "gitlab") {
|
|
24065
|
-
const run = (args) =>
|
|
24124
|
+
const run = (args) => spawnSync10("glab", ["api", ...args], {
|
|
24066
24125
|
cwd,
|
|
24067
24126
|
encoding: "utf8",
|
|
24068
24127
|
env
|
|
@@ -24082,7 +24141,7 @@ function mergedPrStyle(limit = 6, cwd) {
|
|
|
24082
24141
|
});
|
|
24083
24142
|
}
|
|
24084
24143
|
} else if (provider === "github") {
|
|
24085
|
-
const r =
|
|
24144
|
+
const r = spawnSync10("gh", [
|
|
24086
24145
|
"pr",
|
|
24087
24146
|
"list",
|
|
24088
24147
|
"--repo",
|
|
@@ -26019,7 +26078,7 @@ class WorkitCore {
|
|
|
26019
26078
|
}
|
|
26020
26079
|
}
|
|
26021
26080
|
// packages/workit-core/src/core/repo-context.ts
|
|
26022
|
-
import { spawnSync as
|
|
26081
|
+
import { spawnSync as spawnSync11 } from "node:child_process";
|
|
26023
26082
|
import { existsSync as existsSync6, readFileSync as readFileSync5, readdirSync as readdirSync4 } from "node:fs";
|
|
26024
26083
|
import path16 from "node:path";
|
|
26025
26084
|
var isSafeContextRange = (value) => value.length <= 4096 && (() => {
|
|
@@ -26048,7 +26107,7 @@ var invalidRange = (cwd) => ({
|
|
|
26048
26107
|
cwd
|
|
26049
26108
|
});
|
|
26050
26109
|
var runGit = (cwd, args) => {
|
|
26051
|
-
const result =
|
|
26110
|
+
const result = spawnSync11("git", args, { cwd, encoding: "utf8" });
|
|
26052
26111
|
return {
|
|
26053
26112
|
stdout: (result.stdout ?? "").trimEnd(),
|
|
26054
26113
|
stderr: (result.stderr ?? "").trimEnd(),
|
|
@@ -26489,12 +26548,12 @@ function releaseNotesContext(root, rangeOrTag) {
|
|
|
26489
26548
|
}
|
|
26490
26549
|
|
|
26491
26550
|
// packages/workit-core/src/core/tracker-issues.ts
|
|
26492
|
-
import { spawnSync as
|
|
26551
|
+
import { spawnSync as spawnSync13 } from "node:child_process";
|
|
26493
26552
|
|
|
26494
26553
|
// packages/workit-core/src/core/pr-create.ts
|
|
26495
26554
|
import fs13 from "node:fs";
|
|
26496
26555
|
import path17 from "node:path";
|
|
26497
|
-
import { spawnSync as
|
|
26556
|
+
import { spawnSync as spawnSync12 } from "node:child_process";
|
|
26498
26557
|
// packages/workit-core/src/forge/pr-body.ts
|
|
26499
26558
|
function parseGhIssue(value) {
|
|
26500
26559
|
const m = /issues\/(\d+)/.exec(value);
|
|
@@ -26519,7 +26578,7 @@ function whichOnPath(tool) {
|
|
|
26519
26578
|
}
|
|
26520
26579
|
var hostingCliAvailable = (provider) => whichOnPath(provider === "gitlab" ? "glab" : "gh") !== null;
|
|
26521
26580
|
var pushRemote = (cwd) => {
|
|
26522
|
-
const result =
|
|
26581
|
+
const result = spawnSync12("git", ["remote", "get-url", "--push", "--all", "origin"], {
|
|
26523
26582
|
cwd,
|
|
26524
26583
|
encoding: "utf8"
|
|
26525
26584
|
});
|
|
@@ -26550,7 +26609,7 @@ var defaultCli = (bin, available) => {
|
|
|
26550
26609
|
if (!available)
|
|
26551
26610
|
return null;
|
|
26552
26611
|
return (args, root) => {
|
|
26553
|
-
const out =
|
|
26612
|
+
const out = spawnSync13(bin, args, {
|
|
26554
26613
|
cwd: root,
|
|
26555
26614
|
encoding: "utf8",
|
|
26556
26615
|
env: { ...process.env, PATH: process.env.PATH ?? "" }
|
|
@@ -27068,7 +27127,7 @@ function resolveInside(root, candidate) {
|
|
|
27068
27127
|
}
|
|
27069
27128
|
function run2(root, executable, args, env = {}) {
|
|
27070
27129
|
const cwd = realpathSync5(root);
|
|
27071
|
-
const result =
|
|
27130
|
+
const result = spawnSync14(executable, args, {
|
|
27072
27131
|
cwd,
|
|
27073
27132
|
encoding: "utf8",
|
|
27074
27133
|
env: { ...process.env, ...env }
|
|
@@ -27482,8 +27541,51 @@ var cache = new Map;
|
|
|
27482
27541
|
var CASE_INSENSITIVE = process.platform === "darwin" || process.platform === "win32";
|
|
27483
27542
|
var PREFIXES2 = new Set(["sudo", "command", "env", "nohup", "time", "exec", "xargs"]);
|
|
27484
27543
|
var cache2 = new Map;
|
|
27544
|
+
// packages/workit-core/src/hooks/raw-git.ts
|
|
27545
|
+
var SHELLS = new Set(["sh", "bash", "zsh", "dash", "ksh"]);
|
|
27546
|
+
var PREFIXES3 = new Set(["sudo", "command", "env", "nohup", "time", "exec", "nice", "&"]);
|
|
27547
|
+
var CD = new Set(["cd", "chdir", "set-location", "sl"]);
|
|
27548
|
+
var PUSHD = new Set(["pushd", "push-location"]);
|
|
27549
|
+
var POPD = new Set(["popd", "pop-location"]);
|
|
27550
|
+
var GIT_VALUE_OPTIONS = new Set([
|
|
27551
|
+
"-c",
|
|
27552
|
+
"--git-dir",
|
|
27553
|
+
"--work-tree",
|
|
27554
|
+
"--namespace",
|
|
27555
|
+
"--exec-path",
|
|
27556
|
+
"--config-env",
|
|
27557
|
+
"--super-prefix"
|
|
27558
|
+
]);
|
|
27559
|
+
var PUSH_VALUE_OPTIONS = new Set(["-o", "--push-option", "--receive-pack", "--exec", "--repo"]);
|
|
27560
|
+
var VALUE_OPTIONS = {
|
|
27561
|
+
git: new Set([
|
|
27562
|
+
"-m",
|
|
27563
|
+
"--message",
|
|
27564
|
+
"-F",
|
|
27565
|
+
"--file",
|
|
27566
|
+
"-C",
|
|
27567
|
+
"-c",
|
|
27568
|
+
"--reuse-message",
|
|
27569
|
+
"--reedit-message",
|
|
27570
|
+
"--author",
|
|
27571
|
+
"--date",
|
|
27572
|
+
"--trailer",
|
|
27573
|
+
"-t",
|
|
27574
|
+
"--template",
|
|
27575
|
+
"--cleanup",
|
|
27576
|
+
"--fixup",
|
|
27577
|
+
"--squash",
|
|
27578
|
+
"-o",
|
|
27579
|
+
"--push-option",
|
|
27580
|
+
"--repo",
|
|
27581
|
+
"--receive-pack",
|
|
27582
|
+
"--exec"
|
|
27583
|
+
]),
|
|
27584
|
+
gh: new Set(["-b", "--body", "-F", "--body-file", "-t", "--title", "--subject", "-A", "--author-email"].concat(["-B", "--base", "-H", "--head", "-l", "--label", "-a", "--assignee"]).concat(["-r", "--reviewer", "-m", "--milestone", "-p", "--project", "-T", "--template"]).concat(["--match-head-commit", "-R", "--repo"])),
|
|
27585
|
+
glab: new Set(["-m", "--message", "--squash-message", "--sha", "-t", "--title", "-d", "--description"].concat(["-b", "--target-branch", "-s", "--source-branch", "-l", "--label"]).concat(["-a", "--assignee", "--reviewer", "-R", "--repo"]))
|
|
27586
|
+
};
|
|
27485
27587
|
// packages/workit-core/src/hooks/hosts/fields.ts
|
|
27486
|
-
var
|
|
27588
|
+
var SHELLS2 = new Set(["sh", "bash", "zsh", "dash", "pwsh", "powershell", "cmd"]);
|
|
27487
27589
|
var WRITE_TOOLS = new Set([
|
|
27488
27590
|
"write",
|
|
27489
27591
|
"edit",
|
|
@@ -27509,7 +27611,13 @@ var CLAUDE_JUDGES = new Set(["workit:verifier", "workit:reviewer"]);
|
|
|
27509
27611
|
// packages/workit-core/src/hooks/hosts/claude-code.ts
|
|
27510
27612
|
var SOURCES = new Set(["startup", "resume", "clear", "compact", "fork"]);
|
|
27511
27613
|
var SHELL_TOOLS = new Set(["Bash", "PowerShell"]);
|
|
27512
|
-
var CONTEXT_EVENTS = new Set([
|
|
27614
|
+
var CONTEXT_EVENTS = new Set([
|
|
27615
|
+
"SessionStart",
|
|
27616
|
+
"UserPromptSubmit",
|
|
27617
|
+
"SubagentStart",
|
|
27618
|
+
"PreToolUse",
|
|
27619
|
+
"PostToolUse"
|
|
27620
|
+
]);
|
|
27513
27621
|
|
|
27514
27622
|
// packages/workit-core/src/hooks/hosts/codex.ts
|
|
27515
27623
|
var SHELL_TOOLS2 = new Set(["bash", "unified-exec"]);
|