@workit-dev/opencode 2.4.3 → 2.4.4
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 +99 -9
- package/package.json +2 -2
package/dist/plugin.js
CHANGED
|
@@ -26522,7 +26522,21 @@ var gitOutputs = (args) => {
|
|
|
26522
26522
|
if (output !== undefined)
|
|
26523
26523
|
files.push(output);
|
|
26524
26524
|
if (sub === "init")
|
|
26525
|
-
files.push(names[0] ?? "
|
|
26525
|
+
files.push(names[0] ?? "./");
|
|
26526
|
+
if (sub === "init" || sub === "clone") {
|
|
26527
|
+
const separate = valueOf(rest, /^--separate-git-dir=?(.*)$/s);
|
|
26528
|
+
if (separate !== undefined)
|
|
26529
|
+
files.push(separate);
|
|
26530
|
+
}
|
|
26531
|
+
if (sub === "worktree") {
|
|
26532
|
+
const end = rest.includes("--") ? rest.indexOf("--") : rest.length;
|
|
26533
|
+
const named = [
|
|
26534
|
+
...rest.slice(1, end).filter((arg, index, words) => !arg.startsWith("-") && !/^(?:-[bB]|--reason)$/.test(words[index - 1] ?? "")),
|
|
26535
|
+
...rest.slice(end + 1)
|
|
26536
|
+
];
|
|
26537
|
+
const count = { add: 1, move: 2, remove: 1, repair: named.length || 1 }[rest[0] ?? ""] ?? 0;
|
|
26538
|
+
files.push(...(named.length ? named : ["."]).slice(0, count));
|
|
26539
|
+
}
|
|
26526
26540
|
if (sub === "clone")
|
|
26527
26541
|
files.push(names[1] ?? names[0]?.replace(/(?:\.git)?[\\/]*$/, "").split(/[\\/:]/).at(-1) ?? ".");
|
|
26528
26542
|
if (sub === "format-patch" && !has(/^--stdout$/))
|
|
@@ -26640,6 +26654,27 @@ var MUTATING_GIT = new Set([
|
|
|
26640
26654
|
var DRY_N = new Set(["add", "clean", "rm", "mv"]);
|
|
26641
26655
|
var MUTATING_WORKIT_GIT = new Set(["commit", "branch", "stage", "unstage"]);
|
|
26642
26656
|
var DIR_TARGET = ".workit-live-target";
|
|
26657
|
+
var PLACEHOLDERS = new WeakMap;
|
|
26658
|
+
var collecting = null;
|
|
26659
|
+
var placeholderIn = (dir, name) => {
|
|
26660
|
+
const target = path41.join(dir, name);
|
|
26661
|
+
collecting?.add(target);
|
|
26662
|
+
return target;
|
|
26663
|
+
};
|
|
26664
|
+
var recording = (make) => {
|
|
26665
|
+
const outer = collecting;
|
|
26666
|
+
const found = new Set;
|
|
26667
|
+
collecting = found;
|
|
26668
|
+
try {
|
|
26669
|
+
const targets = make();
|
|
26670
|
+
PLACEHOLDERS.set(targets, found);
|
|
26671
|
+
for (const target of found)
|
|
26672
|
+
outer?.add(target);
|
|
26673
|
+
return targets;
|
|
26674
|
+
} finally {
|
|
26675
|
+
collecting = outer;
|
|
26676
|
+
}
|
|
26677
|
+
};
|
|
26643
26678
|
var OPAQUE_TARGET = ".workit-runs-";
|
|
26644
26679
|
var UNRESOLVED_TARGET = ".workit-unresolved-target";
|
|
26645
26680
|
var OVERRIDE = "WORKIT_LIVE_SESSION=override";
|
|
@@ -26911,7 +26946,7 @@ var segmentTargets = (cwd, command, dialect, depth = 0, strict = false, inherite
|
|
|
26911
26946
|
return [unknownVarTarget(home)];
|
|
26912
26947
|
if (path41.isAbsolute(home))
|
|
26913
26948
|
return [home];
|
|
26914
|
-
return base === undefined ? [] : [
|
|
26949
|
+
return base === undefined ? [] : [resolvedUnder(base, home)];
|
|
26915
26950
|
});
|
|
26916
26951
|
const at = (file) => {
|
|
26917
26952
|
const all = atAll(file);
|
|
@@ -27143,7 +27178,7 @@ var segmentTargets = (cwd, command, dialect, depth = 0, strict = false, inherite
|
|
|
27143
27178
|
for (const file of opaque ?? [])
|
|
27144
27179
|
for (const resolved of atAll(file))
|
|
27145
27180
|
if (!quiet || !isRoot(resolved))
|
|
27146
|
-
targets.push(file === "." ? path41.
|
|
27181
|
+
targets.push(file === "." ? placeholderIn(resolved, here) : path41.basename(resolved).startsWith(OPAQUE_TARGET) ? placeholderIn(path41.dirname(resolved), path41.basename(resolved)) : resolved);
|
|
27147
27182
|
const ln = words.findIndex((word) => /^ln$/i.test(word.split(/[\\/]/).at(-1) ?? ""));
|
|
27148
27183
|
const lnArgs = words.slice(ln + 1);
|
|
27149
27184
|
if (ln >= 0 && words.slice(0, ln).every((word) => PREFIXES2.has(word)) && (strict !== "registry" || !lnArgs.some((arg) => /^-[a-zA-Z]*s|^--symbolic$/.test(arg))))
|
|
@@ -27155,7 +27190,7 @@ var segmentTargets = (cwd, command, dialect, depth = 0, strict = false, inherite
|
|
|
27155
27190
|
const edits = editsOf(body);
|
|
27156
27191
|
if (edits === null) {
|
|
27157
27192
|
if (dir !== undefined)
|
|
27158
|
-
targets.push(
|
|
27193
|
+
targets.push(placeholderIn(dir, DIR_TARGET));
|
|
27159
27194
|
} else
|
|
27160
27195
|
for (const file of edits)
|
|
27161
27196
|
targets.push(...atAll(file));
|
|
@@ -27163,7 +27198,7 @@ var segmentTargets = (cwd, command, dialect, depth = 0, strict = false, inherite
|
|
|
27163
27198
|
for (const invocation of workitInvocations(body.map(quoteWord2).join(" "), "posix")) {
|
|
27164
27199
|
const { at: runsIn, args } = workitCwd(dir, invocation, atAll);
|
|
27165
27200
|
if (args[0] === "git" && MUTATING_WORKIT_GIT.has(args[1] ?? "") && !inert(args.slice(2), ""))
|
|
27166
|
-
targets.push(...runsIn.map((runs) =>
|
|
27201
|
+
targets.push(...runsIn.map((runs) => placeholderIn(runs, DIR_TARGET)));
|
|
27167
27202
|
}
|
|
27168
27203
|
}
|
|
27169
27204
|
return targets;
|
|
@@ -27183,10 +27218,10 @@ var workitCwd = (dir, args, resolve) => {
|
|
|
27183
27218
|
var shellMutationTargets = (cwd, command, dialect = "posix", strict = false) => {
|
|
27184
27219
|
try {
|
|
27185
27220
|
const env = new Map(strict === "registry" ? [...command.matchAll(/\$\{?([A-Za-z_]\w*)/g)].filter((match) => !/^(?:OLD)?PWD$/.test(match[1])).map((match) => [match[1], process.env[match[1]] ?? ""]) : []);
|
|
27186
|
-
return [
|
|
27221
|
+
return recording(() => [
|
|
27187
27222
|
...segmentTargets(cwd, command, dialect, 0, strict, env),
|
|
27188
|
-
...gitMutationDirs(cwd, command, dialect).map((dir) =>
|
|
27189
|
-
];
|
|
27223
|
+
...gitMutationDirs(cwd, command, dialect).map((dir) => placeholderIn(dir, DIR_TARGET))
|
|
27224
|
+
]);
|
|
27190
27225
|
} catch (error) {
|
|
27191
27226
|
if (strict === "registry")
|
|
27192
27227
|
throw error;
|
|
@@ -27245,7 +27280,8 @@ var claimAll = (owner, targets, deps) => {
|
|
|
27245
27280
|
for (const target of guarded(targets))
|
|
27246
27281
|
claimLiveSession(target, owner, deps);
|
|
27247
27282
|
};
|
|
27248
|
-
var
|
|
27283
|
+
var resolvedUnder = (dir, file) => !/(?:^|[\\/])\.\.(?:[\\/]|$)/.test(file) ? path41.resolve(dir, file) : path41.isAbsolute(file) ? file : `${dir}${path41.sep}${file}`;
|
|
27284
|
+
var liveTargets = (cwd, paths) => recording(() => paths?.length ? paths.map((file) => resolvedUnder(cwd, file)) : [placeholderIn(cwd, DIR_TARGET)]);
|
|
27249
27285
|
var CONFIG_FILES = ["workspaces.json", SEAL_FILE];
|
|
27250
27286
|
var configDirs = () => [resolveConfigDir(), grantsDir()];
|
|
27251
27287
|
var globbed = (cwd, target, state, configs) => {
|
|
@@ -28485,6 +28521,60 @@ var MUTATING_REMOTE = new Set([
|
|
|
28485
28521
|
"set-branches",
|
|
28486
28522
|
"prune"
|
|
28487
28523
|
]);
|
|
28524
|
+
var GIT_VERBS = {
|
|
28525
|
+
log: "@d@l|@d @l",
|
|
28526
|
+
show: "@d@l|@d @l",
|
|
28527
|
+
diff: "@d|@d cached staged merge-base no-index",
|
|
28528
|
+
"diff-tree": "@drtcm|@d root stdin no-commit-id",
|
|
28529
|
+
"diff-index": "@dm|@d cached merge-base",
|
|
28530
|
+
status: "sbu?zv|short branch porcelain? long untracked-files? ignored? ignore-submodules? show-stash ahead-behind no-ahead-behind renames no-renames find-renames? column? no-column null verbose",
|
|
28531
|
+
"rev-parse": "q|verify short? abbrev-ref? symbolic symbolic-full-name show-toplevel show-prefix git-dir git-common-dir absolute-git-dir is-inside-work-tree is-inside-git-dir is-bare-repository show-cdup quiet all branches? tags? remotes? since= until= default= path-format= sq-quote",
|
|
28532
|
+
"rev-list": "@l|@l count objects? left-only right-only",
|
|
28533
|
+
"ls-files": "cdmoiskuvtzfx:X:|cached deleted modified others ignored stage unmerged killed directory no-empty-directory exclude-standard exclude= exclude-from= full-name abbrev? error-unmatch with-tree= eol deduplicate format= recurse-submodules sparse",
|
|
28534
|
+
"ls-tree": "rdtlz|long name-only name-status object-only full-name full-tree abbrev? format=",
|
|
28535
|
+
"cat-file": "tsepz|batch? batch-check? batch-all-objects follow-symlinks unordered buffer allow-unknown-type mailmap use-mailmap",
|
|
28536
|
+
blame: "L:lstfnepwbcM?C?|porcelain line-porcelain incremental root show-stats show-name show-number show-email abbrev= reverse= first-parent date= ignore-rev= ignore-revs-file= minimal contents=",
|
|
28537
|
+
describe: "|tags all long abbrev= contains always dirty? broken? match= exclude= first-parent exact-match candidates= debug",
|
|
28538
|
+
"merge-base": "a|all octopus independent is-ancestor fork-point",
|
|
28539
|
+
"for-each-ref": "|count= sort= format= color? shell perl python tcl points-at= merged? no-merged? contains? no-contains? ignore-case omit-empty exclude=",
|
|
28540
|
+
shortlog: "@lsnec|@l summary numbered email committer group= format=",
|
|
28541
|
+
"show-ref": "dsq|head verify heads tags branches hash? abbrev? quiet dereference exists",
|
|
28542
|
+
"name-rev": "|tags refs= exclude= all annotate-stdin name-only no-undefined always",
|
|
28543
|
+
grep: "aiIvnhHcEGFPlLzoWqwe:A:B:C:m:f:|cached untracked no-index no-exclude-standard exclude-standard recurse-submodules text ignore-case word-regexp invert-match line-number column count full-name extended-regexp basic-regexp fixed-strings perl-regexp files-with-matches name-only files-without-match null only-matching heading break show-function function-context max-depth= threads= and or not all-match quiet after-context= before-context= context= max-count= color? no-color",
|
|
28544
|
+
"format-patch": "@do:nNks|@d stdout output-directory= numbered no-numbered start-number= subject-prefix= root cover-letter thread? signoff attach? inline? suffix= base=",
|
|
28545
|
+
reflog: "@l|@l all expire= expire-unreachable= rewrite updateref stale-fix dry-run verbose",
|
|
28546
|
+
"count-objects": "vH|verbose human-readable",
|
|
28547
|
+
"check-ignore": "qvnz|quiet verbose stdin non-matching no-index",
|
|
28548
|
+
var: "l|",
|
|
28549
|
+
version: "|build-options",
|
|
28550
|
+
"ls-remote": "htbq|heads tags branches refs quiet exit-code get-url symref sort=",
|
|
28551
|
+
remote: "v|verbose",
|
|
28552
|
+
config: "lz|get get-all get-regexp list local name-only null type= default=",
|
|
28553
|
+
worktree: "fdqvzb:B:|force detach lock reason= orphan no-checkout checkout quiet track no-track guess-remote porcelain expire= verbose",
|
|
28554
|
+
branch: "dDmMcCfvraliu:|delete move copy force list all remotes verbose contains? merged? no-merged? points-at= show-current set-upstream-to= unset-upstream track? no-track sort= format= color? column? ignore-case create-reflog",
|
|
28555
|
+
tag: "lam:dfF:n?|list annotate message= file= delete force sort= format= contains? merged? no-merged? points-at= column? create-reflog ignore-case",
|
|
28556
|
+
init: "+qb:|quiet bare initial-branch= object-format= ref-format= shared? separate-git-dir=",
|
|
28557
|
+
add: "+AunNvf|all update intent-to-add force dry-run verbose ignore-errors ignore-removal no-all renormalize chmod= sparse",
|
|
28558
|
+
commit: "+m:aqsnF:C:ouv|message= all amend no-edit allow-empty allow-empty-message author= date= signoff no-verify quiet file= reuse-message= fixup= squash= only include dry-run no-gpg-sign untracked-files? cleanup= reset-author verbose",
|
|
28559
|
+
checkout: "+b:B:fqm|detach force orphan= quiet track? no-track merge ours theirs",
|
|
28560
|
+
switch: "+c:C:dfqm|create= force-create= detach discard-changes force orphan= quiet track? no-track merge",
|
|
28561
|
+
restore: "+s:SWq|source= staged worktree ours theirs merge quiet overlay no-overlay",
|
|
28562
|
+
reset: "+qN|soft mixed hard merge keep quiet no-refresh",
|
|
28563
|
+
rm: "+rfnq|cached force dry-run quiet ignore-unmatch",
|
|
28564
|
+
mv: "+fnkv|force dry-run verbose",
|
|
28565
|
+
merge: "+m:qvnX:|no-ff ff ff-only squash no-squash commit no-commit message= no-edit abort continue quit allow-unrelated-histories stat no-stat quiet verbose no-verify signoff strategy-option=",
|
|
28566
|
+
stash: "+m:ukqa|message= include-untracked keep-index quiet all index staged",
|
|
28567
|
+
apply: "+p:C:R3qv|check stat numstat summary index cached 3way reverse reject allow-empty exclude= include= verbose quiet whitespace= recount",
|
|
28568
|
+
am: "+skq3|signoff keep 3way quiet abort continue skip quit whitespace= reject",
|
|
28569
|
+
fetch: "+fqvptn|all depth= deepen= shallow-since= unshallow tags no-tags prune force quiet verbose dry-run update-shallow refmap=",
|
|
28570
|
+
clone: "+nqlsb:o:|bare no-checkout depth= branch= origin= single-branch no-single-branch no-tags quiet shared local no-local filter= separate-git-dir=",
|
|
28571
|
+
"cherry-pick": "+nm:sxX:|no-commit mainline= signoff abort continue skip quit allow-empty keep-redundant-commits ff strategy-option=",
|
|
28572
|
+
revert: "+nm:sX:|no-commit mainline= signoff abort continue skip quit strategy-option= no-edit",
|
|
28573
|
+
rebase: "+qvfnX:|onto= root abort continue skip quit keep-base no-ff force-rebase autosquash no-autosquash autostash no-autostash update-refs signoff quiet verbose stat no-stat committer-date-is-author-date reset-author-date rebase-merges? no-rebase-merges empty= strategy-option= apply merge",
|
|
28574
|
+
clean: "+dfnqxXe:|dry-run force quiet exclude=",
|
|
28575
|
+
bisect: "+|term-old= term-new= no-checkout first-parent"
|
|
28576
|
+
};
|
|
28577
|
+
var JUDGE_GIT = `a judge runs git ${Object.keys(GIT_VERBS).join(" ")} with the options each documents (no abbreviations), writing only in a scratch repo; no -c, no wrapper but timeout, nice, time, command, no env but PAGER=cat, GIT_PAGER=cat, GIT_OPTIONAL_LOCKS=0, LC_*, LANG, TZ; status outside scratch needs --no-optional-locks`;
|
|
28488
28578
|
var JUDGE_VERBS = {
|
|
28489
28579
|
check: true,
|
|
28490
28580
|
dir: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workit-dev/opencode",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.4",
|
|
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.4.
|
|
44
|
+
"@workit-dev/core": "^2.4.4"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": ">=24"
|