@agentproto/driver-agent-cli 2.4.0 → 2.4.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.
@@ -711,6 +711,7 @@ function createPrintSession(opts) {
711
711
  mode: opts.commandSandbox,
712
712
  cwd: opts.cwd,
713
713
  ...opts.extraWritePaths ? { extraWritePaths: opts.extraWritePaths } : {},
714
+ ...opts.extraReadPaths ? { extraReadPaths: opts.extraReadPaths } : {},
714
715
  label: "print-arm"
715
716
  });
716
717
  const child = spawn(execBin, execArgs, {
@@ -1818,6 +1819,9 @@ function createAgentCliRuntime(definition) {
1818
1819
  }
1819
1820
  Object.assign(env, opts?.env ?? {});
1820
1821
  ensureExecDirOnPath(env);
1822
+ if (opts?.additionalReadPaths?.length) {
1823
+ env.AGENTPROTO_ADDITIONAL_READ_PATHS = JSON.stringify(opts.additionalReadPaths);
1824
+ }
1821
1825
  const permissionMode = resolveClaudeCodePermissionMode(
1822
1826
  definition,
1823
1827
  opts?.posture,
@@ -1871,6 +1875,8 @@ function createAgentCliRuntime(definition) {
1871
1875
  printConfig: definition.print,
1872
1876
  commandSandbox: opts?.commandSandbox,
1873
1877
  ...claudeConfigDir ? { extraWritePaths: [claudeConfigDir] } : {},
1878
+ // Exact-file read grant — see the ACP arm's wrapAgentCliSpawn call.
1879
+ ...opts?.additionalReadPaths?.length ? { extraReadPaths: opts.additionalReadPaths } : {},
1874
1880
  ...definition.routeSelection === "derived-from-model" && printModel ? { expectedModel: String(printModel) } : {}
1875
1881
  });
1876
1882
  }
@@ -1884,6 +1890,9 @@ function createAgentCliRuntime(definition) {
1884
1890
  mode: opts?.commandSandbox,
1885
1891
  cwd,
1886
1892
  ...claudeConfigDir ? { extraWritePaths: [claudeConfigDir] } : {},
1893
+ // Exact-file read grant (see additionalReadPaths above):
1894
+ // READ-only exceptions to the confinement boundary, never writes.
1895
+ ...opts?.additionalReadPaths?.length ? { extraReadPaths: opts.additionalReadPaths } : {},
1887
1896
  label: definition.id
1888
1897
  }
1889
1898
  );
@@ -2096,5 +2105,5 @@ function derivedModelRefusalError(definition, requested, reason) {
2096
2105
  }
2097
2106
 
2098
2107
  export { LEGACY_GATEWAY_MODE_IDS, LEGACY_POSTURE_MODE_IDS, RuntimeConfigError, agentCliFrontmatterSchema, applyModelCommand, autoAllowPermissionHandler, composeSpawn, createAcpProtocolArm, createAgentCliRuntime, createArmSessionControls, createJcodeMapperState, createMastraMapperState, createPrintSession, createProprietaryProtocolArm, defineAgentCli, inferLegacyModeKind, isLegacyExtractedModeId, isModelSwitchAcknowledgement, mapJcodeEvent, mapMastraEvent, parseModelSwitchCommand, planModePermissionHandler, promptTurn, resolveContinuationStrategy, runtimeConfigSchema, toFileBasedMcpServers };
2099
- //# sourceMappingURL=chunk-DBU5VORQ.mjs.map
2100
- //# sourceMappingURL=chunk-DBU5VORQ.mjs.map
2108
+ //# sourceMappingURL=chunk-E4MSI6PV.mjs.map
2109
+ //# sourceMappingURL=chunk-E4MSI6PV.mjs.map