opencode-mastra-om 0.1.9 → 0.1.10
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/index.js +17 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -179766,23 +179766,28 @@ var MastraPlugin = async (ctx) => {
|
|
|
179766
179766
|
omLog(`[credentials] set ${envVars.join(", ")} from config.apiKey`);
|
|
179767
179767
|
}
|
|
179768
179768
|
}
|
|
179769
|
-
|
|
179770
|
-
|
|
179771
|
-
|
|
179772
|
-
|
|
179773
|
-
|
|
179774
|
-
|
|
179775
|
-
|
|
179776
|
-
|
|
179777
|
-
|
|
179778
|
-
|
|
179769
|
+
if (!config2.apiKey) {
|
|
179770
|
+
try {
|
|
179771
|
+
const providersResponse = await Promise.race([
|
|
179772
|
+
ctx.client.config.providers(),
|
|
179773
|
+
new Promise((_, reject) => setTimeout(() => reject(new Error("timeout")), 3000))
|
|
179774
|
+
]);
|
|
179775
|
+
if (providersResponse.data) {
|
|
179776
|
+
for (const provider of providersResponse.data.providers) {
|
|
179777
|
+
const key = provider.key ?? provider.apiKey ?? provider.token;
|
|
179778
|
+
if (key && provider.env) {
|
|
179779
|
+
for (const envVar of provider.env) {
|
|
179780
|
+
if (!process.env[envVar]) {
|
|
179781
|
+
process.env[envVar] = key;
|
|
179782
|
+
omLog(`[credentials] set ${envVar} from provider store`);
|
|
179783
|
+
}
|
|
179779
179784
|
}
|
|
179780
179785
|
}
|
|
179781
179786
|
}
|
|
179782
179787
|
}
|
|
179788
|
+
} catch (e2) {
|
|
179789
|
+
omLog(`[credentials] provider store unavailable: ${e2}`);
|
|
179783
179790
|
}
|
|
179784
|
-
} catch (e2) {
|
|
179785
|
-
omLog(`[credentials] provider store unavailable: ${e2}`);
|
|
179786
179791
|
}
|
|
179787
179792
|
credentialsReady = true;
|
|
179788
179793
|
omLog(`[credentials] resolved. GOOGLE_GENERATIVE_AI_API_KEY=${process.env.GOOGLE_GENERATIVE_AI_API_KEY ? "set" : "missing"}`);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "opencode-mastra-om",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.10",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"description": "Enhanced Mastra Observational Memory plugin for OpenCode — persistent cross-session memory with observation, reflection, and manual trigger tools",
|