@nowcrew/daemon 0.6.91-beta.11 → 0.6.91-beta.12

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.
@@ -1,4 +1,4 @@
1
- import { delimiter, join } from "node:path";
1
+ import { delimiter, join, resolve } from "node:path";
2
2
  import { environmentForExecution } from "./agent-environments.js";
3
3
  import { augmentedPath } from "./runtime-path.js";
4
4
  import { sanitizeEnvVars } from "./runtime-env.js";
@@ -10,6 +10,7 @@ export function buildLocalRuntimeEnvironment(context) {
10
10
  const { input, workspace, executionWorkspace, inheritedEnv, providerConfig, crewHome, contextThreadId, nativeThreadContextPath, reportContext, runtime } = context;
11
11
  const agentEnvironment = sanitizeEnvVars(providerConfig.environmentPlan === undefined ? providerConfig.envVars
12
12
  : environmentForExecution(providerConfig.environmentPlan, workspace.dir, input.projectContext?.primary?.root ?? executionWorkspace.runDir, input.projectContext?.primary?.projectId));
13
+ const boundImDecisionFile = input.launch.systemEnv?.CREW_BOUND_IM_DECISION_FILE;
13
14
  return mergeRuntimeEnvironments([
14
15
  inheritedEnv, agentEnvironment,
15
16
  input.trainingProjectContext === undefined ? {} : machinePackageManagerEnv(inheritedEnv),
@@ -35,6 +36,10 @@ export function buildLocalRuntimeEnvironment(context) {
35
36
  QA_REPORT_DELIVERY_CONTEXT: JSON.stringify(reportContext),
36
37
  CREW_TASK_DIR: executionWorkspace.runDir,
37
38
  CREW_TASK_LOG: executionWorkspace.workLogPath,
39
+ // CLI 可以从 Agent 主目录或项目目录调用,标记始终写回完成阶段读取的任务目录。
40
+ ...(boundImDecisionFile ? {
41
+ CREW_BOUND_IM_DECISION_FILE: resolve(executionWorkspace.runDir, boundImDecisionFile),
42
+ } : {}),
38
43
  ...(input.wakeMessageId ? { CREW_WAKE_MESSAGE_ID: input.wakeMessageId } : {}),
39
44
  XDG_CONFIG_HOME: join(workspace.homeDir, ".config"),
40
45
  XDG_DATA_HOME: join(workspace.homeDir, ".local", "share"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nowcrew/daemon",
3
- "version": "0.6.91-beta.11",
3
+ "version": "0.6.91-beta.12",
4
4
  "type": "module",
5
5
  "description": "crew daemon — 运行在用户机器:拉起/管理 agent 进程,注入 crew CLI,归一化 runtime 事件",
6
6
  "license": "Apache-2.0",