@hua-labs/tap 0.5.0 → 0.5.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.
@@ -8,5 +8,6 @@ interface BridgeScriptArgsOptions {
8
8
  }
9
9
  declare function resolveBridgeDaemonScript(repoRoot: string, runnerUrl?: string, fileExists?: (candidate: string) => boolean): string | null;
10
10
  declare function buildBridgeScriptArgs(scriptPath: string, options: BridgeScriptArgsOptions): string[];
11
+ declare function buildBridgeDaemonEnv(parentEnv: NodeJS.ProcessEnv, runtimeEnv: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
11
12
 
12
- export { buildBridgeScriptArgs, resolveBridgeDaemonScript };
13
+ export { buildBridgeDaemonEnv, buildBridgeScriptArgs, resolveBridgeDaemonScript };
@@ -1142,6 +1142,12 @@ function buildBridgeScriptArgs(scriptPath, options) {
1142
1142
  }
1143
1143
  return args;
1144
1144
  }
1145
+ function buildBridgeDaemonEnv(parentEnv, runtimeEnv) {
1146
+ return {
1147
+ ...parentEnv,
1148
+ ...runtimeEnv
1149
+ };
1150
+ }
1145
1151
  async function main() {
1146
1152
  const repoRootHint = findRepoRootFromRunner() ?? void 0;
1147
1153
  const { config } = resolveConfig({}, repoRootHint);
@@ -1156,7 +1162,7 @@ async function main() {
1156
1162
  Number.isFinite(instancePort) ? instancePort : void 0
1157
1163
  );
1158
1164
  const instanceId = process.env.TAP_BRIDGE_INSTANCE_ID;
1159
- const envStateDir = process.env.TAP_STATE_DIR;
1165
+ const envStateDir = process.env.TAP_RUNTIME_STATE_DIR;
1160
1166
  let stateDir;
1161
1167
  if (envStateDir) {
1162
1168
  stateDir = envStateDir;
@@ -1217,9 +1223,10 @@ Expected a packaged dist/bridges/codex-app-server-bridge.mjs or monorepo bridge
1217
1223
  if (process.env.TAP_PROCESS_EXISTING === "true")
1218
1224
  args.push("--process-existing-messages");
1219
1225
  const runtimeEnv = buildRuntimeEnv(repoRoot);
1226
+ const daemonEnv = buildBridgeDaemonEnv(process.env, runtimeEnv);
1220
1227
  const child = spawn(command, args, {
1221
1228
  cwd: repoRoot,
1222
- env: runtimeEnv,
1229
+ env: daemonEnv,
1223
1230
  stdio: "inherit"
1224
1231
  });
1225
1232
  maybeStartHeadlessLoop(repoRoot, commsDir, stateDir);
@@ -1247,6 +1254,7 @@ if (isDirectExecution()) {
1247
1254
  });
1248
1255
  }
1249
1256
  export {
1257
+ buildBridgeDaemonEnv,
1250
1258
  buildBridgeScriptArgs,
1251
1259
  resolveBridgeDaemonScript
1252
1260
  };