@everworker/oneringai 0.4.7 → 0.5.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/README.md +425 -45
- package/dist/{ImageModel-1uP-2vk7.d.ts → ImageModel-CV8OuP3Z.d.ts} +10 -4
- package/dist/{ImageModel-BDI37OED.d.cts → ImageModel-OjV5NvLY.d.cts} +10 -4
- package/dist/capabilities/agents/index.cjs +17 -0
- package/dist/capabilities/agents/index.cjs.map +1 -1
- package/dist/capabilities/agents/index.d.cts +1 -1
- package/dist/capabilities/agents/index.d.ts +1 -1
- package/dist/capabilities/agents/index.js +17 -0
- package/dist/capabilities/agents/index.js.map +1 -1
- package/dist/capabilities/images/index.cjs +273 -16
- package/dist/capabilities/images/index.cjs.map +1 -1
- package/dist/capabilities/images/index.d.cts +1 -1
- package/dist/capabilities/images/index.d.ts +1 -1
- package/dist/capabilities/images/index.js +273 -16
- package/dist/capabilities/images/index.js.map +1 -1
- package/dist/index-BlEwczd4.d.ts +320 -0
- package/dist/index-DrJYI_0l.d.cts +320 -0
- package/dist/{index-Blci0FEd.d.ts → index-hmTj59TM.d.ts} +543 -36
- package/dist/{index-D8RCwpK9.d.cts → index-t4cRhBZW.d.cts} +543 -36
- package/dist/index.cjs +19916 -7155
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7807 -5065
- package/dist/index.d.ts +7807 -5065
- package/dist/index.js +19377 -6645
- package/dist/index.js.map +1 -1
- package/dist/shared/index.cjs +596 -7
- package/dist/shared/index.cjs.map +1 -1
- package/dist/shared/index.d.cts +2 -284
- package/dist/shared/index.d.ts +2 -284
- package/dist/shared/index.js +596 -7
- package/dist/shared/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { g as ImageEditOptions, h as ImageGenerateOptions, i as ImageGeneration, j as ImageGenerationCreateOptions, m as ImageResponse, n as ImageVariationOptions, S as SimpleGenerateOptions } from '../../ImageModel-
|
|
1
|
+
export { g as ImageEditOptions, h as ImageGenerateOptions, i as ImageGeneration, j as ImageGenerationCreateOptions, m as ImageResponse, n as ImageVariationOptions, S as SimpleGenerateOptions } from '../../ImageModel-OjV5NvLY.cjs';
|
|
2
2
|
import '../../IProvider-B8sqUzJG.cjs';
|
|
3
3
|
import '../../Vendor-DYh_bzwo.cjs';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { g as ImageEditOptions, h as ImageGenerateOptions, i as ImageGeneration, j as ImageGenerationCreateOptions, m as ImageResponse, n as ImageVariationOptions, S as SimpleGenerateOptions } from '../../ImageModel-
|
|
1
|
+
export { g as ImageEditOptions, h as ImageGenerateOptions, i as ImageGeneration, j as ImageGenerationCreateOptions, m as ImageResponse, n as ImageVariationOptions, S as SimpleGenerateOptions } from '../../ImageModel-CV8OuP3Z.js';
|
|
2
2
|
import '../../IProvider-CxDUGl6n.js';
|
|
3
3
|
import '../../Vendor-DYh_bzwo.js';
|
|
@@ -994,6 +994,12 @@ var StorageRegistry = class _StorageRegistry {
|
|
|
994
994
|
_StorageRegistry.entries.set(key, value);
|
|
995
995
|
return value;
|
|
996
996
|
}
|
|
997
|
+
/**
|
|
998
|
+
* Remove a single storage backend.
|
|
999
|
+
*/
|
|
1000
|
+
static remove(key) {
|
|
1001
|
+
return _StorageRegistry.entries.delete(key);
|
|
1002
|
+
}
|
|
997
1003
|
/**
|
|
998
1004
|
* Check if a storage backend has been configured.
|
|
999
1005
|
*/
|
|
@@ -1143,25 +1149,31 @@ var CircuitBreaker = class extends EventEmitter {
|
|
|
1143
1149
|
timestamp: Date.now()
|
|
1144
1150
|
});
|
|
1145
1151
|
break;
|
|
1146
|
-
case "closed":
|
|
1152
|
+
case "closed": {
|
|
1153
|
+
const capturedSuccesses = this.consecutiveSuccesses;
|
|
1147
1154
|
this.failures = [];
|
|
1148
1155
|
this.consecutiveSuccesses = 0;
|
|
1149
1156
|
this.openedAt = void 0;
|
|
1150
1157
|
this.emit("closed", {
|
|
1151
1158
|
name: this.name,
|
|
1152
|
-
successCount:
|
|
1159
|
+
successCount: capturedSuccesses,
|
|
1153
1160
|
timestamp: Date.now()
|
|
1154
1161
|
});
|
|
1155
1162
|
break;
|
|
1163
|
+
}
|
|
1156
1164
|
}
|
|
1157
1165
|
}
|
|
1158
1166
|
/**
|
|
1159
|
-
* Remove failures outside the time window
|
|
1167
|
+
* Remove failures outside the time window and cap array size
|
|
1160
1168
|
*/
|
|
1161
1169
|
pruneOldFailures() {
|
|
1162
1170
|
const now = Date.now();
|
|
1163
1171
|
const cutoff = now - this.config.windowMs;
|
|
1164
1172
|
this.failures = this.failures.filter((f) => f.timestamp > cutoff);
|
|
1173
|
+
const maxFailures = Math.max(this.config.failureThreshold * 2, 20);
|
|
1174
|
+
if (this.failures.length > maxFailures) {
|
|
1175
|
+
this.failures = this.failures.slice(-maxFailures);
|
|
1176
|
+
}
|
|
1165
1177
|
}
|
|
1166
1178
|
/**
|
|
1167
1179
|
* Get current state
|
|
@@ -2282,6 +2294,9 @@ var Connector = class _Connector {
|
|
|
2282
2294
|
dispose() {
|
|
2283
2295
|
if (this.disposed) return;
|
|
2284
2296
|
this.disposed = true;
|
|
2297
|
+
if (this.circuitBreaker) {
|
|
2298
|
+
this.circuitBreaker.removeAllListeners();
|
|
2299
|
+
}
|
|
2285
2300
|
this.oauthManager = void 0;
|
|
2286
2301
|
this.circuitBreaker = void 0;
|
|
2287
2302
|
}
|
|
@@ -2903,7 +2918,7 @@ var GoogleImageProvider = class extends BaseMediaProvider {
|
|
|
2903
2918
|
imageBytes = image.toString("base64");
|
|
2904
2919
|
} else {
|
|
2905
2920
|
const fs5 = await import('fs');
|
|
2906
|
-
const buffer = fs5.
|
|
2921
|
+
const buffer = await fs5.promises.readFile(image);
|
|
2907
2922
|
imageBytes = buffer.toString("base64");
|
|
2908
2923
|
}
|
|
2909
2924
|
return {
|
|
@@ -3188,11 +3203,17 @@ function createRegistryHelpers(registry) {
|
|
|
3188
3203
|
// src/domain/entities/ImageModel.ts
|
|
3189
3204
|
var IMAGE_MODELS = {
|
|
3190
3205
|
[Vendor.OpenAI]: {
|
|
3191
|
-
/** GPT-Image-1:
|
|
3206
|
+
/** GPT-Image-1.5: State-of-the-art image generation */
|
|
3207
|
+
GPT_IMAGE_1_5: "gpt-image-1.5",
|
|
3208
|
+
/** ChatGPT-Image-Latest: Image model used in ChatGPT (floating alias) */
|
|
3209
|
+
CHATGPT_IMAGE_LATEST: "chatgpt-image-latest",
|
|
3210
|
+
/** GPT-Image-1: Previous generation image model */
|
|
3192
3211
|
GPT_IMAGE_1: "gpt-image-1",
|
|
3193
|
-
/**
|
|
3212
|
+
/** GPT-Image-1-Mini: Cost-efficient version of GPT Image 1 */
|
|
3213
|
+
GPT_IMAGE_1_MINI: "gpt-image-1-mini",
|
|
3214
|
+
/** DALL-E 3: Deprecated. High quality image generation */
|
|
3194
3215
|
DALL_E_3: "dall-e-3",
|
|
3195
|
-
/** DALL-E 2:
|
|
3216
|
+
/** DALL-E 2: Deprecated. Supports editing and variations */
|
|
3196
3217
|
DALL_E_2: "dall-e-2"
|
|
3197
3218
|
},
|
|
3198
3219
|
[Vendor.Google]: {
|
|
@@ -3218,17 +3239,173 @@ var IMAGE_MODELS = {
|
|
|
3218
3239
|
};
|
|
3219
3240
|
var IMAGE_MODEL_REGISTRY = {
|
|
3220
3241
|
// ======================== OpenAI ========================
|
|
3242
|
+
"gpt-image-1.5": {
|
|
3243
|
+
name: "gpt-image-1.5",
|
|
3244
|
+
displayName: "GPT Image 1.5",
|
|
3245
|
+
provider: Vendor.OpenAI,
|
|
3246
|
+
description: "State-of-the-art image generation with better instruction following and prompt adherence",
|
|
3247
|
+
isActive: true,
|
|
3248
|
+
releaseDate: "2025-12-16",
|
|
3249
|
+
sources: {
|
|
3250
|
+
documentation: "https://developers.openai.com/api/docs/models/gpt-image-1.5",
|
|
3251
|
+
pricing: "https://openai.com/pricing",
|
|
3252
|
+
lastVerified: "2026-03-14"
|
|
3253
|
+
},
|
|
3254
|
+
capabilities: {
|
|
3255
|
+
sizes: ["1024x1024", "1024x1536", "1536x1024", "auto"],
|
|
3256
|
+
maxImagesPerRequest: 10,
|
|
3257
|
+
outputFormats: ["png", "webp", "jpeg"],
|
|
3258
|
+
features: {
|
|
3259
|
+
generation: true,
|
|
3260
|
+
editing: true,
|
|
3261
|
+
variations: false,
|
|
3262
|
+
styleControl: false,
|
|
3263
|
+
qualityControl: true,
|
|
3264
|
+
transparency: true,
|
|
3265
|
+
promptRevision: false
|
|
3266
|
+
},
|
|
3267
|
+
limits: { maxPromptLength: 32e3 },
|
|
3268
|
+
vendorOptions: {
|
|
3269
|
+
quality: {
|
|
3270
|
+
type: "enum",
|
|
3271
|
+
label: "Quality",
|
|
3272
|
+
description: "Image quality level",
|
|
3273
|
+
enum: ["auto", "low", "medium", "high"],
|
|
3274
|
+
default: "auto",
|
|
3275
|
+
controlType: "select"
|
|
3276
|
+
},
|
|
3277
|
+
background: {
|
|
3278
|
+
type: "enum",
|
|
3279
|
+
label: "Background",
|
|
3280
|
+
description: "Background transparency (requires png or webp)",
|
|
3281
|
+
enum: ["auto", "transparent", "opaque"],
|
|
3282
|
+
default: "auto",
|
|
3283
|
+
controlType: "select"
|
|
3284
|
+
},
|
|
3285
|
+
output_format: {
|
|
3286
|
+
type: "enum",
|
|
3287
|
+
label: "Output Format",
|
|
3288
|
+
description: "Image file format",
|
|
3289
|
+
enum: ["png", "jpeg", "webp"],
|
|
3290
|
+
default: "png",
|
|
3291
|
+
controlType: "select"
|
|
3292
|
+
},
|
|
3293
|
+
output_compression: {
|
|
3294
|
+
type: "number",
|
|
3295
|
+
label: "Compression",
|
|
3296
|
+
description: "Compression level for JPEG/WebP (0-100)",
|
|
3297
|
+
min: 0,
|
|
3298
|
+
max: 100,
|
|
3299
|
+
default: 100,
|
|
3300
|
+
controlType: "slider"
|
|
3301
|
+
},
|
|
3302
|
+
moderation: {
|
|
3303
|
+
type: "enum",
|
|
3304
|
+
label: "Moderation",
|
|
3305
|
+
description: "Content moderation strictness",
|
|
3306
|
+
enum: ["auto", "low"],
|
|
3307
|
+
default: "auto",
|
|
3308
|
+
controlType: "radio"
|
|
3309
|
+
}
|
|
3310
|
+
}
|
|
3311
|
+
},
|
|
3312
|
+
pricing: {
|
|
3313
|
+
perImageStandard: 0.034,
|
|
3314
|
+
// medium quality 1024x1024
|
|
3315
|
+
perImageHD: 0.133,
|
|
3316
|
+
// high quality 1024x1024
|
|
3317
|
+
currency: "USD"
|
|
3318
|
+
}
|
|
3319
|
+
},
|
|
3320
|
+
"chatgpt-image-latest": {
|
|
3321
|
+
name: "chatgpt-image-latest",
|
|
3322
|
+
displayName: "ChatGPT Image Latest",
|
|
3323
|
+
provider: Vendor.OpenAI,
|
|
3324
|
+
description: "Image model used in ChatGPT. Floating alias pointing to current ChatGPT image snapshot",
|
|
3325
|
+
isActive: true,
|
|
3326
|
+
releaseDate: "2025-12-01",
|
|
3327
|
+
sources: {
|
|
3328
|
+
documentation: "https://developers.openai.com/api/docs/models/chatgpt-image-latest",
|
|
3329
|
+
pricing: "https://openai.com/pricing",
|
|
3330
|
+
lastVerified: "2026-03-14"
|
|
3331
|
+
},
|
|
3332
|
+
capabilities: {
|
|
3333
|
+
sizes: ["1024x1024", "1024x1536", "1536x1024", "auto"],
|
|
3334
|
+
maxImagesPerRequest: 10,
|
|
3335
|
+
outputFormats: ["png", "webp", "jpeg"],
|
|
3336
|
+
features: {
|
|
3337
|
+
generation: true,
|
|
3338
|
+
editing: true,
|
|
3339
|
+
variations: false,
|
|
3340
|
+
styleControl: false,
|
|
3341
|
+
qualityControl: true,
|
|
3342
|
+
transparency: true,
|
|
3343
|
+
promptRevision: false
|
|
3344
|
+
},
|
|
3345
|
+
limits: { maxPromptLength: 32e3 },
|
|
3346
|
+
vendorOptions: {
|
|
3347
|
+
quality: {
|
|
3348
|
+
type: "enum",
|
|
3349
|
+
label: "Quality",
|
|
3350
|
+
description: "Image quality level",
|
|
3351
|
+
enum: ["auto", "low", "medium", "high"],
|
|
3352
|
+
default: "auto",
|
|
3353
|
+
controlType: "select"
|
|
3354
|
+
},
|
|
3355
|
+
background: {
|
|
3356
|
+
type: "enum",
|
|
3357
|
+
label: "Background",
|
|
3358
|
+
description: "Background transparency (requires png or webp)",
|
|
3359
|
+
enum: ["auto", "transparent", "opaque"],
|
|
3360
|
+
default: "auto",
|
|
3361
|
+
controlType: "select"
|
|
3362
|
+
},
|
|
3363
|
+
output_format: {
|
|
3364
|
+
type: "enum",
|
|
3365
|
+
label: "Output Format",
|
|
3366
|
+
description: "Image file format",
|
|
3367
|
+
enum: ["png", "jpeg", "webp"],
|
|
3368
|
+
default: "png",
|
|
3369
|
+
controlType: "select"
|
|
3370
|
+
},
|
|
3371
|
+
output_compression: {
|
|
3372
|
+
type: "number",
|
|
3373
|
+
label: "Compression",
|
|
3374
|
+
description: "Compression level for JPEG/WebP (0-100)",
|
|
3375
|
+
min: 0,
|
|
3376
|
+
max: 100,
|
|
3377
|
+
default: 100,
|
|
3378
|
+
controlType: "slider"
|
|
3379
|
+
},
|
|
3380
|
+
moderation: {
|
|
3381
|
+
type: "enum",
|
|
3382
|
+
label: "Moderation",
|
|
3383
|
+
description: "Content moderation strictness",
|
|
3384
|
+
enum: ["auto", "low"],
|
|
3385
|
+
default: "auto",
|
|
3386
|
+
controlType: "radio"
|
|
3387
|
+
}
|
|
3388
|
+
}
|
|
3389
|
+
},
|
|
3390
|
+
pricing: {
|
|
3391
|
+
perImageStandard: 0.034,
|
|
3392
|
+
// medium quality 1024x1024
|
|
3393
|
+
perImageHD: 0.133,
|
|
3394
|
+
// high quality 1024x1024
|
|
3395
|
+
currency: "USD"
|
|
3396
|
+
}
|
|
3397
|
+
},
|
|
3221
3398
|
"gpt-image-1": {
|
|
3222
3399
|
name: "gpt-image-1",
|
|
3223
|
-
displayName: "GPT
|
|
3400
|
+
displayName: "GPT Image 1",
|
|
3224
3401
|
provider: Vendor.OpenAI,
|
|
3225
|
-
description: "OpenAI
|
|
3402
|
+
description: "Previous generation OpenAI image model. More expensive than GPT Image 1.5",
|
|
3226
3403
|
isActive: true,
|
|
3227
3404
|
releaseDate: "2025-04-01",
|
|
3228
3405
|
sources: {
|
|
3229
|
-
documentation: "https://
|
|
3406
|
+
documentation: "https://developers.openai.com/api/docs/models/gpt-image-1",
|
|
3230
3407
|
pricing: "https://openai.com/pricing",
|
|
3231
|
-
lastVerified: "2026-
|
|
3408
|
+
lastVerified: "2026-03-14"
|
|
3232
3409
|
},
|
|
3233
3410
|
capabilities: {
|
|
3234
3411
|
sizes: ["1024x1024", "1024x1536", "1536x1024", "auto"],
|
|
@@ -3288,9 +3465,89 @@ var IMAGE_MODEL_REGISTRY = {
|
|
|
3288
3465
|
}
|
|
3289
3466
|
}
|
|
3290
3467
|
},
|
|
3468
|
+
pricing: {
|
|
3469
|
+
perImageStandard: 0.042,
|
|
3470
|
+
// medium quality 1024x1024
|
|
3471
|
+
perImageHD: 0.167,
|
|
3472
|
+
// high quality 1024x1024
|
|
3473
|
+
currency: "USD"
|
|
3474
|
+
}
|
|
3475
|
+
},
|
|
3476
|
+
"gpt-image-1-mini": {
|
|
3477
|
+
name: "gpt-image-1-mini",
|
|
3478
|
+
displayName: "GPT Image 1 Mini",
|
|
3479
|
+
provider: Vendor.OpenAI,
|
|
3480
|
+
description: "Cost-efficient version of GPT Image 1. Cheapest OpenAI image model",
|
|
3481
|
+
isActive: true,
|
|
3482
|
+
releaseDate: "2025-06-01",
|
|
3483
|
+
sources: {
|
|
3484
|
+
documentation: "https://developers.openai.com/api/docs/models/gpt-image-1-mini",
|
|
3485
|
+
pricing: "https://openai.com/pricing",
|
|
3486
|
+
lastVerified: "2026-03-14"
|
|
3487
|
+
},
|
|
3488
|
+
capabilities: {
|
|
3489
|
+
sizes: ["1024x1024", "1024x1536", "1536x1024", "auto"],
|
|
3490
|
+
maxImagesPerRequest: 10,
|
|
3491
|
+
outputFormats: ["png", "webp", "jpeg"],
|
|
3492
|
+
features: {
|
|
3493
|
+
generation: true,
|
|
3494
|
+
editing: true,
|
|
3495
|
+
variations: false,
|
|
3496
|
+
styleControl: false,
|
|
3497
|
+
qualityControl: true,
|
|
3498
|
+
transparency: true,
|
|
3499
|
+
promptRevision: false
|
|
3500
|
+
},
|
|
3501
|
+
limits: { maxPromptLength: 32e3 },
|
|
3502
|
+
vendorOptions: {
|
|
3503
|
+
quality: {
|
|
3504
|
+
type: "enum",
|
|
3505
|
+
label: "Quality",
|
|
3506
|
+
description: "Image quality level",
|
|
3507
|
+
enum: ["auto", "low", "medium", "high"],
|
|
3508
|
+
default: "auto",
|
|
3509
|
+
controlType: "select"
|
|
3510
|
+
},
|
|
3511
|
+
background: {
|
|
3512
|
+
type: "enum",
|
|
3513
|
+
label: "Background",
|
|
3514
|
+
description: "Background transparency (requires png or webp)",
|
|
3515
|
+
enum: ["auto", "transparent", "opaque"],
|
|
3516
|
+
default: "auto",
|
|
3517
|
+
controlType: "select"
|
|
3518
|
+
},
|
|
3519
|
+
output_format: {
|
|
3520
|
+
type: "enum",
|
|
3521
|
+
label: "Output Format",
|
|
3522
|
+
description: "Image file format",
|
|
3523
|
+
enum: ["png", "jpeg", "webp"],
|
|
3524
|
+
default: "png",
|
|
3525
|
+
controlType: "select"
|
|
3526
|
+
},
|
|
3527
|
+
output_compression: {
|
|
3528
|
+
type: "number",
|
|
3529
|
+
label: "Compression",
|
|
3530
|
+
description: "Compression level for JPEG/WebP (0-100)",
|
|
3531
|
+
min: 0,
|
|
3532
|
+
max: 100,
|
|
3533
|
+
default: 100,
|
|
3534
|
+
controlType: "slider"
|
|
3535
|
+
},
|
|
3536
|
+
moderation: {
|
|
3537
|
+
type: "enum",
|
|
3538
|
+
label: "Moderation",
|
|
3539
|
+
description: "Content moderation strictness",
|
|
3540
|
+
enum: ["auto", "low"],
|
|
3541
|
+
default: "auto",
|
|
3542
|
+
controlType: "radio"
|
|
3543
|
+
}
|
|
3544
|
+
}
|
|
3545
|
+
},
|
|
3291
3546
|
pricing: {
|
|
3292
3547
|
perImageStandard: 0.011,
|
|
3293
|
-
|
|
3548
|
+
// medium quality 1024x1024
|
|
3549
|
+
perImageHD: 0.036,
|
|
3550
|
+
// high quality 1024x1024
|
|
3294
3551
|
currency: "USD"
|
|
3295
3552
|
}
|
|
3296
3553
|
},
|
|
@@ -3298,8 +3555,8 @@ var IMAGE_MODEL_REGISTRY = {
|
|
|
3298
3555
|
name: "dall-e-3",
|
|
3299
3556
|
displayName: "DALL-E 3",
|
|
3300
3557
|
provider: Vendor.OpenAI,
|
|
3301
|
-
description: "High quality image generation with prompt revision",
|
|
3302
|
-
isActive:
|
|
3558
|
+
description: "Deprecated. High quality image generation with prompt revision. Migrate to gpt-image-1.5",
|
|
3559
|
+
isActive: false,
|
|
3303
3560
|
releaseDate: "2023-11-06",
|
|
3304
3561
|
deprecationDate: "2026-05-12",
|
|
3305
3562
|
sources: {
|
|
@@ -3350,8 +3607,8 @@ var IMAGE_MODEL_REGISTRY = {
|
|
|
3350
3607
|
name: "dall-e-2",
|
|
3351
3608
|
displayName: "DALL-E 2",
|
|
3352
3609
|
provider: Vendor.OpenAI,
|
|
3353
|
-
description: "Fast image generation with editing and variation support",
|
|
3354
|
-
isActive:
|
|
3610
|
+
description: "Deprecated. Fast image generation with editing and variation support. Migrate to gpt-image-1-mini",
|
|
3611
|
+
isActive: false,
|
|
3355
3612
|
releaseDate: "2022-11-03",
|
|
3356
3613
|
deprecationDate: "2026-05-12",
|
|
3357
3614
|
sources: {
|