@brainervirus/workit-cli 8.12.1 → 8.12.3
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/index.js +69 -14
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -65,7 +65,7 @@ var package_default;
|
|
|
65
65
|
var init_package = __esm(() => {
|
|
66
66
|
package_default = {
|
|
67
67
|
name: "@brainervirus/workit-cli",
|
|
68
|
-
version: "8.12.
|
|
68
|
+
version: "8.12.3",
|
|
69
69
|
private: false,
|
|
70
70
|
description: "Workit CLI — setup wizard, doctor, and task control for agentic coding workflows",
|
|
71
71
|
keywords: [
|
|
@@ -103,9 +103,9 @@ var init_package = __esm(() => {
|
|
|
103
103
|
},
|
|
104
104
|
dependencies: {
|
|
105
105
|
"@babel/parser": "7.29.9",
|
|
106
|
-
"@brainervirus/workit-core": "^8.12.
|
|
107
|
-
"@brainervirus/workit-cursor": "^8.12.
|
|
108
|
-
"@brainervirus/workit-opencode": "^8.12.
|
|
106
|
+
"@brainervirus/workit-core": "^8.12.3",
|
|
107
|
+
"@brainervirus/workit-cursor": "^8.12.3",
|
|
108
|
+
"@brainervirus/workit-opencode": "^8.12.3",
|
|
109
109
|
"@inkjs/ui": "2.0.0",
|
|
110
110
|
ink: "7.1.1",
|
|
111
111
|
react: "19.2.8"
|
|
@@ -17303,17 +17303,48 @@ var init_branch = __esm(() => {
|
|
|
17303
17303
|
var init_session_marker = __esm(() => {
|
|
17304
17304
|
init_paths();
|
|
17305
17305
|
});
|
|
17306
|
+
|
|
17307
|
+
// packages/workit-core/src/hooks/shell-words.ts
|
|
17308
|
+
var init_shell_words = () => {};
|
|
17309
|
+
|
|
17306
17310
|
// packages/workit-core/src/hooks/raw-git.ts
|
|
17307
|
-
var SHELLS,
|
|
17311
|
+
var SHELLS, POWERSHELLS, EVALS, WRAPPERS, WRAPPER_VALUES, KEYWORDS, DECLARATIONS, CD, PUSHD, POPD, GIT_VALUE_OPTIONS, GIT_CONFIG_OPTIONS, XARGS_VALUES, PARALLEL_VALUES, RECENT, LAUNCHERS, PUSH_VALUE_OPTIONS, VALUE_OPTIONS, API_VALUES, API_FIELDS, GIT_COMMANDS;
|
|
17308
17312
|
var init_raw_git = __esm(() => {
|
|
17309
17313
|
init_branch();
|
|
17310
17314
|
init_workspaces();
|
|
17311
|
-
init_rev();
|
|
17312
17315
|
init_ledger();
|
|
17313
17316
|
init_paths();
|
|
17314
17317
|
init_session_marker();
|
|
17315
|
-
|
|
17316
|
-
|
|
17318
|
+
init_shell_words();
|
|
17319
|
+
SHELLS = new Set(["sh", "bash", "zsh", "dash", "ksh", "ash", "mksh", "yash", "fish"]);
|
|
17320
|
+
POWERSHELLS = new Set(["pwsh", "powershell"]);
|
|
17321
|
+
EVALS = new Set(["eval", "iex", "invoke-expression"]);
|
|
17322
|
+
WRAPPERS = {
|
|
17323
|
+
sudo: { values: "-u -g -h -p -C -D -R -T -r -t -U --user --group --host --prompt --chdir" },
|
|
17324
|
+
doas: { values: "-u -C" },
|
|
17325
|
+
command: { values: "" },
|
|
17326
|
+
builtin: { values: "" },
|
|
17327
|
+
env: { values: "-u -C --unset --chdir" },
|
|
17328
|
+
nohup: { values: "" },
|
|
17329
|
+
setsid: { values: "" },
|
|
17330
|
+
time: { values: "-f -o --format --output" },
|
|
17331
|
+
exec: { values: "-a" },
|
|
17332
|
+
nice: { values: "-n --adjustment" },
|
|
17333
|
+
ionice: { values: "-c -n -p --class --classdata" },
|
|
17334
|
+
stdbuf: { values: "-i -o -e --input --output --error" },
|
|
17335
|
+
chronic: { values: "" },
|
|
17336
|
+
unbuffer: { values: "" },
|
|
17337
|
+
wsl: { values: "-d -u --cd --distribution --user" },
|
|
17338
|
+
timeout: { values: "-s -k --signal --kill-after", operands: 1 },
|
|
17339
|
+
flock: { values: "-w -E --timeout --conflict-exit-code", operands: 1 },
|
|
17340
|
+
coproc: { values: "" },
|
|
17341
|
+
taskset: { values: "", operands: 1 },
|
|
17342
|
+
watch: { values: "-n -d --interval --differences -q --equexit" },
|
|
17343
|
+
"&": { values: "" }
|
|
17344
|
+
};
|
|
17345
|
+
WRAPPER_VALUES = new Map(Object.entries(WRAPPERS).map(([name, wrapper]) => [name, new Set(wrapper.values.split(" "))]));
|
|
17346
|
+
KEYWORDS = new Set(["if", "then", "else", "elif", "while", "until", "do", "!", "{"]);
|
|
17347
|
+
DECLARATIONS = new Set(["export", "local", "declare", "readonly", "typeset"]);
|
|
17317
17348
|
CD = new Set(["cd", "chdir", "set-location", "sl"]);
|
|
17318
17349
|
PUSHD = new Set(["pushd", "push-location"]);
|
|
17319
17350
|
POPD = new Set(["popd", "pop-location"]);
|
|
@@ -17326,6 +17357,17 @@ var init_raw_git = __esm(() => {
|
|
|
17326
17357
|
"--config-env",
|
|
17327
17358
|
"--super-prefix"
|
|
17328
17359
|
]);
|
|
17360
|
+
GIT_CONFIG_OPTIONS = new Set(["-c", "--config-env", "--git-dir"]);
|
|
17361
|
+
XARGS_VALUES = new Set(["-n", "-L", "-l", "-P", "-d", "-E", "-e", "-s", "-a", "--arg-file", "--delimiter"].concat([
|
|
17362
|
+
"--max-args",
|
|
17363
|
+
"--max-lines",
|
|
17364
|
+
"--max-procs",
|
|
17365
|
+
"--eof",
|
|
17366
|
+
"--max-chars",
|
|
17367
|
+
"--process-slot-var"
|
|
17368
|
+
]));
|
|
17369
|
+
PARALLEL_VALUES = new Set(["-j", "--jobs", "-N", "-n", "-S", "--sshlogin", "-P", "--delay"]);
|
|
17370
|
+
RECENT = new Map;
|
|
17329
17371
|
LAUNCHERS = new Set([
|
|
17330
17372
|
"npx",
|
|
17331
17373
|
"bunx",
|
|
@@ -17367,19 +17409,29 @@ var init_raw_git = __esm(() => {
|
|
|
17367
17409
|
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"])),
|
|
17368
17410
|
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"]))
|
|
17369
17411
|
};
|
|
17412
|
+
API_VALUES = new Set(["--method", "--header", "--raw-field", "--field", "--jq", "--template", "--input"].concat([
|
|
17413
|
+
"--hostname",
|
|
17414
|
+
"--preview",
|
|
17415
|
+
"--cache",
|
|
17416
|
+
"--output"
|
|
17417
|
+
]));
|
|
17418
|
+
API_FIELDS = new Set(["-f", "-F", "--raw-field", "--field"]);
|
|
17419
|
+
GIT_COMMANDS = new Set(("add am annotate apply archive bisect blame branch bugreport bundle cat-file check-attr " + "check-ignore check-mailmap check-ref-format checkout checkout-index cherry cherry-pick " + "citool clean clone column commit commit-graph commit-tree config count-objects credential " + "daemon describe diagnose diff diff-files diff-index diff-tree difftool fast-export " + "fast-import fetch fetch-pack filter-branch fmt-merge-msg for-each-ref for-each-repo " + "format-patch fsck gc get-tar-commit-id grep gui hash-object help hook index-pack init " + "instaweb interpret-trailers lfs log ls-files ls-remote ls-tree mailinfo mailsplit " + "maintenance merge merge-base merge-file merge-index merge-tree mergetool mktag mktree " + "multi-pack-index mv name-rev notes pack-objects pack-refs patch-id prune pull push " + "range-diff read-tree rebase reflog remote repack replace request-pull rerere reset " + "restore rev-list rev-parse revert rm send-email shortlog show show-branch show-ref " + "sparse-checkout stage stash status stripspace submodule subtree switch symbolic-ref tag " + "update-index update-ref var verify-commit verify-pack verify-tag version whatchanged " + "worktree write-tree").split(" "));
|
|
17370
17420
|
});
|
|
17371
17421
|
|
|
17372
17422
|
// packages/workit-core/src/core/route-intent.ts
|
|
17373
|
-
var SWITCH_CREATE, CHECKOUT_CREATE, WORKTREE_CREATE, BRANCH_NO_CREATE, BRANCH_RENAME, WORKTREE_VALUES;
|
|
17423
|
+
var SWITCH_CREATE, CHECKOUT_CREATE, WORKTREE_CREATE, SUBTREE_CREATE, BRANCH_NO_CREATE, BRANCH_RENAME, WORKTREE_VALUES, FETCH_VALUES;
|
|
17374
17424
|
var init_route_intent = __esm(() => {
|
|
17375
17425
|
init_raw_git();
|
|
17376
17426
|
init_branch();
|
|
17377
17427
|
SWITCH_CREATE = new Set(["-c", "--create", "-C", "--force-create", "--orphan"]);
|
|
17378
17428
|
CHECKOUT_CREATE = new Set(["-b", "-B", "--orphan"]);
|
|
17379
17429
|
WORKTREE_CREATE = new Set(["-b", "-B"]);
|
|
17430
|
+
SUBTREE_CREATE = new Set(["-b", "--branch"]);
|
|
17380
17431
|
BRANCH_NO_CREATE = new Set(["-d", "-D", "--delete", "-l", "--list", "-a", "--all", "-r", "--remotes", "--show-current"].concat(["-v", "-vv", "--verbose", "--contains", "--no-contains", "--merged", "--no-merged"]).concat(["--points-at", "--sort", "--format", "--column", "--no-column", "-u"]).concat(["--set-upstream-to", "--unset-upstream", "--edit-description", "-i", "--ignore-case"]));
|
|
17381
17432
|
BRANCH_RENAME = new Set(["-m", "-M", "--move", "-c", "-C", "--copy"]);
|
|
17382
17433
|
WORKTREE_VALUES = new Set(["--reason"]);
|
|
17434
|
+
FETCH_VALUES = new Set(["--depth", "--deepen", "--shallow-since", "--shallow-exclude", "--refmap", "-j", "--jobs"].concat(["--upload-pack", "-o", "--server-option", "--negotiation-tip", "--filter"]).concat(["--recurse-submodules-default", "--submodule-prefix", "-s", "--strategy", "-X"]).concat(["--strategy-option"]));
|
|
17383
17435
|
});
|
|
17384
17436
|
|
|
17385
17437
|
// packages/workit-core/src/core/runtime-identity.ts
|
|
@@ -73003,7 +73055,7 @@ async function runGrant(argv, io, deps = defaultDeps) {
|
|
|
73003
73055
|
return usage2(io, `unknown subcommand "${sub}"`);
|
|
73004
73056
|
}
|
|
73005
73057
|
var USAGE2 = "workit grant show [<workspace>] [--all] | grant set <workspace> <kind>=<true|false|verified>… [defaultEndpoint=commit|pr|green|merged] [verification=self|independent] | grant unset <workspace> <kind>… (kinds: push, pr, merge, release, rerun, defaultEndpoint, verification)", AGENT_ENV, agentMarker = (env) => AGENT_ENV.find((name) => env[name]) ?? Object.keys(env).find((name) => name.startsWith("CODEX_") && env[name]), defaultDeps, parseValue = (raw) => raw === "true" || raw === "yes" || raw === "on" ? true : raw === "false" || raw === "no" || raw === "off" ? false : raw === "verified" ? "verified" : null, STOPS_AT, endpointLabel = (view) => view.effectiveEndpoint === view.defaultEndpoint ? view.defaultEndpoint : `${view.defaultEndpoint} (effective: ${view.effectiveEndpoint}${view.endpointReason ? `, ${view.endpointReason}` : ""})`, describe2 = (grants, configured, endpoint, verification) => [
|
|
73006
|
-
...GRANT_KINDS.map((kind) => ` ${kind.padEnd(8)}${String(grants[kind]).padEnd(10)}${configured.includes(kind) ? "configured" : "default"}${kind === "release" ? " (workit git push --release: git-flow main and develop, landed
|
|
73058
|
+
...GRANT_KINDS.map((kind) => ` ${kind.padEnd(8)}${String(grants[kind]).padEnd(10)}${configured.includes(kind) ? "configured" : "default"}${kind === "release" ? " (workit git push --release: git-flow main and develop, landed release tags)" : ""}`),
|
|
73007
73059
|
` default endpoint: ${endpointLabel(endpoint)} (an unnamed request stops at ${STOPS_AT[endpoint.effectiveEndpoint]})`,
|
|
73008
73060
|
...endpoint.endpointIssue ? [` note: ${endpoint.endpointIssue}`] : [],
|
|
73009
73061
|
` verification: ${verification} (${verification === "independent" ? "a normal-risk behavior change needs a non-author verdict" : "a normal-risk behavior change needs a passing check and the author's --self verdict, shown as self-reviewed"})`
|
|
@@ -74595,8 +74647,9 @@ function releasePushPreflight(cwd, names) {
|
|
|
74595
74647
|
if (tag && branch)
|
|
74596
74648
|
return failure3("invalid_input", `${raw} names both a branch and a tag`, `workit git push --release refs/heads/${raw} # or refs/tags/${raw}`);
|
|
74597
74649
|
if (tag) {
|
|
74598
|
-
|
|
74599
|
-
|
|
74650
|
+
const prefix = releaseTagPrefix(cwd);
|
|
74651
|
+
if (!isReleaseTag(tagName, prefix))
|
|
74652
|
+
return failure3("blocked", `release_push_refused: tag ${tagName} is not a release tag (${prefix}<version>, from ${prefix === "v" ? "the default" : "gitflow.prefix.versiontag"})`, `git tag -a ${prefix}<version> -m <message> # then: workit git push --release ${prefix}<version>`);
|
|
74600
74653
|
refs.push({ kind: "tag", name: tagName, ref: `refs/tags/${tagName}`, sha: tag });
|
|
74601
74654
|
continue;
|
|
74602
74655
|
}
|
|
@@ -74759,7 +74812,10 @@ ${run.stdout ?? ""}`).split(/\r?\n/u).map((value) => value.trimEnd()).filter((va
|
|
|
74759
74812
|
...lines.slice(-half)
|
|
74760
74813
|
].join(`
|
|
74761
74814
|
`);
|
|
74762
|
-
}, validRefName = (cwd, name) => !name.startsWith("-") && git5(cwd, ["check-ref-format", "--branch", name]).ok, nulList = (text) => text.split("\x00").filter(Boolean), SESSION_SAFE, EXTRA_TRAILER, SESSION_KEY, TRAILER_LINE, sessionValues = (trailers) => trailers.filter((trailer) => SESSION_KEY.test(trailer)).map((trailer) => trailer.slice(trailer.indexOf(":") + 1).trim()), TRAILER_CONFIG, nothingToCommit = (what) => failure3("failed", `nothing_to_commit: ${what}`, "workit git commit --allow-empty -m '<msg>' # only to record an empty commit on purpose"), SHA, SHA_PREFIX,
|
|
74815
|
+
}, validRefName = (cwd, name) => !name.startsWith("-") && git5(cwd, ["check-ref-format", "--branch", name]).ok, nulList = (text) => text.split("\x00").filter(Boolean), SESSION_SAFE, EXTRA_TRAILER, SESSION_KEY, TRAILER_LINE, sessionValues = (trailers) => trailers.filter((trailer) => SESSION_KEY.test(trailer)).map((trailer) => trailer.slice(trailer.indexOf(":") + 1).trim()), TRAILER_CONFIG, nothingToCommit = (what) => failure3("failed", `nothing_to_commit: ${what}`, "workit git commit --allow-empty -m '<msg>' # only to record an empty commit on purpose"), SHA, SHA_PREFIX, releaseTagPrefix = (cwd) => {
|
|
74816
|
+
const configured = git5(cwd, ["config", "--get", "gitflow.prefix.versiontag"]);
|
|
74817
|
+
return configured.ok ? configured.stdout.trim() : "v";
|
|
74818
|
+
}, isReleaseTag = (name, prefix) => name.startsWith(prefix) && /^\d/u.test(name.slice(prefix.length));
|
|
74763
74819
|
var init_ops = __esm(() => {
|
|
74764
74820
|
init_branch();
|
|
74765
74821
|
init_commit_flavors();
|
|
@@ -74778,7 +74834,6 @@ var init_ops = __esm(() => {
|
|
|
74778
74834
|
TRAILER_CONFIG = ["-c", "trailer.separators=:", "-c", "trailer.where=end"];
|
|
74779
74835
|
SHA = /^[0-9a-f]{40,64}$/u;
|
|
74780
74836
|
SHA_PREFIX = /^[0-9a-f]{7,39}$/u;
|
|
74781
|
-
RELEASE_TAG = /^v\d/u;
|
|
74782
74837
|
});
|
|
74783
74838
|
|
|
74784
74839
|
// packages/workit-core/src/forge/reruns.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brainervirus/workit-cli",
|
|
3
|
-
"version": "8.12.
|
|
3
|
+
"version": "8.12.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Workit CLI — setup wizard, doctor, and task control for agentic coding workflows",
|
|
6
6
|
"keywords": [
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@babel/parser": "7.29.9",
|
|
41
|
-
"@brainervirus/workit-core": "^8.12.
|
|
42
|
-
"@brainervirus/workit-cursor": "^8.12.
|
|
43
|
-
"@brainervirus/workit-opencode": "^8.12.
|
|
41
|
+
"@brainervirus/workit-core": "^8.12.3",
|
|
42
|
+
"@brainervirus/workit-cursor": "^8.12.3",
|
|
43
|
+
"@brainervirus/workit-opencode": "^8.12.3",
|
|
44
44
|
"@inkjs/ui": "2.0.0",
|
|
45
45
|
"ink": "7.1.1",
|
|
46
46
|
"react": "19.2.8"
|