@nail00749/agent-gvozd 0.1.4 → 0.1.6

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.
Files changed (3) hide show
  1. package/README.md +3 -3
  2. package/dist/cli.js +28 -16
  3. package/package.json +8 -3
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gvozd installs one permission-aware agent team globally, so every OpenCode
4
4
  project can use it without copying plugin or agent files into the repository.
5
- Release `0.1.2` targets OpenCode V2 `0.0.0-beta-19425` exactly.
5
+ Release `0.1.5` targets OpenCode V2 `2.0.2` exactly.
6
6
 
7
7
  ## Global setup
8
8
 
@@ -140,7 +140,7 @@ a build-consistency check that detects changes after packing; it is not an
140
140
  external provenance assertion. Review and protected checkout controls remain
141
141
  the source-provenance boundary.
142
142
 
143
- The executable must report exactly `0.0.0-beta-19425`. The gate gives child
143
+ The executable must report exactly `2.0.2`. The gate gives child
144
144
  processes a minimal allowlisted environment and isolated HOME, XDG config,
145
145
  temporary, and project directories. Commands have timeouts, bounded output,
146
146
  and redacted failure messages. The pinned CLI exposes no credential-free
@@ -211,7 +211,7 @@ and diagnostics. Runtime/config loading resolves its root in this order:
211
211
  4. `APPDATA/opencode` on Windows;
212
212
  5. `~/.config/opencode`.
213
213
 
214
- OpenCode `0.0.0-beta-19425` does not expose its config root in the plugin
214
+ OpenCode `2.0.2` does not expose its config root in the plugin
215
215
  context. The runtime therefore cannot infer a nonstandard host root from
216
216
  `debug paths`. If Doctor reports a mismatch, set
217
217
  `GVOZD_OPENCODE_CONFIG_ROOT` to the absolute path printed by
