@ycodium-ai/agent-codex 0.2.2147 → 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 +19 -13
  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: [],
@@ -1119,7 +1121,7 @@ var YCODIUM_THREAD_TOOL_INSTRUCTIONS = `
1119
1121
 
1120
1122
  The \`ycodium\` MCP server can start child threads on this environment. When \`start_thread\` is listed, use it to hand a self-contained piece of work to another thread \u2014 optionally on a different provider instance or model \u2014 instead of doing everything inline or spawning your own background processes.
1121
1123
 
1122
- Call \`list_providers\` and \`list_models\` first when you want a specific provider, model, or effort level; passing an effort a model does not offer is rejected rather than ignored. Pass \`isolate: true\` when the child must not share your working tree.
1124
+ Call \`list_providers\` and \`list_models\` first when you want a specific provider, model, effort level, or another model option such as a service tier (pass those as \`options\`, with the ids and values \`list_models\` gives); a value a model does not offer is rejected rather than ignored. Pass \`isolate: true\` when the child must not share your working tree.
1123
1125
 
1124
1126
  \`start_thread\` returns as soon as the child is running. You do not need to poll: a message arrives in this thread when the child finishes, fails, stops, or needs an approval, and it names the child thread id. Use \`get_thread_activity\` to read the full transcript behind a truncated summary, \`send_message\` to follow up, \`respond_to_permission\` to answer its approval requests, and \`stop_thread\` to end it. You can only steer child threads you started yourself.
1125
1127
  `;
@@ -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",
@@ -2976,6 +2980,7 @@ var CodexSessionRuntime = class {
2976
2980
  const config = this.#threadConfig();
2977
2981
  const developerInstructions = this.developerInstructions(input);
2978
2982
  const requestedModel = modelIdFromSelection(input.modelSelection) ?? this.model;
2983
+ const serviceTier = modelSelectionStringOption(input.modelSelection, "serviceTier");
2979
2984
  const params = {
2980
2985
  threadId: this.nativeThreadId,
2981
2986
  input: this.turnInput(input),
@@ -2983,6 +2988,7 @@ var CodexSessionRuntime = class {
2983
2988
  approvalsReviewer: config.approvalsReviewer,
2984
2989
  sandboxPolicy,
2985
2990
  ...requestedModel ? { model: requestedModel } : {},
2991
+ ...serviceTier ? { serviceTier } : {},
2986
2992
  ...developerInstructions ? { developerInstructions } : {}
2987
2993
  };
2988
2994
  const interactionMode = typeof input.interactionMode === "string" ? input.interactionMode : void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/agent-codex",
3
- "version": "0.2.2147",
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",