codex-to-im 0.1.7 → 1.0.10

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/README.md CHANGED
@@ -68,6 +68,12 @@ npm install
68
68
  npm run build
69
69
  ```
70
70
 
71
+ Windows maintenance note:
72
+
73
+ - The repo includes [patch-codex-sdk-windows-hide.js](D:/codex/Claude-to-IM-skill/scripts/patch-codex-sdk-windows-hide.js), which applies a conservative postinstall patch to `@openai/codex-sdk`.
74
+ - This exists because on Windows the SDK may spawn the bundled Codex CLI without `windowsHide`, causing a black console window to flash for each IM-triggered run.
75
+ - When upgrading `@openai/codex-sdk`, verify that the spawn block still matches; if upstream fixes this natively, remove the patch instead of carrying it forward.
76
+
71
77
  ## Run
72
78
 
73
79
  Start the local app:
@@ -130,6 +136,7 @@ Useful commands:
130
136
  - `/` / `/status` shows the current session
131
137
  - `/h` / `/help` shows help
132
138
  - `/t` / `/threads` lists recent desktop threads, and `/t 1` / `/thread 1` binds the first one
139
+ - `/n` / `/new` creates a new thread in the current formal session directory; these IM-created threads are only guaranteed to continue inside IM and will not automatically appear in the Codex Desktop thread list
133
140
  - `/n proj1` / `/new proj1` creates a new project session under the default workspace root
134
141
  - `/m` / `/mode` shows or changes the current mode; options: `code` / `plan` / `ask`
135
142
  - `/r` / `/reasoning` shows or changes the current reasoning effort; options: `1|2|3|4|5`
@@ -156,7 +163,7 @@ So character-by-character text streaming is not guaranteed in the current implem
156
163
 
157
164
  If creating a new session fails with `Not inside a trusted directory`, either:
158
165
 
159
- - change the default working directory to a trusted Git repo, or
166
+ - switch to a trusted project with `/new /absolute/path` or `/new proj1`, or
160
167
  - enable `Allow Codex outside trusted Git repos` in the basic settings and restart the bridge
161
168
 
162
169
  The configuration page also includes Codex runtime controls:
@@ -180,7 +187,7 @@ If you are using `codex-to-im` on your own development machine for real coding w
180
187
 
181
188
  This is closer to a full-power `code` workflow. It fits a controlled local project, but is not a good default for unknown repositories or higher-risk environments.
182
189
 
183
- The channel pages also expose a “Use Markdown for command feedback” switch:
190
+ The channel pages also expose a “Use Markdown for bridge feedback” switch:
184
191
  - enabled by default for Feishu
185
192
  - disabled by default for WeChat
186
193
  - only affects bridge-generated feedback such as `/h`, `/status`, and `/threads`
package/README_CN.md CHANGED
@@ -68,6 +68,12 @@ npm install
68
68
  npm run build
69
69
  ```
70
70
 
71
+ Windows 维护说明:
72
+
73
+ - 仓库包含 [patch-codex-sdk-windows-hide.js](D:/codex/Claude-to-IM-skill/scripts/patch-codex-sdk-windows-hide.js),会在 `npm install` 后给 `@openai/codex-sdk` 打一个保守补丁。
74
+ - 原因是 Windows 下 SDK 拉起 Codex CLI 时若不带 `windowsHide`,每次 IM 触发运行都可能弹出黑色控制台窗口。
75
+ - 后续升级 `@openai/codex-sdk` 时,要确认这个补丁仍然能匹配;如果上游已经原生修复,应直接删除这层补丁。
76
+
71
77
  ## 启动
72
78
 
73
79
  启动本地应用:
@@ -130,6 +136,7 @@ codex-to-im stop
130
136
  - `/` / `/status` 查看当前会话
131
137
  - `/h` / `/help` 查看帮助
132
138
  - `/t` / `/threads` 查看最近桌面会话,`/t 1` / `/thread 1` 接管第 1 条
139
+ - `/n` / `/new` 在当前正式会话目录下新建线程;这类线程当前只保证在 IM 中可继续,不会自动出现在 Codex Desktop 会话列表中
133
140
  - `/n proj1` / `/new proj1` 在默认工作空间下新建项目会话
