@nail00749/agent-gvozd 0.1.6 → 0.1.7

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 (2) hide show
  1. package/dist/cli.js +20 -8
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -7336,7 +7336,7 @@ 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.6";
7339
+ var PACKAGE_VERSION = "0.1.7";
7340
7340
  var PACKAGE_SPEC = `${PACKAGE_NAME}@${PACKAGE_VERSION}`;
7341
7341
  var SUPPORTED_OPENCODE_VERSION = "2.0.2";
7342
7342
  var CONFIG_SCHEMA_VERSION = 2;
@@ -8702,7 +8702,16 @@ function syncAgentsUnlocked(config, options) {
8702
8702
  }
8703
8703
  const pluginTarget = join9(pluginDestination, "index.ts");
8704
8704
  const pluginContent = renderPluginEntrypoint(config, pluginDestination);
8705
- if (!assertRegularFile(pluginTarget)) {
8705
+ if (!options.devPlugin) {
8706
+ if (assertRegularFile(pluginTarget)) {
8707
+ const current = readFileSync8(pluginTarget, "utf8");
8708
+ if (hasGeneratedPluginMarker(current)) {
8709
+ result.removed.push(pluginTarget);
8710
+ removals.set(pluginTarget, current);
8711
+ options.onDiff?.(renderDiff(pluginTarget, current, ""));
8712
+ }
8713
+ }
8714
+ } else if (!assertRegularFile(pluginTarget)) {
8706
8715
  result.created.push(pluginTarget);
8707
8716
  pluginWrite = { target: pluginTarget, content: pluginContent, replace: false };
8708
8717
  } else {
@@ -8723,11 +8732,12 @@ function syncAgentsUnlocked(config, options) {
8723
8732
  const writablePluginDestination = safeDirectory(config.projectRoot, [".opencode", "plugins", "agent-gvozd"], true);
8724
8733
  for (const target of result.removed) {
8725
8734
  if (!assertRegularFile(target)) {
8726
- throw new Error(`Refusing to remove a changed or unsafe agent file: ${target}`);
8735
+ throw new Error(`Refusing to remove a changed or unsafe generated file: ${target}`);
8727
8736
  }
8728
8737
  const current = readFileSync8(target, "utf8");
8729
- if (!hasGeneratedAgentMarker(current) || current !== removals.get(target)) {
8730
- throw new Error(`Refusing to remove a concurrently changed agent file: ${target}`);
8738
+ const generated = target.endsWith("index.ts") ? hasGeneratedPluginMarker(current) : hasGeneratedAgentMarker(current);
8739
+ if (!generated || current !== removals.get(target)) {
8740
+ throw new Error(`Refusing to remove a concurrently changed generated file: ${target}`);
8731
8741
  }
8732
8742
  unlinkSync4(target);
8733
8743
  }
@@ -8818,7 +8828,8 @@ var HELP = [
8818
8828
  " setup [--yes] Install or upgrade the global agent team",
8819
8829
  " config [--yes] Configure model preferences",
8820
8830
  " doctor [--json] Diagnose the global installation",
8821
- " sync [--check] Maintain the legacy project-local installation",
8831
+ " sync [--check] [--dev-plugin] Maintain the project-local installation",
8832
+ " --dev-plugin also writes the local plugin entrypoint (dev repositories only)",
8822
8833
  " trust-project [directory] Print the current project trust token",
8823
8834
  "",
8824
8835
  "Options:",
@@ -8888,12 +8899,13 @@ async function runCli(args, io = defaultIO, commands = { setup: runSetup, config
8888
8899
  return report.status === "fail" ? 1 : 0;
8889
8900
  }
8890
8901
  if (command === "sync") {
8891
- const parsed = parseFlags(rest, ["--check"]);
8902
+ const parsed = parseFlags(rest, ["--check", "--dev-plugin"]);
8892
8903
  if (!parsed || parsed.positional.length > 1)
8893
8904
  return usage(io);
8894
8905
  const check = parsed.flags.has("--check");
8906
+ const devPlugin = parsed.flags.has("--dev-plugin");
8895
8907
  const config = loadConfig(parsed.positional[0] ?? io.cwd());
8896
- const result = syncAgents(config, { check, onDiff: (diff) => io.stdout(`${diff}
8908
+ const result = syncAgents(config, { check, devPlugin, onDiff: (diff) => io.stdout(`${diff}
8897
8909
  `) });
8898
8910
  io.stdout(formatSyncResult(result, check));
8899
8911
  return check && result.created.length + result.updated.length + result.removed.length > 0 ? 1 : 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nail00749/agent-gvozd",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "A globally configured, permission-aware agent team for OpenCode V2",
5
5
  "license": "MIT",
6
6
  "keywords": [