opencode-agy-bridge 0.2.3 → 0.2.5
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/README.md +1 -1
- package/dist/plugin.js +1 -0
- package/dist/provider.d.ts +3 -1
- package/dist/provider.js +2 -8
- package/package.json +5 -1
package/README.md
CHANGED
package/dist/plugin.js
CHANGED
package/dist/provider.d.ts
CHANGED
|
@@ -7,5 +7,7 @@ export interface AgyProviderOptions {
|
|
|
7
7
|
timeoutMs?: number;
|
|
8
8
|
}
|
|
9
9
|
export declare function extractDelta(prevOutput: string, fullText: string, conversationBound: boolean): string;
|
|
10
|
-
export declare function createAgyProvider(opts?: AgyProviderOptions): ProviderV2
|
|
10
|
+
export declare function createAgyProvider(opts?: AgyProviderOptions): ProviderV2 & {
|
|
11
|
+
provider: string;
|
|
12
|
+
};
|
|
11
13
|
export default function defaultFactory(opts?: AgyProviderOptions): ProviderV2;
|
package/dist/provider.js
CHANGED
|
@@ -70,7 +70,6 @@ function buildLanguageModel(modelId, opts) {
|
|
|
70
70
|
? callOpts.prompt.slice(processedMessages)
|
|
71
71
|
: callOpts.prompt;
|
|
72
72
|
const prompt = flattenPrompt(newMessages);
|
|
73
|
-
console.error("[agy-bridge] doGenerate session=%s conv=%s msgs=%d/%d", sessionId.slice(0, 8), conversationId?.slice(0, 8) ?? "-", newMessages.length, callOpts.prompt.length);
|
|
74
73
|
const result = await runAgy({
|
|
75
74
|
prompt,
|
|
76
75
|
cwd: process.cwd(),
|
|
@@ -191,7 +190,6 @@ function buildLanguageModel(modelId, opts) {
|
|
|
191
190
|
doStream,
|
|
192
191
|
};
|
|
193
192
|
}
|
|
194
|
-
let factoryInitWarned = false;
|
|
195
193
|
function unsupportedEmbeddingModel(modelId) {
|
|
196
194
|
return {
|
|
197
195
|
specificationVersion: "v2",
|
|
@@ -217,21 +215,17 @@ function unsupportedImageModel(modelId) {
|
|
|
217
215
|
}
|
|
218
216
|
export function createAgyProvider(opts) {
|
|
219
217
|
const resolvedOpts = opts ?? {};
|
|
220
|
-
if (!factoryInitWarned) {
|
|
221
|
-
factoryInitWarned = true;
|
|
222
|
-
console.error("[agy-bridge] createAgyProvider called");
|
|
223
|
-
}
|
|
224
218
|
const languageModel = (modelId) => {
|
|
225
|
-
console.error("[agy-bridge] languageModel called for modelId=%s", modelId);
|
|
226
219
|
return buildLanguageModel(modelId, resolvedOpts);
|
|
227
220
|
};
|
|
228
221
|
return {
|
|
222
|
+
specificationVersion: "v2",
|
|
223
|
+
provider: "agy",
|
|
229
224
|
languageModel,
|
|
230
225
|
textEmbeddingModel: (modelId) => unsupportedEmbeddingModel(modelId),
|
|
231
226
|
imageModel: (modelId) => unsupportedImageModel(modelId),
|
|
232
227
|
};
|
|
233
228
|
}
|
|
234
229
|
export default function defaultFactory(opts) {
|
|
235
|
-
console.error("[agy-bridge] defaultFactory called");
|
|
236
230
|
return createAgyProvider(opts);
|
|
237
231
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-agy-bridge",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/provider.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,5 +32,9 @@
|
|
|
32
32
|
"@opencode-ai/plugin": "^1.15.12",
|
|
33
33
|
"@types/bun": "latest",
|
|
34
34
|
"typescript": "^5.8.0"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@ai-sdk/openai": "^3.0.67",
|
|
38
|
+
"zod": "^3.25.0-beta.20250519T094321"
|
|
35
39
|
}
|
|
36
40
|
}
|