@workit-dev/opencode 2.26.1 → 2.26.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.
Files changed (2) hide show
  1. package/dist/plugin.js +116 -104
  2. package/package.json +2 -2
package/dist/plugin.js CHANGED
@@ -5553,11 +5553,6 @@ if (!globalConfig.localeError)
5553
5553
  config(en_default());
5554
5554
  if (!globalConfig.memoizer)
5555
5555
  config({ memoizer: memoizer() });
5556
- var described = (schema, description) => {
5557
- const copy = schema.clone();
5558
- globalRegistry.add(copy, { description });
5559
- return copy;
5560
- };
5561
5556
 
5562
5557
  // packages/workit-core/src/core/scope-glob.ts
5563
5558
  var GLOB = /[*?[\]{}]/u;
@@ -8707,25 +8702,25 @@ var nonBlank = string2().check(refine((value) => value.trim().length > 0, "must
8707
8702
  var branchPreset = custom((value) => typeof value === "string" && Object.hasOwn(PRESETS, value), "unsupported branch preset");
8708
8703
  var commitPreset = custom((value) => typeof value === "string" && COMMIT_PRESETS.includes(value), "unsupported commit preset");
8709
8704
  var workspaceBranchPolicySchema = strictObject({
8710
- preset: described(branchPreset, "The branch model: gitflow, github-flow, trunk-based or custom (allowed/protected set by hand)."),
8711
- developBranch: described(optional(nonBlank), "The integration branch gitflow uses (default develop)."),
8712
- prefixes: described(optional(looseObject({
8705
+ preset: branchPreset,
8706
+ developBranch: optional(nonBlank),
8707
+ prefixes: optional(looseObject({
8713
8708
  feature: nonBlank,
8714
8709
  bugfix: nonBlank,
8715
8710
  release: nonBlank,
8716
8711
  hotfix: nonBlank
8717
- })), "The branch prefix per kind (feature/, bugfix/, release/, hotfix/)."),
8718
- allowed: described(optional(array(nonBlank)), "Branch name globs a new branch must match (`feature/*`)."),
8719
- protected: described(optional(array(nonBlank)), "Branches nobody commits or pushes to directly."),
8720
- integration: described(optional(_enum(["pr", "merge"])), "How work reaches its base: `pr` (default) opens a PR, `merge` merges locally.")
8712
+ })),
8713
+ allowed: optional(array(nonBlank)),
8714
+ protected: optional(array(nonBlank)),
8715
+ integration: optional(_enum(["pr", "merge"]))
8721
8716
  });
8722
8717
  var workspaceCommitPolicySchema = strictObject({
8723
- preset: described(commitPreset, "The commit message flavor, e.g. conventional."),
8724
- pattern: described(optional(string2()), "A regular expression every commit subject must match.")
8718
+ preset: commitPreset,
8719
+ pattern: optional(string2())
8725
8720
  });
8726
8721
  var workspaceProfileSchema = strictObject({
8727
- branchPolicy: described(optional(workspaceBranchPolicySchema), "This profile's branch policy."),
8728
- commitPolicy: described(optional(workspaceCommitPolicySchema), "This profile's commit policy.")
8722
+ branchPolicy: optional(workspaceBranchPolicySchema),
8723
+ commitPolicy: optional(workspaceCommitPolicySchema)
8729
8724
  }).check(refine((profile) => profile.branchPolicy !== undefined || profile.commitPolicy !== undefined, { message: "a profile must define branchPolicy or commitPolicy" }));
8730
8725
  var versionSourceSchema = discriminatedUnion("kind", [
8731
8726
  strictObject({
@@ -8737,22 +8732,22 @@ var versionSourceSchema = discriminatedUnion("kind", [
8737
8732
  strictObject({ kind: literal("manual") })
8738
8733
  ]);
8739
8734
  var releaseTrackSchema = looseObject({
8740
- strategy: described(optional(branchPreset), "The branch model this track follows."),
8741
- productionBranch: described(nonBlank, "The branch releases land on (main)."),
8742
- integrationBranch: described(nonBlank, "The branch work integrates into (develop)."),
8743
- naming: described(optional(looseObject({
8735
+ strategy: optional(branchPreset),
8736
+ productionBranch: nonBlank,
8737
+ integrationBranch: nonBlank,
8738
+ naming: optional(looseObject({
8744
8739
  feature: optional(nonBlank),
8745
8740
  release: optional(nonBlank),
8746
8741
  hotfix: optional(nonBlank)
8747
- })), "Branch name templates per kind, e.g. `feature/{name}`."),
8748
- baseBranch: described(optional(nonBlank), "The branch new work starts from."),
8749
- mergeBackBranches: described(optional(array(nonBlank)), "Branches a finished release or hotfix is merged back into."),
8750
- pullRequestTarget: described(optional(nonBlank), "The branch PRs target."),
8751
- tagNamespace: described(optional(string2()), "A prefix for this track's release tags."),
8752
- versionSource: described(optional(versionSourceSchema), "Where the version comes from: package-json, git-tag or manual."),
8753
- requiredChecks: described(optional(array(nonBlank)), "CI checks that must pass before a release."),
8754
- critical: described(optional(array(nonBlank)), "Fields an older Workit must not ignore: when one is unknown or malformed, Workit fails closed."),
8755
- releaseNotes: described(optional(unknown()), "This track's release notes mode, over the workspace's `releaseNotes`.")
8742
+ })),
8743
+ baseBranch: optional(nonBlank),
8744
+ mergeBackBranches: optional(array(nonBlank)),
8745
+ pullRequestTarget: optional(nonBlank),
8746
+ tagNamespace: optional(string2()),
8747
+ versionSource: optional(versionSourceSchema),
8748
+ requiredChecks: optional(array(nonBlank)),
8749
+ critical: optional(array(nonBlank)),
8750
+ releaseNotes: optional(unknown())
8756
8751
  }).check(superRefine((track, context) => {
8757
8752
  for (const [field, values] of [
8758
8753
  ["mergeBackBranches", track.mergeBackBranches ?? []],
@@ -8774,67 +8769,67 @@ var releaseTrackSchema = looseObject({
8774
8769
  });
8775
8770
  }
8776
8771
  }));
8777
- var modelRoles = described(optional(unknown()), "Per role (decider, implementer, verifier, reviewer, explore, babysit, default for a general-purpose spawn): a model name, `{ model, effort }`, or one of those per host (claude_code, opencode, codex, codex_cli, codex_desktop, cursor, pi, default). The implementer takes one per tier (mundane, standard, hard).");
8772
+ var modelRoles = optional(unknown());
8778
8773
  var workspaceConfigSchema = looseObject({
8779
- name: described(nonBlank, "The workspace's unique name."),
8780
- glob: described(nonBlank, "The directories this entry covers, an absolute path glob with * and ** (`/home/you/work/**`); the narrowest match wins."),
8781
- vcs: described(optional(looseObject({
8782
- provider: described(_enum(["gitlab", "github"]), "The forge: github or gitlab."),
8783
- defaultTargetBranch: described(optional(nonBlank), "The branch PRs target by default."),
8784
- tokenFile: described(optional(nonBlank), "A file holding the forge token for this workspace."),
8785
- account: described(optional(nonBlank), "The forge login delivery runs as; grants need it to reach the forge."),
8786
- host: described(optional(unknown()), "A self-hosted forge's host name.")
8787
- })), "The forge this workspace's repositories live on."),
8788
- autoApprove: described(optional(union([boolean2(), array(nonBlank)])), "Legacy (≤4.x) standing approvals, read once as autonomy grants; use `autonomy`."),
8789
- defaultEndpoint: described(optional(unknown()), "Where an unnamed request stops: commit (default), pr, green or merged. Set with `workit grant set`, like grants."),
8790
- verification: described(optional(_enum(["proportional", "self", "independent"])), "How a normal-risk behavior change is verified: proportional (default), self or independent. Set with `workit grant set`, like grants."),
8791
- delegation: described(optional(unknown()), "Who does the work: `inline-first` (default) keeps the lead working itself and refuses a slice without a reason to delegate; `lead-orchestrates` allows slices without one."),
8792
- changelog: described(optional(unknown()), "The Keep a Changelog step before a PR opens: `off` (default), `update` (an existing CHANGELOG.md needs an Unreleased entry from a user-facing PR) or `create` (the entry is required, creating the file). `workit pr create` enforces it."),
8793
- docs: described(optional(unknown()), "The docs refresh the ship skill does before a PR opens: `off` (default) or `when-user-facing`."),
8794
- changelogPath: described(optional(unknown()), "Where the changelog lives, repo-relative: one path or glob, or a list (a monorepo with one changelog per package; any of them satisfies the gate). Default CHANGELOG.md at the repo root."),
8795
- prTemplate: described(optional(unknown()), "Which template a PR description fills: `auto` (default: the repo's GitHub/GitLab template, else Workit's), `repo` (the repo's, refused when it has none), `workit` (Workit's Summary/Evidence/Merge danger) or a repo-relative path to one `.md` file."),
8796
- releaseNotes: described(optional(unknown()), "The release notes `workit release finish` publishes on the forge release: `auto` (default: the draft when there is one, else the notes built from the version's changelog section), `off` (no forge release) or `review` (finish refuses until `workit release notes approve`). A release track overrides it."),
8797
- trailers: described(optional(boolean2()), "Whether commits get the `Workit-Session:` trailer (default true). With false, authorship lives in the ledger only."),
8798
- deleteBranch: described(optional(boolean2()), "Whether `workit pr merge` deletes the head branch after a merge (default true); `--keep-branch` opts out for one merge."),
8799
- cleanup: described(optional(unknown()), "What happens when work finishes: `auto` (default) removes the delivered branch's clean Workit worktree and local branch, switches a clean checkout on it back to the trunk, and stops the processes registered inside them; `keep` removes and stops nothing. A value Workit does not know reads as `keep`."),
8800
- feedback: described(optional(unknown()), '`workit feedback` for this workspace: `off` hides its contract line and makes the verb refuse; `{ "account": "<login>" }` names the GitHub login it posts with; workspaces inside this one inherit it.'),
8801
- liveSessionGuard: described(optional(boolean2()), "Whether the live-session guard denies edits in a checkout another live agent session owns (default true)."),
8802
- shared: described(optional(boolean2()), "Whether this workspace's repos are shared with a team that must not see Workit named (default false): `workit pr create` and `workit pr edit` then warn, never block, when the PR title, body or a new doc names it."),
8803
- fanout: described(optional(looseObject({
8804
- tierModels: described(optional(unknown()), "The model per slice TIER (mundane, standard, hard), as one name or per host."),
8805
- deps: described(optional(unknown()), "How `workit fanout worktree create` gives a slice worktree node_modules: `install` (default: its own frozen install of its lockfile) or `link` (links into the main checkout's installed packages, for a repo too slow to install per slice). `--deps` overrides it."),
8806
- installTimeout: described(optional(unknown()), "How long the own install may run before its process tree is killed and the worktree is linked instead: a duration such as `90s` or `10m` (default `5m`). `--install-timeout` overrides it.")
8807
- })), "Fanout settings."),
8808
- models: described(optional(looseObject({ roles: modelRoles })), "Model and effort per role and host (roles), the lead's own advisory model (lead), how a role model applies (enforce: advise, the default, or strict) and, under strict, whether a model the lead names on a spawn wins (allowLeadOverride, default false); the same key at the top of workspaces.json is the global default."),
8809
- resources: described(optional(unknown()), "Heavy-check limits on this machine: slots, scope, heavy, light, memoryMax, cpuQuota, wait."),
8810
- remotes: described(optional(array(nonBlank.check(refine((pattern) => remotePattern(pattern) !== null, "is not a remote URL (https://host/owner/repo, git@host:owner/repo, a path, or owner/*)")))), "Remote URLs this entry owns: a checkout pushing to or opening PRs on one never exceeds this entry's grants, wherever the folder is (`owner/*` claims a whole owner). Only the user changes it, in their own terminal."),
8811
- externalRepos: described(optional(array(nonBlank.check(_regex(/^[\w-]+(?:\/\w[\w.-]*)*\/(?:\w[\w.-]*|\*)$/u, "is owner/name, group/project or owner/* on the checkout's forge host, without the host")))), "Repositories outside this workspace's own forge owners that `workit issue create|comment|close --repo` may write to: `owner/name`, or `owner/*` for a whole owner. Only the user changes it, in their own terminal."),
8812
- additiveRiskPaths: described(optional(array(nonBlank)), "Risk-path globs whose purely additive edits follow the review lane of the rest of the diff. Only the user sets it; it counts only while sealed."),
8813
- autonomy: described(optional(looseObject(Object.fromEntries(["push", "pr", "merge", "release", "rerun"].map((kind) => [
8774
+ name: nonBlank,
8775
+ glob: nonBlank,
8776
+ vcs: optional(looseObject({
8777
+ provider: _enum(["gitlab", "github"]),
8778
+ defaultTargetBranch: optional(nonBlank),
8779
+ tokenFile: optional(nonBlank),
8780
+ account: optional(nonBlank),
8781
+ host: optional(unknown())
8782
+ })),
8783
+ autoApprove: optional(union([boolean2(), array(nonBlank)])),
8784
+ defaultEndpoint: optional(unknown()),
8785
+ verification: optional(_enum(["proportional", "self", "independent"])),
8786
+ delegation: optional(unknown()),
8787
+ changelog: optional(unknown()),
8788
+ docs: optional(unknown()),
8789
+ changelogPath: optional(unknown()),
8790
+ prTemplate: optional(unknown()),
8791
+ releaseNotes: optional(unknown()),
8792
+ trailers: optional(boolean2()),
8793
+ deleteBranch: optional(boolean2()),
8794
+ cleanup: optional(unknown()),
8795
+ feedback: optional(unknown()),
8796
+ liveSessionGuard: optional(boolean2()),
8797
+ shared: optional(boolean2()),
8798
+ fanout: optional(looseObject({
8799
+ tierModels: optional(unknown()),
8800
+ deps: optional(unknown()),
8801
+ installTimeout: optional(unknown())
8802
+ })),
8803
+ models: optional(looseObject({ roles: modelRoles })),
8804
+ resources: optional(unknown()),
8805
+ remotes: optional(array(nonBlank.check(refine((pattern) => remotePattern(pattern) !== null, "is not a remote URL (https://host/owner/repo, git@host:owner/repo, a path, or owner/*)")))),
8806
+ externalRepos: optional(array(nonBlank.check(_regex(/^[\w-]+(?:\/\w[\w.-]*)*\/(?:\w[\w.-]*|\*)$/u, "is owner/name, group/project or owner/* on the checkout's forge host, without the host")))),
8807
+ additiveRiskPaths: optional(array(nonBlank)),
8808
+ autonomy: optional(looseObject(Object.fromEntries(["push", "pr", "merge", "release", "rerun"].map((kind) => [
8814
8809
  kind,
8815
- described(optional(union([boolean2(), literal("verified")])), `The ${kind} grant: true, false, or "verified" (only after a verdict).`)
8816
- ])))), "Autonomy grants (D15): only ever set here, by the user, with `workit grant set`."),
8817
- youtrack: described(optional(looseObject({
8818
- baseUrl: described(optional(nonBlank), "This workspace's YouTrack URL."),
8819
- link_issues: described(optional(boolean2()), "Legacy alias of `issues: { provider: youtrack, link: true }`."),
8820
- writes: described(optional(_enum(["ask", "auto"])), "ask (default): each workit youtrack write waits for the user's yes. auto: posts without asking, behind WORKIT_YT_WRITE=1."),
8821
- autoHosts: described(optional(array(nonBlank)), "With writes auto: the only YouTrack hosts (`acme.youtrack.cloud`) a write may reach without asking. A raw ytrack write must name one with --host; a write elsewhere asks. Only the user widens it, in their own terminal (`workit workspace seal`).")
8822
- })), "YouTrack settings for this workspace."),
8823
- issues: described(optional(looseObject({
8824
- provider: described(optional(_enum(["github", "gitlab", "youtrack"])), "The issue tracker PRs link to."),
8825
- link: described(optional(boolean2()), "Derive the issue from the branch name."),
8826
- relation: described(optional(unknown()), "How a PR names its issue: `closes` (default) or `refs`."),
8827
- backlink: described(optional(boolean2()), "Post the PR URL on each linked issue after the PR is opened."),
8828
- link_on_pr: described(optional(boolean2()), "Legacy alias of `link`."),
8829
- repo: described(optional(unknown()), "The GitHub/GitLab repository (owner/name) that holds the issues; default the PR's own."),
8830
- host: described(optional(unknown()), "That repository's host; default the PR's host, or the tracker's public one.")
8831
- })), "The issue tracker PRs link to (any forge with any tracker)."),
8832
- branchPolicy: described(optional(workspaceBranchPolicySchema), "Which branches may be created and which are protected."),
8833
- commitPolicy: described(optional(workspaceCommitPolicySchema), "The commit message rules."),
8834
- defaultProfile: described(optional(nonBlank), "The profile used when none is named; must be a key of `profiles`."),
8835
- profiles: described(optional(record(nonBlank, workspaceProfileSchema)), "Named branch/commit policy variants of this workspace."),
8836
- releaseTracks: described(optional(record(nonBlank, releaseTrackSchema)), "Named release tracks: production and integration branches, naming and versioning."),
8837
- releasePackages: described(optional(unknown()), "Packages released from this repository's own release line under their own tag namespace (`pkg-a@0.1.0`): keyed by package name, each `{ tagNamespace?, changelogPath? }` (default namespace `<name>@`). `workit release package <name> <version>` tags and publishes one.")
8810
+ optional(union([boolean2(), literal("verified")]))
8811
+ ])))),
8812
+ youtrack: optional(looseObject({
8813
+ baseUrl: optional(nonBlank),
8814
+ link_issues: optional(boolean2()),
8815
+ writes: optional(_enum(["ask", "auto"])),
8816
+ autoHosts: optional(array(nonBlank))
8817
+ })),
8818
+ issues: optional(looseObject({
8819
+ provider: optional(_enum(["github", "gitlab", "youtrack"])),
8820
+ link: optional(boolean2()),
8821
+ relation: optional(unknown()),
8822
+ backlink: optional(boolean2()),
8823
+ link_on_pr: optional(boolean2()),
8824
+ repo: optional(unknown()),
8825
+ host: optional(unknown())
8826
+ })),
8827
+ branchPolicy: optional(workspaceBranchPolicySchema),
8828
+ commitPolicy: optional(workspaceCommitPolicySchema),
8829
+ defaultProfile: optional(nonBlank),
8830
+ profiles: optional(record(nonBlank, workspaceProfileSchema)),
8831
+ releaseTracks: optional(record(nonBlank, releaseTrackSchema)),
8832
+ releasePackages: optional(unknown())
8838
8833
  }).check(superRefine((workspace, context) => {
8839
8834
  if (workspace.defaultProfile !== undefined && !Object.hasOwn(workspace.profiles ?? {}, workspace.defaultProfile)) {
8840
8835
  context.addIssue({
@@ -8845,11 +8840,11 @@ var workspaceConfigSchema = looseObject({
8845
8840
  }
8846
8841
  }));
8847
8842
  var workspacesFileSchema = looseObject({
8848
- workspaces: described(optional(array(workspaceConfigSchema)), "Workspace entries, each mapping a path glob to its forge, policies and grants."),
8849
- models: described(optional(looseObject({ roles: modelRoles })), "The global default model and effort per role and host (roles), the lead's own advisory model (lead), how a role model applies (enforce: advise, the default, or strict) and, under strict, whether a model the lead names on a spawn wins (allowLeadOverride, default false)."),
8850
- feedback: described(optional(looseObject({
8851
- account: described(optional(nonBlank), "The GitHub login `workit feedback --post` uses when no workspace names one; never the workspace's work account by default.")
8852
- })), "`workit feedback` defaults for every workspace.")
8843
+ workspaces: optional(array(workspaceConfigSchema)),
8844
+ models: optional(looseObject({ roles: modelRoles })),
8845
+ feedback: optional(looseObject({
8846
+ account: optional(nonBlank)
8847
+ }))
8853
8848
  }).check(superRefine((file, context) => {
8854
8849
  const names = new Set;
8855
8850
  for (const [index, workspace] of (file.workspaces ?? []).entries()) {
@@ -20590,12 +20585,20 @@ var POWERSHELL_PARAMETERS = [
20590
20585
  { name: "workingdirectory", min: 2, aliases: ["wd"], kind: "value" }
20591
20586
  ];
20592
20587
  var powershellRun = (words, stdin) => {
20588
+ const { script, opaque, dir } = powershellParameters(words, stdin);
20589
+ return {
20590
+ script: script !== null && dir !== undefined ? `Set-Location -LiteralPath '${dir.replaceAll("'", "''")}'; ${script}` : script,
20591
+ opaque
20592
+ };
20593
+ };
20594
+ var powershellParameters = (words, stdin) => {
20593
20595
  const host = /powershell/i.test(words[0] ?? "") ? "powershell" : "pwsh";
20594
20596
  let opaque = false;
20597
+ let dir;
20595
20598
  for (let index = 1;index < words.length; index++) {
20596
20599
  const word = words[index];
20597
20600
  if (!/^[-/]/.test(word))
20598
- return host === "powershell" ? { script: words.slice(index).join(" "), opaque } : { script: null, opaque: true };
20601
+ return host === "powershell" ? { script: words.slice(index).join(" "), opaque, dir } : { script: null, opaque: true };
20599
20602
  const [, key = "", glued] = /^(?:--?|\/)([^:=]*)(?:[:=](.*))?$/s.exec(word) ?? [];
20600
20603
  const flag = key.toLowerCase();
20601
20604
  const matches = POWERSHELL_PARAMETERS.filter((parameter) => (parameter.host ?? host) === host && flag !== "" && (parameter.aliases?.includes(flag) || flag.length >= parameter.min && parameter.name.startsWith(flag)));
@@ -20603,13 +20606,19 @@ var powershellRun = (words, stdin) => {
20603
20606
  opaque = true;
20604
20607
  continue;
20605
20608
  }
20606
- const [{ kind }] = matches;
20609
+ const [{ kind, name }] = matches;
20607
20610
  const value = glued ?? words[index + 1];
20611
+ if (name === "workingdirectory")
20612
+ dir = value;
20608
20613
  if (kind === "info")
20609
20614
  return { script: null, opaque: opaque || index < words.length - 1 };
20610
20615
  if (kind === "encoded") {
20611
20616
  try {
20612
- return { script: Buffer.from(value ?? "", "base64").toString("utf16le"), opaque: true };
20617
+ return {
20618
+ script: Buffer.from(value ?? "", "base64").toString("utf16le"),
20619
+ opaque: true,
20620
+ dir
20621
+ };
20613
20622
  } catch {
20614
20623
  return { script: null, opaque: true };
20615
20624
  }
@@ -20617,15 +20626,17 @@ var powershellRun = (words, stdin) => {
20617
20626
  if (kind === "args")
20618
20627
  return {
20619
20628
  script: value ?? null,
20620
- opaque: opaque || glued !== undefined || value === undefined
20629
+ opaque: opaque || glued !== undefined || value === undefined,
20630
+ dir
20621
20631
  };
20622
20632
  if (kind === "script") {
20623
20633
  if (value === "-")
20624
- return { script: stdin ?? null, opaque: true };
20634
+ return { script: stdin ?? null, opaque: true, dir };
20625
20635
  const rest = glued === undefined ? words.slice(index + 1) : [glued, ...words.slice(index + 1)];
20626
20636
  return {
20627
20637
  script: rest.join(" ") || null,
20628
- opaque: opaque || glued !== undefined || !rest.length
20638
+ opaque: opaque || glued !== undefined || !rest.length,
20639
+ dir
20629
20640
  };
20630
20641
  }
20631
20642
  opaque ||= kind === "opaque";
@@ -27762,7 +27773,9 @@ var KEYWORDS2 = /^(?:if|elseif|else|switch|while|do|until|for|foreach|try|catch|
27762
27773
  var WINDOWS_WRITERS = /^(?:xcopy|robocopy|attrib|icacls|cacls|takeown|compact|cipher|expand|extrac32|makecab|fsutil|reg|regedit|setx|schtasks|msiexec|certutil|bitsadmin|replace|subst|mountvol|format|diskpart|wsl|cscript|wscript|mshta|rundll32|regsvr32|call)$/;
27763
27774
  var READ_METHODS = /^(?:trim(?:start|end)?|split|contains(?:key|value)?|startswith|endswith|substring|(?:last)?indexof(?:any)?|to(?:lower|upper)(?:invariant)?|tostring|tochararray|pad(?:left|right)|equals|compareto|gettype|gethashcode|normalize|where)$/i;
27764
27775
  var READ_MEMBERS = /^(?:name|fullname|basename|extension|length|count|directory|directoryname|parent|root|exists|mode|lastwritetime(?:utc)?|creationtime(?:utc)?|lastaccesstime(?:utc)?|attributes|linktype|target|pspath|pschildname|path|line|linenumber|filename|matches|value|key|keys|values|id|processname|source|definition|version)$/i;
27765
- var LOADER_ENV = /^(?:GIT_\w*|PAGER|EDITOR|VISUAL|PATH|LD_\w*|DYLD_\w*|NODE_OPTIONS|PYTHON\w*|BASH_ENV|ENV|PERL5(?:OPT|LIB)|RUBY(?:OPT|LIB))$/i;
27776
+ var LOADER_ENV = /^(?:GIT_\w*|SSH_ASKPASS(?:_REQUIRE)?|PAGER|EDITOR|VISUAL|PATH|PATHEXT|PSModulePath|LD_\w*|DYLD_\w*|NODE_OPTIONS|NODE_PATH|BUN_OPTIONS|npm_config_\w*|PYTHON\w*|BASH_ENV|ENV|PROMPT_COMMAND|PERL5(?:OPT|LIB)|RUBY(?:OPT|LIB)|RUSTC_(?:WORKSPACE_)?WRAPPER|CARGO_\w*|JAVA_TOOL_OPTIONS|_JAVA_OPTIONS|JDK_JAVA_OPTIONS|DOTNET_STARTUP_HOOKS|COMPLUS_\w*|CORECLR_\w*)$/i;
27777
+ var GIT_CONFIG_ENV2 = /^(?:HOME|USERPROFILE|HOMEDRIVE|HOMEPATH|XDG_\w+|LESS\w*)$/i;
27778
+ var EXEMPT_LOADER = /^(?:(?:GIT_)?PAGER=cat|GIT_OPTIONAL_LOCKS=0)$/;
27766
27779
  var CMD_VAR = /%[^%\s]+%|![^!\s]+!/;
27767
27780
  var NULL_SINK = /^(?:\$null|nul|\/dev\/null)$/i;
27768
27781
  var pwshCode = (text) => {
@@ -27815,7 +27828,7 @@ var powershellTextWriter = (text) => {
27815
27828
  if (statics)
27816
27829
  return `${statics[1]}::${statics[2]}`;
27817
27830
  for (const [, name] of code.matchAll(/\$\{?env:(\w+)\}?\s*[-+]?=/gi))
27818
- if (LOADER_ENV.test(name))
27831
+ if (LOADER_ENV.test(name) || GIT_CONFIG_ENV2.test(name))
27819
27832
  return `$env:${name} =`;
27820
27833
  for (const [, name] of code.matchAll(/\.([A-Za-z_]\w*)\(/g))
27821
27834
  if (!READ_METHODS.test(name))
@@ -28887,14 +28900,13 @@ var commandWords = (words) => {
28887
28900
  start++;
28888
28901
  return words.slice(start);
28889
28902
  };
28890
- var POSIX_LOADER = new RegExp(LOADER_ENV.source);
28891
28903
  var loaderAssignment = (words) => {
28892
28904
  for (const word of words) {
28893
28905
  const name = /^(\w+)\+?=/.exec(word)?.[1];
28894
- if (/^(?:(?:GIT_)?PAGER=cat|GIT_OPTIONAL_LOCKS=0)$/.test(word))
28906
+ if (EXEMPT_LOADER.test(word))
28895
28907
  continue;
28896
28908
  if (name !== undefined) {
28897
- if (POSIX_LOADER.test(name))
28909
+ if (LOADER_ENV.test(name))
28898
28910
  return word.split("=")[0];
28899
28911
  } else if (!DECLARERS.has(word) && word !== "env" && !word.startsWith("-"))
28900
28912
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workit-dev/opencode",
3
- "version": "2.26.1",
3
+ "version": "2.26.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.3.2",
44
- "@workit-dev/core": "^2.26.1"
44
+ "@workit-dev/core": "^2.26.2"
45
45
  },
46
46
  "engines": {
47
47
  "node": ">=24"