package/dist/cli.js CHANGED
@@ -7336,9 +7336,9 @@ function buildAgentPermissions(agent, mcpServers) {
7336
7336
 
7337
7337
  // src/release-metadata.ts
7338
7338
  var PACKAGE_NAME = "@nail00749/agent-gvozd";
7339
- var PACKAGE_VERSION = "0.1.4";
7339
+ var PACKAGE_VERSION = "0.1.6";
7340
7340
  var PACKAGE_SPEC = `${PACKAGE_NAME}@${PACKAGE_VERSION}`;
7341
- var SUPPORTED_OPENCODE_VERSION = "0.0.0-beta-19425";
7341
+ var SUPPORTED_OPENCODE_VERSION = "2.0.2";
7342
7342
  var CONFIG_SCHEMA_VERSION = 2;
7343
7343
 
7344
7344
  // src/constants.ts
@@ -7435,15 +7435,16 @@ function redactDiagnostic(error) {
7435
7435
  import { spawn } from "node:child_process";
7436
7436
  import { isAbsolute as isAbsolute4 } from "node:path";
7437
7437
  var MAX_OUTPUT_BYTES = 64 * 1024;
7438
+ var AGENT_OUTPUT_BYTES = 4 * 1024 * 1024;
7438
7439
  var DEFAULT_TIMEOUT_MS = 15000;
7439
- function appendBounded(current, chunk) {
7440
- if (Buffer.byteLength(current) >= MAX_OUTPUT_BYTES)
7441
- return current;
7442
- const remaining = MAX_OUTPUT_BYTES - Buffer.byteLength(current);
7443
- return current + chunk.subarray(0, remaining).toString("utf8");
7444
- }
7445
7440
  var defaultProcessRunner = {
7446
- run(executable, args, timeoutMs = DEFAULT_TIMEOUT_MS) {
7441
+ run(executable, args, timeoutMs = DEFAULT_TIMEOUT_MS, maxOutputBytes = MAX_OUTPUT_BYTES) {
7442
+ const appendBounded = (current, chunk) => {
7443
+ if (Buffer.byteLength(current) >= maxOutputBytes)
7444
+ return current;
7445
+ const remaining = maxOutputBytes - Buffer.byteLength(current);
7446
+ return current + chunk.subarray(0, remaining).toString("utf8");
7447
+ };
7447
7448
  return new Promise((resolve, reject) => {
7448
7449
  const grouped = process.platform !== "win32";
7449
7450
  const child = spawn(executable, [...args], {
@@ -7540,16 +7541,16 @@ var defaultProcessRunner = {
7540
7541
  });
7541
7542
  }
7542
7543
  };
7543
- function bounded(value) {
7544
- return Buffer.from(value).subarray(0, MAX_OUTPUT_BYTES).toString("utf8");
7544
+ function bounded(value, maxOutputBytes = MAX_OUTPUT_BYTES) {
7545
+ return Buffer.from(value).subarray(0, maxOutputBytes).toString("utf8");
7545
7546
  }
7546
- async function checked(runner, executable, args, timeoutMs) {
7547
- const result = await runner.run(executable, args, timeoutMs);
7547
+ async function checked(runner, executable, args, timeoutMs, maxOutputBytes) {
7548
+ const result = await runner.run(executable, args, timeoutMs, maxOutputBytes);
7548
7549
  if (result.code !== 0) {
7549
7550
  const detail = redactDiagnostic(bounded(result.stderr).trim());
7550
7551
  throw new Error(`OpenCode command exited ${result.code}${detail ? `: ${detail}` : ""}`);
7551
7552
  }
7552
- return bounded(result.stdout);
7553
+ return bounded(result.stdout, maxOutputBytes);
7553
7554
  }
7554
7555
  function parseDebugPaths(output) {
7555
7556
  const paths = {};
@@ -7567,6 +7568,16 @@ function parseDebugPaths(output) {
7567
7568
  function parseOpenCodeVersion(output) {
7568
7569
  return output.match(/(?:^|\s)v?(\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?)(?=$|\s)/)?.[1];
7569
7570
  }
7571
+ function parseAgentIdentifiers(output) {
7572
+ try {
7573
+ const parsed = JSON.parse(output);
7574
+ if (!Array.isArray(parsed))
7575
+ return output.trim();
7576
+ return parsed.map((entry) => entry && typeof entry === "object" && ("id" in entry) ? String(entry.id) : "").filter(Boolean).join(" ");
7577
+ } catch {
7578
+ return output.trim();
7579
+ }
7580
+ }
7570
7581
  function createClient(executable, runner) {
7571
7582
  return {
7572
7583
  executable,
@@ -7588,8 +7599,9 @@ function createClient(executable, runner) {
7588
7599
  pluginCheck(spec) {
7589
7600
  return checked(runner, executable, spec ? ["plugin", "check", spec] : ["plugin", "check"], 30000);
7590
7601
  },
7591
- debugAgents() {
7592
- return checked(runner, executable, ["debug", "agents"]);
7602
+ async debugAgents() {
7603
+ const raw = await checked(runner, executable, ["debug", "agents"], 60000, AGENT_OUTPUT_BYTES);
7604
+ return parseAgentIdentifiers(raw);
7593
7605
  },
7594
7606
  serviceStatus() {
7595
7607
  return checked(runner, executable, ["service", "status"]);
package/package.json CHANGED
@@ -1,9 +1,14 @@
1
1
  {
2
2
  "name": "@nail00749/agent-gvozd",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "A globally configured, permission-aware agent team for OpenCode V2",
5
5
  "license": "MIT",
6
- "keywords": ["opencode", "agents", "multi-agent", "cli"],
6
+ "keywords": [
7
+ "opencode",
8
+ "agents",
9
+ "multi-agent",
10
+ "cli"
11
+ ],
7
12
  "repository": {
8
13
  "type": "git",
9
14
  "url": "git+https://github.com/nail00749/opencode-agent.git"
@@ -46,7 +51,7 @@
46
51
  },
47
52
  "dependencies": {
48
53
  "@clack/prompts": "1.8.0",
49
- "@opencode/plugin": "0.0.0-beta-19425",
54
+ "@opencode/plugin": "2.0.2",
50
55
  "jsonc-parser": "3.3.1",
51
56
  "zod": "4.4.3"
52
57
  },