@agentproto/driver-agent-cli 2.6.1 → 2.6.2

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.
@@ -726,8 +726,9 @@ function resolveWindowsBatchSpawn(bin, args, deps) {
726
726
  if (!isWindowsBatchFile(bin)) return void 0;
727
727
  const stem = basename(bin).replace(/\.(?:bat|cmd)$/i, "");
728
728
  if (stem !== "npx" && stem !== "npm") return void 0;
729
- join(dirname(bin), "node_modules", "npm", "bin", `${stem}-cli.js`);
730
- return void 0;
729
+ const script = join(dirname(bin), "node_modules", "npm", "bin", `${stem}-cli.js`);
730
+ if (!(existsSync)(script)) return void 0;
731
+ return { bin: process.execPath, args: [script, ...args] };
731
732
  }
732
733
  function defaultToolchainWritePaths() {
733
734
  const home = homedir();
@@ -2063,7 +2064,7 @@ function createAgentCliRuntime(definition) {
2063
2064
  }
2064
2065
  const spawnBin = npxFast?.bin ?? resolvedBin;
2065
2066
  const spawnArgs = npxFast?.args ?? composed.binArgs;
2066
- const batchRewrite = resolveWindowsBatchSpawn(spawnBin);
2067
+ const batchRewrite = resolveWindowsBatchSpawn(spawnBin, spawnArgs);
2067
2068
  const finalBin = batchRewrite?.bin ?? spawnBin;
2068
2069
  const finalArgs = batchRewrite?.args ?? spawnArgs;
2069
2070
  if (opts?.additionalReadPaths?.length) {
@@ -2380,5 +2381,5 @@ function derivedModelRefusalError(definition, requested, reason) {
2380
2381
  }
2381
2382
 
2382
2383
  export { LEGACY_GATEWAY_MODE_IDS, LEGACY_POSTURE_MODE_IDS, RuntimeConfigError, agentCliFrontmatterSchema, agentCliSupportsHostContextIsolation, applyModelCommand, autoAllowPermissionHandler, composeSpawn, createAcpProtocolArm, createAgentCliRuntime, createArmSessionControls, createJcodeMapperState, createMastraMapperState, createPrintSession, createProprietaryProtocolArm, defineAgentCli, hostContextExcludes, inferLegacyModeKind, isLegacyExtractedModeId, isModelSwitchAcknowledgement, mapJcodeEvent, mapMastraEvent, parseModelSwitchCommand, planModePermissionHandler, promptTurn, resolveContinuationStrategy, runtimeConfigSchema, toFileBasedMcpServers };
2383
- //# sourceMappingURL=chunk-EZROBN7Q.mjs.map
2384
- //# sourceMappingURL=chunk-EZROBN7Q.mjs.map
2384
+ //# sourceMappingURL=chunk-E32LOGAM.mjs.map
2385
+ //# sourceMappingURL=chunk-E32LOGAM.mjs.map