@lsctech/polaris 0.3.16 → 0.3.17

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.
@@ -151,10 +151,25 @@ If no doctrine docs are relevant, return an empty array for relevant_docs.`;
151
151
  // to avoid failures when the provider config is tuned for code-editing agents.
152
152
  const rawArgs = (cfg.args ?? []).map((a) => (a === "{{worker_prompt}}" ? prompt : a));
153
153
  const args = stripWorkerFlags(rawArgs);
154
- const result = (0, node_child_process_1.spawnSync)(cfg.command, args, {
154
+ // When cfg.command is "env", extract KEY=VALUE prefix args into the spawn env
155
+ // so credentials and env vars are inherited correctly by the subprocess.
156
+ let spawnCmd = cfg.command;
157
+ let spawnArgs = args;
158
+ const extraEnv = {};
159
+ if (cfg.command === "env") {
160
+ const firstNonEnvIdx = args.findIndex((a) => !a.includes("=") || a.startsWith("-"));
161
+ for (const a of args.slice(0, firstNonEnvIdx)) {
162
+ const [k, ...v] = a.split("=");
163
+ extraEnv[k] = v.join("=");
164
+ }
165
+ spawnCmd = args[firstNonEnvIdx];
166
+ spawnArgs = args.slice(firstNonEnvIdx + 1);
167
+ }
168
+ const result = (0, node_child_process_1.spawnSync)(spawnCmd, spawnArgs, {
155
169
  encoding: "utf-8",
156
170
  timeout: 120000,
157
171
  cwd: repoRoot,
172
+ env: { ...process.env, ...extraEnv },
158
173
  });
159
174
  if (result.error) {
160
175
  console.log(` agent error: ${result.error.message}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lsctech/polaris",
3
- "version": "0.3.16",
3
+ "version": "0.3.17",
4
4
  "description": "Polaris — standalone taskchain orchestration framework for governed AI agent workflows",
5
5
  "bin": {
6
6
  "polaris-cli": "dist/cli/index.js"