@brainervirus/workit-opencode 8.29.0 → 8.29.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.
- package/dist/plugin.js +20 -17
- package/package.json +2 -2
package/dist/plugin.js
CHANGED
|
@@ -15988,13 +15988,13 @@ Autonomy contract:
|
|
|
15988
15988
|
or an unresolved blocker; report open gaps and uncertain workers.
|
|
15989
15989
|
- No endpoint named: stop at a local commit on a policy-compliant branch and
|
|
15990
15990
|
state the next command. If the request implies delivery (fix, implement,
|
|
15991
|
-
ship), go to the effective endpoint in \`workit grant show\`: \`pr\`
|
|
15992
|
-
the PR; \`green\` babysits it
|
|
15993
|
-
never merging; \`merged\`
|
|
15994
|
-
|
|
15995
|
-
|
|
15996
|
-
around grant_required. Release: \`workit release
|
|
15997
|
-
\`finish\`; \`publish\` if asked.
|
|
15991
|
+
ship), go to the effective endpoint in \`workit grant show\`: \`pr\` stops
|
|
15992
|
+
at the PR even with merge granted; \`green\` babysits it (workit-ship) to
|
|
15993
|
+
merge-ready, never merging; \`merged\` lands it with \`workit pr merge\`.
|
|
15994
|
+
Only the user raises a grant or the endpoint, in a terminal outside the agent
|
|
15995
|
+
host (\`workit grant set <ws> defaultEndpoint=merged\`); never edit
|
|
15996
|
+
workspaces.json or route around grant_required. Release: \`workit release
|
|
15997
|
+
start <v>\`, commits, \`finish\`; \`publish\` if asked.
|
|
15998
15998
|
- Ask only for a product or preference choice, or for authority you lack, with
|
|
15999
15999
|
your recommended answer. Facts are yours: read, run or prototype.
|
|
16000
16000
|
- Label claims measured (run and seen this session), inferred, or guess.
|
|
@@ -16008,9 +16008,8 @@ Autonomy contract:
|
|
|
16008
16008
|
is not evidence of a requested remote push. Before reporting delivery,
|
|
16009
16009
|
reconcile every requested item and observe it (\`workit verify-delivery\`).
|
|
16010
16010
|
|
|
16011
|
-
|
|
16012
|
-
|
|
16013
|
-
else \`npx -y @brainervirus/workit-cli\`).
|
|
16011
|
+
Read-only git and gh run raw; mutations go through workit verbs
|
|
16012
|
+
(\`workit git|pr|ci|check|help\`; else \`npx -y @brainervirus/workit-cli\`).
|
|
16014
16013
|
Other checkout: \`workit <verb> --cwd <dir> …\` (verb first: host rules match it); one workit
|
|
16015
16014
|
verb per shell call, never \`cd <dir> && workit\`. zsh-safe: no \`echo =====\`
|
|
16016
16015
|
(\`printf '%s\\n' ---\`), quote globs and URLs, no variable named \`status\` or \`path\`.
|
|
@@ -17271,17 +17270,22 @@ function workitCheckTail(words) {
|
|
|
17271
17270
|
return null;
|
|
17272
17271
|
return args.slice(0, split).includes("--shell") ? { script: tail.join(" "), cwd } : { argv: tail, cwd };
|
|
17273
17272
|
}
|
|
17274
|
-
|
|
17273
|
+
var OUTPUT_FILTERS = new Set(["tail", "head", "grep"]);
|
|
17274
|
+
function simpleCommand(command, dialect = "posix", depth = 0, shaped = false) {
|
|
17275
17275
|
let segments;
|
|
17276
17276
|
try {
|
|
17277
17277
|
segments = segmentsOf(command, dialect);
|
|
17278
17278
|
} catch {
|
|
17279
17279
|
return null;
|
|
17280
17280
|
}
|
|
17281
|
-
|
|
17281
|
+
const filter = shaped && segments.length === 2 ? segments[1] : null;
|
|
17282
|
+
if (filter) {
|
|
17283
|
+
if (!segments[0].pipe || !OUTPUT_FILTERS.has(commandName(filter.words[0])) || filter.group || filter.pipe || filter.unanalyzable || filter.subs?.length || filter.stdin?.length)
|
|
17284
|
+
return null;
|
|
17285
|
+
} else if (segments.length !== 1)
|
|
17282
17286
|
return null;
|
|
17283
17287
|
const [segment] = segments;
|
|
17284
|
-
if (segment.group || segment.pipe || segment.unanalyzable || segment.redirects.length || segment.subs?.length || segment.stdin?.length)
|
|
17288
|
+
if (segment.group || segment.pipe && !filter || segment.unanalyzable || segment.redirects.length && !shaped || segment.subs?.length || segment.stdin?.length)
|
|
17285
17289
|
return null;
|
|
17286
17290
|
const { words } = stripPrefixes(segment.words);
|
|
17287
17291
|
const name = commandName(words[0]);
|
|
@@ -17966,7 +17970,6 @@ var nudgeFor = (action, host, session) => {
|
|
|
17966
17970
|
case "pr-create":
|
|
17967
17971
|
return `workit: prefer ${quote("workit pr create --fill")} (or --title/--body): it records the PR the merge gate checks.`;
|
|
17968
17972
|
case "pr-read":
|
|
17969
|
-
return `workit: ${quote("workit pr status")} shows the PR, its checks and the verdict state; ${quote("workit ci wait")} waits for checks.`;
|
|
17970
17973
|
case "merge":
|
|
17971
17974
|
return null;
|
|
17972
17975
|
}
|
|
@@ -22392,7 +22395,7 @@ function heavyPlan(command, options) {
|
|
|
22392
22395
|
const heavy = heavyLines(lines, options);
|
|
22393
22396
|
if (!heavy.length)
|
|
22394
22397
|
return { kind: "none" };
|
|
22395
|
-
const simple = simpleCommand(command, dialect);
|
|
22398
|
+
const simple = simpleCommand(command, dialect, 0, true);
|
|
22396
22399
|
const single = simple && !WORKIT.test(baseName2(simple[0])) && heavyLines([simple], options)[0];
|
|
22397
22400
|
const judged = single ? [{ words: lines.flat(), text: command }] : heavy.map((match) => ({
|
|
22398
22401
|
words: match.line,
|
|
@@ -22404,7 +22407,7 @@ function heavyPlan(command, options) {
|
|
|
22404
22407
|
if (!verdict.ok)
|
|
22405
22408
|
return {
|
|
22406
22409
|
kind: "passthrough",
|
|
22407
|
-
note:
|
|
22410
|
+
note: ""
|
|
22408
22411
|
};
|
|
22409
22412
|
}
|
|
22410
22413
|
if (single) {
|
|
@@ -22414,7 +22417,7 @@ function heavyPlan(command, options) {
|
|
|
22414
22417
|
const parts = heavy.map((match) => leaseCommand(match.line));
|
|
22415
22418
|
return {
|
|
22416
22419
|
kind: "split",
|
|
22417
|
-
reason: `heavy_command: \`${command.trim()}\` chains heavy work (${heavy.map((match) => match.reason).join("; ")}) with other commands, and a chain cannot run under the machine-wide heavy-check lease. Run
|
|
22420
|
+
reason: `heavy_command: \`${command.trim()}\` chains heavy work (${heavy.map((match) => match.reason).join("; ")}) with other commands, and a chain cannot run under the machine-wide heavy-check lease. Run the heavy part alone, now: \`${parts[0]}\`; then run the other parts as their own commands${parts.length > 1 ? ", each heavy one the same way" : ""}.`,
|
|
22418
22421
|
unblock: parts[0] ?? null
|
|
22419
22422
|
};
|
|
22420
22423
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brainervirus/workit-opencode",
|
|
3
|
-
"version": "8.29.
|
|
3
|
+
"version": "8.29.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Workit OpenCode plugin — native tools, adaptive policy, and sixteen method skills",
|
|
6
6
|
"keywords": [
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"typecheck": "tsc --noEmit"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@brainervirus/workit-core": "^8.29.
|
|
42
|
+
"@brainervirus/workit-core": "^8.29.2",
|
|
43
43
|
"@opencode/plugin": "2.0.18"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|