@ycodium-ai/agent-codex 0.2.3710 → 0.2.3766

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
@@ -1,5 +1,10 @@
1
1
  // src/index.ts
2
2
  import { definePlugin } from "@ycodium-ai/plugin-api";
3
+ import {
4
+ EXECUTOR_EFFECTIVE_PAYLOAD_SCHEMA,
5
+ executorHomeEffectiveValue,
6
+ readExecutorEffectiveRequest
7
+ } from "@ycodium-ai/plugin-api/executor";
3
8
 
4
9
  // src/card.ts
5
10
  var CODEX_DRIVER_KIND = "codex";
@@ -11,6 +16,8 @@ var CODEX_CARD = {
11
16
  commandName: "codex",
12
17
  launchArgs: CODEX_DEFAULT_LAUNCH_ARGS,
13
18
  homeEnvVar: "CODEX_HOME",
19
+ // 设置表单里留空的格子此刻会用什么,见 index.ts 的同名命令。
20
+ effectiveCommand: "effectiveConfig",
14
21
  // 影子目录只分开凭据,会话文件仍写在共用 home 下(`resolveCodexHomeLayout`
15
22
  // 的 authOverlay:auth.json 是真文件,sessions 是指回共用 home 的软链)。
16
23
  homeLayout: {
@@ -99,7 +106,8 @@ var CODEX_CARD = {
99
106
  type: "string",
100
107
  "x-ycodium-form": {
101
108
  titleKey: "form.launchArgs.title",
102
- descriptionKey: "form.launchArgs.description"
109
+ descriptionKey: "form.launchArgs.description",
110
+ placeholderKey: "form.launchArgs.placeholder"
103
111
  }
104
112
  },
105
113
  customModels: { type: "array" },
@@ -7882,14 +7890,39 @@ var executors = [
7882
7890
  host.log.info("createInstance");
7883
7891
  return createCodexInstance(config, host, capturedAttachments, capturedCache);
7884
7892
  },
7885
- probeAccount: async ({ accountPath }) => probeCodexAccount(accountPath)
7893
+ probeAccount: async ({ accountPath }) => probeCodexAccount(accountPath),
7894
+ // 经 npm 装,能卸也能重装;登录走 `codex login --device-auth` 的设备码。
7895
+ lifecycle: [
7896
+ { kind: "install", reversible: true },
7897
+ { kind: "detect", reversible: true },
7898
+ { kind: "sign-in", reversible: false },
7899
+ { kind: "update", reversible: false },
7900
+ { kind: "uninstall", reversible: true }
7901
+ ]
7886
7902
  }
7887
7903
  ];
7888
7904
  var index_default = definePlugin({
7889
7905
  id: "agent-codex",
7890
- apiVersion: 53,
7906
+ apiVersion: 56,
7891
7907
  executors,
7892
7908
  activate(ctx) {
7909
+ ctx.command({
7910
+ name: "effectiveConfig",
7911
+ description: "Settings form: the CODEX_HOME an empty path resolves to on this machine.",
7912
+ scope: "read",
7913
+ payloadSchema: EXECUTOR_EFFECTIVE_PAYLOAD_SCHEMA,
7914
+ handle: async (payload) => {
7915
+ const request = readExecutorEffectiveRequest(payload);
7916
+ return {
7917
+ homePath: executorHomeEffectiveValue(
7918
+ "CODEX_HOME",
7919
+ request,
7920
+ process.env,
7921
+ resolveCodexHomeDirectory
7922
+ )
7923
+ };
7924
+ }
7925
+ });
7893
7926
  capturedAttachments = ctx.attachments;
7894
7927
  capturedCache = ctx.cache;
7895
7928
  ctx.log.info("codex executor ready");
package/locales/en.json CHANGED
@@ -1,4 +1,8 @@
1
1
  {
2
+ "presentation": {
3
+ "name": "Codex",
4
+ "description": "Use Codex in Ycodium and pick up earlier sessions where they left off."
5
+ },
2
6
  "form": {
3
7
  "binaryPath": {
4
8
  "title": "Program path",
@@ -12,11 +16,17 @@
12
16
  "shadowHomePath": {
13
17
  "title": "Shadow home path",
14
18
  "description": "Account-specific Codex home. Keeps auth.json separate while sharing state from CODEX_HOME.",
15
- "placeholder": "~/.codex-personal"
19
+ "placeholder": "None: sign-in stays in CODEX_HOME"
16
20
  },
17
21
  "launchArgs": {
18
22
  "title": "Launch arguments",
19
- "description": "Additional CLI arguments passed to codex app-server on session start."
23
+ "description": "Additional CLI arguments passed to codex app-server on session start.",
24
+ "placeholder": "app-server"
25
+ },
26
+ "effective": {
27
+ "provider": "{{name}} in this provider",
28
+ "machine": "{{name}} on this machine",
29
+ "default": "default"
20
30
  }
21
31
  },
22
32
  "account": {
@@ -1,4 +1,8 @@
1
1
  {
2
+ "presentation": {
3
+ "name": "Codex",
4
+ "description": "在 Ycodium 里使用 Codex,之前的会话可以接着做。"
5
+ },
2
6
  "form": {
3
7
  "binaryPath": {
4
8
  "title": "程序路径",
@@ -12,11 +16,17 @@
12
16
  "shadowHomePath": {
13
17
  "title": "影子目录路径",
14
18
  "description": "账号专用的 Codex 目录。auth.json 单独保存,其余状态仍与 CODEX_HOME 共用。",
15
- "placeholder": "~/.codex-personal"
19
+ "placeholder": "无:登录信息放在 CODEX_HOME 里"
16
20
  },
17
21
  "launchArgs": {
18
22
  "title": "启动参数",
19
- "description": "会话启动时传给 codex app-server 的额外命令行参数。"
23
+ "description": "会话启动时传给 codex app-server 的额外命令行参数。",
24
+ "placeholder": "app-server"
25
+ },
26
+ "effective": {
27
+ "provider": "本 provider 的 {{name}}",
28
+ "machine": "本机的 {{name}}",
29
+ "default": "默认"
20
30
  }
21
31
  },
22
32
  "account": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/agent-codex",
3
- "version": "0.2.3710",
3
+ "version": "0.2.3766",
4
4
  "description": "Codex executor: Codex CLI over the app-server JSON-RPC protocol.",
5
5
  "keywords": [
6
6
  "ycodium",
@@ -29,14 +29,16 @@
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.3710",
33
- "ycodium-jsonl-stream": "0.0.0",
34
- "ycodium-executor-testing": "0.0.0"
32
+ "ycodium-executor-testing": "0.0.0",
33
+ "@ycodium-ai/plugin-api": "0.2.3766",
34
+ "ycodium-jsonl-stream": "0.0.0"
35
35
  },
36
36
  "ycodium": {
37
37
  "plugin": "./dist/index.js",
38
38
  "displayName": "Codex",
39
- "description": "Run Codex (codex app-server) with native session resume, approvals, device-code sign-in, and isolated home overlay.",
39
+ "displayNameKey": "presentation.name",
40
+ "description": "Use Codex in Ycodium and pick up earlier sessions where they left off.",
41
+ "descriptionKey": "presentation.description",
40
42
  "icon": "./assets/icon.svg",
41
43
  "permissions": [
42
44
  {