@botconnector/bccli 0.4.0-beta.4 → 0.4.0-beta.40

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.
Files changed (46) hide show
  1. package/README.md +80 -1
  2. package/dist/acp-5A7EXLCG.js +114 -0
  3. package/dist/args-4SMOHFN5.js +13 -0
  4. package/dist/chunk-3HCOAJEQ.js +190 -0
  5. package/dist/chunk-AS7VV7D3.js +195 -0
  6. package/dist/{chunk-NGLKANMD.js → chunk-AVB6M4JE.js} +24 -2
  7. package/dist/{chunk-GW36UMHZ.js → chunk-DSFHN5CH.js} +2 -2
  8. package/dist/{chunk-ELML4KVQ.js → chunk-GAFJEQTJ.js} +32 -2
  9. package/dist/chunk-GGNXHJL6.js +884 -0
  10. package/dist/chunk-HE33XAPZ.js +341 -0
  11. package/dist/{chunk-UESQNU4A.js → chunk-ISCT3PN3.js} +14 -9
  12. package/dist/chunk-JROUQ5YS.js +76 -0
  13. package/dist/chunk-LN32JIZR.js +56 -0
  14. package/dist/chunk-M23QBX3V.js +419 -0
  15. package/dist/chunk-M7LLJQ7M.js +310 -0
  16. package/dist/chunk-NI5JZUZ3.js +63 -0
  17. package/dist/chunk-PDVS4UWM.js +8 -0
  18. package/dist/chunk-PSO7R5AD.js +10 -0
  19. package/dist/chunk-RV74TCEP.js +231 -0
  20. package/dist/{chunk-U7DLMVPZ.js → chunk-SESBH44L.js} +2 -1
  21. package/dist/{chunk-SJH3YLW4.js → chunk-VM7HYAJS.js} +4 -1
  22. package/dist/chunk-WH7XLDGZ.js +2125 -0
  23. package/dist/chunk-ZMU7MXCH.js +674 -0
  24. package/dist/cli.js +94 -1278
  25. package/dist/{config-NPSYFAFD.js → config-C4KLLDC6.js} +5 -2
  26. package/dist/integrationCli-HR7CDUSI.js +685 -0
  27. package/dist/{login-F4G5QXOU.js → login-T5S6SPZA.js} +1 -1
  28. package/dist/{mcpCli-Q2H63ISP.js → mcpCli-5QTXH7XJ.js} +42 -9
  29. package/dist/modelsCli-DKTT3UZD.js +36 -0
  30. package/dist/providerCli-DDH4ZZUY.js +15 -0
  31. package/dist/sdk.js +5130 -0
  32. package/dist/serve-I2VQUTHR.js +178 -0
  33. package/dist/serve-JNQUP7CZ.js +514 -0
  34. package/dist/session-H2YL5RSB.js +12 -0
  35. package/dist/setup-I7UY7X7C.js +23 -0
  36. package/dist/ui-GVIMUZNS.js +2280 -0
  37. package/dist/update-SZUG3YSB.js +109 -0
  38. package/package.json +24 -3
  39. package/dist/args-FCLPQ7TO.js +0 -11
  40. package/dist/chunk-C5AFWX7H.js +0 -328
  41. package/dist/chunk-OSWQPSA4.js +0 -252
  42. package/dist/chunk-RZUJYAQV.js +0 -112
  43. package/dist/chunk-UN7QXPCB.js +0 -82
  44. package/dist/providerCli-MXV6PD6F.js +0 -11
  45. package/dist/session-7UB77CEG.js +0 -9
  46. package/dist/ui-7FXPXXGN.js +0 -1333
