@ycodium-ai/agent-codex 0.2.3681 → 0.2.3710

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 -4
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -3730,7 +3730,7 @@ var isUsageLimitExceeded = (error) => asRecord2(error)?.["codexErrorInfo"] === "
3730
3730
 
3731
3731
  // src/events.ts
3732
3732
  function mapNotificationToEvents(input) {
3733
- const { method, params, threadId, providerInstanceId, rateLimits } = input;
3733
+ const { method, params, threadId, providerInstanceId, rateLimits, settingsModel } = input;
3734
3734
  if (method.startsWith("collabAgent/")) {
3735
3735
  return mapCollabAgentEvent({ method, params, rootThreadId: threadId, providerInstanceId });
3736
3736
  }
@@ -3907,7 +3907,7 @@ function mapNotificationToEvents(input) {
3907
3907
  type: "turn.started",
3908
3908
  threadId,
3909
3909
  turnId,
3910
- payload: {},
3910
+ payload: settingsModel === void 0 ? {} : { model: settingsModel, modelSource: "reported" },
3911
3911
  method,
3912
3912
  providerInstanceId
3913
3913
  })
@@ -5272,6 +5272,8 @@ var CodexSessionRuntime = class {
5272
5272
  memoryThreadIds = /* @__PURE__ */ new Set();
5273
5273
  /** 这个会话见过的主额度快照(按字段合并),额度用尽停轮时点名窗口用。 */
5274
5274
  rateLimits;
5275
+ /** 根线程最近一次 `thread/settings/updated` 读回的型号;只有 CLI 读回的才放这里,不含请求值回声。 */
5276
+ settingsModel;
5275
5277
  appServerArgs;
5276
5278
  /** 会话除 cwd 外的文件夹,每轮随 `sandboxPolicy` 发;变了由 `setAdditionalDirectories` 换上,进程不重启。 */
5277
5279
  #additionalDirectories;
@@ -5449,12 +5451,22 @@ var CodexSessionRuntime = class {
5449
5451
  if (method === "account/rateLimits/updated" && isRecord2(params)) {
5450
5452
  this.rateLimits = mergeCodexRateLimits(this.rateLimits, params["rateLimits"]);
5451
5453
  }
5454
+ if (method === "thread/settings/updated" && isRecord2(params)) {
5455
+ const settings = params["threadSettings"];
5456
+ const settingsModel = isRecord2(settings) ? asString(settings["model"]) : null;
5457
+ if (settingsModel) {
5458
+ this.settingsModel = settingsModel;
5459
+ this.model = settingsModel;
5460
+ this.session = { ...this.session, model: settingsModel, modelSource: "reported" };
5461
+ }
5462
+ }
5452
5463
  for (const event of mapNotificationToEvents({
5453
5464
  method,
5454
5465
  params,
5455
5466
  threadId: this.threadId,
5456
5467
  providerInstanceId: this.host.instanceId,
5457
- rateLimits: this.rateLimits
5468
+ rateLimits: this.rateLimits,
5469
+ settingsModel: this.settingsModel
5458
5470
  })) {
5459
5471
  this.emit(event);
5460
5472
  }
@@ -7875,7 +7887,7 @@ var executors = [
7875
7887
  ];
7876
7888
  var index_default = definePlugin({
7877
7889
  id: "agent-codex",
7878
- apiVersion: 52,
7890
+ apiVersion: 53,
7879
7891
  executors,
7880
7892
  activate(ctx) {
7881
7893
  capturedAttachments = ctx.attachments;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/agent-codex",
3
- "version": "0.2.3681",
3
+ "version": "0.2.3710",
4
4
  "description": "Codex executor: Codex CLI over the app-server JSON-RPC protocol.",
5
5
  "keywords": [
6
6
  "ycodium",
@@ -29,9 +29,9 @@
29
29
  "tailwindcss": "^4.0.0",
30
30
  "typescript": "~6.0.3",
31
31
  "vite-plus": "0.2.2",
32
- "@ycodium-ai/plugin-api": "0.2.3681",
33
- "ycodium-executor-testing": "0.0.0",
34
- "ycodium-jsonl-stream": "0.0.0"
32
+ "@ycodium-ai/plugin-api": "0.2.3710",
33
+ "ycodium-jsonl-stream": "0.0.0",
34
+ "ycodium-executor-testing": "0.0.0"
35
35
  },
36
36
  "ycodium": {
37
37
  "plugin": "./dist/index.js",