@teith/openclaw-runware-provider 0.1.16 → 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/dist/index.d.ts.map +1 -1
- package/dist/index.js +95 -3
- package/dist/index.js.map +1 -1
- package/dist/openclaw-api.d.ts +40 -80
- package/dist/openclaw-api.d.ts.map +1 -1
- package/dist/openclaw-api.js +2 -5
- package/dist/openclaw-api.js.map +1 -1
- package/openclaw.plugin.json +4 -16
- package/package.json +2 -3
- package/dist/provider-discovery.d.ts +0 -51
- package/dist/provider-discovery.d.ts.map +0 -1
- package/dist/provider-discovery.js +0 -183
- package/dist/provider-discovery.js.map +0 -1
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,WAAW,EAEZ,MAAM,mBAAmB,CAAC;AA0E3B,QAAA,MAAM,KAAK,EAAE,WAmCZ,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,103 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { fetchModelIds } from "./catalog.js";
|
|
2
2
|
const PLUGIN_ID = "runware-openclaw-provider";
|
|
3
|
+
const PROVIDER_ID = "runware";
|
|
4
|
+
const PROVIDER_LABEL = "Runware";
|
|
5
|
+
const DEFAULT_BASE_URL = "https://api.runware.ai/v1";
|
|
6
|
+
const API_KEY_ENV_VAR = "RUNWARE_API_KEY";
|
|
7
|
+
const BASE_URL_ENV_VAR = "RUNWARE_BASE_URL";
|
|
8
|
+
const REQUEST_TIMEOUT_SECONDS = 600;
|
|
9
|
+
const MODEL_CONTEXT_WINDOW = 200_000;
|
|
10
|
+
const MODEL_MAX_TOKENS = 32_768;
|
|
11
|
+
const MODEL_PARAMS = { extra_body: { reasoning_effort: "high" } };
|
|
12
|
+
const ZERO_COST = { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 };
|
|
13
|
+
function getBaseUrl(env) {
|
|
14
|
+
const raw = env?.[BASE_URL_ENV_VAR] ?? process.env[BASE_URL_ENV_VAR];
|
|
15
|
+
const override = typeof raw === "string" ? raw.trim() : "";
|
|
16
|
+
return override.length > 0 ? override : DEFAULT_BASE_URL;
|
|
17
|
+
}
|
|
18
|
+
function resolveApiKey(ctx) {
|
|
19
|
+
const fromAuth = ctx.resolveProviderApiKey?.(PROVIDER_ID).apiKey;
|
|
20
|
+
if (fromAuth && fromAuth.length > 0)
|
|
21
|
+
return fromAuth;
|
|
22
|
+
const fromEnv = ctx.env?.[API_KEY_ENV_VAR] ?? process.env[API_KEY_ENV_VAR];
|
|
23
|
+
return fromEnv && fromEnv.length > 0 ? fromEnv : undefined;
|
|
24
|
+
}
|
|
25
|
+
function humanizeModelId(id) {
|
|
26
|
+
return id
|
|
27
|
+
.replace(/[-_:@]/g, " ")
|
|
28
|
+
.replace(/\bfp8\b/gi, "FP8")
|
|
29
|
+
.trim()
|
|
30
|
+
.split(/\s+/)
|
|
31
|
+
.map((w) => (w.length > 0 ? w[0].toUpperCase() + w.slice(1) : w))
|
|
32
|
+
.join(" ");
|
|
33
|
+
}
|
|
34
|
+
async function buildProvider(apiKey, baseUrl) {
|
|
35
|
+
const ids = await fetchModelIds(baseUrl, apiKey);
|
|
36
|
+
return {
|
|
37
|
+
baseUrl,
|
|
38
|
+
apiKey,
|
|
39
|
+
api: "openai-completions",
|
|
40
|
+
timeoutSeconds: REQUEST_TIMEOUT_SECONDS,
|
|
41
|
+
models: ids.map((id) => ({
|
|
42
|
+
id,
|
|
43
|
+
name: humanizeModelId(id),
|
|
44
|
+
reasoning: true,
|
|
45
|
+
input: ["text"],
|
|
46
|
+
contextWindow: MODEL_CONTEXT_WINDOW,
|
|
47
|
+
maxTokens: MODEL_MAX_TOKENS,
|
|
48
|
+
cost: ZERO_COST,
|
|
49
|
+
params: MODEL_PARAMS,
|
|
50
|
+
})),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
async function buildCatalogRows(apiKey, baseUrl) {
|
|
54
|
+
const ids = await fetchModelIds(baseUrl, apiKey);
|
|
55
|
+
return ids.map((id) => ({
|
|
56
|
+
kind: "text",
|
|
57
|
+
provider: PROVIDER_ID,
|
|
58
|
+
model: id,
|
|
59
|
+
label: humanizeModelId(id),
|
|
60
|
+
source: "live",
|
|
61
|
+
reasoning: true,
|
|
62
|
+
input: ["text"],
|
|
63
|
+
contextWindow: MODEL_CONTEXT_WINDOW,
|
|
64
|
+
maxTokens: MODEL_MAX_TOKENS,
|
|
65
|
+
cost: ZERO_COST,
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
3
68
|
const entry = {
|
|
4
69
|
id: PLUGIN_ID,
|
|
5
|
-
name:
|
|
70
|
+
name: PROVIDER_LABEL,
|
|
6
71
|
description: "Runware — unified OpenAI-compatible access to Claude, GPT, Gemini, Qwen, GLM, MiniMax, Kimi, and Gemma.",
|
|
7
72
|
register(api) {
|
|
8
|
-
api.registerProvider(
|
|
73
|
+
api.registerProvider({
|
|
74
|
+
id: PROVIDER_ID,
|
|
75
|
+
label: PROVIDER_LABEL,
|
|
76
|
+
docsPath: "https://docs.runware.ai",
|
|
77
|
+
envVars: [API_KEY_ENV_VAR, BASE_URL_ENV_VAR],
|
|
78
|
+
auth: [],
|
|
79
|
+
catalog: {
|
|
80
|
+
order: "simple",
|
|
81
|
+
run: async (ctx) => {
|
|
82
|
+
const apiKey = resolveApiKey(ctx);
|
|
83
|
+
if (!apiKey)
|
|
84
|
+
return null;
|
|
85
|
+
const baseUrl = getBaseUrl(ctx.env);
|
|
86
|
+
return { provider: await buildProvider(apiKey, baseUrl) };
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
api.registerModelCatalogProvider({
|
|
91
|
+
provider: PROVIDER_ID,
|
|
92
|
+
kinds: ["text"],
|
|
93
|
+
liveCatalog: async (ctx) => {
|
|
94
|
+
const apiKey = resolveApiKey(ctx);
|
|
95
|
+
if (!apiKey)
|
|
96
|
+
return null;
|
|
97
|
+
const baseUrl = getBaseUrl(ctx.env);
|
|
98
|
+
return buildCatalogRows(apiKey, baseUrl);
|
|
99
|
+
},
|
|
100
|
+
});
|
|
9
101
|
},
|
|
10
102
|
};
|
|
11
103
|
export default entry;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAQ7C,MAAM,SAAS,GAAG,2BAA2B,CAAC;AAC9C,MAAM,WAAW,GAAG,SAAS,CAAC;AAC9B,MAAM,cAAc,GAAG,SAAS,CAAC;AACjC,MAAM,gBAAgB,GAAG,2BAA2B,CAAC;AACrD,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAC1C,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAC5C,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAEpC,MAAM,oBAAoB,GAAG,OAAO,CAAC;AACrC,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAChC,MAAM,YAAY,GAAG,EAAE,UAAU,EAAE,EAAE,gBAAgB,EAAE,MAAM,EAAE,EAAW,CAAC;AAC3E,MAAM,SAAS,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;AAEvE,SAAS,UAAU,CAAC,GAAwC;IAC1D,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,gBAAgB,CAAC,IAAI,OAAO,CAA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gBAAgB,CAAC;YAC5C,IAAI,EAAE,EAAE;YACR,OAAO,EAAE;gBACP,KAAK,EAAE,QAAQ;gBACf,GAAG,EAAE,KAAK,EAAE,GAAmB,EAAE,EAAE;oBACjC,MAAM,MAAM,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;oBAClC,IAAI,CAAC,MAAM;wBAAE,OAAO,IAAI,CAAC;oBACzB,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;oBACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;gBAC5D,CAAC;aACF;SACF,CAAC,CAAC;QAEH,GAAG,CAAC,4BAA4B,CAAC;YAC/B,QAAQ,EAAE,WAAW;YACrB,KAAK,EAAE,CAAC,MAAM,CAAC;YACf,WAAW,EAAE,KAAK,EAAE,GAAmB,EAAE,EAAE;gBACzC,MAAM,MAAM,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;gBAClC,IAAI,CAAC,MAAM;oBAAE,OAAO,IAAI,CAAC;gBACzB,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBACpC,OAAO,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAC3C,CAAC;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
package/dist/openclaw-api.d.ts
CHANGED
|
@@ -1,96 +1,56 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Local description of the OpenClaw plugin API surface we use.
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* We do not import these types from `openclaw` — a plugin is a contract,
|
|
6
|
-
* not a dependency. If/when an official @openclaw/plugin-sdk ships, swap
|
|
7
|
-
* the interfaces below for imports in one place.
|
|
3
|
+
* We do not import these types from the openclaw package — the plugin is
|
|
4
|
+
* a contract, not a dependency.
|
|
8
5
|
*/
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
reasoning: boolean;
|
|
16
|
-
input: string[];
|
|
17
|
-
contextWindow: number;
|
|
18
|
-
maxTokens: number;
|
|
19
|
-
cost: ModelCost;
|
|
20
|
-
params?: Record<string, unknown>;
|
|
21
|
-
}
|
|
22
|
-
export interface ProviderShape {
|
|
23
|
-
baseUrl: string;
|
|
24
|
-
apiKey: string;
|
|
25
|
-
api: ProviderApi;
|
|
26
|
-
timeoutSeconds?: number;
|
|
27
|
-
models: ModelEntry[];
|
|
28
|
-
}
|
|
29
|
-
export interface CatalogResult {
|
|
30
|
-
provider?: ProviderShape;
|
|
31
|
-
providers?: Record<string, ProviderShape>;
|
|
6
|
+
export type Modality = "text";
|
|
7
|
+
export interface ModelCost {
|
|
8
|
+
input: number;
|
|
9
|
+
output: number;
|
|
10
|
+
cacheRead: number;
|
|
11
|
+
cacheWrite: number;
|
|
32
12
|
}
|
|
33
13
|
export interface CatalogContext {
|
|
34
|
-
config?: unknown;
|
|
35
|
-
env?: Record<string, string | undefined>;
|
|
36
14
|
resolveProviderApiKey: (providerId: string) => {
|
|
37
15
|
apiKey?: string;
|
|
38
16
|
};
|
|
39
|
-
}
|
|
40
|
-
export interface AuthRunContext {
|
|
41
|
-
prompter?: unknown;
|
|
42
|
-
config?: unknown;
|
|
43
17
|
env?: Record<string, string | undefined>;
|
|
44
18
|
}
|
|
45
|
-
export interface
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
methodId: string;
|
|
66
|
-
}
|
|
67
|
-
export interface WizardModelPicker {
|
|
68
|
-
label: string;
|
|
69
|
-
hint?: string;
|
|
70
|
-
methodId: string;
|
|
71
|
-
}
|
|
72
|
-
export interface ProviderSpec {
|
|
73
|
-
id: string;
|
|
19
|
+
export interface ProviderShape {
|
|
20
|
+
baseUrl: string;
|
|
21
|
+
apiKey: string;
|
|
22
|
+
api: "openai-completions";
|
|
23
|
+
timeoutSeconds?: number;
|
|
24
|
+
models: Array<{
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
reasoning: boolean;
|
|
28
|
+
input: Modality[];
|
|
29
|
+
contextWindow: number;
|
|
30
|
+
maxTokens: number;
|
|
31
|
+
cost: ModelCost;
|
|
32
|
+
params?: Record<string, unknown>;
|
|
33
|
+
}>;
|
|
34
|
+
}
|
|
35
|
+
export interface ModelCatalogRow {
|
|
36
|
+
kind: "text";
|
|
37
|
+
provider: string;
|
|
38
|
+
model: string;
|
|
74
39
|
label: string;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
};
|
|
82
|
-
staticCatalog?: {
|
|
83
|
-
order: CatalogOrder;
|
|
84
|
-
run: (ctx: CatalogContext) => Promise<CatalogResult | null>;
|
|
85
|
-
};
|
|
86
|
-
wizard?: {
|
|
87
|
-
setup?: WizardSetup;
|
|
88
|
-
modelPicker?: WizardModelPicker;
|
|
89
|
-
};
|
|
90
|
-
buildUnknownModelHint?: () => string;
|
|
40
|
+
source: "live";
|
|
41
|
+
reasoning?: boolean;
|
|
42
|
+
input?: Modality[];
|
|
43
|
+
contextWindow?: number;
|
|
44
|
+
maxTokens?: number;
|
|
45
|
+
cost?: ModelCost;
|
|
91
46
|
}
|
|
92
47
|
export interface PluginApi {
|
|
93
|
-
registerProvider: (spec:
|
|
48
|
+
registerProvider: (spec: unknown) => void;
|
|
49
|
+
registerModelCatalogProvider: (spec: {
|
|
50
|
+
provider: string;
|
|
51
|
+
kinds: Array<"text">;
|
|
52
|
+
liveCatalog: (ctx: CatalogContext) => Promise<ModelCatalogRow[] | null>;
|
|
53
|
+
}) => void;
|
|
94
54
|
}
|
|
95
55
|
export interface PluginEntry {
|
|
96
56
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openclaw-api.d.ts","sourceRoot":"","sources":["../src/openclaw-api.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"openclaw-api.d.ts","sourceRoot":"","sources":["../src/openclaw-api.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC;AAE9B,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,qBAAqB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CAC1C;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,oBAAoB,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,KAAK,CAAC;QACZ,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,OAAO,CAAC;QACnB,KAAK,EAAE,QAAQ,EAAE,CAAC;QAClB,aAAa,EAAE,MAAM,CAAC;QACtB,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,SAAS,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAClC,CAAC,CAAC;CACJ;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,SAAS;IACxB,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,4BAA4B,EAAE,CAAC,IAAI,EAAE;QACnC,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QACrB,WAAW,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,OAAO,CAAC,eAAe,EAAE,GAAG,IAAI,CAAC,CAAC;KACzE,KAAK,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,CAAC,GAAG,EAAE,SAAS,KAAK,IAAI,CAAC;CACpC"}
|
package/dist/openclaw-api.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Local description of the OpenClaw plugin API surface we use.
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* We do not import these types from `openclaw` — a plugin is a contract,
|
|
6
|
-
* not a dependency. If/when an official @openclaw/plugin-sdk ships, swap
|
|
7
|
-
* the interfaces below for imports in one place.
|
|
3
|
+
* We do not import these types from the openclaw package — the plugin is
|
|
4
|
+
* a contract, not a dependency.
|
|
8
5
|
*/
|
|
9
6
|
export {};
|
|
10
7
|
//# sourceMappingURL=openclaw-api.js.map
|
package/dist/openclaw-api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openclaw-api.js","sourceRoot":"","sources":["../src/openclaw-api.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"openclaw-api.js","sourceRoot":"","sources":["../src/openclaw-api.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
package/openclaw.plugin.json
CHANGED
|
@@ -10,8 +10,11 @@
|
|
|
10
10
|
"properties": {}
|
|
11
11
|
},
|
|
12
12
|
"activation": { "onStartup": true },
|
|
13
|
-
"
|
|
13
|
+
"enabledByDefault": true,
|
|
14
14
|
"providers": ["runware"],
|
|
15
|
+
"providerAuthEnvVars": {
|
|
16
|
+
"runware": ["RUNWARE_API_KEY"]
|
|
17
|
+
},
|
|
15
18
|
"providerRequest": {
|
|
16
19
|
"providers": {
|
|
17
20
|
"runware": {
|
|
@@ -20,21 +23,6 @@
|
|
|
20
23
|
}
|
|
21
24
|
}
|
|
22
25
|
},
|
|
23
|
-
"setup": {
|
|
24
|
-
"providers": [{ "id": "runware", "envVars": ["RUNWARE_API_KEY"] }]
|
|
25
|
-
},
|
|
26
|
-
"providerAuthChoices": [
|
|
27
|
-
{
|
|
28
|
-
"provider": "runware",
|
|
29
|
-
"method": "custom",
|
|
30
|
-
"choiceId": "runware",
|
|
31
|
-
"choiceLabel": "Runware",
|
|
32
|
-
"choiceHint": "Runware multi-model gateway",
|
|
33
|
-
"groupId": "runware",
|
|
34
|
-
"groupLabel": "Runware",
|
|
35
|
-
"groupHint": "Runware multi-model gateway"
|
|
36
|
-
}
|
|
37
|
-
],
|
|
38
26
|
"modelPricing": {
|
|
39
27
|
"providers": { "runware": { "external": false } }
|
|
40
28
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teith/openclaw-runware-provider",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "OpenClaw provider plugin for Runware — unified OpenAI-compatible access to Claude, GPT, Gemini, Qwen, GLM, MiniMax, Kimi, and Gemma.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -32,8 +32,7 @@
|
|
|
32
32
|
"openclaw": {
|
|
33
33
|
"id": "runware-openclaw-provider",
|
|
34
34
|
"extensions": [
|
|
35
|
-
"./dist/index.js"
|
|
36
|
-
"./dist/provider-discovery.js"
|
|
35
|
+
"./dist/index.js"
|
|
37
36
|
],
|
|
38
37
|
"providers": [
|
|
39
38
|
"runware"
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import type { CatalogContext, CatalogOrder, ProviderShape } from "./openclaw-api.js";
|
|
2
|
-
declare function runAuthFlow(ctx: any): Promise<any>;
|
|
3
|
-
declare const runwareProviderDiscovery: {
|
|
4
|
-
id: string;
|
|
5
|
-
label: string;
|
|
6
|
-
docsPath: string;
|
|
7
|
-
envVars: string[];
|
|
8
|
-
auth: {
|
|
9
|
-
id: string;
|
|
10
|
-
kind: string;
|
|
11
|
-
label: string;
|
|
12
|
-
hint: string;
|
|
13
|
-
envVar: string;
|
|
14
|
-
promptMessage: string;
|
|
15
|
-
defaultModel: string;
|
|
16
|
-
wizard: {
|
|
17
|
-
choiceId: string;
|
|
18
|
-
choiceLabel: string;
|
|
19
|
-
groupId: string;
|
|
20
|
-
groupLabel: string;
|
|
21
|
-
groupHint: string;
|
|
22
|
-
};
|
|
23
|
-
run: typeof runAuthFlow;
|
|
24
|
-
runNonInteractive: typeof runAuthFlow;
|
|
25
|
-
}[];
|
|
26
|
-
wizard: {
|
|
27
|
-
setup: {
|
|
28
|
-
choiceId: string;
|
|
29
|
-
choiceLabel: string;
|
|
30
|
-
choiceHint: string;
|
|
31
|
-
groupId: string;
|
|
32
|
-
groupLabel: string;
|
|
33
|
-
groupHint: string;
|
|
34
|
-
methodId: string;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
catalog: {
|
|
38
|
-
order: CatalogOrder;
|
|
39
|
-
run: (ctx: CatalogContext) => Promise<{
|
|
40
|
-
provider: ProviderShape;
|
|
41
|
-
}>;
|
|
42
|
-
};
|
|
43
|
-
staticCatalog: {
|
|
44
|
-
order: CatalogOrder;
|
|
45
|
-
run: (ctx: CatalogContext) => Promise<{
|
|
46
|
-
provider: ProviderShape;
|
|
47
|
-
}>;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
export default runwareProviderDiscovery;
|
|
51
|
-
//# sourceMappingURL=provider-discovery.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"provider-discovery.d.ts","sourceRoot":"","sources":["../src/provider-discovery.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,cAAc,EACd,YAAY,EAEZ,aAAa,EACd,MAAM,mBAAmB,CAAC;AA2F3B,iBAAe,WAAW,CAAC,GAAG,EAAE,GAAG,gBAQlC;AAsDD,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAqCP,YAAY;mBAvHM,cAAc;;;;;eA2HhC,YAAY;mBA3HM,cAAc;;;;CA8HtD,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import { fetchModelIds } from "./catalog.js";
|
|
2
|
-
const PROVIDER_ID = "runware";
|
|
3
|
-
const DEFAULT_BASE_URL = "https://api.runware.ai/v1";
|
|
4
|
-
const DEFAULT_MODEL = "runware/moonshotai_kimi_k2_6";
|
|
5
|
-
const API_KEY_ENV_VAR = "RUNWARE_API_KEY";
|
|
6
|
-
const BASE_URL_ENV_VAR = "RUNWARE_BASE_URL";
|
|
7
|
-
const REQUEST_TIMEOUT_SECONDS = 600;
|
|
8
|
-
const MODEL_CONTEXT_WINDOW = 200_000;
|
|
9
|
-
const MODEL_MAX_TOKENS = 32_768;
|
|
10
|
-
const MODEL_INPUT_MODALITIES = ["text"];
|
|
11
|
-
const MODEL_PARAMS = { extra_body: { reasoning_effort: "high" } };
|
|
12
|
-
const ZERO_COST = { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 };
|
|
13
|
-
function getBaseUrl(env) {
|
|
14
|
-
const raw = env?.[BASE_URL_ENV_VAR] ?? process.env[BASE_URL_ENV_VAR];
|
|
15
|
-
const override = typeof raw === "string" ? raw.trim() : "";
|
|
16
|
-
return override.length > 0 ? override : DEFAULT_BASE_URL;
|
|
17
|
-
}
|
|
18
|
-
function resolveApiKey(ctx) {
|
|
19
|
-
const fromAuth = ctx.resolveProviderApiKey?.(PROVIDER_ID).apiKey;
|
|
20
|
-
if (fromAuth && fromAuth.length > 0)
|
|
21
|
-
return fromAuth;
|
|
22
|
-
return ctx.env?.[API_KEY_ENV_VAR] ?? process.env[API_KEY_ENV_VAR];
|
|
23
|
-
}
|
|
24
|
-
function humanizeModelId(id) {
|
|
25
|
-
return id
|
|
26
|
-
.replace(/[-_:@]/g, " ")
|
|
27
|
-
.replace(/\bfp8\b/gi, "FP8")
|
|
28
|
-
.trim()
|
|
29
|
-
.split(/\s+/)
|
|
30
|
-
.map((w) => (w.length > 0 ? w[0].toUpperCase() + w.slice(1) : w))
|
|
31
|
-
.join(" ");
|
|
32
|
-
}
|
|
33
|
-
function buildModelEntry(id) {
|
|
34
|
-
return {
|
|
35
|
-
id,
|
|
36
|
-
name: humanizeModelId(id),
|
|
37
|
-
reasoning: true,
|
|
38
|
-
input: MODEL_INPUT_MODALITIES,
|
|
39
|
-
contextWindow: MODEL_CONTEXT_WINDOW,
|
|
40
|
-
maxTokens: MODEL_MAX_TOKENS,
|
|
41
|
-
cost: ZERO_COST,
|
|
42
|
-
params: MODEL_PARAMS,
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
async function buildProvider(apiKey, baseUrl) {
|
|
46
|
-
const ids = await fetchModelIds(baseUrl, apiKey);
|
|
47
|
-
return {
|
|
48
|
-
baseUrl,
|
|
49
|
-
apiKey,
|
|
50
|
-
api: "openai-completions",
|
|
51
|
-
timeoutSeconds: REQUEST_TIMEOUT_SECONDS,
|
|
52
|
-
models: ids.map(buildModelEntry),
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
function buildStaticProvider(baseUrl) {
|
|
56
|
-
return {
|
|
57
|
-
baseUrl,
|
|
58
|
-
apiKey: "",
|
|
59
|
-
api: "openai-completions",
|
|
60
|
-
timeoutSeconds: REQUEST_TIMEOUT_SECONDS,
|
|
61
|
-
models: [],
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
const liveOrStaticProvider = async (ctx) => {
|
|
65
|
-
const apiKey = resolveApiKey(ctx);
|
|
66
|
-
const baseUrl = getBaseUrl(ctx.env);
|
|
67
|
-
if (!apiKey)
|
|
68
|
-
return { provider: buildStaticProvider(baseUrl) };
|
|
69
|
-
try {
|
|
70
|
-
return { provider: await buildProvider(apiKey, baseUrl) };
|
|
71
|
-
}
|
|
72
|
-
catch {
|
|
73
|
-
return { provider: buildStaticProvider(baseUrl) };
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
function buildAgentModelsPatch(provider) {
|
|
77
|
-
const patch = {};
|
|
78
|
-
for (const model of provider.models) {
|
|
79
|
-
const key = `${PROVIDER_ID}/${model.id}`;
|
|
80
|
-
patch[key] = model.params ? { params: model.params } : {};
|
|
81
|
-
}
|
|
82
|
-
return patch;
|
|
83
|
-
}
|
|
84
|
-
async function runAuthFlow(ctx) {
|
|
85
|
-
try {
|
|
86
|
-
return await runAuthFlowInner(ctx);
|
|
87
|
-
}
|
|
88
|
-
catch (err) {
|
|
89
|
-
// eslint-disable-next-line no-console
|
|
90
|
-
console.error("[runware-plugin] runAuthFlow ERROR:", err instanceof Error ? err.stack : err);
|
|
91
|
-
throw err;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
async function runAuthFlowInner(ctx) {
|
|
95
|
-
// eslint-disable-next-line no-console
|
|
96
|
-
console.error("[runware-plugin] runAuthFlow called. ctx keys:", Object.keys(ctx ?? {}));
|
|
97
|
-
// eslint-disable-next-line no-console
|
|
98
|
-
console.error("[runware-plugin] env RUNWARE_API_KEY present:", !!process.env.RUNWARE_API_KEY);
|
|
99
|
-
// Note: not calling ctx.resolveApiKey() — openclaw's resolver crashes on
|
|
100
|
-
// .trim() of undefined when our auth method doesn't expose flagName/optionKey
|
|
101
|
-
// in the way it expects. Use env directly.
|
|
102
|
-
const apiKey = ctx?.opts?.runwareApiKey ??
|
|
103
|
-
process.env[API_KEY_ENV_VAR];
|
|
104
|
-
// eslint-disable-next-line no-console
|
|
105
|
-
console.error("[runware-plugin] apiKey resolved:", apiKey ? "yes" : "no");
|
|
106
|
-
if (!apiKey) {
|
|
107
|
-
throw new Error(`${API_KEY_ENV_VAR} is not set. Set it as env var or pass --${PROVIDER_ID}-api-key`);
|
|
108
|
-
}
|
|
109
|
-
const baseUrl = getBaseUrl(ctx?.env);
|
|
110
|
-
const provider = await buildProvider(apiKey, baseUrl);
|
|
111
|
-
const baseConfig = ctx?.baseConfig ?? ctx?.config ?? {};
|
|
112
|
-
return {
|
|
113
|
-
...baseConfig,
|
|
114
|
-
models: {
|
|
115
|
-
...(baseConfig.models ?? {}),
|
|
116
|
-
providers: {
|
|
117
|
-
...(baseConfig.models?.providers ?? {}),
|
|
118
|
-
[PROVIDER_ID]: provider,
|
|
119
|
-
},
|
|
120
|
-
},
|
|
121
|
-
agents: {
|
|
122
|
-
...(baseConfig.agents ?? {}),
|
|
123
|
-
defaults: {
|
|
124
|
-
...(baseConfig.agents?.defaults ?? {}),
|
|
125
|
-
models: {
|
|
126
|
-
...(baseConfig.agents?.defaults?.models ?? {}),
|
|
127
|
-
...buildAgentModelsPatch(provider),
|
|
128
|
-
},
|
|
129
|
-
model: {
|
|
130
|
-
...(baseConfig.agents?.defaults?.model ?? {}),
|
|
131
|
-
primary: DEFAULT_MODEL,
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
const runwareProviderDiscovery = {
|
|
138
|
-
id: PROVIDER_ID,
|
|
139
|
-
label: "Runware",
|
|
140
|
-
docsPath: "https://docs.runware.ai",
|
|
141
|
-
envVars: [API_KEY_ENV_VAR, BASE_URL_ENV_VAR],
|
|
142
|
-
auth: [
|
|
143
|
-
{
|
|
144
|
-
id: "runware",
|
|
145
|
-
kind: "custom",
|
|
146
|
-
label: "Runware",
|
|
147
|
-
hint: `Set ${API_KEY_ENV_VAR} environment variable`,
|
|
148
|
-
envVar: API_KEY_ENV_VAR,
|
|
149
|
-
promptMessage: "Enter your Runware API key",
|
|
150
|
-
defaultModel: DEFAULT_MODEL,
|
|
151
|
-
wizard: {
|
|
152
|
-
choiceId: "runware",
|
|
153
|
-
choiceLabel: "Runware",
|
|
154
|
-
groupId: "runware",
|
|
155
|
-
groupLabel: "Runware",
|
|
156
|
-
groupHint: "Runware multi-model gateway (OpenAI-compatible)",
|
|
157
|
-
},
|
|
158
|
-
run: runAuthFlow,
|
|
159
|
-
runNonInteractive: runAuthFlow,
|
|
160
|
-
},
|
|
161
|
-
],
|
|
162
|
-
wizard: {
|
|
163
|
-
setup: {
|
|
164
|
-
choiceId: "runware",
|
|
165
|
-
choiceLabel: "Runware",
|
|
166
|
-
choiceHint: "Runware multi-model gateway (OpenAI-compatible)",
|
|
167
|
-
groupId: "runware",
|
|
168
|
-
groupLabel: "Runware",
|
|
169
|
-
groupHint: "Runware multi-model gateway",
|
|
170
|
-
methodId: "runware",
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
catalog: {
|
|
174
|
-
order: "simple",
|
|
175
|
-
run: liveOrStaticProvider,
|
|
176
|
-
},
|
|
177
|
-
staticCatalog: {
|
|
178
|
-
order: "simple",
|
|
179
|
-
run: liveOrStaticProvider,
|
|
180
|
-
},
|
|
181
|
-
};
|
|
182
|
-
export default runwareProviderDiscovery;
|
|
183
|
-
//# sourceMappingURL=provider-discovery.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-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