@ycodium-ai/agent-codex 0.2.3608 → 0.2.3635

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.
package/dist/index.js CHANGED
@@ -84,7 +84,6 @@ var CODEX_CARD = {
84
84
  type: "string",
85
85
  "x-ycodium-form": {
86
86
  titleKey: "form.homePath.title",
87
- descriptionKey: "form.homePath.description",
88
87
  placeholderKey: "form.homePath.placeholder"
89
88
  }
90
89
  },
@@ -1762,10 +1761,11 @@ function decodeThreadOpen(result) {
1762
1761
  const thread = isRecord2(result) ? isRecord2(result["thread"]) ? result["thread"] : result : null;
1763
1762
  const id = thread ? asString(thread["id"]) : null;
1764
1763
  if (!id) throw new Error("codex thread/start|resume returned no thread id");
1764
+ const openedModel = asString(thread?.["model"]) ?? (isRecord2(result) ? asString(result["model"]) : null);
1765
1765
  return {
1766
1766
  threadId: id,
1767
1767
  ...asString(thread?.["cwd"]) ? { cwd: asString(thread["cwd"]) } : {},
1768
- ...asString(thread?.["model"]) ? { model: asString(thread["model"]) } : {}
1768
+ ...openedModel ? { model: openedModel } : {}
1769
1769
  };
1770
1770
  }
1771
1771
  function decodeTurnStart(result) {
@@ -5529,12 +5529,13 @@ var CodexSessionRuntime = class {
5529
5529
  const opened = decodeThreadOpen(result);
5530
5530
  this.nativeThreadId = opened.threadId;
5531
5531
  this.model = opened.model ?? requestedModel;
5532
+ const modelSource = opened.model !== void 0 ? "reported" : "echo";
5532
5533
  this.session = {
5533
5534
  ...this.session,
5534
5535
  status: "idle",
5535
5536
  resumeCursor: { threadId: this.nativeThreadId },
5536
5537
  updatedAt: nowIso(),
5537
- ...this.model ? { model: this.model } : {}
5538
+ ...this.model ? { model: this.model, modelSource } : {}
5538
5539
  };
5539
5540
  this.emit({
5540
5541
  eventId: nextEventId(),
@@ -5643,8 +5644,7 @@ var CodexSessionRuntime = class {
5643
5644
  ...this.session,
5644
5645
  status: "running",
5645
5646
  activeTurnId: started.turnId,
5646
- updatedAt: nowIso(),
5647
- ...requestedModel ? { model: requestedModel } : {}
5647
+ updatedAt: nowIso()
5648
5648
  };
5649
5649
  return {
5650
5650
  threadId: this.threadId,
@@ -5852,14 +5852,18 @@ var reasoningEffortLabel = (effort) => reasoningEffortShortLabel(effort) ?? effo
5852
5852
  function codexModelDisplayName(displayName) {
5853
5853
  return displayName.replace(/^gpt/i, "GPT").replace(/-([a-z])/g, (_, c) => `-${c.toUpperCase()}`);
5854
5854
  }
5855
+ function reasoningEffortId(entry) {
5856
+ if (!isRecord2(entry)) return null;
5857
+ const id = asString(entry["reasoningEffort"])?.trim();
5858
+ return id ? id : null;
5859
+ }
5855
5860
  function reasoningDescriptor(row) {
5856
5861
  const supported = row["supportedReasoningEfforts"];
5857
5862
  if (!Array.isArray(supported) || supported.length === 0) return null;
5858
5863
  const defaultEffort = asString(row["defaultReasoningEffort"]);
5859
5864
  const options = supported.flatMap((entry) => {
5860
- if (!isRecord2(entry)) return [];
5861
- const id = asString(entry["reasoningEffort"]);
5862
- if (!id) return [];
5865
+ const id = reasoningEffortId(entry);
5866
+ if (id === null || !isRecord2(entry)) return [];
5863
5867
  const description = asString(entry["description"]);
5864
5868
  return [
5865
5869
  {
@@ -5922,6 +5926,8 @@ function codexProbeModel(row) {
5922
5926
  const slug = asString(row["model"]);
5923
5927
  if (!slug) return null;
5924
5928
  const displayName = asString(row["displayName"]);
5929
+ const supported = row["supportedReasoningEfforts"];
5930
+ const effortsKnown = Array.isArray(supported) && supported.every((entry) => reasoningEffortId(entry) !== null);
5925
5931
  const optionDescriptors = [reasoningDescriptor(row), serviceTierDescriptor(row)].filter(
5926
5932
  (descriptor) => descriptor !== null
5927
5933
  );
@@ -5930,9 +5936,8 @@ function codexProbeModel(row) {
5930
5936
  ...displayName ? { name: codexModelDisplayName(displayName) } : {},
5931
5937
  ...row["isDefault"] === true ? { isDefault: true } : {},
5932
5938
  ...row["hidden"] === true ? { hidden: true } : {},
5933
- // 空表也给 `capabilities`:`{}` 与 `null` 对宿主是一回事(都不画那一格),
5934
- // 但给对象保住「这只手确实答过这一问」这层意思。
5935
- capabilities: { optionDescriptors }
5939
+ // 答过就给 `capabilities`(空表 = 这个模型没有档位,宿主清掉旧档位);说不出就不给。
5940
+ ...effortsKnown ? { capabilities: { optionDescriptors } } : {}
5936
5941
  };
5937
5942
  }
5938
5943
  async function listCodexModels(rpc) {
@@ -7870,7 +7875,7 @@ var executors = [
7870
7875
  ];
7871
7876
  var index_default = definePlugin({
7872
7877
  id: "agent-codex",
7873
- apiVersion: 49,
7878
+ apiVersion: 50,
7874
7879
  executors,
7875
7880
  activate(ctx) {
7876
7881
  capturedAttachments = ctx.attachments;
package/locales/en.json CHANGED
@@ -2,12 +2,11 @@
2
2
  "form": {
3
3
  "binaryPath": {
4
4
  "title": "Program path",
5
- "description": "Path to the Codex program this provider runs.",
5
+ "description": "Must be an absolute path.",
6
6
  "placeholder": "codex"
7
7
  },
8
8
  "homePath": {
9
9
  "title": "CODEX_HOME path",
10
- "description": "Custom Codex home and config directory.",
11
10
  "placeholder": "~/.codex"
12
11
  },
13
12
  "shadowHomePath": {
@@ -2,12 +2,11 @@
2
2
  "form": {
3
3
  "binaryPath": {
4
4
  "title": "程序路径",
5
- "description": "此 provider 运行的 Codex 程序的路径。",
5
+ "description": "必须是绝对路径。",
6
6
  "placeholder": "codex"
7
7
  },
8
8
  "homePath": {
9
9
  "title": "CODEX_HOME 路径",
10
- "description": "自定义的 Codex 主目录与配置目录。",
11
10
  "placeholder": "~/.codex"
12
11
  },
13
12
  "shadowHomePath": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/agent-codex",
3
- "version": "0.2.3608",
3
+ "version": "0.2.3635",
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.3608",
33
- "ycodium-jsonl-stream": "0.0.0",
34
- "ycodium-executor-testing": "0.0.0"
32
+ "@ycodium-ai/plugin-api": "0.2.3635",
33
+ "ycodium-executor-testing": "0.0.0",
34
+ "ycodium-jsonl-stream": "0.0.0"
35
35
  },
36
36
  "ycodium": {
37
37
  "plugin": "./dist/index.js",