@exellix/graph-composer 2.2.0 → 2.3.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphModelLayers.d.ts","sourceRoot":"","sources":["../src/graphModelLayers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"graphModelLayers.d.ts","sourceRoot":"","sources":["../src/graphModelLayers.ts"],"names":[],"mappings":"AAcA,mGAAmG;AACnG,MAAM,MAAM,qBAAqB,GAC7B,2BAA2B,GAC3B,oCAAoC,GACpC,qBAAqB,GACrB,mBAAmB,GACnB,sBAAsB,CAAC;AAE3B,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,GAAG,YAAY,GAAG,iBAAiB,CAAC;AAEvF,yGAAyG;AACzG,MAAM,MAAM,wBAAwB,GAAG;IACrC,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,+CAA+C;IAC/C,MAAM,EAAE,qBAAqB,CAAC;IAC9B,kEAAkE;IAClE,UAAU,EAAE,MAAM,CAAC;IACnB,sEAAsE;IACtE,UAAU,EAAE,MAAM,CAAC;IACnB,iEAAiE;IACjE,UAAU,EAAE,MAAM,CAAC;IACnB,8FAA8F;IAC9F,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,wBAAwB,CAAC;IACnC,2EAA2E;IAC3E,WAAW,CAAC,EAAE,wBAAwB,CAAC;IACvC,0FAA0F;IAC1F,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,IAAI,CACX,yBAAyB,EACzB,QAAQ,GAAG,YAAY,GAAG,YAA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B,4BAA4B,CAAC,CAAC,SAAS,MAAM,EACjE,KAAK,EAAE,CAAC,EACR,OAAO,CAAC,EAAE,8BAA8B,GACvC,OAAO,CAAC,CAAC,CAAC,CAyCZ;AAED,sFAAsF;AACtF,wBAAsB,4BAA4B,CAChD,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAWpF"}
|
package/dist/graphModelLayers.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* which precedence layer wins, and resolved provider ids — without forcing runtime overrides.
|
|
4
4
|
*/
|
|
5
5
|
import { resolveAIProfile } from "@x12i/ai-profiles";
|
|
6
|
-
import { DEFAULT_GRAPH_AI_MODEL_PROFILE_CONFIG, isGraphAiModelConfig, isModelConfigSelection, resolveGraphAiModelConfig, } from "./graphEngineBridge.js";
|
|
6
|
+
import { DEFAULT_GRAPH_AI_MODEL_PROFILE_CONFIG, isGraphAiModelConfig, isModelConfigSelection, looksLikeConcreteModelId, resolveGraphAiModelConfig, } from "./graphEngineBridge.js";
|
|
7
7
|
import { DEFAULT_LOCAL_SKILL_KEYS } from "./aiTaskProfile.js";
|
|
8
8
|
const LAYER_META = {
|
|
9
9
|
"runtime.nodes.modelConfig": {
|
|
@@ -91,8 +91,33 @@ function describeModelConfigTier(value, basePath) {
|
|
|
91
91
|
}
|
|
92
92
|
return { sourcePath: basePath, conditionalNote: "could not read modelConfig from cases" };
|
|
93
93
|
}
|
|
94
|
+
const profileProviderIdCache = new Map();
|
|
95
|
+
async function resolveProfileNameToProviderId(profileName) {
|
|
96
|
+
const trimmed = profileName.trim();
|
|
97
|
+
if (looksLikeConcreteModelId(trimmed)) {
|
|
98
|
+
return trimmed;
|
|
99
|
+
}
|
|
100
|
+
const cached = profileProviderIdCache.get(trimmed);
|
|
101
|
+
if (cached !== undefined)
|
|
102
|
+
return cached;
|
|
103
|
+
const resolved = await resolveAIProfile(trimmed, {
|
|
104
|
+
source: "bundled",
|
|
105
|
+
catalogLane: "text",
|
|
106
|
+
});
|
|
107
|
+
const formatted = resolved.modelId.includes("/")
|
|
108
|
+
? resolved.modelId
|
|
109
|
+
: `${resolved.provider}/${resolved.modelId}`;
|
|
110
|
+
profileProviderIdCache.set(trimmed, formatted);
|
|
111
|
+
return formatted;
|
|
112
|
+
}
|
|
94
113
|
async function resolveProviderTriple(profiles, context) {
|
|
95
|
-
|
|
114
|
+
const normalized = await resolveGraphAiModelConfig(profiles, context);
|
|
115
|
+
const [preActionModel, skillModel, postActionModel] = await Promise.all([
|
|
116
|
+
resolveProfileNameToProviderId(normalized.preActionModel),
|
|
117
|
+
resolveProfileNameToProviderId(normalized.skillModel),
|
|
118
|
+
resolveProfileNameToProviderId(normalized.postActionModel),
|
|
119
|
+
]);
|
|
120
|
+
return { preActionModel, skillModel, postActionModel };
|
|
96
121
|
}
|
|
97
122
|
function buildStackEntry(source, sourcePath, profiles, active, conditionalNote, providerIds) {
|
|
98
123
|
if (profiles === undefined)
|
|
@@ -309,14 +334,14 @@ export async function stampGraphModelLayersOnGraph(graph, options) {
|
|
|
309
334
|
}
|
|
310
335
|
/** Resolve a single profile name to provider/model id (for docs and explain text). */
|
|
311
336
|
export async function resolveGraphModelProfileName(profileName) {
|
|
312
|
-
const
|
|
313
|
-
const
|
|
314
|
-
|
|
315
|
-
|
|
337
|
+
const formatted = await resolveProfileNameToProviderId(profileName);
|
|
338
|
+
const slash = formatted.indexOf("/");
|
|
339
|
+
const provider = slash >= 0 ? formatted.slice(0, slash) : formatted;
|
|
340
|
+
const modelId = slash >= 0 ? formatted.slice(slash + 1) : formatted;
|
|
316
341
|
return {
|
|
317
|
-
profile:
|
|
318
|
-
provider
|
|
319
|
-
modelId
|
|
342
|
+
profile: profileName.trim(),
|
|
343
|
+
provider,
|
|
344
|
+
modelId,
|
|
320
345
|
formatted,
|
|
321
346
|
};
|
|
322
347
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exellix/graph-composer",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
},
|
|
64
64
|
"homepage": "https://github.com/woroces/graph-composer#readme",
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"@exellix/graph-engine": "^7.
|
|
66
|
+
"@exellix/graph-engine": "^7.6.0"
|
|
67
67
|
},
|
|
68
68
|
"peerDependenciesMeta": {
|
|
69
69
|
"@exellix/graph-engine": {
|
|
@@ -71,14 +71,14 @@
|
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@x12i/ai-profiles": "^
|
|
74
|
+
"@x12i/ai-profiles": "^2.0.1",
|
|
75
75
|
"@x12i/catalox": "^5.1.3",
|
|
76
76
|
"@x12i/env": "^4.0.1",
|
|
77
|
-
"@x12i/funcx": "^4.3.
|
|
77
|
+
"@x12i/funcx": "^4.3.2",
|
|
78
78
|
"@x12i/logxer": "^4.6.0"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
|
-
"@exellix/graph-engine": "^7.
|
|
81
|
+
"@exellix/graph-engine": "^7.6.0",
|
|
82
82
|
"@types/node": "^22.10.2",
|
|
83
83
|
"nx-config2": "^3.6.5",
|
|
84
84
|
"tsx": "^4.19.2",
|