@navai/voice-frontend 0.1.3 → 0.1.6

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/index.d.cts CHANGED
@@ -29,6 +29,45 @@ type NavaiRoute = {
29
29
  declare function resolveNavaiRoute(input: string, routes?: NavaiRoute[]): string | null;
30
30
  declare function getNavaiRoutePromptLines(routes?: NavaiRoute[]): string[];
31
31
 
32
+ type NavaiFrontendEnv$2 = Record<string, unknown>;
33
+ type NavaiAgentModuleConfig = {
34
+ key?: string;
35
+ name?: string;
36
+ description?: string;
37
+ handoffDescription?: string;
38
+ instructions?: string;
39
+ isPrimary?: boolean;
40
+ };
41
+ type NavaiRuntimeAgentConfig = {
42
+ key: string;
43
+ name: string;
44
+ description?: string;
45
+ handoffDescription?: string;
46
+ instructions?: string;
47
+ isPrimary: boolean;
48
+ functionModuleLoaders: NavaiFunctionModuleLoaders;
49
+ };
50
+ type ResolveNavaiFrontendRuntimeConfigOptions = {
51
+ moduleLoaders: NavaiFunctionModuleLoaders;
52
+ defaultRoutes: NavaiRoute[];
53
+ env?: NavaiFrontendEnv$2;
54
+ routesFile?: string;
55
+ functionsFolders?: string;
56
+ agentsFolders?: string;
57
+ modelOverride?: string;
58
+ defaultRoutesFile?: string;
59
+ defaultFunctionsFolder?: string;
60
+ };
61
+ type ResolveNavaiFrontendRuntimeConfigResult = {
62
+ routes: NavaiRoute[];
63
+ functionModuleLoaders: NavaiFunctionModuleLoaders;
64
+ agents: NavaiRuntimeAgentConfig[];
65
+ primaryAgentKey?: string;
66
+ modelOverride?: string;
67
+ warnings: string[];
68
+ };
69
+ declare function resolveNavaiFrontendRuntimeConfig(options: ResolveNavaiFrontendRuntimeConfigOptions): Promise<ResolveNavaiFrontendRuntimeConfigResult>;
70
+
32
71
  type NavaiBackendFunctionDefinition = {
33
72
  name: string;
34
73
  description?: string;
@@ -42,6 +81,8 @@ type ExecuteNavaiBackendFunction = (input: ExecuteNavaiBackendFunctionInput) =>
42
81
  type BuildNavaiAgentOptions = NavaiFunctionContext & {
43
82
  routes: NavaiRoute[];
44
83
  functionModuleLoaders?: NavaiFunctionModuleLoaders;
84
+ agents?: NavaiRuntimeAgentConfig[];
85
+ primaryAgentKey?: string;
45
86
  backendFunctions?: NavaiBackendFunctionDefinition[];
46
87
  executeBackendFunction?: ExecuteNavaiBackendFunction;
47
88
  agentName?: string;
@@ -53,7 +94,7 @@ type BuildNavaiAgentResult = {
53
94
  };
54
95
  declare function buildNavaiAgent(options: BuildNavaiAgentOptions): Promise<BuildNavaiAgentResult>;
55
96
 
56
- type NavaiFrontendEnv$2 = Record<string, string | undefined>;
97
+ type NavaiFrontendEnv$1 = Record<string, string | undefined>;
57
98
  type CreateClientSecretInput = {
58
99
  model?: string;
59
100
  voice?: string;
@@ -73,7 +114,7 @@ type BackendFunctionsResult = {
73
114
  };
74
115
  type CreateNavaiBackendClientOptions = {
75
116
  apiBaseUrl?: string;
76
- env?: NavaiFrontendEnv$2;
117
+ env?: NavaiFrontendEnv$1;
77
118
  fetchImpl?: typeof fetch;
78
119
  clientSecretPath?: string;
79
120
  functionsListPath?: string;
@@ -86,25 +127,6 @@ type NavaiBackendClient = {
86
127
  };
87
128
  declare function createNavaiBackendClient(options?: CreateNavaiBackendClientOptions): NavaiBackendClient;
88
129
 
89
- type NavaiFrontendEnv$1 = Record<string, unknown>;
90
- type ResolveNavaiFrontendRuntimeConfigOptions = {
91
- moduleLoaders: NavaiFunctionModuleLoaders;
92
- defaultRoutes: NavaiRoute[];
93
- env?: NavaiFrontendEnv$1;
94
- routesFile?: string;
95
- functionsFolders?: string;
96
- modelOverride?: string;
97
- defaultRoutesFile?: string;
98
- defaultFunctionsFolder?: string;
99
- };
100
- type ResolveNavaiFrontendRuntimeConfigResult = {
101
- routes: NavaiRoute[];
102
- functionModuleLoaders: NavaiFunctionModuleLoaders;
103
- modelOverride?: string;
104
- warnings: string[];
105
- };
106
- declare function resolveNavaiFrontendRuntimeConfig(options: ResolveNavaiFrontendRuntimeConfigOptions): Promise<ResolveNavaiFrontendRuntimeConfigResult>;
107
-
108
130
  type VoiceStatus = "idle" | "connecting" | "connected" | "error";
109
131
  type AgentVoiceState = "idle" | "speaking";
110
132
  type NavaiFrontendEnv = Record<string, string | undefined>;
@@ -116,6 +138,7 @@ type UseWebVoiceAgentOptions = {
116
138
  apiBaseUrl?: string;
117
139
  routesFile?: string;
118
140
  functionsFolders?: string;
141
+ agentsFolders?: string;
119
142
  modelOverride?: string;
120
143
  defaultRoutesFile?: string;
121
144
  defaultFunctionsFolder?: string;
@@ -230,4 +253,4 @@ type NavaiVoiceOrbDockMicIconProps = {
230
253
  };
231
254
  declare function NavaiVoiceOrbDockMicIcon({ isActive, size }: NavaiVoiceOrbDockMicIconProps): react_jsx_runtime.JSX.Element;
232
255
 
233
- export { type BuildNavaiAgentOptions, type BuildNavaiAgentResult, type CreateNavaiBackendClientOptions, type ExecuteNavaiBackendFunction, type ExecuteNavaiBackendFunctionInput, type NavaiBackendClient, type NavaiBackendFunctionDefinition, type NavaiFunctionContext, type NavaiFunctionDefinition, type NavaiFunctionModuleLoaders, type NavaiFunctionPayload, type NavaiFunctionsRegistry, NavaiHeroOrb, type NavaiHeroOrbProps, NavaiMiniOrbDock, type NavaiMiniOrbDockProps, type NavaiRoute, NavaiVoiceHeroOrb, type NavaiVoiceHeroOrbProps, type NavaiVoiceOrbBaseProps, NavaiVoiceOrbDock, NavaiVoiceOrbDockMicIcon, type NavaiVoiceOrbDockProps, type NavaiVoiceOrbMessages, type NavaiVoiceOrbPlacement, type NavaiVoiceOrbRuntimeSnapshot, type NavaiVoiceOrbThemeMode, type NavaiWebVoiceAgentLike, Orb, type OrbProps, type ResolveNavaiFrontendRuntimeConfigOptions, type ResolveNavaiFrontendRuntimeConfigResult, type UseWebVoiceAgentOptions, type UseWebVoiceAgentResult, buildNavaiAgent, clampNavaiOrbDelayMs, createNavaiBackendClient, getNavaiRoutePromptLines, loadNavaiFunctions, resolveNavaiFrontendRuntimeConfig, resolveNavaiRoute, resolveNavaiVoiceOrbRuntimeSnapshot, useWebVoiceAgent };
256
+ export { type BuildNavaiAgentOptions, type BuildNavaiAgentResult, type CreateNavaiBackendClientOptions, type ExecuteNavaiBackendFunction, type ExecuteNavaiBackendFunctionInput, type NavaiAgentModuleConfig, type NavaiBackendClient, type NavaiBackendFunctionDefinition, type NavaiFunctionContext, type NavaiFunctionDefinition, type NavaiFunctionModuleLoaders, type NavaiFunctionPayload, type NavaiFunctionsRegistry, NavaiHeroOrb, type NavaiHeroOrbProps, NavaiMiniOrbDock, type NavaiMiniOrbDockProps, type NavaiRoute, type NavaiRuntimeAgentConfig, NavaiVoiceHeroOrb, type NavaiVoiceHeroOrbProps, type NavaiVoiceOrbBaseProps, NavaiVoiceOrbDock, NavaiVoiceOrbDockMicIcon, type NavaiVoiceOrbDockProps, type NavaiVoiceOrbMessages, type NavaiVoiceOrbPlacement, type NavaiVoiceOrbRuntimeSnapshot, type NavaiVoiceOrbThemeMode, type NavaiWebVoiceAgentLike, Orb, type OrbProps, type ResolveNavaiFrontendRuntimeConfigOptions, type ResolveNavaiFrontendRuntimeConfigResult, type UseWebVoiceAgentOptions, type UseWebVoiceAgentResult, buildNavaiAgent, clampNavaiOrbDelayMs, createNavaiBackendClient, getNavaiRoutePromptLines, loadNavaiFunctions, resolveNavaiFrontendRuntimeConfig, resolveNavaiRoute, resolveNavaiVoiceOrbRuntimeSnapshot, useWebVoiceAgent };
package/dist/index.d.ts CHANGED
@@ -29,6 +29,45 @@ type NavaiRoute = {
29
29
  declare function resolveNavaiRoute(input: string, routes?: NavaiRoute[]): string | null;
30
30
  declare function getNavaiRoutePromptLines(routes?: NavaiRoute[]): string[];
31
31
 
32
+ type NavaiFrontendEnv$2 = Record<string, unknown>;
33
+ type NavaiAgentModuleConfig = {
34
+ key?: string;
35
+ name?: string;
36
+ description?: string;
37
+ handoffDescription?: string;
38
+ instructions?: string;
39
+ isPrimary?: boolean;
40
+ };
41
+ type NavaiRuntimeAgentConfig = {
42
+ key: string;
43
+ name: string;
44
+ description?: string;
45
+ handoffDescription?: string;
46
+ instructions?: string;
47
+ isPrimary: boolean;
48
+ functionModuleLoaders: NavaiFunctionModuleLoaders;
49
+ };
50
+ type ResolveNavaiFrontendRuntimeConfigOptions = {
51
+ moduleLoaders: NavaiFunctionModuleLoaders;
52
+ defaultRoutes: NavaiRoute[];
53
+ env?: NavaiFrontendEnv$2;
54
+ routesFile?: string;
55
+ functionsFolders?: string;
56
+ agentsFolders?: string;
57
+ modelOverride?: string;
58
+ defaultRoutesFile?: string;
59
+ defaultFunctionsFolder?: string;
60
+ };
61
+ type ResolveNavaiFrontendRuntimeConfigResult = {
62
+ routes: NavaiRoute[];
63
+ functionModuleLoaders: NavaiFunctionModuleLoaders;
64
+ agents: NavaiRuntimeAgentConfig[];
65
+ primaryAgentKey?: string;
66
+ modelOverride?: string;
67
+ warnings: string[];
68
+ };
69
+ declare function resolveNavaiFrontendRuntimeConfig(options: ResolveNavaiFrontendRuntimeConfigOptions): Promise<ResolveNavaiFrontendRuntimeConfigResult>;
70
+
32
71
  type NavaiBackendFunctionDefinition = {
33
72
  name: string;
34
73
  description?: string;
@@ -42,6 +81,8 @@ type ExecuteNavaiBackendFunction = (input: ExecuteNavaiBackendFunctionInput) =>
42
81
  type BuildNavaiAgentOptions = NavaiFunctionContext & {
43
82
  routes: NavaiRoute[];
44
83
  functionModuleLoaders?: NavaiFunctionModuleLoaders;
84
+ agents?: NavaiRuntimeAgentConfig[];
85
+ primaryAgentKey?: string;
45
86
  backendFunctions?: NavaiBackendFunctionDefinition[];
46
87
  executeBackendFunction?: ExecuteNavaiBackendFunction;
47
88
  agentName?: string;
@@ -53,7 +94,7 @@ type BuildNavaiAgentResult = {
53
94
  };
54
95
  declare function buildNavaiAgent(options: BuildNavaiAgentOptions): Promise<BuildNavaiAgentResult>;
55
96
 
56
- type NavaiFrontendEnv$2 = Record<string, string | undefined>;
97
+ type NavaiFrontendEnv$1 = Record<string, string | undefined>;
57
98
  type CreateClientSecretInput = {
58
99
  model?: string;
59
100
  voice?: string;
@@ -73,7 +114,7 @@ type BackendFunctionsResult = {
73
114
  };
74
115
  type CreateNavaiBackendClientOptions = {
75
116
  apiBaseUrl?: string;
76
- env?: NavaiFrontendEnv$2;
117
+ env?: NavaiFrontendEnv$1;
77
118
  fetchImpl?: typeof fetch;
78
119
  clientSecretPath?: string;
79
120
  functionsListPath?: string;
@@ -86,25 +127,6 @@ type NavaiBackendClient = {
86
127
  };
87
128
  declare function createNavaiBackendClient(options?: CreateNavaiBackendClientOptions): NavaiBackendClient;
88
129
 
89
- type NavaiFrontendEnv$1 = Record<string, unknown>;
90
- type ResolveNavaiFrontendRuntimeConfigOptions = {
91
- moduleLoaders: NavaiFunctionModuleLoaders;
92
- defaultRoutes: NavaiRoute[];
93
- env?: NavaiFrontendEnv$1;
94
- routesFile?: string;
95
- functionsFolders?: string;
96
- modelOverride?: string;
97
- defaultRoutesFile?: string;
98
- defaultFunctionsFolder?: string;
99
- };
100
- type ResolveNavaiFrontendRuntimeConfigResult = {
101
- routes: NavaiRoute[];
102
- functionModuleLoaders: NavaiFunctionModuleLoaders;
103
- modelOverride?: string;
104
- warnings: string[];
105
- };
106
- declare function resolveNavaiFrontendRuntimeConfig(options: ResolveNavaiFrontendRuntimeConfigOptions): Promise<ResolveNavaiFrontendRuntimeConfigResult>;
107
-
108
130
  type VoiceStatus = "idle" | "connecting" | "connected" | "error";
109
131
  type AgentVoiceState = "idle" | "speaking";
110
132
  type NavaiFrontendEnv = Record<string, string | undefined>;
@@ -116,6 +138,7 @@ type UseWebVoiceAgentOptions = {
116
138
  apiBaseUrl?: string;
117
139
  routesFile?: string;
118
140
  functionsFolders?: string;
141
+ agentsFolders?: string;
119
142
  modelOverride?: string;
120
143
  defaultRoutesFile?: string;
121
144
  defaultFunctionsFolder?: string;
@@ -230,4 +253,4 @@ type NavaiVoiceOrbDockMicIconProps = {
230
253
  };
231
254
  declare function NavaiVoiceOrbDockMicIcon({ isActive, size }: NavaiVoiceOrbDockMicIconProps): react_jsx_runtime.JSX.Element;
232
255
 
233
- export { type BuildNavaiAgentOptions, type BuildNavaiAgentResult, type CreateNavaiBackendClientOptions, type ExecuteNavaiBackendFunction, type ExecuteNavaiBackendFunctionInput, type NavaiBackendClient, type NavaiBackendFunctionDefinition, type NavaiFunctionContext, type NavaiFunctionDefinition, type NavaiFunctionModuleLoaders, type NavaiFunctionPayload, type NavaiFunctionsRegistry, NavaiHeroOrb, type NavaiHeroOrbProps, NavaiMiniOrbDock, type NavaiMiniOrbDockProps, type NavaiRoute, NavaiVoiceHeroOrb, type NavaiVoiceHeroOrbProps, type NavaiVoiceOrbBaseProps, NavaiVoiceOrbDock, NavaiVoiceOrbDockMicIcon, type NavaiVoiceOrbDockProps, type NavaiVoiceOrbMessages, type NavaiVoiceOrbPlacement, type NavaiVoiceOrbRuntimeSnapshot, type NavaiVoiceOrbThemeMode, type NavaiWebVoiceAgentLike, Orb, type OrbProps, type ResolveNavaiFrontendRuntimeConfigOptions, type ResolveNavaiFrontendRuntimeConfigResult, type UseWebVoiceAgentOptions, type UseWebVoiceAgentResult, buildNavaiAgent, clampNavaiOrbDelayMs, createNavaiBackendClient, getNavaiRoutePromptLines, loadNavaiFunctions, resolveNavaiFrontendRuntimeConfig, resolveNavaiRoute, resolveNavaiVoiceOrbRuntimeSnapshot, useWebVoiceAgent };
256
+ export { type BuildNavaiAgentOptions, type BuildNavaiAgentResult, type CreateNavaiBackendClientOptions, type ExecuteNavaiBackendFunction, type ExecuteNavaiBackendFunctionInput, type NavaiAgentModuleConfig, type NavaiBackendClient, type NavaiBackendFunctionDefinition, type NavaiFunctionContext, type NavaiFunctionDefinition, type NavaiFunctionModuleLoaders, type NavaiFunctionPayload, type NavaiFunctionsRegistry, NavaiHeroOrb, type NavaiHeroOrbProps, NavaiMiniOrbDock, type NavaiMiniOrbDockProps, type NavaiRoute, type NavaiRuntimeAgentConfig, NavaiVoiceHeroOrb, type NavaiVoiceHeroOrbProps, type NavaiVoiceOrbBaseProps, NavaiVoiceOrbDock, NavaiVoiceOrbDockMicIcon, type NavaiVoiceOrbDockProps, type NavaiVoiceOrbMessages, type NavaiVoiceOrbPlacement, type NavaiVoiceOrbRuntimeSnapshot, type NavaiVoiceOrbThemeMode, type NavaiWebVoiceAgentLike, Orb, type OrbProps, type ResolveNavaiFrontendRuntimeConfigOptions, type ResolveNavaiFrontendRuntimeConfigResult, type UseWebVoiceAgentOptions, type UseWebVoiceAgentResult, buildNavaiAgent, clampNavaiOrbDelayMs, createNavaiBackendClient, getNavaiRoutePromptLines, loadNavaiFunctions, resolveNavaiFrontendRuntimeConfig, resolveNavaiRoute, resolveNavaiVoiceOrbRuntimeSnapshot, useWebVoiceAgent };