@brainervirus/workit-opencode 8.19.0 → 8.19.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.
|
@@ -24,7 +24,10 @@ description: Build a requested change in small verified steps - follow local pat
|
|
|
24
24
|
lease waits and names its holder (`workit lock status`).
|
|
25
25
|
5. Prove the feature on its real surface with the project's `verify-<app>`
|
|
26
26
|
skill; none yet? Write one (call the skill tool with `workit-verify-app`). Tests show branch behavior,
|
|
27
|
-
not that the feature works.
|
|
27
|
+
not that the feature works. The report carries what you observed: a UI
|
|
28
|
+
change a screenshot or console/network check (chrome devtools or
|
|
29
|
+
agent-browser), an API a quoted real response. App not runnable? Say so
|
|
30
|
+
plainly, never claim success.
|
|
28
31
|
6. Commit: `workit git commit -m "<type>: <what>" -- <paths>` (or `--all`).
|
|
29
32
|
No endpoint named? Stop here and state the next command. Hand delivery to
|
|
30
33
|
ship, which pushes and opens the PR with its body shape (call the skill tool with `workit-ship`), only
|
|
@@ -55,8 +58,7 @@ flag was never invoked)
|
|
|
55
58
|
|
|
56
59
|
Good: "Added `--since`. measured: `workit check test` exit 0;
|
|
57
60
|
`mytool log --since 2d` printed 3 entries against the fixture repo. inferred:
|
|
58
|
-
the GitLab path behaves the same (
|
|
59
|
-
to the verifier agent."
|
|
61
|
+
the GitLab path behaves the same (not run). Handed to the verifier agent."
|
|
60
62
|
|
|
61
63
|
## Check
|
|
62
64
|
|
|
@@ -27,7 +27,10 @@ way a user would.
|
|
|
27
27
|
- **Drive:** how to exercise it: CLI invocations, `curl` against routes, a
|
|
28
28
|
browser tool for UI, with fixture data.
|
|
29
29
|
- **Evidence:** what to capture (exit code, response body, screenshot path)
|
|
30
|
-
and the command that records it.
|
|
30
|
+
and the command that records it. A UI is driven with chrome devtools or
|
|
31
|
+
agent-browser, with a screenshot or console/network observation; an API
|
|
32
|
+
with a real call, response quoted. The report carries the observation.
|
|
33
|
+
App not runnable? Say so plainly, never claim success.
|
|
31
34
|
- **Cleanup:** stop processes, remove temp data.
|
|
32
35
|
- **Feature map:** feature, how to drive it, expected observation.
|
|
33
36
|
3. **Prove it end-to-end once:** launch, drive one feature, capture evidence,
|
|
@@ -54,7 +57,8 @@ report `clean`, `changed` (what) or `blocked` (why).
|
|
|
54
57
|
Bad: "Verify by running the tests." (that is not the real surface)
|
|
55
58
|
|
|
56
59
|
Good: "Launch `bun run dev` (ready: `listening on :5173`, 30 s). Drive:
|
|
57
|
-
`curl -s localhost:5173/api/health`
|
|
60
|
+
`curl -s localhost:5173/api/health` returned `{"ok":true}`; screenshot of
|
|
61
|
+
/settings at .workit-scratch/settings.png. Evidence:
|
|
58
62
|
`workit check --name verify-web -- bun scripts/smoke.ts` exit 0."
|
|
59
63
|
|
|
60
64
|
## Check
|
|
@@ -30,6 +30,8 @@ description: Launch, drive and observe <app> on its real surface (<cli|web|api>)
|
|
|
30
30
|
## Evidence
|
|
31
31
|
`workit check --name verify-<app> -- <driver command>` records exit code and log.
|
|
32
32
|
Screenshots go to `<tmp dir>/verify-<app>/<feature>.png`; cite the path.
|
|
33
|
+
UI: also report a console or network observation. API: quote the real response.
|
|
34
|
+
If the app cannot be run, say so plainly instead of claiming success.
|
|
33
35
|
|
|
34
36
|
## Cleanup
|
|
35
37
|
`<command>` (stop servers, remove `<tmp dir>`).
|
package/dist/plugin.js
CHANGED
|
@@ -23082,7 +23082,7 @@ var canonical2 = (file) => {
|
|
|
23082
23082
|
let rest = "";
|
|
23083
23083
|
for (let dir = path30.resolve(file);; dir = path30.dirname(dir)) {
|
|
23084
23084
|
try {
|
|
23085
|
-
return path30.join(realpathSync6(dir), rest);
|
|
23085
|
+
return path30.join(realpathSync6.native(dir), rest);
|
|
23086
23086
|
} catch {
|
|
23087
23087
|
if (path30.dirname(dir) === dir)
|
|
23088
23088
|
return path30.resolve(file);
|
|
@@ -23302,18 +23302,26 @@ var CD2 = new Set(["cd", "chdir", "set-location", "sl"]);
|
|
|
23302
23302
|
var PUSHD2 = new Set(["pushd", "push-location"]);
|
|
23303
23303
|
var POPD2 = new Set(["popd", "pop-location"]);
|
|
23304
23304
|
var cdInto = (dir, words) => {
|
|
23305
|
-
const
|
|
23305
|
+
const named = words.slice(1).find((word) => !word.startsWith("-") || word === "-");
|
|
23306
|
+
const target = named === undefined ? undefined : homeExpanded(named);
|
|
23306
23307
|
if (dir === undefined || target === "-" || target && /^~|[$`*?]/.test(target))
|
|
23307
23308
|
return;
|
|
23308
23309
|
return target === undefined ? os10.homedir() : path30.resolve(dir, target);
|
|
23309
23310
|
};
|
|
23310
23311
|
var quoteWord2 = (word) => /^[\w@%+=:,./-]+$/.test(word) ? word : `'${word.replaceAll("'", "'\\''")}'`;
|
|
23312
|
+
var homeExpanded = (file) => {
|
|
23313
|
+
const match = /^(?:~|\$HOME|\$\{HOME\})(?=\/|$)/.exec(file);
|
|
23314
|
+
return match ? (process.env.HOME || os10.homedir()) + file.slice(match[0].length) : file;
|
|
23315
|
+
};
|
|
23311
23316
|
var segmentTargets = (cwd, command, dialect, depth = 0) => {
|
|
23312
23317
|
const targets = [];
|
|
23313
23318
|
let dir = cwd;
|
|
23314
23319
|
let stack = [];
|
|
23315
23320
|
const groups = [];
|
|
23316
|
-
const at = (file) =>
|
|
23321
|
+
const at = (file) => {
|
|
23322
|
+
const home = homeExpanded(file);
|
|
23323
|
+
return path30.isAbsolute(home) ? home : dir === undefined ? null : path30.resolve(dir, home);
|
|
23324
|
+
};
|
|
23317
23325
|
for (const segment of segmentsOf(command, dialect)) {
|
|
23318
23326
|
if (segment.group === "open") {
|
|
23319
23327
|
groups.push({ dir, stack: [...stack] });
|
|
@@ -23418,7 +23426,39 @@ var claimAll = (owner, targets, deps) => {
|
|
|
23418
23426
|
claimLiveSession(target, owner, deps);
|
|
23419
23427
|
};
|
|
23420
23428
|
var liveTargets = (cwd, paths) => paths?.length ? paths.map((file) => path30.resolve(cwd, file)) : [path30.join(cwd, DIR_TARGET)];
|
|
23429
|
+
var issuedTarget = (cwd, targets) => {
|
|
23430
|
+
const state = resolveStateDir();
|
|
23431
|
+
const found = targets.find((target) => underIssued(state, cwd, homeExpanded(target), process.platform, canonical2));
|
|
23432
|
+
return found ?? null;
|
|
23433
|
+
};
|
|
23434
|
+
var underIssued = (state, cwd, target, platform = process.platform, real = (file) => file) => {
|
|
23435
|
+
const win = platform === "win32";
|
|
23436
|
+
const p = win ? path30.win32 : path30.posix;
|
|
23437
|
+
const fold = (value) => win || platform === "darwin" ? value.toLowerCase() : value;
|
|
23438
|
+
const named = win ? target.replace(/^\/([a-zA-Z])(?=\/|$)/, "$1:") : target;
|
|
23439
|
+
const relative = p.relative(fold(real(p.resolve(state))), fold(real(p.resolve(cwd, named))));
|
|
23440
|
+
if (relative.startsWith("..") || p.isAbsolute(relative))
|
|
23441
|
+
return false;
|
|
23442
|
+
return relative.split(p.sep)[0].startsWith("issued");
|
|
23443
|
+
};
|
|
23444
|
+
var unquotedWindowsIssued = (command) => {
|
|
23445
|
+
if (process.platform !== "win32" || !command.includes("\\"))
|
|
23446
|
+
return false;
|
|
23447
|
+
const flat = (value) => value.replaceAll("\\", "/").toLowerCase();
|
|
23448
|
+
return flat(command).includes(`${flat(resolveStateDir())}/issued`) && shellWrites(command).writes;
|
|
23449
|
+
};
|
|
23450
|
+
var issuedDeny = (file) => {
|
|
23451
|
+
const unblock = "Issued ids and tokens are written only by Workit's SubagentStart hook. Run the verifier or reviewer agent so the host issues its own session; never edit the issued registries by hand.";
|
|
23452
|
+
return {
|
|
23453
|
+
kind: "deny",
|
|
23454
|
+
reason: `workit issued-registry guard: ${file} is under Workit's issued-session state. ${unblock}`,
|
|
23455
|
+
unblock
|
|
23456
|
+
};
|
|
23457
|
+
};
|
|
23421
23458
|
function writeGate(cwd, paths, owner, deps) {
|
|
23459
|
+
const forged = paths?.length ? issuedTarget(cwd, paths) : null;
|
|
23460
|
+
if (forged)
|
|
23461
|
+
return issuedDeny(forged);
|
|
23422
23462
|
if (!owner)
|
|
23423
23463
|
return beforeWriteGate(cwd, paths);
|
|
23424
23464
|
const targets = liveTargets(cwd, paths);
|
|
@@ -23431,6 +23471,11 @@ function writeGate(cwd, paths, owner, deps) {
|
|
|
23431
23471
|
return decision;
|
|
23432
23472
|
}
|
|
23433
23473
|
function shellGate(cwd, command, owner, dialect = "posix", deps) {
|
|
23474
|
+
try {
|
|
23475
|
+
const forged = issuedTarget(cwd, segmentTargets(cwd, command, dialect)) ?? (unquotedWindowsIssued(command) ? "the issued registry" : null);
|
|
23476
|
+
if (forged)
|
|
23477
|
+
return issuedDeny(forged);
|
|
23478
|
+
} catch {}
|
|
23434
23479
|
const writes = shellWrites(command);
|
|
23435
23480
|
let targets = [];
|
|
23436
23481
|
if (owner) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brainervirus/workit-opencode",
|
|
3
|
-
"version": "8.19.
|
|
3
|
+
"version": "8.19.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.19.
|
|
42
|
+
"@brainervirus/workit-core": "^8.19.2",
|
|
43
43
|
"@opencode/plugin": "2.0.18"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|