@cotal-ai/connector-opencode 0.68.0 → 0.69.0

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/serve.js CHANGED
@@ -31,7 +31,7 @@ function resolveOpencodeBin() {
31
31
  }
32
32
  var BIN = resolveOpencodeBin();
33
33
  var USERNAME = "opencode";
34
- var SECRET = randomBytes(24).toString("hex");
34
+ var SECRET = process.env.OPENCODE_SERVER_PASSWORD || randomBytes(24).toString("hex");
35
35
  async function freePort() {
36
36
  const srv = createServer();
37
37
  srv.listen(0, "127.0.0.1");
@@ -155,7 +155,7 @@ async function main() {
155
155
  process.exit(1);
156
156
  }
157
157
  if (process.env.COTAL_SERVE_HEADLESS?.trim() === "1") {
158
- process.stdout.write(`[cotal-serve] ${JSON.stringify({ port: Number(port), session: id, password: SECRET })}
158
+ process.stdout.write(`[cotal-serve] ${JSON.stringify({ port: Number(port), session: id })}
159
159
  `);
160
160
  for (const sig of ["SIGINT", "SIGTERM"])
161
161
  process.on(sig, () => void terminate(serve).then(() => process.exit(0)));
@@ -170,7 +170,7 @@ async function main() {
170
170
  delete tuiEnv.OPENCODE_CONFIG_CONTENT;
171
171
  for (const k of Object.keys(tuiEnv)) if (k.startsWith("COTAL_")) delete tuiEnv[k];
172
172
  attached = true;
173
- const tui = line === 2 ? spawn(BIN, ["--server", url, "--session", id], { env: tuiEnv, stdio: "inherit" }) : spawn(BIN, ["attach", url, "--session", id, "--password", SECRET], { env: tuiEnv, stdio: "inherit" });
173
+ const tui = line === 2 ? spawn(BIN, ["--server", url, "--session", id], { env: tuiEnv, stdio: "inherit" }) : spawn(BIN, ["attach", url, "--session", id], { env: tuiEnv, stdio: "inherit" });
174
174
  for (const sig of ["SIGINT", "SIGTERM"])
175
175
  process.on(sig, () => {
176
176
  tui.kill(sig);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cotal-ai/connector-opencode",
3
3
  "description": "Cotal connector for OpenCode: a native in-process plugin that joins a session to the mesh.",
4
- "version": "0.68.0",
4
+ "version": "0.69.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -21,8 +21,8 @@
21
21
  "@cotal-ai/core": ">=0.1.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@cotal-ai/connector-core": "0.68.0",
25
- "@cotal-ai/core": "0.68.0",
24
+ "@cotal-ai/connector-core": "0.69.0",
25
+ "@cotal-ai/core": "0.69.0",
26
26
  "@cotal-ai/smoke-kit": "0.0.0",
27
27
  "@nats-io/transport-node": "^3.4.0",
28
28
  "@opencode-ai/plugin": "^1.16.2",