@workit-dev/codex 2.21.10 → 2.22.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.
|
@@ -18679,26 +18679,34 @@ var normalizedUrl = (url, dir) => {
|
|
|
18679
18679
|
const value = scheme ? trimmed.slice(scheme[0].length).replace(/^[^@/]*@/, "").replace(/^([^/:]+):\d+(?=\/)/, "$1") : trimmed.replace(/^[^@/]*@/, "").replace(":", "/");
|
|
18680
18680
|
return value.toLowerCase().replace(/\/{2,}/g, "/").replace(/^www\./, "").replace(/\/+$/, "").replace(/\.git$/, "");
|
|
18681
18681
|
};
|
|
18682
|
-
var
|
|
18683
|
-
|
|
18684
|
-
|
|
18685
|
-
|
|
18686
|
-
|
|
18687
|
-
|
|
18688
|
-
|
|
18689
|
-
|
|
18690
|
-
|
|
18691
|
-
best = { base, prefix };
|
|
18692
|
-
}
|
|
18693
|
-
if (best)
|
|
18694
|
-
return best.base + url.slice(best.prefix.length);
|
|
18682
|
+
var rewrite = (url, config, kind) => {
|
|
18683
|
+
let best = null;
|
|
18684
|
+
for (const [key, prefixes] of config) {
|
|
18685
|
+
if (!key.startsWith("url.") || !key.endsWith(`.${kind}`))
|
|
18686
|
+
continue;
|
|
18687
|
+
const base = key.slice(4, -(kind.length + 1));
|
|
18688
|
+
for (const prefix of prefixes)
|
|
18689
|
+
if (url.startsWith(prefix) && prefix.length > (best?.prefix.length ?? -1))
|
|
18690
|
+
best = { base, prefix };
|
|
18695
18691
|
}
|
|
18696
|
-
return url;
|
|
18692
|
+
return best ? best.base + url.slice(best.prefix.length) : null;
|
|
18697
18693
|
};
|
|
18698
|
-
var
|
|
18699
|
-
|
|
18700
|
-
|
|
18694
|
+
var rewrittenUrl = (url, config) => rewrite(url, config, "pushinsteadof") ?? rewrite(url, config, "insteadof") ?? url;
|
|
18695
|
+
var pushUrlsOf = (config, remote) => {
|
|
18696
|
+
const pushurls = config.get(`remote.${remote}.pushurl`) ?? [];
|
|
18697
|
+
if (pushurls.length)
|
|
18698
|
+
return pushurls.map((url) => rewrite(url, config, "insteadof") ?? url);
|
|
18699
|
+
const urls = config.get(`remote.${remote}.url`) ?? [remote];
|
|
18700
|
+
const aliased = urls.flatMap((url) => rewrite(url, config, "pushinsteadof") ?? []);
|
|
18701
|
+
return aliased.length ? aliased : urls.map((url) => rewrite(url, config, "insteadof") ?? url);
|
|
18701
18702
|
};
|
|
18703
|
+
var singlePushUrl = (config, remote) => {
|
|
18704
|
+
if (!config.has(`remote.${remote}.url`) && !config.has(`remote.${remote}.pushurl`))
|
|
18705
|
+
return null;
|
|
18706
|
+
const urls = pushUrlsOf(config, remote);
|
|
18707
|
+
return urls.length === 1 ? urls[0] : null;
|
|
18708
|
+
};
|
|
18709
|
+
var pushUrl = (config, remote, dir) => normalizedUrl(pushUrlsOf(config, remote).at(-1) ?? remote, dir);
|
|
18702
18710
|
var pushRemoteOf = (config, branch) => {
|
|
18703
18711
|
const remotes = new Set;
|
|
18704
18712
|
for (const key of config.keys()) {
|
|
@@ -19143,20 +19151,18 @@ var forgeRepo = (gh, named, env, config, branch, dir) => {
|
|
|
19143
19151
|
const hosted = gh ? parts.length > 2 : parts.length > 2 && parts[0].includes(".");
|
|
19144
19152
|
let url = /:\/\/|@/.test(repo) ? repo : parts.length > 1 ? `https://${hosted ? "" : `${host}/`}${repo}` : "";
|
|
19145
19153
|
if (!repo) {
|
|
19146
|
-
const
|
|
19147
|
-
|
|
19154
|
+
const pushHost = pushHostOf(config, pushRemoteOf(config, branch) ?? "origin");
|
|
19155
|
+
const remote = (gh ? ghDefaultOf(config, pushHost, dir, env) : null) ?? ["upstream", "origin"].find((name) => config.has(`remote.${name}.url`) && (name === "origin" || pushHost === null || pushHostOf(config, name) === pushHost));
|
|
19156
|
+
url = remote ? pushUrlsOf(config, remote).at(-1) ?? "" : "";
|
|
19148
19157
|
}
|
|
19149
19158
|
const key = remoteKey(url);
|
|
19150
19159
|
return key ? { remotes: [{ name: "forge", url, key }] } : Error("its repository is unknown");
|
|
19151
19160
|
};
|
|
19152
19161
|
var pushHostOf = (config, remote) => {
|
|
19153
|
-
const
|
|
19154
|
-
|
|
19155
|
-
return null;
|
|
19156
|
-
return remoteKey(rewrittenUrl(urls[0], config))?.split("/")[0] ?? null;
|
|
19162
|
+
const url = singlePushUrl(config, remote);
|
|
19163
|
+
return url === null ? null : remoteKey(url)?.split("/")[0] ?? null;
|
|
19157
19164
|
};
|
|
19158
|
-
var ghDefaultOf = (config,
|
|
19159
|
-
const pushHost = pushHostOf(config, pushRemoteOf(config, branch) ?? "origin");
|
|
19165
|
+
var ghDefaultOf = (config, pushHost, dir, env) => {
|
|
19160
19166
|
for (const [key, value] of localGhResolved(dir, env)) {
|
|
19161
19167
|
const name = key.slice(7, -12);
|
|
19162
19168
|
if (!name || value !== "base")
|
package/dist/workit-hook.js
CHANGED
|
@@ -101,7 +101,7 @@ if (quiet) {
|
|
|
101
101
|
`);
|
|
102
102
|
} else {
|
|
103
103
|
try {
|
|
104
|
-
const { runCodexHook } = await import("./workit-hook-
|
|
104
|
+
const { runCodexHook } = await import("./workit-hook-teys17gm.js");
|
|
105
105
|
await runCodexHook([payload]);
|
|
106
106
|
} catch (error) {
|
|
107
107
|
const { answerRuntimeFailure } = await import("./workit-hook-52cm7mqd.js");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workit-dev/codex",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.22.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Workit Codex CLI/desktop plugin — shared MCP transport, hooks, method skills, and verifier/reviewer/implementer agents",
|
|
6
6
|
"keywords": [
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"build": "bun scripts/build.ts"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@workit-dev/core": "^2.
|
|
45
|
-
"@workit-dev/mcp": "^2.
|
|
44
|
+
"@workit-dev/core": "^2.22.1",
|
|
45
|
+
"@workit-dev/mcp": "^2.22.1"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
48
48
|
"node": ">=24"
|