opencode-openai-codex-multi-auth 4.4.8 → 4.4.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-openai-codex-multi-auth",
3
- "version": "4.4.8",
3
+ "version": "4.4.9",
4
4
  "description": "OpenAI ChatGPT (Codex backend) OAuth auth plugin for opencode - use your ChatGPT Plus/Pro subscription instead of API credits",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -78,6 +78,14 @@ function isPluginPackageSpec(entry) {
78
78
  return typeof entry === "string" && entry.startsWith(`${PLUGIN_PACKAGE}@`);
79
79
  }
80
80
 
81
+ function matchesPluginAlias(entry, alias) {
82
+ if (entry === alias) return true;
83
+ if (entry.startsWith(`${alias}@`)) return true;
84
+ // GitHub specs can include a ref suffix: github:owner/repo#ref
85
+ if (entry.startsWith(`${alias}#`)) return true;
86
+ return false;
87
+ }
88
+
81
89
  function resolveDesiredPluginEntry(list) {
82
90
  const entries = Array.isArray(list) ? list.filter(Boolean) : [];
83
91
  const existingPinned = entries.find(isPluginPackageSpec);
@@ -90,8 +98,7 @@ function normalizePluginList(list) {
90
98
  const filtered = entries.filter((entry) => {
91
99
  if (typeof entry !== "string") return true;
92
100
  return !PLUGIN_ALIASES.some(
93
- (alias) =>
94
- entry === alias || entry.startsWith(`${alias}@`) || entry.includes(alias),
101
+ (alias) => matchesPluginAlias(entry, alias),
95
102
  );
96
103
  });
97
104
  return [...filtered, desiredPluginEntry];
@@ -102,8 +109,7 @@ function removePluginEntries(list) {
102
109
  return entries.filter((entry) => {
103
110
  if (typeof entry !== "string") return true;
104
111
  return !PLUGIN_ALIASES.some(
105
- (alias) =>
106
- entry === alias || entry.startsWith(`${alias}@`) || entry.includes(alias),
112
+ (alias) => matchesPluginAlias(entry, alias),
107
113
  );
108
114
  });
109
115
  }