@agentproto/catalog-sync 0.6.0 → 0.6.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/bin.mjs +40 -6
- package/dist/bin.mjs.map +1 -1
- package/dist/index.mjs +40 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/snapshots/image-replicate.json +32678 -125
- package/snapshots/llm-huggingface.json +2312 -2420
- package/snapshots/llm-mistral.json +152 -252
- package/snapshots/llm-moonshot.json +25 -25
- package/snapshots/llm-opencode-go.json +41 -16
- package/snapshots/llm-opencode-zen.json +42 -18
- package/snapshots/llm-openrouter.json +3548 -3943
- package/snapshots/llm-xai.json +66 -3
- package/snapshots/voice-elevenlabs.json +5670 -5670
package/dist/bin.mjs
CHANGED
|
@@ -1015,8 +1015,28 @@ var voiceMinimax = defineGenerator({
|
|
|
1015
1015
|
};
|
|
1016
1016
|
}
|
|
1017
1017
|
});
|
|
1018
|
-
|
|
1019
|
-
|
|
1018
|
+
var ReplicateModelSchema = z.object({
|
|
1019
|
+
owner: z.string(),
|
|
1020
|
+
name: z.string(),
|
|
1021
|
+
description: z.string().nullable(),
|
|
1022
|
+
visibility: z.string(),
|
|
1023
|
+
run_count: z.number(),
|
|
1024
|
+
cover_image_url: z.string().nullable(),
|
|
1025
|
+
latest_version: z.object({
|
|
1026
|
+
id: z.string(),
|
|
1027
|
+
created_at: z.string(),
|
|
1028
|
+
openapi_schema: z.any()
|
|
1029
|
+
})
|
|
1030
|
+
}).passthrough();
|
|
1031
|
+
var ReplicateSnapshotSchema = z.object({
|
|
1032
|
+
// DRF-paginated shape (live API)
|
|
1033
|
+
results: z.array(ReplicateModelSchema).optional(),
|
|
1034
|
+
next: z.string().nullable().optional(),
|
|
1035
|
+
previous: z.string().nullable().optional(),
|
|
1036
|
+
// Hand-authored fixture shape (committed snapshot)
|
|
1037
|
+
_meta: z.record(z.string(), z.unknown()).optional(),
|
|
1038
|
+
models: z.array(ReplicateModelSchema).optional()
|
|
1039
|
+
}).passthrough();
|
|
1020
1040
|
var PRICING = {
|
|
1021
1041
|
"nano-banana-pro": { costPerImage: 0.15, costTier: "high", baseCost: 0.15, creditCost: 10 },
|
|
1022
1042
|
"nano-banana-2": { costPerImage: 0.06, costTier: "medium", baseCost: 0.06, creditCost: 5 },
|
|
@@ -1230,14 +1250,14 @@ function mapModel(raw) {
|
|
|
1230
1250
|
...pricing.creditCost !== void 0 ? { creditCost: pricing.creditCost } : {},
|
|
1231
1251
|
...pricing.overrideCreditCost !== void 0 ? { overrideCreditCost: pricing.overrideCreditCost } : {}
|
|
1232
1252
|
},
|
|
1233
|
-
description: raw.description,
|
|
1253
|
+
description: raw.description ?? "",
|
|
1234
1254
|
agentVisible: AGENT_VISIBLE.has(raw.name),
|
|
1235
1255
|
...spec.triggerWord ? { triggerWord: spec.triggerWord } : {}
|
|
1236
1256
|
};
|
|
1237
1257
|
}
|
|
1238
1258
|
var REPLICATE_SOURCE = {
|
|
1239
1259
|
id: "image-replicate",
|
|
1240
|
-
url: "https://api.replicate.com/v1/
|
|
1260
|
+
url: "https://api.replicate.com/v1/collections/text-to-image",
|
|
1241
1261
|
headers: { Authorization: "Bearer env:REPLICATE_API_TOKEN" }
|
|
1242
1262
|
};
|
|
1243
1263
|
var imageReplicate = defineGenerator({
|
|
@@ -1245,8 +1265,22 @@ var imageReplicate = defineGenerator({
|
|
|
1245
1265
|
modality: "image",
|
|
1246
1266
|
sources: [REPLICATE_SOURCE],
|
|
1247
1267
|
async generate(ctx) {
|
|
1248
|
-
const
|
|
1249
|
-
const
|
|
1268
|
+
const raw = await ctx.fetchSource(REPLICATE_SOURCE);
|
|
1269
|
+
const data = ReplicateSnapshotSchema.parse(raw);
|
|
1270
|
+
const models = data.results ?? data.models;
|
|
1271
|
+
if (!models) {
|
|
1272
|
+
throw new Error(
|
|
1273
|
+
"Replicate snapshot has neither `results` nor `models` array \u2014 invalid shape"
|
|
1274
|
+
);
|
|
1275
|
+
}
|
|
1276
|
+
const curatedModels = models.filter((m) => MODEL_SPECS[m.name]);
|
|
1277
|
+
if (curatedModels.length === 0) {
|
|
1278
|
+
const sampleNames = [...AGENT_VISIBLE].slice(0, 3).join(", ");
|
|
1279
|
+
throw new Error(
|
|
1280
|
+
`image:replicate: none of the curated models (${sampleNames}\u2026) present in source payload (${models.length} entries) \u2014 API shape or roster drift`
|
|
1281
|
+
);
|
|
1282
|
+
}
|
|
1283
|
+
const entries = curatedModels.map(mapModel);
|
|
1250
1284
|
const lines = [
|
|
1251
1285
|
"// Generated by @agentproto/catalog-sync generator image:replicate",
|
|
1252
1286
|
"// DO NOT EDIT MANUALLY \u2014 regenerate with catalog-sync",
|