aiterm-steer-delivery 0.2.0 → 0.2.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.1
4
+
5
+ - `withCodexReceiver`の`runtime`に`env`を足す。Codex App Serverを起こす環境を渡せる(省略すると、今までどおりこのprocessの環境)。`CODEX_HOME`は常に`parent.codex_home`で上書きする。Aitermが、認証sessionへ引き継いだ環境のままCodexのログインの状態を公式App Serverへ聞くために使う。
6
+
3
7
  ## 0.2.0
4
8
 
5
9
  Claude Codeのhookの登録の形が変わります。利用製品は、依存を`^0.2.0`へ上げてsetupを流し直してください。
@@ -10,6 +10,8 @@ export interface CodexReceiverRuntime {
10
10
  args?: string[];
11
11
  timeout_ms?: number;
12
12
  hook_directory?: string;
13
+ /** App Serverを起こす環境。省略すると、このprocessの環境。`CODEX_HOME`は常に`parent.codex_home`で上書きする。 */
14
+ env?: NodeJS.ProcessEnv;
13
15
  }
14
16
  export declare function withCodexReceiver<T>(profile: ProductProfile, parent: CodexParent, action: (request: (method: string, params: unknown) => Promise<any>) => Promise<T>, runtime?: CodexReceiverRuntime): Promise<T>;
15
17
  export interface CodexParentThread {
@@ -24,7 +24,7 @@ export async function withCodexReceiver(profile, parent, action, runtime = {}) {
24
24
  throw new CodexDeliveryError("CODEX_RECEIVER_UNAVAILABLE", "Codexの実行ファイルを確認できません");
25
25
  const child = spawn(executable, runtime.args ?? ["app-server", "--listen", "stdio://"], {
26
26
  stdio: ["pipe", "pipe", "ignore"],
27
- env: { ...process.env, CODEX_HOME: parent.codex_home },
27
+ env: { ...(runtime.env ?? process.env), CODEX_HOME: parent.codex_home },
28
28
  windowsHide: true,
29
29
  });
30
30
  const pending = new Map();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiterm-steer-delivery",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Aiterm's steer delivery as a library: deliver text to the parent AI session that called your MCP tool — steered into the running turn when it is busy, delivered normally when it is idle. Codex (official queue + sync hooks), Claude Code (asyncRewake hooks), Cursor (hooks + background receiver).",
5
5
  "type": "module",
6
6
  "license": "MIT",