@@ -0,0 +1,109 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ VERSION
4
+ } from "./chunk-PDVS4UWM.js";
5
+ import {
6
+ t
7
+ } from "./chunk-M23QBX3V.js";
8
+
9
+ // src/update.ts
10
+ import { spawnSync } from "child_process";
11
+ import { mkdirSync, readFileSync, renameSync, writeFileSync } from "fs";
12
+ import { join } from "path";
13
+ var REGISTRY_URL = "https://registry.npmjs.org/-/package/@botconnector/bccli/dist-tags";
14
+ var CHECK_INTERVAL_MS = 24 * 60 * 60 * 1e3;
15
+ function splitVersion(v) {
16
+ const i = v.indexOf("-");
17
+ const coreStr = i < 0 ? v : v.slice(0, i);
18
+ const preStr = i < 0 ? "" : v.slice(i + 1);
19
+ return {
20
+ core: coreStr.split(".").map((p) => Number.parseInt(p, 10) || 0),
21
+ pre: preStr ? preStr.split(".") : []
22
+ };
23
+ }
24
+ function compareVersions(a, b) {
25
+ const A = splitVersion(a);
26
+ const B = splitVersion(b);
27
+ for (let i = 0; i < Math.max(A.core.length, B.core.length); i++) {
28
+ const x = A.core[i] ?? 0;
29
+ const y = B.core[i] ?? 0;
30
+ if (x !== y) return x < y ? -1 : 1;
31
+ }
32
+ if (!A.pre.length && !B.pre.length) return 0;
33
+ if (!A.pre.length) return 1;
34
+ if (!B.pre.length) return -1;
35
+ for (let i = 0; i < Math.max(A.pre.length, B.pre.length); i++) {
36
+ const x = A.pre[i];
37
+ const y = B.pre[i];
38
+ if (x === void 0) return -1;
39
+ if (y === void 0) return 1;
40
+ const nx = Number.parseInt(x, 10);
41
+ const ny = Number.parseInt(y, 10);
42
+ if (String(nx) === x && String(ny) === y) {
43
+ if (nx !== ny) return nx < ny ? -1 : 1;
44
+ } else if (x !== y) {
45
+ return x < y ? -1 : 1;
46
+ }
47
+ }
48
+ return 0;
49
+ }
50
+ function channelFor(version) {
51
+ return version.includes("-") ? "next" : "latest";
52
+ }
53
+ function cachePath(home) {
54
+ return join(home, "update-check.json");
55
+ }
56
+ function readCache(home) {
57
+ try {
58
+ const parsed = JSON.parse(readFileSync(cachePath(home), "utf8"));
59
+ return typeof parsed?.checkedAt === "string" ? parsed : void 0;
60
+ } catch {
61
+ return void 0;
62
+ }
63
+ }
64
+ function writeCache(home, cache) {
65
+ mkdirSync(home, { recursive: true });
66
+ const tmp = `${cachePath(home)}.tmp`;
67
+ writeFileSync(tmp, JSON.stringify(cache));
68
+ renameSync(tmp, cachePath(home));
69
+ }
70
+ function dueForCheck(cache, now, intervalMs = CHECK_INTERVAL_MS) {
71
+ if (!cache) return true;
72
+ const at = Date.parse(cache.checkedAt);
73
+ if (!Number.isFinite(at)) return true;
74
+ return now.getTime() - at >= intervalMs;
75
+ }
76
+ function updateNotice(current, latest) {
77
+ if (!latest || compareVersions(current, latest) >= 0) return void 0;
78
+ return t("A new bccli is available: {latest} (you have {current}). Run: bccli update", { latest, current });
79
+ }
80
+ async function checkForUpdate(deps) {
81
+ try {
82
+ const cached = readCache(deps.home);
83
+ if (!dueForCheck(cached, deps.now)) return updateNotice(VERSION, cached?.latest);
84
+ const res = await deps.fetch(REGISTRY_URL, { signal: AbortSignal.timeout(deps.timeoutMs ?? 3e3) });
85
+ if (!res.ok) return updateNotice(VERSION, cached?.latest);
86
+ const tags = await res.json();
87
+ const latest = tags[channelFor(VERSION)] ?? tags.latest;
88
+ writeCache(deps.home, { checkedAt: deps.now.toISOString(), latest });
89
+ return updateNotice(VERSION, latest);
90
+ } catch {
91
+ return void 0;
92
+ }
93
+ }
94
+ async function runUpdateCommand(deps) {
95
+ const version = deps.env.BCCLI_VERSION_OVERRIDE ?? VERSION;
96
+ const spec = `@botconnector/bccli@${channelFor(version)}`;
97
+ const spawnFn = deps.spawn ?? spawnSync;
98
+ const cmd = process.platform === "win32" ? "npm.cmd" : "npm";
99
+ const r = spawnFn(cmd, ["i", "-g", spec], { stdio: "inherit", env: deps.env });
100
+ return typeof r.status === "number" ? r.status : 1;
101
+ }
102
+ export {
103
+ channelFor,
104
+ checkForUpdate,
105
+ compareVersions,
106
+ dueForCheck,
107
+ runUpdateCommand,
108
+ updateNotice
109
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botconnector/bccli",
3
- "version": "0.4.0-beta.4",
3
+ "version": "0.4.0-beta.40",
4
4
  "description": "BCCLI — BotConnector AI coding agent for the terminal",
5
5
  "type": "module",
6
6
  "bin": {
@@ -26,18 +26,39 @@
26
26
  "dependencies": {
27
27
  "@modelcontextprotocol/sdk": "^1.30.1",
28
28
  "diff": "^9.0.0",
29
- "fast-glob": "^3.3.3",
30
29
  "ink": "^7.1.1",
30
+ "openai": "^7.27.0",
31
31
  "react": "^19.3.0",
32
+ "undici": "^7.28.0",
33
+ "ws": "^8.22.0",
34
+ "yaml": "^2.9.1",
32
35
  "zod": "^4.6.5"
33
36
  },
34
37
  "devDependencies": {
35
38
  "@biomejs/biome": "^2.5.14",
36
39
  "@types/node": "^26.6.3",
37
40
  "@types/react": "^19.3.0",
41
+ "@types/ws": "^8.18.2",
38
42
  "ink-testing-library": "^4.0.0",
39
43
  "tsup": "^8.5.1",
40
44
  "typescript": "^7.0.2",
41
45
  "vitest": "^5.0.2"
42
- }
46
+ },
47
+ "overrides": {
48
+ "esbuild": "0.28.2"
49
+ },
50
+ "main": "dist/sdk.js",
51
+ "exports": {
52
+ ".": "./dist/sdk.js"
53
+ },
54
+ "directories": {
55
+ "doc": "docs",
56
+ "test": "test"
57
+ },
58
+ "keywords": [],
59
+ "author": "",
60
+ "bugs": {
61
+ "url": "https://github.com/farijarifriyanto-debug/bccli/issues"
62
+ },
63
+ "homepage": "https://github.com/farijarifriyanto-debug/bccli#readme"
43
64
  }
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- HELP_TEXT,
4
- parseCliArgs
5
- } from "./chunk-UN7QXPCB.js";
6
- import "./chunk-ELML4KVQ.js";
7
- import "./chunk-RZUJYAQV.js";
8
- export {
9
- HELP_TEXT,
10
- parseCliArgs
11
- };
@@ -1,328 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- hasKey,
4
- providerName,
5
- removeGlobalProvider,
6
- writeGlobalConfig
7
- } from "./chunk-U7DLMVPZ.js";
8
- import {
9
- PRESETS,
10
- loadConfig,
11
- readCredentials,
12
- saveCredential
13
- } from "./chunk-RZUJYAQV.js";
14
-
15
- // src/thinking.ts
16
- var OPEN = "<think>";
17
- var CLOSE = "</think>";
18
- function partialTag(text, tag) {
19
- for (let n = Math.min(tag.length - 1, text.length); n > 0; n--) if (tag.startsWith(text.slice(-n))) return n;
20
- return 0;
21
- }
22
- var ThinkSplitter = class {
23
- inside = false;
24
- held = "";
25
- push(delta) {
26
- let rest = this.held + delta;
27
- this.held = "";
28
- let text = "";
29
- let thinking = "";
30
- while (rest) {
31
- const tag = this.inside ? CLOSE : OPEN;
32
- const at = rest.indexOf(tag);
33
- if (at >= 0) {
34
- if (this.inside) thinking += rest.slice(0, at);
35
- else text += rest.slice(0, at);
36
- rest = rest.slice(at + tag.length);
37
- this.inside = !this.inside;
38
- continue;
39
- }
40
- const keep = partialTag(rest, tag);
41
- const out = rest.slice(0, rest.length - keep);
42
- if (this.inside) thinking += out;
43
- else text += out;
44
- this.held = rest.slice(rest.length - keep);
45
- break;
46
- }
47
- return { text, thinking };
48
- }
49
- /** Whatever was held back as a possible tag start is plain text after all. */
50
- flush() {
51
- const held = this.held;
52
- this.held = "";
53
- return this.inside ? { text: "", thinking: held } : { text: held, thinking: "" };
54
- }
55
- };
56
- function splitThinking(text) {
57
- const s = new ThinkSplitter();
58
- const a = s.push(text);
59
- const b = s.flush();
60
- return { text: a.text + b.text, thinking: a.thinking + b.thinking };
61
- }
62
-
63
- // src/provider.ts
64
- var ProviderError = class extends Error {
65
- constructor(message, status) {
66
- super(message);
67
- this.status = status;
68
- }
69
- status;
70
- };
71
- var retryable = (status) => status === 429 || status >= 500;
72
- function detectRepetition(text) {
73
- const tail = text.slice(-600);
74
- for (let len = 1; len <= 12; len++) {
75
- const unit = tail.slice(-len);
76
- if (unit.length < len || !unit.trim()) continue;
77
- let i = tail.length;
78
- let count = 0;
79
- while (i >= len && tail.slice(i - len, i) === unit) {
80
- count++;
81
- i -= len;
82
- }
83
- if (count >= 20 && count * len >= 300) return text.length - count * len;
84
- }
85
- return -1;
86
- }
87
- function sleep(ms, signal) {
88
- return new Promise((resolve, reject) => {
89
- const timer = setTimeout(resolve, ms);
90
- signal?.addEventListener(
91
- "abort",
92
- () => {
93
- clearTimeout(timer);
94
- reject(signal.reason);
95
- },
96
- { once: true }
97
- );
98
- });
99
- }
100
- function errorMessage(body) {
101
- try {
102
- const parsed = JSON.parse(body);
103
- return parsed?.error?.message ?? parsed?.message ?? body.slice(0, 300);
104
- } catch {
105
- return body.slice(0, 300);
106
- }
107
- }
108
- var toUsage = (u) => u ? { inputTokens: u.prompt_tokens ?? 0, outputTokens: u.completion_tokens ?? 0 } : void 0;
109
- async function readStream(res, onText, onThinking) {
110
- let text = "";
111
- let thinking = "";
112
- const splitter = new ThinkSplitter();
113
- const emit = (part) => {
114
- if (part.thinking) {
115
- thinking += part.thinking;
116
- onThinking?.(part.thinking);
117
- }
118
- if (part.text) {
119
- text += part.text;
120
- onText?.(part.text);
121
- if (loopAt < 0) loopAt = detectRepetition(text);
122
- }
123
- };
124
- let usage;
125
- let finishReason;
126
- const calls = [];
127
- const byIndex = /* @__PURE__ */ new Map();
128
- let current;
129
- const decoder = new TextDecoder();
130
- let buffer = "";
131
- let loopAt = -1;
132
- const handle = (line) => {
133
- if (!line.startsWith("data:")) return;
134
- const data = line.slice(5).trim();
135
- if (!data || data === "[DONE]") return;
136
- let event;
137
- try {
138
- event = JSON.parse(data);
139
- } catch {
140
- return;
141
- }
142
- if (event.error) throw new ProviderError(`Error dari provider: ${event.error.message ?? JSON.stringify(event.error)}`);
143
- if (event.usage) usage = toUsage(event.usage);
144
- const choice = event.choices?.[0];
145
- if (!choice) return;
146
- if (choice.finish_reason) finishReason = choice.finish_reason;
147
- const delta = choice.delta ?? {};
148
- const reasoning = delta.reasoning_content || delta.reasoning;
149
- if (reasoning) emit({ text: "", thinking: reasoning });
150
- if (delta.content) emit(splitter.push(delta.content));
151
- for (const tc of delta.tool_calls ?? []) {
152
- let target = tc.index !== void 0 ? byIndex.get(tc.index) : current;
153
- if (!target || tc.index === void 0 && tc.id && target.id && target.id !== tc.id) {
154
- target = { id: "", name: "", arguments: "" };
155
- calls.push(target);
156
- if (tc.index !== void 0) byIndex.set(tc.index, target);
157
- }
158
- current = target;
159
- if (tc.id) target.id = tc.id;
160
- if (tc.function?.name && !target.name) target.name = tc.function.name;
161
- if (tc.function?.arguments) target.arguments += tc.function.arguments;
162
- }
163
- };
164
- for await (const chunk of res.body) {
165
- buffer += decoder.decode(chunk, { stream: true });
166
- let newline = buffer.indexOf("\n");
167
- while (newline >= 0 && loopAt < 0) {
168
- handle(buffer.slice(0, newline).trim());
169
- buffer = buffer.slice(newline + 1);
170
- newline = buffer.indexOf("\n");
171
- }
172
- if (loopAt >= 0) return { text: text.slice(0, loopAt), toolCalls: [], thinking: thinking || void 0, usage, finishReason: "repetition" };
173
- }
174
- handle(buffer.trim());
175
- emit(splitter.flush());
176
- const toolCalls = calls.map((call, index) => ({ ...call, id: call.id || `call_${index}` }));
177
- return { text, toolCalls, thinking: thinking || void 0, usage, finishReason };
178
- }
179
- async function readJson(res) {
180
- const body = await res.json();
181
- const choice = body.choices?.[0];
182
- const toolCalls = (choice?.message?.tool_calls ?? []).map((tc, i) => ({
183
- id: tc.id || `call_${i}`,
184
- name: tc.function?.name ?? "",
185
- arguments: tc.function?.arguments ?? ""
186
- }));
187
- const split = splitThinking(choice?.message?.content ?? "");
188
- const thinking = (choice?.message?.reasoning_content || choice?.message?.reasoning || "") + split.thinking;
189
- return { text: split.text, toolCalls, thinking: thinking || void 0, usage: toUsage(body.usage), finishReason: choice?.finish_reason };
190
- }
191
- function createProvider({ baseURL, apiKey, model, fetch: doFetch = fetch, retryDelayMs = 1e3 }) {
192
- const headers = { "content-type": "application/json" };
193
- if (apiKey) headers.authorization = `Bearer ${apiKey}`;
194
- async function post(path, body, signal) {
195
- let lastError;
196
- for (let attempt = 0; attempt < 4; attempt++) {
197
- if (attempt > 0) await sleep(retryDelayMs * 2 ** (attempt - 1), signal);
198
- let res;
199
- try {
200
- res = await doFetch(`${baseURL}${path}`, { method: "POST", headers, body: JSON.stringify(body), signal });
201
- } catch (error) {
202
- if (signal?.aborted) throw error;
203
- lastError = new ProviderError(`Tidak bisa terhubung ke ${baseURL}: ${error.message}`);
204
- continue;
205
- }
206
- if (res.ok) return res;
207
- const text = await res.text().catch(() => "");
208
- lastError = new ProviderError(`${res.status} dari ${baseURL}: ${errorMessage(text)}`, res.status);
209
- if (!retryable(res.status)) throw lastError;
210
- }
211
- throw lastError ?? new ProviderError("Permintaan gagal");
212
- }
213
- return {
214
- async chat({ messages, tools, signal, onText, onThinking }) {
215
- const res = await post(
216
- "/chat/completions",
217
- { model, messages, stream: true, stream_options: { include_usage: true }, ...tools?.length ? { tools } : {} },
218
- signal
219
- );
220
- if ((res.headers.get("content-type") ?? "").includes("application/json")) return readJson(res);
221
- if (!res.body) throw new ProviderError("Respons provider kosong");
222
- return readStream(res, onText, onThinking);
223
- },
224
- async listModels() {
225
- const res = await doFetch(`${baseURL}/models`, { headers });
226
- if (!res.ok) throw new ProviderError(`${res.status} saat mengambil daftar model`, res.status);
227
- const body = await res.json();
228
- return (body.data ?? []).map((m) => m.id).sort();
229
- }
230
- };
231
- }
232
-
233
- // src/models.ts
234
- function order(ids) {
235
- const presetIds = PRESETS.map((p) => p.id);
236
- const presets = presetIds.filter((id) => ids.includes(id));
237
- const custom = ids.filter((id) => !presetIds.includes(id)).sort();
238
- return [...presets, ...custom];
239
- }
240
- async function listAllModels(config, env = process.env, opts = {}) {
241
- const timeoutMs = opts.timeoutMs ?? 5e3;
242
- const baseFetch = opts.fetch ?? fetch;
243
- const untrusted = new Set(config.projectProviders ?? []);
244
- const ids = order(Object.keys(config.providers)).filter((id) => opts.only ? id === opts.only : !untrusted.has(id) && hasKey(config, id, env));
245
- const results = await Promise.all(
246
- ids.map(async (id) => {
247
- const provider = config.providers[id];
248
- const apiKey = (opts.keyOverride && id === opts.only ? opts.keyOverride : void 0) || (provider.apiKeyEnv ? env[provider.apiKeyEnv] : void 0) || readCredentials(env)[id] || void 0;
249
- const local = !provider.apiKeyEnv;
250
- const timedFetch = ((input, init) => baseFetch(input, { ...init, signal: AbortSignal.timeout(timeoutMs) }));
251
- const list = createProvider({ baseURL: provider.baseURL.replace(/\/+$/, ""), apiKey, model: "", fetch: timedFetch }).listModels();
252
- let timer;
253
- const timeout = new Promise((_, reject) => {
254
- timer = setTimeout(() => reject(new Error("timeout")), timeoutMs);
255
- });
256
- try {
257
- const models = await Promise.race([list, timeout]);
258
- return { providerId: id, providerName: providerName(config, id), models };
259
- } catch {
260
- if (local && !opts.only) return void 0;
261
- return { providerId: id, providerName: providerName(config, id), models: [], error: "tidak bisa dihubungi" };
262
- } finally {
263
- clearTimeout(timer);
264
- }
265
- })
266
- );
267
- return results.filter((g) => !!g);
268
- }
269
-
270
- // src/providerCli.ts
271
- async function addProviderKey(providerId, key, deps) {
272
- const config = loadConfig(deps.cwd, deps.env);
273
- const [group] = await listAllModels(config, deps.env, { only: providerId, fetch: deps.fetch, keyOverride: key || void 0 });
274
- if (!group || group.error) return { ok: false, error: `API key ditolak atau ${providerName(config, providerId)} tidak bisa dihubungi.` };
275
- if (key) saveCredential(providerId, key, deps.env);
276
- return { ok: true, models: group.models.length };
277
- }
278
- async function runProviderCommand(args, deps) {
279
- const [action = "list", id] = args.subArgs;
280
- const config = loadConfig(deps.cwd, deps.env);
281
- if (action === "list") {
282
- for (const pid of Object.keys(config.providers)) {
283
- const mark = hasKey(config, pid, deps.env) ? "\u2713" : "\u25CB";
284
- deps.out(`${mark} ${pid.padEnd(14)} ${providerName(config, pid).padEnd(20)} ${config.providers[pid].baseURL}`);
285
- }
286
- return 0;
287
- }
288
- if (!id) {
289
- deps.err(`Pemakaian: bccli provider ${action} <id>`);
290
- return 1;
291
- }
292
- if (action === "remove") {
293
- removeGlobalProvider(id, deps.env);
294
- deps.out(`${id} dihapus.`);
295
- return 0;
296
- }
297
- if (action !== "add") {
298
- deps.err(`Aksi tidak dikenal: ${action}. Pakai list, add, atau remove.`);
299
- return 1;
300
- }
301
- const preset = PRESETS.find((p) => p.id === id);
302
- if (!preset && !config.providers[id]) {
303
- if (!args.url) {
304
- deps.err(`${id} bukan preset. Untuk provider custom tambahkan --url <base URL OpenAI-compatible>.`);
305
- return 1;
306
- }
307
- writeGlobalConfig(
308
- { providers: { [id]: { baseURL: args.url, ...args.name ? { name: args.name } : {}, ...args.keyEnv ? { apiKeyEnv: args.keyEnv } : {} } } },
309
- deps.env
310
- );
311
- }
312
- const needsKey = !!loadConfig(deps.cwd, deps.env).providers[id].apiKeyEnv || !preset;
313
- const key = needsKey ? await deps.readSecret(`API key untuk ${id} (kosongkan bila tidak perlu): `) : "";
314
- const result = await addProviderKey(id, key, deps);
315
- if (!result.ok) {
316
- deps.err(result.error);
317
- return 1;
318
- }
319
- deps.out(`${id} siap. ${result.models} model tersedia.`);
320
- return 0;
321
- }
322
-
323
- export {
324
- createProvider,
325
- listAllModels,
326
- addProviderKey,
327
- runProviderCommand
328
- };