@codex-native/sdk 0.0.3 → 0.0.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/dist/index.mjs CHANGED
@@ -1118,8 +1118,10 @@ var OpenCodeAgent = class {
1118
1118
  this.clientPromise = loadOpencodeModule().then(async ({ createOpencode }) => {
1119
1119
  const hostname = this.options.hostname ?? DEFAULT_HOSTNAME;
1120
1120
  const port = await findAvailablePort(hostname, this.options.port ?? DEFAULT_PORT);
1121
- const { client, server } = await createOpencode({ hostname, port, config: this.options.config });
1122
- this.closeCallback = () => server.close();
1121
+ const { client, close } = await createOpencode({ hostname, port, config: this.options.config });
1122
+ if (close) {
1123
+ this.closeCallback = close;
1124
+ }
1123
1125
  return client;
1124
1126
  });
1125
1127
  return this.clientPromise;