@fonoster/autopilot 0.9.21 → 0.9.22

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.
Files changed (137) hide show
  1. package/dist/Autopilot.js +6 -2
  2. package/dist/assistants/index.d.ts +18 -0
  3. package/dist/assistants/index.js +1 -1
  4. package/dist/assistants/loadAndValidateAssistant.js +2 -2
  5. package/dist/assistants/types.d.ts +19 -1
  6. package/dist/envs.d.ts +5 -5
  7. package/dist/envs.js +5 -5
  8. package/dist/handleVoiceRequest.js +11 -10
  9. package/dist/index.d.ts +18 -0
  10. package/dist/index.js +1 -1
  11. package/dist/knowledge/AbstractKnowledgeBase.js +1 -1
  12. package/dist/knowledge/FilesKnowledgeBase.d.ts +18 -0
  13. package/dist/knowledge/FilesKnowledgeBase.js +1 -1
  14. package/dist/knowledge/S3KnowledgeBase.d.ts +18 -0
  15. package/dist/knowledge/S3KnowledgeBase.js +1 -1
  16. package/dist/knowledge/index.d.ts +18 -0
  17. package/dist/knowledge/index.js +1 -1
  18. package/dist/knowledge/types.d.ts +18 -0
  19. package/dist/loadAssistantConfigFromFile.js +2 -2
  20. package/dist/loadAssistantFromAPI.d.ts +18 -0
  21. package/dist/loadAssistantFromAPI.js +12 -9
  22. package/dist/machine/actions/announceIdleTimeout.js +1 -1
  23. package/dist/machine/actions/announceSystemError.js +1 -1
  24. package/dist/machine/actions/appendSpeech.d.ts +1 -1
  25. package/dist/machine/actions/appendSpeech.js +2 -2
  26. package/dist/machine/actions/cleanSpeech.d.ts +1 -1
  27. package/dist/machine/actions/cleanSpeech.js +1 -1
  28. package/dist/machine/actions/goodbye.js +1 -1
  29. package/dist/machine/actions/greetUser.js +1 -1
  30. package/dist/machine/actions/increaseIdleTimeoutCount.d.ts +1 -1
  31. package/dist/machine/actions/increaseIdleTimeoutCount.js +2 -2
  32. package/dist/machine/actions/index.d.ts +18 -0
  33. package/dist/machine/actions/index.js +1 -1
  34. package/dist/machine/actions/interruptPlayback.js +1 -1
  35. package/dist/machine/actions/resetIdleTimeoutCount.d.ts +1 -1
  36. package/dist/machine/actions/resetIdleTimeoutCount.js +2 -2
  37. package/dist/machine/actions/resetState.d.ts +1 -1
  38. package/dist/machine/actions/resetState.js +2 -2
  39. package/dist/machine/actions/setSpeaking.d.ts +1 -1
  40. package/dist/machine/actions/setSpeaking.js +2 -2
  41. package/dist/machine/actions/setSpeakingDone.d.ts +1 -1
  42. package/dist/machine/actions/setSpeakingDone.js +2 -2
  43. package/dist/machine/actors/doProcessUserRequest.js +2 -2
  44. package/dist/machine/actors/index.d.ts +18 -0
  45. package/dist/machine/actors/index.js +1 -1
  46. package/dist/machine/context.d.ts +18 -0
  47. package/dist/machine/context.js +1 -1
  48. package/dist/machine/delays.d.ts +18 -0
  49. package/dist/machine/delays.js +1 -2
  50. package/dist/machine/guards/hasSpeechResult.js +1 -1
  51. package/dist/machine/guards/idleTimeoutCountExceedsMax.js +1 -1
  52. package/dist/machine/guards/index.d.ts +18 -0
  53. package/dist/machine/guards/index.js +1 -1
  54. package/dist/machine/guards/isSpeaking.js +1 -1
  55. package/dist/machine/index.d.ts +18 -0
  56. package/dist/machine/index.js +1 -1
  57. package/dist/machine/machine.d.ts +38 -81
  58. package/dist/machine/machine.js +1 -2
  59. package/dist/machine/setup.d.ts +67 -83
  60. package/dist/machine/setup.js +57 -12
  61. package/dist/machine/types.d.ts +28 -1
  62. package/dist/models/AbstractLanguageModel.d.ts +1 -1
  63. package/dist/models/AbstractLanguageModel.js +3 -3
  64. package/dist/models/LanguageModelFactory.d.ts +2 -2
  65. package/dist/models/LanguageModelFactory.js +2 -2
  66. package/dist/models/chatHistory.js +1 -1
  67. package/dist/models/createChain.d.ts +19 -1
  68. package/dist/models/createLanguageModel.d.ts +18 -0
  69. package/dist/models/createLanguageModel.js +5 -6
  70. package/dist/models/createPromptTemplate.d.ts +18 -0
  71. package/dist/models/createPromptTemplate.js +1 -1
  72. package/dist/models/evaluations/createTestTextSimilarity.js +1 -1
  73. package/dist/models/evaluations/evalTestCases.d.ts +24 -2
  74. package/dist/models/evaluations/evalTestCases.js +3 -3
  75. package/dist/models/evaluations/evaluateScenario.js +18 -0
  76. package/dist/models/evaluations/evaluateStep.js +21 -3
  77. package/dist/models/evaluations/evaluateTextResponse.d.ts +18 -0
  78. package/dist/models/evaluations/evaluateTextResponse.js +1 -1
  79. package/dist/models/evaluations/evaluateToolCalls.js +18 -0
  80. package/dist/models/evaluations/index.d.ts +18 -0
  81. package/dist/models/evaluations/index.js +1 -1
  82. package/dist/models/evaluations/printEval.js +2 -2
  83. package/dist/models/evaluations/textSimilaryPrompt.d.ts +18 -0
  84. package/dist/models/evaluations/textSimilaryPrompt.js +1 -1
  85. package/dist/models/evaluations/types.d.ts +19 -6
  86. package/dist/models/groq/Groq.d.ts +1 -1
  87. package/dist/models/groq/index.d.ts +18 -0
  88. package/dist/models/groq/index.js +2 -2
  89. package/dist/models/groq/types.d.ts +18 -0
  90. package/dist/models/index.d.ts +18 -0
  91. package/dist/models/index.js +2 -2
  92. package/dist/models/ollama/Ollama.d.ts +1 -1
  93. package/dist/models/ollama/index.d.ts +18 -0
  94. package/dist/models/ollama/index.js +1 -1
  95. package/dist/models/ollama/types.d.ts +18 -0
  96. package/dist/models/openai/OpenAI.d.ts +1 -1
  97. package/dist/models/openai/index.d.ts +18 -0
  98. package/dist/models/openai/index.js +2 -2
  99. package/dist/models/openai/types.d.ts +18 -0
  100. package/dist/models/toolInvocation.d.ts +1 -1
  101. package/dist/models/toolInvocation.js +1 -1
  102. package/dist/models/types.d.ts +19 -1
  103. package/dist/sendConversationEndedEvent.d.ts +19 -2
  104. package/dist/sendConversationEndedEvent.js +1 -1
  105. package/dist/server.js +163 -1
  106. package/dist/tools/ToolsCatalog.d.ts +1 -1
  107. package/dist/tools/ToolsCatalog.js +6 -6
  108. package/dist/tools/builtin/hangupToolDefinition.d.ts +19 -1
  109. package/dist/tools/builtin/transferToolDefinition.d.ts +19 -1
  110. package/dist/tools/convertToolToOpenAITool.d.ts +19 -1
  111. package/dist/tools/index.d.ts +18 -0
  112. package/dist/tools/index.js +1 -1
  113. package/dist/tools/types.d.ts +27 -0
  114. package/dist/types.d.ts +27 -2
  115. package/dist/vad/SileroVad.js +1 -2
  116. package/dist/vad/SileroVadModel.js +1 -1
  117. package/dist/vad/chunkToFloat32Array.d.ts +18 -0
  118. package/dist/vad/chunkToFloat32Array.js +1 -5
  119. package/dist/vad/createVad.js +1 -10
  120. package/dist/vad/index.d.ts +18 -0
  121. package/dist/vad/index.js +1 -2
  122. package/dist/vad/types.d.ts +18 -0
  123. package/dist/vadWorker.js +3 -3
  124. package/dist/vadv5/SileroVad.js +1 -2
  125. package/dist/vadv5/SileroVadModel.js +1 -1
  126. package/dist/vadv5/createVad.js +3 -4
  127. package/dist/vadv5/index.d.ts +18 -0
  128. package/dist/vadv5/index.js +1 -2
  129. package/dist/vadv5/types.d.ts +18 -0
  130. package/dist/voice/Voice.js +1 -1
  131. package/dist/voice/index.d.ts +18 -0
  132. package/dist/voice/index.js +2 -2
  133. package/dist/voice/types.d.ts +18 -0
  134. package/dist/voiceServerSetup.js +1 -1
  135. package/package.json +9 -11
  136. package/dist/tools/type.d.ts +0 -9
  137. /package/dist/tools/{type.js → types.js} +0 -0
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
19
+ import { toolSchema } from "@fonoster/common";
20
+ import { z } from "zod";
21
+ type Tool = z.infer<typeof toolSchema>;
22
+ type BuiltInTool = Omit<Tool, "operation">;
23
+ type OpenAITool = {
24
+ type: "function";
25
+ function: Omit<Tool, "operation">;
26
+ };
27
+ export { OpenAITool, Tool, BuiltInTool };
package/dist/types.d.ts CHANGED
@@ -1,4 +1,23 @@
1
- import { ConversationSettings } from "./assistants";
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
19
+ import { Application } from "@fonoster/types";
20
+ import { AssistantConfig, ConversationSettings } from "./assistants";
2
21
  import { LanguageModel } from "./models";
