@brainervirus/workit-codex 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/.codex-plugin/plugin.json +1 -1
- package/dist/launch-mcp.js +163 -55
- package/dist/workit-hook-bww8efb5.js +18576 -0
- package/dist/workit-hook.js +27 -17810
- package/hooks/hooks.json +6 -0
- package/package.json +3 -3
- package/skills/workit-ship/SKILL.md +14 -14
package/dist/launch-mcp.js
CHANGED
|
@@ -6625,7 +6625,7 @@ import { existsSync as existsSync9, realpathSync as realpathSync7, statSync as s
|
|
|
6625
6625
|
import path21 from "node:path";
|
|
6626
6626
|
|
|
6627
6627
|
// packages/workit-core/src/core.ts
|
|
6628
|
-
import { spawnSync as
|
|
6628
|
+
import { spawnSync as spawnSync14 } from "node:child_process";
|
|
6629
6629
|
import { existsSync as existsSync7, realpathSync as realpathSync5 } from "node:fs";
|
|
6630
6630
|
import path19 from "node:path";
|
|
6631
6631
|
|
|
@@ -16060,6 +16060,35 @@ function acquireFileLockSync(targetPath, options) {
|
|
|
16060
16060
|
}
|
|
16061
16061
|
}
|
|
16062
16062
|
}
|
|
16063
|
+
// packages/workit-core/src/host-session.ts
|
|
16064
|
+
var HOST_SESSION_VARS = [
|
|
16065
|
+
["OPENCODE_SESSION_ID", () => "opencode"],
|
|
16066
|
+
["PI_SESSION_ID", () => "pi"],
|
|
16067
|
+
[
|
|
16068
|
+
"CODEX_THREAD_ID",
|
|
16069
|
+
(env) => env.CODEX_INTERNAL_ORIGINATOR_OVERRIDE === "Codex Desktop" || env.CODEX_ELECTRON_RESOURCES_PATH ? "codex_desktop" : "codex_cli"
|
|
16070
|
+
]
|
|
16071
|
+
];
|
|
16072
|
+
var family = (host) => host?.replace(/_(?:cli|desktop)$/, "") ?? null;
|
|
16073
|
+
function hostSessionFromEnv(env) {
|
|
16074
|
+
const value = (key) => env[key]?.trim() || null;
|
|
16075
|
+
let inner = null;
|
|
16076
|
+
for (const [key, host] of HOST_SESSION_VARS) {
|
|
16077
|
+
const session = value(key);
|
|
16078
|
+
if (session) {
|
|
16079
|
+
inner = { host: host(env), session };
|
|
16080
|
+
break;
|
|
16081
|
+
}
|
|
16082
|
+
}
|
|
16083
|
+
const declared = value("WORKIT_HOST");
|
|
16084
|
+
if (env.WORKIT_SESSION_ID !== undefined) {
|
|
16085
|
+
const inherited = inner !== null && declared !== null && family(declared) !== family(inner.host);
|
|
16086
|
+
if (!inherited)
|
|
16087
|
+
return { host: declared, session: value("WORKIT_SESSION_ID") };
|
|
16088
|
+
}
|
|
16089
|
+
return inner ? { host: inner.host, session: inner.session } : { host: declared, session: null };
|
|
16090
|
+
}
|
|
16091
|
+
|
|
16063
16092
|
// packages/workit-core/src/core/package-root.ts
|
|
16064
16093
|
import { existsSync } from "node:fs";
|
|
16065
16094
|
import path3 from "node:path";
|
|
@@ -17024,9 +17053,10 @@ var drop = (lock) => {
|
|
|
17024
17053
|
};
|
|
17025
17054
|
var envActor = () => {
|
|
17026
17055
|
const value = (key) => process.env[key]?.trim() || null;
|
|
17056
|
+
const acting = hostSessionFromEnv(process.env);
|
|
17027
17057
|
return {
|
|
17028
|
-
host:
|
|
17029
|
-
session:
|
|
17058
|
+
host: acting.host ?? "runtime",
|
|
17059
|
+
session: acting.session,
|
|
17030
17060
|
agentId: value("WORKIT_AGENT_ID")
|
|
17031
17061
|
};
|
|
17032
17062
|
};
|
|
@@ -20656,6 +20686,7 @@ var gitContext = (workspaceRoot, paths = []) => {
|
|
|
20656
20686
|
};
|
|
20657
20687
|
|
|
20658
20688
|
// packages/workit-core/src/core/workspaces.ts
|
|
20689
|
+
import { spawnSync as spawnSync8 } from "node:child_process";
|
|
20659
20690
|
import { createHash as createHash8 } from "node:crypto";
|
|
20660
20691
|
import { readFileSync as readFileSync4, realpathSync as realpathSync3 } from "node:fs";
|
|
20661
20692
|
import path13 from "node:path";
|
|
@@ -20900,6 +20931,53 @@ var validateWorkspaceGlob = (glob) => {
|
|
|
20900
20931
|
}
|
|
20901
20932
|
return { ok: true };
|
|
20902
20933
|
};
|
|
20934
|
+
|
|
20935
|
+
class WorkspaceConfigError extends Error {
|
|
20936
|
+
name = "WorkspaceConfigError";
|
|
20937
|
+
}
|
|
20938
|
+
var mainCheckouts = new Map;
|
|
20939
|
+
var mainCheckoutOf = (cwd) => {
|
|
20940
|
+
const cached = mainCheckouts.get(cwd);
|
|
20941
|
+
if (cached !== undefined)
|
|
20942
|
+
return cached;
|
|
20943
|
+
const env = { ...process.env };
|
|
20944
|
+
for (const name of ["GIT_DIR", "GIT_WORK_TREE", "GIT_COMMON_DIR", "GIT_INDEX_FILE"])
|
|
20945
|
+
delete env[name];
|
|
20946
|
+
const git = (args) => {
|
|
20947
|
+
const run = spawnSync8("git", args, {
|
|
20948
|
+
cwd,
|
|
20949
|
+
env,
|
|
20950
|
+
encoding: "utf8",
|
|
20951
|
+
timeout: 5000,
|
|
20952
|
+
windowsHide: true
|
|
20953
|
+
});
|
|
20954
|
+
return run.status === 0 ? run.stdout : null;
|
|
20955
|
+
};
|
|
20956
|
+
let main = null;
|
|
20957
|
+
const dirs = git(["rev-parse", "--path-format=absolute", "--git-dir", "--git-common-dir"]);
|
|
20958
|
+
const [gitDir, common] = (dirs ?? "").trim().split(/\r?\n/u);
|
|
20959
|
+
if (gitDir && common && path13.resolve(gitDir) !== path13.resolve(common)) {
|
|
20960
|
+
const listed = /^worktree (.+)$/mu.exec(git(["worktree", "list", "--porcelain"]) ?? "")?.[1];
|
|
20961
|
+
main = listed?.trim() || (path13.basename(common) === ".git" ? path13.dirname(common) : common);
|
|
20962
|
+
}
|
|
20963
|
+
mainCheckouts.set(cwd, main);
|
|
20964
|
+
return main;
|
|
20965
|
+
};
|
|
20966
|
+
var matchingEntries = (cwd, entries) => {
|
|
20967
|
+
const match = (where) => {
|
|
20968
|
+
const targets = [where, realpathOf(where)].map((value) => value.replaceAll("\\", "/"));
|
|
20969
|
+
return entries.filter((entry) => {
|
|
20970
|
+
const glob = entry.glob.replaceAll("\\", "/");
|
|
20971
|
+
const canonical = canonicalGlob(glob);
|
|
20972
|
+
return targets.some((target) => matchWorkspace(glob, target) || canonical !== glob && matchWorkspace(canonical, target));
|
|
20973
|
+
});
|
|
20974
|
+
};
|
|
20975
|
+
const direct = match(cwd);
|
|
20976
|
+
if (direct.length)
|
|
20977
|
+
return direct;
|
|
20978
|
+
const main = mainCheckoutOf(cwd);
|
|
20979
|
+
return main ? match(main) : direct;
|
|
20980
|
+
};
|
|
20903
20981
|
var realpathOf = (p) => {
|
|
20904
20982
|
const real = realpathSync3.native ?? realpathSync3;
|
|
20905
20983
|
try {
|
|
@@ -20924,43 +21002,29 @@ var selectWorkspaceMatch = (matches, cwd, workspaceName) => {
|
|
|
20924
21002
|
if (named.length === 1)
|
|
20925
21003
|
return named[0];
|
|
20926
21004
|
if (named.length > 1)
|
|
20927
|
-
throw new
|
|
21005
|
+
throw new WorkspaceConfigError(`ambiguous workspace ${JSON.stringify(workspaceName)} for ${cwd}`);
|
|
20928
21006
|
if (matches.length > 0) {
|
|
20929
|
-
throw new
|
|
21007
|
+
throw new WorkspaceConfigError(`workspace ${JSON.stringify(workspaceName)} does not match ${cwd}; matching choices: ${matches.map((entry) => entry.name).join(", ")}`);
|
|
20930
21008
|
}
|
|
20931
|
-
throw new
|
|
21009
|
+
throw new WorkspaceConfigError(`workspace ${JSON.stringify(workspaceName)} does not match ${cwd}`);
|
|
20932
21010
|
}
|
|
20933
21011
|
if (matches.length < 2)
|
|
20934
21012
|
return matches[0];
|
|
20935
21013
|
const highestSpecificity = Math.max(...matches.map((entry) => globSpecificity(entry.glob)));
|
|
20936
21014
|
const mostSpecific = matches.filter((entry) => globSpecificity(entry.glob) === highestSpecificity);
|
|
20937
21015
|
if (mostSpecific.length > 1) {
|
|
20938
|
-
throw new
|
|
21016
|
+
throw new WorkspaceConfigError(`ambiguous workspace for ${cwd}; choose one of: ${mostSpecific.map((entry) => entry.name).join(", ")}`);
|
|
20939
21017
|
}
|
|
20940
21018
|
return mostSpecific[0];
|
|
20941
21019
|
};
|
|
20942
21020
|
var resolveWorkspaceFromEntries = (cwd, entries, workspaceName) => {
|
|
20943
|
-
const
|
|
20944
|
-
const matches = [];
|
|
20945
|
-
for (const ws of entries) {
|
|
20946
|
-
const glob = ws.glob.replaceAll("\\", "/");
|
|
20947
|
-
const canonical = canonicalGlob(glob);
|
|
20948
|
-
let matched = false;
|
|
20949
|
-
for (const target of targets) {
|
|
20950
|
-
if (matchWorkspace(glob, target) || canonical !== glob && matchWorkspace(canonical, target)) {
|
|
20951
|
-
matched = true;
|
|
20952
|
-
break;
|
|
20953
|
-
}
|
|
20954
|
-
}
|
|
20955
|
-
if (matched)
|
|
20956
|
-
matches.push(ws);
|
|
20957
|
-
}
|
|
21021
|
+
const matches = matchingEntries(cwd, entries);
|
|
20958
21022
|
return selectWorkspaceMatch(matches, cwd, workspaceName) ?? null;
|
|
20959
21023
|
};
|
|
20960
21024
|
var resolveWorkspaceFrom = (cwd, dir, workspaceName) => {
|
|
20961
21025
|
const result = readWorkspacesResult(dir);
|
|
20962
21026
|
if (result.status === "malformed" || result.status === "invalid")
|
|
20963
|
-
throw new
|
|
21027
|
+
throw new WorkspaceConfigError(result.error);
|
|
20964
21028
|
return resolveWorkspaceFromEntries(cwd, result.entries, workspaceName);
|
|
20965
21029
|
};
|
|
20966
21030
|
var runtimeWorkspacePolicySchema = (kind) => {
|
|
@@ -20992,31 +21056,26 @@ var matchRuntimeWorkspace = (cwd) => {
|
|
|
20992
21056
|
} catch (error) {
|
|
20993
21057
|
if (error.code === "ENOENT")
|
|
20994
21058
|
return null;
|
|
20995
|
-
throw new
|
|
21059
|
+
throw new WorkspaceConfigError(`${file} could not be read: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
20996
21060
|
}
|
|
20997
21061
|
let parsed;
|
|
20998
21062
|
try {
|
|
20999
21063
|
parsed = JSON.parse(raw);
|
|
21000
21064
|
} catch {
|
|
21001
|
-
throw new
|
|
21065
|
+
throw new WorkspaceConfigError(`${file} is not valid JSON`);
|
|
21002
21066
|
}
|
|
21003
21067
|
const validated = runtimeWorkspaceIndexSchema.safeParse(parsed);
|
|
21004
21068
|
if (!validated.success) {
|
|
21005
21069
|
const detail = validated.error.issues.map((issue) => `${issue.path.map(String).join(".") || "workspaces"}: ${issue.message}`).join("; ");
|
|
21006
|
-
throw new
|
|
21070
|
+
throw new WorkspaceConfigError(`${file} has invalid workspace matching data: ${detail}`);
|
|
21007
21071
|
}
|
|
21008
21072
|
const entries = validated.data.workspaces;
|
|
21009
21073
|
for (const entry of entries ?? []) {
|
|
21010
21074
|
const glob = validateWorkspaceGlob(entry.glob);
|
|
21011
21075
|
if (!glob.ok)
|
|
21012
|
-
throw new
|
|
21076
|
+
throw new WorkspaceConfigError(`${file} workspace ${entry.name}: ${glob.error}`);
|
|
21013
21077
|
}
|
|
21014
|
-
const
|
|
21015
|
-
const matches = (entries ?? []).filter((entry) => {
|
|
21016
|
-
const glob = entry.glob.replaceAll("\\", "/");
|
|
21017
|
-
const canonical = canonicalGlob(glob);
|
|
21018
|
-
return targets.some((target) => matchWorkspace(glob, target) || canonical !== glob && matchWorkspace(canonical, target));
|
|
21019
|
-
});
|
|
21078
|
+
const matches = matchingEntries(cwd, entries ?? []);
|
|
21020
21079
|
const workspaceName = process.env.WORKFLOW_WORKSPACE_NAME?.trim() || undefined;
|
|
21021
21080
|
const selected = selectWorkspaceMatch(matches, cwd, workspaceName);
|
|
21022
21081
|
return selected ? { file, selected } : null;
|
|
@@ -21033,7 +21092,7 @@ var resolveRuntimeWorkspaceCandidate = (cwd, kind) => {
|
|
|
21033
21092
|
const policy = runtimeWorkspacePolicySchema(kind).safeParse(selected);
|
|
21034
21093
|
if (!policy.success) {
|
|
21035
21094
|
const detail = policy.error.issues.map((issue) => `${issue.path.map(String).join(".") || "workspace"}: ${issue.message}`).join("; ");
|
|
21036
|
-
throw new
|
|
21095
|
+
throw new WorkspaceConfigError(`${file} has invalid ${kind} policy configuration: ${detail}`);
|
|
21037
21096
|
}
|
|
21038
21097
|
return policy.data;
|
|
21039
21098
|
};
|
|
@@ -21044,10 +21103,10 @@ var resolveRuntimeWorkspacePolicy = (cwd, kind, requestedProfile) => {
|
|
|
21044
21103
|
const key = kind === "branch" ? "branchPolicy" : "commitPolicy";
|
|
21045
21104
|
const profileName = requestedProfile?.trim() || candidate.defaultProfile;
|
|
21046
21105
|
if (candidate.defaultProfile && !Object.hasOwn(candidate.profiles ?? {}, candidate.defaultProfile))
|
|
21047
|
-
throw new
|
|
21106
|
+
throw new WorkspaceConfigError(`workspace ${JSON.stringify(candidate.name)} has no profile ${JSON.stringify(candidate.defaultProfile)}`);
|
|
21048
21107
|
const profile = profileName ? candidate.profiles?.[profileName] : undefined;
|
|
21049
21108
|
if (profileName && !profile)
|
|
21050
|
-
throw new
|
|
21109
|
+
throw new WorkspaceConfigError(`workspace ${JSON.stringify(candidate.name)} has no profile ${JSON.stringify(profileName)}`);
|
|
21051
21110
|
const profilePolicy = profile?.[key];
|
|
21052
21111
|
const workspacePolicy = candidate[key];
|
|
21053
21112
|
return {
|
|
@@ -21067,11 +21126,11 @@ function workspaceDefaultTarget(cwd, globalDefault) {
|
|
|
21067
21126
|
// packages/workit-core/src/core/vcs-config.ts
|
|
21068
21127
|
import fs12 from "node:fs";
|
|
21069
21128
|
import path14 from "node:path";
|
|
21070
|
-
import { spawnSync as
|
|
21129
|
+
import { spawnSync as spawnSync10 } from "node:child_process";
|
|
21071
21130
|
|
|
21072
21131
|
// packages/workit-core/src/core/release-tracks.ts
|
|
21073
21132
|
import { createHash as createHash9 } from "node:crypto";
|
|
21074
|
-
import { spawnSync as
|
|
21133
|
+
import { spawnSync as spawnSync9 } from "node:child_process";
|
|
21075
21134
|
var KNOWN_FIELDS = new Set([
|
|
21076
21135
|
"strategy",
|
|
21077
21136
|
"productionBranch",
|
|
@@ -21343,7 +21402,7 @@ function resolveReleaseTrack(input) {
|
|
|
21343
21402
|
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 ")}`);
|
|
21344
21403
|
}
|
|
21345
21404
|
var git4 = (cwd, args) => {
|
|
21346
|
-
const run =
|
|
21405
|
+
const run = spawnSync9("git", args, {
|
|
21347
21406
|
cwd,
|
|
21348
21407
|
encoding: "utf8",
|
|
21349
21408
|
timeout: 20000,
|
|
@@ -21458,7 +21517,7 @@ function resolveTrackFor(cwd, options) {
|
|
|
21458
21517
|
var workspacesPath = () => path14.join(configDir(), "workspaces.json");
|
|
21459
21518
|
var vcsCwd = (cwd) => cwd ?? process.env.WORKFLOW_WORKSPACE_ROOT ?? process.cwd();
|
|
21460
21519
|
var remoteProvider = (cwd) => {
|
|
21461
|
-
const r =
|
|
21520
|
+
const r = spawnSync10("git", ["remote", "get-url", "origin"], { cwd, encoding: "utf8" });
|
|
21462
21521
|
if (r.status !== 0)
|
|
21463
21522
|
return null;
|
|
21464
21523
|
const url = (r.stdout ?? "").trim();
|
|
@@ -21495,7 +21554,7 @@ var remoteEndpoint = (remote) => {
|
|
|
21495
21554
|
var configuredSshEndpoint = (host) => {
|
|
21496
21555
|
if (host.startsWith("-"))
|
|
21497
21556
|
return null;
|
|
21498
|
-
const resolved =
|
|
21557
|
+
const resolved = spawnSync10("ssh", ["-G", host], {
|
|
21499
21558
|
encoding: "utf8",
|
|
21500
21559
|
timeout: 5000,
|
|
21501
21560
|
maxBuffer: 1024 * 1024,
|
|
@@ -21668,7 +21727,7 @@ function mergedPrStyle(limit = 6, cwd) {
|
|
|
21668
21727
|
`).filter((l) => l.startsWith("## ")).map((l) => l.trim()),
|
|
21669
21728
|
descriptionPreview: desc.slice(0, 600)
|
|
21670
21729
|
});
|
|
21671
|
-
const remoteResult =
|
|
21730
|
+
const remoteResult = spawnSync10("git", ["remote", "get-url", "--push", "--all", "origin"], {
|
|
21672
21731
|
cwd,
|
|
21673
21732
|
encoding: "utf8"
|
|
21674
21733
|
});
|
|
@@ -21684,7 +21743,7 @@ function mergedPrStyle(limit = 6, cwd) {
|
|
|
21684
21743
|
if (!hostingApiHostMatches(remote, host))
|
|
21685
21744
|
return { ok: false, error: "PR style target does not match the provider host" };
|
|
21686
21745
|
if (provider === "gitlab") {
|
|
21687
|
-
const run = (args) =>
|
|
21746
|
+
const run = (args) => spawnSync10("glab", ["api", ...args], {
|
|
21688
21747
|
cwd,
|
|
21689
21748
|
encoding: "utf8",
|
|
21690
21749
|
env
|
|
@@ -21704,7 +21763,7 @@ function mergedPrStyle(limit = 6, cwd) {
|
|
|
21704
21763
|
});
|
|
21705
21764
|
}
|
|
21706
21765
|
} else if (provider === "github") {
|
|
21707
|
-
const r =
|
|
21766
|
+
const r = spawnSync10("gh", [
|
|
21708
21767
|
"pr",
|
|
21709
21768
|
"list",
|
|
21710
21769
|
"--repo",
|
|
@@ -23641,7 +23700,7 @@ class WorkitCore {
|
|
|
23641
23700
|
}
|
|
23642
23701
|
}
|
|
23643
23702
|
// packages/workit-core/src/core/repo-context.ts
|
|
23644
|
-
import { spawnSync as
|
|
23703
|
+
import { spawnSync as spawnSync11 } from "node:child_process";
|
|
23645
23704
|
import { existsSync as existsSync6, readFileSync as readFileSync5, readdirSync as readdirSync4 } from "node:fs";
|
|
23646
23705
|
import path16 from "node:path";
|
|
23647
23706
|
var isSafeContextRange = (value) => value.length <= 4096 && (() => {
|
|
@@ -23670,7 +23729,7 @@ var invalidRange = (cwd) => ({
|
|
|
23670
23729
|
cwd
|
|
23671
23730
|
});
|
|
23672
23731
|
var runGit = (cwd, args) => {
|
|
23673
|
-
const result =
|
|
23732
|
+
const result = spawnSync11("git", args, { cwd, encoding: "utf8" });
|
|
23674
23733
|
return {
|
|
23675
23734
|
stdout: (result.stdout ?? "").trimEnd(),
|
|
23676
23735
|
stderr: (result.stderr ?? "").trimEnd(),
|
|
@@ -24111,12 +24170,12 @@ function releaseNotesContext(root, rangeOrTag) {
|
|
|
24111
24170
|
}
|
|
24112
24171
|
|
|
24113
24172
|
// packages/workit-core/src/core/tracker-issues.ts
|
|
24114
|
-
import { spawnSync as
|
|
24173
|
+
import { spawnSync as spawnSync13 } from "node:child_process";
|
|
24115
24174
|
|
|
24116
24175
|
// packages/workit-core/src/core/pr-create.ts
|
|
24117
24176
|
import fs13 from "node:fs";
|
|
24118
24177
|
import path17 from "node:path";
|
|
24119
|
-
import { spawnSync as
|
|
24178
|
+
import { spawnSync as spawnSync12 } from "node:child_process";
|
|
24120
24179
|
// packages/workit-core/src/forge/pr-body.ts
|
|
24121
24180
|
function parseGhIssue(value) {
|
|
24122
24181
|
const m = /issues\/(\d+)/.exec(value);
|
|
@@ -24141,7 +24200,7 @@ function whichOnPath(tool) {
|
|
|
24141
24200
|
}
|
|
24142
24201
|
var hostingCliAvailable = (provider) => whichOnPath(provider === "gitlab" ? "glab" : "gh") !== null;
|
|
24143
24202
|
var pushRemote = (cwd) => {
|
|
24144
|
-
const result =
|
|
24203
|
+
const result = spawnSync12("git", ["remote", "get-url", "--push", "--all", "origin"], {
|
|
24145
24204
|
cwd,
|
|
24146
24205
|
encoding: "utf8"
|
|
24147
24206
|
});
|
|
@@ -24172,7 +24231,7 @@ var defaultCli = (bin, available) => {
|
|
|
24172
24231
|
if (!available)
|
|
24173
24232
|
return null;
|
|
24174
24233
|
return (args, root) => {
|
|
24175
|
-
const out =
|
|
24234
|
+
const out = spawnSync13(bin, args, {
|
|
24176
24235
|
cwd: root,
|
|
24177
24236
|
encoding: "utf8",
|
|
24178
24237
|
env: { ...process.env, PATH: process.env.PATH ?? "" }
|
|
@@ -24690,7 +24749,7 @@ function resolveInside(root, candidate) {
|
|
|
24690
24749
|
}
|
|
24691
24750
|
function run2(root, executable, args, env = {}) {
|
|
24692
24751
|
const cwd = realpathSync5(root);
|
|
24693
|
-
const result =
|
|
24752
|
+
const result = spawnSync14(executable, args, {
|
|
24694
24753
|
cwd,
|
|
24695
24754
|
encoding: "utf8",
|
|
24696
24755
|
env: { ...process.env, ...env }
|
|
@@ -27476,8 +27535,51 @@ var cache = new Map;
|
|
|
27476
27535
|
var CASE_INSENSITIVE = process.platform === "darwin" || process.platform === "win32";
|
|
27477
27536
|
var PREFIXES2 = new Set(["sudo", "command", "env", "nohup", "time", "exec", "xargs"]);
|
|
27478
27537
|
var cache2 = new Map;
|
|
27538
|
+
// packages/workit-core/src/hooks/raw-git.ts
|
|
27539
|
+
var SHELLS = new Set(["sh", "bash", "zsh", "dash", "ksh"]);
|
|
27540
|
+
var PREFIXES3 = new Set(["sudo", "command", "env", "nohup", "time", "exec", "nice", "&"]);
|
|
27541
|
+
var CD = new Set(["cd", "chdir", "set-location", "sl"]);
|
|
27542
|
+
var PUSHD = new Set(["pushd", "push-location"]);
|
|
27543
|
+
var POPD = new Set(["popd", "pop-location"]);
|
|
27544
|
+
var GIT_VALUE_OPTIONS = new Set([
|
|
27545
|
+
"-c",
|
|
27546
|
+
"--git-dir",
|
|
27547
|
+
"--work-tree",
|
|
27548
|
+
"--namespace",
|
|
27549
|
+
"--exec-path",
|
|
27550
|
+
"--config-env",
|
|
27551
|
+
"--super-prefix"
|
|
27552
|
+
]);
|
|
27553
|
+
var PUSH_VALUE_OPTIONS = new Set(["-o", "--push-option", "--receive-pack", "--exec", "--repo"]);
|
|
27554
|
+
var VALUE_OPTIONS = {
|
|
27555
|
+
git: new Set([
|
|
27556
|
+
"-m",
|
|
27557
|
+
"--message",
|
|
27558
|
+
"-F",
|
|
27559
|
+
"--file",
|
|
27560
|
+
"-C",
|
|
27561
|
+
"-c",
|
|
27562
|
+
"--reuse-message",
|
|
27563
|
+
"--reedit-message",
|
|
27564
|
+
"--author",
|
|
27565
|
+
"--date",
|
|
27566
|
+
"--trailer",
|
|
27567
|
+
"-t",
|
|
27568
|
+
"--template",
|
|
27569
|
+
"--cleanup",
|
|
27570
|
+
"--fixup",
|
|
27571
|
+
"--squash",
|
|
27572
|
+
"-o",
|
|
27573
|
+
"--push-option",
|
|
27574
|
+
"--repo",
|
|
27575
|
+
"--receive-pack",
|
|
27576
|
+
"--exec"
|
|
27577
|
+
]),
|
|
27578
|
+
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"])),
|
|
27579
|
+
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"]))
|
|
27580
|
+
};
|
|
27479
27581
|
// packages/workit-core/src/hooks/hosts/fields.ts
|
|
27480
|
-
var
|
|
27582
|
+
var SHELLS2 = new Set(["sh", "bash", "zsh", "dash", "pwsh", "powershell", "cmd"]);
|
|
27481
27583
|
var WRITE_TOOLS = new Set([
|
|
27482
27584
|
"write",
|
|
27483
27585
|
"edit",
|
|
@@ -27503,7 +27605,13 @@ var CLAUDE_JUDGES = new Set(["workit:verifier", "workit:reviewer"]);
|
|
|
27503
27605
|
// packages/workit-core/src/hooks/hosts/claude-code.ts
|
|
27504
27606
|
var SOURCES = new Set(["startup", "resume", "clear", "compact", "fork"]);
|
|
27505
27607
|
var SHELL_TOOLS = new Set(["Bash", "PowerShell"]);
|
|
27506
|
-
var CONTEXT_EVENTS = new Set([
|
|
27608
|
+
var CONTEXT_EVENTS = new Set([
|
|
27609
|
+
"SessionStart",
|
|
27610
|
+
"UserPromptSubmit",
|
|
27611
|
+
"SubagentStart",
|
|
27612
|
+
"PreToolUse",
|
|
27613
|
+
"PostToolUse"
|
|
27614
|
+
]);
|
|
27507
27615
|
|
|
27508
27616
|
// packages/workit-core/src/hooks/hosts/codex.ts
|
|
27509
27617
|
function detectCodexSurface(env) {
|
|
@@ -27522,7 +27630,7 @@ var CODEX_DESCRIPTOR = {
|
|
|
27522
27630
|
"shell.pre": { support: "native", native: "PreToolUse" },
|
|
27523
27631
|
"tool.pre": { support: "native", native: "PreToolUse" },
|
|
27524
27632
|
"write.pre": { support: "undocumented", native: null },
|
|
27525
|
-
"shell.post":
|
|
27633
|
+
"shell.post": { support: "native", native: "PostToolUse" },
|
|
27526
27634
|
"subagent.start": { support: "native", native: "SubagentStart" },
|
|
27527
27635
|
"subagent.stop": { support: "native", native: "SubagentStop" },
|
|
27528
27636
|
"prompt.submit": undocumented,
|
|
@@ -27543,7 +27651,7 @@ var CODEX_DESCRIPTOR = {
|
|
|
27543
27651
|
worktreeIsolation: "undocumented",
|
|
27544
27652
|
maxConcurrency: "undocumented"
|
|
27545
27653
|
},
|
|
27546
|
-
provenance: { sessionId: "native", agentIdOnTool: "partial", postToolObserve: "
|
|
27654
|
+
provenance: { sessionId: "native", agentIdOnTool: "partial", postToolObserve: "native" },
|
|
27547
27655
|
interaction: { questions: "none", writeBoundary: "partial" },
|
|
27548
27656
|
stopControl: "undocumented",
|
|
27549
27657
|
shellAvailable: "native",
|