@workit-dev/codex 2.21.7 → 2.21.10
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/dist/launch-mcp.js
CHANGED
|
@@ -15557,6 +15557,7 @@ var workspaceConfigSchema = object({
|
|
|
15557
15557
|
models: object({ roles: modelRoles }).passthrough().optional().describe("Model and effort per role and host (roles), the lead's own advisory model (lead), how a role model applies (enforce: advise, the default, or strict) and, under strict, whether a model the lead names on a spawn wins (allowLeadOverride, default false); the same key at the top of workspaces.json is the global default."),
|
|
15558
15558
|
resources: unknown().optional().describe("Heavy-check limits on this machine: slots, scope, heavy, light, memoryMax, cpuQuota, wait."),
|
|
15559
15559
|
remotes: array(nonBlank.refine((pattern) => remotePattern(pattern) !== null, "is not a remote URL (https://host/owner/repo, git@host:owner/repo, a path, or owner/*)")).optional().describe("Remote URLs this entry owns: a checkout pushing to or opening PRs on one never exceeds this entry's grants, wherever the folder is (`owner/*` claims a whole owner). Only the user changes it, in their own terminal."),
|
|
15560
|
+
externalRepos: array(nonBlank.regex(/^[\w-]+(?:\/\w[\w.-]*)*\/(?:\w[\w.-]*|\*)$/u, "is owner/name, group/project or owner/* on the checkout's forge host, without the host")).optional().describe("Repositories outside this workspace's own forge owners that `workit issue create|comment|close --repo` may write to: `owner/name`, or `owner/*` for a whole owner. Only the user changes it, in their own terminal."),
|
|
15560
15561
|
autonomy: object(Object.fromEntries(["push", "pr", "merge", "release", "rerun"].map((kind) => [
|
|
15561
15562
|
kind,
|
|
15562
15563
|
union([boolean2(), literal("verified")]).optional().describe(`The ${kind} grant: true, false, or "verified" (only after a verdict).`)
|
|
@@ -24908,6 +24909,7 @@ var ENTRY_KEYS = [
|
|
|
24908
24909
|
"name",
|
|
24909
24910
|
"glob",
|
|
24910
24911
|
"remotes",
|
|
24912
|
+
"externalRepos",
|
|
24911
24913
|
"vcs",
|
|
24912
24914
|
"autonomy",
|
|
24913
24915
|
"autoApprove",
|
|
@@ -7404,6 +7404,7 @@ var workspaceConfigSchema = object({
|
|
|
7404
7404
|
models: object({ roles: modelRoles }).passthrough().optional().describe("Model and effort per role and host (roles), the lead's own advisory model (lead), how a role model applies (enforce: advise, the default, or strict) and, under strict, whether a model the lead names on a spawn wins (allowLeadOverride, default false); the same key at the top of workspaces.json is the global default."),
|
|
7405
7405
|
resources: unknown().optional().describe("Heavy-check limits on this machine: slots, scope, heavy, light, memoryMax, cpuQuota, wait."),
|
|
7406
7406
|
remotes: array(nonBlank.refine((pattern) => remotePattern(pattern) !== null, "is not a remote URL (https://host/owner/repo, git@host:owner/repo, a path, or owner/*)")).optional().describe("Remote URLs this entry owns: a checkout pushing to or opening PRs on one never exceeds this entry's grants, wherever the folder is (`owner/*` claims a whole owner). Only the user changes it, in their own terminal."),
|
|
7407
|
+
externalRepos: array(nonBlank.regex(/^[\w-]+(?:\/\w[\w.-]*)*\/(?:\w[\w.-]*|\*)$/u, "is owner/name, group/project or owner/* on the checkout's forge host, without the host")).optional().describe("Repositories outside this workspace's own forge owners that `workit issue create|comment|close --repo` may write to: `owner/name`, or `owner/*` for a whole owner. Only the user changes it, in their own terminal."),
|
|
7407
7408
|
autonomy: object(Object.fromEntries(["push", "pr", "merge", "release", "rerun"].map((kind) => [
|
|
7408
7409
|
kind,
|
|
7409
7410
|
union([boolean2(), literal("verified")]).optional().describe(`The ${kind} grant: true, false, or "verified" (only after a verdict).`)
|
|
@@ -16389,6 +16390,7 @@ var ENTRY_KEYS = [
|
|
|
16389
16390
|
"name",
|
|
16390
16391
|
"glob",
|
|
16391
16392
|
"remotes",
|
|
16393
|
+
"externalRepos",
|
|
16392
16394
|
"vcs",
|
|
16393
16395
|
"autonomy",
|
|
16394
16396
|
"autoApprove",
|
|
@@ -19134,25 +19136,58 @@ function rawGitPre(input, command, options = {}) {
|
|
|
19134
19136
|
return error instanceof ShellAnalysisError ? analysisDenial(error) : NONE2;
|
|
19135
19137
|
}
|
|
19136
19138
|
}
|
|
19137
|
-
var forgeRepo = (gh, named, env, config) => {
|
|
19139
|
+
var forgeRepo = (gh, named, env, config, branch, dir) => {
|
|
19138
19140
|
const repo = explicitRepo(gh, named, env);
|
|
19139
19141
|
const host = (gh ? env.GH_HOST ?? process.env.GH_HOST ?? "github.com" : env.GITLAB_HOST ?? env.GL_HOST ?? process.env.GITLAB_HOST ?? process.env.GL_HOST ?? "gitlab.com").replace(/^\w+:\/\/|\/+$/g, "");
|
|
19140
19142
|
const parts = repo.split("/");
|
|
19141
19143
|
const hosted = gh ? parts.length > 2 : parts.length > 2 && parts[0].includes(".");
|
|
19142
19144
|
let url = /:\/\/|@/.test(repo) ? repo : parts.length > 1 ? `https://${hosted ? "" : `${host}/`}${repo}` : "";
|
|
19143
19145
|
if (!repo) {
|
|
19144
|
-
const
|
|
19145
|
-
const remote = resolved ?? ["upstream", "origin"].find((name) => config.has(`remote.${name}.url`));
|
|
19146
|
+
const remote = (gh ? ghDefaultOf(config, branch, dir, env) : null) ?? ["upstream", "origin"].find((name) => config.has(`remote.${name}.url`));
|
|
19146
19147
|
url = rewrittenUrl(configValue(config, `remote.${remote}.url`) ?? "", config);
|
|
19147
19148
|
}
|
|
19148
19149
|
const key = remoteKey(url);
|
|
19149
19150
|
return key ? { remotes: [{ name: "forge", url, key }] } : Error("its repository is unknown");
|
|
19150
19151
|
};
|
|
19152
|
+
var pushHostOf = (config, remote) => {
|
|
19153
|
+
const urls = config.get(`remote.${remote}.pushurl`) ?? config.get(`remote.${remote}.url`) ?? [];
|
|
19154
|
+
if (urls.length !== 1)
|
|
19155
|
+
return null;
|
|
19156
|
+
return remoteKey(rewrittenUrl(urls[0], config))?.split("/")[0] ?? null;
|
|
19157
|
+
};
|
|
19158
|
+
var ghDefaultOf = (config, branch, dir, env) => {
|
|
19159
|
+
const pushHost = pushHostOf(config, pushRemoteOf(config, branch) ?? "origin");
|
|
19160
|
+
for (const [key, value] of localGhResolved(dir, env)) {
|
|
19161
|
+
const name = key.slice(7, -12);
|
|
19162
|
+
if (!name || value !== "base")
|
|
19163
|
+
continue;
|
|
19164
|
+
const host = pushHostOf(config, name);
|
|
19165
|
+
return host !== null && host === pushHost ? name : null;
|
|
19166
|
+
}
|
|
19167
|
+
return null;
|
|
19168
|
+
};
|
|
19169
|
+
var localGhResolved = (dir, env) => {
|
|
19170
|
+
const values = new Map;
|
|
19171
|
+
const listed = spawnSync13("git", ["config", "--local", "-z", "--get-regexp", "^remote\\..+\\.gh-resolved$"], {
|
|
19172
|
+
cwd: dir,
|
|
19173
|
+
encoding: "utf8",
|
|
19174
|
+
timeout: 3000,
|
|
19175
|
+
windowsHide: true,
|
|
19176
|
+
env: { ...process.env, ...env }
|
|
19177
|
+
});
|
|
19178
|
+
for (const entry of (listed.stdout ?? "").split("\x00")) {
|
|
19179
|
+
const split = entry.indexOf(`
|
|
19180
|
+
`);
|
|
19181
|
+
if (split > 0)
|
|
19182
|
+
values.set(entry.slice(0, split), entry.slice(split + 1));
|
|
19183
|
+
}
|
|
19184
|
+
return values;
|
|
19185
|
+
};
|
|
19151
19186
|
var explicitRepo = (gh, named, env) => named || (gh ? env.GH_REPO ?? process.env.GH_REPO ?? "" : "");
|
|
19152
19187
|
var grantRefusal = (action, repo, invocation, cache) => {
|
|
19153
19188
|
const env = invocation.env ?? {};
|
|
19154
19189
|
const kinds = [];
|
|
19155
|
-
let target = () => forgeRepo(action.kind !== "commit" && "forge" in action && action.forge === "gh", "repo" in action && action.repo || "", env, gitConfig(repo.dir, invocation, cache));
|
|
19190
|
+
let target = () => forgeRepo(action.kind !== "commit" && "forge" in action && action.forge === "gh", "repo" in action && action.repo || "", env, gitConfig(repo.dir, invocation, cache), repo.branch, repo.dir);
|
|
19156
19191
|
if (action.kind === "push") {
|
|
19157
19192
|
target = () => {
|
|
19158
19193
|
const config = gitConfig(repo.dir, invocation, cache);
|
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-8nhm9sqf.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.21.
|
|
3
|
+
"version": "2.21.10",
|
|
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.21.
|
|
45
|
-
"@workit-dev/mcp": "^2.21.
|
|
44
|
+
"@workit-dev/core": "^2.21.10",
|
|
45
|
+
"@workit-dev/mcp": "^2.21.10"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
48
48
|
"node": ">=24"
|