@workit-dev/opencode 2.11.0 → 2.11.1

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.
Files changed (2) hide show
  1. package/dist/plugin.js +7 -75
  2. package/package.json +2 -2
package/dist/plugin.js CHANGED
@@ -26536,8 +26536,10 @@ var opaqueWrites = (input, scriptOf = (index) => input[index], fed) => {
26536
26536
  return curlOutputs(args);
26537
26537
  if (name === "perl")
26538
26538
  return inline(/^-[a-zA-Z]*[eE]$/);
26539
+ if (name.startsWith("python") && args.some((arg, at) => arg === "-m" && args[at + 1] !== "json.tool"))
26540
+ return [".", ...args.flatMap(pathsIn)];
26539
26541
  if (/^(?:python[\d.]*|node|bun|deno|ruby|php)$/.test(name))
26540
- return inline(/^-[a-zA-Z]*[ce]$|^--eval$|^-p$/);
26542
+ return inline(/^-[a-zA-Z]*[cep]$|^--(?:eval|print)$/);
26541
26543
  return shellScript2(words) === null ? null : ["."];
26542
26544
  };
26543
26545
  var CURL_LONG = [
@@ -27269,7 +27271,7 @@ var segmentTargets = (cwd, command, dialect, depth = 0, strict = false, inherite
27269
27271
  shells.push(...read(named));
27270
27272
  shells.push(...preloads.flatMap(read));
27271
27273
  } else if (INTERPRETERS.test(verb)) {
27272
- const code = args.findIndex((arg) => /^-[a-zA-Z]*[ce]$|^--eval$/.test(arg));
27274
+ const code = args.findIndex((arg) => /^-[a-zA-Z]*[cep]$|^--(?:eval|print)$/.test(arg));
27273
27275
  if (code >= 0)
27274
27276
  others.push(...expansions(args[code + 1] ?? "", vars, loops));
27275
27277
  others.push(...named === undefined ? [...segment.stdin ?? [], ...inputs.flatMap(read), ...piped] : read(named), ...preloads.flatMap(read));
@@ -28684,78 +28686,6 @@ var MUTATING_REMOTE = new Set([
28684
28686
  "set-branches",
28685
28687
  "prune"
28686
28688
  ]);
28687
- var GIT_VERBS = {
28688
- log: "@d@l|@d @l",
28689
- show: "@d@l|@d @l",
28690
- diff: "@d|@d cached staged merge-base no-index",
28691
- "diff-tree": "@drtcm|@d root stdin no-commit-id",
28692
- "diff-index": "@dm|@d cached merge-base",
28693
- 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",
28694
- "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",
28695
- "rev-list": "@l|@l count objects? left-only right-only",
28696
- "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",
28697
- "ls-tree": "rdtlz|long name-only name-status object-only full-name full-tree abbrev? format=",
28698
- "cat-file": "tsepz|batch? batch-check? batch-all-objects follow-symlinks unordered buffer allow-unknown-type mailmap use-mailmap",
28699
- 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=",
28700
- describe: "|tags all long abbrev= contains always dirty? broken? match= exclude= first-parent exact-match candidates= debug",
28701
- "merge-base": "a|all octopus independent is-ancestor fork-point",
28702
- "for-each-ref": "|count= sort= format= color? shell perl python tcl points-at= merged? no-merged? contains? no-contains? ignore-case omit-empty exclude=",
28703
- shortlog: "@lsnec|@l summary numbered email committer group= format=",
28704
- "show-ref": "dsq|head verify heads tags branches hash? abbrev? quiet dereference exists",
28705
- "name-rev": "|tags refs= exclude= all annotate-stdin name-only no-undefined always",
28706
- 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",
28707
- "format-patch": "@do:nNks|@d stdout output-directory= numbered no-numbered start-number= subject-prefix= root cover-letter thread? signoff attach? inline? suffix= base=",
28708
- reflog: "@l|@l all expire= expire-unreachable= rewrite updateref stale-fix dry-run verbose",
28709
- "count-objects": "vH|verbose human-readable",
28710
- "check-ignore": "qvnz|quiet verbose stdin non-matching no-index",
28711
- var: "l|",
28712
- version: "|build-options",
28713
- "ls-remote": "htbq|heads tags branches refs quiet exit-code get-url symref sort=",
28714
- remote: "v|verbose",
28715
- config: "lz|get get-all get-regexp list local name-only null type= default=",
28716
- worktree: "fdqvzb:B:|force detach lock reason= orphan no-checkout checkout quiet track no-track guess-remote porcelain expire= verbose",
28717
- 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",
28718
- tag: "lam:dfF:n?|list annotate message= file= delete force sort= format= contains? merged? no-merged? points-at= column? create-reflog ignore-case",
28719
- init: "+qb:|quiet bare initial-branch= object-format= ref-format= shared? separate-git-dir=",
28720
- add: "+AunNvf|all update intent-to-add force dry-run verbose ignore-errors ignore-removal no-all renormalize chmod= sparse",
28721
- 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",
28722
- checkout: "+b:B:fqm|detach force orphan= quiet track? no-track merge ours theirs",
28723
- switch: "+c:C:dfqm|create= force-create= detach discard-changes force orphan= quiet track? no-track merge",
28724
- restore: "+s:SWq|source= staged worktree ours theirs merge quiet overlay no-overlay",
28725
- reset: "+qN|soft mixed hard merge keep quiet no-refresh",
28726
- rm: "+rfnq|cached force dry-run quiet ignore-unmatch",
28727
- mv: "+fnkv|force dry-run verbose",
28728
- 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=",
28729
- stash: "+m:ukqa|message= include-untracked keep-index quiet all index staged",
28730
- apply: "+p:C:R3qv|check stat numstat summary index cached 3way reverse reject allow-empty exclude= include= verbose quiet whitespace= recount",
28731
- am: "+skq3|signoff keep 3way quiet abort continue skip quit whitespace= reject",
28732
- fetch: "+fqvptn|all depth= deepen= shallow-since= unshallow tags no-tags prune force quiet verbose dry-run update-shallow refmap=",
28733
- 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=",
28734
- "cherry-pick": "+nm:sxX:|no-commit mainline= signoff abort continue skip quit allow-empty keep-redundant-commits ff strategy-option=",
28735
- revert: "+nm:sX:|no-commit mainline= signoff abort continue skip quit strategy-option= no-edit",
28736
- 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",
28737
- clean: "+dfnqxXe:|dry-run force quiet exclude=",
28738
- bisect: "+|term-old= term-new= no-checkout first-parent"
28739
- };
28740
- 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`;
28741
- var JUDGE_VERBS = {
28742
- check: true,
28743
- dir: true,
28744
- help: true,
28745
- "test-audit": true,
28746
- ledger: ["verdict", "list", "check", "ruling", "show"],
28747
- finding: ["record", "list"],
28748
- pr: ["status"],
28749
- ci: ["wait", "logs"],
28750
- fanout: ["status", "brief"],
28751
- models: ["show"],
28752
- lock: ["status"],
28753
- lease: ["status"],
28754
- grant: ["show"],
28755
- task: ["show", "list"],
28756
- doctor: ["--json"]
28757
- };
28758
- var JUDGE_JOB = Object.entries(JUDGE_VERBS).map(([verb, subs]) => `workit ${verb}${subs === true ? "" : ` ${subs.join("|")}`}`).join(", ");
28759
28689
 
28760
28690
  // packages/workit-core/src/hooks/steering.ts
28761
28691
  var ROLES = {
@@ -29616,9 +29546,11 @@ var ytrackGate = (cwd, command, dialect, ask) => {
29616
29546
  const run = calls.length ? ` Run ${calls.join(", then ")} instead, each as its own plain call: it asks the user first.` : "";
29617
29547
  const user = bare.length ? ask ? ` For ${bare.join(", ")}, run it as its own plain call: the host asks the user.` : ` For ${bare.join(", ")}, the user decides: ask the user, and if they agree they run it in their own terminal.` : "";
29618
29548
  const rerun = writes.some((write) => write.gap === NOT_PLAIN.gap) ? " To get the named workit youtrack call instead, rerun the ytrack call as one plain command, with no wrapper, loop, substitution or script around it." : "";
29549
+ const retry = writes.find((write) => write.workit)?.workit ?? (rerun ? writes.find((write) => write.gap === NOT_PLAIN.gap)?.command : undefined);
29619
29550
  return {
29620
29551
  kind: "deny",
29621
- reason: `${why}${run}${user}${rerun}`,
29552
+ reason: `${why}${run}${user}${rerun}${retry ? `
29553
+ Retry as: ${retry}` : ""}`,
29622
29554
  unblock: writes[0]?.workit ?? null
29623
29555
  };
29624
29556
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workit-dev/opencode",
3
- "version": "2.11.0",
3
+ "version": "2.11.1",
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.11.0"
44
+ "@workit-dev/core": "^2.11.1"
45
45
  },
46
46
  "engines": {
47
47
  "node": ">=24"