opencode-agy-bridge 0.2.6 → 0.2.8

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 CHANGED
@@ -54,7 +54,7 @@ Add the plugin and provider to `~/.config/opencode/opencode.json`.
54
54
  ```jsonc
55
55
  {
56
56
  "plugin": [
57
- "opencode-agy-bridge@0.2.6"
57
+ "opencode-agy-bridge@0.2.7"
58
58
  ],
59
59
  "provider": {
60
60
  "agy": {
@@ -33,7 +33,6 @@ export async function runAgy(input) {
33
33
  const stderr = Buffer.concat(stderrChunks).toString("utf-8");
34
34
  const exitCode = code ?? 1;
35
35
  if (stderr.trim()) {
36
- console.error("[agy-bridge] agy stderr:", stderr.trimEnd());
37
36
  }
38
37
  if (exitCode !== 0 && !stdout.trim()) {
39
38
  const msg = stderr.trim() || `agy exited with status ${exitCode}`;
@@ -31,7 +31,6 @@ export async function findNewConversation(before, dir) {
31
31
  return null;
32
32
  }
33
33
  if (created.length > 1) {
34
- console.error("[agy-bridge] WARN: multiple new agy conversation files appeared; refusing to bind");
35
34
  return null;
36
35
  }
37
36
  return created[0];
package/dist/index.d.ts CHANGED
@@ -1 +1,2 @@
1
+ export { createAgyProvider } from "./provider.js";
1
2
  export default function unified(input?: any): any;
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { createAgyProvider } from "./provider.js";
2
+ export { createAgyProvider } from "./provider.js";
2
3
  export default function unified(input) {
3
4
  if (input && typeof input === "object" && "client" in input) {
4
5
  return {
@@ -1,4 +1,4 @@
1
- import type { ProviderV2 } from "@ai-sdk/provider";
1
+ import type { ProviderV2, LanguageModelV2 } from "@ai-sdk/provider";
2
2
  export interface AgyProviderOptions {
3
3
  binary?: string;
4
4
  conversationsDir?: string;
@@ -8,6 +8,7 @@ export interface AgyProviderOptions {
8
8
  }
9
9
  export declare function extractDelta(prevOutput: string, fullText: string, conversationBound: boolean): string;
10
10
  export declare function createAgyProvider(opts?: AgyProviderOptions): ProviderV2 & {
11
+ (modelId: string): LanguageModelV2;
11
12
  provider: string;
12
13
  };
13
14
  export default function defaultFactory(opts?: AgyProviderOptions): ProviderV2;
package/dist/provider.js CHANGED
@@ -42,7 +42,6 @@ export function extractDelta(prevOutput, fullText, conversationBound) {
42
42
  return normFull.slice(tailIdx + tail.length).replace(/^\s+/, "");
43
43
  }
44
44
  }
45
- console.error("[agy-bridge] WARN: agy stdout was not append-only; sending full output and resetting delta baseline");
46
45
  return fullText;
47
46
  }
48
47
  function buildLanguageModel(modelId, opts) {
@@ -215,16 +214,15 @@ function unsupportedImageModel(modelId) {
215
214
  }
216
215
  export function createAgyProvider(opts) {
217
216
  const resolvedOpts = opts ?? {};
218
- const languageModel = (modelId) => {
217
+ const factory = (modelId) => {
219
218
  return buildLanguageModel(modelId, resolvedOpts);
220
219
  };
221
- return {
222
- specificationVersion: "v2",
223
- provider: "agy",
224
- languageModel,
225
- textEmbeddingModel: (modelId) => unsupportedEmbeddingModel(modelId),
226
- imageModel: (modelId) => unsupportedImageModel(modelId),
227
- };
220
+ factory.provider = "agy";
221
+ factory.specificationVersion = "v2";
222
+ factory.languageModel = factory;
223
+ factory.textEmbeddingModel = (modelId) => unsupportedEmbeddingModel(modelId);
224
+ factory.imageModel = (modelId) => unsupportedImageModel(modelId);
225
+ return factory;
228
226
  }
229
227
  export default function defaultFactory(opts) {
230
228
  return createAgyProvider(opts);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-agy-bridge",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "license": "MIT",