opencode-acp 1.14.12 → 1.14.13-dev.1

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
@@ -298,10 +298,10 @@ Each level overrides the previous, so project settings take priority over global
298
298
  },
299
299
  // Manual mode: disables autonomous context management,
300
300
  // tools only run when explicitly triggered via /acp commands
301
+ // Allow ACP processing in subagent sessions (default: true)
302
+ "allowSubAgents": true,
301
303
  // Experimental settings
302
304
  "experimental": {
303
- // Allow ACP processing in subagent sessions
304
- "allowSubAgents": false,
305
305
  // Enable user-editable prompt overrides under dcp-prompts directories
306
306
  // When false (default), prompt override files/directories are ignored
307
307
  "customPrompts": false,
@@ -492,6 +492,15 @@ For the complete list with root cause analysis, see the [bug tracker](https://gi
492
492
 
493
493
  ## Changelog
494
494
 
495
+ ### v1.14.13-dev.1 — Dev Prerelease (1 PR since v1.14.12)
496
+
497
+ Dev prerelease covering PR #276. Published to `dev` npm tag for early testing.
498
+
499
+ **PRs included**:
500
+ - **#276** — Promote `allowSubAgents` from experimental to top-level config field, change default from `false` to `true`. Subagent sessions now get compression by default. Fully backward compatible: old `experimental.allowSubAgents` configs still work (top-level takes priority). Updated all 4 hook sites, schema, config validation, and 6 documentation files. Dual-agent reviewed (Oracle + Explore, both APPROVE).
501
+
502
+ **Install**: `opencode plugin opencode-acp@dev --global`
503
+
495
504
  ### v1.14.12 — Stable Release (1 PR since v1.14.11)
496
505
 
497
506
  Stable release with the omo-system-reminder filter fix that preserves user content when stripping `<system-reminder>` blocks.
package/README.zh-CN.md CHANGED
@@ -253,10 +253,10 @@ ACP 使用自己的配置文件,按以下顺序搜索:
253
253
  },
254
254
  // Manual mode: disables autonomous context management,
255
255
  // tools only run when explicitly triggered via /acp commands
256
+ // 允许在子代理会话中运行 ACP(默认:开启)
257
+ "allowSubAgents": true,
256
258
  // Experimental settings
257
259
  "experimental": {
258
- // Allow ACP processing in subagent sessions
259
- "allowSubAgents": false,
260
260
  // Enable user-editable prompt overrides under dcp-prompts directories
261
261
  // When false (default), prompt override files/directories are ignored
262
262
  "customPrompts": false,
@@ -446,6 +446,15 @@ ACP 是 DCP 的直接替代品。迁移步骤:
446
446
 
447
447
  ## 更新日志
448
448
 
449
+ ### v1.14.13-dev.1 — Dev 预发布版(v1.14.12 以来 1 个 PR)
450
+
451
+ Dev 预发布版,包含 PR #276。发布到 `dev` npm tag 供早期测试。
452
+
453
+ **包含的 PR**:
454
+ - **#276** — 将 `allowSubAgents` 从实验性参数提升为顶级配置字段,默认值从 `false` 改为 `true`。子 Agent 会话默认开启压缩。完全向后兼容:旧的 `experimental.allowSubAgents` 配置仍然有效(顶级优先)。更新了 4 个 hook 调用点、schema、配置校验和 6 个文档文件。双 Agent Review(Oracle + Explore,均 APPROVE)。
455
+
456
+ **安装**:`opencode plugin opencode-acp@dev --global`
457
+
449
458
  ### v1.14.12 — 正式版(v1.14.11 以来 1 个 PR)
450
459
 
451
460
  正式版发布,包含 omo-system-reminder 过滤器修复——剥离 `<system-reminder>` 块时保留用户正文。
package/dist/index.js CHANGED
@@ -869,6 +869,7 @@ var VALID_CONFIG_KEYS = /* @__PURE__ */ new Set([
869
869
  "autoUpdate",
870
870
  "debug",
871
871
  "showUpdateToasts",
872
+ "allowSubAgents",
872
873
  "pruneNotification",
873
874
  "pruneNotificationType",
874
875
  "experimental",
@@ -953,6 +954,9 @@ function validateConfigTypes(config) {
953
954
  if (config.debug !== void 0 && typeof config.debug !== "boolean") {
954
955
  errors.push({ key: "debug", expected: "boolean", actual: typeof config.debug });
955
956
  }
957
+ if (config.allowSubAgents !== void 0 && typeof config.allowSubAgents !== "boolean") {
958
+ errors.push({ key: "allowSubAgents", expected: "boolean", actual: typeof config.allowSubAgents });
959
+ }
956
960
  if (config.pruneNotification !== void 0) {
957
961
  const validValues = ["off", "minimal", "detailed"];
958
962
  if (!validValues.includes(config.pruneNotification)) {
@@ -1462,6 +1466,7 @@ var defaultConfig = {
1462
1466
  enabled: true,
1463
1467
  autoUpdate: true,
1464
1468
  debug: false,
1469
+ allowSubAgents: true,
1465
1470
  pruneNotification: "off",
1466
1471
  // [FIX #20] Default to toast — chat-mode notifications inject an empty
1467
1472
  // user message that freezes the session on providers that reject empty
@@ -1472,7 +1477,6 @@ var defaultConfig = {
1472
1477
  protectedTools: [...DEFAULT_PROTECTED_TOOLS]
1473
1478
  },
1474
1479
  experimental: {
1475
- allowSubAgents: false,
1476
1480
  customPrompts: false
1477
1481
  },
1478
1482
  protectedFilePatterns: [],
@@ -1650,7 +1654,6 @@ function mergeCommands(base, override) {
1650
1654
  function mergeExperimental(base, override) {
1651
1655
  if (override === void 0) return base;
1652
1656
  return {
1653
- allowSubAgents: override.allowSubAgents ?? base.allowSubAgents,
1654
1657
  customPrompts: override.customPrompts ?? base.customPrompts
1655
1658
  };
1656
1659
  }
@@ -1723,6 +1726,7 @@ function mergeLayer(config, data) {
1723
1726
  enabled: data.enabled ?? config.enabled,
1724
1727
  autoUpdate: data.autoUpdate ?? config.autoUpdate,
1725
1728
  debug: data.debug ?? config.debug,
1729
+ allowSubAgents: data.allowSubAgents ?? data.experimental?.allowSubAgents ?? config.allowSubAgents,
1726
1730
  pruneNotification: data.pruneNotification ?? config.pruneNotification,
1727
1731
  pruneNotificationType: data.pruneNotificationType ?? config.pruneNotificationType,
1728
1732
  commands: mergeCommands(config.commands, data.commands),
@@ -8831,7 +8835,7 @@ import { writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
8831
8835
  import { join as join3 } from "path";
8832
8836
  import { existsSync as existsSync3 } from "fs";
8833
8837
  import { homedir as homedir3 } from "os";
8834
- var LOG_VERSION = true ? "1.14.12" : "dev";
8838
+ var LOG_VERSION = true ? "1.14.13-dev.1" : "dev";
8835
8839
  var Logger = class {
8836
8840
  logDir;
8837
8841
  enabled;
@@ -10400,7 +10404,7 @@ function createSystemPromptHandler(registry4, logger, config, prompts) {
10400
10404
  if (state && input.model?.limit?.context) {
10401
10405
  state.modelContextLimit = input.model.limit.context;
10402
10406
  }
10403
- if (!state || state.isSubAgent && !config.experimental.allowSubAgents) {
10407
+ if (!state || state.isSubAgent && !config.allowSubAgents) {
10404
10408
  return;
10405
10409
  }
10406
10410
  const systemText = output.system.join("\n");
@@ -10417,7 +10421,7 @@ function createSystemPromptHandler(registry4, logger, config, prompts) {
10417
10421
  const newPrompt = renderSystemPrompt(
10418
10422
  runtimePrompts,
10419
10423
  buildProtectedToolsExtension(config.compress.protectedTools),
10420
- state.isSubAgent && config.experimental.allowSubAgents
10424
+ state.isSubAgent && config.allowSubAgents
10421
10425
  );
10422
10426
  if (output.system.length > 0) {
10423
10427
  output.system[output.system.length - 1] += "\n\n" + newPrompt;
@@ -10454,7 +10458,7 @@ function createChatMessageTransformHandler(client, registry4, logger, config, pr
10454
10458
  await updatePerTurnState(state, logger, messages);
10455
10459
  }
10456
10460
  syncCompressPermissionState(state, config, hostPermissions, output.messages);
10457
- if (state.isSubAgent && !config.experimental.allowSubAgents) {
10461
+ if (state.isSubAgent && !config.allowSubAgents) {
10458
10462
  return;
10459
10463
  }
10460
10464
  stripHallucinations(output.messages);
@@ -10891,7 +10895,7 @@ var server = (async (ctx) => {
10891
10895
  };
10892
10896
  }
10893
10897
  const toolsToAdd = [];
10894
- if (config.compress.permission !== "deny" && !config.experimental.allowSubAgents) {
10898
+ if (config.compress.permission !== "deny" && !config.allowSubAgents) {
10895
10899
  toolsToAdd.push("compress", "decompress", "search_context", "acp_status");
10896
10900
  }
10897
10901
  if (toolsToAdd.length > 0) {