@nextclaw/nextclaw-narp-runtime-codex-sdk 0.1.6 → 0.1.7

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.
@@ -1,11 +1,11 @@
1
1
  import { NarpStdioRuntimeWrapperContext } from "@nextclaw/nextclaw-narp-stdio-runtime-wrapper";
2
2
  import { CodexSdkNcpAgentRuntimeConfig } from "@nextclaw/nextclaw-ncp-runtime-codex-sdk";
3
- import { CodexOpenAiResponsesBridgeConfig, CodexOpenAiResponsesBridgeResult } from "@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk";
3
+ import { CodexOpenAiResponsesBridgeResult, CodexOpenAiResponsesBridgeRuntimeConfig } from "@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk";
4
4
  import { NcpAgentRuntime } from "@nextclaw/ncp";
5
5
 
6
6
  //#region src/services/codex-narp-runtime-wrapper.service.d.ts
7
7
  type CodexNarpRuntimeFactory = (config: CodexSdkNcpAgentRuntimeConfig) => NcpAgentRuntime;
8
- type CodexResponsesBridgeFactory = (config: CodexOpenAiResponsesBridgeConfig) => Promise<CodexOpenAiResponsesBridgeResult>;
8
+ type CodexResponsesBridgeFactory = (config: CodexOpenAiResponsesBridgeRuntimeConfig) => Promise<CodexOpenAiResponsesBridgeResult>;
9
9
  declare class CodexNarpRuntimeWrapper {
10
10
  private readonly createRuntime;
11
11
  private readonly ensureResponsesBridge;
@@ -1,5 +1,5 @@
1
1
  import { NarpStdioRuntimeWrapper } from "@nextclaw/nextclaw-narp-stdio-runtime-wrapper";
2
- import { CodexSdkNcpAgentRuntime } from "@nextclaw/nextclaw-ncp-runtime-codex-sdk";
2
+ import { CodexLiveOutputStream, CodexSdkNcpAgentRuntime } from "@nextclaw/nextclaw-ncp-runtime-codex-sdk";
3
3
  import { buildCodexBridgeModelProviderId, ensureCodexOpenAiResponsesBridge } from "@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk";
4
4
  //#region src/services/codex-narp-runtime-wrapper.service.ts
5
5
  const NARP_API_MODE_HEADER = "x-nextclaw-narp-api-mode";
@@ -58,14 +58,17 @@ var CodexNarpRuntimeWrapper = class {
58
58
  apiBase: upstreamApiBase,
59
59
  headers: upstreamExtraHeaders
60
60
  }) ? buildCodexBridgeModelProviderId(externalModelProvider ?? "chat") : void 0;
61
- const apiBase = (bridgeModelProvider ? await this.ensureResponsesBridge({
61
+ const liveOutputStream = new CodexLiveOutputStream();
62
+ const bridge = bridgeModelProvider ? await this.ensureResponsesBridge({
62
63
  upstreamApiBase: upstreamApiBase ?? "",
63
64
  upstreamApiKey: apiKey,
64
65
  upstreamExtraHeaders: stripInternalRouteHeaders(upstreamExtraHeaders),
65
66
  defaultModel: providerLocalModel,
67
+ outputObserver: liveOutputStream,
66
68
  upstreamReasoningSplit: isMiniMaxApiBase(upstreamApiBase ?? ""),
67
69
  modelPrefixes: [externalModelProvider ?? "", bridgeModelProvider]
68
- }) : null)?.baseUrl ?? upstreamApiBase;
70
+ }) : null;
71
+ const apiBase = bridge?.baseUrl ?? upstreamApiBase;
69
72
  const modelProvider = bridgeModelProvider ?? externalModelProvider;
70
73
  const codexPathOverride = readString(process.env.NEXTCLAW_CODEX_PATH) ?? readString(process.env.CODEX_PATH);
71
74
  const modelReasoningEffort = readReasoningEffort(sessionMetadata.preferred_thinking) ?? readReasoningEffort(sessionMetadata.thinking);
@@ -81,6 +84,7 @@ var CodexNarpRuntimeWrapper = class {
81
84
  threadId: readString(sessionMetadata.codex_thread_id) ?? null,
82
85
  ...codexPathOverride ? { codexPathOverride } : {},
83
86
  sessionMetadata,
87
+ liveOutputStream: bridge ? liveOutputStream : void 0,
84
88
  cliConfig: buildCodexCliConfig({
85
89
  apiBase,
86
90
  modelProvider
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextclaw/nextclaw-narp-runtime-codex-sdk",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "private": false,
5
5
  "description": "NARP stdio launcher for the NextClaw Codex SDK runtime.",
6
6
  "type": "module",
@@ -20,9 +20,9 @@
20
20
  ],
21
21
  "dependencies": {
22
22
  "@nextclaw/ncp": "0.5.9",
23
- "@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk": "0.1.63",
24
- "@nextclaw/nextclaw-ncp-runtime-codex-sdk": "0.1.29",
25
- "@nextclaw/nextclaw-narp-stdio-runtime-wrapper": "0.1.3"
23
+ "@nextclaw/nextclaw-narp-stdio-runtime-wrapper": "0.1.3",
24
+ "@nextclaw/nextclaw-ncp-runtime-codex-sdk": "0.1.30",
25
+ "@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk": "0.1.64"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^20.17.6",