aai-lark-bridge 0.2.11 → 0.2.13

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/dist/index.d.ts CHANGED
@@ -147,6 +147,11 @@ interface AgentRunOptions {
147
147
  extraSystemPromptFile?: string;
148
148
  /** claude `--strict-mcp-config`: no MCP servers beyond those passed explicitly. Codex ignores it. */
149
149
  strictMcp?: boolean;
150
+ /**
151
+ * Extra env for this run only (intent 0046: the user-read handle and gateway
152
+ * URL). Merged over the process env. Codex ignores it.
153
+ */
154
+ extraEnv?: Record<string, string>;
150
155
  }
151
156
  interface AgentRun {
152
157
  readonly runId: string;
package/dist/index.js CHANGED
@@ -990,9 +990,7 @@ var ClaudeAdapter = class {
990
990
  const bridgePrompt = buildBridgeSystemPrompt(this.botIdentity);
991
991
  const extraPrompt = opts.extraSystemPromptFile ? readFileSync(opts.extraSystemPromptFile, "utf8") : "";
992
992
  const systemPromptFile = writeSystemPromptFile(
993
- extraPrompt.trim() ? `${bridgePrompt}
994
-
995
- ${extraPrompt}` : bridgePrompt
993
+ [bridgePrompt, extraPrompt].filter((p) => p.trim()).join("\n\n")
996
994
  );
997
995
  const args = [
998
996
  "-p",
@@ -1013,7 +1011,7 @@ ${extraPrompt}` : bridgePrompt
1013
1011
  try {
1014
1012
  child = spawnProcess(this.binary, args, {
1015
1013
  cwd: opts.cwd,
1016
- env: mergeProcessEnv(process.env, buildLarkChannelEnv(this.larkChannel)),
1014
+ env: mergeProcessEnv(process.env, { ...buildLarkChannelEnv(this.larkChannel), ...opts.extraEnv }),
1017
1015
  stdio: ["pipe", "pipe", "pipe"]
1018
1016
  });
1019
1017
  } catch (err) {