@ct-agents/worker 0.1.8 → 0.1.9

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.
Files changed (2) hide show
  1. package/package.json +6 -6
  2. package/src/index.ts +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ct-agents/worker",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src"
@@ -12,11 +12,11 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "zod": "4.4.3",
15
- "@ct-agents/harness": "0.1.8",
16
- "@ct-agents/prompts": "0.1.8",
17
- "@ct-agents/memory": "0.1.8",
18
- "@ct-agents/tools": "0.1.8",
19
- "@ct-agents/protocol": "0.1.8"
15
+ "@ct-agents/harness": "0.1.9",
16
+ "@ct-agents/memory": "0.1.9",
17
+ "@ct-agents/prompts": "0.1.9",
18
+ "@ct-agents/protocol": "0.1.9",
19
+ "@ct-agents/tools": "0.1.9"
20
20
  },
21
21
  "optionalDependencies": {
22
22
  "dockerode": "4.0.9"
package/src/index.ts CHANGED
@@ -951,7 +951,7 @@ function buildSyntheticSession(item: ToolWorkItem, harnessId: string, harnessVer
951
951
  environmentId: item.environmentId as EnvironmentId,
952
952
  environmentUpdatedAt: now,
953
953
  title: item.sessionId,
954
- metadata: {},
954
+ metadata: item.sessionMetadata ?? {},
955
955
  createdAt: now,
956
956
  updatedAt: now,
957
957
  };
@@ -1022,6 +1022,10 @@ function parseToolWorkItem(value: unknown): ToolWorkItem {
1022
1022
  item.resume = parseToolResumeWorkPayload(record.resume);
1023
1023
  }
1024
1024
 
1025
+ if (record.sessionMetadata !== undefined) {
1026
+ item.sessionMetadata = expectRecord(record.sessionMetadata, 'sessionMetadata 必须是对象');
1027
+ }
1028
+
1025
1029
  if (isRecord(record.resourceBindings)) {
1026
1030
  item.resourceBindings = record.resourceBindings;
1027
1031
  }