@workit-dev/opencode 2.26.1 → 2.27.0
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 +142 -110
- 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:
|
|
8711
|
-
developBranch:
|
|
8712
|
-
prefixes:
|
|
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
|
-
})),
|
|
8718
|
-
allowed:
|
|
8719
|
-
protected:
|
|
8720
|
-
integration:
|
|
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:
|
|
8724
|
-
pattern:
|
|
8718
|
+
preset: commitPreset,
|
|
8719
|
+
pattern: optional(string2())
|
|
8725
8720
|
});
|
|
8726
8721
|
var workspaceProfileSchema = strictObject({
|
|
8727
|
-
branchPolicy:
|
|
8728
|
-
commitPolicy:
|
|
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:
|
|
8741
|
-
productionBranch:
|
|
8742
|
-
integrationBranch:
|
|
8743
|
-
naming:
|
|
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
|
-
})),
|
|
8748
|
-
baseBranch:
|
|
8749
|
-
mergeBackBranches:
|
|
8750
|
-
pullRequestTarget:
|
|
8751
|
-
tagNamespace:
|
|
8752
|
-
versionSource:
|
|
8753
|
-
requiredChecks:
|
|
8754
|
-
critical:
|
|
8755
|
-
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 =
|
|
8772
|
+
var modelRoles = optional(unknown());
|
|
8778
8773
|
var workspaceConfigSchema = looseObject({
|
|
8779
|
-
name:
|
|
8780
|
-
glob:
|
|
8781
|
-
vcs:
|
|
8782
|
-
provider:
|
|
8783
|
-
defaultTargetBranch:
|
|
8784
|
-
tokenFile:
|
|
8785
|
-
account:
|
|
8786
|
-
host:
|
|
8787
|
-
})),
|
|
8788
|
-
autoApprove:
|
|
8789
|
-
defaultEndpoint:
|
|
8790
|
-
verification:
|
|
8791
|
-
delegation:
|
|
8792
|
-
changelog:
|
|
8793
|
-
docs:
|
|
8794
|
-
changelogPath:
|
|
8795
|
-
prTemplate:
|
|
8796
|
-
releaseNotes:
|
|
8797
|
-
trailers:
|
|
8798
|
-
deleteBranch:
|
|
8799
|
-
cleanup:
|
|
8800
|
-
feedback:
|
|
8801
|
-
liveSessionGuard:
|
|
8802
|
-
shared:
|
|
8803
|
-
fanout:
|
|
8804
|
-
tierModels:
|
|
8805
|
-
deps:
|
|
8806
|
-
installTimeout:
|
|
8807
|
-
})),
|
|
8808
|
-
models:
|
|
8809
|
-
resources:
|
|
8810
|
-
remotes:
|
|
8811
|
-
externalRepos:
|
|
8812
|
-
additiveRiskPaths:
|
|
8813
|
-
autonomy:
|
|
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
|
-
|
|
8816
|
-
])))),
|
|
8817
|
-
youtrack:
|
|
8818
|
-
baseUrl:
|
|
8819
|
-
link_issues:
|
|
8820
|
-
writes:
|
|
8821
|
-
autoHosts:
|
|
8822
|
-
})),
|
|
8823
|
-
issues:
|
|
8824
|
-
provider:
|
|
8825
|
-
link:
|
|
8826
|
-
relation:
|
|
8827
|
-
backlink:
|
|
8828
|
-
link_on_pr:
|
|
8829
|
-
repo:
|
|
8830
|
-
host:
|
|
8831
|
-
})),
|
|
8832
|
-
branchPolicy:
|
|
8833
|
-
commitPolicy:
|
|
8834
|
-
defaultProfile:
|
|
8835
|
-
profiles:
|
|
8836
|
-
releaseTracks:
|
|
8837
|
-
releasePackages:
|
|
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:
|
|
8849
|
-
models:
|
|
8850
|
-
feedback:
|
|
8851
|
-
account:
|
|
8852
|
-
}))
|
|
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 {
|
|
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))
|
|
@@ -28131,7 +28144,7 @@ var WRAPPERS3 = {
|
|
|
28131
28144
|
var INTERPRETERS = /^(?:python[\d.]*|node|bun|deno|ruby|perl|php|tsx|ts-node)$/;
|
|
28132
28145
|
var INLINE_CODE = /^-[a-zA-Z]*[cep]$|^--(?:eval|print)(?:=|$)/;
|
|
28133
28146
|
var isConfigDir = (file) => configDirs().some((dir) => canonical5(dir) === canonical5(file));
|
|
28134
|
-
var isRoot = (file) => isConfigDir(file) || /^(?:issued[^\\/]*|approvals|verdicts)$/.test(path42.relative(canonical5(resolveStateDir()), canonical5(file)));
|
|
28147
|
+
var isRoot = (file) => isConfigDir(file) || /^(?:issued[^\\/]*|approvals|verdicts|agent-stamps)$/.test(path42.relative(canonical5(resolveStateDir()), canonical5(file)));
|
|
28135
28148
|
var READ_CALLS = /^(?:print|log|info|warn|error|debug|puts|readdir(?:Sync)?|listdir|scandir|iterdir|glob|l?stat(?:Sync)?|exists(?:Sync)?|isdir|isfile|is_dir|is_file|access(?:Sync)?|realpath(?:Sync)?|dirname|basename|relative|str|repr|len)$/;
|
|
28136
28149
|
var MUTATING_CALLS = /^(?:renames?(?:Sync)?|move(?:_into)?|copy(?:2|file|tree|File|_into)?(?:Sync)?|cp(?:Sync)?|rm(?:tree|dir|Sync|dirSync)?|unlink(?:Sync)?|remove(?:dirs)?|mkdirs?(?:Sync)?|makedirs|mkdtemp(?:Sync)?|(?:sym|hard)?link(?:Sync|_to)?|write\w*|append\w*|f?truncate(?:Sync)?|ch(?:mod|own)(?:Sync)?|touch|open(?:Sync)?|dump|save|extractall|unpack_archive|put_contents|mv|FileUtils)$/;
|
|
28137
28150
|
var SPAWNS = /getattr|Reflect|getOwnPropertyDescriptor|FileIO|\.copy\s*\((?!\s*\))|utime|ch(?:mod|own)|\.delete\s*\(\s*\)|(?:PYTHON|NODE_)\w*\+?=|-r\b|--(?:require|import|env-file|[\w-]*loader)|\b(?:exec\w*|eval|(?:unlink|rename|remove)\w*)\b|\]\s*\(/;
|
|
@@ -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 (
|
|
28906
|
+
if (EXEMPT_LOADER.test(word))
|
|
28895
28907
|
continue;
|
|
28896
28908
|
if (name !== undefined) {
|
|
28897
|
-
if (
|
|
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;
|
|
@@ -29504,7 +29516,7 @@ var globbed = (cwd, target, state, configs) => {
|
|
|
29504
29516
|
};
|
|
29505
29517
|
let roots = [];
|
|
29506
29518
|
try {
|
|
29507
|
-
roots = readdirSync5(state).filter((name) => /^(?:issued|approvals$|verdicts$)/.test(name));
|
|
29519
|
+
roots = readdirSync5(state).filter((name) => /^(?:issued|approvals$|verdicts$|agent-stamps$)/.test(name));
|
|
29508
29520
|
} catch {}
|
|
29509
29521
|
return [
|
|
29510
29522
|
...roots.map((name) => path42.join(state, name)).filter((root) => hit(root, true)),
|
|
@@ -29529,8 +29541,8 @@ var guardedInodes = (state, configs) => {
|
|
|
29529
29541
|
for (const name of CONFIG_FILES)
|
|
29530
29542
|
add(path42.join(dir, name), "grants");
|
|
29531
29543
|
for (const name of readdirSync5(state))
|
|
29532
|
-
if (/^(?:issued|approvals$|verdicts$)/.test(name))
|
|
29533
|
-
add(path42.join(state, name), name === "approvals" ? "approvals" : name === "verdicts" ? "ledger" : "issued");
|
|
29544
|
+
if (/^(?:issued|approvals$|verdicts$|agent-stamps$)/.test(name))
|
|
29545
|
+
add(path42.join(state, name), name === "approvals" ? "approvals" : name === "verdicts" || name === "agent-stamps" ? "ledger" : "issued");
|
|
29534
29546
|
for (const slug of readdirSync5(path42.join(state, "folders")))
|
|
29535
29547
|
add(path42.join(state, "folders", slug, "ledger"), "ledger");
|
|
29536
29548
|
} catch {}
|
|
@@ -29601,7 +29613,7 @@ var underRegistry = (state, cwd, target, platform = process.platform, real = (fi
|
|
|
29601
29613
|
const first = parts[0];
|
|
29602
29614
|
if (first?.startsWith("issued"))
|
|
29603
29615
|
return "issued";
|
|
29604
|
-
if (first === "verdicts" || first === "folders" && parts[2] === "ledger")
|
|
29616
|
+
if (first === "verdicts" || first === "agent-stamps" || first === "folders" && parts[2] === "ledger")
|
|
29605
29617
|
return "ledger";
|
|
29606
29618
|
return first === "approvals" ? "approvals" : null;
|
|
29607
29619
|
};
|
|
@@ -29618,7 +29630,7 @@ var unquotedWindowsRegistry = (command, platform = process.platform) => {
|
|
|
29618
29630
|
const state = flat(resolveStateDir());
|
|
29619
29631
|
const configs = configDirs().map(flat);
|
|
29620
29632
|
const folders = `${state}/folders/`;
|
|
29621
|
-
const ledger = (at, named = false) => at.includes(`${state}/verdicts`) || (named ? inRepoLedger(at) : /\/workit\/ledger(?:[/\s'"]|$)/.test(at)) || at.split(folders).slice(1).some((rest) => /^[^/\s]+\/ledger(?:[/\s'"]|$)/.test(rest));
|
|
29633
|
+
const ledger = (at, named = false) => at.includes(`${state}/verdicts`) || at.includes(`${state}/agent-stamps`) || (named ? inRepoLedger(at) : /\/workit\/ledger(?:[/\s'"]|$)/.test(at)) || at.split(folders).slice(1).some((rest) => /^[^/\s]+\/ledger(?:[/\s'"]|$)/.test(rest));
|
|
29622
29634
|
const present = ["issued", "approvals", "ledger", "grants"].filter((kind) => kind === "ledger" ? ledger(text) : kind === "grants" ? configs.some((dir) => text.includes(dir)) : text.includes(`${state}/${kind}`));
|
|
29623
29635
|
if (!present.length)
|
|
29624
29636
|
return null;
|
|
@@ -32090,6 +32102,26 @@ Retry as: ${retry}`,
|
|
|
32090
32102
|
return null;
|
|
32091
32103
|
}
|
|
32092
32104
|
|
|
32105
|
+
// packages/workit-core/src/hooks/identity-env.ts
|
|
32106
|
+
var NAMES = "WORKIT_(?:AGENT_ID|HOST|SESSION_ID|SESSION_TOKEN)";
|
|
32107
|
+
var IDENTITY = new RegExp(`^${NAMES}$`, "u");
|
|
32108
|
+
var POWERSHELL = new RegExp(`\\$env:${NAMES}\\b|env:[\\\\/]?${NAMES}\\b|EnvironmentVariable\\(\\s*['"]${NAMES}\\b`, "iu");
|
|
32109
|
+
var DECLARES = new Set(["export", "unset", "declare", "typeset", "local", "readonly"]);
|
|
32110
|
+
var OPAQUE = new Set([
|
|
32111
|
+
"watch",
|
|
32112
|
+
"strace",
|
|
32113
|
+
"chroot",
|
|
32114
|
+
"flock",
|
|
32115
|
+
"ssh",
|
|
32116
|
+
"su",
|
|
32117
|
+
"runuser",
|
|
32118
|
+
"script",
|
|
32119
|
+
"parallel"
|
|
32120
|
+
]);
|
|
32121
|
+
var ENV_VALUED = new Set(["u", "C", "S", "a", "P"]);
|
|
32122
|
+
var ENV_FLAGS = new Set(["i", "0", "v"]);
|
|
32123
|
+
var ENV_LONG_VALUED = new Set(["--unset", "--chdir", "--split-string", "--argv0"]);
|
|
32124
|
+
|
|
32093
32125
|
// packages/workit-core/src/hooks/handle.ts
|
|
32094
32126
|
var offered = new Set;
|
|
32095
32127
|
var PRE_TOOL = new Set(["shell.pre", "write.pre", "tool.pre"]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workit-dev/opencode",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.27.0",
|
|
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.
|
|
44
|
+
"@workit-dev/core": "^2.27.0"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": ">=24"
|