3
22
  import { Voice } from "./voice";
4
23
  declare enum LanguageModelProvider {
@@ -15,4 +34,10 @@ type AutopilotParams = {
15
34
  conversationSettings: ConversationSettings;
16
35
  languageModel: LanguageModel;
17
36
  };
18
- export { AutopilotParams, LanguageModelProvider, ConversationProvider };
37
+ type AutopilotApplication = Application & {
38
+ intelligence: {
39
+ productRef: string;
40
+ config: AssistantConfig;
41
+ };
42
+ };
43
+ export { AutopilotParams, LanguageModelProvider, ConversationProvider, AutopilotApplication };
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SileroVad = void 0;
4
- /* eslint-disable no-loops/no-loops */
5
- /*
4
+ /**
6
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
7
6
  * http://github.com/fonoster/fonoster
8
7
  *
@@ -2,7 +2,7 @@
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.SileroVadModel = void 0;
5
- /*
5
+ /**
6
6
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
7
7
  * http://github.com/fonoster/fonoster
8
8
  *
@@ -1,2 +1,20 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  declare function chunkToFloat32Array(chunk: Uint8Array): Float32Array;
2
20
  export { chunkToFloat32Array };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.chunkToFloat32Array = chunkToFloat32Array;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *
@@ -19,10 +19,6 @@ exports.chunkToFloat32Array = chunkToFloat32Array;
19
19
  * See the License for the specific language governing permissions and
20
20
  * limitations under the License.
21
21
  */
22
- // This version of the chunkToFloat32Array accounts for the case where
23
- // the byteOffset is misaligned.
24
- //
25
- // Q. Would it be the same if we just created a new Uint8Array from the chunk?
26
22
  function chunkToFloat32Array(chunk) {
27
23
  // Create a DataView to handle endianness explicitly
28
24
  const dataView = new DataView(chunk.buffer, chunk.byteOffset, chunk.byteLength);
@@ -34,8 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.createVad = createVad;
37
- /* eslint-disable no-loops/no-loops */
38
- /*
37
+ /**
39
38
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
40
39
  * http://github.com/fonoster/fonoster
41
40
  *
@@ -68,14 +67,6 @@ async function createVad(params) {
68
67
  let audioBuffer = [];
69
68
  let isSpeechActive = false;
70
69
  let framesSinceStateChange = 0;
71
- // Helper to reset internal state after a state change.
72
- const resetState = () => {
73
- isSpeechActive = false;
74
- framesSinceStateChange = 0;
75
- audioBuffer = [];
76
- silero.resetState();
77
- logger.silly("State reset -- audioBuffer cleared");
78
- };
79
70
  return async function process(chunk, callback) {
80
71
  const float32Array = (0, chunkToFloat32Array_1.chunkToFloat32Array)(chunk);
81
72
  audioBuffer.push(...float32Array);
@@ -1,2 +1,20 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  export * from "./SileroVad";
2
20
  export * from "./types";
package/dist/vad/index.js CHANGED
@@ -14,8 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- /* eslint-disable no-loops/no-loops */
18
- /*
17
+ /**
19
18
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
20
19
  * http://github.com/fonoster/fonoster
21
20
  *
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  type VadEvent = "SPEECH_START" | "SPEECH_END";
2
20
  type Vad = {
3
21
  processChunk: (chunk: Uint8Array, callback: (event: VadEvent) => void) => void;
package/dist/vadWorker.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- /*
3
+ /**
4
4
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
5
5
  * http://github.com/fonoster/fonoster
6
6
  *
@@ -18,11 +18,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  * See the License for the specific language governing permissions and
19
19
  * limitations under the License.
20
20
  */
21
+ const path_1 = require("path");
21
22
  const worker_threads_1 = require("worker_threads");
23
+ const envs_1 = require("./envs");
22
24
  const SileroVad_1 = require("./vad/SileroVad");
23
25
  const SileroVad_2 = require("./vadv5/SileroVad");
24
- const envs_1 = require("./envs");
25
- const path_1 = require("path");
26
26
  const vad = envs_1.SILERO_VAD_VERSION === "v4"
27
27
  ? new SileroVad_1.SileroVad({
28
28
  ...worker_threads_1.workerData,
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SileroVad = void 0;
4
- /* eslint-disable no-loops/no-loops */
5
- /*
4
+ /**
6
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
7
6
  * http://github.com/fonoster/fonoster
8
7
  *
@@ -2,7 +2,7 @@
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.SileroVadModel = void 0;
5
- /*
5
+ /**
6
6
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
7
7
  * http://github.com/fonoster/fonoster
8
8
  *
@@ -34,8 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.createVad = createVad;
37
- /* eslint-disable no-loops/no-loops */
38
- /*
37
+ /**
39
38
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
40
39
  * http://github.com/fonoster/fonoster
41
40
  *
@@ -53,11 +52,11 @@ exports.createVad = createVad;
53
52
  * See the License for the specific language governing permissions and
54
53
  * limitations under the License.
55
54
  */
55
+ const path_1 = require("path");
56
+ const logger_1 = require("@fonoster/logger");
56
57
  const ort = __importStar(require("onnxruntime-node"));
57
58
  const chunkToFloat32Array_1 = require("../vad/chunkToFloat32Array");
58
59
  const SileroVadModel_1 = require("./SileroVadModel");
59
- const logger_1 = require("@fonoster/logger");
60
- const path_1 = require("path");
61
60
  const logger = (0, logger_1.getLogger)({ service: "autopilot", filePath: __filename });
62
61
  const FULL_FRAME_SIZE = 1024; // 64ms @ 16kHz
63
62
  const BUFFER_SIZE = 512; // 32ms @ 16kHz
@@ -1,2 +1,20 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  export * from "./SileroVad";
2
20
  export * from "./types";
@@ -14,8 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- /* eslint-disable no-loops/no-loops */
18
- /*
17
+ /**
19
18
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
20
19
  * http://github.com/fonoster/fonoster
21
20
  *
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  type VadEvent = "SPEECH_START" | "SPEECH_END";
2
20
  type Vad = {
3
21
  processChunk: (chunk: Uint8Array, callback: (event: VadEvent) => void) => void;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VoiceImpl = void 0;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *
@@ -1,2 +1,20 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  export * from "./Voice";
2
20
  export * from "./types";
@@ -14,8 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./Voice"), exports);
18
- /*
17
+ /**
19
18
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
20
19
  * http://github.com/fonoster/fonoster
21
20
  *
@@ -33,4 +32,5 @@ __exportStar(require("./Voice"), exports);
33
32
  * See the License for the specific language governing permissions and
34
33
  * limitations under the License.
35
34
  */
35
+ __exportStar(require("./Voice"), exports);
36
36
  __exportStar(require("./types"), exports);
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  type GatherStream = {
2
20
  stop: () => Promise<void>;
3
21
  onData: (cb: (payload: {
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.startVoiceServer = startVoiceServer;
7
- /*
7
+ /**
8
8
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
9
9
  * http://github.com/fonoster/fonoster
10
10
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fonoster/autopilot",
3
- "version": "0.9.21",
3
+ "version": "0.9.22",
4
4
  "description": "Voice AI for the Fonoster platform",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/fonoster#readme",
@@ -15,7 +15,7 @@
15
15
  "prebuild": "rimraf ./dist tsconfig.tsbuildinfo",
16
16
  "build": "tsc -b tsconfig.json",
17
17
  "clean": "rimraf ./dist node_modules tsconfig.tsbuildinfo",
18
- "generate:readme": "node ../../.scripts/gen-readme.js"
18
+ "generate:readme": "node ../../.scripts/gen-readme.cjs"
19
19
  },
20
20
  "files": [
21
21
  "dist",
@@ -33,16 +33,17 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@aws-sdk/client-s3": "^3.712.0",
36
- "@fonoster/common": "^0.9.20",
37
- "@fonoster/logger": "^0.9.12",
38
- "@fonoster/sdk": "^0.9.20",
39
- "@fonoster/types": "^0.9.20",
40
- "@fonoster/voice": "^0.9.20",
36
+ "@fonoster/common": "^0.9.22",
37
+ "@fonoster/logger": "^0.9.22",
38
+ "@fonoster/sdk": "^0.9.22",
39
+ "@fonoster/types": "^0.9.22",
40
+ "@fonoster/voice": "^0.9.22",
41
41
  "@langchain/community": "^0.3.32",
42
42
  "@langchain/core": "^0.3.40",
43
43
  "@langchain/groq": "^0.1.3",
44
44
  "@langchain/ollama": "^0.1.6",
45
45
  "@langchain/openai": "^0.4.4",
46
+ "chalk": "^5.4.1",
46
47
  "cheerio": "^1.0.0",
47
48
  "cli-table3": "^0.6.5",
48
49
  "dotenv": "^16.4.5",
@@ -55,8 +56,5 @@
55
56
  "xstate": "^5.17.3",
56
57
  "zod": "^3.23.8"
57
58
  },
58
- "devDependencies": {
59
- "typescript": "^5.5.4"
60
- },
61
- "gitHead": "73c14b4b4e2772e5eb367014f85100605efa5e02"
59
+ "gitHead": "3c393362218ebfdd7ec672f18553953edf37e9e3"
62
60
  }
@@ -1,9 +0,0 @@
1
- import { z } from "zod";
2
- import { toolSchema } from "@fonoster/common";
3
- type Tool = z.infer<typeof toolSchema>;
4
- type BuiltInTool = Omit<Tool, "operation">;
5
- type OpenAITool = {
6
- type: "function";
7
- function: Omit<Tool, "operation">;
8
- };
9
- export { OpenAITool, Tool, BuiltInTool };
File without changes