@saleso.innovations/bridge 0.1.43 → 0.1.44
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/hermesCommands.d.ts.map +1 -1
- package/dist/hermesCommands.js +17 -3
- package/dist/models.d.ts +19 -0
- package/dist/models.d.ts.map +1 -0
- package/dist/models.js +37 -0
- package/dist/profiles.d.ts +5 -1
- package/dist/profiles.d.ts.map +1 -1
- package/dist/profiles.js +35 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hermesCommands.d.ts","sourceRoot":"","sources":["../src/hermesCommands.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAuC,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"hermesCommands.d.ts","sourceRoot":"","sources":["../src/hermesCommands.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAuC,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAehG,eAAO,MAAM,oBAAoB,+yBAgDvB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,iBAAiB,CAE7E;AAED,MAAM,MAAM,sBAAsB,GAC9B,qBAAqB,GACrB,oBAAoB,GACpB,uBAAuB,GACvB,sBAAsB,GACtB,qBAAqB,CAAC;AAE1B,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAC;gBAE1B,IAAI,EAAE,sBAAsB,EAAE,OAAO,EAAE,MAAM;CAI1D;AAkID,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,iBAAiB,EAC1B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,iBAAiB,CAAA;CAAO,GAC9F,OAAO,CAAC,OAAO,CAAC,CA4RlB;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG;IAAE,IAAI,EAAE,sBAAsB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAetG"}
|
package/dist/hermesCommands.js
CHANGED
|
@@ -13,6 +13,7 @@ import { fetchHermesRuntimeVersion } from "./runtimeVersion.js";
|
|
|
13
13
|
import { fetchBridgeRuntimeVersion, fetchInstalledBridgeVersion } from "./bridgeVersion.js";
|
|
14
14
|
import { runBridgeUpdate } from "./update.js";
|
|
15
15
|
import { createHermesProfile, deleteHermesProfile, listHermesProfiles, renameHermesProfile, resolveProfileContext, setHermesProfileModel, } from "./profiles.js";
|
|
16
|
+
import { normalizeModelOptions } from "./models.js";
|
|
16
17
|
import { spawn } from "node:child_process";
|
|
17
18
|
export const HERMES_COMMAND_NAMES = [
|
|
18
19
|
"runtime.health",
|
|
@@ -193,11 +194,24 @@ export async function executeHermesCommand(command, args, options = {}) {
|
|
|
193
194
|
return await fetchHermesRuntimeVersion();
|
|
194
195
|
case "runtime.capabilities":
|
|
195
196
|
return await hermesFetchJson(config, "/v1/capabilities");
|
|
196
|
-
case "models.list":
|
|
197
|
-
|
|
197
|
+
case "models.list": {
|
|
198
|
+
const payload = await hermesFetchJson(config, "/api/model/options");
|
|
199
|
+
return normalizeModelOptions(payload);
|
|
200
|
+
}
|
|
198
201
|
case "model.set": {
|
|
199
202
|
const model = requireString(args, "model");
|
|
200
|
-
|
|
203
|
+
const provider = requireString(args, "provider");
|
|
204
|
+
try {
|
|
205
|
+
await hermesFetchJson(config, "/api/model/set", {
|
|
206
|
+
method: "POST",
|
|
207
|
+
headers: { "content-type": "application/json" },
|
|
208
|
+
body: JSON.stringify({ scope: "main", provider, model }),
|
|
209
|
+
});
|
|
210
|
+
return { ok: true, provider, model };
|
|
211
|
+
}
|
|
212
|
+
catch {
|
|
213
|
+
return await setHermesProfileModel(profileCtx.profile, model, provider);
|
|
214
|
+
}
|
|
201
215
|
}
|
|
202
216
|
case "responses.create": {
|
|
203
217
|
const input = args.input ?? args.prompt;
|
package/dist/models.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type HermesModelOption = {
|
|
2
|
+
provider: string;
|
|
3
|
+
model: string;
|
|
4
|
+
label: string;
|
|
5
|
+
};
|
|
6
|
+
export type HermesModelOptionsPayload = {
|
|
7
|
+
provider: string;
|
|
8
|
+
model: string;
|
|
9
|
+
options: HermesModelOption[];
|
|
10
|
+
providers: Array<{
|
|
11
|
+
slug: string;
|
|
12
|
+
name: string;
|
|
13
|
+
models: string[];
|
|
14
|
+
authenticated: boolean;
|
|
15
|
+
}>;
|
|
16
|
+
};
|
|
17
|
+
/** Normalize GET /api/model/options into a flat picker-friendly payload. */
|
|
18
|
+
export declare function normalizeModelOptions(payload: unknown): HermesModelOptionsPayload;
|
|
19
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,SAAS,EAAE,KAAK,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,EAAE,CAAC;QACjB,aAAa,EAAE,OAAO,CAAC;KACxB,CAAC,CAAC;CACJ,CAAC;AAEF,4EAA4E;AAC5E,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,yBAAyB,CAsCjF"}
|
package/dist/models.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** Normalize GET /api/model/options into a flat picker-friendly payload. */
|
|
2
|
+
export function normalizeModelOptions(payload) {
|
|
3
|
+
const record = payload && typeof payload === "object" ? payload : {};
|
|
4
|
+
const currentModel = typeof record.model === "string" ? record.model.trim() : "";
|
|
5
|
+
const currentProvider = typeof record.provider === "string" ? record.provider.trim() : "";
|
|
6
|
+
const providerRows = Array.isArray(record.providers) ? record.providers : [];
|
|
7
|
+
const options = [];
|
|
8
|
+
const providers = [];
|
|
9
|
+
for (const row of providerRows) {
|
|
10
|
+
if (!row || typeof row !== "object")
|
|
11
|
+
continue;
|
|
12
|
+
const entry = row;
|
|
13
|
+
const slug = typeof entry.slug === "string" ? entry.slug.trim() : "";
|
|
14
|
+
if (!slug)
|
|
15
|
+
continue;
|
|
16
|
+
const authenticated = entry.authenticated !== false;
|
|
17
|
+
const name = typeof entry.name === "string" && entry.name.trim() ? entry.name.trim() : slug;
|
|
18
|
+
const models = Array.isArray(entry.models)
|
|
19
|
+
? entry.models
|
|
20
|
+
.filter((value) => typeof value === "string")
|
|
21
|
+
.map((value) => value.trim())
|
|
22
|
+
.filter((value) => value.length > 0)
|
|
23
|
+
: [];
|
|
24
|
+
providers.push({ slug, name, models, authenticated });
|
|
25
|
+
if (!authenticated || models.length === 0)
|
|
26
|
+
continue;
|
|
27
|
+
for (const model of models) {
|
|
28
|
+
options.push({ provider: slug, model, label: model });
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
provider: currentProvider,
|
|
33
|
+
model: currentModel,
|
|
34
|
+
options,
|
|
35
|
+
providers,
|
|
36
|
+
};
|
|
37
|
+
}
|
package/dist/profiles.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ export declare function profilesRootDir(): string;
|
|
|
12
12
|
export declare function resolveProfileHome(profile?: string | null): string;
|
|
13
13
|
/** Build an env that scopes child `hermes` processes to the given profile. */
|
|
14
14
|
export declare function profileEnv(profile?: string | null): NodeJS.ProcessEnv;
|
|
15
|
+
/** Best-effort parse of `model.provider` from a profile's config.yaml. */
|
|
16
|
+
export declare function readProfileProvider(home: string): string | undefined;
|
|
15
17
|
/** Best-effort parse of `model.default` from a profile's config.yaml. */
|
|
16
18
|
export declare function readProfileModel(home: string): string | undefined;
|
|
17
19
|
export declare function resolveProfileGatewayPort(profile?: string | null): number | undefined;
|
|
@@ -29,6 +31,7 @@ export type HermesProfileEntry = {
|
|
|
29
31
|
isDefault: boolean;
|
|
30
32
|
isActive: boolean;
|
|
31
33
|
model?: string;
|
|
34
|
+
provider?: string;
|
|
32
35
|
gatewayRunning: boolean;
|
|
33
36
|
gatewayPort?: number;
|
|
34
37
|
skillsCount: number;
|
|
@@ -58,9 +61,10 @@ export declare function deleteHermesProfile(name: string): Promise<{
|
|
|
58
61
|
ok: true;
|
|
59
62
|
name: string;
|
|
60
63
|
}>;
|
|
61
|
-
export declare function setHermesProfileModel(profile: string | undefined, model: string): Promise<{
|
|
64
|
+
export declare function setHermesProfileModel(profile: string | undefined, model: string, provider?: string): Promise<{
|
|
62
65
|
ok: true;
|
|
63
66
|
profile: string;
|
|
64
67
|
model: string;
|
|
68
|
+
provider?: string;
|
|
65
69
|
}>;
|
|
66
70
|
//# sourceMappingURL=profiles.d.ts.map
|
package/dist/profiles.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../src/profiles.ts"],"names":[],"mappings":"AAcA,oEAAoE;AACpE,eAAO,MAAM,eAAe,YAAY,CAAC;AAIzC,qBAAa,kBAAmB,SAAQ,KAAK;CAAG;AAEhD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGxD;AAED,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;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAoBrC;AAED,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAAC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAsBzD;AAED,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CA4B3F;AAED,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAwB1E"}
|
package/dist/profiles.js
CHANGED
|
@@ -74,6 +74,30 @@ function readConfigYaml(home) {
|
|
|
74
74
|
return undefined;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
+
/** Best-effort parse of `model.provider` from a profile's config.yaml. */
|
|
78
|
+
export function readProfileProvider(home) {
|
|
79
|
+
const yaml = readConfigYaml(home);
|
|
80
|
+
if (!yaml)
|
|
81
|
+
return undefined;
|
|
82
|
+
let inModelBlock = false;
|
|
83
|
+
for (const line of yaml.split(/\r?\n/)) {
|
|
84
|
+
if (/^model:\s*$/.test(line)) {
|
|
85
|
+
inModelBlock = true;
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
if (inModelBlock) {
|
|
89
|
+
if (/^\S/.test(line)) {
|
|
90
|
+
inModelBlock = false;
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
const match = line.match(/^\s+provider:\s*(.+?)\s*$/);
|
|
94
|
+
if (match?.[1])
|
|
95
|
+
return match[1].trim().replace(/^["']|["']$/g, "");
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return undefined;
|
|
100
|
+
}
|
|
77
101
|
/** Best-effort parse of `model.default` from a profile's config.yaml. */
|
|
78
102
|
export function readProfileModel(home) {
|
|
79
103
|
const yaml = readConfigYaml(home);
|
|
@@ -283,6 +307,7 @@ export async function listHermesProfiles() {
|
|
|
283
307
|
isDefault: name === DEFAULT_PROFILE,
|
|
284
308
|
isActive: active,
|
|
285
309
|
model: readProfileModel(home),
|
|
310
|
+
provider: readProfileProvider(home),
|
|
286
311
|
gatewayRunning: running,
|
|
287
312
|
gatewayPort: resolveProfileGatewayPort(name),
|
|
288
313
|
skillsCount: skillsCountForHome(home),
|
|
@@ -389,19 +414,27 @@ export async function deleteHermesProfile(name) {
|
|
|
389
414
|
}
|
|
390
415
|
}
|
|
391
416
|
}
|
|
392
|
-
export async function setHermesProfileModel(profile, model) {
|
|
417
|
+
export async function setHermesProfileModel(profile, model, provider) {
|
|
393
418
|
const name = normalizeProfileName(profile);
|
|
394
419
|
const trimmedModel = model.trim();
|
|
420
|
+
const trimmedProvider = provider?.trim();
|
|
395
421
|
if (!trimmedModel) {
|
|
396
422
|
throw new HermesProfileError('Missing "model".');
|
|
397
423
|
}
|
|
398
424
|
try {
|
|
425
|
+
if (trimmedProvider) {
|
|
426
|
+
await execFileAsync("hermes", ["config", "set", "model.provider", trimmedProvider], {
|
|
427
|
+
timeout: PROFILE_TIMEOUT_MS,
|
|
428
|
+
maxBuffer: MAX_OUTPUT_BYTES,
|
|
429
|
+
env: profileEnv(name),
|
|
430
|
+
});
|
|
431
|
+
}
|
|
399
432
|
await execFileAsync("hermes", ["config", "set", "model.default", trimmedModel], {
|
|
400
433
|
timeout: PROFILE_TIMEOUT_MS,
|
|
401
434
|
maxBuffer: MAX_OUTPUT_BYTES,
|
|
402
435
|
env: profileEnv(name),
|
|
403
436
|
});
|
|
404
|
-
return { ok: true, profile: name, model: trimmedModel };
|
|
437
|
+
return { ok: true, profile: name, model: trimmedModel, provider: trimmedProvider };
|
|
405
438
|
}
|
|
406
439
|
catch (error) {
|
|
407
440
|
throw new HermesProfileError(execFailureMessage(error, "Could not set the model for this profile."));
|