134
141
  - `/m` / `/mode` 查看或切换模式,可选 `code` / `plan` / `ask`
135
142
  - `/r` / `/reasoning` 查看或切换思考级别,可选 `1|2|3|4|5`
@@ -156,7 +163,7 @@ codex-to-im stop
156
163
 
157
164
  如果新建会话时报 `Not inside a trusted directory`,可以:
158
165
 
159
- - 把默认工作目录改成一个你已经信任的 Git 仓库
166
+ - `/new /绝对路径` 或 `/new proj1` 切到一个你已经信任的项目目录
160
167
  - 或在基础配置里打开“允许在未信任 Git 目录运行 Codex”,然后重启 Bridge
161
168
 
162
169
  当前配置页新增了几项和 Codex 运行行为直接相关的配置:
@@ -179,7 +186,7 @@ codex-to-im stop
179
186
 
180
187
  这样更接近完整 `code` 模式下的开发体验。它适合你自己的受控项目目录,不适合直接照搬到陌生仓库或高风险环境。
181
188
 
182
- 通道页还支持“命令反馈使用 Markdown”开关:
189
+ 通道页还支持“反馈使用 Markdown”开关:
183
190
  - 飞书默认开启
184
191
  - 微信默认关闭
185
192
  - 只影响 `/h`、`/status`、`/threads` 这类 bridge 自己生成的反馈
@@ -10,9 +10,6 @@ CTI_RUNTIME=codex
10
10
  # Enabled channels (comma-separated: telegram,discord,feishu,qq,weixin)
11
11
  CTI_ENABLED_CHANNELS=feishu
12
12
 
13
- # Default working directory for Codex / bridge sessions
14
- CTI_DEFAULT_WORKDIR=/path/to/your/project
15
-
16
13
  # Default workspace root for `/new proj1` style project creation.
17
14
  # When unset, codex-to-im falls back to `~/cx2im`
18
15
  # and expands it per OS (Windows/macOS/Linux).
@@ -45,7 +42,7 @@ CTI_DEFAULT_MODE=code
45
42
  # Priority: CTI_CODEX_API_KEY > CODEX_API_KEY > OPENAI_API_KEY
46
43
  # CTI_CODEX_API_KEY=
47
44
  # CTI_CODEX_BASE_URL=
48
- # Allow Codex to run when CTI_DEFAULT_WORKDIR is not inside a trusted Git repo.
45
+ # Allow Codex to run when the selected project directory is not inside a trusted Git repo.
49
46
  # This project defaults it to true so first-time setup works more smoothly.
50
47
  CTI_CODEX_SKIP_GIT_REPO_CHECK=true
51
48
  # Default filesystem permission mode for Codex threads created by codex-to-im.
@@ -88,7 +85,7 @@ CTI_TG_CHAT_ID=your-chat-id
88
85
  # Current Codex runtime note: thinking/progress can update live, but
89
86
  # assistant body text may still arrive only at completion.
90
87
  # CTI_FEISHU_STREAMING_ENABLED=true
91
- # Use Markdown for bridge-generated command feedback such as /h or /status.
88
+ # Use Markdown for bridge-generated feedback such as replies, /h, or /status.
92
89
  # Does not affect raw Codex replies.
93
90
  # CTI_FEISHU_COMMAND_MARKDOWN_ENABLED=true
94
91
 
@@ -114,7 +111,7 @@ CTI_TG_CHAT_ID=your-chat-id
114
111
  # only accepts WeChat-provided speech-to-text text and otherwise returns an error.
115
112
  # (default false for safety in CLI setups)
116
113
  # CTI_WEIXIN_MEDIA_ENABLED=false
117
- # Use Markdown for bridge-generated command feedback such as /h or /status.
114
+ # Use Markdown for bridge-generated feedback such as replies, /h, or /status.
118
115
  # Does not affect raw Codex replies. Default is false for WeChat.
119
116
  # CTI_WEIXIN_COMMAND_MARKDOWN_ENABLED=false
120
117