@moxxy/cli 0.10.0 → 0.11.0
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/bin.js +201 -1
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -119397,13 +119397,16 @@ function toAnthropicTools(tools, opts = {}) {
|
|
|
119397
119397
|
|
|
119398
119398
|
// ../plugin-provider-anthropic/dist/provider.js
|
|
119399
119399
|
var anthropicModels = [
|
|
119400
|
+
{ id: "claude-fable-5", contextWindow: 1e6, maxOutputTokens: 128e3, supportsTools: true, supportsStreaming: true, supportsImages: true, supportsDocuments: true },
|
|
119401
|
+
{ id: "claude-opus-4-8", contextWindow: 1e6, maxOutputTokens: 128e3, supportsTools: true, supportsStreaming: true, supportsImages: true, supportsDocuments: true },
|
|
119400
119402
|
{ id: "claude-opus-4-7", contextWindow: 1e6, maxOutputTokens: 128e3, supportsTools: true, supportsStreaming: true, supportsImages: true, supportsDocuments: true },
|
|
119403
|
+
{ id: "claude-opus-4-6", contextWindow: 1e6, maxOutputTokens: 128e3, supportsTools: true, supportsStreaming: true, supportsImages: true, supportsDocuments: true },
|
|
119401
119404
|
{ id: "claude-sonnet-4-6", contextWindow: 1e6, maxOutputTokens: 64e3, supportsTools: true, supportsStreaming: true, supportsImages: true, supportsDocuments: true },
|
|
119402
119405
|
{ id: "claude-haiku-4-5-20251001", contextWindow: 2e5, maxOutputTokens: 64e3, supportsTools: true, supportsStreaming: true, supportsImages: true, supportsDocuments: true }
|
|
119403
119406
|
];
|
|
119404
119407
|
var AnthropicProvider = class {
|
|
119405
119408
|
name;
|
|
119406
|
-
models
|
|
119409
|
+
models;
|
|
119407
119410
|
// Mutable so OAuth-mode refresh can swap in a client carrying the new
|
|
119408
119411
|
// bearer token; the plain apiKey client never changes after construction.
|
|
119409
119412
|
client;
|
|
@@ -119415,6 +119418,7 @@ var AnthropicProvider = class {
|
|
|
119415
119418
|
oauthExpiresAt;
|
|
119416
119419
|
constructor(config = {}) {
|
|
119417
119420
|
this.name = config.name ?? "anthropic";
|
|
119421
|
+
this.models = config.models ?? anthropicModels;
|
|
119418
119422
|
this.defaultModel = config.defaultModel ?? "claude-sonnet-4-6";
|
|
119419
119423
|
if (config.baseURL)
|
|
119420
119424
|
this.baseURL = config.baseURL;
|
|
@@ -128248,6 +128252,186 @@ var claudeCodePlugin = definePlugin({
|
|
|
128248
128252
|
version: "0.0.0",
|
|
128249
128253
|
providers: [claudeCodeProviderDef]
|
|
128250
128254
|
});
|
|
128255
|
+
|
|
128256
|
+
// ../plugin-provider-zai/dist/models.js
|
|
128257
|
+
var glmModels = [
|
|
128258
|
+
// GLM-5 family: coding-first frontier. 5.2 carries a usable 1M context.
|
|
128259
|
+
{ id: "glm-5.2", contextWindow: 1e6, maxOutputTokens: 128e3, supportsTools: true, supportsStreaming: true },
|
|
128260
|
+
{ id: "glm-5.1", contextWindow: 2e5, maxOutputTokens: 128e3, supportsTools: true, supportsStreaming: true },
|
|
128261
|
+
{ id: "glm-5", contextWindow: 2e5, maxOutputTokens: 128e3, supportsTools: true, supportsStreaming: true },
|
|
128262
|
+
// GLM-4.6: prior flagship, 200k context, strong agentic-coding scores.
|
|
128263
|
+
{ id: "glm-4.6", contextWindow: 2e5, maxOutputTokens: 128e3, supportsTools: true, supportsStreaming: true },
|
|
128264
|
+
// GLM-4.5 tier: general (4.5), lightweight (-air), free/fast (-flash).
|
|
128265
|
+
{ id: "glm-4.5", contextWindow: 131072, maxOutputTokens: 98304, supportsTools: true, supportsStreaming: true },
|
|
128266
|
+
{ id: "glm-4.5-air", contextWindow: 131072, maxOutputTokens: 98304, supportsTools: true, supportsStreaming: true },
|
|
128267
|
+
{ id: "glm-4.5-flash", contextWindow: 131072, maxOutputTokens: 98304, supportsTools: true, supportsStreaming: true },
|
|
128268
|
+
// Vision-capable variant.
|
|
128269
|
+
{ id: "glm-4.5v", contextWindow: 65536, maxOutputTokens: 16384, supportsTools: true, supportsStreaming: true, supportsImages: true }
|
|
128270
|
+
];
|
|
128271
|
+
|
|
128272
|
+
// ../plugin-provider-zai/dist/index.js
|
|
128273
|
+
var ZAI_OPENAI_BASE_URL = "https://api.z.ai/api/paas/v4";
|
|
128274
|
+
var ZAI_ANTHROPIC_BASE_URL = "https://api.z.ai/api/anthropic";
|
|
128275
|
+
var ZAI_DEFAULT_MODEL = "glm-4.6";
|
|
128276
|
+
var zaiProviderDef = defineProvider({
|
|
128277
|
+
name: "zai",
|
|
128278
|
+
models: [...glmModels],
|
|
128279
|
+
createClient: (config) => {
|
|
128280
|
+
const cfg = config;
|
|
128281
|
+
return new OpenAIProvider({
|
|
128282
|
+
...cfg,
|
|
128283
|
+
name: "zai",
|
|
128284
|
+
baseURL: cfg.baseURL ?? ZAI_OPENAI_BASE_URL,
|
|
128285
|
+
defaultModel: cfg.defaultModel ?? ZAI_DEFAULT_MODEL,
|
|
128286
|
+
models: glmModels
|
|
128287
|
+
});
|
|
128288
|
+
},
|
|
128289
|
+
validateKey: (key) => validateKey2(key, { baseURL: ZAI_OPENAI_BASE_URL }),
|
|
128290
|
+
auth: {
|
|
128291
|
+
kind: "apiKey",
|
|
128292
|
+
hint: "z.ai API key (pay-as-you-go) from https://z.ai/manage-apikey/apikey-list"
|
|
128293
|
+
}
|
|
128294
|
+
});
|
|
128295
|
+
var zaiCodingPlanProviderDef = defineProvider({
|
|
128296
|
+
name: "zai-coding-plan",
|
|
128297
|
+
models: [...glmModels],
|
|
128298
|
+
createClient: (config) => {
|
|
128299
|
+
const cfg = config;
|
|
128300
|
+
return new AnthropicProvider({
|
|
128301
|
+
...cfg,
|
|
128302
|
+
name: "zai-coding-plan",
|
|
128303
|
+
baseURL: cfg.baseURL ?? ZAI_ANTHROPIC_BASE_URL,
|
|
128304
|
+
defaultModel: cfg.defaultModel ?? ZAI_DEFAULT_MODEL,
|
|
128305
|
+
models: glmModels
|
|
128306
|
+
});
|
|
128307
|
+
},
|
|
128308
|
+
auth: {
|
|
128309
|
+
kind: "apiKey",
|
|
128310
|
+
hint: "z.ai GLM Coding Plan key (Anthropic-compatible endpoint, like Claude Code)"
|
|
128311
|
+
}
|
|
128312
|
+
});
|
|
128313
|
+
var zaiPlugin = definePlugin({
|
|
128314
|
+
name: "@moxxy/plugin-provider-zai",
|
|
128315
|
+
version: "0.0.0",
|
|
128316
|
+
providers: [zaiProviderDef, zaiCodingPlanProviderDef]
|
|
128317
|
+
});
|
|
128318
|
+
|
|
128319
|
+
// ../plugin-provider-xai/dist/models.js
|
|
128320
|
+
var grokModels = [
|
|
128321
|
+
// grok-4 family: current frontier. 4.3 is the flagship (1M context).
|
|
128322
|
+
{ id: "grok-4.3", contextWindow: 1e6, supportsTools: true, supportsStreaming: true, supportsImages: true },
|
|
128323
|
+
{ id: "grok-4", contextWindow: 256e3, supportsTools: true, supportsStreaming: true, supportsImages: true },
|
|
128324
|
+
{ id: "grok-4-fast", contextWindow: 256e3, supportsTools: true, supportsStreaming: true, supportsImages: true },
|
|
128325
|
+
// grok-code-fast-1: agentic-coding specialist (text-only).
|
|
128326
|
+
{ id: "grok-code-fast-1", contextWindow: 256e3, supportsTools: true, supportsStreaming: true },
|
|
128327
|
+
// grok-3 tier: prior generation, still served.
|
|
128328
|
+
{ id: "grok-3", contextWindow: 131072, supportsTools: true, supportsStreaming: true },
|
|
128329
|
+
{ id: "grok-3-mini", contextWindow: 131072, supportsTools: true, supportsStreaming: true }
|
|
128330
|
+
];
|
|
128331
|
+
|
|
128332
|
+
// ../plugin-provider-xai/dist/index.js
|
|
128333
|
+
var XAI_BASE_URL = "https://api.x.ai/v1";
|
|
128334
|
+
var XAI_DEFAULT_MODEL = "grok-4";
|
|
128335
|
+
var xaiProviderDef = defineProvider({
|
|
128336
|
+
name: "xai",
|
|
128337
|
+
models: [...grokModels],
|
|
128338
|
+
createClient: (config) => {
|
|
128339
|
+
const cfg = config;
|
|
128340
|
+
return new OpenAIProvider({
|
|
128341
|
+
...cfg,
|
|
128342
|
+
name: "xai",
|
|
128343
|
+
baseURL: cfg.baseURL ?? XAI_BASE_URL,
|
|
128344
|
+
defaultModel: cfg.defaultModel ?? XAI_DEFAULT_MODEL,
|
|
128345
|
+
models: grokModels
|
|
128346
|
+
});
|
|
128347
|
+
},
|
|
128348
|
+
validateKey: (key) => validateKey2(key, { baseURL: XAI_BASE_URL }),
|
|
128349
|
+
auth: {
|
|
128350
|
+
kind: "apiKey",
|
|
128351
|
+
hint: "xAI API key (starts with `xai-`) from https://console.x.ai"
|
|
128352
|
+
}
|
|
128353
|
+
});
|
|
128354
|
+
var xaiPlugin = definePlugin({
|
|
128355
|
+
name: "@moxxy/plugin-provider-xai",
|
|
128356
|
+
version: "0.0.0",
|
|
128357
|
+
providers: [xaiProviderDef]
|
|
128358
|
+
});
|
|
128359
|
+
|
|
128360
|
+
// ../plugin-provider-google/dist/models.js
|
|
128361
|
+
var geminiModels = [
|
|
128362
|
+
// Gemini 3 family: current frontier.
|
|
128363
|
+
{ id: "gemini-3-pro", contextWindow: 1e6, maxOutputTokens: 65536, supportsTools: true, supportsStreaming: true, supportsImages: true },
|
|
128364
|
+
{ id: "gemini-3-flash", contextWindow: 1e6, maxOutputTokens: 65536, supportsTools: true, supportsStreaming: true, supportsImages: true },
|
|
128365
|
+
// Gemini 2.5 family: widely available, strong price/performance.
|
|
128366
|
+
{ id: "gemini-2.5-pro", contextWindow: 1e6, maxOutputTokens: 65536, supportsTools: true, supportsStreaming: true, supportsImages: true, supportsDocuments: true },
|
|
128367
|
+
{ id: "gemini-2.5-flash", contextWindow: 1e6, maxOutputTokens: 65536, supportsTools: true, supportsStreaming: true, supportsImages: true },
|
|
128368
|
+
{ id: "gemini-2.5-flash-lite", contextWindow: 1e6, maxOutputTokens: 65536, supportsTools: true, supportsStreaming: true, supportsImages: true }
|
|
128369
|
+
];
|
|
128370
|
+
|
|
128371
|
+
// ../plugin-provider-google/dist/index.js
|
|
128372
|
+
var GEMINI_BASE_URL = "https://generativelanguage.googleapis.com/v1beta/openai/";
|
|
128373
|
+
var GEMINI_DEFAULT_MODEL = "gemini-2.5-flash";
|
|
128374
|
+
var googleProviderDef = defineProvider({
|
|
128375
|
+
name: "google",
|
|
128376
|
+
models: [...geminiModels],
|
|
128377
|
+
createClient: (config) => {
|
|
128378
|
+
const cfg = config;
|
|
128379
|
+
return new OpenAIProvider({
|
|
128380
|
+
...cfg,
|
|
128381
|
+
name: "google",
|
|
128382
|
+
baseURL: cfg.baseURL ?? GEMINI_BASE_URL,
|
|
128383
|
+
defaultModel: cfg.defaultModel ?? GEMINI_DEFAULT_MODEL,
|
|
128384
|
+
models: geminiModels
|
|
128385
|
+
});
|
|
128386
|
+
},
|
|
128387
|
+
validateKey: (key) => validateKey2(key, { baseURL: GEMINI_BASE_URL }),
|
|
128388
|
+
auth: {
|
|
128389
|
+
kind: "apiKey",
|
|
128390
|
+
hint: "Google AI Studio (Gemini) API key from https://aistudio.google.com/apikey"
|
|
128391
|
+
}
|
|
128392
|
+
});
|
|
128393
|
+
var googlePlugin = definePlugin({
|
|
128394
|
+
name: "@moxxy/plugin-provider-google",
|
|
128395
|
+
version: "0.0.0",
|
|
128396
|
+
providers: [googleProviderDef]
|
|
128397
|
+
});
|
|
128398
|
+
var DEFAULT_LOCAL_BASE_URL = "http://localhost:11434/v1";
|
|
128399
|
+
var LOCAL_DEFAULT_MODEL = "llama3.3";
|
|
128400
|
+
var LOCAL_PLACEHOLDER_KEY = "local";
|
|
128401
|
+
var localModels = [
|
|
128402
|
+
{ id: "llama3.3", contextWindow: 131072, supportsTools: true, supportsStreaming: true },
|
|
128403
|
+
{ id: "qwen3", contextWindow: 131072, supportsTools: true, supportsStreaming: true },
|
|
128404
|
+
{ id: "qwen2.5-coder", contextWindow: 131072, supportsTools: true, supportsStreaming: true },
|
|
128405
|
+
{ id: "deepseek-r1", contextWindow: 131072, supportsTools: true, supportsStreaming: true },
|
|
128406
|
+
{ id: "gpt-oss", contextWindow: 131072, supportsTools: true, supportsStreaming: true }
|
|
128407
|
+
];
|
|
128408
|
+
var localProviderDef = defineProvider({
|
|
128409
|
+
name: "local",
|
|
128410
|
+
models: [...localModels],
|
|
128411
|
+
createClient: (config) => {
|
|
128412
|
+
const cfg = config;
|
|
128413
|
+
return new OpenAIProvider({
|
|
128414
|
+
...cfg,
|
|
128415
|
+
name: "local",
|
|
128416
|
+
apiKey: cfg.apiKey ?? process.env.LOCAL_API_KEY ?? LOCAL_PLACEHOLDER_KEY,
|
|
128417
|
+
baseURL: cfg.baseURL ?? process.env.LOCAL_MODEL_BASE_URL ?? DEFAULT_LOCAL_BASE_URL,
|
|
128418
|
+
defaultModel: cfg.defaultModel ?? LOCAL_DEFAULT_MODEL,
|
|
128419
|
+
models: localModels
|
|
128420
|
+
});
|
|
128421
|
+
},
|
|
128422
|
+
// No validateKey: there is no key to validate, and probing a local server
|
|
128423
|
+
// that may be offline would surface confusing errors during setup.
|
|
128424
|
+
auth: {
|
|
128425
|
+
kind: "apiKey",
|
|
128426
|
+
envVar: "LOCAL_API_KEY",
|
|
128427
|
+
hint: "optional \u2014 local servers need no key; set LOCAL_MODEL_BASE_URL for a non-Ollama endpoint"
|
|
128428
|
+
}
|
|
128429
|
+
});
|
|
128430
|
+
var localPlugin = definePlugin({
|
|
128431
|
+
name: "@moxxy/plugin-provider-local",
|
|
128432
|
+
version: "0.0.0",
|
|
128433
|
+
providers: [localProviderDef]
|
|
128434
|
+
});
|
|
128251
128435
|
var WHISPER_PROVIDER_ID = "openai";
|
|
128252
128436
|
var DEFAULT_FILENAMES = {
|
|
128253
128437
|
"audio/ogg": "audio.ogg",
|
|
@@ -136210,6 +136394,7 @@ var ipcInputSchemas = {
|
|
|
136210
136394
|
"app.updateInfo": z.undefined(),
|
|
136211
136395
|
"app.checkUpdate": z.undefined(),
|
|
136212
136396
|
"app.updateDashboard": z.undefined(),
|
|
136397
|
+
"app.updateShell": z.undefined(),
|
|
136213
136398
|
"app.relaunch": z.undefined(),
|
|
136214
136399
|
"app.appBooted": z.undefined(),
|
|
136215
136400
|
"app.updateDiagnostics": z.undefined(),
|
|
@@ -145278,6 +145463,14 @@ function buildBuiltinsCore(args) {
|
|
|
145278
145463
|
{ name: "@moxxy/plugin-provider-openai", plugin: openaiPlugin },
|
|
145279
145464
|
{ name: "@moxxy/plugin-provider-openai-codex", plugin: openaiCodexPlugin },
|
|
145280
145465
|
{ name: "@moxxy/plugin-provider-claude-code", plugin: claudeCodePlugin },
|
|
145466
|
+
// OpenAI-compatible vendors (z.ai api-key mode, xAI, Google Gemini, local
|
|
145467
|
+
// servers) + z.ai's GLM Coding Plan (Anthropic-compatible). Each reuses the
|
|
145468
|
+
// shared OpenAIProvider/AnthropicProvider with its own slug + base URL +
|
|
145469
|
+
// model catalog; see the respective plugin packages.
|
|
145470
|
+
{ name: "@moxxy/plugin-provider-zai", plugin: zaiPlugin },
|
|
145471
|
+
{ name: "@moxxy/plugin-provider-xai", plugin: xaiPlugin },
|
|
145472
|
+
{ name: "@moxxy/plugin-provider-google", plugin: googlePlugin },
|
|
145473
|
+
{ name: "@moxxy/plugin-provider-local", plugin: localPlugin },
|
|
145281
145474
|
{ name: "@moxxy/tools-builtin", plugin: builtinToolsPlugin },
|
|
145282
145475
|
{ name: "@moxxy/mode-default", plugin: defaultModePlugin },
|
|
145283
145476
|
{ name: "@moxxy/mode-goal", plugin: goalModePlugin },
|
|
@@ -145925,6 +146118,13 @@ async function defaultPrompt2(label3) {
|
|
|
145925
146118
|
async function resolveProviderCredentials(providerName2, vault, opts = {}) {
|
|
145926
146119
|
if (providerName2 === "openai-codex") return resolveOAuthCodex(vault, opts);
|
|
145927
146120
|
if (providerName2 === CLAUDE_CODE_PROVIDER_ID) return resolveClaudeCode(vault);
|
|
146121
|
+
if (providerName2 === "local") {
|
|
146122
|
+
return {
|
|
146123
|
+
...opts.providerConfig ?? {},
|
|
146124
|
+
apiKey: process.env.LOCAL_API_KEY ?? "local",
|
|
146125
|
+
...process.env.LOCAL_MODEL_BASE_URL ? { baseURL: process.env.LOCAL_MODEL_BASE_URL } : {}
|
|
146126
|
+
};
|
|
146127
|
+
}
|
|
145928
146128
|
const storedKeyName = await storedProviderApiKeyName(providerName2).catch(() => null);
|
|
145929
146129
|
const { providerConfig } = await resolveProviderApiKey(providerName2, vault, {
|
|
145930
146130
|
...opts,
|