@ycodium-ai/agent-codex 0.2.2163 → 0.2.2167

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/dist/index.js +16 -12
  2. package/package.json +3 -2
package/dist/index.js CHANGED
@@ -45,7 +45,9 @@ var CODEX_CARD = {
45
45
  runtimeModeSwitch: "next-turn",
46
46
  // 三字段组合在 openThread 时定,切档要重开会话(与 runtimeModeSwitch 同为 next-turn)。
47
47
  nativeModeSwitch: true,
48
- contextCompaction: "native"
48
+ contextCompaction: "native",
49
+ // 子代理经 collab 通知报成 task.*(events.ts 的 mapCollabAgentEvent)。
50
+ reportsSpawnedAgents: true
49
51
  },
50
52
  credentialSources: [],
51
53
  diagnostics: [],
@@ -1562,7 +1564,8 @@ function mapCollabAgentEvent(input) {
1562
1564
  role,
1563
1565
  ...knownName ? { title: knownName } : {},
1564
1566
  ...agentPath ? { agentPath } : {},
1565
- timelineBypass: true
1567
+ timelineBypass: true,
1568
+ rosterKind: "subagent"
1566
1569
  };
1567
1570
  const threadId = input.rootThreadId;
1568
1571
  const method = input.method;
@@ -1639,16 +1642,17 @@ function mapCollabAgentEvent(input) {
1639
1642
  const count = (value) => typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : void 0;
1640
1643
  const totalTokens = total ? count(total["totalTokens"]) : void 0;
1641
1644
  if (total === void 0 || totalTokens === void 0) return [];
1642
- const typedUsage = { totalTokens };
1643
- for (const key of [
1644
- "inputTokens",
1645
- "cachedInputTokens",
1646
- "outputTokens",
1647
- "reasoningOutputTokens"
1648
- ]) {
1649
- const value = count(total[key]);
1650
- if (value !== void 0) typedUsage[key] = value;
1651
- }
1645
+ const inputTokens = count(total["inputTokens"]);
1646
+ const cachedInputTokens = count(total["cachedInputTokens"]);
1647
+ const outputTokens = count(total["outputTokens"]);
1648
+ const reasoningOutputTokens = count(total["reasoningOutputTokens"]);
1649
+ const typedUsage = {
1650
+ totalTokens,
1651
+ ...inputTokens !== void 0 ? { inputTokens } : {},
1652
+ ...cachedInputTokens !== void 0 ? { cachedInputTokens } : {},
1653
+ ...outputTokens !== void 0 ? { outputTokens } : {},
1654
+ ...reasoningOutputTokens !== void 0 ? { reasoningOutputTokens } : {}
1655
+ };
1652
1656
  return [
1653
1657
  baseEvent({
1654
1658
  type: "task.progress",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/agent-codex",
3
- "version": "0.2.2163",
3
+ "version": "0.2.2167",
4
4
  "description": "Codex executor: Codex CLI over the app-server JSON-RPC protocol.",
5
5
  "keywords": [
6
6
  "ycodium",
@@ -20,7 +20,8 @@
20
20
  "@types/node": "24.12.4",
21
21
  "esbuild": "0.28.1",
22
22
  "vite-plus": "0.2.2",
23
- "@ycodium-ai/plugin-api": "0.2.0"
23
+ "@ycodium-ai/plugin-api": "0.2.2167",
24
+ "ycodium-executor-testing": "0.0.0"
24
25
  },
25
26
  "ycodium": {
26
27
  "plugin": "./dist/index.js",