@automagik/omni 2.260423.1 → 2.260423.3
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/commands/providers.d.ts +34 -0
- package/dist/commands/providers.d.ts.map +1 -1
- package/dist/index.js +32 -22
- package/dist/server/index.js +1285 -545
- package/package.json +10 -9
|
@@ -15,6 +15,40 @@
|
|
|
15
15
|
* omni providers test <id>
|
|
16
16
|
* omni providers delete <id>
|
|
17
17
|
*/
|
|
18
|
+
import type { AgnoAgent, AgnoTeam, AgnoWorkflow } from '@omni/sdk';
|
|
18
19
|
import { Command } from 'commander';
|
|
20
|
+
/**
|
|
21
|
+
* Map agno 2.5+ (`id`) and pre-2.5 (`agent_id`) agent shapes to the list row.
|
|
22
|
+
*/
|
|
23
|
+
declare function mapAgnoAgentRow(a: AgnoAgent): {
|
|
24
|
+
id: string | undefined;
|
|
25
|
+
name: string;
|
|
26
|
+
model: string;
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Map agno 2.5+ (`id`) and pre-2.5 (`team_id`) team shapes to the list row.
|
|
31
|
+
*/
|
|
32
|
+
declare function mapAgnoTeamRow(t: AgnoTeam): {
|
|
33
|
+
id: string | undefined;
|
|
34
|
+
name: string;
|
|
35
|
+
mode: string;
|
|
36
|
+
members: number;
|
|
37
|
+
description: string;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Map agno 2.5+ (`id`) and pre-2.5 (`workflow_id`) workflow shapes to the list row.
|
|
41
|
+
*/
|
|
42
|
+
declare function mapAgnoWorkflowRow(w: AgnoWorkflow): {
|
|
43
|
+
id: string | undefined;
|
|
44
|
+
name: string;
|
|
45
|
+
description: string;
|
|
46
|
+
};
|
|
47
|
+
export declare const __testables: {
|
|
48
|
+
mapAgnoAgentRow: typeof mapAgnoAgentRow;
|
|
49
|
+
mapAgnoTeamRow: typeof mapAgnoTeamRow;
|
|
50
|
+
mapAgnoWorkflowRow: typeof mapAgnoWorkflowRow;
|
|
51
|
+
};
|
|
19
52
|
export declare function createProvidersCommand(): Command;
|
|
53
|
+
export {};
|
|
20
54
|
//# sourceMappingURL=providers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/commands/providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/commands/providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC;;GAEG;AACH,iBAAS,eAAe,CAAC,CAAC,EAAE,SAAS,GAAG;IACtC,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB,CAOA;AAED;;GAEG;AACH,iBAAS,cAAc,CAAC,CAAC,EAAE,QAAQ,GAAG;IACpC,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB,CAQA;AAED;;GAEG;AACH,iBAAS,kBAAkB,CAAC,CAAC,EAAE,YAAY,GAAG;IAC5C,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB,CAMA;AAED,eAAO,MAAM,WAAW;;;;CAIvB,CAAC;AA6TF,wBAAgB,sBAAsB,IAAI,OAAO,CA8IhD"}
|
package/dist/index.js
CHANGED
|
@@ -35076,21 +35076,21 @@ class AgnoClient {
|
|
|
35076
35076
|
]);
|
|
35077
35077
|
const entries = [
|
|
35078
35078
|
...agents.map((a) => ({
|
|
35079
|
-
id: a.agent_id,
|
|
35079
|
+
id: a.id ?? a.agent_id,
|
|
35080
35080
|
name: a.name,
|
|
35081
35081
|
type: "agent",
|
|
35082
35082
|
description: a.description,
|
|
35083
35083
|
metadata: a.model ? { model: a.model } : undefined
|
|
35084
35084
|
})),
|
|
35085
35085
|
...teams.map((t) => ({
|
|
35086
|
-
id: t.team_id,
|
|
35086
|
+
id: t.id ?? t.team_id,
|
|
35087
35087
|
name: t.name,
|
|
35088
35088
|
type: "team",
|
|
35089
35089
|
description: t.description,
|
|
35090
35090
|
metadata: t.mode ? { mode: t.mode, memberCount: t.members?.length } : undefined
|
|
35091
35091
|
})),
|
|
35092
35092
|
...workflows.map((w) => ({
|
|
35093
|
-
id: w.workflow_id,
|
|
35093
|
+
id: w.id ?? w.workflow_id,
|
|
35094
35094
|
name: w.name,
|
|
35095
35095
|
type: "workflow",
|
|
35096
35096
|
description: w.description
|
|
@@ -113839,7 +113839,7 @@ import { fileURLToPath } from "url";
|
|
|
113839
113839
|
// package.json
|
|
113840
113840
|
var package_default = {
|
|
113841
113841
|
name: "@automagik/omni",
|
|
113842
|
-
version: "2.260423.
|
|
113842
|
+
version: "2.260423.3",
|
|
113843
113843
|
description: "LLM-optimized CLI for Omni",
|
|
113844
113844
|
type: "module",
|
|
113845
113845
|
bin: {
|
|
@@ -113880,6 +113880,7 @@ var package_default = {
|
|
|
113880
113880
|
devDependencies: {
|
|
113881
113881
|
"@omni/api": "workspace:*",
|
|
113882
113882
|
"@omni/channel-discord": "workspace:*",
|
|
113883
|
+
"@omni/channel-gupshup": "workspace:*",
|
|
113883
113884
|
"@omni/channel-sdk": "workspace:*",
|
|
113884
113885
|
"@omni/channel-slack": "workspace:*",
|
|
113885
113886
|
"@omni/channel-telegram": "workspace:*",
|
|
@@ -123138,6 +123139,30 @@ function createSetupCommand() {
|
|
|
123138
123139
|
}
|
|
123139
123140
|
|
|
123140
123141
|
// src/commands/providers.ts
|
|
123142
|
+
function mapAgnoAgentRow(a2) {
|
|
123143
|
+
return {
|
|
123144
|
+
id: a2.id ?? a2.agent_id,
|
|
123145
|
+
name: a2.name,
|
|
123146
|
+
model: a2.model?.name ?? "-",
|
|
123147
|
+
description: a2.description?.slice(0, 50) ?? "-"
|
|
123148
|
+
};
|
|
123149
|
+
}
|
|
123150
|
+
function mapAgnoTeamRow(t) {
|
|
123151
|
+
return {
|
|
123152
|
+
id: t.id ?? t.team_id,
|
|
123153
|
+
name: t.name,
|
|
123154
|
+
mode: t.mode ?? "-",
|
|
123155
|
+
members: t.members?.length ?? 0,
|
|
123156
|
+
description: t.description?.slice(0, 50) ?? "-"
|
|
123157
|
+
};
|
|
123158
|
+
}
|
|
123159
|
+
function mapAgnoWorkflowRow(w) {
|
|
123160
|
+
return {
|
|
123161
|
+
id: w.id ?? w.workflow_id,
|
|
123162
|
+
name: w.name,
|
|
123163
|
+
description: w.description?.slice(0, 50) ?? "-"
|
|
123164
|
+
};
|
|
123165
|
+
}
|
|
123141
123166
|
var VALID_SCHEMAS = PROVIDER_SCHEMAS;
|
|
123142
123167
|
var WS_ONLY_SCHEMAS = ["openclaw"];
|
|
123143
123168
|
function validateUrlScheme(schema3, baseUrl) {
|
|
@@ -123400,12 +123425,7 @@ function createProvidersCommand() {
|
|
|
123400
123425
|
const client = getClient();
|
|
123401
123426
|
try {
|
|
123402
123427
|
const agents2 = await client.providers.listAgents(resolvedId);
|
|
123403
|
-
const items = agents2.map(
|
|
123404
|
-
id: a2.agent_id,
|
|
123405
|
-
name: a2.name,
|
|
123406
|
-
model: a2.model?.name ?? "-",
|
|
123407
|
-
description: a2.description?.slice(0, 50) ?? "-"
|
|
123408
|
-
}));
|
|
123428
|
+
const items = agents2.map(mapAgnoAgentRow);
|
|
123409
123429
|
list(items, { emptyMessage: "No agents found." });
|
|
123410
123430
|
} catch (err2) {
|
|
123411
123431
|
const message2 = err2 instanceof Error ? err2.message : "Unknown error";
|
|
@@ -123417,13 +123437,7 @@ function createProvidersCommand() {
|
|
|
123417
123437
|
const client = getClient();
|
|
123418
123438
|
try {
|
|
123419
123439
|
const teams = await client.providers.listTeams(resolvedId);
|
|
123420
|
-
const items = teams.map(
|
|
123421
|
-
id: t.team_id,
|
|
123422
|
-
name: t.name,
|
|
123423
|
-
mode: t.mode ?? "-",
|
|
123424
|
-
members: t.members?.length ?? 0,
|
|
123425
|
-
description: t.description?.slice(0, 50) ?? "-"
|
|
123426
|
-
}));
|
|
123440
|
+
const items = teams.map(mapAgnoTeamRow);
|
|
123427
123441
|
list(items, { emptyMessage: "No teams found." });
|
|
123428
123442
|
} catch (err2) {
|
|
123429
123443
|
const message2 = err2 instanceof Error ? err2.message : "Unknown error";
|
|
@@ -123435,11 +123449,7 @@ function createProvidersCommand() {
|
|
|
123435
123449
|
const client = getClient();
|
|
123436
123450
|
try {
|
|
123437
123451
|
const workflows = await client.providers.listWorkflows(resolvedId);
|
|
123438
|
-
const items = workflows.map(
|
|
123439
|
-
id: w.workflow_id,
|
|
123440
|
-
name: w.name,
|
|
123441
|
-
description: w.description?.slice(0, 50) ?? "-"
|
|
123442
|
-
}));
|
|
123452
|
+
const items = workflows.map(mapAgnoWorkflowRow);
|
|
123443
123453
|
list(items, { emptyMessage: "No workflows found." });
|
|
123444
123454
|
} catch (err2) {
|
|
123445
123455
|
const message2 = err2 instanceof Error ? err2.message : "Unknown error";
|