@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk 0.1.13 → 0.1.15
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.d.ts +14 -0
- package/dist/index.js +8 -0
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,19 @@ import { Config } from '@nextclaw/core';
|
|
|
2
2
|
import { NcpAgentRuntime } from '@nextclaw/ncp';
|
|
3
3
|
import { RuntimeFactoryParams } from '@nextclaw/ncp-toolkit';
|
|
4
4
|
|
|
5
|
+
type SessionTypeDescriptor = {
|
|
6
|
+
ready?: boolean;
|
|
7
|
+
reason?: string | null;
|
|
8
|
+
reasonMessage?: string | null;
|
|
9
|
+
supportedModels?: string[];
|
|
10
|
+
recommendedModel?: string | null;
|
|
11
|
+
cta?: {
|
|
12
|
+
kind: string;
|
|
13
|
+
label?: string;
|
|
14
|
+
href?: string;
|
|
15
|
+
} | null;
|
|
16
|
+
};
|
|
17
|
+
|
|
5
18
|
type PluginApi = {
|
|
6
19
|
config: Config;
|
|
7
20
|
pluginConfig?: Record<string, unknown>;
|
|
@@ -9,6 +22,7 @@ type PluginApi = {
|
|
|
9
22
|
kind: string;
|
|
10
23
|
label?: string;
|
|
11
24
|
createRuntime: (params: RuntimeFactoryParams) => NcpAgentRuntime;
|
|
25
|
+
describeSessionType?: (() => Promise<SessionTypeDescriptor | null | undefined>) | (() => SessionTypeDescriptor | null | undefined);
|
|
12
26
|
}) => void;
|
|
13
27
|
};
|
|
14
28
|
type PluginDefinition = {
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,9 @@ import {
|
|
|
13
13
|
buildUserFacingModelRoute,
|
|
14
14
|
resolveExternalModelProvider
|
|
15
15
|
} from "./codex-model-provider.js";
|
|
16
|
+
import {
|
|
17
|
+
createDescribeCodexSessionType
|
|
18
|
+
} from "./codex-session-type.js";
|
|
16
19
|
const PLUGIN_ID = "nextclaw-ncp-runtime-plugin-codex-sdk";
|
|
17
20
|
const CODEX_RUNTIME_KIND = "codex";
|
|
18
21
|
function readString(value) {
|
|
@@ -152,9 +155,14 @@ const plugin = {
|
|
|
152
155
|
},
|
|
153
156
|
register(api) {
|
|
154
157
|
const pluginConfig = readRecord(api.pluginConfig) ?? {};
|
|
158
|
+
const describeCodexSessionType = createDescribeCodexSessionType({
|
|
159
|
+
config: api.config,
|
|
160
|
+
pluginConfig
|
|
161
|
+
});
|
|
155
162
|
api.registerNcpAgentRuntime({
|
|
156
163
|
kind: CODEX_RUNTIME_KIND,
|
|
157
164
|
label: "Codex",
|
|
165
|
+
describeSessionType: describeCodexSessionType,
|
|
158
166
|
createRuntime: (runtimeParams) => {
|
|
159
167
|
const nextConfig = api.config;
|
|
160
168
|
const model = resolveCodexModel({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "NextClaw plugin that registers Codex SDK as an optional NCP runtime.",
|
|
6
6
|
"type": "module",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@nextclaw/
|
|
25
|
-
"@nextclaw/
|
|
26
|
-
"@nextclaw/
|
|
27
|
-
"@nextclaw/ncp-
|
|
24
|
+
"@nextclaw/core": "0.10.0",
|
|
25
|
+
"@nextclaw/ncp": "0.3.2",
|
|
26
|
+
"@nextclaw/ncp-toolkit": "0.4.2",
|
|
27
|
+
"@nextclaw/nextclaw-ncp-runtime-codex-sdk": "0.1.2"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/node": "^20.17.6",
|