@workit-dev/opencode 2.16.1 → 2.16.2
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.
|
@@ -31,7 +31,7 @@ denial, a review comment that needs a product decision, a required update
|
|
|
31
31
|
that repeats because the base keeps moving, or after 3 failed fix attempts on
|
|
32
32
|
the same check. Fix round and recheck both failed: the decider agent (call the skill tool with `workit-fanout`).
|
|
33
33
|
|
|
34
|
-
1. **Open.** Last before the PR, if `workit grant show` has `changelog: update|create`:
|
|
34
|
+
1. **Open.** Last before the PR, if `workit grant show` has `changelog: update|create`: pass the Unreleased entry as `workit pr create … --changelog "<Section>: <entry>"` (it commits and pushes it); with `docs: when-user-facing` fix only docs the diff made false (`references/changelog.md`).
|
|
35
35
|
Full local check (`workit check ci` when `.workit/checks.json` has a `ci` group), push once: `workit git push`, then `workit pr template` and fill the template it prints: every heading, each `<!-- -->` replaced (Workit's: `references/pr-body.md`).
|
|
36
36
|
`workit pr create --title "<title>" --body-file <f|->` refuses a body that leaves a repo template (or `prTemplate: workit`) unfilled; add `--issue <#n|ID>` (`--refs`: no close; `workit pr edit`).
|
|
37
37
|
YouTrack issue work: `workit youtrack …` (`--help`; the `ytrack` skill for the rest). A draft that needs the user's yes (YouTrack text, release notes, a PR body they asked to review): paste it whole in chat before asking, never only its path, and again after every edit (the verb prints the diff and the new text).
|
|
@@ -17,19 +17,23 @@ belongs to). Otherwise:
|
|
|
17
17
|
do, not with internals: "Added: `workit pr create --no-changelog <reason>`
|
|
18
18
|
skips the changelog check with a recorded reason", not "refactor gate
|
|
19
19
|
module".
|
|
20
|
-
2.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
2. Open the PR with the entry in the same call:
|
|
21
|
+
`workit pr create … --changelog "<Section>: <entry>"` (sections: Added,
|
|
22
|
+
Changed, Deprecated, Removed, Fixed, Security). It merges the bullet into
|
|
23
|
+
`## [Unreleased]` of the right file (creating a missing Keep a Changelog
|
|
24
|
+
file), commits it with a subject commitlint accepts, pushes and opens the
|
|
25
|
+
PR. Never clobber CHANGELOG.md: never rewrite, reorder or delete an
|
|
25
26
|
existing entry, and never hand-edit released sections.
|
|
26
|
-
3.
|
|
27
|
-
|
|
27
|
+
3. With no PR to open yet, apply it alone with
|
|
28
|
+
`workit changelog apply --entries '{"Added": ["…"]}'` (`--path <file>` when
|
|
29
|
+
it is not the root CHANGELOG.md), then commit it
|
|
30
|
+
(`workit git commit -m "<message>" -- <file>`) with the change and push.
|
|
28
31
|
|
|
29
32
|
`workit pr create` refuses a user-facing PR without a new Unreleased bullet
|
|
30
|
-
(`changelog_required`)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
(`changelog_required`); its `Retry as:` line is your call plus
|
|
34
|
+
`--changelog "<Section>: <what users can now do>"`: fill in the entry and run
|
|
35
|
+
it. When the PR truly needs no entry, pass `--no-changelog "<why>"`: the
|
|
36
|
+
reason is written into the PR body.
|
|
33
37
|
|
|
34
38
|
## Docs (`docs: when-user-facing`)
|
|
35
39
|
|
package/dist/plugin.js
CHANGED
|
@@ -11384,10 +11384,12 @@ function judgeBranch(cwd) {
|
|
|
11384
11384
|
const branch = currentBranch(cwd);
|
|
11385
11385
|
return branch && !isProtectedTarget(cwd, branch) ? branch : null;
|
|
11386
11386
|
}
|
|
11387
|
+
var shellQuote = (value) => /^[\w@%+=:,./-]+$/u.test(value) ? value : `'${value.replaceAll("'", `'\\''`)}'`;
|
|
11387
11388
|
function verdictCommand(options) {
|
|
11388
11389
|
const kind = options.judge === "verifier" ? "<live|unit>" : options.judge === "reviewer" ? "review" : "<live|unit|review>";
|
|
11389
11390
|
return [
|
|
11390
11391
|
"workit ledger verdict <verified|failed|blocked>",
|
|
11392
|
+
options.cwd ? `--cwd ${shellQuote(options.cwd)}` : null,
|
|
11391
11393
|
`--kind ${kind}`,
|
|
11392
11394
|
`--branch ${options.branch ?? "<branch>"}`,
|
|
11393
11395
|
options.session ? `--session ${options.session}` : null,
|
|
@@ -20827,9 +20829,9 @@ var autocorrected = (name, config) => {
|
|
|
20827
20829
|
}
|
|
20828
20830
|
return tie ? null : best;
|
|
20829
20831
|
};
|
|
20830
|
-
var
|
|
20832
|
+
var shellQuote2 = (word) => `'${word.replaceAll("'", "'\\''")}'`;
|
|
20831
20833
|
var positional = (script, args) => {
|
|
20832
|
-
const word = (arg) => /^[\w./@+:=-]+$/.test(arg) ? arg :
|
|
20834
|
+
const word = (arg) => /^[\w./@+:=-]+$/.test(arg) ? arg : shellQuote2(arg);
|
|
20833
20835
|
return script.replace(/\$\{?([1-9])\}?/g, (_, n) => word(args[Number(n) - 1] ?? "")).replace(/\$\{?[@*]\}?/g, args.map(word).join(" "));
|
|
20834
20836
|
};
|
|
20835
20837
|
var expandGitAliases = (root, invocation, cache = new Map, depth = 0) => {
|
|
@@ -20846,7 +20848,7 @@ var expandGitAliases = (root, invocation, cache = new Map, depth = 0) => {
|
|
|
20846
20848
|
return corrected ? [{ ...invocation, args: [corrected, ...invocation.args.slice(1)] }] : [invocation];
|
|
20847
20849
|
}
|
|
20848
20850
|
const rest = invocation.args.slice(1);
|
|
20849
|
-
const expanded = alias.startsWith("!") ? rawInvocations([positional(alias.slice(1), rest), ...rest.map(
|
|
20851
|
+
const expanded = alias.startsWith("!") ? rawInvocations([positional(alias.slice(1), rest), ...rest.map(shellQuote2)].join(" ")).map((inner) => ({
|
|
20850
20852
|
...inner,
|
|
20851
20853
|
dir: rebase(invocation.dir, inner.dir),
|
|
20852
20854
|
...inner.tool === "git" && (invocation.config || inner.config) ? { config: [...invocation.config ?? [], ...inner.config ?? []] } : {},
|
|
@@ -21173,7 +21175,7 @@ var policyDeclared = () => {
|
|
|
21173
21175
|
return false;
|
|
21174
21176
|
}
|
|
21175
21177
|
};
|
|
21176
|
-
var word = (text) => /^[\w./@%+:,=-]+$/u.test(text) ? text :
|
|
21178
|
+
var word = (text) => /^[\w./@%+:,=-]+$/u.test(text) ? text : shellQuote2(text);
|
|
21177
21179
|
var HEREDOC = /^cat <<(['"])(\w+)\1\n([\s\S]*)\n\2\n?$/u;
|
|
21178
21180
|
var messageOf = (segment, index) => {
|
|
21179
21181
|
const text = segment.words[index];
|
|
@@ -21257,7 +21259,7 @@ var cdCommitCall = (input, command, target, repo) => {
|
|
|
21257
21259
|
}
|
|
21258
21260
|
return [
|
|
21259
21261
|
`workit git --cwd ${word(target)} commit`,
|
|
21260
|
-
...messages.map((message) => `-m ${
|
|
21262
|
+
...messages.map((message) => `-m ${shellQuote2(message)}`),
|
|
21261
21263
|
...allowEmpty ? ["--allow-empty"] : [],
|
|
21262
21264
|
all ? "--all" : `-- ${[...new Set(paths)].map(word).join(" ")}`
|
|
21263
21265
|
].join(" ");
|
|
@@ -25094,6 +25096,7 @@ var isAllowedWorkitCall = (words, expands = []) => {
|
|
|
25094
25096
|
return false;
|
|
25095
25097
|
return !words.slice(0, limit).some(isBypass) && !expands.some((index) => index < limit);
|
|
25096
25098
|
};
|
|
25099
|
+
var helpOnly = (call, needle) => call.length > needle.length && needle.every((word, index) => call[index] === word) && call.slice(needle.length).every((word) => word === "--help" || word === "-h");
|
|
25097
25100
|
var userOnlyWorkitCall = (command, dialect = "posix") => {
|
|
25098
25101
|
if (!mayRunUserOnly(command))
|
|
25099
25102
|
return null;
|
|
@@ -25120,7 +25123,7 @@ var userOnlyWorkitCall = (command, dialect = "posix") => {
|
|
|
25120
25123
|
}
|
|
25121
25124
|
const call = args.slice(at);
|
|
25122
25125
|
const found = WORKIT_USER_ONLY.find((needle) => call[0] === needle[0] && hasWordsInOrder(call, needle));
|
|
25123
|
-
if (found)
|
|
25126
|
+
if (found && !helpOnly(call, found))
|
|
25124
25127
|
return [...found];
|
|
25125
25128
|
}
|
|
25126
25129
|
return null;
|
|
@@ -30700,7 +30703,15 @@ import path55 from "node:path";
|
|
|
30700
30703
|
|
|
30701
30704
|
// packages/workit-core/src/git/ops.ts
|
|
30702
30705
|
import { spawnSync as spawnSync27 } from "node:child_process";
|
|
30703
|
-
import {
|
|
30706
|
+
import {
|
|
30707
|
+
copyFileSync as copyFileSync3,
|
|
30708
|
+
existsSync as existsSync19,
|
|
30709
|
+
mkdirSync as mkdirSync6,
|
|
30710
|
+
readdirSync as readdirSync7,
|
|
30711
|
+
readFileSync as readFileSync16,
|
|
30712
|
+
rmSync as rmSync4,
|
|
30713
|
+
writeFileSync as writeFileSync8
|
|
30714
|
+
} from "node:fs";
|
|
30704
30715
|
import path54 from "node:path";
|
|
30705
30716
|
var COMMIT_TIMEOUT_MS = 10 * 60000;
|
|
30706
30717
|
var git5 = (cwd, args, options = {}) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workit-dev/opencode",
|
|
3
|
-
"version": "2.16.
|
|
3
|
+
"version": "2.16.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Workit OpenCode plugin — native tools, adaptive policy, and sixteen method skills",
|
|
6
6
|
"keywords": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@opencode/plugin": "2.0.18",
|
|
44
|
-
"@workit-dev/core": "^2.16.
|
|
44
|
+
"@workit-dev/core": "^2.16.2"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": ">=24"
|