@x12i/ai-profiles 1.0.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/LICENSE +21 -0
- package/README.md +136 -0
- package/dist/buildResolvedProfile.d.ts +13 -0
- package/dist/buildResolvedProfile.d.ts.map +1 -0
- package/dist/buildResolvedProfile.js +70 -0
- package/dist/buildResolvedProfile.js.map +1 -0
- package/dist/constants.d.ts +9 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +19 -0
- package/dist/constants.js.map +1 -0
- package/dist/data/models-profiles.json +611 -0
- package/dist/data/profiles-shortcuts.json +86 -0
- package/dist/errors.d.ts +7 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +11 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/listAIProfiles.d.ts +3 -0
- package/dist/listAIProfiles.d.ts.map +1 -0
- package/dist/listAIProfiles.js +37 -0
- package/dist/listAIProfiles.js.map +1 -0
- package/dist/loader/combineRegistry.d.ts +3 -0
- package/dist/loader/combineRegistry.d.ts.map +1 -0
- package/dist/loader/combineRegistry.js +14 -0
- package/dist/loader/combineRegistry.js.map +1 -0
- package/dist/loader/fetchJson.d.ts +2 -0
- package/dist/loader/fetchJson.d.ts.map +1 -0
- package/dist/loader/fetchJson.js +29 -0
- package/dist/loader/fetchJson.js.map +1 -0
- package/dist/loader/loadAIProfilesRegistry.d.ts +4 -0
- package/dist/loader/loadAIProfilesRegistry.d.ts.map +1 -0
- package/dist/loader/loadAIProfilesRegistry.js +68 -0
- package/dist/loader/loadAIProfilesRegistry.js.map +1 -0
- package/dist/loader/loadBundledRegistry.d.ts +3 -0
- package/dist/loader/loadBundledRegistry.d.ts.map +1 -0
- package/dist/loader/loadBundledRegistry.js +22 -0
- package/dist/loader/loadBundledRegistry.js.map +1 -0
- package/dist/loader/loadRemoteRegistry.d.ts +3 -0
- package/dist/loader/loadRemoteRegistry.d.ts.map +1 -0
- package/dist/loader/loadRemoteRegistry.js +27 -0
- package/dist/loader/loadRemoteRegistry.js.map +1 -0
- package/dist/loader/memoryCache.d.ts +13 -0
- package/dist/loader/memoryCache.d.ts.map +1 -0
- package/dist/loader/memoryCache.js +17 -0
- package/dist/loader/memoryCache.js.map +1 -0
- package/dist/normalizeKey.d.ts +2 -0
- package/dist/normalizeKey.d.ts.map +1 -0
- package/dist/normalizeKey.js +4 -0
- package/dist/normalizeKey.js.map +1 -0
- package/dist/resolveAIProfile.d.ts +3 -0
- package/dist/resolveAIProfile.d.ts.map +1 -0
- package/dist/resolveAIProfile.js +53 -0
- package/dist/resolveAIProfile.js.map +1 -0
- package/dist/types.d.ts +151 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/validation/validateModelsProfilesJson.d.ts +4 -0
- package/dist/validation/validateModelsProfilesJson.d.ts.map +1 -0
- package/dist/validation/validateModelsProfilesJson.js +93 -0
- package/dist/validation/validateModelsProfilesJson.js.map +1 -0
- package/package.json +65 -0
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AIProfileDefinition, ModelsProfilesJson, ProfilesShortcutsJson } from "../types.js";
|
|
2
|
+
export declare function validateModelsProfilesJson(value: unknown): ModelsProfilesJson;
|
|
3
|
+
export declare function validateProfilesShortcutsJson(value: unknown, profiles: Record<string, AIProfileDefinition>): ProfilesShortcutsJson;
|
|
4
|
+
//# sourceMappingURL=validateModelsProfilesJson.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateModelsProfilesJson.d.ts","sourceRoot":"","sources":["../../src/validation/validateModelsProfilesJson.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,aAAa,CAAC;AAmGrB,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CA8C7E;AAED,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,GAC5C,qBAAqB,CAmEvB"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { AIProfilesError } from "../errors.js";
|
|
2
|
+
import { MODELS_PROFILES_SCHEMA, PROFILES_SHORTCUTS_SCHEMA, } from "../constants.js";
|
|
3
|
+
function isRecord(value) {
|
|
4
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5
|
+
}
|
|
6
|
+
function requireString(value, field, context) {
|
|
7
|
+
if (typeof value !== "string" || value.trim() === "") {
|
|
8
|
+
throw new AIProfilesError("REGISTRY_VALIDATION_FAILED", `Missing or invalid ${field} in ${context}`, { field, context });
|
|
9
|
+
}
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
12
|
+
function validateChoice(choiceKey, choice, profileKey) {
|
|
13
|
+
if (!isRecord(choice)) {
|
|
14
|
+
throw new AIProfilesError("REGISTRY_VALIDATION_FAILED", `Invalid choice '${choiceKey}' for profile '${profileKey}'`, { profile: profileKey, choice: choiceKey });
|
|
15
|
+
}
|
|
16
|
+
requireString(choice.choice, "choice", `profile '${profileKey}' choice '${choiceKey}'`);
|
|
17
|
+
requireString(choice.displayName, "displayName", `profile '${profileKey}' choice '${choiceKey}'`);
|
|
18
|
+
requireString(choice.description, "description", `profile '${profileKey}' choice '${choiceKey}'`);
|
|
19
|
+
requireString(choice.provider, "provider", `profile '${profileKey}' choice '${choiceKey}'`);
|
|
20
|
+
requireString(choice.modelId, "modelId", `profile '${profileKey}' choice '${choiceKey}'`);
|
|
21
|
+
}
|
|
22
|
+
function validateProfile(profileKey, profile) {
|
|
23
|
+
if (!isRecord(profile)) {
|
|
24
|
+
throw new AIProfilesError("REGISTRY_VALIDATION_FAILED", `Invalid profile '${profileKey}'`, { profile: profileKey });
|
|
25
|
+
}
|
|
26
|
+
requireString(profile.profile, "profile", `profile '${profileKey}'`);
|
|
27
|
+
requireString(profile.displayName, "displayName", `profile '${profileKey}'`);
|
|
28
|
+
requireString(profile.description, "description", `profile '${profileKey}'`);
|
|
29
|
+
requireString(profile.category, "category", `profile '${profileKey}'`);
|
|
30
|
+
requireString(profile.defaultChoice, "defaultChoice", `profile '${profileKey}'`);
|
|
31
|
+
if (!isRecord(profile.choices)) {
|
|
32
|
+
throw new AIProfilesError("REGISTRY_VALIDATION_FAILED", `Missing choices for profile '${profileKey}'`, { profile: profileKey });
|
|
33
|
+
}
|
|
34
|
+
const defaultChoice = profile.defaultChoice;
|
|
35
|
+
if (!profile.choices[defaultChoice]) {
|
|
36
|
+
throw new AIProfilesError("REGISTRY_VALIDATION_FAILED", `Profile '${profileKey}' defaultChoice '${defaultChoice}' does not exist`, { profile: profileKey, defaultChoice });
|
|
37
|
+
}
|
|
38
|
+
for (const [choiceKey, choice] of Object.entries(profile.choices)) {
|
|
39
|
+
validateChoice(choiceKey, choice, profileKey);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export function validateModelsProfilesJson(value) {
|
|
43
|
+
if (!isRecord(value)) {
|
|
44
|
+
throw new AIProfilesError("REGISTRY_VALIDATION_FAILED", "models-profiles.json must be an object");
|
|
45
|
+
}
|
|
46
|
+
if (value.schema !== MODELS_PROFILES_SCHEMA) {
|
|
47
|
+
throw new AIProfilesError(value.schema ? "REGISTRY_SCHEMA_UNSUPPORTED" : "REGISTRY_VALIDATION_FAILED", `Unsupported or missing models-profiles schema: ${String(value.schema)}`, { schema: value.schema });
|
|
48
|
+
}
|
|
49
|
+
requireString(value.version, "version", "models-profiles.json");
|
|
50
|
+
if (value.currency !== "USD") {
|
|
51
|
+
throw new AIProfilesError("REGISTRY_VALIDATION_FAILED", "models-profiles.json currency must be USD", { currency: value.currency });
|
|
52
|
+
}
|
|
53
|
+
if (value.pricingUnit !== "1M_tokens") {
|
|
54
|
+
throw new AIProfilesError("REGISTRY_VALIDATION_FAILED", "models-profiles.json pricingUnit must be 1M_tokens", { pricingUnit: value.pricingUnit });
|
|
55
|
+
}
|
|
56
|
+
if (!isRecord(value.profiles)) {
|
|
57
|
+
throw new AIProfilesError("REGISTRY_VALIDATION_FAILED", "models-profiles.json profiles must be an object");
|
|
58
|
+
}
|
|
59
|
+
for (const [profileKey, profile] of Object.entries(value.profiles)) {
|
|
60
|
+
validateProfile(profileKey, profile);
|
|
61
|
+
}
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
export function validateProfilesShortcutsJson(value, profiles) {
|
|
65
|
+
if (!isRecord(value)) {
|
|
66
|
+
throw new AIProfilesError("REGISTRY_VALIDATION_FAILED", "profiles-shortcuts.json must be an object");
|
|
67
|
+
}
|
|
68
|
+
if (value.schema !== PROFILES_SHORTCUTS_SCHEMA) {
|
|
69
|
+
throw new AIProfilesError(value.schema ? "REGISTRY_SCHEMA_UNSUPPORTED" : "REGISTRY_VALIDATION_FAILED", `Unsupported or missing profiles-shortcuts schema: ${String(value.schema)}`, { schema: value.schema });
|
|
70
|
+
}
|
|
71
|
+
requireString(value.version, "version", "profiles-shortcuts.json");
|
|
72
|
+
if (!isRecord(value.shortcuts)) {
|
|
73
|
+
throw new AIProfilesError("REGISTRY_VALIDATION_FAILED", "profiles-shortcuts.json shortcuts must be an object");
|
|
74
|
+
}
|
|
75
|
+
for (const [shortcutKey, shortcut] of Object.entries(value.shortcuts)) {
|
|
76
|
+
if (!isRecord(shortcut)) {
|
|
77
|
+
throw new AIProfilesError("REGISTRY_VALIDATION_FAILED", `Invalid shortcut '${shortcutKey}'`, { shortcut: shortcutKey });
|
|
78
|
+
}
|
|
79
|
+
const profileKey = requireString(shortcut.profile, "profile", `shortcut '${shortcutKey}'`);
|
|
80
|
+
const profile = profiles[profileKey];
|
|
81
|
+
if (!profile) {
|
|
82
|
+
throw new AIProfilesError("REGISTRY_VALIDATION_FAILED", `Shortcut '${shortcutKey}' references unknown profile '${profileKey}'`, { shortcut: shortcutKey, profile: profileKey });
|
|
83
|
+
}
|
|
84
|
+
if (shortcut.choice !== undefined) {
|
|
85
|
+
const choiceKey = requireString(shortcut.choice, "choice", `shortcut '${shortcutKey}'`);
|
|
86
|
+
if (!profile.choices[choiceKey]) {
|
|
87
|
+
throw new AIProfilesError("REGISTRY_VALIDATION_FAILED", `Shortcut '${shortcutKey}' references unknown choice '${choiceKey}' for profile '${profileKey}'`, { shortcut: shortcutKey, profile: profileKey, choice: choiceKey });
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return value;
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=validateModelsProfilesJson.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateModelsProfilesJson.js","sourceRoot":"","sources":["../../src/validation/validateModelsProfilesJson.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EACL,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,iBAAiB,CAAC;AAOzB,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,aAAa,CACpB,KAAc,EACd,KAAa,EACb,OAAe;IAEf,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACrD,MAAM,IAAI,eAAe,CACvB,4BAA4B,EAC5B,sBAAsB,KAAK,OAAO,OAAO,EAAE,EAC3C,EAAE,KAAK,EAAE,OAAO,EAAE,CACnB,CAAC;IACJ,CAAC;IAED,O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gBAChC,MAAM,IAAI,eAAe,CACvB,4BAA4B,EAC5B,aAAa,WAAW,gCAAgC,SAAS,kBAAkB,UAAU,GAAG,EAChG,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,CAClE,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,KAAyC,CAAC;AACnD,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@x12i/ai-profiles",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Resolve AI profile names into concrete model choices with bundled defaults and remote JSON refresh",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md",
|
|
18
|
+
"LICENSE"
|
|
19
|
+
],
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsc && node scripts/copy-data.mjs",
|
|
23
|
+
"test": "npm run build && vitest run",
|
|
24
|
+
"test:unit": "vitest run --exclude 'test/{integration,exports}.test.ts'",
|
|
25
|
+
"test:integration": "npm run build && vitest run test/integration.test.ts test/exports.test.ts",
|
|
26
|
+
"test:watch": "vitest",
|
|
27
|
+
"prepack": "npm run build",
|
|
28
|
+
"prepublishOnly": "npm test",
|
|
29
|
+
"pack:check": "npm pack --dry-run",
|
|
30
|
+
"publish:public": "npm publish --access public"
|
|
31
|
+
},
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public",
|
|
34
|
+
"registry": "https://registry.npmjs.org/"
|
|
35
|
+
},
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "git+https://github.com/x12i/ai-profiles.git"
|
|
39
|
+
},
|
|
40
|
+
"bugs": {
|
|
41
|
+
"url": "https://github.com/x12i/ai-profiles/issues"
|
|
42
|
+
},
|
|
43
|
+
"homepage": "https://github.com/x12i/ai-profiles#readme",
|
|
44
|
+
"keywords": [
|
|
45
|
+
"ai",
|
|
46
|
+
"profiles",
|
|
47
|
+
"models",
|
|
48
|
+
"llm",
|
|
49
|
+
"x12i",
|
|
50
|
+
"model-selection",
|
|
51
|
+
"gemini",
|
|
52
|
+
"openai",
|
|
53
|
+
"anthropic"
|
|
54
|
+
],
|
|
55
|
+
"author": "x12i",
|
|
56
|
+
"license": "MIT",
|
|
57
|
+
"engines": {
|
|
58
|
+
"node": ">=18"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@types/node": "^22.15.21",
|
|
62
|
+
"typescript": "^5.8.3",
|
|
63
|
+
"vitest": "^3.1.4"
|
|
64
|
+
}
|
|
65
|
+
}
|